From 617e3067b735ad6ea9c1a5414e80774c1345bb1b Mon Sep 17 00:00:00 2001 From: Gabriel Cordes Date: Mon, 4 Jul 2016 14:52:28 +0200 Subject: [PATCH 1/4] support of tracked entities in 3D mode zooming is now with animation but not when an entity is tracked --- Source/CesiumNavigation.js | 18 +- Source/Core/Utils.js | 32 +- Source/ViewModels/NavigationViewModel.js | 168 ++++-- .../ViewModels/ResetViewNavigationControl.js | 204 +++---- Source/ViewModels/ZoomNavigationControl.js | 69 ++- Source/viewerCesiumNavigationMixin.js | 12 +- dist/amd/viewerCesiumNavigationMixin.js | 512 ++++++++++------- dist/amd/viewerCesiumNavigationMixin.min.js | 11 +- .../standalone/viewerCesiumNavigationMixin.js | 513 +++++++++++------- .../viewerCesiumNavigationMixin.min.js | 10 +- 10 files changed, 983 insertions(+), 566 deletions(-) diff --git a/Source/CesiumNavigation.js b/Source/CesiumNavigation.js index c2719705..ee30ff56 100644 --- a/Source/CesiumNavigation.js +++ b/Source/CesiumNavigation.js @@ -23,9 +23,9 @@ define([ * @alias CesiumNavigation * @constructor * - * @param {CesiumWidget} cesiumWidget The CesiumWidget instance + * @param {Viewer|CesiumWidget} viewerCesiumWidget The Viewer or CesiumWidget instance */ - var CesiumNavigation = function (cesiumWidget) { + var CesiumNavigation = function (viewerCesiumWidget) { initialize.apply(this, arguments); this._onDestroyListeners = []; @@ -73,18 +73,24 @@ define([ } }; - function initialize(cesiumWidget, options) { - if (!defined(cesiumWidget)) { - throw new DeveloperError('cesiumWidget is required.'); + /** + * @param {Viewer|CesiumWidget} viewerCesiumWidget The Viewer or CesiumWidget instance + * @param options + */ + function initialize(viewerCesiumWidget, options) { + if (!defined(viewerCesiumWidget)) { + throw new DeveloperError('CesiumWidget or Viewer is required.'); } // options = defaultValue(options, defaultValue.EMPTY_OBJECT); + var cesiumWidget = defined(viewerCesiumWidget.cesiumWidget) ? viewerCesiumWidget.cesiumWidget : viewerCesiumWidget; + var container = document.createElement('div'); container.className = 'cesium-widget-cesiumNavigationContainer'; cesiumWidget.container.appendChild(container); - this.terria = cesiumWidget; + this.terria = viewerCesiumWidget; this.terria.options = options; this.terria.afterWidgetChanged = new CesiumEvent(); this.terria.beforeWidgetChanged = new CesiumEvent(); diff --git a/Source/Core/Utils.js b/Source/Core/Utils.js index 880cd95c..4620024e 100644 --- a/Source/Core/Utils.js +++ b/Source/Core/Utils.js @@ -4,12 +4,14 @@ define([ 'Cesium/Core/Ray', 'Cesium/Core/Cartesian3', 'Cesium/Core/Cartographic', + 'Cesium/Core/ReferenceFrame', 'Cesium/Scene/SceneMode' ], function ( defined, Ray, Cartesian3, Cartographic, + ReferenceFrame, SceneMode) { 'use strict'; @@ -20,12 +22,15 @@ define([ /** * gets the focus point of the camera - * @param {Scene} scene The scene + * @param {Viewer|Widget} terria The terria * @param {boolean} inWorldCoordinates true to get the focus in world coordinates, otherwise get it in projection-specific map coordinates, in meters. * @param {Cartesian3} [result] The object in which the result will be stored. * @return {Cartesian3} The modified result parameter, a new instance if none was provided or undefined if there is no focus point. */ - Utils.getCameraFocus = function (scene, inWorldCoordinates, result) { + Utils.getCameraFocus = function (terria, inWorldCoordinates, result) { + var scene = terria.scene; + var camera = scene.camera; + if(scene.mode == SceneMode.MORPHING) { return undefined; } @@ -34,29 +39,34 @@ define([ result = new Cartesian3(); } - var camera = scene.camera; + // TODO bug when tracking: if entity moves the current position should be used and not only the one when starting orbiting/rotating + // TODO bug when tracking: reset should reset to default view of tracked entity - rayScratch.origin = camera.positionWC; - rayScratch.direction = camera.directionWC; - var center = scene.globe.pick(rayScratch, scene, result); + if(defined(terria.trackedEntity)) { + result = terria.trackedEntity.position.getValue(terria.clock.currentTime, result); + } else { + rayScratch.origin = camera.positionWC; + rayScratch.direction = camera.directionWC; + result = scene.globe.pick(rayScratch, scene, result); + } - if (!defined(center)) { + if (!defined(result)) { return undefined; } if(scene.mode == SceneMode.SCENE2D || scene.mode == SceneMode.COLUMBUS_VIEW) { - center = camera.worldToCameraCoordinatesPoint(center, result); + result = camera.worldToCameraCoordinatesPoint(result, result); if(inWorldCoordinates) { - center = scene.globe.ellipsoid.cartographicToCartesian(scene.mapProjection.unproject(center, unprojectedScratch), result); + result = scene.globe.ellipsoid.cartographicToCartesian(scene.mapProjection.unproject(result, unprojectedScratch), result); } } else { if(!inWorldCoordinates) { - center = camera.worldToCameraCoordinatesPoint(center, result); + result = camera.worldToCameraCoordinatesPoint(result, result); } } - return center; + return result; }; return Utils; diff --git a/Source/ViewModels/NavigationViewModel.js b/Source/ViewModels/NavigationViewModel.js index 290e2f7a..4b5dc6ba 100644 --- a/Source/ViewModels/NavigationViewModel.js +++ b/Source/ViewModels/NavigationViewModel.js @@ -210,14 +210,30 @@ define([ var centerScratch = new Cartesian3(); NavigationViewModel.prototype.handleDoubleClick = function (viewModel, e) { - var scene = this.terria.scene; + var scene = viewModel.terria.scene; var camera = scene.camera; - if (scene.mode == SceneMode.MORPHING || scene.mode == SceneMode.SCENE2D) { + var sscc = scene.screenSpaceCameraController; + + if (scene.mode == SceneMode.MORPHING || !sscc.enableInputs) { return true; } + if (scene.mode == SceneMode.COLUMBUS_VIEW && !sscc.enableTranslate) { + return; + } + if(scene.mode == SceneMode.SCENE3D || scene.mode == SceneMode.COLUMBUS_VIEW) { + if (!sscc.enableLook) { + return; + } - var center = Utils.getCameraFocus(scene, true, centerScratch); + if(scene.mode == SceneMode.SCENE3D) { + if(!sscc.enableRotate) { + return + } + } + } + + var center = Utils.getCameraFocus(viewModel.terria, true, centerScratch); if (!defined(center)) { // Globe is barely visible, so reset to home view. @@ -226,15 +242,24 @@ define([ return; } - // var rotateFrame = Transforms.eastNorthUpToFixedFrame(center, scene.globe.ellipsoid); - // var cameraPosition = scene.globe.ellipsoid.cartographicToCartesian(camera.positionCartographic, new Cartesian3()); - // var lookVector = Cartesian3.subtract(center, cameraPosition, new Cartesian3()); - // - // var destination = Matrix4.multiplyByPoint(rotateFrame, new Cartesian3(0, 0, Cartesian3.magnitude(lookVector)), new Cartesian3()); - camera.flyToBoundingSphere(new BoundingSphere(center, 0), { - offset: new HeadingPitchRange(0, camera.pitch, Cartesian3.distance(cameraPosition, center)), + var surfaceNormal = scene.globe.ellipsoid.geodeticSurfaceNormal(center); + + var focusBoundingSphere = new BoundingSphere(center, 0); + + camera.flyToBoundingSphere(focusBoundingSphere, { + offset: new HeadingPitchRange(0, + // do not use camera.pitch since the pitch at the center/target is required + CesiumMath.PI_OVER_TWO - Cartesian3.angleBetween( + surfaceNormal, + camera.directionWC + ), + // distanceToBoundingSphere returns wrong values when in 2D or Columbus view so do not use + // camera.distanceToBoundingSphere(focusBoundingSphere) + // instead calculate distance manually + Cartesian3.distance(cameraPosition, center) + ), duration: 1.5 }); }; @@ -246,6 +271,41 @@ define([ }; function orbit(viewModel, compassElement, cursorVector) { + var scene = viewModel.terria.scene; + + var sscc = scene.screenSpaceCameraController; + + // do not orbit if it is disabled + if(scene.mode == SceneMode.MORPHING || !sscc.enableInputs) { + return; + } + + switch(scene.mode) { + case SceneMode.COLUMBUS_VIEW: + if(sscc.enableLook) { + break; + } + + if (!sscc.enableTranslate || !sscc.enableTilt) { + return; + } + break; + case SceneMode.SCENE3D: + if(sscc.enableLook) { + break; + } + + if (!sscc.enableTilt || !sscc.enableRotate) { + return; + } + break; + case SceneMode.SCENE2D: + if (!sscc.enableTranslate) { + return; + } + break; + } + // Remove existing event handlers, if any. document.removeEventListener('mousemove', viewModel.orbitMouseMoveFunction, false); document.removeEventListener('mouseup', viewModel.orbitMouseUpFunction, false); @@ -261,17 +321,22 @@ define([ viewModel.isOrbiting = true; viewModel.orbitLastTimestamp = getTimestamp(); - var scene = viewModel.terria.scene; var camera = scene.camera; - var center = Utils.getCameraFocus(scene, true, centerScratch); - - if (!defined(center)) { - viewModel.orbitFrame = Transforms.eastNorthUpToFixedFrame(camera.positionWC, scene.globe.ellipsoid, newTransformScratch); - viewModel.orbitIsLook = true; - } else { - viewModel.orbitFrame = Transforms.eastNorthUpToFixedFrame(center, scene.globe.ellipsoid, newTransformScratch); + if (defined(viewModel.terria.trackedEntity)) { + // when tracking an entity simply use that reference frame + viewModel.orbitFrame = undefined; viewModel.orbitIsLook = false; + } else { + var center = Utils.getCameraFocus(viewModel.terria, true, centerScratch); + + if (!defined(center)) { + viewModel.orbitFrame = Transforms.eastNorthUpToFixedFrame(camera.positionWC, scene.globe.ellipsoid, newTransformScratch); + viewModel.orbitIsLook = true; + } else { + viewModel.orbitFrame = Transforms.eastNorthUpToFixedFrame(center, scene.globe.ellipsoid, newTransformScratch); + viewModel.orbitIsLook = false; + } } viewModel.orbitTickFunction = function (e) { @@ -284,9 +349,13 @@ define([ var x = Math.cos(angle) * distance; var y = Math.sin(angle) * distance; - var oldTransform = Matrix4.clone(camera.transform, oldTransformScratch); + var oldTransform; - camera.lookAtTransform(viewModel.orbitFrame); + if (defined(viewModel.orbitFrame)) { + oldTransform = Matrix4.clone(camera.transform, oldTransformScratch); + + camera.lookAtTransform(viewModel.orbitFrame); + } // do not look up/down or rotate in 2D mode if (scene.mode == SceneMode.SCENE2D) { @@ -301,7 +370,9 @@ define([ } } - camera.lookAtTransform(oldTransform); + if (defined(viewModel.orbitFrame)) { + camera.lookAtTransform(oldTransform); + } // viewModel.terria.cesium.notifyRepaintRequired(); @@ -356,8 +427,12 @@ define([ var scene = viewModel.terria.scene; var camera = scene.camera; - // do not look rotate in 2D mode - if (scene.mode == SceneMode.SCENE2D) { + var sscc = scene.screenSpaceCameraController; + // do not rotate in 2D mode or if rotating is disabled + if (scene.mode == SceneMode.MORPHING || scene.mode == SceneMode.SCENE2D || !sscc.enableInputs) { + return; + } + if(!sscc.enableLook && (scene.mode == SceneMode.COLUMBUS_VIEW || (scene.mode == SceneMode.SCENE3D && !sscc.enableRotate))) { return; } @@ -371,21 +446,33 @@ define([ viewModel.isRotating = true; viewModel.rotateInitialCursorAngle = Math.atan2(-cursorVector.y, cursorVector.x); - var viewCenter = Utils.getCameraFocus(scene, true, centerScratch); - - if (!defined(viewCenter)) { - viewModel.rotateFrame = Transforms.eastNorthUpToFixedFrame(camera.positionWC, scene.globe.ellipsoid, newTransformScratch); - viewModel.rotateIsLook = true; - } else { - viewModel.rotateFrame = Transforms.eastNorthUpToFixedFrame(viewCenter, scene.globe.ellipsoid, newTransformScratch); + if(defined(viewModel.terria.trackedEntity)) { + // when tracking an entity simply use that reference frame + viewModel.rotateFrame = undefined; viewModel.rotateIsLook = false; + } else { + var viewCenter = Utils.getCameraFocus(viewModel.terria, true, centerScratch); + + if (!defined(viewCenter) || (scene.mode == SceneMode.COLUMBUS_VIEW && !sscc.enableLook && !sscc.enableTranslate)) { + viewModel.rotateFrame = Transforms.eastNorthUpToFixedFrame(camera.positionWC, scene.globe.ellipsoid, newTransformScratch); + viewModel.rotateIsLook = true; + } else { + viewModel.rotateFrame = Transforms.eastNorthUpToFixedFrame(viewCenter, scene.globe.ellipsoid, newTransformScratch); + viewModel.rotateIsLook = false; + } + } + + var oldTransform; + if(defined(viewModel.rotateFrame)) { + oldTransform = Matrix4.clone(camera.transform, oldTransformScratch); + camera.lookAtTransform(viewModel.rotateFrame); } - var oldTransform = Matrix4.clone(camera.transform, oldTransformScratch); - camera.lookAtTransform(viewModel.rotateFrame); viewModel.rotateInitialCameraAngle = -camera.heading; - viewModel.rotateInitialCameraDistance = Cartesian3.magnitude(new Cartesian3(camera.position.x, camera.position.y, 0.0)); - camera.lookAtTransform(oldTransform); + + if(defined(viewModel.rotateFrame)) { + camera.lookAtTransform(oldTransform); + } viewModel.rotateMouseMoveFunction = function (e) { var compassRectangle = compassElement.getBoundingClientRect(); @@ -399,11 +486,18 @@ define([ var camera = viewModel.terria.scene.camera; - var oldTransform = Matrix4.clone(camera.transform, oldTransformScratch); - camera.lookAtTransform(viewModel.rotateFrame); + var oldTransform; + if(defined(viewModel.rotateFrame)) { + oldTransform = Matrix4.clone(camera.transform, oldTransformScratch); + camera.lookAtTransform(viewModel.rotateFrame); + } + var currentCameraAngle = -camera.heading; camera.rotateRight(newCameraAngle - currentCameraAngle); - camera.lookAtTransform(oldTransform); + + if(defined(viewModel.rotateFrame)) { + camera.lookAtTransform(oldTransform); + } // viewModel.terria.cesium.notifyRepaintRequired(); }; diff --git a/Source/ViewModels/ResetViewNavigationControl.js b/Source/ViewModels/ResetViewNavigationControl.js index 8d20721b..93f22f7e 100644 --- a/Source/ViewModels/ResetViewNavigationControl.js +++ b/Source/ViewModels/ResetViewNavigationControl.js @@ -5,110 +5,114 @@ define([ 'ViewModels/NavigationControl', 'SvgPaths/svgReset' ], function ( - defined, - Camera, - NavigationControl, - svgReset) - { + defined, + Camera, + NavigationControl, + svgReset) { 'use strict'; + /** + * The model for a zoom in control in the navigation control tool bar + * + * @alias ResetViewNavigationControl + * @constructor + * @abstract + * + * @param {Terria} terria The Terria instance. + */ + var ResetViewNavigationControl = function (terria) { + NavigationControl.apply(this, arguments); + /** - * The model for a zoom in control in the navigation control tool bar - * - * @alias ResetViewNavigationControl - * @constructor - * @abstract - * - * @param {Terria} terria The Terria instance. + * Gets or sets the name of the control which is set as the control's title. + * This property is observable. + * @type {String} */ - var ResetViewNavigationControl = function (terria) - { - NavigationControl.apply(this, arguments); - - /** - * Gets or sets the name of the control which is set as the control's title. - * This property is observable. - * @type {String} - */ - this.name = 'Reset View'; - - /** - * Gets or sets the svg icon of the control. This property is observable. - * @type {Object} - */ - this.svgIcon = svgReset; - - /** - * Gets or sets the height of the svg icon. This property is observable. - * @type {Integer} - */ - this.svgHeight = 15; - - /** - * Gets or sets the width of the svg icon. This property is observable. - * @type {Integer} - */ - this.svgWidth = 15; - - /** - * Gets or sets the CSS class of the control. This property is observable. - * @type {String} - */ - this.cssClass = "navigation-control-icon-reset"; - - }; - - ResetViewNavigationControl.prototype = Object.create(NavigationControl.prototype); - - ResetViewNavigationControl.prototype.resetView = function () - { - //this.terria.analytics.logEvent('navigation', 'click', 'reset'); - - this.isActive = true; - - var camera = this.terria.scene.camera; - - //reset to a default position or view defined in the options - if (this.terria.options.defaultResetView) - { - if (this.terria.options.defaultResetView && this.terria.options.defaultResetView instanceof Cesium.Cartographic) - { - camera.flyTo({ - destination: Cesium.Ellipsoid.WGS84.cartographicToCartesian(this.terria.options.defaultResetView) - }); - } else if (this.terria.options.defaultResetView && this.terria.options.defaultResetView instanceof Cesium.Rectangle) - { - try - { - Cesium.Rectangle.validate(this.terria.options.defaultResetView); - camera.flyTo({ - destination: this.terria.options.defaultResetView - }); - } catch (e) - { - console.log("Cesium-navigation/ResetViewNavigationControl: options.defaultResetView Cesium rectangle is invalid!"); - } - } - } - else if (typeof camera.flyHome === "function") - { - camera.flyHome(1); - } else - { - camera.flyTo({'destination': Camera.DEFAULT_VIEW_RECTANGLE, 'duration': 1}); - } - this.isActive = false; - }; + this.name = 'Reset View'; + + /** + * Gets or sets the svg icon of the control. This property is observable. + * @type {Object} + */ + this.svgIcon = svgReset; + + /** + * Gets or sets the height of the svg icon. This property is observable. + * @type {Integer} + */ + this.svgHeight = 15; + + /** + * Gets or sets the width of the svg icon. This property is observable. + * @type {Integer} + */ + this.svgWidth = 15; /** - * When implemented in a derived class, performs an action when the user clicks - * on this control - * @abstract - * @protected + * Gets or sets the CSS class of the control. This property is observable. + * @type {String} */ - ResetViewNavigationControl.prototype.activate = function () - { - this.resetView(); - }; - return ResetViewNavigationControl; - }); + this.cssClass = "navigation-control-icon-reset"; + + }; + + ResetViewNavigationControl.prototype = Object.create(NavigationControl.prototype); + + ResetViewNavigationControl.prototype.resetView = function () { + //this.terria.analytics.logEvent('navigation', 'click', 'reset'); + + var scene = this.terria.scene; + + var sscc = scene.screenSpaceCameraController; + if (!sscc.enableInputs) { + return; + } + + this.isActive = true; + + var camera = scene.camera; + + if (defined(this.terria.trackedEntity)) { + // when tracking do not reset to default view but to default view of tracked entity + var trackedEntity = this.terria.trackedEntity; + this.terria.trackedEntity = undefined; + this.terria.trackedEntity = trackedEntity; + } else { + // reset to a default position or view defined in the options + if (this.terria.options.defaultResetView) { + if (this.terria.options.defaultResetView && this.terria.options.defaultResetView instanceof Cesium.Cartographic) { + camera.flyTo({ + destination: Cesium.Ellipsoid.WGS84.cartographicToCartesian(this.terria.options.defaultResetView) + }); + } else if (this.terria.options.defaultResetView && this.terria.options.defaultResetView instanceof Cesium.Rectangle) { + try { + Cesium.Rectangle.validate(this.terria.options.defaultResetView); + camera.flyTo({ + destination: this.terria.options.defaultResetView + }); + } catch (e) { + console.log("Cesium-navigation/ResetViewNavigationControl: options.defaultResetView Cesium rectangle is invalid!"); + } + } + } + else if (typeof camera.flyHome === "function") { + camera.flyHome(1); + } else { + camera.flyTo({'destination': Camera.DEFAULT_VIEW_RECTANGLE, 'duration': 1}); + } + } + this.isActive = false; + }; + + /** + * When implemented in a derived class, performs an action when the user clicks + * on this control + * @abstract + * @protected + */ + ResetViewNavigationControl.prototype.activate = function () { + this.resetView(); + }; + + return ResetViewNavigationControl; +}); diff --git a/Source/ViewModels/ZoomNavigationControl.js b/Source/ViewModels/ZoomNavigationControl.js index c2d33058..ebf43562 100644 --- a/Source/ViewModels/ZoomNavigationControl.js +++ b/Source/ViewModels/ZoomNavigationControl.js @@ -53,7 +53,7 @@ define([ this.relativeAmount = 2; - if(zoomIn) { + if (zoomIn) { // this ensures that zooming in is the inverse of zooming out and vice versa // e.g. the camera position remains when zooming in and out this.relativeAmount = 1 / this.relativeAmount; @@ -83,17 +83,34 @@ define([ if (defined(this.terria)) { var scene = this.terria.scene; + + var sscc = scene.screenSpaceCameraController; + // do not zoom if it is disabled + if (!sscc.enableInputs || !sscc.enableZoom) { + return; + } + // TODO +// if(scene.mode == SceneMode.COLUMBUS_VIEW && !sscc.enableTranslate) { +// return; +// } + var camera = scene.camera; - // var orientation; + var orientation; - switch(scene.mode) { + switch (scene.mode) { case SceneMode.MORPHING: break; case SceneMode.SCENE2D: - camera.zoomIn(camera.positionCartographic.height * (1 - this.relativeAmount)); + camera.zoomIn(camera.positionCartographic.height * (1 - this.relativeAmount)); break; default: - var focus = Utils.getCameraFocus(scene, false); + var focus; + + if(defined(this.terria.trackedEntity)) { + focus = new Cartesian3(); + } else { + focus = Utils.getCameraFocus(this.terria, false); + } if (!defined(focus)) { // Camera direction is not pointing at the globe, so use the ellipsoid horizon point as @@ -101,32 +118,34 @@ define([ var ray = new Ray(camera.worldToCameraCoordinatesPoint(scene.globe.ellipsoid.cartographicToCartesian(camera.positionCartographic)), camera.directionWC); focus = IntersectionTests.grazingAltitudeLocation(ray, scene.globe.ellipsoid); - // orientation = { - // heading: camera.heading, - // pitch: camera.pitch, - // roll: camera.roll - // }; - // } else { - // orientation = { - // direction: camera.direction, - // up: camera.up - // }; + orientation = { + heading: camera.heading, + pitch: camera.pitch, + roll: camera.roll + }; + } else { + orientation = { + direction: camera.direction, + up: camera.up + }; } var direction = Cartesian3.subtract(camera.position, focus, cartesian3Scratch); var movementVector = Cartesian3.multiplyByScalar(direction, relativeAmount, direction); var endPosition = Cartesian3.add(focus, movementVector, focus); - // sometimes flyTo does not work (wrong position) so just set the position without any animation - camera.position = endPosition; - - // camera.flyTo({ - // destination: endPosition, - // orientation: orientation, - // duration: 1, - // convert: false - // }); - // } + if (defined(this.terria.trackedEntity) || scene.mode == SceneMode.COLUMBUS_VIEW) { + // sometimes flyTo does not work (jumps to wrong position) so just set the position without any animation + // do not use flyTo when tracking an entity because during animatiuon the position of the entity may change + camera.position = endPosition; + } else { + camera.flyTo({ + destination: endPosition, + orientation: orientation, + duration: 0.5, + convert: false + }); + } } } diff --git a/Source/viewerCesiumNavigationMixin.js b/Source/viewerCesiumNavigationMixin.js index 7b638eea..cd74fe05 100644 --- a/Source/viewerCesiumNavigationMixin.js +++ b/Source/viewerCesiumNavigationMixin.js @@ -37,7 +37,7 @@ define([ throw new DeveloperError('viewer is required.'); } - var cesiumNavigation = init(viewer.cesiumWidget, options); + var cesiumNavigation = init(viewer, options); cesiumNavigation.addOnDestroyListener((function (viewer) { return function () { @@ -64,8 +64,14 @@ define([ return init.apply(undefined, arguments); }; - var init = function (cesiumWidget, options) { - var cesiumNavigation = new CesiumNavigation(cesiumWidget, options); + /** + * @param {Viewer|CesiumWidget} viewerCesiumWidget The Viewer or CesiumWidget instance + * @param {{}} options the options + */ + var init = function (viewerCesiumWidget, options) { + var cesiumNavigation = new CesiumNavigation(viewerCesiumWidget, options); + + var cesiumWidget = defined(viewerCesiumWidget.cesiumWidget) ? viewerCesiumWidget.cesiumWidget : viewerCesiumWidget; defineProperties(cesiumWidget, { cesiumNavigation: { diff --git a/dist/amd/viewerCesiumNavigationMixin.js b/dist/amd/viewerCesiumNavigationMixin.js index 636817d7..91f4693e 100644 --- a/dist/amd/viewerCesiumNavigationMixin.js +++ b/dist/amd/viewerCesiumNavigationMixin.js @@ -318,10 +318,10 @@ i._name="get",j._name="set",k._name="has",m._name="toString";var s=(""+Object).s /*! markdown-it-sanitizer 0.4.1 https://github.com/svbergerem/markdown-it-sanitizer @license MIT */ !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define('markdown-it-sanitizer',[],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.markdownitSanitizer=e()}}(function(){return function e(t,n,r){function o(l,f){if(!n[l]){if(!t[l]){var a="function"==typeof require&&require;if(!f&&a)return a(l,!0);if(i)return i(l,!0);var s=new Error("Cannot find module '"+l+"'");throw s.code="MODULE_NOT_FOUND",s}var u=n[l]={exports:{}};t[l][0].call(u.exports,function(e){var n=t[l][1][e];return o(n?n:e)},u,u.exports,e,t,n,r)}return n[l].exports}for(var i="function"==typeof require&&require,l=0;l]*src="[^"<>]*"[^<>]*)\\s?\\/?>',i=RegExp(o,"i");return e=e.replace(/<[^<>]*>?/gi,function(e){var t,o,l,a,u;if(/(^<->|^<-\s|^<3\s)/.test(e))return e;if(t=e.match(i)){var m=t[1];if(o=n(m.match(/src="([^"<>]*)"/i)[1]),l=m.match(/alt="([^"<>]*)"/i),l=l&&"undefined"!=typeof l[1]?l[1]:"",a=m.match(/title="([^"<>]*)"/i),a=a&&"undefined"!=typeof a[1]?a[1]:"",o&&/^https?:\/\//i.test(o))return""!==c?''+l+'':''+l+''}return u=d.indexOf("a"),t=e.match(r),t&&(a="undefined"!=typeof t[2]?t[2]:"",o=n(t[1]),o&&/^(?:https?:\/\/|ftp:\/\/|mailto:|xmpp:)/i.test(o))?(p=!0,h[u]+=1,''):(t=/<\/a>/i.test(e))?(p=!0,h[u]-=1,h[u]<0&&(g[u]=!0),""):(t=e.match(/<(br|hr)\s?\/?>/i))?"<"+t[1].toLowerCase()+">":(t=e.match(/<(\/?)(b|blockquote|code|em|h[1-6]|li|ol(?: start="\d+")?|p|pre|s|sub|sup|strong|ul)>/i),t&&!/<\/ol start="\d+"/i.test(e)?(p=!0,u=d.indexOf(t[2].toLowerCase().split(" ")[0]),"/"===t[1]?h[u]-=1:h[u]+=1,h[u]<0&&(g[u]=!0),"<"+t[1]+t[2].toLowerCase()+">"):s===!0?"":f(e))})}function o(e){var t,n,o;for(a=0;a]*" title="[^"<>]*" target="_blank">',"g"):"ol"===t?//g:RegExp("<"+t+">","g"),r=RegExp("","g"),u===!0?(e=e.replace(n,""),e=e.replace(r,"")):(e=e.replace(n,function(e){return f(e)}),e=e.replace(r,function(e){return f(e)})),e}function n(e){var n;for(n=0;n`\\x00-\\x20]+",o="'[^']*'",i='"[^"]*"',a="(?:"+s+"|"+o+"|"+i+")",c="(?:\\s+"+n+"(?:\\s*=\\s*"+a+")?)",l="<[A-Za-z][A-Za-z0-9\\-]*"+c+"*\\s*\\/?>",u="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",p="|",h="<[?].*?[?]>",f="]*>",d="",m=new RegExp("^(?:"+l+"|"+u+"|"+p+"|"+h+"|"+f+"|"+d+")"),g=new RegExp("^(?:"+l+"|"+u+")");r.exports.HTML_TAG_RE=m,r.exports.HTML_OPEN_CLOSE_TAG_RE=g},{}],4:[function(e,r,t){"use strict";function n(e){return Object.prototype.toString.call(e)}function s(e){return"[object String]"===n(e)}function o(e,r){return x.call(e,r)}function i(e){var r=Array.prototype.slice.call(arguments,1);return r.forEach(function(r){if(r){if("object"!=typeof r)throw new TypeError(r+"must be object");Object.keys(r).forEach(function(t){e[t]=r[t]})}}),e}function a(e,r,t){return[].concat(e.slice(0,r),t,e.slice(r+1))}function c(e){return e>=55296&&57343>=e?!1:e>=64976&&65007>=e?!1:65535===(65535&e)||65534===(65535&e)?!1:e>=0&&8>=e?!1:11===e?!1:e>=14&&31>=e?!1:e>=127&&159>=e?!1:!(e>1114111)}function l(e){if(e>65535){e-=65536;var r=55296+(e>>10),t=56320+(1023&e);return String.fromCharCode(r,t)}return String.fromCharCode(e)}function u(e,r){var t=0;return o(q,r)?q[r]:35===r.charCodeAt(0)&&w.test(r)&&(t="x"===r[1].toLowerCase()?parseInt(r.slice(2),16):parseInt(r.slice(1),10),c(t))?l(t):e}function p(e){return e.indexOf("\\")<0?e:e.replace(y,"$1")}function h(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(A,function(e,r,t){return r?r:u(e,t)})}function f(e){return S[e]}function d(e){return D.test(e)?e.replace(E,f):e}function m(e){return e.replace(F,"\\$&")}function g(e){switch(e){case 9:case 32:return!0}return!1}function _(e){if(e>=8192&&8202>=e)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function k(e){return L.test(e)}function b(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function v(e){return e.trim().replace(/\s+/g," ").toUpperCase()}var x=Object.prototype.hasOwnProperty,y=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,C=/&([a-z#][a-z0-9]{1,31});/gi,A=new RegExp(y.source+"|"+C.source,"gi"),w=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,q=e("./entities"),D=/[&<>"]/,E=/[&<>"]/g,S={"&":"&","<":"<",">":">",'"':"""},F=/[.?*+^$[\]\\(){}|-]/g,L=e("uc.micro/categories/P/regex");t.lib={},t.lib.mdurl=e("mdurl"),t.lib.ucmicro=e("uc.micro"),t.assign=i,t.isString=s,t.has=o,t.unescapeMd=p,t.unescapeAll=h,t.isValidEntityCode=c,t.fromCodePoint=l,t.escapeHtml=d,t.arrayReplaceAt=a,t.isSpace=g,t.isWhiteSpace=_,t.isMdAsciiPunct=b,t.isPunctChar=k,t.escapeRE=m,t.normalizeReference=v},{"./entities":1,mdurl:59,"uc.micro":65,"uc.micro/categories/P/regex":63}],5:[function(e,r,t){"use strict";t.parseLinkLabel=e("./parse_link_label"),t.parseLinkDestination=e("./parse_link_destination"),t.parseLinkTitle=e("./parse_link_title")},{"./parse_link_destination":6,"./parse_link_label":7,"./parse_link_title":8}],6:[function(e,r,t){"use strict";var n=e("../common/utils").isSpace,s=e("../common/utils").unescapeAll;r.exports=function(e,r,t){var o,i,a=0,c=r,l={ok:!1,pos:0,lines:0,str:""};if(60===e.charCodeAt(r)){for(r++;t>r;){if(o=e.charCodeAt(r),10===o||n(o))return l;if(62===o)return l.pos=r+1,l.str=s(e.slice(c+1,r)),l.ok=!0,l;92===o&&t>r+1?r+=2:r++}return l}for(i=0;t>r&&(o=e.charCodeAt(r),32!==o)&&!(32>o||127===o);)if(92===o&&t>r+1)r+=2;else{if(40===o&&(i++,i>1))break;if(41===o&&(i--,0>i))break;r++}return c===r?l:(l.str=s(e.slice(c,r)),l.lines=a,l.pos=r,l.ok=!0,l)}},{"../common/utils":4}],7:[function(e,r,t){"use strict";r.exports=function(e,r,t){var n,s,o,i,a=-1,c=e.posMax,l=e.pos;for(e.pos=r+1,n=1;e.pos=t)return c;if(o=e.charCodeAt(r),34!==o&&39!==o&&40!==o)return c;for(r++,40===o&&(o=41);t>r;){if(s=e.charCodeAt(r),s===o)return c.pos=r+1,c.lines=i,c.str=n(e.slice(a+1,r)),c.ok=!0,c;10===s?i++:92===s&&t>r+1&&(r++,10===e.charCodeAt(r)&&i++),r++}return c}},{"../common/utils":4}],9:[function(e,r,t){"use strict";function n(e){var r=e.trim().toLowerCase();return _.test(r)?!!k.test(r):!0}function s(e){var r=d.parse(e,!0);if(r.hostname&&(!r.protocol||b.indexOf(r.protocol)>=0))try{r.hostname=m.toASCII(r.hostname)}catch(t){}return d.encode(d.format(r))}function o(e){var r=d.parse(e,!0);if(r.hostname&&(!r.protocol||b.indexOf(r.protocol)>=0))try{r.hostname=m.toUnicode(r.hostname)}catch(t){}return d.decode(d.format(r))}function i(e,r){return this instanceof i?(r||a.isString(e)||(r=e||{},e="default"),this.inline=new h,this.block=new p,this.core=new u,this.renderer=new l,this.linkify=new f,this.validateLink=n,this.normalizeLink=s,this.normalizeLinkText=o,this.utils=a,this.helpers=c,this.options={},this.configure(e),void(r&&this.set(r))):new i(e,r)}var a=e("./common/utils"),c=e("./helpers"),l=e("./renderer"),u=e("./parser_core"),p=e("./parser_block"),h=e("./parser_inline"),f=e("linkify-it"),d=e("mdurl"),m=e("punycode"),g={"default":e("./presets/default"),zero:e("./presets/zero"),commonmark:e("./presets/commonmark")},_=/^(vbscript|javascript|file|data):/,k=/^data:image\/(gif|png|jpeg|webp);/,b=["http:","https:","mailto:"];i.prototype.set=function(e){return a.assign(this.options,e),this},i.prototype.configure=function(e){var r,t=this;if(a.isString(e)&&(r=e,e=g[r],!e))throw new Error('Wrong `markdown-it` preset "'+r+'", check name');if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(r){e.components[r].rules&&t[r].ruler.enableOnly(e.components[r].rules),e.components[r].rules2&&t[r].ruler2.enableOnly(e.components[r].rules2)}),this},i.prototype.enable=function(e,r){var t=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(r){t=t.concat(this[r].ruler.enable(e,!0))},this),t=t.concat(this.inline.ruler2.enable(e,!0));var n=e.filter(function(e){return t.indexOf(e)<0});if(n.length&&!r)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+n);return this},i.prototype.disable=function(e,r){var t=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(r){t=t.concat(this[r].ruler.disable(e,!0))},this),t=t.concat(this.inline.ruler2.disable(e,!0));var n=e.filter(function(e){return t.indexOf(e)<0});if(n.length&&!r)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+n);return this},i.prototype.use=function(e){var r=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,r),this},i.prototype.parse=function(e,r){var t=new this.core.State(e,this,r);return this.core.process(t),t.tokens},i.prototype.render=function(e,r){return r=r||{},this.renderer.render(this.parse(e,r),this.options,r)},i.prototype.parseInline=function(e,r){var t=new this.core.State(e,this,r);return t.inlineMode=!0,this.core.process(t),t.tokens},i.prototype.renderInline=function(e,r){return r=r||{},this.renderer.render(this.parseInline(e,r),this.options,r)},r.exports=i},{"./common/utils":4,"./helpers":5,"./parser_block":10,"./parser_core":11,"./parser_inline":12,"./presets/commonmark":13,"./presets/default":14,"./presets/zero":15,"./renderer":16,"linkify-it":54,mdurl:59,punycode:52}],10:[function(e,r,t){"use strict";function n(){this.ruler=new s;for(var e=0;ea&&(e.line=a=e.skipEmptyLines(a),!(a>=t))&&!(e.sCount[a]=l){e.line=t;break}for(s=0;i>s&&!(n=o[s](e,a,t,!1));s++);if(e.tight=!c,e.isEmpty(e.line-1)&&(c=!0),a=e.line,t>a&&e.isEmpty(a)){if(c=!0,a++,t>a&&"list"===e.parentType&&e.isEmpty(a))break;e.line=a}}},n.prototype.parse=function(e,r,t,n){var s;e&&(s=new this.State(e,r,t,n),this.tokenize(s,s.line,s.lineMax))},n.prototype.State=e("./rules_block/state_block"),r.exports=n},{"./ruler":17,"./rules_block/blockquote":18,"./rules_block/code":19,"./rules_block/fence":20,"./rules_block/heading":21,"./rules_block/hr":22,"./rules_block/html_block":23,"./rules_block/lheading":24,"./rules_block/list":25,"./rules_block/paragraph":26,"./rules_block/reference":27,"./rules_block/state_block":28,"./rules_block/table":29}],11:[function(e,r,t){"use strict";function n(){this.ruler=new s;for(var e=0;er;r++)n[r](e)},n.prototype.State=e("./rules_core/state_core"),r.exports=n},{"./ruler":17,"./rules_core/block":30,"./rules_core/inline":31,"./rules_core/linkify":32,"./rules_core/normalize":33,"./rules_core/replacements":34,"./rules_core/smartquotes":35,"./rules_core/state_core":36}],12:[function(e,r,t){"use strict";function n(){var e;for(this.ruler=new s,e=0;et&&(e.level++,r=s[t](e,!0),e.level--,!r);t++);else e.pos=e.posMax;r||e.pos++,a[n]=e.pos},n.prototype.tokenize=function(e){for(var r,t,n=this.ruler.getRules(""),s=n.length,o=e.posMax,i=e.md.options.maxNesting;e.post&&!(r=n[t](e,!1));t++);if(r){if(e.pos>=o)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},n.prototype.parse=function(e,r,t,n){var s,o,i,a=new this.State(e,r,t,n);for(this.tokenize(a),o=this.ruler2.getRules(""),i=o.length,s=0;i>s;s++)o[s](a)},n.prototype.State=e("./rules_inline/state_inline"),r.exports=n},{"./ruler":17,"./rules_inline/autolink":37,"./rules_inline/backticks":38,"./rules_inline/balance_pairs":39,"./rules_inline/emphasis":40,"./rules_inline/entity":41,"./rules_inline/escape":42,"./rules_inline/html_inline":43,"./rules_inline/image":44,"./rules_inline/link":45,"./rules_inline/newline":46,"./rules_inline/state_inline":47,"./rules_inline/strikethrough":48,"./rules_inline/text":49,"./rules_inline/text_collapse":50}],13:[function(e,r,t){"use strict";r.exports={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"\u201c\u201d\u2018\u2019",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","text_collapse"]}}}},{}],14:[function(e,r,t){"use strict";r.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"\u201c\u201d\u2018\u2019",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}}},{}],15:[function(e,r,t){"use strict";r.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"\u201c\u201d\u2018\u2019",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","text_collapse"]}}}},{}],16:[function(e,r,t){"use strict";function n(){this.rules=s({},a)}var s=e("./common/utils").assign,o=e("./common/utils").unescapeAll,i=e("./common/utils").escapeHtml,a={};a.code_inline=function(e,r){return""+i(e[r].content)+""},a.code_block=function(e,r){return"
"+i(e[r].content)+"
\n"},a.fence=function(e,r,t,n,s){var a,c=e[r],l=c.info?o(c.info).trim():"",u="";return l&&(u=l.split(/\s+/g)[0],c.attrJoin("class",t.langPrefix+u)),a=t.highlight?t.highlight(c.content,u)||i(c.content):i(c.content),0===a.indexOf(""+a+"\n"},a.image=function(e,r,t,n,s){var o=e[r];return o.attrs[o.attrIndex("alt")][1]=s.renderInlineAsText(o.children,t,n),s.renderToken(e,r,t)},a.hardbreak=function(e,r,t){return t.xhtmlOut?"
\n":"
\n"},a.softbreak=function(e,r,t){return t.breaks?t.xhtmlOut?"
\n":"
\n":"\n"},a.text=function(e,r){return i(e[r].content)},a.html_block=function(e,r){return e[r].content},a.html_inline=function(e,r){return e[r].content},n.prototype.renderAttrs=function(e){var r,t,n;if(!e.attrs)return"";for(n="",r=0,t=e.attrs.length;t>r;r++)n+=" "+i(e.attrs[r][0])+'="'+i(e.attrs[r][1])+'"';return n},n.prototype.renderToken=function(e,r,t){var n,s="",o=!1,i=e[r];return i.hidden?"":(i.block&&-1!==i.nesting&&r&&e[r-1].hidden&&(s+="\n"),s+=(-1===i.nesting?"\n":">")},n.prototype.renderInline=function(e,r,t){for(var n,s="",o=this.rules,i=0,a=e.length;a>i;i++)n=e[i].type,s+="undefined"!=typeof o[n]?o[n](e,i,r,t,this):this.renderToken(e,i,r);return s},n.prototype.renderInlineAsText=function(e,r,t){for(var n="",s=this.rules,o=0,i=e.length;i>o;o++)"text"===e[o].type?n+=s.text(e,o,r,t,this):"image"===e[o].type&&(n+=this.renderInlineAsText(e[o].children,r,t));return n},n.prototype.render=function(e,r,t){var n,s,o,i="",a=this.rules;for(n=0,s=e.length;s>n;n++)o=e[n].type,i+="inline"===o?this.renderInline(e[n].children,r,t):"undefined"!=typeof a[o]?a[e[n].type](e,n,r,t,this):this.renderToken(e,n,r,t);return i},r.exports=n},{"./common/utils":4}],17:[function(e,r,t){"use strict";function n(){this.__rules__=[],this.__cache__=null}n.prototype.__find__=function(e){for(var r=0;rn){if(r)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[n].enabled=!0,t.push(e)},this),this.__cache__=null,t},n.prototype.enableOnly=function(e,r){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(e){e.enabled=!1}),this.enable(e,r)},n.prototype.disable=function(e,r){Array.isArray(e)||(e=[e]);var t=[];return e.forEach(function(e){var n=this.__find__(e);if(0>n){if(r)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[n].enabled=!1,t.push(e)},this),this.__cache__=null,t},n.prototype.getRules=function(e){return null===this.__cache__&&this.__compile__(),this.__cache__[e]||[]},r.exports=n},{}],18:[function(e,r,t){"use strict";var n=e("../common/utils").isSpace;r.exports=function(e,r,t,s){var o,i,a,c,l,u,p,h,f,d,m,g,_,k,b,v,x=e.bMarks[r]+e.tShift[r],y=e.eMarks[r];if(62!==e.src.charCodeAt(x++))return!1;if(s)return!0;for(32===e.src.charCodeAt(x)&&x++,u=e.blkIndent,e.blkIndent=0,f=d=e.sCount[r]+x-(e.bMarks[r]+e.tShift[r]),l=[e.bMarks[r]],e.bMarks[r]=x;y>x&&(m=e.src.charCodeAt(x),n(m));)9===m?d+=4-d%4:d++,x++;for(i=x>=y,c=[e.sCount[r]],e.sCount[r]=d-f,a=[e.tShift[r]],e.tShift[r]=x-e.bMarks[r],g=e.md.block.ruler.getRules("blockquote"),o=r+1;t>o&&!(e.sCount[o]=y));o++)if(62!==e.src.charCodeAt(x++)){if(i)break;for(v=!1,k=0,b=g.length;b>k;k++)if(g[k](e,o,t,!0)){v=!0;break}if(v)break;l.push(e.bMarks[o]),a.push(e.tShift[o]),c.push(e.sCount[o]),e.sCount[o]=-1}else{for(32===e.src.charCodeAt(x)&&x++,f=d=e.sCount[o]+x-(e.bMarks[o]+e.tShift[o]),l.push(e.bMarks[o]),e.bMarks[o]=x;y>x&&(m=e.src.charCodeAt(x),n(m));)9===m?d+=4-d%4:d++,x++;i=x>=y,c.push(e.sCount[o]),e.sCount[o]=d-f,a.push(e.tShift[o]),e.tShift[o]=x-e.bMarks[o]}for(p=e.parentType,e.parentType="blockquote",_=e.push("blockquote_open","blockquote",1),_.markup=">",_.map=h=[r,0],e.md.block.tokenize(e,r,o),_=e.push("blockquote_close","blockquote",-1),_.markup=">",e.parentType=p,h[1]=e.line,k=0;kn;)if(e.isEmpty(n)){if(i++,i>=2&&"list"===e.parentType)break;n++}else{if(i=0,!(e.sCount[n]-e.blkIndent>=4))break;n++,s=n}return e.line=s,o=e.push("code_block","code",0),o.content=e.getLines(r,s,4+e.blkIndent,!0),o.map=[r,e.line],!0}},{}],20:[function(e,r,t){"use strict";r.exports=function(e,r,t,n){var s,o,i,a,c,l,u,p=!1,h=e.bMarks[r]+e.tShift[r],f=e.eMarks[r];if(h+3>f)return!1;if(s=e.src.charCodeAt(h),126!==s&&96!==s)return!1;if(c=h,h=e.skipChars(h,s),o=h-c,3>o)return!1;if(u=e.src.slice(c,h),i=e.src.slice(h,f),i.indexOf("`")>=0)return!1;if(n)return!0;for(a=r;(a++,!(a>=t))&&(h=c=e.bMarks[a]+e.tShift[a],f=e.eMarks[a],!(f>h&&e.sCount[a]=4||(h=e.skipChars(h,s),o>h-c||(h=e.skipSpaces(h),f>h)))){p=!0;break}return o=e.sCount[r],e.line=a+(p?1:0),l=e.push("fence","code",0),l.info=i,l.content=e.getLines(r+1,a,o,!0),l.markup=u,l.map=[r,e.line],!0}},{}],21:[function(e,r,t){"use strict";var n=e("../common/utils").isSpace;r.exports=function(e,r,t,s){var o,i,a,c,l=e.bMarks[r]+e.tShift[r],u=e.eMarks[r];if(o=e.src.charCodeAt(l),35!==o||l>=u)return!1;for(i=1,o=e.src.charCodeAt(++l);35===o&&u>l&&6>=i;)i++,o=e.src.charCodeAt(++l);return i>6||u>l&&32!==o?!1:s?!0:(u=e.skipSpacesBack(u,l),a=e.skipCharsBack(u,35,l),a>l&&n(e.src.charCodeAt(a-1))&&(u=a),e.line=r+1,c=e.push("heading_open","h"+String(i),1),c.markup="########".slice(0,i),c.map=[r,e.line],c=e.push("inline","",0),c.content=e.src.slice(l,u).trim(),c.map=[r,e.line],c.children=[],c=e.push("heading_close","h"+String(i),-1),c.markup="########".slice(0,i),!0)}},{"../common/utils":4}],22:[function(e,r,t){"use strict";var n=e("../common/utils").isSpace;r.exports=function(e,r,t,s){var o,i,a,c,l=e.bMarks[r]+e.tShift[r],u=e.eMarks[r];if(o=e.src.charCodeAt(l++),42!==o&&45!==o&&95!==o)return!1;for(i=1;u>l;){if(a=e.src.charCodeAt(l++),a!==o&&!n(a))return!1;a===o&&i++}return 3>i?!1:s?!0:(e.line=r+1,c=e.push("hr","hr",0),c.map=[r,e.line],c.markup=Array(i+1).join(String.fromCharCode(o)),!0)}},{"../common/utils":4}],23:[function(e,r,t){"use strict";var n=e("../common/html_blocks"),s=e("../common/html_re").HTML_OPEN_CLOSE_TAG_RE,o=[[/^<(script|pre|style)(?=(\s|>|$))/i,/<\/(script|pre|style)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(s.source+"\\s*$"),/^$/,!1]];r.exports=function(e,r,t,n){var s,i,a,c,l=e.bMarks[r]+e.tShift[r],u=e.eMarks[r];if(!e.md.options.html)return!1;if(60!==e.src.charCodeAt(l))return!1;for(c=e.src.slice(l,u),s=0;si&&!(e.sCount[i]h&&!e.isEmpty(h);h++)if(!(e.sCount[h]-e.blkIndent>3)){if(e.sCount[h]>=e.blkIndent&&(c=e.bMarks[h]+e.tShift[h],l=e.eMarks[h],l>c&&(p=e.src.charCodeAt(c),(45===p||61===p)&&(c=e.skipChars(c,p),c=e.skipSpaces(c),c>=l)))){u=61===p?1:2;break}if(!(e.sCount[h]<0)){for(s=!1,o=0,i=f.length;i>o;o++)if(f[o](e,h,t,!0)){s=!0;break}if(s)break}}return u?(n=e.getLines(r,h,e.blkIndent,!1).trim(),e.line=h+1,a=e.push("heading_open","h"+String(u),1),a.markup=String.fromCharCode(p),a.map=[r,e.line],a=e.push("inline","",0),a.content=n,a.map=[r,e.line-1],a.children=[],a=e.push("heading_close","h"+String(u),-1),a.markup=String.fromCharCode(p),!0):!1}},{}],25:[function(e,r,t){"use strict";function n(e,r){var t,n,s,o;return n=e.bMarks[r]+e.tShift[r],s=e.eMarks[r],t=e.src.charCodeAt(n++),42!==t&&45!==t&&43!==t?-1:s>n&&(o=e.src.charCodeAt(n),!i(o))?-1:n}function s(e,r){var t,n=e.bMarks[r]+e.tShift[r],s=n,o=e.eMarks[r];if(s+1>=o)return-1;if(t=e.src.charCodeAt(s++),48>t||t>57)return-1;for(;;){if(s>=o)return-1;t=e.src.charCodeAt(s++);{if(!(t>=48&&57>=t)){if(41===t||46===t)break;return-1}if(s-n>=10)return-1}}return o>s&&(t=e.src.charCodeAt(s),!i(t))?-1:s}function o(e,r){var t,n,s=e.level+2;for(t=r+2,n=e.tokens.length-2;n>t;t++)e.tokens[t].level===s&&"paragraph_open"===e.tokens[t].type&&(e.tokens[t+2].hidden=!0,e.tokens[t].hidden=!0,t+=2)}var i=e("../common/utils").isSpace;r.exports=function(e,r,t,a){var c,l,u,p,h,f,d,m,g,_,k,b,v,x,y,C,A,w,q,D,E,S,F,L,z,T,R,M,I=!0;if((k=s(e,r))>=0)w=!0;else{if(!((k=n(e,r))>=0))return!1;w=!1}if(A=e.src.charCodeAt(k-1),a)return!0;for(D=e.tokens.length,w?(_=e.bMarks[r]+e.tShift[r],C=Number(e.src.substr(_,k-_-1)),z=e.push("ordered_list_open","ol",1),1!==C&&(z.attrs=[["start",C]])):z=e.push("bullet_list_open","ul",1),z.map=S=[r,0],z.markup=String.fromCharCode(A),c=r,E=!1,L=e.md.block.ruler.getRules("list");t>c;){for(v=k,x=e.eMarks[c],l=u=e.sCount[c]+k-(e.bMarks[r]+e.tShift[r]);x>v&&(b=e.src.charCodeAt(v),i(b));)9===b?u+=4-u%4:u++,v++;if(q=v,y=q>=x?1:u-l,y>4&&(y=1),p=l+y,z=e.push("list_item_open","li",1),z.markup=String.fromCharCode(A),z.map=F=[r,0],f=e.blkIndent,m=e.tight,h=e.tShift[r],d=e.sCount[r],g=e.parentType,e.blkIndent=p,e.tight=!0,e.parentType="list",e.tShift[r]=q-e.bMarks[r],e.sCount[r]=u,q>=x&&e.isEmpty(r+1)?e.line=Math.min(e.line+2,t):e.md.block.tokenize(e,r,t,!0),e.tight&&!E||(I=!1),E=e.line-r>1&&e.isEmpty(e.line-1),e.blkIndent=f,e.tShift[r]=h,e.sCount[r]=d,e.tight=m,e.parentType=g,z=e.push("list_item_close","li",-1),z.markup=String.fromCharCode(A),c=r=e.line,F[1]=c,q=e.bMarks[r],c>=t)break;if(e.isEmpty(c))break;if(e.sCount[c]T;T++)if(L[T](e,c,t,!0)){M=!0;break}if(M)break;if(w){if(k=s(e,c),0>k)break}else if(k=n(e,c),0>k)break;if(A!==e.src.charCodeAt(k-1))break}return z=w?e.push("ordered_list_close","ol",-1):e.push("bullet_list_close","ul",-1),z.markup=String.fromCharCode(A),S[1]=c,e.line=c,I&&o(e,D),!0}},{"../common/utils":4}],26:[function(e,r,t){"use strict";r.exports=function(e,r){for(var t,n,s,o,i,a=r+1,c=e.md.block.ruler.getRules("paragraph"),l=e.lineMax;l>a&&!e.isEmpty(a);a++)if(!(e.sCount[a]-e.blkIndent>3||e.sCount[a]<0)){for(n=!1,s=0,o=c.length;o>s;s++)if(c[s](e,a,l,!0)){n=!0;break}if(n)break}return t=e.getLines(r,a,e.blkIndent,!1).trim(),e.line=a,i=e.push("paragraph_open","p",1),i.map=[r,e.line],i=e.push("inline","",0),i.content=t,i.map=[r,e.line],i.children=[],i=e.push("paragraph_close","p",-1),!0}},{}],27:[function(e,r,t){"use strict";var n=e("../helpers/parse_link_destination"),s=e("../helpers/parse_link_title"),o=e("../common/utils").normalizeReference,i=e("../common/utils").isSpace;r.exports=function(e,r,t,a){var c,l,u,p,h,f,d,m,g,_,k,b,v,x,y,C=0,A=e.bMarks[r]+e.tShift[r],w=e.eMarks[r],q=r+1;if(91!==e.src.charCodeAt(A))return!1;for(;++Aq&&!e.isEmpty(q);q++)if(!(e.sCount[q]-e.blkIndent>3||e.sCount[q]<0)){for(v=!1,f=0,d=x.length;d>f;f++)if(x[f](e,q,p,!0)){v=!0;break}if(v)break}for(b=e.getLines(r,q,e.blkIndent,!1).trim(),w=b.length,A=1;w>A;A++){if(c=b.charCodeAt(A),91===c)return!1;if(93===c){g=A;break}10===c?C++:92===c&&(A++,w>A&&10===b.charCodeAt(A)&&C++)}if(0>g||58!==b.charCodeAt(g+1))return!1;for(A=g+2;w>A;A++)if(c=b.charCodeAt(A),10===c)C++;else if(!i(c))break;if(_=n(b,A,w),!_.ok)return!1;if(h=e.md.normalizeLink(_.str),!e.md.validateLink(h))return!1;for(A=_.pos,C+=_.lines,l=A,u=C,k=A;w>A;A++)if(c=b.charCodeAt(A),10===c)C++;else if(!i(c))break;for(_=s(b,A,w),w>A&&k!==A&&_.ok?(y=_.str,A=_.pos,C+=_.lines):(y="",A=l,C=u);w>A&&(c=b.charCodeAt(A),i(c));)A++;if(w>A&&10!==b.charCodeAt(A)&&y)for(y="",A=l,C=u;w>A&&(c=b.charCodeAt(A),i(c));)A++;return w>A&&10!==b.charCodeAt(A)?!1:(m=o(b.slice(1,g)))?a?!0:("undefined"==typeof e.env.references&&(e.env.references={}),"undefined"==typeof e.env.references[m]&&(e.env.references[m]={title:y,href:h}),e.line=r+C+1,!0):!1}},{"../common/utils":4,"../helpers/parse_link_destination":6,"../helpers/parse_link_title":8}],28:[function(e,r,t){"use strict";function n(e,r,t,n){var s,i,a,c,l,u,p,h;for(this.src=e,this.md=r,this.env=t,this.tokens=n,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.parentType="root",this.ddIndent=-1,this.level=0,this.result="",i=this.src,h=!1,a=c=u=p=0,l=i.length;l>c;c++){if(s=i.charCodeAt(c),!h){if(o(s)){u++,9===s?p+=4-p%4:p++;continue}h=!0}10!==s&&c!==l-1||(10!==s&&c++,this.bMarks.push(a),this.eMarks.push(c),this.tShift.push(u),this.sCount.push(p),h=!1,u=0,p=0,a=c+1)}this.bMarks.push(i.length),this.eMarks.push(i.length),this.tShift.push(0),this.sCount.push(0),this.lineMax=this.bMarks.length-1}var s=e("../token"),o=e("../common/utils").isSpace;n.prototype.push=function(e,r,t){var n=new s(e,r,t);return n.block=!0,0>t&&this.level--,n.level=this.level,t>0&&this.level++,this.tokens.push(n),n},n.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},n.prototype.skipEmptyLines=function(e){for(var r=this.lineMax;r>e&&!(this.bMarks[e]+this.tShift[e]e&&(r=this.src.charCodeAt(e),o(r));e++);return e},n.prototype.skipSpacesBack=function(e,r){if(r>=e)return e;for(;e>r;)if(!o(this.src.charCodeAt(--e)))return e+1;return e},n.prototype.skipChars=function(e,r){for(var t=this.src.length;t>e&&this.src.charCodeAt(e)===r;e++);return e},n.prototype.skipCharsBack=function(e,r,t){if(t>=e)return e;for(;e>t;)if(r!==this.src.charCodeAt(--e))return e+1;return e},n.prototype.getLines=function(e,r,t,n){var s,i,a,c,l,u,p,h=e;if(e>=r)return"";for(u=new Array(r-e),s=0;r>h;h++,s++){for(i=0,p=c=this.bMarks[h],l=r>h+1||n?this.eMarks[h]+1:this.eMarks[h];l>c&&t>i;){if(a=this.src.charCodeAt(c),o(a))9===a?i+=4-i%4:i++;else{if(!(c-pn;)96===r&&o%2===0?(a=!a,c=n):124!==r||o%2!==0||a?92===r?o++:o=0:(t.push(e.substring(i,n)),i=n+1),n++,n===s&&a&&(a=!1,n=c+1),r=e.charCodeAt(n);return t.push(e.substring(i)),t}r.exports=function(e,r,t,o){var i,a,c,l,u,p,h,f,d,m,g,_;if(r+2>t)return!1;if(u=r+1,e.sCount[u]=e.eMarks[u])return!1;if(i=e.src.charCodeAt(c),124!==i&&45!==i&&58!==i)return!1;if(a=n(e,r+1),!/^[-:| ]+$/.test(a))return!1;for(p=a.split("|"),d=[],l=0;ld.length)return!1;if(o)return!0;for(f=e.push("table_open","table",1),f.map=g=[r,0],f=e.push("thead_open","thead",1),f.map=[r,r+1],f=e.push("tr_open","tr",1),f.map=[r,r+1],l=0;lu&&!(e.sCount[u]l;l++)f=e.push("td_open","td",1),d[l]&&(f.attrs=[["style","text-align:"+d[l]]]),f=e.push("inline","",0),f.content=p[l]?p[l].trim():"",f.children=[],f=e.push("td_close","td",-1);f=e.push("tr_close","tr",-1)}return f=e.push("tbody_close","tbody",-1),f=e.push("table_close","table",-1),g[1]=_[1]=u,e.line=u,!0}},{}],30:[function(e,r,t){"use strict";r.exports=function(e){var r;e.inlineMode?(r=new e.Token("inline","",0),r.content=e.src,r.map=[0,1],r.children=[],e.tokens.push(r)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}},{}],31:[function(e,r,t){"use strict";r.exports=function(e){var r,t,n,s=e.tokens;for(t=0,n=s.length;n>t;t++)r=s[t],"inline"===r.type&&e.md.inline.parse(r.content,e.md,e.env,r.children)}},{}],32:[function(e,r,t){"use strict";function n(e){return/^\s]/i.test(e)}function s(e){return/^<\/a\s*>/i.test(e)}var o=e("../common/utils").arrayReplaceAt;r.exports=function(e){var r,t,i,a,c,l,u,p,h,f,d,m,g,_,k,b,v,x=e.tokens;if(e.md.options.linkify)for(t=0,i=x.length;i>t;t++)if("inline"===x[t].type&&e.md.linkify.pretest(x[t].content))for(a=x[t].children,g=0,r=a.length-1;r>=0;r--)if(l=a[r],"link_close"!==l.type){if("html_inline"===l.type&&(n(l.content)&&g>0&&g--,s(l.content)&&g++),!(g>0)&&"text"===l.type&&e.md.linkify.test(l.content)){for(h=l.content,v=e.md.linkify.match(h),u=[],m=l.level,d=0,p=0;pd&&(c=new e.Token("text","",0),c.content=h.slice(d,f),c.level=m,u.push(c)),c=new e.Token("link_open","a",1),c.attrs=[["href",k]],c.level=m++,c.markup="linkify",c.info="auto",u.push(c),c=new e.Token("text","",0),c.content=b,c.level=m,u.push(c),c=new e.Token("link_close","a",-1),c.level=--m,c.markup="linkify",c.info="auto",u.push(c),d=v[p].lastIndex);d=0;r--)t=e[r],"text"===t.type&&(t.content=t.content.replace(c,n))}function o(e){var r,t;for(r=e.length-1;r>=0;r--)t=e[r],"text"===t.type&&i.test(t.content)&&(t.content=t.content.replace(/\+-/g,"\xb1").replace(/\.{2,}/g,"\u2026").replace(/([?!])\u2026/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---([^-]|$)/gm,"$1\u2014$2").replace(/(^|\s)--(\s|$)/gm,"$1\u2013$2").replace(/(^|[^-\s])--([^-\s]|$)/gm,"$1\u2013$2"))}var i=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,a=/\((c|tm|r|p)\)/i,c=/\((c|tm|r|p)\)/gi,l={c:"\xa9",r:"\xae",p:"\xa7",tm:"\u2122"};r.exports=function(e){var r;if(e.md.options.typographer)for(r=e.tokens.length-1;r>=0;r--)"inline"===e.tokens[r].type&&(a.test(e.tokens[r].content)&&s(e.tokens[r].children),i.test(e.tokens[r].content)&&o(e.tokens[r].children))}},{}],35:[function(e,r,t){"use strict";function n(e,r,t){return e.substr(0,r)+t+e.substr(r+1)}function s(e,r){var t,s,c,p,h,f,d,m,g,_,k,b,v,x,y,C,A,w,q,D,E;for(q=[],t=0;t=0&&!(q[A].level<=d);A--);if(q.length=A+1,"text"===s.type){c=s.content,h=0,f=c.length;e:for(;f>h&&(l.lastIndex=h,p=l.exec(c));){if(y=C=!0,h=p.index+1,w="'"===p[0],g=32,p.index-1>=0)g=c.charCodeAt(p.index-1);else for(A=t-1;A>=0;A--)if("text"===e[A].type){g=e[A].content.charCodeAt(e[A].content.length-1);break}if(_=32,f>h)_=c.charCodeAt(h);else for(A=t+1;A=48&&57>=g&&(C=y=!1),y&&C&&(y=!1,C=b),y||C){if(C)for(A=q.length-1;A>=0&&(m=q[A],!(q[A].level=0;r--)"inline"===e.tokens[r].type&&c.test(e.tokens[r].content)&&s(e.tokens[r].children,e)}},{"../common/utils":4}],36:[function(e,r,t){"use strict";function n(e,r,t){this.src=e,this.env=t,this.tokens=[],this.inlineMode=!1,this.md=r}var s=e("../token");n.prototype.Token=s,r.exports=n},{"../token":51}],37:[function(e,r,t){"use strict";var n=/^<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/,s=/^<([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)>/;r.exports=function(e,r){var t,o,i,a,c,l,u=e.pos;return 60!==e.src.charCodeAt(u)?!1:(t=e.src.slice(u),t.indexOf(">")<0?!1:s.test(t)?(o=t.match(s),a=o[0].slice(1,-1),c=e.md.normalizeLink(a),e.md.validateLink(c)?(r||(l=e.push("link_open","a",1),l.attrs=[["href",c]],l.markup="autolink",l.info="auto",l=e.push("text","",0),l.content=e.md.normalizeLinkText(a),l=e.push("link_close","a",-1),l.markup="autolink",l.info="auto"),e.pos+=o[0].length,!0):!1):n.test(t)?(i=t.match(n),a=i[0].slice(1,-1),c=e.md.normalizeLink("mailto:"+a),e.md.validateLink(c)?(r||(l=e.push("link_open","a",1),l.attrs=[["href",c]],l.markup="autolink",l.info="auto",l=e.push("text","",0),l.content=e.md.normalizeLinkText(a),l=e.push("link_close","a",-1),l.markup="autolink",l.info="auto"),e.pos+=i[0].length,!0):!1):!1)}},{}],38:[function(e,r,t){"use strict";r.exports=function(e,r){var t,n,s,o,i,a,c=e.pos,l=e.src.charCodeAt(c);if(96!==l)return!1;for(t=c,c++,n=e.posMax;n>c&&96===e.src.charCodeAt(c);)c++;for(s=e.src.slice(t,c),o=i=c;-1!==(o=e.src.indexOf("`",i));){for(i=o+1;n>i&&96===e.src.charCodeAt(i);)i++;if(i-o===s.length)return r||(a=e.push("code_inline","code",0),a.markup=s,a.content=e.src.slice(c,o).replace(/[ \n]+/g," ").trim()),e.pos=i,!0}return r||(e.pending+=s),e.pos+=s.length,!0}},{}],39:[function(e,r,t){"use strict";r.exports=function(e){var r,t,n,s,o=e.delimiters,i=e.delimiters.length;for(r=0;i>r;r++)if(n=o[r],n.close)for(t=r-n.jump-1;t>=0;){if(s=o[t],s.open&&s.marker===n.marker&&s.end<0&&s.level===n.level){n.jump=r-t,n.open=!1,s.end=r,s.jump=0;break}t-=s.jump+1}}},{}],40:[function(e,r,t){"use strict";r.exports.tokenize=function(e,r){var t,n,s,o=e.pos,i=e.src.charCodeAt(o);if(r)return!1;if(95!==i&&42!==i)return!1;for(n=e.scanDelims(e.pos,42===i),t=0;tr;r++)t=a[r],95!==t.marker&&42!==t.marker||-1!==t.end&&(n=a[t.end],i=c>r+1&&a[r+1].end===t.end-1&&a[r+1].token===t.token+1&&a[t.end-1].token===n.token-1&&a[r+1].marker===t.marker,o=String.fromCharCode(t.marker),s=e.tokens[t.token],s.type=i?"strong_open":"em_open",s.tag=i?"strong":"em",s.nesting=1,s.markup=i?o+o:o,s.content="",s=e.tokens[n.token],s.type=i?"strong_close":"em_close",s.tag=i?"strong":"em",s.nesting=-1,s.markup=i?o+o:o,s.content="",i&&(e.tokens[a[r+1].token].content="",e.tokens[a[t.end-1].token].content="",r++))}},{}],41:[function(e,r,t){"use strict";var n=e("../common/entities"),s=e("../common/utils").has,o=e("../common/utils").isValidEntityCode,i=e("../common/utils").fromCodePoint,a=/^&#((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i,c=/^&([a-z][a-z0-9]{1,31});/i;r.exports=function(e,r){var t,l,u,p=e.pos,h=e.posMax;if(38!==e.src.charCodeAt(p))return!1;if(h>p+1)if(t=e.src.charCodeAt(p+1),35===t){if(u=e.src.slice(p).match(a))return r||(l="x"===u[1][0].toLowerCase()?parseInt(u[1].slice(1),16):parseInt(u[1],10),e.pending+=i(o(l)?l:65533)),e.pos+=u[0].length,!0}else if(u=e.src.slice(p).match(c),u&&s(n,u[1]))return r||(e.pending+=n[u[1]]),e.pos+=u[0].length,!0;return r||(e.pending+="&"),e.pos++,!0}},{"../common/entities":1,"../common/utils":4}],42:[function(e,r,t){"use strict";for(var n=e("../common/utils").isSpace,s=[],o=0;256>o;o++)s.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){s[e.charCodeAt(0)]=1}),r.exports=function(e,r){var t,o=e.pos,i=e.posMax;if(92!==e.src.charCodeAt(o))return!1;if(o++,i>o){if(t=e.src.charCodeAt(o),256>t&&0!==s[t])return r||(e.pending+=e.src[o]),e.pos+=2,!0;if(10===t){for(r||e.push("hardbreak","br",0),o++;i>o&&(t=e.src.charCodeAt(o),n(t));)o++;return e.pos=o,!0}}return r||(e.pending+="\\"),e.pos++,!0}},{"../common/utils":4}],43:[function(e,r,t){"use strict";function n(e){var r=32|e;return r>=97&&122>=r}var s=e("../common/html_re").HTML_TAG_RE;r.exports=function(e,r){var t,o,i,a,c=e.pos;return e.md.options.html?(i=e.posMax,60!==e.src.charCodeAt(c)||c+2>=i?!1:(t=e.src.charCodeAt(c+1),(33===t||63===t||47===t||n(t))&&(o=e.src.slice(c).match(s))?(r||(a=e.push("html_inline","",0),a.content=e.src.slice(c,c+o[0].length)),e.pos+=o[0].length,!0):!1)):!1}},{"../common/html_re":3}],44:[function(e,r,t){"use strict";var n=e("../helpers/parse_link_label"),s=e("../helpers/parse_link_destination"),o=e("../helpers/parse_link_title"),i=e("../common/utils").normalizeReference,a=e("../common/utils").isSpace;r.exports=function(e,r){var t,c,l,u,p,h,f,d,m,g,_,k,b,v="",x=e.pos,y=e.posMax;if(33!==e.src.charCodeAt(e.pos))return!1;if(91!==e.src.charCodeAt(e.pos+1))return!1;if(h=e.pos+2,p=n(e,e.pos+1,!1),0>p)return!1;if(f=p+1,y>f&&40===e.src.charCodeAt(f)){for(f++;y>f&&(c=e.src.charCodeAt(f),a(c)||10===c);f++);if(f>=y)return!1;for(b=f,m=s(e.src,f,e.posMax),m.ok&&(v=e.md.normalizeLink(m.str),e.md.validateLink(v)?f=m.pos:v=""),b=f;y>f&&(c=e.src.charCodeAt(f),a(c)||10===c);f++);if(m=o(e.src,f,e.posMax),y>f&&b!==f&&m.ok)for(g=m.str,f=m.pos;y>f&&(c=e.src.charCodeAt(f),a(c)||10===c);f++);else g="";if(f>=y||41!==e.src.charCodeAt(f))return e.pos=x,!1;f++}else{if("undefined"==typeof e.env.references)return!1;if(y>f&&91===e.src.charCodeAt(f)?(b=f+1,f=n(e,f),f>=0?u=e.src.slice(b,f++):f=p+1):f=p+1,u||(u=e.src.slice(h,p)),d=e.env.references[i(u)],!d)return e.pos=x,!1;v=d.href,g=d.title}return r||(l=e.src.slice(h,p),e.md.inline.parse(l,e.md,e.env,k=[]),_=e.push("image","img",0),_.attrs=t=[["src",v],["alt",""]],_.children=k,_.content=l,g&&t.push(["title",g])),e.pos=f,e.posMax=y,!0}},{"../common/utils":4,"../helpers/parse_link_destination":6,"../helpers/parse_link_label":7,"../helpers/parse_link_title":8}],45:[function(e,r,t){"use strict";var n=e("../helpers/parse_link_label"),s=e("../helpers/parse_link_destination"),o=e("../helpers/parse_link_title"),i=e("../common/utils").normalizeReference,a=e("../common/utils").isSpace;r.exports=function(e,r){var t,c,l,u,p,h,f,d,m,g,_="",k=e.pos,b=e.posMax,v=e.pos;if(91!==e.src.charCodeAt(e.pos))return!1;if(p=e.pos+1,u=n(e,e.pos,!0),0>u)return!1;if(h=u+1,b>h&&40===e.src.charCodeAt(h)){for(h++;b>h&&(c=e.src.charCodeAt(h),a(c)||10===c);h++);if(h>=b)return!1;for(v=h,f=s(e.src,h,e.posMax),f.ok&&(_=e.md.normalizeLink(f.str),e.md.validateLink(_)?h=f.pos:_=""),v=h;b>h&&(c=e.src.charCodeAt(h),a(c)||10===c);h++);if(f=o(e.src,h,e.posMax),b>h&&v!==h&&f.ok)for(m=f.str,h=f.pos;b>h&&(c=e.src.charCodeAt(h),a(c)||10===c);h++);else m="";if(h>=b||41!==e.src.charCodeAt(h))return e.pos=k,!1;h++}else{if("undefined"==typeof e.env.references)return!1;if(b>h&&91===e.src.charCodeAt(h)?(v=h+1,h=n(e,h),h>=0?l=e.src.slice(v,h++):h=u+1):h=u+1,l||(l=e.src.slice(p,u)),d=e.env.references[i(l)],!d)return e.pos=k,!1;_=d.href,m=d.title}return r||(e.pos=p,e.posMax=u,g=e.push("link_open","a",1),g.attrs=t=[["href",_]],m&&t.push(["title",m]),e.md.inline.tokenize(e),g=e.push("link_close","a",-1)),e.pos=h,e.posMax=b,!0}},{"../common/utils":4,"../helpers/parse_link_destination":6,"../helpers/parse_link_label":7,"../helpers/parse_link_title":8}],46:[function(e,r,t){"use strict";r.exports=function(e,r){var t,n,s=e.pos;if(10!==e.src.charCodeAt(s))return!1;for(t=e.pending.length-1,n=e.posMax,r||(t>=0&&32===e.pending.charCodeAt(t)?t>=1&&32===e.pending.charCodeAt(t-1)?(e.pending=e.pending.replace(/ +$/,""),e.push("hardbreak","br",0)):(e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0)):e.push("softbreak","br",0)),s++;n>s&&32===e.src.charCodeAt(s);)s++;return e.pos=s,!0}},{}],47:[function(e,r,t){"use strict";function n(e,r,t,n){this.src=e,this.env=t,this.md=r,this.tokens=n,this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[]}var s=e("../token"),o=e("../common/utils").isWhiteSpace,i=e("../common/utils").isPunctChar,a=e("../common/utils").isMdAsciiPunct;n.prototype.pushPending=function(){var e=new s("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},n.prototype.push=function(e,r,t){this.pending&&this.pushPending();var n=new s(e,r,t);return 0>t&&this.level--,n.level=this.level,t>0&&this.level++,this.pendingLevel=this.level,this.tokens.push(n),n},n.prototype.scanDelims=function(e,r){var t,n,s,c,l,u,p,h,f,d=e,m=!0,g=!0,_=this.posMax,k=this.src.charCodeAt(e);for(t=e>0?this.src.charCodeAt(e-1):32;_>d&&this.src.charCodeAt(d)===k;)d++;return s=d-e,n=_>d?this.src.charCodeAt(d):32,p=a(t)||i(String.fromCharCode(t)),f=a(n)||i(String.fromCharCode(n)),u=o(t),h=o(n),h?m=!1:f&&(u||p||(m=!1)),u?g=!1:p&&(h||f||(g=!1)),r?(c=m,l=g):(c=m&&(!g||p),l=g&&(!m||f)),{can_open:c,can_close:l,length:s}},n.prototype.Token=s,r.exports=n},{"../common/utils":4,"../token":51}],48:[function(e,r,t){"use strict";r.exports.tokenize=function(e,r){var t,n,s,o,i,a=e.pos,c=e.src.charCodeAt(a);if(r)return!1;if(126!==c)return!1;if(n=e.scanDelims(e.pos,!0),o=n.length,i=String.fromCharCode(c),2>o)return!1;for(o%2&&(s=e.push("text","",0),s.content=i,o--),t=0;o>t;t+=2)s=e.push("text","",0),s.content=i+i,e.delimiters.push({marker:c,jump:t,token:e.tokens.length-1,level:e.level,end:-1,open:n.can_open,close:n.can_close});return e.pos+=n.length,!0},r.exports.postProcess=function(e){var r,t,n,s,o,i=[],a=e.delimiters,c=e.delimiters.length;for(r=0;c>r;r++)n=a[r],126===n.marker&&-1!==n.end&&(s=a[n.end],o=e.tokens[n.token],o.type="s_open",o.tag="s",o.nesting=1,o.markup="~~",o.content="",o=e.tokens[s.token],o.type="s_close",o.tag="s",o.nesting=-1,o.markup="~~",o.content="","text"===e.tokens[s.token-1].type&&"~"===e.tokens[s.token-1].content&&i.push(s.token-1));for(;i.length;){for(r=i.pop(),t=r+1;tr;r++)n+=s[r].nesting,s[r].level=n,"text"===s[r].type&&o>r+1&&"text"===s[r+1].type?s[r+1].content=s[r].content+s[r+1].content:(r!==t&&(s[t]=s[r]),t++);r!==t&&(s.length=t)}},{}],51:[function(e,r,t){"use strict";function n(e,r,t){this.type=e,this.tag=r,this.attrs=null,this.map=null,this.nesting=t,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}n.prototype.attrIndex=function(e){var r,t,n;if(!this.attrs)return-1;for(r=this.attrs,t=0,n=r.length;n>t;t++)if(r[t][0]===e)return t;return-1},n.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]},n.prototype.attrSet=function(e,r){var t=this.attrIndex(e),n=[e,r];0>t?this.attrPush(n):this.attrs[t]=n},n.prototype.attrJoin=function(e,r){var t=this.attrIndex(e);0>t?this.attrPush([e,r]):this.attrs[t][1]=this.attrs[t][1]+" "+r},r.exports=n},{}],52:[function(r,t,n){(function(r){!function(s){function o(e){throw new RangeError(R[e])}function i(e,r){for(var t=e.length,n=[];t--;)n[t]=r(e[t]);return n}function a(e,r){var t=e.split("@"),n="";t.length>1&&(n=t[0]+"@",e=t[1]),e=e.replace(T,".");var s=e.split("."),o=i(s,r).join(".");return n+o}function c(e){for(var r,t,n=[],s=0,o=e.length;o>s;)r=e.charCodeAt(s++),r>=55296&&56319>=r&&o>s?(t=e.charCodeAt(s++),56320==(64512&t)?n.push(((1023&r)<<10)+(1023&t)+65536):(n.push(r),s--)):n.push(r);return n}function l(e){return i(e,function(e){var r="";return e>65535&&(e-=65536,r+=B(e>>>10&1023|55296),e=56320|1023&e),r+=B(e)}).join("")}function u(e){return 10>e-48?e-22:26>e-65?e-65:26>e-97?e-97:C}function p(e,r){return e+22+75*(26>e)-((0!=r)<<5)}function h(e,r,t){var n=0;for(e=t?I(e/D):e>>1,e+=I(e/r);e>M*w>>1;n+=C)e=I(e/M);return I(n+(M+1)*e/(e+q))}function f(e){var r,t,n,s,i,a,c,p,f,d,m=[],g=e.length,_=0,k=S,b=E;for(t=e.lastIndexOf(F),0>t&&(t=0),n=0;t>n;++n)e.charCodeAt(n)>=128&&o("not-basic"),m.push(e.charCodeAt(n));for(s=t>0?t+1:0;g>s;){for(i=_,a=1,c=C;s>=g&&o("invalid-input"),p=u(e.charCodeAt(s++)),(p>=C||p>I((y-_)/a))&&o("overflow"),_+=p*a,f=b>=c?A:c>=b+w?w:c-b,!(f>p);c+=C)d=C-f,a>I(y/d)&&o("overflow"),a*=d;r=m.length+1,b=h(_-i,r,0==i),I(_/r)>y-k&&o("overflow"),k+=I(_/r),_%=r,m.splice(_++,0,k)}return l(m)}function d(e){var r,t,n,s,i,a,l,u,f,d,m,g,_,k,b,v=[];for(e=c(e),g=e.length,r=S,t=0,i=E,a=0;g>a;++a)m=e[a],128>m&&v.push(B(m));for(n=s=v.length,s&&v.push(F);g>n;){for(l=y,a=0;g>a;++a)m=e[a],m>=r&&l>m&&(l=m);for(_=n+1,l-r>I((y-t)/_)&&o("overflow"),t+=(l-r)*_,r=l,a=0;g>a;++a)if(m=e[a],r>m&&++t>y&&o("overflow"),m==r){for(u=t,f=C;d=i>=f?A:f>=i+w?w:f-i,!(d>u);f+=C)b=u-d,k=C-d,v.push(B(p(d+b%k,0))),u=I(b/k);v.push(B(p(u,0))),i=h(t,_,n==s),t=0,++n}++t,++r}return v.join("")}function m(e){return a(e,function(e){return L.test(e)?f(e.slice(4).toLowerCase()):e})}function g(e){return a(e,function(e){return z.test(e)?"xn--"+d(e):e})}var _="object"==typeof n&&n&&!n.nodeType&&n,k="object"==typeof t&&t&&!t.nodeType&&t,b="object"==typeof r&&r;b.global!==b&&b.window!==b&&b.self!==b||(s=b);var v,x,y=2147483647,C=36,A=1,w=26,q=38,D=700,E=72,S=128,F="-",L=/^xn--/,z=/[^\x20-\x7E]/,T=/[\x2E\u3002\uFF0E\uFF61]/g,R={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},M=C-A,I=Math.floor,B=String.fromCharCode;if(v={version:"1.3.2",ucs2:{decode:c,encode:l},decode:f,encode:d,toASCII:g,toUnicode:m},"function"==typeof e&&"object"==typeof e.amd&&e.amd)e("punycode",function(){return v});else if(_&&k)if(t.exports==_)k.exports=v;else for(x in v)v.hasOwnProperty(x)&&(_[x]=v[x]);else s.punycode=v}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],53:[function(e,r,t){r.exports={Aacute:"\xc1",aacute:"\xe1",Abreve:"\u0102",abreve:"\u0103",ac:"\u223e",acd:"\u223f",acE:"\u223e\u0333",Acirc:"\xc2",acirc:"\xe2",acute:"\xb4",Acy:"\u0410",acy:"\u0430",AElig:"\xc6",aelig:"\xe6",af:"\u2061",Afr:"\ud835\udd04",afr:"\ud835\udd1e",Agrave:"\xc0",agrave:"\xe0",alefsym:"\u2135",aleph:"\u2135",Alpha:"\u0391",alpha:"\u03b1",Amacr:"\u0100",amacr:"\u0101",amalg:"\u2a3f",amp:"&",AMP:"&",andand:"\u2a55",And:"\u2a53",and:"\u2227",andd:"\u2a5c",andslope:"\u2a58",andv:"\u2a5a",ang:"\u2220",ange:"\u29a4",angle:"\u2220",angmsdaa:"\u29a8",angmsdab:"\u29a9",angmsdac:"\u29aa",angmsdad:"\u29ab",angmsdae:"\u29ac",angmsdaf:"\u29ad",angmsdag:"\u29ae",angmsdah:"\u29af",angmsd:"\u2221",angrt:"\u221f",angrtvb:"\u22be",angrtvbd:"\u299d",angsph:"\u2222",angst:"\xc5",angzarr:"\u237c",Aogon:"\u0104",aogon:"\u0105",Aopf:"\ud835\udd38",aopf:"\ud835\udd52",apacir:"\u2a6f",ap:"\u2248",apE:"\u2a70",ape:"\u224a",apid:"\u224b",apos:"'",ApplyFunction:"\u2061",approx:"\u2248",approxeq:"\u224a",Aring:"\xc5",aring:"\xe5",Ascr:"\ud835\udc9c",ascr:"\ud835\udcb6",Assign:"\u2254",ast:"*",asymp:"\u2248",asympeq:"\u224d",Atilde:"\xc3",atilde:"\xe3",Auml:"\xc4",auml:"\xe4",awconint:"\u2233",awint:"\u2a11",backcong:"\u224c",backepsilon:"\u03f6",backprime:"\u2035",backsim:"\u223d",backsimeq:"\u22cd",Backslash:"\u2216",Barv:"\u2ae7",barvee:"\u22bd",barwed:"\u2305",Barwed:"\u2306",barwedge:"\u2305",bbrk:"\u23b5",bbrktbrk:"\u23b6",bcong:"\u224c",Bcy:"\u0411",bcy:"\u0431",bdquo:"\u201e",becaus:"\u2235",because:"\u2235",Because:"\u2235",bemptyv:"\u29b0",bepsi:"\u03f6",bernou:"\u212c",Bernoullis:"\u212c",Beta:"\u0392",beta:"\u03b2",beth:"\u2136",between:"\u226c",Bfr:"\ud835\udd05",bfr:"\ud835\udd1f",bigcap:"\u22c2",bigcirc:"\u25ef",bigcup:"\u22c3",bigodot:"\u2a00",bigoplus:"\u2a01",bigotimes:"\u2a02",bigsqcup:"\u2a06",bigstar:"\u2605",bigtriangledown:"\u25bd",bigtriangleup:"\u25b3",biguplus:"\u2a04",bigvee:"\u22c1",bigwedge:"\u22c0",bkarow:"\u290d",blacklozenge:"\u29eb",blacksquare:"\u25aa",blacktriangle:"\u25b4",blacktriangledown:"\u25be",blacktriangleleft:"\u25c2",blacktriangleright:"\u25b8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20e5",bnequiv:"\u2261\u20e5",bNot:"\u2aed",bnot:"\u2310",Bopf:"\ud835\udd39",bopf:"\ud835\udd53",bot:"\u22a5",bottom:"\u22a5",bowtie:"\u22c8",boxbox:"\u29c9",boxdl:"\u2510",boxdL:"\u2555",boxDl:"\u2556",boxDL:"\u2557",boxdr:"\u250c",boxdR:"\u2552",boxDr:"\u2553",boxDR:"\u2554",boxh:"\u2500",boxH:"\u2550",boxhd:"\u252c",boxHd:"\u2564",boxhD:"\u2565",boxHD:"\u2566",boxhu:"\u2534",boxHu:"\u2567",boxhU:"\u2568",boxHU:"\u2569",boxminus:"\u229f",boxplus:"\u229e",boxtimes:"\u22a0",boxul:"\u2518",boxuL:"\u255b",boxUl:"\u255c",boxUL:"\u255d",boxur:"\u2514",boxuR:"\u2558",boxUr:"\u2559",boxUR:"\u255a",boxv:"\u2502",boxV:"\u2551",boxvh:"\u253c",boxvH:"\u256a",boxVh:"\u256b",boxVH:"\u256c",boxvl:"\u2524",boxvL:"\u2561",boxVl:"\u2562",boxVL:"\u2563",boxvr:"\u251c",boxvR:"\u255e",boxVr:"\u255f",boxVR:"\u2560",bprime:"\u2035",breve:"\u02d8",Breve:"\u02d8",brvbar:"\xa6",bscr:"\ud835\udcb7",Bscr:"\u212c",bsemi:"\u204f",bsim:"\u223d",bsime:"\u22cd",bsolb:"\u29c5",bsol:"\\",bsolhsub:"\u27c8",bull:"\u2022",bullet:"\u2022",bump:"\u224e",bumpE:"\u2aae",bumpe:"\u224f",Bumpeq:"\u224e",bumpeq:"\u224f",Cacute:"\u0106",cacute:"\u0107",capand:"\u2a44",capbrcup:"\u2a49",capcap:"\u2a4b",cap:"\u2229",Cap:"\u22d2",capcup:"\u2a47",capdot:"\u2a40",CapitalDifferentialD:"\u2145",caps:"\u2229\ufe00",caret:"\u2041",caron:"\u02c7",Cayleys:"\u212d",ccaps:"\u2a4d",Ccaron:"\u010c",ccaron:"\u010d",Ccedil:"\xc7",ccedil:"\xe7",Ccirc:"\u0108",ccirc:"\u0109",Cconint:"\u2230",ccups:"\u2a4c",ccupssm:"\u2a50",Cdot:"\u010a",cdot:"\u010b",cedil:"\xb8",Cedilla:"\xb8",cemptyv:"\u29b2",cent:"\xa2",centerdot:"\xb7",CenterDot:"\xb7",cfr:"\ud835\udd20",Cfr:"\u212d",CHcy:"\u0427",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",Chi:"\u03a7",chi:"\u03c7",circ:"\u02c6",circeq:"\u2257",circlearrowleft:"\u21ba",circlearrowright:"\u21bb",circledast:"\u229b",circledcirc:"\u229a",circleddash:"\u229d",CircleDot:"\u2299",circledR:"\xae",circledS:"\u24c8",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",cir:"\u25cb",cirE:"\u29c3",cire:"\u2257",cirfnint:"\u2a10",cirmid:"\u2aef",cirscir:"\u29c2",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201d",CloseCurlyQuote:"\u2019",clubs:"\u2663",clubsuit:"\u2663",colon:":",Colon:"\u2237",Colone:"\u2a74",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2a6d",Congruent:"\u2261",conint:"\u222e",Conint:"\u222f",ContourIntegral:"\u222e",copf:"\ud835\udd54",Copf:"\u2102",coprod:"\u2210",Coproduct:"\u2210",copy:"\xa9",COPY:"\xa9",copysr:"\u2117",CounterClockwiseContourIntegral:"\u2233",crarr:"\u21b5",cross:"\u2717",Cross:"\u2a2f",Cscr:"\ud835\udc9e",cscr:"\ud835\udcb8",csub:"\u2acf",csube:"\u2ad1",csup:"\u2ad0",csupe:"\u2ad2",ctdot:"\u22ef",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22de",cuesc:"\u22df",cularr:"\u21b6",cularrp:"\u293d",cupbrcap:"\u2a48",cupcap:"\u2a46",CupCap:"\u224d",cup:"\u222a",Cup:"\u22d3",cupcup:"\u2a4a",cupdot:"\u228d",cupor:"\u2a45",cups:"\u222a\ufe00",curarr:"\u21b7",curarrm:"\u293c",curlyeqprec:"\u22de",curlyeqsucc:"\u22df",curlyvee:"\u22ce",curlywedge:"\u22cf",curren:"\xa4",curvearrowleft:"\u21b6",curvearrowright:"\u21b7",cuvee:"\u22ce",cuwed:"\u22cf",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232d",dagger:"\u2020",Dagger:"\u2021",daleth:"\u2138",darr:"\u2193",Darr:"\u21a1",dArr:"\u21d3",dash:"\u2010",Dashv:"\u2ae4",dashv:"\u22a3",dbkarow:"\u290f",dblac:"\u02dd",Dcaron:"\u010e",dcaron:"\u010f",Dcy:"\u0414",dcy:"\u0434",ddagger:"\u2021",ddarr:"\u21ca",DD:"\u2145",dd:"\u2146",DDotrahd:"\u2911",ddotseq:"\u2a77",deg:"\xb0",Del:"\u2207",Delta:"\u0394",delta:"\u03b4",demptyv:"\u29b1",dfisht:"\u297f",Dfr:"\ud835\udd07",dfr:"\ud835\udd21",dHar:"\u2965",dharl:"\u21c3",dharr:"\u21c2",DiacriticalAcute:"\xb4",DiacriticalDot:"\u02d9",DiacriticalDoubleAcute:"\u02dd",DiacriticalGrave:"`",DiacriticalTilde:"\u02dc",diam:"\u22c4",diamond:"\u22c4",Diamond:"\u22c4",diamondsuit:"\u2666",diams:"\u2666",die:"\xa8",DifferentialD:"\u2146",digamma:"\u03dd",disin:"\u22f2",div:"\xf7",divide:"\xf7",divideontimes:"\u22c7",divonx:"\u22c7",DJcy:"\u0402",djcy:"\u0452",dlcorn:"\u231e",dlcrop:"\u230d",dollar:"$",Dopf:"\ud835\udd3b",dopf:"\ud835\udd55",Dot:"\xa8",dot:"\u02d9",DotDot:"\u20dc",doteq:"\u2250",doteqdot:"\u2251",DotEqual:"\u2250",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22a1",doublebarwedge:"\u2306",DoubleContourIntegral:"\u222f",DoubleDot:"\xa8",DoubleDownArrow:"\u21d3",DoubleLeftArrow:"\u21d0",DoubleLeftRightArrow:"\u21d4",DoubleLeftTee:"\u2ae4",DoubleLongLeftArrow:"\u27f8",DoubleLongLeftRightArrow:"\u27fa",DoubleLongRightArrow:"\u27f9",DoubleRightArrow:"\u21d2",DoubleRightTee:"\u22a8",DoubleUpArrow:"\u21d1",DoubleUpDownArrow:"\u21d5",DoubleVerticalBar:"\u2225",DownArrowBar:"\u2913",downarrow:"\u2193",DownArrow:"\u2193",Downarrow:"\u21d3",DownArrowUpArrow:"\u21f5",DownBreve:"\u0311",downdownarrows:"\u21ca",downharpoonleft:"\u21c3",downharpoonright:"\u21c2",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295e",DownLeftVectorBar:"\u2956",DownLeftVector:"\u21bd",DownRightTeeVector:"\u295f",DownRightVectorBar:"\u2957",DownRightVector:"\u21c1",DownTeeArrow:"\u21a7",DownTee:"\u22a4",drbkarow:"\u2910",drcorn:"\u231f",drcrop:"\u230c",Dscr:"\ud835\udc9f",dscr:"\ud835\udcb9",DScy:"\u0405",dscy:"\u0455",dsol:"\u29f6",Dstrok:"\u0110",dstrok:"\u0111",dtdot:"\u22f1",dtri:"\u25bf",dtrif:"\u25be",duarr:"\u21f5",duhar:"\u296f",dwangle:"\u29a6",DZcy:"\u040f",dzcy:"\u045f",dzigrarr:"\u27ff",Eacute:"\xc9",eacute:"\xe9",easter:"\u2a6e",Ecaron:"\u011a",ecaron:"\u011b",Ecirc:"\xca",ecirc:"\xea",ecir:"\u2256",ecolon:"\u2255",Ecy:"\u042d",ecy:"\u044d",eDDot:"\u2a77",Edot:"\u0116",edot:"\u0117",eDot:"\u2251",ee:"\u2147",efDot:"\u2252",Efr:"\ud835\udd08",efr:"\ud835\udd22",eg:"\u2a9a",Egrave:"\xc8",egrave:"\xe8",egs:"\u2a96",egsdot:"\u2a98",el:"\u2a99",Element:"\u2208",elinters:"\u23e7",ell:"\u2113",els:"\u2a95",elsdot:"\u2a97",Emacr:"\u0112",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",EmptySmallSquare:"\u25fb",emptyv:"\u2205",EmptyVerySmallSquare:"\u25ab",emsp13:"\u2004",emsp14:"\u2005",emsp:"\u2003",ENG:"\u014a",eng:"\u014b",ensp:"\u2002",Eogon:"\u0118",eogon:"\u0119",Eopf:"\ud835\udd3c",eopf:"\ud835\udd56",epar:"\u22d5",eparsl:"\u29e3",eplus:"\u2a71",epsi:"\u03b5",Epsilon:"\u0395",epsilon:"\u03b5",epsiv:"\u03f5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2a96",eqslantless:"\u2a95",Equal:"\u2a75",equals:"=",EqualTilde:"\u2242",equest:"\u225f",Equilibrium:"\u21cc",equiv:"\u2261",equivDD:"\u2a78",eqvparsl:"\u29e5",erarr:"\u2971",erDot:"\u2253",escr:"\u212f",Escr:"\u2130",esdot:"\u2250",Esim:"\u2a73",esim:"\u2242",Eta:"\u0397",eta:"\u03b7",ETH:"\xd0",eth:"\xf0",Euml:"\xcb",euml:"\xeb",euro:"\u20ac",excl:"!",exist:"\u2203",Exists:"\u2203",expectation:"\u2130",exponentiale:"\u2147",ExponentialE:"\u2147",fallingdotseq:"\u2252",Fcy:"\u0424",fcy:"\u0444",female:"\u2640",ffilig:"\ufb03",fflig:"\ufb00",ffllig:"\ufb04",Ffr:"\ud835\udd09",ffr:"\ud835\udd23",filig:"\ufb01",FilledSmallSquare:"\u25fc",FilledVerySmallSquare:"\u25aa",fjlig:"fj",flat:"\u266d",fllig:"\ufb02",fltns:"\u25b1",fnof:"\u0192",Fopf:"\ud835\udd3d",fopf:"\ud835\udd57",forall:"\u2200",ForAll:"\u2200",fork:"\u22d4",forkv:"\u2ad9",Fouriertrf:"\u2131",fpartint:"\u2a0d",frac12:"\xbd",frac13:"\u2153",frac14:"\xbc",frac15:"\u2155",frac16:"\u2159",frac18:"\u215b",frac23:"\u2154",frac25:"\u2156",frac34:"\xbe",frac35:"\u2157",frac38:"\u215c",frac45:"\u2158",frac56:"\u215a",frac58:"\u215d",frac78:"\u215e",frasl:"\u2044",frown:"\u2322",fscr:"\ud835\udcbb",Fscr:"\u2131",gacute:"\u01f5",Gamma:"\u0393",gamma:"\u03b3",Gammad:"\u03dc",gammad:"\u03dd",gap:"\u2a86",Gbreve:"\u011e",gbreve:"\u011f",Gcedil:"\u0122",Gcirc:"\u011c",gcirc:"\u011d",Gcy:"\u0413",gcy:"\u0433",Gdot:"\u0120",gdot:"\u0121",ge:"\u2265",gE:"\u2267",gEl:"\u2a8c",gel:"\u22db",geq:"\u2265",geqq:"\u2267",geqslant:"\u2a7e",gescc:"\u2aa9",ges:"\u2a7e",gesdot:"\u2a80",gesdoto:"\u2a82",gesdotol:"\u2a84",gesl:"\u22db\ufe00",gesles:"\u2a94",Gfr:"\ud835\udd0a",gfr:"\ud835\udd24",gg:"\u226b",Gg:"\u22d9",ggg:"\u22d9",gimel:"\u2137",GJcy:"\u0403",gjcy:"\u0453",gla:"\u2aa5",gl:"\u2277",glE:"\u2a92",glj:"\u2aa4",gnap:"\u2a8a",gnapprox:"\u2a8a",gne:"\u2a88",gnE:"\u2269",gneq:"\u2a88",gneqq:"\u2269",gnsim:"\u22e7",Gopf:"\ud835\udd3e",gopf:"\ud835\udd58",grave:"`",GreaterEqual:"\u2265",GreaterEqualLess:"\u22db",GreaterFullEqual:"\u2267",GreaterGreater:"\u2aa2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2a7e",GreaterTilde:"\u2273",Gscr:"\ud835\udca2",gscr:"\u210a",gsim:"\u2273",gsime:"\u2a8e",gsiml:"\u2a90",gtcc:"\u2aa7",gtcir:"\u2a7a",gt:">",GT:">",Gt:"\u226b",gtdot:"\u22d7",gtlPar:"\u2995",gtquest:"\u2a7c",gtrapprox:"\u2a86",gtrarr:"\u2978",gtrdot:"\u22d7",gtreqless:"\u22db",gtreqqless:"\u2a8c",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\ufe00",gvnE:"\u2269\ufe00",Hacek:"\u02c7",hairsp:"\u200a",half:"\xbd",hamilt:"\u210b",HARDcy:"\u042a",hardcy:"\u044a",harrcir:"\u2948",harr:"\u2194",hArr:"\u21d4",harrw:"\u21ad",Hat:"^",hbar:"\u210f",Hcirc:"\u0124",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22b9",hfr:"\ud835\udd25",Hfr:"\u210c",HilbertSpace:"\u210b",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21ff",homtht:"\u223b",hookleftarrow:"\u21a9",hookrightarrow:"\u21aa",hopf:"\ud835\udd59",Hopf:"\u210d",horbar:"\u2015",HorizontalLine:"\u2500",hscr:"\ud835\udcbd",Hscr:"\u210b",hslash:"\u210f",Hstrok:"\u0126",hstrok:"\u0127",HumpDownHump:"\u224e",HumpEqual:"\u224f",hybull:"\u2043",hyphen:"\u2010",Iacute:"\xcd",iacute:"\xed",ic:"\u2063",Icirc:"\xce",icirc:"\xee",Icy:"\u0418",icy:"\u0438",Idot:"\u0130",IEcy:"\u0415",iecy:"\u0435",iexcl:"\xa1",iff:"\u21d4",ifr:"\ud835\udd26",Ifr:"\u2111",Igrave:"\xcc",igrave:"\xec",ii:"\u2148", -iiiint:"\u2a0c",iiint:"\u222d",iinfin:"\u29dc",iiota:"\u2129",IJlig:"\u0132",ijlig:"\u0133",Imacr:"\u012a",imacr:"\u012b",image:"\u2111",ImaginaryI:"\u2148",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",Im:"\u2111",imof:"\u22b7",imped:"\u01b5",Implies:"\u21d2",incare:"\u2105","in":"\u2208",infin:"\u221e",infintie:"\u29dd",inodot:"\u0131",intcal:"\u22ba","int":"\u222b",Int:"\u222c",integers:"\u2124",Integral:"\u222b",intercal:"\u22ba",Intersection:"\u22c2",intlarhk:"\u2a17",intprod:"\u2a3c",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",IOcy:"\u0401",iocy:"\u0451",Iogon:"\u012e",iogon:"\u012f",Iopf:"\ud835\udd40",iopf:"\ud835\udd5a",Iota:"\u0399",iota:"\u03b9",iprod:"\u2a3c",iquest:"\xbf",iscr:"\ud835\udcbe",Iscr:"\u2110",isin:"\u2208",isindot:"\u22f5",isinE:"\u22f9",isins:"\u22f4",isinsv:"\u22f3",isinv:"\u2208",it:"\u2062",Itilde:"\u0128",itilde:"\u0129",Iukcy:"\u0406",iukcy:"\u0456",Iuml:"\xcf",iuml:"\xef",Jcirc:"\u0134",jcirc:"\u0135",Jcy:"\u0419",jcy:"\u0439",Jfr:"\ud835\udd0d",jfr:"\ud835\udd27",jmath:"\u0237",Jopf:"\ud835\udd41",jopf:"\ud835\udd5b",Jscr:"\ud835\udca5",jscr:"\ud835\udcbf",Jsercy:"\u0408",jsercy:"\u0458",Jukcy:"\u0404",jukcy:"\u0454",Kappa:"\u039a",kappa:"\u03ba",kappav:"\u03f0",Kcedil:"\u0136",kcedil:"\u0137",Kcy:"\u041a",kcy:"\u043a",Kfr:"\ud835\udd0e",kfr:"\ud835\udd28",kgreen:"\u0138",KHcy:"\u0425",khcy:"\u0445",KJcy:"\u040c",kjcy:"\u045c",Kopf:"\ud835\udd42",kopf:"\ud835\udd5c",Kscr:"\ud835\udca6",kscr:"\ud835\udcc0",lAarr:"\u21da",Lacute:"\u0139",lacute:"\u013a",laemptyv:"\u29b4",lagran:"\u2112",Lambda:"\u039b",lambda:"\u03bb",lang:"\u27e8",Lang:"\u27ea",langd:"\u2991",langle:"\u27e8",lap:"\u2a85",Laplacetrf:"\u2112",laquo:"\xab",larrb:"\u21e4",larrbfs:"\u291f",larr:"\u2190",Larr:"\u219e",lArr:"\u21d0",larrfs:"\u291d",larrhk:"\u21a9",larrlp:"\u21ab",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21a2",latail:"\u2919",lAtail:"\u291b",lat:"\u2aab",late:"\u2aad",lates:"\u2aad\ufe00",lbarr:"\u290c",lBarr:"\u290e",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298b",lbrksld:"\u298f",lbrkslu:"\u298d",Lcaron:"\u013d",lcaron:"\u013e",Lcedil:"\u013b",lcedil:"\u013c",lceil:"\u2308",lcub:"{",Lcy:"\u041b",lcy:"\u043b",ldca:"\u2936",ldquo:"\u201c",ldquor:"\u201e",ldrdhar:"\u2967",ldrushar:"\u294b",ldsh:"\u21b2",le:"\u2264",lE:"\u2266",LeftAngleBracket:"\u27e8",LeftArrowBar:"\u21e4",leftarrow:"\u2190",LeftArrow:"\u2190",Leftarrow:"\u21d0",LeftArrowRightArrow:"\u21c6",leftarrowtail:"\u21a2",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27e6",LeftDownTeeVector:"\u2961",LeftDownVectorBar:"\u2959",LeftDownVector:"\u21c3",LeftFloor:"\u230a",leftharpoondown:"\u21bd",leftharpoonup:"\u21bc",leftleftarrows:"\u21c7",leftrightarrow:"\u2194",LeftRightArrow:"\u2194",Leftrightarrow:"\u21d4",leftrightarrows:"\u21c6",leftrightharpoons:"\u21cb",leftrightsquigarrow:"\u21ad",LeftRightVector:"\u294e",LeftTeeArrow:"\u21a4",LeftTee:"\u22a3",LeftTeeVector:"\u295a",leftthreetimes:"\u22cb",LeftTriangleBar:"\u29cf",LeftTriangle:"\u22b2",LeftTriangleEqual:"\u22b4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVectorBar:"\u2958",LeftUpVector:"\u21bf",LeftVectorBar:"\u2952",LeftVector:"\u21bc",lEg:"\u2a8b",leg:"\u22da",leq:"\u2264",leqq:"\u2266",leqslant:"\u2a7d",lescc:"\u2aa8",les:"\u2a7d",lesdot:"\u2a7f",lesdoto:"\u2a81",lesdotor:"\u2a83",lesg:"\u22da\ufe00",lesges:"\u2a93",lessapprox:"\u2a85",lessdot:"\u22d6",lesseqgtr:"\u22da",lesseqqgtr:"\u2a8b",LessEqualGreater:"\u22da",LessFullEqual:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",LessLess:"\u2aa1",lesssim:"\u2272",LessSlantEqual:"\u2a7d",LessTilde:"\u2272",lfisht:"\u297c",lfloor:"\u230a",Lfr:"\ud835\udd0f",lfr:"\ud835\udd29",lg:"\u2276",lgE:"\u2a91",lHar:"\u2962",lhard:"\u21bd",lharu:"\u21bc",lharul:"\u296a",lhblk:"\u2584",LJcy:"\u0409",ljcy:"\u0459",llarr:"\u21c7",ll:"\u226a",Ll:"\u22d8",llcorner:"\u231e",Lleftarrow:"\u21da",llhard:"\u296b",lltri:"\u25fa",Lmidot:"\u013f",lmidot:"\u0140",lmoustache:"\u23b0",lmoust:"\u23b0",lnap:"\u2a89",lnapprox:"\u2a89",lne:"\u2a87",lnE:"\u2268",lneq:"\u2a87",lneqq:"\u2268",lnsim:"\u22e6",loang:"\u27ec",loarr:"\u21fd",lobrk:"\u27e6",longleftarrow:"\u27f5",LongLeftArrow:"\u27f5",Longleftarrow:"\u27f8",longleftrightarrow:"\u27f7",LongLeftRightArrow:"\u27f7",Longleftrightarrow:"\u27fa",longmapsto:"\u27fc",longrightarrow:"\u27f6",LongRightArrow:"\u27f6",Longrightarrow:"\u27f9",looparrowleft:"\u21ab",looparrowright:"\u21ac",lopar:"\u2985",Lopf:"\ud835\udd43",lopf:"\ud835\udd5d",loplus:"\u2a2d",lotimes:"\u2a34",lowast:"\u2217",lowbar:"_",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",loz:"\u25ca",lozenge:"\u25ca",lozf:"\u29eb",lpar:"(",lparlt:"\u2993",lrarr:"\u21c6",lrcorner:"\u231f",lrhar:"\u21cb",lrhard:"\u296d",lrm:"\u200e",lrtri:"\u22bf",lsaquo:"\u2039",lscr:"\ud835\udcc1",Lscr:"\u2112",lsh:"\u21b0",Lsh:"\u21b0",lsim:"\u2272",lsime:"\u2a8d",lsimg:"\u2a8f",lsqb:"[",lsquo:"\u2018",lsquor:"\u201a",Lstrok:"\u0141",lstrok:"\u0142",ltcc:"\u2aa6",ltcir:"\u2a79",lt:"<",LT:"<",Lt:"\u226a",ltdot:"\u22d6",lthree:"\u22cb",ltimes:"\u22c9",ltlarr:"\u2976",ltquest:"\u2a7b",ltri:"\u25c3",ltrie:"\u22b4",ltrif:"\u25c2",ltrPar:"\u2996",lurdshar:"\u294a",luruhar:"\u2966",lvertneqq:"\u2268\ufe00",lvnE:"\u2268\ufe00",macr:"\xaf",male:"\u2642",malt:"\u2720",maltese:"\u2720",Map:"\u2905",map:"\u21a6",mapsto:"\u21a6",mapstodown:"\u21a7",mapstoleft:"\u21a4",mapstoup:"\u21a5",marker:"\u25ae",mcomma:"\u2a29",Mcy:"\u041c",mcy:"\u043c",mdash:"\u2014",mDDot:"\u223a",measuredangle:"\u2221",MediumSpace:"\u205f",Mellintrf:"\u2133",Mfr:"\ud835\udd10",mfr:"\ud835\udd2a",mho:"\u2127",micro:"\xb5",midast:"*",midcir:"\u2af0",mid:"\u2223",middot:"\xb7",minusb:"\u229f",minus:"\u2212",minusd:"\u2238",minusdu:"\u2a2a",MinusPlus:"\u2213",mlcp:"\u2adb",mldr:"\u2026",mnplus:"\u2213",models:"\u22a7",Mopf:"\ud835\udd44",mopf:"\ud835\udd5e",mp:"\u2213",mscr:"\ud835\udcc2",Mscr:"\u2133",mstpos:"\u223e",Mu:"\u039c",mu:"\u03bc",multimap:"\u22b8",mumap:"\u22b8",nabla:"\u2207",Nacute:"\u0143",nacute:"\u0144",nang:"\u2220\u20d2",nap:"\u2249",napE:"\u2a70\u0338",napid:"\u224b\u0338",napos:"\u0149",napprox:"\u2249",natural:"\u266e",naturals:"\u2115",natur:"\u266e",nbsp:"\xa0",nbump:"\u224e\u0338",nbumpe:"\u224f\u0338",ncap:"\u2a43",Ncaron:"\u0147",ncaron:"\u0148",Ncedil:"\u0145",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2a6d\u0338",ncup:"\u2a42",Ncy:"\u041d",ncy:"\u043d",ndash:"\u2013",nearhk:"\u2924",nearr:"\u2197",neArr:"\u21d7",nearrow:"\u2197",ne:"\u2260",nedot:"\u2250\u0338",NegativeMediumSpace:"\u200b",NegativeThickSpace:"\u200b",NegativeThinSpace:"\u200b",NegativeVeryThinSpace:"\u200b",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",NestedGreaterGreater:"\u226b",NestedLessLess:"\u226a",NewLine:"\n",nexist:"\u2204",nexists:"\u2204",Nfr:"\ud835\udd11",nfr:"\ud835\udd2b",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2a7e\u0338",nges:"\u2a7e\u0338",nGg:"\u22d9\u0338",ngsim:"\u2275",nGt:"\u226b\u20d2",ngt:"\u226f",ngtr:"\u226f",nGtv:"\u226b\u0338",nharr:"\u21ae",nhArr:"\u21ce",nhpar:"\u2af2",ni:"\u220b",nis:"\u22fc",nisd:"\u22fa",niv:"\u220b",NJcy:"\u040a",njcy:"\u045a",nlarr:"\u219a",nlArr:"\u21cd",nldr:"\u2025",nlE:"\u2266\u0338",nle:"\u2270",nleftarrow:"\u219a",nLeftarrow:"\u21cd",nleftrightarrow:"\u21ae",nLeftrightarrow:"\u21ce",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2a7d\u0338",nles:"\u2a7d\u0338",nless:"\u226e",nLl:"\u22d8\u0338",nlsim:"\u2274",nLt:"\u226a\u20d2",nlt:"\u226e",nltri:"\u22ea",nltrie:"\u22ec",nLtv:"\u226a\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xa0",nopf:"\ud835\udd5f",Nopf:"\u2115",Not:"\u2aec",not:"\xac",NotCongruent:"\u2262",NotCupCap:"\u226d",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226f",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226b\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2a7e\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224e\u0338",NotHumpEqual:"\u224f\u0338",notin:"\u2209",notindot:"\u22f5\u0338",notinE:"\u22f9\u0338",notinva:"\u2209",notinvb:"\u22f7",notinvc:"\u22f6",NotLeftTriangleBar:"\u29cf\u0338",NotLeftTriangle:"\u22ea",NotLeftTriangleEqual:"\u22ec",NotLess:"\u226e",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226a\u0338",NotLessSlantEqual:"\u2a7d\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2aa2\u0338",NotNestedLessLess:"\u2aa1\u0338",notni:"\u220c",notniva:"\u220c",notnivb:"\u22fe",notnivc:"\u22fd",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2aaf\u0338",NotPrecedesSlantEqual:"\u22e0",NotReverseElement:"\u220c",NotRightTriangleBar:"\u29d0\u0338",NotRightTriangle:"\u22eb",NotRightTriangleEqual:"\u22ed",NotSquareSubset:"\u228f\u0338",NotSquareSubsetEqual:"\u22e2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22e3",NotSubset:"\u2282\u20d2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2ab0\u0338",NotSucceedsSlantEqual:"\u22e1",NotSucceedsTilde:"\u227f\u0338",NotSuperset:"\u2283\u20d2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",nparallel:"\u2226",npar:"\u2226",nparsl:"\u2afd\u20e5",npart:"\u2202\u0338",npolint:"\u2a14",npr:"\u2280",nprcue:"\u22e0",nprec:"\u2280",npreceq:"\u2aaf\u0338",npre:"\u2aaf\u0338",nrarrc:"\u2933\u0338",nrarr:"\u219b",nrArr:"\u21cf",nrarrw:"\u219d\u0338",nrightarrow:"\u219b",nRightarrow:"\u21cf",nrtri:"\u22eb",nrtrie:"\u22ed",nsc:"\u2281",nsccue:"\u22e1",nsce:"\u2ab0\u0338",Nscr:"\ud835\udca9",nscr:"\ud835\udcc3",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22e2",nsqsupe:"\u22e3",nsub:"\u2284",nsubE:"\u2ac5\u0338",nsube:"\u2288",nsubset:"\u2282\u20d2",nsubseteq:"\u2288",nsubseteqq:"\u2ac5\u0338",nsucc:"\u2281",nsucceq:"\u2ab0\u0338",nsup:"\u2285",nsupE:"\u2ac6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20d2",nsupseteq:"\u2289",nsupseteqq:"\u2ac6\u0338",ntgl:"\u2279",Ntilde:"\xd1",ntilde:"\xf1",ntlg:"\u2278",ntriangleleft:"\u22ea",ntrianglelefteq:"\u22ec",ntriangleright:"\u22eb",ntrianglerighteq:"\u22ed",Nu:"\u039d",nu:"\u03bd",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224d\u20d2",nvdash:"\u22ac",nvDash:"\u22ad",nVdash:"\u22ae",nVDash:"\u22af",nvge:"\u2265\u20d2",nvgt:">\u20d2",nvHarr:"\u2904",nvinfin:"\u29de",nvlArr:"\u2902",nvle:"\u2264\u20d2",nvlt:"<\u20d2",nvltrie:"\u22b4\u20d2",nvrArr:"\u2903",nvrtrie:"\u22b5\u20d2",nvsim:"\u223c\u20d2",nwarhk:"\u2923",nwarr:"\u2196",nwArr:"\u21d6",nwarrow:"\u2196",nwnear:"\u2927",Oacute:"\xd3",oacute:"\xf3",oast:"\u229b",Ocirc:"\xd4",ocirc:"\xf4",ocir:"\u229a",Ocy:"\u041e",ocy:"\u043e",odash:"\u229d",Odblac:"\u0150",odblac:"\u0151",odiv:"\u2a38",odot:"\u2299",odsold:"\u29bc",OElig:"\u0152",oelig:"\u0153",ofcir:"\u29bf",Ofr:"\ud835\udd12",ofr:"\ud835\udd2c",ogon:"\u02db",Ograve:"\xd2",ograve:"\xf2",ogt:"\u29c1",ohbar:"\u29b5",ohm:"\u03a9",oint:"\u222e",olarr:"\u21ba",olcir:"\u29be",olcross:"\u29bb",oline:"\u203e",olt:"\u29c0",Omacr:"\u014c",omacr:"\u014d",Omega:"\u03a9",omega:"\u03c9",Omicron:"\u039f",omicron:"\u03bf",omid:"\u29b6",ominus:"\u2296",Oopf:"\ud835\udd46",oopf:"\ud835\udd60",opar:"\u29b7",OpenCurlyDoubleQuote:"\u201c",OpenCurlyQuote:"\u2018",operp:"\u29b9",oplus:"\u2295",orarr:"\u21bb",Or:"\u2a54",or:"\u2228",ord:"\u2a5d",order:"\u2134",orderof:"\u2134",ordf:"\xaa",ordm:"\xba",origof:"\u22b6",oror:"\u2a56",orslope:"\u2a57",orv:"\u2a5b",oS:"\u24c8",Oscr:"\ud835\udcaa",oscr:"\u2134",Oslash:"\xd8",oslash:"\xf8",osol:"\u2298",Otilde:"\xd5",otilde:"\xf5",otimesas:"\u2a36",Otimes:"\u2a37",otimes:"\u2297",Ouml:"\xd6",ouml:"\xf6",ovbar:"\u233d",OverBar:"\u203e",OverBrace:"\u23de",OverBracket:"\u23b4",OverParenthesis:"\u23dc",para:"\xb6",parallel:"\u2225",par:"\u2225",parsim:"\u2af3",parsl:"\u2afd",part:"\u2202",PartialD:"\u2202",Pcy:"\u041f",pcy:"\u043f",percnt:"%",period:".",permil:"\u2030",perp:"\u22a5",pertenk:"\u2031",Pfr:"\ud835\udd13",pfr:"\ud835\udd2d",Phi:"\u03a6",phi:"\u03c6",phiv:"\u03d5",phmmat:"\u2133",phone:"\u260e",Pi:"\u03a0",pi:"\u03c0",pitchfork:"\u22d4",piv:"\u03d6",planck:"\u210f",planckh:"\u210e",plankv:"\u210f",plusacir:"\u2a23",plusb:"\u229e",pluscir:"\u2a22",plus:"+",plusdo:"\u2214",plusdu:"\u2a25",pluse:"\u2a72",PlusMinus:"\xb1",plusmn:"\xb1",plussim:"\u2a26",plustwo:"\u2a27",pm:"\xb1",Poincareplane:"\u210c",pointint:"\u2a15",popf:"\ud835\udd61",Popf:"\u2119",pound:"\xa3",prap:"\u2ab7",Pr:"\u2abb",pr:"\u227a",prcue:"\u227c",precapprox:"\u2ab7",prec:"\u227a",preccurlyeq:"\u227c",Precedes:"\u227a",PrecedesEqual:"\u2aaf",PrecedesSlantEqual:"\u227c",PrecedesTilde:"\u227e",preceq:"\u2aaf",precnapprox:"\u2ab9",precneqq:"\u2ab5",precnsim:"\u22e8",pre:"\u2aaf",prE:"\u2ab3",precsim:"\u227e",prime:"\u2032",Prime:"\u2033",primes:"\u2119",prnap:"\u2ab9",prnE:"\u2ab5",prnsim:"\u22e8",prod:"\u220f",Product:"\u220f",profalar:"\u232e",profline:"\u2312",profsurf:"\u2313",prop:"\u221d",Proportional:"\u221d",Proportion:"\u2237",propto:"\u221d",prsim:"\u227e",prurel:"\u22b0",Pscr:"\ud835\udcab",pscr:"\ud835\udcc5",Psi:"\u03a8",psi:"\u03c8",puncsp:"\u2008",Qfr:"\ud835\udd14",qfr:"\ud835\udd2e",qint:"\u2a0c",qopf:"\ud835\udd62",Qopf:"\u211a",qprime:"\u2057",Qscr:"\ud835\udcac",qscr:"\ud835\udcc6",quaternions:"\u210d",quatint:"\u2a16",quest:"?",questeq:"\u225f",quot:'"',QUOT:'"',rAarr:"\u21db",race:"\u223d\u0331",Racute:"\u0154",racute:"\u0155",radic:"\u221a",raemptyv:"\u29b3",rang:"\u27e9",Rang:"\u27eb",rangd:"\u2992",range:"\u29a5",rangle:"\u27e9",raquo:"\xbb",rarrap:"\u2975",rarrb:"\u21e5",rarrbfs:"\u2920",rarrc:"\u2933",rarr:"\u2192",Rarr:"\u21a0",rArr:"\u21d2",rarrfs:"\u291e",rarrhk:"\u21aa",rarrlp:"\u21ac",rarrpl:"\u2945",rarrsim:"\u2974",Rarrtl:"\u2916",rarrtl:"\u21a3",rarrw:"\u219d",ratail:"\u291a",rAtail:"\u291c",ratio:"\u2236",rationals:"\u211a",rbarr:"\u290d",rBarr:"\u290f",RBarr:"\u2910",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298c",rbrksld:"\u298e",rbrkslu:"\u2990",Rcaron:"\u0158",rcaron:"\u0159",Rcedil:"\u0156",rcedil:"\u0157",rceil:"\u2309",rcub:"}",Rcy:"\u0420",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201d",rdquor:"\u201d",rdsh:"\u21b3",real:"\u211c",realine:"\u211b",realpart:"\u211c",reals:"\u211d",Re:"\u211c",rect:"\u25ad",reg:"\xae",REG:"\xae",ReverseElement:"\u220b",ReverseEquilibrium:"\u21cb",ReverseUpEquilibrium:"\u296f",rfisht:"\u297d",rfloor:"\u230b",rfr:"\ud835\udd2f",Rfr:"\u211c",rHar:"\u2964",rhard:"\u21c1",rharu:"\u21c0",rharul:"\u296c",Rho:"\u03a1",rho:"\u03c1",rhov:"\u03f1",RightAngleBracket:"\u27e9",RightArrowBar:"\u21e5",rightarrow:"\u2192",RightArrow:"\u2192",Rightarrow:"\u21d2",RightArrowLeftArrow:"\u21c4",rightarrowtail:"\u21a3",RightCeiling:"\u2309",RightDoubleBracket:"\u27e7",RightDownTeeVector:"\u295d",RightDownVectorBar:"\u2955",RightDownVector:"\u21c2",RightFloor:"\u230b",rightharpoondown:"\u21c1",rightharpoonup:"\u21c0",rightleftarrows:"\u21c4",rightleftharpoons:"\u21cc",rightrightarrows:"\u21c9",rightsquigarrow:"\u219d",RightTeeArrow:"\u21a6",RightTee:"\u22a2",RightTeeVector:"\u295b",rightthreetimes:"\u22cc",RightTriangleBar:"\u29d0",RightTriangle:"\u22b3",RightTriangleEqual:"\u22b5",RightUpDownVector:"\u294f",RightUpTeeVector:"\u295c",RightUpVectorBar:"\u2954",RightUpVector:"\u21be",RightVectorBar:"\u2953",RightVector:"\u21c0",ring:"\u02da",risingdotseq:"\u2253",rlarr:"\u21c4",rlhar:"\u21cc",rlm:"\u200f",rmoustache:"\u23b1",rmoust:"\u23b1",rnmid:"\u2aee",roang:"\u27ed",roarr:"\u21fe",robrk:"\u27e7",ropar:"\u2986",ropf:"\ud835\udd63",Ropf:"\u211d",roplus:"\u2a2e",rotimes:"\u2a35",RoundImplies:"\u2970",rpar:")",rpargt:"\u2994",rppolint:"\u2a12",rrarr:"\u21c9",Rrightarrow:"\u21db",rsaquo:"\u203a",rscr:"\ud835\udcc7",Rscr:"\u211b",rsh:"\u21b1",Rsh:"\u21b1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22cc",rtimes:"\u22ca",rtri:"\u25b9",rtrie:"\u22b5",rtrif:"\u25b8",rtriltri:"\u29ce",RuleDelayed:"\u29f4",ruluhar:"\u2968",rx:"\u211e",Sacute:"\u015a",sacute:"\u015b",sbquo:"\u201a",scap:"\u2ab8",Scaron:"\u0160",scaron:"\u0161",Sc:"\u2abc",sc:"\u227b",sccue:"\u227d",sce:"\u2ab0",scE:"\u2ab4",Scedil:"\u015e",scedil:"\u015f",Scirc:"\u015c",scirc:"\u015d",scnap:"\u2aba",scnE:"\u2ab6",scnsim:"\u22e9",scpolint:"\u2a13",scsim:"\u227f",Scy:"\u0421",scy:"\u0441",sdotb:"\u22a1",sdot:"\u22c5",sdote:"\u2a66",searhk:"\u2925",searr:"\u2198",seArr:"\u21d8",searrow:"\u2198",sect:"\xa7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",Sfr:"\ud835\udd16",sfr:"\ud835\udd30",sfrown:"\u2322",sharp:"\u266f",SHCHcy:"\u0429",shchcy:"\u0449",SHcy:"\u0428",shcy:"\u0448",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",shortmid:"\u2223",shortparallel:"\u2225",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",shy:"\xad",Sigma:"\u03a3",sigma:"\u03c3",sigmaf:"\u03c2",sigmav:"\u03c2",sim:"\u223c",simdot:"\u2a6a",sime:"\u2243",simeq:"\u2243",simg:"\u2a9e",simgE:"\u2aa0",siml:"\u2a9d",simlE:"\u2a9f",simne:"\u2246",simplus:"\u2a24",simrarr:"\u2972",slarr:"\u2190",SmallCircle:"\u2218",smallsetminus:"\u2216",smashp:"\u2a33",smeparsl:"\u29e4",smid:"\u2223",smile:"\u2323",smt:"\u2aaa",smte:"\u2aac",smtes:"\u2aac\ufe00",SOFTcy:"\u042c",softcy:"\u044c",solbar:"\u233f",solb:"\u29c4",sol:"/",Sopf:"\ud835\udd4a",sopf:"\ud835\udd64",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\ufe00",sqcup:"\u2294",sqcups:"\u2294\ufe00",Sqrt:"\u221a",sqsub:"\u228f",sqsube:"\u2291",sqsubset:"\u228f",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",square:"\u25a1",Square:"\u25a1",SquareIntersection:"\u2293",SquareSubset:"\u228f",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",squarf:"\u25aa",squ:"\u25a1",squf:"\u25aa",srarr:"\u2192",Sscr:"\ud835\udcae",sscr:"\ud835\udcc8",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22c6",Star:"\u22c6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03f5",straightphi:"\u03d5",strns:"\xaf",sub:"\u2282",Sub:"\u22d0",subdot:"\u2abd",subE:"\u2ac5",sube:"\u2286",subedot:"\u2ac3",submult:"\u2ac1",subnE:"\u2acb",subne:"\u228a",subplus:"\u2abf",subrarr:"\u2979",subset:"\u2282",Subset:"\u22d0",subseteq:"\u2286",subseteqq:"\u2ac5",SubsetEqual:"\u2286",subsetneq:"\u228a",subsetneqq:"\u2acb",subsim:"\u2ac7",subsub:"\u2ad5",subsup:"\u2ad3",succapprox:"\u2ab8",succ:"\u227b",succcurlyeq:"\u227d",Succeeds:"\u227b",SucceedsEqual:"\u2ab0",SucceedsSlantEqual:"\u227d",SucceedsTilde:"\u227f",succeq:"\u2ab0",succnapprox:"\u2aba",succneqq:"\u2ab6",succnsim:"\u22e9",succsim:"\u227f",SuchThat:"\u220b",sum:"\u2211",Sum:"\u2211",sung:"\u266a",sup1:"\xb9",sup2:"\xb2",sup3:"\xb3",sup:"\u2283",Sup:"\u22d1",supdot:"\u2abe",supdsub:"\u2ad8",supE:"\u2ac6",supe:"\u2287",supedot:"\u2ac4",Superset:"\u2283",SupersetEqual:"\u2287",suphsol:"\u27c9",suphsub:"\u2ad7",suplarr:"\u297b",supmult:"\u2ac2",supnE:"\u2acc",supne:"\u228b",supplus:"\u2ac0",supset:"\u2283",Supset:"\u22d1",supseteq:"\u2287",supseteqq:"\u2ac6",supsetneq:"\u228b",supsetneqq:"\u2acc",supsim:"\u2ac8",supsub:"\u2ad4",supsup:"\u2ad6",swarhk:"\u2926",swarr:"\u2199",swArr:"\u21d9",swarrow:"\u2199",swnwar:"\u292a",szlig:"\xdf",Tab:" ",target:"\u2316",Tau:"\u03a4",tau:"\u03c4",tbrk:"\u23b4",Tcaron:"\u0164",tcaron:"\u0165",Tcedil:"\u0162",tcedil:"\u0163",Tcy:"\u0422",tcy:"\u0442",tdot:"\u20db",telrec:"\u2315",Tfr:"\ud835\udd17",tfr:"\ud835\udd31",there4:"\u2234",therefore:"\u2234",Therefore:"\u2234",Theta:"\u0398",theta:"\u03b8",thetasym:"\u03d1",thetav:"\u03d1",thickapprox:"\u2248",thicksim:"\u223c",ThickSpace:"\u205f\u200a",ThinSpace:"\u2009",thinsp:"\u2009",thkap:"\u2248",thksim:"\u223c",THORN:"\xde",thorn:"\xfe",tilde:"\u02dc",Tilde:"\u223c",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",timesbar:"\u2a31",timesb:"\u22a0",times:"\xd7",timesd:"\u2a30",tint:"\u222d",toea:"\u2928",topbot:"\u2336",topcir:"\u2af1",top:"\u22a4",Topf:"\ud835\udd4b",topf:"\ud835\udd65",topfork:"\u2ada",tosa:"\u2929",tprime:"\u2034",trade:"\u2122",TRADE:"\u2122",triangle:"\u25b5",triangledown:"\u25bf",triangleleft:"\u25c3",trianglelefteq:"\u22b4",triangleq:"\u225c",triangleright:"\u25b9",trianglerighteq:"\u22b5",tridot:"\u25ec",trie:"\u225c",triminus:"\u2a3a",TripleDot:"\u20db",triplus:"\u2a39",trisb:"\u29cd",tritime:"\u2a3b",trpezium:"\u23e2",Tscr:"\ud835\udcaf",tscr:"\ud835\udcc9",TScy:"\u0426",tscy:"\u0446",TSHcy:"\u040b",tshcy:"\u045b",Tstrok:"\u0166",tstrok:"\u0167",twixt:"\u226c",twoheadleftarrow:"\u219e",twoheadrightarrow:"\u21a0",Uacute:"\xda",uacute:"\xfa",uarr:"\u2191",Uarr:"\u219f",uArr:"\u21d1",Uarrocir:"\u2949",Ubrcy:"\u040e",ubrcy:"\u045e",Ubreve:"\u016c",ubreve:"\u016d",Ucirc:"\xdb",ucirc:"\xfb",Ucy:"\u0423",ucy:"\u0443",udarr:"\u21c5",Udblac:"\u0170",udblac:"\u0171",udhar:"\u296e",ufisht:"\u297e",Ufr:"\ud835\udd18",ufr:"\ud835\udd32",Ugrave:"\xd9",ugrave:"\xf9",uHar:"\u2963",uharl:"\u21bf",uharr:"\u21be",uhblk:"\u2580",ulcorn:"\u231c",ulcorner:"\u231c",ulcrop:"\u230f",ultri:"\u25f8",Umacr:"\u016a",umacr:"\u016b",uml:"\xa8",UnderBar:"_",UnderBrace:"\u23df",UnderBracket:"\u23b5",UnderParenthesis:"\u23dd",Union:"\u22c3",UnionPlus:"\u228e",Uogon:"\u0172",uogon:"\u0173",Uopf:"\ud835\udd4c",uopf:"\ud835\udd66",UpArrowBar:"\u2912",uparrow:"\u2191",UpArrow:"\u2191",Uparrow:"\u21d1",UpArrowDownArrow:"\u21c5",updownarrow:"\u2195",UpDownArrow:"\u2195",Updownarrow:"\u21d5",UpEquilibrium:"\u296e",upharpoonleft:"\u21bf",upharpoonright:"\u21be",uplus:"\u228e",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",upsi:"\u03c5",Upsi:"\u03d2",upsih:"\u03d2",Upsilon:"\u03a5",upsilon:"\u03c5",UpTeeArrow:"\u21a5",UpTee:"\u22a5",upuparrows:"\u21c8",urcorn:"\u231d",urcorner:"\u231d",urcrop:"\u230e",Uring:"\u016e",uring:"\u016f",urtri:"\u25f9",Uscr:"\ud835\udcb0",uscr:"\ud835\udcca",utdot:"\u22f0",Utilde:"\u0168",utilde:"\u0169",utri:"\u25b5",utrif:"\u25b4",uuarr:"\u21c8",Uuml:"\xdc",uuml:"\xfc",uwangle:"\u29a7",vangrt:"\u299c",varepsilon:"\u03f5",varkappa:"\u03f0",varnothing:"\u2205",varphi:"\u03d5",varpi:"\u03d6",varpropto:"\u221d",varr:"\u2195",vArr:"\u21d5",varrho:"\u03f1",varsigma:"\u03c2",varsubsetneq:"\u228a\ufe00",varsubsetneqq:"\u2acb\ufe00",varsupsetneq:"\u228b\ufe00",varsupsetneqq:"\u2acc\ufe00",vartheta:"\u03d1",vartriangleleft:"\u22b2",vartriangleright:"\u22b3",vBar:"\u2ae8",Vbar:"\u2aeb",vBarv:"\u2ae9",Vcy:"\u0412",vcy:"\u0432",vdash:"\u22a2",vDash:"\u22a8",Vdash:"\u22a9",VDash:"\u22ab",Vdashl:"\u2ae6",veebar:"\u22bb",vee:"\u2228",Vee:"\u22c1",veeeq:"\u225a",vellip:"\u22ee",verbar:"|",Verbar:"\u2016",vert:"|",Vert:"\u2016",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200a",Vfr:"\ud835\udd19",vfr:"\ud835\udd33",vltri:"\u22b2",vnsub:"\u2282\u20d2",vnsup:"\u2283\u20d2",Vopf:"\ud835\udd4d",vopf:"\ud835\udd67",vprop:"\u221d",vrtri:"\u22b3",Vscr:"\ud835\udcb1",vscr:"\ud835\udccb",vsubnE:"\u2acb\ufe00",vsubne:"\u228a\ufe00",vsupnE:"\u2acc\ufe00",vsupne:"\u228b\ufe00",Vvdash:"\u22aa",vzigzag:"\u299a",Wcirc:"\u0174",wcirc:"\u0175",wedbar:"\u2a5f",wedge:"\u2227",Wedge:"\u22c0",wedgeq:"\u2259",weierp:"\u2118",Wfr:"\ud835\udd1a",wfr:"\ud835\udd34",Wopf:"\ud835\udd4e",wopf:"\ud835\udd68",wp:"\u2118",wr:"\u2240",wreath:"\u2240",Wscr:"\ud835\udcb2",wscr:"\ud835\udccc",xcap:"\u22c2",xcirc:"\u25ef",xcup:"\u22c3",xdtri:"\u25bd",Xfr:"\ud835\udd1b",xfr:"\ud835\udd35",xharr:"\u27f7",xhArr:"\u27fa",Xi:"\u039e",xi:"\u03be",xlarr:"\u27f5",xlArr:"\u27f8",xmap:"\u27fc",xnis:"\u22fb",xodot:"\u2a00",Xopf:"\ud835\udd4f",xopf:"\ud835\udd69",xoplus:"\u2a01",xotime:"\u2a02",xrarr:"\u27f6",xrArr:"\u27f9",Xscr:"\ud835\udcb3",xscr:"\ud835\udccd",xsqcup:"\u2a06",xuplus:"\u2a04",xutri:"\u25b3",xvee:"\u22c1",xwedge:"\u22c0",Yacute:"\xdd",yacute:"\xfd",YAcy:"\u042f",yacy:"\u044f",Ycirc:"\u0176",ycirc:"\u0177",Ycy:"\u042b",ycy:"\u044b",yen:"\xa5",Yfr:"\ud835\udd1c",yfr:"\ud835\udd36",YIcy:"\u0407",yicy:"\u0457",Yopf:"\ud835\udd50",yopf:"\ud835\udd6a",Yscr:"\ud835\udcb4",yscr:"\ud835\udcce",YUcy:"\u042e",yucy:"\u044e",yuml:"\xff",Yuml:"\u0178",Zacute:"\u0179",zacute:"\u017a",Zcaron:"\u017d",zcaron:"\u017e",Zcy:"\u0417",zcy:"\u0437",Zdot:"\u017b",zdot:"\u017c",zeetrf:"\u2128",ZeroWidthSpace:"\u200b",Zeta:"\u0396",zeta:"\u03b6",zfr:"\ud835\udd37",Zfr:"\u2128",ZHcy:"\u0416",zhcy:"\u0436",zigrarr:"\u21dd",zopf:"\ud835\udd6b",Zopf:"\u2124",Zscr:"\ud835\udcb5",zscr:"\ud835\udccf",zwj:"\u200d",zwnj:"\u200c"}},{}],54:[function(e,r,t){"use strict";function n(e){var r=Array.prototype.slice.call(arguments,1);return r.forEach(function(r){r&&Object.keys(r).forEach(function(t){e[t]=r[t]})}),e}function s(e){return Object.prototype.toString.call(e)}function o(e){return"[object String]"===s(e)}function i(e){return"[object Object]"===s(e)}function a(e){return"[object RegExp]"===s(e)}function c(e){return"[object Function]"===s(e)}function l(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function u(e){return Object.keys(e||{}).reduce(function(e,r){return e||k.hasOwnProperty(r)},!1)}function p(e){e.__index__=-1,e.__text_cache__=""}function h(e){return function(r,t){var n=r.slice(t);return e.test(n)?n.match(e)[0].length:0}}function f(){return function(e,r){r.normalize(e)}}function d(r){function t(e){return e.replace("%TLDS%",u.src_tlds)}function s(e,r){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+r)}var u=r.re=n({},e("./lib/re")),d=r.__tlds__.slice();r.__tlds_replaced__||d.push(v),d.push(u.src_xn),u.src_tlds=d.join("|"),u.email_fuzzy=RegExp(t(u.tpl_email_fuzzy),"i"),u.link_fuzzy=RegExp(t(u.tpl_link_fuzzy),"i"),u.link_no_ip_fuzzy=RegExp(t(u.tpl_link_no_ip_fuzzy),"i"),u.host_fuzzy_test=RegExp(t(u.tpl_host_fuzzy_test),"i");var m=[];r.__compiled__={},Object.keys(r.__schemas__).forEach(function(e){var t=r.__schemas__[e];if(null!==t){var n={validate:null,link:null};return r.__compiled__[e]=n,i(t)?(a(t.validate)?n.validate=h(t.validate):c(t.validate)?n.validate=t.validate:s(e,t),void(c(t.normalize)?n.normalize=t.normalize:t.normalize?s(e,t):n.normalize=f())):o(t)?void m.push(e):void s(e,t)}}),m.forEach(function(e){r.__compiled__[r.__schemas__[e]]&&(r.__compiled__[e].validate=r.__compiled__[r.__schemas__[e]].validate,r.__compiled__[e].normalize=r.__compiled__[r.__schemas__[e]].normalize)}),r.__compiled__[""]={validate:null,normalize:f()};var g=Object.keys(r.__compiled__).filter(function(e){return e.length>0&&r.__compiled__[e]}).map(l).join("|");r.re.schema_test=RegExp("(^|(?!_)(?:>|"+u.src_ZPCc+"))("+g+")","i"),r.re.schema_search=RegExp("(^|(?!_)(?:>|"+u.src_ZPCc+"))("+g+")","ig"),r.re.pretest=RegExp("("+r.re.schema_test.source+")|("+r.re.host_fuzzy_test.source+")|@","i"),p(r)}function m(e,r){var t=e.__index__,n=e.__last_index__,s=e.__text_cache__.slice(t,n);this.schema=e.__schema__.toLowerCase(),this.index=t+r,this.lastIndex=n+r,this.raw=s,this.text=s,this.url=s}function g(e,r){var t=new m(e,r);return e.__compiled__[t.schema].normalize(t,e),t}function _(e,r){return this instanceof _?(r||u(e)&&(r=e,e={}),this.__opts__=n({},k,r),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=n({},b,e),this.__compiled__={},this.__tlds__=x,this.__tlds_replaced__=!1,this.re={},void d(this)):new _(e,r)}var k={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1},b={"http:":{validate:function(e,r,t){var n=e.slice(r);return t.re.http||(t.re.http=new RegExp("^\\/\\/"+t.re.src_auth+t.re.src_host_port_strict+t.re.src_path,"i")),t.re.http.test(n)?n.match(t.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,r,t){var n=e.slice(r);return t.re.no_http||(t.re.no_http=new RegExp("^"+t.re.src_auth+t.re.src_host_port_strict+t.re.src_path,"i")),t.re.no_http.test(n)?r>=3&&":"===e[r-3]?0:n.match(t.re.no_http)[0].length:0}},"mailto:":{validate:function(e,r,t){var n=e.slice(r);return t.re.mailto||(t.re.mailto=new RegExp("^"+t.re.src_email_name+"@"+t.re.src_host_strict,"i")),t.re.mailto.test(n)?n.match(t.re.mailto)[0].length:0}}},v="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",x="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|\u0440\u0444".split("|");_.prototype.add=function(e,r){return this.__schemas__[e]=r,d(this),this},_.prototype.set=function(e){return this.__opts__=n(this.__opts__,e),this},_.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var r,t,n,s,o,i,a,c,l;if(this.re.schema_test.test(e))for(a=this.re.schema_search,a.lastIndex=0;null!==(r=a.exec(e));)if(s=this.testSchemaAt(e,r[2],a.lastIndex)){this.__schema__=r[2],this.__index__=r.index+r[1].length,this.__last_index__=r.index+r[0].length+s;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(c=e.search(this.re.host_fuzzy_test),c>=0&&(this.__index__<0||c=0&&null!==(n=e.match(this.re.email_fuzzy))&&(o=n.index+n[1].length,i=n.index+n[0].length,(this.__index__<0||othis.__last_index__)&&(this.__schema__="mailto:",this.__index__=o,this.__last_index__=i))),this.__index__>=0},_.prototype.pretest=function(e){return this.re.pretest.test(e)},_.prototype.testSchemaAt=function(e,r,t){return this.__compiled__[r.toLowerCase()]?this.__compiled__[r.toLowerCase()].validate(e,t,this):0},_.prototype.match=function(e){var r=0,t=[];this.__index__>=0&&this.__text_cache__===e&&(t.push(g(this,r)),r=this.__last_index__);for(var n=r?e.slice(r):e;this.test(n);)t.push(g(this,r)),n=n.slice(this.__last_index__),r+=this.__last_index__;return t.length?t:null},_.prototype.tlds=function(e,r){return e=Array.isArray(e)?e:[e],r?(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(e,r,t){return e!==t[r-1]}).reverse(),d(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,d(this),this)},_.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},r.exports=_},{"./lib/re":55}],55:[function(e,r,t){"use strict";var n=t.src_Any=e("uc.micro/properties/Any/regex").source,s=t.src_Cc=e("uc.micro/categories/Cc/regex").source,o=t.src_Z=e("uc.micro/categories/Z/regex").source,i=t.src_P=e("uc.micro/categories/P/regex").source,a=t.src_ZPCc=[o,i,s].join("|"),c=t.src_ZCc=[o,s].join("|"),l="(?:(?!"+a+")"+n+")",u="(?:(?![0-9]|"+a+")"+n+")",p=t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)";t.src_auth="(?:(?:(?!"+c+").)+@)?";var h=t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",f=t.src_host_terminator="(?=$|"+a+")(?!-|_|:\\d|\\.-|\\.(?!$|"+a+"))",d=t.src_path="(?:[/?#](?:(?!"+c+"|[()[\\]{}.,\"'?!\\-]).|\\[(?:(?!"+c+"|\\]).)*\\]|\\((?:(?!"+c+"|[)]).)*\\)|\\{(?:(?!"+c+'|[}]).)*\\}|\\"(?:(?!'+c+'|["]).)+\\"|\\\'(?:(?!'+c+"|[']).)+\\'|\\'(?="+l+").|\\.{2,3}[a-zA-Z0-9%/]|\\.(?!"+c+"|[.]).|\\-(?!--(?:[^-]|$))(?:-*)|\\,(?!"+c+").|\\!(?!"+c+"|[!]).|\\?(?!"+c+"|[?]).)+|\\/)?",m=t.src_email_name='[\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]+',g=t.src_xn="xn--[a-z0-9\\-]{1,59}",_=t.src_domain_root="(?:"+g+"|"+u+"{1,63})",k=t.src_domain="(?:"+g+"|(?:"+l+")|(?:"+l+"(?:-(?!-)|"+l+"){0,61}"+l+"))",b=t.src_host="(?:"+p+"|(?:(?:(?:"+k+")\\.)*"+_+"))",v=t.tpl_host_fuzzy="(?:"+p+"|(?:(?:(?:"+k+")\\.)+(?:%TLDS%)))",x=t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+k+")\\.)+(?:%TLDS%))";t.src_host_strict=b+f;var y=t.tpl_host_fuzzy_strict=v+f;t.src_host_port_strict=b+h+f;var C=t.tpl_host_port_fuzzy_strict=v+h+f,A=t.tpl_host_port_no_ip_fuzzy_strict=x+h+f;t.tpl_host_fuzzy_test="localhost|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+a+"|$))",t.tpl_email_fuzzy="(^|>|"+c+")("+m+"@"+y+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|]|"+a+"))((?![$+<=>^`|])"+C+d+")", +/*! markdown-it 6.0.0 https://github.com//markdown-it/markdown-it @license MIT */ +!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define('markdown-it',[],e);else{var r;r="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,r.markdownit=e()}}(function(){var e;return function r(e,t,n){function s(i,a){if(!t[i]){if(!e[i]){var c="function"==typeof require&&require;if(!a&&c)return c(i,!0);if(o)return o(i,!0);var l=new Error("Cannot find module '"+i+"'");throw l.code="MODULE_NOT_FOUND",l}var u=t[i]={exports:{}};e[i][0].call(u.exports,function(r){var t=e[i][1][r];return s(t?t:r)},u,u.exports,r,e,t,n)}return t[i].exports}for(var o="function"==typeof require&&require,i=0;i`\\x00-\\x20]+",o="'[^']*'",i='"[^"]*"',a="(?:"+s+"|"+o+"|"+i+")",c="(?:\\s+"+n+"(?:\\s*=\\s*"+a+")?)",l="<[A-Za-z][A-Za-z0-9\\-]*"+c+"*\\s*\\/?>",u="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",p="|",h="<[?].*?[?]>",f="]*>",d="",m=new RegExp("^(?:"+l+"|"+u+"|"+p+"|"+h+"|"+f+"|"+d+")"),g=new RegExp("^(?:"+l+"|"+u+")");r.exports.HTML_TAG_RE=m,r.exports.HTML_OPEN_CLOSE_TAG_RE=g},{}],4:[function(e,r,t){"use strict";function n(e){return Object.prototype.toString.call(e)}function s(e){return"[object String]"===n(e)}function o(e,r){return x.call(e,r)}function i(e){var r=Array.prototype.slice.call(arguments,1);return r.forEach(function(r){if(r){if("object"!=typeof r)throw new TypeError(r+"must be object");Object.keys(r).forEach(function(t){e[t]=r[t]})}}),e}function a(e,r,t){return[].concat(e.slice(0,r),t,e.slice(r+1))}function c(e){return e>=55296&&57343>=e?!1:e>=64976&&65007>=e?!1:65535===(65535&e)||65534===(65535&e)?!1:e>=0&&8>=e?!1:11===e?!1:e>=14&&31>=e?!1:e>=127&&159>=e?!1:e>1114111?!1:!0}function l(e){if(e>65535){e-=65536;var r=55296+(e>>10),t=56320+(1023&e);return String.fromCharCode(r,t)}return String.fromCharCode(e)}function u(e,r){var t=0;return o(q,r)?q[r]:35===r.charCodeAt(0)&&w.test(r)&&(t="x"===r[1].toLowerCase()?parseInt(r.slice(2),16):parseInt(r.slice(1),10),c(t))?l(t):e}function p(e){return e.indexOf("\\")<0?e:e.replace(y,"$1")}function h(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(A,function(e,r,t){return r?r:u(e,t)})}function f(e){return S[e]}function d(e){return D.test(e)?e.replace(E,f):e}function m(e){return e.replace(F,"\\$&")}function g(e){switch(e){case 9:case 32:return!0}return!1}function _(e){if(e>=8192&&8202>=e)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function k(e){return L.test(e)}function b(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function v(e){return e.trim().replace(/\s+/g," ").toUpperCase()}var x=Object.prototype.hasOwnProperty,y=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,C=/&([a-z#][a-z0-9]{1,31});/gi,A=new RegExp(y.source+"|"+C.source,"gi"),w=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,q=e("./entities"),D=/[&<>"]/,E=/[&<>"]/g,S={"&":"&","<":"<",">":">",'"':"""},F=/[.?*+^$[\]\\(){}|-]/g,L=e("uc.micro/categories/P/regex");t.lib={},t.lib.mdurl=e("mdurl"),t.lib.ucmicro=e("uc.micro"),t.assign=i,t.isString=s,t.has=o,t.unescapeMd=p,t.unescapeAll=h,t.isValidEntityCode=c,t.fromCodePoint=l,t.escapeHtml=d,t.arrayReplaceAt=a,t.isSpace=g,t.isWhiteSpace=_,t.isMdAsciiPunct=b,t.isPunctChar=k,t.escapeRE=m,t.normalizeReference=v},{"./entities":1,mdurl:59,"uc.micro":65,"uc.micro/categories/P/regex":63}],5:[function(e,r,t){"use strict";t.parseLinkLabel=e("./parse_link_label"),t.parseLinkDestination=e("./parse_link_destination"),t.parseLinkTitle=e("./parse_link_title")},{"./parse_link_destination":6,"./parse_link_label":7,"./parse_link_title":8}],6:[function(e,r,t){"use strict";var n=e("../common/utils").isSpace,s=e("../common/utils").unescapeAll;r.exports=function(e,r,t){var o,i,a=0,c=r,l={ok:!1,pos:0,lines:0,str:""};if(60===e.charCodeAt(r)){for(r++;t>r;){if(o=e.charCodeAt(r),10===o||n(o))return l;if(62===o)return l.pos=r+1,l.str=s(e.slice(c+1,r)),l.ok=!0,l;92===o&&t>r+1?r+=2:r++}return l}for(i=0;t>r&&(o=e.charCodeAt(r),32!==o)&&!(32>o||127===o);)if(92===o&&t>r+1)r+=2;else{if(40===o&&(i++,i>1))break;if(41===o&&(i--,0>i))break;r++}return c===r?l:(l.str=s(e.slice(c,r)),l.lines=a,l.pos=r,l.ok=!0,l)}},{"../common/utils":4}],7:[function(e,r,t){"use strict";r.exports=function(e,r,t){var n,s,o,i,a=-1,c=e.posMax,l=e.pos;for(e.pos=r+1,n=1;e.pos=t)return c;if(o=e.charCodeAt(r),34!==o&&39!==o&&40!==o)return c;for(r++,40===o&&(o=41);t>r;){if(s=e.charCodeAt(r),s===o)return c.pos=r+1,c.lines=i,c.str=n(e.slice(a+1,r)),c.ok=!0,c;10===s?i++:92===s&&t>r+1&&(r++,10===e.charCodeAt(r)&&i++),r++}return c}},{"../common/utils":4}],9:[function(e,r,t){"use strict";function n(e){var r=e.trim().toLowerCase();return _.test(r)?k.test(r)?!0:!1:!0}function s(e){var r=d.parse(e,!0);if(r.hostname&&(!r.protocol||b.indexOf(r.protocol)>=0))try{r.hostname=m.toASCII(r.hostname)}catch(t){}return d.encode(d.format(r))}function o(e){var r=d.parse(e,!0);if(r.hostname&&(!r.protocol||b.indexOf(r.protocol)>=0))try{r.hostname=m.toUnicode(r.hostname)}catch(t){}return d.decode(d.format(r))}function i(e,r){return this instanceof i?(r||a.isString(e)||(r=e||{},e="default"),this.inline=new h,this.block=new p,this.core=new u,this.renderer=new l,this.linkify=new f,this.validateLink=n,this.normalizeLink=s,this.normalizeLinkText=o,this.utils=a,this.helpers=c,this.options={},this.configure(e),void(r&&this.set(r))):new i(e,r)}var a=e("./common/utils"),c=e("./helpers"),l=e("./renderer"),u=e("./parser_core"),p=e("./parser_block"),h=e("./parser_inline"),f=e("linkify-it"),d=e("mdurl"),m=e("punycode"),g={"default":e("./presets/default"),zero:e("./presets/zero"),commonmark:e("./presets/commonmark")},_=/^(vbscript|javascript|file|data):/,k=/^data:image\/(gif|png|jpeg|webp);/,b=["http:","https:","mailto:"];i.prototype.set=function(e){return a.assign(this.options,e),this},i.prototype.configure=function(e){var r,t=this;if(a.isString(e)&&(r=e,e=g[r],!e))throw new Error('Wrong `markdown-it` preset "'+r+'", check name');if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(r){e.components[r].rules&&t[r].ruler.enableOnly(e.components[r].rules),e.components[r].rules2&&t[r].ruler2.enableOnly(e.components[r].rules2)}),this},i.prototype.enable=function(e,r){var t=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(r){t=t.concat(this[r].ruler.enable(e,!0))},this),t=t.concat(this.inline.ruler2.enable(e,!0));var n=e.filter(function(e){return t.indexOf(e)<0});if(n.length&&!r)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+n);return this},i.prototype.disable=function(e,r){var t=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(r){t=t.concat(this[r].ruler.disable(e,!0))},this),t=t.concat(this.inline.ruler2.disable(e,!0));var n=e.filter(function(e){return t.indexOf(e)<0});if(n.length&&!r)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+n);return this},i.prototype.use=function(e){var r=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,r),this},i.prototype.parse=function(e,r){var t=new this.core.State(e,this,r);return this.core.process(t),t.tokens},i.prototype.render=function(e,r){return r=r||{},this.renderer.render(this.parse(e,r),this.options,r)},i.prototype.parseInline=function(e,r){var t=new this.core.State(e,this,r);return t.inlineMode=!0,this.core.process(t),t.tokens},i.prototype.renderInline=function(e,r){return r=r||{},this.renderer.render(this.parseInline(e,r),this.options,r)},r.exports=i},{"./common/utils":4,"./helpers":5,"./parser_block":10,"./parser_core":11,"./parser_inline":12,"./presets/commonmark":13,"./presets/default":14,"./presets/zero":15,"./renderer":16,"linkify-it":54,mdurl:59,punycode:52}],10:[function(e,r,t){"use strict";function n(){this.ruler=new s;for(var e=0;ea&&(e.line=a=e.skipEmptyLines(a),!(a>=t))&&!(e.sCount[a]=l){e.line=t;break}for(s=0;i>s&&!(n=o[s](e,a,t,!1));s++);if(e.tight=!c,e.isEmpty(e.line-1)&&(c=!0),a=e.line,t>a&&e.isEmpty(a)){if(c=!0,a++,t>a&&"list"===e.parentType&&e.isEmpty(a))break;e.line=a}}},n.prototype.parse=function(e,r,t,n){var s;return e?(s=new this.State(e,r,t,n),void this.tokenize(s,s.line,s.lineMax)):[]},n.prototype.State=e("./rules_block/state_block"),r.exports=n},{"./ruler":17,"./rules_block/blockquote":18,"./rules_block/code":19,"./rules_block/fence":20,"./rules_block/heading":21,"./rules_block/hr":22,"./rules_block/html_block":23,"./rules_block/lheading":24,"./rules_block/list":25,"./rules_block/paragraph":26,"./rules_block/reference":27,"./rules_block/state_block":28,"./rules_block/table":29}],11:[function(e,r,t){"use strict";function n(){this.ruler=new s;for(var e=0;er;r++)n[r](e)},n.prototype.State=e("./rules_core/state_core"),r.exports=n},{"./ruler":17,"./rules_core/block":30,"./rules_core/inline":31,"./rules_core/linkify":32,"./rules_core/normalize":33,"./rules_core/replacements":34,"./rules_core/smartquotes":35,"./rules_core/state_core":36}],12:[function(e,r,t){"use strict";function n(){var e;for(this.ruler=new s,e=0;et&&(e.level++,r=s[t](e,!0),e.level--,!r);t++);else e.pos=e.posMax;r||e.pos++,a[n]=e.pos},n.prototype.tokenize=function(e){for(var r,t,n=this.ruler.getRules(""),s=n.length,o=e.posMax,i=e.md.options.maxNesting;e.post&&!(r=n[t](e,!1));t++);if(r){if(e.pos>=o)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},n.prototype.parse=function(e,r,t,n){var s,o,i,a=new this.State(e,r,t,n);for(this.tokenize(a),o=this.ruler2.getRules(""),i=o.length,s=0;i>s;s++)o[s](a)},n.prototype.State=e("./rules_inline/state_inline"),r.exports=n},{"./ruler":17,"./rules_inline/autolink":37,"./rules_inline/backticks":38,"./rules_inline/balance_pairs":39,"./rules_inline/emphasis":40,"./rules_inline/entity":41,"./rules_inline/escape":42,"./rules_inline/html_inline":43,"./rules_inline/image":44,"./rules_inline/link":45,"./rules_inline/newline":46,"./rules_inline/state_inline":47,"./rules_inline/strikethrough":48,"./rules_inline/text":49,"./rules_inline/text_collapse":50}],13:[function(e,r,t){"use strict";r.exports={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"\u201c\u201d\u2018\u2019",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","text_collapse"]}}}},{}],14:[function(e,r,t){"use strict";r.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"\u201c\u201d\u2018\u2019",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}}},{}],15:[function(e,r,t){"use strict";r.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"\u201c\u201d\u2018\u2019",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","text_collapse"]}}}},{}],16:[function(e,r,t){"use strict";function n(){this.rules=s({},a)}var s=e("./common/utils").assign,o=e("./common/utils").unescapeAll,i=e("./common/utils").escapeHtml,a={};a.code_inline=function(e,r){return""+i(e[r].content)+""},a.code_block=function(e,r){return"
"+i(e[r].content)+"
\n"},a.fence=function(e,r,t,n,s){var a,c=e[r],l=c.info?o(c.info).trim():"",u="";return l&&(u=l.split(/\s+/g)[0],c.attrJoin("class",t.langPrefix+u)),a=t.highlight?t.highlight(c.content,u)||i(c.content):i(c.content),0===a.indexOf(""+a+"\n"},a.image=function(e,r,t,n,s){var o=e[r];return o.attrs[o.attrIndex("alt")][1]=s.renderInlineAsText(o.children,t,n),s.renderToken(e,r,t)},a.hardbreak=function(e,r,t){return t.xhtmlOut?"
\n":"
\n"},a.softbreak=function(e,r,t){return t.breaks?t.xhtmlOut?"
\n":"
\n":"\n"},a.text=function(e,r){return i(e[r].content)},a.html_block=function(e,r){return e[r].content},a.html_inline=function(e,r){return e[r].content},n.prototype.renderAttrs=function(e){var r,t,n;if(!e.attrs)return"";for(n="",r=0,t=e.attrs.length;t>r;r++)n+=" "+i(e.attrs[r][0])+'="'+i(e.attrs[r][1])+'"';return n},n.prototype.renderToken=function(e,r,t){var n,s="",o=!1,i=e[r];return i.hidden?"":(i.block&&-1!==i.nesting&&r&&e[r-1].hidden&&(s+="\n"),s+=(-1===i.nesting?"\n":">")},n.prototype.renderInline=function(e,r,t){for(var n,s="",o=this.rules,i=0,a=e.length;a>i;i++)n=e[i].type,s+="undefined"!=typeof o[n]?o[n](e,i,r,t,this):this.renderToken(e,i,r);return s},n.prototype.renderInlineAsText=function(e,r,t){for(var n="",s=this.rules,o=0,i=e.length;i>o;o++)"text"===e[o].type?n+=s.text(e,o,r,t,this):"image"===e[o].type&&(n+=this.renderInlineAsText(e[o].children,r,t));return n},n.prototype.render=function(e,r,t){var n,s,o,i="",a=this.rules;for(n=0,s=e.length;s>n;n++)o=e[n].type,i+="inline"===o?this.renderInline(e[n].children,r,t):"undefined"!=typeof a[o]?a[e[n].type](e,n,r,t,this):this.renderToken(e,n,r,t);return i},r.exports=n},{"./common/utils":4}],17:[function(e,r,t){"use strict";function n(){this.__rules__=[],this.__cache__=null}n.prototype.__find__=function(e){for(var r=0;rn){if(r)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[n].enabled=!0,t.push(e)},this),this.__cache__=null,t},n.prototype.enableOnly=function(e,r){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(e){e.enabled=!1}),this.enable(e,r)},n.prototype.disable=function(e,r){Array.isArray(e)||(e=[e]);var t=[];return e.forEach(function(e){var n=this.__find__(e);if(0>n){if(r)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[n].enabled=!1,t.push(e)},this),this.__cache__=null,t},n.prototype.getRules=function(e){return null===this.__cache__&&this.__compile__(),this.__cache__[e]||[]},r.exports=n},{}],18:[function(e,r,t){"use strict";var n=e("../common/utils").isSpace;r.exports=function(e,r,t,s){var o,i,a,c,l,u,p,h,f,d,m,g,_,k,b,v,x=e.bMarks[r]+e.tShift[r],y=e.eMarks[r];if(62!==e.src.charCodeAt(x++))return!1;if(s)return!0;for(32===e.src.charCodeAt(x)&&x++,u=e.blkIndent,e.blkIndent=0,f=d=e.sCount[r]+x-(e.bMarks[r]+e.tShift[r]),l=[e.bMarks[r]],e.bMarks[r]=x;y>x&&(m=e.src.charCodeAt(x),n(m));)9===m?d+=4-d%4:d++,x++;for(i=x>=y,c=[e.sCount[r]],e.sCount[r]=d-f,a=[e.tShift[r]],e.tShift[r]=x-e.bMarks[r],g=e.md.block.ruler.getRules("blockquote"),o=r+1;t>o&&!(e.sCount[o]=y));o++)if(62!==e.src.charCodeAt(x++)){if(i)break;for(v=!1,k=0,b=g.length;b>k;k++)if(g[k](e,o,t,!0)){v=!0;break}if(v)break;l.push(e.bMarks[o]),a.push(e.tShift[o]),c.push(e.sCount[o]),e.sCount[o]=-1}else{for(32===e.src.charCodeAt(x)&&x++,f=d=e.sCount[o]+x-(e.bMarks[o]+e.tShift[o]),l.push(e.bMarks[o]),e.bMarks[o]=x;y>x&&(m=e.src.charCodeAt(x),n(m));)9===m?d+=4-d%4:d++,x++;i=x>=y,c.push(e.sCount[o]),e.sCount[o]=d-f,a.push(e.tShift[o]),e.tShift[o]=x-e.bMarks[o]}for(p=e.parentType,e.parentType="blockquote",_=e.push("blockquote_open","blockquote",1),_.markup=">",_.map=h=[r,0],e.md.block.tokenize(e,r,o),_=e.push("blockquote_close","blockquote",-1),_.markup=">",e.parentType=p,h[1]=e.line,k=0;kn;)if(e.isEmpty(n)){if(i++,i>=2&&"list"===e.parentType)break;n++}else{if(i=0,!(e.sCount[n]-e.blkIndent>=4))break;n++,s=n}return e.line=s,o=e.push("code_block","code",0),o.content=e.getLines(r,s,4+e.blkIndent,!0),o.map=[r,e.line],!0}},{}],20:[function(e,r,t){"use strict";r.exports=function(e,r,t,n){var s,o,i,a,c,l,u,p=!1,h=e.bMarks[r]+e.tShift[r],f=e.eMarks[r];if(h+3>f)return!1;if(s=e.src.charCodeAt(h),126!==s&&96!==s)return!1;if(c=h,h=e.skipChars(h,s),o=h-c,3>o)return!1;if(u=e.src.slice(c,h),i=e.src.slice(h,f),i.indexOf("`")>=0)return!1;if(n)return!0;for(a=r;(a++,!(a>=t))&&(h=c=e.bMarks[a]+e.tShift[a],f=e.eMarks[a],!(f>h&&e.sCount[a]=4||(h=e.skipChars(h,s),o>h-c||(h=e.skipSpaces(h),f>h)))){p=!0;break}return o=e.sCount[r],e.line=a+(p?1:0),l=e.push("fence","code",0),l.info=i,l.content=e.getLines(r+1,a,o,!0),l.markup=u,l.map=[r,e.line],!0}},{}],21:[function(e,r,t){"use strict";var n=e("../common/utils").isSpace;r.exports=function(e,r,t,s){var o,i,a,c,l=e.bMarks[r]+e.tShift[r],u=e.eMarks[r];if(o=e.src.charCodeAt(l),35!==o||l>=u)return!1;for(i=1,o=e.src.charCodeAt(++l);35===o&&u>l&&6>=i;)i++,o=e.src.charCodeAt(++l);return i>6||u>l&&32!==o?!1:s?!0:(u=e.skipSpacesBack(u,l),a=e.skipCharsBack(u,35,l),a>l&&n(e.src.charCodeAt(a-1))&&(u=a),e.line=r+1,c=e.push("heading_open","h"+String(i),1),c.markup="########".slice(0,i),c.map=[r,e.line],c=e.push("inline","",0),c.content=e.src.slice(l,u).trim(),c.map=[r,e.line],c.children=[],c=e.push("heading_close","h"+String(i),-1),c.markup="########".slice(0,i),!0)}},{"../common/utils":4}],22:[function(e,r,t){"use strict";var n=e("../common/utils").isSpace;r.exports=function(e,r,t,s){var o,i,a,c,l=e.bMarks[r]+e.tShift[r],u=e.eMarks[r];if(o=e.src.charCodeAt(l++),42!==o&&45!==o&&95!==o)return!1;for(i=1;u>l;){if(a=e.src.charCodeAt(l++),a!==o&&!n(a))return!1;a===o&&i++}return 3>i?!1:s?!0:(e.line=r+1,c=e.push("hr","hr",0),c.map=[r,e.line],c.markup=Array(i+1).join(String.fromCharCode(o)),!0)}},{"../common/utils":4}],23:[function(e,r,t){"use strict";var n=e("../common/html_blocks"),s=e("../common/html_re").HTML_OPEN_CLOSE_TAG_RE,o=[[/^<(script|pre|style)(?=(\s|>|$))/i,/<\/(script|pre|style)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(s.source+"\\s*$"),/^$/,!1]];r.exports=function(e,r,t,n){var s,i,a,c,l=e.bMarks[r]+e.tShift[r],u=e.eMarks[r];if(!e.md.options.html)return!1;if(60!==e.src.charCodeAt(l))return!1;for(c=e.src.slice(l,u),s=0;si&&!(e.sCount[i]h&&!e.isEmpty(h);h++)if(!(e.sCount[h]-e.blkIndent>3)){if(e.sCount[h]>=e.blkIndent&&(c=e.bMarks[h]+e.tShift[h],l=e.eMarks[h],l>c&&(p=e.src.charCodeAt(c),(45===p||61===p)&&(c=e.skipChars(c,p),c=e.skipSpaces(c),c>=l)))){u=61===p?1:2;break}if(!(e.sCount[h]<0)){for(s=!1,o=0,i=f.length;i>o;o++)if(f[o](e,h,t,!0)){s=!0;break}if(s)break}}return u?(n=e.getLines(r,h,e.blkIndent,!1).trim(),e.line=h+1,a=e.push("heading_open","h"+String(u),1),a.markup=String.fromCharCode(p),a.map=[r,e.line],a=e.push("inline","",0),a.content=n,a.map=[r,e.line-1],a.children=[],a=e.push("heading_close","h"+String(u),-1),a.markup=String.fromCharCode(p),!0):!1}},{}],25:[function(e,r,t){"use strict";function n(e,r){var t,n,s,o;return n=e.bMarks[r]+e.tShift[r],s=e.eMarks[r],t=e.src.charCodeAt(n++),42!==t&&45!==t&&43!==t?-1:s>n&&(o=e.src.charCodeAt(n),!i(o))?-1:n}function s(e,r){var t,n=e.bMarks[r]+e.tShift[r],s=n,o=e.eMarks[r];if(s+1>=o)return-1;if(t=e.src.charCodeAt(s++),48>t||t>57)return-1;for(;;){if(s>=o)return-1;t=e.src.charCodeAt(s++);{if(!(t>=48&&57>=t)){if(41===t||46===t)break;return-1}if(s-n>=10)return-1}}return o>s&&(t=e.src.charCodeAt(s),!i(t))?-1:s}function o(e,r){var t,n,s=e.level+2;for(t=r+2,n=e.tokens.length-2;n>t;t++)e.tokens[t].level===s&&"paragraph_open"===e.tokens[t].type&&(e.tokens[t+2].hidden=!0,e.tokens[t].hidden=!0,t+=2)}var i=e("../common/utils").isSpace;r.exports=function(e,r,t,a){var c,l,u,p,h,f,d,m,g,_,k,b,v,x,y,C,A,w,q,D,E,S,F,L,z,T,R,M,I=!0;if((k=s(e,r))>=0)w=!0;else{if(!((k=n(e,r))>=0))return!1;w=!1}if(A=e.src.charCodeAt(k-1),a)return!0;for(D=e.tokens.length,w?(_=e.bMarks[r]+e.tShift[r],C=Number(e.src.substr(_,k-_-1)),z=e.push("ordered_list_open","ol",1),1!==C&&(z.attrs=[["start",C]])):z=e.push("bullet_list_open","ul",1),z.map=S=[r,0],z.markup=String.fromCharCode(A),c=r,E=!1,L=e.md.block.ruler.getRules("list");t>c;){for(v=k,x=e.eMarks[c],l=u=e.sCount[c]+k-(e.bMarks[r]+e.tShift[r]);x>v&&(b=e.src.charCodeAt(v),i(b));)9===b?u+=4-u%4:u++,v++;if(q=v,y=q>=x?1:u-l,y>4&&(y=1),p=l+y,z=e.push("list_item_open","li",1),z.markup=String.fromCharCode(A),z.map=F=[r,0],f=e.blkIndent,m=e.tight,h=e.tShift[r],d=e.sCount[r],g=e.parentType,e.blkIndent=p,e.tight=!0,e.parentType="list",e.tShift[r]=q-e.bMarks[r],e.sCount[r]=u,q>=x&&e.isEmpty(r+1)?e.line=Math.min(e.line+2,t):e.md.block.tokenize(e,r,t,!0),(!e.tight||E)&&(I=!1),E=e.line-r>1&&e.isEmpty(e.line-1),e.blkIndent=f,e.tShift[r]=h,e.sCount[r]=d,e.tight=m,e.parentType=g,z=e.push("list_item_close","li",-1),z.markup=String.fromCharCode(A),c=r=e.line,F[1]=c,q=e.bMarks[r],c>=t)break;if(e.isEmpty(c))break;if(e.sCount[c]T;T++)if(L[T](e,c,t,!0)){M=!0;break}if(M)break;if(w){if(k=s(e,c),0>k)break}else if(k=n(e,c),0>k)break;if(A!==e.src.charCodeAt(k-1))break}return z=w?e.push("ordered_list_close","ol",-1):e.push("bullet_list_close","ul",-1),z.markup=String.fromCharCode(A),S[1]=c,e.line=c,I&&o(e,D),!0}},{"../common/utils":4}],26:[function(e,r,t){"use strict";r.exports=function(e,r){for(var t,n,s,o,i,a=r+1,c=e.md.block.ruler.getRules("paragraph"),l=e.lineMax;l>a&&!e.isEmpty(a);a++)if(!(e.sCount[a]-e.blkIndent>3||e.sCount[a]<0)){for(n=!1,s=0,o=c.length;o>s;s++)if(c[s](e,a,l,!0)){n=!0;break}if(n)break}return t=e.getLines(r,a,e.blkIndent,!1).trim(),e.line=a,i=e.push("paragraph_open","p",1),i.map=[r,e.line],i=e.push("inline","",0),i.content=t,i.map=[r,e.line],i.children=[],i=e.push("paragraph_close","p",-1),!0}},{}],27:[function(e,r,t){"use strict";var n=e("../helpers/parse_link_destination"),s=e("../helpers/parse_link_title"),o=e("../common/utils").normalizeReference,i=e("../common/utils").isSpace;r.exports=function(e,r,t,a){var c,l,u,p,h,f,d,m,g,_,k,b,v,x,y,C=0,A=e.bMarks[r]+e.tShift[r],w=e.eMarks[r],q=r+1;if(91!==e.src.charCodeAt(A))return!1;for(;++Aq&&!e.isEmpty(q);q++)if(!(e.sCount[q]-e.blkIndent>3||e.sCount[q]<0)){for(v=!1,f=0,d=x.length;d>f;f++)if(x[f](e,q,p,!0)){v=!0;break}if(v)break}for(b=e.getLines(r,q,e.blkIndent,!1).trim(),w=b.length,A=1;w>A;A++){if(c=b.charCodeAt(A),91===c)return!1;if(93===c){g=A;break}10===c?C++:92===c&&(A++,w>A&&10===b.charCodeAt(A)&&C++)}if(0>g||58!==b.charCodeAt(g+1))return!1;for(A=g+2;w>A;A++)if(c=b.charCodeAt(A),10===c)C++;else if(!i(c))break;if(_=n(b,A,w),!_.ok)return!1;if(h=e.md.normalizeLink(_.str),!e.md.validateLink(h))return!1;for(A=_.pos,C+=_.lines,l=A,u=C,k=A;w>A;A++)if(c=b.charCodeAt(A),10===c)C++;else if(!i(c))break;for(_=s(b,A,w),w>A&&k!==A&&_.ok?(y=_.str,A=_.pos,C+=_.lines):(y="",A=l,C=u);w>A&&(c=b.charCodeAt(A),i(c));)A++;if(w>A&&10!==b.charCodeAt(A)&&y)for(y="",A=l,C=u;w>A&&(c=b.charCodeAt(A),i(c));)A++;return w>A&&10!==b.charCodeAt(A)?!1:(m=o(b.slice(1,g)))?a?!0:("undefined"==typeof e.env.references&&(e.env.references={}),"undefined"==typeof e.env.references[m]&&(e.env.references[m]={title:y,href:h}),e.line=r+C+1,!0):!1}},{"../common/utils":4,"../helpers/parse_link_destination":6,"../helpers/parse_link_title":8}],28:[function(e,r,t){"use strict";function n(e,r,t,n){var s,i,a,c,l,u,p,h;for(this.src=e,this.md=r,this.env=t,this.tokens=n,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.parentType="root",this.ddIndent=-1,this.level=0,this.result="",i=this.src,h=!1,a=c=u=p=0,l=i.length;l>c;c++){if(s=i.charCodeAt(c),!h){if(o(s)){u++,9===s?p+=4-p%4:p++;continue}h=!0}(10===s||c===l-1)&&(10!==s&&c++,this.bMarks.push(a),this.eMarks.push(c),this.tShift.push(u),this.sCount.push(p),h=!1,u=0,p=0,a=c+1)}this.bMarks.push(i.length),this.eMarks.push(i.length),this.tShift.push(0),this.sCount.push(0),this.lineMax=this.bMarks.length-1}var s=e("../token"),o=e("../common/utils").isSpace;n.prototype.push=function(e,r,t){var n=new s(e,r,t);return n.block=!0,0>t&&this.level--,n.level=this.level,t>0&&this.level++,this.tokens.push(n),n},n.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},n.prototype.skipEmptyLines=function(e){for(var r=this.lineMax;r>e&&!(this.bMarks[e]+this.tShift[e]e&&(r=this.src.charCodeAt(e),o(r));e++);return e},n.prototype.skipSpacesBack=function(e,r){if(r>=e)return e;for(;e>r;)if(!o(this.src.charCodeAt(--e)))return e+1;return e},n.prototype.skipChars=function(e,r){for(var t=this.src.length;t>e&&this.src.charCodeAt(e)===r;e++);return e},n.prototype.skipCharsBack=function(e,r,t){if(t>=e)return e;for(;e>t;)if(r!==this.src.charCodeAt(--e))return e+1;return e},n.prototype.getLines=function(e,r,t,n){var s,i,a,c,l,u,p,h=e;if(e>=r)return"";for(u=new Array(r-e),s=0;r>h;h++,s++){for(i=0,p=c=this.bMarks[h],l=r>h+1||n?this.eMarks[h]+1:this.eMarks[h];l>c&&t>i;){if(a=this.src.charCodeAt(c),o(a))9===a?i+=4-i%4:i++;else{if(!(c-pn;)96===r&&o%2===0?(a=!a,c=n):124!==r||o%2!==0||a?92===r?o++:o=0:(t.push(e.substring(i,n)),i=n+1),n++,n===s&&a&&(a=!1,n=c+1),r=e.charCodeAt(n);return t.push(e.substring(i)),t}r.exports=function(e,r,t,o){var i,a,c,l,u,p,h,f,d,m,g,_;if(r+2>t)return!1;if(u=r+1,e.sCount[u]=e.eMarks[u])return!1;if(i=e.src.charCodeAt(c),124!==i&&45!==i&&58!==i)return!1;if(a=n(e,r+1),!/^[-:| ]+$/.test(a))return!1;for(p=a.split("|"),d=[],l=0;ld.length)return!1;if(o)return!0;for(f=e.push("table_open","table",1),f.map=g=[r,0],f=e.push("thead_open","thead",1),f.map=[r,r+1],f=e.push("tr_open","tr",1),f.map=[r,r+1],l=0;lu&&!(e.sCount[u]l;l++)f=e.push("td_open","td",1),d[l]&&(f.attrs=[["style","text-align:"+d[l]]]),f=e.push("inline","",0),f.content=p[l]?p[l].trim():"",f.children=[],f=e.push("td_close","td",-1);f=e.push("tr_close","tr",-1)}return f=e.push("tbody_close","tbody",-1),f=e.push("table_close","table",-1),g[1]=_[1]=u,e.line=u,!0}},{}],30:[function(e,r,t){"use strict";r.exports=function(e){var r;e.inlineMode?(r=new e.Token("inline","",0),r.content=e.src,r.map=[0,1],r.children=[],e.tokens.push(r)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}},{}],31:[function(e,r,t){"use strict";r.exports=function(e){var r,t,n,s=e.tokens;for(t=0,n=s.length;n>t;t++)r=s[t],"inline"===r.type&&e.md.inline.parse(r.content,e.md,e.env,r.children)}},{}],32:[function(e,r,t){"use strict";function n(e){return/^\s]/i.test(e)}function s(e){return/^<\/a\s*>/i.test(e)}var o=e("../common/utils").arrayReplaceAt;r.exports=function(e){var r,t,i,a,c,l,u,p,h,f,d,m,g,_,k,b,v,x=e.tokens;if(e.md.options.linkify)for(t=0,i=x.length;i>t;t++)if("inline"===x[t].type&&e.md.linkify.pretest(x[t].content))for(a=x[t].children,g=0,r=a.length-1;r>=0;r--)if(l=a[r],"link_close"!==l.type){if("html_inline"===l.type&&(n(l.content)&&g>0&&g--,s(l.content)&&g++),!(g>0)&&"text"===l.type&&e.md.linkify.test(l.content)){for(h=l.content,v=e.md.linkify.match(h),u=[],m=l.level,d=0,p=0;pd&&(c=new e.Token("text","",0),c.content=h.slice(d,f),c.level=m,u.push(c)),c=new e.Token("link_open","a",1),c.attrs=[["href",k]],c.level=m++,c.markup="linkify",c.info="auto",u.push(c),c=new e.Token("text","",0),c.content=b,c.level=m,u.push(c),c=new e.Token("link_close","a",-1),c.level=--m,c.markup="linkify",c.info="auto",u.push(c),d=v[p].lastIndex);d=0;r--)t=e[r],"text"===t.type&&(t.content=t.content.replace(c,n))}function o(e){var r,t;for(r=e.length-1;r>=0;r--)t=e[r],"text"===t.type&&i.test(t.content)&&(t.content=t.content.replace(/\+-/g,"\xb1").replace(/\.{2,}/g,"\u2026").replace(/([?!])\u2026/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---([^-]|$)/gm,"$1\u2014$2").replace(/(^|\s)--(\s|$)/gm,"$1\u2013$2").replace(/(^|[^-\s])--([^-\s]|$)/gm,"$1\u2013$2"))}var i=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,a=/\((c|tm|r|p)\)/i,c=/\((c|tm|r|p)\)/gi,l={c:"\xa9",r:"\xae",p:"\xa7",tm:"\u2122"};r.exports=function(e){var r;if(e.md.options.typographer)for(r=e.tokens.length-1;r>=0;r--)"inline"===e.tokens[r].type&&(a.test(e.tokens[r].content)&&s(e.tokens[r].children),i.test(e.tokens[r].content)&&o(e.tokens[r].children))}},{}],35:[function(e,r,t){"use strict";function n(e,r,t){return e.substr(0,r)+t+e.substr(r+1)}function s(e,r){var t,s,c,p,h,f,d,m,g,_,k,b,v,x,y,C,A,w,q,D,E;for(q=[],t=0;t=0&&!(q[A].level<=d);A--);if(q.length=A+1,"text"===s.type){c=s.content,h=0,f=c.length;e:for(;f>h&&(l.lastIndex=h,p=l.exec(c));){if(y=C=!0,h=p.index+1,w="'"===p[0],g=32,p.index-1>=0)g=c.charCodeAt(p.index-1);else for(A=t-1;A>=0;A--)if("text"===e[A].type){g=e[A].content.charCodeAt(e[A].content.length-1);break}if(_=32,f>h)_=c.charCodeAt(h);else for(A=t+1;A=48&&57>=g&&(C=y=!1),y&&C&&(y=!1,C=b),y||C){if(C)for(A=q.length-1;A>=0&&(m=q[A],!(q[A].level=0;r--)"inline"===e.tokens[r].type&&c.test(e.tokens[r].content)&&s(e.tokens[r].children,e)}},{"../common/utils":4}],36:[function(e,r,t){"use strict";function n(e,r,t){this.src=e,this.env=t,this.tokens=[],this.inlineMode=!1,this.md=r}var s=e("../token");n.prototype.Token=s,r.exports=n},{"../token":51}],37:[function(e,r,t){"use strict";var n=/^<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/,s=/^<([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)>/;r.exports=function(e,r){var t,o,i,a,c,l,u=e.pos;return 60!==e.src.charCodeAt(u)?!1:(t=e.src.slice(u),t.indexOf(">")<0?!1:s.test(t)?(o=t.match(s),a=o[0].slice(1,-1),c=e.md.normalizeLink(a),e.md.validateLink(c)?(r||(l=e.push("link_open","a",1),l.attrs=[["href",c]],l.markup="autolink",l.info="auto",l=e.push("text","",0),l.content=e.md.normalizeLinkText(a),l=e.push("link_close","a",-1),l.markup="autolink",l.info="auto"),e.pos+=o[0].length,!0):!1):n.test(t)?(i=t.match(n),a=i[0].slice(1,-1),c=e.md.normalizeLink("mailto:"+a),e.md.validateLink(c)?(r||(l=e.push("link_open","a",1),l.attrs=[["href",c]],l.markup="autolink",l.info="auto",l=e.push("text","",0),l.content=e.md.normalizeLinkText(a),l=e.push("link_close","a",-1),l.markup="autolink",l.info="auto"),e.pos+=i[0].length,!0):!1):!1)}},{}],38:[function(e,r,t){"use strict";r.exports=function(e,r){var t,n,s,o,i,a,c=e.pos,l=e.src.charCodeAt(c);if(96!==l)return!1;for(t=c,c++,n=e.posMax;n>c&&96===e.src.charCodeAt(c);)c++;for(s=e.src.slice(t,c),o=i=c;-1!==(o=e.src.indexOf("`",i));){for(i=o+1;n>i&&96===e.src.charCodeAt(i);)i++;if(i-o===s.length)return r||(a=e.push("code_inline","code",0),a.markup=s,a.content=e.src.slice(c,o).replace(/[ \n]+/g," ").trim()),e.pos=i,!0}return r||(e.pending+=s),e.pos+=s.length,!0}},{}],39:[function(e,r,t){"use strict";r.exports=function(e){var r,t,n,s,o=e.delimiters,i=e.delimiters.length;for(r=0;i>r;r++)if(n=o[r],n.close)for(t=r-n.jump-1;t>=0;){if(s=o[t],s.open&&s.marker===n.marker&&s.end<0&&s.level===n.level){n.jump=r-t,n.open=!1,s.end=r,s.jump=0;break}t-=s.jump+1}}},{}],40:[function(e,r,t){"use strict";r.exports.tokenize=function(e,r){var t,n,s,o=e.pos,i=e.src.charCodeAt(o);if(r)return!1;if(95!==i&&42!==i)return!1;for(n=e.scanDelims(e.pos,42===i),t=0;tr;r++)t=a[r],(95===t.marker||42===t.marker)&&-1!==t.end&&(n=a[t.end],i=c>r+1&&a[r+1].end===t.end-1&&a[r+1].token===t.token+1&&a[t.end-1].token===n.token-1&&a[r+1].marker===t.marker,o=String.fromCharCode(t.marker),s=e.tokens[t.token],s.type=i?"strong_open":"em_open",s.tag=i?"strong":"em",s.nesting=1,s.markup=i?o+o:o,s.content="",s=e.tokens[n.token],s.type=i?"strong_close":"em_close",s.tag=i?"strong":"em",s.nesting=-1,s.markup=i?o+o:o,s.content="",i&&(e.tokens[a[r+1].token].content="",e.tokens[a[t.end-1].token].content="",r++))}},{}],41:[function(e,r,t){"use strict";var n=e("../common/entities"),s=e("../common/utils").has,o=e("../common/utils").isValidEntityCode,i=e("../common/utils").fromCodePoint,a=/^&#((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i,c=/^&([a-z][a-z0-9]{1,31});/i;r.exports=function(e,r){var t,l,u,p=e.pos,h=e.posMax;if(38!==e.src.charCodeAt(p))return!1;if(h>p+1)if(t=e.src.charCodeAt(p+1),35===t){if(u=e.src.slice(p).match(a))return r||(l="x"===u[1][0].toLowerCase()?parseInt(u[1].slice(1),16):parseInt(u[1],10),e.pending+=i(o(l)?l:65533)),e.pos+=u[0].length,!0}else if(u=e.src.slice(p).match(c),u&&s(n,u[1]))return r||(e.pending+=n[u[1]]),e.pos+=u[0].length,!0;return r||(e.pending+="&"),e.pos++,!0}},{"../common/entities":1,"../common/utils":4}],42:[function(e,r,t){"use strict";for(var n=e("../common/utils").isSpace,s=[],o=0;256>o;o++)s.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){s[e.charCodeAt(0)]=1}),r.exports=function(e,r){var t,o=e.pos,i=e.posMax;if(92!==e.src.charCodeAt(o))return!1;if(o++,i>o){if(t=e.src.charCodeAt(o),256>t&&0!==s[t])return r||(e.pending+=e.src[o]),e.pos+=2,!0;if(10===t){for(r||e.push("hardbreak","br",0),o++;i>o&&(t=e.src.charCodeAt(o),n(t));)o++;return e.pos=o,!0}}return r||(e.pending+="\\"),e.pos++,!0}},{"../common/utils":4}],43:[function(e,r,t){"use strict";function n(e){var r=32|e;return r>=97&&122>=r}var s=e("../common/html_re").HTML_TAG_RE;r.exports=function(e,r){var t,o,i,a,c=e.pos;return e.md.options.html?(i=e.posMax,60!==e.src.charCodeAt(c)||c+2>=i?!1:(t=e.src.charCodeAt(c+1),(33===t||63===t||47===t||n(t))&&(o=e.src.slice(c).match(s))?(r||(a=e.push("html_inline","",0),a.content=e.src.slice(c,c+o[0].length)),e.pos+=o[0].length,!0):!1)):!1}},{"../common/html_re":3}],44:[function(e,r,t){"use strict";var n=e("../helpers/parse_link_label"),s=e("../helpers/parse_link_destination"),o=e("../helpers/parse_link_title"),i=e("../common/utils").normalizeReference,a=e("../common/utils").isSpace;r.exports=function(e,r){var t,c,l,u,p,h,f,d,m,g,_,k,b,v="",x=e.pos,y=e.posMax;if(33!==e.src.charCodeAt(e.pos))return!1;if(91!==e.src.charCodeAt(e.pos+1))return!1;if(h=e.pos+2,p=n(e,e.pos+1,!1),0>p)return!1;if(f=p+1,y>f&&40===e.src.charCodeAt(f)){for(f++;y>f&&(c=e.src.charCodeAt(f),a(c)||10===c);f++);if(f>=y)return!1;for(b=f,m=s(e.src,f,e.posMax),m.ok&&(v=e.md.normalizeLink(m.str),e.md.validateLink(v)?f=m.pos:v=""),b=f;y>f&&(c=e.src.charCodeAt(f),a(c)||10===c);f++);if(m=o(e.src,f,e.posMax),y>f&&b!==f&&m.ok)for(g=m.str,f=m.pos;y>f&&(c=e.src.charCodeAt(f),a(c)||10===c);f++);else g="";if(f>=y||41!==e.src.charCodeAt(f))return e.pos=x,!1;f++}else{if("undefined"==typeof e.env.references)return!1;if(y>f&&91===e.src.charCodeAt(f)?(b=f+1,f=n(e,f),f>=0?u=e.src.slice(b,f++):f=p+1):f=p+1,u||(u=e.src.slice(h,p)),d=e.env.references[i(u)],!d)return e.pos=x,!1;v=d.href,g=d.title}return r||(l=e.src.slice(h,p),e.md.inline.parse(l,e.md,e.env,k=[]),_=e.push("image","img",0),_.attrs=t=[["src",v],["alt",""]],_.children=k,_.content=l,g&&t.push(["title",g])),e.pos=f,e.posMax=y,!0}},{"../common/utils":4,"../helpers/parse_link_destination":6,"../helpers/parse_link_label":7,"../helpers/parse_link_title":8}],45:[function(e,r,t){"use strict";var n=e("../helpers/parse_link_label"),s=e("../helpers/parse_link_destination"),o=e("../helpers/parse_link_title"),i=e("../common/utils").normalizeReference,a=e("../common/utils").isSpace;r.exports=function(e,r){var t,c,l,u,p,h,f,d,m,g,_="",k=e.pos,b=e.posMax,v=e.pos;if(91!==e.src.charCodeAt(e.pos))return!1;if(p=e.pos+1,u=n(e,e.pos,!0),0>u)return!1;if(h=u+1,b>h&&40===e.src.charCodeAt(h)){for(h++;b>h&&(c=e.src.charCodeAt(h),a(c)||10===c);h++);if(h>=b)return!1;for(v=h,f=s(e.src,h,e.posMax),f.ok&&(_=e.md.normalizeLink(f.str),e.md.validateLink(_)?h=f.pos:_=""),v=h;b>h&&(c=e.src.charCodeAt(h),a(c)||10===c);h++);if(f=o(e.src,h,e.posMax),b>h&&v!==h&&f.ok)for(m=f.str,h=f.pos;b>h&&(c=e.src.charCodeAt(h),a(c)||10===c);h++);else m="";if(h>=b||41!==e.src.charCodeAt(h))return e.pos=k,!1;h++}else{if("undefined"==typeof e.env.references)return!1;if(b>h&&91===e.src.charCodeAt(h)?(v=h+1,h=n(e,h),h>=0?l=e.src.slice(v,h++):h=u+1):h=u+1,l||(l=e.src.slice(p,u)),d=e.env.references[i(l)],!d)return e.pos=k,!1;_=d.href,m=d.title}return r||(e.pos=p,e.posMax=u,g=e.push("link_open","a",1),g.attrs=t=[["href",_]],m&&t.push(["title",m]),e.md.inline.tokenize(e),g=e.push("link_close","a",-1)),e.pos=h,e.posMax=b,!0}},{"../common/utils":4,"../helpers/parse_link_destination":6,"../helpers/parse_link_label":7,"../helpers/parse_link_title":8}],46:[function(e,r,t){"use strict";r.exports=function(e,r){var t,n,s=e.pos;if(10!==e.src.charCodeAt(s))return!1;for(t=e.pending.length-1,n=e.posMax,r||(t>=0&&32===e.pending.charCodeAt(t)?t>=1&&32===e.pending.charCodeAt(t-1)?(e.pending=e.pending.replace(/ +$/,""),e.push("hardbreak","br",0)):(e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0)):e.push("softbreak","br",0)),s++;n>s&&32===e.src.charCodeAt(s);)s++;return e.pos=s,!0}},{}],47:[function(e,r,t){"use strict";function n(e,r,t,n){this.src=e,this.env=t,this.md=r,this.tokens=n,this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[]}var s=e("../token"),o=e("../common/utils").isWhiteSpace,i=e("../common/utils").isPunctChar,a=e("../common/utils").isMdAsciiPunct;n.prototype.pushPending=function(){var e=new s("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},n.prototype.push=function(e,r,t){this.pending&&this.pushPending();var n=new s(e,r,t);return 0>t&&this.level--,n.level=this.level,t>0&&this.level++,this.pendingLevel=this.level,this.tokens.push(n),n},n.prototype.scanDelims=function(e,r){var t,n,s,c,l,u,p,h,f,d=e,m=!0,g=!0,_=this.posMax,k=this.src.charCodeAt(e);for(t=e>0?this.src.charCodeAt(e-1):32;_>d&&this.src.charCodeAt(d)===k;)d++;return s=d-e,n=_>d?this.src.charCodeAt(d):32,p=a(t)||i(String.fromCharCode(t)),f=a(n)||i(String.fromCharCode(n)),u=o(t),h=o(n),h?m=!1:f&&(u||p||(m=!1)),u?g=!1:p&&(h||f||(g=!1)),r?(c=m,l=g):(c=m&&(!g||p),l=g&&(!m||f)),{can_open:c,can_close:l,length:s}},n.prototype.Token=s,r.exports=n},{"../common/utils":4,"../token":51}],48:[function(e,r,t){"use strict";r.exports.tokenize=function(e,r){var t,n,s,o,i,a=e.pos,c=e.src.charCodeAt(a);if(r)return!1;if(126!==c)return!1;if(n=e.scanDelims(e.pos,!0),o=n.length,i=String.fromCharCode(c),2>o)return!1;for(o%2&&(s=e.push("text","",0),s.content=i,o--),t=0;o>t;t+=2)s=e.push("text","",0),s.content=i+i,e.delimiters.push({marker:c,jump:t,token:e.tokens.length-1,level:e.level,end:-1,open:n.can_open,close:n.can_close});return e.pos+=n.length,!0},r.exports.postProcess=function(e){var r,t,n,s,o,i=[],a=e.delimiters,c=e.delimiters.length;for(r=0;c>r;r++)n=a[r],126===n.marker&&-1!==n.end&&(s=a[n.end],o=e.tokens[n.token],o.type="s_open",o.tag="s",o.nesting=1,o.markup="~~",o.content="",o=e.tokens[s.token],o.type="s_close",o.tag="s",o.nesting=-1,o.markup="~~",o.content="","text"===e.tokens[s.token-1].type&&"~"===e.tokens[s.token-1].content&&i.push(s.token-1));for(;i.length;){for(r=i.pop(),t=r+1;tr;r++)n+=s[r].nesting,s[r].level=n,"text"===s[r].type&&o>r+1&&"text"===s[r+1].type?s[r+1].content=s[r].content+s[r+1].content:(r!==t&&(s[t]=s[r]),t++);r!==t&&(s.length=t)}},{}],51:[function(e,r,t){"use strict";function n(e,r,t){this.type=e,this.tag=r,this.attrs=null,this.map=null,this.nesting=t,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}n.prototype.attrIndex=function(e){var r,t,n;if(!this.attrs)return-1;for(r=this.attrs,t=0,n=r.length;n>t;t++)if(r[t][0]===e)return t;return-1},n.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]},n.prototype.attrSet=function(e,r){var t=this.attrIndex(e),n=[e,r];0>t?this.attrPush(n):this.attrs[t]=n},n.prototype.attrJoin=function(e,r){var t=this.attrIndex(e);0>t?this.attrPush([e,r]):this.attrs[t][1]=this.attrs[t][1]+" "+r},r.exports=n},{}],52:[function(r,t,n){(function(r){!function(s){function o(e){throw new RangeError(R[e])}function i(e,r){for(var t=e.length,n=[];t--;)n[t]=r(e[t]);return n}function a(e,r){var t=e.split("@"),n="";t.length>1&&(n=t[0]+"@",e=t[1]),e=e.replace(T,".");var s=e.split("."),o=i(s,r).join(".");return n+o}function c(e){for(var r,t,n=[],s=0,o=e.length;o>s;)r=e.charCodeAt(s++),r>=55296&&56319>=r&&o>s?(t=e.charCodeAt(s++),56320==(64512&t)?n.push(((1023&r)<<10)+(1023&t)+65536):(n.push(r),s--)):n.push(r);return n}function l(e){return i(e,function(e){var r="";return e>65535&&(e-=65536,r+=B(e>>>10&1023|55296),e=56320|1023&e),r+=B(e)}).join("")}function u(e){return 10>e-48?e-22:26>e-65?e-65:26>e-97?e-97:C}function p(e,r){return e+22+75*(26>e)-((0!=r)<<5)}function h(e,r,t){var n=0;for(e=t?I(e/D):e>>1,e+=I(e/r);e>M*w>>1;n+=C)e=I(e/M);return I(n+(M+1)*e/(e+q))}function f(e){var r,t,n,s,i,a,c,p,f,d,m=[],g=e.length,_=0,k=S,b=E;for(t=e.lastIndexOf(F),0>t&&(t=0),n=0;t>n;++n)e.charCodeAt(n)>=128&&o("not-basic"),m.push(e.charCodeAt(n));for(s=t>0?t+1:0;g>s;){for(i=_,a=1,c=C;s>=g&&o("invalid-input"),p=u(e.charCodeAt(s++)),(p>=C||p>I((y-_)/a))&&o("overflow"),_+=p*a,f=b>=c?A:c>=b+w?w:c-b,!(f>p);c+=C)d=C-f,a>I(y/d)&&o("overflow"),a*=d;r=m.length+1,b=h(_-i,r,0==i),I(_/r)>y-k&&o("overflow"),k+=I(_/r),_%=r,m.splice(_++,0,k)}return l(m)}function d(e){var r,t,n,s,i,a,l,u,f,d,m,g,_,k,b,v=[];for(e=c(e),g=e.length,r=S,t=0,i=E,a=0;g>a;++a)m=e[a],128>m&&v.push(B(m));for(n=s=v.length,s&&v.push(F);g>n;){for(l=y,a=0;g>a;++a)m=e[a],m>=r&&l>m&&(l=m);for(_=n+1,l-r>I((y-t)/_)&&o("overflow"),t+=(l-r)*_,r=l,a=0;g>a;++a)if(m=e[a],r>m&&++t>y&&o("overflow"),m==r){for(u=t,f=C;d=i>=f?A:f>=i+w?w:f-i,!(d>u);f+=C)b=u-d,k=C-d,v.push(B(p(d+b%k,0))),u=I(b/k);v.push(B(p(u,0))),i=h(t,_,n==s),t=0,++n}++t,++r}return v.join("")}function m(e){return a(e,function(e){return L.test(e)?f(e.slice(4).toLowerCase()):e})}function g(e){return a(e,function(e){return z.test(e)?"xn--"+d(e):e})}var _="object"==typeof n&&n&&!n.nodeType&&n,k="object"==typeof t&&t&&!t.nodeType&&t,b="object"==typeof r&&r;(b.global===b||b.window===b||b.self===b)&&(s=b);var v,x,y=2147483647,C=36,A=1,w=26,q=38,D=700,E=72,S=128,F="-",L=/^xn--/,z=/[^\x20-\x7E]/,T=/[\x2E\u3002\uFF0E\uFF61]/g,R={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},M=C-A,I=Math.floor,B=String.fromCharCode;if(v={version:"1.3.2",ucs2:{decode:c,encode:l},decode:f,encode:d,toASCII:g,toUnicode:m},"function"==typeof e&&"object"==typeof e.amd&&e.amd)e("punycode",function(){return v});else if(_&&k)if(t.exports==_)k.exports=v;else for(x in v)v.hasOwnProperty(x)&&(_[x]=v[x]);else s.punycode=v}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],53:[function(e,r,t){r.exports={Aacute:"\xc1",aacute:"\xe1",Abreve:"\u0102",abreve:"\u0103",ac:"\u223e",acd:"\u223f",acE:"\u223e\u0333",Acirc:"\xc2",acirc:"\xe2",acute:"\xb4",Acy:"\u0410",acy:"\u0430",AElig:"\xc6",aelig:"\xe6",af:"\u2061",Afr:"\ud835\udd04",afr:"\ud835\udd1e",Agrave:"\xc0",agrave:"\xe0",alefsym:"\u2135",aleph:"\u2135",Alpha:"\u0391",alpha:"\u03b1",Amacr:"\u0100",amacr:"\u0101",amalg:"\u2a3f",amp:"&",AMP:"&",andand:"\u2a55",And:"\u2a53",and:"\u2227",andd:"\u2a5c",andslope:"\u2a58",andv:"\u2a5a",ang:"\u2220",ange:"\u29a4",angle:"\u2220",angmsdaa:"\u29a8",angmsdab:"\u29a9",angmsdac:"\u29aa",angmsdad:"\u29ab",angmsdae:"\u29ac",angmsdaf:"\u29ad",angmsdag:"\u29ae",angmsdah:"\u29af",angmsd:"\u2221",angrt:"\u221f",angrtvb:"\u22be",angrtvbd:"\u299d",angsph:"\u2222",angst:"\xc5",angzarr:"\u237c",Aogon:"\u0104",aogon:"\u0105",Aopf:"\ud835\udd38",aopf:"\ud835\udd52",apacir:"\u2a6f",ap:"\u2248",apE:"\u2a70",ape:"\u224a",apid:"\u224b",apos:"'",ApplyFunction:"\u2061",approx:"\u2248",approxeq:"\u224a",Aring:"\xc5",aring:"\xe5",Ascr:"\ud835\udc9c",ascr:"\ud835\udcb6",Assign:"\u2254",ast:"*",asymp:"\u2248",asympeq:"\u224d",Atilde:"\xc3",atilde:"\xe3",Auml:"\xc4",auml:"\xe4",awconint:"\u2233",awint:"\u2a11",backcong:"\u224c",backepsilon:"\u03f6",backprime:"\u2035",backsim:"\u223d",backsimeq:"\u22cd",Backslash:"\u2216",Barv:"\u2ae7",barvee:"\u22bd",barwed:"\u2305",Barwed:"\u2306",barwedge:"\u2305",bbrk:"\u23b5",bbrktbrk:"\u23b6",bcong:"\u224c",Bcy:"\u0411",bcy:"\u0431",bdquo:"\u201e",becaus:"\u2235",because:"\u2235",Because:"\u2235",bemptyv:"\u29b0",bepsi:"\u03f6",bernou:"\u212c",Bernoullis:"\u212c",Beta:"\u0392",beta:"\u03b2",beth:"\u2136",between:"\u226c",Bfr:"\ud835\udd05",bfr:"\ud835\udd1f",bigcap:"\u22c2",bigcirc:"\u25ef",bigcup:"\u22c3",bigodot:"\u2a00",bigoplus:"\u2a01",bigotimes:"\u2a02",bigsqcup:"\u2a06",bigstar:"\u2605",bigtriangledown:"\u25bd",bigtriangleup:"\u25b3",biguplus:"\u2a04",bigvee:"\u22c1",bigwedge:"\u22c0",bkarow:"\u290d",blacklozenge:"\u29eb",blacksquare:"\u25aa",blacktriangle:"\u25b4",blacktriangledown:"\u25be",blacktriangleleft:"\u25c2",blacktriangleright:"\u25b8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20e5",bnequiv:"\u2261\u20e5",bNot:"\u2aed",bnot:"\u2310",Bopf:"\ud835\udd39",bopf:"\ud835\udd53",bot:"\u22a5",bottom:"\u22a5",bowtie:"\u22c8",boxbox:"\u29c9",boxdl:"\u2510",boxdL:"\u2555",boxDl:"\u2556",boxDL:"\u2557",boxdr:"\u250c",boxdR:"\u2552",boxDr:"\u2553",boxDR:"\u2554",boxh:"\u2500",boxH:"\u2550",boxhd:"\u252c",boxHd:"\u2564",boxhD:"\u2565",boxHD:"\u2566",boxhu:"\u2534",boxHu:"\u2567",boxhU:"\u2568",boxHU:"\u2569",boxminus:"\u229f",boxplus:"\u229e",boxtimes:"\u22a0",boxul:"\u2518",boxuL:"\u255b",boxUl:"\u255c",boxUL:"\u255d",boxur:"\u2514",boxuR:"\u2558",boxUr:"\u2559",boxUR:"\u255a",boxv:"\u2502",boxV:"\u2551",boxvh:"\u253c",boxvH:"\u256a",boxVh:"\u256b",boxVH:"\u256c",boxvl:"\u2524",boxvL:"\u2561",boxVl:"\u2562",boxVL:"\u2563",boxvr:"\u251c",boxvR:"\u255e",boxVr:"\u255f",boxVR:"\u2560",bprime:"\u2035",breve:"\u02d8",Breve:"\u02d8",brvbar:"\xa6",bscr:"\ud835\udcb7",Bscr:"\u212c",bsemi:"\u204f",bsim:"\u223d",bsime:"\u22cd",bsolb:"\u29c5",bsol:"\\",bsolhsub:"\u27c8",bull:"\u2022",bullet:"\u2022",bump:"\u224e",bumpE:"\u2aae",bumpe:"\u224f",Bumpeq:"\u224e",bumpeq:"\u224f",Cacute:"\u0106",cacute:"\u0107",capand:"\u2a44",capbrcup:"\u2a49",capcap:"\u2a4b",cap:"\u2229",Cap:"\u22d2",capcup:"\u2a47",capdot:"\u2a40",CapitalDifferentialD:"\u2145",caps:"\u2229\ufe00",caret:"\u2041",caron:"\u02c7",Cayleys:"\u212d",ccaps:"\u2a4d",Ccaron:"\u010c",ccaron:"\u010d",Ccedil:"\xc7",ccedil:"\xe7",Ccirc:"\u0108",ccirc:"\u0109",Cconint:"\u2230",ccups:"\u2a4c",ccupssm:"\u2a50",Cdot:"\u010a",cdot:"\u010b",cedil:"\xb8",Cedilla:"\xb8",cemptyv:"\u29b2",cent:"\xa2",centerdot:"\xb7",CenterDot:"\xb7",cfr:"\ud835\udd20",Cfr:"\u212d",CHcy:"\u0427",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",Chi:"\u03a7",chi:"\u03c7",circ:"\u02c6",circeq:"\u2257",circlearrowleft:"\u21ba",circlearrowright:"\u21bb",circledast:"\u229b",circledcirc:"\u229a",circleddash:"\u229d",CircleDot:"\u2299",circledR:"\xae",circledS:"\u24c8",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",cir:"\u25cb",cirE:"\u29c3",cire:"\u2257",cirfnint:"\u2a10",cirmid:"\u2aef",cirscir:"\u29c2",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201d",CloseCurlyQuote:"\u2019",clubs:"\u2663",clubsuit:"\u2663",colon:":",Colon:"\u2237",Colone:"\u2a74",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2a6d",Congruent:"\u2261",conint:"\u222e",Conint:"\u222f",ContourIntegral:"\u222e",copf:"\ud835\udd54",Copf:"\u2102",coprod:"\u2210",Coproduct:"\u2210",copy:"\xa9",COPY:"\xa9",copysr:"\u2117",CounterClockwiseContourIntegral:"\u2233",crarr:"\u21b5",cross:"\u2717",Cross:"\u2a2f",Cscr:"\ud835\udc9e",cscr:"\ud835\udcb8",csub:"\u2acf",csube:"\u2ad1",csup:"\u2ad0",csupe:"\u2ad2",ctdot:"\u22ef",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22de",cuesc:"\u22df",cularr:"\u21b6",cularrp:"\u293d",cupbrcap:"\u2a48",cupcap:"\u2a46",CupCap:"\u224d",cup:"\u222a",Cup:"\u22d3",cupcup:"\u2a4a",cupdot:"\u228d",cupor:"\u2a45",cups:"\u222a\ufe00",curarr:"\u21b7",curarrm:"\u293c",curlyeqprec:"\u22de",curlyeqsucc:"\u22df",curlyvee:"\u22ce",curlywedge:"\u22cf",curren:"\xa4",curvearrowleft:"\u21b6",curvearrowright:"\u21b7",cuvee:"\u22ce",cuwed:"\u22cf",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232d",dagger:"\u2020",Dagger:"\u2021",daleth:"\u2138",darr:"\u2193",Darr:"\u21a1",dArr:"\u21d3",dash:"\u2010",Dashv:"\u2ae4",dashv:"\u22a3",dbkarow:"\u290f",dblac:"\u02dd",Dcaron:"\u010e",dcaron:"\u010f",Dcy:"\u0414",dcy:"\u0434",ddagger:"\u2021",ddarr:"\u21ca",DD:"\u2145",dd:"\u2146",DDotrahd:"\u2911",ddotseq:"\u2a77",deg:"\xb0",Del:"\u2207",Delta:"\u0394",delta:"\u03b4",demptyv:"\u29b1",dfisht:"\u297f",Dfr:"\ud835\udd07",dfr:"\ud835\udd21",dHar:"\u2965",dharl:"\u21c3",dharr:"\u21c2",DiacriticalAcute:"\xb4",DiacriticalDot:"\u02d9",DiacriticalDoubleAcute:"\u02dd",DiacriticalGrave:"`",DiacriticalTilde:"\u02dc",diam:"\u22c4",diamond:"\u22c4",Diamond:"\u22c4",diamondsuit:"\u2666",diams:"\u2666",die:"\xa8",DifferentialD:"\u2146",digamma:"\u03dd",disin:"\u22f2",div:"\xf7",divide:"\xf7",divideontimes:"\u22c7",divonx:"\u22c7",DJcy:"\u0402",djcy:"\u0452",dlcorn:"\u231e",dlcrop:"\u230d",dollar:"$",Dopf:"\ud835\udd3b",dopf:"\ud835\udd55",Dot:"\xa8",dot:"\u02d9",DotDot:"\u20dc",doteq:"\u2250",doteqdot:"\u2251",DotEqual:"\u2250",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22a1",doublebarwedge:"\u2306",DoubleContourIntegral:"\u222f",DoubleDot:"\xa8",DoubleDownArrow:"\u21d3",DoubleLeftArrow:"\u21d0",DoubleLeftRightArrow:"\u21d4",DoubleLeftTee:"\u2ae4",DoubleLongLeftArrow:"\u27f8",DoubleLongLeftRightArrow:"\u27fa",DoubleLongRightArrow:"\u27f9",DoubleRightArrow:"\u21d2",DoubleRightTee:"\u22a8",DoubleUpArrow:"\u21d1",DoubleUpDownArrow:"\u21d5",DoubleVerticalBar:"\u2225",DownArrowBar:"\u2913",downarrow:"\u2193",DownArrow:"\u2193",Downarrow:"\u21d3",DownArrowUpArrow:"\u21f5",DownBreve:"\u0311",downdownarrows:"\u21ca",downharpoonleft:"\u21c3",downharpoonright:"\u21c2",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295e",DownLeftVectorBar:"\u2956",DownLeftVector:"\u21bd",DownRightTeeVector:"\u295f",DownRightVectorBar:"\u2957",DownRightVector:"\u21c1",DownTeeArrow:"\u21a7",DownTee:"\u22a4",drbkarow:"\u2910",drcorn:"\u231f",drcrop:"\u230c",Dscr:"\ud835\udc9f",dscr:"\ud835\udcb9",DScy:"\u0405",dscy:"\u0455",dsol:"\u29f6",Dstrok:"\u0110",dstrok:"\u0111",dtdot:"\u22f1",dtri:"\u25bf",dtrif:"\u25be",duarr:"\u21f5",duhar:"\u296f",dwangle:"\u29a6",DZcy:"\u040f",dzcy:"\u045f",dzigrarr:"\u27ff",Eacute:"\xc9",eacute:"\xe9",easter:"\u2a6e",Ecaron:"\u011a",ecaron:"\u011b",Ecirc:"\xca",ecirc:"\xea",ecir:"\u2256",ecolon:"\u2255",Ecy:"\u042d",ecy:"\u044d",eDDot:"\u2a77",Edot:"\u0116",edot:"\u0117",eDot:"\u2251",ee:"\u2147",efDot:"\u2252",Efr:"\ud835\udd08",efr:"\ud835\udd22",eg:"\u2a9a",Egrave:"\xc8",egrave:"\xe8",egs:"\u2a96",egsdot:"\u2a98",el:"\u2a99",Element:"\u2208",elinters:"\u23e7",ell:"\u2113",els:"\u2a95",elsdot:"\u2a97",Emacr:"\u0112",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",EmptySmallSquare:"\u25fb",emptyv:"\u2205",EmptyVerySmallSquare:"\u25ab",emsp13:"\u2004",emsp14:"\u2005",emsp:"\u2003",ENG:"\u014a",eng:"\u014b",ensp:"\u2002",Eogon:"\u0118",eogon:"\u0119",Eopf:"\ud835\udd3c",eopf:"\ud835\udd56",epar:"\u22d5",eparsl:"\u29e3",eplus:"\u2a71",epsi:"\u03b5",Epsilon:"\u0395",epsilon:"\u03b5",epsiv:"\u03f5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2a96",eqslantless:"\u2a95",Equal:"\u2a75",equals:"=",EqualTilde:"\u2242",equest:"\u225f",Equilibrium:"\u21cc",equiv:"\u2261",equivDD:"\u2a78",eqvparsl:"\u29e5",erarr:"\u2971",erDot:"\u2253",escr:"\u212f",Escr:"\u2130",esdot:"\u2250",Esim:"\u2a73",esim:"\u2242",Eta:"\u0397",eta:"\u03b7",ETH:"\xd0",eth:"\xf0",Euml:"\xcb",euml:"\xeb",euro:"\u20ac",excl:"!",exist:"\u2203",Exists:"\u2203",expectation:"\u2130",exponentiale:"\u2147",ExponentialE:"\u2147",fallingdotseq:"\u2252",Fcy:"\u0424",fcy:"\u0444",female:"\u2640",ffilig:"\ufb03",fflig:"\ufb00",ffllig:"\ufb04",Ffr:"\ud835\udd09",ffr:"\ud835\udd23",filig:"\ufb01",FilledSmallSquare:"\u25fc",FilledVerySmallSquare:"\u25aa",fjlig:"fj",flat:"\u266d",fllig:"\ufb02",fltns:"\u25b1",fnof:"\u0192",Fopf:"\ud835\udd3d",fopf:"\ud835\udd57",forall:"\u2200",ForAll:"\u2200",fork:"\u22d4",forkv:"\u2ad9",Fouriertrf:"\u2131",fpartint:"\u2a0d",frac12:"\xbd",frac13:"\u2153",frac14:"\xbc",frac15:"\u2155",frac16:"\u2159",frac18:"\u215b",frac23:"\u2154",frac25:"\u2156",frac34:"\xbe",frac35:"\u2157",frac38:"\u215c",frac45:"\u2158",frac56:"\u215a",frac58:"\u215d",frac78:"\u215e",frasl:"\u2044",frown:"\u2322",fscr:"\ud835\udcbb",Fscr:"\u2131",gacute:"\u01f5",Gamma:"\u0393",gamma:"\u03b3",Gammad:"\u03dc",gammad:"\u03dd",gap:"\u2a86",Gbreve:"\u011e",gbreve:"\u011f",Gcedil:"\u0122",Gcirc:"\u011c",gcirc:"\u011d",Gcy:"\u0413",gcy:"\u0433",Gdot:"\u0120",gdot:"\u0121",ge:"\u2265",gE:"\u2267",gEl:"\u2a8c",gel:"\u22db",geq:"\u2265",geqq:"\u2267",geqslant:"\u2a7e",gescc:"\u2aa9",ges:"\u2a7e",gesdot:"\u2a80",gesdoto:"\u2a82",gesdotol:"\u2a84",gesl:"\u22db\ufe00",gesles:"\u2a94",Gfr:"\ud835\udd0a",gfr:"\ud835\udd24",gg:"\u226b",Gg:"\u22d9",ggg:"\u22d9",gimel:"\u2137",GJcy:"\u0403",gjcy:"\u0453",gla:"\u2aa5",gl:"\u2277",glE:"\u2a92",glj:"\u2aa4",gnap:"\u2a8a",gnapprox:"\u2a8a",gne:"\u2a88",gnE:"\u2269",gneq:"\u2a88",gneqq:"\u2269",gnsim:"\u22e7",Gopf:"\ud835\udd3e",gopf:"\ud835\udd58",grave:"`",GreaterEqual:"\u2265",GreaterEqualLess:"\u22db",GreaterFullEqual:"\u2267",GreaterGreater:"\u2aa2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2a7e",GreaterTilde:"\u2273",Gscr:"\ud835\udca2",gscr:"\u210a",gsim:"\u2273",gsime:"\u2a8e",gsiml:"\u2a90",gtcc:"\u2aa7",gtcir:"\u2a7a",gt:">",GT:">",Gt:"\u226b",gtdot:"\u22d7",gtlPar:"\u2995",gtquest:"\u2a7c",gtrapprox:"\u2a86",gtrarr:"\u2978",gtrdot:"\u22d7",gtreqless:"\u22db",gtreqqless:"\u2a8c",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\ufe00",gvnE:"\u2269\ufe00",Hacek:"\u02c7",hairsp:"\u200a",half:"\xbd",hamilt:"\u210b",HARDcy:"\u042a",hardcy:"\u044a",harrcir:"\u2948",harr:"\u2194",hArr:"\u21d4",harrw:"\u21ad",Hat:"^",hbar:"\u210f",Hcirc:"\u0124",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22b9",hfr:"\ud835\udd25",Hfr:"\u210c",HilbertSpace:"\u210b",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21ff",homtht:"\u223b",hookleftarrow:"\u21a9",hookrightarrow:"\u21aa",hopf:"\ud835\udd59",Hopf:"\u210d",horbar:"\u2015",HorizontalLine:"\u2500",hscr:"\ud835\udcbd",Hscr:"\u210b",hslash:"\u210f",Hstrok:"\u0126",hstrok:"\u0127",HumpDownHump:"\u224e",HumpEqual:"\u224f",hybull:"\u2043",hyphen:"\u2010",Iacute:"\xcd",iacute:"\xed",ic:"\u2063",Icirc:"\xce",icirc:"\xee",Icy:"\u0418",icy:"\u0438",Idot:"\u0130",IEcy:"\u0415",iecy:"\u0435",iexcl:"\xa1",iff:"\u21d4",ifr:"\ud835\udd26",Ifr:"\u2111", +Igrave:"\xcc",igrave:"\xec",ii:"\u2148",iiiint:"\u2a0c",iiint:"\u222d",iinfin:"\u29dc",iiota:"\u2129",IJlig:"\u0132",ijlig:"\u0133",Imacr:"\u012a",imacr:"\u012b",image:"\u2111",ImaginaryI:"\u2148",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",Im:"\u2111",imof:"\u22b7",imped:"\u01b5",Implies:"\u21d2",incare:"\u2105","in":"\u2208",infin:"\u221e",infintie:"\u29dd",inodot:"\u0131",intcal:"\u22ba","int":"\u222b",Int:"\u222c",integers:"\u2124",Integral:"\u222b",intercal:"\u22ba",Intersection:"\u22c2",intlarhk:"\u2a17",intprod:"\u2a3c",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",IOcy:"\u0401",iocy:"\u0451",Iogon:"\u012e",iogon:"\u012f",Iopf:"\ud835\udd40",iopf:"\ud835\udd5a",Iota:"\u0399",iota:"\u03b9",iprod:"\u2a3c",iquest:"\xbf",iscr:"\ud835\udcbe",Iscr:"\u2110",isin:"\u2208",isindot:"\u22f5",isinE:"\u22f9",isins:"\u22f4",isinsv:"\u22f3",isinv:"\u2208",it:"\u2062",Itilde:"\u0128",itilde:"\u0129",Iukcy:"\u0406",iukcy:"\u0456",Iuml:"\xcf",iuml:"\xef",Jcirc:"\u0134",jcirc:"\u0135",Jcy:"\u0419",jcy:"\u0439",Jfr:"\ud835\udd0d",jfr:"\ud835\udd27",jmath:"\u0237",Jopf:"\ud835\udd41",jopf:"\ud835\udd5b",Jscr:"\ud835\udca5",jscr:"\ud835\udcbf",Jsercy:"\u0408",jsercy:"\u0458",Jukcy:"\u0404",jukcy:"\u0454",Kappa:"\u039a",kappa:"\u03ba",kappav:"\u03f0",Kcedil:"\u0136",kcedil:"\u0137",Kcy:"\u041a",kcy:"\u043a",Kfr:"\ud835\udd0e",kfr:"\ud835\udd28",kgreen:"\u0138",KHcy:"\u0425",khcy:"\u0445",KJcy:"\u040c",kjcy:"\u045c",Kopf:"\ud835\udd42",kopf:"\ud835\udd5c",Kscr:"\ud835\udca6",kscr:"\ud835\udcc0",lAarr:"\u21da",Lacute:"\u0139",lacute:"\u013a",laemptyv:"\u29b4",lagran:"\u2112",Lambda:"\u039b",lambda:"\u03bb",lang:"\u27e8",Lang:"\u27ea",langd:"\u2991",langle:"\u27e8",lap:"\u2a85",Laplacetrf:"\u2112",laquo:"\xab",larrb:"\u21e4",larrbfs:"\u291f",larr:"\u2190",Larr:"\u219e",lArr:"\u21d0",larrfs:"\u291d",larrhk:"\u21a9",larrlp:"\u21ab",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21a2",latail:"\u2919",lAtail:"\u291b",lat:"\u2aab",late:"\u2aad",lates:"\u2aad\ufe00",lbarr:"\u290c",lBarr:"\u290e",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298b",lbrksld:"\u298f",lbrkslu:"\u298d",Lcaron:"\u013d",lcaron:"\u013e",Lcedil:"\u013b",lcedil:"\u013c",lceil:"\u2308",lcub:"{",Lcy:"\u041b",lcy:"\u043b",ldca:"\u2936",ldquo:"\u201c",ldquor:"\u201e",ldrdhar:"\u2967",ldrushar:"\u294b",ldsh:"\u21b2",le:"\u2264",lE:"\u2266",LeftAngleBracket:"\u27e8",LeftArrowBar:"\u21e4",leftarrow:"\u2190",LeftArrow:"\u2190",Leftarrow:"\u21d0",LeftArrowRightArrow:"\u21c6",leftarrowtail:"\u21a2",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27e6",LeftDownTeeVector:"\u2961",LeftDownVectorBar:"\u2959",LeftDownVector:"\u21c3",LeftFloor:"\u230a",leftharpoondown:"\u21bd",leftharpoonup:"\u21bc",leftleftarrows:"\u21c7",leftrightarrow:"\u2194",LeftRightArrow:"\u2194",Leftrightarrow:"\u21d4",leftrightarrows:"\u21c6",leftrightharpoons:"\u21cb",leftrightsquigarrow:"\u21ad",LeftRightVector:"\u294e",LeftTeeArrow:"\u21a4",LeftTee:"\u22a3",LeftTeeVector:"\u295a",leftthreetimes:"\u22cb",LeftTriangleBar:"\u29cf",LeftTriangle:"\u22b2",LeftTriangleEqual:"\u22b4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVectorBar:"\u2958",LeftUpVector:"\u21bf",LeftVectorBar:"\u2952",LeftVector:"\u21bc",lEg:"\u2a8b",leg:"\u22da",leq:"\u2264",leqq:"\u2266",leqslant:"\u2a7d",lescc:"\u2aa8",les:"\u2a7d",lesdot:"\u2a7f",lesdoto:"\u2a81",lesdotor:"\u2a83",lesg:"\u22da\ufe00",lesges:"\u2a93",lessapprox:"\u2a85",lessdot:"\u22d6",lesseqgtr:"\u22da",lesseqqgtr:"\u2a8b",LessEqualGreater:"\u22da",LessFullEqual:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",LessLess:"\u2aa1",lesssim:"\u2272",LessSlantEqual:"\u2a7d",LessTilde:"\u2272",lfisht:"\u297c",lfloor:"\u230a",Lfr:"\ud835\udd0f",lfr:"\ud835\udd29",lg:"\u2276",lgE:"\u2a91",lHar:"\u2962",lhard:"\u21bd",lharu:"\u21bc",lharul:"\u296a",lhblk:"\u2584",LJcy:"\u0409",ljcy:"\u0459",llarr:"\u21c7",ll:"\u226a",Ll:"\u22d8",llcorner:"\u231e",Lleftarrow:"\u21da",llhard:"\u296b",lltri:"\u25fa",Lmidot:"\u013f",lmidot:"\u0140",lmoustache:"\u23b0",lmoust:"\u23b0",lnap:"\u2a89",lnapprox:"\u2a89",lne:"\u2a87",lnE:"\u2268",lneq:"\u2a87",lneqq:"\u2268",lnsim:"\u22e6",loang:"\u27ec",loarr:"\u21fd",lobrk:"\u27e6",longleftarrow:"\u27f5",LongLeftArrow:"\u27f5",Longleftarrow:"\u27f8",longleftrightarrow:"\u27f7",LongLeftRightArrow:"\u27f7",Longleftrightarrow:"\u27fa",longmapsto:"\u27fc",longrightarrow:"\u27f6",LongRightArrow:"\u27f6",Longrightarrow:"\u27f9",looparrowleft:"\u21ab",looparrowright:"\u21ac",lopar:"\u2985",Lopf:"\ud835\udd43",lopf:"\ud835\udd5d",loplus:"\u2a2d",lotimes:"\u2a34",lowast:"\u2217",lowbar:"_",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",loz:"\u25ca",lozenge:"\u25ca",lozf:"\u29eb",lpar:"(",lparlt:"\u2993",lrarr:"\u21c6",lrcorner:"\u231f",lrhar:"\u21cb",lrhard:"\u296d",lrm:"\u200e",lrtri:"\u22bf",lsaquo:"\u2039",lscr:"\ud835\udcc1",Lscr:"\u2112",lsh:"\u21b0",Lsh:"\u21b0",lsim:"\u2272",lsime:"\u2a8d",lsimg:"\u2a8f",lsqb:"[",lsquo:"\u2018",lsquor:"\u201a",Lstrok:"\u0141",lstrok:"\u0142",ltcc:"\u2aa6",ltcir:"\u2a79",lt:"<",LT:"<",Lt:"\u226a",ltdot:"\u22d6",lthree:"\u22cb",ltimes:"\u22c9",ltlarr:"\u2976",ltquest:"\u2a7b",ltri:"\u25c3",ltrie:"\u22b4",ltrif:"\u25c2",ltrPar:"\u2996",lurdshar:"\u294a",luruhar:"\u2966",lvertneqq:"\u2268\ufe00",lvnE:"\u2268\ufe00",macr:"\xaf",male:"\u2642",malt:"\u2720",maltese:"\u2720",Map:"\u2905",map:"\u21a6",mapsto:"\u21a6",mapstodown:"\u21a7",mapstoleft:"\u21a4",mapstoup:"\u21a5",marker:"\u25ae",mcomma:"\u2a29",Mcy:"\u041c",mcy:"\u043c",mdash:"\u2014",mDDot:"\u223a",measuredangle:"\u2221",MediumSpace:"\u205f",Mellintrf:"\u2133",Mfr:"\ud835\udd10",mfr:"\ud835\udd2a",mho:"\u2127",micro:"\xb5",midast:"*",midcir:"\u2af0",mid:"\u2223",middot:"\xb7",minusb:"\u229f",minus:"\u2212",minusd:"\u2238",minusdu:"\u2a2a",MinusPlus:"\u2213",mlcp:"\u2adb",mldr:"\u2026",mnplus:"\u2213",models:"\u22a7",Mopf:"\ud835\udd44",mopf:"\ud835\udd5e",mp:"\u2213",mscr:"\ud835\udcc2",Mscr:"\u2133",mstpos:"\u223e",Mu:"\u039c",mu:"\u03bc",multimap:"\u22b8",mumap:"\u22b8",nabla:"\u2207",Nacute:"\u0143",nacute:"\u0144",nang:"\u2220\u20d2",nap:"\u2249",napE:"\u2a70\u0338",napid:"\u224b\u0338",napos:"\u0149",napprox:"\u2249",natural:"\u266e",naturals:"\u2115",natur:"\u266e",nbsp:"\xa0",nbump:"\u224e\u0338",nbumpe:"\u224f\u0338",ncap:"\u2a43",Ncaron:"\u0147",ncaron:"\u0148",Ncedil:"\u0145",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2a6d\u0338",ncup:"\u2a42",Ncy:"\u041d",ncy:"\u043d",ndash:"\u2013",nearhk:"\u2924",nearr:"\u2197",neArr:"\u21d7",nearrow:"\u2197",ne:"\u2260",nedot:"\u2250\u0338",NegativeMediumSpace:"\u200b",NegativeThickSpace:"\u200b",NegativeThinSpace:"\u200b",NegativeVeryThinSpace:"\u200b",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",NestedGreaterGreater:"\u226b",NestedLessLess:"\u226a",NewLine:"\n",nexist:"\u2204",nexists:"\u2204",Nfr:"\ud835\udd11",nfr:"\ud835\udd2b",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2a7e\u0338",nges:"\u2a7e\u0338",nGg:"\u22d9\u0338",ngsim:"\u2275",nGt:"\u226b\u20d2",ngt:"\u226f",ngtr:"\u226f",nGtv:"\u226b\u0338",nharr:"\u21ae",nhArr:"\u21ce",nhpar:"\u2af2",ni:"\u220b",nis:"\u22fc",nisd:"\u22fa",niv:"\u220b",NJcy:"\u040a",njcy:"\u045a",nlarr:"\u219a",nlArr:"\u21cd",nldr:"\u2025",nlE:"\u2266\u0338",nle:"\u2270",nleftarrow:"\u219a",nLeftarrow:"\u21cd",nleftrightarrow:"\u21ae",nLeftrightarrow:"\u21ce",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2a7d\u0338",nles:"\u2a7d\u0338",nless:"\u226e",nLl:"\u22d8\u0338",nlsim:"\u2274",nLt:"\u226a\u20d2",nlt:"\u226e",nltri:"\u22ea",nltrie:"\u22ec",nLtv:"\u226a\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xa0",nopf:"\ud835\udd5f",Nopf:"\u2115",Not:"\u2aec",not:"\xac",NotCongruent:"\u2262",NotCupCap:"\u226d",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226f",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226b\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2a7e\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224e\u0338",NotHumpEqual:"\u224f\u0338",notin:"\u2209",notindot:"\u22f5\u0338",notinE:"\u22f9\u0338",notinva:"\u2209",notinvb:"\u22f7",notinvc:"\u22f6",NotLeftTriangleBar:"\u29cf\u0338",NotLeftTriangle:"\u22ea",NotLeftTriangleEqual:"\u22ec",NotLess:"\u226e",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226a\u0338",NotLessSlantEqual:"\u2a7d\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2aa2\u0338",NotNestedLessLess:"\u2aa1\u0338",notni:"\u220c",notniva:"\u220c",notnivb:"\u22fe",notnivc:"\u22fd",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2aaf\u0338",NotPrecedesSlantEqual:"\u22e0",NotReverseElement:"\u220c",NotRightTriangleBar:"\u29d0\u0338",NotRightTriangle:"\u22eb",NotRightTriangleEqual:"\u22ed",NotSquareSubset:"\u228f\u0338",NotSquareSubsetEqual:"\u22e2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22e3",NotSubset:"\u2282\u20d2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2ab0\u0338",NotSucceedsSlantEqual:"\u22e1",NotSucceedsTilde:"\u227f\u0338",NotSuperset:"\u2283\u20d2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",nparallel:"\u2226",npar:"\u2226",nparsl:"\u2afd\u20e5",npart:"\u2202\u0338",npolint:"\u2a14",npr:"\u2280",nprcue:"\u22e0",nprec:"\u2280",npreceq:"\u2aaf\u0338",npre:"\u2aaf\u0338",nrarrc:"\u2933\u0338",nrarr:"\u219b",nrArr:"\u21cf",nrarrw:"\u219d\u0338",nrightarrow:"\u219b",nRightarrow:"\u21cf",nrtri:"\u22eb",nrtrie:"\u22ed",nsc:"\u2281",nsccue:"\u22e1",nsce:"\u2ab0\u0338",Nscr:"\ud835\udca9",nscr:"\ud835\udcc3",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22e2",nsqsupe:"\u22e3",nsub:"\u2284",nsubE:"\u2ac5\u0338",nsube:"\u2288",nsubset:"\u2282\u20d2",nsubseteq:"\u2288",nsubseteqq:"\u2ac5\u0338",nsucc:"\u2281",nsucceq:"\u2ab0\u0338",nsup:"\u2285",nsupE:"\u2ac6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20d2",nsupseteq:"\u2289",nsupseteqq:"\u2ac6\u0338",ntgl:"\u2279",Ntilde:"\xd1",ntilde:"\xf1",ntlg:"\u2278",ntriangleleft:"\u22ea",ntrianglelefteq:"\u22ec",ntriangleright:"\u22eb",ntrianglerighteq:"\u22ed",Nu:"\u039d",nu:"\u03bd",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224d\u20d2",nvdash:"\u22ac",nvDash:"\u22ad",nVdash:"\u22ae",nVDash:"\u22af",nvge:"\u2265\u20d2",nvgt:">\u20d2",nvHarr:"\u2904",nvinfin:"\u29de",nvlArr:"\u2902",nvle:"\u2264\u20d2",nvlt:"<\u20d2",nvltrie:"\u22b4\u20d2",nvrArr:"\u2903",nvrtrie:"\u22b5\u20d2",nvsim:"\u223c\u20d2",nwarhk:"\u2923",nwarr:"\u2196",nwArr:"\u21d6",nwarrow:"\u2196",nwnear:"\u2927",Oacute:"\xd3",oacute:"\xf3",oast:"\u229b",Ocirc:"\xd4",ocirc:"\xf4",ocir:"\u229a",Ocy:"\u041e",ocy:"\u043e",odash:"\u229d",Odblac:"\u0150",odblac:"\u0151",odiv:"\u2a38",odot:"\u2299",odsold:"\u29bc",OElig:"\u0152",oelig:"\u0153",ofcir:"\u29bf",Ofr:"\ud835\udd12",ofr:"\ud835\udd2c",ogon:"\u02db",Ograve:"\xd2",ograve:"\xf2",ogt:"\u29c1",ohbar:"\u29b5",ohm:"\u03a9",oint:"\u222e",olarr:"\u21ba",olcir:"\u29be",olcross:"\u29bb",oline:"\u203e",olt:"\u29c0",Omacr:"\u014c",omacr:"\u014d",Omega:"\u03a9",omega:"\u03c9",Omicron:"\u039f",omicron:"\u03bf",omid:"\u29b6",ominus:"\u2296",Oopf:"\ud835\udd46",oopf:"\ud835\udd60",opar:"\u29b7",OpenCurlyDoubleQuote:"\u201c",OpenCurlyQuote:"\u2018",operp:"\u29b9",oplus:"\u2295",orarr:"\u21bb",Or:"\u2a54",or:"\u2228",ord:"\u2a5d",order:"\u2134",orderof:"\u2134",ordf:"\xaa",ordm:"\xba",origof:"\u22b6",oror:"\u2a56",orslope:"\u2a57",orv:"\u2a5b",oS:"\u24c8",Oscr:"\ud835\udcaa",oscr:"\u2134",Oslash:"\xd8",oslash:"\xf8",osol:"\u2298",Otilde:"\xd5",otilde:"\xf5",otimesas:"\u2a36",Otimes:"\u2a37",otimes:"\u2297",Ouml:"\xd6",ouml:"\xf6",ovbar:"\u233d",OverBar:"\u203e",OverBrace:"\u23de",OverBracket:"\u23b4",OverParenthesis:"\u23dc",para:"\xb6",parallel:"\u2225",par:"\u2225",parsim:"\u2af3",parsl:"\u2afd",part:"\u2202",PartialD:"\u2202",Pcy:"\u041f",pcy:"\u043f",percnt:"%",period:".",permil:"\u2030",perp:"\u22a5",pertenk:"\u2031",Pfr:"\ud835\udd13",pfr:"\ud835\udd2d",Phi:"\u03a6",phi:"\u03c6",phiv:"\u03d5",phmmat:"\u2133",phone:"\u260e",Pi:"\u03a0",pi:"\u03c0",pitchfork:"\u22d4",piv:"\u03d6",planck:"\u210f",planckh:"\u210e",plankv:"\u210f",plusacir:"\u2a23",plusb:"\u229e",pluscir:"\u2a22",plus:"+",plusdo:"\u2214",plusdu:"\u2a25",pluse:"\u2a72",PlusMinus:"\xb1",plusmn:"\xb1",plussim:"\u2a26",plustwo:"\u2a27",pm:"\xb1",Poincareplane:"\u210c",pointint:"\u2a15",popf:"\ud835\udd61",Popf:"\u2119",pound:"\xa3",prap:"\u2ab7",Pr:"\u2abb",pr:"\u227a",prcue:"\u227c",precapprox:"\u2ab7",prec:"\u227a",preccurlyeq:"\u227c",Precedes:"\u227a",PrecedesEqual:"\u2aaf",PrecedesSlantEqual:"\u227c",PrecedesTilde:"\u227e",preceq:"\u2aaf",precnapprox:"\u2ab9",precneqq:"\u2ab5",precnsim:"\u22e8",pre:"\u2aaf",prE:"\u2ab3",precsim:"\u227e",prime:"\u2032",Prime:"\u2033",primes:"\u2119",prnap:"\u2ab9",prnE:"\u2ab5",prnsim:"\u22e8",prod:"\u220f",Product:"\u220f",profalar:"\u232e",profline:"\u2312",profsurf:"\u2313",prop:"\u221d",Proportional:"\u221d",Proportion:"\u2237",propto:"\u221d",prsim:"\u227e",prurel:"\u22b0",Pscr:"\ud835\udcab",pscr:"\ud835\udcc5",Psi:"\u03a8",psi:"\u03c8",puncsp:"\u2008",Qfr:"\ud835\udd14",qfr:"\ud835\udd2e",qint:"\u2a0c",qopf:"\ud835\udd62",Qopf:"\u211a",qprime:"\u2057",Qscr:"\ud835\udcac",qscr:"\ud835\udcc6",quaternions:"\u210d",quatint:"\u2a16",quest:"?",questeq:"\u225f",quot:'"',QUOT:'"',rAarr:"\u21db",race:"\u223d\u0331",Racute:"\u0154",racute:"\u0155",radic:"\u221a",raemptyv:"\u29b3",rang:"\u27e9",Rang:"\u27eb",rangd:"\u2992",range:"\u29a5",rangle:"\u27e9",raquo:"\xbb",rarrap:"\u2975",rarrb:"\u21e5",rarrbfs:"\u2920",rarrc:"\u2933",rarr:"\u2192",Rarr:"\u21a0",rArr:"\u21d2",rarrfs:"\u291e",rarrhk:"\u21aa",rarrlp:"\u21ac",rarrpl:"\u2945",rarrsim:"\u2974",Rarrtl:"\u2916",rarrtl:"\u21a3",rarrw:"\u219d",ratail:"\u291a",rAtail:"\u291c",ratio:"\u2236",rationals:"\u211a",rbarr:"\u290d",rBarr:"\u290f",RBarr:"\u2910",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298c",rbrksld:"\u298e",rbrkslu:"\u2990",Rcaron:"\u0158",rcaron:"\u0159",Rcedil:"\u0156",rcedil:"\u0157",rceil:"\u2309",rcub:"}",Rcy:"\u0420",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201d",rdquor:"\u201d",rdsh:"\u21b3",real:"\u211c",realine:"\u211b",realpart:"\u211c",reals:"\u211d",Re:"\u211c",rect:"\u25ad",reg:"\xae",REG:"\xae",ReverseElement:"\u220b",ReverseEquilibrium:"\u21cb",ReverseUpEquilibrium:"\u296f",rfisht:"\u297d",rfloor:"\u230b",rfr:"\ud835\udd2f",Rfr:"\u211c",rHar:"\u2964",rhard:"\u21c1",rharu:"\u21c0",rharul:"\u296c",Rho:"\u03a1",rho:"\u03c1",rhov:"\u03f1",RightAngleBracket:"\u27e9",RightArrowBar:"\u21e5",rightarrow:"\u2192",RightArrow:"\u2192",Rightarrow:"\u21d2",RightArrowLeftArrow:"\u21c4",rightarrowtail:"\u21a3",RightCeiling:"\u2309",RightDoubleBracket:"\u27e7",RightDownTeeVector:"\u295d",RightDownVectorBar:"\u2955",RightDownVector:"\u21c2",RightFloor:"\u230b",rightharpoondown:"\u21c1",rightharpoonup:"\u21c0",rightleftarrows:"\u21c4",rightleftharpoons:"\u21cc",rightrightarrows:"\u21c9",rightsquigarrow:"\u219d",RightTeeArrow:"\u21a6",RightTee:"\u22a2",RightTeeVector:"\u295b",rightthreetimes:"\u22cc",RightTriangleBar:"\u29d0",RightTriangle:"\u22b3",RightTriangleEqual:"\u22b5",RightUpDownVector:"\u294f",RightUpTeeVector:"\u295c",RightUpVectorBar:"\u2954",RightUpVector:"\u21be",RightVectorBar:"\u2953",RightVector:"\u21c0",ring:"\u02da",risingdotseq:"\u2253",rlarr:"\u21c4",rlhar:"\u21cc",rlm:"\u200f",rmoustache:"\u23b1",rmoust:"\u23b1",rnmid:"\u2aee",roang:"\u27ed",roarr:"\u21fe",robrk:"\u27e7",ropar:"\u2986",ropf:"\ud835\udd63",Ropf:"\u211d",roplus:"\u2a2e",rotimes:"\u2a35",RoundImplies:"\u2970",rpar:")",rpargt:"\u2994",rppolint:"\u2a12",rrarr:"\u21c9",Rrightarrow:"\u21db",rsaquo:"\u203a",rscr:"\ud835\udcc7",Rscr:"\u211b",rsh:"\u21b1",Rsh:"\u21b1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22cc",rtimes:"\u22ca",rtri:"\u25b9",rtrie:"\u22b5",rtrif:"\u25b8",rtriltri:"\u29ce",RuleDelayed:"\u29f4",ruluhar:"\u2968",rx:"\u211e",Sacute:"\u015a",sacute:"\u015b",sbquo:"\u201a",scap:"\u2ab8",Scaron:"\u0160",scaron:"\u0161",Sc:"\u2abc",sc:"\u227b",sccue:"\u227d",sce:"\u2ab0",scE:"\u2ab4",Scedil:"\u015e",scedil:"\u015f",Scirc:"\u015c",scirc:"\u015d",scnap:"\u2aba",scnE:"\u2ab6",scnsim:"\u22e9",scpolint:"\u2a13",scsim:"\u227f",Scy:"\u0421",scy:"\u0441",sdotb:"\u22a1",sdot:"\u22c5",sdote:"\u2a66",searhk:"\u2925",searr:"\u2198",seArr:"\u21d8",searrow:"\u2198",sect:"\xa7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",Sfr:"\ud835\udd16",sfr:"\ud835\udd30",sfrown:"\u2322",sharp:"\u266f",SHCHcy:"\u0429",shchcy:"\u0449",SHcy:"\u0428",shcy:"\u0448",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",shortmid:"\u2223",shortparallel:"\u2225",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",shy:"\xad",Sigma:"\u03a3",sigma:"\u03c3",sigmaf:"\u03c2",sigmav:"\u03c2",sim:"\u223c",simdot:"\u2a6a",sime:"\u2243",simeq:"\u2243",simg:"\u2a9e",simgE:"\u2aa0",siml:"\u2a9d",simlE:"\u2a9f",simne:"\u2246",simplus:"\u2a24",simrarr:"\u2972",slarr:"\u2190",SmallCircle:"\u2218",smallsetminus:"\u2216",smashp:"\u2a33",smeparsl:"\u29e4",smid:"\u2223",smile:"\u2323",smt:"\u2aaa",smte:"\u2aac",smtes:"\u2aac\ufe00",SOFTcy:"\u042c",softcy:"\u044c",solbar:"\u233f",solb:"\u29c4",sol:"/",Sopf:"\ud835\udd4a",sopf:"\ud835\udd64",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\ufe00",sqcup:"\u2294",sqcups:"\u2294\ufe00",Sqrt:"\u221a",sqsub:"\u228f",sqsube:"\u2291",sqsubset:"\u228f",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",square:"\u25a1",Square:"\u25a1",SquareIntersection:"\u2293",SquareSubset:"\u228f",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",squarf:"\u25aa",squ:"\u25a1",squf:"\u25aa",srarr:"\u2192",Sscr:"\ud835\udcae",sscr:"\ud835\udcc8",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22c6",Star:"\u22c6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03f5",straightphi:"\u03d5",strns:"\xaf",sub:"\u2282",Sub:"\u22d0",subdot:"\u2abd",subE:"\u2ac5",sube:"\u2286",subedot:"\u2ac3",submult:"\u2ac1",subnE:"\u2acb",subne:"\u228a",subplus:"\u2abf",subrarr:"\u2979",subset:"\u2282",Subset:"\u22d0",subseteq:"\u2286",subseteqq:"\u2ac5",SubsetEqual:"\u2286",subsetneq:"\u228a",subsetneqq:"\u2acb",subsim:"\u2ac7",subsub:"\u2ad5",subsup:"\u2ad3",succapprox:"\u2ab8",succ:"\u227b",succcurlyeq:"\u227d",Succeeds:"\u227b",SucceedsEqual:"\u2ab0",SucceedsSlantEqual:"\u227d",SucceedsTilde:"\u227f",succeq:"\u2ab0",succnapprox:"\u2aba",succneqq:"\u2ab6",succnsim:"\u22e9",succsim:"\u227f",SuchThat:"\u220b",sum:"\u2211",Sum:"\u2211",sung:"\u266a",sup1:"\xb9",sup2:"\xb2",sup3:"\xb3",sup:"\u2283",Sup:"\u22d1",supdot:"\u2abe",supdsub:"\u2ad8",supE:"\u2ac6",supe:"\u2287",supedot:"\u2ac4",Superset:"\u2283",SupersetEqual:"\u2287",suphsol:"\u27c9",suphsub:"\u2ad7",suplarr:"\u297b",supmult:"\u2ac2",supnE:"\u2acc",supne:"\u228b",supplus:"\u2ac0",supset:"\u2283",Supset:"\u22d1",supseteq:"\u2287",supseteqq:"\u2ac6",supsetneq:"\u228b",supsetneqq:"\u2acc",supsim:"\u2ac8",supsub:"\u2ad4",supsup:"\u2ad6",swarhk:"\u2926",swarr:"\u2199",swArr:"\u21d9",swarrow:"\u2199",swnwar:"\u292a",szlig:"\xdf",Tab:" ",target:"\u2316",Tau:"\u03a4",tau:"\u03c4",tbrk:"\u23b4",Tcaron:"\u0164",tcaron:"\u0165",Tcedil:"\u0162",tcedil:"\u0163",Tcy:"\u0422",tcy:"\u0442",tdot:"\u20db",telrec:"\u2315",Tfr:"\ud835\udd17",tfr:"\ud835\udd31",there4:"\u2234",therefore:"\u2234",Therefore:"\u2234",Theta:"\u0398",theta:"\u03b8",thetasym:"\u03d1",thetav:"\u03d1",thickapprox:"\u2248",thicksim:"\u223c",ThickSpace:"\u205f\u200a",ThinSpace:"\u2009",thinsp:"\u2009",thkap:"\u2248",thksim:"\u223c",THORN:"\xde",thorn:"\xfe",tilde:"\u02dc",Tilde:"\u223c",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",timesbar:"\u2a31",timesb:"\u22a0",times:"\xd7",timesd:"\u2a30",tint:"\u222d",toea:"\u2928",topbot:"\u2336",topcir:"\u2af1",top:"\u22a4",Topf:"\ud835\udd4b",topf:"\ud835\udd65",topfork:"\u2ada",tosa:"\u2929",tprime:"\u2034",trade:"\u2122",TRADE:"\u2122",triangle:"\u25b5",triangledown:"\u25bf",triangleleft:"\u25c3",trianglelefteq:"\u22b4",triangleq:"\u225c",triangleright:"\u25b9",trianglerighteq:"\u22b5",tridot:"\u25ec",trie:"\u225c",triminus:"\u2a3a",TripleDot:"\u20db",triplus:"\u2a39",trisb:"\u29cd",tritime:"\u2a3b",trpezium:"\u23e2",Tscr:"\ud835\udcaf",tscr:"\ud835\udcc9",TScy:"\u0426",tscy:"\u0446",TSHcy:"\u040b",tshcy:"\u045b",Tstrok:"\u0166",tstrok:"\u0167",twixt:"\u226c",twoheadleftarrow:"\u219e",twoheadrightarrow:"\u21a0",Uacute:"\xda",uacute:"\xfa",uarr:"\u2191",Uarr:"\u219f",uArr:"\u21d1",Uarrocir:"\u2949",Ubrcy:"\u040e",ubrcy:"\u045e",Ubreve:"\u016c",ubreve:"\u016d",Ucirc:"\xdb",ucirc:"\xfb",Ucy:"\u0423",ucy:"\u0443",udarr:"\u21c5",Udblac:"\u0170",udblac:"\u0171",udhar:"\u296e",ufisht:"\u297e",Ufr:"\ud835\udd18",ufr:"\ud835\udd32",Ugrave:"\xd9",ugrave:"\xf9",uHar:"\u2963",uharl:"\u21bf",uharr:"\u21be",uhblk:"\u2580",ulcorn:"\u231c",ulcorner:"\u231c",ulcrop:"\u230f",ultri:"\u25f8",Umacr:"\u016a",umacr:"\u016b",uml:"\xa8",UnderBar:"_",UnderBrace:"\u23df",UnderBracket:"\u23b5",UnderParenthesis:"\u23dd",Union:"\u22c3",UnionPlus:"\u228e",Uogon:"\u0172",uogon:"\u0173",Uopf:"\ud835\udd4c",uopf:"\ud835\udd66",UpArrowBar:"\u2912",uparrow:"\u2191",UpArrow:"\u2191",Uparrow:"\u21d1",UpArrowDownArrow:"\u21c5",updownarrow:"\u2195",UpDownArrow:"\u2195",Updownarrow:"\u21d5",UpEquilibrium:"\u296e",upharpoonleft:"\u21bf",upharpoonright:"\u21be",uplus:"\u228e",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",upsi:"\u03c5",Upsi:"\u03d2",upsih:"\u03d2",Upsilon:"\u03a5",upsilon:"\u03c5",UpTeeArrow:"\u21a5",UpTee:"\u22a5",upuparrows:"\u21c8",urcorn:"\u231d",urcorner:"\u231d",urcrop:"\u230e",Uring:"\u016e",uring:"\u016f",urtri:"\u25f9",Uscr:"\ud835\udcb0",uscr:"\ud835\udcca",utdot:"\u22f0",Utilde:"\u0168",utilde:"\u0169",utri:"\u25b5",utrif:"\u25b4",uuarr:"\u21c8",Uuml:"\xdc",uuml:"\xfc",uwangle:"\u29a7",vangrt:"\u299c",varepsilon:"\u03f5",varkappa:"\u03f0",varnothing:"\u2205",varphi:"\u03d5",varpi:"\u03d6",varpropto:"\u221d",varr:"\u2195",vArr:"\u21d5",varrho:"\u03f1",varsigma:"\u03c2",varsubsetneq:"\u228a\ufe00",varsubsetneqq:"\u2acb\ufe00",varsupsetneq:"\u228b\ufe00",varsupsetneqq:"\u2acc\ufe00",vartheta:"\u03d1",vartriangleleft:"\u22b2",vartriangleright:"\u22b3",vBar:"\u2ae8",Vbar:"\u2aeb",vBarv:"\u2ae9",Vcy:"\u0412",vcy:"\u0432",vdash:"\u22a2",vDash:"\u22a8",Vdash:"\u22a9",VDash:"\u22ab",Vdashl:"\u2ae6",veebar:"\u22bb",vee:"\u2228",Vee:"\u22c1",veeeq:"\u225a",vellip:"\u22ee",verbar:"|",Verbar:"\u2016",vert:"|",Vert:"\u2016",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200a",Vfr:"\ud835\udd19",vfr:"\ud835\udd33",vltri:"\u22b2",vnsub:"\u2282\u20d2",vnsup:"\u2283\u20d2",Vopf:"\ud835\udd4d",vopf:"\ud835\udd67",vprop:"\u221d",vrtri:"\u22b3",Vscr:"\ud835\udcb1",vscr:"\ud835\udccb",vsubnE:"\u2acb\ufe00",vsubne:"\u228a\ufe00",vsupnE:"\u2acc\ufe00",vsupne:"\u228b\ufe00",Vvdash:"\u22aa",vzigzag:"\u299a",Wcirc:"\u0174",wcirc:"\u0175",wedbar:"\u2a5f",wedge:"\u2227",Wedge:"\u22c0",wedgeq:"\u2259",weierp:"\u2118",Wfr:"\ud835\udd1a",wfr:"\ud835\udd34",Wopf:"\ud835\udd4e",wopf:"\ud835\udd68",wp:"\u2118",wr:"\u2240",wreath:"\u2240",Wscr:"\ud835\udcb2",wscr:"\ud835\udccc",xcap:"\u22c2",xcirc:"\u25ef",xcup:"\u22c3",xdtri:"\u25bd",Xfr:"\ud835\udd1b",xfr:"\ud835\udd35",xharr:"\u27f7",xhArr:"\u27fa",Xi:"\u039e",xi:"\u03be",xlarr:"\u27f5",xlArr:"\u27f8",xmap:"\u27fc",xnis:"\u22fb",xodot:"\u2a00",Xopf:"\ud835\udd4f",xopf:"\ud835\udd69",xoplus:"\u2a01",xotime:"\u2a02",xrarr:"\u27f6",xrArr:"\u27f9",Xscr:"\ud835\udcb3",xscr:"\ud835\udccd",xsqcup:"\u2a06",xuplus:"\u2a04",xutri:"\u25b3",xvee:"\u22c1",xwedge:"\u22c0",Yacute:"\xdd",yacute:"\xfd",YAcy:"\u042f",yacy:"\u044f",Ycirc:"\u0176",ycirc:"\u0177",Ycy:"\u042b",ycy:"\u044b",yen:"\xa5",Yfr:"\ud835\udd1c",yfr:"\ud835\udd36",YIcy:"\u0407",yicy:"\u0457",Yopf:"\ud835\udd50",yopf:"\ud835\udd6a",Yscr:"\ud835\udcb4",yscr:"\ud835\udcce",YUcy:"\u042e",yucy:"\u044e",yuml:"\xff",Yuml:"\u0178",Zacute:"\u0179",zacute:"\u017a",Zcaron:"\u017d",zcaron:"\u017e",Zcy:"\u0417",zcy:"\u0437",Zdot:"\u017b",zdot:"\u017c",zeetrf:"\u2128",ZeroWidthSpace:"\u200b",Zeta:"\u0396",zeta:"\u03b6",zfr:"\ud835\udd37",Zfr:"\u2128",ZHcy:"\u0416",zhcy:"\u0436",zigrarr:"\u21dd",zopf:"\ud835\udd6b",Zopf:"\u2124",Zscr:"\ud835\udcb5",zscr:"\ud835\udccf",zwj:"\u200d",zwnj:"\u200c"}},{}],54:[function(e,r,t){"use strict";function n(e){var r=Array.prototype.slice.call(arguments,1);return r.forEach(function(r){r&&Object.keys(r).forEach(function(t){e[t]=r[t]})}),e}function s(e){return Object.prototype.toString.call(e)}function o(e){return"[object String]"===s(e)}function i(e){return"[object Object]"===s(e)}function a(e){return"[object RegExp]"===s(e)}function c(e){return"[object Function]"===s(e)}function l(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function u(e){return Object.keys(e||{}).reduce(function(e,r){return e||k.hasOwnProperty(r)},!1)}function p(e){e.__index__=-1,e.__text_cache__=""}function h(e){return function(r,t){var n=r.slice(t);return e.test(n)?n.match(e)[0].length:0}}function f(){return function(e,r){r.normalize(e)}}function d(r){function t(e){return e.replace("%TLDS%",u.src_tlds)}function s(e,r){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+r)}var u=r.re=n({},e("./lib/re")),d=r.__tlds__.slice();r.__tlds_replaced__||d.push(v),d.push(u.src_xn),u.src_tlds=d.join("|"),u.email_fuzzy=RegExp(t(u.tpl_email_fuzzy),"i"),u.link_fuzzy=RegExp(t(u.tpl_link_fuzzy),"i"),u.link_no_ip_fuzzy=RegExp(t(u.tpl_link_no_ip_fuzzy),"i"),u.host_fuzzy_test=RegExp(t(u.tpl_host_fuzzy_test),"i");var m=[];r.__compiled__={},Object.keys(r.__schemas__).forEach(function(e){var t=r.__schemas__[e];if(null!==t){var n={validate:null,link:null};return r.__compiled__[e]=n,i(t)?(a(t.validate)?n.validate=h(t.validate):c(t.validate)?n.validate=t.validate:s(e,t),void(c(t.normalize)?n.normalize=t.normalize:t.normalize?s(e,t):n.normalize=f())):o(t)?void m.push(e):void s(e,t)}}),m.forEach(function(e){r.__compiled__[r.__schemas__[e]]&&(r.__compiled__[e].validate=r.__compiled__[r.__schemas__[e]].validate,r.__compiled__[e].normalize=r.__compiled__[r.__schemas__[e]].normalize)}),r.__compiled__[""]={validate:null,normalize:f()};var g=Object.keys(r.__compiled__).filter(function(e){return e.length>0&&r.__compiled__[e]}).map(l).join("|");r.re.schema_test=RegExp("(^|(?!_)(?:>|"+u.src_ZPCc+"))("+g+")","i"),r.re.schema_search=RegExp("(^|(?!_)(?:>|"+u.src_ZPCc+"))("+g+")","ig"),r.re.pretest=RegExp("("+r.re.schema_test.source+")|("+r.re.host_fuzzy_test.source+")|@","i"),p(r)}function m(e,r){var t=e.__index__,n=e.__last_index__,s=e.__text_cache__.slice(t,n);this.schema=e.__schema__.toLowerCase(),this.index=t+r,this.lastIndex=n+r,this.raw=s,this.text=s,this.url=s}function g(e,r){var t=new m(e,r);return e.__compiled__[t.schema].normalize(t,e),t}function _(e,r){return this instanceof _?(r||u(e)&&(r=e,e={}),this.__opts__=n({},k,r),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=n({},b,e),this.__compiled__={},this.__tlds__=x,this.__tlds_replaced__=!1,this.re={},void d(this)):new _(e,r)}var k={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1},b={"http:":{validate:function(e,r,t){var n=e.slice(r);return t.re.http||(t.re.http=new RegExp("^\\/\\/"+t.re.src_auth+t.re.src_host_port_strict+t.re.src_path,"i")),t.re.http.test(n)?n.match(t.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,r,t){var n=e.slice(r);return t.re.no_http||(t.re.no_http=new RegExp("^"+t.re.src_auth+t.re.src_host_port_strict+t.re.src_path,"i")),t.re.no_http.test(n)?r>=3&&":"===e[r-3]?0:n.match(t.re.no_http)[0].length:0}},"mailto:":{validate:function(e,r,t){var n=e.slice(r);return t.re.mailto||(t.re.mailto=new RegExp("^"+t.re.src_email_name+"@"+t.re.src_host_strict,"i")),t.re.mailto.test(n)?n.match(t.re.mailto)[0].length:0}}},v="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",x="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|\u0440\u0444".split("|");_.prototype.add=function(e,r){return this.__schemas__[e]=r,d(this),this},_.prototype.set=function(e){return this.__opts__=n(this.__opts__,e),this},_.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var r,t,n,s,o,i,a,c,l;if(this.re.schema_test.test(e))for(a=this.re.schema_search,a.lastIndex=0;null!==(r=a.exec(e));)if(s=this.testSchemaAt(e,r[2],a.lastIndex)){this.__schema__=r[2],this.__index__=r.index+r[1].length,this.__last_index__=r.index+r[0].length+s;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(c=e.search(this.re.host_fuzzy_test),c>=0&&(this.__index__<0||c=0&&null!==(n=e.match(this.re.email_fuzzy))&&(o=n.index+n[1].length,i=n.index+n[0].length,(this.__index__<0||othis.__last_index__)&&(this.__schema__="mailto:",this.__index__=o,this.__last_index__=i))),this.__index__>=0},_.prototype.pretest=function(e){return this.re.pretest.test(e)},_.prototype.testSchemaAt=function(e,r,t){return this.__compiled__[r.toLowerCase()]?this.__compiled__[r.toLowerCase()].validate(e,t,this):0},_.prototype.match=function(e){var r=0,t=[];this.__index__>=0&&this.__text_cache__===e&&(t.push(g(this,r)),r=this.__last_index__);for(var n=r?e.slice(r):e;this.test(n);)t.push(g(this,r)),n=n.slice(this.__last_index__),r+=this.__last_index__;return t.length?t:null},_.prototype.tlds=function(e,r){return e=Array.isArray(e)?e:[e],r?(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(e,r,t){return e!==t[r-1]}).reverse(),d(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,d(this),this)},_.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},r.exports=_},{"./lib/re":55}],55:[function(e,r,t){"use strict";var n=t.src_Any=e("uc.micro/properties/Any/regex").source,s=t.src_Cc=e("uc.micro/categories/Cc/regex").source,o=t.src_Z=e("uc.micro/categories/Z/regex").source,i=t.src_P=e("uc.micro/categories/P/regex").source,a=t.src_ZPCc=[o,i,s].join("|"),c=t.src_ZCc=[o,s].join("|"),l="(?:(?!"+a+")"+n+")",u="(?:(?![0-9]|"+a+")"+n+")",p=t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)";t.src_auth="(?:(?:(?!"+c+").)+@)?";var h=t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",f=t.src_host_terminator="(?=$|"+a+")(?!-|_|:\\d|\\.-|\\.(?!$|"+a+"))",d=t.src_path="(?:[/?#](?:(?!"+c+"|[()[\\]{}.,\"'?!\\-]).|\\[(?:(?!"+c+"|\\]).)*\\]|\\((?:(?!"+c+"|[)]).)*\\)|\\{(?:(?!"+c+'|[}]).)*\\}|\\"(?:(?!'+c+'|["]).)+\\"|\\\'(?:(?!'+c+"|[']).)+\\'|\\'(?="+l+").|\\.{2,3}[a-zA-Z0-9%/]|\\.(?!"+c+"|[.]).|\\-(?!--(?:[^-]|$))(?:-*)|\\,(?!"+c+").|\\!(?!"+c+"|[!]).|\\?(?!"+c+"|[?]).)+|\\/)?",m=t.src_email_name='[\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]+',g=t.src_xn="xn--[a-z0-9\\-]{1,59}",_=t.src_domain_root="(?:"+g+"|"+u+"{1,63})",k=t.src_domain="(?:"+g+"|(?:"+l+")|(?:"+l+"(?:-(?!-)|"+l+"){0,61}"+l+"))",b=t.src_host="(?:"+p+"|(?:(?:(?:"+k+")\\.)*"+_+"))",v=t.tpl_host_fuzzy="(?:"+p+"|(?:(?:(?:"+k+")\\.)+(?:%TLDS%)))",x=t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+k+")\\.)+(?:%TLDS%))";t.src_host_strict=b+f;var y=t.tpl_host_fuzzy_strict=v+f;t.src_host_port_strict=b+h+f;var C=t.tpl_host_port_fuzzy_strict=v+h+f,A=t.tpl_host_port_no_ip_fuzzy_strict=x+h+f;t.tpl_host_fuzzy_test="localhost|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+a+"|$))",t.tpl_email_fuzzy="(^|>|"+c+")("+m+"@"+y+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|]|"+a+"))((?![$+<=>^`|])"+C+d+")", t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|]|"+a+"))((?![$+<=>^`|])"+A+d+")"},{"uc.micro/categories/Cc/regex":61,"uc.micro/categories/P/regex":63,"uc.micro/categories/Z/regex":64,"uc.micro/properties/Any/regex":66}],56:[function(e,r,t){"use strict";function n(e){var r,t,n=o[e];if(n)return n;for(n=o[e]=[],r=0;128>r;r++)t=String.fromCharCode(r),n.push(t);for(r=0;rr;r+=3)s=parseInt(e.slice(r+1,r+3),16),128>s?l+=t[s]:192===(224&s)&&n>r+3&&(o=parseInt(e.slice(r+4,r+6),16),128===(192&o))?(c=s<<6&1984|63&o,l+=128>c?"\ufffd\ufffd":String.fromCharCode(c),r+=3):224===(240&s)&&n>r+6&&(o=parseInt(e.slice(r+4,r+6),16),i=parseInt(e.slice(r+7,r+9),16),128===(192&o)&&128===(192&i))?(c=s<<12&61440|o<<6&4032|63&i,l+=2048>c||c>=55296&&57343>=c?"\ufffd\ufffd\ufffd":String.fromCharCode(c),r+=6):240===(248&s)&&n>r+9&&(o=parseInt(e.slice(r+4,r+6),16),i=parseInt(e.slice(r+7,r+9),16),a=parseInt(e.slice(r+10,r+12),16),128===(192&o)&&128===(192&i)&&128===(192&a))?(c=s<<18&1835008|o<<12&258048|i<<6&4032|63&a,65536>c||c>1114111?l+="\ufffd\ufffd\ufffd\ufffd":(c-=65536,l+=String.fromCharCode(55296+(c>>10),56320+(1023&c))),r+=9):l+="\ufffd";return l})}var o={};s.defaultChars=";/?:@&=+$,#",s.componentChars="",r.exports=s},{}],57:[function(e,r,t){"use strict";function n(e){var r,t,n=o[e];if(n)return n;for(n=o[e]=[],r=0;128>r;r++)t=String.fromCharCode(r),/^[0-9a-z]$/i.test(t)?n.push(t):n.push("%"+("0"+r.toString(16).toUpperCase()).slice(-2));for(r=0;ro;o++)if(a=e.charCodeAt(o),t&&37===a&&i>o+2&&/^[0-9a-f]{2}$/i.test(e.slice(o+1,o+3)))u+=e.slice(o,o+3),o+=2;else if(128>a)u+=l[a];else if(a>=55296&&57343>=a){if(a>=55296&&56319>=a&&i>o+1&&(c=e.charCodeAt(o+1),c>=56320&&57343>=c)){u+=encodeURIComponent(e[o]+e[o+1]),o++;continue}u+="%EF%BF%BD"}else u+=encodeURIComponent(e[o]);return u}var o={};s.defaultChars=";/?:@&=+$,-_.!~*'()#",s.componentChars="-_.!~*'()",r.exports=s},{}],58:[function(e,r,t){"use strict";r.exports=function(e){var r="";return r+=e.protocol||"",r+=e.slashes?"//":"",r+=e.auth?e.auth+"@":"",r+=e.hostname&&-1!==e.hostname.indexOf(":")?"["+e.hostname+"]":e.hostname||"",r+=e.port?":"+e.port:"",r+=e.pathname||"",r+=e.search||"",r+=e.hash||""}},{}],59:[function(e,r,t){"use strict";r.exports.encode=e("./encode"),r.exports.decode=e("./decode"),r.exports.format=e("./format"),r.exports.parse=e("./parse")},{"./decode":56,"./encode":57,"./format":58,"./parse":60}],60:[function(e,r,t){"use strict";function n(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}function s(e,r){if(e&&e instanceof n)return e;var t=new n;return t.parse(e,r),t}var o=/^([a-z0-9.+-]+:)/i,i=/:[0-9]*$/,a=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["<",">",'"',"`"," ","\r","\n"," "],l=["{","}","|","\\","^","`"].concat(c),u=["'"].concat(l),p=["%","/","?",";","#"].concat(u),h=["/","?","#"],f=255,d=/^[+a-z0-9A-Z_-]{0,63}$/,m=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,g={javascript:!0,"javascript:":!0},_={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};n.prototype.parse=function(e,r){var t,n,s,i,c,l=e;if(l=l.trim(),!r&&1===e.split("#").length){var u=a.exec(l);if(u)return this.pathname=u[1],u[2]&&(this.search=u[2]),this}var k=o.exec(l);if(k&&(k=k[0],s=k.toLowerCase(),this.protocol=k,l=l.substr(k.length)),(r||k||l.match(/^\/\/[^@\/]+@[^@\/]+/))&&(c="//"===l.substr(0,2),!c||k&&g[k]||(l=l.substr(2),this.slashes=!0)),!g[k]&&(c||k&&!_[k])){var b=-1;for(t=0;ti)&&(b=i);var v,x;for(x=-1===b?l.lastIndexOf("@"):l.lastIndexOf("@",b),-1!==x&&(v=l.slice(0,x),l=l.slice(x+1),this.auth=v),b=-1,t=0;ti)&&(b=i);-1===b&&(b=l.length),":"===l[b-1]&&b--;var y=l.slice(0,b);l=l.slice(b),this.parseHost(y),this.hostname=this.hostname||"";var C="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!C){var A=this.hostname.split(/\./);for(t=0,n=A.length;n>t;t++){var w=A[t];if(w&&!w.match(d)){for(var q="",D=0,E=w.length;E>D;D++)q+=w.charCodeAt(D)>127?"x":w[D];if(!q.match(d)){var S=A.slice(0,t),F=A.slice(t+1),L=w.match(m);L&&(S.push(L[1]),F.unshift(L[2])),F.length&&(l=F.join(".")+l),this.hostname=S.join(".");break}}}}this.hostname.length>f&&(this.hostname=""),C&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var z=l.indexOf("#");-1!==z&&(this.hash=l.substr(z),l=l.slice(0,z));var T=l.indexOf("?");return-1!==T&&(this.search=l.substr(T),l=l.slice(0,T)),l&&(this.pathname=l),_[s]&&this.hostname&&!this.pathname&&(this.pathname=""),this},n.prototype.parseHost=function(e){var r=i.exec(e);r&&(r=r[0],":"!==r&&(this.port=r.substr(1)),e=e.substr(0,e.length-r.length)),e&&(this.hostname=e)},r.exports=s},{}],61:[function(e,r,t){r.exports=/[\0-\x1F\x7F-\x9F]/},{}],62:[function(e,r,t){r.exports=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804\uDCBD|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/},{}],63:[function(e,r,t){r.exports=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDE38-\uDE3D]|\uD805[\uDCC6\uDDC1-\uDDC9\uDE41-\uDE43]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F/},{}],64:[function(e,r,t){r.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/},{}],65:[function(e,r,t){r.exports.Any=e("./properties/Any/regex"),r.exports.Cc=e("./categories/Cc/regex"),r.exports.Cf=e("./categories/Cf/regex"),r.exports.P=e("./categories/P/regex"),r.exports.Z=e("./categories/Z/regex")},{"./categories/Cc/regex":61,"./categories/Cf/regex":62,"./categories/P/regex":63,"./categories/Z/regex":64,"./properties/Any/regex":66}],66:[function(e,r,t){r.exports=/[\0-\uD7FF\uDC00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF]/},{}],67:[function(e,r,t){"use strict";r.exports=e("./lib/")},{"./lib/":9}]},{},[67])(67)}); /*global require*/ @@ -891,113 +891,116 @@ define('ViewModels/ResetViewNavigationControl',[ 'ViewModels/NavigationControl', 'SvgPaths/svgReset' ], function ( - defined, - Camera, - NavigationControl, - svgReset) - { - 'use strict'; + defined, + Camera, + NavigationControl, + svgReset) { + 'use strict'; + + /** + * The model for a zoom in control in the navigation control tool bar + * + * @alias ResetViewNavigationControl + * @constructor + * @abstract + * + * @param {Terria} terria The Terria instance. + */ + var ResetViewNavigationControl = function (terria) { + NavigationControl.apply(this, arguments); /** - * The model for a zoom in control in the navigation control tool bar - * - * @alias ResetViewNavigationControl - * @constructor - * @abstract - * - * @param {Terria} terria The Terria instance. + * Gets or sets the name of the control which is set as the control's title. + * This property is observable. + * @type {String} */ - var ResetViewNavigationControl = function (terria) - { - NavigationControl.apply(this, arguments); - - /** - * Gets or sets the name of the control which is set as the control's title. - * This property is observable. - * @type {String} - */ - this.name = 'Reset View'; - - /** - * Gets or sets the svg icon of the control. This property is observable. - * @type {Object} - */ - this.svgIcon = svgReset; - - /** - * Gets or sets the height of the svg icon. This property is observable. - * @type {Integer} - */ - this.svgHeight = 15; - - /** - * Gets or sets the width of the svg icon. This property is observable. - * @type {Integer} - */ - this.svgWidth = 15; - - /** - * Gets or sets the CSS class of the control. This property is observable. - * @type {String} - */ - this.cssClass = "navigation-control-icon-reset"; + this.name = 'Reset View'; - }; + /** + * Gets or sets the svg icon of the control. This property is observable. + * @type {Object} + */ + this.svgIcon = svgReset; - ResetViewNavigationControl.prototype = Object.create(NavigationControl.prototype); - - ResetViewNavigationControl.prototype.resetView = function () - { - //this.terria.analytics.logEvent('navigation', 'click', 'reset'); - - this.isActive = true; - - var camera = this.terria.scene.camera; - - //reset to a default position or view defined in the options - if (this.terria.options.defaultResetView) - { - if (this.terria.options.defaultResetView && this.terria.options.defaultResetView instanceof Cesium.Cartographic) - { - camera.flyTo({ - destination: Cesium.Ellipsoid.WGS84.cartographicToCartesian(this.terria.options.defaultResetView) - }); - } else if (this.terria.options.defaultResetView && this.terria.options.defaultResetView instanceof Cesium.Rectangle) - { - try - { - Cesium.Rectangle.validate(this.terria.options.defaultResetView); - camera.flyTo({ - destination: this.terria.options.defaultResetView - }); - } catch (e) - { - console.log("Cesium-navigation/ResetViewNavigationControl: options.defaultResetView Cesium rectangle is invalid!"); - } - } - } - else if (typeof camera.flyHome === "function") - { - camera.flyHome(1); - } else - { - camera.flyTo({'destination': Camera.DEFAULT_VIEW_RECTANGLE, 'duration': 1}); - } - this.isActive = false; - }; + /** + * Gets or sets the height of the svg icon. This property is observable. + * @type {Integer} + */ + this.svgHeight = 15; /** - * When implemented in a derived class, performs an action when the user clicks - * on this control - * @abstract - * @protected + * Gets or sets the width of the svg icon. This property is observable. + * @type {Integer} */ - ResetViewNavigationControl.prototype.activate = function () - { - this.resetView(); - }; - return ResetViewNavigationControl; - }); + this.svgWidth = 15; + + /** + * Gets or sets the CSS class of the control. This property is observable. + * @type {String} + */ + this.cssClass = "navigation-control-icon-reset"; + + }; + + ResetViewNavigationControl.prototype = Object.create(NavigationControl.prototype); + + ResetViewNavigationControl.prototype.resetView = function () { + //this.terria.analytics.logEvent('navigation', 'click', 'reset'); + + var scene = this.terria.scene; + + var sscc = scene.screenSpaceCameraController; + if (!sscc.enableInputs) { + return; + } + + this.isActive = true; + + var camera = scene.camera; + + if (defined(this.terria.trackedEntity)) { + // when tracking do not reset to default view but to default view of tracked entity + var trackedEntity = this.terria.trackedEntity; + this.terria.trackedEntity = undefined; + this.terria.trackedEntity = trackedEntity; + } else { + // reset to a default position or view defined in the options + if (this.terria.options.defaultResetView) { + if (this.terria.options.defaultResetView && this.terria.options.defaultResetView instanceof Cesium.Cartographic) { + camera.flyTo({ + destination: Cesium.Ellipsoid.WGS84.cartographicToCartesian(this.terria.options.defaultResetView) + }); + } else if (this.terria.options.defaultResetView && this.terria.options.defaultResetView instanceof Cesium.Rectangle) { + try { + Cesium.Rectangle.validate(this.terria.options.defaultResetView); + camera.flyTo({ + destination: this.terria.options.defaultResetView + }); + } catch (e) { + console.log("Cesium-navigation/ResetViewNavigationControl: options.defaultResetView Cesium rectangle is invalid!"); + } + } + } + else if (typeof camera.flyHome === "function") { + camera.flyHome(1); + } else { + camera.flyTo({'destination': Camera.DEFAULT_VIEW_RECTANGLE, 'duration': 1}); + } + } + this.isActive = false; + }; + + /** + * When implemented in a derived class, performs an action when the user clicks + * on this control + * @abstract + * @protected + */ + ResetViewNavigationControl.prototype.activate = function () { + this.resetView(); + }; + return ResetViewNavigationControl; +}); /*global require*/ define('Core/Utils',[ @@ -1005,12 +1008,14 @@ define('Core/Utils',[ 'Cesium/Core/Ray', 'Cesium/Core/Cartesian3', 'Cesium/Core/Cartographic', + 'Cesium/Core/ReferenceFrame', 'Cesium/Scene/SceneMode' ], function ( defined, Ray, Cartesian3, Cartographic, + ReferenceFrame, SceneMode) { 'use strict'; @@ -1021,12 +1026,15 @@ define('Core/Utils',[ /** * gets the focus point of the camera - * @param {Scene} scene The scene + * @param {Viewer|Widget} terria The terria * @param {boolean} inWorldCoordinates true to get the focus in world coordinates, otherwise get it in projection-specific map coordinates, in meters. * @param {Cartesian3} [result] The object in which the result will be stored. * @return {Cartesian3} The modified result parameter, a new instance if none was provided or undefined if there is no focus point. */ - Utils.getCameraFocus = function (scene, inWorldCoordinates, result) { + Utils.getCameraFocus = function (terria, inWorldCoordinates, result) { + var scene = terria.scene; + var camera = scene.camera; + if(scene.mode == SceneMode.MORPHING) { return undefined; } @@ -1035,29 +1043,34 @@ define('Core/Utils',[ result = new Cartesian3(); } - var camera = scene.camera; + // TODO bug when tracking: if entity moves the current position should be used and not only the one when starting orbiting/rotating + // TODO bug when tracking: reset should reset to default view of tracked entity - rayScratch.origin = camera.positionWC; - rayScratch.direction = camera.directionWC; - var center = scene.globe.pick(rayScratch, scene, result); + if(defined(terria.trackedEntity)) { + result = terria.trackedEntity.position.getValue(terria.clock.currentTime, result); + } else { + rayScratch.origin = camera.positionWC; + rayScratch.direction = camera.directionWC; + result = scene.globe.pick(rayScratch, scene, result); + } - if (!defined(center)) { + if (!defined(result)) { return undefined; } if(scene.mode == SceneMode.SCENE2D || scene.mode == SceneMode.COLUMBUS_VIEW) { - center = camera.worldToCameraCoordinatesPoint(center, result); + result = camera.worldToCameraCoordinatesPoint(result, result); if(inWorldCoordinates) { - center = scene.globe.ellipsoid.cartographicToCartesian(scene.mapProjection.unproject(center, unprojectedScratch), result); + result = scene.globe.ellipsoid.cartographicToCartesian(scene.mapProjection.unproject(result, unprojectedScratch), result); } } else { if(!inWorldCoordinates) { - center = camera.worldToCameraCoordinatesPoint(center, result); + result = camera.worldToCameraCoordinatesPoint(result, result); } } - return center; + return result; }; return Utils; @@ -1118,7 +1131,7 @@ define('ViewModels/ZoomNavigationControl',[ this.relativeAmount = 2; - if(zoomIn) { + if (zoomIn) { // this ensures that zooming in is the inverse of zooming out and vice versa // e.g. the camera position remains when zooming in and out this.relativeAmount = 1 / this.relativeAmount; @@ -1148,17 +1161,34 @@ define('ViewModels/ZoomNavigationControl',[ if (defined(this.terria)) { var scene = this.terria.scene; + + var sscc = scene.screenSpaceCameraController; + // do not zoom if it is disabled + if (!sscc.enableInputs || !sscc.enableZoom) { + return; + } + // TODO +// if(scene.mode == SceneMode.COLUMBUS_VIEW && !sscc.enableTranslate) { +// return; +// } + var camera = scene.camera; - // var orientation; + var orientation; - switch(scene.mode) { + switch (scene.mode) { case SceneMode.MORPHING: break; case SceneMode.SCENE2D: - camera.zoomIn(camera.positionCartographic.height * (1 - this.relativeAmount)); + camera.zoomIn(camera.positionCartographic.height * (1 - this.relativeAmount)); break; default: - var focus = Utils.getCameraFocus(scene, false); + var focus; + + if(defined(this.terria.trackedEntity)) { + focus = new Cartesian3(); + } else { + focus = Utils.getCameraFocus(this.terria, false); + } if (!defined(focus)) { // Camera direction is not pointing at the globe, so use the ellipsoid horizon point as @@ -1166,32 +1196,34 @@ define('ViewModels/ZoomNavigationControl',[ var ray = new Ray(camera.worldToCameraCoordinatesPoint(scene.globe.ellipsoid.cartographicToCartesian(camera.positionCartographic)), camera.directionWC); focus = IntersectionTests.grazingAltitudeLocation(ray, scene.globe.ellipsoid); - // orientation = { - // heading: camera.heading, - // pitch: camera.pitch, - // roll: camera.roll - // }; - // } else { - // orientation = { - // direction: camera.direction, - // up: camera.up - // }; + orientation = { + heading: camera.heading, + pitch: camera.pitch, + roll: camera.roll + }; + } else { + orientation = { + direction: camera.direction, + up: camera.up + }; } var direction = Cartesian3.subtract(camera.position, focus, cartesian3Scratch); var movementVector = Cartesian3.multiplyByScalar(direction, relativeAmount, direction); var endPosition = Cartesian3.add(focus, movementVector, focus); - // sometimes flyTo does not work (wrong position) so just set the position without any animation - camera.position = endPosition; - - // camera.flyTo({ - // destination: endPosition, - // orientation: orientation, - // duration: 1, - // convert: false - // }); - // } + if (defined(this.terria.trackedEntity) || scene.mode == SceneMode.COLUMBUS_VIEW) { + // sometimes flyTo does not work (jumps to wrong position) so just set the position without any animation + // do not use flyTo when tracking an entity because during animatiuon the position of the entity may change + camera.position = endPosition; + } else { + camera.flyTo({ + destination: endPosition, + orientation: orientation, + duration: 0.5, + convert: false + }); + } } } @@ -1435,14 +1467,30 @@ define('ViewModels/NavigationViewModel',[ var centerScratch = new Cartesian3(); NavigationViewModel.prototype.handleDoubleClick = function (viewModel, e) { - var scene = this.terria.scene; + var scene = viewModel.terria.scene; var camera = scene.camera; - if (scene.mode == SceneMode.MORPHING || scene.mode == SceneMode.SCENE2D) { + var sscc = scene.screenSpaceCameraController; + + if (scene.mode == SceneMode.MORPHING || !sscc.enableInputs) { return true; } + if (scene.mode == SceneMode.COLUMBUS_VIEW && !sscc.enableTranslate) { + return; + } + if(scene.mode == SceneMode.SCENE3D || scene.mode == SceneMode.COLUMBUS_VIEW) { + if (!sscc.enableLook) { + return; + } + + if(scene.mode == SceneMode.SCENE3D) { + if(!sscc.enableRotate) { + return + } + } + } - var center = Utils.getCameraFocus(scene, true, centerScratch); + var center = Utils.getCameraFocus(viewModel.terria, true, centerScratch); if (!defined(center)) { // Globe is barely visible, so reset to home view. @@ -1451,15 +1499,24 @@ define('ViewModels/NavigationViewModel',[ return; } - // var rotateFrame = Transforms.eastNorthUpToFixedFrame(center, scene.globe.ellipsoid); - // var cameraPosition = scene.globe.ellipsoid.cartographicToCartesian(camera.positionCartographic, new Cartesian3()); - // var lookVector = Cartesian3.subtract(center, cameraPosition, new Cartesian3()); - // - // var destination = Matrix4.multiplyByPoint(rotateFrame, new Cartesian3(0, 0, Cartesian3.magnitude(lookVector)), new Cartesian3()); - camera.flyToBoundingSphere(new BoundingSphere(center, 0), { - offset: new HeadingPitchRange(0, camera.pitch, Cartesian3.distance(cameraPosition, center)), + var surfaceNormal = scene.globe.ellipsoid.geodeticSurfaceNormal(center); + + var focusBoundingSphere = new BoundingSphere(center, 0); + + camera.flyToBoundingSphere(focusBoundingSphere, { + offset: new HeadingPitchRange(0, + // do not use camera.pitch since the pitch at the center/target is required + CesiumMath.PI_OVER_TWO - Cartesian3.angleBetween( + surfaceNormal, + camera.directionWC + ), + // distanceToBoundingSphere returns wrong values when in 2D or Columbus view so do not use + // camera.distanceToBoundingSphere(focusBoundingSphere) + // instead calculate distance manually + Cartesian3.distance(cameraPosition, center) + ), duration: 1.5 }); }; @@ -1471,6 +1528,41 @@ define('ViewModels/NavigationViewModel',[ }; function orbit(viewModel, compassElement, cursorVector) { + var scene = viewModel.terria.scene; + + var sscc = scene.screenSpaceCameraController; + + // do not orbit if it is disabled + if(scene.mode == SceneMode.MORPHING || !sscc.enableInputs) { + return; + } + + switch(scene.mode) { + case SceneMode.COLUMBUS_VIEW: + if(sscc.enableLook) { + break; + } + + if (!sscc.enableTranslate || !sscc.enableTilt) { + return; + } + break; + case SceneMode.SCENE3D: + if(sscc.enableLook) { + break; + } + + if (!sscc.enableTilt || !sscc.enableRotate) { + return; + } + break; + case SceneMode.SCENE2D: + if (!sscc.enableTranslate) { + return; + } + break; + } + // Remove existing event handlers, if any. document.removeEventListener('mousemove', viewModel.orbitMouseMoveFunction, false); document.removeEventListener('mouseup', viewModel.orbitMouseUpFunction, false); @@ -1486,17 +1578,22 @@ define('ViewModels/NavigationViewModel',[ viewModel.isOrbiting = true; viewModel.orbitLastTimestamp = getTimestamp(); - var scene = viewModel.terria.scene; var camera = scene.camera; - var center = Utils.getCameraFocus(scene, true, centerScratch); - - if (!defined(center)) { - viewModel.orbitFrame = Transforms.eastNorthUpToFixedFrame(camera.positionWC, scene.globe.ellipsoid, newTransformScratch); - viewModel.orbitIsLook = true; - } else { - viewModel.orbitFrame = Transforms.eastNorthUpToFixedFrame(center, scene.globe.ellipsoid, newTransformScratch); + if (defined(viewModel.terria.trackedEntity)) { + // when tracking an entity simply use that reference frame + viewModel.orbitFrame = undefined; viewModel.orbitIsLook = false; + } else { + var center = Utils.getCameraFocus(viewModel.terria, true, centerScratch); + + if (!defined(center)) { + viewModel.orbitFrame = Transforms.eastNorthUpToFixedFrame(camera.positionWC, scene.globe.ellipsoid, newTransformScratch); + viewModel.orbitIsLook = true; + } else { + viewModel.orbitFrame = Transforms.eastNorthUpToFixedFrame(center, scene.globe.ellipsoid, newTransformScratch); + viewModel.orbitIsLook = false; + } } viewModel.orbitTickFunction = function (e) { @@ -1509,9 +1606,13 @@ define('ViewModels/NavigationViewModel',[ var x = Math.cos(angle) * distance; var y = Math.sin(angle) * distance; - var oldTransform = Matrix4.clone(camera.transform, oldTransformScratch); + var oldTransform; - camera.lookAtTransform(viewModel.orbitFrame); + if (defined(viewModel.orbitFrame)) { + oldTransform = Matrix4.clone(camera.transform, oldTransformScratch); + + camera.lookAtTransform(viewModel.orbitFrame); + } // do not look up/down or rotate in 2D mode if (scene.mode == SceneMode.SCENE2D) { @@ -1526,7 +1627,9 @@ define('ViewModels/NavigationViewModel',[ } } - camera.lookAtTransform(oldTransform); + if (defined(viewModel.orbitFrame)) { + camera.lookAtTransform(oldTransform); + } // viewModel.terria.cesium.notifyRepaintRequired(); @@ -1581,8 +1684,12 @@ define('ViewModels/NavigationViewModel',[ var scene = viewModel.terria.scene; var camera = scene.camera; - // do not look rotate in 2D mode - if (scene.mode == SceneMode.SCENE2D) { + var sscc = scene.screenSpaceCameraController; + // do not rotate in 2D mode or if rotating is disabled + if (scene.mode == SceneMode.MORPHING || scene.mode == SceneMode.SCENE2D || !sscc.enableInputs) { + return; + } + if(!sscc.enableLook && (scene.mode == SceneMode.COLUMBUS_VIEW || (scene.mode == SceneMode.SCENE3D && !sscc.enableRotate))) { return; } @@ -1596,21 +1703,33 @@ define('ViewModels/NavigationViewModel',[ viewModel.isRotating = true; viewModel.rotateInitialCursorAngle = Math.atan2(-cursorVector.y, cursorVector.x); - var viewCenter = Utils.getCameraFocus(scene, true, centerScratch); - - if (!defined(viewCenter)) { - viewModel.rotateFrame = Transforms.eastNorthUpToFixedFrame(camera.positionWC, scene.globe.ellipsoid, newTransformScratch); - viewModel.rotateIsLook = true; - } else { - viewModel.rotateFrame = Transforms.eastNorthUpToFixedFrame(viewCenter, scene.globe.ellipsoid, newTransformScratch); + if(defined(viewModel.terria.trackedEntity)) { + // when tracking an entity simply use that reference frame + viewModel.rotateFrame = undefined; viewModel.rotateIsLook = false; + } else { + var viewCenter = Utils.getCameraFocus(viewModel.terria, true, centerScratch); + + if (!defined(viewCenter) || (scene.mode == SceneMode.COLUMBUS_VIEW && !sscc.enableLook && !sscc.enableTranslate)) { + viewModel.rotateFrame = Transforms.eastNorthUpToFixedFrame(camera.positionWC, scene.globe.ellipsoid, newTransformScratch); + viewModel.rotateIsLook = true; + } else { + viewModel.rotateFrame = Transforms.eastNorthUpToFixedFrame(viewCenter, scene.globe.ellipsoid, newTransformScratch); + viewModel.rotateIsLook = false; + } + } + + var oldTransform; + if(defined(viewModel.rotateFrame)) { + oldTransform = Matrix4.clone(camera.transform, oldTransformScratch); + camera.lookAtTransform(viewModel.rotateFrame); } - var oldTransform = Matrix4.clone(camera.transform, oldTransformScratch); - camera.lookAtTransform(viewModel.rotateFrame); viewModel.rotateInitialCameraAngle = -camera.heading; - viewModel.rotateInitialCameraDistance = Cartesian3.magnitude(new Cartesian3(camera.position.x, camera.position.y, 0.0)); - camera.lookAtTransform(oldTransform); + + if(defined(viewModel.rotateFrame)) { + camera.lookAtTransform(oldTransform); + } viewModel.rotateMouseMoveFunction = function (e) { var compassRectangle = compassElement.getBoundingClientRect(); @@ -1624,11 +1743,18 @@ define('ViewModels/NavigationViewModel',[ var camera = viewModel.terria.scene.camera; - var oldTransform = Matrix4.clone(camera.transform, oldTransformScratch); - camera.lookAtTransform(viewModel.rotateFrame); + var oldTransform; + if(defined(viewModel.rotateFrame)) { + oldTransform = Matrix4.clone(camera.transform, oldTransformScratch); + camera.lookAtTransform(viewModel.rotateFrame); + } + var currentCameraAngle = -camera.heading; camera.rotateRight(newCameraAngle - currentCameraAngle); - camera.lookAtTransform(oldTransform); + + if(defined(viewModel.rotateFrame)) { + camera.lookAtTransform(oldTransform); + } // viewModel.terria.cesium.notifyRepaintRequired(); }; @@ -1674,9 +1800,9 @@ define('CesiumNavigation',[ * @alias CesiumNavigation * @constructor * - * @param {CesiumWidget} cesiumWidget The CesiumWidget instance + * @param {Viewer|CesiumWidget} viewerCesiumWidget The Viewer or CesiumWidget instance */ - var CesiumNavigation = function (cesiumWidget) { + var CesiumNavigation = function (viewerCesiumWidget) { initialize.apply(this, arguments); this._onDestroyListeners = []; @@ -1724,18 +1850,24 @@ define('CesiumNavigation',[ } }; - function initialize(cesiumWidget, options) { - if (!defined(cesiumWidget)) { - throw new DeveloperError('cesiumWidget is required.'); + /** + * @param {Viewer|CesiumWidget} viewerCesiumWidget The Viewer or CesiumWidget instance + * @param options + */ + function initialize(viewerCesiumWidget, options) { + if (!defined(viewerCesiumWidget)) { + throw new DeveloperError('CesiumWidget or Viewer is required.'); } // options = defaultValue(options, defaultValue.EMPTY_OBJECT); + var cesiumWidget = defined(viewerCesiumWidget.cesiumWidget) ? viewerCesiumWidget.cesiumWidget : viewerCesiumWidget; + var container = document.createElement('div'); container.className = 'cesium-widget-cesiumNavigationContainer'; cesiumWidget.container.appendChild(container); - this.terria = cesiumWidget; + this.terria = viewerCesiumWidget; this.terria.options = options; this.terria.afterWidgetChanged = new CesiumEvent(); this.terria.beforeWidgetChanged = new CesiumEvent(); @@ -1828,7 +1960,7 @@ define('viewerCesiumNavigationMixin',[ throw new DeveloperError('viewer is required.'); } - var cesiumNavigation = init(viewer.cesiumWidget, options); + var cesiumNavigation = init(viewer, options); cesiumNavigation.addOnDestroyListener((function (viewer) { return function () { @@ -1855,8 +1987,14 @@ define('viewerCesiumNavigationMixin',[ return init.apply(undefined, arguments); }; - var init = function (cesiumWidget, options) { - var cesiumNavigation = new CesiumNavigation(cesiumWidget, options); + /** + * @param {Viewer|CesiumWidget} viewerCesiumWidget The Viewer or CesiumWidget instance + * @param {{}} options the options + */ + var init = function (viewerCesiumWidget, options) { + var cesiumNavigation = new CesiumNavigation(viewerCesiumWidget, options); + + var cesiumWidget = defined(viewerCesiumWidget.cesiumWidget) ? viewerCesiumWidget.cesiumWidget : viewerCesiumWidget; defineProperties(cesiumWidget, { cesiumNavigation: { @@ -1880,10 +2018,10 @@ define('viewerCesiumNavigationMixin',[ }); (function(c){var d=document,a='appendChild',i='styleSheet',s=d.createElement('style');s.type='text/css';d.getElementsByTagName('head')[0][a](s);s[i]?s[i].cssText=c:s[a](d.createTextNode(c));}) -('.full-window{position:absolute;top:0;left:0;right:0;bottom:0;margin:0;overflow:hidden;padding:0;-webkit-transition:left .25s ease-out;-moz-transition:left .25s ease-out;-ms-transition:left .25s ease-out;-o-transition:left .25s ease-out;transition:left .25s ease-out}.transparent-to-input{pointer-events:none}.opaque-to-input{pointer-events:auto}.clickable{cursor:pointer}a:hover{text-decoration:underline}.modal,.modal-background{top:0;left:0;bottom:0;right:0}.modal-background{pointer-events:auto;background-color:rgba(0,0,0,.5);z-index:1000;position:fixed}.modal{position:absolute;margin:auto;background-color:#2f353c;max-height:100%;max-width:100%;font-family:\'Roboto\',sans-serif;color:#fff}.modal-header{background-color:rgba(0,0,0,.2);border-bottom:1px solid rgba(100,100,100,.6);font-size:15px;line-height:40px;margin:0}.modal-header h1{font-size:15px;color:#fff;margin-left:15px}.modal-content{margin-left:15px;margin-right:15px;margin-bottom:15px;padding-top:15px;overflow:auto}.modal-close-button{position:absolute;right:15px;cursor:pointer;font-size:18px;color:#fff}#ui{z-index:2100}@media print{.full-window{position:initial}}.markdown img{max-width:100%}.markdown svg{max-height:100%}.markdown fieldset,.markdown input,.markdown select,.markdown textarea{font-family:inherit;font-size:1rem;box-sizing:border-box;margin-top:0;margin-bottom:0}.markdown label{vertical-align:middle}.markdown h1,.markdown h2,.markdown h3,.markdown h4,.markdown h5,.markdown h6{font-family:inherit;font-weight:700;line-height:1.25;margin-top:1em;margin-bottom:.5em}.markdown h1{font-size:2rem}.markdown h2{font-size:1.5rem}.markdown h3{font-size:1.25rem}.markdown h4{font-size:1rem}.markdown h5{font-size:.875rem}.markdown h6{font-size:.75rem}.markdown dl,.markdown ol,.markdown p,.markdown ul{margin-top:0;margin-bottom:1rem}.markdown strong{font-weight:700}.markdown em{font-style:italic}.markdown small{font-size:80%}.markdown mark{color:#000;background:#ff0}.markdown a:hover,.markdown u{text-decoration:underline}.markdown s{text-decoration:line-through}.markdown ol{list-style:decimal inside}.markdown ul{list-style:disc inside}.markdown code,.markdown pre,.markdown samp{font-family:monospace;font-size:inherit}.markdown pre{margin-top:0;margin-bottom:1rem;overflow-x:scroll}.markdown a{color:#68adfe;text-decoration:none}.markdown code,.markdown pre{background-color:transparent;border-radius:3px}.markdown hr{border:0;border-bottom-style:solid;border-bottom-width:1px;border-bottom-color:rgba(0,0,0,.125)}.markdown .left-align{text-align:left}.markdown .center{text-align:center}.markdown .right-align{text-align:right}.markdown .justify{text-align:justify}.markdown .truncate{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.markdown ol.upper-roman{list-style-type:upper-roman}.markdown ol.lower-alpha{list-style-type:lower-alpha}.markdown ul.circle{list-style-type:circle}.markdown ul.square{list-style-type:square}.markdown .list-reset{list-style:none;padding-left:0}.floating,.floating-horizontal,.floating-vertical{pointer-events:auto;position:absolute;border-radius:15px;background-color:rgba(47,53,60,.8)}.floating-horizontal{padding-left:5px;padding-right:5px}.floating-vertical{padding-top:5px;padding-bottom:5px}@media print{.floating{display:none}}.distance-legend{pointer-events:auto;position:absolute;border-radius:15px;background-color:rgba(47,53,60,.8);padding-left:5px;padding-right:5px;right:25px;bottom:30px;height:30px;width:125px;border:1px solid rgba(255,255,255,.1);box-sizing:content-box}.distance-legend-label{display:inline-block;font-family:\'Roboto\',sans-serif;font-size:14px;font-weight:lighter;line-height:30px;color:#fff;width:125px;text-align:center}.distance-legend-scale-bar{border-left:1px solid #fff;border-right:1px solid #fff;border-bottom:1px solid #fff;position:absolute;height:10px;top:15px}@media print{.distance-legend{display:none}}@media screen and (max-width:700px),screen and (max-height:420px){.distance-legend{display:none}}.navigation-controls{position:absolute;right:30px;top:210px;width:30px;border:1px solid rgba(255,255,255,.1);font-weight:300;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.navigation-control{cursor:pointer;border-bottom:1px solid #555}.naviagation-control:active{color:#fff}.navigation-control-last{cursor:pointer;border-bottom:0}.navigation-control-icon-zoom-in{padding-bottom:4px}.navigation-control-icon-zoom-in,.navigation-control-icon-zoom-out{position:relative;text-align:center;font-size:20px;color:#fff}.navigation-control-icon-reset{position:relative;left:10px;width:10px;height:10px;fill:rgba(255,255,255,.8);padding-top:6px;padding-bottom:6px;box-sizing:content-box}.compass,.compass-outer-ring{position:absolute;width:95px;height:95px}.compass{pointer-events:auto;right:0;overflow:hidden;top:100px}.compass-outer-ring{top:0;fill:rgba(255,255,255,.5)}.compass-outer-ring-background{position:absolute;top:14px;left:14px;width:44px;height:44px;border-radius:44px;border:12px solid rgba(47,53,60,.8);box-sizing:content-box}.compass-gyro{pointer-events:none;position:absolute;top:0;width:95px;height:95px;fill:#ccc}.compass-gyro-active,.compass-gyro-background:hover+.compass-gyro{fill:#68adfe}.compass-gyro-background{position:absolute;top:30px;left:30px;width:33px;height:33px;border-radius:33px;background-color:rgba(47,53,60,.8);border:1px solid rgba(255,255,255,.2);box-sizing:content-box}.compass-rotation-marker{position:absolute;top:0;width:95px;height:95px;fill:#68adfe}@media screen and (max-width:700px),screen and (max-height:420px){.compass,.navigation-controls{display:none}}@media print{.compass,.navigation-controls{display:none}}'); +('.full-window{position:absolute;top:0;left:0;right:0;bottom:0;margin:0;overflow:hidden;padding:0;-webkit-transition:left .25s ease-out;-moz-transition:left .25s ease-out;-ms-transition:left .25s ease-out;-o-transition:left .25s ease-out;transition:left .25s ease-out}.transparent-to-input{pointer-events:none}.opaque-to-input{pointer-events:auto}.clickable{cursor:pointer}.markdown a:hover,.markdown u,a:hover{text-decoration:underline}.modal,.modal-background{top:0;left:0;bottom:0;right:0}.modal-background{pointer-events:auto;background-color:rgba(0,0,0,.5);z-index:1000;position:fixed}.modal{position:absolute;margin:auto;background-color:#2f353c;max-height:100%;max-width:100%;font-family:\'Roboto\',sans-serif;color:#fff}.modal-header{background-color:rgba(0,0,0,.2);border-bottom:1px solid rgba(100,100,100,.6);font-size:15px;line-height:40px;margin:0}.modal-header h1{font-size:15px;color:#fff;margin-left:15px}.modal-content{margin-left:15px;margin-right:15px;margin-bottom:15px;padding-top:15px;overflow:auto}.modal-close-button{position:absolute;right:15px;cursor:pointer;font-size:18px;color:#fff}#ui{z-index:2100}@media print{.full-window{position:initial}}.markdown img{max-width:100%}.markdown svg{max-height:100%}.markdown fieldset,.markdown input,.markdown select,.markdown textarea{font-family:inherit;font-size:1rem;box-sizing:border-box;margin-top:0;margin-bottom:0}.markdown label{vertical-align:middle}.markdown h1,.markdown h2,.markdown h3,.markdown h4,.markdown h5,.markdown h6{font-family:inherit;font-weight:700;line-height:1.25;margin-top:1em;margin-bottom:.5em}.markdown h1{font-size:2rem}.markdown h2{font-size:1.5rem}.markdown h3{font-size:1.25rem}.markdown h4{font-size:1rem}.markdown h5{font-size:.875rem}.markdown h6{font-size:.75rem}.markdown dl,.markdown ol,.markdown p,.markdown ul{margin-top:0;margin-bottom:1rem}.markdown strong{font-weight:700}.markdown em{font-style:italic}.markdown small{font-size:80%}.markdown mark{color:#000;background:#ff0}.markdown s{text-decoration:line-through}.markdown ol{list-style:decimal inside}.markdown ul{list-style:disc inside}.markdown code,.markdown pre,.markdown samp{font-family:monospace;font-size:inherit}.markdown pre{margin-top:0;margin-bottom:1rem;overflow-x:scroll}.markdown a{color:#68adfe;text-decoration:none}.markdown code,.markdown pre{background-color:transparent;border-radius:3px}.markdown hr{border:0;border-bottom-style:solid;border-bottom-width:1px;border-bottom-color:rgba(0,0,0,.125)}.markdown .left-align{text-align:left}.markdown .center{text-align:center}.markdown .right-align{text-align:right}.markdown .justify{text-align:justify}.markdown .truncate{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.markdown ol.upper-roman{list-style-type:upper-roman}.markdown ol.lower-alpha{list-style-type:lower-alpha}.markdown ul.circle{list-style-type:circle}.markdown ul.square{list-style-type:square}.markdown .list-reset{list-style:none;padding-left:0}.floating,.floating-horizontal,.floating-vertical{pointer-events:auto;position:absolute;border-radius:15px;background-color:rgba(47,53,60,.8)}.floating-horizontal{padding-left:5px;padding-right:5px}.floating-vertical{padding-top:5px;padding-bottom:5px}@media print{.floating{display:none}}.distance-legend{pointer-events:auto;position:absolute;border-radius:15px;background-color:rgba(47,53,60,.8);padding-left:5px;padding-right:5px;right:25px;bottom:30px;height:30px;width:125px;border:1px solid rgba(255,255,255,.1);box-sizing:content-box}.distance-legend-label{display:inline-block;font-family:\'Roboto\',sans-serif;font-size:14px;font-weight:lighter;line-height:30px;color:#fff;width:125px;text-align:center}.distance-legend-scale-bar{border-left:1px solid #fff;border-right:1px solid #fff;border-bottom:1px solid #fff;position:absolute;height:10px;top:15px}@media print{.distance-legend{display:none}}@media screen and (max-width:700px),screen and (max-height:420px){.distance-legend{display:none}}.navigation-controls{position:absolute;right:30px;top:210px;width:30px;border:1px solid rgba(255,255,255,.1);font-weight:300;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.navigation-control{cursor:pointer;border-bottom:1px solid #555}.naviagation-control:active{color:#fff}.navigation-control-last{cursor:pointer;border-bottom:0}.navigation-control-icon-zoom-in{padding-bottom:4px}.navigation-control-icon-zoom-in,.navigation-control-icon-zoom-out{position:relative;text-align:center;font-size:20px;color:#fff}.navigation-control-icon-reset{position:relative;left:10px;width:10px;height:10px;fill:rgba(255,255,255,.8);padding-top:6px;padding-bottom:6px;box-sizing:content-box}.compass,.compass-outer-ring{position:absolute;width:95px;height:95px}.compass{pointer-events:auto;right:0;overflow:hidden;top:100px}.compass-outer-ring{top:0;fill:rgba(255,255,255,.5)}.compass-outer-ring-background{position:absolute;top:14px;left:14px;width:44px;height:44px;border-radius:44px;border:12px solid rgba(47,53,60,.8);box-sizing:content-box}.compass-gyro{pointer-events:none;position:absolute;top:0;width:95px;height:95px;fill:#ccc}.compass-gyro-active,.compass-gyro-background:hover+.compass-gyro{fill:#68adfe}.compass-gyro-background{position:absolute;top:30px;left:30px;width:33px;height:33px;border-radius:33px;background-color:rgba(47,53,60,.8);border:1px solid rgba(255,255,255,.2);box-sizing:content-box}.compass-rotation-marker{position:absolute;top:0;width:95px;height:95px;fill:#68adfe}@media screen and (max-width:700px),screen and (max-height:420px){.compass,.navigation-controls{display:none}}@media print{.compass,.navigation-controls{display:none}}'); define(['viewerCesiumNavigationMixin'], function(viewerCesiumNavigationMixin) { return viewerCesiumNavigationMixin; -}); \ No newline at end of file +}); diff --git a/dist/amd/viewerCesiumNavigationMixin.min.js b/dist/amd/viewerCesiumNavigationMixin.min.js index 64d3a485..ed2d2c67 100644 --- a/dist/amd/viewerCesiumNavigationMixin.min.js +++ b/dist/amd/viewerCesiumNavigationMixin.min.js @@ -1,11 +1,12 @@ (function(){(function(n){var x=this||(0,eval)("this"),u=x.document,M=x.navigator,v=x.jQuery,F=x.JSON;(function(n){"function"===typeof define&&define.amd?define("knockout",["exports","require"],n):"object"===typeof exports&&"object"===typeof module?n(module.exports||exports):n(x.ko={})})(function(N,O){function J(a,c){return null===a||typeof a in T?a===c:!1}function U(b,c){var d;return function(){d||(d=a.a.setTimeout(function(){d=n;b()},c))}}function V(b,c){var d;return function(){clearTimeout(d);d=a.a.setTimeout(b,c)}}function W(a,c){c&&c!==I?"beforeChange"===c?this.Kb(a):this.Ha(a,c):this.Lb(a)}function X(a,c){null!==c&&c.k&&c.k()}function Y(a,c){var d=this.Hc,e=d[s];e.R||(this.lb&&this.Ma[c]?(d.Pb(c,a,this.Ma[c]),this.Ma[c]=null,--this.lb):e.r[c]||d.Pb(c,a,e.s?{ia:a}:d.uc(a)))}function K(b,c,d,e){a.d[b]={init:function(b,g,k,l,m){var h,r;a.m(function(){var q=a.a.c(g()),p=!d!==!q,A=!r;if(A||c||p!==h)A&&a.va.Aa()&&(r=a.a.ua(a.f.childNodes(b),!0)),p?(A||a.f.da(b,a.a.ua(r)),a.eb(e?e(m,q):m,b)):a.f.xa(b),h=p},null,{i:b});return{controlsDescendantBindings:!0}}};a.h.ta[b]=!1;a.f.Z[b]=!0}var a="undefined"!==typeof N?N:{};a.b=function(b,c){for(var d=b.split("."),e=a,f=0;f",c[0];);return 4a.a.o(c,b[d])&&c.push(b[d]);return c},fb:function(a,b){a=a||[];for(var c=[],d=0,e=a.length;de?d&&b.push(c):d||b.splice(e,1)},ka:f,extend:c,Xa:d,Ya:f?d:c,D:b,Ca:function(a,b){if(!a)return a;var c={},d;for(d in a)a.hasOwnProperty(d)&&(c[d]=b(a[d],d,a));return c},ob:function(b){for(;b.firstChild;)a.removeNode(b.firstChild)},jc:function(b){b=a.a.V(b);for(var c=(b[0]&&b[0].ownerDocument||u).createElement("div"),d=0,e=b.length;dh?a.setAttribute("selected",b):a.selected=b},$a:function(a){return null===a||a===n?"":a.trim?a.trim():a.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},nd:function(a,b){a=a||"";return b.length>a.length?!1:a.substring(0,b.length)===b},Mc:function(a,b){if(a===b)return!0;if(11===a.nodeType)return!1;if(b.contains)return b.contains(3===a.nodeType?a.parentNode:a);if(b.compareDocumentPosition)return 16==(b.compareDocumentPosition(a)&16);for(;a&&a!=b;)a=a.parentNode;return!!a},nb:function(b){return a.a.Mc(b,b.ownerDocument.documentElement)},Qb:function(b){return!!a.a.Sb(b,a.a.nb)},A:function(a){return a&&a.tagName&&a.tagName.toLowerCase()},Wb:function(b){return a.onError?function(){try{return b.apply(this,arguments)}catch(c){throw a.onError&&a.onError(c),c}}:b},setTimeout:function(b,c){return setTimeout(a.a.Wb(b),c)},$b:function(b){setTimeout(function(){a.onError&&a.onError(b);throw b},0)},p:function(b,c,d){var e=a.a.Wb(d);d=h&&m[c];if(a.options.useOnlyNativeEvents||d||!v)if(d||"function"!=typeof b.addEventListener)if("undefined"!=typeof b.attachEvent){var l=function(a){e.call(b,a)},f="on"+c;b.attachEvent(f,l);a.a.F.oa(b,function(){b.detachEvent(f,l)})}else throw Error("Browser doesn't support addEventListener or attachEvent");else b.addEventListener(c,e,!1);else v(b).bind(c,e)},Da:function(b,c){if(!b||!b.nodeType)throw Error("element must be a DOM node when calling triggerEvent");var d;"input"===a.a.A(b)&&b.type&&"click"==c.toLowerCase()?(d=b.type,d="checkbox"==d||"radio"==d):d=!1;if(a.options.useOnlyNativeEvents||!v||d)if("function"==typeof u.createEvent)if("function"==typeof b.dispatchEvent)d=u.createEvent(l[c]||"HTMLEvents"),d.initEvent(c,!0,!0,x,0,0,0,0,0,!1,!1,!1,!1,0,b),b.dispatchEvent(d);else throw Error("The supplied element doesn't support dispatchEvent");else if(d&&b.click)b.click();else if("undefined"!=typeof b.fireEvent)b.fireEvent("on"+c);else throw Error("Browser doesn't support triggering events");else v(b).trigger(c)},c:function(b){return a.H(b)?b():b},zb:function(b){return a.H(b)?b.t():b},bb:function(b,c,d){var h;c&&("object"===typeof b.classList?(h=b.classList[d?"add":"remove"],a.a.q(c.match(r),function(a){h.call(b.classList,a)})):"string"===typeof b.className.baseVal?e(b.className,"baseVal",c,d):e(b,"className",c,d))},Za:function(b,c){var d=a.a.c(c);if(null===d||d===n)d="";var e=a.f.firstChild(b);!e||3!=e.nodeType||a.f.nextSibling(e)?a.f.da(b,[b.ownerDocument.createTextNode(d)]):e.data=d;a.a.Rc(b)},rc:function(a,b){a.name=b;if(7>=h)try{a.mergeAttributes(u.createElement(""),!1)}catch(c){}},Rc:function(a){9<=h&&(a=1==a.nodeType?a:a.parentNode,a.style&&(a.style.zoom=a.style.zoom))},Nc:function(a){if(h){var b=a.style.width;a.style.width=0;a.style.width=b}},hd:function(b,c){b=a.a.c(b);c=a.a.c(c);for(var d=[],e=b;e<=c;e++)d.push(e);return d},V:function(a){for(var b=[],c=0,d=a.length;c",""],d=[3,"","
"],e=[1,""],f={thead:c,tbody:c,tfoot:c,tr:[2,"","
"],td:d,th:d,option:e,optgroup:e},g=8>=a.a.C;a.a.ma=function(c,d){var e;if(v)if(v.parseHTML)e=v.parseHTML(c,d)||[];else{if((e=v.clean([c],d))&&e[0]){for(var h=e[0];h.parentNode&&11!==h.parentNode.nodeType;)h=h.parentNode;h.parentNode&&h.parentNode.removeChild(h)}}else{(e=d)||(e=u);var h=e.parentWindow||e.defaultView||x,r=a.a.$a(c).toLowerCase(),q=e.createElement("div"),p;p=(r=r.match(/^<([a-z]+)[ >]/))&&f[r[1]]||b;r=p[0];p="ignored
"+p[1]+c+p[2]+"
";"function"==typeof h.innerShiv?q.appendChild(h.innerShiv(p)):(g&&e.appendChild(q),q.innerHTML=p,g&&q.parentNode.removeChild(q));for(;r--;)q=q.lastChild;e=a.a.V(q.lastChild.childNodes)}return e};a.a.Cb=function(b,c){a.a.ob(b);c=a.a.c(c);if(null!==c&&c!==n)if("string"!=typeof c&&(c=c.toString()),v)v(b).html(c);else for(var d=a.a.ma(c,b.ownerDocument),e=0;e"},xc:function(a,b){var f=c[a];if(f===n)throw Error("Couldn't find any memo with ID "+a+". Perhaps it's already been unmemoized.");try{return f.apply(null,b||[]),!0}finally{delete c[a]}},yc:function(c,e){var f=[];b(c,f);for(var g=0,k=f.length;gb){if(5e3<=++c){g=e;a.a.$b(Error("'Too much recursion' after processing "+c+" task groups."));break}b=e}try{m()}catch(h){a.a.$b(h)}}}function c(){b();g=e=d.length=0}var d=[],e=0,f=1,g=0;return{scheduler:x.MutationObserver?function(a){var b=u.createElement("div");new MutationObserver(a).observe(b,{attributes:!0});return function(){b.classList.toggle("foo")}}(c):u&&"onreadystatechange"in u.createElement("script")?function(a){var b=u.createElement("script");b.onreadystatechange=function(){b.onreadystatechange=null;u.documentElement.removeChild(b);b=null;a()};u.documentElement.appendChild(b)}:function(a){setTimeout(a,0)},Wa:function(b){e||a.Y.scheduler(c);d[e++]=b;return f++},cancel:function(a){a-=f-e;a>=g&&ad[0]?g+d[0]:d[0]),g);for(var g=1===t?g:Math.min(c+(d[1]||0),g),t=c+t-2,G=Math.max(g,t),P=[],n=[],Q=2;cc;c++)b=b();return b})};a.toJSON=function(b,c,d){b=a.wc(b);return a.a.Eb(b,c,d)};d.prototype={save:function(b,c){var d=a.a.o(this.keys,b);0<=d?this.Ib[d]=c:(this.keys.push(b),this.Ib.push(c))},get:function(b){b=a.a.o(this.keys,b);return 0<=b?this.Ib[b]:n}}})();a.b("toJS",a.wc);a.b("toJSON",a.toJSON);(function(){a.j={u:function(b){switch(a.a.A(b)){case"option":return!0===b.__ko__hasDomDataOptionValue__?a.a.e.get(b,a.d.options.xb):7>=a.a.C?b.getAttributeNode("value")&&b.getAttributeNode("value").specified?b.value:b.text:b.value;case"select":return 0<=b.selectedIndex?a.j.u(b.options[b.selectedIndex]):n;default:return b.value}},ha:function(b,c,d){switch(a.a.A(b)){case"option":switch(typeof c){case"string":a.a.e.set(b,a.d.options.xb,n);"__ko__hasDomDataOptionValue__"in b&&delete b.__ko__hasDomDataOptionValue__;b.value=c;break;default:a.a.e.set(b,a.d.options.xb,c),b.__ko__hasDomDataOptionValue__=!0,b.value="number"===typeof c?c:""}break;case"select":if(""===c||null===c)c=n;for(var e=-1,f=0,g=b.options.length,k;f=p){c.push(r&&k.length?{key:r,value:k.join("")}:{unknown:r||k.join("")});r=p=0;k=[];continue}}else if(58===t){if(!p&&!r&&1===k.length){r=k.pop();continue}}else 47===t&&A&&1"===u.createComment("test").text,g=f?/^\x3c!--\s*ko(?:\s+([\s\S]+))?\s*--\x3e$/:/^\s*ko(?:\s+([\s\S]+))?\s*$/,k=f?/^\x3c!--\s*\/ko\s*--\x3e$/:/^\s*\/ko\s*$/,l={ul:!0,ol:!0};a.f={Z:{},childNodes:function(a){return b(a)?d(a):a.childNodes},xa:function(c){if(b(c)){c=a.f.childNodes(c);for(var d=0,e=c.length;d=a.a.C&&b.tagName===c))return c};a.g.Ob=function(c,e,f,g){if(1===e.nodeType){var k=a.g.getComponentNameForNode(e);if(k){c=c||{};if(c.component)throw Error('Cannot use the "component" binding on a custom element matching a component');var l={name:k,params:b(e,f)};c.component=g?function(){return l}:l}}return c};var c=new a.Q;9>a.a.C&&(a.g.register=function(a){return function(b){u.createElement(b);return a.apply(this,arguments)}}(a.g.register),u.createDocumentFragment=function(b){return function(){var c=b(),f=a.g.Bc,g;for(g in f)f.hasOwnProperty(g)&&c.createElement(g);return c}}(u.createDocumentFragment))})();(function(b){function c(b,c,d){c=c.template;if(!c)throw Error("Component '"+b+"' has no template");b=a.a.ua(c);a.f.da(d,b)}function d(a,b,c,d){var e=a.createViewModel;return e?e.call(a,d,{element:b,templateNodes:c}):d}var e=0;a.d.component={init:function(f,g,k,l,m){function h(){var a=r&&r.dispose;"function"===typeof a&&a.call(r);q=r=null}var r,q,p=a.a.V(a.f.childNodes(f));a.a.F.oa(f,h);a.m(function(){var l=a.a.c(g()),k,t;"string"===typeof l?k=l:(k=a.a.c(l.name),t=a.a.c(l.params));if(!k)throw Error("No component name specified");var n=q=++e;a.g.get(k,function(e){if(q===n){h();if(!e)throw Error("Unknown component '"+k+"'");c(k,e,f);var g=d(e,f,p,t);e=m.createChildContext(g,b,function(a){a.$component=g;a.$componentTemplateNodes=p});r=g;a.eb(e,f)}})},null,{i:f});return{controlsDescendantBindings:!0}}};a.f.Z.component=!0})();var S={"class":"className","for":"htmlFor"};a.d.attr={update:function(b,c){var d=a.a.c(c())||{};a.a.D(d,function(c,d){d=a.a.c(d);var g=!1===d||null===d||d===n;g&&b.removeAttribute(c);8>=a.a.C&&c in S?(c=S[c],g?b.removeAttribute(c):b[c]=d):g||b.setAttribute(c,d.toString());"name"===c&&a.a.rc(b,g?"":d.toString())})}};(function(){a.d.checked={after:["value","attr"],init:function(b,c,d){function e(){var e=b.checked,f=p?g():e;if(!a.va.Sa()&&(!l||e)){var m=a.l.w(c);if(h){var k=r?m.t():m;q!==f?(e&&(a.a.pa(k,f,!0),a.a.pa(k,q,!1)),q=f):a.a.pa(k,f,e);r&&a.Ba(m)&&m(k)}else a.h.Ea(m,d,"checked",f,!0)}}function f(){var d=a.a.c(c());b.checked=h?0<=a.a.o(d,g()):k?d:g()===d}var g=a.nc(function(){return d.has("checkedValue")?a.a.c(d.get("checkedValue")):d.has("value")?a.a.c(d.get("value")):b.value}),k="checkbox"==b.type,l="radio"==b.type;if(k||l){var m=c(),h=k&&a.a.c(m)instanceof Array,r=!(h&&m.push&&m.splice),q=h?g():n,p=l||h;l&&!b.name&&a.d.uniqueName.init(b,function(){return!0});a.m(e,null,{i:b});a.a.p(b,"click",e);a.m(f,null,{i:b});m=n}}};a.h.ea.checked=!0;a.d.checkedValue={update:function(b,c){b.value=a.a.c(c())}}})();a.d.css={update:function(b,c){var d=a.a.c(c());null!==d&&"object"==typeof d?a.a.D(d,function(c,d){d=a.a.c(d);a.a.bb(b,c,d)}):(d=a.a.$a(String(d||"")),a.a.bb(b,b.__ko__cssValue,!1),b.__ko__cssValue=d,a.a.bb(b,d,!0))}};a.d.enable={update:function(b,c){var d=a.a.c(c());d&&b.disabled?b.removeAttribute("disabled"):d||b.disabled||(b.disabled=!0)}};a.d.disable={update:function(b,c){a.d.enable.update(b,function(){return!a.a.c(c())})}};a.d.event={init:function(b,c,d,e,f){var g=c()||{};a.a.D(g,function(g){"string"==typeof g&&a.a.p(b,g,function(b){var m,h=c()[g];if(h){try{var r=a.a.V(arguments);e=f.$data;r.unshift(e);m=h.apply(e,r)}finally{!0!==m&&(b.preventDefault?b.preventDefault():b.returnValue=!1)}!1===d.get(g+"Bubble")&&(b.cancelBubble=!0,b.stopPropagation&&b.stopPropagation())}})})}};a.d.foreach={ic:function(b){return function(){var c=b(),d=a.a.zb(c);if(!d||"number"==typeof d.length)return{foreach:c,templateEngine:a.W.sb};a.a.c(c);return{foreach:d.data,as:d.as,includeDestroyed:d.includeDestroyed,afterAdd:d.afterAdd,beforeRemove:d.beforeRemove,afterRender:d.afterRender,beforeMove:d.beforeMove,afterMove:d.afterMove,templateEngine:a.W.sb}}},init:function(b,c){return a.d.template.init(b,a.d.foreach.ic(c))},update:function(b,c,d,e,f){return a.d.template.update(b,a.d.foreach.ic(c),d,e,f)}};a.h.ta.foreach=!1;a.f.Z.foreach=!0;a.d.hasfocus={init:function(b,c,d){function e(e){b.__ko_hasfocusUpdating=!0;var f=b.ownerDocument;if("activeElement"in f){var g;try{g=f.activeElement}catch(h){g=f.body}e=g===b}f=c();a.h.Ea(f,d,"hasfocus",e,!0);b.__ko_hasfocusLastValue=e;b.__ko_hasfocusUpdating=!1}var f=e.bind(null,!0),g=e.bind(null,!1);a.a.p(b,"focus",f);a.a.p(b,"focusin",f);a.a.p(b,"blur",g);a.a.p(b,"focusout",g)},update:function(b,c){var d=!!a.a.c(c());b.__ko_hasfocusUpdating||b.__ko_hasfocusLastValue===d||(d?b.focus():b.blur(),!d&&b.__ko_hasfocusLastValue&&b.ownerDocument.body.focus(),a.l.w(a.a.Da,null,[b,d?"focusin":"focusout"]))}};a.h.ea.hasfocus=!0;a.d.hasFocus=a.d.hasfocus;a.h.ea.hasFocus=!0;a.d.html={init:function(){return{controlsDescendantBindings:!0}},update:function(b,c){a.a.Cb(b,c())}};K("if");K("ifnot",!1,!0);K("with",!0,!1,function(a,c){return a.createChildContext(c)});var L={};a.d.options={init:function(b){if("select"!==a.a.A(b))throw Error("options binding applies only to SELECT elements");for(;0a.a.C)var g=a.a.e.I(),k=a.a.e.I(),l=function(b){var c=this.activeElement;(c=c&&a.a.e.get(c,k))&&c(b)},m=function(b,c){var d=b.ownerDocument;a.a.e.get(d,g)||(a.a.e.set(d,g,!0),a.a.p(d,"selectionchange",l));a.a.e.set(b,k,c)};a.d.textInput={init:function(b,d,g){function l(c,d){a.a.p(b,c,d)}function k(){var c=a.a.c(d());if(null===c||c===n)c="";v!==n&&c===v?a.a.setTimeout(k,4):b.value!==c&&(u=c,b.value=c)}function y(){s||(v=b.value,s=a.a.setTimeout(t,4))}function t(){clearTimeout(s);v=s=n;var c=b.value;u!==c&&(u=c,a.h.Ea(d(),g,"textInput",c))}var u=b.value,s,v,x=9==a.a.C?y:t;10>a.a.C?(l("propertychange",function(a){"value"===a.propertyName&&x(a)}),8==a.a.C&&(l("keyup",t),l("keydown",t)),8<=a.a.C&&(m(b,x),l("dragend",y))):(l("input",t),5>e&&"textarea"===a.a.A(b)?(l("keydown",y),l("paste",y),l("cut",y)):11>c?l("keydown",y):4>f&&(l("DOMAutoComplete",t),l("dragdrop",t),l("drop",t)));l("change",t);a.m(k,null,{i:b})}};a.h.ea.textInput=!0;a.d.textinput={preprocess:function(a,b,c){c("textInput",a)}}})();a.d.uniqueName={init:function(b,c){if(c()){var d="ko_unique_"+ ++a.d.uniqueName.Ic;a.a.rc(b,d)}}};a.d.uniqueName.Ic=0;a.d.value={after:["options","foreach"],init:function(b,c,d){if("input"!=b.tagName.toLowerCase()||"checkbox"!=b.type&&"radio"!=b.type){var e=["change"],f=d.get("valueUpdate"),g=!1,k=null;f&&("string"==typeof f&&(f=[f]),a.a.ra(e,f),e=a.a.Tb(e));var l=function(){k=null;g=!1;var e=c(),f=a.j.u(b);a.h.Ea(e,d,"value",f)};!a.a.C||"input"!=b.tagName.toLowerCase()||"text"!=b.type||"off"==b.autocomplete||b.form&&"off"==b.form.autocomplete||-1!=a.a.o(e,"propertychange")||(a.a.p(b,"propertychange",function(){g=!0}),a.a.p(b,"focus",function(){g=!1}),a.a.p(b,"blur",function(){g&&l()}));a.a.q(e,function(c){var d=l;a.a.nd(c,"after")&&(d=function(){k=a.j.u(b);a.a.setTimeout(l,0)},c=c.substring(5));a.a.p(b,c,d)});var m=function(){var e=a.a.c(c()),f=a.j.u(b);if(null!==k&&e===k)a.a.setTimeout(m,0);else if(e!==f)if("select"===a.a.A(b)){var g=d.get("valueAllowUnset"),f=function(){a.j.ha(b,e,g)};f();g||e===a.j.u(b)?a.a.setTimeout(f,0):a.l.w(a.a.Da,null,[b,"change"])}else a.j.ha(b,e)};a.m(m,null,{i:b})}else a.Ja(b,{checkedValue:c})},update:function(){}};a.h.ea.value=!0;a.d.visible={update:function(b,c){var d=a.a.c(c()),e="none"!=b.style.display;d&&!e?b.style.display="":!d&&e&&(b.style.display="none")}};(function(b){a.d[b]={init:function(c,d,e,f,g){return a.d.event.init.call(this,c,function(){var a={};a[b]=d();return a},e,f,g)}}})("click");a.O=function(){};a.O.prototype.renderTemplateSource=function(){throw Error("Override renderTemplateSource")};a.O.prototype.createJavaScriptEvaluatorBlock=function(){throw Error("Override createJavaScriptEvaluatorBlock")};a.O.prototype.makeTemplateSource=function(b,c){if("string"==typeof b){c=c||u;var d=c.getElementById(b);if(!d)throw Error("Cannot find template with ID "+b);return new a.v.n(d)}if(1==b.nodeType||8==b.nodeType)return new a.v.qa(b);throw Error("Unknown template type: "+b)};a.O.prototype.renderTemplate=function(a,c,d,e){a=this.makeTemplateSource(a,e);return this.renderTemplateSource(a,c,d,e)};a.O.prototype.isTemplateRewritten=function(a,c){return!1===this.allowTemplateRewriting?!0:this.makeTemplateSource(a,c).data("isRewritten")};a.O.prototype.rewriteTemplate=function(a,c,d){a=this.makeTemplateSource(a,d);c=c(a.text());a.text(c);a.data("isRewritten",!0)};a.b("templateEngine",a.O);a.Gb=function(){function b(b,c,d,k){b=a.h.yb(b);for(var l=a.h.ta,m=0;m]*))?)*\s+)data-bind\s*=\s*(["'])([\s\S]*?)\3/gi,d=/\x3c!--\s*ko\b\s*([\s\S]*?)\s*--\x3e/g;return{Oc:function(b,c,d){c.isTemplateRewritten(b,d)||c.rewriteTemplate(b,function(b){return a.Gb.dd(b,c)},d)},dd:function(a,f){return a.replace(c,function(a,c,d,e,h){return b(h,c,d,f)}).replace(d,function(a,c){return b(c,"","#comment",f)})},Ec:function(b,c){return a.M.wb(function(d,k){var l=d.nextSibling;l&&l.nodeName.toLowerCase()===c&&a.Ja(l,b,k)})}}}();a.b("__tr_ambtns",a.Gb.Ec);(function(){a.v={};a.v.n=function(b){if(this.n=b){var c=a.a.A(b);this.ab="script"===c?1:"textarea"===c?2:"template"==c&&b.content&&11===b.content.nodeType?3:4}};a.v.n.prototype.text=function(){var b=1===this.ab?"text":2===this.ab?"value":"innerHTML";if(0==arguments.length)return this.n[b];var c=arguments[0];"innerHTML"===b?a.a.Cb(this.n,c):this.n[b]=c};var b=a.a.e.I()+"_";a.v.n.prototype.data=function(c){if(1===arguments.length)return a.a.e.get(this.n,b+c);a.a.e.set(this.n,b+c,arguments[1])};var c=a.a.e.I();a.v.n.prototype.nodes=function(){var b=this.n;if(0==arguments.length)return(a.a.e.get(b,c)||{}).jb||(3===this.ab?b.content:4===this.ab?b:n);a.a.e.set(b,c,{jb:arguments[0]})};a.v.qa=function(a){this.n=a};a.v.qa.prototype=new a.v.n;a.v.qa.prototype.text=function(){if(0==arguments.length){var b=a.a.e.get(this.n,c)||{};b.Hb===n&&b.jb&&(b.Hb=b.jb.innerHTML);return b.Hb}a.a.e.set(this.n,c,{Hb:arguments[0]})};a.b("templateSources",a.v);a.b("templateSources.domElement",a.v.n);a.b("templateSources.anonymousTemplate",a.v.qa)})();(function(){function b(b,c,d){var e;for(c=a.f.nextSibling(c);b&&(e=b)!==c;)b=a.f.nextSibling(e),d(e,b)}function c(c,d){if(c.length){var e=c[0],f=c[c.length-1],g=e.parentNode,k=a.Q.instance,n=k.preprocessNode;if(n){b(e,f,function(a,b){var c=a.previousSibling,d=n.call(k,a);d&&(a===e&&(e=d[0]||b),a===f&&(f=d[d.length-1]||c))});c.length=0;if(!e)return;e===f?c.push(e):(c.push(e,f),a.a.za(c,g))}b(e,f,function(b){1!==b.nodeType&&8!==b.nodeType||a.Rb(d,b)});b(e,f,function(b){1!==b.nodeType&&8!==b.nodeType||a.M.yc(b,[d])});a.a.za(c,g)}}function d(a){return a.nodeType?a:0a.a.C?0:b.nodes)?b.nodes():null)return a.a.V(c.cloneNode(!0).childNodes);b=b.text();return a.a.ma(b,e)};a.W.sb=new a.W;a.Db(a.W.sb);a.b("nativeTemplateEngine",a.W);(function(){a.vb=function(){var a=this.$c=function(){if(!v||!v.tmpl)return 0;try{if(0<=v.tmpl.tag.tmpl.open.toString().indexOf("__"))return 2}catch(a){}return 1}();this.renderTemplateSource=function(b,e,f,g){g=g||u;f=f||{};if(2>a)throw Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later.");var k=b.data("precompiled");k||(k=b.text()||"",k=v.template(null,"{{ko_with $item.koBindingContext}}"+k+"{{/ko_with}}"),b.data("precompiled",k));b=[e.$data];e=v.extend({koBindingContext:e},f.templateOptions);e=v.tmpl(k,b,e);e.appendTo(g.createElement("div"));v.fragments={};return e};this.createJavaScriptEvaluatorBlock=function(a){return"{{ko_code ((function() { return "+a+" })()) }}"};this.addTemplate=function(a,b){u.write("")};0]*src="[^"<>]*"[^<>]*)\\s?\\/?>',i=RegExp(o,"i");return e=e.replace(/<[^<>]*>?/gi,function(e){var t,o,l,a,u;if(/(^<->|^<-\s|^<3\s)/.test(e))return e;if(t=e.match(i)){var m=t[1];if(o=n(m.match(/src="([^"<>]*)"/i)[1]),l=m.match(/alt="([^"<>]*)"/i),l=l&&"undefined"!=typeof l[1]?l[1]:"",a=m.match(/title="([^"<>]*)"/i),a=a&&"undefined"!=typeof a[1]?a[1]:"",o&&/^https?:\/\//i.test(o))return""!==c?''+l+'':''+l+''}return u=d.indexOf("a"),t=e.match(r),t&&(a="undefined"!=typeof t[2]?t[2]:"",o=n(t[1]),o&&/^(?:https?:\/\/|ftp:\/\/|mailto:|xmpp:)/i.test(o))?(p=!0,h[u]+=1,''):(t=/<\/a>/i.test(e))?(p=!0,h[u]-=1,h[u]<0&&(g[u]=!0),""):(t=e.match(/<(br|hr)\s?\/?>/i))?"<"+t[1].toLowerCase()+">":(t=e.match(/<(\/?)(b|blockquote|code|em|h[1-6]|li|ol(?: start="\d+")?|p|pre|s|sub|sup|strong|ul)>/i),t&&!/<\/ol start="\d+"/i.test(e)?(p=!0,u=d.indexOf(t[2].toLowerCase().split(" ")[0]),"/"===t[1]?h[u]-=1:h[u]+=1,h[u]<0&&(g[u]=!0),"<"+t[1]+t[2].toLowerCase()+">"):s===!0?"":f(e))})}function o(e){var t,n,o;for(a=0;a]*" title="[^"<>]*" target="_blank">',"g"):"ol"===t?//g:RegExp("<"+t+">","g"),r=RegExp("","g"),u===!0?(e=e.replace(n,""),e=e.replace(r,"")):(e=e.replace(n,function(e){return f(e)}),e=e.replace(r,function(e){return f(e)})),e}function n(e){var n;for(n=0;n`\\x00-\\x20]+",o="'[^']*'",i='"[^"]*"',a="(?:"+s+"|"+o+"|"+i+")",c="(?:\\s+"+n+"(?:\\s*=\\s*"+a+")?)",l="<[A-Za-z][A-Za-z0-9\\-]*"+c+"*\\s*\\/?>",u="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",p="|",h="<[?].*?[?]>",f="]*>",d="",m=new RegExp("^(?:"+l+"|"+u+"|"+p+"|"+h+"|"+f+"|"+d+")"),g=new RegExp("^(?:"+l+"|"+u+")");r.exports.HTML_TAG_RE=m,r.exports.HTML_OPEN_CLOSE_TAG_RE=g},{}],4:[function(e,r,t){"use strict";function n(e){return Object.prototype.toString.call(e)}function s(e){return"[object String]"===n(e)}function o(e,r){return x.call(e,r)}function i(e){var r=Array.prototype.slice.call(arguments,1);return r.forEach(function(r){if(r){if("object"!=typeof r)throw new TypeError(r+"must be object");Object.keys(r).forEach(function(t){e[t]=r[t]})}}),e}function a(e,r,t){return[].concat(e.slice(0,r),t,e.slice(r+1))}function c(e){return e>=55296&&57343>=e?!1:e>=64976&&65007>=e?!1:65535===(65535&e)||65534===(65535&e)?!1:e>=0&&8>=e?!1:11===e?!1:e>=14&&31>=e?!1:e>=127&&159>=e?!1:!(e>1114111)}function l(e){if(e>65535){e-=65536;var r=55296+(e>>10),t=56320+(1023&e);return String.fromCharCode(r,t)}return String.fromCharCode(e)}function u(e,r){var t=0;return o(q,r)?q[r]:35===r.charCodeAt(0)&&w.test(r)&&(t="x"===r[1].toLowerCase()?parseInt(r.slice(2),16):parseInt(r.slice(1),10),c(t))?l(t):e}function p(e){return e.indexOf("\\")<0?e:e.replace(y,"$1")}function h(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(A,function(e,r,t){return r?r:u(e,t)})}function f(e){return S[e]}function d(e){return D.test(e)?e.replace(E,f):e}function m(e){return e.replace(F,"\\$&")}function g(e){switch(e){case 9:case 32:return!0}return!1}function _(e){if(e>=8192&&8202>=e)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function k(e){return L.test(e)}function b(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function v(e){return e.trim().replace(/\s+/g," ").toUpperCase()}var x=Object.prototype.hasOwnProperty,y=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,C=/&([a-z#][a-z0-9]{1,31});/gi,A=new RegExp(y.source+"|"+C.source,"gi"),w=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,q=e("./entities"),D=/[&<>"]/,E=/[&<>"]/g,S={"&":"&","<":"<",">":">",'"':"""},F=/[.?*+^$[\]\\(){}|-]/g,L=e("uc.micro/categories/P/regex");t.lib={},t.lib.mdurl=e("mdurl"),t.lib.ucmicro=e("uc.micro"),t.assign=i,t.isString=s,t.has=o,t.unescapeMd=p,t.unescapeAll=h,t.isValidEntityCode=c,t.fromCodePoint=l,t.escapeHtml=d,t.arrayReplaceAt=a,t.isSpace=g,t.isWhiteSpace=_,t.isMdAsciiPunct=b,t.isPunctChar=k,t.escapeRE=m,t.normalizeReference=v},{"./entities":1,mdurl:59,"uc.micro":65,"uc.micro/categories/P/regex":63}],5:[function(e,r,t){"use strict";t.parseLinkLabel=e("./parse_link_label"),t.parseLinkDestination=e("./parse_link_destination"),t.parseLinkTitle=e("./parse_link_title")},{"./parse_link_destination":6,"./parse_link_label":7,"./parse_link_title":8}],6:[function(e,r,t){"use strict";var n=e("../common/utils").isSpace,s=e("../common/utils").unescapeAll;r.exports=function(e,r,t){var o,i,a=0,c=r,l={ok:!1,pos:0,lines:0,str:""};if(60===e.charCodeAt(r)){for(r++;t>r;){if(o=e.charCodeAt(r),10===o||n(o))return l;if(62===o)return l.pos=r+1,l.str=s(e.slice(c+1,r)),l.ok=!0,l;92===o&&t>r+1?r+=2:r++}return l}for(i=0;t>r&&(o=e.charCodeAt(r),32!==o)&&!(32>o||127===o);)if(92===o&&t>r+1)r+=2;else{if(40===o&&(i++,i>1))break;if(41===o&&(i--,0>i))break;r++}return c===r?l:(l.str=s(e.slice(c,r)),l.lines=a,l.pos=r,l.ok=!0,l)}},{"../common/utils":4}],7:[function(e,r,t){"use strict";r.exports=function(e,r,t){var n,s,o,i,a=-1,c=e.posMax,l=e.pos;for(e.pos=r+1,n=1;e.pos=t)return c;if(o=e.charCodeAt(r),34!==o&&39!==o&&40!==o)return c;for(r++,40===o&&(o=41);t>r;){if(s=e.charCodeAt(r),s===o)return c.pos=r+1,c.lines=i,c.str=n(e.slice(a+1,r)),c.ok=!0,c;10===s?i++:92===s&&t>r+1&&(r++,10===e.charCodeAt(r)&&i++),r++}return c}},{"../common/utils":4}],9:[function(e,r,t){"use strict";function n(e){var r=e.trim().toLowerCase();return _.test(r)?!!k.test(r):!0}function s(e){var r=d.parse(e,!0);if(r.hostname&&(!r.protocol||b.indexOf(r.protocol)>=0))try{r.hostname=m.toASCII(r.hostname)}catch(t){}return d.encode(d.format(r))}function o(e){var r=d.parse(e,!0);if(r.hostname&&(!r.protocol||b.indexOf(r.protocol)>=0))try{r.hostname=m.toUnicode(r.hostname)}catch(t){}return d.decode(d.format(r))}function i(e,r){return this instanceof i?(r||a.isString(e)||(r=e||{},e="default"),this.inline=new h,this.block=new p,this.core=new u,this.renderer=new l,this.linkify=new f,this.validateLink=n,this.normalizeLink=s,this.normalizeLinkText=o,this.utils=a,this.helpers=c,this.options={},this.configure(e),void(r&&this.set(r))):new i(e,r)}var a=e("./common/utils"),c=e("./helpers"),l=e("./renderer"),u=e("./parser_core"),p=e("./parser_block"),h=e("./parser_inline"),f=e("linkify-it"),d=e("mdurl"),m=e("punycode"),g={"default":e("./presets/default"),zero:e("./presets/zero"),commonmark:e("./presets/commonmark")},_=/^(vbscript|javascript|file|data):/,k=/^data:image\/(gif|png|jpeg|webp);/,b=["http:","https:","mailto:"];i.prototype.set=function(e){return a.assign(this.options,e),this},i.prototype.configure=function(e){var r,t=this;if(a.isString(e)&&(r=e,e=g[r],!e))throw new Error('Wrong `markdown-it` preset "'+r+'", check name');if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(r){e.components[r].rules&&t[r].ruler.enableOnly(e.components[r].rules),e.components[r].rules2&&t[r].ruler2.enableOnly(e.components[r].rules2)}),this},i.prototype.enable=function(e,r){var t=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(r){t=t.concat(this[r].ruler.enable(e,!0))},this),t=t.concat(this.inline.ruler2.enable(e,!0));var n=e.filter(function(e){return t.indexOf(e)<0});if(n.length&&!r)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+n);return this},i.prototype.disable=function(e,r){var t=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(r){t=t.concat(this[r].ruler.disable(e,!0))},this),t=t.concat(this.inline.ruler2.disable(e,!0));var n=e.filter(function(e){return t.indexOf(e)<0});if(n.length&&!r)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+n);return this},i.prototype.use=function(e){var r=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,r),this},i.prototype.parse=function(e,r){var t=new this.core.State(e,this,r);return this.core.process(t),t.tokens},i.prototype.render=function(e,r){return r=r||{},this.renderer.render(this.parse(e,r),this.options,r)},i.prototype.parseInline=function(e,r){var t=new this.core.State(e,this,r);return t.inlineMode=!0,this.core.process(t),t.tokens},i.prototype.renderInline=function(e,r){return r=r||{},this.renderer.render(this.parseInline(e,r),this.options,r)},r.exports=i},{"./common/utils":4,"./helpers":5,"./parser_block":10,"./parser_core":11,"./parser_inline":12,"./presets/commonmark":13,"./presets/default":14,"./presets/zero":15,"./renderer":16,"linkify-it":54,mdurl:59,punycode:52}],10:[function(e,r,t){"use strict";function n(){this.ruler=new s;for(var e=0;ea&&(e.line=a=e.skipEmptyLines(a),!(a>=t))&&!(e.sCount[a]=l){e.line=t;break}for(s=0;i>s&&!(n=o[s](e,a,t,!1));s++);if(e.tight=!c,e.isEmpty(e.line-1)&&(c=!0),a=e.line,t>a&&e.isEmpty(a)){if(c=!0,a++,t>a&&"list"===e.parentType&&e.isEmpty(a))break;e.line=a}}},n.prototype.parse=function(e,r,t,n){var s;e&&(s=new this.State(e,r,t,n),this.tokenize(s,s.line,s.lineMax))},n.prototype.State=e("./rules_block/state_block"),r.exports=n},{"./ruler":17,"./rules_block/blockquote":18,"./rules_block/code":19,"./rules_block/fence":20,"./rules_block/heading":21,"./rules_block/hr":22,"./rules_block/html_block":23,"./rules_block/lheading":24,"./rules_block/list":25,"./rules_block/paragraph":26,"./rules_block/reference":27,"./rules_block/state_block":28,"./rules_block/table":29}],11:[function(e,r,t){"use strict";function n(){this.ruler=new s;for(var e=0;er;r++)n[r](e)},n.prototype.State=e("./rules_core/state_core"),r.exports=n},{"./ruler":17,"./rules_core/block":30,"./rules_core/inline":31,"./rules_core/linkify":32,"./rules_core/normalize":33,"./rules_core/replacements":34,"./rules_core/smartquotes":35,"./rules_core/state_core":36}],12:[function(e,r,t){"use strict";function n(){var e;for(this.ruler=new s,e=0;et&&(e.level++,r=s[t](e,!0),e.level--,!r);t++);else e.pos=e.posMax;r||e.pos++,a[n]=e.pos},n.prototype.tokenize=function(e){for(var r,t,n=this.ruler.getRules(""),s=n.length,o=e.posMax,i=e.md.options.maxNesting;e.post&&!(r=n[t](e,!1));t++);if(r){if(e.pos>=o)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},n.prototype.parse=function(e,r,t,n){var s,o,i,a=new this.State(e,r,t,n);for(this.tokenize(a),o=this.ruler2.getRules(""),i=o.length,s=0;i>s;s++)o[s](a)},n.prototype.State=e("./rules_inline/state_inline"),r.exports=n},{"./ruler":17,"./rules_inline/autolink":37,"./rules_inline/backticks":38,"./rules_inline/balance_pairs":39,"./rules_inline/emphasis":40,"./rules_inline/entity":41,"./rules_inline/escape":42,"./rules_inline/html_inline":43,"./rules_inline/image":44,"./rules_inline/link":45,"./rules_inline/newline":46,"./rules_inline/state_inline":47,"./rules_inline/strikethrough":48,"./rules_inline/text":49,"./rules_inline/text_collapse":50}],13:[function(e,r,t){"use strict";r.exports={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","text_collapse"]}}}},{}],14:[function(e,r,t){"use strict";r.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}}},{}],15:[function(e,r,t){"use strict";r.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","text_collapse"]}}}},{}],16:[function(e,r,t){"use strict";function n(){this.rules=s({},a)}var s=e("./common/utils").assign,o=e("./common/utils").unescapeAll,i=e("./common/utils").escapeHtml,a={};a.code_inline=function(e,r){return""+i(e[r].content)+""},a.code_block=function(e,r){return"
"+i(e[r].content)+"
\n"},a.fence=function(e,r,t,n,s){var a,c=e[r],l=c.info?o(c.info).trim():"",u="";return l&&(u=l.split(/\s+/g)[0],c.attrJoin("class",t.langPrefix+u)),a=t.highlight?t.highlight(c.content,u)||i(c.content):i(c.content),0===a.indexOf(""+a+"\n"},a.image=function(e,r,t,n,s){var o=e[r];return o.attrs[o.attrIndex("alt")][1]=s.renderInlineAsText(o.children,t,n),s.renderToken(e,r,t)},a.hardbreak=function(e,r,t){return t.xhtmlOut?"
\n":"
\n"},a.softbreak=function(e,r,t){return t.breaks?t.xhtmlOut?"
\n":"
\n":"\n"},a.text=function(e,r){return i(e[r].content)},a.html_block=function(e,r){return e[r].content},a.html_inline=function(e,r){return e[r].content},n.prototype.renderAttrs=function(e){var r,t,n;if(!e.attrs)return"";for(n="",r=0,t=e.attrs.length;t>r;r++)n+=" "+i(e.attrs[r][0])+'="'+i(e.attrs[r][1])+'"';return n},n.prototype.renderToken=function(e,r,t){var n,s="",o=!1,i=e[r];return i.hidden?"":(i.block&&-1!==i.nesting&&r&&e[r-1].hidden&&(s+="\n"),s+=(-1===i.nesting?"\n":">")},n.prototype.renderInline=function(e,r,t){for(var n,s="",o=this.rules,i=0,a=e.length;a>i;i++)n=e[i].type,s+="undefined"!=typeof o[n]?o[n](e,i,r,t,this):this.renderToken(e,i,r);return s},n.prototype.renderInlineAsText=function(e,r,t){for(var n="",s=this.rules,o=0,i=e.length;i>o;o++)"text"===e[o].type?n+=s.text(e,o,r,t,this):"image"===e[o].type&&(n+=this.renderInlineAsText(e[o].children,r,t));return n},n.prototype.render=function(e,r,t){var n,s,o,i="",a=this.rules;for(n=0,s=e.length;s>n;n++)o=e[n].type,i+="inline"===o?this.renderInline(e[n].children,r,t):"undefined"!=typeof a[o]?a[e[n].type](e,n,r,t,this):this.renderToken(e,n,r,t);return i},r.exports=n},{"./common/utils":4}],17:[function(e,r,t){"use strict";function n(){this.__rules__=[],this.__cache__=null}n.prototype.__find__=function(e){for(var r=0;rn){if(r)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[n].enabled=!0,t.push(e)},this),this.__cache__=null,t},n.prototype.enableOnly=function(e,r){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(e){e.enabled=!1}),this.enable(e,r)},n.prototype.disable=function(e,r){Array.isArray(e)||(e=[e]);var t=[];return e.forEach(function(e){var n=this.__find__(e);if(0>n){if(r)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[n].enabled=!1,t.push(e)},this),this.__cache__=null,t},n.prototype.getRules=function(e){return null===this.__cache__&&this.__compile__(),this.__cache__[e]||[]},r.exports=n},{}],18:[function(e,r,t){"use strict";var n=e("../common/utils").isSpace;r.exports=function(e,r,t,s){var o,i,a,c,l,u,p,h,f,d,m,g,_,k,b,v,x=e.bMarks[r]+e.tShift[r],y=e.eMarks[r];if(62!==e.src.charCodeAt(x++))return!1;if(s)return!0;for(32===e.src.charCodeAt(x)&&x++,u=e.blkIndent,e.blkIndent=0,f=d=e.sCount[r]+x-(e.bMarks[r]+e.tShift[r]),l=[e.bMarks[r]],e.bMarks[r]=x;y>x&&(m=e.src.charCodeAt(x),n(m));)9===m?d+=4-d%4:d++,x++;for(i=x>=y,c=[e.sCount[r]],e.sCount[r]=d-f,a=[e.tShift[r]],e.tShift[r]=x-e.bMarks[r],g=e.md.block.ruler.getRules("blockquote"),o=r+1;t>o&&!(e.sCount[o]=y));o++)if(62!==e.src.charCodeAt(x++)){if(i)break;for(v=!1,k=0,b=g.length;b>k;k++)if(g[k](e,o,t,!0)){v=!0;break}if(v)break;l.push(e.bMarks[o]),a.push(e.tShift[o]),c.push(e.sCount[o]),e.sCount[o]=-1}else{for(32===e.src.charCodeAt(x)&&x++,f=d=e.sCount[o]+x-(e.bMarks[o]+e.tShift[o]),l.push(e.bMarks[o]),e.bMarks[o]=x;y>x&&(m=e.src.charCodeAt(x),n(m));)9===m?d+=4-d%4:d++,x++;i=x>=y,c.push(e.sCount[o]),e.sCount[o]=d-f,a.push(e.tShift[o]),e.tShift[o]=x-e.bMarks[o]}for(p=e.parentType,e.parentType="blockquote",_=e.push("blockquote_open","blockquote",1),_.markup=">",_.map=h=[r,0],e.md.block.tokenize(e,r,o),_=e.push("blockquote_close","blockquote",-1),_.markup=">",e.parentType=p,h[1]=e.line,k=0;kn;)if(e.isEmpty(n)){if(i++,i>=2&&"list"===e.parentType)break;n++}else{if(i=0,!(e.sCount[n]-e.blkIndent>=4))break;n++,s=n}return e.line=s,o=e.push("code_block","code",0),o.content=e.getLines(r,s,4+e.blkIndent,!0),o.map=[r,e.line],!0}},{}],20:[function(e,r,t){"use strict";r.exports=function(e,r,t,n){var s,o,i,a,c,l,u,p=!1,h=e.bMarks[r]+e.tShift[r],f=e.eMarks[r];if(h+3>f)return!1;if(s=e.src.charCodeAt(h),126!==s&&96!==s)return!1;if(c=h,h=e.skipChars(h,s),o=h-c,3>o)return!1;if(u=e.src.slice(c,h),i=e.src.slice(h,f),i.indexOf("`")>=0)return!1;if(n)return!0;for(a=r;(a++,!(a>=t))&&(h=c=e.bMarks[a]+e.tShift[a],f=e.eMarks[a],!(f>h&&e.sCount[a]=4||(h=e.skipChars(h,s),o>h-c||(h=e.skipSpaces(h),f>h)))){p=!0;break}return o=e.sCount[r],e.line=a+(p?1:0),l=e.push("fence","code",0),l.info=i,l.content=e.getLines(r+1,a,o,!0),l.markup=u,l.map=[r,e.line],!0}},{}],21:[function(e,r,t){"use strict";var n=e("../common/utils").isSpace;r.exports=function(e,r,t,s){var o,i,a,c,l=e.bMarks[r]+e.tShift[r],u=e.eMarks[r];if(o=e.src.charCodeAt(l),35!==o||l>=u)return!1;for(i=1,o=e.src.charCodeAt(++l);35===o&&u>l&&6>=i;)i++,o=e.src.charCodeAt(++l);return i>6||u>l&&32!==o?!1:s?!0:(u=e.skipSpacesBack(u,l),a=e.skipCharsBack(u,35,l),a>l&&n(e.src.charCodeAt(a-1))&&(u=a),e.line=r+1,c=e.push("heading_open","h"+String(i),1),c.markup="########".slice(0,i),c.map=[r,e.line],c=e.push("inline","",0),c.content=e.src.slice(l,u).trim(),c.map=[r,e.line],c.children=[],c=e.push("heading_close","h"+String(i),-1),c.markup="########".slice(0,i),!0)}},{"../common/utils":4}],22:[function(e,r,t){"use strict";var n=e("../common/utils").isSpace;r.exports=function(e,r,t,s){var o,i,a,c,l=e.bMarks[r]+e.tShift[r],u=e.eMarks[r];if(o=e.src.charCodeAt(l++),42!==o&&45!==o&&95!==o)return!1;for(i=1;u>l;){if(a=e.src.charCodeAt(l++),a!==o&&!n(a))return!1;a===o&&i++}return 3>i?!1:s?!0:(e.line=r+1,c=e.push("hr","hr",0),c.map=[r,e.line],c.markup=Array(i+1).join(String.fromCharCode(o)),!0)}},{"../common/utils":4}],23:[function(e,r,t){"use strict";var n=e("../common/html_blocks"),s=e("../common/html_re").HTML_OPEN_CLOSE_TAG_RE,o=[[/^<(script|pre|style)(?=(\s|>|$))/i,/<\/(script|pre|style)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(s.source+"\\s*$"),/^$/,!1]];r.exports=function(e,r,t,n){var s,i,a,c,l=e.bMarks[r]+e.tShift[r],u=e.eMarks[r];if(!e.md.options.html)return!1;if(60!==e.src.charCodeAt(l))return!1;for(c=e.src.slice(l,u),s=0;si&&!(e.sCount[i]h&&!e.isEmpty(h);h++)if(!(e.sCount[h]-e.blkIndent>3)){if(e.sCount[h]>=e.blkIndent&&(c=e.bMarks[h]+e.tShift[h],l=e.eMarks[h],l>c&&(p=e.src.charCodeAt(c),(45===p||61===p)&&(c=e.skipChars(c,p),c=e.skipSpaces(c),c>=l)))){u=61===p?1:2;break}if(!(e.sCount[h]<0)){for(s=!1,o=0,i=f.length;i>o;o++)if(f[o](e,h,t,!0)){s=!0;break}if(s)break}}return u?(n=e.getLines(r,h,e.blkIndent,!1).trim(),e.line=h+1,a=e.push("heading_open","h"+String(u),1),a.markup=String.fromCharCode(p),a.map=[r,e.line],a=e.push("inline","",0),a.content=n,a.map=[r,e.line-1],a.children=[],a=e.push("heading_close","h"+String(u),-1),a.markup=String.fromCharCode(p),!0):!1}},{}],25:[function(e,r,t){"use strict";function n(e,r){var t,n,s,o;return n=e.bMarks[r]+e.tShift[r],s=e.eMarks[r],t=e.src.charCodeAt(n++),42!==t&&45!==t&&43!==t?-1:s>n&&(o=e.src.charCodeAt(n),!i(o))?-1:n}function s(e,r){var t,n=e.bMarks[r]+e.tShift[r],s=n,o=e.eMarks[r];if(s+1>=o)return-1;if(t=e.src.charCodeAt(s++),48>t||t>57)return-1;for(;;){if(s>=o)return-1;t=e.src.charCodeAt(s++);{if(!(t>=48&&57>=t)){if(41===t||46===t)break;return-1}if(s-n>=10)return-1}}return o>s&&(t=e.src.charCodeAt(s),!i(t))?-1:s}function o(e,r){var t,n,s=e.level+2;for(t=r+2,n=e.tokens.length-2;n>t;t++)e.tokens[t].level===s&&"paragraph_open"===e.tokens[t].type&&(e.tokens[t+2].hidden=!0,e.tokens[t].hidden=!0,t+=2)}var i=e("../common/utils").isSpace;r.exports=function(e,r,t,a){var c,l,u,p,h,f,d,m,g,_,k,b,v,x,y,C,A,w,q,D,E,S,F,L,z,T,R,M,I=!0;if((k=s(e,r))>=0)w=!0;else{if(!((k=n(e,r))>=0))return!1;w=!1}if(A=e.src.charCodeAt(k-1),a)return!0;for(D=e.tokens.length,w?(_=e.bMarks[r]+e.tShift[r],C=Number(e.src.substr(_,k-_-1)),z=e.push("ordered_list_open","ol",1),1!==C&&(z.attrs=[["start",C]])):z=e.push("bullet_list_open","ul",1),z.map=S=[r,0],z.markup=String.fromCharCode(A),c=r,E=!1,L=e.md.block.ruler.getRules("list");t>c;){for(v=k,x=e.eMarks[c],l=u=e.sCount[c]+k-(e.bMarks[r]+e.tShift[r]);x>v&&(b=e.src.charCodeAt(v),i(b));)9===b?u+=4-u%4:u++,v++;if(q=v,y=q>=x?1:u-l,y>4&&(y=1),p=l+y,z=e.push("list_item_open","li",1),z.markup=String.fromCharCode(A),z.map=F=[r,0],f=e.blkIndent,m=e.tight,h=e.tShift[r],d=e.sCount[r],g=e.parentType,e.blkIndent=p,e.tight=!0,e.parentType="list",e.tShift[r]=q-e.bMarks[r],e.sCount[r]=u,q>=x&&e.isEmpty(r+1)?e.line=Math.min(e.line+2,t):e.md.block.tokenize(e,r,t,!0),e.tight&&!E||(I=!1), -E=e.line-r>1&&e.isEmpty(e.line-1),e.blkIndent=f,e.tShift[r]=h,e.sCount[r]=d,e.tight=m,e.parentType=g,z=e.push("list_item_close","li",-1),z.markup=String.fromCharCode(A),c=r=e.line,F[1]=c,q=e.bMarks[r],c>=t)break;if(e.isEmpty(c))break;if(e.sCount[c]T;T++)if(L[T](e,c,t,!0)){M=!0;break}if(M)break;if(w){if(k=s(e,c),0>k)break}else if(k=n(e,c),0>k)break;if(A!==e.src.charCodeAt(k-1))break}return z=w?e.push("ordered_list_close","ol",-1):e.push("bullet_list_close","ul",-1),z.markup=String.fromCharCode(A),S[1]=c,e.line=c,I&&o(e,D),!0}},{"../common/utils":4}],26:[function(e,r,t){"use strict";r.exports=function(e,r){for(var t,n,s,o,i,a=r+1,c=e.md.block.ruler.getRules("paragraph"),l=e.lineMax;l>a&&!e.isEmpty(a);a++)if(!(e.sCount[a]-e.blkIndent>3||e.sCount[a]<0)){for(n=!1,s=0,o=c.length;o>s;s++)if(c[s](e,a,l,!0)){n=!0;break}if(n)break}return t=e.getLines(r,a,e.blkIndent,!1).trim(),e.line=a,i=e.push("paragraph_open","p",1),i.map=[r,e.line],i=e.push("inline","",0),i.content=t,i.map=[r,e.line],i.children=[],i=e.push("paragraph_close","p",-1),!0}},{}],27:[function(e,r,t){"use strict";var n=e("../helpers/parse_link_destination"),s=e("../helpers/parse_link_title"),o=e("../common/utils").normalizeReference,i=e("../common/utils").isSpace;r.exports=function(e,r,t,a){var c,l,u,p,h,f,d,m,g,_,k,b,v,x,y,C=0,A=e.bMarks[r]+e.tShift[r],w=e.eMarks[r],q=r+1;if(91!==e.src.charCodeAt(A))return!1;for(;++Aq&&!e.isEmpty(q);q++)if(!(e.sCount[q]-e.blkIndent>3||e.sCount[q]<0)){for(v=!1,f=0,d=x.length;d>f;f++)if(x[f](e,q,p,!0)){v=!0;break}if(v)break}for(b=e.getLines(r,q,e.blkIndent,!1).trim(),w=b.length,A=1;w>A;A++){if(c=b.charCodeAt(A),91===c)return!1;if(93===c){g=A;break}10===c?C++:92===c&&(A++,w>A&&10===b.charCodeAt(A)&&C++)}if(0>g||58!==b.charCodeAt(g+1))return!1;for(A=g+2;w>A;A++)if(c=b.charCodeAt(A),10===c)C++;else if(!i(c))break;if(_=n(b,A,w),!_.ok)return!1;if(h=e.md.normalizeLink(_.str),!e.md.validateLink(h))return!1;for(A=_.pos,C+=_.lines,l=A,u=C,k=A;w>A;A++)if(c=b.charCodeAt(A),10===c)C++;else if(!i(c))break;for(_=s(b,A,w),w>A&&k!==A&&_.ok?(y=_.str,A=_.pos,C+=_.lines):(y="",A=l,C=u);w>A&&(c=b.charCodeAt(A),i(c));)A++;if(w>A&&10!==b.charCodeAt(A)&&y)for(y="",A=l,C=u;w>A&&(c=b.charCodeAt(A),i(c));)A++;return w>A&&10!==b.charCodeAt(A)?!1:(m=o(b.slice(1,g)))?a?!0:("undefined"==typeof e.env.references&&(e.env.references={}),"undefined"==typeof e.env.references[m]&&(e.env.references[m]={title:y,href:h}),e.line=r+C+1,!0):!1}},{"../common/utils":4,"../helpers/parse_link_destination":6,"../helpers/parse_link_title":8}],28:[function(e,r,t){"use strict";function n(e,r,t,n){var s,i,a,c,l,u,p,h;for(this.src=e,this.md=r,this.env=t,this.tokens=n,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.parentType="root",this.ddIndent=-1,this.level=0,this.result="",i=this.src,h=!1,a=c=u=p=0,l=i.length;l>c;c++){if(s=i.charCodeAt(c),!h){if(o(s)){u++,9===s?p+=4-p%4:p++;continue}h=!0}10!==s&&c!==l-1||(10!==s&&c++,this.bMarks.push(a),this.eMarks.push(c),this.tShift.push(u),this.sCount.push(p),h=!1,u=0,p=0,a=c+1)}this.bMarks.push(i.length),this.eMarks.push(i.length),this.tShift.push(0),this.sCount.push(0),this.lineMax=this.bMarks.length-1}var s=e("../token"),o=e("../common/utils").isSpace;n.prototype.push=function(e,r,t){var n=new s(e,r,t);return n.block=!0,0>t&&this.level--,n.level=this.level,t>0&&this.level++,this.tokens.push(n),n},n.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},n.prototype.skipEmptyLines=function(e){for(var r=this.lineMax;r>e&&!(this.bMarks[e]+this.tShift[e]e&&(r=this.src.charCodeAt(e),o(r));e++);return e},n.prototype.skipSpacesBack=function(e,r){if(r>=e)return e;for(;e>r;)if(!o(this.src.charCodeAt(--e)))return e+1;return e},n.prototype.skipChars=function(e,r){for(var t=this.src.length;t>e&&this.src.charCodeAt(e)===r;e++);return e},n.prototype.skipCharsBack=function(e,r,t){if(t>=e)return e;for(;e>t;)if(r!==this.src.charCodeAt(--e))return e+1;return e},n.prototype.getLines=function(e,r,t,n){var s,i,a,c,l,u,p,h=e;if(e>=r)return"";for(u=new Array(r-e),s=0;r>h;h++,s++){for(i=0,p=c=this.bMarks[h],l=r>h+1||n?this.eMarks[h]+1:this.eMarks[h];l>c&&t>i;){if(a=this.src.charCodeAt(c),o(a))9===a?i+=4-i%4:i++;else{if(!(c-pn;)96===r&&o%2===0?(a=!a,c=n):124!==r||o%2!==0||a?92===r?o++:o=0:(t.push(e.substring(i,n)),i=n+1),n++,n===s&&a&&(a=!1,n=c+1),r=e.charCodeAt(n);return t.push(e.substring(i)),t}r.exports=function(e,r,t,o){var i,a,c,l,u,p,h,f,d,m,g,_;if(r+2>t)return!1;if(u=r+1,e.sCount[u]=e.eMarks[u])return!1;if(i=e.src.charCodeAt(c),124!==i&&45!==i&&58!==i)return!1;if(a=n(e,r+1),!/^[-:| ]+$/.test(a))return!1;for(p=a.split("|"),d=[],l=0;ld.length)return!1;if(o)return!0;for(f=e.push("table_open","table",1),f.map=g=[r,0],f=e.push("thead_open","thead",1),f.map=[r,r+1],f=e.push("tr_open","tr",1),f.map=[r,r+1],l=0;lu&&!(e.sCount[u]l;l++)f=e.push("td_open","td",1),d[l]&&(f.attrs=[["style","text-align:"+d[l]]]),f=e.push("inline","",0),f.content=p[l]?p[l].trim():"",f.children=[],f=e.push("td_close","td",-1);f=e.push("tr_close","tr",-1)}return f=e.push("tbody_close","tbody",-1),f=e.push("table_close","table",-1),g[1]=_[1]=u,e.line=u,!0}},{}],30:[function(e,r,t){"use strict";r.exports=function(e){var r;e.inlineMode?(r=new e.Token("inline","",0),r.content=e.src,r.map=[0,1],r.children=[],e.tokens.push(r)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}},{}],31:[function(e,r,t){"use strict";r.exports=function(e){var r,t,n,s=e.tokens;for(t=0,n=s.length;n>t;t++)r=s[t],"inline"===r.type&&e.md.inline.parse(r.content,e.md,e.env,r.children)}},{}],32:[function(e,r,t){"use strict";function n(e){return/^\s]/i.test(e)}function s(e){return/^<\/a\s*>/i.test(e)}var o=e("../common/utils").arrayReplaceAt;r.exports=function(e){var r,t,i,a,c,l,u,p,h,f,d,m,g,_,k,b,v,x=e.tokens;if(e.md.options.linkify)for(t=0,i=x.length;i>t;t++)if("inline"===x[t].type&&e.md.linkify.pretest(x[t].content))for(a=x[t].children,g=0,r=a.length-1;r>=0;r--)if(l=a[r],"link_close"!==l.type){if("html_inline"===l.type&&(n(l.content)&&g>0&&g--,s(l.content)&&g++),!(g>0)&&"text"===l.type&&e.md.linkify.test(l.content)){for(h=l.content,v=e.md.linkify.match(h),u=[],m=l.level,d=0,p=0;pd&&(c=new e.Token("text","",0),c.content=h.slice(d,f),c.level=m,u.push(c)),c=new e.Token("link_open","a",1),c.attrs=[["href",k]],c.level=m++,c.markup="linkify",c.info="auto",u.push(c),c=new e.Token("text","",0),c.content=b,c.level=m,u.push(c),c=new e.Token("link_close","a",-1),c.level=--m,c.markup="linkify",c.info="auto",u.push(c),d=v[p].lastIndex);d=0;r--)t=e[r],"text"===t.type&&(t.content=t.content.replace(c,n))}function o(e){var r,t;for(r=e.length-1;r>=0;r--)t=e[r],"text"===t.type&&i.test(t.content)&&(t.content=t.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])\u2026/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---([^-]|$)/gm,"$1—$2").replace(/(^|\s)--(\s|$)/gm,"$1–$2").replace(/(^|[^-\s])--([^-\s]|$)/gm,"$1–$2"))}var i=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,a=/\((c|tm|r|p)\)/i,c=/\((c|tm|r|p)\)/gi,l={c:"©",r:"®",p:"§",tm:"™"};r.exports=function(e){var r;if(e.md.options.typographer)for(r=e.tokens.length-1;r>=0;r--)"inline"===e.tokens[r].type&&(a.test(e.tokens[r].content)&&s(e.tokens[r].children),i.test(e.tokens[r].content)&&o(e.tokens[r].children))}},{}],35:[function(e,r,t){"use strict";function n(e,r,t){return e.substr(0,r)+t+e.substr(r+1)}function s(e,r){var t,s,c,p,h,f,d,m,g,_,k,b,v,x,y,C,A,w,q,D,E;for(q=[],t=0;t=0&&!(q[A].level<=d);A--);if(q.length=A+1,"text"===s.type){c=s.content,h=0,f=c.length;e:for(;f>h&&(l.lastIndex=h,p=l.exec(c));){if(y=C=!0,h=p.index+1,w="'"===p[0],g=32,p.index-1>=0)g=c.charCodeAt(p.index-1);else for(A=t-1;A>=0;A--)if("text"===e[A].type){g=e[A].content.charCodeAt(e[A].content.length-1);break}if(_=32,f>h)_=c.charCodeAt(h);else for(A=t+1;A=48&&57>=g&&(C=y=!1),y&&C&&(y=!1,C=b),y||C){if(C)for(A=q.length-1;A>=0&&(m=q[A],!(q[A].level=0;r--)"inline"===e.tokens[r].type&&c.test(e.tokens[r].content)&&s(e.tokens[r].children,e)}},{"../common/utils":4}],36:[function(e,r,t){"use strict";function n(e,r,t){this.src=e,this.env=t,this.tokens=[],this.inlineMode=!1,this.md=r}var s=e("../token");n.prototype.Token=s,r.exports=n},{"../token":51}],37:[function(e,r,t){"use strict";var n=/^<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/,s=/^<([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)>/;r.exports=function(e,r){var t,o,i,a,c,l,u=e.pos;return 60!==e.src.charCodeAt(u)?!1:(t=e.src.slice(u),t.indexOf(">")<0?!1:s.test(t)?(o=t.match(s),a=o[0].slice(1,-1),c=e.md.normalizeLink(a),e.md.validateLink(c)?(r||(l=e.push("link_open","a",1),l.attrs=[["href",c]],l.markup="autolink",l.info="auto",l=e.push("text","",0),l.content=e.md.normalizeLinkText(a),l=e.push("link_close","a",-1),l.markup="autolink",l.info="auto"),e.pos+=o[0].length,!0):!1):n.test(t)?(i=t.match(n),a=i[0].slice(1,-1),c=e.md.normalizeLink("mailto:"+a),e.md.validateLink(c)?(r||(l=e.push("link_open","a",1),l.attrs=[["href",c]],l.markup="autolink",l.info="auto",l=e.push("text","",0),l.content=e.md.normalizeLinkText(a),l=e.push("link_close","a",-1),l.markup="autolink",l.info="auto"),e.pos+=i[0].length,!0):!1):!1)}},{}],38:[function(e,r,t){"use strict";r.exports=function(e,r){var t,n,s,o,i,a,c=e.pos,l=e.src.charCodeAt(c);if(96!==l)return!1;for(t=c,c++,n=e.posMax;n>c&&96===e.src.charCodeAt(c);)c++;for(s=e.src.slice(t,c),o=i=c;-1!==(o=e.src.indexOf("`",i));){for(i=o+1;n>i&&96===e.src.charCodeAt(i);)i++;if(i-o===s.length)return r||(a=e.push("code_inline","code",0),a.markup=s,a.content=e.src.slice(c,o).replace(/[ \n]+/g," ").trim()),e.pos=i,!0}return r||(e.pending+=s),e.pos+=s.length,!0}},{}],39:[function(e,r,t){"use strict";r.exports=function(e){var r,t,n,s,o=e.delimiters,i=e.delimiters.length;for(r=0;i>r;r++)if(n=o[r],n.close)for(t=r-n.jump-1;t>=0;){if(s=o[t],s.open&&s.marker===n.marker&&s.end<0&&s.level===n.level){n.jump=r-t,n.open=!1,s.end=r,s.jump=0;break}t-=s.jump+1}}},{}],40:[function(e,r,t){"use strict";r.exports.tokenize=function(e,r){var t,n,s,o=e.pos,i=e.src.charCodeAt(o);if(r)return!1;if(95!==i&&42!==i)return!1;for(n=e.scanDelims(e.pos,42===i),t=0;tr;r++)t=a[r],95!==t.marker&&42!==t.marker||-1!==t.end&&(n=a[t.end],i=c>r+1&&a[r+1].end===t.end-1&&a[r+1].token===t.token+1&&a[t.end-1].token===n.token-1&&a[r+1].marker===t.marker,o=String.fromCharCode(t.marker),s=e.tokens[t.token],s.type=i?"strong_open":"em_open",s.tag=i?"strong":"em",s.nesting=1,s.markup=i?o+o:o,s.content="",s=e.tokens[n.token],s.type=i?"strong_close":"em_close",s.tag=i?"strong":"em",s.nesting=-1,s.markup=i?o+o:o,s.content="",i&&(e.tokens[a[r+1].token].content="",e.tokens[a[t.end-1].token].content="",r++))}},{}],41:[function(e,r,t){"use strict";var n=e("../common/entities"),s=e("../common/utils").has,o=e("../common/utils").isValidEntityCode,i=e("../common/utils").fromCodePoint,a=/^&#((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i,c=/^&([a-z][a-z0-9]{1,31});/i;r.exports=function(e,r){var t,l,u,p=e.pos,h=e.posMax;if(38!==e.src.charCodeAt(p))return!1;if(h>p+1)if(t=e.src.charCodeAt(p+1),35===t){if(u=e.src.slice(p).match(a))return r||(l="x"===u[1][0].toLowerCase()?parseInt(u[1].slice(1),16):parseInt(u[1],10),e.pending+=i(o(l)?l:65533)),e.pos+=u[0].length,!0}else if(u=e.src.slice(p).match(c),u&&s(n,u[1]))return r||(e.pending+=n[u[1]]),e.pos+=u[0].length,!0;return r||(e.pending+="&"),e.pos++,!0}},{"../common/entities":1,"../common/utils":4}],42:[function(e,r,t){"use strict";for(var n=e("../common/utils").isSpace,s=[],o=0;256>o;o++)s.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){s[e.charCodeAt(0)]=1}),r.exports=function(e,r){var t,o=e.pos,i=e.posMax;if(92!==e.src.charCodeAt(o))return!1;if(o++,i>o){if(t=e.src.charCodeAt(o),256>t&&0!==s[t])return r||(e.pending+=e.src[o]),e.pos+=2,!0;if(10===t){for(r||e.push("hardbreak","br",0),o++;i>o&&(t=e.src.charCodeAt(o),n(t));)o++;return e.pos=o,!0}}return r||(e.pending+="\\"),e.pos++,!0}},{"../common/utils":4}],43:[function(e,r,t){"use strict";function n(e){var r=32|e;return r>=97&&122>=r}var s=e("../common/html_re").HTML_TAG_RE;r.exports=function(e,r){var t,o,i,a,c=e.pos;return e.md.options.html?(i=e.posMax,60!==e.src.charCodeAt(c)||c+2>=i?!1:(t=e.src.charCodeAt(c+1),(33===t||63===t||47===t||n(t))&&(o=e.src.slice(c).match(s))?(r||(a=e.push("html_inline","",0),a.content=e.src.slice(c,c+o[0].length)),e.pos+=o[0].length,!0):!1)):!1}},{"../common/html_re":3}],44:[function(e,r,t){"use strict";var n=e("../helpers/parse_link_label"),s=e("../helpers/parse_link_destination"),o=e("../helpers/parse_link_title"),i=e("../common/utils").normalizeReference,a=e("../common/utils").isSpace;r.exports=function(e,r){var t,c,l,u,p,h,f,d,m,g,_,k,b,v="",x=e.pos,y=e.posMax;if(33!==e.src.charCodeAt(e.pos))return!1;if(91!==e.src.charCodeAt(e.pos+1))return!1;if(h=e.pos+2,p=n(e,e.pos+1,!1),0>p)return!1;if(f=p+1,y>f&&40===e.src.charCodeAt(f)){for(f++;y>f&&(c=e.src.charCodeAt(f),a(c)||10===c);f++);if(f>=y)return!1;for(b=f,m=s(e.src,f,e.posMax),m.ok&&(v=e.md.normalizeLink(m.str),e.md.validateLink(v)?f=m.pos:v=""),b=f;y>f&&(c=e.src.charCodeAt(f),a(c)||10===c);f++);if(m=o(e.src,f,e.posMax),y>f&&b!==f&&m.ok)for(g=m.str,f=m.pos;y>f&&(c=e.src.charCodeAt(f),a(c)||10===c);f++);else g="";if(f>=y||41!==e.src.charCodeAt(f))return e.pos=x,!1;f++}else{if("undefined"==typeof e.env.references)return!1;if(y>f&&91===e.src.charCodeAt(f)?(b=f+1,f=n(e,f),f>=0?u=e.src.slice(b,f++):f=p+1):f=p+1,u||(u=e.src.slice(h,p)),d=e.env.references[i(u)],!d)return e.pos=x,!1;v=d.href,g=d.title}return r||(l=e.src.slice(h,p),e.md.inline.parse(l,e.md,e.env,k=[]),_=e.push("image","img",0),_.attrs=t=[["src",v],["alt",""]],_.children=k,_.content=l,g&&t.push(["title",g])),e.pos=f,e.posMax=y,!0}},{"../common/utils":4,"../helpers/parse_link_destination":6,"../helpers/parse_link_label":7,"../helpers/parse_link_title":8}],45:[function(e,r,t){"use strict";var n=e("../helpers/parse_link_label"),s=e("../helpers/parse_link_destination"),o=e("../helpers/parse_link_title"),i=e("../common/utils").normalizeReference,a=e("../common/utils").isSpace;r.exports=function(e,r){var t,c,l,u,p,h,f,d,m,g,_="",k=e.pos,b=e.posMax,v=e.pos;if(91!==e.src.charCodeAt(e.pos))return!1;if(p=e.pos+1,u=n(e,e.pos,!0),0>u)return!1;if(h=u+1,b>h&&40===e.src.charCodeAt(h)){for(h++;b>h&&(c=e.src.charCodeAt(h),a(c)||10===c);h++);if(h>=b)return!1;for(v=h,f=s(e.src,h,e.posMax),f.ok&&(_=e.md.normalizeLink(f.str),e.md.validateLink(_)?h=f.pos:_=""),v=h;b>h&&(c=e.src.charCodeAt(h),a(c)||10===c);h++);if(f=o(e.src,h,e.posMax),b>h&&v!==h&&f.ok)for(m=f.str,h=f.pos;b>h&&(c=e.src.charCodeAt(h),a(c)||10===c);h++);else m="";if(h>=b||41!==e.src.charCodeAt(h))return e.pos=k,!1;h++}else{if("undefined"==typeof e.env.references)return!1;if(b>h&&91===e.src.charCodeAt(h)?(v=h+1,h=n(e,h),h>=0?l=e.src.slice(v,h++):h=u+1):h=u+1,l||(l=e.src.slice(p,u)),d=e.env.references[i(l)],!d)return e.pos=k,!1;_=d.href,m=d.title}return r||(e.pos=p,e.posMax=u,g=e.push("link_open","a",1),g.attrs=t=[["href",_]],m&&t.push(["title",m]),e.md.inline.tokenize(e),g=e.push("link_close","a",-1)),e.pos=h,e.posMax=b,!0}},{"../common/utils":4,"../helpers/parse_link_destination":6,"../helpers/parse_link_label":7,"../helpers/parse_link_title":8}],46:[function(e,r,t){"use strict";r.exports=function(e,r){var t,n,s=e.pos;if(10!==e.src.charCodeAt(s))return!1;for(t=e.pending.length-1,n=e.posMax,r||(t>=0&&32===e.pending.charCodeAt(t)?t>=1&&32===e.pending.charCodeAt(t-1)?(e.pending=e.pending.replace(/ +$/,""),e.push("hardbreak","br",0)):(e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0)):e.push("softbreak","br",0)),s++;n>s&&32===e.src.charCodeAt(s);)s++;return e.pos=s,!0}},{}],47:[function(e,r,t){"use strict";function n(e,r,t,n){this.src=e,this.env=t,this.md=r,this.tokens=n,this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[]}var s=e("../token"),o=e("../common/utils").isWhiteSpace,i=e("../common/utils").isPunctChar,a=e("../common/utils").isMdAsciiPunct;n.prototype.pushPending=function(){var e=new s("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},n.prototype.push=function(e,r,t){this.pending&&this.pushPending();var n=new s(e,r,t);return 0>t&&this.level--,n.level=this.level,t>0&&this.level++,this.pendingLevel=this.level,this.tokens.push(n),n},n.prototype.scanDelims=function(e,r){var t,n,s,c,l,u,p,h,f,d=e,m=!0,g=!0,_=this.posMax,k=this.src.charCodeAt(e);for(t=e>0?this.src.charCodeAt(e-1):32;_>d&&this.src.charCodeAt(d)===k;)d++;return s=d-e,n=_>d?this.src.charCodeAt(d):32,p=a(t)||i(String.fromCharCode(t)),f=a(n)||i(String.fromCharCode(n)),u=o(t),h=o(n),h?m=!1:f&&(u||p||(m=!1)),u?g=!1:p&&(h||f||(g=!1)),r?(c=m,l=g):(c=m&&(!g||p),l=g&&(!m||f)),{can_open:c,can_close:l,length:s}},n.prototype.Token=s,r.exports=n},{"../common/utils":4,"../token":51}],48:[function(e,r,t){"use strict";r.exports.tokenize=function(e,r){var t,n,s,o,i,a=e.pos,c=e.src.charCodeAt(a);if(r)return!1;if(126!==c)return!1;if(n=e.scanDelims(e.pos,!0),o=n.length,i=String.fromCharCode(c),2>o)return!1;for(o%2&&(s=e.push("text","",0),s.content=i,o--),t=0;o>t;t+=2)s=e.push("text","",0),s.content=i+i,e.delimiters.push({marker:c,jump:t,token:e.tokens.length-1,level:e.level,end:-1,open:n.can_open,close:n.can_close});return e.pos+=n.length,!0},r.exports.postProcess=function(e){var r,t,n,s,o,i=[],a=e.delimiters,c=e.delimiters.length;for(r=0;c>r;r++)n=a[r],126===n.marker&&-1!==n.end&&(s=a[n.end],o=e.tokens[n.token],o.type="s_open",o.tag="s",o.nesting=1,o.markup="~~",o.content="",o=e.tokens[s.token],o.type="s_close",o.tag="s",o.nesting=-1,o.markup="~~",o.content="","text"===e.tokens[s.token-1].type&&"~"===e.tokens[s.token-1].content&&i.push(s.token-1));for(;i.length;){for(r=i.pop(),t=r+1;tr;r++)n+=s[r].nesting,s[r].level=n,"text"===s[r].type&&o>r+1&&"text"===s[r+1].type?s[r+1].content=s[r].content+s[r+1].content:(r!==t&&(s[t]=s[r]),t++);r!==t&&(s.length=t)}},{}],51:[function(e,r,t){"use strict";function n(e,r,t){this.type=e,this.tag=r,this.attrs=null,this.map=null,this.nesting=t,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}n.prototype.attrIndex=function(e){var r,t,n;if(!this.attrs)return-1;for(r=this.attrs,t=0,n=r.length;n>t;t++)if(r[t][0]===e)return t;return-1},n.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]},n.prototype.attrSet=function(e,r){var t=this.attrIndex(e),n=[e,r];0>t?this.attrPush(n):this.attrs[t]=n},n.prototype.attrJoin=function(e,r){var t=this.attrIndex(e);0>t?this.attrPush([e,r]):this.attrs[t][1]=this.attrs[t][1]+" "+r},r.exports=n},{}],52:[function(r,t,n){(function(r){!function(s){function o(e){throw new RangeError(R[e])}function i(e,r){for(var t=e.length,n=[];t--;)n[t]=r(e[t]);return n}function a(e,r){var t=e.split("@"),n="";t.length>1&&(n=t[0]+"@",e=t[1]),e=e.replace(T,".");var s=e.split("."),o=i(s,r).join(".");return n+o}function c(e){for(var r,t,n=[],s=0,o=e.length;o>s;)r=e.charCodeAt(s++),r>=55296&&56319>=r&&o>s?(t=e.charCodeAt(s++),56320==(64512&t)?n.push(((1023&r)<<10)+(1023&t)+65536):(n.push(r),s--)):n.push(r);return n}function l(e){return i(e,function(e){var r="";return e>65535&&(e-=65536,r+=B(e>>>10&1023|55296),e=56320|1023&e),r+=B(e)}).join("")}function u(e){return 10>e-48?e-22:26>e-65?e-65:26>e-97?e-97:C}function p(e,r){return e+22+75*(26>e)-((0!=r)<<5)}function h(e,r,t){var n=0;for(e=t?I(e/D):e>>1,e+=I(e/r);e>M*w>>1;n+=C)e=I(e/M);return I(n+(M+1)*e/(e+q))}function f(e){var r,t,n,s,i,a,c,p,f,d,m=[],g=e.length,_=0,k=S,b=E;for(t=e.lastIndexOf(F),0>t&&(t=0),n=0;t>n;++n)e.charCodeAt(n)>=128&&o("not-basic"),m.push(e.charCodeAt(n));for(s=t>0?t+1:0;g>s;){for(i=_,a=1,c=C;s>=g&&o("invalid-input"),p=u(e.charCodeAt(s++)),(p>=C||p>I((y-_)/a))&&o("overflow"),_+=p*a,f=b>=c?A:c>=b+w?w:c-b,!(f>p);c+=C)d=C-f,a>I(y/d)&&o("overflow"),a*=d;r=m.length+1,b=h(_-i,r,0==i),I(_/r)>y-k&&o("overflow"),k+=I(_/r),_%=r,m.splice(_++,0,k)}return l(m)}function d(e){var r,t,n,s,i,a,l,u,f,d,m,g,_,k,b,v=[];for(e=c(e),g=e.length,r=S,t=0,i=E,a=0;g>a;++a)m=e[a],128>m&&v.push(B(m));for(n=s=v.length,s&&v.push(F);g>n;){for(l=y,a=0;g>a;++a)m=e[a],m>=r&&l>m&&(l=m);for(_=n+1,l-r>I((y-t)/_)&&o("overflow"),t+=(l-r)*_,r=l,a=0;g>a;++a)if(m=e[a],r>m&&++t>y&&o("overflow"),m==r){for(u=t,f=C;d=i>=f?A:f>=i+w?w:f-i,!(d>u);f+=C)b=u-d,k=C-d,v.push(B(p(d+b%k,0))),u=I(b/k);v.push(B(p(u,0))),i=h(t,_,n==s),t=0,++n}++t,++r}return v.join("")}function m(e){return a(e,function(e){return L.test(e)?f(e.slice(4).toLowerCase()):e})}function g(e){return a(e,function(e){return z.test(e)?"xn--"+d(e):e})}var _="object"==typeof n&&n&&!n.nodeType&&n,k="object"==typeof t&&t&&!t.nodeType&&t,b="object"==typeof r&&r;b.global!==b&&b.window!==b&&b.self!==b||(s=b);var v,x,y=2147483647,C=36,A=1,w=26,q=38,D=700,E=72,S=128,F="-",L=/^xn--/,z=/[^\x20-\x7E]/,T=/[\x2E\u3002\uFF0E\uFF61]/g,R={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},M=C-A,I=Math.floor,B=String.fromCharCode;if(v={version:"1.3.2",ucs2:{decode:c,encode:l},decode:f,encode:d,toASCII:g,toUnicode:m},"function"==typeof e&&"object"==typeof e.amd&&e.amd)e("punycode",function(){return v});else if(_&&k)if(t.exports==_)k.exports=v;else for(x in v)v.hasOwnProperty(x)&&(_[x]=v[x]);else s.punycode=v}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],53:[function(e,r,t){r.exports={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",amp:"&",AMP:"&",andand:"⩕",And:"⩓",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",apacir:"⩯",ap:"≈",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxHd:"╤",boxhD:"╥",boxHD:"╦",boxhu:"┴",boxHu:"╧",boxhU:"╨",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsolb:"⧅",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",capand:"⩄",capbrcup:"⩉",capcap:"⩋",cap:"∩",Cap:"⋒",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"○",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cup:"∪",Cup:"⋓",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"ⅅ",dd:"ⅆ",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"⇁",DownTeeArrow:"↧",DownTee:"⊤",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",edot:"ė",eDot:"≑",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp13:" ",emsp14:" ",emsp:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€", -excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",ge:"≥",gE:"≧",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅","in":"∈",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺","int":"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}},{}],54:[function(e,r,t){"use strict";function n(e){var r=Array.prototype.slice.call(arguments,1);return r.forEach(function(r){r&&Object.keys(r).forEach(function(t){e[t]=r[t]})}),e}function s(e){return Object.prototype.toString.call(e)}function o(e){return"[object String]"===s(e)}function i(e){return"[object Object]"===s(e)}function a(e){return"[object RegExp]"===s(e)}function c(e){return"[object Function]"===s(e)}function l(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function u(e){return Object.keys(e||{}).reduce(function(e,r){return e||k.hasOwnProperty(r)},!1)}function p(e){e.__index__=-1,e.__text_cache__=""}function h(e){return function(r,t){var n=r.slice(t);return e.test(n)?n.match(e)[0].length:0}}function f(){return function(e,r){r.normalize(e)}}function d(r){function t(e){return e.replace("%TLDS%",u.src_tlds)}function s(e,r){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+r)}var u=r.re=n({},e("./lib/re")),d=r.__tlds__.slice();r.__tlds_replaced__||d.push(v),d.push(u.src_xn),u.src_tlds=d.join("|"),u.email_fuzzy=RegExp(t(u.tpl_email_fuzzy),"i"),u.link_fuzzy=RegExp(t(u.tpl_link_fuzzy),"i"),u.link_no_ip_fuzzy=RegExp(t(u.tpl_link_no_ip_fuzzy),"i"),u.host_fuzzy_test=RegExp(t(u.tpl_host_fuzzy_test),"i");var m=[];r.__compiled__={},Object.keys(r.__schemas__).forEach(function(e){var t=r.__schemas__[e];if(null!==t){var n={validate:null,link:null};return r.__compiled__[e]=n,i(t)?(a(t.validate)?n.validate=h(t.validate):c(t.validate)?n.validate=t.validate:s(e,t),void(c(t.normalize)?n.normalize=t.normalize:t.normalize?s(e,t):n.normalize=f())):o(t)?void m.push(e):void s(e,t)}}),m.forEach(function(e){r.__compiled__[r.__schemas__[e]]&&(r.__compiled__[e].validate=r.__compiled__[r.__schemas__[e]].validate,r.__compiled__[e].normalize=r.__compiled__[r.__schemas__[e]].normalize)}),r.__compiled__[""]={validate:null,normalize:f()};var g=Object.keys(r.__compiled__).filter(function(e){return e.length>0&&r.__compiled__[e]}).map(l).join("|");r.re.schema_test=RegExp("(^|(?!_)(?:>|"+u.src_ZPCc+"))("+g+")","i"),r.re.schema_search=RegExp("(^|(?!_)(?:>|"+u.src_ZPCc+"))("+g+")","ig"),r.re.pretest=RegExp("("+r.re.schema_test.source+")|("+r.re.host_fuzzy_test.source+")|@","i"),p(r)}function m(e,r){var t=e.__index__,n=e.__last_index__,s=e.__text_cache__.slice(t,n);this.schema=e.__schema__.toLowerCase(),this.index=t+r,this.lastIndex=n+r,this.raw=s,this.text=s,this.url=s}function g(e,r){var t=new m(e,r);return e.__compiled__[t.schema].normalize(t,e),t}function _(e,r){return this instanceof _?(r||u(e)&&(r=e,e={}),this.__opts__=n({},k,r),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=n({},b,e),this.__compiled__={},this.__tlds__=x,this.__tlds_replaced__=!1,this.re={},void d(this)):new _(e,r)}var k={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1},b={"http:":{validate:function(e,r,t){var n=e.slice(r);return t.re.http||(t.re.http=new RegExp("^\\/\\/"+t.re.src_auth+t.re.src_host_port_strict+t.re.src_path,"i")),t.re.http.test(n)?n.match(t.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,r,t){var n=e.slice(r);return t.re.no_http||(t.re.no_http=new RegExp("^"+t.re.src_auth+t.re.src_host_port_strict+t.re.src_path,"i")),t.re.no_http.test(n)?r>=3&&":"===e[r-3]?0:n.match(t.re.no_http)[0].length:0}},"mailto:":{validate:function(e,r,t){var n=e.slice(r);return t.re.mailto||(t.re.mailto=new RegExp("^"+t.re.src_email_name+"@"+t.re.src_host_strict,"i")),t.re.mailto.test(n)?n.match(t.re.mailto)[0].length:0}}},v="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",x="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");_.prototype.add=function(e,r){return this.__schemas__[e]=r,d(this),this},_.prototype.set=function(e){return this.__opts__=n(this.__opts__,e),this},_.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var r,t,n,s,o,i,a,c,l;if(this.re.schema_test.test(e))for(a=this.re.schema_search,a.lastIndex=0;null!==(r=a.exec(e));)if(s=this.testSchemaAt(e,r[2],a.lastIndex)){this.__schema__=r[2],this.__index__=r.index+r[1].length,this.__last_index__=r.index+r[0].length+s;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(c=e.search(this.re.host_fuzzy_test),c>=0&&(this.__index__<0||c=0&&null!==(n=e.match(this.re.email_fuzzy))&&(o=n.index+n[1].length,i=n.index+n[0].length,(this.__index__<0||othis.__last_index__)&&(this.__schema__="mailto:",this.__index__=o,this.__last_index__=i))),this.__index__>=0},_.prototype.pretest=function(e){return this.re.pretest.test(e)},_.prototype.testSchemaAt=function(e,r,t){return this.__compiled__[r.toLowerCase()]?this.__compiled__[r.toLowerCase()].validate(e,t,this):0},_.prototype.match=function(e){var r=0,t=[];this.__index__>=0&&this.__text_cache__===e&&(t.push(g(this,r)),r=this.__last_index__);for(var n=r?e.slice(r):e;this.test(n);)t.push(g(this,r)),n=n.slice(this.__last_index__),r+=this.__last_index__;return t.length?t:null},_.prototype.tlds=function(e,r){return e=Array.isArray(e)?e:[e],r?(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(e,r,t){return e!==t[r-1]}).reverse(),d(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,d(this),this)},_.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},r.exports=_},{"./lib/re":55}],55:[function(e,r,t){"use strict";var n=t.src_Any=e("uc.micro/properties/Any/regex").source,s=t.src_Cc=e("uc.micro/categories/Cc/regex").source,o=t.src_Z=e("uc.micro/categories/Z/regex").source,i=t.src_P=e("uc.micro/categories/P/regex").source,a=t.src_ZPCc=[o,i,s].join("|"),c=t.src_ZCc=[o,s].join("|"),l="(?:(?!"+a+")"+n+")",u="(?:(?![0-9]|"+a+")"+n+")",p=t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)";t.src_auth="(?:(?:(?!"+c+").)+@)?";var h=t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",f=t.src_host_terminator="(?=$|"+a+")(?!-|_|:\\d|\\.-|\\.(?!$|"+a+"))",d=t.src_path="(?:[/?#](?:(?!"+c+"|[()[\\]{}.,\"'?!\\-]).|\\[(?:(?!"+c+"|\\]).)*\\]|\\((?:(?!"+c+"|[)]).)*\\)|\\{(?:(?!"+c+'|[}]).)*\\}|\\"(?:(?!'+c+'|["]).)+\\"|\\\'(?:(?!'+c+"|[']).)+\\'|\\'(?="+l+").|\\.{2,3}[a-zA-Z0-9%/]|\\.(?!"+c+"|[.]).|\\-(?!--(?:[^-]|$))(?:-*)|\\,(?!"+c+").|\\!(?!"+c+"|[!]).|\\?(?!"+c+"|[?]).)+|\\/)?",m=t.src_email_name='[\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]+',g=t.src_xn="xn--[a-z0-9\\-]{1,59}",_=t.src_domain_root="(?:"+g+"|"+u+"{1,63})",k=t.src_domain="(?:"+g+"|(?:"+l+")|(?:"+l+"(?:-(?!-)|"+l+"){0,61}"+l+"))",b=t.src_host="(?:"+p+"|(?:(?:(?:"+k+")\\.)*"+_+"))",v=t.tpl_host_fuzzy="(?:"+p+"|(?:(?:(?:"+k+")\\.)+(?:%TLDS%)))",x=t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+k+")\\.)+(?:%TLDS%))";t.src_host_strict=b+f;var y=t.tpl_host_fuzzy_strict=v+f;t.src_host_port_strict=b+h+f;var C=t.tpl_host_port_fuzzy_strict=v+h+f,A=t.tpl_host_port_no_ip_fuzzy_strict=x+h+f;t.tpl_host_fuzzy_test="localhost|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+a+"|$))",t.tpl_email_fuzzy="(^|>|"+c+")("+m+"@"+y+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|]|"+a+"))((?![$+<=>^`|])"+C+d+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|]|"+a+"))((?![$+<=>^`|])"+A+d+")"},{"uc.micro/categories/Cc/regex":61,"uc.micro/categories/P/regex":63,"uc.micro/categories/Z/regex":64,"uc.micro/properties/Any/regex":66}],56:[function(e,r,t){"use strict";function n(e){var r,t,n=o[e];if(n)return n;for(n=o[e]=[],r=0;128>r;r++)t=String.fromCharCode(r),n.push(t);for(r=0;rr;r+=3)s=parseInt(e.slice(r+1,r+3),16),128>s?l+=t[s]:192===(224&s)&&n>r+3&&(o=parseInt(e.slice(r+4,r+6),16),128===(192&o))?(c=s<<6&1984|63&o,l+=128>c?"��":String.fromCharCode(c),r+=3):224===(240&s)&&n>r+6&&(o=parseInt(e.slice(r+4,r+6),16),i=parseInt(e.slice(r+7,r+9),16),128===(192&o)&&128===(192&i))?(c=s<<12&61440|o<<6&4032|63&i,l+=2048>c||c>=55296&&57343>=c?"���":String.fromCharCode(c),r+=6):240===(248&s)&&n>r+9&&(o=parseInt(e.slice(r+4,r+6),16),i=parseInt(e.slice(r+7,r+9),16),a=parseInt(e.slice(r+10,r+12),16),128===(192&o)&&128===(192&i)&&128===(192&a))?(c=s<<18&1835008|o<<12&258048|i<<6&4032|63&a,65536>c||c>1114111?l+="����":(c-=65536,l+=String.fromCharCode(55296+(c>>10),56320+(1023&c))),r+=9):l+="�";return l})}var o={};s.defaultChars=";/?:@&=+$,#",s.componentChars="",r.exports=s},{}],57:[function(e,r,t){"use strict";function n(e){var r,t,n=o[e];if(n)return n;for(n=o[e]=[],r=0;128>r;r++)t=String.fromCharCode(r),/^[0-9a-z]$/i.test(t)?n.push(t):n.push("%"+("0"+r.toString(16).toUpperCase()).slice(-2));for(r=0;ro;o++)if(a=e.charCodeAt(o),t&&37===a&&i>o+2&&/^[0-9a-f]{2}$/i.test(e.slice(o+1,o+3)))u+=e.slice(o,o+3),o+=2;else if(128>a)u+=l[a];else if(a>=55296&&57343>=a){if(a>=55296&&56319>=a&&i>o+1&&(c=e.charCodeAt(o+1),c>=56320&&57343>=c)){u+=encodeURIComponent(e[o]+e[o+1]),o++;continue}u+="%EF%BF%BD"}else u+=encodeURIComponent(e[o]);return u}var o={};s.defaultChars=";/?:@&=+$,-_.!~*'()#",s.componentChars="-_.!~*'()",r.exports=s},{}],58:[function(e,r,t){"use strict";r.exports=function(e){var r="";return r+=e.protocol||"",r+=e.slashes?"//":"",r+=e.auth?e.auth+"@":"",r+=e.hostname&&-1!==e.hostname.indexOf(":")?"["+e.hostname+"]":e.hostname||"",r+=e.port?":"+e.port:"",r+=e.pathname||"",r+=e.search||"",r+=e.hash||""}},{}],59:[function(e,r,t){"use strict";r.exports.encode=e("./encode"),r.exports.decode=e("./decode"),r.exports.format=e("./format"),r.exports.parse=e("./parse")},{"./decode":56,"./encode":57,"./format":58,"./parse":60}],60:[function(e,r,t){"use strict";function n(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}function s(e,r){if(e&&e instanceof n)return e;var t=new n;return t.parse(e,r),t}var o=/^([a-z0-9.+-]+:)/i,i=/:[0-9]*$/,a=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["<",">",'"',"`"," ","\r","\n"," "],l=["{","}","|","\\","^","`"].concat(c),u=["'"].concat(l),p=["%","/","?",";","#"].concat(u),h=["/","?","#"],f=255,d=/^[+a-z0-9A-Z_-]{0,63}$/,m=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,g={javascript:!0,"javascript:":!0},_={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};n.prototype.parse=function(e,r){var t,n,s,i,c,l=e;if(l=l.trim(),!r&&1===e.split("#").length){var u=a.exec(l);if(u)return this.pathname=u[1],u[2]&&(this.search=u[2]),this}var k=o.exec(l);if(k&&(k=k[0],s=k.toLowerCase(),this.protocol=k,l=l.substr(k.length)),(r||k||l.match(/^\/\/[^@\/]+@[^@\/]+/))&&(c="//"===l.substr(0,2),!c||k&&g[k]||(l=l.substr(2),this.slashes=!0)),!g[k]&&(c||k&&!_[k])){var b=-1;for(t=0;ti)&&(b=i);var v,x;for(x=-1===b?l.lastIndexOf("@"):l.lastIndexOf("@",b),-1!==x&&(v=l.slice(0,x),l=l.slice(x+1),this.auth=v),b=-1,t=0;ti)&&(b=i);-1===b&&(b=l.length),":"===l[b-1]&&b--;var y=l.slice(0,b);l=l.slice(b),this.parseHost(y),this.hostname=this.hostname||"";var C="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!C){var A=this.hostname.split(/\./);for(t=0,n=A.length;n>t;t++){var w=A[t];if(w&&!w.match(d)){for(var q="",D=0,E=w.length;E>D;D++)q+=w.charCodeAt(D)>127?"x":w[D];if(!q.match(d)){var S=A.slice(0,t),F=A.slice(t+1),L=w.match(m);L&&(S.push(L[1]),F.unshift(L[2])),F.length&&(l=F.join(".")+l),this.hostname=S.join(".");break}}}}this.hostname.length>f&&(this.hostname=""),C&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var z=l.indexOf("#");-1!==z&&(this.hash=l.substr(z),l=l.slice(0,z));var T=l.indexOf("?");return-1!==T&&(this.search=l.substr(T),l=l.slice(0,T)),l&&(this.pathname=l),_[s]&&this.hostname&&!this.pathname&&(this.pathname=""),this},n.prototype.parseHost=function(e){var r=i.exec(e);r&&(r=r[0],":"!==r&&(this.port=r.substr(1)),e=e.substr(0,e.length-r.length)),e&&(this.hostname=e)},r.exports=s},{}],61:[function(e,r,t){r.exports=/[\0-\x1F\x7F-\x9F]/},{}],62:[function(e,r,t){r.exports=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804\uDCBD|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/},{}],63:[function(e,r,t){r.exports=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDE38-\uDE3D]|\uD805[\uDCC6\uDDC1-\uDDC9\uDE41-\uDE43]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F/; +return a in e?g():e[a]=a},k=g(),n=function(a){if(m.call(a,k))return a[k];if(!Object.isExtensible(a))throw new TypeError("Object must be extensible");var b=l(null);return j(a,k,{value:b}),b};return d(Object,f("getOwnPropertyNames",function(a){var b,c=Object(a);if("[object Window]"===c.toString())try{b=h(a)}catch(d){b=i}else b=h(a);return m.call(a,k)&&b.splice(b.indexOf(k),1),b})),d(a.prototype,f("get",function(a){return this.unlock(a).value})),d(a.prototype,f("set",function(a,b){this.unlock(a).value=b})),a}(),p=function(g){function h(b){return this===a||null==this||this===h.prototype?new h(b):(p(this,new o),void r(this,b))}function i(a){n(a);var d=q(this).get(a);return d===b?c:d}function j(a,d){n(a),q(this).set(a,d===c?b:d)}function k(a){return n(a),q(this).get(a)!==c}function l(a){n(a);var b=q(this),d=b.get(a)!==c;return b.set(a,c),d}function m(){return q(this),"[object WeakMap]"}var n=function(a){if(null==a||"object"!=typeof a&&"function"!=typeof a)throw new TypeError("Invalid WeakMap key")},p=function(a,b){var c=g.unlock(a);if(c.value)throw new TypeError("Object is already a WeakMap");c.value=b},q=function(a){var b=g.unlock(a).value;if(!b)throw new TypeError("WeakMap is not generic");return b},r=function(a,b){null!==b&&"object"==typeof b&&"function"==typeof b.forEach&&b.forEach(function(c,d){c instanceof Array&&2===c.length&&j.call(a,b[d][0],b[d][1])})};i._name="get",j._name="set",k._name="has",m._name="toString";var s=(""+Object).split("Object"),t=f("toString",function(){return s[0]+e(this)+s[1]});d(t,t);var u={__proto__:[]}instanceof Array?function(a){a.__proto__=t}:function(a){d(a,t)};return u(h),[m,i,j,k,l].forEach(function(a){d(h.prototype,a),u(a)}),h}(new o),q=Object.create?function(){return Object.create(null)}:function(){return{}};"undefined"!=typeof module?module.exports=p:"undefined"!=typeof exports?exports.WeakMap=p:"WeakMap"in a||(a.WeakMap=p),p.createStorage=g,a.WeakMap&&(a.WeakMap.createStorage=g)}(function(){return this}());!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define("markdown-it-sanitizer",[],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.markdownitSanitizer=e()}}(function(){return function e(t,n,r){function o(l,f){if(!n[l]){if(!t[l]){var a="function"==typeof require&&require;if(!f&&a)return a(l,!0);if(i)return i(l,!0);var s=new Error("Cannot find module '"+l+"'");throw s.code="MODULE_NOT_FOUND",s}var u=n[l]={exports:{}};t[l][0].call(u.exports,function(e){var n=t[l][1][e];return o(n?n:e)},u,u.exports,e,t,n,r)}return n[l].exports}for(var i="function"==typeof require&&require,l=0;l]*src="[^"<>]*"[^<>]*)\\s?\\/?>',i=RegExp(o,"i");return e=e.replace(/<[^<>]*>?/gi,function(e){var t,o,l,a,u;if(/(^<->|^<-\s|^<3\s)/.test(e))return e;if(t=e.match(i)){var m=t[1];if(o=n(m.match(/src="([^"<>]*)"/i)[1]),l=m.match(/alt="([^"<>]*)"/i),l=l&&"undefined"!=typeof l[1]?l[1]:"",a=m.match(/title="([^"<>]*)"/i),a=a&&"undefined"!=typeof a[1]?a[1]:"",o&&/^https?:\/\//i.test(o))return""!==c?''+l+'':''+l+''}return u=d.indexOf("a"),t=e.match(r),t&&(a="undefined"!=typeof t[2]?t[2]:"",o=n(t[1]),o&&/^(?:https?:\/\/|ftp:\/\/|mailto:|xmpp:)/i.test(o))?(p=!0,h[u]+=1,''):(t=/<\/a>/i.test(e))?(p=!0,h[u]-=1,h[u]<0&&(g[u]=!0),""):(t=e.match(/<(br|hr)\s?\/?>/i))?"<"+t[1].toLowerCase()+">":(t=e.match(/<(\/?)(b|blockquote|code|em|h[1-6]|li|ol(?: start="\d+")?|p|pre|s|sub|sup|strong|ul)>/i),t&&!/<\/ol start="\d+"/i.test(e)?(p=!0,u=d.indexOf(t[2].toLowerCase().split(" ")[0]),"/"===t[1]?h[u]-=1:h[u]+=1,h[u]<0&&(g[u]=!0),"<"+t[1]+t[2].toLowerCase()+">"):s===!0?"":f(e))})}function o(e){var t,n,o;for(a=0;a]*" title="[^"<>]*" target="_blank">',"g"):"ol"===t?//g:RegExp("<"+t+">","g"),r=RegExp("","g"),u===!0?(e=e.replace(n,""),e=e.replace(r,"")):(e=e.replace(n,function(e){return f(e)}),e=e.replace(r,function(e){return f(e)})),e}function n(e){var n;for(n=0;n`\\x00-\\x20]+",o="'[^']*'",i='"[^"]*"',a="(?:"+s+"|"+o+"|"+i+")",c="(?:\\s+"+n+"(?:\\s*=\\s*"+a+")?)",l="<[A-Za-z][A-Za-z0-9\\-]*"+c+"*\\s*\\/?>",u="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",p="|",h="<[?].*?[?]>",f="]*>",d="",m=new RegExp("^(?:"+l+"|"+u+"|"+p+"|"+h+"|"+f+"|"+d+")"),g=new RegExp("^(?:"+l+"|"+u+")");r.exports.HTML_TAG_RE=m,r.exports.HTML_OPEN_CLOSE_TAG_RE=g},{}],4:[function(e,r,t){"use strict";function n(e){return Object.prototype.toString.call(e)}function s(e){return"[object String]"===n(e)}function o(e,r){return x.call(e,r)}function i(e){var r=Array.prototype.slice.call(arguments,1);return r.forEach(function(r){if(r){if("object"!=typeof r)throw new TypeError(r+"must be object");Object.keys(r).forEach(function(t){e[t]=r[t]})}}),e}function a(e,r,t){return[].concat(e.slice(0,r),t,e.slice(r+1))}function c(e){return e>=55296&&57343>=e?!1:e>=64976&&65007>=e?!1:65535===(65535&e)||65534===(65535&e)?!1:e>=0&&8>=e?!1:11===e?!1:e>=14&&31>=e?!1:e>=127&&159>=e?!1:e>1114111?!1:!0}function l(e){if(e>65535){e-=65536;var r=55296+(e>>10),t=56320+(1023&e);return String.fromCharCode(r,t)}return String.fromCharCode(e)}function u(e,r){var t=0;return o(q,r)?q[r]:35===r.charCodeAt(0)&&w.test(r)&&(t="x"===r[1].toLowerCase()?parseInt(r.slice(2),16):parseInt(r.slice(1),10),c(t))?l(t):e}function p(e){return e.indexOf("\\")<0?e:e.replace(y,"$1")}function h(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(A,function(e,r,t){return r?r:u(e,t)})}function f(e){return S[e]}function d(e){return D.test(e)?e.replace(E,f):e}function m(e){return e.replace(F,"\\$&")}function g(e){switch(e){case 9:case 32:return!0}return!1}function _(e){if(e>=8192&&8202>=e)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function k(e){return L.test(e)}function b(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function v(e){return e.trim().replace(/\s+/g," ").toUpperCase()}var x=Object.prototype.hasOwnProperty,y=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,C=/&([a-z#][a-z0-9]{1,31});/gi,A=new RegExp(y.source+"|"+C.source,"gi"),w=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,q=e("./entities"),D=/[&<>"]/,E=/[&<>"]/g,S={"&":"&","<":"<",">":">",'"':"""},F=/[.?*+^$[\]\\(){}|-]/g,L=e("uc.micro/categories/P/regex");t.lib={},t.lib.mdurl=e("mdurl"),t.lib.ucmicro=e("uc.micro"),t.assign=i,t.isString=s,t.has=o,t.unescapeMd=p,t.unescapeAll=h,t.isValidEntityCode=c,t.fromCodePoint=l,t.escapeHtml=d,t.arrayReplaceAt=a,t.isSpace=g,t.isWhiteSpace=_,t.isMdAsciiPunct=b,t.isPunctChar=k,t.escapeRE=m,t.normalizeReference=v},{"./entities":1,mdurl:59,"uc.micro":65,"uc.micro/categories/P/regex":63}],5:[function(e,r,t){"use strict";t.parseLinkLabel=e("./parse_link_label"),t.parseLinkDestination=e("./parse_link_destination"),t.parseLinkTitle=e("./parse_link_title")},{"./parse_link_destination":6,"./parse_link_label":7,"./parse_link_title":8}],6:[function(e,r,t){"use strict";var n=e("../common/utils").isSpace,s=e("../common/utils").unescapeAll;r.exports=function(e,r,t){var o,i,a=0,c=r,l={ok:!1,pos:0,lines:0,str:""};if(60===e.charCodeAt(r)){for(r++;t>r;){if(o=e.charCodeAt(r),10===o||n(o))return l;if(62===o)return l.pos=r+1,l.str=s(e.slice(c+1,r)),l.ok=!0,l;92===o&&t>r+1?r+=2:r++}return l}for(i=0;t>r&&(o=e.charCodeAt(r),32!==o)&&!(32>o||127===o);)if(92===o&&t>r+1)r+=2;else{if(40===o&&(i++,i>1))break;if(41===o&&(i--,0>i))break;r++}return c===r?l:(l.str=s(e.slice(c,r)),l.lines=a,l.pos=r,l.ok=!0,l)}},{"../common/utils":4}],7:[function(e,r,t){"use strict";r.exports=function(e,r,t){var n,s,o,i,a=-1,c=e.posMax,l=e.pos;for(e.pos=r+1,n=1;e.pos=t)return c;if(o=e.charCodeAt(r),34!==o&&39!==o&&40!==o)return c;for(r++,40===o&&(o=41);t>r;){if(s=e.charCodeAt(r),s===o)return c.pos=r+1,c.lines=i,c.str=n(e.slice(a+1,r)),c.ok=!0,c;10===s?i++:92===s&&t>r+1&&(r++,10===e.charCodeAt(r)&&i++),r++}return c}},{"../common/utils":4}],9:[function(e,r,t){"use strict";function n(e){var r=e.trim().toLowerCase();return _.test(r)?k.test(r)?!0:!1:!0}function s(e){var r=d.parse(e,!0);if(r.hostname&&(!r.protocol||b.indexOf(r.protocol)>=0))try{r.hostname=m.toASCII(r.hostname)}catch(t){}return d.encode(d.format(r))}function o(e){var r=d.parse(e,!0);if(r.hostname&&(!r.protocol||b.indexOf(r.protocol)>=0))try{r.hostname=m.toUnicode(r.hostname)}catch(t){}return d.decode(d.format(r))}function i(e,r){return this instanceof i?(r||a.isString(e)||(r=e||{},e="default"),this.inline=new h,this.block=new p,this.core=new u,this.renderer=new l,this.linkify=new f,this.validateLink=n,this.normalizeLink=s,this.normalizeLinkText=o,this.utils=a,this.helpers=c,this.options={},this.configure(e),void(r&&this.set(r))):new i(e,r)}var a=e("./common/utils"),c=e("./helpers"),l=e("./renderer"),u=e("./parser_core"),p=e("./parser_block"),h=e("./parser_inline"),f=e("linkify-it"),d=e("mdurl"),m=e("punycode"),g={"default":e("./presets/default"),zero:e("./presets/zero"),commonmark:e("./presets/commonmark")},_=/^(vbscript|javascript|file|data):/,k=/^data:image\/(gif|png|jpeg|webp);/,b=["http:","https:","mailto:"];i.prototype.set=function(e){return a.assign(this.options,e),this},i.prototype.configure=function(e){var r,t=this;if(a.isString(e)&&(r=e,e=g[r],!e))throw new Error('Wrong `markdown-it` preset "'+r+'", check name');if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(r){e.components[r].rules&&t[r].ruler.enableOnly(e.components[r].rules),e.components[r].rules2&&t[r].ruler2.enableOnly(e.components[r].rules2)}),this},i.prototype.enable=function(e,r){var t=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(r){t=t.concat(this[r].ruler.enable(e,!0))},this),t=t.concat(this.inline.ruler2.enable(e,!0));var n=e.filter(function(e){return t.indexOf(e)<0});if(n.length&&!r)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+n);return this},i.prototype.disable=function(e,r){var t=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(r){t=t.concat(this[r].ruler.disable(e,!0))},this),t=t.concat(this.inline.ruler2.disable(e,!0));var n=e.filter(function(e){return t.indexOf(e)<0});if(n.length&&!r)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+n);return this},i.prototype.use=function(e){var r=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,r),this},i.prototype.parse=function(e,r){var t=new this.core.State(e,this,r);return this.core.process(t),t.tokens},i.prototype.render=function(e,r){return r=r||{},this.renderer.render(this.parse(e,r),this.options,r)},i.prototype.parseInline=function(e,r){var t=new this.core.State(e,this,r);return t.inlineMode=!0,this.core.process(t),t.tokens},i.prototype.renderInline=function(e,r){return r=r||{},this.renderer.render(this.parseInline(e,r),this.options,r)},r.exports=i},{"./common/utils":4,"./helpers":5,"./parser_block":10,"./parser_core":11,"./parser_inline":12,"./presets/commonmark":13,"./presets/default":14,"./presets/zero":15,"./renderer":16,"linkify-it":54,mdurl:59,punycode:52}],10:[function(e,r,t){"use strict";function n(){this.ruler=new s;for(var e=0;ea&&(e.line=a=e.skipEmptyLines(a),!(a>=t))&&!(e.sCount[a]=l){e.line=t;break}for(s=0;i>s&&!(n=o[s](e,a,t,!1));s++);if(e.tight=!c,e.isEmpty(e.line-1)&&(c=!0),a=e.line,t>a&&e.isEmpty(a)){if(c=!0,a++,t>a&&"list"===e.parentType&&e.isEmpty(a))break;e.line=a}}},n.prototype.parse=function(e,r,t,n){var s;return e?(s=new this.State(e,r,t,n),void this.tokenize(s,s.line,s.lineMax)):[]},n.prototype.State=e("./rules_block/state_block"),r.exports=n},{"./ruler":17,"./rules_block/blockquote":18,"./rules_block/code":19,"./rules_block/fence":20,"./rules_block/heading":21,"./rules_block/hr":22,"./rules_block/html_block":23,"./rules_block/lheading":24,"./rules_block/list":25,"./rules_block/paragraph":26,"./rules_block/reference":27,"./rules_block/state_block":28,"./rules_block/table":29}],11:[function(e,r,t){"use strict";function n(){this.ruler=new s;for(var e=0;er;r++)n[r](e)},n.prototype.State=e("./rules_core/state_core"),r.exports=n},{"./ruler":17,"./rules_core/block":30,"./rules_core/inline":31,"./rules_core/linkify":32,"./rules_core/normalize":33,"./rules_core/replacements":34,"./rules_core/smartquotes":35,"./rules_core/state_core":36}],12:[function(e,r,t){"use strict";function n(){var e;for(this.ruler=new s,e=0;et&&(e.level++,r=s[t](e,!0),e.level--,!r);t++);else e.pos=e.posMax;r||e.pos++,a[n]=e.pos},n.prototype.tokenize=function(e){for(var r,t,n=this.ruler.getRules(""),s=n.length,o=e.posMax,i=e.md.options.maxNesting;e.post&&!(r=n[t](e,!1));t++);if(r){if(e.pos>=o)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},n.prototype.parse=function(e,r,t,n){var s,o,i,a=new this.State(e,r,t,n);for(this.tokenize(a),o=this.ruler2.getRules(""),i=o.length,s=0;i>s;s++)o[s](a)},n.prototype.State=e("./rules_inline/state_inline"),r.exports=n},{"./ruler":17,"./rules_inline/autolink":37,"./rules_inline/backticks":38,"./rules_inline/balance_pairs":39,"./rules_inline/emphasis":40,"./rules_inline/entity":41,"./rules_inline/escape":42,"./rules_inline/html_inline":43,"./rules_inline/image":44,"./rules_inline/link":45,"./rules_inline/newline":46,"./rules_inline/state_inline":47,"./rules_inline/strikethrough":48,"./rules_inline/text":49,"./rules_inline/text_collapse":50}],13:[function(e,r,t){"use strict";r.exports={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","text_collapse"]}}}},{}],14:[function(e,r,t){"use strict";r.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}}},{}],15:[function(e,r,t){"use strict";r.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","text_collapse"]}}}},{}],16:[function(e,r,t){"use strict";function n(){this.rules=s({},a)}var s=e("./common/utils").assign,o=e("./common/utils").unescapeAll,i=e("./common/utils").escapeHtml,a={};a.code_inline=function(e,r){return""+i(e[r].content)+""},a.code_block=function(e,r){return"
"+i(e[r].content)+"
\n"},a.fence=function(e,r,t,n,s){var a,c=e[r],l=c.info?o(c.info).trim():"",u="";return l&&(u=l.split(/\s+/g)[0],c.attrJoin("class",t.langPrefix+u)),a=t.highlight?t.highlight(c.content,u)||i(c.content):i(c.content),0===a.indexOf(""+a+"\n"},a.image=function(e,r,t,n,s){var o=e[r];return o.attrs[o.attrIndex("alt")][1]=s.renderInlineAsText(o.children,t,n),s.renderToken(e,r,t)},a.hardbreak=function(e,r,t){return t.xhtmlOut?"
\n":"
\n"},a.softbreak=function(e,r,t){return t.breaks?t.xhtmlOut?"
\n":"
\n":"\n"},a.text=function(e,r){return i(e[r].content)},a.html_block=function(e,r){return e[r].content},a.html_inline=function(e,r){return e[r].content},n.prototype.renderAttrs=function(e){var r,t,n;if(!e.attrs)return"";for(n="",r=0,t=e.attrs.length;t>r;r++)n+=" "+i(e.attrs[r][0])+'="'+i(e.attrs[r][1])+'"';return n},n.prototype.renderToken=function(e,r,t){var n,s="",o=!1,i=e[r];return i.hidden?"":(i.block&&-1!==i.nesting&&r&&e[r-1].hidden&&(s+="\n"),s+=(-1===i.nesting?"\n":">")},n.prototype.renderInline=function(e,r,t){for(var n,s="",o=this.rules,i=0,a=e.length;a>i;i++)n=e[i].type,s+="undefined"!=typeof o[n]?o[n](e,i,r,t,this):this.renderToken(e,i,r);return s},n.prototype.renderInlineAsText=function(e,r,t){for(var n="",s=this.rules,o=0,i=e.length;i>o;o++)"text"===e[o].type?n+=s.text(e,o,r,t,this):"image"===e[o].type&&(n+=this.renderInlineAsText(e[o].children,r,t));return n},n.prototype.render=function(e,r,t){var n,s,o,i="",a=this.rules;for(n=0,s=e.length;s>n;n++)o=e[n].type,i+="inline"===o?this.renderInline(e[n].children,r,t):"undefined"!=typeof a[o]?a[e[n].type](e,n,r,t,this):this.renderToken(e,n,r,t);return i},r.exports=n},{"./common/utils":4}],17:[function(e,r,t){"use strict";function n(){this.__rules__=[],this.__cache__=null}n.prototype.__find__=function(e){for(var r=0;rn){if(r)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[n].enabled=!0,t.push(e)},this),this.__cache__=null,t},n.prototype.enableOnly=function(e,r){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(e){e.enabled=!1}),this.enable(e,r)},n.prototype.disable=function(e,r){Array.isArray(e)||(e=[e]);var t=[];return e.forEach(function(e){var n=this.__find__(e);if(0>n){if(r)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[n].enabled=!1,t.push(e)},this),this.__cache__=null,t},n.prototype.getRules=function(e){return null===this.__cache__&&this.__compile__(),this.__cache__[e]||[]},r.exports=n},{}],18:[function(e,r,t){"use strict";var n=e("../common/utils").isSpace;r.exports=function(e,r,t,s){var o,i,a,c,l,u,p,h,f,d,m,g,_,k,b,v,x=e.bMarks[r]+e.tShift[r],y=e.eMarks[r];if(62!==e.src.charCodeAt(x++))return!1;if(s)return!0;for(32===e.src.charCodeAt(x)&&x++,u=e.blkIndent,e.blkIndent=0,f=d=e.sCount[r]+x-(e.bMarks[r]+e.tShift[r]),l=[e.bMarks[r]],e.bMarks[r]=x;y>x&&(m=e.src.charCodeAt(x),n(m));)9===m?d+=4-d%4:d++,x++;for(i=x>=y,c=[e.sCount[r]],e.sCount[r]=d-f,a=[e.tShift[r]],e.tShift[r]=x-e.bMarks[r],g=e.md.block.ruler.getRules("blockquote"),o=r+1;t>o&&!(e.sCount[o]=y));o++)if(62!==e.src.charCodeAt(x++)){if(i)break;for(v=!1,k=0,b=g.length;b>k;k++)if(g[k](e,o,t,!0)){v=!0;break}if(v)break;l.push(e.bMarks[o]),a.push(e.tShift[o]),c.push(e.sCount[o]),e.sCount[o]=-1}else{for(32===e.src.charCodeAt(x)&&x++,f=d=e.sCount[o]+x-(e.bMarks[o]+e.tShift[o]),l.push(e.bMarks[o]),e.bMarks[o]=x;y>x&&(m=e.src.charCodeAt(x),n(m));)9===m?d+=4-d%4:d++,x++;i=x>=y,c.push(e.sCount[o]),e.sCount[o]=d-f,a.push(e.tShift[o]),e.tShift[o]=x-e.bMarks[o]}for(p=e.parentType,e.parentType="blockquote",_=e.push("blockquote_open","blockquote",1),_.markup=">",_.map=h=[r,0],e.md.block.tokenize(e,r,o),_=e.push("blockquote_close","blockquote",-1),_.markup=">",e.parentType=p,h[1]=e.line,k=0;kn;)if(e.isEmpty(n)){if(i++,i>=2&&"list"===e.parentType)break;n++}else{if(i=0,!(e.sCount[n]-e.blkIndent>=4))break;n++,s=n}return e.line=s,o=e.push("code_block","code",0),o.content=e.getLines(r,s,4+e.blkIndent,!0),o.map=[r,e.line],!0}},{}],20:[function(e,r,t){"use strict";r.exports=function(e,r,t,n){var s,o,i,a,c,l,u,p=!1,h=e.bMarks[r]+e.tShift[r],f=e.eMarks[r];if(h+3>f)return!1;if(s=e.src.charCodeAt(h),126!==s&&96!==s)return!1;if(c=h,h=e.skipChars(h,s),o=h-c,3>o)return!1;if(u=e.src.slice(c,h),i=e.src.slice(h,f),i.indexOf("`")>=0)return!1;if(n)return!0;for(a=r;(a++,!(a>=t))&&(h=c=e.bMarks[a]+e.tShift[a],f=e.eMarks[a],!(f>h&&e.sCount[a]=4||(h=e.skipChars(h,s),o>h-c||(h=e.skipSpaces(h),f>h)))){p=!0;break}return o=e.sCount[r],e.line=a+(p?1:0),l=e.push("fence","code",0),l.info=i,l.content=e.getLines(r+1,a,o,!0),l.markup=u,l.map=[r,e.line],!0}},{}],21:[function(e,r,t){"use strict";var n=e("../common/utils").isSpace;r.exports=function(e,r,t,s){var o,i,a,c,l=e.bMarks[r]+e.tShift[r],u=e.eMarks[r];if(o=e.src.charCodeAt(l),35!==o||l>=u)return!1;for(i=1,o=e.src.charCodeAt(++l);35===o&&u>l&&6>=i;)i++,o=e.src.charCodeAt(++l);return i>6||u>l&&32!==o?!1:s?!0:(u=e.skipSpacesBack(u,l),a=e.skipCharsBack(u,35,l),a>l&&n(e.src.charCodeAt(a-1))&&(u=a),e.line=r+1,c=e.push("heading_open","h"+String(i),1),c.markup="########".slice(0,i),c.map=[r,e.line],c=e.push("inline","",0),c.content=e.src.slice(l,u).trim(),c.map=[r,e.line],c.children=[],c=e.push("heading_close","h"+String(i),-1),c.markup="########".slice(0,i),!0)}},{"../common/utils":4}],22:[function(e,r,t){"use strict";var n=e("../common/utils").isSpace;r.exports=function(e,r,t,s){var o,i,a,c,l=e.bMarks[r]+e.tShift[r],u=e.eMarks[r];if(o=e.src.charCodeAt(l++),42!==o&&45!==o&&95!==o)return!1;for(i=1;u>l;){if(a=e.src.charCodeAt(l++),a!==o&&!n(a))return!1;a===o&&i++}return 3>i?!1:s?!0:(e.line=r+1,c=e.push("hr","hr",0),c.map=[r,e.line],c.markup=Array(i+1).join(String.fromCharCode(o)),!0)}},{"../common/utils":4}],23:[function(e,r,t){"use strict";var n=e("../common/html_blocks"),s=e("../common/html_re").HTML_OPEN_CLOSE_TAG_RE,o=[[/^<(script|pre|style)(?=(\s|>|$))/i,/<\/(script|pre|style)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(s.source+"\\s*$"),/^$/,!1]];r.exports=function(e,r,t,n){var s,i,a,c,l=e.bMarks[r]+e.tShift[r],u=e.eMarks[r];if(!e.md.options.html)return!1;if(60!==e.src.charCodeAt(l))return!1;for(c=e.src.slice(l,u),s=0;si&&!(e.sCount[i]h&&!e.isEmpty(h);h++)if(!(e.sCount[h]-e.blkIndent>3)){if(e.sCount[h]>=e.blkIndent&&(c=e.bMarks[h]+e.tShift[h],l=e.eMarks[h],l>c&&(p=e.src.charCodeAt(c),(45===p||61===p)&&(c=e.skipChars(c,p),c=e.skipSpaces(c),c>=l)))){u=61===p?1:2;break}if(!(e.sCount[h]<0)){for(s=!1,o=0,i=f.length;i>o;o++)if(f[o](e,h,t,!0)){s=!0;break}if(s)break}}return u?(n=e.getLines(r,h,e.blkIndent,!1).trim(),e.line=h+1,a=e.push("heading_open","h"+String(u),1),a.markup=String.fromCharCode(p),a.map=[r,e.line],a=e.push("inline","",0),a.content=n,a.map=[r,e.line-1],a.children=[],a=e.push("heading_close","h"+String(u),-1),a.markup=String.fromCharCode(p),!0):!1}},{}],25:[function(e,r,t){"use strict";function n(e,r){var t,n,s,o;return n=e.bMarks[r]+e.tShift[r],s=e.eMarks[r],t=e.src.charCodeAt(n++),42!==t&&45!==t&&43!==t?-1:s>n&&(o=e.src.charCodeAt(n),!i(o))?-1:n}function s(e,r){var t,n=e.bMarks[r]+e.tShift[r],s=n,o=e.eMarks[r];if(s+1>=o)return-1;if(t=e.src.charCodeAt(s++),48>t||t>57)return-1;for(;;){if(s>=o)return-1;t=e.src.charCodeAt(s++);{if(!(t>=48&&57>=t)){if(41===t||46===t)break;return-1}if(s-n>=10)return-1}}return o>s&&(t=e.src.charCodeAt(s),!i(t))?-1:s}function o(e,r){var t,n,s=e.level+2;for(t=r+2,n=e.tokens.length-2;n>t;t++)e.tokens[t].level===s&&"paragraph_open"===e.tokens[t].type&&(e.tokens[t+2].hidden=!0,e.tokens[t].hidden=!0,t+=2)}var i=e("../common/utils").isSpace;r.exports=function(e,r,t,a){var c,l,u,p,h,f,d,m,g,_,k,b,v,x,y,C,A,w,q,D,E,S,F,L,z,T,R,M,I=!0;if((k=s(e,r))>=0)w=!0;else{if(!((k=n(e,r))>=0))return!1;w=!1}if(A=e.src.charCodeAt(k-1),a)return!0;for(D=e.tokens.length,w?(_=e.bMarks[r]+e.tShift[r],C=Number(e.src.substr(_,k-_-1)),z=e.push("ordered_list_open","ol",1),1!==C&&(z.attrs=[["start",C]])):z=e.push("bullet_list_open","ul",1),z.map=S=[r,0],z.markup=String.fromCharCode(A),c=r,E=!1,L=e.md.block.ruler.getRules("list");t>c;){for(v=k,x=e.eMarks[c],l=u=e.sCount[c]+k-(e.bMarks[r]+e.tShift[r]);x>v&&(b=e.src.charCodeAt(v),i(b));)9===b?u+=4-u%4:u++,v++;if(q=v,y=q>=x?1:u-l,y>4&&(y=1),p=l+y,z=e.push("list_item_open","li",1),z.markup=String.fromCharCode(A),z.map=F=[r,0],f=e.blkIndent,m=e.tight,h=e.tShift[r],d=e.sCount[r],g=e.parentType,e.blkIndent=p,e.tight=!0,e.parentType="list",e.tShift[r]=q-e.bMarks[r],e.sCount[r]=u,q>=x&&e.isEmpty(r+1)?e.line=Math.min(e.line+2,t):e.md.block.tokenize(e,r,t,!0), +(!e.tight||E)&&(I=!1),E=e.line-r>1&&e.isEmpty(e.line-1),e.blkIndent=f,e.tShift[r]=h,e.sCount[r]=d,e.tight=m,e.parentType=g,z=e.push("list_item_close","li",-1),z.markup=String.fromCharCode(A),c=r=e.line,F[1]=c,q=e.bMarks[r],c>=t)break;if(e.isEmpty(c))break;if(e.sCount[c]T;T++)if(L[T](e,c,t,!0)){M=!0;break}if(M)break;if(w){if(k=s(e,c),0>k)break}else if(k=n(e,c),0>k)break;if(A!==e.src.charCodeAt(k-1))break}return z=w?e.push("ordered_list_close","ol",-1):e.push("bullet_list_close","ul",-1),z.markup=String.fromCharCode(A),S[1]=c,e.line=c,I&&o(e,D),!0}},{"../common/utils":4}],26:[function(e,r,t){"use strict";r.exports=function(e,r){for(var t,n,s,o,i,a=r+1,c=e.md.block.ruler.getRules("paragraph"),l=e.lineMax;l>a&&!e.isEmpty(a);a++)if(!(e.sCount[a]-e.blkIndent>3||e.sCount[a]<0)){for(n=!1,s=0,o=c.length;o>s;s++)if(c[s](e,a,l,!0)){n=!0;break}if(n)break}return t=e.getLines(r,a,e.blkIndent,!1).trim(),e.line=a,i=e.push("paragraph_open","p",1),i.map=[r,e.line],i=e.push("inline","",0),i.content=t,i.map=[r,e.line],i.children=[],i=e.push("paragraph_close","p",-1),!0}},{}],27:[function(e,r,t){"use strict";var n=e("../helpers/parse_link_destination"),s=e("../helpers/parse_link_title"),o=e("../common/utils").normalizeReference,i=e("../common/utils").isSpace;r.exports=function(e,r,t,a){var c,l,u,p,h,f,d,m,g,_,k,b,v,x,y,C=0,A=e.bMarks[r]+e.tShift[r],w=e.eMarks[r],q=r+1;if(91!==e.src.charCodeAt(A))return!1;for(;++Aq&&!e.isEmpty(q);q++)if(!(e.sCount[q]-e.blkIndent>3||e.sCount[q]<0)){for(v=!1,f=0,d=x.length;d>f;f++)if(x[f](e,q,p,!0)){v=!0;break}if(v)break}for(b=e.getLines(r,q,e.blkIndent,!1).trim(),w=b.length,A=1;w>A;A++){if(c=b.charCodeAt(A),91===c)return!1;if(93===c){g=A;break}10===c?C++:92===c&&(A++,w>A&&10===b.charCodeAt(A)&&C++)}if(0>g||58!==b.charCodeAt(g+1))return!1;for(A=g+2;w>A;A++)if(c=b.charCodeAt(A),10===c)C++;else if(!i(c))break;if(_=n(b,A,w),!_.ok)return!1;if(h=e.md.normalizeLink(_.str),!e.md.validateLink(h))return!1;for(A=_.pos,C+=_.lines,l=A,u=C,k=A;w>A;A++)if(c=b.charCodeAt(A),10===c)C++;else if(!i(c))break;for(_=s(b,A,w),w>A&&k!==A&&_.ok?(y=_.str,A=_.pos,C+=_.lines):(y="",A=l,C=u);w>A&&(c=b.charCodeAt(A),i(c));)A++;if(w>A&&10!==b.charCodeAt(A)&&y)for(y="",A=l,C=u;w>A&&(c=b.charCodeAt(A),i(c));)A++;return w>A&&10!==b.charCodeAt(A)?!1:(m=o(b.slice(1,g)))?a?!0:("undefined"==typeof e.env.references&&(e.env.references={}),"undefined"==typeof e.env.references[m]&&(e.env.references[m]={title:y,href:h}),e.line=r+C+1,!0):!1}},{"../common/utils":4,"../helpers/parse_link_destination":6,"../helpers/parse_link_title":8}],28:[function(e,r,t){"use strict";function n(e,r,t,n){var s,i,a,c,l,u,p,h;for(this.src=e,this.md=r,this.env=t,this.tokens=n,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.parentType="root",this.ddIndent=-1,this.level=0,this.result="",i=this.src,h=!1,a=c=u=p=0,l=i.length;l>c;c++){if(s=i.charCodeAt(c),!h){if(o(s)){u++,9===s?p+=4-p%4:p++;continue}h=!0}(10===s||c===l-1)&&(10!==s&&c++,this.bMarks.push(a),this.eMarks.push(c),this.tShift.push(u),this.sCount.push(p),h=!1,u=0,p=0,a=c+1)}this.bMarks.push(i.length),this.eMarks.push(i.length),this.tShift.push(0),this.sCount.push(0),this.lineMax=this.bMarks.length-1}var s=e("../token"),o=e("../common/utils").isSpace;n.prototype.push=function(e,r,t){var n=new s(e,r,t);return n.block=!0,0>t&&this.level--,n.level=this.level,t>0&&this.level++,this.tokens.push(n),n},n.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},n.prototype.skipEmptyLines=function(e){for(var r=this.lineMax;r>e&&!(this.bMarks[e]+this.tShift[e]e&&(r=this.src.charCodeAt(e),o(r));e++);return e},n.prototype.skipSpacesBack=function(e,r){if(r>=e)return e;for(;e>r;)if(!o(this.src.charCodeAt(--e)))return e+1;return e},n.prototype.skipChars=function(e,r){for(var t=this.src.length;t>e&&this.src.charCodeAt(e)===r;e++);return e},n.prototype.skipCharsBack=function(e,r,t){if(t>=e)return e;for(;e>t;)if(r!==this.src.charCodeAt(--e))return e+1;return e},n.prototype.getLines=function(e,r,t,n){var s,i,a,c,l,u,p,h=e;if(e>=r)return"";for(u=new Array(r-e),s=0;r>h;h++,s++){for(i=0,p=c=this.bMarks[h],l=r>h+1||n?this.eMarks[h]+1:this.eMarks[h];l>c&&t>i;){if(a=this.src.charCodeAt(c),o(a))9===a?i+=4-i%4:i++;else{if(!(c-pn;)96===r&&o%2===0?(a=!a,c=n):124!==r||o%2!==0||a?92===r?o++:o=0:(t.push(e.substring(i,n)),i=n+1),n++,n===s&&a&&(a=!1,n=c+1),r=e.charCodeAt(n);return t.push(e.substring(i)),t}r.exports=function(e,r,t,o){var i,a,c,l,u,p,h,f,d,m,g,_;if(r+2>t)return!1;if(u=r+1,e.sCount[u]=e.eMarks[u])return!1;if(i=e.src.charCodeAt(c),124!==i&&45!==i&&58!==i)return!1;if(a=n(e,r+1),!/^[-:| ]+$/.test(a))return!1;for(p=a.split("|"),d=[],l=0;ld.length)return!1;if(o)return!0;for(f=e.push("table_open","table",1),f.map=g=[r,0],f=e.push("thead_open","thead",1),f.map=[r,r+1],f=e.push("tr_open","tr",1),f.map=[r,r+1],l=0;lu&&!(e.sCount[u]l;l++)f=e.push("td_open","td",1),d[l]&&(f.attrs=[["style","text-align:"+d[l]]]),f=e.push("inline","",0),f.content=p[l]?p[l].trim():"",f.children=[],f=e.push("td_close","td",-1);f=e.push("tr_close","tr",-1)}return f=e.push("tbody_close","tbody",-1),f=e.push("table_close","table",-1),g[1]=_[1]=u,e.line=u,!0}},{}],30:[function(e,r,t){"use strict";r.exports=function(e){var r;e.inlineMode?(r=new e.Token("inline","",0),r.content=e.src,r.map=[0,1],r.children=[],e.tokens.push(r)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}},{}],31:[function(e,r,t){"use strict";r.exports=function(e){var r,t,n,s=e.tokens;for(t=0,n=s.length;n>t;t++)r=s[t],"inline"===r.type&&e.md.inline.parse(r.content,e.md,e.env,r.children)}},{}],32:[function(e,r,t){"use strict";function n(e){return/^\s]/i.test(e)}function s(e){return/^<\/a\s*>/i.test(e)}var o=e("../common/utils").arrayReplaceAt;r.exports=function(e){var r,t,i,a,c,l,u,p,h,f,d,m,g,_,k,b,v,x=e.tokens;if(e.md.options.linkify)for(t=0,i=x.length;i>t;t++)if("inline"===x[t].type&&e.md.linkify.pretest(x[t].content))for(a=x[t].children,g=0,r=a.length-1;r>=0;r--)if(l=a[r],"link_close"!==l.type){if("html_inline"===l.type&&(n(l.content)&&g>0&&g--,s(l.content)&&g++),!(g>0)&&"text"===l.type&&e.md.linkify.test(l.content)){for(h=l.content,v=e.md.linkify.match(h),u=[],m=l.level,d=0,p=0;pd&&(c=new e.Token("text","",0),c.content=h.slice(d,f),c.level=m,u.push(c)),c=new e.Token("link_open","a",1),c.attrs=[["href",k]],c.level=m++,c.markup="linkify",c.info="auto",u.push(c),c=new e.Token("text","",0),c.content=b,c.level=m,u.push(c),c=new e.Token("link_close","a",-1),c.level=--m,c.markup="linkify",c.info="auto",u.push(c),d=v[p].lastIndex);d=0;r--)t=e[r],"text"===t.type&&(t.content=t.content.replace(c,n))}function o(e){var r,t;for(r=e.length-1;r>=0;r--)t=e[r],"text"===t.type&&i.test(t.content)&&(t.content=t.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])\u2026/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---([^-]|$)/gm,"$1—$2").replace(/(^|\s)--(\s|$)/gm,"$1–$2").replace(/(^|[^-\s])--([^-\s]|$)/gm,"$1–$2"))}var i=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,a=/\((c|tm|r|p)\)/i,c=/\((c|tm|r|p)\)/gi,l={c:"©",r:"®",p:"§",tm:"™"};r.exports=function(e){var r;if(e.md.options.typographer)for(r=e.tokens.length-1;r>=0;r--)"inline"===e.tokens[r].type&&(a.test(e.tokens[r].content)&&s(e.tokens[r].children),i.test(e.tokens[r].content)&&o(e.tokens[r].children))}},{}],35:[function(e,r,t){"use strict";function n(e,r,t){return e.substr(0,r)+t+e.substr(r+1)}function s(e,r){var t,s,c,p,h,f,d,m,g,_,k,b,v,x,y,C,A,w,q,D,E;for(q=[],t=0;t=0&&!(q[A].level<=d);A--);if(q.length=A+1,"text"===s.type){c=s.content,h=0,f=c.length;e:for(;f>h&&(l.lastIndex=h,p=l.exec(c));){if(y=C=!0,h=p.index+1,w="'"===p[0],g=32,p.index-1>=0)g=c.charCodeAt(p.index-1);else for(A=t-1;A>=0;A--)if("text"===e[A].type){g=e[A].content.charCodeAt(e[A].content.length-1);break}if(_=32,f>h)_=c.charCodeAt(h);else for(A=t+1;A=48&&57>=g&&(C=y=!1),y&&C&&(y=!1,C=b),y||C){if(C)for(A=q.length-1;A>=0&&(m=q[A],!(q[A].level=0;r--)"inline"===e.tokens[r].type&&c.test(e.tokens[r].content)&&s(e.tokens[r].children,e)}},{"../common/utils":4}],36:[function(e,r,t){"use strict";function n(e,r,t){this.src=e,this.env=t,this.tokens=[],this.inlineMode=!1,this.md=r}var s=e("../token");n.prototype.Token=s,r.exports=n},{"../token":51}],37:[function(e,r,t){"use strict";var n=/^<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/,s=/^<([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)>/;r.exports=function(e,r){var t,o,i,a,c,l,u=e.pos;return 60!==e.src.charCodeAt(u)?!1:(t=e.src.slice(u),t.indexOf(">")<0?!1:s.test(t)?(o=t.match(s),a=o[0].slice(1,-1),c=e.md.normalizeLink(a),e.md.validateLink(c)?(r||(l=e.push("link_open","a",1),l.attrs=[["href",c]],l.markup="autolink",l.info="auto",l=e.push("text","",0),l.content=e.md.normalizeLinkText(a),l=e.push("link_close","a",-1),l.markup="autolink",l.info="auto"),e.pos+=o[0].length,!0):!1):n.test(t)?(i=t.match(n),a=i[0].slice(1,-1),c=e.md.normalizeLink("mailto:"+a),e.md.validateLink(c)?(r||(l=e.push("link_open","a",1),l.attrs=[["href",c]],l.markup="autolink",l.info="auto",l=e.push("text","",0),l.content=e.md.normalizeLinkText(a),l=e.push("link_close","a",-1),l.markup="autolink",l.info="auto"),e.pos+=i[0].length,!0):!1):!1)}},{}],38:[function(e,r,t){"use strict";r.exports=function(e,r){var t,n,s,o,i,a,c=e.pos,l=e.src.charCodeAt(c);if(96!==l)return!1;for(t=c,c++,n=e.posMax;n>c&&96===e.src.charCodeAt(c);)c++;for(s=e.src.slice(t,c),o=i=c;-1!==(o=e.src.indexOf("`",i));){for(i=o+1;n>i&&96===e.src.charCodeAt(i);)i++;if(i-o===s.length)return r||(a=e.push("code_inline","code",0),a.markup=s,a.content=e.src.slice(c,o).replace(/[ \n]+/g," ").trim()),e.pos=i,!0}return r||(e.pending+=s),e.pos+=s.length,!0}},{}],39:[function(e,r,t){"use strict";r.exports=function(e){var r,t,n,s,o=e.delimiters,i=e.delimiters.length;for(r=0;i>r;r++)if(n=o[r],n.close)for(t=r-n.jump-1;t>=0;){if(s=o[t],s.open&&s.marker===n.marker&&s.end<0&&s.level===n.level){n.jump=r-t,n.open=!1,s.end=r,s.jump=0;break}t-=s.jump+1}}},{}],40:[function(e,r,t){"use strict";r.exports.tokenize=function(e,r){var t,n,s,o=e.pos,i=e.src.charCodeAt(o);if(r)return!1;if(95!==i&&42!==i)return!1;for(n=e.scanDelims(e.pos,42===i),t=0;tr;r++)t=a[r],(95===t.marker||42===t.marker)&&-1!==t.end&&(n=a[t.end],i=c>r+1&&a[r+1].end===t.end-1&&a[r+1].token===t.token+1&&a[t.end-1].token===n.token-1&&a[r+1].marker===t.marker,o=String.fromCharCode(t.marker),s=e.tokens[t.token],s.type=i?"strong_open":"em_open",s.tag=i?"strong":"em",s.nesting=1,s.markup=i?o+o:o,s.content="",s=e.tokens[n.token],s.type=i?"strong_close":"em_close",s.tag=i?"strong":"em",s.nesting=-1,s.markup=i?o+o:o,s.content="",i&&(e.tokens[a[r+1].token].content="",e.tokens[a[t.end-1].token].content="",r++))}},{}],41:[function(e,r,t){"use strict";var n=e("../common/entities"),s=e("../common/utils").has,o=e("../common/utils").isValidEntityCode,i=e("../common/utils").fromCodePoint,a=/^&#((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i,c=/^&([a-z][a-z0-9]{1,31});/i;r.exports=function(e,r){var t,l,u,p=e.pos,h=e.posMax;if(38!==e.src.charCodeAt(p))return!1;if(h>p+1)if(t=e.src.charCodeAt(p+1),35===t){if(u=e.src.slice(p).match(a))return r||(l="x"===u[1][0].toLowerCase()?parseInt(u[1].slice(1),16):parseInt(u[1],10),e.pending+=i(o(l)?l:65533)),e.pos+=u[0].length,!0}else if(u=e.src.slice(p).match(c),u&&s(n,u[1]))return r||(e.pending+=n[u[1]]),e.pos+=u[0].length,!0;return r||(e.pending+="&"),e.pos++,!0}},{"../common/entities":1,"../common/utils":4}],42:[function(e,r,t){"use strict";for(var n=e("../common/utils").isSpace,s=[],o=0;256>o;o++)s.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){s[e.charCodeAt(0)]=1}),r.exports=function(e,r){var t,o=e.pos,i=e.posMax;if(92!==e.src.charCodeAt(o))return!1;if(o++,i>o){if(t=e.src.charCodeAt(o),256>t&&0!==s[t])return r||(e.pending+=e.src[o]),e.pos+=2,!0;if(10===t){for(r||e.push("hardbreak","br",0),o++;i>o&&(t=e.src.charCodeAt(o),n(t));)o++;return e.pos=o,!0}}return r||(e.pending+="\\"),e.pos++,!0}},{"../common/utils":4}],43:[function(e,r,t){"use strict";function n(e){var r=32|e;return r>=97&&122>=r}var s=e("../common/html_re").HTML_TAG_RE;r.exports=function(e,r){var t,o,i,a,c=e.pos;return e.md.options.html?(i=e.posMax,60!==e.src.charCodeAt(c)||c+2>=i?!1:(t=e.src.charCodeAt(c+1),(33===t||63===t||47===t||n(t))&&(o=e.src.slice(c).match(s))?(r||(a=e.push("html_inline","",0),a.content=e.src.slice(c,c+o[0].length)),e.pos+=o[0].length,!0):!1)):!1}},{"../common/html_re":3}],44:[function(e,r,t){"use strict";var n=e("../helpers/parse_link_label"),s=e("../helpers/parse_link_destination"),o=e("../helpers/parse_link_title"),i=e("../common/utils").normalizeReference,a=e("../common/utils").isSpace;r.exports=function(e,r){var t,c,l,u,p,h,f,d,m,g,_,k,b,v="",x=e.pos,y=e.posMax;if(33!==e.src.charCodeAt(e.pos))return!1;if(91!==e.src.charCodeAt(e.pos+1))return!1;if(h=e.pos+2,p=n(e,e.pos+1,!1),0>p)return!1;if(f=p+1,y>f&&40===e.src.charCodeAt(f)){for(f++;y>f&&(c=e.src.charCodeAt(f),a(c)||10===c);f++);if(f>=y)return!1;for(b=f,m=s(e.src,f,e.posMax),m.ok&&(v=e.md.normalizeLink(m.str),e.md.validateLink(v)?f=m.pos:v=""),b=f;y>f&&(c=e.src.charCodeAt(f),a(c)||10===c);f++);if(m=o(e.src,f,e.posMax),y>f&&b!==f&&m.ok)for(g=m.str,f=m.pos;y>f&&(c=e.src.charCodeAt(f),a(c)||10===c);f++);else g="";if(f>=y||41!==e.src.charCodeAt(f))return e.pos=x,!1;f++}else{if("undefined"==typeof e.env.references)return!1;if(y>f&&91===e.src.charCodeAt(f)?(b=f+1,f=n(e,f),f>=0?u=e.src.slice(b,f++):f=p+1):f=p+1,u||(u=e.src.slice(h,p)),d=e.env.references[i(u)],!d)return e.pos=x,!1;v=d.href,g=d.title}return r||(l=e.src.slice(h,p),e.md.inline.parse(l,e.md,e.env,k=[]),_=e.push("image","img",0),_.attrs=t=[["src",v],["alt",""]],_.children=k,_.content=l,g&&t.push(["title",g])),e.pos=f,e.posMax=y,!0}},{"../common/utils":4,"../helpers/parse_link_destination":6,"../helpers/parse_link_label":7,"../helpers/parse_link_title":8}],45:[function(e,r,t){"use strict";var n=e("../helpers/parse_link_label"),s=e("../helpers/parse_link_destination"),o=e("../helpers/parse_link_title"),i=e("../common/utils").normalizeReference,a=e("../common/utils").isSpace;r.exports=function(e,r){var t,c,l,u,p,h,f,d,m,g,_="",k=e.pos,b=e.posMax,v=e.pos;if(91!==e.src.charCodeAt(e.pos))return!1;if(p=e.pos+1,u=n(e,e.pos,!0),0>u)return!1;if(h=u+1,b>h&&40===e.src.charCodeAt(h)){for(h++;b>h&&(c=e.src.charCodeAt(h),a(c)||10===c);h++);if(h>=b)return!1;for(v=h,f=s(e.src,h,e.posMax),f.ok&&(_=e.md.normalizeLink(f.str),e.md.validateLink(_)?h=f.pos:_=""),v=h;b>h&&(c=e.src.charCodeAt(h),a(c)||10===c);h++);if(f=o(e.src,h,e.posMax),b>h&&v!==h&&f.ok)for(m=f.str,h=f.pos;b>h&&(c=e.src.charCodeAt(h),a(c)||10===c);h++);else m="";if(h>=b||41!==e.src.charCodeAt(h))return e.pos=k,!1;h++}else{if("undefined"==typeof e.env.references)return!1;if(b>h&&91===e.src.charCodeAt(h)?(v=h+1,h=n(e,h),h>=0?l=e.src.slice(v,h++):h=u+1):h=u+1,l||(l=e.src.slice(p,u)),d=e.env.references[i(l)],!d)return e.pos=k,!1;_=d.href,m=d.title}return r||(e.pos=p,e.posMax=u,g=e.push("link_open","a",1),g.attrs=t=[["href",_]],m&&t.push(["title",m]),e.md.inline.tokenize(e),g=e.push("link_close","a",-1)),e.pos=h,e.posMax=b,!0}},{"../common/utils":4,"../helpers/parse_link_destination":6,"../helpers/parse_link_label":7,"../helpers/parse_link_title":8}],46:[function(e,r,t){"use strict";r.exports=function(e,r){var t,n,s=e.pos;if(10!==e.src.charCodeAt(s))return!1;for(t=e.pending.length-1,n=e.posMax,r||(t>=0&&32===e.pending.charCodeAt(t)?t>=1&&32===e.pending.charCodeAt(t-1)?(e.pending=e.pending.replace(/ +$/,""),e.push("hardbreak","br",0)):(e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0)):e.push("softbreak","br",0)),s++;n>s&&32===e.src.charCodeAt(s);)s++;return e.pos=s,!0}},{}],47:[function(e,r,t){"use strict";function n(e,r,t,n){this.src=e,this.env=t,this.md=r,this.tokens=n,this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[]}var s=e("../token"),o=e("../common/utils").isWhiteSpace,i=e("../common/utils").isPunctChar,a=e("../common/utils").isMdAsciiPunct;n.prototype.pushPending=function(){var e=new s("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},n.prototype.push=function(e,r,t){this.pending&&this.pushPending();var n=new s(e,r,t);return 0>t&&this.level--,n.level=this.level,t>0&&this.level++,this.pendingLevel=this.level,this.tokens.push(n),n},n.prototype.scanDelims=function(e,r){var t,n,s,c,l,u,p,h,f,d=e,m=!0,g=!0,_=this.posMax,k=this.src.charCodeAt(e);for(t=e>0?this.src.charCodeAt(e-1):32;_>d&&this.src.charCodeAt(d)===k;)d++;return s=d-e,n=_>d?this.src.charCodeAt(d):32,p=a(t)||i(String.fromCharCode(t)),f=a(n)||i(String.fromCharCode(n)),u=o(t),h=o(n),h?m=!1:f&&(u||p||(m=!1)),u?g=!1:p&&(h||f||(g=!1)),r?(c=m,l=g):(c=m&&(!g||p),l=g&&(!m||f)),{can_open:c,can_close:l,length:s}},n.prototype.Token=s,r.exports=n},{"../common/utils":4,"../token":51}],48:[function(e,r,t){"use strict";r.exports.tokenize=function(e,r){var t,n,s,o,i,a=e.pos,c=e.src.charCodeAt(a);if(r)return!1;if(126!==c)return!1;if(n=e.scanDelims(e.pos,!0),o=n.length,i=String.fromCharCode(c),2>o)return!1;for(o%2&&(s=e.push("text","",0),s.content=i,o--),t=0;o>t;t+=2)s=e.push("text","",0),s.content=i+i,e.delimiters.push({marker:c,jump:t,token:e.tokens.length-1,level:e.level,end:-1,open:n.can_open,close:n.can_close});return e.pos+=n.length,!0},r.exports.postProcess=function(e){var r,t,n,s,o,i=[],a=e.delimiters,c=e.delimiters.length;for(r=0;c>r;r++)n=a[r],126===n.marker&&-1!==n.end&&(s=a[n.end],o=e.tokens[n.token],o.type="s_open",o.tag="s",o.nesting=1,o.markup="~~",o.content="",o=e.tokens[s.token],o.type="s_close",o.tag="s",o.nesting=-1,o.markup="~~",o.content="","text"===e.tokens[s.token-1].type&&"~"===e.tokens[s.token-1].content&&i.push(s.token-1));for(;i.length;){for(r=i.pop(),t=r+1;tr;r++)n+=s[r].nesting,s[r].level=n,"text"===s[r].type&&o>r+1&&"text"===s[r+1].type?s[r+1].content=s[r].content+s[r+1].content:(r!==t&&(s[t]=s[r]),t++);r!==t&&(s.length=t)}},{}],51:[function(e,r,t){"use strict";function n(e,r,t){this.type=e,this.tag=r,this.attrs=null,this.map=null,this.nesting=t,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}n.prototype.attrIndex=function(e){var r,t,n;if(!this.attrs)return-1;for(r=this.attrs,t=0,n=r.length;n>t;t++)if(r[t][0]===e)return t;return-1},n.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]},n.prototype.attrSet=function(e,r){var t=this.attrIndex(e),n=[e,r];0>t?this.attrPush(n):this.attrs[t]=n},n.prototype.attrJoin=function(e,r){var t=this.attrIndex(e);0>t?this.attrPush([e,r]):this.attrs[t][1]=this.attrs[t][1]+" "+r},r.exports=n},{}],52:[function(r,t,n){(function(r){!function(s){function o(e){throw new RangeError(R[e])}function i(e,r){for(var t=e.length,n=[];t--;)n[t]=r(e[t]);return n}function a(e,r){var t=e.split("@"),n="";t.length>1&&(n=t[0]+"@",e=t[1]),e=e.replace(T,".");var s=e.split("."),o=i(s,r).join(".");return n+o}function c(e){for(var r,t,n=[],s=0,o=e.length;o>s;)r=e.charCodeAt(s++),r>=55296&&56319>=r&&o>s?(t=e.charCodeAt(s++),56320==(64512&t)?n.push(((1023&r)<<10)+(1023&t)+65536):(n.push(r),s--)):n.push(r);return n}function l(e){return i(e,function(e){var r="";return e>65535&&(e-=65536,r+=B(e>>>10&1023|55296),e=56320|1023&e),r+=B(e)}).join("")}function u(e){return 10>e-48?e-22:26>e-65?e-65:26>e-97?e-97:C}function p(e,r){return e+22+75*(26>e)-((0!=r)<<5)}function h(e,r,t){var n=0;for(e=t?I(e/D):e>>1,e+=I(e/r);e>M*w>>1;n+=C)e=I(e/M);return I(n+(M+1)*e/(e+q))}function f(e){var r,t,n,s,i,a,c,p,f,d,m=[],g=e.length,_=0,k=S,b=E;for(t=e.lastIndexOf(F),0>t&&(t=0),n=0;t>n;++n)e.charCodeAt(n)>=128&&o("not-basic"),m.push(e.charCodeAt(n));for(s=t>0?t+1:0;g>s;){for(i=_,a=1,c=C;s>=g&&o("invalid-input"),p=u(e.charCodeAt(s++)),(p>=C||p>I((y-_)/a))&&o("overflow"),_+=p*a,f=b>=c?A:c>=b+w?w:c-b,!(f>p);c+=C)d=C-f,a>I(y/d)&&o("overflow"),a*=d;r=m.length+1,b=h(_-i,r,0==i),I(_/r)>y-k&&o("overflow"),k+=I(_/r),_%=r,m.splice(_++,0,k)}return l(m)}function d(e){var r,t,n,s,i,a,l,u,f,d,m,g,_,k,b,v=[];for(e=c(e),g=e.length,r=S,t=0,i=E,a=0;g>a;++a)m=e[a],128>m&&v.push(B(m));for(n=s=v.length,s&&v.push(F);g>n;){for(l=y,a=0;g>a;++a)m=e[a],m>=r&&l>m&&(l=m);for(_=n+1,l-r>I((y-t)/_)&&o("overflow"),t+=(l-r)*_,r=l,a=0;g>a;++a)if(m=e[a],r>m&&++t>y&&o("overflow"),m==r){for(u=t,f=C;d=i>=f?A:f>=i+w?w:f-i,!(d>u);f+=C)b=u-d,k=C-d,v.push(B(p(d+b%k,0))),u=I(b/k);v.push(B(p(u,0))),i=h(t,_,n==s),t=0,++n}++t,++r}return v.join("")}function m(e){return a(e,function(e){return L.test(e)?f(e.slice(4).toLowerCase()):e})}function g(e){return a(e,function(e){return z.test(e)?"xn--"+d(e):e})}var _="object"==typeof n&&n&&!n.nodeType&&n,k="object"==typeof t&&t&&!t.nodeType&&t,b="object"==typeof r&&r;(b.global===b||b.window===b||b.self===b)&&(s=b);var v,x,y=2147483647,C=36,A=1,w=26,q=38,D=700,E=72,S=128,F="-",L=/^xn--/,z=/[^\x20-\x7E]/,T=/[\x2E\u3002\uFF0E\uFF61]/g,R={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},M=C-A,I=Math.floor,B=String.fromCharCode;if(v={version:"1.3.2",ucs2:{decode:c,encode:l},decode:f,encode:d,toASCII:g,toUnicode:m},"function"==typeof e&&"object"==typeof e.amd&&e.amd)e("punycode",function(){return v});else if(_&&k)if(t.exports==_)k.exports=v;else for(x in v)v.hasOwnProperty(x)&&(_[x]=v[x]);else s.punycode=v}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],53:[function(e,r,t){r.exports={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",amp:"&",AMP:"&",andand:"⩕",And:"⩓",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",apacir:"⩯",ap:"≈",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxHd:"╤",boxhD:"╥",boxHD:"╦",boxhu:"┴",boxHu:"╧",boxhU:"╨",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsolb:"⧅",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",capand:"⩄",capbrcup:"⩉",capcap:"⩋",cap:"∩",Cap:"⋒",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"○",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cup:"∪",Cup:"⋓",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"ⅅ",dd:"ⅆ",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"⇁",DownTeeArrow:"↧",DownTee:"⊤",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",edot:"ė",eDot:"≑",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp13:" ",emsp14:" ",emsp:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð", +eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",ge:"≥",gE:"≧",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅","in":"∈",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺","int":"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}},{}],54:[function(e,r,t){"use strict";function n(e){var r=Array.prototype.slice.call(arguments,1);return r.forEach(function(r){r&&Object.keys(r).forEach(function(t){e[t]=r[t]})}),e}function s(e){return Object.prototype.toString.call(e)}function o(e){return"[object String]"===s(e)}function i(e){return"[object Object]"===s(e)}function a(e){return"[object RegExp]"===s(e)}function c(e){return"[object Function]"===s(e)}function l(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function u(e){return Object.keys(e||{}).reduce(function(e,r){return e||k.hasOwnProperty(r)},!1)}function p(e){e.__index__=-1,e.__text_cache__=""}function h(e){return function(r,t){var n=r.slice(t);return e.test(n)?n.match(e)[0].length:0}}function f(){return function(e,r){r.normalize(e)}}function d(r){function t(e){return e.replace("%TLDS%",u.src_tlds)}function s(e,r){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+r)}var u=r.re=n({},e("./lib/re")),d=r.__tlds__.slice();r.__tlds_replaced__||d.push(v),d.push(u.src_xn),u.src_tlds=d.join("|"),u.email_fuzzy=RegExp(t(u.tpl_email_fuzzy),"i"),u.link_fuzzy=RegExp(t(u.tpl_link_fuzzy),"i"),u.link_no_ip_fuzzy=RegExp(t(u.tpl_link_no_ip_fuzzy),"i"),u.host_fuzzy_test=RegExp(t(u.tpl_host_fuzzy_test),"i");var m=[];r.__compiled__={},Object.keys(r.__schemas__).forEach(function(e){var t=r.__schemas__[e];if(null!==t){var n={validate:null,link:null};return r.__compiled__[e]=n,i(t)?(a(t.validate)?n.validate=h(t.validate):c(t.validate)?n.validate=t.validate:s(e,t),void(c(t.normalize)?n.normalize=t.normalize:t.normalize?s(e,t):n.normalize=f())):o(t)?void m.push(e):void s(e,t)}}),m.forEach(function(e){r.__compiled__[r.__schemas__[e]]&&(r.__compiled__[e].validate=r.__compiled__[r.__schemas__[e]].validate,r.__compiled__[e].normalize=r.__compiled__[r.__schemas__[e]].normalize)}),r.__compiled__[""]={validate:null,normalize:f()};var g=Object.keys(r.__compiled__).filter(function(e){return e.length>0&&r.__compiled__[e]}).map(l).join("|");r.re.schema_test=RegExp("(^|(?!_)(?:>|"+u.src_ZPCc+"))("+g+")","i"),r.re.schema_search=RegExp("(^|(?!_)(?:>|"+u.src_ZPCc+"))("+g+")","ig"),r.re.pretest=RegExp("("+r.re.schema_test.source+")|("+r.re.host_fuzzy_test.source+")|@","i"),p(r)}function m(e,r){var t=e.__index__,n=e.__last_index__,s=e.__text_cache__.slice(t,n);this.schema=e.__schema__.toLowerCase(),this.index=t+r,this.lastIndex=n+r,this.raw=s,this.text=s,this.url=s}function g(e,r){var t=new m(e,r);return e.__compiled__[t.schema].normalize(t,e),t}function _(e,r){return this instanceof _?(r||u(e)&&(r=e,e={}),this.__opts__=n({},k,r),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=n({},b,e),this.__compiled__={},this.__tlds__=x,this.__tlds_replaced__=!1,this.re={},void d(this)):new _(e,r)}var k={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1},b={"http:":{validate:function(e,r,t){var n=e.slice(r);return t.re.http||(t.re.http=new RegExp("^\\/\\/"+t.re.src_auth+t.re.src_host_port_strict+t.re.src_path,"i")),t.re.http.test(n)?n.match(t.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,r,t){var n=e.slice(r);return t.re.no_http||(t.re.no_http=new RegExp("^"+t.re.src_auth+t.re.src_host_port_strict+t.re.src_path,"i")),t.re.no_http.test(n)?r>=3&&":"===e[r-3]?0:n.match(t.re.no_http)[0].length:0}},"mailto:":{validate:function(e,r,t){var n=e.slice(r);return t.re.mailto||(t.re.mailto=new RegExp("^"+t.re.src_email_name+"@"+t.re.src_host_strict,"i")),t.re.mailto.test(n)?n.match(t.re.mailto)[0].length:0}}},v="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",x="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");_.prototype.add=function(e,r){return this.__schemas__[e]=r,d(this),this},_.prototype.set=function(e){return this.__opts__=n(this.__opts__,e),this},_.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var r,t,n,s,o,i,a,c,l;if(this.re.schema_test.test(e))for(a=this.re.schema_search,a.lastIndex=0;null!==(r=a.exec(e));)if(s=this.testSchemaAt(e,r[2],a.lastIndex)){this.__schema__=r[2],this.__index__=r.index+r[1].length,this.__last_index__=r.index+r[0].length+s;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(c=e.search(this.re.host_fuzzy_test),c>=0&&(this.__index__<0||c=0&&null!==(n=e.match(this.re.email_fuzzy))&&(o=n.index+n[1].length,i=n.index+n[0].length,(this.__index__<0||othis.__last_index__)&&(this.__schema__="mailto:",this.__index__=o,this.__last_index__=i))),this.__index__>=0},_.prototype.pretest=function(e){return this.re.pretest.test(e)},_.prototype.testSchemaAt=function(e,r,t){return this.__compiled__[r.toLowerCase()]?this.__compiled__[r.toLowerCase()].validate(e,t,this):0},_.prototype.match=function(e){var r=0,t=[];this.__index__>=0&&this.__text_cache__===e&&(t.push(g(this,r)),r=this.__last_index__);for(var n=r?e.slice(r):e;this.test(n);)t.push(g(this,r)),n=n.slice(this.__last_index__),r+=this.__last_index__;return t.length?t:null},_.prototype.tlds=function(e,r){return e=Array.isArray(e)?e:[e],r?(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(e,r,t){return e!==t[r-1]}).reverse(),d(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,d(this),this)},_.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},r.exports=_},{"./lib/re":55}],55:[function(e,r,t){"use strict";var n=t.src_Any=e("uc.micro/properties/Any/regex").source,s=t.src_Cc=e("uc.micro/categories/Cc/regex").source,o=t.src_Z=e("uc.micro/categories/Z/regex").source,i=t.src_P=e("uc.micro/categories/P/regex").source,a=t.src_ZPCc=[o,i,s].join("|"),c=t.src_ZCc=[o,s].join("|"),l="(?:(?!"+a+")"+n+")",u="(?:(?![0-9]|"+a+")"+n+")",p=t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)";t.src_auth="(?:(?:(?!"+c+").)+@)?";var h=t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",f=t.src_host_terminator="(?=$|"+a+")(?!-|_|:\\d|\\.-|\\.(?!$|"+a+"))",d=t.src_path="(?:[/?#](?:(?!"+c+"|[()[\\]{}.,\"'?!\\-]).|\\[(?:(?!"+c+"|\\]).)*\\]|\\((?:(?!"+c+"|[)]).)*\\)|\\{(?:(?!"+c+'|[}]).)*\\}|\\"(?:(?!'+c+'|["]).)+\\"|\\\'(?:(?!'+c+"|[']).)+\\'|\\'(?="+l+").|\\.{2,3}[a-zA-Z0-9%/]|\\.(?!"+c+"|[.]).|\\-(?!--(?:[^-]|$))(?:-*)|\\,(?!"+c+").|\\!(?!"+c+"|[!]).|\\?(?!"+c+"|[?]).)+|\\/)?",m=t.src_email_name='[\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]+',g=t.src_xn="xn--[a-z0-9\\-]{1,59}",_=t.src_domain_root="(?:"+g+"|"+u+"{1,63})",k=t.src_domain="(?:"+g+"|(?:"+l+")|(?:"+l+"(?:-(?!-)|"+l+"){0,61}"+l+"))",b=t.src_host="(?:"+p+"|(?:(?:(?:"+k+")\\.)*"+_+"))",v=t.tpl_host_fuzzy="(?:"+p+"|(?:(?:(?:"+k+")\\.)+(?:%TLDS%)))",x=t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+k+")\\.)+(?:%TLDS%))";t.src_host_strict=b+f;var y=t.tpl_host_fuzzy_strict=v+f;t.src_host_port_strict=b+h+f;var C=t.tpl_host_port_fuzzy_strict=v+h+f,A=t.tpl_host_port_no_ip_fuzzy_strict=x+h+f;t.tpl_host_fuzzy_test="localhost|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+a+"|$))",t.tpl_email_fuzzy="(^|>|"+c+")("+m+"@"+y+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|]|"+a+"))((?![$+<=>^`|])"+C+d+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|]|"+a+"))((?![$+<=>^`|])"+A+d+")"},{"uc.micro/categories/Cc/regex":61,"uc.micro/categories/P/regex":63,"uc.micro/categories/Z/regex":64,"uc.micro/properties/Any/regex":66}],56:[function(e,r,t){"use strict";function n(e){var r,t,n=o[e];if(n)return n;for(n=o[e]=[],r=0;128>r;r++)t=String.fromCharCode(r),n.push(t);for(r=0;rr;r+=3)s=parseInt(e.slice(r+1,r+3),16),128>s?l+=t[s]:192===(224&s)&&n>r+3&&(o=parseInt(e.slice(r+4,r+6),16),128===(192&o))?(c=s<<6&1984|63&o,l+=128>c?"��":String.fromCharCode(c),r+=3):224===(240&s)&&n>r+6&&(o=parseInt(e.slice(r+4,r+6),16),i=parseInt(e.slice(r+7,r+9),16),128===(192&o)&&128===(192&i))?(c=s<<12&61440|o<<6&4032|63&i,l+=2048>c||c>=55296&&57343>=c?"���":String.fromCharCode(c),r+=6):240===(248&s)&&n>r+9&&(o=parseInt(e.slice(r+4,r+6),16),i=parseInt(e.slice(r+7,r+9),16),a=parseInt(e.slice(r+10,r+12),16),128===(192&o)&&128===(192&i)&&128===(192&a))?(c=s<<18&1835008|o<<12&258048|i<<6&4032|63&a,65536>c||c>1114111?l+="����":(c-=65536,l+=String.fromCharCode(55296+(c>>10),56320+(1023&c))),r+=9):l+="�";return l})}var o={};s.defaultChars=";/?:@&=+$,#",s.componentChars="",r.exports=s},{}],57:[function(e,r,t){"use strict";function n(e){var r,t,n=o[e];if(n)return n;for(n=o[e]=[],r=0;128>r;r++)t=String.fromCharCode(r),/^[0-9a-z]$/i.test(t)?n.push(t):n.push("%"+("0"+r.toString(16).toUpperCase()).slice(-2));for(r=0;ro;o++)if(a=e.charCodeAt(o),t&&37===a&&i>o+2&&/^[0-9a-f]{2}$/i.test(e.slice(o+1,o+3)))u+=e.slice(o,o+3),o+=2;else if(128>a)u+=l[a];else if(a>=55296&&57343>=a){if(a>=55296&&56319>=a&&i>o+1&&(c=e.charCodeAt(o+1),c>=56320&&57343>=c)){u+=encodeURIComponent(e[o]+e[o+1]),o++;continue}u+="%EF%BF%BD"}else u+=encodeURIComponent(e[o]);return u}var o={};s.defaultChars=";/?:@&=+$,-_.!~*'()#",s.componentChars="-_.!~*'()",r.exports=s},{}],58:[function(e,r,t){"use strict";r.exports=function(e){var r="";return r+=e.protocol||"",r+=e.slashes?"//":"",r+=e.auth?e.auth+"@":"",r+=e.hostname&&-1!==e.hostname.indexOf(":")?"["+e.hostname+"]":e.hostname||"",r+=e.port?":"+e.port:"",r+=e.pathname||"",r+=e.search||"",r+=e.hash||""}},{}],59:[function(e,r,t){"use strict";r.exports.encode=e("./encode"),r.exports.decode=e("./decode"),r.exports.format=e("./format"),r.exports.parse=e("./parse")},{"./decode":56,"./encode":57,"./format":58,"./parse":60}],60:[function(e,r,t){"use strict";function n(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}function s(e,r){if(e&&e instanceof n)return e;var t=new n;return t.parse(e,r),t}var o=/^([a-z0-9.+-]+:)/i,i=/:[0-9]*$/,a=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["<",">",'"',"`"," ","\r","\n"," "],l=["{","}","|","\\","^","`"].concat(c),u=["'"].concat(l),p=["%","/","?",";","#"].concat(u),h=["/","?","#"],f=255,d=/^[+a-z0-9A-Z_-]{0,63}$/,m=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,g={javascript:!0,"javascript:":!0},_={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};n.prototype.parse=function(e,r){var t,n,s,i,c,l=e;if(l=l.trim(),!r&&1===e.split("#").length){var u=a.exec(l);if(u)return this.pathname=u[1],u[2]&&(this.search=u[2]),this}var k=o.exec(l);if(k&&(k=k[0],s=k.toLowerCase(),this.protocol=k,l=l.substr(k.length)),(r||k||l.match(/^\/\/[^@\/]+@[^@\/]+/))&&(c="//"===l.substr(0,2),!c||k&&g[k]||(l=l.substr(2),this.slashes=!0)),!g[k]&&(c||k&&!_[k])){var b=-1;for(t=0;ti)&&(b=i);var v,x;for(x=-1===b?l.lastIndexOf("@"):l.lastIndexOf("@",b),-1!==x&&(v=l.slice(0,x),l=l.slice(x+1),this.auth=v),b=-1,t=0;ti)&&(b=i);-1===b&&(b=l.length),":"===l[b-1]&&b--;var y=l.slice(0,b);l=l.slice(b),this.parseHost(y),this.hostname=this.hostname||"";var C="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!C){var A=this.hostname.split(/\./);for(t=0,n=A.length;n>t;t++){var w=A[t];if(w&&!w.match(d)){for(var q="",D=0,E=w.length;E>D;D++)q+=w.charCodeAt(D)>127?"x":w[D];if(!q.match(d)){var S=A.slice(0,t),F=A.slice(t+1),L=w.match(m);L&&(S.push(L[1]),F.unshift(L[2])),F.length&&(l=F.join(".")+l),this.hostname=S.join(".");break}}}}this.hostname.length>f&&(this.hostname=""),C&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var z=l.indexOf("#");-1!==z&&(this.hash=l.substr(z),l=l.slice(0,z));var T=l.indexOf("?");return-1!==T&&(this.search=l.substr(T),l=l.slice(0,T)),l&&(this.pathname=l),_[s]&&this.hostname&&!this.pathname&&(this.pathname=""),this},n.prototype.parseHost=function(e){var r=i.exec(e);r&&(r=r[0],":"!==r&&(this.port=r.substr(1)),e=e.substr(0,e.length-r.length)),e&&(this.hostname=e)},r.exports=s},{}],61:[function(e,r,t){r.exports=/[\0-\x1F\x7F-\x9F]/},{}],62:[function(e,r,t){r.exports=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804\uDCBD|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/},{}],63:[function(e,r,t){r.exports=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDE38-\uDE3D]|\uD805[\uDCC6\uDDC1-\uDDC9\uDE41-\uDE43]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F/; },{}],64:[function(e,r,t){r.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/},{}],65:[function(e,r,t){r.exports.Any=e("./properties/Any/regex"),r.exports.Cc=e("./categories/Cc/regex"),r.exports.Cf=e("./categories/Cf/regex"),r.exports.P=e("./categories/P/regex"),r.exports.Z=e("./categories/Z/regex")},{"./categories/Cc/regex":61,"./categories/Cf/regex":62,"./categories/P/regex":63,"./categories/Z/regex":64,"./properties/Any/regex":66}],66:[function(e,r,t){r.exports=/[\0-\uD7FF\uDC00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF]/},{}],67:[function(e,r,t){"use strict";r.exports=e("./lib/")},{"./lib/":9}]},{},[67])(67)});define("Core/KnockoutMarkdownBinding",["markdown-it-sanitizer","markdown-it"],function(MarkdownItSanitizer,MarkdownIt){"use strict";var htmlTagRegex=/(.|\s)*<\/html>/im;var md=new MarkdownIt({html:true,linkify:true});md.use(MarkdownItSanitizer,{imageClass:"",removeUnbalanced:false,removeUnknown:false});var KnockoutMarkdownBinding={register:function(Knockout){Knockout.bindingHandlers.markdown={init:function(){return{controlsDescendantBindings:true}},update:function(element,valueAccessor){while(element.firstChild){Knockout.removeNode(element.firstChild)}var rawText=Knockout.unwrap(valueAccessor());var html;if(htmlTagRegex.test(rawText)){html=rawText}else{html=md.render(rawText)}var nodes=Knockout.utils.parseHtmlFragment(html,element);element.className=element.className+" markdown";for(var i=0;i0){for(var i=0;i\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",f=a.console&&(a.console.warn||a.console.log);return f&&f.call(a.console,e,d),b.apply(this,arguments)}}function i(a,b,c){var d,e=b.prototype;d=a.prototype=Object.create(e),d.constructor=a,d._super=e,c&&hb(d,c)}function j(a,b){return function(){return a.apply(b,arguments)}}function k(a,b){return typeof a==kb?a.apply(b?b[0]||d:d,b):a}function l(a,b){return a===d?b:a}function m(a,b,c){g(q(b),function(b){a.addEventListener(b,c,!1)})}function n(a,b,c){g(q(b),function(b){a.removeEventListener(b,c,!1)})}function o(a,b){for(;a;){if(a==b)return!0;a=a.parentNode}return!1}function p(a,b){return a.indexOf(b)>-1}function q(a){return a.trim().split(/\s+/g)}function r(a,b,c){if(a.indexOf&&!c)return a.indexOf(b);for(var d=0;dc[b]}):d.sort()),d}function u(a,b){for(var c,e,f=b[0].toUpperCase()+b.slice(1),g=0;g1&&!c.firstMultiple?c.firstMultiple=D(b):1===e&&(c.firstMultiple=!1);var f=c.firstInput,g=c.firstMultiple,h=g?g.center:f.center,i=b.center=E(d);b.timeStamp=nb(),b.deltaTime=b.timeStamp-f.timeStamp,b.angle=I(h,i),b.distance=H(h,i),B(c,b),b.offsetDirection=G(b.deltaX,b.deltaY);var j=F(b.deltaTime,b.deltaX,b.deltaY);b.overallVelocityX=j.x,b.overallVelocityY=j.y,b.overallVelocity=mb(j.x)>mb(j.y)?j.x:j.y,b.scale=g?K(g.pointers,d):1,b.rotation=g?J(g.pointers,d):0,b.maxPointers=c.prevInput?b.pointers.length>c.prevInput.maxPointers?b.pointers.length:c.prevInput.maxPointers:b.pointers.length,C(c,b);var k=a.element;o(b.srcEvent.target,k)&&(k=b.srcEvent.target),b.target=k}function B(a,b){var c=b.center,d=a.offsetDelta||{},e=a.prevDelta||{},f=a.prevInput||{};(b.eventType===Ab||f.eventType===Cb)&&(e=a.prevDelta={x:f.deltaX||0,y:f.deltaY||0},d=a.offsetDelta={x:c.x,y:c.y}),b.deltaX=e.x+(c.x-d.x),b.deltaY=e.y+(c.y-d.y)}function C(a,b){var c,e,f,g,h=a.lastInterval||b,i=b.timeStamp-h.timeStamp;if(b.eventType!=Db&&(i>zb||h.velocity===d)){var j=b.deltaX-h.deltaX,k=b.deltaY-h.deltaY,l=F(i,j,k);e=l.x,f=l.y,c=mb(l.x)>mb(l.y)?l.x:l.y,g=G(j,k),a.lastInterval=b}else c=h.velocity,e=h.velocityX,f=h.velocityY,g=h.direction;b.velocity=c,b.velocityX=e,b.velocityY=f,b.direction=g}function D(a){for(var b=[],c=0;ce;)c+=a[e].clientX,d+=a[e].clientY,e++;return{x:lb(c/b),y:lb(d/b)}}function F(a,b,c){return{x:b/a||0,y:c/a||0}}function G(a,b){return a===b?Eb:mb(a)>=mb(b)?0>a?Fb:Gb:0>b?Hb:Ib}function H(a,b,c){c||(c=Mb);var d=b[c[0]]-a[c[0]],e=b[c[1]]-a[c[1]];return Math.sqrt(d*d+e*e)}function I(a,b,c){c||(c=Mb);var d=b[c[0]]-a[c[0]],e=b[c[1]]-a[c[1]];return 180*Math.atan2(e,d)/Math.PI}function J(a,b){return I(b[1],b[0],Nb)+I(a[1],a[0],Nb)}function K(a,b){return H(b[0],b[1],Nb)/H(a[0],a[1],Nb)}function L(){this.evEl=Pb,this.evWin=Qb,this.allow=!0,this.pressed=!1,x.apply(this,arguments)}function M(){this.evEl=Tb,this.evWin=Ub,x.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function N(){this.evTarget=Wb,this.evWin=Xb,this.started=!1,x.apply(this,arguments)}function O(a,b){var c=s(a.touches),d=s(a.changedTouches);return b&(Cb|Db)&&(c=t(c.concat(d),"identifier",!0)),[c,d]}function P(){this.evTarget=Zb,this.targetIds={},x.apply(this,arguments)}function Q(a,b){var c=s(a.touches),d=this.targetIds;if(b&(Ab|Bb)&&1===c.length)return d[c[0].identifier]=!0,[c,c];var e,f,g=s(a.changedTouches),h=[],i=this.target;if(f=c.filter(function(a){return o(a.target,i)}),b===Ab)for(e=0;eh&&(b.push(a),h=b.length-1):e&(Cb|Db)&&(c=!0),0>h||(b[h]=a,this.callback(this.manager,e,{pointers:b,changedPointers:[a],pointerType:f,srcEvent:a}),c&&b.splice(h,1))}});var Vb={touchstart:Ab,touchmove:Bb,touchend:Cb,touchcancel:Db},Wb="touchstart",Xb="touchstart touchmove touchend touchcancel";i(N,x,{handler:function(a){var b=Vb[a.type];if(b===Ab&&(this.started=!0),this.started){var c=O.call(this,a,b);b&(Cb|Db)&&c[0].length-c[1].length===0&&(this.started=!1),this.callback(this.manager,b,{pointers:c[0],changedPointers:c[1],pointerType:vb,srcEvent:a})}}});var Yb={touchstart:Ab,touchmove:Bb,touchend:Cb,touchcancel:Db},Zb="touchstart touchmove touchend touchcancel";i(P,x,{handler:function(a){var b=Yb[a.type],c=Q.call(this,a,b);c&&this.callback(this.manager,b,{pointers:c[0],changedPointers:c[1],pointerType:vb,srcEvent:a})}}),i(R,x,{handler:function(a,b,c){var d=c.pointerType==vb,e=c.pointerType==xb;if(d)this.mouse.allow=!1;else if(e&&!this.mouse.allow)return;b&(Cb|Db)&&(this.mouse.allow=!0),this.callback(a,b,c)},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var $b=u(jb.style,"touchAction"),_b=$b!==d,ac="compute",bc="auto",cc="manipulation",dc="none",ec="pan-x",fc="pan-y";S.prototype={set:function(a){a==ac&&(a=this.compute()),_b&&this.manager.element.style&&(this.manager.element.style[$b]=a),this.actions=a.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var a=[];return g(this.manager.recognizers,function(b){k(b.options.enable,[b])&&(a=a.concat(b.getTouchAction()))}),T(a.join(" "))},preventDefaults:function(a){if(!_b){var b=a.srcEvent,c=a.offsetDirection;if(this.manager.session.prevented)return void b.preventDefault();var d=this.actions,e=p(d,dc),f=p(d,fc),g=p(d,ec);if(e){var h=1===a.pointers.length,i=a.distance<2,j=a.deltaTime<250;if(h&&i&&j)return}if(!g||!f)return e||f&&c&Jb||g&&c&Kb?this.preventSrc(b):void 0}},preventSrc:function(a){this.manager.session.prevented=!0,a.preventDefault()}};var gc=1,hc=2,ic=4,jc=8,kc=jc,lc=16,mc=32;U.prototype={defaults:{},set:function(a){return hb(this.options,a),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(a){if(f(a,"recognizeWith",this))return this;var b=this.simultaneous;return a=X(a,this),b[a.id]||(b[a.id]=a,a.recognizeWith(this)),this},dropRecognizeWith:function(a){return f(a,"dropRecognizeWith",this)?this:(a=X(a,this),delete this.simultaneous[a.id],this)},requireFailure:function(a){if(f(a,"requireFailure",this))return this;var b=this.requireFail;return a=X(a,this),-1===r(b,a)&&(b.push(a),a.requireFailure(this)),this},dropRequireFailure:function(a){if(f(a,"dropRequireFailure",this))return this;a=X(a,this);var b=r(this.requireFail,a);return b>-1&&this.requireFail.splice(b,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(a){return!!this.simultaneous[a.id]},emit:function(a){function b(b){c.manager.emit(b,a)}var c=this,d=this.state;jc>d&&b(c.options.event+V(d)),b(c.options.event),a.additionalEvent&&b(a.additionalEvent),d>=jc&&b(c.options.event+V(d))},tryEmit:function(a){return this.canEmit()?this.emit(a):void(this.state=mc)},canEmit:function(){for(var a=0;af?Fb:Gb,c=f!=this.pX,d=Math.abs(a.deltaX)):(e=0===g?Eb:0>g?Hb:Ib,c=g!=this.pY,d=Math.abs(a.deltaY))),a.direction=e,c&&d>b.threshold&&e&b.direction},attrTest:function(a){return Y.prototype.attrTest.call(this,a)&&(this.state&hc||!(this.state&hc)&&this.directionTest(a))},emit:function(a){this.pX=a.deltaX,this.pY=a.deltaY;var b=W(a.direction);b&&(a.additionalEvent=this.options.event+b),this._super.emit.call(this,a)}}),i($,Y,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[dc]},attrTest:function(a){return this._super.attrTest.call(this,a)&&(Math.abs(a.scale-1)>this.options.threshold||this.state&hc)},emit:function(a){if(1!==a.scale){var b=a.scale<1?"in":"out";a.additionalEvent=this.options.event+b}this._super.emit.call(this,a)}}),i(_,U,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[bc]},process:function(a){var b=this.options,c=a.pointers.length===b.pointers,d=a.distanceb.time;if(this._input=a,!d||!c||a.eventType&(Cb|Db)&&!f)this.reset();else if(a.eventType&Ab)this.reset(),this._timer=e(function(){this.state=kc,this.tryEmit()},b.time,this);else if(a.eventType&Cb)return kc;return mc},reset:function(){clearTimeout(this._timer)},emit:function(a){this.state===kc&&(a&&a.eventType&Cb?this.manager.emit(this.options.event+"up",a):(this._input.timeStamp=nb(),this.manager.emit(this.options.event,this._input)))}}),i(ab,Y,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[dc]},attrTest:function(a){return this._super.attrTest.call(this,a)&&(Math.abs(a.rotation)>this.options.threshold||this.state&hc)}}),i(bb,Y,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Jb|Kb,pointers:1},getTouchAction:function(){return Z.prototype.getTouchAction.call(this)},attrTest:function(a){var b,c=this.options.direction;return c&(Jb|Kb)?b=a.overallVelocity:c&Jb?b=a.overallVelocityX:c&Kb&&(b=a.overallVelocityY),this._super.attrTest.call(this,a)&&c&a.offsetDirection&&a.distance>this.options.threshold&&a.maxPointers==this.options.pointers&&mb(b)>this.options.velocity&&a.eventType&Cb},emit:function(a){var b=W(a.offsetDirection);b&&this.manager.emit(this.options.event+b,a),this.manager.emit(this.options.event,a)}}),i(cb,U,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[cc]},process:function(a){var b=this.options,c=a.pointers.length===b.pointers,d=a.distancei;i++){o=s[i]||{};for(e in o)o.hasOwnProperty(e)&&(t[e]=o[e])}return t},bind:function(t,e){var i=arguments.length>2?Array.prototype.slice.call(arguments,2):null;return function(){return t.apply(e,i||arguments)}},stamp:function(){var t=0,e="_leaflet_id";return function(i){return i[e]=i[e]||++t,i[e]}}(),invokeEach:function(t,e,i){var n,o;if("object"==typeof t){o=Array.prototype.slice.call(arguments,3);for(n in t)e.apply(i,[n,t[n]].concat(o));return!0}return!1},limitExecByInterval:function(t,e,i){var n,o;return function s(){var a=arguments;return n?void(o=!0):(n=!0,setTimeout(function(){n=!1,o&&(s.apply(i,a),o=!1)},e),void t.apply(i,a))}},falseFn:function(){return!1},formatNum:function(t,e){var i=Math.pow(10,e||5);return Math.round(t*i)/i},trim:function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")},splitWords:function(t){return o.Util.trim(t).split(/\s+/)},setOptions:function(t,e){return t.options=o.extend({},t.options,e),t.options},getParamString:function(t,e,i){var n=[];for(var o in t)n.push(encodeURIComponent(i?o.toUpperCase():o)+"="+encodeURIComponent(t[o]));return(e&&-1!==e.indexOf("?")?"&":"?")+n.join("&")},template:function(t,e){return t.replace(/\{ *([\w_]+) *\}/g,function(t,n){var o=e[n];if(o===i)throw new Error("No value provided for variable "+t);return"function"==typeof o&&(o=o(e)),o})},isArray:Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},emptyImageUrl:"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="},function(){function e(e){var i,n,o=["webkit","moz","o","ms"];for(i=0;it;t++)n._initHooks[t].call(this)}},e},o.Class.include=function(t){o.extend(this.prototype,t)},o.Class.mergeOptions=function(t){o.extend(this.prototype.options,t)},o.Class.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),i="function"==typeof t?t:function(){this[t].apply(this,e)};this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i)};var s="_leaflet_events";o.Mixin={},o.Mixin.Events={addEventListener:function(t,e,i){if(o.Util.invokeEach(t,this.addEventListener,this,e,i))return this;var n,a,r,h,l,u,c,d=this[s]=this[s]||{},p=i&&i!==this&&o.stamp(i);for(t=o.Util.splitWords(t),n=0,a=t.length;a>n;n++)r={action:e,context:i||this},h=t[n],p?(l=h+"_idx",u=l+"_len",c=d[l]=d[l]||{},c[p]||(c[p]=[],d[u]=(d[u]||0)+1),c[p].push(r)):(d[h]=d[h]||[],d[h].push(r));return this},hasEventListeners:function(t){var e=this[s];return!!e&&(t in e&&e[t].length>0||t+"_idx"in e&&e[t+"_idx_len"]>0)},removeEventListener:function(t,e,i){if(!this[s])return this;if(!t)return this.clearAllEventListeners();if(o.Util.invokeEach(t,this.removeEventListener,this,e,i))return this;var n,a,r,h,l,u,c,d,p,_=this[s],m=i&&i!==this&&o.stamp(i);for(t=o.Util.splitWords(t),n=0,a=t.length;a>n;n++)if(r=t[n],u=r+"_idx",c=u+"_len",d=_[u],e){if(h=m&&d?d[m]:_[r]){for(l=h.length-1;l>=0;l--)h[l].action!==e||i&&h[l].context!==i||(p=h.splice(l,1),p[0].action=o.Util.falseFn);i&&d&&0===h.length&&(delete d[m],_[c]--)}}else delete _[r],delete _[u],delete _[c];return this},clearAllEventListeners:function(){return delete this[s],this},fireEvent:function(t,e){if(!this.hasEventListeners(t))return this;var i,n,a,r,h,l=o.Util.extend({},e,{type:t,target:this}),u=this[s];if(u[t])for(i=u[t].slice(),n=0,a=i.length;a>n;n++)i[n].action.call(i[n].context,l);r=u[t+"_idx"];for(h in r)if(i=r[h].slice())for(n=0,a=i.length;a>n;n++)i[n].action.call(i[n].context,l);return this},addOneTimeEventListener:function(t,e,i){if(o.Util.invokeEach(t,this.addOneTimeEventListener,this,e,i))return this;var n=o.bind(function(){this.removeEventListener(t,e,i).removeEventListener(t,n,i)},this);return this.addEventListener(t,e,i).addEventListener(t,n,i)}},o.Mixin.Events.on=o.Mixin.Events.addEventListener,o.Mixin.Events.off=o.Mixin.Events.removeEventListener,o.Mixin.Events.once=o.Mixin.Events.addOneTimeEventListener,o.Mixin.Events.fire=o.Mixin.Events.fireEvent,function(){var n="ActiveXObject"in t,s=n&&!e.addEventListener,a=navigator.userAgent.toLowerCase(),r=-1!==a.indexOf("webkit"),h=-1!==a.indexOf("chrome"),l=-1!==a.indexOf("phantom"),u=-1!==a.indexOf("android"),c=-1!==a.search("android [23]"),d=-1!==a.indexOf("gecko"),p=typeof orientation!=i+"",_=!t.PointerEvent&&t.MSPointerEvent,m=t.PointerEvent&&t.navigator.pointerEnabled||_,f="devicePixelRatio"in t&&t.devicePixelRatio>1||"matchMedia"in t&&t.matchMedia("(min-resolution:144dpi)")&&t.matchMedia("(min-resolution:144dpi)").matches,g=e.documentElement,v=n&&"transition"in g.style,y="WebKitCSSMatrix"in t&&"m11"in new t.WebKitCSSMatrix&&!c,P="MozPerspective"in g.style,L="OTransition"in g.style,x=!t.L_DISABLE_3D&&(v||y||P||L)&&!l,w=!t.L_NO_TOUCH&&!l&&(m||"ontouchstart"in t||t.DocumentTouch&&e instanceof t.DocumentTouch);o.Browser={ie:n,ielt9:s,webkit:r,gecko:d&&!r&&!t.opera&&!n,android:u,android23:c,chrome:h,ie3d:v,webkit3d:y,gecko3d:P,opera3d:L,any3d:x,mobile:p,mobileWebkit:p&&r,mobileWebkit3d:p&&y,mobileOpera:p&&t.opera,touch:w,msPointer:_,pointer:m,retina:f}}(),o.Point=function(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e},o.Point.prototype={clone:function(){return new o.Point(this.x,this.y)},add:function(t){return this.clone()._add(o.point(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(o.point(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},distanceTo:function(t){t=o.point(t);var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},equals:function(t){return t=o.point(t),t.x===this.x&&t.y===this.y},contains:function(t){return t=o.point(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+o.Util.formatNum(this.x)+", "+o.Util.formatNum(this.y)+")"}},o.point=function(t,e,n){return t instanceof o.Point?t:o.Util.isArray(t)?new o.Point(t[0],t[1]):t===i||null===t?t:new o.Point(t,e,n)},o.Bounds=function(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;o>n;n++)this.extend(i[n])},o.Bounds.prototype={extend:function(t){return t=o.point(t), this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new o.Point((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new o.Point(this.min.x,this.max.y)},getTopRight:function(){return new o.Point(this.max.x,this.min.y)},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,i;return t="number"==typeof t[0]||t instanceof o.Point?o.point(t):o.bounds(t),t instanceof o.Bounds?(e=t.min,i=t.max):e=i=t,e.x>=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=o.bounds(t);var e=this.min,i=this.max,n=t.min,s=t.max,a=s.x>=e.x&&n.x<=i.x,r=s.y>=e.y&&n.y<=i.y;return a&&r},isValid:function(){return!(!this.min||!this.max)}},o.bounds=function(t,e){return!t||t instanceof o.Bounds?t:new o.Bounds(t,e)},o.Transformation=function(t,e,i,n){this._a=t,this._b=e,this._c=i,this._d=n},o.Transformation.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return e=e||1,new o.Point((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}},o.DomUtil={get:function(t){return"string"==typeof t?e.getElementById(t):t},getStyle:function(t,i){var n=t.style[i];if(!n&&t.currentStyle&&(n=t.currentStyle[i]),(!n||"auto"===n)&&e.defaultView){var o=e.defaultView.getComputedStyle(t,null);n=o?o[i]:null}return"auto"===n?null:n},getViewportOffset:function(t){var i,n=0,s=0,a=t,r=e.body,h=e.documentElement;do{if(n+=a.offsetTop||0,s+=a.offsetLeft||0,n+=parseInt(o.DomUtil.getStyle(a,"borderTopWidth"),10)||0,s+=parseInt(o.DomUtil.getStyle(a,"borderLeftWidth"),10)||0,i=o.DomUtil.getStyle(a,"position"),a.offsetParent===r&&"absolute"===i)break;if("fixed"===i){n+=r.scrollTop||h.scrollTop||0,s+=r.scrollLeft||h.scrollLeft||0;break}if("relative"===i&&!a.offsetLeft){var l=o.DomUtil.getStyle(a,"width"),u=o.DomUtil.getStyle(a,"max-width"),c=a.getBoundingClientRect();("none"!==l||"none"!==u)&&(s+=c.left+a.clientLeft),n+=c.top+(r.scrollTop||h.scrollTop||0);break}a=a.offsetParent}while(a);a=t;do{if(a===r)break;n-=a.scrollTop||0,s-=a.scrollLeft||0,a=a.parentNode}while(a);return new o.Point(s,n)},documentIsLtr:function(){return o.DomUtil._docIsLtrCached||(o.DomUtil._docIsLtrCached=!0,o.DomUtil._docIsLtr="ltr"===o.DomUtil.getStyle(e.body,"direction")),o.DomUtil._docIsLtr},create:function(t,i,n){var o=e.createElement(t);return o.className=i,n&&n.appendChild(o),o},hasClass:function(t,e){if(t.classList!==i)return t.classList.contains(e);var n=o.DomUtil._getClass(t);return n.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(n)},addClass:function(t,e){if(t.classList!==i)for(var n=o.Util.splitWords(e),s=0,a=n.length;a>s;s++)t.classList.add(n[s]);else if(!o.DomUtil.hasClass(t,e)){var r=o.DomUtil._getClass(t);o.DomUtil._setClass(t,(r?r+" ":"")+e)}},removeClass:function(t,e){t.classList!==i?t.classList.remove(e):o.DomUtil._setClass(t,o.Util.trim((" "+o.DomUtil._getClass(t)+" ").replace(" "+e+" "," ")))},_setClass:function(t,e){t.className.baseVal===i?t.className=e:t.className.baseVal=e},_getClass:function(t){return t.className.baseVal===i?t.className:t.className.baseVal},setOpacity:function(t,e){if("opacity"in t.style)t.style.opacity=e;else if("filter"in t.style){var i=!1,n="DXImageTransform.Microsoft.Alpha";try{i=t.filters.item(n)}catch(o){if(1===e)return}e=Math.round(100*e),i?(i.Enabled=100!==e,i.Opacity=e):t.style.filter+=" progid:"+n+"(opacity="+e+")"}},testProp:function(t){for(var i=e.documentElement.style,n=0;ni||i===e?e:t),new o.LatLng(this.lat,i)}},o.latLng=function(t,e){return t instanceof o.LatLng?t:o.Util.isArray(t)?"number"==typeof t[0]||"string"==typeof t[0]?new o.LatLng(t[0],t[1],t[2]):null:t===i||null===t?t:"object"==typeof t&&"lat"in t?new o.LatLng(t.lat,"lng"in t?t.lng:t.lon):e===i?null:new o.LatLng(t,e)},o.LatLngBounds=function(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;o>n;n++)this.extend(i[n])},o.LatLngBounds.prototype={extend:function(t){if(!t)return this;var e=o.latLng(t);return t=null!==e?e:o.latLngBounds(t),t instanceof o.LatLng?this._southWest||this._northEast?(this._southWest.lat=Math.min(t.lat,this._southWest.lat),this._southWest.lng=Math.min(t.lng,this._southWest.lng),this._northEast.lat=Math.max(t.lat,this._northEast.lat),this._northEast.lng=Math.max(t.lng,this._northEast.lng)):(this._southWest=new o.LatLng(t.lat,t.lng),this._northEast=new o.LatLng(t.lat,t.lng)):t instanceof o.LatLngBounds&&(this.extend(t._southWest),this.extend(t._northEast)),this},pad:function(t){var e=this._southWest,i=this._northEast,n=Math.abs(e.lat-i.lat)*t,s=Math.abs(e.lng-i.lng)*t;return new o.LatLngBounds(new o.LatLng(e.lat-n,e.lng-s),new o.LatLng(i.lat+n,i.lng+s))},getCenter:function(){return new o.LatLng((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new o.LatLng(this.getNorth(),this.getWest())},getSouthEast:function(){return new o.LatLng(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t="number"==typeof t[0]||t instanceof o.LatLng?o.latLng(t):o.latLngBounds(t);var e,i,n=this._southWest,s=this._northEast;return t instanceof o.LatLngBounds?(e=t.getSouthWest(),i=t.getNorthEast()):e=i=t,e.lat>=n.lat&&i.lat<=s.lat&&e.lng>=n.lng&&i.lng<=s.lng},intersects:function(t){t=o.latLngBounds(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),s=t.getNorthEast(),a=s.lat>=e.lat&&n.lat<=i.lat,r=s.lng>=e.lng&&n.lng<=i.lng;return a&&r},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t){return t?(t=o.latLngBounds(t),this._southWest.equals(t.getSouthWest())&&this._northEast.equals(t.getNorthEast())):!1},isValid:function(){return!(!this._southWest||!this._northEast)}},o.latLngBounds=function(t,e){return!t||t instanceof o.LatLngBounds?t:new o.LatLngBounds(t,e)},o.Projection={},o.Projection.SphericalMercator={MAX_LATITUDE:85.0511287798,project:function(t){var e=o.LatLng.DEG_TO_RAD,i=this.MAX_LATITUDE,n=Math.max(Math.min(i,t.lat),-i),s=t.lng*e,a=n*e;return a=Math.log(Math.tan(Math.PI/4+a/2)),new o.Point(s,a)},unproject:function(t){var e=o.LatLng.RAD_TO_DEG,i=t.x*e,n=(2*Math.atan(Math.exp(t.y))-Math.PI/2)*e;return new o.LatLng(n,i)}},o.Projection.LonLat={project:function(t){return new o.Point(t.lng,t.lat)},unproject:function(t){return new o.LatLng(t.y,t.x)}},o.CRS={latLngToPoint:function(t,e){var i=this.projection.project(t),n=this.scale(e);return this.transformation._transform(i,n)},pointToLatLng:function(t,e){var i=this.scale(e),n=this.transformation.untransform(t,i);return this.projection.unproject(n)},project:function(t){return this.projection.project(t)},scale:function(t){return 256*Math.pow(2,t)},getSize:function(t){var e=this.scale(t);return o.point(e,e)}},o.CRS.Simple=o.extend({},o.CRS,{projection:o.Projection.LonLat,transformation:new o.Transformation(1,0,-1,0),scale:function(t){return Math.pow(2,t)}}),o.CRS.EPSG3857=o.extend({},o.CRS,{code:"EPSG:3857",projection:o.Projection.SphericalMercator,transformation:new o.Transformation(.5/Math.PI,.5,-.5/Math.PI,.5),project:function(t){var e=this.projection.project(t),i=6378137;return e.multiplyBy(i)}}),o.CRS.EPSG900913=o.extend({},o.CRS.EPSG3857,{code:"EPSG:900913"}),o.CRS.EPSG4326=o.extend({},o.CRS,{code:"EPSG:4326",projection:o.Projection.LonLat,transformation:new o.Transformation(1/360,.5,-1/360,.5)}),o.Map=o.Class.extend({includes:o.Mixin.Events,options:{crs:o.CRS.EPSG3857,fadeAnimation:o.DomUtil.TRANSITION&&!o.Browser.android23,trackResize:!0,markerZoomAnimation:o.DomUtil.TRANSITION&&o.Browser.any3d},initialize:function(t,e){e=o.setOptions(this,e),this._initContainer(t),this._initLayout(),this._onResize=o.bind(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),e.center&&e.zoom!==i&&this.setView(o.latLng(e.center),e.zoom,{reset:!0}),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._tileLayersNum=0,this.callInitHooks(),this._addLayers(e.layers)},setView:function(t,e){return e=e===i?this.getZoom():e,this._resetView(o.latLng(t),this._limitZoom(e)),this},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=this._limitZoom(t),this)},zoomIn:function(t,e){return this.setZoom(this._zoom+(t||1),e)},zoomOut:function(t,e){return this.setZoom(this._zoom-(t||1),e)},setZoomAround:function(t,e,i){var n=this.getZoomScale(e),s=this.getSize().divideBy(2),a=t instanceof o.Point?t:this.latLngToContainerPoint(t),r=a.subtract(s).multiplyBy(1-1/n),h=this.containerPointToLatLng(s.add(r));return this.setView(h,e,{zoom:i})},fitBounds:function(t,e){e=e||{},t=t.getBounds?t.getBounds():o.latLngBounds(t);var i=o.point(e.paddingTopLeft||e.padding||[0,0]),n=o.point(e.paddingBottomRight||e.padding||[0,0]),s=this.getBoundsZoom(t,!1,i.add(n));s=e.maxZoom?Math.min(e.maxZoom,s):s;var a=n.subtract(i).divideBy(2),r=this.project(t.getSouthWest(),s),h=this.project(t.getNorthEast(),s),l=this.unproject(r.add(h).divideBy(2).add(a),s);return this.setView(l,s,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t){return this.fire("movestart"),this._rawPanBy(o.point(t)),this.fire("move"),this.fire("moveend")},setMaxBounds:function(t){return t=o.latLngBounds(t),this.options.maxBounds=t,t?(this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds,this)):this.off("moveend",this._panInsideMaxBounds,this)},panInsideBounds:function(t,e){var i=this.getCenter(),n=this._limitCenter(i,this._zoom,t);return i.equals(n)?this:this.panTo(n,e)},addLayer:function(t){var e=o.stamp(t);return this._layers[e]?this:(this._layers[e]=t,!t.options||isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[e]=t,this._updateZoomLevels()),this.options.zoomAnimation&&o.TileLayer&&t instanceof o.TileLayer&&(this._tileLayersNum++,this._tileLayersToLoad++,t.on("load",this._onTileLayerLoad,this)),this._loaded&&this._layerAdd(t),this)},removeLayer:function(t){var e=o.stamp(t);return this._layers[e]?(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&this.fire("layerremove",{layer:t}),this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels()),this.options.zoomAnimation&&o.TileLayer&&t instanceof o.TileLayer&&(this._tileLayersNum--,this._tileLayersToLoad--,t.off("load",this._onTileLayerLoad,this)),this):this},hasLayer:function(t){return t?o.stamp(t)in this._layers:!1},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},invalidateSize:function(t){if(!this._loaded)return this;t=o.extend({animate:!1,pan:!0},t===!0?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._initialCenter=null;var i=this.getSize(),n=e.divideBy(2).round(),s=i.divideBy(2).round(),a=n.subtract(s);return a.x||a.y?(t.animate&&t.pan?this.panBy(a):(t.pan&&this._rawPanBy(a),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(o.bind(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i})):this},addHandler:function(t,e){if(!e)return this;var i=this[t]=new e(this);return this._handlers.push(i),this.options[t]&&i.enable(),this},remove:function(){this._loaded&&this.fire("unload"),this._initEvents("off");try{delete this._container._leaflet}catch(t){this._container._leaflet=i}return this._clearPanes(),this._clearControlPos&&this._clearControlPos(),this._clearHandlers(),this},getCenter:function(){return this._checkIfLoaded(),this._initialCenter&&!this._moved()?this._initialCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds(),e=this.unproject(t.getBottomLeft()),i=this.unproject(t.getTopRight());return new o.LatLngBounds(e,i)},getMinZoom:function(){return this.options.minZoom===i?this._layersMinZoom===i?0:this._layersMinZoom:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===i?this._layersMaxZoom===i?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=o.latLngBounds(t);var n,s=this.getMinZoom()-(e?1:0),a=this.getMaxZoom(),r=this.getSize(),h=t.getNorthWest(),l=t.getSouthEast(),u=!0;i=o.point(i||[0,0]);do s++,n=this.project(l,s).subtract(this.project(h,s)).add(i),u=e?n.x=s);return u&&e?null:e?s:s-1},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new o.Point(this._container.clientWidth,this._container.clientHeight),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(){var t=this._getTopLeftPoint();return new o.Bounds(t,t.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._initialTopLeftPoint},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t){var e=this.options.crs;return e.scale(t)/e.scale(this._zoom)},getScaleZoom:function(t){return this._zoom+Math.log(t)/Math.LN2},project:function(t,e){return e=e===i?this._zoom:e,this.options.crs.latLngToPoint(o.latLng(t),e)},unproject:function(t,e){return e=e===i?this._zoom:e,this.options.crs.pointToLatLng(o.point(t),e)},layerPointToLatLng:function(t){var e=o.point(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){var e=this.project(o.latLng(t))._round();return e._subtract(this.getPixelOrigin())},containerPointToLayerPoint:function(t){return o.point(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return o.point(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(o.point(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(o.latLng(t)))},mouseEventToContainerPoint:function(t){return o.DomEvent.getMousePosition(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=o.DomUtil.get(t);if(!e)throw new Error("Map container not found.");if(e._leaflet)throw new Error("Map container is already initialized.");e._leaflet=!0},_initLayout:function(){var t=this._container;o.DomUtil.addClass(t,"leaflet-container"+(o.Browser.touch?" leaflet-touch":"")+(o.Browser.retina?" leaflet-retina":"")+(o.Browser.ielt9?" leaflet-oldie":"")+(this.options.fadeAnimation?" leaflet-fade-anim":""));var e=o.DomUtil.getStyle(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._mapPane=t.mapPane=this._createPane("leaflet-map-pane",this._container),this._tilePane=t.tilePane=this._createPane("leaflet-tile-pane",this._mapPane),t.objectsPane=this._createPane("leaflet-objects-pane",this._mapPane),t.shadowPane=this._createPane("leaflet-shadow-pane"),t.overlayPane=this._createPane("leaflet-overlay-pane"),t.markerPane=this._createPane("leaflet-marker-pane"),t.popupPane=this._createPane("leaflet-popup-pane");var e=" leaflet-zoom-hide";this.options.markerZoomAnimation||(o.DomUtil.addClass(t.markerPane,e),o.DomUtil.addClass(t.shadowPane,e),o.DomUtil.addClass(t.popupPane,e))},_createPane:function(t,e){return o.DomUtil.create("div",t,e||this._panes.objectsPane)},_clearPanes:function(){this._container.removeChild(this._mapPane)},_addLayers:function(t){t=t?o.Util.isArray(t)?t:[t]:[];for(var e=0,i=t.length;i>e;e++)this.addLayer(t[e])},_resetView:function(t,e,i,n){var s=this._zoom!==e;n||(this.fire("movestart"),s&&this.fire("zoomstart")),this._zoom=e,this._initialCenter=t,this._initialTopLeftPoint=this._getNewTopLeftPoint(t),i?this._initialTopLeftPoint._add(this._getMapPanePos()):o.DomUtil.setPosition(this._mapPane,new o.Point(0,0)),this._tileLayersToLoad=this._tileLayersNum;var a=!this._loaded;this._loaded=!0,this.fire("viewreset",{hard:!i}),a&&(this.fire("load"),this.eachLayer(this._layerAdd,this)),this.fire("move"),(s||n)&&this.fire("zoomend"),this.fire("moveend",{hard:!i})},_rawPanBy:function(t){o.DomUtil.setPosition(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_updateZoomLevels:function(){var t,e=1/0,n=-(1/0),o=this._getZoomSpan();for(t in this._zoomBoundLayers){var s=this._zoomBoundLayers[t];isNaN(s.options.minZoom)||(e=Math.min(e,s.options.minZoom)),isNaN(s.options.maxZoom)||(n=Math.max(n,s.options.maxZoom))}t===i?this._layersMaxZoom=this._layersMinZoom=i:(this._layersMaxZoom=n,this._layersMinZoom=e),o!==this._getZoomSpan()&&this.fire("zoomlevelschange")},_panInsideMaxBounds:function(){this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(e){if(o.DomEvent){e=e||"on",o.DomEvent[e](this._container,"click",this._onMouseClick,this);var i,n,s=["dblclick","mousedown","mouseup","mouseenter","mouseleave","mousemove","contextmenu"];for(i=0,n=s.length;n>i;i++)o.DomEvent[e](this._container,s[i],this._fireMouseEvent,this);this.options.trackResize&&o.DomEvent[e](t,"resize",this._onResize,this)}},_onResize:function(){o.Util.cancelAnimFrame(this._resizeRequest),this._resizeRequest=o.Util.requestAnimFrame(function(){this.invalidateSize({debounceMoveend:!0})},this,!1,this._container)},_onMouseClick:function(t){!this._loaded||!t._simulated&&(this.dragging&&this.dragging.moved()||this.boxZoom&&this.boxZoom.moved())||o.DomEvent._skipped(t)||(this.fire("preclick"),this._fireMouseEvent(t))},_fireMouseEvent:function(t){if(this._loaded&&!o.DomEvent._skipped(t)){var e=t.type;if(e="mouseenter"===e?"mouseover":"mouseleave"===e?"mouseout":e,this.hasEventListeners(e)){"contextmenu"===e&&o.DomEvent.preventDefault(t);var i=this.mouseEventToContainerPoint(t),n=this.containerPointToLayerPoint(i),s=this.layerPointToLatLng(n);this.fire(e,{latlng:s,layerPoint:n,containerPoint:i,originalEvent:t})}}},_onTileLayerLoad:function(){this._tileLayersToLoad--,this._tileLayersNum&&!this._tileLayersToLoad&&this.fire("tilelayersload")},_clearHandlers:function(){for(var t=0,e=this._handlers.length;e>t;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,this):this.on("load",t,e),this},_layerAdd:function(t){t.onAdd(this),this.fire("layeradd",{layer:t})},_getMapPanePos:function(){return o.DomUtil.getPosition(this._mapPane)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(){return this.getPixelOrigin().subtract(this._getMapPanePos())},_getNewTopLeftPoint:function(t,e){var i=this.getSize()._divideBy(2);return this.project(t,e)._subtract(i)._round()},_latLngToNewLayerPoint:function(t,e,i){var n=this._getNewTopLeftPoint(i,e).add(this._getMapPanePos());return this.project(t,e)._subtract(n)},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,i){if(!i)return t;var n=this.project(t,e),s=this.getSize().divideBy(2),a=new o.Bounds(n.subtract(s),n.add(s)),r=this._getBoundsOffset(a,i,e);return this.unproject(n.add(r),e)},_limitOffset:function(t,e){if(!e)return t;var i=this.getPixelBounds(),n=new o.Bounds(i.min.add(t),i.max.add(t));return t.add(this._getBoundsOffset(n,e))},_getBoundsOffset:function(t,e,i){var n=this.project(e.getNorthWest(),i).subtract(t.min),s=this.project(e.getSouthEast(),i).subtract(t.max),a=this._rebound(n.x,-s.x),r=this._rebound(n.y,-s.y);return new o.Point(a,r)},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom();return Math.max(e,Math.min(i,t))}}),o.map=function(t,e){return new o.Map(t,e)},o.Projection.Mercator={MAX_LATITUDE:85.0840591556,R_MINOR:6356752.314245179,R_MAJOR:6378137,project:function(t){var e=o.LatLng.DEG_TO_RAD,i=this.MAX_LATITUDE,n=Math.max(Math.min(i,t.lat),-i),s=this.R_MAJOR,a=this.R_MINOR,r=t.lng*e*s,h=n*e,l=a/s,u=Math.sqrt(1-l*l),c=u*Math.sin(h);c=Math.pow((1-c)/(1+c),.5*u);var d=Math.tan(.5*(.5*Math.PI-h))/c;return h=-s*Math.log(d),new o.Point(r,h)},unproject:function(t){for(var e,i=o.LatLng.RAD_TO_DEG,n=this.R_MAJOR,s=this.R_MINOR,a=t.x*i/n,r=s/n,h=Math.sqrt(1-r*r),l=Math.exp(-t.y/n),u=Math.PI/2-2*Math.atan(l),c=15,d=1e-7,p=c,_=.1;Math.abs(_)>d&&--p>0;)e=h*Math.sin(u),_=Math.PI/2-2*Math.atan(l*Math.pow((1-e)/(1+e),.5*h))-u,u+=_;return new o.LatLng(u*i,a)}},o.CRS.EPSG3395=o.extend({},o.CRS,{code:"EPSG:3395",projection:o.Projection.Mercator,transformation:function(){var t=o.Projection.Mercator,e=t.R_MAJOR,i=.5/(Math.PI*e);return new o.Transformation(i,.5,-i,.5)}()}),o.TileLayer=o.Class.extend({includes:o.Mixin.Events,options:{minZoom:0,maxZoom:18,tileSize:256,subdomains:"abc",errorTileUrl:"",attribution:"",zoomOffset:0,opacity:1,unloadInvisibleTiles:o.Browser.mobile,updateWhenIdle:o.Browser.mobile},initialize:function(t,e){e=o.setOptions(this,e),e.detectRetina&&o.Browser.retina&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomOffset++,e.minZoom>0&&e.minZoom--,this.options.maxZoom--),e.bounds&&(e.bounds=o.latLngBounds(e.bounds)),this._url=t;var i=this.options.subdomains;"string"==typeof i&&(this.options.subdomains=i.split(""))},onAdd:function(t){this._map=t,this._animated=t._zoomAnimated,this._initContainer(),t.on({viewreset:this._reset,moveend:this._update},this),this._animated&&t.on({zoomanim:this._animateZoom,zoomend:this._endZoomAnim},this),this.options.updateWhenIdle||(this._limitedUpdate=o.Util.limitExecByInterval(this._update,150,this),t.on("move",this._limitedUpdate,this)),this._reset(),this._update()},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){this._container.parentNode.removeChild(this._container),t.off({viewreset:this._reset,moveend:this._update},this),this._animated&&t.off({zoomanim:this._animateZoom,zoomend:this._endZoomAnim},this),this.options.updateWhenIdle||t.off("move",this._limitedUpdate,this),this._container=null,this._map=null},bringToFront:function(){var t=this._map._panes.tilePane;return this._container&&(t.appendChild(this._container),this._setAutoZIndex(t,Math.max)),this},bringToBack:function(){var t=this._map._panes.tilePane;return this._container&&(t.insertBefore(this._container,t.firstChild),this._setAutoZIndex(t,Math.min)),this},getAttribution:function(){return this.options.attribution},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},setUrl:function(t,e){return this._url=t,e||this.redraw(),this},redraw:function(){return this._map&&(this._reset({hard:!0}),this._update()),this},_updateZIndex:function(){this._container&&this.options.zIndex!==i&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t,e){var i,n,o,s=t.children,a=-e(1/0,-(1/0));for(n=0,o=s.length;o>n;n++)s[n]!==this._container&&(i=parseInt(s[n].style.zIndex,10),isNaN(i)||(a=e(a,i)));this.options.zIndex=this._container.style.zIndex=(isFinite(a)?a:0)+e(1,-1)},_updateOpacity:function(){var t,e=this._tiles;if(o.Browser.ielt9)for(t in e)o.DomUtil.setOpacity(e[t],this.options.opacity);else o.DomUtil.setOpacity(this._container,this.options.opacity)},_initContainer:function(){var t=this._map._panes.tilePane;if(!this._container){if(this._container=o.DomUtil.create("div","leaflet-layer"),this._updateZIndex(),this._animated){var e="leaflet-tile-container";this._bgBuffer=o.DomUtil.create("div",e,this._container),this._tileContainer=o.DomUtil.create("div",e,this._container)}else this._tileContainer=this._container;t.appendChild(this._container),this.options.opacity<1&&this._updateOpacity()}},_reset:function(t){for(var e in this._tiles)this.fire("tileunload",{tile:this._tiles[e]});this._tiles={},this._tilesToLoad=0,this.options.reuseTiles&&(this._unusedTiles=[]),this._tileContainer.innerHTML="",this._animated&&t&&t.hard&&this._clearBgBuffer(),this._initContainer()},_getTileSize:function(){var t=this._map,e=t.getZoom()+this.options.zoomOffset,i=this.options.maxNativeZoom,n=this.options.tileSize;return i&&e>i&&(n=Math.round(t.getZoomScale(e)/t.getZoomScale(i)*n)),n},_update:function(){if(this._map){var t=this._map,e=t.getPixelBounds(),i=t.getZoom(),n=this._getTileSize();if(!(i>this.options.maxZoom||in;n++)this._addTile(a[n],l);this._tileContainer.appendChild(l)}},_tileShouldBeLoaded:function(t){if(t.x+":"+t.y in this._tiles)return!1;var e=this.options;if(!e.continuousWorld){var i=this._getWrapTileNum();if(e.noWrap&&(t.x<0||t.x>=i.x)||t.y<0||t.y>=i.y)return!1}if(e.bounds){var n=this._getTileSize(),o=t.multiplyBy(n),s=o.add([n,n]),a=this._map.unproject(o),r=this._map.unproject(s);if(e.continuousWorld||e.noWrap||(a=a.wrap(),r=r.wrap()),!e.bounds.intersects([a,r]))return!1}return!0},_removeOtherTiles:function(t){var e,i,n,o;for(o in this._tiles)e=o.split(":"),i=parseInt(e[0],10),n=parseInt(e[1],10),(it.max.x||nt.max.y)&&this._removeTile(o)},_removeTile:function(t){var e=this._tiles[t];this.fire("tileunload",{tile:e,url:e.src}),this.options.reuseTiles?(o.DomUtil.removeClass(e,"leaflet-tile-loaded"),this._unusedTiles.push(e)):e.parentNode===this._tileContainer&&this._tileContainer.removeChild(e),o.Browser.android||(e.onload=null,e.src=o.Util.emptyImageUrl),delete this._tiles[t]},_addTile:function(t,e){var i=this._getTilePos(t),n=this._getTile();o.DomUtil.setPosition(n,i,o.Browser.chrome),this._tiles[t.x+":"+t.y]=n,this._loadTile(n,t),n.parentNode!==this._tileContainer&&e.appendChild(n)},_getZoomForUrl:function(){var t=this.options,e=this._map.getZoom();return t.zoomReverse&&(e=t.maxZoom-e),e+=t.zoomOffset,t.maxNativeZoom?Math.min(e,t.maxNativeZoom):e},_getTilePos:function(t){var e=this._map.getPixelOrigin(),i=this._getTileSize();return t.multiplyBy(i).subtract(e)},getTileUrl:function(t){return o.Util.template(this._url,o.extend({s:this._getSubdomain(t),z:t.z,x:t.x,y:t.y},this.options))},_getWrapTileNum:function(){var t=this._map.options.crs,e=t.getSize(this._map.getZoom());return e.divideBy(this._getTileSize())._floor()},_adjustTilePoint:function(t){var e=this._getWrapTileNum();this.options.continuousWorld||this.options.noWrap||(t.x=(t.x%e.x+e.x)%e.x),this.options.tms&&(t.y=e.y-t.y-1),t.z=this._getZoomForUrl()},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_getTile:function(){if(this.options.reuseTiles&&this._unusedTiles.length>0){var t=this._unusedTiles.pop();return this._resetTile(t),t}return this._createTile()},_resetTile:function(){},_createTile:function(){var t=o.DomUtil.create("img","leaflet-tile");return t.style.width=t.style.height=this._getTileSize()+"px",t.galleryimg="no",t.onselectstart=t.onmousemove=o.Util.falseFn,o.Browser.ielt9&&this.options.opacity!==i&&o.DomUtil.setOpacity(t,this.options.opacity),o.Browser.mobileWebkit3d&&(t.style.WebkitBackfaceVisibility="hidden"),t},_loadTile:function(t,e){t._layer=this,t.onload=this._tileOnLoad,t.onerror=this._tileOnError,this._adjustTilePoint(e),t.src=this.getTileUrl(e),this.fire("tileloadstart",{tile:t,url:t.src})},_tileLoaded:function(){this._tilesToLoad--,this._animated&&o.DomUtil.addClass(this._tileContainer,"leaflet-zoom-animated"),this._tilesToLoad||(this.fire("load"),this._animated&&(clearTimeout(this._clearBgBufferTimer),this._clearBgBufferTimer=setTimeout(o.bind(this._clearBgBuffer,this),500)))},_tileOnLoad:function(){var t=this._layer;this.src!==o.Util.emptyImageUrl&&(o.DomUtil.addClass(this,"leaflet-tile-loaded"),t.fire("tileload",{tile:this,url:this.src})),t._tileLoaded()},_tileOnError:function(){var t=this._layer;t.fire("tileerror",{tile:this,url:this.src});var e=t.options.errorTileUrl;e&&(this.src=e),t._tileLoaded()}}),o.tileLayer=function(t,e){return new o.TileLayer(t,e)},o.TileLayer.WMS=o.TileLayer.extend({defaultWmsParams:{service:"WMS",request:"GetMap",version:"1.1.1",layers:"",styles:"",format:"image/jpeg",transparent:!1},initialize:function(t,e){this._url=t;var i=o.extend({},this.defaultWmsParams),n=e.tileSize||this.options.tileSize; e.detectRetina&&o.Browser.retina?i.width=i.height=2*n:i.width=i.height=n;for(var s in e)this.options.hasOwnProperty(s)||"crs"===s||(i[s]=e[s]);this.wmsParams=i,o.setOptions(this,e)},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,o.TileLayer.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._map,i=this.options.tileSize,n=t.multiplyBy(i),s=n.add([i,i]),a=this._crs.project(e.unproject(n,t.z)),r=this._crs.project(e.unproject(s,t.z)),h=this._wmsVersion>=1.3&&this._crs===o.CRS.EPSG4326?[r.y,a.x,a.y,r.x].join(","):[a.x,r.y,r.x,a.y].join(","),l=o.Util.template(this._url,{s:this._getSubdomain(t)});return l+o.Util.getParamString(this.wmsParams,l,!0)+"&BBOX="+h},setParams:function(t,e){return o.extend(this.wmsParams,t),e||this.redraw(),this}}),o.tileLayer.wms=function(t,e){return new o.TileLayer.WMS(t,e)},o.TileLayer.Canvas=o.TileLayer.extend({options:{async:!1},initialize:function(t){o.setOptions(this,t)},redraw:function(){this._map&&(this._reset({hard:!0}),this._update());for(var t in this._tiles)this._redrawTile(this._tiles[t]);return this},_redrawTile:function(t){this.drawTile(t,t._tilePoint,this._map._zoom)},_createTile:function(){var t=o.DomUtil.create("canvas","leaflet-tile");return t.width=t.height=this.options.tileSize,t.onselectstart=t.onmousemove=o.Util.falseFn,t},_loadTile:function(t,e){t._layer=this,t._tilePoint=e,this._redrawTile(t),this.options.async||this.tileDrawn(t)},drawTile:function(){},tileDrawn:function(t){this._tileOnLoad.call(t)}}),o.tileLayer.canvas=function(t){return new o.TileLayer.Canvas(t)},o.ImageOverlay=o.Class.extend({includes:o.Mixin.Events,options:{opacity:1},initialize:function(t,e,i){this._url=t,this._bounds=o.latLngBounds(e),o.setOptions(this,i)},onAdd:function(t){this._map=t,this._image||this._initImage(),t._panes.overlayPane.appendChild(this._image),t.on("viewreset",this._reset,this),t.options.zoomAnimation&&o.Browser.any3d&&t.on("zoomanim",this._animateZoom,this),this._reset()},onRemove:function(t){t.getPanes().overlayPane.removeChild(this._image),t.off("viewreset",this._reset,this),t.options.zoomAnimation&&t.off("zoomanim",this._animateZoom,this)},addTo:function(t){return t.addLayer(this),this},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},bringToFront:function(){return this._image&&this._map._panes.overlayPane.appendChild(this._image),this},bringToBack:function(){var t=this._map._panes.overlayPane;return this._image&&t.insertBefore(this._image,t.firstChild),this},setUrl:function(t){this._url=t,this._image.src=this._url},getAttribution:function(){return this.options.attribution},_initImage:function(){this._image=o.DomUtil.create("img","leaflet-image-layer"),this._map.options.zoomAnimation&&o.Browser.any3d?o.DomUtil.addClass(this._image,"leaflet-zoom-animated"):o.DomUtil.addClass(this._image,"leaflet-zoom-hide"),this._updateOpacity(),o.extend(this._image,{galleryimg:"no",onselectstart:o.Util.falseFn,onmousemove:o.Util.falseFn,onload:o.bind(this._onImageLoad,this),src:this._url})},_animateZoom:function(t){var e=this._map,i=this._image,n=e.getZoomScale(t.zoom),s=this._bounds.getNorthWest(),a=this._bounds.getSouthEast(),r=e._latLngToNewLayerPoint(s,t.zoom,t.center),h=e._latLngToNewLayerPoint(a,t.zoom,t.center)._subtract(r),l=r._add(h._multiplyBy(.5*(1-1/n)));i.style[o.DomUtil.TRANSFORM]=o.DomUtil.getTranslateString(l)+" scale("+n+") "},_reset:function(){var t=this._image,e=this._map.latLngToLayerPoint(this._bounds.getNorthWest()),i=this._map.latLngToLayerPoint(this._bounds.getSouthEast())._subtract(e);o.DomUtil.setPosition(t,e),t.style.width=i.x+"px",t.style.height=i.y+"px"},_onImageLoad:function(){this.fire("load")},_updateOpacity:function(){o.DomUtil.setOpacity(this._image,this.options.opacity)}}),o.imageOverlay=function(t,e,i){return new o.ImageOverlay(t,e,i)},o.Icon=o.Class.extend({options:{className:""},initialize:function(t){o.setOptions(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var i=this._getIconUrl(t);if(!i){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var n;return n=e&&"IMG"===e.tagName?this._createImg(i,e):this._createImg(i),this._setIconStyles(n,t),n},_setIconStyles:function(t,e){var i,n=this.options,s=o.point(n[e+"Size"]);i="shadow"===e?o.point(n.shadowAnchor||n.iconAnchor):o.point(n.iconAnchor),!i&&s&&(i=s.divideBy(2,!0)),t.className="leaflet-marker-"+e+" "+n.className,i&&(t.style.marginLeft=-i.x+"px",t.style.marginTop=-i.y+"px"),s&&(t.style.width=s.x+"px",t.style.height=s.y+"px")},_createImg:function(t,i){return i=i||e.createElement("img"),i.src=t,i},_getIconUrl:function(t){return o.Browser.retina&&this.options[t+"RetinaUrl"]?this.options[t+"RetinaUrl"]:this.options[t+"Url"]}}),o.icon=function(t){return new o.Icon(t)},o.Icon.Default=o.Icon.extend({options:{iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],shadowSize:[41,41]},_getIconUrl:function(t){var e=t+"Url";if(this.options[e])return this.options[e];o.Browser.retina&&"icon"===t&&(t+="-2x");var i=o.Icon.Default.imagePath;if(!i)throw new Error("Couldn't autodetect L.Icon.Default.imagePath, set it manually.");return i+"/marker-"+t+".png"}}),o.Icon.Default.imagePath=function(){var t,i,n,o,s,a=e.getElementsByTagName("script"),r=/[\/^]leaflet[\-\._]?([\w\-\._]*)\.js\??/;for(t=0,i=a.length;i>t;t++)if(n=a[t].src,o=n.match(r))return s=n.split(r)[0],(s?s+"/":"")+"images"}(),o.Marker=o.Class.extend({includes:o.Mixin.Events,options:{icon:new o.Icon.Default,title:"",alt:"",clickable:!0,draggable:!1,keyboard:!0,zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250},initialize:function(t,e){o.setOptions(this,e),this._latlng=o.latLng(t)},onAdd:function(t){this._map=t,t.on("viewreset",this.update,this),this._initIcon(),this.update(),this.fire("add"),t.options.zoomAnimation&&t.options.markerZoomAnimation&&t.on("zoomanim",this._animateZoom,this)},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){this.dragging&&this.dragging.disable(),this._removeIcon(),this._removeShadow(),this.fire("remove"),t.off({viewreset:this.update,zoomanim:this._animateZoom},this),this._map=null},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=o.latLng(t),this.update(),this.fire("move",{latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update(),this},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup),this},update:function(){return this._icon&&this._setPos(this._map.latLngToLayerPoint(this._latlng).round()),this},_initIcon:function(){var t=this.options,e=this._map,i=e.options.zoomAnimation&&e.options.markerZoomAnimation,n=i?"leaflet-zoom-animated":"leaflet-zoom-hide",s=t.icon.createIcon(this._icon),a=!1;s!==this._icon&&(this._icon&&this._removeIcon(),a=!0,t.title&&(s.title=t.title),t.alt&&(s.alt=t.alt)),o.DomUtil.addClass(s,n),t.keyboard&&(s.tabIndex="0"),this._icon=s,this._initInteraction(),t.riseOnHover&&o.DomEvent.on(s,"mouseover",this._bringToFront,this).on(s,"mouseout",this._resetZIndex,this);var r=t.icon.createShadow(this._shadow),h=!1;r!==this._shadow&&(this._removeShadow(),h=!0),r&&o.DomUtil.addClass(r,n),this._shadow=r,t.opacity<1&&this._updateOpacity();var l=this._map._panes;a&&l.markerPane.appendChild(this._icon),r&&h&&l.shadowPane.appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&o.DomEvent.off(this._icon,"mouseover",this._bringToFront).off(this._icon,"mouseout",this._resetZIndex),this._map._panes.markerPane.removeChild(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&this._map._panes.shadowPane.removeChild(this._shadow),this._shadow=null},_setPos:function(t){o.DomUtil.setPosition(this._icon,t),this._shadow&&o.DomUtil.setPosition(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon.style.zIndex=this._zIndex+t},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.clickable){var t=this._icon,e=["dblclick","mousedown","mouseover","mouseout","contextmenu"];o.DomUtil.addClass(t,"leaflet-clickable"),o.DomEvent.on(t,"click",this._onMouseClick,this),o.DomEvent.on(t,"keypress",this._onKeyPress,this);for(var i=0;is?(e.height=s+"px",o.DomUtil.addClass(t,a)):o.DomUtil.removeClass(t,a),this._containerWidth=this._container.offsetWidth},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=this._animated,i=o.point(this.options.offset);e&&o.DomUtil.setPosition(this._container,t),this._containerBottom=-i.y-(e?0:t.y),this._containerLeft=-Math.round(this._containerWidth/2)+i.x+(e?0:t.x),this._container.style.bottom=this._containerBottom+"px",this._container.style.left=this._containerLeft+"px"}},_zoomAnimation:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);o.DomUtil.setPosition(this._container,e)},_adjustPan:function(){if(this.options.autoPan){var t=this._map,e=this._container.offsetHeight,i=this._containerWidth,n=new o.Point(this._containerLeft,-e-this._containerBottom);this._animated&&n._add(o.DomUtil.getPosition(this._container));var s=t.layerPointToContainerPoint(n),a=o.point(this.options.autoPanPadding),r=o.point(this.options.autoPanPaddingTopLeft||a),h=o.point(this.options.autoPanPaddingBottomRight||a),l=t.getSize(),u=0,c=0;s.x+i+h.x>l.x&&(u=s.x+i-l.x+h.x),s.x-u-r.x<0&&(u=s.x-r.x),s.y+e+h.y>l.y&&(c=s.y+e-l.y+h.y),s.y-c-r.y<0&&(c=s.y-r.y),(u||c)&&t.fire("autopanstart").panBy([u,c])}},_onCloseButtonClick:function(t){this._close(),o.DomEvent.stop(t)}}),o.popup=function(t,e){return new o.Popup(t,e)},o.Map.include({openPopup:function(t,e,i){if(this.closePopup(),!(t instanceof o.Popup)){var n=t;t=new o.Popup(i).setLatLng(e).setContent(n)}return t._isOpen=!0,this._popup=t,this.addLayer(t)},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&(this.removeLayer(t),t._isOpen=!1),this}}),o.Marker.include({openPopup:function(){return this._popup&&this._map&&!this._map.hasLayer(this._popup)&&(this._popup.setLatLng(this._latlng),this._map.openPopup(this._popup)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(){return this._popup&&(this._popup._isOpen?this.closePopup():this.openPopup()),this},bindPopup:function(t,e){var i=o.point(this.options.icon.options.popupAnchor||[0,0]);return i=i.add(o.Popup.prototype.options.offset),e&&e.offset&&(i=i.add(e.offset)),e=o.extend({offset:i},e),this._popupHandlersAdded||(this.on("click",this.togglePopup,this).on("remove",this.closePopup,this).on("move",this._movePopup,this),this._popupHandlersAdded=!0),t instanceof o.Popup?(o.setOptions(t,e),this._popup=t,t._source=this):this._popup=new o.Popup(e,this).setContent(t),this},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},unbindPopup:function(){return this._popup&&(this._popup=null,this.off("click",this.togglePopup,this).off("remove",this.closePopup,this).off("move",this._movePopup,this),this._popupHandlersAdded=!1),this},getPopup:function(){return this._popup},_movePopup:function(t){this._popup.setLatLng(t.latlng)}}),o.LayerGroup=o.Class.extend({initialize:function(t){this._layers={};var e,i;if(t)for(e=0,i=t.length;i>e;e++)this.addLayer(t[e])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return t?t in this._layers||this.getLayerId(t)in this._layers:!1},clearLayers:function(){return this.eachLayer(this.removeLayer,this),this},invoke:function(t){var e,i,n=Array.prototype.slice.call(arguments,1);for(e in this._layers)i=this._layers[e],i[t]&&i[t].apply(i,n);return this},onAdd:function(t){this._map=t,this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t),this._map=null},addTo:function(t){return t.addLayer(this),this},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];for(var e in this._layers)t.push(this._layers[e]);return t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return o.stamp(t)}}),o.layerGroup=function(t){return new o.LayerGroup(t)},o.FeatureGroup=o.LayerGroup.extend({includes:o.Mixin.Events,statics:{EVENTS:"click dblclick mouseover mouseout mousemove contextmenu popupopen popupclose"},addLayer:function(t){return this.hasLayer(t)?this:("on"in t&&t.on(o.FeatureGroup.EVENTS,this._propagateEvent,this),o.LayerGroup.prototype.addLayer.call(this,t),this._popupContent&&t.bindPopup&&t.bindPopup(this._popupContent,this._popupOptions),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),"off"in t&&t.off(o.FeatureGroup.EVENTS,this._propagateEvent,this),o.LayerGroup.prototype.removeLayer.call(this,t),this._popupContent&&this.invoke("unbindPopup"),this.fire("layerremove",{layer:t})):this},bindPopup:function(t,e){return this._popupContent=t,this._popupOptions=e,this.invoke("bindPopup",t,e)},openPopup:function(t){for(var e in this._layers){this._layers[e].openPopup(t);break}return this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new o.LatLngBounds;return this.eachLayer(function(e){t.extend(e instanceof o.Marker?e.getLatLng():e.getBounds())}),t},_propagateEvent:function(t){t=o.extend({layer:t.target,target:this},t),this.fire(t.type,t)}}),o.featureGroup=function(t){return new o.FeatureGroup(t)},o.Path=o.Class.extend({includes:[o.Mixin.Events],statics:{CLIP_PADDING:function(){var e=o.Browser.mobile?1280:2e3,i=(e/Math.max(t.outerWidth,t.outerHeight)-1)/2;return Math.max(0,Math.min(.5,i))}()},options:{stroke:!0,color:"#0033ff",dashArray:null,lineCap:null,lineJoin:null,weight:5,opacity:.5,fill:!1,fillColor:null,fillOpacity:.2,clickable:!0},initialize:function(t){o.setOptions(this,t)},onAdd:function(t){this._map=t,this._container||(this._initElements(),this._initEvents()),this.projectLatlngs(),this._updatePath(),this._container&&this._map._pathRoot.appendChild(this._container),this.fire("add"),t.on({viewreset:this.projectLatlngs,moveend:this._updatePath},this)},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){t._pathRoot.removeChild(this._container),this.fire("remove"),this._map=null,o.Browser.vml&&(this._container=null,this._stroke=null,this._fill=null),t.off({viewreset:this.projectLatlngs,moveend:this._updatePath},this)},projectLatlngs:function(){},setStyle:function(t){return o.setOptions(this,t),this._container&&this._updateStyle(),this},redraw:function(){return this._map&&(this.projectLatlngs(),this._updatePath()),this}}),o.Map.include({_updatePathViewport:function(){var t=o.Path.CLIP_PADDING,e=this.getSize(),i=o.DomUtil.getPosition(this._mapPane),n=i.multiplyBy(-1)._subtract(e.multiplyBy(t)._round()),s=n.add(e.multiplyBy(1+2*t)._round());this._pathViewport=new o.Bounds(n,s)}}),o.Path.SVG_NS="http://www.w3.org/2000/svg",o.Browser.svg=!(!e.createElementNS||!e.createElementNS(o.Path.SVG_NS,"svg").createSVGRect),o.Path=o.Path.extend({statics:{SVG:o.Browser.svg},bringToFront:function(){var t=this._map._pathRoot,e=this._container;return e&&t.lastChild!==e&&t.appendChild(e),this},bringToBack:function(){var t=this._map._pathRoot,e=this._container,i=t.firstChild;return e&&i!==e&&t.insertBefore(e,i),this},getPathString:function(){},_createElement:function(t){return e.createElementNS(o.Path.SVG_NS,t)},_initElements:function(){this._map._initPathRoot(),this._initPath(),this._initStyle()},_initPath:function(){this._container=this._createElement("g"),this._path=this._createElement("path"),this.options.className&&o.DomUtil.addClass(this._path,this.options.className),this._container.appendChild(this._path)},_initStyle:function(){this.options.stroke&&(this._path.setAttribute("stroke-linejoin","round"),this._path.setAttribute("stroke-linecap","round")),this.options.fill&&this._path.setAttribute("fill-rule","evenodd"),this.options.pointerEvents&&this._path.setAttribute("pointer-events",this.options.pointerEvents),this.options.clickable||this.options.pointerEvents||this._path.setAttribute("pointer-events","none"),this._updateStyle()},_updateStyle:function(){this.options.stroke?(this._path.setAttribute("stroke",this.options.color),this._path.setAttribute("stroke-opacity",this.options.opacity),this._path.setAttribute("stroke-width",this.options.weight),this.options.dashArray?this._path.setAttribute("stroke-dasharray",this.options.dashArray):this._path.removeAttribute("stroke-dasharray"),this.options.lineCap&&this._path.setAttribute("stroke-linecap",this.options.lineCap),this.options.lineJoin&&this._path.setAttribute("stroke-linejoin",this.options.lineJoin)):this._path.setAttribute("stroke","none"),this.options.fill?(this._path.setAttribute("fill",this.options.fillColor||this.options.color),this._path.setAttribute("fill-opacity",this.options.fillOpacity)):this._path.setAttribute("fill","none")},_updatePath:function(){var t=this.getPathString();t||(t="M0 0"),this._path.setAttribute("d",t)},_initEvents:function(){if(this.options.clickable){(o.Browser.svg||!o.Browser.vml)&&o.DomUtil.addClass(this._path,"leaflet-clickable"),o.DomEvent.on(this._container,"click",this._onMouseClick,this);for(var t=["dblclick","mousedown","mouseover","mouseout","mousemove","contextmenu"],e=0;e';var i=t.firstChild;return i.style.behavior="url(#default#VML)",i&&"object"==typeof i.adj}catch(n){return!1}}(),o.Path=o.Browser.svg||!o.Browser.vml?o.Path:o.Path.extend({statics:{VML:!0,CLIP_PADDING:.02},_createElement:function(){try{return e.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return e.createElement("')}}catch(t){return function(t){return e.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),_initPath:function(){var t=this._container=this._createElement("shape");o.DomUtil.addClass(t,"leaflet-vml-shape"+(this.options.className?" "+this.options.className:"")),this.options.clickable&&o.DomUtil.addClass(t,"leaflet-clickable"),t.coordsize="1 1",this._path=this._createElement("path"),t.appendChild(this._path),this._map._pathRoot.appendChild(t)},_initStyle:function(){this._updateStyle()},_updateStyle:function(){var t=this._stroke,e=this._fill,i=this.options,n=this._container;n.stroked=i.stroke,n.filled=i.fill,i.stroke?(t||(t=this._stroke=this._createElement("stroke"),t.endcap="round",n.appendChild(t)),t.weight=i.weight+"px",t.color=i.color,t.opacity=i.opacity,i.dashArray?t.dashStyle=o.Util.isArray(i.dashArray)?i.dashArray.join(" "):i.dashArray.replace(/( *, *)/g," "):t.dashStyle="",i.lineCap&&(t.endcap=i.lineCap.replace("butt","flat")),i.lineJoin&&(t.joinstyle=i.lineJoin)):t&&(n.removeChild(t),this._stroke=null),i.fill?(e||(e=this._fill=this._createElement("fill"),n.appendChild(e)),e.color=i.fillColor||i.color,e.opacity=i.fillOpacity):e&&(n.removeChild(e),this._fill=null)},_updatePath:function(){var t=this._container.style;t.display="none",this._path.v=this.getPathString()+" ",t.display=""}}),o.Map.include(o.Browser.svg||!o.Browser.vml?{}:{_initPathRoot:function(){if(!this._pathRoot){var t=this._pathRoot=e.createElement("div");t.className="leaflet-vml-container",this._panes.overlayPane.appendChild(t),this.on("moveend",this._updatePathViewport),this._updatePathViewport()}}}),o.Browser.canvas=function(){return!!e.createElement("canvas").getContext}(),o.Path=o.Path.SVG&&!t.L_PREFER_CANVAS||!o.Browser.canvas?o.Path:o.Path.extend({statics:{CANVAS:!0,SVG:!1},redraw:function(){return this._map&&(this.projectLatlngs(),this._requestUpdate()),this},setStyle:function(t){return o.setOptions(this,t),this._map&&(this._updateStyle(),this._requestUpdate()),this},onRemove:function(t){t.off("viewreset",this.projectLatlngs,this).off("moveend",this._updatePath,this),this.options.clickable&&(this._map.off("click",this._onClick,this),this._map.off("mousemove",this._onMouseMove,this)),this._requestUpdate(),this.fire("remove"),this._map=null},_requestUpdate:function(){this._map&&!o.Path._updateRequest&&(o.Path._updateRequest=o.Util.requestAnimFrame(this._fireMapMoveEnd,this._map))},_fireMapMoveEnd:function(){o.Path._updateRequest=null,this.fire("moveend")},_initElements:function(){this._map._initPathRoot(),this._ctx=this._map._canvasCtx},_updateStyle:function(){var t=this.options;t.stroke&&(this._ctx.lineWidth=t.weight,this._ctx.strokeStyle=t.color),t.fill&&(this._ctx.fillStyle=t.fillColor||t.color),t.lineCap&&(this._ctx.lineCap=t.lineCap),t.lineJoin&&(this._ctx.lineJoin=t.lineJoin)},_drawPath:function(){var t,e,i,n,s,a;for(this._ctx.beginPath(),t=0,i=this._parts.length;i>t;t++){for(e=0,n=this._parts[t].length;n>e;e++)s=this._parts[t][e],a=(0===e?"move":"line")+"To",this._ctx[a](s.x,s.y);this instanceof o.Polygon&&this._ctx.closePath()}},_checkIfEmpty:function(){return!this._parts.length},_updatePath:function(){if(!this._checkIfEmpty()){var t=this._ctx,e=this.options;this._drawPath(),t.save(),this._updateStyle(),e.fill&&(t.globalAlpha=e.fillOpacity,t.fill(e.fillRule||"evenodd")),e.stroke&&(t.globalAlpha=e.opacity,t.stroke()),t.restore()}},_initEvents:function(){this.options.clickable&&(this._map.on("mousemove",this._onMouseMove,this),this._map.on("click dblclick contextmenu",this._fireMouseEvent,this))},_fireMouseEvent:function(t){this._containsPoint(t.layerPoint)&&this.fire(t.type,t)},_onMouseMove:function(t){this._map&&!this._map._animatingZoom&&(this._containsPoint(t.layerPoint)?(this._ctx.canvas.style.cursor="pointer",this._mouseInside=!0,this.fire("mouseover",t)):this._mouseInside&&(this._ctx.canvas.style.cursor="",this._mouseInside=!1,this.fire("mouseout",t)))}}),o.Map.include(o.Path.SVG&&!t.L_PREFER_CANVAS||!o.Browser.canvas?{}:{_initPathRoot:function(){var t,i=this._pathRoot;i||(i=this._pathRoot=e.createElement("canvas"),i.style.position="absolute",t=this._canvasCtx=i.getContext("2d"),t.lineCap="round",t.lineJoin="round",this._panes.overlayPane.appendChild(i),this.options.zoomAnimation&&(this._pathRoot.className="leaflet-zoom-animated",this.on("zoomanim",this._animatePathZoom),this.on("zoomend",this._endPathZoom)),this.on("moveend",this._updateCanvasViewport),this._updateCanvasViewport())},_updateCanvasViewport:function(){if(!this._pathZooming){this._updatePathViewport();var t=this._pathViewport,e=t.min,i=t.max.subtract(e),n=this._pathRoot;o.DomUtil.setPosition(n,e),n.width=i.x,n.height=i.y,n.getContext("2d").translate(-e.x,-e.y)}}}),o.LineUtil={simplify:function(t,e){if(!e||!t.length)return t.slice();var i=e*e;return t=this._reducePoints(t,i),t=this._simplifyDP(t,i)},pointToSegmentDistance:function(t,e,i){return Math.sqrt(this._sqClosestPointOnSegment(t,e,i,!0))},closestPointOnSegment:function(t,e,i){return this._sqClosestPointOnSegment(t,e,i)},_simplifyDP:function(t,e){var n=t.length,o=typeof Uint8Array!=i+""?Uint8Array:Array,s=new o(n);s[0]=s[n-1]=1,this._simplifyDPStep(t,s,e,0,n-1);var a,r=[];for(a=0;n>a;a++)s[a]&&r.push(t[a]);return r},_simplifyDPStep:function(t,e,i,n,o){var s,a,r,h=0;for(a=n+1;o-1>=a;a++)r=this._sqClosestPointOnSegment(t[a],t[n],t[o],!0),r>h&&(s=a,h=r);h>i&&(e[s]=1,this._simplifyDPStep(t,e,i,n,s),this._simplifyDPStep(t,e,i,s,o))},_reducePoints:function(t,e){for(var i=[t[0]],n=1,o=0,s=t.length;s>n;n++)this._sqDist(t[n],t[o])>e&&(i.push(t[n]),o=n);return s-1>o&&i.push(t[s-1]),i},clipSegment:function(t,e,i,n){var o,s,a,r=n?this._lastCode:this._getBitCode(t,i),h=this._getBitCode(e,i);for(this._lastCode=h;;){if(!(r|h))return[t,e];if(r&h)return!1;o=r||h,s=this._getEdgeIntersection(t,e,o,i),a=this._getBitCode(s,i),o===r?(t=s,r=a):(e=s,h=a)}},_getEdgeIntersection:function(t,e,i,n){var s=e.x-t.x,a=e.y-t.y,r=n.min,h=n.max;return 8&i?new o.Point(t.x+s*(h.y-t.y)/a,h.y):4&i?new o.Point(t.x+s*(r.y-t.y)/a,r.y):2&i?new o.Point(h.x,t.y+a*(h.x-t.x)/s):1&i?new o.Point(r.x,t.y+a*(r.x-t.x)/s):void 0; },_getBitCode:function(t,e){var i=0;return t.xe.max.x&&(i|=2),t.ye.max.y&&(i|=8),i},_sqDist:function(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n},_sqClosestPointOnSegment:function(t,e,i,n){var s,a=e.x,r=e.y,h=i.x-a,l=i.y-r,u=h*h+l*l;return u>0&&(s=((t.x-a)*h+(t.y-r)*l)/u,s>1?(a=i.x,r=i.y):s>0&&(a+=h*s,r+=l*s)),h=t.x-a,l=t.y-r,n?h*h+l*l:new o.Point(a,r)}},o.Polyline=o.Path.extend({initialize:function(t,e){o.Path.prototype.initialize.call(this,e),this._latlngs=this._convertLatLngs(t)},options:{smoothFactor:1,noClip:!1},projectLatlngs:function(){this._originalPoints=[];for(var t=0,e=this._latlngs.length;e>t;t++)this._originalPoints[t]=this._map.latLngToLayerPoint(this._latlngs[t])},getPathString:function(){for(var t=0,e=this._parts.length,i="";e>t;t++)i+=this._getPathPartStr(this._parts[t]);return i},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._latlngs=this._convertLatLngs(t),this.redraw()},addLatLng:function(t){return this._latlngs.push(o.latLng(t)),this.redraw()},spliceLatLngs:function(){var t=[].splice.apply(this._latlngs,arguments);return this._convertLatLngs(this._latlngs,!0),this.redraw(),t},closestLayerPoint:function(t){for(var e,i,n=1/0,s=this._parts,a=null,r=0,h=s.length;h>r;r++)for(var l=s[r],u=1,c=l.length;c>u;u++){e=l[u-1],i=l[u];var d=o.LineUtil._sqClosestPointOnSegment(t,e,i,!0);n>d&&(n=d,a=o.LineUtil._sqClosestPointOnSegment(t,e,i))}return a&&(a.distance=Math.sqrt(n)),a},getBounds:function(){return new o.LatLngBounds(this.getLatLngs())},_convertLatLngs:function(t,e){var i,n,s=e?t:[];for(i=0,n=t.length;n>i;i++){if(o.Util.isArray(t[i])&&"number"!=typeof t[i][0])return;s[i]=o.latLng(t[i])}return s},_initEvents:function(){o.Path.prototype._initEvents.call(this)},_getPathPartStr:function(t){for(var e,i=o.Path.VML,n=0,s=t.length,a="";s>n;n++)e=t[n],i&&e._round(),a+=(n?"L":"M")+e.x+" "+e.y;return a},_clipPoints:function(){var t,e,i,n=this._originalPoints,s=n.length;if(this.options.noClip)return void(this._parts=[n]);this._parts=[];var a=this._parts,r=this._map._pathViewport,h=o.LineUtil;for(t=0,e=0;s-1>t;t++)i=h.clipSegment(n[t],n[t+1],r,t),i&&(a[e]=a[e]||[],a[e].push(i[0]),(i[1]!==n[t+1]||t===s-2)&&(a[e].push(i[1]),e++))},_simplifyPoints:function(){for(var t=this._parts,e=o.LineUtil,i=0,n=t.length;n>i;i++)t[i]=e.simplify(t[i],this.options.smoothFactor)},_updatePath:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),o.Path.prototype._updatePath.call(this))}}),o.polyline=function(t,e){return new o.Polyline(t,e)},o.PolyUtil={},o.PolyUtil.clipPolygon=function(t,e){var i,n,s,a,r,h,l,u,c,d=[1,4,2,8],p=o.LineUtil;for(n=0,l=t.length;l>n;n++)t[n]._code=p._getBitCode(t[n],e);for(a=0;4>a;a++){for(u=d[a],i=[],n=0,l=t.length,s=l-1;l>n;s=n++)r=t[n],h=t[s],r._code&u?h._code&u||(c=p._getEdgeIntersection(h,r,u,e),c._code=p._getBitCode(c,e),i.push(c)):(h._code&u&&(c=p._getEdgeIntersection(h,r,u,e),c._code=p._getBitCode(c,e),i.push(c)),i.push(r));t=i}return t},o.Polygon=o.Polyline.extend({options:{fill:!0},initialize:function(t,e){o.Polyline.prototype.initialize.call(this,t,e),this._initWithHoles(t)},_initWithHoles:function(t){var e,i,n;if(t&&o.Util.isArray(t[0])&&"number"!=typeof t[0][0])for(this._latlngs=this._convertLatLngs(t[0]),this._holes=t.slice(1),e=0,i=this._holes.length;i>e;e++)n=this._holes[e]=this._convertLatLngs(this._holes[e]),n[0].equals(n[n.length-1])&&n.pop();t=this._latlngs,t.length>=2&&t[0].equals(t[t.length-1])&&t.pop()},projectLatlngs:function(){if(o.Polyline.prototype.projectLatlngs.call(this),this._holePoints=[],this._holes){var t,e,i,n;for(t=0,i=this._holes.length;i>t;t++)for(this._holePoints[t]=[],e=0,n=this._holes[t].length;n>e;e++)this._holePoints[t][e]=this._map.latLngToLayerPoint(this._holes[t][e])}},setLatLngs:function(t){return t&&o.Util.isArray(t[0])&&"number"!=typeof t[0][0]?(this._initWithHoles(t),this.redraw()):o.Polyline.prototype.setLatLngs.call(this,t)},_clipPoints:function(){var t=this._originalPoints,e=[];if(this._parts=[t].concat(this._holePoints),!this.options.noClip){for(var i=0,n=this._parts.length;n>i;i++){var s=o.PolyUtil.clipPolygon(this._parts[i],this._map._pathViewport);s.length&&e.push(s)}this._parts=e}},_getPathPartStr:function(t){var e=o.Polyline.prototype._getPathPartStr.call(this,t);return e+(o.Browser.svg?"z":"x")}}),o.polygon=function(t,e){return new o.Polygon(t,e)},function(){function t(t){return o.FeatureGroup.extend({initialize:function(t,e){this._layers={},this._options=e,this.setLatLngs(t)},setLatLngs:function(e){var i=0,n=e.length;for(this.eachLayer(function(t){n>i?t.setLatLngs(e[i++]):this.removeLayer(t)},this);n>i;)this.addLayer(new t(e[i++],this._options));return this},getLatLngs:function(){var t=[];return this.eachLayer(function(e){t.push(e.getLatLngs())}),t}})}o.MultiPolyline=t(o.Polyline),o.MultiPolygon=t(o.Polygon),o.multiPolyline=function(t,e){return new o.MultiPolyline(t,e)},o.multiPolygon=function(t,e){return new o.MultiPolygon(t,e)}}(),o.Rectangle=o.Polygon.extend({initialize:function(t,e){o.Polygon.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return t=o.latLngBounds(t),[t.getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}}),o.rectangle=function(t,e){return new o.Rectangle(t,e)},o.Circle=o.Path.extend({initialize:function(t,e,i){o.Path.prototype.initialize.call(this,i),this._latlng=o.latLng(t),this._mRadius=e},options:{fill:!0},setLatLng:function(t){return this._latlng=o.latLng(t),this.redraw()},setRadius:function(t){return this._mRadius=t,this.redraw()},projectLatlngs:function(){var t=this._getLngRadius(),e=this._latlng,i=this._map.latLngToLayerPoint([e.lat,e.lng-t]);this._point=this._map.latLngToLayerPoint(e),this._radius=Math.max(this._point.x-i.x,1)},getBounds:function(){var t=this._getLngRadius(),e=this._mRadius/40075017*360,i=this._latlng;return new o.LatLngBounds([i.lat-e,i.lng-t],[i.lat+e,i.lng+t])},getLatLng:function(){return this._latlng},getPathString:function(){var t=this._point,e=this._radius;return this._checkIfEmpty()?"":o.Browser.svg?"M"+t.x+","+(t.y-e)+"A"+e+","+e+",0,1,1,"+(t.x-.1)+","+(t.y-e)+" z":(t._round(),e=Math.round(e),"AL "+t.x+","+t.y+" "+e+","+e+" 0,23592600")},getRadius:function(){return this._mRadius},_getLatRadius:function(){return this._mRadius/40075017*360},_getLngRadius:function(){return this._getLatRadius()/Math.cos(o.LatLng.DEG_TO_RAD*this._latlng.lat)},_checkIfEmpty:function(){if(!this._map)return!1;var t=this._map._pathViewport,e=this._radius,i=this._point;return i.x-e>t.max.x||i.y-e>t.max.y||i.x+ei;i++)for(l=this._parts[i],n=0,r=l.length,s=r-1;r>n;s=n++)if((e||0!==n)&&(h=o.LineUtil.pointToSegmentDistance(t,l[s],l[n]),u>=h))return!0;return!1}}:{}),o.Polygon.include(o.Path.CANVAS?{_containsPoint:function(t){var e,i,n,s,a,r,h,l,u=!1;if(o.Polyline.prototype._containsPoint.call(this,t,!0))return!0;for(s=0,h=this._parts.length;h>s;s++)for(e=this._parts[s],a=0,l=e.length,r=l-1;l>a;r=a++)i=e[a],n=e[r],i.y>t.y!=n.y>t.y&&t.x<(n.x-i.x)*(t.y-i.y)/(n.y-i.y)+i.x&&(u=!u);return u}}:{}),o.Circle.include(o.Path.CANVAS?{_drawPath:function(){var t=this._point;this._ctx.beginPath(),this._ctx.arc(t.x,t.y,this._radius,0,2*Math.PI,!1)},_containsPoint:function(t){var e=this._point,i=this.options.stroke?this.options.weight/2:0;return t.distanceTo(e)<=this._radius+i}}:{}),o.CircleMarker.include(o.Path.CANVAS?{_updateStyle:function(){o.Path.prototype._updateStyle.call(this)}}:{}),o.GeoJSON=o.FeatureGroup.extend({initialize:function(t,e){o.setOptions(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,i,n,s=o.Util.isArray(t)?t:t.features;if(s){for(e=0,i=s.length;i>e;e++)n=s[e],(n.geometries||n.geometry||n.features||n.coordinates)&&this.addData(s[e]);return this}var a=this.options;if(!a.filter||a.filter(t)){var r=o.GeoJSON.geometryToLayer(t,a.pointToLayer,a.coordsToLatLng,a);return r.feature=o.GeoJSON.asFeature(t),r.defaultOptions=r.options,this.resetStyle(r),a.onEachFeature&&a.onEachFeature(t,r),this.addLayer(r)}},resetStyle:function(t){var e=this.options.style;e&&(o.Util.extend(t.options,t.defaultOptions),this._setLayerStyle(t,e))},setStyle:function(t){this.eachLayer(function(e){this._setLayerStyle(e,t)},this)},_setLayerStyle:function(t,e){"function"==typeof e&&(e=e(t.feature)),t.setStyle&&t.setStyle(e)}}),o.extend(o.GeoJSON,{geometryToLayer:function(t,e,i,n){var s,a,r,h,l="Feature"===t.type?t.geometry:t,u=l.coordinates,c=[];switch(i=i||this.coordsToLatLng,l.type){case"Point":return s=i(u),e?e(t,s):new o.Marker(s);case"MultiPoint":for(r=0,h=u.length;h>r;r++)s=i(u[r]),c.push(e?e(t,s):new o.Marker(s));return new o.FeatureGroup(c);case"LineString":return a=this.coordsToLatLngs(u,0,i),new o.Polyline(a,n);case"Polygon":if(2===u.length&&!u[1].length)throw new Error("Invalid GeoJSON object.");return a=this.coordsToLatLngs(u,1,i),new o.Polygon(a,n);case"MultiLineString":return a=this.coordsToLatLngs(u,1,i),new o.MultiPolyline(a,n);case"MultiPolygon":return a=this.coordsToLatLngs(u,2,i),new o.MultiPolygon(a,n);case"GeometryCollection":for(r=0,h=l.geometries.length;h>r;r++)c.push(this.geometryToLayer({geometry:l.geometries[r],type:"Feature",properties:t.properties},e,i,n));return new o.FeatureGroup(c);default:throw new Error("Invalid GeoJSON object.")}},coordsToLatLng:function(t){return new o.LatLng(t[1],t[0],t[2])},coordsToLatLngs:function(t,e,i){var n,o,s,a=[];for(o=0,s=t.length;s>o;o++)n=e?this.coordsToLatLngs(t[o],e-1,i):(i||this.coordsToLatLng)(t[o]),a.push(n);return a},latLngToCoords:function(t){var e=[t.lng,t.lat];return t.alt!==i&&e.push(t.alt),e},latLngsToCoords:function(t){for(var e=[],i=0,n=t.length;n>i;i++)e.push(o.GeoJSON.latLngToCoords(t[i]));return e},getFeature:function(t,e){return t.feature?o.extend({},t.feature,{geometry:e}):o.GeoJSON.asFeature(e)},asFeature:function(t){return"Feature"===t.type?t:{type:"Feature",properties:{},geometry:t}}});var a={toGeoJSON:function(){return o.GeoJSON.getFeature(this,{type:"Point",coordinates:o.GeoJSON.latLngToCoords(this.getLatLng())})}};o.Marker.include(a),o.Circle.include(a),o.CircleMarker.include(a),o.Polyline.include({toGeoJSON:function(){return o.GeoJSON.getFeature(this,{type:"LineString",coordinates:o.GeoJSON.latLngsToCoords(this.getLatLngs())})}}),o.Polygon.include({toGeoJSON:function(){var t,e,i,n=[o.GeoJSON.latLngsToCoords(this.getLatLngs())];if(n[0].push(n[0][0]),this._holes)for(t=0,e=this._holes.length;e>t;t++)i=o.GeoJSON.latLngsToCoords(this._holes[t]),i.push(i[0]),n.push(i);return o.GeoJSON.getFeature(this,{type:"Polygon",coordinates:n})}}),function(){function t(t){return function(){var e=[];return this.eachLayer(function(t){e.push(t.toGeoJSON().geometry.coordinates)}),o.GeoJSON.getFeature(this,{type:t,coordinates:e})}}o.MultiPolyline.include({toGeoJSON:t("MultiLineString")}),o.MultiPolygon.include({toGeoJSON:t("MultiPolygon")}),o.LayerGroup.include({toGeoJSON:function(){var e,i=this.feature&&this.feature.geometry,n=[];if(i&&"MultiPoint"===i.type)return t("MultiPoint").call(this);var s=i&&"GeometryCollection"===i.type;return this.eachLayer(function(t){t.toGeoJSON&&(e=t.toGeoJSON(),n.push(s?e.geometry:o.GeoJSON.asFeature(e)))}),s?o.GeoJSON.getFeature(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}})}(),o.geoJson=function(t,e){return new o.GeoJSON(t,e)},o.DomEvent={addListener:function(t,e,i,n){var s,a,r,h=o.stamp(i),l="_leaflet_"+e+h;return t[l]?this:(s=function(e){return i.call(n||t,e||o.DomEvent._getEvent())},o.Browser.pointer&&0===e.indexOf("touch")?this.addPointerListener(t,e,s,h):(o.Browser.touch&&"dblclick"===e&&this.addDoubleTapListener&&this.addDoubleTapListener(t,s,h),"addEventListener"in t?"mousewheel"===e?(t.addEventListener("DOMMouseScroll",s,!1),t.addEventListener(e,s,!1)):"mouseenter"===e||"mouseleave"===e?(a=s,r="mouseenter"===e?"mouseover":"mouseout",s=function(e){return o.DomEvent._checkMouse(t,e)?a(e):void 0},t.addEventListener(r,s,!1)):"click"===e&&o.Browser.android?(a=s,s=function(t){return o.DomEvent._filterClick(t,a)},t.addEventListener(e,s,!1)):t.addEventListener(e,s,!1):"attachEvent"in t&&t.attachEvent("on"+e,s),t[l]=s,this))},removeListener:function(t,e,i){var n=o.stamp(i),s="_leaflet_"+e+n,a=t[s];return a?(o.Browser.pointer&&0===e.indexOf("touch")?this.removePointerListener(t,e,n):o.Browser.touch&&"dblclick"===e&&this.removeDoubleTapListener?this.removeDoubleTapListener(t,n):"removeEventListener"in t?"mousewheel"===e?(t.removeEventListener("DOMMouseScroll",a,!1),t.removeEventListener(e,a,!1)):"mouseenter"===e||"mouseleave"===e?t.removeEventListener("mouseenter"===e?"mouseover":"mouseout",a,!1):t.removeEventListener(e,a,!1):"detachEvent"in t&&t.detachEvent("on"+e,a),t[s]=null,this):this},stopPropagation:function(t){return t.stopPropagation?t.stopPropagation():t.cancelBubble=!0,o.DomEvent._skipped(t),this},disableScrollPropagation:function(t){var e=o.DomEvent.stopPropagation;return o.DomEvent.on(t,"mousewheel",e).on(t,"MozMousePixelScroll",e)},disableClickPropagation:function(t){for(var e=o.DomEvent.stopPropagation,i=o.Draggable.START.length-1;i>=0;i--)o.DomEvent.on(t,o.Draggable.START[i],e);return o.DomEvent.on(t,"click",o.DomEvent._fakeStop).on(t,"dblclick",e)},preventDefault:function(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this},stop:function(t){return o.DomEvent.preventDefault(t).stopPropagation(t)},getMousePosition:function(t,e){if(!e)return new o.Point(t.clientX,t.clientY);var i=e.getBoundingClientRect();return new o.Point(t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop)},getWheelDelta:function(t){var e=0;return t.wheelDelta&&(e=t.wheelDelta/120),t.detail&&(e=-t.detail/3),e},_skipEvents:{},_fakeStop:function(t){o.DomEvent._skipEvents[t.type]=!0},_skipped:function(t){var e=this._skipEvents[t.type];return this._skipEvents[t.type]=!1,e},_checkMouse:function(t,e){var i=e.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch(n){return!1}return i!==t},_getEvent:function(){var e=t.event;if(!e)for(var i=arguments.callee.caller;i&&(e=i.arguments[0],!e||t.Event!==e.constructor);)i=i.caller;return e},_filterClick:function(t,e){var i=t.timeStamp||t.originalEvent.timeStamp,n=o.DomEvent._lastClick&&i-o.DomEvent._lastClick;return n&&n>100&&500>n||t.target._simulatedClick&&!t._simulated?void o.DomEvent.stop(t):(o.DomEvent._lastClick=i,e(t))}},o.DomEvent.on=o.DomEvent.addListener,o.DomEvent.off=o.DomEvent.removeListener,o.Draggable=o.Class.extend({includes:o.Mixin.Events,statics:{START:o.Browser.touch?["touchstart","mousedown"]:["mousedown"],END:{mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},MOVE:{mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"}},initialize:function(t,e){this._element=t,this._dragStartTarget=e||t},enable:function(){if(!this._enabled){for(var t=o.Draggable.START.length-1;t>=0;t--)o.DomEvent.on(this._dragStartTarget,o.Draggable.START[t],this._onDown,this);this._enabled=!0}},disable:function(){if(this._enabled){for(var t=o.Draggable.START.length-1;t>=0;t--)o.DomEvent.off(this._dragStartTarget,o.Draggable.START[t],this._onDown,this);this._enabled=!1,this._moved=!1}},_onDown:function(t){if(this._moved=!1,!t.shiftKey&&(1===t.which||1===t.button||t.touches)&&(o.DomEvent.stopPropagation(t),!o.Draggable._disabled&&(o.DomUtil.disableImageDrag(),o.DomUtil.disableTextSelection(),!this._moving))){var i=t.touches?t.touches[0]:t;this._startPoint=new o.Point(i.clientX,i.clientY),this._startPos=this._newPos=o.DomUtil.getPosition(this._element),o.DomEvent.on(e,o.Draggable.MOVE[t.type],this._onMove,this).on(e,o.Draggable.END[t.type],this._onUp,this)}},_onMove:function(t){if(t.touches&&t.touches.length>1)return void(this._moved=!0);var i=t.touches&&1===t.touches.length?t.touches[0]:t,n=new o.Point(i.clientX,i.clientY),s=n.subtract(this._startPoint);(s.x||s.y)&&(o.Browser.touch&&Math.abs(s.x)+Math.abs(s.y)<3||(o.DomEvent.preventDefault(t),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=o.DomUtil.getPosition(this._element).subtract(s),o.DomUtil.addClass(e.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,o.DomUtil.addClass(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(s),this._moving=!0,o.Util.cancelAnimFrame(this._animRequest),this._animRequest=o.Util.requestAnimFrame(this._updatePosition,this,!0,this._dragStartTarget)))},_updatePosition:function(){this.fire("predrag"),o.DomUtil.setPosition(this._element,this._newPos),this.fire("drag")},_onUp:function(){o.DomUtil.removeClass(e.body,"leaflet-dragging"),this._lastTarget&&(o.DomUtil.removeClass(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null);for(var t in o.Draggable.MOVE)o.DomEvent.off(e,o.Draggable.MOVE[t],this._onMove).off(e,o.Draggable.END[t],this._onUp);o.DomUtil.enableImageDrag(),o.DomUtil.enableTextSelection(),this._moved&&this._moving&&(o.Util.cancelAnimFrame(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1}}),o.Handler=o.Class.extend({initialize:function(t){this._map=t},enable:function(){this._enabled||(this._enabled=!0,this.addHooks())},disable:function(){this._enabled&&(this._enabled=!1,this.removeHooks())},enabled:function(){return!!this._enabled}}),o.Map.mergeOptions({dragging:!0,inertia:!o.Browser.android23,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,inertiaThreshold:o.Browser.touch?32:18,easeLinearity:.25,worldCopyJump:!1}),o.Map.Drag=o.Handler.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new o.Draggable(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDrag,this),t.on("viewreset",this._onViewReset,this),t.whenReady(this._onViewReset,this))}this._draggable.enable()},removeHooks:function(){this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},_onDragStart:function(){var t=this._map;t._panAnim&&t._panAnim.stop(),t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(){if(this._map.options.inertia){var t=this._lastTime=+new Date,e=this._lastPos=this._draggable._newPos;this._positions.push(e),this._times.push(t),t-this._times[0]>200&&(this._positions.shift(),this._times.shift())}this._map.fire("move").fire("drag")},_onViewReset:function(){var t=this._map.getSize()._divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.project([0,180]).x},_onPreDrag:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-e+i)%t+e-i,s=(n+e+i)%t-e-i,a=Math.abs(o+i)i.inertiaThreshold||!this._positions[0];if(e.fire("dragend",t),s)e.fire("moveend");else{var a=this._lastPos.subtract(this._positions[0]),r=(this._lastTime+n-this._times[0])/1e3,h=i.easeLinearity,l=a.multiplyBy(h/r),u=l.distanceTo([0,0]),c=Math.min(i.inertiaMaxSpeed,u),d=l.multiplyBy(c/u),p=c/(i.inertiaDeceleration*h),_=d.multiplyBy(-p/2).round();_.x&&_.y?(_=e._limitOffset(_,e.options.maxBounds),o.Util.requestAnimFrame(function(){e.panBy(_,{duration:p,easeLinearity:h,noMoveStart:!0})})):e.fire("moveend")}}}),o.Map.addInitHook("addHandler","dragging",o.Map.Drag),o.Map.mergeOptions({doubleClickZoom:!0}),o.Map.DoubleClickZoom=o.Handler.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,i=e.getZoom()+(t.originalEvent.shiftKey?-1:1);"center"===e.options.doubleClickZoom?e.setZoom(i):e.setZoomAround(t.containerPoint,i)}}),o.Map.addInitHook("addHandler","doubleClickZoom",o.Map.DoubleClickZoom),o.Map.mergeOptions({scrollWheelZoom:!0}),o.Map.ScrollWheelZoom=o.Handler.extend({addHooks:function(){o.DomEvent.on(this._map._container,"mousewheel",this._onWheelScroll,this),o.DomEvent.on(this._map._container,"MozMousePixelScroll",o.DomEvent.preventDefault),this._delta=0},removeHooks:function(){o.DomEvent.off(this._map._container,"mousewheel",this._onWheelScroll),o.DomEvent.off(this._map._container,"MozMousePixelScroll",o.DomEvent.preventDefault)},_onWheelScroll:function(t){var e=o.DomEvent.getWheelDelta(t);this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var i=Math.max(40-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(o.bind(this._performZoom,this),i),o.DomEvent.preventDefault(t),o.DomEvent.stopPropagation(t)},_performZoom:function(){var t=this._map,e=this._delta,i=t.getZoom();e=e>0?Math.ceil(e):Math.floor(e),e=Math.max(Math.min(e,4),-4),e=t._limitZoom(i+e)-i,this._delta=0,this._startTime=null,e&&("center"===t.options.scrollWheelZoom?t.setZoom(i+e):t.setZoomAround(this._lastMousePos,i+e))}}),o.Map.addInitHook("addHandler","scrollWheelZoom",o.Map.ScrollWheelZoom),o.extend(o.DomEvent,{_touchstart:o.Browser.msPointer?"MSPointerDown":o.Browser.pointer?"pointerdown":"touchstart",_touchend:o.Browser.msPointer?"MSPointerUp":o.Browser.pointer?"pointerup":"touchend",addDoubleTapListener:function(t,i,n){function s(t){var e;if(o.Browser.pointer?(_.push(t.pointerId),e=_.length):e=t.touches.length,!(e>1)){var i=Date.now(),n=i-(r||i);h=t.touches?t.touches[0]:t,l=n>0&&u>=n,r=i}}function a(t){if(o.Browser.pointer){var e=_.indexOf(t.pointerId);if(-1===e)return;_.splice(e,1)}if(l){if(o.Browser.pointer){var n,s={};for(var a in h)n=h[a],"function"==typeof n?s[a]=n.bind(h):s[a]=n;h=s}h.type="dblclick",i(h),r=null}}var r,h,l=!1,u=250,c="_leaflet_",d=this._touchstart,p=this._touchend,_=[];t[c+d+n]=s,t[c+p+n]=a;var m=o.Browser.pointer?e.documentElement:t;return t.addEventListener(d,s,!1),m.addEventListener(p,a,!1),o.Browser.pointer&&m.addEventListener(o.DomEvent.POINTER_CANCEL,a,!1),this},removeDoubleTapListener:function(t,i){var n="_leaflet_";return t.removeEventListener(this._touchstart,t[n+this._touchstart+i],!1),(o.Browser.pointer?e.documentElement:t).removeEventListener(this._touchend,t[n+this._touchend+i],!1),o.Browser.pointer&&e.documentElement.removeEventListener(o.DomEvent.POINTER_CANCEL,t[n+this._touchend+i],!1),this}}),o.extend(o.DomEvent,{POINTER_DOWN:o.Browser.msPointer?"MSPointerDown":"pointerdown",POINTER_MOVE:o.Browser.msPointer?"MSPointerMove":"pointermove",POINTER_UP:o.Browser.msPointer?"MSPointerUp":"pointerup",POINTER_CANCEL:o.Browser.msPointer?"MSPointerCancel":"pointercancel",_pointers:[],_pointerDocumentListener:!1,addPointerListener:function(t,e,i,n){switch(e){case"touchstart":return this.addPointerListenerStart(t,e,i,n);case"touchend":return this.addPointerListenerEnd(t,e,i,n);case"touchmove":return this.addPointerListenerMove(t,e,i,n);default:throw"Unknown touch event type"}},addPointerListenerStart:function(t,i,n,s){var a="_leaflet_",r=this._pointers,h=function(t){"mouse"!==t.pointerType&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE&&o.DomEvent.preventDefault(t);for(var e=!1,i=0;i1))&&(this._moved||(o.DomUtil.addClass(e._mapPane,"leaflet-touching"),e.fire("movestart").fire("zoomstart"),this._moved=!0),o.Util.cancelAnimFrame(this._animRequest),this._animRequest=o.Util.requestAnimFrame(this._updateOnMove,this,!0,this._map._container),o.DomEvent.preventDefault(t))}},_updateOnMove:function(){var t=this._map,e=this._getScaleOrigin(),i=t.layerPointToLatLng(e),n=t.getScaleZoom(this._scale);t._animateZoom(i,n,this._startCenter,this._scale,this._delta,!1,!0)},_onTouchEnd:function(){if(!this._moved||!this._zooming)return void(this._zooming=!1);var t=this._map;this._zooming=!1,o.DomUtil.removeClass(t._mapPane,"leaflet-touching"),o.Util.cancelAnimFrame(this._animRequest),o.DomEvent.off(e,"touchmove",this._onTouchMove).off(e,"touchend",this._onTouchEnd);var i=this._getScaleOrigin(),n=t.layerPointToLatLng(i),s=t.getZoom(),a=t.getScaleZoom(this._scale)-s,r=a>0?Math.ceil(a):Math.floor(a),h=t._limitZoom(s+r),l=t.getZoomScale(h)/this._scale;t._animateZoom(n,h,i,l)},_getScaleOrigin:function(){var t=this._centerOffset.subtract(this._delta).divideBy(this._scale);return this._startCenter.add(t)}}),o.Map.addInitHook("addHandler","touchZoom",o.Map.TouchZoom),o.Map.mergeOptions({tap:!0,tapTolerance:15}),o.Map.Tap=o.Handler.extend({addHooks:function(){o.DomEvent.on(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){o.DomEvent.off(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(o.DomEvent.preventDefault(t),this._fireClick=!0,t.touches.length>1)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var i=t.touches[0],n=i.target;this._startPos=this._newPos=new o.Point(i.clientX,i.clientY),n.tagName&&"a"===n.tagName.toLowerCase()&&o.DomUtil.addClass(n,"leaflet-active"),this._holdTimeout=setTimeout(o.bind(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",i))},this),1e3),o.DomEvent.on(e,"touchmove",this._onMove,this).on(e,"touchend",this._onUp,this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),o.DomEvent.off(e,"touchmove",this._onMove,this).off(e,"touchend",this._onUp,this),this._fireClick&&t&&t.changedTouches){var i=t.changedTouches[0],n=i.target;n&&n.tagName&&"a"===n.tagName.toLowerCase()&&o.DomUtil.removeClass(n,"leaflet-active"),this._isTapValid()&&this._simulateEvent("click",i)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var e=t.touches[0];this._newPos=new o.Point(e.clientX,e.clientY)},_simulateEvent:function(i,n){var o=e.createEvent("MouseEvents");o._simulated=!0,n.target._simulatedClick=!0,o.initMouseEvent(i,!0,!0,t,1,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),n.target.dispatchEvent(o)}}),o.Browser.touch&&!o.Browser.pointer&&o.Map.addInitHook("addHandler","tap",o.Map.Tap),o.Map.mergeOptions({boxZoom:!0}),o.Map.BoxZoom=o.Handler.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._moved=!1},addHooks:function(){o.DomEvent.on(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){o.DomEvent.off(this._container,"mousedown",this._onMouseDown),this._moved=!1},moved:function(){return this._moved},_onMouseDown:function(t){return this._moved=!1,!t.shiftKey||1!==t.which&&1!==t.button?!1:(o.DomUtil.disableTextSelection(),o.DomUtil.disableImageDrag(),this._startLayerPoint=this._map.mouseEventToLayerPoint(t),void o.DomEvent.on(e,"mousemove",this._onMouseMove,this).on(e,"mouseup",this._onMouseUp,this).on(e,"keydown",this._onKeyDown,this))},_onMouseMove:function(t){this._moved||(this._box=o.DomUtil.create("div","leaflet-zoom-box",this._pane),o.DomUtil.setPosition(this._box,this._startLayerPoint),this._container.style.cursor="crosshair",this._map.fire("boxzoomstart"));var e=this._startLayerPoint,i=this._box,n=this._map.mouseEventToLayerPoint(t),s=n.subtract(e),a=new o.Point(Math.min(n.x,e.x),Math.min(n.y,e.y));o.DomUtil.setPosition(i,a),this._moved=!0,i.style.width=Math.max(0,Math.abs(s.x)-4)+"px",i.style.height=Math.max(0,Math.abs(s.y)-4)+"px"},_finish:function(){this._moved&&(this._pane.removeChild(this._box),this._container.style.cursor=""),o.DomUtil.enableTextSelection(),o.DomUtil.enableImageDrag(),o.DomEvent.off(e,"mousemove",this._onMouseMove).off(e,"mouseup",this._onMouseUp).off(e,"keydown",this._onKeyDown)},_onMouseUp:function(t){this._finish();var e=this._map,i=e.mouseEventToLayerPoint(t);if(!this._startLayerPoint.equals(i)){var n=new o.LatLngBounds(e.layerPointToLatLng(this._startLayerPoint),e.layerPointToLatLng(i));e.fitBounds(n),e.fire("boxzoomend",{boxZoomBounds:n})}},_onKeyDown:function(t){27===t.keyCode&&this._finish()}}),o.Map.addInitHook("addHandler","boxZoom",o.Map.BoxZoom),o.Map.mergeOptions({keyboard:!0,keyboardPanOffset:80,keyboardZoomOffset:1}),o.Map.Keyboard=o.Handler.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,173]},initialize:function(t){this._map=t,this._setPanOffset(t.options.keyboardPanOffset), -this._setZoomOffset(t.options.keyboardZoomOffset)},addHooks:function(){var t=this._map._container;-1===t.tabIndex&&(t.tabIndex="0"),o.DomEvent.on(t,"focus",this._onFocus,this).on(t,"blur",this._onBlur,this).on(t,"mousedown",this._onMouseDown,this),this._map.on("focus",this._addHooks,this).on("blur",this._removeHooks,this)},removeHooks:function(){this._removeHooks();var t=this._map._container;o.DomEvent.off(t,"focus",this._onFocus,this).off(t,"blur",this._onBlur,this).off(t,"mousedown",this._onMouseDown,this),this._map.off("focus",this._addHooks,this).off("blur",this._removeHooks,this)},_onMouseDown:function(){if(!this._focused){var i=e.body,n=e.documentElement,o=i.scrollTop||n.scrollTop,s=i.scrollLeft||n.scrollLeft;this._map._container.focus(),t.scrollTo(s,o)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanOffset:function(t){var e,i,n=this._panKeys={},o=this.keyCodes;for(e=0,i=o.left.length;i>e;e++)n[o.left[e]]=[-1*t,0];for(e=0,i=o.right.length;i>e;e++)n[o.right[e]]=[t,0];for(e=0,i=o.down.length;i>e;e++)n[o.down[e]]=[0,t];for(e=0,i=o.up.length;i>e;e++)n[o.up[e]]=[0,-1*t]},_setZoomOffset:function(t){var e,i,n=this._zoomKeys={},o=this.keyCodes;for(e=0,i=o.zoomIn.length;i>e;e++)n[o.zoomIn[e]]=t;for(e=0,i=o.zoomOut.length;i>e;e++)n[o.zoomOut[e]]=-t},_addHooks:function(){o.DomEvent.on(e,"keydown",this._onKeyDown,this)},_removeHooks:function(){o.DomEvent.off(e,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){var e=t.keyCode,i=this._map;if(e in this._panKeys){if(i._panAnim&&i._panAnim._inProgress)return;i.panBy(this._panKeys[e]),i.options.maxBounds&&i.panInsideBounds(i.options.maxBounds)}else{if(!(e in this._zoomKeys))return;i.setZoom(i.getZoom()+this._zoomKeys[e])}o.DomEvent.stop(t)}}),o.Map.addInitHook("addHandler","keyboard",o.Map.Keyboard),o.Handler.MarkerDrag=o.Handler.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new o.Draggable(t,t)),this._draggable.on("dragstart",this._onDragStart,this).on("drag",this._onDrag,this).on("dragend",this._onDragEnd,this),this._draggable.enable(),o.DomUtil.addClass(this._marker._icon,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off("dragstart",this._onDragStart,this).off("drag",this._onDrag,this).off("dragend",this._onDragEnd,this),this._draggable.disable(),o.DomUtil.removeClass(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_onDragStart:function(){this._marker.closePopup().fire("movestart").fire("dragstart")},_onDrag:function(){var t=this._marker,e=t._shadow,i=o.DomUtil.getPosition(t._icon),n=t._map.layerPointToLatLng(i);e&&o.DomUtil.setPosition(e,i),t._latlng=n,t.fire("move",{latlng:n}).fire("drag")},_onDragEnd:function(t){this._marker.fire("moveend").fire("dragend",t)}}),o.Control=o.Class.extend({options:{position:"topright"},initialize:function(t){o.setOptions(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),n=t._controlCorners[i];return o.DomUtil.addClass(e,"leaflet-control"),-1!==i.indexOf("bottom")?n.insertBefore(e,n.firstChild):n.appendChild(e),this},removeFrom:function(t){var e=this.getPosition(),i=t._controlCorners[e];return i.removeChild(this._container),this._map=null,this.onRemove&&this.onRemove(t),this},_refocusOnMap:function(){this._map&&this._map.getContainer().focus()}}),o.control=function(t){return new o.Control(t)},o.Map.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.removeFrom(this),this},_initControlPos:function(){function t(t,s){var a=i+t+" "+i+s;e[t+s]=o.DomUtil.create("div",a,n)}var e=this._controlCorners={},i="leaflet-",n=this._controlContainer=o.DomUtil.create("div",i+"control-container",this._container);t("top","left"),t("top","right"),t("bottom","left"),t("bottom","right")},_clearControlPos:function(){this._container.removeChild(this._controlContainer)}}),o.Control.Zoom=o.Control.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"-",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=o.DomUtil.create("div",e+" leaflet-bar");return this._map=t,this._zoomInButton=this._createButton(this.options.zoomInText,this.options.zoomInTitle,e+"-in",i,this._zoomIn,this),this._zoomOutButton=this._createButton(this.options.zoomOutText,this.options.zoomOutTitle,e+"-out",i,this._zoomOut,this),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},_zoomIn:function(t){this._map.zoomIn(t.shiftKey?3:1)},_zoomOut:function(t){this._map.zoomOut(t.shiftKey?3:1)},_createButton:function(t,e,i,n,s,a){var r=o.DomUtil.create("a",i,n);r.innerHTML=t,r.href="#",r.title=e;var h=o.DomEvent.stopPropagation;return o.DomEvent.on(r,"click",h).on(r,"mousedown",h).on(r,"dblclick",h).on(r,"click",o.DomEvent.preventDefault).on(r,"click",s,a).on(r,"click",this._refocusOnMap,a),r},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";o.DomUtil.removeClass(this._zoomInButton,e),o.DomUtil.removeClass(this._zoomOutButton,e),t._zoom===t.getMinZoom()&&o.DomUtil.addClass(this._zoomOutButton,e),t._zoom===t.getMaxZoom()&&o.DomUtil.addClass(this._zoomInButton,e)}}),o.Map.mergeOptions({zoomControl:!0}),o.Map.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new o.Control.Zoom,this.addControl(this.zoomControl))}),o.control.zoom=function(t){return new o.Control.Zoom(t)},o.Control.Attribution=o.Control.extend({options:{position:"bottomright",prefix:'Leaflet'},initialize:function(t){o.setOptions(this,t),this._attributions={}},onAdd:function(t){this._container=o.DomUtil.create("div","leaflet-control-attribution"),o.DomEvent.disableClickPropagation(this._container);for(var e in t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return t.on("layeradd",this._onLayerAdd,this).on("layerremove",this._onLayerRemove,this),this._update(),this._container},onRemove:function(t){t.off("layeradd",this._onLayerAdd).off("layerremove",this._onLayerRemove)},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):void 0},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):void 0},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(" | ")}},_onLayerAdd:function(t){t.layer.getAttribution&&this.addAttribution(t.layer.getAttribution())},_onLayerRemove:function(t){t.layer.getAttribution&&this.removeAttribution(t.layer.getAttribution())}}),o.Map.mergeOptions({attributionControl:!0}),o.Map.addInitHook(function(){this.options.attributionControl&&(this.attributionControl=(new o.Control.Attribution).addTo(this))}),o.control.attribution=function(t){return new o.Control.Attribution(t)},o.Control.Scale=o.Control.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0,updateWhenIdle:!1},onAdd:function(t){this._map=t;var e="leaflet-control-scale",i=o.DomUtil.create("div",e),n=this.options;return this._addScales(n,e,i),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=o.DomUtil.create("div",e+"-line",i)),t.imperial&&(this._iScale=o.DomUtil.create("div",e+"-line",i))},_update:function(){var t=this._map.getBounds(),e=t.getCenter().lat,i=6378137*Math.PI*Math.cos(e*Math.PI/180),n=i*(t.getNorthEast().lng-t.getSouthWest().lng)/180,o=this._map.getSize(),s=this.options,a=0;o.x>0&&(a=n*(s.maxWidth/o.x)),this._updateScales(s,a)},_updateScales:function(t,e){t.metric&&e&&this._updateMetric(e),t.imperial&&e&&this._updateImperial(e)},_updateMetric:function(t){var e=this._getRoundNum(t);this._mScale.style.width=this._getScaleWidth(e/t)+"px",this._mScale.innerHTML=1e3>e?e+" m":e/1e3+" km"},_updateImperial:function(t){var e,i,n,o=3.2808399*t,s=this._iScale;o>5280?(e=o/5280,i=this._getRoundNum(e),s.style.width=this._getScaleWidth(i/e)+"px",s.innerHTML=i+" mi"):(n=this._getRoundNum(o),s.style.width=this._getScaleWidth(n/o)+"px",s.innerHTML=n+" ft")},_getScaleWidth:function(t){return Math.round(this.options.maxWidth*t)-10},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),i=t/e;return i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:1,e*i}}),o.control.scale=function(t){return new o.Control.Scale(t)},o.Control.Layers=o.Control.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0},initialize:function(t,e,i){o.setOptions(this,i),this._layers={},this._lastZIndex=0,this._handlingClick=!1;for(var n in t)this._addLayer(t[n],n);for(n in e)this._addLayer(e[n],n,!0)},onAdd:function(t){return this._initLayout(),this._update(),t.on("layeradd",this._onLayerChange,this).on("layerremove",this._onLayerChange,this),this._container},onRemove:function(t){t.off("layeradd",this._onLayerChange,this).off("layerremove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._update(),this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._update(),this},removeLayer:function(t){var e=o.stamp(t);return delete this._layers[e],this._update(),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=o.DomUtil.create("div",t);e.setAttribute("aria-haspopup",!0),o.Browser.touch?o.DomEvent.on(e,"click",o.DomEvent.stopPropagation):o.DomEvent.disableClickPropagation(e).disableScrollPropagation(e);var i=this._form=o.DomUtil.create("form",t+"-list");if(this.options.collapsed){o.Browser.android||o.DomEvent.on(e,"mouseover",this._expand,this).on(e,"mouseout",this._collapse,this);var n=this._layersLink=o.DomUtil.create("a",t+"-toggle",e);n.href="#",n.title="Layers",o.Browser.touch?o.DomEvent.on(n,"click",o.DomEvent.stop).on(n,"click",this._expand,this):o.DomEvent.on(n,"focus",this._expand,this),o.DomEvent.on(i,"click",function(){setTimeout(o.bind(this._onInputClick,this),0)},this),this._map.on("click",this._collapse,this)}else this._expand();this._baseLayersList=o.DomUtil.create("div",t+"-base",i),this._separator=o.DomUtil.create("div",t+"-separator",i),this._overlaysList=o.DomUtil.create("div",t+"-overlays",i),e.appendChild(i)},_addLayer:function(t,e,i){var n=o.stamp(t);this._layers[n]={layer:t,name:e,overlay:i},this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex))},_update:function(){if(this._container){this._baseLayersList.innerHTML="",this._overlaysList.innerHTML="";var t,e,i=!1,n=!1;for(t in this._layers)e=this._layers[t],this._addItem(e),n=n||e.overlay,i=i||!e.overlay;this._separator.style.display=n&&i?"":"none"}},_onLayerChange:function(t){var e=this._layers[o.stamp(t.layer)];if(e){this._handlingClick||this._update();var i=e.overlay?"layeradd"===t.type?"overlayadd":"overlayremove":"layeradd"===t.type?"baselayerchange":null;i&&this._map.fire(i,e)}},_createRadioElement:function(t,i){var n='t;t++)e=n[t],i=this._layers[e.layerId],e.checked&&!this._map.hasLayer(i.layer)?this._map.addLayer(i.layer):!e.checked&&this._map.hasLayer(i.layer)&&this._map.removeLayer(i.layer);this._handlingClick=!1,this._refocusOnMap()},_expand:function(){o.DomUtil.addClass(this._container,"leaflet-control-layers-expanded")},_collapse:function(){this._container.className=this._container.className.replace(" leaflet-control-layers-expanded","")}}),o.control.layers=function(t,e,i){return new o.Control.Layers(t,e,i)},o.PosAnimation=o.Class.extend({includes:o.Mixin.Events,run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._newPos=e,this.fire("start"),t.style[o.DomUtil.TRANSITION]="all "+(i||.25)+"s cubic-bezier(0,0,"+(n||.5)+",1)",o.DomEvent.on(t,o.DomUtil.TRANSITION_END,this._onTransitionEnd,this),o.DomUtil.setPosition(t,e),o.Util.falseFn(t.offsetWidth),this._stepTimer=setInterval(o.bind(this._onStep,this),50)},stop:function(){this._inProgress&&(o.DomUtil.setPosition(this._el,this._getPos()),this._onTransitionEnd(),o.Util.falseFn(this._el.offsetWidth))},_onStep:function(){var t=this._getPos();return t?(this._el._leaflet_pos=t,void this.fire("step")):void this._onTransitionEnd()},_transformRe:/([-+]?(?:\d*\.)?\d+)\D*, ([-+]?(?:\d*\.)?\d+)\D*\)/,_getPos:function(){var e,i,n,s=this._el,a=t.getComputedStyle(s);if(o.Browser.any3d){if(n=a[o.DomUtil.TRANSFORM].match(this._transformRe),!n)return;e=parseFloat(n[1]),i=parseFloat(n[2])}else e=parseFloat(a.left),i=parseFloat(a.top);return new o.Point(e,i,!0)},_onTransitionEnd:function(){o.DomEvent.off(this._el,o.DomUtil.TRANSITION_END,this._onTransitionEnd,this),this._inProgress&&(this._inProgress=!1,this._el.style[o.DomUtil.TRANSITION]="",this._el._leaflet_pos=this._newPos,clearInterval(this._stepTimer),this.fire("step").fire("end"))}}),o.Map.include({setView:function(t,e,n){if(e=e===i?this._zoom:this._limitZoom(e),t=this._limitCenter(o.latLng(t),e,this.options.maxBounds),n=n||{},this._panAnim&&this._panAnim.stop(),this._loaded&&!n.reset&&n!==!0){n.animate!==i&&(n.zoom=o.extend({animate:n.animate},n.zoom),n.pan=o.extend({animate:n.animate},n.pan));var s=this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,n.zoom):this._tryAnimatedPan(t,n.pan);if(s)return clearTimeout(this._sizeTimer),this}return this._resetView(t,e),this},panBy:function(t,e){if(t=o.point(t).round(),e=e||{},!t.x&&!t.y)return this;if(this._panAnim||(this._panAnim=new o.PosAnimation,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),e.animate!==!1){o.DomUtil.addClass(this._mapPane,"leaflet-pan-anim");var i=this._getMapPanePos().subtract(t);this._panAnim.run(this._mapPane,i,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){o.DomUtil.removeClass(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._floor();return(e&&e.animate)===!0||this.getSize().contains(i)?(this.panBy(i,e),!0):!1}}),o.PosAnimation=o.DomUtil.TRANSITION?o.PosAnimation:o.PosAnimation.extend({run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=o.DomUtil.getPosition(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(),this._complete())},_animate:function(){this._animId=o.Util.requestAnimFrame(this._animate,this),this._step()},_step:function(){var t=+new Date-this._startTime,e=1e3*this._duration;e>t?this._runFrame(this._easeOut(t/e)):(this._runFrame(1),this._complete())},_runFrame:function(t){var e=this._startPos.add(this._offset.multiplyBy(t));o.DomUtil.setPosition(this._el,e),this.fire("step")},_complete:function(){o.Util.cancelAnimFrame(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),o.Map.mergeOptions({zoomAnimation:!0,zoomAnimationThreshold:4}),o.DomUtil.TRANSITION&&o.Map.addInitHook(function(){this._zoomAnimated=this.options.zoomAnimation&&o.DomUtil.TRANSITION&&o.Browser.any3d&&!o.Browser.android23&&!o.Browser.mobileOpera,this._zoomAnimated&&o.DomEvent.on(this._mapPane,o.DomUtil.TRANSITION_END,this._catchTransitionEnd,this)}),o.Map.include(o.DomUtil.TRANSITION?{_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||i.animate===!1||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/n),s=this._getCenterLayerPoint()._add(o);return i.animate===!0||this.getSize().contains(o)?(this.fire("movestart").fire("zoomstart"),this._animateZoom(t,e,s,n,null,!0),!0):!1},_animateZoom:function(t,e,i,n,s,a,r){r||(this._animatingZoom=!0),o.DomUtil.addClass(this._mapPane,"leaflet-zoom-anim"),this._animateToCenter=t,this._animateToZoom=e,o.Draggable&&(o.Draggable._disabled=!0),o.Util.requestAnimFrame(function(){this.fire("zoomanim",{center:t,zoom:e,origin:i,scale:n,delta:s,backwards:a}),setTimeout(o.bind(this._onZoomTransitionEnd,this),250)},this)},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._animatingZoom=!1,o.DomUtil.removeClass(this._mapPane,"leaflet-zoom-anim"),o.Util.requestAnimFrame(function(){this._resetView(this._animateToCenter,this._animateToZoom,!0,!0),o.Draggable&&(o.Draggable._disabled=!1)},this))}}:{}),o.TileLayer.include({_animateZoom:function(t){this._animating||(this._animating=!0,this._prepareBgBuffer());var e=this._bgBuffer,i=o.DomUtil.TRANSFORM,n=t.delta?o.DomUtil.getTranslateString(t.delta):e.style[i],s=o.DomUtil.getScaleString(t.scale,t.origin);e.style[i]=t.backwards?s+" "+n:n+" "+s},_endZoomAnim:function(){var t=this._tileContainer,e=this._bgBuffer;t.style.visibility="",t.parentNode.appendChild(t),o.Util.falseFn(e.offsetWidth);var i=this._map.getZoom();(i>this.options.maxZoom||i.5&&.5>n?(t.style.visibility="hidden",void this._stopLoadingImages(t)):(e.style.visibility="hidden",e.style[o.DomUtil.TRANSFORM]="",this._tileContainer=e,e=this._bgBuffer=t,this._stopLoadingImages(e),void clearTimeout(this._clearBgBufferTimer))},_getLoadedTilesPercentage:function(t){var e,i,n=t.getElementsByTagName("img"),o=0;for(e=0,i=n.length;i>e;e++)n[e].complete&&o++;return o/i},_stopLoadingImages:function(t){var e,i,n,s=Array.prototype.slice.call(t.getElementsByTagName("img"));for(e=0,i=s.length;i>e;e++)n=s[e],n.complete||(n.onload=o.Util.falseFn,n.onerror=o.Util.falseFn,n.src=o.Util.emptyImageUrl,n.parentNode.removeChild(n))}}),o.Map.include({_defaultLocateOptions:{watch:!1,setView:!1,maxZoom:1/0,timeout:1e4,maximumAge:0,enableHighAccuracy:!1},locate:function(t){if(t=this._locateOptions=o.extend(this._defaultLocateOptions,t),!navigator.geolocation)return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=o.bind(this._handleGeolocationResponse,this),i=o.bind(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e=t.code,i=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+i+"."})},_handleGeolocationResponse:function(t){var e=t.coords.latitude,i=t.coords.longitude,n=new o.LatLng(e,i),s=180*t.coords.accuracy/40075017,a=s/Math.cos(o.LatLng.DEG_TO_RAD*e),r=o.latLngBounds([e-s,i-a],[e+s,i+a]),h=this._locateOptions;if(h.setView){var l=Math.min(this.getBoundsZoom(r),h.maxZoom);this.setView(n,l)}var u={latlng:n,bounds:r,timestamp:t.timestamp};for(var c in t.coords)"number"==typeof t.coords[c]&&(u[c]=t.coords[c]);this.fire("locationfound",u)}})}(window,document);define("ViewModels/DistanceLegendViewModel",["Cesium/Core/defined","Cesium/Core/DeveloperError","Cesium/Core/EllipsoidGeodesic","Cesium/Core/Cartesian2","Cesium/Core/getTimestamp","Cesium/Core/EventHelper","KnockoutES5","Core/loadView","leaflet"],function(defined,DeveloperError,EllipsoidGeodesic,Cartesian2,getTimestamp,EventHelper,Knockout,loadView,leaflet){"use strict";var DistanceLegendViewModel=function(options){if(!defined(options)||!defined(options.terria)){throw new DeveloperError("options.terria is required.")}this.terria=options.terria;this._removeSubscription=undefined;this._lastLegendUpdate=undefined;this.eventHelper=new EventHelper;this.distanceLabel=undefined;this.barWidth=undefined;Knockout.track(this,["distanceLabel","barWidth"]);this.eventHelper.add(this.terria.afterWidgetChanged,function(){if(defined(this._removeSubscription)){this._removeSubscription();this._removeSubscription=undefined}},this);var that=this;function addUpdateSubscription(){if(defined(that.terria)){var scene=that.terria.scene;that._removeSubscription=scene.postRender.addEventListener(function(){updateDistanceLegendCesium(this,scene)},that)}else if(defined(that.terria.leaflet)){var map=that.terria.leaflet.map;var potentialChangeCallback=function potentialChangeCallback(){updateDistanceLegendLeaflet(that,map)};that._removeSubscription=function(){map.off("zoomend",potentialChangeCallback);map.off("moveend",potentialChangeCallback)};map.on("zoomend",potentialChangeCallback);map.on("moveend",potentialChangeCallback);updateDistanceLegendLeaflet(that,map)}}addUpdateSubscription();this.eventHelper.add(this.terria.afterWidgetChanged,function(){addUpdateSubscription()},this)};DistanceLegendViewModel.prototype.destroy=function(){this.eventHelper.removeAll()};DistanceLegendViewModel.prototype.show=function(container){var testing='
'+'
'+"
"+"
";loadView(testing,container,this)};DistanceLegendViewModel.create=function(options){var result=new DistanceLegendViewModel(options);result.show(options.container);return result};var geodesic=new EllipsoidGeodesic;var distances=[1,2,3,5,10,20,30,50,100,200,300,500,1e3,2e3,3e3,5e3,1e4,2e4,3e4,5e4,1e5,2e5,3e5,5e5,1e6,2e6,3e6,5e6,1e7,2e7,3e7,5e7];function updateDistanceLegendCesium(viewModel,scene){var now=getTimestamp();if(now=0;--i){if(distances[i]/pixelDistance=1e3){label=(distance/1e3).toString()+" km"}else{label=distance.toString()+" m"}viewModel.barWidth=distance/pixelDistance|0;viewModel.distanceLabel=label}else{viewModel.barWidth=undefined;viewModel.distanceLabel=undefined}}function updateDistanceLegendLeaflet(viewModel,map){var halfHeight=map.getSize().y/2;var maxPixelWidth=100;var maxMeters=map.containerPointToLatLng([0,halfHeight]).distanceTo(map.containerPointToLatLng([maxPixelWidth,halfHeight]));var meters=leaflet.control.scale()._getRoundNum(maxMeters);var label=meters<1e3?meters+" m":meters/1e3+" km";viewModel.barWidth=meters/maxMeters*maxPixelWidth;viewModel.distanceLabel=label}return DistanceLegendViewModel});define("ViewModels/UserInterfaceControl",["Cesium/Core/defined","Cesium/Core/defineProperties","Cesium/Core/DeveloperError","KnockoutES5"],function(defined,defineProperties,DeveloperError,Knockout){"use strict";var UserInterfaceControl=function(terria){if(!defined(terria)){throw new DeveloperError("terria is required")}this._terria=terria;this.name="Unnamed Control";this.text=undefined;this.svgIcon=undefined;this.svgHeight=undefined;this.svgWidth=undefined;this.cssClass=undefined;this.isActive=false;Knockout.track(this,["name","svgIcon","svgHeight","svgWidth","cssClass","isActive"])};defineProperties(UserInterfaceControl.prototype,{terria:{get:function(){return this._terria}},hasText:{get:function(){return defined(this.text)&&typeof this.text==="string"}}});UserInterfaceControl.prototype.activate=function(){throw new DeveloperError("activate must be implemented in the derived class.")};return UserInterfaceControl});define("ViewModels/NavigationControl",["ViewModels/UserInterfaceControl"],function(UserInterfaceControl){"use strict";var NavigationControl=function(terria){UserInterfaceControl.apply(this,arguments)};NavigationControl.prototype=Object.create(UserInterfaceControl.prototype);return NavigationControl});define("SvgPaths/svgReset",[],function(){"use strict";return"M 7.5,0 C 3.375,0 0,3.375 0,7.5 0,11.625 3.375,15 7.5,15 c 3.46875,0 6.375,-2.4375 7.21875,-5.625 l -1.96875,0 C 12,11.53125 9.9375,13.125 7.5,13.125 4.40625,13.125 1.875,10.59375 1.875,7.5 1.875,4.40625 4.40625,1.875 7.5,1.875 c 1.59375,0 2.90625,0.65625 3.9375,1.6875 l -3,3 6.5625,0 L 15,0 12.75,2.25 C 11.4375,0.84375 9.5625,0 7.5,0 z"});define("ViewModels/ResetViewNavigationControl",["Cesium/Core/defined","Cesium/Scene/Camera","ViewModels/NavigationControl","SvgPaths/svgReset"],function(defined,Camera,NavigationControl,svgReset){"use strict";var ResetViewNavigationControl=function(terria){NavigationControl.apply(this,arguments);this.name="Reset View";this.svgIcon=svgReset;this.svgHeight=15;this.svgWidth=15;this.cssClass="navigation-control-icon-reset"};ResetViewNavigationControl.prototype=Object.create(NavigationControl.prototype);ResetViewNavigationControl.prototype.resetView=function(){this.isActive=true;var camera=this.terria.scene.camera;if(this.terria.options.defaultResetView){if(this.terria.options.defaultResetView&&this.terria.options.defaultResetView instanceof Cesium.Cartographic){camera.flyTo({destination:Cesium.Ellipsoid.WGS84.cartographicToCartesian(this.terria.options.defaultResetView)})}else if(this.terria.options.defaultResetView&&this.terria.options.defaultResetView instanceof Cesium.Rectangle){try{Cesium.Rectangle.validate(this.terria.options.defaultResetView);camera.flyTo({destination:this.terria.options.defaultResetView})}catch(e){console.log("Cesium-navigation/ResetViewNavigationControl: options.defaultResetView Cesium rectangle is invalid!")}}}else if(typeof camera.flyHome==="function"){camera.flyHome(1)}else{camera.flyTo({destination:Camera.DEFAULT_VIEW_RECTANGLE,duration:1})}this.isActive=false};ResetViewNavigationControl.prototype.activate=function(){this.resetView()};return ResetViewNavigationControl});define("Core/Utils",["Cesium/Core/defined","Cesium/Core/Ray","Cesium/Core/Cartesian3","Cesium/Core/Cartographic","Cesium/Scene/SceneMode"],function(defined,Ray,Cartesian3,Cartographic,SceneMode){"use strict";var Utils={};var unprojectedScratch=new Cartographic;var rayScratch=new Ray;Utils.getCameraFocus=function(scene,inWorldCoordinates,result){if(scene.mode==SceneMode.MORPHING){return undefined}if(!defined(result)){result=new Cartesian3}var camera=scene.camera;rayScratch.origin=camera.positionWC;rayScratch.direction=camera.directionWC;var center=scene.globe.pick(rayScratch,scene,result);if(!defined(center)){return undefined}if(scene.mode==SceneMode.SCENE2D||scene.mode==SceneMode.COLUMBUS_VIEW){center=camera.worldToCameraCoordinatesPoint(center,result);if(inWorldCoordinates){center=scene.globe.ellipsoid.cartographicToCartesian(scene.mapProjection.unproject(center,unprojectedScratch),result)}}else{if(!inWorldCoordinates){center=camera.worldToCameraCoordinatesPoint(center,result)}}return center};return Utils});define("ViewModels/ZoomNavigationControl",["Cesium/Core/defined","Cesium/Core/Ray","Cesium/Core/IntersectionTests","Cesium/Core/Cartesian3","Cesium/Scene/SceneMode","ViewModels/NavigationControl","Core/Utils"],function(defined,Ray,IntersectionTests,Cartesian3,SceneMode,NavigationControl,Utils){"use strict";var ZoomNavigationControl=function(terria,zoomIn){NavigationControl.apply(this,arguments);this.name="Zoom "+(zoomIn?"In":"Out");this.text=zoomIn?"+":"-";this.cssClass="navigation-control-icon-zoom-"+(zoomIn?"in":"out");this.relativeAmount=2;if(zoomIn){this.relativeAmount=1/this.relativeAmount}};ZoomNavigationControl.prototype.relativeAmount=1;ZoomNavigationControl.prototype=Object.create(NavigationControl.prototype);ZoomNavigationControl.prototype.activate=function(){this.zoom(this.relativeAmount)};var cartesian3Scratch=new Cartesian3;ZoomNavigationControl.prototype.zoom=function(relativeAmount){this.isActive=true;if(defined(this.terria)){var scene=this.terria.scene;var camera=scene.camera;switch(scene.mode){case SceneMode.MORPHING:break;case SceneMode.SCENE2D:camera.zoomIn(camera.positionCartographic.height*(1-this.relativeAmount));break;default:var focus=Utils.getCameraFocus(scene,false);if(!defined(focus)){var ray=new Ray(camera.worldToCameraCoordinatesPoint(scene.globe.ellipsoid.cartographicToCartesian(camera.positionCartographic)),camera.directionWC);focus=IntersectionTests.grazingAltitudeLocation(ray,scene.globe.ellipsoid)}var direction=Cartesian3.subtract(camera.position,focus,cartesian3Scratch);var movementVector=Cartesian3.multiplyByScalar(direction,relativeAmount,direction);var endPosition=Cartesian3.add(focus,movementVector,focus);camera.position=endPosition}}this.isActive=false};return ZoomNavigationControl});define("SvgPaths/svgCompassOuterRing",[],function(){"use strict";return"m 66.5625,0 0,15.15625 3.71875,0 0,-10.40625 5.5,10.40625 4.375,0 0,-15.15625 -3.71875,0 0,10.40625 L 70.9375,0 66.5625,0 z M 72.5,20.21875 c -28.867432,0 -52.28125,23.407738 -52.28125,52.28125 0,28.87351 23.413818,52.3125 52.28125,52.3125 28.86743,0 52.28125,-23.43899 52.28125,-52.3125 0,-28.873512 -23.41382,-52.28125 -52.28125,-52.28125 z m 0,1.75 c 13.842515,0 26.368948,5.558092 35.5,14.5625 l -11.03125,11 0.625,0.625 11.03125,-11 c 8.9199,9.108762 14.4375,21.579143 14.4375,35.34375 0,13.764606 -5.5176,26.22729 -14.4375,35.34375 l -11.03125,-11 -0.625,0.625 11.03125,11 c -9.130866,9.01087 -21.658601,14.59375 -35.5,14.59375 -13.801622,0 -26.321058,-5.53481 -35.4375,-14.5 l 11.125,-11.09375 c 6.277989,6.12179 14.857796,9.90625 24.3125,9.90625 19.241896,0 34.875,-15.629154 34.875,-34.875 0,-19.245847 -15.633104,-34.84375 -34.875,-34.84375 -9.454704,0 -18.034511,3.760884 -24.3125,9.875 L 37.0625,36.4375 C 46.179178,27.478444 58.696991,21.96875 72.5,21.96875 z m -0.875,0.84375 0,13.9375 1.75,0 0,-13.9375 -1.75,0 z M 36.46875,37.0625 47.5625,48.15625 C 41.429794,54.436565 37.65625,63.027539 37.65625,72.5 c 0,9.472461 3.773544,18.055746 9.90625,24.34375 L 36.46875,107.9375 c -8.96721,-9.1247 -14.5,-21.624886 -14.5,-35.4375 0,-13.812615 5.53279,-26.320526 14.5,-35.4375 z M 72.5,39.40625 c 18.297686,0 33.125,14.791695 33.125,33.09375 0,18.302054 -14.827314,33.125 -33.125,33.125 -18.297687,0 -33.09375,-14.822946 -33.09375,-33.125 0,-18.302056 14.796063,-33.09375 33.09375,-33.09375 z M 22.84375,71.625 l 0,1.75 13.96875,0 0,-1.75 -13.96875,0 z m 85.5625,0 0,1.75 14,0 0,-1.75 -14,0 z M 71.75,108.25 l 0,13.9375 1.71875,0 0,-13.9375 -1.71875,0 z"; -});define("SvgPaths/svgCompassGyro",[],function(){"use strict";return"m 72.71875,54.375 c -0.476702,0 -0.908208,0.245402 -1.21875,0.5625 -0.310542,0.317098 -0.551189,0.701933 -0.78125,1.1875 -0.172018,0.363062 -0.319101,0.791709 -0.46875,1.25 -6.91615,1.075544 -12.313231,6.656514 -13,13.625 -0.327516,0.117495 -0.661877,0.244642 -0.9375,0.375 -0.485434,0.22959 -0.901634,0.471239 -1.21875,0.78125 -0.317116,0.310011 -0.5625,0.742111 -0.5625,1.21875 l 0.03125,0 c 0,0.476639 0.245384,0.877489 0.5625,1.1875 0.317116,0.310011 0.702066,0.58291 1.1875,0.8125 0.35554,0.168155 0.771616,0.32165 1.21875,0.46875 1.370803,6.10004 6.420817,10.834127 12.71875,11.8125 0.146999,0.447079 0.30025,0.863113 0.46875,1.21875 0.230061,0.485567 0.470708,0.870402 0.78125,1.1875 0.310542,0.317098 0.742048,0.5625 1.21875,0.5625 0.476702,0 0.876958,-0.245402 1.1875,-0.5625 0.310542,-0.317098 0.582439,-0.701933 0.8125,-1.1875 0.172018,-0.363062 0.319101,-0.791709 0.46875,-1.25 6.249045,-1.017063 11.256351,-5.7184 12.625,-11.78125 0.447134,-0.1471 0.86321,-0.300595 1.21875,-0.46875 0.485434,-0.22959 0.901633,-0.502489 1.21875,-0.8125 0.317117,-0.310011 0.5625,-0.710861 0.5625,-1.1875 l -0.03125,0 c 0,-0.476639 -0.245383,-0.908739 -0.5625,-1.21875 C 89.901633,71.846239 89.516684,71.60459 89.03125,71.375 88.755626,71.244642 88.456123,71.117495 88.125,71 87.439949,64.078341 82.072807,58.503735 75.21875,57.375 c -0.15044,-0.461669 -0.326927,-0.884711 -0.5,-1.25 -0.230061,-0.485567 -0.501958,-0.870402 -0.8125,-1.1875 -0.310542,-0.317098 -0.710798,-0.5625 -1.1875,-0.5625 z m -0.0625,1.40625 c 0.03595,-0.01283 0.05968,0 0.0625,0 0.0056,0 0.04321,-0.02233 0.1875,0.125 0.144288,0.147334 0.34336,0.447188 0.53125,0.84375 0.06385,0.134761 0.123901,0.309578 0.1875,0.46875 -0.320353,-0.01957 -0.643524,-0.0625 -0.96875,-0.0625 -0.289073,0 -0.558569,0.04702 -0.84375,0.0625 C 71.8761,57.059578 71.936151,56.884761 72,56.75 c 0.18789,-0.396562 0.355712,-0.696416 0.5,-0.84375 0.07214,-0.07367 0.120304,-0.112167 0.15625,-0.125 z m 0,2.40625 c 0.448007,0 0.906196,0.05436 1.34375,0.09375 0.177011,0.592256 0.347655,1.271044 0.5,2.03125 0.475097,2.370753 0.807525,5.463852 0.9375,8.9375 -0.906869,-0.02852 -1.834463,-0.0625 -2.78125,-0.0625 -0.92298,0 -1.802327,0.03537 -2.6875,0.0625 0.138529,-3.473648 0.493653,-6.566747 0.96875,-8.9375 0.154684,-0.771878 0.320019,-1.463985 0.5,-2.0625 0.405568,-0.03377 0.804291,-0.0625 1.21875,-0.0625 z m -2.71875,0.28125 c -0.129732,0.498888 -0.259782,0.987558 -0.375,1.5625 -0.498513,2.487595 -0.838088,5.693299 -0.96875,9.25 -3.21363,0.15162 -6.119596,0.480068 -8.40625,0.9375 -0.682394,0.136509 -1.275579,0.279657 -1.84375,0.4375 0.799068,-6.135482 5.504716,-11.036454 11.59375,-12.1875 z M 75.5,58.5 c 6.043169,1.18408 10.705093,6.052712 11.5,12.15625 -0.569435,-0.155806 -1.200273,-0.302525 -1.875,-0.4375 -2.262525,-0.452605 -5.108535,-0.783809 -8.28125,-0.9375 -0.130662,-3.556701 -0.470237,-6.762405 -0.96875,-9.25 C 75.761959,59.467174 75.626981,58.990925 75.5,58.5 z m -2.84375,12.09375 c 0.959338,0 1.895843,0.03282 2.8125,0.0625 C 75.48165,71.267751 75.5,71.871028 75.5,72.5 c 0,1.228616 -0.01449,2.438313 -0.0625,3.59375 -0.897358,0.0284 -1.811972,0.0625 -2.75,0.0625 -0.927373,0 -1.831062,-0.03473 -2.71875,-0.0625 -0.05109,-1.155437 -0.0625,-2.365134 -0.0625,-3.59375 0,-0.628972 0.01741,-1.232249 0.03125,-1.84375 0.895269,-0.02827 1.783025,-0.0625 2.71875,-0.0625 z M 68.5625,70.6875 c -0.01243,0.60601 -0.03125,1.189946 -0.03125,1.8125 0,1.22431 0.01541,2.407837 0.0625,3.5625 -3.125243,-0.150329 -5.92077,-0.471558 -8.09375,-0.90625 -0.784983,-0.157031 -1.511491,-0.316471 -2.125,-0.5 -0.107878,-0.704096 -0.1875,-1.422089 -0.1875,-2.15625 0,-0.115714 0.02849,-0.228688 0.03125,-0.34375 0.643106,-0.20284 1.389577,-0.390377 2.25,-0.5625 2.166953,-0.433487 4.97905,-0.75541 8.09375,-0.90625 z m 8.3125,0.03125 c 3.075121,0.15271 5.824455,0.446046 7.96875,0.875 0.857478,0.171534 1.630962,0.360416 2.28125,0.5625 0.0027,0.114659 0,0.228443 0,0.34375 0,0.735827 -0.07914,1.450633 -0.1875,2.15625 -0.598568,0.180148 -1.29077,0.34562 -2.0625,0.5 -2.158064,0.431708 -4.932088,0.754666 -8.03125,0.90625 0.04709,-1.154663 0.0625,-2.33819 0.0625,-3.5625 0,-0.611824 -0.01924,-1.185379 -0.03125,-1.78125 z M 57.15625,72.5625 c 0.0023,0.572772 0.06082,1.131112 0.125,1.6875 -0.125327,-0.05123 -0.266577,-0.10497 -0.375,-0.15625 -0.396499,-0.187528 -0.665288,-0.387337 -0.8125,-0.53125 -0.147212,-0.143913 -0.15625,-0.182756 -0.15625,-0.1875 0,-0.0047 -0.02221,-0.07484 0.125,-0.21875 0.147212,-0.143913 0.447251,-0.312472 0.84375,-0.5 0.07123,-0.03369 0.171867,-0.06006 0.25,-0.09375 z m 31.03125,0 c 0.08201,0.03503 0.175941,0.05872 0.25,0.09375 0.396499,0.187528 0.665288,0.356087 0.8125,0.5 0.14725,0.14391 0.15625,0.21405 0.15625,0.21875 0,0.0047 -0.009,0.04359 -0.15625,0.1875 -0.147212,0.143913 -0.416001,0.343722 -0.8125,0.53125 -0.09755,0.04613 -0.233314,0.07889 -0.34375,0.125 0.06214,-0.546289 0.09144,-1.094215 0.09375,-1.65625 z m -29.5,3.625 c 0.479308,0.123125 0.983064,0.234089 1.53125,0.34375 2.301781,0.460458 5.229421,0.787224 8.46875,0.9375 0.167006,2.84339 0.46081,5.433176 0.875,7.5 0.115218,0.574942 0.245268,1.063612 0.375,1.5625 -5.463677,-1.028179 -9.833074,-5.091831 -11.25,-10.34375 z m 27.96875,0 C 85.247546,81.408945 80.919274,85.442932 75.5,86.5 c 0.126981,-0.490925 0.261959,-0.967174 0.375,-1.53125 0.41419,-2.066824 0.707994,-4.65661 0.875,-7.5 3.204493,-0.15162 6.088346,-0.480068 8.375,-0.9375 0.548186,-0.109661 1.051942,-0.220625 1.53125,-0.34375 z M 70.0625,77.53125 c 0.865391,0.02589 1.723666,0.03125 2.625,0.03125 0.912062,0 1.782843,-0.0048 2.65625,-0.03125 -0.165173,2.736408 -0.453252,5.207651 -0.84375,7.15625 -0.152345,0.760206 -0.322989,1.438994 -0.5,2.03125 -0.437447,0.03919 -0.895856,0.0625 -1.34375,0.0625 -0.414943,0 -0.812719,-0.02881 -1.21875,-0.0625 -0.177011,-0.592256 -0.347655,-1.271044 -0.5,-2.03125 -0.390498,-1.948599 -0.700644,-4.419842 -0.875,-7.15625 z m 1.75,10.28125 c 0.284911,0.01545 0.554954,0.03125 0.84375,0.03125 0.325029,0 0.648588,-0.01171 0.96875,-0.03125 -0.05999,0.148763 -0.127309,0.31046 -0.1875,0.4375 -0.18789,0.396562 -0.386962,0.696416 -0.53125,0.84375 -0.144288,0.147334 -0.181857,0.125 -0.1875,0.125 -0.0056,0 -0.07446,0.02233 -0.21875,-0.125 C 72.355712,88.946416 72.18789,88.646562 72,88.25 71.939809,88.12296 71.872486,87.961263 71.8125,87.8125 z"});define("SvgPaths/svgCompassRotationMarker",[],function(){"use strict";return"M 72.46875,22.03125 C 59.505873,22.050338 46.521615,27.004287 36.6875,36.875 L 47.84375,47.96875 C 61.521556,34.240041 83.442603,34.227389 97.125,47.90625 l 11.125,-11.125 C 98.401629,26.935424 85.431627,22.012162 72.46875,22.03125 z"});define("ViewModels/NavigationViewModel",["Cesium/Core/defined","Cesium/Core/Math","Cesium/Core/getTimestamp","Cesium/Core/EventHelper","Cesium/Core/Transforms","Cesium/Scene/SceneMode","Cesium/Core/Cartesian2","Cesium/Core/Cartesian3","Cesium/Core/Matrix4","Cesium/Core/BoundingSphere","Cesium/Core/HeadingPitchRange","KnockoutES5","Core/loadView","ViewModels/ResetViewNavigationControl","ViewModels/ZoomNavigationControl","SvgPaths/svgCompassOuterRing","SvgPaths/svgCompassGyro","SvgPaths/svgCompassRotationMarker","Core/Utils"],function(defined,CesiumMath,getTimestamp,EventHelper,Transforms,SceneMode,Cartesian2,Cartesian3,Matrix4,BoundingSphere,HeadingPitchRange,Knockout,loadView,ResetViewNavigationControl,ZoomNavigationControl,svgCompassOuterRing,svgCompassGyro,svgCompassRotationMarker,Utils){"use strict";var NavigationViewModel=function(options){this.terria=options.terria;this.eventHelper=new EventHelper;this.controls=options.controls;if(!defined(this.controls)){this.controls=[new ZoomNavigationControl(this.terria,true),new ResetViewNavigationControl(this.terria),new ZoomNavigationControl(this.terria,false)]}this.svgCompassOuterRing=svgCompassOuterRing;this.svgCompassGyro=svgCompassGyro;this.svgCompassRotationMarker=svgCompassRotationMarker;this.showCompass=defined(this.terria);this.heading=this.showCompass?this.terria.scene.camera.heading:0;this.isOrbiting=false;this.orbitCursorAngle=0;this.orbitCursorOpacity=0;this.orbitLastTimestamp=0;this.orbitFrame=undefined;this.orbitIsLook=false;this.orbitMouseMoveFunction=undefined;this.orbitMouseUpFunction=undefined;this.isRotating=false;this.rotateInitialCursorAngle=undefined;this.rotateFrame=undefined;this.rotateIsLook=false;this.rotateMouseMoveFunction=undefined;this.rotateMouseUpFunction=undefined;this._unsubcribeFromPostRender=undefined;Knockout.track(this,["controls","showCompass","heading","isOrbiting","orbitCursorAngle","isRotating"]);var that=this;function widgetChange(){if(defined(that.terria)){if(that._unsubcribeFromPostRender){that._unsubcribeFromPostRender();that._unsubcribeFromPostRender=undefined}that.showCompass=true;that._unsubcribeFromPostRender=that.terria.scene.postRender.addEventListener(function(){that.heading=that.terria.scene.camera.heading})}else{if(that._unsubcribeFromPostRender){that._unsubcribeFromPostRender();that._unsubcribeFromPostRender=undefined}that.showCompass=false}}this.eventHelper.add(this.terria.afterWidgetChanged,widgetChange,this);widgetChange()};NavigationViewModel.prototype.destroy=function(){this.eventHelper.removeAll()};NavigationViewModel.prototype.show=function(container){var testing='
'+'
'+"
"+"
"+'
'+'
'+"
"+'";loadView(testing,container,this)};NavigationViewModel.prototype.add=function(control){this.controls.push(control)};NavigationViewModel.prototype.remove=function(control){this.controls.remove(control)};NavigationViewModel.prototype.isLastControl=function(control){return control===this.controls[this.controls.length-1]};var vectorScratch=new Cartesian2;NavigationViewModel.prototype.handleMouseDown=function(viewModel,e){var scene=this.terria.scene;if(scene.mode==SceneMode.MORPHING){return true}var compassElement=e.currentTarget;var compassRectangle=e.currentTarget.getBoundingClientRect();var maxDistance=compassRectangle.width/2;var center=new Cartesian2((compassRectangle.right-compassRectangle.left)/2,(compassRectangle.bottom-compassRectangle.top)/2);var clickLocation=new Cartesian2(e.clientX-compassRectangle.left,e.clientY-compassRectangle.top);var vector=Cartesian2.subtract(clickLocation,center,vectorScratch);var distanceFromCenter=Cartesian2.magnitude(vector);var distanceFraction=distanceFromCenter/maxDistance;var nominalTotalRadius=145;var norminalGyroRadius=50;if(distanceFractione;e++)n[o.left[e]]=[-1*t,0];for(e=0,i=o.right.length;i>e;e++)n[o.right[e]]=[t,0];for(e=0,i=o.down.length;i>e;e++)n[o.down[e]]=[0,t];for(e=0,i=o.up.length;i>e;e++)n[o.up[e]]=[0,-1*t]},_setZoomOffset:function(t){var e,i,n=this._zoomKeys={},o=this.keyCodes;for(e=0,i=o.zoomIn.length;i>e;e++)n[o.zoomIn[e]]=t;for(e=0,i=o.zoomOut.length;i>e;e++)n[o.zoomOut[e]]=-t},_addHooks:function(){o.DomEvent.on(e,"keydown",this._onKeyDown,this)},_removeHooks:function(){o.DomEvent.off(e,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){var e=t.keyCode,i=this._map;if(e in this._panKeys){if(i._panAnim&&i._panAnim._inProgress)return;i.panBy(this._panKeys[e]),i.options.maxBounds&&i.panInsideBounds(i.options.maxBounds)}else{if(!(e in this._zoomKeys))return;i.setZoom(i.getZoom()+this._zoomKeys[e])}o.DomEvent.stop(t)}}),o.Map.addInitHook("addHandler","keyboard",o.Map.Keyboard),o.Handler.MarkerDrag=o.Handler.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new o.Draggable(t,t)),this._draggable.on("dragstart",this._onDragStart,this).on("drag",this._onDrag,this).on("dragend",this._onDragEnd,this),this._draggable.enable(),o.DomUtil.addClass(this._marker._icon,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off("dragstart",this._onDragStart,this).off("drag",this._onDrag,this).off("dragend",this._onDragEnd,this),this._draggable.disable(),o.DomUtil.removeClass(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_onDragStart:function(){this._marker.closePopup().fire("movestart").fire("dragstart")},_onDrag:function(){var t=this._marker,e=t._shadow,i=o.DomUtil.getPosition(t._icon),n=t._map.layerPointToLatLng(i);e&&o.DomUtil.setPosition(e,i),t._latlng=n,t.fire("move",{latlng:n}).fire("drag")},_onDragEnd:function(t){this._marker.fire("moveend").fire("dragend",t)}}),o.Control=o.Class.extend({options:{position:"topright"},initialize:function(t){o.setOptions(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),n=t._controlCorners[i];return o.DomUtil.addClass(e,"leaflet-control"),-1!==i.indexOf("bottom")?n.insertBefore(e,n.firstChild):n.appendChild(e),this},removeFrom:function(t){var e=this.getPosition(),i=t._controlCorners[e];return i.removeChild(this._container),this._map=null,this.onRemove&&this.onRemove(t),this},_refocusOnMap:function(){this._map&&this._map.getContainer().focus()}}),o.control=function(t){return new o.Control(t)},o.Map.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.removeFrom(this),this},_initControlPos:function(){function t(t,s){var a=i+t+" "+i+s;e[t+s]=o.DomUtil.create("div",a,n)}var e=this._controlCorners={},i="leaflet-",n=this._controlContainer=o.DomUtil.create("div",i+"control-container",this._container);t("top","left"),t("top","right"),t("bottom","left"),t("bottom","right")},_clearControlPos:function(){this._container.removeChild(this._controlContainer)}}),o.Control.Zoom=o.Control.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"-",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=o.DomUtil.create("div",e+" leaflet-bar");return this._map=t,this._zoomInButton=this._createButton(this.options.zoomInText,this.options.zoomInTitle,e+"-in",i,this._zoomIn,this),this._zoomOutButton=this._createButton(this.options.zoomOutText,this.options.zoomOutTitle,e+"-out",i,this._zoomOut,this),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},_zoomIn:function(t){this._map.zoomIn(t.shiftKey?3:1)},_zoomOut:function(t){this._map.zoomOut(t.shiftKey?3:1)},_createButton:function(t,e,i,n,s,a){var r=o.DomUtil.create("a",i,n);r.innerHTML=t,r.href="#",r.title=e;var h=o.DomEvent.stopPropagation;return o.DomEvent.on(r,"click",h).on(r,"mousedown",h).on(r,"dblclick",h).on(r,"click",o.DomEvent.preventDefault).on(r,"click",s,a).on(r,"click",this._refocusOnMap,a),r},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";o.DomUtil.removeClass(this._zoomInButton,e),o.DomUtil.removeClass(this._zoomOutButton,e),t._zoom===t.getMinZoom()&&o.DomUtil.addClass(this._zoomOutButton,e),t._zoom===t.getMaxZoom()&&o.DomUtil.addClass(this._zoomInButton,e)}}),o.Map.mergeOptions({zoomControl:!0}),o.Map.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new o.Control.Zoom,this.addControl(this.zoomControl))}),o.control.zoom=function(t){return new o.Control.Zoom(t)},o.Control.Attribution=o.Control.extend({options:{position:"bottomright",prefix:'Leaflet'},initialize:function(t){o.setOptions(this,t),this._attributions={}},onAdd:function(t){this._container=o.DomUtil.create("div","leaflet-control-attribution"),o.DomEvent.disableClickPropagation(this._container);for(var e in t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return t.on("layeradd",this._onLayerAdd,this).on("layerremove",this._onLayerRemove,this),this._update(),this._container},onRemove:function(t){t.off("layeradd",this._onLayerAdd).off("layerremove",this._onLayerRemove)},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):void 0},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):void 0},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(" | ")}},_onLayerAdd:function(t){t.layer.getAttribution&&this.addAttribution(t.layer.getAttribution())},_onLayerRemove:function(t){t.layer.getAttribution&&this.removeAttribution(t.layer.getAttribution())}}),o.Map.mergeOptions({attributionControl:!0}),o.Map.addInitHook(function(){this.options.attributionControl&&(this.attributionControl=(new o.Control.Attribution).addTo(this))}),o.control.attribution=function(t){return new o.Control.Attribution(t)},o.Control.Scale=o.Control.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0,updateWhenIdle:!1},onAdd:function(t){this._map=t;var e="leaflet-control-scale",i=o.DomUtil.create("div",e),n=this.options;return this._addScales(n,e,i),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=o.DomUtil.create("div",e+"-line",i)),t.imperial&&(this._iScale=o.DomUtil.create("div",e+"-line",i))},_update:function(){var t=this._map.getBounds(),e=t.getCenter().lat,i=6378137*Math.PI*Math.cos(e*Math.PI/180),n=i*(t.getNorthEast().lng-t.getSouthWest().lng)/180,o=this._map.getSize(),s=this.options,a=0;o.x>0&&(a=n*(s.maxWidth/o.x)),this._updateScales(s,a)},_updateScales:function(t,e){t.metric&&e&&this._updateMetric(e),t.imperial&&e&&this._updateImperial(e)},_updateMetric:function(t){var e=this._getRoundNum(t);this._mScale.style.width=this._getScaleWidth(e/t)+"px",this._mScale.innerHTML=1e3>e?e+" m":e/1e3+" km"},_updateImperial:function(t){var e,i,n,o=3.2808399*t,s=this._iScale;o>5280?(e=o/5280,i=this._getRoundNum(e),s.style.width=this._getScaleWidth(i/e)+"px",s.innerHTML=i+" mi"):(n=this._getRoundNum(o),s.style.width=this._getScaleWidth(n/o)+"px",s.innerHTML=n+" ft")},_getScaleWidth:function(t){return Math.round(this.options.maxWidth*t)-10},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),i=t/e;return i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:1,e*i}}),o.control.scale=function(t){return new o.Control.Scale(t)},o.Control.Layers=o.Control.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0},initialize:function(t,e,i){o.setOptions(this,i),this._layers={},this._lastZIndex=0,this._handlingClick=!1;for(var n in t)this._addLayer(t[n],n);for(n in e)this._addLayer(e[n],n,!0)},onAdd:function(t){return this._initLayout(),this._update(),t.on("layeradd",this._onLayerChange,this).on("layerremove",this._onLayerChange,this),this._container},onRemove:function(t){t.off("layeradd",this._onLayerChange,this).off("layerremove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._update(),this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._update(),this},removeLayer:function(t){var e=o.stamp(t);return delete this._layers[e],this._update(),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=o.DomUtil.create("div",t);e.setAttribute("aria-haspopup",!0),o.Browser.touch?o.DomEvent.on(e,"click",o.DomEvent.stopPropagation):o.DomEvent.disableClickPropagation(e).disableScrollPropagation(e);var i=this._form=o.DomUtil.create("form",t+"-list");if(this.options.collapsed){o.Browser.android||o.DomEvent.on(e,"mouseover",this._expand,this).on(e,"mouseout",this._collapse,this);var n=this._layersLink=o.DomUtil.create("a",t+"-toggle",e);n.href="#",n.title="Layers",o.Browser.touch?o.DomEvent.on(n,"click",o.DomEvent.stop).on(n,"click",this._expand,this):o.DomEvent.on(n,"focus",this._expand,this),o.DomEvent.on(i,"click",function(){setTimeout(o.bind(this._onInputClick,this),0)},this),this._map.on("click",this._collapse,this)}else this._expand();this._baseLayersList=o.DomUtil.create("div",t+"-base",i),this._separator=o.DomUtil.create("div",t+"-separator",i),this._overlaysList=o.DomUtil.create("div",t+"-overlays",i),e.appendChild(i)},_addLayer:function(t,e,i){var n=o.stamp(t);this._layers[n]={layer:t,name:e,overlay:i},this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex))},_update:function(){if(this._container){this._baseLayersList.innerHTML="",this._overlaysList.innerHTML="";var t,e,i=!1,n=!1;for(t in this._layers)e=this._layers[t],this._addItem(e),n=n||e.overlay,i=i||!e.overlay;this._separator.style.display=n&&i?"":"none"}},_onLayerChange:function(t){var e=this._layers[o.stamp(t.layer)];if(e){this._handlingClick||this._update();var i=e.overlay?"layeradd"===t.type?"overlayadd":"overlayremove":"layeradd"===t.type?"baselayerchange":null;i&&this._map.fire(i,e)}},_createRadioElement:function(t,i){var n='t;t++)e=n[t],i=this._layers[e.layerId],e.checked&&!this._map.hasLayer(i.layer)?this._map.addLayer(i.layer):!e.checked&&this._map.hasLayer(i.layer)&&this._map.removeLayer(i.layer);this._handlingClick=!1,this._refocusOnMap()},_expand:function(){o.DomUtil.addClass(this._container,"leaflet-control-layers-expanded")},_collapse:function(){this._container.className=this._container.className.replace(" leaflet-control-layers-expanded","")}}),o.control.layers=function(t,e,i){return new o.Control.Layers(t,e,i)},o.PosAnimation=o.Class.extend({includes:o.Mixin.Events,run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._newPos=e,this.fire("start"),t.style[o.DomUtil.TRANSITION]="all "+(i||.25)+"s cubic-bezier(0,0,"+(n||.5)+",1)",o.DomEvent.on(t,o.DomUtil.TRANSITION_END,this._onTransitionEnd,this),o.DomUtil.setPosition(t,e),o.Util.falseFn(t.offsetWidth),this._stepTimer=setInterval(o.bind(this._onStep,this),50)},stop:function(){this._inProgress&&(o.DomUtil.setPosition(this._el,this._getPos()),this._onTransitionEnd(),o.Util.falseFn(this._el.offsetWidth))},_onStep:function(){var t=this._getPos();return t?(this._el._leaflet_pos=t,void this.fire("step")):void this._onTransitionEnd()},_transformRe:/([-+]?(?:\d*\.)?\d+)\D*, ([-+]?(?:\d*\.)?\d+)\D*\)/,_getPos:function(){var e,i,n,s=this._el,a=t.getComputedStyle(s);if(o.Browser.any3d){if(n=a[o.DomUtil.TRANSFORM].match(this._transformRe),!n)return;e=parseFloat(n[1]),i=parseFloat(n[2])}else e=parseFloat(a.left),i=parseFloat(a.top);return new o.Point(e,i,!0)},_onTransitionEnd:function(){o.DomEvent.off(this._el,o.DomUtil.TRANSITION_END,this._onTransitionEnd,this),this._inProgress&&(this._inProgress=!1,this._el.style[o.DomUtil.TRANSITION]="",this._el._leaflet_pos=this._newPos,clearInterval(this._stepTimer),this.fire("step").fire("end"))}}),o.Map.include({setView:function(t,e,n){if(e=e===i?this._zoom:this._limitZoom(e),t=this._limitCenter(o.latLng(t),e,this.options.maxBounds),n=n||{},this._panAnim&&this._panAnim.stop(),this._loaded&&!n.reset&&n!==!0){n.animate!==i&&(n.zoom=o.extend({animate:n.animate},n.zoom),n.pan=o.extend({animate:n.animate},n.pan));var s=this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,n.zoom):this._tryAnimatedPan(t,n.pan);if(s)return clearTimeout(this._sizeTimer),this}return this._resetView(t,e),this},panBy:function(t,e){if(t=o.point(t).round(),e=e||{},!t.x&&!t.y)return this;if(this._panAnim||(this._panAnim=new o.PosAnimation,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),e.animate!==!1){o.DomUtil.addClass(this._mapPane,"leaflet-pan-anim");var i=this._getMapPanePos().subtract(t);this._panAnim.run(this._mapPane,i,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){o.DomUtil.removeClass(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._floor();return(e&&e.animate)===!0||this.getSize().contains(i)?(this.panBy(i,e),!0):!1}}),o.PosAnimation=o.DomUtil.TRANSITION?o.PosAnimation:o.PosAnimation.extend({run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=o.DomUtil.getPosition(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(),this._complete())},_animate:function(){this._animId=o.Util.requestAnimFrame(this._animate,this),this._step()},_step:function(){var t=+new Date-this._startTime,e=1e3*this._duration;e>t?this._runFrame(this._easeOut(t/e)):(this._runFrame(1),this._complete())},_runFrame:function(t){var e=this._startPos.add(this._offset.multiplyBy(t));o.DomUtil.setPosition(this._el,e),this.fire("step")},_complete:function(){o.Util.cancelAnimFrame(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),o.Map.mergeOptions({zoomAnimation:!0,zoomAnimationThreshold:4}),o.DomUtil.TRANSITION&&o.Map.addInitHook(function(){this._zoomAnimated=this.options.zoomAnimation&&o.DomUtil.TRANSITION&&o.Browser.any3d&&!o.Browser.android23&&!o.Browser.mobileOpera,this._zoomAnimated&&o.DomEvent.on(this._mapPane,o.DomUtil.TRANSITION_END,this._catchTransitionEnd,this)}),o.Map.include(o.DomUtil.TRANSITION?{_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||i.animate===!1||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/n),s=this._getCenterLayerPoint()._add(o);return i.animate===!0||this.getSize().contains(o)?(this.fire("movestart").fire("zoomstart"),this._animateZoom(t,e,s,n,null,!0),!0):!1},_animateZoom:function(t,e,i,n,s,a,r){r||(this._animatingZoom=!0),o.DomUtil.addClass(this._mapPane,"leaflet-zoom-anim"),this._animateToCenter=t,this._animateToZoom=e,o.Draggable&&(o.Draggable._disabled=!0),o.Util.requestAnimFrame(function(){this.fire("zoomanim",{center:t,zoom:e,origin:i,scale:n,delta:s,backwards:a}),setTimeout(o.bind(this._onZoomTransitionEnd,this),250)},this)},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._animatingZoom=!1,o.DomUtil.removeClass(this._mapPane,"leaflet-zoom-anim"),o.Util.requestAnimFrame(function(){this._resetView(this._animateToCenter,this._animateToZoom,!0,!0),o.Draggable&&(o.Draggable._disabled=!1)},this))}}:{}),o.TileLayer.include({_animateZoom:function(t){this._animating||(this._animating=!0,this._prepareBgBuffer());var e=this._bgBuffer,i=o.DomUtil.TRANSFORM,n=t.delta?o.DomUtil.getTranslateString(t.delta):e.style[i],s=o.DomUtil.getScaleString(t.scale,t.origin);e.style[i]=t.backwards?s+" "+n:n+" "+s},_endZoomAnim:function(){var t=this._tileContainer,e=this._bgBuffer;t.style.visibility="",t.parentNode.appendChild(t),o.Util.falseFn(e.offsetWidth);var i=this._map.getZoom();(i>this.options.maxZoom||i.5&&.5>n?(t.style.visibility="hidden",void this._stopLoadingImages(t)):(e.style.visibility="hidden",e.style[o.DomUtil.TRANSFORM]="",this._tileContainer=e,e=this._bgBuffer=t,this._stopLoadingImages(e),void clearTimeout(this._clearBgBufferTimer))},_getLoadedTilesPercentage:function(t){var e,i,n=t.getElementsByTagName("img"),o=0;for(e=0,i=n.length;i>e;e++)n[e].complete&&o++;return o/i},_stopLoadingImages:function(t){var e,i,n,s=Array.prototype.slice.call(t.getElementsByTagName("img"));for(e=0,i=s.length;i>e;e++)n=s[e],n.complete||(n.onload=o.Util.falseFn,n.onerror=o.Util.falseFn,n.src=o.Util.emptyImageUrl,n.parentNode.removeChild(n))}}),o.Map.include({_defaultLocateOptions:{watch:!1,setView:!1,maxZoom:1/0,timeout:1e4,maximumAge:0,enableHighAccuracy:!1},locate:function(t){if(t=this._locateOptions=o.extend(this._defaultLocateOptions,t),!navigator.geolocation)return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=o.bind(this._handleGeolocationResponse,this),i=o.bind(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e=t.code,i=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+i+"."})},_handleGeolocationResponse:function(t){var e=t.coords.latitude,i=t.coords.longitude,n=new o.LatLng(e,i),s=180*t.coords.accuracy/40075017,a=s/Math.cos(o.LatLng.DEG_TO_RAD*e),r=o.latLngBounds([e-s,i-a],[e+s,i+a]),h=this._locateOptions;if(h.setView){var l=Math.min(this.getBoundsZoom(r),h.maxZoom);this.setView(n,l)}var u={latlng:n,bounds:r,timestamp:t.timestamp};for(var c in t.coords)"number"==typeof t.coords[c]&&(u[c]=t.coords[c]);this.fire("locationfound",u)}})}(window,document);define("ViewModels/DistanceLegendViewModel",["Cesium/Core/defined","Cesium/Core/DeveloperError","Cesium/Core/EllipsoidGeodesic","Cesium/Core/Cartesian2","Cesium/Core/getTimestamp","Cesium/Core/EventHelper","KnockoutES5","Core/loadView","leaflet"],function(defined,DeveloperError,EllipsoidGeodesic,Cartesian2,getTimestamp,EventHelper,Knockout,loadView,leaflet){"use strict";var DistanceLegendViewModel=function(options){if(!defined(options)||!defined(options.terria)){throw new DeveloperError("options.terria is required.")}this.terria=options.terria;this._removeSubscription=undefined;this._lastLegendUpdate=undefined;this.eventHelper=new EventHelper;this.distanceLabel=undefined;this.barWidth=undefined;Knockout.track(this,["distanceLabel","barWidth"]);this.eventHelper.add(this.terria.afterWidgetChanged,function(){if(defined(this._removeSubscription)){this._removeSubscription();this._removeSubscription=undefined}},this);var that=this;function addUpdateSubscription(){if(defined(that.terria)){var scene=that.terria.scene;that._removeSubscription=scene.postRender.addEventListener(function(){updateDistanceLegendCesium(this,scene)},that)}else if(defined(that.terria.leaflet)){var map=that.terria.leaflet.map;var potentialChangeCallback=function potentialChangeCallback(){updateDistanceLegendLeaflet(that,map)};that._removeSubscription=function(){map.off("zoomend",potentialChangeCallback);map.off("moveend",potentialChangeCallback)};map.on("zoomend",potentialChangeCallback);map.on("moveend",potentialChangeCallback);updateDistanceLegendLeaflet(that,map)}}addUpdateSubscription();this.eventHelper.add(this.terria.afterWidgetChanged,function(){addUpdateSubscription()},this)};DistanceLegendViewModel.prototype.destroy=function(){this.eventHelper.removeAll()};DistanceLegendViewModel.prototype.show=function(container){var testing='
'+'
'+"
"+"
";loadView(testing,container,this)};DistanceLegendViewModel.create=function(options){var result=new DistanceLegendViewModel(options);result.show(options.container);return result};var geodesic=new EllipsoidGeodesic;var distances=[1,2,3,5,10,20,30,50,100,200,300,500,1e3,2e3,3e3,5e3,1e4,2e4,3e4,5e4,1e5,2e5,3e5,5e5,1e6,2e6,3e6,5e6,1e7,2e7,3e7,5e7];function updateDistanceLegendCesium(viewModel,scene){var now=getTimestamp();if(now=0;--i){if(distances[i]/pixelDistance=1e3){label=(distance/1e3).toString()+" km"}else{label=distance.toString()+" m"}viewModel.barWidth=distance/pixelDistance|0;viewModel.distanceLabel=label}else{viewModel.barWidth=undefined;viewModel.distanceLabel=undefined}}function updateDistanceLegendLeaflet(viewModel,map){var halfHeight=map.getSize().y/2;var maxPixelWidth=100;var maxMeters=map.containerPointToLatLng([0,halfHeight]).distanceTo(map.containerPointToLatLng([maxPixelWidth,halfHeight]));var meters=leaflet.control.scale()._getRoundNum(maxMeters);var label=meters<1e3?meters+" m":meters/1e3+" km";viewModel.barWidth=meters/maxMeters*maxPixelWidth;viewModel.distanceLabel=label}return DistanceLegendViewModel});define("ViewModels/UserInterfaceControl",["Cesium/Core/defined","Cesium/Core/defineProperties","Cesium/Core/DeveloperError","KnockoutES5"],function(defined,defineProperties,DeveloperError,Knockout){"use strict";var UserInterfaceControl=function(terria){if(!defined(terria)){throw new DeveloperError("terria is required")}this._terria=terria;this.name="Unnamed Control";this.text=undefined;this.svgIcon=undefined;this.svgHeight=undefined;this.svgWidth=undefined;this.cssClass=undefined;this.isActive=false;Knockout.track(this,["name","svgIcon","svgHeight","svgWidth","cssClass","isActive"])};defineProperties(UserInterfaceControl.prototype,{terria:{get:function(){return this._terria}},hasText:{get:function(){return defined(this.text)&&typeof this.text==="string"}}});UserInterfaceControl.prototype.activate=function(){throw new DeveloperError("activate must be implemented in the derived class.")};return UserInterfaceControl});define("ViewModels/NavigationControl",["ViewModels/UserInterfaceControl"],function(UserInterfaceControl){"use strict";var NavigationControl=function(terria){UserInterfaceControl.apply(this,arguments)};NavigationControl.prototype=Object.create(UserInterfaceControl.prototype);return NavigationControl});define("SvgPaths/svgReset",[],function(){"use strict";return"M 7.5,0 C 3.375,0 0,3.375 0,7.5 0,11.625 3.375,15 7.5,15 c 3.46875,0 6.375,-2.4375 7.21875,-5.625 l -1.96875,0 C 12,11.53125 9.9375,13.125 7.5,13.125 4.40625,13.125 1.875,10.59375 1.875,7.5 1.875,4.40625 4.40625,1.875 7.5,1.875 c 1.59375,0 2.90625,0.65625 3.9375,1.6875 l -3,3 6.5625,0 L 15,0 12.75,2.25 C 11.4375,0.84375 9.5625,0 7.5,0 z"});define("ViewModels/ResetViewNavigationControl",["Cesium/Core/defined","Cesium/Scene/Camera","ViewModels/NavigationControl","SvgPaths/svgReset"],function(defined,Camera,NavigationControl,svgReset){"use strict";var ResetViewNavigationControl=function(terria){NavigationControl.apply(this,arguments);this.name="Reset View";this.svgIcon=svgReset;this.svgHeight=15;this.svgWidth=15;this.cssClass="navigation-control-icon-reset"};ResetViewNavigationControl.prototype=Object.create(NavigationControl.prototype);ResetViewNavigationControl.prototype.resetView=function(){var scene=this.terria.scene;var sscc=scene.screenSpaceCameraController;if(!sscc.enableInputs){return}this.isActive=true;var camera=scene.camera;if(defined(this.terria.trackedEntity)){var trackedEntity=this.terria.trackedEntity;this.terria.trackedEntity=undefined;this.terria.trackedEntity=trackedEntity}else{if(this.terria.options.defaultResetView){if(this.terria.options.defaultResetView&&this.terria.options.defaultResetView instanceof Cesium.Cartographic){camera.flyTo({destination:Cesium.Ellipsoid.WGS84.cartographicToCartesian(this.terria.options.defaultResetView)})}else if(this.terria.options.defaultResetView&&this.terria.options.defaultResetView instanceof Cesium.Rectangle){try{Cesium.Rectangle.validate(this.terria.options.defaultResetView);camera.flyTo({destination:this.terria.options.defaultResetView})}catch(e){console.log("Cesium-navigation/ResetViewNavigationControl: options.defaultResetView Cesium rectangle is invalid!")}}}else if(typeof camera.flyHome==="function"){camera.flyHome(1)}else{camera.flyTo({destination:Camera.DEFAULT_VIEW_RECTANGLE,duration:1})}}this.isActive=false};ResetViewNavigationControl.prototype.activate=function(){this.resetView()};return ResetViewNavigationControl});define("Core/Utils",["Cesium/Core/defined","Cesium/Core/Ray","Cesium/Core/Cartesian3","Cesium/Core/Cartographic","Cesium/Core/ReferenceFrame","Cesium/Scene/SceneMode"],function(defined,Ray,Cartesian3,Cartographic,ReferenceFrame,SceneMode){"use strict";var Utils={};var unprojectedScratch=new Cartographic;var rayScratch=new Ray;Utils.getCameraFocus=function(terria,inWorldCoordinates,result){var scene=terria.scene;var camera=scene.camera;if(scene.mode==SceneMode.MORPHING){return undefined}if(!defined(result)){result=new Cartesian3}if(defined(terria.trackedEntity)){result=terria.trackedEntity.position.getValue(terria.clock.currentTime,result)}else{rayScratch.origin=camera.positionWC;rayScratch.direction=camera.directionWC;result=scene.globe.pick(rayScratch,scene,result)}if(!defined(result)){return undefined}if(scene.mode==SceneMode.SCENE2D||scene.mode==SceneMode.COLUMBUS_VIEW){result=camera.worldToCameraCoordinatesPoint(result,result);if(inWorldCoordinates){result=scene.globe.ellipsoid.cartographicToCartesian(scene.mapProjection.unproject(result,unprojectedScratch),result)}}else{if(!inWorldCoordinates){result=camera.worldToCameraCoordinatesPoint(result,result)}}return result};return Utils});define("ViewModels/ZoomNavigationControl",["Cesium/Core/defined","Cesium/Core/Ray","Cesium/Core/IntersectionTests","Cesium/Core/Cartesian3","Cesium/Scene/SceneMode","ViewModels/NavigationControl","Core/Utils"],function(defined,Ray,IntersectionTests,Cartesian3,SceneMode,NavigationControl,Utils){"use strict";var ZoomNavigationControl=function(terria,zoomIn){NavigationControl.apply(this,arguments);this.name="Zoom "+(zoomIn?"In":"Out");this.text=zoomIn?"+":"-";this.cssClass="navigation-control-icon-zoom-"+(zoomIn?"in":"out");this.relativeAmount=2;if(zoomIn){this.relativeAmount=1/this.relativeAmount}};ZoomNavigationControl.prototype.relativeAmount=1;ZoomNavigationControl.prototype=Object.create(NavigationControl.prototype);ZoomNavigationControl.prototype.activate=function(){this.zoom(this.relativeAmount)};var cartesian3Scratch=new Cartesian3;ZoomNavigationControl.prototype.zoom=function(relativeAmount){this.isActive=true;if(defined(this.terria)){var scene=this.terria.scene;var sscc=scene.screenSpaceCameraController;if(!sscc.enableInputs||!sscc.enableZoom){return}var camera=scene.camera;var orientation;switch(scene.mode){case SceneMode.MORPHING:break;case SceneMode.SCENE2D:camera.zoomIn(camera.positionCartographic.height*(1-this.relativeAmount));break;default:var focus;if(defined(this.terria.trackedEntity)){focus=new Cartesian3}else{focus=Utils.getCameraFocus(this.terria,false)}if(!defined(focus)){var ray=new Ray(camera.worldToCameraCoordinatesPoint(scene.globe.ellipsoid.cartographicToCartesian(camera.positionCartographic)),camera.directionWC);focus=IntersectionTests.grazingAltitudeLocation(ray,scene.globe.ellipsoid);orientation={heading:camera.heading,pitch:camera.pitch,roll:camera.roll}}else{orientation={direction:camera.direction,up:camera.up}}var direction=Cartesian3.subtract(camera.position,focus,cartesian3Scratch);var movementVector=Cartesian3.multiplyByScalar(direction,relativeAmount,direction);var endPosition=Cartesian3.add(focus,movementVector,focus); +if(defined(this.terria.trackedEntity)||scene.mode==SceneMode.COLUMBUS_VIEW){camera.position=endPosition}else{camera.flyTo({destination:endPosition,orientation:orientation,duration:.5,convert:false})}}}this.isActive=false};return ZoomNavigationControl});define("SvgPaths/svgCompassOuterRing",[],function(){"use strict";return"m 66.5625,0 0,15.15625 3.71875,0 0,-10.40625 5.5,10.40625 4.375,0 0,-15.15625 -3.71875,0 0,10.40625 L 70.9375,0 66.5625,0 z M 72.5,20.21875 c -28.867432,0 -52.28125,23.407738 -52.28125,52.28125 0,28.87351 23.413818,52.3125 52.28125,52.3125 28.86743,0 52.28125,-23.43899 52.28125,-52.3125 0,-28.873512 -23.41382,-52.28125 -52.28125,-52.28125 z m 0,1.75 c 13.842515,0 26.368948,5.558092 35.5,14.5625 l -11.03125,11 0.625,0.625 11.03125,-11 c 8.9199,9.108762 14.4375,21.579143 14.4375,35.34375 0,13.764606 -5.5176,26.22729 -14.4375,35.34375 l -11.03125,-11 -0.625,0.625 11.03125,11 c -9.130866,9.01087 -21.658601,14.59375 -35.5,14.59375 -13.801622,0 -26.321058,-5.53481 -35.4375,-14.5 l 11.125,-11.09375 c 6.277989,6.12179 14.857796,9.90625 24.3125,9.90625 19.241896,0 34.875,-15.629154 34.875,-34.875 0,-19.245847 -15.633104,-34.84375 -34.875,-34.84375 -9.454704,0 -18.034511,3.760884 -24.3125,9.875 L 37.0625,36.4375 C 46.179178,27.478444 58.696991,21.96875 72.5,21.96875 z m -0.875,0.84375 0,13.9375 1.75,0 0,-13.9375 -1.75,0 z M 36.46875,37.0625 47.5625,48.15625 C 41.429794,54.436565 37.65625,63.027539 37.65625,72.5 c 0,9.472461 3.773544,18.055746 9.90625,24.34375 L 36.46875,107.9375 c -8.96721,-9.1247 -14.5,-21.624886 -14.5,-35.4375 0,-13.812615 5.53279,-26.320526 14.5,-35.4375 z M 72.5,39.40625 c 18.297686,0 33.125,14.791695 33.125,33.09375 0,18.302054 -14.827314,33.125 -33.125,33.125 -18.297687,0 -33.09375,-14.822946 -33.09375,-33.125 0,-18.302056 14.796063,-33.09375 33.09375,-33.09375 z M 22.84375,71.625 l 0,1.75 13.96875,0 0,-1.75 -13.96875,0 z m 85.5625,0 0,1.75 14,0 0,-1.75 -14,0 z M 71.75,108.25 l 0,13.9375 1.71875,0 0,-13.9375 -1.71875,0 z"});define("SvgPaths/svgCompassGyro",[],function(){"use strict";return"m 72.71875,54.375 c -0.476702,0 -0.908208,0.245402 -1.21875,0.5625 -0.310542,0.317098 -0.551189,0.701933 -0.78125,1.1875 -0.172018,0.363062 -0.319101,0.791709 -0.46875,1.25 -6.91615,1.075544 -12.313231,6.656514 -13,13.625 -0.327516,0.117495 -0.661877,0.244642 -0.9375,0.375 -0.485434,0.22959 -0.901634,0.471239 -1.21875,0.78125 -0.317116,0.310011 -0.5625,0.742111 -0.5625,1.21875 l 0.03125,0 c 0,0.476639 0.245384,0.877489 0.5625,1.1875 0.317116,0.310011 0.702066,0.58291 1.1875,0.8125 0.35554,0.168155 0.771616,0.32165 1.21875,0.46875 1.370803,6.10004 6.420817,10.834127 12.71875,11.8125 0.146999,0.447079 0.30025,0.863113 0.46875,1.21875 0.230061,0.485567 0.470708,0.870402 0.78125,1.1875 0.310542,0.317098 0.742048,0.5625 1.21875,0.5625 0.476702,0 0.876958,-0.245402 1.1875,-0.5625 0.310542,-0.317098 0.582439,-0.701933 0.8125,-1.1875 0.172018,-0.363062 0.319101,-0.791709 0.46875,-1.25 6.249045,-1.017063 11.256351,-5.7184 12.625,-11.78125 0.447134,-0.1471 0.86321,-0.300595 1.21875,-0.46875 0.485434,-0.22959 0.901633,-0.502489 1.21875,-0.8125 0.317117,-0.310011 0.5625,-0.710861 0.5625,-1.1875 l -0.03125,0 c 0,-0.476639 -0.245383,-0.908739 -0.5625,-1.21875 C 89.901633,71.846239 89.516684,71.60459 89.03125,71.375 88.755626,71.244642 88.456123,71.117495 88.125,71 87.439949,64.078341 82.072807,58.503735 75.21875,57.375 c -0.15044,-0.461669 -0.326927,-0.884711 -0.5,-1.25 -0.230061,-0.485567 -0.501958,-0.870402 -0.8125,-1.1875 -0.310542,-0.317098 -0.710798,-0.5625 -1.1875,-0.5625 z m -0.0625,1.40625 c 0.03595,-0.01283 0.05968,0 0.0625,0 0.0056,0 0.04321,-0.02233 0.1875,0.125 0.144288,0.147334 0.34336,0.447188 0.53125,0.84375 0.06385,0.134761 0.123901,0.309578 0.1875,0.46875 -0.320353,-0.01957 -0.643524,-0.0625 -0.96875,-0.0625 -0.289073,0 -0.558569,0.04702 -0.84375,0.0625 C 71.8761,57.059578 71.936151,56.884761 72,56.75 c 0.18789,-0.396562 0.355712,-0.696416 0.5,-0.84375 0.07214,-0.07367 0.120304,-0.112167 0.15625,-0.125 z m 0,2.40625 c 0.448007,0 0.906196,0.05436 1.34375,0.09375 0.177011,0.592256 0.347655,1.271044 0.5,2.03125 0.475097,2.370753 0.807525,5.463852 0.9375,8.9375 -0.906869,-0.02852 -1.834463,-0.0625 -2.78125,-0.0625 -0.92298,0 -1.802327,0.03537 -2.6875,0.0625 0.138529,-3.473648 0.493653,-6.566747 0.96875,-8.9375 0.154684,-0.771878 0.320019,-1.463985 0.5,-2.0625 0.405568,-0.03377 0.804291,-0.0625 1.21875,-0.0625 z m -2.71875,0.28125 c -0.129732,0.498888 -0.259782,0.987558 -0.375,1.5625 -0.498513,2.487595 -0.838088,5.693299 -0.96875,9.25 -3.21363,0.15162 -6.119596,0.480068 -8.40625,0.9375 -0.682394,0.136509 -1.275579,0.279657 -1.84375,0.4375 0.799068,-6.135482 5.504716,-11.036454 11.59375,-12.1875 z M 75.5,58.5 c 6.043169,1.18408 10.705093,6.052712 11.5,12.15625 -0.569435,-0.155806 -1.200273,-0.302525 -1.875,-0.4375 -2.262525,-0.452605 -5.108535,-0.783809 -8.28125,-0.9375 -0.130662,-3.556701 -0.470237,-6.762405 -0.96875,-9.25 C 75.761959,59.467174 75.626981,58.990925 75.5,58.5 z m -2.84375,12.09375 c 0.959338,0 1.895843,0.03282 2.8125,0.0625 C 75.48165,71.267751 75.5,71.871028 75.5,72.5 c 0,1.228616 -0.01449,2.438313 -0.0625,3.59375 -0.897358,0.0284 -1.811972,0.0625 -2.75,0.0625 -0.927373,0 -1.831062,-0.03473 -2.71875,-0.0625 -0.05109,-1.155437 -0.0625,-2.365134 -0.0625,-3.59375 0,-0.628972 0.01741,-1.232249 0.03125,-1.84375 0.895269,-0.02827 1.783025,-0.0625 2.71875,-0.0625 z M 68.5625,70.6875 c -0.01243,0.60601 -0.03125,1.189946 -0.03125,1.8125 0,1.22431 0.01541,2.407837 0.0625,3.5625 -3.125243,-0.150329 -5.92077,-0.471558 -8.09375,-0.90625 -0.784983,-0.157031 -1.511491,-0.316471 -2.125,-0.5 -0.107878,-0.704096 -0.1875,-1.422089 -0.1875,-2.15625 0,-0.115714 0.02849,-0.228688 0.03125,-0.34375 0.643106,-0.20284 1.389577,-0.390377 2.25,-0.5625 2.166953,-0.433487 4.97905,-0.75541 8.09375,-0.90625 z m 8.3125,0.03125 c 3.075121,0.15271 5.824455,0.446046 7.96875,0.875 0.857478,0.171534 1.630962,0.360416 2.28125,0.5625 0.0027,0.114659 0,0.228443 0,0.34375 0,0.735827 -0.07914,1.450633 -0.1875,2.15625 -0.598568,0.180148 -1.29077,0.34562 -2.0625,0.5 -2.158064,0.431708 -4.932088,0.754666 -8.03125,0.90625 0.04709,-1.154663 0.0625,-2.33819 0.0625,-3.5625 0,-0.611824 -0.01924,-1.185379 -0.03125,-1.78125 z M 57.15625,72.5625 c 0.0023,0.572772 0.06082,1.131112 0.125,1.6875 -0.125327,-0.05123 -0.266577,-0.10497 -0.375,-0.15625 -0.396499,-0.187528 -0.665288,-0.387337 -0.8125,-0.53125 -0.147212,-0.143913 -0.15625,-0.182756 -0.15625,-0.1875 0,-0.0047 -0.02221,-0.07484 0.125,-0.21875 0.147212,-0.143913 0.447251,-0.312472 0.84375,-0.5 0.07123,-0.03369 0.171867,-0.06006 0.25,-0.09375 z m 31.03125,0 c 0.08201,0.03503 0.175941,0.05872 0.25,0.09375 0.396499,0.187528 0.665288,0.356087 0.8125,0.5 0.14725,0.14391 0.15625,0.21405 0.15625,0.21875 0,0.0047 -0.009,0.04359 -0.15625,0.1875 -0.147212,0.143913 -0.416001,0.343722 -0.8125,0.53125 -0.09755,0.04613 -0.233314,0.07889 -0.34375,0.125 0.06214,-0.546289 0.09144,-1.094215 0.09375,-1.65625 z m -29.5,3.625 c 0.479308,0.123125 0.983064,0.234089 1.53125,0.34375 2.301781,0.460458 5.229421,0.787224 8.46875,0.9375 0.167006,2.84339 0.46081,5.433176 0.875,7.5 0.115218,0.574942 0.245268,1.063612 0.375,1.5625 -5.463677,-1.028179 -9.833074,-5.091831 -11.25,-10.34375 z m 27.96875,0 C 85.247546,81.408945 80.919274,85.442932 75.5,86.5 c 0.126981,-0.490925 0.261959,-0.967174 0.375,-1.53125 0.41419,-2.066824 0.707994,-4.65661 0.875,-7.5 3.204493,-0.15162 6.088346,-0.480068 8.375,-0.9375 0.548186,-0.109661 1.051942,-0.220625 1.53125,-0.34375 z M 70.0625,77.53125 c 0.865391,0.02589 1.723666,0.03125 2.625,0.03125 0.912062,0 1.782843,-0.0048 2.65625,-0.03125 -0.165173,2.736408 -0.453252,5.207651 -0.84375,7.15625 -0.152345,0.760206 -0.322989,1.438994 -0.5,2.03125 -0.437447,0.03919 -0.895856,0.0625 -1.34375,0.0625 -0.414943,0 -0.812719,-0.02881 -1.21875,-0.0625 -0.177011,-0.592256 -0.347655,-1.271044 -0.5,-2.03125 -0.390498,-1.948599 -0.700644,-4.419842 -0.875,-7.15625 z m 1.75,10.28125 c 0.284911,0.01545 0.554954,0.03125 0.84375,0.03125 0.325029,0 0.648588,-0.01171 0.96875,-0.03125 -0.05999,0.148763 -0.127309,0.31046 -0.1875,0.4375 -0.18789,0.396562 -0.386962,0.696416 -0.53125,0.84375 -0.144288,0.147334 -0.181857,0.125 -0.1875,0.125 -0.0056,0 -0.07446,0.02233 -0.21875,-0.125 C 72.355712,88.946416 72.18789,88.646562 72,88.25 71.939809,88.12296 71.872486,87.961263 71.8125,87.8125 z"});define("SvgPaths/svgCompassRotationMarker",[],function(){"use strict";return"M 72.46875,22.03125 C 59.505873,22.050338 46.521615,27.004287 36.6875,36.875 L 47.84375,47.96875 C 61.521556,34.240041 83.442603,34.227389 97.125,47.90625 l 11.125,-11.125 C 98.401629,26.935424 85.431627,22.012162 72.46875,22.03125 z"});define("ViewModels/NavigationViewModel",["Cesium/Core/defined","Cesium/Core/Math","Cesium/Core/getTimestamp","Cesium/Core/EventHelper","Cesium/Core/Transforms","Cesium/Scene/SceneMode","Cesium/Core/Cartesian2","Cesium/Core/Cartesian3","Cesium/Core/Matrix4","Cesium/Core/BoundingSphere","Cesium/Core/HeadingPitchRange","KnockoutES5","Core/loadView","ViewModels/ResetViewNavigationControl","ViewModels/ZoomNavigationControl","SvgPaths/svgCompassOuterRing","SvgPaths/svgCompassGyro","SvgPaths/svgCompassRotationMarker","Core/Utils"],function(defined,CesiumMath,getTimestamp,EventHelper,Transforms,SceneMode,Cartesian2,Cartesian3,Matrix4,BoundingSphere,HeadingPitchRange,Knockout,loadView,ResetViewNavigationControl,ZoomNavigationControl,svgCompassOuterRing,svgCompassGyro,svgCompassRotationMarker,Utils){"use strict";var NavigationViewModel=function(options){this.terria=options.terria;this.eventHelper=new EventHelper;this.controls=options.controls;if(!defined(this.controls)){this.controls=[new ZoomNavigationControl(this.terria,true),new ResetViewNavigationControl(this.terria),new ZoomNavigationControl(this.terria,false)]}this.svgCompassOuterRing=svgCompassOuterRing;this.svgCompassGyro=svgCompassGyro;this.svgCompassRotationMarker=svgCompassRotationMarker;this.showCompass=defined(this.terria);this.heading=this.showCompass?this.terria.scene.camera.heading:0;this.isOrbiting=false;this.orbitCursorAngle=0;this.orbitCursorOpacity=0;this.orbitLastTimestamp=0;this.orbitFrame=undefined;this.orbitIsLook=false;this.orbitMouseMoveFunction=undefined;this.orbitMouseUpFunction=undefined;this.isRotating=false;this.rotateInitialCursorAngle=undefined;this.rotateFrame=undefined;this.rotateIsLook=false;this.rotateMouseMoveFunction=undefined;this.rotateMouseUpFunction=undefined;this._unsubcribeFromPostRender=undefined;Knockout.track(this,["controls","showCompass","heading","isOrbiting","orbitCursorAngle","isRotating"]);var that=this;function widgetChange(){if(defined(that.terria)){if(that._unsubcribeFromPostRender){that._unsubcribeFromPostRender();that._unsubcribeFromPostRender=undefined}that.showCompass=true;that._unsubcribeFromPostRender=that.terria.scene.postRender.addEventListener(function(){that.heading=that.terria.scene.camera.heading})}else{if(that._unsubcribeFromPostRender){that._unsubcribeFromPostRender();that._unsubcribeFromPostRender=undefined}that.showCompass=false}}this.eventHelper.add(this.terria.afterWidgetChanged,widgetChange,this);widgetChange()};NavigationViewModel.prototype.destroy=function(){this.eventHelper.removeAll()};NavigationViewModel.prototype.show=function(container){var testing='
'+'
'+"
"+"
"+'
'+'
'+"
"+'";loadView(testing,container,this)};NavigationViewModel.prototype.add=function(control){this.controls.push(control)};NavigationViewModel.prototype.remove=function(control){this.controls.remove(control)};NavigationViewModel.prototype.isLastControl=function(control){return control===this.controls[this.controls.length-1]};var vectorScratch=new Cartesian2;NavigationViewModel.prototype.handleMouseDown=function(viewModel,e){var scene=this.terria.scene;if(scene.mode==SceneMode.MORPHING){return true}var compassElement=e.currentTarget;var compassRectangle=e.currentTarget.getBoundingClientRect();var maxDistance=compassRectangle.width/2;var center=new Cartesian2((compassRectangle.right-compassRectangle.left)/2,(compassRectangle.bottom-compassRectangle.top)/2);var clickLocation=new Cartesian2(e.clientX-compassRectangle.left,e.clientY-compassRectangle.top);var vector=Cartesian2.subtract(clickLocation,center,vectorScratch);var distanceFromCenter=Cartesian2.magnitude(vector);var distanceFraction=distanceFromCenter/maxDistance;var nominalTotalRadius=145;var norminalGyroRadius=50;if(distanceFraction]*src="[^"<>]*"[^<>]*)\\s?\\/?>',i=RegExp(o,"i");return e=e.replace(/<[^<>]*>?/gi,function(e){var t,o,l,a,u;if(/(^<->|^<-\s|^<3\s)/.test(e))return e;if(t=e.match(i)){var m=t[1];if(o=n(m.match(/src="([^"<>]*)"/i)[1]),l=m.match(/alt="([^"<>]*)"/i),l=l&&"undefined"!=typeof l[1]?l[1]:"",a=m.match(/title="([^"<>]*)"/i),a=a&&"undefined"!=typeof a[1]?a[1]:"",o&&/^https?:\/\//i.test(o))return""!==c?''+l+'':''+l+''}return u=d.indexOf("a"),t=e.match(r),t&&(a="undefined"!=typeof t[2]?t[2]:"",o=n(t[1]),o&&/^(?:https?:\/\/|ftp:\/\/|mailto:|xmpp:)/i.test(o))?(p=!0,h[u]+=1,''):(t=/<\/a>/i.test(e))?(p=!0,h[u]-=1,h[u]<0&&(g[u]=!0),""):(t=e.match(/<(br|hr)\s?\/?>/i))?"<"+t[1].toLowerCase()+">":(t=e.match(/<(\/?)(b|blockquote|code|em|h[1-6]|li|ol(?: start="\d+")?|p|pre|s|sub|sup|strong|ul)>/i),t&&!/<\/ol start="\d+"/i.test(e)?(p=!0,u=d.indexOf(t[2].toLowerCase().split(" ")[0]),"/"===t[1]?h[u]-=1:h[u]+=1,h[u]<0&&(g[u]=!0),"<"+t[1]+t[2].toLowerCase()+">"):s===!0?"":f(e))})}function o(e){var t,n,o;for(a=0;a]*" title="[^"<>]*" target="_blank">',"g"):"ol"===t?//g:RegExp("<"+t+">","g"),r=RegExp("","g"),u===!0?(e=e.replace(n,""),e=e.replace(r,"")):(e=e.replace(n,function(e){return f(e)}),e=e.replace(r,function(e){return f(e)})),e}function n(e){var n;for(n=0;n`\\x00-\\x20]+",o="'[^']*'",i='"[^"]*"',a="(?:"+s+"|"+o+"|"+i+")",c="(?:\\s+"+n+"(?:\\s*=\\s*"+a+")?)",l="<[A-Za-z][A-Za-z0-9\\-]*"+c+"*\\s*\\/?>",u="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",p="|",h="<[?].*?[?]>",f="]*>",d="",m=new RegExp("^(?:"+l+"|"+u+"|"+p+"|"+h+"|"+f+"|"+d+")"),g=new RegExp("^(?:"+l+"|"+u+")");r.exports.HTML_TAG_RE=m,r.exports.HTML_OPEN_CLOSE_TAG_RE=g},{}],4:[function(e,r,t){"use strict";function n(e){return Object.prototype.toString.call(e)}function s(e){return"[object String]"===n(e)}function o(e,r){return x.call(e,r)}function i(e){var r=Array.prototype.slice.call(arguments,1);return r.forEach(function(r){if(r){if("object"!=typeof r)throw new TypeError(r+"must be object");Object.keys(r).forEach(function(t){e[t]=r[t]})}}),e}function a(e,r,t){return[].concat(e.slice(0,r),t,e.slice(r+1))}function c(e){return e>=55296&&57343>=e?!1:e>=64976&&65007>=e?!1:65535===(65535&e)||65534===(65535&e)?!1:e>=0&&8>=e?!1:11===e?!1:e>=14&&31>=e?!1:e>=127&&159>=e?!1:!(e>1114111)}function l(e){if(e>65535){e-=65536;var r=55296+(e>>10),t=56320+(1023&e);return String.fromCharCode(r,t)}return String.fromCharCode(e)}function u(e,r){var t=0;return o(q,r)?q[r]:35===r.charCodeAt(0)&&w.test(r)&&(t="x"===r[1].toLowerCase()?parseInt(r.slice(2),16):parseInt(r.slice(1),10),c(t))?l(t):e}function p(e){return e.indexOf("\\")<0?e:e.replace(y,"$1")}function h(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(A,function(e,r,t){return r?r:u(e,t)})}function f(e){return S[e]}function d(e){return D.test(e)?e.replace(E,f):e}function m(e){return e.replace(F,"\\$&")}function g(e){switch(e){case 9:case 32:return!0}return!1}function _(e){if(e>=8192&&8202>=e)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function k(e){return L.test(e)}function b(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function v(e){return e.trim().replace(/\s+/g," ").toUpperCase()}var x=Object.prototype.hasOwnProperty,y=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,C=/&([a-z#][a-z0-9]{1,31});/gi,A=new RegExp(y.source+"|"+C.source,"gi"),w=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,q=e("./entities"),D=/[&<>"]/,E=/[&<>"]/g,S={"&":"&","<":"<",">":">",'"':"""},F=/[.?*+^$[\]\\(){}|-]/g,L=e("uc.micro/categories/P/regex");t.lib={},t.lib.mdurl=e("mdurl"),t.lib.ucmicro=e("uc.micro"),t.assign=i,t.isString=s,t.has=o,t.unescapeMd=p,t.unescapeAll=h,t.isValidEntityCode=c,t.fromCodePoint=l,t.escapeHtml=d,t.arrayReplaceAt=a,t.isSpace=g,t.isWhiteSpace=_,t.isMdAsciiPunct=b,t.isPunctChar=k,t.escapeRE=m,t.normalizeReference=v},{"./entities":1,mdurl:59,"uc.micro":65,"uc.micro/categories/P/regex":63}],5:[function(e,r,t){"use strict";t.parseLinkLabel=e("./parse_link_label"),t.parseLinkDestination=e("./parse_link_destination"),t.parseLinkTitle=e("./parse_link_title")},{"./parse_link_destination":6,"./parse_link_label":7,"./parse_link_title":8}],6:[function(e,r,t){"use strict";var n=e("../common/utils").isSpace,s=e("../common/utils").unescapeAll;r.exports=function(e,r,t){var o,i,a=0,c=r,l={ok:!1,pos:0,lines:0,str:""};if(60===e.charCodeAt(r)){for(r++;t>r;){if(o=e.charCodeAt(r),10===o||n(o))return l;if(62===o)return l.pos=r+1,l.str=s(e.slice(c+1,r)),l.ok=!0,l;92===o&&t>r+1?r+=2:r++}return l}for(i=0;t>r&&(o=e.charCodeAt(r),32!==o)&&!(32>o||127===o);)if(92===o&&t>r+1)r+=2;else{if(40===o&&(i++,i>1))break;if(41===o&&(i--,0>i))break;r++}return c===r?l:(l.str=s(e.slice(c,r)),l.lines=a,l.pos=r,l.ok=!0,l)}},{"../common/utils":4}],7:[function(e,r,t){"use strict";r.exports=function(e,r,t){var n,s,o,i,a=-1,c=e.posMax,l=e.pos;for(e.pos=r+1,n=1;e.pos=t)return c;if(o=e.charCodeAt(r),34!==o&&39!==o&&40!==o)return c;for(r++,40===o&&(o=41);t>r;){if(s=e.charCodeAt(r),s===o)return c.pos=r+1,c.lines=i,c.str=n(e.slice(a+1,r)),c.ok=!0,c;10===s?i++:92===s&&t>r+1&&(r++,10===e.charCodeAt(r)&&i++),r++}return c}},{"../common/utils":4}],9:[function(e,r,t){"use strict";function n(e){var r=e.trim().toLowerCase();return _.test(r)?!!k.test(r):!0}function s(e){var r=d.parse(e,!0);if(r.hostname&&(!r.protocol||b.indexOf(r.protocol)>=0))try{r.hostname=m.toASCII(r.hostname)}catch(t){}return d.encode(d.format(r))}function o(e){var r=d.parse(e,!0);if(r.hostname&&(!r.protocol||b.indexOf(r.protocol)>=0))try{r.hostname=m.toUnicode(r.hostname)}catch(t){}return d.decode(d.format(r))}function i(e,r){return this instanceof i?(r||a.isString(e)||(r=e||{},e="default"),this.inline=new h,this.block=new p,this.core=new u,this.renderer=new l,this.linkify=new f,this.validateLink=n,this.normalizeLink=s,this.normalizeLinkText=o,this.utils=a,this.helpers=c,this.options={},this.configure(e),void(r&&this.set(r))):new i(e,r)}var a=e("./common/utils"),c=e("./helpers"),l=e("./renderer"),u=e("./parser_core"),p=e("./parser_block"),h=e("./parser_inline"),f=e("linkify-it"),d=e("mdurl"),m=e("punycode"),g={"default":e("./presets/default"),zero:e("./presets/zero"),commonmark:e("./presets/commonmark")},_=/^(vbscript|javascript|file|data):/,k=/^data:image\/(gif|png|jpeg|webp);/,b=["http:","https:","mailto:"];i.prototype.set=function(e){return a.assign(this.options,e),this},i.prototype.configure=function(e){var r,t=this;if(a.isString(e)&&(r=e,e=g[r],!e))throw new Error('Wrong `markdown-it` preset "'+r+'", check name');if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(r){e.components[r].rules&&t[r].ruler.enableOnly(e.components[r].rules),e.components[r].rules2&&t[r].ruler2.enableOnly(e.components[r].rules2)}),this},i.prototype.enable=function(e,r){var t=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(r){t=t.concat(this[r].ruler.enable(e,!0))},this),t=t.concat(this.inline.ruler2.enable(e,!0));var n=e.filter(function(e){return t.indexOf(e)<0});if(n.length&&!r)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+n);return this},i.prototype.disable=function(e,r){var t=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(r){t=t.concat(this[r].ruler.disable(e,!0))},this),t=t.concat(this.inline.ruler2.disable(e,!0));var n=e.filter(function(e){return t.indexOf(e)<0});if(n.length&&!r)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+n);return this},i.prototype.use=function(e){var r=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,r),this},i.prototype.parse=function(e,r){var t=new this.core.State(e,this,r);return this.core.process(t),t.tokens},i.prototype.render=function(e,r){return r=r||{},this.renderer.render(this.parse(e,r),this.options,r)},i.prototype.parseInline=function(e,r){var t=new this.core.State(e,this,r);return t.inlineMode=!0,this.core.process(t),t.tokens},i.prototype.renderInline=function(e,r){return r=r||{},this.renderer.render(this.parseInline(e,r),this.options,r)},r.exports=i},{"./common/utils":4,"./helpers":5,"./parser_block":10,"./parser_core":11,"./parser_inline":12,"./presets/commonmark":13,"./presets/default":14,"./presets/zero":15,"./renderer":16,"linkify-it":54,mdurl:59,punycode:52}],10:[function(e,r,t){"use strict";function n(){this.ruler=new s;for(var e=0;ea&&(e.line=a=e.skipEmptyLines(a),!(a>=t))&&!(e.sCount[a]=l){e.line=t;break}for(s=0;i>s&&!(n=o[s](e,a,t,!1));s++);if(e.tight=!c,e.isEmpty(e.line-1)&&(c=!0),a=e.line,t>a&&e.isEmpty(a)){if(c=!0,a++,t>a&&"list"===e.parentType&&e.isEmpty(a))break;e.line=a}}},n.prototype.parse=function(e,r,t,n){var s;e&&(s=new this.State(e,r,t,n),this.tokenize(s,s.line,s.lineMax))},n.prototype.State=e("./rules_block/state_block"),r.exports=n},{"./ruler":17,"./rules_block/blockquote":18,"./rules_block/code":19,"./rules_block/fence":20,"./rules_block/heading":21,"./rules_block/hr":22,"./rules_block/html_block":23,"./rules_block/lheading":24,"./rules_block/list":25,"./rules_block/paragraph":26,"./rules_block/reference":27,"./rules_block/state_block":28,"./rules_block/table":29}],11:[function(e,r,t){"use strict";function n(){this.ruler=new s;for(var e=0;er;r++)n[r](e)},n.prototype.State=e("./rules_core/state_core"),r.exports=n},{"./ruler":17,"./rules_core/block":30,"./rules_core/inline":31,"./rules_core/linkify":32,"./rules_core/normalize":33,"./rules_core/replacements":34,"./rules_core/smartquotes":35,"./rules_core/state_core":36}],12:[function(e,r,t){"use strict";function n(){var e;for(this.ruler=new s,e=0;et&&(e.level++,r=s[t](e,!0),e.level--,!r);t++);else e.pos=e.posMax;r||e.pos++,a[n]=e.pos},n.prototype.tokenize=function(e){for(var r,t,n=this.ruler.getRules(""),s=n.length,o=e.posMax,i=e.md.options.maxNesting;e.post&&!(r=n[t](e,!1));t++);if(r){if(e.pos>=o)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},n.prototype.parse=function(e,r,t,n){var s,o,i,a=new this.State(e,r,t,n);for(this.tokenize(a),o=this.ruler2.getRules(""),i=o.length,s=0;i>s;s++)o[s](a)},n.prototype.State=e("./rules_inline/state_inline"),r.exports=n},{"./ruler":17,"./rules_inline/autolink":37,"./rules_inline/backticks":38,"./rules_inline/balance_pairs":39,"./rules_inline/emphasis":40,"./rules_inline/entity":41,"./rules_inline/escape":42,"./rules_inline/html_inline":43,"./rules_inline/image":44,"./rules_inline/link":45,"./rules_inline/newline":46,"./rules_inline/state_inline":47,"./rules_inline/strikethrough":48,"./rules_inline/text":49,"./rules_inline/text_collapse":50}],13:[function(e,r,t){"use strict";r.exports={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"\u201c\u201d\u2018\u2019",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","text_collapse"]}}}},{}],14:[function(e,r,t){"use strict";r.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"\u201c\u201d\u2018\u2019",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}}},{}],15:[function(e,r,t){"use strict";r.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"\u201c\u201d\u2018\u2019",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","text_collapse"]}}}},{}],16:[function(e,r,t){"use strict";function n(){this.rules=s({},a)}var s=e("./common/utils").assign,o=e("./common/utils").unescapeAll,i=e("./common/utils").escapeHtml,a={};a.code_inline=function(e,r){return""+i(e[r].content)+""},a.code_block=function(e,r){return"
"+i(e[r].content)+"
\n"},a.fence=function(e,r,t,n,s){var a,c=e[r],l=c.info?o(c.info).trim():"",u="";return l&&(u=l.split(/\s+/g)[0],c.attrJoin("class",t.langPrefix+u)),a=t.highlight?t.highlight(c.content,u)||i(c.content):i(c.content),0===a.indexOf(""+a+"\n"},a.image=function(e,r,t,n,s){var o=e[r];return o.attrs[o.attrIndex("alt")][1]=s.renderInlineAsText(o.children,t,n),s.renderToken(e,r,t)},a.hardbreak=function(e,r,t){return t.xhtmlOut?"
\n":"
\n"},a.softbreak=function(e,r,t){return t.breaks?t.xhtmlOut?"
\n":"
\n":"\n"},a.text=function(e,r){return i(e[r].content)},a.html_block=function(e,r){return e[r].content},a.html_inline=function(e,r){return e[r].content},n.prototype.renderAttrs=function(e){var r,t,n;if(!e.attrs)return"";for(n="",r=0,t=e.attrs.length;t>r;r++)n+=" "+i(e.attrs[r][0])+'="'+i(e.attrs[r][1])+'"';return n},n.prototype.renderToken=function(e,r,t){var n,s="",o=!1,i=e[r];return i.hidden?"":(i.block&&-1!==i.nesting&&r&&e[r-1].hidden&&(s+="\n"),s+=(-1===i.nesting?"\n":">")},n.prototype.renderInline=function(e,r,t){for(var n,s="",o=this.rules,i=0,a=e.length;a>i;i++)n=e[i].type,s+="undefined"!=typeof o[n]?o[n](e,i,r,t,this):this.renderToken(e,i,r);return s},n.prototype.renderInlineAsText=function(e,r,t){for(var n="",s=this.rules,o=0,i=e.length;i>o;o++)"text"===e[o].type?n+=s.text(e,o,r,t,this):"image"===e[o].type&&(n+=this.renderInlineAsText(e[o].children,r,t));return n},n.prototype.render=function(e,r,t){var n,s,o,i="",a=this.rules;for(n=0,s=e.length;s>n;n++)o=e[n].type,i+="inline"===o?this.renderInline(e[n].children,r,t):"undefined"!=typeof a[o]?a[e[n].type](e,n,r,t,this):this.renderToken(e,n,r,t);return i},r.exports=n},{"./common/utils":4}],17:[function(e,r,t){"use strict";function n(){this.__rules__=[],this.__cache__=null}n.prototype.__find__=function(e){for(var r=0;rn){if(r)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[n].enabled=!0,t.push(e)},this),this.__cache__=null,t},n.prototype.enableOnly=function(e,r){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(e){e.enabled=!1}),this.enable(e,r)},n.prototype.disable=function(e,r){Array.isArray(e)||(e=[e]);var t=[];return e.forEach(function(e){var n=this.__find__(e);if(0>n){if(r)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[n].enabled=!1,t.push(e)},this),this.__cache__=null,t},n.prototype.getRules=function(e){return null===this.__cache__&&this.__compile__(),this.__cache__[e]||[]},r.exports=n},{}],18:[function(e,r,t){"use strict";var n=e("../common/utils").isSpace;r.exports=function(e,r,t,s){var o,i,a,c,l,u,p,h,f,d,m,g,_,k,b,v,x=e.bMarks[r]+e.tShift[r],y=e.eMarks[r];if(62!==e.src.charCodeAt(x++))return!1;if(s)return!0;for(32===e.src.charCodeAt(x)&&x++,u=e.blkIndent,e.blkIndent=0,f=d=e.sCount[r]+x-(e.bMarks[r]+e.tShift[r]),l=[e.bMarks[r]],e.bMarks[r]=x;y>x&&(m=e.src.charCodeAt(x),n(m));)9===m?d+=4-d%4:d++,x++;for(i=x>=y,c=[e.sCount[r]],e.sCount[r]=d-f,a=[e.tShift[r]],e.tShift[r]=x-e.bMarks[r],g=e.md.block.ruler.getRules("blockquote"),o=r+1;t>o&&!(e.sCount[o]=y));o++)if(62!==e.src.charCodeAt(x++)){if(i)break;for(v=!1,k=0,b=g.length;b>k;k++)if(g[k](e,o,t,!0)){v=!0;break}if(v)break;l.push(e.bMarks[o]),a.push(e.tShift[o]),c.push(e.sCount[o]),e.sCount[o]=-1}else{for(32===e.src.charCodeAt(x)&&x++,f=d=e.sCount[o]+x-(e.bMarks[o]+e.tShift[o]),l.push(e.bMarks[o]),e.bMarks[o]=x;y>x&&(m=e.src.charCodeAt(x),n(m));)9===m?d+=4-d%4:d++,x++;i=x>=y,c.push(e.sCount[o]),e.sCount[o]=d-f,a.push(e.tShift[o]),e.tShift[o]=x-e.bMarks[o]}for(p=e.parentType,e.parentType="blockquote",_=e.push("blockquote_open","blockquote",1),_.markup=">",_.map=h=[r,0],e.md.block.tokenize(e,r,o),_=e.push("blockquote_close","blockquote",-1),_.markup=">",e.parentType=p,h[1]=e.line,k=0;kn;)if(e.isEmpty(n)){if(i++,i>=2&&"list"===e.parentType)break;n++}else{if(i=0,!(e.sCount[n]-e.blkIndent>=4))break;n++,s=n}return e.line=s,o=e.push("code_block","code",0),o.content=e.getLines(r,s,4+e.blkIndent,!0),o.map=[r,e.line],!0}},{}],20:[function(e,r,t){"use strict";r.exports=function(e,r,t,n){var s,o,i,a,c,l,u,p=!1,h=e.bMarks[r]+e.tShift[r],f=e.eMarks[r];if(h+3>f)return!1;if(s=e.src.charCodeAt(h),126!==s&&96!==s)return!1;if(c=h,h=e.skipChars(h,s),o=h-c,3>o)return!1;if(u=e.src.slice(c,h),i=e.src.slice(h,f),i.indexOf("`")>=0)return!1;if(n)return!0;for(a=r;(a++,!(a>=t))&&(h=c=e.bMarks[a]+e.tShift[a],f=e.eMarks[a],!(f>h&&e.sCount[a]=4||(h=e.skipChars(h,s),o>h-c||(h=e.skipSpaces(h),f>h)))){p=!0;break}return o=e.sCount[r],e.line=a+(p?1:0),l=e.push("fence","code",0),l.info=i,l.content=e.getLines(r+1,a,o,!0),l.markup=u,l.map=[r,e.line],!0}},{}],21:[function(e,r,t){"use strict";var n=e("../common/utils").isSpace;r.exports=function(e,r,t,s){var o,i,a,c,l=e.bMarks[r]+e.tShift[r],u=e.eMarks[r];if(o=e.src.charCodeAt(l),35!==o||l>=u)return!1;for(i=1,o=e.src.charCodeAt(++l);35===o&&u>l&&6>=i;)i++,o=e.src.charCodeAt(++l);return i>6||u>l&&32!==o?!1:s?!0:(u=e.skipSpacesBack(u,l),a=e.skipCharsBack(u,35,l),a>l&&n(e.src.charCodeAt(a-1))&&(u=a),e.line=r+1,c=e.push("heading_open","h"+String(i),1),c.markup="########".slice(0,i),c.map=[r,e.line],c=e.push("inline","",0),c.content=e.src.slice(l,u).trim(),c.map=[r,e.line],c.children=[],c=e.push("heading_close","h"+String(i),-1),c.markup="########".slice(0,i),!0)}},{"../common/utils":4}],22:[function(e,r,t){"use strict";var n=e("../common/utils").isSpace;r.exports=function(e,r,t,s){var o,i,a,c,l=e.bMarks[r]+e.tShift[r],u=e.eMarks[r];if(o=e.src.charCodeAt(l++),42!==o&&45!==o&&95!==o)return!1;for(i=1;u>l;){if(a=e.src.charCodeAt(l++),a!==o&&!n(a))return!1;a===o&&i++}return 3>i?!1:s?!0:(e.line=r+1,c=e.push("hr","hr",0),c.map=[r,e.line],c.markup=Array(i+1).join(String.fromCharCode(o)),!0)}},{"../common/utils":4}],23:[function(e,r,t){"use strict";var n=e("../common/html_blocks"),s=e("../common/html_re").HTML_OPEN_CLOSE_TAG_RE,o=[[/^<(script|pre|style)(?=(\s|>|$))/i,/<\/(script|pre|style)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(s.source+"\\s*$"),/^$/,!1]];r.exports=function(e,r,t,n){var s,i,a,c,l=e.bMarks[r]+e.tShift[r],u=e.eMarks[r];if(!e.md.options.html)return!1;if(60!==e.src.charCodeAt(l))return!1;for(c=e.src.slice(l,u),s=0;si&&!(e.sCount[i]h&&!e.isEmpty(h);h++)if(!(e.sCount[h]-e.blkIndent>3)){if(e.sCount[h]>=e.blkIndent&&(c=e.bMarks[h]+e.tShift[h],l=e.eMarks[h],l>c&&(p=e.src.charCodeAt(c),(45===p||61===p)&&(c=e.skipChars(c,p),c=e.skipSpaces(c),c>=l)))){u=61===p?1:2;break}if(!(e.sCount[h]<0)){for(s=!1,o=0,i=f.length;i>o;o++)if(f[o](e,h,t,!0)){s=!0;break}if(s)break}}return u?(n=e.getLines(r,h,e.blkIndent,!1).trim(),e.line=h+1,a=e.push("heading_open","h"+String(u),1),a.markup=String.fromCharCode(p),a.map=[r,e.line],a=e.push("inline","",0),a.content=n,a.map=[r,e.line-1],a.children=[],a=e.push("heading_close","h"+String(u),-1),a.markup=String.fromCharCode(p),!0):!1}},{}],25:[function(e,r,t){"use strict";function n(e,r){var t,n,s,o;return n=e.bMarks[r]+e.tShift[r],s=e.eMarks[r],t=e.src.charCodeAt(n++),42!==t&&45!==t&&43!==t?-1:s>n&&(o=e.src.charCodeAt(n),!i(o))?-1:n}function s(e,r){var t,n=e.bMarks[r]+e.tShift[r],s=n,o=e.eMarks[r];if(s+1>=o)return-1;if(t=e.src.charCodeAt(s++),48>t||t>57)return-1;for(;;){if(s>=o)return-1;t=e.src.charCodeAt(s++);{if(!(t>=48&&57>=t)){if(41===t||46===t)break;return-1}if(s-n>=10)return-1}}return o>s&&(t=e.src.charCodeAt(s),!i(t))?-1:s}function o(e,r){var t,n,s=e.level+2;for(t=r+2,n=e.tokens.length-2;n>t;t++)e.tokens[t].level===s&&"paragraph_open"===e.tokens[t].type&&(e.tokens[t+2].hidden=!0,e.tokens[t].hidden=!0,t+=2)}var i=e("../common/utils").isSpace;r.exports=function(e,r,t,a){var c,l,u,p,h,f,d,m,g,_,k,b,v,x,y,C,A,w,q,D,E,S,F,L,z,T,R,M,I=!0;if((k=s(e,r))>=0)w=!0;else{if(!((k=n(e,r))>=0))return!1;w=!1}if(A=e.src.charCodeAt(k-1),a)return!0;for(D=e.tokens.length,w?(_=e.bMarks[r]+e.tShift[r],C=Number(e.src.substr(_,k-_-1)),z=e.push("ordered_list_open","ol",1),1!==C&&(z.attrs=[["start",C]])):z=e.push("bullet_list_open","ul",1),z.map=S=[r,0],z.markup=String.fromCharCode(A),c=r,E=!1,L=e.md.block.ruler.getRules("list");t>c;){for(v=k,x=e.eMarks[c],l=u=e.sCount[c]+k-(e.bMarks[r]+e.tShift[r]);x>v&&(b=e.src.charCodeAt(v),i(b));)9===b?u+=4-u%4:u++,v++;if(q=v,y=q>=x?1:u-l,y>4&&(y=1),p=l+y,z=e.push("list_item_open","li",1),z.markup=String.fromCharCode(A),z.map=F=[r,0],f=e.blkIndent,m=e.tight,h=e.tShift[r],d=e.sCount[r],g=e.parentType,e.blkIndent=p,e.tight=!0,e.parentType="list",e.tShift[r]=q-e.bMarks[r],e.sCount[r]=u,q>=x&&e.isEmpty(r+1)?e.line=Math.min(e.line+2,t):e.md.block.tokenize(e,r,t,!0),e.tight&&!E||(I=!1),E=e.line-r>1&&e.isEmpty(e.line-1),e.blkIndent=f,e.tShift[r]=h,e.sCount[r]=d,e.tight=m,e.parentType=g,z=e.push("list_item_close","li",-1),z.markup=String.fromCharCode(A),c=r=e.line,F[1]=c,q=e.bMarks[r],c>=t)break;if(e.isEmpty(c))break;if(e.sCount[c]T;T++)if(L[T](e,c,t,!0)){M=!0;break}if(M)break;if(w){if(k=s(e,c),0>k)break}else if(k=n(e,c),0>k)break;if(A!==e.src.charCodeAt(k-1))break}return z=w?e.push("ordered_list_close","ol",-1):e.push("bullet_list_close","ul",-1),z.markup=String.fromCharCode(A),S[1]=c,e.line=c,I&&o(e,D),!0}},{"../common/utils":4}],26:[function(e,r,t){"use strict";r.exports=function(e,r){for(var t,n,s,o,i,a=r+1,c=e.md.block.ruler.getRules("paragraph"),l=e.lineMax;l>a&&!e.isEmpty(a);a++)if(!(e.sCount[a]-e.blkIndent>3||e.sCount[a]<0)){for(n=!1,s=0,o=c.length;o>s;s++)if(c[s](e,a,l,!0)){n=!0;break}if(n)break}return t=e.getLines(r,a,e.blkIndent,!1).trim(),e.line=a,i=e.push("paragraph_open","p",1),i.map=[r,e.line],i=e.push("inline","",0),i.content=t,i.map=[r,e.line],i.children=[],i=e.push("paragraph_close","p",-1),!0}},{}],27:[function(e,r,t){"use strict";var n=e("../helpers/parse_link_destination"),s=e("../helpers/parse_link_title"),o=e("../common/utils").normalizeReference,i=e("../common/utils").isSpace;r.exports=function(e,r,t,a){var c,l,u,p,h,f,d,m,g,_,k,b,v,x,y,C=0,A=e.bMarks[r]+e.tShift[r],w=e.eMarks[r],q=r+1;if(91!==e.src.charCodeAt(A))return!1;for(;++Aq&&!e.isEmpty(q);q++)if(!(e.sCount[q]-e.blkIndent>3||e.sCount[q]<0)){for(v=!1,f=0,d=x.length;d>f;f++)if(x[f](e,q,p,!0)){v=!0;break}if(v)break}for(b=e.getLines(r,q,e.blkIndent,!1).trim(),w=b.length,A=1;w>A;A++){if(c=b.charCodeAt(A),91===c)return!1;if(93===c){g=A;break}10===c?C++:92===c&&(A++,w>A&&10===b.charCodeAt(A)&&C++)}if(0>g||58!==b.charCodeAt(g+1))return!1;for(A=g+2;w>A;A++)if(c=b.charCodeAt(A),10===c)C++;else if(!i(c))break;if(_=n(b,A,w),!_.ok)return!1;if(h=e.md.normalizeLink(_.str),!e.md.validateLink(h))return!1;for(A=_.pos,C+=_.lines,l=A,u=C,k=A;w>A;A++)if(c=b.charCodeAt(A),10===c)C++;else if(!i(c))break;for(_=s(b,A,w),w>A&&k!==A&&_.ok?(y=_.str,A=_.pos,C+=_.lines):(y="",A=l,C=u);w>A&&(c=b.charCodeAt(A),i(c));)A++;if(w>A&&10!==b.charCodeAt(A)&&y)for(y="",A=l,C=u;w>A&&(c=b.charCodeAt(A),i(c));)A++;return w>A&&10!==b.charCodeAt(A)?!1:(m=o(b.slice(1,g)))?a?!0:("undefined"==typeof e.env.references&&(e.env.references={}),"undefined"==typeof e.env.references[m]&&(e.env.references[m]={title:y,href:h}),e.line=r+C+1,!0):!1}},{"../common/utils":4,"../helpers/parse_link_destination":6,"../helpers/parse_link_title":8}],28:[function(e,r,t){"use strict";function n(e,r,t,n){var s,i,a,c,l,u,p,h;for(this.src=e,this.md=r,this.env=t,this.tokens=n,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.parentType="root",this.ddIndent=-1,this.level=0,this.result="",i=this.src,h=!1,a=c=u=p=0,l=i.length;l>c;c++){if(s=i.charCodeAt(c),!h){if(o(s)){u++,9===s?p+=4-p%4:p++;continue}h=!0}10!==s&&c!==l-1||(10!==s&&c++,this.bMarks.push(a),this.eMarks.push(c),this.tShift.push(u),this.sCount.push(p),h=!1,u=0,p=0,a=c+1)}this.bMarks.push(i.length),this.eMarks.push(i.length),this.tShift.push(0),this.sCount.push(0),this.lineMax=this.bMarks.length-1}var s=e("../token"),o=e("../common/utils").isSpace;n.prototype.push=function(e,r,t){var n=new s(e,r,t);return n.block=!0,0>t&&this.level--,n.level=this.level,t>0&&this.level++,this.tokens.push(n),n},n.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},n.prototype.skipEmptyLines=function(e){for(var r=this.lineMax;r>e&&!(this.bMarks[e]+this.tShift[e]e&&(r=this.src.charCodeAt(e),o(r));e++);return e},n.prototype.skipSpacesBack=function(e,r){if(r>=e)return e;for(;e>r;)if(!o(this.src.charCodeAt(--e)))return e+1;return e},n.prototype.skipChars=function(e,r){for(var t=this.src.length;t>e&&this.src.charCodeAt(e)===r;e++);return e},n.prototype.skipCharsBack=function(e,r,t){if(t>=e)return e;for(;e>t;)if(r!==this.src.charCodeAt(--e))return e+1;return e},n.prototype.getLines=function(e,r,t,n){var s,i,a,c,l,u,p,h=e;if(e>=r)return"";for(u=new Array(r-e),s=0;r>h;h++,s++){for(i=0,p=c=this.bMarks[h],l=r>h+1||n?this.eMarks[h]+1:this.eMarks[h];l>c&&t>i;){if(a=this.src.charCodeAt(c),o(a))9===a?i+=4-i%4:i++;else{if(!(c-pn;)96===r&&o%2===0?(a=!a,c=n):124!==r||o%2!==0||a?92===r?o++:o=0:(t.push(e.substring(i,n)),i=n+1),n++,n===s&&a&&(a=!1,n=c+1),r=e.charCodeAt(n);return t.push(e.substring(i)),t}r.exports=function(e,r,t,o){var i,a,c,l,u,p,h,f,d,m,g,_;if(r+2>t)return!1;if(u=r+1,e.sCount[u]=e.eMarks[u])return!1;if(i=e.src.charCodeAt(c),124!==i&&45!==i&&58!==i)return!1;if(a=n(e,r+1),!/^[-:| ]+$/.test(a))return!1;for(p=a.split("|"),d=[],l=0;ld.length)return!1;if(o)return!0;for(f=e.push("table_open","table",1),f.map=g=[r,0],f=e.push("thead_open","thead",1),f.map=[r,r+1],f=e.push("tr_open","tr",1),f.map=[r,r+1],l=0;lu&&!(e.sCount[u]l;l++)f=e.push("td_open","td",1),d[l]&&(f.attrs=[["style","text-align:"+d[l]]]),f=e.push("inline","",0),f.content=p[l]?p[l].trim():"",f.children=[],f=e.push("td_close","td",-1);f=e.push("tr_close","tr",-1)}return f=e.push("tbody_close","tbody",-1),f=e.push("table_close","table",-1),g[1]=_[1]=u,e.line=u,!0}},{}],30:[function(e,r,t){"use strict";r.exports=function(e){var r;e.inlineMode?(r=new e.Token("inline","",0),r.content=e.src,r.map=[0,1],r.children=[],e.tokens.push(r)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}},{}],31:[function(e,r,t){"use strict";r.exports=function(e){var r,t,n,s=e.tokens;for(t=0,n=s.length;n>t;t++)r=s[t],"inline"===r.type&&e.md.inline.parse(r.content,e.md,e.env,r.children)}},{}],32:[function(e,r,t){"use strict";function n(e){return/^\s]/i.test(e)}function s(e){return/^<\/a\s*>/i.test(e)}var o=e("../common/utils").arrayReplaceAt;r.exports=function(e){var r,t,i,a,c,l,u,p,h,f,d,m,g,_,k,b,v,x=e.tokens;if(e.md.options.linkify)for(t=0,i=x.length;i>t;t++)if("inline"===x[t].type&&e.md.linkify.pretest(x[t].content))for(a=x[t].children,g=0,r=a.length-1;r>=0;r--)if(l=a[r],"link_close"!==l.type){if("html_inline"===l.type&&(n(l.content)&&g>0&&g--,s(l.content)&&g++),!(g>0)&&"text"===l.type&&e.md.linkify.test(l.content)){for(h=l.content,v=e.md.linkify.match(h),u=[],m=l.level,d=0,p=0;pd&&(c=new e.Token("text","",0),c.content=h.slice(d,f),c.level=m,u.push(c)),c=new e.Token("link_open","a",1),c.attrs=[["href",k]],c.level=m++,c.markup="linkify",c.info="auto",u.push(c),c=new e.Token("text","",0),c.content=b,c.level=m,u.push(c),c=new e.Token("link_close","a",-1),c.level=--m,c.markup="linkify",c.info="auto",u.push(c),d=v[p].lastIndex);d=0;r--)t=e[r],"text"===t.type&&(t.content=t.content.replace(c,n))}function o(e){var r,t;for(r=e.length-1;r>=0;r--)t=e[r],"text"===t.type&&i.test(t.content)&&(t.content=t.content.replace(/\+-/g,"\xb1").replace(/\.{2,}/g,"\u2026").replace(/([?!])\u2026/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---([^-]|$)/gm,"$1\u2014$2").replace(/(^|\s)--(\s|$)/gm,"$1\u2013$2").replace(/(^|[^-\s])--([^-\s]|$)/gm,"$1\u2013$2"))}var i=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,a=/\((c|tm|r|p)\)/i,c=/\((c|tm|r|p)\)/gi,l={c:"\xa9",r:"\xae",p:"\xa7",tm:"\u2122"};r.exports=function(e){var r;if(e.md.options.typographer)for(r=e.tokens.length-1;r>=0;r--)"inline"===e.tokens[r].type&&(a.test(e.tokens[r].content)&&s(e.tokens[r].children),i.test(e.tokens[r].content)&&o(e.tokens[r].children))}},{}],35:[function(e,r,t){"use strict";function n(e,r,t){return e.substr(0,r)+t+e.substr(r+1)}function s(e,r){var t,s,c,p,h,f,d,m,g,_,k,b,v,x,y,C,A,w,q,D,E;for(q=[],t=0;t=0&&!(q[A].level<=d);A--);if(q.length=A+1,"text"===s.type){c=s.content,h=0,f=c.length;e:for(;f>h&&(l.lastIndex=h,p=l.exec(c));){if(y=C=!0,h=p.index+1,w="'"===p[0],g=32,p.index-1>=0)g=c.charCodeAt(p.index-1);else for(A=t-1;A>=0;A--)if("text"===e[A].type){g=e[A].content.charCodeAt(e[A].content.length-1);break}if(_=32,f>h)_=c.charCodeAt(h);else for(A=t+1;A=48&&57>=g&&(C=y=!1),y&&C&&(y=!1,C=b),y||C){if(C)for(A=q.length-1;A>=0&&(m=q[A],!(q[A].level=0;r--)"inline"===e.tokens[r].type&&c.test(e.tokens[r].content)&&s(e.tokens[r].children,e)}},{"../common/utils":4}],36:[function(e,r,t){"use strict";function n(e,r,t){this.src=e,this.env=t,this.tokens=[],this.inlineMode=!1,this.md=r}var s=e("../token");n.prototype.Token=s,r.exports=n},{"../token":51}],37:[function(e,r,t){"use strict";var n=/^<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/,s=/^<([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)>/;r.exports=function(e,r){var t,o,i,a,c,l,u=e.pos;return 60!==e.src.charCodeAt(u)?!1:(t=e.src.slice(u),t.indexOf(">")<0?!1:s.test(t)?(o=t.match(s),a=o[0].slice(1,-1),c=e.md.normalizeLink(a),e.md.validateLink(c)?(r||(l=e.push("link_open","a",1),l.attrs=[["href",c]],l.markup="autolink",l.info="auto",l=e.push("text","",0),l.content=e.md.normalizeLinkText(a),l=e.push("link_close","a",-1),l.markup="autolink",l.info="auto"),e.pos+=o[0].length,!0):!1):n.test(t)?(i=t.match(n),a=i[0].slice(1,-1),c=e.md.normalizeLink("mailto:"+a),e.md.validateLink(c)?(r||(l=e.push("link_open","a",1),l.attrs=[["href",c]],l.markup="autolink",l.info="auto",l=e.push("text","",0),l.content=e.md.normalizeLinkText(a),l=e.push("link_close","a",-1),l.markup="autolink",l.info="auto"),e.pos+=i[0].length,!0):!1):!1)}},{}],38:[function(e,r,t){"use strict";r.exports=function(e,r){var t,n,s,o,i,a,c=e.pos,l=e.src.charCodeAt(c);if(96!==l)return!1;for(t=c,c++,n=e.posMax;n>c&&96===e.src.charCodeAt(c);)c++;for(s=e.src.slice(t,c),o=i=c;-1!==(o=e.src.indexOf("`",i));){for(i=o+1;n>i&&96===e.src.charCodeAt(i);)i++;if(i-o===s.length)return r||(a=e.push("code_inline","code",0),a.markup=s,a.content=e.src.slice(c,o).replace(/[ \n]+/g," ").trim()),e.pos=i,!0}return r||(e.pending+=s),e.pos+=s.length,!0}},{}],39:[function(e,r,t){"use strict";r.exports=function(e){var r,t,n,s,o=e.delimiters,i=e.delimiters.length;for(r=0;i>r;r++)if(n=o[r],n.close)for(t=r-n.jump-1;t>=0;){if(s=o[t],s.open&&s.marker===n.marker&&s.end<0&&s.level===n.level){n.jump=r-t,n.open=!1,s.end=r,s.jump=0;break}t-=s.jump+1}}},{}],40:[function(e,r,t){"use strict";r.exports.tokenize=function(e,r){var t,n,s,o=e.pos,i=e.src.charCodeAt(o);if(r)return!1;if(95!==i&&42!==i)return!1;for(n=e.scanDelims(e.pos,42===i),t=0;tr;r++)t=a[r],95!==t.marker&&42!==t.marker||-1!==t.end&&(n=a[t.end],i=c>r+1&&a[r+1].end===t.end-1&&a[r+1].token===t.token+1&&a[t.end-1].token===n.token-1&&a[r+1].marker===t.marker,o=String.fromCharCode(t.marker),s=e.tokens[t.token],s.type=i?"strong_open":"em_open",s.tag=i?"strong":"em",s.nesting=1,s.markup=i?o+o:o,s.content="",s=e.tokens[n.token],s.type=i?"strong_close":"em_close",s.tag=i?"strong":"em",s.nesting=-1,s.markup=i?o+o:o,s.content="",i&&(e.tokens[a[r+1].token].content="",e.tokens[a[t.end-1].token].content="",r++))}},{}],41:[function(e,r,t){"use strict";var n=e("../common/entities"),s=e("../common/utils").has,o=e("../common/utils").isValidEntityCode,i=e("../common/utils").fromCodePoint,a=/^&#((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i,c=/^&([a-z][a-z0-9]{1,31});/i;r.exports=function(e,r){var t,l,u,p=e.pos,h=e.posMax;if(38!==e.src.charCodeAt(p))return!1;if(h>p+1)if(t=e.src.charCodeAt(p+1),35===t){if(u=e.src.slice(p).match(a))return r||(l="x"===u[1][0].toLowerCase()?parseInt(u[1].slice(1),16):parseInt(u[1],10),e.pending+=i(o(l)?l:65533)),e.pos+=u[0].length,!0}else if(u=e.src.slice(p).match(c),u&&s(n,u[1]))return r||(e.pending+=n[u[1]]),e.pos+=u[0].length,!0;return r||(e.pending+="&"),e.pos++,!0}},{"../common/entities":1,"../common/utils":4}],42:[function(e,r,t){"use strict";for(var n=e("../common/utils").isSpace,s=[],o=0;256>o;o++)s.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){s[e.charCodeAt(0)]=1}),r.exports=function(e,r){var t,o=e.pos,i=e.posMax;if(92!==e.src.charCodeAt(o))return!1;if(o++,i>o){if(t=e.src.charCodeAt(o),256>t&&0!==s[t])return r||(e.pending+=e.src[o]),e.pos+=2,!0;if(10===t){for(r||e.push("hardbreak","br",0),o++;i>o&&(t=e.src.charCodeAt(o),n(t));)o++;return e.pos=o,!0}}return r||(e.pending+="\\"),e.pos++,!0}},{"../common/utils":4}],43:[function(e,r,t){"use strict";function n(e){var r=32|e;return r>=97&&122>=r}var s=e("../common/html_re").HTML_TAG_RE;r.exports=function(e,r){var t,o,i,a,c=e.pos;return e.md.options.html?(i=e.posMax,60!==e.src.charCodeAt(c)||c+2>=i?!1:(t=e.src.charCodeAt(c+1),(33===t||63===t||47===t||n(t))&&(o=e.src.slice(c).match(s))?(r||(a=e.push("html_inline","",0),a.content=e.src.slice(c,c+o[0].length)),e.pos+=o[0].length,!0):!1)):!1}},{"../common/html_re":3}],44:[function(e,r,t){"use strict";var n=e("../helpers/parse_link_label"),s=e("../helpers/parse_link_destination"),o=e("../helpers/parse_link_title"),i=e("../common/utils").normalizeReference,a=e("../common/utils").isSpace;r.exports=function(e,r){var t,c,l,u,p,h,f,d,m,g,_,k,b,v="",x=e.pos,y=e.posMax;if(33!==e.src.charCodeAt(e.pos))return!1;if(91!==e.src.charCodeAt(e.pos+1))return!1;if(h=e.pos+2,p=n(e,e.pos+1,!1),0>p)return!1;if(f=p+1,y>f&&40===e.src.charCodeAt(f)){for(f++;y>f&&(c=e.src.charCodeAt(f),a(c)||10===c);f++);if(f>=y)return!1;for(b=f,m=s(e.src,f,e.posMax),m.ok&&(v=e.md.normalizeLink(m.str),e.md.validateLink(v)?f=m.pos:v=""),b=f;y>f&&(c=e.src.charCodeAt(f),a(c)||10===c);f++);if(m=o(e.src,f,e.posMax),y>f&&b!==f&&m.ok)for(g=m.str,f=m.pos;y>f&&(c=e.src.charCodeAt(f),a(c)||10===c);f++);else g="";if(f>=y||41!==e.src.charCodeAt(f))return e.pos=x,!1;f++}else{if("undefined"==typeof e.env.references)return!1;if(y>f&&91===e.src.charCodeAt(f)?(b=f+1,f=n(e,f),f>=0?u=e.src.slice(b,f++):f=p+1):f=p+1,u||(u=e.src.slice(h,p)),d=e.env.references[i(u)],!d)return e.pos=x,!1;v=d.href,g=d.title}return r||(l=e.src.slice(h,p),e.md.inline.parse(l,e.md,e.env,k=[]),_=e.push("image","img",0),_.attrs=t=[["src",v],["alt",""]],_.children=k,_.content=l,g&&t.push(["title",g])),e.pos=f,e.posMax=y,!0}},{"../common/utils":4,"../helpers/parse_link_destination":6,"../helpers/parse_link_label":7,"../helpers/parse_link_title":8}],45:[function(e,r,t){"use strict";var n=e("../helpers/parse_link_label"),s=e("../helpers/parse_link_destination"),o=e("../helpers/parse_link_title"),i=e("../common/utils").normalizeReference,a=e("../common/utils").isSpace;r.exports=function(e,r){var t,c,l,u,p,h,f,d,m,g,_="",k=e.pos,b=e.posMax,v=e.pos;if(91!==e.src.charCodeAt(e.pos))return!1;if(p=e.pos+1,u=n(e,e.pos,!0),0>u)return!1;if(h=u+1,b>h&&40===e.src.charCodeAt(h)){for(h++;b>h&&(c=e.src.charCodeAt(h),a(c)||10===c);h++);if(h>=b)return!1;for(v=h,f=s(e.src,h,e.posMax),f.ok&&(_=e.md.normalizeLink(f.str),e.md.validateLink(_)?h=f.pos:_=""),v=h;b>h&&(c=e.src.charCodeAt(h),a(c)||10===c);h++);if(f=o(e.src,h,e.posMax),b>h&&v!==h&&f.ok)for(m=f.str,h=f.pos;b>h&&(c=e.src.charCodeAt(h),a(c)||10===c);h++);else m="";if(h>=b||41!==e.src.charCodeAt(h))return e.pos=k,!1;h++}else{if("undefined"==typeof e.env.references)return!1;if(b>h&&91===e.src.charCodeAt(h)?(v=h+1,h=n(e,h),h>=0?l=e.src.slice(v,h++):h=u+1):h=u+1,l||(l=e.src.slice(p,u)),d=e.env.references[i(l)],!d)return e.pos=k,!1;_=d.href,m=d.title}return r||(e.pos=p,e.posMax=u,g=e.push("link_open","a",1),g.attrs=t=[["href",_]],m&&t.push(["title",m]),e.md.inline.tokenize(e),g=e.push("link_close","a",-1)),e.pos=h,e.posMax=b,!0}},{"../common/utils":4,"../helpers/parse_link_destination":6,"../helpers/parse_link_label":7,"../helpers/parse_link_title":8}],46:[function(e,r,t){"use strict";r.exports=function(e,r){var t,n,s=e.pos;if(10!==e.src.charCodeAt(s))return!1;for(t=e.pending.length-1,n=e.posMax,r||(t>=0&&32===e.pending.charCodeAt(t)?t>=1&&32===e.pending.charCodeAt(t-1)?(e.pending=e.pending.replace(/ +$/,""),e.push("hardbreak","br",0)):(e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0)):e.push("softbreak","br",0)),s++;n>s&&32===e.src.charCodeAt(s);)s++;return e.pos=s,!0}},{}],47:[function(e,r,t){"use strict";function n(e,r,t,n){this.src=e,this.env=t,this.md=r,this.tokens=n,this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[]}var s=e("../token"),o=e("../common/utils").isWhiteSpace,i=e("../common/utils").isPunctChar,a=e("../common/utils").isMdAsciiPunct;n.prototype.pushPending=function(){var e=new s("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},n.prototype.push=function(e,r,t){this.pending&&this.pushPending();var n=new s(e,r,t);return 0>t&&this.level--,n.level=this.level,t>0&&this.level++,this.pendingLevel=this.level,this.tokens.push(n),n},n.prototype.scanDelims=function(e,r){var t,n,s,c,l,u,p,h,f,d=e,m=!0,g=!0,_=this.posMax,k=this.src.charCodeAt(e);for(t=e>0?this.src.charCodeAt(e-1):32;_>d&&this.src.charCodeAt(d)===k;)d++;return s=d-e,n=_>d?this.src.charCodeAt(d):32,p=a(t)||i(String.fromCharCode(t)),f=a(n)||i(String.fromCharCode(n)),u=o(t),h=o(n),h?m=!1:f&&(u||p||(m=!1)),u?g=!1:p&&(h||f||(g=!1)),r?(c=m,l=g):(c=m&&(!g||p),l=g&&(!m||f)),{can_open:c,can_close:l,length:s}},n.prototype.Token=s,r.exports=n},{"../common/utils":4,"../token":51}],48:[function(e,r,t){"use strict";r.exports.tokenize=function(e,r){var t,n,s,o,i,a=e.pos,c=e.src.charCodeAt(a);if(r)return!1;if(126!==c)return!1;if(n=e.scanDelims(e.pos,!0),o=n.length,i=String.fromCharCode(c),2>o)return!1;for(o%2&&(s=e.push("text","",0),s.content=i,o--),t=0;o>t;t+=2)s=e.push("text","",0),s.content=i+i,e.delimiters.push({marker:c,jump:t,token:e.tokens.length-1,level:e.level,end:-1,open:n.can_open,close:n.can_close});return e.pos+=n.length,!0},r.exports.postProcess=function(e){var r,t,n,s,o,i=[],a=e.delimiters,c=e.delimiters.length;for(r=0;c>r;r++)n=a[r],126===n.marker&&-1!==n.end&&(s=a[n.end],o=e.tokens[n.token],o.type="s_open",o.tag="s",o.nesting=1,o.markup="~~",o.content="",o=e.tokens[s.token],o.type="s_close",o.tag="s",o.nesting=-1,o.markup="~~",o.content="","text"===e.tokens[s.token-1].type&&"~"===e.tokens[s.token-1].content&&i.push(s.token-1));for(;i.length;){for(r=i.pop(),t=r+1;tr;r++)n+=s[r].nesting,s[r].level=n,"text"===s[r].type&&o>r+1&&"text"===s[r+1].type?s[r+1].content=s[r].content+s[r+1].content:(r!==t&&(s[t]=s[r]),t++);r!==t&&(s.length=t)}},{}],51:[function(e,r,t){"use strict";function n(e,r,t){this.type=e,this.tag=r,this.attrs=null,this.map=null,this.nesting=t,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}n.prototype.attrIndex=function(e){var r,t,n;if(!this.attrs)return-1;for(r=this.attrs,t=0,n=r.length;n>t;t++)if(r[t][0]===e)return t;return-1},n.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]},n.prototype.attrSet=function(e,r){var t=this.attrIndex(e),n=[e,r];0>t?this.attrPush(n):this.attrs[t]=n},n.prototype.attrJoin=function(e,r){var t=this.attrIndex(e);0>t?this.attrPush([e,r]):this.attrs[t][1]=this.attrs[t][1]+" "+r},r.exports=n},{}],52:[function(r,t,n){(function(r){!function(s){function o(e){throw new RangeError(R[e])}function i(e,r){for(var t=e.length,n=[];t--;)n[t]=r(e[t]);return n}function a(e,r){var t=e.split("@"),n="";t.length>1&&(n=t[0]+"@",e=t[1]),e=e.replace(T,".");var s=e.split("."),o=i(s,r).join(".");return n+o}function c(e){for(var r,t,n=[],s=0,o=e.length;o>s;)r=e.charCodeAt(s++),r>=55296&&56319>=r&&o>s?(t=e.charCodeAt(s++),56320==(64512&t)?n.push(((1023&r)<<10)+(1023&t)+65536):(n.push(r),s--)):n.push(r);return n}function l(e){return i(e,function(e){var r="";return e>65535&&(e-=65536,r+=B(e>>>10&1023|55296),e=56320|1023&e),r+=B(e)}).join("")}function u(e){return 10>e-48?e-22:26>e-65?e-65:26>e-97?e-97:C}function p(e,r){return e+22+75*(26>e)-((0!=r)<<5)}function h(e,r,t){var n=0;for(e=t?I(e/D):e>>1,e+=I(e/r);e>M*w>>1;n+=C)e=I(e/M);return I(n+(M+1)*e/(e+q))}function f(e){var r,t,n,s,i,a,c,p,f,d,m=[],g=e.length,_=0,k=S,b=E;for(t=e.lastIndexOf(F),0>t&&(t=0),n=0;t>n;++n)e.charCodeAt(n)>=128&&o("not-basic"),m.push(e.charCodeAt(n));for(s=t>0?t+1:0;g>s;){for(i=_,a=1,c=C;s>=g&&o("invalid-input"),p=u(e.charCodeAt(s++)),(p>=C||p>I((y-_)/a))&&o("overflow"),_+=p*a,f=b>=c?A:c>=b+w?w:c-b,!(f>p);c+=C)d=C-f,a>I(y/d)&&o("overflow"),a*=d;r=m.length+1,b=h(_-i,r,0==i),I(_/r)>y-k&&o("overflow"),k+=I(_/r),_%=r,m.splice(_++,0,k)}return l(m)}function d(e){var r,t,n,s,i,a,l,u,f,d,m,g,_,k,b,v=[];for(e=c(e),g=e.length,r=S,t=0,i=E,a=0;g>a;++a)m=e[a],128>m&&v.push(B(m));for(n=s=v.length,s&&v.push(F);g>n;){for(l=y,a=0;g>a;++a)m=e[a],m>=r&&l>m&&(l=m);for(_=n+1,l-r>I((y-t)/_)&&o("overflow"),t+=(l-r)*_,r=l,a=0;g>a;++a)if(m=e[a],r>m&&++t>y&&o("overflow"),m==r){for(u=t,f=C;d=i>=f?A:f>=i+w?w:f-i,!(d>u);f+=C)b=u-d,k=C-d,v.push(B(p(d+b%k,0))),u=I(b/k);v.push(B(p(u,0))),i=h(t,_,n==s),t=0,++n}++t,++r}return v.join("")}function m(e){return a(e,function(e){return L.test(e)?f(e.slice(4).toLowerCase()):e})}function g(e){return a(e,function(e){return z.test(e)?"xn--"+d(e):e})}var _="object"==typeof n&&n&&!n.nodeType&&n,k="object"==typeof t&&t&&!t.nodeType&&t,b="object"==typeof r&&r;b.global!==b&&b.window!==b&&b.self!==b||(s=b);var v,x,y=2147483647,C=36,A=1,w=26,q=38,D=700,E=72,S=128,F="-",L=/^xn--/,z=/[^\x20-\x7E]/,T=/[\x2E\u3002\uFF0E\uFF61]/g,R={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},M=C-A,I=Math.floor,B=String.fromCharCode;if(v={version:"1.3.2",ucs2:{decode:c,encode:l},decode:f,encode:d,toASCII:g,toUnicode:m},"function"==typeof e&&"object"==typeof e.amd&&e.amd)e("punycode",function(){return v});else if(_&&k)if(t.exports==_)k.exports=v;else for(x in v)v.hasOwnProperty(x)&&(_[x]=v[x]);else s.punycode=v}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],53:[function(e,r,t){r.exports={Aacute:"\xc1",aacute:"\xe1",Abreve:"\u0102",abreve:"\u0103",ac:"\u223e",acd:"\u223f",acE:"\u223e\u0333",Acirc:"\xc2",acirc:"\xe2",acute:"\xb4",Acy:"\u0410",acy:"\u0430",AElig:"\xc6",aelig:"\xe6",af:"\u2061",Afr:"\ud835\udd04",afr:"\ud835\udd1e",Agrave:"\xc0",agrave:"\xe0",alefsym:"\u2135",aleph:"\u2135",Alpha:"\u0391",alpha:"\u03b1",Amacr:"\u0100",amacr:"\u0101",amalg:"\u2a3f",amp:"&",AMP:"&",andand:"\u2a55",And:"\u2a53",and:"\u2227",andd:"\u2a5c",andslope:"\u2a58",andv:"\u2a5a",ang:"\u2220",ange:"\u29a4",angle:"\u2220",angmsdaa:"\u29a8",angmsdab:"\u29a9",angmsdac:"\u29aa",angmsdad:"\u29ab",angmsdae:"\u29ac",angmsdaf:"\u29ad",angmsdag:"\u29ae",angmsdah:"\u29af",angmsd:"\u2221",angrt:"\u221f",angrtvb:"\u22be",angrtvbd:"\u299d",angsph:"\u2222",angst:"\xc5",angzarr:"\u237c",Aogon:"\u0104",aogon:"\u0105",Aopf:"\ud835\udd38",aopf:"\ud835\udd52",apacir:"\u2a6f",ap:"\u2248",apE:"\u2a70",ape:"\u224a",apid:"\u224b",apos:"'",ApplyFunction:"\u2061",approx:"\u2248",approxeq:"\u224a",Aring:"\xc5",aring:"\xe5",Ascr:"\ud835\udc9c",ascr:"\ud835\udcb6",Assign:"\u2254",ast:"*",asymp:"\u2248",asympeq:"\u224d",Atilde:"\xc3",atilde:"\xe3",Auml:"\xc4",auml:"\xe4",awconint:"\u2233",awint:"\u2a11",backcong:"\u224c",backepsilon:"\u03f6",backprime:"\u2035",backsim:"\u223d",backsimeq:"\u22cd",Backslash:"\u2216",Barv:"\u2ae7",barvee:"\u22bd",barwed:"\u2305",Barwed:"\u2306",barwedge:"\u2305",bbrk:"\u23b5",bbrktbrk:"\u23b6",bcong:"\u224c",Bcy:"\u0411",bcy:"\u0431",bdquo:"\u201e",becaus:"\u2235",because:"\u2235",Because:"\u2235",bemptyv:"\u29b0",bepsi:"\u03f6",bernou:"\u212c",Bernoullis:"\u212c",Beta:"\u0392",beta:"\u03b2",beth:"\u2136",between:"\u226c",Bfr:"\ud835\udd05",bfr:"\ud835\udd1f",bigcap:"\u22c2",bigcirc:"\u25ef",bigcup:"\u22c3",bigodot:"\u2a00",bigoplus:"\u2a01",bigotimes:"\u2a02",bigsqcup:"\u2a06",bigstar:"\u2605",bigtriangledown:"\u25bd",bigtriangleup:"\u25b3",biguplus:"\u2a04",bigvee:"\u22c1",bigwedge:"\u22c0",bkarow:"\u290d",blacklozenge:"\u29eb",blacksquare:"\u25aa",blacktriangle:"\u25b4",blacktriangledown:"\u25be",blacktriangleleft:"\u25c2",blacktriangleright:"\u25b8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20e5",bnequiv:"\u2261\u20e5",bNot:"\u2aed",bnot:"\u2310",Bopf:"\ud835\udd39",bopf:"\ud835\udd53",bot:"\u22a5",bottom:"\u22a5",bowtie:"\u22c8",boxbox:"\u29c9",boxdl:"\u2510",boxdL:"\u2555",boxDl:"\u2556",boxDL:"\u2557",boxdr:"\u250c",boxdR:"\u2552",boxDr:"\u2553",boxDR:"\u2554",boxh:"\u2500",boxH:"\u2550",boxhd:"\u252c",boxHd:"\u2564",boxhD:"\u2565",boxHD:"\u2566",boxhu:"\u2534",boxHu:"\u2567",boxhU:"\u2568",boxHU:"\u2569",boxminus:"\u229f",boxplus:"\u229e",boxtimes:"\u22a0",boxul:"\u2518",boxuL:"\u255b",boxUl:"\u255c",boxUL:"\u255d",boxur:"\u2514",boxuR:"\u2558",boxUr:"\u2559",boxUR:"\u255a",boxv:"\u2502",boxV:"\u2551",boxvh:"\u253c",boxvH:"\u256a",boxVh:"\u256b",boxVH:"\u256c",boxvl:"\u2524",boxvL:"\u2561",boxVl:"\u2562",boxVL:"\u2563",boxvr:"\u251c",boxvR:"\u255e",boxVr:"\u255f",boxVR:"\u2560",bprime:"\u2035",breve:"\u02d8",Breve:"\u02d8",brvbar:"\xa6",bscr:"\ud835\udcb7",Bscr:"\u212c",bsemi:"\u204f",bsim:"\u223d",bsime:"\u22cd",bsolb:"\u29c5",bsol:"\\",bsolhsub:"\u27c8",bull:"\u2022",bullet:"\u2022",bump:"\u224e",bumpE:"\u2aae",bumpe:"\u224f",Bumpeq:"\u224e",bumpeq:"\u224f",Cacute:"\u0106",cacute:"\u0107",capand:"\u2a44",capbrcup:"\u2a49",capcap:"\u2a4b",cap:"\u2229",Cap:"\u22d2",capcup:"\u2a47",capdot:"\u2a40",CapitalDifferentialD:"\u2145",caps:"\u2229\ufe00",caret:"\u2041",caron:"\u02c7",Cayleys:"\u212d",ccaps:"\u2a4d",Ccaron:"\u010c",ccaron:"\u010d",Ccedil:"\xc7",ccedil:"\xe7",Ccirc:"\u0108",ccirc:"\u0109",Cconint:"\u2230",ccups:"\u2a4c",ccupssm:"\u2a50",Cdot:"\u010a",cdot:"\u010b",cedil:"\xb8",Cedilla:"\xb8",cemptyv:"\u29b2",cent:"\xa2",centerdot:"\xb7",CenterDot:"\xb7",cfr:"\ud835\udd20",Cfr:"\u212d",CHcy:"\u0427",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",Chi:"\u03a7",chi:"\u03c7",circ:"\u02c6",circeq:"\u2257",circlearrowleft:"\u21ba",circlearrowright:"\u21bb",circledast:"\u229b",circledcirc:"\u229a",circleddash:"\u229d",CircleDot:"\u2299",circledR:"\xae",circledS:"\u24c8",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",cir:"\u25cb",cirE:"\u29c3",cire:"\u2257",cirfnint:"\u2a10",cirmid:"\u2aef",cirscir:"\u29c2",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201d",CloseCurlyQuote:"\u2019",clubs:"\u2663",clubsuit:"\u2663",colon:":",Colon:"\u2237",Colone:"\u2a74",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2a6d",Congruent:"\u2261",conint:"\u222e",Conint:"\u222f",ContourIntegral:"\u222e",copf:"\ud835\udd54",Copf:"\u2102",coprod:"\u2210",Coproduct:"\u2210",copy:"\xa9",COPY:"\xa9",copysr:"\u2117",CounterClockwiseContourIntegral:"\u2233",crarr:"\u21b5",cross:"\u2717",Cross:"\u2a2f",Cscr:"\ud835\udc9e",cscr:"\ud835\udcb8",csub:"\u2acf",csube:"\u2ad1",csup:"\u2ad0",csupe:"\u2ad2",ctdot:"\u22ef",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22de",cuesc:"\u22df",cularr:"\u21b6",cularrp:"\u293d",cupbrcap:"\u2a48",cupcap:"\u2a46",CupCap:"\u224d",cup:"\u222a",Cup:"\u22d3",cupcup:"\u2a4a",cupdot:"\u228d",cupor:"\u2a45",cups:"\u222a\ufe00",curarr:"\u21b7",curarrm:"\u293c",curlyeqprec:"\u22de",curlyeqsucc:"\u22df",curlyvee:"\u22ce",curlywedge:"\u22cf",curren:"\xa4",curvearrowleft:"\u21b6",curvearrowright:"\u21b7",cuvee:"\u22ce",cuwed:"\u22cf",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232d",dagger:"\u2020",Dagger:"\u2021",daleth:"\u2138",darr:"\u2193",Darr:"\u21a1",dArr:"\u21d3",dash:"\u2010",Dashv:"\u2ae4",dashv:"\u22a3",dbkarow:"\u290f",dblac:"\u02dd",Dcaron:"\u010e",dcaron:"\u010f",Dcy:"\u0414",dcy:"\u0434",ddagger:"\u2021",ddarr:"\u21ca",DD:"\u2145",dd:"\u2146",DDotrahd:"\u2911",ddotseq:"\u2a77",deg:"\xb0",Del:"\u2207",Delta:"\u0394",delta:"\u03b4",demptyv:"\u29b1",dfisht:"\u297f",Dfr:"\ud835\udd07",dfr:"\ud835\udd21",dHar:"\u2965",dharl:"\u21c3",dharr:"\u21c2",DiacriticalAcute:"\xb4",DiacriticalDot:"\u02d9",DiacriticalDoubleAcute:"\u02dd",DiacriticalGrave:"`",DiacriticalTilde:"\u02dc",diam:"\u22c4",diamond:"\u22c4",Diamond:"\u22c4",diamondsuit:"\u2666",diams:"\u2666",die:"\xa8",DifferentialD:"\u2146",digamma:"\u03dd",disin:"\u22f2",div:"\xf7",divide:"\xf7",divideontimes:"\u22c7",divonx:"\u22c7",DJcy:"\u0402",djcy:"\u0452",dlcorn:"\u231e",dlcrop:"\u230d",dollar:"$",Dopf:"\ud835\udd3b",dopf:"\ud835\udd55",Dot:"\xa8",dot:"\u02d9",DotDot:"\u20dc",doteq:"\u2250",doteqdot:"\u2251",DotEqual:"\u2250",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22a1",doublebarwedge:"\u2306",DoubleContourIntegral:"\u222f",DoubleDot:"\xa8",DoubleDownArrow:"\u21d3",DoubleLeftArrow:"\u21d0",DoubleLeftRightArrow:"\u21d4",DoubleLeftTee:"\u2ae4",DoubleLongLeftArrow:"\u27f8",DoubleLongLeftRightArrow:"\u27fa",DoubleLongRightArrow:"\u27f9",DoubleRightArrow:"\u21d2",DoubleRightTee:"\u22a8",DoubleUpArrow:"\u21d1",DoubleUpDownArrow:"\u21d5",DoubleVerticalBar:"\u2225",DownArrowBar:"\u2913",downarrow:"\u2193",DownArrow:"\u2193",Downarrow:"\u21d3",DownArrowUpArrow:"\u21f5",DownBreve:"\u0311",downdownarrows:"\u21ca",downharpoonleft:"\u21c3",downharpoonright:"\u21c2",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295e",DownLeftVectorBar:"\u2956",DownLeftVector:"\u21bd",DownRightTeeVector:"\u295f",DownRightVectorBar:"\u2957",DownRightVector:"\u21c1",DownTeeArrow:"\u21a7",DownTee:"\u22a4",drbkarow:"\u2910",drcorn:"\u231f",drcrop:"\u230c",Dscr:"\ud835\udc9f",dscr:"\ud835\udcb9",DScy:"\u0405",dscy:"\u0455",dsol:"\u29f6",Dstrok:"\u0110",dstrok:"\u0111",dtdot:"\u22f1",dtri:"\u25bf",dtrif:"\u25be",duarr:"\u21f5",duhar:"\u296f",dwangle:"\u29a6",DZcy:"\u040f",dzcy:"\u045f",dzigrarr:"\u27ff",Eacute:"\xc9",eacute:"\xe9",easter:"\u2a6e",Ecaron:"\u011a",ecaron:"\u011b",Ecirc:"\xca",ecirc:"\xea",ecir:"\u2256",ecolon:"\u2255",Ecy:"\u042d",ecy:"\u044d",eDDot:"\u2a77",Edot:"\u0116",edot:"\u0117",eDot:"\u2251",ee:"\u2147",efDot:"\u2252",Efr:"\ud835\udd08",efr:"\ud835\udd22",eg:"\u2a9a",Egrave:"\xc8",egrave:"\xe8",egs:"\u2a96",egsdot:"\u2a98",el:"\u2a99",Element:"\u2208",elinters:"\u23e7",ell:"\u2113",els:"\u2a95",elsdot:"\u2a97",Emacr:"\u0112",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",EmptySmallSquare:"\u25fb",emptyv:"\u2205",EmptyVerySmallSquare:"\u25ab",emsp13:"\u2004",emsp14:"\u2005",emsp:"\u2003",ENG:"\u014a",eng:"\u014b",ensp:"\u2002",Eogon:"\u0118",eogon:"\u0119",Eopf:"\ud835\udd3c",eopf:"\ud835\udd56",epar:"\u22d5",eparsl:"\u29e3",eplus:"\u2a71",epsi:"\u03b5",Epsilon:"\u0395",epsilon:"\u03b5",epsiv:"\u03f5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2a96",eqslantless:"\u2a95",Equal:"\u2a75",equals:"=",EqualTilde:"\u2242",equest:"\u225f",Equilibrium:"\u21cc",equiv:"\u2261",equivDD:"\u2a78",eqvparsl:"\u29e5",erarr:"\u2971",erDot:"\u2253",escr:"\u212f",Escr:"\u2130",esdot:"\u2250",Esim:"\u2a73",esim:"\u2242",Eta:"\u0397",eta:"\u03b7",ETH:"\xd0",eth:"\xf0",Euml:"\xcb",euml:"\xeb",euro:"\u20ac",excl:"!",exist:"\u2203",Exists:"\u2203",expectation:"\u2130",exponentiale:"\u2147",ExponentialE:"\u2147",fallingdotseq:"\u2252",Fcy:"\u0424",fcy:"\u0444",female:"\u2640",ffilig:"\ufb03",fflig:"\ufb00",ffllig:"\ufb04",Ffr:"\ud835\udd09",ffr:"\ud835\udd23",filig:"\ufb01",FilledSmallSquare:"\u25fc",FilledVerySmallSquare:"\u25aa",fjlig:"fj",flat:"\u266d",fllig:"\ufb02",fltns:"\u25b1",fnof:"\u0192",Fopf:"\ud835\udd3d",fopf:"\ud835\udd57",forall:"\u2200",ForAll:"\u2200",fork:"\u22d4",forkv:"\u2ad9",Fouriertrf:"\u2131",fpartint:"\u2a0d",frac12:"\xbd",frac13:"\u2153",frac14:"\xbc",frac15:"\u2155",frac16:"\u2159",frac18:"\u215b",frac23:"\u2154",frac25:"\u2156",frac34:"\xbe",frac35:"\u2157",frac38:"\u215c",frac45:"\u2158",frac56:"\u215a",frac58:"\u215d",frac78:"\u215e",frasl:"\u2044",frown:"\u2322",fscr:"\ud835\udcbb",Fscr:"\u2131",gacute:"\u01f5",Gamma:"\u0393",gamma:"\u03b3",Gammad:"\u03dc",gammad:"\u03dd",gap:"\u2a86",Gbreve:"\u011e",gbreve:"\u011f",Gcedil:"\u0122",Gcirc:"\u011c",gcirc:"\u011d",Gcy:"\u0413",gcy:"\u0433",Gdot:"\u0120",gdot:"\u0121",ge:"\u2265",gE:"\u2267",gEl:"\u2a8c",gel:"\u22db",geq:"\u2265",geqq:"\u2267",geqslant:"\u2a7e",gescc:"\u2aa9",ges:"\u2a7e",gesdot:"\u2a80",gesdoto:"\u2a82",gesdotol:"\u2a84",gesl:"\u22db\ufe00",gesles:"\u2a94",Gfr:"\ud835\udd0a",gfr:"\ud835\udd24",gg:"\u226b",Gg:"\u22d9",ggg:"\u22d9",gimel:"\u2137",GJcy:"\u0403",gjcy:"\u0453",gla:"\u2aa5",gl:"\u2277",glE:"\u2a92",glj:"\u2aa4",gnap:"\u2a8a",gnapprox:"\u2a8a",gne:"\u2a88",gnE:"\u2269",gneq:"\u2a88",gneqq:"\u2269",gnsim:"\u22e7",Gopf:"\ud835\udd3e",gopf:"\ud835\udd58",grave:"`",GreaterEqual:"\u2265",GreaterEqualLess:"\u22db",GreaterFullEqual:"\u2267",GreaterGreater:"\u2aa2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2a7e",GreaterTilde:"\u2273",Gscr:"\ud835\udca2",gscr:"\u210a",gsim:"\u2273",gsime:"\u2a8e",gsiml:"\u2a90",gtcc:"\u2aa7",gtcir:"\u2a7a",gt:">",GT:">",Gt:"\u226b",gtdot:"\u22d7",gtlPar:"\u2995",gtquest:"\u2a7c",gtrapprox:"\u2a86",gtrarr:"\u2978",gtrdot:"\u22d7",gtreqless:"\u22db",gtreqqless:"\u2a8c",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\ufe00",gvnE:"\u2269\ufe00",Hacek:"\u02c7",hairsp:"\u200a",half:"\xbd",hamilt:"\u210b",HARDcy:"\u042a",hardcy:"\u044a",harrcir:"\u2948",harr:"\u2194",hArr:"\u21d4",harrw:"\u21ad",Hat:"^",hbar:"\u210f",Hcirc:"\u0124",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22b9",hfr:"\ud835\udd25",Hfr:"\u210c",HilbertSpace:"\u210b",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21ff",homtht:"\u223b",hookleftarrow:"\u21a9",hookrightarrow:"\u21aa",hopf:"\ud835\udd59",Hopf:"\u210d",horbar:"\u2015",HorizontalLine:"\u2500",hscr:"\ud835\udcbd",Hscr:"\u210b",hslash:"\u210f",Hstrok:"\u0126",hstrok:"\u0127",HumpDownHump:"\u224e",HumpEqual:"\u224f",hybull:"\u2043",hyphen:"\u2010",Iacute:"\xcd",iacute:"\xed",ic:"\u2063",Icirc:"\xce",icirc:"\xee",Icy:"\u0418",icy:"\u0438",Idot:"\u0130",IEcy:"\u0415",iecy:"\u0435",iexcl:"\xa1",iff:"\u21d4",ifr:"\ud835\udd26",Ifr:"\u2111",Igrave:"\xcc",igrave:"\xec",ii:"\u2148", -iiiint:"\u2a0c",iiint:"\u222d",iinfin:"\u29dc",iiota:"\u2129",IJlig:"\u0132",ijlig:"\u0133",Imacr:"\u012a",imacr:"\u012b",image:"\u2111",ImaginaryI:"\u2148",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",Im:"\u2111",imof:"\u22b7",imped:"\u01b5",Implies:"\u21d2",incare:"\u2105","in":"\u2208",infin:"\u221e",infintie:"\u29dd",inodot:"\u0131",intcal:"\u22ba","int":"\u222b",Int:"\u222c",integers:"\u2124",Integral:"\u222b",intercal:"\u22ba",Intersection:"\u22c2",intlarhk:"\u2a17",intprod:"\u2a3c",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",IOcy:"\u0401",iocy:"\u0451",Iogon:"\u012e",iogon:"\u012f",Iopf:"\ud835\udd40",iopf:"\ud835\udd5a",Iota:"\u0399",iota:"\u03b9",iprod:"\u2a3c",iquest:"\xbf",iscr:"\ud835\udcbe",Iscr:"\u2110",isin:"\u2208",isindot:"\u22f5",isinE:"\u22f9",isins:"\u22f4",isinsv:"\u22f3",isinv:"\u2208",it:"\u2062",Itilde:"\u0128",itilde:"\u0129",Iukcy:"\u0406",iukcy:"\u0456",Iuml:"\xcf",iuml:"\xef",Jcirc:"\u0134",jcirc:"\u0135",Jcy:"\u0419",jcy:"\u0439",Jfr:"\ud835\udd0d",jfr:"\ud835\udd27",jmath:"\u0237",Jopf:"\ud835\udd41",jopf:"\ud835\udd5b",Jscr:"\ud835\udca5",jscr:"\ud835\udcbf",Jsercy:"\u0408",jsercy:"\u0458",Jukcy:"\u0404",jukcy:"\u0454",Kappa:"\u039a",kappa:"\u03ba",kappav:"\u03f0",Kcedil:"\u0136",kcedil:"\u0137",Kcy:"\u041a",kcy:"\u043a",Kfr:"\ud835\udd0e",kfr:"\ud835\udd28",kgreen:"\u0138",KHcy:"\u0425",khcy:"\u0445",KJcy:"\u040c",kjcy:"\u045c",Kopf:"\ud835\udd42",kopf:"\ud835\udd5c",Kscr:"\ud835\udca6",kscr:"\ud835\udcc0",lAarr:"\u21da",Lacute:"\u0139",lacute:"\u013a",laemptyv:"\u29b4",lagran:"\u2112",Lambda:"\u039b",lambda:"\u03bb",lang:"\u27e8",Lang:"\u27ea",langd:"\u2991",langle:"\u27e8",lap:"\u2a85",Laplacetrf:"\u2112",laquo:"\xab",larrb:"\u21e4",larrbfs:"\u291f",larr:"\u2190",Larr:"\u219e",lArr:"\u21d0",larrfs:"\u291d",larrhk:"\u21a9",larrlp:"\u21ab",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21a2",latail:"\u2919",lAtail:"\u291b",lat:"\u2aab",late:"\u2aad",lates:"\u2aad\ufe00",lbarr:"\u290c",lBarr:"\u290e",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298b",lbrksld:"\u298f",lbrkslu:"\u298d",Lcaron:"\u013d",lcaron:"\u013e",Lcedil:"\u013b",lcedil:"\u013c",lceil:"\u2308",lcub:"{",Lcy:"\u041b",lcy:"\u043b",ldca:"\u2936",ldquo:"\u201c",ldquor:"\u201e",ldrdhar:"\u2967",ldrushar:"\u294b",ldsh:"\u21b2",le:"\u2264",lE:"\u2266",LeftAngleBracket:"\u27e8",LeftArrowBar:"\u21e4",leftarrow:"\u2190",LeftArrow:"\u2190",Leftarrow:"\u21d0",LeftArrowRightArrow:"\u21c6",leftarrowtail:"\u21a2",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27e6",LeftDownTeeVector:"\u2961",LeftDownVectorBar:"\u2959",LeftDownVector:"\u21c3",LeftFloor:"\u230a",leftharpoondown:"\u21bd",leftharpoonup:"\u21bc",leftleftarrows:"\u21c7",leftrightarrow:"\u2194",LeftRightArrow:"\u2194",Leftrightarrow:"\u21d4",leftrightarrows:"\u21c6",leftrightharpoons:"\u21cb",leftrightsquigarrow:"\u21ad",LeftRightVector:"\u294e",LeftTeeArrow:"\u21a4",LeftTee:"\u22a3",LeftTeeVector:"\u295a",leftthreetimes:"\u22cb",LeftTriangleBar:"\u29cf",LeftTriangle:"\u22b2",LeftTriangleEqual:"\u22b4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVectorBar:"\u2958",LeftUpVector:"\u21bf",LeftVectorBar:"\u2952",LeftVector:"\u21bc",lEg:"\u2a8b",leg:"\u22da",leq:"\u2264",leqq:"\u2266",leqslant:"\u2a7d",lescc:"\u2aa8",les:"\u2a7d",lesdot:"\u2a7f",lesdoto:"\u2a81",lesdotor:"\u2a83",lesg:"\u22da\ufe00",lesges:"\u2a93",lessapprox:"\u2a85",lessdot:"\u22d6",lesseqgtr:"\u22da",lesseqqgtr:"\u2a8b",LessEqualGreater:"\u22da",LessFullEqual:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",LessLess:"\u2aa1",lesssim:"\u2272",LessSlantEqual:"\u2a7d",LessTilde:"\u2272",lfisht:"\u297c",lfloor:"\u230a",Lfr:"\ud835\udd0f",lfr:"\ud835\udd29",lg:"\u2276",lgE:"\u2a91",lHar:"\u2962",lhard:"\u21bd",lharu:"\u21bc",lharul:"\u296a",lhblk:"\u2584",LJcy:"\u0409",ljcy:"\u0459",llarr:"\u21c7",ll:"\u226a",Ll:"\u22d8",llcorner:"\u231e",Lleftarrow:"\u21da",llhard:"\u296b",lltri:"\u25fa",Lmidot:"\u013f",lmidot:"\u0140",lmoustache:"\u23b0",lmoust:"\u23b0",lnap:"\u2a89",lnapprox:"\u2a89",lne:"\u2a87",lnE:"\u2268",lneq:"\u2a87",lneqq:"\u2268",lnsim:"\u22e6",loang:"\u27ec",loarr:"\u21fd",lobrk:"\u27e6",longleftarrow:"\u27f5",LongLeftArrow:"\u27f5",Longleftarrow:"\u27f8",longleftrightarrow:"\u27f7",LongLeftRightArrow:"\u27f7",Longleftrightarrow:"\u27fa",longmapsto:"\u27fc",longrightarrow:"\u27f6",LongRightArrow:"\u27f6",Longrightarrow:"\u27f9",looparrowleft:"\u21ab",looparrowright:"\u21ac",lopar:"\u2985",Lopf:"\ud835\udd43",lopf:"\ud835\udd5d",loplus:"\u2a2d",lotimes:"\u2a34",lowast:"\u2217",lowbar:"_",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",loz:"\u25ca",lozenge:"\u25ca",lozf:"\u29eb",lpar:"(",lparlt:"\u2993",lrarr:"\u21c6",lrcorner:"\u231f",lrhar:"\u21cb",lrhard:"\u296d",lrm:"\u200e",lrtri:"\u22bf",lsaquo:"\u2039",lscr:"\ud835\udcc1",Lscr:"\u2112",lsh:"\u21b0",Lsh:"\u21b0",lsim:"\u2272",lsime:"\u2a8d",lsimg:"\u2a8f",lsqb:"[",lsquo:"\u2018",lsquor:"\u201a",Lstrok:"\u0141",lstrok:"\u0142",ltcc:"\u2aa6",ltcir:"\u2a79",lt:"<",LT:"<",Lt:"\u226a",ltdot:"\u22d6",lthree:"\u22cb",ltimes:"\u22c9",ltlarr:"\u2976",ltquest:"\u2a7b",ltri:"\u25c3",ltrie:"\u22b4",ltrif:"\u25c2",ltrPar:"\u2996",lurdshar:"\u294a",luruhar:"\u2966",lvertneqq:"\u2268\ufe00",lvnE:"\u2268\ufe00",macr:"\xaf",male:"\u2642",malt:"\u2720",maltese:"\u2720",Map:"\u2905",map:"\u21a6",mapsto:"\u21a6",mapstodown:"\u21a7",mapstoleft:"\u21a4",mapstoup:"\u21a5",marker:"\u25ae",mcomma:"\u2a29",Mcy:"\u041c",mcy:"\u043c",mdash:"\u2014",mDDot:"\u223a",measuredangle:"\u2221",MediumSpace:"\u205f",Mellintrf:"\u2133",Mfr:"\ud835\udd10",mfr:"\ud835\udd2a",mho:"\u2127",micro:"\xb5",midast:"*",midcir:"\u2af0",mid:"\u2223",middot:"\xb7",minusb:"\u229f",minus:"\u2212",minusd:"\u2238",minusdu:"\u2a2a",MinusPlus:"\u2213",mlcp:"\u2adb",mldr:"\u2026",mnplus:"\u2213",models:"\u22a7",Mopf:"\ud835\udd44",mopf:"\ud835\udd5e",mp:"\u2213",mscr:"\ud835\udcc2",Mscr:"\u2133",mstpos:"\u223e",Mu:"\u039c",mu:"\u03bc",multimap:"\u22b8",mumap:"\u22b8",nabla:"\u2207",Nacute:"\u0143",nacute:"\u0144",nang:"\u2220\u20d2",nap:"\u2249",napE:"\u2a70\u0338",napid:"\u224b\u0338",napos:"\u0149",napprox:"\u2249",natural:"\u266e",naturals:"\u2115",natur:"\u266e",nbsp:"\xa0",nbump:"\u224e\u0338",nbumpe:"\u224f\u0338",ncap:"\u2a43",Ncaron:"\u0147",ncaron:"\u0148",Ncedil:"\u0145",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2a6d\u0338",ncup:"\u2a42",Ncy:"\u041d",ncy:"\u043d",ndash:"\u2013",nearhk:"\u2924",nearr:"\u2197",neArr:"\u21d7",nearrow:"\u2197",ne:"\u2260",nedot:"\u2250\u0338",NegativeMediumSpace:"\u200b",NegativeThickSpace:"\u200b",NegativeThinSpace:"\u200b",NegativeVeryThinSpace:"\u200b",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",NestedGreaterGreater:"\u226b",NestedLessLess:"\u226a",NewLine:"\n",nexist:"\u2204",nexists:"\u2204",Nfr:"\ud835\udd11",nfr:"\ud835\udd2b",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2a7e\u0338",nges:"\u2a7e\u0338",nGg:"\u22d9\u0338",ngsim:"\u2275",nGt:"\u226b\u20d2",ngt:"\u226f",ngtr:"\u226f",nGtv:"\u226b\u0338",nharr:"\u21ae",nhArr:"\u21ce",nhpar:"\u2af2",ni:"\u220b",nis:"\u22fc",nisd:"\u22fa",niv:"\u220b",NJcy:"\u040a",njcy:"\u045a",nlarr:"\u219a",nlArr:"\u21cd",nldr:"\u2025",nlE:"\u2266\u0338",nle:"\u2270",nleftarrow:"\u219a",nLeftarrow:"\u21cd",nleftrightarrow:"\u21ae",nLeftrightarrow:"\u21ce",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2a7d\u0338",nles:"\u2a7d\u0338",nless:"\u226e",nLl:"\u22d8\u0338",nlsim:"\u2274",nLt:"\u226a\u20d2",nlt:"\u226e",nltri:"\u22ea",nltrie:"\u22ec",nLtv:"\u226a\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xa0",nopf:"\ud835\udd5f",Nopf:"\u2115",Not:"\u2aec",not:"\xac",NotCongruent:"\u2262",NotCupCap:"\u226d",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226f",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226b\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2a7e\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224e\u0338",NotHumpEqual:"\u224f\u0338",notin:"\u2209",notindot:"\u22f5\u0338",notinE:"\u22f9\u0338",notinva:"\u2209",notinvb:"\u22f7",notinvc:"\u22f6",NotLeftTriangleBar:"\u29cf\u0338",NotLeftTriangle:"\u22ea",NotLeftTriangleEqual:"\u22ec",NotLess:"\u226e",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226a\u0338",NotLessSlantEqual:"\u2a7d\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2aa2\u0338",NotNestedLessLess:"\u2aa1\u0338",notni:"\u220c",notniva:"\u220c",notnivb:"\u22fe",notnivc:"\u22fd",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2aaf\u0338",NotPrecedesSlantEqual:"\u22e0",NotReverseElement:"\u220c",NotRightTriangleBar:"\u29d0\u0338",NotRightTriangle:"\u22eb",NotRightTriangleEqual:"\u22ed",NotSquareSubset:"\u228f\u0338",NotSquareSubsetEqual:"\u22e2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22e3",NotSubset:"\u2282\u20d2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2ab0\u0338",NotSucceedsSlantEqual:"\u22e1",NotSucceedsTilde:"\u227f\u0338",NotSuperset:"\u2283\u20d2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",nparallel:"\u2226",npar:"\u2226",nparsl:"\u2afd\u20e5",npart:"\u2202\u0338",npolint:"\u2a14",npr:"\u2280",nprcue:"\u22e0",nprec:"\u2280",npreceq:"\u2aaf\u0338",npre:"\u2aaf\u0338",nrarrc:"\u2933\u0338",nrarr:"\u219b",nrArr:"\u21cf",nrarrw:"\u219d\u0338",nrightarrow:"\u219b",nRightarrow:"\u21cf",nrtri:"\u22eb",nrtrie:"\u22ed",nsc:"\u2281",nsccue:"\u22e1",nsce:"\u2ab0\u0338",Nscr:"\ud835\udca9",nscr:"\ud835\udcc3",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22e2",nsqsupe:"\u22e3",nsub:"\u2284",nsubE:"\u2ac5\u0338",nsube:"\u2288",nsubset:"\u2282\u20d2",nsubseteq:"\u2288",nsubseteqq:"\u2ac5\u0338",nsucc:"\u2281",nsucceq:"\u2ab0\u0338",nsup:"\u2285",nsupE:"\u2ac6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20d2",nsupseteq:"\u2289",nsupseteqq:"\u2ac6\u0338",ntgl:"\u2279",Ntilde:"\xd1",ntilde:"\xf1",ntlg:"\u2278",ntriangleleft:"\u22ea",ntrianglelefteq:"\u22ec",ntriangleright:"\u22eb",ntrianglerighteq:"\u22ed",Nu:"\u039d",nu:"\u03bd",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224d\u20d2",nvdash:"\u22ac",nvDash:"\u22ad",nVdash:"\u22ae",nVDash:"\u22af",nvge:"\u2265\u20d2",nvgt:">\u20d2",nvHarr:"\u2904",nvinfin:"\u29de",nvlArr:"\u2902",nvle:"\u2264\u20d2",nvlt:"<\u20d2",nvltrie:"\u22b4\u20d2",nvrArr:"\u2903",nvrtrie:"\u22b5\u20d2",nvsim:"\u223c\u20d2",nwarhk:"\u2923",nwarr:"\u2196",nwArr:"\u21d6",nwarrow:"\u2196",nwnear:"\u2927",Oacute:"\xd3",oacute:"\xf3",oast:"\u229b",Ocirc:"\xd4",ocirc:"\xf4",ocir:"\u229a",Ocy:"\u041e",ocy:"\u043e",odash:"\u229d",Odblac:"\u0150",odblac:"\u0151",odiv:"\u2a38",odot:"\u2299",odsold:"\u29bc",OElig:"\u0152",oelig:"\u0153",ofcir:"\u29bf",Ofr:"\ud835\udd12",ofr:"\ud835\udd2c",ogon:"\u02db",Ograve:"\xd2",ograve:"\xf2",ogt:"\u29c1",ohbar:"\u29b5",ohm:"\u03a9",oint:"\u222e",olarr:"\u21ba",olcir:"\u29be",olcross:"\u29bb",oline:"\u203e",olt:"\u29c0",Omacr:"\u014c",omacr:"\u014d",Omega:"\u03a9",omega:"\u03c9",Omicron:"\u039f",omicron:"\u03bf",omid:"\u29b6",ominus:"\u2296",Oopf:"\ud835\udd46",oopf:"\ud835\udd60",opar:"\u29b7",OpenCurlyDoubleQuote:"\u201c",OpenCurlyQuote:"\u2018",operp:"\u29b9",oplus:"\u2295",orarr:"\u21bb",Or:"\u2a54",or:"\u2228",ord:"\u2a5d",order:"\u2134",orderof:"\u2134",ordf:"\xaa",ordm:"\xba",origof:"\u22b6",oror:"\u2a56",orslope:"\u2a57",orv:"\u2a5b",oS:"\u24c8",Oscr:"\ud835\udcaa",oscr:"\u2134",Oslash:"\xd8",oslash:"\xf8",osol:"\u2298",Otilde:"\xd5",otilde:"\xf5",otimesas:"\u2a36",Otimes:"\u2a37",otimes:"\u2297",Ouml:"\xd6",ouml:"\xf6",ovbar:"\u233d",OverBar:"\u203e",OverBrace:"\u23de",OverBracket:"\u23b4",OverParenthesis:"\u23dc",para:"\xb6",parallel:"\u2225",par:"\u2225",parsim:"\u2af3",parsl:"\u2afd",part:"\u2202",PartialD:"\u2202",Pcy:"\u041f",pcy:"\u043f",percnt:"%",period:".",permil:"\u2030",perp:"\u22a5",pertenk:"\u2031",Pfr:"\ud835\udd13",pfr:"\ud835\udd2d",Phi:"\u03a6",phi:"\u03c6",phiv:"\u03d5",phmmat:"\u2133",phone:"\u260e",Pi:"\u03a0",pi:"\u03c0",pitchfork:"\u22d4",piv:"\u03d6",planck:"\u210f",planckh:"\u210e",plankv:"\u210f",plusacir:"\u2a23",plusb:"\u229e",pluscir:"\u2a22",plus:"+",plusdo:"\u2214",plusdu:"\u2a25",pluse:"\u2a72",PlusMinus:"\xb1",plusmn:"\xb1",plussim:"\u2a26",plustwo:"\u2a27",pm:"\xb1",Poincareplane:"\u210c",pointint:"\u2a15",popf:"\ud835\udd61",Popf:"\u2119",pound:"\xa3",prap:"\u2ab7",Pr:"\u2abb",pr:"\u227a",prcue:"\u227c",precapprox:"\u2ab7",prec:"\u227a",preccurlyeq:"\u227c",Precedes:"\u227a",PrecedesEqual:"\u2aaf",PrecedesSlantEqual:"\u227c",PrecedesTilde:"\u227e",preceq:"\u2aaf",precnapprox:"\u2ab9",precneqq:"\u2ab5",precnsim:"\u22e8",pre:"\u2aaf",prE:"\u2ab3",precsim:"\u227e",prime:"\u2032",Prime:"\u2033",primes:"\u2119",prnap:"\u2ab9",prnE:"\u2ab5",prnsim:"\u22e8",prod:"\u220f",Product:"\u220f",profalar:"\u232e",profline:"\u2312",profsurf:"\u2313",prop:"\u221d",Proportional:"\u221d",Proportion:"\u2237",propto:"\u221d",prsim:"\u227e",prurel:"\u22b0",Pscr:"\ud835\udcab",pscr:"\ud835\udcc5",Psi:"\u03a8",psi:"\u03c8",puncsp:"\u2008",Qfr:"\ud835\udd14",qfr:"\ud835\udd2e",qint:"\u2a0c",qopf:"\ud835\udd62",Qopf:"\u211a",qprime:"\u2057",Qscr:"\ud835\udcac",qscr:"\ud835\udcc6",quaternions:"\u210d",quatint:"\u2a16",quest:"?",questeq:"\u225f",quot:'"',QUOT:'"',rAarr:"\u21db",race:"\u223d\u0331",Racute:"\u0154",racute:"\u0155",radic:"\u221a",raemptyv:"\u29b3",rang:"\u27e9",Rang:"\u27eb",rangd:"\u2992",range:"\u29a5",rangle:"\u27e9",raquo:"\xbb",rarrap:"\u2975",rarrb:"\u21e5",rarrbfs:"\u2920",rarrc:"\u2933",rarr:"\u2192",Rarr:"\u21a0",rArr:"\u21d2",rarrfs:"\u291e",rarrhk:"\u21aa",rarrlp:"\u21ac",rarrpl:"\u2945",rarrsim:"\u2974",Rarrtl:"\u2916",rarrtl:"\u21a3",rarrw:"\u219d",ratail:"\u291a",rAtail:"\u291c",ratio:"\u2236",rationals:"\u211a",rbarr:"\u290d",rBarr:"\u290f",RBarr:"\u2910",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298c",rbrksld:"\u298e",rbrkslu:"\u2990",Rcaron:"\u0158",rcaron:"\u0159",Rcedil:"\u0156",rcedil:"\u0157",rceil:"\u2309",rcub:"}",Rcy:"\u0420",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201d",rdquor:"\u201d",rdsh:"\u21b3",real:"\u211c",realine:"\u211b",realpart:"\u211c",reals:"\u211d",Re:"\u211c",rect:"\u25ad",reg:"\xae",REG:"\xae",ReverseElement:"\u220b",ReverseEquilibrium:"\u21cb",ReverseUpEquilibrium:"\u296f",rfisht:"\u297d",rfloor:"\u230b",rfr:"\ud835\udd2f",Rfr:"\u211c",rHar:"\u2964",rhard:"\u21c1",rharu:"\u21c0",rharul:"\u296c",Rho:"\u03a1",rho:"\u03c1",rhov:"\u03f1",RightAngleBracket:"\u27e9",RightArrowBar:"\u21e5",rightarrow:"\u2192",RightArrow:"\u2192",Rightarrow:"\u21d2",RightArrowLeftArrow:"\u21c4",rightarrowtail:"\u21a3",RightCeiling:"\u2309",RightDoubleBracket:"\u27e7",RightDownTeeVector:"\u295d",RightDownVectorBar:"\u2955",RightDownVector:"\u21c2",RightFloor:"\u230b",rightharpoondown:"\u21c1",rightharpoonup:"\u21c0",rightleftarrows:"\u21c4",rightleftharpoons:"\u21cc",rightrightarrows:"\u21c9",rightsquigarrow:"\u219d",RightTeeArrow:"\u21a6",RightTee:"\u22a2",RightTeeVector:"\u295b",rightthreetimes:"\u22cc",RightTriangleBar:"\u29d0",RightTriangle:"\u22b3",RightTriangleEqual:"\u22b5",RightUpDownVector:"\u294f",RightUpTeeVector:"\u295c",RightUpVectorBar:"\u2954",RightUpVector:"\u21be",RightVectorBar:"\u2953",RightVector:"\u21c0",ring:"\u02da",risingdotseq:"\u2253",rlarr:"\u21c4",rlhar:"\u21cc",rlm:"\u200f",rmoustache:"\u23b1",rmoust:"\u23b1",rnmid:"\u2aee",roang:"\u27ed",roarr:"\u21fe",robrk:"\u27e7",ropar:"\u2986",ropf:"\ud835\udd63",Ropf:"\u211d",roplus:"\u2a2e",rotimes:"\u2a35",RoundImplies:"\u2970",rpar:")",rpargt:"\u2994",rppolint:"\u2a12",rrarr:"\u21c9",Rrightarrow:"\u21db",rsaquo:"\u203a",rscr:"\ud835\udcc7",Rscr:"\u211b",rsh:"\u21b1",Rsh:"\u21b1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22cc",rtimes:"\u22ca",rtri:"\u25b9",rtrie:"\u22b5",rtrif:"\u25b8",rtriltri:"\u29ce",RuleDelayed:"\u29f4",ruluhar:"\u2968",rx:"\u211e",Sacute:"\u015a",sacute:"\u015b",sbquo:"\u201a",scap:"\u2ab8",Scaron:"\u0160",scaron:"\u0161",Sc:"\u2abc",sc:"\u227b",sccue:"\u227d",sce:"\u2ab0",scE:"\u2ab4",Scedil:"\u015e",scedil:"\u015f",Scirc:"\u015c",scirc:"\u015d",scnap:"\u2aba",scnE:"\u2ab6",scnsim:"\u22e9",scpolint:"\u2a13",scsim:"\u227f",Scy:"\u0421",scy:"\u0441",sdotb:"\u22a1",sdot:"\u22c5",sdote:"\u2a66",searhk:"\u2925",searr:"\u2198",seArr:"\u21d8",searrow:"\u2198",sect:"\xa7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",Sfr:"\ud835\udd16",sfr:"\ud835\udd30",sfrown:"\u2322",sharp:"\u266f",SHCHcy:"\u0429",shchcy:"\u0449",SHcy:"\u0428",shcy:"\u0448",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",shortmid:"\u2223",shortparallel:"\u2225",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",shy:"\xad",Sigma:"\u03a3",sigma:"\u03c3",sigmaf:"\u03c2",sigmav:"\u03c2",sim:"\u223c",simdot:"\u2a6a",sime:"\u2243",simeq:"\u2243",simg:"\u2a9e",simgE:"\u2aa0",siml:"\u2a9d",simlE:"\u2a9f",simne:"\u2246",simplus:"\u2a24",simrarr:"\u2972",slarr:"\u2190",SmallCircle:"\u2218",smallsetminus:"\u2216",smashp:"\u2a33",smeparsl:"\u29e4",smid:"\u2223",smile:"\u2323",smt:"\u2aaa",smte:"\u2aac",smtes:"\u2aac\ufe00",SOFTcy:"\u042c",softcy:"\u044c",solbar:"\u233f",solb:"\u29c4",sol:"/",Sopf:"\ud835\udd4a",sopf:"\ud835\udd64",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\ufe00",sqcup:"\u2294",sqcups:"\u2294\ufe00",Sqrt:"\u221a",sqsub:"\u228f",sqsube:"\u2291",sqsubset:"\u228f",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",square:"\u25a1",Square:"\u25a1",SquareIntersection:"\u2293",SquareSubset:"\u228f",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",squarf:"\u25aa",squ:"\u25a1",squf:"\u25aa",srarr:"\u2192",Sscr:"\ud835\udcae",sscr:"\ud835\udcc8",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22c6",Star:"\u22c6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03f5",straightphi:"\u03d5",strns:"\xaf",sub:"\u2282",Sub:"\u22d0",subdot:"\u2abd",subE:"\u2ac5",sube:"\u2286",subedot:"\u2ac3",submult:"\u2ac1",subnE:"\u2acb",subne:"\u228a",subplus:"\u2abf",subrarr:"\u2979",subset:"\u2282",Subset:"\u22d0",subseteq:"\u2286",subseteqq:"\u2ac5",SubsetEqual:"\u2286",subsetneq:"\u228a",subsetneqq:"\u2acb",subsim:"\u2ac7",subsub:"\u2ad5",subsup:"\u2ad3",succapprox:"\u2ab8",succ:"\u227b",succcurlyeq:"\u227d",Succeeds:"\u227b",SucceedsEqual:"\u2ab0",SucceedsSlantEqual:"\u227d",SucceedsTilde:"\u227f",succeq:"\u2ab0",succnapprox:"\u2aba",succneqq:"\u2ab6",succnsim:"\u22e9",succsim:"\u227f",SuchThat:"\u220b",sum:"\u2211",Sum:"\u2211",sung:"\u266a",sup1:"\xb9",sup2:"\xb2",sup3:"\xb3",sup:"\u2283",Sup:"\u22d1",supdot:"\u2abe",supdsub:"\u2ad8",supE:"\u2ac6",supe:"\u2287",supedot:"\u2ac4",Superset:"\u2283",SupersetEqual:"\u2287",suphsol:"\u27c9",suphsub:"\u2ad7",suplarr:"\u297b",supmult:"\u2ac2",supnE:"\u2acc",supne:"\u228b",supplus:"\u2ac0",supset:"\u2283",Supset:"\u22d1",supseteq:"\u2287",supseteqq:"\u2ac6",supsetneq:"\u228b",supsetneqq:"\u2acc",supsim:"\u2ac8",supsub:"\u2ad4",supsup:"\u2ad6",swarhk:"\u2926",swarr:"\u2199",swArr:"\u21d9",swarrow:"\u2199",swnwar:"\u292a",szlig:"\xdf",Tab:" ",target:"\u2316",Tau:"\u03a4",tau:"\u03c4",tbrk:"\u23b4",Tcaron:"\u0164",tcaron:"\u0165",Tcedil:"\u0162",tcedil:"\u0163",Tcy:"\u0422",tcy:"\u0442",tdot:"\u20db",telrec:"\u2315",Tfr:"\ud835\udd17",tfr:"\ud835\udd31",there4:"\u2234",therefore:"\u2234",Therefore:"\u2234",Theta:"\u0398",theta:"\u03b8",thetasym:"\u03d1",thetav:"\u03d1",thickapprox:"\u2248",thicksim:"\u223c",ThickSpace:"\u205f\u200a",ThinSpace:"\u2009",thinsp:"\u2009",thkap:"\u2248",thksim:"\u223c",THORN:"\xde",thorn:"\xfe",tilde:"\u02dc",Tilde:"\u223c",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",timesbar:"\u2a31",timesb:"\u22a0",times:"\xd7",timesd:"\u2a30",tint:"\u222d",toea:"\u2928",topbot:"\u2336",topcir:"\u2af1",top:"\u22a4",Topf:"\ud835\udd4b",topf:"\ud835\udd65",topfork:"\u2ada",tosa:"\u2929",tprime:"\u2034",trade:"\u2122",TRADE:"\u2122",triangle:"\u25b5",triangledown:"\u25bf",triangleleft:"\u25c3",trianglelefteq:"\u22b4",triangleq:"\u225c",triangleright:"\u25b9",trianglerighteq:"\u22b5",tridot:"\u25ec",trie:"\u225c",triminus:"\u2a3a",TripleDot:"\u20db",triplus:"\u2a39",trisb:"\u29cd",tritime:"\u2a3b",trpezium:"\u23e2",Tscr:"\ud835\udcaf",tscr:"\ud835\udcc9",TScy:"\u0426",tscy:"\u0446",TSHcy:"\u040b",tshcy:"\u045b",Tstrok:"\u0166",tstrok:"\u0167",twixt:"\u226c",twoheadleftarrow:"\u219e",twoheadrightarrow:"\u21a0",Uacute:"\xda",uacute:"\xfa",uarr:"\u2191",Uarr:"\u219f",uArr:"\u21d1",Uarrocir:"\u2949",Ubrcy:"\u040e",ubrcy:"\u045e",Ubreve:"\u016c",ubreve:"\u016d",Ucirc:"\xdb",ucirc:"\xfb",Ucy:"\u0423",ucy:"\u0443",udarr:"\u21c5",Udblac:"\u0170",udblac:"\u0171",udhar:"\u296e",ufisht:"\u297e",Ufr:"\ud835\udd18",ufr:"\ud835\udd32",Ugrave:"\xd9",ugrave:"\xf9",uHar:"\u2963",uharl:"\u21bf",uharr:"\u21be",uhblk:"\u2580",ulcorn:"\u231c",ulcorner:"\u231c",ulcrop:"\u230f",ultri:"\u25f8",Umacr:"\u016a",umacr:"\u016b",uml:"\xa8",UnderBar:"_",UnderBrace:"\u23df",UnderBracket:"\u23b5",UnderParenthesis:"\u23dd",Union:"\u22c3",UnionPlus:"\u228e",Uogon:"\u0172",uogon:"\u0173",Uopf:"\ud835\udd4c",uopf:"\ud835\udd66",UpArrowBar:"\u2912",uparrow:"\u2191",UpArrow:"\u2191",Uparrow:"\u21d1",UpArrowDownArrow:"\u21c5",updownarrow:"\u2195",UpDownArrow:"\u2195",Updownarrow:"\u21d5",UpEquilibrium:"\u296e",upharpoonleft:"\u21bf",upharpoonright:"\u21be",uplus:"\u228e",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",upsi:"\u03c5",Upsi:"\u03d2",upsih:"\u03d2",Upsilon:"\u03a5",upsilon:"\u03c5",UpTeeArrow:"\u21a5",UpTee:"\u22a5",upuparrows:"\u21c8",urcorn:"\u231d",urcorner:"\u231d",urcrop:"\u230e",Uring:"\u016e",uring:"\u016f",urtri:"\u25f9",Uscr:"\ud835\udcb0",uscr:"\ud835\udcca",utdot:"\u22f0",Utilde:"\u0168",utilde:"\u0169",utri:"\u25b5",utrif:"\u25b4",uuarr:"\u21c8",Uuml:"\xdc",uuml:"\xfc",uwangle:"\u29a7",vangrt:"\u299c",varepsilon:"\u03f5",varkappa:"\u03f0",varnothing:"\u2205",varphi:"\u03d5",varpi:"\u03d6",varpropto:"\u221d",varr:"\u2195",vArr:"\u21d5",varrho:"\u03f1",varsigma:"\u03c2",varsubsetneq:"\u228a\ufe00",varsubsetneqq:"\u2acb\ufe00",varsupsetneq:"\u228b\ufe00",varsupsetneqq:"\u2acc\ufe00",vartheta:"\u03d1",vartriangleleft:"\u22b2",vartriangleright:"\u22b3",vBar:"\u2ae8",Vbar:"\u2aeb",vBarv:"\u2ae9",Vcy:"\u0412",vcy:"\u0432",vdash:"\u22a2",vDash:"\u22a8",Vdash:"\u22a9",VDash:"\u22ab",Vdashl:"\u2ae6",veebar:"\u22bb",vee:"\u2228",Vee:"\u22c1",veeeq:"\u225a",vellip:"\u22ee",verbar:"|",Verbar:"\u2016",vert:"|",Vert:"\u2016",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200a",Vfr:"\ud835\udd19",vfr:"\ud835\udd33",vltri:"\u22b2",vnsub:"\u2282\u20d2",vnsup:"\u2283\u20d2",Vopf:"\ud835\udd4d",vopf:"\ud835\udd67",vprop:"\u221d",vrtri:"\u22b3",Vscr:"\ud835\udcb1",vscr:"\ud835\udccb",vsubnE:"\u2acb\ufe00",vsubne:"\u228a\ufe00",vsupnE:"\u2acc\ufe00",vsupne:"\u228b\ufe00",Vvdash:"\u22aa",vzigzag:"\u299a",Wcirc:"\u0174",wcirc:"\u0175",wedbar:"\u2a5f",wedge:"\u2227",Wedge:"\u22c0",wedgeq:"\u2259",weierp:"\u2118",Wfr:"\ud835\udd1a",wfr:"\ud835\udd34",Wopf:"\ud835\udd4e",wopf:"\ud835\udd68",wp:"\u2118",wr:"\u2240",wreath:"\u2240",Wscr:"\ud835\udcb2",wscr:"\ud835\udccc",xcap:"\u22c2",xcirc:"\u25ef",xcup:"\u22c3",xdtri:"\u25bd",Xfr:"\ud835\udd1b",xfr:"\ud835\udd35",xharr:"\u27f7",xhArr:"\u27fa",Xi:"\u039e",xi:"\u03be",xlarr:"\u27f5",xlArr:"\u27f8",xmap:"\u27fc",xnis:"\u22fb",xodot:"\u2a00",Xopf:"\ud835\udd4f",xopf:"\ud835\udd69",xoplus:"\u2a01",xotime:"\u2a02",xrarr:"\u27f6",xrArr:"\u27f9",Xscr:"\ud835\udcb3",xscr:"\ud835\udccd",xsqcup:"\u2a06",xuplus:"\u2a04",xutri:"\u25b3",xvee:"\u22c1",xwedge:"\u22c0",Yacute:"\xdd",yacute:"\xfd",YAcy:"\u042f",yacy:"\u044f",Ycirc:"\u0176",ycirc:"\u0177",Ycy:"\u042b",ycy:"\u044b",yen:"\xa5",Yfr:"\ud835\udd1c",yfr:"\ud835\udd36",YIcy:"\u0407",yicy:"\u0457",Yopf:"\ud835\udd50",yopf:"\ud835\udd6a",Yscr:"\ud835\udcb4",yscr:"\ud835\udcce",YUcy:"\u042e",yucy:"\u044e",yuml:"\xff",Yuml:"\u0178",Zacute:"\u0179",zacute:"\u017a",Zcaron:"\u017d",zcaron:"\u017e",Zcy:"\u0417",zcy:"\u0437",Zdot:"\u017b",zdot:"\u017c",zeetrf:"\u2128",ZeroWidthSpace:"\u200b",Zeta:"\u0396",zeta:"\u03b6",zfr:"\ud835\udd37",Zfr:"\u2128",ZHcy:"\u0416",zhcy:"\u0436",zigrarr:"\u21dd",zopf:"\ud835\udd6b",Zopf:"\u2124",Zscr:"\ud835\udcb5",zscr:"\ud835\udccf",zwj:"\u200d",zwnj:"\u200c"}},{}],54:[function(e,r,t){"use strict";function n(e){var r=Array.prototype.slice.call(arguments,1);return r.forEach(function(r){r&&Object.keys(r).forEach(function(t){e[t]=r[t]})}),e}function s(e){return Object.prototype.toString.call(e)}function o(e){return"[object String]"===s(e)}function i(e){return"[object Object]"===s(e)}function a(e){return"[object RegExp]"===s(e)}function c(e){return"[object Function]"===s(e)}function l(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function u(e){return Object.keys(e||{}).reduce(function(e,r){return e||k.hasOwnProperty(r)},!1)}function p(e){e.__index__=-1,e.__text_cache__=""}function h(e){return function(r,t){var n=r.slice(t);return e.test(n)?n.match(e)[0].length:0}}function f(){return function(e,r){r.normalize(e)}}function d(r){function t(e){return e.replace("%TLDS%",u.src_tlds)}function s(e,r){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+r)}var u=r.re=n({},e("./lib/re")),d=r.__tlds__.slice();r.__tlds_replaced__||d.push(v),d.push(u.src_xn),u.src_tlds=d.join("|"),u.email_fuzzy=RegExp(t(u.tpl_email_fuzzy),"i"),u.link_fuzzy=RegExp(t(u.tpl_link_fuzzy),"i"),u.link_no_ip_fuzzy=RegExp(t(u.tpl_link_no_ip_fuzzy),"i"),u.host_fuzzy_test=RegExp(t(u.tpl_host_fuzzy_test),"i");var m=[];r.__compiled__={},Object.keys(r.__schemas__).forEach(function(e){var t=r.__schemas__[e];if(null!==t){var n={validate:null,link:null};return r.__compiled__[e]=n,i(t)?(a(t.validate)?n.validate=h(t.validate):c(t.validate)?n.validate=t.validate:s(e,t),void(c(t.normalize)?n.normalize=t.normalize:t.normalize?s(e,t):n.normalize=f())):o(t)?void m.push(e):void s(e,t)}}),m.forEach(function(e){r.__compiled__[r.__schemas__[e]]&&(r.__compiled__[e].validate=r.__compiled__[r.__schemas__[e]].validate,r.__compiled__[e].normalize=r.__compiled__[r.__schemas__[e]].normalize)}),r.__compiled__[""]={validate:null,normalize:f()};var g=Object.keys(r.__compiled__).filter(function(e){return e.length>0&&r.__compiled__[e]}).map(l).join("|");r.re.schema_test=RegExp("(^|(?!_)(?:>|"+u.src_ZPCc+"))("+g+")","i"),r.re.schema_search=RegExp("(^|(?!_)(?:>|"+u.src_ZPCc+"))("+g+")","ig"),r.re.pretest=RegExp("("+r.re.schema_test.source+")|("+r.re.host_fuzzy_test.source+")|@","i"),p(r)}function m(e,r){var t=e.__index__,n=e.__last_index__,s=e.__text_cache__.slice(t,n);this.schema=e.__schema__.toLowerCase(),this.index=t+r,this.lastIndex=n+r,this.raw=s,this.text=s,this.url=s}function g(e,r){var t=new m(e,r);return e.__compiled__[t.schema].normalize(t,e),t}function _(e,r){return this instanceof _?(r||u(e)&&(r=e,e={}),this.__opts__=n({},k,r),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=n({},b,e),this.__compiled__={},this.__tlds__=x,this.__tlds_replaced__=!1,this.re={},void d(this)):new _(e,r)}var k={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1},b={"http:":{validate:function(e,r,t){var n=e.slice(r);return t.re.http||(t.re.http=new RegExp("^\\/\\/"+t.re.src_auth+t.re.src_host_port_strict+t.re.src_path,"i")),t.re.http.test(n)?n.match(t.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,r,t){var n=e.slice(r);return t.re.no_http||(t.re.no_http=new RegExp("^"+t.re.src_auth+t.re.src_host_port_strict+t.re.src_path,"i")),t.re.no_http.test(n)?r>=3&&":"===e[r-3]?0:n.match(t.re.no_http)[0].length:0}},"mailto:":{validate:function(e,r,t){var n=e.slice(r);return t.re.mailto||(t.re.mailto=new RegExp("^"+t.re.src_email_name+"@"+t.re.src_host_strict,"i")),t.re.mailto.test(n)?n.match(t.re.mailto)[0].length:0}}},v="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",x="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|\u0440\u0444".split("|");_.prototype.add=function(e,r){return this.__schemas__[e]=r,d(this),this},_.prototype.set=function(e){return this.__opts__=n(this.__opts__,e),this},_.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var r,t,n,s,o,i,a,c,l;if(this.re.schema_test.test(e))for(a=this.re.schema_search,a.lastIndex=0;null!==(r=a.exec(e));)if(s=this.testSchemaAt(e,r[2],a.lastIndex)){this.__schema__=r[2],this.__index__=r.index+r[1].length,this.__last_index__=r.index+r[0].length+s;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(c=e.search(this.re.host_fuzzy_test),c>=0&&(this.__index__<0||c=0&&null!==(n=e.match(this.re.email_fuzzy))&&(o=n.index+n[1].length,i=n.index+n[0].length,(this.__index__<0||othis.__last_index__)&&(this.__schema__="mailto:",this.__index__=o,this.__last_index__=i))),this.__index__>=0},_.prototype.pretest=function(e){return this.re.pretest.test(e)},_.prototype.testSchemaAt=function(e,r,t){return this.__compiled__[r.toLowerCase()]?this.__compiled__[r.toLowerCase()].validate(e,t,this):0},_.prototype.match=function(e){var r=0,t=[];this.__index__>=0&&this.__text_cache__===e&&(t.push(g(this,r)),r=this.__last_index__);for(var n=r?e.slice(r):e;this.test(n);)t.push(g(this,r)),n=n.slice(this.__last_index__),r+=this.__last_index__;return t.length?t:null},_.prototype.tlds=function(e,r){return e=Array.isArray(e)?e:[e],r?(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(e,r,t){return e!==t[r-1]}).reverse(),d(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,d(this),this)},_.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},r.exports=_},{"./lib/re":55}],55:[function(e,r,t){"use strict";var n=t.src_Any=e("uc.micro/properties/Any/regex").source,s=t.src_Cc=e("uc.micro/categories/Cc/regex").source,o=t.src_Z=e("uc.micro/categories/Z/regex").source,i=t.src_P=e("uc.micro/categories/P/regex").source,a=t.src_ZPCc=[o,i,s].join("|"),c=t.src_ZCc=[o,s].join("|"),l="(?:(?!"+a+")"+n+")",u="(?:(?![0-9]|"+a+")"+n+")",p=t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)";t.src_auth="(?:(?:(?!"+c+").)+@)?";var h=t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",f=t.src_host_terminator="(?=$|"+a+")(?!-|_|:\\d|\\.-|\\.(?!$|"+a+"))",d=t.src_path="(?:[/?#](?:(?!"+c+"|[()[\\]{}.,\"'?!\\-]).|\\[(?:(?!"+c+"|\\]).)*\\]|\\((?:(?!"+c+"|[)]).)*\\)|\\{(?:(?!"+c+'|[}]).)*\\}|\\"(?:(?!'+c+'|["]).)+\\"|\\\'(?:(?!'+c+"|[']).)+\\'|\\'(?="+l+").|\\.{2,3}[a-zA-Z0-9%/]|\\.(?!"+c+"|[.]).|\\-(?!--(?:[^-]|$))(?:-*)|\\,(?!"+c+").|\\!(?!"+c+"|[!]).|\\?(?!"+c+"|[?]).)+|\\/)?",m=t.src_email_name='[\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]+',g=t.src_xn="xn--[a-z0-9\\-]{1,59}",_=t.src_domain_root="(?:"+g+"|"+u+"{1,63})",k=t.src_domain="(?:"+g+"|(?:"+l+")|(?:"+l+"(?:-(?!-)|"+l+"){0,61}"+l+"))",b=t.src_host="(?:"+p+"|(?:(?:(?:"+k+")\\.)*"+_+"))",v=t.tpl_host_fuzzy="(?:"+p+"|(?:(?:(?:"+k+")\\.)+(?:%TLDS%)))",x=t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+k+")\\.)+(?:%TLDS%))";t.src_host_strict=b+f;var y=t.tpl_host_fuzzy_strict=v+f;t.src_host_port_strict=b+h+f;var C=t.tpl_host_port_fuzzy_strict=v+h+f,A=t.tpl_host_port_no_ip_fuzzy_strict=x+h+f;t.tpl_host_fuzzy_test="localhost|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+a+"|$))",t.tpl_email_fuzzy="(^|>|"+c+")("+m+"@"+y+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|]|"+a+"))((?![$+<=>^`|])"+C+d+")", +/*! markdown-it 6.0.0 https://github.com//markdown-it/markdown-it @license MIT */ +!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define('markdown-it',[],e);else{var r;r="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,r.markdownit=e()}}(function(){var e;return function r(e,t,n){function s(i,a){if(!t[i]){if(!e[i]){var c="function"==typeof require&&require;if(!a&&c)return c(i,!0);if(o)return o(i,!0);var l=new Error("Cannot find module '"+i+"'");throw l.code="MODULE_NOT_FOUND",l}var u=t[i]={exports:{}};e[i][0].call(u.exports,function(r){var t=e[i][1][r];return s(t?t:r)},u,u.exports,r,e,t,n)}return t[i].exports}for(var o="function"==typeof require&&require,i=0;i`\\x00-\\x20]+",o="'[^']*'",i='"[^"]*"',a="(?:"+s+"|"+o+"|"+i+")",c="(?:\\s+"+n+"(?:\\s*=\\s*"+a+")?)",l="<[A-Za-z][A-Za-z0-9\\-]*"+c+"*\\s*\\/?>",u="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",p="|",h="<[?].*?[?]>",f="]*>",d="",m=new RegExp("^(?:"+l+"|"+u+"|"+p+"|"+h+"|"+f+"|"+d+")"),g=new RegExp("^(?:"+l+"|"+u+")");r.exports.HTML_TAG_RE=m,r.exports.HTML_OPEN_CLOSE_TAG_RE=g},{}],4:[function(e,r,t){"use strict";function n(e){return Object.prototype.toString.call(e)}function s(e){return"[object String]"===n(e)}function o(e,r){return x.call(e,r)}function i(e){var r=Array.prototype.slice.call(arguments,1);return r.forEach(function(r){if(r){if("object"!=typeof r)throw new TypeError(r+"must be object");Object.keys(r).forEach(function(t){e[t]=r[t]})}}),e}function a(e,r,t){return[].concat(e.slice(0,r),t,e.slice(r+1))}function c(e){return e>=55296&&57343>=e?!1:e>=64976&&65007>=e?!1:65535===(65535&e)||65534===(65535&e)?!1:e>=0&&8>=e?!1:11===e?!1:e>=14&&31>=e?!1:e>=127&&159>=e?!1:e>1114111?!1:!0}function l(e){if(e>65535){e-=65536;var r=55296+(e>>10),t=56320+(1023&e);return String.fromCharCode(r,t)}return String.fromCharCode(e)}function u(e,r){var t=0;return o(q,r)?q[r]:35===r.charCodeAt(0)&&w.test(r)&&(t="x"===r[1].toLowerCase()?parseInt(r.slice(2),16):parseInt(r.slice(1),10),c(t))?l(t):e}function p(e){return e.indexOf("\\")<0?e:e.replace(y,"$1")}function h(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(A,function(e,r,t){return r?r:u(e,t)})}function f(e){return S[e]}function d(e){return D.test(e)?e.replace(E,f):e}function m(e){return e.replace(F,"\\$&")}function g(e){switch(e){case 9:case 32:return!0}return!1}function _(e){if(e>=8192&&8202>=e)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function k(e){return L.test(e)}function b(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function v(e){return e.trim().replace(/\s+/g," ").toUpperCase()}var x=Object.prototype.hasOwnProperty,y=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,C=/&([a-z#][a-z0-9]{1,31});/gi,A=new RegExp(y.source+"|"+C.source,"gi"),w=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,q=e("./entities"),D=/[&<>"]/,E=/[&<>"]/g,S={"&":"&","<":"<",">":">",'"':"""},F=/[.?*+^$[\]\\(){}|-]/g,L=e("uc.micro/categories/P/regex");t.lib={},t.lib.mdurl=e("mdurl"),t.lib.ucmicro=e("uc.micro"),t.assign=i,t.isString=s,t.has=o,t.unescapeMd=p,t.unescapeAll=h,t.isValidEntityCode=c,t.fromCodePoint=l,t.escapeHtml=d,t.arrayReplaceAt=a,t.isSpace=g,t.isWhiteSpace=_,t.isMdAsciiPunct=b,t.isPunctChar=k,t.escapeRE=m,t.normalizeReference=v},{"./entities":1,mdurl:59,"uc.micro":65,"uc.micro/categories/P/regex":63}],5:[function(e,r,t){"use strict";t.parseLinkLabel=e("./parse_link_label"),t.parseLinkDestination=e("./parse_link_destination"),t.parseLinkTitle=e("./parse_link_title")},{"./parse_link_destination":6,"./parse_link_label":7,"./parse_link_title":8}],6:[function(e,r,t){"use strict";var n=e("../common/utils").isSpace,s=e("../common/utils").unescapeAll;r.exports=function(e,r,t){var o,i,a=0,c=r,l={ok:!1,pos:0,lines:0,str:""};if(60===e.charCodeAt(r)){for(r++;t>r;){if(o=e.charCodeAt(r),10===o||n(o))return l;if(62===o)return l.pos=r+1,l.str=s(e.slice(c+1,r)),l.ok=!0,l;92===o&&t>r+1?r+=2:r++}return l}for(i=0;t>r&&(o=e.charCodeAt(r),32!==o)&&!(32>o||127===o);)if(92===o&&t>r+1)r+=2;else{if(40===o&&(i++,i>1))break;if(41===o&&(i--,0>i))break;r++}return c===r?l:(l.str=s(e.slice(c,r)),l.lines=a,l.pos=r,l.ok=!0,l)}},{"../common/utils":4}],7:[function(e,r,t){"use strict";r.exports=function(e,r,t){var n,s,o,i,a=-1,c=e.posMax,l=e.pos;for(e.pos=r+1,n=1;e.pos=t)return c;if(o=e.charCodeAt(r),34!==o&&39!==o&&40!==o)return c;for(r++,40===o&&(o=41);t>r;){if(s=e.charCodeAt(r),s===o)return c.pos=r+1,c.lines=i,c.str=n(e.slice(a+1,r)),c.ok=!0,c;10===s?i++:92===s&&t>r+1&&(r++,10===e.charCodeAt(r)&&i++),r++}return c}},{"../common/utils":4}],9:[function(e,r,t){"use strict";function n(e){var r=e.trim().toLowerCase();return _.test(r)?k.test(r)?!0:!1:!0}function s(e){var r=d.parse(e,!0);if(r.hostname&&(!r.protocol||b.indexOf(r.protocol)>=0))try{r.hostname=m.toASCII(r.hostname)}catch(t){}return d.encode(d.format(r))}function o(e){var r=d.parse(e,!0);if(r.hostname&&(!r.protocol||b.indexOf(r.protocol)>=0))try{r.hostname=m.toUnicode(r.hostname)}catch(t){}return d.decode(d.format(r))}function i(e,r){return this instanceof i?(r||a.isString(e)||(r=e||{},e="default"),this.inline=new h,this.block=new p,this.core=new u,this.renderer=new l,this.linkify=new f,this.validateLink=n,this.normalizeLink=s,this.normalizeLinkText=o,this.utils=a,this.helpers=c,this.options={},this.configure(e),void(r&&this.set(r))):new i(e,r)}var a=e("./common/utils"),c=e("./helpers"),l=e("./renderer"),u=e("./parser_core"),p=e("./parser_block"),h=e("./parser_inline"),f=e("linkify-it"),d=e("mdurl"),m=e("punycode"),g={"default":e("./presets/default"),zero:e("./presets/zero"),commonmark:e("./presets/commonmark")},_=/^(vbscript|javascript|file|data):/,k=/^data:image\/(gif|png|jpeg|webp);/,b=["http:","https:","mailto:"];i.prototype.set=function(e){return a.assign(this.options,e),this},i.prototype.configure=function(e){var r,t=this;if(a.isString(e)&&(r=e,e=g[r],!e))throw new Error('Wrong `markdown-it` preset "'+r+'", check name');if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(r){e.components[r].rules&&t[r].ruler.enableOnly(e.components[r].rules),e.components[r].rules2&&t[r].ruler2.enableOnly(e.components[r].rules2)}),this},i.prototype.enable=function(e,r){var t=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(r){t=t.concat(this[r].ruler.enable(e,!0))},this),t=t.concat(this.inline.ruler2.enable(e,!0));var n=e.filter(function(e){return t.indexOf(e)<0});if(n.length&&!r)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+n);return this},i.prototype.disable=function(e,r){var t=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(r){t=t.concat(this[r].ruler.disable(e,!0))},this),t=t.concat(this.inline.ruler2.disable(e,!0));var n=e.filter(function(e){return t.indexOf(e)<0});if(n.length&&!r)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+n);return this},i.prototype.use=function(e){var r=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,r),this},i.prototype.parse=function(e,r){var t=new this.core.State(e,this,r);return this.core.process(t),t.tokens},i.prototype.render=function(e,r){return r=r||{},this.renderer.render(this.parse(e,r),this.options,r)},i.prototype.parseInline=function(e,r){var t=new this.core.State(e,this,r);return t.inlineMode=!0,this.core.process(t),t.tokens},i.prototype.renderInline=function(e,r){return r=r||{},this.renderer.render(this.parseInline(e,r),this.options,r)},r.exports=i},{"./common/utils":4,"./helpers":5,"./parser_block":10,"./parser_core":11,"./parser_inline":12,"./presets/commonmark":13,"./presets/default":14,"./presets/zero":15,"./renderer":16,"linkify-it":54,mdurl:59,punycode:52}],10:[function(e,r,t){"use strict";function n(){this.ruler=new s;for(var e=0;ea&&(e.line=a=e.skipEmptyLines(a),!(a>=t))&&!(e.sCount[a]=l){e.line=t;break}for(s=0;i>s&&!(n=o[s](e,a,t,!1));s++);if(e.tight=!c,e.isEmpty(e.line-1)&&(c=!0),a=e.line,t>a&&e.isEmpty(a)){if(c=!0,a++,t>a&&"list"===e.parentType&&e.isEmpty(a))break;e.line=a}}},n.prototype.parse=function(e,r,t,n){var s;return e?(s=new this.State(e,r,t,n),void this.tokenize(s,s.line,s.lineMax)):[]},n.prototype.State=e("./rules_block/state_block"),r.exports=n},{"./ruler":17,"./rules_block/blockquote":18,"./rules_block/code":19,"./rules_block/fence":20,"./rules_block/heading":21,"./rules_block/hr":22,"./rules_block/html_block":23,"./rules_block/lheading":24,"./rules_block/list":25,"./rules_block/paragraph":26,"./rules_block/reference":27,"./rules_block/state_block":28,"./rules_block/table":29}],11:[function(e,r,t){"use strict";function n(){this.ruler=new s;for(var e=0;er;r++)n[r](e)},n.prototype.State=e("./rules_core/state_core"),r.exports=n},{"./ruler":17,"./rules_core/block":30,"./rules_core/inline":31,"./rules_core/linkify":32,"./rules_core/normalize":33,"./rules_core/replacements":34,"./rules_core/smartquotes":35,"./rules_core/state_core":36}],12:[function(e,r,t){"use strict";function n(){var e;for(this.ruler=new s,e=0;et&&(e.level++,r=s[t](e,!0),e.level--,!r);t++);else e.pos=e.posMax;r||e.pos++,a[n]=e.pos},n.prototype.tokenize=function(e){for(var r,t,n=this.ruler.getRules(""),s=n.length,o=e.posMax,i=e.md.options.maxNesting;e.post&&!(r=n[t](e,!1));t++);if(r){if(e.pos>=o)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},n.prototype.parse=function(e,r,t,n){var s,o,i,a=new this.State(e,r,t,n);for(this.tokenize(a),o=this.ruler2.getRules(""),i=o.length,s=0;i>s;s++)o[s](a)},n.prototype.State=e("./rules_inline/state_inline"),r.exports=n},{"./ruler":17,"./rules_inline/autolink":37,"./rules_inline/backticks":38,"./rules_inline/balance_pairs":39,"./rules_inline/emphasis":40,"./rules_inline/entity":41,"./rules_inline/escape":42,"./rules_inline/html_inline":43,"./rules_inline/image":44,"./rules_inline/link":45,"./rules_inline/newline":46,"./rules_inline/state_inline":47,"./rules_inline/strikethrough":48,"./rules_inline/text":49,"./rules_inline/text_collapse":50}],13:[function(e,r,t){"use strict";r.exports={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"\u201c\u201d\u2018\u2019",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","text_collapse"]}}}},{}],14:[function(e,r,t){"use strict";r.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"\u201c\u201d\u2018\u2019",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}}},{}],15:[function(e,r,t){"use strict";r.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"\u201c\u201d\u2018\u2019",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","text_collapse"]}}}},{}],16:[function(e,r,t){"use strict";function n(){this.rules=s({},a)}var s=e("./common/utils").assign,o=e("./common/utils").unescapeAll,i=e("./common/utils").escapeHtml,a={};a.code_inline=function(e,r){return""+i(e[r].content)+""},a.code_block=function(e,r){return"
"+i(e[r].content)+"
\n"},a.fence=function(e,r,t,n,s){var a,c=e[r],l=c.info?o(c.info).trim():"",u="";return l&&(u=l.split(/\s+/g)[0],c.attrJoin("class",t.langPrefix+u)),a=t.highlight?t.highlight(c.content,u)||i(c.content):i(c.content),0===a.indexOf(""+a+"\n"},a.image=function(e,r,t,n,s){var o=e[r];return o.attrs[o.attrIndex("alt")][1]=s.renderInlineAsText(o.children,t,n),s.renderToken(e,r,t)},a.hardbreak=function(e,r,t){return t.xhtmlOut?"
\n":"
\n"},a.softbreak=function(e,r,t){return t.breaks?t.xhtmlOut?"
\n":"
\n":"\n"},a.text=function(e,r){return i(e[r].content)},a.html_block=function(e,r){return e[r].content},a.html_inline=function(e,r){return e[r].content},n.prototype.renderAttrs=function(e){var r,t,n;if(!e.attrs)return"";for(n="",r=0,t=e.attrs.length;t>r;r++)n+=" "+i(e.attrs[r][0])+'="'+i(e.attrs[r][1])+'"';return n},n.prototype.renderToken=function(e,r,t){var n,s="",o=!1,i=e[r];return i.hidden?"":(i.block&&-1!==i.nesting&&r&&e[r-1].hidden&&(s+="\n"),s+=(-1===i.nesting?"\n":">")},n.prototype.renderInline=function(e,r,t){for(var n,s="",o=this.rules,i=0,a=e.length;a>i;i++)n=e[i].type,s+="undefined"!=typeof o[n]?o[n](e,i,r,t,this):this.renderToken(e,i,r);return s},n.prototype.renderInlineAsText=function(e,r,t){for(var n="",s=this.rules,o=0,i=e.length;i>o;o++)"text"===e[o].type?n+=s.text(e,o,r,t,this):"image"===e[o].type&&(n+=this.renderInlineAsText(e[o].children,r,t));return n},n.prototype.render=function(e,r,t){var n,s,o,i="",a=this.rules;for(n=0,s=e.length;s>n;n++)o=e[n].type,i+="inline"===o?this.renderInline(e[n].children,r,t):"undefined"!=typeof a[o]?a[e[n].type](e,n,r,t,this):this.renderToken(e,n,r,t);return i},r.exports=n},{"./common/utils":4}],17:[function(e,r,t){"use strict";function n(){this.__rules__=[],this.__cache__=null}n.prototype.__find__=function(e){for(var r=0;rn){if(r)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[n].enabled=!0,t.push(e)},this),this.__cache__=null,t},n.prototype.enableOnly=function(e,r){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(e){e.enabled=!1}),this.enable(e,r)},n.prototype.disable=function(e,r){Array.isArray(e)||(e=[e]);var t=[];return e.forEach(function(e){var n=this.__find__(e);if(0>n){if(r)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[n].enabled=!1,t.push(e)},this),this.__cache__=null,t},n.prototype.getRules=function(e){return null===this.__cache__&&this.__compile__(),this.__cache__[e]||[]},r.exports=n},{}],18:[function(e,r,t){"use strict";var n=e("../common/utils").isSpace;r.exports=function(e,r,t,s){var o,i,a,c,l,u,p,h,f,d,m,g,_,k,b,v,x=e.bMarks[r]+e.tShift[r],y=e.eMarks[r];if(62!==e.src.charCodeAt(x++))return!1;if(s)return!0;for(32===e.src.charCodeAt(x)&&x++,u=e.blkIndent,e.blkIndent=0,f=d=e.sCount[r]+x-(e.bMarks[r]+e.tShift[r]),l=[e.bMarks[r]],e.bMarks[r]=x;y>x&&(m=e.src.charCodeAt(x),n(m));)9===m?d+=4-d%4:d++,x++;for(i=x>=y,c=[e.sCount[r]],e.sCount[r]=d-f,a=[e.tShift[r]],e.tShift[r]=x-e.bMarks[r],g=e.md.block.ruler.getRules("blockquote"),o=r+1;t>o&&!(e.sCount[o]=y));o++)if(62!==e.src.charCodeAt(x++)){if(i)break;for(v=!1,k=0,b=g.length;b>k;k++)if(g[k](e,o,t,!0)){v=!0;break}if(v)break;l.push(e.bMarks[o]),a.push(e.tShift[o]),c.push(e.sCount[o]),e.sCount[o]=-1}else{for(32===e.src.charCodeAt(x)&&x++,f=d=e.sCount[o]+x-(e.bMarks[o]+e.tShift[o]),l.push(e.bMarks[o]),e.bMarks[o]=x;y>x&&(m=e.src.charCodeAt(x),n(m));)9===m?d+=4-d%4:d++,x++;i=x>=y,c.push(e.sCount[o]),e.sCount[o]=d-f,a.push(e.tShift[o]),e.tShift[o]=x-e.bMarks[o]}for(p=e.parentType,e.parentType="blockquote",_=e.push("blockquote_open","blockquote",1),_.markup=">",_.map=h=[r,0],e.md.block.tokenize(e,r,o),_=e.push("blockquote_close","blockquote",-1),_.markup=">",e.parentType=p,h[1]=e.line,k=0;kn;)if(e.isEmpty(n)){if(i++,i>=2&&"list"===e.parentType)break;n++}else{if(i=0,!(e.sCount[n]-e.blkIndent>=4))break;n++,s=n}return e.line=s,o=e.push("code_block","code",0),o.content=e.getLines(r,s,4+e.blkIndent,!0),o.map=[r,e.line],!0}},{}],20:[function(e,r,t){"use strict";r.exports=function(e,r,t,n){var s,o,i,a,c,l,u,p=!1,h=e.bMarks[r]+e.tShift[r],f=e.eMarks[r];if(h+3>f)return!1;if(s=e.src.charCodeAt(h),126!==s&&96!==s)return!1;if(c=h,h=e.skipChars(h,s),o=h-c,3>o)return!1;if(u=e.src.slice(c,h),i=e.src.slice(h,f),i.indexOf("`")>=0)return!1;if(n)return!0;for(a=r;(a++,!(a>=t))&&(h=c=e.bMarks[a]+e.tShift[a],f=e.eMarks[a],!(f>h&&e.sCount[a]=4||(h=e.skipChars(h,s),o>h-c||(h=e.skipSpaces(h),f>h)))){p=!0;break}return o=e.sCount[r],e.line=a+(p?1:0),l=e.push("fence","code",0),l.info=i,l.content=e.getLines(r+1,a,o,!0),l.markup=u,l.map=[r,e.line],!0}},{}],21:[function(e,r,t){"use strict";var n=e("../common/utils").isSpace;r.exports=function(e,r,t,s){var o,i,a,c,l=e.bMarks[r]+e.tShift[r],u=e.eMarks[r];if(o=e.src.charCodeAt(l),35!==o||l>=u)return!1;for(i=1,o=e.src.charCodeAt(++l);35===o&&u>l&&6>=i;)i++,o=e.src.charCodeAt(++l);return i>6||u>l&&32!==o?!1:s?!0:(u=e.skipSpacesBack(u,l),a=e.skipCharsBack(u,35,l),a>l&&n(e.src.charCodeAt(a-1))&&(u=a),e.line=r+1,c=e.push("heading_open","h"+String(i),1),c.markup="########".slice(0,i),c.map=[r,e.line],c=e.push("inline","",0),c.content=e.src.slice(l,u).trim(),c.map=[r,e.line],c.children=[],c=e.push("heading_close","h"+String(i),-1),c.markup="########".slice(0,i),!0)}},{"../common/utils":4}],22:[function(e,r,t){"use strict";var n=e("../common/utils").isSpace;r.exports=function(e,r,t,s){var o,i,a,c,l=e.bMarks[r]+e.tShift[r],u=e.eMarks[r];if(o=e.src.charCodeAt(l++),42!==o&&45!==o&&95!==o)return!1;for(i=1;u>l;){if(a=e.src.charCodeAt(l++),a!==o&&!n(a))return!1;a===o&&i++}return 3>i?!1:s?!0:(e.line=r+1,c=e.push("hr","hr",0),c.map=[r,e.line],c.markup=Array(i+1).join(String.fromCharCode(o)),!0)}},{"../common/utils":4}],23:[function(e,r,t){"use strict";var n=e("../common/html_blocks"),s=e("../common/html_re").HTML_OPEN_CLOSE_TAG_RE,o=[[/^<(script|pre|style)(?=(\s|>|$))/i,/<\/(script|pre|style)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(s.source+"\\s*$"),/^$/,!1]];r.exports=function(e,r,t,n){var s,i,a,c,l=e.bMarks[r]+e.tShift[r],u=e.eMarks[r];if(!e.md.options.html)return!1;if(60!==e.src.charCodeAt(l))return!1;for(c=e.src.slice(l,u),s=0;si&&!(e.sCount[i]h&&!e.isEmpty(h);h++)if(!(e.sCount[h]-e.blkIndent>3)){if(e.sCount[h]>=e.blkIndent&&(c=e.bMarks[h]+e.tShift[h],l=e.eMarks[h],l>c&&(p=e.src.charCodeAt(c),(45===p||61===p)&&(c=e.skipChars(c,p),c=e.skipSpaces(c),c>=l)))){u=61===p?1:2;break}if(!(e.sCount[h]<0)){for(s=!1,o=0,i=f.length;i>o;o++)if(f[o](e,h,t,!0)){s=!0;break}if(s)break}}return u?(n=e.getLines(r,h,e.blkIndent,!1).trim(),e.line=h+1,a=e.push("heading_open","h"+String(u),1),a.markup=String.fromCharCode(p),a.map=[r,e.line],a=e.push("inline","",0),a.content=n,a.map=[r,e.line-1],a.children=[],a=e.push("heading_close","h"+String(u),-1),a.markup=String.fromCharCode(p),!0):!1}},{}],25:[function(e,r,t){"use strict";function n(e,r){var t,n,s,o;return n=e.bMarks[r]+e.tShift[r],s=e.eMarks[r],t=e.src.charCodeAt(n++),42!==t&&45!==t&&43!==t?-1:s>n&&(o=e.src.charCodeAt(n),!i(o))?-1:n}function s(e,r){var t,n=e.bMarks[r]+e.tShift[r],s=n,o=e.eMarks[r];if(s+1>=o)return-1;if(t=e.src.charCodeAt(s++),48>t||t>57)return-1;for(;;){if(s>=o)return-1;t=e.src.charCodeAt(s++);{if(!(t>=48&&57>=t)){if(41===t||46===t)break;return-1}if(s-n>=10)return-1}}return o>s&&(t=e.src.charCodeAt(s),!i(t))?-1:s}function o(e,r){var t,n,s=e.level+2;for(t=r+2,n=e.tokens.length-2;n>t;t++)e.tokens[t].level===s&&"paragraph_open"===e.tokens[t].type&&(e.tokens[t+2].hidden=!0,e.tokens[t].hidden=!0,t+=2)}var i=e("../common/utils").isSpace;r.exports=function(e,r,t,a){var c,l,u,p,h,f,d,m,g,_,k,b,v,x,y,C,A,w,q,D,E,S,F,L,z,T,R,M,I=!0;if((k=s(e,r))>=0)w=!0;else{if(!((k=n(e,r))>=0))return!1;w=!1}if(A=e.src.charCodeAt(k-1),a)return!0;for(D=e.tokens.length,w?(_=e.bMarks[r]+e.tShift[r],C=Number(e.src.substr(_,k-_-1)),z=e.push("ordered_list_open","ol",1),1!==C&&(z.attrs=[["start",C]])):z=e.push("bullet_list_open","ul",1),z.map=S=[r,0],z.markup=String.fromCharCode(A),c=r,E=!1,L=e.md.block.ruler.getRules("list");t>c;){for(v=k,x=e.eMarks[c],l=u=e.sCount[c]+k-(e.bMarks[r]+e.tShift[r]);x>v&&(b=e.src.charCodeAt(v),i(b));)9===b?u+=4-u%4:u++,v++;if(q=v,y=q>=x?1:u-l,y>4&&(y=1),p=l+y,z=e.push("list_item_open","li",1),z.markup=String.fromCharCode(A),z.map=F=[r,0],f=e.blkIndent,m=e.tight,h=e.tShift[r],d=e.sCount[r],g=e.parentType,e.blkIndent=p,e.tight=!0,e.parentType="list",e.tShift[r]=q-e.bMarks[r],e.sCount[r]=u,q>=x&&e.isEmpty(r+1)?e.line=Math.min(e.line+2,t):e.md.block.tokenize(e,r,t,!0),(!e.tight||E)&&(I=!1),E=e.line-r>1&&e.isEmpty(e.line-1),e.blkIndent=f,e.tShift[r]=h,e.sCount[r]=d,e.tight=m,e.parentType=g,z=e.push("list_item_close","li",-1),z.markup=String.fromCharCode(A),c=r=e.line,F[1]=c,q=e.bMarks[r],c>=t)break;if(e.isEmpty(c))break;if(e.sCount[c]T;T++)if(L[T](e,c,t,!0)){M=!0;break}if(M)break;if(w){if(k=s(e,c),0>k)break}else if(k=n(e,c),0>k)break;if(A!==e.src.charCodeAt(k-1))break}return z=w?e.push("ordered_list_close","ol",-1):e.push("bullet_list_close","ul",-1),z.markup=String.fromCharCode(A),S[1]=c,e.line=c,I&&o(e,D),!0}},{"../common/utils":4}],26:[function(e,r,t){"use strict";r.exports=function(e,r){for(var t,n,s,o,i,a=r+1,c=e.md.block.ruler.getRules("paragraph"),l=e.lineMax;l>a&&!e.isEmpty(a);a++)if(!(e.sCount[a]-e.blkIndent>3||e.sCount[a]<0)){for(n=!1,s=0,o=c.length;o>s;s++)if(c[s](e,a,l,!0)){n=!0;break}if(n)break}return t=e.getLines(r,a,e.blkIndent,!1).trim(),e.line=a,i=e.push("paragraph_open","p",1),i.map=[r,e.line],i=e.push("inline","",0),i.content=t,i.map=[r,e.line],i.children=[],i=e.push("paragraph_close","p",-1),!0}},{}],27:[function(e,r,t){"use strict";var n=e("../helpers/parse_link_destination"),s=e("../helpers/parse_link_title"),o=e("../common/utils").normalizeReference,i=e("../common/utils").isSpace;r.exports=function(e,r,t,a){var c,l,u,p,h,f,d,m,g,_,k,b,v,x,y,C=0,A=e.bMarks[r]+e.tShift[r],w=e.eMarks[r],q=r+1;if(91!==e.src.charCodeAt(A))return!1;for(;++Aq&&!e.isEmpty(q);q++)if(!(e.sCount[q]-e.blkIndent>3||e.sCount[q]<0)){for(v=!1,f=0,d=x.length;d>f;f++)if(x[f](e,q,p,!0)){v=!0;break}if(v)break}for(b=e.getLines(r,q,e.blkIndent,!1).trim(),w=b.length,A=1;w>A;A++){if(c=b.charCodeAt(A),91===c)return!1;if(93===c){g=A;break}10===c?C++:92===c&&(A++,w>A&&10===b.charCodeAt(A)&&C++)}if(0>g||58!==b.charCodeAt(g+1))return!1;for(A=g+2;w>A;A++)if(c=b.charCodeAt(A),10===c)C++;else if(!i(c))break;if(_=n(b,A,w),!_.ok)return!1;if(h=e.md.normalizeLink(_.str),!e.md.validateLink(h))return!1;for(A=_.pos,C+=_.lines,l=A,u=C,k=A;w>A;A++)if(c=b.charCodeAt(A),10===c)C++;else if(!i(c))break;for(_=s(b,A,w),w>A&&k!==A&&_.ok?(y=_.str,A=_.pos,C+=_.lines):(y="",A=l,C=u);w>A&&(c=b.charCodeAt(A),i(c));)A++;if(w>A&&10!==b.charCodeAt(A)&&y)for(y="",A=l,C=u;w>A&&(c=b.charCodeAt(A),i(c));)A++;return w>A&&10!==b.charCodeAt(A)?!1:(m=o(b.slice(1,g)))?a?!0:("undefined"==typeof e.env.references&&(e.env.references={}),"undefined"==typeof e.env.references[m]&&(e.env.references[m]={title:y,href:h}),e.line=r+C+1,!0):!1}},{"../common/utils":4,"../helpers/parse_link_destination":6,"../helpers/parse_link_title":8}],28:[function(e,r,t){"use strict";function n(e,r,t,n){var s,i,a,c,l,u,p,h;for(this.src=e,this.md=r,this.env=t,this.tokens=n,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.parentType="root",this.ddIndent=-1,this.level=0,this.result="",i=this.src,h=!1,a=c=u=p=0,l=i.length;l>c;c++){if(s=i.charCodeAt(c),!h){if(o(s)){u++,9===s?p+=4-p%4:p++;continue}h=!0}(10===s||c===l-1)&&(10!==s&&c++,this.bMarks.push(a),this.eMarks.push(c),this.tShift.push(u),this.sCount.push(p),h=!1,u=0,p=0,a=c+1)}this.bMarks.push(i.length),this.eMarks.push(i.length),this.tShift.push(0),this.sCount.push(0),this.lineMax=this.bMarks.length-1}var s=e("../token"),o=e("../common/utils").isSpace;n.prototype.push=function(e,r,t){var n=new s(e,r,t);return n.block=!0,0>t&&this.level--,n.level=this.level,t>0&&this.level++,this.tokens.push(n),n},n.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},n.prototype.skipEmptyLines=function(e){for(var r=this.lineMax;r>e&&!(this.bMarks[e]+this.tShift[e]e&&(r=this.src.charCodeAt(e),o(r));e++);return e},n.prototype.skipSpacesBack=function(e,r){if(r>=e)return e;for(;e>r;)if(!o(this.src.charCodeAt(--e)))return e+1;return e},n.prototype.skipChars=function(e,r){for(var t=this.src.length;t>e&&this.src.charCodeAt(e)===r;e++);return e},n.prototype.skipCharsBack=function(e,r,t){if(t>=e)return e;for(;e>t;)if(r!==this.src.charCodeAt(--e))return e+1;return e},n.prototype.getLines=function(e,r,t,n){var s,i,a,c,l,u,p,h=e;if(e>=r)return"";for(u=new Array(r-e),s=0;r>h;h++,s++){for(i=0,p=c=this.bMarks[h],l=r>h+1||n?this.eMarks[h]+1:this.eMarks[h];l>c&&t>i;){if(a=this.src.charCodeAt(c),o(a))9===a?i+=4-i%4:i++;else{if(!(c-pn;)96===r&&o%2===0?(a=!a,c=n):124!==r||o%2!==0||a?92===r?o++:o=0:(t.push(e.substring(i,n)),i=n+1),n++,n===s&&a&&(a=!1,n=c+1),r=e.charCodeAt(n);return t.push(e.substring(i)),t}r.exports=function(e,r,t,o){var i,a,c,l,u,p,h,f,d,m,g,_;if(r+2>t)return!1;if(u=r+1,e.sCount[u]=e.eMarks[u])return!1;if(i=e.src.charCodeAt(c),124!==i&&45!==i&&58!==i)return!1;if(a=n(e,r+1),!/^[-:| ]+$/.test(a))return!1;for(p=a.split("|"),d=[],l=0;ld.length)return!1;if(o)return!0;for(f=e.push("table_open","table",1),f.map=g=[r,0],f=e.push("thead_open","thead",1),f.map=[r,r+1],f=e.push("tr_open","tr",1),f.map=[r,r+1],l=0;lu&&!(e.sCount[u]l;l++)f=e.push("td_open","td",1),d[l]&&(f.attrs=[["style","text-align:"+d[l]]]),f=e.push("inline","",0),f.content=p[l]?p[l].trim():"",f.children=[],f=e.push("td_close","td",-1);f=e.push("tr_close","tr",-1)}return f=e.push("tbody_close","tbody",-1),f=e.push("table_close","table",-1),g[1]=_[1]=u,e.line=u,!0}},{}],30:[function(e,r,t){"use strict";r.exports=function(e){var r;e.inlineMode?(r=new e.Token("inline","",0),r.content=e.src,r.map=[0,1],r.children=[],e.tokens.push(r)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}},{}],31:[function(e,r,t){"use strict";r.exports=function(e){var r,t,n,s=e.tokens;for(t=0,n=s.length;n>t;t++)r=s[t],"inline"===r.type&&e.md.inline.parse(r.content,e.md,e.env,r.children)}},{}],32:[function(e,r,t){"use strict";function n(e){return/^\s]/i.test(e)}function s(e){return/^<\/a\s*>/i.test(e)}var o=e("../common/utils").arrayReplaceAt;r.exports=function(e){var r,t,i,a,c,l,u,p,h,f,d,m,g,_,k,b,v,x=e.tokens;if(e.md.options.linkify)for(t=0,i=x.length;i>t;t++)if("inline"===x[t].type&&e.md.linkify.pretest(x[t].content))for(a=x[t].children,g=0,r=a.length-1;r>=0;r--)if(l=a[r],"link_close"!==l.type){if("html_inline"===l.type&&(n(l.content)&&g>0&&g--,s(l.content)&&g++),!(g>0)&&"text"===l.type&&e.md.linkify.test(l.content)){for(h=l.content,v=e.md.linkify.match(h),u=[],m=l.level,d=0,p=0;pd&&(c=new e.Token("text","",0),c.content=h.slice(d,f),c.level=m,u.push(c)),c=new e.Token("link_open","a",1),c.attrs=[["href",k]],c.level=m++,c.markup="linkify",c.info="auto",u.push(c),c=new e.Token("text","",0),c.content=b,c.level=m,u.push(c),c=new e.Token("link_close","a",-1),c.level=--m,c.markup="linkify",c.info="auto",u.push(c),d=v[p].lastIndex);d=0;r--)t=e[r],"text"===t.type&&(t.content=t.content.replace(c,n))}function o(e){var r,t;for(r=e.length-1;r>=0;r--)t=e[r],"text"===t.type&&i.test(t.content)&&(t.content=t.content.replace(/\+-/g,"\xb1").replace(/\.{2,}/g,"\u2026").replace(/([?!])\u2026/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---([^-]|$)/gm,"$1\u2014$2").replace(/(^|\s)--(\s|$)/gm,"$1\u2013$2").replace(/(^|[^-\s])--([^-\s]|$)/gm,"$1\u2013$2"))}var i=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,a=/\((c|tm|r|p)\)/i,c=/\((c|tm|r|p)\)/gi,l={c:"\xa9",r:"\xae",p:"\xa7",tm:"\u2122"};r.exports=function(e){var r;if(e.md.options.typographer)for(r=e.tokens.length-1;r>=0;r--)"inline"===e.tokens[r].type&&(a.test(e.tokens[r].content)&&s(e.tokens[r].children),i.test(e.tokens[r].content)&&o(e.tokens[r].children))}},{}],35:[function(e,r,t){"use strict";function n(e,r,t){return e.substr(0,r)+t+e.substr(r+1)}function s(e,r){var t,s,c,p,h,f,d,m,g,_,k,b,v,x,y,C,A,w,q,D,E;for(q=[],t=0;t=0&&!(q[A].level<=d);A--);if(q.length=A+1,"text"===s.type){c=s.content,h=0,f=c.length;e:for(;f>h&&(l.lastIndex=h,p=l.exec(c));){if(y=C=!0,h=p.index+1,w="'"===p[0],g=32,p.index-1>=0)g=c.charCodeAt(p.index-1);else for(A=t-1;A>=0;A--)if("text"===e[A].type){g=e[A].content.charCodeAt(e[A].content.length-1);break}if(_=32,f>h)_=c.charCodeAt(h);else for(A=t+1;A=48&&57>=g&&(C=y=!1),y&&C&&(y=!1,C=b),y||C){if(C)for(A=q.length-1;A>=0&&(m=q[A],!(q[A].level=0;r--)"inline"===e.tokens[r].type&&c.test(e.tokens[r].content)&&s(e.tokens[r].children,e)}},{"../common/utils":4}],36:[function(e,r,t){"use strict";function n(e,r,t){this.src=e,this.env=t,this.tokens=[],this.inlineMode=!1,this.md=r}var s=e("../token");n.prototype.Token=s,r.exports=n},{"../token":51}],37:[function(e,r,t){"use strict";var n=/^<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/,s=/^<([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)>/;r.exports=function(e,r){var t,o,i,a,c,l,u=e.pos;return 60!==e.src.charCodeAt(u)?!1:(t=e.src.slice(u),t.indexOf(">")<0?!1:s.test(t)?(o=t.match(s),a=o[0].slice(1,-1),c=e.md.normalizeLink(a),e.md.validateLink(c)?(r||(l=e.push("link_open","a",1),l.attrs=[["href",c]],l.markup="autolink",l.info="auto",l=e.push("text","",0),l.content=e.md.normalizeLinkText(a),l=e.push("link_close","a",-1),l.markup="autolink",l.info="auto"),e.pos+=o[0].length,!0):!1):n.test(t)?(i=t.match(n),a=i[0].slice(1,-1),c=e.md.normalizeLink("mailto:"+a),e.md.validateLink(c)?(r||(l=e.push("link_open","a",1),l.attrs=[["href",c]],l.markup="autolink",l.info="auto",l=e.push("text","",0),l.content=e.md.normalizeLinkText(a),l=e.push("link_close","a",-1),l.markup="autolink",l.info="auto"),e.pos+=i[0].length,!0):!1):!1)}},{}],38:[function(e,r,t){"use strict";r.exports=function(e,r){var t,n,s,o,i,a,c=e.pos,l=e.src.charCodeAt(c);if(96!==l)return!1;for(t=c,c++,n=e.posMax;n>c&&96===e.src.charCodeAt(c);)c++;for(s=e.src.slice(t,c),o=i=c;-1!==(o=e.src.indexOf("`",i));){for(i=o+1;n>i&&96===e.src.charCodeAt(i);)i++;if(i-o===s.length)return r||(a=e.push("code_inline","code",0),a.markup=s,a.content=e.src.slice(c,o).replace(/[ \n]+/g," ").trim()),e.pos=i,!0}return r||(e.pending+=s),e.pos+=s.length,!0}},{}],39:[function(e,r,t){"use strict";r.exports=function(e){var r,t,n,s,o=e.delimiters,i=e.delimiters.length;for(r=0;i>r;r++)if(n=o[r],n.close)for(t=r-n.jump-1;t>=0;){if(s=o[t],s.open&&s.marker===n.marker&&s.end<0&&s.level===n.level){n.jump=r-t,n.open=!1,s.end=r,s.jump=0;break}t-=s.jump+1}}},{}],40:[function(e,r,t){"use strict";r.exports.tokenize=function(e,r){var t,n,s,o=e.pos,i=e.src.charCodeAt(o);if(r)return!1;if(95!==i&&42!==i)return!1;for(n=e.scanDelims(e.pos,42===i),t=0;tr;r++)t=a[r],(95===t.marker||42===t.marker)&&-1!==t.end&&(n=a[t.end],i=c>r+1&&a[r+1].end===t.end-1&&a[r+1].token===t.token+1&&a[t.end-1].token===n.token-1&&a[r+1].marker===t.marker,o=String.fromCharCode(t.marker),s=e.tokens[t.token],s.type=i?"strong_open":"em_open",s.tag=i?"strong":"em",s.nesting=1,s.markup=i?o+o:o,s.content="",s=e.tokens[n.token],s.type=i?"strong_close":"em_close",s.tag=i?"strong":"em",s.nesting=-1,s.markup=i?o+o:o,s.content="",i&&(e.tokens[a[r+1].token].content="",e.tokens[a[t.end-1].token].content="",r++))}},{}],41:[function(e,r,t){"use strict";var n=e("../common/entities"),s=e("../common/utils").has,o=e("../common/utils").isValidEntityCode,i=e("../common/utils").fromCodePoint,a=/^&#((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i,c=/^&([a-z][a-z0-9]{1,31});/i;r.exports=function(e,r){var t,l,u,p=e.pos,h=e.posMax;if(38!==e.src.charCodeAt(p))return!1;if(h>p+1)if(t=e.src.charCodeAt(p+1),35===t){if(u=e.src.slice(p).match(a))return r||(l="x"===u[1][0].toLowerCase()?parseInt(u[1].slice(1),16):parseInt(u[1],10),e.pending+=i(o(l)?l:65533)),e.pos+=u[0].length,!0}else if(u=e.src.slice(p).match(c),u&&s(n,u[1]))return r||(e.pending+=n[u[1]]),e.pos+=u[0].length,!0;return r||(e.pending+="&"),e.pos++,!0}},{"../common/entities":1,"../common/utils":4}],42:[function(e,r,t){"use strict";for(var n=e("../common/utils").isSpace,s=[],o=0;256>o;o++)s.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){s[e.charCodeAt(0)]=1}),r.exports=function(e,r){var t,o=e.pos,i=e.posMax;if(92!==e.src.charCodeAt(o))return!1;if(o++,i>o){if(t=e.src.charCodeAt(o),256>t&&0!==s[t])return r||(e.pending+=e.src[o]),e.pos+=2,!0;if(10===t){for(r||e.push("hardbreak","br",0),o++;i>o&&(t=e.src.charCodeAt(o),n(t));)o++;return e.pos=o,!0}}return r||(e.pending+="\\"),e.pos++,!0}},{"../common/utils":4}],43:[function(e,r,t){"use strict";function n(e){var r=32|e;return r>=97&&122>=r}var s=e("../common/html_re").HTML_TAG_RE;r.exports=function(e,r){var t,o,i,a,c=e.pos;return e.md.options.html?(i=e.posMax,60!==e.src.charCodeAt(c)||c+2>=i?!1:(t=e.src.charCodeAt(c+1),(33===t||63===t||47===t||n(t))&&(o=e.src.slice(c).match(s))?(r||(a=e.push("html_inline","",0),a.content=e.src.slice(c,c+o[0].length)),e.pos+=o[0].length,!0):!1)):!1}},{"../common/html_re":3}],44:[function(e,r,t){"use strict";var n=e("../helpers/parse_link_label"),s=e("../helpers/parse_link_destination"),o=e("../helpers/parse_link_title"),i=e("../common/utils").normalizeReference,a=e("../common/utils").isSpace;r.exports=function(e,r){var t,c,l,u,p,h,f,d,m,g,_,k,b,v="",x=e.pos,y=e.posMax;if(33!==e.src.charCodeAt(e.pos))return!1;if(91!==e.src.charCodeAt(e.pos+1))return!1;if(h=e.pos+2,p=n(e,e.pos+1,!1),0>p)return!1;if(f=p+1,y>f&&40===e.src.charCodeAt(f)){for(f++;y>f&&(c=e.src.charCodeAt(f),a(c)||10===c);f++);if(f>=y)return!1;for(b=f,m=s(e.src,f,e.posMax),m.ok&&(v=e.md.normalizeLink(m.str),e.md.validateLink(v)?f=m.pos:v=""),b=f;y>f&&(c=e.src.charCodeAt(f),a(c)||10===c);f++);if(m=o(e.src,f,e.posMax),y>f&&b!==f&&m.ok)for(g=m.str,f=m.pos;y>f&&(c=e.src.charCodeAt(f),a(c)||10===c);f++);else g="";if(f>=y||41!==e.src.charCodeAt(f))return e.pos=x,!1;f++}else{if("undefined"==typeof e.env.references)return!1;if(y>f&&91===e.src.charCodeAt(f)?(b=f+1,f=n(e,f),f>=0?u=e.src.slice(b,f++):f=p+1):f=p+1,u||(u=e.src.slice(h,p)),d=e.env.references[i(u)],!d)return e.pos=x,!1;v=d.href,g=d.title}return r||(l=e.src.slice(h,p),e.md.inline.parse(l,e.md,e.env,k=[]),_=e.push("image","img",0),_.attrs=t=[["src",v],["alt",""]],_.children=k,_.content=l,g&&t.push(["title",g])),e.pos=f,e.posMax=y,!0}},{"../common/utils":4,"../helpers/parse_link_destination":6,"../helpers/parse_link_label":7,"../helpers/parse_link_title":8}],45:[function(e,r,t){"use strict";var n=e("../helpers/parse_link_label"),s=e("../helpers/parse_link_destination"),o=e("../helpers/parse_link_title"),i=e("../common/utils").normalizeReference,a=e("../common/utils").isSpace;r.exports=function(e,r){var t,c,l,u,p,h,f,d,m,g,_="",k=e.pos,b=e.posMax,v=e.pos;if(91!==e.src.charCodeAt(e.pos))return!1;if(p=e.pos+1,u=n(e,e.pos,!0),0>u)return!1;if(h=u+1,b>h&&40===e.src.charCodeAt(h)){for(h++;b>h&&(c=e.src.charCodeAt(h),a(c)||10===c);h++);if(h>=b)return!1;for(v=h,f=s(e.src,h,e.posMax),f.ok&&(_=e.md.normalizeLink(f.str),e.md.validateLink(_)?h=f.pos:_=""),v=h;b>h&&(c=e.src.charCodeAt(h),a(c)||10===c);h++);if(f=o(e.src,h,e.posMax),b>h&&v!==h&&f.ok)for(m=f.str,h=f.pos;b>h&&(c=e.src.charCodeAt(h),a(c)||10===c);h++);else m="";if(h>=b||41!==e.src.charCodeAt(h))return e.pos=k,!1;h++}else{if("undefined"==typeof e.env.references)return!1;if(b>h&&91===e.src.charCodeAt(h)?(v=h+1,h=n(e,h),h>=0?l=e.src.slice(v,h++):h=u+1):h=u+1,l||(l=e.src.slice(p,u)),d=e.env.references[i(l)],!d)return e.pos=k,!1;_=d.href,m=d.title}return r||(e.pos=p,e.posMax=u,g=e.push("link_open","a",1),g.attrs=t=[["href",_]],m&&t.push(["title",m]),e.md.inline.tokenize(e),g=e.push("link_close","a",-1)),e.pos=h,e.posMax=b,!0}},{"../common/utils":4,"../helpers/parse_link_destination":6,"../helpers/parse_link_label":7,"../helpers/parse_link_title":8}],46:[function(e,r,t){"use strict";r.exports=function(e,r){var t,n,s=e.pos;if(10!==e.src.charCodeAt(s))return!1;for(t=e.pending.length-1,n=e.posMax,r||(t>=0&&32===e.pending.charCodeAt(t)?t>=1&&32===e.pending.charCodeAt(t-1)?(e.pending=e.pending.replace(/ +$/,""),e.push("hardbreak","br",0)):(e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0)):e.push("softbreak","br",0)),s++;n>s&&32===e.src.charCodeAt(s);)s++;return e.pos=s,!0}},{}],47:[function(e,r,t){"use strict";function n(e,r,t,n){this.src=e,this.env=t,this.md=r,this.tokens=n,this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[]}var s=e("../token"),o=e("../common/utils").isWhiteSpace,i=e("../common/utils").isPunctChar,a=e("../common/utils").isMdAsciiPunct;n.prototype.pushPending=function(){var e=new s("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},n.prototype.push=function(e,r,t){this.pending&&this.pushPending();var n=new s(e,r,t);return 0>t&&this.level--,n.level=this.level,t>0&&this.level++,this.pendingLevel=this.level,this.tokens.push(n),n},n.prototype.scanDelims=function(e,r){var t,n,s,c,l,u,p,h,f,d=e,m=!0,g=!0,_=this.posMax,k=this.src.charCodeAt(e);for(t=e>0?this.src.charCodeAt(e-1):32;_>d&&this.src.charCodeAt(d)===k;)d++;return s=d-e,n=_>d?this.src.charCodeAt(d):32,p=a(t)||i(String.fromCharCode(t)),f=a(n)||i(String.fromCharCode(n)),u=o(t),h=o(n),h?m=!1:f&&(u||p||(m=!1)),u?g=!1:p&&(h||f||(g=!1)),r?(c=m,l=g):(c=m&&(!g||p),l=g&&(!m||f)),{can_open:c,can_close:l,length:s}},n.prototype.Token=s,r.exports=n},{"../common/utils":4,"../token":51}],48:[function(e,r,t){"use strict";r.exports.tokenize=function(e,r){var t,n,s,o,i,a=e.pos,c=e.src.charCodeAt(a);if(r)return!1;if(126!==c)return!1;if(n=e.scanDelims(e.pos,!0),o=n.length,i=String.fromCharCode(c),2>o)return!1;for(o%2&&(s=e.push("text","",0),s.content=i,o--),t=0;o>t;t+=2)s=e.push("text","",0),s.content=i+i,e.delimiters.push({marker:c,jump:t,token:e.tokens.length-1,level:e.level,end:-1,open:n.can_open,close:n.can_close});return e.pos+=n.length,!0},r.exports.postProcess=function(e){var r,t,n,s,o,i=[],a=e.delimiters,c=e.delimiters.length;for(r=0;c>r;r++)n=a[r],126===n.marker&&-1!==n.end&&(s=a[n.end],o=e.tokens[n.token],o.type="s_open",o.tag="s",o.nesting=1,o.markup="~~",o.content="",o=e.tokens[s.token],o.type="s_close",o.tag="s",o.nesting=-1,o.markup="~~",o.content="","text"===e.tokens[s.token-1].type&&"~"===e.tokens[s.token-1].content&&i.push(s.token-1));for(;i.length;){for(r=i.pop(),t=r+1;tr;r++)n+=s[r].nesting,s[r].level=n,"text"===s[r].type&&o>r+1&&"text"===s[r+1].type?s[r+1].content=s[r].content+s[r+1].content:(r!==t&&(s[t]=s[r]),t++);r!==t&&(s.length=t)}},{}],51:[function(e,r,t){"use strict";function n(e,r,t){this.type=e,this.tag=r,this.attrs=null,this.map=null,this.nesting=t,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}n.prototype.attrIndex=function(e){var r,t,n;if(!this.attrs)return-1;for(r=this.attrs,t=0,n=r.length;n>t;t++)if(r[t][0]===e)return t;return-1},n.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]},n.prototype.attrSet=function(e,r){var t=this.attrIndex(e),n=[e,r];0>t?this.attrPush(n):this.attrs[t]=n},n.prototype.attrJoin=function(e,r){var t=this.attrIndex(e);0>t?this.attrPush([e,r]):this.attrs[t][1]=this.attrs[t][1]+" "+r},r.exports=n},{}],52:[function(r,t,n){(function(r){!function(s){function o(e){throw new RangeError(R[e])}function i(e,r){for(var t=e.length,n=[];t--;)n[t]=r(e[t]);return n}function a(e,r){var t=e.split("@"),n="";t.length>1&&(n=t[0]+"@",e=t[1]),e=e.replace(T,".");var s=e.split("."),o=i(s,r).join(".");return n+o}function c(e){for(var r,t,n=[],s=0,o=e.length;o>s;)r=e.charCodeAt(s++),r>=55296&&56319>=r&&o>s?(t=e.charCodeAt(s++),56320==(64512&t)?n.push(((1023&r)<<10)+(1023&t)+65536):(n.push(r),s--)):n.push(r);return n}function l(e){return i(e,function(e){var r="";return e>65535&&(e-=65536,r+=B(e>>>10&1023|55296),e=56320|1023&e),r+=B(e)}).join("")}function u(e){return 10>e-48?e-22:26>e-65?e-65:26>e-97?e-97:C}function p(e,r){return e+22+75*(26>e)-((0!=r)<<5)}function h(e,r,t){var n=0;for(e=t?I(e/D):e>>1,e+=I(e/r);e>M*w>>1;n+=C)e=I(e/M);return I(n+(M+1)*e/(e+q))}function f(e){var r,t,n,s,i,a,c,p,f,d,m=[],g=e.length,_=0,k=S,b=E;for(t=e.lastIndexOf(F),0>t&&(t=0),n=0;t>n;++n)e.charCodeAt(n)>=128&&o("not-basic"),m.push(e.charCodeAt(n));for(s=t>0?t+1:0;g>s;){for(i=_,a=1,c=C;s>=g&&o("invalid-input"),p=u(e.charCodeAt(s++)),(p>=C||p>I((y-_)/a))&&o("overflow"),_+=p*a,f=b>=c?A:c>=b+w?w:c-b,!(f>p);c+=C)d=C-f,a>I(y/d)&&o("overflow"),a*=d;r=m.length+1,b=h(_-i,r,0==i),I(_/r)>y-k&&o("overflow"),k+=I(_/r),_%=r,m.splice(_++,0,k)}return l(m)}function d(e){var r,t,n,s,i,a,l,u,f,d,m,g,_,k,b,v=[];for(e=c(e),g=e.length,r=S,t=0,i=E,a=0;g>a;++a)m=e[a],128>m&&v.push(B(m));for(n=s=v.length,s&&v.push(F);g>n;){for(l=y,a=0;g>a;++a)m=e[a],m>=r&&l>m&&(l=m);for(_=n+1,l-r>I((y-t)/_)&&o("overflow"),t+=(l-r)*_,r=l,a=0;g>a;++a)if(m=e[a],r>m&&++t>y&&o("overflow"),m==r){for(u=t,f=C;d=i>=f?A:f>=i+w?w:f-i,!(d>u);f+=C)b=u-d,k=C-d,v.push(B(p(d+b%k,0))),u=I(b/k);v.push(B(p(u,0))),i=h(t,_,n==s),t=0,++n}++t,++r}return v.join("")}function m(e){return a(e,function(e){return L.test(e)?f(e.slice(4).toLowerCase()):e})}function g(e){return a(e,function(e){return z.test(e)?"xn--"+d(e):e})}var _="object"==typeof n&&n&&!n.nodeType&&n,k="object"==typeof t&&t&&!t.nodeType&&t,b="object"==typeof r&&r;(b.global===b||b.window===b||b.self===b)&&(s=b);var v,x,y=2147483647,C=36,A=1,w=26,q=38,D=700,E=72,S=128,F="-",L=/^xn--/,z=/[^\x20-\x7E]/,T=/[\x2E\u3002\uFF0E\uFF61]/g,R={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},M=C-A,I=Math.floor,B=String.fromCharCode;if(v={version:"1.3.2",ucs2:{decode:c,encode:l},decode:f,encode:d,toASCII:g,toUnicode:m},"function"==typeof e&&"object"==typeof e.amd&&e.amd)e("punycode",function(){return v});else if(_&&k)if(t.exports==_)k.exports=v;else for(x in v)v.hasOwnProperty(x)&&(_[x]=v[x]);else s.punycode=v}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],53:[function(e,r,t){r.exports={Aacute:"\xc1",aacute:"\xe1",Abreve:"\u0102",abreve:"\u0103",ac:"\u223e",acd:"\u223f",acE:"\u223e\u0333",Acirc:"\xc2",acirc:"\xe2",acute:"\xb4",Acy:"\u0410",acy:"\u0430",AElig:"\xc6",aelig:"\xe6",af:"\u2061",Afr:"\ud835\udd04",afr:"\ud835\udd1e",Agrave:"\xc0",agrave:"\xe0",alefsym:"\u2135",aleph:"\u2135",Alpha:"\u0391",alpha:"\u03b1",Amacr:"\u0100",amacr:"\u0101",amalg:"\u2a3f",amp:"&",AMP:"&",andand:"\u2a55",And:"\u2a53",and:"\u2227",andd:"\u2a5c",andslope:"\u2a58",andv:"\u2a5a",ang:"\u2220",ange:"\u29a4",angle:"\u2220",angmsdaa:"\u29a8",angmsdab:"\u29a9",angmsdac:"\u29aa",angmsdad:"\u29ab",angmsdae:"\u29ac",angmsdaf:"\u29ad",angmsdag:"\u29ae",angmsdah:"\u29af",angmsd:"\u2221",angrt:"\u221f",angrtvb:"\u22be",angrtvbd:"\u299d",angsph:"\u2222",angst:"\xc5",angzarr:"\u237c",Aogon:"\u0104",aogon:"\u0105",Aopf:"\ud835\udd38",aopf:"\ud835\udd52",apacir:"\u2a6f",ap:"\u2248",apE:"\u2a70",ape:"\u224a",apid:"\u224b",apos:"'",ApplyFunction:"\u2061",approx:"\u2248",approxeq:"\u224a",Aring:"\xc5",aring:"\xe5",Ascr:"\ud835\udc9c",ascr:"\ud835\udcb6",Assign:"\u2254",ast:"*",asymp:"\u2248",asympeq:"\u224d",Atilde:"\xc3",atilde:"\xe3",Auml:"\xc4",auml:"\xe4",awconint:"\u2233",awint:"\u2a11",backcong:"\u224c",backepsilon:"\u03f6",backprime:"\u2035",backsim:"\u223d",backsimeq:"\u22cd",Backslash:"\u2216",Barv:"\u2ae7",barvee:"\u22bd",barwed:"\u2305",Barwed:"\u2306",barwedge:"\u2305",bbrk:"\u23b5",bbrktbrk:"\u23b6",bcong:"\u224c",Bcy:"\u0411",bcy:"\u0431",bdquo:"\u201e",becaus:"\u2235",because:"\u2235",Because:"\u2235",bemptyv:"\u29b0",bepsi:"\u03f6",bernou:"\u212c",Bernoullis:"\u212c",Beta:"\u0392",beta:"\u03b2",beth:"\u2136",between:"\u226c",Bfr:"\ud835\udd05",bfr:"\ud835\udd1f",bigcap:"\u22c2",bigcirc:"\u25ef",bigcup:"\u22c3",bigodot:"\u2a00",bigoplus:"\u2a01",bigotimes:"\u2a02",bigsqcup:"\u2a06",bigstar:"\u2605",bigtriangledown:"\u25bd",bigtriangleup:"\u25b3",biguplus:"\u2a04",bigvee:"\u22c1",bigwedge:"\u22c0",bkarow:"\u290d",blacklozenge:"\u29eb",blacksquare:"\u25aa",blacktriangle:"\u25b4",blacktriangledown:"\u25be",blacktriangleleft:"\u25c2",blacktriangleright:"\u25b8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20e5",bnequiv:"\u2261\u20e5",bNot:"\u2aed",bnot:"\u2310",Bopf:"\ud835\udd39",bopf:"\ud835\udd53",bot:"\u22a5",bottom:"\u22a5",bowtie:"\u22c8",boxbox:"\u29c9",boxdl:"\u2510",boxdL:"\u2555",boxDl:"\u2556",boxDL:"\u2557",boxdr:"\u250c",boxdR:"\u2552",boxDr:"\u2553",boxDR:"\u2554",boxh:"\u2500",boxH:"\u2550",boxhd:"\u252c",boxHd:"\u2564",boxhD:"\u2565",boxHD:"\u2566",boxhu:"\u2534",boxHu:"\u2567",boxhU:"\u2568",boxHU:"\u2569",boxminus:"\u229f",boxplus:"\u229e",boxtimes:"\u22a0",boxul:"\u2518",boxuL:"\u255b",boxUl:"\u255c",boxUL:"\u255d",boxur:"\u2514",boxuR:"\u2558",boxUr:"\u2559",boxUR:"\u255a",boxv:"\u2502",boxV:"\u2551",boxvh:"\u253c",boxvH:"\u256a",boxVh:"\u256b",boxVH:"\u256c",boxvl:"\u2524",boxvL:"\u2561",boxVl:"\u2562",boxVL:"\u2563",boxvr:"\u251c",boxvR:"\u255e",boxVr:"\u255f",boxVR:"\u2560",bprime:"\u2035",breve:"\u02d8",Breve:"\u02d8",brvbar:"\xa6",bscr:"\ud835\udcb7",Bscr:"\u212c",bsemi:"\u204f",bsim:"\u223d",bsime:"\u22cd",bsolb:"\u29c5",bsol:"\\",bsolhsub:"\u27c8",bull:"\u2022",bullet:"\u2022",bump:"\u224e",bumpE:"\u2aae",bumpe:"\u224f",Bumpeq:"\u224e",bumpeq:"\u224f",Cacute:"\u0106",cacute:"\u0107",capand:"\u2a44",capbrcup:"\u2a49",capcap:"\u2a4b",cap:"\u2229",Cap:"\u22d2",capcup:"\u2a47",capdot:"\u2a40",CapitalDifferentialD:"\u2145",caps:"\u2229\ufe00",caret:"\u2041",caron:"\u02c7",Cayleys:"\u212d",ccaps:"\u2a4d",Ccaron:"\u010c",ccaron:"\u010d",Ccedil:"\xc7",ccedil:"\xe7",Ccirc:"\u0108",ccirc:"\u0109",Cconint:"\u2230",ccups:"\u2a4c",ccupssm:"\u2a50",Cdot:"\u010a",cdot:"\u010b",cedil:"\xb8",Cedilla:"\xb8",cemptyv:"\u29b2",cent:"\xa2",centerdot:"\xb7",CenterDot:"\xb7",cfr:"\ud835\udd20",Cfr:"\u212d",CHcy:"\u0427",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",Chi:"\u03a7",chi:"\u03c7",circ:"\u02c6",circeq:"\u2257",circlearrowleft:"\u21ba",circlearrowright:"\u21bb",circledast:"\u229b",circledcirc:"\u229a",circleddash:"\u229d",CircleDot:"\u2299",circledR:"\xae",circledS:"\u24c8",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",cir:"\u25cb",cirE:"\u29c3",cire:"\u2257",cirfnint:"\u2a10",cirmid:"\u2aef",cirscir:"\u29c2",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201d",CloseCurlyQuote:"\u2019",clubs:"\u2663",clubsuit:"\u2663",colon:":",Colon:"\u2237",Colone:"\u2a74",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2a6d",Congruent:"\u2261",conint:"\u222e",Conint:"\u222f",ContourIntegral:"\u222e",copf:"\ud835\udd54",Copf:"\u2102",coprod:"\u2210",Coproduct:"\u2210",copy:"\xa9",COPY:"\xa9",copysr:"\u2117",CounterClockwiseContourIntegral:"\u2233",crarr:"\u21b5",cross:"\u2717",Cross:"\u2a2f",Cscr:"\ud835\udc9e",cscr:"\ud835\udcb8",csub:"\u2acf",csube:"\u2ad1",csup:"\u2ad0",csupe:"\u2ad2",ctdot:"\u22ef",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22de",cuesc:"\u22df",cularr:"\u21b6",cularrp:"\u293d",cupbrcap:"\u2a48",cupcap:"\u2a46",CupCap:"\u224d",cup:"\u222a",Cup:"\u22d3",cupcup:"\u2a4a",cupdot:"\u228d",cupor:"\u2a45",cups:"\u222a\ufe00",curarr:"\u21b7",curarrm:"\u293c",curlyeqprec:"\u22de",curlyeqsucc:"\u22df",curlyvee:"\u22ce",curlywedge:"\u22cf",curren:"\xa4",curvearrowleft:"\u21b6",curvearrowright:"\u21b7",cuvee:"\u22ce",cuwed:"\u22cf",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232d",dagger:"\u2020",Dagger:"\u2021",daleth:"\u2138",darr:"\u2193",Darr:"\u21a1",dArr:"\u21d3",dash:"\u2010",Dashv:"\u2ae4",dashv:"\u22a3",dbkarow:"\u290f",dblac:"\u02dd",Dcaron:"\u010e",dcaron:"\u010f",Dcy:"\u0414",dcy:"\u0434",ddagger:"\u2021",ddarr:"\u21ca",DD:"\u2145",dd:"\u2146",DDotrahd:"\u2911",ddotseq:"\u2a77",deg:"\xb0",Del:"\u2207",Delta:"\u0394",delta:"\u03b4",demptyv:"\u29b1",dfisht:"\u297f",Dfr:"\ud835\udd07",dfr:"\ud835\udd21",dHar:"\u2965",dharl:"\u21c3",dharr:"\u21c2",DiacriticalAcute:"\xb4",DiacriticalDot:"\u02d9",DiacriticalDoubleAcute:"\u02dd",DiacriticalGrave:"`",DiacriticalTilde:"\u02dc",diam:"\u22c4",diamond:"\u22c4",Diamond:"\u22c4",diamondsuit:"\u2666",diams:"\u2666",die:"\xa8",DifferentialD:"\u2146",digamma:"\u03dd",disin:"\u22f2",div:"\xf7",divide:"\xf7",divideontimes:"\u22c7",divonx:"\u22c7",DJcy:"\u0402",djcy:"\u0452",dlcorn:"\u231e",dlcrop:"\u230d",dollar:"$",Dopf:"\ud835\udd3b",dopf:"\ud835\udd55",Dot:"\xa8",dot:"\u02d9",DotDot:"\u20dc",doteq:"\u2250",doteqdot:"\u2251",DotEqual:"\u2250",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22a1",doublebarwedge:"\u2306",DoubleContourIntegral:"\u222f",DoubleDot:"\xa8",DoubleDownArrow:"\u21d3",DoubleLeftArrow:"\u21d0",DoubleLeftRightArrow:"\u21d4",DoubleLeftTee:"\u2ae4",DoubleLongLeftArrow:"\u27f8",DoubleLongLeftRightArrow:"\u27fa",DoubleLongRightArrow:"\u27f9",DoubleRightArrow:"\u21d2",DoubleRightTee:"\u22a8",DoubleUpArrow:"\u21d1",DoubleUpDownArrow:"\u21d5",DoubleVerticalBar:"\u2225",DownArrowBar:"\u2913",downarrow:"\u2193",DownArrow:"\u2193",Downarrow:"\u21d3",DownArrowUpArrow:"\u21f5",DownBreve:"\u0311",downdownarrows:"\u21ca",downharpoonleft:"\u21c3",downharpoonright:"\u21c2",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295e",DownLeftVectorBar:"\u2956",DownLeftVector:"\u21bd",DownRightTeeVector:"\u295f",DownRightVectorBar:"\u2957",DownRightVector:"\u21c1",DownTeeArrow:"\u21a7",DownTee:"\u22a4",drbkarow:"\u2910",drcorn:"\u231f",drcrop:"\u230c",Dscr:"\ud835\udc9f",dscr:"\ud835\udcb9",DScy:"\u0405",dscy:"\u0455",dsol:"\u29f6",Dstrok:"\u0110",dstrok:"\u0111",dtdot:"\u22f1",dtri:"\u25bf",dtrif:"\u25be",duarr:"\u21f5",duhar:"\u296f",dwangle:"\u29a6",DZcy:"\u040f",dzcy:"\u045f",dzigrarr:"\u27ff",Eacute:"\xc9",eacute:"\xe9",easter:"\u2a6e",Ecaron:"\u011a",ecaron:"\u011b",Ecirc:"\xca",ecirc:"\xea",ecir:"\u2256",ecolon:"\u2255",Ecy:"\u042d",ecy:"\u044d",eDDot:"\u2a77",Edot:"\u0116",edot:"\u0117",eDot:"\u2251",ee:"\u2147",efDot:"\u2252",Efr:"\ud835\udd08",efr:"\ud835\udd22",eg:"\u2a9a",Egrave:"\xc8",egrave:"\xe8",egs:"\u2a96",egsdot:"\u2a98",el:"\u2a99",Element:"\u2208",elinters:"\u23e7",ell:"\u2113",els:"\u2a95",elsdot:"\u2a97",Emacr:"\u0112",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",EmptySmallSquare:"\u25fb",emptyv:"\u2205",EmptyVerySmallSquare:"\u25ab",emsp13:"\u2004",emsp14:"\u2005",emsp:"\u2003",ENG:"\u014a",eng:"\u014b",ensp:"\u2002",Eogon:"\u0118",eogon:"\u0119",Eopf:"\ud835\udd3c",eopf:"\ud835\udd56",epar:"\u22d5",eparsl:"\u29e3",eplus:"\u2a71",epsi:"\u03b5",Epsilon:"\u0395",epsilon:"\u03b5",epsiv:"\u03f5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2a96",eqslantless:"\u2a95",Equal:"\u2a75",equals:"=",EqualTilde:"\u2242",equest:"\u225f",Equilibrium:"\u21cc",equiv:"\u2261",equivDD:"\u2a78",eqvparsl:"\u29e5",erarr:"\u2971",erDot:"\u2253",escr:"\u212f",Escr:"\u2130",esdot:"\u2250",Esim:"\u2a73",esim:"\u2242",Eta:"\u0397",eta:"\u03b7",ETH:"\xd0",eth:"\xf0",Euml:"\xcb",euml:"\xeb",euro:"\u20ac",excl:"!",exist:"\u2203",Exists:"\u2203",expectation:"\u2130",exponentiale:"\u2147",ExponentialE:"\u2147",fallingdotseq:"\u2252",Fcy:"\u0424",fcy:"\u0444",female:"\u2640",ffilig:"\ufb03",fflig:"\ufb00",ffllig:"\ufb04",Ffr:"\ud835\udd09",ffr:"\ud835\udd23",filig:"\ufb01",FilledSmallSquare:"\u25fc",FilledVerySmallSquare:"\u25aa",fjlig:"fj",flat:"\u266d",fllig:"\ufb02",fltns:"\u25b1",fnof:"\u0192",Fopf:"\ud835\udd3d",fopf:"\ud835\udd57",forall:"\u2200",ForAll:"\u2200",fork:"\u22d4",forkv:"\u2ad9",Fouriertrf:"\u2131",fpartint:"\u2a0d",frac12:"\xbd",frac13:"\u2153",frac14:"\xbc",frac15:"\u2155",frac16:"\u2159",frac18:"\u215b",frac23:"\u2154",frac25:"\u2156",frac34:"\xbe",frac35:"\u2157",frac38:"\u215c",frac45:"\u2158",frac56:"\u215a",frac58:"\u215d",frac78:"\u215e",frasl:"\u2044",frown:"\u2322",fscr:"\ud835\udcbb",Fscr:"\u2131",gacute:"\u01f5",Gamma:"\u0393",gamma:"\u03b3",Gammad:"\u03dc",gammad:"\u03dd",gap:"\u2a86",Gbreve:"\u011e",gbreve:"\u011f",Gcedil:"\u0122",Gcirc:"\u011c",gcirc:"\u011d",Gcy:"\u0413",gcy:"\u0433",Gdot:"\u0120",gdot:"\u0121",ge:"\u2265",gE:"\u2267",gEl:"\u2a8c",gel:"\u22db",geq:"\u2265",geqq:"\u2267",geqslant:"\u2a7e",gescc:"\u2aa9",ges:"\u2a7e",gesdot:"\u2a80",gesdoto:"\u2a82",gesdotol:"\u2a84",gesl:"\u22db\ufe00",gesles:"\u2a94",Gfr:"\ud835\udd0a",gfr:"\ud835\udd24",gg:"\u226b",Gg:"\u22d9",ggg:"\u22d9",gimel:"\u2137",GJcy:"\u0403",gjcy:"\u0453",gla:"\u2aa5",gl:"\u2277",glE:"\u2a92",glj:"\u2aa4",gnap:"\u2a8a",gnapprox:"\u2a8a",gne:"\u2a88",gnE:"\u2269",gneq:"\u2a88",gneqq:"\u2269",gnsim:"\u22e7",Gopf:"\ud835\udd3e",gopf:"\ud835\udd58",grave:"`",GreaterEqual:"\u2265",GreaterEqualLess:"\u22db",GreaterFullEqual:"\u2267",GreaterGreater:"\u2aa2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2a7e",GreaterTilde:"\u2273",Gscr:"\ud835\udca2",gscr:"\u210a",gsim:"\u2273",gsime:"\u2a8e",gsiml:"\u2a90",gtcc:"\u2aa7",gtcir:"\u2a7a",gt:">",GT:">",Gt:"\u226b",gtdot:"\u22d7",gtlPar:"\u2995",gtquest:"\u2a7c",gtrapprox:"\u2a86",gtrarr:"\u2978",gtrdot:"\u22d7",gtreqless:"\u22db",gtreqqless:"\u2a8c",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\ufe00",gvnE:"\u2269\ufe00",Hacek:"\u02c7",hairsp:"\u200a",half:"\xbd",hamilt:"\u210b",HARDcy:"\u042a",hardcy:"\u044a",harrcir:"\u2948",harr:"\u2194",hArr:"\u21d4",harrw:"\u21ad",Hat:"^",hbar:"\u210f",Hcirc:"\u0124",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22b9",hfr:"\ud835\udd25",Hfr:"\u210c",HilbertSpace:"\u210b",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21ff",homtht:"\u223b",hookleftarrow:"\u21a9",hookrightarrow:"\u21aa",hopf:"\ud835\udd59",Hopf:"\u210d",horbar:"\u2015",HorizontalLine:"\u2500",hscr:"\ud835\udcbd",Hscr:"\u210b",hslash:"\u210f",Hstrok:"\u0126",hstrok:"\u0127",HumpDownHump:"\u224e",HumpEqual:"\u224f",hybull:"\u2043",hyphen:"\u2010",Iacute:"\xcd",iacute:"\xed",ic:"\u2063",Icirc:"\xce",icirc:"\xee",Icy:"\u0418",icy:"\u0438",Idot:"\u0130",IEcy:"\u0415",iecy:"\u0435",iexcl:"\xa1",iff:"\u21d4",ifr:"\ud835\udd26",Ifr:"\u2111", +Igrave:"\xcc",igrave:"\xec",ii:"\u2148",iiiint:"\u2a0c",iiint:"\u222d",iinfin:"\u29dc",iiota:"\u2129",IJlig:"\u0132",ijlig:"\u0133",Imacr:"\u012a",imacr:"\u012b",image:"\u2111",ImaginaryI:"\u2148",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",Im:"\u2111",imof:"\u22b7",imped:"\u01b5",Implies:"\u21d2",incare:"\u2105","in":"\u2208",infin:"\u221e",infintie:"\u29dd",inodot:"\u0131",intcal:"\u22ba","int":"\u222b",Int:"\u222c",integers:"\u2124",Integral:"\u222b",intercal:"\u22ba",Intersection:"\u22c2",intlarhk:"\u2a17",intprod:"\u2a3c",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",IOcy:"\u0401",iocy:"\u0451",Iogon:"\u012e",iogon:"\u012f",Iopf:"\ud835\udd40",iopf:"\ud835\udd5a",Iota:"\u0399",iota:"\u03b9",iprod:"\u2a3c",iquest:"\xbf",iscr:"\ud835\udcbe",Iscr:"\u2110",isin:"\u2208",isindot:"\u22f5",isinE:"\u22f9",isins:"\u22f4",isinsv:"\u22f3",isinv:"\u2208",it:"\u2062",Itilde:"\u0128",itilde:"\u0129",Iukcy:"\u0406",iukcy:"\u0456",Iuml:"\xcf",iuml:"\xef",Jcirc:"\u0134",jcirc:"\u0135",Jcy:"\u0419",jcy:"\u0439",Jfr:"\ud835\udd0d",jfr:"\ud835\udd27",jmath:"\u0237",Jopf:"\ud835\udd41",jopf:"\ud835\udd5b",Jscr:"\ud835\udca5",jscr:"\ud835\udcbf",Jsercy:"\u0408",jsercy:"\u0458",Jukcy:"\u0404",jukcy:"\u0454",Kappa:"\u039a",kappa:"\u03ba",kappav:"\u03f0",Kcedil:"\u0136",kcedil:"\u0137",Kcy:"\u041a",kcy:"\u043a",Kfr:"\ud835\udd0e",kfr:"\ud835\udd28",kgreen:"\u0138",KHcy:"\u0425",khcy:"\u0445",KJcy:"\u040c",kjcy:"\u045c",Kopf:"\ud835\udd42",kopf:"\ud835\udd5c",Kscr:"\ud835\udca6",kscr:"\ud835\udcc0",lAarr:"\u21da",Lacute:"\u0139",lacute:"\u013a",laemptyv:"\u29b4",lagran:"\u2112",Lambda:"\u039b",lambda:"\u03bb",lang:"\u27e8",Lang:"\u27ea",langd:"\u2991",langle:"\u27e8",lap:"\u2a85",Laplacetrf:"\u2112",laquo:"\xab",larrb:"\u21e4",larrbfs:"\u291f",larr:"\u2190",Larr:"\u219e",lArr:"\u21d0",larrfs:"\u291d",larrhk:"\u21a9",larrlp:"\u21ab",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21a2",latail:"\u2919",lAtail:"\u291b",lat:"\u2aab",late:"\u2aad",lates:"\u2aad\ufe00",lbarr:"\u290c",lBarr:"\u290e",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298b",lbrksld:"\u298f",lbrkslu:"\u298d",Lcaron:"\u013d",lcaron:"\u013e",Lcedil:"\u013b",lcedil:"\u013c",lceil:"\u2308",lcub:"{",Lcy:"\u041b",lcy:"\u043b",ldca:"\u2936",ldquo:"\u201c",ldquor:"\u201e",ldrdhar:"\u2967",ldrushar:"\u294b",ldsh:"\u21b2",le:"\u2264",lE:"\u2266",LeftAngleBracket:"\u27e8",LeftArrowBar:"\u21e4",leftarrow:"\u2190",LeftArrow:"\u2190",Leftarrow:"\u21d0",LeftArrowRightArrow:"\u21c6",leftarrowtail:"\u21a2",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27e6",LeftDownTeeVector:"\u2961",LeftDownVectorBar:"\u2959",LeftDownVector:"\u21c3",LeftFloor:"\u230a",leftharpoondown:"\u21bd",leftharpoonup:"\u21bc",leftleftarrows:"\u21c7",leftrightarrow:"\u2194",LeftRightArrow:"\u2194",Leftrightarrow:"\u21d4",leftrightarrows:"\u21c6",leftrightharpoons:"\u21cb",leftrightsquigarrow:"\u21ad",LeftRightVector:"\u294e",LeftTeeArrow:"\u21a4",LeftTee:"\u22a3",LeftTeeVector:"\u295a",leftthreetimes:"\u22cb",LeftTriangleBar:"\u29cf",LeftTriangle:"\u22b2",LeftTriangleEqual:"\u22b4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVectorBar:"\u2958",LeftUpVector:"\u21bf",LeftVectorBar:"\u2952",LeftVector:"\u21bc",lEg:"\u2a8b",leg:"\u22da",leq:"\u2264",leqq:"\u2266",leqslant:"\u2a7d",lescc:"\u2aa8",les:"\u2a7d",lesdot:"\u2a7f",lesdoto:"\u2a81",lesdotor:"\u2a83",lesg:"\u22da\ufe00",lesges:"\u2a93",lessapprox:"\u2a85",lessdot:"\u22d6",lesseqgtr:"\u22da",lesseqqgtr:"\u2a8b",LessEqualGreater:"\u22da",LessFullEqual:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",LessLess:"\u2aa1",lesssim:"\u2272",LessSlantEqual:"\u2a7d",LessTilde:"\u2272",lfisht:"\u297c",lfloor:"\u230a",Lfr:"\ud835\udd0f",lfr:"\ud835\udd29",lg:"\u2276",lgE:"\u2a91",lHar:"\u2962",lhard:"\u21bd",lharu:"\u21bc",lharul:"\u296a",lhblk:"\u2584",LJcy:"\u0409",ljcy:"\u0459",llarr:"\u21c7",ll:"\u226a",Ll:"\u22d8",llcorner:"\u231e",Lleftarrow:"\u21da",llhard:"\u296b",lltri:"\u25fa",Lmidot:"\u013f",lmidot:"\u0140",lmoustache:"\u23b0",lmoust:"\u23b0",lnap:"\u2a89",lnapprox:"\u2a89",lne:"\u2a87",lnE:"\u2268",lneq:"\u2a87",lneqq:"\u2268",lnsim:"\u22e6",loang:"\u27ec",loarr:"\u21fd",lobrk:"\u27e6",longleftarrow:"\u27f5",LongLeftArrow:"\u27f5",Longleftarrow:"\u27f8",longleftrightarrow:"\u27f7",LongLeftRightArrow:"\u27f7",Longleftrightarrow:"\u27fa",longmapsto:"\u27fc",longrightarrow:"\u27f6",LongRightArrow:"\u27f6",Longrightarrow:"\u27f9",looparrowleft:"\u21ab",looparrowright:"\u21ac",lopar:"\u2985",Lopf:"\ud835\udd43",lopf:"\ud835\udd5d",loplus:"\u2a2d",lotimes:"\u2a34",lowast:"\u2217",lowbar:"_",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",loz:"\u25ca",lozenge:"\u25ca",lozf:"\u29eb",lpar:"(",lparlt:"\u2993",lrarr:"\u21c6",lrcorner:"\u231f",lrhar:"\u21cb",lrhard:"\u296d",lrm:"\u200e",lrtri:"\u22bf",lsaquo:"\u2039",lscr:"\ud835\udcc1",Lscr:"\u2112",lsh:"\u21b0",Lsh:"\u21b0",lsim:"\u2272",lsime:"\u2a8d",lsimg:"\u2a8f",lsqb:"[",lsquo:"\u2018",lsquor:"\u201a",Lstrok:"\u0141",lstrok:"\u0142",ltcc:"\u2aa6",ltcir:"\u2a79",lt:"<",LT:"<",Lt:"\u226a",ltdot:"\u22d6",lthree:"\u22cb",ltimes:"\u22c9",ltlarr:"\u2976",ltquest:"\u2a7b",ltri:"\u25c3",ltrie:"\u22b4",ltrif:"\u25c2",ltrPar:"\u2996",lurdshar:"\u294a",luruhar:"\u2966",lvertneqq:"\u2268\ufe00",lvnE:"\u2268\ufe00",macr:"\xaf",male:"\u2642",malt:"\u2720",maltese:"\u2720",Map:"\u2905",map:"\u21a6",mapsto:"\u21a6",mapstodown:"\u21a7",mapstoleft:"\u21a4",mapstoup:"\u21a5",marker:"\u25ae",mcomma:"\u2a29",Mcy:"\u041c",mcy:"\u043c",mdash:"\u2014",mDDot:"\u223a",measuredangle:"\u2221",MediumSpace:"\u205f",Mellintrf:"\u2133",Mfr:"\ud835\udd10",mfr:"\ud835\udd2a",mho:"\u2127",micro:"\xb5",midast:"*",midcir:"\u2af0",mid:"\u2223",middot:"\xb7",minusb:"\u229f",minus:"\u2212",minusd:"\u2238",minusdu:"\u2a2a",MinusPlus:"\u2213",mlcp:"\u2adb",mldr:"\u2026",mnplus:"\u2213",models:"\u22a7",Mopf:"\ud835\udd44",mopf:"\ud835\udd5e",mp:"\u2213",mscr:"\ud835\udcc2",Mscr:"\u2133",mstpos:"\u223e",Mu:"\u039c",mu:"\u03bc",multimap:"\u22b8",mumap:"\u22b8",nabla:"\u2207",Nacute:"\u0143",nacute:"\u0144",nang:"\u2220\u20d2",nap:"\u2249",napE:"\u2a70\u0338",napid:"\u224b\u0338",napos:"\u0149",napprox:"\u2249",natural:"\u266e",naturals:"\u2115",natur:"\u266e",nbsp:"\xa0",nbump:"\u224e\u0338",nbumpe:"\u224f\u0338",ncap:"\u2a43",Ncaron:"\u0147",ncaron:"\u0148",Ncedil:"\u0145",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2a6d\u0338",ncup:"\u2a42",Ncy:"\u041d",ncy:"\u043d",ndash:"\u2013",nearhk:"\u2924",nearr:"\u2197",neArr:"\u21d7",nearrow:"\u2197",ne:"\u2260",nedot:"\u2250\u0338",NegativeMediumSpace:"\u200b",NegativeThickSpace:"\u200b",NegativeThinSpace:"\u200b",NegativeVeryThinSpace:"\u200b",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",NestedGreaterGreater:"\u226b",NestedLessLess:"\u226a",NewLine:"\n",nexist:"\u2204",nexists:"\u2204",Nfr:"\ud835\udd11",nfr:"\ud835\udd2b",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2a7e\u0338",nges:"\u2a7e\u0338",nGg:"\u22d9\u0338",ngsim:"\u2275",nGt:"\u226b\u20d2",ngt:"\u226f",ngtr:"\u226f",nGtv:"\u226b\u0338",nharr:"\u21ae",nhArr:"\u21ce",nhpar:"\u2af2",ni:"\u220b",nis:"\u22fc",nisd:"\u22fa",niv:"\u220b",NJcy:"\u040a",njcy:"\u045a",nlarr:"\u219a",nlArr:"\u21cd",nldr:"\u2025",nlE:"\u2266\u0338",nle:"\u2270",nleftarrow:"\u219a",nLeftarrow:"\u21cd",nleftrightarrow:"\u21ae",nLeftrightarrow:"\u21ce",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2a7d\u0338",nles:"\u2a7d\u0338",nless:"\u226e",nLl:"\u22d8\u0338",nlsim:"\u2274",nLt:"\u226a\u20d2",nlt:"\u226e",nltri:"\u22ea",nltrie:"\u22ec",nLtv:"\u226a\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xa0",nopf:"\ud835\udd5f",Nopf:"\u2115",Not:"\u2aec",not:"\xac",NotCongruent:"\u2262",NotCupCap:"\u226d",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226f",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226b\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2a7e\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224e\u0338",NotHumpEqual:"\u224f\u0338",notin:"\u2209",notindot:"\u22f5\u0338",notinE:"\u22f9\u0338",notinva:"\u2209",notinvb:"\u22f7",notinvc:"\u22f6",NotLeftTriangleBar:"\u29cf\u0338",NotLeftTriangle:"\u22ea",NotLeftTriangleEqual:"\u22ec",NotLess:"\u226e",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226a\u0338",NotLessSlantEqual:"\u2a7d\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2aa2\u0338",NotNestedLessLess:"\u2aa1\u0338",notni:"\u220c",notniva:"\u220c",notnivb:"\u22fe",notnivc:"\u22fd",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2aaf\u0338",NotPrecedesSlantEqual:"\u22e0",NotReverseElement:"\u220c",NotRightTriangleBar:"\u29d0\u0338",NotRightTriangle:"\u22eb",NotRightTriangleEqual:"\u22ed",NotSquareSubset:"\u228f\u0338",NotSquareSubsetEqual:"\u22e2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22e3",NotSubset:"\u2282\u20d2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2ab0\u0338",NotSucceedsSlantEqual:"\u22e1",NotSucceedsTilde:"\u227f\u0338",NotSuperset:"\u2283\u20d2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",nparallel:"\u2226",npar:"\u2226",nparsl:"\u2afd\u20e5",npart:"\u2202\u0338",npolint:"\u2a14",npr:"\u2280",nprcue:"\u22e0",nprec:"\u2280",npreceq:"\u2aaf\u0338",npre:"\u2aaf\u0338",nrarrc:"\u2933\u0338",nrarr:"\u219b",nrArr:"\u21cf",nrarrw:"\u219d\u0338",nrightarrow:"\u219b",nRightarrow:"\u21cf",nrtri:"\u22eb",nrtrie:"\u22ed",nsc:"\u2281",nsccue:"\u22e1",nsce:"\u2ab0\u0338",Nscr:"\ud835\udca9",nscr:"\ud835\udcc3",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22e2",nsqsupe:"\u22e3",nsub:"\u2284",nsubE:"\u2ac5\u0338",nsube:"\u2288",nsubset:"\u2282\u20d2",nsubseteq:"\u2288",nsubseteqq:"\u2ac5\u0338",nsucc:"\u2281",nsucceq:"\u2ab0\u0338",nsup:"\u2285",nsupE:"\u2ac6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20d2",nsupseteq:"\u2289",nsupseteqq:"\u2ac6\u0338",ntgl:"\u2279",Ntilde:"\xd1",ntilde:"\xf1",ntlg:"\u2278",ntriangleleft:"\u22ea",ntrianglelefteq:"\u22ec",ntriangleright:"\u22eb",ntrianglerighteq:"\u22ed",Nu:"\u039d",nu:"\u03bd",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224d\u20d2",nvdash:"\u22ac",nvDash:"\u22ad",nVdash:"\u22ae",nVDash:"\u22af",nvge:"\u2265\u20d2",nvgt:">\u20d2",nvHarr:"\u2904",nvinfin:"\u29de",nvlArr:"\u2902",nvle:"\u2264\u20d2",nvlt:"<\u20d2",nvltrie:"\u22b4\u20d2",nvrArr:"\u2903",nvrtrie:"\u22b5\u20d2",nvsim:"\u223c\u20d2",nwarhk:"\u2923",nwarr:"\u2196",nwArr:"\u21d6",nwarrow:"\u2196",nwnear:"\u2927",Oacute:"\xd3",oacute:"\xf3",oast:"\u229b",Ocirc:"\xd4",ocirc:"\xf4",ocir:"\u229a",Ocy:"\u041e",ocy:"\u043e",odash:"\u229d",Odblac:"\u0150",odblac:"\u0151",odiv:"\u2a38",odot:"\u2299",odsold:"\u29bc",OElig:"\u0152",oelig:"\u0153",ofcir:"\u29bf",Ofr:"\ud835\udd12",ofr:"\ud835\udd2c",ogon:"\u02db",Ograve:"\xd2",ograve:"\xf2",ogt:"\u29c1",ohbar:"\u29b5",ohm:"\u03a9",oint:"\u222e",olarr:"\u21ba",olcir:"\u29be",olcross:"\u29bb",oline:"\u203e",olt:"\u29c0",Omacr:"\u014c",omacr:"\u014d",Omega:"\u03a9",omega:"\u03c9",Omicron:"\u039f",omicron:"\u03bf",omid:"\u29b6",ominus:"\u2296",Oopf:"\ud835\udd46",oopf:"\ud835\udd60",opar:"\u29b7",OpenCurlyDoubleQuote:"\u201c",OpenCurlyQuote:"\u2018",operp:"\u29b9",oplus:"\u2295",orarr:"\u21bb",Or:"\u2a54",or:"\u2228",ord:"\u2a5d",order:"\u2134",orderof:"\u2134",ordf:"\xaa",ordm:"\xba",origof:"\u22b6",oror:"\u2a56",orslope:"\u2a57",orv:"\u2a5b",oS:"\u24c8",Oscr:"\ud835\udcaa",oscr:"\u2134",Oslash:"\xd8",oslash:"\xf8",osol:"\u2298",Otilde:"\xd5",otilde:"\xf5",otimesas:"\u2a36",Otimes:"\u2a37",otimes:"\u2297",Ouml:"\xd6",ouml:"\xf6",ovbar:"\u233d",OverBar:"\u203e",OverBrace:"\u23de",OverBracket:"\u23b4",OverParenthesis:"\u23dc",para:"\xb6",parallel:"\u2225",par:"\u2225",parsim:"\u2af3",parsl:"\u2afd",part:"\u2202",PartialD:"\u2202",Pcy:"\u041f",pcy:"\u043f",percnt:"%",period:".",permil:"\u2030",perp:"\u22a5",pertenk:"\u2031",Pfr:"\ud835\udd13",pfr:"\ud835\udd2d",Phi:"\u03a6",phi:"\u03c6",phiv:"\u03d5",phmmat:"\u2133",phone:"\u260e",Pi:"\u03a0",pi:"\u03c0",pitchfork:"\u22d4",piv:"\u03d6",planck:"\u210f",planckh:"\u210e",plankv:"\u210f",plusacir:"\u2a23",plusb:"\u229e",pluscir:"\u2a22",plus:"+",plusdo:"\u2214",plusdu:"\u2a25",pluse:"\u2a72",PlusMinus:"\xb1",plusmn:"\xb1",plussim:"\u2a26",plustwo:"\u2a27",pm:"\xb1",Poincareplane:"\u210c",pointint:"\u2a15",popf:"\ud835\udd61",Popf:"\u2119",pound:"\xa3",prap:"\u2ab7",Pr:"\u2abb",pr:"\u227a",prcue:"\u227c",precapprox:"\u2ab7",prec:"\u227a",preccurlyeq:"\u227c",Precedes:"\u227a",PrecedesEqual:"\u2aaf",PrecedesSlantEqual:"\u227c",PrecedesTilde:"\u227e",preceq:"\u2aaf",precnapprox:"\u2ab9",precneqq:"\u2ab5",precnsim:"\u22e8",pre:"\u2aaf",prE:"\u2ab3",precsim:"\u227e",prime:"\u2032",Prime:"\u2033",primes:"\u2119",prnap:"\u2ab9",prnE:"\u2ab5",prnsim:"\u22e8",prod:"\u220f",Product:"\u220f",profalar:"\u232e",profline:"\u2312",profsurf:"\u2313",prop:"\u221d",Proportional:"\u221d",Proportion:"\u2237",propto:"\u221d",prsim:"\u227e",prurel:"\u22b0",Pscr:"\ud835\udcab",pscr:"\ud835\udcc5",Psi:"\u03a8",psi:"\u03c8",puncsp:"\u2008",Qfr:"\ud835\udd14",qfr:"\ud835\udd2e",qint:"\u2a0c",qopf:"\ud835\udd62",Qopf:"\u211a",qprime:"\u2057",Qscr:"\ud835\udcac",qscr:"\ud835\udcc6",quaternions:"\u210d",quatint:"\u2a16",quest:"?",questeq:"\u225f",quot:'"',QUOT:'"',rAarr:"\u21db",race:"\u223d\u0331",Racute:"\u0154",racute:"\u0155",radic:"\u221a",raemptyv:"\u29b3",rang:"\u27e9",Rang:"\u27eb",rangd:"\u2992",range:"\u29a5",rangle:"\u27e9",raquo:"\xbb",rarrap:"\u2975",rarrb:"\u21e5",rarrbfs:"\u2920",rarrc:"\u2933",rarr:"\u2192",Rarr:"\u21a0",rArr:"\u21d2",rarrfs:"\u291e",rarrhk:"\u21aa",rarrlp:"\u21ac",rarrpl:"\u2945",rarrsim:"\u2974",Rarrtl:"\u2916",rarrtl:"\u21a3",rarrw:"\u219d",ratail:"\u291a",rAtail:"\u291c",ratio:"\u2236",rationals:"\u211a",rbarr:"\u290d",rBarr:"\u290f",RBarr:"\u2910",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298c",rbrksld:"\u298e",rbrkslu:"\u2990",Rcaron:"\u0158",rcaron:"\u0159",Rcedil:"\u0156",rcedil:"\u0157",rceil:"\u2309",rcub:"}",Rcy:"\u0420",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201d",rdquor:"\u201d",rdsh:"\u21b3",real:"\u211c",realine:"\u211b",realpart:"\u211c",reals:"\u211d",Re:"\u211c",rect:"\u25ad",reg:"\xae",REG:"\xae",ReverseElement:"\u220b",ReverseEquilibrium:"\u21cb",ReverseUpEquilibrium:"\u296f",rfisht:"\u297d",rfloor:"\u230b",rfr:"\ud835\udd2f",Rfr:"\u211c",rHar:"\u2964",rhard:"\u21c1",rharu:"\u21c0",rharul:"\u296c",Rho:"\u03a1",rho:"\u03c1",rhov:"\u03f1",RightAngleBracket:"\u27e9",RightArrowBar:"\u21e5",rightarrow:"\u2192",RightArrow:"\u2192",Rightarrow:"\u21d2",RightArrowLeftArrow:"\u21c4",rightarrowtail:"\u21a3",RightCeiling:"\u2309",RightDoubleBracket:"\u27e7",RightDownTeeVector:"\u295d",RightDownVectorBar:"\u2955",RightDownVector:"\u21c2",RightFloor:"\u230b",rightharpoondown:"\u21c1",rightharpoonup:"\u21c0",rightleftarrows:"\u21c4",rightleftharpoons:"\u21cc",rightrightarrows:"\u21c9",rightsquigarrow:"\u219d",RightTeeArrow:"\u21a6",RightTee:"\u22a2",RightTeeVector:"\u295b",rightthreetimes:"\u22cc",RightTriangleBar:"\u29d0",RightTriangle:"\u22b3",RightTriangleEqual:"\u22b5",RightUpDownVector:"\u294f",RightUpTeeVector:"\u295c",RightUpVectorBar:"\u2954",RightUpVector:"\u21be",RightVectorBar:"\u2953",RightVector:"\u21c0",ring:"\u02da",risingdotseq:"\u2253",rlarr:"\u21c4",rlhar:"\u21cc",rlm:"\u200f",rmoustache:"\u23b1",rmoust:"\u23b1",rnmid:"\u2aee",roang:"\u27ed",roarr:"\u21fe",robrk:"\u27e7",ropar:"\u2986",ropf:"\ud835\udd63",Ropf:"\u211d",roplus:"\u2a2e",rotimes:"\u2a35",RoundImplies:"\u2970",rpar:")",rpargt:"\u2994",rppolint:"\u2a12",rrarr:"\u21c9",Rrightarrow:"\u21db",rsaquo:"\u203a",rscr:"\ud835\udcc7",Rscr:"\u211b",rsh:"\u21b1",Rsh:"\u21b1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22cc",rtimes:"\u22ca",rtri:"\u25b9",rtrie:"\u22b5",rtrif:"\u25b8",rtriltri:"\u29ce",RuleDelayed:"\u29f4",ruluhar:"\u2968",rx:"\u211e",Sacute:"\u015a",sacute:"\u015b",sbquo:"\u201a",scap:"\u2ab8",Scaron:"\u0160",scaron:"\u0161",Sc:"\u2abc",sc:"\u227b",sccue:"\u227d",sce:"\u2ab0",scE:"\u2ab4",Scedil:"\u015e",scedil:"\u015f",Scirc:"\u015c",scirc:"\u015d",scnap:"\u2aba",scnE:"\u2ab6",scnsim:"\u22e9",scpolint:"\u2a13",scsim:"\u227f",Scy:"\u0421",scy:"\u0441",sdotb:"\u22a1",sdot:"\u22c5",sdote:"\u2a66",searhk:"\u2925",searr:"\u2198",seArr:"\u21d8",searrow:"\u2198",sect:"\xa7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",Sfr:"\ud835\udd16",sfr:"\ud835\udd30",sfrown:"\u2322",sharp:"\u266f",SHCHcy:"\u0429",shchcy:"\u0449",SHcy:"\u0428",shcy:"\u0448",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",shortmid:"\u2223",shortparallel:"\u2225",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",shy:"\xad",Sigma:"\u03a3",sigma:"\u03c3",sigmaf:"\u03c2",sigmav:"\u03c2",sim:"\u223c",simdot:"\u2a6a",sime:"\u2243",simeq:"\u2243",simg:"\u2a9e",simgE:"\u2aa0",siml:"\u2a9d",simlE:"\u2a9f",simne:"\u2246",simplus:"\u2a24",simrarr:"\u2972",slarr:"\u2190",SmallCircle:"\u2218",smallsetminus:"\u2216",smashp:"\u2a33",smeparsl:"\u29e4",smid:"\u2223",smile:"\u2323",smt:"\u2aaa",smte:"\u2aac",smtes:"\u2aac\ufe00",SOFTcy:"\u042c",softcy:"\u044c",solbar:"\u233f",solb:"\u29c4",sol:"/",Sopf:"\ud835\udd4a",sopf:"\ud835\udd64",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\ufe00",sqcup:"\u2294",sqcups:"\u2294\ufe00",Sqrt:"\u221a",sqsub:"\u228f",sqsube:"\u2291",sqsubset:"\u228f",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",square:"\u25a1",Square:"\u25a1",SquareIntersection:"\u2293",SquareSubset:"\u228f",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",squarf:"\u25aa",squ:"\u25a1",squf:"\u25aa",srarr:"\u2192",Sscr:"\ud835\udcae",sscr:"\ud835\udcc8",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22c6",Star:"\u22c6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03f5",straightphi:"\u03d5",strns:"\xaf",sub:"\u2282",Sub:"\u22d0",subdot:"\u2abd",subE:"\u2ac5",sube:"\u2286",subedot:"\u2ac3",submult:"\u2ac1",subnE:"\u2acb",subne:"\u228a",subplus:"\u2abf",subrarr:"\u2979",subset:"\u2282",Subset:"\u22d0",subseteq:"\u2286",subseteqq:"\u2ac5",SubsetEqual:"\u2286",subsetneq:"\u228a",subsetneqq:"\u2acb",subsim:"\u2ac7",subsub:"\u2ad5",subsup:"\u2ad3",succapprox:"\u2ab8",succ:"\u227b",succcurlyeq:"\u227d",Succeeds:"\u227b",SucceedsEqual:"\u2ab0",SucceedsSlantEqual:"\u227d",SucceedsTilde:"\u227f",succeq:"\u2ab0",succnapprox:"\u2aba",succneqq:"\u2ab6",succnsim:"\u22e9",succsim:"\u227f",SuchThat:"\u220b",sum:"\u2211",Sum:"\u2211",sung:"\u266a",sup1:"\xb9",sup2:"\xb2",sup3:"\xb3",sup:"\u2283",Sup:"\u22d1",supdot:"\u2abe",supdsub:"\u2ad8",supE:"\u2ac6",supe:"\u2287",supedot:"\u2ac4",Superset:"\u2283",SupersetEqual:"\u2287",suphsol:"\u27c9",suphsub:"\u2ad7",suplarr:"\u297b",supmult:"\u2ac2",supnE:"\u2acc",supne:"\u228b",supplus:"\u2ac0",supset:"\u2283",Supset:"\u22d1",supseteq:"\u2287",supseteqq:"\u2ac6",supsetneq:"\u228b",supsetneqq:"\u2acc",supsim:"\u2ac8",supsub:"\u2ad4",supsup:"\u2ad6",swarhk:"\u2926",swarr:"\u2199",swArr:"\u21d9",swarrow:"\u2199",swnwar:"\u292a",szlig:"\xdf",Tab:" ",target:"\u2316",Tau:"\u03a4",tau:"\u03c4",tbrk:"\u23b4",Tcaron:"\u0164",tcaron:"\u0165",Tcedil:"\u0162",tcedil:"\u0163",Tcy:"\u0422",tcy:"\u0442",tdot:"\u20db",telrec:"\u2315",Tfr:"\ud835\udd17",tfr:"\ud835\udd31",there4:"\u2234",therefore:"\u2234",Therefore:"\u2234",Theta:"\u0398",theta:"\u03b8",thetasym:"\u03d1",thetav:"\u03d1",thickapprox:"\u2248",thicksim:"\u223c",ThickSpace:"\u205f\u200a",ThinSpace:"\u2009",thinsp:"\u2009",thkap:"\u2248",thksim:"\u223c",THORN:"\xde",thorn:"\xfe",tilde:"\u02dc",Tilde:"\u223c",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",timesbar:"\u2a31",timesb:"\u22a0",times:"\xd7",timesd:"\u2a30",tint:"\u222d",toea:"\u2928",topbot:"\u2336",topcir:"\u2af1",top:"\u22a4",Topf:"\ud835\udd4b",topf:"\ud835\udd65",topfork:"\u2ada",tosa:"\u2929",tprime:"\u2034",trade:"\u2122",TRADE:"\u2122",triangle:"\u25b5",triangledown:"\u25bf",triangleleft:"\u25c3",trianglelefteq:"\u22b4",triangleq:"\u225c",triangleright:"\u25b9",trianglerighteq:"\u22b5",tridot:"\u25ec",trie:"\u225c",triminus:"\u2a3a",TripleDot:"\u20db",triplus:"\u2a39",trisb:"\u29cd",tritime:"\u2a3b",trpezium:"\u23e2",Tscr:"\ud835\udcaf",tscr:"\ud835\udcc9",TScy:"\u0426",tscy:"\u0446",TSHcy:"\u040b",tshcy:"\u045b",Tstrok:"\u0166",tstrok:"\u0167",twixt:"\u226c",twoheadleftarrow:"\u219e",twoheadrightarrow:"\u21a0",Uacute:"\xda",uacute:"\xfa",uarr:"\u2191",Uarr:"\u219f",uArr:"\u21d1",Uarrocir:"\u2949",Ubrcy:"\u040e",ubrcy:"\u045e",Ubreve:"\u016c",ubreve:"\u016d",Ucirc:"\xdb",ucirc:"\xfb",Ucy:"\u0423",ucy:"\u0443",udarr:"\u21c5",Udblac:"\u0170",udblac:"\u0171",udhar:"\u296e",ufisht:"\u297e",Ufr:"\ud835\udd18",ufr:"\ud835\udd32",Ugrave:"\xd9",ugrave:"\xf9",uHar:"\u2963",uharl:"\u21bf",uharr:"\u21be",uhblk:"\u2580",ulcorn:"\u231c",ulcorner:"\u231c",ulcrop:"\u230f",ultri:"\u25f8",Umacr:"\u016a",umacr:"\u016b",uml:"\xa8",UnderBar:"_",UnderBrace:"\u23df",UnderBracket:"\u23b5",UnderParenthesis:"\u23dd",Union:"\u22c3",UnionPlus:"\u228e",Uogon:"\u0172",uogon:"\u0173",Uopf:"\ud835\udd4c",uopf:"\ud835\udd66",UpArrowBar:"\u2912",uparrow:"\u2191",UpArrow:"\u2191",Uparrow:"\u21d1",UpArrowDownArrow:"\u21c5",updownarrow:"\u2195",UpDownArrow:"\u2195",Updownarrow:"\u21d5",UpEquilibrium:"\u296e",upharpoonleft:"\u21bf",upharpoonright:"\u21be",uplus:"\u228e",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",upsi:"\u03c5",Upsi:"\u03d2",upsih:"\u03d2",Upsilon:"\u03a5",upsilon:"\u03c5",UpTeeArrow:"\u21a5",UpTee:"\u22a5",upuparrows:"\u21c8",urcorn:"\u231d",urcorner:"\u231d",urcrop:"\u230e",Uring:"\u016e",uring:"\u016f",urtri:"\u25f9",Uscr:"\ud835\udcb0",uscr:"\ud835\udcca",utdot:"\u22f0",Utilde:"\u0168",utilde:"\u0169",utri:"\u25b5",utrif:"\u25b4",uuarr:"\u21c8",Uuml:"\xdc",uuml:"\xfc",uwangle:"\u29a7",vangrt:"\u299c",varepsilon:"\u03f5",varkappa:"\u03f0",varnothing:"\u2205",varphi:"\u03d5",varpi:"\u03d6",varpropto:"\u221d",varr:"\u2195",vArr:"\u21d5",varrho:"\u03f1",varsigma:"\u03c2",varsubsetneq:"\u228a\ufe00",varsubsetneqq:"\u2acb\ufe00",varsupsetneq:"\u228b\ufe00",varsupsetneqq:"\u2acc\ufe00",vartheta:"\u03d1",vartriangleleft:"\u22b2",vartriangleright:"\u22b3",vBar:"\u2ae8",Vbar:"\u2aeb",vBarv:"\u2ae9",Vcy:"\u0412",vcy:"\u0432",vdash:"\u22a2",vDash:"\u22a8",Vdash:"\u22a9",VDash:"\u22ab",Vdashl:"\u2ae6",veebar:"\u22bb",vee:"\u2228",Vee:"\u22c1",veeeq:"\u225a",vellip:"\u22ee",verbar:"|",Verbar:"\u2016",vert:"|",Vert:"\u2016",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200a",Vfr:"\ud835\udd19",vfr:"\ud835\udd33",vltri:"\u22b2",vnsub:"\u2282\u20d2",vnsup:"\u2283\u20d2",Vopf:"\ud835\udd4d",vopf:"\ud835\udd67",vprop:"\u221d",vrtri:"\u22b3",Vscr:"\ud835\udcb1",vscr:"\ud835\udccb",vsubnE:"\u2acb\ufe00",vsubne:"\u228a\ufe00",vsupnE:"\u2acc\ufe00",vsupne:"\u228b\ufe00",Vvdash:"\u22aa",vzigzag:"\u299a",Wcirc:"\u0174",wcirc:"\u0175",wedbar:"\u2a5f",wedge:"\u2227",Wedge:"\u22c0",wedgeq:"\u2259",weierp:"\u2118",Wfr:"\ud835\udd1a",wfr:"\ud835\udd34",Wopf:"\ud835\udd4e",wopf:"\ud835\udd68",wp:"\u2118",wr:"\u2240",wreath:"\u2240",Wscr:"\ud835\udcb2",wscr:"\ud835\udccc",xcap:"\u22c2",xcirc:"\u25ef",xcup:"\u22c3",xdtri:"\u25bd",Xfr:"\ud835\udd1b",xfr:"\ud835\udd35",xharr:"\u27f7",xhArr:"\u27fa",Xi:"\u039e",xi:"\u03be",xlarr:"\u27f5",xlArr:"\u27f8",xmap:"\u27fc",xnis:"\u22fb",xodot:"\u2a00",Xopf:"\ud835\udd4f",xopf:"\ud835\udd69",xoplus:"\u2a01",xotime:"\u2a02",xrarr:"\u27f6",xrArr:"\u27f9",Xscr:"\ud835\udcb3",xscr:"\ud835\udccd",xsqcup:"\u2a06",xuplus:"\u2a04",xutri:"\u25b3",xvee:"\u22c1",xwedge:"\u22c0",Yacute:"\xdd",yacute:"\xfd",YAcy:"\u042f",yacy:"\u044f",Ycirc:"\u0176",ycirc:"\u0177",Ycy:"\u042b",ycy:"\u044b",yen:"\xa5",Yfr:"\ud835\udd1c",yfr:"\ud835\udd36",YIcy:"\u0407",yicy:"\u0457",Yopf:"\ud835\udd50",yopf:"\ud835\udd6a",Yscr:"\ud835\udcb4",yscr:"\ud835\udcce",YUcy:"\u042e",yucy:"\u044e",yuml:"\xff",Yuml:"\u0178",Zacute:"\u0179",zacute:"\u017a",Zcaron:"\u017d",zcaron:"\u017e",Zcy:"\u0417",zcy:"\u0437",Zdot:"\u017b",zdot:"\u017c",zeetrf:"\u2128",ZeroWidthSpace:"\u200b",Zeta:"\u0396",zeta:"\u03b6",zfr:"\ud835\udd37",Zfr:"\u2128",ZHcy:"\u0416",zhcy:"\u0436",zigrarr:"\u21dd",zopf:"\ud835\udd6b",Zopf:"\u2124",Zscr:"\ud835\udcb5",zscr:"\ud835\udccf",zwj:"\u200d",zwnj:"\u200c"}},{}],54:[function(e,r,t){"use strict";function n(e){var r=Array.prototype.slice.call(arguments,1);return r.forEach(function(r){r&&Object.keys(r).forEach(function(t){e[t]=r[t]})}),e}function s(e){return Object.prototype.toString.call(e)}function o(e){return"[object String]"===s(e)}function i(e){return"[object Object]"===s(e)}function a(e){return"[object RegExp]"===s(e)}function c(e){return"[object Function]"===s(e)}function l(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function u(e){return Object.keys(e||{}).reduce(function(e,r){return e||k.hasOwnProperty(r)},!1)}function p(e){e.__index__=-1,e.__text_cache__=""}function h(e){return function(r,t){var n=r.slice(t);return e.test(n)?n.match(e)[0].length:0}}function f(){return function(e,r){r.normalize(e)}}function d(r){function t(e){return e.replace("%TLDS%",u.src_tlds)}function s(e,r){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+r)}var u=r.re=n({},e("./lib/re")),d=r.__tlds__.slice();r.__tlds_replaced__||d.push(v),d.push(u.src_xn),u.src_tlds=d.join("|"),u.email_fuzzy=RegExp(t(u.tpl_email_fuzzy),"i"),u.link_fuzzy=RegExp(t(u.tpl_link_fuzzy),"i"),u.link_no_ip_fuzzy=RegExp(t(u.tpl_link_no_ip_fuzzy),"i"),u.host_fuzzy_test=RegExp(t(u.tpl_host_fuzzy_test),"i");var m=[];r.__compiled__={},Object.keys(r.__schemas__).forEach(function(e){var t=r.__schemas__[e];if(null!==t){var n={validate:null,link:null};return r.__compiled__[e]=n,i(t)?(a(t.validate)?n.validate=h(t.validate):c(t.validate)?n.validate=t.validate:s(e,t),void(c(t.normalize)?n.normalize=t.normalize:t.normalize?s(e,t):n.normalize=f())):o(t)?void m.push(e):void s(e,t)}}),m.forEach(function(e){r.__compiled__[r.__schemas__[e]]&&(r.__compiled__[e].validate=r.__compiled__[r.__schemas__[e]].validate,r.__compiled__[e].normalize=r.__compiled__[r.__schemas__[e]].normalize)}),r.__compiled__[""]={validate:null,normalize:f()};var g=Object.keys(r.__compiled__).filter(function(e){return e.length>0&&r.__compiled__[e]}).map(l).join("|");r.re.schema_test=RegExp("(^|(?!_)(?:>|"+u.src_ZPCc+"))("+g+")","i"),r.re.schema_search=RegExp("(^|(?!_)(?:>|"+u.src_ZPCc+"))("+g+")","ig"),r.re.pretest=RegExp("("+r.re.schema_test.source+")|("+r.re.host_fuzzy_test.source+")|@","i"),p(r)}function m(e,r){var t=e.__index__,n=e.__last_index__,s=e.__text_cache__.slice(t,n);this.schema=e.__schema__.toLowerCase(),this.index=t+r,this.lastIndex=n+r,this.raw=s,this.text=s,this.url=s}function g(e,r){var t=new m(e,r);return e.__compiled__[t.schema].normalize(t,e),t}function _(e,r){return this instanceof _?(r||u(e)&&(r=e,e={}),this.__opts__=n({},k,r),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=n({},b,e),this.__compiled__={},this.__tlds__=x,this.__tlds_replaced__=!1,this.re={},void d(this)):new _(e,r)}var k={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1},b={"http:":{validate:function(e,r,t){var n=e.slice(r);return t.re.http||(t.re.http=new RegExp("^\\/\\/"+t.re.src_auth+t.re.src_host_port_strict+t.re.src_path,"i")),t.re.http.test(n)?n.match(t.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,r,t){var n=e.slice(r);return t.re.no_http||(t.re.no_http=new RegExp("^"+t.re.src_auth+t.re.src_host_port_strict+t.re.src_path,"i")),t.re.no_http.test(n)?r>=3&&":"===e[r-3]?0:n.match(t.re.no_http)[0].length:0}},"mailto:":{validate:function(e,r,t){var n=e.slice(r);return t.re.mailto||(t.re.mailto=new RegExp("^"+t.re.src_email_name+"@"+t.re.src_host_strict,"i")),t.re.mailto.test(n)?n.match(t.re.mailto)[0].length:0}}},v="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",x="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|\u0440\u0444".split("|");_.prototype.add=function(e,r){return this.__schemas__[e]=r,d(this),this},_.prototype.set=function(e){return this.__opts__=n(this.__opts__,e),this},_.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var r,t,n,s,o,i,a,c,l;if(this.re.schema_test.test(e))for(a=this.re.schema_search,a.lastIndex=0;null!==(r=a.exec(e));)if(s=this.testSchemaAt(e,r[2],a.lastIndex)){this.__schema__=r[2],this.__index__=r.index+r[1].length,this.__last_index__=r.index+r[0].length+s;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(c=e.search(this.re.host_fuzzy_test),c>=0&&(this.__index__<0||c=0&&null!==(n=e.match(this.re.email_fuzzy))&&(o=n.index+n[1].length,i=n.index+n[0].length,(this.__index__<0||othis.__last_index__)&&(this.__schema__="mailto:",this.__index__=o,this.__last_index__=i))),this.__index__>=0},_.prototype.pretest=function(e){return this.re.pretest.test(e)},_.prototype.testSchemaAt=function(e,r,t){return this.__compiled__[r.toLowerCase()]?this.__compiled__[r.toLowerCase()].validate(e,t,this):0},_.prototype.match=function(e){var r=0,t=[];this.__index__>=0&&this.__text_cache__===e&&(t.push(g(this,r)),r=this.__last_index__);for(var n=r?e.slice(r):e;this.test(n);)t.push(g(this,r)),n=n.slice(this.__last_index__),r+=this.__last_index__;return t.length?t:null},_.prototype.tlds=function(e,r){return e=Array.isArray(e)?e:[e],r?(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(e,r,t){return e!==t[r-1]}).reverse(),d(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,d(this),this)},_.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},r.exports=_},{"./lib/re":55}],55:[function(e,r,t){"use strict";var n=t.src_Any=e("uc.micro/properties/Any/regex").source,s=t.src_Cc=e("uc.micro/categories/Cc/regex").source,o=t.src_Z=e("uc.micro/categories/Z/regex").source,i=t.src_P=e("uc.micro/categories/P/regex").source,a=t.src_ZPCc=[o,i,s].join("|"),c=t.src_ZCc=[o,s].join("|"),l="(?:(?!"+a+")"+n+")",u="(?:(?![0-9]|"+a+")"+n+")",p=t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)";t.src_auth="(?:(?:(?!"+c+").)+@)?";var h=t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",f=t.src_host_terminator="(?=$|"+a+")(?!-|_|:\\d|\\.-|\\.(?!$|"+a+"))",d=t.src_path="(?:[/?#](?:(?!"+c+"|[()[\\]{}.,\"'?!\\-]).|\\[(?:(?!"+c+"|\\]).)*\\]|\\((?:(?!"+c+"|[)]).)*\\)|\\{(?:(?!"+c+'|[}]).)*\\}|\\"(?:(?!'+c+'|["]).)+\\"|\\\'(?:(?!'+c+"|[']).)+\\'|\\'(?="+l+").|\\.{2,3}[a-zA-Z0-9%/]|\\.(?!"+c+"|[.]).|\\-(?!--(?:[^-]|$))(?:-*)|\\,(?!"+c+").|\\!(?!"+c+"|[!]).|\\?(?!"+c+"|[?]).)+|\\/)?",m=t.src_email_name='[\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]+',g=t.src_xn="xn--[a-z0-9\\-]{1,59}",_=t.src_domain_root="(?:"+g+"|"+u+"{1,63})",k=t.src_domain="(?:"+g+"|(?:"+l+")|(?:"+l+"(?:-(?!-)|"+l+"){0,61}"+l+"))",b=t.src_host="(?:"+p+"|(?:(?:(?:"+k+")\\.)*"+_+"))",v=t.tpl_host_fuzzy="(?:"+p+"|(?:(?:(?:"+k+")\\.)+(?:%TLDS%)))",x=t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+k+")\\.)+(?:%TLDS%))";t.src_host_strict=b+f;var y=t.tpl_host_fuzzy_strict=v+f;t.src_host_port_strict=b+h+f;var C=t.tpl_host_port_fuzzy_strict=v+h+f,A=t.tpl_host_port_no_ip_fuzzy_strict=x+h+f;t.tpl_host_fuzzy_test="localhost|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+a+"|$))",t.tpl_email_fuzzy="(^|>|"+c+")("+m+"@"+y+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|]|"+a+"))((?![$+<=>^`|])"+C+d+")", t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|]|"+a+"))((?![$+<=>^`|])"+A+d+")"},{"uc.micro/categories/Cc/regex":61,"uc.micro/categories/P/regex":63,"uc.micro/categories/Z/regex":64,"uc.micro/properties/Any/regex":66}],56:[function(e,r,t){"use strict";function n(e){var r,t,n=o[e];if(n)return n;for(n=o[e]=[],r=0;128>r;r++)t=String.fromCharCode(r),n.push(t);for(r=0;rr;r+=3)s=parseInt(e.slice(r+1,r+3),16),128>s?l+=t[s]:192===(224&s)&&n>r+3&&(o=parseInt(e.slice(r+4,r+6),16),128===(192&o))?(c=s<<6&1984|63&o,l+=128>c?"\ufffd\ufffd":String.fromCharCode(c),r+=3):224===(240&s)&&n>r+6&&(o=parseInt(e.slice(r+4,r+6),16),i=parseInt(e.slice(r+7,r+9),16),128===(192&o)&&128===(192&i))?(c=s<<12&61440|o<<6&4032|63&i,l+=2048>c||c>=55296&&57343>=c?"\ufffd\ufffd\ufffd":String.fromCharCode(c),r+=6):240===(248&s)&&n>r+9&&(o=parseInt(e.slice(r+4,r+6),16),i=parseInt(e.slice(r+7,r+9),16),a=parseInt(e.slice(r+10,r+12),16),128===(192&o)&&128===(192&i)&&128===(192&a))?(c=s<<18&1835008|o<<12&258048|i<<6&4032|63&a,65536>c||c>1114111?l+="\ufffd\ufffd\ufffd\ufffd":(c-=65536,l+=String.fromCharCode(55296+(c>>10),56320+(1023&c))),r+=9):l+="\ufffd";return l})}var o={};s.defaultChars=";/?:@&=+$,#",s.componentChars="",r.exports=s},{}],57:[function(e,r,t){"use strict";function n(e){var r,t,n=o[e];if(n)return n;for(n=o[e]=[],r=0;128>r;r++)t=String.fromCharCode(r),/^[0-9a-z]$/i.test(t)?n.push(t):n.push("%"+("0"+r.toString(16).toUpperCase()).slice(-2));for(r=0;ro;o++)if(a=e.charCodeAt(o),t&&37===a&&i>o+2&&/^[0-9a-f]{2}$/i.test(e.slice(o+1,o+3)))u+=e.slice(o,o+3),o+=2;else if(128>a)u+=l[a];else if(a>=55296&&57343>=a){if(a>=55296&&56319>=a&&i>o+1&&(c=e.charCodeAt(o+1),c>=56320&&57343>=c)){u+=encodeURIComponent(e[o]+e[o+1]),o++;continue}u+="%EF%BF%BD"}else u+=encodeURIComponent(e[o]);return u}var o={};s.defaultChars=";/?:@&=+$,-_.!~*'()#",s.componentChars="-_.!~*'()",r.exports=s},{}],58:[function(e,r,t){"use strict";r.exports=function(e){var r="";return r+=e.protocol||"",r+=e.slashes?"//":"",r+=e.auth?e.auth+"@":"",r+=e.hostname&&-1!==e.hostname.indexOf(":")?"["+e.hostname+"]":e.hostname||"",r+=e.port?":"+e.port:"",r+=e.pathname||"",r+=e.search||"",r+=e.hash||""}},{}],59:[function(e,r,t){"use strict";r.exports.encode=e("./encode"),r.exports.decode=e("./decode"),r.exports.format=e("./format"),r.exports.parse=e("./parse")},{"./decode":56,"./encode":57,"./format":58,"./parse":60}],60:[function(e,r,t){"use strict";function n(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}function s(e,r){if(e&&e instanceof n)return e;var t=new n;return t.parse(e,r),t}var o=/^([a-z0-9.+-]+:)/i,i=/:[0-9]*$/,a=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["<",">",'"',"`"," ","\r","\n"," "],l=["{","}","|","\\","^","`"].concat(c),u=["'"].concat(l),p=["%","/","?",";","#"].concat(u),h=["/","?","#"],f=255,d=/^[+a-z0-9A-Z_-]{0,63}$/,m=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,g={javascript:!0,"javascript:":!0},_={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};n.prototype.parse=function(e,r){var t,n,s,i,c,l=e;if(l=l.trim(),!r&&1===e.split("#").length){var u=a.exec(l);if(u)return this.pathname=u[1],u[2]&&(this.search=u[2]),this}var k=o.exec(l);if(k&&(k=k[0],s=k.toLowerCase(),this.protocol=k,l=l.substr(k.length)),(r||k||l.match(/^\/\/[^@\/]+@[^@\/]+/))&&(c="//"===l.substr(0,2),!c||k&&g[k]||(l=l.substr(2),this.slashes=!0)),!g[k]&&(c||k&&!_[k])){var b=-1;for(t=0;ti)&&(b=i);var v,x;for(x=-1===b?l.lastIndexOf("@"):l.lastIndexOf("@",b),-1!==x&&(v=l.slice(0,x),l=l.slice(x+1),this.auth=v),b=-1,t=0;ti)&&(b=i);-1===b&&(b=l.length),":"===l[b-1]&&b--;var y=l.slice(0,b);l=l.slice(b),this.parseHost(y),this.hostname=this.hostname||"";var C="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!C){var A=this.hostname.split(/\./);for(t=0,n=A.length;n>t;t++){var w=A[t];if(w&&!w.match(d)){for(var q="",D=0,E=w.length;E>D;D++)q+=w.charCodeAt(D)>127?"x":w[D];if(!q.match(d)){var S=A.slice(0,t),F=A.slice(t+1),L=w.match(m);L&&(S.push(L[1]),F.unshift(L[2])),F.length&&(l=F.join(".")+l),this.hostname=S.join(".");break}}}}this.hostname.length>f&&(this.hostname=""),C&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var z=l.indexOf("#");-1!==z&&(this.hash=l.substr(z),l=l.slice(0,z));var T=l.indexOf("?");return-1!==T&&(this.search=l.substr(T),l=l.slice(0,T)),l&&(this.pathname=l),_[s]&&this.hostname&&!this.pathname&&(this.pathname=""),this},n.prototype.parseHost=function(e){var r=i.exec(e);r&&(r=r[0],":"!==r&&(this.port=r.substr(1)),e=e.substr(0,e.length-r.length)),e&&(this.hostname=e)},r.exports=s},{}],61:[function(e,r,t){r.exports=/[\0-\x1F\x7F-\x9F]/},{}],62:[function(e,r,t){r.exports=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804\uDCBD|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/},{}],63:[function(e,r,t){r.exports=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDE38-\uDE3D]|\uD805[\uDCC6\uDDC1-\uDDC9\uDE41-\uDE43]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F/},{}],64:[function(e,r,t){r.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/},{}],65:[function(e,r,t){r.exports.Any=e("./properties/Any/regex"),r.exports.Cc=e("./categories/Cc/regex"),r.exports.Cf=e("./categories/Cf/regex"),r.exports.P=e("./categories/P/regex"),r.exports.Z=e("./categories/Z/regex")},{"./categories/Cc/regex":61,"./categories/Cf/regex":62,"./categories/P/regex":63,"./categories/Z/regex":64,"./properties/Any/regex":66}],66:[function(e,r,t){r.exports=/[\0-\uD7FF\uDC00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF]/},{}],67:[function(e,r,t){"use strict";r.exports=e("./lib/")},{"./lib/":9}]},{},[67])(67)}); /*global require*/ @@ -1333,113 +1333,116 @@ define('ViewModels/ResetViewNavigationControl',[ 'ViewModels/NavigationControl', 'SvgPaths/svgReset' ], function ( - defined, - Camera, - NavigationControl, - svgReset) - { - 'use strict'; + defined, + Camera, + NavigationControl, + svgReset) { + 'use strict'; + + /** + * The model for a zoom in control in the navigation control tool bar + * + * @alias ResetViewNavigationControl + * @constructor + * @abstract + * + * @param {Terria} terria The Terria instance. + */ + var ResetViewNavigationControl = function (terria) { + NavigationControl.apply(this, arguments); /** - * The model for a zoom in control in the navigation control tool bar - * - * @alias ResetViewNavigationControl - * @constructor - * @abstract - * - * @param {Terria} terria The Terria instance. + * Gets or sets the name of the control which is set as the control's title. + * This property is observable. + * @type {String} */ - var ResetViewNavigationControl = function (terria) - { - NavigationControl.apply(this, arguments); - - /** - * Gets or sets the name of the control which is set as the control's title. - * This property is observable. - * @type {String} - */ - this.name = 'Reset View'; - - /** - * Gets or sets the svg icon of the control. This property is observable. - * @type {Object} - */ - this.svgIcon = svgReset; - - /** - * Gets or sets the height of the svg icon. This property is observable. - * @type {Integer} - */ - this.svgHeight = 15; - - /** - * Gets or sets the width of the svg icon. This property is observable. - * @type {Integer} - */ - this.svgWidth = 15; - - /** - * Gets or sets the CSS class of the control. This property is observable. - * @type {String} - */ - this.cssClass = "navigation-control-icon-reset"; + this.name = 'Reset View'; - }; + /** + * Gets or sets the svg icon of the control. This property is observable. + * @type {Object} + */ + this.svgIcon = svgReset; - ResetViewNavigationControl.prototype = Object.create(NavigationControl.prototype); - - ResetViewNavigationControl.prototype.resetView = function () - { - //this.terria.analytics.logEvent('navigation', 'click', 'reset'); - - this.isActive = true; - - var camera = this.terria.scene.camera; - - //reset to a default position or view defined in the options - if (this.terria.options.defaultResetView) - { - if (this.terria.options.defaultResetView && this.terria.options.defaultResetView instanceof Cesium.Cartographic) - { - camera.flyTo({ - destination: Cesium.Ellipsoid.WGS84.cartographicToCartesian(this.terria.options.defaultResetView) - }); - } else if (this.terria.options.defaultResetView && this.terria.options.defaultResetView instanceof Cesium.Rectangle) - { - try - { - Cesium.Rectangle.validate(this.terria.options.defaultResetView); - camera.flyTo({ - destination: this.terria.options.defaultResetView - }); - } catch (e) - { - console.log("Cesium-navigation/ResetViewNavigationControl: options.defaultResetView Cesium rectangle is invalid!"); - } - } - } - else if (typeof camera.flyHome === "function") - { - camera.flyHome(1); - } else - { - camera.flyTo({'destination': Camera.DEFAULT_VIEW_RECTANGLE, 'duration': 1}); - } - this.isActive = false; - }; + /** + * Gets or sets the height of the svg icon. This property is observable. + * @type {Integer} + */ + this.svgHeight = 15; /** - * When implemented in a derived class, performs an action when the user clicks - * on this control - * @abstract - * @protected + * Gets or sets the width of the svg icon. This property is observable. + * @type {Integer} */ - ResetViewNavigationControl.prototype.activate = function () - { - this.resetView(); - }; - return ResetViewNavigationControl; - }); + this.svgWidth = 15; + + /** + * Gets or sets the CSS class of the control. This property is observable. + * @type {String} + */ + this.cssClass = "navigation-control-icon-reset"; + + }; + + ResetViewNavigationControl.prototype = Object.create(NavigationControl.prototype); + + ResetViewNavigationControl.prototype.resetView = function () { + //this.terria.analytics.logEvent('navigation', 'click', 'reset'); + + var scene = this.terria.scene; + + var sscc = scene.screenSpaceCameraController; + if (!sscc.enableInputs) { + return; + } + + this.isActive = true; + + var camera = scene.camera; + + if (defined(this.terria.trackedEntity)) { + // when tracking do not reset to default view but to default view of tracked entity + var trackedEntity = this.terria.trackedEntity; + this.terria.trackedEntity = undefined; + this.terria.trackedEntity = trackedEntity; + } else { + // reset to a default position or view defined in the options + if (this.terria.options.defaultResetView) { + if (this.terria.options.defaultResetView && this.terria.options.defaultResetView instanceof Cesium.Cartographic) { + camera.flyTo({ + destination: Cesium.Ellipsoid.WGS84.cartographicToCartesian(this.terria.options.defaultResetView) + }); + } else if (this.terria.options.defaultResetView && this.terria.options.defaultResetView instanceof Cesium.Rectangle) { + try { + Cesium.Rectangle.validate(this.terria.options.defaultResetView); + camera.flyTo({ + destination: this.terria.options.defaultResetView + }); + } catch (e) { + console.log("Cesium-navigation/ResetViewNavigationControl: options.defaultResetView Cesium rectangle is invalid!"); + } + } + } + else if (typeof camera.flyHome === "function") { + camera.flyHome(1); + } else { + camera.flyTo({'destination': Camera.DEFAULT_VIEW_RECTANGLE, 'duration': 1}); + } + } + this.isActive = false; + }; + + /** + * When implemented in a derived class, performs an action when the user clicks + * on this control + * @abstract + * @protected + */ + ResetViewNavigationControl.prototype.activate = function () { + this.resetView(); + }; + return ResetViewNavigationControl; +}); /*global require*/ define('Core/Utils',[ @@ -1447,12 +1450,14 @@ define('Core/Utils',[ 'Cesium/Core/Ray', 'Cesium/Core/Cartesian3', 'Cesium/Core/Cartographic', + 'Cesium/Core/ReferenceFrame', 'Cesium/Scene/SceneMode' ], function ( defined, Ray, Cartesian3, Cartographic, + ReferenceFrame, SceneMode) { 'use strict'; @@ -1463,12 +1468,15 @@ define('Core/Utils',[ /** * gets the focus point of the camera - * @param {Scene} scene The scene + * @param {Viewer|Widget} terria The terria * @param {boolean} inWorldCoordinates true to get the focus in world coordinates, otherwise get it in projection-specific map coordinates, in meters. * @param {Cartesian3} [result] The object in which the result will be stored. * @return {Cartesian3} The modified result parameter, a new instance if none was provided or undefined if there is no focus point. */ - Utils.getCameraFocus = function (scene, inWorldCoordinates, result) { + Utils.getCameraFocus = function (terria, inWorldCoordinates, result) { + var scene = terria.scene; + var camera = scene.camera; + if(scene.mode == SceneMode.MORPHING) { return undefined; } @@ -1477,29 +1485,34 @@ define('Core/Utils',[ result = new Cartesian3(); } - var camera = scene.camera; + // TODO bug when tracking: if entity moves the current position should be used and not only the one when starting orbiting/rotating + // TODO bug when tracking: reset should reset to default view of tracked entity - rayScratch.origin = camera.positionWC; - rayScratch.direction = camera.directionWC; - var center = scene.globe.pick(rayScratch, scene, result); + if(defined(terria.trackedEntity)) { + result = terria.trackedEntity.position.getValue(terria.clock.currentTime, result); + } else { + rayScratch.origin = camera.positionWC; + rayScratch.direction = camera.directionWC; + result = scene.globe.pick(rayScratch, scene, result); + } - if (!defined(center)) { + if (!defined(result)) { return undefined; } if(scene.mode == SceneMode.SCENE2D || scene.mode == SceneMode.COLUMBUS_VIEW) { - center = camera.worldToCameraCoordinatesPoint(center, result); + result = camera.worldToCameraCoordinatesPoint(result, result); if(inWorldCoordinates) { - center = scene.globe.ellipsoid.cartographicToCartesian(scene.mapProjection.unproject(center, unprojectedScratch), result); + result = scene.globe.ellipsoid.cartographicToCartesian(scene.mapProjection.unproject(result, unprojectedScratch), result); } } else { if(!inWorldCoordinates) { - center = camera.worldToCameraCoordinatesPoint(center, result); + result = camera.worldToCameraCoordinatesPoint(result, result); } } - return center; + return result; }; return Utils; @@ -1560,7 +1573,7 @@ define('ViewModels/ZoomNavigationControl',[ this.relativeAmount = 2; - if(zoomIn) { + if (zoomIn) { // this ensures that zooming in is the inverse of zooming out and vice versa // e.g. the camera position remains when zooming in and out this.relativeAmount = 1 / this.relativeAmount; @@ -1590,17 +1603,34 @@ define('ViewModels/ZoomNavigationControl',[ if (defined(this.terria)) { var scene = this.terria.scene; + + var sscc = scene.screenSpaceCameraController; + // do not zoom if it is disabled + if (!sscc.enableInputs || !sscc.enableZoom) { + return; + } + // TODO +// if(scene.mode == SceneMode.COLUMBUS_VIEW && !sscc.enableTranslate) { +// return; +// } + var camera = scene.camera; - // var orientation; + var orientation; - switch(scene.mode) { + switch (scene.mode) { case SceneMode.MORPHING: break; case SceneMode.SCENE2D: - camera.zoomIn(camera.positionCartographic.height * (1 - this.relativeAmount)); + camera.zoomIn(camera.positionCartographic.height * (1 - this.relativeAmount)); break; default: - var focus = Utils.getCameraFocus(scene, false); + var focus; + + if(defined(this.terria.trackedEntity)) { + focus = new Cartesian3(); + } else { + focus = Utils.getCameraFocus(this.terria, false); + } if (!defined(focus)) { // Camera direction is not pointing at the globe, so use the ellipsoid horizon point as @@ -1608,32 +1638,34 @@ define('ViewModels/ZoomNavigationControl',[ var ray = new Ray(camera.worldToCameraCoordinatesPoint(scene.globe.ellipsoid.cartographicToCartesian(camera.positionCartographic)), camera.directionWC); focus = IntersectionTests.grazingAltitudeLocation(ray, scene.globe.ellipsoid); - // orientation = { - // heading: camera.heading, - // pitch: camera.pitch, - // roll: camera.roll - // }; - // } else { - // orientation = { - // direction: camera.direction, - // up: camera.up - // }; + orientation = { + heading: camera.heading, + pitch: camera.pitch, + roll: camera.roll + }; + } else { + orientation = { + direction: camera.direction, + up: camera.up + }; } var direction = Cartesian3.subtract(camera.position, focus, cartesian3Scratch); var movementVector = Cartesian3.multiplyByScalar(direction, relativeAmount, direction); var endPosition = Cartesian3.add(focus, movementVector, focus); - // sometimes flyTo does not work (wrong position) so just set the position without any animation - camera.position = endPosition; - - // camera.flyTo({ - // destination: endPosition, - // orientation: orientation, - // duration: 1, - // convert: false - // }); - // } + if (defined(this.terria.trackedEntity) || scene.mode == SceneMode.COLUMBUS_VIEW) { + // sometimes flyTo does not work (jumps to wrong position) so just set the position without any animation + // do not use flyTo when tracking an entity because during animatiuon the position of the entity may change + camera.position = endPosition; + } else { + camera.flyTo({ + destination: endPosition, + orientation: orientation, + duration: 0.5, + convert: false + }); + } } } @@ -1877,14 +1909,30 @@ define('ViewModels/NavigationViewModel',[ var centerScratch = new Cartesian3(); NavigationViewModel.prototype.handleDoubleClick = function (viewModel, e) { - var scene = this.terria.scene; + var scene = viewModel.terria.scene; var camera = scene.camera; - if (scene.mode == SceneMode.MORPHING || scene.mode == SceneMode.SCENE2D) { + var sscc = scene.screenSpaceCameraController; + + if (scene.mode == SceneMode.MORPHING || !sscc.enableInputs) { return true; } + if (scene.mode == SceneMode.COLUMBUS_VIEW && !sscc.enableTranslate) { + return; + } + if(scene.mode == SceneMode.SCENE3D || scene.mode == SceneMode.COLUMBUS_VIEW) { + if (!sscc.enableLook) { + return; + } - var center = Utils.getCameraFocus(scene, true, centerScratch); + if(scene.mode == SceneMode.SCENE3D) { + if(!sscc.enableRotate) { + return + } + } + } + + var center = Utils.getCameraFocus(viewModel.terria, true, centerScratch); if (!defined(center)) { // Globe is barely visible, so reset to home view. @@ -1893,15 +1941,24 @@ define('ViewModels/NavigationViewModel',[ return; } - // var rotateFrame = Transforms.eastNorthUpToFixedFrame(center, scene.globe.ellipsoid); - // var cameraPosition = scene.globe.ellipsoid.cartographicToCartesian(camera.positionCartographic, new Cartesian3()); - // var lookVector = Cartesian3.subtract(center, cameraPosition, new Cartesian3()); - // - // var destination = Matrix4.multiplyByPoint(rotateFrame, new Cartesian3(0, 0, Cartesian3.magnitude(lookVector)), new Cartesian3()); - camera.flyToBoundingSphere(new BoundingSphere(center, 0), { - offset: new HeadingPitchRange(0, camera.pitch, Cartesian3.distance(cameraPosition, center)), + var surfaceNormal = scene.globe.ellipsoid.geodeticSurfaceNormal(center); + + var focusBoundingSphere = new BoundingSphere(center, 0); + + camera.flyToBoundingSphere(focusBoundingSphere, { + offset: new HeadingPitchRange(0, + // do not use camera.pitch since the pitch at the center/target is required + CesiumMath.PI_OVER_TWO - Cartesian3.angleBetween( + surfaceNormal, + camera.directionWC + ), + // distanceToBoundingSphere returns wrong values when in 2D or Columbus view so do not use + // camera.distanceToBoundingSphere(focusBoundingSphere) + // instead calculate distance manually + Cartesian3.distance(cameraPosition, center) + ), duration: 1.5 }); }; @@ -1913,6 +1970,41 @@ define('ViewModels/NavigationViewModel',[ }; function orbit(viewModel, compassElement, cursorVector) { + var scene = viewModel.terria.scene; + + var sscc = scene.screenSpaceCameraController; + + // do not orbit if it is disabled + if(scene.mode == SceneMode.MORPHING || !sscc.enableInputs) { + return; + } + + switch(scene.mode) { + case SceneMode.COLUMBUS_VIEW: + if(sscc.enableLook) { + break; + } + + if (!sscc.enableTranslate || !sscc.enableTilt) { + return; + } + break; + case SceneMode.SCENE3D: + if(sscc.enableLook) { + break; + } + + if (!sscc.enableTilt || !sscc.enableRotate) { + return; + } + break; + case SceneMode.SCENE2D: + if (!sscc.enableTranslate) { + return; + } + break; + } + // Remove existing event handlers, if any. document.removeEventListener('mousemove', viewModel.orbitMouseMoveFunction, false); document.removeEventListener('mouseup', viewModel.orbitMouseUpFunction, false); @@ -1928,17 +2020,22 @@ define('ViewModels/NavigationViewModel',[ viewModel.isOrbiting = true; viewModel.orbitLastTimestamp = getTimestamp(); - var scene = viewModel.terria.scene; var camera = scene.camera; - var center = Utils.getCameraFocus(scene, true, centerScratch); - - if (!defined(center)) { - viewModel.orbitFrame = Transforms.eastNorthUpToFixedFrame(camera.positionWC, scene.globe.ellipsoid, newTransformScratch); - viewModel.orbitIsLook = true; - } else { - viewModel.orbitFrame = Transforms.eastNorthUpToFixedFrame(center, scene.globe.ellipsoid, newTransformScratch); + if (defined(viewModel.terria.trackedEntity)) { + // when tracking an entity simply use that reference frame + viewModel.orbitFrame = undefined; viewModel.orbitIsLook = false; + } else { + var center = Utils.getCameraFocus(viewModel.terria, true, centerScratch); + + if (!defined(center)) { + viewModel.orbitFrame = Transforms.eastNorthUpToFixedFrame(camera.positionWC, scene.globe.ellipsoid, newTransformScratch); + viewModel.orbitIsLook = true; + } else { + viewModel.orbitFrame = Transforms.eastNorthUpToFixedFrame(center, scene.globe.ellipsoid, newTransformScratch); + viewModel.orbitIsLook = false; + } } viewModel.orbitTickFunction = function (e) { @@ -1951,9 +2048,13 @@ define('ViewModels/NavigationViewModel',[ var x = Math.cos(angle) * distance; var y = Math.sin(angle) * distance; - var oldTransform = Matrix4.clone(camera.transform, oldTransformScratch); + var oldTransform; - camera.lookAtTransform(viewModel.orbitFrame); + if (defined(viewModel.orbitFrame)) { + oldTransform = Matrix4.clone(camera.transform, oldTransformScratch); + + camera.lookAtTransform(viewModel.orbitFrame); + } // do not look up/down or rotate in 2D mode if (scene.mode == SceneMode.SCENE2D) { @@ -1968,7 +2069,9 @@ define('ViewModels/NavigationViewModel',[ } } - camera.lookAtTransform(oldTransform); + if (defined(viewModel.orbitFrame)) { + camera.lookAtTransform(oldTransform); + } // viewModel.terria.cesium.notifyRepaintRequired(); @@ -2023,8 +2126,12 @@ define('ViewModels/NavigationViewModel',[ var scene = viewModel.terria.scene; var camera = scene.camera; - // do not look rotate in 2D mode - if (scene.mode == SceneMode.SCENE2D) { + var sscc = scene.screenSpaceCameraController; + // do not rotate in 2D mode or if rotating is disabled + if (scene.mode == SceneMode.MORPHING || scene.mode == SceneMode.SCENE2D || !sscc.enableInputs) { + return; + } + if(!sscc.enableLook && (scene.mode == SceneMode.COLUMBUS_VIEW || (scene.mode == SceneMode.SCENE3D && !sscc.enableRotate))) { return; } @@ -2038,21 +2145,33 @@ define('ViewModels/NavigationViewModel',[ viewModel.isRotating = true; viewModel.rotateInitialCursorAngle = Math.atan2(-cursorVector.y, cursorVector.x); - var viewCenter = Utils.getCameraFocus(scene, true, centerScratch); - - if (!defined(viewCenter)) { - viewModel.rotateFrame = Transforms.eastNorthUpToFixedFrame(camera.positionWC, scene.globe.ellipsoid, newTransformScratch); - viewModel.rotateIsLook = true; - } else { - viewModel.rotateFrame = Transforms.eastNorthUpToFixedFrame(viewCenter, scene.globe.ellipsoid, newTransformScratch); + if(defined(viewModel.terria.trackedEntity)) { + // when tracking an entity simply use that reference frame + viewModel.rotateFrame = undefined; viewModel.rotateIsLook = false; + } else { + var viewCenter = Utils.getCameraFocus(viewModel.terria, true, centerScratch); + + if (!defined(viewCenter) || (scene.mode == SceneMode.COLUMBUS_VIEW && !sscc.enableLook && !sscc.enableTranslate)) { + viewModel.rotateFrame = Transforms.eastNorthUpToFixedFrame(camera.positionWC, scene.globe.ellipsoid, newTransformScratch); + viewModel.rotateIsLook = true; + } else { + viewModel.rotateFrame = Transforms.eastNorthUpToFixedFrame(viewCenter, scene.globe.ellipsoid, newTransformScratch); + viewModel.rotateIsLook = false; + } + } + + var oldTransform; + if(defined(viewModel.rotateFrame)) { + oldTransform = Matrix4.clone(camera.transform, oldTransformScratch); + camera.lookAtTransform(viewModel.rotateFrame); } - var oldTransform = Matrix4.clone(camera.transform, oldTransformScratch); - camera.lookAtTransform(viewModel.rotateFrame); viewModel.rotateInitialCameraAngle = -camera.heading; - viewModel.rotateInitialCameraDistance = Cartesian3.magnitude(new Cartesian3(camera.position.x, camera.position.y, 0.0)); - camera.lookAtTransform(oldTransform); + + if(defined(viewModel.rotateFrame)) { + camera.lookAtTransform(oldTransform); + } viewModel.rotateMouseMoveFunction = function (e) { var compassRectangle = compassElement.getBoundingClientRect(); @@ -2066,11 +2185,18 @@ define('ViewModels/NavigationViewModel',[ var camera = viewModel.terria.scene.camera; - var oldTransform = Matrix4.clone(camera.transform, oldTransformScratch); - camera.lookAtTransform(viewModel.rotateFrame); + var oldTransform; + if(defined(viewModel.rotateFrame)) { + oldTransform = Matrix4.clone(camera.transform, oldTransformScratch); + camera.lookAtTransform(viewModel.rotateFrame); + } + var currentCameraAngle = -camera.heading; camera.rotateRight(newCameraAngle - currentCameraAngle); - camera.lookAtTransform(oldTransform); + + if(defined(viewModel.rotateFrame)) { + camera.lookAtTransform(oldTransform); + } // viewModel.terria.cesium.notifyRepaintRequired(); }; @@ -2116,9 +2242,9 @@ define('CesiumNavigation',[ * @alias CesiumNavigation * @constructor * - * @param {CesiumWidget} cesiumWidget The CesiumWidget instance + * @param {Viewer|CesiumWidget} viewerCesiumWidget The Viewer or CesiumWidget instance */ - var CesiumNavigation = function (cesiumWidget) { + var CesiumNavigation = function (viewerCesiumWidget) { initialize.apply(this, arguments); this._onDestroyListeners = []; @@ -2166,18 +2292,24 @@ define('CesiumNavigation',[ } }; - function initialize(cesiumWidget, options) { - if (!defined(cesiumWidget)) { - throw new DeveloperError('cesiumWidget is required.'); + /** + * @param {Viewer|CesiumWidget} viewerCesiumWidget The Viewer or CesiumWidget instance + * @param options + */ + function initialize(viewerCesiumWidget, options) { + if (!defined(viewerCesiumWidget)) { + throw new DeveloperError('CesiumWidget or Viewer is required.'); } // options = defaultValue(options, defaultValue.EMPTY_OBJECT); + var cesiumWidget = defined(viewerCesiumWidget.cesiumWidget) ? viewerCesiumWidget.cesiumWidget : viewerCesiumWidget; + var container = document.createElement('div'); container.className = 'cesium-widget-cesiumNavigationContainer'; cesiumWidget.container.appendChild(container); - this.terria = cesiumWidget; + this.terria = viewerCesiumWidget; this.terria.options = options; this.terria.afterWidgetChanged = new CesiumEvent(); this.terria.beforeWidgetChanged = new CesiumEvent(); @@ -2270,7 +2402,7 @@ define('viewerCesiumNavigationMixin',[ throw new DeveloperError('viewer is required.'); } - var cesiumNavigation = init(viewer.cesiumWidget, options); + var cesiumNavigation = init(viewer, options); cesiumNavigation.addOnDestroyListener((function (viewer) { return function () { @@ -2297,8 +2429,14 @@ define('viewerCesiumNavigationMixin',[ return init.apply(undefined, arguments); }; - var init = function (cesiumWidget, options) { - var cesiumNavigation = new CesiumNavigation(cesiumWidget, options); + /** + * @param {Viewer|CesiumWidget} viewerCesiumWidget The Viewer or CesiumWidget instance + * @param {{}} options the options + */ + var init = function (viewerCesiumWidget, options) { + var cesiumNavigation = new CesiumNavigation(viewerCesiumWidget, options); + + var cesiumWidget = defined(viewerCesiumWidget.cesiumWidget) ? viewerCesiumWidget.cesiumWidget : viewerCesiumWidget; defineProperties(cesiumWidget, { cesiumNavigation: { @@ -2322,7 +2460,7 @@ define('viewerCesiumNavigationMixin',[ }); (function(c){var d=document,a='appendChild',i='styleSheet',s=d.createElement('style');s.type='text/css';d.getElementsByTagName('head')[0][a](s);s[i]?s[i].cssText=c:s[a](d.createTextNode(c));}) -('.full-window{position:absolute;top:0;left:0;right:0;bottom:0;margin:0;overflow:hidden;padding:0;-webkit-transition:left .25s ease-out;-moz-transition:left .25s ease-out;-ms-transition:left .25s ease-out;-o-transition:left .25s ease-out;transition:left .25s ease-out}.transparent-to-input{pointer-events:none}.opaque-to-input{pointer-events:auto}.clickable{cursor:pointer}a:hover{text-decoration:underline}.modal,.modal-background{top:0;left:0;bottom:0;right:0}.modal-background{pointer-events:auto;background-color:rgba(0,0,0,.5);z-index:1000;position:fixed}.modal{position:absolute;margin:auto;background-color:#2f353c;max-height:100%;max-width:100%;font-family:\'Roboto\',sans-serif;color:#fff}.modal-header{background-color:rgba(0,0,0,.2);border-bottom:1px solid rgba(100,100,100,.6);font-size:15px;line-height:40px;margin:0}.modal-header h1{font-size:15px;color:#fff;margin-left:15px}.modal-content{margin-left:15px;margin-right:15px;margin-bottom:15px;padding-top:15px;overflow:auto}.modal-close-button{position:absolute;right:15px;cursor:pointer;font-size:18px;color:#fff}#ui{z-index:2100}@media print{.full-window{position:initial}}.markdown img{max-width:100%}.markdown svg{max-height:100%}.markdown fieldset,.markdown input,.markdown select,.markdown textarea{font-family:inherit;font-size:1rem;box-sizing:border-box;margin-top:0;margin-bottom:0}.markdown label{vertical-align:middle}.markdown h1,.markdown h2,.markdown h3,.markdown h4,.markdown h5,.markdown h6{font-family:inherit;font-weight:700;line-height:1.25;margin-top:1em;margin-bottom:.5em}.markdown h1{font-size:2rem}.markdown h2{font-size:1.5rem}.markdown h3{font-size:1.25rem}.markdown h4{font-size:1rem}.markdown h5{font-size:.875rem}.markdown h6{font-size:.75rem}.markdown dl,.markdown ol,.markdown p,.markdown ul{margin-top:0;margin-bottom:1rem}.markdown strong{font-weight:700}.markdown em{font-style:italic}.markdown small{font-size:80%}.markdown mark{color:#000;background:#ff0}.markdown a:hover,.markdown u{text-decoration:underline}.markdown s{text-decoration:line-through}.markdown ol{list-style:decimal inside}.markdown ul{list-style:disc inside}.markdown code,.markdown pre,.markdown samp{font-family:monospace;font-size:inherit}.markdown pre{margin-top:0;margin-bottom:1rem;overflow-x:scroll}.markdown a{color:#68adfe;text-decoration:none}.markdown code,.markdown pre{background-color:transparent;border-radius:3px}.markdown hr{border:0;border-bottom-style:solid;border-bottom-width:1px;border-bottom-color:rgba(0,0,0,.125)}.markdown .left-align{text-align:left}.markdown .center{text-align:center}.markdown .right-align{text-align:right}.markdown .justify{text-align:justify}.markdown .truncate{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.markdown ol.upper-roman{list-style-type:upper-roman}.markdown ol.lower-alpha{list-style-type:lower-alpha}.markdown ul.circle{list-style-type:circle}.markdown ul.square{list-style-type:square}.markdown .list-reset{list-style:none;padding-left:0}.floating,.floating-horizontal,.floating-vertical{pointer-events:auto;position:absolute;border-radius:15px;background-color:rgba(47,53,60,.8)}.floating-horizontal{padding-left:5px;padding-right:5px}.floating-vertical{padding-top:5px;padding-bottom:5px}@media print{.floating{display:none}}.distance-legend{pointer-events:auto;position:absolute;border-radius:15px;background-color:rgba(47,53,60,.8);padding-left:5px;padding-right:5px;right:25px;bottom:30px;height:30px;width:125px;border:1px solid rgba(255,255,255,.1);box-sizing:content-box}.distance-legend-label{display:inline-block;font-family:\'Roboto\',sans-serif;font-size:14px;font-weight:lighter;line-height:30px;color:#fff;width:125px;text-align:center}.distance-legend-scale-bar{border-left:1px solid #fff;border-right:1px solid #fff;border-bottom:1px solid #fff;position:absolute;height:10px;top:15px}@media print{.distance-legend{display:none}}@media screen and (max-width:700px),screen and (max-height:420px){.distance-legend{display:none}}.navigation-controls{position:absolute;right:30px;top:210px;width:30px;border:1px solid rgba(255,255,255,.1);font-weight:300;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.navigation-control{cursor:pointer;border-bottom:1px solid #555}.naviagation-control:active{color:#fff}.navigation-control-last{cursor:pointer;border-bottom:0}.navigation-control-icon-zoom-in{padding-bottom:4px}.navigation-control-icon-zoom-in,.navigation-control-icon-zoom-out{position:relative;text-align:center;font-size:20px;color:#fff}.navigation-control-icon-reset{position:relative;left:10px;width:10px;height:10px;fill:rgba(255,255,255,.8);padding-top:6px;padding-bottom:6px;box-sizing:content-box}.compass,.compass-outer-ring{position:absolute;width:95px;height:95px}.compass{pointer-events:auto;right:0;overflow:hidden;top:100px}.compass-outer-ring{top:0;fill:rgba(255,255,255,.5)}.compass-outer-ring-background{position:absolute;top:14px;left:14px;width:44px;height:44px;border-radius:44px;border:12px solid rgba(47,53,60,.8);box-sizing:content-box}.compass-gyro{pointer-events:none;position:absolute;top:0;width:95px;height:95px;fill:#ccc}.compass-gyro-active,.compass-gyro-background:hover+.compass-gyro{fill:#68adfe}.compass-gyro-background{position:absolute;top:30px;left:30px;width:33px;height:33px;border-radius:33px;background-color:rgba(47,53,60,.8);border:1px solid rgba(255,255,255,.2);box-sizing:content-box}.compass-rotation-marker{position:absolute;top:0;width:95px;height:95px;fill:#68adfe}@media screen and (max-width:700px),screen and (max-height:420px){.compass,.navigation-controls{display:none}}@media print{.compass,.navigation-controls{display:none}}'); +('.full-window{position:absolute;top:0;left:0;right:0;bottom:0;margin:0;overflow:hidden;padding:0;-webkit-transition:left .25s ease-out;-moz-transition:left .25s ease-out;-ms-transition:left .25s ease-out;-o-transition:left .25s ease-out;transition:left .25s ease-out}.transparent-to-input{pointer-events:none}.opaque-to-input{pointer-events:auto}.clickable{cursor:pointer}.markdown a:hover,.markdown u,a:hover{text-decoration:underline}.modal,.modal-background{top:0;left:0;bottom:0;right:0}.modal-background{pointer-events:auto;background-color:rgba(0,0,0,.5);z-index:1000;position:fixed}.modal{position:absolute;margin:auto;background-color:#2f353c;max-height:100%;max-width:100%;font-family:\'Roboto\',sans-serif;color:#fff}.modal-header{background-color:rgba(0,0,0,.2);border-bottom:1px solid rgba(100,100,100,.6);font-size:15px;line-height:40px;margin:0}.modal-header h1{font-size:15px;color:#fff;margin-left:15px}.modal-content{margin-left:15px;margin-right:15px;margin-bottom:15px;padding-top:15px;overflow:auto}.modal-close-button{position:absolute;right:15px;cursor:pointer;font-size:18px;color:#fff}#ui{z-index:2100}@media print{.full-window{position:initial}}.markdown img{max-width:100%}.markdown svg{max-height:100%}.markdown fieldset,.markdown input,.markdown select,.markdown textarea{font-family:inherit;font-size:1rem;box-sizing:border-box;margin-top:0;margin-bottom:0}.markdown label{vertical-align:middle}.markdown h1,.markdown h2,.markdown h3,.markdown h4,.markdown h5,.markdown h6{font-family:inherit;font-weight:700;line-height:1.25;margin-top:1em;margin-bottom:.5em}.markdown h1{font-size:2rem}.markdown h2{font-size:1.5rem}.markdown h3{font-size:1.25rem}.markdown h4{font-size:1rem}.markdown h5{font-size:.875rem}.markdown h6{font-size:.75rem}.markdown dl,.markdown ol,.markdown p,.markdown ul{margin-top:0;margin-bottom:1rem}.markdown strong{font-weight:700}.markdown em{font-style:italic}.markdown small{font-size:80%}.markdown mark{color:#000;background:#ff0}.markdown s{text-decoration:line-through}.markdown ol{list-style:decimal inside}.markdown ul{list-style:disc inside}.markdown code,.markdown pre,.markdown samp{font-family:monospace;font-size:inherit}.markdown pre{margin-top:0;margin-bottom:1rem;overflow-x:scroll}.markdown a{color:#68adfe;text-decoration:none}.markdown code,.markdown pre{background-color:transparent;border-radius:3px}.markdown hr{border:0;border-bottom-style:solid;border-bottom-width:1px;border-bottom-color:rgba(0,0,0,.125)}.markdown .left-align{text-align:left}.markdown .center{text-align:center}.markdown .right-align{text-align:right}.markdown .justify{text-align:justify}.markdown .truncate{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.markdown ol.upper-roman{list-style-type:upper-roman}.markdown ol.lower-alpha{list-style-type:lower-alpha}.markdown ul.circle{list-style-type:circle}.markdown ul.square{list-style-type:square}.markdown .list-reset{list-style:none;padding-left:0}.floating,.floating-horizontal,.floating-vertical{pointer-events:auto;position:absolute;border-radius:15px;background-color:rgba(47,53,60,.8)}.floating-horizontal{padding-left:5px;padding-right:5px}.floating-vertical{padding-top:5px;padding-bottom:5px}@media print{.floating{display:none}}.distance-legend{pointer-events:auto;position:absolute;border-radius:15px;background-color:rgba(47,53,60,.8);padding-left:5px;padding-right:5px;right:25px;bottom:30px;height:30px;width:125px;border:1px solid rgba(255,255,255,.1);box-sizing:content-box}.distance-legend-label{display:inline-block;font-family:\'Roboto\',sans-serif;font-size:14px;font-weight:lighter;line-height:30px;color:#fff;width:125px;text-align:center}.distance-legend-scale-bar{border-left:1px solid #fff;border-right:1px solid #fff;border-bottom:1px solid #fff;position:absolute;height:10px;top:15px}@media print{.distance-legend{display:none}}@media screen and (max-width:700px),screen and (max-height:420px){.distance-legend{display:none}}.navigation-controls{position:absolute;right:30px;top:210px;width:30px;border:1px solid rgba(255,255,255,.1);font-weight:300;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.navigation-control{cursor:pointer;border-bottom:1px solid #555}.naviagation-control:active{color:#fff}.navigation-control-last{cursor:pointer;border-bottom:0}.navigation-control-icon-zoom-in{padding-bottom:4px}.navigation-control-icon-zoom-in,.navigation-control-icon-zoom-out{position:relative;text-align:center;font-size:20px;color:#fff}.navigation-control-icon-reset{position:relative;left:10px;width:10px;height:10px;fill:rgba(255,255,255,.8);padding-top:6px;padding-bottom:6px;box-sizing:content-box}.compass,.compass-outer-ring{position:absolute;width:95px;height:95px}.compass{pointer-events:auto;right:0;overflow:hidden;top:100px}.compass-outer-ring{top:0;fill:rgba(255,255,255,.5)}.compass-outer-ring-background{position:absolute;top:14px;left:14px;width:44px;height:44px;border-radius:44px;border:12px solid rgba(47,53,60,.8);box-sizing:content-box}.compass-gyro{pointer-events:none;position:absolute;top:0;width:95px;height:95px;fill:#ccc}.compass-gyro-active,.compass-gyro-background:hover+.compass-gyro{fill:#68adfe}.compass-gyro-background{position:absolute;top:30px;left:30px;width:33px;height:33px;border-radius:33px;background-color:rgba(47,53,60,.8);border:1px solid rgba(255,255,255,.2);box-sizing:content-box}.compass-rotation-marker{position:absolute;top:0;width:95px;height:95px;fill:#68adfe}@media screen and (max-width:700px),screen and (max-height:420px){.compass,.navigation-controls{display:none}}@media print{.compass,.navigation-controls{display:none}}'); // actual code --> @@ -2338,6 +2476,7 @@ define('Cesium/Widgets/SvgPathBindingHandler', function() { return Cesium["SvgPa define('Cesium/Core/Ray', function() { return Cesium["Ray"]; }); define('Cesium/Core/Cartesian3', function() { return Cesium["Cartesian3"]; }); define('Cesium/Core/Cartographic', function() { return Cesium["Cartographic"]; }); +define('Cesium/Core/ReferenceFrame', function() { return Cesium["ReferenceFrame"]; }); define('Cesium/Scene/SceneMode', function() { return Cesium["SceneMode"]; }); define('Cesium/Core/DeveloperError', function() { return Cesium["DeveloperError"]; }); define('Cesium/Core/EllipsoidGeodesic', function() { return Cesium["EllipsoidGeodesic"]; }); @@ -2353,4 +2492,4 @@ define('Cesium/Scene/Camera', function() { return Cesium["Camera"]; }); define('Cesium/Core/IntersectionTests', function() { return Cesium["IntersectionTests"]; }); return require('viewerCesiumNavigationMixin'); -})); \ No newline at end of file +})); diff --git a/dist/standalone/viewerCesiumNavigationMixin.min.js b/dist/standalone/viewerCesiumNavigationMixin.min.js index e65b2ebf..7bf406fe 100644 --- a/dist/standalone/viewerCesiumNavigationMixin.min.js +++ b/dist/standalone/viewerCesiumNavigationMixin.min.js @@ -1,12 +1,12 @@ (function(root,factory){"use strict";if(typeof define==="function"&&define.amd){define([],factory)}Cesium["viewerCesiumNavigationMixin"]=factory()})(typeof window!=="undefined"?window:typeof self!=="undefined"?self:this,function(){var requirejs,require,define;(function(undef){var main,req,makeMap,handlers,defined={},waiting={},config={},defining={},hasOwn=Object.prototype.hasOwnProperty,aps=[].slice,jsSuffixRegExp=/\.js$/;function hasProp(obj,prop){return hasOwn.call(obj,prop)}function normalize(name,baseName){var nameParts,nameSegment,mapValue,foundMap,lastIndex,foundI,foundStarMap,starI,i,j,part,normalizedBaseParts,baseParts=baseName&&baseName.split("/"),map=config.map,starMap=map&&map["*"]||{};if(name){name=name.split("/");lastIndex=name.length-1;if(config.nodeIdCompat&&jsSuffixRegExp.test(name[lastIndex])){name[lastIndex]=name[lastIndex].replace(jsSuffixRegExp,"")}if(name[0].charAt(0)==="."&&baseParts){normalizedBaseParts=baseParts.slice(0,baseParts.length-1);name=normalizedBaseParts.concat(name)}for(i=0;i0){name.splice(i-1,2);i-=2}}}name=name.join("/")}if((baseParts||starMap)&&map){nameParts=name.split("/");for(i=nameParts.length;i>0;i-=1){nameSegment=nameParts.slice(0,i).join("/");if(baseParts){for(j=baseParts.length;j>0;j-=1){mapValue=map[baseParts.slice(0,j).join("/")];if(mapValue){mapValue=mapValue[nameSegment];if(mapValue){foundMap=mapValue;foundI=i;break}}}}if(foundMap){break}if(!foundStarMap&&starMap&&starMap[nameSegment]){foundStarMap=starMap[nameSegment];starI=i}}if(!foundMap&&foundStarMap){foundMap=foundStarMap;foundI=starI}if(foundMap){nameParts.splice(0,foundI,foundMap);name=nameParts.join("/")}}return name}function makeRequire(relName,forceSync){return function(){var args=aps.call(arguments,0);if(typeof args[0]!=="string"&&args.length===1){args.push(null)}return req.apply(undef,args.concat([relName,forceSync]))}}function makeNormalize(relName){return function(name){return normalize(name,relName)}}function makeLoad(depName){return function(value){defined[depName]=value}}function callDep(name){if(hasProp(waiting,name)){var args=waiting[name];delete waiting[name];defining[name]=true;main.apply(undef,args)}if(!hasProp(defined,name)&&!hasProp(defining,name)){throw new Error("No "+name)}return defined[name]}function splitPrefix(name){var prefix,index=name?name.indexOf("!"):-1;if(index>-1){prefix=name.substring(0,index);name=name.substring(index+1,name.length)}return[prefix,name]}makeMap=function(name,relName){var plugin,parts=splitPrefix(name),prefix=parts[0];name=parts[1];if(prefix){prefix=normalize(prefix,relName);plugin=callDep(prefix)}if(prefix){if(plugin&&plugin.normalize){name=plugin.normalize(name,makeNormalize(relName))}else{name=normalize(name,relName)}}else{name=normalize(name,relName);parts=splitPrefix(name);prefix=parts[0];name=parts[1];if(prefix){plugin=callDep(prefix)}}return{f:prefix?prefix+"!"+name:name,n:name,pr:prefix,p:plugin}};function makeConfig(name){return function(){return config&&config.config&&config.config[name]||{}}}handlers={require:function(name){return makeRequire(name)},exports:function(name){var e=defined[name];if(typeof e!=="undefined"){return e}else{return defined[name]={}}},module:function(name){return{id:name,uri:"",exports:defined[name],config:makeConfig(name)}}};main=function(name,deps,callback,relName){var cjsModule,depName,ret,map,i,args=[],callbackType=typeof callback,usingExports;relName=relName||name;if(callbackType==="undefined"||callbackType==="function"){deps=!deps.length&&callback.length?["require","exports","module"]:deps;for(i=0;i",c[0];);return 4a.a.o(c,b[d])&&c.push(b[d]);return c},fb:function(a,b){a=a||[];for(var c=[],d=0,e=a.length;de?d&&b.push(c):d||b.splice(e,1)},ka:f,extend:c,Xa:d,Ya:f?d:c,D:b,Ca:function(a,b){if(!a)return a;var c={},d;for(d in a)a.hasOwnProperty(d)&&(c[d]=b(a[d],d,a));return c},ob:function(b){for(;b.firstChild;)a.removeNode(b.firstChild)},jc:function(b){b=a.a.V(b);for(var c=(b[0]&&b[0].ownerDocument||u).createElement("div"),d=0,e=b.length;dh?a.setAttribute("selected",b):a.selected=b},$a:function(a){return null===a||a===n?"":a.trim?a.trim():a.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},nd:function(a,b){a=a||"";return b.length>a.length?!1:a.substring(0,b.length)===b},Mc:function(a,b){if(a===b)return!0;if(11===a.nodeType)return!1;if(b.contains)return b.contains(3===a.nodeType?a.parentNode:a);if(b.compareDocumentPosition)return 16==(b.compareDocumentPosition(a)&16);for(;a&&a!=b;)a=a.parentNode;return!!a},nb:function(b){return a.a.Mc(b,b.ownerDocument.documentElement)},Qb:function(b){return!!a.a.Sb(b,a.a.nb)},A:function(a){return a&&a.tagName&&a.tagName.toLowerCase()},Wb:function(b){return a.onError?function(){try{return b.apply(this,arguments)}catch(c){throw a.onError&&a.onError(c),c}}:b},setTimeout:function(b,c){return setTimeout(a.a.Wb(b),c)},$b:function(b){setTimeout(function(){a.onError&&a.onError(b);throw b},0)},p:function(b,c,d){var e=a.a.Wb(d);d=h&&m[c];if(a.options.useOnlyNativeEvents||d||!v)if(d||"function"!=typeof b.addEventListener)if("undefined"!=typeof b.attachEvent){var l=function(a){e.call(b,a)},f="on"+c;b.attachEvent(f,l);a.a.F.oa(b,function(){b.detachEvent(f,l)})}else throw Error("Browser doesn't support addEventListener or attachEvent");else b.addEventListener(c,e,!1);else v(b).bind(c,e)},Da:function(b,c){if(!b||!b.nodeType)throw Error("element must be a DOM node when calling triggerEvent");var d;"input"===a.a.A(b)&&b.type&&"click"==c.toLowerCase()?(d=b.type,d="checkbox"==d||"radio"==d):d=!1;if(a.options.useOnlyNativeEvents||!v||d)if("function"==typeof u.createEvent)if("function"==typeof b.dispatchEvent)d=u.createEvent(l[c]||"HTMLEvents"),d.initEvent(c,!0,!0,x,0,0,0,0,0,!1,!1,!1,!1,0,b),b.dispatchEvent(d);else throw Error("The supplied element doesn't support dispatchEvent");else if(d&&b.click)b.click();else if("undefined"!=typeof b.fireEvent)b.fireEvent("on"+c);else throw Error("Browser doesn't support triggering events");else v(b).trigger(c)},c:function(b){return a.H(b)?b():b},zb:function(b){return a.H(b)?b.t():b},bb:function(b,c,d){var h;c&&("object"===typeof b.classList?(h=b.classList[d?"add":"remove"],a.a.q(c.match(r),function(a){h.call(b.classList,a)})):"string"===typeof b.className.baseVal?e(b.className,"baseVal",c,d):e(b,"className",c,d))},Za:function(b,c){var d=a.a.c(c);if(null===d||d===n)d="";var e=a.f.firstChild(b);!e||3!=e.nodeType||a.f.nextSibling(e)?a.f.da(b,[b.ownerDocument.createTextNode(d)]):e.data=d;a.a.Rc(b)},rc:function(a,b){a.name=b;if(7>=h)try{a.mergeAttributes(u.createElement(""),!1)}catch(c){}},Rc:function(a){9<=h&&(a=1==a.nodeType?a:a.parentNode,a.style&&(a.style.zoom=a.style.zoom))},Nc:function(a){if(h){var b=a.style.width;a.style.width=0;a.style.width=b}},hd:function(b,c){b=a.a.c(b);c=a.a.c(c);for(var d=[],e=b;e<=c;e++)d.push(e);return d},V:function(a){for(var b=[],c=0,d=a.length;c",""],d=[3,"","
"],e=[1,""],f={thead:c,tbody:c,tfoot:c,tr:[2,"","
"],td:d,th:d,option:e,optgroup:e},g=8>=a.a.C;a.a.ma=function(c,d){var e;if(v)if(v.parseHTML)e=v.parseHTML(c,d)||[];else{if((e=v.clean([c],d))&&e[0]){for(var h=e[0];h.parentNode&&11!==h.parentNode.nodeType;)h=h.parentNode;h.parentNode&&h.parentNode.removeChild(h)}}else{(e=d)||(e=u);var h=e.parentWindow||e.defaultView||x,r=a.a.$a(c).toLowerCase(),q=e.createElement("div"),p;p=(r=r.match(/^<([a-z]+)[ >]/))&&f[r[1]]||b;r=p[0];p="ignored
"+p[1]+c+p[2]+"
";"function"==typeof h.innerShiv?q.appendChild(h.innerShiv(p)):(g&&e.appendChild(q),q.innerHTML=p,g&&q.parentNode.removeChild(q));for(;r--;)q=q.lastChild;e=a.a.V(q.lastChild.childNodes)}return e};a.a.Cb=function(b,c){a.a.ob(b);c=a.a.c(c);if(null!==c&&c!==n)if("string"!=typeof c&&(c=c.toString()),v)v(b).html(c);else for(var d=a.a.ma(c,b.ownerDocument),e=0;e"},xc:function(a,b){var f=c[a];if(f===n)throw Error("Couldn't find any memo with ID "+a+". Perhaps it's already been unmemoized.");try{return f.apply(null,b||[]),!0}finally{delete c[a]}},yc:function(c,e){var f=[];b(c,f);for(var g=0,k=f.length;gb){if(5e3<=++c){g=e;a.a.$b(Error("'Too much recursion' after processing "+c+" task groups."));break}b=e}try{m()}catch(h){a.a.$b(h)}}}function c(){b();g=e=d.length=0}var d=[],e=0,f=1,g=0;return{scheduler:x.MutationObserver?function(a){var b=u.createElement("div");new MutationObserver(a).observe(b,{attributes:!0});return function(){b.classList.toggle("foo")}}(c):u&&"onreadystatechange"in u.createElement("script")?function(a){var b=u.createElement("script");b.onreadystatechange=function(){b.onreadystatechange=null;u.documentElement.removeChild(b);b=null;a()};u.documentElement.appendChild(b)}:function(a){setTimeout(a,0)},Wa:function(b){e||a.Y.scheduler(c);d[e++]=b;return f++},cancel:function(a){a-=f-e;a>=g&&ad[0]?g+d[0]:d[0]),g);for(var g=1===t?g:Math.min(c+(d[1]||0),g),t=c+t-2,G=Math.max(g,t),P=[],n=[],Q=2;cc;c++)b=b();return b})};a.toJSON=function(b,c,d){b=a.wc(b);return a.a.Eb(b,c,d)};d.prototype={save:function(b,c){var d=a.a.o(this.keys,b);0<=d?this.Ib[d]=c:(this.keys.push(b),this.Ib.push(c))},get:function(b){b=a.a.o(this.keys,b);return 0<=b?this.Ib[b]:n}}})();a.b("toJS",a.wc);a.b("toJSON",a.toJSON);(function(){a.j={u:function(b){switch(a.a.A(b)){case"option":return!0===b.__ko__hasDomDataOptionValue__?a.a.e.get(b,a.d.options.xb):7>=a.a.C?b.getAttributeNode("value")&&b.getAttributeNode("value").specified?b.value:b.text:b.value;case"select":return 0<=b.selectedIndex?a.j.u(b.options[b.selectedIndex]):n;default:return b.value}},ha:function(b,c,d){switch(a.a.A(b)){case"option":switch(typeof c){case"string":a.a.e.set(b,a.d.options.xb,n);"__ko__hasDomDataOptionValue__"in b&&delete b.__ko__hasDomDataOptionValue__;b.value=c;break;default:a.a.e.set(b,a.d.options.xb,c),b.__ko__hasDomDataOptionValue__=!0,b.value="number"===typeof c?c:""}break;case"select":if(""===c||null===c)c=n;for(var e=-1,f=0,g=b.options.length,k;f=p){c.push(r&&k.length?{key:r,value:k.join("")}:{unknown:r||k.join("")});r=p=0;k=[];continue}}else if(58===t){if(!p&&!r&&1===k.length){r=k.pop();continue}}else 47===t&&A&&1"===u.createComment("test").text,g=f?/^\x3c!--\s*ko(?:\s+([\s\S]+))?\s*--\x3e$/:/^\s*ko(?:\s+([\s\S]+))?\s*$/,k=f?/^\x3c!--\s*\/ko\s*--\x3e$/:/^\s*\/ko\s*$/,l={ul:!0,ol:!0};a.f={Z:{},childNodes:function(a){return b(a)?d(a):a.childNodes},xa:function(c){if(b(c)){c=a.f.childNodes(c);for(var d=0,e=c.length;d=a.a.C&&b.tagName===c))return c};a.g.Ob=function(c,e,f,g){if(1===e.nodeType){var k=a.g.getComponentNameForNode(e);if(k){c=c||{};if(c.component)throw Error('Cannot use the "component" binding on a custom element matching a component');var l={name:k,params:b(e,f)};c.component=g?function(){return l}:l}}return c};var c=new a.Q;9>a.a.C&&(a.g.register=function(a){return function(b){u.createElement(b);return a.apply(this,arguments)}}(a.g.register),u.createDocumentFragment=function(b){return function(){var c=b(),f=a.g.Bc,g;for(g in f)f.hasOwnProperty(g)&&c.createElement(g);return c}}(u.createDocumentFragment))})();(function(b){function c(b,c,d){c=c.template;if(!c)throw Error("Component '"+b+"' has no template");b=a.a.ua(c);a.f.da(d,b)}function d(a,b,c,d){var e=a.createViewModel;return e?e.call(a,d,{element:b,templateNodes:c}):d}var e=0;a.d.component={init:function(f,g,k,l,m){function h(){var a=r&&r.dispose;"function"===typeof a&&a.call(r);q=r=null}var r,q,p=a.a.V(a.f.childNodes(f));a.a.F.oa(f,h);a.m(function(){var l=a.a.c(g()),k,t;"string"===typeof l?k=l:(k=a.a.c(l.name),t=a.a.c(l.params));if(!k)throw Error("No component name specified");var n=q=++e;a.g.get(k,function(e){if(q===n){h();if(!e)throw Error("Unknown component '"+k+"'");c(k,e,f);var g=d(e,f,p,t);e=m.createChildContext(g,b,function(a){a.$component=g;a.$componentTemplateNodes=p});r=g;a.eb(e,f)}})},null,{i:f});return{controlsDescendantBindings:!0}}};a.f.Z.component=!0})();var S={"class":"className","for":"htmlFor"};a.d.attr={update:function(b,c){var d=a.a.c(c())||{};a.a.D(d,function(c,d){d=a.a.c(d);var g=!1===d||null===d||d===n;g&&b.removeAttribute(c);8>=a.a.C&&c in S?(c=S[c],g?b.removeAttribute(c):b[c]=d):g||b.setAttribute(c,d.toString());"name"===c&&a.a.rc(b,g?"":d.toString())})}};(function(){a.d.checked={after:["value","attr"],init:function(b,c,d){function e(){var e=b.checked,f=p?g():e;if(!a.va.Sa()&&(!l||e)){var m=a.l.w(c);if(h){var k=r?m.t():m;q!==f?(e&&(a.a.pa(k,f,!0),a.a.pa(k,q,!1)),q=f):a.a.pa(k,f,e);r&&a.Ba(m)&&m(k)}else a.h.Ea(m,d,"checked",f,!0)}}function f(){var d=a.a.c(c());b.checked=h?0<=a.a.o(d,g()):k?d:g()===d}var g=a.nc(function(){return d.has("checkedValue")?a.a.c(d.get("checkedValue")):d.has("value")?a.a.c(d.get("value")):b.value}),k="checkbox"==b.type,l="radio"==b.type;if(k||l){var m=c(),h=k&&a.a.c(m)instanceof Array,r=!(h&&m.push&&m.splice),q=h?g():n,p=l||h;l&&!b.name&&a.d.uniqueName.init(b,function(){return!0});a.m(e,null,{i:b});a.a.p(b,"click",e);a.m(f,null,{i:b});m=n}}};a.h.ea.checked=!0;a.d.checkedValue={update:function(b,c){b.value=a.a.c(c())}}})();a.d.css={update:function(b,c){var d=a.a.c(c());null!==d&&"object"==typeof d?a.a.D(d,function(c,d){d=a.a.c(d);a.a.bb(b,c,d)}):(d=a.a.$a(String(d||"")),a.a.bb(b,b.__ko__cssValue,!1),b.__ko__cssValue=d,a.a.bb(b,d,!0))}};a.d.enable={update:function(b,c){var d=a.a.c(c());d&&b.disabled?b.removeAttribute("disabled"):d||b.disabled||(b.disabled=!0)}};a.d.disable={update:function(b,c){a.d.enable.update(b,function(){return!a.a.c(c())})}};a.d.event={init:function(b,c,d,e,f){var g=c()||{};a.a.D(g,function(g){"string"==typeof g&&a.a.p(b,g,function(b){var m,h=c()[g];if(h){try{var r=a.a.V(arguments);e=f.$data;r.unshift(e);m=h.apply(e,r)}finally{!0!==m&&(b.preventDefault?b.preventDefault():b.returnValue=!1)}!1===d.get(g+"Bubble")&&(b.cancelBubble=!0,b.stopPropagation&&b.stopPropagation())}})})}};a.d.foreach={ic:function(b){return function(){var c=b(),d=a.a.zb(c);if(!d||"number"==typeof d.length)return{foreach:c,templateEngine:a.W.sb};a.a.c(c);return{foreach:d.data,as:d.as,includeDestroyed:d.includeDestroyed,afterAdd:d.afterAdd,beforeRemove:d.beforeRemove,afterRender:d.afterRender,beforeMove:d.beforeMove,afterMove:d.afterMove,templateEngine:a.W.sb}}},init:function(b,c){return a.d.template.init(b,a.d.foreach.ic(c))},update:function(b,c,d,e,f){return a.d.template.update(b,a.d.foreach.ic(c),d,e,f)}};a.h.ta.foreach=!1;a.f.Z.foreach=!0;a.d.hasfocus={init:function(b,c,d){function e(e){b.__ko_hasfocusUpdating=!0;var f=b.ownerDocument;if("activeElement"in f){var g;try{g=f.activeElement}catch(h){g=f.body}e=g===b}f=c();a.h.Ea(f,d,"hasfocus",e,!0);b.__ko_hasfocusLastValue=e;b.__ko_hasfocusUpdating=!1}var f=e.bind(null,!0),g=e.bind(null,!1);a.a.p(b,"focus",f);a.a.p(b,"focusin",f);a.a.p(b,"blur",g);a.a.p(b,"focusout",g)},update:function(b,c){var d=!!a.a.c(c());b.__ko_hasfocusUpdating||b.__ko_hasfocusLastValue===d||(d?b.focus():b.blur(),!d&&b.__ko_hasfocusLastValue&&b.ownerDocument.body.focus(),a.l.w(a.a.Da,null,[b,d?"focusin":"focusout"]))}};a.h.ea.hasfocus=!0;a.d.hasFocus=a.d.hasfocus;a.h.ea.hasFocus=!0;a.d.html={init:function(){return{controlsDescendantBindings:!0}},update:function(b,c){a.a.Cb(b,c())}};K("if");K("ifnot",!1,!0);K("with",!0,!1,function(a,c){return a.createChildContext(c)});var L={};a.d.options={init:function(b){if("select"!==a.a.A(b))throw Error("options binding applies only to SELECT elements");for(;0a.a.C)var g=a.a.e.I(),k=a.a.e.I(),l=function(b){var c=this.activeElement;(c=c&&a.a.e.get(c,k))&&c(b)},m=function(b,c){var d=b.ownerDocument;a.a.e.get(d,g)||(a.a.e.set(d,g,!0),a.a.p(d,"selectionchange",l));a.a.e.set(b,k,c)};a.d.textInput={init:function(b,d,g){function l(c,d){a.a.p(b,c,d)}function k(){var c=a.a.c(d());if(null===c||c===n)c="";v!==n&&c===v?a.a.setTimeout(k,4):b.value!==c&&(u=c,b.value=c)}function y(){s||(v=b.value,s=a.a.setTimeout(t,4))}function t(){clearTimeout(s);v=s=n;var c=b.value;u!==c&&(u=c,a.h.Ea(d(),g,"textInput",c))}var u=b.value,s,v,x=9==a.a.C?y:t;10>a.a.C?(l("propertychange",function(a){"value"===a.propertyName&&x(a)}),8==a.a.C&&(l("keyup",t),l("keydown",t)),8<=a.a.C&&(m(b,x),l("dragend",y))):(l("input",t),5>e&&"textarea"===a.a.A(b)?(l("keydown",y),l("paste",y),l("cut",y)):11>c?l("keydown",y):4>f&&(l("DOMAutoComplete",t),l("dragdrop",t),l("drop",t)));l("change",t);a.m(k,null,{i:b})}};a.h.ea.textInput=!0;a.d.textinput={preprocess:function(a,b,c){c("textInput",a)}}})();a.d.uniqueName={init:function(b,c){if(c()){var d="ko_unique_"+ ++a.d.uniqueName.Ic;a.a.rc(b,d)}}};a.d.uniqueName.Ic=0;a.d.value={after:["options","foreach"],init:function(b,c,d){if("input"!=b.tagName.toLowerCase()||"checkbox"!=b.type&&"radio"!=b.type){var e=["change"],f=d.get("valueUpdate"),g=!1,k=null;f&&("string"==typeof f&&(f=[f]),a.a.ra(e,f),e=a.a.Tb(e));var l=function(){k=null;g=!1;var e=c(),f=a.j.u(b);a.h.Ea(e,d,"value",f)};!a.a.C||"input"!=b.tagName.toLowerCase()||"text"!=b.type||"off"==b.autocomplete||b.form&&"off"==b.form.autocomplete||-1!=a.a.o(e,"propertychange")||(a.a.p(b,"propertychange",function(){g=!0}),a.a.p(b,"focus",function(){g=!1}),a.a.p(b,"blur",function(){g&&l()}));a.a.q(e,function(c){var d=l;a.a.nd(c,"after")&&(d=function(){k=a.j.u(b);a.a.setTimeout(l,0)},c=c.substring(5));a.a.p(b,c,d)});var m=function(){var e=a.a.c(c()),f=a.j.u(b);if(null!==k&&e===k)a.a.setTimeout(m,0);else if(e!==f)if("select"===a.a.A(b)){var g=d.get("valueAllowUnset"),f=function(){a.j.ha(b,e,g)};f();g||e===a.j.u(b)?a.a.setTimeout(f,0):a.l.w(a.a.Da,null,[b,"change"])}else a.j.ha(b,e)};a.m(m,null,{i:b})}else a.Ja(b,{checkedValue:c})},update:function(){}};a.h.ea.value=!0;a.d.visible={update:function(b,c){var d=a.a.c(c()),e="none"!=b.style.display;d&&!e?b.style.display="":!d&&e&&(b.style.display="none")}};(function(b){a.d[b]={init:function(c,d,e,f,g){return a.d.event.init.call(this,c,function(){var a={};a[b]=d();return a},e,f,g)}}})("click");a.O=function(){};a.O.prototype.renderTemplateSource=function(){throw Error("Override renderTemplateSource")};a.O.prototype.createJavaScriptEvaluatorBlock=function(){throw Error("Override createJavaScriptEvaluatorBlock")};a.O.prototype.makeTemplateSource=function(b,c){if("string"==typeof b){c=c||u;var d=c.getElementById(b);if(!d)throw Error("Cannot find template with ID "+b);return new a.v.n(d)}if(1==b.nodeType||8==b.nodeType)return new a.v.qa(b);throw Error("Unknown template type: "+b)};a.O.prototype.renderTemplate=function(a,c,d,e){a=this.makeTemplateSource(a,e);return this.renderTemplateSource(a,c,d,e)};a.O.prototype.isTemplateRewritten=function(a,c){return!1===this.allowTemplateRewriting?!0:this.makeTemplateSource(a,c).data("isRewritten")};a.O.prototype.rewriteTemplate=function(a,c,d){a=this.makeTemplateSource(a,d);c=c(a.text());a.text(c);a.data("isRewritten",!0)};a.b("templateEngine",a.O);a.Gb=function(){function b(b,c,d,k){b=a.h.yb(b);for(var l=a.h.ta,m=0;m]*))?)*\s+)data-bind\s*=\s*(["'])([\s\S]*?)\3/gi,d=/\x3c!--\s*ko\b\s*([\s\S]*?)\s*--\x3e/g;return{Oc:function(b,c,d){c.isTemplateRewritten(b,d)||c.rewriteTemplate(b,function(b){return a.Gb.dd(b,c)},d)},dd:function(a,f){return a.replace(c,function(a,c,d,e,h){return b(h,c,d,f)}).replace(d,function(a,c){return b(c,"","#comment",f)})},Ec:function(b,c){return a.M.wb(function(d,k){var l=d.nextSibling;l&&l.nodeName.toLowerCase()===c&&a.Ja(l,b,k)})}}}();a.b("__tr_ambtns",a.Gb.Ec);(function(){a.v={};a.v.n=function(b){if(this.n=b){var c=a.a.A(b);this.ab="script"===c?1:"textarea"===c?2:"template"==c&&b.content&&11===b.content.nodeType?3:4}};a.v.n.prototype.text=function(){var b=1===this.ab?"text":2===this.ab?"value":"innerHTML";if(0==arguments.length)return this.n[b];var c=arguments[0];"innerHTML"===b?a.a.Cb(this.n,c):this.n[b]=c};var b=a.a.e.I()+"_";a.v.n.prototype.data=function(c){if(1===arguments.length)return a.a.e.get(this.n,b+c);a.a.e.set(this.n,b+c,arguments[1])};var c=a.a.e.I();a.v.n.prototype.nodes=function(){var b=this.n;if(0==arguments.length)return(a.a.e.get(b,c)||{}).jb||(3===this.ab?b.content:4===this.ab?b:n);a.a.e.set(b,c,{jb:arguments[0]})};a.v.qa=function(a){this.n=a};a.v.qa.prototype=new a.v.n;a.v.qa.prototype.text=function(){if(0==arguments.length){var b=a.a.e.get(this.n,c)||{};b.Hb===n&&b.jb&&(b.Hb=b.jb.innerHTML);return b.Hb}a.a.e.set(this.n,c,{Hb:arguments[0]})};a.b("templateSources",a.v);a.b("templateSources.domElement",a.v.n);a.b("templateSources.anonymousTemplate",a.v.qa)})();(function(){function b(b,c,d){var e;for(c=a.f.nextSibling(c);b&&(e=b)!==c;)b=a.f.nextSibling(e),d(e,b)}function c(c,d){if(c.length){var e=c[0],f=c[c.length-1],g=e.parentNode,k=a.Q.instance,n=k.preprocessNode;if(n){b(e,f,function(a,b){var c=a.previousSibling,d=n.call(k,a);d&&(a===e&&(e=d[0]||b),a===f&&(f=d[d.length-1]||c))});c.length=0;if(!e)return;e===f?c.push(e):(c.push(e,f),a.a.za(c,g))}b(e,f,function(b){1!==b.nodeType&&8!==b.nodeType||a.Rb(d,b)});b(e,f,function(b){1!==b.nodeType&&8!==b.nodeType||a.M.yc(b,[d])});a.a.za(c,g)}}function d(a){return a.nodeType?a:0a.a.C?0:b.nodes)?b.nodes():null)return a.a.V(c.cloneNode(!0).childNodes);b=b.text();return a.a.ma(b,e)};a.W.sb=new a.W;a.Db(a.W.sb);a.b("nativeTemplateEngine",a.W);(function(){a.vb=function(){var a=this.$c=function(){if(!v||!v.tmpl)return 0; -try{if(0<=v.tmpl.tag.tmpl.open.toString().indexOf("__"))return 2}catch(a){}return 1}();this.renderTemplateSource=function(b,e,f,g){g=g||u;f=f||{};if(2>a)throw Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later.");var k=b.data("precompiled");k||(k=b.text()||"",k=v.template(null,"{{ko_with $item.koBindingContext}}"+k+"{{/ko_with}}"),b.data("precompiled",k));b=[e.$data];e=v.extend({koBindingContext:e},f.templateOptions);e=v.tmpl(k,b,e);e.appendTo(g.createElement("div"));v.fragments={};return e};this.createJavaScriptEvaluatorBlock=function(a){return"{{ko_code ((function() { return "+a+" })()) }}"};this.addTemplate=function(a,b){u.write("")};0]*src="[^"<>]*"[^<>]*)\\s?\\/?>',i=RegExp(o,"i");return e=e.replace(/<[^<>]*>?/gi,function(e){var t,o,l,a,u;if(/(^<->|^<-\s|^<3\s)/.test(e))return e;if(t=e.match(i)){var m=t[1];if(o=n(m.match(/src="([^"<>]*)"/i)[1]),l=m.match(/alt="([^"<>]*)"/i),l=l&&"undefined"!=typeof l[1]?l[1]:"",a=m.match(/title="([^"<>]*)"/i),a=a&&"undefined"!=typeof a[1]?a[1]:"",o&&/^https?:\/\//i.test(o))return""!==c?''+l+'':''+l+''}return u=d.indexOf("a"),t=e.match(r),t&&(a="undefined"!=typeof t[2]?t[2]:"",o=n(t[1]),o&&/^(?:https?:\/\/|ftp:\/\/|mailto:|xmpp:)/i.test(o))?(p=!0,h[u]+=1,''):(t=/<\/a>/i.test(e))?(p=!0,h[u]-=1,h[u]<0&&(g[u]=!0),""):(t=e.match(/<(br|hr)\s?\/?>/i))?"<"+t[1].toLowerCase()+">":(t=e.match(/<(\/?)(b|blockquote|code|em|h[1-6]|li|ol(?: start="\d+")?|p|pre|s|sub|sup|strong|ul)>/i),t&&!/<\/ol start="\d+"/i.test(e)?(p=!0,u=d.indexOf(t[2].toLowerCase().split(" ")[0]),"/"===t[1]?h[u]-=1:h[u]+=1,h[u]<0&&(g[u]=!0),"<"+t[1]+t[2].toLowerCase()+">"):s===!0?"":f(e))})}function o(e){var t,n,o;for(a=0;a]*" title="[^"<>]*" target="_blank">',"g"):"ol"===t?//g:RegExp("<"+t+">","g"),r=RegExp("","g"),u===!0?(e=e.replace(n,""),e=e.replace(r,"")):(e=e.replace(n,function(e){return f(e)}),e=e.replace(r,function(e){return f(e)})),e}function n(e){var n;for(n=0;n`\\x00-\\x20]+",o="'[^']*'",i='"[^"]*"',a="(?:"+s+"|"+o+"|"+i+")",c="(?:\\s+"+n+"(?:\\s*=\\s*"+a+")?)",l="<[A-Za-z][A-Za-z0-9\\-]*"+c+"*\\s*\\/?>",u="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",p="|",h="<[?].*?[?]>",f="]*>",d="",m=new RegExp("^(?:"+l+"|"+u+"|"+p+"|"+h+"|"+f+"|"+d+")"),g=new RegExp("^(?:"+l+"|"+u+")");r.exports.HTML_TAG_RE=m,r.exports.HTML_OPEN_CLOSE_TAG_RE=g},{}],4:[function(e,r,t){"use strict";function n(e){return Object.prototype.toString.call(e)}function s(e){return"[object String]"===n(e)}function o(e,r){return x.call(e,r)}function i(e){var r=Array.prototype.slice.call(arguments,1);return r.forEach(function(r){if(r){if("object"!=typeof r)throw new TypeError(r+"must be object");Object.keys(r).forEach(function(t){e[t]=r[t]})}}),e}function a(e,r,t){return[].concat(e.slice(0,r),t,e.slice(r+1))}function c(e){return e>=55296&&57343>=e?!1:e>=64976&&65007>=e?!1:65535===(65535&e)||65534===(65535&e)?!1:e>=0&&8>=e?!1:11===e?!1:e>=14&&31>=e?!1:e>=127&&159>=e?!1:!(e>1114111)}function l(e){if(e>65535){e-=65536;var r=55296+(e>>10),t=56320+(1023&e);return String.fromCharCode(r,t)}return String.fromCharCode(e)}function u(e,r){var t=0;return o(q,r)?q[r]:35===r.charCodeAt(0)&&w.test(r)&&(t="x"===r[1].toLowerCase()?parseInt(r.slice(2),16):parseInt(r.slice(1),10),c(t))?l(t):e}function p(e){return e.indexOf("\\")<0?e:e.replace(y,"$1")}function h(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(A,function(e,r,t){return r?r:u(e,t)})}function f(e){return S[e]}function d(e){return D.test(e)?e.replace(E,f):e}function m(e){return e.replace(F,"\\$&")}function g(e){switch(e){case 9:case 32:return!0}return!1}function _(e){if(e>=8192&&8202>=e)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function k(e){return L.test(e)}function b(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function v(e){return e.trim().replace(/\s+/g," ").toUpperCase()}var x=Object.prototype.hasOwnProperty,y=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,C=/&([a-z#][a-z0-9]{1,31});/gi,A=new RegExp(y.source+"|"+C.source,"gi"),w=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,q=e("./entities"),D=/[&<>"]/,E=/[&<>"]/g,S={"&":"&","<":"<",">":">",'"':"""},F=/[.?*+^$[\]\\(){}|-]/g,L=e("uc.micro/categories/P/regex");t.lib={},t.lib.mdurl=e("mdurl"),t.lib.ucmicro=e("uc.micro"),t.assign=i,t.isString=s,t.has=o,t.unescapeMd=p,t.unescapeAll=h,t.isValidEntityCode=c,t.fromCodePoint=l,t.escapeHtml=d,t.arrayReplaceAt=a,t.isSpace=g,t.isWhiteSpace=_,t.isMdAsciiPunct=b,t.isPunctChar=k,t.escapeRE=m,t.normalizeReference=v},{"./entities":1,mdurl:59,"uc.micro":65,"uc.micro/categories/P/regex":63}],5:[function(e,r,t){"use strict";t.parseLinkLabel=e("./parse_link_label"),t.parseLinkDestination=e("./parse_link_destination"),t.parseLinkTitle=e("./parse_link_title")},{"./parse_link_destination":6,"./parse_link_label":7,"./parse_link_title":8}],6:[function(e,r,t){"use strict";var n=e("../common/utils").isSpace,s=e("../common/utils").unescapeAll;r.exports=function(e,r,t){var o,i,a=0,c=r,l={ok:!1,pos:0,lines:0,str:""};if(60===e.charCodeAt(r)){for(r++;t>r;){if(o=e.charCodeAt(r),10===o||n(o))return l;if(62===o)return l.pos=r+1,l.str=s(e.slice(c+1,r)),l.ok=!0,l;92===o&&t>r+1?r+=2:r++}return l}for(i=0;t>r&&(o=e.charCodeAt(r),32!==o)&&!(32>o||127===o);)if(92===o&&t>r+1)r+=2;else{if(40===o&&(i++,i>1))break;if(41===o&&(i--,0>i))break;r++}return c===r?l:(l.str=s(e.slice(c,r)),l.lines=a,l.pos=r,l.ok=!0,l)}},{"../common/utils":4}],7:[function(e,r,t){"use strict";r.exports=function(e,r,t){var n,s,o,i,a=-1,c=e.posMax,l=e.pos;for(e.pos=r+1,n=1;e.pos=t)return c;if(o=e.charCodeAt(r),34!==o&&39!==o&&40!==o)return c;for(r++,40===o&&(o=41);t>r;){if(s=e.charCodeAt(r),s===o)return c.pos=r+1,c.lines=i,c.str=n(e.slice(a+1,r)),c.ok=!0,c;10===s?i++:92===s&&t>r+1&&(r++,10===e.charCodeAt(r)&&i++),r++}return c}},{"../common/utils":4}],9:[function(e,r,t){"use strict";function n(e){var r=e.trim().toLowerCase();return _.test(r)?!!k.test(r):!0}function s(e){var r=d.parse(e,!0);if(r.hostname&&(!r.protocol||b.indexOf(r.protocol)>=0))try{r.hostname=m.toASCII(r.hostname)}catch(t){}return d.encode(d.format(r))}function o(e){var r=d.parse(e,!0);if(r.hostname&&(!r.protocol||b.indexOf(r.protocol)>=0))try{r.hostname=m.toUnicode(r.hostname)}catch(t){}return d.decode(d.format(r))}function i(e,r){return this instanceof i?(r||a.isString(e)||(r=e||{},e="default"),this.inline=new h,this.block=new p,this.core=new u,this.renderer=new l,this.linkify=new f,this.validateLink=n,this.normalizeLink=s,this.normalizeLinkText=o,this.utils=a,this.helpers=c,this.options={},this.configure(e),void(r&&this.set(r))):new i(e,r)}var a=e("./common/utils"),c=e("./helpers"),l=e("./renderer"),u=e("./parser_core"),p=e("./parser_block"),h=e("./parser_inline"),f=e("linkify-it"),d=e("mdurl"),m=e("punycode"),g={"default":e("./presets/default"),zero:e("./presets/zero"),commonmark:e("./presets/commonmark")},_=/^(vbscript|javascript|file|data):/,k=/^data:image\/(gif|png|jpeg|webp);/,b=["http:","https:","mailto:"];i.prototype.set=function(e){return a.assign(this.options,e),this},i.prototype.configure=function(e){var r,t=this;if(a.isString(e)&&(r=e,e=g[r],!e))throw new Error('Wrong `markdown-it` preset "'+r+'", check name');if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(r){e.components[r].rules&&t[r].ruler.enableOnly(e.components[r].rules),e.components[r].rules2&&t[r].ruler2.enableOnly(e.components[r].rules2)}),this},i.prototype.enable=function(e,r){var t=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(r){t=t.concat(this[r].ruler.enable(e,!0))},this),t=t.concat(this.inline.ruler2.enable(e,!0));var n=e.filter(function(e){return t.indexOf(e)<0});if(n.length&&!r)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+n);return this},i.prototype.disable=function(e,r){var t=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(r){t=t.concat(this[r].ruler.disable(e,!0))},this),t=t.concat(this.inline.ruler2.disable(e,!0));var n=e.filter(function(e){return t.indexOf(e)<0});if(n.length&&!r)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+n);return this},i.prototype.use=function(e){var r=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,r),this},i.prototype.parse=function(e,r){var t=new this.core.State(e,this,r);return this.core.process(t),t.tokens},i.prototype.render=function(e,r){return r=r||{},this.renderer.render(this.parse(e,r),this.options,r)},i.prototype.parseInline=function(e,r){var t=new this.core.State(e,this,r);return t.inlineMode=!0,this.core.process(t),t.tokens},i.prototype.renderInline=function(e,r){return r=r||{},this.renderer.render(this.parseInline(e,r),this.options,r)},r.exports=i},{"./common/utils":4,"./helpers":5,"./parser_block":10,"./parser_core":11,"./parser_inline":12,"./presets/commonmark":13,"./presets/default":14,"./presets/zero":15,"./renderer":16,"linkify-it":54,mdurl:59,punycode:52}],10:[function(e,r,t){"use strict";function n(){this.ruler=new s;for(var e=0;ea&&(e.line=a=e.skipEmptyLines(a),!(a>=t))&&!(e.sCount[a]=l){e.line=t;break}for(s=0;i>s&&!(n=o[s](e,a,t,!1));s++);if(e.tight=!c,e.isEmpty(e.line-1)&&(c=!0),a=e.line,t>a&&e.isEmpty(a)){if(c=!0,a++,t>a&&"list"===e.parentType&&e.isEmpty(a))break;e.line=a}}},n.prototype.parse=function(e,r,t,n){var s;e&&(s=new this.State(e,r,t,n),this.tokenize(s,s.line,s.lineMax))},n.prototype.State=e("./rules_block/state_block"),r.exports=n},{"./ruler":17,"./rules_block/blockquote":18,"./rules_block/code":19,"./rules_block/fence":20,"./rules_block/heading":21,"./rules_block/hr":22,"./rules_block/html_block":23,"./rules_block/lheading":24,"./rules_block/list":25,"./rules_block/paragraph":26,"./rules_block/reference":27,"./rules_block/state_block":28,"./rules_block/table":29}],11:[function(e,r,t){"use strict";function n(){this.ruler=new s;for(var e=0;er;r++)n[r](e)},n.prototype.State=e("./rules_core/state_core"),r.exports=n},{"./ruler":17,"./rules_core/block":30,"./rules_core/inline":31,"./rules_core/linkify":32,"./rules_core/normalize":33,"./rules_core/replacements":34,"./rules_core/smartquotes":35,"./rules_core/state_core":36}],12:[function(e,r,t){"use strict";function n(){var e;for(this.ruler=new s,e=0;et&&(e.level++,r=s[t](e,!0),e.level--,!r);t++);else e.pos=e.posMax;r||e.pos++,a[n]=e.pos},n.prototype.tokenize=function(e){for(var r,t,n=this.ruler.getRules(""),s=n.length,o=e.posMax,i=e.md.options.maxNesting;e.post&&!(r=n[t](e,!1));t++);if(r){if(e.pos>=o)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},n.prototype.parse=function(e,r,t,n){var s,o,i,a=new this.State(e,r,t,n);for(this.tokenize(a),o=this.ruler2.getRules(""),i=o.length,s=0;i>s;s++)o[s](a)},n.prototype.State=e("./rules_inline/state_inline"),r.exports=n},{"./ruler":17,"./rules_inline/autolink":37,"./rules_inline/backticks":38,"./rules_inline/balance_pairs":39,"./rules_inline/emphasis":40,"./rules_inline/entity":41,"./rules_inline/escape":42,"./rules_inline/html_inline":43,"./rules_inline/image":44,"./rules_inline/link":45,"./rules_inline/newline":46,"./rules_inline/state_inline":47,"./rules_inline/strikethrough":48,"./rules_inline/text":49,"./rules_inline/text_collapse":50}],13:[function(e,r,t){"use strict";r.exports={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","text_collapse"]}}}},{}],14:[function(e,r,t){"use strict";r.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}}},{}],15:[function(e,r,t){"use strict";r.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","text_collapse"]}}}},{}],16:[function(e,r,t){"use strict";function n(){this.rules=s({},a)}var s=e("./common/utils").assign,o=e("./common/utils").unescapeAll,i=e("./common/utils").escapeHtml,a={};a.code_inline=function(e,r){return""+i(e[r].content)+""},a.code_block=function(e,r){return"
"+i(e[r].content)+"
\n"},a.fence=function(e,r,t,n,s){var a,c=e[r],l=c.info?o(c.info).trim():"",u="";return l&&(u=l.split(/\s+/g)[0],c.attrJoin("class",t.langPrefix+u)),a=t.highlight?t.highlight(c.content,u)||i(c.content):i(c.content),0===a.indexOf(""+a+"\n"},a.image=function(e,r,t,n,s){var o=e[r];return o.attrs[o.attrIndex("alt")][1]=s.renderInlineAsText(o.children,t,n),s.renderToken(e,r,t)},a.hardbreak=function(e,r,t){return t.xhtmlOut?"
\n":"
\n"},a.softbreak=function(e,r,t){return t.breaks?t.xhtmlOut?"
\n":"
\n":"\n"},a.text=function(e,r){return i(e[r].content)},a.html_block=function(e,r){return e[r].content},a.html_inline=function(e,r){return e[r].content},n.prototype.renderAttrs=function(e){var r,t,n;if(!e.attrs)return"";for(n="",r=0,t=e.attrs.length;t>r;r++)n+=" "+i(e.attrs[r][0])+'="'+i(e.attrs[r][1])+'"';return n},n.prototype.renderToken=function(e,r,t){var n,s="",o=!1,i=e[r];return i.hidden?"":(i.block&&-1!==i.nesting&&r&&e[r-1].hidden&&(s+="\n"),s+=(-1===i.nesting?"\n":">")},n.prototype.renderInline=function(e,r,t){for(var n,s="",o=this.rules,i=0,a=e.length;a>i;i++)n=e[i].type,s+="undefined"!=typeof o[n]?o[n](e,i,r,t,this):this.renderToken(e,i,r);return s},n.prototype.renderInlineAsText=function(e,r,t){for(var n="",s=this.rules,o=0,i=e.length;i>o;o++)"text"===e[o].type?n+=s.text(e,o,r,t,this):"image"===e[o].type&&(n+=this.renderInlineAsText(e[o].children,r,t));return n},n.prototype.render=function(e,r,t){var n,s,o,i="",a=this.rules;for(n=0,s=e.length;s>n;n++)o=e[n].type,i+="inline"===o?this.renderInline(e[n].children,r,t):"undefined"!=typeof a[o]?a[e[n].type](e,n,r,t,this):this.renderToken(e,n,r,t);return i},r.exports=n},{"./common/utils":4}],17:[function(e,r,t){"use strict";function n(){this.__rules__=[],this.__cache__=null}n.prototype.__find__=function(e){for(var r=0;rn){if(r)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[n].enabled=!0,t.push(e)},this),this.__cache__=null,t},n.prototype.enableOnly=function(e,r){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(e){e.enabled=!1}),this.enable(e,r)},n.prototype.disable=function(e,r){Array.isArray(e)||(e=[e]);var t=[];return e.forEach(function(e){var n=this.__find__(e);if(0>n){if(r)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[n].enabled=!1,t.push(e)},this),this.__cache__=null,t},n.prototype.getRules=function(e){return null===this.__cache__&&this.__compile__(),this.__cache__[e]||[]},r.exports=n},{}],18:[function(e,r,t){"use strict";var n=e("../common/utils").isSpace;r.exports=function(e,r,t,s){var o,i,a,c,l,u,p,h,f,d,m,g,_,k,b,v,x=e.bMarks[r]+e.tShift[r],y=e.eMarks[r];if(62!==e.src.charCodeAt(x++))return!1;if(s)return!0;for(32===e.src.charCodeAt(x)&&x++,u=e.blkIndent,e.blkIndent=0,f=d=e.sCount[r]+x-(e.bMarks[r]+e.tShift[r]),l=[e.bMarks[r]],e.bMarks[r]=x;y>x&&(m=e.src.charCodeAt(x),n(m));)9===m?d+=4-d%4:d++,x++;for(i=x>=y,c=[e.sCount[r]],e.sCount[r]=d-f,a=[e.tShift[r]],e.tShift[r]=x-e.bMarks[r],g=e.md.block.ruler.getRules("blockquote"),o=r+1;t>o&&!(e.sCount[o]=y));o++)if(62!==e.src.charCodeAt(x++)){if(i)break;for(v=!1,k=0,b=g.length;b>k;k++)if(g[k](e,o,t,!0)){v=!0;break}if(v)break;l.push(e.bMarks[o]),a.push(e.tShift[o]),c.push(e.sCount[o]),e.sCount[o]=-1}else{for(32===e.src.charCodeAt(x)&&x++,f=d=e.sCount[o]+x-(e.bMarks[o]+e.tShift[o]),l.push(e.bMarks[o]),e.bMarks[o]=x;y>x&&(m=e.src.charCodeAt(x),n(m));)9===m?d+=4-d%4:d++,x++;i=x>=y,c.push(e.sCount[o]),e.sCount[o]=d-f,a.push(e.tShift[o]),e.tShift[o]=x-e.bMarks[o]}for(p=e.parentType,e.parentType="blockquote",_=e.push("blockquote_open","blockquote",1),_.markup=">",_.map=h=[r,0],e.md.block.tokenize(e,r,o),_=e.push("blockquote_close","blockquote",-1),_.markup=">",e.parentType=p,h[1]=e.line,k=0;kn;)if(e.isEmpty(n)){if(i++,i>=2&&"list"===e.parentType)break;n++}else{if(i=0,!(e.sCount[n]-e.blkIndent>=4))break;n++,s=n}return e.line=s,o=e.push("code_block","code",0),o.content=e.getLines(r,s,4+e.blkIndent,!0),o.map=[r,e.line],!0}},{}],20:[function(e,r,t){"use strict";r.exports=function(e,r,t,n){var s,o,i,a,c,l,u,p=!1,h=e.bMarks[r]+e.tShift[r],f=e.eMarks[r];if(h+3>f)return!1;if(s=e.src.charCodeAt(h),126!==s&&96!==s)return!1;if(c=h,h=e.skipChars(h,s),o=h-c,3>o)return!1;if(u=e.src.slice(c,h),i=e.src.slice(h,f),i.indexOf("`")>=0)return!1;if(n)return!0;for(a=r;(a++,!(a>=t))&&(h=c=e.bMarks[a]+e.tShift[a],f=e.eMarks[a],!(f>h&&e.sCount[a]=4||(h=e.skipChars(h,s),o>h-c||(h=e.skipSpaces(h),f>h)))){p=!0;break}return o=e.sCount[r],e.line=a+(p?1:0),l=e.push("fence","code",0),l.info=i,l.content=e.getLines(r+1,a,o,!0),l.markup=u,l.map=[r,e.line],!0}},{}],21:[function(e,r,t){"use strict";var n=e("../common/utils").isSpace;r.exports=function(e,r,t,s){var o,i,a,c,l=e.bMarks[r]+e.tShift[r],u=e.eMarks[r];if(o=e.src.charCodeAt(l),35!==o||l>=u)return!1;for(i=1,o=e.src.charCodeAt(++l);35===o&&u>l&&6>=i;)i++,o=e.src.charCodeAt(++l);return i>6||u>l&&32!==o?!1:s?!0:(u=e.skipSpacesBack(u,l),a=e.skipCharsBack(u,35,l),a>l&&n(e.src.charCodeAt(a-1))&&(u=a),e.line=r+1,c=e.push("heading_open","h"+String(i),1),c.markup="########".slice(0,i),c.map=[r,e.line],c=e.push("inline","",0),c.content=e.src.slice(l,u).trim(),c.map=[r,e.line],c.children=[],c=e.push("heading_close","h"+String(i),-1),c.markup="########".slice(0,i),!0)}},{"../common/utils":4}],22:[function(e,r,t){"use strict";var n=e("../common/utils").isSpace;r.exports=function(e,r,t,s){var o,i,a,c,l=e.bMarks[r]+e.tShift[r],u=e.eMarks[r];if(o=e.src.charCodeAt(l++),42!==o&&45!==o&&95!==o)return!1;for(i=1;u>l;){if(a=e.src.charCodeAt(l++),a!==o&&!n(a))return!1;a===o&&i++}return 3>i?!1:s?!0:(e.line=r+1,c=e.push("hr","hr",0),c.map=[r,e.line],c.markup=Array(i+1).join(String.fromCharCode(o)),!0)}},{"../common/utils":4}],23:[function(e,r,t){"use strict";var n=e("../common/html_blocks"),s=e("../common/html_re").HTML_OPEN_CLOSE_TAG_RE,o=[[/^<(script|pre|style)(?=(\s|>|$))/i,/<\/(script|pre|style)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(s.source+"\\s*$"),/^$/,!1]];r.exports=function(e,r,t,n){var s,i,a,c,l=e.bMarks[r]+e.tShift[r],u=e.eMarks[r];if(!e.md.options.html)return!1;if(60!==e.src.charCodeAt(l))return!1;for(c=e.src.slice(l,u),s=0;si&&!(e.sCount[i]h&&!e.isEmpty(h);h++)if(!(e.sCount[h]-e.blkIndent>3)){if(e.sCount[h]>=e.blkIndent&&(c=e.bMarks[h]+e.tShift[h],l=e.eMarks[h],l>c&&(p=e.src.charCodeAt(c),(45===p||61===p)&&(c=e.skipChars(c,p),c=e.skipSpaces(c),c>=l)))){u=61===p?1:2;break}if(!(e.sCount[h]<0)){for(s=!1,o=0,i=f.length;i>o;o++)if(f[o](e,h,t,!0)){s=!0;break}if(s)break}}return u?(n=e.getLines(r,h,e.blkIndent,!1).trim(),e.line=h+1,a=e.push("heading_open","h"+String(u),1),a.markup=String.fromCharCode(p),a.map=[r,e.line],a=e.push("inline","",0),a.content=n,a.map=[r,e.line-1],a.children=[],a=e.push("heading_close","h"+String(u),-1),a.markup=String.fromCharCode(p),!0):!1}},{}],25:[function(e,r,t){"use strict";function n(e,r){var t,n,s,o;return n=e.bMarks[r]+e.tShift[r],s=e.eMarks[r],t=e.src.charCodeAt(n++),42!==t&&45!==t&&43!==t?-1:s>n&&(o=e.src.charCodeAt(n),!i(o))?-1:n}function s(e,r){var t,n=e.bMarks[r]+e.tShift[r],s=n,o=e.eMarks[r];if(s+1>=o)return-1;if(t=e.src.charCodeAt(s++),48>t||t>57)return-1;for(;;){if(s>=o)return-1;t=e.src.charCodeAt(s++);{if(!(t>=48&&57>=t)){if(41===t||46===t)break;return-1}if(s-n>=10)return-1}}return o>s&&(t=e.src.charCodeAt(s),!i(t))?-1:s}function o(e,r){var t,n,s=e.level+2;for(t=r+2,n=e.tokens.length-2;n>t;t++)e.tokens[t].level===s&&"paragraph_open"===e.tokens[t].type&&(e.tokens[t+2].hidden=!0,e.tokens[t].hidden=!0,t+=2)}var i=e("../common/utils").isSpace;r.exports=function(e,r,t,a){var c,l,u,p,h,f,d,m,g,_,k,b,v,x,y,C,A,w,q,D,E,S,F,L,z,T,R,M,I=!0;if((k=s(e,r))>=0)w=!0;else{if(!((k=n(e,r))>=0))return!1;w=!1}if(A=e.src.charCodeAt(k-1),a)return!0;for(D=e.tokens.length,w?(_=e.bMarks[r]+e.tShift[r],C=Number(e.src.substr(_,k-_-1)),z=e.push("ordered_list_open","ol",1),1!==C&&(z.attrs=[["start",C]])):z=e.push("bullet_list_open","ul",1),z.map=S=[r,0],z.markup=String.fromCharCode(A),c=r,E=!1,L=e.md.block.ruler.getRules("list");t>c;){for(v=k,x=e.eMarks[c],l=u=e.sCount[c]+k-(e.bMarks[r]+e.tShift[r]);x>v&&(b=e.src.charCodeAt(v),i(b));)9===b?u+=4-u%4:u++,v++;if(q=v,y=q>=x?1:u-l,y>4&&(y=1),p=l+y,z=e.push("list_item_open","li",1),z.markup=String.fromCharCode(A),z.map=F=[r,0],f=e.blkIndent,m=e.tight,h=e.tShift[r],d=e.sCount[r],g=e.parentType,e.blkIndent=p,e.tight=!0,e.parentType="list",e.tShift[r]=q-e.bMarks[r],e.sCount[r]=u,q>=x&&e.isEmpty(r+1)?e.line=Math.min(e.line+2,t):e.md.block.tokenize(e,r,t,!0),e.tight&&!E||(I=!1),E=e.line-r>1&&e.isEmpty(e.line-1),e.blkIndent=f,e.tShift[r]=h,e.sCount[r]=d,e.tight=m,e.parentType=g,z=e.push("list_item_close","li",-1),z.markup=String.fromCharCode(A),c=r=e.line,F[1]=c,q=e.bMarks[r],c>=t)break;if(e.isEmpty(c))break;if(e.sCount[c]T;T++)if(L[T](e,c,t,!0)){M=!0;break}if(M)break;if(w){if(k=s(e,c),0>k)break}else if(k=n(e,c),0>k)break;if(A!==e.src.charCodeAt(k-1))break}return z=w?e.push("ordered_list_close","ol",-1):e.push("bullet_list_close","ul",-1),z.markup=String.fromCharCode(A),S[1]=c,e.line=c,I&&o(e,D),!0}},{"../common/utils":4}],26:[function(e,r,t){"use strict";r.exports=function(e,r){for(var t,n,s,o,i,a=r+1,c=e.md.block.ruler.getRules("paragraph"),l=e.lineMax;l>a&&!e.isEmpty(a);a++)if(!(e.sCount[a]-e.blkIndent>3||e.sCount[a]<0)){for(n=!1,s=0,o=c.length;o>s;s++)if(c[s](e,a,l,!0)){n=!0;break}if(n)break}return t=e.getLines(r,a,e.blkIndent,!1).trim(),e.line=a,i=e.push("paragraph_open","p",1),i.map=[r,e.line],i=e.push("inline","",0),i.content=t,i.map=[r,e.line],i.children=[],i=e.push("paragraph_close","p",-1),!0}},{}],27:[function(e,r,t){"use strict";var n=e("../helpers/parse_link_destination"),s=e("../helpers/parse_link_title"),o=e("../common/utils").normalizeReference,i=e("../common/utils").isSpace;r.exports=function(e,r,t,a){var c,l,u,p,h,f,d,m,g,_,k,b,v,x,y,C=0,A=e.bMarks[r]+e.tShift[r],w=e.eMarks[r],q=r+1;if(91!==e.src.charCodeAt(A))return!1;for(;++Aq&&!e.isEmpty(q);q++)if(!(e.sCount[q]-e.blkIndent>3||e.sCount[q]<0)){for(v=!1,f=0,d=x.length;d>f;f++)if(x[f](e,q,p,!0)){v=!0;break}if(v)break}for(b=e.getLines(r,q,e.blkIndent,!1).trim(),w=b.length,A=1;w>A;A++){if(c=b.charCodeAt(A),91===c)return!1;if(93===c){g=A;break}10===c?C++:92===c&&(A++,w>A&&10===b.charCodeAt(A)&&C++)}if(0>g||58!==b.charCodeAt(g+1))return!1;for(A=g+2;w>A;A++)if(c=b.charCodeAt(A),10===c)C++;else if(!i(c))break;if(_=n(b,A,w),!_.ok)return!1;if(h=e.md.normalizeLink(_.str),!e.md.validateLink(h))return!1;for(A=_.pos,C+=_.lines,l=A,u=C,k=A;w>A;A++)if(c=b.charCodeAt(A),10===c)C++;else if(!i(c))break;for(_=s(b,A,w),w>A&&k!==A&&_.ok?(y=_.str,A=_.pos,C+=_.lines):(y="",A=l,C=u);w>A&&(c=b.charCodeAt(A),i(c));)A++;if(w>A&&10!==b.charCodeAt(A)&&y)for(y="",A=l,C=u;w>A&&(c=b.charCodeAt(A),i(c));)A++;return w>A&&10!==b.charCodeAt(A)?!1:(m=o(b.slice(1,g)))?a?!0:("undefined"==typeof e.env.references&&(e.env.references={}),"undefined"==typeof e.env.references[m]&&(e.env.references[m]={title:y,href:h}),e.line=r+C+1,!0):!1}},{"../common/utils":4,"../helpers/parse_link_destination":6,"../helpers/parse_link_title":8}],28:[function(e,r,t){"use strict";function n(e,r,t,n){var s,i,a,c,l,u,p,h;for(this.src=e,this.md=r,this.env=t,this.tokens=n,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.parentType="root",this.ddIndent=-1,this.level=0,this.result="",i=this.src,h=!1,a=c=u=p=0,l=i.length;l>c;c++){if(s=i.charCodeAt(c),!h){if(o(s)){u++,9===s?p+=4-p%4:p++;continue}h=!0}10!==s&&c!==l-1||(10!==s&&c++,this.bMarks.push(a),this.eMarks.push(c),this.tShift.push(u),this.sCount.push(p),h=!1,u=0,p=0,a=c+1)}this.bMarks.push(i.length),this.eMarks.push(i.length),this.tShift.push(0),this.sCount.push(0),this.lineMax=this.bMarks.length-1}var s=e("../token"),o=e("../common/utils").isSpace;n.prototype.push=function(e,r,t){var n=new s(e,r,t);return n.block=!0,0>t&&this.level--,n.level=this.level,t>0&&this.level++,this.tokens.push(n),n},n.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},n.prototype.skipEmptyLines=function(e){for(var r=this.lineMax;r>e&&!(this.bMarks[e]+this.tShift[e]e&&(r=this.src.charCodeAt(e),o(r));e++);return e},n.prototype.skipSpacesBack=function(e,r){if(r>=e)return e;for(;e>r;)if(!o(this.src.charCodeAt(--e)))return e+1;return e},n.prototype.skipChars=function(e,r){for(var t=this.src.length;t>e&&this.src.charCodeAt(e)===r;e++);return e},n.prototype.skipCharsBack=function(e,r,t){if(t>=e)return e;for(;e>t;)if(r!==this.src.charCodeAt(--e))return e+1;return e},n.prototype.getLines=function(e,r,t,n){var s,i,a,c,l,u,p,h=e;if(e>=r)return"";for(u=new Array(r-e),s=0;r>h;h++,s++){for(i=0,p=c=this.bMarks[h],l=r>h+1||n?this.eMarks[h]+1:this.eMarks[h];l>c&&t>i;){if(a=this.src.charCodeAt(c),o(a))9===a?i+=4-i%4:i++;else{if(!(c-pn;)96===r&&o%2===0?(a=!a,c=n):124!==r||o%2!==0||a?92===r?o++:o=0:(t.push(e.substring(i,n)),i=n+1),n++,n===s&&a&&(a=!1,n=c+1),r=e.charCodeAt(n);return t.push(e.substring(i)),t}r.exports=function(e,r,t,o){var i,a,c,l,u,p,h,f,d,m,g,_;if(r+2>t)return!1;if(u=r+1,e.sCount[u]=e.eMarks[u])return!1;if(i=e.src.charCodeAt(c),124!==i&&45!==i&&58!==i)return!1;if(a=n(e,r+1),!/^[-:| ]+$/.test(a))return!1;for(p=a.split("|"),d=[],l=0;ld.length)return!1;if(o)return!0;for(f=e.push("table_open","table",1),f.map=g=[r,0],f=e.push("thead_open","thead",1),f.map=[r,r+1],f=e.push("tr_open","tr",1),f.map=[r,r+1],l=0;lu&&!(e.sCount[u]l;l++)f=e.push("td_open","td",1),d[l]&&(f.attrs=[["style","text-align:"+d[l]]]),f=e.push("inline","",0),f.content=p[l]?p[l].trim():"",f.children=[],f=e.push("td_close","td",-1);f=e.push("tr_close","tr",-1)}return f=e.push("tbody_close","tbody",-1),f=e.push("table_close","table",-1),g[1]=_[1]=u,e.line=u,!0}},{}],30:[function(e,r,t){"use strict";r.exports=function(e){var r;e.inlineMode?(r=new e.Token("inline","",0),r.content=e.src,r.map=[0,1],r.children=[],e.tokens.push(r)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}},{}],31:[function(e,r,t){"use strict";r.exports=function(e){var r,t,n,s=e.tokens;for(t=0,n=s.length;n>t;t++)r=s[t],"inline"===r.type&&e.md.inline.parse(r.content,e.md,e.env,r.children)}},{}],32:[function(e,r,t){"use strict";function n(e){return/^\s]/i.test(e)}function s(e){return/^<\/a\s*>/i.test(e)}var o=e("../common/utils").arrayReplaceAt;r.exports=function(e){var r,t,i,a,c,l,u,p,h,f,d,m,g,_,k,b,v,x=e.tokens;if(e.md.options.linkify)for(t=0,i=x.length;i>t;t++)if("inline"===x[t].type&&e.md.linkify.pretest(x[t].content))for(a=x[t].children,g=0,r=a.length-1;r>=0;r--)if(l=a[r],"link_close"!==l.type){if("html_inline"===l.type&&(n(l.content)&&g>0&&g--,s(l.content)&&g++),!(g>0)&&"text"===l.type&&e.md.linkify.test(l.content)){for(h=l.content,v=e.md.linkify.match(h),u=[],m=l.level,d=0,p=0;pd&&(c=new e.Token("text","",0),c.content=h.slice(d,f),c.level=m,u.push(c)),c=new e.Token("link_open","a",1),c.attrs=[["href",k]],c.level=m++,c.markup="linkify",c.info="auto",u.push(c),c=new e.Token("text","",0),c.content=b,c.level=m,u.push(c),c=new e.Token("link_close","a",-1),c.level=--m,c.markup="linkify",c.info="auto",u.push(c),d=v[p].lastIndex);d=0;r--)t=e[r],"text"===t.type&&(t.content=t.content.replace(c,n))}function o(e){var r,t;for(r=e.length-1;r>=0;r--)t=e[r],"text"===t.type&&i.test(t.content)&&(t.content=t.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])\u2026/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---([^-]|$)/gm,"$1—$2").replace(/(^|\s)--(\s|$)/gm,"$1–$2").replace(/(^|[^-\s])--([^-\s]|$)/gm,"$1–$2"))}var i=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,a=/\((c|tm|r|p)\)/i,c=/\((c|tm|r|p)\)/gi,l={c:"©",r:"®",p:"§",tm:"™"};r.exports=function(e){var r;if(e.md.options.typographer)for(r=e.tokens.length-1;r>=0;r--)"inline"===e.tokens[r].type&&(a.test(e.tokens[r].content)&&s(e.tokens[r].children),i.test(e.tokens[r].content)&&o(e.tokens[r].children))}},{}],35:[function(e,r,t){"use strict";function n(e,r,t){return e.substr(0,r)+t+e.substr(r+1)}function s(e,r){var t,s,c,p,h,f,d,m,g,_,k,b,v,x,y,C,A,w,q,D,E;for(q=[],t=0;t=0&&!(q[A].level<=d);A--);if(q.length=A+1,"text"===s.type){c=s.content,h=0,f=c.length;e:for(;f>h&&(l.lastIndex=h,p=l.exec(c));){if(y=C=!0,h=p.index+1,w="'"===p[0],g=32,p.index-1>=0)g=c.charCodeAt(p.index-1);else for(A=t-1;A>=0;A--)if("text"===e[A].type){g=e[A].content.charCodeAt(e[A].content.length-1);break}if(_=32,f>h)_=c.charCodeAt(h);else for(A=t+1;A=48&&57>=g&&(C=y=!1),y&&C&&(y=!1,C=b),y||C){if(C)for(A=q.length-1;A>=0&&(m=q[A],!(q[A].level=0;r--)"inline"===e.tokens[r].type&&c.test(e.tokens[r].content)&&s(e.tokens[r].children,e)}},{"../common/utils":4}],36:[function(e,r,t){"use strict";function n(e,r,t){this.src=e,this.env=t,this.tokens=[],this.inlineMode=!1,this.md=r}var s=e("../token");n.prototype.Token=s,r.exports=n},{"../token":51}],37:[function(e,r,t){"use strict";var n=/^<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/,s=/^<([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)>/;r.exports=function(e,r){var t,o,i,a,c,l,u=e.pos;return 60!==e.src.charCodeAt(u)?!1:(t=e.src.slice(u),t.indexOf(">")<0?!1:s.test(t)?(o=t.match(s),a=o[0].slice(1,-1),c=e.md.normalizeLink(a),e.md.validateLink(c)?(r||(l=e.push("link_open","a",1),l.attrs=[["href",c]],l.markup="autolink",l.info="auto",l=e.push("text","",0),l.content=e.md.normalizeLinkText(a),l=e.push("link_close","a",-1),l.markup="autolink",l.info="auto"),e.pos+=o[0].length,!0):!1):n.test(t)?(i=t.match(n),a=i[0].slice(1,-1),c=e.md.normalizeLink("mailto:"+a),e.md.validateLink(c)?(r||(l=e.push("link_open","a",1),l.attrs=[["href",c]],l.markup="autolink",l.info="auto",l=e.push("text","",0),l.content=e.md.normalizeLinkText(a),l=e.push("link_close","a",-1),l.markup="autolink",l.info="auto"),e.pos+=i[0].length,!0):!1):!1)}},{}],38:[function(e,r,t){"use strict";r.exports=function(e,r){var t,n,s,o,i,a,c=e.pos,l=e.src.charCodeAt(c);if(96!==l)return!1;for(t=c,c++,n=e.posMax;n>c&&96===e.src.charCodeAt(c);)c++;for(s=e.src.slice(t,c),o=i=c;-1!==(o=e.src.indexOf("`",i));){for(i=o+1;n>i&&96===e.src.charCodeAt(i);)i++;if(i-o===s.length)return r||(a=e.push("code_inline","code",0),a.markup=s,a.content=e.src.slice(c,o).replace(/[ \n]+/g," ").trim()),e.pos=i,!0}return r||(e.pending+=s),e.pos+=s.length,!0}},{}],39:[function(e,r,t){"use strict";r.exports=function(e){var r,t,n,s,o=e.delimiters,i=e.delimiters.length;for(r=0;i>r;r++)if(n=o[r],n.close)for(t=r-n.jump-1;t>=0;){if(s=o[t],s.open&&s.marker===n.marker&&s.end<0&&s.level===n.level){n.jump=r-t,n.open=!1,s.end=r,s.jump=0;break}t-=s.jump+1}}},{}],40:[function(e,r,t){"use strict";r.exports.tokenize=function(e,r){var t,n,s,o=e.pos,i=e.src.charCodeAt(o);if(r)return!1;if(95!==i&&42!==i)return!1;for(n=e.scanDelims(e.pos,42===i),t=0;tr;r++)t=a[r],95!==t.marker&&42!==t.marker||-1!==t.end&&(n=a[t.end],i=c>r+1&&a[r+1].end===t.end-1&&a[r+1].token===t.token+1&&a[t.end-1].token===n.token-1&&a[r+1].marker===t.marker,o=String.fromCharCode(t.marker),s=e.tokens[t.token],s.type=i?"strong_open":"em_open",s.tag=i?"strong":"em",s.nesting=1,s.markup=i?o+o:o,s.content="",s=e.tokens[n.token],s.type=i?"strong_close":"em_close",s.tag=i?"strong":"em",s.nesting=-1,s.markup=i?o+o:o,s.content="",i&&(e.tokens[a[r+1].token].content="",e.tokens[a[t.end-1].token].content="",r++))}},{}],41:[function(e,r,t){"use strict";var n=e("../common/entities"),s=e("../common/utils").has,o=e("../common/utils").isValidEntityCode,i=e("../common/utils").fromCodePoint,a=/^&#((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i,c=/^&([a-z][a-z0-9]{1,31});/i;r.exports=function(e,r){var t,l,u,p=e.pos,h=e.posMax;if(38!==e.src.charCodeAt(p))return!1;if(h>p+1)if(t=e.src.charCodeAt(p+1),35===t){if(u=e.src.slice(p).match(a))return r||(l="x"===u[1][0].toLowerCase()?parseInt(u[1].slice(1),16):parseInt(u[1],10),e.pending+=i(o(l)?l:65533)),e.pos+=u[0].length,!0}else if(u=e.src.slice(p).match(c),u&&s(n,u[1]))return r||(e.pending+=n[u[1]]),e.pos+=u[0].length,!0;return r||(e.pending+="&"),e.pos++,!0}},{"../common/entities":1,"../common/utils":4}],42:[function(e,r,t){"use strict";for(var n=e("../common/utils").isSpace,s=[],o=0;256>o;o++)s.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){s[e.charCodeAt(0)]=1}),r.exports=function(e,r){var t,o=e.pos,i=e.posMax;if(92!==e.src.charCodeAt(o))return!1;if(o++,i>o){if(t=e.src.charCodeAt(o),256>t&&0!==s[t])return r||(e.pending+=e.src[o]),e.pos+=2,!0;if(10===t){for(r||e.push("hardbreak","br",0),o++;i>o&&(t=e.src.charCodeAt(o),n(t));)o++;return e.pos=o,!0}}return r||(e.pending+="\\"),e.pos++,!0}},{"../common/utils":4}],43:[function(e,r,t){"use strict";function n(e){var r=32|e;return r>=97&&122>=r}var s=e("../common/html_re").HTML_TAG_RE;r.exports=function(e,r){var t,o,i,a,c=e.pos;return e.md.options.html?(i=e.posMax,60!==e.src.charCodeAt(c)||c+2>=i?!1:(t=e.src.charCodeAt(c+1),(33===t||63===t||47===t||n(t))&&(o=e.src.slice(c).match(s))?(r||(a=e.push("html_inline","",0),a.content=e.src.slice(c,c+o[0].length)),e.pos+=o[0].length,!0):!1)):!1}},{"../common/html_re":3}],44:[function(e,r,t){"use strict";var n=e("../helpers/parse_link_label"),s=e("../helpers/parse_link_destination"),o=e("../helpers/parse_link_title"),i=e("../common/utils").normalizeReference,a=e("../common/utils").isSpace;r.exports=function(e,r){var t,c,l,u,p,h,f,d,m,g,_,k,b,v="",x=e.pos,y=e.posMax;if(33!==e.src.charCodeAt(e.pos))return!1;if(91!==e.src.charCodeAt(e.pos+1))return!1;if(h=e.pos+2,p=n(e,e.pos+1,!1),0>p)return!1;if(f=p+1,y>f&&40===e.src.charCodeAt(f)){for(f++;y>f&&(c=e.src.charCodeAt(f),a(c)||10===c);f++);if(f>=y)return!1;for(b=f,m=s(e.src,f,e.posMax),m.ok&&(v=e.md.normalizeLink(m.str),e.md.validateLink(v)?f=m.pos:v=""),b=f;y>f&&(c=e.src.charCodeAt(f),a(c)||10===c);f++);if(m=o(e.src,f,e.posMax),y>f&&b!==f&&m.ok)for(g=m.str,f=m.pos;y>f&&(c=e.src.charCodeAt(f),a(c)||10===c);f++);else g="";if(f>=y||41!==e.src.charCodeAt(f))return e.pos=x,!1;f++}else{if("undefined"==typeof e.env.references)return!1;if(y>f&&91===e.src.charCodeAt(f)?(b=f+1,f=n(e,f),f>=0?u=e.src.slice(b,f++):f=p+1):f=p+1,u||(u=e.src.slice(h,p)),d=e.env.references[i(u)],!d)return e.pos=x,!1;v=d.href,g=d.title}return r||(l=e.src.slice(h,p),e.md.inline.parse(l,e.md,e.env,k=[]),_=e.push("image","img",0),_.attrs=t=[["src",v],["alt",""]],_.children=k,_.content=l,g&&t.push(["title",g])),e.pos=f,e.posMax=y,!0}},{"../common/utils":4,"../helpers/parse_link_destination":6,"../helpers/parse_link_label":7,"../helpers/parse_link_title":8}],45:[function(e,r,t){"use strict";var n=e("../helpers/parse_link_label"),s=e("../helpers/parse_link_destination"),o=e("../helpers/parse_link_title"),i=e("../common/utils").normalizeReference,a=e("../common/utils").isSpace;r.exports=function(e,r){var t,c,l,u,p,h,f,d,m,g,_="",k=e.pos,b=e.posMax,v=e.pos;if(91!==e.src.charCodeAt(e.pos))return!1;if(p=e.pos+1,u=n(e,e.pos,!0),0>u)return!1;if(h=u+1,b>h&&40===e.src.charCodeAt(h)){for(h++;b>h&&(c=e.src.charCodeAt(h),a(c)||10===c);h++);if(h>=b)return!1;for(v=h,f=s(e.src,h,e.posMax),f.ok&&(_=e.md.normalizeLink(f.str),e.md.validateLink(_)?h=f.pos:_=""),v=h;b>h&&(c=e.src.charCodeAt(h),a(c)||10===c);h++);if(f=o(e.src,h,e.posMax),b>h&&v!==h&&f.ok)for(m=f.str,h=f.pos;b>h&&(c=e.src.charCodeAt(h),a(c)||10===c);h++);else m="";if(h>=b||41!==e.src.charCodeAt(h))return e.pos=k,!1;h++}else{if("undefined"==typeof e.env.references)return!1;if(b>h&&91===e.src.charCodeAt(h)?(v=h+1,h=n(e,h),h>=0?l=e.src.slice(v,h++):h=u+1):h=u+1,l||(l=e.src.slice(p,u)),d=e.env.references[i(l)],!d)return e.pos=k,!1;_=d.href,m=d.title}return r||(e.pos=p,e.posMax=u,g=e.push("link_open","a",1),g.attrs=t=[["href",_]],m&&t.push(["title",m]),e.md.inline.tokenize(e),g=e.push("link_close","a",-1)),e.pos=h,e.posMax=b,!0}},{"../common/utils":4,"../helpers/parse_link_destination":6,"../helpers/parse_link_label":7,"../helpers/parse_link_title":8}],46:[function(e,r,t){"use strict";r.exports=function(e,r){var t,n,s=e.pos;if(10!==e.src.charCodeAt(s))return!1;for(t=e.pending.length-1,n=e.posMax,r||(t>=0&&32===e.pending.charCodeAt(t)?t>=1&&32===e.pending.charCodeAt(t-1)?(e.pending=e.pending.replace(/ +$/,""),e.push("hardbreak","br",0)):(e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0)):e.push("softbreak","br",0)),s++;n>s&&32===e.src.charCodeAt(s);)s++;return e.pos=s,!0}},{}],47:[function(e,r,t){"use strict";function n(e,r,t,n){this.src=e,this.env=t,this.md=r,this.tokens=n,this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[]}var s=e("../token"),o=e("../common/utils").isWhiteSpace,i=e("../common/utils").isPunctChar,a=e("../common/utils").isMdAsciiPunct;n.prototype.pushPending=function(){var e=new s("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},n.prototype.push=function(e,r,t){this.pending&&this.pushPending();var n=new s(e,r,t);return 0>t&&this.level--,n.level=this.level,t>0&&this.level++,this.pendingLevel=this.level,this.tokens.push(n),n},n.prototype.scanDelims=function(e,r){var t,n,s,c,l,u,p,h,f,d=e,m=!0,g=!0,_=this.posMax,k=this.src.charCodeAt(e);for(t=e>0?this.src.charCodeAt(e-1):32;_>d&&this.src.charCodeAt(d)===k;)d++;return s=d-e,n=_>d?this.src.charCodeAt(d):32,p=a(t)||i(String.fromCharCode(t)),f=a(n)||i(String.fromCharCode(n)),u=o(t),h=o(n),h?m=!1:f&&(u||p||(m=!1)),u?g=!1:p&&(h||f||(g=!1)),r?(c=m,l=g):(c=m&&(!g||p),l=g&&(!m||f)),{can_open:c,can_close:l,length:s}},n.prototype.Token=s,r.exports=n},{"../common/utils":4,"../token":51}],48:[function(e,r,t){"use strict";r.exports.tokenize=function(e,r){var t,n,s,o,i,a=e.pos,c=e.src.charCodeAt(a);if(r)return!1;if(126!==c)return!1;if(n=e.scanDelims(e.pos,!0),o=n.length,i=String.fromCharCode(c),2>o)return!1;for(o%2&&(s=e.push("text","",0),s.content=i,o--),t=0;o>t;t+=2)s=e.push("text","",0),s.content=i+i,e.delimiters.push({marker:c,jump:t,token:e.tokens.length-1,level:e.level,end:-1,open:n.can_open,close:n.can_close});return e.pos+=n.length,!0},r.exports.postProcess=function(e){var r,t,n,s,o,i=[],a=e.delimiters,c=e.delimiters.length;for(r=0;c>r;r++)n=a[r],126===n.marker&&-1!==n.end&&(s=a[n.end],o=e.tokens[n.token],o.type="s_open",o.tag="s",o.nesting=1,o.markup="~~",o.content="",o=e.tokens[s.token],o.type="s_close",o.tag="s",o.nesting=-1,o.markup="~~",o.content="","text"===e.tokens[s.token-1].type&&"~"===e.tokens[s.token-1].content&&i.push(s.token-1));for(;i.length;){for(r=i.pop(),t=r+1;tr;r++)n+=s[r].nesting,s[r].level=n,"text"===s[r].type&&o>r+1&&"text"===s[r+1].type?s[r+1].content=s[r].content+s[r+1].content:(r!==t&&(s[t]=s[r]),t++);r!==t&&(s.length=t)}},{}],51:[function(e,r,t){"use strict";function n(e,r,t){this.type=e,this.tag=r,this.attrs=null,this.map=null,this.nesting=t,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}n.prototype.attrIndex=function(e){var r,t,n;if(!this.attrs)return-1;for(r=this.attrs,t=0,n=r.length;n>t;t++)if(r[t][0]===e)return t;return-1},n.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]},n.prototype.attrSet=function(e,r){var t=this.attrIndex(e),n=[e,r];0>t?this.attrPush(n):this.attrs[t]=n},n.prototype.attrJoin=function(e,r){var t=this.attrIndex(e);0>t?this.attrPush([e,r]):this.attrs[t][1]=this.attrs[t][1]+" "+r},r.exports=n},{}],52:[function(r,t,n){(function(r){!function(s){function o(e){throw new RangeError(R[e])}function i(e,r){for(var t=e.length,n=[];t--;)n[t]=r(e[t]);return n}function a(e,r){var t=e.split("@"),n="";t.length>1&&(n=t[0]+"@",e=t[1]),e=e.replace(T,".");var s=e.split("."),o=i(s,r).join(".");return n+o}function c(e){for(var r,t,n=[],s=0,o=e.length;o>s;)r=e.charCodeAt(s++),r>=55296&&56319>=r&&o>s?(t=e.charCodeAt(s++),56320==(64512&t)?n.push(((1023&r)<<10)+(1023&t)+65536):(n.push(r),s--)):n.push(r);return n}function l(e){return i(e,function(e){var r="";return e>65535&&(e-=65536,r+=B(e>>>10&1023|55296),e=56320|1023&e),r+=B(e)}).join("")}function u(e){return 10>e-48?e-22:26>e-65?e-65:26>e-97?e-97:C}function p(e,r){return e+22+75*(26>e)-((0!=r)<<5)}function h(e,r,t){var n=0;for(e=t?I(e/D):e>>1,e+=I(e/r);e>M*w>>1;n+=C)e=I(e/M);return I(n+(M+1)*e/(e+q))}function f(e){var r,t,n,s,i,a,c,p,f,d,m=[],g=e.length,_=0,k=S,b=E;for(t=e.lastIndexOf(F),0>t&&(t=0),n=0;t>n;++n)e.charCodeAt(n)>=128&&o("not-basic"),m.push(e.charCodeAt(n));for(s=t>0?t+1:0;g>s;){for(i=_,a=1,c=C;s>=g&&o("invalid-input"),p=u(e.charCodeAt(s++)),(p>=C||p>I((y-_)/a))&&o("overflow"),_+=p*a,f=b>=c?A:c>=b+w?w:c-b,!(f>p);c+=C)d=C-f,a>I(y/d)&&o("overflow"),a*=d;r=m.length+1,b=h(_-i,r,0==i),I(_/r)>y-k&&o("overflow"),k+=I(_/r),_%=r,m.splice(_++,0,k)}return l(m)}function d(e){var r,t,n,s,i,a,l,u,f,d,m,g,_,k,b,v=[];for(e=c(e),g=e.length,r=S,t=0,i=E,a=0;g>a;++a)m=e[a],128>m&&v.push(B(m));for(n=s=v.length,s&&v.push(F);g>n;){for(l=y,a=0;g>a;++a)m=e[a],m>=r&&l>m&&(l=m);for(_=n+1,l-r>I((y-t)/_)&&o("overflow"),t+=(l-r)*_,r=l,a=0;g>a;++a)if(m=e[a],r>m&&++t>y&&o("overflow"),m==r){for(u=t,f=C;d=i>=f?A:f>=i+w?w:f-i,!(d>u);f+=C)b=u-d,k=C-d,v.push(B(p(d+b%k,0))),u=I(b/k);v.push(B(p(u,0))),i=h(t,_,n==s),t=0,++n}++t,++r}return v.join("")}function m(e){return a(e,function(e){return L.test(e)?f(e.slice(4).toLowerCase()):e})}function g(e){return a(e,function(e){return z.test(e)?"xn--"+d(e):e})}var _="object"==typeof n&&n&&!n.nodeType&&n,k="object"==typeof t&&t&&!t.nodeType&&t,b="object"==typeof r&&r;b.global!==b&&b.window!==b&&b.self!==b||(s=b);var v,x,y=2147483647,C=36,A=1,w=26,q=38,D=700,E=72,S=128,F="-",L=/^xn--/,z=/[^\x20-\x7E]/,T=/[\x2E\u3002\uFF0E\uFF61]/g,R={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},M=C-A,I=Math.floor,B=String.fromCharCode;if(v={version:"1.3.2",ucs2:{decode:c,encode:l},decode:f,encode:d,toASCII:g,toUnicode:m},"function"==typeof e&&"object"==typeof e.amd&&e.amd)e("punycode",function(){return v});else if(_&&k)if(t.exports==_)k.exports=v;else for(x in v)v.hasOwnProperty(x)&&(_[x]=v[x]);else s.punycode=v}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],53:[function(e,r,t){r.exports={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",amp:"&",AMP:"&",andand:"⩕",And:"⩓",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",apacir:"⩯",ap:"≈",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜", -ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxHd:"╤",boxhD:"╥",boxHD:"╦",boxhu:"┴",boxHu:"╧",boxhU:"╨",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsolb:"⧅",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",capand:"⩄",capbrcup:"⩉",capcap:"⩋",cap:"∩",Cap:"⋒",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"○",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cup:"∪",Cup:"⋓",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"ⅅ",dd:"ⅆ",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"⇁",DownTeeArrow:"↧",DownTee:"⊤",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",edot:"ė",eDot:"≑",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp13:" ",emsp14:" ",emsp:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",ge:"≥",gE:"≧",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅","in":"∈",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺","int":"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}},{}],54:[function(e,r,t){"use strict";function n(e){var r=Array.prototype.slice.call(arguments,1);return r.forEach(function(r){r&&Object.keys(r).forEach(function(t){e[t]=r[t]})}),e}function s(e){return Object.prototype.toString.call(e)}function o(e){return"[object String]"===s(e)}function i(e){return"[object Object]"===s(e)}function a(e){return"[object RegExp]"===s(e)}function c(e){return"[object Function]"===s(e)}function l(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function u(e){return Object.keys(e||{}).reduce(function(e,r){return e||k.hasOwnProperty(r)},!1)}function p(e){e.__index__=-1,e.__text_cache__=""}function h(e){return function(r,t){var n=r.slice(t);return e.test(n)?n.match(e)[0].length:0}}function f(){return function(e,r){r.normalize(e)}}function d(r){function t(e){return e.replace("%TLDS%",u.src_tlds)}function s(e,r){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+r)}var u=r.re=n({},e("./lib/re")),d=r.__tlds__.slice();r.__tlds_replaced__||d.push(v),d.push(u.src_xn),u.src_tlds=d.join("|"),u.email_fuzzy=RegExp(t(u.tpl_email_fuzzy),"i"),u.link_fuzzy=RegExp(t(u.tpl_link_fuzzy),"i"),u.link_no_ip_fuzzy=RegExp(t(u.tpl_link_no_ip_fuzzy),"i"),u.host_fuzzy_test=RegExp(t(u.tpl_host_fuzzy_test),"i");var m=[];r.__compiled__={},Object.keys(r.__schemas__).forEach(function(e){var t=r.__schemas__[e];if(null!==t){var n={validate:null,link:null};return r.__compiled__[e]=n,i(t)?(a(t.validate)?n.validate=h(t.validate):c(t.validate)?n.validate=t.validate:s(e,t),void(c(t.normalize)?n.normalize=t.normalize:t.normalize?s(e,t):n.normalize=f())):o(t)?void m.push(e):void s(e,t)}}),m.forEach(function(e){r.__compiled__[r.__schemas__[e]]&&(r.__compiled__[e].validate=r.__compiled__[r.__schemas__[e]].validate,r.__compiled__[e].normalize=r.__compiled__[r.__schemas__[e]].normalize)}),r.__compiled__[""]={validate:null,normalize:f()};var g=Object.keys(r.__compiled__).filter(function(e){return e.length>0&&r.__compiled__[e]}).map(l).join("|");r.re.schema_test=RegExp("(^|(?!_)(?:>|"+u.src_ZPCc+"))("+g+")","i"),r.re.schema_search=RegExp("(^|(?!_)(?:>|"+u.src_ZPCc+"))("+g+")","ig"),r.re.pretest=RegExp("("+r.re.schema_test.source+")|("+r.re.host_fuzzy_test.source+")|@","i"),p(r)}function m(e,r){var t=e.__index__,n=e.__last_index__,s=e.__text_cache__.slice(t,n);this.schema=e.__schema__.toLowerCase(),this.index=t+r,this.lastIndex=n+r,this.raw=s,this.text=s,this.url=s}function g(e,r){var t=new m(e,r);return e.__compiled__[t.schema].normalize(t,e),t}function _(e,r){return this instanceof _?(r||u(e)&&(r=e,e={}),this.__opts__=n({},k,r),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=n({},b,e),this.__compiled__={},this.__tlds__=x,this.__tlds_replaced__=!1,this.re={},void d(this)):new _(e,r)}var k={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1},b={"http:":{validate:function(e,r,t){var n=e.slice(r);return t.re.http||(t.re.http=new RegExp("^\\/\\/"+t.re.src_auth+t.re.src_host_port_strict+t.re.src_path,"i")),t.re.http.test(n)?n.match(t.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,r,t){var n=e.slice(r);return t.re.no_http||(t.re.no_http=new RegExp("^"+t.re.src_auth+t.re.src_host_port_strict+t.re.src_path,"i")),t.re.no_http.test(n)?r>=3&&":"===e[r-3]?0:n.match(t.re.no_http)[0].length:0}},"mailto:":{validate:function(e,r,t){var n=e.slice(r);return t.re.mailto||(t.re.mailto=new RegExp("^"+t.re.src_email_name+"@"+t.re.src_host_strict,"i")),t.re.mailto.test(n)?n.match(t.re.mailto)[0].length:0}}},v="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",x="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");_.prototype.add=function(e,r){return this.__schemas__[e]=r,d(this),this},_.prototype.set=function(e){return this.__opts__=n(this.__opts__,e),this},_.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var r,t,n,s,o,i,a,c,l;if(this.re.schema_test.test(e))for(a=this.re.schema_search,a.lastIndex=0;null!==(r=a.exec(e));)if(s=this.testSchemaAt(e,r[2],a.lastIndex)){this.__schema__=r[2],this.__index__=r.index+r[1].length,this.__last_index__=r.index+r[0].length+s;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(c=e.search(this.re.host_fuzzy_test),c>=0&&(this.__index__<0||c=0&&null!==(n=e.match(this.re.email_fuzzy))&&(o=n.index+n[1].length,i=n.index+n[0].length,(this.__index__<0||othis.__last_index__)&&(this.__schema__="mailto:",this.__index__=o,this.__last_index__=i))),this.__index__>=0},_.prototype.pretest=function(e){return this.re.pretest.test(e)},_.prototype.testSchemaAt=function(e,r,t){return this.__compiled__[r.toLowerCase()]?this.__compiled__[r.toLowerCase()].validate(e,t,this):0},_.prototype.match=function(e){var r=0,t=[];this.__index__>=0&&this.__text_cache__===e&&(t.push(g(this,r)),r=this.__last_index__);for(var n=r?e.slice(r):e;this.test(n);)t.push(g(this,r)),n=n.slice(this.__last_index__),r+=this.__last_index__;return t.length?t:null},_.prototype.tlds=function(e,r){return e=Array.isArray(e)?e:[e],r?(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(e,r,t){return e!==t[r-1]}).reverse(),d(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,d(this),this)},_.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},r.exports=_},{"./lib/re":55}],55:[function(e,r,t){"use strict";var n=t.src_Any=e("uc.micro/properties/Any/regex").source,s=t.src_Cc=e("uc.micro/categories/Cc/regex").source,o=t.src_Z=e("uc.micro/categories/Z/regex").source,i=t.src_P=e("uc.micro/categories/P/regex").source,a=t.src_ZPCc=[o,i,s].join("|"),c=t.src_ZCc=[o,s].join("|"),l="(?:(?!"+a+")"+n+")",u="(?:(?![0-9]|"+a+")"+n+")",p=t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)";t.src_auth="(?:(?:(?!"+c+").)+@)?";var h=t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",f=t.src_host_terminator="(?=$|"+a+")(?!-|_|:\\d|\\.-|\\.(?!$|"+a+"))",d=t.src_path="(?:[/?#](?:(?!"+c+"|[()[\\]{}.,\"'?!\\-]).|\\[(?:(?!"+c+"|\\]).)*\\]|\\((?:(?!"+c+"|[)]).)*\\)|\\{(?:(?!"+c+'|[}]).)*\\}|\\"(?:(?!'+c+'|["]).)+\\"|\\\'(?:(?!'+c+"|[']).)+\\'|\\'(?="+l+").|\\.{2,3}[a-zA-Z0-9%/]|\\.(?!"+c+"|[.]).|\\-(?!--(?:[^-]|$))(?:-*)|\\,(?!"+c+").|\\!(?!"+c+"|[!]).|\\?(?!"+c+"|[?]).)+|\\/)?",m=t.src_email_name='[\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]+',g=t.src_xn="xn--[a-z0-9\\-]{1,59}",_=t.src_domain_root="(?:"+g+"|"+u+"{1,63})",k=t.src_domain="(?:"+g+"|(?:"+l+")|(?:"+l+"(?:-(?!-)|"+l+"){0,61}"+l+"))",b=t.src_host="(?:"+p+"|(?:(?:(?:"+k+")\\.)*"+_+"))",v=t.tpl_host_fuzzy="(?:"+p+"|(?:(?:(?:"+k+")\\.)+(?:%TLDS%)))",x=t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+k+")\\.)+(?:%TLDS%))";t.src_host_strict=b+f;var y=t.tpl_host_fuzzy_strict=v+f;t.src_host_port_strict=b+h+f;var C=t.tpl_host_port_fuzzy_strict=v+h+f,A=t.tpl_host_port_no_ip_fuzzy_strict=x+h+f;t.tpl_host_fuzzy_test="localhost|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+a+"|$))",t.tpl_email_fuzzy="(^|>|"+c+")("+m+"@"+y+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|]|"+a+"))((?![$+<=>^`|])"+C+d+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|]|"+a+"))((?![$+<=>^`|])"+A+d+")"; +try{if(0<=v.tmpl.tag.tmpl.open.toString().indexOf("__"))return 2}catch(a){}return 1}();this.renderTemplateSource=function(b,e,f,g){g=g||u;f=f||{};if(2>a)throw Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later.");var k=b.data("precompiled");k||(k=b.text()||"",k=v.template(null,"{{ko_with $item.koBindingContext}}"+k+"{{/ko_with}}"),b.data("precompiled",k));b=[e.$data];e=v.extend({koBindingContext:e},f.templateOptions);e=v.tmpl(k,b,e);e.appendTo(g.createElement("div"));v.fragments={};return e};this.createJavaScriptEvaluatorBlock=function(a){return"{{ko_code ((function() { return "+a+" })()) }}"};this.addTemplate=function(a,b){u.write("")};0]*src="[^"<>]*"[^<>]*)\\s?\\/?>',i=RegExp(o,"i");return e=e.replace(/<[^<>]*>?/gi,function(e){var t,o,l,a,u;if(/(^<->|^<-\s|^<3\s)/.test(e))return e;if(t=e.match(i)){var m=t[1];if(o=n(m.match(/src="([^"<>]*)"/i)[1]),l=m.match(/alt="([^"<>]*)"/i),l=l&&"undefined"!=typeof l[1]?l[1]:"",a=m.match(/title="([^"<>]*)"/i),a=a&&"undefined"!=typeof a[1]?a[1]:"",o&&/^https?:\/\//i.test(o))return""!==c?''+l+'':''+l+''}return u=d.indexOf("a"),t=e.match(r),t&&(a="undefined"!=typeof t[2]?t[2]:"",o=n(t[1]),o&&/^(?:https?:\/\/|ftp:\/\/|mailto:|xmpp:)/i.test(o))?(p=!0,h[u]+=1,''):(t=/<\/a>/i.test(e))?(p=!0,h[u]-=1,h[u]<0&&(g[u]=!0),""):(t=e.match(/<(br|hr)\s?\/?>/i))?"<"+t[1].toLowerCase()+">":(t=e.match(/<(\/?)(b|blockquote|code|em|h[1-6]|li|ol(?: start="\d+")?|p|pre|s|sub|sup|strong|ul)>/i),t&&!/<\/ol start="\d+"/i.test(e)?(p=!0,u=d.indexOf(t[2].toLowerCase().split(" ")[0]),"/"===t[1]?h[u]-=1:h[u]+=1,h[u]<0&&(g[u]=!0),"<"+t[1]+t[2].toLowerCase()+">"):s===!0?"":f(e))})}function o(e){var t,n,o;for(a=0;a]*" title="[^"<>]*" target="_blank">',"g"):"ol"===t?//g:RegExp("<"+t+">","g"),r=RegExp("","g"),u===!0?(e=e.replace(n,""),e=e.replace(r,"")):(e=e.replace(n,function(e){return f(e)}),e=e.replace(r,function(e){return f(e)})),e}function n(e){var n;for(n=0;n`\\x00-\\x20]+",o="'[^']*'",i='"[^"]*"',a="(?:"+s+"|"+o+"|"+i+")",c="(?:\\s+"+n+"(?:\\s*=\\s*"+a+")?)",l="<[A-Za-z][A-Za-z0-9\\-]*"+c+"*\\s*\\/?>",u="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",p="|",h="<[?].*?[?]>",f="]*>",d="",m=new RegExp("^(?:"+l+"|"+u+"|"+p+"|"+h+"|"+f+"|"+d+")"),g=new RegExp("^(?:"+l+"|"+u+")");r.exports.HTML_TAG_RE=m,r.exports.HTML_OPEN_CLOSE_TAG_RE=g},{}],4:[function(e,r,t){"use strict";function n(e){return Object.prototype.toString.call(e)}function s(e){return"[object String]"===n(e)}function o(e,r){return x.call(e,r)}function i(e){var r=Array.prototype.slice.call(arguments,1);return r.forEach(function(r){if(r){if("object"!=typeof r)throw new TypeError(r+"must be object");Object.keys(r).forEach(function(t){e[t]=r[t]})}}),e}function a(e,r,t){return[].concat(e.slice(0,r),t,e.slice(r+1))}function c(e){return e>=55296&&57343>=e?!1:e>=64976&&65007>=e?!1:65535===(65535&e)||65534===(65535&e)?!1:e>=0&&8>=e?!1:11===e?!1:e>=14&&31>=e?!1:e>=127&&159>=e?!1:e>1114111?!1:!0}function l(e){if(e>65535){e-=65536;var r=55296+(e>>10),t=56320+(1023&e);return String.fromCharCode(r,t)}return String.fromCharCode(e)}function u(e,r){var t=0;return o(q,r)?q[r]:35===r.charCodeAt(0)&&w.test(r)&&(t="x"===r[1].toLowerCase()?parseInt(r.slice(2),16):parseInt(r.slice(1),10),c(t))?l(t):e}function p(e){return e.indexOf("\\")<0?e:e.replace(y,"$1")}function h(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(A,function(e,r,t){return r?r:u(e,t)})}function f(e){return S[e]}function d(e){return D.test(e)?e.replace(E,f):e}function m(e){return e.replace(F,"\\$&")}function g(e){switch(e){case 9:case 32:return!0}return!1}function _(e){if(e>=8192&&8202>=e)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function k(e){return L.test(e)}function b(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function v(e){return e.trim().replace(/\s+/g," ").toUpperCase()}var x=Object.prototype.hasOwnProperty,y=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,C=/&([a-z#][a-z0-9]{1,31});/gi,A=new RegExp(y.source+"|"+C.source,"gi"),w=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,q=e("./entities"),D=/[&<>"]/,E=/[&<>"]/g,S={"&":"&","<":"<",">":">",'"':"""},F=/[.?*+^$[\]\\(){}|-]/g,L=e("uc.micro/categories/P/regex");t.lib={},t.lib.mdurl=e("mdurl"),t.lib.ucmicro=e("uc.micro"),t.assign=i,t.isString=s,t.has=o,t.unescapeMd=p,t.unescapeAll=h,t.isValidEntityCode=c,t.fromCodePoint=l,t.escapeHtml=d,t.arrayReplaceAt=a,t.isSpace=g,t.isWhiteSpace=_,t.isMdAsciiPunct=b,t.isPunctChar=k,t.escapeRE=m,t.normalizeReference=v},{"./entities":1,mdurl:59,"uc.micro":65,"uc.micro/categories/P/regex":63}],5:[function(e,r,t){"use strict";t.parseLinkLabel=e("./parse_link_label"),t.parseLinkDestination=e("./parse_link_destination"),t.parseLinkTitle=e("./parse_link_title")},{"./parse_link_destination":6,"./parse_link_label":7,"./parse_link_title":8}],6:[function(e,r,t){"use strict";var n=e("../common/utils").isSpace,s=e("../common/utils").unescapeAll;r.exports=function(e,r,t){var o,i,a=0,c=r,l={ok:!1,pos:0,lines:0,str:""};if(60===e.charCodeAt(r)){for(r++;t>r;){if(o=e.charCodeAt(r),10===o||n(o))return l;if(62===o)return l.pos=r+1,l.str=s(e.slice(c+1,r)),l.ok=!0,l;92===o&&t>r+1?r+=2:r++}return l}for(i=0;t>r&&(o=e.charCodeAt(r),32!==o)&&!(32>o||127===o);)if(92===o&&t>r+1)r+=2;else{if(40===o&&(i++,i>1))break;if(41===o&&(i--,0>i))break;r++}return c===r?l:(l.str=s(e.slice(c,r)),l.lines=a,l.pos=r,l.ok=!0,l)}},{"../common/utils":4}],7:[function(e,r,t){"use strict";r.exports=function(e,r,t){var n,s,o,i,a=-1,c=e.posMax,l=e.pos;for(e.pos=r+1,n=1;e.pos=t)return c;if(o=e.charCodeAt(r),34!==o&&39!==o&&40!==o)return c;for(r++,40===o&&(o=41);t>r;){if(s=e.charCodeAt(r),s===o)return c.pos=r+1,c.lines=i,c.str=n(e.slice(a+1,r)),c.ok=!0,c;10===s?i++:92===s&&t>r+1&&(r++,10===e.charCodeAt(r)&&i++),r++}return c}},{"../common/utils":4}],9:[function(e,r,t){"use strict";function n(e){var r=e.trim().toLowerCase();return _.test(r)?k.test(r)?!0:!1:!0}function s(e){var r=d.parse(e,!0);if(r.hostname&&(!r.protocol||b.indexOf(r.protocol)>=0))try{r.hostname=m.toASCII(r.hostname)}catch(t){}return d.encode(d.format(r))}function o(e){var r=d.parse(e,!0);if(r.hostname&&(!r.protocol||b.indexOf(r.protocol)>=0))try{r.hostname=m.toUnicode(r.hostname)}catch(t){}return d.decode(d.format(r))}function i(e,r){return this instanceof i?(r||a.isString(e)||(r=e||{},e="default"),this.inline=new h,this.block=new p,this.core=new u,this.renderer=new l,this.linkify=new f,this.validateLink=n,this.normalizeLink=s,this.normalizeLinkText=o,this.utils=a,this.helpers=c,this.options={},this.configure(e),void(r&&this.set(r))):new i(e,r)}var a=e("./common/utils"),c=e("./helpers"),l=e("./renderer"),u=e("./parser_core"),p=e("./parser_block"),h=e("./parser_inline"),f=e("linkify-it"),d=e("mdurl"),m=e("punycode"),g={"default":e("./presets/default"),zero:e("./presets/zero"),commonmark:e("./presets/commonmark")},_=/^(vbscript|javascript|file|data):/,k=/^data:image\/(gif|png|jpeg|webp);/,b=["http:","https:","mailto:"];i.prototype.set=function(e){return a.assign(this.options,e),this},i.prototype.configure=function(e){var r,t=this;if(a.isString(e)&&(r=e,e=g[r],!e))throw new Error('Wrong `markdown-it` preset "'+r+'", check name');if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(r){e.components[r].rules&&t[r].ruler.enableOnly(e.components[r].rules),e.components[r].rules2&&t[r].ruler2.enableOnly(e.components[r].rules2)}),this},i.prototype.enable=function(e,r){var t=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(r){t=t.concat(this[r].ruler.enable(e,!0))},this),t=t.concat(this.inline.ruler2.enable(e,!0));var n=e.filter(function(e){return t.indexOf(e)<0});if(n.length&&!r)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+n);return this},i.prototype.disable=function(e,r){var t=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(r){t=t.concat(this[r].ruler.disable(e,!0))},this),t=t.concat(this.inline.ruler2.disable(e,!0));var n=e.filter(function(e){return t.indexOf(e)<0});if(n.length&&!r)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+n);return this},i.prototype.use=function(e){var r=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,r),this},i.prototype.parse=function(e,r){var t=new this.core.State(e,this,r);return this.core.process(t),t.tokens},i.prototype.render=function(e,r){return r=r||{},this.renderer.render(this.parse(e,r),this.options,r)},i.prototype.parseInline=function(e,r){var t=new this.core.State(e,this,r);return t.inlineMode=!0,this.core.process(t),t.tokens},i.prototype.renderInline=function(e,r){return r=r||{},this.renderer.render(this.parseInline(e,r),this.options,r)},r.exports=i},{"./common/utils":4,"./helpers":5,"./parser_block":10,"./parser_core":11,"./parser_inline":12,"./presets/commonmark":13,"./presets/default":14,"./presets/zero":15,"./renderer":16,"linkify-it":54,mdurl:59,punycode:52}],10:[function(e,r,t){"use strict";function n(){this.ruler=new s;for(var e=0;ea&&(e.line=a=e.skipEmptyLines(a),!(a>=t))&&!(e.sCount[a]=l){e.line=t;break}for(s=0;i>s&&!(n=o[s](e,a,t,!1));s++);if(e.tight=!c,e.isEmpty(e.line-1)&&(c=!0),a=e.line,t>a&&e.isEmpty(a)){if(c=!0,a++,t>a&&"list"===e.parentType&&e.isEmpty(a))break;e.line=a}}},n.prototype.parse=function(e,r,t,n){var s;return e?(s=new this.State(e,r,t,n),void this.tokenize(s,s.line,s.lineMax)):[]},n.prototype.State=e("./rules_block/state_block"),r.exports=n},{"./ruler":17,"./rules_block/blockquote":18,"./rules_block/code":19,"./rules_block/fence":20,"./rules_block/heading":21,"./rules_block/hr":22,"./rules_block/html_block":23,"./rules_block/lheading":24,"./rules_block/list":25,"./rules_block/paragraph":26,"./rules_block/reference":27,"./rules_block/state_block":28,"./rules_block/table":29}],11:[function(e,r,t){"use strict";function n(){this.ruler=new s;for(var e=0;er;r++)n[r](e)},n.prototype.State=e("./rules_core/state_core"),r.exports=n},{"./ruler":17,"./rules_core/block":30,"./rules_core/inline":31,"./rules_core/linkify":32,"./rules_core/normalize":33,"./rules_core/replacements":34,"./rules_core/smartquotes":35,"./rules_core/state_core":36}],12:[function(e,r,t){"use strict";function n(){var e;for(this.ruler=new s,e=0;et&&(e.level++,r=s[t](e,!0),e.level--,!r);t++);else e.pos=e.posMax;r||e.pos++,a[n]=e.pos},n.prototype.tokenize=function(e){for(var r,t,n=this.ruler.getRules(""),s=n.length,o=e.posMax,i=e.md.options.maxNesting;e.post&&!(r=n[t](e,!1));t++);if(r){if(e.pos>=o)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},n.prototype.parse=function(e,r,t,n){var s,o,i,a=new this.State(e,r,t,n);for(this.tokenize(a),o=this.ruler2.getRules(""),i=o.length,s=0;i>s;s++)o[s](a)},n.prototype.State=e("./rules_inline/state_inline"),r.exports=n},{"./ruler":17,"./rules_inline/autolink":37,"./rules_inline/backticks":38,"./rules_inline/balance_pairs":39,"./rules_inline/emphasis":40,"./rules_inline/entity":41,"./rules_inline/escape":42,"./rules_inline/html_inline":43,"./rules_inline/image":44,"./rules_inline/link":45,"./rules_inline/newline":46,"./rules_inline/state_inline":47,"./rules_inline/strikethrough":48,"./rules_inline/text":49,"./rules_inline/text_collapse":50}],13:[function(e,r,t){"use strict";r.exports={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","text_collapse"]}}}},{}],14:[function(e,r,t){"use strict";r.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}}},{}],15:[function(e,r,t){"use strict";r.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","text_collapse"]}}}},{}],16:[function(e,r,t){"use strict";function n(){this.rules=s({},a)}var s=e("./common/utils").assign,o=e("./common/utils").unescapeAll,i=e("./common/utils").escapeHtml,a={};a.code_inline=function(e,r){return""+i(e[r].content)+""},a.code_block=function(e,r){return"
"+i(e[r].content)+"
\n"},a.fence=function(e,r,t,n,s){var a,c=e[r],l=c.info?o(c.info).trim():"",u="";return l&&(u=l.split(/\s+/g)[0],c.attrJoin("class",t.langPrefix+u)),a=t.highlight?t.highlight(c.content,u)||i(c.content):i(c.content),0===a.indexOf(""+a+"\n"},a.image=function(e,r,t,n,s){var o=e[r];return o.attrs[o.attrIndex("alt")][1]=s.renderInlineAsText(o.children,t,n),s.renderToken(e,r,t)},a.hardbreak=function(e,r,t){return t.xhtmlOut?"
\n":"
\n"},a.softbreak=function(e,r,t){return t.breaks?t.xhtmlOut?"
\n":"
\n":"\n"},a.text=function(e,r){return i(e[r].content)},a.html_block=function(e,r){return e[r].content},a.html_inline=function(e,r){return e[r].content},n.prototype.renderAttrs=function(e){var r,t,n;if(!e.attrs)return"";for(n="",r=0,t=e.attrs.length;t>r;r++)n+=" "+i(e.attrs[r][0])+'="'+i(e.attrs[r][1])+'"';return n},n.prototype.renderToken=function(e,r,t){var n,s="",o=!1,i=e[r];return i.hidden?"":(i.block&&-1!==i.nesting&&r&&e[r-1].hidden&&(s+="\n"),s+=(-1===i.nesting?"\n":">")},n.prototype.renderInline=function(e,r,t){for(var n,s="",o=this.rules,i=0,a=e.length;a>i;i++)n=e[i].type,s+="undefined"!=typeof o[n]?o[n](e,i,r,t,this):this.renderToken(e,i,r);return s},n.prototype.renderInlineAsText=function(e,r,t){for(var n="",s=this.rules,o=0,i=e.length;i>o;o++)"text"===e[o].type?n+=s.text(e,o,r,t,this):"image"===e[o].type&&(n+=this.renderInlineAsText(e[o].children,r,t));return n},n.prototype.render=function(e,r,t){var n,s,o,i="",a=this.rules;for(n=0,s=e.length;s>n;n++)o=e[n].type,i+="inline"===o?this.renderInline(e[n].children,r,t):"undefined"!=typeof a[o]?a[e[n].type](e,n,r,t,this):this.renderToken(e,n,r,t);return i},r.exports=n},{"./common/utils":4}],17:[function(e,r,t){"use strict";function n(){this.__rules__=[],this.__cache__=null}n.prototype.__find__=function(e){for(var r=0;rn){if(r)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[n].enabled=!0,t.push(e)},this),this.__cache__=null,t},n.prototype.enableOnly=function(e,r){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(e){e.enabled=!1}),this.enable(e,r)},n.prototype.disable=function(e,r){Array.isArray(e)||(e=[e]);var t=[];return e.forEach(function(e){var n=this.__find__(e);if(0>n){if(r)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[n].enabled=!1,t.push(e)},this),this.__cache__=null,t},n.prototype.getRules=function(e){return null===this.__cache__&&this.__compile__(),this.__cache__[e]||[]},r.exports=n},{}],18:[function(e,r,t){"use strict";var n=e("../common/utils").isSpace;r.exports=function(e,r,t,s){var o,i,a,c,l,u,p,h,f,d,m,g,_,k,b,v,x=e.bMarks[r]+e.tShift[r],y=e.eMarks[r];if(62!==e.src.charCodeAt(x++))return!1;if(s)return!0;for(32===e.src.charCodeAt(x)&&x++,u=e.blkIndent,e.blkIndent=0,f=d=e.sCount[r]+x-(e.bMarks[r]+e.tShift[r]),l=[e.bMarks[r]],e.bMarks[r]=x;y>x&&(m=e.src.charCodeAt(x),n(m));)9===m?d+=4-d%4:d++,x++;for(i=x>=y,c=[e.sCount[r]],e.sCount[r]=d-f,a=[e.tShift[r]],e.tShift[r]=x-e.bMarks[r],g=e.md.block.ruler.getRules("blockquote"),o=r+1;t>o&&!(e.sCount[o]=y));o++)if(62!==e.src.charCodeAt(x++)){if(i)break;for(v=!1,k=0,b=g.length;b>k;k++)if(g[k](e,o,t,!0)){v=!0;break}if(v)break;l.push(e.bMarks[o]),a.push(e.tShift[o]),c.push(e.sCount[o]),e.sCount[o]=-1}else{for(32===e.src.charCodeAt(x)&&x++,f=d=e.sCount[o]+x-(e.bMarks[o]+e.tShift[o]),l.push(e.bMarks[o]),e.bMarks[o]=x;y>x&&(m=e.src.charCodeAt(x),n(m));)9===m?d+=4-d%4:d++,x++;i=x>=y,c.push(e.sCount[o]),e.sCount[o]=d-f,a.push(e.tShift[o]),e.tShift[o]=x-e.bMarks[o]}for(p=e.parentType,e.parentType="blockquote",_=e.push("blockquote_open","blockquote",1),_.markup=">",_.map=h=[r,0],e.md.block.tokenize(e,r,o),_=e.push("blockquote_close","blockquote",-1),_.markup=">",e.parentType=p,h[1]=e.line,k=0;kn;)if(e.isEmpty(n)){if(i++,i>=2&&"list"===e.parentType)break;n++}else{if(i=0,!(e.sCount[n]-e.blkIndent>=4))break;n++,s=n}return e.line=s,o=e.push("code_block","code",0),o.content=e.getLines(r,s,4+e.blkIndent,!0),o.map=[r,e.line],!0}},{}],20:[function(e,r,t){"use strict";r.exports=function(e,r,t,n){var s,o,i,a,c,l,u,p=!1,h=e.bMarks[r]+e.tShift[r],f=e.eMarks[r];if(h+3>f)return!1;if(s=e.src.charCodeAt(h),126!==s&&96!==s)return!1;if(c=h,h=e.skipChars(h,s),o=h-c,3>o)return!1;if(u=e.src.slice(c,h),i=e.src.slice(h,f),i.indexOf("`")>=0)return!1;if(n)return!0;for(a=r;(a++,!(a>=t))&&(h=c=e.bMarks[a]+e.tShift[a],f=e.eMarks[a],!(f>h&&e.sCount[a]=4||(h=e.skipChars(h,s),o>h-c||(h=e.skipSpaces(h),f>h)))){p=!0;break}return o=e.sCount[r],e.line=a+(p?1:0),l=e.push("fence","code",0),l.info=i,l.content=e.getLines(r+1,a,o,!0),l.markup=u,l.map=[r,e.line],!0}},{}],21:[function(e,r,t){"use strict";var n=e("../common/utils").isSpace;r.exports=function(e,r,t,s){var o,i,a,c,l=e.bMarks[r]+e.tShift[r],u=e.eMarks[r];if(o=e.src.charCodeAt(l),35!==o||l>=u)return!1;for(i=1,o=e.src.charCodeAt(++l);35===o&&u>l&&6>=i;)i++,o=e.src.charCodeAt(++l);return i>6||u>l&&32!==o?!1:s?!0:(u=e.skipSpacesBack(u,l),a=e.skipCharsBack(u,35,l),a>l&&n(e.src.charCodeAt(a-1))&&(u=a),e.line=r+1,c=e.push("heading_open","h"+String(i),1),c.markup="########".slice(0,i),c.map=[r,e.line],c=e.push("inline","",0),c.content=e.src.slice(l,u).trim(),c.map=[r,e.line],c.children=[],c=e.push("heading_close","h"+String(i),-1),c.markup="########".slice(0,i),!0)}},{"../common/utils":4}],22:[function(e,r,t){"use strict";var n=e("../common/utils").isSpace;r.exports=function(e,r,t,s){var o,i,a,c,l=e.bMarks[r]+e.tShift[r],u=e.eMarks[r];if(o=e.src.charCodeAt(l++),42!==o&&45!==o&&95!==o)return!1;for(i=1;u>l;){if(a=e.src.charCodeAt(l++),a!==o&&!n(a))return!1;a===o&&i++}return 3>i?!1:s?!0:(e.line=r+1,c=e.push("hr","hr",0),c.map=[r,e.line],c.markup=Array(i+1).join(String.fromCharCode(o)),!0)}},{"../common/utils":4}],23:[function(e,r,t){"use strict";var n=e("../common/html_blocks"),s=e("../common/html_re").HTML_OPEN_CLOSE_TAG_RE,o=[[/^<(script|pre|style)(?=(\s|>|$))/i,/<\/(script|pre|style)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(s.source+"\\s*$"),/^$/,!1]];r.exports=function(e,r,t,n){var s,i,a,c,l=e.bMarks[r]+e.tShift[r],u=e.eMarks[r];if(!e.md.options.html)return!1;if(60!==e.src.charCodeAt(l))return!1;for(c=e.src.slice(l,u),s=0;si&&!(e.sCount[i]h&&!e.isEmpty(h);h++)if(!(e.sCount[h]-e.blkIndent>3)){if(e.sCount[h]>=e.blkIndent&&(c=e.bMarks[h]+e.tShift[h],l=e.eMarks[h],l>c&&(p=e.src.charCodeAt(c),(45===p||61===p)&&(c=e.skipChars(c,p),c=e.skipSpaces(c),c>=l)))){u=61===p?1:2;break}if(!(e.sCount[h]<0)){for(s=!1,o=0,i=f.length;i>o;o++)if(f[o](e,h,t,!0)){s=!0;break}if(s)break}}return u?(n=e.getLines(r,h,e.blkIndent,!1).trim(),e.line=h+1,a=e.push("heading_open","h"+String(u),1),a.markup=String.fromCharCode(p),a.map=[r,e.line],a=e.push("inline","",0),a.content=n,a.map=[r,e.line-1],a.children=[],a=e.push("heading_close","h"+String(u),-1),a.markup=String.fromCharCode(p),!0):!1}},{}],25:[function(e,r,t){"use strict";function n(e,r){var t,n,s,o;return n=e.bMarks[r]+e.tShift[r],s=e.eMarks[r],t=e.src.charCodeAt(n++),42!==t&&45!==t&&43!==t?-1:s>n&&(o=e.src.charCodeAt(n),!i(o))?-1:n}function s(e,r){var t,n=e.bMarks[r]+e.tShift[r],s=n,o=e.eMarks[r];if(s+1>=o)return-1;if(t=e.src.charCodeAt(s++),48>t||t>57)return-1;for(;;){if(s>=o)return-1;t=e.src.charCodeAt(s++);{if(!(t>=48&&57>=t)){if(41===t||46===t)break;return-1}if(s-n>=10)return-1}}return o>s&&(t=e.src.charCodeAt(s),!i(t))?-1:s}function o(e,r){var t,n,s=e.level+2;for(t=r+2,n=e.tokens.length-2;n>t;t++)e.tokens[t].level===s&&"paragraph_open"===e.tokens[t].type&&(e.tokens[t+2].hidden=!0,e.tokens[t].hidden=!0,t+=2)}var i=e("../common/utils").isSpace;r.exports=function(e,r,t,a){var c,l,u,p,h,f,d,m,g,_,k,b,v,x,y,C,A,w,q,D,E,S,F,L,z,T,R,M,I=!0;if((k=s(e,r))>=0)w=!0;else{if(!((k=n(e,r))>=0))return!1;w=!1}if(A=e.src.charCodeAt(k-1),a)return!0;for(D=e.tokens.length,w?(_=e.bMarks[r]+e.tShift[r],C=Number(e.src.substr(_,k-_-1)),z=e.push("ordered_list_open","ol",1),1!==C&&(z.attrs=[["start",C]])):z=e.push("bullet_list_open","ul",1),z.map=S=[r,0],z.markup=String.fromCharCode(A),c=r,E=!1,L=e.md.block.ruler.getRules("list");t>c;){for(v=k,x=e.eMarks[c],l=u=e.sCount[c]+k-(e.bMarks[r]+e.tShift[r]);x>v&&(b=e.src.charCodeAt(v),i(b));)9===b?u+=4-u%4:u++,v++;if(q=v,y=q>=x?1:u-l,y>4&&(y=1),p=l+y,z=e.push("list_item_open","li",1),z.markup=String.fromCharCode(A),z.map=F=[r,0],f=e.blkIndent,m=e.tight,h=e.tShift[r],d=e.sCount[r],g=e.parentType,e.blkIndent=p,e.tight=!0,e.parentType="list",e.tShift[r]=q-e.bMarks[r],e.sCount[r]=u,q>=x&&e.isEmpty(r+1)?e.line=Math.min(e.line+2,t):e.md.block.tokenize(e,r,t,!0),(!e.tight||E)&&(I=!1),E=e.line-r>1&&e.isEmpty(e.line-1),e.blkIndent=f,e.tShift[r]=h,e.sCount[r]=d,e.tight=m,e.parentType=g,z=e.push("list_item_close","li",-1),z.markup=String.fromCharCode(A),c=r=e.line,F[1]=c,q=e.bMarks[r],c>=t)break;if(e.isEmpty(c))break;if(e.sCount[c]T;T++)if(L[T](e,c,t,!0)){M=!0;break}if(M)break;if(w){if(k=s(e,c),0>k)break}else if(k=n(e,c),0>k)break;if(A!==e.src.charCodeAt(k-1))break}return z=w?e.push("ordered_list_close","ol",-1):e.push("bullet_list_close","ul",-1),z.markup=String.fromCharCode(A),S[1]=c,e.line=c,I&&o(e,D),!0}},{"../common/utils":4}],26:[function(e,r,t){"use strict";r.exports=function(e,r){for(var t,n,s,o,i,a=r+1,c=e.md.block.ruler.getRules("paragraph"),l=e.lineMax;l>a&&!e.isEmpty(a);a++)if(!(e.sCount[a]-e.blkIndent>3||e.sCount[a]<0)){for(n=!1,s=0,o=c.length;o>s;s++)if(c[s](e,a,l,!0)){n=!0;break}if(n)break}return t=e.getLines(r,a,e.blkIndent,!1).trim(),e.line=a,i=e.push("paragraph_open","p",1),i.map=[r,e.line],i=e.push("inline","",0),i.content=t,i.map=[r,e.line],i.children=[],i=e.push("paragraph_close","p",-1),!0}},{}],27:[function(e,r,t){"use strict";var n=e("../helpers/parse_link_destination"),s=e("../helpers/parse_link_title"),o=e("../common/utils").normalizeReference,i=e("../common/utils").isSpace;r.exports=function(e,r,t,a){var c,l,u,p,h,f,d,m,g,_,k,b,v,x,y,C=0,A=e.bMarks[r]+e.tShift[r],w=e.eMarks[r],q=r+1;if(91!==e.src.charCodeAt(A))return!1;for(;++Aq&&!e.isEmpty(q);q++)if(!(e.sCount[q]-e.blkIndent>3||e.sCount[q]<0)){for(v=!1,f=0,d=x.length;d>f;f++)if(x[f](e,q,p,!0)){v=!0;break}if(v)break}for(b=e.getLines(r,q,e.blkIndent,!1).trim(),w=b.length,A=1;w>A;A++){if(c=b.charCodeAt(A),91===c)return!1;if(93===c){g=A;break}10===c?C++:92===c&&(A++,w>A&&10===b.charCodeAt(A)&&C++)}if(0>g||58!==b.charCodeAt(g+1))return!1;for(A=g+2;w>A;A++)if(c=b.charCodeAt(A),10===c)C++;else if(!i(c))break;if(_=n(b,A,w),!_.ok)return!1;if(h=e.md.normalizeLink(_.str),!e.md.validateLink(h))return!1;for(A=_.pos,C+=_.lines,l=A,u=C,k=A;w>A;A++)if(c=b.charCodeAt(A),10===c)C++;else if(!i(c))break;for(_=s(b,A,w),w>A&&k!==A&&_.ok?(y=_.str,A=_.pos,C+=_.lines):(y="",A=l,C=u);w>A&&(c=b.charCodeAt(A),i(c));)A++;if(w>A&&10!==b.charCodeAt(A)&&y)for(y="",A=l,C=u;w>A&&(c=b.charCodeAt(A),i(c));)A++;return w>A&&10!==b.charCodeAt(A)?!1:(m=o(b.slice(1,g)))?a?!0:("undefined"==typeof e.env.references&&(e.env.references={}),"undefined"==typeof e.env.references[m]&&(e.env.references[m]={title:y,href:h}),e.line=r+C+1,!0):!1}},{"../common/utils":4,"../helpers/parse_link_destination":6,"../helpers/parse_link_title":8}],28:[function(e,r,t){"use strict";function n(e,r,t,n){var s,i,a,c,l,u,p,h;for(this.src=e,this.md=r,this.env=t,this.tokens=n,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.parentType="root",this.ddIndent=-1,this.level=0,this.result="",i=this.src,h=!1,a=c=u=p=0,l=i.length;l>c;c++){if(s=i.charCodeAt(c),!h){if(o(s)){u++,9===s?p+=4-p%4:p++;continue}h=!0}(10===s||c===l-1)&&(10!==s&&c++,this.bMarks.push(a),this.eMarks.push(c),this.tShift.push(u),this.sCount.push(p),h=!1,u=0,p=0,a=c+1)}this.bMarks.push(i.length),this.eMarks.push(i.length),this.tShift.push(0),this.sCount.push(0),this.lineMax=this.bMarks.length-1}var s=e("../token"),o=e("../common/utils").isSpace;n.prototype.push=function(e,r,t){var n=new s(e,r,t);return n.block=!0,0>t&&this.level--,n.level=this.level,t>0&&this.level++,this.tokens.push(n),n},n.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},n.prototype.skipEmptyLines=function(e){for(var r=this.lineMax;r>e&&!(this.bMarks[e]+this.tShift[e]e&&(r=this.src.charCodeAt(e),o(r));e++);return e},n.prototype.skipSpacesBack=function(e,r){if(r>=e)return e;for(;e>r;)if(!o(this.src.charCodeAt(--e)))return e+1;return e},n.prototype.skipChars=function(e,r){for(var t=this.src.length;t>e&&this.src.charCodeAt(e)===r;e++);return e},n.prototype.skipCharsBack=function(e,r,t){if(t>=e)return e;for(;e>t;)if(r!==this.src.charCodeAt(--e))return e+1;return e},n.prototype.getLines=function(e,r,t,n){var s,i,a,c,l,u,p,h=e;if(e>=r)return"";for(u=new Array(r-e),s=0;r>h;h++,s++){for(i=0,p=c=this.bMarks[h],l=r>h+1||n?this.eMarks[h]+1:this.eMarks[h];l>c&&t>i;){if(a=this.src.charCodeAt(c),o(a))9===a?i+=4-i%4:i++;else{if(!(c-pn;)96===r&&o%2===0?(a=!a,c=n):124!==r||o%2!==0||a?92===r?o++:o=0:(t.push(e.substring(i,n)),i=n+1),n++,n===s&&a&&(a=!1,n=c+1),r=e.charCodeAt(n);return t.push(e.substring(i)),t}r.exports=function(e,r,t,o){var i,a,c,l,u,p,h,f,d,m,g,_;if(r+2>t)return!1;if(u=r+1,e.sCount[u]=e.eMarks[u])return!1;if(i=e.src.charCodeAt(c),124!==i&&45!==i&&58!==i)return!1;if(a=n(e,r+1),!/^[-:| ]+$/.test(a))return!1;for(p=a.split("|"),d=[],l=0;ld.length)return!1;if(o)return!0;for(f=e.push("table_open","table",1),f.map=g=[r,0],f=e.push("thead_open","thead",1),f.map=[r,r+1],f=e.push("tr_open","tr",1),f.map=[r,r+1],l=0;lu&&!(e.sCount[u]l;l++)f=e.push("td_open","td",1),d[l]&&(f.attrs=[["style","text-align:"+d[l]]]),f=e.push("inline","",0),f.content=p[l]?p[l].trim():"",f.children=[],f=e.push("td_close","td",-1);f=e.push("tr_close","tr",-1)}return f=e.push("tbody_close","tbody",-1),f=e.push("table_close","table",-1),g[1]=_[1]=u,e.line=u,!0}},{}],30:[function(e,r,t){"use strict";r.exports=function(e){var r;e.inlineMode?(r=new e.Token("inline","",0),r.content=e.src,r.map=[0,1],r.children=[],e.tokens.push(r)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}},{}],31:[function(e,r,t){"use strict";r.exports=function(e){var r,t,n,s=e.tokens;for(t=0,n=s.length;n>t;t++)r=s[t],"inline"===r.type&&e.md.inline.parse(r.content,e.md,e.env,r.children)}},{}],32:[function(e,r,t){"use strict";function n(e){return/^\s]/i.test(e)}function s(e){return/^<\/a\s*>/i.test(e)}var o=e("../common/utils").arrayReplaceAt;r.exports=function(e){var r,t,i,a,c,l,u,p,h,f,d,m,g,_,k,b,v,x=e.tokens;if(e.md.options.linkify)for(t=0,i=x.length;i>t;t++)if("inline"===x[t].type&&e.md.linkify.pretest(x[t].content))for(a=x[t].children,g=0,r=a.length-1;r>=0;r--)if(l=a[r],"link_close"!==l.type){if("html_inline"===l.type&&(n(l.content)&&g>0&&g--,s(l.content)&&g++),!(g>0)&&"text"===l.type&&e.md.linkify.test(l.content)){for(h=l.content,v=e.md.linkify.match(h),u=[],m=l.level,d=0,p=0;pd&&(c=new e.Token("text","",0),c.content=h.slice(d,f),c.level=m,u.push(c)),c=new e.Token("link_open","a",1),c.attrs=[["href",k]],c.level=m++,c.markup="linkify",c.info="auto",u.push(c),c=new e.Token("text","",0),c.content=b,c.level=m,u.push(c),c=new e.Token("link_close","a",-1),c.level=--m,c.markup="linkify",c.info="auto",u.push(c),d=v[p].lastIndex);d=0;r--)t=e[r],"text"===t.type&&(t.content=t.content.replace(c,n))}function o(e){var r,t;for(r=e.length-1;r>=0;r--)t=e[r],"text"===t.type&&i.test(t.content)&&(t.content=t.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])\u2026/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---([^-]|$)/gm,"$1—$2").replace(/(^|\s)--(\s|$)/gm,"$1–$2").replace(/(^|[^-\s])--([^-\s]|$)/gm,"$1–$2"))}var i=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,a=/\((c|tm|r|p)\)/i,c=/\((c|tm|r|p)\)/gi,l={c:"©",r:"®",p:"§",tm:"™"};r.exports=function(e){var r;if(e.md.options.typographer)for(r=e.tokens.length-1;r>=0;r--)"inline"===e.tokens[r].type&&(a.test(e.tokens[r].content)&&s(e.tokens[r].children),i.test(e.tokens[r].content)&&o(e.tokens[r].children))}},{}],35:[function(e,r,t){"use strict";function n(e,r,t){return e.substr(0,r)+t+e.substr(r+1)}function s(e,r){var t,s,c,p,h,f,d,m,g,_,k,b,v,x,y,C,A,w,q,D,E;for(q=[],t=0;t=0&&!(q[A].level<=d);A--);if(q.length=A+1,"text"===s.type){c=s.content,h=0,f=c.length;e:for(;f>h&&(l.lastIndex=h,p=l.exec(c));){if(y=C=!0,h=p.index+1,w="'"===p[0],g=32,p.index-1>=0)g=c.charCodeAt(p.index-1);else for(A=t-1;A>=0;A--)if("text"===e[A].type){g=e[A].content.charCodeAt(e[A].content.length-1);break}if(_=32,f>h)_=c.charCodeAt(h);else for(A=t+1;A=48&&57>=g&&(C=y=!1),y&&C&&(y=!1,C=b),y||C){if(C)for(A=q.length-1;A>=0&&(m=q[A],!(q[A].level=0;r--)"inline"===e.tokens[r].type&&c.test(e.tokens[r].content)&&s(e.tokens[r].children,e)}},{"../common/utils":4}],36:[function(e,r,t){"use strict";function n(e,r,t){this.src=e,this.env=t,this.tokens=[],this.inlineMode=!1,this.md=r}var s=e("../token");n.prototype.Token=s,r.exports=n},{"../token":51}],37:[function(e,r,t){"use strict";var n=/^<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/,s=/^<([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)>/;r.exports=function(e,r){var t,o,i,a,c,l,u=e.pos;return 60!==e.src.charCodeAt(u)?!1:(t=e.src.slice(u),t.indexOf(">")<0?!1:s.test(t)?(o=t.match(s),a=o[0].slice(1,-1),c=e.md.normalizeLink(a),e.md.validateLink(c)?(r||(l=e.push("link_open","a",1),l.attrs=[["href",c]],l.markup="autolink",l.info="auto",l=e.push("text","",0),l.content=e.md.normalizeLinkText(a),l=e.push("link_close","a",-1),l.markup="autolink",l.info="auto"),e.pos+=o[0].length,!0):!1):n.test(t)?(i=t.match(n),a=i[0].slice(1,-1),c=e.md.normalizeLink("mailto:"+a),e.md.validateLink(c)?(r||(l=e.push("link_open","a",1),l.attrs=[["href",c]],l.markup="autolink",l.info="auto",l=e.push("text","",0),l.content=e.md.normalizeLinkText(a),l=e.push("link_close","a",-1),l.markup="autolink",l.info="auto"),e.pos+=i[0].length,!0):!1):!1)}},{}],38:[function(e,r,t){"use strict";r.exports=function(e,r){var t,n,s,o,i,a,c=e.pos,l=e.src.charCodeAt(c);if(96!==l)return!1;for(t=c,c++,n=e.posMax;n>c&&96===e.src.charCodeAt(c);)c++;for(s=e.src.slice(t,c),o=i=c;-1!==(o=e.src.indexOf("`",i));){for(i=o+1;n>i&&96===e.src.charCodeAt(i);)i++;if(i-o===s.length)return r||(a=e.push("code_inline","code",0),a.markup=s,a.content=e.src.slice(c,o).replace(/[ \n]+/g," ").trim()),e.pos=i,!0}return r||(e.pending+=s),e.pos+=s.length,!0}},{}],39:[function(e,r,t){"use strict";r.exports=function(e){var r,t,n,s,o=e.delimiters,i=e.delimiters.length;for(r=0;i>r;r++)if(n=o[r],n.close)for(t=r-n.jump-1;t>=0;){if(s=o[t],s.open&&s.marker===n.marker&&s.end<0&&s.level===n.level){n.jump=r-t,n.open=!1,s.end=r,s.jump=0;break}t-=s.jump+1}}},{}],40:[function(e,r,t){"use strict";r.exports.tokenize=function(e,r){var t,n,s,o=e.pos,i=e.src.charCodeAt(o);if(r)return!1;if(95!==i&&42!==i)return!1;for(n=e.scanDelims(e.pos,42===i),t=0;tr;r++)t=a[r],(95===t.marker||42===t.marker)&&-1!==t.end&&(n=a[t.end],i=c>r+1&&a[r+1].end===t.end-1&&a[r+1].token===t.token+1&&a[t.end-1].token===n.token-1&&a[r+1].marker===t.marker,o=String.fromCharCode(t.marker),s=e.tokens[t.token],s.type=i?"strong_open":"em_open",s.tag=i?"strong":"em",s.nesting=1,s.markup=i?o+o:o,s.content="",s=e.tokens[n.token],s.type=i?"strong_close":"em_close",s.tag=i?"strong":"em",s.nesting=-1,s.markup=i?o+o:o,s.content="",i&&(e.tokens[a[r+1].token].content="",e.tokens[a[t.end-1].token].content="",r++))}},{}],41:[function(e,r,t){"use strict";var n=e("../common/entities"),s=e("../common/utils").has,o=e("../common/utils").isValidEntityCode,i=e("../common/utils").fromCodePoint,a=/^&#((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i,c=/^&([a-z][a-z0-9]{1,31});/i;r.exports=function(e,r){var t,l,u,p=e.pos,h=e.posMax;if(38!==e.src.charCodeAt(p))return!1;if(h>p+1)if(t=e.src.charCodeAt(p+1),35===t){if(u=e.src.slice(p).match(a))return r||(l="x"===u[1][0].toLowerCase()?parseInt(u[1].slice(1),16):parseInt(u[1],10),e.pending+=i(o(l)?l:65533)),e.pos+=u[0].length,!0}else if(u=e.src.slice(p).match(c),u&&s(n,u[1]))return r||(e.pending+=n[u[1]]),e.pos+=u[0].length,!0;return r||(e.pending+="&"),e.pos++,!0}},{"../common/entities":1,"../common/utils":4}],42:[function(e,r,t){"use strict";for(var n=e("../common/utils").isSpace,s=[],o=0;256>o;o++)s.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){s[e.charCodeAt(0)]=1}),r.exports=function(e,r){var t,o=e.pos,i=e.posMax;if(92!==e.src.charCodeAt(o))return!1;if(o++,i>o){if(t=e.src.charCodeAt(o),256>t&&0!==s[t])return r||(e.pending+=e.src[o]),e.pos+=2,!0;if(10===t){for(r||e.push("hardbreak","br",0),o++;i>o&&(t=e.src.charCodeAt(o),n(t));)o++;return e.pos=o,!0}}return r||(e.pending+="\\"),e.pos++,!0}},{"../common/utils":4}],43:[function(e,r,t){"use strict";function n(e){var r=32|e;return r>=97&&122>=r}var s=e("../common/html_re").HTML_TAG_RE;r.exports=function(e,r){var t,o,i,a,c=e.pos;return e.md.options.html?(i=e.posMax,60!==e.src.charCodeAt(c)||c+2>=i?!1:(t=e.src.charCodeAt(c+1),(33===t||63===t||47===t||n(t))&&(o=e.src.slice(c).match(s))?(r||(a=e.push("html_inline","",0),a.content=e.src.slice(c,c+o[0].length)),e.pos+=o[0].length,!0):!1)):!1}},{"../common/html_re":3}],44:[function(e,r,t){"use strict";var n=e("../helpers/parse_link_label"),s=e("../helpers/parse_link_destination"),o=e("../helpers/parse_link_title"),i=e("../common/utils").normalizeReference,a=e("../common/utils").isSpace;r.exports=function(e,r){var t,c,l,u,p,h,f,d,m,g,_,k,b,v="",x=e.pos,y=e.posMax;if(33!==e.src.charCodeAt(e.pos))return!1;if(91!==e.src.charCodeAt(e.pos+1))return!1;if(h=e.pos+2,p=n(e,e.pos+1,!1),0>p)return!1;if(f=p+1,y>f&&40===e.src.charCodeAt(f)){for(f++;y>f&&(c=e.src.charCodeAt(f),a(c)||10===c);f++);if(f>=y)return!1;for(b=f,m=s(e.src,f,e.posMax),m.ok&&(v=e.md.normalizeLink(m.str),e.md.validateLink(v)?f=m.pos:v=""),b=f;y>f&&(c=e.src.charCodeAt(f),a(c)||10===c);f++);if(m=o(e.src,f,e.posMax),y>f&&b!==f&&m.ok)for(g=m.str,f=m.pos;y>f&&(c=e.src.charCodeAt(f),a(c)||10===c);f++);else g="";if(f>=y||41!==e.src.charCodeAt(f))return e.pos=x,!1;f++}else{if("undefined"==typeof e.env.references)return!1;if(y>f&&91===e.src.charCodeAt(f)?(b=f+1,f=n(e,f),f>=0?u=e.src.slice(b,f++):f=p+1):f=p+1,u||(u=e.src.slice(h,p)),d=e.env.references[i(u)],!d)return e.pos=x,!1;v=d.href,g=d.title}return r||(l=e.src.slice(h,p),e.md.inline.parse(l,e.md,e.env,k=[]),_=e.push("image","img",0),_.attrs=t=[["src",v],["alt",""]],_.children=k,_.content=l,g&&t.push(["title",g])),e.pos=f,e.posMax=y,!0}},{"../common/utils":4,"../helpers/parse_link_destination":6,"../helpers/parse_link_label":7,"../helpers/parse_link_title":8}],45:[function(e,r,t){"use strict";var n=e("../helpers/parse_link_label"),s=e("../helpers/parse_link_destination"),o=e("../helpers/parse_link_title"),i=e("../common/utils").normalizeReference,a=e("../common/utils").isSpace;r.exports=function(e,r){var t,c,l,u,p,h,f,d,m,g,_="",k=e.pos,b=e.posMax,v=e.pos;if(91!==e.src.charCodeAt(e.pos))return!1;if(p=e.pos+1,u=n(e,e.pos,!0),0>u)return!1;if(h=u+1,b>h&&40===e.src.charCodeAt(h)){for(h++;b>h&&(c=e.src.charCodeAt(h),a(c)||10===c);h++);if(h>=b)return!1;for(v=h,f=s(e.src,h,e.posMax),f.ok&&(_=e.md.normalizeLink(f.str),e.md.validateLink(_)?h=f.pos:_=""),v=h;b>h&&(c=e.src.charCodeAt(h),a(c)||10===c);h++);if(f=o(e.src,h,e.posMax),b>h&&v!==h&&f.ok)for(m=f.str,h=f.pos;b>h&&(c=e.src.charCodeAt(h),a(c)||10===c);h++);else m="";if(h>=b||41!==e.src.charCodeAt(h))return e.pos=k,!1;h++}else{if("undefined"==typeof e.env.references)return!1;if(b>h&&91===e.src.charCodeAt(h)?(v=h+1,h=n(e,h),h>=0?l=e.src.slice(v,h++):h=u+1):h=u+1,l||(l=e.src.slice(p,u)),d=e.env.references[i(l)],!d)return e.pos=k,!1;_=d.href,m=d.title}return r||(e.pos=p,e.posMax=u,g=e.push("link_open","a",1),g.attrs=t=[["href",_]],m&&t.push(["title",m]),e.md.inline.tokenize(e),g=e.push("link_close","a",-1)),e.pos=h,e.posMax=b,!0}},{"../common/utils":4,"../helpers/parse_link_destination":6,"../helpers/parse_link_label":7,"../helpers/parse_link_title":8}],46:[function(e,r,t){"use strict";r.exports=function(e,r){var t,n,s=e.pos;if(10!==e.src.charCodeAt(s))return!1;for(t=e.pending.length-1,n=e.posMax,r||(t>=0&&32===e.pending.charCodeAt(t)?t>=1&&32===e.pending.charCodeAt(t-1)?(e.pending=e.pending.replace(/ +$/,""),e.push("hardbreak","br",0)):(e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0)):e.push("softbreak","br",0)),s++;n>s&&32===e.src.charCodeAt(s);)s++;return e.pos=s,!0}},{}],47:[function(e,r,t){"use strict";function n(e,r,t,n){this.src=e,this.env=t,this.md=r,this.tokens=n,this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[]}var s=e("../token"),o=e("../common/utils").isWhiteSpace,i=e("../common/utils").isPunctChar,a=e("../common/utils").isMdAsciiPunct;n.prototype.pushPending=function(){var e=new s("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},n.prototype.push=function(e,r,t){this.pending&&this.pushPending();var n=new s(e,r,t);return 0>t&&this.level--,n.level=this.level,t>0&&this.level++,this.pendingLevel=this.level,this.tokens.push(n),n},n.prototype.scanDelims=function(e,r){var t,n,s,c,l,u,p,h,f,d=e,m=!0,g=!0,_=this.posMax,k=this.src.charCodeAt(e);for(t=e>0?this.src.charCodeAt(e-1):32;_>d&&this.src.charCodeAt(d)===k;)d++;return s=d-e,n=_>d?this.src.charCodeAt(d):32,p=a(t)||i(String.fromCharCode(t)),f=a(n)||i(String.fromCharCode(n)),u=o(t),h=o(n),h?m=!1:f&&(u||p||(m=!1)),u?g=!1:p&&(h||f||(g=!1)),r?(c=m,l=g):(c=m&&(!g||p),l=g&&(!m||f)),{can_open:c,can_close:l,length:s}},n.prototype.Token=s,r.exports=n},{"../common/utils":4,"../token":51}],48:[function(e,r,t){"use strict";r.exports.tokenize=function(e,r){var t,n,s,o,i,a=e.pos,c=e.src.charCodeAt(a);if(r)return!1;if(126!==c)return!1;if(n=e.scanDelims(e.pos,!0),o=n.length,i=String.fromCharCode(c),2>o)return!1;for(o%2&&(s=e.push("text","",0),s.content=i,o--),t=0;o>t;t+=2)s=e.push("text","",0),s.content=i+i,e.delimiters.push({marker:c,jump:t,token:e.tokens.length-1,level:e.level,end:-1,open:n.can_open,close:n.can_close});return e.pos+=n.length,!0},r.exports.postProcess=function(e){var r,t,n,s,o,i=[],a=e.delimiters,c=e.delimiters.length;for(r=0;c>r;r++)n=a[r],126===n.marker&&-1!==n.end&&(s=a[n.end],o=e.tokens[n.token],o.type="s_open",o.tag="s",o.nesting=1,o.markup="~~",o.content="",o=e.tokens[s.token],o.type="s_close",o.tag="s",o.nesting=-1,o.markup="~~",o.content="","text"===e.tokens[s.token-1].type&&"~"===e.tokens[s.token-1].content&&i.push(s.token-1));for(;i.length;){for(r=i.pop(),t=r+1;tr;r++)n+=s[r].nesting,s[r].level=n,"text"===s[r].type&&o>r+1&&"text"===s[r+1].type?s[r+1].content=s[r].content+s[r+1].content:(r!==t&&(s[t]=s[r]),t++);r!==t&&(s.length=t)}},{}],51:[function(e,r,t){"use strict";function n(e,r,t){this.type=e,this.tag=r,this.attrs=null,this.map=null,this.nesting=t,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}n.prototype.attrIndex=function(e){var r,t,n;if(!this.attrs)return-1;for(r=this.attrs,t=0,n=r.length;n>t;t++)if(r[t][0]===e)return t;return-1},n.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]},n.prototype.attrSet=function(e,r){var t=this.attrIndex(e),n=[e,r];0>t?this.attrPush(n):this.attrs[t]=n},n.prototype.attrJoin=function(e,r){var t=this.attrIndex(e);0>t?this.attrPush([e,r]):this.attrs[t][1]=this.attrs[t][1]+" "+r},r.exports=n},{}],52:[function(r,t,n){(function(r){!function(s){function o(e){throw new RangeError(R[e])}function i(e,r){for(var t=e.length,n=[];t--;)n[t]=r(e[t]);return n}function a(e,r){var t=e.split("@"),n="";t.length>1&&(n=t[0]+"@",e=t[1]),e=e.replace(T,".");var s=e.split("."),o=i(s,r).join(".");return n+o}function c(e){for(var r,t,n=[],s=0,o=e.length;o>s;)r=e.charCodeAt(s++),r>=55296&&56319>=r&&o>s?(t=e.charCodeAt(s++),56320==(64512&t)?n.push(((1023&r)<<10)+(1023&t)+65536):(n.push(r),s--)):n.push(r);return n}function l(e){return i(e,function(e){var r="";return e>65535&&(e-=65536,r+=B(e>>>10&1023|55296),e=56320|1023&e),r+=B(e)}).join("")}function u(e){return 10>e-48?e-22:26>e-65?e-65:26>e-97?e-97:C}function p(e,r){return e+22+75*(26>e)-((0!=r)<<5)}function h(e,r,t){var n=0;for(e=t?I(e/D):e>>1,e+=I(e/r);e>M*w>>1;n+=C)e=I(e/M);return I(n+(M+1)*e/(e+q))}function f(e){var r,t,n,s,i,a,c,p,f,d,m=[],g=e.length,_=0,k=S,b=E;for(t=e.lastIndexOf(F),0>t&&(t=0),n=0;t>n;++n)e.charCodeAt(n)>=128&&o("not-basic"),m.push(e.charCodeAt(n));for(s=t>0?t+1:0;g>s;){for(i=_,a=1,c=C;s>=g&&o("invalid-input"),p=u(e.charCodeAt(s++)),(p>=C||p>I((y-_)/a))&&o("overflow"),_+=p*a,f=b>=c?A:c>=b+w?w:c-b,!(f>p);c+=C)d=C-f,a>I(y/d)&&o("overflow"),a*=d;r=m.length+1,b=h(_-i,r,0==i),I(_/r)>y-k&&o("overflow"),k+=I(_/r),_%=r,m.splice(_++,0,k)}return l(m)}function d(e){var r,t,n,s,i,a,l,u,f,d,m,g,_,k,b,v=[];for(e=c(e),g=e.length,r=S,t=0,i=E,a=0;g>a;++a)m=e[a],128>m&&v.push(B(m));for(n=s=v.length,s&&v.push(F);g>n;){for(l=y,a=0;g>a;++a)m=e[a],m>=r&&l>m&&(l=m);for(_=n+1,l-r>I((y-t)/_)&&o("overflow"),t+=(l-r)*_,r=l,a=0;g>a;++a)if(m=e[a],r>m&&++t>y&&o("overflow"),m==r){for(u=t,f=C;d=i>=f?A:f>=i+w?w:f-i,!(d>u);f+=C)b=u-d,k=C-d,v.push(B(p(d+b%k,0))),u=I(b/k);v.push(B(p(u,0))),i=h(t,_,n==s),t=0,++n}++t,++r}return v.join("")}function m(e){return a(e,function(e){return L.test(e)?f(e.slice(4).toLowerCase()):e})}function g(e){return a(e,function(e){return z.test(e)?"xn--"+d(e):e})}var _="object"==typeof n&&n&&!n.nodeType&&n,k="object"==typeof t&&t&&!t.nodeType&&t,b="object"==typeof r&&r;(b.global===b||b.window===b||b.self===b)&&(s=b);var v,x,y=2147483647,C=36,A=1,w=26,q=38,D=700,E=72,S=128,F="-",L=/^xn--/,z=/[^\x20-\x7E]/,T=/[\x2E\u3002\uFF0E\uFF61]/g,R={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},M=C-A,I=Math.floor,B=String.fromCharCode;if(v={version:"1.3.2",ucs2:{decode:c,encode:l},decode:f,encode:d,toASCII:g,toUnicode:m},"function"==typeof e&&"object"==typeof e.amd&&e.amd)e("punycode",function(){return v});else if(_&&k)if(t.exports==_)k.exports=v;else for(x in v)v.hasOwnProperty(x)&&(_[x]=v[x]);else s.punycode=v}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],53:[function(e,r,t){r.exports={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",amp:"&",AMP:"&",andand:"⩕",And:"⩓",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",apacir:"⩯",ap:"≈",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊", +Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxHd:"╤",boxhD:"╥",boxHD:"╦",boxhu:"┴",boxHu:"╧",boxhU:"╨",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsolb:"⧅",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",capand:"⩄",capbrcup:"⩉",capcap:"⩋",cap:"∩",Cap:"⋒",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"○",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cup:"∪",Cup:"⋓",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"ⅅ",dd:"ⅆ",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"⇁",DownTeeArrow:"↧",DownTee:"⊤",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",edot:"ė",eDot:"≑",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp13:" ",emsp14:" ",emsp:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",ge:"≥",gE:"≧",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅","in":"∈",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺","int":"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}},{}],54:[function(e,r,t){"use strict";function n(e){var r=Array.prototype.slice.call(arguments,1);return r.forEach(function(r){r&&Object.keys(r).forEach(function(t){e[t]=r[t]})}),e}function s(e){return Object.prototype.toString.call(e)}function o(e){return"[object String]"===s(e)}function i(e){return"[object Object]"===s(e)}function a(e){return"[object RegExp]"===s(e)}function c(e){return"[object Function]"===s(e)}function l(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function u(e){return Object.keys(e||{}).reduce(function(e,r){return e||k.hasOwnProperty(r)},!1)}function p(e){e.__index__=-1,e.__text_cache__=""}function h(e){return function(r,t){var n=r.slice(t);return e.test(n)?n.match(e)[0].length:0}}function f(){return function(e,r){r.normalize(e)}}function d(r){function t(e){return e.replace("%TLDS%",u.src_tlds)}function s(e,r){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+r)}var u=r.re=n({},e("./lib/re")),d=r.__tlds__.slice();r.__tlds_replaced__||d.push(v),d.push(u.src_xn),u.src_tlds=d.join("|"),u.email_fuzzy=RegExp(t(u.tpl_email_fuzzy),"i"),u.link_fuzzy=RegExp(t(u.tpl_link_fuzzy),"i"),u.link_no_ip_fuzzy=RegExp(t(u.tpl_link_no_ip_fuzzy),"i"),u.host_fuzzy_test=RegExp(t(u.tpl_host_fuzzy_test),"i");var m=[];r.__compiled__={},Object.keys(r.__schemas__).forEach(function(e){var t=r.__schemas__[e];if(null!==t){var n={validate:null,link:null};return r.__compiled__[e]=n,i(t)?(a(t.validate)?n.validate=h(t.validate):c(t.validate)?n.validate=t.validate:s(e,t),void(c(t.normalize)?n.normalize=t.normalize:t.normalize?s(e,t):n.normalize=f())):o(t)?void m.push(e):void s(e,t)}}),m.forEach(function(e){r.__compiled__[r.__schemas__[e]]&&(r.__compiled__[e].validate=r.__compiled__[r.__schemas__[e]].validate,r.__compiled__[e].normalize=r.__compiled__[r.__schemas__[e]].normalize)}),r.__compiled__[""]={validate:null,normalize:f()};var g=Object.keys(r.__compiled__).filter(function(e){return e.length>0&&r.__compiled__[e]}).map(l).join("|");r.re.schema_test=RegExp("(^|(?!_)(?:>|"+u.src_ZPCc+"))("+g+")","i"),r.re.schema_search=RegExp("(^|(?!_)(?:>|"+u.src_ZPCc+"))("+g+")","ig"),r.re.pretest=RegExp("("+r.re.schema_test.source+")|("+r.re.host_fuzzy_test.source+")|@","i"),p(r)}function m(e,r){var t=e.__index__,n=e.__last_index__,s=e.__text_cache__.slice(t,n);this.schema=e.__schema__.toLowerCase(),this.index=t+r,this.lastIndex=n+r,this.raw=s,this.text=s,this.url=s}function g(e,r){var t=new m(e,r);return e.__compiled__[t.schema].normalize(t,e),t}function _(e,r){return this instanceof _?(r||u(e)&&(r=e,e={}),this.__opts__=n({},k,r),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=n({},b,e),this.__compiled__={},this.__tlds__=x,this.__tlds_replaced__=!1,this.re={},void d(this)):new _(e,r)}var k={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1},b={"http:":{validate:function(e,r,t){var n=e.slice(r);return t.re.http||(t.re.http=new RegExp("^\\/\\/"+t.re.src_auth+t.re.src_host_port_strict+t.re.src_path,"i")),t.re.http.test(n)?n.match(t.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,r,t){var n=e.slice(r);return t.re.no_http||(t.re.no_http=new RegExp("^"+t.re.src_auth+t.re.src_host_port_strict+t.re.src_path,"i")),t.re.no_http.test(n)?r>=3&&":"===e[r-3]?0:n.match(t.re.no_http)[0].length:0}},"mailto:":{validate:function(e,r,t){var n=e.slice(r);return t.re.mailto||(t.re.mailto=new RegExp("^"+t.re.src_email_name+"@"+t.re.src_host_strict,"i")),t.re.mailto.test(n)?n.match(t.re.mailto)[0].length:0}}},v="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",x="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");_.prototype.add=function(e,r){return this.__schemas__[e]=r,d(this),this},_.prototype.set=function(e){return this.__opts__=n(this.__opts__,e),this},_.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var r,t,n,s,o,i,a,c,l;if(this.re.schema_test.test(e))for(a=this.re.schema_search,a.lastIndex=0;null!==(r=a.exec(e));)if(s=this.testSchemaAt(e,r[2],a.lastIndex)){this.__schema__=r[2],this.__index__=r.index+r[1].length,this.__last_index__=r.index+r[0].length+s;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(c=e.search(this.re.host_fuzzy_test),c>=0&&(this.__index__<0||c=0&&null!==(n=e.match(this.re.email_fuzzy))&&(o=n.index+n[1].length,i=n.index+n[0].length,(this.__index__<0||othis.__last_index__)&&(this.__schema__="mailto:",this.__index__=o,this.__last_index__=i))),this.__index__>=0},_.prototype.pretest=function(e){return this.re.pretest.test(e)},_.prototype.testSchemaAt=function(e,r,t){return this.__compiled__[r.toLowerCase()]?this.__compiled__[r.toLowerCase()].validate(e,t,this):0},_.prototype.match=function(e){var r=0,t=[];this.__index__>=0&&this.__text_cache__===e&&(t.push(g(this,r)),r=this.__last_index__);for(var n=r?e.slice(r):e;this.test(n);)t.push(g(this,r)),n=n.slice(this.__last_index__),r+=this.__last_index__;return t.length?t:null},_.prototype.tlds=function(e,r){return e=Array.isArray(e)?e:[e],r?(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(e,r,t){return e!==t[r-1]}).reverse(),d(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,d(this),this)},_.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},r.exports=_},{"./lib/re":55}],55:[function(e,r,t){"use strict";var n=t.src_Any=e("uc.micro/properties/Any/regex").source,s=t.src_Cc=e("uc.micro/categories/Cc/regex").source,o=t.src_Z=e("uc.micro/categories/Z/regex").source,i=t.src_P=e("uc.micro/categories/P/regex").source,a=t.src_ZPCc=[o,i,s].join("|"),c=t.src_ZCc=[o,s].join("|"),l="(?:(?!"+a+")"+n+")",u="(?:(?![0-9]|"+a+")"+n+")",p=t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)";t.src_auth="(?:(?:(?!"+c+").)+@)?";var h=t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",f=t.src_host_terminator="(?=$|"+a+")(?!-|_|:\\d|\\.-|\\.(?!$|"+a+"))",d=t.src_path="(?:[/?#](?:(?!"+c+"|[()[\\]{}.,\"'?!\\-]).|\\[(?:(?!"+c+"|\\]).)*\\]|\\((?:(?!"+c+"|[)]).)*\\)|\\{(?:(?!"+c+'|[}]).)*\\}|\\"(?:(?!'+c+'|["]).)+\\"|\\\'(?:(?!'+c+"|[']).)+\\'|\\'(?="+l+").|\\.{2,3}[a-zA-Z0-9%/]|\\.(?!"+c+"|[.]).|\\-(?!--(?:[^-]|$))(?:-*)|\\,(?!"+c+").|\\!(?!"+c+"|[!]).|\\?(?!"+c+"|[?]).)+|\\/)?",m=t.src_email_name='[\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]+',g=t.src_xn="xn--[a-z0-9\\-]{1,59}",_=t.src_domain_root="(?:"+g+"|"+u+"{1,63})",k=t.src_domain="(?:"+g+"|(?:"+l+")|(?:"+l+"(?:-(?!-)|"+l+"){0,61}"+l+"))",b=t.src_host="(?:"+p+"|(?:(?:(?:"+k+")\\.)*"+_+"))",v=t.tpl_host_fuzzy="(?:"+p+"|(?:(?:(?:"+k+")\\.)+(?:%TLDS%)))",x=t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+k+")\\.)+(?:%TLDS%))";t.src_host_strict=b+f;var y=t.tpl_host_fuzzy_strict=v+f;t.src_host_port_strict=b+h+f;var C=t.tpl_host_port_fuzzy_strict=v+h+f,A=t.tpl_host_port_no_ip_fuzzy_strict=x+h+f;t.tpl_host_fuzzy_test="localhost|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+a+"|$))",t.tpl_email_fuzzy="(^|>|"+c+")("+m+"@"+y+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|]|"+a+"))((?![$+<=>^`|])"+C+d+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|]|"+a+"))((?![$+<=>^`|])"+A+d+")"; },{"uc.micro/categories/Cc/regex":61,"uc.micro/categories/P/regex":63,"uc.micro/categories/Z/regex":64,"uc.micro/properties/Any/regex":66}],56:[function(e,r,t){"use strict";function n(e){var r,t,n=o[e];if(n)return n;for(n=o[e]=[],r=0;128>r;r++)t=String.fromCharCode(r),n.push(t);for(r=0;rr;r+=3)s=parseInt(e.slice(r+1,r+3),16),128>s?l+=t[s]:192===(224&s)&&n>r+3&&(o=parseInt(e.slice(r+4,r+6),16),128===(192&o))?(c=s<<6&1984|63&o,l+=128>c?"��":String.fromCharCode(c),r+=3):224===(240&s)&&n>r+6&&(o=parseInt(e.slice(r+4,r+6),16),i=parseInt(e.slice(r+7,r+9),16),128===(192&o)&&128===(192&i))?(c=s<<12&61440|o<<6&4032|63&i,l+=2048>c||c>=55296&&57343>=c?"���":String.fromCharCode(c),r+=6):240===(248&s)&&n>r+9&&(o=parseInt(e.slice(r+4,r+6),16),i=parseInt(e.slice(r+7,r+9),16),a=parseInt(e.slice(r+10,r+12),16),128===(192&o)&&128===(192&i)&&128===(192&a))?(c=s<<18&1835008|o<<12&258048|i<<6&4032|63&a,65536>c||c>1114111?l+="����":(c-=65536,l+=String.fromCharCode(55296+(c>>10),56320+(1023&c))),r+=9):l+="�";return l})}var o={};s.defaultChars=";/?:@&=+$,#",s.componentChars="",r.exports=s},{}],57:[function(e,r,t){"use strict";function n(e){var r,t,n=o[e];if(n)return n;for(n=o[e]=[],r=0;128>r;r++)t=String.fromCharCode(r),/^[0-9a-z]$/i.test(t)?n.push(t):n.push("%"+("0"+r.toString(16).toUpperCase()).slice(-2));for(r=0;ro;o++)if(a=e.charCodeAt(o),t&&37===a&&i>o+2&&/^[0-9a-f]{2}$/i.test(e.slice(o+1,o+3)))u+=e.slice(o,o+3),o+=2;else if(128>a)u+=l[a];else if(a>=55296&&57343>=a){if(a>=55296&&56319>=a&&i>o+1&&(c=e.charCodeAt(o+1),c>=56320&&57343>=c)){u+=encodeURIComponent(e[o]+e[o+1]),o++;continue}u+="%EF%BF%BD"}else u+=encodeURIComponent(e[o]);return u}var o={};s.defaultChars=";/?:@&=+$,-_.!~*'()#",s.componentChars="-_.!~*'()",r.exports=s},{}],58:[function(e,r,t){"use strict";r.exports=function(e){var r="";return r+=e.protocol||"",r+=e.slashes?"//":"",r+=e.auth?e.auth+"@":"",r+=e.hostname&&-1!==e.hostname.indexOf(":")?"["+e.hostname+"]":e.hostname||"",r+=e.port?":"+e.port:"",r+=e.pathname||"",r+=e.search||"",r+=e.hash||""}},{}],59:[function(e,r,t){"use strict";r.exports.encode=e("./encode"),r.exports.decode=e("./decode"),r.exports.format=e("./format"),r.exports.parse=e("./parse")},{"./decode":56,"./encode":57,"./format":58,"./parse":60}],60:[function(e,r,t){"use strict";function n(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}function s(e,r){if(e&&e instanceof n)return e;var t=new n;return t.parse(e,r),t}var o=/^([a-z0-9.+-]+:)/i,i=/:[0-9]*$/,a=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["<",">",'"',"`"," ","\r","\n"," "],l=["{","}","|","\\","^","`"].concat(c),u=["'"].concat(l),p=["%","/","?",";","#"].concat(u),h=["/","?","#"],f=255,d=/^[+a-z0-9A-Z_-]{0,63}$/,m=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,g={javascript:!0,"javascript:":!0},_={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};n.prototype.parse=function(e,r){var t,n,s,i,c,l=e;if(l=l.trim(),!r&&1===e.split("#").length){var u=a.exec(l);if(u)return this.pathname=u[1],u[2]&&(this.search=u[2]),this}var k=o.exec(l);if(k&&(k=k[0],s=k.toLowerCase(),this.protocol=k,l=l.substr(k.length)),(r||k||l.match(/^\/\/[^@\/]+@[^@\/]+/))&&(c="//"===l.substr(0,2),!c||k&&g[k]||(l=l.substr(2),this.slashes=!0)),!g[k]&&(c||k&&!_[k])){var b=-1;for(t=0;ti)&&(b=i);var v,x;for(x=-1===b?l.lastIndexOf("@"):l.lastIndexOf("@",b),-1!==x&&(v=l.slice(0,x),l=l.slice(x+1),this.auth=v),b=-1,t=0;ti)&&(b=i);-1===b&&(b=l.length),":"===l[b-1]&&b--;var y=l.slice(0,b);l=l.slice(b),this.parseHost(y),this.hostname=this.hostname||"";var C="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!C){var A=this.hostname.split(/\./);for(t=0,n=A.length;n>t;t++){var w=A[t];if(w&&!w.match(d)){for(var q="",D=0,E=w.length;E>D;D++)q+=w.charCodeAt(D)>127?"x":w[D];if(!q.match(d)){var S=A.slice(0,t),F=A.slice(t+1),L=w.match(m);L&&(S.push(L[1]),F.unshift(L[2])),F.length&&(l=F.join(".")+l),this.hostname=S.join(".");break}}}}this.hostname.length>f&&(this.hostname=""),C&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var z=l.indexOf("#");-1!==z&&(this.hash=l.substr(z),l=l.slice(0,z));var T=l.indexOf("?");return-1!==T&&(this.search=l.substr(T),l=l.slice(0,T)),l&&(this.pathname=l),_[s]&&this.hostname&&!this.pathname&&(this.pathname=""),this},n.prototype.parseHost=function(e){var r=i.exec(e);r&&(r=r[0],":"!==r&&(this.port=r.substr(1)),e=e.substr(0,e.length-r.length)),e&&(this.hostname=e)},r.exports=s},{}],61:[function(e,r,t){r.exports=/[\0-\x1F\x7F-\x9F]/},{}],62:[function(e,r,t){r.exports=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804\uDCBD|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/},{}],63:[function(e,r,t){r.exports=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDE38-\uDE3D]|\uD805[\uDCC6\uDDC1-\uDDC9\uDE41-\uDE43]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F/},{}],64:[function(e,r,t){r.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/},{}],65:[function(e,r,t){r.exports.Any=e("./properties/Any/regex"),r.exports.Cc=e("./categories/Cc/regex"),r.exports.Cf=e("./categories/Cf/regex"),r.exports.P=e("./categories/P/regex"),r.exports.Z=e("./categories/Z/regex")},{"./categories/Cc/regex":61,"./categories/Cf/regex":62,"./categories/P/regex":63,"./categories/Z/regex":64,"./properties/Any/regex":66}],66:[function(e,r,t){r.exports=/[\0-\uD7FF\uDC00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF]/},{}],67:[function(e,r,t){"use strict";r.exports=e("./lib/")},{"./lib/":9}]},{},[67])(67)});define("Core/KnockoutMarkdownBinding",["markdown-it-sanitizer","markdown-it"],function(MarkdownItSanitizer,MarkdownIt){"use strict";var htmlTagRegex=/(.|\s)*<\/html>/im;var md=new MarkdownIt({html:true,linkify:true});md.use(MarkdownItSanitizer,{imageClass:"",removeUnbalanced:false,removeUnknown:false});var KnockoutMarkdownBinding={register:function(Knockout){Knockout.bindingHandlers.markdown={init:function(){return{controlsDescendantBindings:true}},update:function(element,valueAccessor){while(element.firstChild){Knockout.removeNode(element.firstChild)}var rawText=Knockout.unwrap(valueAccessor());var html;if(htmlTagRegex.test(rawText)){html=rawText}else{html=md.render(rawText)}var nodes=Knockout.utils.parseHtmlFragment(html,element);element.className=element.className+" markdown";for(var i=0;i0){for(var i=0;i\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",f=a.console&&(a.console.warn||a.console.log);return f&&f.call(a.console,e,d),b.apply(this,arguments)}}function i(a,b,c){var d,e=b.prototype;d=a.prototype=Object.create(e),d.constructor=a,d._super=e,c&&hb(d,c)}function j(a,b){return function(){return a.apply(b,arguments)}}function k(a,b){return typeof a==kb?a.apply(b?b[0]||d:d,b):a}function l(a,b){return a===d?b:a}function m(a,b,c){g(q(b),function(b){a.addEventListener(b,c,!1)})}function n(a,b,c){g(q(b),function(b){a.removeEventListener(b,c,!1)})}function o(a,b){for(;a;){if(a==b)return!0;a=a.parentNode}return!1}function p(a,b){return a.indexOf(b)>-1}function q(a){return a.trim().split(/\s+/g)}function r(a,b,c){if(a.indexOf&&!c)return a.indexOf(b);for(var d=0;dc[b]}):d.sort()),d}function u(a,b){for(var c,e,f=b[0].toUpperCase()+b.slice(1),g=0;g1&&!c.firstMultiple?c.firstMultiple=D(b):1===e&&(c.firstMultiple=!1);var f=c.firstInput,g=c.firstMultiple,h=g?g.center:f.center,i=b.center=E(d);b.timeStamp=nb(),b.deltaTime=b.timeStamp-f.timeStamp,b.angle=I(h,i),b.distance=H(h,i),B(c,b),b.offsetDirection=G(b.deltaX,b.deltaY);var j=F(b.deltaTime,b.deltaX,b.deltaY);b.overallVelocityX=j.x,b.overallVelocityY=j.y,b.overallVelocity=mb(j.x)>mb(j.y)?j.x:j.y,b.scale=g?K(g.pointers,d):1,b.rotation=g?J(g.pointers,d):0,b.maxPointers=c.prevInput?b.pointers.length>c.prevInput.maxPointers?b.pointers.length:c.prevInput.maxPointers:b.pointers.length,C(c,b);var k=a.element;o(b.srcEvent.target,k)&&(k=b.srcEvent.target),b.target=k}function B(a,b){var c=b.center,d=a.offsetDelta||{},e=a.prevDelta||{},f=a.prevInput||{};(b.eventType===Ab||f.eventType===Cb)&&(e=a.prevDelta={x:f.deltaX||0,y:f.deltaY||0},d=a.offsetDelta={x:c.x,y:c.y}),b.deltaX=e.x+(c.x-d.x),b.deltaY=e.y+(c.y-d.y)}function C(a,b){var c,e,f,g,h=a.lastInterval||b,i=b.timeStamp-h.timeStamp;if(b.eventType!=Db&&(i>zb||h.velocity===d)){var j=b.deltaX-h.deltaX,k=b.deltaY-h.deltaY,l=F(i,j,k);e=l.x,f=l.y,c=mb(l.x)>mb(l.y)?l.x:l.y,g=G(j,k),a.lastInterval=b}else c=h.velocity,e=h.velocityX,f=h.velocityY,g=h.direction;b.velocity=c,b.velocityX=e,b.velocityY=f,b.direction=g}function D(a){for(var b=[],c=0;ce;)c+=a[e].clientX,d+=a[e].clientY,e++;return{x:lb(c/b),y:lb(d/b)}}function F(a,b,c){return{x:b/a||0,y:c/a||0}}function G(a,b){return a===b?Eb:mb(a)>=mb(b)?0>a?Fb:Gb:0>b?Hb:Ib}function H(a,b,c){c||(c=Mb);var d=b[c[0]]-a[c[0]],e=b[c[1]]-a[c[1]];return Math.sqrt(d*d+e*e)}function I(a,b,c){c||(c=Mb);var d=b[c[0]]-a[c[0]],e=b[c[1]]-a[c[1]];return 180*Math.atan2(e,d)/Math.PI}function J(a,b){return I(b[1],b[0],Nb)+I(a[1],a[0],Nb)}function K(a,b){return H(b[0],b[1],Nb)/H(a[0],a[1],Nb)}function L(){this.evEl=Pb,this.evWin=Qb,this.allow=!0,this.pressed=!1,x.apply(this,arguments)}function M(){this.evEl=Tb,this.evWin=Ub,x.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function N(){this.evTarget=Wb,this.evWin=Xb,this.started=!1,x.apply(this,arguments)}function O(a,b){var c=s(a.touches),d=s(a.changedTouches);return b&(Cb|Db)&&(c=t(c.concat(d),"identifier",!0)),[c,d]}function P(){this.evTarget=Zb,this.targetIds={},x.apply(this,arguments)}function Q(a,b){var c=s(a.touches),d=this.targetIds;if(b&(Ab|Bb)&&1===c.length)return d[c[0].identifier]=!0,[c,c];var e,f,g=s(a.changedTouches),h=[],i=this.target;if(f=c.filter(function(a){return o(a.target,i)}),b===Ab)for(e=0;eh&&(b.push(a),h=b.length-1):e&(Cb|Db)&&(c=!0),0>h||(b[h]=a,this.callback(this.manager,e,{pointers:b,changedPointers:[a],pointerType:f,srcEvent:a}),c&&b.splice(h,1))}});var Vb={touchstart:Ab,touchmove:Bb,touchend:Cb,touchcancel:Db},Wb="touchstart",Xb="touchstart touchmove touchend touchcancel";i(N,x,{handler:function(a){var b=Vb[a.type];if(b===Ab&&(this.started=!0),this.started){var c=O.call(this,a,b);b&(Cb|Db)&&c[0].length-c[1].length===0&&(this.started=!1),this.callback(this.manager,b,{pointers:c[0],changedPointers:c[1],pointerType:vb,srcEvent:a})}}});var Yb={touchstart:Ab,touchmove:Bb,touchend:Cb,touchcancel:Db},Zb="touchstart touchmove touchend touchcancel";i(P,x,{handler:function(a){var b=Yb[a.type],c=Q.call(this,a,b);c&&this.callback(this.manager,b,{pointers:c[0],changedPointers:c[1],pointerType:vb,srcEvent:a})}}),i(R,x,{handler:function(a,b,c){var d=c.pointerType==vb,e=c.pointerType==xb;if(d)this.mouse.allow=!1;else if(e&&!this.mouse.allow)return;b&(Cb|Db)&&(this.mouse.allow=!0),this.callback(a,b,c)},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var $b=u(jb.style,"touchAction"),_b=$b!==d,ac="compute",bc="auto",cc="manipulation",dc="none",ec="pan-x",fc="pan-y";S.prototype={set:function(a){a==ac&&(a=this.compute()),_b&&this.manager.element.style&&(this.manager.element.style[$b]=a),this.actions=a.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var a=[];return g(this.manager.recognizers,function(b){k(b.options.enable,[b])&&(a=a.concat(b.getTouchAction()))}),T(a.join(" "))},preventDefaults:function(a){if(!_b){var b=a.srcEvent,c=a.offsetDirection;if(this.manager.session.prevented)return void b.preventDefault();var d=this.actions,e=p(d,dc),f=p(d,fc),g=p(d,ec);if(e){var h=1===a.pointers.length,i=a.distance<2,j=a.deltaTime<250;if(h&&i&&j)return}if(!g||!f)return e||f&&c&Jb||g&&c&Kb?this.preventSrc(b):void 0}},preventSrc:function(a){this.manager.session.prevented=!0,a.preventDefault()}};var gc=1,hc=2,ic=4,jc=8,kc=jc,lc=16,mc=32;U.prototype={defaults:{},set:function(a){return hb(this.options,a),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(a){if(f(a,"recognizeWith",this))return this;var b=this.simultaneous;return a=X(a,this),b[a.id]||(b[a.id]=a,a.recognizeWith(this)),this},dropRecognizeWith:function(a){return f(a,"dropRecognizeWith",this)?this:(a=X(a,this),delete this.simultaneous[a.id],this)},requireFailure:function(a){if(f(a,"requireFailure",this))return this;var b=this.requireFail;return a=X(a,this),-1===r(b,a)&&(b.push(a),a.requireFailure(this)),this},dropRequireFailure:function(a){if(f(a,"dropRequireFailure",this))return this;a=X(a,this);var b=r(this.requireFail,a);return b>-1&&this.requireFail.splice(b,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(a){return!!this.simultaneous[a.id]},emit:function(a){function b(b){c.manager.emit(b,a)}var c=this,d=this.state;jc>d&&b(c.options.event+V(d)),b(c.options.event),a.additionalEvent&&b(a.additionalEvent),d>=jc&&b(c.options.event+V(d))},tryEmit:function(a){return this.canEmit()?this.emit(a):void(this.state=mc)},canEmit:function(){for(var a=0;af?Fb:Gb,c=f!=this.pX,d=Math.abs(a.deltaX)):(e=0===g?Eb:0>g?Hb:Ib,c=g!=this.pY,d=Math.abs(a.deltaY))),a.direction=e,c&&d>b.threshold&&e&b.direction},attrTest:function(a){return Y.prototype.attrTest.call(this,a)&&(this.state&hc||!(this.state&hc)&&this.directionTest(a))},emit:function(a){this.pX=a.deltaX,this.pY=a.deltaY;var b=W(a.direction);b&&(a.additionalEvent=this.options.event+b),this._super.emit.call(this,a)}}),i($,Y,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[dc]},attrTest:function(a){return this._super.attrTest.call(this,a)&&(Math.abs(a.scale-1)>this.options.threshold||this.state&hc)},emit:function(a){if(1!==a.scale){var b=a.scale<1?"in":"out";a.additionalEvent=this.options.event+b}this._super.emit.call(this,a)}}),i(_,U,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[bc]},process:function(a){var b=this.options,c=a.pointers.length===b.pointers,d=a.distanceb.time;if(this._input=a,!d||!c||a.eventType&(Cb|Db)&&!f)this.reset();else if(a.eventType&Ab)this.reset(),this._timer=e(function(){this.state=kc,this.tryEmit()},b.time,this);else if(a.eventType&Cb)return kc;return mc},reset:function(){clearTimeout(this._timer)},emit:function(a){this.state===kc&&(a&&a.eventType&Cb?this.manager.emit(this.options.event+"up",a):(this._input.timeStamp=nb(),this.manager.emit(this.options.event,this._input)))}}),i(ab,Y,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[dc]},attrTest:function(a){return this._super.attrTest.call(this,a)&&(Math.abs(a.rotation)>this.options.threshold||this.state&hc)}}),i(bb,Y,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Jb|Kb,pointers:1},getTouchAction:function(){return Z.prototype.getTouchAction.call(this)},attrTest:function(a){var b,c=this.options.direction;return c&(Jb|Kb)?b=a.overallVelocity:c&Jb?b=a.overallVelocityX:c&Kb&&(b=a.overallVelocityY),this._super.attrTest.call(this,a)&&c&a.offsetDirection&&a.distance>this.options.threshold&&a.maxPointers==this.options.pointers&&mb(b)>this.options.velocity&&a.eventType&Cb},emit:function(a){var b=W(a.offsetDirection);b&&this.manager.emit(this.options.event+b,a),this.manager.emit(this.options.event,a)}}),i(cb,U,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[cc]},process:function(a){var b=this.options,c=a.pointers.length===b.pointers,d=a.distancei;i++){o=s[i]||{};for(e in o)o.hasOwnProperty(e)&&(t[e]=o[e])}return t},bind:function(t,e){var i=arguments.length>2?Array.prototype.slice.call(arguments,2):null;return function(){return t.apply(e,i||arguments)}},stamp:function(){var t=0,e="_leaflet_id";return function(i){return i[e]=i[e]||++t,i[e]}}(),invokeEach:function(t,e,i){var n,o;if("object"==typeof t){o=Array.prototype.slice.call(arguments,3);for(n in t)e.apply(i,[n,t[n]].concat(o));return!0}return!1},limitExecByInterval:function(t,e,i){var n,o;return function s(){var a=arguments;return n?void(o=!0):(n=!0,setTimeout(function(){n=!1,o&&(s.apply(i,a),o=!1)},e),void t.apply(i,a))}},falseFn:function(){return!1},formatNum:function(t,e){var i=Math.pow(10,e||5);return Math.round(t*i)/i},trim:function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")},splitWords:function(t){ return o.Util.trim(t).split(/\s+/)},setOptions:function(t,e){return t.options=o.extend({},t.options,e),t.options},getParamString:function(t,e,i){var n=[];for(var o in t)n.push(encodeURIComponent(i?o.toUpperCase():o)+"="+encodeURIComponent(t[o]));return(e&&-1!==e.indexOf("?")?"&":"?")+n.join("&")},template:function(t,e){return t.replace(/\{ *([\w_]+) *\}/g,function(t,n){var o=e[n];if(o===i)throw new Error("No value provided for variable "+t);return"function"==typeof o&&(o=o(e)),o})},isArray:Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},emptyImageUrl:"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="},function(){function e(e){var i,n,o=["webkit","moz","o","ms"];for(i=0;it;t++)n._initHooks[t].call(this)}},e},o.Class.include=function(t){o.extend(this.prototype,t)},o.Class.mergeOptions=function(t){o.extend(this.prototype.options,t)},o.Class.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),i="function"==typeof t?t:function(){this[t].apply(this,e)};this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i)};var s="_leaflet_events";o.Mixin={},o.Mixin.Events={addEventListener:function(t,e,i){if(o.Util.invokeEach(t,this.addEventListener,this,e,i))return this;var n,a,r,h,l,u,c,d=this[s]=this[s]||{},p=i&&i!==this&&o.stamp(i);for(t=o.Util.splitWords(t),n=0,a=t.length;a>n;n++)r={action:e,context:i||this},h=t[n],p?(l=h+"_idx",u=l+"_len",c=d[l]=d[l]||{},c[p]||(c[p]=[],d[u]=(d[u]||0)+1),c[p].push(r)):(d[h]=d[h]||[],d[h].push(r));return this},hasEventListeners:function(t){var e=this[s];return!!e&&(t in e&&e[t].length>0||t+"_idx"in e&&e[t+"_idx_len"]>0)},removeEventListener:function(t,e,i){if(!this[s])return this;if(!t)return this.clearAllEventListeners();if(o.Util.invokeEach(t,this.removeEventListener,this,e,i))return this;var n,a,r,h,l,u,c,d,p,_=this[s],m=i&&i!==this&&o.stamp(i);for(t=o.Util.splitWords(t),n=0,a=t.length;a>n;n++)if(r=t[n],u=r+"_idx",c=u+"_len",d=_[u],e){if(h=m&&d?d[m]:_[r]){for(l=h.length-1;l>=0;l--)h[l].action!==e||i&&h[l].context!==i||(p=h.splice(l,1),p[0].action=o.Util.falseFn);i&&d&&0===h.length&&(delete d[m],_[c]--)}}else delete _[r],delete _[u],delete _[c];return this},clearAllEventListeners:function(){return delete this[s],this},fireEvent:function(t,e){if(!this.hasEventListeners(t))return this;var i,n,a,r,h,l=o.Util.extend({},e,{type:t,target:this}),u=this[s];if(u[t])for(i=u[t].slice(),n=0,a=i.length;a>n;n++)i[n].action.call(i[n].context,l);r=u[t+"_idx"];for(h in r)if(i=r[h].slice())for(n=0,a=i.length;a>n;n++)i[n].action.call(i[n].context,l);return this},addOneTimeEventListener:function(t,e,i){if(o.Util.invokeEach(t,this.addOneTimeEventListener,this,e,i))return this;var n=o.bind(function(){this.removeEventListener(t,e,i).removeEventListener(t,n,i)},this);return this.addEventListener(t,e,i).addEventListener(t,n,i)}},o.Mixin.Events.on=o.Mixin.Events.addEventListener,o.Mixin.Events.off=o.Mixin.Events.removeEventListener,o.Mixin.Events.once=o.Mixin.Events.addOneTimeEventListener,o.Mixin.Events.fire=o.Mixin.Events.fireEvent,function(){var n="ActiveXObject"in t,s=n&&!e.addEventListener,a=navigator.userAgent.toLowerCase(),r=-1!==a.indexOf("webkit"),h=-1!==a.indexOf("chrome"),l=-1!==a.indexOf("phantom"),u=-1!==a.indexOf("android"),c=-1!==a.search("android [23]"),d=-1!==a.indexOf("gecko"),p=typeof orientation!=i+"",_=!t.PointerEvent&&t.MSPointerEvent,m=t.PointerEvent&&t.navigator.pointerEnabled||_,f="devicePixelRatio"in t&&t.devicePixelRatio>1||"matchMedia"in t&&t.matchMedia("(min-resolution:144dpi)")&&t.matchMedia("(min-resolution:144dpi)").matches,g=e.documentElement,v=n&&"transition"in g.style,y="WebKitCSSMatrix"in t&&"m11"in new t.WebKitCSSMatrix&&!c,P="MozPerspective"in g.style,L="OTransition"in g.style,x=!t.L_DISABLE_3D&&(v||y||P||L)&&!l,w=!t.L_NO_TOUCH&&!l&&(m||"ontouchstart"in t||t.DocumentTouch&&e instanceof t.DocumentTouch);o.Browser={ie:n,ielt9:s,webkit:r,gecko:d&&!r&&!t.opera&&!n,android:u,android23:c,chrome:h,ie3d:v,webkit3d:y,gecko3d:P,opera3d:L,any3d:x,mobile:p,mobileWebkit:p&&r,mobileWebkit3d:p&&y,mobileOpera:p&&t.opera,touch:w,msPointer:_,pointer:m,retina:f}}(),o.Point=function(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e},o.Point.prototype={clone:function(){return new o.Point(this.x,this.y)},add:function(t){return this.clone()._add(o.point(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(o.point(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},distanceTo:function(t){t=o.point(t);var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},equals:function(t){return t=o.point(t),t.x===this.x&&t.y===this.y},contains:function(t){return t=o.point(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+o.Util.formatNum(this.x)+", "+o.Util.formatNum(this.y)+")"}},o.point=function(t,e,n){return t instanceof o.Point?t:o.Util.isArray(t)?new o.Point(t[0],t[1]):t===i||null===t?t:new o.Point(t,e,n)},o.Bounds=function(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;o>n;n++)this.extend(i[n])},o.Bounds.prototype={extend:function(t){return t=o.point(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new o.Point((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new o.Point(this.min.x,this.max.y)},getTopRight:function(){return new o.Point(this.max.x,this.min.y)},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,i;return t="number"==typeof t[0]||t instanceof o.Point?o.point(t):o.bounds(t),t instanceof o.Bounds?(e=t.min,i=t.max):e=i=t,e.x>=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=o.bounds(t);var e=this.min,i=this.max,n=t.min,s=t.max,a=s.x>=e.x&&n.x<=i.x,r=s.y>=e.y&&n.y<=i.y;return a&&r},isValid:function(){return!(!this.min||!this.max)}},o.bounds=function(t,e){return!t||t instanceof o.Bounds?t:new o.Bounds(t,e)},o.Transformation=function(t,e,i,n){this._a=t,this._b=e,this._c=i,this._d=n},o.Transformation.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return e=e||1,new o.Point((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}},o.DomUtil={get:function(t){return"string"==typeof t?e.getElementById(t):t},getStyle:function(t,i){var n=t.style[i];if(!n&&t.currentStyle&&(n=t.currentStyle[i]),(!n||"auto"===n)&&e.defaultView){var o=e.defaultView.getComputedStyle(t,null);n=o?o[i]:null}return"auto"===n?null:n},getViewportOffset:function(t){var i,n=0,s=0,a=t,r=e.body,h=e.documentElement;do{if(n+=a.offsetTop||0,s+=a.offsetLeft||0,n+=parseInt(o.DomUtil.getStyle(a,"borderTopWidth"),10)||0,s+=parseInt(o.DomUtil.getStyle(a,"borderLeftWidth"),10)||0,i=o.DomUtil.getStyle(a,"position"),a.offsetParent===r&&"absolute"===i)break;if("fixed"===i){n+=r.scrollTop||h.scrollTop||0,s+=r.scrollLeft||h.scrollLeft||0;break}if("relative"===i&&!a.offsetLeft){var l=o.DomUtil.getStyle(a,"width"),u=o.DomUtil.getStyle(a,"max-width"),c=a.getBoundingClientRect();("none"!==l||"none"!==u)&&(s+=c.left+a.clientLeft),n+=c.top+(r.scrollTop||h.scrollTop||0);break}a=a.offsetParent}while(a);a=t;do{if(a===r)break;n-=a.scrollTop||0,s-=a.scrollLeft||0,a=a.parentNode}while(a);return new o.Point(s,n)},documentIsLtr:function(){return o.DomUtil._docIsLtrCached||(o.DomUtil._docIsLtrCached=!0,o.DomUtil._docIsLtr="ltr"===o.DomUtil.getStyle(e.body,"direction")),o.DomUtil._docIsLtr},create:function(t,i,n){var o=e.createElement(t);return o.className=i,n&&n.appendChild(o),o},hasClass:function(t,e){if(t.classList!==i)return t.classList.contains(e);var n=o.DomUtil._getClass(t);return n.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(n)},addClass:function(t,e){if(t.classList!==i)for(var n=o.Util.splitWords(e),s=0,a=n.length;a>s;s++)t.classList.add(n[s]);else if(!o.DomUtil.hasClass(t,e)){var r=o.DomUtil._getClass(t);o.DomUtil._setClass(t,(r?r+" ":"")+e)}},removeClass:function(t,e){t.classList!==i?t.classList.remove(e):o.DomUtil._setClass(t,o.Util.trim((" "+o.DomUtil._getClass(t)+" ").replace(" "+e+" "," ")))},_setClass:function(t,e){t.className.baseVal===i?t.className=e:t.className.baseVal=e},_getClass:function(t){return t.className.baseVal===i?t.className:t.className.baseVal},setOpacity:function(t,e){if("opacity"in t.style)t.style.opacity=e;else if("filter"in t.style){var i=!1,n="DXImageTransform.Microsoft.Alpha";try{i=t.filters.item(n)}catch(o){if(1===e)return}e=Math.round(100*e),i?(i.Enabled=100!==e,i.Opacity=e):t.style.filter+=" progid:"+n+"(opacity="+e+")"}},testProp:function(t){for(var i=e.documentElement.style,n=0;ni||i===e?e:t),new o.LatLng(this.lat,i)}},o.latLng=function(t,e){return t instanceof o.LatLng?t:o.Util.isArray(t)?"number"==typeof t[0]||"string"==typeof t[0]?new o.LatLng(t[0],t[1],t[2]):null:t===i||null===t?t:"object"==typeof t&&"lat"in t?new o.LatLng(t.lat,"lng"in t?t.lng:t.lon):e===i?null:new o.LatLng(t,e)},o.LatLngBounds=function(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;o>n;n++)this.extend(i[n])},o.LatLngBounds.prototype={extend:function(t){if(!t)return this;var e=o.latLng(t);return t=null!==e?e:o.latLngBounds(t),t instanceof o.LatLng?this._southWest||this._northEast?(this._southWest.lat=Math.min(t.lat,this._southWest.lat),this._southWest.lng=Math.min(t.lng,this._southWest.lng),this._northEast.lat=Math.max(t.lat,this._northEast.lat),this._northEast.lng=Math.max(t.lng,this._northEast.lng)):(this._southWest=new o.LatLng(t.lat,t.lng),this._northEast=new o.LatLng(t.lat,t.lng)):t instanceof o.LatLngBounds&&(this.extend(t._southWest),this.extend(t._northEast)),this},pad:function(t){var e=this._southWest,i=this._northEast,n=Math.abs(e.lat-i.lat)*t,s=Math.abs(e.lng-i.lng)*t;return new o.LatLngBounds(new o.LatLng(e.lat-n,e.lng-s),new o.LatLng(i.lat+n,i.lng+s))},getCenter:function(){return new o.LatLng((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new o.LatLng(this.getNorth(),this.getWest())},getSouthEast:function(){return new o.LatLng(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t="number"==typeof t[0]||t instanceof o.LatLng?o.latLng(t):o.latLngBounds(t);var e,i,n=this._southWest,s=this._northEast;return t instanceof o.LatLngBounds?(e=t.getSouthWest(),i=t.getNorthEast()):e=i=t,e.lat>=n.lat&&i.lat<=s.lat&&e.lng>=n.lng&&i.lng<=s.lng},intersects:function(t){t=o.latLngBounds(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),s=t.getNorthEast(),a=s.lat>=e.lat&&n.lat<=i.lat,r=s.lng>=e.lng&&n.lng<=i.lng;return a&&r},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t){return t?(t=o.latLngBounds(t),this._southWest.equals(t.getSouthWest())&&this._northEast.equals(t.getNorthEast())):!1},isValid:function(){return!(!this._southWest||!this._northEast)}},o.latLngBounds=function(t,e){return!t||t instanceof o.LatLngBounds?t:new o.LatLngBounds(t,e)},o.Projection={},o.Projection.SphericalMercator={MAX_LATITUDE:85.0511287798,project:function(t){var e=o.LatLng.DEG_TO_RAD,i=this.MAX_LATITUDE,n=Math.max(Math.min(i,t.lat),-i),s=t.lng*e,a=n*e;return a=Math.log(Math.tan(Math.PI/4+a/2)),new o.Point(s,a)},unproject:function(t){var e=o.LatLng.RAD_TO_DEG,i=t.x*e,n=(2*Math.atan(Math.exp(t.y))-Math.PI/2)*e;return new o.LatLng(n,i)}},o.Projection.LonLat={project:function(t){return new o.Point(t.lng,t.lat)},unproject:function(t){return new o.LatLng(t.y,t.x)}},o.CRS={latLngToPoint:function(t,e){var i=this.projection.project(t),n=this.scale(e);return this.transformation._transform(i,n)},pointToLatLng:function(t,e){var i=this.scale(e),n=this.transformation.untransform(t,i);return this.projection.unproject(n)},project:function(t){return this.projection.project(t)},scale:function(t){return 256*Math.pow(2,t)},getSize:function(t){var e=this.scale(t);return o.point(e,e)}},o.CRS.Simple=o.extend({},o.CRS,{projection:o.Projection.LonLat,transformation:new o.Transformation(1,0,-1,0),scale:function(t){return Math.pow(2,t)}}),o.CRS.EPSG3857=o.extend({},o.CRS,{code:"EPSG:3857",projection:o.Projection.SphericalMercator,transformation:new o.Transformation(.5/Math.PI,.5,-.5/Math.PI,.5),project:function(t){var e=this.projection.project(t),i=6378137;return e.multiplyBy(i)}}),o.CRS.EPSG900913=o.extend({},o.CRS.EPSG3857,{code:"EPSG:900913"}),o.CRS.EPSG4326=o.extend({},o.CRS,{code:"EPSG:4326",projection:o.Projection.LonLat,transformation:new o.Transformation(1/360,.5,-1/360,.5)}),o.Map=o.Class.extend({includes:o.Mixin.Events,options:{crs:o.CRS.EPSG3857,fadeAnimation:o.DomUtil.TRANSITION&&!o.Browser.android23,trackResize:!0,markerZoomAnimation:o.DomUtil.TRANSITION&&o.Browser.any3d},initialize:function(t,e){e=o.setOptions(this,e),this._initContainer(t),this._initLayout(),this._onResize=o.bind(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),e.center&&e.zoom!==i&&this.setView(o.latLng(e.center),e.zoom,{reset:!0}),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._tileLayersNum=0,this.callInitHooks(),this._addLayers(e.layers)},setView:function(t,e){return e=e===i?this.getZoom():e,this._resetView(o.latLng(t),this._limitZoom(e)),this},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=this._limitZoom(t),this)},zoomIn:function(t,e){return this.setZoom(this._zoom+(t||1),e)},zoomOut:function(t,e){return this.setZoom(this._zoom-(t||1),e)},setZoomAround:function(t,e,i){var n=this.getZoomScale(e),s=this.getSize().divideBy(2),a=t instanceof o.Point?t:this.latLngToContainerPoint(t),r=a.subtract(s).multiplyBy(1-1/n),h=this.containerPointToLatLng(s.add(r));return this.setView(h,e,{zoom:i})},fitBounds:function(t,e){e=e||{},t=t.getBounds?t.getBounds():o.latLngBounds(t);var i=o.point(e.paddingTopLeft||e.padding||[0,0]),n=o.point(e.paddingBottomRight||e.padding||[0,0]),s=this.getBoundsZoom(t,!1,i.add(n));s=e.maxZoom?Math.min(e.maxZoom,s):s;var a=n.subtract(i).divideBy(2),r=this.project(t.getSouthWest(),s),h=this.project(t.getNorthEast(),s),l=this.unproject(r.add(h).divideBy(2).add(a),s);return this.setView(l,s,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t){return this.fire("movestart"),this._rawPanBy(o.point(t)),this.fire("move"),this.fire("moveend")},setMaxBounds:function(t){return t=o.latLngBounds(t),this.options.maxBounds=t,t?(this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds,this)):this.off("moveend",this._panInsideMaxBounds,this)},panInsideBounds:function(t,e){var i=this.getCenter(),n=this._limitCenter(i,this._zoom,t);return i.equals(n)?this:this.panTo(n,e)},addLayer:function(t){var e=o.stamp(t);return this._layers[e]?this:(this._layers[e]=t,!t.options||isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[e]=t,this._updateZoomLevels()),this.options.zoomAnimation&&o.TileLayer&&t instanceof o.TileLayer&&(this._tileLayersNum++,this._tileLayersToLoad++,t.on("load",this._onTileLayerLoad,this)),this._loaded&&this._layerAdd(t),this)},removeLayer:function(t){var e=o.stamp(t);return this._layers[e]?(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&this.fire("layerremove",{layer:t}),this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels()),this.options.zoomAnimation&&o.TileLayer&&t instanceof o.TileLayer&&(this._tileLayersNum--,this._tileLayersToLoad--,t.off("load",this._onTileLayerLoad,this)),this):this},hasLayer:function(t){return t?o.stamp(t)in this._layers:!1},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},invalidateSize:function(t){if(!this._loaded)return this;t=o.extend({animate:!1,pan:!0},t===!0?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._initialCenter=null;var i=this.getSize(),n=e.divideBy(2).round(),s=i.divideBy(2).round(),a=n.subtract(s);return a.x||a.y?(t.animate&&t.pan?this.panBy(a):(t.pan&&this._rawPanBy(a),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(o.bind(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i})):this},addHandler:function(t,e){if(!e)return this;var i=this[t]=new e(this);return this._handlers.push(i),this.options[t]&&i.enable(),this},remove:function(){this._loaded&&this.fire("unload"),this._initEvents("off");try{delete this._container._leaflet}catch(t){this._container._leaflet=i}return this._clearPanes(),this._clearControlPos&&this._clearControlPos(),this._clearHandlers(),this},getCenter:function(){return this._checkIfLoaded(),this._initialCenter&&!this._moved()?this._initialCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds(),e=this.unproject(t.getBottomLeft()),i=this.unproject(t.getTopRight());return new o.LatLngBounds(e,i)},getMinZoom:function(){return this.options.minZoom===i?this._layersMinZoom===i?0:this._layersMinZoom:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===i?this._layersMaxZoom===i?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=o.latLngBounds(t);var n,s=this.getMinZoom()-(e?1:0),a=this.getMaxZoom(),r=this.getSize(),h=t.getNorthWest(),l=t.getSouthEast(),u=!0;i=o.point(i||[0,0]);do s++,n=this.project(l,s).subtract(this.project(h,s)).add(i),u=e?n.x=s);return u&&e?null:e?s:s-1},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new o.Point(this._container.clientWidth,this._container.clientHeight),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(){var t=this._getTopLeftPoint();return new o.Bounds(t,t.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._initialTopLeftPoint},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t){var e=this.options.crs;return e.scale(t)/e.scale(this._zoom)},getScaleZoom:function(t){return this._zoom+Math.log(t)/Math.LN2},project:function(t,e){return e=e===i?this._zoom:e,this.options.crs.latLngToPoint(o.latLng(t),e)},unproject:function(t,e){return e=e===i?this._zoom:e,this.options.crs.pointToLatLng(o.point(t),e)},layerPointToLatLng:function(t){var e=o.point(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){var e=this.project(o.latLng(t))._round();return e._subtract(this.getPixelOrigin())},containerPointToLayerPoint:function(t){return o.point(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return o.point(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(o.point(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(o.latLng(t)))},mouseEventToContainerPoint:function(t){return o.DomEvent.getMousePosition(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=o.DomUtil.get(t);if(!e)throw new Error("Map container not found.");if(e._leaflet)throw new Error("Map container is already initialized.");e._leaflet=!0},_initLayout:function(){var t=this._container;o.DomUtil.addClass(t,"leaflet-container"+(o.Browser.touch?" leaflet-touch":"")+(o.Browser.retina?" leaflet-retina":"")+(o.Browser.ielt9?" leaflet-oldie":"")+(this.options.fadeAnimation?" leaflet-fade-anim":""));var e=o.DomUtil.getStyle(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._mapPane=t.mapPane=this._createPane("leaflet-map-pane",this._container),this._tilePane=t.tilePane=this._createPane("leaflet-tile-pane",this._mapPane),t.objectsPane=this._createPane("leaflet-objects-pane",this._mapPane),t.shadowPane=this._createPane("leaflet-shadow-pane"),t.overlayPane=this._createPane("leaflet-overlay-pane"),t.markerPane=this._createPane("leaflet-marker-pane"),t.popupPane=this._createPane("leaflet-popup-pane");var e=" leaflet-zoom-hide";this.options.markerZoomAnimation||(o.DomUtil.addClass(t.markerPane,e),o.DomUtil.addClass(t.shadowPane,e),o.DomUtil.addClass(t.popupPane,e))},_createPane:function(t,e){return o.DomUtil.create("div",t,e||this._panes.objectsPane)},_clearPanes:function(){this._container.removeChild(this._mapPane)},_addLayers:function(t){t=t?o.Util.isArray(t)?t:[t]:[];for(var e=0,i=t.length;i>e;e++)this.addLayer(t[e])},_resetView:function(t,e,i,n){var s=this._zoom!==e;n||(this.fire("movestart"),s&&this.fire("zoomstart")),this._zoom=e,this._initialCenter=t,this._initialTopLeftPoint=this._getNewTopLeftPoint(t),i?this._initialTopLeftPoint._add(this._getMapPanePos()):o.DomUtil.setPosition(this._mapPane,new o.Point(0,0)),this._tileLayersToLoad=this._tileLayersNum;var a=!this._loaded;this._loaded=!0,this.fire("viewreset",{hard:!i}),a&&(this.fire("load"),this.eachLayer(this._layerAdd,this)),this.fire("move"),(s||n)&&this.fire("zoomend"),this.fire("moveend",{hard:!i})},_rawPanBy:function(t){o.DomUtil.setPosition(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_updateZoomLevels:function(){var t,e=1/0,n=-(1/0),o=this._getZoomSpan();for(t in this._zoomBoundLayers){var s=this._zoomBoundLayers[t];isNaN(s.options.minZoom)||(e=Math.min(e,s.options.minZoom)),isNaN(s.options.maxZoom)||(n=Math.max(n,s.options.maxZoom))}t===i?this._layersMaxZoom=this._layersMinZoom=i:(this._layersMaxZoom=n,this._layersMinZoom=e),o!==this._getZoomSpan()&&this.fire("zoomlevelschange")},_panInsideMaxBounds:function(){this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(e){if(o.DomEvent){e=e||"on",o.DomEvent[e](this._container,"click",this._onMouseClick,this);var i,n,s=["dblclick","mousedown","mouseup","mouseenter","mouseleave","mousemove","contextmenu"];for(i=0,n=s.length;n>i;i++)o.DomEvent[e](this._container,s[i],this._fireMouseEvent,this);this.options.trackResize&&o.DomEvent[e](t,"resize",this._onResize,this)}},_onResize:function(){o.Util.cancelAnimFrame(this._resizeRequest),this._resizeRequest=o.Util.requestAnimFrame(function(){this.invalidateSize({debounceMoveend:!0})},this,!1,this._container)},_onMouseClick:function(t){!this._loaded||!t._simulated&&(this.dragging&&this.dragging.moved()||this.boxZoom&&this.boxZoom.moved())||o.DomEvent._skipped(t)||(this.fire("preclick"),this._fireMouseEvent(t))},_fireMouseEvent:function(t){if(this._loaded&&!o.DomEvent._skipped(t)){var e=t.type;if(e="mouseenter"===e?"mouseover":"mouseleave"===e?"mouseout":e,this.hasEventListeners(e)){"contextmenu"===e&&o.DomEvent.preventDefault(t);var i=this.mouseEventToContainerPoint(t),n=this.containerPointToLayerPoint(i),s=this.layerPointToLatLng(n);this.fire(e,{latlng:s,layerPoint:n,containerPoint:i,originalEvent:t})}}},_onTileLayerLoad:function(){this._tileLayersToLoad--,this._tileLayersNum&&!this._tileLayersToLoad&&this.fire("tilelayersload")},_clearHandlers:function(){for(var t=0,e=this._handlers.length;e>t;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,this):this.on("load",t,e),this},_layerAdd:function(t){t.onAdd(this),this.fire("layeradd",{layer:t})},_getMapPanePos:function(){return o.DomUtil.getPosition(this._mapPane)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(){return this.getPixelOrigin().subtract(this._getMapPanePos())},_getNewTopLeftPoint:function(t,e){var i=this.getSize()._divideBy(2);return this.project(t,e)._subtract(i)._round()},_latLngToNewLayerPoint:function(t,e,i){var n=this._getNewTopLeftPoint(i,e).add(this._getMapPanePos());return this.project(t,e)._subtract(n)},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,i){if(!i)return t;var n=this.project(t,e),s=this.getSize().divideBy(2),a=new o.Bounds(n.subtract(s),n.add(s)),r=this._getBoundsOffset(a,i,e);return this.unproject(n.add(r),e)},_limitOffset:function(t,e){if(!e)return t;var i=this.getPixelBounds(),n=new o.Bounds(i.min.add(t),i.max.add(t));return t.add(this._getBoundsOffset(n,e))},_getBoundsOffset:function(t,e,i){var n=this.project(e.getNorthWest(),i).subtract(t.min),s=this.project(e.getSouthEast(),i).subtract(t.max),a=this._rebound(n.x,-s.x),r=this._rebound(n.y,-s.y);return new o.Point(a,r)},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom();return Math.max(e,Math.min(i,t))}}),o.map=function(t,e){return new o.Map(t,e)},o.Projection.Mercator={MAX_LATITUDE:85.0840591556,R_MINOR:6356752.314245179,R_MAJOR:6378137,project:function(t){var e=o.LatLng.DEG_TO_RAD,i=this.MAX_LATITUDE,n=Math.max(Math.min(i,t.lat),-i),s=this.R_MAJOR,a=this.R_MINOR,r=t.lng*e*s,h=n*e,l=a/s,u=Math.sqrt(1-l*l),c=u*Math.sin(h);c=Math.pow((1-c)/(1+c),.5*u);var d=Math.tan(.5*(.5*Math.PI-h))/c;return h=-s*Math.log(d),new o.Point(r,h)},unproject:function(t){for(var e,i=o.LatLng.RAD_TO_DEG,n=this.R_MAJOR,s=this.R_MINOR,a=t.x*i/n,r=s/n,h=Math.sqrt(1-r*r),l=Math.exp(-t.y/n),u=Math.PI/2-2*Math.atan(l),c=15,d=1e-7,p=c,_=.1;Math.abs(_)>d&&--p>0;)e=h*Math.sin(u),_=Math.PI/2-2*Math.atan(l*Math.pow((1-e)/(1+e),.5*h))-u,u+=_;return new o.LatLng(u*i,a)}},o.CRS.EPSG3395=o.extend({},o.CRS,{code:"EPSG:3395",projection:o.Projection.Mercator,transformation:function(){var t=o.Projection.Mercator,e=t.R_MAJOR,i=.5/(Math.PI*e);return new o.Transformation(i,.5,-i,.5)}()}),o.TileLayer=o.Class.extend({includes:o.Mixin.Events,options:{minZoom:0,maxZoom:18,tileSize:256,subdomains:"abc",errorTileUrl:"",attribution:"",zoomOffset:0,opacity:1,unloadInvisibleTiles:o.Browser.mobile,updateWhenIdle:o.Browser.mobile},initialize:function(t,e){e=o.setOptions(this,e),e.detectRetina&&o.Browser.retina&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomOffset++,e.minZoom>0&&e.minZoom--,this.options.maxZoom--),e.bounds&&(e.bounds=o.latLngBounds(e.bounds)),this._url=t;var i=this.options.subdomains;"string"==typeof i&&(this.options.subdomains=i.split(""))},onAdd:function(t){this._map=t,this._animated=t._zoomAnimated,this._initContainer(),t.on({viewreset:this._reset,moveend:this._update},this),this._animated&&t.on({zoomanim:this._animateZoom,zoomend:this._endZoomAnim},this),this.options.updateWhenIdle||(this._limitedUpdate=o.Util.limitExecByInterval(this._update,150,this),t.on("move",this._limitedUpdate,this)),this._reset(),this._update()},addTo:function(t){return t.addLayer(this),this; },onRemove:function(t){this._container.parentNode.removeChild(this._container),t.off({viewreset:this._reset,moveend:this._update},this),this._animated&&t.off({zoomanim:this._animateZoom,zoomend:this._endZoomAnim},this),this.options.updateWhenIdle||t.off("move",this._limitedUpdate,this),this._container=null,this._map=null},bringToFront:function(){var t=this._map._panes.tilePane;return this._container&&(t.appendChild(this._container),this._setAutoZIndex(t,Math.max)),this},bringToBack:function(){var t=this._map._panes.tilePane;return this._container&&(t.insertBefore(this._container,t.firstChild),this._setAutoZIndex(t,Math.min)),this},getAttribution:function(){return this.options.attribution},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},setUrl:function(t,e){return this._url=t,e||this.redraw(),this},redraw:function(){return this._map&&(this._reset({hard:!0}),this._update()),this},_updateZIndex:function(){this._container&&this.options.zIndex!==i&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t,e){var i,n,o,s=t.children,a=-e(1/0,-(1/0));for(n=0,o=s.length;o>n;n++)s[n]!==this._container&&(i=parseInt(s[n].style.zIndex,10),isNaN(i)||(a=e(a,i)));this.options.zIndex=this._container.style.zIndex=(isFinite(a)?a:0)+e(1,-1)},_updateOpacity:function(){var t,e=this._tiles;if(o.Browser.ielt9)for(t in e)o.DomUtil.setOpacity(e[t],this.options.opacity);else o.DomUtil.setOpacity(this._container,this.options.opacity)},_initContainer:function(){var t=this._map._panes.tilePane;if(!this._container){if(this._container=o.DomUtil.create("div","leaflet-layer"),this._updateZIndex(),this._animated){var e="leaflet-tile-container";this._bgBuffer=o.DomUtil.create("div",e,this._container),this._tileContainer=o.DomUtil.create("div",e,this._container)}else this._tileContainer=this._container;t.appendChild(this._container),this.options.opacity<1&&this._updateOpacity()}},_reset:function(t){for(var e in this._tiles)this.fire("tileunload",{tile:this._tiles[e]});this._tiles={},this._tilesToLoad=0,this.options.reuseTiles&&(this._unusedTiles=[]),this._tileContainer.innerHTML="",this._animated&&t&&t.hard&&this._clearBgBuffer(),this._initContainer()},_getTileSize:function(){var t=this._map,e=t.getZoom()+this.options.zoomOffset,i=this.options.maxNativeZoom,n=this.options.tileSize;return i&&e>i&&(n=Math.round(t.getZoomScale(e)/t.getZoomScale(i)*n)),n},_update:function(){if(this._map){var t=this._map,e=t.getPixelBounds(),i=t.getZoom(),n=this._getTileSize();if(!(i>this.options.maxZoom||in;n++)this._addTile(a[n],l);this._tileContainer.appendChild(l)}},_tileShouldBeLoaded:function(t){if(t.x+":"+t.y in this._tiles)return!1;var e=this.options;if(!e.continuousWorld){var i=this._getWrapTileNum();if(e.noWrap&&(t.x<0||t.x>=i.x)||t.y<0||t.y>=i.y)return!1}if(e.bounds){var n=this._getTileSize(),o=t.multiplyBy(n),s=o.add([n,n]),a=this._map.unproject(o),r=this._map.unproject(s);if(e.continuousWorld||e.noWrap||(a=a.wrap(),r=r.wrap()),!e.bounds.intersects([a,r]))return!1}return!0},_removeOtherTiles:function(t){var e,i,n,o;for(o in this._tiles)e=o.split(":"),i=parseInt(e[0],10),n=parseInt(e[1],10),(it.max.x||nt.max.y)&&this._removeTile(o)},_removeTile:function(t){var e=this._tiles[t];this.fire("tileunload",{tile:e,url:e.src}),this.options.reuseTiles?(o.DomUtil.removeClass(e,"leaflet-tile-loaded"),this._unusedTiles.push(e)):e.parentNode===this._tileContainer&&this._tileContainer.removeChild(e),o.Browser.android||(e.onload=null,e.src=o.Util.emptyImageUrl),delete this._tiles[t]},_addTile:function(t,e){var i=this._getTilePos(t),n=this._getTile();o.DomUtil.setPosition(n,i,o.Browser.chrome),this._tiles[t.x+":"+t.y]=n,this._loadTile(n,t),n.parentNode!==this._tileContainer&&e.appendChild(n)},_getZoomForUrl:function(){var t=this.options,e=this._map.getZoom();return t.zoomReverse&&(e=t.maxZoom-e),e+=t.zoomOffset,t.maxNativeZoom?Math.min(e,t.maxNativeZoom):e},_getTilePos:function(t){var e=this._map.getPixelOrigin(),i=this._getTileSize();return t.multiplyBy(i).subtract(e)},getTileUrl:function(t){return o.Util.template(this._url,o.extend({s:this._getSubdomain(t),z:t.z,x:t.x,y:t.y},this.options))},_getWrapTileNum:function(){var t=this._map.options.crs,e=t.getSize(this._map.getZoom());return e.divideBy(this._getTileSize())._floor()},_adjustTilePoint:function(t){var e=this._getWrapTileNum();this.options.continuousWorld||this.options.noWrap||(t.x=(t.x%e.x+e.x)%e.x),this.options.tms&&(t.y=e.y-t.y-1),t.z=this._getZoomForUrl()},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_getTile:function(){if(this.options.reuseTiles&&this._unusedTiles.length>0){var t=this._unusedTiles.pop();return this._resetTile(t),t}return this._createTile()},_resetTile:function(){},_createTile:function(){var t=o.DomUtil.create("img","leaflet-tile");return t.style.width=t.style.height=this._getTileSize()+"px",t.galleryimg="no",t.onselectstart=t.onmousemove=o.Util.falseFn,o.Browser.ielt9&&this.options.opacity!==i&&o.DomUtil.setOpacity(t,this.options.opacity),o.Browser.mobileWebkit3d&&(t.style.WebkitBackfaceVisibility="hidden"),t},_loadTile:function(t,e){t._layer=this,t.onload=this._tileOnLoad,t.onerror=this._tileOnError,this._adjustTilePoint(e),t.src=this.getTileUrl(e),this.fire("tileloadstart",{tile:t,url:t.src})},_tileLoaded:function(){this._tilesToLoad--,this._animated&&o.DomUtil.addClass(this._tileContainer,"leaflet-zoom-animated"),this._tilesToLoad||(this.fire("load"),this._animated&&(clearTimeout(this._clearBgBufferTimer),this._clearBgBufferTimer=setTimeout(o.bind(this._clearBgBuffer,this),500)))},_tileOnLoad:function(){var t=this._layer;this.src!==o.Util.emptyImageUrl&&(o.DomUtil.addClass(this,"leaflet-tile-loaded"),t.fire("tileload",{tile:this,url:this.src})),t._tileLoaded()},_tileOnError:function(){var t=this._layer;t.fire("tileerror",{tile:this,url:this.src});var e=t.options.errorTileUrl;e&&(this.src=e),t._tileLoaded()}}),o.tileLayer=function(t,e){return new o.TileLayer(t,e)},o.TileLayer.WMS=o.TileLayer.extend({defaultWmsParams:{service:"WMS",request:"GetMap",version:"1.1.1",layers:"",styles:"",format:"image/jpeg",transparent:!1},initialize:function(t,e){this._url=t;var i=o.extend({},this.defaultWmsParams),n=e.tileSize||this.options.tileSize;e.detectRetina&&o.Browser.retina?i.width=i.height=2*n:i.width=i.height=n;for(var s in e)this.options.hasOwnProperty(s)||"crs"===s||(i[s]=e[s]);this.wmsParams=i,o.setOptions(this,e)},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,o.TileLayer.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._map,i=this.options.tileSize,n=t.multiplyBy(i),s=n.add([i,i]),a=this._crs.project(e.unproject(n,t.z)),r=this._crs.project(e.unproject(s,t.z)),h=this._wmsVersion>=1.3&&this._crs===o.CRS.EPSG4326?[r.y,a.x,a.y,r.x].join(","):[a.x,r.y,r.x,a.y].join(","),l=o.Util.template(this._url,{s:this._getSubdomain(t)});return l+o.Util.getParamString(this.wmsParams,l,!0)+"&BBOX="+h},setParams:function(t,e){return o.extend(this.wmsParams,t),e||this.redraw(),this}}),o.tileLayer.wms=function(t,e){return new o.TileLayer.WMS(t,e)},o.TileLayer.Canvas=o.TileLayer.extend({options:{async:!1},initialize:function(t){o.setOptions(this,t)},redraw:function(){this._map&&(this._reset({hard:!0}),this._update());for(var t in this._tiles)this._redrawTile(this._tiles[t]);return this},_redrawTile:function(t){this.drawTile(t,t._tilePoint,this._map._zoom)},_createTile:function(){var t=o.DomUtil.create("canvas","leaflet-tile");return t.width=t.height=this.options.tileSize,t.onselectstart=t.onmousemove=o.Util.falseFn,t},_loadTile:function(t,e){t._layer=this,t._tilePoint=e,this._redrawTile(t),this.options.async||this.tileDrawn(t)},drawTile:function(){},tileDrawn:function(t){this._tileOnLoad.call(t)}}),o.tileLayer.canvas=function(t){return new o.TileLayer.Canvas(t)},o.ImageOverlay=o.Class.extend({includes:o.Mixin.Events,options:{opacity:1},initialize:function(t,e,i){this._url=t,this._bounds=o.latLngBounds(e),o.setOptions(this,i)},onAdd:function(t){this._map=t,this._image||this._initImage(),t._panes.overlayPane.appendChild(this._image),t.on("viewreset",this._reset,this),t.options.zoomAnimation&&o.Browser.any3d&&t.on("zoomanim",this._animateZoom,this),this._reset()},onRemove:function(t){t.getPanes().overlayPane.removeChild(this._image),t.off("viewreset",this._reset,this),t.options.zoomAnimation&&t.off("zoomanim",this._animateZoom,this)},addTo:function(t){return t.addLayer(this),this},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},bringToFront:function(){return this._image&&this._map._panes.overlayPane.appendChild(this._image),this},bringToBack:function(){var t=this._map._panes.overlayPane;return this._image&&t.insertBefore(this._image,t.firstChild),this},setUrl:function(t){this._url=t,this._image.src=this._url},getAttribution:function(){return this.options.attribution},_initImage:function(){this._image=o.DomUtil.create("img","leaflet-image-layer"),this._map.options.zoomAnimation&&o.Browser.any3d?o.DomUtil.addClass(this._image,"leaflet-zoom-animated"):o.DomUtil.addClass(this._image,"leaflet-zoom-hide"),this._updateOpacity(),o.extend(this._image,{galleryimg:"no",onselectstart:o.Util.falseFn,onmousemove:o.Util.falseFn,onload:o.bind(this._onImageLoad,this),src:this._url})},_animateZoom:function(t){var e=this._map,i=this._image,n=e.getZoomScale(t.zoom),s=this._bounds.getNorthWest(),a=this._bounds.getSouthEast(),r=e._latLngToNewLayerPoint(s,t.zoom,t.center),h=e._latLngToNewLayerPoint(a,t.zoom,t.center)._subtract(r),l=r._add(h._multiplyBy(.5*(1-1/n)));i.style[o.DomUtil.TRANSFORM]=o.DomUtil.getTranslateString(l)+" scale("+n+") "},_reset:function(){var t=this._image,e=this._map.latLngToLayerPoint(this._bounds.getNorthWest()),i=this._map.latLngToLayerPoint(this._bounds.getSouthEast())._subtract(e);o.DomUtil.setPosition(t,e),t.style.width=i.x+"px",t.style.height=i.y+"px"},_onImageLoad:function(){this.fire("load")},_updateOpacity:function(){o.DomUtil.setOpacity(this._image,this.options.opacity)}}),o.imageOverlay=function(t,e,i){return new o.ImageOverlay(t,e,i)},o.Icon=o.Class.extend({options:{className:""},initialize:function(t){o.setOptions(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var i=this._getIconUrl(t);if(!i){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var n;return n=e&&"IMG"===e.tagName?this._createImg(i,e):this._createImg(i),this._setIconStyles(n,t),n},_setIconStyles:function(t,e){var i,n=this.options,s=o.point(n[e+"Size"]);i="shadow"===e?o.point(n.shadowAnchor||n.iconAnchor):o.point(n.iconAnchor),!i&&s&&(i=s.divideBy(2,!0)),t.className="leaflet-marker-"+e+" "+n.className,i&&(t.style.marginLeft=-i.x+"px",t.style.marginTop=-i.y+"px"),s&&(t.style.width=s.x+"px",t.style.height=s.y+"px")},_createImg:function(t,i){return i=i||e.createElement("img"),i.src=t,i},_getIconUrl:function(t){return o.Browser.retina&&this.options[t+"RetinaUrl"]?this.options[t+"RetinaUrl"]:this.options[t+"Url"]}}),o.icon=function(t){return new o.Icon(t)},o.Icon.Default=o.Icon.extend({options:{iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],shadowSize:[41,41]},_getIconUrl:function(t){var e=t+"Url";if(this.options[e])return this.options[e];o.Browser.retina&&"icon"===t&&(t+="-2x");var i=o.Icon.Default.imagePath;if(!i)throw new Error("Couldn't autodetect L.Icon.Default.imagePath, set it manually.");return i+"/marker-"+t+".png"}}),o.Icon.Default.imagePath=function(){var t,i,n,o,s,a=e.getElementsByTagName("script"),r=/[\/^]leaflet[\-\._]?([\w\-\._]*)\.js\??/;for(t=0,i=a.length;i>t;t++)if(n=a[t].src,o=n.match(r))return s=n.split(r)[0],(s?s+"/":"")+"images"}(),o.Marker=o.Class.extend({includes:o.Mixin.Events,options:{icon:new o.Icon.Default,title:"",alt:"",clickable:!0,draggable:!1,keyboard:!0,zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250},initialize:function(t,e){o.setOptions(this,e),this._latlng=o.latLng(t)},onAdd:function(t){this._map=t,t.on("viewreset",this.update,this),this._initIcon(),this.update(),this.fire("add"),t.options.zoomAnimation&&t.options.markerZoomAnimation&&t.on("zoomanim",this._animateZoom,this)},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){this.dragging&&this.dragging.disable(),this._removeIcon(),this._removeShadow(),this.fire("remove"),t.off({viewreset:this.update,zoomanim:this._animateZoom},this),this._map=null},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=o.latLng(t),this.update(),this.fire("move",{latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update(),this},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup),this},update:function(){return this._icon&&this._setPos(this._map.latLngToLayerPoint(this._latlng).round()),this},_initIcon:function(){var t=this.options,e=this._map,i=e.options.zoomAnimation&&e.options.markerZoomAnimation,n=i?"leaflet-zoom-animated":"leaflet-zoom-hide",s=t.icon.createIcon(this._icon),a=!1;s!==this._icon&&(this._icon&&this._removeIcon(),a=!0,t.title&&(s.title=t.title),t.alt&&(s.alt=t.alt)),o.DomUtil.addClass(s,n),t.keyboard&&(s.tabIndex="0"),this._icon=s,this._initInteraction(),t.riseOnHover&&o.DomEvent.on(s,"mouseover",this._bringToFront,this).on(s,"mouseout",this._resetZIndex,this);var r=t.icon.createShadow(this._shadow),h=!1;r!==this._shadow&&(this._removeShadow(),h=!0),r&&o.DomUtil.addClass(r,n),this._shadow=r,t.opacity<1&&this._updateOpacity();var l=this._map._panes;a&&l.markerPane.appendChild(this._icon),r&&h&&l.shadowPane.appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&o.DomEvent.off(this._icon,"mouseover",this._bringToFront).off(this._icon,"mouseout",this._resetZIndex),this._map._panes.markerPane.removeChild(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&this._map._panes.shadowPane.removeChild(this._shadow),this._shadow=null},_setPos:function(t){o.DomUtil.setPosition(this._icon,t),this._shadow&&o.DomUtil.setPosition(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon.style.zIndex=this._zIndex+t},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.clickable){var t=this._icon,e=["dblclick","mousedown","mouseover","mouseout","contextmenu"];o.DomUtil.addClass(t,"leaflet-clickable"),o.DomEvent.on(t,"click",this._onMouseClick,this),o.DomEvent.on(t,"keypress",this._onKeyPress,this);for(var i=0;is?(e.height=s+"px",o.DomUtil.addClass(t,a)):o.DomUtil.removeClass(t,a),this._containerWidth=this._container.offsetWidth},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=this._animated,i=o.point(this.options.offset);e&&o.DomUtil.setPosition(this._container,t),this._containerBottom=-i.y-(e?0:t.y),this._containerLeft=-Math.round(this._containerWidth/2)+i.x+(e?0:t.x),this._container.style.bottom=this._containerBottom+"px",this._container.style.left=this._containerLeft+"px"}},_zoomAnimation:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);o.DomUtil.setPosition(this._container,e)},_adjustPan:function(){if(this.options.autoPan){var t=this._map,e=this._container.offsetHeight,i=this._containerWidth,n=new o.Point(this._containerLeft,-e-this._containerBottom);this._animated&&n._add(o.DomUtil.getPosition(this._container));var s=t.layerPointToContainerPoint(n),a=o.point(this.options.autoPanPadding),r=o.point(this.options.autoPanPaddingTopLeft||a),h=o.point(this.options.autoPanPaddingBottomRight||a),l=t.getSize(),u=0,c=0;s.x+i+h.x>l.x&&(u=s.x+i-l.x+h.x),s.x-u-r.x<0&&(u=s.x-r.x),s.y+e+h.y>l.y&&(c=s.y+e-l.y+h.y),s.y-c-r.y<0&&(c=s.y-r.y),(u||c)&&t.fire("autopanstart").panBy([u,c])}},_onCloseButtonClick:function(t){this._close(),o.DomEvent.stop(t)}}),o.popup=function(t,e){return new o.Popup(t,e)},o.Map.include({openPopup:function(t,e,i){if(this.closePopup(),!(t instanceof o.Popup)){var n=t;t=new o.Popup(i).setLatLng(e).setContent(n)}return t._isOpen=!0,this._popup=t,this.addLayer(t)},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&(this.removeLayer(t),t._isOpen=!1),this}}),o.Marker.include({openPopup:function(){return this._popup&&this._map&&!this._map.hasLayer(this._popup)&&(this._popup.setLatLng(this._latlng),this._map.openPopup(this._popup)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(){return this._popup&&(this._popup._isOpen?this.closePopup():this.openPopup()),this},bindPopup:function(t,e){var i=o.point(this.options.icon.options.popupAnchor||[0,0]);return i=i.add(o.Popup.prototype.options.offset),e&&e.offset&&(i=i.add(e.offset)),e=o.extend({offset:i},e),this._popupHandlersAdded||(this.on("click",this.togglePopup,this).on("remove",this.closePopup,this).on("move",this._movePopup,this),this._popupHandlersAdded=!0),t instanceof o.Popup?(o.setOptions(t,e),this._popup=t,t._source=this):this._popup=new o.Popup(e,this).setContent(t),this},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},unbindPopup:function(){return this._popup&&(this._popup=null,this.off("click",this.togglePopup,this).off("remove",this.closePopup,this).off("move",this._movePopup,this),this._popupHandlersAdded=!1),this},getPopup:function(){return this._popup},_movePopup:function(t){this._popup.setLatLng(t.latlng)}}),o.LayerGroup=o.Class.extend({initialize:function(t){this._layers={};var e,i;if(t)for(e=0,i=t.length;i>e;e++)this.addLayer(t[e])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return t?t in this._layers||this.getLayerId(t)in this._layers:!1},clearLayers:function(){return this.eachLayer(this.removeLayer,this),this},invoke:function(t){var e,i,n=Array.prototype.slice.call(arguments,1);for(e in this._layers)i=this._layers[e],i[t]&&i[t].apply(i,n);return this},onAdd:function(t){this._map=t,this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t),this._map=null},addTo:function(t){return t.addLayer(this),this},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];for(var e in this._layers)t.push(this._layers[e]);return t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return o.stamp(t)}}),o.layerGroup=function(t){return new o.LayerGroup(t)},o.FeatureGroup=o.LayerGroup.extend({includes:o.Mixin.Events,statics:{EVENTS:"click dblclick mouseover mouseout mousemove contextmenu popupopen popupclose"},addLayer:function(t){return this.hasLayer(t)?this:("on"in t&&t.on(o.FeatureGroup.EVENTS,this._propagateEvent,this),o.LayerGroup.prototype.addLayer.call(this,t),this._popupContent&&t.bindPopup&&t.bindPopup(this._popupContent,this._popupOptions),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),"off"in t&&t.off(o.FeatureGroup.EVENTS,this._propagateEvent,this),o.LayerGroup.prototype.removeLayer.call(this,t),this._popupContent&&this.invoke("unbindPopup"),this.fire("layerremove",{layer:t})):this},bindPopup:function(t,e){return this._popupContent=t,this._popupOptions=e,this.invoke("bindPopup",t,e)},openPopup:function(t){for(var e in this._layers){this._layers[e].openPopup(t);break}return this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new o.LatLngBounds;return this.eachLayer(function(e){t.extend(e instanceof o.Marker?e.getLatLng():e.getBounds())}),t},_propagateEvent:function(t){t=o.extend({layer:t.target,target:this},t),this.fire(t.type,t)}}),o.featureGroup=function(t){return new o.FeatureGroup(t)},o.Path=o.Class.extend({includes:[o.Mixin.Events],statics:{CLIP_PADDING:function(){var e=o.Browser.mobile?1280:2e3,i=(e/Math.max(t.outerWidth,t.outerHeight)-1)/2;return Math.max(0,Math.min(.5,i))}()},options:{stroke:!0,color:"#0033ff",dashArray:null,lineCap:null,lineJoin:null,weight:5,opacity:.5,fill:!1,fillColor:null,fillOpacity:.2,clickable:!0},initialize:function(t){o.setOptions(this,t)},onAdd:function(t){this._map=t,this._container||(this._initElements(),this._initEvents()),this.projectLatlngs(),this._updatePath(),this._container&&this._map._pathRoot.appendChild(this._container),this.fire("add"),t.on({viewreset:this.projectLatlngs,moveend:this._updatePath},this)},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){t._pathRoot.removeChild(this._container),this.fire("remove"),this._map=null,o.Browser.vml&&(this._container=null,this._stroke=null,this._fill=null),t.off({viewreset:this.projectLatlngs,moveend:this._updatePath},this)},projectLatlngs:function(){},setStyle:function(t){return o.setOptions(this,t),this._container&&this._updateStyle(),this},redraw:function(){return this._map&&(this.projectLatlngs(),this._updatePath()),this}}),o.Map.include({_updatePathViewport:function(){var t=o.Path.CLIP_PADDING,e=this.getSize(),i=o.DomUtil.getPosition(this._mapPane),n=i.multiplyBy(-1)._subtract(e.multiplyBy(t)._round()),s=n.add(e.multiplyBy(1+2*t)._round());this._pathViewport=new o.Bounds(n,s)}}),o.Path.SVG_NS="http://www.w3.org/2000/svg",o.Browser.svg=!(!e.createElementNS||!e.createElementNS(o.Path.SVG_NS,"svg").createSVGRect),o.Path=o.Path.extend({statics:{SVG:o.Browser.svg},bringToFront:function(){var t=this._map._pathRoot,e=this._container;return e&&t.lastChild!==e&&t.appendChild(e),this},bringToBack:function(){var t=this._map._pathRoot,e=this._container,i=t.firstChild;return e&&i!==e&&t.insertBefore(e,i),this},getPathString:function(){},_createElement:function(t){return e.createElementNS(o.Path.SVG_NS,t)},_initElements:function(){this._map._initPathRoot(),this._initPath(),this._initStyle()},_initPath:function(){this._container=this._createElement("g"),this._path=this._createElement("path"),this.options.className&&o.DomUtil.addClass(this._path,this.options.className),this._container.appendChild(this._path)},_initStyle:function(){this.options.stroke&&(this._path.setAttribute("stroke-linejoin","round"),this._path.setAttribute("stroke-linecap","round")),this.options.fill&&this._path.setAttribute("fill-rule","evenodd"),this.options.pointerEvents&&this._path.setAttribute("pointer-events",this.options.pointerEvents),this.options.clickable||this.options.pointerEvents||this._path.setAttribute("pointer-events","none"),this._updateStyle()},_updateStyle:function(){this.options.stroke?(this._path.setAttribute("stroke",this.options.color),this._path.setAttribute("stroke-opacity",this.options.opacity),this._path.setAttribute("stroke-width",this.options.weight),this.options.dashArray?this._path.setAttribute("stroke-dasharray",this.options.dashArray):this._path.removeAttribute("stroke-dasharray"),this.options.lineCap&&this._path.setAttribute("stroke-linecap",this.options.lineCap),this.options.lineJoin&&this._path.setAttribute("stroke-linejoin",this.options.lineJoin)):this._path.setAttribute("stroke","none"),this.options.fill?(this._path.setAttribute("fill",this.options.fillColor||this.options.color),this._path.setAttribute("fill-opacity",this.options.fillOpacity)):this._path.setAttribute("fill","none")},_updatePath:function(){var t=this.getPathString();t||(t="M0 0"),this._path.setAttribute("d",t)},_initEvents:function(){if(this.options.clickable){(o.Browser.svg||!o.Browser.vml)&&o.DomUtil.addClass(this._path,"leaflet-clickable"),o.DomEvent.on(this._container,"click",this._onMouseClick,this);for(var t=["dblclick","mousedown","mouseover","mouseout","mousemove","contextmenu"],e=0;e';var i=t.firstChild;return i.style.behavior="url(#default#VML)",i&&"object"==typeof i.adj}catch(n){return!1}}(),o.Path=o.Browser.svg||!o.Browser.vml?o.Path:o.Path.extend({statics:{VML:!0,CLIP_PADDING:.02},_createElement:function(){try{return e.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return e.createElement("')}}catch(t){return function(t){return e.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),_initPath:function(){var t=this._container=this._createElement("shape");o.DomUtil.addClass(t,"leaflet-vml-shape"+(this.options.className?" "+this.options.className:"")),this.options.clickable&&o.DomUtil.addClass(t,"leaflet-clickable"),t.coordsize="1 1",this._path=this._createElement("path"),t.appendChild(this._path),this._map._pathRoot.appendChild(t)},_initStyle:function(){this._updateStyle()},_updateStyle:function(){var t=this._stroke,e=this._fill,i=this.options,n=this._container;n.stroked=i.stroke,n.filled=i.fill,i.stroke?(t||(t=this._stroke=this._createElement("stroke"),t.endcap="round",n.appendChild(t)),t.weight=i.weight+"px",t.color=i.color,t.opacity=i.opacity,i.dashArray?t.dashStyle=o.Util.isArray(i.dashArray)?i.dashArray.join(" "):i.dashArray.replace(/( *, *)/g," "):t.dashStyle="",i.lineCap&&(t.endcap=i.lineCap.replace("butt","flat")),i.lineJoin&&(t.joinstyle=i.lineJoin)):t&&(n.removeChild(t),this._stroke=null),i.fill?(e||(e=this._fill=this._createElement("fill"),n.appendChild(e)),e.color=i.fillColor||i.color,e.opacity=i.fillOpacity):e&&(n.removeChild(e),this._fill=null)},_updatePath:function(){var t=this._container.style;t.display="none",this._path.v=this.getPathString()+" ",t.display=""}}),o.Map.include(o.Browser.svg||!o.Browser.vml?{}:{_initPathRoot:function(){if(!this._pathRoot){var t=this._pathRoot=e.createElement("div");t.className="leaflet-vml-container",this._panes.overlayPane.appendChild(t),this.on("moveend",this._updatePathViewport),this._updatePathViewport()}}}),o.Browser.canvas=function(){return!!e.createElement("canvas").getContext}(),o.Path=o.Path.SVG&&!t.L_PREFER_CANVAS||!o.Browser.canvas?o.Path:o.Path.extend({statics:{CANVAS:!0,SVG:!1},redraw:function(){return this._map&&(this.projectLatlngs(),this._requestUpdate()),this},setStyle:function(t){return o.setOptions(this,t),this._map&&(this._updateStyle(),this._requestUpdate()),this},onRemove:function(t){t.off("viewreset",this.projectLatlngs,this).off("moveend",this._updatePath,this),this.options.clickable&&(this._map.off("click",this._onClick,this),this._map.off("mousemove",this._onMouseMove,this)),this._requestUpdate(),this.fire("remove"),this._map=null},_requestUpdate:function(){this._map&&!o.Path._updateRequest&&(o.Path._updateRequest=o.Util.requestAnimFrame(this._fireMapMoveEnd,this._map))},_fireMapMoveEnd:function(){o.Path._updateRequest=null,this.fire("moveend")},_initElements:function(){this._map._initPathRoot(),this._ctx=this._map._canvasCtx},_updateStyle:function(){var t=this.options;t.stroke&&(this._ctx.lineWidth=t.weight,this._ctx.strokeStyle=t.color),t.fill&&(this._ctx.fillStyle=t.fillColor||t.color),t.lineCap&&(this._ctx.lineCap=t.lineCap),t.lineJoin&&(this._ctx.lineJoin=t.lineJoin)},_drawPath:function(){var t,e,i,n,s,a;for(this._ctx.beginPath(),t=0,i=this._parts.length;i>t;t++){for(e=0,n=this._parts[t].length;n>e;e++)s=this._parts[t][e],a=(0===e?"move":"line")+"To",this._ctx[a](s.x,s.y);this instanceof o.Polygon&&this._ctx.closePath()}},_checkIfEmpty:function(){return!this._parts.length},_updatePath:function(){if(!this._checkIfEmpty()){var t=this._ctx,e=this.options;this._drawPath(),t.save(),this._updateStyle(),e.fill&&(t.globalAlpha=e.fillOpacity,t.fill(e.fillRule||"evenodd")),e.stroke&&(t.globalAlpha=e.opacity,t.stroke()),t.restore()}},_initEvents:function(){this.options.clickable&&(this._map.on("mousemove",this._onMouseMove,this),this._map.on("click dblclick contextmenu",this._fireMouseEvent,this))},_fireMouseEvent:function(t){this._containsPoint(t.layerPoint)&&this.fire(t.type,t)},_onMouseMove:function(t){this._map&&!this._map._animatingZoom&&(this._containsPoint(t.layerPoint)?(this._ctx.canvas.style.cursor="pointer",this._mouseInside=!0,this.fire("mouseover",t)):this._mouseInside&&(this._ctx.canvas.style.cursor="",this._mouseInside=!1,this.fire("mouseout",t)))}}),o.Map.include(o.Path.SVG&&!t.L_PREFER_CANVAS||!o.Browser.canvas?{}:{_initPathRoot:function(){var t,i=this._pathRoot;i||(i=this._pathRoot=e.createElement("canvas"),i.style.position="absolute",t=this._canvasCtx=i.getContext("2d"),t.lineCap="round",t.lineJoin="round",this._panes.overlayPane.appendChild(i),this.options.zoomAnimation&&(this._pathRoot.className="leaflet-zoom-animated",this.on("zoomanim",this._animatePathZoom),this.on("zoomend",this._endPathZoom)),this.on("moveend",this._updateCanvasViewport),this._updateCanvasViewport())},_updateCanvasViewport:function(){if(!this._pathZooming){this._updatePathViewport();var t=this._pathViewport,e=t.min,i=t.max.subtract(e),n=this._pathRoot;o.DomUtil.setPosition(n,e),n.width=i.x,n.height=i.y,n.getContext("2d").translate(-e.x,-e.y)}}}),o.LineUtil={simplify:function(t,e){if(!e||!t.length)return t.slice();var i=e*e;return t=this._reducePoints(t,i),t=this._simplifyDP(t,i)},pointToSegmentDistance:function(t,e,i){return Math.sqrt(this._sqClosestPointOnSegment(t,e,i,!0))},closestPointOnSegment:function(t,e,i){return this._sqClosestPointOnSegment(t,e,i)},_simplifyDP:function(t,e){var n=t.length,o=typeof Uint8Array!=i+""?Uint8Array:Array,s=new o(n);s[0]=s[n-1]=1,this._simplifyDPStep(t,s,e,0,n-1);var a,r=[];for(a=0;n>a;a++)s[a]&&r.push(t[a]);return r},_simplifyDPStep:function(t,e,i,n,o){var s,a,r,h=0;for(a=n+1;o-1>=a;a++)r=this._sqClosestPointOnSegment(t[a],t[n],t[o],!0),r>h&&(s=a,h=r);h>i&&(e[s]=1,this._simplifyDPStep(t,e,i,n,s),this._simplifyDPStep(t,e,i,s,o))},_reducePoints:function(t,e){for(var i=[t[0]],n=1,o=0,s=t.length;s>n;n++)this._sqDist(t[n],t[o])>e&&(i.push(t[n]),o=n);return s-1>o&&i.push(t[s-1]),i},clipSegment:function(t,e,i,n){var o,s,a,r=n?this._lastCode:this._getBitCode(t,i),h=this._getBitCode(e,i);for(this._lastCode=h;;){if(!(r|h))return[t,e];if(r&h)return!1;o=r||h,s=this._getEdgeIntersection(t,e,o,i),a=this._getBitCode(s,i),o===r?(t=s,r=a):(e=s,h=a)}},_getEdgeIntersection:function(t,e,i,n){var s=e.x-t.x,a=e.y-t.y,r=n.min,h=n.max;return 8&i?new o.Point(t.x+s*(h.y-t.y)/a,h.y):4&i?new o.Point(t.x+s*(r.y-t.y)/a,r.y):2&i?new o.Point(h.x,t.y+a*(h.x-t.x)/s):1&i?new o.Point(r.x,t.y+a*(r.x-t.x)/s):void 0},_getBitCode:function(t,e){var i=0;return t.xe.max.x&&(i|=2),t.ye.max.y&&(i|=8),i},_sqDist:function(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n},_sqClosestPointOnSegment:function(t,e,i,n){var s,a=e.x,r=e.y,h=i.x-a,l=i.y-r,u=h*h+l*l;return u>0&&(s=((t.x-a)*h+(t.y-r)*l)/u,s>1?(a=i.x,r=i.y):s>0&&(a+=h*s,r+=l*s)),h=t.x-a,l=t.y-r,n?h*h+l*l:new o.Point(a,r)}},o.Polyline=o.Path.extend({initialize:function(t,e){o.Path.prototype.initialize.call(this,e),this._latlngs=this._convertLatLngs(t)},options:{smoothFactor:1,noClip:!1},projectLatlngs:function(){this._originalPoints=[];for(var t=0,e=this._latlngs.length;e>t;t++)this._originalPoints[t]=this._map.latLngToLayerPoint(this._latlngs[t])},getPathString:function(){for(var t=0,e=this._parts.length,i="";e>t;t++)i+=this._getPathPartStr(this._parts[t]);return i},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._latlngs=this._convertLatLngs(t),this.redraw()},addLatLng:function(t){return this._latlngs.push(o.latLng(t)),this.redraw()},spliceLatLngs:function(){var t=[].splice.apply(this._latlngs,arguments);return this._convertLatLngs(this._latlngs,!0),this.redraw(),t},closestLayerPoint:function(t){for(var e,i,n=1/0,s=this._parts,a=null,r=0,h=s.length;h>r;r++)for(var l=s[r],u=1,c=l.length;c>u;u++){e=l[u-1],i=l[u];var d=o.LineUtil._sqClosestPointOnSegment(t,e,i,!0);n>d&&(n=d,a=o.LineUtil._sqClosestPointOnSegment(t,e,i))}return a&&(a.distance=Math.sqrt(n)),a},getBounds:function(){return new o.LatLngBounds(this.getLatLngs())},_convertLatLngs:function(t,e){var i,n,s=e?t:[];for(i=0,n=t.length;n>i;i++){if(o.Util.isArray(t[i])&&"number"!=typeof t[i][0])return;s[i]=o.latLng(t[i])}return s},_initEvents:function(){o.Path.prototype._initEvents.call(this)},_getPathPartStr:function(t){for(var e,i=o.Path.VML,n=0,s=t.length,a="";s>n;n++)e=t[n],i&&e._round(),a+=(n?"L":"M")+e.x+" "+e.y;return a},_clipPoints:function(){var t,e,i,n=this._originalPoints,s=n.length;if(this.options.noClip)return void(this._parts=[n]);this._parts=[];var a=this._parts,r=this._map._pathViewport,h=o.LineUtil;for(t=0,e=0;s-1>t;t++)i=h.clipSegment(n[t],n[t+1],r,t),i&&(a[e]=a[e]||[],a[e].push(i[0]),(i[1]!==n[t+1]||t===s-2)&&(a[e].push(i[1]),e++))},_simplifyPoints:function(){for(var t=this._parts,e=o.LineUtil,i=0,n=t.length;n>i;i++)t[i]=e.simplify(t[i],this.options.smoothFactor)},_updatePath:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),o.Path.prototype._updatePath.call(this))}}),o.polyline=function(t,e){return new o.Polyline(t,e)},o.PolyUtil={},o.PolyUtil.clipPolygon=function(t,e){var i,n,s,a,r,h,l,u,c,d=[1,4,2,8],p=o.LineUtil;for(n=0,l=t.length;l>n;n++)t[n]._code=p._getBitCode(t[n],e);for(a=0;4>a;a++){for(u=d[a],i=[],n=0,l=t.length,s=l-1;l>n;s=n++)r=t[n],h=t[s],r._code&u?h._code&u||(c=p._getEdgeIntersection(h,r,u,e),c._code=p._getBitCode(c,e),i.push(c)):(h._code&u&&(c=p._getEdgeIntersection(h,r,u,e),c._code=p._getBitCode(c,e),i.push(c)),i.push(r));t=i}return t},o.Polygon=o.Polyline.extend({options:{fill:!0},initialize:function(t,e){o.Polyline.prototype.initialize.call(this,t,e),this._initWithHoles(t)},_initWithHoles:function(t){var e,i,n;if(t&&o.Util.isArray(t[0])&&"number"!=typeof t[0][0])for(this._latlngs=this._convertLatLngs(t[0]),this._holes=t.slice(1),e=0,i=this._holes.length;i>e;e++)n=this._holes[e]=this._convertLatLngs(this._holes[e]),n[0].equals(n[n.length-1])&&n.pop();t=this._latlngs,t.length>=2&&t[0].equals(t[t.length-1])&&t.pop()},projectLatlngs:function(){if(o.Polyline.prototype.projectLatlngs.call(this),this._holePoints=[],this._holes){var t,e,i,n;for(t=0,i=this._holes.length;i>t;t++)for(this._holePoints[t]=[],e=0,n=this._holes[t].length;n>e;e++)this._holePoints[t][e]=this._map.latLngToLayerPoint(this._holes[t][e])}},setLatLngs:function(t){return t&&o.Util.isArray(t[0])&&"number"!=typeof t[0][0]?(this._initWithHoles(t),this.redraw()):o.Polyline.prototype.setLatLngs.call(this,t)},_clipPoints:function(){var t=this._originalPoints,e=[];if(this._parts=[t].concat(this._holePoints),!this.options.noClip){for(var i=0,n=this._parts.length;n>i;i++){var s=o.PolyUtil.clipPolygon(this._parts[i],this._map._pathViewport);s.length&&e.push(s)}this._parts=e}},_getPathPartStr:function(t){var e=o.Polyline.prototype._getPathPartStr.call(this,t);return e+(o.Browser.svg?"z":"x")}}),o.polygon=function(t,e){return new o.Polygon(t,e)},function(){function t(t){return o.FeatureGroup.extend({initialize:function(t,e){this._layers={},this._options=e,this.setLatLngs(t)},setLatLngs:function(e){var i=0,n=e.length;for(this.eachLayer(function(t){n>i?t.setLatLngs(e[i++]):this.removeLayer(t)},this);n>i;)this.addLayer(new t(e[i++],this._options));return this},getLatLngs:function(){var t=[];return this.eachLayer(function(e){t.push(e.getLatLngs())}),t}})}o.MultiPolyline=t(o.Polyline),o.MultiPolygon=t(o.Polygon),o.multiPolyline=function(t,e){return new o.MultiPolyline(t,e)},o.multiPolygon=function(t,e){return new o.MultiPolygon(t,e)}}(),o.Rectangle=o.Polygon.extend({initialize:function(t,e){o.Polygon.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return t=o.latLngBounds(t),[t.getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}}),o.rectangle=function(t,e){return new o.Rectangle(t,e)},o.Circle=o.Path.extend({initialize:function(t,e,i){o.Path.prototype.initialize.call(this,i),this._latlng=o.latLng(t),this._mRadius=e},options:{fill:!0},setLatLng:function(t){return this._latlng=o.latLng(t),this.redraw()},setRadius:function(t){return this._mRadius=t,this.redraw()},projectLatlngs:function(){var t=this._getLngRadius(),e=this._latlng,i=this._map.latLngToLayerPoint([e.lat,e.lng-t]);this._point=this._map.latLngToLayerPoint(e),this._radius=Math.max(this._point.x-i.x,1)},getBounds:function(){var t=this._getLngRadius(),e=this._mRadius/40075017*360,i=this._latlng;return new o.LatLngBounds([i.lat-e,i.lng-t],[i.lat+e,i.lng+t])},getLatLng:function(){return this._latlng},getPathString:function(){var t=this._point,e=this._radius;return this._checkIfEmpty()?"":o.Browser.svg?"M"+t.x+","+(t.y-e)+"A"+e+","+e+",0,1,1,"+(t.x-.1)+","+(t.y-e)+" z":(t._round(),e=Math.round(e),"AL "+t.x+","+t.y+" "+e+","+e+" 0,23592600")},getRadius:function(){return this._mRadius},_getLatRadius:function(){return this._mRadius/40075017*360},_getLngRadius:function(){return this._getLatRadius()/Math.cos(o.LatLng.DEG_TO_RAD*this._latlng.lat)},_checkIfEmpty:function(){if(!this._map)return!1;var t=this._map._pathViewport,e=this._radius,i=this._point;return i.x-e>t.max.x||i.y-e>t.max.y||i.x+ei;i++)for(l=this._parts[i],n=0,r=l.length,s=r-1;r>n;s=n++)if((e||0!==n)&&(h=o.LineUtil.pointToSegmentDistance(t,l[s],l[n]),u>=h))return!0;return!1}}:{}),o.Polygon.include(o.Path.CANVAS?{_containsPoint:function(t){var e,i,n,s,a,r,h,l,u=!1;if(o.Polyline.prototype._containsPoint.call(this,t,!0))return!0;for(s=0,h=this._parts.length;h>s;s++)for(e=this._parts[s],a=0,l=e.length,r=l-1;l>a;r=a++)i=e[a],n=e[r],i.y>t.y!=n.y>t.y&&t.x<(n.x-i.x)*(t.y-i.y)/(n.y-i.y)+i.x&&(u=!u);return u}}:{}),o.Circle.include(o.Path.CANVAS?{_drawPath:function(){var t=this._point;this._ctx.beginPath(),this._ctx.arc(t.x,t.y,this._radius,0,2*Math.PI,!1)},_containsPoint:function(t){var e=this._point,i=this.options.stroke?this.options.weight/2:0;return t.distanceTo(e)<=this._radius+i}}:{}),o.CircleMarker.include(o.Path.CANVAS?{_updateStyle:function(){o.Path.prototype._updateStyle.call(this)}}:{}),o.GeoJSON=o.FeatureGroup.extend({initialize:function(t,e){o.setOptions(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,i,n,s=o.Util.isArray(t)?t:t.features;if(s){for(e=0,i=s.length;i>e;e++)n=s[e],(n.geometries||n.geometry||n.features||n.coordinates)&&this.addData(s[e]);return this}var a=this.options;if(!a.filter||a.filter(t)){var r=o.GeoJSON.geometryToLayer(t,a.pointToLayer,a.coordsToLatLng,a);return r.feature=o.GeoJSON.asFeature(t),r.defaultOptions=r.options,this.resetStyle(r),a.onEachFeature&&a.onEachFeature(t,r),this.addLayer(r)}},resetStyle:function(t){var e=this.options.style;e&&(o.Util.extend(t.options,t.defaultOptions),this._setLayerStyle(t,e))},setStyle:function(t){this.eachLayer(function(e){this._setLayerStyle(e,t)},this)},_setLayerStyle:function(t,e){"function"==typeof e&&(e=e(t.feature)),t.setStyle&&t.setStyle(e)}}),o.extend(o.GeoJSON,{geometryToLayer:function(t,e,i,n){var s,a,r,h,l="Feature"===t.type?t.geometry:t,u=l.coordinates,c=[];switch(i=i||this.coordsToLatLng,l.type){case"Point":return s=i(u),e?e(t,s):new o.Marker(s);case"MultiPoint":for(r=0,h=u.length;h>r;r++)s=i(u[r]),c.push(e?e(t,s):new o.Marker(s));return new o.FeatureGroup(c);case"LineString":return a=this.coordsToLatLngs(u,0,i),new o.Polyline(a,n);case"Polygon":if(2===u.length&&!u[1].length)throw new Error("Invalid GeoJSON object.");return a=this.coordsToLatLngs(u,1,i),new o.Polygon(a,n);case"MultiLineString":return a=this.coordsToLatLngs(u,1,i),new o.MultiPolyline(a,n);case"MultiPolygon":return a=this.coordsToLatLngs(u,2,i),new o.MultiPolygon(a,n);case"GeometryCollection":for(r=0,h=l.geometries.length;h>r;r++)c.push(this.geometryToLayer({geometry:l.geometries[r],type:"Feature",properties:t.properties},e,i,n));return new o.FeatureGroup(c);default:throw new Error("Invalid GeoJSON object.")}},coordsToLatLng:function(t){return new o.LatLng(t[1],t[0],t[2])},coordsToLatLngs:function(t,e,i){var n,o,s,a=[];for(o=0,s=t.length;s>o;o++)n=e?this.coordsToLatLngs(t[o],e-1,i):(i||this.coordsToLatLng)(t[o]),a.push(n);return a},latLngToCoords:function(t){var e=[t.lng,t.lat];return t.alt!==i&&e.push(t.alt),e},latLngsToCoords:function(t){for(var e=[],i=0,n=t.length;n>i;i++)e.push(o.GeoJSON.latLngToCoords(t[i]));return e},getFeature:function(t,e){return t.feature?o.extend({},t.feature,{geometry:e}):o.GeoJSON.asFeature(e)},asFeature:function(t){return"Feature"===t.type?t:{type:"Feature",properties:{},geometry:t}}});var a={toGeoJSON:function(){return o.GeoJSON.getFeature(this,{type:"Point",coordinates:o.GeoJSON.latLngToCoords(this.getLatLng())})}};o.Marker.include(a),o.Circle.include(a),o.CircleMarker.include(a),o.Polyline.include({toGeoJSON:function(){return o.GeoJSON.getFeature(this,{type:"LineString",coordinates:o.GeoJSON.latLngsToCoords(this.getLatLngs())})}}),o.Polygon.include({toGeoJSON:function(){var t,e,i,n=[o.GeoJSON.latLngsToCoords(this.getLatLngs())];if(n[0].push(n[0][0]),this._holes)for(t=0,e=this._holes.length;e>t;t++)i=o.GeoJSON.latLngsToCoords(this._holes[t]),i.push(i[0]),n.push(i);return o.GeoJSON.getFeature(this,{type:"Polygon",coordinates:n})}}),function(){function t(t){return function(){var e=[];return this.eachLayer(function(t){e.push(t.toGeoJSON().geometry.coordinates)}),o.GeoJSON.getFeature(this,{type:t,coordinates:e})}}o.MultiPolyline.include({toGeoJSON:t("MultiLineString")}),o.MultiPolygon.include({toGeoJSON:t("MultiPolygon")}),o.LayerGroup.include({toGeoJSON:function(){var e,i=this.feature&&this.feature.geometry,n=[];if(i&&"MultiPoint"===i.type)return t("MultiPoint").call(this);var s=i&&"GeometryCollection"===i.type;return this.eachLayer(function(t){t.toGeoJSON&&(e=t.toGeoJSON(),n.push(s?e.geometry:o.GeoJSON.asFeature(e)))}),s?o.GeoJSON.getFeature(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}})}(),o.geoJson=function(t,e){return new o.GeoJSON(t,e)},o.DomEvent={addListener:function(t,e,i,n){var s,a,r,h=o.stamp(i),l="_leaflet_"+e+h;return t[l]?this:(s=function(e){return i.call(n||t,e||o.DomEvent._getEvent())},o.Browser.pointer&&0===e.indexOf("touch")?this.addPointerListener(t,e,s,h):(o.Browser.touch&&"dblclick"===e&&this.addDoubleTapListener&&this.addDoubleTapListener(t,s,h),"addEventListener"in t?"mousewheel"===e?(t.addEventListener("DOMMouseScroll",s,!1),t.addEventListener(e,s,!1)):"mouseenter"===e||"mouseleave"===e?(a=s,r="mouseenter"===e?"mouseover":"mouseout",s=function(e){return o.DomEvent._checkMouse(t,e)?a(e):void 0},t.addEventListener(r,s,!1)):"click"===e&&o.Browser.android?(a=s,s=function(t){return o.DomEvent._filterClick(t,a)},t.addEventListener(e,s,!1)):t.addEventListener(e,s,!1):"attachEvent"in t&&t.attachEvent("on"+e,s),t[l]=s,this))},removeListener:function(t,e,i){var n=o.stamp(i),s="_leaflet_"+e+n,a=t[s];return a?(o.Browser.pointer&&0===e.indexOf("touch")?this.removePointerListener(t,e,n):o.Browser.touch&&"dblclick"===e&&this.removeDoubleTapListener?this.removeDoubleTapListener(t,n):"removeEventListener"in t?"mousewheel"===e?(t.removeEventListener("DOMMouseScroll",a,!1),t.removeEventListener(e,a,!1)):"mouseenter"===e||"mouseleave"===e?t.removeEventListener("mouseenter"===e?"mouseover":"mouseout",a,!1):t.removeEventListener(e,a,!1):"detachEvent"in t&&t.detachEvent("on"+e,a),t[s]=null,this):this},stopPropagation:function(t){return t.stopPropagation?t.stopPropagation():t.cancelBubble=!0,o.DomEvent._skipped(t),this},disableScrollPropagation:function(t){var e=o.DomEvent.stopPropagation;return o.DomEvent.on(t,"mousewheel",e).on(t,"MozMousePixelScroll",e)},disableClickPropagation:function(t){for(var e=o.DomEvent.stopPropagation,i=o.Draggable.START.length-1;i>=0;i--)o.DomEvent.on(t,o.Draggable.START[i],e);return o.DomEvent.on(t,"click",o.DomEvent._fakeStop).on(t,"dblclick",e)},preventDefault:function(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this},stop:function(t){return o.DomEvent.preventDefault(t).stopPropagation(t)},getMousePosition:function(t,e){if(!e)return new o.Point(t.clientX,t.clientY);var i=e.getBoundingClientRect();return new o.Point(t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop)},getWheelDelta:function(t){var e=0;return t.wheelDelta&&(e=t.wheelDelta/120),t.detail&&(e=-t.detail/3),e},_skipEvents:{},_fakeStop:function(t){o.DomEvent._skipEvents[t.type]=!0},_skipped:function(t){var e=this._skipEvents[t.type];return this._skipEvents[t.type]=!1,e},_checkMouse:function(t,e){var i=e.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch(n){return!1}return i!==t},_getEvent:function(){var e=t.event;if(!e)for(var i=arguments.callee.caller;i&&(e=i.arguments[0],!e||t.Event!==e.constructor);)i=i.caller;return e},_filterClick:function(t,e){var i=t.timeStamp||t.originalEvent.timeStamp,n=o.DomEvent._lastClick&&i-o.DomEvent._lastClick;return n&&n>100&&500>n||t.target._simulatedClick&&!t._simulated?void o.DomEvent.stop(t):(o.DomEvent._lastClick=i,e(t))}},o.DomEvent.on=o.DomEvent.addListener,o.DomEvent.off=o.DomEvent.removeListener,o.Draggable=o.Class.extend({includes:o.Mixin.Events,statics:{START:o.Browser.touch?["touchstart","mousedown"]:["mousedown"],END:{mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},MOVE:{mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"}},initialize:function(t,e){this._element=t,this._dragStartTarget=e||t},enable:function(){if(!this._enabled){for(var t=o.Draggable.START.length-1;t>=0;t--)o.DomEvent.on(this._dragStartTarget,o.Draggable.START[t],this._onDown,this);this._enabled=!0}},disable:function(){if(this._enabled){for(var t=o.Draggable.START.length-1;t>=0;t--)o.DomEvent.off(this._dragStartTarget,o.Draggable.START[t],this._onDown,this);this._enabled=!1,this._moved=!1}},_onDown:function(t){if(this._moved=!1,!t.shiftKey&&(1===t.which||1===t.button||t.touches)&&(o.DomEvent.stopPropagation(t),!o.Draggable._disabled&&(o.DomUtil.disableImageDrag(),o.DomUtil.disableTextSelection(),!this._moving))){var i=t.touches?t.touches[0]:t;this._startPoint=new o.Point(i.clientX,i.clientY),this._startPos=this._newPos=o.DomUtil.getPosition(this._element),o.DomEvent.on(e,o.Draggable.MOVE[t.type],this._onMove,this).on(e,o.Draggable.END[t.type],this._onUp,this)}},_onMove:function(t){if(t.touches&&t.touches.length>1)return void(this._moved=!0);var i=t.touches&&1===t.touches.length?t.touches[0]:t,n=new o.Point(i.clientX,i.clientY),s=n.subtract(this._startPoint);(s.x||s.y)&&(o.Browser.touch&&Math.abs(s.x)+Math.abs(s.y)<3||(o.DomEvent.preventDefault(t),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=o.DomUtil.getPosition(this._element).subtract(s),o.DomUtil.addClass(e.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,o.DomUtil.addClass(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(s),this._moving=!0,o.Util.cancelAnimFrame(this._animRequest),this._animRequest=o.Util.requestAnimFrame(this._updatePosition,this,!0,this._dragStartTarget)))},_updatePosition:function(){this.fire("predrag"),o.DomUtil.setPosition(this._element,this._newPos),this.fire("drag")},_onUp:function(){o.DomUtil.removeClass(e.body,"leaflet-dragging"),this._lastTarget&&(o.DomUtil.removeClass(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null);for(var t in o.Draggable.MOVE)o.DomEvent.off(e,o.Draggable.MOVE[t],this._onMove).off(e,o.Draggable.END[t],this._onUp);o.DomUtil.enableImageDrag(),o.DomUtil.enableTextSelection(),this._moved&&this._moving&&(o.Util.cancelAnimFrame(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1}}),o.Handler=o.Class.extend({initialize:function(t){this._map=t},enable:function(){this._enabled||(this._enabled=!0,this.addHooks())},disable:function(){this._enabled&&(this._enabled=!1,this.removeHooks())},enabled:function(){return!!this._enabled}}),o.Map.mergeOptions({dragging:!0,inertia:!o.Browser.android23,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,inertiaThreshold:o.Browser.touch?32:18,easeLinearity:.25,worldCopyJump:!1}),o.Map.Drag=o.Handler.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new o.Draggable(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDrag,this),t.on("viewreset",this._onViewReset,this),t.whenReady(this._onViewReset,this))}this._draggable.enable()},removeHooks:function(){this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},_onDragStart:function(){var t=this._map;t._panAnim&&t._panAnim.stop(),t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(){if(this._map.options.inertia){var t=this._lastTime=+new Date,e=this._lastPos=this._draggable._newPos;this._positions.push(e),this._times.push(t),t-this._times[0]>200&&(this._positions.shift(),this._times.shift())}this._map.fire("move").fire("drag")},_onViewReset:function(){var t=this._map.getSize()._divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.project([0,180]).x},_onPreDrag:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-e+i)%t+e-i,s=(n+e+i)%t-e-i,a=Math.abs(o+i)i.inertiaThreshold||!this._positions[0];if(e.fire("dragend",t),s)e.fire("moveend");else{var a=this._lastPos.subtract(this._positions[0]),r=(this._lastTime+n-this._times[0])/1e3,h=i.easeLinearity,l=a.multiplyBy(h/r),u=l.distanceTo([0,0]),c=Math.min(i.inertiaMaxSpeed,u),d=l.multiplyBy(c/u),p=c/(i.inertiaDeceleration*h),_=d.multiplyBy(-p/2).round();_.x&&_.y?(_=e._limitOffset(_,e.options.maxBounds),o.Util.requestAnimFrame(function(){e.panBy(_,{duration:p,easeLinearity:h,noMoveStart:!0})})):e.fire("moveend")}}}),o.Map.addInitHook("addHandler","dragging",o.Map.Drag),o.Map.mergeOptions({doubleClickZoom:!0}),o.Map.DoubleClickZoom=o.Handler.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,i=e.getZoom()+(t.originalEvent.shiftKey?-1:1);"center"===e.options.doubleClickZoom?e.setZoom(i):e.setZoomAround(t.containerPoint,i)}}),o.Map.addInitHook("addHandler","doubleClickZoom",o.Map.DoubleClickZoom),o.Map.mergeOptions({scrollWheelZoom:!0}),o.Map.ScrollWheelZoom=o.Handler.extend({addHooks:function(){o.DomEvent.on(this._map._container,"mousewheel",this._onWheelScroll,this),o.DomEvent.on(this._map._container,"MozMousePixelScroll",o.DomEvent.preventDefault),this._delta=0},removeHooks:function(){o.DomEvent.off(this._map._container,"mousewheel",this._onWheelScroll),o.DomEvent.off(this._map._container,"MozMousePixelScroll",o.DomEvent.preventDefault)},_onWheelScroll:function(t){var e=o.DomEvent.getWheelDelta(t);this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var i=Math.max(40-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(o.bind(this._performZoom,this),i),o.DomEvent.preventDefault(t),o.DomEvent.stopPropagation(t)},_performZoom:function(){var t=this._map,e=this._delta,i=t.getZoom();e=e>0?Math.ceil(e):Math.floor(e),e=Math.max(Math.min(e,4),-4),e=t._limitZoom(i+e)-i,this._delta=0,this._startTime=null,e&&("center"===t.options.scrollWheelZoom?t.setZoom(i+e):t.setZoomAround(this._lastMousePos,i+e))}}),o.Map.addInitHook("addHandler","scrollWheelZoom",o.Map.ScrollWheelZoom),o.extend(o.DomEvent,{_touchstart:o.Browser.msPointer?"MSPointerDown":o.Browser.pointer?"pointerdown":"touchstart",_touchend:o.Browser.msPointer?"MSPointerUp":o.Browser.pointer?"pointerup":"touchend",addDoubleTapListener:function(t,i,n){function s(t){var e;if(o.Browser.pointer?(_.push(t.pointerId),e=_.length):e=t.touches.length,!(e>1)){var i=Date.now(),n=i-(r||i);h=t.touches?t.touches[0]:t,l=n>0&&u>=n,r=i}}function a(t){if(o.Browser.pointer){var e=_.indexOf(t.pointerId);if(-1===e)return;_.splice(e,1)}if(l){if(o.Browser.pointer){var n,s={};for(var a in h)n=h[a],"function"==typeof n?s[a]=n.bind(h):s[a]=n;h=s}h.type="dblclick",i(h),r=null}}var r,h,l=!1,u=250,c="_leaflet_",d=this._touchstart,p=this._touchend,_=[];t[c+d+n]=s,t[c+p+n]=a;var m=o.Browser.pointer?e.documentElement:t;return t.addEventListener(d,s,!1),m.addEventListener(p,a,!1),o.Browser.pointer&&m.addEventListener(o.DomEvent.POINTER_CANCEL,a,!1),this},removeDoubleTapListener:function(t,i){var n="_leaflet_";return t.removeEventListener(this._touchstart,t[n+this._touchstart+i],!1),(o.Browser.pointer?e.documentElement:t).removeEventListener(this._touchend,t[n+this._touchend+i],!1),o.Browser.pointer&&e.documentElement.removeEventListener(o.DomEvent.POINTER_CANCEL,t[n+this._touchend+i],!1),this}}),o.extend(o.DomEvent,{POINTER_DOWN:o.Browser.msPointer?"MSPointerDown":"pointerdown",POINTER_MOVE:o.Browser.msPointer?"MSPointerMove":"pointermove",POINTER_UP:o.Browser.msPointer?"MSPointerUp":"pointerup",POINTER_CANCEL:o.Browser.msPointer?"MSPointerCancel":"pointercancel",_pointers:[],_pointerDocumentListener:!1,addPointerListener:function(t,e,i,n){switch(e){case"touchstart":return this.addPointerListenerStart(t,e,i,n);case"touchend":return this.addPointerListenerEnd(t,e,i,n);case"touchmove":return this.addPointerListenerMove(t,e,i,n);default:throw"Unknown touch event type"}},addPointerListenerStart:function(t,i,n,s){var a="_leaflet_",r=this._pointers,h=function(t){"mouse"!==t.pointerType&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE&&o.DomEvent.preventDefault(t);for(var e=!1,i=0;i1))&&(this._moved||(o.DomUtil.addClass(e._mapPane,"leaflet-touching"),e.fire("movestart").fire("zoomstart"),this._moved=!0),o.Util.cancelAnimFrame(this._animRequest),this._animRequest=o.Util.requestAnimFrame(this._updateOnMove,this,!0,this._map._container),o.DomEvent.preventDefault(t))}},_updateOnMove:function(){var t=this._map,e=this._getScaleOrigin(),i=t.layerPointToLatLng(e),n=t.getScaleZoom(this._scale);t._animateZoom(i,n,this._startCenter,this._scale,this._delta,!1,!0)},_onTouchEnd:function(){if(!this._moved||!this._zooming)return void(this._zooming=!1);var t=this._map;this._zooming=!1,o.DomUtil.removeClass(t._mapPane,"leaflet-touching"),o.Util.cancelAnimFrame(this._animRequest),o.DomEvent.off(e,"touchmove",this._onTouchMove).off(e,"touchend",this._onTouchEnd);var i=this._getScaleOrigin(),n=t.layerPointToLatLng(i),s=t.getZoom(),a=t.getScaleZoom(this._scale)-s,r=a>0?Math.ceil(a):Math.floor(a),h=t._limitZoom(s+r),l=t.getZoomScale(h)/this._scale;t._animateZoom(n,h,i,l)},_getScaleOrigin:function(){var t=this._centerOffset.subtract(this._delta).divideBy(this._scale);return this._startCenter.add(t)}}),o.Map.addInitHook("addHandler","touchZoom",o.Map.TouchZoom),o.Map.mergeOptions({tap:!0,tapTolerance:15}),o.Map.Tap=o.Handler.extend({addHooks:function(){o.DomEvent.on(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){o.DomEvent.off(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(o.DomEvent.preventDefault(t),this._fireClick=!0,t.touches.length>1)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var i=t.touches[0],n=i.target;this._startPos=this._newPos=new o.Point(i.clientX,i.clientY),n.tagName&&"a"===n.tagName.toLowerCase()&&o.DomUtil.addClass(n,"leaflet-active"),this._holdTimeout=setTimeout(o.bind(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",i))},this),1e3),o.DomEvent.on(e,"touchmove",this._onMove,this).on(e,"touchend",this._onUp,this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),o.DomEvent.off(e,"touchmove",this._onMove,this).off(e,"touchend",this._onUp,this),this._fireClick&&t&&t.changedTouches){var i=t.changedTouches[0],n=i.target;n&&n.tagName&&"a"===n.tagName.toLowerCase()&&o.DomUtil.removeClass(n,"leaflet-active"),this._isTapValid()&&this._simulateEvent("click",i)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var e=t.touches[0];this._newPos=new o.Point(e.clientX,e.clientY)},_simulateEvent:function(i,n){var o=e.createEvent("MouseEvents");o._simulated=!0,n.target._simulatedClick=!0,o.initMouseEvent(i,!0,!0,t,1,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),n.target.dispatchEvent(o)}}),o.Browser.touch&&!o.Browser.pointer&&o.Map.addInitHook("addHandler","tap",o.Map.Tap),o.Map.mergeOptions({boxZoom:!0}),o.Map.BoxZoom=o.Handler.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._moved=!1},addHooks:function(){o.DomEvent.on(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){o.DomEvent.off(this._container,"mousedown",this._onMouseDown),this._moved=!1},moved:function(){return this._moved},_onMouseDown:function(t){return this._moved=!1,!t.shiftKey||1!==t.which&&1!==t.button?!1:(o.DomUtil.disableTextSelection(),o.DomUtil.disableImageDrag(),this._startLayerPoint=this._map.mouseEventToLayerPoint(t),void o.DomEvent.on(e,"mousemove",this._onMouseMove,this).on(e,"mouseup",this._onMouseUp,this).on(e,"keydown",this._onKeyDown,this))},_onMouseMove:function(t){this._moved||(this._box=o.DomUtil.create("div","leaflet-zoom-box",this._pane),o.DomUtil.setPosition(this._box,this._startLayerPoint),this._container.style.cursor="crosshair",this._map.fire("boxzoomstart"));var e=this._startLayerPoint,i=this._box,n=this._map.mouseEventToLayerPoint(t),s=n.subtract(e),a=new o.Point(Math.min(n.x,e.x),Math.min(n.y,e.y));o.DomUtil.setPosition(i,a),this._moved=!0,i.style.width=Math.max(0,Math.abs(s.x)-4)+"px",i.style.height=Math.max(0,Math.abs(s.y)-4)+"px"},_finish:function(){this._moved&&(this._pane.removeChild(this._box),this._container.style.cursor=""),o.DomUtil.enableTextSelection(),o.DomUtil.enableImageDrag(),o.DomEvent.off(e,"mousemove",this._onMouseMove).off(e,"mouseup",this._onMouseUp).off(e,"keydown",this._onKeyDown)},_onMouseUp:function(t){this._finish();var e=this._map,i=e.mouseEventToLayerPoint(t);if(!this._startLayerPoint.equals(i)){var n=new o.LatLngBounds(e.layerPointToLatLng(this._startLayerPoint),e.layerPointToLatLng(i));e.fitBounds(n),e.fire("boxzoomend",{boxZoomBounds:n})}},_onKeyDown:function(t){27===t.keyCode&&this._finish()}}),o.Map.addInitHook("addHandler","boxZoom",o.Map.BoxZoom),o.Map.mergeOptions({keyboard:!0,keyboardPanOffset:80,keyboardZoomOffset:1}),o.Map.Keyboard=o.Handler.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,173]},initialize:function(t){this._map=t,this._setPanOffset(t.options.keyboardPanOffset),this._setZoomOffset(t.options.keyboardZoomOffset)},addHooks:function(){var t=this._map._container;-1===t.tabIndex&&(t.tabIndex="0"),o.DomEvent.on(t,"focus",this._onFocus,this).on(t,"blur",this._onBlur,this).on(t,"mousedown",this._onMouseDown,this),this._map.on("focus",this._addHooks,this).on("blur",this._removeHooks,this)},removeHooks:function(){this._removeHooks();var t=this._map._container;o.DomEvent.off(t,"focus",this._onFocus,this).off(t,"blur",this._onBlur,this).off(t,"mousedown",this._onMouseDown,this),this._map.off("focus",this._addHooks,this).off("blur",this._removeHooks,this)},_onMouseDown:function(){if(!this._focused){var i=e.body,n=e.documentElement,o=i.scrollTop||n.scrollTop,s=i.scrollLeft||n.scrollLeft;this._map._container.focus(),t.scrollTo(s,o)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanOffset:function(t){var e,i,n=this._panKeys={},o=this.keyCodes;for(e=0,i=o.left.length;i>e;e++)n[o.left[e]]=[-1*t,0];for(e=0,i=o.right.length;i>e;e++)n[o.right[e]]=[t,0];for(e=0,i=o.down.length;i>e;e++)n[o.down[e]]=[0,t];for(e=0,i=o.up.length;i>e;e++)n[o.up[e]]=[0,-1*t]},_setZoomOffset:function(t){var e,i,n=this._zoomKeys={},o=this.keyCodes;for(e=0,i=o.zoomIn.length;i>e;e++)n[o.zoomIn[e]]=t;for(e=0,i=o.zoomOut.length;i>e;e++)n[o.zoomOut[e]]=-t},_addHooks:function(){o.DomEvent.on(e,"keydown",this._onKeyDown,this)},_removeHooks:function(){o.DomEvent.off(e,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){var e=t.keyCode,i=this._map;if(e in this._panKeys){if(i._panAnim&&i._panAnim._inProgress)return;i.panBy(this._panKeys[e]),i.options.maxBounds&&i.panInsideBounds(i.options.maxBounds)}else{if(!(e in this._zoomKeys))return;i.setZoom(i.getZoom()+this._zoomKeys[e])}o.DomEvent.stop(t)}}),o.Map.addInitHook("addHandler","keyboard",o.Map.Keyboard),o.Handler.MarkerDrag=o.Handler.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new o.Draggable(t,t)),this._draggable.on("dragstart",this._onDragStart,this).on("drag",this._onDrag,this).on("dragend",this._onDragEnd,this),this._draggable.enable(),o.DomUtil.addClass(this._marker._icon,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off("dragstart",this._onDragStart,this).off("drag",this._onDrag,this).off("dragend",this._onDragEnd,this),this._draggable.disable(),o.DomUtil.removeClass(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_onDragStart:function(){this._marker.closePopup().fire("movestart").fire("dragstart")},_onDrag:function(){var t=this._marker,e=t._shadow,i=o.DomUtil.getPosition(t._icon),n=t._map.layerPointToLatLng(i);e&&o.DomUtil.setPosition(e,i),t._latlng=n,t.fire("move",{latlng:n}).fire("drag")},_onDragEnd:function(t){this._marker.fire("moveend").fire("dragend",t)}}),o.Control=o.Class.extend({options:{position:"topright"},initialize:function(t){o.setOptions(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),n=t._controlCorners[i];return o.DomUtil.addClass(e,"leaflet-control"),-1!==i.indexOf("bottom")?n.insertBefore(e,n.firstChild):n.appendChild(e),this},removeFrom:function(t){var e=this.getPosition(),i=t._controlCorners[e];return i.removeChild(this._container),this._map=null,this.onRemove&&this.onRemove(t),this},_refocusOnMap:function(){this._map&&this._map.getContainer().focus()}}),o.control=function(t){return new o.Control(t)},o.Map.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.removeFrom(this),this},_initControlPos:function(){function t(t,s){var a=i+t+" "+i+s;e[t+s]=o.DomUtil.create("div",a,n)}var e=this._controlCorners={},i="leaflet-",n=this._controlContainer=o.DomUtil.create("div",i+"control-container",this._container);t("top","left"),t("top","right"),t("bottom","left"),t("bottom","right")},_clearControlPos:function(){this._container.removeChild(this._controlContainer)}}),o.Control.Zoom=o.Control.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"-",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=o.DomUtil.create("div",e+" leaflet-bar");return this._map=t,this._zoomInButton=this._createButton(this.options.zoomInText,this.options.zoomInTitle,e+"-in",i,this._zoomIn,this),this._zoomOutButton=this._createButton(this.options.zoomOutText,this.options.zoomOutTitle,e+"-out",i,this._zoomOut,this),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},_zoomIn:function(t){this._map.zoomIn(t.shiftKey?3:1)},_zoomOut:function(t){this._map.zoomOut(t.shiftKey?3:1)},_createButton:function(t,e,i,n,s,a){var r=o.DomUtil.create("a",i,n);r.innerHTML=t,r.href="#",r.title=e;var h=o.DomEvent.stopPropagation;return o.DomEvent.on(r,"click",h).on(r,"mousedown",h).on(r,"dblclick",h).on(r,"click",o.DomEvent.preventDefault).on(r,"click",s,a).on(r,"click",this._refocusOnMap,a),r},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";o.DomUtil.removeClass(this._zoomInButton,e),o.DomUtil.removeClass(this._zoomOutButton,e),t._zoom===t.getMinZoom()&&o.DomUtil.addClass(this._zoomOutButton,e),t._zoom===t.getMaxZoom()&&o.DomUtil.addClass(this._zoomInButton,e)}}),o.Map.mergeOptions({zoomControl:!0}),o.Map.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new o.Control.Zoom,this.addControl(this.zoomControl))}),o.control.zoom=function(t){return new o.Control.Zoom(t)},o.Control.Attribution=o.Control.extend({options:{position:"bottomright",prefix:'Leaflet'},initialize:function(t){o.setOptions(this,t),this._attributions={}},onAdd:function(t){this._container=o.DomUtil.create("div","leaflet-control-attribution"),o.DomEvent.disableClickPropagation(this._container);for(var e in t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return t.on("layeradd",this._onLayerAdd,this).on("layerremove",this._onLayerRemove,this),this._update(),this._container},onRemove:function(t){t.off("layeradd",this._onLayerAdd).off("layerremove",this._onLayerRemove)},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):void 0},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):void 0},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(" | ")}},_onLayerAdd:function(t){t.layer.getAttribution&&this.addAttribution(t.layer.getAttribution())},_onLayerRemove:function(t){t.layer.getAttribution&&this.removeAttribution(t.layer.getAttribution())}}),o.Map.mergeOptions({attributionControl:!0}),o.Map.addInitHook(function(){this.options.attributionControl&&(this.attributionControl=(new o.Control.Attribution).addTo(this))}),o.control.attribution=function(t){return new o.Control.Attribution(t)},o.Control.Scale=o.Control.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0,updateWhenIdle:!1},onAdd:function(t){this._map=t;var e="leaflet-control-scale",i=o.DomUtil.create("div",e),n=this.options;return this._addScales(n,e,i),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=o.DomUtil.create("div",e+"-line",i)),t.imperial&&(this._iScale=o.DomUtil.create("div",e+"-line",i))},_update:function(){var t=this._map.getBounds(),e=t.getCenter().lat,i=6378137*Math.PI*Math.cos(e*Math.PI/180),n=i*(t.getNorthEast().lng-t.getSouthWest().lng)/180,o=this._map.getSize(),s=this.options,a=0;o.x>0&&(a=n*(s.maxWidth/o.x)),this._updateScales(s,a)},_updateScales:function(t,e){t.metric&&e&&this._updateMetric(e),t.imperial&&e&&this._updateImperial(e)},_updateMetric:function(t){var e=this._getRoundNum(t);this._mScale.style.width=this._getScaleWidth(e/t)+"px",this._mScale.innerHTML=1e3>e?e+" m":e/1e3+" km"},_updateImperial:function(t){var e,i,n,o=3.2808399*t,s=this._iScale;o>5280?(e=o/5280,i=this._getRoundNum(e),s.style.width=this._getScaleWidth(i/e)+"px",s.innerHTML=i+" mi"):(n=this._getRoundNum(o),s.style.width=this._getScaleWidth(n/o)+"px",s.innerHTML=n+" ft")},_getScaleWidth:function(t){return Math.round(this.options.maxWidth*t)-10},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),i=t/e;return i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:1,e*i}}),o.control.scale=function(t){return new o.Control.Scale(t)},o.Control.Layers=o.Control.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0},initialize:function(t,e,i){o.setOptions(this,i),this._layers={},this._lastZIndex=0,this._handlingClick=!1;for(var n in t)this._addLayer(t[n],n);for(n in e)this._addLayer(e[n],n,!0)},onAdd:function(t){return this._initLayout(),this._update(),t.on("layeradd",this._onLayerChange,this).on("layerremove",this._onLayerChange,this),this._container},onRemove:function(t){t.off("layeradd",this._onLayerChange,this).off("layerremove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._update(),this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._update(),this},removeLayer:function(t){var e=o.stamp(t);return delete this._layers[e],this._update(),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=o.DomUtil.create("div",t);e.setAttribute("aria-haspopup",!0),o.Browser.touch?o.DomEvent.on(e,"click",o.DomEvent.stopPropagation):o.DomEvent.disableClickPropagation(e).disableScrollPropagation(e);var i=this._form=o.DomUtil.create("form",t+"-list");if(this.options.collapsed){o.Browser.android||o.DomEvent.on(e,"mouseover",this._expand,this).on(e,"mouseout",this._collapse,this);var n=this._layersLink=o.DomUtil.create("a",t+"-toggle",e);n.href="#",n.title="Layers",o.Browser.touch?o.DomEvent.on(n,"click",o.DomEvent.stop).on(n,"click",this._expand,this):o.DomEvent.on(n,"focus",this._expand,this),o.DomEvent.on(i,"click",function(){setTimeout(o.bind(this._onInputClick,this),0)},this),this._map.on("click",this._collapse,this)}else this._expand();this._baseLayersList=o.DomUtil.create("div",t+"-base",i),this._separator=o.DomUtil.create("div",t+"-separator",i),this._overlaysList=o.DomUtil.create("div",t+"-overlays",i),e.appendChild(i)},_addLayer:function(t,e,i){var n=o.stamp(t);this._layers[n]={layer:t,name:e,overlay:i},this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex))},_update:function(){if(this._container){this._baseLayersList.innerHTML="",this._overlaysList.innerHTML="";var t,e,i=!1,n=!1;for(t in this._layers)e=this._layers[t],this._addItem(e),n=n||e.overlay,i=i||!e.overlay;this._separator.style.display=n&&i?"":"none"}},_onLayerChange:function(t){var e=this._layers[o.stamp(t.layer)];if(e){this._handlingClick||this._update();var i=e.overlay?"layeradd"===t.type?"overlayadd":"overlayremove":"layeradd"===t.type?"baselayerchange":null;i&&this._map.fire(i,e)}},_createRadioElement:function(t,i){var n='t;t++)e=n[t],i=this._layers[e.layerId],e.checked&&!this._map.hasLayer(i.layer)?this._map.addLayer(i.layer):!e.checked&&this._map.hasLayer(i.layer)&&this._map.removeLayer(i.layer);this._handlingClick=!1,this._refocusOnMap()},_expand:function(){o.DomUtil.addClass(this._container,"leaflet-control-layers-expanded")},_collapse:function(){this._container.className=this._container.className.replace(" leaflet-control-layers-expanded","")}}),o.control.layers=function(t,e,i){return new o.Control.Layers(t,e,i)},o.PosAnimation=o.Class.extend({includes:o.Mixin.Events,run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._newPos=e,this.fire("start"),t.style[o.DomUtil.TRANSITION]="all "+(i||.25)+"s cubic-bezier(0,0,"+(n||.5)+",1)",o.DomEvent.on(t,o.DomUtil.TRANSITION_END,this._onTransitionEnd,this),o.DomUtil.setPosition(t,e),o.Util.falseFn(t.offsetWidth),this._stepTimer=setInterval(o.bind(this._onStep,this),50)},stop:function(){this._inProgress&&(o.DomUtil.setPosition(this._el,this._getPos()),this._onTransitionEnd(),o.Util.falseFn(this._el.offsetWidth))},_onStep:function(){var t=this._getPos();return t?(this._el._leaflet_pos=t,void this.fire("step")):void this._onTransitionEnd()},_transformRe:/([-+]?(?:\d*\.)?\d+)\D*, ([-+]?(?:\d*\.)?\d+)\D*\)/,_getPos:function(){var e,i,n,s=this._el,a=t.getComputedStyle(s);if(o.Browser.any3d){if(n=a[o.DomUtil.TRANSFORM].match(this._transformRe),!n)return;e=parseFloat(n[1]),i=parseFloat(n[2])}else e=parseFloat(a.left),i=parseFloat(a.top);return new o.Point(e,i,!0)},_onTransitionEnd:function(){o.DomEvent.off(this._el,o.DomUtil.TRANSITION_END,this._onTransitionEnd,this),this._inProgress&&(this._inProgress=!1,this._el.style[o.DomUtil.TRANSITION]="",this._el._leaflet_pos=this._newPos,clearInterval(this._stepTimer),this.fire("step").fire("end"))}}),o.Map.include({setView:function(t,e,n){if(e=e===i?this._zoom:this._limitZoom(e),t=this._limitCenter(o.latLng(t),e,this.options.maxBounds),n=n||{},this._panAnim&&this._panAnim.stop(),this._loaded&&!n.reset&&n!==!0){n.animate!==i&&(n.zoom=o.extend({animate:n.animate},n.zoom),n.pan=o.extend({animate:n.animate},n.pan));var s=this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,n.zoom):this._tryAnimatedPan(t,n.pan);if(s)return clearTimeout(this._sizeTimer),this}return this._resetView(t,e),this},panBy:function(t,e){if(t=o.point(t).round(),e=e||{},!t.x&&!t.y)return this;if(this._panAnim||(this._panAnim=new o.PosAnimation,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),e.animate!==!1){o.DomUtil.addClass(this._mapPane,"leaflet-pan-anim");var i=this._getMapPanePos().subtract(t);this._panAnim.run(this._mapPane,i,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){o.DomUtil.removeClass(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._floor();return(e&&e.animate)===!0||this.getSize().contains(i)?(this.panBy(i,e),!0):!1}}),o.PosAnimation=o.DomUtil.TRANSITION?o.PosAnimation:o.PosAnimation.extend({run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=o.DomUtil.getPosition(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(),this._complete())},_animate:function(){this._animId=o.Util.requestAnimFrame(this._animate,this),this._step()},_step:function(){var t=+new Date-this._startTime,e=1e3*this._duration;e>t?this._runFrame(this._easeOut(t/e)):(this._runFrame(1),this._complete())},_runFrame:function(t){var e=this._startPos.add(this._offset.multiplyBy(t));o.DomUtil.setPosition(this._el,e),this.fire("step")},_complete:function(){o.Util.cancelAnimFrame(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),o.Map.mergeOptions({zoomAnimation:!0,zoomAnimationThreshold:4}),o.DomUtil.TRANSITION&&o.Map.addInitHook(function(){this._zoomAnimated=this.options.zoomAnimation&&o.DomUtil.TRANSITION&&o.Browser.any3d&&!o.Browser.android23&&!o.Browser.mobileOpera,this._zoomAnimated&&o.DomEvent.on(this._mapPane,o.DomUtil.TRANSITION_END,this._catchTransitionEnd,this)}),o.Map.include(o.DomUtil.TRANSITION?{_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||i.animate===!1||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/n),s=this._getCenterLayerPoint()._add(o);return i.animate===!0||this.getSize().contains(o)?(this.fire("movestart").fire("zoomstart"),this._animateZoom(t,e,s,n,null,!0),!0):!1},_animateZoom:function(t,e,i,n,s,a,r){r||(this._animatingZoom=!0),o.DomUtil.addClass(this._mapPane,"leaflet-zoom-anim"),this._animateToCenter=t,this._animateToZoom=e,o.Draggable&&(o.Draggable._disabled=!0),o.Util.requestAnimFrame(function(){this.fire("zoomanim",{center:t,zoom:e,origin:i,scale:n,delta:s,backwards:a}),setTimeout(o.bind(this._onZoomTransitionEnd,this),250)},this)},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._animatingZoom=!1,o.DomUtil.removeClass(this._mapPane,"leaflet-zoom-anim"),o.Util.requestAnimFrame(function(){this._resetView(this._animateToCenter,this._animateToZoom,!0,!0),o.Draggable&&(o.Draggable._disabled=!1)},this))}}:{}),o.TileLayer.include({_animateZoom:function(t){this._animating||(this._animating=!0,this._prepareBgBuffer());var e=this._bgBuffer,i=o.DomUtil.TRANSFORM,n=t.delta?o.DomUtil.getTranslateString(t.delta):e.style[i],s=o.DomUtil.getScaleString(t.scale,t.origin);e.style[i]=t.backwards?s+" "+n:n+" "+s},_endZoomAnim:function(){var t=this._tileContainer,e=this._bgBuffer;t.style.visibility="",t.parentNode.appendChild(t),o.Util.falseFn(e.offsetWidth);var i=this._map.getZoom();(i>this.options.maxZoom||i.5&&.5>n?(t.style.visibility="hidden",void this._stopLoadingImages(t)):(e.style.visibility="hidden",e.style[o.DomUtil.TRANSFORM]="",this._tileContainer=e,e=this._bgBuffer=t,this._stopLoadingImages(e),void clearTimeout(this._clearBgBufferTimer))},_getLoadedTilesPercentage:function(t){var e,i,n=t.getElementsByTagName("img"),o=0;for(e=0,i=n.length;i>e;e++)n[e].complete&&o++;return o/i},_stopLoadingImages:function(t){var e,i,n,s=Array.prototype.slice.call(t.getElementsByTagName("img"));for(e=0,i=s.length;i>e;e++)n=s[e],n.complete||(n.onload=o.Util.falseFn,n.onerror=o.Util.falseFn,n.src=o.Util.emptyImageUrl,n.parentNode.removeChild(n))}}),o.Map.include({_defaultLocateOptions:{watch:!1,setView:!1,maxZoom:1/0,timeout:1e4,maximumAge:0,enableHighAccuracy:!1},locate:function(t){if(t=this._locateOptions=o.extend(this._defaultLocateOptions,t),!navigator.geolocation)return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=o.bind(this._handleGeolocationResponse,this),i=o.bind(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e=t.code,i=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+i+"."})},_handleGeolocationResponse:function(t){var e=t.coords.latitude,i=t.coords.longitude,n=new o.LatLng(e,i),s=180*t.coords.accuracy/40075017,a=s/Math.cos(o.LatLng.DEG_TO_RAD*e),r=o.latLngBounds([e-s,i-a],[e+s,i+a]),h=this._locateOptions;if(h.setView){var l=Math.min(this.getBoundsZoom(r),h.maxZoom);this.setView(n,l)}var u={latlng:n,bounds:r,timestamp:t.timestamp};for(var c in t.coords)"number"==typeof t.coords[c]&&(u[c]=t.coords[c]);this.fire("locationfound",u)}})}(window,document);define("ViewModels/DistanceLegendViewModel",["Cesium/Core/defined","Cesium/Core/DeveloperError","Cesium/Core/EllipsoidGeodesic","Cesium/Core/Cartesian2","Cesium/Core/getTimestamp","Cesium/Core/EventHelper","KnockoutES5","Core/loadView","leaflet"],function(defined,DeveloperError,EllipsoidGeodesic,Cartesian2,getTimestamp,EventHelper,Knockout,loadView,leaflet){"use strict";var DistanceLegendViewModel=function(options){if(!defined(options)||!defined(options.terria)){throw new DeveloperError("options.terria is required.")}this.terria=options.terria;this._removeSubscription=undefined;this._lastLegendUpdate=undefined;this.eventHelper=new EventHelper;this.distanceLabel=undefined;this.barWidth=undefined;Knockout.track(this,["distanceLabel","barWidth"]);this.eventHelper.add(this.terria.afterWidgetChanged,function(){if(defined(this._removeSubscription)){this._removeSubscription();this._removeSubscription=undefined}},this);var that=this;function addUpdateSubscription(){if(defined(that.terria)){var scene=that.terria.scene;that._removeSubscription=scene.postRender.addEventListener(function(){updateDistanceLegendCesium(this,scene)},that)}else if(defined(that.terria.leaflet)){var map=that.terria.leaflet.map;var potentialChangeCallback=function potentialChangeCallback(){updateDistanceLegendLeaflet(that,map)};that._removeSubscription=function(){map.off("zoomend",potentialChangeCallback);map.off("moveend",potentialChangeCallback)};map.on("zoomend",potentialChangeCallback);map.on("moveend",potentialChangeCallback);updateDistanceLegendLeaflet(that,map)}}addUpdateSubscription();this.eventHelper.add(this.terria.afterWidgetChanged,function(){addUpdateSubscription()},this)};DistanceLegendViewModel.prototype.destroy=function(){this.eventHelper.removeAll()};DistanceLegendViewModel.prototype.show=function(container){var testing='
'+'
'+"
"+"
";loadView(testing,container,this)};DistanceLegendViewModel.create=function(options){var result=new DistanceLegendViewModel(options);result.show(options.container);return result};var geodesic=new EllipsoidGeodesic;var distances=[1,2,3,5,10,20,30,50,100,200,300,500,1e3,2e3,3e3,5e3,1e4,2e4,3e4,5e4,1e5,2e5,3e5,5e5,1e6,2e6,3e6,5e6,1e7,2e7,3e7,5e7];function updateDistanceLegendCesium(viewModel,scene){var now=getTimestamp();if(now=0;--i){if(distances[i]/pixelDistance=1e3){label=(distance/1e3).toString()+" km"}else{label=distance.toString()+" m"}viewModel.barWidth=distance/pixelDistance|0;viewModel.distanceLabel=label; -}else{viewModel.barWidth=undefined;viewModel.distanceLabel=undefined}}function updateDistanceLegendLeaflet(viewModel,map){var halfHeight=map.getSize().y/2;var maxPixelWidth=100;var maxMeters=map.containerPointToLatLng([0,halfHeight]).distanceTo(map.containerPointToLatLng([maxPixelWidth,halfHeight]));var meters=leaflet.control.scale()._getRoundNum(maxMeters);var label=meters<1e3?meters+" m":meters/1e3+" km";viewModel.barWidth=meters/maxMeters*maxPixelWidth;viewModel.distanceLabel=label}return DistanceLegendViewModel});define("ViewModels/UserInterfaceControl",["Cesium/Core/defined","Cesium/Core/defineProperties","Cesium/Core/DeveloperError","KnockoutES5"],function(defined,defineProperties,DeveloperError,Knockout){"use strict";var UserInterfaceControl=function(terria){if(!defined(terria)){throw new DeveloperError("terria is required")}this._terria=terria;this.name="Unnamed Control";this.text=undefined;this.svgIcon=undefined;this.svgHeight=undefined;this.svgWidth=undefined;this.cssClass=undefined;this.isActive=false;Knockout.track(this,["name","svgIcon","svgHeight","svgWidth","cssClass","isActive"])};defineProperties(UserInterfaceControl.prototype,{terria:{get:function(){return this._terria}},hasText:{get:function(){return defined(this.text)&&typeof this.text==="string"}}});UserInterfaceControl.prototype.activate=function(){throw new DeveloperError("activate must be implemented in the derived class.")};return UserInterfaceControl});define("ViewModels/NavigationControl",["ViewModels/UserInterfaceControl"],function(UserInterfaceControl){"use strict";var NavigationControl=function(terria){UserInterfaceControl.apply(this,arguments)};NavigationControl.prototype=Object.create(UserInterfaceControl.prototype);return NavigationControl});define("SvgPaths/svgReset",[],function(){"use strict";return"M 7.5,0 C 3.375,0 0,3.375 0,7.5 0,11.625 3.375,15 7.5,15 c 3.46875,0 6.375,-2.4375 7.21875,-5.625 l -1.96875,0 C 12,11.53125 9.9375,13.125 7.5,13.125 4.40625,13.125 1.875,10.59375 1.875,7.5 1.875,4.40625 4.40625,1.875 7.5,1.875 c 1.59375,0 2.90625,0.65625 3.9375,1.6875 l -3,3 6.5625,0 L 15,0 12.75,2.25 C 11.4375,0.84375 9.5625,0 7.5,0 z"});define("ViewModels/ResetViewNavigationControl",["Cesium/Core/defined","Cesium/Scene/Camera","ViewModels/NavigationControl","SvgPaths/svgReset"],function(defined,Camera,NavigationControl,svgReset){"use strict";var ResetViewNavigationControl=function(terria){NavigationControl.apply(this,arguments);this.name="Reset View";this.svgIcon=svgReset;this.svgHeight=15;this.svgWidth=15;this.cssClass="navigation-control-icon-reset"};ResetViewNavigationControl.prototype=Object.create(NavigationControl.prototype);ResetViewNavigationControl.prototype.resetView=function(){this.isActive=true;var camera=this.terria.scene.camera;if(this.terria.options.defaultResetView){if(this.terria.options.defaultResetView&&this.terria.options.defaultResetView instanceof Cesium.Cartographic){camera.flyTo({destination:Cesium.Ellipsoid.WGS84.cartographicToCartesian(this.terria.options.defaultResetView)})}else if(this.terria.options.defaultResetView&&this.terria.options.defaultResetView instanceof Cesium.Rectangle){try{Cesium.Rectangle.validate(this.terria.options.defaultResetView);camera.flyTo({destination:this.terria.options.defaultResetView})}catch(e){console.log("Cesium-navigation/ResetViewNavigationControl: options.defaultResetView Cesium rectangle is invalid!")}}}else if(typeof camera.flyHome==="function"){camera.flyHome(1)}else{camera.flyTo({destination:Camera.DEFAULT_VIEW_RECTANGLE,duration:1})}this.isActive=false};ResetViewNavigationControl.prototype.activate=function(){this.resetView()};return ResetViewNavigationControl});define("Core/Utils",["Cesium/Core/defined","Cesium/Core/Ray","Cesium/Core/Cartesian3","Cesium/Core/Cartographic","Cesium/Scene/SceneMode"],function(defined,Ray,Cartesian3,Cartographic,SceneMode){"use strict";var Utils={};var unprojectedScratch=new Cartographic;var rayScratch=new Ray;Utils.getCameraFocus=function(scene,inWorldCoordinates,result){if(scene.mode==SceneMode.MORPHING){return undefined}if(!defined(result)){result=new Cartesian3}var camera=scene.camera;rayScratch.origin=camera.positionWC;rayScratch.direction=camera.directionWC;var center=scene.globe.pick(rayScratch,scene,result);if(!defined(center)){return undefined}if(scene.mode==SceneMode.SCENE2D||scene.mode==SceneMode.COLUMBUS_VIEW){center=camera.worldToCameraCoordinatesPoint(center,result);if(inWorldCoordinates){center=scene.globe.ellipsoid.cartographicToCartesian(scene.mapProjection.unproject(center,unprojectedScratch),result)}}else{if(!inWorldCoordinates){center=camera.worldToCameraCoordinatesPoint(center,result)}}return center};return Utils});define("ViewModels/ZoomNavigationControl",["Cesium/Core/defined","Cesium/Core/Ray","Cesium/Core/IntersectionTests","Cesium/Core/Cartesian3","Cesium/Scene/SceneMode","ViewModels/NavigationControl","Core/Utils"],function(defined,Ray,IntersectionTests,Cartesian3,SceneMode,NavigationControl,Utils){"use strict";var ZoomNavigationControl=function(terria,zoomIn){NavigationControl.apply(this,arguments);this.name="Zoom "+(zoomIn?"In":"Out");this.text=zoomIn?"+":"-";this.cssClass="navigation-control-icon-zoom-"+(zoomIn?"in":"out");this.relativeAmount=2;if(zoomIn){this.relativeAmount=1/this.relativeAmount}};ZoomNavigationControl.prototype.relativeAmount=1;ZoomNavigationControl.prototype=Object.create(NavigationControl.prototype);ZoomNavigationControl.prototype.activate=function(){this.zoom(this.relativeAmount)};var cartesian3Scratch=new Cartesian3;ZoomNavigationControl.prototype.zoom=function(relativeAmount){this.isActive=true;if(defined(this.terria)){var scene=this.terria.scene;var camera=scene.camera;switch(scene.mode){case SceneMode.MORPHING:break;case SceneMode.SCENE2D:camera.zoomIn(camera.positionCartographic.height*(1-this.relativeAmount));break;default:var focus=Utils.getCameraFocus(scene,false);if(!defined(focus)){var ray=new Ray(camera.worldToCameraCoordinatesPoint(scene.globe.ellipsoid.cartographicToCartesian(camera.positionCartographic)),camera.directionWC);focus=IntersectionTests.grazingAltitudeLocation(ray,scene.globe.ellipsoid)}var direction=Cartesian3.subtract(camera.position,focus,cartesian3Scratch);var movementVector=Cartesian3.multiplyByScalar(direction,relativeAmount,direction);var endPosition=Cartesian3.add(focus,movementVector,focus);camera.position=endPosition}}this.isActive=false};return ZoomNavigationControl});define("SvgPaths/svgCompassOuterRing",[],function(){"use strict";return"m 66.5625,0 0,15.15625 3.71875,0 0,-10.40625 5.5,10.40625 4.375,0 0,-15.15625 -3.71875,0 0,10.40625 L 70.9375,0 66.5625,0 z M 72.5,20.21875 c -28.867432,0 -52.28125,23.407738 -52.28125,52.28125 0,28.87351 23.413818,52.3125 52.28125,52.3125 28.86743,0 52.28125,-23.43899 52.28125,-52.3125 0,-28.873512 -23.41382,-52.28125 -52.28125,-52.28125 z m 0,1.75 c 13.842515,0 26.368948,5.558092 35.5,14.5625 l -11.03125,11 0.625,0.625 11.03125,-11 c 8.9199,9.108762 14.4375,21.579143 14.4375,35.34375 0,13.764606 -5.5176,26.22729 -14.4375,35.34375 l -11.03125,-11 -0.625,0.625 11.03125,11 c -9.130866,9.01087 -21.658601,14.59375 -35.5,14.59375 -13.801622,0 -26.321058,-5.53481 -35.4375,-14.5 l 11.125,-11.09375 c 6.277989,6.12179 14.857796,9.90625 24.3125,9.90625 19.241896,0 34.875,-15.629154 34.875,-34.875 0,-19.245847 -15.633104,-34.84375 -34.875,-34.84375 -9.454704,0 -18.034511,3.760884 -24.3125,9.875 L 37.0625,36.4375 C 46.179178,27.478444 58.696991,21.96875 72.5,21.96875 z m -0.875,0.84375 0,13.9375 1.75,0 0,-13.9375 -1.75,0 z M 36.46875,37.0625 47.5625,48.15625 C 41.429794,54.436565 37.65625,63.027539 37.65625,72.5 c 0,9.472461 3.773544,18.055746 9.90625,24.34375 L 36.46875,107.9375 c -8.96721,-9.1247 -14.5,-21.624886 -14.5,-35.4375 0,-13.812615 5.53279,-26.320526 14.5,-35.4375 z M 72.5,39.40625 c 18.297686,0 33.125,14.791695 33.125,33.09375 0,18.302054 -14.827314,33.125 -33.125,33.125 -18.297687,0 -33.09375,-14.822946 -33.09375,-33.125 0,-18.302056 14.796063,-33.09375 33.09375,-33.09375 z M 22.84375,71.625 l 0,1.75 13.96875,0 0,-1.75 -13.96875,0 z m 85.5625,0 0,1.75 14,0 0,-1.75 -14,0 z M 71.75,108.25 l 0,13.9375 1.71875,0 0,-13.9375 -1.71875,0 z"});define("SvgPaths/svgCompassGyro",[],function(){"use strict";return"m 72.71875,54.375 c -0.476702,0 -0.908208,0.245402 -1.21875,0.5625 -0.310542,0.317098 -0.551189,0.701933 -0.78125,1.1875 -0.172018,0.363062 -0.319101,0.791709 -0.46875,1.25 -6.91615,1.075544 -12.313231,6.656514 -13,13.625 -0.327516,0.117495 -0.661877,0.244642 -0.9375,0.375 -0.485434,0.22959 -0.901634,0.471239 -1.21875,0.78125 -0.317116,0.310011 -0.5625,0.742111 -0.5625,1.21875 l 0.03125,0 c 0,0.476639 0.245384,0.877489 0.5625,1.1875 0.317116,0.310011 0.702066,0.58291 1.1875,0.8125 0.35554,0.168155 0.771616,0.32165 1.21875,0.46875 1.370803,6.10004 6.420817,10.834127 12.71875,11.8125 0.146999,0.447079 0.30025,0.863113 0.46875,1.21875 0.230061,0.485567 0.470708,0.870402 0.78125,1.1875 0.310542,0.317098 0.742048,0.5625 1.21875,0.5625 0.476702,0 0.876958,-0.245402 1.1875,-0.5625 0.310542,-0.317098 0.582439,-0.701933 0.8125,-1.1875 0.172018,-0.363062 0.319101,-0.791709 0.46875,-1.25 6.249045,-1.017063 11.256351,-5.7184 12.625,-11.78125 0.447134,-0.1471 0.86321,-0.300595 1.21875,-0.46875 0.485434,-0.22959 0.901633,-0.502489 1.21875,-0.8125 0.317117,-0.310011 0.5625,-0.710861 0.5625,-1.1875 l -0.03125,0 c 0,-0.476639 -0.245383,-0.908739 -0.5625,-1.21875 C 89.901633,71.846239 89.516684,71.60459 89.03125,71.375 88.755626,71.244642 88.456123,71.117495 88.125,71 87.439949,64.078341 82.072807,58.503735 75.21875,57.375 c -0.15044,-0.461669 -0.326927,-0.884711 -0.5,-1.25 -0.230061,-0.485567 -0.501958,-0.870402 -0.8125,-1.1875 -0.310542,-0.317098 -0.710798,-0.5625 -1.1875,-0.5625 z m -0.0625,1.40625 c 0.03595,-0.01283 0.05968,0 0.0625,0 0.0056,0 0.04321,-0.02233 0.1875,0.125 0.144288,0.147334 0.34336,0.447188 0.53125,0.84375 0.06385,0.134761 0.123901,0.309578 0.1875,0.46875 -0.320353,-0.01957 -0.643524,-0.0625 -0.96875,-0.0625 -0.289073,0 -0.558569,0.04702 -0.84375,0.0625 C 71.8761,57.059578 71.936151,56.884761 72,56.75 c 0.18789,-0.396562 0.355712,-0.696416 0.5,-0.84375 0.07214,-0.07367 0.120304,-0.112167 0.15625,-0.125 z m 0,2.40625 c 0.448007,0 0.906196,0.05436 1.34375,0.09375 0.177011,0.592256 0.347655,1.271044 0.5,2.03125 0.475097,2.370753 0.807525,5.463852 0.9375,8.9375 -0.906869,-0.02852 -1.834463,-0.0625 -2.78125,-0.0625 -0.92298,0 -1.802327,0.03537 -2.6875,0.0625 0.138529,-3.473648 0.493653,-6.566747 0.96875,-8.9375 0.154684,-0.771878 0.320019,-1.463985 0.5,-2.0625 0.405568,-0.03377 0.804291,-0.0625 1.21875,-0.0625 z m -2.71875,0.28125 c -0.129732,0.498888 -0.259782,0.987558 -0.375,1.5625 -0.498513,2.487595 -0.838088,5.693299 -0.96875,9.25 -3.21363,0.15162 -6.119596,0.480068 -8.40625,0.9375 -0.682394,0.136509 -1.275579,0.279657 -1.84375,0.4375 0.799068,-6.135482 5.504716,-11.036454 11.59375,-12.1875 z M 75.5,58.5 c 6.043169,1.18408 10.705093,6.052712 11.5,12.15625 -0.569435,-0.155806 -1.200273,-0.302525 -1.875,-0.4375 -2.262525,-0.452605 -5.108535,-0.783809 -8.28125,-0.9375 -0.130662,-3.556701 -0.470237,-6.762405 -0.96875,-9.25 C 75.761959,59.467174 75.626981,58.990925 75.5,58.5 z m -2.84375,12.09375 c 0.959338,0 1.895843,0.03282 2.8125,0.0625 C 75.48165,71.267751 75.5,71.871028 75.5,72.5 c 0,1.228616 -0.01449,2.438313 -0.0625,3.59375 -0.897358,0.0284 -1.811972,0.0625 -2.75,0.0625 -0.927373,0 -1.831062,-0.03473 -2.71875,-0.0625 -0.05109,-1.155437 -0.0625,-2.365134 -0.0625,-3.59375 0,-0.628972 0.01741,-1.232249 0.03125,-1.84375 0.895269,-0.02827 1.783025,-0.0625 2.71875,-0.0625 z M 68.5625,70.6875 c -0.01243,0.60601 -0.03125,1.189946 -0.03125,1.8125 0,1.22431 0.01541,2.407837 0.0625,3.5625 -3.125243,-0.150329 -5.92077,-0.471558 -8.09375,-0.90625 -0.784983,-0.157031 -1.511491,-0.316471 -2.125,-0.5 -0.107878,-0.704096 -0.1875,-1.422089 -0.1875,-2.15625 0,-0.115714 0.02849,-0.228688 0.03125,-0.34375 0.643106,-0.20284 1.389577,-0.390377 2.25,-0.5625 2.166953,-0.433487 4.97905,-0.75541 8.09375,-0.90625 z m 8.3125,0.03125 c 3.075121,0.15271 5.824455,0.446046 7.96875,0.875 0.857478,0.171534 1.630962,0.360416 2.28125,0.5625 0.0027,0.114659 0,0.228443 0,0.34375 0,0.735827 -0.07914,1.450633 -0.1875,2.15625 -0.598568,0.180148 -1.29077,0.34562 -2.0625,0.5 -2.158064,0.431708 -4.932088,0.754666 -8.03125,0.90625 0.04709,-1.154663 0.0625,-2.33819 0.0625,-3.5625 0,-0.611824 -0.01924,-1.185379 -0.03125,-1.78125 z M 57.15625,72.5625 c 0.0023,0.572772 0.06082,1.131112 0.125,1.6875 -0.125327,-0.05123 -0.266577,-0.10497 -0.375,-0.15625 -0.396499,-0.187528 -0.665288,-0.387337 -0.8125,-0.53125 -0.147212,-0.143913 -0.15625,-0.182756 -0.15625,-0.1875 0,-0.0047 -0.02221,-0.07484 0.125,-0.21875 0.147212,-0.143913 0.447251,-0.312472 0.84375,-0.5 0.07123,-0.03369 0.171867,-0.06006 0.25,-0.09375 z m 31.03125,0 c 0.08201,0.03503 0.175941,0.05872 0.25,0.09375 0.396499,0.187528 0.665288,0.356087 0.8125,0.5 0.14725,0.14391 0.15625,0.21405 0.15625,0.21875 0,0.0047 -0.009,0.04359 -0.15625,0.1875 -0.147212,0.143913 -0.416001,0.343722 -0.8125,0.53125 -0.09755,0.04613 -0.233314,0.07889 -0.34375,0.125 0.06214,-0.546289 0.09144,-1.094215 0.09375,-1.65625 z m -29.5,3.625 c 0.479308,0.123125 0.983064,0.234089 1.53125,0.34375 2.301781,0.460458 5.229421,0.787224 8.46875,0.9375 0.167006,2.84339 0.46081,5.433176 0.875,7.5 0.115218,0.574942 0.245268,1.063612 0.375,1.5625 -5.463677,-1.028179 -9.833074,-5.091831 -11.25,-10.34375 z m 27.96875,0 C 85.247546,81.408945 80.919274,85.442932 75.5,86.5 c 0.126981,-0.490925 0.261959,-0.967174 0.375,-1.53125 0.41419,-2.066824 0.707994,-4.65661 0.875,-7.5 3.204493,-0.15162 6.088346,-0.480068 8.375,-0.9375 0.548186,-0.109661 1.051942,-0.220625 1.53125,-0.34375 z M 70.0625,77.53125 c 0.865391,0.02589 1.723666,0.03125 2.625,0.03125 0.912062,0 1.782843,-0.0048 2.65625,-0.03125 -0.165173,2.736408 -0.453252,5.207651 -0.84375,7.15625 -0.152345,0.760206 -0.322989,1.438994 -0.5,2.03125 -0.437447,0.03919 -0.895856,0.0625 -1.34375,0.0625 -0.414943,0 -0.812719,-0.02881 -1.21875,-0.0625 -0.177011,-0.592256 -0.347655,-1.271044 -0.5,-2.03125 -0.390498,-1.948599 -0.700644,-4.419842 -0.875,-7.15625 z m 1.75,10.28125 c 0.284911,0.01545 0.554954,0.03125 0.84375,0.03125 0.325029,0 0.648588,-0.01171 0.96875,-0.03125 -0.05999,0.148763 -0.127309,0.31046 -0.1875,0.4375 -0.18789,0.396562 -0.386962,0.696416 -0.53125,0.84375 -0.144288,0.147334 -0.181857,0.125 -0.1875,0.125 -0.0056,0 -0.07446,0.02233 -0.21875,-0.125 C 72.355712,88.946416 72.18789,88.646562 72,88.25 71.939809,88.12296 71.872486,87.961263 71.8125,87.8125 z"});define("SvgPaths/svgCompassRotationMarker",[],function(){"use strict";return"M 72.46875,22.03125 C 59.505873,22.050338 46.521615,27.004287 36.6875,36.875 L 47.84375,47.96875 C 61.521556,34.240041 83.442603,34.227389 97.125,47.90625 l 11.125,-11.125 C 98.401629,26.935424 85.431627,22.012162 72.46875,22.03125 z"});define("ViewModels/NavigationViewModel",["Cesium/Core/defined","Cesium/Core/Math","Cesium/Core/getTimestamp","Cesium/Core/EventHelper","Cesium/Core/Transforms","Cesium/Scene/SceneMode","Cesium/Core/Cartesian2","Cesium/Core/Cartesian3","Cesium/Core/Matrix4","Cesium/Core/BoundingSphere","Cesium/Core/HeadingPitchRange","KnockoutES5","Core/loadView","ViewModels/ResetViewNavigationControl","ViewModels/ZoomNavigationControl","SvgPaths/svgCompassOuterRing","SvgPaths/svgCompassGyro","SvgPaths/svgCompassRotationMarker","Core/Utils"],function(defined,CesiumMath,getTimestamp,EventHelper,Transforms,SceneMode,Cartesian2,Cartesian3,Matrix4,BoundingSphere,HeadingPitchRange,Knockout,loadView,ResetViewNavigationControl,ZoomNavigationControl,svgCompassOuterRing,svgCompassGyro,svgCompassRotationMarker,Utils){"use strict";var NavigationViewModel=function(options){this.terria=options.terria;this.eventHelper=new EventHelper;this.controls=options.controls;if(!defined(this.controls)){this.controls=[new ZoomNavigationControl(this.terria,true),new ResetViewNavigationControl(this.terria),new ZoomNavigationControl(this.terria,false)]}this.svgCompassOuterRing=svgCompassOuterRing;this.svgCompassGyro=svgCompassGyro;this.svgCompassRotationMarker=svgCompassRotationMarker;this.showCompass=defined(this.terria);this.heading=this.showCompass?this.terria.scene.camera.heading:0;this.isOrbiting=false;this.orbitCursorAngle=0;this.orbitCursorOpacity=0;this.orbitLastTimestamp=0;this.orbitFrame=undefined;this.orbitIsLook=false;this.orbitMouseMoveFunction=undefined;this.orbitMouseUpFunction=undefined;this.isRotating=false;this.rotateInitialCursorAngle=undefined;this.rotateFrame=undefined;this.rotateIsLook=false;this.rotateMouseMoveFunction=undefined;this.rotateMouseUpFunction=undefined;this._unsubcribeFromPostRender=undefined;Knockout.track(this,["controls","showCompass","heading","isOrbiting","orbitCursorAngle","isRotating"]);var that=this;function widgetChange(){if(defined(that.terria)){if(that._unsubcribeFromPostRender){that._unsubcribeFromPostRender();that._unsubcribeFromPostRender=undefined}that.showCompass=true;that._unsubcribeFromPostRender=that.terria.scene.postRender.addEventListener(function(){that.heading=that.terria.scene.camera.heading})}else{if(that._unsubcribeFromPostRender){that._unsubcribeFromPostRender();that._unsubcribeFromPostRender=undefined}that.showCompass=false}}this.eventHelper.add(this.terria.afterWidgetChanged,widgetChange,this);widgetChange()};NavigationViewModel.prototype.destroy=function(){this.eventHelper.removeAll()};NavigationViewModel.prototype.show=function(container){var testing='
'+'
'+"
"+"
"+'
'+'
'+"
"+'";loadView(testing,container,this)};NavigationViewModel.prototype.add=function(control){this.controls.push(control)};NavigationViewModel.prototype.remove=function(control){this.controls.remove(control)};NavigationViewModel.prototype.isLastControl=function(control){return control===this.controls[this.controls.length-1]};var vectorScratch=new Cartesian2;NavigationViewModel.prototype.handleMouseDown=function(viewModel,e){var scene=this.terria.scene;if(scene.mode==SceneMode.MORPHING){return true}var compassElement=e.currentTarget;var compassRectangle=e.currentTarget.getBoundingClientRect();var maxDistance=compassRectangle.width/2;var center=new Cartesian2((compassRectangle.right-compassRectangle.left)/2,(compassRectangle.bottom-compassRectangle.top)/2);var clickLocation=new Cartesian2(e.clientX-compassRectangle.left,e.clientY-compassRectangle.top);var vector=Cartesian2.subtract(clickLocation,center,vectorScratch);var distanceFromCenter=Cartesian2.magnitude(vector);var distanceFraction=distanceFromCenter/maxDistance;var nominalTotalRadius=145;var norminalGyroRadius=50;if(distanceFraction'+'
'+"
"+"
"+'
'+'
'+""+'";loadView(testing,container,this)};NavigationViewModel.prototype.add=function(control){this.controls.push(control)};NavigationViewModel.prototype.remove=function(control){this.controls.remove(control)};NavigationViewModel.prototype.isLastControl=function(control){return control===this.controls[this.controls.length-1]};var vectorScratch=new Cartesian2;NavigationViewModel.prototype.handleMouseDown=function(viewModel,e){var scene=this.terria.scene;if(scene.mode==SceneMode.MORPHING){return true}var compassElement=e.currentTarget;var compassRectangle=e.currentTarget.getBoundingClientRect();var maxDistance=compassRectangle.width/2;var center=new Cartesian2((compassRectangle.right-compassRectangle.left)/2,(compassRectangle.bottom-compassRectangle.top)/2);var clickLocation=new Cartesian2(e.clientX-compassRectangle.left,e.clientY-compassRectangle.top);var vector=Cartesian2.subtract(clickLocation,center,vectorScratch);var distanceFromCenter=Cartesian2.magnitude(vector);var distanceFraction=distanceFromCenter/maxDistance;var nominalTotalRadius=145;var norminalGyroRadius=50;if(distanceFraction Date: Wed, 13 Jul 2016 17:20:30 +0200 Subject: [PATCH 2/4] updated examples added spirograph position property so that the entities are moving. this is important to test the mixin for tracked moving entities. --- Examples/Build/amd.min.js | 476 +++++++++++++++++- Examples/Source/SpirographPositionProperty.js | 134 +++++ .../Source/SpirographPositionProperty_amd.js | 137 +++++ Examples/Source/amd/main.js | 40 +- Examples/Source/mainConfig.js | 2 +- Examples/amd.html | 11 +- Examples/amd_except_cesium.html | 46 +- Examples/server.js | 1 + Examples/sources.html | 42 +- Examples/standalone.html | 46 +- 10 files changed, 808 insertions(+), 127 deletions(-) create mode 100644 Examples/Source/SpirographPositionProperty.js create mode 100644 Examples/Source/SpirographPositionProperty_amd.js diff --git a/Examples/Build/amd.min.js b/Examples/Build/amd.min.js index 46fb8114..1839651f 100644 --- a/Examples/Build/amd.min.js +++ b/Examples/Build/amd.min.js @@ -1,11 +1,465 @@ -!function(){!function(t){var e=this||(0,eval)("this"),n=e.document,i=e.navigator,o=e.jQuery,r=e.JSON;!function(t){"function"==typeof define&&define.amd?define("knockout",["exports","require"],t):t("object"==typeof exports&&"object"==typeof module?module.exports||exports:e.ko={})}(function(s,a){function l(t,e){return null===t||typeof t in g?t===e:!1}function u(e,n){var i;return function(){i||(i=m.a.setTimeout(function(){i=t,e()},n))}}function c(t,e){var n;return function(){clearTimeout(n),n=m.a.setTimeout(t,e)}}function h(t,e){e&&e!==_?"beforeChange"===e?this.Kb(t):this.Ha(t,e):this.Lb(t)}function p(t,e){null!==e&&e.k&&e.k()}function d(t,e){var n=this.Hc,i=n[k];i.R||(this.lb&&this.Ma[e]?(n.Pb(e,t,this.Ma[e]),this.Ma[e]=null,--this.lb):i.r[e]||n.Pb(e,t,i.s?{ia:t}:n.uc(t)))}function f(t,e,n,i){m.d[t]={init:function(t,o,r,s,a){var l,u;return m.m(function(){var r=m.a.c(o()),s=!n!=!r,c=!u;(c||e||s!==l)&&(c&&m.va.Aa()&&(u=m.a.ua(m.f.childNodes(t),!0)),s?(c||m.f.da(t,m.a.ua(u)),m.eb(i?i(a,r):a,t)):m.f.xa(t),l=s)},null,{i:t}),{controlsDescendantBindings:!0}}},m.h.ta[t]=!1,m.f.Z[t]=!0}var m="undefined"!=typeof s?s:{};m.b=function(t,e){for(var n=t.split("."),i=m,o=0;on;n++)d[e[n]]=t});var f={propertychange:!0},g=n&&function(){for(var e=3,i=n.createElement("div"),o=i.getElementsByTagName("i");i.innerHTML="",o[0];);return e>4?e:t}(),_=/\S+/g;return{cc:["authenticity_token",/^__RequestVerificationToken(_.*)?$/],q:function(t,e){for(var n=0,i=t.length;i>n;n++)e(t[n],n)},o:function(t,e){if("function"==typeof Array.prototype.indexOf)return Array.prototype.indexOf.call(t,e);for(var n=0,i=t.length;i>n;n++)if(t[n]===e)return n;return-1},Sb:function(t,e,n){for(var i=0,o=t.length;o>i;i++)if(e.call(n,t[i],i))return t[i];return null},La:function(t,e){var n=m.a.o(t,e);n>0?t.splice(n,1):0===n&&t.shift()},Tb:function(t){t=t||[];for(var e=[],n=0,i=t.length;i>n;n++)0>m.a.o(e,t[n])&&e.push(t[n]);return e},fb:function(t,e){t=t||[];for(var n=[],i=0,o=t.length;o>i;i++)n.push(e(t[i],i));return n},Ka:function(t,e){t=t||[];for(var n=[],i=0,o=t.length;o>i;i++)e(t[i],i)&&n.push(t[i]);return n},ra:function(t,e){if(e instanceof Array)t.push.apply(t,e);else for(var n=0,i=e.length;i>n;n++)t.push(e[n]);return t},pa:function(t,e,n){var i=m.a.o(m.a.zb(t),e);0>i?n&&t.push(e):n||t.splice(i,1)},ka:c,extend:a,Xa:l,Ya:c?l:a,D:s,Ca:function(t,e){if(!t)return t;var n,i={};for(n in t)t.hasOwnProperty(n)&&(i[n]=e(t[n],n,t));return i},ob:function(t){for(;t.firstChild;)m.removeNode(t.firstChild)},jc:function(t){t=m.a.V(t);for(var e=(t[0]&&t[0].ownerDocument||n).createElement("div"),i=0,o=t.length;o>i;i++)e.appendChild(m.$(t[i]));return e},ua:function(t,e){for(var n=0,i=t.length,o=[];i>n;n++){var r=t[n].cloneNode(!0);o.push(e?m.$(r):r)}return o},da:function(t,e){if(m.a.ob(t),e)for(var n=0,i=e.length;i>n;n++)t.appendChild(e[n])},qc:function(t,e){var n=t.nodeType?[t]:t;if(0r;r++)o.insertBefore(e[r],i);for(r=0,s=n.length;s>r;r++)m.removeNode(n[r])}},za:function(t,e){if(t.length){for(e=8===e.nodeType&&e.parentNode||e;t.length&&t[0].parentNode!==e;)t.splice(0,1);for(;1g?t.setAttribute("selected",e):t.selected=e},$a:function(e){return null===e||e===t?"":e.trim?e.trim():e.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},nd:function(t,e){return t=t||"",e.length>t.length?!1:t.substring(0,e.length)===e},Mc:function(t,e){if(t===e)return!0;if(11===t.nodeType)return!1;if(e.contains)return e.contains(3===t.nodeType?t.parentNode:t);if(e.compareDocumentPosition)return 16==(16&e.compareDocumentPosition(t));for(;t&&t!=e;)t=t.parentNode;return!!t},nb:function(t){return m.a.Mc(t,t.ownerDocument.documentElement)},Qb:function(t){return!!m.a.Sb(t,m.a.nb)},A:function(t){return t&&t.tagName&&t.tagName.toLowerCase()},Wb:function(t){return m.onError?function(){try{return t.apply(this,arguments)}catch(e){throw m.onError&&m.onError(e),e}}:t},setTimeout:function(t,e){return setTimeout(m.a.Wb(t),e)},$b:function(t){setTimeout(function(){throw m.onError&&m.onError(t),t},0)},p:function(t,e,n){var i=m.a.Wb(n);if(n=g&&f[e],m.options.useOnlyNativeEvents||n||!o)if(n||"function"!=typeof t.addEventListener){if("undefined"==typeof t.attachEvent)throw Error("Browser doesn't support addEventListener or attachEvent");var r=function(e){i.call(t,e)},s="on"+e;t.attachEvent(s,r),m.a.F.oa(t,function(){t.detachEvent(s,r)})}else t.addEventListener(e,i,!1);else o(t).bind(e,i)},Da:function(t,i){if(!t||!t.nodeType)throw Error("element must be a DOM node when calling triggerEvent");var r;if("input"===m.a.A(t)&&t.type&&"click"==i.toLowerCase()?(r=t.type,r="checkbox"==r||"radio"==r):r=!1,m.options.useOnlyNativeEvents||!o||r)if("function"==typeof n.createEvent){if("function"!=typeof t.dispatchEvent)throw Error("The supplied element doesn't support dispatchEvent");r=n.createEvent(d[i]||"HTMLEvents"),r.initEvent(i,!0,!0,e,0,0,0,0,0,!1,!1,!1,!1,0,t),t.dispatchEvent(r)}else if(r&&t.click)t.click();else{if("undefined"==typeof t.fireEvent)throw Error("Browser doesn't support triggering events");t.fireEvent("on"+i)}else o(t).trigger(i)},c:function(t){return m.H(t)?t():t},zb:function(t){return m.H(t)?t.t():t},bb:function(t,e,n){var i;e&&("object"==typeof t.classList?(i=t.classList[n?"add":"remove"],m.a.q(e.match(_),function(e){i.call(t.classList,e)})):"string"==typeof t.className.baseVal?u(t.className,"baseVal",e,n):u(t,"className",e,n))},Za:function(e,n){var i=m.a.c(n);(null===i||i===t)&&(i="");var o=m.f.firstChild(e);!o||3!=o.nodeType||m.f.nextSibling(o)?m.f.da(e,[e.ownerDocument.createTextNode(i)]):o.data=i,m.a.Rc(e)},rc:function(t,e){if(t.name=e,7>=g)try{t.mergeAttributes(n.createElement(""),!1)}catch(i){}},Rc:function(t){g>=9&&(t=1==t.nodeType?t:t.parentNode,t.style&&(t.style.zoom=t.style.zoom))},Nc:function(t){if(g){var e=t.style.width;t.style.width=0,t.style.width=e}},hd:function(t,e){t=m.a.c(t),e=m.a.c(e);for(var n=[],i=t;e>=i;i++)n.push(i);return n},V:function(t){for(var e=[],n=0,i=t.length;i>n;n++)e.push(t[n]);return e},Yb:function(t){return h?Symbol(t):t},rd:6===g,sd:7===g,C:g,ec:function(t,e){for(var n=m.a.V(t.getElementsByTagName("input")).concat(m.a.V(t.getElementsByTagName("textarea"))),i="string"==typeof e?function(t){return t.name===e}:function(t){return e.test(t.name)},o=[],r=n.length-1;r>=0;r--)i(n[r])&&o.push(n[r]);return o},ed:function(t){return"string"==typeof t&&(t=m.a.$a(t))?r&&r.parse?r.parse(t):new Function("return "+t)():null},Eb:function(t,e,n){if(!r||!r.stringify)throw Error("Cannot find JSON.stringify(). Some browsers (e.g., IE < 8) don't support it natively, but you can overcome this by adding a script reference to json2.js, downloadable from http://www.json.org/json2.js");return r.stringify(m.a.c(t),e,n)},fd:function(t,e,i){i=i||{};var o=i.params||{},r=i.includeFields||this.cc,a=t;if("object"==typeof t&&"form"===m.a.A(t))for(var a=t.action,l=r.length-1;l>=0;l--)for(var u=m.a.ec(t,r[l]),c=u.length-1;c>=0;c--)o[u[c].name]=u[c].value;e=m.a.c(e);var h=n.createElement("form");h.style.display="none",h.action=a,h.method="post";for(var p in e)t=n.createElement("input"),t.type="hidden",t.name=p,t.value=m.a.Eb(m.a.c(e[p])),h.appendChild(t);s(o,function(t,e){var i=n.createElement("input");i.type="hidden",i.name=t,i.value=e,h.appendChild(i)}),n.body.appendChild(h),i.submitter?i.submitter(h):h.submit(),setTimeout(function(){h.parentNode.removeChild(h)},0)}}}(),m.b("utils",m.a),m.b("utils.arrayForEach",m.a.q),m.b("utils.arrayFirst",m.a.Sb),m.b("utils.arrayFilter",m.a.Ka),m.b("utils.arrayGetDistinctValues",m.a.Tb),m.b("utils.arrayIndexOf",m.a.o),m.b("utils.arrayMap",m.a.fb),m.b("utils.arrayPushAll",m.a.ra),m.b("utils.arrayRemoveItem",m.a.La),m.b("utils.extend",m.a.extend),m.b("utils.fieldsIncludedWithJsonPost",m.a.cc),m.b("utils.getFormFields",m.a.ec),m.b("utils.peekObservable",m.a.zb),m.b("utils.postJson",m.a.fd),m.b("utils.parseJson",m.a.ed),m.b("utils.registerEventHandler",m.a.p),m.b("utils.stringifyJson",m.a.Eb),m.b("utils.range",m.a.hd),m.b("utils.toggleDomNodeCssClass",m.a.bb),m.b("utils.triggerEvent",m.a.Da),m.b("utils.unwrapObservable",m.a.c),m.b("utils.objectForEach",m.a.D),m.b("utils.addOrRemoveItem",m.a.pa),m.b("utils.setTextContent",m.a.Za),m.b("unwrap",m.a.c),Function.prototype.bind||(Function.prototype.bind=function(t){var e=this;if(1===arguments.length)return function(){return e.apply(t,arguments)};var n=Array.prototype.slice.call(arguments,1);return function(){var i=n.slice(0);return i.push.apply(i,arguments),e.apply(t,i)}}),m.a.e=new function(){function e(e,r){var s=e[i];if(!s||"null"===s||!o[s]){if(!r)return t;s=e[i]="ko"+n++,o[s]={}}return o[s]}var n=0,i="__ko__"+(new Date).getTime(),o={};return{get:function(n,i){var o=e(n,!1);return o===t?t:o[i]},set:function(n,i,o){(o!==t||e(n,!1)!==t)&&(e(n,!0)[i]=o)},clear:function(t){var e=t[i];return e?(delete o[e],t[i]=null,!0):!1},I:function(){return n++ +i}}},m.b("utils.domData",m.a.e),m.b("utils.domData.clear",m.a.e.clear),m.a.F=new function(){function e(e,n){var o=m.a.e.get(e,i);return o===t&&n&&(o=[],m.a.e.set(e,i,o)),o}function n(t){var i=e(t,!1);if(i)for(var i=i.slice(0),o=0;oi;i++)n(e[i])}return t},removeNode:function(t){m.$(t),t.parentNode&&t.parentNode.removeChild(t)},cleanExternalData:function(t){o&&"function"==typeof o.cleanData&&o.cleanData([t])}}},m.$=m.a.F.$,m.removeNode=m.a.F.removeNode,m.b("cleanNode",m.$),m.b("removeNode",m.removeNode),m.b("utils.domNodeDisposal",m.a.F),m.b("utils.domNodeDisposal.addDisposeCallback",m.a.F.oa),m.b("utils.domNodeDisposal.removeDisposeCallback",m.a.F.pc),function(){var i=[0,"",""],r=[1,"","
"],s=[3,"","
"],a=[1,""],l={thead:r,tbody:r,tfoot:r,tr:[2,"","
"],td:s,th:s,option:a,optgroup:a},u=8>=m.a.C;m.a.ma=function(t,r){var s;if(o){if(o.parseHTML)s=o.parseHTML(t,r)||[];else if((s=o.clean([t],r))&&s[0]){for(var a=s[0];a.parentNode&&11!==a.parentNode.nodeType;)a=a.parentNode;a.parentNode&&a.parentNode.removeChild(a)}}else{(s=r)||(s=n);var c,a=s.parentWindow||s.defaultView||e,h=m.a.$a(t).toLowerCase(),p=s.createElement("div");for(c=(h=h.match(/^<([a-z]+)[ >]/))&&l[h[1]]||i,h=c[0],c="ignored
"+c[1]+t+c[2]+"
","function"==typeof a.innerShiv?p.appendChild(a.innerShiv(c)):(u&&s.appendChild(p),p.innerHTML=c,u&&p.parentNode.removeChild(p));h--;)p=p.lastChild;s=m.a.V(p.lastChild.childNodes)}return s},m.a.Cb=function(e,n){if(m.a.ob(e),n=m.a.c(n),null!==n&&n!==t)if("string"!=typeof n&&(n=n.toString()),o)o(e).html(n);else for(var i=m.a.ma(n,e.ownerDocument),r=0;ri;i++)e(o[i],n)}var n={};return{wb:function(t){if("function"!=typeof t)throw Error("You can only pass a function to ko.memoization.memoize()");var e=(4294967296*(1+Math.random())|0).toString(16).substring(1)+(4294967296*(1+Math.random())|0).toString(16).substring(1);return n[e]=t,""},xc:function(e,i){var o=n[e];if(o===t)throw Error("Couldn't find any memo with ID "+e+". Perhaps it's already been unmemoized.");try{return o.apply(null,i||[]),!0}finally{delete n[e]}},yc:function(t,n){var i=[];e(t,i);for(var o=0,r=i.length;r>o;o++){var s=i[o].Lc,a=[s];n&&m.a.ra(a,n),m.M.xc(i[o].cd,a),s.nodeValue="",s.parentNode&&s.parentNode.removeChild(s)}},lc:function(t){return(t=t.match(/^\[ko_memo\:(.*?)\]$/))?t[1]:null}}}(),m.b("memoization",m.M),m.b("memoization.memoize",m.M.wb),m.b("memoization.unmemoize",m.M.xc),m.b("memoization.parseMemoText",m.M.lc),m.b("memoization.unmemoizeDomNodeAndDescendants",m.M.yc),m.Y=function(){function t(){if(r)for(var t,e=r,n=0;r>a;)if(t=o[a++]){if(a>e){if(5e3<=++n){a=r,m.a.$b(Error("'Too much recursion' after processing "+n+" task groups."));break}e=r}try{t()}catch(i){m.a.$b(i)}}}function i(){t(),a=r=o.length=0}var o=[],r=0,s=1,a=0;return{scheduler:e.MutationObserver?function(t){var e=n.createElement("div");return new MutationObserver(t).observe(e,{attributes:!0}),function(){e.classList.toggle("foo")}}(i):n&&"onreadystatechange"in n.createElement("script")?function(t){var e=n.createElement("script");e.onreadystatechange=function(){e.onreadystatechange=null,n.documentElement.removeChild(e),e=null,t()},n.documentElement.appendChild(e)}:function(t){setTimeout(t,0)},Wa:function(t){return r||m.Y.scheduler(i),o[r++]=t,s++},cancel:function(t){t-=s-r,t>=a&&r>t&&(o[t]=null)},resetForTesting:function(){var t=r-a;return a=r=o.length=0,t},md:t}}(),m.b("tasks",m.Y),m.b("tasks.schedule",m.Y.Wa),m.b("tasks.runEarly",m.Y.md),m.ya={throttle:function(t,e){t.throttleEvaluation=e;var n=null;return m.B({read:t,write:function(i){clearTimeout(n),n=m.a.setTimeout(function(){t(i)},e)}})},rateLimit:function(t,e){var n,i,o;"number"==typeof e?n=e:(n=e.timeout,i=e.method),t.cb=!1,o="notifyWhenChangesStop"==i?c:u,t.Ta(function(t){return o(t,n)})},deferred:function(e,n){if(!0!==n)throw Error("The 'deferred' extender only accepts the value 'true', because it is not supported to turn deferral off once enabled.");e.cb||(e.cb=!0,e.Ta(function(n){var i;return function(){m.Y.cancel(i),i=m.Y.Wa(n),e.notifySubscribers(t,"dirty")}}))},notify:function(t,e){t.equalityComparer="always"==e?null:l}};var g={undefined:1,"boolean":1,number:1,string:1};m.b("extenders",m.ya),m.vc=function(t,e,n){this.ia=t,this.gb=e,this.Kc=n,this.R=!1,m.G(this,"dispose",this.k)},m.vc.prototype.k=function(){this.R=!0,this.Kc()},m.J=function(){m.a.Ya(this,v),v.rb(this)};var _="change",v={rb:function(t){t.K={},t.Nb=1},X:function(t,e,n){var i=this;n=n||_;var o=new m.vc(i,e?t.bind(e):t,function(){m.a.La(i.K[n],o),i.Ia&&i.Ia(n)});return i.sa&&i.sa(n),i.K[n]||(i.K[n]=[]),i.K[n].push(o),o},notifySubscribers:function(t,e){if(e=e||_,e===_&&this.zc(),this.Pa(e))try{m.l.Ub();for(var n,i=this.K[e].slice(0),o=0;n=i[o];++o)n.R||n.gb(t)}finally{m.l.end()}},Na:function(){return this.Nb},Uc:function(t){return this.Na()!==t},zc:function(){++this.Nb},Ta:function(t){var e,n,i,o=this,r=m.H(o);o.Ha||(o.Ha=o.notifySubscribers,o.notifySubscribers=h);var s=t(function(){o.Mb=!1,r&&i===o&&(i=o()),e=!1,o.tb(n,i)&&o.Ha(n=i)});o.Lb=function(t){o.Mb=e=!0,i=t,s()},o.Kb=function(t){e||(n=t,o.Ha(t,"beforeChange"))}},Pa:function(t){return this.K[t]&&this.K[t].length},Sc:function(t){if(t)return this.K[t]&&this.K[t].length||0;var e=0;return m.a.D(this.K,function(t,n){"dirty"!==t&&(e+=n.length)}),e},tb:function(t,e){return!this.equalityComparer||!this.equalityComparer(t,e)},extend:function(t){var e=this;return t&&m.a.D(t,function(t,n){var i=m.ya[t];"function"==typeof i&&(e=i(e,n)||e)}),e}};m.G(v,"subscribe",v.X),m.G(v,"extend",v.extend),m.G(v,"getSubscriptionsCount",v.Sc),m.a.ka&&m.a.Xa(v,Function.prototype),m.J.fn=v,m.hc=function(t){return null!=t&&"function"==typeof t.X&&"function"==typeof t.notifySubscribers},m.b("subscribable",m.J),m.b("isSubscribable",m.hc),m.va=m.l=function(){function t(t){i.push(n),n=t}function e(){n=i.pop()}var n,i=[],o=0;return{Ub:t,end:e,oc:function(t){if(n){if(!m.hc(t))throw Error("Only subscribable things can act as dependencies");n.gb.call(n.Gc,t,t.Cc||(t.Cc=++o))}},w:function(n,i,o){try{return t(),n.apply(i,o||[])}finally{e()}},Aa:function(){return n?n.m.Aa():void 0},Sa:function(){return n?n.Sa:void 0}}}(),m.b("computedContext",m.va),m.b("computedContext.getDependenciesCount",m.va.Aa),m.b("computedContext.isInitial",m.va.Sa),m.b("ignoreDependencies",m.qd=m.l.w);var y=m.a.Yb("_latestValue");m.N=function(t){function e(){return 0=0;i--)n(e[i])&&(e[i]._destroy=!0);this.fa()},destroyAll:function(e){return e===t?this.destroy(function(){return!0}):e?this.destroy(function(t){return 0<=m.a.o(e,t)}):[]},indexOf:function(t){var e=this();return m.a.o(e,t)},replace:function(t,e){var n=this.indexOf(t);n>=0&&(this.ga(),this.t()[n]=e,this.fa())}},m.a.ka&&m.a.Xa(m.la.fn,m.N.fn),m.a.q("pop push reverse shift sort splice unshift".split(" "),function(t){m.la.fn[t]=function(){var e=this.t();this.ga(),this.Vb(e,t,arguments);var n=e[t].apply(e,arguments);return this.fa(),n===e?this:n}}),m.a.q(["slice"],function(t){m.la.fn[t]=function(){var e=this();return e[t].apply(e,arguments)}}),m.b("observableArray",m.la),m.ya.trackArrayChanges=function(t,e){function n(){if(!o){o=!0;var e=t.notifySubscribers;t.notifySubscribers=function(t,n){return n&&n!==_||++s,e.apply(this,arguments)};var n=[].concat(t.t()||[]);r=null,i=t.X(function(e){if(e=[].concat(e||[]),t.Pa("arrayChange")){var i;(!r||s>1)&&(r=m.a.ib(n,e,t.hb)),i=r}n=e,r=null,s=0,i&&i.length&&t.notifySubscribers(i,"arrayChange")})}}if(t.hb={},e&&"object"==typeof e&&m.a.extend(t.hb,e),t.hb.sparse=!0,!t.Vb){var i,o=!1,r=null,s=0,a=t.sa,l=t.Ia;t.sa=function(e){a&&a.call(t,e),"arrayChange"===e&&n()},t.Ia=function(e){l&&l.call(t,e),"arrayChange"!==e||t.Pa("arrayChange")||(i.k(),o=!1)},t.Vb=function(t,e,n){function i(t,e,n){return a[a.length]={status:t,value:e,index:n}}if(o&&!s){var a=[],l=t.length,u=n.length,c=0;switch(e){case"push":c=l;case"unshift":for(e=0;u>e;e++)i("added",n[e],c+e);break;case"pop":c=l-1;case"shift":l&&i("deleted",t[c],c);break;case"splice":e=Math.min(Math.max(0,0>n[0]?l+n[0]:n[0]),l);for(var l=1===u?l:Math.min(e+(n[1]||0),l),u=e+u-2,c=Math.max(l,u),h=[],p=[],d=2;c>e;++e,++d)l>e&&p.push(i("deleted",t[e],e)),u>e&&h.push(i("added",n[d],e));m.a.dc(p,h);break;default:return}r=a}}}};var k=m.a.Yb("_state");m.m=m.B=function(e,n,i){function o(){if(0=0?(clearTimeout(this[k].bc),this[k].bc=m.a.setTimeout(function(){t.aa(!0)},e)):t.Fa?t.Fa():t.aa(!0)},aa:function(t){var e=this[k],n=e.wa;if(!e.Ra&&!e.R){if(e.i&&!m.a.nb(e.i)||n&&n()){if(!e.Fb)return void this.k()}else e.Fb=!1;e.Ra=!0;try{this.Qc(t)}finally{e.Ra=!1}e.L||this.k()}},Qc:function(e){var n=this[k],i=n.Va?t:!n.L,o={Hc:this,Ma:n.r,lb:n.L};m.l.Ub({Gc:o,gb:d,m:this,Sa:i}),n.r={},n.L=0,o=this.Pc(n,o),this.tb(n.T,o)&&(n.s||this.notifySubscribers(n.T,"beforeChange"),n.T=o,n.s?this.zc():e&&this.notifySubscribers(n.T)),i&&this.notifySubscribers(n.T,"awake")},Pc:function(t,e){try{var n=t.jd;return t.pb?n.call(t.pb):n()}finally{m.l.end(),e.lb&&!t.s&&m.a.D(e.Ma,p),t.S=!1}},t:function(){var t=this[k];return(t.S&&!t.L||t.s&&this.Qa())&&this.aa(),t.T},Ta:function(t){m.J.fn.Ta.call(this,t),this.Fa=function(){this.Kb(this[k].T),this[k].S=!0,this.Lb(this)}},k:function(){var t=this[k];!t.s&&t.r&&m.a.D(t.r,function(t,e){e.k&&e.k()}),t.i&&t.mb&&m.a.F.pc(t.i,t.mb),t.r=null,t.L=0,t.R=!0,t.S=!1,t.s=!1,t.i=null}},C={sa:function(t){var e=this,n=e[k];if(!n.R&&n.s&&"change"==t){if(n.s=!1,n.S||e.Qa())n.r=null,n.L=0,n.S=!0,e.aa();else{var i=[];m.a.D(n.r,function(t,e){i[e.Ga]=t}),m.a.q(i,function(t,i){var o=n.r[t],r=e.uc(o.ia);r.Ga=i,r.na=o.na,n.r[t]=r})}n.R||e.notifySubscribers(n.T,"awake")}},Ia:function(e){var n=this[k];n.R||"change"!=e||this.Pa("change")||(m.a.D(n.r,function(t,e){e.k&&(n.r[t]={ia:e.ia,Ga:e.Ga,na:e.na},e.k())}),n.s=!0,this.notifySubscribers(t,"asleep"))},Na:function(){var t=this[k];return t.s&&(t.S||this.Qa())&&this.aa(),m.J.fn.Na.call(this)}},E={sa:function(t){"change"!=t&&"beforeChange"!=t||this.t()}};m.a.ka&&m.a.Xa(x,m.J.fn);var L=m.N.gd;m.m[L]=m.N,x[L]=m.m,m.Xc=function(t){return m.Oa(t,m.m)},m.Yc=function(t){return m.Oa(t,m.m)&&t[k]&&t[k].Va},m.b("computed",m.m),m.b("dependentObservable",m.m),m.b("isComputed",m.Xc),m.b("isPureComputed",m.Yc),m.b("computed.fn",x),m.G(x,"peek",x.t),m.G(x,"dispose",x.k),m.G(x,"isActive",x.ba),m.G(x,"getDependenciesCount",x.Aa),m.nc=function(t,e){return"function"==typeof t?m.m(t,e,{pure:!0}):(t=m.a.extend({},t),t.pure=!0,m.m(t,e))},m.b("pureComputed",m.nc),function(){function e(o,r,s){if(s=s||new i,o=r(o),"object"!=typeof o||null===o||o===t||o instanceof RegExp||o instanceof Date||o instanceof String||o instanceof Number||o instanceof Boolean)return o;var a=o instanceof Array?[]:{};return s.save(o,a),n(o,function(n){var i=r(o[n]);switch(typeof i){case"boolean":case"number":case"string":case"function":a[n]=i;break;case"object":case"undefined":var l=s.get(i);a[n]=l!==t?l:e(i,r,s)}}),a}function n(t,e){if(t instanceof Array){for(var n=0;ne;e++)t=t();return t})},m.toJSON=function(t,e,n){return t=m.wc(t),m.a.Eb(t,e,n)},i.prototype={save:function(t,e){var n=m.a.o(this.keys,t);n>=0?this.Ib[n]=e:(this.keys.push(t),this.Ib.push(e))},get:function(e){return e=m.a.o(this.keys,e),e>=0?this.Ib[e]:t}}}(),m.b("toJS",m.wc),m.b("toJSON",m.toJSON),function(){m.j={u:function(e){switch(m.a.A(e)){case"option":return!0===e.__ko__hasDomDataOptionValue__?m.a.e.get(e,m.d.options.xb):7>=m.a.C?e.getAttributeNode("value")&&e.getAttributeNode("value").specified?e.value:e.text:e.value;case"select":return 0<=e.selectedIndex?m.j.u(e.options[e.selectedIndex]):t;default:return e.value}},ha:function(e,n,i){switch(m.a.A(e)){case"option":switch(typeof n){case"string":m.a.e.set(e,m.d.options.xb,t),"__ko__hasDomDataOptionValue__"in e&&delete e.__ko__hasDomDataOptionValue__,e.value=n;break;default:m.a.e.set(e,m.d.options.xb,n),e.__ko__hasDomDataOptionValue__=!0,e.value="number"==typeof n?n:""}break;case"select":(""===n||null===n)&&(n=t);for(var o,r=-1,s=0,a=e.options.length;a>s;++s)if(o=m.j.u(e.options[s]),o==n||""==o&&n===t){r=s;break}(i||r>=0||n===t&&1=l){n.push(e&&a.length?{key:e,value:a.join("")}:{unknown:e||a.join("")}),e=l=0,a=[];continue}}else if(58===h){if(!l&&!e&&1===a.length){e=a.pop();continue}}else 47===h&&c&&1"===n.createComment("test").text,s=r?/^\x3c!--\s*ko(?:\s+([\s\S]+))?\s*--\x3e$/:/^\s*ko(?:\s+([\s\S]+))?\s*$/,a=r?/^\x3c!--\s*\/ko\s*--\x3e$/:/^\s*\/ko\s*$/,l={ul:!0,ol:!0};m.f={Z:{},childNodes:function(e){return t(e)?i(e):e.childNodes},xa:function(e){if(t(e)){e=m.f.childNodes(e);for(var n=0,i=e.length;i>n;n++)m.removeNode(e[n])}else m.a.ob(e)},da:function(e,n){if(t(e)){m.f.xa(e);for(var i=e.nextSibling,o=0,r=n.length;r>o;o++)i.parentNode.insertBefore(n[o],i)}else m.a.da(e,n)},mc:function(e,n){t(e)?e.parentNode.insertBefore(n,e.nextSibling):e.firstChild?e.insertBefore(n,e.firstChild):e.appendChild(n)},gc:function(e,n,i){i?t(e)?e.parentNode.insertBefore(n,i.nextSibling):i.nextSibling?e.insertBefore(n,i.nextSibling):e.appendChild(n):m.f.mc(e,n)},firstChild:function(n){return t(n)?!n.nextSibling||e(n.nextSibling)?null:n.nextSibling:n.firstChild},nextSibling:function(n){return t(n)&&(n=o(n)),n.nextSibling&&e(n.nextSibling)?null:n.nextSibling},Tc:t,pd:function(t){return(t=(r?t.text:t.nodeValue).match(s))?t[1]:null},kc:function(n){if(l[m.a.A(n)]){var i=n.firstChild;if(i)do if(1===i.nodeType){var r;r=i.firstChild;var s=null;if(r)do if(s)s.push(r);else if(t(r)){var a=o(r,!0);a?r=a:s=[r]}else e(r)&&(s=[r]);while(r=r.nextSibling);if(r=s)for(s=i.nextSibling,a=0;a=m.a.C&&t.tagName===e)?e:void 0},m.g.Ob=function(e,n,i,o){if(1===n.nodeType){var r=m.g.getComponentNameForNode(n);if(r){if(e=e||{},e.component)throw Error('Cannot use the "component" binding on a custom element matching a component');var s={name:r,params:t(n,i)};e.component=o?function(){return s}:s}}return e};var e=new m.Q;9>m.a.C&&(m.g.register=function(t){return function(e){return n.createElement(e),t.apply(this,arguments)}}(m.g.register),n.createDocumentFragment=function(t){return function(){var e,n=t(),i=m.g.Bc;for(e in i)i.hasOwnProperty(e)&&n.createElement(e);return n}}(n.createDocumentFragment))}(),function(t){function e(t,e,n){if(e=e.template,!e)throw Error("Component '"+t+"' has no template");t=m.a.ua(e),m.f.da(n,t)}function n(t,e,n,i){var o=t.createViewModel;return o?o.call(t,i,{element:e,templateNodes:n}):i}var i=0;m.d.component={init:function(o,r,s,a,l){function u(){var t=c&&c.dispose;"function"==typeof t&&t.call(c),h=c=null}var c,h,p=m.a.V(m.f.childNodes(o));return m.a.F.oa(o,u),m.m(function(){var s,a,d=m.a.c(r());if("string"==typeof d?s=d:(s=m.a.c(d.name),a=m.a.c(d.params)),!s)throw Error("No component name specified");var f=h=++i;m.g.get(s,function(i){if(h===f){if(u(),!i)throw Error("Unknown component '"+s+"'");e(s,i,o);var r=n(i,o,p,a);i=l.createChildContext(r,t,function(t){t.$component=r,t.$componentTemplateNodes=p}),c=r,m.eb(i,o)}})},null,{i:o}),{controlsDescendantBindings:!0}}},m.f.Z.component=!0}();var T={"class":"className","for":"htmlFor"};m.d.attr={update:function(e,n){var i=m.a.c(n())||{};m.a.D(i,function(n,i){i=m.a.c(i);var o=!1===i||null===i||i===t;o&&e.removeAttribute(n),8>=m.a.C&&n in T?(n=T[n],o?e.removeAttribute(n):e[n]=i):o||e.setAttribute(n,i.toString()),"name"===n&&m.a.rc(e,o?"":i.toString())})}},function(){m.d.checked={after:["value","attr"],init:function(e,n,i){function o(){var t=e.checked,o=d?s():t;if(!m.va.Sa()&&(!l||t)){var r=m.l.w(n);if(c){var a=h?r.t():r;p!==o?(t&&(m.a.pa(a,o,!0),m.a.pa(a,p,!1)),p=o):m.a.pa(a,o,t),h&&m.Ba(r)&&r(a)}else m.h.Ea(r,i,"checked",o,!0)}}function r(){var t=m.a.c(n());e.checked=c?0<=m.a.o(t,s()):a?t:s()===t}var s=m.nc(function(){return i.has("checkedValue")?m.a.c(i.get("checkedValue")):i.has("value")?m.a.c(i.get("value")):e.value}),a="checkbox"==e.type,l="radio"==e.type;if(a||l){var u=n(),c=a&&m.a.c(u)instanceof Array,h=!(c&&u.push&&u.splice),p=c?s():t,d=l||c;l&&!e.name&&m.d.uniqueName.init(e,function(){return!0}),m.m(o,null,{i:e}),m.a.p(e,"click",o),m.m(r,null,{i:e}),u=t}}},m.h.ea.checked=!0,m.d.checkedValue={update:function(t,e){t.value=m.a.c(e())}}}(),m.d.css={update:function(t,e){var n=m.a.c(e());null!==n&&"object"==typeof n?m.a.D(n,function(e,n){n=m.a.c(n),m.a.bb(t,e,n)}):(n=m.a.$a(String(n||"")),m.a.bb(t,t.__ko__cssValue,!1),t.__ko__cssValue=n,m.a.bb(t,n,!0))}},m.d.enable={update:function(t,e){var n=m.a.c(e());n&&t.disabled?t.removeAttribute("disabled"):n||t.disabled||(t.disabled=!0)}},m.d.disable={update:function(t,e){m.d.enable.update(t,function(){return!m.a.c(e())})}},m.d.event={init:function(t,e,n,i,o){var r=e()||{};m.a.D(r,function(r){"string"==typeof r&&m.a.p(t,r,function(t){var s,a=e()[r];if(a){try{var l=m.a.V(arguments);i=o.$data,l.unshift(i),s=a.apply(i,l)}finally{!0!==s&&(t.preventDefault?t.preventDefault():t.returnValue=!1)}!1===n.get(r+"Bubble")&&(t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation())}})})}},m.d.foreach={ic:function(t){return function(){var e=t(),n=m.a.zb(e);return n&&"number"!=typeof n.length?(m.a.c(e),{foreach:n.data,as:n.as,includeDestroyed:n.includeDestroyed,afterAdd:n.afterAdd,beforeRemove:n.beforeRemove,afterRender:n.afterRender,beforeMove:n.beforeMove,afterMove:n.afterMove,templateEngine:m.W.sb}):{foreach:e,templateEngine:m.W.sb}}},init:function(t,e){return m.d.template.init(t,m.d.foreach.ic(e))},update:function(t,e,n,i,o){return m.d.template.update(t,m.d.foreach.ic(e),n,i,o)}},m.h.ta.foreach=!1,m.f.Z.foreach=!0,m.d.hasfocus={init:function(t,e,n){function i(i){t.__ko_hasfocusUpdating=!0;var o=t.ownerDocument;if("activeElement"in o){var r;try{r=o.activeElement}catch(s){r=o.body}i=r===t}o=e(),m.h.Ea(o,n,"hasfocus",i,!0),t.__ko_hasfocusLastValue=i,t.__ko_hasfocusUpdating=!1}var o=i.bind(null,!0),r=i.bind(null,!1);m.a.p(t,"focus",o),m.a.p(t,"focusin",o),m.a.p(t,"blur",r),m.a.p(t,"focusout",r)},update:function(t,e){var n=!!m.a.c(e());t.__ko_hasfocusUpdating||t.__ko_hasfocusLastValue===n||(n?t.focus():t.blur(),!n&&t.__ko_hasfocusLastValue&&t.ownerDocument.body.focus(),m.l.w(m.a.Da,null,[t,n?"focusin":"focusout"]))}},m.h.ea.hasfocus=!0,m.d.hasFocus=m.d.hasfocus,m.h.ea.hasFocus=!0,m.d.html={init:function(){return{controlsDescendantBindings:!0}},update:function(t,e){m.a.Cb(t,e())}},f("if"),f("ifnot",!1,!0),f("with",!0,!1,function(t,e){return t.createChildContext(e)});var D={};m.d.options={init:function(t){if("select"!==m.a.A(t))throw Error("options binding applies only to SELECT elements");for(;0m.a.C)var a=m.a.e.I(),l=m.a.e.I(),u=function(t){var e=this.activeElement;(e=e&&m.a.e.get(e,l))&&e(t)},c=function(t,e){var n=t.ownerDocument;m.a.e.get(n,a)||(m.a.e.set(n,a,!0),m.a.p(n,"selectionchange",u)),m.a.e.set(t,l,e)};m.d.textInput={init:function(e,n,o){function a(t,n){m.a.p(e,t,n)}function l(){var i=m.a.c(n());(null===i||i===t)&&(i=""),d!==t&&i===d?m.a.setTimeout(l,4):e.value!==i&&(f=i,e.value=i)}function u(){p||(d=e.value,p=m.a.setTimeout(h,4))}function h(){clearTimeout(p),d=p=t;var i=e.value;f!==i&&(f=i,m.h.Ea(n(),o,"textInput",i))}var p,d,f=e.value,g=9==m.a.C?u:h;10>m.a.C?(a("propertychange",function(t){"value"===t.propertyName&&g(t)}),8==m.a.C&&(a("keyup",h),a("keydown",h)),8<=m.a.C&&(c(e,g),a("dragend",u))):(a("input",h),5>r&&"textarea"===m.a.A(e)?(a("keydown",u),a("paste",u),a("cut",u)):11>i?a("keydown",u):4>s&&(a("DOMAutoComplete",h),a("dragdrop",h),a("drop",h))),a("change",h),m.m(l,null,{i:e})}},m.h.ea.textInput=!0,m.d.textinput={preprocess:function(t,e,n){n("textInput",t)}}}(),m.d.uniqueName={init:function(t,e){if(e()){var n="ko_unique_"+ ++m.d.uniqueName.Ic;m.a.rc(t,n)}}},m.d.uniqueName.Ic=0,m.d.value={after:["options","foreach"],init:function(t,e,n){if("input"!=t.tagName.toLowerCase()||"checkbox"!=t.type&&"radio"!=t.type){var i=["change"],o=n.get("valueUpdate"),r=!1,s=null;o&&("string"==typeof o&&(o=[o]),m.a.ra(i,o),i=m.a.Tb(i));var a=function(){s=null,r=!1;var i=e(),o=m.j.u(t);m.h.Ea(i,n,"value",o)};!m.a.C||"input"!=t.tagName.toLowerCase()||"text"!=t.type||"off"==t.autocomplete||t.form&&"off"==t.form.autocomplete||-1!=m.a.o(i,"propertychange")||(m.a.p(t,"propertychange",function(){r=!0}),m.a.p(t,"focus",function(){r=!1}),m.a.p(t,"blur",function(){r&&a()})),m.a.q(i,function(e){var n=a;m.a.nd(e,"after")&&(n=function(){s=m.j.u(t),m.a.setTimeout(a,0)},e=e.substring(5)),m.a.p(t,e,n)});var l=function(){var i=m.a.c(e()),o=m.j.u(t);if(null!==s&&i===s)m.a.setTimeout(l,0);else if(i!==o)if("select"===m.a.A(t)){var r=n.get("valueAllowUnset"),o=function(){m.j.ha(t,i,r)};o(),r||i===m.j.u(t)?m.a.setTimeout(o,0):m.l.w(m.a.Da,null,[t,"change"])}else m.j.ha(t,i)};m.m(l,null,{i:t})}else m.Ja(t,{checkedValue:e})},update:function(){}},m.h.ea.value=!0,m.d.visible={update:function(t,e){var n=m.a.c(e()),i="none"!=t.style.display;n&&!i?t.style.display="":!n&&i&&(t.style.display="none")}},function(t){m.d[t]={init:function(e,n,i,o,r){return m.d.event.init.call(this,e,function(){var e={};return e[t]=n(),e},i,o,r)}}}("click"),m.O=function(){},m.O.prototype.renderTemplateSource=function(){throw Error("Override renderTemplateSource")},m.O.prototype.createJavaScriptEvaluatorBlock=function(){throw Error("Override createJavaScriptEvaluatorBlock")},m.O.prototype.makeTemplateSource=function(t,e){if("string"==typeof t){e=e||n;var i=e.getElementById(t);if(!i)throw Error("Cannot find template with ID "+t);return new m.v.n(i)}if(1==t.nodeType||8==t.nodeType)return new m.v.qa(t);throw Error("Unknown template type: "+t)},m.O.prototype.renderTemplate=function(t,e,n,i){return t=this.makeTemplateSource(t,i),this.renderTemplateSource(t,e,n,i)},m.O.prototype.isTemplateRewritten=function(t,e){return!1===this.allowTemplateRewriting?!0:this.makeTemplateSource(t,e).data("isRewritten")},m.O.prototype.rewriteTemplate=function(t,e,n){t=this.makeTemplateSource(t,n),e=e(t.text()),t.text(e),t.data("isRewritten",!0)},m.b("templateEngine",m.O),m.Gb=function(){function t(t,e,n,i){t=m.h.yb(t);for(var o=m.h.ta,r=0;r]*))?)*\s+)data-bind\s*=\s*(["'])([\s\S]*?)\3/gi,n=/\x3c!--\s*ko\b\s*([\s\S]*?)\s*--\x3e/g;return{Oc:function(t,e,n){e.isTemplateRewritten(t,n)||e.rewriteTemplate(t,function(t){return m.Gb.dd(t,e)},n)},dd:function(i,o){return i.replace(e,function(e,n,i,r,s){return t(s,n,i,o)}).replace(n,function(e,n){return t(n,"","#comment",o)})},Ec:function(t,e){return m.M.wb(function(n,i){var o=n.nextSibling;o&&o.nodeName.toLowerCase()===e&&m.Ja(o,t,i)})}}}(),m.b("__tr_ambtns",m.Gb.Ec),function(){m.v={},m.v.n=function(t){if(this.n=t){var e=m.a.A(t);this.ab="script"===e?1:"textarea"===e?2:"template"==e&&t.content&&11===t.content.nodeType?3:4}},m.v.n.prototype.text=function(){var t=1===this.ab?"text":2===this.ab?"value":"innerHTML";if(0==arguments.length)return this.n[t];var e=arguments[0];"innerHTML"===t?m.a.Cb(this.n,e):this.n[t]=e};var e=m.a.e.I()+"_";m.v.n.prototype.data=function(t){return 1===arguments.length?m.a.e.get(this.n,e+t):void m.a.e.set(this.n,e+t,arguments[1])};var n=m.a.e.I();m.v.n.prototype.nodes=function(){var e=this.n;return 0==arguments.length?(m.a.e.get(e,n)||{}).jb||(3===this.ab?e.content:4===this.ab?e:t):void m.a.e.set(e,n,{jb:arguments[0]})},m.v.qa=function(t){this.n=t},m.v.qa.prototype=new m.v.n,m.v.qa.prototype.text=function(){if(0==arguments.length){var e=m.a.e.get(this.n,n)||{};return e.Hb===t&&e.jb&&(e.Hb=e.jb.innerHTML),e.Hb}m.a.e.set(this.n,n,{Hb:arguments[0]})},m.b("templateSources",m.v),m.b("templateSources.domElement",m.v.n),m.b("templateSources.anonymousTemplate",m.v.qa)}(),function(){function e(t,e,n){var i;for(e=m.f.nextSibling(e);t&&(i=t)!==e;)t=m.f.nextSibling(i),n(i,t)}function n(t,n){if(t.length){var i=t[0],o=t[t.length-1],r=i.parentNode,s=m.Q.instance,a=s.preprocessNode;if(a){if(e(i,o,function(t,e){var n=t.previousSibling,r=a.call(s,t);r&&(t===i&&(i=r[0]||e),t===o&&(o=r[r.length-1]||n))}),t.length=0,!i)return;i===o?t.push(i):(t.push(i,o),m.a.za(t,r))}e(i,o,function(t){1!==t.nodeType&&8!==t.nodeType||m.Rb(n,t)}),e(i,o,function(t){1!==t.nodeType&&8!==t.nodeType||m.M.yc(t,[n])}),m.a.za(t,r)}}function i(t){return t.nodeType?t:0i)&&(s=t[o]);++o){for(r=0;a=e[r];++r)if(s.value===a.value){s.moved=a.index,a.moved=s.index,e.splice(r,1),i=r=0;break}i+=r}}},m.a.ib=function(){function t(t,e,n,i,o){var r,s,a,l,u,c=Math.min,h=Math.max,p=[],d=t.length,f=e.length,g=f-d||1,_=d+f+1;for(r=0;d>=r;r++)for(l=a,p.push(a=[]),u=c(f,r+g),s=h(0,r-1);u>=s;s++)a[s]=s?r?t[r-1]===e[s-1]?l[s-1]:c(l[s]||_,a[s-1]||_)+1:s+1:r+1;for(c=[],h=[],g=[],r=d,s=f;r||s;)f=p[r][s]-1,s&&f===p[r][s-1]?h.push(c[c.length]={status:n,value:e[--s],index:s}):r&&f===p[r-1][s]?g.push(c[c.length]={status:i,value:t[--r],index:r}):(--s,--r,o.sparse||c.push({status:"retained",value:e[s]}));return m.a.dc(g,h,!o.dontLimitMoves&&10*d),c.reverse()}return function(e,n,i){return i="boolean"==typeof i?{dontLimitMoves:i}:i||{},e=e||[],n=n||[],e.lengthn;n++)e[n]&&m.a.q(e[n].ca,function(i){t(i,n,e[n].ja)})}r=r||[],a=a||{};var h=m.a.e.get(o,n)===t,p=m.a.e.get(o,n)||[],d=m.a.fb(p,function(t){return t.ja}),f=m.a.ib(d,r,a.dontLimitMoves),g=[],_=0,v=0,y=[],b=[];r=[];for(var w,k,x,C=[],d=[],E=0;k=f[E];E++)switch(x=k.moved,k.status){case"deleted":x===t&&(w=p[_],w.B&&(w.B.k(),w.B=t),m.a.za(w.ca,o).length&&(a.beforeRemove&&(g.push(w),b.push(w),w.ja===i?w=null:r[E]=w),w&&y.push.apply(y,w.ca))),_++;break;case"retained":u(E,_++);break;case"added":x!==t?u(E,x):(w={ja:k.value,qb:m.N(v++)},g.push(w),b.push(w),h||(d[E]=w))}m.a.e.set(o,n,g),c(a.beforeMove,C),m.a.q(y,a.beforeRemove?m.$:m.removeNode);for(var L,E=0,h=m.f.firstChild(o);w=b[E];E++){for(w.ca||m.a.extend(w,e(o,s,w.ja,l,w.qb)),_=0;f=w.ca[_];h=f.nextSibling,L=f,_++)f!==h&&m.f.gc(o,f,L);!w.Wc&&l&&(l(w.ja,w.ca,w.qb),w.Wc=!0)}for(c(a.beforeRemove,r),E=0;Em.a.C?0:t.nodes)?t.nodes():null)?m.a.V(e.cloneNode(!0).childNodes):(t=t.text(),m.a.ma(t,i))},m.W.sb=new m.W,m.Db(m.W.sb),m.b("nativeTemplateEngine",m.W),function(){m.vb=function(){var t=this.$c=function(){if(!o||!o.tmpl)return 0;try{if(0<=o.tmpl.tag.tmpl.open.toString().indexOf("__"))return 2}catch(t){}return 1}();this.renderTemplateSource=function(e,i,r,s){if(s=s||n,r=r||{},2>t)throw Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later.");var a=e.data("precompiled");return a||(a=e.text()||"",a=o.template(null,"{{ko_with $item.koBindingContext}}"+a+"{{/ko_with}}"),e.data("precompiled",a)),e=[i.$data],i=o.extend({koBindingContext:i},r.templateOptions),i=o.tmpl(a,e,i),i.appendTo(s.createElement("div")),o.fragments={},i},this.createJavaScriptEvaluatorBlock=function(t){return"{{ko_code ((function() { return "+t+" })()) }}"},this.addTemplate=function(t,e){n.write("")},t>0&&(o.tmpl.tag.ko_code={open:"__.push($1 || '');"},o.tmpl.tag.ko_with={open:"with($1) {",close:"} "})},m.vb.prototype=new m.O;var t=new m.vb;0]*src="[^"<>]*"[^<>]*)\\s?\\/?>',r=RegExp(o,"i");return t=t.replace(/<[^<>]*>?/gi,function(t){var e,o,s,l,c;if(/(^<->|^<-\s|^<3\s)/.test(t))return t;if(e=t.match(r)){var g=e[1];if(o=n(g.match(/src="([^"<>]*)"/i)[1]),s=g.match(/alt="([^"<>]*)"/i),s=s&&"undefined"!=typeof s[1]?s[1]:"",l=g.match(/title="([^"<>]*)"/i),l=l&&"undefined"!=typeof l[1]?l[1]:"",o&&/^https?:\/\//i.test(o))return""!==h?''+s+'':''+s+''}return c=d.indexOf("a"),e=t.match(i),e&&(l="undefined"!=typeof e[2]?e[2]:"",o=n(e[1]),o&&/^(?:https?:\/\/|ftp:\/\/|mailto:|xmpp:)/i.test(o))?(p=!0,f[c]+=1,''):(e=/<\/a>/i.test(t))?(p=!0,f[c]-=1,f[c]<0&&(m[c]=!0),""):(e=t.match(/<(br|hr)\s?\/?>/i))?"<"+e[1].toLowerCase()+">":(e=t.match(/<(\/?)(b|blockquote|code|em|h[1-6]|li|ol(?: start="\d+")?|p|pre|s|sub|sup|strong|ul)>/i),e&&!/<\/ol start="\d+"/i.test(t)?(p=!0,c=d.indexOf(e[2].toLowerCase().split(" ")[0]),"/"===e[1]?f[c]-=1:f[c]+=1,f[c]<0&&(m[c]=!0),"<"+e[1]+e[2].toLowerCase()+">"):u===!0?"":a(t))})}function o(t){var e,n,o;for(l=0;l]*" title="[^"<>]*" target="_blank">',"g"):"ol"===e?//g:RegExp("<"+e+">","g"),i=RegExp("","g"),c===!0?(t=t.replace(n,""),t=t.replace(i,"")):(t=t.replace(n,function(t){return a(t)}),t=t.replace(i,function(t){return a(t)})),t}function n(t){var n;for(n=0;n`\\x00-\\x20]+",r="'[^']*'",s='"[^"]*"',a="(?:"+o+"|"+r+"|"+s+")",l="(?:\\s+"+i+"(?:\\s*=\\s*"+a+")?)",u="<[A-Za-z][A-Za-z0-9\\-]*"+l+"*\\s*\\/?>",c="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",h="|",p="<[?].*?[?]>",d="]*>",f="",m=new RegExp("^(?:"+u+"|"+c+"|"+h+"|"+p+"|"+d+"|"+f+")"),g=new RegExp("^(?:"+u+"|"+c+")");e.exports.HTML_TAG_RE=m,e.exports.HTML_OPEN_CLOSE_TAG_RE=g},{}],4:[function(t,e,n){"use strict";function i(t){return Object.prototype.toString.call(t)}function o(t){return"[object String]"===i(t)}function r(t,e){return w.call(t,e)}function s(t){var e=Array.prototype.slice.call(arguments,1);return e.forEach(function(e){if(e){if("object"!=typeof e)throw new TypeError(e+"must be object");Object.keys(e).forEach(function(n){t[n]=e[n]})}}),t}function a(t,e,n){return[].concat(t.slice(0,e),n,t.slice(e+1))}function l(t){return t>=55296&&57343>=t?!1:t>=64976&&65007>=t?!1:65535===(65535&t)||65534===(65535&t)?!1:t>=0&&8>=t?!1:11===t?!1:t>=14&&31>=t?!1:t>=127&&159>=t?!1:!(t>1114111)}function u(t){if(t>65535){t-=65536;var e=55296+(t>>10),n=56320+(1023&t);return String.fromCharCode(e,n)}return String.fromCharCode(t)}function c(t,e){var n=0;return r(L,e)?L[e]:35===e.charCodeAt(0)&&E.test(e)&&(n="x"===e[1].toLowerCase()?parseInt(e.slice(2),16):parseInt(e.slice(1),10),l(n))?u(n):t}function h(t){return t.indexOf("\\")<0?t:t.replace(k,"$1")}function p(t){return t.indexOf("\\")<0&&t.indexOf("&")<0?t:t.replace(C,function(t,e,n){return e?e:c(t,n)})}function d(t){return P[t]}function f(t){return T.test(t)?t.replace(D,d):t}function m(t){return t.replace(A,"\\$&")}function g(t){switch(t){case 9:case 32:return!0}return!1}function _(t){if(t>=8192&&8202>=t)return!0;switch(t){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function v(t){return S.test(t)}function y(t){switch(t){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function b(t){return t.trim().replace(/\s+/g," ").toUpperCase()}var w=Object.prototype.hasOwnProperty,k=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,x=/&([a-z#][a-z0-9]{1,31});/gi,C=new RegExp(k.source+"|"+x.source,"gi"),E=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,L=t("./entities"),T=/[&<>"]/,D=/[&<>"]/g,P={"&":"&","<":"<",">":">",'"':"""},A=/[.?*+^$[\]\\(){}|-]/g,S=t("uc.micro/categories/P/regex");n.lib={},n.lib.mdurl=t("mdurl"),n.lib.ucmicro=t("uc.micro"),n.assign=s,n.isString=o,n.has=r,n.unescapeMd=h,n.unescapeAll=p,n.isValidEntityCode=l,n.fromCodePoint=u,n.escapeHtml=f,n.arrayReplaceAt=a,n.isSpace=g,n.isWhiteSpace=_,n.isMdAsciiPunct=y,n.isPunctChar=v,n.escapeRE=m,n.normalizeReference=b},{"./entities":1,mdurl:59,"uc.micro":65,"uc.micro/categories/P/regex":63}],5:[function(t,e,n){"use strict";n.parseLinkLabel=t("./parse_link_label"),n.parseLinkDestination=t("./parse_link_destination"),n.parseLinkTitle=t("./parse_link_title")},{"./parse_link_destination":6,"./parse_link_label":7,"./parse_link_title":8}],6:[function(t,e,n){"use strict";var i=t("../common/utils").isSpace,o=t("../common/utils").unescapeAll;e.exports=function(t,e,n){var r,s,a=0,l=e,u={ok:!1,pos:0,lines:0,str:""};if(60===t.charCodeAt(e)){for(e++;n>e;){if(r=t.charCodeAt(e),10===r||i(r))return u;if(62===r)return u.pos=e+1,u.str=o(t.slice(l+1,e)),u.ok=!0,u;92===r&&n>e+1?e+=2:e++}return u}for(s=0;n>e&&(r=t.charCodeAt(e),32!==r)&&!(32>r||127===r);)if(92===r&&n>e+1)e+=2;else{if(40===r&&(s++,s>1))break;if(41===r&&(s--,0>s))break;e++}return l===e?u:(u.str=o(t.slice(l,e)),u.lines=a,u.pos=e,u.ok=!0,u)}},{"../common/utils":4}],7:[function(t,e,n){"use strict";e.exports=function(t,e,n){var i,o,r,s,a=-1,l=t.posMax,u=t.pos;for(t.pos=e+1,i=1;t.pos=n)return l;if(r=t.charCodeAt(e),34!==r&&39!==r&&40!==r)return l;for(e++,40===r&&(r=41);n>e;){if(o=t.charCodeAt(e),o===r)return l.pos=e+1,l.lines=s,l.str=i(t.slice(a+1,e)),l.ok=!0,l;10===o?s++:92===o&&n>e+1&&(e++,10===t.charCodeAt(e)&&s++),e++}return l}},{"../common/utils":4}],9:[function(t,e,n){"use strict";function i(t){var e=t.trim().toLowerCase();return _.test(e)?!!v.test(e):!0}function o(t){var e=f.parse(t,!0);if(e.hostname&&(!e.protocol||y.indexOf(e.protocol)>=0))try{e.hostname=m.toASCII(e.hostname)}catch(n){}return f.encode(f.format(e))}function r(t){var e=f.parse(t,!0);if(e.hostname&&(!e.protocol||y.indexOf(e.protocol)>=0))try{e.hostname=m.toUnicode(e.hostname)}catch(n){}return f.decode(f.format(e))}function s(t,e){return this instanceof s?(e||a.isString(t)||(e=t||{},t="default"),this.inline=new p,this.block=new h,this.core=new c,this.renderer=new u,this.linkify=new d,this.validateLink=i,this.normalizeLink=o,this.normalizeLinkText=r,this.utils=a,this.helpers=l,this.options={},this.configure(t),void(e&&this.set(e))):new s(t,e)}var a=t("./common/utils"),l=t("./helpers"),u=t("./renderer"),c=t("./parser_core"),h=t("./parser_block"),p=t("./parser_inline"),d=t("linkify-it"),f=t("mdurl"),m=t("punycode"),g={"default":t("./presets/default"),zero:t("./presets/zero"),commonmark:t("./presets/commonmark")},_=/^(vbscript|javascript|file|data):/,v=/^data:image\/(gif|png|jpeg|webp);/,y=["http:","https:","mailto:"];s.prototype.set=function(t){return a.assign(this.options,t),this},s.prototype.configure=function(t){var e,n=this;if(a.isString(t)&&(e=t,t=g[e],!t))throw new Error('Wrong `markdown-it` preset "'+e+'", check name');if(!t)throw new Error("Wrong `markdown-it` preset, can't be empty");return t.options&&n.set(t.options),t.components&&Object.keys(t.components).forEach(function(e){t.components[e].rules&&n[e].ruler.enableOnly(t.components[e].rules),t.components[e].rules2&&n[e].ruler2.enableOnly(t.components[e].rules2)}),this},s.prototype.enable=function(t,e){var n=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach(function(e){n=n.concat(this[e].ruler.enable(t,!0))},this),n=n.concat(this.inline.ruler2.enable(t,!0));var i=t.filter(function(t){return n.indexOf(t)<0});if(i.length&&!e)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+i);return this},s.prototype.disable=function(t,e){var n=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach(function(e){n=n.concat(this[e].ruler.disable(t,!0))},this),n=n.concat(this.inline.ruler2.disable(t,!0));var i=t.filter(function(t){return n.indexOf(t)<0});if(i.length&&!e)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+i);return this},s.prototype.use=function(t){var e=[this].concat(Array.prototype.slice.call(arguments,1));return t.apply(t,e),this},s.prototype.parse=function(t,e){var n=new this.core.State(t,this,e);return this.core.process(n),n.tokens},s.prototype.render=function(t,e){return e=e||{},this.renderer.render(this.parse(t,e),this.options,e)},s.prototype.parseInline=function(t,e){var n=new this.core.State(t,this,e);return n.inlineMode=!0,this.core.process(n),n.tokens},s.prototype.renderInline=function(t,e){return e=e||{},this.renderer.render(this.parseInline(t,e),this.options,e)},e.exports=s},{"./common/utils":4,"./helpers":5,"./parser_block":10,"./parser_core":11,"./parser_inline":12,"./presets/commonmark":13,"./presets/default":14,"./presets/zero":15,"./renderer":16,"linkify-it":54,mdurl:59,punycode:52}],10:[function(t,e,n){"use strict";function i(){this.ruler=new o;for(var t=0;ta&&(t.line=a=t.skipEmptyLines(a),!(a>=n))&&!(t.sCount[a]=u){t.line=n;break}for(o=0;s>o&&!(i=r[o](t,a,n,!1));o++);if(t.tight=!l,t.isEmpty(t.line-1)&&(l=!0),a=t.line,n>a&&t.isEmpty(a)){if(l=!0,a++,n>a&&"list"===t.parentType&&t.isEmpty(a))break;t.line=a}}},i.prototype.parse=function(t,e,n,i){var o;t&&(o=new this.State(t,e,n,i),this.tokenize(o,o.line,o.lineMax))},i.prototype.State=t("./rules_block/state_block"),e.exports=i},{"./ruler":17,"./rules_block/blockquote":18,"./rules_block/code":19,"./rules_block/fence":20,"./rules_block/heading":21,"./rules_block/hr":22,"./rules_block/html_block":23,"./rules_block/lheading":24,"./rules_block/list":25,"./rules_block/paragraph":26,"./rules_block/reference":27,"./rules_block/state_block":28,"./rules_block/table":29}],11:[function(t,e,n){"use strict";function i(){this.ruler=new o;for(var t=0;te;e++)i[e](t)},i.prototype.State=t("./rules_core/state_core"),e.exports=i},{"./ruler":17,"./rules_core/block":30,"./rules_core/inline":31,"./rules_core/linkify":32,"./rules_core/normalize":33,"./rules_core/replacements":34,"./rules_core/smartquotes":35,"./rules_core/state_core":36}],12:[function(t,e,n){"use strict";function i(){var t;for(this.ruler=new o,t=0;tn&&(t.level++,e=o[n](t,!0),t.level--,!e);n++);else t.pos=t.posMax;e||t.pos++,a[i]=t.pos},i.prototype.tokenize=function(t){for(var e,n,i=this.ruler.getRules(""),o=i.length,r=t.posMax,s=t.md.options.maxNesting;t.posn&&!(e=i[n](t,!1));n++);if(e){if(t.pos>=r)break}else t.pending+=t.src[t.pos++]}t.pending&&t.pushPending()},i.prototype.parse=function(t,e,n,i){var o,r,s,a=new this.State(t,e,n,i);for(this.tokenize(a),r=this.ruler2.getRules(""),s=r.length,o=0;s>o;o++)r[o](a)},i.prototype.State=t("./rules_inline/state_inline"),e.exports=i},{"./ruler":17,"./rules_inline/autolink":37,"./rules_inline/backticks":38,"./rules_inline/balance_pairs":39,"./rules_inline/emphasis":40,"./rules_inline/entity":41,"./rules_inline/escape":42,"./rules_inline/html_inline":43,"./rules_inline/image":44,"./rules_inline/link":45,"./rules_inline/newline":46,"./rules_inline/state_inline":47,"./rules_inline/strikethrough":48,"./rules_inline/text":49,"./rules_inline/text_collapse":50}],13:[function(t,e,n){"use strict";e.exports={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","text_collapse"]}}}},{}],14:[function(t,e,n){"use strict";e.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}}},{}],15:[function(t,e,n){"use strict";e.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","text_collapse"]}}}},{}],16:[function(t,e,n){"use strict";function i(){this.rules=o({},a)}var o=t("./common/utils").assign,r=t("./common/utils").unescapeAll,s=t("./common/utils").escapeHtml,a={};a.code_inline=function(t,e){return""+s(t[e].content)+""},a.code_block=function(t,e){return"
"+s(t[e].content)+"
\n"},a.fence=function(t,e,n,i,o){var a,l=t[e],u=l.info?r(l.info).trim():"",c="";return u&&(c=u.split(/\s+/g)[0],l.attrJoin("class",n.langPrefix+c)),a=n.highlight?n.highlight(l.content,c)||s(l.content):s(l.content),0===a.indexOf(""+a+"\n"},a.image=function(t,e,n,i,o){var r=t[e];return r.attrs[r.attrIndex("alt")][1]=o.renderInlineAsText(r.children,n,i),o.renderToken(t,e,n)},a.hardbreak=function(t,e,n){return n.xhtmlOut?"
\n":"
\n"},a.softbreak=function(t,e,n){return n.breaks?n.xhtmlOut?"
\n":"
\n":"\n"},a.text=function(t,e){return s(t[e].content)},a.html_block=function(t,e){return t[e].content},a.html_inline=function(t,e){return t[e].content},i.prototype.renderAttrs=function(t){var e,n,i;if(!t.attrs)return"";for(i="",e=0,n=t.attrs.length;n>e;e++)i+=" "+s(t.attrs[e][0])+'="'+s(t.attrs[e][1])+'"';return i},i.prototype.renderToken=function(t,e,n){var i,o="",r=!1,s=t[e];return s.hidden?"":(s.block&&-1!==s.nesting&&e&&t[e-1].hidden&&(o+="\n"),o+=(-1===s.nesting?"\n":">")},i.prototype.renderInline=function(t,e,n){for(var i,o="",r=this.rules,s=0,a=t.length;a>s;s++)i=t[s].type,o+="undefined"!=typeof r[i]?r[i](t,s,e,n,this):this.renderToken(t,s,e);return o},i.prototype.renderInlineAsText=function(t,e,n){for(var i="",o=this.rules,r=0,s=t.length;s>r;r++)"text"===t[r].type?i+=o.text(t,r,e,n,this):"image"===t[r].type&&(i+=this.renderInlineAsText(t[r].children,e,n));return i},i.prototype.render=function(t,e,n){var i,o,r,s="",a=this.rules;for(i=0,o=t.length;o>i;i++)r=t[i].type,s+="inline"===r?this.renderInline(t[i].children,e,n):"undefined"!=typeof a[r]?a[t[i].type](t,i,e,n,this):this.renderToken(t,i,e,n);return s},e.exports=i},{"./common/utils":4}],17:[function(t,e,n){"use strict";function i(){this.__rules__=[],this.__cache__=null}i.prototype.__find__=function(t){for(var e=0;ei){if(e)return;throw new Error("Rules manager: invalid rule name "+t)}this.__rules__[i].enabled=!0,n.push(t)},this),this.__cache__=null,n},i.prototype.enableOnly=function(t,e){Array.isArray(t)||(t=[t]),this.__rules__.forEach(function(t){t.enabled=!1}),this.enable(t,e)},i.prototype.disable=function(t,e){Array.isArray(t)||(t=[t]);var n=[];return t.forEach(function(t){var i=this.__find__(t);if(0>i){if(e)return;throw new Error("Rules manager: invalid rule name "+t)}this.__rules__[i].enabled=!1,n.push(t)},this),this.__cache__=null,n},i.prototype.getRules=function(t){return null===this.__cache__&&this.__compile__(),this.__cache__[t]||[]},e.exports=i},{}],18:[function(t,e,n){"use strict";var i=t("../common/utils").isSpace;e.exports=function(t,e,n,o){var r,s,a,l,u,c,h,p,d,f,m,g,_,v,y,b,w=t.bMarks[e]+t.tShift[e],k=t.eMarks[e];if(62!==t.src.charCodeAt(w++))return!1;if(o)return!0;for(32===t.src.charCodeAt(w)&&w++,c=t.blkIndent,t.blkIndent=0,d=f=t.sCount[e]+w-(t.bMarks[e]+t.tShift[e]),u=[t.bMarks[e]],t.bMarks[e]=w;k>w&&(m=t.src.charCodeAt(w),i(m));)9===m?f+=4-f%4:f++,w++;for(s=w>=k,l=[t.sCount[e]],t.sCount[e]=f-d,a=[t.tShift[e]],t.tShift[e]=w-t.bMarks[e],g=t.md.block.ruler.getRules("blockquote"),r=e+1;n>r&&!(t.sCount[r]=k));r++)if(62!==t.src.charCodeAt(w++)){if(s)break;for(b=!1,v=0,y=g.length;y>v;v++)if(g[v](t,r,n,!0)){b=!0;break}if(b)break;u.push(t.bMarks[r]),a.push(t.tShift[r]),l.push(t.sCount[r]),t.sCount[r]=-1}else{for(32===t.src.charCodeAt(w)&&w++,d=f=t.sCount[r]+w-(t.bMarks[r]+t.tShift[r]),u.push(t.bMarks[r]),t.bMarks[r]=w;k>w&&(m=t.src.charCodeAt(w),i(m));)9===m?f+=4-f%4:f++,w++;s=w>=k,l.push(t.sCount[r]),t.sCount[r]=f-d,a.push(t.tShift[r]),t.tShift[r]=w-t.bMarks[r]}for(h=t.parentType,t.parentType="blockquote",_=t.push("blockquote_open","blockquote",1),_.markup=">",_.map=p=[e,0],t.md.block.tokenize(t,e,r),_=t.push("blockquote_close","blockquote",-1),_.markup=">",t.parentType=h,p[1]=t.line,v=0;vi;)if(t.isEmpty(i)){if(s++,s>=2&&"list"===t.parentType)break;i++}else{if(s=0,!(t.sCount[i]-t.blkIndent>=4))break;i++,o=i}return t.line=o,r=t.push("code_block","code",0),r.content=t.getLines(e,o,4+t.blkIndent,!0),r.map=[e,t.line],!0}},{}],20:[function(t,e,n){"use strict";e.exports=function(t,e,n,i){var o,r,s,a,l,u,c,h=!1,p=t.bMarks[e]+t.tShift[e],d=t.eMarks[e];if(p+3>d)return!1;if(o=t.src.charCodeAt(p),126!==o&&96!==o)return!1;if(l=p,p=t.skipChars(p,o),r=p-l,3>r)return!1;if(c=t.src.slice(l,p),s=t.src.slice(p,d),s.indexOf("`")>=0)return!1;if(i)return!0;for(a=e;a++,!(a>=n||(p=l=t.bMarks[a]+t.tShift[a],d=t.eMarks[a],d>p&&t.sCount[a]=4||(p=t.skipChars(p,o),r>p-l||(p=t.skipSpaces(p),d>p)))){h=!0;break}return r=t.sCount[e],t.line=a+(h?1:0),u=t.push("fence","code",0),u.info=s,u.content=t.getLines(e+1,a,r,!0),u.markup=c,u.map=[e,t.line],!0}},{}],21:[function(t,e,n){"use strict";var i=t("../common/utils").isSpace;e.exports=function(t,e,n,o){var r,s,a,l,u=t.bMarks[e]+t.tShift[e],c=t.eMarks[e];if(r=t.src.charCodeAt(u),35!==r||u>=c)return!1;for(s=1,r=t.src.charCodeAt(++u);35===r&&c>u&&6>=s;)s++,r=t.src.charCodeAt(++u);return s>6||c>u&&32!==r?!1:o?!0:(c=t.skipSpacesBack(c,u),a=t.skipCharsBack(c,35,u),a>u&&i(t.src.charCodeAt(a-1))&&(c=a),t.line=e+1,l=t.push("heading_open","h"+String(s),1),l.markup="########".slice(0,s),l.map=[e,t.line],l=t.push("inline","",0),l.content=t.src.slice(u,c).trim(),l.map=[e,t.line],l.children=[],l=t.push("heading_close","h"+String(s),-1),l.markup="########".slice(0,s),!0)}},{"../common/utils":4}],22:[function(t,e,n){"use strict";var i=t("../common/utils").isSpace;e.exports=function(t,e,n,o){var r,s,a,l,u=t.bMarks[e]+t.tShift[e],c=t.eMarks[e];if(r=t.src.charCodeAt(u++),42!==r&&45!==r&&95!==r)return!1;for(s=1;c>u;){if(a=t.src.charCodeAt(u++),a!==r&&!i(a))return!1;a===r&&s++}return 3>s?!1:o?!0:(t.line=e+1,l=t.push("hr","hr",0),l.map=[e,t.line],l.markup=Array(s+1).join(String.fromCharCode(r)),!0)}},{"../common/utils":4}],23:[function(t,e,n){"use strict";var i=t("../common/html_blocks"),o=t("../common/html_re").HTML_OPEN_CLOSE_TAG_RE,r=[[/^<(script|pre|style)(?=(\s|>|$))/i,/<\/(script|pre|style)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(o.source+"\\s*$"),/^$/,!1]];e.exports=function(t,e,n,i){var o,s,a,l,u=t.bMarks[e]+t.tShift[e],c=t.eMarks[e];if(!t.md.options.html)return!1;if(60!==t.src.charCodeAt(u))return!1;for(l=t.src.slice(u,c),o=0;os&&!(t.sCount[s]p&&!t.isEmpty(p);p++)if(!(t.sCount[p]-t.blkIndent>3)){if(t.sCount[p]>=t.blkIndent&&(l=t.bMarks[p]+t.tShift[p],u=t.eMarks[p],u>l&&(h=t.src.charCodeAt(l),(45===h||61===h)&&(l=t.skipChars(l,h),l=t.skipSpaces(l),l>=u)))){c=61===h?1:2;break}if(!(t.sCount[p]<0)){for(o=!1,r=0,s=d.length;s>r;r++)if(d[r](t,p,n,!0)){o=!0;break}if(o)break}}return c?(i=t.getLines(e,p,t.blkIndent,!1).trim(),t.line=p+1,a=t.push("heading_open","h"+String(c),1),a.markup=String.fromCharCode(h),a.map=[e,t.line],a=t.push("inline","",0),a.content=i,a.map=[e,t.line-1],a.children=[],a=t.push("heading_close","h"+String(c),-1),a.markup=String.fromCharCode(h),!0):!1}},{}],25:[function(t,e,n){"use strict";function i(t,e){var n,i,o,r;return i=t.bMarks[e]+t.tShift[e],o=t.eMarks[e],n=t.src.charCodeAt(i++),42!==n&&45!==n&&43!==n?-1:o>i&&(r=t.src.charCodeAt(i),!s(r))?-1:i}function o(t,e){var n,i=t.bMarks[e]+t.tShift[e],o=i,r=t.eMarks[e];if(o+1>=r)return-1;if(n=t.src.charCodeAt(o++),48>n||n>57)return-1;for(;;){if(o>=r)return-1;if(n=t.src.charCodeAt(o++),!(n>=48&&57>=n)){if(41===n||46===n)break;return-1}if(o-i>=10)return-1}return r>o&&(n=t.src.charCodeAt(o),!s(n))?-1:o}function r(t,e){var n,i,o=t.level+2;for(n=e+2,i=t.tokens.length-2;i>n;n++)t.tokens[n].level===o&&"paragraph_open"===t.tokens[n].type&&(t.tokens[n+2].hidden=!0,t.tokens[n].hidden=!0,n+=2)}var s=t("../common/utils").isSpace;e.exports=function(t,e,n,a){var l,u,c,h,p,d,f,m,g,_,v,y,b,w,k,x,C,E,L,T,D,P,A,S,M,z,O,N,I=!0;if((v=o(t,e))>=0)E=!0;else{if(!((v=i(t,e))>=0))return!1;E=!1}if(C=t.src.charCodeAt(v-1),a)return!0;for(T=t.tokens.length,E?(_=t.bMarks[e]+t.tShift[e],x=Number(t.src.substr(_,v-_-1)),M=t.push("ordered_list_open","ol",1),1!==x&&(M.attrs=[["start",x]])):M=t.push("bullet_list_open","ul",1),M.map=P=[e,0],M.markup=String.fromCharCode(C),l=e,D=!1,S=t.md.block.ruler.getRules("list");n>l;){for(b=v,w=t.eMarks[l],u=c=t.sCount[l]+v-(t.bMarks[e]+t.tShift[e]);w>b&&(y=t.src.charCodeAt(b),s(y));)9===y?c+=4-c%4:c++,b++;if(L=b,k=L>=w?1:c-u,k>4&&(k=1),h=u+k,M=t.push("list_item_open","li",1),M.markup=String.fromCharCode(C),M.map=A=[e,0],d=t.blkIndent,m=t.tight,p=t.tShift[e],f=t.sCount[e],g=t.parentType,t.blkIndent=h,t.tight=!0,t.parentType="list",t.tShift[e]=L-t.bMarks[e],t.sCount[e]=c,L>=w&&t.isEmpty(e+1)?t.line=Math.min(t.line+2,n):t.md.block.tokenize(t,e,n,!0),t.tight&&!D||(I=!1),D=t.line-e>1&&t.isEmpty(t.line-1), -t.blkIndent=d,t.tShift[e]=p,t.sCount[e]=f,t.tight=m,t.parentType=g,M=t.push("list_item_close","li",-1),M.markup=String.fromCharCode(C),l=e=t.line,A[1]=l,L=t.bMarks[e],l>=n)break;if(t.isEmpty(l))break;if(t.sCount[l]z;z++)if(S[z](t,l,n,!0)){N=!0;break}if(N)break;if(E){if(v=o(t,l),0>v)break}else if(v=i(t,l),0>v)break;if(C!==t.src.charCodeAt(v-1))break}return M=E?t.push("ordered_list_close","ol",-1):t.push("bullet_list_close","ul",-1),M.markup=String.fromCharCode(C),P[1]=l,t.line=l,I&&r(t,T),!0}},{"../common/utils":4}],26:[function(t,e,n){"use strict";e.exports=function(t,e){for(var n,i,o,r,s,a=e+1,l=t.md.block.ruler.getRules("paragraph"),u=t.lineMax;u>a&&!t.isEmpty(a);a++)if(!(t.sCount[a]-t.blkIndent>3||t.sCount[a]<0)){for(i=!1,o=0,r=l.length;r>o;o++)if(l[o](t,a,u,!0)){i=!0;break}if(i)break}return n=t.getLines(e,a,t.blkIndent,!1).trim(),t.line=a,s=t.push("paragraph_open","p",1),s.map=[e,t.line],s=t.push("inline","",0),s.content=n,s.map=[e,t.line],s.children=[],s=t.push("paragraph_close","p",-1),!0}},{}],27:[function(t,e,n){"use strict";var i=t("../helpers/parse_link_destination"),o=t("../helpers/parse_link_title"),r=t("../common/utils").normalizeReference,s=t("../common/utils").isSpace;e.exports=function(t,e,n,a){var l,u,c,h,p,d,f,m,g,_,v,y,b,w,k,x=0,C=t.bMarks[e]+t.tShift[e],E=t.eMarks[e],L=e+1;if(91!==t.src.charCodeAt(C))return!1;for(;++CL&&!t.isEmpty(L);L++)if(!(t.sCount[L]-t.blkIndent>3||t.sCount[L]<0)){for(b=!1,d=0,f=w.length;f>d;d++)if(w[d](t,L,h,!0)){b=!0;break}if(b)break}for(y=t.getLines(e,L,t.blkIndent,!1).trim(),E=y.length,C=1;E>C;C++){if(l=y.charCodeAt(C),91===l)return!1;if(93===l){g=C;break}10===l?x++:92===l&&(C++,E>C&&10===y.charCodeAt(C)&&x++)}if(0>g||58!==y.charCodeAt(g+1))return!1;for(C=g+2;E>C;C++)if(l=y.charCodeAt(C),10===l)x++;else if(!s(l))break;if(_=i(y,C,E),!_.ok)return!1;if(p=t.md.normalizeLink(_.str),!t.md.validateLink(p))return!1;for(C=_.pos,x+=_.lines,u=C,c=x,v=C;E>C;C++)if(l=y.charCodeAt(C),10===l)x++;else if(!s(l))break;for(_=o(y,C,E),E>C&&v!==C&&_.ok?(k=_.str,C=_.pos,x+=_.lines):(k="",C=u,x=c);E>C&&(l=y.charCodeAt(C),s(l));)C++;if(E>C&&10!==y.charCodeAt(C)&&k)for(k="",C=u,x=c;E>C&&(l=y.charCodeAt(C),s(l));)C++;return E>C&&10!==y.charCodeAt(C)?!1:(m=r(y.slice(1,g)))?a?!0:("undefined"==typeof t.env.references&&(t.env.references={}),"undefined"==typeof t.env.references[m]&&(t.env.references[m]={title:k,href:p}),t.line=e+x+1,!0):!1}},{"../common/utils":4,"../helpers/parse_link_destination":6,"../helpers/parse_link_title":8}],28:[function(t,e,n){"use strict";function i(t,e,n,i){var o,s,a,l,u,c,h,p;for(this.src=t,this.md=e,this.env=n,this.tokens=i,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.parentType="root",this.ddIndent=-1,this.level=0,this.result="",s=this.src,p=!1,a=l=c=h=0,u=s.length;u>l;l++){if(o=s.charCodeAt(l),!p){if(r(o)){c++,9===o?h+=4-h%4:h++;continue}p=!0}10!==o&&l!==u-1||(10!==o&&l++,this.bMarks.push(a),this.eMarks.push(l),this.tShift.push(c),this.sCount.push(h),p=!1,c=0,h=0,a=l+1)}this.bMarks.push(s.length),this.eMarks.push(s.length),this.tShift.push(0),this.sCount.push(0),this.lineMax=this.bMarks.length-1}var o=t("../token"),r=t("../common/utils").isSpace;i.prototype.push=function(t,e,n){var i=new o(t,e,n);return i.block=!0,0>n&&this.level--,i.level=this.level,n>0&&this.level++,this.tokens.push(i),i},i.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]},i.prototype.skipEmptyLines=function(t){for(var e=this.lineMax;e>t&&!(this.bMarks[t]+this.tShift[t]t&&(e=this.src.charCodeAt(t),r(e));t++);return t},i.prototype.skipSpacesBack=function(t,e){if(e>=t)return t;for(;t>e;)if(!r(this.src.charCodeAt(--t)))return t+1;return t},i.prototype.skipChars=function(t,e){for(var n=this.src.length;n>t&&this.src.charCodeAt(t)===e;t++);return t},i.prototype.skipCharsBack=function(t,e,n){if(n>=t)return t;for(;t>n;)if(e!==this.src.charCodeAt(--t))return t+1;return t},i.prototype.getLines=function(t,e,n,i){var o,s,a,l,u,c,h,p=t;if(t>=e)return"";for(c=new Array(e-t),o=0;e>p;p++,o++){for(s=0,h=l=this.bMarks[p],u=e>p+1||i?this.eMarks[p]+1:this.eMarks[p];u>l&&n>s;){if(a=this.src.charCodeAt(l),r(a))9===a?s+=4-s%4:s++;else{if(!(l-hi;)96===e&&r%2===0?(a=!a,l=i):124!==e||r%2!==0||a?92===e?r++:r=0:(n.push(t.substring(s,i)),s=i+1),i++,i===o&&a&&(a=!1,i=l+1),e=t.charCodeAt(i);return n.push(t.substring(s)),n}e.exports=function(t,e,n,r){var s,a,l,u,c,h,p,d,f,m,g,_;if(e+2>n)return!1;if(c=e+1,t.sCount[c]=t.eMarks[c])return!1;if(s=t.src.charCodeAt(l),124!==s&&45!==s&&58!==s)return!1;if(a=i(t,e+1),!/^[-:| ]+$/.test(a))return!1;for(h=a.split("|"),f=[],u=0;uf.length)return!1;if(r)return!0;for(d=t.push("table_open","table",1),d.map=g=[e,0],d=t.push("thead_open","thead",1),d.map=[e,e+1],d=t.push("tr_open","tr",1),d.map=[e,e+1],u=0;uc&&!(t.sCount[c]u;u++)d=t.push("td_open","td",1),f[u]&&(d.attrs=[["style","text-align:"+f[u]]]),d=t.push("inline","",0),d.content=h[u]?h[u].trim():"",d.children=[],d=t.push("td_close","td",-1);d=t.push("tr_close","tr",-1)}return d=t.push("tbody_close","tbody",-1),d=t.push("table_close","table",-1),g[1]=_[1]=c,t.line=c,!0}},{}],30:[function(t,e,n){"use strict";e.exports=function(t){var e;t.inlineMode?(e=new t.Token("inline","",0),e.content=t.src,e.map=[0,1],e.children=[],t.tokens.push(e)):t.md.block.parse(t.src,t.md,t.env,t.tokens)}},{}],31:[function(t,e,n){"use strict";e.exports=function(t){var e,n,i,o=t.tokens;for(n=0,i=o.length;i>n;n++)e=o[n],"inline"===e.type&&t.md.inline.parse(e.content,t.md,t.env,e.children)}},{}],32:[function(t,e,n){"use strict";function i(t){return/^\s]/i.test(t)}function o(t){return/^<\/a\s*>/i.test(t)}var r=t("../common/utils").arrayReplaceAt;e.exports=function(t){var e,n,s,a,l,u,c,h,p,d,f,m,g,_,v,y,b,w=t.tokens;if(t.md.options.linkify)for(n=0,s=w.length;s>n;n++)if("inline"===w[n].type&&t.md.linkify.pretest(w[n].content))for(a=w[n].children,g=0,e=a.length-1;e>=0;e--)if(u=a[e],"link_close"!==u.type){if("html_inline"===u.type&&(i(u.content)&&g>0&&g--,o(u.content)&&g++),!(g>0)&&"text"===u.type&&t.md.linkify.test(u.content)){for(p=u.content,b=t.md.linkify.match(p),c=[],m=u.level,f=0,h=0;hf&&(l=new t.Token("text","",0),l.content=p.slice(f,d),l.level=m,c.push(l)),l=new t.Token("link_open","a",1),l.attrs=[["href",v]],l.level=m++,l.markup="linkify",l.info="auto",c.push(l),l=new t.Token("text","",0),l.content=y,l.level=m,c.push(l),l=new t.Token("link_close","a",-1),l.level=--m,l.markup="linkify",l.info="auto",c.push(l),f=b[h].lastIndex);f=0;e--)n=t[e],"text"===n.type&&(n.content=n.content.replace(l,i))}function r(t){var e,n;for(e=t.length-1;e>=0;e--)n=t[e],"text"===n.type&&s.test(n.content)&&(n.content=n.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])\u2026/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---([^-]|$)/gm,"$1—$2").replace(/(^|\s)--(\s|$)/gm,"$1–$2").replace(/(^|[^-\s])--([^-\s]|$)/gm,"$1–$2"))}var s=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,a=/\((c|tm|r|p)\)/i,l=/\((c|tm|r|p)\)/gi,u={c:"©",r:"®",p:"§",tm:"™"};e.exports=function(t){var e;if(t.md.options.typographer)for(e=t.tokens.length-1;e>=0;e--)"inline"===t.tokens[e].type&&(a.test(t.tokens[e].content)&&o(t.tokens[e].children),s.test(t.tokens[e].content)&&r(t.tokens[e].children))}},{}],35:[function(t,e,n){"use strict";function i(t,e,n){return t.substr(0,e)+n+t.substr(e+1)}function o(t,e){var n,o,l,h,p,d,f,m,g,_,v,y,b,w,k,x,C,E,L,T,D;for(L=[],n=0;n=0&&!(L[C].level<=f);C--);if(L.length=C+1,"text"===o.type){l=o.content,p=0,d=l.length;t:for(;d>p&&(u.lastIndex=p,h=u.exec(l));){if(k=x=!0,p=h.index+1,E="'"===h[0],g=32,h.index-1>=0)g=l.charCodeAt(h.index-1);else for(C=n-1;C>=0;C--)if("text"===t[C].type){g=t[C].content.charCodeAt(t[C].content.length-1);break}if(_=32,d>p)_=l.charCodeAt(p);else for(C=n+1;C=48&&57>=g&&(x=k=!1),k&&x&&(k=!1,x=y),k||x){if(x)for(C=L.length-1;C>=0&&(m=L[C],!(L[C].level=0;e--)"inline"===t.tokens[e].type&&l.test(t.tokens[e].content)&&o(t.tokens[e].children,t)}},{"../common/utils":4}],36:[function(t,e,n){"use strict";function i(t,e,n){this.src=t,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=e}var o=t("../token");i.prototype.Token=o,e.exports=i},{"../token":51}],37:[function(t,e,n){"use strict";var i=/^<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/,o=/^<([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)>/;e.exports=function(t,e){var n,r,s,a,l,u,c=t.pos;return 60!==t.src.charCodeAt(c)?!1:(n=t.src.slice(c),n.indexOf(">")<0?!1:o.test(n)?(r=n.match(o),a=r[0].slice(1,-1),l=t.md.normalizeLink(a),t.md.validateLink(l)?(e||(u=t.push("link_open","a",1),u.attrs=[["href",l]],u.markup="autolink",u.info="auto",u=t.push("text","",0),u.content=t.md.normalizeLinkText(a),u=t.push("link_close","a",-1),u.markup="autolink",u.info="auto"),t.pos+=r[0].length,!0):!1):i.test(n)?(s=n.match(i),a=s[0].slice(1,-1),l=t.md.normalizeLink("mailto:"+a),t.md.validateLink(l)?(e||(u=t.push("link_open","a",1),u.attrs=[["href",l]],u.markup="autolink",u.info="auto",u=t.push("text","",0),u.content=t.md.normalizeLinkText(a),u=t.push("link_close","a",-1),u.markup="autolink",u.info="auto"),t.pos+=s[0].length,!0):!1):!1)}},{}],38:[function(t,e,n){"use strict";e.exports=function(t,e){var n,i,o,r,s,a,l=t.pos,u=t.src.charCodeAt(l);if(96!==u)return!1;for(n=l,l++,i=t.posMax;i>l&&96===t.src.charCodeAt(l);)l++;for(o=t.src.slice(n,l),r=s=l;-1!==(r=t.src.indexOf("`",s));){for(s=r+1;i>s&&96===t.src.charCodeAt(s);)s++;if(s-r===o.length)return e||(a=t.push("code_inline","code",0),a.markup=o,a.content=t.src.slice(l,r).replace(/[ \n]+/g," ").trim()),t.pos=s,!0}return e||(t.pending+=o),t.pos+=o.length,!0}},{}],39:[function(t,e,n){"use strict";e.exports=function(t){var e,n,i,o,r=t.delimiters,s=t.delimiters.length;for(e=0;s>e;e++)if(i=r[e],i.close)for(n=e-i.jump-1;n>=0;){if(o=r[n],o.open&&o.marker===i.marker&&o.end<0&&o.level===i.level){i.jump=e-n,i.open=!1,o.end=e,o.jump=0;break}n-=o.jump+1}}},{}],40:[function(t,e,n){"use strict";e.exports.tokenize=function(t,e){var n,i,o,r=t.pos,s=t.src.charCodeAt(r);if(e)return!1;if(95!==s&&42!==s)return!1;for(i=t.scanDelims(t.pos,42===s),n=0;ne;e++)n=a[e],95!==n.marker&&42!==n.marker||-1!==n.end&&(i=a[n.end],s=l>e+1&&a[e+1].end===n.end-1&&a[e+1].token===n.token+1&&a[n.end-1].token===i.token-1&&a[e+1].marker===n.marker,r=String.fromCharCode(n.marker),o=t.tokens[n.token],o.type=s?"strong_open":"em_open",o.tag=s?"strong":"em",o.nesting=1,o.markup=s?r+r:r,o.content="",o=t.tokens[i.token],o.type=s?"strong_close":"em_close",o.tag=s?"strong":"em",o.nesting=-1,o.markup=s?r+r:r,o.content="",s&&(t.tokens[a[e+1].token].content="",t.tokens[a[n.end-1].token].content="",e++))}},{}],41:[function(t,e,n){"use strict";var i=t("../common/entities"),o=t("../common/utils").has,r=t("../common/utils").isValidEntityCode,s=t("../common/utils").fromCodePoint,a=/^&#((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i,l=/^&([a-z][a-z0-9]{1,31});/i;e.exports=function(t,e){var n,u,c,h=t.pos,p=t.posMax;if(38!==t.src.charCodeAt(h))return!1;if(p>h+1)if(n=t.src.charCodeAt(h+1),35===n){if(c=t.src.slice(h).match(a))return e||(u="x"===c[1][0].toLowerCase()?parseInt(c[1].slice(1),16):parseInt(c[1],10),t.pending+=s(r(u)?u:65533)),t.pos+=c[0].length,!0}else if(c=t.src.slice(h).match(l),c&&o(i,c[1]))return e||(t.pending+=i[c[1]]),t.pos+=c[0].length,!0;return e||(t.pending+="&"),t.pos++,!0}},{"../common/entities":1,"../common/utils":4}],42:[function(t,e,n){"use strict";for(var i=t("../common/utils").isSpace,o=[],r=0;256>r;r++)o.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(t){o[t.charCodeAt(0)]=1}),e.exports=function(t,e){var n,r=t.pos,s=t.posMax;if(92!==t.src.charCodeAt(r))return!1;if(r++,s>r){if(n=t.src.charCodeAt(r),256>n&&0!==o[n])return e||(t.pending+=t.src[r]),t.pos+=2,!0;if(10===n){for(e||t.push("hardbreak","br",0),r++;s>r&&(n=t.src.charCodeAt(r),i(n));)r++;return t.pos=r,!0}}return e||(t.pending+="\\"),t.pos++,!0}},{"../common/utils":4}],43:[function(t,e,n){"use strict";function i(t){var e=32|t;return e>=97&&122>=e}var o=t("../common/html_re").HTML_TAG_RE;e.exports=function(t,e){var n,r,s,a,l=t.pos;return t.md.options.html?(s=t.posMax,60!==t.src.charCodeAt(l)||l+2>=s?!1:(n=t.src.charCodeAt(l+1),(33===n||63===n||47===n||i(n))&&(r=t.src.slice(l).match(o))?(e||(a=t.push("html_inline","",0),a.content=t.src.slice(l,l+r[0].length)),t.pos+=r[0].length,!0):!1)):!1}},{"../common/html_re":3}],44:[function(t,e,n){"use strict";var i=t("../helpers/parse_link_label"),o=t("../helpers/parse_link_destination"),r=t("../helpers/parse_link_title"),s=t("../common/utils").normalizeReference,a=t("../common/utils").isSpace;e.exports=function(t,e){var n,l,u,c,h,p,d,f,m,g,_,v,y,b="",w=t.pos,k=t.posMax;if(33!==t.src.charCodeAt(t.pos))return!1;if(91!==t.src.charCodeAt(t.pos+1))return!1;if(p=t.pos+2,h=i(t,t.pos+1,!1),0>h)return!1;if(d=h+1,k>d&&40===t.src.charCodeAt(d)){for(d++;k>d&&(l=t.src.charCodeAt(d),a(l)||10===l);d++);if(d>=k)return!1;for(y=d,m=o(t.src,d,t.posMax),m.ok&&(b=t.md.normalizeLink(m.str),t.md.validateLink(b)?d=m.pos:b=""),y=d;k>d&&(l=t.src.charCodeAt(d),a(l)||10===l);d++);if(m=r(t.src,d,t.posMax),k>d&&y!==d&&m.ok)for(g=m.str,d=m.pos;k>d&&(l=t.src.charCodeAt(d),a(l)||10===l);d++);else g="";if(d>=k||41!==t.src.charCodeAt(d))return t.pos=w,!1;d++}else{if("undefined"==typeof t.env.references)return!1;if(k>d&&91===t.src.charCodeAt(d)?(y=d+1,d=i(t,d),d>=0?c=t.src.slice(y,d++):d=h+1):d=h+1,c||(c=t.src.slice(p,h)),f=t.env.references[s(c)],!f)return t.pos=w,!1;b=f.href,g=f.title}return e||(u=t.src.slice(p,h),t.md.inline.parse(u,t.md,t.env,v=[]),_=t.push("image","img",0),_.attrs=n=[["src",b],["alt",""]],_.children=v,_.content=u,g&&n.push(["title",g])),t.pos=d,t.posMax=k,!0}},{"../common/utils":4,"../helpers/parse_link_destination":6,"../helpers/parse_link_label":7,"../helpers/parse_link_title":8}],45:[function(t,e,n){"use strict";var i=t("../helpers/parse_link_label"),o=t("../helpers/parse_link_destination"),r=t("../helpers/parse_link_title"),s=t("../common/utils").normalizeReference,a=t("../common/utils").isSpace;e.exports=function(t,e){var n,l,u,c,h,p,d,f,m,g,_="",v=t.pos,y=t.posMax,b=t.pos;if(91!==t.src.charCodeAt(t.pos))return!1;if(h=t.pos+1,c=i(t,t.pos,!0),0>c)return!1;if(p=c+1,y>p&&40===t.src.charCodeAt(p)){for(p++;y>p&&(l=t.src.charCodeAt(p),a(l)||10===l);p++);if(p>=y)return!1;for(b=p,d=o(t.src,p,t.posMax),d.ok&&(_=t.md.normalizeLink(d.str),t.md.validateLink(_)?p=d.pos:_=""),b=p;y>p&&(l=t.src.charCodeAt(p),a(l)||10===l);p++);if(d=r(t.src,p,t.posMax),y>p&&b!==p&&d.ok)for(m=d.str,p=d.pos;y>p&&(l=t.src.charCodeAt(p),a(l)||10===l);p++);else m="";if(p>=y||41!==t.src.charCodeAt(p))return t.pos=v,!1;p++}else{if("undefined"==typeof t.env.references)return!1;if(y>p&&91===t.src.charCodeAt(p)?(b=p+1,p=i(t,p),p>=0?u=t.src.slice(b,p++):p=c+1):p=c+1,u||(u=t.src.slice(h,c)),f=t.env.references[s(u)],!f)return t.pos=v,!1;_=f.href,m=f.title}return e||(t.pos=h,t.posMax=c,g=t.push("link_open","a",1),g.attrs=n=[["href",_]],m&&n.push(["title",m]),t.md.inline.tokenize(t),g=t.push("link_close","a",-1)),t.pos=p,t.posMax=y,!0}},{"../common/utils":4,"../helpers/parse_link_destination":6,"../helpers/parse_link_label":7,"../helpers/parse_link_title":8}],46:[function(t,e,n){"use strict";e.exports=function(t,e){var n,i,o=t.pos;if(10!==t.src.charCodeAt(o))return!1;for(n=t.pending.length-1,i=t.posMax,e||(n>=0&&32===t.pending.charCodeAt(n)?n>=1&&32===t.pending.charCodeAt(n-1)?(t.pending=t.pending.replace(/ +$/,""),t.push("hardbreak","br",0)):(t.pending=t.pending.slice(0,-1),t.push("softbreak","br",0)):t.push("softbreak","br",0)),o++;i>o&&32===t.src.charCodeAt(o);)o++;return t.pos=o,!0}},{}],47:[function(t,e,n){"use strict";function i(t,e,n,i){this.src=t,this.env=n,this.md=e,this.tokens=i,this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[]}var o=t("../token"),r=t("../common/utils").isWhiteSpace,s=t("../common/utils").isPunctChar,a=t("../common/utils").isMdAsciiPunct;i.prototype.pushPending=function(){var t=new o("text","",0);return t.content=this.pending,t.level=this.pendingLevel,this.tokens.push(t),this.pending="",t},i.prototype.push=function(t,e,n){this.pending&&this.pushPending();var i=new o(t,e,n);return 0>n&&this.level--,i.level=this.level,n>0&&this.level++,this.pendingLevel=this.level,this.tokens.push(i),i},i.prototype.scanDelims=function(t,e){var n,i,o,l,u,c,h,p,d,f=t,m=!0,g=!0,_=this.posMax,v=this.src.charCodeAt(t);for(n=t>0?this.src.charCodeAt(t-1):32;_>f&&this.src.charCodeAt(f)===v;)f++;return o=f-t,i=_>f?this.src.charCodeAt(f):32,h=a(n)||s(String.fromCharCode(n)),d=a(i)||s(String.fromCharCode(i)),c=r(n),p=r(i),p?m=!1:d&&(c||h||(m=!1)),c?g=!1:h&&(p||d||(g=!1)),e?(l=m,u=g):(l=m&&(!g||h),u=g&&(!m||d)),{can_open:l,can_close:u,length:o}},i.prototype.Token=o,e.exports=i},{"../common/utils":4,"../token":51}],48:[function(t,e,n){"use strict";e.exports.tokenize=function(t,e){var n,i,o,r,s,a=t.pos,l=t.src.charCodeAt(a);if(e)return!1;if(126!==l)return!1;if(i=t.scanDelims(t.pos,!0),r=i.length,s=String.fromCharCode(l),2>r)return!1;for(r%2&&(o=t.push("text","",0),o.content=s,r--),n=0;r>n;n+=2)o=t.push("text","",0),o.content=s+s,t.delimiters.push({marker:l,jump:n,token:t.tokens.length-1,level:t.level,end:-1,open:i.can_open,close:i.can_close});return t.pos+=i.length,!0},e.exports.postProcess=function(t){var e,n,i,o,r,s=[],a=t.delimiters,l=t.delimiters.length;for(e=0;l>e;e++)i=a[e],126===i.marker&&-1!==i.end&&(o=a[i.end],r=t.tokens[i.token],r.type="s_open",r.tag="s",r.nesting=1,r.markup="~~",r.content="",r=t.tokens[o.token],r.type="s_close",r.tag="s",r.nesting=-1,r.markup="~~",r.content="","text"===t.tokens[o.token-1].type&&"~"===t.tokens[o.token-1].content&&s.push(o.token-1));for(;s.length;){for(e=s.pop(),n=e+1;ne;e++)i+=o[e].nesting,o[e].level=i,"text"===o[e].type&&r>e+1&&"text"===o[e+1].type?o[e+1].content=o[e].content+o[e+1].content:(e!==n&&(o[n]=o[e]),n++);e!==n&&(o.length=n)}},{}],51:[function(t,e,n){"use strict";function i(t,e,n){this.type=t,this.tag=e,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}i.prototype.attrIndex=function(t){var e,n,i;if(!this.attrs)return-1;for(e=this.attrs,n=0,i=e.length;i>n;n++)if(e[n][0]===t)return n;return-1},i.prototype.attrPush=function(t){this.attrs?this.attrs.push(t):this.attrs=[t]},i.prototype.attrSet=function(t,e){var n=this.attrIndex(t),i=[t,e];0>n?this.attrPush(i):this.attrs[n]=i},i.prototype.attrJoin=function(t,e){var n=this.attrIndex(t);0>n?this.attrPush([t,e]):this.attrs[n][1]=this.attrs[n][1]+" "+e},e.exports=i},{}],52:[function(e,n,i){(function(e){!function(o){function r(t){throw new RangeError(O[t])}function s(t,e){for(var n=t.length,i=[];n--;)i[n]=e(t[n]);return i}function a(t,e){var n=t.split("@"),i="";n.length>1&&(i=n[0]+"@",t=n[1]),t=t.replace(z,".");var o=t.split("."),r=s(o,e).join(".");return i+r}function l(t){for(var e,n,i=[],o=0,r=t.length;r>o;)e=t.charCodeAt(o++),e>=55296&&56319>=e&&r>o?(n=t.charCodeAt(o++),56320==(64512&n)?i.push(((1023&e)<<10)+(1023&n)+65536):(i.push(e),o--)):i.push(e);return i}function u(t){return s(t,function(t){var e="";return t>65535&&(t-=65536,e+=B(t>>>10&1023|55296),t=56320|1023&t),e+=B(t)}).join("")}function c(t){return 10>t-48?t-22:26>t-65?t-65:26>t-97?t-97:x}function h(t,e){return t+22+75*(26>t)-((0!=e)<<5)}function p(t,e,n){var i=0;for(t=n?I(t/T):t>>1,t+=I(t/e);t>N*E>>1;i+=x)t=I(t/N);return I(i+(N+1)*t/(t+L))}function d(t){var e,n,i,o,s,a,l,h,d,f,m=[],g=t.length,_=0,v=P,y=D;for(n=t.lastIndexOf(A),0>n&&(n=0),i=0;n>i;++i)t.charCodeAt(i)>=128&&r("not-basic"),m.push(t.charCodeAt(i));for(o=n>0?n+1:0;g>o;){for(s=_,a=1,l=x;o>=g&&r("invalid-input"),h=c(t.charCodeAt(o++)),(h>=x||h>I((k-_)/a))&&r("overflow"),_+=h*a,d=y>=l?C:l>=y+E?E:l-y,!(d>h);l+=x)f=x-d,a>I(k/f)&&r("overflow"),a*=f;e=m.length+1,y=p(_-s,e,0==s),I(_/e)>k-v&&r("overflow"),v+=I(_/e),_%=e,m.splice(_++,0,v)}return u(m)}function f(t){var e,n,i,o,s,a,u,c,d,f,m,g,_,v,y,b=[];for(t=l(t),g=t.length,e=P,n=0,s=D,a=0;g>a;++a)m=t[a],128>m&&b.push(B(m));for(i=o=b.length,o&&b.push(A);g>i;){for(u=k,a=0;g>a;++a)m=t[a],m>=e&&u>m&&(u=m);for(_=i+1,u-e>I((k-n)/_)&&r("overflow"),n+=(u-e)*_,e=u,a=0;g>a;++a)if(m=t[a],e>m&&++n>k&&r("overflow"),m==e){for(c=n,d=x;f=s>=d?C:d>=s+E?E:d-s,!(f>c);d+=x)y=c-f,v=x-f,b.push(B(h(f+y%v,0))),c=I(y/v);b.push(B(h(c,0))),s=p(n,_,i==o),n=0,++i}++n,++e}return b.join("")}function m(t){return a(t,function(t){return S.test(t)?d(t.slice(4).toLowerCase()):t})}function g(t){return a(t,function(t){return M.test(t)?"xn--"+f(t):t})}var _="object"==typeof i&&i&&!i.nodeType&&i,v="object"==typeof n&&n&&!n.nodeType&&n,y="object"==typeof e&&e;y.global!==y&&y.window!==y&&y.self!==y||(o=y);var b,w,k=2147483647,x=36,C=1,E=26,L=38,T=700,D=72,P=128,A="-",S=/^xn--/,M=/[^\x20-\x7E]/,z=/[\x2E\u3002\uFF0E\uFF61]/g,O={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},N=x-C,I=Math.floor,B=String.fromCharCode;if(b={version:"1.3.2",ucs2:{decode:l,encode:u},decode:d,encode:f,toASCII:g,toUnicode:m},"function"==typeof t&&"object"==typeof t.amd&&t.amd)t("punycode",function(){return b});else if(_&&v)if(n.exports==_)v.exports=b;else for(w in b)b.hasOwnProperty(w)&&(_[w]=b[w]);else o.punycode=b}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],53:[function(t,e,n){e.exports={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",amp:"&",AMP:"&",andand:"⩕",And:"⩓",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",apacir:"⩯",ap:"≈",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxHd:"╤",boxhD:"╥",boxHD:"╦",boxhu:"┴",boxHu:"╧",boxhU:"╨",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsolb:"⧅",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",capand:"⩄",capbrcup:"⩉",capcap:"⩋",cap:"∩",Cap:"⋒",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"○",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cup:"∪",Cup:"⋓",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"ⅅ",dd:"ⅆ",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"⇁",DownTeeArrow:"↧",DownTee:"⊤",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",edot:"ė",eDot:"≑",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp13:" ",emsp14:" ",emsp:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃", -expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",ge:"≥",gE:"≧",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅","in":"∈",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺","int":"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}},{}],54:[function(t,e,n){"use strict";function i(t){var e=Array.prototype.slice.call(arguments,1);return e.forEach(function(e){e&&Object.keys(e).forEach(function(n){t[n]=e[n]})}),t}function o(t){return Object.prototype.toString.call(t)}function r(t){return"[object String]"===o(t)}function s(t){return"[object Object]"===o(t)}function a(t){return"[object RegExp]"===o(t)}function l(t){return"[object Function]"===o(t)}function u(t){return t.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function c(t){return Object.keys(t||{}).reduce(function(t,e){return t||v.hasOwnProperty(e)},!1)}function h(t){t.__index__=-1,t.__text_cache__=""}function p(t){return function(e,n){var i=e.slice(n);return t.test(i)?i.match(t)[0].length:0}}function d(){return function(t,e){e.normalize(t)}}function f(e){function n(t){return t.replace("%TLDS%",c.src_tlds)}function o(t,e){throw new Error('(LinkifyIt) Invalid schema "'+t+'": '+e)}var c=e.re=i({},t("./lib/re")),f=e.__tlds__.slice();e.__tlds_replaced__||f.push(b),f.push(c.src_xn),c.src_tlds=f.join("|"),c.email_fuzzy=RegExp(n(c.tpl_email_fuzzy),"i"),c.link_fuzzy=RegExp(n(c.tpl_link_fuzzy),"i"),c.link_no_ip_fuzzy=RegExp(n(c.tpl_link_no_ip_fuzzy),"i"),c.host_fuzzy_test=RegExp(n(c.tpl_host_fuzzy_test),"i");var m=[];e.__compiled__={},Object.keys(e.__schemas__).forEach(function(t){var n=e.__schemas__[t];if(null!==n){var i={validate:null,link:null};return e.__compiled__[t]=i,s(n)?(a(n.validate)?i.validate=p(n.validate):l(n.validate)?i.validate=n.validate:o(t,n),void(l(n.normalize)?i.normalize=n.normalize:n.normalize?o(t,n):i.normalize=d())):r(n)?void m.push(t):void o(t,n)}}),m.forEach(function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)}),e.__compiled__[""]={validate:null,normalize:d()};var g=Object.keys(e.__compiled__).filter(function(t){return t.length>0&&e.__compiled__[t]}).map(u).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:>|"+c.src_ZPCc+"))("+g+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:>|"+c.src_ZPCc+"))("+g+")","ig"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),h(e)}function m(t,e){var n=t.__index__,i=t.__last_index__,o=t.__text_cache__.slice(n,i);this.schema=t.__schema__.toLowerCase(),this.index=n+e,this.lastIndex=i+e,this.raw=o,this.text=o,this.url=o}function g(t,e){var n=new m(t,e);return t.__compiled__[n.schema].normalize(n,t),n}function _(t,e){return this instanceof _?(e||c(t)&&(e=t,t={}),this.__opts__=i({},v,e),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=i({},y,t),this.__compiled__={},this.__tlds__=w,this.__tlds_replaced__=!1,this.re={},void f(this)):new _(t,e)}var v={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1},y={"http:":{validate:function(t,e,n){var i=t.slice(e);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(i)?i.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(t,e,n){var i=t.slice(e);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.no_http.test(i)?e>=3&&":"===t[e-3]?0:i.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(t,e,n){var i=t.slice(e);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(i)?i.match(n.re.mailto)[0].length:0}}},b="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",w="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");_.prototype.add=function(t,e){return this.__schemas__[t]=e,f(this),this},_.prototype.set=function(t){return this.__opts__=i(this.__opts__,t),this},_.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;var e,n,i,o,r,s,a,l,u;if(this.re.schema_test.test(t))for(a=this.re.schema_search,a.lastIndex=0;null!==(e=a.exec(t));)if(o=this.testSchemaAt(t,e[2],a.lastIndex)){this.__schema__=e[2],this.__index__=e.index+e[1].length,this.__last_index__=e.index+e[0].length+o;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=t.search(this.re.host_fuzzy_test),l>=0&&(this.__index__<0||l=0&&null!==(i=t.match(this.re.email_fuzzy))&&(r=i.index+i[1].length,s=i.index+i[0].length,(this.__index__<0||rthis.__last_index__)&&(this.__schema__="mailto:",this.__index__=r,this.__last_index__=s))),this.__index__>=0},_.prototype.pretest=function(t){return this.re.pretest.test(t)},_.prototype.testSchemaAt=function(t,e,n){return this.__compiled__[e.toLowerCase()]?this.__compiled__[e.toLowerCase()].validate(t,n,this):0},_.prototype.match=function(t){var e=0,n=[];this.__index__>=0&&this.__text_cache__===t&&(n.push(g(this,e)),e=this.__last_index__);for(var i=e?t.slice(e):t;this.test(i);)n.push(g(this,e)),i=i.slice(this.__last_index__),e+=this.__last_index__;return n.length?n:null},_.prototype.tlds=function(t,e){return t=Array.isArray(t)?t:[t],e?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(t,e,n){return t!==n[e-1]}).reverse(),f(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,f(this),this)},_.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),"mailto:"!==t.schema||/^mailto:/i.test(t.url)||(t.url="mailto:"+t.url)},e.exports=_},{"./lib/re":55}],55:[function(t,e,n){"use strict";var i=n.src_Any=t("uc.micro/properties/Any/regex").source,o=n.src_Cc=t("uc.micro/categories/Cc/regex").source,r=n.src_Z=t("uc.micro/categories/Z/regex").source,s=n.src_P=t("uc.micro/categories/P/regex").source,a=n.src_ZPCc=[r,s,o].join("|"),l=n.src_ZCc=[r,o].join("|"),u="(?:(?!"+a+")"+i+")",c="(?:(?![0-9]|"+a+")"+i+")",h=n.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)";n.src_auth="(?:(?:(?!"+l+").)+@)?";var p=n.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",d=n.src_host_terminator="(?=$|"+a+")(?!-|_|:\\d|\\.-|\\.(?!$|"+a+"))",f=n.src_path="(?:[/?#](?:(?!"+l+"|[()[\\]{}.,\"'?!\\-]).|\\[(?:(?!"+l+"|\\]).)*\\]|\\((?:(?!"+l+"|[)]).)*\\)|\\{(?:(?!"+l+'|[}]).)*\\}|\\"(?:(?!'+l+'|["]).)+\\"|\\\'(?:(?!'+l+"|[']).)+\\'|\\'(?="+u+").|\\.{2,3}[a-zA-Z0-9%/]|\\.(?!"+l+"|[.]).|\\-(?!--(?:[^-]|$))(?:-*)|\\,(?!"+l+").|\\!(?!"+l+"|[!]).|\\?(?!"+l+"|[?]).)+|\\/)?",m=n.src_email_name='[\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]+',g=n.src_xn="xn--[a-z0-9\\-]{1,59}",_=n.src_domain_root="(?:"+g+"|"+c+"{1,63})",v=n.src_domain="(?:"+g+"|(?:"+u+")|(?:"+u+"(?:-(?!-)|"+u+"){0,61}"+u+"))",y=n.src_host="(?:"+h+"|(?:(?:(?:"+v+")\\.)*"+_+"))",b=n.tpl_host_fuzzy="(?:"+h+"|(?:(?:(?:"+v+")\\.)+(?:%TLDS%)))",w=n.tpl_host_no_ip_fuzzy="(?:(?:(?:"+v+")\\.)+(?:%TLDS%))";n.src_host_strict=y+d;var k=n.tpl_host_fuzzy_strict=b+d;n.src_host_port_strict=y+p+d;var x=n.tpl_host_port_fuzzy_strict=b+p+d,C=n.tpl_host_port_no_ip_fuzzy_strict=w+p+d;n.tpl_host_fuzzy_test="localhost|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+a+"|$))",n.tpl_email_fuzzy="(^|>|"+l+")("+m+"@"+k+")",n.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|]|"+a+"))((?![$+<=>^`|])"+x+f+")",n.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|]|"+a+"))((?![$+<=>^`|])"+C+f+")"},{"uc.micro/categories/Cc/regex":61,"uc.micro/categories/P/regex":63,"uc.micro/categories/Z/regex":64,"uc.micro/properties/Any/regex":66}],56:[function(t,e,n){"use strict";function i(t){var e,n,i=r[t];if(i)return i;for(i=r[t]=[],e=0;128>e;e++)n=String.fromCharCode(e),i.push(n);for(e=0;ee;e+=3)o=parseInt(t.slice(e+1,e+3),16),128>o?u+=n[o]:192===(224&o)&&i>e+3&&(r=parseInt(t.slice(e+4,e+6),16),128===(192&r))?(l=o<<6&1984|63&r,u+=128>l?"��":String.fromCharCode(l),e+=3):224===(240&o)&&i>e+6&&(r=parseInt(t.slice(e+4,e+6),16),s=parseInt(t.slice(e+7,e+9),16),128===(192&r)&&128===(192&s))?(l=o<<12&61440|r<<6&4032|63&s,u+=2048>l||l>=55296&&57343>=l?"���":String.fromCharCode(l),e+=6):240===(248&o)&&i>e+9&&(r=parseInt(t.slice(e+4,e+6),16),s=parseInt(t.slice(e+7,e+9),16),a=parseInt(t.slice(e+10,e+12),16),128===(192&r)&&128===(192&s)&&128===(192&a))?(l=o<<18&1835008|r<<12&258048|s<<6&4032|63&a,65536>l||l>1114111?u+="����":(l-=65536,u+=String.fromCharCode(55296+(l>>10),56320+(1023&l))),e+=9):u+="�";return u})}var r={};o.defaultChars=";/?:@&=+$,#",o.componentChars="",e.exports=o},{}],57:[function(t,e,n){"use strict";function i(t){var e,n,i=r[t];if(i)return i;for(i=r[t]=[],e=0;128>e;e++)n=String.fromCharCode(e),/^[0-9a-z]$/i.test(n)?i.push(n):i.push("%"+("0"+e.toString(16).toUpperCase()).slice(-2));for(e=0;er;r++)if(a=t.charCodeAt(r),n&&37===a&&s>r+2&&/^[0-9a-f]{2}$/i.test(t.slice(r+1,r+3)))c+=t.slice(r,r+3),r+=2;else if(128>a)c+=u[a];else if(a>=55296&&57343>=a){if(a>=55296&&56319>=a&&s>r+1&&(l=t.charCodeAt(r+1),l>=56320&&57343>=l)){c+=encodeURIComponent(t[r]+t[r+1]),r++;continue}c+="%EF%BF%BD"}else c+=encodeURIComponent(t[r]);return c}var r={};o.defaultChars=";/?:@&=+$,-_.!~*'()#",o.componentChars="-_.!~*'()",e.exports=o},{}],58:[function(t,e,n){"use strict";e.exports=function(t){var e="";return e+=t.protocol||"",e+=t.slashes?"//":"",e+=t.auth?t.auth+"@":"",e+=t.hostname&&-1!==t.hostname.indexOf(":")?"["+t.hostname+"]":t.hostname||"",e+=t.port?":"+t.port:"",e+=t.pathname||"",e+=t.search||"",e+=t.hash||""}},{}],59:[function(t,e,n){"use strict";e.exports.encode=t("./encode"),e.exports.decode=t("./decode"),e.exports.format=t("./format"),e.exports.parse=t("./parse")},{"./decode":56,"./encode":57,"./format":58,"./parse":60}],60:[function(t,e,n){"use strict";function i(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}function o(t,e){if(t&&t instanceof i)return t;var n=new i;return n.parse(t,e),n}var r=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,a=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,l=["<",">",'"',"`"," ","\r","\n"," "],u=["{","}","|","\\","^","`"].concat(l),c=["'"].concat(u),h=["%","/","?",";","#"].concat(c),p=["/","?","#"],d=255,f=/^[+a-z0-9A-Z_-]{0,63}$/,m=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,g={javascript:!0,"javascript:":!0},_={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};i.prototype.parse=function(t,e){var n,i,o,s,l,u=t;if(u=u.trim(),!e&&1===t.split("#").length){var c=a.exec(u);if(c)return this.pathname=c[1],c[2]&&(this.search=c[2]),this}var v=r.exec(u);if(v&&(v=v[0],o=v.toLowerCase(),this.protocol=v,u=u.substr(v.length)),(e||v||u.match(/^\/\/[^@\/]+@[^@\/]+/))&&(l="//"===u.substr(0,2),!l||v&&g[v]||(u=u.substr(2),this.slashes=!0)),!g[v]&&(l||v&&!_[v])){var y=-1;for(n=0;ns)&&(y=s);var b,w;for(w=-1===y?u.lastIndexOf("@"):u.lastIndexOf("@",y),-1!==w&&(b=u.slice(0,w),u=u.slice(w+1),this.auth=b),y=-1,n=0;ns)&&(y=s);-1===y&&(y=u.length),":"===u[y-1]&&y--;var k=u.slice(0,y);u=u.slice(y),this.parseHost(k),this.hostname=this.hostname||"";var x="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!x){var C=this.hostname.split(/\./);for(n=0,i=C.length;i>n;n++){var E=C[n];if(E&&!E.match(f)){for(var L="",T=0,D=E.length;D>T;T++)L+=E.charCodeAt(T)>127?"x":E[T];if(!L.match(f)){var P=C.slice(0,n),A=C.slice(n+1),S=E.match(m);S&&(P.push(S[1]),A.unshift(S[2])),A.length&&(u=A.join(".")+u),this.hostname=P.join(".");break}}}}this.hostname.length>d&&(this.hostname=""),x&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var M=u.indexOf("#");-1!==M&&(this.hash=u.substr(M),u=u.slice(0,M));var z=u.indexOf("?");return-1!==z&&(this.search=u.substr(z),u=u.slice(0,z)),u&&(this.pathname=u),_[o]&&this.hostname&&!this.pathname&&(this.pathname=""),this},i.prototype.parseHost=function(t){var e=s.exec(t);e&&(e=e[0],":"!==e&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)},e.exports=o},{}],61:[function(t,e,n){e.exports=/[\0-\x1F\x7F-\x9F]/},{}],62:[function(t,e,n){e.exports=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804\uDCBD|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/},{}],63:[function(t,e,n){e.exports=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDE38-\uDE3D]|\uD805[\uDCC6\uDDC1-\uDDC9\uDE41-\uDE43]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F/; -},{}],64:[function(t,e,n){e.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/},{}],65:[function(t,e,n){e.exports.Any=t("./properties/Any/regex"),e.exports.Cc=t("./categories/Cc/regex"),e.exports.Cf=t("./categories/Cf/regex"),e.exports.P=t("./categories/P/regex"),e.exports.Z=t("./categories/Z/regex")},{"./categories/Cc/regex":61,"./categories/Cf/regex":62,"./categories/P/regex":63,"./categories/Z/regex":64,"./properties/Any/regex":66}],66:[function(t,e,n){e.exports=/[\0-\uD7FF\uDC00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF]/},{}],67:[function(t,e,n){"use strict";e.exports=t("./lib/")},{"./lib/":9}]},{},[67])(67)}),define("Core/KnockoutMarkdownBinding",["markdown-it-sanitizer","markdown-it"],function(t,e){"use strict";function n(t){if(t instanceof HTMLAnchorElement&&(t.target="_blank"),t.childNodes&&t.childNodes.length>0)for(var e=0;e(.|\s)*<\/html>/im,o=new e({html:!0,linkify:!0});o.use(t,{imageClass:"",removeUnbalanced:!1,removeUnknown:!1});var r={register:function(t){t.bindingHandlers.markdown={init:function(){return{controlsDescendantBindings:!0}},update:function(e,r){for(;e.firstChild;)t.removeNode(e.firstChild);var s,a=t.unwrap(r());s=i.test(a)?a:o.render(a);var l=t.utils.parseHtmlFragment(s,e);e.className=e.className+" markdown";for(var u=0;u\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",r=t.console&&(t.console.warn||t.console.log);return r&&r.call(t.console,o,i),e.apply(this,arguments)}}function l(t,e,n){var i,o=e.prototype;i=t.prototype=Object.create(o),i.constructor=t,i._super=o,n&&at(i,n)}function u(t,e){return function(){return t.apply(e,arguments)}}function c(t,e){return typeof t==ct?t.apply(e?e[0]||i:i,e):t}function h(t,e){return t===i?e:t}function p(t,e,n){s(g(e),function(e){t.addEventListener(e,n,!1)})}function d(t,e,n){s(g(e),function(e){t.removeEventListener(e,n,!1)})}function f(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function m(t,e){return t.indexOf(e)>-1}function g(t){return t.trim().split(/\s+/g)}function _(t,e,n){if(t.indexOf&&!n)return t.indexOf(e);for(var i=0;in[e]}):i.sort()),i}function b(t,e){for(var n,o,r=e[0].toUpperCase()+e.slice(1),s=0;s1&&!n.firstMultiple?n.firstMultiple=P(e):1===o&&(n.firstMultiple=!1);var r=n.firstInput,s=n.firstMultiple,a=s?s.center:r.center,l=e.center=A(i);e.timeStamp=dt(),e.deltaTime=e.timeStamp-r.timeStamp,e.angle=O(a,l),e.distance=z(a,l),T(n,e),e.offsetDirection=M(e.deltaX,e.deltaY);var u=S(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=u.x,e.overallVelocityY=u.y,e.overallVelocity=pt(u.x)>pt(u.y)?u.x:u.y,e.scale=s?I(s.pointers,i):1,e.rotation=s?N(s.pointers,i):0,e.maxPointers=n.prevInput?e.pointers.length>n.prevInput.maxPointers?e.pointers.length:n.prevInput.maxPointers:e.pointers.length,D(n,e);var c=t.element;f(e.srcEvent.target,c)&&(c=e.srcEvent.target),e.target=c}function T(t,e){var n=e.center,i=t.offsetDelta||{},o=t.prevDelta||{},r=t.prevInput||{};(e.eventType===Lt||r.eventType===Dt)&&(o=t.prevDelta={x:r.deltaX||0,y:r.deltaY||0},i=t.offsetDelta={x:n.x,y:n.y}),e.deltaX=o.x+(n.x-i.x),e.deltaY=o.y+(n.y-i.y)}function D(t,e){var n,o,r,s,a=t.lastInterval||e,l=e.timeStamp-a.timeStamp;if(e.eventType!=Pt&&(l>Et||a.velocity===i)){var u=e.deltaX-a.deltaX,c=e.deltaY-a.deltaY,h=S(l,u,c);o=h.x,r=h.y,n=pt(h.x)>pt(h.y)?h.x:h.y,s=M(u,c),t.lastInterval=e}else n=a.velocity,o=a.velocityX,r=a.velocityY,s=a.direction;e.velocity=n,e.velocityX=o,e.velocityY=r,e.direction=s}function P(t){for(var e=[],n=0;no;)n+=t[o].clientX,i+=t[o].clientY,o++;return{x:ht(n/e),y:ht(i/e)}}function S(t,e,n){return{x:e/t||0,y:n/t||0}}function M(t,e){return t===e?At:pt(t)>=pt(e)?0>t?St:Mt:0>e?zt:Ot}function z(t,e,n){n||(n=Rt);var i=e[n[0]]-t[n[0]],o=e[n[1]]-t[n[1]];return Math.sqrt(i*i+o*o)}function O(t,e,n){n||(n=Rt);var i=e[n[0]]-t[n[0]],o=e[n[1]]-t[n[1]];return 180*Math.atan2(o,i)/Math.PI}function N(t,e){return O(e[1],e[0],Ut)+O(t[1],t[0],Ut)}function I(t,e){return z(e[0],e[1],Ut)/z(t[0],t[1],Ut)}function B(){this.evEl=qt,this.evWin=jt,this.allow=!0,this.pressed=!1,x.apply(this,arguments)}function R(){this.evEl=Ht,this.evWin=Wt,x.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function U(){this.evTarget=$t,this.evWin=Jt,this.started=!1,x.apply(this,arguments)}function F(t,e){var n=v(t.touches),i=v(t.changedTouches);return e&(Dt|Pt)&&(n=y(n.concat(i),"identifier",!0)),[n,i]}function q(){this.evTarget=Kt,this.targetIds={},x.apply(this,arguments)}function j(t,e){var n=v(t.touches),i=this.targetIds;if(e&(Lt|Tt)&&1===n.length)return i[n[0].identifier]=!0,[n,n];var o,r,s=v(t.changedTouches),a=[],l=this.target;if(r=n.filter(function(t){return f(t.target,l)}),e===Lt)for(o=0;oa&&(e.push(t),a=e.length-1):o&(Dt|Pt)&&(n=!0),0>a||(e[a]=t,this.callback(this.manager,o,{pointers:e,changedPointers:[t],pointerType:r,srcEvent:t}),n&&e.splice(a,1))}});var Gt={touchstart:Lt,touchmove:Tt,touchend:Dt,touchcancel:Pt},$t="touchstart",Jt="touchstart touchmove touchend touchcancel";l(U,x,{handler:function(t){var e=Gt[t.type];if(e===Lt&&(this.started=!0),this.started){var n=F.call(this,t,e);e&(Dt|Pt)&&n[0].length-n[1].length===0&&(this.started=!1),this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:wt,srcEvent:t})}}});var Yt={touchstart:Lt,touchmove:Tt,touchend:Dt,touchcancel:Pt},Kt="touchstart touchmove touchend touchcancel";l(q,x,{handler:function(t){var e=Yt[t.type],n=j.call(this,t,e);n&&this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:wt,srcEvent:t})}}),l(Z,x,{handler:function(t,e,n){var i=n.pointerType==wt,o=n.pointerType==xt;if(i)this.mouse.allow=!1;else if(o&&!this.mouse.allow)return;e&(Dt|Pt)&&(this.mouse.allow=!0),this.callback(t,e,n)},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var Xt=b(ut.style,"touchAction"),Qt=Xt!==i,te="compute",ee="auto",ne="manipulation",ie="none",oe="pan-x",re="pan-y";V.prototype={set:function(t){t==te&&(t=this.compute()),Qt&&this.manager.element.style&&(this.manager.element.style[Xt]=t),this.actions=t.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var t=[];return s(this.manager.recognizers,function(e){c(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))}),H(t.join(" "))},preventDefaults:function(t){if(!Qt){var e=t.srcEvent,n=t.offsetDirection;if(this.manager.session.prevented)return void e.preventDefault();var i=this.actions,o=m(i,ie),r=m(i,re),s=m(i,oe);if(o){var a=1===t.pointers.length,l=t.distance<2,u=t.deltaTime<250;if(a&&l&&u)return}if(!s||!r)return o||r&&n&Nt||s&&n&It?this.preventSrc(e):void 0}},preventSrc:function(t){this.manager.session.prevented=!0,t.preventDefault()}};var se=1,ae=2,le=4,ue=8,ce=ue,he=16,pe=32;W.prototype={defaults:{},set:function(t){return at(this.options,t),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(t){if(r(t,"recognizeWith",this))return this;var e=this.simultaneous;return t=J(t,this),e[t.id]||(e[t.id]=t,t.recognizeWith(this)),this},dropRecognizeWith:function(t){return r(t,"dropRecognizeWith",this)?this:(t=J(t,this),delete this.simultaneous[t.id],this)},requireFailure:function(t){if(r(t,"requireFailure",this))return this;var e=this.requireFail;return t=J(t,this),-1===_(e,t)&&(e.push(t),t.requireFailure(this)),this},dropRequireFailure:function(t){if(r(t,"dropRequireFailure",this))return this;t=J(t,this);var e=_(this.requireFail,t);return e>-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){function e(e){n.manager.emit(e,t)}var n=this,i=this.state;ue>i&&e(n.options.event+G(i)),e(n.options.event),t.additionalEvent&&e(t.additionalEvent),i>=ue&&e(n.options.event+G(i))},tryEmit:function(t){return this.canEmit()?this.emit(t):void(this.state=pe)},canEmit:function(){for(var t=0;tr?St:Mt,n=r!=this.pX,i=Math.abs(t.deltaX)):(o=0===s?At:0>s?zt:Ot,n=s!=this.pY,i=Math.abs(t.deltaY))),t.direction=o,n&&i>e.threshold&&o&e.direction},attrTest:function(t){return Y.prototype.attrTest.call(this,t)&&(this.state&ae||!(this.state&ae)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=$(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),l(X,Y,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[ie]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&ae)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),l(Q,W,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[ee]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,i=t.distancee.time;if(this._input=t,!i||!n||t.eventType&(Dt|Pt)&&!r)this.reset();else if(t.eventType&Lt)this.reset(),this._timer=o(function(){this.state=ce,this.tryEmit()},e.time,this);else if(t.eventType&Dt)return ce;return pe},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===ce&&(t&&t.eventType&Dt?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=dt(),this.manager.emit(this.options.event,this._input)))}}),l(tt,Y,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[ie]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&ae)}}),l(et,Y,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Nt|It,pointers:1},getTouchAction:function(){return K.prototype.getTouchAction.call(this)},attrTest:function(t){var e,n=this.options.direction;return n&(Nt|It)?e=t.overallVelocity:n&Nt?e=t.overallVelocityX:n&It&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&pt(e)>this.options.velocity&&t.eventType&Dt},emit:function(t){var e=$(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),l(nt,W,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[ne]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,i=t.distancen;n++){o=r[n]||{};for(e in o)o.hasOwnProperty(e)&&(t[e]=o[e])}return t},bind:function(t,e){var n=arguments.length>2?Array.prototype.slice.call(arguments,2):null;return function(){return t.apply(e,n||arguments)}},stamp:function(){var t=0,e="_leaflet_id";return function(n){return n[e]=n[e]||++t,n[e]}}(),invokeEach:function(t,e,n){var i,o;if("object"==typeof t){o=Array.prototype.slice.call(arguments,3);for(i in t)e.apply(n,[i,t[i]].concat(o));return!0}return!1},limitExecByInterval:function(t,e,n){var i,o;return function r(){var s=arguments;return i?void(o=!0):(i=!0,setTimeout(function(){i=!1,o&&(r.apply(n,s),o=!1)},e),void t.apply(n,s))}},falseFn:function(){return!1},formatNum:function(t,e){var n=Math.pow(10,e||5);return Math.round(t*n)/n},trim:function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")},splitWords:function(t){return o.Util.trim(t).split(/\s+/)},setOptions:function(t,e){return t.options=o.extend({},t.options,e),t.options},getParamString:function(t,e,n){var i=[];for(var o in t)i.push(encodeURIComponent(n?o.toUpperCase():o)+"="+encodeURIComponent(t[o]));return(e&&-1!==e.indexOf("?")?"&":"?")+i.join("&")},template:function(t,e){return t.replace(/\{ *([\w_]+) *\}/g,function(t,i){var o=e[i];if(o===n)throw new Error("No value provided for variable "+t);return"function"==typeof o&&(o=o(e)),o})},isArray:Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},emptyImageUrl:"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="},function(){function e(e){var n,i,o=["webkit","moz","o","ms"];for(n=0;nt;t++)i._initHooks[t].call(this)}},e},o.Class.include=function(t){o.extend(this.prototype,t)},o.Class.mergeOptions=function(t){o.extend(this.prototype.options,t)},o.Class.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),n="function"==typeof t?t:function(){this[t].apply(this,e)};this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(n)};var r="_leaflet_events";o.Mixin={},o.Mixin.Events={addEventListener:function(t,e,n){if(o.Util.invokeEach(t,this.addEventListener,this,e,n))return this;var i,s,a,l,u,c,h,p=this[r]=this[r]||{},d=n&&n!==this&&o.stamp(n);for(t=o.Util.splitWords(t),i=0,s=t.length;s>i;i++)a={action:e,context:n||this},l=t[i],d?(u=l+"_idx",c=u+"_len",h=p[u]=p[u]||{},h[d]||(h[d]=[],p[c]=(p[c]||0)+1),h[d].push(a)):(p[l]=p[l]||[],p[l].push(a));return this},hasEventListeners:function(t){var e=this[r];return!!e&&(t in e&&e[t].length>0||t+"_idx"in e&&e[t+"_idx_len"]>0)},removeEventListener:function(t,e,n){if(!this[r])return this;if(!t)return this.clearAllEventListeners();if(o.Util.invokeEach(t,this.removeEventListener,this,e,n))return this;var i,s,a,l,u,c,h,p,d,f=this[r],m=n&&n!==this&&o.stamp(n);for(t=o.Util.splitWords(t),i=0,s=t.length;s>i;i++)if(a=t[i],c=a+"_idx",h=c+"_len",p=f[c],e){if(l=m&&p?p[m]:f[a]){for(u=l.length-1;u>=0;u--)l[u].action!==e||n&&l[u].context!==n||(d=l.splice(u,1),d[0].action=o.Util.falseFn);n&&p&&0===l.length&&(delete p[m],f[h]--)}}else delete f[a],delete f[c],delete f[h];return this},clearAllEventListeners:function(){return delete this[r],this},fireEvent:function(t,e){if(!this.hasEventListeners(t))return this;var n,i,s,a,l,u=o.Util.extend({},e,{type:t,target:this}),c=this[r];if(c[t])for(n=c[t].slice(),i=0,s=n.length;s>i;i++)n[i].action.call(n[i].context,u);a=c[t+"_idx"];for(l in a)if(n=a[l].slice())for(i=0,s=n.length;s>i;i++)n[i].action.call(n[i].context,u);return this},addOneTimeEventListener:function(t,e,n){if(o.Util.invokeEach(t,this.addOneTimeEventListener,this,e,n))return this;var i=o.bind(function(){this.removeEventListener(t,e,n).removeEventListener(t,i,n)},this);return this.addEventListener(t,e,n).addEventListener(t,i,n)}},o.Mixin.Events.on=o.Mixin.Events.addEventListener,o.Mixin.Events.off=o.Mixin.Events.removeEventListener,o.Mixin.Events.once=o.Mixin.Events.addOneTimeEventListener,o.Mixin.Events.fire=o.Mixin.Events.fireEvent,function(){var i="ActiveXObject"in t,r=i&&!e.addEventListener,s=navigator.userAgent.toLowerCase(),a=-1!==s.indexOf("webkit"),l=-1!==s.indexOf("chrome"),u=-1!==s.indexOf("phantom"),c=-1!==s.indexOf("android"),h=-1!==s.search("android [23]"),p=-1!==s.indexOf("gecko"),d=typeof orientation!=n+"",f=!t.PointerEvent&&t.MSPointerEvent,m=t.PointerEvent&&t.navigator.pointerEnabled||f,g="devicePixelRatio"in t&&t.devicePixelRatio>1||"matchMedia"in t&&t.matchMedia("(min-resolution:144dpi)")&&t.matchMedia("(min-resolution:144dpi)").matches,_=e.documentElement,v=i&&"transition"in _.style,y="WebKitCSSMatrix"in t&&"m11"in new t.WebKitCSSMatrix&&!h,b="MozPerspective"in _.style,w="OTransition"in _.style,k=!t.L_DISABLE_3D&&(v||y||b||w)&&!u,x=!t.L_NO_TOUCH&&!u&&(m||"ontouchstart"in t||t.DocumentTouch&&e instanceof t.DocumentTouch);o.Browser={ie:i,ielt9:r,webkit:a,gecko:p&&!a&&!t.opera&&!i,android:c,android23:h,chrome:l,ie3d:v,webkit3d:y,gecko3d:b,opera3d:w,any3d:k,mobile:d,mobileWebkit:d&&a,mobileWebkit3d:d&&y,mobileOpera:d&&t.opera,touch:x,msPointer:f,pointer:m,retina:g}}(),o.Point=function(t,e,n){this.x=n?Math.round(t):t,this.y=n?Math.round(e):e},o.Point.prototype={clone:function(){return new o.Point(this.x,this.y)},add:function(t){return this.clone()._add(o.point(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(o.point(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},distanceTo:function(t){t=o.point(t);var e=t.x-this.x,n=t.y-this.y;return Math.sqrt(e*e+n*n)},equals:function(t){return t=o.point(t),t.x===this.x&&t.y===this.y},contains:function(t){return t=o.point(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+o.Util.formatNum(this.x)+", "+o.Util.formatNum(this.y)+")"}},o.point=function(t,e,i){return t instanceof o.Point?t:o.Util.isArray(t)?new o.Point(t[0],t[1]):t===n||null===t?t:new o.Point(t,e,i)},o.Bounds=function(t,e){if(t)for(var n=e?[t,e]:t,i=0,o=n.length;o>i;i++)this.extend(n[i])},o.Bounds.prototype={extend:function(t){return t=o.point(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new o.Point((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new o.Point(this.min.x,this.max.y)},getTopRight:function(){return new o.Point(this.max.x,this.min.y)},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,n;return t="number"==typeof t[0]||t instanceof o.Point?o.point(t):o.bounds(t),t instanceof o.Bounds?(e=t.min,n=t.max):e=n=t,e.x>=this.min.x&&n.x<=this.max.x&&e.y>=this.min.y&&n.y<=this.max.y},intersects:function(t){t=o.bounds(t);var e=this.min,n=this.max,i=t.min,r=t.max,s=r.x>=e.x&&i.x<=n.x,a=r.y>=e.y&&i.y<=n.y;return s&&a},isValid:function(){return!(!this.min||!this.max)}},o.bounds=function(t,e){return!t||t instanceof o.Bounds?t:new o.Bounds(t,e)},o.Transformation=function(t,e,n,i){this._a=t,this._b=e,this._c=n,this._d=i},o.Transformation.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return e=e||1,new o.Point((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}},o.DomUtil={get:function(t){return"string"==typeof t?e.getElementById(t):t; -},getStyle:function(t,n){var i=t.style[n];if(!i&&t.currentStyle&&(i=t.currentStyle[n]),(!i||"auto"===i)&&e.defaultView){var o=e.defaultView.getComputedStyle(t,null);i=o?o[n]:null}return"auto"===i?null:i},getViewportOffset:function(t){var n,i=0,r=0,s=t,a=e.body,l=e.documentElement;do{if(i+=s.offsetTop||0,r+=s.offsetLeft||0,i+=parseInt(o.DomUtil.getStyle(s,"borderTopWidth"),10)||0,r+=parseInt(o.DomUtil.getStyle(s,"borderLeftWidth"),10)||0,n=o.DomUtil.getStyle(s,"position"),s.offsetParent===a&&"absolute"===n)break;if("fixed"===n){i+=a.scrollTop||l.scrollTop||0,r+=a.scrollLeft||l.scrollLeft||0;break}if("relative"===n&&!s.offsetLeft){var u=o.DomUtil.getStyle(s,"width"),c=o.DomUtil.getStyle(s,"max-width"),h=s.getBoundingClientRect();("none"!==u||"none"!==c)&&(r+=h.left+s.clientLeft),i+=h.top+(a.scrollTop||l.scrollTop||0);break}s=s.offsetParent}while(s);s=t;do{if(s===a)break;i-=s.scrollTop||0,r-=s.scrollLeft||0,s=s.parentNode}while(s);return new o.Point(r,i)},documentIsLtr:function(){return o.DomUtil._docIsLtrCached||(o.DomUtil._docIsLtrCached=!0,o.DomUtil._docIsLtr="ltr"===o.DomUtil.getStyle(e.body,"direction")),o.DomUtil._docIsLtr},create:function(t,n,i){var o=e.createElement(t);return o.className=n,i&&i.appendChild(o),o},hasClass:function(t,e){if(t.classList!==n)return t.classList.contains(e);var i=o.DomUtil._getClass(t);return i.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(i)},addClass:function(t,e){if(t.classList!==n)for(var i=o.Util.splitWords(e),r=0,s=i.length;s>r;r++)t.classList.add(i[r]);else if(!o.DomUtil.hasClass(t,e)){var a=o.DomUtil._getClass(t);o.DomUtil._setClass(t,(a?a+" ":"")+e)}},removeClass:function(t,e){t.classList!==n?t.classList.remove(e):o.DomUtil._setClass(t,o.Util.trim((" "+o.DomUtil._getClass(t)+" ").replace(" "+e+" "," ")))},_setClass:function(t,e){t.className.baseVal===n?t.className=e:t.className.baseVal=e},_getClass:function(t){return t.className.baseVal===n?t.className:t.className.baseVal},setOpacity:function(t,e){if("opacity"in t.style)t.style.opacity=e;else if("filter"in t.style){var n=!1,i="DXImageTransform.Microsoft.Alpha";try{n=t.filters.item(i)}catch(o){if(1===e)return}e=Math.round(100*e),n?(n.Enabled=100!==e,n.Opacity=e):t.style.filter+=" progid:"+i+"(opacity="+e+")"}},testProp:function(t){for(var n=e.documentElement.style,i=0;in||n===e?e:t),new o.LatLng(this.lat,n)}},o.latLng=function(t,e){return t instanceof o.LatLng?t:o.Util.isArray(t)?"number"==typeof t[0]||"string"==typeof t[0]?new o.LatLng(t[0],t[1],t[2]):null:t===n||null===t?t:"object"==typeof t&&"lat"in t?new o.LatLng(t.lat,"lng"in t?t.lng:t.lon):e===n?null:new o.LatLng(t,e)},o.LatLngBounds=function(t,e){if(t)for(var n=e?[t,e]:t,i=0,o=n.length;o>i;i++)this.extend(n[i])},o.LatLngBounds.prototype={extend:function(t){if(!t)return this;var e=o.latLng(t);return t=null!==e?e:o.latLngBounds(t),t instanceof o.LatLng?this._southWest||this._northEast?(this._southWest.lat=Math.min(t.lat,this._southWest.lat),this._southWest.lng=Math.min(t.lng,this._southWest.lng),this._northEast.lat=Math.max(t.lat,this._northEast.lat),this._northEast.lng=Math.max(t.lng,this._northEast.lng)):(this._southWest=new o.LatLng(t.lat,t.lng),this._northEast=new o.LatLng(t.lat,t.lng)):t instanceof o.LatLngBounds&&(this.extend(t._southWest),this.extend(t._northEast)),this},pad:function(t){var e=this._southWest,n=this._northEast,i=Math.abs(e.lat-n.lat)*t,r=Math.abs(e.lng-n.lng)*t;return new o.LatLngBounds(new o.LatLng(e.lat-i,e.lng-r),new o.LatLng(n.lat+i,n.lng+r))},getCenter:function(){return new o.LatLng((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new o.LatLng(this.getNorth(),this.getWest())},getSouthEast:function(){return new o.LatLng(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t="number"==typeof t[0]||t instanceof o.LatLng?o.latLng(t):o.latLngBounds(t);var e,n,i=this._southWest,r=this._northEast;return t instanceof o.LatLngBounds?(e=t.getSouthWest(),n=t.getNorthEast()):e=n=t,e.lat>=i.lat&&n.lat<=r.lat&&e.lng>=i.lng&&n.lng<=r.lng},intersects:function(t){t=o.latLngBounds(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),r=t.getNorthEast(),s=r.lat>=e.lat&&i.lat<=n.lat,a=r.lng>=e.lng&&i.lng<=n.lng;return s&&a},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t){return t?(t=o.latLngBounds(t),this._southWest.equals(t.getSouthWest())&&this._northEast.equals(t.getNorthEast())):!1},isValid:function(){return!(!this._southWest||!this._northEast)}},o.latLngBounds=function(t,e){return!t||t instanceof o.LatLngBounds?t:new o.LatLngBounds(t,e)},o.Projection={},o.Projection.SphericalMercator={MAX_LATITUDE:85.0511287798,project:function(t){var e=o.LatLng.DEG_TO_RAD,n=this.MAX_LATITUDE,i=Math.max(Math.min(n,t.lat),-n),r=t.lng*e,s=i*e;return s=Math.log(Math.tan(Math.PI/4+s/2)),new o.Point(r,s)},unproject:function(t){var e=o.LatLng.RAD_TO_DEG,n=t.x*e,i=(2*Math.atan(Math.exp(t.y))-Math.PI/2)*e;return new o.LatLng(i,n)}},o.Projection.LonLat={project:function(t){return new o.Point(t.lng,t.lat)},unproject:function(t){return new o.LatLng(t.y,t.x)}},o.CRS={latLngToPoint:function(t,e){var n=this.projection.project(t),i=this.scale(e);return this.transformation._transform(n,i)},pointToLatLng:function(t,e){var n=this.scale(e),i=this.transformation.untransform(t,n);return this.projection.unproject(i)},project:function(t){return this.projection.project(t)},scale:function(t){return 256*Math.pow(2,t)},getSize:function(t){var e=this.scale(t);return o.point(e,e)}},o.CRS.Simple=o.extend({},o.CRS,{projection:o.Projection.LonLat,transformation:new o.Transformation(1,0,-1,0),scale:function(t){return Math.pow(2,t)}}),o.CRS.EPSG3857=o.extend({},o.CRS,{code:"EPSG:3857",projection:o.Projection.SphericalMercator,transformation:new o.Transformation(.5/Math.PI,.5,-.5/Math.PI,.5),project:function(t){var e=this.projection.project(t),n=6378137;return e.multiplyBy(n)}}),o.CRS.EPSG900913=o.extend({},o.CRS.EPSG3857,{code:"EPSG:900913"}),o.CRS.EPSG4326=o.extend({},o.CRS,{code:"EPSG:4326",projection:o.Projection.LonLat,transformation:new o.Transformation(1/360,.5,-1/360,.5)}),o.Map=o.Class.extend({includes:o.Mixin.Events,options:{crs:o.CRS.EPSG3857,fadeAnimation:o.DomUtil.TRANSITION&&!o.Browser.android23,trackResize:!0,markerZoomAnimation:o.DomUtil.TRANSITION&&o.Browser.any3d},initialize:function(t,e){e=o.setOptions(this,e),this._initContainer(t),this._initLayout(),this._onResize=o.bind(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),e.center&&e.zoom!==n&&this.setView(o.latLng(e.center),e.zoom,{reset:!0}),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._tileLayersNum=0,this.callInitHooks(),this._addLayers(e.layers)},setView:function(t,e){return e=e===n?this.getZoom():e,this._resetView(o.latLng(t),this._limitZoom(e)),this},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=this._limitZoom(t),this)},zoomIn:function(t,e){return this.setZoom(this._zoom+(t||1),e)},zoomOut:function(t,e){return this.setZoom(this._zoom-(t||1),e)},setZoomAround:function(t,e,n){var i=this.getZoomScale(e),r=this.getSize().divideBy(2),s=t instanceof o.Point?t:this.latLngToContainerPoint(t),a=s.subtract(r).multiplyBy(1-1/i),l=this.containerPointToLatLng(r.add(a));return this.setView(l,e,{zoom:n})},fitBounds:function(t,e){e=e||{},t=t.getBounds?t.getBounds():o.latLngBounds(t);var n=o.point(e.paddingTopLeft||e.padding||[0,0]),i=o.point(e.paddingBottomRight||e.padding||[0,0]),r=this.getBoundsZoom(t,!1,n.add(i));r=e.maxZoom?Math.min(e.maxZoom,r):r;var s=i.subtract(n).divideBy(2),a=this.project(t.getSouthWest(),r),l=this.project(t.getNorthEast(),r),u=this.unproject(a.add(l).divideBy(2).add(s),r);return this.setView(u,r,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t){return this.fire("movestart"),this._rawPanBy(o.point(t)),this.fire("move"),this.fire("moveend")},setMaxBounds:function(t){return t=o.latLngBounds(t),this.options.maxBounds=t,t?(this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds,this)):this.off("moveend",this._panInsideMaxBounds,this)},panInsideBounds:function(t,e){var n=this.getCenter(),i=this._limitCenter(n,this._zoom,t);return n.equals(i)?this:this.panTo(i,e)},addLayer:function(t){var e=o.stamp(t);return this._layers[e]?this:(this._layers[e]=t,!t.options||isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[e]=t,this._updateZoomLevels()),this.options.zoomAnimation&&o.TileLayer&&t instanceof o.TileLayer&&(this._tileLayersNum++,this._tileLayersToLoad++,t.on("load",this._onTileLayerLoad,this)),this._loaded&&this._layerAdd(t),this)},removeLayer:function(t){var e=o.stamp(t);return this._layers[e]?(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&this.fire("layerremove",{layer:t}),this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels()),this.options.zoomAnimation&&o.TileLayer&&t instanceof o.TileLayer&&(this._tileLayersNum--,this._tileLayersToLoad--,t.off("load",this._onTileLayerLoad,this)),this):this},hasLayer:function(t){return t?o.stamp(t)in this._layers:!1},eachLayer:function(t,e){for(var n in this._layers)t.call(e,this._layers[n]);return this},invalidateSize:function(t){if(!this._loaded)return this;t=o.extend({animate:!1,pan:!0},t===!0?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._initialCenter=null;var n=this.getSize(),i=e.divideBy(2).round(),r=n.divideBy(2).round(),s=i.subtract(r);return s.x||s.y?(t.animate&&t.pan?this.panBy(s):(t.pan&&this._rawPanBy(s),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(o.bind(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:n})):this},addHandler:function(t,e){if(!e)return this;var n=this[t]=new e(this);return this._handlers.push(n),this.options[t]&&n.enable(),this},remove:function(){this._loaded&&this.fire("unload"),this._initEvents("off");try{delete this._container._leaflet}catch(t){this._container._leaflet=n}return this._clearPanes(),this._clearControlPos&&this._clearControlPos(),this._clearHandlers(),this},getCenter:function(){return this._checkIfLoaded(),this._initialCenter&&!this._moved()?this._initialCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds(),e=this.unproject(t.getBottomLeft()),n=this.unproject(t.getTopRight());return new o.LatLngBounds(e,n)},getMinZoom:function(){return this.options.minZoom===n?this._layersMinZoom===n?0:this._layersMinZoom:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===n?this._layersMaxZoom===n?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,n){t=o.latLngBounds(t);var i,r=this.getMinZoom()-(e?1:0),s=this.getMaxZoom(),a=this.getSize(),l=t.getNorthWest(),u=t.getSouthEast(),c=!0;n=o.point(n||[0,0]);do r++,i=this.project(u,r).subtract(this.project(l,r)).add(n),c=e?i.x=r);return c&&e?null:e?r:r-1},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new o.Point(this._container.clientWidth,this._container.clientHeight),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(){var t=this._getTopLeftPoint();return new o.Bounds(t,t.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._initialTopLeftPoint},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t){var e=this.options.crs;return e.scale(t)/e.scale(this._zoom)},getScaleZoom:function(t){return this._zoom+Math.log(t)/Math.LN2},project:function(t,e){return e=e===n?this._zoom:e,this.options.crs.latLngToPoint(o.latLng(t),e)},unproject:function(t,e){return e=e===n?this._zoom:e,this.options.crs.pointToLatLng(o.point(t),e)},layerPointToLatLng:function(t){var e=o.point(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){var e=this.project(o.latLng(t))._round();return e._subtract(this.getPixelOrigin())},containerPointToLayerPoint:function(t){return o.point(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return o.point(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(o.point(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(o.latLng(t)))},mouseEventToContainerPoint:function(t){return o.DomEvent.getMousePosition(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=o.DomUtil.get(t);if(!e)throw new Error("Map container not found.");if(e._leaflet)throw new Error("Map container is already initialized.");e._leaflet=!0},_initLayout:function(){var t=this._container;o.DomUtil.addClass(t,"leaflet-container"+(o.Browser.touch?" leaflet-touch":"")+(o.Browser.retina?" leaflet-retina":"")+(o.Browser.ielt9?" leaflet-oldie":"")+(this.options.fadeAnimation?" leaflet-fade-anim":""));var e=o.DomUtil.getStyle(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._mapPane=t.mapPane=this._createPane("leaflet-map-pane",this._container),this._tilePane=t.tilePane=this._createPane("leaflet-tile-pane",this._mapPane),t.objectsPane=this._createPane("leaflet-objects-pane",this._mapPane),t.shadowPane=this._createPane("leaflet-shadow-pane"),t.overlayPane=this._createPane("leaflet-overlay-pane"),t.markerPane=this._createPane("leaflet-marker-pane"),t.popupPane=this._createPane("leaflet-popup-pane");var e=" leaflet-zoom-hide";this.options.markerZoomAnimation||(o.DomUtil.addClass(t.markerPane,e),o.DomUtil.addClass(t.shadowPane,e),o.DomUtil.addClass(t.popupPane,e))},_createPane:function(t,e){return o.DomUtil.create("div",t,e||this._panes.objectsPane)},_clearPanes:function(){this._container.removeChild(this._mapPane)},_addLayers:function(t){t=t?o.Util.isArray(t)?t:[t]:[];for(var e=0,n=t.length;n>e;e++)this.addLayer(t[e])},_resetView:function(t,e,n,i){var r=this._zoom!==e;i||(this.fire("movestart"),r&&this.fire("zoomstart")),this._zoom=e,this._initialCenter=t,this._initialTopLeftPoint=this._getNewTopLeftPoint(t),n?this._initialTopLeftPoint._add(this._getMapPanePos()):o.DomUtil.setPosition(this._mapPane,new o.Point(0,0)),this._tileLayersToLoad=this._tileLayersNum;var s=!this._loaded;this._loaded=!0,this.fire("viewreset",{hard:!n}),s&&(this.fire("load"),this.eachLayer(this._layerAdd,this)),this.fire("move"),(r||i)&&this.fire("zoomend"),this.fire("moveend",{hard:!n})},_rawPanBy:function(t){o.DomUtil.setPosition(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_updateZoomLevels:function(){var t,e=1/0,i=-(1/0),o=this._getZoomSpan();for(t in this._zoomBoundLayers){var r=this._zoomBoundLayers[t];isNaN(r.options.minZoom)||(e=Math.min(e,r.options.minZoom)),isNaN(r.options.maxZoom)||(i=Math.max(i,r.options.maxZoom))}t===n?this._layersMaxZoom=this._layersMinZoom=n:(this._layersMaxZoom=i,this._layersMinZoom=e),o!==this._getZoomSpan()&&this.fire("zoomlevelschange")},_panInsideMaxBounds:function(){this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(e){if(o.DomEvent){e=e||"on",o.DomEvent[e](this._container,"click",this._onMouseClick,this);var n,i,r=["dblclick","mousedown","mouseup","mouseenter","mouseleave","mousemove","contextmenu"];for(n=0,i=r.length;i>n;n++)o.DomEvent[e](this._container,r[n],this._fireMouseEvent,this);this.options.trackResize&&o.DomEvent[e](t,"resize",this._onResize,this)}},_onResize:function(){o.Util.cancelAnimFrame(this._resizeRequest),this._resizeRequest=o.Util.requestAnimFrame(function(){this.invalidateSize({debounceMoveend:!0})},this,!1,this._container)},_onMouseClick:function(t){!this._loaded||!t._simulated&&(this.dragging&&this.dragging.moved()||this.boxZoom&&this.boxZoom.moved())||o.DomEvent._skipped(t)||(this.fire("preclick"),this._fireMouseEvent(t))},_fireMouseEvent:function(t){if(this._loaded&&!o.DomEvent._skipped(t)){var e=t.type;if(e="mouseenter"===e?"mouseover":"mouseleave"===e?"mouseout":e,this.hasEventListeners(e)){"contextmenu"===e&&o.DomEvent.preventDefault(t);var n=this.mouseEventToContainerPoint(t),i=this.containerPointToLayerPoint(n),r=this.layerPointToLatLng(i);this.fire(e,{latlng:r,layerPoint:i,containerPoint:n,originalEvent:t})}}},_onTileLayerLoad:function(){this._tileLayersToLoad--,this._tileLayersNum&&!this._tileLayersToLoad&&this.fire("tilelayersload")},_clearHandlers:function(){for(var t=0,e=this._handlers.length;e>t;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,this):this.on("load",t,e),this},_layerAdd:function(t){t.onAdd(this),this.fire("layeradd",{layer:t})},_getMapPanePos:function(){return o.DomUtil.getPosition(this._mapPane)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(){return this.getPixelOrigin().subtract(this._getMapPanePos())},_getNewTopLeftPoint:function(t,e){var n=this.getSize()._divideBy(2);return this.project(t,e)._subtract(n)._round()},_latLngToNewLayerPoint:function(t,e,n){var i=this._getNewTopLeftPoint(n,e).add(this._getMapPanePos());return this.project(t,e)._subtract(i)},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,n){if(!n)return t;var i=this.project(t,e),r=this.getSize().divideBy(2),s=new o.Bounds(i.subtract(r),i.add(r)),a=this._getBoundsOffset(s,n,e);return this.unproject(i.add(a),e)},_limitOffset:function(t,e){if(!e)return t;var n=this.getPixelBounds(),i=new o.Bounds(n.min.add(t),n.max.add(t));return t.add(this._getBoundsOffset(i,e))},_getBoundsOffset:function(t,e,n){var i=this.project(e.getNorthWest(),n).subtract(t.min),r=this.project(e.getSouthEast(),n).subtract(t.max),s=this._rebound(i.x,-r.x),a=this._rebound(i.y,-r.y);return new o.Point(s,a)},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),n=this.getMaxZoom();return Math.max(e,Math.min(n,t))}}),o.map=function(t,e){return new o.Map(t,e)},o.Projection.Mercator={MAX_LATITUDE:85.0840591556,R_MINOR:6356752.314245179,R_MAJOR:6378137,project:function(t){var e=o.LatLng.DEG_TO_RAD,n=this.MAX_LATITUDE,i=Math.max(Math.min(n,t.lat),-n),r=this.R_MAJOR,s=this.R_MINOR,a=t.lng*e*r,l=i*e,u=s/r,c=Math.sqrt(1-u*u),h=c*Math.sin(l);h=Math.pow((1-h)/(1+h),.5*c);var p=Math.tan(.5*(.5*Math.PI-l))/h;return l=-r*Math.log(p),new o.Point(a,l)},unproject:function(t){for(var e,n=o.LatLng.RAD_TO_DEG,i=this.R_MAJOR,r=this.R_MINOR,s=t.x*n/i,a=r/i,l=Math.sqrt(1-a*a),u=Math.exp(-t.y/i),c=Math.PI/2-2*Math.atan(u),h=15,p=1e-7,d=h,f=.1;Math.abs(f)>p&&--d>0;)e=l*Math.sin(c),f=Math.PI/2-2*Math.atan(u*Math.pow((1-e)/(1+e),.5*l))-c,c+=f;return new o.LatLng(c*n,s)}},o.CRS.EPSG3395=o.extend({},o.CRS,{code:"EPSG:3395",projection:o.Projection.Mercator,transformation:function(){var t=o.Projection.Mercator,e=t.R_MAJOR,n=.5/(Math.PI*e);return new o.Transformation(n,.5,-n,.5)}()}),o.TileLayer=o.Class.extend({includes:o.Mixin.Events,options:{minZoom:0,maxZoom:18,tileSize:256,subdomains:"abc",errorTileUrl:"",attribution:"",zoomOffset:0,opacity:1,unloadInvisibleTiles:o.Browser.mobile,updateWhenIdle:o.Browser.mobile},initialize:function(t,e){e=o.setOptions(this,e),e.detectRetina&&o.Browser.retina&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomOffset++,e.minZoom>0&&e.minZoom--,this.options.maxZoom--),e.bounds&&(e.bounds=o.latLngBounds(e.bounds)),this._url=t;var n=this.options.subdomains;"string"==typeof n&&(this.options.subdomains=n.split(""))},onAdd:function(t){this._map=t,this._animated=t._zoomAnimated,this._initContainer(),t.on({viewreset:this._reset,moveend:this._update},this),this._animated&&t.on({zoomanim:this._animateZoom,zoomend:this._endZoomAnim},this),this.options.updateWhenIdle||(this._limitedUpdate=o.Util.limitExecByInterval(this._update,150,this),t.on("move",this._limitedUpdate,this)),this._reset(),this._update()},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){this._container.parentNode.removeChild(this._container),t.off({viewreset:this._reset,moveend:this._update},this),this._animated&&t.off({zoomanim:this._animateZoom,zoomend:this._endZoomAnim},this),this.options.updateWhenIdle||t.off("move",this._limitedUpdate,this),this._container=null,this._map=null},bringToFront:function(){var t=this._map._panes.tilePane;return this._container&&(t.appendChild(this._container),this._setAutoZIndex(t,Math.max)),this},bringToBack:function(){var t=this._map._panes.tilePane;return this._container&&(t.insertBefore(this._container,t.firstChild),this._setAutoZIndex(t,Math.min)),this},getAttribution:function(){return this.options.attribution},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},setUrl:function(t,e){return this._url=t,e||this.redraw(),this},redraw:function(){return this._map&&(this._reset({hard:!0}),this._update()),this},_updateZIndex:function(){this._container&&this.options.zIndex!==n&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t,e){var n,i,o,r=t.children,s=-e(1/0,-(1/0));for(i=0,o=r.length;o>i;i++)r[i]!==this._container&&(n=parseInt(r[i].style.zIndex,10),isNaN(n)||(s=e(s,n)));this.options.zIndex=this._container.style.zIndex=(isFinite(s)?s:0)+e(1,-1)},_updateOpacity:function(){var t,e=this._tiles;if(o.Browser.ielt9)for(t in e)o.DomUtil.setOpacity(e[t],this.options.opacity);else o.DomUtil.setOpacity(this._container,this.options.opacity)},_initContainer:function(){var t=this._map._panes.tilePane;if(!this._container){if(this._container=o.DomUtil.create("div","leaflet-layer"),this._updateZIndex(),this._animated){var e="leaflet-tile-container";this._bgBuffer=o.DomUtil.create("div",e,this._container),this._tileContainer=o.DomUtil.create("div",e,this._container)}else this._tileContainer=this._container;t.appendChild(this._container),this.options.opacity<1&&this._updateOpacity()}},_reset:function(t){for(var e in this._tiles)this.fire("tileunload",{tile:this._tiles[e]});this._tiles={},this._tilesToLoad=0,this.options.reuseTiles&&(this._unusedTiles=[]),this._tileContainer.innerHTML="",this._animated&&t&&t.hard&&this._clearBgBuffer(),this._initContainer()},_getTileSize:function(){var t=this._map,e=t.getZoom()+this.options.zoomOffset,n=this.options.maxNativeZoom,i=this.options.tileSize;return n&&e>n&&(i=Math.round(t.getZoomScale(e)/t.getZoomScale(n)*i)),i},_update:function(){if(this._map){var t=this._map,e=t.getPixelBounds(),n=t.getZoom(),i=this._getTileSize();if(!(n>this.options.maxZoom||ni;i++)this._addTile(s[i],u);this._tileContainer.appendChild(u)}},_tileShouldBeLoaded:function(t){if(t.x+":"+t.y in this._tiles)return!1;var e=this.options;if(!e.continuousWorld){var n=this._getWrapTileNum();if(e.noWrap&&(t.x<0||t.x>=n.x)||t.y<0||t.y>=n.y)return!1}if(e.bounds){var i=this._getTileSize(),o=t.multiplyBy(i),r=o.add([i,i]),s=this._map.unproject(o),a=this._map.unproject(r);if(e.continuousWorld||e.noWrap||(s=s.wrap(),a=a.wrap()),!e.bounds.intersects([s,a]))return!1}return!0},_removeOtherTiles:function(t){var e,n,i,o;for(o in this._tiles)e=o.split(":"),n=parseInt(e[0],10),i=parseInt(e[1],10),(nt.max.x||it.max.y)&&this._removeTile(o)},_removeTile:function(t){var e=this._tiles[t];this.fire("tileunload",{tile:e,url:e.src}),this.options.reuseTiles?(o.DomUtil.removeClass(e,"leaflet-tile-loaded"),this._unusedTiles.push(e)):e.parentNode===this._tileContainer&&this._tileContainer.removeChild(e),o.Browser.android||(e.onload=null,e.src=o.Util.emptyImageUrl),delete this._tiles[t]},_addTile:function(t,e){var n=this._getTilePos(t),i=this._getTile();o.DomUtil.setPosition(i,n,o.Browser.chrome),this._tiles[t.x+":"+t.y]=i,this._loadTile(i,t),i.parentNode!==this._tileContainer&&e.appendChild(i)},_getZoomForUrl:function(){var t=this.options,e=this._map.getZoom();return t.zoomReverse&&(e=t.maxZoom-e),e+=t.zoomOffset,t.maxNativeZoom?Math.min(e,t.maxNativeZoom):e},_getTilePos:function(t){var e=this._map.getPixelOrigin(),n=this._getTileSize();return t.multiplyBy(n).subtract(e)},getTileUrl:function(t){return o.Util.template(this._url,o.extend({s:this._getSubdomain(t),z:t.z,x:t.x,y:t.y},this.options))},_getWrapTileNum:function(){var t=this._map.options.crs,e=t.getSize(this._map.getZoom());return e.divideBy(this._getTileSize())._floor()},_adjustTilePoint:function(t){var e=this._getWrapTileNum();this.options.continuousWorld||this.options.noWrap||(t.x=(t.x%e.x+e.x)%e.x),this.options.tms&&(t.y=e.y-t.y-1),t.z=this._getZoomForUrl()},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_getTile:function(){if(this.options.reuseTiles&&this._unusedTiles.length>0){var t=this._unusedTiles.pop();return this._resetTile(t),t}return this._createTile()},_resetTile:function(){},_createTile:function(){var t=o.DomUtil.create("img","leaflet-tile");return t.style.width=t.style.height=this._getTileSize()+"px",t.galleryimg="no",t.onselectstart=t.onmousemove=o.Util.falseFn,o.Browser.ielt9&&this.options.opacity!==n&&o.DomUtil.setOpacity(t,this.options.opacity),o.Browser.mobileWebkit3d&&(t.style.WebkitBackfaceVisibility="hidden"),t},_loadTile:function(t,e){t._layer=this,t.onload=this._tileOnLoad,t.onerror=this._tileOnError,this._adjustTilePoint(e),t.src=this.getTileUrl(e),this.fire("tileloadstart",{tile:t,url:t.src})},_tileLoaded:function(){this._tilesToLoad--,this._animated&&o.DomUtil.addClass(this._tileContainer,"leaflet-zoom-animated"),this._tilesToLoad||(this.fire("load"),this._animated&&(clearTimeout(this._clearBgBufferTimer),this._clearBgBufferTimer=setTimeout(o.bind(this._clearBgBuffer,this),500)))},_tileOnLoad:function(){var t=this._layer;this.src!==o.Util.emptyImageUrl&&(o.DomUtil.addClass(this,"leaflet-tile-loaded"),t.fire("tileload",{tile:this,url:this.src})),t._tileLoaded()},_tileOnError:function(){var t=this._layer;t.fire("tileerror",{tile:this,url:this.src});var e=t.options.errorTileUrl;e&&(this.src=e),t._tileLoaded()}}),o.tileLayer=function(t,e){return new o.TileLayer(t,e)},o.TileLayer.WMS=o.TileLayer.extend({defaultWmsParams:{service:"WMS",request:"GetMap",version:"1.1.1",layers:"",styles:"",format:"image/jpeg",transparent:!1},initialize:function(t,e){this._url=t;var n=o.extend({},this.defaultWmsParams),i=e.tileSize||this.options.tileSize;e.detectRetina&&o.Browser.retina?n.width=n.height=2*i:n.width=n.height=i;for(var r in e)this.options.hasOwnProperty(r)||"crs"===r||(n[r]=e[r]);this.wmsParams=n,o.setOptions(this,e)},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,o.TileLayer.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._map,n=this.options.tileSize,i=t.multiplyBy(n),r=i.add([n,n]),s=this._crs.project(e.unproject(i,t.z)),a=this._crs.project(e.unproject(r,t.z)),l=this._wmsVersion>=1.3&&this._crs===o.CRS.EPSG4326?[a.y,s.x,s.y,a.x].join(","):[s.x,a.y,a.x,s.y].join(","),u=o.Util.template(this._url,{s:this._getSubdomain(t)});return u+o.Util.getParamString(this.wmsParams,u,!0)+"&BBOX="+l},setParams:function(t,e){return o.extend(this.wmsParams,t),e||this.redraw(),this}}),o.tileLayer.wms=function(t,e){return new o.TileLayer.WMS(t,e)},o.TileLayer.Canvas=o.TileLayer.extend({options:{async:!1},initialize:function(t){o.setOptions(this,t)},redraw:function(){this._map&&(this._reset({hard:!0}),this._update());for(var t in this._tiles)this._redrawTile(this._tiles[t]);return this},_redrawTile:function(t){this.drawTile(t,t._tilePoint,this._map._zoom)},_createTile:function(){var t=o.DomUtil.create("canvas","leaflet-tile");return t.width=t.height=this.options.tileSize, -t.onselectstart=t.onmousemove=o.Util.falseFn,t},_loadTile:function(t,e){t._layer=this,t._tilePoint=e,this._redrawTile(t),this.options.async||this.tileDrawn(t)},drawTile:function(){},tileDrawn:function(t){this._tileOnLoad.call(t)}}),o.tileLayer.canvas=function(t){return new o.TileLayer.Canvas(t)},o.ImageOverlay=o.Class.extend({includes:o.Mixin.Events,options:{opacity:1},initialize:function(t,e,n){this._url=t,this._bounds=o.latLngBounds(e),o.setOptions(this,n)},onAdd:function(t){this._map=t,this._image||this._initImage(),t._panes.overlayPane.appendChild(this._image),t.on("viewreset",this._reset,this),t.options.zoomAnimation&&o.Browser.any3d&&t.on("zoomanim",this._animateZoom,this),this._reset()},onRemove:function(t){t.getPanes().overlayPane.removeChild(this._image),t.off("viewreset",this._reset,this),t.options.zoomAnimation&&t.off("zoomanim",this._animateZoom,this)},addTo:function(t){return t.addLayer(this),this},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},bringToFront:function(){return this._image&&this._map._panes.overlayPane.appendChild(this._image),this},bringToBack:function(){var t=this._map._panes.overlayPane;return this._image&&t.insertBefore(this._image,t.firstChild),this},setUrl:function(t){this._url=t,this._image.src=this._url},getAttribution:function(){return this.options.attribution},_initImage:function(){this._image=o.DomUtil.create("img","leaflet-image-layer"),this._map.options.zoomAnimation&&o.Browser.any3d?o.DomUtil.addClass(this._image,"leaflet-zoom-animated"):o.DomUtil.addClass(this._image,"leaflet-zoom-hide"),this._updateOpacity(),o.extend(this._image,{galleryimg:"no",onselectstart:o.Util.falseFn,onmousemove:o.Util.falseFn,onload:o.bind(this._onImageLoad,this),src:this._url})},_animateZoom:function(t){var e=this._map,n=this._image,i=e.getZoomScale(t.zoom),r=this._bounds.getNorthWest(),s=this._bounds.getSouthEast(),a=e._latLngToNewLayerPoint(r,t.zoom,t.center),l=e._latLngToNewLayerPoint(s,t.zoom,t.center)._subtract(a),u=a._add(l._multiplyBy(.5*(1-1/i)));n.style[o.DomUtil.TRANSFORM]=o.DomUtil.getTranslateString(u)+" scale("+i+") "},_reset:function(){var t=this._image,e=this._map.latLngToLayerPoint(this._bounds.getNorthWest()),n=this._map.latLngToLayerPoint(this._bounds.getSouthEast())._subtract(e);o.DomUtil.setPosition(t,e),t.style.width=n.x+"px",t.style.height=n.y+"px"},_onImageLoad:function(){this.fire("load")},_updateOpacity:function(){o.DomUtil.setOpacity(this._image,this.options.opacity)}}),o.imageOverlay=function(t,e,n){return new o.ImageOverlay(t,e,n)},o.Icon=o.Class.extend({options:{className:""},initialize:function(t){o.setOptions(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var n=this._getIconUrl(t);if(!n){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var i;return i=e&&"IMG"===e.tagName?this._createImg(n,e):this._createImg(n),this._setIconStyles(i,t),i},_setIconStyles:function(t,e){var n,i=this.options,r=o.point(i[e+"Size"]);n="shadow"===e?o.point(i.shadowAnchor||i.iconAnchor):o.point(i.iconAnchor),!n&&r&&(n=r.divideBy(2,!0)),t.className="leaflet-marker-"+e+" "+i.className,n&&(t.style.marginLeft=-n.x+"px",t.style.marginTop=-n.y+"px"),r&&(t.style.width=r.x+"px",t.style.height=r.y+"px")},_createImg:function(t,n){return n=n||e.createElement("img"),n.src=t,n},_getIconUrl:function(t){return o.Browser.retina&&this.options[t+"RetinaUrl"]?this.options[t+"RetinaUrl"]:this.options[t+"Url"]}}),o.icon=function(t){return new o.Icon(t)},o.Icon.Default=o.Icon.extend({options:{iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],shadowSize:[41,41]},_getIconUrl:function(t){var e=t+"Url";if(this.options[e])return this.options[e];o.Browser.retina&&"icon"===t&&(t+="-2x");var n=o.Icon.Default.imagePath;if(!n)throw new Error("Couldn't autodetect L.Icon.Default.imagePath, set it manually.");return n+"/marker-"+t+".png"}}),o.Icon.Default.imagePath=function(){var t,n,i,o,r,s=e.getElementsByTagName("script"),a=/[\/^]leaflet[\-\._]?([\w\-\._]*)\.js\??/;for(t=0,n=s.length;n>t;t++)if(i=s[t].src,o=i.match(a))return r=i.split(a)[0],(r?r+"/":"")+"images"}(),o.Marker=o.Class.extend({includes:o.Mixin.Events,options:{icon:new o.Icon.Default,title:"",alt:"",clickable:!0,draggable:!1,keyboard:!0,zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250},initialize:function(t,e){o.setOptions(this,e),this._latlng=o.latLng(t)},onAdd:function(t){this._map=t,t.on("viewreset",this.update,this),this._initIcon(),this.update(),this.fire("add"),t.options.zoomAnimation&&t.options.markerZoomAnimation&&t.on("zoomanim",this._animateZoom,this)},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){this.dragging&&this.dragging.disable(),this._removeIcon(),this._removeShadow(),this.fire("remove"),t.off({viewreset:this.update,zoomanim:this._animateZoom},this),this._map=null},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=o.latLng(t),this.update(),this.fire("move",{latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update(),this},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup),this},update:function(){return this._icon&&this._setPos(this._map.latLngToLayerPoint(this._latlng).round()),this},_initIcon:function(){var t=this.options,e=this._map,n=e.options.zoomAnimation&&e.options.markerZoomAnimation,i=n?"leaflet-zoom-animated":"leaflet-zoom-hide",r=t.icon.createIcon(this._icon),s=!1;r!==this._icon&&(this._icon&&this._removeIcon(),s=!0,t.title&&(r.title=t.title),t.alt&&(r.alt=t.alt)),o.DomUtil.addClass(r,i),t.keyboard&&(r.tabIndex="0"),this._icon=r,this._initInteraction(),t.riseOnHover&&o.DomEvent.on(r,"mouseover",this._bringToFront,this).on(r,"mouseout",this._resetZIndex,this);var a=t.icon.createShadow(this._shadow),l=!1;a!==this._shadow&&(this._removeShadow(),l=!0),a&&o.DomUtil.addClass(a,i),this._shadow=a,t.opacity<1&&this._updateOpacity();var u=this._map._panes;s&&u.markerPane.appendChild(this._icon),a&&l&&u.shadowPane.appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&o.DomEvent.off(this._icon,"mouseover",this._bringToFront).off(this._icon,"mouseout",this._resetZIndex),this._map._panes.markerPane.removeChild(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&this._map._panes.shadowPane.removeChild(this._shadow),this._shadow=null},_setPos:function(t){o.DomUtil.setPosition(this._icon,t),this._shadow&&o.DomUtil.setPosition(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon.style.zIndex=this._zIndex+t},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.clickable){var t=this._icon,e=["dblclick","mousedown","mouseover","mouseout","contextmenu"];o.DomUtil.addClass(t,"leaflet-clickable"),o.DomEvent.on(t,"click",this._onMouseClick,this),o.DomEvent.on(t,"keypress",this._onKeyPress,this);for(var n=0;nr?(e.height=r+"px",o.DomUtil.addClass(t,s)):o.DomUtil.removeClass(t,s),this._containerWidth=this._container.offsetWidth},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=this._animated,n=o.point(this.options.offset);e&&o.DomUtil.setPosition(this._container,t),this._containerBottom=-n.y-(e?0:t.y),this._containerLeft=-Math.round(this._containerWidth/2)+n.x+(e?0:t.x),this._container.style.bottom=this._containerBottom+"px",this._container.style.left=this._containerLeft+"px"}},_zoomAnimation:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);o.DomUtil.setPosition(this._container,e)},_adjustPan:function(){if(this.options.autoPan){var t=this._map,e=this._container.offsetHeight,n=this._containerWidth,i=new o.Point(this._containerLeft,-e-this._containerBottom);this._animated&&i._add(o.DomUtil.getPosition(this._container));var r=t.layerPointToContainerPoint(i),s=o.point(this.options.autoPanPadding),a=o.point(this.options.autoPanPaddingTopLeft||s),l=o.point(this.options.autoPanPaddingBottomRight||s),u=t.getSize(),c=0,h=0;r.x+n+l.x>u.x&&(c=r.x+n-u.x+l.x),r.x-c-a.x<0&&(c=r.x-a.x),r.y+e+l.y>u.y&&(h=r.y+e-u.y+l.y),r.y-h-a.y<0&&(h=r.y-a.y),(c||h)&&t.fire("autopanstart").panBy([c,h])}},_onCloseButtonClick:function(t){this._close(),o.DomEvent.stop(t)}}),o.popup=function(t,e){return new o.Popup(t,e)},o.Map.include({openPopup:function(t,e,n){if(this.closePopup(),!(t instanceof o.Popup)){var i=t;t=new o.Popup(n).setLatLng(e).setContent(i)}return t._isOpen=!0,this._popup=t,this.addLayer(t)},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&(this.removeLayer(t),t._isOpen=!1),this}}),o.Marker.include({openPopup:function(){return this._popup&&this._map&&!this._map.hasLayer(this._popup)&&(this._popup.setLatLng(this._latlng),this._map.openPopup(this._popup)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(){return this._popup&&(this._popup._isOpen?this.closePopup():this.openPopup()),this},bindPopup:function(t,e){var n=o.point(this.options.icon.options.popupAnchor||[0,0]);return n=n.add(o.Popup.prototype.options.offset),e&&e.offset&&(n=n.add(e.offset)),e=o.extend({offset:n},e),this._popupHandlersAdded||(this.on("click",this.togglePopup,this).on("remove",this.closePopup,this).on("move",this._movePopup,this),this._popupHandlersAdded=!0),t instanceof o.Popup?(o.setOptions(t,e),this._popup=t,t._source=this):this._popup=new o.Popup(e,this).setContent(t),this},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},unbindPopup:function(){return this._popup&&(this._popup=null,this.off("click",this.togglePopup,this).off("remove",this.closePopup,this).off("move",this._movePopup,this),this._popupHandlersAdded=!1),this},getPopup:function(){return this._popup},_movePopup:function(t){this._popup.setLatLng(t.latlng)}}),o.LayerGroup=o.Class.extend({initialize:function(t){this._layers={};var e,n;if(t)for(e=0,n=t.length;n>e;e++)this.addLayer(t[e])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return t?t in this._layers||this.getLayerId(t)in this._layers:!1},clearLayers:function(){return this.eachLayer(this.removeLayer,this),this},invoke:function(t){var e,n,i=Array.prototype.slice.call(arguments,1);for(e in this._layers)n=this._layers[e],n[t]&&n[t].apply(n,i);return this},onAdd:function(t){this._map=t,this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t),this._map=null},addTo:function(t){return t.addLayer(this),this},eachLayer:function(t,e){for(var n in this._layers)t.call(e,this._layers[n]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];for(var e in this._layers)t.push(this._layers[e]);return t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return o.stamp(t)}}),o.layerGroup=function(t){return new o.LayerGroup(t)},o.FeatureGroup=o.LayerGroup.extend({includes:o.Mixin.Events,statics:{EVENTS:"click dblclick mouseover mouseout mousemove contextmenu popupopen popupclose"},addLayer:function(t){return this.hasLayer(t)?this:("on"in t&&t.on(o.FeatureGroup.EVENTS,this._propagateEvent,this),o.LayerGroup.prototype.addLayer.call(this,t),this._popupContent&&t.bindPopup&&t.bindPopup(this._popupContent,this._popupOptions),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),"off"in t&&t.off(o.FeatureGroup.EVENTS,this._propagateEvent,this),o.LayerGroup.prototype.removeLayer.call(this,t),this._popupContent&&this.invoke("unbindPopup"),this.fire("layerremove",{layer:t})):this},bindPopup:function(t,e){return this._popupContent=t,this._popupOptions=e,this.invoke("bindPopup",t,e)},openPopup:function(t){for(var e in this._layers){this._layers[e].openPopup(t);break}return this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new o.LatLngBounds;return this.eachLayer(function(e){t.extend(e instanceof o.Marker?e.getLatLng():e.getBounds())}),t},_propagateEvent:function(t){t=o.extend({layer:t.target,target:this},t),this.fire(t.type,t)}}),o.featureGroup=function(t){return new o.FeatureGroup(t)},o.Path=o.Class.extend({includes:[o.Mixin.Events],statics:{CLIP_PADDING:function(){var e=o.Browser.mobile?1280:2e3,n=(e/Math.max(t.outerWidth,t.outerHeight)-1)/2;return Math.max(0,Math.min(.5,n))}()},options:{stroke:!0,color:"#0033ff",dashArray:null,lineCap:null,lineJoin:null,weight:5,opacity:.5,fill:!1,fillColor:null,fillOpacity:.2,clickable:!0},initialize:function(t){o.setOptions(this,t)},onAdd:function(t){this._map=t,this._container||(this._initElements(),this._initEvents()),this.projectLatlngs(),this._updatePath(),this._container&&this._map._pathRoot.appendChild(this._container),this.fire("add"),t.on({viewreset:this.projectLatlngs,moveend:this._updatePath},this)},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){t._pathRoot.removeChild(this._container),this.fire("remove"),this._map=null,o.Browser.vml&&(this._container=null,this._stroke=null,this._fill=null),t.off({viewreset:this.projectLatlngs,moveend:this._updatePath},this)},projectLatlngs:function(){},setStyle:function(t){return o.setOptions(this,t),this._container&&this._updateStyle(),this},redraw:function(){return this._map&&(this.projectLatlngs(),this._updatePath()),this}}),o.Map.include({_updatePathViewport:function(){var t=o.Path.CLIP_PADDING,e=this.getSize(),n=o.DomUtil.getPosition(this._mapPane),i=n.multiplyBy(-1)._subtract(e.multiplyBy(t)._round()),r=i.add(e.multiplyBy(1+2*t)._round());this._pathViewport=new o.Bounds(i,r)}}),o.Path.SVG_NS="http://www.w3.org/2000/svg",o.Browser.svg=!(!e.createElementNS||!e.createElementNS(o.Path.SVG_NS,"svg").createSVGRect),o.Path=o.Path.extend({statics:{SVG:o.Browser.svg},bringToFront:function(){var t=this._map._pathRoot,e=this._container;return e&&t.lastChild!==e&&t.appendChild(e),this},bringToBack:function(){var t=this._map._pathRoot,e=this._container,n=t.firstChild;return e&&n!==e&&t.insertBefore(e,n),this},getPathString:function(){},_createElement:function(t){return e.createElementNS(o.Path.SVG_NS,t)},_initElements:function(){this._map._initPathRoot(),this._initPath(),this._initStyle()},_initPath:function(){this._container=this._createElement("g"),this._path=this._createElement("path"),this.options.className&&o.DomUtil.addClass(this._path,this.options.className),this._container.appendChild(this._path)},_initStyle:function(){this.options.stroke&&(this._path.setAttribute("stroke-linejoin","round"),this._path.setAttribute("stroke-linecap","round")),this.options.fill&&this._path.setAttribute("fill-rule","evenodd"),this.options.pointerEvents&&this._path.setAttribute("pointer-events",this.options.pointerEvents),this.options.clickable||this.options.pointerEvents||this._path.setAttribute("pointer-events","none"),this._updateStyle()},_updateStyle:function(){this.options.stroke?(this._path.setAttribute("stroke",this.options.color),this._path.setAttribute("stroke-opacity",this.options.opacity),this._path.setAttribute("stroke-width",this.options.weight),this.options.dashArray?this._path.setAttribute("stroke-dasharray",this.options.dashArray):this._path.removeAttribute("stroke-dasharray"),this.options.lineCap&&this._path.setAttribute("stroke-linecap",this.options.lineCap),this.options.lineJoin&&this._path.setAttribute("stroke-linejoin",this.options.lineJoin)):this._path.setAttribute("stroke","none"),this.options.fill?(this._path.setAttribute("fill",this.options.fillColor||this.options.color),this._path.setAttribute("fill-opacity",this.options.fillOpacity)):this._path.setAttribute("fill","none")},_updatePath:function(){var t=this.getPathString();t||(t="M0 0"),this._path.setAttribute("d",t)},_initEvents:function(){if(this.options.clickable){(o.Browser.svg||!o.Browser.vml)&&o.DomUtil.addClass(this._path,"leaflet-clickable"),o.DomEvent.on(this._container,"click",this._onMouseClick,this);for(var t=["dblclick","mousedown","mouseover","mouseout","mousemove","contextmenu"],e=0;e';var n=t.firstChild;return n.style.behavior="url(#default#VML)",n&&"object"==typeof n.adj}catch(i){return!1}}(),o.Path=o.Browser.svg||!o.Browser.vml?o.Path:o.Path.extend({statics:{VML:!0,CLIP_PADDING:.02},_createElement:function(){try{return e.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return e.createElement("')}}catch(t){return function(t){return e.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),_initPath:function(){var t=this._container=this._createElement("shape");o.DomUtil.addClass(t,"leaflet-vml-shape"+(this.options.className?" "+this.options.className:"")),this.options.clickable&&o.DomUtil.addClass(t,"leaflet-clickable"),t.coordsize="1 1",this._path=this._createElement("path"),t.appendChild(this._path),this._map._pathRoot.appendChild(t)},_initStyle:function(){this._updateStyle()},_updateStyle:function(){var t=this._stroke,e=this._fill,n=this.options,i=this._container;i.stroked=n.stroke,i.filled=n.fill,n.stroke?(t||(t=this._stroke=this._createElement("stroke"),t.endcap="round",i.appendChild(t)),t.weight=n.weight+"px",t.color=n.color,t.opacity=n.opacity,n.dashArray?t.dashStyle=o.Util.isArray(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):t.dashStyle="",n.lineCap&&(t.endcap=n.lineCap.replace("butt","flat")),n.lineJoin&&(t.joinstyle=n.lineJoin)):t&&(i.removeChild(t),this._stroke=null),n.fill?(e||(e=this._fill=this._createElement("fill"),i.appendChild(e)),e.color=n.fillColor||n.color,e.opacity=n.fillOpacity):e&&(i.removeChild(e),this._fill=null)},_updatePath:function(){var t=this._container.style;t.display="none",this._path.v=this.getPathString()+" ",t.display=""}}),o.Map.include(o.Browser.svg||!o.Browser.vml?{}:{_initPathRoot:function(){if(!this._pathRoot){var t=this._pathRoot=e.createElement("div");t.className="leaflet-vml-container",this._panes.overlayPane.appendChild(t),this.on("moveend",this._updatePathViewport),this._updatePathViewport()}}}),o.Browser.canvas=function(){return!!e.createElement("canvas").getContext}(),o.Path=o.Path.SVG&&!t.L_PREFER_CANVAS||!o.Browser.canvas?o.Path:o.Path.extend({statics:{CANVAS:!0,SVG:!1},redraw:function(){return this._map&&(this.projectLatlngs(),this._requestUpdate()),this},setStyle:function(t){return o.setOptions(this,t),this._map&&(this._updateStyle(),this._requestUpdate()),this},onRemove:function(t){t.off("viewreset",this.projectLatlngs,this).off("moveend",this._updatePath,this),this.options.clickable&&(this._map.off("click",this._onClick,this),this._map.off("mousemove",this._onMouseMove,this)),this._requestUpdate(),this.fire("remove"),this._map=null},_requestUpdate:function(){this._map&&!o.Path._updateRequest&&(o.Path._updateRequest=o.Util.requestAnimFrame(this._fireMapMoveEnd,this._map))},_fireMapMoveEnd:function(){o.Path._updateRequest=null,this.fire("moveend")},_initElements:function(){this._map._initPathRoot(),this._ctx=this._map._canvasCtx},_updateStyle:function(){var t=this.options;t.stroke&&(this._ctx.lineWidth=t.weight,this._ctx.strokeStyle=t.color),t.fill&&(this._ctx.fillStyle=t.fillColor||t.color),t.lineCap&&(this._ctx.lineCap=t.lineCap),t.lineJoin&&(this._ctx.lineJoin=t.lineJoin)},_drawPath:function(){var t,e,n,i,r,s;for(this._ctx.beginPath(),t=0,n=this._parts.length;n>t;t++){for(e=0,i=this._parts[t].length;i>e;e++)r=this._parts[t][e],s=(0===e?"move":"line")+"To",this._ctx[s](r.x,r.y);this instanceof o.Polygon&&this._ctx.closePath()}},_checkIfEmpty:function(){return!this._parts.length},_updatePath:function(){if(!this._checkIfEmpty()){var t=this._ctx,e=this.options;this._drawPath(),t.save(),this._updateStyle(),e.fill&&(t.globalAlpha=e.fillOpacity,t.fill(e.fillRule||"evenodd")),e.stroke&&(t.globalAlpha=e.opacity,t.stroke()),t.restore()}},_initEvents:function(){this.options.clickable&&(this._map.on("mousemove",this._onMouseMove,this),this._map.on("click dblclick contextmenu",this._fireMouseEvent,this))},_fireMouseEvent:function(t){this._containsPoint(t.layerPoint)&&this.fire(t.type,t)},_onMouseMove:function(t){this._map&&!this._map._animatingZoom&&(this._containsPoint(t.layerPoint)?(this._ctx.canvas.style.cursor="pointer",this._mouseInside=!0,this.fire("mouseover",t)):this._mouseInside&&(this._ctx.canvas.style.cursor="",this._mouseInside=!1,this.fire("mouseout",t)))}}),o.Map.include(o.Path.SVG&&!t.L_PREFER_CANVAS||!o.Browser.canvas?{}:{_initPathRoot:function(){var t,n=this._pathRoot;n||(n=this._pathRoot=e.createElement("canvas"),n.style.position="absolute",t=this._canvasCtx=n.getContext("2d"),t.lineCap="round",t.lineJoin="round",this._panes.overlayPane.appendChild(n),this.options.zoomAnimation&&(this._pathRoot.className="leaflet-zoom-animated",this.on("zoomanim",this._animatePathZoom),this.on("zoomend",this._endPathZoom)),this.on("moveend",this._updateCanvasViewport),this._updateCanvasViewport())},_updateCanvasViewport:function(){if(!this._pathZooming){this._updatePathViewport();var t=this._pathViewport,e=t.min,n=t.max.subtract(e),i=this._pathRoot;o.DomUtil.setPosition(i,e),i.width=n.x,i.height=n.y,i.getContext("2d").translate(-e.x,-e.y)}}}),o.LineUtil={simplify:function(t,e){if(!e||!t.length)return t.slice();var n=e*e;return t=this._reducePoints(t,n),t=this._simplifyDP(t,n)},pointToSegmentDistance:function(t,e,n){return Math.sqrt(this._sqClosestPointOnSegment(t,e,n,!0))},closestPointOnSegment:function(t,e,n){return this._sqClosestPointOnSegment(t,e,n)},_simplifyDP:function(t,e){var i=t.length,o=typeof Uint8Array!=n+""?Uint8Array:Array,r=new o(i);r[0]=r[i-1]=1,this._simplifyDPStep(t,r,e,0,i-1);var s,a=[];for(s=0;i>s;s++)r[s]&&a.push(t[s]);return a},_simplifyDPStep:function(t,e,n,i,o){var r,s,a,l=0;for(s=i+1;o-1>=s;s++)a=this._sqClosestPointOnSegment(t[s],t[i],t[o],!0),a>l&&(r=s,l=a);l>n&&(e[r]=1,this._simplifyDPStep(t,e,n,i,r),this._simplifyDPStep(t,e,n,r,o))},_reducePoints:function(t,e){for(var n=[t[0]],i=1,o=0,r=t.length;r>i;i++)this._sqDist(t[i],t[o])>e&&(n.push(t[i]),o=i);return r-1>o&&n.push(t[r-1]),n},clipSegment:function(t,e,n,i){var o,r,s,a=i?this._lastCode:this._getBitCode(t,n),l=this._getBitCode(e,n);for(this._lastCode=l;;){if(!(a|l))return[t,e];if(a&l)return!1;o=a||l,r=this._getEdgeIntersection(t,e,o,n),s=this._getBitCode(r,n),o===a?(t=r,a=s):(e=r,l=s)}},_getEdgeIntersection:function(t,e,n,i){var r=e.x-t.x,s=e.y-t.y,a=i.min,l=i.max;return 8&n?new o.Point(t.x+r*(l.y-t.y)/s,l.y):4&n?new o.Point(t.x+r*(a.y-t.y)/s,a.y):2&n?new o.Point(l.x,t.y+s*(l.x-t.x)/r):1&n?new o.Point(a.x,t.y+s*(a.x-t.x)/r):void 0},_getBitCode:function(t,e){var n=0;return t.xe.max.x&&(n|=2),t.ye.max.y&&(n|=8),n},_sqDist:function(t,e){var n=e.x-t.x,i=e.y-t.y;return n*n+i*i},_sqClosestPointOnSegment:function(t,e,n,i){var r,s=e.x,a=e.y,l=n.x-s,u=n.y-a,c=l*l+u*u;return c>0&&(r=((t.x-s)*l+(t.y-a)*u)/c,r>1?(s=n.x,a=n.y):r>0&&(s+=l*r,a+=u*r)),l=t.x-s,u=t.y-a,i?l*l+u*u:new o.Point(s,a)}},o.Polyline=o.Path.extend({initialize:function(t,e){o.Path.prototype.initialize.call(this,e),this._latlngs=this._convertLatLngs(t)},options:{smoothFactor:1,noClip:!1},projectLatlngs:function(){this._originalPoints=[];for(var t=0,e=this._latlngs.length;e>t;t++)this._originalPoints[t]=this._map.latLngToLayerPoint(this._latlngs[t])},getPathString:function(){for(var t=0,e=this._parts.length,n="";e>t;t++)n+=this._getPathPartStr(this._parts[t]);return n},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._latlngs=this._convertLatLngs(t),this.redraw()},addLatLng:function(t){return this._latlngs.push(o.latLng(t)),this.redraw()},spliceLatLngs:function(){var t=[].splice.apply(this._latlngs,arguments);return this._convertLatLngs(this._latlngs,!0),this.redraw(),t},closestLayerPoint:function(t){for(var e,n,i=1/0,r=this._parts,s=null,a=0,l=r.length;l>a;a++)for(var u=r[a],c=1,h=u.length;h>c;c++){ -e=u[c-1],n=u[c];var p=o.LineUtil._sqClosestPointOnSegment(t,e,n,!0);i>p&&(i=p,s=o.LineUtil._sqClosestPointOnSegment(t,e,n))}return s&&(s.distance=Math.sqrt(i)),s},getBounds:function(){return new o.LatLngBounds(this.getLatLngs())},_convertLatLngs:function(t,e){var n,i,r=e?t:[];for(n=0,i=t.length;i>n;n++){if(o.Util.isArray(t[n])&&"number"!=typeof t[n][0])return;r[n]=o.latLng(t[n])}return r},_initEvents:function(){o.Path.prototype._initEvents.call(this)},_getPathPartStr:function(t){for(var e,n=o.Path.VML,i=0,r=t.length,s="";r>i;i++)e=t[i],n&&e._round(),s+=(i?"L":"M")+e.x+" "+e.y;return s},_clipPoints:function(){var t,e,n,i=this._originalPoints,r=i.length;if(this.options.noClip)return void(this._parts=[i]);this._parts=[];var s=this._parts,a=this._map._pathViewport,l=o.LineUtil;for(t=0,e=0;r-1>t;t++)n=l.clipSegment(i[t],i[t+1],a,t),n&&(s[e]=s[e]||[],s[e].push(n[0]),(n[1]!==i[t+1]||t===r-2)&&(s[e].push(n[1]),e++))},_simplifyPoints:function(){for(var t=this._parts,e=o.LineUtil,n=0,i=t.length;i>n;n++)t[n]=e.simplify(t[n],this.options.smoothFactor)},_updatePath:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),o.Path.prototype._updatePath.call(this))}}),o.polyline=function(t,e){return new o.Polyline(t,e)},o.PolyUtil={},o.PolyUtil.clipPolygon=function(t,e){var n,i,r,s,a,l,u,c,h,p=[1,4,2,8],d=o.LineUtil;for(i=0,u=t.length;u>i;i++)t[i]._code=d._getBitCode(t[i],e);for(s=0;4>s;s++){for(c=p[s],n=[],i=0,u=t.length,r=u-1;u>i;r=i++)a=t[i],l=t[r],a._code&c?l._code&c||(h=d._getEdgeIntersection(l,a,c,e),h._code=d._getBitCode(h,e),n.push(h)):(l._code&c&&(h=d._getEdgeIntersection(l,a,c,e),h._code=d._getBitCode(h,e),n.push(h)),n.push(a));t=n}return t},o.Polygon=o.Polyline.extend({options:{fill:!0},initialize:function(t,e){o.Polyline.prototype.initialize.call(this,t,e),this._initWithHoles(t)},_initWithHoles:function(t){var e,n,i;if(t&&o.Util.isArray(t[0])&&"number"!=typeof t[0][0])for(this._latlngs=this._convertLatLngs(t[0]),this._holes=t.slice(1),e=0,n=this._holes.length;n>e;e++)i=this._holes[e]=this._convertLatLngs(this._holes[e]),i[0].equals(i[i.length-1])&&i.pop();t=this._latlngs,t.length>=2&&t[0].equals(t[t.length-1])&&t.pop()},projectLatlngs:function(){if(o.Polyline.prototype.projectLatlngs.call(this),this._holePoints=[],this._holes){var t,e,n,i;for(t=0,n=this._holes.length;n>t;t++)for(this._holePoints[t]=[],e=0,i=this._holes[t].length;i>e;e++)this._holePoints[t][e]=this._map.latLngToLayerPoint(this._holes[t][e])}},setLatLngs:function(t){return t&&o.Util.isArray(t[0])&&"number"!=typeof t[0][0]?(this._initWithHoles(t),this.redraw()):o.Polyline.prototype.setLatLngs.call(this,t)},_clipPoints:function(){var t=this._originalPoints,e=[];if(this._parts=[t].concat(this._holePoints),!this.options.noClip){for(var n=0,i=this._parts.length;i>n;n++){var r=o.PolyUtil.clipPolygon(this._parts[n],this._map._pathViewport);r.length&&e.push(r)}this._parts=e}},_getPathPartStr:function(t){var e=o.Polyline.prototype._getPathPartStr.call(this,t);return e+(o.Browser.svg?"z":"x")}}),o.polygon=function(t,e){return new o.Polygon(t,e)},function(){function t(t){return o.FeatureGroup.extend({initialize:function(t,e){this._layers={},this._options=e,this.setLatLngs(t)},setLatLngs:function(e){var n=0,i=e.length;for(this.eachLayer(function(t){i>n?t.setLatLngs(e[n++]):this.removeLayer(t)},this);i>n;)this.addLayer(new t(e[n++],this._options));return this},getLatLngs:function(){var t=[];return this.eachLayer(function(e){t.push(e.getLatLngs())}),t}})}o.MultiPolyline=t(o.Polyline),o.MultiPolygon=t(o.Polygon),o.multiPolyline=function(t,e){return new o.MultiPolyline(t,e)},o.multiPolygon=function(t,e){return new o.MultiPolygon(t,e)}}(),o.Rectangle=o.Polygon.extend({initialize:function(t,e){o.Polygon.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return t=o.latLngBounds(t),[t.getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}}),o.rectangle=function(t,e){return new o.Rectangle(t,e)},o.Circle=o.Path.extend({initialize:function(t,e,n){o.Path.prototype.initialize.call(this,n),this._latlng=o.latLng(t),this._mRadius=e},options:{fill:!0},setLatLng:function(t){return this._latlng=o.latLng(t),this.redraw()},setRadius:function(t){return this._mRadius=t,this.redraw()},projectLatlngs:function(){var t=this._getLngRadius(),e=this._latlng,n=this._map.latLngToLayerPoint([e.lat,e.lng-t]);this._point=this._map.latLngToLayerPoint(e),this._radius=Math.max(this._point.x-n.x,1)},getBounds:function(){var t=this._getLngRadius(),e=this._mRadius/40075017*360,n=this._latlng;return new o.LatLngBounds([n.lat-e,n.lng-t],[n.lat+e,n.lng+t])},getLatLng:function(){return this._latlng},getPathString:function(){var t=this._point,e=this._radius;return this._checkIfEmpty()?"":o.Browser.svg?"M"+t.x+","+(t.y-e)+"A"+e+","+e+",0,1,1,"+(t.x-.1)+","+(t.y-e)+" z":(t._round(),e=Math.round(e),"AL "+t.x+","+t.y+" "+e+","+e+" 0,23592600")},getRadius:function(){return this._mRadius},_getLatRadius:function(){return this._mRadius/40075017*360},_getLngRadius:function(){return this._getLatRadius()/Math.cos(o.LatLng.DEG_TO_RAD*this._latlng.lat)},_checkIfEmpty:function(){if(!this._map)return!1;var t=this._map._pathViewport,e=this._radius,n=this._point;return n.x-e>t.max.x||n.y-e>t.max.y||n.x+en;n++)for(u=this._parts[n],i=0,a=u.length,r=a-1;a>i;r=i++)if((e||0!==i)&&(l=o.LineUtil.pointToSegmentDistance(t,u[r],u[i]),c>=l))return!0;return!1}}:{}),o.Polygon.include(o.Path.CANVAS?{_containsPoint:function(t){var e,n,i,r,s,a,l,u,c=!1;if(o.Polyline.prototype._containsPoint.call(this,t,!0))return!0;for(r=0,l=this._parts.length;l>r;r++)for(e=this._parts[r],s=0,u=e.length,a=u-1;u>s;a=s++)n=e[s],i=e[a],n.y>t.y!=i.y>t.y&&t.x<(i.x-n.x)*(t.y-n.y)/(i.y-n.y)+n.x&&(c=!c);return c}}:{}),o.Circle.include(o.Path.CANVAS?{_drawPath:function(){var t=this._point;this._ctx.beginPath(),this._ctx.arc(t.x,t.y,this._radius,0,2*Math.PI,!1)},_containsPoint:function(t){var e=this._point,n=this.options.stroke?this.options.weight/2:0;return t.distanceTo(e)<=this._radius+n}}:{}),o.CircleMarker.include(o.Path.CANVAS?{_updateStyle:function(){o.Path.prototype._updateStyle.call(this)}}:{}),o.GeoJSON=o.FeatureGroup.extend({initialize:function(t,e){o.setOptions(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,n,i,r=o.Util.isArray(t)?t:t.features;if(r){for(e=0,n=r.length;n>e;e++)i=r[e],(i.geometries||i.geometry||i.features||i.coordinates)&&this.addData(r[e]);return this}var s=this.options;if(!s.filter||s.filter(t)){var a=o.GeoJSON.geometryToLayer(t,s.pointToLayer,s.coordsToLatLng,s);return a.feature=o.GeoJSON.asFeature(t),a.defaultOptions=a.options,this.resetStyle(a),s.onEachFeature&&s.onEachFeature(t,a),this.addLayer(a)}},resetStyle:function(t){var e=this.options.style;e&&(o.Util.extend(t.options,t.defaultOptions),this._setLayerStyle(t,e))},setStyle:function(t){this.eachLayer(function(e){this._setLayerStyle(e,t)},this)},_setLayerStyle:function(t,e){"function"==typeof e&&(e=e(t.feature)),t.setStyle&&t.setStyle(e)}}),o.extend(o.GeoJSON,{geometryToLayer:function(t,e,n,i){var r,s,a,l,u="Feature"===t.type?t.geometry:t,c=u.coordinates,h=[];switch(n=n||this.coordsToLatLng,u.type){case"Point":return r=n(c),e?e(t,r):new o.Marker(r);case"MultiPoint":for(a=0,l=c.length;l>a;a++)r=n(c[a]),h.push(e?e(t,r):new o.Marker(r));return new o.FeatureGroup(h);case"LineString":return s=this.coordsToLatLngs(c,0,n),new o.Polyline(s,i);case"Polygon":if(2===c.length&&!c[1].length)throw new Error("Invalid GeoJSON object.");return s=this.coordsToLatLngs(c,1,n),new o.Polygon(s,i);case"MultiLineString":return s=this.coordsToLatLngs(c,1,n),new o.MultiPolyline(s,i);case"MultiPolygon":return s=this.coordsToLatLngs(c,2,n),new o.MultiPolygon(s,i);case"GeometryCollection":for(a=0,l=u.geometries.length;l>a;a++)h.push(this.geometryToLayer({geometry:u.geometries[a],type:"Feature",properties:t.properties},e,n,i));return new o.FeatureGroup(h);default:throw new Error("Invalid GeoJSON object.")}},coordsToLatLng:function(t){return new o.LatLng(t[1],t[0],t[2])},coordsToLatLngs:function(t,e,n){var i,o,r,s=[];for(o=0,r=t.length;r>o;o++)i=e?this.coordsToLatLngs(t[o],e-1,n):(n||this.coordsToLatLng)(t[o]),s.push(i);return s},latLngToCoords:function(t){var e=[t.lng,t.lat];return t.alt!==n&&e.push(t.alt),e},latLngsToCoords:function(t){for(var e=[],n=0,i=t.length;i>n;n++)e.push(o.GeoJSON.latLngToCoords(t[n]));return e},getFeature:function(t,e){return t.feature?o.extend({},t.feature,{geometry:e}):o.GeoJSON.asFeature(e)},asFeature:function(t){return"Feature"===t.type?t:{type:"Feature",properties:{},geometry:t}}});var s={toGeoJSON:function(){return o.GeoJSON.getFeature(this,{type:"Point",coordinates:o.GeoJSON.latLngToCoords(this.getLatLng())})}};o.Marker.include(s),o.Circle.include(s),o.CircleMarker.include(s),o.Polyline.include({toGeoJSON:function(){return o.GeoJSON.getFeature(this,{type:"LineString",coordinates:o.GeoJSON.latLngsToCoords(this.getLatLngs())})}}),o.Polygon.include({toGeoJSON:function(){var t,e,n,i=[o.GeoJSON.latLngsToCoords(this.getLatLngs())];if(i[0].push(i[0][0]),this._holes)for(t=0,e=this._holes.length;e>t;t++)n=o.GeoJSON.latLngsToCoords(this._holes[t]),n.push(n[0]),i.push(n);return o.GeoJSON.getFeature(this,{type:"Polygon",coordinates:i})}}),function(){function t(t){return function(){var e=[];return this.eachLayer(function(t){e.push(t.toGeoJSON().geometry.coordinates)}),o.GeoJSON.getFeature(this,{type:t,coordinates:e})}}o.MultiPolyline.include({toGeoJSON:t("MultiLineString")}),o.MultiPolygon.include({toGeoJSON:t("MultiPolygon")}),o.LayerGroup.include({toGeoJSON:function(){var e,n=this.feature&&this.feature.geometry,i=[];if(n&&"MultiPoint"===n.type)return t("MultiPoint").call(this);var r=n&&"GeometryCollection"===n.type;return this.eachLayer(function(t){t.toGeoJSON&&(e=t.toGeoJSON(),i.push(r?e.geometry:o.GeoJSON.asFeature(e)))}),r?o.GeoJSON.getFeature(this,{geometries:i,type:"GeometryCollection"}):{type:"FeatureCollection",features:i}}})}(),o.geoJson=function(t,e){return new o.GeoJSON(t,e)},o.DomEvent={addListener:function(t,e,n,i){var r,s,a,l=o.stamp(n),u="_leaflet_"+e+l;return t[u]?this:(r=function(e){return n.call(i||t,e||o.DomEvent._getEvent())},o.Browser.pointer&&0===e.indexOf("touch")?this.addPointerListener(t,e,r,l):(o.Browser.touch&&"dblclick"===e&&this.addDoubleTapListener&&this.addDoubleTapListener(t,r,l),"addEventListener"in t?"mousewheel"===e?(t.addEventListener("DOMMouseScroll",r,!1),t.addEventListener(e,r,!1)):"mouseenter"===e||"mouseleave"===e?(s=r,a="mouseenter"===e?"mouseover":"mouseout",r=function(e){return o.DomEvent._checkMouse(t,e)?s(e):void 0},t.addEventListener(a,r,!1)):"click"===e&&o.Browser.android?(s=r,r=function(t){return o.DomEvent._filterClick(t,s)},t.addEventListener(e,r,!1)):t.addEventListener(e,r,!1):"attachEvent"in t&&t.attachEvent("on"+e,r),t[u]=r,this))},removeListener:function(t,e,n){var i=o.stamp(n),r="_leaflet_"+e+i,s=t[r];return s?(o.Browser.pointer&&0===e.indexOf("touch")?this.removePointerListener(t,e,i):o.Browser.touch&&"dblclick"===e&&this.removeDoubleTapListener?this.removeDoubleTapListener(t,i):"removeEventListener"in t?"mousewheel"===e?(t.removeEventListener("DOMMouseScroll",s,!1),t.removeEventListener(e,s,!1)):"mouseenter"===e||"mouseleave"===e?t.removeEventListener("mouseenter"===e?"mouseover":"mouseout",s,!1):t.removeEventListener(e,s,!1):"detachEvent"in t&&t.detachEvent("on"+e,s),t[r]=null,this):this},stopPropagation:function(t){return t.stopPropagation?t.stopPropagation():t.cancelBubble=!0,o.DomEvent._skipped(t),this},disableScrollPropagation:function(t){var e=o.DomEvent.stopPropagation;return o.DomEvent.on(t,"mousewheel",e).on(t,"MozMousePixelScroll",e)},disableClickPropagation:function(t){for(var e=o.DomEvent.stopPropagation,n=o.Draggable.START.length-1;n>=0;n--)o.DomEvent.on(t,o.Draggable.START[n],e);return o.DomEvent.on(t,"click",o.DomEvent._fakeStop).on(t,"dblclick",e)},preventDefault:function(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this},stop:function(t){return o.DomEvent.preventDefault(t).stopPropagation(t)},getMousePosition:function(t,e){if(!e)return new o.Point(t.clientX,t.clientY);var n=e.getBoundingClientRect();return new o.Point(t.clientX-n.left-e.clientLeft,t.clientY-n.top-e.clientTop)},getWheelDelta:function(t){var e=0;return t.wheelDelta&&(e=t.wheelDelta/120),t.detail&&(e=-t.detail/3),e},_skipEvents:{},_fakeStop:function(t){o.DomEvent._skipEvents[t.type]=!0},_skipped:function(t){var e=this._skipEvents[t.type];return this._skipEvents[t.type]=!1,e},_checkMouse:function(t,e){var n=e.relatedTarget;if(!n)return!0;try{for(;n&&n!==t;)n=n.parentNode}catch(i){return!1}return n!==t},_getEvent:function(){var e=t.event;if(!e)for(var n=arguments.callee.caller;n&&(e=n.arguments[0],!e||t.Event!==e.constructor);)n=n.caller;return e},_filterClick:function(t,e){var n=t.timeStamp||t.originalEvent.timeStamp,i=o.DomEvent._lastClick&&n-o.DomEvent._lastClick;return i&&i>100&&500>i||t.target._simulatedClick&&!t._simulated?void o.DomEvent.stop(t):(o.DomEvent._lastClick=n,e(t))}},o.DomEvent.on=o.DomEvent.addListener,o.DomEvent.off=o.DomEvent.removeListener,o.Draggable=o.Class.extend({includes:o.Mixin.Events,statics:{START:o.Browser.touch?["touchstart","mousedown"]:["mousedown"],END:{mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},MOVE:{mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"}},initialize:function(t,e){this._element=t,this._dragStartTarget=e||t},enable:function(){if(!this._enabled){for(var t=o.Draggable.START.length-1;t>=0;t--)o.DomEvent.on(this._dragStartTarget,o.Draggable.START[t],this._onDown,this);this._enabled=!0}},disable:function(){if(this._enabled){for(var t=o.Draggable.START.length-1;t>=0;t--)o.DomEvent.off(this._dragStartTarget,o.Draggable.START[t],this._onDown,this);this._enabled=!1,this._moved=!1}},_onDown:function(t){if(this._moved=!1,!t.shiftKey&&(1===t.which||1===t.button||t.touches)&&(o.DomEvent.stopPropagation(t),!o.Draggable._disabled&&(o.DomUtil.disableImageDrag(),o.DomUtil.disableTextSelection(),!this._moving))){var n=t.touches?t.touches[0]:t;this._startPoint=new o.Point(n.clientX,n.clientY),this._startPos=this._newPos=o.DomUtil.getPosition(this._element),o.DomEvent.on(e,o.Draggable.MOVE[t.type],this._onMove,this).on(e,o.Draggable.END[t.type],this._onUp,this)}},_onMove:function(t){if(t.touches&&t.touches.length>1)return void(this._moved=!0);var n=t.touches&&1===t.touches.length?t.touches[0]:t,i=new o.Point(n.clientX,n.clientY),r=i.subtract(this._startPoint);(r.x||r.y)&&(o.Browser.touch&&Math.abs(r.x)+Math.abs(r.y)<3||(o.DomEvent.preventDefault(t),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=o.DomUtil.getPosition(this._element).subtract(r),o.DomUtil.addClass(e.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,o.DomUtil.addClass(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(r),this._moving=!0,o.Util.cancelAnimFrame(this._animRequest),this._animRequest=o.Util.requestAnimFrame(this._updatePosition,this,!0,this._dragStartTarget)))},_updatePosition:function(){this.fire("predrag"),o.DomUtil.setPosition(this._element,this._newPos),this.fire("drag")},_onUp:function(){o.DomUtil.removeClass(e.body,"leaflet-dragging"),this._lastTarget&&(o.DomUtil.removeClass(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null);for(var t in o.Draggable.MOVE)o.DomEvent.off(e,o.Draggable.MOVE[t],this._onMove).off(e,o.Draggable.END[t],this._onUp);o.DomUtil.enableImageDrag(),o.DomUtil.enableTextSelection(),this._moved&&this._moving&&(o.Util.cancelAnimFrame(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1}}),o.Handler=o.Class.extend({initialize:function(t){this._map=t},enable:function(){this._enabled||(this._enabled=!0,this.addHooks())},disable:function(){this._enabled&&(this._enabled=!1,this.removeHooks())},enabled:function(){return!!this._enabled}}),o.Map.mergeOptions({dragging:!0,inertia:!o.Browser.android23,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,inertiaThreshold:o.Browser.touch?32:18,easeLinearity:.25,worldCopyJump:!1}),o.Map.Drag=o.Handler.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new o.Draggable(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDrag,this),t.on("viewreset",this._onViewReset,this),t.whenReady(this._onViewReset,this))}this._draggable.enable()},removeHooks:function(){this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},_onDragStart:function(){var t=this._map;t._panAnim&&t._panAnim.stop(),t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(){if(this._map.options.inertia){var t=this._lastTime=+new Date,e=this._lastPos=this._draggable._newPos;this._positions.push(e),this._times.push(t),t-this._times[0]>200&&(this._positions.shift(),this._times.shift())}this._map.fire("move").fire("drag")},_onViewReset:function(){var t=this._map.getSize()._divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.project([0,180]).x},_onPreDrag:function(){var t=this._worldWidth,e=Math.round(t/2),n=this._initialWorldOffset,i=this._draggable._newPos.x,o=(i-e+n)%t+e-n,r=(i+e+n)%t-e-n,s=Math.abs(o+n)n.inertiaThreshold||!this._positions[0];if(e.fire("dragend",t),r)e.fire("moveend");else{var s=this._lastPos.subtract(this._positions[0]),a=(this._lastTime+i-this._times[0])/1e3,l=n.easeLinearity,u=s.multiplyBy(l/a),c=u.distanceTo([0,0]),h=Math.min(n.inertiaMaxSpeed,c),p=u.multiplyBy(h/c),d=h/(n.inertiaDeceleration*l),f=p.multiplyBy(-d/2).round();f.x&&f.y?(f=e._limitOffset(f,e.options.maxBounds),o.Util.requestAnimFrame(function(){e.panBy(f,{duration:d,easeLinearity:l,noMoveStart:!0})})):e.fire("moveend")}}}),o.Map.addInitHook("addHandler","dragging",o.Map.Drag),o.Map.mergeOptions({doubleClickZoom:!0}),o.Map.DoubleClickZoom=o.Handler.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,n=e.getZoom()+(t.originalEvent.shiftKey?-1:1);"center"===e.options.doubleClickZoom?e.setZoom(n):e.setZoomAround(t.containerPoint,n)}}),o.Map.addInitHook("addHandler","doubleClickZoom",o.Map.DoubleClickZoom),o.Map.mergeOptions({scrollWheelZoom:!0}),o.Map.ScrollWheelZoom=o.Handler.extend({addHooks:function(){o.DomEvent.on(this._map._container,"mousewheel",this._onWheelScroll,this),o.DomEvent.on(this._map._container,"MozMousePixelScroll",o.DomEvent.preventDefault),this._delta=0},removeHooks:function(){o.DomEvent.off(this._map._container,"mousewheel",this._onWheelScroll),o.DomEvent.off(this._map._container,"MozMousePixelScroll",o.DomEvent.preventDefault)},_onWheelScroll:function(t){var e=o.DomEvent.getWheelDelta(t);this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var n=Math.max(40-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(o.bind(this._performZoom,this),n),o.DomEvent.preventDefault(t),o.DomEvent.stopPropagation(t)},_performZoom:function(){var t=this._map,e=this._delta,n=t.getZoom();e=e>0?Math.ceil(e):Math.floor(e),e=Math.max(Math.min(e,4),-4),e=t._limitZoom(n+e)-n,this._delta=0,this._startTime=null,e&&("center"===t.options.scrollWheelZoom?t.setZoom(n+e):t.setZoomAround(this._lastMousePos,n+e))}}),o.Map.addInitHook("addHandler","scrollWheelZoom",o.Map.ScrollWheelZoom),o.extend(o.DomEvent,{_touchstart:o.Browser.msPointer?"MSPointerDown":o.Browser.pointer?"pointerdown":"touchstart",_touchend:o.Browser.msPointer?"MSPointerUp":o.Browser.pointer?"pointerup":"touchend",addDoubleTapListener:function(t,n,i){function r(t){var e;if(o.Browser.pointer?(f.push(t.pointerId),e=f.length):e=t.touches.length,!(e>1)){var n=Date.now(),i=n-(a||n);l=t.touches?t.touches[0]:t,u=i>0&&c>=i,a=n}}function s(t){if(o.Browser.pointer){var e=f.indexOf(t.pointerId);if(-1===e)return;f.splice(e,1)}if(u){if(o.Browser.pointer){var i,r={};for(var s in l)i=l[s],"function"==typeof i?r[s]=i.bind(l):r[s]=i;l=r}l.type="dblclick",n(l),a=null}}var a,l,u=!1,c=250,h="_leaflet_",p=this._touchstart,d=this._touchend,f=[];t[h+p+i]=r,t[h+d+i]=s;var m=o.Browser.pointer?e.documentElement:t;return t.addEventListener(p,r,!1),m.addEventListener(d,s,!1),o.Browser.pointer&&m.addEventListener(o.DomEvent.POINTER_CANCEL,s,!1),this},removeDoubleTapListener:function(t,n){var i="_leaflet_";return t.removeEventListener(this._touchstart,t[i+this._touchstart+n],!1),(o.Browser.pointer?e.documentElement:t).removeEventListener(this._touchend,t[i+this._touchend+n],!1),o.Browser.pointer&&e.documentElement.removeEventListener(o.DomEvent.POINTER_CANCEL,t[i+this._touchend+n],!1),this}}),o.extend(o.DomEvent,{POINTER_DOWN:o.Browser.msPointer?"MSPointerDown":"pointerdown",POINTER_MOVE:o.Browser.msPointer?"MSPointerMove":"pointermove",POINTER_UP:o.Browser.msPointer?"MSPointerUp":"pointerup",POINTER_CANCEL:o.Browser.msPointer?"MSPointerCancel":"pointercancel",_pointers:[],_pointerDocumentListener:!1,addPointerListener:function(t,e,n,i){switch(e){case"touchstart":return this.addPointerListenerStart(t,e,n,i);case"touchend":return this.addPointerListenerEnd(t,e,n,i);case"touchmove":return this.addPointerListenerMove(t,e,n,i);default:throw"Unknown touch event type"}},addPointerListenerStart:function(t,n,i,r){var s="_leaflet_",a=this._pointers,l=function(t){"mouse"!==t.pointerType&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE&&o.DomEvent.preventDefault(t);for(var e=!1,n=0;n1))&&(this._moved||(o.DomUtil.addClass(e._mapPane,"leaflet-touching"),e.fire("movestart").fire("zoomstart"),this._moved=!0),o.Util.cancelAnimFrame(this._animRequest),this._animRequest=o.Util.requestAnimFrame(this._updateOnMove,this,!0,this._map._container),o.DomEvent.preventDefault(t))}},_updateOnMove:function(){var t=this._map,e=this._getScaleOrigin(),n=t.layerPointToLatLng(e),i=t.getScaleZoom(this._scale);t._animateZoom(n,i,this._startCenter,this._scale,this._delta,!1,!0)},_onTouchEnd:function(){if(!this._moved||!this._zooming)return void(this._zooming=!1);var t=this._map;this._zooming=!1,o.DomUtil.removeClass(t._mapPane,"leaflet-touching"),o.Util.cancelAnimFrame(this._animRequest),o.DomEvent.off(e,"touchmove",this._onTouchMove).off(e,"touchend",this._onTouchEnd);var n=this._getScaleOrigin(),i=t.layerPointToLatLng(n),r=t.getZoom(),s=t.getScaleZoom(this._scale)-r,a=s>0?Math.ceil(s):Math.floor(s),l=t._limitZoom(r+a),u=t.getZoomScale(l)/this._scale;t._animateZoom(i,l,n,u)},_getScaleOrigin:function(){var t=this._centerOffset.subtract(this._delta).divideBy(this._scale);return this._startCenter.add(t)}}),o.Map.addInitHook("addHandler","touchZoom",o.Map.TouchZoom),o.Map.mergeOptions({tap:!0,tapTolerance:15}),o.Map.Tap=o.Handler.extend({addHooks:function(){o.DomEvent.on(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){o.DomEvent.off(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(o.DomEvent.preventDefault(t),this._fireClick=!0,t.touches.length>1)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var n=t.touches[0],i=n.target;this._startPos=this._newPos=new o.Point(n.clientX,n.clientY),i.tagName&&"a"===i.tagName.toLowerCase()&&o.DomUtil.addClass(i,"leaflet-active"),this._holdTimeout=setTimeout(o.bind(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",n))},this),1e3),o.DomEvent.on(e,"touchmove",this._onMove,this).on(e,"touchend",this._onUp,this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),o.DomEvent.off(e,"touchmove",this._onMove,this).off(e,"touchend",this._onUp,this),this._fireClick&&t&&t.changedTouches){var n=t.changedTouches[0],i=n.target;i&&i.tagName&&"a"===i.tagName.toLowerCase()&&o.DomUtil.removeClass(i,"leaflet-active"),this._isTapValid()&&this._simulateEvent("click",n)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var e=t.touches[0];this._newPos=new o.Point(e.clientX,e.clientY)},_simulateEvent:function(n,i){var o=e.createEvent("MouseEvents");o._simulated=!0,i.target._simulatedClick=!0,o.initMouseEvent(n,!0,!0,t,1,i.screenX,i.screenY,i.clientX,i.clientY,!1,!1,!1,!1,0,null),i.target.dispatchEvent(o)}}),o.Browser.touch&&!o.Browser.pointer&&o.Map.addInitHook("addHandler","tap",o.Map.Tap),o.Map.mergeOptions({boxZoom:!0}),o.Map.BoxZoom=o.Handler.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._moved=!1},addHooks:function(){o.DomEvent.on(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){o.DomEvent.off(this._container,"mousedown",this._onMouseDown),this._moved=!1},moved:function(){return this._moved},_onMouseDown:function(t){return this._moved=!1,!t.shiftKey||1!==t.which&&1!==t.button?!1:(o.DomUtil.disableTextSelection(),o.DomUtil.disableImageDrag(),this._startLayerPoint=this._map.mouseEventToLayerPoint(t),void o.DomEvent.on(e,"mousemove",this._onMouseMove,this).on(e,"mouseup",this._onMouseUp,this).on(e,"keydown",this._onKeyDown,this))},_onMouseMove:function(t){this._moved||(this._box=o.DomUtil.create("div","leaflet-zoom-box",this._pane),o.DomUtil.setPosition(this._box,this._startLayerPoint),this._container.style.cursor="crosshair",this._map.fire("boxzoomstart"));var e=this._startLayerPoint,n=this._box,i=this._map.mouseEventToLayerPoint(t),r=i.subtract(e),s=new o.Point(Math.min(i.x,e.x),Math.min(i.y,e.y));o.DomUtil.setPosition(n,s),this._moved=!0,n.style.width=Math.max(0,Math.abs(r.x)-4)+"px",n.style.height=Math.max(0,Math.abs(r.y)-4)+"px"},_finish:function(){this._moved&&(this._pane.removeChild(this._box),this._container.style.cursor=""),o.DomUtil.enableTextSelection(),o.DomUtil.enableImageDrag(),o.DomEvent.off(e,"mousemove",this._onMouseMove).off(e,"mouseup",this._onMouseUp).off(e,"keydown",this._onKeyDown)},_onMouseUp:function(t){this._finish();var e=this._map,n=e.mouseEventToLayerPoint(t);if(!this._startLayerPoint.equals(n)){var i=new o.LatLngBounds(e.layerPointToLatLng(this._startLayerPoint),e.layerPointToLatLng(n));e.fitBounds(i),e.fire("boxzoomend",{boxZoomBounds:i})}},_onKeyDown:function(t){27===t.keyCode&&this._finish()}}),o.Map.addInitHook("addHandler","boxZoom",o.Map.BoxZoom),o.Map.mergeOptions({keyboard:!0,keyboardPanOffset:80,keyboardZoomOffset:1}),o.Map.Keyboard=o.Handler.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,173]},initialize:function(t){this._map=t,this._setPanOffset(t.options.keyboardPanOffset),this._setZoomOffset(t.options.keyboardZoomOffset)},addHooks:function(){var t=this._map._container;-1===t.tabIndex&&(t.tabIndex="0"),o.DomEvent.on(t,"focus",this._onFocus,this).on(t,"blur",this._onBlur,this).on(t,"mousedown",this._onMouseDown,this),this._map.on("focus",this._addHooks,this).on("blur",this._removeHooks,this)},removeHooks:function(){this._removeHooks();var t=this._map._container;o.DomEvent.off(t,"focus",this._onFocus,this).off(t,"blur",this._onBlur,this).off(t,"mousedown",this._onMouseDown,this),this._map.off("focus",this._addHooks,this).off("blur",this._removeHooks,this)},_onMouseDown:function(){if(!this._focused){var n=e.body,i=e.documentElement,o=n.scrollTop||i.scrollTop,r=n.scrollLeft||i.scrollLeft;this._map._container.focus(),t.scrollTo(r,o)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanOffset:function(t){var e,n,i=this._panKeys={},o=this.keyCodes;for(e=0,n=o.left.length;n>e;e++)i[o.left[e]]=[-1*t,0];for(e=0,n=o.right.length;n>e;e++)i[o.right[e]]=[t,0];for(e=0,n=o.down.length;n>e;e++)i[o.down[e]]=[0,t];for(e=0,n=o.up.length;n>e;e++)i[o.up[e]]=[0,-1*t]},_setZoomOffset:function(t){var e,n,i=this._zoomKeys={},o=this.keyCodes;for(e=0,n=o.zoomIn.length;n>e;e++)i[o.zoomIn[e]]=t;for(e=0,n=o.zoomOut.length;n>e;e++)i[o.zoomOut[e]]=-t; -},_addHooks:function(){o.DomEvent.on(e,"keydown",this._onKeyDown,this)},_removeHooks:function(){o.DomEvent.off(e,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){var e=t.keyCode,n=this._map;if(e in this._panKeys){if(n._panAnim&&n._panAnim._inProgress)return;n.panBy(this._panKeys[e]),n.options.maxBounds&&n.panInsideBounds(n.options.maxBounds)}else{if(!(e in this._zoomKeys))return;n.setZoom(n.getZoom()+this._zoomKeys[e])}o.DomEvent.stop(t)}}),o.Map.addInitHook("addHandler","keyboard",o.Map.Keyboard),o.Handler.MarkerDrag=o.Handler.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new o.Draggable(t,t)),this._draggable.on("dragstart",this._onDragStart,this).on("drag",this._onDrag,this).on("dragend",this._onDragEnd,this),this._draggable.enable(),o.DomUtil.addClass(this._marker._icon,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off("dragstart",this._onDragStart,this).off("drag",this._onDrag,this).off("dragend",this._onDragEnd,this),this._draggable.disable(),o.DomUtil.removeClass(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_onDragStart:function(){this._marker.closePopup().fire("movestart").fire("dragstart")},_onDrag:function(){var t=this._marker,e=t._shadow,n=o.DomUtil.getPosition(t._icon),i=t._map.layerPointToLatLng(n);e&&o.DomUtil.setPosition(e,n),t._latlng=i,t.fire("move",{latlng:i}).fire("drag")},_onDragEnd:function(t){this._marker.fire("moveend").fire("dragend",t)}}),o.Control=o.Class.extend({options:{position:"topright"},initialize:function(t){o.setOptions(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this._map=t;var e=this._container=this.onAdd(t),n=this.getPosition(),i=t._controlCorners[n];return o.DomUtil.addClass(e,"leaflet-control"),-1!==n.indexOf("bottom")?i.insertBefore(e,i.firstChild):i.appendChild(e),this},removeFrom:function(t){var e=this.getPosition(),n=t._controlCorners[e];return n.removeChild(this._container),this._map=null,this.onRemove&&this.onRemove(t),this},_refocusOnMap:function(){this._map&&this._map.getContainer().focus()}}),o.control=function(t){return new o.Control(t)},o.Map.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.removeFrom(this),this},_initControlPos:function(){function t(t,r){var s=n+t+" "+n+r;e[t+r]=o.DomUtil.create("div",s,i)}var e=this._controlCorners={},n="leaflet-",i=this._controlContainer=o.DomUtil.create("div",n+"control-container",this._container);t("top","left"),t("top","right"),t("bottom","left"),t("bottom","right")},_clearControlPos:function(){this._container.removeChild(this._controlContainer)}}),o.Control.Zoom=o.Control.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"-",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",n=o.DomUtil.create("div",e+" leaflet-bar");return this._map=t,this._zoomInButton=this._createButton(this.options.zoomInText,this.options.zoomInTitle,e+"-in",n,this._zoomIn,this),this._zoomOutButton=this._createButton(this.options.zoomOutText,this.options.zoomOutTitle,e+"-out",n,this._zoomOut,this),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),n},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},_zoomIn:function(t){this._map.zoomIn(t.shiftKey?3:1)},_zoomOut:function(t){this._map.zoomOut(t.shiftKey?3:1)},_createButton:function(t,e,n,i,r,s){var a=o.DomUtil.create("a",n,i);a.innerHTML=t,a.href="#",a.title=e;var l=o.DomEvent.stopPropagation;return o.DomEvent.on(a,"click",l).on(a,"mousedown",l).on(a,"dblclick",l).on(a,"click",o.DomEvent.preventDefault).on(a,"click",r,s).on(a,"click",this._refocusOnMap,s),a},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";o.DomUtil.removeClass(this._zoomInButton,e),o.DomUtil.removeClass(this._zoomOutButton,e),t._zoom===t.getMinZoom()&&o.DomUtil.addClass(this._zoomOutButton,e),t._zoom===t.getMaxZoom()&&o.DomUtil.addClass(this._zoomInButton,e)}}),o.Map.mergeOptions({zoomControl:!0}),o.Map.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new o.Control.Zoom,this.addControl(this.zoomControl))}),o.control.zoom=function(t){return new o.Control.Zoom(t)},o.Control.Attribution=o.Control.extend({options:{position:"bottomright",prefix:'Leaflet'},initialize:function(t){o.setOptions(this,t),this._attributions={}},onAdd:function(t){this._container=o.DomUtil.create("div","leaflet-control-attribution"),o.DomEvent.disableClickPropagation(this._container);for(var e in t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return t.on("layeradd",this._onLayerAdd,this).on("layerremove",this._onLayerRemove,this),this._update(),this._container},onRemove:function(t){t.off("layeradd",this._onLayerAdd).off("layerremove",this._onLayerRemove)},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):void 0},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):void 0},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var n=[];this.options.prefix&&n.push(this.options.prefix),t.length&&n.push(t.join(", ")),this._container.innerHTML=n.join(" | ")}},_onLayerAdd:function(t){t.layer.getAttribution&&this.addAttribution(t.layer.getAttribution())},_onLayerRemove:function(t){t.layer.getAttribution&&this.removeAttribution(t.layer.getAttribution())}}),o.Map.mergeOptions({attributionControl:!0}),o.Map.addInitHook(function(){this.options.attributionControl&&(this.attributionControl=(new o.Control.Attribution).addTo(this))}),o.control.attribution=function(t){return new o.Control.Attribution(t)},o.Control.Scale=o.Control.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0,updateWhenIdle:!1},onAdd:function(t){this._map=t;var e="leaflet-control-scale",n=o.DomUtil.create("div",e),i=this.options;return this._addScales(i,e,n),t.on(i.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),n},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,n){t.metric&&(this._mScale=o.DomUtil.create("div",e+"-line",n)),t.imperial&&(this._iScale=o.DomUtil.create("div",e+"-line",n))},_update:function(){var t=this._map.getBounds(),e=t.getCenter().lat,n=6378137*Math.PI*Math.cos(e*Math.PI/180),i=n*(t.getNorthEast().lng-t.getSouthWest().lng)/180,o=this._map.getSize(),r=this.options,s=0;o.x>0&&(s=i*(r.maxWidth/o.x)),this._updateScales(r,s)},_updateScales:function(t,e){t.metric&&e&&this._updateMetric(e),t.imperial&&e&&this._updateImperial(e)},_updateMetric:function(t){var e=this._getRoundNum(t);this._mScale.style.width=this._getScaleWidth(e/t)+"px",this._mScale.innerHTML=1e3>e?e+" m":e/1e3+" km"},_updateImperial:function(t){var e,n,i,o=3.2808399*t,r=this._iScale;o>5280?(e=o/5280,n=this._getRoundNum(e),r.style.width=this._getScaleWidth(n/e)+"px",r.innerHTML=n+" mi"):(i=this._getRoundNum(o),r.style.width=this._getScaleWidth(i/o)+"px",r.innerHTML=i+" ft")},_getScaleWidth:function(t){return Math.round(this.options.maxWidth*t)-10},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),n=t/e;return n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:1,e*n}}),o.control.scale=function(t){return new o.Control.Scale(t)},o.Control.Layers=o.Control.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0},initialize:function(t,e,n){o.setOptions(this,n),this._layers={},this._lastZIndex=0,this._handlingClick=!1;for(var i in t)this._addLayer(t[i],i);for(i in e)this._addLayer(e[i],i,!0)},onAdd:function(t){return this._initLayout(),this._update(),t.on("layeradd",this._onLayerChange,this).on("layerremove",this._onLayerChange,this),this._container},onRemove:function(t){t.off("layeradd",this._onLayerChange,this).off("layerremove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._update(),this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._update(),this},removeLayer:function(t){var e=o.stamp(t);return delete this._layers[e],this._update(),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=o.DomUtil.create("div",t);e.setAttribute("aria-haspopup",!0),o.Browser.touch?o.DomEvent.on(e,"click",o.DomEvent.stopPropagation):o.DomEvent.disableClickPropagation(e).disableScrollPropagation(e);var n=this._form=o.DomUtil.create("form",t+"-list");if(this.options.collapsed){o.Browser.android||o.DomEvent.on(e,"mouseover",this._expand,this).on(e,"mouseout",this._collapse,this);var i=this._layersLink=o.DomUtil.create("a",t+"-toggle",e);i.href="#",i.title="Layers",o.Browser.touch?o.DomEvent.on(i,"click",o.DomEvent.stop).on(i,"click",this._expand,this):o.DomEvent.on(i,"focus",this._expand,this),o.DomEvent.on(n,"click",function(){setTimeout(o.bind(this._onInputClick,this),0)},this),this._map.on("click",this._collapse,this)}else this._expand();this._baseLayersList=o.DomUtil.create("div",t+"-base",n),this._separator=o.DomUtil.create("div",t+"-separator",n),this._overlaysList=o.DomUtil.create("div",t+"-overlays",n),e.appendChild(n)},_addLayer:function(t,e,n){var i=o.stamp(t);this._layers[i]={layer:t,name:e,overlay:n},this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex))},_update:function(){if(this._container){this._baseLayersList.innerHTML="",this._overlaysList.innerHTML="";var t,e,n=!1,i=!1;for(t in this._layers)e=this._layers[t],this._addItem(e),i=i||e.overlay,n=n||!e.overlay;this._separator.style.display=i&&n?"":"none"}},_onLayerChange:function(t){var e=this._layers[o.stamp(t.layer)];if(e){this._handlingClick||this._update();var n=e.overlay?"layeradd"===t.type?"overlayadd":"overlayremove":"layeradd"===t.type?"baselayerchange":null;n&&this._map.fire(n,e)}},_createRadioElement:function(t,n){var i='t;t++)e=i[t],n=this._layers[e.layerId],e.checked&&!this._map.hasLayer(n.layer)?this._map.addLayer(n.layer):!e.checked&&this._map.hasLayer(n.layer)&&this._map.removeLayer(n.layer);this._handlingClick=!1,this._refocusOnMap()},_expand:function(){o.DomUtil.addClass(this._container,"leaflet-control-layers-expanded")},_collapse:function(){this._container.className=this._container.className.replace(" leaflet-control-layers-expanded","")}}),o.control.layers=function(t,e,n){return new o.Control.Layers(t,e,n)},o.PosAnimation=o.Class.extend({includes:o.Mixin.Events,run:function(t,e,n,i){this.stop(),this._el=t,this._inProgress=!0,this._newPos=e,this.fire("start"),t.style[o.DomUtil.TRANSITION]="all "+(n||.25)+"s cubic-bezier(0,0,"+(i||.5)+",1)",o.DomEvent.on(t,o.DomUtil.TRANSITION_END,this._onTransitionEnd,this),o.DomUtil.setPosition(t,e),o.Util.falseFn(t.offsetWidth),this._stepTimer=setInterval(o.bind(this._onStep,this),50)},stop:function(){this._inProgress&&(o.DomUtil.setPosition(this._el,this._getPos()),this._onTransitionEnd(),o.Util.falseFn(this._el.offsetWidth))},_onStep:function(){var t=this._getPos();return t?(this._el._leaflet_pos=t,void this.fire("step")):void this._onTransitionEnd()},_transformRe:/([-+]?(?:\d*\.)?\d+)\D*, ([-+]?(?:\d*\.)?\d+)\D*\)/,_getPos:function(){var e,n,i,r=this._el,s=t.getComputedStyle(r);if(o.Browser.any3d){if(i=s[o.DomUtil.TRANSFORM].match(this._transformRe),!i)return;e=parseFloat(i[1]),n=parseFloat(i[2])}else e=parseFloat(s.left),n=parseFloat(s.top);return new o.Point(e,n,!0)},_onTransitionEnd:function(){o.DomEvent.off(this._el,o.DomUtil.TRANSITION_END,this._onTransitionEnd,this),this._inProgress&&(this._inProgress=!1,this._el.style[o.DomUtil.TRANSITION]="",this._el._leaflet_pos=this._newPos,clearInterval(this._stepTimer),this.fire("step").fire("end"))}}),o.Map.include({setView:function(t,e,i){if(e=e===n?this._zoom:this._limitZoom(e),t=this._limitCenter(o.latLng(t),e,this.options.maxBounds),i=i||{},this._panAnim&&this._panAnim.stop(),this._loaded&&!i.reset&&i!==!0){i.animate!==n&&(i.zoom=o.extend({animate:i.animate},i.zoom),i.pan=o.extend({animate:i.animate},i.pan));var r=this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,i.zoom):this._tryAnimatedPan(t,i.pan);if(r)return clearTimeout(this._sizeTimer),this}return this._resetView(t,e),this},panBy:function(t,e){if(t=o.point(t).round(),e=e||{},!t.x&&!t.y)return this;if(this._panAnim||(this._panAnim=new o.PosAnimation,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),e.animate!==!1){o.DomUtil.addClass(this._mapPane,"leaflet-pan-anim");var n=this._getMapPanePos().subtract(t);this._panAnim.run(this._mapPane,n,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){o.DomUtil.removeClass(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var n=this._getCenterOffset(t)._floor();return(e&&e.animate)===!0||this.getSize().contains(n)?(this.panBy(n,e),!0):!1}}),o.PosAnimation=o.DomUtil.TRANSITION?o.PosAnimation:o.PosAnimation.extend({run:function(t,e,n,i){this.stop(),this._el=t,this._inProgress=!0,this._duration=n||.25,this._easeOutPower=1/Math.max(i||.5,.2),this._startPos=o.DomUtil.getPosition(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(),this._complete())},_animate:function(){this._animId=o.Util.requestAnimFrame(this._animate,this),this._step()},_step:function(){var t=+new Date-this._startTime,e=1e3*this._duration;e>t?this._runFrame(this._easeOut(t/e)):(this._runFrame(1),this._complete())},_runFrame:function(t){var e=this._startPos.add(this._offset.multiplyBy(t));o.DomUtil.setPosition(this._el,e),this.fire("step")},_complete:function(){o.Util.cancelAnimFrame(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),o.Map.mergeOptions({zoomAnimation:!0,zoomAnimationThreshold:4}),o.DomUtil.TRANSITION&&o.Map.addInitHook(function(){this._zoomAnimated=this.options.zoomAnimation&&o.DomUtil.TRANSITION&&o.Browser.any3d&&!o.Browser.android23&&!o.Browser.mobileOpera,this._zoomAnimated&&o.DomEvent.on(this._mapPane,o.DomUtil.TRANSITION_END,this._catchTransitionEnd,this)}),o.Map.include(o.DomUtil.TRANSITION?{_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,n){if(this._animatingZoom)return!0;if(n=n||{},!this._zoomAnimated||n.animate===!1||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var i=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/i),r=this._getCenterLayerPoint()._add(o);return n.animate===!0||this.getSize().contains(o)?(this.fire("movestart").fire("zoomstart"),this._animateZoom(t,e,r,i,null,!0),!0):!1},_animateZoom:function(t,e,n,i,r,s,a){a||(this._animatingZoom=!0),o.DomUtil.addClass(this._mapPane,"leaflet-zoom-anim"),this._animateToCenter=t,this._animateToZoom=e,o.Draggable&&(o.Draggable._disabled=!0),o.Util.requestAnimFrame(function(){this.fire("zoomanim",{center:t,zoom:e,origin:n,scale:i,delta:r,backwards:s}),setTimeout(o.bind(this._onZoomTransitionEnd,this),250)},this)},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._animatingZoom=!1,o.DomUtil.removeClass(this._mapPane,"leaflet-zoom-anim"),o.Util.requestAnimFrame(function(){this._resetView(this._animateToCenter,this._animateToZoom,!0,!0),o.Draggable&&(o.Draggable._disabled=!1)},this))}}:{}),o.TileLayer.include({_animateZoom:function(t){this._animating||(this._animating=!0,this._prepareBgBuffer());var e=this._bgBuffer,n=o.DomUtil.TRANSFORM,i=t.delta?o.DomUtil.getTranslateString(t.delta):e.style[n],r=o.DomUtil.getScaleString(t.scale,t.origin);e.style[n]=t.backwards?r+" "+i:i+" "+r},_endZoomAnim:function(){var t=this._tileContainer,e=this._bgBuffer;t.style.visibility="",t.parentNode.appendChild(t),o.Util.falseFn(e.offsetWidth);var n=this._map.getZoom();(n>this.options.maxZoom||n.5&&.5>i?(t.style.visibility="hidden",void this._stopLoadingImages(t)):(e.style.visibility="hidden",e.style[o.DomUtil.TRANSFORM]="",this._tileContainer=e,e=this._bgBuffer=t,this._stopLoadingImages(e),void clearTimeout(this._clearBgBufferTimer))},_getLoadedTilesPercentage:function(t){var e,n,i=t.getElementsByTagName("img"),o=0;for(e=0,n=i.length;n>e;e++)i[e].complete&&o++;return o/n},_stopLoadingImages:function(t){var e,n,i,r=Array.prototype.slice.call(t.getElementsByTagName("img"));for(e=0,n=r.length;n>e;e++)i=r[e],i.complete||(i.onload=o.Util.falseFn,i.onerror=o.Util.falseFn,i.src=o.Util.emptyImageUrl,i.parentNode.removeChild(i))}}),o.Map.include({_defaultLocateOptions:{watch:!1,setView:!1,maxZoom:1/0,timeout:1e4,maximumAge:0,enableHighAccuracy:!1},locate:function(t){if(t=this._locateOptions=o.extend(this._defaultLocateOptions,t),!navigator.geolocation)return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=o.bind(this._handleGeolocationResponse,this),n=o.bind(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,n,t):navigator.geolocation.getCurrentPosition(e,n,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e=t.code,n=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+n+"."})},_handleGeolocationResponse:function(t){var e=t.coords.latitude,n=t.coords.longitude,i=new o.LatLng(e,n),r=180*t.coords.accuracy/40075017,s=r/Math.cos(o.LatLng.DEG_TO_RAD*e),a=o.latLngBounds([e-r,n-s],[e+r,n+s]),l=this._locateOptions;if(l.setView){var u=Math.min(this.getBoundsZoom(a),l.maxZoom);this.setView(i,u)}var c={latlng:i,bounds:a,timestamp:t.timestamp};for(var h in t.coords)"number"==typeof t.coords[h]&&(c[h]=t.coords[h]);this.fire("locationfound",c)}})}(window,document),define("ViewModels/DistanceLegendViewModel",["Cesium/Core/defined","Cesium/Core/DeveloperError","Cesium/Core/EllipsoidGeodesic","Cesium/Core/Cartesian2","Cesium/Core/getTimestamp","Cesium/Core/EventHelper","KnockoutES5","Core/loadView","leaflet"],function(t,e,n,i,o,r,s,a,l){"use strict";function u(e,n){var r=o();if(!(r=0;--b)d[b]/v=1e3?(_/1e3).toString()+" km":_.toString()+" m",e.barWidth=_/v|0,e.distanceLabel=w}else e.barWidth=void 0,e.distanceLabel=void 0}}function c(t,e){var n=e.getSize().y/2,i=100,o=e.containerPointToLatLng([0,n]).distanceTo(e.containerPointToLatLng([i,n])),r=l.control.scale()._getRoundNum(o),s=1e3>r?r+" m":r/1e3+" km";t.barWidth=r/o*i,t.distanceLabel=s}var h=function(n){function i(){if(t(o.terria)){var e=o.terria.scene;o._removeSubscription=e.postRender.addEventListener(function(){u(this,e)},o)}else if(t(o.terria.leaflet)){var n=o.terria.leaflet.map,i=function(){c(o,n)};o._removeSubscription=function(){n.off("zoomend",i),n.off("moveend",i)},n.on("zoomend",i),n.on("moveend",i),c(o,n)}}if(!t(n)||!t(n.terria))throw new e("options.terria is required.");this.terria=n.terria,this._removeSubscription=void 0,this._lastLegendUpdate=void 0,this.eventHelper=new r,this.distanceLabel=void 0,this.barWidth=void 0,s.track(this,["distanceLabel","barWidth"]),this.eventHelper.add(this.terria.afterWidgetChanged,function(){t(this._removeSubscription)&&(this._removeSubscription(),this._removeSubscription=void 0)},this);var o=this;i(),this.eventHelper.add(this.terria.afterWidgetChanged,function(){i()},this)};h.prototype.destroy=function(){this.eventHelper.removeAll()},h.prototype.show=function(t){var e='
';a(e,t,this)},h.create=function(t){var e=new h(t);return e.show(t.container),e};var p=new n,d=[1,2,3,5,10,20,30,50,100,200,300,500,1e3,2e3,3e3,5e3,1e4,2e4,3e4,5e4,1e5,2e5,3e5,5e5,1e6,2e6,3e6,5e6,1e7,2e7,3e7,5e7];return h}),define("ViewModels/UserInterfaceControl",["Cesium/Core/defined","Cesium/Core/defineProperties","Cesium/Core/DeveloperError","KnockoutES5"],function(t,e,n,i){"use strict";var o=function(e){if(!t(e))throw new n("terria is required");this._terria=e,this.name="Unnamed Control",this.text=void 0,this.svgIcon=void 0,this.svgHeight=void 0,this.svgWidth=void 0,this.cssClass=void 0,this.isActive=!1,i.track(this,["name","svgIcon","svgHeight","svgWidth","cssClass","isActive"])};return e(o.prototype,{terria:{get:function(){return this._terria}},hasText:{get:function(){return t(this.text)&&"string"==typeof this.text}}}),o.prototype.activate=function(){throw new n("activate must be implemented in the derived class.")},o}),define("ViewModels/NavigationControl",["ViewModels/UserInterfaceControl"],function(t){"use strict";var e=function(e){t.apply(this,arguments)};return e.prototype=Object.create(t.prototype),e}),define("SvgPaths/svgReset",[],function(){"use strict";return"M 7.5,0 C 3.375,0 0,3.375 0,7.5 0,11.625 3.375,15 7.5,15 c 3.46875,0 6.375,-2.4375 7.21875,-5.625 l -1.96875,0 C 12,11.53125 9.9375,13.125 7.5,13.125 4.40625,13.125 1.875,10.59375 1.875,7.5 1.875,4.40625 4.40625,1.875 7.5,1.875 c 1.59375,0 2.90625,0.65625 3.9375,1.6875 l -3,3 6.5625,0 L 15,0 12.75,2.25 C 11.4375,0.84375 9.5625,0 7.5,0 z"}),define("ViewModels/ResetViewNavigationControl",["Cesium/Core/defined","Cesium/Scene/Camera","ViewModels/NavigationControl","SvgPaths/svgReset"],function(t,e,n,i){"use strict";var o=function(t){n.apply(this,arguments),this.name="Reset View",this.svgIcon=i,this.svgHeight=15,this.svgWidth=15,this.cssClass="navigation-control-icon-reset"};return o.prototype=Object.create(n.prototype),o.prototype.resetView=function(){this.isActive=!0;var t=this.terria.scene.camera;"function"==typeof t.flyHome?t.flyHome(1):t.flyTo({destination:e.DEFAULT_VIEW_RECTANGLE,duration:1}),this.isActive=!1},o.prototype.activate=function(){this.resetView()},o}),define("Core/Utils",["Cesium/Core/defined","Cesium/Core/Ray","Cesium/Core/Cartesian3","Cesium/Core/Cartographic","Cesium/Scene/SceneMode"],function(t,e,n,i,o){"use strict";var r={},s=new i,a=new e;return r.getCameraFocus=function(e,i,r){if(e.mode!=o.MORPHING){t(r)||(r=new n);var l=e.camera;a.origin=l.positionWC,a.direction=l.directionWC;var u=e.globe.pick(a,e,r);if(t(u))return e.mode==o.SCENE2D||e.mode==o.COLUMBUS_VIEW?(u=l.worldToCameraCoordinatesPoint(u,r),i&&(u=e.globe.ellipsoid.cartographicToCartesian(e.mapProjection.unproject(u,s),r))):i||(u=l.worldToCameraCoordinatesPoint(u,r)),u}},r}),define("ViewModels/ZoomNavigationControl",["Cesium/Core/defined","Cesium/Core/Ray","Cesium/Core/IntersectionTests","Cesium/Core/Cartesian3","Cesium/Scene/SceneMode","ViewModels/NavigationControl","Core/Utils"],function(t,e,n,i,o,r,s){"use strict";var a=function(t,e){r.apply(this,arguments),this.name="Zoom "+(e?"In":"Out"),this.text=e?"+":"-",this.cssClass="navigation-control-icon-zoom-"+(e?"in":"out"),this.relativeAmount=2,e&&(this.relativeAmount=1/this.relativeAmount)};a.prototype.relativeAmount=1,a.prototype=Object.create(r.prototype),a.prototype.activate=function(){this.zoom(this.relativeAmount)};var l=new i;return a.prototype.zoom=function(r){if(this.isActive=!0,t(this.terria)){var a=this.terria.scene,u=a.camera;switch(a.mode){case o.MORPHING:break;case o.SCENE2D:u.zoomIn(u.positionCartographic.height*(1-this.relativeAmount));break;default:var c=s.getCameraFocus(a,!1);if(!t(c)){var h=new e(u.worldToCameraCoordinatesPoint(a.globe.ellipsoid.cartographicToCartesian(u.positionCartographic)),u.directionWC);c=n.grazingAltitudeLocation(h,a.globe.ellipsoid)}var p=i.subtract(u.position,c,l),d=i.multiplyByScalar(p,r,p),f=i.add(c,d,c);u.position=f}}this.isActive=!1},a}),define("SvgPaths/svgCompassOuterRing",[],function(){"use strict";return"m 66.5625,0 0,15.15625 3.71875,0 0,-10.40625 5.5,10.40625 4.375,0 0,-15.15625 -3.71875,0 0,10.40625 L 70.9375,0 66.5625,0 z M 72.5,20.21875 c -28.867432,0 -52.28125,23.407738 -52.28125,52.28125 0,28.87351 23.413818,52.3125 52.28125,52.3125 28.86743,0 52.28125,-23.43899 52.28125,-52.3125 0,-28.873512 -23.41382,-52.28125 -52.28125,-52.28125 z m 0,1.75 c 13.842515,0 26.368948,5.558092 35.5,14.5625 l -11.03125,11 0.625,0.625 11.03125,-11 c 8.9199,9.108762 14.4375,21.579143 14.4375,35.34375 0,13.764606 -5.5176,26.22729 -14.4375,35.34375 l -11.03125,-11 -0.625,0.625 11.03125,11 c -9.130866,9.01087 -21.658601,14.59375 -35.5,14.59375 -13.801622,0 -26.321058,-5.53481 -35.4375,-14.5 l 11.125,-11.09375 c 6.277989,6.12179 14.857796,9.90625 24.3125,9.90625 19.241896,0 34.875,-15.629154 34.875,-34.875 0,-19.245847 -15.633104,-34.84375 -34.875,-34.84375 -9.454704,0 -18.034511,3.760884 -24.3125,9.875 L 37.0625,36.4375 C 46.179178,27.478444 58.696991,21.96875 72.5,21.96875 z m -0.875,0.84375 0,13.9375 1.75,0 0,-13.9375 -1.75,0 z M 36.46875,37.0625 47.5625,48.15625 C 41.429794,54.436565 37.65625,63.027539 37.65625,72.5 c 0,9.472461 3.773544,18.055746 9.90625,24.34375 L 36.46875,107.9375 c -8.96721,-9.1247 -14.5,-21.624886 -14.5,-35.4375 0,-13.812615 5.53279,-26.320526 14.5,-35.4375 z M 72.5,39.40625 c 18.297686,0 33.125,14.791695 33.125,33.09375 0,18.302054 -14.827314,33.125 -33.125,33.125 -18.297687,0 -33.09375,-14.822946 -33.09375,-33.125 0,-18.302056 14.796063,-33.09375 33.09375,-33.09375 z M 22.84375,71.625 l 0,1.75 13.96875,0 0,-1.75 -13.96875,0 z m 85.5625,0 0,1.75 14,0 0,-1.75 -14,0 z M 71.75,108.25 l 0,13.9375 1.71875,0 0,-13.9375 -1.71875,0 z"}),define("SvgPaths/svgCompassGyro",[],function(){"use strict";return"m 72.71875,54.375 c -0.476702,0 -0.908208,0.245402 -1.21875,0.5625 -0.310542,0.317098 -0.551189,0.701933 -0.78125,1.1875 -0.172018,0.363062 -0.319101,0.791709 -0.46875,1.25 -6.91615,1.075544 -12.313231,6.656514 -13,13.625 -0.327516,0.117495 -0.661877,0.244642 -0.9375,0.375 -0.485434,0.22959 -0.901634,0.471239 -1.21875,0.78125 -0.317116,0.310011 -0.5625,0.742111 -0.5625,1.21875 l 0.03125,0 c 0,0.476639 0.245384,0.877489 0.5625,1.1875 0.317116,0.310011 0.702066,0.58291 1.1875,0.8125 0.35554,0.168155 0.771616,0.32165 1.21875,0.46875 1.370803,6.10004 6.420817,10.834127 12.71875,11.8125 0.146999,0.447079 0.30025,0.863113 0.46875,1.21875 0.230061,0.485567 0.470708,0.870402 0.78125,1.1875 0.310542,0.317098 0.742048,0.5625 1.21875,0.5625 0.476702,0 0.876958,-0.245402 1.1875,-0.5625 0.310542,-0.317098 0.582439,-0.701933 0.8125,-1.1875 0.172018,-0.363062 0.319101,-0.791709 0.46875,-1.25 6.249045,-1.017063 11.256351,-5.7184 12.625,-11.78125 0.447134,-0.1471 0.86321,-0.300595 1.21875,-0.46875 0.485434,-0.22959 0.901633,-0.502489 1.21875,-0.8125 0.317117,-0.310011 0.5625,-0.710861 0.5625,-1.1875 l -0.03125,0 c 0,-0.476639 -0.245383,-0.908739 -0.5625,-1.21875 C 89.901633,71.846239 89.516684,71.60459 89.03125,71.375 88.755626,71.244642 88.456123,71.117495 88.125,71 87.439949,64.078341 82.072807,58.503735 75.21875,57.375 c -0.15044,-0.461669 -0.326927,-0.884711 -0.5,-1.25 -0.230061,-0.485567 -0.501958,-0.870402 -0.8125,-1.1875 -0.310542,-0.317098 -0.710798,-0.5625 -1.1875,-0.5625 z m -0.0625,1.40625 c 0.03595,-0.01283 0.05968,0 0.0625,0 0.0056,0 0.04321,-0.02233 0.1875,0.125 0.144288,0.147334 0.34336,0.447188 0.53125,0.84375 0.06385,0.134761 0.123901,0.309578 0.1875,0.46875 -0.320353,-0.01957 -0.643524,-0.0625 -0.96875,-0.0625 -0.289073,0 -0.558569,0.04702 -0.84375,0.0625 C 71.8761,57.059578 71.936151,56.884761 72,56.75 c 0.18789,-0.396562 0.355712,-0.696416 0.5,-0.84375 0.07214,-0.07367 0.120304,-0.112167 0.15625,-0.125 z m 0,2.40625 c 0.448007,0 0.906196,0.05436 1.34375,0.09375 0.177011,0.592256 0.347655,1.271044 0.5,2.03125 0.475097,2.370753 0.807525,5.463852 0.9375,8.9375 -0.906869,-0.02852 -1.834463,-0.0625 -2.78125,-0.0625 -0.92298,0 -1.802327,0.03537 -2.6875,0.0625 0.138529,-3.473648 0.493653,-6.566747 0.96875,-8.9375 0.154684,-0.771878 0.320019,-1.463985 0.5,-2.0625 0.405568,-0.03377 0.804291,-0.0625 1.21875,-0.0625 z m -2.71875,0.28125 c -0.129732,0.498888 -0.259782,0.987558 -0.375,1.5625 -0.498513,2.487595 -0.838088,5.693299 -0.96875,9.25 -3.21363,0.15162 -6.119596,0.480068 -8.40625,0.9375 -0.682394,0.136509 -1.275579,0.279657 -1.84375,0.4375 0.799068,-6.135482 5.504716,-11.036454 11.59375,-12.1875 z M 75.5,58.5 c 6.043169,1.18408 10.705093,6.052712 11.5,12.15625 -0.569435,-0.155806 -1.200273,-0.302525 -1.875,-0.4375 -2.262525,-0.452605 -5.108535,-0.783809 -8.28125,-0.9375 -0.130662,-3.556701 -0.470237,-6.762405 -0.96875,-9.25 C 75.761959,59.467174 75.626981,58.990925 75.5,58.5 z m -2.84375,12.09375 c 0.959338,0 1.895843,0.03282 2.8125,0.0625 C 75.48165,71.267751 75.5,71.871028 75.5,72.5 c 0,1.228616 -0.01449,2.438313 -0.0625,3.59375 -0.897358,0.0284 -1.811972,0.0625 -2.75,0.0625 -0.927373,0 -1.831062,-0.03473 -2.71875,-0.0625 -0.05109,-1.155437 -0.0625,-2.365134 -0.0625,-3.59375 0,-0.628972 0.01741,-1.232249 0.03125,-1.84375 0.895269,-0.02827 1.783025,-0.0625 2.71875,-0.0625 z M 68.5625,70.6875 c -0.01243,0.60601 -0.03125,1.189946 -0.03125,1.8125 0,1.22431 0.01541,2.407837 0.0625,3.5625 -3.125243,-0.150329 -5.92077,-0.471558 -8.09375,-0.90625 -0.784983,-0.157031 -1.511491,-0.316471 -2.125,-0.5 -0.107878,-0.704096 -0.1875,-1.422089 -0.1875,-2.15625 0,-0.115714 0.02849,-0.228688 0.03125,-0.34375 0.643106,-0.20284 1.389577,-0.390377 2.25,-0.5625 2.166953,-0.433487 4.97905,-0.75541 8.09375,-0.90625 z m 8.3125,0.03125 c 3.075121,0.15271 5.824455,0.446046 7.96875,0.875 0.857478,0.171534 1.630962,0.360416 2.28125,0.5625 0.0027,0.114659 0,0.228443 0,0.34375 0,0.735827 -0.07914,1.450633 -0.1875,2.15625 -0.598568,0.180148 -1.29077,0.34562 -2.0625,0.5 -2.158064,0.431708 -4.932088,0.754666 -8.03125,0.90625 0.04709,-1.154663 0.0625,-2.33819 0.0625,-3.5625 0,-0.611824 -0.01924,-1.185379 -0.03125,-1.78125 z M 57.15625,72.5625 c 0.0023,0.572772 0.06082,1.131112 0.125,1.6875 -0.125327,-0.05123 -0.266577,-0.10497 -0.375,-0.15625 -0.396499,-0.187528 -0.665288,-0.387337 -0.8125,-0.53125 -0.147212,-0.143913 -0.15625,-0.182756 -0.15625,-0.1875 0,-0.0047 -0.02221,-0.07484 0.125,-0.21875 0.147212,-0.143913 0.447251,-0.312472 0.84375,-0.5 0.07123,-0.03369 0.171867,-0.06006 0.25,-0.09375 z m 31.03125,0 c 0.08201,0.03503 0.175941,0.05872 0.25,0.09375 0.396499,0.187528 0.665288,0.356087 0.8125,0.5 0.14725,0.14391 0.15625,0.21405 0.15625,0.21875 0,0.0047 -0.009,0.04359 -0.15625,0.1875 -0.147212,0.143913 -0.416001,0.343722 -0.8125,0.53125 -0.09755,0.04613 -0.233314,0.07889 -0.34375,0.125 0.06214,-0.546289 0.09144,-1.094215 0.09375,-1.65625 z m -29.5,3.625 c 0.479308,0.123125 0.983064,0.234089 1.53125,0.34375 2.301781,0.460458 5.229421,0.787224 8.46875,0.9375 0.167006,2.84339 0.46081,5.433176 0.875,7.5 0.115218,0.574942 0.245268,1.063612 0.375,1.5625 -5.463677,-1.028179 -9.833074,-5.091831 -11.25,-10.34375 z m 27.96875,0 C 85.247546,81.408945 80.919274,85.442932 75.5,86.5 c 0.126981,-0.490925 0.261959,-0.967174 0.375,-1.53125 0.41419,-2.066824 0.707994,-4.65661 0.875,-7.5 3.204493,-0.15162 6.088346,-0.480068 8.375,-0.9375 0.548186,-0.109661 1.051942,-0.220625 1.53125,-0.34375 z M 70.0625,77.53125 c 0.865391,0.02589 1.723666,0.03125 2.625,0.03125 0.912062,0 1.782843,-0.0048 2.65625,-0.03125 -0.165173,2.736408 -0.453252,5.207651 -0.84375,7.15625 -0.152345,0.760206 -0.322989,1.438994 -0.5,2.03125 -0.437447,0.03919 -0.895856,0.0625 -1.34375,0.0625 -0.414943,0 -0.812719,-0.02881 -1.21875,-0.0625 -0.177011,-0.592256 -0.347655,-1.271044 -0.5,-2.03125 -0.390498,-1.948599 -0.700644,-4.419842 -0.875,-7.15625 z m 1.75,10.28125 c 0.284911,0.01545 0.554954,0.03125 0.84375,0.03125 0.325029,0 0.648588,-0.01171 0.96875,-0.03125 -0.05999,0.148763 -0.127309,0.31046 -0.1875,0.4375 -0.18789,0.396562 -0.386962,0.696416 -0.53125,0.84375 -0.144288,0.147334 -0.181857,0.125 -0.1875,0.125 -0.0056,0 -0.07446,0.02233 -0.21875,-0.125 C 72.355712,88.946416 72.18789,88.646562 72,88.25 71.939809,88.12296 71.872486,87.961263 71.8125,87.8125 z"; -}),define("SvgPaths/svgCompassRotationMarker",[],function(){"use strict";return"M 72.46875,22.03125 C 59.505873,22.050338 46.521615,27.004287 36.6875,36.875 L 47.84375,47.96875 C 61.521556,34.240041 83.442603,34.227389 97.125,47.90625 l 11.125,-11.125 C 98.401629,26.935424 85.431627,22.012162 72.46875,22.03125 z"}),define("ViewModels/NavigationViewModel",["Cesium/Core/defined","Cesium/Core/Math","Cesium/Core/getTimestamp","Cesium/Core/EventHelper","Cesium/Core/Transforms","Cesium/Scene/SceneMode","Cesium/Core/Cartesian2","Cesium/Core/Cartesian3","Cesium/Core/Matrix4","Cesium/Core/BoundingSphere","Cesium/Core/HeadingPitchRange","KnockoutES5","Core/loadView","ViewModels/ResetViewNavigationControl","ViewModels/ZoomNavigationControl","SvgPaths/svgCompassOuterRing","SvgPaths/svgCompassGyro","SvgPaths/svgCompassRotationMarker","Core/Utils"],function(t,e,n,i,o,r,s,a,l,u,c,h,p,d,f,m,g,_,v){"use strict";function y(i,u,c){function h(t,n){var o=Math.atan2(-t.y,t.x);i.orbitCursorAngle=e.zeroToTwoPi(o-e.PI_OVER_TWO);var r=s.magnitude(t),a=n/2,l=Math.min(r/a,1),u=.5*l*l+.5;i.orbitCursorOpacity=u}document.removeEventListener("mousemove",i.orbitMouseMoveFunction,!1),document.removeEventListener("mouseup",i.orbitMouseUpFunction,!1),t(i.orbitTickFunction)&&i.terria.clock.onTick.removeEventListener(i.orbitTickFunction),i.orbitMouseMoveFunction=void 0,i.orbitMouseUpFunction=void 0,i.orbitTickFunction=void 0,i.isOrbiting=!0,i.orbitLastTimestamp=n();var p=i.terria.scene,d=p.camera,f=v.getCameraFocus(p,!0,E);t(f)?(i.orbitFrame=o.eastNorthUpToFixedFrame(f,p.globe.ellipsoid,C),i.orbitIsLook=!1):(i.orbitFrame=o.eastNorthUpToFixedFrame(d.positionWC,p.globe.ellipsoid,C),i.orbitIsLook=!0),i.orbitTickFunction=function(t){var o=n(),s=o-i.orbitLastTimestamp,u=2.5*(i.orbitCursorOpacity-.5)/1e3,c=s*u,h=i.orbitCursorAngle+e.PI_OVER_TWO,f=Math.cos(h)*c,m=Math.sin(h)*c,g=l.clone(d.transform,x);d.lookAtTransform(i.orbitFrame),p.mode==r.SCENE2D?d.move(new a(f,m,0),Math.max(p.canvas.clientWidth,p.canvas.clientHeight)/100*d.positionCartographic.height*c):i.orbitIsLook?(d.look(a.UNIT_Z,-f),d.look(d.right,-m)):(d.rotateLeft(f),d.rotateUp(m)),d.lookAtTransform(g),i.orbitLastTimestamp=o},i.orbitMouseMoveFunction=function(t){var e=u.getBoundingClientRect(),n=new s((e.right-e.left)/2,(e.bottom-e.top)/2),i=new s(t.clientX-e.left,t.clientY-e.top),o=s.subtract(i,n,k);h(o,e.width)},i.orbitMouseUpFunction=function(e){i.isOrbiting=!1,document.removeEventListener("mousemove",i.orbitMouseMoveFunction,!1),document.removeEventListener("mouseup",i.orbitMouseUpFunction,!1),t(i.orbitTickFunction)&&i.terria.clock.onTick.removeEventListener(i.orbitTickFunction),i.orbitMouseMoveFunction=void 0,i.orbitMouseUpFunction=void 0,i.orbitTickFunction=void 0},document.addEventListener("mousemove",i.orbitMouseMoveFunction,!1),document.addEventListener("mouseup",i.orbitMouseUpFunction,!1),i.terria.clock.onTick.addEventListener(i.orbitTickFunction),h(c,u.getBoundingClientRect().width)}function b(n,i,u){var c=n.terria.scene,h=c.camera;if(c.mode!=r.SCENE2D){document.removeEventListener("mousemove",n.rotateMouseMoveFunction,!1),document.removeEventListener("mouseup",n.rotateMouseUpFunction,!1),n.rotateMouseMoveFunction=void 0,n.rotateMouseUpFunction=void 0,n.isRotating=!0,n.rotateInitialCursorAngle=Math.atan2(-u.y,u.x);var p=v.getCameraFocus(c,!0,E);t(p)?(n.rotateFrame=o.eastNorthUpToFixedFrame(p,c.globe.ellipsoid,C),n.rotateIsLook=!1):(n.rotateFrame=o.eastNorthUpToFixedFrame(h.positionWC,c.globe.ellipsoid,C),n.rotateIsLook=!0);var d=l.clone(h.transform,x);h.lookAtTransform(n.rotateFrame),n.rotateInitialCameraAngle=-h.heading,n.rotateInitialCameraDistance=a.magnitude(new a(h.position.x,h.position.y,0)),h.lookAtTransform(d),n.rotateMouseMoveFunction=function(t){var o=i.getBoundingClientRect(),r=new s((o.right-o.left)/2,(o.bottom-o.top)/2),a=new s(t.clientX-o.left,t.clientY-o.top),u=s.subtract(a,r,k),c=Math.atan2(-u.y,u.x),h=c-n.rotateInitialCursorAngle,p=e.zeroToTwoPi(n.rotateInitialCameraAngle-h),d=n.terria.scene.camera,f=l.clone(d.transform,x);d.lookAtTransform(n.rotateFrame);var m=-d.heading;d.rotateRight(p-m),d.lookAtTransform(f)},n.rotateMouseUpFunction=function(t){n.isRotating=!1,document.removeEventListener("mousemove",n.rotateMouseMoveFunction,!1),document.removeEventListener("mouseup",n.rotateMouseUpFunction,!1),n.rotateMouseMoveFunction=void 0,n.rotateMouseUpFunction=void 0},document.addEventListener("mousemove",n.rotateMouseMoveFunction,!1),document.addEventListener("mouseup",n.rotateMouseUpFunction,!1)}}var w=function(e){function n(){t(o.terria)?(o._unsubcribeFromPostRender&&(o._unsubcribeFromPostRender(),o._unsubcribeFromPostRender=void 0),o.showCompass=!0,o._unsubcribeFromPostRender=o.terria.scene.postRender.addEventListener(function(){o.heading=o.terria.scene.camera.heading})):(o._unsubcribeFromPostRender&&(o._unsubcribeFromPostRender(),o._unsubcribeFromPostRender=void 0),o.showCompass=!1)}this.terria=e.terria,this.eventHelper=new i,this.controls=e.controls,t(this.controls)||(this.controls=[new f(this.terria,!0),new d(this.terria),new f(this.terria,!1)]),this.svgCompassOuterRing=m,this.svgCompassGyro=g,this.svgCompassRotationMarker=_,this.showCompass=t(this.terria),this.heading=this.showCompass?this.terria.scene.camera.heading:0,this.isOrbiting=!1,this.orbitCursorAngle=0,this.orbitCursorOpacity=0,this.orbitLastTimestamp=0,this.orbitFrame=void 0,this.orbitIsLook=!1,this.orbitMouseMoveFunction=void 0,this.orbitMouseUpFunction=void 0,this.isRotating=!1,this.rotateInitialCursorAngle=void 0,this.rotateFrame=void 0,this.rotateIsLook=!1,this.rotateMouseMoveFunction=void 0,this.rotateMouseUpFunction=void 0,this._unsubcribeFromPostRender=void 0,h.track(this,["controls","showCompass","heading","isOrbiting","orbitCursorAngle","isRotating"]);var o=this;this.eventHelper.add(this.terria.afterWidgetChanged,n,this),n()};w.prototype.destroy=function(){this.eventHelper.removeAll()},w.prototype.show=function(t){var e='
'+"
";p(e,t,this)},w.prototype.add=function(t){this.controls.push(t)},w.prototype.remove=function(t){this.controls.remove(t)},w.prototype.isLastControl=function(t){return t===this.controls[this.controls.length-1]};var k=new s;w.prototype.handleMouseDown=function(t,e){var n=this.terria.scene;if(n.mode==r.MORPHING)return!0;var i=e.currentTarget,o=e.currentTarget.getBoundingClientRect(),a=o.width/2,l=new s((o.right-o.left)/2,(o.bottom-o.top)/2),u=new s(e.clientX-o.left,e.clientY-o.top),c=s.subtract(u,l,k),h=s.magnitude(c),p=h/a,d=145,f=50;if(f/d>p)y(this,i,c);else{if(!(1>p))return!0;b(this,i,c)}};var x=new l,C=new l,E=new a;return w.prototype.handleDoubleClick=function(e,n){var i=this.terria.scene,o=i.camera;if(i.mode==r.MORPHING||i.mode==r.SCENE2D)return!0;var s=v.getCameraFocus(i,!0,E);if(!t(s))return void this.controls[1].resetView();var l=i.globe.ellipsoid.cartographicToCartesian(o.positionCartographic,new a);o.flyToBoundingSphere(new u(s,0),{offset:new c(0,o.pitch,a.distance(l,s)),duration:1.5})},w.create=function(t){var e=new w(t);return e.show(t.container),e},w}),define("CesiumNavigation",["Cesium/Core/defined","Cesium/Core/defineProperties","Cesium/Core/Event","KnockoutES5","Core/registerKnockoutBindings","ViewModels/DistanceLegendViewModel","ViewModels/NavigationViewModel"],function(t,e,n,i,o,r,s){"use strict";function a(e,i){if(!t(e))throw new DeveloperError("cesiumWidget is required.");var a=document.createElement("div");a.className="cesium-widget-cesiumNavigationContainer",e.container.appendChild(a),this.terria=e,this.terria.afterWidgetChanged=new n,this.terria.beforeWidgetChanged=new n,this.container=a,this.navigationDiv=document.createElement("div"),this.navigationDiv.setAttribute("id","navigationDiv"),this.distanceLegendDiv=document.createElement("div"),this.navigationDiv.setAttribute("id","distanceLegendDiv"),a.appendChild(this.navigationDiv),a.appendChild(this.distanceLegendDiv),o(),this.distanceLegendViewModel=r.create({container:this.distanceLegendDiv,terria:this.terria,mapElement:a}),this.navigationViewModel=s.create({container:this.navigationDiv,terria:this.terria})}var l=function(t){a.apply(this,arguments),this._onDestroyListeners=[]};return l.prototype.distanceLegendViewModel=void 0,l.prototype.navigationViewModel=void 0,l.prototype.navigationDiv=void 0,l.prototype.distanceLegendDiv=void 0,l.prototype.terria=void 0,l.prototype.container=void 0,l.prototype._onDestroyListeners=void 0,l.prototype.destroy=function(){t(this.navigationViewModel)&&this.navigationViewModel.destroy(),t(this.distanceLegendViewModel)&&this.distanceLegendViewModel.destroy(),t(this.navigationDiv)&&this.navigationDiv.parentNode.removeChild(this.navigationDiv),delete this.navigationDiv,t(this.distanceLegendDiv)&&this.distanceLegendDiv.parentNode.removeChild(this.distanceLegendDiv),delete this.distanceLegendDiv,t(this.container)&&this.container.parentNode.removeChild(this.container),delete this.container;for(var e=0;ebut instead there is just a placeholder to get a larger info box",position:l,orientation:p,model:{uri:i,minimumPixelSize:96}})}var s=new i("cesiumContainer");s.extend(o,{}),r("models/Cesium_Air.glb",-100,44,1e4),r("models/Cesium_Ground.glb",-122,45,0)}),define("Source/amd/main",function(){}); \ No newline at end of file +/** + @license + when.js - https://github.com/cujojs/when + + MIT License (c) copyright B Cavalier & J Hann + + * A lightweight CommonJS Promises/A and when() implementation + * when is part of the cujo.js family of libraries (http://cujojs.com/) + * + * Licensed under the MIT License at: + * http://www.opensource.org/licenses/mit-license.php + * + * @version 1.7.1 + */ + +/** +@license +mersenne-twister.js - https://gist.github.com/banksean/300494 + + Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura, + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + 3. The names of its contributors may not be used to endorse or promote + products derived from this software without specific prior written + permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/** +@license +sprintf.js from the php.js project - https://github.com/kvz/phpjs +Directly from https://github.com/kvz/phpjs/blob/master/functions/strings/sprintf.js + +php.js is copyright 2012 Kevin van Zonneveld. + +Portions copyright Brett Zamir (http://brett-zamir.me), Kevin van Zonneveld +(http://kevin.vanzonneveld.net), Onno Marsman, Theriault, Michael White +(http://getsprink.com), Waldo Malqui Silva, Paulo Freitas, Jack, Jonas +Raoni Soares Silva (http://www.jsfromhell.com), Philip Peterson, Legaev +Andrey, Ates Goral (http://magnetiq.com), Alex, Ratheous, Martijn Wieringa, +Rafa? Kukawski (http://blog.kukawski.pl), lmeyrick +(https://sourceforge.net/projects/bcmath-js/), Nate, Philippe Baumann, +Enrique Gonzalez, Webtoolkit.info (http://www.webtoolkit.info/), Carlos R. +L. Rodrigues (http://www.jsfromhell.com), Ash Searle +(http://hexmen.com/blog/), Jani Hartikainen, travc, Ole Vrijenhoek, +Erkekjetter, Michael Grier, Rafa? Kukawski (http://kukawski.pl), Johnny +Mast (http://www.phpvrouwen.nl), T.Wild, d3x, +http://stackoverflow.com/questions/57803/how-to-convert-decimal-to-hex-in-javascript, +Rafa? Kukawski (http://blog.kukawski.pl/), stag019, pilus, WebDevHobo +(http://webdevhobo.blogspot.com/), marrtins, GeekFG +(http://geekfg.blogspot.com), Andrea Giammarchi +(http://webreflection.blogspot.com), Arpad Ray (mailto:arpad@php.net), +gorthaur, Paul Smith, Tim de Koning (http://www.kingsquare.nl), Joris, Oleg +Eremeev, Steve Hilder, majak, gettimeofday, KELAN, Josh Fraser +(http://onlineaspect.com/2007/06/08/auto-detect-a-time-zone-with-javascript/), +Marc Palau, Martin +(http://www.erlenwiese.de/), Breaking Par Consulting Inc +(http://www.breakingpar.com/bkp/home.nsf/0/87256B280015193F87256CFB006C45F7), +Chris, Mirek Slugen, saulius, Alfonso Jimenez +(http://www.alfonsojimenez.com), Diplom@t (http://difane.com/), felix, +Mailfaker (http://www.weedem.fr/), Tyler Akins (http://rumkin.com), Caio +Ariede (http://caioariede.com), Robin, Kankrelune +(http://www.webfaktory.info/), Karol Kowalski, Imgen Tata +(http://www.myipdf.com/), mdsjack (http://www.mdsjack.bo.it), Dreamer, +Felix Geisendoerfer (http://www.debuggable.com/felix), Lars Fischer, AJ, +David, Aman Gupta, Michael White, Public Domain +(http://www.json.org/json2.js), Steven Levithan +(http://blog.stevenlevithan.com), Sakimori, Pellentesque Malesuada, +Thunder.m, Dj (http://phpjs.org/functions/htmlentities:425#comment_134018), +Steve Clay, David James, Francois, class_exists, nobbler, T. Wild, Itsacon +(http://www.itsacon.net/), date, Ole Vrijenhoek (http://www.nervous.nl/), +Fox, Raphael (Ao RUDLER), Marco, noname, Mateusz "loonquawl" Zalega, Frank +Forte, Arno, ger, mktime, john (http://www.jd-tech.net), Nick Kolosov +(http://sammy.ru), marc andreu, Scott Cariss, Douglas Crockford +(http://javascript.crockford.com), madipta, Slawomir Kaniecki, +ReverseSyntax, Nathan, Alex Wilson, kenneth, Bayron Guevara, Adam Wallner +(http://web2.bitbaro.hu/), paulo kuong, jmweb, Lincoln Ramsay, djmix, +Pyerre, Jon Hohle, Thiago Mata (http://thiagomata.blog.com), lmeyrick +(https://sourceforge.net/projects/bcmath-js/this.), Linuxworld, duncan, +Gilbert, Sanjoy Roy, Shingo, sankai, Oskar Larsson H?gfeldt +(http://oskar-lh.name/), Denny Wardhana, 0m3r, Everlasto, Subhasis Deb, +josh, jd, Pier Paolo Ramon (http://www.mastersoup.com/), P, merabi, Soren +Hansen, Eugene Bulkin (http://doubleaw.com/), Der Simon +(http://innerdom.sourceforge.net/), echo is bad, Ozh, XoraX +(http://www.xorax.info), EdorFaus, JB, J A R, Marc Jansen, Francesco, LH, +Stoyan Kyosev (http://www.svest.org/), nord_ua, omid +(http://phpjs.org/functions/380:380#comment_137122), Brad Touesnard, MeEtc +(http://yass.meetcweb.com), Peter-Paul Koch +(http://www.quirksmode.org/js/beat.html), Olivier Louvignes +(http://mg-crea.com/), T0bsn, Tim Wiel, Bryan Elliott, Jalal Berrami, +Martin, JT, David Randall, Thomas Beaucourt (http://www.webapp.fr), taith, +vlado houba, Pierre-Luc Paour, Kristof Coomans (SCK-CEN Belgian Nucleair +Research Centre), Martin Pool, Kirk Strobeck, Rick Waldron, Brant Messenger +(http://www.brantmessenger.com/), Devan Penner-Woelk, Saulo Vallory, Wagner +B. Soares, Artur Tchernychev, Valentina De Rosa, Jason Wong +(http://carrot.org/), Christoph, Daniel Esteban, strftime, Mick@el, rezna, +Simon Willison (http://simonwillison.net), Anton Ongson, Gabriel Paderni, +Marco van Oort, penutbutterjelly, Philipp Lenssen, Bjorn Roesbeke +(http://www.bjornroesbeke.be/), Bug?, Eric Nagel, Tomasz Wesolowski, +Evertjan Garretsen, Bobby Drake, Blues (http://tech.bluesmoon.info/), Luke +Godfrey, Pul, uestla, Alan C, Ulrich, Rafal Kukawski, Yves Sucaet, +sowberry, Norman "zEh" Fuchs, hitwork, Zahlii, johnrembo, Nick Callen, +Steven Levithan (stevenlevithan.com), ejsanders, Scott Baker, Brian Tafoya +(http://www.premasolutions.com/), Philippe Jausions +(http://pear.php.net/user/jausions), Aidan Lister +(http://aidanlister.com/), Rob, e-mike, HKM, ChaosNo1, metjay, strcasecmp, +strcmp, Taras Bogach, jpfle, Alexander Ermolaev +(http://snippets.dzone.com/user/AlexanderErmolaev), DxGx, kilops, Orlando, +dptr1988, Le Torbi, James (http://www.james-bell.co.uk/), Pedro Tainha +(http://www.pedrotainha.com), James, Arnout Kazemier +(http://www.3rd-Eden.com), Chris McMacken, gabriel paderni, Yannoo, +FGFEmperor, baris ozdil, Tod Gentille, Greg Frazier, jakes, 3D-GRAF, Allan +Jensen (http://www.winternet.no), Howard Yeend, Benjamin Lupton, davook, +daniel airton wermann (http://wermann.com.br), Atli T¨®r, Maximusya, Ryan +W Tenney (http://ryan.10e.us), Alexander M Beedie, fearphage +(http://http/my.opera.com/fearphage/), Nathan Sepulveda, Victor, Matteo, +Billy, stensi, Cord, Manish, T.J. Leahy, Riddler +(http://www.frontierwebdev.com/), Rafa? Kukawski, FremyCompany, Matt +Bradley, Tim de Koning, Luis Salazar (http://www.freaky-media.com/), Diogo +Resende, Rival, Andrej Pavlovic, Garagoth, Le Torbi +(http://www.letorbi.de/), Dino, Josep Sanz (http://www.ws3.es/), rem, +Russell Walker (http://www.nbill.co.uk/), Jamie Beck +(http://www.terabit.ca/), setcookie, Michael, YUI Library: +http://developer.yahoo.com/yui/docs/YAHOO.util.DateLocale.html, Blues at +http://hacks.bluesmoon.info/strftime/strftime.js, Ben +(http://benblume.co.uk/), DtTvB +(http://dt.in.th/2008-09-16.string-length-in-bytes.html), Andreas, William, +meo, incidence, Cagri Ekin, Amirouche, Amir Habibi +(http://www.residence-mixte.com/), Luke Smith (http://lucassmith.name), +Kheang Hok Chin (http://www.distantia.ca/), Jay Klehr, Lorenzo Pisani, +Tony, Yen-Wei Liu, Greenseed, mk.keck, Leslie Hoare, dude, booeyOH, Ben +Bryan + +Licensed under the MIT (MIT-LICENSE.txt) license. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL KEVIN VAN ZONNEVELD BE LIABLE FOR ANY CLAIM, DAMAGES +OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. +*/ + +/** + * @license + * + * Grauw URI utilities + * + * See: http://hg.grauw.nl/grauw-lib/file/tip/src/uri.js + * + * @author Laurens Holst (http://www.grauw.nl/) + * + * Copyright 2012 Laurens Holst + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// Copyright 2012 Google Inc., Apache 2.0 license. + +/** +@license +tween.js - https://github.com/sole/tween.js + +Copyright (c) 2010-2012 Tween.js authors. + +Easing equations Copyright (c) 2001 Robert Penner http://robertpenner.com/easing/ + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +*/ + +/** + @license + fontmetrics.js - https://github.com/Pomax/fontmetrics.js + + Copyright (C) 2011 by Mike "Pomax" Kamermans + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +**/ + +/** +@license +topojson - https://github.com/mbostock/topojson + +Copyright (c) 2012, Michael Bostock +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* The name Michael Bostock may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL MICHAEL BOSTOCK BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/*! + * Autolinker.js + * 0.17.1 + * + * Copyright(c) 2015 Gregory Jacobs + * MIT Licensed. http://www.opensource.org/licenses/mit-license.php + * + * https://github.com/gregjacobs/Autolinker.js + */ + +/** +@license + Copyright (c) 2013 Gildas Lormeau. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the distribution. + + 3. The names of the authors may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, + INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +**/ + +/** + * @license + * Copyright (c) 2011 NVIDIA Corporation. All rights reserved. + * + * TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED + * *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS + * OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, NONINFRINGEMENT,IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA + * OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT, OR + * CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS + * OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY + * OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, + * EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +/** + * @license + * Copyright (c) 2000-2005, Sean O'Neil (s_p_oneil@hotmail.com) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * * Neither the name of the project nor the names of its contributors may be + * used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * Modifications made by Analytical Graphics, Inc. + */ + +/*! + * Knockout JavaScript library v3.4.0 + * (c) Steven Sanderson - http://knockoutjs.com/ + * License: MIT (http://www.opensource.org/licenses/mit-license.php) + */ + +/** + * @license + * Knockout ES5 plugin - https://github.com/SteveSanderson/knockout-es5 + * Copyright (c) Steve Sanderson + * MIT license + */ + +/** + * @license + * NoSleep.js v0.5.0 - git.io/vfn01 + * Rich Tibbett + * MIT license + **/ + +define("Cesium/Core/appendForwardSlash",[],function(){"use strict";function e(e){return(0===e.length||"/"!==e[e.length-1])&&(e+="/"),e}return e}),function(e){"use strict";e("Cesium/ThirdParty/when",[],function(){function e(e,i,n,r){return t(e).then(i,n,r)}function t(e){var t,i;return e instanceof n?t=e:s(e)?(i=a(),e.then(function(e){i.resolve(e)},function(e){i.reject(e)},function(e){i.progress(e)}),t=i.promise):t=r(e),t}function i(t){return e(t,o)}function n(e){this.then=e}function r(e){var i=new n(function(i){try{return t(i?i(e):e)}catch(n){return o(n)}});return i}function o(e){var i=new n(function(i,n){try{return n?t(n(e)):o(e)}catch(r){return o(r)}});return i}function a(){function e(e,t,i){return d(e,t,i)}function i(e){return m(e)}function r(e){return m(o(e))}function s(e){return p(e)}var l,u,c,h,d,p,m;return u=new n(e),l={then:e,resolve:i,reject:r,progress:s,promise:u,resolver:{resolve:i,reject:r,progress:s}},c=[],h=[],d=function(e,t,i){var n,r;return n=a(),r="function"==typeof i?function(e){try{n.progress(i(e))}catch(t){n.progress(t)}}:function(e){n.progress(e)},c.push(function(i){i.then(e,t).then(n.resolve,n.reject,r)}),h.push(r),n.promise},p=function(e){return f(h,e),e},m=function(e){return e=t(e),d=e.then,m=t,p=v,f(c,e),h=c=w,e},l}function s(e){return e&&"function"==typeof e.then}function l(t,i,n,r,o){return g(2,arguments),e(t,function(t){function s(e){f(e)}function l(e){m(e)}var u,c,h,d,p,m,f,g,_,y;if(_=t.length>>>0,u=Math.max(0,Math.min(i,_)),h=[],c=_-u+1,d=[],p=a(),u)for(g=p.progress,f=function(e){d.push(e),--c||(m=f=v,p.reject(d))},m=function(e){h.push(e),--u||(m=f=v,p.resolve(h))},y=0;_>y;++y)y in t&&e(t[y],l,s,g);else p.resolve(h);return p.then(n,r,o)})}function u(e,t,i,n){function r(e){return t?t(e[0]):e[0]}return l(e,1,r,i,n)}function c(e,t,i,n){return g(1,arguments),d(e,_).then(t,i,n)}function h(){return d(arguments,_)}function d(t,i){return e(t,function(t){var n,r,o,s,l,u;if(o=r=t.length>>>0,n=[],u=a(),o)for(s=function(t,r){e(t,i).then(function(e){n[r]=e,--o||u.resolve(n)},u.reject)},l=0;r>l;l++)l in t?s(t[l],l):--o;else u.resolve(n);return u.promise})}function p(t,i){var n=C.call(arguments,1);return e(t,function(t){var r;return r=t.length,n[0]=function(t,n,o){return e(t,function(t){return e(n,function(e){return i(t,e,o,r)})})},y.apply(t,n)})}function m(t,i,n){var r=arguments.length>2;return e(t,function(e){return e=r?n:e,i.resolve(e),e},function(e){return i.reject(e),o(e)},i.progress)}function f(e,t){for(var i,n=0;i=e[n++];)i(t)}function g(e,t){for(var i,n=t.length;n>e;)if(i=t[--n],null!=i&&"function"!=typeof i)throw new Error("arg "+n+" must be a function")}function v(){}function _(e){return e}var y,C,w;return e.defer=a,e.resolve=t,e.reject=i,e.join=h,e.all=c,e.map=d,e.reduce=p,e.any=u,e.some=l,e.chain=m,e.isPromise=s,n.prototype={always:function(e,t){return this.then(e,e,t)},otherwise:function(e){return this.then(w,e)},"yield":function(e){return this.then(function(){return e})},spread:function(e){return this.then(function(t){return c(t,function(t){return e.apply(w,t)})})}},C=[].slice,y=[].reduce||function(e){var t,i,n,r,o;if(o=0,t=Object(this),r=t.length>>>0,i=arguments,i.length<=1)for(;;){if(o in t){n=t[o++];break}if(++o>=r)throw new TypeError}else n=i[1];for(;r>o;++o)o in t&&(n=e(n,t[o],o,t));return n},e})}("function"==typeof define&&define.amd?define:function(e){"object"==typeof exports?module.exports=e():this.when=e()}),define("Cesium/Core/defined",[],function(){"use strict";function e(e){return void 0!==e&&null!==e}return e}),define("Cesium/Core/defineProperties",["./defined"],function(e){"use strict";var t=function(){try{return"x"in Object.defineProperty({},"x",{})}catch(e){return!1}}(),i=Object.defineProperties;return t&&e(i)||(i=function(e){return e}),i}),define("Cesium/Core/DeveloperError",["./defined"],function(e){"use strict";function t(e){this.name="DeveloperError",this.message=e;var t;try{throw new Error}catch(i){t=i.stack}this.stack=t}return e(Object.create)&&(t.prototype=Object.create(Error.prototype),t.prototype.constructor=t),t.prototype.toString=function(){var t=this.name+": "+this.message;return e(this.stack)&&(t+="\n"+this.stack.toString()),t},t.throwInstantiationError=function(){throw new t("This function defines an interface and should not be called directly.")},t}),define("Cesium/Core/Credit",["./defined","./defineProperties","./DeveloperError"],function(e,t,i){"use strict";function n(t,i,n){var a=e(n),s=e(i),l=e(t);l||s||(t=n),this._text=t,this._imageUrl=i,this._link=n,this._hasLink=a,this._hasImage=s;var u,c=JSON.stringify([t,i,n]);e(o[c])?u=o[c]:(u=r++,o[c]=u),this._id=u}var r=0,o={};return t(n.prototype,{text:{get:function(){return this._text}},imageUrl:{get:function(){return this._imageUrl}},link:{get:function(){return this._link}},id:{get:function(){return this._id}}}),n.prototype.hasImage=function(){return this._hasImage},n.prototype.hasLink=function(){return this._hasLink},n.equals=function(t,i){return t===i||e(t)&&e(i)&&t._id===i._id},n.prototype.equals=function(e){return n.equals(this,e)},n}),define("Cesium/Core/freezeObject",["./defined"],function(e){"use strict";var t=Object.freeze;return e(t)||(t=function(e){return e}),t}),define("Cesium/Core/defaultValue",["./freezeObject"],function(e){"use strict";function t(e,t){return void 0!==e?e:t}return t.EMPTY_OBJECT=e({}),t}),define("Cesium/ThirdParty/mersenne-twister",[],function(){var e=function(e){void 0==e&&(e=(new Date).getTime()),this.N=624,this.M=397,this.MATRIX_A=2567483615,this.UPPER_MASK=2147483648,this.LOWER_MASK=2147483647,this.mt=new Array(this.N),this.mti=this.N+1,this.init_genrand(e)};return e.prototype.init_genrand=function(e){for(this.mt[0]=e>>>0,this.mti=1;this.mti>>30;this.mt[this.mti]=(1812433253*((4294901760&e)>>>16)<<16)+1812433253*(65535&e)+this.mti,this.mt[this.mti]>>>=0}},e.prototype.genrand_int32=function(){var e,t=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var i;for(this.mti==this.N+1&&this.init_genrand(5489),i=0;i>>1^t[1&e];for(;i>>1^t[1&e];e=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^e>>>1^t[1&e],this.mti=0}return e=this.mt[this.mti++],e^=e>>>11,e^=e<<7&2636928640,e^=e<<15&4022730752,e^=e>>>18,e>>>0},e.prototype.random=function(){return this.genrand_int32()*(1/4294967296)},e}),define("Cesium/Core/Math",["../ThirdParty/mersenne-twister","./defaultValue","./defined","./DeveloperError"],function(e,t,i,n){"use strict";var r={};r.EPSILON1=.1,r.EPSILON2=.01,r.EPSILON3=.001,r.EPSILON4=1e-4,r.EPSILON5=1e-5,r.EPSILON6=1e-6,r.EPSILON7=1e-7,r.EPSILON8=1e-8,r.EPSILON9=1e-9,r.EPSILON10=1e-10,r.EPSILON11=1e-11,r.EPSILON12=1e-12,r.EPSILON13=1e-13,r.EPSILON14=1e-14,r.EPSILON15=1e-15,r.EPSILON16=1e-16,r.EPSILON17=1e-17,r.EPSILON18=1e-18,r.EPSILON19=1e-19,r.EPSILON20=1e-20,r.GRAVITATIONALPARAMETER=3986004418e5,r.SOLAR_RADIUS=6955e5,r.LUNAR_RADIUS=1737400,r.SIXTY_FOUR_KILOBYTES=65536,r.sign=function(e){return e>0?1:0>e?-1:0},r.signNotZero=function(e){return 0>e?-1:1},r.toSNorm=function(e){return Math.round(255*(.5*r.clamp(e,-1,1)+.5))},r.fromSNorm=function(e){return r.clamp(e,0,255)/255*2-1},r.sinh=function(e){var t=Math.pow(Math.E,e),i=Math.pow(Math.E,-1*e);return.5*(t-i)},r.cosh=function(e){var t=Math.pow(Math.E,e),i=Math.pow(Math.E,-1*e);return.5*(t+i)},r.lerp=function(e,t,i){return(1-i)*e+i*t},r.PI=Math.PI,r.ONE_OVER_PI=1/Math.PI,r.PI_OVER_TWO=.5*Math.PI,r.PI_OVER_THREE=Math.PI/3,r.PI_OVER_FOUR=Math.PI/4,r.PI_OVER_SIX=Math.PI/6,r.THREE_PI_OVER_TWO=3*Math.PI*.5,r.TWO_PI=2*Math.PI,r.ONE_OVER_TWO_PI=1/(2*Math.PI),r.RADIANS_PER_DEGREE=Math.PI/180,r.DEGREES_PER_RADIAN=180/Math.PI,r.RADIANS_PER_ARCSECOND=r.RADIANS_PER_DEGREE/3600,r.toRadians=function(e){return e*r.RADIANS_PER_DEGREE},r.toDegrees=function(e){return e*r.DEGREES_PER_RADIAN},r.convertLongitudeRange=function(e){var t=r.TWO_PI,i=e-Math.floor(e/t)*t;return i<-Math.PI?i+t:i>=Math.PI?i-t:i},r.negativePiToPi=function(e){return r.zeroToTwoPi(e+r.PI)-r.PI},r.zeroToTwoPi=function(e){var t=r.mod(e,r.TWO_PI);return Math.abs(t)r.EPSILON14?r.TWO_PI:t},r.mod=function(e,t){return(e%t+t)%t},r.equalsEpsilon=function(e,i,n,r){r=t(r,n);var o=Math.abs(e-i);return r>=o||o<=n*Math.max(Math.abs(e),Math.abs(i))};var o=[1];r.factorial=function(e){var t=o.length;if(e>=t)for(var i=o[t-1],n=t;e>=n;n++)o.push(i*n);return o[e]},r.incrementWrap=function(e,i,n){return n=t(n,0),++e,e>i&&(e=n),e},r.isPowerOfTwo=function(e){return 0!==e&&0===(e&e-1)},r.nextPowerOfTwo=function(e){return--e,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,++e,e},r.clamp=function(e,t,i){return t>e?t:e>i?i:e};var a=new e;return r.setRandomNumberSeed=function(t){a=new e(t)},r.nextRandomNumber=function(){return a.random()},r.acosClamped=function(e){return Math.acos(r.clamp(e,-1,1))},r.asinClamped=function(e){return Math.asin(r.clamp(e,-1,1))},r.chordLength=function(e,t){return 2*t*Math.sin(.5*e)},r.logBase=function(e,t){return Math.log(e)/Math.log(t)},r.fog=function(e,t){var i=e*t;return 1-Math.exp(-(i*i))},r}),define("Cesium/Core/Cartesian3",["./defaultValue","./defined","./DeveloperError","./freezeObject","./Math"],function(e,t,i,n,r){"use strict";function o(t,i,n){this.x=e(t,0),this.y=e(i,0),this.z=e(n,0)}o.fromSpherical=function(i,n){t(n)||(n=new o);var r=i.clock,a=i.cone,s=e(i.magnitude,1),l=s*Math.sin(a);return n.x=l*Math.cos(r),n.y=l*Math.sin(r),n.z=s*Math.cos(a),n},o.fromElements=function(e,i,n,r){return t(r)?(r.x=e,r.y=i,r.z=n,r):new o(e,i,n)},o.clone=function(e,i){return t(e)?t(i)?(i.x=e.x,i.y=e.y,i.z=e.z,i):new o(e.x,e.y,e.z):void 0},o.fromCartesian4=o.clone,o.packedLength=3,o.pack=function(t,i,n){n=e(n,0),i[n++]=t.x,i[n++]=t.y,i[n]=t.z},o.unpack=function(i,n,r){return n=e(n,0),t(r)||(r=new o),r.x=i[n++],r.y=i[n++],r.z=i[n],r},o.packArray=function(e,i){var n=e.length;t(i)?i.length=3*n:i=new Array(3*n);for(var r=0;n>r;++r)o.pack(e[r],i,3*r);return i},o.unpackArray=function(e,i){var n=e.length;t(i)?i.length=n/3:i=new Array(n/3);for(var r=0;n>r;r+=3){var a=r/3;i[a]=o.unpack(e,r,i[a])}return i},o.fromArray=o.unpack,o.maximumComponent=function(e){return Math.max(e.x,e.y,e.z)},o.minimumComponent=function(e){return Math.min(e.x,e.y,e.z)},o.minimumByComponent=function(e,t,i){return i.x=Math.min(e.x,t.x),i.y=Math.min(e.y,t.y),i.z=Math.min(e.z,t.z),i},o.maximumByComponent=function(e,t,i){return i.x=Math.max(e.x,t.x),i.y=Math.max(e.y,t.y),i.z=Math.max(e.z,t.z),i},o.magnitudeSquared=function(e){return e.x*e.x+e.y*e.y+e.z*e.z},o.magnitude=function(e){return Math.sqrt(o.magnitudeSquared(e))};var a=new o;o.distance=function(e,t){return o.subtract(e,t,a),o.magnitude(a)},o.distanceSquared=function(e,t){return o.subtract(e,t,a),o.magnitudeSquared(a)},o.normalize=function(e,t){var i=o.magnitude(e);return t.x=e.x/i,t.y=e.y/i,t.z=e.z/i,t},o.dot=function(e,t){return e.x*t.x+e.y*t.y+e.z*t.z},o.multiplyComponents=function(e,t,i){return i.x=e.x*t.x,i.y=e.y*t.y,i.z=e.z*t.z,i},o.add=function(e,t,i){return i.x=e.x+t.x,i.y=e.y+t.y,i.z=e.z+t.z,i},o.subtract=function(e,t,i){return i.x=e.x-t.x,i.y=e.y-t.y,i.z=e.z-t.z,i},o.multiplyByScalar=function(e,t,i){return i.x=e.x*t,i.y=e.y*t,i.z=e.z*t,i},o.divideByScalar=function(e,t,i){return i.x=e.x/t,i.y=e.y/t,i.z=e.z/t,i},o.negate=function(e,t){return t.x=-e.x,t.y=-e.y,t.z=-e.z,t},o.abs=function(e,t){return t.x=Math.abs(e.x),t.y=Math.abs(e.y),t.z=Math.abs(e.z),t};var s=new o;o.lerp=function(e,t,i,n){return o.multiplyByScalar(t,i,s),n=o.multiplyByScalar(e,1-i,n),o.add(s,n,n)};var l=new o,u=new o;o.angleBetween=function(e,t){o.normalize(e,l),o.normalize(t,u);var i=o.dot(l,u),n=o.magnitude(o.cross(l,u,l));return Math.atan2(n,i)};var c=new o;o.mostOrthogonalAxis=function(e,t){var i=o.normalize(e,c);return o.abs(i,i),t=i.x<=i.y?i.x<=i.z?o.clone(o.UNIT_X,t):o.clone(o.UNIT_Z,t):i.y<=i.z?o.clone(o.UNIT_Y,t):o.clone(o.UNIT_Z,t)},o.equals=function(e,i){return e===i||t(e)&&t(i)&&e.x===i.x&&e.y===i.y&&e.z===i.z},o.equalsArray=function(e,t,i){return e.x===t[i]&&e.y===t[i+1]&&e.z===t[i+2]},o.equalsEpsilon=function(e,i,n,o){return e===i||t(e)&&t(i)&&r.equalsEpsilon(e.x,i.x,n,o)&&r.equalsEpsilon(e.y,i.y,n,o)&&r.equalsEpsilon(e.z,i.z,n,o)},o.cross=function(e,t,i){var n=e.x,r=e.y,o=e.z,a=t.x,s=t.y,l=t.z,u=r*l-o*s,c=o*a-n*l,h=n*s-r*a;return i.x=u,i.y=c,i.z=h,i},o.fromDegrees=function(e,t,i,n,a){return e=r.toRadians(e),t=r.toRadians(t),o.fromRadians(e,t,i,n,a)};var h=new o,d=new o,p=new o(40680631590769,40680631590769,40408299984661.445);return o.fromRadians=function(i,n,r,a,s){r=e(r,0);var l=t(a)?a.radiiSquared:p,u=Math.cos(n);h.x=u*Math.cos(i),h.y=u*Math.sin(i),h.z=Math.sin(n),h=o.normalize(h,h),o.multiplyComponents(l,h,d);var c=Math.sqrt(o.dot(h,d));return d=o.divideByScalar(d,c,d),h=o.multiplyByScalar(h,r,h),t(s)||(s=new o),o.add(d,h,s)},o.fromDegreesArray=function(e,i,n){var r=e.length;t(n)?n.length=r/2:n=new Array(r/2);for(var a=0;r>a;a+=2){var s=e[a],l=e[a+1],u=a/2;n[u]=o.fromDegrees(s,l,0,i,n[u])}return n},o.fromRadiansArray=function(e,i,n){var r=e.length;t(n)?n.length=r/2:n=new Array(r/2);for(var a=0;r>a;a+=2){var s=e[a],l=e[a+1],u=a/2;n[u]=o.fromRadians(s,l,0,i,n[u])}return n},o.fromDegreesArrayHeights=function(e,i,n){var r=e.length;t(n)?n.length=r/3:n=new Array(r/3);for(var a=0;r>a;a+=3){var s=e[a],l=e[a+1],u=e[a+2],c=a/3;n[c]=o.fromDegrees(s,l,u,i,n[c])}return n},o.fromRadiansArrayHeights=function(e,i,n){var r=e.length;t(n)?n.length=r/3:n=new Array(r/3);for(var a=0;r>a;a+=3){var s=e[a],l=e[a+1],u=e[a+2],c=a/3;n[c]=o.fromRadians(s,l,u,i,n[c])}return n},o.ZERO=n(new o(0,0,0)),o.UNIT_X=n(new o(1,0,0)),o.UNIT_Y=n(new o(0,1,0)),o.UNIT_Z=n(new o(0,0,1)),o.prototype.clone=function(e){return o.clone(this,e)},o.prototype.equals=function(e){return o.equals(this,e)},o.prototype.equalsEpsilon=function(e,t,i){return o.equalsEpsilon(this,e,t,i)},o.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"},o}),define("Cesium/Core/scaleToGeodeticSurface",["./Cartesian3","./defined","./DeveloperError","./Math"],function(e,t,i,n){"use strict";function r(i,r,s,l,u){var c=i.x,h=i.y,d=i.z,p=r.x,m=r.y,f=r.z,g=c*c*p*p,v=h*h*m*m,_=d*d*f*f,y=g+v+_,C=Math.sqrt(1/y),w=e.multiplyByScalar(i,C,o);if(l>y)return isFinite(C)?e.clone(w,u):void 0;var E=s.x,b=s.y,S=s.z,T=a;T.x=w.x*E*2,T.y=w.y*b*2,T.z=w.z*S*2;var x,A,P,M,D,I,R,O,L,N,F,k=(1-C)*e.magnitude(i)/(.5*e.magnitude(T)),B=0;do{k-=B,P=1/(1+k*E),M=1/(1+k*b),D=1/(1+k*S),I=P*P,R=M*M,O=D*D,L=I*P,N=R*M,F=O*D,x=g*I+v*R+_*O-1,A=g*L*E+v*N*b+_*F*S;var z=-2*A;B=x/z}while(Math.abs(x)>n.EPSILON12);return t(u)?(u.x=c*P,u.y=h*M,u.z=d*D,u):new e(c*P,h*M,d*D)}var o=new e,a=new e;return r}),define("Cesium/Core/Cartographic",["./Cartesian3","./defaultValue","./defined","./DeveloperError","./freezeObject","./Math","./scaleToGeodeticSurface"],function(e,t,i,n,r,o,a){"use strict";function s(e,i,n){this.longitude=t(e,0),this.latitude=t(i,0),this.height=t(n,0)}s.fromRadians=function(e,n,r,o){return r=t(r,0),i(o)?(o.longitude=e,o.latitude=n,o.height=r,o):new s(e,n,r)},s.fromDegrees=function(e,t,i,n){return e=o.toRadians(e),t=o.toRadians(t),s.fromRadians(e,t,i,n)};var l=new e,u=new e,c=new e,h=new e(1/6378137,1/6378137,1/6356752.314245179),d=new e(1/40680631590769,1/40680631590769,1/40408299984661.445),p=o.EPSILON1;return s.fromCartesian=function(t,n,r){var m=i(n)?n.oneOverRadii:h,f=i(n)?n.oneOverRadiiSquared:d,g=i(n)?n._centerToleranceSquared:p,v=a(t,m,f,g,u);if(i(v)){var _=e.multiplyComponents(t,f,l);_=e.normalize(_,_);var y=e.subtract(t,v,c),C=Math.atan2(_.y,_.x),w=Math.asin(_.z),E=o.sign(e.dot(y,t))*e.magnitude(y);return i(r)?(r.longitude=C,r.latitude=w,r.height=E,r):new s(C,w,E)}},s.clone=function(e,t){return i(e)?i(t)?(t.longitude=e.longitude,t.latitude=e.latitude,t.height=e.height,t):new s(e.longitude,e.latitude,e.height):void 0},s.equals=function(e,t){return e===t||i(e)&&i(t)&&e.longitude===t.longitude&&e.latitude===t.latitude&&e.height===t.height},s.equalsEpsilon=function(e,t,n){return e===t||i(e)&&i(t)&&Math.abs(e.longitude-t.longitude)<=n&&Math.abs(e.latitude-t.latitude)<=n&&Math.abs(e.height-t.height)<=n},s.ZERO=r(new s(0,0,0)),s.prototype.clone=function(e){return s.clone(this,e)},s.prototype.equals=function(e){return s.equals(this,e)},s.prototype.equalsEpsilon=function(e,t){return s.equalsEpsilon(this,e,t)},s.prototype.toString=function(){return"("+this.longitude+", "+this.latitude+", "+this.height+")"},s}),define("Cesium/Core/Ellipsoid",["./Cartesian3","./Cartographic","./defaultValue","./defined","./defineProperties","./DeveloperError","./freezeObject","./Math","./scaleToGeodeticSurface"],function(e,t,i,n,r,o,a,s,l){"use strict";function u(t,n,r,o){n=i(n,0),r=i(r,0),o=i(o,0),t._radii=new e(n,r,o),t._radiiSquared=new e(n*n,r*r,o*o),t._radiiToTheFourth=new e(n*n*n*n,r*r*r*r,o*o*o*o),t._oneOverRadii=new e(0===n?0:1/n,0===r?0:1/r,0===o?0:1/o),t._oneOverRadiiSquared=new e(0===n?0:1/(n*n),0===r?0:1/(r*r),0===o?0:1/(o*o)),t._minimumRadius=Math.min(n,r,o),t._maximumRadius=Math.max(n,r,o),t._centerToleranceSquared=s.EPSILON1}function c(e,t,i){this._radii=void 0,this._radiiSquared=void 0,this._radiiToTheFourth=void 0,this._oneOverRadii=void 0,this._oneOverRadiiSquared=void 0,this._minimumRadius=void 0,this._maximumRadius=void 0,this._centerToleranceSquared=void 0,u(this,e,t,i)}r(c.prototype,{radii:{get:function(){return this._radii}},radiiSquared:{get:function(){return this._radiiSquared}},radiiToTheFourth:{get:function(){return this._radiiToTheFourth}},oneOverRadii:{get:function(){return this._oneOverRadii}},oneOverRadiiSquared:{get:function(){return this._oneOverRadiiSquared}},minimumRadius:{get:function(){return this._minimumRadius}},maximumRadius:{get:function(){return this._maximumRadius}}}),c.clone=function(t,i){if(n(t)){var r=t._radii;return n(i)?(e.clone(r,i._radii),e.clone(t._radiiSquared,i._radiiSquared),e.clone(t._radiiToTheFourth,i._radiiToTheFourth),e.clone(t._oneOverRadii,i._oneOverRadii),e.clone(t._oneOverRadiiSquared,i._oneOverRadiiSquared),i._minimumRadius=t._minimumRadius,i._maximumRadius=t._maximumRadius,i._centerToleranceSquared=t._centerToleranceSquared,i):new c(r.x,r.y,r.z)}},c.fromCartesian3=function(e,t){return n(t)||(t=new c),n(e)?(u(t,e.x,e.y,e.z),t):t},c.WGS84=a(new c(6378137,6378137,6356752.314245179)),c.UNIT_SPHERE=a(new c(1,1,1)),c.MOON=a(new c(s.LUNAR_RADIUS,s.LUNAR_RADIUS,s.LUNAR_RADIUS)),c.prototype.clone=function(e){return c.clone(this,e)},c.packedLength=e.packedLength,c.pack=function(t,n,r){r=i(r,0),e.pack(t._radii,n,r)},c.unpack=function(t,n,r){n=i(n,0);var o=e.unpack(t,n);return c.fromCartesian3(o,r)},c.prototype.geocentricSurfaceNormal=e.normalize,c.prototype.geodeticSurfaceNormalCartographic=function(t,i){var r=t.longitude,o=t.latitude,a=Math.cos(o),s=a*Math.cos(r),l=a*Math.sin(r),u=Math.sin(o);return n(i)||(i=new e),i.x=s,i.y=l,i.z=u,e.normalize(i,i)},c.prototype.geodeticSurfaceNormal=function(t,i){return n(i)||(i=new e),i=e.multiplyComponents(t,this._oneOverRadiiSquared,i),e.normalize(i,i)};var h=new e,d=new e;c.prototype.cartographicToCartesian=function(t,i){var r=h,o=d;this.geodeticSurfaceNormalCartographic(t,r),e.multiplyComponents(this._radiiSquared,r,o);var a=Math.sqrt(e.dot(r,o));return e.divideByScalar(o,a,o),e.multiplyByScalar(r,t.height,r),n(i)||(i=new e),e.add(o,r,i)},c.prototype.cartographicArrayToCartesianArray=function(e,t){var i=e.length;n(t)?t.length=i:t=new Array(i);for(var r=0;i>r;r++)t[r]=this.cartographicToCartesian(e[r],t[r]);return t};var p=new e,m=new e,f=new e;return c.prototype.cartesianToCartographic=function(i,r){var o=this.scaleToGeodeticSurface(i,m);if(n(o)){var a=this.geodeticSurfaceNormal(o,p),l=e.subtract(i,o,f),u=Math.atan2(a.y,a.x),c=Math.asin(a.z),h=s.sign(e.dot(l,i))*e.magnitude(l);return n(r)?(r.longitude=u,r.latitude=c,r.height=h,r):new t(u,c,h)}},c.prototype.cartesianArrayToCartographicArray=function(e,t){var i=e.length;n(t)?t.length=i:t=new Array(i);for(var r=0;i>r;++r)t[r]=this.cartesianToCartographic(e[r],t[r]);return t},c.prototype.scaleToGeodeticSurface=function(e,t){return l(e,this._oneOverRadii,this._oneOverRadiiSquared,this._centerToleranceSquared,t)},c.prototype.scaleToGeocentricSurface=function(t,i){n(i)||(i=new e);var r=t.x,o=t.y,a=t.z,s=this._oneOverRadiiSquared,l=1/Math.sqrt(r*r*s.x+o*o*s.y+a*a*s.z);return e.multiplyByScalar(t,l,i)},c.prototype.transformPositionToScaledSpace=function(t,i){return n(i)||(i=new e),e.multiplyComponents(t,this._oneOverRadii,i)},c.prototype.transformPositionFromScaledSpace=function(t,i){return n(i)||(i=new e),e.multiplyComponents(t,this._radii,i)},c.prototype.equals=function(t){return this===t||n(t)&&e.equals(this._radii,t._radii)},c.prototype.toString=function(){return this._radii.toString()},c}),define("Cesium/Core/Event",["./defined","./defineProperties","./DeveloperError"],function(e,t,i){"use strict";function n(){this._listeners=[],this._scopes=[],this._toRemove=[],this._insideRaiseEvent=!1}return t(n.prototype,{numberOfListeners:{get:function(){return this._listeners.length-this._toRemove.length}}}),n.prototype.addEventListener=function(e,t){this._listeners.push(e),this._scopes.push(t);var i=this;return function(){i.removeEventListener(e,t)}},n.prototype.removeEventListener=function(e,t){for(var i=this._listeners,n=this._scopes,r=-1,o=0;ot;t++){var o=i[t];e(o)&&i[t].apply(n[t],arguments)}var a=this._toRemove;for(r=a.length,t=0;r>t;t++){var s=a[t];i.splice(s,1),n.splice(s,1)}a.length=0,this._insideRaiseEvent=!1},n}),define("Cesium/Core/Cartesian2",["./defaultValue","./defined","./DeveloperError","./freezeObject","./Math"],function(e,t,i,n,r){"use strict";function o(t,i){this.x=e(t,0),this.y=e(i,0)}o.fromElements=function(e,i,n){return t(n)?(n.x=e,n.y=i,n):new o(e,i)},o.clone=function(e,i){return t(e)?t(i)?(i.x=e.x,i.y=e.y,i):new o(e.x,e.y):void 0},o.fromCartesian3=o.clone,o.fromCartesian4=o.clone,o.packedLength=2,o.pack=function(t,i,n){n=e(n,0),i[n++]=t.x,i[n]=t.y},o.unpack=function(i,n,r){return n=e(n,0),t(r)||(r=new o),r.x=i[n++],r.y=i[n],r},o.packArray=function(e,i){var n=e.length;t(i)?i.length=2*n:i=new Array(2*n);for(var r=0;n>r;++r)o.pack(e[r],i,2*r);return i},o.unpackArray=function(e,i){var n=e.length;t(i)?i.length=n/2:i=new Array(n/2);for(var r=0;n>r;r+=2){var a=r/2;i[a]=o.unpack(e,r,i[a])}return i},o.fromArray=o.unpack,o.maximumComponent=function(e){return Math.max(e.x,e.y)},o.minimumComponent=function(e){return Math.min(e.x,e.y)},o.minimumByComponent=function(e,t,i){return i.x=Math.min(e.x,t.x),i.y=Math.min(e.y,t.y),i},o.maximumByComponent=function(e,t,i){return i.x=Math.max(e.x,t.x),i.y=Math.max(e.y,t.y),i},o.magnitudeSquared=function(e){return e.x*e.x+e.y*e.y},o.magnitude=function(e){return Math.sqrt(o.magnitudeSquared(e))};var a=new o;o.distance=function(e,t){return o.subtract(e,t,a),o.magnitude(a)},o.distanceSquared=function(e,t){return o.subtract(e,t,a),o.magnitudeSquared(a)},o.normalize=function(e,t){var i=o.magnitude(e);return t.x=e.x/i,t.y=e.y/i,t},o.dot=function(e,t){return e.x*t.x+e.y*t.y},o.multiplyComponents=function(e,t,i){return i.x=e.x*t.x,i.y=e.y*t.y,i},o.add=function(e,t,i){return i.x=e.x+t.x,i.y=e.y+t.y,i},o.subtract=function(e,t,i){return i.x=e.x-t.x,i.y=e.y-t.y,i},o.multiplyByScalar=function(e,t,i){return i.x=e.x*t,i.y=e.y*t,i},o.divideByScalar=function(e,t,i){return i.x=e.x/t,i.y=e.y/t,i},o.negate=function(e,t){return t.x=-e.x,t.y=-e.y,t},o.abs=function(e,t){return t.x=Math.abs(e.x),t.y=Math.abs(e.y),t};var s=new o;o.lerp=function(e,t,i,n){return o.multiplyByScalar(t,i,s),n=o.multiplyByScalar(e,1-i,n),o.add(s,n,n)};var l=new o,u=new o;o.angleBetween=function(e,t){return o.normalize(e,l),o.normalize(t,u),r.acosClamped(o.dot(l,u))};var c=new o;return o.mostOrthogonalAxis=function(e,t){var i=o.normalize(e,c);return o.abs(i,i),t=i.x<=i.y?o.clone(o.UNIT_X,t):o.clone(o.UNIT_Y,t)},o.equals=function(e,i){return e===i||t(e)&&t(i)&&e.x===i.x&&e.y===i.y},o.equalsArray=function(e,t,i){return e.x===t[i]&&e.y===t[i+1]},o.equalsEpsilon=function(e,i,n,o){return e===i||t(e)&&t(i)&&r.equalsEpsilon(e.x,i.x,n,o)&&r.equalsEpsilon(e.y,i.y,n,o)},o.ZERO=n(new o(0,0)),o.UNIT_X=n(new o(1,0)),o.UNIT_Y=n(new o(0,1)),o.prototype.clone=function(e){return o.clone(this,e)},o.prototype.equals=function(e){return o.equals(this,e)},o.prototype.equalsEpsilon=function(e,t,i){return o.equalsEpsilon(this,e,t,i)},o.prototype.toString=function(){return"("+this.x+", "+this.y+")"},o}),define("Cesium/Core/GeographicProjection",["./Cartesian3","./Cartographic","./defaultValue","./defined","./defineProperties","./DeveloperError","./Ellipsoid"],function(e,t,i,n,r,o,a){"use strict";function s(e){this._ellipsoid=i(e,a.WGS84),this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}return r(s.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),s.prototype.project=function(t,i){var r=this._semimajorAxis,o=t.longitude*r,a=t.latitude*r,s=t.height;return n(i)?(i.x=o,i.y=a,i.z=s,i):new e(o,a,s)},s.prototype.unproject=function(e,i){var r=this._oneOverSemimajorAxis,o=e.x*r,a=e.y*r,s=e.z;return n(i)?(i.longitude=o,i.latitude=a,i.height=s,i):new t(o,a,s)},s}),define("Cesium/Core/Rectangle",["./Cartographic","./defaultValue","./defined","./defineProperties","./DeveloperError","./Ellipsoid","./freezeObject","./Math"],function(e,t,i,n,r,o,a,s){"use strict";function l(e,i,n,r){this.west=t(e,0),this.south=t(i,0),this.east=t(n,0),this.north=t(r,0)}n(l.prototype,{width:{get:function(){return l.computeWidth(this)}},height:{get:function(){return l.computeHeight(this)}}}),l.packedLength=4,l.pack=function(e,i,n){n=t(n,0),i[n++]=e.west,i[n++]=e.south,i[n++]=e.east,i[n]=e.north},l.unpack=function(e,n,r){return n=t(n,0),i(r)||(r=new l),r.west=e[n++],r.south=e[n++],r.east=e[n++],r.north=e[n],r},l.computeWidth=function(e){var t=e.east,i=e.west;return i>t&&(t+=s.TWO_PI),t-i},l.computeHeight=function(e){return e.north-e.south},l.fromDegrees=function(e,n,r,o,a){return e=s.toRadians(t(e,0)),n=s.toRadians(t(n,0)),r=s.toRadians(t(r,0)),o=s.toRadians(t(o,0)),i(a)?(a.west=e,a.south=n,a.east=r,a.north=o,a):new l(e,n,r,o)},l.fromCartographicArray=function(e,t){for(var n=Number.MAX_VALUE,r=-Number.MAX_VALUE,o=Number.MAX_VALUE,a=-Number.MAX_VALUE,u=Number.MAX_VALUE,c=-Number.MAX_VALUE,h=0,d=e.length;d>h;h++){var p=e[h];n=Math.min(n,p.longitude),r=Math.max(r,p.longitude),u=Math.min(u,p.latitude),c=Math.max(c,p.latitude);var m=p.longitude>=0?p.longitude:p.longitude+s.TWO_PI;o=Math.min(o,m),a=Math.max(a,m)}return r-n>a-o&&(n=o,r=a,r>s.PI&&(r-=s.TWO_PI),n>s.PI&&(n-=s.TWO_PI)),i(t)?(t.west=n,t.south=u,t.east=r,t.north=c,t):new l(n,u,r,c)},l.fromCartesianArray=function(e,t,n){for(var r=Number.MAX_VALUE,o=-Number.MAX_VALUE,a=Number.MAX_VALUE,u=-Number.MAX_VALUE,c=Number.MAX_VALUE,h=-Number.MAX_VALUE,d=0,p=e.length;p>d;d++){var m=t.cartesianToCartographic(e[d]);r=Math.min(r,m.longitude),o=Math.max(o,m.longitude),c=Math.min(c,m.latitude),h=Math.max(h,m.latitude);var f=m.longitude>=0?m.longitude:m.longitude+s.TWO_PI;a=Math.min(a,f),u=Math.max(u,f)}return o-r>u-a&&(r=a,o=u,o>s.PI&&(o-=s.TWO_PI),r>s.PI&&(r-=s.TWO_PI)),i(n)?(n.west=r,n.south=c,n.east=o,n.north=h,n):new l(r,c,o,h)},l.clone=function(e,t){return i(e)?i(t)?(t.west=e.west,t.south=e.south,t.east=e.east,t.north=e.north,t):new l(e.west,e.south,e.east,e.north):void 0},l.prototype.clone=function(e){return l.clone(this,e)},l.prototype.equals=function(e){return l.equals(this,e)},l.equals=function(e,t){return e===t||i(e)&&i(t)&&e.west===t.west&&e.south===t.south&&e.east===t.east&&e.north===t.north},l.prototype.equalsEpsilon=function(e,t){return i(e)&&Math.abs(this.west-e.west)<=t&&Math.abs(this.south-e.south)<=t&&Math.abs(this.east-e.east)<=t&&Math.abs(this.north-e.north)<=t},l.validate=function(e){},l.southwest=function(t,n){return i(n)?(n.longitude=t.west,n.latitude=t.south,n.height=0,n):new e(t.west,t.south)},l.northwest=function(t,n){return i(n)?(n.longitude=t.west,n.latitude=t.north,n.height=0,n):new e(t.west,t.north)},l.northeast=function(t,n){return i(n)?(n.longitude=t.east,n.latitude=t.north,n.height=0,n):new e(t.east,t.north)},l.southeast=function(t,n){return i(n)?(n.longitude=t.east,n.latitude=t.south,n.height=0,n):new e(t.east,t.south)},l.center=function(t,n){var r=t.east,o=t.west;o>r&&(r+=s.TWO_PI);var a=s.negativePiToPi(.5*(o+r)),l=.5*(t.south+t.north);return i(n)?(n.longitude=a,n.latitude=l,n.height=0,n):new e(a,l)},l.intersection=function(e,t,n){var r=e.east,o=e.west,a=t.east,u=t.west;o>r&&a>0?r+=s.TWO_PI:u>a&&r>0&&(a+=s.TWO_PI),o>r&&0>u?u+=s.TWO_PI:u>a&&0>o&&(o+=s.TWO_PI);var c=s.negativePiToPi(Math.max(o,u)),h=s.negativePiToPi(Math.min(r,a));if(!((e.west=h)){var d=Math.max(e.south,t.south),p=Math.min(e.north,t.north);if(!(d>=p))return i(n)?(n.west=c,n.south=d,n.east=h,n.north=p,n):new l(c,d,h,p)}},l.union=function(e,t,n){return i(n)||(n=new l),n.west=Math.min(e.west,t.west),n.south=Math.min(e.south,t.south),n.east=Math.max(e.east,t.east),n.north=Math.max(e.north,t.north),n},l.expand=function(e,t,n){return i(n)||(n=new l),n.west=Math.min(e.west,t.longitude),n.south=Math.min(e.south,t.latitude),n.east=Math.max(e.east,t.longitude),n.north=Math.max(e.north,t.latitude),n},l.contains=function(e,t){var i=t.longitude,n=t.latitude,r=e.west,o=e.east;return r>o&&(o+=s.TWO_PI,0>i&&(i+=s.TWO_PI)),(i>r||s.equalsEpsilon(i,r,s.EPSILON14))&&(o>i||s.equalsEpsilon(i,o,s.EPSILON14))&&n>=e.south&&n<=e.north};var u=new e;return l.subsample=function(e,n,r,a){n=t(n,o.WGS84),r=t(r,0),i(a)||(a=[]);var c=0,h=e.north,d=e.south,p=e.east,m=e.west,f=u;f.height=r,f.longitude=m,f.latitude=h,a[c]=n.cartographicToCartesian(f,a[c]),c++,f.longitude=p,a[c]=n.cartographicToCartesian(f,a[c]),c++,f.latitude=d,a[c]=n.cartographicToCartesian(f,a[c]),c++,f.longitude=m,a[c]=n.cartographicToCartesian(f,a[c]),c++,0>h?f.latitude=h:d>0?f.latitude=d:f.latitude=0;for(var g=1;8>g;++g)f.longitude=-Math.PI+g*s.PI_OVER_TWO,l.contains(e,f)&&(a[c]=n.cartographicToCartesian(f,a[c]),c++);return 0===f.latitude&&(f.longitude=m,a[c]=n.cartographicToCartesian(f,a[c]),c++,f.longitude=p,a[c]=n.cartographicToCartesian(f,a[c]),c++),a.length=c,a},l.MAX_VALUE=a(new l(-Math.PI,-s.PI_OVER_TWO,Math.PI,s.PI_OVER_TWO)),l}),define("Cesium/Core/GeographicTilingScheme",["./Cartesian2","./defaultValue","./defined","./defineProperties","./DeveloperError","./Ellipsoid","./GeographicProjection","./Math","./Rectangle"],function(e,t,i,n,r,o,a,s,l){"use strict";function u(e){e=t(e,{}),this._ellipsoid=t(e.ellipsoid,o.WGS84),this._rectangle=t(e.rectangle,l.MAX_VALUE),this._projection=new a(this._ellipsoid),this._numberOfLevelZeroTilesX=t(e.numberOfLevelZeroTilesX,2),this._numberOfLevelZeroTilesY=t(e.numberOfLevelZeroTilesY,1)}return n(u.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}}}),u.prototype.getNumberOfXTilesAtLevel=function(e){return this._numberOfLevelZeroTilesX<=a&&(p=a-1);var m=(o.north-t.latitude)/h|0;return m>=u&&(m=u-1),i(r)?(r.x=p,r.y=m,r):new e(p,m)}},u}),define("Cesium/Core/getImagePixels",["./defined"],function(e){"use strict";function t(t,n,r){e(n)||(n=t.width),e(r)||(r=t.height);var o=i[n];e(o)||(o={},i[n]=o);var a=o[r];if(!e(a)){var s=document.createElement("canvas");s.width=n,s.height=r,a=s.getContext("2d"),a.globalCompositeOperation="copy",o[r]=a}return a.drawImage(t,0,0,n,r),a.getImageData(0,0,n,r).data}var i={};return t}),define("Cesium/Core/Intersect",["./freezeObject"],function(e){"use strict";var t={OUTSIDE:-1,INTERSECTING:0,INSIDE:1};return e(t)}),define("Cesium/Core/AxisAlignedBoundingBox",["./Cartesian3","./defaultValue","./defined","./DeveloperError","./Intersect"],function(e,t,i,n,r){"use strict";function o(n,r,o){this.minimum=e.clone(t(n,e.ZERO)),this.maximum=e.clone(t(r,e.ZERO)),i(o)?o=e.clone(o):(o=e.add(this.minimum,this.maximum,new e),e.multiplyByScalar(o,.5,o)),this.center=o}o.fromPoints=function(t,n){if(i(n)||(n=new o),!i(t)||0===t.length)return n.minimum=e.clone(e.ZERO,n.minimum),n.maximum=e.clone(e.ZERO,n.maximum),n.center=e.clone(e.ZERO,n.center),n;for(var r=t[0].x,a=t[0].y,s=t[0].z,l=t[0].x,u=t[0].y,c=t[0].z,h=t.length,d=1;h>d;d++){var p=t[d],m=p.x,f=p.y,g=p.z;r=Math.min(m,r),l=Math.max(m,l),a=Math.min(f,a),u=Math.max(f,u),s=Math.min(g,s),c=Math.max(g,c)}var v=n.minimum;v.x=r,v.y=a,v.z=s;var _=n.maximum;_.x=l,_.y=u,_.z=c;var y=e.add(v,_,n.center);return e.multiplyByScalar(y,.5,y),n},o.clone=function(t,n){return i(t)?i(n)?(n.minimum=e.clone(t.minimum,n.minimum),n.maximum=e.clone(t.maximum,n.maximum),n.center=e.clone(t.center,n.center),n):new o(t.minimum,t.maximum):void 0},o.equals=function(t,n){return t===n||i(t)&&i(n)&&e.equals(t.center,n.center)&&e.equals(t.minimum,n.minimum)&&e.equals(t.maximum,n.maximum)};var a=new e;return o.intersectPlane=function(t,i){a=e.subtract(t.maximum,t.minimum,a);var n=e.multiplyByScalar(a,.5,a),o=i.normal,s=n.x*Math.abs(o.x)+n.y*Math.abs(o.y)+n.z*Math.abs(o.z),l=e.dot(t.center,o)+i.distance;return l-s>0?r.INSIDE:0>l+s?r.OUTSIDE:r.INTERSECTING},o.prototype.clone=function(e){return o.clone(this,e)},o.prototype.intersectPlane=function(e){return o.intersectPlane(this,e)},o.prototype.equals=function(e){return o.equals(this,e)},o}),define("Cesium/Core/Interval",["./defaultValue"],function(e){"use strict";function t(t,i){this.start=e(t,0),this.stop=e(i,0)}return t}),define("Cesium/Core/Matrix3",["./Cartesian3","./defaultValue","./defined","./defineProperties","./DeveloperError","./freezeObject","./Math"],function(e,t,i,n,r,o,a){"use strict";function s(e,i,n,r,o,a,s,l,u){this[0]=t(e,0),this[1]=t(r,0),this[2]=t(s,0),this[3]=t(i,0),this[4]=t(o,0),this[5]=t(l,0),this[6]=t(n,0),this[7]=t(a,0),this[8]=t(u,0)}function l(e){for(var t=0,i=0;9>i;++i){var n=e[i];t+=n*n}return Math.sqrt(t)}function u(e){for(var t=0,i=0;3>i;++i){var n=e[s.getElementIndex(m[i],p[i])];t+=2*n*n}return Math.sqrt(t)}function c(e,t){for(var i=a.EPSILON15,n=0,r=1,o=0;3>o;++o){var l=Math.abs(e[s.getElementIndex(m[o],p[o])]);l>n&&(r=o,n=l)}var u=1,c=0,h=p[r],d=m[r];if(Math.abs(e[s.getElementIndex(d,h)])>i){var f,g=e[s.getElementIndex(d,d)],v=e[s.getElementIndex(h,h)],_=e[s.getElementIndex(d,h)],y=(g-v)/2/_;f=0>y?-1/(-y+Math.sqrt(1+y*y)):1/(y+Math.sqrt(1+y*y)),u=1/Math.sqrt(1+f*f),c=f*u}return t=s.clone(s.IDENTITY,t),t[s.getElementIndex(h,h)]=t[s.getElementIndex(d,d)]=u,t[s.getElementIndex(d,h)]=c,t[s.getElementIndex(h,d)]=-c,t}s.packedLength=9,s.pack=function(e,i,n){n=t(n,0),i[n++]=e[0],i[n++]=e[1],i[n++]=e[2],i[n++]=e[3],i[n++]=e[4],i[n++]=e[5],i[n++]=e[6],i[n++]=e[7],i[n++]=e[8]},s.unpack=function(e,n,r){return n=t(n,0),i(r)||(r=new s),r[0]=e[n++],r[1]=e[n++],r[2]=e[n++],r[3]=e[n++],r[4]=e[n++],r[5]=e[n++],r[6]=e[n++],r[7]=e[n++],r[8]=e[n++],r},s.clone=function(e,t){return i(e)?i(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t):new s(e[0],e[3],e[6],e[1],e[4],e[7],e[2],e[5],e[8]):void 0},s.fromArray=function(e,n,r){return n=t(n,0),i(r)||(r=new s),r[0]=e[n],r[1]=e[n+1],r[2]=e[n+2],r[3]=e[n+3],r[4]=e[n+4],r[5]=e[n+5],r[6]=e[n+6],r[7]=e[n+7],r[8]=e[n+8],r},s.fromColumnMajorArray=function(e,t){return s.clone(e,t)},s.fromRowMajorArray=function(e,t){return i(t)?(t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],t):new s(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8])},s.fromQuaternion=function(e,t){var n=e.x*e.x,r=e.x*e.y,o=e.x*e.z,a=e.x*e.w,l=e.y*e.y,u=e.y*e.z,c=e.y*e.w,h=e.z*e.z,d=e.z*e.w,p=e.w*e.w,m=n-l-h+p,f=2*(r-d),g=2*(o+c),v=2*(r+d),_=-n+l-h+p,y=2*(u-a),C=2*(o-c),w=2*(u+a),E=-n-l+h+p;return i(t)?(t[0]=m,t[1]=v,t[2]=C,t[3]=f,t[4]=_,t[5]=w,t[6]=g,t[7]=y,t[8]=E,t):new s(m,f,g,v,_,y,C,w,E)},s.fromScale=function(e,t){return i(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=0,t[4]=e.y,t[5]=0,t[6]=0,t[7]=0,t[8]=e.z,t):new s(e.x,0,0,0,e.y,0,0,0,e.z)},s.fromUniformScale=function(e,t){return i(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=0,t[4]=e,t[5]=0,t[6]=0,t[7]=0,t[8]=e,t):new s(e,0,0,0,e,0,0,0,e)},s.fromCrossProduct=function(e,t){return i(t)?(t[0]=0,t[1]=e.z,t[2]=-e.y,t[3]=-e.z,t[4]=0,t[5]=e.x,t[6]=e.y,t[7]=-e.x,t[8]=0,t):new s(0,-e.z,e.y,e.z,0,-e.x,-e.y,e.x,0)},s.fromRotationX=function(e,t){var n=Math.cos(e),r=Math.sin(e);return i(t)?(t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=n,t[5]=r,t[6]=0,t[7]=-r,t[8]=n,t):new s(1,0,0,0,n,-r,0,r,n)},s.fromRotationY=function(e,t){var n=Math.cos(e),r=Math.sin(e);return i(t)?(t[0]=n,t[1]=0,t[2]=-r,t[3]=0,t[4]=1,t[5]=0,t[6]=r,t[7]=0,t[8]=n,t):new s(n,0,r,0,1,0,-r,0,n)},s.fromRotationZ=function(e,t){var n=Math.cos(e),r=Math.sin(e);return i(t)?(t[0]=n,t[1]=r,t[2]=0,t[3]=-r,t[4]=n,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t):new s(n,-r,0,r,n,0,0,0,1)},s.toArray=function(e,t){return i(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t):[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]},s.getElementIndex=function(e,t){return 3*e+t},s.getColumn=function(e,t,i){var n=3*t,r=e[n],o=e[n+1],a=e[n+2];return i.x=r,i.y=o,i.z=a,i},s.setColumn=function(e,t,i,n){n=s.clone(e,n);var r=3*t;return n[r]=i.x,n[r+1]=i.y,n[r+2]=i.z,n},s.getRow=function(e,t,i){var n=e[t],r=e[t+3],o=e[t+6];return i.x=n,i.y=r,i.z=o,i},s.setRow=function(e,t,i,n){return n=s.clone(e,n),n[t]=i.x,n[t+3]=i.y,n[t+6]=i.z,n};var h=new e;s.getScale=function(t,i){return i.x=e.magnitude(e.fromElements(t[0],t[1],t[2],h)),i.y=e.magnitude(e.fromElements(t[3],t[4],t[5],h)),i.z=e.magnitude(e.fromElements(t[6],t[7],t[8],h)),i};var d=new e;s.getMaximumScale=function(t){return s.getScale(t,d),e.maximumComponent(d)},s.multiply=function(e,t,i){var n=e[0]*t[0]+e[3]*t[1]+e[6]*t[2],r=e[1]*t[0]+e[4]*t[1]+e[7]*t[2],o=e[2]*t[0]+e[5]*t[1]+e[8]*t[2],a=e[0]*t[3]+e[3]*t[4]+e[6]*t[5],s=e[1]*t[3]+e[4]*t[4]+e[7]*t[5],l=e[2]*t[3]+e[5]*t[4]+e[8]*t[5],u=e[0]*t[6]+e[3]*t[7]+e[6]*t[8],c=e[1]*t[6]+e[4]*t[7]+e[7]*t[8],h=e[2]*t[6]+e[5]*t[7]+e[8]*t[8];return i[0]=n,i[1]=r,i[2]=o,i[3]=a,i[4]=s,i[5]=l,i[6]=u,i[7]=c,i[8]=h,i},s.add=function(e,t,i){return i[0]=e[0]+t[0],i[1]=e[1]+t[1],i[2]=e[2]+t[2],i[3]=e[3]+t[3],i[4]=e[4]+t[4],i[5]=e[5]+t[5],i[6]=e[6]+t[6],i[7]=e[7]+t[7],i[8]=e[8]+t[8],i},s.subtract=function(e,t,i){return i[0]=e[0]-t[0],i[1]=e[1]-t[1],i[2]=e[2]-t[2],i[3]=e[3]-t[3],i[4]=e[4]-t[4],i[5]=e[5]-t[5],i[6]=e[6]-t[6],i[7]=e[7]-t[7],i[8]=e[8]-t[8],i},s.multiplyByVector=function(e,t,i){var n=t.x,r=t.y,o=t.z,a=e[0]*n+e[3]*r+e[6]*o,s=e[1]*n+e[4]*r+e[7]*o,l=e[2]*n+e[5]*r+e[8]*o;return i.x=a,i.y=s,i.z=l,i},s.multiplyByScalar=function(e,t,i){return i[0]=e[0]*t,i[1]=e[1]*t,i[2]=e[2]*t,i[3]=e[3]*t,i[4]=e[4]*t,i[5]=e[5]*t,i[6]=e[6]*t,i[7]=e[7]*t,i[8]=e[8]*t,i},s.multiplyByScale=function(e,t,i){return i[0]=e[0]*t.x,i[1]=e[1]*t.x,i[2]=e[2]*t.x,i[3]=e[3]*t.y,i[4]=e[4]*t.y,i[5]=e[5]*t.y,i[6]=e[6]*t.z,i[7]=e[7]*t.z,i[8]=e[8]*t.z,i},s.negate=function(e,t){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t[4]=-e[4],t[5]=-e[5],t[6]=-e[6],t[7]=-e[7],t[8]=-e[8],t},s.transpose=function(e,t){var i=e[0],n=e[3],r=e[6],o=e[1],a=e[4],s=e[7],l=e[2],u=e[5],c=e[8];return t[0]=i,t[1]=n,t[2]=r,t[3]=o,t[4]=a,t[5]=s,t[6]=l,t[7]=u,t[8]=c,t};var p=[1,0,0],m=[2,2,1],f=new s,g=new s;return s.computeEigenDecomposition=function(e,t){var n=a.EPSILON20,r=10,o=0,h=0;i(t)||(t={});for(var d=t.unitary=s.clone(s.IDENTITY,t.unitary),p=t.diagonal=s.clone(e,t.diagonal),m=n*l(p);r>h&&u(p)>m;)c(p,f),s.transpose(f,g),s.multiply(p,f,p),s.multiply(g,p,p),s.multiply(d,f,d),++o>2&&(++h,o=0);return t},s.abs=function(e,t){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t[4]=Math.abs(e[4]),t[5]=Math.abs(e[5]),t[6]=Math.abs(e[6]),t[7]=Math.abs(e[7]),t[8]=Math.abs(e[8]),t},s.determinant=function(e){var t=e[0],i=e[3],n=e[6],r=e[1],o=e[4],a=e[7],s=e[2],l=e[5],u=e[8];return t*(o*u-l*a)+r*(l*n-i*u)+s*(i*a-o*n)},s.inverse=function(e,t){var i=e[0],n=e[1],o=e[2],l=e[3],u=e[4],c=e[5],h=e[6],d=e[7],p=e[8],m=s.determinant(e);if(Math.abs(m)<=a.EPSILON15)throw new r("matrix is not invertible");t[0]=u*p-d*c,t[1]=d*o-n*p,t[2]=n*c-u*o,t[3]=h*c-l*p,t[4]=i*p-h*o,t[5]=l*o-i*c,t[6]=l*d-h*u,t[7]=h*n-i*d,t[8]=i*u-l*n;var f=1/m;return s.multiplyByScalar(t,f,t)},s.equals=function(e,t){return e===t||i(e)&&i(t)&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]},s.equalsEpsilon=function(e,t,n){return e===t||i(e)&&i(t)&&Math.abs(e[0]-t[0])<=n&&Math.abs(e[1]-t[1])<=n&&Math.abs(e[2]-t[2])<=n&&Math.abs(e[3]-t[3])<=n&&Math.abs(e[4]-t[4])<=n&&Math.abs(e[5]-t[5])<=n&&Math.abs(e[6]-t[6])<=n&&Math.abs(e[7]-t[7])<=n&&Math.abs(e[8]-t[8])<=n},s.IDENTITY=o(new s(1,0,0,0,1,0,0,0,1)),s.ZERO=o(new s(0,0,0,0,0,0,0,0,0)),s.COLUMN0ROW0=0,s.COLUMN0ROW1=1,s.COLUMN0ROW2=2,s.COLUMN1ROW0=3,s.COLUMN1ROW1=4,s.COLUMN1ROW2=5,s.COLUMN2ROW0=6,s.COLUMN2ROW1=7,s.COLUMN2ROW2=8,n(s.prototype,{length:{get:function(){return s.packedLength}}}),s.prototype.clone=function(e){return s.clone(this,e)},s.prototype.equals=function(e){return s.equals(this,e)},s.equalsArray=function(e,t,i){return e[0]===t[i]&&e[1]===t[i+1]&&e[2]===t[i+2]&&e[3]===t[i+3]&&e[4]===t[i+4]&&e[5]===t[i+5]&&e[6]===t[i+6]&&e[7]===t[i+7]&&e[8]===t[i+8]},s.prototype.equalsEpsilon=function(e,t){return s.equalsEpsilon(this,e,t)},s.prototype.toString=function(){return"("+this[0]+", "+this[3]+", "+this[6]+")\n("+this[1]+", "+this[4]+", "+this[7]+")\n("+this[2]+", "+this[5]+", "+this[8]+")"},s}),define("Cesium/Core/Cartesian4",["./defaultValue","./defined","./DeveloperError","./freezeObject","./Math"],function(e,t,i,n,r){"use strict";function o(t,i,n,r){this.x=e(t,0),this.y=e(i,0),this.z=e(n,0),this.w=e(r,0)}o.fromElements=function(e,i,n,r,a){return t(a)?(a.x=e,a.y=i,a.z=n,a.w=r,a):new o(e,i,n,r)},o.fromColor=function(e,i){return t(i)?(i.x=e.red,i.y=e.green,i.z=e.blue,i.w=e.alpha,i):new o(e.red,e.green,e.blue,e.alpha)},o.clone=function(e,i){return t(e)?t(i)?(i.x=e.x,i.y=e.y,i.z=e.z,i.w=e.w,i):new o(e.x,e.y,e.z,e.w):void 0},o.packedLength=4,o.pack=function(t,i,n){n=e(n,0),i[n++]=t.x,i[n++]=t.y,i[n++]=t.z,i[n]=t.w},o.unpack=function(i,n,r){return n=e(n,0),t(r)||(r=new o),r.x=i[n++],r.y=i[n++],r.z=i[n++],r.w=i[n],r},o.packArray=function(e,i){var n=e.length;t(i)?i.length=4*n:i=new Array(4*n);for(var r=0;n>r;++r)o.pack(e[r],i,4*r);return i},o.unpackArray=function(e,i){var n=e.length;t(i)?i.length=n/4:i=new Array(n/4);for(var r=0;n>r;r+=4){var a=r/4;i[a]=o.unpack(e,r,i[a])}return i},o.fromArray=o.unpack,o.maximumComponent=function(e){return Math.max(e.x,e.y,e.z,e.w)},o.minimumComponent=function(e){return Math.min(e.x,e.y,e.z,e.w)},o.minimumByComponent=function(e,t,i){return i.x=Math.min(e.x,t.x),i.y=Math.min(e.y,t.y),i.z=Math.min(e.z,t.z),i.w=Math.min(e.w,t.w),i},o.maximumByComponent=function(e,t,i){return i.x=Math.max(e.x,t.x),i.y=Math.max(e.y,t.y),i.z=Math.max(e.z,t.z),i.w=Math.max(e.w,t.w),i},o.magnitudeSquared=function(e){return e.x*e.x+e.y*e.y+e.z*e.z+e.w*e.w},o.magnitude=function(e){return Math.sqrt(o.magnitudeSquared(e))};var a=new o;o.distance=function(e,t){return o.subtract(e,t,a),o.magnitude(a)},o.distanceSquared=function(e,t){return o.subtract(e,t,a),o.magnitudeSquared(a)},o.normalize=function(e,t){var i=o.magnitude(e);return t.x=e.x/i,t.y=e.y/i,t.z=e.z/i,t.w=e.w/i,t},o.dot=function(e,t){return e.x*t.x+e.y*t.y+e.z*t.z+e.w*t.w},o.multiplyComponents=function(e,t,i){return i.x=e.x*t.x,i.y=e.y*t.y,i.z=e.z*t.z,i.w=e.w*t.w,i},o.add=function(e,t,i){return i.x=e.x+t.x,i.y=e.y+t.y,i.z=e.z+t.z,i.w=e.w+t.w,i},o.subtract=function(e,t,i){return i.x=e.x-t.x,i.y=e.y-t.y,i.z=e.z-t.z,i.w=e.w-t.w,i},o.multiplyByScalar=function(e,t,i){return i.x=e.x*t,i.y=e.y*t,i.z=e.z*t,i.w=e.w*t,i},o.divideByScalar=function(e,t,i){return i.x=e.x/t,i.y=e.y/t,i.z=e.z/t,i.w=e.w/t,i},o.negate=function(e,t){return t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=-e.w,t},o.abs=function(e,t){return t.x=Math.abs(e.x),t.y=Math.abs(e.y),t.z=Math.abs(e.z),t.w=Math.abs(e.w),t};var s=new o;o.lerp=function(e,t,i,n){return o.multiplyByScalar(t,i,s),n=o.multiplyByScalar(e,1-i,n),o.add(s,n,n)};var l=new o;return o.mostOrthogonalAxis=function(e,t){var i=o.normalize(e,l);return o.abs(i,i),t=i.x<=i.y?i.x<=i.z?i.x<=i.w?o.clone(o.UNIT_X,t):o.clone(o.UNIT_W,t):i.z<=i.w?o.clone(o.UNIT_Z,t):o.clone(o.UNIT_W,t):i.y<=i.z?i.y<=i.w?o.clone(o.UNIT_Y,t):o.clone(o.UNIT_W,t):i.z<=i.w?o.clone(o.UNIT_Z,t):o.clone(o.UNIT_W,t)},o.equals=function(e,i){return e===i||t(e)&&t(i)&&e.x===i.x&&e.y===i.y&&e.z===i.z&&e.w===i.w},o.equalsArray=function(e,t,i){return e.x===t[i]&&e.y===t[i+1]&&e.z===t[i+2]&&e.w===t[i+3]},o.equalsEpsilon=function(e,i,n,o){return e===i||t(e)&&t(i)&&r.equalsEpsilon(e.x,i.x,n,o)&&r.equalsEpsilon(e.y,i.y,n,o)&&r.equalsEpsilon(e.z,i.z,n,o)&&r.equalsEpsilon(e.w,i.w,n,o)},o.ZERO=n(new o(0,0,0,0)),o.UNIT_X=n(new o(1,0,0,0)),o.UNIT_Y=n(new o(0,1,0,0)),o.UNIT_Z=n(new o(0,0,1,0)),o.UNIT_W=n(new o(0,0,0,1)),o.prototype.clone=function(e){return o.clone(this,e)},o.prototype.equals=function(e){return o.equals(this,e)},o.prototype.equalsEpsilon=function(e,t,i){return o.equalsEpsilon(this,e,t,i)},o.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+", "+this.w+")"},o}),define("Cesium/Core/RuntimeError",["./defined"],function(e){"use strict";function t(e){this.name="RuntimeError",this.message=e;var t;try{throw new Error}catch(i){t=i.stack}this.stack=t}return e(Object.create)&&(t.prototype=Object.create(Error.prototype),t.prototype.constructor=t),t.prototype.toString=function(){var t=this.name+": "+this.message;return e(this.stack)&&(t+="\n"+this.stack.toString()),t},t}),define("Cesium/Core/Matrix4",["./Cartesian3","./Cartesian4","./defaultValue","./defined","./defineProperties","./DeveloperError","./freezeObject","./Math","./Matrix3","./RuntimeError"],function(e,t,i,n,r,o,a,s,l,u){"use strict";function c(e,t,n,r,o,a,s,l,u,c,h,d,p,m,f,g){this[0]=i(e,0),this[1]=i(o,0),this[2]=i(u,0),this[3]=i(p,0),this[4]=i(t,0),this[5]=i(a,0),this[6]=i(c,0),this[7]=i(m,0),this[8]=i(n,0),this[9]=i(s,0),this[10]=i(h,0),this[11]=i(f,0),this[12]=i(r,0),this[13]=i(l,0),this[14]=i(d,0),this[15]=i(g,0)}c.packedLength=16,c.pack=function(e,t,n){n=i(n,0),t[n++]=e[0],t[n++]=e[1],t[n++]=e[2],t[n++]=e[3],t[n++]=e[4],t[n++]=e[5],t[n++]=e[6],t[n++]=e[7],t[n++]=e[8],t[n++]=e[9],t[n++]=e[10],t[n++]=e[11],t[n++]=e[12],t[n++]=e[13],t[n++]=e[14],t[n]=e[15]},c.unpack=function(e,t,r){return t=i(t,0),n(r)||(r=new c),r[0]=e[t++],r[1]=e[t++],r[2]=e[t++],r[3]=e[t++],r[4]=e[t++],r[5]=e[t++],r[6]=e[t++],r[7]=e[t++],r[8]=e[t++],r[9]=e[t++],r[10]=e[t++],r[11]=e[t++],r[12]=e[t++],r[13]=e[t++],r[14]=e[t++],r[15]=e[t],r},c.clone=function(e,t){return n(e)?n(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t):new c(e[0],e[4],e[8],e[12],e[1],e[5],e[9],e[13],e[2],e[6],e[10],e[14],e[3],e[7],e[11],e[15]):void 0},c.fromArray=c.unpack,c.fromColumnMajorArray=function(e,t){return c.clone(e,t)},c.fromRowMajorArray=function(e,t){return n(t)?(t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15],t):new c(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])},c.fromRotationTranslation=function(t,r,o){return r=i(r,e.ZERO),n(o)?(o[0]=t[0],o[1]=t[1],o[2]=t[2],o[3]=0,o[4]=t[3],o[5]=t[4],o[6]=t[5],o[7]=0,o[8]=t[6],o[9]=t[7],o[10]=t[8],o[11]=0,o[12]=r.x,o[13]=r.y,o[14]=r.z,o[15]=1,o):new c(t[0],t[3],t[6],r.x,t[1],t[4],t[7],r.y,t[2],t[5],t[8],r.z,0,0,0,1)},c.fromTranslationQuaternionRotationScale=function(e,t,i,r){n(r)||(r=new c);var o=i.x,a=i.y,s=i.z,l=t.x*t.x,u=t.x*t.y,h=t.x*t.z,d=t.x*t.w,p=t.y*t.y,m=t.y*t.z,f=t.y*t.w,g=t.z*t.z,v=t.z*t.w,_=t.w*t.w,y=l-p-g+_,C=2*(u-v),w=2*(h+f),E=2*(u+v),b=-l+p-g+_,S=2*(m-d),T=2*(h-f),x=2*(m+d),A=-l-p+g+_;return r[0]=y*o,r[1]=E*o,r[2]=T*o,r[3]=0,r[4]=C*a,r[5]=b*a,r[6]=x*a,r[7]=0,r[8]=w*s,r[9]=S*s,r[10]=A*s,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,r},c.fromTranslationRotationScale=function(e,t){return c.fromTranslationQuaternionRotationScale(e.translation,e.rotation,e.scale,t)},c.fromTranslation=function(e,t){return c.fromRotationTranslation(l.IDENTITY,e,t)},c.fromScale=function(e,t){return n(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e.y,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e.z,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t):new c(e.x,0,0,0,0,e.y,0,0,0,0,e.z,0,0,0,0,1)},c.fromUniformScale=function(e,t){return n(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t):new c(e,0,0,0,0,e,0,0,0,0,e,0,0,0,0,1)};var h=new e,d=new e,p=new e;c.fromCamera=function(t,i){var r=t.position,o=t.direction,a=t.up;e.normalize(o,h),e.normalize(e.cross(h,a,d),d),e.normalize(e.cross(d,h,p),p);var s=d.x,l=d.y,u=d.z,m=h.x,f=h.y,g=h.z,v=p.x,_=p.y,y=p.z,C=r.x,w=r.y,E=r.z,b=s*-C+l*-w+u*-E,S=v*-C+_*-w+y*-E,T=m*C+f*w+g*E;return n(i)?(i[0]=s,i[1]=v,i[2]=-m,i[3]=0,i[4]=l,i[5]=_,i[6]=-f,i[7]=0,i[8]=u,i[9]=y,i[10]=-g,i[11]=0,i[12]=b,i[13]=S,i[14]=T,i[15]=1,i):new c(s,l,u,b,v,_,y,S,-m,-f,-g,T,0,0,0,1)},c.computePerspectiveFieldOfView=function(e,t,i,n,r){var o=Math.tan(.5*e),a=1/o,s=a/t,l=(n+i)/(i-n),u=2*n*i/(i-n);return r[0]=s,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=a,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=l,r[11]=-1,r[12]=0,r[13]=0,r[14]=u,r[15]=0,r},c.computeOrthographicOffCenter=function(e,t,i,n,r,o,a){var s=1/(t-e),l=1/(n-i),u=1/(o-r),c=-(t+e)*s,h=-(n+i)*l,d=-(o+r)*u;return s*=2,l*=2,u*=-2,a[0]=s,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=l,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=u,a[11]=0,a[12]=c,a[13]=h,a[14]=d,a[15]=1,a},c.computePerspectiveOffCenter=function(e,t,i,n,r,o,a){var s=2*r/(t-e),l=2*r/(n-i),u=(t+e)/(t-e),c=(n+i)/(n-i),h=-(o+r)/(o-r),d=-1,p=-2*o*r/(o-r);return a[0]=s,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=l,a[6]=0,a[7]=0,a[8]=u,a[9]=c,a[10]=h,a[11]=d,a[12]=0,a[13]=0,a[14]=p,a[15]=0,a},c.computeInfinitePerspectiveOffCenter=function(e,t,i,n,r,o){var a=2*r/(t-e),s=2*r/(n-i),l=(t+e)/(t-e),u=(n+i)/(n-i),c=-1,h=-1,d=-2*r;return o[0]=a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=s,o[6]=0,o[7]=0,o[8]=l,o[9]=u,o[10]=c,o[11]=h,o[12]=0,o[13]=0,o[14]=d,o[15]=0,o},c.computeViewportTransformation=function(e,t,n,r){e=i(e,i.EMPTY_OBJECT);var o=i(e.x,0),a=i(e.y,0),s=i(e.width,0),l=i(e.height,0);t=i(t,0),n=i(n,1);var u=.5*s,c=.5*l,h=.5*(n-t),d=u,p=c,m=h,f=o+u,g=a+c,v=t+h,_=1;return r[0]=d,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=p,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=m,r[11]=0,r[12]=f,r[13]=g,r[14]=v,r[15]=_,r},c.computeView=function(t,i,n,r,o){return o[0]=r.x,o[1]=n.x,o[2]=-i.x,o[3]=0,o[4]=r.y,o[5]=n.y,o[6]=-i.y,o[7]=0,o[8]=r.z,o[9]=n.z,o[10]=-i.z,o[11]=0,o[12]=-e.dot(r,t),o[13]=-e.dot(n,t),o[14]=e.dot(i,t),o[15]=1,o},c.toArray=function(e,t){return n(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t):[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]},c.getElementIndex=function(e,t){return 4*e+t},c.getColumn=function(e,t,i){var n=4*t,r=e[n],o=e[n+1],a=e[n+2],s=e[n+3];return i.x=r,i.y=o,i.z=a,i.w=s,i},c.setColumn=function(e,t,i,n){n=c.clone(e,n);var r=4*t;return n[r]=i.x,n[r+1]=i.y,n[r+2]=i.z,n[r+3]=i.w,n},c.setTranslation=function(e,t,i){return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[3],i[4]=e[4],i[5]=e[5],i[6]=e[6],i[7]=e[7],i[8]=e[8],i[9]=e[9],i[10]=e[10],i[11]=e[11],i[12]=t.x,i[13]=t.y,i[14]=t.z,i[15]=e[15],i},c.getRow=function(e,t,i){var n=e[t],r=e[t+4],o=e[t+8],a=e[t+12];return i.x=n,i.y=r,i.z=o,i.w=a,i},c.setRow=function(e,t,i,n){return n=c.clone(e,n),n[t]=i.x,n[t+4]=i.y,n[t+8]=i.z,n[t+12]=i.w,n};var m=new e;c.getScale=function(t,i){return i.x=e.magnitude(e.fromElements(t[0],t[1],t[2],m)),i.y=e.magnitude(e.fromElements(t[4],t[5],t[6],m)),i.z=e.magnitude(e.fromElements(t[8],t[9],t[10],m)),i};var f=new e;c.getMaximumScale=function(t){return c.getScale(t,f),e.maximumComponent(f)},c.multiply=function(e,t,i){var n=e[0],r=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],h=e[8],d=e[9],p=e[10],m=e[11],f=e[12],g=e[13],v=e[14],_=e[15],y=t[0],C=t[1],w=t[2],E=t[3],b=t[4],S=t[5],T=t[6],x=t[7],A=t[8],P=t[9],M=t[10],D=t[11],I=t[12],R=t[13],O=t[14],L=t[15],N=n*y+s*C+h*w+f*E,F=r*y+l*C+d*w+g*E,k=o*y+u*C+p*w+v*E,B=a*y+c*C+m*w+_*E,z=n*b+s*S+h*T+f*x,V=r*b+l*S+d*T+g*x,U=o*b+u*S+p*T+v*x,G=a*b+c*S+m*T+_*x,W=n*A+s*P+h*M+f*D,H=r*A+l*P+d*M+g*D,q=o*A+u*P+p*M+v*D,j=a*A+c*P+m*M+_*D,Y=n*I+s*R+h*O+f*L,X=r*I+l*R+d*O+g*L,Z=o*I+u*R+p*O+v*L,K=a*I+c*R+m*O+_*L;return i[0]=N,i[1]=F,i[2]=k,i[3]=B,i[4]=z,i[5]=V,i[6]=U,i[7]=G,i[8]=W,i[9]=H,i[10]=q,i[11]=j,i[12]=Y,i[13]=X,i[14]=Z,i[15]=K,i},c.add=function(e,t,i){return i[0]=e[0]+t[0],i[1]=e[1]+t[1],i[2]=e[2]+t[2],i[3]=e[3]+t[3],i[4]=e[4]+t[4],i[5]=e[5]+t[5],i[6]=e[6]+t[6],i[7]=e[7]+t[7],i[8]=e[8]+t[8],i[9]=e[9]+t[9],i[10]=e[10]+t[10],i[11]=e[11]+t[11],i[12]=e[12]+t[12],i[13]=e[13]+t[13],i[14]=e[14]+t[14],i[15]=e[15]+t[15],i},c.subtract=function(e,t,i){return i[0]=e[0]-t[0],i[1]=e[1]-t[1],i[2]=e[2]-t[2],i[3]=e[3]-t[3],i[4]=e[4]-t[4],i[5]=e[5]-t[5],i[6]=e[6]-t[6],i[7]=e[7]-t[7],i[8]=e[8]-t[8],i[9]=e[9]-t[9],i[10]=e[10]-t[10],i[11]=e[11]-t[11],i[12]=e[12]-t[12],i[13]=e[13]-t[13],i[14]=e[14]-t[14],i[15]=e[15]-t[15],i},c.multiplyTransformation=function(e,t,i){var n=e[0],r=e[1],o=e[2],a=e[4],s=e[5],l=e[6],u=e[8],c=e[9],h=e[10],d=e[12],p=e[13],m=e[14],f=t[0],g=t[1],v=t[2],_=t[4],y=t[5],C=t[6],w=t[8],E=t[9],b=t[10],S=t[12],T=t[13],x=t[14],A=n*f+a*g+u*v,P=r*f+s*g+c*v,M=o*f+l*g+h*v,D=n*_+a*y+u*C,I=r*_+s*y+c*C,R=o*_+l*y+h*C,O=n*w+a*E+u*b,L=r*w+s*E+c*b,N=o*w+l*E+h*b,F=n*S+a*T+u*x+d,k=r*S+s*T+c*x+p,B=o*S+l*T+h*x+m;return i[0]=A,i[1]=P,i[2]=M,i[3]=0,i[4]=D,i[5]=I,i[6]=R,i[7]=0,i[8]=O,i[9]=L,i[10]=N,i[11]=0,i[12]=F,i[13]=k,i[14]=B,i[15]=1,i},c.multiplyByMatrix3=function(e,t,i){var n=e[0],r=e[1],o=e[2],a=e[4],s=e[5],l=e[6],u=e[8],c=e[9],h=e[10],d=t[0],p=t[1],m=t[2],f=t[3],g=t[4],v=t[5],_=t[6],y=t[7],C=t[8],w=n*d+a*p+u*m,E=r*d+s*p+c*m,b=o*d+l*p+h*m,S=n*f+a*g+u*v,T=r*f+s*g+c*v,x=o*f+l*g+h*v,A=n*_+a*y+u*C,P=r*_+s*y+c*C,M=o*_+l*y+h*C;return i[0]=w,i[1]=E,i[2]=b,i[3]=0,i[4]=S,i[5]=T,i[6]=x,i[7]=0,i[8]=A,i[9]=P,i[10]=M,i[11]=0,i[12]=e[12],i[13]=e[13],i[14]=e[14],i[15]=e[15],i},c.multiplyByTranslation=function(e,t,i){var n=t.x,r=t.y,o=t.z,a=n*e[0]+r*e[4]+o*e[8]+e[12],s=n*e[1]+r*e[5]+o*e[9]+e[13],l=n*e[2]+r*e[6]+o*e[10]+e[14];return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[3],i[4]=e[4],i[5]=e[5],i[6]=e[6],i[7]=e[7],i[8]=e[8],i[9]=e[9],i[10]=e[10],i[11]=e[11],i[12]=a,i[13]=s,i[14]=l,i[15]=e[15],i};var g=new e;c.multiplyByUniformScale=function(e,t,i){return g.x=t,g.y=t,g.z=t,c.multiplyByScale(e,g,i)},c.multiplyByScale=function(e,t,i){var n=t.x,r=t.y,o=t.z;return 1===n&&1===r&&1===o?c.clone(e,i):(i[0]=n*e[0],i[1]=n*e[1],i[2]=n*e[2],i[3]=0,i[4]=r*e[4],i[5]=r*e[5],i[6]=r*e[6],i[7]=0,i[8]=o*e[8],i[9]=o*e[9],i[10]=o*e[10],i[11]=0,i[12]=e[12],i[13]=e[13],i[14]=e[14],i[15]=1,i)},c.multiplyByVector=function(e,t,i){var n=t.x,r=t.y,o=t.z,a=t.w,s=e[0]*n+e[4]*r+e[8]*o+e[12]*a,l=e[1]*n+e[5]*r+e[9]*o+e[13]*a,u=e[2]*n+e[6]*r+e[10]*o+e[14]*a,c=e[3]*n+e[7]*r+e[11]*o+e[15]*a;return i.x=s,i.y=l,i.z=u,i.w=c,i},c.multiplyByPointAsVector=function(e,t,i){var n=t.x,r=t.y,o=t.z,a=e[0]*n+e[4]*r+e[8]*o,s=e[1]*n+e[5]*r+e[9]*o,l=e[2]*n+e[6]*r+e[10]*o;return i.x=a,i.y=s,i.z=l,i},c.multiplyByPoint=function(e,t,i){var n=t.x,r=t.y,o=t.z,a=e[0]*n+e[4]*r+e[8]*o+e[12],s=e[1]*n+e[5]*r+e[9]*o+e[13],l=e[2]*n+e[6]*r+e[10]*o+e[14];return i.x=a,i.y=s,i.z=l,i},c.multiplyByScalar=function(e,t,i){return i[0]=e[0]*t,i[1]=e[1]*t,i[2]=e[2]*t,i[3]=e[3]*t,i[4]=e[4]*t,i[5]=e[5]*t,i[6]=e[6]*t,i[7]=e[7]*t,i[8]=e[8]*t,i[9]=e[9]*t,i[10]=e[10]*t,i[11]=e[11]*t,i[12]=e[12]*t,i[13]=e[13]*t,i[14]=e[14]*t,i[15]=e[15]*t,i},c.negate=function(e,t){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t[4]=-e[4],t[5]=-e[5],t[6]=-e[6],t[7]=-e[7],t[8]=-e[8],t[9]=-e[9],t[10]=-e[10],t[11]=-e[11],t[12]=-e[12],t[13]=-e[13],t[14]=-e[14],t[15]=-e[15],t},c.transpose=function(e,t){var i=e[1],n=e[2],r=e[3],o=e[6],a=e[7],s=e[11];return t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=i,t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=n,t[9]=o,t[10]=e[10],t[11]=e[14],t[12]=r,t[13]=a,t[14]=s,t[15]=e[15],t},c.abs=function(e,t){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t[4]=Math.abs(e[4]),t[5]=Math.abs(e[5]),t[6]=Math.abs(e[6]),t[7]=Math.abs(e[7]),t[8]=Math.abs(e[8]),t[9]=Math.abs(e[9]),t[10]=Math.abs(e[10]),t[11]=Math.abs(e[11]),t[12]=Math.abs(e[12]),t[13]=Math.abs(e[13]),t[14]=Math.abs(e[14]),t[15]=Math.abs(e[15]),t},c.equals=function(e,t){return e===t||n(e)&&n(t)&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[3]===t[3]&&e[7]===t[7]&&e[11]===t[11]&&e[15]===t[15]},c.equalsEpsilon=function(e,t,i){return e===t||n(e)&&n(t)&&Math.abs(e[0]-t[0])<=i&&Math.abs(e[1]-t[1])<=i&&Math.abs(e[2]-t[2])<=i&&Math.abs(e[3]-t[3])<=i&&Math.abs(e[4]-t[4])<=i&&Math.abs(e[5]-t[5])<=i&&Math.abs(e[6]-t[6])<=i&&Math.abs(e[7]-t[7])<=i&&Math.abs(e[8]-t[8])<=i&&Math.abs(e[9]-t[9])<=i&&Math.abs(e[10]-t[10])<=i&&Math.abs(e[11]-t[11])<=i&&Math.abs(e[12]-t[12])<=i&&Math.abs(e[13]-t[13])<=i&&Math.abs(e[14]-t[14])<=i&&Math.abs(e[15]-t[15])<=i},c.getTranslation=function(e,t){return t.x=e[12],t.y=e[13],t.z=e[14],t},c.getRotation=function(e,t){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t};var v=new l,_=new l,y=new t,C=new t(0,0,0,1);return c.inverse=function(e,i){if(l.equalsEpsilon(c.getRotation(e,v),_,s.EPSILON7)&&t.equals(c.getRow(e,3,y),C))return i[0]=0,i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=0,i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[10]=0,i[11]=0,i[12]=-e[12],i[13]=-e[13],i[14]=-e[14],i[15]=1,i;var n=e[0],r=e[4],o=e[8],a=e[12],h=e[1],d=e[5],p=e[9],m=e[13],f=e[2],g=e[6],w=e[10],E=e[14],b=e[3],S=e[7],T=e[11],x=e[15],A=w*x,P=E*T,M=g*x,D=E*S,I=g*T,R=w*S,O=f*x,L=E*b,N=f*T,F=w*b,k=f*S,B=g*b,z=A*d+D*p+I*m-(P*d+M*p+R*m),V=P*h+O*p+F*m-(A*h+L*p+N*m),U=M*h+L*d+k*m-(D*h+O*d+B*m),G=R*h+N*d+B*p-(I*h+F*d+k*p),W=P*r+M*o+R*a-(A*r+D*o+I*a),H=A*n+L*o+N*a-(P*n+O*o+F*a),q=D*n+O*r+B*a-(M*n+L*r+k*a),j=I*n+F*r+k*o-(R*n+N*r+B*o);A=o*m,P=a*p,M=r*m,D=a*d,I=r*p,R=o*d,O=n*m,L=a*h,N=n*p,F=o*h,k=n*d,B=r*h;var Y=A*S+D*T+I*x-(P*S+M*T+R*x),X=P*b+O*T+F*x-(A*b+L*T+N*x),Z=M*b+L*S+k*x-(D*b+O*S+B*x),K=R*b+N*S+B*T-(I*b+F*S+k*T),J=M*w+R*E+P*g-(I*E+A*g+D*w),Q=N*E+A*f+L*w-(O*w+F*E+P*f),$=O*g+B*E+D*f-(k*E+M*f+L*g),ee=k*w+I*f+F*g-(N*g+B*w+R*f),te=n*z+r*V+o*U+a*G;if(Math.abs(te)d;d++){e.clone(t[d],r);var x=r.x,A=r.y,P=r.z;xl.x&&e.clone(r,l),Au.y&&e.clone(r,u),Pc.z&&e.clone(r,c)}var M=e.magnitudeSquared(e.subtract(l,o,w)),D=e.magnitudeSquared(e.subtract(u,a,w)),I=e.magnitudeSquared(e.subtract(c,s,w)),R=o,O=l,L=M;D>L&&(L=D,R=a,O=u),I>L&&(L=I,R=s,O=c);var N=E;N.x=.5*(R.x+O.x),N.y=.5*(R.y+O.y),N.z=.5*(R.z+O.z);var F=e.magnitudeSquared(e.subtract(O,N,w)),k=Math.sqrt(F),B=b;B.x=o.x,B.y=a.y,B.z=s.z;var z=S;z.x=l.x,z.y=u.y,z.z=c.z;var V=e.multiplyByScalar(e.add(B,z,w),.5,T),U=0;for(d=0;h>d;d++){e.clone(t[d],r);var G=e.magnitude(e.subtract(r,V,w));G>U&&(U=G);var W=e.magnitudeSquared(e.subtract(r,N,w));if(W>F){var H=Math.sqrt(W);k=.5*(k+H),F=k*k;var q=H-k;N.x=(k*N.x+q*r.x)/H,N.y=(k*N.y+q*r.y)/H,N.z=(k*N.z+q*r.z)/H}}return U>k?(e.clone(N,i.center),i.radius=k):(e.clone(V,i.center),i.radius=U),i};var x=new a,A=new e,P=new e,M=new t,D=new t;p.fromRectangle2D=function(e,t,i){return p.fromRectangleWithHeights2D(e,t,0,0,i)},p.fromRectangleWithHeights2D=function(t,r,o,a,s){if(n(s)||(s=new p),!n(t))return s.center=e.clone(e.ZERO,s.center),s.radius=0,s;r=i(r,x),d.southwest(t,M),M.height=o,d.northeast(t,D),D.height=a;var l=r.project(M,A),u=r.project(D,P),c=u.x-l.x,h=u.y-l.y,m=u.z-l.z; +s.radius=.5*Math.sqrt(c*c+h*h+m*m);var f=s.center;return f.x=l.x+.5*c,f.y=l.y+.5*h,f.z=l.z+.5*m,s};var I=[];p.fromRectangle3D=function(e,t,r,a){t=i(t,o.WGS84),r=i(r,0);var s;return n(e)&&(s=d.subsample(e,t,r,I)),p.fromPoints(s,a)},p.fromVertices=function(t,r,o,a){if(n(a)||(a=new p),!n(t)||0===t.length)return a.center=e.clone(e.ZERO,a.center),a.radius=0,a;r=i(r,e.ZERO),o=i(o,3);var s=C;s.x=t[0]+r.x,s.y=t[1]+r.y,s.z=t[2]+r.z;for(var l=e.clone(s,m),u=e.clone(s,f),c=e.clone(s,g),h=e.clone(s,v),d=e.clone(s,_),x=e.clone(s,y),A=t.length,P=0;A>P;P+=o){var M=t[P]+r.x,D=t[P+1]+r.y,I=t[P+2]+r.z;s.x=M,s.y=D,s.z=I,Mh.x&&e.clone(s,h),Dd.y&&e.clone(s,d),Ix.z&&e.clone(s,x)}var R=e.magnitudeSquared(e.subtract(h,l,w)),O=e.magnitudeSquared(e.subtract(d,u,w)),L=e.magnitudeSquared(e.subtract(x,c,w)),N=l,F=h,k=R;O>k&&(k=O,N=u,F=d),L>k&&(k=L,N=c,F=x);var B=E;B.x=.5*(N.x+F.x),B.y=.5*(N.y+F.y),B.z=.5*(N.z+F.z);var z=e.magnitudeSquared(e.subtract(F,B,w)),V=Math.sqrt(z),U=b;U.x=l.x,U.y=u.y,U.z=c.z;var G=S;G.x=h.x,G.y=d.y,G.z=x.z;var W=e.multiplyByScalar(e.add(U,G,w),.5,T),H=0;for(P=0;A>P;P+=o){s.x=t[P]+r.x,s.y=t[P+1]+r.y,s.z=t[P+2]+r.z;var q=e.magnitude(e.subtract(s,W,w));q>H&&(H=q);var j=e.magnitudeSquared(e.subtract(s,B,w));if(j>z){var Y=Math.sqrt(j);V=.5*(V+Y),z=V*V;var X=Y-V;B.x=(V*B.x+X*s.x)/Y,B.y=(V*B.y+X*s.y)/Y,B.z=(V*B.z+X*s.z)/Y}}return H>V?(e.clone(B,a.center),a.radius=V):(e.clone(W,a.center),a.radius=H),a},p.fromEncodedCartesianVertices=function(t,i,r){if(n(r)||(r=new p),!n(t)||!n(i)||t.length!==i.length||0===t.length)return r.center=e.clone(e.ZERO,r.center),r.radius=0,r;var o=C;o.x=t[0]+i[0],o.y=t[1]+i[1],o.z=t[2]+i[2];for(var a=e.clone(o,m),s=e.clone(o,f),l=e.clone(o,g),u=e.clone(o,v),c=e.clone(o,_),h=e.clone(o,y),d=t.length,x=0;d>x;x+=3){var A=t[x]+i[x],P=t[x+1]+i[x+1],M=t[x+2]+i[x+2];o.x=A,o.y=P,o.z=M,Au.x&&e.clone(o,u),Pc.y&&e.clone(o,c),Mh.z&&e.clone(o,h)}var D=e.magnitudeSquared(e.subtract(u,a,w)),I=e.magnitudeSquared(e.subtract(c,s,w)),R=e.magnitudeSquared(e.subtract(h,l,w)),O=a,L=u,N=D;I>N&&(N=I,O=s,L=c),R>N&&(N=R,O=l,L=h);var F=E;F.x=.5*(O.x+L.x),F.y=.5*(O.y+L.y),F.z=.5*(O.z+L.z);var k=e.magnitudeSquared(e.subtract(L,F,w)),B=Math.sqrt(k),z=b;z.x=a.x,z.y=s.y,z.z=l.z;var V=S;V.x=u.x,V.y=c.y,V.z=h.z;var U=e.multiplyByScalar(e.add(z,V,w),.5,T),G=0;for(x=0;d>x;x+=3){o.x=t[x]+i[x],o.y=t[x+1]+i[x+1],o.z=t[x+2]+i[x+2];var W=e.magnitude(e.subtract(o,U,w));W>G&&(G=W);var H=e.magnitudeSquared(e.subtract(o,F,w));if(H>k){var q=Math.sqrt(H);B=.5*(B+q),k=B*B;var j=q-B;F.x=(B*F.x+j*o.x)/q,F.y=(B*F.y+j*o.y)/q,F.z=(B*F.z+j*o.z)/q}}return G>B?(e.clone(F,r.center),r.radius=B):(e.clone(U,r.center),r.radius=G),r},p.fromCornerPoints=function(t,i,r){n(r)||(r=new p);var o=r.center;return e.add(t,i,o),e.multiplyByScalar(o,.5,o),r.radius=e.distance(o,i),r},p.fromEllipsoid=function(t,i){return n(i)||(i=new p),e.clone(e.ZERO,i.center),i.radius=t.maximumRadius,i};var R=new e;p.fromBoundingSpheres=function(t,i){if(n(i)||(i=new p),!n(t)||0===t.length)return i.center=e.clone(e.ZERO,i.center),i.radius=0,i;var r=t.length;if(1===r)return p.clone(t[0],i);if(2===r)return p.union(t[0],t[1],i);for(var o=[],a=0;r>a;a++)o.push(t[a].center);i=p.fromPoints(o,i);var s=i.center,l=i.radius;for(a=0;r>a;a++){var u=t[a];l=Math.max(l,e.distance(s,u.center,R)+u.radius)}return i.radius=l,i};var O=new e,L=new e,N=new e;p.fromOrientedBoundingBox=function(t,i){n(i)||(i=new p);var r=t.halfAxes,o=u.getColumn(r,0,O),a=u.getColumn(r,1,L),s=u.getColumn(r,2,N),l=e.magnitude(o),c=e.magnitude(a),h=e.magnitude(s);return i.center=e.clone(t.center,i.center),i.radius=Math.max(l,c,h),i},p.clone=function(t,i){return n(t)?n(i)?(i.center=e.clone(t.center,i.center),i.radius=t.radius,i):new p(t.center,t.radius):void 0},p.packedLength=4,p.pack=function(e,t,n){n=i(n,0);var r=e.center;t[n++]=r.x,t[n++]=r.y,t[n++]=r.z,t[n]=e.radius},p.unpack=function(e,t,r){t=i(t,0),n(r)||(r=new p);var o=r.center;return o.x=e[t++],o.y=e[t++],o.z=e[t++],r.radius=e[t],r};var F=new e,k=new e;p.union=function(t,i,r){n(r)||(r=new p);var o=t.center,a=t.radius,s=i.center,l=i.radius,u=e.subtract(s,o,F),c=e.magnitude(u);if(a>=c+l)return t.clone(r),r;if(l>=c+a)return i.clone(r),r;var h=.5*(a+c+l),d=e.multiplyByScalar(u,(-a+h)/c,k);return e.add(d,o,d),e.clone(d,r.center),r.radius=h,r};var B=new e;p.expand=function(t,i,n){n=p.clone(t,n);var r=e.magnitude(e.subtract(i,n.center,B));return r>n.radius&&(n.radius=r),n},p.intersectPlane=function(t,i){var n=t.center,r=t.radius,o=i.normal,a=e.dot(o,n)+i.distance;return-r>a?s.OUTSIDE:r>a?s.INTERSECTING:s.INSIDE},p.transform=function(e,t,i){return n(i)||(i=new p),i.center=c.multiplyByPoint(t,e.center,i.center),i.radius=c.getMaximumScale(t)*e.radius,i};var z=new e;p.distanceSquaredTo=function(t,i){var n=e.subtract(t.center,i,z);return e.magnitudeSquared(n)-t.radius*t.radius},p.transformWithoutScale=function(e,t,i){return n(i)||(i=new p),i.center=c.multiplyByPoint(t,e.center,i.center),i.radius=e.radius,i};var V=new e;p.computePlaneDistances=function(t,i,r,o){n(o)||(o=new l);var a=e.subtract(t.center,i,V),s=e.dot(r,a);return o.start=s-t.radius,o.stop=s+t.radius,o};for(var U=new e,G=new e,W=new e,H=new e,q=new e,j=new t,Y=new Array(8),X=0;8>X;++X)Y[X]=new e;var Z=new a;return p.projectTo2D=function(t,n,r){n=i(n,Z);var o=n.ellipsoid,a=t.center,s=t.radius,l=o.geodeticSurfaceNormal(a,U),u=e.cross(e.UNIT_Z,l,G);e.normalize(u,u);var c=e.cross(l,u,W);e.normalize(c,c),e.multiplyByScalar(l,s,l),e.multiplyByScalar(c,s,c),e.multiplyByScalar(u,s,u);var h=e.negate(c,q),d=e.negate(u,H),m=Y,f=m[0];e.add(l,c,f),e.add(f,u,f),f=m[1],e.add(l,c,f),e.add(f,d,f),f=m[2],e.add(l,h,f),e.add(f,d,f),f=m[3],e.add(l,h,f),e.add(f,u,f),e.negate(l,l),f=m[4],e.add(l,c,f),e.add(f,u,f),f=m[5],e.add(l,c,f),e.add(f,d,f),f=m[6],e.add(l,h,f),e.add(f,d,f),f=m[7],e.add(l,h,f),e.add(f,u,f);for(var g=m.length,v=0;g>v;++v){var _=m[v];e.add(a,_,_);var y=o.cartesianToCartographic(_,j);n.project(y,_)}r=p.fromPoints(m,r),a=r.center;var C=a.x,w=a.y,E=a.z;return a.x=E,a.y=C,a.z=w,r},p.isOccluded=function(e,t){return!t.isBoundingSphereVisible(e)},p.equals=function(t,i){return t===i||n(t)&&n(i)&&e.equals(t.center,i.center)&&t.radius===i.radius},p.prototype.intersectPlane=function(e){return p.intersectPlane(this,e)},p.prototype.distanceSquaredTo=function(e){return p.distanceSquaredTo(this,e)},p.prototype.computePlaneDistances=function(e,t,i){return p.computePlaneDistances(this,e,t,i)},p.prototype.isOccluded=function(e){return p.isOccluded(this,e)},p.prototype.equals=function(e){return p.equals(this,e)},p.prototype.clone=function(e){return p.clone(this,e)},p}),define("Cesium/Core/EllipsoidalOccluder",["./BoundingSphere","./Cartesian3","./defaultValue","./defined","./defineProperties","./DeveloperError","./Rectangle"],function(e,t,i,n,r,o,a){"use strict";function s(e,i){this._ellipsoid=e,this._cameraPosition=new t,this._cameraPositionInScaledSpace=new t,this._distanceToLimbInScaledSpaceSquared=0,n(i)&&(this.cameraPosition=i)}function l(e,i,n){var r=e.transformPositionToScaledSpace(i,m),o=t.magnitudeSquared(r),a=Math.sqrt(o),s=t.divideByScalar(r,a,f);o=Math.max(1,o),a=Math.max(1,a);var l=t.dot(s,n),u=t.magnitude(t.cross(s,n,s)),c=1/a,h=Math.sqrt(o-1)*c;return 1/(l*c-u*h)}function u(e,i,n){return 0>=i||i===1/0||i!==i?void 0:t.multiplyByScalar(e,i,n)}function c(e,i){return e.transformPositionToScaledSpace(i,g),t.normalize(g,g)}r(s.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},cameraPosition:{get:function(){return this._cameraPosition},set:function(e){var i=this._ellipsoid,n=i.transformPositionToScaledSpace(e,this._cameraPositionInScaledSpace),r=t.magnitudeSquared(n)-1;t.clone(e,this._cameraPosition),this._cameraPositionInScaledSpace=n,this._distanceToLimbInScaledSpaceSquared=r}}});var h=new t;s.prototype.isPointVisible=function(e){var t=this._ellipsoid,i=t.transformPositionToScaledSpace(e,h);return this.isScaledSpacePointVisible(i)},s.prototype.isScaledSpacePointVisible=function(e){var i=this._cameraPositionInScaledSpace,n=this._distanceToLimbInScaledSpaceSquared,r=t.subtract(e,i,h),o=-t.dot(r,i),a=0>n?o>0:o>n&&o*o/t.magnitudeSquared(r)>n;return!a},s.prototype.computeHorizonCullingPoint=function(e,i,r){n(r)||(r=new t);for(var o=this._ellipsoid,a=c(o,e),s=0,h=0,d=i.length;d>h;++h){var p=i[h],m=l(o,p,a);s=Math.max(s,m)}return u(a,s,r)};var d=new t;s.prototype.computeHorizonCullingPointFromVertices=function(e,r,o,a,s){n(s)||(s=new t),a=i(a,t.ZERO);for(var h=this._ellipsoid,p=c(h,e),m=0,f=0,g=r.length;g>f;f+=o){d.x=r[f]+a.x,d.y=r[f+1]+a.y,d.z=r[f+2]+a.z;var v=l(h,d,p);m=Math.max(m,v)}return u(p,m,s)};var p=[];s.prototype.computeHorizonCullingPointFromRectangle=function(i,n,r){var o=a.subsample(i,n,0,p),s=e.fromPoints(o);return t.magnitude(s.center)<.1*n.minimumRadius?void 0:this.computeHorizonCullingPoint(s.center,o,r)};var m=new t,f=new t,g=new t;return s}),define("Cesium/Core/QuadraticRealPolynomial",["./DeveloperError","./Math"],function(e,t){"use strict";function i(e,i,n){var r=e+i;return t.sign(e)!==t.sign(i)&&Math.abs(r/Math.max(Math.abs(e),Math.abs(i)))a&&a/ss&&s/ao)return[];var l=Math.sqrt(o);return[-l,l]}if(0===r)return o=-n/e,0>o?[o,0]:[0,o];var u=n*n,c=4*e*r,h=i(u,-c,t.EPSILON14);if(0>h)return[];var d=-.5*i(n,t.sign(n)*Math.sqrt(h),t.EPSILON14);return n>0?[d/e,r/d]:[r/d,d/e]},n}),define("Cesium/Core/CubicRealPolynomial",["./DeveloperError","./QuadraticRealPolynomial"],function(e,t){"use strict";function i(e,t,i,n){var r,o,a=e,s=t/3,l=i/3,u=n,c=a*l,h=s*u,d=s*s,p=l*l,m=a*l-d,f=a*u-s*l,g=s*u-p,v=4*m*g-f*f;if(0>v){var _,y,C;d*h>=c*p?(_=a,y=m,C=-2*s*m+a*f):(_=u,y=g,C=-u*f+2*l*g);var w=0>C?-1:1,E=-w*Math.abs(_)*Math.sqrt(-v);o=-C+E;var b=o/2,S=0>b?-Math.pow(-b,1/3):Math.pow(b,1/3),T=o===E?-S:-y/S;return r=0>=y?S+T:-C/(S*S+T*T+y),d*h>=c*p?[(r-s)/a]:[-u/(r+l)]}var x=m,A=-2*s*m+a*f,P=g,M=-u*f+2*l*g,D=Math.sqrt(v),I=Math.sqrt(3)/2,R=Math.abs(Math.atan2(a*D,-A)/3);r=2*Math.sqrt(-x);var O=Math.cos(R);o=r*O;var L=r*(-O/2-I*Math.sin(R)),N=o+L>2*s?o-s:L-s,F=a,k=N/F;R=Math.abs(Math.atan2(u*D,-M)/3),r=2*Math.sqrt(-P),O=Math.cos(R),o=r*O,L=r*(-O/2-I*Math.sin(R));var B=-u,z=2*l>o+L?o+l:L+l,V=B/z,U=F*z,G=-N*z-F*B,W=N*B,H=(l*G-s*W)/(-s*G+l*U);return H>=k?V>=k?V>=H?[k,H,V]:[k,V,H]:[V,k,H]:V>=k?[H,k,V]:V>=H?[H,V,k]:[V,H,k]}var n={};return n.computeDiscriminant=function(e,t,i,n){var r=e*e,o=t*t,a=i*i,s=n*n,l=18*e*t*i*n+o*a-27*r*s-4*(e*a*i+o*t*n);return l},n.computeRealRoots=function(e,n,r,o){var a,s;if(0===e)return t.computeRealRoots(n,r,o);if(0===n){if(0===r){if(0===o)return[0,0,0];s=-o/e;var l=0>s?-Math.pow(-s,1/3):Math.pow(s,1/3);return[l,l,l]}return 0===o?(a=t.computeRealRoots(e,0,r),0===a.Length?[0]:[a[0],0,a[1]]):i(e,0,r,o)}return 0===r?0===o?(s=-n/e,0>s?[s,0,0]:[0,0,s]):i(e,n,0,o):0===o?(a=t.computeRealRoots(e,n,r),0===a.length?[0]:a[1]<=0?[a[0],a[1],0]:a[0]>=0?[0,a[0],a[1]]:[a[0],0,a[1]]):i(e,n,r,o)},n}),define("Cesium/Core/QuarticRealPolynomial",["./CubicRealPolynomial","./DeveloperError","./Math","./QuadraticRealPolynomial"],function(e,t,i,n){"use strict";function r(t,r,o,a){var s=t*t,l=r-3*s/8,u=o-r*t/2+s*t/8,c=a-o*t/4+r*s/16-3*s*s/256,h=e.computeRealRoots(1,2*l,l*l-4*c,-u*u);if(h.length>0){var d=-t/4,p=h[h.length-1];if(Math.abs(p)=0&&v>=0){var _=Math.sqrt(g),y=Math.sqrt(v);return[d-y,d-_,d+_,d+y]}if(g>=0&&0>v)return f=Math.sqrt(g),[d-f,d+f];if(0>g&&v>=0)return f=Math.sqrt(v),[d-f,d+f]}return[]}if(p>0){var C=Math.sqrt(p),w=(l+p-u/C)/2,E=(l+p+u/C)/2,b=n.computeRealRoots(1,C,w),S=n.computeRealRoots(1,-C,E);return 0!==b.length?(b[0]+=d,b[1]+=d,0!==S.length?(S[0]+=d,S[1]+=d,b[1]<=S[0]?[b[0],b[1],S[0],S[1]]:S[1]<=b[0]?[S[0],S[1],b[0],b[1]]:b[0]>=S[0]&&b[1]<=S[1]?[S[0],b[0],b[1],S[1]]:S[0]>=b[0]&&S[1]<=b[1]?[b[0],S[0],S[1],b[1]]:b[0]>S[0]&&b[0]0){var m,f,g=p[0],v=r-g,_=v*v,y=t/2,C=v/2,w=_-4*a,E=_+4*Math.abs(a),b=u-4*g,S=u+4*Math.abs(g);if(0>g||b*E>w*S){var T=Math.sqrt(b);m=T/2,f=0===T?0:(t*C-o)/T}else{var x=Math.sqrt(w);m=0===x?0:(t*C-o)/x,f=x/2}var A,P;0===y&&0===m?(A=0,P=0):i.sign(y)===i.sign(m)?(A=y+m,P=g/A):(P=y-m,A=g/P);var M,D;0===C&&0===f?(M=0,D=0):i.sign(C)===i.sign(f)?(M=C+f,D=a/M):(D=C-f,M=a/D);var I=n.computeRealRoots(1,A,M),R=n.computeRealRoots(1,P,D);if(0!==I.length)return 0!==R.length?I[1]<=R[0]?[I[0],I[1],R[0],R[1]]:R[1]<=I[0]?[R[0],R[1],I[0],I[1]]:I[0]>=R[0]&&I[1]<=R[1]?[R[0],I[0],I[1],R[1]]:R[0]>=I[0]&&R[1]<=I[1]?[I[0],R[0],R[1],I[1]]:I[0]>R[0]&&I[0]u?1:0;switch(p+=0>c?p+1:p,p+=0>h?p+1:p,p+=0>d?p+1:p){case 0:return r(u,c,h,d);case 1:return o(u,c,h,d);case 2:return o(u,c,h,d);case 3:return r(u,c,h,d);case 4:return r(u,c,h,d);case 5:return o(u,c,h,d);case 6:return r(u,c,h,d);case 7:return r(u,c,h,d);case 8:return o(u,c,h,d);case 9:return r(u,c,h,d);case 10:return r(u,c,h,d);case 11:return o(u,c,h,d);case 12:return r(u,c,h,d);case 13:return r(u,c,h,d);case 14:return r(u,c,h,d);case 15:return r(u,c,h,d);default:return}},a}),define("Cesium/Core/Ray",["./Cartesian3","./defaultValue","./defined","./DeveloperError"],function(e,t,i,n){"use strict";function r(i,n){n=e.clone(t(n,e.ZERO)),e.equals(n,e.ZERO)||e.normalize(n,n),this.origin=e.clone(t(i,e.ZERO)),this.direction=n}return r.getPoint=function(t,n,r){return i(r)||(r=new e),r=e.multiplyByScalar(t.direction,n,r),e.add(t.origin,r,r)},r}),define("Cesium/Core/IntersectionTests",["./Cartesian3","./Cartographic","./defaultValue","./defined","./DeveloperError","./Math","./Matrix3","./QuadraticRealPolynomial","./QuarticRealPolynomial","./Ray"],function(e,t,i,n,r,o,a,s,l,u){"use strict";function c(e,t,i,n){var r=t*t-4*e*i;if(!(0>r)){if(r>0){var o=1/(2*e),a=Math.sqrt(r),s=(-t+a)*o,l=(-t-a)*o;return l>s?(n.root0=s,n.root1=l):(n.root0=l,n.root1=s),n}var u=-t/(2*e);if(0!==u)return n.root0=n.root1=u,n}}function h(t,i,r){n(r)||(r={});var o=t.origin,a=t.direction,s=i.center,l=i.radius*i.radius,u=e.subtract(o,s,v),h=e.dot(a,a),d=2*e.dot(a,u),p=e.magnitudeSquared(u)-l,m=c(h,d,p,w);return n(m)?(r.start=m.root0,r.stop=m.root1,r):void 0}function d(e,t,i){var n=e+t;return o.sign(e)!==o.sign(t)&&Math.abs(n/Math.max(Math.abs(e),Math.abs(t)))L;++L){var N,F=c[L],k=F*F,B=Math.max(1-k,0),z=Math.sqrt(B);N=o.sign(m)===o.sign(g)?d(m*k+g,f*F,o.EPSILON12):o.sign(g)===o.sign(f*F)?d(m*k,f*F+g,o.EPSILON12):d(m*k+f*F,g,o.EPSILON12);var V=d(v*F,_,o.EPSILON15),U=N*V;0>U?y.push(new e(r,u*F,u*z)):U>0?y.push(new e(r,u*F,u*-z)):0!==z?(y.push(new e(r,u*F,u*-z)),y.push(new e(r,u*F,u*z)),++L):y.push(new e(r,u*F,u*z))}return y}var m={};m.rayPlane=function(t,i,r){n(r)||(r=new e);var a=t.origin,s=t.direction,l=i.normal,u=e.dot(l,s);if(!(Math.abs(u)c))return r=e.multiplyByScalar(s,c,r),e.add(a,r,r)}};var f=new e,g=new e,v=new e,_=new e,y=new e;m.rayTriangleParametric=function(t,n,r,a,s){s=i(s,!1);var l,u,c,h,d,p=t.origin,m=t.direction,C=e.subtract(r,n,f),w=e.subtract(a,n,g),E=e.cross(m,w,v),b=e.dot(C,E);if(s){if(bc||c>b)return;if(u=e.cross(l,C,y),h=e.dot(m,u),0>h||c+h>b)return;d=e.dot(w,u)/b}else{if(Math.abs(b)c||c>1)return;if(u=e.cross(l,C,y),h=e.dot(m,u)*S,0>h||c+h>1)return;d=e.dot(w,u)*S}return d},m.rayTriangle=function(t,i,r,o,a,s){var l=m.rayTriangleParametric(t,i,r,o,a);if(n(l)&&!(0>l))return n(s)||(s=new e),e.multiplyByScalar(t.direction,l,s),e.add(t.origin,s,s)};var C=new u;m.lineSegmentTriangle=function(t,i,r,o,a,s,l){var u=C;e.clone(t,u.origin),e.subtract(i,t,u.direction),e.normalize(u.direction,u.direction);var c=m.rayTriangleParametric(u,r,o,a,s);return!n(c)||0>c||c>e.distance(t,i)?void 0:(n(l)||(l=new e),e.multiplyByScalar(u.direction,c,l),e.add(u.origin,l,l))};var w={root0:0,root1:0};m.raySphere=function(e,t,i){return i=h(e,t,i),!n(i)||i.stop<0?void 0:(i.start=Math.max(i.start,0),i)};var E=new u;m.lineSegmentSphere=function(t,i,r,o){var a=E;e.clone(t,a.origin);var s=e.subtract(i,t,a.direction),l=e.magnitude(s);return e.normalize(s,s),o=h(a,r,o),!n(o)||o.stop<0||o.start>l?void 0:(o.start=Math.max(o.start,0),o.stop=Math.min(o.stop,l),o)};var b=new e,S=new e;m.rayEllipsoid=function(t,i){var n,r,o,a,s,l=i.oneOverRadii,u=e.multiplyComponents(l,t.origin,b),c=e.multiplyComponents(l,t.direction,S),h=e.magnitudeSquared(u),d=e.dot(u,c);if(h>1){if(d>=0)return;var p=d*d;if(n=h-1,r=e.magnitudeSquared(c),o=r*n,o>p)return;if(p>o){a=d*d-o,s=-d+Math.sqrt(a);var m=s/r,f=n/s;return f>m?{start:m,stop:f}:{start:f,stop:m}}var g=Math.sqrt(n/r);return{start:g,stop:g}}return 1>h?(n=h-1,r=e.magnitudeSquared(c),o=r*n,a=d*d-o,s=-d+Math.sqrt(a),{start:0,stop:s/r}):0>d?(r=e.magnitudeSquared(c),{start:0,stop:-d/r}):void 0};var T=new e,x=new e,A=new e,P=new e,M=new e,D=new a,I=new a,R=new a,O=new a,L=new a,N=new a,F=new a,k=new e,B=new e,z=new t;m.grazingAltitudeLocation=function(t,i){var r=t.origin,s=t.direction,l=i.geodeticSurfaceNormal(r,T);if(e.dot(s,l)>=0)return r;var u=n(this.rayEllipsoid(t,i)),c=i.transformPositionToScaledSpace(s,T),h=e.normalize(c,c),d=e.mostOrthogonalAxis(c,P),m=e.normalize(e.cross(d,h,x),x),f=e.normalize(e.cross(h,m,A),A),g=D;g[0]=h.x,g[1]=h.y,g[2]=h.z,g[3]=m.x,g[4]=m.y,g[5]=m.z,g[6]=f.x,g[7]=f.y,g[8]=f.z;var v=a.transpose(g,I),_=a.fromScale(i.radii,R),y=a.fromScale(i.oneOverRadii,O),C=L;C[0]=0,C[1]=-s.z,C[2]=s.y,C[3]=s.z,C[4]=0,C[5]=-s.x,C[6]=-s.y,C[7]=s.x,C[8]=0;var w,E,b=a.multiply(a.multiply(v,y,N),C,N),S=a.multiply(a.multiply(b,_,F),g,F),V=a.multiplyByVector(b,r,M),U=p(S,e.negate(V,T),0,0,1),G=U.length;if(G>0){for(var W=e.clone(e.ZERO,B),H=Number.NEGATIVE_INFINITY,q=0;G>q;++q){w=a.multiplyByVector(_,a.multiplyByVector(g,U[q],k),k);var j=e.normalize(e.subtract(w,r,P),P),Y=e.dot(j,s);Y>H&&(H=Y,W=e.clone(w,W))}var X=i.cartesianToCartographic(W,z);return H=o.clamp(H,0,1),E=e.magnitude(e.subtract(W,r,P))*Math.sqrt(1-H*H),E=u?-E:E,X.height=E,i.cartographicToCartesian(X,new e)}};var V=new e;return m.lineSegmentPlane=function(t,i,r,a){n(a)||(a=new e);var s=e.subtract(i,t,V),l=r.normal,u=e.dot(l,s);if(!(Math.abs(u)h||h>1))return e.multiplyByScalar(s,h,a),e.add(t,a,a),a}},m.trianglePlaneIntersection=function(t,i,n,r){var o=r.normal,a=r.distance,s=e.dot(o,t)+a<0,l=e.dot(o,i)+a<0,u=e.dot(o,n)+a<0,c=0;c+=s?1:0,c+=l?1:0,c+=u?1:0;var h,d;if((1===c||2===c)&&(h=new e,d=new e),1===c){if(s)return m.lineSegmentPlane(t,i,r,h),m.lineSegmentPlane(t,n,r,d),{positions:[t,i,n,h,d],indices:[0,3,4,1,2,4,1,4,3]};if(l)return m.lineSegmentPlane(i,n,r,h),m.lineSegmentPlane(i,t,r,d),{positions:[t,i,n,h,d],indices:[1,3,4,2,0,4,2,4,3]};if(u)return m.lineSegmentPlane(n,t,r,h),m.lineSegmentPlane(n,i,r,d),{positions:[t,i,n,h,d],indices:[2,3,4,0,1,4,0,4,3]}}else if(2===c){if(!s)return m.lineSegmentPlane(i,t,r,h),m.lineSegmentPlane(n,t,r,d),{positions:[t,i,n,h,d],indices:[1,2,4,1,4,3,0,3,4]};if(!l)return m.lineSegmentPlane(n,i,r,h),m.lineSegmentPlane(t,i,r,d),{positions:[t,i,n,h,d],indices:[2,0,4,2,4,3,1,3,4]};if(!u)return m.lineSegmentPlane(t,n,r,h),m.lineSegmentPlane(i,n,r,d),{positions:[t,i,n,h,d],indices:[0,1,4,0,4,3,2,3,4]}}},m}),define("Cesium/Core/binarySearch",["./defined","./DeveloperError"],function(e,t){"use strict";function i(e,t,i){for(var n,r,o=0,a=e.length-1;a>=o;)if(n=~~((o+a)/2),r=i(e[n],t),0>r)o=n+1;else{if(!(r>0))return n;a=n-1}return~(a+1)}return i}),define("Cesium/Core/EarthOrientationParametersSample",[],function(){"use strict";function e(e,t,i,n,r){this.xPoleWander=e,this.yPoleWander=t,this.xPoleOffset=i,this.yPoleOffset=n,this.ut1MinusUtc=r}return e}),define("Cesium/ThirdParty/sprintf",[],function(){function e(){var e=/%%|%(\d+\$)?([-+\'#0 ]*)(\*\d+\$|\*|\d+)?(\.(\*\d+\$|\*|\d+))?([scboxXuideEfFgG])/g,t=arguments,i=0,n=t[i++],r=function(e,t,i,n){i||(i=" ");var r=e.length>=t?"":Array(1+t-e.length>>>0).join(i);return n?e+r:r+e},o=function(e,t,i,n,o,a){var s=n-e.length;return s>0&&(e=i||!o?r(e,n,a,i):e.slice(0,t.length)+r("",s,"0",!0)+e.slice(t.length)),e},a=function(e,t,i,n,a,s,l){var u=e>>>0;return i=i&&u&&{2:"0b",8:"0",16:"0x"}[t]||"",e=i+r(u.toString(t),s||0,"0",!1),o(e,i,n,a,l)},s=function(e,t,i,n,r,a){return null!=n&&(e=e.slice(0,n)),o(e,"",t,i,r,a)},l=function(e,n,l,u,c,h,d){var p,m,f,g,v;if("%%"==e)return"%";for(var _=!1,y="",C=!1,w=!1,E=" ",b=l.length,S=0;l&&b>S;S++)switch(l.charAt(S)){case" ":y=" ";break;case"+":y="+";break;case"-":_=!0;break;case"'":E=l.charAt(S+1);break;case"0":C=!0;break;case"#":w=!0}if(u=u?"*"==u?+t[i++]:"*"==u.charAt(0)?+t[u.slice(1,-1)]:+u:0,0>u&&(u=-u,_=!0),!isFinite(u))throw new Error("sprintf: (minimum-)width must be finite");switch(h=h?"*"==h?+t[i++]:"*"==h.charAt(0)?+t[h.slice(1,-1)]:+h:"fFeE".indexOf(d)>-1?6:"d"==d?0:void 0,v=n?t[n.slice(0,-1)]:t[i++],d){case"s":return s(String(v),_,u,h,C,E);case"c":return s(String.fromCharCode(+v),_,u,h,C);case"b":return a(v,2,w,_,u,h,C);case"o":return a(v,8,w,_,u,h,C);case"x":return a(v,16,w,_,u,h,C);case"X":return a(v,16,w,_,u,h,C).toUpperCase();case"u":return a(v,10,w,_,u,h,C);case"i":case"d":return p=+v||0,p=Math.round(p-p%1),m=0>p?"-":y,v=m+r(String(Math.abs(p)),h,"0",!1),o(v,m,_,u,C);case"e":case"E":case"f":case"F":case"g":case"G":return p=+v,m=0>p?"-":y,f=["toExponential","toFixed","toPrecision"]["efg".indexOf(d.toLowerCase())],g=["toString","toUpperCase"]["eEfFgG".indexOf(d)%2],v=m+Math.abs(p)[f](h),o(v,m,_,u,C)[g]();default:return e}};return n.replace(e,l)}return e}),define("Cesium/Core/GregorianDate",[],function(){"use strict";function e(e,t,i,n,r,o,a,s){this.year=e,this.month=t,this.day=i,this.hour=n,this.minute=r,this.second=o,this.millisecond=a,this.isLeapSecond=s}return e}),define("Cesium/Core/isLeapYear",["./DeveloperError"],function(e){"use strict";function t(e){return e%4===0&&e%100!==0||e%400===0}return t}),define("Cesium/Core/LeapSecond",[],function(){"use strict";function e(e,t){this.julianDate=e,this.offset=t}return e}),define("Cesium/Core/TimeConstants",["./freezeObject"],function(e){"use strict";var t={SECONDS_PER_MILLISECOND:.001,SECONDS_PER_MINUTE:60,MINUTES_PER_HOUR:60,HOURS_PER_DAY:24,SECONDS_PER_HOUR:3600,MINUTES_PER_DAY:1440,SECONDS_PER_DAY:86400,DAYS_PER_JULIAN_CENTURY:36525,PICOSECOND:1e-9,MODIFIED_JULIAN_DATE_DIFFERENCE:2400000.5};return e(t)}),define("Cesium/Core/TimeStandard",["./freezeObject"],function(e){"use strict";var t={UTC:0,TAI:1};return e(t)}),define("Cesium/Core/JulianDate",["../ThirdParty/sprintf","./binarySearch","./defaultValue","./defined","./DeveloperError","./GregorianDate","./isLeapYear","./LeapSecond","./TimeConstants","./TimeStandard"],function(e,t,i,n,r,o,a,s,l,u){"use strict";function c(e,t){return f.compare(e.julianDate,t.julianDate)}function h(e){y.julianDate=e;var i=f.leapSeconds,n=t(i,y,c);0>n&&(n=~n),n>=i.length&&(n=i.length-1);var r=i[n].offset;if(n>0){var o=f.secondsDifference(i[n].julianDate,e);o>r&&(n--,r=i[n].offset)}f.addSeconds(e,r,e)}function d(e,i){y.julianDate=e;var n=f.leapSeconds,r=t(n,y,c);if(0>r&&(r=~r),0===r)return f.addSeconds(e,-n[0].offset,i);if(r>=n.length)return f.addSeconds(e,-n[r-1].offset,i);var o=f.secondsDifference(n[r].julianDate,e);return 0===o?f.addSeconds(e,-n[r].offset,i):1>=o?void 0:f.addSeconds(e,-n[--r].offset,i)}function p(e,t,i){var n=t/l.SECONDS_PER_DAY|0;return e+=n,t-=l.SECONDS_PER_DAY*n,0>t&&(e--,t+=l.SECONDS_PER_DAY),i.dayNumber=e,i.secondsOfDay=t,i}function m(e,t,i,n,r,o,a){var s=(t-14)/12|0,u=e+4800+s,c=(1461*u/4|0)+(367*(t-2-12*s)/12|0)-(3*((u+100)/100|0)/4|0)+i-32075;n-=12,0>n&&(n+=24);var h=o+(n*l.SECONDS_PER_HOUR+r*l.SECONDS_PER_MINUTE+a*l.SECONDS_PER_MILLISECOND);return h>=43200&&(c-=1),[c,h]}function f(e,t,n){this.dayNumber=void 0,this.secondsOfDay=void 0,e=i(e,0),t=i(t,0),n=i(n,u.UTC);var r=0|e;t+=(e-r)*l.SECONDS_PER_DAY,p(r,t,this),n===u.UTC&&h(this)}var g=new o,v=[31,28,31,30,31,30,31,31,30,31,30,31],_=29,y=new s,C=/^(\d{4})$/,w=/^(\d{4})-(\d{2})$/,E=/^(\d{4})-?(\d{3})$/,b=/^(\d{4})-?W(\d{2})-?(\d{1})?$/,S=/^(\d{4})-?(\d{2})-?(\d{2})$/,T=/([Z+\-])?(\d{2})?:?(\d{2})?$/,x=/^(\d{2})(\.\d+)?/.source+T.source,A=/^(\d{2}):?(\d{2})(\.\d+)?/.source+T.source,P=/^(\d{2}):?(\d{2}):?(\d{2})(\.\d+)?/.source+T.source,M="Invalid ISO 8601 date.";f.fromDate=function(e,t){var i=m(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds());return n(t)?(p(i[0],i[1],t),h(t),t):new f(i[0],i[1],u.UTC)},f.fromIso8601=function(e,t){e=e.replace(",",".");var i,o,s,l=e.split("T"),c=1,d=1,g=0,y=0,T=0,D=0,I=l[0],R=l[1];if(!n(I))throw new r(M);var O;if(l=I.match(S),null!==l){if(O=I.split("-").length-1,O>0&&2!==O)throw new r(M);i=+l[1],c=+l[2],d=+l[3]}else if(l=I.match(w),null!==l)i=+l[1],c=+l[2];else if(l=I.match(C),null!==l)i=+l[1];else{var L;if(l=I.match(E),null!==l){if(i=+l[1],L=+l[2],s=a(i),1>L||s&&L>366||!s&&L>365)throw new r(M)}else{if(l=I.match(b),null===l)throw new r(M);i=+l[1];var N=+l[2],F=+l[3]||0;if(O=I.split("-").length-1,O>0&&(!n(l[3])&&1!==O||n(l[3])&&2!==O))throw new r(M);var k=new Date(Date.UTC(i,0,4));L=7*N+F-k.getUTCDay()-3}o=new Date(Date.UTC(i,0,1)),o.setUTCDate(L),c=o.getUTCMonth()+1,d=o.getUTCDate()}if(s=a(i),1>c||c>12||1>d||(2!==c||!s)&&d>v[c-1]||s&&2===c&&d>_)throw new r(M);var B;if(n(R)){if(l=R.match(P),null!==l){if(O=R.split(":").length-1,O>0&&2!==O&&3!==O)throw new r(M);g=+l[1],y=+l[2],T=+l[3],D=1e3*+(l[4]||0),B=5}else if(l=R.match(A),null!==l){if(O=R.split(":").length-1,O>2)throw new r(M);g=+l[1],y=+l[2],T=60*+(l[3]||0),B=4}else{if(l=R.match(x),null===l)throw new r(M);g=+l[1],y=60*+(l[2]||0),B=3}if(y>=60||T>=61||g>24||24===g&&(y>0||T>0||D>0))throw new r(M);var z=l[B],V=+l[B+1],U=+(l[B+2]||0);switch(z){case"+":g-=V,y-=U;break;case"-":g+=V,y+=U;break;case"Z":break;default:y+=new Date(Date.UTC(i,c-1,d,g,y)).getTimezoneOffset()}}else y+=new Date(i,c-1,d).getTimezoneOffset();var G=60===T;for(G&&T--;y>=60;)y-=60,g++;for(;g>=24;)g-=24,d++;for(o=s&&2===c?_:v[c-1];d>o;)d-=o,c++,c>12&&(c-=12,i++),o=s&&2===c?_:v[c-1];for(;0>y;)y+=60,g--;for(;0>g;)g+=24,d--;for(;1>d;)c--,1>c&&(c+=12,i--),o=s&&2===c?_:v[c-1],d+=o;var W=m(i,c,d,g,y,T,D);return n(t)?(p(W[0],W[1],t),h(t)):t=new f(W[0],W[1],u.UTC),G&&f.addSeconds(t,1,t),t},f.now=function(e){return f.fromDate(new Date,e)};var D=new f(0,0,u.TAI);return f.toGregorianDate=function(e,t){var i=!1,r=d(e,D);n(r)||(f.addSeconds(e,-1,D),r=d(D,D),i=!0);var a=r.dayNumber,s=r.secondsOfDay;s>=43200&&(a+=1);var u=a+68569|0,c=4*u/146097|0;u=u-((146097*c+3)/4|0)|0;var h=4e3*(u+1)/1461001|0;u=u-(1461*h/4|0)+31|0;var p=80*u/2447|0,m=u-(2447*p/80|0)|0;u=p/11|0;var g=p+2-12*u|0,v=100*(c-49)+h+u|0,_=s/l.SECONDS_PER_HOUR|0,y=s-_*l.SECONDS_PER_HOUR,C=y/l.SECONDS_PER_MINUTE|0;y-=C*l.SECONDS_PER_MINUTE;var w=0|y,E=(y-w)/l.SECONDS_PER_MILLISECOND;return _+=12,_>23&&(_-=24),i&&(w+=1),n(t)?(t.year=v,t.month=g,t.day=m,t.hour=_,t.minute=C,t.second=w,t.millisecond=E,t.isLeapSecond=i,t):new o(v,g,m,_,C,w,E,i)},f.toDate=function(e){var t=f.toGregorianDate(e,g),i=t.second;return t.isLeapSecond&&(i-=1),new Date(Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,i,t.millisecond))},f.toIso8601=function(t,i){var r,o=f.toGregorianDate(t,o);return n(i)||0===o.millisecond?n(i)&&0!==i?(r=(.01*o.millisecond).toFixed(i).replace(".","").slice(0,i),e("%04d-%02d-%02dT%02d:%02d:%02d.%sZ",o.year,o.month,o.day,o.hour,o.minute,o.second,r)):e("%04d-%02d-%02dT%02d:%02d:%02dZ",o.year,o.month,o.day,o.hour,o.minute,o.second):(r=(.01*o.millisecond).toString().replace(".",""),e("%04d-%02d-%02dT%02d:%02d:%02d.%sZ",o.year,o.month,o.day,o.hour,o.minute,o.second,r))},f.clone=function(e,t){return n(e)?n(t)?(t.dayNumber=e.dayNumber,t.secondsOfDay=e.secondsOfDay,t):new f(e.dayNumber,e.secondsOfDay,u.TAI):void 0},f.compare=function(e,t){var i=e.dayNumber-t.dayNumber;return 0!==i?i:e.secondsOfDay-t.secondsOfDay},f.equals=function(e,t){return e===t||n(e)&&n(t)&&e.dayNumber===t.dayNumber&&e.secondsOfDay===t.secondsOfDay},f.equalsEpsilon=function(e,t,i){return e===t||n(e)&&n(t)&&Math.abs(f.secondsDifference(e,t))<=i},f.totalDays=function(e){return e.dayNumber+e.secondsOfDay/l.SECONDS_PER_DAY},f.secondsDifference=function(e,t){var i=(e.dayNumber-t.dayNumber)*l.SECONDS_PER_DAY;return i+(e.secondsOfDay-t.secondsOfDay)},f.daysDifference=function(e,t){var i=e.dayNumber-t.dayNumber,n=(e.secondsOfDay-t.secondsOfDay)/l.SECONDS_PER_DAY;return i+n},f.computeTaiMinusUtc=function(e){y.julianDate=e;var i=f.leapSeconds,n=t(i,y,c);return 0>n&&(n=~n,--n,0>n&&(n=0)),i[n].offset},f.addSeconds=function(e,t,i){return p(e.dayNumber,e.secondsOfDay+t,i)},f.addMinutes=function(e,t,i){var n=e.secondsOfDay+t*l.SECONDS_PER_MINUTE;return p(e.dayNumber,n,i)},f.addHours=function(e,t,i){var n=e.secondsOfDay+t*l.SECONDS_PER_HOUR;return p(e.dayNumber,n,i)},f.addDays=function(e,t,i){var n=e.dayNumber+t;return p(n,e.secondsOfDay,i)},f.lessThan=function(e,t){return f.compare(e,t)<0},f.lessThanOrEquals=function(e,t){return f.compare(e,t)<=0},f.greaterThan=function(e,t){return f.compare(e,t)>0},f.greaterThanOrEquals=function(e,t){return f.compare(e,t)>=0},f.prototype.clone=function(e){return f.clone(this,e)},f.prototype.equals=function(e){return f.equals(this,e)},f.prototype.equalsEpsilon=function(e,t){return f.equalsEpsilon(this,e,t)},f.prototype.toString=function(){return f.toIso8601(this)},f.leapSeconds=[new s(new f(2441317,43210,u.TAI),10),new s(new f(2441499,43211,u.TAI),11),new s(new f(2441683,43212,u.TAI),12),new s(new f(2442048,43213,u.TAI),13),new s(new f(2442413,43214,u.TAI),14),new s(new f(2442778,43215,u.TAI),15),new s(new f(2443144,43216,u.TAI),16),new s(new f(2443509,43217,u.TAI),17),new s(new f(2443874,43218,u.TAI),18),new s(new f(2444239,43219,u.TAI),19),new s(new f(2444786,43220,u.TAI),20),new s(new f(2445151,43221,u.TAI),21),new s(new f(2445516,43222,u.TAI),22),new s(new f(2446247,43223,u.TAI),23),new s(new f(2447161,43224,u.TAI),24),new s(new f(2447892,43225,u.TAI),25),new s(new f(2448257,43226,u.TAI),26),new s(new f(2448804,43227,u.TAI),27),new s(new f(2449169,43228,u.TAI),28),new s(new f(2449534,43229,u.TAI),29),new s(new f(2450083,43230,u.TAI),30),new s(new f(2450630,43231,u.TAI),31),new s(new f(2451179,43232,u.TAI),32),new s(new f(2453736,43233,u.TAI),33),new s(new f(2454832,43234,u.TAI),34),new s(new f(2456109,43235,u.TAI),35),new s(new f(2457204,43236,u.TAI),36)],f}),define("Cesium/Core/clone",["./defaultValue"],function(e){ +"use strict";function t(i,n){if(null===i||"object"!=typeof i)return i;n=e(n,!1);var r=new i.constructor;for(var o in i)if(i.hasOwnProperty(o)){var a=i[o];n&&(a=t(a,n)),r[o]=a}return r}return t}),define("Cesium/Core/parseResponseHeaders",[],function(){"use strict";function e(e){var t={};if(!e)return t;for(var i=e.split("\r\n"),n=0;n0){var a=r.substring(0,o),s=r.substring(o+2);t[a]=s}}return t}return e}),define("Cesium/Core/RequestErrorEvent",["./defined","./parseResponseHeaders"],function(e,t){"use strict";function i(e,i,n){this.statusCode=e,this.response=i,this.responseHeaders=n,"string"==typeof this.responseHeaders&&(this.responseHeaders=t(this.responseHeaders))}return i.prototype.toString=function(){var t="Request has failed.";return e(this.statusCode)&&(t+=" Status Code: "+this.statusCode),t},i}),define("Cesium/Core/loadWithXhr",["../ThirdParty/when","./defaultValue","./defined","./DeveloperError","./RequestErrorEvent","./RuntimeError"],function(e,t,i,n,r,o){"use strict";function a(i){i=t(i,t.EMPTY_OBJECT);var n=i.responseType,r=t(i.method,"GET"),o=i.data,s=i.headers,l=i.overrideMimeType;return e(i.url,function(t){var i=e.defer();return a.load(t,n,r,o,s,i,l),i.promise})}function s(e,t){var i=decodeURIComponent(t);return e?atob(i):i}function l(e,t){for(var i=s(e,t),n=new ArrayBuffer(i.length),r=new Uint8Array(n),o=0;o=200&&p.status<300?i(p.response)?l.resolve(p.response):i(p.responseXML)&&p.responseXML.hasChildNodes()?l.resolve(p.responseXML):i(p.responseText)?l.resolve(p.responseText):l.reject(new o("unknown XMLHttpRequest response type.")):l.reject(new r(p.status,p.response,p.getAllResponseHeaders()))},p.onerror=function(e){l.reject(new r)},p.send(a)},a.defaultLoad=a.load,a}),define("Cesium/Core/loadText",["./loadWithXhr"],function(e){"use strict";function t(t,i){return e({url:t,headers:i})}return t}),define("Cesium/Core/loadJson",["./clone","./defined","./DeveloperError","./loadText"],function(e,t,i,n){"use strict";function r(i,r){return t(r)?t(r.Accept)||(r=e(r),r.Accept=o.Accept):r=o,n(i,r).then(function(e){return JSON.parse(e)})}var o={Accept:"application/json,*/*;q=0.01"};return r}),define("Cesium/Core/EarthOrientationParameters",["../ThirdParty/when","./binarySearch","./defaultValue","./defined","./EarthOrientationParametersSample","./freezeObject","./JulianDate","./LeapSecond","./loadJson","./RuntimeError","./TimeConstants","./TimeStandard"],function(e,t,i,n,r,o,a,s,l,u,c,h){"use strict";function d(t){if(t=i(t,i.EMPTY_OBJECT),this._dates=void 0,this._samples=void 0,this._dateColumn=-1,this._xPoleWanderRadiansColumn=-1,this._yPoleWanderRadiansColumn=-1,this._ut1MinusUtcSecondsColumn=-1,this._xCelestialPoleOffsetRadiansColumn=-1,this._yCelestialPoleOffsetRadiansColumn=-1,this._taiMinusUtcSecondsColumn=-1,this._columnCount=0,this._lastIndex=-1,this._downloadPromise=void 0,this._dataError=void 0,this._addNewLeapSeconds=i(t.addNewLeapSeconds,!0),n(t.data))m(this,t.data);else if(n(t.url)){var r=this;this._downloadPromise=e(l(t.url),function(e){m(r,e)},function(){r._dataError="An error occurred while retrieving the EOP data from the URL "+t.url+"."})}else m(this,{columnNames:["dateIso8601","modifiedJulianDateUtc","xPoleWanderRadians","yPoleWanderRadians","ut1MinusUtcSeconds","lengthOfDayCorrectionSeconds","xCelestialPoleOffsetRadians","yCelestialPoleOffsetRadians","taiMinusUtcSeconds"],samples:[]})}function p(e,t){return a.compare(e.julianDate,t)}function m(e,i){if(!n(i.columnNames))return void(e._dataError="Error in loaded EOP data: The columnNames property is required.");if(!n(i.samples))return void(e._dataError="Error in loaded EOP data: The samples property is required.");var r=i.columnNames.indexOf("modifiedJulianDateUtc"),o=i.columnNames.indexOf("xPoleWanderRadians"),l=i.columnNames.indexOf("yPoleWanderRadians"),u=i.columnNames.indexOf("ut1MinusUtcSeconds"),d=i.columnNames.indexOf("xCelestialPoleOffsetRadians"),m=i.columnNames.indexOf("yCelestialPoleOffsetRadians"),f=i.columnNames.indexOf("taiMinusUtcSeconds");if(0>r||0>o||0>l||0>u||0>d||0>m||0>f)return void(e._dataError="Error in loaded EOP data: The columnNames property must include modifiedJulianDateUtc, xPoleWanderRadians, yPoleWanderRadians, ut1MinusUtcSeconds, xCelestialPoleOffsetRadians, yCelestialPoleOffsetRadians, and taiMinusUtcSeconds columns");var g=e._samples=i.samples,v=e._dates=[];e._dateColumn=r,e._xPoleWanderRadiansColumn=o,e._yPoleWanderRadiansColumn=l,e._ut1MinusUtcSecondsColumn=u,e._xCelestialPoleOffsetRadiansColumn=d,e._yCelestialPoleOffsetRadiansColumn=m,e._taiMinusUtcSecondsColumn=f,e._columnCount=i.columnNames.length,e._lastIndex=void 0;for(var _,y=e._addNewLeapSeconds,C=0,w=g.length;w>C;C+=e._columnCount){var E=g[C+r],b=g[C+f],S=E+c.MODIFIED_JULIAN_DATE_DIFFERENCE,T=new a(S,b,h.TAI);if(v.push(T),y){if(b!==_&&n(_)){var x=a.leapSeconds,A=t(x,T,p);if(0>A){var P=new s(T,b);x.splice(~A,0,P)}}_=b}}}function f(e,t,i,n,r){var o=i*n;r.xPoleWander=t[o+e._xPoleWanderRadiansColumn],r.yPoleWander=t[o+e._yPoleWanderRadiansColumn],r.xPoleOffset=t[o+e._xCelestialPoleOffsetRadiansColumn],r.yPoleOffset=t[o+e._yCelestialPoleOffsetRadiansColumn],r.ut1MinusUtc=t[o+e._ut1MinusUtcSecondsColumn]}function g(e,t,i){return t+e*(i-t)}function v(e,t,i,n,r,o,s){var l=e._columnCount;if(o>t.length-1)return s.xPoleWander=0,s.yPoleWander=0,s.xPoleOffset=0,s.yPoleOffset=0,s.ut1MinusUtc=0,s;var u=t[r],c=t[o];if(u.equals(c)||n.equals(u))return f(e,i,r,l,s),s;if(n.equals(c))return f(e,i,o,l,s),s;var h=a.secondsDifference(n,u)/a.secondsDifference(c,u),d=r*l,p=o*l,m=i[d+e._ut1MinusUtcSecondsColumn],v=i[p+e._ut1MinusUtcSecondsColumn],_=v-m;if(_>.5||-.5>_){var y=i[d+e._taiMinusUtcSecondsColumn],C=i[p+e._taiMinusUtcSecondsColumn];y!==C&&(c.equals(n)?m=v:v-=C-y)}return s.xPoleWander=g(h,i[d+e._xPoleWanderRadiansColumn],i[p+e._xPoleWanderRadiansColumn]),s.yPoleWander=g(h,i[d+e._yPoleWanderRadiansColumn],i[p+e._yPoleWanderRadiansColumn]),s.xPoleOffset=g(h,i[d+e._xCelestialPoleOffsetRadiansColumn],i[p+e._xCelestialPoleOffsetRadiansColumn]),s.yPoleOffset=g(h,i[d+e._yCelestialPoleOffsetRadiansColumn],i[p+e._yCelestialPoleOffsetRadiansColumn]),s.ut1MinusUtc=g(h,m,v),s}return d.NONE=o({getPromiseToLoad:function(){return e()},compute:function(e,t){return n(t)?(t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0):t=new r(0,0,0,0,0),t}}),d.prototype.getPromiseToLoad=function(){return e(this._downloadPromise)},d.prototype.compute=function(e,i){if(n(this._samples)){if(n(i)||(i=new r(0,0,0,0,0)),0===this._samples.length)return i.xPoleWander=0,i.yPoleWander=0,i.xPoleOffset=0,i.yPoleOffset=0,i.ut1MinusUtc=0,i;var o=this._dates,s=this._lastIndex,l=0,c=0;if(n(s)){var h=o[s],d=o[s+1],p=a.lessThanOrEquals(h,e),m=!n(d),f=m||a.greaterThanOrEquals(d,e);if(p&&f)return l=s,!m&&d.equals(e)&&++l,c=l+1,v(this,o,this._samples,e,l,c,i),i}var g=t(o,e,a.compare,this._dateColumn);return g>=0?(gl&&(l=0)),this._lastIndex=l,v(this,o,this._samples,e,l,c,i),i}if(n(this._dataError))throw new u(this._dataError)},d}),define("Cesium/ThirdParty/Uri",[],function(){function e(t){if(t instanceof e)this.scheme=t.scheme,this.authority=t.authority,this.path=t.path,this.query=t.query,this.fragment=t.fragment;else if(t){var i=n.exec(t);this.scheme=i[1],this.authority=i[2],this.path=i[3],this.query=i[4],this.fragment=i[5]}}function t(e){var t=unescape(e);return o.test(t)?t:e.toUpperCase()}function i(e,t,i,n){return(t||"")+i.toLowerCase()+(n||"")}e.prototype.scheme=null,e.prototype.authority=null,e.prototype.path="",e.prototype.query=null,e.prototype.fragment=null;var n=new RegExp("^(?:([^:/?#]+):)?(?://([^/?#]*))?([^?#]*)(?:\\?([^#]*))?(?:#(.*))?$");e.prototype.getScheme=function(){return this.scheme},e.prototype.getAuthority=function(){return this.authority},e.prototype.getPath=function(){return this.path},e.prototype.getQuery=function(){return this.query},e.prototype.getFragment=function(){return this.fragment},e.prototype.isAbsolute=function(){return!!this.scheme&&!this.fragment},e.prototype.isSameDocumentAs=function(e){return e.scheme==this.scheme&&e.authority==this.authority&&e.path==this.path&&e.query==this.query},e.prototype.equals=function(e){return this.isSameDocumentAs(e)&&e.fragment==this.fragment},e.prototype.normalize=function(){this.removeDotSegments(),this.scheme&&(this.scheme=this.scheme.toLowerCase()),this.authority&&(this.authority=this.authority.replace(a,i).replace(r,t)),this.path&&(this.path=this.path.replace(r,t)),this.query&&(this.query=this.query.replace(r,t)),this.fragment&&(this.fragment=this.fragment.replace(r,t))};var r=/%[0-9a-z]{2}/gi,o=/[a-zA-Z0-9\-\._~]/,a=/(.*@)?([^@:]*)(:.*)?/;return e.prototype.resolve=function(t){var i=new e;return this.scheme?(i.scheme=this.scheme,i.authority=this.authority,i.path=this.path,i.query=this.query):(i.scheme=t.scheme,this.authority?(i.authority=this.authority,i.path=this.path,i.query=this.query):(i.authority=t.authority,""==this.path?(i.path=t.path,i.query=this.query||t.query):("/"==this.path.charAt(0)?(i.path=this.path,i.removeDotSegments()):(t.authority&&""==t.path?i.path="/"+this.path:i.path=t.path.substring(0,t.path.lastIndexOf("/")+1)+this.path,i.removeDotSegments()),i.query=this.query))),i.fragment=this.fragment,i},e.prototype.removeDotSegments=function(){var e,t=this.path.split("/"),i=[],n=""==t[0];n&&t.shift();for(""==t[0]?t.shift():null;t.length;)e=t.shift(),".."==e?i.pop():"."!=e&&i.push(e);("."==e||".."==e)&&i.push(""),n&&i.unshift(""),this.path=i.join("/")},e.prototype.toString=function(){var e="";return this.scheme&&(e+=this.scheme+":"),this.authority&&(e+="//"+this.authority),e+=this.path,this.query&&(e+="?"+this.query),this.fragment&&(e+="#"+this.fragment),e},e}),define("Cesium/Core/getAbsoluteUri",["../ThirdParty/Uri","./defaultValue","./defined","./DeveloperError"],function(e,t,i,n){"use strict";function r(i,n){n=t(n,document.location.href);var r=new e(n),o=new e(i);return o.resolve(r).toString()}return r}),define("Cesium/Core/joinUrls",["../ThirdParty/Uri","./defaultValue","./defined","./DeveloperError"],function(e,t,i,n){"use strict";function r(n,r,o){o=t(o,!0),n instanceof e||(n=new e(n)),r instanceof e||(r=new e(r)),i(r.authority)&&!i(r.scheme)&&("undefined"!=typeof document&&i(document.location)&&i(document.location.href)?r.scheme=new e(document.location.href).scheme:r.scheme=n.scheme);var a=n;r.isAbsolute()&&(a=r);var s="";i(a.scheme)&&(s+=a.scheme+":"),i(a.authority)&&(s+="//"+a.authority,""!==a.path&&"/"!==a.path&&(s=s.replace(/\/?$/,"/"),a.path=a.path.replace(/^\/?/g,""))),s+=a===n?o?n.path.replace(/\/?$/,"/")+r.path.replace(/^\/?/g,""):n.path+r.path:r.path;var l=i(n.query),u=i(r.query);l&&u?s+="?"+n.query+"&"+r.query:l&&!u?s+="?"+n.query:!l&&u&&(s+="?"+r.query);var c=i(r.fragment);return i(n.fragment)&&!c?s+="#"+n.fragment:c&&(s+="#"+r.fragment),s}return r}),define("Cesium/Core/buildModuleUrl",["../ThirdParty/Uri","./defined","./DeveloperError","./getAbsoluteUri","./joinUrls","require"],function(e,t,i,n,r,o){"use strict";function a(){for(var e=document.getElementsByTagName("script"),t=0,i=e.length;i>t;++t){var n=e[t].getAttribute("src"),r=m.exec(n);if(null!==r)return r[1]}}function s(){if(t(h))return h;var r;if(r="undefined"!=typeof CESIUM_BASE_URL?CESIUM_BASE_URL:a(),!t(r))throw new i("Unable to determine Cesium base URL automatically, try defining a global variable called CESIUM_BASE_URL.");return h=new e(n(r))}function l(e){return o.toUrl("../"+e)}function u(e){return r(s(),e)}function c(e){t(d)||(d=t(o.toUrl)?l:u),t(p)||(p=document.createElement("a"));var i=d(e);return p.href=i,p.href=p.href,p.href}var h,d,p,m=/((?:.*\/)|^)cesium[\w-]*\.js(?:\W|$)/i;return c._cesiumScriptRegex=m,c.setBaseUrl=function(t){h=new e(t).resolve(new e(document.location.href))},c}),define("Cesium/Core/Iau2006XysSample",[],function(){"use strict";function e(e,t,i){this.x=e,this.y=t,this.s=i}return e}),define("Cesium/Core/Iau2006XysData",["../ThirdParty/when","./buildModuleUrl","./defaultValue","./defined","./Iau2006XysSample","./JulianDate","./loadJson","./TimeStandard"],function(e,t,i,n,r,o,a,s){"use strict";function l(e){e=i(e,i.EMPTY_OBJECT),this._xysFileUrlTemplate=e.xysFileUrlTemplate,this._interpolationOrder=i(e.interpolationOrder,9),this._sampleZeroJulianEphemerisDate=i(e.sampleZeroJulianEphemerisDate,2442396.5),this._sampleZeroDateTT=new o(this._sampleZeroJulianEphemerisDate,0,s.TAI),this._stepSizeDays=i(e.stepSizeDays,1),this._samplesPerXysFile=i(e.samplesPerXysFile,1e3),this._totalSamples=i(e.totalSamples,27426),this._samples=new Array(3*this._totalSamples),this._chunkDownloadsInProgress=[];for(var t=this._interpolationOrder,n=this._denominators=new Array(t+1),r=this._xTable=new Array(t+1),a=Math.pow(this._stepSizeDays,t),l=0;t>=l;++l){n[l]=a,r[l]=l*this._stepSizeDays;for(var u=0;t>=u;++u)u!==l&&(n[l]*=l-u);n[l]=1/n[l]}this._work=new Array(t+1),this._coef=new Array(t+1)}function u(e,t,i){var n=h;return n.dayNumber=t,n.secondsOfDay=i,o.daysDifference(n,e._sampleZeroDateTT)}function c(i,r){if(i._chunkDownloadsInProgress[r])return i._chunkDownloadsInProgress[r];var o=e.defer();i._chunkDownloadsInProgress[r]=o;var s,l=i._xysFileUrlTemplate;return s=n(l)?l.replace("{0}",r):t("Assets/IAU2006_XYS/IAU2006_XYS_"+r+".json"),e(a(s),function(e){i._chunkDownloadsInProgress[r]=!1;for(var t=i._samples,n=e.samples,a=r*i._samplesPerXysFile*3,s=0,l=n.length;l>s;++s)t[a+s]=n[s];o.resolve()}),o.promise}var h=new o(0,0,s.TAI);return l.prototype.preload=function(t,i,n,r){var o=u(this,t,i),a=u(this,n,r),s=o/this._stepSizeDays-this._interpolationOrder/2|0;0>s&&(s=0);var l=a/this._stepSizeDays-this._interpolationOrder/2|0+this._interpolationOrder;l>=this._totalSamples&&(l=this._totalSamples-1);for(var h=s/this._samplesPerXysFile|0,d=l/this._samplesPerXysFile|0,p=[],m=h;d>=m;++m)p.push(c(this,m));return e.all(p)},l.prototype.computeXysRadians=function(e,t,i){var o=u(this,e,t);if(!(0>o)){var a=o/this._stepSizeDays|0;if(!(a>=this._totalSamples)){var s=this._interpolationOrder,l=a-(s/2|0);0>l&&(l=0);var h=l+s;h>=this._totalSamples&&(h=this._totalSamples-1,l=h-s,0>l&&(l=0));var d=!1,p=this._samples;if(n(p[3*l])||(c(this,l/this._samplesPerXysFile|0),d=!0),n(p[3*h])||(c(this,h/this._samplesPerXysFile|0),d=!0),!d){n(i)?(i.x=0,i.y=0,i.s=0):i=new r(0,0,0);var m,f,g=o-l*this._stepSizeDays,v=this._work,_=this._denominators,y=this._coef,C=this._xTable;for(m=0;s>=m;++m)v[m]=g-C[m];for(m=0;s>=m;++m){for(y[m]=1,f=0;s>=f;++f)f!==m&&(y[m]*=v[f]);y[m]*=_[m];var w=3*(l+m);i.x+=y[m]*p[w++],i.y+=y[m]*p[w++],i.s+=y[m]*p[w]}return i}}}},l}),define("Cesium/Core/Fullscreen",["./defined","./defineProperties"],function(e,t){"use strict";var i,n={requestFullscreen:void 0,exitFullscreen:void 0,fullscreenEnabled:void 0,fullscreenElement:void 0,fullscreenchange:void 0,fullscreenerror:void 0},r={};return t(r,{element:{get:function(){return r.supportsFullscreen()?document[n.fullscreenElement]:void 0}},changeEventName:{get:function(){return r.supportsFullscreen()?n.fullscreenchange:void 0}},errorEventName:{get:function(){return r.supportsFullscreen()?n.fullscreenerror:void 0}},enabled:{get:function(){return r.supportsFullscreen()?document[n.fullscreenEnabled]:void 0}},fullscreen:{get:function(){return r.supportsFullscreen()?null!==r.element:void 0}}}),r.supportsFullscreen=function(){if(e(i))return i;i=!1;var t=document.body;if("function"==typeof t.requestFullscreen)return n.requestFullscreen="requestFullscreen",n.exitFullscreen="exitFullscreen",n.fullscreenEnabled="fullscreenEnabled",n.fullscreenElement="fullscreenElement",n.fullscreenchange="fullscreenchange",n.fullscreenerror="fullscreenerror",i=!0;for(var r,o=["webkit","moz","o","ms","khtml"],a=0,s=o.length;s>a;++a){var l=o[a];r=l+"RequestFullscreen","function"==typeof t[r]?(n.requestFullscreen=r,i=!0):(r=l+"RequestFullScreen","function"==typeof t[r]&&(n.requestFullscreen=r,i=!0)),r=l+"ExitFullscreen","function"==typeof document[r]?n.exitFullscreen=r:(r=l+"CancelFullScreen","function"==typeof document[r]&&(n.exitFullscreen=r)),r=l+"FullscreenEnabled",void 0!==document[r]?n.fullscreenEnabled=r:(r=l+"FullScreenEnabled",void 0!==document[r]&&(n.fullscreenEnabled=r)),r=l+"FullscreenElement",void 0!==document[r]?n.fullscreenElement=r:(r=l+"FullScreenElement",void 0!==document[r]&&(n.fullscreenElement=r)),r=l+"fullscreenchange",void 0!==document["on"+r]&&("ms"===l&&(r="MSFullscreenChange"),n.fullscreenchange=r),r=l+"fullscreenerror",void 0!==document["on"+r]&&("ms"===l&&(r="MSFullscreenError"),n.fullscreenerror=r)}return i},r.requestFullscreen=function(e,t){r.supportsFullscreen()&&e[n.requestFullscreen]({vrDisplay:t})},r.exitFullscreen=function(){r.supportsFullscreen()&&document[n.exitFullscreen]()},r}),define("Cesium/Core/FeatureDetection",["./defaultValue","./defined","./Fullscreen"],function(e,t,i){"use strict";function n(e){for(var t=e.split("."),i=0,n=t.length;n>i;++i)t[i]=parseInt(t[i],10);return t}function r(){if(!t(y)){y=!1;var e=/ Chrome\/([\.0-9]+)/.exec(_.userAgent);null!==e&&(y=!0,C=n(e[1]))}return y}function o(){return r()&&C}function a(){if(!t(w)&&(w=!1,!r()&&/ Safari\/[\.0-9]+/.test(_.userAgent))){var e=/ Version\/([\.0-9]+)/.exec(_.userAgent);null!==e&&(w=!0,E=n(e[1]))}return w}function s(){return a()&&E}function l(){if(!t(b)){b=!1;var e=/ AppleWebKit\/([\.0-9]+)(\+?)/.exec(_.userAgent);null!==e&&(b=!0,S=n(e[1]),S.isNightly=!!e[2])}return b}function u(){return l()&&S}function c(){if(!t(T)){T=!1;var e;"Microsoft Internet Explorer"===_.appName?(e=/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(_.userAgent),null!==e&&(T=!0,x=n(e[1]))):"Netscape"===_.appName&&(e=/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(_.userAgent),null!==e&&(T=!0,x=n(e[1])))}return T}function h(){return c()&&x}function d(){if(!t(A)){A=!1;var e=/Firefox\/([\.0-9]+)/.exec(_.userAgent);null!==e&&(A=!0,P=n(e[1]))}return A}function p(){return t(M)||(M=/Windows/i.test(_.appVersion)),M}function m(){return d()&&P}function f(){return t(D)||(D="undefined"!=typeof PointerEvent&&(!t(_.pointerEnabled)||_.pointerEnabled)),D}function g(){if(!t(R)){var e=document.createElement("canvas");e.setAttribute("style","image-rendering: -moz-crisp-edges;image-rendering: pixelated;");var i=e.style.imageRendering;R=t(i)&&""!==i,R&&(I=i)}return R}function v(){return g()?I:void 0}var _;_="undefined"!=typeof navigator?navigator:{};var y,C,w,E,b,S,T,x,A,P,M,D,I,R,O={isChrome:r,chromeVersion:o,isSafari:a,safariVersion:s,isWebkit:l,webkitVersion:u,isInternetExplorer:c,internetExplorerVersion:h,isFirefox:d,firefoxVersion:m,isWindows:p,hardwareConcurrency:e(_.hardwareConcurrency,3),supportsPointerEvents:f,supportsImageRenderingPixelated:g,imageRenderingValue:v};return O.supportsFullscreen=function(){return i.supportsFullscreen()},O.supportsTypedArrays=function(){return"undefined"!=typeof ArrayBuffer},O.supportsWebWorkers=function(){return"undefined"!=typeof Worker},O}),define("Cesium/Core/Quaternion",["./Cartesian3","./defaultValue","./defined","./DeveloperError","./FeatureDetection","./freezeObject","./Math","./Matrix3"],function(e,t,i,n,r,o,a,s){"use strict";function l(e,i,n,r){this.x=t(e,0),this.y=t(i,0),this.z=t(n,0),this.w=t(r,0)}var u=new e;l.fromAxisAngle=function(t,n,r){var o=n/2,a=Math.sin(o);u=e.normalize(t,u);var s=u.x*a,c=u.y*a,h=u.z*a,d=Math.cos(o);return i(r)?(r.x=s,r.y=c,r.z=h,r.w=d,r):new l(s,c,h,d)};var c=[1,2,0],h=new Array(3);l.fromRotationMatrix=function(e,t){var n,r,o,a,u,d=e[s.COLUMN0ROW0],p=e[s.COLUMN1ROW1],m=e[s.COLUMN2ROW2],f=d+p+m;if(f>0)n=Math.sqrt(f+1),u=.5*n,n=.5/n,r=(e[s.COLUMN1ROW2]-e[s.COLUMN2ROW1])*n,o=(e[s.COLUMN2ROW0]-e[s.COLUMN0ROW2])*n,a=(e[s.COLUMN0ROW1]-e[s.COLUMN1ROW0])*n;else{var g=c,v=0;p>d&&(v=1),m>d&&m>p&&(v=2);var _=g[v],y=g[_];n=Math.sqrt(e[s.getElementIndex(v,v)]-e[s.getElementIndex(_,_)]-e[s.getElementIndex(y,y)]+1);var C=h;C[v]=.5*n,n=.5/n,u=(e[s.getElementIndex(y,_)]-e[s.getElementIndex(_,y)])*n,C[_]=(e[s.getElementIndex(_,v)]+e[s.getElementIndex(v,_)])*n,C[y]=(e[s.getElementIndex(y,v)]+e[s.getElementIndex(v,y)])*n,r=-C[0],o=-C[1],a=-C[2]}return i(t)?(t.x=r,t.y=o,t.z=a,t.w=u,t):new l(r,o,a,u)};var d=new l;l.fromHeadingPitchRoll=function(t,i,n,r){var o=l.fromAxisAngle(e.UNIT_X,n,d),a=l.fromAxisAngle(e.UNIT_Y,-i,r);r=l.multiply(a,o,a);var s=l.fromAxisAngle(e.UNIT_Z,-t,d);return l.multiply(s,r,r)};var p=new e,m=new e,f=new l,g=new l,v=new l;l.packedLength=4,l.pack=function(e,i,n){n=t(n,0),i[n++]=e.x,i[n++]=e.y,i[n++]=e.z,i[n]=e.w},l.unpack=function(e,n,r){return n=t(n,0),i(r)||(r=new l),r.x=e[n],r.y=e[n+1],r.z=e[n+2],r.w=e[n+3],r},l.packedInterpolationLength=3,l.convertPackedArrayForInterpolation=function(e,t,i,n){l.unpack(e,4*i,v),l.conjugate(v,v);for(var r=0,o=i-t+1;o>r;r++){var a=3*r;l.unpack(e,4*(t+r),f),l.multiply(f,v,f),f.w<0&&l.negate(f,f),l.computeAxis(f,p);var s=l.computeAngle(f);n[a]=p.x*s,n[a+1]=p.y*s,n[a+2]=p.z*s}},l.unpackInterpolationResult=function(t,n,r,o,a){i(a)||(a=new l),e.fromArray(t,0,m);var s=e.magnitude(m);return l.unpack(n,4*o,g),0===s?l.clone(l.IDENTITY,f):l.fromAxisAngle(m,s,f),l.multiply(f,g,a)},l.clone=function(e,t){return i(e)?i(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t):new l(e.x,e.y,e.z,e.w):void 0},l.conjugate=function(e,t){return t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=e.w,t},l.magnitudeSquared=function(e){return e.x*e.x+e.y*e.y+e.z*e.z+e.w*e.w},l.magnitude=function(e){return Math.sqrt(l.magnitudeSquared(e))},l.normalize=function(e,t){var i=1/l.magnitude(e),n=e.x*i,r=e.y*i,o=e.z*i,a=e.w*i;return t.x=n,t.y=r,t.z=o,t.w=a,t},l.inverse=function(e,t){var i=l.magnitudeSquared(e);return t=l.conjugate(e,t),l.multiplyByScalar(t,1/i,t)},l.add=function(e,t,i){return i.x=e.x+t.x,i.y=e.y+t.y,i.z=e.z+t.z,i.w=e.w+t.w,i},l.subtract=function(e,t,i){return i.x=e.x-t.x,i.y=e.y-t.y,i.z=e.z-t.z,i.w=e.w-t.w,i},l.negate=function(e,t){return t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=-e.w,t},l.dot=function(e,t){return e.x*t.x+e.y*t.y+e.z*t.z+e.w*t.w},l.multiply=function(e,t,i){var n=e.x,r=e.y,o=e.z,a=e.w,s=t.x,l=t.y,u=t.z,c=t.w,h=a*s+n*c+r*u-o*l,d=a*l-n*u+r*c+o*s,p=a*u+n*l-r*s+o*c,m=a*c-n*s-r*l-o*u;return i.x=h,i.y=d,i.z=p,i.w=m,i},l.multiplyByScalar=function(e,t,i){return i.x=e.x*t,i.y=e.y*t,i.z=e.z*t,i.w=e.w*t,i},l.divideByScalar=function(e,t,i){return i.x=e.x/t,i.y=e.y/t,i.z=e.z/t,i.w=e.w/t,i},l.computeAxis=function(e,t){var i=e.w;if(Math.abs(i-1)r&&(r=-r,o=y=l.negate(t,y)),1-rR;++R){var O=R+1,L=2*O+1;P[R]=1/(O*L),M[R]=O/L}return P[7]=A/136,M[7]=8*A/17,l.fastSlerp=function(e,t,i,n){var r,o=l.dot(e,t);o>=0?r=1:(r=-1,o=-o);for(var a=o-1,s=1-i,u=i*i,c=s*s,h=7;h>=0;--h)D[h]=(P[h]*u-M[h])*a,I[h]=(P[h]*c-M[h])*a;var d=r*i*(1+D[0]*(1+D[1]*(1+D[2]*(1+D[3]*(1+D[4]*(1+D[5]*(1+D[6]*(1+D[7])))))))),p=s*(1+I[0]*(1+I[1]*(1+I[2]*(1+I[3]*(1+I[4]*(1+I[5]*(1+I[6]*(1+I[7])))))))),m=l.multiplyByScalar(e,p,x);return l.multiplyByScalar(t,d,n),l.add(m,n,n)},l.fastSquad=function(e,t,i,n,r,o){var a=l.fastSlerp(e,t,r,S),s=l.fastSlerp(i,n,r,T);return l.fastSlerp(a,s,2*r*(1-r),o)},l.equals=function(e,t){return e===t||i(e)&&i(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z&&e.w===t.w},l.equalsEpsilon=function(e,t,n){return e===t||i(e)&&i(t)&&Math.abs(e.x-t.x)<=n&&Math.abs(e.y-t.y)<=n&&Math.abs(e.z-t.z)<=n&&Math.abs(e.w-t.w)<=n},l.ZERO=o(new l(0,0,0,0)),l.IDENTITY=o(new l(0,0,0,1)),l.prototype.clone=function(e){return l.clone(this,e)},l.prototype.equals=function(e){return l.equals(this,e)},l.prototype.equalsEpsilon=function(e,t){return l.equalsEpsilon(this,e,t)},l.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+", "+this.w+")"},l}),define("Cesium/Core/Transforms",["../ThirdParty/when","./Cartesian2","./Cartesian3","./Cartesian4","./Cartographic","./defaultValue","./defined","./DeveloperError","./EarthOrientationParameters","./EarthOrientationParametersSample","./Ellipsoid","./Iau2006XysData","./Iau2006XysSample","./JulianDate","./Math","./Matrix3","./Matrix4","./Quaternion","./TimeConstants"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g,v,_){"use strict";var y={},C=new i,w=new i,E=new i;y.eastNorthUpToFixedFrame=function(e,t,n){if(m.equalsEpsilon(e.x,0,m.EPSILON14)&&m.equalsEpsilon(e.y,0,m.EPSILON14)){var r=m.sign(e.z);return a(n)?(n[0]=0,n[1]=1,n[2]=0,n[3]=0,n[4]=-r,n[5]=0,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=r,n[11]=0,n[12]=e.x,n[13]=e.y,n[14]=e.z,n[15]=1,n):new g(0,-r,0,e.x,1,0,0,e.y,0,0,r,e.z,0,0,0,1)}var s=C,l=w,u=E;return t=o(t,c.WGS84),t.geodeticSurfaceNormal(e,s),l.x=-e.y,l.y=e.x,l.z=0,i.normalize(l,l),i.cross(s,l,u),a(n)?(n[0]=l.x,n[1]=l.y,n[2]=l.z,n[3]=0,n[4]=u.x,n[5]=u.y,n[6]=u.z,n[7]=0,n[8]=s.x,n[9]=s.y,n[10]=s.z,n[11]=0,n[12]=e.x,n[13]=e.y,n[14]=e.z,n[15]=1,n):new g(l.x,u.x,s.x,e.x,l.y,u.y,s.y,e.y,l.z,u.z,s.z,e.z,0,0,0,1)};var b=new i,S=new i,T=new i;y.northEastDownToFixedFrame=function(e,t,n){if(m.equalsEpsilon(e.x,0,m.EPSILON14)&&m.equalsEpsilon(e.y,0,m.EPSILON14)){var r=m.sign(e.z);return a(n)?(n[0]=-r,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=1,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=-r,n[11]=0,n[12]=e.x,n[13]=e.y,n[14]=e.z,n[15]=1,n):new g(-r,0,0,e.x,0,1,0,e.y,0,0,-r,e.z,0,0,0,1)}var s=b,l=S,u=T;return t=o(t,c.WGS84),t.geodeticSurfaceNormal(e,s),l.x=-e.y,l.y=e.x,l.z=0,i.normalize(l,l),i.cross(s,l,u),a(n)?(n[0]=u.x,n[1]=u.y,n[2]=u.z,n[3]=0,n[4]=l.x,n[5]=l.y,n[6]=l.z,n[7]=0,n[8]=-s.x,n[9]=-s.y,n[10]=-s.z,n[11]=0,n[12]=e.x,n[13]=e.y,n[14]=e.z,n[15]=1,n):new g(u.x,l.x,-s.x,e.x,u.y,l.y,-s.y,e.y,u.z,l.z,-s.z,e.z,0,0,0,1)},y.northUpEastToFixedFrame=function(e,t,n){if(m.equalsEpsilon(e.x,0,m.EPSILON14)&&m.equalsEpsilon(e.y,0,m.EPSILON14)){var r=m.sign(e.z);return a(n)?(n[0]=-r,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=0,n[6]=r,n[7]=0,n[8]=0,n[9]=1,n[10]=0,n[11]=0,n[12]=e.x,n[13]=e.y,n[14]=e.z,n[15]=1,n):new g(-r,0,0,e.x,0,0,1,e.y,0,r,0,e.z,0,0,0,1)}var s=C,l=w,u=E;return t=o(t,c.WGS84),t.geodeticSurfaceNormal(e,s),l.x=-e.y,l.y=e.x,l.z=0,i.normalize(l,l),i.cross(s,l,u),a(n)?(n[0]=u.x,n[1]=u.y,n[2]=u.z,n[3]=0,n[4]=s.x,n[5]=s.y,n[6]=s.z,n[7]=0,n[8]=l.x,n[9]=l.y,n[10]=l.z,n[11]=0,n[12]=e.x,n[13]=e.y,n[14]=e.z,n[15]=1,n):new g(u.x,s.x,l.x,e.x,u.y,s.y,l.y,e.y,u.z,s.z,l.z,e.z,0,0,0,1)};var x=new v,A=new i(1,1,1),P=new g;y.headingPitchRollToFixedFrame=function(e,t,n,r,o,a){var s=v.fromHeadingPitchRoll(t,n,r,x),l=g.fromTranslationQuaternionRotationScale(i.ZERO,s,A,P);return a=y.eastNorthUpToFixedFrame(e,o,a),g.multiply(a,l,a)},y.aircraftHeadingPitchRollToFixedFrame=function(e,t,n,r,o,a){var s=v.fromHeadingPitchRoll(t,n,r,x),l=g.fromTranslationQuaternionRotationScale(i.ZERO,s,A,P);return a=y.northEastDownToFixedFrame(e,o,a),g.multiply(a,l,a)};var M=new g,D=new f;y.headingPitchRollQuaternion=function(e,t,i,n,r,o){var a=y.headingPitchRollToFixedFrame(e,t,i,n,r,M),s=g.getRotation(a,D);return v.fromRotationMatrix(s,o)},y.aircraftHeadingPitchRollQuaternion=function(e,t,i,n,r,o){var a=y.aircraftHeadingPitchRollToFixedFrame(e,t,i,n,r,M),s=g.getRotation(a,D);return v.fromRotationMatrix(s,o)};var I=24110.54841,R=8640184.812866,O=.093104,L=-62e-7,N=1.1772758384668e-19,F=72921158553e-15,k=m.TWO_PI/86400,B=new p;y.computeTemeToPseudoFixedMatrix=function(e,t){B=p.addSeconds(e,-p.computeTaiMinusUtc(e),B);var i,n=B.dayNumber,r=B.secondsOfDay,o=n-2451545;i=r>=43200?(o+.5)/_.DAYS_PER_JULIAN_CENTURY:(o-.5)/_.DAYS_PER_JULIAN_CENTURY;var s=I+i*(R+i*(O+i*L)),l=s*k%m.TWO_PI,u=F+N*(n-2451545.5),c=(r+.5*_.SECONDS_PER_DAY)%_.SECONDS_PER_DAY,h=l+u*c,d=Math.cos(h),g=Math.sin(h);return a(t)?(t[0]=d,t[1]=-g,t[2]=0,t[3]=g,t[4]=d,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t):new f(d,g,0,-g,d,0,0,0,1)},y.iau2006XysData=new h,y.earthOrientationParameters=l.NONE;var z=32.184,V=2451545;y.preloadIcrfFixed=function(t){var i=t.start.dayNumber,n=t.start.secondsOfDay+z,r=t.stop.dayNumber,o=t.stop.secondsOfDay+z,a=y.iau2006XysData.preload(i,n,r,o),s=y.earthOrientationParameters.getPromiseToLoad();return e.all([a,s])},y.computeIcrfToFixedMatrix=function(e,t){a(t)||(t=new f);var i=y.computeFixedToIcrfMatrix(e,t);if(a(i))return f.transpose(i,t)};var U=new d(0,0,0),G=new u(0,0,0,0,0,0),W=new f,H=new f;y.computeFixedToIcrfMatrix=function(e,t){a(t)||(t=new f);var i=y.earthOrientationParameters.compute(e,G);if(a(i)){var n=e.dayNumber,r=e.secondsOfDay+z,o=y.iau2006XysData.computeXysRadians(n,r,U);if(a(o)){var s=o.x+i.xPoleOffset,l=o.y+i.yPoleOffset,u=1/(1+Math.sqrt(1-s*s-l*l)),c=W;c[0]=1-u*s*s,c[3]=-u*s*l,c[6]=s,c[1]=-u*s*l,c[4]=1-u*l*l,c[7]=l,c[2]=-s,c[5]=-l,c[8]=1-u*(s*s+l*l);var h=f.fromRotationZ(-o.s,H),d=f.multiply(c,h,W),g=e.dayNumber,v=e.secondsOfDay-p.computeTaiMinusUtc(e)+i.ut1MinusUtc,C=g-2451545,w=v/_.SECONDS_PER_DAY,E=.779057273264+w+.00273781191135448*(C+w);E=E%1*m.TWO_PI;var b=f.fromRotationZ(E,H),S=f.multiply(d,b,W),T=Math.cos(i.xPoleWander),x=Math.cos(i.yPoleWander),A=Math.sin(i.xPoleWander),P=Math.sin(i.yPoleWander),M=n-V+r/_.SECONDS_PER_DAY;M/=36525;var D=-47e-6*M*m.RADIANS_PER_DEGREE/3600,I=Math.cos(D),R=Math.sin(D),O=H;return O[0]=T*I,O[1]=T*R,O[2]=A,O[3]=-x*R+P*A*I,O[4]=x*I+P*A*R,O[5]=-P*T,O[6]=-P*R-x*A*I,O[7]=P*I-x*A*R,O[8]=x*T,f.multiply(S,O,t)}}};var q=new n;y.pointToWindowCoordinates=function(e,t,i,n){return n=y.pointToGLWindowCoordinates(e,t,i,n),n.y=2*t[5]-n.y,n},y.pointToGLWindowCoordinates=function(e,i,r,o){a(o)||(o=new t);var s=q;return g.multiplyByVector(e,n.fromElements(r.x,r.y,r.z,1,s),s),n.multiplyByScalar(s,1/s.w,s),g.multiplyByVector(i,s,s),t.fromCartesian4(s,o)};var j=new i,Y=new i,X=new i;y.rotationMatrixFromPositionVelocity=function(e,t,n,r){var s=o(n,c.WGS84).geodeticSurfaceNormal(e,j),l=i.cross(t,s,Y);i.equalsEpsilon(l,i.ZERO,m.EPSILON6)&&(l=i.clone(i.UNIT_X,l));var u=i.cross(l,t,X);return i.cross(t,u,l),i.negate(l,l),a(r)||(r=new f),r[0]=t.x,r[1]=t.y,r[2]=t.z,r[3]=l.x,r[4]=l.y,r[5]=l.z,r[6]=u.x,r[7]=u.y,r[8]=u.z,r};var Z=new r,K=new i,J=new i,Q=new n,$=new n,ee=new n,te=new n,ie=new n,ne=new g,re=new g;return y.basisTo2D=function(e,t,r){var o=e.ellipsoid,a=g.getColumn(t,3,Q),s=o.cartesianToCartographic(a,Z),l=y.eastNorthUpToFixedFrame(a,o,ne),u=g.inverseTransformation(l,re),c=e.project(s,K),h=$;h.x=c.z,h.y=c.x,h.z=c.y,h.w=1;var d=g.getColumn(t,0,J),p=i.magnitude(d),m=g.multiplyByVector(u,d,ee); +n.fromElements(m.z,m.x,m.y,0,m);var f=g.getColumn(t,1,J),v=i.magnitude(f),_=g.multiplyByVector(u,f,te);n.fromElements(_.z,_.x,_.y,0,_);var C=g.getColumn(t,2,J),w=i.magnitude(C),E=ie;return i.cross(m,_,E),i.normalize(E,E),i.cross(_,E,m),i.normalize(m,m),i.cross(E,m,_),i.normalize(_,_),i.multiplyByScalar(m,p,m),i.multiplyByScalar(_,v,_),i.multiplyByScalar(E,w,E),g.setColumn(r,0,m,r),g.setColumn(r,1,_,r),g.setColumn(r,2,E,r),g.setColumn(r,3,h,r),r},y}),define("Cesium/Core/EllipsoidTangentPlane",["./AxisAlignedBoundingBox","./Cartesian2","./Cartesian3","./Cartesian4","./defaultValue","./defined","./defineProperties","./DeveloperError","./Ellipsoid","./IntersectionTests","./Matrix3","./Matrix4","./Plane","./Ray","./Transforms"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m){"use strict";function f(e,t){t=r(t,l.WGS84),e=t.scaleToGeodeticSurface(e);var n=m.eastNorthUpToFixedFrame(e,t);this._ellipsoid=t,this._origin=e,this._xAxis=i.fromCartesian4(h.getColumn(n,0,g)),this._yAxis=i.fromCartesian4(h.getColumn(n,1,g));var o=i.fromCartesian4(h.getColumn(n,2,g));this._plane=d.fromPointNormal(e,o)}var g=new n;a(f.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},origin:{get:function(){return this._origin}},plane:{get:function(){return this._plane}},xAxis:{get:function(){return this._xAxis}},yAxis:{get:function(){return this._yAxis}},zAxis:{get:function(){return this._plane.normal}}});var v=new e;f.fromPoints=function(t,i){var n=e.fromPoints(t,v);return new f(n.center,i)};var _=new p,y=new i;f.prototype.projectPointOntoPlane=function(e,n){var r=_;r.origin=e,i.normalize(e,r.direction);var a=u.rayPlane(r,this._plane,y);if(o(a)||(i.negate(r.direction,r.direction),a=u.rayPlane(r,this._plane,y)),o(a)){var s=i.subtract(a,this._origin,a),l=i.dot(this._xAxis,s),c=i.dot(this._yAxis,s);return o(n)?(n.x=l,n.y=c,n):new t(l,c)}},f.prototype.projectPointsOntoPlane=function(e,t){o(t)||(t=[]);for(var i=0,n=e.length,r=0;n>r;r++){var a=this.projectPointOntoPlane(e[r],t[i]);o(a)&&(t[i]=a,i++)}return t.length=i,t},f.prototype.projectPointToNearestOnPlane=function(e,n){o(n)||(n=new t);var r=_;r.origin=e,i.clone(this._plane.normal,r.direction);var a=u.rayPlane(r,this._plane,y);o(a)||(i.negate(r.direction,r.direction),a=u.rayPlane(r,this._plane,y));var s=i.subtract(a,this._origin,a),l=i.dot(this._xAxis,s),c=i.dot(this._yAxis,s);return n.x=l,n.y=c,n},f.prototype.projectPointsToNearestOnPlane=function(e,t){o(t)||(t=[]);var i=e.length;t.length=i;for(var n=0;i>n;n++)t[n]=this.projectPointToNearestOnPlane(e[n],t[n]);return t};var C=new i;return f.prototype.projectPointsOntoEllipsoid=function(e,t){var n=e.length;o(t)?t.length=n:t=new Array(n);for(var r=this._ellipsoid,a=this._origin,s=this._xAxis,l=this._yAxis,u=C,c=0;n>c;++c){var h=e[c];i.multiplyByScalar(s,h.x,u),o(t[c])||(t[c]=new i);var d=i.add(a,u,t[c]);i.multiplyByScalar(l,h.y,u),i.add(d,u,d),r.scaleToGeocentricSurface(d,d)}return t},f}),define("Cesium/Core/OrientedBoundingBox",["./BoundingSphere","./Cartesian2","./Cartesian3","./Cartographic","./defaultValue","./defined","./DeveloperError","./Ellipsoid","./EllipsoidTangentPlane","./Intersect","./Interval","./Math","./Matrix3","./Plane","./Rectangle"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m){"use strict";function f(e,t){this.center=i.clone(r(e,i.ZERO)),this.halfAxes=d.clone(r(t,d.ZERO))}function g(e,t,n,r,a,s,l,u){o(u)||(u=new f);var c=u.halfAxes;d.setColumn(c,0,e.xAxis,c),d.setColumn(c,1,e.yAxis,c),d.setColumn(c,2,e.zAxis,c);var h=T;h.x=(t+n)/2,h.y=(r+a)/2,h.z=(s+l)/2;var p=x;p.x=(n-t)/2,p.y=(a-r)/2,p.z=(l-s)/2;var m=u.center;return h=d.multiplyByVector(c,h,h),i.add(e.origin,h,m),d.multiplyByScale(c,p,c),u}var v=new i,_=new i,y=new i,C=new i,w=new i,E=new i,b=new d,S={unitary:new d,diagonal:new d};f.fromPoints=function(e,t){if(o(t)||(t=new f),!o(e)||0===e.length)return t.halfAxes=d.ZERO,t.center=i.ZERO,t;var n,r=e.length,a=i.clone(e[0],v);for(n=1;r>n;n++)i.add(a,e[n],a);var s=1/r;i.multiplyByScalar(a,s,a);var l,u=0,c=0,h=0,p=0,m=0,g=0;for(n=0;r>n;n++)l=i.subtract(e[n],a,_),u+=l.x*l.x,c+=l.x*l.y,h+=l.x*l.z,p+=l.y*l.y,m+=l.y*l.z,g+=l.z*l.z;u*=s,c*=s,h*=s,p*=s,m*=s,g*=s;var T=b;T[0]=u,T[1]=c,T[2]=h,T[3]=c,T[4]=p,T[5]=m,T[6]=h,T[7]=m,T[8]=g;var x=d.computeEigenDecomposition(T,S),A=d.clone(x.unitary,t.halfAxes),P=d.getColumn(A,0,C),M=d.getColumn(A,1,w),D=d.getColumn(A,2,E),I=-Number.MAX_VALUE,R=-Number.MAX_VALUE,O=-Number.MAX_VALUE,L=Number.MAX_VALUE,N=Number.MAX_VALUE,F=Number.MAX_VALUE;for(n=0;r>n;n++)l=e[n],I=Math.max(i.dot(P,l),I),R=Math.max(i.dot(M,l),R),O=Math.max(i.dot(D,l),O),L=Math.min(i.dot(P,l),L),N=Math.min(i.dot(M,l),N),F=Math.min(i.dot(D,l),F);P=i.multiplyByScalar(P,.5*(L+I),P),M=i.multiplyByScalar(M,.5*(N+R),M),D=i.multiplyByScalar(D,.5*(F+O),D);var k=i.add(P,M,t.center);k=i.add(k,D,k);var B=y;return B.x=I-L,B.y=R-N,B.z=O-F,i.multiplyByScalar(B,.5,B),d.multiplyByScale(t.halfAxes,B,t.halfAxes),t};var T=new i,x=new i,A=new n,P=new i,M=[new n,new n,new n,new n,new n,new n,new n,new n],D=[new i,new i,new i,new i,new i,new i,new i,new i],I=[new t,new t,new t,new t,new t,new t,new t,new t];f.fromRectangle=function(e,t,i,n,o){t=r(t,0),i=r(i,0),n=r(n,s.WGS84);var a=m.center(e,A),u=n.cartographicToCartesian(a,P),c=new l(u,n),h=c.plane,d=M[0],f=M[1],v=M[2],_=M[3],y=M[4],C=M[5],w=M[6],E=M[7],b=a.longitude,S=e.south<0&&e.north>0?0:a.latitude;w.latitude=C.latitude=y.latitude=e.south,E.latitude=_.latitude=S,d.latitude=f.latitude=v.latitude=e.north,w.longitude=E.longitude=d.longitude=e.west,C.longitude=f.longitude=b,y.longitude=_.longitude=v.longitude=e.east,v.height=f.height=d.height=E.height=w.height=C.height=y.height=_.height=i,n.cartographicArrayToCartesianArray(M,D),c.projectPointsToNearestOnPlane(D,I);var T=Math.min(I[6].x,I[7].x,I[0].x),x=Math.max(I[2].x,I[3].x,I[4].x),R=Math.min(I[4].y,I[5].y,I[6].y),O=Math.max(I[0].y,I[1].y,I[2].y);v.height=d.height=y.height=w.height=t,n.cartographicArrayToCartesianArray(M,D);var L=Math.min(p.getPointDistance(h,D[0]),p.getPointDistance(h,D[2]),p.getPointDistance(h,D[4]),p.getPointDistance(h,D[6])),N=i;return g(c,T,x,R,O,L,N,o)},f.clone=function(e,t){return o(e)?o(t)?(i.clone(e.center,t.center),d.clone(e.halfAxes,t.halfAxes),t):new f(e.center,e.halfAxes):void 0},f.intersectPlane=function(e,t){var n=e.center,r=t.normal,o=e.halfAxes,a=r.x,s=r.y,l=r.z,c=Math.abs(a*o[d.COLUMN0ROW0]+s*o[d.COLUMN0ROW1]+l*o[d.COLUMN0ROW2])+Math.abs(a*o[d.COLUMN1ROW0]+s*o[d.COLUMN1ROW1]+l*o[d.COLUMN1ROW2])+Math.abs(a*o[d.COLUMN2ROW0]+s*o[d.COLUMN2ROW1]+l*o[d.COLUMN2ROW2]),h=i.dot(r,n)+t.distance;return-c>=h?u.OUTSIDE:h>=c?u.INSIDE:u.INTERSECTING};var R=new i,O=new i,L=new i,N=new i;f.distanceSquaredTo=function(e,t){var n=i.subtract(t,e.center,T),r=e.halfAxes,o=d.getColumn(r,0,R),a=d.getColumn(r,1,O),s=d.getColumn(r,2,L),l=i.magnitude(o),u=i.magnitude(a),c=i.magnitude(s);i.normalize(o,o),i.normalize(a,a),i.normalize(s,s);var h=N;h.x=i.dot(n,o),h.y=i.dot(n,a),h.z=i.dot(n,s);var p,m=0;return h.x<-l?(p=h.x+l,m+=p*p):h.x>l&&(p=h.x-l,m+=p*p),h.y<-u?(p=h.y+u,m+=p*p):h.y>u&&(p=h.y-u,m+=p*p),h.z<-c?(p=h.z+c,m+=p*p):h.z>c&&(p=h.z-c,m+=p*p),m};var F=new i,k=new i;f.computePlaneDistances=function(e,t,n,r){o(r)||(r=new c);var a=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY,l=e.center,u=e.halfAxes,h=d.getColumn(u,0,R),p=d.getColumn(u,1,O),m=d.getColumn(u,2,L),f=i.add(h,p,F);i.add(f,m,f),i.add(f,l,f);var g=i.subtract(f,t,k),v=i.dot(n,g);return a=Math.min(v,a),s=Math.max(v,s),i.add(l,h,f),i.add(f,p,f),i.subtract(f,m,f),i.subtract(f,t,g),v=i.dot(n,g),a=Math.min(v,a),s=Math.max(v,s),i.add(l,h,f),i.subtract(f,p,f),i.add(f,m,f),i.subtract(f,t,g),v=i.dot(n,g),a=Math.min(v,a),s=Math.max(v,s),i.add(l,h,f),i.subtract(f,p,f),i.subtract(f,m,f),i.subtract(f,t,g),v=i.dot(n,g),a=Math.min(v,a),s=Math.max(v,s),i.subtract(l,h,f),i.add(f,p,f),i.add(f,m,f),i.subtract(f,t,g),v=i.dot(n,g),a=Math.min(v,a),s=Math.max(v,s),i.subtract(l,h,f),i.add(f,p,f),i.subtract(f,m,f),i.subtract(f,t,g),v=i.dot(n,g),a=Math.min(v,a),s=Math.max(v,s),i.subtract(l,h,f),i.subtract(f,p,f),i.add(f,m,f),i.subtract(f,t,g),v=i.dot(n,g),a=Math.min(v,a),s=Math.max(v,s),i.subtract(l,h,f),i.subtract(f,p,f),i.subtract(f,m,f),i.subtract(f,t,g),v=i.dot(n,g),a=Math.min(v,a),s=Math.max(v,s),r.start=a,r.stop=s,r};var B=new e;return f.isOccluded=function(t,i){var n=e.fromOrientedBoundingBox(t,B);return!i.isBoundingSphereVisible(n)},f.prototype.intersectPlane=function(e){return f.intersectPlane(this,e)},f.prototype.distanceSquaredTo=function(e){return f.distanceSquaredTo(this,e)},f.prototype.computePlaneDistances=function(e,t,i){return f.computePlaneDistances(this,e,t,i)},f.prototype.isOccluded=function(e){return f.isOccluded(this,e)},f.equals=function(e,t){return e===t||o(e)&&o(t)&&i.equals(e.center,t.center)&&d.equals(e.halfAxes,t.halfAxes)},f.prototype.clone=function(e){return f.clone(this,e)},f.prototype.equals=function(e){return f.equals(this,e)},f}),define("Cesium/Core/AttributeCompression",["./Cartesian2","./Cartesian3","./defined","./DeveloperError","./Math"],function(e,t,i,n,r){"use strict";var o={};o.octEncode=function(e,t){if(t.x=e.x/(Math.abs(e.x)+Math.abs(e.y)+Math.abs(e.z)),t.y=e.y/(Math.abs(e.x)+Math.abs(e.y)+Math.abs(e.z)),e.z<0){var i=t.x,n=t.y;t.x=(1-Math.abs(n))*r.signNotZero(i),t.y=(1-Math.abs(i))*r.signNotZero(n)}return t.x=r.toSNorm(t.x),t.y=r.toSNorm(t.y),t},o.octDecode=function(e,i,n){if(n.x=r.fromSNorm(e),n.y=r.fromSNorm(i),n.z=1-(Math.abs(n.x)+Math.abs(n.y)),n.z<0){var o=n.x;n.x=(1-Math.abs(n.y))*r.signNotZero(o),n.y=(1-Math.abs(o))*r.signNotZero(n.y)}return t.normalize(n,n)},o.octPackFloat=function(e){return 256*e.x+e.y};var a=new e;return o.octEncodeFloat=function(e){return o.octEncode(e,a),o.octPackFloat(a)},o.octDecodeFloat=function(e,t){var i=e/256,n=Math.floor(i),r=256*(i-n);return o.octDecode(n,r,t)},o.octPack=function(e,t,i,n){var r=o.octEncodeFloat(e),s=o.octEncodeFloat(t),l=o.octEncode(i,a);return n.x=65536*l.x+r,n.y=65536*l.y+s,n},o.octUnpack=function(e,t,i,n){var r=e.x/65536,a=Math.floor(r),s=65536*(r-a);r=e.y/65536;var l=Math.floor(r),u=65536*(r-l);o.octDecodeFloat(s,t),o.octDecodeFloat(u,i),o.octDecode(a,l,n)},o.compressTextureCoordinates=function(e){var t=1===e.x?4095:4096*e.x|0,i=1===e.y?4095:4096*e.y|0;return 4096*t+i},o.decompressTextureCoordinates=function(e,t){var i=e/4096;return t.x=Math.floor(i)/4096,t.y=i-Math.floor(i),t},o}),define("Cesium/Renderer/WebGLConstants",["../Core/freezeObject"],function(e){"use strict";var t={DEPTH_BUFFER_BIT:256,STENCIL_BUFFER_BIT:1024,COLOR_BUFFER_BIT:16384,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,ZERO:0,ONE:1,SRC_COLOR:768,ONE_MINUS_SRC_COLOR:769,SRC_ALPHA:770,ONE_MINUS_SRC_ALPHA:771,DST_ALPHA:772,ONE_MINUS_DST_ALPHA:773,DST_COLOR:774,ONE_MINUS_DST_COLOR:775,SRC_ALPHA_SATURATE:776,FUNC_ADD:32774,BLEND_EQUATION:32777,BLEND_EQUATION_RGB:32777,BLEND_EQUATION_ALPHA:34877,FUNC_SUBTRACT:32778,FUNC_REVERSE_SUBTRACT:32779,BLEND_DST_RGB:32968,BLEND_SRC_RGB:32969,BLEND_DST_ALPHA:32970,BLEND_SRC_ALPHA:32971,CONSTANT_COLOR:32769,ONE_MINUS_CONSTANT_COLOR:32770,CONSTANT_ALPHA:32771,ONE_MINUS_CONSTANT_ALPHA:32772,BLEND_COLOR:32773,ARRAY_BUFFER:34962,ELEMENT_ARRAY_BUFFER:34963,ARRAY_BUFFER_BINDING:34964,ELEMENT_ARRAY_BUFFER_BINDING:34965,STREAM_DRAW:35040,STATIC_DRAW:35044,DYNAMIC_DRAW:35048,BUFFER_SIZE:34660,BUFFER_USAGE:34661,CURRENT_VERTEX_ATTRIB:34342,FRONT:1028,BACK:1029,FRONT_AND_BACK:1032,CULL_FACE:2884,BLEND:3042,DITHER:3024,STENCIL_TEST:2960,DEPTH_TEST:2929,SCISSOR_TEST:3089,POLYGON_OFFSET_FILL:32823,SAMPLE_ALPHA_TO_COVERAGE:32926,SAMPLE_COVERAGE:32928,NO_ERROR:0,INVALID_ENUM:1280,INVALID_VALUE:1281,INVALID_OPERATION:1282,OUT_OF_MEMORY:1285,CW:2304,CCW:2305,LINE_WIDTH:2849,ALIASED_POINT_SIZE_RANGE:33901,ALIASED_LINE_WIDTH_RANGE:33902,CULL_FACE_MODE:2885,FRONT_FACE:2886,DEPTH_RANGE:2928,DEPTH_WRITEMASK:2930,DEPTH_CLEAR_VALUE:2931,DEPTH_FUNC:2932,STENCIL_CLEAR_VALUE:2961,STENCIL_FUNC:2962,STENCIL_FAIL:2964,STENCIL_PASS_DEPTH_FAIL:2965,STENCIL_PASS_DEPTH_PASS:2966,STENCIL_REF:2967,STENCIL_VALUE_MASK:2963,STENCIL_WRITEMASK:2968,STENCIL_BACK_FUNC:34816,STENCIL_BACK_FAIL:34817,STENCIL_BACK_PASS_DEPTH_FAIL:34818,STENCIL_BACK_PASS_DEPTH_PASS:34819,STENCIL_BACK_REF:36003,STENCIL_BACK_VALUE_MASK:36004,STENCIL_BACK_WRITEMASK:36005,VIEWPORT:2978,SCISSOR_BOX:3088,COLOR_CLEAR_VALUE:3106,COLOR_WRITEMASK:3107,UNPACK_ALIGNMENT:3317,PACK_ALIGNMENT:3333,MAX_TEXTURE_SIZE:3379,MAX_VIEWPORT_DIMS:3386,SUBPIXEL_BITS:3408,RED_BITS:3410,GREEN_BITS:3411,BLUE_BITS:3412,ALPHA_BITS:3413,DEPTH_BITS:3414,STENCIL_BITS:3415,POLYGON_OFFSET_UNITS:10752,POLYGON_OFFSET_FACTOR:32824,TEXTURE_BINDING_2D:32873,SAMPLE_BUFFERS:32936,SAMPLES:32937,SAMPLE_COVERAGE_VALUE:32938,SAMPLE_COVERAGE_INVERT:32939,COMPRESSED_TEXTURE_FORMATS:34467,DONT_CARE:4352,FASTEST:4353,NICEST:4354,GENERATE_MIPMAP_HINT:33170,BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,DEPTH_COMPONENT:6402,ALPHA:6406,RGB:6407,RGBA:6408,LUMINANCE:6409,LUMINANCE_ALPHA:6410,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,FRAGMENT_SHADER:35632,VERTEX_SHADER:35633,MAX_VERTEX_ATTRIBS:34921,MAX_VERTEX_UNIFORM_VECTORS:36347,MAX_VARYING_VECTORS:36348,MAX_COMBINED_TEXTURE_IMAGE_UNITS:35661,MAX_VERTEX_TEXTURE_IMAGE_UNITS:35660,MAX_TEXTURE_IMAGE_UNITS:34930,MAX_FRAGMENT_UNIFORM_VECTORS:36349,SHADER_TYPE:35663,DELETE_STATUS:35712,LINK_STATUS:35714,VALIDATE_STATUS:35715,ATTACHED_SHADERS:35717,ACTIVE_UNIFORMS:35718,ACTIVE_ATTRIBUTES:35721,SHADING_LANGUAGE_VERSION:35724,CURRENT_PROGRAM:35725,NEVER:512,LESS:513,EQUAL:514,LEQUAL:515,GREATER:516,NOTEQUAL:517,GEQUAL:518,ALWAYS:519,KEEP:7680,REPLACE:7681,INCR:7682,DECR:7683,INVERT:5386,INCR_WRAP:34055,DECR_WRAP:34056,VENDOR:7936,RENDERER:7937,VERSION:7938,NEAREST:9728,LINEAR:9729,NEAREST_MIPMAP_NEAREST:9984,LINEAR_MIPMAP_NEAREST:9985,NEAREST_MIPMAP_LINEAR:9986,LINEAR_MIPMAP_LINEAR:9987,TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,TEXTURE_2D:3553,TEXTURE:5890,TEXTURE_CUBE_MAP:34067,TEXTURE_BINDING_CUBE_MAP:34068,TEXTURE_CUBE_MAP_POSITIVE_X:34069,TEXTURE_CUBE_MAP_NEGATIVE_X:34070,TEXTURE_CUBE_MAP_POSITIVE_Y:34071,TEXTURE_CUBE_MAP_NEGATIVE_Y:34072,TEXTURE_CUBE_MAP_POSITIVE_Z:34073,TEXTURE_CUBE_MAP_NEGATIVE_Z:34074,MAX_CUBE_MAP_TEXTURE_SIZE:34076,TEXTURE0:33984,TEXTURE1:33985,TEXTURE2:33986,TEXTURE3:33987,TEXTURE4:33988,TEXTURE5:33989,TEXTURE6:33990,TEXTURE7:33991,TEXTURE8:33992,TEXTURE9:33993,TEXTURE10:33994,TEXTURE11:33995,TEXTURE12:33996,TEXTURE13:33997,TEXTURE14:33998,TEXTURE15:33999,TEXTURE16:34e3,TEXTURE17:34001,TEXTURE18:34002,TEXTURE19:34003,TEXTURE20:34004,TEXTURE21:34005,TEXTURE22:34006,TEXTURE23:34007,TEXTURE24:34008,TEXTURE25:34009,TEXTURE26:34010,TEXTURE27:34011,TEXTURE28:34012,TEXTURE29:34013,TEXTURE30:34014,TEXTURE31:34015,ACTIVE_TEXTURE:34016,REPEAT:10497,CLAMP_TO_EDGE:33071,MIRRORED_REPEAT:33648,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,INT_VEC2:35667,INT_VEC3:35668,INT_VEC4:35669,BOOL:35670,BOOL_VEC2:35671,BOOL_VEC3:35672,BOOL_VEC4:35673,FLOAT_MAT2:35674,FLOAT_MAT3:35675,FLOAT_MAT4:35676,SAMPLER_2D:35678,SAMPLER_CUBE:35680,VERTEX_ATTRIB_ARRAY_ENABLED:34338,VERTEX_ATTRIB_ARRAY_SIZE:34339,VERTEX_ATTRIB_ARRAY_STRIDE:34340,VERTEX_ATTRIB_ARRAY_TYPE:34341,VERTEX_ATTRIB_ARRAY_NORMALIZED:34922,VERTEX_ATTRIB_ARRAY_POINTER:34373,VERTEX_ATTRIB_ARRAY_BUFFER_BINDING:34975,IMPLEMENTATION_COLOR_READ_TYPE:35738,IMPLEMENTATION_COLOR_READ_FORMAT:35739,COMPILE_STATUS:35713,LOW_FLOAT:36336,MEDIUM_FLOAT:36337,HIGH_FLOAT:36338,LOW_INT:36339,MEDIUM_INT:36340,HIGH_INT:36341,FRAMEBUFFER:36160,RENDERBUFFER:36161,RGBA4:32854,RGB5_A1:32855,RGB565:36194,DEPTH_COMPONENT16:33189,STENCIL_INDEX:6401,STENCIL_INDEX8:36168,DEPTH_STENCIL:34041,RENDERBUFFER_WIDTH:36162,RENDERBUFFER_HEIGHT:36163,RENDERBUFFER_INTERNAL_FORMAT:36164,RENDERBUFFER_RED_SIZE:36176,RENDERBUFFER_GREEN_SIZE:36177,RENDERBUFFER_BLUE_SIZE:36178,RENDERBUFFER_ALPHA_SIZE:36179,RENDERBUFFER_DEPTH_SIZE:36180,RENDERBUFFER_STENCIL_SIZE:36181,FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:36048,FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:36049,FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL:36050,FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE:36051,COLOR_ATTACHMENT0:36064,DEPTH_ATTACHMENT:36096,STENCIL_ATTACHMENT:36128,DEPTH_STENCIL_ATTACHMENT:33306,NONE:0,FRAMEBUFFER_COMPLETE:36053,FRAMEBUFFER_INCOMPLETE_ATTACHMENT:36054,FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:36055,FRAMEBUFFER_INCOMPLETE_DIMENSIONS:36057,FRAMEBUFFER_UNSUPPORTED:36061,FRAMEBUFFER_BINDING:36006,RENDERBUFFER_BINDING:36007,MAX_RENDERBUFFER_SIZE:34024,INVALID_FRAMEBUFFER_OPERATION:1286,UNPACK_FLIP_Y_WEBGL:37440,UNPACK_PREMULTIPLY_ALPHA_WEBGL:37441,CONTEXT_LOST_WEBGL:37442,UNPACK_COLORSPACE_CONVERSION_WEBGL:37443,BROWSER_DEFAULT_WEBGL:37444,DOUBLE:5130,READ_BUFFER:3074,UNPACK_ROW_LENGTH:3314,UNPACK_SKIP_ROWS:3315,UNPACK_SKIP_PIXELS:3316,PACK_ROW_LENGTH:3330,PACK_SKIP_ROWS:3331,PACK_SKIP_PIXELS:3332,COLOR:6144,DEPTH:6145,STENCIL:6146,RED:6403,RGB8:32849,RGBA8:32856,RGB10_A2:32857,TEXTURE_BINDING_3D:32874,UNPACK_SKIP_IMAGES:32877,UNPACK_IMAGE_HEIGHT:32878,TEXTURE_3D:32879,TEXTURE_WRAP_R:32882,MAX_3D_TEXTURE_SIZE:32883,UNSIGNED_INT_2_10_10_10_REV:33640,MAX_ELEMENTS_VERTICES:33e3,MAX_ELEMENTS_INDICES:33001,TEXTURE_MIN_LOD:33082,TEXTURE_MAX_LOD:33083,TEXTURE_BASE_LEVEL:33084,TEXTURE_MAX_LEVEL:33085,MIN:32775,MAX:32776,DEPTH_COMPONENT24:33190,MAX_TEXTURE_LOD_BIAS:34045,TEXTURE_COMPARE_MODE:34892,TEXTURE_COMPARE_FUNC:34893,CURRENT_QUERY:34917,QUERY_RESULT:34918,QUERY_RESULT_AVAILABLE:34919,STREAM_READ:35041,STREAM_COPY:35042,STATIC_READ:35045,STATIC_COPY:35046,DYNAMIC_READ:35049,DYNAMIC_COPY:35050,MAX_DRAW_BUFFERS:34852,DRAW_BUFFER0:34853,DRAW_BUFFER1:34854,DRAW_BUFFER2:34855,DRAW_BUFFER3:34856,DRAW_BUFFER4:34857,DRAW_BUFFER5:34858,DRAW_BUFFER6:34859,DRAW_BUFFER7:34860,DRAW_BUFFER8:34861,DRAW_BUFFER9:34862,DRAW_BUFFER10:34863,DRAW_BUFFER11:34864,DRAW_BUFFER12:34865,DRAW_BUFFER13:34866,DRAW_BUFFER14:34867,DRAW_BUFFER15:34868,MAX_FRAGMENT_UNIFORM_COMPONENTS:35657,MAX_VERTEX_UNIFORM_COMPONENTS:35658,SAMPLER_3D:35679,SAMPLER_2D_SHADOW:35682,FRAGMENT_SHADER_DERIVATIVE_HINT:35723,PIXEL_PACK_BUFFER:35051,PIXEL_UNPACK_BUFFER:35052,PIXEL_PACK_BUFFER_BINDING:35053,PIXEL_UNPACK_BUFFER_BINDING:35055,FLOAT_MAT2x3:35685,FLOAT_MAT2x4:35686,FLOAT_MAT3x2:35687,FLOAT_MAT3x4:35688,FLOAT_MAT4x2:35689,FLOAT_MAT4x3:35690,SRGB:35904,SRGB8:35905,SRGB8_ALPHA8:35907,COMPARE_REF_TO_TEXTURE:34894,RGBA32F:34836,RGB32F:34837,RGBA16F:34842,RGB16F:34843,VERTEX_ATTRIB_ARRAY_INTEGER:35069,MAX_ARRAY_TEXTURE_LAYERS:35071,MIN_PROGRAM_TEXEL_OFFSET:35076,MAX_PROGRAM_TEXEL_OFFSET:35077,MAX_VARYING_COMPONENTS:35659,TEXTURE_2D_ARRAY:35866,TEXTURE_BINDING_2D_ARRAY:35869,R11F_G11F_B10F:35898,UNSIGNED_INT_10F_11F_11F_REV:35899,RGB9_E5:35901,UNSIGNED_INT_5_9_9_9_REV:35902,TRANSFORM_FEEDBACK_BUFFER_MODE:35967,MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS:35968,TRANSFORM_FEEDBACK_VARYINGS:35971,TRANSFORM_FEEDBACK_BUFFER_START:35972,TRANSFORM_FEEDBACK_BUFFER_SIZE:35973,TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN:35976,RASTERIZER_DISCARD:35977,MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS:35978,MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS:35979,INTERLEAVED_ATTRIBS:35980,SEPARATE_ATTRIBS:35981,TRANSFORM_FEEDBACK_BUFFER:35982,TRANSFORM_FEEDBACK_BUFFER_BINDING:35983,RGBA32UI:36208,RGB32UI:36209,RGBA16UI:36214,RGB16UI:36215,RGBA8UI:36220,RGB8UI:36221,RGBA32I:36226,RGB32I:36227,RGBA16I:36232,RGB16I:36233,RGBA8I:36238,RGB8I:36239,RED_INTEGER:36244,RGB_INTEGER:36248,RGBA_INTEGER:36249,SAMPLER_2D_ARRAY:36289,SAMPLER_2D_ARRAY_SHADOW:36292,SAMPLER_CUBE_SHADOW:36293,UNSIGNED_INT_VEC2:36294,UNSIGNED_INT_VEC3:36295,UNSIGNED_INT_VEC4:36296,INT_SAMPLER_2D:36298,INT_SAMPLER_3D:36299,INT_SAMPLER_CUBE:36300,INT_SAMPLER_2D_ARRAY:36303,UNSIGNED_INT_SAMPLER_2D:36306,UNSIGNED_INT_SAMPLER_3D:36307,UNSIGNED_INT_SAMPLER_CUBE:36308,UNSIGNED_INT_SAMPLER_2D_ARRAY:36311,DEPTH_COMPONENT32F:36012,DEPTH32F_STENCIL8:36013,FLOAT_32_UNSIGNED_INT_24_8_REV:36269,FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING:33296,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE:33297,FRAMEBUFFER_ATTACHMENT_RED_SIZE:33298,FRAMEBUFFER_ATTACHMENT_GREEN_SIZE:33299,FRAMEBUFFER_ATTACHMENT_BLUE_SIZE:33300,FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE:33301,FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE:33302,FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE:33303,FRAMEBUFFER_DEFAULT:33304,UNSIGNED_INT_24_8:34042,DEPTH24_STENCIL8:35056,UNSIGNED_NORMALIZED:35863,DRAW_FRAMEBUFFER_BINDING:36006,READ_FRAMEBUFFER:36008,DRAW_FRAMEBUFFER:36009,READ_FRAMEBUFFER_BINDING:36010,RENDERBUFFER_SAMPLES:36011,FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER:36052,MAX_COLOR_ATTACHMENTS:36063,COLOR_ATTACHMENT1:36065,COLOR_ATTACHMENT2:36066,COLOR_ATTACHMENT3:36067,COLOR_ATTACHMENT4:36068,COLOR_ATTACHMENT5:36069,COLOR_ATTACHMENT6:36070,COLOR_ATTACHMENT7:36071,COLOR_ATTACHMENT8:36072,COLOR_ATTACHMENT9:36073,COLOR_ATTACHMENT10:36074,COLOR_ATTACHMENT11:36075,COLOR_ATTACHMENT12:36076,COLOR_ATTACHMENT13:36077,COLOR_ATTACHMENT14:36078,COLOR_ATTACHMENT15:36079,FRAMEBUFFER_INCOMPLETE_MULTISAMPLE:36182,MAX_SAMPLES:36183,HALF_FLOAT:5131,RG:33319,RG_INTEGER:33320,R8:33321,RG8:33323,R16F:33325,R32F:33326,RG16F:33327,RG32F:33328,R8I:33329,R8UI:33330,R16I:33331,R16UI:33332,R32I:33333,R32UI:33334,RG8I:33335,RG8UI:33336,RG16I:33337,RG16UI:33338,RG32I:33339,RG32UI:33340,VERTEX_ARRAY_BINDING:34229,R8_SNORM:36756,RG8_SNORM:36757,RGB8_SNORM:36758,RGBA8_SNORM:36759,SIGNED_NORMALIZED:36764,COPY_READ_BUFFER:36662,COPY_WRITE_BUFFER:36663,COPY_READ_BUFFER_BINDING:36662,COPY_WRITE_BUFFER_BINDING:36663,UNIFORM_BUFFER:35345,UNIFORM_BUFFER_BINDING:35368,UNIFORM_BUFFER_START:35369,UNIFORM_BUFFER_SIZE:35370,MAX_VERTEX_UNIFORM_BLOCKS:35371,MAX_FRAGMENT_UNIFORM_BLOCKS:35373,MAX_COMBINED_UNIFORM_BLOCKS:35374,MAX_UNIFORM_BUFFER_BINDINGS:35375,MAX_UNIFORM_BLOCK_SIZE:35376,MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS:35377,MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS:35379,UNIFORM_BUFFER_OFFSET_ALIGNMENT:35380,ACTIVE_UNIFORM_BLOCKS:35382,UNIFORM_TYPE:35383,UNIFORM_SIZE:35384,UNIFORM_BLOCK_INDEX:35386,UNIFORM_OFFSET:35387,UNIFORM_ARRAY_STRIDE:35388,UNIFORM_MATRIX_STRIDE:35389,UNIFORM_IS_ROW_MAJOR:35390,UNIFORM_BLOCK_BINDING:35391,UNIFORM_BLOCK_DATA_SIZE:35392,UNIFORM_BLOCK_ACTIVE_UNIFORMS:35394,UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES:35395,UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER:35396,UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER:35398,INVALID_INDEX:4294967295,MAX_VERTEX_OUTPUT_COMPONENTS:37154,MAX_FRAGMENT_INPUT_COMPONENTS:37157,MAX_SERVER_WAIT_TIMEOUT:37137,OBJECT_TYPE:37138,SYNC_CONDITION:37139,SYNC_STATUS:37140,SYNC_FLAGS:37141,SYNC_FENCE:37142,SYNC_GPU_COMMANDS_COMPLETE:37143,UNSIGNALED:37144,SIGNALED:37145,ALREADY_SIGNALED:37146,TIMEOUT_EXPIRED:37147,CONDITION_SATISFIED:37148,WAIT_FAILED:37149,SYNC_FLUSH_COMMANDS_BIT:1,VERTEX_ATTRIB_ARRAY_DIVISOR:35070,ANY_SAMPLES_PASSED:35887,ANY_SAMPLES_PASSED_CONSERVATIVE:36202,SAMPLER_BINDING:35097,RGB10_A2UI:36975,INT_2_10_10_10_REV:36255,TRANSFORM_FEEDBACK:36386,TRANSFORM_FEEDBACK_PAUSED:36387,TRANSFORM_FEEDBACK_ACTIVE:36388,TRANSFORM_FEEDBACK_BINDING:36389,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_SRGB8_ETC2:37493,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37494,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37495,COMPRESSED_RGBA8_ETC2_EAC:37496,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37497,TEXTURE_IMMUTABLE_FORMAT:37167,MAX_ELEMENT_INDEX:36203,TEXTURE_IMMUTABLE_LEVELS:33503};return e(t)}),define("Cesium/Core/ComponentDatatype",["../Renderer/WebGLConstants","./defaultValue","./defined","./DeveloperError","./FeatureDetection","./freezeObject"],function(e,t,i,n,r,o){"use strict";if(!r.supportsTypedArrays())return{};var a={BYTE:e.BYTE,UNSIGNED_BYTE:e.UNSIGNED_BYTE,SHORT:e.SHORT,UNSIGNED_SHORT:e.UNSIGNED_SHORT,FLOAT:e.FLOAT,DOUBLE:e.DOUBLE};return a.getSizeInBytes=function(e){switch(e){case a.BYTE:return Int8Array.BYTES_PER_ELEMENT;case a.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case a.SHORT:return Int16Array.BYTES_PER_ELEMENT;case a.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case a.FLOAT:return Float32Array.BYTES_PER_ELEMENT;case a.DOUBLE:return Float64Array.BYTES_PER_ELEMENT;default:throw new n("componentDatatype is not a valid value.")}},a.fromTypedArray=function(e){return e instanceof Int8Array?a.BYTE:e instanceof Uint8Array?a.UNSIGNED_BYTE:e instanceof Int16Array?a.SHORT:e instanceof Uint16Array?a.UNSIGNED_SHORT:e instanceof Float32Array?a.FLOAT:e instanceof Float64Array?a.DOUBLE:void 0},a.validate=function(e){return i(e)&&(e===a.BYTE||e===a.UNSIGNED_BYTE||e===a.SHORT||e===a.UNSIGNED_SHORT||e===a.FLOAT||e===a.DOUBLE)},a.createTypedArray=function(e,t){switch(e){case a.BYTE:return new Int8Array(t);case a.UNSIGNED_BYTE:return new Uint8Array(t);case a.SHORT:return new Int16Array(t);case a.UNSIGNED_SHORT:return new Uint16Array(t);case a.FLOAT:return new Float32Array(t);case a.DOUBLE:return new Float64Array(t);default:throw new n("componentDatatype is not a valid value.")}},a.createArrayBufferView=function(e,i,r,o){switch(r=t(r,0),o=t(o,(i.byteLength-r)/a.getSizeInBytes(e)),e){case a.BYTE:return new Int8Array(i,r,o);case a.UNSIGNED_BYTE:return new Uint8Array(i,r,o);case a.SHORT:return new Int16Array(i,r,o);case a.UNSIGNED_SHORT:return new Uint16Array(i,r,o);case a.FLOAT:return new Float32Array(i,r,o);case a.DOUBLE:return new Float64Array(i,r,o);default:throw new n("componentDatatype is not a valid value.")}},o(a)}),define("Cesium/Core/TerrainQuantization",["./freezeObject"],function(e){"use strict";var t={NONE:0,BITS12:1};return e(t)}),define("Cesium/Core/TerrainEncoding",["./AttributeCompression","./Cartesian2","./Cartesian3","./ComponentDatatype","./defined","./Math","./Matrix3","./Matrix4","./TerrainQuantization"],function(e,t,i,n,r,o,a,s,l){"use strict";function u(e,t,n,o,a){var u,d,g,v;if(r(e)&&r(t)&&r(n)&&r(o)){var _=e.minimum,y=e.maximum,C=i.subtract(y,_,h),w=n-t,E=Math.max(i.maximumComponent(C),w);u=f-1>E?l.BITS12:l.NONE,d=e.center,g=s.inverseTransformation(o,new s);var b=i.negate(_,c);s.multiply(s.fromTranslation(b,p),g,g);var S=c;S.x=1/C.x,S.y=1/C.y,S.z=1/C.z,s.multiply(s.fromScale(S,p),g,g),v=s.clone(o),s.setTranslation(v,i.ZERO,v),o=s.clone(o,new s);var T=s.fromTranslation(_,p),x=s.fromScale(C,m),A=s.multiply(T,x,p);s.multiply(o,A,o),s.multiply(v,A,v)}this.quantization=u,this.minimumHeight=t,this.maximumHeight=n,this.center=d,this.toScaledENU=g,this.fromScaledENU=o,this.matrix=v,this.hasVertexNormals=a}var c=new i,h=new i,d=new t,p=new s,m=new s,f=Math.pow(2,12);u.prototype.encode=function(n,r,a,u,h,p){var m=u.x,f=u.y;if(this.quantization===l.BITS12){a=s.multiplyByPoint(this.toScaledENU,a,c),a.x=o.clamp(a.x,0,1),a.y=o.clamp(a.y,0,1),a.z=o.clamp(a.z,0,1);var g=this.maximumHeight-this.minimumHeight,v=o.clamp((h-this.minimumHeight)/g,0,1);t.fromElements(a.x,a.y,d);var _=e.compressTextureCoordinates(d);t.fromElements(a.z,v,d);var y=e.compressTextureCoordinates(d);t.fromElements(m,f,d);var C=e.compressTextureCoordinates(d);n[r++]=_,n[r++]=y,n[r++]=C}else i.subtract(a,this.center,c),n[r++]=c.x,n[r++]=c.y,n[r++]=c.z,n[r++]=h,n[r++]=m,n[r++]=f;return this.hasVertexNormals&&(n[r++]=e.octPackFloat(p)),r},u.prototype.decodePosition=function(t,n,o){if(r(o)||(o=new i),n*=this.getStride(),this.quantization===l.BITS12){var a=e.decompressTextureCoordinates(t[n],d);o.x=a.x,o.y=a.y;var u=e.decompressTextureCoordinates(t[n+1],d);return o.z=u.x,s.multiplyByPoint(this.fromScaledENU,o,o)}return o.x=t[n],o.y=t[n+1],o.z=t[n+2],i.add(o,this.center,o)},u.prototype.decodeTextureCoordinates=function(i,n,o){return r(o)||(o=new t),n*=this.getStride(),this.quantization===l.BITS12?e.decompressTextureCoordinates(i[n+2],o):t.fromElements(i[n+4],i[n+5],o)},u.prototype.decodeHeight=function(t,i){if(i*=this.getStride(),this.quantization===l.BITS12){var n=e.decompressTextureCoordinates(t[i+1],d);return n.y*(this.maximumHeight-this.minimumHeight)+this.minimumHeight}return t[i+3]},u.prototype.getOctEncodedNormal=function(e,i,n){var r=this.getStride();i=(i+1)*r-1;var o=e[i]/256,a=Math.floor(o),s=256*(o-a);return t.fromElements(a,s,n)},u.prototype.getStride=function(){var e;switch(this.quantization){case l.BITS12:e=3;break;default:e=6}return this.hasVertexNormals&&++e,e};var g={position3DAndHeight:0,textureCoordAndEncodedNormals:1},v={compressed:0};return u.prototype.getAttributes=function(e){var t=n.FLOAT;if(this.quantization===l.NONE){var i=n.getSizeInBytes(t),r=4,o=this.hasVertexNormals?3:2,a=(this.hasVertexNormals?7:6)*i;return[{index:g.position3DAndHeight,vertexBuffer:e,componentDatatype:t,componentsPerAttribute:r,offsetInBytes:0,strideInBytes:a},{index:g.textureCoordAndEncodedNormals,vertexBuffer:e,componentDatatype:t,componentsPerAttribute:o,offsetInBytes:r*i,strideInBytes:a}]}var s=3;return s+=this.hasVertexNormals?1:0,[{index:v.compressed,vertexBuffer:e,componentDatatype:t,componentsPerAttribute:s}]},u.prototype.getAttributeLocations=function(){return this.quantization===l.NONE?g:v},u.clone=function(e,t){return r(t)||(t=new u),t.quantization=e.quantization,t.minimumHeight=e.minimumHeight,t.maximumHeight=e.maximumHeight,t.center=i.clone(e.center),t.toScaledENU=s.clone(e.toScaledENU),t.fromScaledENU=s.clone(e.fromScaledENU),t.matrix=s.clone(e.matrix),t.hasVertexNormals=e.hasVertexNormals,t},u}),define("Cesium/Core/HeightmapTessellator",["./AxisAlignedBoundingBox","./BoundingSphere","./Cartesian2","./Cartesian3","./defaultValue","./defined","./DeveloperError","./Ellipsoid","./EllipsoidalOccluder","./freezeObject","./Math","./Matrix4","./OrientedBoundingBox","./Rectangle","./TerrainEncoding","./Transforms"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f){"use strict";var g={};g.DEFAULT_STRUCTURE=u({heightScale:1,heightOffset:0,elementsPerHeight:1,stride:1,elementMultiplier:256,isBigEndian:!1});var v=new n,_=new h,y=new n,C=new n;return g.computeVertices=function(a){var u,w,E,b,S=Math.cos,T=Math.sin,x=Math.sqrt,A=Math.atan,P=Math.exp,M=c.PI_OVER_TWO,D=c.toRadians,I=a.heightmap,R=a.width,O=a.height,L=a.skirtHeight,N=r(a.isGeographic,!0),F=r(a.ellipsoid,s.WGS84),k=1/F.maximumRadius,B=a.nativeRectangle,z=a.rectangle;o(z)?(u=z.west,w=z.south,E=z.east,b=z.north):N?(u=D(B.west),w=D(B.south),E=D(B.east),b=D(B.north)):(u=B.west*k,w=M-2*A(P(-B.south*k)),E=B.east*k,b=M-2*A(P(-B.north*k)));var V=r(a.relativeToCenter,n.ZERO),U=r(a.exaggeration,1),G=r(a.structure,g.DEFAULT_STRUCTURE),W=r(G.heightScale,g.DEFAULT_STRUCTURE.heightScale),H=r(G.heightOffset,g.DEFAULT_STRUCTURE.heightOffset),q=r(G.elementsPerHeight,g.DEFAULT_STRUCTURE.elementsPerHeight),j=r(G.stride,g.DEFAULT_STRUCTURE.stride),Y=r(G.elementMultiplier,g.DEFAULT_STRUCTURE.elementMultiplier),X=r(G.isBigEndian,g.DEFAULT_STRUCTURE.isBigEndian),Z=p.computeWidth(B)/(R-1),K=p.computeHeight(B)/(O-1),J=F.radiiSquared,Q=J.x,$=J.y,ee=J.z,te=65536,ie=-65536,ne=f.eastNorthUpToFixedFrame(V,F),re=h.inverseTransformation(ne,_),oe=y;oe.x=Number.POSITIVE_INFINITY,oe.y=Number.POSITIVE_INFINITY,oe.z=Number.POSITIVE_INFINITY;var ae=C;ae.x=Number.NEGATIVE_INFINITY,ae.y=Number.NEGATIVE_INFINITY,ae.z=Number.NEGATIVE_INFINITY;var se=Number.POSITIVE_INFINITY,le=R+(L>0?2:0),ue=O+(L>0?2:0),ce=le*ue,he=new Array(ce),de=new Array(ce),pe=new Array(ce),me=0,fe=O,ge=0,ve=R;L>0&&(--me,++fe,--ge,++ve);for(var _e=0,ye=me;fe>ye;++ye){var Ce=ye;0>Ce&&(Ce=0),Ce>=O&&(Ce=O-1);var we=B.north-K*Ce;we=N?D(we):M-2*A(P(-we*k));var Ee=S(we),be=T(we),Se=ee*be,Te=(we-w)/(b-w);Te=c.clamp(Te,0,1);for(var xe=ge;ve>xe;++xe){var Ae=xe;0>Ae&&(Ae=0),Ae>=R&&(Ae=R-1);var Pe=B.west+Z*Ae;N?Pe=D(Pe):Pe*=k;var Me,De=Ce*(R*j)+Ae*j;if(1===q)Me=I[De];else{Me=0;var Ie;if(X)for(Ie=0;q>Ie;++Ie)Me=Me*Y+I[De+Ie];else for(Ie=q-1;Ie>=0;--Ie)Me=Me*Y+I[De+Ie]}Me=(Me*W+H)*U,ie=Math.max(ie,Me),te=Math.min(te,Me),(xe!==Ae||ye!==Ce)&&(Me-=L);var Re=Ee*S(Pe),Oe=Ee*T(Pe),Le=Q*Re,Ne=$*Oe,Fe=x(Le*Re+Ne*Oe+Se*be),ke=1/Fe,Be=Le*ke,ze=Ne*ke,Ve=Se*ke,Ue=new n;Ue.x=Be+Re*Me,Ue.y=ze+Oe*Me,Ue.z=Ve+be*Me,he[_e]=Ue,de[_e]=Me;var Ge=(Pe-u)/(E-u);Ge=c.clamp(Ge,0,1),pe[_e]=new i(Ge,Te),_e++,h.multiplyByPoint(re,Ue,v),n.minimumByComponent(v,oe,oe),n.maximumByComponent(v,ae,ae),se=Math.min(se,Me)}}var We,He=t.fromPoints(he);o(z)&&z.widthQe;++Qe)Je=Ze.encode(Ke,Je,he[Qe],pe[Qe],de[Qe]);return{vertices:Ke,maximumHeight:ie,minimumHeight:te,encoding:Ze,boundingSphere3D:He,orientedBoundingBox:We,occludeePointInScaledSpace:qe}},g}),define("Cesium/Core/destroyObject",["./defaultValue","./DeveloperError"],function(e,t){"use strict";function i(){return!0}function n(n,r){function o(){throw new t(r)}r=e(r,"This object was destroyed, i.e., destroy() was called.");for(var a in n)"function"==typeof n[a]&&(n[a]=o);n.isDestroyed=i}return n}),define("Cesium/Core/isCrossOriginUrl",["./defined"],function(e){"use strict";function t(t){e(i)||(i=document.createElement("a")),i.href=window.location.href;var n=i.host,r=i.protocol;return i.href=t,i.href=i.href,r!==i.protocol||n!==i.host}var i;return t}),define("Cesium/Core/TaskProcessor",["../ThirdParty/Uri","../ThirdParty/when","./buildModuleUrl","./defaultValue","./defined","./destroyObject","./DeveloperError","./getAbsoluteUri","./isCrossOriginUrl","./RuntimeError","require"],function(e,t,i,n,r,o,a,s,l,u,c){"use strict";function h(){if(!r(g._canTransferArrayBuffer)){var e=new Worker(p("Workers/transferTypedArrayTest.js"));e.postMessage=n(e.webkitPostMessage,e.postMessage);var i=99,o=new Int8Array([i]);try{e.postMessage({array:o},[o.buffer])}catch(a){return g._canTransferArrayBuffer=!1,g._canTransferArrayBuffer}var s=t.defer();e.onmessage=function(t){var n=t.data.array,o=r(n)&&n[0]===i;s.resolve(o),e.terminate(),g._canTransferArrayBuffer=o},g._canTransferArrayBuffer=s.promise}return g._canTransferArrayBuffer}function d(e,t){--e._activeTasks;var i=t.id;if(r(i)){var n=e._deferreds,o=n[i];if(r(t.error)){var s=t.error;"RuntimeError"===s.name?(s=new u(t.error.message),s.stack=t.error.stack):"DeveloperError"===s.name&&(s=new a(t.error.message),s.stack=t.error.stack),o.reject(s)}else o.resolve(t.result);delete n[i]}}function p(e){var t=i(e);if(l(t)){var n,r='importScripts("'+t+'");';try{n=new Blob([r],{type:"application/javascript"})}catch(o){var a=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,s=new a;s.append(r),n=s.getBlob("application/javascript")}var u=window.URL||window.webkitURL;t=u.createObjectURL(n)}return t}function m(){return r(v)||(v=p("Workers/cesiumWorkerBootstrapper.js")),v}function f(e){var t=new Worker(m());t.postMessage=n(t.webkitPostMessage,t.postMessage);var o={loaderConfig:{},workerModule:g._workerModulePrefix+e._workerName};return r(g._loaderConfig)?o.loaderConfig=g._loaderConfig:r(c.toUrl)?o.loaderConfig.baseUrl=s("..",i("Workers/cesiumWorkerBootstrapper.js")):o.loaderConfig.paths={Workers:i("Workers")},t.postMessage(o),t.onmessage=function(t){d(e,t.data)},t}function g(e,t){this._workerName=e,this._maximumActiveTasks=n(t,5),this._activeTasks=0,this._deferreds={},this._nextID=0}var v,_=[];return g.prototype.scheduleTask=function(e,i){if(r(this._worker)||(this._worker=f(this)),!(this._activeTasks>=this._maximumActiveTasks)){++this._activeTasks;var n=this;return t(h(),function(o){r(i)?o||(i.length=0):i=_;var a=n._nextID++,s=t.defer();return n._deferreds[a]=s,n._worker.postMessage({id:a,parameters:e,canTransferArrayBuffer:o},i),s.promise})}},g.prototype.isDestroyed=function(){return!1},g.prototype.destroy=function(){return r(this._worker)&&this._worker.terminate(),o(this)},g._defaultWorkerModulePrefix="Workers/",g._workerModulePrefix=g._defaultWorkerModulePrefix,g._loaderConfig=void 0,g._canTransferArrayBuffer=void 0,g}),define("Cesium/Core/TerrainMesh",["../Core/defaultValue"],function(e){"use strict";function t(t,i,n,r,o,a,s,l,u,c,h){this.center=t,this.vertices=i,this.stride=e(l,6),this.indices=n,this.minimumHeight=r,this.maximumHeight=o,this.boundingSphere3D=a,this.occludeePointInScaledSpace=s,this.orientedBoundingBox=u,this.encoding=c,this.exaggeration=h}return t}),define("Cesium/Core/TerrainProvider",["./defined","./defineProperties","./DeveloperError","./Math"],function(e,t,i,n){"use strict";function r(){i.throwInstantiationError()}t(r.prototype,{errorEvent:{get:i.throwInstantiationError},credit:{get:i.throwInstantiationError},tilingScheme:{get:i.throwInstantiationError},ready:{get:i.throwInstantiationError},readyPromise:{get:i.throwInstantiationError},hasWaterMask:{get:i.throwInstantiationError},hasVertexNormals:{get:i.throwInstantiationError}});var o=[];return r.getRegularGridIndices=function(t,i){var n=o[t];e(n)||(o[t]=n=[]);var r=n[i];if(!e(r)){r=n[i]=new Uint16Array((t-1)*(i-1)*6);for(var a=0,s=0,l=0;i-1>l;++l){for(var u=0;t-1>u;++u){var c=a,h=c+t,d=h+1,p=c+1;r[s++]=c,r[s++]=h,r[s++]=p,r[s++]=p,r[s++]=h,r[s++]=d,++a}++a}}return r},r.heightmapTerrainQuality=.25,r.getEstimatedLevelZeroGeometricErrorForAHeightmap=function(e,t,i){return 2*e.maximumRadius*Math.PI*r.heightmapTerrainQuality/(t*i)},r.prototype.requestTileGeometry=i.throwInstantiationError,r.prototype.getLevelMaximumGeometricError=i.throwInstantiationError,r.prototype.getTileDataAvailable=i.throwInstantiationError,r}),define("Cesium/Core/HeightmapTerrainData",["../ThirdParty/when","./defaultValue","./defined","./defineProperties","./DeveloperError","./GeographicTilingScheme","./HeightmapTessellator","./Math","./Rectangle","./TaskProcessor","./TerrainEncoding","./TerrainMesh","./TerrainProvider"],function(e,t,i,n,r,o,a,s,l,u,c,h,d){"use strict";function p(e){this._buffer=e.buffer,this._width=e.width,this._height=e.height,this._childTileMask=t(e.childTileMask,15);var n=a.DEFAULT_STRUCTURE,r=e.structure;i(r)?r!==n&&(r.heightScale=t(r.heightScale,n.heightScale),r.heightOffset=t(r.heightOffset,n.heightOffset),r.elementsPerHeight=t(r.elementsPerHeight,n.elementsPerHeight),r.stride=t(r.stride,n.stride),r.elementMultiplier=t(r.elementMultiplier,n.elementMultiplier),r.isBigEndian=t(r.isBigEndian,n.isBigEndian)):r=n,this._structure=r,this._createdByUpsampling=t(e.createdByUpsampling,!1),this._waterMask=e.waterMask,this._skirtHeight=void 0,this._bufferType=this._buffer.constructor,this._mesh=void 0}function m(e,t,i,n,r,o,a,s,l,u){var c=(l-o.west)*(a-1)/(o.east-o.west),h=(u-o.south)*(s-1)/(o.north-o.south),d=0|c,p=d+1;p>=a&&(p=a-1,d=a-2);var m=0|h,f=m+1;f>=s&&(f=s-1,m=s-2);var _=c-d,y=h-m;m=s-1-m,f=s-1-f;var C=v(e,t,i,n,r,m*a+d),w=v(e,t,i,n,r,m*a+p),E=v(e,t,i,n,r,f*a+d),b=v(e,t,i,n,r,f*a+p);return g(_,y,C,w,E,b)}function f(e,t,i,n,r,o,a,s,l,u,c){var h=(l-o.west)*(a-1)/(o.east-o.west),d=(u-o.south)*(s-1)/(o.north-o.south);r>0&&(h+=1,d+=1,a+=2,s+=2);var p=r>0?a-1:a,m=0|h,f=m+1;f>=p&&(f=a-1,m=a-2);var v=r>0?s-1:s,_=0|d,y=_+1;y>=v&&(y=s-1,_=s-2);var C=h-m,w=d-_;_=s-1-_,y=s-1-y;var E=(t.decodeHeight(e,_*a+m)/c-i)/n,b=(t.decodeHeight(e,_*a+f)/c-i)/n,S=(t.decodeHeight(e,y*a+m)/c-i)/n,T=(t.decodeHeight(e,y*a+f)/c-i)/n;return g(C,w,E,b,S,T)}function g(e,t,i,n,r,o){return e>t?i+e*(n-i)+t*(o-n):i+e*(o-r)+t*(r-i)}function v(e,t,i,n,r,o){o*=n;var a,s=0;if(r)for(a=0;t>a;++a)s=s*i+e[o+a];else for(a=t-1;a>=0;--a)s=s*i+e[o+a];return s}function _(e,t,i,n,r,o,a,s){a*=r;var l;if(o)for(l=0;t-1>l;++l)e[a+l]=s/n|0,s-=e[a+l]*n,n/=i;else for(l=t-1;l>0;--l)e[a+l]=s/n|0,s-=e[a+l]*n,n/=i;e[a+l]=s}n(p.prototype,{waterMask:{get:function(){return this._waterMask}}});var y=new u("createVerticesFromHeightmap");return p.prototype.createMesh=function(n,r,a,s,u){var p=n.ellipsoid,m=n.tileXYToNativeRectangle(r,a,s),f=n.tileXYToRectangle(r,a,s);u=t(u,1);var g=p.cartographicToCartesian(l.center(f)),v=this._structure,_=d.getEstimatedLevelZeroGeometricErrorForAHeightmap(p,this._width,n.getNumberOfXTilesAtLevel(0)),C=_/(1<D;++D)for(var I=s.lerp(E.north,E.south,D/(c-1)),R=0;u>R;++R){var O=s.lerp(E.west,E.east,R/(u-1)),L=f(y,C,b,S,d,w,u,c,O,I,T);_(g,x,A,M,m,P,D*u+R,L)}return new p({buffer:g,width:u,height:c,childTileMask:0,structure:this._structure,createdByUpsampling:!0})}},p.prototype.isChildAvailable=function(e,t,i,n){var r=2;return i!==2*e&&++r,n!==2*t&&(r-=2),0!==(this._childTileMask&1<=r.maximumRequestsPerServer?void 0:(o[s]=l+1,t(a(e),function(e){return o[s]--,e}).otherwise(function(e){return o[s]--,t.reject(e)}))}var o={},a="undefined"!=typeof document?new e(document.location.href):new e;return r.maximumRequestsPerServer=6,r}),define("Cesium/Core/ArcGisImageServerTerrainProvider",["../ThirdParty/when","./Credit","./defaultValue","./defined","./defineProperties","./DeveloperError","./Ellipsoid","./Event","./GeographicTilingScheme","./getImagePixels","./HeightmapTerrainData","./loadImage","./Math","./TerrainProvider","./throttleRequestByServer"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m){"use strict";function f(r){this._url=r.url,this._token=r.token,this._tilingScheme=r.tilingScheme,n(this._tilingScheme)||(this._tilingScheme=new l({ellipsoid:i(r.ellipsoid,a.WGS84)})),this._heightmapWidth=65,this._levelZeroMaximumGeometricError=p.getEstimatedLevelZeroGeometricErrorForAHeightmap(this._tilingScheme.ellipsoid,this._heightmapWidth,this._tilingScheme.getNumberOfXTilesAtLevel(0)),this._proxy=r.proxy,this._terrainDataStructure={heightScale:.001,heightOffset:-1e3,elementsPerHeight:3,stride:4,elementMultiplier:256,isBigEndian:!0},this._errorEvent=new s;var o=r.credit;"string"==typeof o&&(o=new t(o)),this._credit=o,this._readyPromise=e.resolve(!0)}return r(f.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},ready:{get:function(){return!0}},readyPromise:{get:function(){return this._readyPromise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}}}),f.prototype.requestTileGeometry=function(t,i,r){var o=this._tilingScheme.tileXYToRectangle(t,i,r),a=(o.east-o.west)/(this._heightmapWidth-1),s=(o.north-o.south)/(this._heightmapWidth-1);o.west-=.5*a,o.east+=.5*a,o.south-=.5*s,o.north+=.5*s;var l=d.toDegrees(o.west)+"%2C"+d.toDegrees(o.south)+"%2C"+d.toDegrees(o.east)+"%2C"+d.toDegrees(o.north),p=this._url+"/exportImage?interpolation=RSP_BilinearInterpolation&format=tiff&f=image&size="+this._heightmapWidth+"%2C"+this._heightmapWidth+"&bboxSR=4326&imageSR=4326&bbox="+l;this._token&&(p+="&token="+this._token);var f=this._proxy;n(f)&&(p=f.getURL(p));var g=m(p,h);if(n(g)){var v=this;return e(g,function(e){return new c({buffer:u(e),width:v._heightmapWidth,height:v._heightmapWidth,childTileMask:15,structure:v._terrainDataStructure})})}},f.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<a)return i;var s,l,u;for(s=1;a>s&&(l=i[s-1],u=i[s],!n(l,u,o));++s);if(s===a)return r&&n(i[0],i[i.length-1],o)?i.slice(1):i;for(var c=i.slice(0,s);a>s;++s)u=i[s],n(l,u,o)||(c.push(u),l=u);return r&&c.length>1&&n(c[0],c[c.length-1],o)&&c.shift(),c}}var o=n.EPSILON10;return r}),define("Cesium/Core/AssociativeArray",["./defined","./defineProperties","./DeveloperError"],function(e,t,i){"use strict";function n(){this._array=[],this._hash={}}return t(n.prototype,{length:{get:function(){return this._array.length}},values:{get:function(){return this._array}}}),n.prototype.contains=function(t){return e(this._hash[t])},n.prototype.set=function(e,t){var i=this._hash[e];t!==i&&(this.remove(e),this._hash[e]=t,this._array.push(t))},n.prototype.get=function(e){return this._hash[e]},n.prototype.remove=function(t){var i=this._hash[t],n=e(i);if(n){var r=this._array;r.splice(r.indexOf(i),1),delete this._hash[t]}return n},n.prototype.removeAll=function(){var e=this._array;e.length>0&&(this._hash={},e.length=0)},n}),define("Cesium/Core/barycentricCoordinates",["./Cartesian2","./Cartesian3","./defined","./DeveloperError"],function(e,t,i,n){"use strict";function r(n,r,l,u,c){i(c)||(c=new t);var h,d,p,m,f,g,v,_;i(r.z)?(h=t.subtract(l,r,o),d=t.subtract(u,r,a),p=t.subtract(n,r,s),m=t.dot(h,h),f=t.dot(h,d),g=t.dot(h,p),v=t.dot(d,d),_=t.dot(d,p)):(h=e.subtract(l,r,o),d=e.subtract(u,r,a),p=e.subtract(n,r,s),m=e.dot(h,h),f=e.dot(h,d),g=e.dot(h,p),v=e.dot(d,d),_=e.dot(d,p));var y=1/(m*v-f*f);return c.y=(v*g-f*_)*y,c.z=(m*_-f*g)*y,c.x=1-c.y-c.z,c}var o=new t,a=new t,s=new t;return r}),define("Cesium/Core/BingMapsApi",["./Credit","./defined"],function(e,t){"use strict";var i={};i.defaultKey=void 0;var n,r=!1,o="This application is using Cesium's default Bing Maps key. Please create a new key for the application as soon as possible and prior to deployment by visiting https://www.bingmapsportal.com/, and provide your key to Cesium by setting the Cesium.BingMapsApi.defaultKey property before constructing the CesiumWidget or any other object that uses the Bing Maps API.";return i.getKey=function(e){return t(e)?e:t(i.defaultKey)?i.defaultKey:(r||(console.log(o),r=!0),"AnjT_wAj_juA_MsD8NhcEAVSjCYpV-e50lUypkWm1JPxVu0XyVqabsvD3r2DQpX-")},i.getErrorCredit=function(r){return t(r)||t(i.defaultKey)?void 0:(t(n)||(n=new e(o)),n)},i}),define("Cesium/Core/BoundingRectangle",["./Cartesian2","./Cartographic","./defaultValue","./defined","./DeveloperError","./GeographicProjection","./Intersect","./Rectangle"],function(e,t,i,n,r,o,a,s){"use strict";function l(e,t,n,r){this.x=i(e,0),this.y=i(t,0),this.width=i(n,0),this.height=i(r,0)}l.packedLength=4,l.pack=function(e,t,n){n=i(n,0),t[n++]=e.x,t[n++]=e.y,t[n++]=e.width,t[n]=e.height},l.unpack=function(e,t,r){return t=i(t,0),n(r)||(r=new l),r.x=e[t++],r.y=e[t++],r.width=e[t++],r.height=e[t],r},l.fromPoints=function(e,t){if(n(t)||(t=new l),!n(e)||0===e.length)return t.x=0,t.y=0,t.width=0,t.height=0,t;for(var i=e.length,r=e[0].x,o=e[0].y,a=e[0].x,s=e[0].y,u=1;i>u;u++){var c=e[u],h=c.x,d=c.y;r=Math.min(h,r),a=Math.max(h,a),o=Math.min(d,o),s=Math.max(d,s)}return t.x=r,t.y=o,t.width=a-r,t.height=s-o,t};var u=new o,c=new t,h=new t;return l.fromRectangle=function(t,r,o){if(n(o)||(o=new l),!n(t))return o.x=0,o.y=0,o.width=0,o.height=0,o;r=i(r,u);var a=r.project(s.southwest(t,c)),d=r.project(s.northeast(t,h));return e.subtract(d,a,d),o.x=a.x,o.y=a.y,o.width=d.x,o.height=d.y,o},l.clone=function(e,t){return n(e)?n(t)?(t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height,t):new l(e.x,e.y,e.width,e.height):void 0},l.union=function(e,t,i){n(i)||(i=new l);var r=Math.min(e.x,t.x),o=Math.min(e.y,t.y),a=Math.max(e.x+e.width,t.x+t.width),s=Math.max(e.y+e.height,t.y+t.height);return i.x=r,i.y=o,i.width=a-r,i.height=s-o,i},l.expand=function(e,t,i){i=l.clone(e,i);var n=t.x-i.x,r=t.y-i.y;return n>i.width?i.width=n:0>n&&(i.width-=n,i.x=t.x),r>i.height?i.height=r:0>r&&(i.height-=r,i.y=t.y),i},l.intersect=function(e,t){var i=e.x,n=e.y,r=t.x,o=t.y;return i>r+t.width||i+e.widtho+t.height?a.OUTSIDE:a.INTERSECTING},l.equals=function(e,t){return e===t||n(e)&&n(t)&&e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height},l.prototype.clone=function(e){return l.clone(this,e)},l.prototype.intersect=function(e){return l.intersect(this,e)},l.prototype.equals=function(e){return l.equals(this,e)},l}),define("Cesium/Core/GeometryType",["./freezeObject"],function(e){"use strict";var t={NONE:0,TRIANGLES:1,LINES:2,POLYLINES:3};return e(t)}),define("Cesium/Core/PrimitiveType",["../Renderer/WebGLConstants","./freezeObject"],function(e,t){"use strict";var i={POINTS:e.POINTS,LINES:e.LINES,LINE_LOOP:e.LINE_LOOP,LINE_STRIP:e.LINE_STRIP,TRIANGLES:e.TRIANGLES,TRIANGLE_STRIP:e.TRIANGLE_STRIP,TRIANGLE_FAN:e.TRIANGLE_FAN,validate:function(e){return e===i.POINTS||e===i.LINES||e===i.LINE_LOOP||e===i.LINE_STRIP||e===i.TRIANGLES||e===i.TRIANGLE_STRIP||e===i.TRIANGLE_FAN}};return t(i)}),define("Cesium/Core/Geometry",["./defaultValue","./defined","./DeveloperError","./GeometryType","./PrimitiveType"],function(e,t,i,n,r){"use strict";function o(t){t=e(t,e.EMPTY_OBJECT),this.attributes=t.attributes,this.indices=t.indices,this.primitiveType=e(t.primitiveType,r.TRIANGLES),this.boundingSphere=t.boundingSphere,this.geometryType=e(t.geometryType,n.NONE),this.boundingSphereCV=void 0}return o.computeNumberOfVertices=function(e){var n=-1;for(var r in e.attributes)if(e.attributes.hasOwnProperty(r)&&t(e.attributes[r])&&t(e.attributes[r].values)){var o=e.attributes[r],a=o.values.length/o.componentsPerAttribute;if(n!==a&&-1!==n)throw new i("All attribute lists must have the same number of attributes.");n=a}return n},o}),define("Cesium/Core/GeometryAttribute",["./defaultValue","./defined","./DeveloperError"],function(e,t,i){"use strict";function n(t){t=e(t,e.EMPTY_OBJECT),this.componentDatatype=t.componentDatatype,this.componentsPerAttribute=t.componentsPerAttribute,this.normalize=e(t.normalize,!1),this.values=t.values}return n}),define("Cesium/Core/GeometryAttributes",["./defaultValue"],function(e){"use strict";function t(t){t=e(t,e.EMPTY_OBJECT),this.position=t.position,this.normal=t.normal,this.st=t.st,this.binormal=t.binormal,this.tangent=t.tangent,this.color=t.color}return t}),define("Cesium/Core/VertexFormat",["./defaultValue","./defined","./DeveloperError","./freezeObject"],function(e,t,i,n){"use strict";function r(t){t=e(t,e.EMPTY_OBJECT),this.position=e(t.position,!1),this.normal=e(t.normal,!1),this.st=e(t.st,!1),this.binormal=e(t.binormal,!1),this.tangent=e(t.tangent,!1),this.color=e(t.color,!1)}return r.POSITION_ONLY=n(new r({position:!0})),r.POSITION_AND_NORMAL=n(new r({position:!0,normal:!0})),r.POSITION_NORMAL_AND_ST=n(new r({position:!0,normal:!0,st:!0})),r.POSITION_AND_ST=n(new r({position:!0,st:!0})),r.POSITION_AND_COLOR=n(new r({position:!0,color:!0})),r.ALL=n(new r({position:!0,normal:!0,st:!0,binormal:!0,tangent:!0})),r.DEFAULT=r.POSITION_NORMAL_AND_ST,r.packedLength=6,r.pack=function(t,i,n){n=e(n,0),i[n++]=t.position?1:0,i[n++]=t.normal?1:0,i[n++]=t.st?1:0,i[n++]=t.binormal?1:0,i[n++]=t.tangent?1:0,i[n++]=t.color?1:0},r.unpack=function(i,n,o){return n=e(n,0),t(o)||(o=new r),o.position=1===i[n++],o.normal=1===i[n++],o.st=1===i[n++],o.binormal=1===i[n++],o.tangent=1===i[n++],o.color=1===i[n++],o},r.clone=function(e,i){return t(e)?(t(i)||(i=new r),i.position=e.position,i.normal=e.normal,i.st=e.st,i.binormal=e.binormal,i.tangent=e.tangent,i.color=e.color,i):void 0},r}),define("Cesium/Core/BoxGeometry",["./BoundingSphere","./Cartesian3","./ComponentDatatype","./defaultValue","./defined","./DeveloperError","./Geometry","./GeometryAttribute","./GeometryAttributes","./PrimitiveType","./VertexFormat"],function(e,t,i,n,r,o,a,s,l,u,c){"use strict";function h(e){e=n(e,n.EMPTY_OBJECT);var i=e.minimum,r=e.maximum,o=n(e.vertexFormat,c.DEFAULT);this._minimum=t.clone(i),this._maximum=t.clone(r),this._vertexFormat=o,this._workerName="createBoxGeometry"}var d=new t;h.fromDimensions=function(e){e=n(e,n.EMPTY_OBJECT);var i=e.dimensions,r=t.multiplyByScalar(i,.5,new t);return new h({minimum:t.negate(r,new t),maximum:r,vertexFormat:e.vertexFormat})},h.fromAxisAlignedBoundingBox=function(e){if(!r(e))throw new o("boundingBox is required.");return new h({minimum:e.minimum,maximum:e.maximum})},h.packedLength=2*t.packedLength+c.packedLength,h.pack=function(e,i,r){r=n(r,0),t.pack(e._minimum,i,r),t.pack(e._maximum,i,r+t.packedLength),c.pack(e._vertexFormat,i,r+2*t.packedLength)};var p=new t,m=new t,f=new c,g={minimum:p,maximum:m,vertexFormat:f};return h.unpack=function(e,i,o){i=n(i,0);var a=t.unpack(e,i,p),s=t.unpack(e,i+t.packedLength,m),l=c.unpack(e,i+2*t.packedLength,f);return r(o)?(o._minimum=t.clone(a,o._minimum),o._maximum=t.clone(s,o._maximum),o._vertexFormat=c.clone(l,o._vertexFormat),o):new h(g)},h.createGeometry=function(n){var r=n._minimum,o=n._maximum,c=n._vertexFormat;if(!t.equals(r,o)){var h,p,m=new l;if(c.position&&(c.st||c.normal||c.binormal||c.tangent)){if(c.position&&(p=new Float64Array(72),p[0]=r.x,p[1]=r.y,p[2]=o.z,p[3]=o.x,p[4]=r.y,p[5]=o.z,p[6]=o.x,p[7]=o.y,p[8]=o.z,p[9]=r.x,p[10]=o.y,p[11]=o.z,p[12]=r.x,p[13]=r.y,p[14]=r.z,p[15]=o.x,p[16]=r.y,p[17]=r.z,p[18]=o.x,p[19]=o.y,p[20]=r.z,p[21]=r.x,p[22]=o.y,p[23]=r.z,p[24]=o.x,p[25]=r.y,p[26]=r.z,p[27]=o.x,p[28]=o.y,p[29]=r.z,p[30]=o.x,p[31]=o.y,p[32]=o.z,p[33]=o.x,p[34]=r.y,p[35]=o.z,p[36]=r.x,p[37]=r.y,p[38]=r.z,p[39]=r.x,p[40]=o.y,p[41]=r.z,p[42]=r.x,p[43]=o.y,p[44]=o.z,p[45]=r.x,p[46]=r.y,p[47]=o.z,p[48]=r.x,p[49]=o.y,p[50]=r.z,p[51]=o.x,p[52]=o.y,p[53]=r.z,p[54]=o.x,p[55]=o.y,p[56]=o.z,p[57]=r.x,p[58]=o.y,p[59]=o.z,p[60]=r.x,p[61]=r.y,p[62]=r.z,p[63]=o.x,p[64]=r.y,p[65]=r.z,p[66]=o.x,p[67]=r.y,p[68]=o.z,p[69]=r.x,p[70]=r.y,p[71]=o.z,m.position=new s({componentDatatype:i.DOUBLE,componentsPerAttribute:3,values:p})),c.normal){var f=new Float32Array(72);f[0]=0,f[1]=0,f[2]=1,f[3]=0,f[4]=0,f[5]=1,f[6]=0,f[7]=0,f[8]=1,f[9]=0,f[10]=0,f[11]=1,f[12]=0,f[13]=0,f[14]=-1,f[15]=0,f[16]=0,f[17]=-1,f[18]=0,f[19]=0,f[20]=-1,f[21]=0,f[22]=0,f[23]=-1,f[24]=1,f[25]=0,f[26]=0,f[27]=1,f[28]=0,f[29]=0,f[30]=1,f[31]=0,f[32]=0,f[33]=1,f[34]=0,f[35]=0,f[36]=-1,f[37]=0,f[38]=0,f[39]=-1,f[40]=0,f[41]=0,f[42]=-1,f[43]=0,f[44]=0,f[45]=-1,f[46]=0,f[47]=0,f[48]=0,f[49]=1,f[50]=0,f[51]=0,f[52]=1,f[53]=0,f[54]=0,f[55]=1,f[56]=0,f[57]=0,f[58]=1,f[59]=0,f[60]=0,f[61]=-1,f[62]=0,f[63]=0,f[64]=-1,f[65]=0,f[66]=0,f[67]=-1,f[68]=0,f[69]=0,f[70]=-1,f[71]=0,m.normal=new s({componentDatatype:i.FLOAT,componentsPerAttribute:3,values:f})}if(c.st){var g=new Float32Array(48);g[0]=0,g[1]=0,g[2]=1,g[3]=0,g[4]=1,g[5]=1,g[6]=0,g[7]=1,g[8]=1,g[9]=0,g[10]=0,g[11]=0,g[12]=0,g[13]=1,g[14]=1,g[15]=1,g[16]=0,g[17]=0,g[18]=1,g[19]=0,g[20]=1,g[21]=1,g[22]=0,g[23]=1,g[24]=1,g[25]=0,g[26]=0,g[27]=0,g[28]=0,g[29]=1,g[30]=1,g[31]=1,g[32]=1,g[33]=0,g[34]=0,g[35]=0,g[36]=0,g[37]=1,g[38]=1,g[39]=1,g[40]=0,g[41]=0,g[42]=1,g[43]=0,g[44]=1,g[45]=1,g[46]=0,g[47]=1,m.st=new s({componentDatatype:i.FLOAT,componentsPerAttribute:2,values:g})}if(c.tangent){var v=new Float32Array(72);v[0]=1,v[1]=0,v[2]=0,v[3]=1,v[4]=0,v[5]=0,v[6]=1,v[7]=0,v[8]=0,v[9]=1,v[10]=0,v[11]=0,v[12]=-1,v[13]=0,v[14]=0,v[15]=-1,v[16]=0,v[17]=0,v[18]=-1,v[19]=0,v[20]=0,v[21]=-1,v[22]=0,v[23]=0,v[24]=0,v[25]=1,v[26]=0,v[27]=0,v[28]=1,v[29]=0,v[30]=0,v[31]=1,v[32]=0,v[33]=0,v[34]=1,v[35]=0,v[36]=0,v[37]=-1,v[38]=0,v[39]=0,v[40]=-1,v[41]=0,v[42]=0,v[43]=-1,v[44]=0,v[45]=0,v[46]=-1,v[47]=0,v[48]=-1,v[49]=0,v[50]=0,v[51]=-1,v[52]=0,v[53]=0,v[54]=-1,v[55]=0,v[56]=0,v[57]=-1,v[58]=0,v[59]=0,v[60]=1,v[61]=0,v[62]=0,v[63]=1,v[64]=0,v[65]=0,v[66]=1,v[67]=0,v[68]=0,v[69]=1,v[70]=0,v[71]=0,m.tangent=new s({componentDatatype:i.FLOAT,componentsPerAttribute:3,values:v})}if(c.binormal){var _=new Float32Array(72);_[0]=0,_[1]=1,_[2]=0,_[3]=0,_[4]=1,_[5]=0,_[6]=0,_[7]=1,_[8]=0,_[9]=0,_[10]=1,_[11]=0,_[12]=0,_[13]=1,_[14]=0,_[15]=0,_[16]=1,_[17]=0,_[18]=0,_[19]=1,_[20]=0,_[21]=0,_[22]=1,_[23]=0,_[24]=0,_[25]=0,_[26]=1,_[27]=0,_[28]=0,_[29]=1,_[30]=0,_[31]=0,_[32]=1,_[33]=0,_[34]=0,_[35]=1,_[36]=0,_[37]=0,_[38]=1,_[39]=0,_[40]=0,_[41]=1,_[42]=0,_[43]=0,_[44]=1,_[45]=0,_[46]=0,_[47]=1,_[48]=0,_[49]=0,_[50]=1,_[51]=0,_[52]=0,_[53]=1,_[54]=0,_[55]=0,_[56]=1,_[57]=0,_[58]=0,_[59]=1,_[60]=0,_[61]=0,_[62]=1,_[63]=0,_[64]=0,_[65]=1,_[66]=0,_[67]=0,_[68]=1,_[69]=0,_[70]=0,_[71]=1,m.binormal=new s({componentDatatype:i.FLOAT,componentsPerAttribute:3,values:_})}h=new Uint16Array(36),h[0]=0,h[1]=1,h[2]=2,h[3]=0,h[4]=2,h[5]=3,h[6]=6,h[7]=5,h[8]=4,h[9]=7,h[10]=6,h[11]=4,h[12]=8,h[13]=9,h[14]=10,h[15]=8,h[16]=10,h[17]=11,h[18]=14,h[19]=13,h[20]=12,h[21]=15,h[22]=14,h[23]=12,h[24]=18,h[25]=17,h[26]=16,h[27]=19,h[28]=18,h[29]=16,h[30]=20,h[31]=21,h[32]=22,h[33]=20,h[34]=22,h[35]=23}else p=new Float64Array(24),p[0]=r.x,p[1]=r.y,p[2]=r.z,p[3]=o.x,p[4]=r.y,p[5]=r.z,p[6]=o.x,p[7]=o.y,p[8]=r.z,p[9]=r.x,p[10]=o.y,p[11]=r.z,p[12]=r.x,p[13]=r.y,p[14]=o.z,p[15]=o.x,p[16]=r.y,p[17]=o.z,p[18]=o.x,p[19]=o.y,p[20]=o.z,p[21]=r.x,p[22]=o.y,p[23]=o.z,m.position=new s({componentDatatype:i.DOUBLE,componentsPerAttribute:3,values:p}),h=new Uint16Array(36),h[0]=4,h[1]=5,h[2]=6,h[3]=4,h[4]=6,h[5]=7,h[6]=1,h[7]=0,h[8]=3,h[9]=1,h[10]=3,h[11]=2,h[12]=1,h[13]=6,h[14]=5,h[15]=1,h[16]=2,h[17]=6,h[18]=2,h[19]=3,h[20]=7,h[21]=2,h[22]=7,h[23]=6,h[24]=3,h[25]=0,h[26]=4,h[27]=3,h[28]=4,h[29]=7,h[30]=0,h[31]=1,h[32]=5,h[33]=0,h[34]=5,h[35]=4;var y=t.subtract(o,r,d),C=.5*t.magnitude(y);return new a({attributes:m,indices:h,primitiveType:u.TRIANGLES,boundingSphere:new e(t.ZERO,C)})}},h}),define("Cesium/Core/BoxOutlineGeometry",["./BoundingSphere","./Cartesian3","./ComponentDatatype","./defaultValue","./defined","./DeveloperError","./Geometry","./GeometryAttribute","./GeometryAttributes","./PrimitiveType"],function(e,t,i,n,r,o,a,s,l,u){"use strict";function c(e){e=n(e,n.EMPTY_OBJECT);var i=e.minimum,r=e.maximum;this._min=t.clone(i),this._max=t.clone(r),this._workerName="createBoxOutlineGeometry"}var h=new t;c.fromDimensions=function(e){e=n(e,n.EMPTY_OBJECT);var i=e.dimensions,r=t.multiplyByScalar(i,.5,new t);return new c({minimum:t.negate(r,new t),maximum:r})},c.fromAxisAlignedBoundingBox=function(e){if(!r(e))throw new o("boundingBox is required.");return new c({minimum:e.minimum,maximum:e.maximum})},c.packedLength=2*t.packedLength,c.pack=function(e,i,r){r=n(r,0),t.pack(e._min,i,r),t.pack(e._max,i,r+t.packedLength)};var d=new t,p=new t,m={minimum:d,maximum:p};return c.unpack=function(e,i,o){i=n(i,0);var a=t.unpack(e,i,d),s=t.unpack(e,i+t.packedLength,p);return r(o)?(o._min=t.clone(a,o._min),o._max=t.clone(s,o._max),o):new c(m)},c.createGeometry=function(n){var r=n._min,o=n._max;if(!t.equals(r,o)){var c=new l,d=new Uint16Array(24),p=new Float64Array(24);p[0]=r.x,p[1]=r.y,p[2]=r.z,p[3]=o.x,p[4]=r.y,p[5]=r.z,p[6]=o.x,p[7]=o.y,p[8]=r.z,p[9]=r.x,p[10]=o.y,p[11]=r.z,p[12]=r.x,p[13]=r.y,p[14]=o.z,p[15]=o.x,p[16]=r.y,p[17]=o.z,p[18]=o.x,p[19]=o.y,p[20]=o.z,p[21]=r.x,p[22]=o.y,p[23]=o.z,c.position=new s({componentDatatype:i.DOUBLE,componentsPerAttribute:3,values:p}),d[0]=4,d[1]=5,d[2]=5,d[3]=6,d[4]=6,d[5]=7,d[6]=7,d[7]=4,d[8]=0,d[9]=1,d[10]=1,d[11]=2,d[12]=2,d[13]=3,d[14]=3,d[15]=0,d[16]=0,d[17]=4,d[18]=1,d[19]=5,d[20]=2,d[21]=6,d[22]=3,d[23]=7;var m=t.subtract(o,r,h),f=.5*t.magnitude(m);return new a({attributes:c,indices:d,primitiveType:u.LINES,boundingSphere:new e(t.ZERO,f)})}},c}),define("Cesium/Core/cancelAnimationFrame",["./defined"],function(e){"use strict";function t(e){i(e)}if("undefined"!=typeof window){var i=window.cancelAnimationFrame;return function(){if(!e(i))for(var t=["webkit","moz","ms","o"],n=0,r=t.length;r>n&&!e(i);)i=window[t[n]+"CancelAnimationFrame"],e(i)||(i=window[t[n]+"CancelRequestAnimationFrame"]),++n;e(i)||(i=clearTimeout)}(),t}}),define("Cesium/Core/Spline",["./defaultValue","./defined","./DeveloperError"],function(e,t,i){"use strict";function n(){this.times=void 0,this.points=void 0,i.throwInstantiationError()}return n.prototype.evaluate=i.throwInstantiationError,n.prototype.findTimeInterval=function(t,i){var n=this.times,r=n.length;if(i=e(i,0),t>=n[i]){if(r>i+1&&ti+2&&t=0&&t>=n[i-1])return i-1;var o;if(t>n[i])for(o=i;r-1>o&&!(t>=n[o]&&t=0&&!(t>=n[o]&&t=0;--o)l[o]=e.subtract(s[o],e.multiplyByScalar(l[o+1],a[o],l[o]),l[o]);return l},n}),define("Cesium/Core/HermiteSpline",["./Cartesian3","./Cartesian4","./defaultValue","./defined","./defineProperties","./DeveloperError","./LinearSpline","./Matrix4","./Spline","./TridiagonalSystemSolver"],function(e,t,i,n,r,o,a,s,l,u){"use strict";function c(t,i,r){var o=p,a=f,s=m,l=g;o.length=a.length=t.length-1,s.length=l.length=t.length;var c;o[0]=s[0]=1,a[0]=0;var h=l[0];for(n(h)||(h=l[0]=new e),e.clone(i,h),c=1;c2&&(n(a)||(a=m,e.multiplyByScalar(r[1],2,a),e.subtract(a,r[2],a),e.subtract(a,r[0],a),e.multiplyByScalar(a,.5,a)),!n(s))){var l=r.length-1;s=f,e.multiplyByScalar(r[l-1],2,s),e.subtract(r[l],s,s),e.add(s,r[l-2],s),e.multiplyByScalar(s,.5,s)}this._times=o,this._points=r,this._firstTangent=e.clone(a),this._lastTangent=e.clone(s),this._evaluateFunction=u(this),this._lastTimeIndex=0}var h=new t,d=new e,p=new e,m=new e,f=new e;return r(c.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}},firstTangent:{get:function(){return this._firstTangent}},lastTangent:{get:function(){return this._lastTangent}}}),c.catmullRomCoefficientMatrix=new s(-.5,1,-.5,0,1.5,-2.5,0,1,-1.5,2,.5,0,.5,-.5,0,0),c.prototype.findTimeInterval=l.prototype.findTimeInterval,c.prototype.evaluate=function(e,t){return this._evaluateFunction(e,t)},c}),define("Cesium/Core/IndexDatatype",["../Renderer/WebGLConstants","./defined","./DeveloperError","./freezeObject","./Math"],function(e,t,i,n,r){"use strict";var o={UNSIGNED_BYTE:e.UNSIGNED_BYTE,UNSIGNED_SHORT:e.UNSIGNED_SHORT,UNSIGNED_INT:e.UNSIGNED_INT};return o.getSizeInBytes=function(e){switch(e){case o.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case o.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case o.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT}},o.validate=function(e){return t(e)&&(e===o.UNSIGNED_BYTE||e===o.UNSIGNED_SHORT||e===o.UNSIGNED_INT)},o.createTypedArray=function(e,t){return e>=r.SIXTY_FOUR_KILOBYTES?new Uint32Array(t):new Uint16Array(t)},o.createTypedArrayFromArrayBuffer=function(e,t,i,n){return e>=r.SIXTY_FOUR_KILOBYTES?new Uint32Array(t,i,n):new Uint16Array(t,i,n)},n(o)}),define("Cesium/Core/loadArrayBuffer",["./loadWithXhr"],function(e){"use strict";function t(t,i){return e({url:t,responseType:"arraybuffer",headers:i})}return t}),define("Cesium/Core/Intersections2D",["./Cartesian3","./defined","./DeveloperError"],function(e,t,i){"use strict";var n={};return n.clipTriangleAtAxisAlignedThreshold=function(e,i,n,r,o,a){t(a)?a.length=0:a=[];var s,l,u;i?(s=e>n,l=e>r,u=e>o):(s=n>e,l=r>e,u=o>e);var c,h,d,p,m,f,g=s+l+u;return 1===g?s?(c=(e-n)/(r-n),h=(e-n)/(o-n),a.push(1),a.push(2),1!==h&&(a.push(-1),a.push(0),a.push(2),a.push(h)),1!==c&&(a.push(-1),a.push(0),a.push(1),a.push(c))):l?(d=(e-r)/(o-r),p=(e-r)/(n-r),a.push(2),a.push(0),1!==p&&(a.push(-1),a.push(1),a.push(0),a.push(p)),1!==d&&(a.push(-1),a.push(1),a.push(2),a.push(d))):u&&(m=(e-o)/(n-o),f=(e-o)/(r-o),a.push(0),a.push(1),1!==f&&(a.push(-1),a.push(2),a.push(1),a.push(f)),1!==m&&(a.push(-1),a.push(2),a.push(0),a.push(m))):2===g?s||n===e?l||r===e?u||o===e||(h=(e-n)/(o-n),d=(e-r)/(o-r),a.push(2),a.push(-1),a.push(0),a.push(2),a.push(h),a.push(-1),a.push(1),a.push(2),a.push(d)):(f=(e-o)/(r-o),c=(e-n)/(r-n),a.push(1),a.push(-1),a.push(2),a.push(1),a.push(f),a.push(-1),a.push(0),a.push(1),a.push(c)):(p=(e-r)/(n-r),m=(e-o)/(n-o),a.push(0),a.push(-1),a.push(1),a.push(0),a.push(p),a.push(-1),a.push(2),a.push(0),a.push(m)):3!==g&&(a.push(0),a.push(1),a.push(2)),a},n.computeBarycentricCoordinates=function(i,n,r,o,a,s,l,u,c){var h=r-l,d=l-a,p=s-u,m=o-u,f=1/(p*h+d*m),g=n-u,v=i-l,_=(p*v+d*g)*f,y=(-m*v+h*g)*f,C=1-_-y;return t(c)?(c.x=_,c.y=y,c.z=C,c):new e(_,y,C)},n}),define("Cesium/Core/QuantizedMeshTerrainData",["../ThirdParty/when","./BoundingSphere","./Cartesian2","./Cartesian3","./defaultValue","./defined","./defineProperties","./DeveloperError","./IndexDatatype","./Intersections2D","./Math","./OrientedBoundingBox","./TaskProcessor","./TerrainEncoding","./TerrainMesh"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m){"use strict";function f(e){function t(e,t){return a[e]-a[t]}function i(e,t){return o[e]-o[t]}this._quantizedVertices=e.quantizedVertices,this._encodedNormals=e.encodedNormals,this._indices=e.indices,this._minimumHeight=e.minimumHeight,this._maximumHeight=e.maximumHeight,this._boundingSphere=e.boundingSphere,this._orientedBoundingBox=e.orientedBoundingBox,this._horizonOcclusionPoint=e.horizonOcclusionPoint;var n=this._quantizedVertices.length/3,o=this._uValues=this._quantizedVertices.subarray(0,n),a=this._vValues=this._quantizedVertices.subarray(n,2*n);this._heightValues=this._quantizedVertices.subarray(2*n,3*n),this._westIndices=g(e.westIndices,t,n),this._southIndices=g(e.southIndices,i,n),this._eastIndices=g(e.eastIndices,t,n),this._northIndices=g(e.northIndices,i,n),this._westSkirtHeight=e.westSkirtHeight,this._southSkirtHeight=e.southSkirtHeight,this._eastSkirtHeight=e.eastSkirtHeight,this._northSkirtHeight=e.northSkirtHeight,this._childTileMask=r(e.childTileMask,15),this._createdByUpsampling=r(e.createdByUpsampling,!1),this._waterMask=e.waterMask,this._mesh=void 0}function g(e,t,i){y.length=e.length;for(var n=!1,r=0,o=e.length;o>r;++r)y[r]=e[r],n=n||r>0&&t(e[r-1],e[r])>0;return n?(y.sort(t),l.createTypedArray(i,y)):e}function v(e,t,i){for(var n=e._mesh,r=n.vertices,o=n.encoding,a=n.indices,s=0,l=a.length;l>s;s+=3){var c=a[s],h=a[s+1],d=a[s+2],p=o.decodeTextureCoordinates(r,c,S),m=o.decodeTextureCoordinates(r,h,T),f=o.decodeTextureCoordinates(r,d,x),g=u.computeBarycentricCoordinates(t,i,p.x,p.y,m.x,m.y,f.x,f.y,b);if(g.x>=-1e-15&&g.y>=-1e-15&&g.z>=-1e-15){var v=o.decodeHeight(r,c),_=o.decodeHeight(r,h),y=o.decodeHeight(r,d);return g.x*v+g.y*_+g.z*y}}}function _(e,t,i){for(var n=e._uValues,r=e._vValues,o=e._heightValues,a=e._indices,s=0,l=a.length;l>s;s+=3){var h=a[s],d=a[s+1],p=a[s+2],m=n[h],f=n[d],g=n[p],v=r[h],_=r[d],y=r[p],C=u.computeBarycentricCoordinates(t,i,m,v,f,_,g,y,b);if(C.x>=-1e-15&&C.y>=-1e-15&&C.z>=-1e-15){var w=C.x*o[h]+C.y*o[d]+C.z*o[p];return c.lerp(e._minimumHeight,e._maximumHeight,w/E)}}}a(f.prototype,{waterMask:{get:function(){return this._waterMask}}});var y=[],C=new d("createVerticesFromQuantizedTerrainMesh");f.prototype.createMesh=function(t,i,n,a,s){var u=t.ellipsoid,c=t.tileXYToRectangle(i,n,a);s=r(s,1);var h=C.scheduleTask({minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,quantizedVertices:this._quantizedVertices,octEncodedNormals:this._encodedNormals,indices:this._indices,westIndices:this._westIndices,southIndices:this._southIndices,eastIndices:this._eastIndices,northIndices:this._northIndices,westSkirtHeight:this._westSkirtHeight,southSkirtHeight:this._southSkirtHeight,eastSkirtHeight:this._eastSkirtHeight,northSkirtHeight:this._northSkirtHeight,rectangle:c,relativeToCenter:this._boundingSphere.center,ellipsoid:u,exaggeration:s});if(o(h)){var d=this;return e(h,function(e){var t=d._quantizedVertices.length/3;t+=d._westIndices.length+d._southIndices.length+d._eastIndices.length+d._northIndices.length;var i=l.createTypedArray(t,e.indices),n=new Float32Array(e.vertices),o=e.center,a=e.minimumHeight,u=e.maximumHeight,c=r(e.boundingSphere,d._boundingSphere),h=r(e.orientedBoundingBox,d._orientedBoundingBox),f=d._horizonOcclusionPoint,g=e.vertexStride,v=p.clone(e.encoding);return d._skirtIndex=e.skirtIndex,d._vertexCountWithoutSkirts=d._quantizedVertices.length/3,d._mesh=new m(o,n,i,a,u,c,f,g,h,v,s),d._quantizedVertices=void 0,d._encodedNormals=void 0,d._indices=void 0,d._uValues=void 0,d._vValues=void 0,d._heightValues=void 0,d._westIndices=void 0,d._southIndices=void 0,d._eastIndices=void 0,d._northIndices=void 0,d._mesh})}};var w=new d("upsampleQuantizedTerrainMesh");f.prototype.upsample=function(i,r,a,s,u,c,d){var p=this._mesh;if(o(this._mesh)){var m=2*r!==u,g=2*a===c,v=i.ellipsoid,_=i.tileXYToRectangle(u,c,d),y=w.scheduleTask({vertices:p.vertices,vertexCountWithoutSkirts:this._vertexCountWithoutSkirts,indices:p.indices,skirtIndex:this._skirtIndex,encoding:p.encoding,minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,isEastChild:m,isNorthChild:g,childRectangle:_,ellipsoid:v,exaggeration:p.exaggeration});if(o(y)){var C=Math.min(this._westSkirtHeight,this._eastSkirtHeight);C=Math.min(C,this._southSkirtHeight),C=Math.min(C,this._northSkirtHeight);var E=m?.5*C:this._westSkirtHeight,b=g?.5*C:this._southSkirtHeight,S=m?this._eastSkirtHeight:.5*C,T=g?this._northSkirtHeight:.5*C;return e(y,function(e){var i,r=new Uint16Array(e.vertices),a=l.createTypedArray(r.length/3,e.indices);return o(e.encodedNormals)&&(i=new Uint8Array(e.encodedNormals)),new f({quantizedVertices:r,indices:a,encodedNormals:i,minimumHeight:e.minimumHeight,maximumHeight:e.maximumHeight,boundingSphere:t.clone(e.boundingSphere),orientedBoundingBox:h.clone(e.orientedBoundingBox),horizonOcclusionPoint:n.clone(e.horizonOcclusionPoint),westIndices:e.westIndices,southIndices:e.southIndices,eastIndices:e.eastIndices,northIndices:e.northIndices,westSkirtHeight:E,southSkirtHeight:b,eastSkirtHeight:S,northSkirtHeight:T,childTileMask:0,createdByUpsampling:!0})})}}};var E=32767,b=new n;f.prototype.interpolateHeight=function(e,t,i){var n=c.clamp((t-e.west)/e.width,0,1);n*=E;var r=c.clamp((i-e.south)/e.height,0,1);return r*=E,o(this._mesh)?void v(this,n,r):_(this,n,r)};var S=new i,T=new i,x=new i;return f.prototype.isChildAvailable=function(e,t,i,n){var r=2;return i!==2*e&&++r,n!==2*t&&(r-=2),0!==(this._childTileMask&1<0?o.raiseEvent(d):console.log('An error occurred in "'+r.constructor.name+'": '+i(a)),d.retry&&t(c)&&c(),d},n.handleSuccess=function(e){t(e)&&(e.timesRetried=-1)},n}),define("Cesium/Core/CesiumTerrainProvider",["../ThirdParty/Uri","../ThirdParty/when","./BoundingSphere","./Cartesian3","./Credit","./defaultValue","./defined","./defineProperties","./DeveloperError","./Event","./GeographicTilingScheme","./HeightmapTerrainData","./IndexDatatype","./joinUrls","./loadArrayBuffer","./loadJson","./Math","./Matrix3","./OrientedBoundingBox","./QuantizedMeshTerrainData","./RuntimeError","./TerrainProvider","./throttleRequestByServer","./TileProviderError"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g,v,_,y,C,w,E,b){"use strict";function S(i){function n(t){var i;if(!t.format)return i="The tile format is not specified in the layer.json file.",void(m=b.handleError(m,g,g._errorEvent,i,void 0,void 0,void 0,l));if(!t.tiles||0===t.tiles.length)return i="The layer.json file does not specify any tile URL templates.",void(m=b.handleError(m,g,g._errorEvent,i,void 0,void 0,void 0,l));if("heightmap-1.0"===t.format)g._heightmapStructure={heightScale:.2,heightOffset:-1e3,elementsPerHeight:1,stride:1,elementMultiplier:256,isBigEndian:!1},g._hasWaterMask=!0,g._requestWaterMask=!0;else if(0!==t.format.indexOf("quantized-mesh-1."))return i='The tile format "'+t.format+'" is invalid or not supported.',void(m=b.handleError(m,g,g._errorEvent,i,void 0,void 0,void 0,l));g._tileUrlTemplates=t.tiles;for(var n=0;n>1^-(1&e)}var u=0,c=3,h=c+1,p=Float64Array.BYTES_PER_ELEMENT*c,m=Float64Array.BYTES_PER_ELEMENT*h,f=3,v=Uint16Array.BYTES_PER_ELEMENT*f,C=3,w=Uint16Array.BYTES_PER_ELEMENT,E=w*C,b=new DataView(t),S=new n(b.getFloat64(u,!0),b.getFloat64(u+8,!0),b.getFloat64(u+16,!0));u+=p;var T=b.getFloat32(u,!0);u+=Float32Array.BYTES_PER_ELEMENT;var x=b.getFloat32(u,!0);u+=Float32Array.BYTES_PER_ELEMENT;var A=new i(new n(b.getFloat64(u,!0),b.getFloat64(u+8,!0),b.getFloat64(u+16,!0)),b.getFloat64(u+p,!0));u+=m;var M=new n(b.getFloat64(u,!0),b.getFloat64(u+8,!0),b.getFloat64(u+16,!0));u+=p;var I=b.getUint32(u,!0);u+=Uint32Array.BYTES_PER_ELEMENT;var R=new Uint16Array(t,u,3*I);u+=I*v,I>65536&&(w=Uint32Array.BYTES_PER_ELEMENT,E=w*C);var O,L=R.subarray(0,I),N=R.subarray(I,2*I),F=R.subarray(2*I,3*I),k=0,B=0,z=0;for(O=0;I>O;++O)k+=l(L[O]),B+=l(N[O]),z+=l(F[O]),L[O]=k,N[O]=B,F[O]=z;u%w!==0&&(u+=w-u%w);var V=b.getUint32(u,!0);u+=Uint32Array.BYTES_PER_ELEMENT;var U=d.createTypedArrayFromArrayBuffer(I,t,u,V*C);u+=V*E;var G=0;for(O=0;O=r.length)return 0;var a=r[o],s=0;return s|=M(a,2*i,2*n)?1:0,s|=M(a,2*i+1,2*n)?2:0,s|=M(a,2*i,2*n+1)?4:0,s|=M(a,2*i+1,2*n+1)?8:0}function M(e,t,i){for(var n=0,r=e.length;r>n;++n){var o=e[n];if(t>=o.startX&&t<=o.endX&&i>=o.startY&&i<=o.endY)return!0}return!1}var D={OCT_VERTEX_NORMALS:1,WATER_MASK:2};return S.prototype.requestTileGeometry=function(e,i,n,r){function s(e){return m(e,T(f))}var l=this._tileUrlTemplates;if(0!==l.length){var u=this._tilingScheme.getNumberOfYTilesAtLevel(n),c=u-i-1,h=l[(e+c+n)%l.length].replace("{z}",n).replace("{x}",e).replace("{y}",c),d=this._proxy;a(d)&&(h=d.getURL(h));var p,f=[];if(this._requestVertexNormals&&this._hasVertexNormals&&f.push(this._littleEndianExtensionSize?"octvertexnormals":"vertexnormals"),this._requestWaterMask&&this._hasWaterMask&&f.push("watermask"),r=o(r,!0)){if(p=E(h,s),!a(p))return}else p=s(h);var g=this;return t(p,function(t){return a(g._heightmapStructure)?x(g,t,n,e,i,c):A(g,t,n,e,i,c)})}},s(S.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},hasWaterMask:{get:function(){return this._hasWaterMask&&this._requestWaterMask}},hasVertexNormals:{get:function(){return this._hasVertexNormals&&this._requestVertexNormals}},requestVertexNormals:{get:function(){return this._requestVertexNormals}},requestWaterMask:{get:function(){return this._requestWaterMask}}}),S.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<=n.length)return!1;var r=n[i],o=this._tilingScheme.getNumberOfYTilesAtLevel(i),a=o-t-1;return M(r,e,a)}},S}),define("Cesium/Core/EllipseGeometryLibrary",["./Cartesian3","./Math","./Matrix3","./Quaternion"],function(e,t,i,n){"use strict";function r(t,r,o,c,h,d,p,m,f,g){var v=t+r;e.multiplyByScalar(c,Math.cos(v),a),e.multiplyByScalar(o,Math.sin(v),s),e.add(a,s,a);var _=Math.cos(t);_*=_;var y=Math.sin(t);y*=y;var C=d/Math.sqrt(p*_+h*y),w=C/m;return n.fromAxisAngle(a,w,l),i.fromQuaternion(l,u),i.multiplyByVector(u,f,g),e.normalize(g,g),e.multiplyByScalar(g,m,g),g}var o={},a=new e,s=new e,l=new n,u=new i,c=new e,h=new e,d=new e,p=new e;o.raisePositionsToHeight=function(t,i,n){for(var r=i.ellipsoid,o=i.height,a=i.extrudedHeight,s=n?t.length/3*2:t.length/3,l=new Float64Array(3*s),u=t.length,m=n?u:0,f=0;u>f;f+=3){var g=f+1,v=f+2,_=e.fromArray(t,f,c);r.scaleToGeodeticSurface(_,_);var y=e.clone(_,h),C=r.geodeticSurfaceNormal(_,p),w=e.multiplyByScalar(C,o,d);e.add(_,w,_),n&&(e.multiplyByScalar(C,a,w),e.add(y,w,y),l[f+m]=y.x,l[g+m]=y.y,l[v+m]=y.z),l[f]=_.x,l[g]=_.y,l[v]=_.z}return l};var m=new e,f=new e,g=new e;return o.computeEllipsePositions=function(i,n,o){var a=i.semiMinorAxis,s=i.semiMajorAxis,l=i.rotation,u=i.center,p=8*i.granularity,v=a*a,_=s*s,y=s*a,C=e.magnitude(u),w=e.normalize(u,m),E=e.cross(e.UNIT_Z,u,f);E=e.normalize(E,E);var b=e.cross(w,E,g),S=1+Math.ceil(t.PI_OVER_TWO/p),T=t.PI_OVER_TWO/(S-1),x=t.PI_OVER_TWO-S*T;0>x&&(S-=Math.ceil(Math.abs(x)/T));var A,P,M,D,I,R=2*(S*(S+2)),O=n?new Array(3*R):void 0,L=0,N=c,F=h,k=4*S*3,B=k-1,z=0,V=o?new Array(k):void 0;for(x=t.PI_OVER_TWO,N=r(x,l,b,E,v,y,_,C,w,N),n&&(O[L++]=N.x,O[L++]=N.y,O[L++]=N.z),o&&(V[B--]=N.z,V[B--]=N.y,V[B--]=N.x),x=t.PI_OVER_TWO-T,A=1;S+1>A;++A){if(N=r(x,l,b,E,v,y,_,C,w,N),F=r(Math.PI-x,l,b,E,v,y,_,C,w,F),n){for(O[L++]=N.x,O[L++]=N.y,O[L++]=N.z,M=2*A+2,P=1;M-1>P;++P)D=P/(M-1),I=e.lerp(N,F,D,d),O[L++]=I.x,O[L++]=I.y,O[L++]=I.z;O[L++]=F.x,O[L++]=F.y,O[L++]=F.z}o&&(V[B--]=N.z,V[B--]=N.y,V[B--]=N.x,V[z++]=F.x,V[z++]=F.y,V[z++]=F.z),x=t.PI_OVER_TWO-(A+1)*T}for(A=S;A>1;--A){if(x=t.PI_OVER_TWO-(A-1)*T,N=r(-x,l,b,E,v,y,_,C,w,N),F=r(x+Math.PI,l,b,E,v,y,_,C,w,F),n){for(O[L++]=N.x,O[L++]=N.y,O[L++]=N.z,M=2*(A-1)+2,P=1;M-1>P;++P)D=P/(M-1),I=e.lerp(N,F,D,d),O[L++]=I.x,O[L++]=I.y,O[L++]=I.z;O[L++]=F.x,O[L++]=F.y,O[L++]=F.z}o&&(V[B--]=N.z,V[B--]=N.y,V[B--]=N.x,V[z++]=F.x,V[z++]=F.y,V[z++]=F.z)}x=t.PI_OVER_TWO,N=r(-x,l,b,E,v,y,_,C,w,N);var U={};return n&&(O[L++]=N.x,O[L++]=N.y,O[L++]=N.z,U.positions=O,U.numPts=S),o&&(V[B--]=N.z,V[B--]=N.y,V[B--]=N.x,U.outerPositions=V),U},o}),define("Cesium/Core/GeometryInstance",["./defaultValue","./defined","./DeveloperError","./Matrix4"],function(e,t,i,n){"use strict";function r(t){t=e(t,e.EMPTY_OBJECT),this.geometry=t.geometry,this.modelMatrix=n.clone(e(t.modelMatrix,n.IDENTITY)),this.id=t.id,this.pickPrimitive=t.pickPrimitive,this.attributes=e(t.attributes,{}),this.westHemisphereGeometry=void 0,this.eastHemisphereGeometry=void 0}return r}),define("Cesium/Core/EncodedCartesian3",["./Cartesian3","./defined","./DeveloperError"],function(e,t,i){"use strict";function n(){this.high=e.clone(e.ZERO),this.low=e.clone(e.ZERO)}n.encode=function(e,i){t(i)||(i={high:0,low:0});var n;return e>=0?(n=65536*Math.floor(e/65536),i.high=n,i.low=e-n):(n=65536*Math.floor(-e/65536),i.high=-n,i.low=e+n),i};var r={high:0,low:0};n.fromCartesian=function(e,i){t(i)||(i=new n);var o=i.high,a=i.low;return n.encode(e.x,r),o.x=r.high,a.x=r.low,n.encode(e.y,r),o.y=r.high,a.y=r.low,n.encode(e.z,r),o.z=r.high,a.z=r.low,i};var o=new n;return n.writeElements=function(e,t,i){n.fromCartesian(e,o);var r=o.high,a=o.low;t[i]=r.x,t[i+1]=r.y,t[i+2]=r.z,t[i+3]=a.x,t[i+4]=a.y,t[i+5]=a.z},n}),define("Cesium/Core/Tipsify",["./defaultValue","./defined","./DeveloperError"],function(e,t,i){"use strict";var n={};return n.calculateACMR=function(i){i=e(i,e.EMPTY_OBJECT);var n=i.indices,r=i.maximumIndex,o=e(i.cacheSize,24),a=n.length;if(!t(r)){r=0;for(var s=0,l=n[s];a>s;)l>r&&(r=l),++s,l=n[s]}for(var u=[],c=0;r+1>c;c++)u[c]=0;for(var h=o+1,d=0;a>d;++d)h-u[n[d]]>o&&(u[n[d]]=h,++h);return(h-o+1)/(a/3)},n.tipsify=function(i){function n(e,t,i,n){for(;t.length>=1;){var r=t[t.length-1];if(t.splice(t.length-1,1),e[r].numLiveTriangles>0)return r}for(;n>o;){if(e[o].numLiveTriangles>0)return++o,o-1;++o}return-1}function r(e,t,i,r,o,a,s){for(var l,u=-1,c=-1,h=0;hc||-1===c)&&(c=l,u=d)),++h}return-1===u?n(r,a,e,s):u}i=e(i,e.EMPTY_OBJECT);var o,a=i.indices,s=i.maximumIndex,l=e(i.cacheSize,24),u=a.length,c=0,h=0,d=a[h],p=u;if(t(s))c=s+1;else{for(;p>h;)d>c&&(c=d),++h,d=a[h];if(-1===c)return 0;++c}for(var m=[],f=0;c>f;f++)m[f]={numLiveTriangles:0,timeStamp:0,vertexTriangles:[]};h=0;for(var g=0;p>h;)m[a[h]].vertexTriangles.push(g),++m[a[h]].numLiveTriangles,m[a[h+1]].vertexTriangles.push(g),++m[a[h+1]].numLiveTriangles,m[a[h+2]].vertexTriangles.push(g),++m[a[h+2]].numLiveTriangles,++g,h+=3;var v=0,_=l+1;o=1;var y,C,w=[],E=[],b=0,S=[],T=u/3,x=[];for(f=0;T>f;f++)x[f]=!1;for(var A,P;-1!==v;){w=[],C=m[v],P=C.vertexTriangles.length;for(var M=0;P>M;++M)if(g=C.vertexTriangles[M],!x[g]){x[g]=!0,h=g+g+g;for(var D=0;3>D;++D)A=a[h],w.push(A),E.push(A),S[b]=A,++b,y=m[A],--y.numLiveTriangles,_-y.timeStamp>l&&(y.timeStamp=_,++_),++h}v=r(a,l,w,m,_,E,c)}return S},n}),define("Cesium/Core/GeometryPipeline",["./AttributeCompression","./barycentricCoordinates","./BoundingSphere","./Cartesian2","./Cartesian3","./Cartesian4","./Cartographic","./ComponentDatatype","./defaultValue","./defined","./DeveloperError","./EncodedCartesian3","./GeographicProjection","./Geometry","./GeometryAttribute","./GeometryInstance","./GeometryType","./IndexDatatype","./Intersect","./IntersectionTests","./Math","./Matrix3","./Matrix4","./Plane","./PrimitiveType","./Tipsify"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g,v,_,y,C,w,E,b,S,T){"use strict";function x(e,t,i,n,r){e[t++]=i,e[t++]=n,e[t++]=n,e[t++]=r,e[t++]=r,e[t]=i}function A(e){for(var t=e.length,i=t/3*6,n=v.createTypedArray(t,i),r=0,o=0;t>o;o+=3,r+=6)x(n,r,e[o],e[o+1],e[o+2]);return n}function P(e){var t=e.length;if(t>=3){var i=6*(t-2),n=v.createTypedArray(t,i);x(n,0,e[0],e[1],e[2]);for(var r=6,o=3;t>o;++o,r+=6)x(n,r,e[o-1],e[o],e[o-2]);return n}return new Uint16Array}function M(e){if(e.length>0){for(var t=e.length-1,i=6*(t-1),n=v.createTypedArray(t,i),r=e[0],o=0,a=1;t>a;++a,o+=6)x(n,o,r,e[a],e[a+1]);return n}return new Uint16Array}function D(e){var t={};for(var i in e)if(e.hasOwnProperty(i)&&u(e[i])&&u(e[i].values)){var n=e[i];t[i]=new m({componentDatatype:n.componentDatatype,componentsPerAttribute:n.componentsPerAttribute,normalize:n.normalize,values:[]})}return t}function I(e,t,i){for(var n in t)if(t.hasOwnProperty(n)&&u(t[n])&&u(t[n].values))for(var r=t[n],o=0;oo;o+=3)r.unpack(i,o,ae),E.multiplyByPoint(e,ae,ae),r.pack(ae,i,o)}function O(e,t){if(u(t))for(var i=t.values,n=i.length,o=0;n>o;o+=3)r.unpack(i,o,ae),w.multiplyByVector(e,ae,ae),ae=r.normalize(ae,ae),r.pack(ae,i,o)}function L(e,t){var i,n=e.length,r={},o=e[0][t].attributes;for(i in o)if(o.hasOwnProperty(i)&&u(o[i])&&u(o[i].values)){for(var a=o[i],l=a.values.length,c=!0,h=1;n>h;++h){var d=e[h][t].attributes[i];if(!u(d)||a.componentDatatype!==d.componentDatatype||a.componentsPerAttribute!==d.componentsPerAttribute||a.normalize!==d.normalize){c=!1;break}l+=d.values.length}c&&(r[i]=new m({componentDatatype:a.componentDatatype,componentsPerAttribute:a.componentsPerAttribute,normalize:a.normalize,values:s.createTypedArray(a.componentDatatype,l)}))}return r}function N(e,t){var n,o,a,s,l,c,h,d=e.length,m=(e[0].modelMatrix,u(e[0][t].indices)),f=e[0][t].primitiveType,g=L(e,t);for(n in g)if(g.hasOwnProperty(n))for(l=g[n].values,s=0,o=0;d>o;++o)for(c=e[o][t].attributes[n].values,h=c.length,a=0;h>a;++a)l[s++]=c[a];var _;if(m){var y=0;for(o=0;d>o;++o)y+=e[o][t].indices.length;var C=p.computeNumberOfVertices(new p({attributes:g,primitiveType:S.POINTS})),w=v.createTypedArray(C,y),E=0,b=0;for(o=0;d>o;++o){var T=e[o][t].indices,x=T.length;for(s=0;x>s;++s)w[E++]=b+T[s];b+=p.computeNumberOfVertices(e[o][t])}_=w}var A,P=new r,M=0;for(o=0;d>o;++o){if(A=e[o][t].boundingSphere,!u(A)){P=void 0;break}r.add(A.center,P,P)}if(u(P))for(r.divideByScalar(P,d,P),o=0;d>o;++o){A=e[o][t].boundingSphere;var D=r.magnitude(r.subtract(A.center,P,ue))+A.radius;D>M&&(M=D)}return new p({attributes:g,indices:_,primitiveType:f,boundingSphere:u(P)?new i(P,M):void 0})}function F(e){if(u(e.indices))return e;for(var t=p.computeNumberOfVertices(e),i=v.createTypedArray(t,t),n=0;t>n;++n)i[n]=n;return e.indices=i,e}function k(e){var t=p.computeNumberOfVertices(e),i=v.createTypedArray(t,3*(t-2));i[0]=1,i[1]=0,i[2]=2;for(var n=3,r=3;t>r;++r)i[n++]=r-1,i[n++]=0,i[n++]=r;return e.indices=i,e.primitiveType=S.TRIANGLES,e}function B(e){var t=p.computeNumberOfVertices(e),i=v.createTypedArray(t,3*(t-2));i[0]=0,i[1]=1,i[2]=2,t>3&&(i[3]=0,i[4]=2,i[5]=3);for(var n=6,r=3;t-1>r;r+=2)i[n++]=r,i[n++]=r-1,i[n++]=r+1,t>r+2&&(i[n++]=r,i[n++]=r+1,i[n++]=r+2);return e.indices=i,e.primitiveType=S.TRIANGLES,e}function z(e){if(u(e.indices))return e;for(var t=p.computeNumberOfVertices(e),i=v.createTypedArray(t,t),n=0;t>n;++n)i[n]=n;return e.indices=i,e}function V(e){var t=p.computeNumberOfVertices(e),i=v.createTypedArray(t,2*(t-1));i[0]=0,i[1]=1;for(var n=2,r=2;t>r;++r)i[n++]=r-1,i[n++]=r;return e.indices=i,e.primitiveType=S.LINES,e}function U(e){var t=p.computeNumberOfVertices(e),i=v.createTypedArray(t,2*t);i[0]=0,i[1]=1;for(var n=2,r=2;t>r;++r)i[n++]=r-1,i[n++]=r;return i[n++]=t-1,i[n]=0,e.indices=i,e.primitiveType=S.LINES,e}function G(e){switch(e.primitiveType){case S.TRIANGLE_FAN:return k(e);case S.TRIANGLE_STRIP:return B(e);case S.TRIANGLES:return F(e);case S.LINE_STRIP:return V(e);case S.LINE_LOOP:return U(e);case S.LINES:return z(e)}return e}function W(e,t){Math.abs(e.y)o?r>a?C.sign(e.y):C.sign(i.y):o>a?C.sign(t.y):C.sign(i.y);var s=0>n;W(e,s),W(t,s),W(i,s)}function q(e,t,i,n){r.add(e,r.multiplyByScalar(r.subtract(t,e,we),e.y/(e.y-t.y),we),i),r.clone(i,n),W(i,!0),W(n,!1)}function j(e,t,i){if(!(e.x>=0||t.x>=0||i.x>=0)){H(e,t,i);var n=e.y<0,r=t.y<0,o=i.y<0,a=0;a+=n?1:0,a+=r?1:0,a+=o?1:0;var s=xe.indices;1===a?(s[1]=3,s[2]=4,s[5]=6,s[7]=6,s[8]=5,n?(q(e,t,Ee,Se),q(e,i,be,Te),s[0]=0,s[3]=1,s[4]=2,s[6]=1):r?(q(t,i,Ee,Se),q(t,e,be,Te),s[0]=1,s[3]=2,s[4]=0,s[6]=2):o&&(q(i,e,Ee,Se),q(i,t,be,Te),s[0]=2,s[3]=0,s[4]=1,s[6]=0)):2===a&&(s[2]=4,s[4]=4,s[5]=3,s[7]=5,s[8]=6,n?r?o||(q(i,e,Ee,Se),q(i,t,be,Te),s[0]=0,s[1]=1,s[3]=0,s[6]=2):(q(t,i,Ee,Se),q(t,e,be,Te),s[0]=2,s[1]=0,s[3]=2,s[6]=1):(q(e,t,Ee,Se),q(e,i,be,Te),s[0]=1,s[1]=2,s[3]=1,s[6]=0));var l=xe.positions;return l[0]=e,l[1]=t,l[2]=i,l.length=3,(1===a||2===a)&&(l[3]=Ee,l[4]=be,l[5]=Se,l[6]=Te,l.length=7),xe}}function Y(e,t){var n=e.attributes;if(0!==n.position.values.length){for(var r in n)if(n.hasOwnProperty(r)&&u(n[r])&&u(n[r].values)){var o=n[r];o.values=s.createTypedArray(o.componentDatatype,o.values); +}var a=p.computeNumberOfVertices(e);return e.indices=v.createTypedArray(a,e.indices),t&&(e.boundingSphere=i.fromVertices(n.position.values)),e}}function X(e){var t=e.attributes,i={};for(var n in t)if(t.hasOwnProperty(n)&&u(t[n])&&u(t[n].values)){var r=t[n];i[n]=new m({componentDatatype:r.componentDatatype,componentsPerAttribute:r.componentsPerAttribute,normalize:r.normalize,values:[]})}return new p({attributes:i,indices:[],primitiveType:e.primitiveType})}function Z(e,t,i){var n=u(e.geometry.boundingSphere);t=Y(t,n),i=Y(i,n),u(i)&&!u(t)?e.geometry=i:!u(i)&&u(t)?e.geometry=t:(e.westHemisphereGeometry=t,e.eastHemisphereGeometry=i,e.geometry=void 0)}function K(e,i,o,a,s,l,c,h,d,p,m){if(u(l)||u(c)||u(h)||u(d)){var f=r.fromArray(s,3*e,Ae),g=r.fromArray(s,3*i,Pe),v=r.fromArray(s,3*o,Me),_=t(a,f,g,v,De);if(u(l)){var y=r.fromArray(l,3*e,Ae),C=r.fromArray(l,3*i,Pe),w=r.fromArray(l,3*o,Me);r.multiplyByScalar(y,_.x,y),r.multiplyByScalar(C,_.y,C),r.multiplyByScalar(w,_.z,w);var E=r.add(y,C,y);r.add(E,w,E),r.normalize(E,E),r.pack(E,p.normal.values,3*m)}if(u(c)){var b=r.fromArray(c,3*e,Ae),S=r.fromArray(c,3*i,Pe),T=r.fromArray(c,3*o,Me);r.multiplyByScalar(b,_.x,b),r.multiplyByScalar(S,_.y,S),r.multiplyByScalar(T,_.z,T);var x=r.add(b,S,b);r.add(x,T,x),r.normalize(x,x),r.pack(x,p.binormal.values,3*m)}if(u(h)){var A=r.fromArray(h,3*e,Ae),P=r.fromArray(h,3*i,Pe),M=r.fromArray(h,3*o,Me);r.multiplyByScalar(A,_.x,A),r.multiplyByScalar(P,_.y,P),r.multiplyByScalar(M,_.z,M);var D=r.add(A,P,A);r.add(D,M,D),r.normalize(D,D),r.pack(D,p.tangent.values,3*m)}if(u(d)){var I=n.fromArray(d,2*e,Ie),R=n.fromArray(d,2*i,Re),O=n.fromArray(d,2*o,Oe);n.multiplyByScalar(I,_.x,I),n.multiplyByScalar(R,_.y,R),n.multiplyByScalar(O,_.z,O);var L=n.add(I,R,I);n.add(L,O,L),n.pack(L,p.st.values,2*m)}}}function J(e,t,i,n,r,o){var a=e.position.values.length/3;if(-1!==r){var s=n[r],l=i[s];return-1===l?(i[s]=a,e.position.values.push(o.x,o.y,o.z),t.push(a),a):(t.push(l),l)}return e.position.values.push(o.x,o.y,o.z),t.push(a),a}function Q(e){var t,i,n,o,a,s=e.geometry,l=s.attributes,c=l.position.values,h=u(l.normal)?l.normal.values:void 0,d=u(l.binormal)?l.binormal.values:void 0,p=u(l.tangent)?l.tangent.values:void 0,m=u(l.st)?l.st.values:void 0,f=s.indices,g=X(s),v=X(s),_=[];_.length=c.length/3;var y=[];for(y.length=c.length/3,a=0;a<_.length;++a)_[a]=-1,y[a]=-1;var C=f.length;for(a=0;C>a;a+=3){var w=f[a],E=f[a+1],b=f[a+2],S=r.fromArray(c,3*w),T=r.fromArray(c,3*E),x=r.fromArray(c,3*b),A=j(S,T,x);if(u(A)&&A.positions.length>3)for(var P=A.positions,M=A.indices,D=M.length,I=0;D>I;++I){var R=M[I],O=P[R];O.y<0?(t=v.attributes,i=v.indices,n=_):(t=g.attributes,i=g.indices,n=y),o=J(t,i,n,f,3>R?a+R:-1,O),K(w,E,b,O,c,h,d,p,m,t,o)}else u(A)&&(S=A.positions[0],T=A.positions[1],x=A.positions[2]),S.y<0?(t=v.attributes,i=v.indices,n=_):(t=g.attributes,i=g.indices,n=y),o=J(t,i,n,f,a,S),K(w,E,b,S,c,h,d,p,m,t,o),o=J(t,i,n,f,a+1,T),K(w,E,b,T,c,h,d,p,m,t,o),o=J(t,i,n,f,a+2,x),K(w,E,b,x,c,h,d,p,m,t,o)}Z(e,v,g)}function $(e){var t,i=e.geometry,n=i.attributes,o=n.position.values,a=i.indices,s=X(i),l=X(i),c=a.length,h=[];h.length=o.length/3;var d=[];for(d.length=o.length/3,t=0;tt;t+=2){var p=a[t],m=a[t+1],f=r.fromArray(o,3*p,Ae),g=r.fromArray(o,3*m,Pe);Math.abs(f.y)s;s+=3){var l=r.unpack(i,s,ze);if(!(l.x>0)){var u=r.unpack(n,s,Ve);(l.y<0&&u.y>0||l.y>0&&u.y<0)&&(s-3>0?(n[s]=i[s-3],n[s+1]=i[s-2],n[s+2]=i[s-1]):r.pack(l,n,s));var c=r.unpack(o,s,Ue);(l.y<0&&c.y>0||l.y>0&&c.y<0)&&(a>s+3?(o[s]=i[s+3],o[s+1]=i[s+4],o[s+2]=i[s+5]):r.pack(l,o,s))}}}function te(e){var t,i,a,s=e.geometry,l=s.attributes,c=l.position.values,h=l.prevPosition.values,d=l.nextPosition.values,p=l.expandAndWidth.values,m=u(l.st)?l.st.values:void 0,f=u(l.color)?l.color.values:void 0,g=X(s),v=X(s),_=!1,w=c.length/3;for(t=0;w>t;t+=4){var E=t,b=t+2,S=r.fromArray(c,3*E,ze),T=r.fromArray(c,3*b,Ve);if(Math.abs(S.y)i;i+=3)h[i]=c[3*t],h[i+1]=c[3*t+1],h[i+2]=c[3*t+2];if(Math.abs(T.y)i;i+=3)d[i]=c[3*(t+2)],d[i+1]=c[3*(t+2)+1],d[i+2]=c[3*(t+2)+2];var x=g.attributes,A=g.indices,P=v.attributes,M=v.indices,D=y.lineSegmentPlane(S,T,Le,Ge);if(u(D)){_=!0;var I=r.multiplyByScalar(r.UNIT_Y,je,We);S.y<0&&(r.negate(I,I),x=v.attributes,A=v.indices,P=g.attributes,M=g.indices);var R=r.add(D,I,He);x.position.values.push(S.x,S.y,S.z,S.x,S.y,S.z),x.position.values.push(R.x,R.y,R.z),x.position.values.push(R.x,R.y,R.z),x.prevPosition.values.push(h[3*E],h[3*E+1],h[3*E+2]),x.prevPosition.values.push(h[3*E+3],h[3*E+4],h[3*E+5]),x.prevPosition.values.push(S.x,S.y,S.z,S.x,S.y,S.z),x.nextPosition.values.push(R.x,R.y,R.z),x.nextPosition.values.push(R.x,R.y,R.z),x.nextPosition.values.push(R.x,R.y,R.z),x.nextPosition.values.push(R.x,R.y,R.z),r.negate(I,I),r.add(D,I,R),P.position.values.push(R.x,R.y,R.z),P.position.values.push(R.x,R.y,R.z),P.position.values.push(T.x,T.y,T.z,T.x,T.y,T.z),P.prevPosition.values.push(R.x,R.y,R.z),P.prevPosition.values.push(R.x,R.y,R.z),P.prevPosition.values.push(R.x,R.y,R.z),P.prevPosition.values.push(R.x,R.y,R.z),P.nextPosition.values.push(T.x,T.y,T.z,T.x,T.y,T.z),P.nextPosition.values.push(d[3*b],d[3*b+1],d[3*b+2]),P.nextPosition.values.push(d[3*b+3],d[3*b+4],d[3*b+5]);var O=n.fromArray(p,2*E,ke),L=Math.abs(O.y);x.expandAndWidth.values.push(-1,L,1,L),x.expandAndWidth.values.push(-1,-L,1,-L),P.expandAndWidth.values.push(-1,L,1,L),P.expandAndWidth.values.push(-1,-L,1,-L);var N=r.magnitudeSquared(r.subtract(D,S,Ue));if(N/=r.magnitudeSquared(r.subtract(T,S,Ue)),u(f)){var F=o.fromArray(f,4*E,qe),k=o.fromArray(f,4*b,qe),B=C.lerp(F.x,k.x,N),z=C.lerp(F.y,k.y,N),V=C.lerp(F.z,k.z,N),U=C.lerp(F.w,k.w,N);for(i=4*E;4*E+8>i;++i)x.color.values.push(f[i]);for(x.color.values.push(B,z,V,U),x.color.values.push(B,z,V,U),P.color.values.push(B,z,V,U),P.color.values.push(B,z,V,U),i=4*b;4*b+8>i;++i)P.color.values.push(f[i])}if(u(m)){var G=n.fromArray(m,2*E,ke),W=n.fromArray(m,2*(t+3),Be),H=C.lerp(G.x,W.x,N);for(i=2*E;2*E+4>i;++i)x.st.values.push(m[i]);for(x.st.values.push(H,G.y),x.st.values.push(H,W.y),P.st.values.push(H,G.y),P.st.values.push(H,W.y),i=2*b;2*b+4>i;++i)P.st.values.push(m[i])}a=x.position.values.length/3-4,A.push(a,a+2,a+1),A.push(a+1,a+2,a+3),a=P.position.values.length/3-4,M.push(a,a+2,a+1),M.push(a+1,a+2,a+3)}else{var q,j;for(S.y<0?(q=v.attributes,j=v.indices):(q=g.attributes,j=g.indices),q.position.values.push(S.x,S.y,S.z),q.position.values.push(S.x,S.y,S.z),q.position.values.push(T.x,T.y,T.z),q.position.values.push(T.x,T.y,T.z),i=3*t;3*t+12>i;++i)q.prevPosition.values.push(h[i]),q.nextPosition.values.push(d[i]);for(i=2*t;2*t+8>i;++i)q.expandAndWidth.values.push(p[i]),u(m)&&q.st.values.push(m[i]);if(u(f))for(i=4*t;4*t+16>i;++i)q.color.values.push(f[i]);a=q.position.values.length/3-4,j.push(a,a+2,a+1),j.push(a+1,a+2,a+3)}}_&&(ee(v),ee(g)),Z(e,v,g)}var ie={};ie.toWireframe=function(e){var t=e.indices;if(u(t)){switch(e.primitiveType){case S.TRIANGLES:e.indices=A(t);break;case S.TRIANGLE_STRIP:e.indices=P(t);break;case S.TRIANGLE_FAN:e.indices=M(t);break;default:throw new c("geometry.primitiveType must be TRIANGLES, TRIANGLE_STRIP, or TRIANGLE_FAN.")}e.primitiveType=S.LINES}return e},ie.createLineSegmentsForVectors=function(e,t,n){t=l(t,"normal"),n=l(n,1e4);for(var r=e.attributes.position.values,o=e.attributes[t].values,a=r.length,c=new Float64Array(2*a),h=0,d=0;a>d;d+=3)c[h++]=r[d],c[h++]=r[d+1],c[h++]=r[d+2],c[h++]=r[d]+o[d]*n,c[h++]=r[d+1]+o[d+1]*n,c[h++]=r[d+2]+o[d+2]*n;var f,g=e.boundingSphere;return u(g)&&(f=new i(g.center,g.radius+n)),new p({attributes:{position:new m({componentDatatype:s.DOUBLE,componentsPerAttribute:3,values:c})},primitiveType:S.LINES,boundingSphere:f})},ie.createAttributeLocations=function(e){var t,i=["position","positionHigh","positionLow","position3DHigh","position3DLow","position2DHigh","position2DLow","pickColor","normal","st","binormal","tangent","compressedAttributes"],n=e.attributes,r={},o=0,a=i.length;for(t=0;a>t;++t){var s=i[t];u(n[s])&&(r[s]=o++)}for(var l in n)n.hasOwnProperty(l)&&!u(r[l])&&(r[l]=o++);return r},ie.reorderForPreVertexCache=function(e){var t=p.computeNumberOfVertices(e),i=e.indices;if(u(i)){for(var n=new Int32Array(t),r=0;t>r;r++)n[r]=-1;for(var o,a=i,l=a.length,c=v.createTypedArray(t,l),h=0,d=0,m=0;l>h;)o=n[a[h]],-1!==o?c[d]=o:(o=a[h],n[o]=m,c[d]=m,++m),++h,++d;e.indices=c;var f=e.attributes;for(var g in f)if(f.hasOwnProperty(g)&&u(f[g])&&u(f[g].values)){for(var _=f[g],y=_.values,C=0,w=_.componentsPerAttribute,E=s.createTypedArray(_.componentDatatype,m*w);t>C;){var b=n[C];if(-1!==b)for(r=0;w>r;r++)E[w*b+r]=y[w*C+r];++C}_.values=E}}return e},ie.reorderForPostVertexCache=function(e,t){var i=e.indices;if(e.primitiveType===S.TRIANGLES&&u(i)){for(var n=i.length,r=0,o=0;n>o;o++)i[o]>r&&(r=i[o]);e.indices=T.tipsify({indices:i,maximumIndex:r,cacheSize:t})}return e},ie.fitToUnsignedShortIndices=function(e){var t=[],i=p.computeNumberOfVertices(e);if(u(e.indices)&&i>=C.SIXTY_FOUR_KILOBYTES){var n,r=[],o=[],a=0,s=D(e.attributes),l=e.indices,c=l.length;e.primitiveType===S.TRIANGLES?n=3:e.primitiveType===S.LINES?n=2:e.primitiveType===S.POINTS&&(n=1);for(var h=0;c>h;h+=n){for(var d=0;n>d;++d){var m=l[h+d],f=r[m];u(f)||(f=a++,r[m]=f,I(s,e.attributes,m)),o.push(f)}a+n>=C.SIXTY_FOUR_KILOBYTES&&(t.push(new p({attributes:s,indices:o,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV})),r=[],o=[],a=0,s=D(e.attributes))}0!==o.length&&t.push(new p({attributes:s,indices:o,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV}))}else t.push(e);return t};var ne=new r,re=new a;ie.projectTo2D=function(e,t,i,n,o){var a=e.attributes[t];o=u(o)?o:new d;for(var l=o.ellipsoid,h=a.values,p=new Float64Array(h.length),f=0,g=0;gc;++c)h.encode(o[c],oe),l[c]=oe.high,u[c]=oe.low;var d=r.componentsPerAttribute;return e.attributes[i]=new m({componentDatatype:s.FLOAT,componentsPerAttribute:d,values:l}),e.attributes[n]=new m({componentDatatype:s.FLOAT,componentsPerAttribute:d,values:u}),delete e.attributes[t],e};var ae=new r,se=new E,le=new w;ie.transformToWorldCoordinates=function(e){var t=e.modelMatrix;if(E.equals(t,E.IDENTITY))return e;var n=e.geometry.attributes;R(t,n.position),R(t,n.prevPosition),R(t,n.nextPosition),(u(n.normal)||u(n.binormal)||u(n.tangent))&&(E.inverse(t,se),E.transpose(se,se),E.getRotation(se,le),O(le,n.normal),O(le,n.binormal),O(le,n.tangent));var r=e.geometry.boundingSphere;return u(r)&&(e.geometry.boundingSphere=i.transform(r,t,r)),e.modelMatrix=E.clone(E.IDENTITY),e};var ue=new r;ie.combineInstances=function(e){for(var t=[],i=[],n=e.length,r=0;n>r;++r){var o=e[r];u(o.geometry)?t.push(o):i.push(o)}var a=[];return t.length>0&&a.push(N(t,"geometry")),i.length>0&&(a.push(N(i,"westHemisphereGeometry")),a.push(N(i,"eastHemisphereGeometry"))),a};var ce=new r,he=new r,de=new r,pe=new r;ie.computeNormal=function(e){for(var t=e.indices,i=e.attributes,n=i.position.values,o=i.position.values.length/3,a=t.length,l=new Array(o),u=new Array(a/3),c=new Array(a),h=0;o>h;h++)l[h]={indexOffset:0,count:0,currentCount:0};var d=0;for(h=0;a>h;h+=3){var p=t[h],f=t[h+1],g=t[h+2],v=3*p,_=3*f,y=3*g;he.x=n[v],he.y=n[v+1],he.z=n[v+2],de.x=n[_],de.y=n[_+1],de.z=n[_+2],pe.x=n[y],pe.y=n[y+1],pe.z=n[y+2],l[p].count++,l[f].count++,l[g].count++,r.subtract(de,he,de),r.subtract(pe,he,pe),u[d]=r.cross(de,pe,new r),d++}var C=0;for(h=0;o>h;h++)l[h].indexOffset+=C,C+=l[h].count;d=0;var w;for(h=0;a>h;h+=3){w=l[t[h]];var E=w.indexOffset+w.currentCount;c[E]=d,w.currentCount++,w=l[t[h+1]],E=w.indexOffset+w.currentCount,c[E]=d,w.currentCount++,w=l[t[h+2]],E=w.indexOffset+w.currentCount,c[E]=d,w.currentCount++,d++}var b=new Float32Array(3*o);for(h=0;o>h;h++){var S=3*h;if(w=l[h],w.count>0){for(r.clone(r.ZERO,ce),d=0;dc;c+=3){var f=t[c],g=t[c+1],v=t[c+2];h=3*f,d=3*g,p=3*v;var _=2*f,y=2*g,C=2*v,w=i[h],E=i[h+1],b=i[h+2],S=o[_],T=o[_+1],x=o[y+1]-T,A=o[C+1]-T,P=1/((o[y]-S)*A-(o[C]-S)*x),M=(A*(i[d]-w)-x*(i[p]-w))*P,D=(A*(i[d+1]-E)-x*(i[p+1]-E))*P,I=(A*(i[d+2]-b)-x*(i[p+2]-b))*P;u[h]+=M,u[h+1]+=D,u[h+2]+=I,u[d]+=M,u[d+1]+=D,u[d+2]+=I,u[p]+=M,u[p+1]+=D,u[p+2]+=I}var R=new Float32Array(3*a),O=new Float32Array(3*a);for(c=0;a>c;c++){h=3*c,d=h+1,p=h+2;var L=r.fromArray(n,h,me),N=r.fromArray(u,h,ge),F=r.dot(L,N);r.multiplyByScalar(L,F,fe),r.normalize(r.subtract(N,fe,N),N),O[h]=N.x,O[d]=N.y,O[p]=N.z,r.normalize(r.cross(L,N,N),N),R[h]=N.x,R[d]=N.y,R[p]=N.z}return e.attributes.tangent=new m({componentDatatype:s.FLOAT,componentsPerAttribute:3,values:O}),e.attributes.binormal=new m({componentDatatype:s.FLOAT,componentsPerAttribute:3,values:R}),e};var ve=new n,_e=new r,ye=new r,Ce=new r;ie.compressVertices=function(t){var i=t.attributes.normal,o=t.attributes.st;if(!u(i)&&!u(o))return t;var a,l,c,h,d=t.attributes.tangent,p=t.attributes.binormal;u(i)&&(a=i.values),u(o)&&(l=o.values),u(d)&&(c=d.values),p&&(h=p.values);var f=u(a)?a.length:l.length,g=u(a)?3:2,v=f/g,_=v,y=u(l)&&u(a)?2:1;y+=u(c)||u(h)?1:0,_*=y;for(var C=new Float32Array(_),w=0,E=0;v>E;++E){u(l)&&(n.fromArray(l,2*E,ve),C[w++]=e.compressTextureCoordinates(ve));var b=3*E;u(a)&&u(c)&&u(h)?(r.fromArray(a,b,_e),r.fromArray(c,b,ye),r.fromArray(h,b,Ce),e.octPack(_e,ye,Ce,ve),C[w++]=ve.x,C[w++]=ve.y):(u(a)&&(r.fromArray(a,b,_e),C[w++]=e.octEncodeFloat(_e)),u(c)&&(r.fromArray(c,b,_e),C[w++]=e.octEncodeFloat(_e)),u(h)&&(r.fromArray(h,b,_e),C[w++]=e.octEncodeFloat(_e)))}return t.attributes.compressedAttributes=new m({componentDatatype:s.FLOAT,componentsPerAttribute:y,values:C}),u(a)&&delete t.attributes.normal,u(l)&&delete t.attributes.st,u(c)&&delete t.attributes.tangent,u(h)&&delete t.attributes.binormal,t};var we=new r,Ee=new r,be=new r,Se=new r,Te=new r,xe={positions:new Array(7),indices:new Array(9)},Ae=new r,Pe=new r,Me=new r,De=new r,Ie=new n,Re=new n,Oe=new n,Le=b.fromPointNormal(r.ZERO,r.UNIT_Y),Ne=new r,Fe=new r,ke=new n,Be=new n,ze=new r,Ve=new r,Ue=new r,Ge=new r,We=new r,He=new r,qe=new o,je=5*C.EPSILON9,Ye=C.EPSILON6;return ie.splitLongitude=function(e){var t=e.geometry,n=t.boundingSphere;if(u(n)){var r=n.center.x-n.radius;if(r>0||i.intersectPlane(n,b.ORIGIN_ZX_PLANE)!==_.INTERSECTING)return e}if(t.geometryType!==g.NONE)switch(t.geometryType){case g.POLYLINES:te(e);break;case g.TRIANGLES:Q(e);break;case g.LINES:$(e)}else G(t),t.primitiveType===S.TRIANGLES?Q(e):t.primitiveType===S.LINES&&$(e);return e},ie}),define("Cesium/Core/EllipseGeometry",["./BoundingSphere","./Cartesian2","./Cartesian3","./Cartographic","./ComponentDatatype","./defaultValue","./defined","./defineProperties","./DeveloperError","./EllipseGeometryLibrary","./Ellipsoid","./GeographicProjection","./Geometry","./GeometryAttribute","./GeometryAttributes","./GeometryInstance","./GeometryPipeline","./IndexDatatype","./Math","./Matrix3","./Matrix4","./PrimitiveType","./Quaternion","./Rectangle","./Transforms","./VertexFormat"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g,v,_,y,C,w,E,b,S,T){"use strict";function x(e,n,o){var a=n.vertexFormat,s=n.center,l=n.semiMajorAxis,c=n.semiMinorAxis,d=n.ellipsoid,f=n.stRotation,g=o?e.length/3*2:e.length/3,v=a.st?new Float32Array(2*g):void 0,_=a.normal?new Float32Array(3*g):void 0,C=a.tangent?new Float32Array(3*g):void 0,w=a.binormal?new Float32Array(3*g):void 0,b=0,S=U,T=G,x=W,A=new h(d),P=A.project(d.cartesianToCartographic(s,H),q),M=d.scaleToGeodeticSurface(s,L);d.geodeticSurfaceNormal(M,M);for(var D=E.fromAxisAngle(M,f,V),I=y.fromQuaternion(D,z),R=t.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,j),O=t.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Y),k=e.length,X=o?k:0,Z=X/3*2,K=0;k>K;K+=3){var J=K+1,Q=K+2,$=i.fromArray(e,K,L);if(a.st){var ee=y.multiplyByVector(I,$,N),te=A.project(d.cartesianToCartographic(ee,H),F);i.subtract(te,P,te),B.x=(te.x+l)/(2*l),B.y=(te.y+c)/(2*c),R.x=Math.min(B.x,R.x),R.y=Math.min(B.y,R.y),O.x=Math.max(B.x,O.x),O.y=Math.max(B.y,O.y),o&&(v[b+Z]=B.x,v[b+1+Z]=B.y),v[b++]=B.x,v[b++]=B.y}S=d.geodeticSurfaceNormal($,S),(a.normal||a.tangent||a.binormal)&&((a.tangent||a.binormal)&&(T=i.normalize(i.cross(i.UNIT_Z,S,T),T),y.multiplyByVector(I,T,T)),a.normal&&(_[K]=S.x,_[J]=S.y,_[Q]=S.z,o&&(_[K+X]=-S.x,_[J+X]=-S.y,_[Q+X]=-S.z)),a.tangent&&(C[K]=T.x,C[J]=T.y,C[Q]=T.z,o&&(C[K+X]=-T.x,C[J+X]=-T.y,C[Q+X]=-T.z)),a.binormal&&(x=i.normalize(i.cross(S,T,x),x),w[K]=x.x,w[J]=x.y,w[Q]=x.z,o&&(w[K+X]=x.x,w[J+X]=x.y,w[Q+X]=x.z)))}if(a.st){k=v.length;for(var ie=0;k>ie;ie+=2)v[ie]=(v[ie]-R.x)/(O.x-R.x),v[ie+1]=(v[ie+1]-R.y)/(O.y-R.y)}var ne=new m;if(a.position){var re=u.raisePositionsToHeight(e,n,o);ne.position=new p({componentDatatype:r.DOUBLE,componentsPerAttribute:3,values:re})}return a.st&&(ne.st=new p({componentDatatype:r.FLOAT,componentsPerAttribute:2,values:v})),a.normal&&(ne.normal=new p({componentDatatype:r.FLOAT,componentsPerAttribute:3,values:_})),a.tangent&&(ne.tangent=new p({componentDatatype:r.FLOAT,componentsPerAttribute:3,values:C})),a.binormal&&(ne.binormal=new p({componentDatatype:r.FLOAT,componentsPerAttribute:3,values:w})),ne}function A(e){var t,i,n,r,o,a=new Array(12*(e*(e+1))-6),s=0;for(t=0,n=1,r=0;3>r;r++)a[s++]=n++,a[s++]=t,a[s++]=n;for(r=2;e+1>r;++r){for(n=r*(r+1)-1,t=(r-1)*r-1,a[s++]=n++,a[s++]=t,a[s++]=n,i=2*r,o=0;i-1>o;++o)a[s++]=n,a[s++]=t++,a[s++]=t,a[s++]=n++,a[s++]=t,a[s++]=n;a[s++]=n++,a[s++]=t,a[s++]=n}for(i=2*e,++n,++t,r=0;i-1>r;++r)a[s++]=n,a[s++]=t++,a[s++]=t,a[s++]=n++,a[s++]=t,a[s++]=n;for(a[s++]=n,a[s++]=t++,a[s++]=t,a[s++]=n++,a[s++]=t++,a[s++]=t,++t,r=e-1;r>1;--r){for(a[s++]=t++,a[s++]=t,a[s++]=n,i=2*r,o=0;i-1>o;++o)a[s++]=n,a[s++]=t++,a[s++]=t,a[s++]=n++,a[s++]=t,a[s++]=n;a[s++]=t++,a[s++]=t++,a[s++]=n++}for(r=0;3>r;r++)a[s++]=t++,a[s++]=t,a[s++]=n;return a}function P(t){var n=t.center;X=i.multiplyByScalar(t.ellipsoid.geodeticSurfaceNormal(n,X),t.height,X),X=i.add(n,X,X);var r=new e(X,t.semiMajorAxis),o=u.computeEllipsePositions(t,!0,!1),a=o.positions,s=o.numPts,l=x(a,t,!1),c=A(s);return c=v.createTypedArray(a.length/3,c),{boundingSphere:r,attributes:l,indices:c}}function M(e,n){var o=n.vertexFormat,a=n.center,s=n.semiMajorAxis,l=n.semiMinorAxis,u=n.ellipsoid,c=n.height,d=n.extrudedHeight,f=n.stRotation,g=e.length/3*2,v=new Float64Array(3*g),_=o.st?new Float32Array(2*g):void 0,C=o.normal?new Float32Array(3*g):void 0,w=o.tangent?new Float32Array(3*g):void 0,b=o.binormal?new Float32Array(3*g):void 0,S=0,T=U,x=G,A=W,P=new h(u),M=P.project(u.cartesianToCartographic(a,H),q),D=u.scaleToGeodeticSurface(a,L);u.geodeticSurfaceNormal(D,D);for(var I=E.fromAxisAngle(D,f,V),R=y.fromQuaternion(I,z),O=t.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,j),X=t.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Y),Z=e.length,K=Z/3*2,J=0;Z>J;J+=3){var Q,$=J+1,ee=J+2,te=i.fromArray(e,J,L);if(o.st){var ie=y.multiplyByVector(R,te,N),ne=P.project(u.cartesianToCartographic(ie,H),F);i.subtract(ne,M,ne),B.x=(ne.x+s)/(2*s),B.y=(ne.y+l)/(2*l),O.x=Math.min(B.x,O.x),O.y=Math.min(B.y,O.y),X.x=Math.max(B.x,X.x),X.y=Math.max(B.y,X.y),_[S+K]=B.x,_[S+1+K]=B.y,_[S++]=B.x,_[S++]=B.y}te=u.scaleToGeodeticSurface(te,te),Q=i.clone(te,N),T=u.geodeticSurfaceNormal(te,T);var re=i.multiplyByScalar(T,c,k);if(te=i.add(te,re,te),re=i.multiplyByScalar(T,d,re),Q=i.add(Q,re,Q),o.position&&(v[J+Z]=Q.x,v[$+Z]=Q.y,v[ee+Z]=Q.z,v[J]=te.x,v[$]=te.y,v[ee]=te.z),o.normal||o.tangent||o.binormal){A=i.clone(T,A);var oe=i.fromArray(e,(J+3)%Z,k);i.subtract(oe,te,oe);var ae=i.subtract(Q,te,F);T=i.normalize(i.cross(ae,oe,T),T),o.normal&&(C[J]=T.x,C[$]=T.y,C[ee]=T.z,C[J+Z]=T.x,C[$+Z]=T.y,C[ee+Z]=T.z),o.tangent&&(x=i.normalize(i.cross(A,T,x),x),w[J]=x.x,w[$]=x.y,w[ee]=x.z,w[J+Z]=x.x,w[J+1+Z]=x.y,w[J+2+Z]=x.z),o.binormal&&(b[J]=A.x,b[$]=A.y,b[ee]=A.z,b[J+Z]=A.x,b[$+Z]=A.y,b[ee+Z]=A.z)}}if(o.st){Z=_.length;for(var se=0;Z>se;se+=2)_[se]=(_[se]-O.x)/(X.x-O.x),_[se+1]=(_[se+1]-O.y)/(X.y-O.y)}var le=new m;return o.position&&(le.position=new p({componentDatatype:r.DOUBLE,componentsPerAttribute:3,values:v})),o.st&&(le.st=new p({componentDatatype:r.FLOAT,componentsPerAttribute:2,values:_})),o.normal&&(le.normal=new p({componentDatatype:r.FLOAT,componentsPerAttribute:3,values:C})),o.tangent&&(le.tangent=new p({componentDatatype:r.FLOAT,componentsPerAttribute:3,values:w})),o.binormal&&(le.binormal=new p({componentDatatype:r.FLOAT,componentsPerAttribute:3,values:b})),le}function D(e){for(var t=e.length/3,i=v.createTypedArray(t,6*t),n=0,r=0;t>r;r++){var o=r,a=r+t,s=(o+1)%t,l=s+t;i[n++]=o,i[n++]=a,i[n++]=s,i[n++]=s,i[n++]=a,i[n++]=l}return i}function I(t){var n=t.center,r=t.ellipsoid,o=t.semiMajorAxis,a=i.multiplyByScalar(r.geodeticSurfaceNormal(n,L),t.height,L);Z.center=i.add(n,a,Z.center),Z.radius=o,a=i.multiplyByScalar(r.geodeticSurfaceNormal(n,a),t.extrudedHeight,a),K.center=i.add(n,a,K.center),K.radius=o;var s=u.computeEllipsePositions(t,!0,!0),l=s.positions,c=s.numPts,h=s.outerPositions,p=e.union(Z,K),m=x(l,t,!0),_=A(c),y=_.length;_.length=2*y;for(var C=l.length/3,E=0;y>E;E+=3)_[E+y]=_[E+2]+C,_[E+1+y]=_[E+1]+C,_[E+2+y]=_[E]+C;var b=v.createTypedArray(2*C/3,_),S=new d({attributes:m,indices:b,primitiveType:w.TRIANGLES}),T=M(h,t);_=D(h);var P=v.createTypedArray(2*h.length/3,_),I=new d({attributes:T,indices:P,primitiveType:w.TRIANGLES}),R=g.combineInstances([new f({geometry:S}),new f({geometry:I})]);return{boundingSphere:p,attributes:R[0].attributes,indices:R[0].indices}}function R(e,t,n,r,o){S.eastNorthUpToFixedFrame(e,t,J),C.inverseTransformation(J,Q);for(var a=0;4>a;++a)i.clone(i.ZERO,ee[a]);for(ee[0].x+=n,ee[1].x-=n,ee[2].y+=r,ee[3].y-=r,y.fromRotationZ(o,$),a=0;4>a;++a)y.multiplyByVector($,ee[a],ee[a]),C.multiplyByPoint(J,ee[a],ee[a]),t.cartesianToCartographic(ee[a],te[a]);return b.fromCartographicArray(te)}function O(e){e=o(e,o.EMPTY_OBJECT);var t=e.center,n=o(e.ellipsoid,c.WGS84),r=e.semiMajorAxis,s=e.semiMinorAxis,l=o(e.granularity,_.RADIANS_PER_DEGREE),u=o(e.height,0),h=e.extrudedHeight,d=a(h)&&Math.abs(u-h)>1,p=o(e.vertexFormat,T.DEFAULT);this._center=i.clone(t),this._semiMajorAxis=r,this._semiMinorAxis=s,this._ellipsoid=c.clone(n),this._rotation=o(e.rotation,0),this._stRotation=o(e.stRotation,0),this._height=u,this._granularity=l,this._vertexFormat=T.clone(p),this._extrudedHeight=o(h,u),this._extrude=d,this._workerName="createEllipseGeometry",this._rectangle=R(this._center,this._ellipsoid,r,s,this._rotation)}var L=new i,N=new i,F=new i,k=new i,B=new t,z=new y,V=new E,U=new i,G=new i,W=new i,H=new n,q=new i,j=new t,Y=new t,X=new i,Z=new e,K=new e,J=new C,Q=new C,$=new y,ee=[new i,new i,new i,new i],te=[new n,new n,new n,new n];O.packedLength=i.packedLength+c.packedLength+T.packedLength+b.packedLength+8,O.pack=function(e,t,n){n=o(n,0),i.pack(e._center,t,n),n+=i.packedLength,c.pack(e._ellipsoid,t,n),n+=c.packedLength,T.pack(e._vertexFormat,t,n),n+=T.packedLength,b.pack(e._rectangle,t,n),n+=b.packedLength,t[n++]=e._semiMajorAxis,t[n++]=e._semiMinorAxis,t[n++]=e._rotation,t[n++]=e._stRotation,t[n++]=e._height,t[n++]=e._granularity,t[n++]=e._extrudedHeight,t[n]=e._extrude?1:0};var ie=new i,ne=new c,re=new T,oe=new b,ae={center:ie,ellipsoid:ne,vertexFormat:re,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,stRotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0};return O.unpack=function(e,t,n){t=o(t,0);var r=i.unpack(e,t,ie);t+=i.packedLength;var s=c.unpack(e,t,ne);t+=c.packedLength;var l=T.unpack(e,t,re);t+=T.packedLength;var u=b.unpack(e,t,oe);t+=b.packedLength;var h=e[t++],d=e[t++],p=e[t++],m=e[t++],f=e[t++],g=e[t++],v=e[t++],_=1===e[t];return a(n)?(n._center=i.clone(r,n._center),n._ellipsoid=c.clone(s,n._ellipsoid),n._vertexFormat=T.clone(l,n._vertexFormat),n._semiMajorAxis=h,n._semiMinorAxis=d,n._rotation=p,n._stRotation=m,n._height=f,n._granularity=g,n._extrudedHeight=v,n._extrude=_,n._rectangle=b.clone(u),n):(ae.height=f,ae.extrudedHeight=v,ae.granularity=g,ae.stRotation=m,ae.rotation=p,ae.semiMajorAxis=h,ae.semiMinorAxis=d,new O(ae))},O.createGeometry=function(e){if(!(e._semiMajorAxis<=0||e._semiMinorAxis<=0)){e._center=e._ellipsoid.scaleToGeodeticSurface(e._center,e._center);var t,i={center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:e._ellipsoid,rotation:e._rotation,height:e._height,extrudedHeight:e._extrudedHeight,granularity:e._granularity,vertexFormat:e._vertexFormat,stRotation:e._stRotation};return e._extrude?(i.extrudedHeight=Math.min(e._extrudedHeight,e._height),i.height=Math.max(e._extrudedHeight,e._height),t=I(i)):t=P(i),new d({attributes:t.attributes,indices:t.indices,primitiveType:w.TRIANGLES,boundingSphere:t.boundingSphere})}},O.createShadowVolume=function(e,t,i){var n=e._granularity,r=e._ellipsoid,o=t(n,r),a=i(n,r);return new O({center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:r,rotation:e._rotation,stRotation:e._stRotation,granularity:n,extrudedHeight:o,height:a,vertexFormat:T.POSITION_ONLY})},s(O.prototype,{rectangle:{get:function(){return this._rectangle}}}),O}),define("Cesium/Core/CircleGeometry",["./Cartesian3","./defaultValue","./defined","./defineProperties","./DeveloperError","./EllipseGeometry","./Ellipsoid","./Math","./VertexFormat"],function(e,t,i,n,r,o,a,s,l){"use strict";function u(e){e=t(e,t.EMPTY_OBJECT);var i=e.radius,n={center:e.center,semiMajorAxis:i,semiMinorAxis:i,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,vertexFormat:e.vertexFormat,stRotation:e.stRotation};this._ellipseGeometry=new o(n),this._workerName="createCircleGeometry"}u.packedLength=o.packedLength,u.pack=function(e,t,i){o.pack(e._ellipseGeometry,t,i)};var c=new o({center:new e,semiMajorAxis:1,semiMinorAxis:1}),h={center:new e,radius:void 0,ellipsoid:a.clone(a.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,vertexFormat:new l,stRotation:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0};return u.unpack=function(t,n,r){var s=o.unpack(t,n,c);return h.center=e.clone(s._center,h.center),h.ellipsoid=a.clone(s._ellipsoid,h.ellipsoid),h.height=s._height,h.extrudedHeight=s._extrudedHeight,h.granularity=s._granularity,h.vertexFormat=l.clone(s._vertexFormat,h.vertexFormat),h.stRotation=s._stRotation,i(r)?(h.semiMajorAxis=s._semiMajorAxis,h.semiMinorAxis=s._semiMinorAxis,r._ellipseGeometry=new o(h),r):(h.radius=s._semiMajorAxis,new u(h))},u.createGeometry=function(e){return o.createGeometry(e._ellipseGeometry)},u.createShadowVolume=function(e,t,i){var n=e._ellipseGeometry._granularity,r=e._ellipseGeometry._ellipsoid,o=t(n,r),a=i(n,r);return new u({center:e._ellipseGeometry._center,radius:e._ellipseGeometry._semiMajorAxis,ellipsoid:r,stRotation:e._ellipseGeometry._stRotation,granularity:n,extrudedHeight:o,height:a,vertexFormat:l.POSITION_ONLY})},n(u.prototype,{rectangle:{get:function(){return this._ellipseGeometry.rectangle}}}),u}),define("Cesium/Core/EllipseOutlineGeometry",["./BoundingSphere","./Cartesian3","./ComponentDatatype","./defaultValue","./defined","./DeveloperError","./EllipseGeometryLibrary","./Ellipsoid","./Geometry","./GeometryAttribute","./GeometryAttributes","./IndexDatatype","./Math","./PrimitiveType"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p){"use strict";function m(n){var r=n.center;_=t.multiplyByScalar(n.ellipsoid.geodeticSurfaceNormal(r,_),n.height,_),_=t.add(r,_,_);for(var o=new e(_,n.semiMajorAxis),s=a.computeEllipsePositions(n,!1,!0).outerPositions,l=new c({position:new u({componentDatatype:i.DOUBLE,componentsPerAttribute:3,values:a.raisePositionsToHeight(s,n,!1)})}),d=s.length/3,p=h.createTypedArray(d,2*d),m=0,f=0;d>f;++f)p[m++]=f,p[m++]=(f+1)%d;return{boundingSphere:o,attributes:l,indices:p}}function f(r){var o=r.center,s=r.ellipsoid,l=r.semiMajorAxis,p=t.multiplyByScalar(s.geodeticSurfaceNormal(o,v),r.height,v);y.center=t.add(o,p,y.center),y.radius=l,p=t.multiplyByScalar(s.geodeticSurfaceNormal(o,p),r.extrudedHeight,p),C.center=t.add(o,p,C.center),C.radius=l;var m=a.computeEllipsePositions(r,!1,!0).outerPositions,f=new c({position:new u({componentDatatype:i.DOUBLE,componentsPerAttribute:3,values:a.raisePositionsToHeight(m,r,!0)})});m=f.position.values;var g=e.union(y,C),_=m.length/3,w=n(r.numberOfVerticalLines,16);w=d.clamp(w,0,_/2);var E=h.createTypedArray(_,2*_+2*w);_/=2;var b,S=0;for(b=0;_>b;++b)E[S++]=b,E[S++]=(b+1)%_,E[S++]=b+_,E[S++]=(b+1)%_+_;var T;if(w>0){var x=Math.min(w,_);T=Math.round(_/x);var A=Math.min(T*w,_);for(b=0;A>b;b+=T)E[S++]=b,E[S++]=b+_}return{boundingSphere:g,attributes:f,indices:E}}function g(e){e=n(e,n.EMPTY_OBJECT);var i=e.center,o=n(e.ellipsoid,s.WGS84),a=e.semiMajorAxis,l=e.semiMinorAxis,u=n(e.granularity,d.RADIANS_PER_DEGREE),c=n(e.height,0),h=e.extrudedHeight,p=r(h)&&Math.abs(c-h)>1;this._center=t.clone(i),this._semiMajorAxis=a,this._semiMinorAxis=l,this._ellipsoid=s.clone(o),this._rotation=n(e.rotation,0),this._height=c,this._granularity=u,this._extrudedHeight=h,this._extrude=p,this._numberOfVerticalLines=Math.max(n(e.numberOfVerticalLines,16),0),this._workerName="createEllipseOutlineGeometry"}var v=new t,_=new t,y=new e,C=new e;g.packedLength=t.packedLength+s.packedLength+9,g.pack=function(e,i,o){o=n(o,0),t.pack(e._center,i,o),o+=t.packedLength,s.pack(e._ellipsoid,i,o),o+=s.packedLength,i[o++]=e._semiMajorAxis,i[o++]=e._semiMinorAxis,i[o++]=e._rotation,i[o++]=e._height,i[o++]=e._granularity,i[o++]=r(e._extrudedHeight)?1:0,i[o++]=n(e._extrudedHeight,0),i[o++]=e._extrude?1:0,i[o]=e._numberOfVerticalLines};var w=new t,E=new s,b={center:w,ellipsoid:E,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,numberOfVerticalLines:void 0};return g.unpack=function(e,i,o){i=n(i,0);var a=t.unpack(e,i,w);i+=t.packedLength;var l=s.unpack(e,i,E);i+=s.packedLength;var u=e[i++],c=e[i++],h=e[i++],d=e[i++],p=e[i++],m=e[i++],f=e[i++],v=1===e[i++],_=e[i];return r(o)?(o._center=t.clone(a,o._center),o._ellipsoid=s.clone(l,o._ellipsoid),o._semiMajorAxis=u,o._semiMinorAxis=c,o._rotation=h,o._height=d,o._granularity=p,o._extrudedHeight=m?f:void 0,o._extrude=v,o._numberOfVerticalLines=_,o):(b.height=d,b.extrudedHeight=m?f:void 0,b.granularity=p,b.rotation=h,b.semiMajorAxis=u,b.semiMinorAxis=c,b.numberOfVerticalLines=_,new g(b))},g.createGeometry=function(e){if(!(e._semiMajorAxis<=0||e._semiMinorAxis<=0)){ +e._center=e._ellipsoid.scaleToGeodeticSurface(e._center,e._center);var t,i={center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:e._ellipsoid,rotation:e._rotation,height:e._height,extrudedHeight:e._extrudedHeight,granularity:e._granularity,numberOfVerticalLines:e._numberOfVerticalLines};return e._extrude?(i.extrudedHeight=Math.min(e._extrudedHeight,e._height),i.height=Math.max(e._extrudedHeight,e._height),t=f(i)):t=m(i),new l({attributes:t.attributes,indices:t.indices,primitiveType:p.LINES,boundingSphere:t.boundingSphere})}},g}),define("Cesium/Core/CircleOutlineGeometry",["./Cartesian3","./defaultValue","./defined","./DeveloperError","./EllipseOutlineGeometry","./Ellipsoid"],function(e,t,i,n,r,o){"use strict";function a(e){e=t(e,t.EMPTY_OBJECT);var i=e.radius,n={center:e.center,semiMajorAxis:i,semiMinorAxis:i,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,numberOfVerticalLines:e.numberOfVerticalLines};this._ellipseGeometry=new r(n),this._workerName="createCircleOutlineGeometry"}a.packedLength=r.packedLength,a.pack=function(e,t,i){r.pack(e._ellipseGeometry,t,i)};var s=new r({center:new e,semiMajorAxis:1,semiMinorAxis:1}),l={center:new e,radius:void 0,ellipsoid:o.clone(o.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,numberOfVerticalLines:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0};return a.unpack=function(t,n,u){var c=r.unpack(t,n,s);return l.center=e.clone(c._center,l.center),l.ellipsoid=o.clone(c._ellipsoid,l.ellipsoid),l.height=c._height,l.extrudedHeight=c._extrudedHeight,l.granularity=c._granularity,l.numberOfVerticalLines=c._numberOfVerticalLines,i(u)?(l.semiMajorAxis=c._semiMajorAxis,l.semiMinorAxis=c._semiMinorAxis,u._ellipseGeometry=new r(l),u):(l.radius=c._semiMajorAxis,new a(l))},a.createGeometry=function(e){return r.createGeometry(e._ellipseGeometry)},a}),define("Cesium/Core/ClockRange",["./freezeObject"],function(e){"use strict";var t={UNBOUNDED:0,CLAMPED:1,LOOP_STOP:2};return e(t)}),define("Cesium/Core/ClockStep",["./freezeObject"],function(e){"use strict";var t={TICK_DEPENDENT:0,SYSTEM_CLOCK_MULTIPLIER:1,SYSTEM_CLOCK:2};return e(t)}),define("Cesium/Core/getTimestamp",["./defined"],function(e){"use strict";var t;return t="undefined"!=typeof performance&&e(performance.now)?function(){return performance.now()}:function(){return Date.now()}}),define("Cesium/Core/Clock",["./ClockRange","./ClockStep","./defaultValue","./defined","./defineProperties","./DeveloperError","./Event","./getTimestamp","./JulianDate"],function(e,t,i,n,r,o,a,s,l){"use strict";function u(r){r=i(r,i.EMPTY_OBJECT);var o=r.currentTime,u=r.startTime,c=r.stopTime;o=n(o)?l.clone(o):n(u)?l.clone(u):n(c)?l.addDays(c,-1,new l):l.now(),u=n(u)?l.clone(u):l.clone(o),c=n(c)?l.clone(c):l.addDays(u,1,new l),this.startTime=u,this.stopTime=c,this.clockRange=i(r.clockRange,e.UNBOUNDED),this.canAnimate=i(r.canAnimate,!0),this.onTick=new a,this._currentTime=void 0,this._multiplier=void 0,this._clockStep=void 0,this._shouldAnimate=void 0,this._lastSystemTime=s(),this.currentTime=o,this.multiplier=i(r.multiplier,1),this.clockStep=i(r.clockStep,t.SYSTEM_CLOCK_MULTIPLIER),this.shouldAnimate=i(r.shouldAnimate,!0)}return r(u.prototype,{currentTime:{get:function(){return this._currentTime},set:function(e){l.equals(this._currentTime,e)||(this._clockStep===t.SYSTEM_CLOCK&&(this._clockStep=t.SYSTEM_CLOCK_MULTIPLIER),this._currentTime=e)}},multiplier:{get:function(){return this._multiplier},set:function(e){this._multiplier!==e&&(this._clockStep===t.SYSTEM_CLOCK&&(this._clockStep=t.SYSTEM_CLOCK_MULTIPLIER),this._multiplier=e)}},clockStep:{get:function(){return this._clockStep},set:function(e){e===t.SYSTEM_CLOCK&&(this._multiplier=1,this._shouldAnimate=!0,this._currentTime=l.now()),this._clockStep=e}},shouldAnimate:{get:function(){return this._shouldAnimate},set:function(e){this._shouldAnimate!==e&&(this._clockStep===t.SYSTEM_CLOCK&&(this._clockStep=t.SYSTEM_CLOCK_MULTIPLIER),this._shouldAnimate=e)}}}),u.prototype.tick=function(){var i=s(),n=l.clone(this._currentTime);if(this.canAnimate&&this._shouldAnimate){var r=this._clockStep;if(r===t.SYSTEM_CLOCK)n=l.now(n);else{var o=this._multiplier;if(r===t.TICK_DEPENDENT)n=l.addSeconds(n,o,n);else{var a=i-this._lastSystemTime;n=l.addSeconds(n,o*(a/1e3),n)}var u=this.clockRange,c=this.startTime,h=this.stopTime;if(u===e.CLAMPED)l.lessThan(n,c)?n=l.clone(c,n):l.greaterThan(n,h)&&(n=l.clone(h,n));else if(u===e.LOOP_STOP)for(l.lessThan(n,c)&&(n=l.clone(c,n));l.greaterThan(n,h);)n=l.addSeconds(c,l.secondsDifference(n,h),n)}}return this._currentTime=n,this._lastSystemTime=i,this.onTick.raiseEvent(this),n},u}),define("Cesium/Core/Color",["./defaultValue","./defined","./DeveloperError","./FeatureDetection","./freezeObject","./Math"],function(e,t,i,n,r,o){"use strict";function a(e,t,i){return 0>i&&(i+=1),i>1&&(i-=1),1>6*i?e+6*(t-e)*i:1>2*i?t:2>3*i?e+(t-e)*(2/3-i)*6:e}function s(t,i,n,r){this.red=e(t,1),this.green=e(i,1),this.blue=e(n,1),this.alpha=e(r,1)}s.fromCartesian4=function(e,i){return t(i)?(i.red=e.x,i.green=e.y,i.blue=e.z,i.alpha=e.w,i):new s(e.x,e.y,e.z,e.w)},s.fromBytes=function(i,n,r,o,a){return i=s.byteToFloat(e(i,255)),n=s.byteToFloat(e(n,255)),r=s.byteToFloat(e(r,255)),o=s.byteToFloat(e(o,255)),t(a)?(a.red=i,a.green=n,a.blue=r,a.alpha=o,a):new s(i,n,r,o)},s.fromAlpha=function(e,i,n){return t(n)?(n.red=e.red,n.green=e.green,n.blue=e.blue,n.alpha=i,n):new s(e.red,e.green,e.blue,i)};var l,u,c;n.supportsTypedArrays()&&(l=new ArrayBuffer(4),u=new Uint32Array(l),c=new Uint8Array(l)),s.fromRgba=function(e,t){return u[0]=e,s.fromBytes(c[0],c[1],c[2],c[3],t)},s.fromHsl=function(i,n,r,o,l){i=e(i,0)%1,n=e(n,0),r=e(r,0),o=e(o,1);var u=r,c=r,h=r;if(0!==n){var d;d=.5>r?r*(1+n):r+n-r*n;var p=2*r-d;u=a(p,d,i+1/3),c=a(p,d,i),h=a(p,d,i-1/3)}return t(l)?(l.red=u,l.green=c,l.blue=h,l.alpha=o,l):new s(u,c,h,o)},s.fromRandom=function(i,n){i=e(i,e.EMPTY_OBJECT);var r=i.red;if(!t(r)){var a=e(i.minimumRed,0),l=e(i.maximumRed,1);r=a+o.nextRandomNumber()*(l-a)}var u=i.green;if(!t(u)){var c=e(i.minimumGreen,0),h=e(i.maximumGreen,1);u=c+o.nextRandomNumber()*(h-c)}var d=i.blue;if(!t(d)){var p=e(i.minimumBlue,0),m=e(i.maximumBlue,1);d=p+o.nextRandomNumber()*(m-p)}var f=i.alpha;if(!t(f)){var g=e(i.minimumAlpha,0),v=e(i.maximumAlpha,1);f=g+o.nextRandomNumber()*(v-g)}return t(n)?(n.red=r,n.green=u,n.blue=d,n.alpha=f,n):new s(r,u,d,f)};var h=/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i,d=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i,p=/^rgba?\(\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)(?:\s*,\s*([0-9.]+))?\s*\)$/i,m=/^hsla?\(\s*([0-9.]+)\s*,\s*([0-9.]+%)\s*,\s*([0-9.]+%)(?:\s*,\s*([0-9.]+))?\s*\)$/i;return s.fromCssColorString=function(i,n){t(n)||(n=new s);var r=s[i.toUpperCase()];if(t(r))return s.clone(r,n),n;var o=h.exec(i);return null!==o?(n.red=parseInt(o[1],16)/15,n.green=parseInt(o[2],16)/15,n.blue=parseInt(o[3],16)/15,n.alpha=1,n):(o=d.exec(i),null!==o?(n.red=parseInt(o[1],16)/255,n.green=parseInt(o[2],16)/255,n.blue=parseInt(o[3],16)/255,n.alpha=1,n):(o=p.exec(i),null!==o?(n.red=parseFloat(o[1])/("%"===o[1].substr(-1)?100:255),n.green=parseFloat(o[2])/("%"===o[2].substr(-1)?100:255),n.blue=parseFloat(o[3])/("%"===o[3].substr(-1)?100:255),n.alpha=parseFloat(e(o[4],"1.0")),n):(o=m.exec(i),null!==o?s.fromHsl(parseFloat(o[1])/360,parseFloat(o[2])/100,parseFloat(o[3])/100,parseFloat(e(o[4],"1.0")),n):n=void 0)))},s.packedLength=4,s.pack=function(t,i,n){n=e(n,0),i[n++]=t.red,i[n++]=t.green,i[n++]=t.blue,i[n]=t.alpha},s.unpack=function(i,n,r){return n=e(n,0),t(r)||(r=new s),r.red=i[n++],r.green=i[n++],r.blue=i[n++],r.alpha=i[n],r},s.byteToFloat=function(e){return e/255},s.floatToByte=function(e){return 1===e?255:256*e|0},s.clone=function(e,i){return t(e)?t(i)?(i.red=e.red,i.green=e.green,i.blue=e.blue,i.alpha=e.alpha,i):new s(e.red,e.green,e.blue,e.alpha):void 0},s.equals=function(e,i){return e===i||t(e)&&t(i)&&e.red===i.red&&e.green===i.green&&e.blue===i.blue&&e.alpha===i.alpha},s.equalsArray=function(e,t,i){return e.red===t[i]&&e.green===t[i+1]&&e.blue===t[i+2]&&e.alpha===t[i+3]},s.prototype.clone=function(e){return s.clone(this,e)},s.prototype.equals=function(e){return s.equals(this,e)},s.prototype.equalsEpsilon=function(e,i){return this===e||t(e)&&Math.abs(this.red-e.red)<=i&&Math.abs(this.green-e.green)<=i&&Math.abs(this.blue-e.blue)<=i&&Math.abs(this.alpha-e.alpha)<=i},s.prototype.toString=function(){return"("+this.red+", "+this.green+", "+this.blue+", "+this.alpha+")"},s.prototype.toCssColorString=function(){var e=s.floatToByte(this.red),t=s.floatToByte(this.green),i=s.floatToByte(this.blue);return 1===this.alpha?"rgb("+e+","+t+","+i+")":"rgba("+e+","+t+","+i+","+this.alpha+")"},s.prototype.toBytes=function(e){var i=s.floatToByte(this.red),n=s.floatToByte(this.green),r=s.floatToByte(this.blue),o=s.floatToByte(this.alpha);return t(e)?(e[0]=i,e[1]=n,e[2]=r,e[3]=o,e):[i,n,r,o]},s.prototype.toRgba=function(){return c[0]=s.floatToByte(this.red),c[1]=s.floatToByte(this.green),c[2]=s.floatToByte(this.blue),c[3]=s.floatToByte(this.alpha),u[0]},s.prototype.brighten=function(e,t){return e=1-e,t.red=1-(1-this.red)*e,t.green=1-(1-this.green)*e,t.blue=1-(1-this.blue)*e,t.alpha=this.alpha,t},s.prototype.darken=function(e,t){return e=1-e,t.red=this.red*e,t.green=this.green*e,t.blue=this.blue*e,t.alpha=this.alpha,t},s.prototype.withAlpha=function(e,t){return s.fromAlpha(this,e,t)},s.add=function(e,t,i){return i.red=e.red+t.red,i.green=e.green+t.green,i.blue=e.blue+t.blue,i.alpha=e.alpha+t.alpha,i},s.subtract=function(e,t,i){return i.red=e.red-t.red,i.green=e.green-t.green,i.blue=e.blue-t.blue,i.alpha=e.alpha-t.alpha,i},s.multiply=function(e,t,i){return i.red=e.red*t.red,i.green=e.green*t.green,i.blue=e.blue*t.blue,i.alpha=e.alpha*t.alpha,i},s.divide=function(e,t,i){return i.red=e.red/t.red,i.green=e.green/t.green,i.blue=e.blue/t.blue,i.alpha=e.alpha/t.alpha,i},s.mod=function(e,t,i){return i.red=e.red%t.red,i.green=e.green%t.green,i.blue=e.blue%t.blue,i.alpha=e.alpha%t.alpha,i},s.multiplyByScalar=function(e,t,i){return i.red=e.red*t,i.green=e.green*t,i.blue=e.blue*t,i.alpha=e.alpha*t,i},s.divideByScalar=function(e,t,i){return i.red=e.red/t,i.green=e.green/t,i.blue=e.blue/t,i.alpha=e.alpha/t,i},s.ALICEBLUE=r(s.fromCssColorString("#F0F8FF")),s.ANTIQUEWHITE=r(s.fromCssColorString("#FAEBD7")),s.AQUA=r(s.fromCssColorString("#00FFFF")),s.AQUAMARINE=r(s.fromCssColorString("#7FFFD4")),s.AZURE=r(s.fromCssColorString("#F0FFFF")),s.BEIGE=r(s.fromCssColorString("#F5F5DC")),s.BISQUE=r(s.fromCssColorString("#FFE4C4")),s.BLACK=r(s.fromCssColorString("#000000")),s.BLANCHEDALMOND=r(s.fromCssColorString("#FFEBCD")),s.BLUE=r(s.fromCssColorString("#0000FF")),s.BLUEVIOLET=r(s.fromCssColorString("#8A2BE2")),s.BROWN=r(s.fromCssColorString("#A52A2A")),s.BURLYWOOD=r(s.fromCssColorString("#DEB887")),s.CADETBLUE=r(s.fromCssColorString("#5F9EA0")),s.CHARTREUSE=r(s.fromCssColorString("#7FFF00")),s.CHOCOLATE=r(s.fromCssColorString("#D2691E")),s.CORAL=r(s.fromCssColorString("#FF7F50")),s.CORNFLOWERBLUE=r(s.fromCssColorString("#6495ED")),s.CORNSILK=r(s.fromCssColorString("#FFF8DC")),s.CRIMSON=r(s.fromCssColorString("#DC143C")),s.CYAN=r(s.fromCssColorString("#00FFFF")),s.DARKBLUE=r(s.fromCssColorString("#00008B")),s.DARKCYAN=r(s.fromCssColorString("#008B8B")),s.DARKGOLDENROD=r(s.fromCssColorString("#B8860B")),s.DARKGRAY=r(s.fromCssColorString("#A9A9A9")),s.DARKGREEN=r(s.fromCssColorString("#006400")),s.DARKGREY=s.DARKGRAY,s.DARKKHAKI=r(s.fromCssColorString("#BDB76B")),s.DARKMAGENTA=r(s.fromCssColorString("#8B008B")),s.DARKOLIVEGREEN=r(s.fromCssColorString("#556B2F")),s.DARKORANGE=r(s.fromCssColorString("#FF8C00")),s.DARKORCHID=r(s.fromCssColorString("#9932CC")),s.DARKRED=r(s.fromCssColorString("#8B0000")),s.DARKSALMON=r(s.fromCssColorString("#E9967A")),s.DARKSEAGREEN=r(s.fromCssColorString("#8FBC8F")),s.DARKSLATEBLUE=r(s.fromCssColorString("#483D8B")),s.DARKSLATEGRAY=r(s.fromCssColorString("#2F4F4F")),s.DARKSLATEGREY=s.DARKSLATEGRAY,s.DARKTURQUOISE=r(s.fromCssColorString("#00CED1")),s.DARKVIOLET=r(s.fromCssColorString("#9400D3")),s.DEEPPINK=r(s.fromCssColorString("#FF1493")),s.DEEPSKYBLUE=r(s.fromCssColorString("#00BFFF")),s.DIMGRAY=r(s.fromCssColorString("#696969")),s.DIMGREY=s.DIMGRAY,s.DODGERBLUE=r(s.fromCssColorString("#1E90FF")),s.FIREBRICK=r(s.fromCssColorString("#B22222")),s.FLORALWHITE=r(s.fromCssColorString("#FFFAF0")),s.FORESTGREEN=r(s.fromCssColorString("#228B22")),s.FUSCHIA=r(s.fromCssColorString("#FF00FF")),s.GAINSBORO=r(s.fromCssColorString("#DCDCDC")),s.GHOSTWHITE=r(s.fromCssColorString("#F8F8FF")),s.GOLD=r(s.fromCssColorString("#FFD700")),s.GOLDENROD=r(s.fromCssColorString("#DAA520")),s.GRAY=r(s.fromCssColorString("#808080")),s.GREEN=r(s.fromCssColorString("#008000")),s.GREENYELLOW=r(s.fromCssColorString("#ADFF2F")),s.GREY=s.GRAY,s.HONEYDEW=r(s.fromCssColorString("#F0FFF0")),s.HOTPINK=r(s.fromCssColorString("#FF69B4")),s.INDIANRED=r(s.fromCssColorString("#CD5C5C")),s.INDIGO=r(s.fromCssColorString("#4B0082")),s.IVORY=r(s.fromCssColorString("#FFFFF0")),s.KHAKI=r(s.fromCssColorString("#F0E68C")),s.LAVENDER=r(s.fromCssColorString("#E6E6FA")),s.LAVENDAR_BLUSH=r(s.fromCssColorString("#FFF0F5")),s.LAWNGREEN=r(s.fromCssColorString("#7CFC00")),s.LEMONCHIFFON=r(s.fromCssColorString("#FFFACD")),s.LIGHTBLUE=r(s.fromCssColorString("#ADD8E6")),s.LIGHTCORAL=r(s.fromCssColorString("#F08080")),s.LIGHTCYAN=r(s.fromCssColorString("#E0FFFF")),s.LIGHTGOLDENRODYELLOW=r(s.fromCssColorString("#FAFAD2")),s.LIGHTGRAY=r(s.fromCssColorString("#D3D3D3")),s.LIGHTGREEN=r(s.fromCssColorString("#90EE90")),s.LIGHTGREY=s.LIGHTGRAY,s.LIGHTPINK=r(s.fromCssColorString("#FFB6C1")),s.LIGHTSEAGREEN=r(s.fromCssColorString("#20B2AA")),s.LIGHTSKYBLUE=r(s.fromCssColorString("#87CEFA")),s.LIGHTSLATEGRAY=r(s.fromCssColorString("#778899")),s.LIGHTSLATEGREY=s.LIGHTSLATEGRAY,s.LIGHTSTEELBLUE=r(s.fromCssColorString("#B0C4DE")),s.LIGHTYELLOW=r(s.fromCssColorString("#FFFFE0")),s.LIME=r(s.fromCssColorString("#00FF00")),s.LIMEGREEN=r(s.fromCssColorString("#32CD32")),s.LINEN=r(s.fromCssColorString("#FAF0E6")),s.MAGENTA=r(s.fromCssColorString("#FF00FF")),s.MAROON=r(s.fromCssColorString("#800000")),s.MEDIUMAQUAMARINE=r(s.fromCssColorString("#66CDAA")),s.MEDIUMBLUE=r(s.fromCssColorString("#0000CD")),s.MEDIUMORCHID=r(s.fromCssColorString("#BA55D3")),s.MEDIUMPURPLE=r(s.fromCssColorString("#9370DB")),s.MEDIUMSEAGREEN=r(s.fromCssColorString("#3CB371")),s.MEDIUMSLATEBLUE=r(s.fromCssColorString("#7B68EE")),s.MEDIUMSPRINGGREEN=r(s.fromCssColorString("#00FA9A")),s.MEDIUMTURQUOISE=r(s.fromCssColorString("#48D1CC")),s.MEDIUMVIOLETRED=r(s.fromCssColorString("#C71585")),s.MIDNIGHTBLUE=r(s.fromCssColorString("#191970")),s.MINTCREAM=r(s.fromCssColorString("#F5FFFA")),s.MISTYROSE=r(s.fromCssColorString("#FFE4E1")),s.MOCCASIN=r(s.fromCssColorString("#FFE4B5")),s.NAVAJOWHITE=r(s.fromCssColorString("#FFDEAD")),s.NAVY=r(s.fromCssColorString("#000080")),s.OLDLACE=r(s.fromCssColorString("#FDF5E6")),s.OLIVE=r(s.fromCssColorString("#808000")),s.OLIVEDRAB=r(s.fromCssColorString("#6B8E23")),s.ORANGE=r(s.fromCssColorString("#FFA500")),s.ORANGERED=r(s.fromCssColorString("#FF4500")),s.ORCHID=r(s.fromCssColorString("#DA70D6")),s.PALEGOLDENROD=r(s.fromCssColorString("#EEE8AA")),s.PALEGREEN=r(s.fromCssColorString("#98FB98")),s.PALETURQUOISE=r(s.fromCssColorString("#AFEEEE")),s.PALEVIOLETRED=r(s.fromCssColorString("#DB7093")),s.PAPAYAWHIP=r(s.fromCssColorString("#FFEFD5")),s.PEACHPUFF=r(s.fromCssColorString("#FFDAB9")),s.PERU=r(s.fromCssColorString("#CD853F")),s.PINK=r(s.fromCssColorString("#FFC0CB")),s.PLUM=r(s.fromCssColorString("#DDA0DD")),s.POWDERBLUE=r(s.fromCssColorString("#B0E0E6")),s.PURPLE=r(s.fromCssColorString("#800080")),s.RED=r(s.fromCssColorString("#FF0000")),s.ROSYBROWN=r(s.fromCssColorString("#BC8F8F")),s.ROYALBLUE=r(s.fromCssColorString("#4169E1")),s.SADDLEBROWN=r(s.fromCssColorString("#8B4513")),s.SALMON=r(s.fromCssColorString("#FA8072")),s.SANDYBROWN=r(s.fromCssColorString("#F4A460")),s.SEAGREEN=r(s.fromCssColorString("#2E8B57")),s.SEASHELL=r(s.fromCssColorString("#FFF5EE")),s.SIENNA=r(s.fromCssColorString("#A0522D")),s.SILVER=r(s.fromCssColorString("#C0C0C0")),s.SKYBLUE=r(s.fromCssColorString("#87CEEB")),s.SLATEBLUE=r(s.fromCssColorString("#6A5ACD")),s.SLATEGRAY=r(s.fromCssColorString("#708090")),s.SLATEGREY=s.SLATEGRAY,s.SNOW=r(s.fromCssColorString("#FFFAFA")),s.SPRINGGREEN=r(s.fromCssColorString("#00FF7F")),s.STEELBLUE=r(s.fromCssColorString("#4682B4")),s.TAN=r(s.fromCssColorString("#D2B48C")),s.TEAL=r(s.fromCssColorString("#008080")),s.THISTLE=r(s.fromCssColorString("#D8BFD8")),s.TOMATO=r(s.fromCssColorString("#FF6347")),s.TURQUOISE=r(s.fromCssColorString("#40E0D0")),s.VIOLET=r(s.fromCssColorString("#EE82EE")),s.WHEAT=r(s.fromCssColorString("#F5DEB3")),s.WHITE=r(s.fromCssColorString("#FFFFFF")),s.WHITESMOKE=r(s.fromCssColorString("#F5F5F5")),s.YELLOW=r(s.fromCssColorString("#FFFF00")),s.YELLOWGREEN=r(s.fromCssColorString("#9ACD32")),s.TRANSPARENT=r(new s(0,0,0,0)),s}),define("Cesium/Core/ColorGeometryInstanceAttribute",["./Color","./ComponentDatatype","./defaultValue","./defined","./defineProperties","./DeveloperError"],function(e,t,i,n,r,o){"use strict";function a(t,n,r,o){t=i(t,1),n=i(n,1),r=i(r,1),o=i(o,1),this.value=new Uint8Array([e.floatToByte(t),e.floatToByte(n),e.floatToByte(r),e.floatToByte(o)])}return r(a.prototype,{componentDatatype:{get:function(){return t.UNSIGNED_BYTE}},componentsPerAttribute:{get:function(){return 4}},normalize:{get:function(){return!0}}}),a.fromColor=function(e){return new a(e.red,e.green,e.blue,e.alpha)},a.toValue=function(e,t){return n(t)?e.toBytes(t):new Uint8Array(e.toBytes())},a.equals=function(e,t){return e===t||n(e)&&n(t)&&e.value[0]===t.value[0]&&e.value[1]===t.value[1]&&e.value[2]===t.value[2]&&e.value[3]===t.value[3]},a}),define("Cesium/Core/combine",["./defaultValue","./defined"],function(e,t){"use strict";function i(n,r,o){o=e(o,!1);var a,s,l,u={},c=t(n),h=t(r);if(c)for(a in n)n.hasOwnProperty(a)&&(s=n[a],h&&o&&"object"==typeof s&&r.hasOwnProperty(a)?(l=r[a],"object"==typeof l?u[a]=i(s,l,o):u[a]=s):u[a]=s);if(h)for(a in r)r.hasOwnProperty(a)&&!u.hasOwnProperty(a)&&(l=r[a],u[a]=l);return u}return i}),define("Cesium/Core/CornerType",["./freezeObject"],function(e){"use strict";var t={ROUNDED:0,MITERED:1,BEVELED:2};return e(t)}),define("Cesium/Core/isArray",["./defined"],function(e){"use strict";var t=Array.isArray;return e(t)||(t=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),t}),define("Cesium/Core/EllipsoidGeodesic",["./Cartesian3","./Cartographic","./defaultValue","./defined","./defineProperties","./DeveloperError","./Ellipsoid","./Math"],function(e,t,i,n,r,o,a,s){"use strict";function l(e){var t=e._uSquared,i=e._ellipsoid.maximumRadius,n=e._ellipsoid.minimumRadius,r=(i-n)/i,o=Math.cos(e._startHeading),a=Math.sin(e._startHeading),s=(1-r)*Math.tan(e._start.latitude),l=1/Math.sqrt(1+s*s),u=l*s,c=Math.atan2(s,o),h=l*a,d=h*h,p=1-d,m=Math.sqrt(p),f=t/4,g=f*f,v=g*f,_=g*g,y=1+f-3*g/4+5*v/4-175*_/64,C=1-f+15*g/8-35*v/8,w=1-3*f+35*g/4,E=1-5*f,b=y*c-C*Math.sin(2*c)*f/2-w*Math.sin(4*c)*g/16-E*Math.sin(6*c)*v/48-5*Math.sin(8*c)*_/512,S=e._constants;S.a=i,S.b=n,S.f=r,S.cosineHeading=o,S.sineHeading=a,S.tanU=s,S.cosineU=l,S.sineU=u,S.sigma=c,S.sineAlpha=h,S.sineSquaredAlpha=d,S.cosineSquaredAlpha=p,S.cosineAlpha=m,S.u2Over4=f,S.u4Over16=g,S.u6Over64=v,S.u8Over256=_,S.a0=y,S.a1=C,S.a2=w,S.a3=E,S.distanceRatio=b}function u(e,t){return e*t*(4+e*(4-3*t))/16}function c(e,t,i,n,r,o,a){var s=u(e,i);return(1-s)*e*t*(n+s*r*(a+s*o*(2*a*a-1)))}function h(e,t,i,n,r,o,a){var l,u,h,d,p,m=(t-i)/t,f=o-n,g=Math.atan((1-m)*Math.tan(r)),v=Math.atan((1-m)*Math.tan(a)),_=Math.cos(g),y=Math.sin(g),C=Math.cos(v),w=Math.sin(v),E=_*C,b=_*w,S=y*w,T=y*C,x=f,A=s.TWO_PI,P=Math.cos(x),M=Math.sin(x);do{P=Math.cos(x),M=Math.sin(x);var D=b-T*P;h=Math.sqrt(C*C*M*M+D*D),u=S+E*P,l=Math.atan2(h,u);var I;0===h?(I=0,d=1):(I=E*M/h,d=1-I*I),A=x,p=u-2*S/d,isNaN(p)&&(p=0),x=f+c(m,I,d,l,h,u,p)}while(Math.abs(x-A)>s.EPSILON12);var R=d*(t*t-i*i)/(i*i),O=1+R*(4096+R*(R*(320-175*R)-768))/16384,L=R*(256+R*(R*(74-47*R)-128))/1024,N=p*p,F=L*h*(p+L*(u*(2*N-1)-L*p*(4*h*h-3)*(4*N-3)/6)/4),k=i*O*(l-F),B=Math.atan2(C*M,b-T*P),z=Math.atan2(_*M,b*P-T);e._distance=k,e._startHeading=B,e._endHeading=z,e._uSquared=R}function d(i,n,r,o){e.normalize(o.cartographicToCartesian(n,f),m),e.normalize(o.cartographicToCartesian(r,f),f);h(i,o.maximumRadius,o.minimumRadius,n.longitude,n.latitude,r.longitude,r.latitude),i._start=t.clone(n,i._start),i._end=t.clone(r,i._end),i._start.height=0,i._end.height=0,l(i)}function p(e,r,o){var s=i(o,a.WGS84);this._ellipsoid=s,this._start=new t,this._end=new t,this._constants={},this._startHeading=void 0,this._endHeading=void 0,this._distance=void 0,this._uSquared=void 0,n(e)&&n(r)&&d(this,e,r,s)}var m=new e,f=new e;return r(p.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},startHeading:{get:function(){return this._startHeading}},endHeading:{get:function(){return this._endHeading}}}),p.prototype.setEndPoints=function(e,t){d(this,e,t,this._ellipsoid)},p.prototype.interpolateUsingFraction=function(e,t){return this.interpolateUsingSurfaceDistance(this._distance*e,t)},p.prototype.interpolateUsingSurfaceDistance=function(e,i){var r=this._constants,o=r.distanceRatio+e/r.b,a=Math.cos(2*o),s=Math.cos(4*o),l=Math.cos(6*o),u=Math.sin(2*o),h=Math.sin(4*o),d=Math.sin(6*o),p=Math.sin(8*o),m=o*o,f=o*m,g=r.u8Over256,v=r.u2Over4,_=r.u6Over64,y=r.u4Over16,C=2*f*g*a/3+o*(1-v+7*y/4-15*_/4+579*g/64-(y-15*_/4+187*g/16)*a-(5*_/4-115*g/16)*s-29*g*l/16)+(v/2-y+71*_/32-85*g/16)*u+(5*y/16-5*_/4+383*g/96)*h-m*((_-11*g/2)*u+5*g*h/2)+(29*_/96-29*g/16)*d+539*g*p/1536,w=Math.asin(Math.sin(C)*r.cosineAlpha),E=Math.atan(r.a/r.b*Math.tan(w));C-=r.sigma;var b=Math.cos(2*r.sigma+C),S=Math.sin(C),T=Math.cos(C),x=r.cosineU*T,A=r.sineU*S,P=Math.atan2(S*r.sineHeading,x-A*r.cosineHeading),M=P-c(r.f,r.sineAlpha,r.cosineSquaredAlpha,C,S,T,b);return n(i)?(i.longitude=this._start.longitude+M,i.latitude=E,i.height=0,i):new t(this._start.longitude+M,E,0)},p}),define("Cesium/Core/PolylinePipeline",["./Cartesian3","./Cartographic","./defaultValue","./defined","./DeveloperError","./Ellipsoid","./EllipsoidGeodesic","./IntersectionTests","./isArray","./Math","./Matrix4","./Plane"],function(e,t,i,n,r,o,a,s,l,u,c,h){"use strict";function d(e,t,i){var n=S;n.length=e;var r;if(t===i){for(r=0;e>r;r++)n[r]=t;return n}var o=i-t,a=o/e;for(r=0;e>r;r++){var s=t+r*a;n[r]=s}return n}function p(t,i,n,r,o,a,s,l){var u=r.scaleToGeodeticSurface(t,P),c=r.scaleToGeodeticSurface(i,M),h=m.numberOfPoints(t,i,n),p=r.cartesianToCartographic(u,T),f=r.cartesianToCartographic(c,x),g=d(h,o,a);D.setEndPoints(p,f);var v=D.surfaceDistance/h,_=l;p.height=o;var y=r.cartographicToCartesian(p,A);e.pack(y,s,_),_+=3;for(var C=1;h>C;C++){var w=D.interpolateUsingSurfaceDistance(C*v,x);w.height=g[C],y=r.cartographicToCartesian(w,A),e.pack(y,s,_),_+=3}return _}var m={};m.numberOfPoints=function(t,i,n){var r=e.distance(t,i);return Math.ceil(r/n)};var f=new t;m.extractHeights=function(e,t){for(var i=e.length,n=new Array(i),r=0;i>r;r++){var o=e[r];n[r]=t.cartesianToCartographic(o,f).height}return n};var g=new c,v=new e,_=new e,y=new h(e.ZERO,0),C=new e,w=new h(e.ZERO,0),E=new e,b=new e,S=[],T=new t,x=new t,A=new e,P=new e,M=new e,D=new a;return m.wrapLongitude=function(t,r){var o=[],a=[];if(n(t)&&t.length>0){r=i(r,c.IDENTITY);var l=c.inverseTransformation(r,g),u=c.multiplyByPoint(l,e.ZERO,v),d=c.multiplyByPointAsVector(l,e.UNIT_Y,_),p=h.fromPointNormal(u,d,y),m=c.multiplyByPointAsVector(l,e.UNIT_X,C),f=h.fromPointNormal(u,m,w),S=1;o.push(e.clone(t[0]));for(var T=o[0],x=t.length,A=1;x>A;++A){var P=t[A];if(h.getPointDistance(f,T)<0||h.getPointDistance(f,P)<0){var M=s.lineSegmentPlane(T,P,p,E);if(n(M)){var D=e.multiplyByScalar(d,5e-9,b);h.getPointDistance(p,T)<0&&e.negate(D,D),o.push(e.add(M,D,new e)),a.push(S+1),e.negate(D,D),o.push(e.add(M,D,new e)),S=1}}o.push(e.clone(t[A])),S++,T=P}a.push(S)}return{positions:o,lengths:a}},m.generateArc=function(t){n(t)||(t={});var r=t.positions,a=r.length,s=i(t.ellipsoid,o.WGS84),c=i(t.height,0);if(1>a)return[];if(1===a){var h=s.scaleToGeodeticSurface(r[0],P);if(0!==c){var d=s.geodeticSurfaceNormal(h,A);e.multiplyByScalar(d,c,d),e.add(h,d,h)}return[h.x,h.y,h.z]}var f=t.minDistance;if(!n(f)){var g=i(t.granularity,u.RADIANS_PER_DEGREE);f=u.chordLength(g,s.maximumRadius)}var v,_=0;for(v=0;a-1>v;v++)_+=m.numberOfPoints(r[v],r[v+1],f);var y=3*(_+1),C=new Array(y),w=0,E=l(c);for(v=0;a-1>v;v++){var b=r[v],x=r[v+1],M=E?c[v]:c,D=E?c[v+1]:c;w=p(b,x,f,s,M,D,C,w)}S.length=0;var I=r[a-1],R=s.cartesianToCartographic(I,T);R.height=E?c[a-1]:c;var O=s.cartographicToCartesian(R,A);return e.pack(O,C,y-3),C},m.generateCartesianArc=function(t){for(var i=m.generateArc(t),n=i.length/3,r=new Array(n),o=0;n>o;o++)r[o]=e.unpack(i,3*o);return r},m}),define("Cesium/Core/PolylineVolumeGeometryLibrary",["./Cartesian2","./Cartesian3","./Cartesian4","./Cartographic","./CornerType","./EllipsoidTangentPlane","./Math","./Matrix3","./Matrix4","./PolylinePipeline","./Quaternion","./Transforms"],function(e,t,i,n,r,o,a,s,l,u,c,h){"use strict";function d(e,t){for(var i=new Array(e.length),n=0;no;o++)c[o]=i;return c.push(n),c}var h=n-i,d=h/u;for(o=1;u>o;o++){var p=i+o*d;c[o]=p}return c[0]=i,c.push(n),c}function m(i,n,r,a){var s=new o(r,a),l=s.projectPointOntoPlane(t.add(r,i,j),j),u=s.projectPointOntoPlane(t.add(r,n,Y),Y),c=e.angleBetween(l,u);return u.x*l.y-u.y*l.x>=0?-c:c}function f(e,i,n,r,o,a,u,c){var d=z,p=V;N=h.eastNorthUpToFixedFrame(e,o,N),d=l.multiplyByPointAsVector(N,L,d),d=t.normalize(d,d);var f=m(d,i,e,o);k=s.fromRotationZ(f,k),U.z=a,N=l.multiplyTransformation(N,l.fromRotationTranslation(k,U,F),N);var g=B;g[0]=u;for(var v=0;c>v;v++)for(var _=0;_l;l++){s=e[l];var u=s.x-o,c=s.y-a;n[r++]=u,n[r++]=0,n[r++]=c,n[r++]=u,n[r++]=0,n[r++]=c}return s=e[0],n[r++]=s.x-o,n[r++]=0,n[r++]=s.y-a,n}function _(e,t){for(var i=e.length,n=new Array(3*i),r=0,o=t.x+t.width/2,a=t.y+t.height/2,s=0;i>s;s++)n[r++]=e[s].x-o,n[r++]=0,n[r++]=e[s].y-a;return n}function y(e,i,n,o,l,u,h,d,p,m){var g,v=t.angleBetween(t.subtract(i,e,D),t.subtract(n,e,I)),_=o===r.BEVELED?0:Math.ceil(v/a.toRadians(5));g=l?s.fromQuaternion(c.fromAxisAngle(t.negate(e,D),v/(_+1),W),q):s.fromQuaternion(c.fromAxisAngle(e,v/(_+1),W),q);var y,C;if(i=t.clone(i,H),_>0)for(var w=m?2:1,E=0;_>E;E++)i=s.multiplyByVector(g,i,i),y=t.subtract(i,e,D),y=t.normalize(y,y),l||(y=t.negate(y,y)),C=u.scaleToGeodeticSurface(i,I),h=f(C,y,d,h,u,p,1,w);else y=t.subtract(i,e,D),y=t.normalize(y,y),l||(y=t.negate(y,y)),C=u.scaleToGeodeticSurface(i,I),h=f(C,y,d,h,u,p,1,1),n=t.clone(n,H),y=t.subtract(n,e,D),y=t.normalize(y,y),l||(y=t.negate(y,y)),C=u.scaleToGeodeticSurface(n,I),h=f(C,y,d,h,u,p,1,1);return h}var C=[new t,new t],w=new t,E=new t,b=new t,S=new t,T=new t,x=new t,A=new t,P=new t,M=new t,D=new t,I=new t,R={},O=new n,L=new t(-1,0,0),N=new l,F=new l,k=new s,B=s.IDENTITY.clone(),z=new t,V=new i,U=new t,G=new t,W=new c,H=new t,q=new s;R.removeDuplicatesFromShape=function(t){for(var i=t.length,n=[],r=i-1,o=0;i>o;r=o++){var a=t[r],s=t[o];e.equals(a,s)||n.push(s)}return n};var j=new t,Y=new t;R.angleIsGreaterThanPi=function(e,i,n,r){var a=new o(n,r),s=a.projectPointOntoPlane(t.add(n,e,j),j),l=a.projectPointOntoPlane(t.add(n,i,Y),Y);return l.x*s.y-l.y*s.x>=0};var X=new t,Z=new t;return R.computePositions=function(e,i,n,o,s){var l=o._ellipsoid,c=d(e,l),h=o._granularity,m=o._cornerType,I=s?v(i,n):_(i,n),O=s?_(i,n):void 0,L=n.height/2,N=n.width/2,F=e.length,k=[],B=s?[]:void 0,z=w,V=E,U=b,G=S,W=T,H=x,q=A,j=P,Y=M,K=e[0],J=e[1];G=l.geodeticSurfaceNormal(K,G),z=t.subtract(J,K,z),z=t.normalize(z,z),j=t.cross(G,z,j),j=t.normalize(j,j);var Q=c[0],$=c[1];s&&(B=f(K,j,O,B,l,Q+L,1,1)),Y=t.clone(K,Y),K=J,V=t.negate(z,V);for(var ee,te,ie=1;F-1>ie;ie++){var ne=s?2:1;J=e[ie+1],z=t.subtract(J,K,z),z=t.normalize(z,z),U=t.add(z,V,U),U=t.normalize(U,U),G=l.geodeticSurfaceNormal(K,G);var re=t.multiplyByScalar(G,t.dot(z,G),X);t.subtract(z,re,re),t.normalize(re,re);var oe=t.multiplyByScalar(G,t.dot(V,G),Z);t.subtract(V,oe,oe),t.normalize(oe,oe);var ae=!a.equalsEpsilon(Math.abs(t.dot(re,oe)),1,a.EPSILON7);if(ae){U=t.cross(U,G,U),U=t.cross(G,U,U),U=t.normalize(U,U);var se=1/Math.max(.25,t.magnitude(t.cross(U,V,D))),le=R.angleIsGreaterThanPi(z,V,K,l);le?(W=t.add(K,t.multiplyByScalar(U,se*N,U),W),H=t.add(W,t.multiplyByScalar(j,N,H),H),C[0]=t.clone(Y,C[0]),C[1]=t.clone(H,C[1]),ee=p(C,Q+L,$+L,h),te=u.generateArc({positions:C,granularity:h,ellipsoid:l}),k=g(te,j,I,k,l,ee,1),j=t.cross(G,z,j),j=t.normalize(j,j),q=t.add(W,t.multiplyByScalar(j,N,q),q),m===r.ROUNDED||m===r.BEVELED?y(W,H,q,m,le,l,k,I,$+L,s):(U=t.negate(U,U),k=f(K,U,I,k,l,$+L,se,ne)),Y=t.clone(q,Y)):(W=t.add(K,t.multiplyByScalar(U,se*N,U),W),H=t.add(W,t.multiplyByScalar(j,-N,H),H),C[0]=t.clone(Y,C[0]),C[1]=t.clone(H,C[1]),ee=p(C,Q+L,$+L,h),te=u.generateArc({positions:C,granularity:h,ellipsoid:l}),k=g(te,j,I,k,l,ee,1),j=t.cross(G,z,j),j=t.normalize(j,j),q=t.add(W,t.multiplyByScalar(j,-N,q),q),m===r.ROUNDED||m===r.BEVELED?y(W,H,q,m,le,l,k,I,$+L,s):k=f(K,U,I,k,l,$+L,se,ne),Y=t.clone(q,Y)),V=t.negate(z,V)}else k=f(Y,j,I,k,l,Q+L,1,1),Y=K;Q=$,$=c[ie+1],K=J}C[0]=t.clone(Y,C[0]),C[1]=t.clone(K,C[1]),ee=p(C,Q+L,$+L,h),te=u.generateArc({positions:C,granularity:h,ellipsoid:l}),k=g(te,j,I,k,l,ee,1),s&&(B=f(K,j,O,B,l,$+L,1,1)),F=k.length;var ue=s?F+B.length:F,ce=new Float64Array(ue);return ce.set(k),s&&ce.set(B,F),ce},R}),define("Cesium/Core/CorridorGeometryLibrary",["./Cartesian3","./CornerType","./defined","./isArray","./Math","./Matrix3","./PolylinePipeline","./PolylineVolumeGeometryLibrary","./Quaternion"],function(e,t,i,n,r,o,a,s,l){"use strict";function u(i,n,a,s,u){var c=e.angleBetween(e.subtract(n,i,f),e.subtract(a,i,g)),h=s===t.BEVELED?1:Math.ceil(c/r.toRadians(5))+1,d=3*h,p=new Array(d);p[d-3]=a.x,p[d-2]=a.y,p[d-1]=a.z;var m;m=u?o.fromQuaternion(l.fromAxisAngle(e.negate(i,f),c/h,D),I):o.fromQuaternion(l.fromAxisAngle(i,c/h,D),I);var v=0;n=e.clone(n,f);for(var _=0;h>_;_++)n=o.multiplyByVector(m,n,n),p[v++]=n.x,p[v++]=n.y,p[v++]=n.z;return p}function c(i){var n=C,r=w,o=E,a=i[1];r=e.fromArray(i[1],a.length-3,r),o=e.fromArray(i[0],0,o),n=e.multiplyByScalar(e.add(r,o,n),.5,n);var s=u(n,r,o,t.ROUNDED,!1),l=i.length-1,c=i[l-1];a=i[l],r=e.fromArray(c,c.length-3,r),o=e.fromArray(a,0,o),n=e.multiplyByScalar(e.add(r,o,n),.5,n);var h=u(n,r,o,t.ROUNDED,!1);return[s,h]}function h(t,i,n,r){var o=f;return r?o=e.add(t,i,o):(i=e.negate(i,i),o=e.add(t,i,o)),[o.x,o.y,o.z,n.x,n.y,n.z]}function d(t,i,n,r){for(var o=new Array(t.length),a=new Array(t.length),s=e.multiplyByScalar(i,n,f),l=e.negate(s,g),u=0,c=t.length-1,h=0;hY;Y++){_=l.geodeticSurfaceNormal(H,_),q=o[Y+1],D=e.normalize(e.subtract(q,H,D),D),N=e.normalize(e.add(D,I,N),N);var K=e.multiplyByScalar(_,e.dot(D,_),R);e.subtract(D,K,K),e.normalize(K,K);var J=e.multiplyByScalar(_,e.dot(I,_),O);e.subtract(I,J,J),e.normalize(J,J);var Q=!r.equalsEpsilon(Math.abs(e.dot(K,J)),1,r.EPSILON7);if(Q){N=e.cross(N,_,N),N=e.cross(_,N,N),N=e.normalize(N,N);var $=m/Math.max(.25,e.magnitude(e.cross(N,I,f))),ee=s.angleIsGreaterThanPi(D,I,H,l);N=e.multiplyByScalar(N,$,N),ee?(B=e.add(H,N,B),V=e.add(B,e.multiplyByScalar(L,m,V),V),z=e.add(B,e.multiplyByScalar(L,2*m,z),z),y[0]=e.clone(k,y[0]),y[1]=e.clone(V,y[1]),j=a.generateArc({positions:y,granularity:n,ellipsoid:l}),U=d(j,L,m,U),v&&(G.push(L.x,L.y,L.z),W.push(_.x,_.y,_.z)),F=e.clone(z,F),L=e.normalize(e.cross(_,D,L),L),z=e.add(B,e.multiplyByScalar(L,2*m,z),z),k=e.add(B,e.multiplyByScalar(L,m,k),k),g===t.ROUNDED||g===t.BEVELED?X.push({leftPositions:u(B,F,z,g,ee)}):X.push({leftPositions:h(H,e.negate(N,N),z,ee)})):(z=e.add(H,N,z),V=e.add(z,e.negate(e.multiplyByScalar(L,m,V),V),V),B=e.add(z,e.negate(e.multiplyByScalar(L,2*m,B),B),B),y[0]=e.clone(k,y[0]),y[1]=e.clone(V,y[1]),j=a.generateArc({positions:y,granularity:n,ellipsoid:l}),U=d(j,L,m,U),v&&(G.push(L.x,L.y,L.z),W.push(_.x,_.y,_.z)),F=e.clone(B,F),L=e.normalize(e.cross(_,D,L),L),B=e.add(z,e.negate(e.multiplyByScalar(L,2*m,B),B),B),k=e.add(z,e.negate(e.multiplyByScalar(L,m,k),k),k),g===t.ROUNDED||g===t.BEVELED?X.push({rightPositions:u(z,F,B,g,ee)}):X.push({rightPositions:h(H,N,B,ee)})),I=e.negate(D,I)}H=q}_=l.geodeticSurfaceNormal(H,_),y[0]=e.clone(k,y[0]),y[1]=e.clone(H,y[1]),j=a.generateArc({positions:y,granularity:n,ellipsoid:l}),U=d(j,L,m,U),v&&(G.push(L.x,L.y,L.z),W.push(_.x,_.y,_.z));var te;return g===t.ROUNDED&&(te=c(U)),{positions:U,corners:X,lefts:G,normals:W,endPositions:te}},m}),function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define("Cesium/ThirdParty/earcut-2.1.1",[],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.earcut=e()}}(function(){return function e(t,i,n){function r(a,s){if(!i[a]){if(!t[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=i[a]={exports:{}};t[a][0].call(c.exports,function(e){var i=t[a][1][e];return r(i?i:e)},c,c.exports,e,t,i,n)}return i[a].exports}for(var o="function"==typeof require&&require,a=0;a80*i){u=d=e[0],c=p=e[1];for(var v=i;o>v;v+=i)m=e[v],f=e[v+1],u>m&&(u=m),c>f&&(c=f),m>d&&(d=m),f>p&&(p=f);g=Math.max(d-u,p-c)}return a(s,l,i,u,c,g),l}function r(e,t,i,n,r){var o,a;if(r===I(e,t,i,n)>0)for(o=t;i>o;o+=n)a=P(o,e[o],e[o+1],a);else for(o=i-n;o>=t;o-=n)a=P(o,e[o],e[o+1],a);return a&&E(a,a.next)&&(M(a),a=a.next),a}function o(e,t){if(!e)return e;t||(t=e);var i,n=e;do if(i=!1,n.steiner||!E(n,n.next)&&0!==w(n.prev,n,n.next))n=n.next;else{if(M(n),n=t=n.prev,n===n.next)return null;i=!0}while(i||n!==t);return t}function a(e,t,i,n,r,h,d){if(e){!d&&h&&f(e,n,r,h);for(var p,m,g=e;e.prev!==e.next;)if(p=e.prev,m=e.next,h?l(e,n,r,h):s(e))t.push(p.i/i),t.push(e.i/i),t.push(m.i/i),M(e),e=m.next,g=m.next;else if(e=m,e===g){d?1===d?(e=u(e,t,i),a(e,t,i,n,r,h,2)):2===d&&c(e,t,i,n,r,h):a(o(e),t,i,n,r,h,1);break}}}function s(e){var t=e.prev,i=e,n=e.next;if(w(t,i,n)>=0)return!1;for(var r=e.next.next;r!==e.prev;){if(y(t.x,t.y,i.x,i.y,n.x,n.y,r.x,r.y)&&w(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function l(e,t,i,n){var r=e.prev,o=e,a=e.next;if(w(r,o,a)>=0)return!1;for(var s=r.xo.x?r.x>a.x?r.x:a.x:o.x>a.x?o.x:a.x,c=r.y>o.y?r.y>a.y?r.y:a.y:o.y>a.y?o.y:a.y,h=v(s,l,t,i,n),d=v(u,c,t,i,n),p=e.nextZ;p&&p.z<=d;){if(p!==e.prev&&p!==e.next&&y(r.x,r.y,o.x,o.y,a.x,a.y,p.x,p.y)&&w(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(p=e.prevZ;p&&p.z>=h;){if(p!==e.prev&&p!==e.next&&y(r.x,r.y,o.x,o.y,a.x,a.y,p.x,p.y)&&w(p.prev,p,p.next)>=0)return!1;p=p.prevZ}return!0}function u(e,t,i){var n=e;do{var r=n.prev,o=n.next.next;!E(r,o)&&b(r,n,n.next,o)&&T(r,o)&&T(o,r)&&(t.push(r.i/i),t.push(n.i/i),t.push(o.i/i),M(n),M(n.next),n=e=o),n=n.next}while(n!==e);return n}function c(e,t,i,n,r,s){var l=e;do{for(var u=l.next.next;u!==l.prev;){if(l.i!==u.i&&C(l,u)){var c=A(l,u);return l=o(l,l.next),c=o(c,c.next),a(l,t,i,n,r,s),void a(c,t,i,n,r,s)}u=u.next}l=l.next}while(l!==e)}function h(e,t,i,n){var a,s,l,u,c,h=[];for(a=0,s=t.length;s>a;a++)l=t[a]*n,u=s-1>a?t[a+1]*n:e.length,c=r(e,l,u,n,!1),c===c.next&&(c.steiner=!0),h.push(_(c));for(h.sort(d),a=0;a=n.next.y){var s=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(r>=s&&s>a){if(a=s,s===r){if(o===n.y)return n;if(o===n.next.y)return n.next}i=n.x=n.x&&n.x>=c&&y(h>o?r:a,o,c,h,h>o?a:r,o,n.x,n.y)&&(l=Math.abs(o-n.y)/(r-n.x),(d>l||l===d&&n.x>i.x)&&T(n,e)&&(i=n,d=l)),n=n.next;return i}function f(e,t,i,n){var r=e;do null===r.z&&(r.z=v(r.x,r.y,t,i,n)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next;while(r!==e);r.prevZ.nextZ=null,r.prevZ=null,g(r)}function g(e){var t,i,n,r,o,a,s,l,u=1;do{for(i=e,e=null,o=null,a=0;i;){for(a++,n=i,s=0,t=0;u>t&&(s++,n=n.nextZ,n);t++);for(l=u;s>0||l>0&&n;)0===s?(r=n,n=n.nextZ,l--):0!==l&&n?i.z<=n.z?(r=i,i=i.nextZ,s--):(r=n,n=n.nextZ,l--):(r=i,i=i.nextZ,s--),o?o.nextZ=r:e=r,r.prevZ=o,o=r;i=n}o.nextZ=null,u*=2}while(a>1);return e}function v(e,t,i,n,r){return e=32767*(e-i)/r,t=32767*(t-n)/r,e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),t=16711935&(t|t<<8),t=252645135&(t|t<<4),t=858993459&(t|t<<2),t=1431655765&(t|t<<1),e|t<<1}function _(e){var t=e,i=e;do t.x=0&&(e-a)*(n-s)-(i-a)*(t-s)>=0&&(i-a)*(o-s)-(r-a)*(n-s)>=0}function C(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!S(e,t)&&T(e,t)&&T(t,e)&&x(e,t)}function w(e,t,i){return(t.y-e.y)*(i.x-t.x)-(t.x-e.x)*(i.y-t.y)}function E(e,t){return e.x===t.x&&e.y===t.y}function b(e,t,i,n){return E(e,t)&&E(i,n)||E(e,n)&&E(i,t)?!0:w(e,t,i)>0!=w(e,t,n)>0&&w(i,n,e)>0!=w(i,n,t)>0}function S(e,t){var i=e;do{if(i.i!==e.i&&i.next.i!==e.i&&i.i!==t.i&&i.next.i!==t.i&&b(i,i.next,e,t))return!0;i=i.next}while(i!==e);return!1}function T(e,t){return w(e.prev,e,e.next)<0?w(e,t,e.next)>=0&&w(e,e.prev,t)>=0:w(e,t,e.prev)<0||w(e,e.next,t)<0}function x(e,t){var i=e,n=!1,r=(e.x+t.x)/2,o=(e.y+t.y)/2;do i.y>o!=i.next.y>o&&r<(i.next.x-i.x)*(o-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next;while(i!==e);return n}function A(e,t){var i=new D(e.i,e.x,e.y),n=new D(t.i,t.x,t.y),r=e.next,o=t.prev;return e.next=t,t.prev=e,i.next=r,r.prev=i,n.next=i,i.prev=n,o.next=n,n.prev=o,n}function P(e,t,i,n){var r=new D(e,t,i);return n?(r.next=n.next,r.prev=n,n.next.prev=r,n.next=r):(r.prev=r,r.next=r),r}function M(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function D(e,t,i){this.i=e,this.x=t,this.y=i,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function I(e,t,i,n){for(var r=0,o=t,a=i-n;i>o;o+=n)r+=(e[a]-e[o])*(e[o+1]+e[a+1]),a=o;return r}t.exports=n,n.deviation=function(e,t,i,n){var r=t&&t.length,o=r?t[0]*i:e.length,a=Math.abs(I(e,0,o,i));if(r)for(var s=0,l=t.length;l>s;s++){var u=t[s]*i,c=l-1>s?t[s+1]*i:e.length;a-=Math.abs(I(e,u,c,i))}var h=0;for(s=0;sa;a++)i.vertices.push(e[r][o][a]);r>0&&(n+=e[r-1].length,i.holes.push(n))}return i}},{}]},{},[1])(1)}),define("Cesium/Core/pointInsideTriangle",["./barycentricCoordinates","./Cartesian3"],function(e,t){"use strict";function i(t,i,r,o){return e(t,i,r,o,n),n.x>0&&n.y>0&&n.z>0}var n=new t;return i}),define("Cesium/Core/Queue",["../Core/defineProperties"],function(e){"use strict";function t(){this._array=[],this._offset=0,this._length=0}return e(t.prototype,{length:{get:function(){return this._length}}}),t.prototype.enqueue=function(e){this._array.push(e),this._length++},t.prototype.dequeue=function(){if(0!==this._length){var e=this._array,t=this._offset,i=e[t];return e[t]=void 0,t++,t>10&&2*t>e.length&&(this._array=e.slice(t),t=0),this._offset=t,this._length--,i}},t.prototype.peek=function(){return 0!==this._length?this._array[this._offset]:void 0},t.prototype.contains=function(e){return-1!==this._array.indexOf(e)},t.prototype.clear=function(){this._array.length=this._offset=this._length=0},t.prototype.sort=function(e){this._offset>0&&(this._array=this._array.slice(this._offset),this._offset=0),this._array.sort(e)},t}),define("Cesium/Core/WindingOrder",["../Renderer/WebGLConstants","./freezeObject"],function(e,t){"use strict";var i={CLOCKWISE:e.CW,COUNTER_CLOCKWISE:e.CCW,validate:function(e){return e===i.CLOCKWISE||e===i.COUNTER_CLOCKWISE}};return t(i)}),define("Cesium/Core/PolygonPipeline",["../ThirdParty/earcut-2.1.1","./Cartesian2","./Cartesian3","./ComponentDatatype","./defaultValue","./defined","./DeveloperError","./Ellipsoid","./EllipsoidTangentPlane","./Geometry","./GeometryAttribute","./Math","./pointInsideTriangle","./PrimitiveType","./Queue","./WindingOrder"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f){"use strict";var g=new i,v=new i,_={};_.computeArea2D=function(e){for(var t=e.length,i=0,n=t-1,r=0;t>r;n=r++){var o=e[n],a=e[r];i+=o.x*a.y-a.x*o.y}return.5*i},_.computeWindingOrder2D=function(e){var t=_.computeArea2D(e);return t>0?f.COUNTER_CLOCKWISE:f.CLOCKWISE},_.triangulate=function(i,n){var r=t.packArray(i);return e(r,n,2)};var y=new i,C=new i,w=new i,E=new i,b=new i,S=new i,T=new i;return _.computeSubdivision=function(e,t,a,s){s=r(s,h.RADIANS_PER_DEGREE);var l,d=a.slice(0),m=t.length,f=new Array(3*m),g=0;for(l=0;m>l;l++){var v=t[l];f[g++]=v.x,f[g++]=v.y,f[g++]=v.z}for(var _=[],x={},A=e.maximumRadius,P=h.chordLength(s,A),M=P*P;d.length>0;){var D,I,R=d.pop(),O=d.pop(),L=d.pop(),N=i.fromArray(f,3*L,y),F=i.fromArray(f,3*O,C),k=i.fromArray(f,3*R,w),B=i.multiplyByScalar(i.normalize(N,E),A,E),z=i.multiplyByScalar(i.normalize(F,b),A,b),V=i.multiplyByScalar(i.normalize(k,S),A,S),U=i.magnitudeSquared(i.subtract(B,z,T)),G=i.magnitudeSquared(i.subtract(z,V,T)),W=i.magnitudeSquared(i.subtract(V,B,T)),H=Math.max(U,G,W);H>M?U===H?(D=Math.min(L,O)+" "+Math.max(L,O),l=x[D],o(l)||(I=i.add(N,F,T),i.multiplyByScalar(I,.5,I),f.push(I.x,I.y,I.z),l=f.length/3-1,x[D]=l),d.push(L,l,R),d.push(l,O,R)):G===H?(D=Math.min(O,R)+" "+Math.max(O,R),l=x[D],o(l)||(I=i.add(F,k,T),i.multiplyByScalar(I,.5,I),f.push(I.x,I.y,I.z),l=f.length/3-1,x[D]=l),d.push(O,l,L),d.push(l,R,L)):W===H&&(D=Math.min(R,L)+" "+Math.max(R,L),l=x[D],o(l)||(I=i.add(k,N,T),i.multiplyByScalar(I,.5,I),f.push(I.x,I.y,I.z),l=f.length/3-1,x[D]=l),d.push(R,l,O),d.push(l,L,O)):(_.push(L),_.push(O),_.push(R))}return new u({attributes:{position:new c({componentDatatype:n.DOUBLE,componentsPerAttribute:3,values:f})},indices:_,primitiveType:p.TRIANGLES})},_.scaleToGeodeticHeight=function(e,t,n,a){n=r(n,s.WGS84);var l=g,u=v;if(t=r(t,0),a=r(a,!0),o(e))for(var c=e.length,h=0;c>h;h+=3)i.fromArray(e,h,u),a&&(u=n.scaleToGeodeticSurface(u,u)),0!==t&&(l=n.geodeticSurfaceNormal(u,l),i.multiplyByScalar(l,t,l),i.add(u,l,u)),e[h]=u.x,e[h+1]=u.y,e[h+2]=u.z;return e},_}),define("Cesium/Core/CorridorGeometry",["./arrayRemoveDuplicates","./BoundingSphere","./Cartesian3","./Cartographic","./ComponentDatatype","./CornerType","./CorridorGeometryLibrary","./defaultValue","./defined","./defineProperties","./DeveloperError","./Ellipsoid","./Geometry","./GeometryAttribute","./GeometryAttributes","./IndexDatatype","./Math","./PolygonPipeline","./PrimitiveType","./Rectangle","./VertexFormat"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g,v,_,y,C){"use strict";function w(e,t,n,r,o,s){var l=e.normals,u=e.tangents,c=e.binormals,h=i.normalize(i.cross(n,t,N),N);s.normal&&a.addAttribute(l,t,r,o),s.binormal&&a.addAttribute(c,n,r,o),s.tangent&&a.addAttribute(u,h,r,o)}function E(e,t,n){var o,s,u,c=e.positions,h=e.corners,d=e.endPositions,v=e.lefts,_=e.normals,y=new m,C=0,E=0,b=0;for(s=0;ss;s++)z=i.fromArray($,3*(K-1-s),z),B=i.fromArray($,3*(K+s),B),a.addAttribute(U,B,j),a.addAttribute(U,z,void 0,Y),w(q,X,Z,j,Y,t),P=j/3,k=P+1,A=(Y-2)/3,O=A-1,J[Q++]=A,J[Q++]=P,J[Q++]=O,J[Q++]=O,J[Q++]=P,J[Q++]=k,j+=3,Y-=3}var ee=0,te=0,ie=c[ee++],ne=c[ee++];U.set(ie,j),U.set(ne,Y-ne.length+1),Z=i.fromArray(v,te,Z);var re,oe;for(u=ne.length-3,s=0;u>s;s+=3)re=n.geodeticSurfaceNormal(i.fromArray(ie,s,N),N),oe=n.geodeticSurfaceNormal(i.fromArray(ne,u-s,F),F),X=i.normalize(i.add(re,oe,X),X),w(q,X,Z,j,Y,t),P=j/3,k=P+1,A=(Y-2)/3,O=A-1,J[Q++]=A,J[Q++]=P,J[Q++]=O,J[Q++]=O,J[Q++]=P,J[Q++]=k,j+=3,Y-=3;for(re=n.geodeticSurfaceNormal(i.fromArray(ie,u,N),N),oe=n.geodeticSurfaceNormal(i.fromArray(ne,u,F),F),X=i.normalize(i.add(re,oe,X),X),te+=3,s=0;ss;s++)z=i.fromArray(me,3*(T-s-1),z),B=i.fromArray(me,3*s,B),a.addAttribute(U,z,void 0,Y),a.addAttribute(U,B,j),w(q,X,Z,j,Y,t),k=j/3,P=k-1,O=(Y-2)/3,A=O+1,J[Q++]=A,J[Q++]=P,J[Q++]=O,J[Q++]=O,J[Q++]=P,J[Q++]=k,j+=3,Y-=3}if(y.position=new p({componentDatatype:r.DOUBLE,componentsPerAttribute:3,values:U}),t.st){var fe,ge,ve=new Float32Array(V/3*2),_e=0;if(x){C/=3,E/=3;var ye=Math.PI/(T+1);ge=1/(C-T+1),fe=1/(E-T+1);var Ce,we=T/2;for(s=we+1;T+1>s;s++)Ce=g.PI_OVER_TWO+ye*s,ve[_e++]=fe*(1+Math.cos(Ce)),ve[_e++]=.5*(1+Math.sin(Ce));for(s=1;E-T+1>s;s++)ve[_e++]=s*fe,ve[_e++]=0;for(s=T;s>we;s--)Ce=g.PI_OVER_TWO-s*ye,ve[_e++]=1-fe*(1+Math.cos(Ce)),ve[_e++]=.5*(1+Math.sin(Ce));for(s=we;s>0;s--)Ce=g.PI_OVER_TWO-ye*s,ve[_e++]=1-ge*(1+Math.cos(Ce)),ve[_e++]=.5*(1+Math.sin(Ce));for(s=C-T;s>0;s--)ve[_e++]=s*ge,ve[_e++]=1;for(s=1;we+1>s;s++)Ce=g.PI_OVER_TWO+ye*s,ve[_e++]=ge*(1+Math.cos(Ce)),ve[_e++]=.5*(1+Math.sin(Ce))}else{for(C/=3,E/=3,ge=1/(C-1),fe=1/(E-1),s=0;E>s;s++)ve[_e++]=s*fe,ve[_e++]=0;for(s=C;s>0;s--)ve[_e++]=(s-1)*ge,ve[_e++]=1}y.st=new p({componentDatatype:r.FLOAT,componentsPerAttribute:2,values:ve})}return t.normal&&(y.normal=new p({componentDatatype:r.FLOAT,componentsPerAttribute:3,values:q.normals})),t.tangent&&(y.tangent=new p({componentDatatype:r.FLOAT,componentsPerAttribute:3,values:q.tangents})),t.binormal&&(y.binormal=new p({componentDatatype:r.FLOAT,componentsPerAttribute:3,values:q.binormals})),{attributes:y,indices:J}}function b(e,t){if(!(t.normal||t.binormal||t.tangent||t.st))return e;var n,r,o=e.position.values;(t.normal||t.binormal)&&(n=e.normal.values,r=e.binormal.values);var s,l=e.position.values.length/18,u=3*l,c=2*l,h=2*u;if(t.normal||t.binormal||t.tangent){var d=t.normal?new Float32Array(6*u):void 0,p=t.binormal?new Float32Array(6*u):void 0,m=t.tangent?new Float32Array(6*u):void 0,f=M,g=D,v=I,_=R,y=O,C=L,w=h;for(s=0;u>s;s+=3){var E=w+h;f=i.fromArray(o,s,f),g=i.fromArray(o,s+u,g),v=i.fromArray(o,(s+3)%u,v),g=i.subtract(g,f,g),v=i.subtract(v,f,v),_=i.normalize(i.cross(g,v,_),_),t.normal&&(a.addAttribute(d,_,E),a.addAttribute(d,_,E+3),a.addAttribute(d,_,w),a.addAttribute(d,_,w+3)),(t.tangent||t.binormal)&&(C=i.fromArray(n,s,C),t.binormal&&(a.addAttribute(p,C,E),a.addAttribute(p,C,E+3),a.addAttribute(p,C,w),a.addAttribute(p,C,w+3)),t.tangent&&(y=i.normalize(i.cross(C,_,y),y),a.addAttribute(m,y,E),a.addAttribute(m,y,E+3),a.addAttribute(m,y,w),a.addAttribute(m,y,w+3))),w+=6}if(t.normal){for(d.set(n),s=0;u>s;s+=3)d[s+u]=-n[s],d[s+u+1]=-n[s+1],d[s+u+2]=-n[s+2];e.normal.values=d}else e.normal=void 0;if(t.binormal?(p.set(r),p.set(r,u),e.binormal.values=p):e.binormal=void 0,t.tangent){var b=e.tangent.values;m.set(b),m.set(b,u),e.tangent.values=m}}if(t.st){var S=e.st.values,T=new Float32Array(6*c);T.set(S),T.set(S,c);for(var x=2*c,A=0;2>A;A++){for(T[x++]=S[0],T[x++]=S[1],s=2;c>s;s+=2){var P=S[s],N=S[s+1];T[x++]=P,T[x++]=N,T[x++]=P,T[x++]=N}T[x++]=S[0],T[x++]=S[1]}e.st.values=T}return e}function S(e,t,i){i[t++]=e[0],i[t++]=e[1],i[t++]=e[2];for(var n=3;n_;_+=3){var A=c[_],P=c[_+1],M=c[_+2];T[x++]=M+d,T[x++]=P+d,T[x++]=A+d}u=b(u,t);var D,I,R,O;for(_=0;w>_;_+=2)D=_+w,I=D+w,R=D+1,O=I+1,T[x++]=D,T[x++]=I,T[x++]=R,T[x++]=R,T[x++]=I,T[x++]=O;return{attributes:u,indices:T}}function x(e,t,n,r,o,a){var s=i.subtract(t,e,k);i.normalize(s,s);var l=n.geodeticSurfaceNormal(e,B),u=i.cross(s,l,k);i.multiplyByScalar(u,r,u);var c=o.latitude,h=o.longitude,d=a.latitude,p=a.longitude;i.add(e,u,B),n.cartesianToCartographic(B,z);var m=z.latitude,f=z.longitude;c=Math.min(c,m),h=Math.min(h,f),d=Math.max(d,m),p=Math.max(p,f),i.subtract(e,u,B),n.cartesianToCartographic(B,z),m=z.latitude,f=z.longitude,c=Math.min(c,m),h=Math.min(h,f),d=Math.max(d,m),p=Math.max(p,f),o.latitude=c,o.longitude=h,a.latitude=d,a.longitude=p}function A(e,t,n,r){var a=e.length-1;if(0===a)return new y;var s=.5*n;G.latitude=Number.POSITIVE_INFINITY,G.longitude=Number.POSITIVE_INFINITY,W.latitude=Number.NEGATIVE_INFINITY,W.longitude=Number.NEGATIVE_INFINITY;var l,u;if(r===o.ROUNDED){var c=e[0];i.subtract(c,e[1],V),i.normalize(V,V),i.multiplyByScalar(V,s,V),i.add(c,V,U),t.cartesianToCartographic(U,z),l=z.latitude,u=z.longitude,G.latitude=Math.min(G.latitude,l),G.longitude=Math.min(G.longitude,u),W.latitude=Math.max(W.latitude,l),W.longitude=Math.max(W.longitude,u)}for(var h=0;a>h;++h)x(e[h],e[h+1],t,s,G,W);var d=e[a];i.subtract(d,e[a-1],V),i.normalize(V,V),i.multiplyByScalar(V,s,V),i.add(d,V,U),x(d,U,t,s,G,W),r===o.ROUNDED&&(t.cartesianToCartographic(U,z),l=z.latitude,u=z.longitude,G.latitude=Math.min(G.latitude,l),G.longitude=Math.min(G.longitude,u),W.latitude=Math.max(W.latitude,l),W.longitude=Math.max(W.longitude,u));var p=new y;return p.north=W.latitude,p.south=G.latitude,p.east=W.longitude,p.west=G.longitude,p}function P(e){e=s(e,s.EMPTY_OBJECT);var t=e.positions,n=e.width;this._positions=t,this._ellipsoid=h.clone(s(e.ellipsoid,h.WGS84)),this._vertexFormat=C.clone(s(e.vertexFormat,C.DEFAULT)),this._width=n,this._height=s(e.height,0),this._extrudedHeight=s(e.extrudedHeight,this._height),this._cornerType=s(e.cornerType,o.ROUNDED),this._granularity=s(e.granularity,g.RADIANS_PER_DEGREE),this._workerName="createCorridorGeometry",this._rectangle=A(t,this._ellipsoid,n,this._cornerType),this.packedLength=1+t.length*i.packedLength+h.packedLength+C.packedLength+y.packedLength+5}var M=new i,D=new i,I=new i,R=new i,O=new i,L=new i,N=new i,F=new i,k=new i,B=new i,z=new n,V=new i,U=new i,G=new n,W=new n;P.pack=function(e,t,n){n=s(n,0);var r=e._positions,o=r.length;t[n++]=o;for(var a=0;o>a;++a,n+=i.packedLength)i.pack(r[a],t,n);h.pack(e._ellipsoid,t,n),n+=h.packedLength,C.pack(e._vertexFormat,t,n),n+=C.packedLength,y.pack(e._rectangle,t,n),n+=y.packedLength,t[n++]=e._width,t[n++]=e._height,t[n++]=e._extrudedHeight,t[n++]=e._cornerType,t[n]=e._granularity};var H=h.clone(h.UNIT_SPHERE),q=new C,j=new y,Y={positions:void 0,ellipsoid:H,vertexFormat:q,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0};return P.unpack=function(e,t,n){t=s(t,0);for(var r=e[t++],o=new Array(r),a=0;r>a;++a,t+=i.packedLength)o[a]=i.unpack(e,t);var u=h.unpack(e,t,H);t+=h.packedLength;var c=C.unpack(e,t,q);t+=C.packedLength;var d=y.unpack(e,t,j);t+=y.packedLength;var p=e[t++],m=e[t++],f=e[t++],g=e[t++],v=e[t];return l(n)?(n._positions=o,n._ellipsoid=h.clone(u,n._ellipsoid),n._vertexFormat=C.clone(c,n._vertexFormat),n._width=p,n._height=m,n._extrudedHeight=f,n._cornerType=g,n._granularity=v,n._rectangle=y.clone(d),n):(Y.positions=o,Y.width=p,Y.height=m,Y.extrudedHeight=f,Y.cornerType=g,Y.granularity=v,new P(Y))},P.createGeometry=function(n){var r=n._positions,o=n._height,s=n._width,l=n._extrudedHeight,u=o!==l,c=e(r,i.equalsEpsilon);if(!(c.length<2||0>=s)){var h,p=n._ellipsoid,m=n._vertexFormat,f={ellipsoid:p,positions:c,width:s,cornerType:n._cornerType,granularity:n._granularity,saveAttributes:!0};if(u){var g=Math.max(o,l);l=Math.min(o,l),o=g,f.height=o,f.extrudedHeight=l,h=T(f,m)}else{var y=a.computePositions(f);h=E(y,m,p),h.attributes.position.values=v.scaleToGeodeticHeight(h.attributes.position.values,o,p)}var C=h.attributes,w=t.fromVertices(C.position.values,void 0,3);return m.position||(h.attributes.position.values=void 0),new d({attributes:C,indices:h.indices,primitiveType:_.TRIANGLES,boundingSphere:w})}},P.createShadowVolume=function(e,t,i){var n=e._granularity,r=e._ellipsoid,o=t(n,r),a=i(n,r);return new P({positions:e._positions,width:e._width,cornerType:e._cornerType,ellipsoid:r,granularity:n,extrudedHeight:o,height:a,vertexFormat:C.POSITION_ONLY})},u(P.prototype,{rectangle:{get:function(){return this._rectangle}}}),P}),define("Cesium/Core/CorridorOutlineGeometry",["./arrayRemoveDuplicates","./BoundingSphere","./Cartesian3","./ComponentDatatype","./CornerType","./CorridorGeometryLibrary","./defaultValue","./defined","./DeveloperError","./Ellipsoid","./Geometry","./GeometryAttribute","./GeometryAttributes","./IndexDatatype","./Math","./PolygonPipeline","./PrimitiveType"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g){"use strict";function v(e,t){var a,l,u,c=[],m=e.positions,f=e.corners,g=e.endPositions,v=new d,_=0,y=0,b=0;for(l=0;ll;l++)R=i.fromArray(V,3*(k-1-l),R),I=i.fromArray(V,3*(k+l),I),o.addAttribute(L,I,N),o.addAttribute(L,R,void 0,F),P=N/3,D=P+1,A=(F-2)/3,M=A-1,B[z++]=A,B[z++]=M,B[z++]=P,B[z++]=D,N+=3,F-=3}var U=0,G=m[U++],W=m[U++];for(L.set(G,N),L.set(W,F-W.length+1),u=W.length-3,c.push(N/3,(F-2)/3),l=0;u>l;l+=3)P=N/3,D=P+1,A=(F-2)/3,M=A-1,B[z++]=A,B[z++]=M,B[z++]=P,B[z++]=D,N+=3,F-=3;for(l=0;ll;l++)R=i.fromArray(Z,3*(T-l-1),R),I=i.fromArray(Z,3*l,I),o.addAttribute(L,R,void 0,F),o.addAttribute(L,I,N),D=N/3,P=D-1,M=(F-2)/3,A=M+1,B[z++]=A,B[z++]=M,B[z++]=P,B[z++]=D,N+=3,F-=3;c.push(N/3)}else c.push(N/3,(F-2)/3);return B[z++]=N/3,B[z++]=(F-2)/3,v.position=new h({componentDatatype:n.DOUBLE,componentsPerAttribute:3,values:L}),{attributes:v,indices:B,wallIndices:c}}function _(e){var t=e.ellipsoid,i=o.computePositions(e),n=v(i,e.cornerType),r=n.wallIndices,a=e.height,s=e.extrudedHeight,l=n.attributes,u=n.indices,c=l.position.values,h=c.length,d=new Float64Array(h);d.set(c);var m=new Float64Array(2*h);c=f.scaleToGeodeticHeight(c,a,t),d=f.scaleToGeodeticHeight(d,s,t),m.set(c),m.set(d,h),l.position.values=m,h/=3;var g,_=u.length,y=p.createTypedArray(m.length/3,2*(_+r.length));y.set(u);var C=_;for(g=0;_>g;g+=2){var w=u[g],E=u[g+1];y[C++]=w+h,y[C++]=E+h}var b,S;for(g=0;gs;++s,n+=i.packedLength)i.pack(r[s],t,n);u.pack(e._ellipsoid,t,n),n+=u.packedLength,t[n++]=e._width,t[n++]=e._height,t[n++]=e._extrudedHeight,t[n++]=e._cornerType,t[n]=e._granularity};var b=u.clone(u.UNIT_SPHERE),S={positions:void 0,ellipsoid:b,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0};return y.unpack=function(e,t,n){t=a(t,0);for(var r=e[t++],o=new Array(r),l=0;r>l;++l,t+=i.packedLength)o[l]=i.unpack(e,t);var c=u.unpack(e,t,b);t+=u.packedLength;var h=e[t++],d=e[t++],p=e[t++],m=e[t++],f=e[t];return s(n)?(n._positions=o,n._ellipsoid=u.clone(c,n._ellipsoid),n._width=h,n._height=d,n._extrudedHeight=p,n._cornerType=m,n._granularity=f,n):(S.positions=o,S.width=h,S.height=d,S.extrudedHeight=p,S.cornerType=m,S.granularity=f,new y(S))},y.createGeometry=function(n){var r=n._positions,a=n._height,s=n._width,l=n._extrudedHeight,u=a!==l,h=e(r,i.equalsEpsilon);if(!(h.length<2||0>=s)){var d,p=n._ellipsoid,m={ellipsoid:p,positions:h,width:s,cornerType:n._cornerType,granularity:n._granularity,saveAttributes:!1};if(u){var y=Math.max(a,l);l=Math.min(a,l),a=y,m.height=a,m.extrudedHeight=l,d=_(m)}else{var C=o.computePositions(m);d=v(C,m.cornerType),d.attributes.position.values=f.scaleToGeodeticHeight(d.attributes.position.values,a,p)}var w=d.attributes,E=t.fromVertices(w.position.values,void 0,3);return new c({attributes:w,indices:d.indices,primitiveType:g.LINES,boundingSphere:E})}},y}),define("Cesium/Core/createGuid",[],function(){"use strict";function e(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0,i="x"===e?t:3&t|8;return i.toString(16)})}return e}),define("Cesium/Core/CylinderGeometryLibrary",["./Math"],function(e){"use strict";var t={};return t.computePositions=function(t,i,n,r,o){var a,s=.5*t,l=-s,u=r+r,c=o?2*u:u,h=new Float64Array(3*c),d=0,p=0,m=o?3*u:0,f=o?3*(u+r):3*r;for(a=0;r>a;a++){var g=a/r*e.TWO_PI,v=Math.cos(g),_=Math.sin(g),y=v*n,C=_*n,w=v*i,E=_*i;h[p+m]=y,h[p+m+1]=C,h[p+m+2]=l,h[p+f]=w,h[p+f+1]=E,h[p+f+2]=s,p+=3,o&&(h[d++]=y,h[d++]=C,h[d++]=l,h[d++]=w,h[d++]=E,h[d++]=s)}return h},t}),define("Cesium/Core/CylinderGeometry",["./BoundingSphere","./Cartesian2","./Cartesian3","./ComponentDatatype","./CylinderGeometryLibrary","./defaultValue","./defined","./DeveloperError","./Geometry","./GeometryAttribute","./GeometryAttributes","./IndexDatatype","./Math","./PrimitiveType","./VertexFormat"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m){"use strict";function f(e){e=o(e,o.EMPTY_OBJECT);var t=e.length,i=e.topRadius,n=e.bottomRadius,r=o(e.vertexFormat,m.DEFAULT),a=o(e.slices,128);this._length=t,this._topRadius=i,this._bottomRadius=n,this._vertexFormat=m.clone(r),this._slices=a,this._workerName="createCylinderGeometry"}var g=new t,v=new i,_=new i,y=new i,C=new i;f.packedLength=m.packedLength+4,f.pack=function(e,t,i){i=o(i,0),m.pack(e._vertexFormat,t,i),i+=m.packedLength,t[i++]=e._length,t[i++]=e._topRadius,t[i++]=e._bottomRadius,t[i]=e._slices};var w=new m,E={vertexFormat:w,length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0};return f.unpack=function(e,t,i){t=o(t,0);var n=m.unpack(e,t,w);t+=m.packedLength;var r=e[t++],s=e[t++],l=e[t++],u=e[t];return a(i)?(i._vertexFormat=m.clone(n,i._vertexFormat),i._length=r,i._topRadius=s,i._bottomRadius=l,i._slices=u,i):(E.length=r,E.topRadius=s,E.bottomRadius=l,E.slices=u,new f(E))},f.createGeometry=function(o){var a=o._length,s=o._topRadius,m=o._bottomRadius,f=o._vertexFormat,w=o._slices;if(!(0>=a||0>s||0>m||0===s&&0===m)){var E,b=w+w,S=w+b,T=b+b,x=r.computePositions(a,s,m,w,!0),A=f.st?new Float32Array(2*T):void 0,P=f.normal?new Float32Array(3*T):void 0,M=f.tangent?new Float32Array(3*T):void 0,D=f.binormal?new Float32Array(3*T):void 0,I=f.normal||f.tangent||f.binormal;if(I){var R=f.tangent||f.binormal,O=0,L=0,N=0,F=v;F.z=0;var k=y,B=_;for(E=0;w>E;E++){var z=E/w*d.TWO_PI,V=Math.cos(z),U=Math.sin(z);I&&(F.x=V,F.y=U,R&&(k=i.normalize(i.cross(i.UNIT_Z,F,k),k)),f.normal&&(P[O++]=V,P[O++]=U,P[O++]=0,P[O++]=V, +P[O++]=U,P[O++]=0),f.tangent&&(M[L++]=k.x,M[L++]=k.y,M[L++]=k.z,M[L++]=k.x,M[L++]=k.y,M[L++]=k.z),f.binormal&&(B=i.normalize(i.cross(F,k,B),B),D[N++]=B.x,D[N++]=B.y,D[N++]=B.z,D[N++]=B.x,D[N++]=B.y,D[N++]=B.z))}for(E=0;w>E;E++)f.normal&&(P[O++]=0,P[O++]=0,P[O++]=-1),f.tangent&&(M[L++]=1,M[L++]=0,M[L++]=0),f.binormal&&(D[N++]=0,D[N++]=-1,D[N++]=0);for(E=0;w>E;E++)f.normal&&(P[O++]=0,P[O++]=0,P[O++]=1),f.tangent&&(M[L++]=1,M[L++]=0,M[L++]=0),f.binormal&&(D[N++]=0,D[N++]=1,D[N++]=0)}var G=12*w-12,W=h.createTypedArray(T,G),H=0,q=0;for(E=0;w-1>E;E++)W[H++]=q,W[H++]=q+2,W[H++]=q+3,W[H++]=q,W[H++]=q+3,W[H++]=q+1,q+=2;for(W[H++]=b-2,W[H++]=0,W[H++]=1,W[H++]=b-2,W[H++]=1,W[H++]=b-1,E=1;w-1>E;E++)W[H++]=b+E+1,W[H++]=b+E,W[H++]=b;for(E=1;w-1>E;E++)W[H++]=S,W[H++]=S+E,W[H++]=S+E+1;var j=0;if(f.st){var Y=Math.max(s,m);for(E=0;T>E;E++){var X=i.fromArray(x,3*E,C);A[j++]=(X.x+Y)/(2*Y),A[j++]=(X.y+Y)/(2*Y)}}var Z=new c;f.position&&(Z.position=new u({componentDatatype:n.DOUBLE,componentsPerAttribute:3,values:x})),f.normal&&(Z.normal=new u({componentDatatype:n.FLOAT,componentsPerAttribute:3,values:P})),f.tangent&&(Z.tangent=new u({componentDatatype:n.FLOAT,componentsPerAttribute:3,values:M})),f.binormal&&(Z.binormal=new u({componentDatatype:n.FLOAT,componentsPerAttribute:3,values:D})),f.st&&(Z.st=new u({componentDatatype:n.FLOAT,componentsPerAttribute:2,values:A})),g.x=.5*a,g.y=Math.max(m,s);var K=new e(i.ZERO,t.magnitude(g));return new l({attributes:Z,indices:W,primitiveType:p.TRIANGLES,boundingSphere:K})}},f}),define("Cesium/Core/CylinderOutlineGeometry",["./BoundingSphere","./Cartesian2","./Cartesian3","./ComponentDatatype","./CylinderGeometryLibrary","./defaultValue","./defined","./DeveloperError","./Geometry","./GeometryAttribute","./GeometryAttributes","./IndexDatatype","./PrimitiveType"],function(e,t,i,n,r,o,a,s,l,u,c,h,d){"use strict";function p(e){e=o(e,o.EMPTY_OBJECT);var t=e.length,i=e.topRadius,n=e.bottomRadius,r=o(e.slices,128),a=Math.max(o(e.numberOfVerticalLines,16),0);this._length=t,this._topRadius=i,this._bottomRadius=n,this._slices=r,this._numberOfVerticalLines=a,this._workerName="createCylinderOutlineGeometry"}var m=new t;p.packedLength=5,p.pack=function(e,t,i){i=o(i,0),t[i++]=e._length,t[i++]=e._topRadius,t[i++]=e._bottomRadius,t[i++]=e._slices,t[i]=e._numberOfVerticalLines};var f={length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,numberOfVerticalLines:void 0};return p.unpack=function(e,t,i){t=o(t,0);var n=e[t++],r=e[t++],s=e[t++],l=e[t++],u=e[t];return a(i)?(i._length=n,i._topRadius=r,i._bottomRadius=s,i._slices=l,i._numberOfVerticalLines=u,i):(f.length=n,f.topRadius=r,f.bottomRadius=s,f.slices=l,f.numberOfVerticalLines=u,new p(f))},p.createGeometry=function(o){var a=o._length,s=o._topRadius,p=o._bottomRadius,f=o._slices,g=o._numberOfVerticalLines;if(!(0>=a||0>s||0>p||0===s&&0===p)){var v,_=2*f,y=r.computePositions(a,s,p,f,!1),C=2*f;if(g>0){var w=Math.min(g,f);v=Math.round(f/w),C+=w}for(var E=h.createTypedArray(_,2*C),b=0,S=0;f-1>S;S++)E[b++]=S,E[b++]=S+1,E[b++]=S+f,E[b++]=S+1+f;if(E[b++]=f-1,E[b++]=0,E[b++]=f+f-1,E[b++]=f,g>0)for(S=0;f>S;S+=v)E[b++]=S,E[b++]=S+f;var T=new c;T.position=new u({componentDatatype:n.DOUBLE,componentsPerAttribute:3,values:y}),m.x=.5*a,m.y=Math.max(p,s);var x=new e(i.ZERO,t.magnitude(m));return new l({attributes:T,indices:E,primitiveType:d.LINES,boundingSphere:x})}},p}),define("Cesium/Core/DefaultProxy",[],function(){"use strict";function e(e){this.proxy=e}return e.prototype.getURL=function(e){return this.proxy+"?"+encodeURIComponent(e)},e}),define("Cesium/Core/oneTimeWarning",["./defaultValue","./defined","./DeveloperError"],function(e,t,i){"use strict";function n(i,n){t(r[i])||(r[i]=!0,console.log(e(n,i)))}var r={};return n.geometryOutlines="Entity geometry outlines are unsupported on terrain. Outlines will be disabled. To enable outlines, disable geometry terrain clamping by explicitly setting height to 0.",n}),define("Cesium/Core/deprecationWarning",["./defined","./DeveloperError","./oneTimeWarning"],function(e,t,i){"use strict";function n(e,t){i(e,t)}return n}),define("Cesium/ThirdParty/Tween",[],function(){void 0===Date.now&&(Date.now=function(){return(new Date).valueOf()});var e=e||function(){var e=[];return{REVISION:"13",getAll:function(){return e},removeAll:function(){e=[]},add:function(t){e.push(t)},remove:function(t){var i=e.indexOf(t);-1!==i&&e.splice(i,1)},update:function(t){if(0===e.length)return!1;var i=0;for(t=void 0!==t?t:"undefined"!=typeof window&&void 0!==window.performance&&void 0!==window.performance.now?window.performance.now():Date.now();ie;e++)f[e].stop()},this.delay=function(e){return h=e,this},this.repeat=function(e){return s=e,this},this.yoyo=function(e){return l=e,this},this.easing=function(e){return p=e,this},this.interpolation=function(e){return m=e,this},this.chain=function(){return f=arguments,this},this.onStart=function(e){return g=e,this},this.onUpdate=function(e){return _=e,this},this.onComplete=function(e){return y=e,this},this.onStop=function(e){return C=e,this},this.update=function(e){var t;if(d>e)return!0;v===!1&&(null!==g&&g.call(i),v=!0);var u=(e-d)/a;u=u>1?1:u;var C=p(u);for(t in r){var w=n[t]||0,E=r[t];E instanceof Array?i[t]=m(E,C):("string"==typeof E&&(E=w+parseFloat(E,10)),"number"==typeof E&&(i[t]=w+(E-w)*C))}if(null!==_&&_.call(i,C),1==u){if(s>0){isFinite(s)&&s--;for(t in o){if("string"==typeof r[t]&&(o[t]=o[t]+parseFloat(r[t],10)),l){var b=o[t];o[t]=r[t],r[t]=b}n[t]=o[t]}return l&&(c=!c),d=e+h,!0}null!==y&&y.call(i);for(var S=0,T=f.length;T>S;S++)f[S].start(e);return!1}return!0}},e.Easing={Linear:{None:function(e){return e}},Quadratic:{In:function(e){return e*e},Out:function(e){return e*(2-e)},InOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}},Cubic:{In:function(e){return e*e*e},Out:function(e){return--e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}},Quartic:{In:function(e){return e*e*e*e},Out:function(e){return 1- --e*e*e*e},InOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}},Quintic:{In:function(e){return e*e*e*e*e},Out:function(e){return--e*e*e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}},Sinusoidal:{In:function(e){return 1-Math.cos(e*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return.5*(1-Math.cos(Math.PI*e))}},Exponential:{In:function(e){return 0===e?0:Math.pow(1024,e-1)},Out:function(e){return 1===e?1:1-Math.pow(2,-10*e)},InOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(-Math.pow(2,-10*(e-1))+2)}},Circular:{In:function(e){return 1-Math.sqrt(1-e*e)},Out:function(e){return Math.sqrt(1- --e*e)},InOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}},Elastic:{In:function(e){var t,i=.1,n=.4;return 0===e?0:1===e?1:(!i||1>i?(i=1,t=n/4):t=n*Math.asin(1/i)/(2*Math.PI),-(i*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)))},Out:function(e){var t,i=.1,n=.4;return 0===e?0:1===e?1:(!i||1>i?(i=1,t=n/4):t=n*Math.asin(1/i)/(2*Math.PI),i*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/n)+1)},InOut:function(e){var t,i=.1,n=.4;return 0===e?0:1===e?1:(!i||1>i?(i=1,t=n/4):t=n*Math.asin(1/i)/(2*Math.PI),(e*=2)<1?-.5*(i*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)):i*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)*.5+1)}},Back:{In:function(e){var t=1.70158;return e*e*((t+1)*e-t)},Out:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},InOut:function(e){var t=2.5949095;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)}},Bounce:{In:function(t){return 1-e.Easing.Bounce.Out(1-t)},Out:function(e){return 1/2.75>e?7.5625*e*e:2/2.75>e?7.5625*(e-=1.5/2.75)*e+.75:2.5/2.75>e?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},InOut:function(t){return.5>t?.5*e.Easing.Bounce.In(2*t):.5*e.Easing.Bounce.Out(2*t-1)+.5}}},e.Interpolation={Linear:function(t,i){var n=t.length-1,r=n*i,o=Math.floor(r),a=e.Interpolation.Utils.Linear;return 0>i?a(t[0],t[1],r):i>1?a(t[n],t[n-1],n-r):a(t[o],t[o+1>n?n:o+1],r-o)},Bezier:function(t,i){var n,r=0,o=t.length-1,a=Math.pow,s=e.Interpolation.Utils.Bernstein;for(n=0;o>=n;n++)r+=a(1-i,o-n)*a(i,n)*t[n]*s(o,n);return r},CatmullRom:function(t,i){var n=t.length-1,r=n*i,o=Math.floor(r),a=e.Interpolation.Utils.CatmullRom;return t[0]===t[n]?(0>i&&(o=Math.floor(r=n*(1+i))),a(t[(o-1+n)%n],t[o],t[(o+1)%n],t[(o+2)%n],r-o)):0>i?t[0]-(a(t[0],t[0],t[1],t[1],-r)-t[0]):i>1?t[n]-(a(t[n],t[n],t[n-1],t[n-1],r-n)-t[n]):a(t[o?o-1:0],t[o],t[o+1>n?n:o+1],t[o+2>n?n:o+2],r-o)},Utils:{Linear:function(e,t,i){return(t-e)*i+e},Bernstein:function(t,i){var n=e.Interpolation.Utils.Factorial;return n(t)/n(i)/n(t-i)},Factorial:function(){var e=[1];return function(t){var i,n=1;if(e[t])return e[t];for(i=t;i>1;i--)n*=i;return e[t]=n}}(),CatmullRom:function(e,t,i,n,r){var o=.5*(i-e),a=.5*(n-t),s=r*r,l=r*s;return(2*t-2*i+o+a)*l+(-3*t+3*i-2*o-a)*s+o*r+t}}},e}),define("Cesium/Core/EasingFunction",["../ThirdParty/Tween","./freezeObject"],function(e,t){"use strict";var i={LINEAR_NONE:e.Easing.Linear.None,QUADRACTIC_IN:e.Easing.Quadratic.In,QUADRACTIC_OUT:e.Easing.Quadratic.Out,QUADRACTIC_IN_OUT:e.Easing.Quadratic.InOut,CUBIC_IN:e.Easing.Cubic.In,CUBIC_OUT:e.Easing.Cubic.Out,CUBIC_IN_OUT:e.Easing.Cubic.InOut,QUARTIC_IN:e.Easing.Quartic.In,QUARTIC_OUT:e.Easing.Quartic.Out,QUARTIC_IN_OUT:e.Easing.Quartic.InOut,QUINTIC_IN:e.Easing.Quintic.In,QUINTIC_OUT:e.Easing.Quintic.Out,QUINTIC_IN_OUT:e.Easing.Quintic.InOut,SINUSOIDAL_IN:e.Easing.Sinusoidal.In,SINUSOIDAL_OUT:e.Easing.Sinusoidal.Out,SINUSOIDAL_IN_OUT:e.Easing.Sinusoidal.InOut,EXPONENTIAL_IN:e.Easing.Exponential.In,EXPONENTIAL_OUT:e.Easing.Exponential.Out,EXPONENTIAL_IN_OUT:e.Easing.Exponential.InOut,CIRCULAR_IN:e.Easing.Circular.In,CIRCULAR_OUT:e.Easing.Circular.Out,CIRCULAR_IN_OUT:e.Easing.Circular.InOut,ELASTIC_IN:e.Easing.Elastic.In,ELASTIC_OUT:e.Easing.Elastic.Out,ELASTIC_IN_OUT:e.Easing.Elastic.InOut,BACK_IN:e.Easing.Back.In,BACK_OUT:e.Easing.Back.Out,BACK_IN_OUT:e.Easing.Back.InOut,BOUNCE_IN:e.Easing.Bounce.In,BOUNCE_OUT:e.Easing.Bounce.Out,BOUNCE_IN_OUT:e.Easing.Bounce.InOut};return t(i)}),define("Cesium/Core/EllipsoidGeometry",["./BoundingSphere","./Cartesian2","./Cartesian3","./ComponentDatatype","./defaultValue","./defined","./DeveloperError","./Ellipsoid","./Geometry","./GeometryAttribute","./GeometryAttributes","./IndexDatatype","./Math","./PrimitiveType","./VertexFormat"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m){"use strict";function f(e){e=r(e,r.EMPTY_OBJECT);var t=r(e.radii,w),n=r(e.stackPartitions,64),o=r(e.slicePartitions,64),a=r(e.vertexFormat,m.DEFAULT);this._radii=i.clone(t),this._stackPartitions=n,this._slicePartitions=o,this._vertexFormat=m.clone(a),this._workerName="createEllipsoidGeometry"}var g=new i,v=new i,_=new i,y=new i,C=new i,w=new i(1,1,1),E=Math.cos,b=Math.sin;f.packedLength=i.packedLength+m.packedLength+2,f.pack=function(e,t,n){n=r(n,0),i.pack(e._radii,t,n),n+=i.packedLength,m.pack(e._vertexFormat,t,n),n+=m.packedLength,t[n++]=e._stackPartitions,t[n]=e._slicePartitions};var S=new i,T=new m,x={radii:S,vertexFormat:T,stackPartitions:void 0,slicePartitions:void 0};return f.unpack=function(e,t,n){t=r(t,0);var a=i.unpack(e,t,S);t+=i.packedLength;var s=m.unpack(e,t,T);t+=m.packedLength;var l=e[t++],u=e[t];return o(n)?(n._radii=i.clone(a,n._radii),n._vertexFormat=m.clone(s,n._vertexFormat),n._stackPartitions=l,n._slicePartitions=u,n):(x.stackPartitions=l,x.slicePartitions=u,new f(x))},f.createGeometry=function(r){var o=r._radii;if(!(o.x<=0||o.y<=0||o.z<=0)){var a,m,f=s.fromCartesian3(o),w=r._vertexFormat,S=r._slicePartitions+1,T=r._stackPartitions+1,x=T*S,A=new Float64Array(3*x),P=6*(S-1)*(T-2),M=h.createTypedArray(x,P),D=w.normal?new Float32Array(3*x):void 0,I=w.tangent?new Float32Array(3*x):void 0,R=w.binormal?new Float32Array(3*x):void 0,O=w.st?new Float32Array(2*x):void 0,L=new Array(S),N=new Array(S),F=0;for(a=0;S>a;a++){var k=d.TWO_PI*a/(S-1);L[a]=E(k),N[a]=b(k),A[F++]=0,A[F++]=0,A[F++]=o.z}for(a=1;T-1>a;a++){var B=Math.PI*a/(T-1),z=b(B),V=o.x*z,U=o.y*z,G=o.z*E(B);for(m=0;S>m;m++)A[F++]=L[m]*V,A[F++]=N[m]*U,A[F++]=G}for(a=0;S>a;a++)A[F++]=0,A[F++]=0,A[F++]=-o.z;var W=new c;w.position&&(W.position=new u({componentDatatype:n.DOUBLE,componentsPerAttribute:3,values:A}));var H=0,q=0,j=0,Y=0;if(w.st||w.normal||w.tangent||w.binormal){for(a=0;x>a;a++){var X=i.fromArray(A,3*a,g),Z=f.geodeticSurfaceNormal(X,v);if(w.st){var K=t.negate(Z,C);t.magnitude(K)A.length&&(F=3*(a-S*Math.floor(.5*T))),i.fromArray(A,F,K),f.geodeticSurfaceNormal(K,K),t.negate(K,K)),O[H++]=Math.atan2(K.y,K.x)/d.TWO_PI+.5,O[H++]=Math.asin(Z.z)/Math.PI+.5}if(w.normal&&(D[q++]=Z.x,D[q++]=Z.y,D[q++]=Z.z),w.tangent||w.binormal){var J=_;if(S>a||a>x-S-1?(i.cross(i.UNIT_X,Z,J),i.normalize(J,J)):(i.cross(i.UNIT_Z,Z,J),i.normalize(J,J)),w.tangent&&(I[j++]=J.x,I[j++]=J.y,I[j++]=J.z),w.binormal){var Q=i.cross(Z,J,y);i.normalize(Q,Q),R[Y++]=Q.x,R[Y++]=Q.y,R[Y++]=Q.z}}}w.st&&(W.st=new u({componentDatatype:n.FLOAT,componentsPerAttribute:2,values:O})),w.normal&&(W.normal=new u({componentDatatype:n.FLOAT,componentsPerAttribute:3,values:D})),w.tangent&&(W.tangent=new u({componentDatatype:n.FLOAT,componentsPerAttribute:3,values:I})),w.binormal&&(W.binormal=new u({componentDatatype:n.FLOAT,componentsPerAttribute:3,values:R}))}for(F=0,m=0;S-1>m;m++)M[F++]=S+m,M[F++]=S+m+1,M[F++]=m+1;var $,ee;for(a=1;T-2>a;a++)for($=a*S,ee=(a+1)*S,m=0;S-1>m;m++)M[F++]=ee+m,M[F++]=ee+m+1,M[F++]=$+m+1,M[F++]=ee+m,M[F++]=$+m+1,M[F++]=$+m;for(a=T-2,$=a*S,ee=(a+1)*S,m=0;S-1>m;m++)M[F++]=ee+m,M[F++]=$+m+1,M[F++]=$+m;return new l({attributes:W,indices:M,primitiveType:p.TRIANGLES,boundingSphere:e.fromEllipsoid(f)})}},f}),define("Cesium/Core/EllipsoidOutlineGeometry",["./BoundingSphere","./Cartesian3","./ComponentDatatype","./defaultValue","./defined","./DeveloperError","./Ellipsoid","./Geometry","./GeometryAttribute","./GeometryAttributes","./IndexDatatype","./Math","./PrimitiveType"],function(e,t,i,n,r,o,a,s,l,u,c,h,d){"use strict";function p(e){e=n(e,n.EMPTY_OBJECT);var i=n(e.radii,m),r=n(e.stackPartitions,10),o=n(e.slicePartitions,8),a=n(e.subdivisions,128);this._radii=t.clone(i),this._stackPartitions=r,this._slicePartitions=o,this._subdivisions=a,this._workerName="createEllipsoidOutlineGeometry"}var m=new t(1,1,1),f=Math.cos,g=Math.sin;p.packedLength=t.packedLength+3,p.pack=function(e,i,r){r=n(r,0),t.pack(e._radii,i,r),r+=t.packedLength,i[r++]=e._stackPartitions,i[r++]=e._slicePartitions,i[r]=e._subdivisions};var v=new t,_={radii:v,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0};return p.unpack=function(e,i,o){i=n(i,0);var a=t.unpack(e,i,v);i+=t.packedLength;var s=e[i++],l=e[i++],u=e[i++];return r(o)?(o._radii=t.clone(a,o._radii),o._stackPartitions=s,o._slicePartitions=l,o._subdivisions=u,o):(_.stackPartitions=s,_.slicePartitions=l,_.subdivisions=u,new p(_))},p.createGeometry=function(t){var n=t._radii;if(!(n.x<=0||n.y<=0||n.z<=0)){var r,o,p,m,v,_,y=a.fromCartesian3(n),C=t._stackPartitions,w=t._slicePartitions,E=t._subdivisions,b=E*(C+w-1),S=b-w+2,T=new Float64Array(3*S),x=c.createTypedArray(S,2*b),A=0,P=new Array(E),M=new Array(E);for(r=0;E>r;r++)p=h.TWO_PI*r/E,P[r]=f(p),M[r]=g(p);for(r=1;C>r;r++)for(m=Math.PI*r/C,v=f(m),_=g(m),o=0;E>o;o++)T[A++]=n.x*P[o]*_,T[A++]=n.y*M[o]*_,T[A++]=n.z*v;for(P.length=w,M.length=w,r=0;w>r;r++)p=h.TWO_PI*r/w,P[r]=f(p),M[r]=g(p);for(T[A++]=0,T[A++]=0,T[A++]=n.z,r=1;E>r;r++)for(m=Math.PI*r/E,v=f(m),_=g(m),o=0;w>o;o++)T[A++]=n.x*P[o]*_,T[A++]=n.y*M[o]*_,T[A++]=n.z*v;for(T[A++]=0,T[A++]=0,T[A++]=-n.z,A=0,r=0;C-1>r;++r){var D=r*E;for(o=0;E-1>o;++o)x[A++]=D+o,x[A++]=D+o+1;x[A++]=D+E-1,x[A++]=D}var I=E*(C-1);for(o=1;w+1>o;++o)x[A++]=I,x[A++]=I+o;for(r=0;E-2>r;++r){var R=r*w+1+I,O=(r+1)*w+1+I;for(o=0;w-1>o;++o)x[A++]=O+o,x[A++]=R+o;x[A++]=O+w-1,x[A++]=R+w-1}var L=T.length/3-1;for(o=L-1;o>L-w-1;--o)x[A++]=L,x[A++]=o;var N=new u({position:new l({componentDatatype:i.DOUBLE,componentsPerAttribute:3,values:T})});return new s({attributes:N,indices:x,primitiveType:d.LINES,boundingSphere:e.fromEllipsoid(y)})}},p}),define("Cesium/Core/EllipsoidTerrainProvider",["../ThirdParty/when","./defaultValue","./defined","./defineProperties","./Ellipsoid","./Event","./GeographicTilingScheme","./HeightmapTerrainData","./TerrainProvider"],function(e,t,i,n,r,o,a,s,l){"use strict";function u(n){n=t(n,{}),this._tilingScheme=n.tilingScheme,i(this._tilingScheme)||(this._tilingScheme=new a({ellipsoid:t(n.ellipsoid,r.WGS84)})),this._levelZeroMaximumGeometricError=l.getEstimatedLevelZeroGeometricErrorForAHeightmap(this._tilingScheme.ellipsoid,64,this._tilingScheme.getNumberOfXTilesAtLevel(0)),this._errorEvent=new o,this._readyPromise=e.resolve(!0)}return n(u.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){}},tilingScheme:{get:function(){return this._tilingScheme}},ready:{get:function(){return!0}},readyPromise:{get:function(){return this._readyPromise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}}}),u.prototype.requestTileGeometry=function(e,t,i,n){var r=16,o=16;return new s({buffer:new Uint8Array(r*o),width:r,height:o})},u.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<t;++t)e[t]();e.length=0},i}),define("Cesium/Core/ExtrapolationType",["./freezeObject"],function(e){"use strict";var t={NONE:0,HOLD:1,EXTRAPOLATE:2};return e(t)}),define("Cesium/Core/GeometryInstanceAttribute",["./defaultValue","./defined","./DeveloperError"],function(e,t,i){"use strict";function n(t){t=e(t,e.EMPTY_OBJECT),this.componentDatatype=t.componentDatatype,this.componentsPerAttribute=t.componentsPerAttribute,this.normalize=e(t.normalize,!1),this.value=t.value}return n}),define("Cesium/Core/getBaseUri",["../ThirdParty/Uri","./defined","./DeveloperError"],function(e,t,i){"use strict";function n(i,n){var r="",o=i.lastIndexOf("/");return-1!==o&&(r=i.substring(0,o+1)),n?(i=new e(i),t(i.query)&&(r+="?"+i.query),t(i.fragment)&&(r+="#"+i.fragment),r):r}return n}),define("Cesium/Core/getExtensionFromUri",["../ThirdParty/Uri","./defined","./DeveloperError"],function(e,t,i){"use strict";function n(t){var i=new e(t);i.normalize();var n=i.path,r=n.lastIndexOf("/");return-1!==r&&(n=n.substr(r+1)),r=n.lastIndexOf("."),n=-1===r?"":n.substr(r+1)}return n}),define("Cesium/Core/getFilenameFromUri",["../ThirdParty/Uri","./defined","./DeveloperError"],function(e,t,i){"use strict";function n(t){var i=new e(t);i.normalize();var n=i.path,r=n.lastIndexOf("/");return-1!==r&&(n=n.substr(r+1)),n}return n}),define("Cesium/Core/getStringFromTypedArray",["./defaultValue","./defined","./DeveloperError"],function(e,t,i){"use strict";function n(t,i,r){return i=e(i,0),r=e(r,t.byteLength-i),t=t.subarray(i,i+r),n.decode(t)}return n.decodeWithTextDecoder=function(e){var t=new TextDecoder("utf-8");return t.decode(e)},n.decodeWithFromCharCode=function(e){for(var t="",i=e.length,n=0;i>n;++n)t+=String.fromCharCode(e[n]);return t},"undefined"!=typeof TextDecoder?n.decode=n.decodeWithTextDecoder:n.decode=n.decodeWithFromCharCode,n}),define("Cesium/Core/getMagic",["../Core/defaultValue","../Core/getStringFromTypedArray"],function(e,t){"use strict";function i(i,n){return n=e(n,0),t(i,n,Math.min(4,i.length))}return i}),define("Cesium/Core/HeadingPitchRange",["./defaultValue","./defined"],function(e,t){"use strict";function i(t,i,n){this.heading=e(t,0),this.pitch=e(i,0),this.range=e(n,0)}return i.clone=function(e,n){return t(e)?(t(n)||(n=new i),n.heading=e.heading,n.pitch=e.pitch,n.range=e.range,n):void 0},i}),define("Cesium/Core/HermitePolynomialApproximation",["./defaultValue","./defined","./DeveloperError","./Math"],function(e,t,i,n){"use strict";function r(e,t,i,n,o,a){var s,l,u,c=0;if(n>0){for(l=0;o>l;l++){for(s=!1,u=0;ul;l++){for(s=!1,u=0;ud;d++){var p=Math.floor(d*h);for(s=0;c>s;s++)l=t[s]*o*(a+1)+d,e[p+s]=r[l];for(var m=1;c>m;m++){var f=0,g=Math.floor(m*(1-m)/2)+c*m,v=!1;for(s=0;c-m>s;s++){var _,y,C=i[t[s]],w=i[t[s+m]];if(0>=w-C)l=t[s]*o*(a+1)+o*m+d,_=r[l],y=_/n.factorial(m),e[p+g+f]=y,f++;else{var E=Math.floor((m-1)*(2-m)/2)+c*(m-1);_=e[p+E+s+1]-e[p+E+s],y=_/(w-C),e[p+g+f]=y,f++}v=v||0!==_}v&&(u=Math.max(u,m))}}return u}var a=n.factorial,s={type:"Hermite"};s.getRequiredDataPoints=function(t,i){return i=e(i,0),Math.max(Math.floor((t+1)/(i+1)),2)},s.interpolateOrderZero=function(e,i,n,o,s){t(s)||(s=new Array(o));var l,u,c,h,d,p,m=i.length,f=new Array(o);for(l=0;o>l;l++){s[l]=0;var g=new Array(m);for(f[l]=g,u=0;m>u;u++)g[u]=[]}var v=m,_=new Array(v);for(l=0;v>l;l++)_[l]=l;var y=m-1;for(h=0;o>h;h++){for(u=0;v>u;u++)p=_[u]*o+h,f[h][0].push(n[p]);for(l=1;v>l;l++){var C=!1;for(u=0;v-l>u;u++){var w,E=i[_[u]],b=i[_[u+l]];0>=b-E?(p=_[u]*o+o*l+h,w=n[p],f[h][l].push(w/a(l))):(w=f[h][l-1][u+1]-f[h][l-1][u],f[h][l].push(w/(b-E))),C=C||0!==w}C||(y=l-1)}}for(c=0,d=0;d>=c;c++)for(l=c;y>=l;l++){var S=r(e,_,i,c,l,[]);for(h=0;o>h;h++){var T=f[h][l][0];s[h+c*o]+=T*S}}return s};var l=[];return s.interpolate=function(e,i,n,a,s,u,c){var h=a*(u+1);t(c)||(c=new Array(h));for(var d=0;h>d;d++)c[d]=0;for(var p=i.length,m=new Array(p*(s+1)),f=0;p>f;f++)for(var g=0;s+1>g;g++)m[f*(s+1)+g]=f;for(var v=m.length,_=l,y=o(_,m,i,n,a,s),C=[],w=v*(v+1)/2,E=Math.min(y,u),b=0;E>=b;b++)for(f=b;y>=f;f++){C.length=0;for(var S=r(e,m,i,b,f,C),T=Math.floor(f*(1-f)/2)+v*f,x=0;a>x;x++){var A=Math.floor(x*w),P=_[A+T];c[x+b*a]+=P*S}}return c},s}),define("Cesium/Core/IauOrientationParameters",[],function(){"use strict";function e(e,t,i,n){this.rightAscension=e,this.declination=t,this.rotation=i,this.rotationRate=n}return e}),define("Cesium/Core/Iau2000Orientation",["./defined","./IauOrientationParameters","./JulianDate","./Math","./TimeConstants"],function(e,t,i,n,r){"use strict";var o={},a=32.184,s=2451545,l=-.0529921,u=-.1059842,c=13.0120009,h=13.3407154,d=.9856003,p=26.4057084,m=13.064993,f=.3287146,g=1.7484877,v=-.1589763,_=.0036096,y=.1643573,C=12.9590088,w=new i;return o.ComputeMoon=function(o,E){e(o)||(o=i.now()),w=i.addSeconds(o,a,w);var b=i.totalDays(w)-s,S=b/r.DAYS_PER_JULIAN_CENTURY,T=(125.045+l*b)*n.RADIANS_PER_DEGREE,x=(250.089+u*b)*n.RADIANS_PER_DEGREE,A=(260.008+c*b)*n.RADIANS_PER_DEGREE,P=(176.625+h*b)*n.RADIANS_PER_DEGREE,M=(357.529+d*b)*n.RADIANS_PER_DEGREE,D=(311.589+p*b)*n.RADIANS_PER_DEGREE,I=(134.963+m*b)*n.RADIANS_PER_DEGREE,R=(276.617+f*b)*n.RADIANS_PER_DEGREE,O=(34.226+g*b)*n.RADIANS_PER_DEGREE,L=(15.134+v*b)*n.RADIANS_PER_DEGREE,N=(119.743+_*b)*n.RADIANS_PER_DEGREE,F=(239.961+y*b)*n.RADIANS_PER_DEGREE,k=(25.053+C*b)*n.RADIANS_PER_DEGREE,B=Math.sin(T),z=Math.sin(x),V=Math.sin(A),U=Math.sin(P),G=Math.sin(M),W=Math.sin(D),H=Math.sin(I),q=Math.sin(R),j=Math.sin(O),Y=Math.sin(L),X=Math.sin(N),Z=Math.sin(F),K=Math.sin(k),J=Math.cos(T),Q=Math.cos(x),$=Math.cos(A),ee=Math.cos(P),te=Math.cos(M),ie=Math.cos(D),ne=Math.cos(I),re=Math.cos(R),oe=Math.cos(O),ae=Math.cos(L),se=Math.cos(N),le=Math.cos(F),ue=Math.cos(k),ce=(269.9949+.0031*S-3.8787*B-.1204*z+.07*V-.0172*U+.0072*W-.0052*Y+.0043*K)*n.RADIANS_PER_DEGREE,he=(66.5392+.013*S+1.5419*J+.0239*Q-.0278*$+.0068*ee-.0029*ie+9e-4*ne+8e-4*ae-9e-4*ue)*n.RADIANS_PER_DEGREE,de=(38.3213+13.17635815*b-1.4e-12*b*b+3.561*B+.1208*z-.0642*V+.0158*U+.0252*G-.0066*W-.0047*H-.0046*q+.0028*j+.0052*Y+.004*X+.0019*Z-.0044*K)*n.RADIANS_PER_DEGREE,pe=(13.17635815-1.4e-12*(2*b)+3.561*J*l+.1208*Q*u-.0642*$*c+.0158*ee*h+.0252*te*d-.0066*ie*p-.0047*ne*m-.0046*re*f+.0028*oe*g+.0052*ae*v+.004*se*_+.0019*le*y-.0044*ue*C)/86400*n.RADIANS_PER_DEGREE;return e(E)||(E=new t),E.rightAscension=ce,E.declination=he,E.rotation=de,E.rotationRate=pe,E},o}),define("Cesium/Core/IauOrientationAxes",["./Cartesian3","./defined","./Iau2000Orientation","./JulianDate","./Math","./Matrix3","./Quaternion"],function(e,t,i,n,r,o,a){"use strict";function s(e){t(e)&&"function"==typeof e||(e=i.ComputeMoon),this._computeFunction=e}function l(i,n,a){var s=u;s.x=Math.cos(i+r.PI_OVER_TWO),s.y=Math.sin(i+r.PI_OVER_TWO),s.z=0;var l=Math.cos(n),d=h;d.x=l*Math.cos(i),d.y=l*Math.sin(i),d.z=Math.sin(n);var p=e.cross(d,s,c);return t(a)||(a=new o),a[0]=s.x,a[1]=p.x,a[2]=d.x,a[3]=s.y,a[4]=p.y,a[5]=d.y,a[6]=s.z,a[7]=p.z,a[8]=d.z,a}var u=new e,c=new e,h=new e,d=new o,p=new a;return s.prototype.evaluate=function(i,s){t(i)||(i=n.now());var u=this._computeFunction(i),c=l(u.rightAscension,u.declination,s),h=r.zeroToTwoPi(u.rotation),m=a.fromAxisAngle(e.UNIT_Z,h,p),f=o.fromQuaternion(a.conjugate(m,m),d),g=o.multiply(f,c,c);return g},s}),define("Cesium/Core/InterpolationAlgorithm",["./DeveloperError"],function(e){"use strict";var t={};return t.type=void 0,t.getRequiredDataPoints=e.throwInstantiationError,t.interpolateOrderZero=e.throwInstantiationError,t.interpolate=e.throwInstantiationError,t}),define("Cesium/Core/TimeInterval",["./defaultValue","./defined","./defineProperties","./DeveloperError","./freezeObject","./JulianDate"],function(e,t,i,n,r,o){"use strict";function a(i){i=e(i,e.EMPTY_OBJECT),this.start=t(i.start)?o.clone(i.start):new o,this.stop=t(i.stop)?o.clone(i.stop):new o,this.data=i.data,this.isStartIncluded=e(i.isStartIncluded,!0),this.isStopIncluded=e(i.isStopIncluded,!0)}i(a.prototype,{isEmpty:{get:function(){var e=o.compare(this.stop,this.start);return 0>e||0===e&&(!this.isStartIncluded||!this.isStopIncluded)}}});var s={start:void 0,stop:void 0,isStartIncluded:void 0,isStopIncluded:void 0,data:void 0};return a.fromIso8601=function(i,n){var r=i.iso8601.split("/"),l=o.fromIso8601(r[0]),u=o.fromIso8601(r[1]),c=e(i.isStartIncluded,!0),h=e(i.isStopIncluded,!0),d=i.data;return t(n)?(n.start=l,n.stop=u,n.isStartIncluded=c,n.isStopIncluded=h,n.data=d,n):(s.start=l,s.stop=u,s.isStartIncluded=c,s.isStopIncluded=h,s.data=d,new a(s))},a.toIso8601=function(e,t){return o.toIso8601(e.start,t)+"/"+o.toIso8601(e.stop,t)},a.clone=function(e,i){return t(e)?t(i)?(i.start=e.start,i.stop=e.stop,i.isStartIncluded=e.isStartIncluded,i.isStopIncluded=e.isStopIncluded,i.data=e.data,i):new a(e):void 0},a.equals=function(e,i,n){return e===i||t(e)&&t(i)&&(e.isEmpty&&i.isEmpty||e.isStartIncluded===i.isStartIncluded&&e.isStopIncluded===i.isStopIncluded&&o.equals(e.start,i.start)&&o.equals(e.stop,i.stop)&&(e.data===i.data||t(n)&&n(e.data,i.data)))},a.equalsEpsilon=function(e,i,n,r){return e===i||t(e)&&t(i)&&(e.isEmpty&&i.isEmpty||e.isStartIncluded===i.isStartIncluded&&e.isStopIncluded===i.isStopIncluded&&o.equalsEpsilon(e.start,i.start,n)&&o.equalsEpsilon(e.stop,i.stop,n)&&(e.data===i.data||t(r)&&r(e.data,i.data)))},a.intersect=function(e,i,n,r){if(!t(i))return a.clone(a.EMPTY,n);var s=e.start,l=e.stop,u=i.start,c=i.stop,h=o.greaterThanOrEquals(u,s)&&o.greaterThanOrEquals(l,u),d=!h&&o.lessThanOrEquals(u,s)&&o.lessThanOrEquals(s,c);if(!h&&!d)return a.clone(a.EMPTY,n);var p=e.isStartIncluded,m=e.isStopIncluded,f=i.isStartIncluded,g=i.isStopIncluded,v=o.lessThan(l,c);return n.start=h?u:s,n.isStartIncluded=p&&f||!o.equals(u,s)&&(h&&f||d&&p),n.stop=v?l:c,n.isStopIncluded=v?m:m&&g||!o.equals(c,l)&&g,n.data=t(r)?r(e.data,i.data):e.data,n},a.contains=function(e,t){if(e.isEmpty)return!1;var i=o.compare(e.start,t);if(0===i)return e.isStartIncluded;var n=o.compare(t,e.stop);return 0===n?e.isStopIncluded:0>i&&0>n},a.prototype.clone=function(e){return a.clone(this,e)},a.prototype.equals=function(e,t){return a.equals(this,e,t)},a.prototype.equalsEpsilon=function(e,t,i){return a.equalsEpsilon(this,e,t,i)},a.prototype.toString=function(){return a.toIso8601(this)},a.EMPTY=r(new a({start:new o,stop:new o,isStartIncluded:!1,isStopIncluded:!1})),a}),define("Cesium/Core/Iso8601",["./freezeObject","./JulianDate","./TimeInterval"],function(e,t,i){"use strict";var n=e(t.fromIso8601("0000-01-01T00:00:00Z")),r=e(t.fromIso8601("9999-12-31T24:00:00Z")),o=e(new i({start:n,stop:r})),a={MINIMUM_VALUE:n,MAXIMUM_VALUE:r,MAXIMUM_INTERVAL:o};return a}),define("Cesium/Core/KeyboardEventModifier",["./freezeObject"],function(e){"use strict";var t={SHIFT:0,CTRL:1,ALT:2};return e(t)}),define("Cesium/Core/LagrangePolynomialApproximation",["./defined"],function(e){"use strict";var t={type:"Lagrange"};return t.getRequiredDataPoints=function(e){return Math.max(e+1,2)},t.interpolateOrderZero=function(t,i,n,r,o){e(o)||(o=new Array(r));var a,s,l=i.length;for(a=0;r>a;a++)o[a]=0;for(a=0;l>a;a++){var u=1;for(s=0;l>s;s++)if(s!==a){var c=i[a]-i[s];u*=(t-i[s])/c}for(s=0;r>s;s++)o[s]+=u*n[a*r+s]}return o},t}),define("Cesium/Core/LinearApproximation",["./defined","./DeveloperError"],function(e,t){"use strict";var i={type:"Linear"};return i.getRequiredDataPoints=function(e){return 2},i.interpolateOrderZero=function(t,i,n,r,o){e(o)||(o=new Array(r));var a,s,l,u=i[0],c=i[1];for(a=0;r>a;a++)s=n[a],l=n[a+r],o[a]=((l-s)*t+c*s-u*l)/(c-u);return o},i}),define("Cesium/Core/loadBlob",["./loadWithXhr"],function(e){"use strict";function t(t,i){return e({url:t,responseType:"blob",headers:i})}return t}),define("Cesium/Core/loadImageFromTypedArray",["../ThirdParty/when","./defined","./DeveloperError","./loadImage"],function(e,t,i,n){"use strict";function r(t,i){var r=new Blob([t],{type:i}),o=window.URL.createObjectURL(r);return n(o,!1).then(function(e){return window.URL.revokeObjectURL(o),e},function(t){return window.URL.revokeObjectURL(o),e.reject(t)})}return r}),define("Cesium/Core/loadImageViaBlob",["../ThirdParty/when","./loadBlob","./loadImage"],function(e,t,i){"use strict";function n(n){return r.test(n)?i(n):t(n).then(function(t){var n=window.URL.createObjectURL(t);return i(n,!1).then(function(e){return e.blob=t,window.URL.revokeObjectURL(n),e},function(t){return window.URL.revokeObjectURL(n),e.reject(t)})})}var r=/^data:/,o=function(){try{var e=new XMLHttpRequest;return e.open("GET","#",!0),e.responseType="blob","blob"===e.responseType}catch(t){return!1}}();return o?n:i}),define("Cesium/Core/objectToQuery",["./defined","./DeveloperError","./isArray"],function(e,t,i){"use strict";function n(e){var t="";for(var n in e)if(e.hasOwnProperty(n)){var r=e[n],o=encodeURIComponent(n)+"=";if(i(r))for(var a=0,s=r.length;s>a;++a)t+=o+encodeURIComponent(r[a])+"&";else t+=o+encodeURIComponent(r)+"&"}return t=t.slice(0,-1)}return n}),define("Cesium/Core/queryToObject",["./defined","./DeveloperError","./isArray"],function(e,t,i){"use strict";function n(t){var n={};if(""===t)return n;for(var r=t.replace(/\+/g,"%20").split("&"),o=0,a=r.length;a>o;++o){var s=r[o].split("="),l=decodeURIComponent(s[0]),u=s[1];u=e(u)?decodeURIComponent(u):"";var c=n[l];"string"==typeof c?n[l]=[c,u]:i(c)?c.push(u):n[l]=u}return n}return n}),define("Cesium/Core/loadJsonp",["../ThirdParty/Uri","../ThirdParty/when","./combine","./defaultValue","./defined","./DeveloperError","./objectToQuery","./queryToObject"],function(e,t,i,n,r,o,a,s){ +"use strict";function l(o,u){u=n(u,n.EMPTY_OBJECT);var c;do c="loadJsonp"+Math.random().toString().substring(2,8);while(r(window[c]));var h=t.defer();window[c]=function(e){h.resolve(e);try{delete window[c]}catch(t){window[c]=void 0}};var d=new e(o),p=s(n(d.query,""));r(u.parameters)&&(p=i(u.parameters,p));var m=n(u.callbackParameterName,"callback");p[m]=c,d.query=a(p),o=d.toString();var f=u.proxy;return r(f)&&(o=f.getURL(o)),l.loadAndExecuteScript(o,c,h),h.promise}return l.loadAndExecuteScript=function(e,t,i){var n=document.createElement("script");n.async=!0,n.src=e;var r=document.getElementsByTagName("head")[0];n.onload=function(){n.onload=void 0,r.removeChild(n)},n.onerror=function(e){i.reject(e)},r.appendChild(n)},l.defaultLoadAndExecuteScript=l.loadAndExecuteScript,l}),define("Cesium/Core/loadXML",["./loadWithXhr"],function(e){"use strict";function t(t,i){return e({url:t,responseType:"document",headers:i,overrideMimeType:"text/xml"})}return t}),define("Cesium/Core/MapboxApi",["./defined"],function(e){"use strict";var t={};t.defaultAccessToken=void 0;var i=!1;return t.getAccessToken=function(n){return e(n)?n:e(t.defaultAccessToken)?t.defaultAccessToken:(i||(console.log("This application is using Cesium's default Mapbox access token. Please create a new access token for the application as soon as possible and prior to deployment by visiting https://www.mapbox.com/account/apps/, and provide your token to Cesium by setting the Cesium.MapboxApi.defaultAccessToken property before constructing the CesiumWidget or any other object that uses the Mapbox API."),i=!0),"pk.eyJ1IjoiYW5hbHl0aWNhbGdyYXBoaWNzIiwiYSI6IjA2YzBjOTM3YzFlYzljYmQ5NDAxZWI1Y2ZjNzZlM2E1In0.vDZL2SPFEpi_f7ziAIP_yw")},t}),define("Cesium/Core/MapProjection",["./defineProperties","./DeveloperError"],function(e,t){"use strict";function i(){t.throwInstantiationError()}return e(i.prototype,{ellipsoid:{get:t.throwInstantiationError}}),i.prototype.project=t.throwInstantiationError,i.prototype.unproject=t.throwInstantiationError,i}),define("Cesium/Core/Matrix2",["./Cartesian2","./defaultValue","./defined","./defineProperties","./DeveloperError","./freezeObject"],function(e,t,i,n,r,o){"use strict";function a(e,i,n,r){this[0]=t(e,0),this[1]=t(n,0),this[2]=t(i,0),this[3]=t(r,0)}a.packedLength=4,a.pack=function(e,i,n){n=t(n,0),i[n++]=e[0],i[n++]=e[1],i[n++]=e[2],i[n++]=e[3]},a.unpack=function(e,n,r){return n=t(n,0),i(r)||(r=new a),r[0]=e[n++],r[1]=e[n++],r[2]=e[n++],r[3]=e[n++],r},a.clone=function(e,t){return i(e)?i(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):new a(e[0],e[2],e[1],e[3]):void 0},a.fromArray=function(e,n,r){return n=t(n,0),i(r)||(r=new a),r[0]=e[n],r[1]=e[n+1],r[2]=e[n+2],r[3]=e[n+3],r},a.fromColumnMajorArray=function(e,t){return a.clone(e,t)},a.fromRowMajorArray=function(e,t){return i(t)?(t[0]=e[0],t[1]=e[2],t[2]=e[1],t[3]=e[3],t):new a(e[0],e[1],e[2],e[3])},a.fromScale=function(e,t){return i(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=e.y,t):new a(e.x,0,0,e.y)},a.fromUniformScale=function(e,t){return i(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=e,t):new a(e,0,0,e)},a.fromRotation=function(e,t){var n=Math.cos(e),r=Math.sin(e);return i(t)?(t[0]=n,t[1]=r,t[2]=-r,t[3]=n,t):new a(n,-r,r,n)},a.toArray=function(e,t){return i(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):[e[0],e[1],e[2],e[3]]},a.getElementIndex=function(e,t){return 2*e+t},a.getColumn=function(e,t,i){var n=2*t,r=e[n],o=e[n+1];return i.x=r,i.y=o,i},a.setColumn=function(e,t,i,n){n=a.clone(e,n);var r=2*t;return n[r]=i.x,n[r+1]=i.y,n},a.getRow=function(e,t,i){var n=e[t],r=e[t+2];return i.x=n,i.y=r,i},a.setRow=function(e,t,i,n){return n=a.clone(e,n),n[t]=i.x,n[t+2]=i.y,n};var s=new e;a.getScale=function(t,i){return i.x=e.magnitude(e.fromElements(t[0],t[1],s)),i.y=e.magnitude(e.fromElements(t[2],t[3],s)),i};var l=new e;return a.getMaximumScale=function(t){return a.getScale(t,l),e.maximumComponent(l)},a.multiply=function(e,t,i){var n=e[0]*t[0]+e[2]*t[1],r=e[0]*t[2]+e[2]*t[3],o=e[1]*t[0]+e[3]*t[1],a=e[1]*t[2]+e[3]*t[3];return i[0]=n,i[1]=o,i[2]=r,i[3]=a,i},a.add=function(e,t,i){return i[0]=e[0]+t[0],i[1]=e[1]+t[1],i[2]=e[2]+t[2],i[3]=e[3]+t[3],i},a.subtract=function(e,t,i){return i[0]=e[0]-t[0],i[1]=e[1]-t[1],i[2]=e[2]-t[2],i[3]=e[3]-t[3],i},a.multiplyByVector=function(e,t,i){var n=e[0]*t.x+e[2]*t.y,r=e[1]*t.x+e[3]*t.y;return i.x=n,i.y=r,i},a.multiplyByScalar=function(e,t,i){return i[0]=e[0]*t,i[1]=e[1]*t,i[2]=e[2]*t,i[3]=e[3]*t,i},a.multiplyByScale=function(e,t,i){return i[0]=e[0]*t.x,i[1]=e[1]*t.x,i[2]=e[2]*t.y,i[3]=e[3]*t.y,i},a.negate=function(e,t){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t},a.transpose=function(e,t){var i=e[0],n=e[2],r=e[1],o=e[3];return t[0]=i,t[1]=n,t[2]=r,t[3]=o,t},a.abs=function(e,t){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t},a.equals=function(e,t){return e===t||i(e)&&i(t)&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]},a.equalsArray=function(e,t,i){return e[0]===t[i]&&e[1]===t[i+1]&&e[2]===t[i+2]&&e[3]===t[i+3]},a.equalsEpsilon=function(e,t,n){return e===t||i(e)&&i(t)&&Math.abs(e[0]-t[0])<=n&&Math.abs(e[1]-t[1])<=n&&Math.abs(e[2]-t[2])<=n&&Math.abs(e[3]-t[3])<=n},a.IDENTITY=o(new a(1,0,0,1)),a.ZERO=o(new a(0,0,0,0)),a.COLUMN0ROW0=0,a.COLUMN0ROW1=1,a.COLUMN1ROW0=2,a.COLUMN1ROW1=3,n(a.prototype,{length:{get:function(){return a.packedLength}}}),a.prototype.clone=function(e){return a.clone(this,e)},a.prototype.equals=function(e){return a.equals(this,e)},a.prototype.equalsEpsilon=function(e,t){return a.equalsEpsilon(this,e,t)},a.prototype.toString=function(){return"("+this[0]+", "+this[2]+")\n("+this[1]+", "+this[3]+")"},a}),define("Cesium/Core/mergeSort",["./defined","./DeveloperError"],function(e,t){"use strict";function i(e,t,i,n,r,s){var l,u,c=r-n+1,h=s-r,d=o,p=a;for(l=0;c>l;++l)d[l]=e[n+l];for(u=0;h>u;++u)p[u]=e[r+u+1];l=0,u=0;for(var m=n;s>=m;++m){var f=d[l],g=p[u];c>l&&(u>=h||t(f,g,i)<=0)?(e[m]=f,++l):h>u&&(e[m]=g,++u)}}function n(e,t,r,o,a){if(!(o>=a)){var s=Math.floor(.5*(o+a));n(e,t,r,o,s),n(e,t,r,s+1,a),i(e,t,r,o,s,a)}}function r(e,t,i){var r=e.length,s=Math.ceil(.5*r);o.length=s,a.length=s,n(e,t,i,0,r-1),o.length=0,a.length=0}var o=[],a=[];return r}),define("Cesium/Core/NearFarScalar",["./defaultValue","./defined","./DeveloperError"],function(e,t,i){"use strict";function n(t,i,n,r){this.near=e(t,0),this.nearValue=e(i,0),this.far=e(n,1),this.farValue=e(r,0)}return n.clone=function(e,i){return t(e)?t(i)?(i.near=e.near,i.nearValue=e.nearValue,i.far=e.far,i.farValue=e.farValue,i):new n(e.near,e.nearValue,e.far,e.farValue):void 0},n.packedLength=4,n.pack=function(t,i,n){n=e(n,0),i[n++]=t.near,i[n++]=t.nearValue,i[n++]=t.far,i[n]=t.farValue},n.unpack=function(i,r,o){return r=e(r,0),t(o)||(o=new n),o.near=i[r++],o.nearValue=i[r++],o.far=i[r++],o.farValue=i[r],o},n.equals=function(e,i){return e===i||t(e)&&t(i)&&e.near===i.near&&e.nearValue===i.nearValue&&e.far===i.far&&e.farValue===i.farValue},n.prototype.clone=function(e){return n.clone(this,e)},n.prototype.equals=function(e){return n.equals(this,e)},n}),define("Cesium/Core/Visibility",["./freezeObject"],function(e){"use strict";var t={NONE:-1,PARTIAL:0,FULL:1};return e(t)}),define("Cesium/Core/Occluder",["./BoundingSphere","./Cartesian3","./defaultValue","./defined","./defineProperties","./DeveloperError","./Ellipsoid","./Math","./Rectangle","./Visibility"],function(e,t,i,n,r,o,a,s,l,u){"use strict";function c(e,i){this._occluderPosition=t.clone(e.center),this._occluderRadius=e.radius,this._horizonDistance=0,this._horizonPlaneNormal=void 0,this._horizonPlanePosition=void 0,this._cameraPosition=void 0,this.cameraPosition=i}var h=new t;r(c.prototype,{position:{get:function(){return this._occluderPosition}},radius:{get:function(){return this._occluderRadius}},cameraPosition:{set:function(e){e=t.clone(e,this._cameraPosition);var i,n,r,o=t.subtract(this._occluderPosition,e,h),a=t.magnitudeSquared(o),s=this._occluderRadius*this._occluderRadius;if(a>s){i=Math.sqrt(a-s),a=1/Math.sqrt(a),n=t.multiplyByScalar(o,a,h);var l=i*i*a;r=t.add(e,t.multiplyByScalar(n,l,h),h)}else i=Number.MAX_VALUE;this._horizonDistance=i,this._horizonPlaneNormal=n,this._horizonPlanePosition=r,this._cameraPosition=e}}}),c.fromBoundingSphere=function(e,i,r){if(!n(e))throw new o("occluderBoundingSphere is required.");if(!n(i))throw new o("camera position is required.");return n(r)?(t.clone(e.center,r._occluderPosition),r._occluderRadius=e.radius,r.cameraPosition=i,r):new c(e,i)};var d=new t;c.prototype.isPointVisible=function(e){if(this._horizonDistance!==Number.MAX_VALUE){var i=t.subtract(e,this._occluderPosition,d),n=this._occluderRadius;if(n=t.magnitudeSquared(i)-n*n,n>0)return n=Math.sqrt(n)+this._horizonDistance,i=t.subtract(e,this._cameraPosition,i),n*n>t.magnitudeSquared(i)}return!1};var p=new t;c.prototype.isBoundingSphereVisible=function(e){var i=t.clone(e.center,p),n=e.radius;if(this._horizonDistance!==Number.MAX_VALUE){var r=t.subtract(i,this._occluderPosition,d),o=this._occluderRadius-n;if(o=t.magnitudeSquared(r)-o*o,n0?(o=Math.sqrt(o)+this._horizonDistance,r=t.subtract(i,this._cameraPosition,r),o*o+n*n>t.magnitudeSquared(r)):!1;if(o>0){r=t.subtract(i,this._cameraPosition,r);var a=t.magnitudeSquared(r),s=this._occluderRadius*this._occluderRadius,l=n*n;return(this._horizonDistance*this._horizonDistance+s)*l>a*s?!0:(o=Math.sqrt(o)+this._horizonDistance,o*o+l>a)}return!0}return!1};var m=new t;c.prototype.computeVisibility=function(e){if(!n(e))throw new o("occludeeBS is required.");var i=t.clone(e.center),r=e.radius;if(r>this._occluderRadius)return u.FULL;if(this._horizonDistance!==Number.MAX_VALUE){var a=t.subtract(i,this._occluderPosition,m),s=this._occluderRadius-r,l=t.magnitudeSquared(a);if(s=l-s*s,s>0){s=Math.sqrt(s)+this._horizonDistance,a=t.subtract(i,this._cameraPosition,a);var c=t.magnitudeSquared(a);return c>s*s+r*r?u.NONE:(s=this._occluderRadius+r,s=l-s*s,s>0?(s=Math.sqrt(s)+this._horizonDistance,s*s+r*r>c?u.FULL:u.PARTIAL):(a=t.subtract(i,this._horizonPlanePosition,a),t.dot(a,this._horizonPlaneNormal)>-r?u.PARTIAL:u.FULL))}}return u.NONE};var f=new t;c.computeOccludeePoint=function(e,i,n){var r=t.clone(i),a=t.clone(e.center),s=e.radius,l=n.length;if(t.equals(a,i))throw new o("occludeePosition must be different than occluderBoundingSphere.center");var u=t.normalize(t.subtract(r,a,f),f),h=-t.dot(u,a),d=c._anyRotationVector(a,u,h),p=c._horizonToPlaneNormalDotProduct(e,u,h,d,n[0]);if(p){for(var m,g=1;l>g;++g){if(m=c._horizonToPlaneNormalDotProduct(e,u,h,d,n[g]),!m)return;p>m&&(p=m)}if(!(.0017453283658983088>p)){var v=s/p;return t.add(a,t.multiplyByScalar(u,v,f),f)}}};var g=[];c.computeOccludeePointFromRectangle=function(n,r){r=i(r,a.WGS84);var o=l.subsample(n,r,0,g),s=e.fromPoints(o),u=t.ZERO;return t.equals(u,s.center)?void 0:c.computeOccludeePoint(new e(u,r.minimumRadius),s.center,o)};var v=new t;c._anyRotationVector=function(e,i,n){var r=t.abs(i,v),o=r.x>r.y?0:1;(0===o&&r.z>r.x||1===o&&r.z>r.y)&&(o=2);var a,s=new t;0===o?(r.x=e.x,r.y=e.y+1,r.z=e.z+1,a=t.UNIT_X):1===o?(r.x=e.x+1,r.y=e.y,r.z=e.z+1,a=t.UNIT_Y):(r.x=e.x+1,r.y=e.y+1,r.z=e.z,a=t.UNIT_Z);var l=(t.dot(i,r)+n)/-t.dot(i,a);return t.normalize(t.subtract(t.add(r,t.multiplyByScalar(a,l,s),r),e,r),r)};var _=new t;c._rotationVector=function(e,i,n,r,o){var a=t.subtract(r,e,_);if(a=t.normalize(a,a),t.dot(i,a)<.9999999847691291){var l=t.cross(i,a,a),u=t.magnitude(l);if(u>s.EPSILON13)return t.normalize(l,new t)}return o};var y=new t,C=new t,w=new t,E=new t;return c._horizonToPlaneNormalDotProduct=function(e,i,n,r,o){var a=t.clone(o,y),s=t.clone(e.center,C),l=e.radius,u=t.subtract(s,a,w),c=t.magnitudeSquared(u),h=l*l;if(h>c)return!1;var d=c-h,p=Math.sqrt(d),m=Math.sqrt(c),f=1/m,g=p*f,v=g*p;u=t.normalize(u,u);var _=t.add(a,t.multiplyByScalar(u,v,E),E),b=Math.sqrt(d-v*v),S=this._rotationVector(s,i,n,a,r),T=t.fromElements(S.x*S.x*u.x+(S.x*S.y-S.z)*u.y+(S.x*S.z+S.y)*u.z,(S.x*S.y+S.z)*u.x+S.y*S.y*u.y+(S.y*S.z-S.x)*u.z,(S.x*S.z-S.y)*u.x+(S.y*S.z+S.x)*u.y+S.z*S.z*u.z,y);T=t.normalize(T,T);var x=t.multiplyByScalar(T,b,y);S=t.normalize(t.subtract(t.add(_,x,w),s,w),w);var A=t.dot(i,S);S=t.normalize(t.subtract(t.subtract(_,x,S),s,S),S);var P=t.dot(i,S);return P>A?A:P},c}),define("Cesium/Core/Packable",["./DeveloperError"],function(e){"use strict";var t={packedLength:void 0,pack:e.throwInstantiationError,unpack:e.throwInstantiationError};return t}),define("Cesium/Core/PackableForInterpolation",["./DeveloperError"],function(e){"use strict";var t={packedInterpolationLength:void 0,convertPackedArrayForInterpolation:e.throwInstantiationError,unpackInterpolationResult:e.throwInstantiationError};return t}),define("Cesium/ThirdParty/measureText",[],function(){var e=function(e,t){return document.defaultView.getComputedStyle(e,null).getPropertyValue(t)},t=function(t,i,n,r){var o=t.measureText(i),a=e(t.canvas,"font-family"),s=e(t.canvas,"font-size").replace("px",""),l=!/\S/.test(i);o.fontsize=s;var u=document.createElement("div");u.style.position="absolute",u.style.opacity=0,u.style.font=s+"px "+a,u.innerHTML=i+"
"+i,document.body.appendChild(u),o.leading=1.2*s;var c=e(u,"height");if(c=c.replace("px",""),c>=2*s&&(o.leading=c/2|0),document.body.removeChild(u),l)o.ascent=0,o.descent=0,o.bounds={minx:0,maxx:o.width,miny:0,maxy:0},o.height=0;else{var h=document.createElement("canvas"),d=100;h.width=o.width+d,h.height=3*s,h.style.opacity=1,h.style.fontFamily=a,h.style.fontSize=s;var p=h.getContext("2d");p.font=s+"px "+a;var m=h.width,f=h.height,g=f/2;p.fillStyle="white",p.fillRect(-1,-1,m+2,f+2),n&&(p.strokeStyle="black",p.lineWidth=t.lineWidth,p.strokeText(i,d/2,g)),r&&(p.fillStyle="black",p.fillText(i,d/2,g));for(var v=p.getImageData(0,0,m,f).data,_=0,y=4*m,C=v.length;++_0&&255===v[_];);var E=_/y|0;for(_=0;C>_&&255===v[_];)_+=y,_>=C&&(_=_-C+4);var b=_%y/4|0,S=1;for(_=C-3;_>=0&&255===v[_];)_-=y,0>_&&(_=C-3-4*S++);var T=_%y/4+1|0;o.ascent=g-w,o.descent=E-g,o.bounds={minx:b-d/2,maxx:T-d/2,miny:0,maxy:E-w},o.height=1+(E-w)}return o};return t}),define("Cesium/Core/writeTextToCanvas",["../ThirdParty/measureText","./Color","./defaultValue","./defined","./DeveloperError"],function(e,t,i,n,r){"use strict";function o(r,o){if(""!==r){o=i(o,i.EMPTY_OBJECT);var s=i(o.font,"10px sans-serif"),l=i(o.stroke,!1),u=i(o.fill,!0),c=i(o.strokeWidth,1),h=document.createElement("canvas");h.width=1,h.height=1,h.style.font=s;var d=h.getContext("2d");n(a)||(n(d.imageSmoothingEnabled)?a="imageSmoothingEnabled":n(d.mozImageSmoothingEnabled)?a="mozImageSmoothingEnabled":n(d.webkitImageSmoothingEnabled)?a="webkitImageSmoothingEnabled":n(d.msImageSmoothingEnabled)&&(a="msImageSmoothingEnabled")),d.font=s,d.lineJoin="round",d.lineWidth=c,d[a]=!1,d.textBaseline=i(o.textBaseline,"bottom"),h.style.visibility="hidden",document.body.appendChild(h);var p=e(d,r,l,u);p.computedWidth=Math.max(p.width,p.bounds.maxx-p.bounds.minx),h.dimensions=p,document.body.removeChild(h),h.style.visibility="";var m=p.height-p.ascent;h.width=p.computedWidth,h.height=p.height;var f=h.height-m;if(d.font=s,d.lineJoin="round",d.lineWidth=c,d[a]=!1,l){var g=i(o.strokeColor,t.BLACK);d.strokeStyle=g.toCssColorString(),d.strokeText(r,0,f)}if(u){var v=i(o.fillColor,t.WHITE);d.fillStyle=v.toCssColorString(),d.fillText(r,0,f)}return h}}var a;return o}),define("Cesium/Core/PinBuilder",["./buildModuleUrl","./Color","./defined","./DeveloperError","./loadImage","./writeTextToCanvas"],function(e,t,i,n,r,o){"use strict";function a(){this._cache={}}function s(e,t,i){e.save(),e.scale(i/24,i/24),e.fillStyle=t.toCssColorString(),e.strokeStyle=t.brighten(.6,c).toCssColorString(),e.lineWidth=.846,e.beginPath(),e.moveTo(6.72,.422),e.lineTo(17.28,.422),e.bezierCurveTo(18.553,.422,19.577,1.758,19.577,3.415),e.lineTo(19.577,10.973),e.bezierCurveTo(19.577,12.63,18.553,13.966,17.282,13.966),e.lineTo(14.386,14.008),e.lineTo(11.826,23.578),e.lineTo(9.614,14.008),e.lineTo(6.719,13.965),e.bezierCurveTo(5.446,13.983,4.422,12.629,4.422,10.972),e.lineTo(4.422,3.416),e.bezierCurveTo(4.423,1.76,5.447,.423,6.718,.423),e.closePath(),e.fill(),e.stroke(),e.restore()}function l(e,i,n){var r=n/2.5,o=r,a=r;i.width>i.height?a=r*(i.height/i.width):i.width0;){var r=n.pop();if(o(r)){t+=2;var a=r.positions,s=r.holes;if(o(a)&&(t+=a.length*i.packedLength),o(s))for(var l=s.length,u=0;l>u;++u)n.push(s[u])}}return t},y.packPolygonHierarchy=function(e,t,n){for(var r=[e];r.length>0;){var a=r.pop();if(o(a)){var s=a.positions,l=a.holes;if(t[n++]=o(s)?s.length:0,t[n++]=o(l)?l.length:0,o(s))for(var u=s.length,c=0;u>c;++c,n+=3)i.pack(s[c],t,n);if(o(l))for(var h=l.length,d=0;h>d;++d)r.push(l[d])}}return n},y.unpackPolygonHierarchy=function(e,t){for(var n=e[t++],r=e[t++],o=new Array(n),a=r>0?new Array(r):void 0,s=0;n>s;++s,t+=i.packedLength)o[s]=i.unpack(e,t);for(var l=0;r>l;++l)a[l]=y.unpackPolygonHierarchy(e,t),t=a[l].startingIndex,delete a[l].startingIndex;return{positions:o,holes:a,startingIndex:t}};var C=new i;y.subdivideLineCount=function(e,t,n){var r=i.distance(e,t),o=r/n,a=Math.max(0,Math.ceil(Math.log(o)/Math.log(2)));return Math.pow(2,a)},y.subdivideLine=function(e,t,n,r){var a=y.subdivideLineCount(e,t,n),s=i.distance(e,t),l=s/a;o(r)||(r=[]);var u=r;u.length=3*a;for(var c=0,h=0;a>h;h++){var d=_(e,t,h*l,s);u[c++]=d[0],u[c++]=d[1],u[c++]=d[2]}return u};var w=new i,E=new i,b=new i,S=new i;y.scaleToGeodeticHeightExtruded=function(e,t,n,s,l){s=r(s,a.WGS84);var u=w,c=E,h=b,d=S;if(o(e)&&o(e.attributes)&&o(e.attributes.position))for(var p=e.attributes.position.values,m=p.length/2,f=0;m>f;f+=3)i.fromArray(p,f,h),s.geodeticSurfaceNormal(h,u),d=s.scaleToGeodeticSurface(h,d),c=i.multiplyByScalar(u,n,c),c=i.add(d,c,c),p[f+m]=c.x,p[f+1+m]=c.y,p[f+2+m]=c.z,l&&(d=i.clone(h,d)),c=i.multiplyByScalar(u,t,c),c=i.add(d,c,c),p[f]=c.x,p[f+1]=c.y,p[f+2]=c.z;return e},y.polygonsFromHierarchy=function(t,n,r,a){var s=[],l=[],u=new g;for(u.enqueue(t);0!==u.length;){var c=u.dequeue(),h=c.positions,d=c.holes;if(h=e(h,i.equalsEpsilon,!0),!(h.length<3)){var p=r.projectPointsOntoPlane(h),f=[],_=m.computeWindingOrder2D(p);_===v.CLOCKWISE&&(p.reverse(),h=h.slice().reverse());var y,C,w=h.slice(),E=o(d)?d.length:0,b=[];for(y=0;E>y;y++){var S=d[y],T=e(S.positions,i.equalsEpsilon,!0);if(!(T.length<3)){var x=r.projectPointsOntoPlane(T);_=m.computeWindingOrder2D(x),_===v.CLOCKWISE&&(x.reverse(),T=T.slice().reverse()),b.push(T),f.push(w.length),w=w.concat(T),p=p.concat(x);var A=0;for(o(S.holes)&&(A=S.holes.length),C=0;A>C;C++)u.enqueue(S.holes[C])}}if(!n){for(y=0;yg;g++){var v=s[g];d[p++]=v.x,d[p++]=v.y,d[p++]=v.z}var _=new l({attributes:{position:new u({componentDatatype:n.DOUBLE,componentsPerAttribute:3,values:d})},indices:a,primitiveType:f.TRIANGLES});return o.normal?h.computeNormal(_):_}return m.computeSubdivision(e,s,a,i)};var T=[],x=new i,A=new i;return y.computeWallGeometry=function(e,t,r,o){var a,s,h,m,g,v=e.length,_=0;if(o)for(s=3*v*2,a=new Array(2*s),h=0;v>h;h++)m=e[h],g=e[(h+1)%v],a[_]=a[_+s]=m.x,++_,a[_]=a[_+s]=m.y,++_,a[_]=a[_+s]=m.z,++_,a[_]=a[_+s]=g.x,++_,a[_]=a[_+s]=g.y,++_,a[_]=a[_+s]=g.z,++_;else{var C=p.chordLength(r,t.maximumRadius),w=0;for(h=0;v>h;h++)w+=y.subdivideLineCount(e[h],e[(h+1)%v],C);for(s=3*(w+v),a=new Array(2*s),h=0;v>h;h++){m=e[h],g=e[(h+1)%v];for(var E=y.subdivideLine(m,g,C,T),b=E.length,S=0;b>S;++S,++_)a[_]=E[S],a[_+s]=E[S];a[_]=g.x,a[_+s]=g.x,++_,a[_]=g.y,a[_+s]=g.y,++_,a[_]=g.z,a[_+s]=g.z,++_}}v=a.length;var P=d.createTypedArray(v/3,v-6*e.length),M=0;for(v/=6,h=0;v>h;h++){var D=h,I=D+1,R=D+v,O=R+1;m=i.fromArray(a,3*D,x),g=i.fromArray(a,3*I,A),i.equalsEpsilon(m,g,p.EPSILON14)||(P[M++]=D,P[M++]=R,P[M++]=I,P[M++]=I,P[M++]=R,P[M++]=O)}return new l({attributes:new c({position:new u({componentDatatype:n.DOUBLE,componentsPerAttribute:3,values:a})}),indices:P,primitiveType:f.TRIANGLES})},y}),define("Cesium/Core/PolygonGeometry",["./BoundingRectangle","./BoundingSphere","./Cartesian2","./Cartesian3","./Cartographic","./ComponentDatatype","./defaultValue","./defined","./defineProperties","./DeveloperError","./Ellipsoid","./EllipsoidTangentPlane","./Geometry","./GeometryAttribute","./GeometryAttributes","./GeometryInstance","./GeometryPipeline","./IndexDatatype","./Math","./Matrix3","./PolygonGeometryLibrary","./PolygonPipeline","./Quaternion","./Rectangle","./VertexFormat","./WindingOrder"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g,v,_,y,C,w,E,b,S,T){"use strict";function x(e,t,i,r){for(var o=E.fromAxisAngle(e._plane.normal,i,O),a=y.fromQuaternion(o,L),l=Number.POSITIVE_INFINITY,u=Number.NEGATIVE_INFINITY,c=Number.POSITIVE_INFINITY,h=Number.NEGATIVE_INFINITY,d=t.length,p=0;d>p;++p){var m=n.clone(t[p],R);y.multiplyByVector(a,m,m);var f=e.projectPointOntoPlane(m,I);s(f)&&(l=Math.min(l,f.x),u=Math.max(u,f.x),c=Math.min(c,f.y),h=Math.max(h,f.y))}return r.x=l,r.y=c,r.width=u-l,r.height=h-c,r}function A(e,t,i,n){var r=n.cartesianToCartographic(e,N),o=r.height,a=n.cartesianToCartographic(t,F);a.height=o,n.cartographicToCartesian(a,t);var s=n.cartesianToCartographic(i,F);s.height=o-100,n.cartographicToCartesian(s,i)}function P(e){var t=e.vertexFormat,r=e.geometry;if(t.st||t.normal||t.tangent||t.binormal){var a=e.boundingRectangle,s=e.tangentPlane,l=e.ellipsoid,u=e.stRotation,c=e.wall,h=e.top||c,d=e.bottom||c,m=e.perPositionHeight,f=Y;f.x=a.x,f.y=a.y;var g,v=r.attributes.position.values,C=v.length,w=t.st?new Float32Array(2*(C/3)):void 0;t.normal&&(g=m&&h&&!c?r.attributes.normal.values:new Float32Array(C));var b=t.tangent?new Float32Array(C):void 0,S=t.binormal?new Float32Array(C):void 0,T=0,x=0,P=z,M=V,D=U,I=!0,R=E.fromAxisAngle(s._plane.normal,u,K),O=y.fromQuaternion(R,J),L=0,N=0;h&&d&&(L=C/2,N=C/3,C/=2);for(var F=0;C>F;F+=3){var k=n.fromArray(v,F,Z);if(t.st){var Q=y.multiplyByVector(O,k,B);Q=l.scaleToGeodeticSurface(Q,Q);var $=s.projectPointOntoPlane(Q,X);i.subtract($,f,$);var ee=_.clamp($.x/a.width,0,1),te=_.clamp($.y/a.height,0,1);d&&(w[T+N]=ee,w[T+1+N]=te),h&&(w[T]=ee,w[T+1]=te),T+=2}if(t.normal||t.tangent||t.binormal){var ie=x+1,ne=x+2;if(c){if(C>F+3){var re=n.fromArray(v,F+3,G);if(I){var oe=n.fromArray(v,F+C,W);m&&A(k,re,oe,l),n.subtract(re,k,re),n.subtract(oe,k,oe),P=n.normalize(n.cross(oe,re,P),P),I=!1}n.equalsEpsilon(re,k,_.EPSILON10)&&(I=!0)}(t.tangent||t.binormal)&&(D=l.geodeticSurfaceNormal(k,D),t.tangent&&(M=n.normalize(n.cross(D,P,M),M)))}else P=l.geodeticSurfaceNormal(k,P),(t.tangent||t.binormal)&&(m&&(H=n.fromArray(g,x,H),q=n.cross(n.UNIT_Z,H,q),q=n.normalize(y.multiplyByVector(O,q,q),q),t.binormal&&(j=n.normalize(n.cross(H,q,j),j))),M=n.cross(n.UNIT_Z,P,M),M=n.normalize(y.multiplyByVector(O,M,M),M),t.binormal&&(D=n.normalize(n.cross(P,M,D),D)));t.normal&&(e.wall?(g[x+L]=P.x,g[ie+L]=P.y,g[ne+L]=P.z):d&&(g[x+L]=-P.x,g[ie+L]=-P.y,g[ne+L]=-P.z),(h&&!m||c)&&(g[x]=P.x,g[ie]=P.y,g[ne]=P.z)),t.tangent&&(e.wall?(b[x+L]=M.x,b[ie+L]=M.y,b[ne+L]=M.z):d&&(b[x+L]=-M.x,b[ie+L]=-M.y,b[ne+L]=-M.z),h&&(m?(b[x]=q.x,b[ie]=q.y,b[ne]=q.z):(b[x]=M.x,b[ie]=M.y,b[ne]=M.z))),t.binormal&&(d&&(S[x+L]=D.x,S[ie+L]=D.y,S[ne+L]=D.z),h&&(m?(S[x]=j.x,S[ie]=j.y,S[ne]=j.z):(S[x]=D.x,S[ie]=D.y,S[ne]=D.z))),x+=3}}t.st&&(r.attributes.st=new p({componentDatatype:o.FLOAT,componentsPerAttribute:2,values:w})),t.normal&&(r.attributes.normal=new p({componentDatatype:o.FLOAT,componentsPerAttribute:3,values:g})),t.tangent&&(r.attributes.tangent=new p({componentDatatype:o.FLOAT,componentsPerAttribute:3,values:b})),t.binormal&&(r.attributes.binormal=new p({componentDatatype:o.FLOAT,componentsPerAttribute:3,values:S}))}return r}function M(e,t,i,n,r,o,a,s){var l,u={walls:[]};if(o||a){var c,d,p=C.createGeometryFromPositions(e,t,i,r,s),m=p.attributes.position.values,g=p.indices;if(o&&a){var _=m.concat(m);c=_.length/3,d=v.createTypedArray(c,2*g.length),d.set(g);var y=g.length,E=c/2;for(l=0;y>l;l+=3){var b=d[l]+E,S=d[l+1]+E,x=d[l+2]+E;d[l+y]=x,d[l+1+y]=S,d[l+2+y]=b}if(p.attributes.position.values=_,r){var A=p.attributes.normal.values;p.attributes.normal.values=new Float32Array(_.length),p.attributes.normal.values.set(A)}p.indices=d}else if(a){for(c=m.length/3,d=v.createTypedArray(c,g.length),l=0;lf;f++){var E=t[f],b=t[(f+1)%y];p[w++]=E.x,p[w++]=E.y,p[w++]=E.z,p[w++]=b.x,p[w++]=b.y,p[w++]=b.z}else{var x=0;for(f=0;y>f;f++)x+=g.subdivideLineCount(t[f],t[(f+1)%y],i);for(p=new Float64Array(3*x),f=0;y>f;f++)for(var A=g.subdivideLine(t[f],t[(f+1)%y],i,T),P=A.length,M=0;P>M;++M)p[w++]=A[M]}y=p.length/3;var D=2*y,I=m.createTypedArray(y,D);for(w=0,f=0;y-1>f;f++)I[w++]=f,I[w++]=f+1;return I[w++]=y-1,I[w++]=0,new d({geometry:new u({attributes:new h({position:new c({componentDatatype:n.DOUBLE,componentsPerAttribute:3,values:p})}),indices:I,primitiveType:_.LINES})})}function E(e,t,i,r){var o=l.fromPoints(t,e),a=o.projectPointsOntoPlane(t,S),s=v.computeWindingOrder2D(a);s===C.CLOCKWISE&&(a.reverse(),t=t.slice().reverse());var p,f,y=t.length,w=new Array(y),E=0;if(r)for(p=new Float64Array(2*y*3*2),f=0;y>f;++f){w[f]=E/3;var b=t[f],x=t[(f+1)%y];p[E++]=b.x,p[E++]=b.y,p[E++]=b.z,p[E++]=x.x,p[E++]=x.y,p[E++]=x.z}else{var A=0;for(f=0;y>f;f++)A+=g.subdivideLineCount(t[f],t[(f+1)%y],i);for(p=new Float64Array(3*A*2),f=0;y>f;++f){w[f]=E/3;for(var P=g.subdivideLine(t[f],t[(f+1)%y],i,T),M=P.length,D=0;M>D;++D)p[E++]=P[D]}}y=p.length/6;var I=w.length,R=2*(2*y+I),O=m.createTypedArray(y,R);for(E=0,f=0;y>f;++f)O[E++]=f,O[E++]=(f+1)%y,O[E++]=f+y,O[E++]=(f+1)%y+y;for(f=0;I>f;f++){var L=w[f];O[E++]=L,O[E++]=L+y}return new d({geometry:new u({attributes:new h({position:new c({componentDatatype:n.DOUBLE,componentsPerAttribute:3,values:p})}),indices:O,primitiveType:_.LINES})})}function b(e){var t=e.polygonHierarchy,i=r(e.ellipsoid,s.WGS84),n=r(e.granularity,f.RADIANS_PER_DEGREE),a=r(e.height,0),l=r(e.perPositionHeight,!1),u=e.extrudedHeight,c=o(u);if(c&&!l){var h=u;u=Math.min(h,a),a=Math.max(h,a)}this._ellipsoid=s.clone(i),this._granularity=n,this._height=a,this._extrudedHeight=r(u,0),this._extrude=c,this._polygonHierarchy=t,this._perPositionHeight=l,this._workerName="createPolygonOutlineGeometry",this.packedLength=g.computeHierarchyPackedLength(t)+s.packedLength+6}var S=[],T=[];b.pack=function(e,t,i){i=r(i,0),i=g.packPolygonHierarchy(e._polygonHierarchy,t,i),s.pack(e._ellipsoid,t,i),i+=s.packedLength,t[i++]=e._height,t[i++]=e._extrudedHeight,t[i++]=e._granularity,t[i++]=e._extrude?1:0,t[i++]=e._perPositionHeight?1:0,t[i++]=e.packedLength};var x=s.clone(s.UNIT_SPHERE),A={polygonHierarchy:{}};return b.unpack=function(e,t,i){t=r(t,0);var n=g.unpackPolygonHierarchy(e,t);t=n.startingIndex,delete n.startingIndex;var a=s.unpack(e,t,x);t+=s.packedLength;var l=e[t++],u=e[t++],c=e[t++],h=1===e[t++],d=1===e[t++],p=e[t++];return o(i)||(i=new b(A)),i._polygonHierarchy=n,i._ellipsoid=s.clone(a,i._ellipsoid),i._height=l,i._extrudedHeight=u,i._granularity=c,i._extrude=h,i._perPositionHeight=d,i.packedLength=p,i},b.fromPositions=function(e){e=r(e,r.EMPTY_OBJECT);var t={polygonHierarchy:{positions:e.positions},height:e.height,extrudedHeight:e.extrudedHeight,ellipsoid:e.ellipsoid,granularity:e.granularity,perPositionHeight:e.perPositionHeight};return new b(t)},b.createGeometry=function(n){var r=n._ellipsoid,a=n._granularity,s=n._height,l=n._extrudedHeight,c=n._extrude,h=n._polygonHierarchy,d=n._perPositionHeight,m=[],_=new y;_.enqueue(h);for(var C;0!==_.length;){var b=_.dequeue(),S=b.positions;if(S=e(S,i.equalsEpsilon,!0),!(S.length<3)){var T=b.holes?b.holes.length:0;for(C=0;T>C;C++){var x=b.holes[C];if(x.positions=e(x.positions,i.equalsEpsilon,!0),!(x.positions.length<3)){m.push(x.positions);var A=0;o(x.holes)&&(A=x.holes.length);for(var P=0;A>P;P++)_.enqueue(x.holes[P])}}m.push(S)}}if(0!==m.length){var M,D=[],I=f.chordLength(a,r.maximumRadius);if(c)for(C=0;Cs;s++)a[s]=n.clone(i);return a}var g=(d-l)/o,v=(p-u)/o,_=(m-c)/o,y=(f-h)/o;for(s=0;o>s;s++)a[s]=new n(l+s*g,u+s*v,c+s*_,h+s*y);return a}function y(e){e=o(e,o.EMPTY_OBJECT);var t=e.positions,r=e.colors,s=o(e.width,1),u=o(e.colorsPerVertex,!1);this._positions=t,this._colors=r,this._width=s,this._colorsPerVertex=u,this._vertexFormat=v.clone(o(e.vertexFormat,v.DEFAULT)),this._followSurface=o(e.followSurface,!0),this._granularity=o(e.granularity,m.RADIANS_PER_DEGREE),this._ellipsoid=l.clone(o(e.ellipsoid,l.WGS84)),this._workerName="createPolylineGeometry";var c=1+t.length*i.packedLength;c+=a(r)?1+r.length*n.packedLength:1,this.packedLength=c+l.packedLength+v.packedLength+4}var C=[];y.pack=function(e,t,r){r=o(r,0);var s,u=e._positions,c=u.length;for(t[r++]=c,s=0;c>s;++s,r+=i.packedLength)i.pack(u[s],t,r);var h=e._colors;for(c=a(h)?h.length:0,t[r++]=c,s=0;c>s;++s,r+=n.packedLength)n.pack(h[s],t,r);l.pack(e._ellipsoid,t,r),r+=l.packedLength,v.pack(e._vertexFormat,t,r),r+=v.packedLength,t[r++]=e._width,t[r++]=e._colorsPerVertex?1:0,t[r++]=e._followSurface?1:0,t[r]=e._granularity};var w=l.clone(l.UNIT_SPHERE),E=new v,b={positions:void 0,colors:void 0,ellipsoid:w,vertexFormat:E,width:void 0,colorsPerVertex:void 0,followSurface:void 0,granularity:void 0};y.unpack=function(e,t,r){t=o(t,0);var s,u=e[t++],c=new Array(u);for(s=0;u>s;++s,t+=i.packedLength)c[s]=i.unpack(e,t);u=e[t++];var h=u>0?new Array(u):void 0;for(s=0;u>s;++s,t+=n.packedLength)h[s]=n.unpack(e,t);var d=l.unpack(e,t,w);t+=l.packedLength;var p=v.unpack(e,t,E);t+=v.packedLength;var m=e[t++],f=1===e[t++],g=1===e[t++],_=e[t];return a(r)?(r._positions=c,r._colors=h,r._ellipsoid=l.clone(d,r._ellipsoid),r._vertexFormat=v.clone(p,r._vertexFormat),r._width=m,r._colorsPerVertex=f,r._followSurface=g,r._granularity=_,r):(b.positions=c,b.colors=h,b.width=m,b.colorsPerVertex=f,b.followSurface=g,b.granularity=_,new y(b))};var S=new i,T=new i,x=new i,A=new i;return y.createGeometry=function(o){var s,l,v,y=o._width,w=o._vertexFormat,E=o._colors,b=o._colorsPerVertex,P=o._followSurface,M=o._granularity,D=o._ellipsoid,I=e(o._positions,i.equalsEpsilon),R=I.length;if(!(2>R)){if(P){var O=f.extractHeights(I,D),L=m.chordLength(M,D.maximumRadius);if(a(E)){var N=1;for(s=0;R-1>s;++s)N+=f.numberOfPoints(I[s],I[s+1],L);var F=new Array(N),k=0;for(s=0;R-1>s;++s){var B=I[s],z=I[s+1],V=E[s],U=f.numberOfPoints(B,z,L);if(b&&N>s){var G=E[s+1],W=_(B,z,V,G,U),H=W.length;for(l=0;H>l;++l)F[k++]=W[l]}else for(l=0;U>l;++l)F[k++]=n.clone(V)}F[k]=n.clone(E[E.length-1]),E=F,C.length=0}I=f.generateCartesianArc({positions:I,minDistance:L,ellipsoid:D,height:O})}R=I.length;var q,j=4*R-4,Y=new Float64Array(3*j),X=new Float64Array(3*j),Z=new Float64Array(3*j),K=new Float32Array(2*j),J=w.st?new Float32Array(2*j):void 0,Q=a(E)?new Uint8Array(4*j):void 0,$=0,ee=0,te=0,ie=0;for(l=0;R>l;++l){0===l?(q=S,i.subtract(I[0],I[1],q),i.add(I[0],q,q)):q=I[l-1],i.clone(q,x),i.clone(I[l],T),l===R-1?(q=S,i.subtract(I[R-1],I[R-2],q),i.add(I[R-1],q,q)):q=I[l+1],i.clone(q,A);var ne,re;a(Q)&&(ne=0===l||b?E[l]:E[l-1],l!==R-1&&(re=E[l]));var oe=0===l?2:0,ae=l===R-1?2:4;for(v=oe;ae>v;++v){i.pack(T,Y,$),i.pack(x,X,$),i.pack(A,Z,$),$+=3;var se=0>v-2?-1:1;if(K[ee++]=2*(v%2)-1,K[ee++]=se*y,w.st&&(J[te++]=l/(R-1),J[te++]=Math.max(K[ee-2],0)),a(Q)){var le=2>v?ne:re;Q[ie++]=n.floatToByte(le.red),Q[ie++]=n.floatToByte(le.green),Q[ie++]=n.floatToByte(le.blue),Q[ie++]=n.floatToByte(le.alpha)}}}var ue=new h;ue.position=new c({componentDatatype:r.DOUBLE,componentsPerAttribute:3,values:Y}),ue.prevPosition=new c({componentDatatype:r.DOUBLE,componentsPerAttribute:3,values:X}),ue.nextPosition=new c({componentDatatype:r.DOUBLE,componentsPerAttribute:3,values:Z}),ue.expandAndWidth=new c({componentDatatype:r.FLOAT,componentsPerAttribute:2,values:K}),w.st&&(ue.st=new c({componentDatatype:r.FLOAT,componentsPerAttribute:2,values:J})),a(Q)&&(ue.color=new c({componentDatatype:r.UNSIGNED_BYTE,componentsPerAttribute:4,values:Q,normalize:!0}));var ce=p.createTypedArray(j,6*R-6),he=0,de=0,pe=R-1;for(l=0;pe>l;++l)ce[de++]=he,ce[de++]=he+2,ce[de++]=he+1,ce[de++]=he+1,ce[de++]=he+2,ce[de++]=he+3,he+=4;return new u({attributes:ue,indices:ce,primitiveType:g.TRIANGLES,boundingSphere:t.fromPoints(I),geometryType:d.POLYLINES})}},y}),define("Cesium/Core/PolylineVolumeGeometry",["./arrayRemoveDuplicates","./BoundingRectangle","./BoundingSphere","./Cartesian2","./Cartesian3","./ComponentDatatype","./CornerType","./defaultValue","./defined","./DeveloperError","./Ellipsoid","./Geometry","./GeometryAttribute","./GeometryAttributes","./GeometryPipeline","./IndexDatatype","./Math","./PolygonPipeline","./PolylineVolumeGeometryLibrary","./PrimitiveType","./VertexFormat","./WindingOrder"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g,v,_,y,C,w){"use strict";function E(e,t,n,r){var a=new p;r.position&&(a.position=new d({componentDatatype:o.DOUBLE,componentsPerAttribute:3,values:e}));var s,l,u,c,g,_,C=t.length,w=e.length/3,E=(w-2*C)/(2*C),b=v.triangulate(t),S=(E-1)*C*6+2*b.length,T=f.createTypedArray(w,S),x=2*C,A=0;for(s=0;E-1>s;s++){for(l=0;C-1>l;l++)u=2*l+s*C*2,_=u+x,c=u+1,g=c+x,T[A++]=c,T[A++]=u,T[A++]=g,T[A++]=g,T[A++]=u,T[A++]=_;u=2*C-2+s*C*2,c=u+1,g=c+x,_=u+x,T[A++]=c,T[A++]=u,T[A++]=g,T[A++]=g,T[A++]=u,T[A++]=_}if(r.st||r.tangent||r.binormal){var P,M,D=new Float32Array(2*w),I=1/(E-1),R=1/n.height,O=n.height/2,L=0;for(s=0;E>s;s++){for(P=s*I,M=R*(t[0].y+O),D[L++]=P,D[L++]=M,l=1;C>l;l++)M=R*(t[l].y+O),D[L++]=P,D[L++]=M,D[L++]=P,D[L++]=M;M=R*(t[0].y+O),D[L++]=P,D[L++]=M}for(l=0;C>l;l++)P=0,M=R*(t[l].y+O),D[L++]=P,D[L++]=M;for(l=0;C>l;l++)P=(E-1)*I,M=R*(t[l].y+O),D[L++]=P,D[L++]=M;a.st=new d({componentDatatype:o.FLOAT,componentsPerAttribute:2,values:new Float32Array(D)})}var N=w-2*C;for(s=0;so;++o,i+=r.packedLength)r.pack(a[o],t,i);var u=e._shape;for(l=u.length,t[i++]=l,o=0;l>o;++o,i+=n.packedLength)n.pack(u[o],t,i);c.pack(e._ellipsoid,t,i),i+=c.packedLength,C.pack(e._vertexFormat,t,i),i+=C.packedLength,t[i++]=e._cornerType,t[i]=e._granularity};var S=c.clone(c.UNIT_SPHERE),T=new C,x={polylinePositions:void 0,shapePositions:void 0,ellipsoid:S,vertexFormat:T,cornerType:void 0,granularity:void 0};b.unpack=function(e,t,i){t=s(t,0);var o,a=e[t++],u=new Array(a);for(o=0;a>o;++o,t+=r.packedLength)u[o]=r.unpack(e,t);a=e[t++];var h=new Array(a);for(o=0;a>o;++o,t+=n.packedLength)h[o]=n.unpack(e,t);var d=c.unpack(e,t,S);t+=c.packedLength;var p=C.unpack(e,t,T);t+=C.packedLength;var m=e[t++],f=e[t];return l(i)?(i._positions=u,i._shape=h,i._ellipsoid=c.clone(d,i._ellipsoid),i._vertexFormat=C.clone(p,i._vertexFormat),i._cornerType=m,i._granularity=f,i):(x.polylinePositions=u,x.shapePositions=h,x.cornerType=m,x.granularity=f,new b(x))};var A=new t;return b.createGeometry=function(i){var n=i._positions,o=e(n,r.equalsEpsilon),a=i._shape;if(a=_.removeDuplicatesFromShape(a),!(o.length<2||a.length<3)){v.computeWindingOrder2D(a)===w.CLOCKWISE&&a.reverse();var s=t.fromPoints(a,A),l=_.computePositions(o,a,s,i,!0);return E(l,a,s,i._vertexFormat)}},b}),define("Cesium/Core/PolylineVolumeOutlineGeometry",["./arrayRemoveDuplicates","./BoundingRectangle","./BoundingSphere","./Cartesian2","./Cartesian3","./ComponentDatatype","./CornerType","./defaultValue","./defined","./DeveloperError","./Ellipsoid","./Geometry","./GeometryAttribute","./GeometryAttributes","./IndexDatatype","./Math","./PolygonPipeline","./PolylineVolumeGeometryLibrary","./PrimitiveType","./WindingOrder"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g,v,_,y){"use strict";function C(e,t){var n=new p;n.position=new d({componentDatatype:o.DOUBLE,componentsPerAttribute:3,values:e});var r,a,s=t.length,l=n.position.values.length/3,u=e.length/3,c=u/s,f=m.createTypedArray(l,2*s*(c+1)),g=0;r=0;var v=r*s;for(a=0;s-1>a;a++)f[g++]=a+v,f[g++]=a+v+1;for(f[g++]=s-1+v,f[g++]=v,r=c-1,v=r*s,a=0;s-1>a;a++)f[g++]=a+v,f[g++]=a+v+1;for(f[g++]=s-1+v,f[g++]=v,r=0;c-1>r;r++){var y=s*r,C=y+s;for(a=0;s>a;a++)f[g++]=a+y,f[g++]=a+C}var w=new h({attributes:n,indices:m.createTypedArray(l,f),boundingSphere:i.fromVertices(e),primitiveType:_.LINES});return w}function w(e){e=s(e,s.EMPTY_OBJECT);var t=e.polylinePositions,i=e.shapePositions;this._positions=t,this._shape=i,this._ellipsoid=c.clone(s(e.ellipsoid,c.WGS84)),this._cornerType=s(e.cornerType,a.ROUNDED),this._granularity=s(e.granularity,f.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeOutlineGeometry";var o=1+t.length*r.packedLength;o+=1+i.length*n.packedLength,this.packedLength=o+c.packedLength+2}w.pack=function(e,t,i){i=s(i,0);var o,a=e._positions,l=a.length;for(t[i++]=l,o=0;l>o;++o,i+=r.packedLength)r.pack(a[o],t,i);var u=e._shape;for(l=u.length,t[i++]=l,o=0;l>o;++o,i+=n.packedLength)n.pack(u[o],t,i);c.pack(e._ellipsoid,t,i),i+=c.packedLength,t[i++]=e._cornerType,t[i]=e._granularity};var E=c.clone(c.UNIT_SPHERE),b={polylinePositions:void 0,shapePositions:void 0,ellipsoid:E,height:void 0,cornerType:void 0,granularity:void 0};w.unpack=function(e,t,i){t=s(t,0);var o,a=e[t++],u=new Array(a);for(o=0;a>o;++o,t+=r.packedLength)u[o]=r.unpack(e,t);a=e[t++];var h=new Array(a);for(o=0;a>o;++o,t+=n.packedLength)h[o]=n.unpack(e,t);var d=c.unpack(e,t,E);t+=c.packedLength;var p=e[t++],m=e[t];return l(i)?(i._positions=u,i._shape=h,i._ellipsoid=c.clone(d,i._ellipsoid),i._cornerType=p,i._granularity=m,i):(b.polylinePositions=u,b.shapePositions=h,b.cornerType=p,b.granularity=m,new w(b))};var S=new t;return w.createGeometry=function(i){var n=i._positions,o=e(n,r.equalsEpsilon),a=i._shape;if(a=v.removeDuplicatesFromShape(a),!(o.length<2||a.length<3)){g.computeWindingOrder2D(a)===y.CLOCKWISE&&a.reverse();var s=t.fromPoints(a,S),l=v.computePositions(o,a,s,i,!1);return C(l,a)}},w}),define("Cesium/Core/QuaternionSpline",["./defaultValue","./defined","./defineProperties","./DeveloperError","./Quaternion","./Spline"],function(e,t,i,n,r,o){"use strict";function a(e,i,n){var o=e.length,a=new Array(o);a[0]=t(i)?i:e[0],a[o-1]=t(n)?n:e[o-1];for(var s=1;o-1>s;++s)a[s]=r.computeInnerQuadrangle(e[s-1],e[s],e[s+1],new r);return a}function s(e){var i=e.points,n=e.innerQuadrangles,o=e.times;if(i.length<3){var a=o[0],s=1/(o[1]-a),l=i[0],u=i[1];return function(e,i){t(i)||(i=new r);var n=(e-a)*s;return r.fastSlerp(l,u,n,i)}}return function(a,s){t(s)||(s=new r);var l=e._lastTimeIndex=e.findTimeInterval(a,e._lastTimeIndex),u=(a-o[l])/(o[l+1]-o[l]),c=i[l],h=i[l+1],d=n[l],p=n[l+1];return r.fastSquad(c,h,d,p,u,s)}}function l(t){t=e(t,e.EMPTY_OBJECT);var i=t.points,n=t.times,r=t.firstInnerQuadrangle,o=t.lastInnerQuadrangle,l=a(i,r,o);this._times=n,this._points=i,this._innerQuadrangles=l,this._evaluateFunction=s(this),this._lastTimeIndex=0}return i(l.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}},innerQuadrangles:{get:function(){return this._innerQuadrangles}}}),l.prototype.findTimeInterval=o.prototype.findTimeInterval,l.prototype.evaluate=function(e,t){return this._evaluateFunction(e,t)},l}),define("Cesium/Core/RectangleGeometryLibrary",["./Cartesian3","./Cartographic","./defined","./DeveloperError","./GeographicProjection","./Math","./Matrix2","./Rectangle"],function(e,t,i,n,r,o,a,s){"use strict";var l=Math.cos,u=Math.sin,c=Math.sqrt,h={};h.computePosition=function(e,t,n,r,o){var s=e.ellipsoid.radiiSquared,h=e.nwCorner,d=e.rectangle,p=h.latitude-e.granYCos*t+n*e.granXSin,m=l(p),f=u(p),g=s.z*f,v=h.longitude+t*e.granYSin+n*e.granXCos,_=m*l(v),y=m*u(v),C=s.x*_,w=s.y*y,E=c(C*_+w*y+g*f);r.x=C/E,r.y=w/E,r.z=g/E,i(e.vertexFormat)&&e.vertexFormat.st&&(o.x=(v-d.west)*e.lonScalar-.5,o.y=(p-d.south)*e.latScalar-.5,a.multiplyByVector(e.textureMatrix,o,o),o.x+=.5,o.y+=.5)};var d=new a,p=new e,m=new t,f=new e,g=new r;return h.computeOptions=function(t,r,l){var u,c,h,v,_,y=t._granularity,C=t._ellipsoid,w=t._surfaceHeight,E=t._rotation,b=t._extrudedHeight,S=r.east,T=r.west,x=r.north,A=r.south,P=x-A;T>S?(_=o.TWO_PI-T+S,u=Math.ceil(_/y)+1,c=Math.ceil(P/y)+1,h=_/(u-1),v=P/(c-1)):(_=S-T,u=Math.ceil(_/y)+1,c=Math.ceil(P/y)+1,h=_/(u-1),v=P/(c-1)),l=s.northwest(r,l);var M=s.center(r,m),D=v,I=h,R=0,O=0;if(i(E)){var L=Math.cos(E);D*=L,I*=L;var N=Math.sin(E);R=v*N,O=h*N,p=g.project(l,p),f=g.project(M,f),p=e.subtract(p,f,p);var F=a.fromRotation(E,d);p=a.multiplyByVector(F,p,p),p=e.add(p,f,p),l=g.unproject(p,l);var k=l.latitude,B=k+(u-1)*O,z=k-D*(c-1),V=k-D*(c-1)+(u-1)*O;x=Math.max(k,B,z,V),A=Math.min(k,B,z,V);var U=l.longitude,G=U+(u-1)*I,W=U+(c-1)*R,H=U+(c-1)*R+(u-1)*I;if(S=Math.max(U,G,W,H),T=Math.min(U,G,W,H),x<-o.PI_OVER_TWO||x>o.PI_OVER_TWO||A<-o.PI_OVER_TWO||A>o.PI_OVER_TWO)throw new n("Rotated rectangle is invalid. It crosses over either the north or south pole.");r.north=x,r.south=A,r.east=S,r.west=T}return{granYCos:D,granYSin:R,granXCos:I,granXSin:O,ellipsoid:C,width:u,height:c,surfaceHeight:w,extrudedHeight:b,nwCorner:l,rectangle:r}},h}),define("Cesium/Core/RectangleGeometry",["./BoundingSphere","./Cartesian2","./Cartesian3","./Cartographic","./ComponentDatatype","./defaultValue","./defined","./defineProperties","./DeveloperError","./Ellipsoid","./Geometry","./GeometryAttribute","./GeometryAttributes","./GeometryInstance","./GeometryPipeline","./IndexDatatype","./Math","./Matrix2","./Matrix3","./PolygonPipeline","./PrimitiveType","./Quaternion","./Rectangle","./RectangleGeometryLibrary","./VertexFormat"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g,v,_,y,C,w,E,b,S){"use strict";function T(e,t){var i=new c({attributes:new d,primitiveType:C.TRIANGLES});return i.attributes.position=new h({componentDatatype:r.DOUBLE,componentsPerAttribute:3,values:t.positions}),e.normal&&(i.attributes.normal=new h({componentDatatype:r.FLOAT,componentsPerAttribute:3,values:t.normals})),e.tangent&&(i.attributes.tangent=new h({componentDatatype:r.FLOAT,componentsPerAttribute:3,values:t.tangents})),e.binormal&&(i.attributes.binormal=new h({componentDatatype:r.FLOAT,componentsPerAttribute:3,values:t.binormals})),i}function x(e,t,n,r){for(var o=e.length,a=t.normal?new Float32Array(o):void 0,s=t.tangent?new Float32Array(o):void 0,l=t.binormal?new Float32Array(o):void 0,u=0,c=k,h=F,d=N,p=0;o>p;p+=3){var m=i.fromArray(e,p,L),f=u+1,g=u+2;(t.normal||t.tangent||t.binormal)&&(d=n.geodeticSurfaceNormal(m,d),(t.tangent||t.binormal)&&(i.cross(i.UNIT_Z,d,h),_.multiplyByVector(r,h,h),i.normalize(h,h),t.binormal&&i.normalize(i.cross(d,h,c),c)),t.normal&&(a[u]=d.x,a[f]=d.y,a[g]=d.z),t.tangent&&(s[u]=h.x,s[f]=h.y,s[g]=h.z),t.binormal&&(l[u]=c.x,l[f]=c.y,l[g]=c.z)),u+=3}return T(t,{positions:e,normals:a,tangents:s,binormals:l})}function A(e,t,n){for(var r=e.length,o=t.normal?new Float32Array(r):void 0,a=t.tangent?new Float32Array(r):void 0,s=t.binormal?new Float32Array(r):void 0,l=0,u=0,c=0,h=!0,d=k,p=F,m=N,f=0;r>f;f+=6){var v=i.fromArray(e,f,L);if(t.normal||t.tangent||t.binormal){var _=i.fromArray(e,(f+6)%r,G);if(h){var y=i.fromArray(e,(f+3)%r,W);i.subtract(_,v,_),i.subtract(y,v,y),m=i.normalize(i.cross(y,_,m),m),h=!1}i.equalsEpsilon(_,v,g.EPSILON10)&&(h=!0),(t.tangent||t.binormal)&&(d=n.geodeticSurfaceNormal(v,d),t.tangent&&(p=i.normalize(i.cross(d,m,p),p))),t.normal&&(o[l++]=m.x,o[l++]=m.y,o[l++]=m.z,o[l++]=m.x,o[l++]=m.y,o[l++]=m.z),t.tangent&&(a[u++]=p.x,a[u++]=p.y,a[u++]=p.z,a[u++]=p.x,a[u++]=p.y,a[u++]=p.z),t.binormal&&(s[c++]=d.x,s[c++]=d.y,s[c++]=d.z,s[c++]=d.x,s[c++]=d.y,s[c++]=d.z)}}return T(t,{positions:e,normals:o,tangents:a,binormals:s})}function P(e){for(var t=e.vertexFormat,i=e.ellipsoid,n=e.size,o=e.height,a=e.width,s=t.position?new Float64Array(3*n):void 0,l=t.st?new Float32Array(2*n):void 0,u=0,c=0,d=L,p=z,m=Number.MAX_VALUE,g=Number.MAX_VALUE,v=-Number.MAX_VALUE,_=-Number.MAX_VALUE,y=0;o>y;++y)for(var C=0;a>C;++C)b.computePosition(e,y,C,d,p),s[u++]=d.x,s[u++]=d.y,s[u++]=d.z,t.st&&(l[c++]=p.x,l[c++]=p.y,m=Math.min(m,p.x),g=Math.min(g,p.y),v=Math.max(v,p.x),_=Math.max(_,p.y));if(t.st&&(0>m||0>g||v>1||_>1))for(var w=0;wM;++M){for(var D=0;a-1>D;++D){var I=A,R=I+a,O=R+1,N=I+1;T[P++]=I,T[P++]=R,T[P++]=N,T[P++]=N,T[P++]=R,T[P++]=O,++A}++A}return E.indices=T,t.st&&(E.attributes.st=new h({componentDatatype:r.FLOAT,componentsPerAttribute:2,values:l})),E}function M(e,t,i,n,r){return e[t++]=n[i],e[t++]=n[i+1],e[t++]=n[i+2],e[t++]=r[i],e[t++]=r[i+1],e[t++]=r[i+2],e}function D(e,t,i,n){return e[t++]=n[i],e[t++]=n[i+1],e[t++]=n[i],e[t++]=n[i+1],e}function I(e){var t,n=e.vertexFormat,o=e.surfaceHeight,a=e.extrudedHeight,s=Math.min(a,o),l=Math.max(a,o),u=e.height,c=e.width,d=e.ellipsoid,v=P(e);if(g.equalsEpsilon(s,l,g.EPSILON10))return v;var _=y.scaleToGeodeticHeight(v.attributes.position.values,l,d,!1);_=new Float64Array(_);var C=_.length,w=2*C,E=new Float64Array(w);E.set(_);var b=y.scaleToGeodeticHeight(v.attributes.position.values,s,d);E.set(b,C),v.attributes.position.values=E;var S,T=n.normal?new Float32Array(w):void 0,x=n.tangent?new Float32Array(w):void 0,I=n.binormal?new Float32Array(w):void 0,R=n.st?new Float32Array(w/3*2):void 0;if(n.normal){var O=v.attributes.normal.values;for(T.set(O),t=0;C>t;t++)O[t]=-O[t];T.set(O,C),v.attributes.normal.values=T}if(n.tangent){var L=v.attributes.tangent.values;for(x.set(L),t=0;C>t;t++)L[t]=-L[t];x.set(L,C),v.attributes.tangent.values=x}if(n.binormal){var N=v.attributes.binormal.values;I.set(N),I.set(N,C),v.attributes.binormal.values=I}n.st&&(S=v.attributes.st.values,R.set(S),R.set(S,C/3*2),v.attributes.st.values=R);var F=v.indices,k=F.length,B=C/3,z=f.createTypedArray(w/3,2*k);for(z.set(F),t=0;k>t;t+=3)z[t+k]=F[t+2]+B,z[t+1+k]=F[t+1]+B,z[t+2+k]=F[t]+B;v.indices=z;var V=2*c+2*u-4,U=2*(V+4),H=new Float64Array(3*U),q=n.st?new Float32Array(2*U):void 0,j=0,Y=0,X=c*u;for(t=0;X>t;t+=c)H=M(H,j,3*t,_,b),j+=6,n.st&&(q=D(q,Y,2*t,S),Y+=4);for(t=X-c;X>t;t++)H=M(H,j,3*t,_,b),j+=6,n.st&&(q=D(q,Y,2*t,S),Y+=4);for(t=X-1;t>0;t-=c)H=M(H,j,3*t,_,b),j+=6,n.st&&(q=D(q,Y,2*t,S),Y+=4);for(t=c-1;t>=0;t--)H=M(H,j,3*t,_,b),j+=6,n.st&&(q=D(q,Y,2*t,S),Y+=4);var Z=A(H,n,d);n.st&&(Z.attributes.st=new h({componentDatatype:r.FLOAT,componentsPerAttribute:2,values:q}));var K,J,Q,$,ee=f.createTypedArray(U,6*V);C=H.length/3;var te=0;for(t=0;C-1>t;t+=2){K=t,$=(K+2)%C;var ie=i.fromArray(H,3*K,G),ne=i.fromArray(H,3*$,W);i.equalsEpsilon(ie,ne,g.EPSILON10)||(J=(K+1)%C,Q=(J+2)%C,ee[te++]=K,ee[te++]=J,ee[te++]=$,ee[te++]=$,ee[te++]=J,ee[te++]=Q)}return Z.indices=ee,Z=m.combineInstances([new p({geometry:v}),new p({geometry:Z})]),Z[0]}function R(e,t,i){if(0===i)return E.clone(e);E.northeast(e,X[0]),E.northwest(e,X[1]),E.southeast(e,X[2]),E.southwest(e,X[3]),t.cartographicArrayToCartesianArray(X,Y);var n=t.geodeticSurfaceNormalCartographic(E.center(e,q));w.fromAxisAngle(n,i,j),_.fromQuaternion(j,H);for(var r=0;4>r;++r)_.multiplyByVector(H,Y[r],Y[r]);return t.cartesianArrayToCartographicArray(Y,X),E.fromCartographicArray(X)}function O(e){e=o(e,o.EMPTY_OBJECT);var t=e.rectangle,i=o(e.granularity,g.RADIANS_PER_DEGREE),n=o(e.ellipsoid,u.WGS84),r=o(e.height,0),s=o(e.rotation,0),l=o(e.stRotation,0),c=o(e.vertexFormat,S.DEFAULT),h=e.extrudedHeight,d=a(h),p=o(e.closeTop,!0),m=o(e.closeBottom,!0);this._rectangle=t,this._granularity=i,this._ellipsoid=u.clone(n),this._surfaceHeight=r,this._rotation=s,this._stRotation=l,this._vertexFormat=S.clone(c),this._extrudedHeight=o(h,0),this._extrude=d,this._closeTop=p,this._closeBottom=m,this._workerName="createRectangleGeometry",this._rotatedRectangle=R(this._rectangle,this._ellipsoid,s)}var L=new i,N=new i,F=new i,k=new i,B=new E,z=new t,V=new e,U=new e,G=new i,W=new i,H=new _,q=new i,j=new w,Y=[new i,new i,new i,new i],X=[new n,new n,new n,new n];O.packedLength=E.packedLength+u.packedLength+S.packedLength+E.packedLength+8,O.pack=function(e,t,i){i=o(i,0),E.pack(e._rectangle,t,i),i+=E.packedLength,u.pack(e._ellipsoid,t,i),i+=u.packedLength,S.pack(e._vertexFormat,t,i),i+=S.packedLength,E.pack(e._rotatedRectangle,t,i),i+=E.packedLength,t[i++]=e._granularity,t[i++]=e._surfaceHeight,t[i++]=e._rotation,t[i++]=e._stRotation,t[i++]=e._extrudedHeight,t[i++]=e._extrude?1:0,t[i++]=e._closeTop?1:0,t[i]=e._closeBottom?1:0};var Z=new E,K=new E,J=u.clone(u.UNIT_SPHERE),Q=new S,$={rectangle:Z,ellipsoid:J,vertexFormat:Q,granularity:void 0,height:void 0,rotation:void 0,stRotation:void 0,extrudedHeight:void 0,closeTop:void 0,closeBottom:void 0};O.unpack=function(e,t,i){t=o(t,0);var n=E.unpack(e,t,Z);t+=E.packedLength;var r=u.unpack(e,t,J);t+=u.packedLength;var s=S.unpack(e,t,Q);t+=S.packedLength;var l=E.unpack(e,t,K);t+=E.packedLength;var c=e[t++],h=e[t++],d=e[t++],p=e[t++],m=e[t++],f=1===e[t++],g=1===e[t++],v=1===e[t];return a(i)?(i._rectangle=E.clone(n,i._rectangle),i._ellipsoid=u.clone(r,i._ellipsoid),i._vertexFormat=S.clone(s,i._vertexFormat),i._granularity=c,i._surfaceHeight=h,i._rotation=d,i._stRotation=p,i._extrudedHeight=f?m:void 0,i._extrude=f,i._closeTop=g,i._closeBottom=v,i._rotatedRectangle=l,i):($.granularity=c,$.height=h,$.rotation=d,$.stRotation=p,$.extrudedHeight=f?m:void 0,$.closeTop=g,$.closeBottom=v,new O($))};var ee=new v,te=new _,ie=new n,ne=new w,re=new n;return O.createGeometry=function(t){if(!g.equalsEpsilon(t._rectangle.north,t._rectangle.south,g.EPSILON10)&&!g.equalsEpsilon(t._rectangle.east,t._rectangle.west,g.EPSILON10)){var n=E.clone(t._rectangle,B),r=t._ellipsoid,o=t._surfaceHeight,s=t._extrude,l=t._extrudedHeight,u=t._stRotation,h=t._vertexFormat,p=b.computeOptions(t,n,ie),m=ee,f=te;if(a(u)){v.fromRotation(-u,m);var C=E.center(n,re),S=r.cartographicToCartesian(C,G);i.normalize(S,S),w.fromAxisAngle(S,-u,ne),_.fromQuaternion(ne,f)}else v.clone(v.IDENTITY,m),_.clone(_.IDENTITY,f);p.lonScalar=1/n.width,p.latScalar=1/n.height,p.vertexFormat=h,p.textureMatrix=m,p.tangentRotationMatrix=f,p.size=p.width*p.height;var T,x;if(n=t._rectangle,s){T=I(p);var A=e.fromRectangle3D(n,r,o,U),M=e.fromRectangle3D(n,r,l,V);x=e.union(A,M)}else T=P(p),T.attributes.position.values=y.scaleToGeodeticHeight(T.attributes.position.values,o,r,!1),x=e.fromRectangle3D(n,r,o);return h.position||delete T.attributes.position,new c({attributes:new d(T.attributes),indices:T.indices,primitiveType:T.primitiveType,boundingSphere:x})}},O.createShadowVolume=function(e,t,i){var n=e._granularity,r=e._ellipsoid,o=t(n,r),a=i(n,r);return new O({rectangle:e._rectangle,rotation:e._rotation,ellipsoid:r,stRotation:e._stRotation,granularity:n,extrudedHeight:a,height:o,closeTop:!0,closeBottom:!0,vertexFormat:S.POSITION_ONLY})},s(O.prototype,{rectangle:{get:function(){return this._rotatedRectangle}}}),O}),define("Cesium/Core/RectangleOutlineGeometry",["./BoundingSphere","./Cartesian3","./Cartographic","./ComponentDatatype","./defaultValue","./defined","./DeveloperError","./Ellipsoid","./Geometry","./GeometryAttribute","./GeometryAttributes","./IndexDatatype","./Math","./PolygonPipeline","./PrimitiveType","./Rectangle","./RectangleGeometryLibrary"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g){"use strict";function v(e){var t,i=e.size,r=e.height,o=e.width,a=new Float64Array(3*i),s=0,d=0,p=E;for(t=0;o>t;t++)g.computePosition(e,d,t,p),a[s++]=p.x,a[s++]=p.y,a[s++]=p.z;for(t=o-1,d=1;r>d;d++)g.computePosition(e,d,t,p),a[s++]=p.x,a[s++]=p.y,a[s++]=p.z;for(d=r-1,t=o-2;t>=0;t--)g.computePosition(e,d,t,p),a[s++]=p.x,a[s++]=p.y,a[s++]=p.z;for(t=0,d=r-2;d>0;d--)g.computePosition(e,d,t,p),a[s++]=p.x,a[s++]=p.y,a[s++]=p.z;for(var f=a.length/3*2,v=h.createTypedArray(a.length/3,f),_=0,y=0;yC;C++)_[y++]=C,_[y++]=C+1,_[y++]=C+c,_[y++]=C+c+1;return _[y++]=c-1,_[y++]=0,_[y++]=c+c-1,_[y++]=c,_[y++]=0,_[y++]=c,_[y++]=l-1,_[y++]=c+l-1,_[y++]=l+s-2,_[y++]=l+s-2+c,_[y++]=2*l+s-3,_[y++]=2*l+s-3+c,a.indices=_,a}function y(e){e=r(e,r.EMPTY_OBJECT);var t=e.rectangle,i=r(e.granularity,d.RADIANS_PER_DEGREE),n=r(e.ellipsoid,s.WGS84),o=r(e.height,0),a=r(e.rotation,0),l=e.extrudedHeight;this._rectangle=t,this._granularity=i,this._ellipsoid=n,this._surfaceHeight=o,this._rotation=a,this._extrudedHeight=l,this._workerName="createRectangleOutlineGeometry"; +}var C=new e,w=new e,E=new t,b=new f;y.packedLength=f.packedLength+s.packedLength+5,y.pack=function(e,t,i){i=r(i,0),f.pack(e._rectangle,t,i),i+=f.packedLength,s.pack(e._ellipsoid,t,i),i+=s.packedLength,t[i++]=e._granularity,t[i++]=e._surfaceHeight,t[i++]=e._rotation,t[i++]=o(e._extrudedHeight)?1:0,t[i]=r(e._extrudedHeight,0)};var S=new f,T=s.clone(s.UNIT_SPHERE),x={rectangle:S,ellipsoid:T,granularity:void 0,height:void 0,rotation:void 0,extrudedHeight:void 0};y.unpack=function(e,t,i){t=r(t,0);var n=f.unpack(e,t,S);t+=f.packedLength;var a=s.unpack(e,t,T);t+=s.packedLength;var l=e[t++],u=e[t++],c=e[t++],h=e[t++],d=e[t];return o(i)?(i._rectangle=f.clone(n,i._rectangle),i._ellipsoid=s.clone(a,i._ellipsoid),i._surfaceHeight=u,i._rotation=c,i._extrudedHeight=h?d:void 0,i):(x.granularity=l,x.height=u,x.rotation=c,x.extrudedHeight=h?d:void 0,new y(x))};var A=new i;return y.createGeometry=function(t){var i=f.clone(t._rectangle,b),n=t._ellipsoid,r=t._surfaceHeight,a=t._extrudedHeight,s=g.computeOptions(t,i,A);s.size=2*s.width+2*s.height-4;var u,c;if(i=t._rectangle,!d.equalsEpsilon(i.north,i.south,d.EPSILON10)&&!d.equalsEpsilon(i.east,i.west,d.EPSILON10)){if(o(a)){u=_(s);var h=e.fromRectangle3D(i,n,r,w),y=e.fromRectangle3D(i,n,a,C);c=e.union(h,y)}else u=v(s),u.attributes.position.values=p.scaleToGeodeticHeight(u.attributes.position.values,r,n,!1),c=e.fromRectangle3D(i,n,r);return new l({attributes:u.attributes,indices:u.indices,primitiveType:m.LINES,boundingSphere:c})}},y}),define("Cesium/Core/ReferenceFrame",["./freezeObject"],function(e){"use strict";var t={FIXED:0,INERTIAL:1};return e(t)}),define("Cesium/Core/requestAnimationFrame",["./defined","./getTimestamp"],function(e,t){"use strict";function i(e){return n(e)}if("undefined"!=typeof window){var n=window.requestAnimationFrame;return function(){if(!e(n))for(var i=["webkit","moz","ms","o"],r=0,o=i.length;o>r&&!e(n);)n=window[i[r]+"RequestAnimationFrame"],++r;if(!e(n)){var a=1e3/60,s=0;n=function(e){var i=t(),n=Math.max(a-(i-s),0);return s=i+n,setTimeout(function(){e(s)},n)}}}(),i}}),define("Cesium/Core/sampleTerrain",["../ThirdParty/when","./defined","./DeveloperError"],function(e,t,i){"use strict";function n(t,i,n){function o(){t.ready?e(r(t,i,n),function(e){a.resolve(e)}):setTimeout(o,10)}var a=e.defer();return o(),a.promise}function r(t,i,n){var r,s=t.tilingScheme,l=[],u={};for(r=0;rI.mouseEmulationIgnoreMilliseconds}function _(e,i){if(v(e)){var r=i.button;e._buttonDown=r;var o;if(r===R.LEFT)o=u.LEFT_DOWN;else if(r===R.MIDDLE)o=u.MIDDLE_DOWN;else{if(r!==R.RIGHT)return;o=u.RIGHT_DOWN}var a=c(e,i,e._primaryPosition);t.clone(a,e._primaryStartPosition),t.clone(a,e._primaryPreviousPosition);var s=d(i),l=e.getInputAction(o,s);n(l)&&(t.clone(a,O.position),l(O),i.preventDefault())}}function y(e,i){if(v(e)){var r=i.button;e._buttonDown=void 0;var o,a;if(r===R.LEFT)o=u.LEFT_UP,a=u.LEFT_CLICK;else if(r===R.MIDDLE)o=u.MIDDLE_UP,a=u.MIDDLE_CLICK;else{if(r!==R.RIGHT)return;o=u.RIGHT_UP,a=u.RIGHT_CLICK}var s=d(i),l=e.getInputAction(o,s),h=e.getInputAction(a,s);if(n(l)||n(h)){var p=c(e,i,e._primaryPosition);if(n(l)&&(t.clone(p,L.position),l(L)),n(h)){var m=e._primaryStartPosition,f=m.x-p.x,g=m.y-p.y,_=Math.sqrt(f*f+g*g);_0?-120*t.detail:t.wheelDelta;if(n(i)){var o=d(t),a=e.getInputAction(u.WHEEL,o);n(a)&&(a(i),t.preventDefault())}}function b(e,i){g(e);var n,r,o,a=i.changedTouches,s=a.length,l=e._positions;for(n=0;s>n;++n)r=a[n],o=r.identifier,l.set(o,c(e,r,new t));T(e,i);var u=e._previousPositions;for(n=0;s>n;++n)r=a[n],o=r.identifier,u.set(o,t.clone(l.get(o)))}function S(e,t){g(e);var i,n,r,o=t.changedTouches,a=o.length,s=e._positions;for(i=0;a>i;++i)n=o[i],r=n.identifier,s.remove(r);T(e,t);var l=e._previousPositions;for(i=0;a>i;++i)n=o[i],r=n.identifier,l.remove(r)}function T(e,i){var r,o,a=d(i),s=e._positions,l=e._previousPositions,c=s.length;if(1!==c&&e._buttonDown===R.LEFT&&(e._buttonDown=void 0,r=e.getInputAction(u.LEFT_UP,a),n(r)&&(t.clone(e._primaryPosition,V.position),r(V)),0===c&&(o=e.getInputAction(u.LEFT_CLICK,a),n(o)))){var h=e._primaryStartPosition,p=l.values[0],m=h.x-p.x,f=h.y-p.y,g=Math.sqrt(m*m+f*f);gr;++r){o=s[r],a=o.identifier;var h=u.get(a);n(h)&&c(e,o,h)}A(e,i);var d=e._previousPositions;for(r=0;l>r;++r)o=s[r],a=o.identifier,t.clone(u.get(a),d.get(a))}function A(e,i){var r,o=d(i),a=e._positions,s=e._previousPositions,l=a.length;if(1===l&&e._buttonDown===R.LEFT){var c=a.values[0];t.clone(c,e._primaryPosition);var h=e._primaryPreviousPosition;r=e.getInputAction(u.MOUSE_MOVE,o),n(r)&&(t.clone(h,G.startPosition),t.clone(c,G.endPosition),r(G)),t.clone(c,h),i.preventDefault()}else if(2===l&&e._isPinching&&(r=e.getInputAction(u.PINCH_MOVE,o),n(r))){var p=a.values[0],m=a.values[1],f=s.values[0],g=s.values[1],v=m.x-p.x,_=m.y-p.y,y=.25*Math.sqrt(v*v+_*_),C=g.x-f.x,w=g.y-f.y,E=.25*Math.sqrt(C*C+w*w),b=.125*(m.y+p.y),S=.125*(g.y+f.y),T=Math.atan2(_,v),x=Math.atan2(w,C);t.fromElements(0,E,W.distance.startPosition),t.fromElements(0,y,W.distance.endPosition),t.fromElements(x,S,W.angleAndHeight.startPosition),t.fromElements(T,b,W.angleAndHeight.endPosition),r(W)}}function P(e,i){if(i.target.setPointerCapture(i.pointerId),"touch"===i.pointerType){var n=e._positions,r=i.pointerId;n.set(r,c(e,i,new t)),T(e,i);var o=e._previousPositions;o.set(r,t.clone(n.get(r)))}else _(e,i)}function M(e,t){if("touch"===t.pointerType){var i=e._positions,n=t.pointerId;i.remove(n),T(e,t);var r=e._previousPositions;r.remove(n)}else y(e,t)}function D(e,i){if("touch"===i.pointerType){var r=e._positions,o=i.pointerId,a=r.get(o);if(!n(a))return;c(e,i,a),A(e,i);var s=e._previousPositions;t.clone(r.get(o),s.get(o))}else C(e,i)}function I(n){this._inputEvents={},this._buttonDown=void 0,this._isPinching=!1,this._lastSeenTouchEvent=-I.mouseEmulationIgnoreMilliseconds,this._primaryStartPosition=new t,this._primaryPosition=new t,this._primaryPreviousPosition=new t,this._positions=new e,this._previousPositions=new e,this._removalFunctions=[],this._clickPixelTolerance=5,this._element=i(n,document),m(this)}var R={LEFT:0,MIDDLE:1,RIGHT:2},O={position:new t},L={position:new t},N={position:new t},F={startPosition:new t,endPosition:new t},k={position:new t},B={position:new t},z={position1:new t,position2:new t},V={position:new t},U={position:new t},G={startPosition:new t,endPosition:new t},W={distance:{startPosition:new t,endPosition:new t},angleAndHeight:{startPosition:new t,endPosition:new t}};return I.prototype.setInputAction=function(e,t,i){var n=h(t,i);this._inputEvents[n]=e},I.prototype.getInputAction=function(e,t){var i=h(e,t);return this._inputEvents[i]},I.prototype.removeInputAction=function(e,t){var i=h(e,t);delete this._inputEvents[i]},I.prototype.isDestroyed=function(){return!1},I.prototype.destroy=function(){return f(this),r(this)},I.mouseEmulationIgnoreMilliseconds=800,I}),define("Cesium/Core/ShowGeometryInstanceAttribute",["./ComponentDatatype","./defaultValue","./defined","./defineProperties","./DeveloperError"],function(e,t,i,n,r){"use strict";function o(e){e=t(e,!0),this.value=o.toValue(e)}return n(o.prototype,{componentDatatype:{get:function(){return e.UNSIGNED_BYTE}},componentsPerAttribute:{get:function(){return 1}},normalize:{get:function(){return!1}}}),o.toValue=function(e,t){return i(t)?(t[0]=e,t):new Uint8Array([e])},o}),define("Cesium/Core/Simon1994PlanetaryPositions",["./Cartesian3","./defined","./DeveloperError","./JulianDate","./Math","./Matrix3","./TimeConstants","./TimeStandard"],function(e,t,i,n,r,o,a,s){"use strict";function l(e){var t=6.239996+.0172019696544*e;return.001657*Math.sin(t+.01671*Math.sin(t))}function u(e,t){t=n.addSeconds(e,C,t);var i=n.totalDays(t)-w;return t=n.addSeconds(t,l(i),t)}function c(n,a,s,l,u,c,p,m){if(0>s&&(s=-s,u+=r.PI),0>s||s>r.PI)throw new i("The inclination is out of range. Inclination must be greater than or equal to zero and less than or equal to Pi radians.");var g=n*(1-a),v=l-u,_=u,y=d(c-l,a),C=h(a,0);if("Hyperbolic"===C&&Math.abs(r.negativePiToPi(y))>=Math.acos(-1/a))throw new i("The true anomaly of the hyperbolic orbit lies outside of the bounds of the hyperbola.");f(v,s,_,M);var w=g*(1+a),E=Math.cos(y),b=Math.sin(y),S=1+a*E;if(S<=r.Epsilon10)throw new i("elements cannot be converted to cartesian");var T=w/S;return t(m)?(m.x=T*E,m.y=T*b,m.z=0):m=new e(T*E,T*b,0),o.multiplyByVector(M,m,m)}function h(e,t){if(0>e)throw new i("eccentricity cannot be negative.");return t>=e?"Circular":1-t>e?"Elliptical":1+t>=e?"Parabolic":"Hyperbolic"}function d(e,t){if(0>t||t>=1)throw new i("eccentricity out of range.");var n=p(e,t);return m(n,t)}function p(e,t){if(0>t||t>=1)throw new i("eccentricity out of range.");var n=Math.floor(e/r.TWO_PI);e-=n*r.TWO_PI;var o,a=e+t*Math.sin(e)/(1-Math.sin(e+t)+Math.sin(e)),s=Number.MAX_VALUE;for(o=0;D>o&&Math.abs(s-a)>I;++o){s=a;var l=s-t*Math.sin(s)-e,u=1-t*Math.cos(s);a=s-l/u}if(o>=D)throw new i("Kepler equation did not converge");return s=a+n*r.TWO_PI}function m(e,t){if(0>t||t>=1)throw new i("eccentricity out of range.");var n=Math.floor(e/r.TWO_PI);e-=n*r.TWO_PI;var o=Math.cos(e)-t,a=Math.sin(e)*Math.sqrt(1-t*t),s=Math.atan2(a,o);return s=r.zeroToTwoPi(s),0>e&&(s-=r.TWO_PI),s+=n*r.TWO_PI}function f(e,n,a,s){if(0>n||n>r.PI)throw new i("inclination out of range");var l=Math.cos(e),u=Math.sin(e),c=Math.cos(n),h=Math.sin(n),d=Math.cos(a),p=Math.sin(a);return t(s)?(s[0]=d*l-p*u*c,s[1]=p*l+d*u*c,s[2]=u*h,s[3]=-d*u-p*l*c,s[4]=-p*u+d*l*c,s[5]=l*h,s[6]=p*h,s[7]=-d*h,s[8]=c):s=new o(d*l-p*u*c,-d*u-p*l*c,p*h,p*l+d*u*c,-p*u+d*l*c,-d*h,u*h,l*h,c),s}function g(e,t){u(e,Me);var i=Me.dayNumber-E.dayNumber+(Me.secondsOfDay-E.secondsOfDay)/a.SECONDS_PER_DAY,n=i/(10*a.DAYS_PER_JULIAN_CENTURY),r=.3595362*n,o=R+W*Math.cos(N*r)+J*Math.sin(N*r)+H*Math.cos(F*r)+Q*Math.sin(F*r)+q*Math.cos(k*r)+$*Math.sin(k*r)+j*Math.cos(B*r)+ee*Math.sin(B*r)+Y*Math.cos(z*r)+te*Math.sin(z*r)+X*Math.cos(V*r)+ie*Math.sin(V*r)+Z*Math.cos(U*r)+ne*Math.sin(U*r)+K*Math.cos(G*r)+re*Math.sin(G*r),s=O+L*n+pe*Math.cos(oe*r)+we*Math.sin(oe*r)+me*Math.cos(ae*r)+Ee*Math.sin(ae*r)+fe*Math.cos(se*r)+be*Math.sin(se*r)+ge*Math.cos(le*r)+Se*Math.sin(le*r)+ve*Math.cos(ue*r)+Te*Math.sin(ue*r)+_e*Math.cos(ce*r)+xe*Math.sin(ce*r)+ye*Math.cos(he*r)+Ae*Math.sin(he*r)+Ce*Math.cos(de*r)+Pe*Math.sin(de*r),l=.0167086342-.0004203654*n,h=102.93734808*x+11612.3529*A*n,d=469.97289*A*n,p=174.87317577*x-8679.27034*A*n;return c(o,l,d,h,p,s,S,t)}function v(e,t){u(e,Me);var i=Me.dayNumber-E.dayNumber+(Me.secondsOfDay-E.secondsOfDay)/a.SECONDS_PER_DAY,n=i/a.DAYS_PER_JULIAN_CENTURY,r=n*n,o=r*n,s=o*n,l=383397.7725+.004*n,h=.055545526-1.6e-8*n,d=5.15668983*x,p=-8e-5*n+.02966*r-42e-6*o-1.3e-7*s,m=83.35324312*x,f=14643420.2669*n-38.2702*r-.045047*o+21301e-8*s,g=125.04455501*x,v=-6967919.3631*n+6.3602*r+.007625*o-3586e-8*s,_=218.31664563*x,y=1732559343.4847*n-6.391*r+.006588*o-3169e-8*s,C=297.85019547*x+A*(1602961601.209*n-6.3706*r+.006593*o-3169e-8*s),w=93.27209062*x+A*(1739527262.8478*n-12.7512*r-.001037*o+417e-8*s),S=134.96340251*x+A*(1717915923.2178*n+31.8792*r+.051635*o-2447e-7*s),P=357.52910918*x+A*(129596581.0481*n-.5532*r+136e-6*o-1149e-8*s),M=310.17137918*x-A*(6967051.436*n+6.2068*r+.007618*o-3219e-8*s),D=2*C,I=4*C,R=6*C,O=2*S,L=3*S,N=4*S,F=2*w;l+=3400.4*Math.cos(D)-635.6*Math.cos(D-S)-235.6*Math.cos(S)+218.1*Math.cos(D-P)+181*Math.cos(D+S),h+=.014216*Math.cos(D-S)+.008551*Math.cos(D-O)-.001383*Math.cos(S)+.001356*Math.cos(D+S)-.001147*Math.cos(I-L)-914e-6*Math.cos(I-O)+869e-6*Math.cos(D-P-S)-627e-6*Math.cos(D)-394e-6*Math.cos(I-N)+282e-6*Math.cos(D-P-O)-279e-6*Math.cos(C-S)-236e-6*Math.cos(O)+231e-6*Math.cos(I)+229e-6*Math.cos(R-N)-201e-6*Math.cos(O-F),p+=486.26*Math.cos(D-F)-40.13*Math.cos(D)+37.51*Math.cos(F)+25.73*Math.cos(O-F)+19.97*Math.cos(D-P-F),f+=-55609*Math.sin(D-S)-34711*Math.sin(D-O)-9792*Math.sin(S)+9385*Math.sin(I-L)+7505*Math.sin(I-O)+5318*Math.sin(D+S)+3484*Math.sin(I-N)-3417*Math.sin(D-P-S)-2530*Math.sin(R-N)-2376*Math.sin(D)-2075*Math.sin(D-L)-1883*Math.sin(O)-1736*Math.sin(R-5*S)+1626*Math.sin(P)-1370*Math.sin(R-L),v+=-5392*Math.sin(D-F)-540*Math.sin(P)-441*Math.sin(D)+423*Math.sin(F)-288*Math.sin(O-F),y+=-3332.9*Math.sin(D)+1197.4*Math.sin(D-S)-662.5*Math.sin(P)+396.3*Math.sin(S)-218*Math.sin(D-P);var k=2*M,B=3*M;p+=46.997*Math.cos(M)*n-.614*Math.cos(D-F+M)*n+.614*Math.cos(D-F-M)*n-.0297*Math.cos(k)*r-.0335*Math.cos(M)*r+.0012*Math.cos(D-F+k)*r-16e-5*Math.cos(M)*o+4e-5*Math.cos(B)*o+4e-5*Math.cos(k)*o;var z=2.116*Math.sin(M)*n-.111*Math.sin(D-F-M)*n-.0015*Math.sin(M)*r;f+=z,y+=z,v+=-520.77*Math.sin(M)*n+13.66*Math.sin(D-F+M)*n+1.12*Math.sin(D-M)*n-1.06*Math.sin(F-M)*n+.66*Math.sin(k)*r+.371*Math.sin(M)*r-.035*Math.sin(D-F+k)*r-.015*Math.sin(D-F+M)*r+.0014*Math.sin(M)*o-.0011*Math.sin(B)*o-9e-4*Math.sin(k)*o,l*=T;var V=d+p*A,U=m+f*A,G=_+y*A,W=g+v*A;return c(l,h,V,U,W,G,b,t)}function _(t,i){return i=v(t,i),e.multiplyByScalar(i,Ie,i)}var y={},C=32.184,w=2451545,E=new n(2451545,0,s.TAI),b=398600435e6,S=1.012300034*b*328900.56,T=1e3,x=r.RADIANS_PER_DEGREE,A=r.RADIANS_PER_ARCSECOND,P=14959787e4,M=new o,D=50,I=r.EPSILON8,R=1.0000010178*P,O=100.46645683*x,L=1295977422.83429*A,N=16002,F=21863,k=32004,B=10931,z=14529,V=16368,U=15318,G=32794,W=64e-7*P,H=-152*1e-7*P,q=62e-7*P,j=-8e-7*P,Y=32e-7*P,X=-41*1e-7*P,Z=19e-7*P,K=-11*1e-7*P,J=-150*1e-7*P,Q=-46*1e-7*P,$=68*1e-7*P,ee=54e-7*P,te=14e-7*P,ie=24e-7*P,ne=-28*1e-7*P,re=22e-7*P,oe=10,ae=16002,se=21863,le=10931,ue=1473,ce=32004,he=4387,de=73,pe=-325*1e-7,me=-322*1e-7,fe=-79*1e-7,ge=232*1e-7,ve=-52*1e-7,_e=97e-7,ye=55e-7,Ce=-41*1e-7,we=-105*1e-7,Ee=-137*1e-7,be=258e-7,Se=35e-7,Te=-116*1e-7,xe=-88*1e-7,Ae=-112*1e-7,Pe=-80*1e-7,Me=new n(0,0,s.TAI),De=.012300034,Ie=De/(De+1)*-1,Re=new o(1.0000000000000002,5.619723173785822e-16,4.690511510146299e-19,-5.154129427414611e-16,.9174820620691819,-.39777715593191376,-2.23970096136568e-16,.39777715593191376,.9174820620691819),Oe=new e;return y.computeSunPositionInEarthInertialFrame=function(i,r){return t(i)||(i=n.now()),t(r)||(r=new e),Oe=g(i,Oe),r=e.negate(Oe,r),_(i,Oe),e.subtract(r,Oe,r),o.multiplyByVector(Re,r,r),r},y.computeMoonPositionInEarthInertialFrame=function(e,i){return t(e)||(e=n.now()),i=v(e,i),o.multiplyByVector(Re,i,i),i},y}),define("Cesium/Core/SimplePolylineGeometry",["./BoundingSphere","./Cartesian3","./Color","./ComponentDatatype","./defaultValue","./defined","./DeveloperError","./Ellipsoid","./Geometry","./GeometryAttribute","./GeometryAttributes","./IndexDatatype","./Math","./PolylinePipeline","./PrimitiveType"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m){"use strict";function f(e,t,n,r,o,a,s){var l,u=p.numberOfPoints(e,t,o),c=n.red,h=n.green,d=n.blue,m=n.alpha,f=r.red,g=r.green,v=r.blue,_=r.alpha;if(i.equals(n,r)){for(l=0;u>l;l++)a[s++]=i.floatToByte(c),a[s++]=i.floatToByte(h),a[s++]=i.floatToByte(d),a[s++]=i.floatToByte(m);return s}var y=(f-c)/u,C=(g-h)/u,w=(v-d)/u,E=(_-m)/u,b=s;for(l=0;u>l;l++)a[b++]=i.floatToByte(c+l*y),a[b++]=i.floatToByte(h+l*C),a[b++]=i.floatToByte(d+l*w),a[b++]=i.floatToByte(m+l*E);return b}function g(e){e=r(e,r.EMPTY_OBJECT);var n=e.positions,a=e.colors,l=r(e.colorsPerVertex,!1);this._positions=n,this._colors=a,this._colorsPerVertex=l,this._followSurface=r(e.followSurface,!0),this._granularity=r(e.granularity,d.RADIANS_PER_DEGREE),this._ellipsoid=r(e.ellipsoid,s.WGS84),this._workerName="createSimplePolylineGeometry";var u=1+n.length*t.packedLength;u+=o(a)?1+a.length*i.packedLength:1,this.packedLength=u+s.packedLength+3}g.pack=function(e,n,a){a=r(a,0);var l,u=e._positions,c=u.length;for(n[a++]=c,l=0;c>l;++l,a+=t.packedLength)t.pack(u[l],n,a);var h=e._colors;for(c=o(h)?h.length:0,n[a++]=c,l=0;c>l;++l,a+=i.packedLength)i.pack(h[l],n,a);s.pack(e._ellipsoid,n,a),a+=s.packedLength,n[a++]=e._colorsPerVertex?1:0,n[a++]=e._followSurface?1:0,n[a]=e._granularity},g.unpack=function(e,n,a){n=r(n,0);var l,u=e[n++],c=new Array(u);for(l=0;u>l;++l,n+=t.packedLength)c[l]=t.unpack(e,n);u=e[n++];var h=u>0?new Array(u):void 0;for(l=0;u>l;++l,n+=i.packedLength)h[l]=i.unpack(e,n);var d=s.unpack(e,n);n+=s.packedLength;var p=1===e[n++],m=1===e[n++],f=e[n];return o(a)?(a._positions=c,a._colors=h,a._ellipsoid=d,a._colorsPerVertex=p,a._followSurface=m,a._granularity=f,a):new g({positions:c,colors:h,ellipsoid:d,colorsPerVertex:p,followSurface:m,granularity:f})};var v=new Array(2),_=new Array(2),y={positions:v,height:_,ellipsoid:void 0,minDistance:void 0};return g.createGeometry=function(r){var a,s,g,C,w,E=r._positions,b=r._colors,S=r._colorsPerVertex,T=r._followSurface,x=r._granularity,A=r._ellipsoid,P=d.chordLength(x,A.maximumRadius),M=o(b)&&!S,D=E.length,I=0;if(T){var R=p.extractHeights(E,A),O=y;if(O.minDistance=P,O.ellipsoid=A,M){var L=0;for(a=0;D-1>a;a++)L+=p.numberOfPoints(E[a],E[a+1],P)+1;s=new Float64Array(3*L),C=new Uint8Array(4*L),O.positions=v,O.height=_;var N=0;for(a=0;D-1>a;++a){v[0]=E[a],v[1]=E[a+1],_[0]=R[a],_[1]=R[a+1];var F=p.generateArc(O);if(o(b)){var k=F.length/3;w=b[a];for(var B=0;k>B;++B)C[N++]=i.floatToByte(w.red),C[N++]=i.floatToByte(w.green),C[N++]=i.floatToByte(w.blue),C[N++]=i.floatToByte(w.alpha)}s.set(F,I),I+=F.length}}else if(O.positions=E,O.height=R,s=new Float64Array(p.generateArc(O)),o(b)){for(C=new Uint8Array(s.length/3*4),a=0;D-1>a;++a){var z=E[a],V=E[a+1],U=b[a],G=b[a+1];I=f(z,V,U,G,P,C,I)}var W=b[D-1];C[I++]=i.floatToByte(W.red),C[I++]=i.floatToByte(W.green),C[I++]=i.floatToByte(W.blue),C[I++]=i.floatToByte(W.alpha)}}else{g=M?2*D-2:D,s=new Float64Array(3*g),C=o(b)?new Uint8Array(4*g):void 0;var H=0,q=0;for(a=0;D>a;++a){var j=E[a];if(M&&a>0&&(t.pack(j,s,H),H+=3,w=b[a-1],C[q++]=i.floatToByte(w.red),C[q++]=i.floatToByte(w.green),C[q++]=i.floatToByte(w.blue),C[q++]=i.floatToByte(w.alpha)),M&&a===D-1)break;t.pack(j,s,H),H+=3,o(b)&&(w=b[a],C[q++]=i.floatToByte(w.red),C[q++]=i.floatToByte(w.green),C[q++]=i.floatToByte(w.blue),C[q++]=i.floatToByte(w.alpha))}}var Y=new c;Y.position=new u({componentDatatype:n.DOUBLE,componentsPerAttribute:3,values:s}),o(b)&&(Y.color=new u({componentDatatype:n.UNSIGNED_BYTE,componentsPerAttribute:4,values:C,normalize:!0})),g=s.length/3;var X=2*(g-1),Z=h.createTypedArray(g,X),K=0;for(a=0;g-1>a;++a)Z[K++]=a,Z[K++]=a+1;return new l({attributes:Y,indices:Z,primitiveType:m.LINES,boundingSphere:e.fromPoints(E)})},g}),define("Cesium/Core/SphereGeometry",["./Cartesian3","./defaultValue","./defined","./DeveloperError","./EllipsoidGeometry","./VertexFormat"],function(e,t,i,n,r,o){"use strict";function a(i){var n=t(i.radius,1),o=new e(n,n,n),a={radii:o,stackPartitions:i.stackPartitions,slicePartitions:i.slicePartitions,vertexFormat:i.vertexFormat};this._ellipsoidGeometry=new r(a),this._workerName="createSphereGeometry"}a.packedLength=r.packedLength,a.pack=function(e,t,i){r.pack(e._ellipsoidGeometry,t,i)};var s=new r,l={radius:void 0,radii:new e,vertexFormat:new o,stackPartitions:void 0,slicePartitions:void 0};return a.unpack=function(t,n,u){var c=r.unpack(t,n,s);return l.vertexFormat=o.clone(c._vertexFormat,l.vertexFormat),l.stackPartitions=c._stackPartitions,l.slicePartitions=c._slicePartitions,i(u)?(e.clone(c._radii,l.radii),u._ellipsoidGeometry=new r(l),u):(l.radius=c._radii.x,new a(l))},a.createGeometry=function(e){return r.createGeometry(e._ellipsoidGeometry)},a}),define("Cesium/Core/SphereOutlineGeometry",["./Cartesian3","./defaultValue","./defined","./DeveloperError","./EllipsoidOutlineGeometry"],function(e,t,i,n,r){"use strict";function o(i){var n=t(i.radius,1),o=new e(n,n,n),a={radii:o,stackPartitions:i.stackPartitions,slicePartitions:i.slicePartitions,subdivisions:i.subdivisions};this._ellipsoidGeometry=new r(a),this._workerName="createSphereOutlineGeometry"}o.packedLength=r.packedLength,o.pack=function(e,t,i){r.pack(e._ellipsoidGeometry,t,i)};var a=new r,s={radius:void 0,radii:new e,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0};return o.unpack=function(t,n,l){var u=r.unpack(t,n,a);return s.stackPartitions=u._stackPartitions,s.slicePartitions=u._slicePartitions,s.subdivisions=u._subdivisions,i(l)?(e.clone(u._radii,s.radii),l._ellipsoidGeometry=new r(s),l):(s.radius=u._radii.x,new o(s))},o.createGeometry=function(e){return r.createGeometry(e._ellipsoidGeometry)},o}),define("Cesium/Core/Spherical",["./defaultValue","./defined","./DeveloperError"],function(e,t,i){"use strict";function n(t,i,n){this.clock=e(t,0),this.cone=e(i,0),this.magnitude=e(n,1)}return n.fromCartesian3=function(e,i){var r=e.x,o=e.y,a=e.z,s=r*r+o*o;return t(i)||(i=new n),i.clock=Math.atan2(o,r),i.cone=Math.atan2(Math.sqrt(s),a),i.magnitude=Math.sqrt(s+a*a),i},n.clone=function(e,i){return t(e)?t(i)?(i.clock=e.clock,i.cone=e.cone,i.magnitude=e.magnitude,i):new n(e.clock,e.cone,e.magnitude):void 0},n.normalize=function(e,i){return t(i)?(i.clock=e.clock,i.cone=e.cone,i.magnitude=1,i):new n(e.clock,e.cone,1)},n.equals=function(e,i){return e===i||t(e)&&t(i)&&e.clock===i.clock&&e.cone===i.cone&&e.magnitude===i.magnitude},n.equalsEpsilon=function(i,n,r){return r=e(r,0),i===n||t(i)&&t(n)&&Math.abs(i.clock-n.clock)<=r&&Math.abs(i.cone-n.cone)<=r&&Math.abs(i.magnitude-n.magnitude)<=r},n.prototype.equals=function(e){return n.equals(this,e)},n.prototype.clone=function(e){return n.clone(this,e)},n.prototype.equalsEpsilon=function(e,t){return n.equalsEpsilon(this,e,t)},n.prototype.toString=function(){return"("+this.clock+", "+this.cone+", "+this.magnitude+")"},n}),define("Cesium/Core/subdivideArray",["./defined","./DeveloperError"],function(e,t){"use strict";function i(e,t){for(var i=[],n=e.length,r=0;n>r;){var o=Math.ceil((n-r)/t--);i.push(e.slice(r,r+o)),r+=o}return i}return i}),define("Cesium/Core/TerrainData",["./defineProperties","./DeveloperError"],function(e,t){"use strict";function i(){t.throwInstantiationError()}return e(i.prototype,{waterMask:{get:t.throwInstantiationError}}),i.prototype.interpolateHeight=t.throwInstantiationError,i.prototype.isChildAvailable=t.throwInstantiationError,i.prototype.createMesh=t.throwInstantiationError,i.prototype.upsample=t.throwInstantiationError,i.prototype.wasCreatedByUpsampling=t.throwInstantiationError,i}),define("Cesium/Core/TilingScheme",["./defineProperties","./DeveloperError"],function(e,t){"use strict";function i(e){throw new t("This type should not be instantiated directly. Instead, use WebMercatorTilingScheme or GeographicTilingScheme.")}return e(i.prototype,{ellipsoid:{get:t.throwInstantiationError},rectangle:{get:t.throwInstantiationError},projection:{get:t.throwInstantiationError}}),i.prototype.getNumberOfXTilesAtLevel=t.throwInstantiationError,i.prototype.getNumberOfYTilesAtLevel=t.throwInstantiationError,i.prototype.rectangleToNativeRectangle=t.throwInstantiationError,i.prototype.tileXYToNativeRectangle=t.throwInstantiationError,i.prototype.tileXYToRectangle=t.throwInstantiationError,i.prototype.positionToTileXY=t.throwInstantiationError,i}),define("Cesium/Core/TimeIntervalCollection",["./binarySearch","./defaultValue","./defined","./defineProperties","./DeveloperError","./Event","./JulianDate","./TimeInterval"],function(e,t,i,n,r,o,a,s){"use strict";function l(e,t){return a.compare(e.start,t.start)}function u(e){if(this._intervals=[],this._changedEvent=new o,i(e))for(var t=e.length,n=0;t>n;n++)this.addInterval(e[n])}n(u.prototype,{changedEvent:{get:function(){return this._changedEvent}},start:{get:function(){var e=this._intervals;return 0===e.length?void 0:e[0].start}},isStartIncluded:{get:function(){var e=this._intervals;return 0===e.length?!1:e[0].isStartIncluded}},stop:{get:function(){var e=this._intervals,t=e.length;return 0===t?void 0:e[t-1].stop}},isStopIncluded:{get:function(){var e=this._intervals,t=e.length;return 0===t?!1:e[t-1].isStopIncluded}},length:{get:function(){return this._intervals.length}},isEmpty:{get:function(){return 0===this._intervals.length}}}),u.prototype.equals=function(e,t){if(this===e)return!0;if(!(e instanceof u))return!1;var i=this._intervals,n=e._intervals,r=i.length;if(r!==n.length)return!1;for(var o=0;r>o;o++)if(!s.equals(i[o],n[o],t))return!1;return!0},u.prototype.get=function(e){return this._intervals[e]},u.prototype.removeAll=function(){this._intervals.length>0&&(this._intervals.length=0,this._changedEvent.raiseEvent(this))},u.prototype.findIntervalContainingDate=function(e){var t=this.indexOf(e);return t>=0?this._intervals[t]:void 0},u.prototype.findDataForIntervalContainingDate=function(e){var t=this.indexOf(e);return t>=0?this._intervals[t].data:void 0},u.prototype.contains=function(e){return this.indexOf(e)>=0};var c=new s;return u.prototype.indexOf=function(t){var i=this._intervals;c.start=t,c.stop=t;var n=e(i,c,l);return n>=0?i[n].isStartIncluded?n:n>0&&i[n-1].stop.equals(t)&&i[n-1].isStopIncluded?n-1:~n:(n=~n,n>0&&n-1l;l++){var c=s[l];if((!i(n)||c.start.equals(n))&&(!i(r)||c.stop.equals(r))&&(!i(o)||c.isStartIncluded===o)&&(!i(a)||c.isStopIncluded===a))return s[l]}},u.prototype.addInterval=function(t,n){if(!t.isEmpty){var r,o,u=this._intervals;if(0===u.length||a.greaterThan(t.start,u[u.length-1].stop))return u.push(t),void this._changedEvent.raiseEvent(this);for(o=e(u,t,l),0>o?o=~o:o>0&&t.isStartIncluded&&u[o-1].isStartIncluded&&u[o-1].start.equals(t.start)?--o:o0&&(r=a.compare(u[o-1].stop,t.start),(r>0||0===r&&(u[o-1].isStopIncluded||t.isStartIncluded))&&((i(n)?n(u[o-1].data,t.data):u[o-1].data===t.data)?(t=new s(a.greaterThan(t.stop,u[o-1].stop)?{start:u[o-1].start,stop:t.stop,isStartIncluded:u[o-1].isStartIncluded,isStopIncluded:t.isStopIncluded,data:t.data}:{start:u[o-1].start,stop:u[o-1].stop,isStartIncluded:u[o-1].isStartIncluded,isStopIncluded:u[o-1].isStopIncluded||t.stop.equals(u[o-1].stop)&&t.isStopIncluded,data:t.data}),u.splice(o-1,1),--o):(r=a.compare(u[o-1].stop,t.stop),r>0||0===r&&u[o-1].isStopIncluded&&!t.isStopIncluded?u.splice(o-1,1,new s({start:u[o-1].start,stop:t.start,isStartIncluded:u[o-1].isStartIncluded,isStopIncluded:!t.isStartIncluded,data:u[o-1].data}),new s({start:t.stop,stop:u[o-1].stop,isStartIncluded:!t.isStopIncluded,isStopIncluded:u[o-1].isStopIncluded,data:u[o-1].data})):u[o-1]=new s({start:u[o-1].start,stop:t.start,isStartIncluded:u[o-1].isStartIncluded,isStopIncluded:!t.isStartIncluded,data:u[o-1].data}))));o0||0===r&&(t.isStopIncluded||u[o].isStartIncluded));)if(i(n)?n(u[o].data,t.data):u[o].data===t.data)t=new s({start:t.start,stop:a.greaterThan(u[o].stop,t.stop)?u[o].stop:t.stop,isStartIncluded:t.isStartIncluded,isStopIncluded:a.greaterThan(u[o].stop,t.stop)?u[o].isStopIncluded:t.isStopIncluded,data:t.data}),u.splice(o,1);else{if(u[o]=new s({start:t.stop,stop:u[o].stop,isStartIncluded:!t.isStopIncluded,isStopIncluded:u[o].isStopIncluded,data:u[o].data}),!u[o].isEmpty)break;u.splice(o,1)}u.splice(o,0,t),this._changedEvent.raiseEvent(this)}},u.prototype.removeInterval=function(t){if(t.isEmpty)return!1;var i=!1,n=this._intervals,r=e(n,t,l);0>r&&(r=~r);var o=t.start,u=t.stop,c=t.isStartIncluded,h=t.isStopIncluded;if(r>0){var d=n[r-1],p=d.stop;(a.greaterThan(p,o)||s.equals(p,o)&&d.isStopIncluded&&c)&&(i=!0,(a.greaterThan(p,u)||d.isStopIncluded&&!h&&s.equals(p,u))&&n.splice(r,0,new s({start:u,stop:p,isStartIncluded:!h,isStopIncluded:d.isStopIncluded,data:d.data})),n[r-1]=new s({start:d.start,stop:o,isStartIncluded:d.isStartIncluded,isStopIncluded:!c,data:d.data}))}var m=n[r];for(rh&&(h=d-h),l=h):l=h>d?d:0>h?0:h;var m=o?e(this.tolerance,1):.001;Math.abs(l-p)>m&&(this._seeking=!0,n.currentTime=l)}},l}),define("Cesium/Core/VRTheWorldTerrainProvider",["../ThirdParty/when","./Credit","./defaultValue","./defined","./defineProperties","./DeveloperError","./Ellipsoid","./Event","./GeographicTilingScheme","./getImagePixels","./HeightmapTerrainData","./loadImage","./loadXML","./Math","./Rectangle","./TerrainProvider","./throttleRequestByServer","./TileProviderError"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g,v){"use strict";function _(e,t){this.rectangle=e,this.maxLevel=t}function y(r){function u(e){var t=e.getElementsByTagName("SRS")[0].textContent;if("EPSG:4326"!==t)return void c("SRS "+t+" is not supported.");C._tilingScheme=new l({ellipsoid:w});var i=e.getElementsByTagName("TileFormat")[0];C._heightmapWidth=parseInt(i.getAttribute("width"),10),C._heightmapHeight=parseInt(i.getAttribute("height"),10),C._levelZeroMaximumGeometricError=f.getEstimatedLevelZeroGeometricErrorForAHeightmap(w,Math.min(C._heightmapWidth,C._heightmapHeight),C._tilingScheme.getNumberOfXTilesAtLevel(0));for(var n=e.getElementsByTagName("DataExtent"),r=0;r0&&"/"!==this._url[this._url.length-1]&&(this._url+="/"),this._errorEvent=new s,this._ready=!1,this._readyPromise=e.defer(),this._proxy=r.proxy,this._terrainDataStructure={heightScale:.001,heightOffset:-1e3,elementsPerHeight:3,stride:4,elementMultiplier:256,isBigEndian:!0};var g=r.credit;"string"==typeof g&&(g=new t(g)),this._credit=g,this._tilingScheme=void 0,this._rectangles=[];var y,C=this,w=i(r.ellipsoid,a.WGS84);h()}function C(e,t,i,r){for(var o=e._tilingScheme,a=e._rectangles,s=o.tileXYToRectangle(t,i,r),l=0,u=0;ua)){var s=t(o),u=t(r),c=!0,p=new Array(a),m=new Array(a),f=new Array(a),g=n[0];p[0]=g;var v=i.cartesianToCartographic(g,h);u&&(v.height=r[0]),c=c&&v.height<=0,m[0]=v.height,s?f[0]=o[0]:f[0]=0;for(var _=1,y=1;a>y;++y){var C=n[y],w=i.cartesianToCartographic(C,d);u&&(w.height=r[y]),c=c&&w.height<=0,l(v,w)?v.height_))return p.length=_,m.length=_,f.length=_,{positions:p,topHeights:m,bottomHeights:f}}}var c={},h=new e,d=new e,p=new Array(2),m=new Array(2),f={positions:void 0,height:void 0,granularity:void 0,ellipsoid:void 0};return c.computePositions=function(e,i,l,c,h,d){var g=u(e,i,l,c);if(t(g)){if(i=g.positions,l=g.topHeights,c=g.bottomHeights,i.length>=3){var v=n.fromPoints(i,e),_=v.projectPointsOntoPlane(i);o.computeWindingOrder2D(_)===s.CLOCKWISE&&(i.reverse(),l.reverse(),c.reverse())}var y,C,w=i.length,E=w-2,b=r.chordLength(h,e.maximumRadius),S=f;if(S.minDistance=b,S.ellipsoid=e,d){var T,x=0;for(T=0;w-1>T;T++)x+=a.numberOfPoints(i[T],i[T+1],b)+1;y=new Float64Array(3*x),C=new Float64Array(3*x);var A=p,P=m;S.positions=A,S.height=P;var M=0;for(T=0;w-1>T;T++){A[0]=i[T],A[1]=i[T+1],P[0]=l[T],P[1]=l[T+1];var D=a.generateArc(S);y.set(D,M),P[0]=c[T],P[1]=c[T+1],C.set(a.generateArc(S),M),M+=D.length}}else S.positions=i,S.height=l,y=new Float64Array(a.generateArc(S)),S.height=c,C=new Float64Array(a.generateArc(S));return{bottomPositions:C,topPositions:y,numCorners:E}}},c}),define("Cesium/Core/WallGeometry",["./BoundingSphere","./Cartesian3","./ComponentDatatype","./defaultValue","./defined","./DeveloperError","./Ellipsoid","./Geometry","./GeometryAttribute","./GeometryAttributes","./IndexDatatype","./Math","./PrimitiveType","./VertexFormat","./WallGeometryLibrary"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m){"use strict";function f(e){e=n(e,n.EMPTY_OBJECT);var i=e.positions,o=e.maximumHeights,s=e.minimumHeights,l=n(e.vertexFormat,p.DEFAULT),u=n(e.granularity,h.RADIANS_PER_DEGREE),c=n(e.ellipsoid,a.WGS84);this._positions=i,this._minimumHeights=s,this._maximumHeights=o,this._vertexFormat=p.clone(l),this._granularity=u,this._ellipsoid=a.clone(c),this._workerName="createWallGeometry";var d=1+i.length*t.packedLength+2;r(s)&&(d+=s.length),r(o)&&(d+=o.length),this.packedLength=d+a.packedLength+p.packedLength+1}var g=new t,v=new t,_=new t,y=new t,C=new t,w=new t,E=new t,b=new t;f.pack=function(e,i,o){o=n(o,0);var s,l=e._positions,u=l.length;for(i[o++]=u,s=0;u>s;++s,o+=t.packedLength)t.pack(l[s],i,o);var c=e._minimumHeights;if(u=r(c)?c.length:0,i[o++]=u,r(c))for(s=0;u>s;++s)i[o++]=c[s];var h=e._maximumHeights;if(u=r(h)?h.length:0,i[o++]=u,r(h))for(s=0;u>s;++s)i[o++]=h[s];a.pack(e._ellipsoid,i,o),o+=a.packedLength,p.pack(e._vertexFormat,i,o),o+=p.packedLength,i[o]=e._granularity};var S=a.clone(a.UNIT_SPHERE),T=new p,x={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:S,vertexFormat:T,granularity:void 0};return f.unpack=function(e,i,o){i=n(i,0);var s,l=e[i++],u=new Array(l);for(s=0;l>s;++s,i+=t.packedLength)u[s]=t.unpack(e,i);l=e[i++];var c;if(l>0)for(c=new Array(l),s=0;l>s;++s)c[s]=e[i++];l=e[i++];var h;if(l>0)for(h=new Array(l),s=0;l>s;++s)h[s]=e[i++];var d=a.unpack(e,i,S);i+=a.packedLength;var m=p.unpack(e,i,T);i+=p.packedLength;var g=e[i];return r(o)?(o._positions=u,o._minimumHeights=c,o._maximumHeights=h,o._ellipsoid=a.clone(d,o._ellipsoid),o._vertexFormat=p.clone(m,o._vertexFormat),o._granularity=g,o):(x.positions=u,x.minimumHeights=c,x.maximumHeights=h,x.granularity=g,new f(x))},f.fromConstantHeights=function(e){e=n(e,n.EMPTY_OBJECT);var t,i,o=e.positions,a=e.minimumHeight,s=e.maximumHeight,l=r(a),u=r(s);if(l||u){var c=o.length;t=l?new Array(c):void 0,i=u?new Array(c):void 0;for(var h=0;c>h;++h)l&&(t[h]=a),u&&(i[h]=s)}var d={positions:o,maximumHeights:i,minimumHeights:t,ellipsoid:e.ellipsoid,vertexFormat:e.vertexFormat};return new f(d)},f.createGeometry=function(n){var o=n._positions,a=n._minimumHeights,p=n._maximumHeights,f=n._vertexFormat,S=n._granularity,T=n._ellipsoid,x=m.computePositions(T,o,p,a,S,!0);if(r(x)){var A=x.bottomPositions,P=x.topPositions,M=x.numCorners,D=P.length,I=2*D,R=f.position?new Float64Array(I):void 0,O=f.normal?new Float32Array(I):void 0,L=f.tangent?new Float32Array(I):void 0,N=f.binormal?new Float32Array(I):void 0,F=f.st?new Float32Array(I/3*2):void 0,k=0,B=0,z=0,V=0,U=0,G=b,W=E,H=w,q=!0;D/=3;var j,Y=0,X=1/(D-o.length+1);for(j=0;D>j;++j){var Z=3*j,K=t.fromArray(P,Z,g),J=t.fromArray(A,Z,v);if(f.position&&(R[k++]=J.x,R[k++]=J.y,R[k++]=J.z,R[k++]=K.x,R[k++]=K.y,R[k++]=K.z),f.st&&(F[U++]=Y,F[U++]=0,F[U++]=Y,F[U++]=1),f.normal||f.tangent||f.binormal){var Q,$=t.clone(t.ZERO,C),ee=T.scaleToGeodeticSurface(t.fromArray(P,Z,v),v);if(D>j+1&&(Q=T.scaleToGeodeticSurface(t.fromArray(P,Z+3,_),_),$=t.fromArray(P,Z+3,C)),q){var te=t.subtract($,K,y),ie=t.subtract(ee,K,g);G=t.normalize(t.cross(ie,te,G),G),q=!1}t.equalsEpsilon(Q,ee,h.EPSILON10)?q=!0:(Y+=X,f.tangent&&(W=t.normalize(t.subtract(Q,ee,W),W)),f.binormal&&(H=t.normalize(t.cross(G,W,H),H))),f.normal&&(O[B++]=G.x,O[B++]=G.y,O[B++]=G.z,O[B++]=G.x,O[B++]=G.y,O[B++]=G.z),f.tangent&&(L[V++]=W.x,L[V++]=W.y,L[V++]=W.z,L[V++]=W.x,L[V++]=W.y,L[V++]=W.z),f.binormal&&(N[z++]=H.x,N[z++]=H.y,N[z++]=H.z,N[z++]=H.x,N[z++]=H.y,N[z++]=H.z)}}var ne=new u;f.position&&(ne.position=new l({componentDatatype:i.DOUBLE,componentsPerAttribute:3,values:R})),f.normal&&(ne.normal=new l({componentDatatype:i.FLOAT,componentsPerAttribute:3,values:O})),f.tangent&&(ne.tangent=new l({componentDatatype:i.FLOAT,componentsPerAttribute:3,values:L})),f.binormal&&(ne.binormal=new l({componentDatatype:i.FLOAT,componentsPerAttribute:3,values:N})),f.st&&(ne.st=new l({componentDatatype:i.FLOAT,componentsPerAttribute:2,values:F}));var re=I/3;I-=6*(M+1);var oe=c.createTypedArray(re,I),ae=0;for(j=0;re-2>j;j+=2){var se=j,le=j+2,ue=t.fromArray(R,3*se,g),ce=t.fromArray(R,3*le,v);if(!t.equalsEpsilon(ue,ce,h.EPSILON10)){var he=j+1,de=j+3;oe[ae++]=he,oe[ae++]=se,oe[ae++]=de,oe[ae++]=de,oe[ae++]=se,oe[ae++]=le}}return new s({attributes:ne,indices:oe,primitiveType:d.TRIANGLES,boundingSphere:new e.fromVertices(R)})}},f}),define("Cesium/Core/WallOutlineGeometry",["./BoundingSphere","./Cartesian3","./ComponentDatatype","./defaultValue","./defined","./DeveloperError","./Ellipsoid","./Geometry","./GeometryAttribute","./GeometryAttributes","./IndexDatatype","./Math","./PrimitiveType","./WallGeometryLibrary"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p){"use strict";function m(e){e=n(e,n.EMPTY_OBJECT);var i=e.positions,o=e.maximumHeights,s=e.minimumHeights,l=n(e.granularity,h.RADIANS_PER_DEGREE),u=n(e.ellipsoid,a.WGS84);this._positions=i,this._minimumHeights=s,this._maximumHeights=o,this._granularity=l,this._ellipsoid=a.clone(u),this._workerName="createWallOutlineGeometry";var c=1+i.length*t.packedLength+2;r(s)&&(c+=s.length),r(o)&&(c+=o.length),this.packedLength=c+a.packedLength+1}var f=new t,g=new t;m.pack=function(e,i,o){o=n(o,0);var s,l=e._positions,u=l.length;for(i[o++]=u,s=0;u>s;++s,o+=t.packedLength)t.pack(l[s],i,o);var c=e._minimumHeights;if(u=r(c)?c.length:0,i[o++]=u,r(c))for(s=0;u>s;++s)i[o++]=c[s];var h=e._maximumHeights;if(u=r(h)?h.length:0,i[o++]=u,r(h))for(s=0;u>s;++s)i[o++]=h[s];a.pack(e._ellipsoid,i,o),o+=a.packedLength,i[o]=e._granularity};var v=a.clone(a.UNIT_SPHERE),_={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:v,granularity:void 0};return m.unpack=function(e,i,o){i=n(i,0);var s,l=e[i++],u=new Array(l);for(s=0;l>s;++s,i+=t.packedLength)u[s]=t.unpack(e,i);l=e[i++];var c;if(l>0)for(c=new Array(l),s=0;l>s;++s)c[s]=e[i++];l=e[i++];var h;if(l>0)for(h=new Array(l),s=0;l>s;++s)h[s]=e[i++];var d=a.unpack(e,i,v);i+=a.packedLength;var p=e[i];return r(o)?(o._positions=u,o._minimumHeights=c,o._maximumHeights=h,o._ellipsoid=a.clone(d,o._ellipsoid),o._granularity=p,o):(_.positions=u,_.minimumHeights=c,_.maximumHeights=h,_.granularity=p,new m(_))},m.fromConstantHeights=function(e){e=n(e,n.EMPTY_OBJECT);var t,i,o=e.positions,a=e.minimumHeight,s=e.maximumHeight,l=r(a),u=r(s);if(l||u){var c=o.length;t=l?new Array(c):void 0,i=u?new Array(c):void 0;for(var h=0;c>h;++h)l&&(t[h]=a),u&&(i[h]=s)}var d={positions:o,maximumHeights:i,minimumHeights:t,ellipsoid:e.ellipsoid};return new m(d)},m.createGeometry=function(n){var o=n._positions,a=n._minimumHeights,m=n._maximumHeights,v=n._granularity,_=n._ellipsoid,y=p.computePositions(_,o,m,a,v,!1);if(r(y)){var C=y.bottomPositions,w=y.topPositions,E=w.length,b=2*E,S=new Float64Array(b),T=0;E/=3;var x;for(x=0;E>x;++x){var A=3*x,P=t.fromArray(w,A,f),M=t.fromArray(C,A,g);S[T++]=M.x,S[T++]=M.y,S[T++]=M.z,S[T++]=P.x,S[T++]=P.y,S[T++]=P.z}var D=new u({position:new l({componentDatatype:i.DOUBLE,componentsPerAttribute:3,values:S})}),I=b/3;b=2*I-4+I;var R=c.createTypedArray(I,b),O=0;for(x=0;I-2>x;x+=2){var L=x,N=x+2,F=t.fromArray(S,3*L,f),k=t.fromArray(S,3*N,g);if(!t.equalsEpsilon(F,k,h.EPSILON10)){var B=x+1,z=x+3;R[O++]=B,R[O++]=L,R[O++]=B,R[O++]=z,R[O++]=L,R[O++]=N}}return R[O++]=I-2,R[O++]=I-1,new s({attributes:D,indices:R,primitiveType:d.LINES,boundingSphere:new e.fromVertices(S)})}},m}),define("Cesium/Core/WebMercatorProjection",["./Cartesian3","./Cartographic","./defaultValue","./defined","./defineProperties","./DeveloperError","./Ellipsoid","./Math"],function(e,t,i,n,r,o,a,s){"use strict";function l(e){this._ellipsoid=i(e,a.WGS84),this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}return r(l.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),l.mercatorAngleToGeodeticLatitude=function(e){return s.PI_OVER_TWO-2*Math.atan(Math.exp(-e))},l.geodeticLatitudeToMercatorAngle=function(e){e>l.MaximumLatitude?e=l.MaximumLatitude:e<-l.MaximumLatitude&&(e=-l.MaximumLatitude);var t=Math.sin(e);return.5*Math.log((1+t)/(1-t))},l.MaximumLatitude=l.mercatorAngleToGeodeticLatitude(Math.PI),l.prototype.project=function(t,i){var r=this._semimajorAxis,o=t.longitude*r,a=l.geodeticLatitudeToMercatorAngle(t.latitude)*r,s=t.height;return n(i)?(i.x=o,i.y=a,i.z=s,i):new e(o,a,s)},l.prototype.unproject=function(e,i){var r=this._oneOverSemimajorAxis,o=e.x*r,a=l.mercatorAngleToGeodeticLatitude(e.y*r),s=e.z;return n(i)?(i.longitude=o,i.latitude=a,i.height=s,i):new t(o,a,s)},l}),define("Cesium/Core/WebMercatorTilingScheme",["./Cartesian2","./defaultValue","./defined","./defineProperties","./Ellipsoid","./Rectangle","./WebMercatorProjection"],function(e,t,i,n,r,o,a){"use strict";function s(n){if(n=t(n,{}),this._ellipsoid=t(n.ellipsoid,r.WGS84),this._numberOfLevelZeroTilesX=t(n.numberOfLevelZeroTilesX,1),this._numberOfLevelZeroTilesY=t(n.numberOfLevelZeroTilesY,1),this._projection=new a(this._ellipsoid),i(n.rectangleSouthwestInMeters)&&i(n.rectangleNortheastInMeters))this._rectangleSouthwestInMeters=n.rectangleSouthwestInMeters,this._rectangleNortheastInMeters=n.rectangleNortheastInMeters;else{var s=this._ellipsoid.maximumRadius*Math.PI;this._rectangleSouthwestInMeters=new e(-s,-s),this._rectangleNortheastInMeters=new e(s,s)}var l=this._projection.unproject(this._rectangleSouthwestInMeters),u=this._projection.unproject(this._rectangleNortheastInMeters);this._rectangle=new o(l.longitude,l.latitude,u.longitude,u.latitude)}return n(s.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}}}),s.prototype.getNumberOfXTilesAtLevel=function(e){return this._numberOfLevelZeroTilesX<=s&&(v=s-1);var _=g/d|0;return _>=l&&(_=l-1),i(r)?(r.x=v,r.y=_,r):new e(v,_)}},s}),define("Cesium/Core/wrapFunction",["./DeveloperError"],function(e){"use strict";function t(e,t,i){return function(){i.apply(e,arguments),t.apply(e,arguments)}}return t}),define("Cesium/DataSources/ConstantProperty",["../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Event"],function(e,t,i,n,r){"use strict";function o(e){this._value=void 0,this._hasClone=!1,this._hasEquals=!1,this._definitionChanged=new r,this.setValue(e)}return i(o.prototype,{isConstant:{value:!0},definitionChanged:{get:function(){return this._definitionChanged}}}),o.prototype.getValue=function(e,t){return this._hasClone?this._value.clone(t):this._value},o.prototype.setValue=function(e){var i=this._value;if(i!==e){var n=t(e),r=n&&"function"==typeof e.clone,o=n&&"function"==typeof e.equals;this._hasClone=r,this._hasEquals=o;var a=!o||!e.equals(i);a&&(this._value=r?e.clone():e,this._definitionChanged.raiseEvent(this))}},o.prototype.equals=function(e){return this===e||e instanceof o&&(!this._hasEquals&&this._value===e._value||this._hasEquals&&this._value.equals(e._value))},o}),define("Cesium/DataSources/createPropertyDescriptor",["../Core/defaultValue","../Core/defined","./ConstantProperty"],function(e,t,i){"use strict";function n(e,i,n,r,o){return{configurable:r,get:function(){return this[i]},set:function(r){var a=this[i],s=this[n];t(s)&&(s(),this[n]=void 0);var l=t(r);l&&!t(r.getValue)&&t(o)&&(r=o(r)),a!==r&&(this[i]=r,this._definitionChanged.raiseEvent(this,e,r,a)),t(r)&&t(r.definitionChanged)&&(this[n]=r.definitionChanged.addEventListener(function(){this._definitionChanged.raiseEvent(this,e,r,r)},this))}}}function r(e){return new i(e)}function o(t,i,o){return n(t,"_"+t.toString(),"_"+t.toString()+"Subscription",e(i,!1),e(o,r))}return o}),define("Cesium/DataSources/BillboardGraphics",["../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Event","./createPropertyDescriptor"],function(e,t,i,n,r,o){"use strict";function a(t){this._image=void 0,this._imageSubscription=void 0,this._imageSubRegion=void 0,this._imageSubRegionSubscription=void 0,this._width=void 0,this._widthSubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._scale=void 0,this._scaleSubscription=void 0,this._rotation=void 0,this._rotationSubscription=void 0,this._alignedAxis=void 0,this._alignedAxisSubscription=void 0,this._horizontalOrigin=void 0,this._horizontalOriginSubscription=void 0,this._verticalOrigin=void 0,this._verticalOriginSubscription=void 0,this._color=void 0,this._colorSubscription=void 0,this._eyeOffset=void 0,this._eyeOffsetSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._pixelOffset=void 0,this._pixelOffsetSubscription=void 0,this._show=void 0,this._showSubscription=void 0,this._scaleByDistance=void 0,this._scaleByDistanceSubscription=void 0,this._translucencyByDistance=void 0,this._translucencyByDistanceSubscription=void 0,this._pixelOffsetScaleByDistance=void 0,this._pixelOffsetScaleByDistanceSubscription=void 0,this._sizeInMeters=void 0,this._sizeInMetersSubscription=void 0,this._definitionChanged=new r,this.merge(e(t,e.EMPTY_OBJECT))}return i(a.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},image:o("image"),imageSubRegion:o("imageSubRegion"),scale:o("scale"),rotation:o("rotation"),alignedAxis:o("alignedAxis"),horizontalOrigin:o("horizontalOrigin"),verticalOrigin:o("verticalOrigin"),color:o("color"),eyeOffset:o("eyeOffset"),heightReference:o("heightReference"),pixelOffset:o("pixelOffset"),show:o("show"),width:o("width"),height:o("height"),scaleByDistance:o("scaleByDistance"),translucencyByDistance:o("translucencyByDistance"),pixelOffsetScaleByDistance:o("pixelOffsetScaleByDistance"),sizeInMeters:o("sizeInMeters")}),a.prototype.clone=function(e){return t(e)?(e.color=this._color,e.eyeOffset=this._eyeOffset,e.heightReference=this._heightReference,e.horizontalOrigin=this._horizontalOrigin,e.image=this._image,e.imageSubRegion=this._imageSubRegion,e.pixelOffset=this._pixelOffset,e.scale=this._scale,e.rotation=this._rotation,e.alignedAxis=this._alignedAxis,e.show=this._show,e.verticalOrigin=this._verticalOrigin,e.width=this._width,e.height=this._height,e.scaleByDistance=this._scaleByDistance,e.translucencyByDistance=this._translucencyByDistance,e.pixelOffsetScaleByDistance=this._pixelOffsetScaleByDistance,e.sizeInMeters=this._sizeInMeters,e):new a(this)},a.prototype.merge=function(t){this.color=e(this._color,t.color),this.eyeOffset=e(this._eyeOffset,t.eyeOffset),this.heightReference=e(this._heightReference,t.heightReference),this.horizontalOrigin=e(this._horizontalOrigin,t.horizontalOrigin),this.image=e(this._image,t.image),this.imageSubRegion=e(this._imageSubRegion,t.imageSubRegion),this.pixelOffset=e(this._pixelOffset,t.pixelOffset),this.scale=e(this._scale,t.scale),this.rotation=e(this._rotation,t.rotation),this.alignedAxis=e(this._alignedAxis,t.alignedAxis),this.show=e(this._show,t.show),this.verticalOrigin=e(this._verticalOrigin,t.verticalOrigin),this.width=e(this._width,t.width),this.height=e(this._height,t.height),this.scaleByDistance=e(this._scaleByDistance,t.scaleByDistance),this.translucencyByDistance=e(this._translucencyByDistance,t.translucencyByDistance),this.pixelOffsetScaleByDistance=e(this._pixelOffsetScaleByDistance,t.pixelOffsetScaleByDistance),this.sizeInMeters=e(this._sizeInMeters,t.sizeInMeters)},a}),define("Cesium/Renderer/BufferUsage",["../Core/freezeObject","./WebGLConstants"],function(e,t){"use strict";var i={STREAM_DRAW:t.STREAM_DRAW,STATIC_DRAW:t.STATIC_DRAW,DYNAMIC_DRAW:t.DYNAMIC_DRAW,validate:function(e){return e===i.STREAM_DRAW||e===i.STATIC_DRAW||e===i.DYNAMIC_DRAW}};return e(i)}),define("Cesium/Renderer/Buffer",["../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/destroyObject","../Core/DeveloperError","../Core/IndexDatatype","./BufferUsage","./WebGLConstants"],function(e,t,i,n,r,o,a,s){"use strict";function l(i){i=e(i,e.EMPTY_OBJECT);var n=i.context._gl,r=i.bufferTarget,o=i.typedArray,a=i.sizeInBytes,s=i.usage,l=t(o);l&&(a=o.byteLength);var u=n.createBuffer();n.bindBuffer(r,u),n.bufferData(r,l?o:a,s),n.bindBuffer(r,null),this._gl=n,this._bufferTarget=r,this._sizeInBytes=a,this._usage=s,this._buffer=u,this.vertexArrayDestroyable=!0}return l.createVertexBuffer=function(e){return new l({context:e.context,bufferTarget:s.ARRAY_BUFFER,typedArray:e.typedArray,sizeInBytes:e.sizeInBytes,usage:e.usage})},l.createIndexBuffer=function(e){var t=e.context,n=e.indexDatatype,r=o.getSizeInBytes(n),a=new l({context:t,bufferTarget:s.ELEMENT_ARRAY_BUFFER,typedArray:e.typedArray,sizeInBytes:e.sizeInBytes,usage:e.usage}),u=a.sizeInBytes/r;return i(a,{indexDatatype:{get:function(){return n}},bytesPerIndex:{get:function(){return r}},numberOfIndices:{get:function(){return u}}}),a},i(l.prototype,{sizeInBytes:{get:function(){return this._sizeInBytes}},usage:{get:function(){return this._usage}}}),l.prototype._getBuffer=function(){return this._buffer},l.prototype.copyFromArrayView=function(t,i){i=e(i,0);var n=this._gl,r=this._bufferTarget;n.bindBuffer(r,this._buffer),n.bufferSubData(r,i,t),n.bindBuffer(r,null)},l.prototype.isDestroyed=function(){return!1},l.prototype.destroy=function(){return this._gl.deleteBuffer(this._buffer),n(this)},l}),define("Cesium/Renderer/DrawCommand",["../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/PrimitiveType"],function(e,t,i,n){"use strict";function r(t){t=e(t,e.EMPTY_OBJECT),this._boundingVolume=t.boundingVolume,this._orientedBoundingBox=t.orientedBoundingBox,this._cull=e(t.cull,!0),this._modelMatrix=t.modelMatrix,this._primitiveType=e(t.primitiveType,n.TRIANGLES),this._vertexArray=t.vertexArray,this._count=t.count,this._offset=e(t.offset,0),this._instanceCount=e(t.instanceCount,0),this._shaderProgram=t.shaderProgram,this._uniformMap=t.uniformMap,this._renderState=t.renderState,this._framebuffer=t.framebuffer,this._pass=t.pass,this._executeInClosestFrustum=e(t.executeInClosestFrustum,!1),this._owner=t.owner,this._debugShowBoundingVolume=e(t.debugShowBoundingVolume,!1),this._debugOverlappingFrustums=0,this._castShadows=e(t.castShadows,!1),this._receiveShadows=e(t.receiveShadows,!1),this.dirty=!0,this.lastDirtyTime=0,this.derivedCommands={}}return i(r.prototype,{boundingVolume:{get:function(){return this._boundingVolume},set:function(e){this._boundingVolume!==e&&(this._boundingVolume=e,this.dirty=!0)}},orientedBoundingBox:{get:function(){return this._orientedBoundingBox},set:function(e){this._orientedBoundingBox!==e&&(this._orientedBoundingBox=e,this.dirty=!0)}},cull:{get:function(){return this._cull},set:function(e){this._cull!==e&&(this._cull=e,this.dirty=!0)}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){this._modelMatrix!==e&&(this._modelMatrix=e,this.dirty=!0)}},primitiveType:{get:function(){return this._primitiveType},set:function(e){this._primitiveType!==e&&(this._primitiveType=e,this.dirty=!0)}},vertexArray:{get:function(){return this._vertexArray},set:function(e){this._vertexArray!==e&&(this._vertexArray=e,this.dirty=!0)}},count:{get:function(){return this._count},set:function(e){this._count!==e&&(this._count=e,this.dirty=!0)}},offset:{get:function(){return this._offset},set:function(e){this._offset!==e&&(this._offset=e,this.dirty=!0)}},instanceCount:{get:function(){return this._instanceCount},set:function(e){this._instanceCount!==e&&(this._instanceCount=e,this.dirty=!0)}},shaderProgram:{get:function(){return this._shaderProgram},set:function(e){this._shaderProgram!==e&&(this._shaderProgram=e,this.dirty=!0)}},castShadows:{get:function(){return this._castShadows},set:function(e){this._castShadows!==e&&(this._castShadows=e,this.dirty=!0)}},receiveShadows:{get:function(){return this._receiveShadows},set:function(e){this._receiveShadows!==e&&(this._receiveShadows=e,this.dirty=!0)}},uniformMap:{get:function(){return this._uniformMap},set:function(e){this._uniformMap!==e&&(this._uniformMap=e,this.dirty=!0)}},renderState:{get:function(){return this._renderState},set:function(e){this._renderState!==e&&(this._renderState=e,this.dirty=!0)}},framebuffer:{get:function(){return this._framebuffer},set:function(e){this._framebuffer!==e&&(this._framebuffer=e,this.dirty=!0)}},pass:{get:function(){return this._pass},set:function(e){this._pass!==e&&(this._pass=e,this.dirty=!0)}},executeInClosestFrustum:{get:function(){return this._executeInClosestFrustum},set:function(e){this._executeInClosestFrustum!==e&&(this._executeInClosestFrustum=e,this.dirty=!0)}},owner:{get:function(){return this._owner},set:function(e){this._owner!==e&&(this._owner=e,this.dirty=!0)}},debugShowBoundingVolume:{get:function(){return this._debugShowBoundingVolume},set:function(e){this._debugShowBoundingVolume!==e&&(this._debugShowBoundingVolume=e,this.dirty=!0)}},debugOverlappingFrustums:{get:function(){return this._debugOverlappingFrustums},set:function(e){this._debugOverlappingFrustums!==e&&(this._debugOverlappingFrustums=e,this.dirty=!0)}}}),r.shallowClone=function(e,i){return t(e)?(t(i)||(i=new r),i._boundingVolume=e._boundingVolume,i._orientedBoundingBox=e._orientedBoundingBox,i._cull=e._cull,i._modelMatrix=e._modelMatrix,i._primitiveType=e._primitiveType,i._vertexArray=e._vertexArray,i._count=e._count,i._offset=e._offset,i._instanceCount=e._instanceCount,i._shaderProgram=e._shaderProgram,i._uniformMap=e._uniformMap,i._renderState=e._renderState,i._framebuffer=e._framebuffer,i._pass=e._pass,i._executeInClosestFrustum=e._executeInClosestFrustum,i._owner=e._owner,i._debugShowBoundingVolume=e._debugShowBoundingVolume,i._debugOverlappingFrustums=e._debugOverlappingFrustums,i._castShadows=e._castShadows,i._receiveShadows=e._receiveShadows,i.dirty=!0,i.lastDirtyTime=0,i):void 0},r.prototype.execute=function(e,t){e.draw(this,t)},r}),define("Cesium/Renderer/ContextLimits",["../Core/defineProperties"],function(e){"use strict";var t={_maximumCombinedTextureImageUnits:0,_maximumCubeMapSize:0,_maximumFragmentUniformVectors:0,_maximumTextureImageUnits:0,_maximumRenderbufferSize:0,_maximumTextureSize:0,_maximumVaryingVectors:0,_maximumVertexAttributes:0,_maximumVertexTextureImageUnits:0, +_maximumVertexUniformVectors:0,_minimumAliasedLineWidth:0,_maximumAliasedLineWidth:0,_minimumAliasedPointSize:0,_maximumAliasedPointSize:0,_maximumViewportWidth:0,_maximumViewportHeight:0,_maximumTextureFilterAnisotropy:0,_maximumDrawBuffers:0,_maximumColorAttachments:0,_highpFloatSupported:!1,_highpIntSupported:!1};return e(t,{maximumCombinedTextureImageUnits:{get:function(){return t._maximumCombinedTextureImageUnits}},maximumCubeMapSize:{get:function(){return t._maximumCubeMapSize}},maximumFragmentUniformVectors:{get:function(){return t._maximumFragmentUniformVectors}},maximumTextureImageUnits:{get:function(){return t._maximumTextureImageUnits}},maximumRenderbufferSize:{get:function(){return t._maximumRenderbufferSize}},maximumTextureSize:{get:function(){return t._maximumTextureSize}},maximumVaryingVectors:{get:function(){return t._maximumVaryingVectors}},maximumVertexAttributes:{get:function(){return t._maximumVertexAttributes}},maximumVertexTextureImageUnits:{get:function(){return t._maximumVertexTextureImageUnits}},maximumVertexUniformVectors:{get:function(){return t._maximumVertexUniformVectors}},minimumAliasedLineWidth:{get:function(){return t._minimumAliasedLineWidth}},maximumAliasedLineWidth:{get:function(){return t._maximumAliasedLineWidth}},minimumAliasedPointSize:{get:function(){return t._minimumAliasedPointSize}},maximumAliasedPointSize:{get:function(){return t._maximumAliasedPointSize}},maximumViewportWidth:{get:function(){return t._maximumViewportWidth}},maximumViewportHeight:{get:function(){return t._maximumViewportHeight}},maximumTextureFilterAnisotropy:{get:function(){return t._maximumTextureFilterAnisotropy}},maximumDrawBuffers:{get:function(){return t._maximumDrawBuffers}},maximumColorAttachments:{get:function(){return t._maximumColorAttachments}},highpFloatSupported:{get:function(){return t._highpFloatSupported}},highpIntSupported:{get:function(){return t._highpIntSupported}}}),t}),define("Cesium/Renderer/RenderState",["../Core/BoundingRectangle","../Core/Color","../Core/defaultValue","../Core/defined","../Core/DeveloperError","../Core/RuntimeError","../Core/WindingOrder","./ContextLimits","./WebGLConstants"],function(e,t,i,n,r,o,a,s,l){"use strict";function u(r){var o=i(r,{}),s=i(o.cull,{}),u=i(o.polygonOffset,{}),c=i(o.scissorTest,{}),h=i(c.rectangle,{}),d=i(o.depthRange,{}),p=i(o.depthTest,{}),m=i(o.colorMask,{}),f=i(o.blending,{}),g=i(f.color,{}),v=i(o.stencilTest,{}),_=i(v.frontOperation,{}),y=i(v.backOperation,{}),C=i(o.sampleCoverage,{}),w=o.viewport;this.frontFace=i(o.frontFace,a.COUNTER_CLOCKWISE),this.cull={enabled:i(s.enabled,!1),face:i(s.face,l.BACK)},this.lineWidth=i(o.lineWidth,1),this.polygonOffset={enabled:i(u.enabled,!1),factor:i(u.factor,0),units:i(u.units,0)},this.scissorTest={enabled:i(c.enabled,!1),rectangle:e.clone(h)},this.depthRange={near:i(d.near,0),far:i(d.far,1)},this.depthTest={enabled:i(p.enabled,!1),func:i(p.func,l.LESS)},this.colorMask={red:i(m.red,!0),green:i(m.green,!0),blue:i(m.blue,!0),alpha:i(m.alpha,!0)},this.depthMask=i(o.depthMask,!0),this.stencilMask=i(o.stencilMask,-1),this.blending={enabled:i(f.enabled,!1),color:new t(i(g.red,0),i(g.green,0),i(g.blue,0),i(g.alpha,0)),equationRgb:i(f.equationRgb,l.FUNC_ADD),equationAlpha:i(f.equationAlpha,l.FUNC_ADD),functionSourceRgb:i(f.functionSourceRgb,l.ONE),functionSourceAlpha:i(f.functionSourceAlpha,l.ONE),functionDestinationRgb:i(f.functionDestinationRgb,l.ZERO),functionDestinationAlpha:i(f.functionDestinationAlpha,l.ZERO)},this.stencilTest={enabled:i(v.enabled,!1),frontFunction:i(v.frontFunction,l.ALWAYS),backFunction:i(v.backFunction,l.ALWAYS),reference:i(v.reference,0),mask:i(v.mask,-1),frontOperation:{fail:i(_.fail,l.KEEP),zFail:i(_.zFail,l.KEEP),zPass:i(_.zPass,l.KEEP)},backOperation:{fail:i(y.fail,l.KEEP),zFail:i(y.zFail,l.KEEP),zPass:i(y.zPass,l.KEEP)}},this.sampleCoverage={enabled:i(C.enabled,!1),value:i(C.value,1),invert:i(C.invert,!1)},this.viewport=n(w)?new e(w.x,w.y,w.width,w.height):void 0,this.id=0,this._applyFunctions=[]}function c(e,t,i){i?e.enable(t):e.disable(t)}function h(e,t){e.frontFace(t.frontFace)}function d(e,t){var i=t.cull,n=i.enabled;c(e,e.CULL_FACE,n),n&&e.cullFace(i.face)}function p(e,t){e.lineWidth(t.lineWidth)}function m(e,t){var i=t.polygonOffset,n=i.enabled;c(e,e.POLYGON_OFFSET_FILL,n),n&&e.polygonOffset(i.factor,i.units)}function f(e,t,i){var r=t.scissorTest,o=n(i.scissorTest)?i.scissorTest.enabled:r.enabled;if(c(e,e.SCISSOR_TEST,o),o){var a=n(i.scissorTest)?i.scissorTest.rectangle:r.rectangle;e.scissor(a.x,a.y,a.width,a.height)}}function g(e,t){var i=t.depthRange;e.depthRange(i.near,i.far)}function v(e,t){var i=t.depthTest,n=i.enabled;c(e,e.DEPTH_TEST,n),n&&e.depthFunc(i.func)}function _(e,t){var i=t.colorMask;e.colorMask(i.red,i.green,i.blue,i.alpha)}function y(e,t){e.depthMask(t.depthMask)}function C(e,t){e.stencilMask(t.stencilMask)}function w(e,t){e.blendColor(t.red,t.green,t.blue,t.alpha)}function E(e,t,i){var r=t.blending,o=n(i.blendingEnabled)?i.blendingEnabled:r.enabled;c(e,e.BLEND,o),o&&(w(e,r.color),e.blendEquationSeparate(r.equationRgb,r.equationAlpha),e.blendFuncSeparate(r.functionSourceRgb,r.functionDestinationRgb,r.functionSourceAlpha,r.functionDestinationAlpha))}function b(e,t){var i=t.stencilTest,n=i.enabled;if(c(e,e.STENCIL_TEST,n),n){var r=i.frontFunction,o=i.backFunction,a=i.reference,s=i.mask;e.stencilFunc(i.frontFunction,i.reference,i.mask),e.stencilFuncSeparate(e.BACK,o,a,s),e.stencilFuncSeparate(e.FRONT,r,a,s);var l=i.frontOperation,u=l.fail,h=l.zFail,d=l.zPass;e.stencilOpSeparate(e.FRONT,u,h,d);var p=i.backOperation,m=p.fail,f=p.zFail,g=p.zPass;e.stencilOpSeparate(e.BACK,m,f,g)}}function S(e,t){var i=t.sampleCoverage,n=i.enabled;c(e,e.SAMPLE_COVERAGE,n),n&&e.sampleCoverage(i.value,i.invert)}function T(e,t,r){var o=i(t.viewport,r.viewport);n(o)||(o=M,o.width=r.context.drawingBufferWidth,o.height=r.context.drawingBufferHeight),r.context.uniformState.viewport=o,e.viewport(o.x,o.y,o.width,o.height)}function x(e,t){var i=[];return e.frontFace!==t.frontFace&&i.push(h),(e.cull.enabled!==t.cull.enabled||e.cull.face!==t.cull.face)&&i.push(d),e.lineWidth!==t.lineWidth&&i.push(p),(e.polygonOffset.enabled!==t.polygonOffset.enabled||e.polygonOffset.factor!==t.polygonOffset.factor||e.polygonOffset.units!==t.polygonOffset.units)&&i.push(m),(e.depthRange.near!==t.depthRange.near||e.depthRange.far!==t.depthRange.far)&&i.push(g),(e.depthTest.enabled!==t.depthTest.enabled||e.depthTest.func!==t.depthTest.func)&&i.push(v),(e.colorMask.red!==t.colorMask.red||e.colorMask.green!==t.colorMask.green||e.colorMask.blue!==t.colorMask.blue||e.colorMask.alpha!==t.colorMask.alpha)&&i.push(_),e.depthMask!==t.depthMask&&i.push(y),e.stencilMask!==t.stencilMask&&i.push(C),(e.stencilTest.enabled!==t.stencilTest.enabled||e.stencilTest.frontFunction!==t.stencilTest.frontFunction||e.stencilTest.backFunction!==t.stencilTest.backFunction||e.stencilTest.reference!==t.stencilTest.reference||e.stencilTest.mask!==t.stencilTest.mask||e.stencilTest.frontOperation.fail!==t.stencilTest.frontOperation.fail||e.stencilTest.frontOperation.zFail!==t.stencilTest.frontOperation.zFail||e.stencilTest.backOperation.fail!==t.stencilTest.backOperation.fail||e.stencilTest.backOperation.zFail!==t.stencilTest.backOperation.zFail||e.stencilTest.backOperation.zPass!==t.stencilTest.backOperation.zPass)&&i.push(b),(e.sampleCoverage.enabled!==t.sampleCoverage.enabled||e.sampleCoverage.value!==t.sampleCoverage.value||e.sampleCoverage.invert!==t.sampleCoverage.invert)&&i.push(S),i}var A=0,P={};u.fromCache=function(e){var t=JSON.stringify(e),i=P[t];if(n(i))return++i.referenceCount,i.state;var r=new u(e),o=JSON.stringify(r);return i=P[o],n(i)||(r.id=A++,i={referenceCount:0,state:r},P[o]=i),++i.referenceCount,P[t]={referenceCount:1,state:i.state},i.state},u.removeFromCache=function(e){var t=new u(e),i=JSON.stringify(t),r=P[i],o=JSON.stringify(e),a=P[o];n(a)&&(--a.referenceCount,0===a.referenceCount&&(delete P[o],n(r)&&--r.referenceCount)),n(r)&&0===r.referenceCount&&delete P[i]},u.getCache=function(){return P},u.clearCache=function(){P={}};var M=new e;return u.apply=function(e,t,i){h(e,t),d(e,t),p(e,t),m(e,t),g(e,t),v(e,t),_(e,t),y(e,t),C(e,t),b(e,t),S(e,t),f(e,t,i),E(e,t,i),T(e,t,i)},u.partialApply=function(e,t,i,r,o,a){if(t!==i){var s=i._applyFunctions[t.id];n(s)||(s=x(t,i),i._applyFunctions[t.id]=s);for(var l=s.length,u=0;l>u;++u)s[u](e,i)}var c=n(r.scissorTest)?r.scissorTest:t.scissorTest,h=n(o.scissorTest)?o.scissorTest:i.scissorTest;(c!==h||a)&&f(e,i,o);var d=n(r.blendingEnabled)?r.blendingEnabled:t.blending.enabled,p=n(o.blendingEnabled)?o.blendingEnabled:i.blending.enabled;(d!==p||p&&t.blending!==i.blending)&&E(e,i,o),(t!==i||r!==o||r.context!==o.context)&&T(e,i,o)},u.getState=function(i){return{frontFace:i.frontFace,cull:{enabled:i.cull.enabled,face:i.cull.face},lineWidth:i.lineWidth,polygonOffset:{enabled:i.polygonOffset.enabled,factor:i.polygonOffset.factor,units:i.polygonOffset.units},scissorTest:{enabled:i.scissorTest.enabled,rectangle:e.clone(i.scissorTest.rectangle)},depthRange:{near:i.depthRange.near,far:i.depthRange.far},depthTest:{enabled:i.depthTest.enabled,func:i.depthTest.func},colorMask:{red:i.colorMask.red,green:i.colorMask.green,blue:i.colorMask.blue,alpha:i.colorMask.alpha},depthMask:i.depthMask,stencilMask:i.stencilMask,blending:{enabled:i.blending.enabled,color:t.clone(i.blending.color),equationRgb:i.blending.equationRgb,equationAlpha:i.blending.equationAlpha,functionSourceRgb:i.blending.functionSourceRgb,functionSourceAlpha:i.blending.functionSourceAlpha,functionDestinationRgb:i.blending.functionDestinationRgb,functionDestinationAlpha:i.blending.functionDestinationAlpha},stencilTest:{enabled:i.stencilTest.enabled,frontFunction:i.stencilTest.frontFunction,backFunction:i.stencilTest.backFunction,reference:i.stencilTest.reference,mask:i.stencilTest.mask,frontOperation:{fail:i.stencilTest.frontOperation.fail,zFail:i.stencilTest.frontOperation.zFail,zPass:i.stencilTest.frontOperation.zPass},backOperation:{fail:i.stencilTest.backOperation.fail,zFail:i.stencilTest.backOperation.zFail,zPass:i.stencilTest.backOperation.zPass}},sampleCoverage:{enabled:i.sampleCoverage.enabled,value:i.sampleCoverage.value,invert:i.sampleCoverage.invert},viewport:n(i.viewport)?e.clone(i.viewport):void 0}},u}),define("Cesium/Renderer/AutomaticUniforms",["../Core/Cartesian3","../Core/Matrix4","./WebGLConstants"],function(e,t,i){"use strict";function n(e){this._size=e.size,this._datatype=e.datatype,this.getValue=e.getValue}var r=new e;if("undefined"==typeof WebGLRenderingContext)return{};var o={};o[i.FLOAT]="float",o[i.FLOAT_VEC2]="vec2",o[i.FLOAT_VEC3]="vec3",o[i.FLOAT_VEC4]="vec4",o[i.INT]="int",o[i.INT_VEC2]="ivec2",o[i.INT_VEC3]="ivec3",o[i.INT_VEC4]="ivec4",o[i.BOOL]="bool",o[i.BOOL_VEC2]="bvec2",o[i.BOOL_VEC3]="bvec3",o[i.BOOL_VEC4]="bvec4",o[i.FLOAT_MAT2]="mat2",o[i.FLOAT_MAT3]="mat3",o[i.FLOAT_MAT4]="mat4",o[i.SAMPLER_2D]="sampler2D",o[i.SAMPLER_CUBE]="samplerCube",n.prototype.getDeclaration=function(e){var t="uniform "+o[this._datatype]+" "+e,i=this._size;return t+=1===i?";":"["+i.toString()+"];"};var a={czm_viewport:new n({size:1,datatype:i.FLOAT_VEC4,getValue:function(e){return e.viewportCartesian4}}),czm_viewportOrthographic:new n({size:1,datatype:i.FLOAT_MAT4,getValue:function(e){return e.viewportOrthographic}}),czm_viewportTransformation:new n({size:1,datatype:i.FLOAT_MAT4,getValue:function(e){return e.viewportTransformation}}),czm_globeDepthTexture:new n({size:1,datatype:i.SAMPLER_2D,getValue:function(e){return e.globeDepthTexture}}),czm_model:new n({size:1,datatype:i.FLOAT_MAT4,getValue:function(e){return e.model}}),czm_inverseModel:new n({size:1,datatype:i.FLOAT_MAT4,getValue:function(e){return e.inverseModel}}),czm_view:new n({size:1,datatype:i.FLOAT_MAT4,getValue:function(e){return e.view}}),czm_view3D:new n({size:1,datatype:i.FLOAT_MAT4,getValue:function(e){return e.view3D}}),czm_viewRotation:new n({size:1,datatype:i.FLOAT_MAT3,getValue:function(e){return e.viewRotation}}),czm_viewRotation3D:new n({size:1,datatype:i.FLOAT_MAT3,getValue:function(e){return e.viewRotation3D}}),czm_inverseView:new n({size:1,datatype:i.FLOAT_MAT4,getValue:function(e){return e.inverseView}}),czm_inverseView3D:new n({size:1,datatype:i.FLOAT_MAT4,getValue:function(e){return e.inverseView3D}}),czm_inverseViewRotation:new n({size:1,datatype:i.FLOAT_MAT3,getValue:function(e){return e.inverseViewRotation}}),czm_inverseViewRotation3D:new n({size:1,datatype:i.FLOAT_MAT3,getValue:function(e){return e.inverseViewRotation3D}}),czm_projection:new n({size:1,datatype:i.FLOAT_MAT4,getValue:function(e){return e.projection}}),czm_inverseProjection:new n({size:1,datatype:i.FLOAT_MAT4,getValue:function(e){return e.inverseProjection}}),czm_inverseProjectionOIT:new n({size:1,datatype:i.FLOAT_MAT4,getValue:function(e){return e.inverseProjectionOIT}}),czm_infiniteProjection:new n({size:1,datatype:i.FLOAT_MAT4,getValue:function(e){return e.infiniteProjection}}),czm_modelView:new n({size:1,datatype:i.FLOAT_MAT4,getValue:function(e){return e.modelView}}),czm_modelView3D:new n({size:1,datatype:i.FLOAT_MAT4,getValue:function(e){return e.modelView3D}}),czm_modelViewRelativeToEye:new n({size:1,datatype:i.FLOAT_MAT4,getValue:function(e){return e.modelViewRelativeToEye}}),czm_inverseModelView:new n({size:1,datatype:i.FLOAT_MAT4,getValue:function(e){return e.inverseModelView}}),czm_inverseModelView3D:new n({size:1,datatype:i.FLOAT_MAT4,getValue:function(e){return e.inverseModelView3D}}),czm_viewProjection:new n({size:1,datatype:i.FLOAT_MAT4,getValue:function(e){return e.viewProjection}}),czm_inverseViewProjection:new n({size:1,datatype:i.FLOAT_MAT4,getValue:function(e){return e.inverseViewProjection}}),czm_modelViewProjection:new n({size:1,datatype:i.FLOAT_MAT4,getValue:function(e){return e.modelViewProjection}}),czm_inverseModelViewProjection:new n({size:1,datatype:i.FLOAT_MAT4,getValue:function(e){return e.inverseModelViewProjection}}),czm_modelViewProjectionRelativeToEye:new n({size:1,datatype:i.FLOAT_MAT4,getValue:function(e){return e.modelViewProjectionRelativeToEye}}),czm_modelViewInfiniteProjection:new n({size:1,datatype:i.FLOAT_MAT4,getValue:function(e){return e.modelViewInfiniteProjection}}),czm_normal:new n({size:1,datatype:i.FLOAT_MAT3,getValue:function(e){return e.normal}}),czm_normal3D:new n({size:1,datatype:i.FLOAT_MAT3,getValue:function(e){return e.normal3D}}),czm_inverseNormal:new n({size:1,datatype:i.FLOAT_MAT3,getValue:function(e){return e.inverseNormal}}),czm_inverseNormal3D:new n({size:1,datatype:i.FLOAT_MAT3,getValue:function(e){return e.inverseNormal3D}}),czm_eyeHeight2D:new n({size:1,datatype:i.FLOAT_VEC2,getValue:function(e){return e.eyeHeight2D}}),czm_entireFrustum:new n({size:1,datatype:i.FLOAT_VEC2,getValue:function(e){return e.entireFrustum}}),czm_currentFrustum:new n({size:1,datatype:i.FLOAT_VEC2,getValue:function(e){return e.currentFrustum}}),czm_frustumPlanes:new n({size:1,datatype:i.FLOAT_VEC4,getValue:function(e){return e.frustumPlanes}}),czm_sunPositionWC:new n({size:1,datatype:i.FLOAT_VEC3,getValue:function(e){return e.sunPositionWC}}),czm_sunPositionColumbusView:new n({size:1,datatype:i.FLOAT_VEC3,getValue:function(e){return e.sunPositionColumbusView}}),czm_sunDirectionEC:new n({size:1,datatype:i.FLOAT_VEC3,getValue:function(e){return e.sunDirectionEC}}),czm_sunDirectionWC:new n({size:1,datatype:i.FLOAT_VEC3,getValue:function(e){return e.sunDirectionWC}}),czm_moonDirectionEC:new n({size:1,datatype:i.FLOAT_VEC3,getValue:function(e){return e.moonDirectionEC}}),czm_encodedCameraPositionMCHigh:new n({size:1,datatype:i.FLOAT_VEC3,getValue:function(e){return e.encodedCameraPositionMCHigh}}),czm_encodedCameraPositionMCLow:new n({size:1,datatype:i.FLOAT_VEC3,getValue:function(e){return e.encodedCameraPositionMCLow}}),czm_viewerPositionWC:new n({size:1,datatype:i.FLOAT_VEC3,getValue:function(e){return t.getTranslation(e.inverseView,r)}}),czm_frameNumber:new n({size:1,datatype:i.FLOAT,getValue:function(e){return e.frameState.frameNumber}}),czm_morphTime:new n({size:1,datatype:i.FLOAT,getValue:function(e){return e.frameState.morphTime}}),czm_sceneMode:new n({size:1,datatype:i.FLOAT,getValue:function(e){return e.frameState.mode}}),czm_pass:new n({size:1,datatype:i.FLOAT,getValue:function(e){return e.pass}}),czm_temeToPseudoFixed:new n({size:1,datatype:i.FLOAT_MAT3,getValue:function(e){return e.temeToPseudoFixedMatrix}}),czm_resolutionScale:new n({size:1,datatype:i.FLOAT,getValue:function(e){return e.resolutionScale}}),czm_fogDensity:new n({size:1,datatype:i.FLOAT,getValue:function(e){return e.fogDensity}})};return a}),define("Cesium/Renderer/createUniform",["../Core/Cartesian2","../Core/Cartesian3","../Core/Cartesian4","../Core/Color","../Core/defined","../Core/DeveloperError","../Core/Matrix2","../Core/Matrix3","../Core/Matrix4","../Core/RuntimeError"],function(e,t,i,n,r,o,a,s,l,u){"use strict";function c(e,t,i,n){switch(t.type){case e.FLOAT:return new h(e,t,i,n);case e.FLOAT_VEC2:return new d(e,t,i,n);case e.FLOAT_VEC3:return new p(e,t,i,n);case e.FLOAT_VEC4:return new m(e,t,i,n);case e.SAMPLER_2D:case e.SAMPLER_CUBE:return new f(e,t,i,n);case e.INT:case e.BOOL:return new g(e,t,i,n);case e.INT_VEC2:case e.BOOL_VEC2:return new v(e,t,i,n);case e.INT_VEC3:case e.BOOL_VEC3:return new _(e,t,i,n);case e.INT_VEC4:case e.BOOL_VEC4:return new y(e,t,i,n);case e.FLOAT_MAT2:return new C(e,t,i,n);case e.FLOAT_MAT3:return new w(e,t,i,n);case e.FLOAT_MAT4:return new E(e,t,i,n);default:throw new u("Unrecognized uniform type: "+t.type+' for uniform "'+i+'".')}}function h(e,t,i,n){this.name=i,this.value=void 0,this._value=0,this._gl=e,this._location=n}function d(t,i,n,r){this.name=n,this.value=void 0,this._value=new e,this._gl=t,this._location=r}function p(e,t,i,n){this.name=i,this.value=void 0,this._value=void 0,this._gl=e,this._location=n}function m(e,t,i,n){this.name=i,this.value=void 0,this._value=void 0,this._gl=e,this._location=n}function f(e,t,i,n){this.name=i,this.value=void 0,this._gl=e,this._location=n,this.textureUnitIndex=void 0}function g(e,t,i,n){this.name=i,this.value=void 0,this._value=0,this._gl=e,this._location=n}function v(t,i,n,r){this.name=n,this.value=void 0,this._value=new e,this._gl=t,this._location=r}function _(e,i,n,r){this.name=n,this.value=void 0,this._value=new t,this._gl=e,this._location=r}function y(e,t,n,r){this.name=n,this.value=void 0,this._value=new i,this._gl=e,this._location=r}function C(e,t,i,n){this.name=i,this.value=void 0,this._value=new Float32Array(4),this._gl=e,this._location=n}function w(e,t,i,n){this.name=i,this.value=void 0,this._value=new Float32Array(9),this._gl=e,this._location=n}function E(e,t,i,n){this.name=i,this.value=void 0,this._value=new Float32Array(16),this._gl=e,this._location=n}return h.prototype.set=function(){this.value!==this._value&&(this._value=this.value,this._gl.uniform1f(this._location,this.value))},d.prototype.set=function(){var t=this.value;e.equals(t,this._value)||(e.clone(t,this._value),this._gl.uniform2f(this._location,t.x,t.y))},p.prototype.set=function(){var e=this.value;if(r(e.red))n.equals(e,this._value)||(this._value=n.clone(e,this._value),this._gl.uniform3f(this._location,e.red,e.green,e.blue));else{if(!r(e.x))throw new o('Invalid vec3 value for uniform "'+this._activethis.name+'".');t.equals(e,this._value)||(this._value=t.clone(e,this._value),this._gl.uniform3f(this._location,e.x,e.y,e.z))}},m.prototype.set=function(){var e=this.value;if(r(e.red))n.equals(e,this._value)||(this._value=n.clone(e,this._value),this._gl.uniform4f(this._location,e.red,e.green,e.blue,e.alpha));else{if(!r(e.x))throw new o('Invalid vec4 value for uniform "'+this._activethis.name+'".');i.equals(e,this._value)||(this._value=i.clone(e,this._value),this._gl.uniform4f(this._location,e.x,e.y,e.z,e.w))}},f.prototype.set=function(){var e=this._gl;e.activeTexture(e.TEXTURE0+this.textureUnitIndex);var t=this.value;e.bindTexture(t._target,t._texture)},f.prototype._setSampler=function(e){return this.textureUnitIndex=e,this._gl.uniform1i(this._location,e),e+1},g.prototype.set=function(){this.value!==this._value&&(this._value=this.value,this._gl.uniform1i(this._location,this.value))},v.prototype.set=function(){var t=this.value;e.equals(t,this._value)||(e.clone(t,this._value),this._gl.uniform2i(this._location,t.x,t.y))},_.prototype.set=function(){var e=this.value;t.equals(e,this._value)||(t.clone(e,this._value),this._gl.uniform3i(this._location,e.x,e.y,e.z))},y.prototype.set=function(){var e=this.value;i.equals(e,this._value)||(i.clone(e,this._value),this._gl.uniform4i(this._location,e.x,e.y,e.z,e.w))},C.prototype.set=function(){a.equalsArray(this.value,this._value,0)||(a.toArray(this.value,this._value),this._gl.uniformMatrix2fv(this._location,!1,this._value))},w.prototype.set=function(){s.equalsArray(this.value,this._value,0)||(s.toArray(this.value,this._value),this._gl.uniformMatrix3fv(this._location,!1,this._value))},E.prototype.set=function(){l.equalsArray(this.value,this._value,0)||(l.toArray(this.value,this._value),this._gl.uniformMatrix4fv(this._location,!1,this._value))},c}),define("Cesium/Renderer/createUniformArray",["../Core/Cartesian2","../Core/Cartesian3","../Core/Cartesian4","../Core/Color","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Matrix2","../Core/Matrix3","../Core/Matrix4","../Core/RuntimeError"],function(e,t,i,n,r,o,a,s,l,u,c){"use strict";function h(e,t,i,n){switch(t.type){case e.FLOAT:return new d(e,t,i,n);case e.FLOAT_VEC2:return new p(e,t,i,n);case e.FLOAT_VEC3:return new m(e,t,i,n);case e.FLOAT_VEC4:return new f(e,t,i,n);case e.SAMPLER_2D:case e.SAMPLER_CUBE:return new g(e,t,i,n);case e.INT:case e.BOOL:return new v(e,t,i,n);case e.INT_VEC2:case e.BOOL_VEC2:return new _(e,t,i,n);case e.INT_VEC3:case e.BOOL_VEC3:return new y(e,t,i,n);case e.INT_VEC4:case e.BOOL_VEC4:return new C(e,t,i,n);case e.FLOAT_MAT2:return new w(e,t,i,n);case e.FLOAT_MAT3:return new E(e,t,i,n);case e.FLOAT_MAT4:return new b(e,t,i,n);default:throw new c("Unrecognized uniform type: "+t.type+' for uniform "'+i+'".')}}function d(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(r),this._gl=e,this._location=n[0]}function p(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(2*r),this._gl=e,this._location=n[0]}function m(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(3*r),this._gl=e,this._location=n[0]}function f(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(4*r),this._gl=e,this._location=n[0]}function g(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(r),this._gl=e,this._locations=n,this.textureUnitIndex=void 0}function v(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Int32Array(r),this._gl=e,this._location=n[0]}function _(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Int32Array(2*r),this._gl=e,this._location=n[0]}function y(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Int32Array(3*r),this._gl=e,this._location=n[0]}function C(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Int32Array(4*r),this._gl=e,this._location=n[0]}function w(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(4*r),this._gl=e,this._location=n[0]}function E(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(9*r),this._gl=e,this._location=n[0]}function b(e,t,i,n){var r=n.length;this.name=i,this.value=new Array(r),this._value=new Float32Array(16*r),this._gl=e,this._location=n[0]}return d.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0;t>r;++r){var o=e[r];o!==i[r]&&(i[r]=o,n=!0)}n&&this._gl.uniform1fv(this._location,i)},p.prototype.set=function(){for(var t=this.value,i=t.length,n=this._value,r=!1,o=0,a=0;i>a;++a){var s=t[a];e.equalsArray(s,n,o)||(e.pack(s,n,o),r=!0),o+=2}r&&this._gl.uniform2fv(this._location,n)},m.prototype.set=function(){for(var e=this.value,i=e.length,n=this._value,o=!1,s=0,l=0;i>l;++l){var u=e[l];if(r(u.red))(u.red!==n[s]||u.green!==n[s+1]||u.blue!==n[s+2])&&(n[s]=u.red,n[s+1]=u.green,n[s+2]=u.blue,o=!0);else{if(!r(u.x))throw new a("Invalid vec3 value.");t.equalsArray(u,n,s)||(t.pack(u,n,s),o=!0)}s+=3}o&&this._gl.uniform3fv(this._location,n)},f.prototype.set=function(){for(var e=this.value,t=e.length,o=this._value,s=!1,l=0,u=0;t>u;++u){var c=e[u];if(r(c.red))n.equalsArray(c,o,l)||(n.pack(c,o,l),s=!0);else{if(!r(c.x))throw new a("Invalid vec4 value.");i.equalsArray(c,o,l)||(i.pack(c,o,l),s=!0)}l+=4}s&&this._gl.uniform4fv(this._location,o)},g.prototype.set=function(){for(var e=this._gl,t=e.TEXTURE0+this.textureUnitIndex,i=this.value,n=i.length,r=0;n>r;++r){var o=i[r];e.activeTexture(t+r),e.bindTexture(o._target,o._texture)}},g.prototype._setSampler=function(e){this.textureUnitIndex=e;for(var t=this._locations,i=t.length,n=0;i>n;++n){var r=e+n;this._gl.uniform1i(t[n],r)}return e+i},v.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0;t>r;++r){var o=e[r];o!==i[r]&&(i[r]=o,n=!0)}n&&this._gl.uniform1iv(this._location,i)},_.prototype.set=function(){for(var t=this.value,i=t.length,n=this._value,r=!1,o=0,a=0;i>a;++a){var s=t[a];e.equalsArray(s,n,o)||(e.pack(s,n,o),r=!0),o+=2}r&&this._gl.uniform2iv(this._location,n)},y.prototype.set=function(){for(var e=this.value,i=e.length,n=this._value,r=!1,o=0,a=0;i>a;++a){var s=e[a];t.equalsArray(s,n,o)||(t.pack(s,n,o),r=!0),o+=3}r&&this._gl.uniform3iv(this._location,n)},C.prototype.set=function(){for(var e=this.value,t=e.length,n=this._value,r=!1,o=0,a=0;t>a;++a){var s=e[a];i.equalsArray(s,n,o)||(i.pack(s,n,o),r=!0),o+=4}r&&this._gl.uniform4iv(this._location,n)},w.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;t>o;++o){var a=e[o];s.equalsArray(a,i,r)||(s.pack(a,i,r),n=!0),r+=4}n&&this._gl.uniformMatrix2fv(this._location,!1,i)},E.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;t>o;++o){var a=e[o];l.equalsArray(a,i,r)||(l.pack(a,i,r),n=!0),r+=9}n&&this._gl.uniformMatrix3fv(this._location,!1,i)},b.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;t>o;++o){var a=e[o];u.equalsArray(a,i,r)||(u.pack(a,i,r),n=!0),r+=16}n&&this._gl.uniformMatrix4fv(this._location,!1,i)},h}),define("Cesium/Renderer/ShaderProgram",["../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/destroyObject","../Core/DeveloperError","../Core/RuntimeError","./AutomaticUniforms","./ContextLimits","./createUniform","./createUniformArray"],function(e,t,i,n,r,o,a,s,l,u){"use strict";function c(e){var t=d(e.vertexShaderText,e.fragmentShaderText);this._gl=e.gl,this._logShaderCompilation=e.logShaderCompilation,this._debugShaders=e.debugShaders,this._attributeLocations=e.attributeLocations,this._program=void 0,this._numberOfVertexAttributes=void 0,this._vertexAttributes=void 0,this._uniformsByName=void 0,this._uniforms=void 0,this._automaticUniforms=void 0,this._manualUniforms=void 0,this._duplicateUniformNames=t.duplicateUniformNames,this._cachedShader=void 0,this.maximumTextureUnitIndex=void 0,this._vertexShaderSource=e.vertexShaderSource,this._vertexShaderText=e.vertexShaderText,this._fragmentShaderSource=e.fragmentShaderSource,this._fragmentShaderText=t.fragmentShaderText,this.id=y++}function h(e){var i=[],n=e.match(/uniform.*?(?![^{]*})(?=[=\[;])/g);if(t(n))for(var r=n.length,o=0;r>o;o++){var a=n[o].trim(),s=a.slice(a.lastIndexOf(" ")+1);i.push(s)}return i}function d(e,t){var i={};if(!s.highpFloatSupported||!s.highpIntSupported){var n,r,o,a,l=h(e),u=h(t),c=l.length,d=u.length;for(n=0;c>n;n++)for(r=0;d>r;r++)if(l[n]===u[r]){o=l[n],a="czm_mediump_"+o;var p=new RegExp(o+"\\b","g");t=t.replace(p,a),i[a]=o}}return{fragmentShaderText:t,duplicateUniformNames:i}}function p(e,i){var n=i._vertexShaderText,r=i._fragmentShaderText,a=e.createShader(e.VERTEX_SHADER);e.shaderSource(a,n),e.compileShader(a);var s=e.createShader(e.FRAGMENT_SHADER);e.shaderSource(s,r),e.compileShader(s);var l=e.createProgram();e.attachShader(l,a),e.attachShader(l,s),e.deleteShader(a),e.deleteShader(s);var u=i._attributeLocations;if(t(u))for(var c in u)u.hasOwnProperty(c)&&e.bindAttribLocation(l,u[c],c);e.linkProgram(l);var h;if(!e.getProgramParameter(l,e.LINK_STATUS)){var d=i._debugShaders;if(!e.getShaderParameter(s,e.COMPILE_STATUS)){if(h=e.getShaderInfoLog(s),console.error(C+"Fragment shader compile log: "+h),t(d)){var p=d.getTranslatedShaderSource(s);""!==p?console.error(C+"Translated fragment shader source:\n"+p):console.error(C+"Fragment shader translation failed.")}throw e.deleteProgram(l),new o("Fragment shader failed to compile. Compile log: "+h)}if(!e.getShaderParameter(a,e.COMPILE_STATUS)){if(h=e.getShaderInfoLog(a),console.error(C+"Vertex shader compile log: "+h),t(d)){var m=d.getTranslatedShaderSource(a);""!==m?console.error(C+"Translated vertex shader source:\n"+m):console.error(C+"Vertex shader translation failed.")}throw e.deleteProgram(l),new o("Vertex shader failed to compile. Compile log: "+h)}throw h=e.getProgramInfoLog(l),console.error(C+"Shader program link log: "+h),t(d)&&(console.error(C+"Translated vertex shader source:\n"+d.getTranslatedShaderSource(a)),console.error(C+"Translated fragment shader source:\n"+d.getTranslatedShaderSource(s))),e.deleteProgram(l),new o("Program failed to link. Link log: "+h)}var f=i._logShaderCompilation;return f&&(h=e.getShaderInfoLog(a),t(h)&&h.length>0&&console.log(C+"Vertex shader compile log: "+h)),f&&(h=e.getShaderInfoLog(s),t(h)&&h.length>0&&console.log(C+"Fragment shader compile log: "+h)),f&&(h=e.getProgramInfoLog(l),t(h)&&h.length>0&&console.log(C+"Shader program link log: "+h)),l}function m(e,t,i){for(var n={},r=0;i>r;++r){var o=e.getActiveAttrib(t,r),a=e.getAttribLocation(t,o.name);n[o.name]={name:o.name,type:o.type,index:a}}return n}function f(e,i){for(var n={},r=[],o=[],a=e.getProgramParameter(i,e.ACTIVE_UNIFORMS),s=0;a>s;++s){var c=e.getActiveUniform(i,s),h="[0]",d=-1!==c.name.indexOf(h,c.name.length-h.length)?c.name.slice(0,c.name.length-3):c.name;if(0!==d.indexOf("gl_"))if(c.name.indexOf("[")<0){var p=e.getUniformLocation(i,d);if(null!==p){var m=l(e,c,d,p);n[d]=m,r.push(m),m._setSampler&&o.push(m)}}else{var f,g,v,_,y=d.indexOf("[");if(y>=0){if(f=n[d.slice(0,y)],!t(f))continue;g=f._locations,g.length<=1&&(v=f.value,_=e.getUniformLocation(i,d),null!==_&&(g.push(_),v.push(e.getUniform(i,_))))}else{g=[];for(var C=0;Co;++o)n=i[o]._setSampler(n);return e.useProgram(null),n}function _(e){if(!t(e._program)){var i=e._gl,n=p(i,e,e._debugShaders),r=i.getProgramParameter(n,i.ACTIVE_ATTRIBUTES),o=f(i,n),a=g(e,o.uniformsByName);e._program=n,e._numberOfVertexAttributes=r,e._vertexAttributes=m(i,n,r),e._uniformsByName=o.uniformsByName,e._uniforms=o.uniforms,e._automaticUniforms=a.automaticUniforms,e._manualUniforms=a.manualUniforms,e.maximumTextureUnitIndex=v(i,n,o.samplerUniforms)}}var y=0;c.fromCache=function(t){return t=e(t,e.EMPTY_OBJECT),t.context.shaderCache.getShaderProgram(t)},c.replaceCache=function(t){return t=e(t,e.EMPTY_OBJECT),t.context.shaderCache.replaceShaderProgram(t)},i(c.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},vertexAttributes:{get:function(){return _(this),this._vertexAttributes} +},numberOfVertexAttributes:{get:function(){return _(this),this._numberOfVertexAttributes}},allUniforms:{get:function(){return _(this),this._uniformsByName}}});var C="[Cesium WebGL] ";return c.prototype._bind=function(){_(this),this._gl.useProgram(this._program)},c.prototype._setUniforms=function(e,i,n){var o,a;if(t(e)){var s=this._manualUniforms;for(o=s.length,a=0;o>a;++a){var l=s[a];l.value=e[l.name]()}}var u=this._automaticUniforms;for(o=u.length,a=0;o>a;++a){var c=u[a];c.uniform.value=c.automaticUniform.getValue(i)}var h=this._uniforms;for(o=h.length,a=0;o>a;++a)h[a].set();if(n){var d=this._gl,p=this._program;if(d.validateProgram(p),!d.getProgramParameter(p,d.VALIDATE_STATUS))throw new r("Program validation failed. Program info log: "+d.getProgramInfoLog(p))}},c.prototype.isDestroyed=function(){return!1},c.prototype.destroy=function(){this._cachedShader.cache.releaseShaderProgram(this)},c.prototype.finalDestroy=function(){return this._gl.deleteProgram(this._program),n(this)},c}),define("Cesium/Shaders/Builtin/Constants/degreesPerRadian",[],function(){"use strict";return"/**\n * A built-in GLSL floating-point constant for converting radians to degrees.\n *\n * @alias czm_degreesPerRadian\n * @glslConstant\n *\n * @see CesiumMath.DEGREES_PER_RADIAN\n *\n * @example\n * // GLSL declaration\n * const float czm_degreesPerRadian = ...;\n *\n * // Example\n * float deg = czm_degreesPerRadian * rad;\n */\nconst float czm_degreesPerRadian = 57.29577951308232;"}),define("Cesium/Shaders/Builtin/Constants/depthRange",[],function(){"use strict";return"/**\n * A built-in GLSL vec2 constant for defining the depth range.\n * This is a workaround to a bug where IE11 does not implement gl_DepthRange.\n *\n * @alias czm_depthRange\n * @glslConstant\n *\n * @example\n * // GLSL declaration\n * float depthRangeNear = czm_depthRange.near;\n * float depthRangeFar = czm_depthRange.far;\n *\n */\nconst czm_depthRangeStruct czm_depthRange = czm_depthRangeStruct(0.0, 1.0);"}),define("Cesium/Shaders/Builtin/Constants/epsilon1",[],function(){"use strict";return"/**\n * 0.1\n *\n * @name czm_epsilon1\n * @glslConstant\n */\nconst float czm_epsilon1 = 0.1;"}),define("Cesium/Shaders/Builtin/Constants/epsilon2",[],function(){"use strict";return"/**\n * 0.01\n *\n * @name czm_epsilon2\n * @glslConstant\n */\nconst float czm_epsilon2 = 0.01;"}),define("Cesium/Shaders/Builtin/Constants/epsilon3",[],function(){"use strict";return"/**\n * 0.001\n *\n * @name czm_epsilon3\n * @glslConstant\n */\nconst float czm_epsilon3 = 0.001;"}),define("Cesium/Shaders/Builtin/Constants/epsilon4",[],function(){"use strict";return"/**\n * 0.0001\n *\n * @name czm_epsilon4\n * @glslConstant\n */\nconst float czm_epsilon4 = 0.0001;"}),define("Cesium/Shaders/Builtin/Constants/epsilon5",[],function(){"use strict";return"/**\n * 0.00001\n *\n * @name czm_epsilon5\n * @glslConstant\n */\nconst float czm_epsilon5 = 0.00001;"}),define("Cesium/Shaders/Builtin/Constants/epsilon6",[],function(){"use strict";return"/**\n * 0.000001\n *\n * @name czm_epsilon6\n * @glslConstant\n */\nconst float czm_epsilon6 = 0.000001;"}),define("Cesium/Shaders/Builtin/Constants/epsilon7",[],function(){"use strict";return"/**\n * 0.0000001\n *\n * @name czm_epsilon7\n * @glslConstant\n */\nconst float czm_epsilon7 = 0.0000001;"}),define("Cesium/Shaders/Builtin/Constants/infinity",[],function(){"use strict";return"/**\n * DOC_TBA\n *\n * @name czm_infinity\n * @glslConstant\n */\nconst float czm_infinity = 5906376272000.0; // Distance from the Sun to Pluto in meters. TODO: What is best given lowp, mediump, and highp?"}),define("Cesium/Shaders/Builtin/Constants/oneOverPi",[],function(){"use strict";return"/**\n * A built-in GLSL floating-point constant for 1/pi.\n *\n * @alias czm_oneOverPi\n * @glslConstant\n *\n * @see CesiumMath.ONE_OVER_PI\n *\n * @example\n * // GLSL declaration\n * const float czm_oneOverPi = ...;\n *\n * // Example\n * float pi = 1.0 / czm_oneOverPi;\n */\nconst float czm_oneOverPi = 0.3183098861837907;"}),define("Cesium/Shaders/Builtin/Constants/oneOverTwoPi",[],function(){"use strict";return"/**\n * A built-in GLSL floating-point constant for 1/2pi.\n *\n * @alias czm_oneOverTwoPi\n * @glslConstant\n *\n * @see CesiumMath.ONE_OVER_TWO_PI\n *\n * @example\n * // GLSL declaration\n * const float czm_oneOverTwoPi = ...;\n *\n * // Example\n * float pi = 2.0 * czm_oneOverTwoPi;\n */\nconst float czm_oneOverTwoPi = 0.15915494309189535;"}),define("Cesium/Shaders/Builtin/Constants/passCompute",[],function(){"use strict";return"/**\n * The automatic GLSL constant for {@link Pass#COMPUTE}\n *\n * @name czm_passCompute\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passCompute = 1.0;"}),define("Cesium/Shaders/Builtin/Constants/passEnvironment",[],function(){"use strict";return"/**\n * The automatic GLSL constant for {@link Pass#ENVIRONMENT}\n *\n * @name czm_passEnvironment\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passEnvironment = 0.0;"}),define("Cesium/Shaders/Builtin/Constants/passGlobe",[],function(){"use strict";return"/**\n * The automatic GLSL constant for {@link Pass#GLOBE}\n *\n * @name czm_passGlobe\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passGlobe = 2.0;"}),define("Cesium/Shaders/Builtin/Constants/passGround",[],function(){"use strict";return"/**\n * The automatic GLSL constant for {@link Pass#GROUND}\n *\n * @name czm_passGround\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passGround = 3.0;"}),define("Cesium/Shaders/Builtin/Constants/passOpaque",[],function(){"use strict";return"/**\n * The automatic GLSL constant for {@link Pass#OPAQUE}\n *\n * @name czm_passOpaque\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passOpaque = 4.0;"}),define("Cesium/Shaders/Builtin/Constants/passOverlay",[],function(){"use strict";return"/**\n * The automatic GLSL constant for {@link Pass#OVERLAY}\n *\n * @name czm_passOverlay\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passOverlay = 6.0;"}),define("Cesium/Shaders/Builtin/Constants/passTranslucent",[],function(){"use strict";return"/**\n * The automatic GLSL constant for {@link Pass#TRANSLUCENT}\n *\n * @name czm_passTranslucent\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passTranslucent = 5.0;"}),define("Cesium/Shaders/Builtin/Constants/pi",[],function(){"use strict";return"/**\n * A built-in GLSL floating-point constant for Math.PI.\n *\n * @alias czm_pi\n * @glslConstant\n *\n * @see CesiumMath.PI\n *\n * @example\n * // GLSL declaration\n * const float czm_pi = ...;\n *\n * // Example\n * float twoPi = 2.0 * czm_pi;\n */\nconst float czm_pi = 3.141592653589793;"}),define("Cesium/Shaders/Builtin/Constants/piOverFour",[],function(){"use strict";return"/**\n * A built-in GLSL floating-point constant for pi/4.\n *\n * @alias czm_piOverFour\n * @glslConstant\n *\n * @see CesiumMath.PI_OVER_FOUR\n *\n * @example\n * // GLSL declaration\n * const float czm_piOverFour = ...;\n *\n * // Example\n * float pi = 4.0 * czm_piOverFour;\n */\nconst float czm_piOverFour = 0.7853981633974483;"}),define("Cesium/Shaders/Builtin/Constants/piOverSix",[],function(){"use strict";return"/**\n * A built-in GLSL floating-point constant for pi/6.\n *\n * @alias czm_piOverSix\n * @glslConstant\n *\n * @see CesiumMath.PI_OVER_SIX\n *\n * @example\n * // GLSL declaration\n * const float czm_piOverSix = ...;\n *\n * // Example\n * float pi = 6.0 * czm_piOverSix;\n */\nconst float czm_piOverSix = 0.5235987755982988;"}),define("Cesium/Shaders/Builtin/Constants/piOverThree",[],function(){"use strict";return"/**\n * A built-in GLSL floating-point constant for pi/3.\n *\n * @alias czm_piOverThree\n * @glslConstant\n *\n * @see CesiumMath.PI_OVER_THREE\n *\n * @example\n * // GLSL declaration\n * const float czm_piOverThree = ...;\n *\n * // Example\n * float pi = 3.0 * czm_piOverThree;\n */\nconst float czm_piOverThree = 1.0471975511965976;"}),define("Cesium/Shaders/Builtin/Constants/piOverTwo",[],function(){"use strict";return"/**\n * A built-in GLSL floating-point constant for pi/2.\n *\n * @alias czm_piOverTwo\n * @glslConstant\n *\n * @see CesiumMath.PI_OVER_TWO\n *\n * @example\n * // GLSL declaration\n * const float czm_piOverTwo = ...;\n *\n * // Example\n * float pi = 2.0 * czm_piOverTwo;\n */\nconst float czm_piOverTwo = 1.5707963267948966;"}),define("Cesium/Shaders/Builtin/Constants/radiansPerDegree",[],function(){"use strict";return"/**\n * A built-in GLSL floating-point constant for converting degrees to radians.\n *\n * @alias czm_radiansPerDegree\n * @glslConstant\n *\n * @see CesiumMath.RADIANS_PER_DEGREE\n *\n * @example\n * // GLSL declaration\n * const float czm_radiansPerDegree = ...;\n *\n * // Example\n * float rad = czm_radiansPerDegree * deg;\n */\nconst float czm_radiansPerDegree = 0.017453292519943295;"}),define("Cesium/Shaders/Builtin/Constants/sceneMode2D",[],function(){"use strict";return"/**\n * The constant identifier for the 2D {@link SceneMode}\n *\n * @name czm_sceneMode2D\n * @glslConstant\n * @see czm_sceneMode\n * @see czm_sceneModeColumbusView\n * @see czm_sceneMode3D\n * @see czm_sceneModeMorphing\n */\nconst float czm_sceneMode2D = 2.0;"}),define("Cesium/Shaders/Builtin/Constants/sceneMode3D",[],function(){"use strict";return"/**\n * The constant identifier for the 3D {@link SceneMode}\n *\n * @name czm_sceneMode3D\n * @glslConstant\n * @see czm_sceneMode\n * @see czm_sceneMode2D\n * @see czm_sceneModeColumbusView\n * @see czm_sceneModeMorphing\n */\nconst float czm_sceneMode3D = 3.0;"}),define("Cesium/Shaders/Builtin/Constants/sceneModeColumbusView",[],function(){"use strict";return"/**\n * The constant identifier for the Columbus View {@link SceneMode}\n *\n * @name czm_sceneModeColumbusView\n * @glslConstant\n * @see czm_sceneMode\n * @see czm_sceneMode2D\n * @see czm_sceneMode3D\n * @see czm_sceneModeMorphing\n */\nconst float czm_sceneModeColumbusView = 1.0;"}),define("Cesium/Shaders/Builtin/Constants/sceneModeMorphing",[],function(){"use strict";return"/**\n * The constant identifier for the Morphing {@link SceneMode}\n *\n * @name czm_sceneModeMorphing\n * @glslConstant\n * @see czm_sceneMode\n * @see czm_sceneMode2D\n * @see czm_sceneModeColumbusView\n * @see czm_sceneMode3D\n */\nconst float czm_sceneModeMorphing = 0.0;"}),define("Cesium/Shaders/Builtin/Constants/solarRadius",[],function(){"use strict";return"/**\n * A built-in GLSL floating-point constant for one solar radius.\n *\n * @alias czm_solarRadius\n * @glslConstant\n *\n * @see CesiumMath.SOLAR_RADIUS\n *\n * @example\n * // GLSL declaration\n * const float czm_solarRadius = ...;\n */\nconst float czm_solarRadius = 695500000.0;"}),define("Cesium/Shaders/Builtin/Constants/threePiOver2",[],function(){"use strict";return"/**\n * A built-in GLSL floating-point constant for 3pi/2.\n *\n * @alias czm_threePiOver2\n * @glslConstant\n *\n * @see CesiumMath.THREE_PI_OVER_TWO\n *\n * @example\n * // GLSL declaration\n * const float czm_threePiOver2 = ...;\n *\n * // Example\n * float pi = (2.0 / 3.0) * czm_threePiOver2;\n */\nconst float czm_threePiOver2 = 4.71238898038469;"}),define("Cesium/Shaders/Builtin/Constants/twoPi",[],function(){"use strict";return"/**\n * A built-in GLSL floating-point constant for 2pi.\n *\n * @alias czm_twoPi\n * @glslConstant\n *\n * @see CesiumMath.TWO_PI\n *\n * @example\n * // GLSL declaration\n * const float czm_twoPi = ...;\n *\n * // Example\n * float pi = czm_twoPi / 2.0;\n */\nconst float czm_twoPi = 6.283185307179586;"}),define("Cesium/Shaders/Builtin/Constants/webMercatorMaxLatitude",[],function(){"use strict";return"/**\n * The maximum latitude, in radians, both North and South, supported by a Web Mercator\n * (EPSG:3857) projection. Technically, the Mercator projection is defined\n * for any latitude up to (but not including) 90 degrees, but it makes sense\n * to cut it off sooner because it grows exponentially with increasing latitude.\n * The logic behind this particular cutoff value, which is the one used by\n * Google Maps, Bing Maps, and Esri, is that it makes the projection\n * square. That is, the rectangle is equal in the X and Y directions.\n *\n * The constant value is computed as follows:\n * czm_pi * 0.5 - (2.0 * atan(exp(-czm_pi)))\n *\n * @name czm_webMercatorMaxLatitude\n * @glslConstant\n */\nconst float czm_webMercatorMaxLatitude = 1.4844222297453324;"}),define("Cesium/Shaders/Builtin/Structs/depthRangeStruct",[],function(){"use strict";return"/**\n * @name czm_depthRangeStruct\n * @glslStruct\n */\nstruct czm_depthRangeStruct\n{\n float near;\n float far;\n};"}),define("Cesium/Shaders/Builtin/Structs/ellipsoid",[],function(){"use strict";return"/** DOC_TBA\n *\n * @name czm_ellipsoid\n * @glslStruct\n */\nstruct czm_ellipsoid\n{\n vec3 center;\n vec3 radii;\n vec3 inverseRadii;\n vec3 inverseRadiiSquared;\n};"}),define("Cesium/Shaders/Builtin/Structs/material",[],function(){"use strict";return"/**\n * Holds material information that can be used for lighting. Returned by all czm_getMaterial functions.\n *\n * @name czm_material\n * @glslStruct\n *\n * @property {vec3} diffuse Incoming light that scatters evenly in all directions.\n * @property {float} specular Intensity of incoming light reflecting in a single direction.\n * @property {float} shininess The sharpness of the specular reflection. Higher values create a smaller, more focused specular highlight.\n * @property {vec3} normal Surface's normal in eye coordinates. It is used for effects such as normal mapping. The default is the surface's unmodified normal.\n * @property {vec3} emission Light emitted by the material equally in all directions. The default is vec3(0.0), which emits no light.\n * @property {float} alpha Opacity of this material. 0.0 is completely transparent; 1.0 is completely opaque.\n */\nstruct czm_material\n{\n vec3 diffuse;\n float specular;\n float shininess;\n vec3 normal;\n vec3 emission;\n float alpha;\n};"}),define("Cesium/Shaders/Builtin/Structs/materialInput",[],function(){"use strict";return"/**\n * Used as input to every material's czm_getMaterial function.\n *\n * @name czm_materialInput\n * @glslStruct\n *\n * @property {float} s 1D texture coordinates.\n * @property {vec2} st 2D texture coordinates.\n * @property {vec3} str 3D texture coordinates.\n * @property {vec3} normalEC Unperturbed surface normal in eye coordinates.\n * @property {mat3} tangentToEyeMatrix Matrix for converting a tangent space normal to eye space.\n * @property {vec3} positionToEyeEC Vector from the fragment to the eye in eye coordinates. The magnitude is the distance in meters from the fragment to the eye.\n */\nstruct czm_materialInput\n{\n float s;\n vec2 st;\n vec3 str;\n vec3 normalEC;\n mat3 tangentToEyeMatrix;\n vec3 positionToEyeEC;\n};"}),define("Cesium/Shaders/Builtin/Structs/ray",[],function(){"use strict";return"/**\n * DOC_TBA\n *\n * @name czm_ray\n * @glslStruct\n */\nstruct czm_ray\n{\n vec3 origin;\n vec3 direction;\n};"}),define("Cesium/Shaders/Builtin/Structs/raySegment",[],function(){"use strict";return"/**\n * DOC_TBA\n *\n * @name czm_raySegment\n * @glslStruct\n */\nstruct czm_raySegment\n{\n float start;\n float stop;\n};\n\n/**\n * DOC_TBA\n *\n * @name czm_emptyRaySegment\n * @glslConstant \n */\nconst czm_raySegment czm_emptyRaySegment = czm_raySegment(-czm_infinity, -czm_infinity);\n\n/**\n * DOC_TBA\n *\n * @name czm_fullRaySegment\n * @glslConstant \n */\nconst czm_raySegment czm_fullRaySegment = czm_raySegment(0.0, czm_infinity);\n"}),define("Cesium/Shaders/Builtin/Structs/shadowParameters",[],function(){"use strict";return"struct czm_shadowParameters\n{\n#ifdef USE_CUBE_MAP_SHADOW\n vec3 texCoords;\n#else\n vec2 texCoords;\n#endif\n\n float depthBias;\n float depth;\n float nDotL;\n vec2 texelStepSize;\n float normalShadingSmooth;\n float darkness;\n};"}),define("Cesium/Shaders/Builtin/Functions/alphaWeight",[],function(){"use strict";return"/**\n * @private\n */\nfloat czm_alphaWeight(float a)\n{\n float z;\n if (czm_sceneMode != czm_sceneMode2D)\n {\n float x = 2.0 * (gl_FragCoord.x - czm_viewport.x) / czm_viewport.z - 1.0;\n float y = 2.0 * (gl_FragCoord.y - czm_viewport.y) / czm_viewport.w - 1.0;\n z = (gl_FragCoord.z - czm_viewportTransformation[3][2]) / czm_viewportTransformation[2][2];\n vec4 q = vec4(x, y, z, 0.0);\n q /= gl_FragCoord.w;\n z = (czm_inverseProjectionOIT * q).z;\n }\n else\n {\n z = gl_FragCoord.z * (czm_currentFrustum.y - czm_currentFrustum.x) + czm_currentFrustum.x;\n }\n \n // See Weighted Blended Order-Independent Transparency for examples of different weighting functions:\n // http://jcgt.org/published/0002/02/09/\n return pow(a + 0.01, 4.0) + max(1e-2, min(3.0 * 1e3, 100.0 / (1e-5 + pow(abs(z) / 10.0, 3.0) + pow(abs(z) / 200.0, 6.0))));\n}"}),define("Cesium/Shaders/Builtin/Functions/antialias",[],function(){"use strict";return"/**\n * Procedural anti-aliasing by blurring two colors that meet at a sharp edge.\n *\n * @name czm_antialias\n * @glslFunction\n *\n * @param {vec4} color1 The color on one side of the edge.\n * @param {vec4} color2 The color on the other side of the edge.\n * @param {vec4} currentcolor The current color, either color1 or color2.\n * @param {float} dist The distance to the edge in texture coordinates.\n * @param {float} [fuzzFactor=0.1] Controls the blurriness between the two colors.\n * @returns {vec4} The anti-aliased color.\n *\n * @example\n * // GLSL declarations\n * vec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist, float fuzzFactor);\n * vec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist);\n *\n * // get the color for a material that has a sharp edge at the line y = 0.5 in texture space\n * float dist = abs(textureCoordinates.t - 0.5);\n * vec4 currentColor = mix(bottomColor, topColor, step(0.5, textureCoordinates.t));\n * vec4 color = czm_antialias(bottomColor, topColor, currentColor, dist, 0.1);\n */\nvec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist, float fuzzFactor)\n{\n float val1 = clamp(dist / fuzzFactor, 0.0, 1.0);\n float val2 = clamp((dist - 0.5) / fuzzFactor, 0.0, 1.0);\n val1 = val1 * (1.0 - val2);\n val1 = val1 * val1 * (3.0 - (2.0 * val1));\n val1 = pow(val1, 0.5); //makes the transition nicer\n \n vec4 midColor = (color1 + color2) * 0.5;\n return mix(midColor, currentColor, val1);\n}\n\nvec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist)\n{\n return czm_antialias(color1, color2, currentColor, dist, 0.1);\n}\n"}),define("Cesium/Shaders/Builtin/Functions/cascadeColor",[],function(){"use strict";return"\nvec4 czm_cascadeColor(vec4 weights)\n{\n return vec4(1.0, 0.0, 0.0, 1.0) * weights.x +\n vec4(0.0, 1.0, 0.0, 1.0) * weights.y +\n vec4(0.0, 0.0, 1.0, 1.0) * weights.z +\n vec4(1.0, 0.0, 1.0, 1.0) * weights.w;\n}"}),define("Cesium/Shaders/Builtin/Functions/cascadeDistance",[],function(){"use strict";return"\nuniform vec4 shadowMap_cascadeDistances;\n\nfloat czm_cascadeDistance(vec4 weights)\n{\n return dot(shadowMap_cascadeDistances, weights);\n}"}),define("Cesium/Shaders/Builtin/Functions/cascadeMatrix",[],function(){"use strict";return"\nuniform mat4 shadowMap_cascadeMatrices[4];\n\nmat4 czm_cascadeMatrix(vec4 weights)\n{\n return shadowMap_cascadeMatrices[0] * weights.x +\n shadowMap_cascadeMatrices[1] * weights.y +\n shadowMap_cascadeMatrices[2] * weights.z +\n shadowMap_cascadeMatrices[3] * weights.w;\n}"}),define("Cesium/Shaders/Builtin/Functions/cascadeWeights",[],function(){"use strict";return"\nuniform vec4 shadowMap_cascadeSplits[2];\n\nvec4 czm_cascadeWeights(float depthEye)\n{\n // One component is set to 1.0 and all others set to 0.0.\n vec4 near = step(shadowMap_cascadeSplits[0], vec4(depthEye));\n vec4 far = step(depthEye, shadowMap_cascadeSplits[1]);\n return near * far;\n}"}),define("Cesium/Shaders/Builtin/Functions/columbusViewMorph",[],function(){"use strict";return"/**\n * DOC_TBA\n *\n * @name czm_columbusViewMorph\n * @glslFunction\n */\nvec4 czm_columbusViewMorph(vec4 position2D, vec4 position3D, float time)\n{\n // Just linear for now.\n vec3 p = mix(position2D.xyz, position3D.xyz, time);\n return vec4(p, 1.0);\n}\n"}),define("Cesium/Shaders/Builtin/Functions/computePosition",[],function(){"use strict";return"/**\n * Returns a position in model coordinates relative to eye taking into\n * account the current scene mode: 3D, 2D, or Columbus view.\n *

\n * This uses standard position attributes, position3DHigh, \n * position3DLow, position2DHigh, and position2DLow, \n * and should be used when writing a vertex shader for an {@link Appearance}.\n *

\n *\n * @name czm_computePosition\n * @glslFunction\n *\n * @returns {vec4} The position relative to eye.\n *\n * @example\n * vec4 p = czm_computePosition();\n * v_positionEC = (czm_modelViewRelativeToEye * p).xyz;\n * gl_Position = czm_modelViewProjectionRelativeToEye * p;\n *\n * @see czm_translateRelativeToEye\n */\nvec4 czm_computePosition();\n"}),define("Cesium/Shaders/Builtin/Functions/cosineAndSine",[],function(){"use strict";return"/**\n * @private\n */\nvec2 cordic(float angle)\n{\n// Scale the vector by the appropriate factor for the 24 iterations to follow.\n vec2 vector = vec2(6.0725293500888267e-1, 0.0);\n// Iteration 1\n float sense = (angle < 0.0) ? -1.0 : 1.0;\n // float factor = sense * 1.0; // 2^-0\n mat2 rotation = mat2(1.0, sense, -sense, 1.0);\n vector = rotation * vector;\n angle -= sense * 7.8539816339744828e-1; // atan(2^-0)\n// Iteration 2\n sense = (angle < 0.0) ? -1.0 : 1.0;\n float factor = sense * 5.0e-1; // 2^-1\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 4.6364760900080609e-1; // atan(2^-1)\n// Iteration 3\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 2.5e-1; // 2^-2\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 2.4497866312686414e-1; // atan(2^-2)\n// Iteration 4\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.25e-1; // 2^-3\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 1.2435499454676144e-1; // atan(2^-3)\n// Iteration 5\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 6.25e-2; // 2^-4\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 6.2418809995957350e-2; // atan(2^-4)\n// Iteration 6\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 3.125e-2; // 2^-5\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 3.1239833430268277e-2; // atan(2^-5)\n// Iteration 7\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.5625e-2; // 2^-6\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 1.5623728620476831e-2; // atan(2^-6)\n// Iteration 8\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 7.8125e-3; // 2^-7\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 7.8123410601011111e-3; // atan(2^-7)\n// Iteration 9\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 3.90625e-3; // 2^-8\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 3.9062301319669718e-3; // atan(2^-8)\n// Iteration 10\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.953125e-3; // 2^-9\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 1.9531225164788188e-3; // atan(2^-9)\n// Iteration 11\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 9.765625e-4; // 2^-10\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 9.7656218955931946e-4; // atan(2^-10)\n// Iteration 12\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 4.8828125e-4; // 2^-11\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 4.8828121119489829e-4; // atan(2^-11)\n// Iteration 13\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 2.44140625e-4; // 2^-12\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 2.4414062014936177e-4; // atan(2^-12)\n// Iteration 14\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.220703125e-4; // 2^-13\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 1.2207031189367021e-4; // atan(2^-13)\n// Iteration 15\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 6.103515625e-5; // 2^-14\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 6.1035156174208773e-5; // atan(2^-14)\n// Iteration 16\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 3.0517578125e-5; // 2^-15\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 3.0517578115526096e-5; // atan(2^-15)\n// Iteration 17\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.52587890625e-5; // 2^-16\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 1.5258789061315762e-5; // atan(2^-16)\n// Iteration 18\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 7.62939453125e-6; // 2^-17\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 7.6293945311019700e-6; // atan(2^-17)\n// Iteration 19\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 3.814697265625e-6; // 2^-18\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 3.8146972656064961e-6; // atan(2^-18)\n// Iteration 20\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.9073486328125e-6; // 2^-19\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 1.9073486328101870e-6; // atan(2^-19)\n// Iteration 21\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 9.5367431640625e-7; // 2^-20\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 9.5367431640596084e-7; // atan(2^-20)\n// Iteration 22\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 4.76837158203125e-7; // 2^-21\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 4.7683715820308884e-7; // atan(2^-21)\n// Iteration 23\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 2.384185791015625e-7; // 2^-22\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 2.3841857910155797e-7; // atan(2^-22)\n// Iteration 24\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.1920928955078125e-7; // 2^-23\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n// angle -= sense * 1.1920928955078068e-7; // atan(2^-23)\n\n return vector;\n}\n\n/**\n * Computes the cosine and sine of the provided angle using the CORDIC algorithm.\n *\n * @name czm_cosineAndSine\n * @glslFunction\n *\n * @param {float} angle The angle in radians.\n *\n * @returns {vec2} The resulting cosine of the angle (as the x coordinate) and sine of the angle (as the y coordinate).\n *\n * @example\n * vec2 v = czm_cosineAndSine(czm_piOverSix);\n * float cosine = v.x;\n * float sine = v.y;\n */\nvec2 czm_cosineAndSine(float angle)\n{\n if (angle < -czm_piOverTwo || angle > czm_piOverTwo)\n {\n if (angle < 0.0)\n {\n return -cordic(angle + czm_pi);\n }\n else\n {\n return -cordic(angle - czm_pi);\n }\n }\n else\n {\n return cordic(angle);\n }\n}"}),define("Cesium/Shaders/Builtin/Functions/decompressTextureCoordinates",[],function(){"use strict";return"/**\n * Decompresses texture coordinates that were packed into a single float.\n *\n * @name czm_decompressTextureCoordinates\n * @glslFunction\n *\n * @param {float} encoded The compressed texture coordinates.\n * @returns {vec2} The decompressed texture coordinates.\n */\n vec2 czm_decompressTextureCoordinates(float encoded)\n {\n float temp = encoded / 4096.0;\n float stx = floor(temp) / 4096.0;\n float sty = temp - floor(temp);\n return vec2(stx, sty);\n }\n"}),define("Cesium/Shaders/Builtin/Functions/eastNorthUpToEyeCoordinates",[],function(){"use strict";return"/**\n * Computes a 3x3 rotation matrix that transforms vectors from an ellipsoid's east-north-up coordinate system \n * to eye coordinates. In east-north-up coordinates, x points east, y points north, and z points along the \n * surface normal. East-north-up can be used as an ellipsoid's tangent space for operations such as bump mapping.\n *

\n * The ellipsoid is assumed to be centered at the model coordinate's origin.\n *\n * @name czm_eastNorthUpToEyeCoordinates\n * @glslFunction\n *\n * @param {vec3} positionMC The position on the ellipsoid in model coordinates.\n * @param {vec3} normalEC The normalized ellipsoid surface normal, at positionMC, in eye coordinates.\n *\n * @returns {mat3} A 3x3 rotation matrix that transforms vectors from the east-north-up coordinate system to eye coordinates.\n *\n * @example\n * // Transform a vector defined in the east-north-up coordinate \n * // system, (0, 0, 1) which is the surface normal, to eye \n * // coordinates.\n * mat3 m = czm_eastNorthUpToEyeCoordinates(positionMC, normalEC);\n * vec3 normalEC = m * vec3(0.0, 0.0, 1.0);\n */\nmat3 czm_eastNorthUpToEyeCoordinates(vec3 positionMC, vec3 normalEC)\n{\n vec3 tangentMC = normalize(vec3(-positionMC.y, positionMC.x, 0.0)); // normalized surface tangent in model coordinates\n vec3 tangentEC = normalize(czm_normal3D * tangentMC); // normalized surface tangent in eye coordiantes\n vec3 bitangentEC = normalize(cross(normalEC, tangentEC)); // normalized surface bitangent in eye coordinates\n\n return mat3(\n tangentEC.x, tangentEC.y, tangentEC.z,\n bitangentEC.x, bitangentEC.y, bitangentEC.z,\n normalEC.x, normalEC.y, normalEC.z);\n}\n"}),define("Cesium/Shaders/Builtin/Functions/ellipsoidContainsPoint",[],function(){"use strict";return"/**\n * DOC_TBA\n *\n * @name czm_ellipsoidContainsPoint\n * @glslFunction\n *\n */\nbool czm_ellipsoidContainsPoint(czm_ellipsoid ellipsoid, vec3 point)\n{\n vec3 scaled = ellipsoid.inverseRadii * (czm_inverseModelView * vec4(point, 1.0)).xyz;\n return (dot(scaled, scaled) <= 1.0);\n}\n"}),define("Cesium/Shaders/Builtin/Functions/ellipsoidNew",[],function(){"use strict";return"/**\n * DOC_TBA\n *\n * @name czm_ellipsoidNew\n * @glslFunction\n *\n */\nczm_ellipsoid czm_ellipsoidNew(vec3 center, vec3 radii)\n{\n vec3 inverseRadii = vec3(1.0 / radii.x, 1.0 / radii.y, 1.0 / radii.z);\n vec3 inverseRadiiSquared = inverseRadii * inverseRadii;\n czm_ellipsoid temp = czm_ellipsoid(center, radii, inverseRadii, inverseRadiiSquared);\n return temp;\n}\n"; +}),define("Cesium/Shaders/Builtin/Functions/ellipsoidWgs84TextureCoordinates",[],function(){"use strict";return"/**\n * DOC_TBA\n *\n * @name czm_ellipsoidWgs84TextureCoordinates\n * @glslFunction\n */\nvec2 czm_ellipsoidWgs84TextureCoordinates(vec3 normal)\n{\n return vec2(atan(normal.y, normal.x) * czm_oneOverTwoPi + 0.5, asin(normal.z) * czm_oneOverPi + 0.5);\n}\n"}),define("Cesium/Shaders/Builtin/Functions/equalsEpsilon",[],function(){"use strict";return"/**\n * Compares left and right componentwise. Returns true\n * if they are within epsilon and false otherwise. The inputs\n * left and right can be floats, vec2s,\n * vec3s, or vec4s.\n *\n * @name czm_equalsEpsilon\n * @glslFunction\n *\n * @param {} left The first vector.\n * @param {} right The second vector.\n * @param {float} epsilon The epsilon to use for equality testing.\n * @returns {bool} true if the components are within epsilon and false otherwise.\n *\n * @example\n * // GLSL declarations\n * bool czm_equalsEpsilon(float left, float right, float epsilon);\n * bool czm_equalsEpsilon(vec2 left, vec2 right, float epsilon);\n * bool czm_equalsEpsilon(vec3 left, vec3 right, float epsilon);\n * bool czm_equalsEpsilon(vec4 left, vec4 right, float epsilon);\n */\nbool czm_equalsEpsilon(vec4 left, vec4 right, float epsilon) {\n return all(lessThanEqual(abs(left - right), vec4(epsilon)));\n}\n\nbool czm_equalsEpsilon(vec3 left, vec3 right, float epsilon) {\n return all(lessThanEqual(abs(left - right), vec3(epsilon)));\n}\n\nbool czm_equalsEpsilon(vec2 left, vec2 right, float epsilon) {\n return all(lessThanEqual(abs(left - right), vec2(epsilon)));\n}\n\nbool czm_equalsEpsilon(float left, float right, float epsilon) {\n return (abs(left - right) <= epsilon);\n}\n"}),define("Cesium/Shaders/Builtin/Functions/eyeOffset",[],function(){"use strict";return"/**\n * DOC_TBA\n *\n * @name czm_eyeOffset\n * @glslFunction\n *\n * @param {vec4} positionEC DOC_TBA.\n * @param {vec3} eyeOffset DOC_TBA.\n *\n * @returns {vec4} DOC_TBA.\n */\nvec4 czm_eyeOffset(vec4 positionEC, vec3 eyeOffset)\n{\n // This equation is approximate in x and y.\n vec4 p = positionEC;\n vec4 zEyeOffset = normalize(p) * eyeOffset.z;\n p.xy += eyeOffset.xy + zEyeOffset.xy;\n p.z += zEyeOffset.z;\n return p;\n}\n"}),define("Cesium/Shaders/Builtin/Functions/eyeToWindowCoordinates",[],function(){"use strict";return"/**\n * Transforms a position from eye to window coordinates. The transformation\n * from eye to clip coordinates is done using {@link czm_projection}.\n * The transform from normalized device coordinates to window coordinates is\n * done using {@link czm_viewportTransformation}, which assumes a depth range\n * of near = 0 and far = 1.\n *

\n * This transform is useful when there is a need to manipulate window coordinates\n * in a vertex shader as done by {@link BillboardCollection}.\n *\n * @name czm_eyeToWindowCoordinates\n * @glslFunction\n *\n * @param {vec4} position The position in eye coordinates to transform.\n *\n * @returns {vec4} The transformed position in window coordinates.\n *\n * @see czm_modelToWindowCoordinates\n * @see czm_projection\n * @see czm_viewportTransformation\n * @see BillboardCollection\n *\n * @example\n * vec4 positionWC = czm_eyeToWindowCoordinates(positionEC);\n */\nvec4 czm_eyeToWindowCoordinates(vec4 positionEC)\n{\n vec4 q = czm_projection * positionEC; // clip coordinates\n q.xyz /= q.w; // normalized device coordinates\n q.xyz = (czm_viewportTransformation * vec4(q.xyz, 1.0)).xyz; // window coordinates\n return q;\n}\n"}),define("Cesium/Shaders/Builtin/Functions/fog",[],function(){"use strict";return"/**\n * Gets the color with fog at a distance from the camera.\n * \n * @name czm_fog\n * @glslFunction\n * \n * @param {float} distanceToCamera The distance to the camera in meters.\n * @param {vec3} color The original color.\n * @param {vec3} fogColor The color of the fog.\n *\n * @returns {vec3} The color adjusted for fog at the distance from the camera.\n */\nvec3 czm_fog(float distanceToCamera, vec3 color, vec3 fogColor)\n{\n float scalar = distanceToCamera * czm_fogDensity;\n float fog = 1.0 - exp(-(scalar * scalar));\n \n return mix(color, fogColor, fog);\n}\n"}),define("Cesium/Shaders/Builtin/Functions/geodeticSurfaceNormal",[],function(){"use strict";return"/**\n * DOC_TBA\n *\n * @name czm_geodeticSurfaceNormal\n * @glslFunction\n *\n * @param {vec3} positionOnEllipsoid DOC_TBA\n * @param {vec3} ellipsoidCenter DOC_TBA\n * @param {vec3} oneOverEllipsoidRadiiSquared DOC_TBA\n * \n * @returns {vec3} DOC_TBA.\n */\nvec3 czm_geodeticSurfaceNormal(vec3 positionOnEllipsoid, vec3 ellipsoidCenter, vec3 oneOverEllipsoidRadiiSquared)\n{\n return normalize((positionOnEllipsoid - ellipsoidCenter) * oneOverEllipsoidRadiiSquared);\n}\n"}),define("Cesium/Shaders/Builtin/Functions/getDefaultMaterial",[],function(){"use strict";return"/**\n * An czm_material with default values. Every material's czm_getMaterial\n * should use this default material as a base for the material it returns.\n * The default normal value is given by materialInput.normalEC.\n *\n * @name czm_getDefaultMaterial\n * @glslFunction \n *\n * @param {czm_materialInput} input The input used to construct the default material.\n * \n * @returns {czm_material} The default material.\n *\n * @see czm_materialInput\n * @see czm_material\n * @see czm_getMaterial\n */\nczm_material czm_getDefaultMaterial(czm_materialInput materialInput)\n{\n czm_material material;\n material.diffuse = vec3(0.0);\n material.specular = 0.0;\n material.shininess = 1.0;\n material.normal = materialInput.normalEC;\n material.emission = vec3(0.0);\n material.alpha = 1.0;\n return material;\n}\n"}),define("Cesium/Shaders/Builtin/Functions/getLambertDiffuse",[],function(){"use strict";return"/**\n * Calculates the intensity of diffusely reflected light.\n *\n * @name czm_getLambertDiffuse\n * @glslFunction\n *\n * @param {vec3} lightDirectionEC Unit vector pointing to the light source in eye coordinates.\n * @param {vec3} normalEC The surface normal in eye coordinates.\n *\n * @returns {float} The intensity of the diffuse reflection.\n *\n * @see czm_phong\n *\n * @example\n * float diffuseIntensity = czm_getLambertDiffuse(lightDirectionEC, normalEC);\n * float specularIntensity = czm_getSpecular(lightDirectionEC, toEyeEC, normalEC, 200);\n * vec3 color = (diffuseColor * diffuseIntensity) + (specularColor * specularIntensity);\n */\nfloat czm_getLambertDiffuse(vec3 lightDirectionEC, vec3 normalEC)\n{\n return max(dot(lightDirectionEC, normalEC), 0.0);\n}"}),define("Cesium/Shaders/Builtin/Functions/getSpecular",[],function(){"use strict";return"/**\n * Calculates the specular intensity of reflected light.\n *\n * @name czm_getSpecular\n * @glslFunction\n *\n * @param {vec3} lightDirectionEC Unit vector pointing to the light source in eye coordinates.\n * @param {vec3} toEyeEC Unit vector pointing to the eye position in eye coordinates.\n * @param {vec3} normalEC The surface normal in eye coordinates.\n * @param {float} shininess The sharpness of the specular reflection. Higher values create a smaller, more focused specular highlight.\n *\n * @returns {float} The intensity of the specular highlight.\n *\n * @see czm_phong\n *\n * @example\n * float diffuseIntensity = czm_getLambertDiffuse(lightDirectionEC, normalEC);\n * float specularIntensity = czm_getSpecular(lightDirectionEC, toEyeEC, normalEC, 200);\n * vec3 color = (diffuseColor * diffuseIntensity) + (specularColor * specularIntensity);\n */\nfloat czm_getSpecular(vec3 lightDirectionEC, vec3 toEyeEC, vec3 normalEC, float shininess)\n{\n vec3 toReflectedLight = reflect(-lightDirectionEC, normalEC);\n float specular = max(dot(toReflectedLight, toEyeEC), 0.0);\n return pow(specular, shininess);\n}"}),define("Cesium/Shaders/Builtin/Functions/getWaterNoise",[],function(){"use strict";return"/**\n * @private\n */\nvec4 czm_getWaterNoise(sampler2D normalMap, vec2 uv, float time, float angleInRadians)\n{\n float cosAngle = cos(angleInRadians);\n float sinAngle = sin(angleInRadians);\n\n // time dependent sampling directions\n vec2 s0 = vec2(1.0/17.0, 0.0);\n vec2 s1 = vec2(-1.0/29.0, 0.0);\n vec2 s2 = vec2(1.0/101.0, 1.0/59.0);\n vec2 s3 = vec2(-1.0/109.0, -1.0/57.0);\n\n // rotate sampling direction by specified angle\n s0 = vec2((cosAngle * s0.x) - (sinAngle * s0.y), (sinAngle * s0.x) + (cosAngle * s0.y));\n s1 = vec2((cosAngle * s1.x) - (sinAngle * s1.y), (sinAngle * s1.x) + (cosAngle * s1.y));\n s2 = vec2((cosAngle * s2.x) - (sinAngle * s2.y), (sinAngle * s2.x) + (cosAngle * s2.y));\n s3 = vec2((cosAngle * s3.x) - (sinAngle * s3.y), (sinAngle * s3.x) + (cosAngle * s3.y));\n\n vec2 uv0 = (uv/103.0) + (time * s0);\n vec2 uv1 = uv/107.0 + (time * s1) + vec2(0.23);\n vec2 uv2 = uv/vec2(897.0, 983.0) + (time * s2) + vec2(0.51);\n vec2 uv3 = uv/vec2(991.0, 877.0) + (time * s3) + vec2(0.71);\n\n uv0 = fract(uv0);\n uv1 = fract(uv1);\n uv2 = fract(uv2);\n uv3 = fract(uv3);\n vec4 noise = (texture2D(normalMap, uv0)) +\n (texture2D(normalMap, uv1)) +\n (texture2D(normalMap, uv2)) +\n (texture2D(normalMap, uv3));\n\n // average and scale to between -1 and 1\n return ((noise / 4.0) - 0.5) * 2.0;\n}\n"}),define("Cesium/Shaders/Builtin/Functions/getWgs84EllipsoidEC",[],function(){"use strict";return"/**\n * Returns the WGS84 ellipsoid, with its center at the origin of world coordinates, in eye coordinates.\n *\n * @name czm_getWgs84EllipsoidEC\n * @glslFunction\n *\n * @returns {czm_ellipsoid} The WGS84 ellipsoid, with its center at the origin of world coordinates, in eye coordinates.\n *\n * @see Ellipsoid.WGS84\n *\n * @example\n * czm_ellipsoid ellipsoid = czm_getWgs84EllipsoidEC();\n */\nczm_ellipsoid czm_getWgs84EllipsoidEC()\n{\n vec3 radii = vec3(6378137.0, 6378137.0, 6356752.314245);\n vec3 inverseRadii = vec3(1.0 / radii.x, 1.0 / radii.y, 1.0 / radii.z);\n vec3 inverseRadiiSquared = inverseRadii * inverseRadii;\n czm_ellipsoid temp = czm_ellipsoid(czm_view[3].xyz, radii, inverseRadii, inverseRadiiSquared);\n return temp;\n}\n"}),define("Cesium/Shaders/Builtin/Functions/hue",[],function(){"use strict";return"/**\n * Adjusts the hue of a color.\n * \n * @name czm_hue\n * @glslFunction\n * \n * @param {vec3} rgb The color.\n * @param {float} adjustment The amount to adjust the hue of the color in radians.\n *\n * @returns {float} The color with the hue adjusted.\n *\n * @example\n * vec3 adjustHue = czm_hue(color, czm_pi); // The same as czm_hue(color, -czm_pi)\n */\nvec3 czm_hue(vec3 rgb, float adjustment)\n{\n const mat3 toYIQ = mat3(0.299, 0.587, 0.114,\n 0.595716, -0.274453, -0.321263,\n 0.211456, -0.522591, 0.311135);\n const mat3 toRGB = mat3(1.0, 0.9563, 0.6210,\n 1.0, -0.2721, -0.6474,\n 1.0, -1.107, 1.7046);\n \n vec3 yiq = toYIQ * rgb;\n float hue = atan(yiq.z, yiq.y) + adjustment;\n float chroma = sqrt(yiq.z * yiq.z + yiq.y * yiq.y);\n \n vec3 color = vec3(yiq.x, chroma * cos(hue), chroma * sin(hue));\n return toRGB * color;\n}\n"}),define("Cesium/Shaders/Builtin/Functions/isEmpty",[],function(){"use strict";return"/**\n * Determines if a time interval is empty.\n *\n * @name czm_isEmpty\n * @glslFunction \n * \n * @param {czm_raySegment} interval The interval to test.\n * \n * @returns {bool} true if the time interval is empty; otherwise, false.\n *\n * @example\n * bool b0 = czm_isEmpty(czm_emptyRaySegment); // true\n * bool b1 = czm_isEmpty(czm_raySegment(0.0, 1.0)); // false\n * bool b2 = czm_isEmpty(czm_raySegment(1.0, 1.0)); // false, contains 1.0.\n */\nbool czm_isEmpty(czm_raySegment interval)\n{\n return (interval.stop < 0.0);\n}\n"}),define("Cesium/Shaders/Builtin/Functions/isFull",[],function(){"use strict";return"/**\n * Determines if a time interval is empty.\n *\n * @name czm_isFull\n * @glslFunction \n * \n * @param {czm_raySegment} interval The interval to test.\n * \n * @returns {bool} true if the time interval is empty; otherwise, false.\n *\n * @example\n * bool b0 = czm_isEmpty(czm_emptyRaySegment); // true\n * bool b1 = czm_isEmpty(czm_raySegment(0.0, 1.0)); // false\n * bool b2 = czm_isEmpty(czm_raySegment(1.0, 1.0)); // false, contains 1.0.\n */\nbool czm_isFull(czm_raySegment interval)\n{\n return (interval.start == 0.0 && interval.stop == czm_infinity);\n}\n"}),define("Cesium/Shaders/Builtin/Functions/latitudeToWebMercatorFraction",[],function(){"use strict";return"/**\n * Computes the fraction of a Web Wercator rectangle at which a given geodetic latitude is located.\n *\n * @name czm_latitudeToWebMercatorFraction\n * @glslFunction\n *\n * @param {float} latitude The geodetic latitude, in radians.\n * @param {float} southMercatorY The Web Mercator coordinate of the southern boundary of the rectangle.\n * @param {float} oneOverMercatorHeight The total height of the rectangle in Web Mercator coordinates.\n *\n * @returns {float} The fraction of the rectangle at which the latitude occurs. If the latitude is the southern\n * boundary of the rectangle, the return value will be zero. If it is the northern boundary, the return\n * value will be 1.0. Latitudes in between are mapped according to the Web Mercator projection.\n */ \nfloat czm_latitudeToWebMercatorFraction(float latitude, float southMercatorY, float oneOverMercatorHeight)\n{\n float sinLatitude = sin(latitude);\n float mercatorY = 0.5 * log((1.0 + sinLatitude) / (1.0 - sinLatitude));\n \n return (mercatorY - southMercatorY) * oneOverMercatorHeight;\n}\n"}),define("Cesium/Shaders/Builtin/Functions/luminance",[],function(){"use strict";return"/**\n * Computes the luminance of a color. \n *\n * @name czm_luminance\n * @glslFunction\n *\n * @param {vec3} rgb The color.\n * \n * @returns {float} The luminance.\n *\n * @example\n * float light = czm_luminance(vec3(0.0)); // 0.0\n * float dark = czm_luminance(vec3(1.0)); // ~1.0 \n */\nfloat czm_luminance(vec3 rgb)\n{\n // Algorithm from Chapter 10 of Graphics Shaders.\n const vec3 W = vec3(0.2125, 0.7154, 0.0721);\n return dot(rgb, W);\n}\n"}),define("Cesium/Shaders/Builtin/Functions/metersPerPixel",[],function(){"use strict";return"/**\n * Computes the size of a pixel in meters at a distance from the eye.\n \n * @name czm_metersPerPixel\n * @glslFunction\n *\n * @param {vec3} positionEC The position to get the meters per pixel in eye coordinates.\n *\n * @returns {float} The meters per pixel at positionEC.\n */\nfloat czm_metersPerPixel(vec4 positionEC)\n{\n float width = czm_viewport.z;\n float height = czm_viewport.w;\n float pixelWidth;\n float pixelHeight;\n \n float top = czm_frustumPlanes.x;\n float bottom = czm_frustumPlanes.y;\n float left = czm_frustumPlanes.z;\n float right = czm_frustumPlanes.w;\n \n if (czm_sceneMode == czm_sceneMode2D)\n {\n float frustumWidth = right - left;\n float frustumHeight = top - bottom;\n pixelWidth = frustumWidth / width;\n pixelHeight = frustumHeight / height;\n }\n else\n {\n float distanceToPixel = -positionEC.z;\n float inverseNear = 1.0 / czm_currentFrustum.x;\n float tanTheta = top * inverseNear;\n pixelHeight = 2.0 * distanceToPixel * tanTheta / height;\n tanTheta = right * inverseNear;\n pixelWidth = 2.0 * distanceToPixel * tanTheta / width;\n }\n\n return max(pixelWidth, pixelHeight);\n}\n"}),define("Cesium/Shaders/Builtin/Functions/modelToWindowCoordinates",[],function(){"use strict";return"/**\n * Transforms a position from model to window coordinates. The transformation\n * from model to clip coordinates is done using {@link czm_modelViewProjection}.\n * The transform from normalized device coordinates to window coordinates is\n * done using {@link czm_viewportTransformation}, which assumes a depth range\n * of near = 0 and far = 1.\n *

\n * This transform is useful when there is a need to manipulate window coordinates\n * in a vertex shader as done by {@link BillboardCollection}.\n *

\n * This function should not be confused with {@link czm_viewportOrthographic},\n * which is an orthographic projection matrix that transforms from window \n * coordinates to clip coordinates.\n *\n * @name czm_modelToWindowCoordinates\n * @glslFunction\n *\n * @param {vec4} position The position in model coordinates to transform.\n *\n * @returns {vec4} The transformed position in window coordinates.\n *\n * @see czm_eyeToWindowCoordinates\n * @see czm_modelViewProjection\n * @see czm_viewportTransformation\n * @see czm_viewportOrthographic\n * @see BillboardCollection\n *\n * @example\n * vec4 positionWC = czm_modelToWindowCoordinates(positionMC);\n */\nvec4 czm_modelToWindowCoordinates(vec4 position)\n{\n vec4 q = czm_modelViewProjection * position; // clip coordinates\n q.xyz /= q.w; // normalized device coordinates\n q.xyz = (czm_viewportTransformation * vec4(q.xyz, 1.0)).xyz; // window coordinates\n return q;\n}\n"}),define("Cesium/Shaders/Builtin/Functions/multiplyWithColorBalance",[],function(){"use strict";return"/**\n * DOC_TBA\n *\n * @name czm_multiplyWithColorBalance\n * @glslFunction\n */\nvec3 czm_multiplyWithColorBalance(vec3 left, vec3 right)\n{\n // Algorithm from Chapter 10 of Graphics Shaders.\n const vec3 W = vec3(0.2125, 0.7154, 0.0721);\n \n vec3 target = left * right;\n float leftLuminance = dot(left, W);\n float rightLuminance = dot(right, W);\n float targetLuminance = dot(target, W);\n \n return ((leftLuminance + rightLuminance) / (2.0 * targetLuminance)) * target;\n}\n"}),define("Cesium/Shaders/Builtin/Functions/nearFarScalar",[],function(){"use strict";return"/**\n * Computes a value that scales with distance. The scaling is clamped at the near and\n * far distances, and does not extrapolate. This function works with the\n * {@link NearFarScalar} JavaScript class.\n *\n * @name czm_nearFarScalar\n * @glslFunction\n *\n * @param {vec4} nearFarScalar A vector with 4 components: Near distance (x), Near value (y), Far distance (z), Far value (w).\n * @param {float} cameraDistSq The square of the current distance from the camera.\n *\n * @returns {float} The value at this distance.\n */\nfloat czm_nearFarScalar(vec4 nearFarScalar, float cameraDistSq)\n{\n float valueAtMin = nearFarScalar.y;\n float valueAtMax = nearFarScalar.w;\n float nearDistanceSq = nearFarScalar.x * nearFarScalar.x;\n float farDistanceSq = nearFarScalar.z * nearFarScalar.z;\n\n float t = (cameraDistSq - nearDistanceSq) / (farDistanceSq - nearDistanceSq);\n\n t = pow(clamp(t, 0.0, 1.0), 0.2);\n\n return mix(valueAtMin, valueAtMax, t);\n}\n"}),define("Cesium/Shaders/Builtin/Functions/octDecode",[],function(){"use strict";return"/**\n * Decodes a unit-length vector in 'oct' encoding to a normalized 3-component Cartesian vector.\n * The 'oct' encoding is described in \"A Survey of Efficient Representations of Independent Unit Vectors\",\n * Cigolle et al 2014: http://jcgt.org/published/0003/02/01/\n * \n * @name czm_octDecode\n * @param {vec2} encoded The oct-encoded, unit-length vector\n * @returns {vec3} The decoded and normalized vector\n */\n vec3 czm_octDecode(vec2 encoded)\n {\n encoded = encoded / 255.0 * 2.0 - 1.0;\n vec3 v = vec3(encoded.x, encoded.y, 1.0 - abs(encoded.x) - abs(encoded.y));\n if (v.z < 0.0)\n {\n v.xy = (1.0 - abs(v.yx)) * czm_signNotZero(v.xy);\n }\n \n return normalize(v);\n }\n\n /**\n * Decodes a unit-length vector in 'oct' encoding packed into a floating-point number to a normalized 3-component Cartesian vector.\n * The 'oct' encoding is described in \"A Survey of Efficient Representations of Independent Unit Vectors\",\n * Cigolle et al 2014: http://jcgt.org/published/0003/02/01/\n * \n * @name czm_octDecode\n * @param {float} encoded The oct-encoded, unit-length vector\n * @returns {vec3} The decoded and normalized vector\n */\n vec3 czm_octDecode(float encoded)\n {\n float temp = encoded / 256.0;\n float x = floor(temp);\n float y = (temp - x) * 256.0;\n return czm_octDecode(vec2(x, y));\n }\n \n/**\n * Decodes three unit-length vectors in 'oct' encoding packed into two floating-point numbers to normalized 3-component Cartesian vectors.\n * The 'oct' encoding is described in \"A Survey of Efficient Representations of Independent Unit Vectors\",\n * Cigolle et al 2014: http://jcgt.org/published/0003/02/01/\n * \n * @name czm_octDecode\n * @param {vec2} encoded The packed oct-encoded, unit-length vectors.\n * @param {vec3} vector1 One decoded and normalized vector.\n * @param {vec3} vector2 One decoded and normalized vector.\n * @param {vec3} vector3 One decoded and normalized vector.\n */\n void czm_octDecode(vec2 encoded, out vec3 vector1, out vec3 vector2, out vec3 vector3)\n {\n float temp = encoded.x / 65536.0;\n float x = floor(temp);\n float encodedFloat1 = (temp - x) * 65536.0;\n\n temp = encoded.y / 65536.0;\n float y = floor(temp);\n float encodedFloat2 = (temp - y) * 65536.0;\n\n vector1 = czm_octDecode(encodedFloat1);\n vector2 = czm_octDecode(encodedFloat2);\n vector3 = czm_octDecode(vec2(x, y));\n }\n "}),define("Cesium/Shaders/Builtin/Functions/packDepth",[],function(){"use strict";return"/**\n * Packs a depth value into a vec3 that can be represented by unsigned bytes.\n *\n * @name czm_packDepth\n * @glslFunction\n *\n * @param {float} depth The floating-point depth.\n * @returns {vec3} The packed depth.\n */\nvec4 czm_packDepth(float depth)\n{\n // See Aras Pranckevičius' post Encoding Floats to RGBA\n // http://aras-p.info/blog/2009/07/30/encoding-floats-to-rgba-the-final/\n vec4 enc = vec4(1.0, 255.0, 65025.0, 160581375.0) * depth;\n enc = fract(enc);\n enc -= enc.yzww * vec4(1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0, 0.0);\n return enc;\n}\n"}),define("Cesium/Shaders/Builtin/Functions/phong",[],function(){"use strict";return"float czm_private_getLambertDiffuseOfMaterial(vec3 lightDirectionEC, czm_material material)\n{\n return czm_getLambertDiffuse(lightDirectionEC, material.normal);\n}\n\nfloat czm_private_getSpecularOfMaterial(vec3 lightDirectionEC, vec3 toEyeEC, czm_material material)\n{\n return czm_getSpecular(lightDirectionEC, toEyeEC, material.normal, material.shininess);\n}\n\n/**\n * Computes a color using the Phong lighting model.\n *\n * @name czm_phong\n * @glslFunction\n *\n * @param {vec3} toEye A normalized vector from the fragment to the eye in eye coordinates.\n * @param {czm_material} material The fragment's material.\n * \n * @returns {vec4} The computed color.\n * \n * @example\n * vec3 positionToEyeEC = // ...\n * czm_material material = // ...\n * gl_FragColor = czm_phong(normalize(positionToEyeEC), material);\n *\n * @see czm_getMaterial\n */\nvec4 czm_phong(vec3 toEye, czm_material material)\n{\n // Diffuse from directional light sources at eye (for top-down)\n float diffuse = czm_private_getLambertDiffuseOfMaterial(vec3(0.0, 0.0, 1.0), material);\n if (czm_sceneMode == czm_sceneMode3D) {\n // (and horizon views in 3D)\n diffuse += czm_private_getLambertDiffuseOfMaterial(vec3(0.0, 1.0, 0.0), material);\n }\n\n // Specular from sun and pseudo-moon\n float specular = czm_private_getSpecularOfMaterial(czm_sunDirectionEC, toEye, material) + czm_private_getSpecularOfMaterial(czm_moonDirectionEC, toEye, material);\n\n // Temporary workaround for adding ambient.\n vec3 materialDiffuse = material.diffuse * 0.5;\n \n vec3 ambient = materialDiffuse;\n vec3 color = ambient + material.emission;\n color += materialDiffuse * diffuse;\n color += material.specular * specular;\n\n return vec4(color, material.alpha);\n}\n\nvec4 czm_private_phong(vec3 toEye, czm_material material)\n{\n float diffuse = czm_private_getLambertDiffuseOfMaterial(czm_sunDirectionEC, material);\n float specular = czm_private_getSpecularOfMaterial(czm_sunDirectionEC, toEye, material);\n\n vec3 ambient = vec3(0.0);\n vec3 color = ambient + material.emission;\n color += material.diffuse * diffuse;\n color += material.specular * specular;\n\n return vec4(color, material.alpha);\n}"}),define("Cesium/Shaders/Builtin/Functions/pointAlongRay",[],function(){"use strict";return"/**\n * Computes the point along a ray at the given time. time can be positive, negative, or zero.\n *\n * @name czm_pointAlongRay\n * @glslFunction\n *\n * @param {czm_ray} ray The ray to compute the point along.\n * @param {float} time The time along the ray.\n * \n * @returns {vec3} The point along the ray at the given time.\n * \n * @example\n * czm_ray ray = czm_ray(vec3(0.0), vec3(1.0, 0.0, 0.0)); // origin, direction\n * vec3 v = czm_pointAlongRay(ray, 2.0); // (2.0, 0.0, 0.0)\n */\nvec3 czm_pointAlongRay(czm_ray ray, float time)\n{\n return ray.origin + (time * ray.direction);\n}\n"}),define("Cesium/Shaders/Builtin/Functions/rayEllipsoidIntersectionInterval",[],function(){"use strict";return"/**\n * DOC_TBA\n *\n * @name czm_rayEllipsoidIntersectionInterval\n * @glslFunction\n */\nczm_raySegment czm_rayEllipsoidIntersectionInterval(czm_ray ray, czm_ellipsoid ellipsoid)\n{\n // ray and ellipsoid center in eye coordinates. radii in model coordinates.\n vec3 q = ellipsoid.inverseRadii * (czm_inverseModelView * vec4(ray.origin, 1.0)).xyz;\n vec3 w = ellipsoid.inverseRadii * (czm_inverseModelView * vec4(ray.direction, 0.0)).xyz;\n \n q = q - ellipsoid.inverseRadii * (czm_inverseModelView * vec4(ellipsoid.center, 1.0)).xyz;\n \n float q2 = dot(q, q);\n float qw = dot(q, w);\n \n if (q2 > 1.0) // Outside ellipsoid.\n {\n if (qw >= 0.0) // Looking outward or tangent (0 intersections).\n {\n return czm_emptyRaySegment;\n }\n else // qw < 0.0.\n {\n float qw2 = qw * qw;\n float difference = q2 - 1.0; // Positively valued.\n float w2 = dot(w, w);\n float product = w2 * difference;\n \n if (qw2 < product) // Imaginary roots (0 intersections).\n {\n return czm_emptyRaySegment; \n } \n else if (qw2 > product) // Distinct roots (2 intersections).\n {\n float discriminant = qw * qw - product;\n float temp = -qw + sqrt(discriminant); // Avoid cancellation.\n float root0 = temp / w2;\n float root1 = difference / temp;\n if (root0 < root1)\n {\n czm_raySegment i = czm_raySegment(root0, root1);\n return i;\n }\n else\n {\n czm_raySegment i = czm_raySegment(root1, root0);\n return i;\n }\n }\n else // qw2 == product. Repeated roots (2 intersections).\n {\n float root = sqrt(difference / w2);\n czm_raySegment i = czm_raySegment(root, root);\n return i;\n }\n }\n }\n else if (q2 < 1.0) // Inside ellipsoid (2 intersections).\n {\n float difference = q2 - 1.0; // Negatively valued.\n float w2 = dot(w, w);\n float product = w2 * difference; // Negatively valued.\n float discriminant = qw * qw - product;\n float temp = -qw + sqrt(discriminant); // Positively valued.\n czm_raySegment i = czm_raySegment(0.0, temp / w2);\n return i;\n }\n else // q2 == 1.0. On ellipsoid.\n {\n if (qw < 0.0) // Looking inward.\n {\n float w2 = dot(w, w);\n czm_raySegment i = czm_raySegment(0.0, -qw / w2);\n return i;\n }\n else // qw >= 0.0. Looking outward or tangent.\n {\n return czm_emptyRaySegment;\n }\n }\n}\n"}),define("Cesium/Shaders/Builtin/Functions/RGBToXYZ",[],function(){"use strict";return"/**\n * Converts an RGB color to CIE Yxy.\n *

The conversion is described in\n * {@link http://content.gpwiki.org/index.php/D3DBook:High-Dynamic_Range_Rendering#Luminance_Transform|Luminance Transform}\n *

\n * \n * @name czm_RGBToXYZ\n * @glslFunction\n * \n * @param {vec3} rgb The color in RGB.\n *\n * @returns {vec3} The color in CIE Yxy.\n *\n * @example\n * vec3 xyz = czm_RGBToXYZ(rgb);\n * xyz.x = max(xyz.x - luminanceThreshold, 0.0);\n * rgb = czm_XYZToRGB(xyz);\n */\nvec3 czm_RGBToXYZ(vec3 rgb)\n{\n const mat3 RGB2XYZ = mat3(0.4124, 0.2126, 0.0193,\n 0.3576, 0.7152, 0.1192,\n 0.1805, 0.0722, 0.9505);\n vec3 xyz = RGB2XYZ * rgb;\n vec3 Yxy;\n Yxy.r = xyz.g;\n float temp = dot(vec3(1.0), xyz);\n Yxy.gb = xyz.rg / temp;\n return Yxy;\n}\n"}),define("Cesium/Shaders/Builtin/Functions/saturation",[],function(){"use strict";return"/**\n * Adjusts the saturation of a color.\n * \n * @name czm_saturation\n * @glslFunction\n * \n * @param {vec3} rgb The color.\n * @param {float} adjustment The amount to adjust the saturation of the color.\n *\n * @returns {float} The color with the saturation adjusted.\n *\n * @example\n * vec3 greyScale = czm_saturation(color, 0.0);\n * vec3 doubleSaturation = czm_saturation(color, 2.0);\n */\nvec3 czm_saturation(vec3 rgb, float adjustment)\n{\n // Algorithm from Chapter 16 of OpenGL Shading Language\n const vec3 W = vec3(0.2125, 0.7154, 0.0721);\n vec3 intensity = vec3(dot(rgb, W));\n return mix(intensity, rgb, adjustment);\n}\n"}),define("Cesium/Shaders/Builtin/Functions/shadowDepthCompare",[],function(){"use strict";return"\nfloat czm_sampleShadowMap(samplerCube shadowMap, vec3 d)\n{\n return czm_unpackDepth(textureCube(shadowMap, d));\n}\n\nfloat czm_sampleShadowMap(sampler2D shadowMap, vec2 uv)\n{\n#ifdef USE_SHADOW_DEPTH_TEXTURE\n return texture2D(shadowMap, uv).r;\n#else\n return czm_unpackDepth(texture2D(shadowMap, uv));\n#endif\n}\n\nfloat czm_shadowDepthCompare(samplerCube shadowMap, vec3 uv, float depth)\n{\n return step(depth, czm_sampleShadowMap(shadowMap, uv));\n}\n\nfloat czm_shadowDepthCompare(sampler2D shadowMap, vec2 uv, float depth)\n{\n return step(depth, czm_sampleShadowMap(shadowMap, uv));\n}"}),define("Cesium/Shaders/Builtin/Functions/shadowVisibility",[],function(){"use strict";return"\nfloat czm_private_shadowVisibility(float visibility, float nDotL, float normalShadingSmooth, float darkness)\n{\n#ifdef USE_NORMAL_SHADING\n#ifdef USE_NORMAL_SHADING_SMOOTH\n float strength = clamp(nDotL / normalShadingSmooth, 0.0, 1.0);\n#else\n float strength = step(0.0, nDotL);\n#endif\n visibility *= strength;\n#endif\n\n visibility = max(visibility, darkness);\n return visibility;\n}\n\n#ifdef USE_CUBE_MAP_SHADOW\nfloat czm_shadowVisibility(samplerCube shadowMap, czm_shadowParameters shadowParameters)\n{\n float depthBias = shadowParameters.depthBias;\n float depth = shadowParameters.depth;\n float nDotL = shadowParameters.nDotL;\n float normalShadingSmooth = shadowParameters.normalShadingSmooth;\n float darkness = shadowParameters.darkness;\n vec3 uvw = shadowParameters.texCoords;\n\n depth -= depthBias;\n float visibility = czm_shadowDepthCompare(shadowMap, uvw, depth);\n return czm_private_shadowVisibility(visibility, nDotL, normalShadingSmooth, darkness);\n}\n#else\nfloat czm_shadowVisibility(sampler2D shadowMap, czm_shadowParameters shadowParameters)\n{\n float depthBias = shadowParameters.depthBias;\n float depth = shadowParameters.depth;\n float nDotL = shadowParameters.nDotL;\n float normalShadingSmooth = shadowParameters.normalShadingSmooth;\n float darkness = shadowParameters.darkness;\n vec2 uv = shadowParameters.texCoords;\n\n depth -= depthBias;\n#ifdef USE_SOFT_SHADOWS\n vec2 texelStepSize = shadowParameters.texelStepSize;\n float radius = 1.0;\n float dx0 = -texelStepSize.x * radius;\n float dy0 = -texelStepSize.y * radius;\n float dx1 = texelStepSize.x * radius;\n float dy1 = texelStepSize.y * radius;\n float visibility = (\n czm_shadowDepthCompare(shadowMap, uv, depth) +\n czm_shadowDepthCompare(shadowMap, uv + vec2(dx0, dy0), depth) +\n czm_shadowDepthCompare(shadowMap, uv + vec2(0.0, dy0), depth) +\n czm_shadowDepthCompare(shadowMap, uv + vec2(dx1, dy0), depth) +\n czm_shadowDepthCompare(shadowMap, uv + vec2(dx0, 0.0), depth) +\n czm_shadowDepthCompare(shadowMap, uv + vec2(dx1, 0.0), depth) +\n czm_shadowDepthCompare(shadowMap, uv + vec2(dx0, dy1), depth) +\n czm_shadowDepthCompare(shadowMap, uv + vec2(0.0, dy1), depth) +\n czm_shadowDepthCompare(shadowMap, uv + vec2(dx1, dy1), depth)\n ) * (1.0 / 9.0);\n#else\n float visibility = czm_shadowDepthCompare(shadowMap, uv, depth);\n#endif\n\n return czm_private_shadowVisibility(visibility, nDotL, normalShadingSmooth, darkness);\n}\n#endif\n"; +}),define("Cesium/Shaders/Builtin/Functions/signNotZero",[],function(){"use strict";return"/**\n * Returns 1.0 if the given value is positive or zero, and -1.0 if it is negative. This is similar to the GLSL\n * built-in function sign except that returns 1.0 instead of 0.0 when the input value is 0.0.\n * \n * @name czm_signNotZero\n * @glslFunction\n *\n * @param {} value The value for which to determine the sign.\n * @returns {} 1.0 if the value is positive or zero, -1.0 if the value is negative.\n */\nfloat czm_signNotZero(float value)\n{\n return value >= 0.0 ? 1.0 : -1.0;\n}\n\nvec2 czm_signNotZero(vec2 value)\n{\n return vec2(czm_signNotZero(value.x), czm_signNotZero(value.y));\n}\n\nvec3 czm_signNotZero(vec3 value)\n{\n return vec3(czm_signNotZero(value.x), czm_signNotZero(value.y), czm_signNotZero(value.z));\n}\n\nvec4 czm_signNotZero(vec4 value)\n{\n return vec4(czm_signNotZero(value.x), czm_signNotZero(value.y), czm_signNotZero(value.z), czm_signNotZero(value.w));\n}"}),define("Cesium/Shaders/Builtin/Functions/tangentToEyeSpaceMatrix",[],function(){"use strict";return"/**\n * Creates a matrix that transforms vectors from tangent space to eye space.\n *\n * @name czm_tangentToEyeSpaceMatrix\n * @glslFunction\n * \n * @param {vec3} normalEC The normal vector in eye coordinates.\n * @param {vec3} tangentEC The tangent vector in eye coordinates.\n * @param {vec3} binormalEC The binormal vector in eye coordinates.\n *\n * @returns {mat3} The matrix that transforms from tangent space to eye space.\n *\n * @example\n * mat3 tangentToEye = czm_tangentToEyeSpaceMatrix(normalEC, tangentEC, binormalEC);\n * vec3 normal = tangentToEye * texture2D(normalMap, st).xyz;\n */\nmat3 czm_tangentToEyeSpaceMatrix(vec3 normalEC, vec3 tangentEC, vec3 binormalEC)\n{\n vec3 normal = normalize(normalEC);\n vec3 tangent = normalize(tangentEC);\n vec3 binormal = normalize(binormalEC);\n return mat3(tangent.x, tangent.y, tangent.z,\n binormal.x, binormal.y, binormal.z,\n normal.x, normal.y, normal.z);\n}\n"}),define("Cesium/Shaders/Builtin/Functions/translateRelativeToEye",[],function(){"use strict";return"/**\n * Translates a position (or any vec3) that was encoded with {@link EncodedCartesian3},\n * and then provided to the shader as separate high and low bits to\n * be relative to the eye. As shown in the example, the position can then be transformed in eye\n * or clip coordinates using {@link czm_modelViewRelativeToEye} or {@link czm_modelViewProjectionRelativeToEye},\n * respectively.\n *

\n * This technique, called GPU RTE, eliminates jittering artifacts when using large coordinates as\n * described in {@link http://blogs.agi.com/insight3d/index.php/2008/09/03/precisions-precisions/|Precisions, Precisions}.\n *

\n *\n * @name czm_translateRelativeToEye\n * @glslFunction\n *\n * @param {vec3} high The position's high bits.\n * @param {vec3} low The position's low bits.\n * @returns {vec3} The position translated to be relative to the camera's position.\n *\n * @example\n * attribute vec3 positionHigh;\n * attribute vec3 positionLow;\n * \n * void main() \n * {\n * vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);\n * gl_Position = czm_modelViewProjectionRelativeToEye * p;\n * }\n *\n * @see czm_modelViewRelativeToEye\n * @see czm_modelViewProjectionRelativeToEye\n * @see czm_computePosition\n * @see EncodedCartesian3\n */\nvec4 czm_translateRelativeToEye(vec3 high, vec3 low)\n{\n vec3 highDifference = high - czm_encodedCameraPositionMCHigh;\n vec3 lowDifference = low - czm_encodedCameraPositionMCLow;\n\n return vec4(highDifference + lowDifference, 1.0);\n}\n"}),define("Cesium/Shaders/Builtin/Functions/translucentPhong",[],function(){"use strict";return"/**\n * @private\n */\nvec4 czm_translucentPhong(vec3 toEye, czm_material material)\n{\n // Diffuse from directional light sources at eye (for top-down and horizon views)\n float diffuse = czm_getLambertDiffuse(vec3(0.0, 0.0, 1.0), material.normal);\n \n if (czm_sceneMode == czm_sceneMode3D) {\n // (and horizon views in 3D)\n diffuse += czm_getLambertDiffuse(vec3(0.0, 1.0, 0.0), material.normal);\n }\n \n diffuse = clamp(diffuse, 0.0, 1.0);\n\n // Specular from sun and pseudo-moon\n float specular = czm_getSpecular(czm_sunDirectionEC, toEye, material.normal, material.shininess);\n specular += czm_getSpecular(czm_moonDirectionEC, toEye, material.normal, material.shininess);\n\n // Temporary workaround for adding ambient.\n vec3 materialDiffuse = material.diffuse * 0.5;\n\n vec3 ambient = materialDiffuse;\n vec3 color = ambient + material.emission;\n color += materialDiffuse * diffuse;\n color += material.specular * specular;\n\n return vec4(color, material.alpha);\n}"}),define("Cesium/Shaders/Builtin/Functions/transpose",[],function(){"use strict";return"/**\n * Returns the transpose of the matrix. The input matrix can be \n * a mat2, mat3, or mat4.\n *\n * @name czm_transpose\n * @glslFunction\n *\n * @param {} matrix The matrix to transpose.\n *\n * @returns {} The transposed matrix.\n *\n * @example\n * // GLSL declarations\n * mat2 czm_transpose(mat2 matrix);\n * mat3 czm_transpose(mat3 matrix);\n * mat4 czm_transpose(mat4 matrix);\n *\n * // Tranpose a 3x3 rotation matrix to find its inverse.\n * mat3 eastNorthUpToEye = czm_eastNorthUpToEyeCoordinates(\n * positionMC, normalEC);\n * mat3 eyeToEastNorthUp = czm_transpose(eastNorthUpToEye);\n */\nmat2 czm_transpose(mat2 matrix)\n{\n return mat2(\n matrix[0][0], matrix[1][0],\n matrix[0][1], matrix[1][1]);\n}\n\nmat3 czm_transpose(mat3 matrix)\n{\n return mat3(\n matrix[0][0], matrix[1][0], matrix[2][0],\n matrix[0][1], matrix[1][1], matrix[2][1],\n matrix[0][2], matrix[1][2], matrix[2][2]);\n}\n\nmat4 czm_transpose(mat4 matrix)\n{\n return mat4(\n matrix[0][0], matrix[1][0], matrix[2][0], matrix[3][0],\n matrix[0][1], matrix[1][1], matrix[2][1], matrix[3][1],\n matrix[0][2], matrix[1][2], matrix[2][2], matrix[3][2],\n matrix[0][3], matrix[1][3], matrix[2][3], matrix[3][3]);\n}\n"}),define("Cesium/Shaders/Builtin/Functions/unpackDepth",[],function(){"use strict";return"/**\n * Unpacks a vec3 depth depth value to a float.\n *\n * @name czm_unpackDepth\n * @glslFunction\n *\n * @param {vec3} packedDepth The packed depth.\n *\n * @returns {float} The floating-point depth.\n */\n float czm_unpackDepth(vec4 packedDepth)\n {\n // See Aras Pranckevičius' post Encoding Floats to RGBA\n // http://aras-p.info/blog/2009/07/30/encoding-floats-to-rgba-the-final/\n return dot(packedDepth, vec4(1.0, 1.0 / 255.0, 1.0 / 65025.0, 1.0 / 160581375.0));\n }\n"}),define("Cesium/Shaders/Builtin/Functions/windowToEyeCoordinates",[],function(){"use strict";return"/**\n * Transforms a position from window to eye coordinates.\n * The transform from window to normalized device coordinates is done using components\n * of (@link czm_viewport} and {@link czm_viewportTransformation} instead of calculating\n * the inverse of czm_viewportTransformation. The transformation from \n * normalized device coordinates to clip coordinates is done using positionWC.w,\n * which is expected to be the scalar used in the perspective divide. The transformation\n * from clip to eye coordinates is done using {@link czm_inverseProjection}.\n *\n * @name czm_windowToEyeCoordinates\n * @glslFunction\n *\n * @param {vec4} fragmentCoordinate The position in window coordinates to transform.\n *\n * @returns {vec4} The transformed position in eye coordinates.\n *\n * @see czm_modelToWindowCoordinates\n * @see czm_eyeToWindowCoordinates\n * @see czm_inverseProjection\n * @see czm_viewport\n * @see czm_viewportTransformation\n *\n * @example\n * vec4 positionEC = czm_windowToEyeCoordinates(gl_FragCoord);\n */\nvec4 czm_windowToEyeCoordinates(vec4 fragmentCoordinate)\n{\n float x = 2.0 * (fragmentCoordinate.x - czm_viewport.x) / czm_viewport.z - 1.0;\n float y = 2.0 * (fragmentCoordinate.y - czm_viewport.y) / czm_viewport.w - 1.0;\n float z = (fragmentCoordinate.z - czm_viewportTransformation[3][2]) / czm_viewportTransformation[2][2];\n vec4 q = vec4(x, y, z, 1.0);\n q /= fragmentCoordinate.w;\n q = czm_inverseProjection * q;\n return q;\n}\n"}),define("Cesium/Shaders/Builtin/Functions/XYZToRGB",[],function(){"use strict";return"/**\n * Converts a CIE Yxy color to RGB.\n *

The conversion is described in\n * {@link http://content.gpwiki.org/index.php/D3DBook:High-Dynamic_Range_Rendering#Luminance_Transform|Luminance Transform}\n *

\n * \n * @name czm_XYZToRGB\n * @glslFunction\n * \n * @param {vec3} Yxy The color in CIE Yxy.\n *\n * @returns {vec3} The color in RGB.\n *\n * @example\n * vec3 xyz = czm_RGBToXYZ(rgb);\n * xyz.x = max(xyz.x - luminanceThreshold, 0.0);\n * rgb = czm_XYZToRGB(xyz);\n */\nvec3 czm_XYZToRGB(vec3 Yxy)\n{\n const mat3 XYZ2RGB = mat3( 3.2405, -0.9693, 0.0556,\n -1.5371, 1.8760, -0.2040,\n -0.4985, 0.0416, 1.0572);\n vec3 xyz;\n xyz.r = Yxy.r * Yxy.g / Yxy.b;\n xyz.g = Yxy.r;\n xyz.b = Yxy.r * (1.0 - Yxy.g - Yxy.b) / Yxy.b;\n \n return XYZ2RGB * xyz;\n}\n"}),define("Cesium/Shaders/Builtin/CzmBuiltins",["./Constants/degreesPerRadian","./Constants/depthRange","./Constants/epsilon1","./Constants/epsilon2","./Constants/epsilon3","./Constants/epsilon4","./Constants/epsilon5","./Constants/epsilon6","./Constants/epsilon7","./Constants/infinity","./Constants/oneOverPi","./Constants/oneOverTwoPi","./Constants/passCompute","./Constants/passEnvironment","./Constants/passGlobe","./Constants/passGround","./Constants/passOpaque","./Constants/passOverlay","./Constants/passTranslucent","./Constants/pi","./Constants/piOverFour","./Constants/piOverSix","./Constants/piOverThree","./Constants/piOverTwo","./Constants/radiansPerDegree","./Constants/sceneMode2D","./Constants/sceneMode3D","./Constants/sceneModeColumbusView","./Constants/sceneModeMorphing","./Constants/solarRadius","./Constants/threePiOver2","./Constants/twoPi","./Constants/webMercatorMaxLatitude","./Structs/depthRangeStruct","./Structs/ellipsoid","./Structs/material","./Structs/materialInput","./Structs/ray","./Structs/raySegment","./Structs/shadowParameters","./Functions/alphaWeight","./Functions/antialias","./Functions/cascadeColor","./Functions/cascadeDistance","./Functions/cascadeMatrix","./Functions/cascadeWeights","./Functions/columbusViewMorph","./Functions/computePosition","./Functions/cosineAndSine","./Functions/decompressTextureCoordinates","./Functions/eastNorthUpToEyeCoordinates","./Functions/ellipsoidContainsPoint","./Functions/ellipsoidNew","./Functions/ellipsoidWgs84TextureCoordinates","./Functions/equalsEpsilon","./Functions/eyeOffset","./Functions/eyeToWindowCoordinates","./Functions/fog","./Functions/geodeticSurfaceNormal","./Functions/getDefaultMaterial","./Functions/getLambertDiffuse","./Functions/getSpecular","./Functions/getWaterNoise","./Functions/getWgs84EllipsoidEC","./Functions/hue","./Functions/isEmpty","./Functions/isFull","./Functions/latitudeToWebMercatorFraction","./Functions/luminance","./Functions/metersPerPixel","./Functions/modelToWindowCoordinates","./Functions/multiplyWithColorBalance","./Functions/nearFarScalar","./Functions/octDecode","./Functions/packDepth","./Functions/phong","./Functions/pointAlongRay","./Functions/rayEllipsoidIntersectionInterval","./Functions/RGBToXYZ","./Functions/saturation","./Functions/shadowDepthCompare","./Functions/shadowVisibility","./Functions/signNotZero","./Functions/tangentToEyeSpaceMatrix","./Functions/translateRelativeToEye","./Functions/translucentPhong","./Functions/transpose","./Functions/unpackDepth","./Functions/windowToEyeCoordinates","./Functions/XYZToRGB"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g,v,_,y,C,w,E,b,S,T,x,A,P,M,D,I,R,O,L,N,F,k,B,z,V,U,G,W,H,q,j,Y,X,Z,K,J,Q,$,ee,te,ie,ne,re,oe,ae,se,le,ue,ce,he,de,pe,me,fe,ge,ve,_e,ye,Ce,we,Ee,be,Se,Te,xe,Ae,Pe,Me,De,Ie,Re,Oe,Le,Ne){"use strict";return{czm_degreesPerRadian:e,czm_depthRange:t,czm_epsilon1:i,czm_epsilon2:n,czm_epsilon3:r,czm_epsilon4:o,czm_epsilon5:a,czm_epsilon6:s,czm_epsilon7:l,czm_infinity:u,czm_oneOverPi:c,czm_oneOverTwoPi:h,czm_passCompute:d,czm_passEnvironment:p,czm_passGlobe:m,czm_passGround:f,czm_passOpaque:g,czm_passOverlay:v,czm_passTranslucent:_,czm_pi:y,czm_piOverFour:C,czm_piOverSix:w,czm_piOverThree:E,czm_piOverTwo:b,czm_radiansPerDegree:S,czm_sceneMode2D:T,czm_sceneMode3D:x,czm_sceneModeColumbusView:A,czm_sceneModeMorphing:P,czm_solarRadius:M,czm_threePiOver2:D,czm_twoPi:I,czm_webMercatorMaxLatitude:R,czm_depthRangeStruct:O,czm_ellipsoid:L,czm_material:N,czm_materialInput:F,czm_ray:k,czm_raySegment:B,czm_shadowParameters:z,czm_alphaWeight:V,czm_antialias:U,czm_cascadeColor:G,czm_cascadeDistance:W,czm_cascadeMatrix:H,czm_cascadeWeights:q,czm_columbusViewMorph:j,czm_computePosition:Y,czm_cosineAndSine:X,czm_decompressTextureCoordinates:Z,czm_eastNorthUpToEyeCoordinates:K,czm_ellipsoidContainsPoint:J,czm_ellipsoidNew:Q,czm_ellipsoidWgs84TextureCoordinates:$,czm_equalsEpsilon:ee,czm_eyeOffset:te,czm_eyeToWindowCoordinates:ie,czm_fog:ne,czm_geodeticSurfaceNormal:re,czm_getDefaultMaterial:oe,czm_getLambertDiffuse:ae,czm_getSpecular:se,czm_getWaterNoise:le,czm_getWgs84EllipsoidEC:ue,czm_hue:ce,czm_isEmpty:he,czm_isFull:de,czm_latitudeToWebMercatorFraction:pe,czm_luminance:me,czm_metersPerPixel:fe,czm_modelToWindowCoordinates:ge,czm_multiplyWithColorBalance:ve,czm_nearFarScalar:_e,czm_octDecode:ye,czm_packDepth:Ce,czm_phong:we,czm_pointAlongRay:Ee,czm_rayEllipsoidIntersectionInterval:be,czm_RGBToXYZ:Se,czm_saturation:Te,czm_shadowDepthCompare:xe,czm_shadowVisibility:Ae,czm_signNotZero:Pe,czm_tangentToEyeSpaceMatrix:Me,czm_translateRelativeToEye:De,czm_translucentPhong:Ie,czm_transpose:Re,czm_unpackDepth:Oe,czm_windowToEyeCoordinates:Le,czm_XYZToRGB:Ne}}),define("Cesium/Renderer/ShaderSource",["../Core/defaultValue","../Core/defined","../Core/DeveloperError","../Shaders/Builtin/CzmBuiltins","./AutomaticUniforms"],function(e,t,i,n,r){"use strict";function o(e){return e=e.replace(/\/\/.*/g,""),e.replace(/\/\*\*[\s\S]*?\*\//gm,function(e){for(var t=e.match(/\n/gm).length,i="",n=0;t>n;++n)i+="\n";return i})}function a(e,i,n){for(var r,a=0;a0;){var r=e.pop();n.push(r),0===r.requiredBy.length&&t.push(r)}for(;t.length>0;){var o=t.shift();e.push(o);for(var a=0;a=0;--r)n=n+t[r].glslSource+"\n";return n.replace(i.glslSource,"")}function c(e,n){var r,a,s="",l=e.sources;if(t(l))for(r=0,a=l.length;a>r;++r)s+="\n#line 0\n"+l[r];s=o(s);var c;s=s.replace(/#version\s+(.*?)\n/gm,function(e,n){if(t(c)&&c!==n)throw new i("inconsistent versions found: "+c+" and "+n);return c=n,"\n"}),s=s.replace(/precision\s(lowp|mediump|highp)\s(float|int);/,"");var d=e.pickColorQualifier;t(d)&&(s=h.createPickFragmentShaderSource(s,d));var p="";t(c)&&(p="#version "+c),n&&(p+="#ifdef GL_FRAGMENT_PRECISION_HIGH\n precision highp float;\n#else\n precision mediump float;\n#endif\n\n");var m=e.defines;if(t(m))for(r=0,a=m.length;a>r;++r){var f=m[r];0!==f.length&&(p+="#define "+f+"\n")}return e.includeBuiltIns&&(p+=u(s)),p+="\n#line 0\n",p+=s}function h(i){i=e(i,e.EMPTY_OBJECT);var n=i.pickColorQualifier;this.defines=t(i.defines)?i.defines.slice(0):[],this.sources=t(i.sources)?i.sources.slice(0):[],this.pickColorQualifier=n,this.includeBuiltIns=e(i.includeBuiltIns,!0)}h.prototype.clone=function(){return new h({sources:this.sources,defines:this.defines,pickColorQuantifier:this.pickColorQualifier,includeBuiltIns:this.includeBuiltIns})},h.replaceMain=function(e,t){return t="void "+t+"()",e.replace(/void\s+main\s*\(\s*(?:void)?\s*\)/g,t)},h.prototype.createCombinedVertexShader=function(){return c(this,!1)},h.prototype.createCombinedFragmentShader=function(){return c(this,!0)},h._czmBuiltinsAndUniforms={};for(var d in n)n.hasOwnProperty(d)&&(h._czmBuiltinsAndUniforms[d]=n[d]);for(var p in r)if(r.hasOwnProperty(p)){var m=r[p];"function"==typeof m.getDeclaration&&(h._czmBuiltinsAndUniforms[p]=m.getDeclaration(p))}h.createPickVertexShaderSource=function(e){var t=h.replaceMain(e,"czm_old_main"),i="attribute vec4 pickColor; \nvarying vec4 czm_pickColor; \nvoid main() \n{ \n czm_old_main(); \n czm_pickColor = pickColor; \n}";return t+"\n"+i},h.createPickFragmentShaderSource=function(e,t){var i=h.replaceMain(e,"czm_old_main"),n=t+" vec4 czm_pickColor; \nvoid main() \n{ \n czm_old_main(); \n if (gl_FragColor.a == 0.0) { \n discard; \n } \n gl_FragColor = czm_pickColor; \n}";return i+"\n"+n},h.findVarying=function(e,t){for(var i=e.sources,n=t.length,r=0;n>r;++r)for(var o=t[r],a=i.length,s=0;a>s;++s)if(-1!==i[s].indexOf(o))return o};var f=["v_normalEC","v_normal"];h.findNormalVarying=function(e){return h.findVarying(e,f)};var g=["v_positionEC"];return h.findPositionVarying=function(e){return h.findVarying(e,g)},h}),define("Cesium/Renderer/VertexArray",["../Core/ComponentDatatype","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/destroyObject","../Core/DeveloperError","../Core/Geometry","../Core/IndexDatatype","../Core/Math","../Core/RuntimeError","./Buffer","./BufferUsage","./ContextLimits"],function(e,t,i,n,r,o,a,s,l,u,c,h,d){"use strict";function p(n,r,o,a){var s=i(r.vertexBuffer),l=i(r.value),u=r.value?r.value.length:r.componentsPerAttribute,c={index:t(r.index,o),enabled:t(r.enabled,!0),vertexBuffer:r.vertexBuffer,value:l?r.value.slice(0):void 0,componentsPerAttribute:u,componentDatatype:t(r.componentDatatype,e.FLOAT),normalize:t(r.normalize,!1),offsetInBytes:t(r.offsetInBytes,0),strideInBytes:t(r.strideInBytes,0),instanceDivisor:t(r.instanceDivisor,0)};if(s)c.vertexAttrib=function(e){var t=this.index;e.bindBuffer(e.ARRAY_BUFFER,this.vertexBuffer._getBuffer()),e.vertexAttribPointer(t,this.componentsPerAttribute,this.componentDatatype,this.normalize,this.strideInBytes,this.offsetInBytes),e.enableVertexAttribArray(t),this.instanceDivisor>0&&(a.glVertexAttribDivisor(t,this.instanceDivisor),a._vertexAttribDivisors[t]=this.instanceDivisor,a._previousDrawInstanced=!0)},c.disableVertexAttribArray=function(e){e.disableVertexAttribArray(this.index),this.instanceDivisor>0&&a.glVertexAttribDivisor(o,0)};else{switch(c.componentsPerAttribute){case 1:c.vertexAttrib=function(e){e.vertexAttrib1fv(this.index,this.value)};break;case 2:c.vertexAttrib=function(e){e.vertexAttrib2fv(this.index,this.value)};break;case 3:c.vertexAttrib=function(e){e.vertexAttrib3fv(this.index,this.value)};break;case 4:c.vertexAttrib=function(e){e.vertexAttrib4fv(this.index,this.value)}}c.disableVertexAttribArray=function(e){}}n.push(c)}function m(e,t,n){for(var r=0;rr;++r)p(u,s[r],r,o);for(d=u.length,r=0;d>r;++r){var f=u[r];if(i(f.vertexBuffer)&&0===f.instanceDivisor){var g=f.strideInBytes||f.componentsPerAttribute*e.getSizeInBytes(f.componentDatatype);c=f.vertexBuffer.sizeInBytes/g;break}}for(r=0;d>r;++r)if(u[r].instanceDivisor>0){h=!0;break}var v;o.vertexArrayObject&&(v=o.glCreateVertexArray(),o.glBindVertexArray(v),m(a,u,l),o.glBindVertexArray(null)),this._numberOfVertices=c,this._hasInstancedAttributes=h,this._context=o,this._gl=a,this._vao=v,this._attributes=u,this._indexBuffer=l}function g(e){return e.values.length/e.componentsPerAttribute}function v(t){return e.getSizeInBytes(t.componentDatatype)*t.componentsPerAttribute}function _(t){var n,r,o,a=[];for(r in t)t.hasOwnProperty(r)&&i(t[r])&&i(t[r].values)&&(a.push(r),t[r].componentDatatype===e.DOUBLE&&(t[r].componentDatatype=e.FLOAT,t[r].values=e.createTypedArray(e.FLOAT,t[r].values)));var s,l=a.length;if(l>0)for(s=g(t[a[0]]),n=1;l>n;++n){var c=g(t[a[n]]);if(c!==s)throw new u("Each attribute list must have the same number of vertices. Attribute "+a[n]+" has a different number of vertices ("+c.toString()+") than attribute "+a[0]+" ("+s.toString()+").")}a.sort(function(i,n){return e.getSizeInBytes(t[n].componentDatatype)-e.getSizeInBytes(t[i].componentDatatype)});var h=0,d={};for(n=0;l>n;++n)r=a[n],o=t[r],d[r]=h,h+=v(o);if(h>0){var p=e.getSizeInBytes(t[a[0]].componentDatatype),m=h%p;0!==m&&(h+=p-m);var f=s*h,_=new ArrayBuffer(f),y={};for(n=0;l>n;++n){r=a[n];var C=e.getSizeInBytes(t[r].componentDatatype);y[r]={pointer:e.createTypedArray(t[r].componentDatatype,_),index:d[r]/C,strideInComponentType:h/C}}for(n=0;s>n;++n)for(var w=0;l>w;++w){r=a[w],o=t[r];for(var E=o.values,b=y[r],S=b.pointer,T=o.componentsPerAttribute,x=0;T>x;++x)S[b.index+x]=E[n*T+x];b.index+=b.strideInComponentType}return{buffer:_,offsetsInBytes:d,vertexSizeInBytes:h}}}function y(e){var t=e._context,i=e._hasInstancedAttributes;if(i||t._previousDrawInstanced){t._previousDrawInstanced=i;var n,r=t._vertexAttribDivisors,o=e._attributes,a=d.maximumVertexAttributes;if(i){var s=o.length;for(n=0;s>n;++n){var l=o[n];if(l.enabled){var u=l.instanceDivisor,c=l.index;u!==r[c]&&(t.glVertexAttribDivisor(c,u),r[c]=u)}}}else for(n=0;a>n;++n)r[n]>0&&(t.glVertexAttribDivisor(n,0),r[n]=0)}}return f.fromGeometry=function(n){n=t(n,t.EMPTY_OBJECT);var r,o,u,d=n.context,p=t(n.geometry,t.EMPTY_OBJECT),m=t(n.bufferUsage,h.DYNAMIC_DRAW),g=t(n.attributeLocations,t.EMPTY_OBJECT),v=t(n.interleave,!1),y=n.vertexArrayAttributes,C=i(y)?y:[],w=p.attributes;if(v){var E=_(w);if(i(E)){u=c.createVertexBuffer({context:d,typedArray:E.buffer,usage:m});var b=E.offsetsInBytes,S=E.vertexSizeInBytes;for(r in w)w.hasOwnProperty(r)&&i(w[r])&&(o=w[r],i(o.values)?C.push({index:g[r],vertexBuffer:u,componentDatatype:o.componentDatatype,componentsPerAttribute:o.componentsPerAttribute,normalize:o.normalize,offsetInBytes:b[r],strideInBytes:S}):C.push({index:g[r],value:o.value,componentDatatype:o.componentDatatype,normalize:o.normalize}))}}else for(r in w)if(w.hasOwnProperty(r)&&i(w[r])){o=w[r];var T=o.componentDatatype;T===e.DOUBLE&&(T=e.FLOAT),u=void 0,i(o.values)&&(u=c.createVertexBuffer({context:d,typedArray:e.createTypedArray(T,o.values),usage:m})),C.push({index:g[r],vertexBuffer:u,value:o.value,componentDatatype:T,componentsPerAttribute:o.componentsPerAttribute,normalize:o.normalize})}var x,A=p.indices;return i(A)&&(x=a.computeNumberOfVertices(p)>=l.SIXTY_FOUR_KILOBYTES&&d.elementIndexUint?c.createIndexBuffer({context:d,typedArray:new Uint32Array(A),usage:m,indexDatatype:s.UNSIGNED_INT}):c.createIndexBuffer({context:d,typedArray:new Uint16Array(A),usage:m,indexDatatype:s.UNSIGNED_SHORT})),new f({context:d,attributes:C,indexBuffer:x})},n(f.prototype,{numberOfAttributes:{get:function(){return this._attributes.length}},numberOfVertices:{get:function(){return this._numberOfVertices}},indexBuffer:{get:function(){return this._indexBuffer}}}),f.prototype.getAttribute=function(e){return this._attributes[e]},f.prototype._bind=function(){i(this._vao)?(this._context.glBindVertexArray(this._vao),this._context.instancedArrays&&y(this)):m(this._gl,this._attributes,this._indexBuffer)},f.prototype._unBind=function(){if(i(this._vao))this._context.glBindVertexArray(null);else{for(var e=this._attributes,t=this._gl,n=0;nf;++f){var g=l[f];g.vertexBuffer?d.push(g):(h=g.usage,c=p[h],i(c)||(c=p[h]=[]),c.push(g))}this._allBuffers=[];for(h in p)if(p.hasOwnProperty(h)){c=p[h],c.sort(s);var v=u._vertexSizeInBytes(c),_=c[0].usage,y={vertexSizeInBytes:v,vertexBuffer:void 0,usage:_,needsCommit:!1,arrayBuffer:void 0,arrayViews:u._createArrayViews(c,v)};this._allBuffers.push(y)}this._size=0,this._instanced=t(a,!1),this._precreated=d,this._context=n,this.writers=void 0,this.va=void 0,this.resize(o)}function c(e,t){if(t.needsCommit&&t.vertexSizeInBytes>0){t.needsCommit=!1;var n=t.vertexBuffer,r=e._size*t.vertexSizeInBytes,o=i(n);if(!o||n.sizeInBytes0){var n=e.vertexSizeInBytes*t,r=e.vertexSizeInBytes*i;e.vertexBuffer.copyFromArrayView(new Uint8Array(e.arrayBuffer,n,r),n)}}function d(e){var t=e.va;if(i(t)){for(var n=t.length,r=0;n>r;++r)t[r].va.destroy();e.va=void 0}}u._verifyAttributes=function(i){for(var n=[],o=0;or;++r){var o=t[r];i+=o.componentsPerAttribute*e.getSizeInBytes(o.componentDatatype)}var a=n>0?e.getSizeInBytes(t[0].componentDatatype):0,s=a>0?i%a:0,l=0===s?0:a-s;return i+=l},u._createArrayViews=function(t,i){for(var n=[],r=0,o=t.length,a=0;o>a;++a){var s=t[a],l=s.componentDatatype;n.push({index:s.index,enabled:s.enabled,componentsPerAttribute:s.componentsPerAttribute,componentDatatype:l,normalize:s.normalize,offsetInBytes:r,vertexSizeInComponentType:i/e.getSizeInBytes(l),view:void 0}),r+=s.componentsPerAttribute*e.getSizeInBytes(l)}return n},u.prototype.resize=function(e){this._size=e;var t=this._allBuffers;this.writers=[];for(var i=0,n=t.length;n>i;++i){var r=t[i];u._resize(r,this._size),u._appendWriters(this.writers,r)}d(this)},u._resize=function(t,n){if(t.vertexSizeInBytes>0){var r=new ArrayBuffer(n*t.vertexSizeInBytes);if(i(t.arrayBuffer))for(var o=new Uint8Array(r),a=new Uint8Array(t.arrayBuffer),s=a.length,l=0;s>l;++l)o[l]=a[l];for(var u=t.arrayViews,c=u.length,h=0;c>h;++h){var d=u[h];d.view=e.createArrayBufferView(d.componentDatatype,r,d.offsetInBytes)}t.arrayBuffer=r}};var p=[function(e,t,i){return function(n,r){t[n*i]=r,e.needsCommit=!0}},function(e,t,i){return function(n,r,o){var a=n*i;t[a]=r,t[a+1]=o,e.needsCommit=!0}},function(e,t,i){return function(n,r,o,a){var s=n*i;t[s]=r,t[s+1]=o,t[s+2]=a,e.needsCommit=!0}},function(e,t,i){return function(n,r,o,a,s){var l=n*i;t[l]=r,t[l+1]=o,t[l+2]=a,t[l+3]=s,e.needsCommit=!0}}];return u._appendWriters=function(e,t){for(var i=t.arrayViews,n=i.length,r=0;n>r;++r){var o=i[r];e[o.index]=p[o.componentsPerAttribute-1](t,o.view,o.vertexSizeInComponentType)}},u.prototype.commit=function(e){var t,n,r,a=!1,s=this._allBuffers;for(n=0,r=s.length;r>n;++n)t=s[n],a=c(this,t)||a;if(a||!i(this.va)){d(this);for(var h=this.va=[],p=i(e)?Math.ceil(this._size/(o.SIXTY_FOUR_KILOBYTES-1)):1,m=0;p>m;++m){var f=[];for(n=0,r=s.length;r>n;++n){t=s[n];var g=m*(t.vertexSizeInBytes*(o.SIXTY_FOUR_KILOBYTES-1));u._appendAttributes(f,t,g,this._instanced)}f=f.concat(this._precreated),h.push({va:new l({context:this._context,attributes:f,indexBuffer:e}),indicesCount:1.5*(m!==p-1?o.SIXTY_FOUR_KILOBYTES-1:this._size%(o.SIXTY_FOUR_KILOBYTES-1))})}}},u._appendAttributes=function(e,t,i,n){for(var r=t.arrayViews,o=r.length,a=0;o>a;++a){var s=r[a];e.push({index:s.index,enabled:s.enabled,componentsPerAttribute:s.componentsPerAttribute,componentDatatype:s.componentDatatype,normalize:s.normalize,vertexBuffer:t.vertexBuffer,offsetInBytes:i+s.offsetInBytes,strideInBytes:t.vertexSizeInBytes,instanceDivisor:n?1:0})}},u.prototype.subCommit=function(e,t){for(var i=this._allBuffers,n=0,r=i.length;r>n;++n)h(i[n],e,t)},u.prototype.endSubCommits=function(){for(var e=this._allBuffers,t=0,i=e.length;i>t;++t)e[t].needsCommit=!1},u.prototype.isDestroyed=function(){return!1},u.prototype.destroy=function(){for(var e=this._allBuffers,t=0,i=e.length;i>t;++t){var r=e[t];r.vertexBuffer=r.vertexBuffer&&r.vertexBuffer.destroy()}return d(this),n(this)},u}),define("Cesium/Shaders/BillboardCollectionFS",[],function(){"use strict";return"uniform sampler2D u_atlas;\n\nvarying vec2 v_textureCoordinates;\n\n#ifdef RENDER_FOR_PICK\nvarying vec4 v_pickColor;\n#else\nvarying vec4 v_color;\n#endif\n\nvoid main()\n{\n#ifdef RENDER_FOR_PICK\n vec4 vertexColor = vec4(1.0, 1.0, 1.0, 1.0);\n#else\n vec4 vertexColor = v_color;\n#endif\n \n vec4 color = texture2D(u_atlas, v_textureCoordinates) * vertexColor;\n if (color.a == 0.0)\n {\n discard;\n }\n \n#ifdef RENDER_FOR_PICK\n gl_FragColor = v_pickColor;\n#else\n gl_FragColor = color;\n#endif\n}"}),define("Cesium/Shaders/BillboardCollectionVS",[],function(){"use strict";return"#ifdef INSTANCED\nattribute vec2 direction;\n#endif\nattribute vec4 positionHighAndScale;\nattribute vec4 positionLowAndRotation; \nattribute vec4 compressedAttribute0; // pixel offset, translate, horizontal origin, vertical origin, show, direction, texture coordinates (texture offset)\nattribute vec4 compressedAttribute1; // aligned axis, translucency by distance, image width\nattribute vec4 compressedAttribute2; // image height, color, pick color, size in meters, valid aligned axis, 13 bits free\nattribute vec4 eyeOffset; // eye offset in meters, 4 bytes free (texture range)\nattribute vec4 scaleByDistance; // near, nearScale, far, farScale\nattribute vec4 pixelOffsetScaleByDistance; // near, nearScale, far, farScale\n\nvarying vec2 v_textureCoordinates;\n\n#ifdef RENDER_FOR_PICK\nvarying vec4 v_pickColor;\n#else\nvarying vec4 v_color;\n#endif\n\nconst float UPPER_BOUND = 32768.0;\n\nconst float SHIFT_LEFT16 = 65536.0;\nconst float SHIFT_LEFT8 = 256.0;\nconst float SHIFT_LEFT7 = 128.0;\nconst float SHIFT_LEFT5 = 32.0;\nconst float SHIFT_LEFT3 = 8.0;\nconst float SHIFT_LEFT2 = 4.0;\nconst float SHIFT_LEFT1 = 2.0;\n\nconst float SHIFT_RIGHT8 = 1.0 / 256.0;\nconst float SHIFT_RIGHT7 = 1.0 / 128.0;\nconst float SHIFT_RIGHT5 = 1.0 / 32.0;\nconst float SHIFT_RIGHT3 = 1.0 / 8.0;\nconst float SHIFT_RIGHT2 = 1.0 / 4.0;\nconst float SHIFT_RIGHT1 = 1.0 / 2.0;\n\nvec4 computePositionWindowCoordinates(vec4 positionEC, vec2 imageSize, float scale, vec2 direction, vec2 origin, vec2 translate, vec2 pixelOffset, vec3 alignedAxis, bool validAlignedAxis, float rotation, bool sizeInMeters)\n{\n vec2 halfSize = imageSize * scale * czm_resolutionScale;\n halfSize *= ((direction * 2.0) - 1.0);\n \n if (sizeInMeters)\n {\n positionEC.xy += halfSize;\n }\n \n vec4 positionWC = czm_eyeToWindowCoordinates(positionEC);\n \n if (sizeInMeters)\n {\n positionWC.xy += (origin * abs(halfSize)) / czm_metersPerPixel(positionEC);\n }\n else\n {\n positionWC.xy += (origin * abs(halfSize));\n }\n \n#if defined(ROTATION) || defined(ALIGNED_AXIS)\n if (validAlignedAxis || rotation != 0.0)\n {\n float angle = rotation;\n if (validAlignedAxis)\n {\n vec3 pos = positionEC.xyz + czm_encodedCameraPositionMCHigh + czm_encodedCameraPositionMCLow;\n vec3 normal = normalize(cross(alignedAxis, pos));\n vec4 tangent = vec4(normalize(cross(pos, normal)), 0.0);\n tangent = czm_modelViewProjection * tangent;\n angle += sign(-tangent.x) * acos(tangent.y / length(tangent.xy));\n }\n \n float cosTheta = cos(angle);\n float sinTheta = sin(angle);\n mat2 rotationMatrix = mat2(cosTheta, sinTheta, -sinTheta, cosTheta);\n halfSize = rotationMatrix * halfSize;\n }\n#endif\n \n if (!sizeInMeters)\n {\n positionWC.xy += halfSize;\n }\n \n positionWC.xy += translate;\n positionWC.xy += (pixelOffset * czm_resolutionScale);\n \n return positionWC;\n}\n\nvoid main() \n{\n // Modifying this shader may also require modifications to Billboard._computeScreenSpacePosition\n \n // unpack attributes\n vec3 positionHigh = positionHighAndScale.xyz;\n vec3 positionLow = positionLowAndRotation.xyz;\n float scale = positionHighAndScale.w;\n \n#if defined(ROTATION) || defined(ALIGNED_AXIS)\n float rotation = positionLowAndRotation.w;\n#else\n float rotation = 0.0;\n#endif\n\n float compressed = compressedAttribute0.x;\n \n vec2 pixelOffset;\n pixelOffset.x = floor(compressed * SHIFT_RIGHT7);\n compressed -= pixelOffset.x * SHIFT_LEFT7;\n pixelOffset.x -= UPPER_BOUND;\n \n vec2 origin;\n origin.x = floor(compressed * SHIFT_RIGHT5);\n compressed -= origin.x * SHIFT_LEFT5;\n \n origin.y = floor(compressed * SHIFT_RIGHT3);\n compressed -= origin.y * SHIFT_LEFT3;\n \n origin -= vec2(1.0);\n \n float show = floor(compressed * SHIFT_RIGHT2);\n compressed -= show * SHIFT_LEFT2;\n\n#ifdef INSTANCED\n vec2 textureCoordinatesBottomLeft = czm_decompressTextureCoordinates(compressedAttribute0.w);\n vec2 textureCoordinatesRange = czm_decompressTextureCoordinates(eyeOffset.w);\n vec2 textureCoordinates = textureCoordinatesBottomLeft + direction * textureCoordinatesRange;\n#else\n vec2 direction;\n direction.x = floor(compressed * SHIFT_RIGHT1);\n direction.y = compressed - direction.x * SHIFT_LEFT1;\n\n vec2 textureCoordinates = czm_decompressTextureCoordinates(compressedAttribute0.w);\n#endif\n \n float temp = compressedAttribute0.y * SHIFT_RIGHT8;\n pixelOffset.y = -(floor(temp) - UPPER_BOUND);\n \n vec2 translate;\n translate.y = (temp - floor(temp)) * SHIFT_LEFT16;\n \n temp = compressedAttribute0.z * SHIFT_RIGHT8;\n translate.x = floor(temp) - UPPER_BOUND;\n \n translate.y += (temp - floor(temp)) * SHIFT_LEFT8;\n translate.y -= UPPER_BOUND;\n\n temp = compressedAttribute1.x * SHIFT_RIGHT8;\n \n vec2 imageSize = vec2(floor(temp), compressedAttribute2.w);\n \n#ifdef EYE_DISTANCE_TRANSLUCENCY\n vec4 translucencyByDistance;\n translucencyByDistance.x = compressedAttribute1.z;\n translucencyByDistance.z = compressedAttribute1.w;\n \n translucencyByDistance.y = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;\n \n temp = compressedAttribute1.y * SHIFT_RIGHT8;\n translucencyByDistance.w = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;\n#endif\n\n#ifdef ALIGNED_AXIS\n vec3 alignedAxis = czm_octDecode(floor(compressedAttribute1.y * SHIFT_RIGHT8));\n temp = compressedAttribute2.z * SHIFT_RIGHT5;\n bool validAlignedAxis = (temp - floor(temp)) * SHIFT_LEFT1 > 0.0;\n#else\n vec3 alignedAxis = vec3(0.0);\n bool validAlignedAxis = false;\n#endif\n \n#ifdef RENDER_FOR_PICK\n temp = compressedAttribute2.y;\n#else\n temp = compressedAttribute2.x;\n#endif\n\n vec4 color;\n temp = temp * SHIFT_RIGHT8;\n color.b = (temp - floor(temp)) * SHIFT_LEFT8;\n temp = floor(temp) * SHIFT_RIGHT8;\n color.g = (temp - floor(temp)) * SHIFT_LEFT8;\n color.r = floor(temp);\n \n temp = compressedAttribute2.z * SHIFT_RIGHT8;\n bool sizeInMeters = floor((temp - floor(temp)) * SHIFT_LEFT7) > 0.0;\n temp = floor(temp) * SHIFT_RIGHT8;\n \n#ifdef RENDER_FOR_PICK\n color.a = (temp - floor(temp)) * SHIFT_LEFT8;\n vec4 pickColor = color / 255.0;\n#else\n color.a = floor(temp);\n color /= 255.0;\n#endif\n \n ///////////////////////////////////////////////////////////////////////////\n \n vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);\n vec4 positionEC = czm_modelViewRelativeToEye * p;\n positionEC = czm_eyeOffset(positionEC, eyeOffset.xyz);\n positionEC.xyz *= show;\n \n /////////////////////////////////////////////////////////////////////////// \n\n#if defined(EYE_DISTANCE_SCALING) || defined(EYE_DISTANCE_TRANSLUCENCY) || defined(EYE_DISTANCE_PIXEL_OFFSET)\n float lengthSq;\n if (czm_sceneMode == czm_sceneMode2D)\n {\n // 2D camera distance is a special case\n // treat all billboards as flattened to the z=0.0 plane\n lengthSq = czm_eyeHeight2D.y;\n }\n else\n {\n lengthSq = dot(positionEC.xyz, positionEC.xyz);\n }\n#endif\n\n#ifdef EYE_DISTANCE_SCALING\n scale *= czm_nearFarScalar(scaleByDistance, lengthSq);\n // push vertex behind near plane for clipping\n if (scale == 0.0)\n {\n positionEC.xyz = vec3(0.0);\n }\n#endif\n\n float translucency = 1.0;\n#ifdef EYE_DISTANCE_TRANSLUCENCY\n translucency = czm_nearFarScalar(translucencyByDistance, lengthSq);\n // push vertex behind near plane for clipping\n if (translucency == 0.0)\n {\n positionEC.xyz = vec3(0.0);\n }\n#endif\n\n#ifdef EYE_DISTANCE_PIXEL_OFFSET\n float pixelOffsetScale = czm_nearFarScalar(pixelOffsetScaleByDistance, lengthSq);\n pixelOffset *= pixelOffsetScale;\n#endif\n\n vec4 positionWC = computePositionWindowCoordinates(positionEC, imageSize, scale, direction, origin, translate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters);\n gl_Position = czm_viewportOrthographic * vec4(positionWC.xy, -positionWC.z, 1.0);\n v_textureCoordinates = textureCoordinates;\n\n#ifdef RENDER_FOR_PICK\n v_pickColor = pickColor;\n#else\n v_color = color;\n v_color.a *= translucency;\n#endif\n}\n"; +}),define("Cesium/Scene/HeightReference",["../Core/freezeObject"],function(e){"use strict";var t={NONE:0,CLAMP_TO_GROUND:1,RELATIVE_TO_GROUND:2};return e(t)}),define("Cesium/Scene/HorizontalOrigin",["../Core/freezeObject"],function(e){"use strict";var t={CENTER:0,LEFT:1,RIGHT:-1};return e(t)}),define("Cesium/Scene/SceneMode",["../Core/freezeObject"],function(e){"use strict";var t={MORPHING:0,COLUMBUS_VIEW:1,SCENE2D:2,SCENE3D:3};return t.getMorphTime=function(e){if(e===t.SCENE3D)return 1;if(e!==t.MORPHING)return 0},e(t)}),define("Cesium/Scene/SceneTransforms",["../Core/BoundingRectangle","../Core/Cartesian2","../Core/Cartesian3","../Core/Cartesian4","../Core/Cartographic","../Core/defined","../Core/DeveloperError","../Core/Math","../Core/Matrix4","../Core/Transforms","./SceneMode"],function(e,t,i,n,r,o,a,s,l,u,c){"use strict";function h(e,t,r,o){var a=r.viewMatrix,s=l.multiplyByVector(a,n.fromElements(e.x,e.y,e.z,1,_),_),u=i.multiplyComponents(t,i.normalize(s,y),y);return s.x+=t.x+u.x,s.y+=t.y+u.y,s.z+=u.z,l.multiplyByVector(r.frustum.projectionMatrix,s,o)}var d={},p=new n(0,0,0,1),m=new n,f=new e,g=new t,v=new t;d.wgs84ToWindowCoordinates=function(e,t,n){return d.wgs84WithEyeOffsetToWindowCoordinates(e,t,i.ZERO,n)};var _=new n,y=new i,C=new r(Math.PI,s.PI_OVER_TWO),w=new i,E=new i;d.wgs84WithEyeOffsetToWindowCoordinates=function(e,n,r,a){var _=e.frameState,y=d.computeActualWgs84Position(_,n,p);if(o(y)){var b=e.canvas,S=f;S.x=0,S.y=0,S.width=b.clientWidth,S.height=b.clientHeight;var T=e.camera,x=!1;if(_.mode===c.SCENE2D){var A=e.mapProjection,P=C,M=A.project(P,w),D=i.clone(T.position,E),I=T.frustum.clone(),R=l.computeViewportTransformation(S,0,1,new l),O=T.frustum.projectionMatrix,L=T.positionWC.y,N=i.fromElements(s.sign(L)*M.x-L,0,-T.positionWC.x),F=u.pointToGLWindowCoordinates(O,R,N);if(0===L||F.x<=0||F.x>=b.clientWidth)x=!0;else{if(F.x>.5*b.clientWidth){S.width=F.x,T.frustum.right=M.x-L,m=h(y,r,T,m),d.clipToGLWindowCoordinates(S,m,g),S.x+=F.x,T.position.x=-T.position.x;var k=T.frustum.right;T.frustum.right=-T.frustum.left,T.frustum.left=-k,m=h(y,r,T,m),d.clipToGLWindowCoordinates(S,m,v)}else{S.x+=F.x,S.width-=F.x,T.frustum.left=-M.x-L,m=h(y,r,T,m),d.clipToGLWindowCoordinates(S,m,g),S.x=S.x-S.width,T.position.x=-T.position.x;var B=T.frustum.left;T.frustum.left=-T.frustum.right,T.frustum.right=-B,m=h(y,r,T,m),d.clipToGLWindowCoordinates(S,m,v)}i.clone(D,T.position),T.frustum=I.clone(),a=t.clone(g,a),(a.x<0||a.x>b.clientWidth)&&(a.x=v.x)}}if(_.mode!==c.SCENE2D||x){if(m=h(y,r,T,m),m.z<0&&_.mode!==c.SCENE2D)return;a=d.clipToGLWindowCoordinates(S,m,a)}return a.y=b.clientHeight-a.y,a}},d.wgs84ToDrawingBufferCoordinates=function(e,t,i){return i=d.wgs84ToWindowCoordinates(e,t,i),o(i)?d.transformWindowToDrawingBuffer(e,i,i):void 0};var b=new i,S=new r;d.computeActualWgs84Position=function(e,t,n){var r=e.mode;if(r===c.SCENE3D)return i.clone(t,n);var a=e.mapProjection,l=a.ellipsoid.cartesianToCartographic(t,S);if(o(l)){if(a.project(l,b),r===c.COLUMBUS_VIEW)return i.fromElements(b.z,b.x,b.y,n);if(r===c.SCENE2D)return i.fromElements(0,b.x,b.y,n);var u=e.morphTime;return i.fromElements(s.lerp(b.z,t.x,u),s.lerp(b.x,t.y,u),s.lerp(b.y,t.z,u),n)}};var T=new i,x=new i,A=new l;d.clipToGLWindowCoordinates=function(e,n,r){return i.divideByScalar(n,n.w,T),l.computeViewportTransformation(e,0,1,A),l.multiplyByPoint(A,T,x),t.fromCartesian3(x,r)},d.clipToDrawingBufferCoordinates=function(e,n,r){return i.divideByScalar(n,n.w,T),l.computeViewportTransformation(e,0,1,A),l.multiplyByPoint(A,T,x),t.fromCartesian3(x,r)},d.transformWindowToDrawingBuffer=function(e,i,n){var r=e.canvas,o=e.drawingBufferWidth/r.clientWidth,a=e.drawingBufferHeight/r.clientHeight;return t.fromElements(i.x*o,i.y*a,n)};var P=new n,M=new n;return d.drawingBufferToWgs84Coordinates=function(e,t,r,o){var a=e.context,s=a.uniformState,u=e._passState.viewport,c=n.clone(n.UNIT_W,P);c.x=(t.x-u.x)/u.width*2-1,c.y=(t.y-u.y)/u.height*2-1,c.z=2*r-1,c.w=1;var h=l.multiplyByVector(s.inverseViewProjection,c,M),d=1/h.w;return i.multiplyByScalar(h,d,h),i.fromCartesian4(h,o)},d}),define("Cesium/Scene/VerticalOrigin",["../Core/freezeObject"],function(e){"use strict";var t={CENTER:0,BOTTOM:1,TOP:-1};return e(t)}),define("Cesium/Scene/Billboard",["../Core/BoundingRectangle","../Core/Cartesian2","../Core/Cartesian3","../Core/Cartesian4","../Core/Cartographic","../Core/Color","../Core/createGuid","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Matrix4","../Core/NearFarScalar","./HeightReference","./HorizontalOrigin","./SceneMode","./SceneTransforms","./VerticalOrigin"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g,v){"use strict";function _(e,n){e=s(e,s.EMPTY_OBJECT),this._show=s(e.show,!0),this._position=i.clone(s(e.position,i.ZERO)),this._actualPosition=i.clone(this._position),this._pixelOffset=t.clone(s(e.pixelOffset,t.ZERO)),this._translate=new t(0,0),this._eyeOffset=i.clone(s(e.eyeOffset,i.ZERO)),this._heightReference=s(e.heightReference,p.NONE),this._verticalOrigin=s(e.verticalOrigin,v.CENTER),this._horizontalOrigin=s(e.horizontalOrigin,m.CENTER),this._scale=s(e.scale,1),this._color=o.clone(s(e.color,o.WHITE)),this._rotation=s(e.rotation,0),this._alignedAxis=i.clone(s(e.alignedAxis,i.ZERO)),this._width=e.width,this._height=e.height,this._scaleByDistance=e.scaleByDistance,this._translucencyByDistance=e.translucencyByDistance,this._pixelOffsetScaleByDistance=e.pixelOffsetScaleByDistance,this._sizeInMeters=s(e.sizeInMeters,!1),this._id=e.id,this._collection=s(e.collection,n),this._pickId=void 0,this._pickPrimitive=s(e._pickPrimitive,this),this._billboardCollection=n,this._dirty=!1,this._index=-1,this._imageIndex=-1,this._imageIndexPromise=void 0,this._imageId=void 0,this._image=void 0,this._imageSubRegion=void 0,this._imageWidth=void 0,this._imageHeight=void 0;var r=e.image,u=e.imageId;l(r)&&(l(u)||(u="string"==typeof r?r:l(r.src)?r.src:a()),this._imageId=u,this._image=r),l(e.imageSubRegion)&&(this._imageId=u,this._imageSubRegion=e.imageSubRegion),l(this._billboardCollection._textureAtlas)&&this._loadImage(),this._actualClampedPosition=void 0,this._removeCallbackFunc=void 0,this._mode=f.SCENE3D,this._updateClamping()}function y(e,t){var i=e._billboardCollection;l(i)&&(i._updateBillboard(e,t),e._dirty=!0)}var C=_.SHOW_INDEX=0,w=_.POSITION_INDEX=1,E=_.PIXEL_OFFSET_INDEX=2,b=_.EYE_OFFSET_INDEX=3,S=_.HORIZONTAL_ORIGIN_INDEX=4,T=_.VERTICAL_ORIGIN_INDEX=5,x=_.SCALE_INDEX=6,A=_.IMAGE_INDEX_INDEX=7,P=_.COLOR_INDEX=8,M=_.ROTATION_INDEX=9,D=_.ALIGNED_AXIS_INDEX=10,I=_.SCALE_BY_DISTANCE_INDEX=11,R=_.TRANSLUCENCY_BY_DISTANCE_INDEX=12,O=_.PIXEL_OFFSET_SCALE_BY_DISTANCE_INDEX=13;_.NUMBER_OF_PROPERTIES=14,u(_.prototype,{show:{get:function(){return this._show},set:function(e){this._show!==e&&(this._show=e,y(this,C))}},position:{get:function(){return this._position},set:function(e){var t=this._position;i.equals(t,e)||(i.clone(e,t),i.clone(e,this._actualPosition),this._updateClamping(),y(this,w))}},heightReference:{get:function(){return this._heightReference},set:function(e){var t=this._heightReference;e!==t&&(this._heightReference=e,this._updateClamping(),y(this,w))}},pixelOffset:{get:function(){return this._pixelOffset},set:function(e){var i=this._pixelOffset;t.equals(i,e)||(t.clone(e,i),y(this,E))}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){var t=this._scaleByDistance;d.equals(t,e)||(this._scaleByDistance=d.clone(e,t),y(this,I))}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){var t=this._translucencyByDistance;d.equals(t,e)||(this._translucencyByDistance=d.clone(e,t),y(this,R))}},pixelOffsetScaleByDistance:{get:function(){return this._pixelOffsetScaleByDistance},set:function(e){var t=this._pixelOffsetScaleByDistance;d.equals(t,e)||(this._pixelOffsetScaleByDistance=d.clone(e,t),y(this,O))}},eyeOffset:{get:function(){return this._eyeOffset},set:function(e){var t=this._eyeOffset;i.equals(t,e)||(i.clone(e,t),y(this,b))}},horizontalOrigin:{get:function(){return this._horizontalOrigin},set:function(e){this._horizontalOrigin!==e&&(this._horizontalOrigin=e,y(this,S))}},verticalOrigin:{get:function(){return this._verticalOrigin},set:function(e){this._verticalOrigin!==e&&(this._verticalOrigin=e,y(this,T))}},scale:{get:function(){return this._scale},set:function(e){this._scale!==e&&(this._scale=e,y(this,x))}},color:{get:function(){return this._color},set:function(e){var t=this._color;o.equals(t,e)||(o.clone(e,t),y(this,P))}},rotation:{get:function(){return this._rotation},set:function(e){this._rotation!==e&&(this._rotation=e,y(this,M))}},alignedAxis:{get:function(){return this._alignedAxis},set:function(e){var t=this._alignedAxis;i.equals(t,e)||(i.clone(e,t),y(this,D))}},width:{get:function(){return s(this._width,this._imageWidth)},set:function(e){this._width!==e&&(this._width=e,y(this,A))}},height:{get:function(){return s(this._height,this._imageHeight)},set:function(e){this._height!==e&&(this._height=e,y(this,A))}},sizeInMeters:{get:function(){return this._sizeInMeters},set:function(e){this._sizeInMeters!==e&&(this._sizeInMeters=e,y(this,P))}},id:{get:function(){return this._id},set:function(e){this._id=e,l(this._pickId)&&(this._pickId.object.id=e)}},pickPrimitive:{get:function(){return this._pickPrimitive},set:function(e){this._pickPrimitive=e,l(this._pickId)&&(this._pickId.object.primitive=e)}},image:{get:function(){return this._imageId},set:function(e){l(e)?"string"==typeof e?this.setImage(e,e):l(e.src)?this.setImage(e.src,e):this.setImage(a(),e):(this._imageIndex=-1,this._imageSubRegion=void 0,this._imageId=void 0,this._image=void 0,this._imageIndexPromise=void 0,y(this,A))}},ready:{get:function(){return-1!==this._imageIndex}},_clampedPosition:{get:function(){return this._actualClampedPosition},set:function(e){this._actualClampedPosition=i.clone(e,this._actualClampedPosition),y(this,w)}}}),_.prototype.getPickId=function(e){return l(this._pickId)||(this._pickId=e.createPickId({primitive:this._pickPrimitive,collection:this._collection,id:this._id})),this._pickId},_.prototype._updateClamping=function(){_._updateClamping(this._billboardCollection,this)};var L=new r,N=new i;_._updateClamping=function(e,t){function n(e){if(t._heightReference===p.RELATIVE_TO_GROUND)if(t._mode===f.SCENE3D){var n=s.cartesianToCartographic(e,L);n.height+=d.height,s.cartographicToCartesian(n,e)}else e.x+=d.height;t._clampedPosition=i.clone(e,t._clampedPosition)}var o=e._scene;if(l(o)){var a=o.globe,s=a.ellipsoid,u=a._surface,c=o.frameState.mode,h=c!==t._mode;if(t._mode=c,(t._heightReference===p.NONE||h)&&l(t._removeCallbackFunc)&&(t._removeCallbackFunc(),t._removeCallbackFunc=void 0,t._clampedPosition=void 0),t._heightReference!==p.NONE&&l(t._position)){var d=s.cartesianToCartographic(t._position);if(l(d)){l(t._removeCallbackFunc)&&t._removeCallbackFunc(),t._removeCallbackFunc=u.updateHeight(d,n),r.clone(d,L);var m=a.getHeight(d);l(m)&&(L.height=m),s.cartographicToCartesian(L,N),n(N)}}}},_.prototype._loadImage=function(){var t,i=this._billboardCollection._textureAtlas,n=this._imageId,r=this._image,o=this._imageSubRegion;if(l(r)&&(t=i.addImage(n,r)),l(o)&&(t=i.addSubRegion(n,o)),this._imageIndexPromise=t,l(t)){var a=this;t.then(function(t){if(a._imageId===n&&a._image===r&&e.equals(a._imageSubRegion,o)){var s=i.textureCoordinates[t];a._imageWidth=i.texture.width*s.width,a._imageHeight=i.texture.height*s.height,a._imageIndex=t,a._ready=!0,a._image=void 0,a._imageIndexPromise=void 0,y(a,A)}}).otherwise(function(e){console.error("Error loading image for billboard: "+e),a._imageIndexPromise=void 0})}},_.prototype.setImage=function(e,t){this._imageId!==e&&(this._imageIndex=-1,this._imageSubRegion=void 0,this._imageId=e,this._image=t,l(this._billboardCollection._textureAtlas)&&this._loadImage())},_.prototype.setImageSubRegion=function(t,i){this._imageId===t&&e.equals(this._imageSubRegion,i)||(this._imageIndex=-1,this._imageId=t,this._imageSubRegion=e.clone(i),l(this._billboardCollection._textureAtlas)&&this._loadImage())},_.prototype._setTranslate=function(e){var i=this._translate;t.equals(i,e)||(t.clone(e,i),y(this,E))},_.prototype._getActualPosition=function(){return l(this._clampedPosition)?this._clampedPosition:this._actualPosition},_.prototype._setActualPosition=function(e){l(this._clampedPosition)||i.clone(e,this._actualPosition),y(this,w)};var F=new n;_._computeActualPosition=function(e,t,i,n){return l(e._clampedPosition)?(i.mode!==e._mode&&e._updateClamping(),e._clampedPosition):i.mode===f.SCENE3D?t:(h.multiplyByPoint(n,t,F),g.computeActualWgs84Position(i,F))};var k=new t,B=new i,z=new t;_._computeScreenSpacePosition=function(e,i,n,r,o,a){var s=h.multiplyByPoint(e,i,B),l=g.wgs84WithEyeOffsetToWindowCoordinates(o,s,n,a);r=t.clone(r,z);var u=t.multiplyByScalar(r,o.context.uniformState.resolutionScale,k);return l.x+=u.x,l.y+=u.y,l};var V=new t(0,0);return _.prototype.computeScreenSpacePosition=function(e,i){var n=this._billboardCollection;l(i)||(i=new t),t.clone(this._pixelOffset,V),t.add(V,this._translate,V);var r=n.modelMatrix,o=this._getActualPosition(),a=_._computeScreenSpacePosition(r,o,this._eyeOffset,V,e,i);return a},_.prototype.equals=function(n){return this===n||l(n)&&this._id===n._id&&i.equals(this._position,n._position)&&this._imageId===n._imageId&&this._show===n._show&&this._scale===n._scale&&this._verticalOrigin===n._verticalOrigin&&this._horizontalOrigin===n._horizontalOrigin&&this._heightReference===n._heightReference&&e.equals(this._imageSubRegion,n._imageSubRegion)&&o.equals(this._color,n._color)&&t.equals(this._pixelOffset,n._pixelOffset)&&t.equals(this._translate,n._translate)&&i.equals(this._eyeOffset,n._eyeOffset)&&d.equals(this._scaleByDistance,n._scaleByDistance)&&d.equals(this._translucencyByDistance,n._translucencyByDistance)&&d.equals(this._pixelOffsetScaleByDistance,n._pixelOffsetScaleByDistance)},_.prototype._destroy=function(){l(this._customData)&&(this._billboardCollection._scene.globe._surface.removeTileCustomData(this._customData),this._customData=void 0),l(this._removeCallbackFunc)&&(this._removeCallbackFunc(),this._removeCallbackFunc=void 0),this.image=void 0,this._pickId=this._pickId&&this._pickId.destroy(),this._billboardCollection=void 0},_}),define("Cesium/Scene/BlendEquation",["../Core/freezeObject","../Renderer/WebGLConstants"],function(e,t){"use strict";var i={ADD:t.FUNC_ADD,SUBTRACT:t.FUNC_SUBTRACT,REVERSE_SUBTRACT:t.FUNC_REVERSE_SUBTRACT};return e(i)}),define("Cesium/Scene/BlendFunction",["../Core/freezeObject","../Renderer/WebGLConstants"],function(e,t){"use strict";var i={ZERO:t.ZERO,ONE:t.ONE,SOURCE_COLOR:t.SRC_COLOR,ONE_MINUS_SOURCE_COLOR:t.ONE_MINUS_SRC_COLOR,DESTINATION_COLOR:t.DST_COLOR,ONE_MINUS_DESTINATION_COLOR:t.ONE_MINUS_DST_COLOR,SOURCE_ALPHA:t.SRC_ALPHA,ONE_MINUS_SOURCE_ALPHA:t.ONE_MINUS_SRC_ALPHA,DESTINATION_ALPHA:t.DST_ALPHA,ONE_MINUS_DESTINATION_ALPHA:t.ONE_MINUS_DST_ALPHA,CONSTANT_COLOR:t.CONSTANT_COLOR,ONE_MINUS_CONSTANT_COLOR:t.ONE_MINUS_CONSTANT_ALPHA,CONSTANT_ALPHA:t.CONSTANT_ALPHA,ONE_MINUS_CONSTANT_ALPHA:t.ONE_MINUS_CONSTANT_ALPHA,SOURCE_ALPHA_SATURATE:t.SRC_ALPHA_SATURATE};return e(i)}),define("Cesium/Scene/BlendingState",["../Core/freezeObject","./BlendEquation","./BlendFunction"],function(e,t,i){"use strict";var n={DISABLED:e({enabled:!1}),ALPHA_BLEND:e({enabled:!0,equationRgb:t.ADD,equationAlpha:t.ADD,functionSourceRgb:i.SOURCE_ALPHA,functionSourceAlpha:i.SOURCE_ALPHA,functionDestinationRgb:i.ONE_MINUS_SOURCE_ALPHA,functionDestinationAlpha:i.ONE_MINUS_SOURCE_ALPHA}),PRE_MULTIPLIED_ALPHA_BLEND:e({enabled:!0,equationRgb:t.ADD,equationAlpha:t.ADD,functionSourceRgb:i.ONE,functionSourceAlpha:i.ONE,functionDestinationRgb:i.ONE_MINUS_SOURCE_ALPHA,functionDestinationAlpha:i.ONE_MINUS_SOURCE_ALPHA}),ADDITIVE_BLEND:e({enabled:!0,equationRgb:t.ADD,equationAlpha:t.ADD,functionSourceRgb:i.SOURCE_ALPHA,functionSourceAlpha:i.SOURCE_ALPHA,functionDestinationRgb:i.ONE,functionDestinationAlpha:i.ONE})};return e(n)}),define("Cesium/Scene/Pass",["../Core/freezeObject"],function(e){"use strict";var t={ENVIRONMENT:0,COMPUTE:1,GLOBE:2,GROUND:3,OPAQUE:4,TRANSLUCENT:5,OVERLAY:6,NUMBER_OF_PASSES:7};return e(t)}),define("Cesium/Renderer/Framebuffer",["../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/destroyObject","../Core/DeveloperError","../Core/PixelFormat","./ContextLimits"],function(e,t,i,n,r,o,a){"use strict";function s(e,t,i){var n=e._gl;n.framebufferTexture2D(n.FRAMEBUFFER,t,i._target,i._texture,0)}function l(e,t,i){var n=e._gl;n.framebufferRenderbuffer(n.FRAMEBUFFER,t,n.RENDERBUFFER,i._getRenderbuffer())}function u(i){i=e(i,e.EMPTY_OBJECT);var n=i.context._gl;a.maximumColorAttachments;this._gl=n,this._framebuffer=n.createFramebuffer(),this._colorTextures=[],this._colorRenderbuffers=[],this._activeColorAttachments=[],this._depthTexture=void 0,this._depthRenderbuffer=void 0,this._stencilRenderbuffer=void 0,this._depthStencilTexture=void 0,this._depthStencilRenderbuffer=void 0,this.destroyAttachments=e(i.destroyAttachments,!0);t(i.depthTexture)||t(i.depthRenderbuffer),t(i.depthStencilTexture)||t(i.depthStencilRenderbuffer);this._bind();var r,o,u,c,h;if(t(i.colorTextures)){var d=i.colorTextures;for(c=this._colorTextures.length=this._activeColorAttachments.length=d.length,u=0;c>u;++u)r=d[u],h=this._gl.COLOR_ATTACHMENT0+u,s(this,h,r),this._activeColorAttachments[u]=h,this._colorTextures[u]=r}if(t(i.colorRenderbuffers)){var p=i.colorRenderbuffers;for(c=this._colorRenderbuffers.length=this._activeColorAttachments.length=p.length,u=0;c>u;++u)o=p[u],h=this._gl.COLOR_ATTACHMENT0+u,l(this,h,o),this._activeColorAttachments[u]=h,this._colorRenderbuffers[u]=o}t(i.depthTexture)&&(r=i.depthTexture,s(this,this._gl.DEPTH_ATTACHMENT,r),this._depthTexture=r),t(i.depthRenderbuffer)&&(o=i.depthRenderbuffer,l(this,this._gl.DEPTH_ATTACHMENT,o),this._depthRenderbuffer=o),t(i.stencilRenderbuffer)&&(o=i.stencilRenderbuffer,l(this,this._gl.STENCIL_ATTACHMENT,o),this._stencilRenderbuffer=o),t(i.depthStencilTexture)&&(r=i.depthStencilTexture,s(this,this._gl.DEPTH_STENCIL_ATTACHMENT,r),this._depthStencilTexture=r),t(i.depthStencilRenderbuffer)&&(o=i.depthStencilRenderbuffer,l(this,this._gl.DEPTH_STENCIL_ATTACHMENT,o),this._depthStencilRenderbuffer=o),this._unBind()}return i(u.prototype,{status:{get:function(){this._bind();var e=this._gl.checkFramebufferStatus(this._gl.FRAMEBUFFER);return this._unBind(),e}},numberOfColorAttachments:{get:function(){return this._activeColorAttachments.length}},depthTexture:{get:function(){return this._depthTexture}},depthRenderbuffer:{get:function(){return this._depthRenderbuffer}},stencilRenderbuffer:{get:function(){return this._stencilRenderbuffer}},depthStencilTexture:{get:function(){return this._depthStencilTexture}},depthStencilRenderbuffer:{get:function(){return this._depthStencilRenderbuffer}},hasDepthAttachment:{get:function(){return!!(this.depthTexture||this.depthRenderbuffer||this.depthStencilTexture||this.depthStencilRenderbuffer)}}}),u.prototype._bind=function(){var e=this._gl;e.bindFramebuffer(e.FRAMEBUFFER,this._framebuffer)},u.prototype._unBind=function(){var e=this._gl;e.bindFramebuffer(e.FRAMEBUFFER,null)},u.prototype._getActiveColorAttachments=function(){return this._activeColorAttachments},u.prototype.getColorTexture=function(e){return this._colorTextures[e]},u.prototype.getColorRenderbuffer=function(e){return this._colorRenderbuffers[e]},u.prototype.isDestroyed=function(){return!1},u.prototype.destroy=function(){if(this.destroyAttachments){for(var e=0,i=this._colorTextures,r=i.length;r>e;++e){var o=i[e];t(o)&&o.destroy()}var a=this._colorRenderbuffers;for(r=a.length,e=0;r>e;++e){var s=a[e];t(s)&&s.destroy()}this._depthTexture=this._depthTexture&&this._depthTexture.destroy(),this._depthRenderbuffer=this._depthRenderbuffer&&this._depthRenderbuffer.destroy(),this._stencilRenderbuffer=this._stencilRenderbuffer&&this._stencilRenderbuffer.destroy(),this._depthStencilTexture=this._depthStencilTexture&&this._depthStencilTexture.destroy(),this._depthStencilRenderbuffer=this._depthStencilRenderbuffer&&this._depthStencilRenderbuffer.destroy()}return this._gl.deleteFramebuffer(this._framebuffer),n(this)},u}),define("Cesium/Renderer/MipmapHint",["../Core/freezeObject","./WebGLConstants"],function(e,t){"use strict";var i={DONT_CARE:t.DONT_CARE,FASTEST:t.FASTEST,NICEST:t.NICEST,validate:function(e){return e===i.DONT_CARE||e===i.FASTEST||e===i.NICEST}};return e(i)}),define("Cesium/Renderer/PixelDatatype",["../Core/freezeObject","./WebGLConstants"],function(e,t){"use strict";var i={UNSIGNED_BYTE:t.UNSIGNED_BYTE,UNSIGNED_SHORT:t.UNSIGNED_SHORT,UNSIGNED_INT:t.UNSIGNED_INT,FLOAT:t.FLOAT,UNSIGNED_INT_24_8:t.UNSIGNED_INT_24_8,UNSIGNED_SHORT_4_4_4_4:t.UNSIGNED_SHORT_4_4_4_4,UNSIGNED_SHORT_5_5_5_1:t.UNSIGNED_SHORT_5_5_5_1,UNSIGNED_SHORT_5_6_5:t.UNSIGNED_SHORT_5_6_5,validate:function(e){return e===i.UNSIGNED_BYTE||e===i.UNSIGNED_SHORT||e===i.UNSIGNED_INT||e===i.FLOAT||e===i.UNSIGNED_INT_24_8||e===i.UNSIGNED_SHORT_4_4_4_4||e===i.UNSIGNED_SHORT_5_5_5_1||e===i.UNSIGNED_SHORT_5_6_5}};return e(i)}),define("Cesium/Renderer/TextureMagnificationFilter",["../Core/freezeObject","./WebGLConstants"],function(e,t){"use strict";var i={NEAREST:t.NEAREST,LINEAR:t.LINEAR,validate:function(e){return e===i.NEAREST||e===i.LINEAR}};return e(i)}),define("Cesium/Renderer/TextureMinificationFilter",["../Core/freezeObject","./WebGLConstants"],function(e,t){"use strict";var i={NEAREST:t.NEAREST,LINEAR:t.LINEAR,NEAREST_MIPMAP_NEAREST:t.NEAREST_MIPMAP_NEAREST,LINEAR_MIPMAP_NEAREST:t.LINEAR_MIPMAP_NEAREST,NEAREST_MIPMAP_LINEAR:t.NEAREST_MIPMAP_LINEAR,LINEAR_MIPMAP_LINEAR:t.LINEAR_MIPMAP_LINEAR,validate:function(e){return e===i.NEAREST||e===i.LINEAR||e===i.NEAREST_MIPMAP_NEAREST||e===i.LINEAR_MIPMAP_NEAREST||e===i.NEAREST_MIPMAP_LINEAR||e===i.LINEAR_MIPMAP_LINEAR}};return e(i)}),define("Cesium/Renderer/TextureWrap",["../Core/freezeObject","./WebGLConstants"],function(e,t){"use strict";var i={CLAMP_TO_EDGE:t.CLAMP_TO_EDGE,REPEAT:t.REPEAT,MIRRORED_REPEAT:t.MIRRORED_REPEAT,validate:function(e){return e===i.CLAMP_TO_EDGE||e===i.REPEAT||e===i.MIRRORED_REPEAT}};return e(i)}),define("Cesium/Renderer/Sampler",["../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/DeveloperError","./TextureMagnificationFilter","./TextureMinificationFilter","./TextureWrap"],function(e,t,i,n,r,o,a){"use strict";function s(i){i=e(i,e.EMPTY_OBJECT);var n=e(i.wrapS,a.CLAMP_TO_EDGE),s=e(i.wrapT,a.CLAMP_TO_EDGE),l=e(i.minificationFilter,o.LINEAR),u=e(i.magnificationFilter,r.LINEAR),c=t(i.maximumAnisotropy)?i.maximumAnisotropy:1;this._wrapS=n,this._wrapT=s,this._minificationFilter=l,this._magnificationFilter=u,this._maximumAnisotropy=c}return i(s.prototype,{wrapS:{get:function(){return this._wrapS}},wrapT:{get:function(){return this._wrapT}},minificationFilter:{get:function(){return this._minificationFilter}},magnificationFilter:{get:function(){return this._magnificationFilter}},maximumAnisotropy:{get:function(){return this._maximumAnisotropy}}}),s}),define("Cesium/Renderer/Texture",["../Core/Cartesian2","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/destroyObject","../Core/DeveloperError","../Core/Math","../Core/PixelFormat","./ContextLimits","./MipmapHint","./PixelDatatype","./Sampler","./TextureMagnificationFilter","./TextureMinificationFilter","./TextureWrap","./WebGLConstants"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f){"use strict";function g(n){n=t(n,t.EMPTY_OBJECT);var r=n.context,a=n.width,l=n.height,u=n.source;i(u)&&(i(a)||(a=t(u.videoWidth,u.width)),i(l)||(l=t(u.videoHeight,u.height)));var d=t(n.pixelFormat,s.RGBA),p=t(n.pixelDatatype,c.UNSIGNED_BYTE),m=d;if(r.webgl2&&(d===s.DEPTH_STENCIL?m=f.DEPTH24_STENCIL8:d===s.DEPTH_COMPONENT&&(p===c.UNSIGNED_SHORT?m=f.DEPTH_COMPONENT16:p===c.UNSIGNED_INT&&(m=f.DEPTH_COMPONENT24))),p===c.FLOAT&&!r.floatingPointTexture)throw new o("When options.pixelDatatype is FLOAT, this WebGL implementation must support the OES_texture_float extension. Check context.floatingPointTexture.");if(s.isDepthFormat(d)&&!r.depthTexture)throw new o("When options.pixelFormat is DEPTH_COMPONENT or DEPTH_STENCIL, this WebGL implementation must support WEBGL_depth_texture. Check context.depthTexture.");var g=n.preMultiplyAlpha||d===s.RGB||d===s.LUMINANCE,v=t(n.flipY,!0),_=r._gl,y=_.TEXTURE_2D,C=_.createTexture();_.activeTexture(_.TEXTURE0),_.bindTexture(y,C),i(u)?(_.pixelStorei(_.UNPACK_PREMULTIPLY_ALPHA_WEBGL,g),_.pixelStorei(_.UNPACK_FLIP_Y_WEBGL,v),i(u.arrayBufferView)?_.texImage2D(y,0,m,a,l,0,d,p,u.arrayBufferView):i(u.framebuffer)?(u.framebuffer!==r.defaultFramebuffer&&u.framebuffer._bind(),_.copyTexImage2D(y,0,m,u.xOffset,u.yOffset,a,l,0),u.framebuffer!==r.defaultFramebuffer&&u.framebuffer._unBind()):_.texImage2D(y,0,m,d,p,u)):_.texImage2D(y,0,m,a,l,0,d,p,null),_.bindTexture(y,null),this._context=r,this._textureFilterAnisotropic=r._textureFilterAnisotropic,this._textureTarget=y,this._texture=C,this._pixelFormat=d,this._pixelDatatype=p,this._width=a,this._height=l,this._dimensions=new e(a,l),this._preMultiplyAlpha=g,this._flipY=v,this._sampler=void 0,this.sampler=i(n.sampler)?n.sampler:new h}return g.fromFramebuffer=function(e){e=t(e,t.EMPTY_OBJECT);var n=e.context,r=n._gl,o=t(e.pixelFormat,s.RGB),a=t(e.framebufferXOffset,0),l=t(e.framebufferYOffset,0),u=t(e.width,r.drawingBufferWidth),c=t(e.height,r.drawingBufferHeight),h=e.framebuffer,d=new g({context:n,width:u,height:c,pixelFormat:o,source:{framebuffer:i(h)?h:n.defaultFramebuffer,xOffset:a,yOffset:l,width:u,height:c}});return d},n(g.prototype,{sampler:{get:function(){return this._sampler},set:function(e){var t=e.minificationFilter,n=e.magnificationFilter,r=t===p.NEAREST_MIPMAP_NEAREST||t===p.NEAREST_MIPMAP_LINEAR||t===p.LINEAR_MIPMAP_NEAREST||t===p.LINEAR_MIPMAP_LINEAR;this._pixelDatatype===c.FLOAT&&(t=r?p.NEAREST_MIPMAP_NEAREST:p.NEAREST,n=d.NEAREST);var o=this._context._gl,a=this._textureTarget;o.activeTexture(o.TEXTURE0),o.bindTexture(a,this._texture),o.texParameteri(a,o.TEXTURE_MIN_FILTER,t),o.texParameteri(a,o.TEXTURE_MAG_FILTER,n),o.texParameteri(a,o.TEXTURE_WRAP_S,e.wrapS),o.texParameteri(a,o.TEXTURE_WRAP_T,e.wrapT),i(this._textureFilterAnisotropic)&&o.texParameteri(a,this._textureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,e.maximumAnisotropy),o.bindTexture(a,null),this._sampler=e}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},dimensions:{get:function(){return this._dimensions}},preMultiplyAlpha:{get:function(){return this._preMultiplyAlpha}},flipY:{get:function(){return this._flipY}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},_target:{get:function(){return this._textureTarget}}}),g.prototype.copyFrom=function(e,i,n){i=t(i,0),n=t(n,0);var r=this._context._gl,o=this._textureTarget;r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this._preMultiplyAlpha),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,this._flipY),r.activeTexture(r.TEXTURE0),r.bindTexture(o,this._texture),e.arrayBufferView?r.texSubImage2D(o,0,i,n,e.width,e.height,this._pixelFormat,this._pixelDatatype,e.arrayBufferView):r.texSubImage2D(o,0,i,n,this._pixelFormat,this._pixelDatatype,e),r.bindTexture(o,null)},g.prototype.copyFromFramebuffer=function(e,i,n,r,o,a){e=t(e,0),i=t(i,0),n=t(n,0),r=t(r,0),o=t(o,this._width),a=t(a,this._height);var s=this._context._gl,l=this._textureTarget;s.activeTexture(s.TEXTURE0),s.bindTexture(l,this._texture),s.copyTexSubImage2D(l,0,e,i,n,r,o,a),s.bindTexture(l,null)},g.prototype.generateMipmap=function(e){e=t(e,u.DONT_CARE);var i=this._context._gl,n=this._textureTarget;i.hint(i.GENERATE_MIPMAP_HINT,e),i.activeTexture(i.TEXTURE0),i.bindTexture(n,this._texture),i.generateMipmap(n),i.bindTexture(n,null)},g.prototype.isDestroyed=function(){return!1},g.prototype.destroy=function(){return this._context._gl.deleteTexture(this._texture),r(this)},g}),define("Cesium/Scene/TextureAtlas",["../Core/BoundingRectangle","../Core/Cartesian2","../Core/createGuid","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/destroyObject","../Core/DeveloperError","../Core/loadImage","../Core/PixelFormat","../Core/RuntimeError","../Renderer/Framebuffer","../Renderer/RenderState","../Renderer/Texture","../ThirdParty/when"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m){"use strict";function f(e,i,r,o,a){this.bottomLeft=n(e,t.ZERO),this.topRight=n(i,t.ZERO),this.childNode1=r,this.childNode2=o,this.imageIndex=a}function g(e){e=n(e,n.EMPTY_OBJECT);var t=n(e.borderWidthInPixels,1),r=n(e.initialSize,C);this._context=e.context,this._pixelFormat=n(e.pixelFormat,u.RGBA),this._borderWidthInPixels=t,this._textureCoordinates=[],this._guid=i(),this._idHash={},this._initialSize=r,this._root=void 0}function v(e,i){var n=e._context,o=e.numberOfImages,a=2;if(o>0){for(var s=e._texture.width,l=e._texture.height,u=a*(s+i.width+e._borderWidthInPixels),c=a*(l+i.height+e._borderWidthInPixels),d=s/u,m=l/c,g=new f(new t(s+e._borderWidthInPixels,0),new t(u,l)),v=new f(new t,new t(u,l),e._root,g),_=new f(new t(0,l+e._borderWidthInPixels),new t(u,c)),y=new f(new t,new t(u,c),v,_),C=0;Cs||0>l)return;if(0===s&&0===l)return i;if(s>l){i.childNode1=new f(new t(i.bottomLeft.x,i.bottomLeft.y),new t(i.bottomLeft.x+n.width,i.topRight.y));var u=i.bottomLeft.x+n.width+e._borderWidthInPixels;ui;++i)e[i]._updateClamping()},this))}function O(e){for(var t=e.length,i=0;t>i;++i)e[i]&&e[i]._destroy()}function L(e){if(e._billboardsRemoved){e._billboardsRemoved=!1;for(var t=[],i=e._billboards,n=i.length,r=0,o=0;n>r;++r){var a=i[r];a&&(a._index=o++,t.push(a))}e._billboards=t}}function N(e){var t=16384,i=e.cache.billboardCollection_indexBufferBatched;if(s(i))return i;for(var n=6*t-6,r=new Uint16Array(n),o=0,a=0;n>o;o+=6,a+=4)r[o]=a,r[o+1]=a+1,r[o+2]=a+2,r[o+3]=a+0,r[o+4]=a+2,r[o+5]=a+3;return i=f.createIndexBuffer({context:e,typedArray:r,usage:g.STATIC_DRAW,indexDatatype:d.UNSIGNED_SHORT}),i.vertexArrayDestroyable=!1,e.cache.billboardCollection_indexBufferBatched=i,i}function F(e){var t=e.cache.billboardCollection_indexBufferInstanced;return s(t)?t:(t=f.createIndexBuffer({context:e,typedArray:new Uint16Array([0,1,2,0,2,3]),usage:g.STATIC_DRAW,indexDatatype:d.UNSIGNED_SHORT}),t.vertexArrayDestroyable=!1,e.cache.billboardCollection_indexBufferInstanced=t,t)}function k(e){var t=e.cache.billboardCollection_vertexBufferInstanced;return s(t)?t:(t=f.createVertexBuffer({context:e,typedArray:new Float32Array([0,0,1,0,1,1,0,1]),usage:g.STATIC_DRAW}),t.vertexArrayDestroyable=!1,e.cache.billboardCollection_vertexBufferInstanced=t,t)}function B(e,t,i,n){var r=[{index:K.positionHighAndScale,componentsPerAttribute:4,componentDatatype:o.FLOAT,usage:i[Q]},{index:K.positionLowAndRotation,componentsPerAttribute:4,componentDatatype:o.FLOAT,usage:i[Q]},{index:K.compressedAttribute0,componentsPerAttribute:4,componentDatatype:o.FLOAT,usage:i[$]},{index:K.compressedAttribute1,componentsPerAttribute:4,componentDatatype:o.FLOAT,usage:i[ue]},{index:K.compressedAttribute2,componentsPerAttribute:4,componentDatatype:o.FLOAT,usage:i[oe]},{index:K.eyeOffset,componentsPerAttribute:4,componentDatatype:o.FLOAT,usage:i[ee]},{index:K.scaleByDistance,componentsPerAttribute:4,componentDatatype:o.FLOAT,usage:i[le]},{index:K.pixelOffsetScaleByDistance,componentsPerAttribute:4,componentDatatype:o.FLOAT,usage:i[ce]}];n&&r.push({index:K.direction,componentsPerAttribute:2,componentDatatype:o.FLOAT,vertexBuffer:k(e)});var a=n?t:4*t;return new w(e,r,a,n)}function z(e,i,n,r,o){var a,s=r[K.positionHighAndScale],l=r[K.positionLowAndRotation],u=o._getActualPosition();e._mode===M.SCENE3D&&(t.expand(e._baseVolume,u,e._baseVolume),e._boundingVolumeDirty=!0),h.fromCartesian(u,fe);var c=o.scale,d=o.rotation;0!==d&&(e._shaderRotation=!0),e._maxScale=Math.max(e._maxScale,c);var p=fe.high,m=fe.low;e._instanced?(a=o._index,s(a,p.x,p.y,p.z,c),l(a,m.x,m.y,m.z,d)):(a=4*o._index,s(a+0,p.x,p.y,p.z,c),s(a+1,p.x,p.y,p.z,c),s(a+2,p.x,p.y,p.z,c),s(a+3,p.x,p.y,p.z,c),l(a+0,m.x,m.y,m.z,d),l(a+1,m.x,m.y,m.z,d),l(a+2,m.x,m.y,m.z,d),l(a+3,m.x,m.y,m.z,d))}function V(t,i,n,r,o){var a,s=r[K.compressedAttribute0],l=o.pixelOffset,u=l.x,c=l.y,h=o._translate,d=h.x,m=h.y;t._maxPixelOffset=Math.max(t._maxPixelOffset,Math.abs(u+d),Math.abs(-c+m));var f=o.horizontalOrigin,g=o._heightReference,v=g===x.NONE?o._verticalOrigin:I.BOTTOM,_=o.show;0===o.color.alpha&&(_=!1),t._allHorizontalCenter=t._allHorizontalCenter&&f===A.CENTER,t._allVerticalCenter=t._allVerticalCenter&&v===I.CENTER;var y=0,C=0,w=0,E=0,b=o._imageIndex;if(-1!==b){var S=n[b];y=S.x,C=S.y,w=S.width,E=S.height}var T=y+w,P=C+E,M=Math.floor(p.clamp(u,-ve,ve)+ve)*Ce;M+=(f+1)*we,M+=(v+1)*Ee,M+=(_?1:0)*be;var D=Math.floor(p.clamp(c,-ve,ve)+ve)*ye,R=Math.floor(p.clamp(d,-ve,ve)+ve)*ye,O=(p.clamp(m,-ve,ve)+ve)*Se,L=Math.floor(O),N=Math.floor((O-L)*ye);D+=L,R+=N,ge.x=y,ge.y=C;var F=e.compressTextureCoordinates(ge);ge.x=T;var k=e.compressTextureCoordinates(ge);ge.y=P;var B=e.compressTextureCoordinates(ge);ge.x=y;var z=e.compressTextureCoordinates(ge);t._instanced?(a=o._index,s(a,M,D,R,F)):(a=4*o._index,s(a+0,M+Te,D,R,F),s(a+1,M+xe,D,R,k),s(a+2,M+Ae,D,R,B),s(a+3,M+Pe,D,R,z))}function U(t,i,r,o,l){var u,c=o[K.compressedAttribute1],h=l.alignedAxis;n.equals(h,n.ZERO)||(t._shaderAlignedAxis=!0);var d=0,m=1,f=1,g=1,v=l.translucencyByDistance;s(v)&&(d=v.near,m=v.nearValue,f=v.far,g=v.farValue,(1!==m||1!==g)&&(t._shaderTranslucencyByDistance=!0));var _=0,y=l._imageIndex;if(-1!==y){var C=r[y];_=C.width}var w=t._textureAtlas.texture.width,E=Math.ceil(.5*a(l.width,w*_));t._maxSize=Math.max(t._maxSize,E);var b=p.clamp(E,0,_e),S=0;Math.abs(n.magnitudeSquared(h)-1)c;++c){var h=i[c],d=h.position,p=S._computeActualPosition(h,d,r,o);s(p)&&(h._setActualPosition(p),a?u.push(p):t.expand(l,p,l))}a&&t.fromPoints(u,l)}function X(e,t){var i=t.mode,n=e._billboards,r=e._billboardsToUpdate,o=e._modelMatrix;e._createVertexArray||e._mode!==i||i!==M.SCENE3D&&!m.equals(o,e.modelMatrix)?(e._mode=i,m.clone(e.modelMatrix,o),e._createVertexArray=!0,(i===M.SCENE3D||i===M.SCENE2D||i===M.COLUMBUS_VIEW)&&Y(e,n,n.length,t,o,!0)):i===M.MORPHING?Y(e,n,n.length,t,o,!0):(i===M.SCENE2D||i===M.COLUMBUS_VIEW)&&Y(e,r,e._billboardsToUpdateIndex,t,o,!1)}function Z(e,t,i){var n=1;e._allSizedInMeters&&0===e._maxPixelOffset||(n=t.camera.getPixelSize(i,t.context.drawingBufferWidth,t.context.drawingBufferHeight));var r=n*e._maxScale*e._maxSize*2;e._allHorizontalCenter&&e._allVerticalCenter&&(r*=.5);var o=n*e._maxPixelOffset+e._maxEyeOffset;i.radius+=r+o}var K,J=S.SHOW_INDEX,Q=S.POSITION_INDEX,$=S.PIXEL_OFFSET_INDEX,ee=S.EYE_OFFSET_INDEX,te=S.HORIZONTAL_ORIGIN_INDEX,ie=S.VERTICAL_ORIGIN_INDEX,ne=S.SCALE_INDEX,re=S.IMAGE_INDEX_INDEX,oe=S.COLOR_INDEX,ae=S.ROTATION_INDEX,se=S.ALIGNED_AXIS_INDEX,le=S.SCALE_BY_DISTANCE_INDEX,ue=S.TRANSLUCENCY_BY_DISTANCE_INDEX,ce=S.PIXEL_OFFSET_SCALE_BY_DISTANCE_INDEX,he=S.NUMBER_OF_PROPERTIES,de={positionHighAndScale:0,positionLowAndRotation:1,compressedAttribute0:2,compressedAttribute1:3,compressedAttribute2:4,eyeOffset:5,scaleByDistance:6,pixelOffsetScaleByDistance:7},pe={direction:0,positionHighAndScale:1,positionLowAndRotation:2,compressedAttribute0:3,compressedAttribute1:4,compressedAttribute2:5,eyeOffset:6,scaleByDistance:7,pixelOffsetScaleByDistance:8};l(R.prototype,{length:{get:function(){return L(this),this._billboards.length}},textureAtlas:{get:function(){return this._textureAtlas},set:function(e){this._textureAtlas!==e&&(this._textureAtlas=this._destroyTextureAtlas&&this._textureAtlas&&this._textureAtlas.destroy(),this._textureAtlas=e,this._createVertexArray=!0)}},destroyTextureAtlas:{get:function(){return this._destroyTextureAtlas},set:function(e){this._destroyTextureAtlas=e}}}),R.prototype.add=function(e){var t=new S(e,this);return t._index=this._billboards.length,this._billboards.push(t),this._createVertexArray=!0,t},R.prototype.remove=function(e){return this.contains(e)?(this._billboards[e._index]=null,this._billboardsRemoved=!0,this._createVertexArray=!0,e._destroy(),!0):!1},R.prototype.removeAll=function(){O(this._billboards),this._billboards=[],this._billboardsToUpdate=[],this._billboardsToUpdateIndex=0,this._billboardsRemoved=!1,this._createVertexArray=!0},R.prototype._updateBillboard=function(e,t){e._dirty||(this._billboardsToUpdate[this._billboardsToUpdateIndex++]=e),++this._propertiesChanged[t]},R.prototype.contains=function(e){return s(e)&&e._billboardCollection===this},R.prototype.get=function(e){return L(this),this._billboards[e]};var me;R.prototype.computeNewBuffersUsage=function(){for(var e=this._buffersUsage,t=!1,i=this._propertiesChanged,n=0;he>n;++n){var r=0===i[n]?g.STATIC_DRAW:g.STREAM_DRAW;t=t||e[n]!==r,e[n]=r}return t};var fe=new h,ge=new i,ve=32768,_e=65536,ye=256,Ce=128,we=32,Ee=8,be=4,Se=1/256,Te=0,xe=2,Ae=3,Pe=1,Me=[];return R.prototype.update=function(e){L(this);var i=this._billboards,n=i.length,r=e.context;this._instanced=r.instancedArrays,K=this._instanced?pe:de,me=this._instanced?F:N;var o=this._textureAtlas;if(!s(o)){o=this._textureAtlas=new D({context:r});for(var a=0;n>a;++a)i[a]._loadImage()}var l=o.textureCoordinates;if(0!==l.length){X(this,e),i=this._billboards,n=i.length;var u=this._billboardsToUpdate,c=this._billboardsToUpdateIndex,h=this._propertiesChanged,d=o.guid,p=this._createVertexArray||this._textureAtlasGUID!==d;this._textureAtlasGUID=d;var f,g=e.passes,w=g.pick;if(p||!w&&this.computeNewBuffersUsage()){this._createVertexArray=!1;for(var S=0;he>S;++S)h[S]=0;if(this._vaf=this._vaf&&this._vaf.destroy(),n>0){this._vaf=B(r,n,this._buffersUsage,this._instanced),f=this._vaf.writers;for(var x=0;n>x;++x){var A=this._billboards[x];A._dirty=!1,j(this,r,l,f,A)}this._vaf.commit(me(r))}this._billboardsToUpdateIndex=0}else if(c>0){var I=Me;I.length=0,(h[Q]||h[ae]||h[ne])&&I.push(z),(h[re]||h[$]||h[te]||h[ie]||h[J])&&(I.push(V),this._instanced&&I.push(W)),(h[re]||h[se]||h[ue])&&(I.push(U),I.push(G)),(h[re]||h[oe])&&I.push(G),h[ee]&&I.push(W),h[le]&&I.push(H),h[ce]&&I.push(q);var R=I.length;if(f=this._vaf.writers,c/n>.1){for(var O=0;c>O;++O){var k=u[O];k._dirty=!1;for(var Y=0;R>Y;++Y)I[Y](this,r,l,f,k)}this._vaf.commit(me(r))}else{for(var fe=0;c>fe;++fe){var ge=u[fe];ge._dirty=!1;for(var ve=0;R>ve;++ve)I[ve](this,r,l,f,ge);this._instanced?this._vaf.subCommit(ge._index,1):this._vaf.subCommit(4*ge._index,4)}this._vaf.endSubCommits()}this._billboardsToUpdateIndex=0}if(c>1.5*n&&(u.length=n),s(this._vaf)&&s(this._vaf.va)){this._boundingVolumeDirty&&(this._boundingVolumeDirty=!1,t.transform(this._baseVolume,this.modelMatrix,this._baseVolumeWC));var _e,ye=m.IDENTITY;e.mode===M.SCENE3D?(ye=this.modelMatrix,_e=t.clone(this._baseVolumeWC,this._boundingVolume)):_e=t.clone(this._baseVolume2D,this._boundingVolume),Z(this,e,_e);var Ce,we,Ee,be,Se,Te,xe=e.commandList;if(g.render){var Ae=this._colorCommands;for(s(this._rs)||(this._rs=_.fromCache({depthTest:{enabled:!0},blending:T.ALPHA_BLEND})),s(this._sp)&&this._shaderRotation===this._compiledShaderRotation&&this._shaderAlignedAxis===this._compiledShaderAlignedAxis&&this._shaderScaleByDistance===this._compiledShaderScaleByDistance&&this._shaderTranslucencyByDistance===this._compiledShaderTranslucencyByDistance&&this._shaderPixelOffsetScaleByDistance===this._compiledShaderPixelOffsetScaleByDistance||(be=new C({sources:[b]}),this._instanced&&be.defines.push("INSTANCED"),this._shaderRotation&&be.defines.push("ROTATION"),this._shaderAlignedAxis&&be.defines.push("ALIGNED_AXIS"),this._shaderScaleByDistance&&be.defines.push("EYE_DISTANCE_SCALING"),this._shaderTranslucencyByDistance&&be.defines.push("EYE_DISTANCE_TRANSLUCENCY"),this._shaderPixelOffsetScaleByDistance&&be.defines.push("EYE_DISTANCE_PIXEL_OFFSET"),this._sp=y.replaceCache({context:r,shaderProgram:this._sp,vertexShaderSource:be,fragmentShaderSource:E,attributeLocations:K}),this._compiledShaderRotation=this._shaderRotation,this._compiledShaderAlignedAxis=this._shaderAlignedAxis,this._compiledShaderScaleByDistance=this._shaderScaleByDistance,this._compiledShaderTranslucencyByDistance=this._shaderTranslucencyByDistance,this._compiledShaderPixelOffsetScaleByDistance=this._shaderPixelOffsetScaleByDistance),Ce=this._vaf.va,we=Ce.length,Ae.length=we,Te=0;we>Te;++Te)Ee=Ae[Te],s(Ee)||(Ee=Ae[Te]=new v({pass:P.OPAQUE,owner:this})),Ee.boundingVolume=_e,Ee.modelMatrix=ye,Ee.count=Ce[Te].indicesCount,Ee.shaderProgram=this._sp,Ee.uniformMap=this._uniforms,Ee.vertexArray=Ce[Te].va,Ee.renderState=this._rs,Ee.debugShowBoundingVolume=this.debugShowBoundingVolume,this._instanced&&(Ee.count=6,Ee.instanceCount=n),xe.push(Ee)}if(w){var Pe=this._pickCommands;for(s(this._spPick)&&this._shaderRotation===this._compiledShaderRotationPick&&this._shaderAlignedAxis===this._compiledShaderAlignedAxisPick&&this._shaderScaleByDistance===this._compiledShaderScaleByDistancePick&&this._shaderTranslucencyByDistance===this._compiledShaderTranslucencyByDistancePick&&this._shaderPixelOffsetScaleByDistance===this._compiledShaderPixelOffsetScaleByDistancePick||(be=new C({defines:["RENDER_FOR_PICK"],sources:[b]}),this._instanced&&be.defines.push("INSTANCED"),this._shaderRotation&&be.defines.push("ROTATION"),this._shaderAlignedAxis&&be.defines.push("ALIGNED_AXIS"),this._shaderScaleByDistance&&be.defines.push("EYE_DISTANCE_SCALING"),this._shaderTranslucencyByDistance&&be.defines.push("EYE_DISTANCE_TRANSLUCENCY"),this._shaderPixelOffsetScaleByDistance&&be.defines.push("EYE_DISTANCE_PIXEL_OFFSET"),Se=new C({defines:["RENDER_FOR_PICK"],sources:[E]}),this._spPick=y.replaceCache({context:r,shaderProgram:this._spPick,vertexShaderSource:be,fragmentShaderSource:Se,attributeLocations:K}),this._compiledShaderRotationPick=this._shaderRotation,this._compiledShaderAlignedAxisPick=this._shaderAlignedAxis,this._compiledShaderScaleByDistancePick=this._shaderScaleByDistance,this._compiledShaderTranslucencyByDistancePick=this._shaderTranslucencyByDistance,this._compiledShaderPixelOffsetScaleByDistancePick=this._shaderPixelOffsetScaleByDistance),Ce=this._vaf.va,we=Ce.length,Pe.length=we,Te=0;we>Te;++Te)Ee=Pe[Te],s(Ee)||(Ee=Pe[Te]=new v({pass:P.OPAQUE,owner:this})),Ee.boundingVolume=_e,Ee.modelMatrix=ye,Ee.count=Ce[Te].indicesCount,Ee.shaderProgram=this._spPick,Ee.uniformMap=this._uniforms,Ee.vertexArray=Ce[Te].va,Ee.renderState=this._rs,this._instanced&&(Ee.count=6,Ee.instanceCount=n),xe.push(Ee)}}}},R.prototype.isDestroyed=function(){return!1},R.prototype.destroy=function(){return s(this._removeCallbackFunc)&&(this._removeCallbackFunc(),this._removeCallbackFunc=void 0),this._textureAtlas=this._destroyTextureAtlas&&this._textureAtlas&&this._textureAtlas.destroy(),this._sp=this._sp&&this._sp.destroy(),this._spPick=this._spPick&&this._spPick.destroy(),this._vaf=this._vaf&&this._vaf.destroy(),O(this._billboards),u(this)},R}),define("Cesium/DataSources/BoundingSphereState",["../Core/freezeObject"],function(e){"use strict";var t={DONE:0,PENDING:1,FAILED:2};return e(t)}),define("Cesium/DataSources/Property",["../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Iso8601"],function(e,t,i,n,r){"use strict";function o(){n.throwInstantiationError()}return i(o.prototype,{isConstant:{get:n.throwInstantiationError},definitionChanged:{get:n.throwInstantiationError}}),o.prototype.getValue=n.throwInstantiationError,o.prototype.equals=n.throwInstantiationError,o.equals=function(e,i){return e===i||t(e)&&e.equals(i)},o.arrayEquals=function(e,i){if(e===i)return!0;if(!t(e)||!t(i)||e.length!==i.length)return!1;for(var n=e.length,r=0;n>r;r++)if(!o.equals(e[r],i[r]))return!1;return!0},o.isConstant=function(e){return!t(e)||e.isConstant},o.getValueOrUndefined=function(e,i,n){return t(e)?e.getValue(i,n):void 0},o.getValueOrDefault=function(i,n,r,o){return t(i)?e(i.getValue(n,o),r):r},o.getValueOrClonedDefault=function(e,i,n,r){var o;return t(e)&&(o=e.getValue(i,r)),t(o)||(o=n.clone(o)),o},o}),define("Cesium/DataSources/BillboardVisualizer",["../Core/AssociativeArray","../Core/BoundingRectangle","../Core/Cartesian2","../Core/Cartesian3","../Core/Color","../Core/defaultValue","../Core/defined","../Core/destroyObject","../Core/DeveloperError","../Core/NearFarScalar","../Scene/BillboardCollection","../Scene/HeightReference","../Scene/HorizontalOrigin","../Scene/VerticalOrigin","./BoundingSphereState","./Property"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f){"use strict";function g(e){this.entity=e,this.billboard=void 0,this.textureValue=void 0}function v(t,i){i.collectionChanged.addEventListener(v.prototype._onCollectionChanged,this),this._scene=t,this._unusedIndexes=[],this._billboardCollection=void 0,this._entityCollection=i,this._items=new e,this._onCollectionChanged(i,i.values,[],[])}function _(e,t){if(a(e)){var i=e.billboard;a(i)&&(e.textureValue=void 0,e.billboard=void 0,i.id=void 0,i.show=!1,i.image=void 0,t.push(i._index))}}var y=r.WHITE,C=n.ZERO,w=h.NONE,E=i.ZERO,b=1,S=0,T=n.ZERO,x=d.CENTER,A=p.CENTER,P=!1,M=new n,D=new r,I=new n,R=new i,O=new u,L=new u,N=new u,F=new t;return v.prototype.update=function(e){for(var t=this._items.values,i=this._unusedIndexes,n=0,r=t.length;r>n;n++){var o,s=t[n],l=s.entity,u=l._billboard,h=s.billboard,d=l.isShowing&&l.isAvailable(e)&&f.getValueOrDefault(u._show,e,!0);if(d&&(M=f.getValueOrUndefined(l._position,e,M),o=f.getValueOrUndefined(u._image,e),d=a(M)&&a(o)),d){if(!a(h)){var p=this._billboardCollection;a(p)||(p=this._scene.primitives.add(new c({scene:this._scene})),this._billboardCollection=p);var m=i.length;h=m>0?p.get(i.pop()):p.add(),h.id=l,h.image=void 0,s.billboard=h}h.show=d,s.textureValue!==o&&(h.image=o,s.textureValue=o),h.position=M,h.color=f.getValueOrDefault(u._color,e,y,D),h.eyeOffset=f.getValueOrDefault(u._eyeOffset,e,C,I),h.heightReference=f.getValueOrDefault(u._heightReference,e,w),h.pixelOffset=f.getValueOrDefault(u._pixelOffset,e,E,R),h.scale=f.getValueOrDefault(u._scale,e,b),h.rotation=f.getValueOrDefault(u._rotation,e,S),h.alignedAxis=f.getValueOrDefault(u._alignedAxis,e,T),h.horizontalOrigin=f.getValueOrDefault(u._horizontalOrigin,e,x),h.verticalOrigin=f.getValueOrDefault(u._verticalOrigin,e,A),h.width=f.getValueOrUndefined(u._width,e),h.height=f.getValueOrUndefined(u._height,e),h.scaleByDistance=f.getValueOrUndefined(u._scaleByDistance,e,O),h.translucencyByDistance=f.getValueOrUndefined(u._translucencyByDistance,e,L),h.pixelOffsetScaleByDistance=f.getValueOrUndefined(u._pixelOffsetScaleByDistance,e,N),h.sizeInMeters=f.getValueOrDefault(u._sizeInMeters,P);var g=f.getValueOrUndefined(u._imageSubRegion,e,F);a(g)&&h.setImageSubRegion(h._imageId,g)}else _(s,i)}return!0},v.prototype.getBoundingSphere=function(e,t){var i=this._items.get(e.id);if(!a(i)||!a(i.billboard))return m.FAILED;var r=i.billboard;if(r.heightReference===h.NONE)t.center=n.clone(r.position,t.center);else{if(!a(r._clampedPosition))return m.PENDING;t.center=n.clone(r._clampedPosition,t.center)}return t.radius=0,m.DONE},v.prototype.isDestroyed=function(){return!1},v.prototype.destroy=function(){return this._entityCollection.collectionChanged.removeEventListener(v.prototype._onCollectionChanged,this),a(this._billboardCollection)&&this._scene.primitives.remove(this._billboardCollection),s(this)},v.prototype._onCollectionChanged=function(e,t,i,n){var r,o,s=this._unusedIndexes,l=this._items;for(r=t.length-1;r>-1;r--)o=t[r],a(o._billboard)&&a(o._position)&&l.set(o.id,new g(o));for(r=n.length-1;r>-1;r--)o=n[r],a(o._billboard)&&a(o._position)?l.contains(o.id)||l.set(o.id,new g(o)):(_(l.get(o.id),s),l.remove(o.id));for(r=i.length-1;r>-1;r--)o=i[r],_(l.get(o.id),s),l.remove(o.id)},v}),define("Cesium/Shaders/Appearances/AllMaterialAppearanceFS",[],function(){"use strict";return"varying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec3 v_tangentEC;\nvarying vec3 v_binormalEC;\nvarying vec2 v_st;\n\nvoid main()\n{\n vec3 positionToEyeEC = -v_positionEC; \n mat3 tangentToEyeMatrix = czm_tangentToEyeSpaceMatrix(v_normalEC, v_tangentEC, v_binormalEC);\n\n vec3 normalEC = normalize(v_normalEC);\n#ifdef FACE_FORWARD\n normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);\n#endif\n\n czm_materialInput materialInput;\n materialInput.normalEC = normalEC;\n materialInput.tangentToEyeMatrix = tangentToEyeMatrix;\n materialInput.positionToEyeEC = positionToEyeEC;\n materialInput.st = v_st;\n czm_material material = czm_getMaterial(materialInput);\n \n#ifdef FLAT \n gl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#else\n gl_FragColor = czm_phong(normalize(positionToEyeEC), material);\n#endif\n}\n"}),define("Cesium/Shaders/Appearances/AllMaterialAppearanceVS",[],function(){"use strict";return"attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 normal;\nattribute vec3 tangent;\nattribute vec3 binormal;\nattribute vec2 st;\n\nvarying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec3 v_tangentEC;\nvarying vec3 v_binormalEC;\nvarying vec2 v_st;\n\nvoid main() \n{\n vec4 p = czm_computePosition();\n\n v_positionEC = (czm_modelViewRelativeToEye * p).xyz; // position in eye coordinates\n v_normalEC = czm_normal * normal; // normal in eye coordinates\n v_tangentEC = czm_normal * tangent; // tangent in eye coordinates\n v_binormalEC = czm_normal * binormal; // binormal in eye coordinates\n v_st = st;\n \n gl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n"}),define("Cesium/Shaders/Appearances/BasicMaterialAppearanceFS",[],function(){"use strict";return"varying vec3 v_positionEC;\nvarying vec3 v_normalEC;\n\nvoid main()\n{\n vec3 positionToEyeEC = -v_positionEC; \n\n vec3 normalEC = normalize(v_normalEC);\n#ifdef FACE_FORWARD\n normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);\n#endif\n\n czm_materialInput materialInput;\n materialInput.normalEC = normalEC;\n materialInput.positionToEyeEC = positionToEyeEC;\n czm_material material = czm_getMaterial(materialInput);\n \n#ifdef FLAT \n gl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#else\n gl_FragColor = czm_phong(normalize(positionToEyeEC), material);\n#endif\n}\n"}),define("Cesium/Shaders/Appearances/BasicMaterialAppearanceVS",[],function(){"use strict";return"attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 normal;\n\nvarying vec3 v_positionEC;\nvarying vec3 v_normalEC;\n\nvoid main() \n{\n vec4 p = czm_computePosition();\n\n v_positionEC = (czm_modelViewRelativeToEye * p).xyz; // position in eye coordinates\n v_normalEC = czm_normal * normal; // normal in eye coordinates\n \n gl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n"}),define("Cesium/Shaders/Appearances/TexturedMaterialAppearanceFS",[],function(){"use strict";return"varying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec2 v_st;\n\nvoid main()\n{\n vec3 positionToEyeEC = -v_positionEC; \n\n vec3 normalEC = normalize(v_normalEC);;\n#ifdef FACE_FORWARD\n normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);\n#endif\n\n czm_materialInput materialInput;\n materialInput.normalEC = normalEC;\n materialInput.positionToEyeEC = positionToEyeEC;\n materialInput.st = v_st;\n czm_material material = czm_getMaterial(materialInput);\n \n#ifdef FLAT \n gl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#else\n gl_FragColor = czm_phong(normalize(positionToEyeEC), material);\n#endif\n}\n"}),define("Cesium/Shaders/Appearances/TexturedMaterialAppearanceVS",[],function(){"use strict";return"attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 normal;\nattribute vec2 st;\n\nvarying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec2 v_st;\n\nvoid main() \n{\n vec4 p = czm_computePosition();\n\n v_positionEC = (czm_modelViewRelativeToEye * p).xyz; // position in eye coordinates\n v_normalEC = czm_normal * normal; // normal in eye coordinates\n v_st = st;\n \n gl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n"}),define("Cesium/Scene/CullFace",["../Core/freezeObject","../Renderer/WebGLConstants"],function(e,t){"use strict";var i={FRONT:t.FRONT,BACK:t.BACK,FRONT_AND_BACK:t.FRONT_AND_BACK};return e(i)}),define("Cesium/Scene/Appearance",["../Core/clone","../Core/combine","../Core/defaultValue","../Core/defined","../Core/defineProperties","./BlendingState","./CullFace"],function(e,t,i,n,r,o,a){"use strict";function s(e){e=i(e,i.EMPTY_OBJECT),this.material=e.material,this.translucent=i(e.translucent,!0),this._vertexShaderSource=e.vertexShaderSource,this._fragmentShaderSource=e.fragmentShaderSource,this._renderState=e.renderState,this._closed=i(e.closed,!1)}return r(s.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}}}),s.prototype.getFragmentShaderSource=function(){var e=[];return this.flat&&e.push("#define FLAT"),this.faceForward&&e.push("#define FACE_FORWARD"),n(this.material)&&e.push(this.material.shaderSource),e.push(this.fragmentShaderSource),e.join("\n")},s.prototype.isTranslucent=function(){return n(this.material)&&this.material.isTranslucent()||!n(this.material)&&this.translucent},s.prototype.getRenderState=function(){var t=this.isTranslucent(),i=e(this.renderState,!1);return t?(i.depthMask=!1,i.blending=o.ALPHA_BLEND):i.depthMask=!0,i},s.getDefaultRenderState=function(e,i,r){var s={depthTest:{enabled:!0}};return e&&(s.depthMask=!1,s.blending=o.ALPHA_BLEND),i&&(s.cull={enabled:!0,face:a.BACK}),n(r)&&(s=t(r,s,!0)),s},s}),define("Cesium/Renderer/CubeMapFace",["../Core/defaultValue","../Core/defineProperties","../Core/DeveloperError","./PixelDatatype"],function(e,t,i,n){"use strict";function r(e,t,i,n,r,o,a,s,l){this._gl=e,this._texture=t,this._textureTarget=i,this._targetFace=n,this._pixelFormat=r,this._pixelDatatype=o,this._size=a,this._preMultiplyAlpha=s,this._flipY=l}return t(r.prototype,{pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},_target:{get:function(){return this._targetFace}}}),r.prototype.copyFrom=function(t,i,n){i=e(i,0),n=e(n,0);var r=this._gl,o=this._textureTarget;r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this._preMultiplyAlpha),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,this._flipY),r.activeTexture(r.TEXTURE0),r.bindTexture(o,this._texture),t.arrayBufferView?r.texSubImage2D(this._targetFace,0,i,n,t.width,t.height,this._pixelFormat,this._pixelDatatype,t.arrayBufferView):r.texSubImage2D(this._targetFace,0,i,n,this._pixelFormat,this._pixelDatatype,t),r.bindTexture(o,null)},r.prototype.copyFromFramebuffer=function(t,i,n,r,o,a){t=e(t,0),i=e(i,0),n=e(n,0),r=e(r,0),o=e(o,this._size),a=e(a,this._size);var s=this._gl,l=this._textureTarget;s.activeTexture(s.TEXTURE0),s.bindTexture(l,this._texture),s.copyTexSubImage2D(this._targetFace,0,t,i,n,r,o,a),s.bindTexture(l,null)},r}),define("Cesium/Renderer/CubeMap",["../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/destroyObject","../Core/DeveloperError","../Core/Math","../Core/PixelFormat","./ContextLimits","./CubeMapFace","./MipmapHint","./PixelDatatype","./Sampler","./TextureMagnificationFilter","./TextureMinificationFilter","./TextureWrap"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m){"use strict";function f(i){function n(e,t){t.arrayBufferView?_.texImage2D(e,0,m,p,p,0,m,f,t.arrayBufferView):_.texImage2D(e,0,m,m,f,t)}i=e(i,e.EMPTY_OBJECT);var r,o,s=i.context,u=i.source;if(t(u)){var d=[u.positiveX,u.negativeX,u.positiveY,u.negativeY,u.positiveZ,u.negativeZ];r=d[0].width,o=d[0].height}else r=i.width,o=i.height;var p=r,m=e(i.pixelFormat,a.RGBA),f=e(i.pixelDatatype,c.UNSIGNED_BYTE),g=i.preMultiplyAlpha||m===a.RGB||m===a.LUMINANCE,v=e(i.flipY,!0),_=s._gl,y=_.TEXTURE_CUBE_MAP,C=_.createTexture(); +_.activeTexture(_.TEXTURE0),_.bindTexture(y,C),t(u)?(_.pixelStorei(_.UNPACK_PREMULTIPLY_ALPHA_WEBGL,g),_.pixelStorei(_.UNPACK_FLIP_Y_WEBGL,v),n(_.TEXTURE_CUBE_MAP_POSITIVE_X,u.positiveX),n(_.TEXTURE_CUBE_MAP_NEGATIVE_X,u.negativeX),n(_.TEXTURE_CUBE_MAP_POSITIVE_Y,u.positiveY),n(_.TEXTURE_CUBE_MAP_NEGATIVE_Y,u.negativeY),n(_.TEXTURE_CUBE_MAP_POSITIVE_Z,u.positiveZ),n(_.TEXTURE_CUBE_MAP_NEGATIVE_Z,u.negativeZ)):(_.texImage2D(_.TEXTURE_CUBE_MAP_POSITIVE_X,0,m,p,p,0,m,f,null),_.texImage2D(_.TEXTURE_CUBE_MAP_NEGATIVE_X,0,m,p,p,0,m,f,null),_.texImage2D(_.TEXTURE_CUBE_MAP_POSITIVE_Y,0,m,p,p,0,m,f,null),_.texImage2D(_.TEXTURE_CUBE_MAP_NEGATIVE_Y,0,m,p,p,0,m,f,null),_.texImage2D(_.TEXTURE_CUBE_MAP_POSITIVE_Z,0,m,p,p,0,m,f,null),_.texImage2D(_.TEXTURE_CUBE_MAP_NEGATIVE_Z,0,m,p,p,0,m,f,null)),_.bindTexture(y,null),this._gl=_,this._textureFilterAnisotropic=s._textureFilterAnisotropic,this._textureTarget=y,this._texture=C,this._pixelFormat=m,this._pixelDatatype=f,this._size=p,this._preMultiplyAlpha=g,this._flipY=v,this._sampler=void 0,this._positiveX=new l(_,C,y,_.TEXTURE_CUBE_MAP_POSITIVE_X,m,f,p,g,v),this._negativeX=new l(_,C,y,_.TEXTURE_CUBE_MAP_NEGATIVE_X,m,f,p,g,v),this._positiveY=new l(_,C,y,_.TEXTURE_CUBE_MAP_POSITIVE_Y,m,f,p,g,v),this._negativeY=new l(_,C,y,_.TEXTURE_CUBE_MAP_NEGATIVE_Y,m,f,p,g,v),this._positiveZ=new l(_,C,y,_.TEXTURE_CUBE_MAP_POSITIVE_Z,m,f,p,g,v),this._negativeZ=new l(_,C,y,_.TEXTURE_CUBE_MAP_NEGATIVE_Z,m,f,p,g,v),this.sampler=t(i.sampler)?i.sampler:new h}return i(f.prototype,{positiveX:{get:function(){return this._positiveX}},negativeX:{get:function(){return this._negativeX}},positiveY:{get:function(){return this._positiveY}},negativeY:{get:function(){return this._negativeY}},positiveZ:{get:function(){return this._positiveZ}},negativeZ:{get:function(){return this._negativeZ}},sampler:{get:function(){return this._sampler},set:function(e){var i=e.minificationFilter,n=e.magnificationFilter,r=i===p.NEAREST_MIPMAP_NEAREST||i===p.NEAREST_MIPMAP_LINEAR||i===p.LINEAR_MIPMAP_NEAREST||i===p.LINEAR_MIPMAP_LINEAR;this._pixelDatatype===c.FLOAT&&(i=r?p.NEAREST_MIPMAP_NEAREST:p.NEAREST,n=d.NEAREST);var o=this._gl,a=this._textureTarget;o.activeTexture(o.TEXTURE0),o.bindTexture(a,this._texture),o.texParameteri(a,o.TEXTURE_MIN_FILTER,i),o.texParameteri(a,o.TEXTURE_MAG_FILTER,n),o.texParameteri(a,o.TEXTURE_WRAP_S,e.wrapS),o.texParameteri(a,o.TEXTURE_WRAP_T,e.wrapT),t(this._textureFilterAnisotropic)&&o.texParameteri(a,this._textureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,e.maximumAnisotropy),o.bindTexture(a,null),this._sampler=e}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},width:{get:function(){return this._size}},height:{get:function(){return this._size}},preMultiplyAlpha:{get:function(){return this._preMultiplyAlpha}},flipY:{get:function(){return this._flipY}},_target:{get:function(){return this._textureTarget}}}),f.prototype.generateMipmap=function(t){t=e(t,u.DONT_CARE);var i=this._gl,n=this._textureTarget;i.hint(i.GENERATE_MIPMAP_HINT,t),i.activeTexture(i.TEXTURE0),i.bindTexture(n,this._texture),i.generateMipmap(n),i.bindTexture(n,null)},f.prototype.isDestroyed=function(){return!1},f.prototype.destroy=function(){return this._gl.deleteTexture(this._texture),this._positiveX=n(this._positiveX),this._negativeX=n(this._negativeX),this._positiveY=n(this._positiveY),this._negativeY=n(this._negativeY),this._positiveZ=n(this._positiveZ),this._negativeZ=n(this._negativeZ),n(this)},f}),define("Cesium/Shaders/Materials/BumpMapMaterial",[],function(){"use strict";return"uniform sampler2D image;\nuniform float strength;\nuniform vec2 repeat;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n vec2 st = materialInput.st;\n \n vec2 centerPixel = fract(repeat * st);\n float centerBump = texture2D(image, centerPixel).channel;\n \n float imageWidth = float(imageDimensions.x);\n vec2 rightPixel = fract(repeat * (st + vec2(1.0 / imageWidth, 0.0)));\n float rightBump = texture2D(image, rightPixel).channel;\n \n float imageHeight = float(imageDimensions.y);\n vec2 leftPixel = fract(repeat * (st + vec2(0.0, 1.0 / imageHeight)));\n float topBump = texture2D(image, leftPixel).channel;\n \n vec3 normalTangentSpace = normalize(vec3(centerBump - rightBump, centerBump - topBump, clamp(1.0 - strength, 0.1, 1.0)));\n vec3 normalEC = materialInput.tangentToEyeMatrix * normalTangentSpace;\n \n material.normal = normalEC;\n material.diffuse = vec3(0.01);\n \n return material;\n}"}),define("Cesium/Shaders/Materials/CheckerboardMaterial",[],function(){"use strict";return"uniform vec4 lightColor;\nuniform vec4 darkColor;\nuniform vec2 repeat;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n vec2 st = materialInput.st;\n \n // From Stefan Gustavson's Procedural Textures in GLSL in OpenGL Insights\n float b = mod(floor(repeat.s * st.s) + floor(repeat.t * st.t), 2.0); // 0.0 or 1.0\n \n // Find the distance from the closest separator (region between two colors)\n float scaledWidth = fract(repeat.s * st.s);\n scaledWidth = abs(scaledWidth - floor(scaledWidth + 0.5));\n float scaledHeight = fract(repeat.t * st.t);\n scaledHeight = abs(scaledHeight - floor(scaledHeight + 0.5));\n float value = min(scaledWidth, scaledHeight);\n \n vec4 currentColor = mix(lightColor, darkColor, b);\n vec4 color = czm_antialias(lightColor, darkColor, currentColor, value, 0.03);\n \n material.diffuse = color.rgb;\n material.alpha = color.a;\n \n return material;\n}\n"}),define("Cesium/Shaders/Materials/DotMaterial",[],function(){"use strict";return"uniform vec4 lightColor;\nuniform vec4 darkColor;\nuniform vec2 repeat;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n \n // From Stefan Gustavson's Procedural Textures in GLSL in OpenGL Insights\n float b = smoothstep(0.3, 0.32, length(fract(repeat * materialInput.st) - 0.5)); // 0.0 or 1.0\n\n vec4 color = mix(lightColor, darkColor, b);\n material.diffuse = color.rgb;\n material.alpha = color.a;\n \n return material;\n}\n"}),define("Cesium/Shaders/Materials/FadeMaterial",[],function(){"use strict";return"uniform vec4 fadeInColor;\nuniform vec4 fadeOutColor;\nuniform float maximumDistance;\nuniform bool repeat;\nuniform vec2 fadeDirection;\nuniform vec2 time;\n\nfloat getTime(float t, float coord)\n{\n float scalar = 1.0 / maximumDistance;\n float q = distance(t, coord) * scalar;\n if (repeat)\n {\n float r = distance(t, coord + 1.0) * scalar;\n float s = distance(t, coord - 1.0) * scalar;\n q = min(min(r, s), q);\n }\n return clamp(q, 0.0, 1.0);\n}\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n \n vec2 st = materialInput.st;\n float s = getTime(time.x, st.s) * fadeDirection.s;\n float t = getTime(time.y, st.t) * fadeDirection.t;\n \n float u = length(vec2(s, t));\n vec4 color = mix(fadeInColor, fadeOutColor, u);\n \n material.emission = color.rgb;\n material.alpha = color.a;\n \n return material;\n}\n"}),define("Cesium/Shaders/Materials/GridMaterial",[],function(){"use strict";return'#ifdef GL_OES_standard_derivatives\n #extension GL_OES_standard_derivatives : enable\n#endif\n\nuniform vec4 color;\nuniform float cellAlpha;\nuniform vec2 lineCount;\nuniform vec2 lineThickness;\nuniform vec2 lineOffset;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n vec2 st = materialInput.st;\n\n float scaledWidth = fract(lineCount.s * st.s - lineOffset.s);\n scaledWidth = abs(scaledWidth - floor(scaledWidth + 0.5));\n float scaledHeight = fract(lineCount.t * st.t - lineOffset.t);\n scaledHeight = abs(scaledHeight - floor(scaledHeight + 0.5));\n\n float value;\n#ifdef GL_OES_standard_derivatives\n // Fuzz Factor - Controls blurriness of lines\n const float fuzz = 1.2;\n vec2 thickness = (lineThickness * czm_resolutionScale) - 1.0;\n\n // From "3D Engine Design for Virtual Globes" by Cozzi and Ring, Listing 4.13.\n vec2 dx = abs(dFdx(st));\n vec2 dy = abs(dFdy(st));\n vec2 dF = vec2(max(dx.s, dy.s), max(dx.t, dy.t)) * lineCount;\n value = min(\n smoothstep(dF.s * thickness.s, dF.s * (fuzz + thickness.s), scaledWidth),\n smoothstep(dF.t * thickness.t, dF.t * (fuzz + thickness.t), scaledHeight));\n#else\n // Fuzz Factor - Controls blurriness of lines\n const float fuzz = 0.05;\n\n vec2 range = 0.5 - (lineThickness * 0.05);\n value = min(\n 1.0 - smoothstep(range.s, range.s + fuzz, scaledWidth),\n 1.0 - smoothstep(range.t, range.t + fuzz, scaledHeight));\n#endif\n\n // Edges taken from RimLightingMaterial.glsl\n // See http://www.fundza.com/rman_shaders/surface/fake_rim/fake_rim1.html\n float dRim = 1.0 - abs(dot(materialInput.normalEC, normalize(materialInput.positionToEyeEC)));\n float sRim = smoothstep(0.8, 1.0, dRim);\n value *= (1.0 - sRim);\n\n vec3 halfColor = color.rgb * 0.5;\n material.diffuse = halfColor;\n material.emission = halfColor;\n material.alpha = color.a * (1.0 - ((1.0 - cellAlpha) * value));\n\n return material;\n}\n'}),define("Cesium/Shaders/Materials/NormalMapMaterial",[],function(){"use strict";return"uniform sampler2D image;\nuniform float strength;\nuniform vec2 repeat;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n \n vec4 textureValue = texture2D(image, fract(repeat * materialInput.st));\n vec3 normalTangentSpace = textureValue.channels;\n normalTangentSpace.xy = normalTangentSpace.xy * 2.0 - 1.0;\n normalTangentSpace.z = clamp(1.0 - strength, 0.1, 1.0);\n normalTangentSpace = normalize(normalTangentSpace);\n vec3 normalEC = materialInput.tangentToEyeMatrix * normalTangentSpace;\n \n material.normal = normalEC;\n \n return material;\n}"}),define("Cesium/Shaders/Materials/PolylineArrowMaterial",[],function(){"use strict";return"#extension GL_OES_standard_derivatives : enable\n\nuniform vec4 color;\n\nvarying float v_width;\n\nfloat getPointOnLine(vec2 p0, vec2 p1, float x)\n{\n float slope = (p0.y - p1.y) / (p0.x - p1.x);\n return slope * (x - p0.x) + p0.y;\n}\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n \n vec2 st = materialInput.st;\n \n float base = 1.0 - abs(fwidth(st.s)) * 10.0;\n vec2 center = vec2(1.0, 0.5);\n float ptOnUpperLine = getPointOnLine(vec2(base, 1.0), center, st.s);\n float ptOnLowerLine = getPointOnLine(vec2(base, 0.0), center, st.s);\n \n float halfWidth = 0.15;\n float s = step(0.5 - halfWidth, st.t);\n s *= 1.0 - step(0.5 + halfWidth, st.t);\n s *= 1.0 - step(base, st.s);\n \n float t = step(base, materialInput.st.s);\n t *= 1.0 - step(ptOnUpperLine, st.t);\n t *= step(ptOnLowerLine, st.t);\n \n // Find the distance from the closest separator (region between two colors)\n float dist;\n if (st.s < base)\n {\n float d1 = abs(st.t - (0.5 - halfWidth));\n float d2 = abs(st.t - (0.5 + halfWidth));\n dist = min(d1, d2);\n }\n else\n {\n float d1 = czm_infinity;\n if (st.t < 0.5 - halfWidth && st.t > 0.5 + halfWidth)\n {\n d1 = abs(st.s - base);\n }\n float d2 = abs(st.t - ptOnUpperLine);\n float d3 = abs(st.t - ptOnLowerLine);\n dist = min(min(d1, d2), d3);\n }\n \n vec4 outsideColor = vec4(0.0);\n vec4 currentColor = mix(outsideColor, color, clamp(s + t, 0.0, 1.0));\n vec4 outColor = czm_antialias(outsideColor, color, currentColor, dist);\n \n material.diffuse = outColor.rgb;\n material.alpha = outColor.a;\n return material;\n}\n"}),define("Cesium/Shaders/Materials/PolylineGlowMaterial",[],function(){"use strict";return"uniform vec4 color;\nuniform float glowPower;\n\nvarying float v_width;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n vec2 st = materialInput.st;\n float glow = glowPower / abs(st.t - 0.5) - (glowPower / 0.5);\n\n material.emission = max(vec3(glow - 1.0 + color.rgb), color.rgb);\n material.alpha = clamp(0.0, 1.0, glow) * color.a;\n\n return material;\n}\n"}),define("Cesium/Shaders/Materials/PolylineOutlineMaterial",[],function(){"use strict";return"uniform vec4 color;\nuniform vec4 outlineColor;\nuniform float outlineWidth;\n\nvarying float v_width;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n \n vec2 st = materialInput.st;\n float halfInteriorWidth = 0.5 * (v_width - outlineWidth) / v_width;\n float b = step(0.5 - halfInteriorWidth, st.t);\n b *= 1.0 - step(0.5 + halfInteriorWidth, st.t);\n \n // Find the distance from the closest separator (region between two colors)\n float d1 = abs(st.t - (0.5 - halfInteriorWidth));\n float d2 = abs(st.t - (0.5 + halfInteriorWidth));\n float dist = min(d1, d2);\n \n vec4 currentColor = mix(outlineColor, color, b);\n vec4 outColor = czm_antialias(outlineColor, color, currentColor, dist);\n \n material.diffuse = outColor.rgb;\n material.alpha = outColor.a;\n \n return material;\n}\n"}),define("Cesium/Shaders/Materials/RimLightingMaterial",[],function(){"use strict";return"uniform vec4 color;\nuniform vec4 rimColor;\nuniform float width;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n // See http://www.fundza.com/rman_shaders/surface/fake_rim/fake_rim1.html\n float d = 1.0 - dot(materialInput.normalEC, normalize(materialInput.positionToEyeEC));\n float s = smoothstep(1.0 - width, 1.0, d);\n\n material.diffuse = color.rgb;\n material.emission = rimColor.rgb * s; \n material.alpha = mix(color.a, rimColor.a, s);\n\n return material;\n}\n"}),define("Cesium/Shaders/Materials/StripeMaterial",[],function(){"use strict";return"uniform vec4 evenColor;\nuniform vec4 oddColor;\nuniform float offset;\nuniform float repeat;\nuniform bool horizontal;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n // Based on the Stripes Fragment Shader in the Orange Book (11.1.2)\n float coord = mix(materialInput.st.s, materialInput.st.t, float(horizontal));\n float value = fract((coord - offset) * (repeat * 0.5));\n float dist = min(value, min(abs(value - 0.5), 1.0 - value));\n \n vec4 currentColor = mix(evenColor, oddColor, step(0.5, value));\n vec4 color = czm_antialias(evenColor, oddColor, currentColor, dist);\n \n material.diffuse = color.rgb;\n material.alpha = color.a;\n \n return material;\n}\n"}),define("Cesium/Shaders/Materials/Water",[],function(){"use strict";return"// Thanks for the contribution Jonas\n// http://29a.ch/2012/7/19/webgl-terrain-rendering-water-fog\n\nuniform sampler2D specularMap;\nuniform sampler2D normalMap;\nuniform vec4 baseWaterColor;\nuniform vec4 blendColor;\nuniform float frequency;\nuniform float animationSpeed;\nuniform float amplitude;\nuniform float specularIntensity;\nuniform float fadeFactor;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n float time = czm_frameNumber * animationSpeed;\n \n // fade is a function of the distance from the fragment and the frequency of the waves\n float fade = max(1.0, (length(materialInput.positionToEyeEC) / 10000000000.0) * frequency * fadeFactor);\n \n float specularMapValue = texture2D(specularMap, materialInput.st).r;\n \n // note: not using directional motion at this time, just set the angle to 0.0;\n vec4 noise = czm_getWaterNoise(normalMap, materialInput.st * frequency, time, 0.0);\n vec3 normalTangentSpace = noise.xyz * vec3(1.0, 1.0, (1.0 / amplitude));\n \n // fade out the normal perturbation as we move further from the water surface\n normalTangentSpace.xy /= fade;\n \n // attempt to fade out the normal perturbation as we approach non water areas (low specular map value)\n normalTangentSpace = mix(vec3(0.0, 0.0, 50.0), normalTangentSpace, specularMapValue);\n \n normalTangentSpace = normalize(normalTangentSpace);\n \n // get ratios for alignment of the new normal vector with a vector perpendicular to the tangent plane\n float tsPerturbationRatio = clamp(dot(normalTangentSpace, vec3(0.0, 0.0, 1.0)), 0.0, 1.0);\n \n // fade out water effect as specular map value decreases\n material.alpha = specularMapValue;\n \n // base color is a blend of the water and non-water color based on the value from the specular map\n // may need a uniform blend factor to better control this\n material.diffuse = mix(blendColor.rgb, baseWaterColor.rgb, specularMapValue);\n \n // diffuse highlights are based on how perturbed the normal is\n material.diffuse += (0.1 * tsPerturbationRatio);\n \n material.normal = normalize(materialInput.tangentToEyeMatrix * normalTangentSpace);\n \n material.specular = specularIntensity;\n material.shininess = 10.0;\n \n return material;\n}"}),define("Cesium/Scene/Material",["../Core/Cartesian2","../Core/clone","../Core/Color","../Core/combine","../Core/createGuid","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/destroyObject","../Core/DeveloperError","../Core/isArray","../Core/loadImage","../Core/Matrix2","../Core/Matrix3","../Core/Matrix4","../Renderer/CubeMap","../Renderer/Texture","../Shaders/Materials/BumpMapMaterial","../Shaders/Materials/CheckerboardMaterial","../Shaders/Materials/DotMaterial","../Shaders/Materials/FadeMaterial","../Shaders/Materials/GridMaterial","../Shaders/Materials/NormalMapMaterial","../Shaders/Materials/PolylineArrowMaterial","../Shaders/Materials/PolylineGlowMaterial","../Shaders/Materials/PolylineOutlineMaterial","../Shaders/Materials/RimLightingMaterial","../Shaders/Materials/StripeMaterial","../Shaders/Materials/Water","../ThirdParty/when"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g,v,_,y,C,w,E,b,S,T,x,A,P,M){"use strict";function D(e){this.type=void 0,this.shaderSource=void 0,this.materials=void 0,this.uniforms=void 0,this._uniforms=void 0,this.translucent=void 0,this._strict=void 0,this._template=void 0,this._count=void 0,this._texturePaths={},this._loadedImages=[],this._loadedCubeMaps=[],this._textures={},this._updateFunctions=[],this._defaultTexture=void 0,I(e,this),s(this,{type:{value:this.type,writable:!1}}),a(D._uniformList[this.type])||(D._uniformList[this.type]=Object.keys(this._uniforms))}function I(e,i){e=o(e,o.EMPTY_OBJECT),i._strict=o(e.strict,!1),i._count=o(e.count,0),i._template=t(o(e.fabric,o.EMPTY_OBJECT)),i._template.uniforms=t(o(i._template.uniforms,o.EMPTY_OBJECT)),i._template.materials=t(o(i._template.materials,o.EMPTY_OBJECT)),i.type=a(i._template.type)?i._template.type:r(),i.shaderSource="",i.materials={},i.uniforms={},i._uniforms={},i._translucentFunctions=[];var s,l=D._materialCache.getMaterial(i.type);if(a(l)){var u=t(l.fabric,!0);i._template=n(i._template,u,!0),s=l.translucent}N(i),a(l)||D._materialCache.addMaterial(i.type,i),F(i),z(i),G(i);var c=0===i._translucentFunctions.length?!0:void 0;if(s=o(s,c),s=o(e.translucent,s),a(s))if("function"==typeof s){var h=function(){return s(i)};i._translucentFunctions.push(h)}else i._translucentFunctions.push(s)}function R(e,t,i,n){if(a(e))for(var r in e)if(e.hasOwnProperty(r)){var o=-1!==t.indexOf(r);(n&&!o||!n&&o)&&i(r,t)}}function O(e,t){for(var i="fabric: property name '"+e+"' is not valid. It should be ",n=0;n=2){if(s&&a(c)&&(c!==n.defaultTexture&&c.destroy(),c=void 0),!a(c)||c===n.defaultTexture)return c=new g({context:n,source:o}),void(i._textures[e]=c);c.copyFrom(o)}else a(c)||(i._textures[e]=n.defaultTexture);else{if(o instanceof g&&o!==c){i._texturePaths[e]=void 0;var d=i._textures[e];return d!==i._defaultTexture&&d.destroy(),i._textures[e]=o,l=e+"Dimensions",void(r.hasOwnProperty(l)&&(u=r[l],u.x=o._width,u.y=o._height))}a(c)||(i._texturePaths[e]=void 0,a(i._defaultTexture)||(i._defaultTexture=n.defaultTexture),c=i._textures[e]=i._defaultTexture,l=e+"Dimensions",r.hasOwnProperty(l)&&(u=r[l],u.x=c._width,u.y=c._height)),o!==D.DefaultImageId&&o!==i._texturePaths[e]&&("string"==typeof o?M(h(o),function(t){i._loadedImages.push({id:e,image:t})}):o instanceof HTMLCanvasElement&&i._loadedImages.push({id:e,image:o}),i._texturePaths[e]=o)}}}function B(e){return function(t,i){var n=t.uniforms[e];if(n instanceof f){var r=t._textures[e];return r!==t._defaultTexture&&r.destroy(),t._texturePaths[e]=void 0,void(t._textures[e]=n)}if(a(t._textures[e])||(t._texturePaths[e]=void 0,t._textures[e]=i.defaultCubeMap),n!==D.DefaultCubeMapId){var o=n.positiveX+n.negativeX+n.positiveY+n.negativeY+n.positiveZ+n.negativeZ;if(o!==t._texturePaths[e]){var s=[h(n.positiveX),h(n.negativeX),h(n.positiveY),h(n.negativeY),h(n.positiveZ),h(n.negativeZ)];M.all(s).then(function(i){t._loadedCubeMaps.push({id:e,images:i})}),t._texturePaths[e]=o}}}}function z(e){var t=e._template.uniforms;for(var i in t)t.hasOwnProperty(i)&&V(e,i)}function V(e,t){var i=e._strict,n=e._template.uniforms,r=n[t],o=U(r);if(!a(o))throw new u("fabric: uniform '"+t+"' has invalid type.");if("channels"===o){if(0===W(e,t,r,!1)&&i)throw new u("strict: shader source does not use channels '"+t+"'.")}else{if("sampler2D"===o){var s=t+"Dimensions";H(e,s)>0&&(n[s]={type:"ivec3",x:1,y:1},V(e,s))}var l=new RegExp("uniform\\s+"+o+"\\s+"+t+"\\s*;");if(!l.test(e.shaderSource)){var c="uniform "+o+" "+t+";";e.shaderSource=c+e.shaderSource}var h=t+"_"+e._count++;if(1===W(e,t,h)&&i)throw new u("strict: shader source does not use uniform '"+t+"'.");if(e.uniforms[t]=r,"sampler2D"===o)e._uniforms[h]=function(){return e._textures[t]},e._updateFunctions.push(k(t));else if("samplerCube"===o)e._uniforms[h]=function(){return e._textures[t]},e._updateFunctions.push(B(t));else if(-1!==o.indexOf("mat")){var d=new Y[o];e._uniforms[h]=function(){return Y[o].fromColumnMajorArray(e.uniforms[t],d)}}else e._uniforms[h]=function(){return e.uniforms[t]}}}function U(e){var t=e.type;if(!a(t)){var i=typeof e;if("number"===i)t="float";else if("boolean"===i)t="bool";else if("string"===i||e instanceof HTMLCanvasElement)t=/^([rgba]){1,4}$/i.test(e)?"channels":e===D.DefaultCubeMapId?"samplerCube":"sampler2D";else if("object"===i)if(c(e))(4===e.length||9===e.length||16===e.length)&&(t="mat"+Math.sqrt(e.length));else{var n=0;for(var r in e)e.hasOwnProperty(r)&&(n+=1);n>=2&&4>=n?t="vec"+n:6===n&&(t="samplerCube")}}return t}function G(e){var t=e._strict,i=e._template.materials;for(var r in i)if(i.hasOwnProperty(r)){var o=new D({strict:t,fabric:i[r],count:e._count});e._count=o._count,e._uniforms=n(e._uniforms,o._uniforms,!0),e.materials[r]=o,e._translucentFunctions=e._translucentFunctions.concat(o._translucentFunctions);var a="czm_getMaterial",s=a+"_"+e._count++;W(o,a,s),e.shaderSource=o.shaderSource+e.shaderSource;var l=s+"(materialInput)";if(0===W(e,r,l)&&t)throw new u("strict: shader source does not use material '"+r+"'.")}}function W(e,t,i,n){n=o(n,!0);var r=0,a="([\\w])?",s="([\\w"+(n?".":"")+"])?",l=new RegExp(s+t+a,"g");return e.shaderSource=e.shaderSource.replace(l,function(e,t,n){return t||n?e:(r+=1,i)}),r}function H(e,t,i){return W(e,t,t,i)}D._uniformList={},D.fromType=function(e,t){var i=new D({fabric:{type:e}});if(a(t))for(var n in t)t.hasOwnProperty(n)&&(i.uniforms[n]=t[n]);return i},D.prototype.isTranslucent=function(){if(a(this.translucent))return"function"==typeof this.translucent?this.translucent():this.translucent;for(var e=!0,t=this._translucentFunctions,i=t.length,n=0;i>n;++n){var r=t[n];if(e="function"==typeof r?e&&r():e&&r,!e)break}return e},D.prototype.update=function(e){var t,i,n=this._loadedImages,r=n.length;for(t=0;r>t;++t){var o=n[t];i=o.id;var a=o.image,s=new g({context:e,source:a});this._textures[i]=s;var l=i+"Dimensions";if(this.uniforms.hasOwnProperty(l)){var u=this.uniforms[l];u.x=s._width,u.y=s._height}}n.length=0;var c=this._loadedCubeMaps;for(r=c.length,t=0;r>t;++t){var h=c[t];i=h.id;var d=h.images,p=new f({context:e,source:{positiveX:d[0],negativeX:d[1],positiveY:d[2],negativeY:d[3],positiveZ:d[4],negativeZ:d[5]}});this._textures[i]=p}c.length=0;var m=this._updateFunctions;for(r=m.length,t=0;r>t;++t)m[t](this,e);var v=this.materials;for(var _ in v)v.hasOwnProperty(_)&&v[_].update(e)},D.prototype.isDestroyed=function(){return!1},D.prototype.destroy=function(){var e=this._textures;for(var t in e)if(e.hasOwnProperty(t)){var i=e[t];i!==this._defaultTexture&&i.destroy()}var n=this.materials;for(var r in n)n.hasOwnProperty(r)&&n[r].destroy();return l(this)};var q=["type","materials","uniforms","components","source"],j=["diffuse","specular","shininess","normal","emission","alpha"],Y={mat2:d,mat3:p,mat4:m};return D._materialCache={_materials:{},addMaterial:function(e,t){this._materials[e]=t},getMaterial:function(e){return this._materials[e]}},D.DefaultImageId="czm_defaultImage",D.DefaultCubeMapId="czm_defaultCubeMap",D.ColorType="Color",D._materialCache.addMaterial(D.ColorType,{fabric:{type:D.ColorType,uniforms:{color:new i(1,0,0,.5)},components:{diffuse:"color.rgb",alpha:"color.a"}},translucent:function(e){return e.uniforms.color.alpha<1}}),D.ImageType="Image",D._materialCache.addMaterial(D.ImageType,{fabric:{type:D.ImageType,uniforms:{image:D.DefaultImageId,repeat:new e(1,1),color:new i(1,1,1,1)},components:{diffuse:"texture2D(image, fract(repeat * materialInput.st)).rgb * color.rgb",alpha:"texture2D(image, fract(repeat * materialInput.st)).a * color.a"}},translucent:function(e){return e.uniforms.color.alpha<1}}),D.DiffuseMapType="DiffuseMap",D._materialCache.addMaterial(D.DiffuseMapType,{fabric:{type:D.DiffuseMapType,uniforms:{image:D.DefaultImageId,channels:"rgb",repeat:new e(1,1)},components:{diffuse:"texture2D(image, fract(repeat * materialInput.st)).channels"}},translucent:!1}),D.AlphaMapType="AlphaMap",D._materialCache.addMaterial(D.AlphaMapType,{fabric:{type:D.AlphaMapType,uniforms:{image:D.DefaultImageId,channel:"a",repeat:new e(1,1)},components:{alpha:"texture2D(image, fract(repeat * materialInput.st)).channel"}},translucent:!0}),D.SpecularMapType="SpecularMap",D._materialCache.addMaterial(D.SpecularMapType,{fabric:{type:D.SpecularMapType,uniforms:{image:D.DefaultImageId,channel:"r",repeat:new e(1,1)},components:{specular:"texture2D(image, fract(repeat * materialInput.st)).channel"}},translucent:!1}),D.EmissionMapType="EmissionMap",D._materialCache.addMaterial(D.EmissionMapType,{fabric:{type:D.EmissionMapType,uniforms:{image:D.DefaultImageId,channels:"rgb",repeat:new e(1,1)},components:{emission:"texture2D(image, fract(repeat * materialInput.st)).channels"}},translucent:!1}),D.BumpMapType="BumpMap",D._materialCache.addMaterial(D.BumpMapType,{fabric:{type:D.BumpMapType,uniforms:{image:D.DefaultImageId,channel:"r",strength:.8,repeat:new e(1,1)},source:v},translucent:!1}),D.NormalMapType="NormalMap",D._materialCache.addMaterial(D.NormalMapType,{fabric:{type:D.NormalMapType,uniforms:{image:D.DefaultImageId,channels:"rgb",strength:.8,repeat:new e(1,1)},source:E},translucent:!1}),D.GridType="Grid",D._materialCache.addMaterial(D.GridType,{fabric:{type:D.GridType,uniforms:{color:new i(0,1,0,1),cellAlpha:.1,lineCount:new e(8,8),lineThickness:new e(1,1),lineOffset:new e(0,0)},source:w},translucent:function(e){var t=e.uniforms;return t.color.alpha<1||t.cellAlpha<1}}),D.StripeType="Stripe",D._materialCache.addMaterial(D.StripeType,{fabric:{type:D.StripeType,uniforms:{horizontal:!0,evenColor:new i(1,1,1,.5),oddColor:new i(0,0,1,.5),offset:0,repeat:5},source:A},translucent:function(e){var t=e.uniforms;return t.evenColor.alpha<1||t.oddColor.alpha<0}}),D.CheckerboardType="Checkerboard",D._materialCache.addMaterial(D.CheckerboardType,{fabric:{type:D.CheckerboardType,uniforms:{lightColor:new i(1,1,1,.5),darkColor:new i(0,0,0,.5),repeat:new e(5,5)},source:_},translucent:function(e){var t=e.uniforms;return t.lightColor.alpha<1||t.darkColor.alpha<0}}),D.DotType="Dot",D._materialCache.addMaterial(D.DotType,{fabric:{type:D.DotType,uniforms:{lightColor:new i(1,1,0,.75),darkColor:new i(0,1,1,.75),repeat:new e(5,5)},source:y},translucent:function(e){var t=e.uniforms;return t.lightColor.alpha<1||t.darkColor.alpha<0}}),D.WaterType="Water",D._materialCache.addMaterial(D.WaterType,{fabric:{type:D.WaterType,uniforms:{baseWaterColor:new i(.2,.3,.6,1),blendColor:new i(0,1,.699,1),specularMap:D.DefaultImageId,normalMap:D.DefaultImageId,frequency:10,animationSpeed:.01,amplitude:1,specularIntensity:.5,fadeFactor:1},source:P},translucent:function(e){var t=e.uniforms;return t.baseWaterColor.alpha<1||t.blendColor.alpha<0}}),D.RimLightingType="RimLighting",D._materialCache.addMaterial(D.RimLightingType,{fabric:{type:D.RimLightingType,uniforms:{color:new i(1,0,0,.7),rimColor:new i(1,1,1,.4),width:.3},source:x},translucent:function(e){var t=e.uniforms;return t.color.alpha<1||t.rimColor.alpha<0}}),D.FadeType="Fade",D._materialCache.addMaterial(D.FadeType,{fabric:{type:D.FadeType,uniforms:{fadeInColor:new i(1,0,0,1),fadeOutColor:new i(0,0,0,0),maximumDistance:.5,repeat:!0,fadeDirection:{x:!0,y:!0},time:new e(.5,.5)},source:C},translucent:function(e){var t=e.uniforms;return t.fadeInColor.alpha<1||t.fadeOutColor.alpha<0}}),D.PolylineArrowType="PolylineArrow",D._materialCache.addMaterial(D.PolylineArrowType,{fabric:{type:D.PolylineArrowType,uniforms:{color:new i(1,1,1,1)},source:b},translucent:!0}),D.PolylineGlowType="PolylineGlow",D._materialCache.addMaterial(D.PolylineGlowType,{fabric:{type:D.PolylineGlowType,uniforms:{color:new i(0,.5,1,1),glowPower:.25},source:S},translucent:!0}),D.PolylineOutlineType="PolylineOutline",D._materialCache.addMaterial(D.PolylineOutlineType,{fabric:{type:D.PolylineOutlineType,uniforms:{color:new i(1,1,1,1),outlineColor:new i(1,0,0,1),outlineWidth:1},source:T},translucent:function(e){var t=e.uniforms;return t.color.alpha<1||t.outlineColor.alpha<1}}),D}),define("Cesium/Scene/MaterialAppearance",["../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/freezeObject","../Core/VertexFormat","../Shaders/Appearances/AllMaterialAppearanceFS","../Shaders/Appearances/AllMaterialAppearanceVS","../Shaders/Appearances/BasicMaterialAppearanceFS","../Shaders/Appearances/BasicMaterialAppearanceVS","../Shaders/Appearances/TexturedMaterialAppearanceFS","../Shaders/Appearances/TexturedMaterialAppearanceVS","./Appearance","./Material"],function(e,t,i,n,r,o,a,s,l,u,c,h,d){ +"use strict";function p(i){i=e(i,e.EMPTY_OBJECT);var n=e(i.translucent,!0),r=e(i.closed,!1),o=e(i.materialSupport,p.MaterialSupport.TEXTURED);this.material=t(i.material)?i.material:d.fromType(d.ColorType),this.translucent=n,this._vertexShaderSource=e(i.vertexShaderSource,o.vertexShaderSource),this._fragmentShaderSource=e(i.fragmentShaderSource,o.fragmentShaderSource),this._renderState=h.getDefaultRenderState(n,r,i.renderState),this._closed=r,this._materialSupport=o,this._vertexFormat=o.vertexFormat,this._flat=e(i.flat,!1),this._faceForward=e(i.faceForward,!r)}return i(p.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},materialSupport:{get:function(){return this._materialSupport}},vertexFormat:{get:function(){return this._vertexFormat}},flat:{get:function(){return this._flat}},faceForward:{get:function(){return this._faceForward}}}),p.prototype.getFragmentShaderSource=h.prototype.getFragmentShaderSource,p.prototype.isTranslucent=h.prototype.isTranslucent,p.prototype.getRenderState=h.prototype.getRenderState,p.MaterialSupport={BASIC:n({vertexFormat:r.POSITION_AND_NORMAL,vertexShaderSource:l,fragmentShaderSource:s}),TEXTURED:n({vertexFormat:r.POSITION_NORMAL_AND_ST,vertexShaderSource:c,fragmentShaderSource:u}),ALL:n({vertexFormat:r.ALL,vertexShaderSource:a,fragmentShaderSource:o})},p}),define("Cesium/Shaders/Appearances/PerInstanceColorAppearanceFS",[],function(){"use strict";return"varying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec4 v_color;\n\nvoid main()\n{\n vec3 positionToEyeEC = -v_positionEC;\n \n vec3 normalEC = normalize(v_normalEC);\n#ifdef FACE_FORWARD\n normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);\n#endif\n \n czm_materialInput materialInput;\n materialInput.normalEC = normalEC;\n materialInput.positionToEyeEC = positionToEyeEC;\n czm_material material = czm_getDefaultMaterial(materialInput);\n material.diffuse = v_color.rgb;\n material.alpha = v_color.a;\n \n gl_FragColor = czm_phong(normalize(positionToEyeEC), material);\n}\n"}),define("Cesium/Shaders/Appearances/PerInstanceColorAppearanceVS",[],function(){"use strict";return"attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 normal;\nattribute vec4 color;\n\nvarying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec4 v_color;\n\nvoid main() \n{\n vec4 p = czm_computePosition();\n\n v_positionEC = (czm_modelViewRelativeToEye * p).xyz; // position in eye coordinates\n v_normalEC = czm_normal * normal; // normal in eye coordinates\n v_color = color;\n \n gl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n"}),define("Cesium/Shaders/Appearances/PerInstanceFlatColorAppearanceFS",[],function(){"use strict";return"varying vec4 v_color;\n\nvoid main()\n{\n gl_FragColor = v_color;\n}\n"}),define("Cesium/Shaders/Appearances/PerInstanceFlatColorAppearanceVS",[],function(){"use strict";return"attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec4 color;\n\nvarying vec4 v_color;\n\nvoid main() \n{\n vec4 p = czm_computePosition();\n\n v_color = color;\n \n gl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n"}),define("Cesium/Scene/PerInstanceColorAppearance",["../Core/defaultValue","../Core/defineProperties","../Core/VertexFormat","../Shaders/Appearances/PerInstanceColorAppearanceFS","../Shaders/Appearances/PerInstanceColorAppearanceVS","../Shaders/Appearances/PerInstanceFlatColorAppearanceFS","../Shaders/Appearances/PerInstanceFlatColorAppearanceVS","./Appearance"],function(e,t,i,n,r,o,a,s){"use strict";function l(t){t=e(t,e.EMPTY_OBJECT);var i=e(t.translucent,!0),u=e(t.closed,!1),c=e(t.flat,!1),h=c?a:r,d=c?o:n,p=c?l.FLAT_VERTEX_FORMAT:l.VERTEX_FORMAT;this.material=void 0,this.translucent=i,this._vertexShaderSource=e(t.vertexShaderSource,h),this._fragmentShaderSource=e(t.fragmentShaderSource,d),this._renderState=s.getDefaultRenderState(i,u,t.renderState),this._closed=u,this._vertexFormat=p,this._flat=c,this._faceForward=e(t.faceForward,!u)}return t(l.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},vertexFormat:{get:function(){return this._vertexFormat}},flat:{get:function(){return this._flat}},faceForward:{get:function(){return this._faceForward}}}),l.VERTEX_FORMAT=i.POSITION_AND_NORMAL,l.FLAT_VERTEX_FORMAT=i.POSITION_ONLY,l.prototype.getFragmentShaderSource=s.prototype.getFragmentShaderSource,l.prototype.isTranslucent=s.prototype.isTranslucent,l.prototype.getRenderState=s.prototype.getRenderState,l}),define("Cesium/Scene/PrimitivePipeline",["../Core/BoundingSphere","../Core/Color","../Core/ComponentDatatype","../Core/defaultValue","../Core/defined","../Core/DeveloperError","../Core/Ellipsoid","../Core/FeatureDetection","../Core/GeographicProjection","../Core/Geometry","../Core/GeometryAttribute","../Core/GeometryAttributes","../Core/GeometryPipeline","../Core/IndexDatatype","../Core/Matrix4","../Core/WebMercatorProjection"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f){"use strict";function g(e,t,i){var n,r=!i,o=e.length;if(!r&&o>1){var a=e[0].modelMatrix;for(n=1;o>n;++n)if(!m.equals(a,e[n].modelMatrix)){r=!0;break}}if(r)for(n=0;o>n;++n)d.transformToWorldCoordinates(e[n]);else m.multiplyTransformation(t,e[0].modelMatrix,t)}function v(e,n){var r=e.attributes,o=r.position,a=4*(o.values.length/o.componentsPerAttribute);r.pickColor=new c({componentDatatype:i.UNSIGNED_BYTE,componentsPerAttribute:4,normalize:!0,values:new Uint8Array(a)});for(var s=t.floatToByte(n.red),l=t.floatToByte(n.green),u=t.floatToByte(n.blue),h=t.floatToByte(n.alpha),d=r.pickColor.values,p=0;a>p;p+=4)d[p]=s,d[p+1]=l,d[p+2]=u,d[p+3]=h}function _(e,t){for(var i=e.length,n=0;i>n;++n){var o=e[n],a=t[n];r(o.geometry)?v(o.geometry,a):(v(o.westHemisphereGeometry,a),v(o.eastHemisphereGeometry,a))}}function y(e){var t,i=e.length,n=[],o=e[0].attributes;for(t in o)if(o.hasOwnProperty(t)){for(var a=o[t],s=!0,l=1;i>l;++l){var u=e[l].attributes[t];if(!r(u)||a.componentDatatype!==u.componentDatatype||a.componentsPerAttribute!==u.componentsPerAttribute||a.normalize!==u.normalize){s=!1;break}}s&&n.push(t)}return n}function C(e,t,n){for(var r=u.computeNumberOfVertices(t),o=n.length,a=0;o>a;++a){for(var s=n[a],l=e[s],h=l.componentDatatype,d=l.value,p=l.componentsPerAttribute,m=i.createTypedArray(h,r*p),f=0;r>f;++f)m.set(d,f*p);t.attributes[s]=new c({componentDatatype:h,componentsPerAttribute:p,normalize:l.normalize,values:m})}}function w(e,t){for(var i=e.length,n=0;i>n;++n){var o=e[n],a=o.attributes;r(o.geometry)?C(a,o.geometry,t):(C(a,o.westHemisphereGeometry,t),C(a,o.eastHemisphereGeometry,t))}}function E(t){var n,o,a=t.instances,s=t.pickIds,l=t.projection,u=t.elementIndexUintSupported,c=t.scene3DOnly,h=t.allowPicking,p=t.vertexCacheOptimize,m=t.compressVertices,f=t.modelMatrix,v=a.length;a[0].geometry.primitiveType;if(g(a,f,c),!c)for(n=0;v>n;++n)d.splitLongitude(a[n]);h&&_(a,s);var C=y(a);if(w(a,C),p)for(n=0;v>n;++n){var E=a[n];r(E.geometry)?(d.reorderForPostVertexCache(E.geometry),d.reorderForPreVertexCache(E.geometry)):(d.reorderForPostVertexCache(E.westHemisphereGeometry),d.reorderForPreVertexCache(E.westHemisphereGeometry),d.reorderForPostVertexCache(E.eastHemisphereGeometry),d.reorderForPreVertexCache(E.eastHemisphereGeometry))}var b=d.combineInstances(a);for(v=b.length,n=0;v>n;++n){o=b[n];var S,T=o.attributes;if(c)for(S in T)T.hasOwnProperty(S)&&T[S].componentDatatype===i.DOUBLE&&d.encodeAttribute(o,S,S+"3DHigh",S+"3DLow");else for(S in T)if(T.hasOwnProperty(S)&&T[S].componentDatatype===i.DOUBLE){var x=S+"3D",A=S+"2D";d.projectTo2D(o,S,x,A,l),r(o.boundingSphere)&&"position"===S&&(o.boundingSphereCV=e.fromVertices(o.attributes.position2D.values)),d.encodeAttribute(o,x,x+"High",x+"Low"),d.encodeAttribute(o,A,A+"High",A+"Low")}m&&d.compressVertices(o)}if(!u){var P=[];for(v=b.length,n=0;v>n;++n)o=b[n],P=P.concat(d.fitToUnsignedShortIndices(o));b=P}return b}function b(e,t,n){for(var r=[],o=e.attributes,a=n.length,s=0;a>s;++s){var l=n[s],u=o[l],c=u.componentDatatype;c===i.DOUBLE&&(c=i.FLOAT);var h=i.createTypedArray(c,u.values);r.push({index:t[l],componentDatatype:c,componentsPerAttribute:u.componentsPerAttribute,normalize:u.normalize,values:h}),delete o[l]}return r}function S(e,t,i,o,a,s,l,c,h){var d=u.computeNumberOfVertices(t);r(l[e])||(l[e]={boundingSphere:t.boundingSphere,boundingSphereCV:t.boundingSphereCV});for(var p=o.length,m=0;p>m;++m)for(var f=o[m],g=a[f],v=d;v>0;){for(var _,y=n(h[f],0),C=s[y],w=C.length,E=0;w>E&&(_=C[E],_.index!==g);++E);r(l[e][f])||(l[e][f]={dirty:!1,valid:!0,value:i[f].value,indices:[]});var b,S=_.values.length/_.componentsPerAttribute,T=n(c[f],0);S>T+v?(b=v,l[e][f].indices.push({attribute:_,offset:T,count:b}),c[f]=T+v):(b=S-T,l[e][f].indices.push({attribute:_,offset:T,count:b}),c[f]=0,h[f]=y+1),v-=b}}function T(e,t,i,n,o){var a,s,l,u=[],c=e.length,h={},d={};for(a=0;c>a;++a)s=e[a],l=s.attributes,r(s.geometry)&&S(a,s.geometry,l,o,n,i,u,h,d);for(a=0;c>a;++a)s=e[a],l=s.attributes,r(s.westHemisphereGeometry)&&S(a,s.westHemisphereGeometry,l,o,n,i,u,h,d);for(a=0;c>a;++a)s=e[a],l=s.attributes,r(s.eastHemisphereGeometry)&&S(a,s.eastHemisphereGeometry,l,o,n,i,u,h,d);for(c=t.length,a=0;c>a;++a){s=t[a],l=s.attributes;var p={};u.push(p);for(var m=o.length,f=0;m>f;++f){var g=o[f];p[g]={dirty:!1,valid:!1,value:l[g].value,indices:[]}}}return u}function x(e,t,i,n){var o,a,s,l=n.length-1;if(l>=0){var u=n[l];o=u.offset+u.count,s=u.index,a=i[s].indices.length}else o=0,s=0,a=i[s].indices.length;for(var c=e.length,h=0;c>h;++h){var d=e[h],p=d[t];if(r(p)){var m=p.indices.length;o+m>a&&(o=0,a=i[++s].indices.length),n.push({index:s,offset:o,count:m}),o+=m}}}function A(e,t){var i=[];return x(e,"geometry",t,i),x(e,"westHemisphereGeometry",t,i),x(e,"eastHemisphereGeometry",t,i),i}function P(e,t){var i=e.attributes;for(var n in i)if(i.hasOwnProperty(n)){var o=i[n];r(o)&&r(o.values)&&t.push(o.values.buffer)}r(e.indices)&&t.push(e.indices.buffer)}function M(e,t){for(var i=e.length,n=0;i>n;++n)P(e[n],t)}function D(e,t){for(var i=e.length,n=0;i>n;++n)for(var r=e[n],o=r.length,a=0;o>a;++a)t.push(r[a].values.buffer)}function I(t){for(var i=1,n=t.length,o=0;n>o;o++){var a=t[o];if(++i,r(a)){var s=a.attributes;i+=6+2*e.packedLength+(r(a.indices)?a.indices.length:0);for(var l in s)if(s.hasOwnProperty(l)&&r(s[l])){var u=s[l];i+=5+u.values.length}}}return i}function R(e,t){for(var i=e.length,n=new Uint32Array(e.length),r=0;i>r;++r)n[r]=e[r].toRgba();return t.push(n.buffer),n}function O(e){for(var i=e.length,n=new Array(i),r=0;i>r;r++)n[r]=t.fromRgba(e[r]);return n}function L(e){for(var t=e.length,i=1+17*t,n=0;t>n;n++){var o=e[n].attributes;for(var a in o)if(o.hasOwnProperty(a)&&r(o[a])){var s=o[a];i+=5+s.value.length}}return i}function N(e,t){var i=new Float64Array(L(e)),n={},o=[],a=e.length,s=0;i[s++]=a;for(var l=0;a>l;l++){var u=e[l];m.pack(u.modelMatrix,i,s),s+=m.packedLength;var c=u.attributes,h=[];for(var d in c)c.hasOwnProperty(d)&&r(c[d])&&(h.push(d),r(n[d])||(n[d]=o.length,o.push(d)));i[s++]=h.length;for(var p=0;pc;c++){for(var h=n[t[a++]],d=t[a++],p=t[a++],f=0!==t[a++],g=t[a++],v=i.createTypedArray(d,g),_=0;g>_;_++)v[_]=t[a++];l[h]={componentDatatype:d,componentsPerAttribute:p,normalize:f,value:v}}r[o++]={attributes:l,modelMatrix:s}}return r}function k(t){for(var i=t.length,n=1+i,o=0;i>o;o++){var a=t[o];n+=2,n+=r(a.boundingSphere)?e.packedLength:0,n+=r(a.boundingSphereCV)?e.packedLength:0;for(var s in a)if(a.hasOwnProperty(s)&&r(a[s])&&"boundingSphere"!==s&&"boundingSphereCV"!==s){var l=a[s];n+=4+3*l.indices.length+l.value.length}}return n}function B(t,i){var n=new Float64Array(k(t)),o=[],a=[],s={},l=t.length,u=0;n[u++]=l;for(var c=0;l>c;c++){var h=t[c],d=h.boundingSphere,p=r(d);n[u++]=p?1:0,p&&(e.pack(d,n,u),u+=e.packedLength),d=h.boundingSphereCV,p=r(d),n[u++]=p?1:0,p&&(e.pack(d,n,u),u+=e.packedLength);var m=[];for(var f in h)h.hasOwnProperty(f)&&r(h[f])&&"boundingSphere"!==f&&"boundingSphereCV"!==f&&(m.push(f),r(s[f])||(s[f]=o.length,o.push(f)));n[u++]=m.length;for(var g=0;gw;w++){var E=y[w];n[u++]=E.count,n[u++]=E.offset;var b=a.indexOf(E.attribute);-1===b&&(b=a.length,a.push(E.attribute)),n[u++]=b}n[u++]=_.value.length,n.set(_.value,u),u+=_.value.length}}return i.push(n.buffer),{stringTable:o,packedData:n,attributeTable:a}}function z(t,n){for(var r=t.stringTable,o=t.attributeTable,a=t.packedData,s=new Array(a[0]),l=0,u=1,c=a.length;c>u;){var h={},d=1===a[u++];d&&(h.boundingSphere=e.unpack(a,u),u+=e.packedLength),d=1===a[u++],d&&(h.boundingSphereCV=e.unpack(a,u),u+=e.packedLength);for(var p=a[u++],m=0;p>m;m++){for(var f=r[a[u++]],g=1===a[u++],v=a[u++],_=v>0?new Array(v):void 0,y=0;v>y;y++){var C={};C.count=a[u++],C.offset=a[u++],C.attribute=o[a[u++]],_[y]=C}for(var w=a[u++],E=g?i.createTypedArray(_[0].attribute.componentDatatype,w):new Array(w),b=0;w>b;b++)E[b]=a[u++];h[f]={dirty:!1,valid:g,indices:_,value:E}}s[l++]=h}return s}if(!s.supportsTypedArrays())return{};var V={};return V.combineGeometry=function(e){var t,i,n,o,a,s=e.instances,l=e.invalidInstances;if(s.length>0){t=E(e),i=d.createAttributeLocations(t[0]),o=y(s),n=[],a=t.length;for(var u=0;a>u;++u){var c=t[u];n.push(b(c,i,o))}}o=r(o)?o:y(l);var h,p=T(s,l,n,i,o);return e.createPickOffsets&&r(t)&&(h=A(s,t)),{geometries:t,modelMatrix:e.modelMatrix,attributeLocations:i,vaAttributes:n,vaAttributeLocations:p,validInstancesIndices:e.validInstancesIndices,invalidInstancesIndices:e.invalidInstancesIndices,pickOffsets:h}},V.packCreateGeometryResults=function(t,i){var n=new Float64Array(I(t)),o=[],a={},s=t.length,l=0;n[l++]=s;for(var u=0;s>u;u++){var c=t[u],h=r(c);if(n[l++]=h?1:0,h){n[l++]=c.primitiveType,n[l++]=c.geometryType;var d=r(c.boundingSphere)?1:0;n[l++]=d,d&&e.pack(c.boundingSphere,n,l),l+=e.packedLength;var p=r(c.boundingSphereCV)?1:0;n[l++]=p,p&&e.pack(c.boundingSphereCV,n,l),l+=e.packedLength;var m=c.attributes,f=[];for(var g in m)m.hasOwnProperty(g)&&r(m[g])&&(f.push(g),r(a[g])||(a[g]=o.length,o.push(g)));n[l++]=f.length;for(var v=0;v0&&(n.set(c.indices,l),l+=C)}}return i.push(n.buffer),{stringTable:o,packedData:n}},V.unpackCreateGeometryResults=function(t){for(var n,r=t.stringTable,o=t.packedData,a=new Array(o[0]),s=0,l=1;ln;n++){var T=r[o[l++]],x=o[l++];E=o[l++];var A=0!==o[l++];C=o[l++],w=i.createTypedArray(x,C);for(var P=0;C>P;P++)w[P]=o[l++];b[T]=new c({componentDatatype:x,componentsPerAttribute:E,normalize:A,values:w})}var M;if(C=o[l++],C>0){var D=w.length/E;for(M=p.createTypedArray(D,C),n=0;C>n;n++)M[n]=o[l++]}a[s++]=new u({primitiveType:g,geometryType:v,boundingSphere:m,indices:M,attributes:b})}else a[s++]=void 0}return a},V.packCombineGeometryParameters=function(e,t){for(var i=e.createGeometryResults,n=i.length,r=0;n>r;r++)t.push(i[r].packedData.buffer);var o;return e.allowPicking&&(o=R(e.pickIds,t)),{createGeometryResults:e.createGeometryResults,packedInstances:N(e.instances,t),packedPickIds:o,ellipsoid:e.ellipsoid,isGeographic:e.projection instanceof l,elementIndexUintSupported:e.elementIndexUintSupported,scene3DOnly:e.scene3DOnly,allowPicking:e.allowPicking,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:e.modelMatrix,createPickOffsets:e.createPickOffsets}},V.unpackCombineGeometryParameters=function(e){for(var t=F(e.packedInstances),i=e.allowPicking,n=i?O(e.packedPickIds):void 0,o=e.createGeometryResults,s=o.length,u=0,c=[],h=[],d=[],p=[],g=[],v=0;s>v;v++)for(var _=V.unpackCreateGeometryResults(o[v]),y=_.length,C=0;y>C;C++){var w=_[C],E=t[u];r(w)?(E.geometry=w,c.push(E),d.push(u),i&&g.push(n[u])):(h.push(E),p.push(u)),++u}var b=a.clone(e.ellipsoid),S=e.isGeographic?new l(b):new f(b);return{instances:c,invalidInstances:h,validInstancesIndices:d,invalidInstancesIndices:p,pickIds:g,ellipsoid:b,projection:S,elementIndexUintSupported:e.elementIndexUintSupported,scene3DOnly:e.scene3DOnly,allowPicking:e.allowPicking,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:m.clone(e.modelMatrix),createPickOffsets:e.createPickOffsets}},V.packCombineGeometryResults=function(e,t){return r(e.geometries)&&(M(e.geometries,t),D(e.vaAttributes,t)),{geometries:e.geometries,attributeLocations:e.attributeLocations,vaAttributes:e.vaAttributes,packedVaAttributeLocations:B(e.vaAttributeLocations,t),modelMatrix:e.modelMatrix,validInstancesIndices:e.validInstancesIndices,invalidInstancesIndices:e.invalidInstancesIndices,pickOffsets:e.pickOffsets}},V.unpackCombineGeometryResults=function(e){return{geometries:e.geometries,attributeLocations:e.attributeLocations,vaAttributes:e.vaAttributes,perInstanceAttributeLocations:z(e.packedVaAttributeLocations,e.vaAttributes),modelMatrix:e.modelMatrix,pickOffsets:e.pickOffsets}},V}),define("Cesium/Scene/PrimitiveState",["../Core/freezeObject"],function(e){"use strict";var t={READY:0,CREATING:1,CREATED:2,COMBINING:3,COMBINED:4,COMPLETE:5,FAILED:6};return e(t)}),define("Cesium/Scene/Primitive",["../Core/BoundingSphere","../Core/Cartesian2","../Core/Cartesian3","../Core/clone","../Core/combine","../Core/ComponentDatatype","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/destroyObject","../Core/DeveloperError","../Core/FeatureDetection","../Core/Geometry","../Core/GeometryAttribute","../Core/GeometryAttributes","../Core/GeometryInstance","../Core/GeometryInstanceAttribute","../Core/isArray","../Core/Matrix4","../Core/subdivideArray","../Core/TaskProcessor","../Renderer/Buffer","../Renderer/BufferUsage","../Renderer/DrawCommand","../Renderer/RenderState","../Renderer/ShaderProgram","../Renderer/ShaderSource","../Renderer/VertexArray","../ThirdParty/when","./CullFace","./Pass","./PrimitivePipeline","./PrimitiveState","./SceneMode"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g,v,_,y,C,w,E,b,S,T,x,A,P,M,D,I,R,O){"use strict";function L(e){e=a(e,a.EMPTY_OBJECT),this.geometryInstances=e.geometryInstances,this.appearance=e.appearance,this._appearance=void 0,this._material=void 0,this.modelMatrix=_.clone(a(e.modelMatrix,_.IDENTITY)),this._modelMatrix=new _,this.show=a(e.show,!0),this._vertexCacheOptimize=a(e.vertexCacheOptimize,!1),this._interleave=a(e.interleave,!1),this._releaseGeometryInstances=a(e.releaseGeometryInstances,!0),this._allowPicking=a(e.allowPicking,!0),this._asynchronous=a(e.asynchronous,!0),this._compressVertices=a(e.compressVertices,!0),this.cull=a(e.cull,!0),this.debugShowBoundingVolume=a(e.debugShowBoundingVolume,!1),this.rtcCenter=e.rtcCenter,this.castShadows=a(e.castShadows,!1),this.receiveShadows=a(e.receiveShadows,!1),this._translucent=void 0,this._state=R.READY,this._geometries=[],this._vaAttributes=void 0,this._error=void 0,this._numberOfInstances=0,this._validModelMatrix=!1,this._boundingSpheres=[],this._boundingSphereWC=[],this._boundingSphereCV=[],this._boundingSphere2D=[],this._boundingSphereMorph=[],this._perInstanceAttributeLocations=void 0,this._perInstanceAttributeCache=[],this._instanceIds=[],this._lastPerInstanceAttributeIndex=0,this._dirtyAttributes=[],this._va=[],this._attributeLocations=void 0,this._primitiveType=void 0,this._frontFaceRS=void 0,this._backFaceRS=void 0,this._sp=void 0,this._pickRS=void 0,this._pickSP=void 0,this._pickIds=[],this._colorCommands=[],this._pickCommands=[],this._readOnlyInstanceAttributes=e._readOnlyInstanceAttributes,this._createBoundingVolumeFunction=e._createBoundingVolumeFunction,this._createRenderStatesFunction=e._createRenderStatesFunction,this._createShaderProgramFunction=e._createShaderProgramFunction,this._createCommandsFunction=e._createCommandsFunction,this._updateAndQueueCommandsFunction=e._updateAndQueueCommandsFunction,this._createPickOffsets=e._createPickOffsets,this._pickOffsets=void 0,this._createGeometryResults=void 0,this._ready=!1,this._readyPromise=P.defer()}function N(e){var t;return t=v(e.values)?e.values.slice(0):new e.values.constructor(e.values),new p({componentDatatype:e.componentDatatype,componentsPerAttribute:e.componentsPerAttribute,normalize:e.normalize,values:t})}function F(t){var i=t.attributes,n=new m;for(var r in i)i.hasOwnProperty(r)&&s(i[r])&&(n[r]=N(i[r]));var o;if(s(t.indices)){var a=t.indices;o=new a.constructor(a)}return new d({attributes:n,indices:o,primitiveType:t.primitiveType,boundingSphere:e.clone(t.boundingSphere)})}function k(e){var t;return t=v(e.value)?e.value.slice(0):new e.value.constructor(e.value),new g({componentDatatype:e.componentDatatype,componentsPerAttribute:e.componentsPerAttribute,normalize:e.normalize,value:t})}function B(e,t){var i=e.attributes,n={};for(var r in i)i.hasOwnProperty(r)&&(n[r]=k(i[r]));return new f({geometry:t,modelMatrix:_.clone(e.modelMatrix),attributes:n,pickPrimitive:e.pickPrimitive,id:e.id})}function z(e,t){if(!e.compressVertices)return t;var i=-1!==t.search(/attribute\s+vec3\s+normal;/g),n=-1!==t.search(/attribute\s+vec2\s+st;/g);if(!i&&!n)return t;var r=-1!==t.search(/attribute\s+vec3\s+tangent;/g),o=-1!==t.search(/attribute\s+vec3\s+binormal;/g),a=n&&i?2:1;a+=r||o?1:0;var s=a>1?"vec"+a:"float",l="compressedAttributes",u="attribute "+s+" "+l+";",c="",h="";if(n){c+="vec2 st;\n";var d=a>1?l+".x":l;h+=" st = czm_decompressTextureCoordinates("+d+");\n"}i&&r&&o?(c+="vec3 normal;\nvec3 tangent;\nvec3 binormal;\n",h+=" czm_octDecode("+l+"."+(n?"yz":"xy")+", normal, tangent, binormal);\n"):(i&&(c+="vec3 normal;\n",h+=" normal = czm_octDecode("+l+(a>1?"."+(n?"y":"x"):"")+");\n"),r&&(c+="vec3 tangent;\n",h+=" tangent = czm_octDecode("+l+"."+(n&&i?"z":"y")+");\n"),o&&(c+="vec3 binormal;\n",h+=" binormal = czm_octDecode("+l+"."+(n&&i?"z":"y")+");\n"));var p=t;p=p.replace(/attribute\s+vec3\s+normal;/g,""),p=p.replace(/attribute\s+vec2\s+st;/g,""),p=p.replace(/attribute\s+vec3\s+tangent;/g,""),p=p.replace(/attribute\s+vec3\s+binormal;/g,""),p=x.replaceMain(p,"czm_non_compressed_main");var m="void main() \n{ \n"+h+" czm_non_compressed_main(); \n}";return[u,c,p,m].join("\n")}function V(e,t){e.vertexAttributes}function U(e,t,i){for(var n=[],r=i.length,o=0;r>o;++o){var l={primitive:a(i[o].pickPrimitive,t)};s(i[o].id)&&(l.id=i[o].id);var u=e.createPickId(l);t._pickIds.push(u),n.push(u.color)}return n}function G(e,t){return function(){return e[t]}}function W(e,t){var i,n,r,o,l=e._instanceIds;if(e._state===R.READY){i=v(e.geometryInstances)?e.geometryInstances:[e.geometryInstances];var u=e._numberOfInstances=i.length,c=[],h=[];for(r=0;u>r;++r)n=i[r].geometry,l.push(i[r].id),h.push({moduleName:n._workerName,geometry:n});if(!s(ie))for(ie=new Array(ne),r=0;ne>r;r++)ie[r]=new C("createGeometry",Number.POSITIVE_INFINITY);var d;for(h=y(h,ne),r=0;ro;++o)d=m[o],n=d.geometry,s(n.constructor.pack)&&(d.offset=p,p+=a(n.constructor.packedLength,n.packedLength));var g;if(p>0){var w=new Float64Array(p);for(g=[w.buffer],o=0;f>o;++o)d=m[o],n=d.geometry,s(n.constructor.pack)&&(n.constructor.pack(n,w,d.offset),d.geometry=w)}c.push(ie[r].scheduleTask({subTasks:h[r]},g))}e._state=R.CREATING,P.all(c,function(t){e._createGeometryResults=t,e._state=R.CREATED}).otherwise(function(i){ee(e,t,R.FAILED,i)})}else if(e._state===R.CREATED){var E=[];i=v(e.geometryInstances)?e.geometryInstances:[e.geometryInstances];var b=e.allowPicking,S=t.scene3DOnly,T=t.mapProjection,x=re.scheduleTask(I.packCombineGeometryParameters({createGeometryResults:e._createGeometryResults,instances:i,pickIds:b?U(t.context,e,i):void 0,ellipsoid:T.ellipsoid,projection:T,elementIndexUintSupported:t.context.elementIndexUint,scene3DOnly:S,allowPicking:b,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:e.modelMatrix,createPickOffsets:e._createPickOffsets},E),E);e._createGeometryResults=void 0,e._state=R.COMBINING,P(x,function(i){var n=I.unpackCombineGeometryResults(i);e._geometries=n.geometries,e._attributeLocations=n.attributeLocations,e._vaAttributes=n.vaAttributes,e._perInstanceAttributeLocations=n.perInstanceAttributeLocations,e.modelMatrix=_.clone(n.modelMatrix,e.modelMatrix),e._validModelMatrix=!_.equals(e.modelMatrix,_.IDENTITY),e._pickOffsets=n.pickOffsets;for(var r=i.validInstancesIndices,o=i.invalidInstancesIndices,a=e._instanceIds,l=new Array(a.length),u=r.length,c=0;u>c;++c)l[c]=a[r[c]];for(var h=o.length,d=0;h>d;++d)l[u+d]=a[o[d]];e._instanceIds=l,s(e._geometries)?e._state=R.COMBINED:ee(e,t,R.FAILED,void 0)}).otherwise(function(i){ee(e,t,R.FAILED,i)})}}function H(e,t){var i,n,r=v(e.geometryInstances)?e.geometryInstances:[e.geometryInstances],o=e._numberOfInstances=r.length,a=new Array(o),l=new Array(o),u=[],c=e._instanceIds,h=0;for(n=0;o>n;n++){i=r[n];var d,p=i.geometry;d=s(p.attributes)&&s(p.primitiveType)?F(p):p.constructor.createGeometry(p),s(d)?(a[h]=d,l[h++]=B(i,d),c.push(i.id)):u.push(i)}a.length=h,l.length=h;var m=e.allowPicking,f=t.scene3DOnly,g=t.mapProjection,y=I.combineGeometry({instances:l,invalidInstances:u,pickIds:m?U(t.context,e,l):void 0,ellipsoid:g.ellipsoid,projection:g,elementIndexUintSupported:t.context.elementIndexUint,scene3DOnly:f,allowPicking:m,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:e.modelMatrix,createPickOffsets:e._createPickOffsets});for(e._geometries=y.geometries,e._attributeLocations=y.attributeLocations,e._vaAttributes=y.vaAttributes,e._perInstanceAttributeLocations=y.vaAttributeLocations,e.modelMatrix=_.clone(y.modelMatrix,e.modelMatrix),e._validModelMatrix=!_.equals(e.modelMatrix,_.IDENTITY),e._pickOffsets=y.pickOffsets,n=0;nh;++h){for(var d=r[h],p=o[h],m=p.length,f=0;m>f;++f){var g=p[f];g.vertexBuffer=w.createVertexBuffer({context:l,typedArray:g.values,usage:E.DYNAMIC_DRAW}),delete g.values}if(u.push(A.fromGeometry({context:l,geometry:d,attributeLocations:n,bufferUsage:E.STATIC_DRAW,interleave:t._interleave,vertexArrayAttributes:p})),s(t._createBoundingVolumeFunction))t._createBoundingVolumeFunction(i,d);else if(t._boundingSpheres.push(e.clone(d.boundingSphere)),t._boundingSphereWC.push(new e),!a){var v=d.boundingSphereCV.center,_=v.x,y=v.y,C=v.z;v.x=C,v.y=_,v.z=y,t._boundingSphereCV.push(e.clone(d.boundingSphereCV)),t._boundingSphere2D.push(new e),t._boundingSphereMorph.push(new e)}}t._va=u,t._primitiveType=r[0].primitiveType,t.releaseGeometryInstances&&(t.geometryInstances=void 0),t._geometries=void 0,ee(t,i,R.COMPLETE,void 0)}function j(e,t,i,r){var o,a=i.getRenderState();r?(o=n(a,!1),o.cull={enabled:!0,face:M.BACK},e._frontFaceRS=S.fromCache(o),o.cull.face=M.FRONT,e._backFaceRS=S.fromCache(o)):(e._frontFaceRS=S.fromCache(a),e._backFaceRS=e._frontFaceRS),e.allowPicking?r?(o=n(a,!1),o.cull={enabled:!1},e._pickRS=S.fromCache(o)):e._pickRS=e._frontFaceRS:(o=n(a,!1),o.colorMask={red:!1,green:!1,blue:!1,alpha:!1},r?(o.cull={enabled:!1},e._pickRS=S.fromCache(o)):e._pickRS=S.fromCache(o))}function Y(e,t,i){var n=t.context,r=e._attributeLocations,o=L._modifyShaderPosition(e,i.vertexShaderSource,t.scene3DOnly);o=L._appendShowToShader(e,o),o=z(e,o);var a=i.getFragmentShaderSource();e.allowPicking?e._pickSP=T.replaceCache({context:n,shaderProgram:e._pickSP,vertexShaderSource:x.createPickVertexShaderSource(o),fragmentShaderSource:x.createPickFragmentShaderSource(a,"varying"),attributeLocations:r}):e._pickSP=T.fromCache({context:n,vertexShaderSource:o,fragmentShaderSource:a,attributeLocations:r}),V(e._pickSP,r),e._sp=T.replaceCache({context:n,shaderProgram:e._sp,vertexShaderSource:o,fragmentShaderSource:a,attributeLocations:r}),V(e._sp,r)}function X(e,t,i,n,o,a,l,u){var h=s(i)?i._uniforms:void 0,d={},p=t.uniforms;if(s(p))for(var m in p)if(p.hasOwnProperty(m)){if(s(h)&&s(h[m]))throw new c("Appearance and material have a uniform with the same name: "+m);d[m]=G(p,m)}var f=r(d,h);s(e.rtcCenter)&&(f.u_modifiedModelView=function(){var t=u.context.uniformState.view;return _.multiply(t,e._modelMatrix,oe),_.multiplyByPoint(oe,e.rtcCenter,ae),_.setTranslation(oe,ae,oe),oe});var g=n?D.TRANSLUCENT:D.OPAQUE;a.length=e._va.length*(o?2:1),l.length=e._va.length;for(var v=a.length,y=0,C=0,w=0;v>w;++w){var E;o&&(E=a[w],s(E)||(E=a[w]=new b({owner:e,primitiveType:e._primitiveType})),E.vertexArray=e._va[C],E.renderState=e._backFaceRS,E.shaderProgram=e._sp,E.uniformMap=f,E.pass=g,++w),E=a[w],s(E)||(E=a[w]=new b({owner:e,primitiveType:e._primitiveType})),E.vertexArray=e._va[C],E.renderState=e._frontFaceRS,E.shaderProgram=e._sp,E.uniformMap=f,E.pass=g;var S=l[y];s(S)||(S=l[y]=new b({owner:e,primitiveType:e._primitiveType})),S.vertexArray=e._va[C],S.renderState=e._pickRS,S.shaderProgram=e._pickSP,S.uniformMap=f,S.pass=g,++y,++C}}function Z(e){if(0!==e._dirtyAttributes.length){for(var t=e._dirtyAttributes,i=t.length,n=0;i>n;++n){for(var r=t[n],a=r.value,s=r.indices,l=s.length,u=0;l>u;++u){for(var c=s[u],h=c.offset,d=c.count,p=c.attribute,m=p.componentDatatype,f=p.componentsPerAttribute,g=o.createTypedArray(m,d*f),v=0;d>v;++v)g.set(a,v*f);var _=h*f*o.getSizeInBytes(m);p.vertexBuffer.copyFromArrayView(g,_)}r.dirty=!1}t.length=0}}function K(e,t){var i=e.appearance.pixelSize;if(s(i))for(var n=e._boundingSpheres.length,r=0;n>r;++r){var o=e._boundingSpheres[r],a=e._boundingSphereWC[r],l=t.camera.getPixelSize(o,t.context.drawingBufferWidth,t.context.drawingBufferHeight),u=l*i;a.radius=o.radius+u}}function J(t,i,n,r,o,a,l,u){if(K(t,i),!_.equals(o,t._modelMatrix)){_.clone(o,t._modelMatrix);for(var c=t._boundingSpheres.length,h=0;c>h;++h){var d=t._boundingSpheres[h];s(d)&&(t._boundingSphereWC[h]=e.transform(d,o,t._boundingSphereWC[h]),i.scene3DOnly||(t._boundingSphere2D[h]=e.clone(t._boundingSphereCV[h],t._boundingSphere2D[h]),t._boundingSphere2D[h].center.x=0,t._boundingSphereMorph[h]=e.union(t._boundingSphereWC[h],t._boundingSphereCV[h])))}}var p;i.mode===O.SCENE3D?p=t._boundingSphereWC:i.mode===O.COLUMBUS_VIEW?p=t._boundingSphereCV:i.mode===O.SCENE2D&&s(t._boundingSphere2D)?p=t._boundingSphere2D:s(t._boundingSphereMorph)&&(p=t._boundingSphereMorph);var m=i.commandList,f=i.passes;if(f.render)for(var g=n.length,v=0;g>v;++v){var y=u?Math.floor(v/2):v,C=n[v];C.modelMatrix=o,C.boundingVolume=p[y],C.cull=a,C.debugShowBoundingVolume=l,C.castShadows=t.castShadows,C.receiveShadows=t.receiveShadows,m.push(C)}if(f.pick)for(var w=r.length,E=0;w>E;++E){var b=r[E];b.modelMatrix=o,b.boundingVolume=p[E],b.cull=a,m.push(b)}}function Q(e,t){var i=t[e];return function(){return s(i)&&s(i.value)?t[e].value:i}}function $(e,t,i){return function(n){var r=t[e];r.value=n,!r.dirty&&r.valid&&(i.push(r),r.dirty=!0)}}function ee(e,t,i,n){e._error=n,e._state=i,t.afterRender.push(function(){e._ready=e._state===R.COMPLETE||e._state===R.FAILED,s(n)?e._readyPromise.reject(n):e._readyPromise.resolve(e); +})}l(L.prototype,{vertexCacheOptimize:{get:function(){return this._vertexCacheOptimize}},interleave:{get:function(){return this._interleave}},releaseGeometryInstances:{get:function(){return this._releaseGeometryInstances}},allowPicking:{get:function(){return this._allowPicking}},asynchronous:{get:function(){return this._asynchronous}},compressVertices:{get:function(){return this._compressVertices}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}}});var te=/attribute\s+vec(?:3|4)\s+(.*)3DHigh;/g;L._modifyShaderPosition=function(e,t,i){for(var n,r="",o="",a="";null!==(n=te.exec(t));){var l=n[1],u="vec4 czm_compute"+l[0].toUpperCase()+l.substr(1)+"()";"vec4 czm_computePosition()"!==u&&(r+=u+";\n"),s(e.rtcCenter)?(t=t.replace(/attribute\s+vec(?:3|4)\s+position3DHigh;/g,""),t=t.replace(/attribute\s+vec(?:3|4)\s+position3DLow;/g,""),r+="uniform mat4 u_modifiedModelView;\n",o+="attribute vec4 position;\n",a+=u+"\n{\n return u_modifiedModelView * position;\n}\n\n",t=t.replace(/czm_modelViewRelativeToEye\s+\*\s+/g,""),t=t.replace(/czm_modelViewProjectionRelativeToEye/g,"czm_projection")):i?a+=u+"\n{\n return czm_translateRelativeToEye("+l+"3DHigh, "+l+"3DLow);\n}\n\n":(o+="attribute vec3 "+l+"2DHigh;\nattribute vec3 "+l+"2DLow;\n",a+=u+"\n{\n vec4 p;\n if (czm_morphTime == 1.0)\n {\n p = czm_translateRelativeToEye("+l+"3DHigh, "+l+"3DLow);\n }\n else if (czm_morphTime == 0.0)\n {\n p = czm_translateRelativeToEye("+l+"2DHigh.zxy, "+l+"2DLow.zxy);\n }\n else\n {\n p = czm_columbusViewMorph(\n czm_translateRelativeToEye("+l+"2DHigh.zxy, "+l+"2DLow.zxy),\n czm_translateRelativeToEye("+l+"3DHigh, "+l+"3DLow),\n czm_morphTime);\n }\n return p;\n}\n\n")}return[r,o,t,a].join("\n")},L._appendShowToShader=function(e,t){if(!s(e._attributeLocations.show))return t;var i=x.replaceMain(t,"czm_non_show_main"),n="attribute float show;\nvoid main() \n{ \n czm_non_show_main(); \n gl_Position *= show; \n}";return i+"\n"+n};var ie,ne=Math.max(h.hardwareConcurrency-1,1),re=new C("combineGeometry",Number.POSITIVE_INFINITY),oe=new _,ae=new i;L.prototype.update=function(e){if(!(!s(this.geometryInstances)&&0===this._va.length||s(this.geometryInstances)&&v(this.geometryInstances)&&0===this.geometryInstances.length||!s(this.appearance)||e.mode!==O.SCENE3D&&e.scene3DOnly||!e.passes.render&&!e.passes.pick)){if(s(this._error))throw this._error;if(s(this.rtcCenter)&&!e.scene3DOnly)throw new c("RTC rendering is only available for 3D only scenes.");if(this._state!==R.FAILED&&(this._state!==R.COMPLETE&&this._state!==R.COMBINED&&(this.asynchronous?W(this,e):H(this,e)),this._state===R.COMBINED&&q(this,e),this.show&&this._state===R.COMPLETE)){var t=this.appearance,i=t.material,n=!1,r=!1;this._appearance!==t?(this._appearance=t,this._material=i,n=!0,r=!0):this._material!==i&&(this._material=i,r=!0);var o=this._appearance.isTranslucent();this._translucent!==o&&(this._translucent=o,n=!0);var l=e.context;s(this._material)&&this._material.update(l);var u=t.closed&&o;if(n){var h=a(this._createRenderStatesFunction,j);h(this,l,t,u)}if(r){var d=a(this._createShaderProgramFunction,Y);d(this,e,t)}if(n||r){var p=a(this._createCommandsFunction,X);p(this,t,i,o,u,this._colorCommands,this._pickCommands,e)}Z(this);var m=a(this._updateAndQueueCommandsFunction,J);m(this,e,this._colorCommands,this._pickCommands,this.modelMatrix,this.cull,this.debugShowBoundingVolume,u)}}};var se=["boundingSphere","boundingSphereCV"];return L.prototype.getGeometryInstanceAttributes=function(e){for(var t=-1,i=this._lastPerInstanceAttributeIndex,n=this._instanceIds,r=n.length,o=0;r>o;++o){var a=(i+o)%r;if(e===n[a]){t=a;break}}if(-1!==t){var u=this._perInstanceAttributeCache[t];if(s(u))return u;var c=this._perInstanceAttributeLocations[t];u={};var h={},d=!1;for(var p in c)if(c.hasOwnProperty(p)){d=!0,h[p]={get:Q(p,c)};var m=!0,f=se;r=f.length;for(var g=0;r>g;++g)if(p===se[g]){m=!1;break}if(f=this._readOnlyInstanceAttributes,m&&s(f)){r=f.length;for(var v=0;r>v;++v)if(p===f[v]){m=!1;break}}m&&(h[p].set=$(p,c,this._dirtyAttributes))}return d&&l(u,h),this._lastPerInstanceAttributeIndex=t,this._perInstanceAttributeCache[t]=u,u}},L.prototype.isDestroyed=function(){return!1},L.prototype.destroy=function(){var e,t;this._sp=this._sp&&this._sp.destroy(),this._pickSP=this._pickSP&&this._pickSP.destroy();var i=this._va;for(e=i.length,t=0;e>t;++t)i[t].destroy();this._va=void 0;var n=this._pickIds;for(e=n.length,t=0;e>t;++t)n[t].destroy();return this._pickIds=void 0,this._instanceIds=void 0,this._perInstanceAttributeCache=void 0,this._perInstanceAttributeLocations=void 0,this._attributeLocations=void 0,this._dirtyAttributes=void 0,u(this)},L}),define("Cesium/DataSources/ColorMaterialProperty",["../Core/Color","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Event","./ConstantProperty","./createPropertyDescriptor","./Property"],function(e,t,i,n,r,o,a,s){"use strict";function l(e){this._definitionChanged=new r,this._color=void 0,this._colorSubscription=void 0,this.color=e}return i(l.prototype,{isConstant:{get:function(){return s.isConstant(this._color)}},definitionChanged:{get:function(){return this._definitionChanged}},color:a("color")}),l.prototype.getType=function(e){return"Color"},l.prototype.getValue=function(i,n){return t(n)||(n={}),n.color=s.getValueOrClonedDefault(this._color,i,e.WHITE,n.color),n},l.prototype.equals=function(e){return this===e||e instanceof l&&s.equals(this._color,e._color)},l}),define("Cesium/DataSources/dynamicGeometryGetBoundingSphere",["../Core/BoundingSphere","../Core/defaultValue","../Core/defined","../Core/DeveloperError","../Core/Matrix4","./BoundingSphereState"],function(e,t,i,n,r,o){"use strict";function a(n,a,s,l){var u,c;return i(a)&&a.show&&a.ready&&(u=a.getGeometryInstanceAttributes(n),i(u)&&i(u.boundingSphere))?(c=t(a.modelMatrix,r.IDENTITY),e.transform(u.boundingSphere,c,l),o.DONE):i(s)&&s.show&&s.ready&&(u=s.getGeometryInstanceAttributes(n),i(u)&&i(u.boundingSphere))?(c=t(s.modelMatrix,r.IDENTITY),e.transform(u.boundingSphere,c,l),o.DONE):i(a)&&!a.ready||i(s)&&!s.ready?o.PENDING:o.FAILED}return a}),define("Cesium/DataSources/MaterialProperty",["../Core/Color","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Scene/Material"],function(e,t,i,n,r){"use strict";function o(){n.throwInstantiationError()}return i(o.prototype,{isConstant:{get:n.throwInstantiationError},definitionChanged:{get:n.throwInstantiationError}}),o.prototype.getType=n.throwInstantiationError,o.prototype.getValue=n.throwInstantiationError,o.prototype.equals=n.throwInstantiationError,o.getValue=function(i,n,o){var a;return t(n)&&(a=n.getType(i),t(a))?(t(o)&&o.type===a||(o=r.fromType(a)),n.getValue(i,o.uniforms),o):(t(o)&&o.type===r.ColorType||(o=r.fromType(r.ColorType)),e.clone(e.WHITE,o.uniforms.color),o)},o}),define("Cesium/DataSources/BoxGeometryUpdater",["../Core/BoxGeometry","../Core/BoxOutlineGeometry","../Core/Color","../Core/ColorGeometryInstanceAttribute","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/destroyObject","../Core/DeveloperError","../Core/Event","../Core/GeometryInstance","../Core/Iso8601","../Core/ShowGeometryInstanceAttribute","../Scene/MaterialAppearance","../Scene/PerInstanceColorAppearance","../Scene/Primitive","./ColorMaterialProperty","./ConstantProperty","./dynamicGeometryGetBoundingSphere","./MaterialProperty","./Property"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g,v,_,y,C){"use strict";function w(e){this.id=e,this.vertexFormat=void 0,this.dimensions=void 0}function E(e,t){this._entity=e,this._scene=t,this._entitySubscription=e.definitionChanged.addEventListener(E.prototype._onEntityPropertyChanged,this),this._fillEnabled=!1,this._dynamic=!1,this._outlineEnabled=!1,this._geometryChanged=new u,this._showProperty=void 0,this._materialProperty=void 0,this._hasConstantOutline=!0,this._showOutlineProperty=void 0,this._outlineColorProperty=void 0,this._outlineWidth=1,this._options=new w(e),this._onEntityPropertyChanged(e,"box",e.box,void 0)}function b(e,t){this._primitives=e,this._primitive=void 0,this._outlinePrimitive=void 0,this._geometryUpdater=t,this._options=new w(t._entity)}var S=new g(i.WHITE),T=new v(!0),x=new v(!0),A=new v(!1),P=new v(i.BLACK),M=new i;return a(E,{perInstanceColorAppearanceType:{value:m},materialAppearanceType:{value:p}}),a(E.prototype,{entity:{get:function(){return this._entity}},fillEnabled:{get:function(){return this._fillEnabled}},hasConstantFill:{get:function(){return!this._fillEnabled||!o(this._entity.availability)&&C.isConstant(this._showProperty)&&C.isConstant(this._fillProperty)}},fillMaterialProperty:{get:function(){return this._materialProperty}},outlineEnabled:{get:function(){return this._outlineEnabled}},hasConstantOutline:{get:function(){return!this._outlineEnabled||!o(this._entity.availability)&&C.isConstant(this._showProperty)&&C.isConstant(this._showOutlineProperty)}},outlineColorProperty:{get:function(){return this._outlineColorProperty}},outlineWidth:{get:function(){return this._outlineWidth}},isDynamic:{get:function(){return this._dynamic}},isClosed:{value:!0},geometryChanged:{get:function(){return this._geometryChanged}}}),E.prototype.isOutlineVisible=function(e){var t=this._entity;return this._outlineEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)},E.prototype.isFilled=function(e){var t=this._entity;return this._fillEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)},E.prototype.createFillGeometryInstance=function(t){var r,a,s=this._entity,l=s.isAvailable(t),u=new d(l&&s.isShowing&&this._showProperty.getValue(t)&&this._fillProperty.getValue(t));if(this._materialProperty instanceof g){var p=i.WHITE;o(this._materialProperty.color)&&(this._materialProperty.color.isConstant||l)&&(p=this._materialProperty.color.getValue(t)),a=n.fromColor(p),r={show:u,color:a}}else r={show:u};return new c({id:s,geometry:e.fromDimensions(this._options),modelMatrix:s._getModelMatrix(h.MINIMUM_VALUE),attributes:r})},E.prototype.createOutlineGeometryInstance=function(e){var r=this._entity,o=r.isAvailable(e),a=C.getValueOrDefault(this._outlineColorProperty,e,i.BLACK);return new c({id:r,geometry:t.fromDimensions(this._options),modelMatrix:r._getModelMatrix(h.MINIMUM_VALUE),attributes:{show:new d(o&&r.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:n.fromColor(a)}})},E.prototype.isDestroyed=function(){return!1},E.prototype.destroy=function(){this._entitySubscription(),s(this)},E.prototype._onEntityPropertyChanged=function(e,t,i,n){if("availability"===t||"position"===t||"orientation"===t||"box"===t){var a=this._entity.box;if(!o(a))return void((this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this)));var s=a.fill,l=o(s)&&s.isConstant?s.getValue(h.MINIMUM_VALUE):!0,u=a.outline,c=o(u);if(c&&u.isConstant&&(c=u.getValue(h.MINIMUM_VALUE)),!l&&!c)return void((this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this)));var d=a.dimensions,f=e.position,v=a.show;if(!o(d)||!o(f)||o(v)&&v.isConstant&&!v.getValue(h.MINIMUM_VALUE))return void((this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this)));var _=r(a.material,S),y=_ instanceof g;this._materialProperty=_,this._fillProperty=r(s,x),this._showProperty=r(v,T),this._showOutlineProperty=r(a.outline,A),this._outlineColorProperty=c?r(a.outlineColor,P):void 0;var w=a.outlineWidth;if(this._fillEnabled=l,this._outlineEnabled=c,f.isConstant&&C.isConstant(e.orientation)&&d.isConstant&&C.isConstant(w)){var E=this._options;E.vertexFormat=y?m.VERTEX_FORMAT:p.MaterialSupport.TEXTURED.vertexFormat,E.dimensions=d.getValue(h.MINIMUM_VALUE,E.dimensions),this._outlineWidth=o(w)?w.getValue(h.MINIMUM_VALUE):1,this._dynamic=!1,this._geometryChanged.raiseEvent(this)}else this._dynamic||(this._dynamic=!0,this._geometryChanged.raiseEvent(this))}},E.prototype.createDynamicUpdater=function(e){return new b(e,this)},b.prototype.update=function(r){var a=this._primitives;a.removeAndDestroy(this._primitive),a.removeAndDestroy(this._outlinePrimitive),this._primitive=void 0,this._outlinePrimitive=void 0;var s=this._geometryUpdater,l=s._entity,u=l.box;if(l.isShowing&&l.isAvailable(r)&&C.getValueOrDefault(u.show,r,!0)){var h=this._options,d=l._getModelMatrix(r),g=C.getValueOrUndefined(u.dimensions,r,h.dimensions);if(o(d)&&o(g)){if(h.dimensions=g,C.getValueOrDefault(u.fill,r,!0)){var v=y.getValue(r,s.fillMaterialProperty,this._material);this._material=v;var _=new p({material:v,translucent:v.isTranslucent(),closed:!0});h.vertexFormat=_.vertexFormat,this._primitive=a.add(new f({geometryInstances:new c({id:l,geometry:e.fromDimensions(h),modelMatrix:d}),appearance:_,asynchronous:!1}))}if(C.getValueOrDefault(u.outline,r,!1)){h.vertexFormat=m.VERTEX_FORMAT;var w=C.getValueOrClonedDefault(u.outlineColor,r,i.BLACK,M),E=C.getValueOrDefault(u.outlineWidth,r,1),b=1!==w.alpha;this._outlinePrimitive=a.add(new f({geometryInstances:new c({id:l,geometry:t.fromDimensions(h),modelMatrix:d,attributes:{color:n.fromColor(w)}}),appearance:new m({flat:!0,translucent:b,renderState:{lineWidth:s._scene.clampLineWidth(E)}}),asynchronous:!1}))}}}},b.prototype.getBoundingSphere=function(e,t){return _(e,this._primitive,this._outlinePrimitive,t)},b.prototype.isDestroyed=function(){return!1},b.prototype.destroy=function(){var e=this._primitives;e.removeAndDestroy(this._primitive),e.removeAndDestroy(this._outlinePrimitive),s(this)},E}),define("Cesium/DataSources/ImageMaterialProperty",["../Core/Cartesian2","../Core/Color","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/Event","./createPropertyDescriptor","./Property"],function(e,t,i,n,r,o,a,s){"use strict";function l(e){e=i(e,i.EMPTY_OBJECT),this._definitionChanged=new o,this._image=void 0,this._imageSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this._color=void 0,this._colorSubscription=void 0,this._transparent=void 0,this._transparentSubscription=void 0,this.image=e.image,this.repeat=e.repeat,this.color=e.color,this.transparent=e.transparent}var u=new e(1,1),c=!1,h=t.WHITE;return r(l.prototype,{isConstant:{get:function(){return s.isConstant(this._image)&&s.isConstant(this._repeat)}},definitionChanged:{get:function(){return this._definitionChanged}},image:a("image"),repeat:a("repeat"),color:a("color"),transparent:a("transparent")}),l.prototype.getType=function(e){return"Image"},l.prototype.getValue=function(e,t){return n(t)||(t={}),t.image=s.getValueOrUndefined(this._image,e),t.repeat=s.getValueOrClonedDefault(this._repeat,e,u,t.repeat),t.color=s.getValueOrClonedDefault(this._color,e,h,t.color),s.getValueOrDefault(this._transparent,e,c)&&(t.color.alpha=Math.min(.99,t.color.alpha)),t},l.prototype.equals=function(e){return this===e||e instanceof l&&s.equals(this._image,e._image)&&s.equals(this._color,e._color)&&s.equals(this._transparent,e._transparent)&&s.equals(this._repeat,e._repeat)},l}),define("Cesium/DataSources/createMaterialPropertyDescriptor",["../Core/Color","../Core/DeveloperError","./ColorMaterialProperty","./createPropertyDescriptor","./ImageMaterialProperty"],function(e,t,i,n,r){"use strict";function o(t){if(t instanceof e)return new i(t);if("string"==typeof t||t instanceof HTMLCanvasElement||t instanceof HTMLVideoElement){var n=new r;return n.image=t,n}}function a(e,t){return n(e,t,o)}return a}),define("Cesium/DataSources/BoxGraphics",["../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Event","./createMaterialPropertyDescriptor","./createPropertyDescriptor"],function(e,t,i,n,r,o,a){"use strict";function s(t){this._dimensions=void 0,this._dimensionsSubscription=void 0,this._show=void 0,this._showSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._definitionChanged=new r,this.merge(e(t,e.EMPTY_OBJECT))}return i(s.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:a("show"),dimensions:a("dimensions"),material:o("material"),fill:a("fill"),outline:a("outline"),outlineColor:a("outlineColor"),outlineWidth:a("outlineWidth")}),s.prototype.clone=function(e){return t(e)?(e.dimensions=this.dimensions,e.show=this.show,e.material=this.material,e.fill=this.fill,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e):new s(this)},s.prototype.merge=function(t){this.dimensions=e(this.dimensions,t.dimensions),this.show=e(this.show,t.show),this.material=e(this.material,t.material),this.fill=e(this.fill,t.fill),this.outline=e(this.outline,t.outline),this.outlineColor=e(this.outlineColor,t.outlineColor),this.outlineWidth=e(this.outlineWidth,t.outlineWidth)},s}),define("Cesium/DataSources/CallbackProperty",["../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Event"],function(e,t,i,n){"use strict";function r(e,t){this._callback=void 0,this._isConstant=void 0,this._definitionChanged=new n,this.setCallback(e,t)}return t(r.prototype,{isConstant:{get:function(){return this._isConstant}},definitionChanged:{get:function(){return this._definitionChanged}}}),r.prototype.getValue=function(e,t){return this._callback(e,t)},r.prototype.setCallback=function(e,t){var i=this._callback!==e||this._isConstant!==t;this._callback=e,this._isConstant=t,i&&this._definitionChanged.raiseEvent(this)},r.prototype.equals=function(e){return this===e||e instanceof r&&this._callback===e._callback&&this._isConstant===e._isConstant},r}),define("Cesium/DataSources/CheckerboardMaterialProperty",["../Core/Cartesian2","../Core/Color","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/Event","./createPropertyDescriptor","./Property"],function(e,t,i,n,r,o,a,s){"use strict";function l(e){e=i(e,i.EMPTY_OBJECT),this._definitionChanged=new o,this._evenColor=void 0,this._evenColorSubscription=void 0,this._oddColor=void 0,this._oddColorSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this.evenColor=e.evenColor,this.oddColor=e.oddColor,this.repeat=e.repeat}var u=t.WHITE,c=t.BLACK,h=new e(2,2);return r(l.prototype,{isConstant:{get:function(){return s.isConstant(this._evenColor)&&s.isConstant(this._oddColor)&&s.isConstant(this._repeat)}},definitionChanged:{get:function(){return this._definitionChanged}},evenColor:a("evenColor"),oddColor:a("oddColor"),repeat:a("repeat")}),l.prototype.getType=function(e){return"Checkerboard"},l.prototype.getValue=function(e,t){return n(t)||(t={}),t.lightColor=s.getValueOrClonedDefault(this._evenColor,e,u,t.lightColor),t.darkColor=s.getValueOrClonedDefault(this._oddColor,e,c,t.darkColor),t.repeat=s.getValueOrDefault(this._repeat,e,h),t},l.prototype.equals=function(e){return this===e||e instanceof l&&s.equals(this._evenColor,e._evenColor)&&s.equals(this._oddColor,e._oddColor)&&s.equals(this._repeat,e._repeat)},l}),define("Cesium/DataSources/PositionProperty",["../Core/Cartesian3","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Matrix3","../Core/ReferenceFrame","../Core/Transforms"],function(e,t,i,n,r,o,a){"use strict";function s(){n.throwInstantiationError()}i(s.prototype,{isConstant:{get:n.throwInstantiationError},definitionChanged:{get:n.throwInstantiationError},referenceFrame:{get:n.throwInstantiationError}}),s.prototype.getValue=n.throwInstantiationError,s.prototype.getValueInReferenceFrame=n.throwInstantiationError,s.prototype.equals=n.throwInstantiationError;var l=new r;return s.convertToReferenceFrame=function(i,n,s,u,c){if(!t(n))return n;if(t(c)||(c=new e),s===u)return e.clone(n,c);var h=a.computeIcrfToFixedMatrix(i,l);return t(h)||(h=a.computeTemeToPseudoFixedMatrix(i,l)),s===o.INERTIAL?r.multiplyByVector(h,n,c):s===o.FIXED?r.multiplyByVector(r.transpose(h,l),n,c):void 0},s}),define("Cesium/DataSources/ConstantPositionProperty",["../Core/Cartesian3","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Event","../Core/ReferenceFrame","./PositionProperty"],function(e,t,i,n,r,o,a,s){"use strict";function l(i,n){this._definitionChanged=new o,this._value=e.clone(i),this._referenceFrame=t(n,a.FIXED)}return n(l.prototype,{isConstant:{get:function(){return!i(this._value)||this._referenceFrame===a.FIXED}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return this._referenceFrame}}}),l.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,a.FIXED,t)},l.prototype.setValue=function(t,n){var r=!1;e.equals(this._value,t)||(r=!0,this._value=e.clone(t)),i(n)&&this._referenceFrame!==n&&(r=!0,this._referenceFrame=n),r&&this._definitionChanged.raiseEvent(this)},l.prototype.getValueInReferenceFrame=function(e,t,i){return s.convertToReferenceFrame(e,this._value,this._referenceFrame,t,i)},l.prototype.equals=function(t){return this===t||t instanceof l&&e.equals(this._value,t._value)&&this._referenceFrame===t._referenceFrame},l}),define("Cesium/DataSources/CorridorGraphics",["../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Event","./createMaterialPropertyDescriptor","./createPropertyDescriptor"],function(e,t,i,n,r,o,a){"use strict";function s(t){this._show=void 0,this._showSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._positions=void 0,this._positionsSubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._extrudedHeight=void 0,this._extrudedHeightSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._width=void 0,this._widthSubscription=void 0,this._cornerType=void 0,this._cornerTypeSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._definitionChanged=new r,this.merge(e(t,e.EMPTY_OBJECT))}return i(s.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:a("show"),material:o("material"),positions:a("positions"),height:a("height"),extrudedHeight:a("extrudedHeight"),granularity:a("granularity"),width:a("width"),fill:a("fill"),outline:a("outline"),outlineColor:a("outlineColor"),outlineWidth:a("outlineWidth"),cornerType:a("cornerType")}),s.prototype.clone=function(e){return t(e)?(e.show=this.show,e.material=this.material,e.positions=this.positions,e.height=this.height,e.extrudedHeight=this.extrudedHeight,e.granularity=this.granularity,e.width=this.width,e.fill=this.fill,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.cornerType=this.cornerType,e):new s(this)},s.prototype.merge=function(t){this.show=e(this.show,t.show),this.material=e(this.material,t.material),this.positions=e(this.positions,t.positions),this.height=e(this.height,t.height),this.extrudedHeight=e(this.extrudedHeight,t.extrudedHeight),this.granularity=e(this.granularity,t.granularity),this.width=e(this.width,t.width),this.fill=e(this.fill,t.fill),this.outline=e(this.outline,t.outline),this.outlineColor=e(this.outlineColor,t.outlineColor),this.outlineWidth=e(this.outlineWidth,t.outlineWidth),this.cornerType=e(this.cornerType,t.cornerType)},s}),define("Cesium/DataSources/createRawPropertyDescriptor",["./createPropertyDescriptor"],function(e){"use strict";function t(e){return e}function i(i,n){return e(i,n,t)}return i}),define("Cesium/DataSources/CylinderGraphics",["../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Event","./createMaterialPropertyDescriptor","./createPropertyDescriptor"],function(e,t,i,n,r,o,a){"use strict";function s(t){this._length=void 0,this._lengthSubscription=void 0,this._topRadius=void 0,this._topRadiusSubscription=void 0,this._bottomRadius=void 0,this._bottomRadiusSubscription=void 0,this._numberOfVerticalLines=void 0,this._numberOfVerticalLinesSubscription=void 0,this._slices=void 0,this._slicesSubscription=void 0,this._show=void 0,this._showSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._definitionChanged=new r,this.merge(e(t,e.EMPTY_OBJECT))}return i(s.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},length:a("length"),topRadius:a("topRadius"),bottomRadius:a("bottomRadius"),numberOfVerticalLines:a("numberOfVerticalLines"),slices:a("slices"),show:a("show"),material:o("material"),fill:a("fill"),outline:a("outline"),outlineColor:a("outlineColor"),outlineWidth:a("outlineWidth")}),s.prototype.clone=function(e){return t(e)?(e.bottomRadius=this.bottomRadius,e.length=this.length,e.topRadius=this.topRadius,e.show=this.show,e.material=this.material,e.numberOfVerticalLines=this.numberOfVerticalLines,e.slices=this.slices,e.fill=this.fill,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e):new s(this)},s.prototype.merge=function(t){this.bottomRadius=e(this.bottomRadius,t.bottomRadius),this.length=e(this.length,t.length),this.topRadius=e(this.topRadius,t.topRadius),this.show=e(this.show,t.show),this.material=e(this.material,t.material),this.numberOfVerticalLines=e(this.numberOfVerticalLines,t.numberOfVerticalLines),this.slices=e(this.slices,t.slices),this.fill=e(this.fill,t.fill),this.outline=e(this.outline,t.outline),this.outlineColor=e(this.outlineColor,t.outlineColor),this.outlineWidth=e(this.outlineWidth,t.outlineWidth)},s}),define("Cesium/DataSources/EllipseGraphics",["../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Event","./createMaterialPropertyDescriptor","./createPropertyDescriptor"],function(e,t,i,n,r,o,a){"use strict";function s(t){this._semiMajorAxis=void 0,this._semiMajorAxisSubscription=void 0,this._semiMinorAxis=void 0,this._semiMinorAxisSubscription=void 0,this._rotation=void 0,this._rotationSubscription=void 0,this._show=void 0,this._showSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._extrudedHeight=void 0,this._extrudedHeightSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._stRotation=void 0,this._stRotationSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._numberOfVerticalLines=void 0,this._numberOfVerticalLinesSubscription=void 0,this._definitionChanged=new r,this.merge(e(t,e.EMPTY_OBJECT))}return i(s.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},semiMajorAxis:a("semiMajorAxis"),semiMinorAxis:a("semiMinorAxis"),rotation:a("rotation"),show:a("show"),material:o("material"),height:a("height"),extrudedHeight:a("extrudedHeight"),granularity:a("granularity"),stRotation:a("stRotation"),fill:a("fill"),outline:a("outline"),outlineColor:a("outlineColor"),outlineWidth:a("outlineWidth"),numberOfVerticalLines:a("numberOfVerticalLines")}),s.prototype.clone=function(e){return t(e)?(e.rotation=this.rotation,e.semiMajorAxis=this.semiMajorAxis,e.semiMinorAxis=this.semiMinorAxis,e.show=this.show,e.material=this.material,e.height=this.height,e.extrudedHeight=this.extrudedHeight,e.granularity=this.granularity,e.stRotation=this.stRotation,e.fill=this.fill,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.numberOfVerticalLines=this.numberOfVerticalLines,e):new s(this)},s.prototype.merge=function(t){this.rotation=e(this.rotation,t.rotation),this.semiMajorAxis=e(this.semiMajorAxis,t.semiMajorAxis),this.semiMinorAxis=e(this.semiMinorAxis,t.semiMinorAxis),this.show=e(this.show,t.show),this.material=e(this.material,t.material),this.height=e(this.height,t.height),this.extrudedHeight=e(this.extrudedHeight,t.extrudedHeight),this.granularity=e(this.granularity,t.granularity),this.stRotation=e(this.stRotation,t.stRotation),this.fill=e(this.fill,t.fill),this.outline=e(this.outline,t.outline),this.outlineColor=e(this.outlineColor,t.outlineColor),this.outlineWidth=e(this.outlineWidth,t.outlineWidth),this.numberOfVerticalLines=e(this.numberOfVerticalLines,t.numberOfVerticalLines)},s}),define("Cesium/DataSources/EllipsoidGraphics",["../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Event","./createMaterialPropertyDescriptor","./createPropertyDescriptor"],function(e,t,i,n,r,o,a){"use strict";function s(t){this._show=void 0,this._showSubscription=void 0,this._radii=void 0,this._radiiSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._stackPartitions=void 0,this._stackPartitionsSubscription=void 0,this._slicePartitions=void 0,this._slicePartitionsSubscription=void 0,this._subdivisions=void 0,this._subdivisionsSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._definitionChanged=new r,this.merge(e(t,e.EMPTY_OBJECT))}return i(s.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:a("show"),radii:a("radii"),material:o("material"),fill:a("fill"),outline:a("outline"),outlineColor:a("outlineColor"),outlineWidth:a("outlineWidth"),stackPartitions:a("stackPartitions"),slicePartitions:a("slicePartitions"),subdivisions:a("subdivisions")}),s.prototype.clone=function(e){return t(e)?(e.show=this.show,e.radii=this.radii,e.material=this.material,e.fill=this.fill,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.stackPartitions=this.stackPartitions,e.slicePartitions=this.slicePartitions,e.subdivisions=this.subdivisions,e):new s(this)},s.prototype.merge=function(t){this.show=e(this.show,t.show),this.radii=e(this.radii,t.radii),this.material=e(this.material,t.material),this.fill=e(this.fill,t.fill),this.outline=e(this.outline,t.outline),this.outlineColor=e(this.outlineColor,t.outlineColor),this.outlineWidth=e(this.outlineWidth,t.outlineWidth),this.stackPartitions=e(this.stackPartitions,t.stackPartitions),this.slicePartitions=e(this.slicePartitions,t.slicePartitions),this.subdivisions=e(this.subdivisions,t.subdivisions)},s}),define("Cesium/DataSources/LabelGraphics",["../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Event","./createPropertyDescriptor"],function(e,t,i,n,r,o){"use strict";function a(t){this._text=void 0,this._textSubscription=void 0,this._font=void 0,this._fontSubscription=void 0,this._style=void 0,this._styleSubscription=void 0,this._fillColor=void 0,this._fillColorSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._horizontalOrigin=void 0,this._horizontalOriginSubscription=void 0,this._verticalOrigin=void 0,this._verticalOriginSubscription=void 0,this._eyeOffset=void 0,this._eyeOffsetSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0, +this._pixelOffset=void 0,this._pixelOffsetSubscription=void 0,this._scale=void 0,this._scaleSubscription=void 0,this._show=void 0,this._showSubscription=void 0,this._translucencyByDistance=void 0,this._translucencyByDistanceSubscription=void 0,this._pixelOffsetScaleByDistance=void 0,this._pixelOffsetScaleByDistanceSubscription=void 0,this._definitionChanged=new r,this.merge(e(t,e.EMPTY_OBJECT))}return i(a.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},text:o("text"),font:o("font"),style:o("style"),fillColor:o("fillColor"),outlineColor:o("outlineColor"),outlineWidth:o("outlineWidth"),horizontalOrigin:o("horizontalOrigin"),verticalOrigin:o("verticalOrigin"),eyeOffset:o("eyeOffset"),heightReference:o("heightReference"),pixelOffset:o("pixelOffset"),scale:o("scale"),show:o("show"),translucencyByDistance:o("translucencyByDistance"),pixelOffsetScaleByDistance:o("pixelOffsetScaleByDistance")}),a.prototype.clone=function(e){return t(e)?(e.text=this.text,e.font=this.font,e.show=this.show,e.style=this.style,e.fillColor=this.fillColor,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.scale=this.scale,e.horizontalOrigin=this.horizontalOrigin,e.verticalOrigin=this.verticalOrigin,e.eyeOffset=this.eyeOffset,e.heightReference=this.heightReference,e.pixelOffset=this.pixelOffset,e.translucencyByDistance=this.translucencyByDistance,e.pixelOffsetScaleByDistance=this.pixelOffsetScaleByDistance,e):new a(this)},a.prototype.merge=function(t){this.text=e(this.text,t.text),this.font=e(this.font,t.font),this.show=e(this.show,t.show),this.style=e(this.style,t.style),this.fillColor=e(this.fillColor,t.fillColor),this.outlineColor=e(this.outlineColor,t.outlineColor),this.outlineWidth=e(this.outlineWidth,t.outlineWidth),this.scale=e(this.scale,t.scale),this.horizontalOrigin=e(this.horizontalOrigin,t.horizontalOrigin),this.verticalOrigin=e(this.verticalOrigin,t.verticalOrigin),this.eyeOffset=e(this.eyeOffset,t.eyeOffset),this.heightReference=e(this.heightReference,t.heightReference),this.pixelOffset=e(this.pixelOffset,t.pixelOffset),this.translucencyByDistance=e(this._translucencyByDistance,t.translucencyByDistance),this.pixelOffsetScaleByDistance=e(this._pixelOffsetScaleByDistance,t.pixelOffsetScaleByDistance)},a}),define("Cesium/DataSources/NodeTransformationProperty",["../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/Event","../Core/TranslationRotationScale","./createPropertyDescriptor","./Property"],function(e,t,i,n,r,o,a){"use strict";var s=new r,l=function(t){t=e(t,e.EMPTY_OBJECT),this._definitionChanged=new n,this._translation=void 0,this._translationSubscription=void 0,this._rotation=void 0,this._rotationSubscription=void 0,this._scale=void 0,this._scaleSubscription=void 0,this.translation=t.translation,this.rotation=t.rotation,this.scale=t.scale};return i(l.prototype,{isConstant:{get:function(){return a.isConstant(this._translation)&&a.isConstant(this._rotation)&&a.isConstant(this._scale)}},definitionChanged:{get:function(){return this._definitionChanged}},translation:o("translation"),rotation:o("rotation"),scale:o("scale")}),l.prototype.getValue=function(e,i){return t(i)||(i=new r),i.translation=a.getValueOrClonedDefault(this._translation,e,s.translation,i.translation),i.rotation=a.getValueOrClonedDefault(this._rotation,e,s.rotation,i.rotation),i.scale=a.getValueOrClonedDefault(this._scale,e,s.scale,i.scale),i},l.prototype.equals=function(e){return this===e||e instanceof l&&a.equals(this._translation,e._translation)&&a.equals(this._rotation,e._rotation)&&a.equals(this._scale,e._scale)},l}),define("Cesium/DataSources/PropertyBag",["../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Event","./ConstantProperty","./createPropertyDescriptor","./Property"],function(e,t,i,n,r,o,a,s){"use strict";function l(e){return new o(e)}function u(e,t){var i=e._propertyNames,n=t._propertyNames,r=i.length;if(r!==n.length)return!1;for(var o=0;r>o;++o){var a=i[o],l=n.indexOf(a);if(-1===l)return!1;if(!s.equals(e[a],t[a]))return!1}return!0}var c=function(e,i){this._propertyNames=[],this._definitionChanged=new r,t(e)&&this.merge(e,i)};return i(c.prototype,{propertyNames:{get:function(){return this._propertyNames}},isConstant:{get:function(){for(var e=this._propertyNames,t=0,i=e.length;i>t;t++)if(!s.isConstant(this[e[t]]))return!1;return!0}},definitionChanged:{get:function(){return this._definitionChanged}}}),c.prototype.hasProperty=function(e){return-1!==this._propertyNames.indexOf(e)},c.prototype.addProperty=function(i,n,r){var o=this._propertyNames;o.push(i),Object.defineProperty(this,i,a(i,!0,e(r,l))),t(n)&&(this[i]=n),this._definitionChanged.raiseEvent(this)},c.prototype.removeProperty=function(e){var t=this._propertyNames,i=t.indexOf(e);this._propertyNames.splice(i,1),delete this[e],this._definitionChanged.raiseEvent(this)},c.prototype.getValue=function(e,i){t(i)||(i={});for(var n=this._propertyNames,r=0,o=n.length;o>r;r++){var a=n[r];i[a]=s.getValueOrUndefined(this[a],e,i[a])}return i},c.prototype.merge=function(e,i){for(var n=this._propertyNames,r=t(e._propertyNames)?e._propertyNames:Object.keys(e),o=0,a=r.length;a>o;o++){var s=r[o],l=this[s],u=e[s];t(l)||-1!==n.indexOf(s)||this.addProperty(s,void 0,i),t(u)&&(t(l)?t(l.merge)&&l.merge(u):t(u.merge)&&t(u.clone)?this[s]=u.clone():this[s]=u)}},c.prototype.equals=function(e){return this===e||e instanceof c&&u(this,e)},c}),define("Cesium/DataSources/ModelGraphics",["../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Event","./createPropertyDescriptor","./NodeTransformationProperty","./PropertyBag"],function(e,t,i,n,r,o,a,s){"use strict";function l(e){return new a(e)}function u(e){return new s(e,l)}function c(t){this._show=void 0,this._showSubscription=void 0,this._scale=void 0,this._scaleSubscription=void 0,this._minimumPixelSize=void 0,this._minimumPixelSizeSubscription=void 0,this._maximumScale=void 0,this._maximumScaleSubscription=void 0,this._incrementallyLoadTextures=void 0,this._incrementallyLoadTexturesSubscription=void 0,this._castShadows=void 0,this._castShadowsSubscription=void 0,this._receiveShadows=void 0,this._receiveShadowsSubscription=void 0,this._uri=void 0,this._uriSubscription=void 0,this._runAnimations=void 0,this._runAnimationsSubscription=void 0,this._nodeTransformations=void 0,this._nodeTransformationsSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._definitionChanged=new r,this.merge(e(t,e.EMPTY_OBJECT))}return i(c.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:o("show"),scale:o("scale"),minimumPixelSize:o("minimumPixelSize"),maximumScale:o("maximumScale"),incrementallyLoadTextures:o("incrementallyLoadTextures"),castShadows:o("castShadows"),receiveShadows:o("receiveShadows"),uri:o("uri"),runAnimations:o("runAnimations"),nodeTransformations:o("nodeTransformations",void 0,u),heightReference:o("heightReference")}),c.prototype.clone=function(e){return t(e)?(e.show=this.show,e.scale=this.scale,e.minimumPixelSize=this.minimumPixelSize,e.maximumScale=this.maximumScale,e.incrementallyLoadTextures=this.incrementallyLoadTextures,e.castShadows=this.castShadows,e.receiveShadows=this.receiveShadows,e.uri=this.uri,e.runAnimations=this.runAnimations,e.nodeTransformations=this.nodeTransformations,e.heightReference=this._heightReference,e):new c(this)},c.prototype.merge=function(i){this.show=e(this.show,i.show),this.scale=e(this.scale,i.scale),this.minimumPixelSize=e(this.minimumPixelSize,i.minimumPixelSize),this.maximumScale=e(this.maximumScale,i.maximumScale),this.incrementallyLoadTextures=e(this.incrementallyLoadTextures,i.incrementallyLoadTextures),this.castShadows=e(this.castShadows,i.castShadows),this.receiveShadows=e(this.receiveShadows,i.receiveShadows),this.uri=e(this.uri,i.uri),this.runAnimations=e(this.runAnimations,i.runAnimations),this.heightReference=e(this.heightReference,i.heightReference);var n=i.nodeTransformations;if(t(n)){var r=this.nodeTransformations;t(r)?r.merge(n):this.nodeTransformations=new s(n,l)}},c}),define("Cesium/DataSources/PathGraphics",["../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Event","./createMaterialPropertyDescriptor","./createPropertyDescriptor"],function(e,t,i,n,r,o,a){"use strict";function s(t){this._material=void 0,this._materialSubscription=void 0,this._show=void 0,this._showSubscription=void 0,this._width=void 0,this._widthSubscription=void 0,this._resolution=void 0,this._resolutionSubscription=void 0,this._leadTime=void 0,this._leadTimeSubscription=void 0,this._trailTime=void 0,this._trailTimeSubscription=void 0,this._definitionChanged=new r,this.merge(e(t,e.EMPTY_OBJECT))}return i(s.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:a("show"),material:o("material"),width:a("width"),resolution:a("resolution"),leadTime:a("leadTime"),trailTime:a("trailTime")}),s.prototype.clone=function(e){return t(e)?(e.material=this.material,e.width=this.width,e.resolution=this.resolution,e.show=this.show,e.leadTime=this.leadTime,e.trailTime=this.trailTime,e):new s(this)},s.prototype.merge=function(t){this.material=e(this.material,t.material),this.width=e(this.width,t.width),this.resolution=e(this.resolution,t.resolution),this.show=e(this.show,t.show),this.leadTime=e(this.leadTime,t.leadTime),this.trailTime=e(this.trailTime,t.trailTime)},s}),define("Cesium/DataSources/PointGraphics",["../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Event","./createPropertyDescriptor"],function(e,t,i,n,r,o){"use strict";function a(t){this._color=void 0,this._colorSubscription=void 0,this._pixelSize=void 0,this._pixelSizeSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._show=void 0,this._showSubscription=void 0,this._scaleByDistance=void 0,this._scaleByDistanceSubscription=void 0,this._translucencyByDistance=void 0,this._translucencyByDistanceSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._definitionChanged=new r,this.merge(e(t,e.EMPTY_OBJECT))}return i(a.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},color:o("color"),pixelSize:o("pixelSize"),outlineColor:o("outlineColor"),outlineWidth:o("outlineWidth"),show:o("show"),scaleByDistance:o("scaleByDistance"),translucencyByDistance:o("translucencyByDistance"),heightReference:o("heightReference")}),a.prototype.clone=function(e){return t(e)?(e.color=this.color,e.pixelSize=this.pixelSize,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.show=this.show,e.scaleByDistance=this.scaleByDistance,e.translucencyByDistance=this._translucencyByDistance,e.heightReference=this.heightReference,e):new a(this)},a.prototype.merge=function(t){this.color=e(this.color,t.color),this.pixelSize=e(this.pixelSize,t.pixelSize),this.outlineColor=e(this.outlineColor,t.outlineColor),this.outlineWidth=e(this.outlineWidth,t.outlineWidth),this.show=e(this.show,t.show),this.scaleByDistance=e(this.scaleByDistance,t.scaleByDistance),this.translucencyByDistance=e(this._translucencyByDistance,t.translucencyByDistance),this.heightReference=e(this.heightReference,t.heightReference)},a}),define("Cesium/DataSources/PolygonGraphics",["../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Event","./createMaterialPropertyDescriptor","./createPropertyDescriptor"],function(e,t,i,n,r,o,a){"use strict";function s(t){this._show=void 0,this._showSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._hierarchy=void 0,this._hierarchySubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._extrudedHeight=void 0,this._extrudedHeightSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._stRotation=void 0,this._stRotationSubscription=void 0,this._perPositionHeight=void 0,this._perPositionHeightSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._definitionChanged=new r,this._closeTop=void 0,this._closeTopSubscription=void 0,this._closeBottom=void 0,this._closeBottomSubscription=void 0,this.merge(e(t,e.EMPTY_OBJECT))}return i(s.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:a("show"),material:o("material"),hierarchy:a("hierarchy"),height:a("height"),extrudedHeight:a("extrudedHeight"),granularity:a("granularity"),stRotation:a("stRotation"),fill:a("fill"),outline:a("outline"),outlineColor:a("outlineColor"),outlineWidth:a("outlineWidth"),perPositionHeight:a("perPositionHeight"),closeTop:a("closeTop"),closeBottom:a("closeBottom")}),s.prototype.clone=function(e){return t(e)?(e.show=this.show,e.material=this.material,e.hierarchy=this.hierarchy,e.height=this.height,e.extrudedHeight=this.extrudedHeight,e.granularity=this.granularity,e.stRotation=this.stRotation,e.fill=this.fill,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.perPositionHeight=this.perPositionHeight,e.closeTop=this.closeTop,e.closeBottom=this.closeBottom,e):new s(this)},s.prototype.merge=function(t){this.show=e(this.show,t.show),this.material=e(this.material,t.material),this.hierarchy=e(this.hierarchy,t.hierarchy),this.height=e(this.height,t.height),this.extrudedHeight=e(this.extrudedHeight,t.extrudedHeight),this.granularity=e(this.granularity,t.granularity),this.stRotation=e(this.stRotation,t.stRotation),this.fill=e(this.fill,t.fill),this.outline=e(this.outline,t.outline),this.outlineColor=e(this.outlineColor,t.outlineColor),this.outlineWidth=e(this.outlineWidth,t.outlineWidth),this.perPositionHeight=e(this.perPositionHeight,t.perPositionHeight),this.closeTop=e(this.closeTop,t.closeTop),this.closeBottom=e(this.closeBottom,t.closeBottom)},s}),define("Cesium/DataSources/PolylineGraphics",["../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Event","./createMaterialPropertyDescriptor","./createPropertyDescriptor"],function(e,t,i,n,r,o,a){"use strict";function s(t){this._show=void 0,this._showSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._positions=void 0,this._positionsSubscription=void 0,this._followSurface=void 0,this._followSurfaceSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._widthSubscription=void 0,this._width=void 0,this._widthSubscription=void 0,this._definitionChanged=new r,this.merge(e(t,e.EMPTY_OBJECT))}return i(s.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:a("show"),material:o("material"),positions:a("positions"),width:a("width"),followSurface:a("followSurface"),granularity:a("granularity")}),s.prototype.clone=function(e){return t(e)?(e.show=this.show,e.material=this.material,e.positions=this.positions,e.width=this.width,e.followSurface=this.followSurface,e.granularity=this.granularity,e):new s(this)},s.prototype.merge=function(t){this.show=e(this.show,t.show),this.material=e(this.material,t.material),this.positions=e(this.positions,t.positions),this.width=e(this.width,t.width),this.followSurface=e(this.followSurface,t.followSurface),this.granularity=e(this.granularity,t.granularity)},s}),define("Cesium/DataSources/PolylineVolumeGraphics",["../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Event","./createMaterialPropertyDescriptor","./createPropertyDescriptor"],function(e,t,i,n,r,o,a){"use strict";function s(t){this._show=void 0,this._showSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._positions=void 0,this._positionsSubscription=void 0,this._shape=void 0,this._shapeSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._cornerType=void 0,this._cornerTypeSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._definitionChanged=new r,this.merge(e(t,e.EMPTY_OBJECT))}return i(s.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:a("show"),material:o("material"),positions:a("positions"),shape:a("shape"),granularity:a("granularity"),fill:a("fill"),outline:a("outline"),outlineColor:a("outlineColor"),outlineWidth:a("outlineWidth"),cornerType:a("cornerType")}),s.prototype.clone=function(e){return t(e)?(e.show=this.show,e.material=this.material,e.positions=this.positions,e.shape=this.shape,e.granularity=this.granularity,e.fill=this.fill,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.cornerType=this.cornerType,e):new s(this)},s.prototype.merge=function(t){this.show=e(this.show,t.show),this.material=e(this.material,t.material),this.positions=e(this.positions,t.positions),this.shape=e(this.shape,t.shape),this.granularity=e(this.granularity,t.granularity),this.fill=e(this.fill,t.fill),this.outline=e(this.outline,t.outline),this.outlineColor=e(this.outlineColor,t.outlineColor),this.outlineWidth=e(this.outlineWidth,t.outlineWidth),this.cornerType=e(this.cornerType,t.cornerType)},s}),define("Cesium/DataSources/RectangleGraphics",["../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Event","./createMaterialPropertyDescriptor","./createPropertyDescriptor"],function(e,t,i,n,r,o,a){"use strict";function s(t){this._show=void 0,this._showSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._coordinates=void 0,this._coordinatesSubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._extrudedHeight=void 0,this._extrudedHeightSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._stRotation=void 0,this._stRotationSubscription=void 0,this._rotation=void 0,this._rotationSubscription=void 0,this._closeTop=void 0,this._closeTopSubscription=void 0,this._closeBottom=void 0,this._closeBottomSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._definitionChanged=new r,this.merge(e(t,e.EMPTY_OBJECT))}return i(s.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:a("show"),coordinates:a("coordinates"),material:o("material"),height:a("height"),extrudedHeight:a("extrudedHeight"),granularity:a("granularity"),stRotation:a("stRotation"),rotation:a("rotation"),fill:a("fill"),outline:a("outline"),outlineColor:a("outlineColor"),outlineWidth:a("outlineWidth"),closeTop:a("closeTop"),closeBottom:a("closeBottom")}),s.prototype.clone=function(e){return t(e)?(e.show=this.show,e.coordinates=this.coordinates,e.material=this.material,e.height=this.height,e.extrudedHeight=this.extrudedHeight,e.granularity=this.granularity,e.stRotation=this.stRotation,e.rotation=this.rotation,e.fill=this.fill,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.closeTop=this.closeTop,e.closeBottom=this.closeBottom,e):new s(this)},s.prototype.merge=function(t){this.show=e(this.show,t.show),this.coordinates=e(this.coordinates,t.coordinates),this.material=e(this.material,t.material),this.height=e(this.height,t.height),this.extrudedHeight=e(this.extrudedHeight,t.extrudedHeight),this.granularity=e(this.granularity,t.granularity),this.stRotation=e(this.stRotation,t.stRotation),this.rotation=e(this.rotation,t.rotation),this.fill=e(this.fill,t.fill),this.outline=e(this.outline,t.outline),this.outlineColor=e(this.outlineColor,t.outlineColor),this.outlineWidth=e(this.outlineWidth,t.outlineWidth),this.closeTop=e(this.closeTop,t.closeTop),this.closeBottom=e(this.closeBottom,t.closeBottom)},s}),define("Cesium/DataSources/WallGraphics",["../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Event","./createMaterialPropertyDescriptor","./createPropertyDescriptor"],function(e,t,i,n,r,o,a){"use strict";function s(t){this._show=void 0,this._showSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._positions=void 0,this._positionsSubscription=void 0,this._minimumHeights=void 0,this._minimumHeightsSubscription=void 0,this._maximumHeights=void 0,this._maximumHeightsSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._definitionChanged=new r,this.merge(e(t,e.EMPTY_OBJECT))}return i(s.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:a("show"),material:o("material"),positions:a("positions"),minimumHeights:a("minimumHeights"),maximumHeights:a("maximumHeights"),granularity:a("granularity"),fill:a("fill"),outline:a("outline"),outlineColor:a("outlineColor"),outlineWidth:a("outlineWidth")}),s.prototype.clone=function(e){return t(e)?(e.show=this.show,e.material=this.material,e.positions=this.positions,e.minimumHeights=this.minimumHeights,e.maximumHeights=this.maximumHeights,e.granularity=this.granularity,e.fill=this.fill,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e):new s(this)},s.prototype.merge=function(t){this.show=e(this.show,t.show),this.material=e(this.material,t.material),this.positions=e(this.positions,t.positions),this.minimumHeights=e(this.minimumHeights,t.minimumHeights),this.maximumHeights=e(this.maximumHeights,t.maximumHeights),this.granularity=e(this.granularity,t.granularity),this.fill=e(this.fill,t.fill),this.outline=e(this.outline,t.outline),this.outlineColor=e(this.outlineColor,t.outlineColor),this.outlineWidth=e(this.outlineWidth,t.outlineWidth)},s}),define("Cesium/DataSources/Entity",["../Core/Cartesian3","../Core/createGuid","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Event","../Core/Matrix3","../Core/Matrix4","../Core/Quaternion","../Core/Transforms","./BillboardGraphics","./BoxGraphics","./ConstantPositionProperty","./CorridorGraphics","./createPropertyDescriptor","./createRawPropertyDescriptor","./CylinderGraphics","./EllipseGraphics","./EllipsoidGraphics","./LabelGraphics","./ModelGraphics","./PathGraphics","./PointGraphics","./PolygonGraphics","./PolylineGraphics","./PolylineVolumeGraphics","./Property","./RectangleGraphics","./WallGraphics"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g,v,_,y,C,w,E,b,S,T,x,A,P,M){"use strict";function D(e){return new p(e)}function I(e){return f(e,void 0,D)}function R(e,t){return f(e,void 0,function(e){return e instanceof t?e:new t(e)})}function O(e){e=i(e,i.EMPTY_OBJECT);var r=e.id;n(r)||(r=t()),this._availability=void 0,this._id=r,this._definitionChanged=new a,this._name=e.name,this._show=i(e.show,!0),this._parent=void 0,this._propertyNames=["billboard","box","corridor","cylinder","description","ellipse","ellipsoid","label","model","orientation","path","point","polygon","polyline","polylineVolume","position","rectangle","viewFrom","wall"],this._billboard=void 0,this._billboardSubscription=void 0,this._box=void 0,this._boxSubscription=void 0,this._corridor=void 0,this._corridorSubscription=void 0,this._cylinder=void 0,this._cylinderSubscription=void 0,this._description=void 0,this._descriptionSubscription=void 0,this._ellipse=void 0,this._ellipseSubscription=void 0,this._ellipsoid=void 0,this._ellipsoidSubscription=void 0,this._label=void 0,this._labelSubscription=void 0,this._model=void 0,this._modelSubscription=void 0,this._orientation=void 0,this._orientationSubscription=void 0,this._path=void 0,this._pathSubscription=void 0,this._point=void 0,this._pointSubscription=void 0,this._polygon=void 0,this._polygonSubscription=void 0,this._polyline=void 0,this._polylineSubscription=void 0,this._polylineVolume=void 0,this._polylineVolumeSubscription=void 0,this._position=void 0,this._positionSubscription=void 0,this._rectangle=void 0,this._rectangleSubscription=void 0,this._viewFrom=void 0,this._viewFromSubscription=void 0,this._wall=void 0,this._wallSubscription=void 0,this._children=[],this.entityCollection=void 0,this.parent=e.parent,this.merge(e)}function L(e,t,i){for(var n=t.length,r=0;n>r;r++){var o=t[r],a=o._show,s=!i&&a,l=i&&a;s!==l&&L(o,o._children,i)}e._definitionChanged.raiseEvent(e,"isShowing",i,!i)}r(O.prototype,{availability:g("availability"),id:{get:function(){return this._id}},definitionChanged:{get:function(){return this._definitionChanged}},name:g("name"),show:{get:function(){return this._show},set:function(e){if(e!==this._show){var t=this.isShowing;this._show=e;var i=this.isShowing;t!==i&&L(this,this._children,i),this._definitionChanged.raiseEvent(this,"show",e,!e)}}},isShowing:{get:function(){return this._show&&(!n(this.entityCollection)||this.entityCollection.show)&&(!n(this._parent)||this._parent.isShowing)}},parent:{get:function(){return this._parent},set:function(e){var t=this._parent;if(t!==e){var i=this.isShowing;if(n(t)){var r=t._children.indexOf(this);t._children.splice(r,1)}this._parent=e,n(e)&&e._children.push(this);var o=this.isShowing;i!==o&&L(this,this._children,o),this._definitionChanged.raiseEvent(this,"parent",e,t)}}},propertyNames:{get:function(){return this._propertyNames}},billboard:R("billboard",h),box:R("box",d),corridor:R("corridor",m),cylinder:R("cylinder",v),description:f("description"),ellipse:R("ellipse",_),ellipsoid:R("ellipsoid",y),label:R("label",C),model:R("model",w),orientation:f("orientation"),path:R("path",E),point:R("point",b),polygon:R("polygon",S),polyline:R("polyline",T),polylineVolume:R("polylineVolume",x),position:I("position"),rectangle:R("rectangle",P),viewFrom:f("viewFrom"),wall:R("wall",M)}),O.prototype.isAvailable=function(e){var t=this._availability;return!n(t)||t.contains(e)},O.prototype.addProperty=function(e){var t=this._propertyNames;t.push(e),Object.defineProperty(this,e,g(e,!0))},O.prototype.removeProperty=function(e){var t=this._propertyNames,i=t.indexOf(e);this._propertyNames.splice(i,1),delete this[e]},O.prototype.merge=function(e){this.name=i(this.name,e.name),this.availability=i(e.availability,this.availability);for(var t=this._propertyNames,r=n(e._propertyNames)?e._propertyNames:Object.keys(e),o=r.length,a=0;o>a;a++){var s=r[a];if("parent"!==s){var l=this[s],u=e[s];n(l)||-1!==t.indexOf(s)||this.addProperty(s),n(u)&&(n(l)?n(l.merge)&&l.merge(u):n(u.merge)&&n(u.clone)?this[s]=u.clone():this[s]=u)}}};var N=new s,F=new e,k=new u;return O.prototype._getModelMatrix=function(e,t){var i=A.getValueOrUndefined(this._position,e,F);if(n(i)){var r=A.getValueOrUndefined(this._orientation,e,k);return t=n(r)?l.fromRotationTranslation(s.fromQuaternion(r,N),i,t):c.eastNorthUpToFixedFrame(i,void 0,t)}},O}),define("Cesium/DataSources/EntityCollection",["../Core/AssociativeArray","../Core/createGuid","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Event","../Core/Iso8601","../Core/JulianDate","../Core/RuntimeError","../Core/TimeInterval","./Entity"],function(e,t,i,n,r,o,a,s,l,u,c){"use strict";function h(e){if(e._firing)return void(e._refire=!0);if(0===e._suspendCount){var t=e._addedEntities,i=e._removedEntities,n=e._changedEntities;if(0!==n.length||0!==t.length||0!==i.length){e._firing=!0;do{e._refire=!1;var r=t.values.slice(0),o=i.values.slice(0),a=n.values.slice(0);t.removeAll(),i.removeAll(),n.removeAll(),e._collectionChanged.raiseEvent(e,r,o,a)}while(e._refire);e._firing=!1}}}function d(i){this._owner=i,this._entities=new e,this._addedEntities=new e,this._removedEntities=new e,this._changedEntities=new e,this._suspendCount=0,this._collectionChanged=new o,this._id=t(),this._show=!0,this._firing=!1,this._refire=!1}var p={id:void 0};return d.prototype.suspendEvents=function(){this._suspendCount++},d.prototype.resumeEvents=function(){this._suspendCount--,h(this)},d.collectionChangedEventCallback=void 0,n(d.prototype,{collectionChanged:{get:function(){return this._collectionChanged}},id:{get:function(){return this._id}},values:{get:function(){return this._entities.values}},show:{get:function(){return this._show},set:function(e){if(e!==this._show){this.suspendEvents();var t,i=[],n=this._entities.values,r=n.length;for(t=0;r>t;t++)i.push(n[t].isShowing);for(this._show=e,t=0;r>t;t++){var o=i[t],a=n[t];o!==a.isShowing&&a.definitionChanged.raiseEvent(a,"isShowing",a.isShowing,o)}this.resumeEvents()}}},owner:{get:function(){return this._owner}}}),d.prototype.computeAvailability=function(){for(var e=a.MAXIMUM_VALUE,t=a.MINIMUM_VALUE,n=this._entities.values,r=0,o=n.length;o>r;r++){var l=n[r],c=l.availability;if(i(c)){var h=c.start,d=c.stop;s.lessThan(h,e)&&!h.equals(a.MINIMUM_VALUE)&&(e=h),s.greaterThan(d,t)&&!d.equals(a.MAXIMUM_VALUE)&&(t=d)}}return a.MAXIMUM_VALUE.equals(e)&&(e=a.MINIMUM_VALUE),a.MINIMUM_VALUE.equals(t)&&(t=a.MAXIMUM_VALUE),new u({start:e,stop:t})},d.prototype.add=function(e){e instanceof c||(e=new c(e));var t=e.id,i=this._entities;if(i.contains(t))throw new l("An entity with id "+t+" already exists in this collection.");return e.entityCollection=this,i.set(t,e),this._removedEntities.remove(t)||this._addedEntities.set(t,e),e.definitionChanged.addEventListener(d.prototype._onEntityDefinitionChanged,this),h(this),e},d.prototype.remove=function(e){return i(e)?this.removeById(e.id):!1},d.prototype.contains=function(e){return this._entities.get(e.id)===e},d.prototype.removeById=function(e){if(!i(e))return!1;var t=this._entities,n=t.get(e);return this._entities.remove(e)?(this._addedEntities.remove(e)||(this._removedEntities.set(e,n),this._changedEntities.remove(e)),this._entities.remove(e),n.definitionChanged.removeEventListener(d.prototype._onEntityDefinitionChanged,this),h(this),!0):!1},d.prototype.removeAll=function(){for(var e=this._entities,t=e.length,n=e.values,r=this._addedEntities,o=this._removedEntities,a=0;t>a;a++){var s=n[a],l=s.id,u=r.get(l);i(u)||(s.definitionChanged.removeEventListener(d.prototype._onEntityDefinitionChanged,this),o.set(l,s))}e.removeAll(),r.removeAll(),this._changedEntities.removeAll(),h(this)},d.prototype.getById=function(e){return this._entities.get(e)},d.prototype.getOrCreateEntity=function(e){var t=this._entities.get(e);return i(t)||(p.id=e,t=new c(p),this.add(t)),t},d.prototype._onEntityDefinitionChanged=function(e){var t=e.id;this._addedEntities.contains(t)||this._changedEntities.set(t,e),h(this)},d}),define("Cesium/DataSources/CompositeEntityCollection",["../Core/createGuid","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Math","./Entity","./EntityCollection"],function(e,t,i,n,r,o,a){"use strict";function s(e){for(var t=e.propertyNames,i=t.length,n=0;i>n;n++)e[t[n]]=void 0}function l(e,t,i,n){f[0]=i,f[1]=n.id,t[JSON.stringify(f)]=n.definitionChanged.addEventListener(h.prototype._onDefinitionChanged,e)}function u(e,t,i,n){f[0]=i,f[1]=n.id;var r=JSON.stringify(f);t[r](),t[r]=void 0}function c(e){if(e._shouldRecomposite=!0,0===e._suspendCount){var i,n,r,c,d,p,f=e._collections,g=f.length,v=e._collectionsCopy,_=v.length,y=e._composite,C=new a(e),w=e._eventHash;for(i=0;_>i;i++)for(d=v[i],d.collectionChanged.removeEventListener(h.prototype._onCollectionChanged,e),r=d.values,p=d.id,c=r.length-1;c>-1;c--)n=r[c],u(e,w,p,n);for(i=g-1;i>=0;i--)for(d=f[i],d.collectionChanged.addEventListener(h.prototype._onCollectionChanged,e), +r=d.values,p=d.id,c=r.length-1;c>-1;c--){n=r[c],l(e,w,p,n);var E=C.getById(n.id);t(E)||(E=y.getById(n.id),t(E)?s(E):(m.id=n.id,E=new o(m)),C.add(E)),E.merge(n)}e._collectionsCopy=f.slice(0),y.suspendEvents(),y.removeAll();var b=C.values;for(i=0;ih;h++){var y=n[h];u(this,v,_,y);var C=y.id;for(d=a-1;d>=0;d--)p=r[d].getById(C),t(p)&&(t(f)||(f=c.getById(C),s(f)),f.merge(p));t(f)||c.removeById(C),f=void 0}var w=i.length;for(h=0;w>h;h++){var E=i[h];l(this,v,_,E);var b=E.id;for(d=a-1;d>=0;d--)p=r[d].getById(b),t(p)&&(t(f)||(f=c.getById(b),t(f)?s(f):(m.id=b,f=new o(m),c.add(f))),f.merge(p));f=void 0}c.resumeEvents()},h.prototype._onDefinitionChanged=function(e,i,n,r){for(var o=this._collections,a=this._composite,s=o.length,l=e.id,u=a.getById(l),c=u[i],h=!t(c),d=!0,p=s-1;p>=0;p--){var m=o[p].getById(e.id);if(t(m)){var f=m[i];if(t(f)){if(d){if(d=!1,!t(f.merge)||!t(f.clone)){c=f;break}c=f.clone(c)}c.merge(f)}}}h&&-1===u.propertyNames.indexOf(i)&&u.addProperty(i),u[i]=c},h}),define("Cesium/DataSources/CompositeProperty",["../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Event","../Core/EventHelper","../Core/TimeIntervalCollection","./Property"],function(e,t,i,n,r,o,a){"use strict";function s(t,i,n,r){function o(){n.raiseEvent(t)}var a=[];i.removeAll();for(var s=r.length,l=0;s>l;l++){var u=r.get(l);e(u.data)&&-1===a.indexOf(u.data)&&i.add(u.data.definitionChanged,o)}}function l(){this._eventHelper=new r,this._definitionChanged=new n,this._intervals=new o,this._intervals.changedEvent.addEventListener(l.prototype._intervalsChanged,this)}return t(l.prototype,{isConstant:{get:function(){return this._intervals.isEmpty}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._intervals}}}),l.prototype.getValue=function(t,i){var n=this._intervals.findDataForIntervalContainingDate(t);return e(n)?n.getValue(t,i):void 0},l.prototype.equals=function(e){return this===e||e instanceof l&&this._intervals.equals(e._intervals,a.equals)},l.prototype._intervalsChanged=function(){s(this,this._eventHelper,this._definitionChanged,this._intervals),this._definitionChanged.raiseEvent(this)},l}),define("Cesium/DataSources/CompositeMaterialProperty",["../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Event","./CompositeProperty","./Property"],function(e,t,i,n,r,o){"use strict";function a(){this._definitionChanged=new n,this._composite=new r,this._composite.definitionChanged.addEventListener(a.prototype._raiseDefinitionChanged,this)}return t(a.prototype,{isConstant:{get:function(){return this._composite.isConstant}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._composite._intervals}}}),a.prototype.getType=function(t){var i=this._composite._intervals.findDataForIntervalContainingDate(t);return e(i)?i.getType(t):void 0},a.prototype.getValue=function(t,i){var n=this._composite._intervals.findDataForIntervalContainingDate(t);return e(n)?n.getValue(t,i):void 0},a.prototype.equals=function(e){return this===e||e instanceof a&&this._composite.equals(e._composite,o.equals)},a.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)},a}),define("Cesium/DataSources/CompositePositionProperty",["../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Event","../Core/ReferenceFrame","./CompositeProperty","./Property"],function(e,t,i,n,r,o,a,s){"use strict";function l(t){this._referenceFrame=e(t,o.FIXED),this._definitionChanged=new r,this._composite=new a,this._composite.definitionChanged.addEventListener(l.prototype._raiseDefinitionChanged,this)}return i(l.prototype,{isConstant:{get:function(){return this._composite.isConstant}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._composite.intervals}},referenceFrame:{get:function(){return this._referenceFrame},set:function(e){this._referenceFrame=e}}}),l.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,o.FIXED,t)},l.prototype.getValueInReferenceFrame=function(e,i,n){var r=this._composite._intervals.findDataForIntervalContainingDate(e);return t(r)?r.getValueInReferenceFrame(e,i,n):void 0},l.prototype.equals=function(e){return this===e||e instanceof l&&this._referenceFrame===e._referenceFrame&&this._composite.equals(e._composite,s.equals)},l.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)},l}),define("Cesium/Shaders/ShadowVolumeFS",[],function(){"use strict";return"#extension GL_EXT_frag_depth : enable\n\n// emulated noperspective\nvarying float v_WindowZ;\nvarying vec4 v_color;\n\nvoid writeDepthClampedToFarPlane()\n{\n gl_FragDepthEXT = min(v_WindowZ * gl_FragCoord.w, 1.0);\n}\n\nvoid main(void)\n{\n gl_FragColor = v_color;\n writeDepthClampedToFarPlane();\n}"}),define("Cesium/Shaders/ShadowVolumeVS",[],function(){"use strict";return"attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec4 color;\n\n// emulated noperspective\nvarying float v_WindowZ;\nvarying vec4 v_color;\n\nvec4 depthClampFarPlane(vec4 vertexInClipCoordinates)\n{\n v_WindowZ = (0.5 * (vertexInClipCoordinates.z / vertexInClipCoordinates.w) + 0.5) * vertexInClipCoordinates.w;\n vertexInClipCoordinates.z = min(vertexInClipCoordinates.z, vertexInClipCoordinates.w);\n return vertexInClipCoordinates;\n}\n\nvoid main()\n{\n v_color = color;\n \n vec4 position = czm_computePosition();\n gl_Position = depthClampFarPlane(czm_modelViewProjectionRelativeToEye * position);\n}\n"}),define("Cesium/Scene/DepthFunction",["../Core/freezeObject","../Renderer/WebGLConstants"],function(e,t){"use strict";var i={NEVER:t.NEVER,LESS:t.LESS,EQUAL:t.EQUAL,LESS_OR_EQUAL:t.LEQUAL,GREATER:t.GREATER,NOT_EQUAL:t.NOTEQUAL,GREATER_OR_EQUAL:t.GEQUAL,ALWAYS:t.ALWAYS};return e(i)}),define("Cesium/Scene/StencilFunction",["../Core/freezeObject","../Renderer/WebGLConstants"],function(e,t){"use strict";var i={NEVER:t.NEVER,LESS:t.LESS,EQUAL:t.EQUAL,LESS_OR_EQUAL:t.LEQUAL,GREATER:t.GREATER,NOT_EQUAL:t.NOTEQUAL,GREATER_OR_EQUAL:t.GEQUAL,ALWAYS:t.ALWAYS};return e(i)}),define("Cesium/Scene/StencilOperation",["../Core/freezeObject","../Renderer/WebGLConstants"],function(e,t){"use strict";var i={ZERO:t.ZERO,KEEP:t.KEEP,REPLACE:t.REPLACE,INCREMENT:t.INCR,DECREMENT:t.DECR,INVERT:t.INVERT,INCREMENT_WRAP:t.INCR_WRAP,DECREMENT_WRAP:t.DECR_WRAP};return e(i)}),define("Cesium/Scene/GroundPrimitive",["../Core/AssociativeArray","../Core/BoundingSphere","../Core/buildModuleUrl","../Core/Cartesian2","../Core/Cartesian3","../Core/Cartographic","../Core/Color","../Core/ColorGeometryInstanceAttribute","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/deprecationWarning","../Core/destroyObject","../Core/DeveloperError","../Core/GeographicTilingScheme","../Core/GeometryInstance","../Core/isArray","../Core/loadJson","../Core/Math","../Core/Matrix3","../Core/Matrix4","../Core/OrientedBoundingBox","../Core/PolygonGeometry","../Core/Rectangle","../Renderer/DrawCommand","../Renderer/RenderState","../Renderer/ShaderProgram","../Renderer/ShaderSource","../Shaders/ShadowVolumeFS","../Shaders/ShadowVolumeVS","../ThirdParty/when","./BlendingState","./DepthFunction","./Pass","./PerInstanceColorAppearance","./Primitive","./SceneMode","./StencilFunction","./StencilOperation"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g,v,_,y,C,w,E,b,S,T,x,A,P,M,D,I,R,O,L,N,F,k,B){"use strict";function z(e){e=l(e,l.EMPTY_OBJECT),this.geometryInstances=e.geometryInstances,this.show=l(e.show,!0),this.debugShowBoundingVolume=l(e.debugShowBoundingVolume,!1),this.debugShowShadowVolume=l(e.debugShowShadowVolume,!1),this._sp=void 0,this._spPick=void 0,this._rsStencilPreloadPass=void 0,this._rsStencilDepthPass=void 0,this._rsColorPass=void 0,this._rsPickPass=void 0,this._uniformMap={},this._boundingVolumes=[],this._boundingVolumes2D=[],this._ready=!1,this._readyPromise=D.defer(),this._primitive=void 0,this._debugPrimitive=void 0,this._maxHeight=void 0,this._minHeight=void 0,this._maxTerrainHeight=z._defaultMaxTerrainHeight,this._minTerrainHeight=z._defaultMinTerrainHeight,this._boundingSpheresKeys=[],this._boundingSpheres=[];var t,i=new L({flat:!0});u(this.geometryInstances)&&g(this.geometryInstances)&&this.geometryInstances.length>1&&(t=$),this._primitiveOptions={geometryInstances:void 0,appearance:i,vertexCacheOptimize:l(e.vertexCacheOptimize,!1),interleave:l(e.interleave,!1),releaseGeometryInstances:l(e.releaseGeometryInstances,!0),allowPicking:l(e.allowPicking,!0),asynchronous:l(e.asynchronous,!0),compressVertices:l(e.compressVertices,!0),_readOnlyInstanceAttributes:t,_createRenderStatesFunction:void 0,_createShaderProgramFunction:void 0,_createCommandsFunction:void 0,_createPickOffsets:!0}}function V(e){return function(t,i){var n=i.maximumRadius,r=n/Math.cos(.5*t)-n;return e._maxHeight+r}}function U(e){return function(t,i){return e._minHeight}}function G(e,t){var i=e.mapProjection.ellipsoid;{if(u(t.attributes)&&u(t.attributes.position3DHigh)){for(var n=t.attributes.position3DHigh.values,o=t.attributes.position3DLow.values,a=n.length,s=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY,h=Number.NEGATIVE_INFINITY,d=0;a>d;d+=3){var p=r.unpack(n,d,re),m=r.unpack(o,d,oe),f=r.add(p,m,ae),g=i.cartesianToCartographic(f,se),v=g.latitude,_=g.longitude;s=Math.min(s,v),l=Math.min(l,_),c=Math.max(c,v),h=Math.max(h,_)}var y=le;return y.north=c,y.south=s,y.east=h,y.west=l,y}if(u(t.rectangle))return t.rectangle}}function W(e){o.fromRadians(e.east,e.north,0,ce[0]),o.fromRadians(e.west,e.north,0,ce[1]),o.fromRadians(e.east,e.south,0,ce[2]),o.fromRadians(e.west,e.south,0,ce[3]);for(var t=0,i=0,n=0,r=0,a=z._terrainHeightsMaxLevel,s=0;a>=s;++s){for(var l=!1,u=0;4>u;++u){var c=ce[u];if(ue.positionToTileXY(c,s,he),0===u)n=he.x,r=he.y;else if(n!==he.x||r!==he.y){l=!0;break}}if(l)break;t=n,i=r}return 0!==s?{x:t,y:i,level:s>a?a:s-1}:void 0}function H(e,t,i){var n=W(t),o=z._defaultMinTerrainHeight,a=z._defaultMaxTerrainHeight;if(u(n)){var s=n.level+"-"+n.x+"-"+n.y,l=z._terrainHeights[s];u(l)&&(o=l[0],a=l[1]),i.cartographicToCartesian(b.northeast(t,me),de),i.cartographicToCartesian(b.southwest(t,me),pe),r.subtract(pe,de,fe),r.add(de,r.multiplyByScalar(fe,.5,fe),fe);var c=i.scaleToGeodeticSurface(fe,ge);if(u(c)){var h=r.distance(fe,c);o=Math.min(o,-h)}else o=z._defaultMinTerrainHeight}e._minTerrainHeight=Math.max(z._defaultMinTerrainHeight,o),e._maxTerrainHeight=a}function q(e,i){var n=W(e),r=z._defaultMaxTerrainHeight;if(u(n)){var o=n.level+"-"+n.x+"-"+n.y,a=z._terrainHeights[o];u(a)&&(r=a[1])}var s=t.fromRectangle3D(e,i,0);return t.fromRectangle3D(e,i,r,ve),t.union(s,ve,s)}function j(e,i,n){var o=i.mapProjection.ellipsoid,a=G(i,n);if(a.width<_.PI){var s=w.fromRectangle(a,e._maxHeight,e._minHeight,o);e._boundingVolumes.push(s)}else{var l=n.attributes.position3DHigh.values,u=n.attributes.position3DLow.values;e._boundingVolumes.push(t.fromEncodedCartesianVertices(l,u))}if(!i.scene3DOnly){var c=i.mapProjection,h=t.fromRectangleWithHeights2D(a,c,e._maxHeight,e._minHeight);r.fromElements(h.center.z,h.center.x,h.center.y,h.center),e._boundingVolumes2D.push(h)}}function Y(e,t,i,n){u(e._rsStencilPreloadPass)||(e._rsStencilPreloadPass=T.fromCache(ee),e._rsStencilDepthPass=T.fromCache(te),e._rsColorPass=T.fromCache(ie),e._rsPickPass=T.fromCache(ne))}function X(e,t,i){if(!u(e._sp)){var n=t.context,r=M;r=N._modifyShaderPosition(e,r,t.scene3DOnly),r=N._appendShowToShader(e._primitive,r);var o=P,a=e._primitive._attributeLocations;if(e._sp=x.replaceCache({context:n,shaderProgram:e._sp,vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:a}),e._primitive.allowPicking){var s=new A({sources:[o],pickColorQualifier:"varying"});e._spPick=x.replaceCache({context:n,shaderProgram:e._spPick,vertexShaderSource:A.createPickVertexShaderSource(r),fragmentShaderSource:s,attributeLocations:a})}else e._spPick=x.fromCache({context:n,vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:a})}}function Z(e,t){var i=e._primitive,n=3*i._va.length;t.length=n;for(var r=0,o=0;n>o;o+=3){var a=i._va[r++],s=t[o];u(s)||(s=t[o]=new S({owner:e,primitiveType:i._primitiveType})),s.vertexArray=a,s.renderState=e._rsStencilPreloadPass,s.shaderProgram=e._sp,s.uniformMap=e._uniformMap,s.pass=O.GROUND,s=t[o+1],u(s)||(s=t[o+1]=new S({owner:e,primitiveType:i._primitiveType})),s.vertexArray=a,s.renderState=e._rsStencilDepthPass,s.shaderProgram=e._sp,s.uniformMap=e._uniformMap,s.pass=O.GROUND,s=t[o+2],u(s)||(s=t[o+2]=new S({owner:e,primitiveType:i._primitiveType})),s.vertexArray=a,s.renderState=e._rsColorPass,s.shaderProgram=e._sp,s.uniformMap=e._uniformMap,s.pass=O.GROUND}}function K(e,t){var i=e._primitive,n=i._pickOffsets,r=3*n.length;t.length=r;for(var o=0,a=0;r>a;a+=3){var s=n[o++],l=s.offset,c=s.count,h=i._va[s.index],d=t[a];u(d)||(d=t[a]=new S({owner:e,primitiveType:i._primitiveType})),d.vertexArray=h,d.offset=l,d.count=c,d.renderState=e._rsStencilPreloadPass,d.shaderProgram=e._sp,d.uniformMap=e._uniformMap,d.pass=O.GROUND,d=t[a+1],u(d)||(d=t[a+1]=new S({owner:e,primitiveType:i._primitiveType})),d.vertexArray=h,d.offset=l,d.count=c,d.renderState=e._rsStencilDepthPass,d.shaderProgram=e._sp,d.uniformMap=e._uniformMap,d.pass=O.GROUND,d=t[a+2],u(d)||(d=t[a+2]=new S({owner:e,primitiveType:i._primitiveType})),d.vertexArray=h,d.offset=l,d.count=c,d.renderState=e._rsPickPass,d.shaderProgram=e._spPick,d.uniformMap=e._uniformMap,d.pass=O.GROUND}}function J(e,t,i,n,r,o,a){Z(e,o),K(e,a)}function Q(e,t,i,n,r,o,a,s){var l;t.mode===F.SCENE3D?l=e._boundingVolumes:t.mode!==F.SCENE3D&&u(e._boundingVolumes2D)&&(l=e._boundingVolumes2D);var c=t.commandList,h=t.passes;if(h.render)for(var d=i.length,p=0;d>p;++p)i[p].modelMatrix=r,i[p].boundingVolume=l[Math.floor(p/3)],i[p].cull=o,i[p].debugShowBoundingVolume=a,c.push(i[p]);if(h.pick){var m=e._primitive,f=m._pickOffsets,g=3*f.length;n.length=g;for(var v=0,_=0;g>_;_+=3){var y=f[v++],C=l[y.index];n[_].modelMatrix=r,n[_].boundingVolume=C,n[_].cull=o,n[_+1].modelMatrix=r,n[_+1].boundingVolume=C,n[_+1].cull=o,n[_+2].modelMatrix=r,n[_+2].boundingVolume=C,n[_+2].cull=o,c.push(n[_],n[_+1],n[_+2])}}}var $=["color"];c(z.prototype,{vertexCacheOptimize:{get:function(){return this._primitiveOptions.vertexCacheOptimize}},interleave:{get:function(){return this._primitiveOptions.interleave}},releaseGeometryInstances:{get:function(){return this._primitiveOptions.releaseGeometryInstances}},allowPicking:{get:function(){return this._primitiveOptions.allowPicking}},asynchronous:{get:function(){return this._primitiveOptions.asynchronous}},compressVertices:{get:function(){return this._primitiveOptions.compressVertices}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}}}),z.isSupported=function(e){return e.context.fragmentDepth},z._defaultMaxTerrainHeight=9e3,z._defaultMinTerrainHeight=-1e5,z._terrainHeights=void 0,z._terrainHeightsMaxLevel=6;var ee={colorMask:{red:!1,green:!1,blue:!1,alpha:!1},stencilTest:{enabled:!0,frontFunction:k.ALWAYS,frontOperation:{fail:B.KEEP,zFail:B.DECREMENT_WRAP,zPass:B.DECREMENT_WRAP},backFunction:k.ALWAYS,backOperation:{fail:B.KEEP,zFail:B.INCREMENT_WRAP,zPass:B.INCREMENT_WRAP},reference:0,mask:-1},depthTest:{enabled:!1},depthMask:!1},te={colorMask:{red:!1,green:!1,blue:!1,alpha:!1},stencilTest:{enabled:!0,frontFunction:k.ALWAYS,frontOperation:{fail:B.KEEP,zFail:B.KEEP,zPass:B.INCREMENT_WRAP},backFunction:k.ALWAYS,backOperation:{fail:B.KEEP,zFail:B.KEEP,zPass:B.DECREMENT_WRAP},reference:0,mask:-1},depthTest:{enabled:!0,func:R.LESS_OR_EQUAL},depthMask:!1},ie={stencilTest:{enabled:!0,frontFunction:k.NOT_EQUAL,frontOperation:{fail:B.KEEP,zFail:B.KEEP,zPass:B.DECREMENT_WRAP},backFunction:k.NOT_EQUAL,backOperation:{fail:B.KEEP,zFail:B.KEEP,zPass:B.DECREMENT_WRAP},reference:0,mask:-1},depthTest:{enabled:!1},depthMask:!1,blending:I.ALPHA_BLEND},ne={stencilTest:{enabled:!0,frontFunction:k.NOT_EQUAL,frontOperation:{fail:B.KEEP,zFail:B.KEEP,zPass:B.DECREMENT_WRAP},backFunction:k.NOT_EQUAL,backOperation:{fail:B.KEEP,zFail:B.KEEP,zPass:B.DECREMENT_WRAP},reference:0,mask:-1},depthTest:{enabled:!1},depthMask:!1},re=new r,oe=new r,ae=new r,se=new o,le=new b,ue=new m,ce=[new o,new o,new o,new o],he=new n,de=new r,pe=new r,me=new o,fe=new r,ge=new r,ve=new t;return z._initialized=!1,z._initPromise=void 0,z.initializeTerrainHeights=function(){var e=z._initPromise;return u(e)?e:(z._initPromise=v(i("Assets/approximateTerrainHeights.json")).then(function(e){z._initialized=!0,z._terrainHeights=e}),z._initPromise)},z.prototype.update=function(e){var t=e.context;if(t.fragmentDepth&&this.show&&(u(this._primitive)||u(this.geometryInstances))){if(!z._initialized)return void z.initializeTerrainHeights();if(!u(this._primitive)){var i,n,r,o,l,c=this._primitiveOptions,h=e.mapProjection.ellipsoid,d=g(this.geometryInstances)?this.geometryInstances:[this.geometryInstances],m=d.length,v=new Array(m);for(o=0;m>o;++o){i=d[o],n=i.geometry;var _=G(e,n);u(l)?u(_)&&b.union(l,_,l):l=_;var y=i.id;if(u(y)&&u(_)){var C=q(_,h);this._boundingSpheresKeys.push(y),this._boundingSpheres.push(C)}if(r=n.constructor,!u(r)||!u(r.createShadowVolume))throw new p("Not all of the geometry instances have GroundPrimitive support.");i.attributes}H(this,l,e.mapProjection.ellipsoid);var w=e.terrainExaggeration;for(this._minHeight=this._minTerrainHeight*w,this._maxHeight=this._maxTerrainHeight*w,o=0;m>o;++o)i=d[o],n=i.geometry,r=n.constructor,v[o]=new f({geometry:r.createShadowVolume(n,U(this),V(this)),attributes:i.attributes,id:i.id,pickPrimitive:this});c.geometryInstances=v;var E=this;c._createBoundingVolumeFunction=function(e,t){j(E,e,t)},c._createRenderStatesFunction=function(e,t,i,n){Y(E,t)},c._createShaderProgramFunction=function(e,t,i){X(E,t)},c._createCommandsFunction=function(e,t,i,n,r,o,a){J(E,void 0,void 0,!0,!1,o,a)},c._updateAndQueueCommandsFunction=function(e,t,i,n,r,o,a,s){Q(E,t,i,n,r,o,a,s)},this._primitive=new N(c),this._primitive.readyPromise.then(function(e){E._ready=!0,E.releaseGeometryInstances&&(E.geometryInstances=void 0);var t=e._error;u(t)?E._readyPromise.reject(t):E._readyPromise.resolve(E)})}if(this._primitive.debugShowBoundingVolume=this.debugShowBoundingVolume,this._primitive.update(e),this.debugShowShadowVolume&&!u(this._debugPrimitive)&&u(this.geometryInstances)){for(var S=g(this.geometryInstances)?this.geometryInstances:[this.geometryInstances],T=S.length,x=new Array(T),A=0;T>A;++A){var P=S[A],M=P.geometry,D=M.constructor;if(u(D)&&u(D.createShadowVolume)){var I=P.attributes.color.value,R=a.fromBytes(I[0],I[1],I[2],I[3]);a.subtract(new a(1,1,1,0),R,R),x[A]=new f({geometry:D.createShadowVolume(M,U(this),V(this)),attributes:{color:s.fromColor(R)},id:P.id,pickPrimitive:this})}}this._debugPrimitive=new N({geometryInstances:x,releaseGeometryInstances:!0,allowPicking:!1,asynchronous:!1,appearance:new L({flat:!0})})}u(this._debugPrimitive)&&(this.debugShowShadowVolume?this._debugPrimitive.update(e):(this._debugPrimitive.destroy(),this._debugPrimitive=void 0))}},z.prototype.getBoundingSphere=function(e){var t=this._boundingSpheresKeys.indexOf(e);return-1!==t?this._boundingSpheres[t]:void 0},z.prototype.getGeometryInstanceAttributes=function(e){return this._primitive.getGeometryInstanceAttributes(e)},z.prototype.isDestroyed=function(){return!1},z.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),this._debugPrimitive=this._debugPrimitive&&this._debugPrimitive.destroy(),this._sp=this._sp&&this._sp.destroy(),this._spPick=this._spPick&&this._spPick.destroy(),d(this)},z}),define("Cesium/DataSources/CorridorGeometryUpdater",["../Core/Color","../Core/ColorGeometryInstanceAttribute","../Core/CorridorGeometry","../Core/CorridorOutlineGeometry","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/destroyObject","../Core/DeveloperError","../Core/Event","../Core/GeometryInstance","../Core/Iso8601","../Core/oneTimeWarning","../Core/ShowGeometryInstanceAttribute","../Scene/GroundPrimitive","../Scene/MaterialAppearance","../Scene/PerInstanceColorAppearance","../Scene/Primitive","./ColorMaterialProperty","./ConstantProperty","./dynamicGeometryGetBoundingSphere","./MaterialProperty","./Property"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g,v,_,y,C,w,E){"use strict";function b(e){this.id=e,this.vertexFormat=void 0,this.positions=void 0,this.width=void 0,this.cornerType=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0}function S(e,t){this._entity=e,this._scene=t,this._entitySubscription=e.definitionChanged.addEventListener(S.prototype._onEntityPropertyChanged,this),this._fillEnabled=!1,this._isClosed=!1,this._dynamic=!1,this._outlineEnabled=!1,this._geometryChanged=new u,this._showProperty=void 0,this._materialProperty=void 0,this._hasConstantOutline=!0,this._showOutlineProperty=void 0,this._outlineColorProperty=void 0,this._outlineWidth=1,this._onTerrain=!1,this._options=new b(e),this._onEntityPropertyChanged(e,"corridor",e.corridor,void 0)}function T(e,t,i){this._primitives=e,this._groundPrimitives=t,this._primitive=void 0,this._outlinePrimitive=void 0,this._geometryUpdater=i,this._options=new b(i._entity)}var x=new _(e.WHITE),A=new y(!0),P=new y(!0),M=new y(!1),D=new y(e.BLACK),I=new e;return a(S,{perInstanceColorAppearanceType:{value:g},materialAppearanceType:{value:f}}),a(S.prototype,{entity:{get:function(){return this._entity}},fillEnabled:{get:function(){return this._fillEnabled}},hasConstantFill:{get:function(){return!this._fillEnabled||!o(this._entity.availability)&&E.isConstant(this._showProperty)&&E.isConstant(this._fillProperty)}},fillMaterialProperty:{get:function(){return this._materialProperty}},outlineEnabled:{get:function(){return this._outlineEnabled}},hasConstantOutline:{get:function(){return!this._outlineEnabled||!o(this._entity.availability)&&E.isConstant(this._showProperty)&&E.isConstant(this._showOutlineProperty)}},outlineColorProperty:{get:function(){return this._outlineColorProperty}},outlineWidth:{get:function(){return this._outlineWidth}},isDynamic:{get:function(){return this._dynamic}},isClosed:{get:function(){return this._isClosed}},onTerrain:{get:function(){return this._onTerrain}},geometryChanged:{get:function(){return this._geometryChanged}}}),S.prototype.isOutlineVisible=function(e){var t=this._entity;return this._outlineEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)},S.prototype.isFilled=function(e){var t=this._entity;return this._fillEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)},S.prototype.createFillGeometryInstance=function(n){var r,a,s=this._entity,l=s.isAvailable(n),u=new p(l&&s.isShowing&&this._showProperty.getValue(n)&&this._fillProperty.getValue(n));if(this._materialProperty instanceof _){var h=e.WHITE;o(this._materialProperty.color)&&(this._materialProperty.color.isConstant||l)&&(h=this._materialProperty.color.getValue(n)),a=t.fromColor(h),r={show:u,color:a}}else r={show:u};return new c({id:s,geometry:new i(this._options),attributes:r})},S.prototype.createOutlineGeometryInstance=function(i){var r=this._entity,o=r.isAvailable(i),a=E.getValueOrDefault(this._outlineColorProperty,i,e.BLACK);return new c({id:r,geometry:new n(this._options),attributes:{show:new p(o&&r.isShowing&&this._showProperty.getValue(i)&&this._showOutlineProperty.getValue(i)),color:t.fromColor(a)}})},S.prototype.isDestroyed=function(){return!1},S.prototype.destroy=function(){this._entitySubscription(),s(this)},S.prototype._onEntityPropertyChanged=function(e,t,i,n){if("availability"===t||"corridor"===t){var a=this._entity.corridor;if(!o(a))return void((this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this)));var s=a.fill,l=o(s)&&s.isConstant?s.getValue(h.MINIMUM_VALUE):!0,u=a.outline,c=o(u);if(c&&u.isConstant&&(c=u.getValue(h.MINIMUM_VALUE)),!l&&!c)return void((this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this)));var p=a.positions,v=a.show;if(o(v)&&v.isConstant&&!v.getValue(h.MINIMUM_VALUE)||!o(p))return void((this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this)));var y=r(a.material,x),C=y instanceof _;this._materialProperty=y,this._fillProperty=r(s,P),this._showProperty=r(v,A),this._showOutlineProperty=r(a.outline,M),this._outlineColorProperty=c?r(a.outlineColor,D):void 0;var w=a.height,b=a.extrudedHeight,S=a.granularity,T=a.width,I=a.outlineWidth,R=a.cornerType,O=l&&!o(w)&&!o(b)&&C&&m.isSupported(this._scene);if(c&&O&&(d(d.geometryOutlines),c=!1),this._fillEnabled=l,this._onTerrain=O,this._isClosed=o(b)||O,this._outlineEnabled=c,p.isConstant&&E.isConstant(w)&&E.isConstant(b)&&E.isConstant(S)&&E.isConstant(T)&&E.isConstant(I)&&E.isConstant(R)){var L=this._options;L.vertexFormat=C?g.VERTEX_FORMAT:f.MaterialSupport.TEXTURED.vertexFormat,L.positions=p.getValue(h.MINIMUM_VALUE,L.positions),L.height=o(w)?w.getValue(h.MINIMUM_VALUE):void 0,L.extrudedHeight=o(b)?b.getValue(h.MINIMUM_VALUE):void 0,L.granularity=o(S)?S.getValue(h.MINIMUM_VALUE):void 0,L.width=o(T)?T.getValue(h.MINIMUM_VALUE):void 0,L.cornerType=o(R)?R.getValue(h.MINIMUM_VALUE):void 0,this._outlineWidth=o(I)?I.getValue(h.MINIMUM_VALUE):1,this._dynamic=!1,this._geometryChanged.raiseEvent(this)}else this._dynamic||(this._dynamic=!0,this._geometryChanged.raiseEvent(this))}},S.prototype.createDynamicUpdater=function(e,t){return new T(e,t,this)},T.prototype.update=function(r){var a=this._geometryUpdater,s=a._onTerrain,l=this._primitives,u=this._groundPrimitives;s?u.removeAndDestroy(this._primitive):(l.removeAndDestroy(this._primitive),l.removeAndDestroy(this._outlinePrimitive),this._outlinePrimitive=void 0),this._primitive=void 0;var h=a._entity,d=h.corridor;if(h.isShowing&&h.isAvailable(r)&&E.getValueOrDefault(d.show,r,!0)){var p=this._options,_=E.getValueOrUndefined(d.positions,r,p.positions),y=E.getValueOrUndefined(d.width,r);if(o(_)&&o(y)){if(p.positions=_,p.width=y,p.height=E.getValueOrUndefined(d.height,r),p.extrudedHeight=E.getValueOrUndefined(d.extrudedHeight,r),p.granularity=E.getValueOrUndefined(d.granularity,r),p.cornerType=E.getValueOrUndefined(d.cornerType,r),!o(d.fill)||d.fill.getValue(r)){var C=a.fillMaterialProperty,b=w.getValue(r,C,this._material);if(this._material=b,s){var S=e.WHITE;o(C.color)&&(S=C.color.getValue(r)),this._primitive=u.add(new m({geometryInstance:new c({id:h,geometry:new i(p),attributes:{color:t.fromColor(S)}}),asynchronous:!1}))}else{var T=new f({material:b,translucent:b.isTranslucent(),closed:o(p.extrudedHeight)});p.vertexFormat=T.vertexFormat,this._primitive=l.add(new v({geometryInstances:new c({id:h,geometry:new i(p)}),appearance:T,asynchronous:!1}))}}if(!s&&o(d.outline)&&d.outline.getValue(r)){p.vertexFormat=g.VERTEX_FORMAT;var x=E.getValueOrClonedDefault(d.outlineColor,r,e.BLACK,I),A=E.getValueOrDefault(d.outlineWidth,r,1),P=1!==x.alpha;this._outlinePrimitive=l.add(new v({geometryInstances:new c({id:h,geometry:new n(p),attributes:{color:t.fromColor(x)}}),appearance:new g({flat:!0,translucent:P,renderState:{lineWidth:a._scene.clampLineWidth(A)}}),asynchronous:!1}))}}}},T.prototype.getBoundingSphere=function(e,t){return C(e,this._primitive,this._outlinePrimitive,t)},T.prototype.isDestroyed=function(){return!1},T.prototype.destroy=function(){var e=this._primitives,t=this._groundPrimitives;this._geometryUpdater._onTerrain?t.removeAndDestroy(this._primitive):e.removeAndDestroy(this._primitive),e.removeAndDestroy(this._outlinePrimitive),s(this)},S}),define("Cesium/DataSources/DataSource",["../Core/defineProperties","../Core/DeveloperError"],function(e,t){"use strict";function i(){t.throwInstantiationError()}return e(i.prototype,{name:{get:t.throwInstantiationError},clock:{get:t.throwInstantiationError},entities:{get:t.throwInstantiationError},isLoading:{get:t.throwInstantiationError},changedEvent:{get:t.throwInstantiationError},errorEvent:{get:t.throwInstantiationError},loadingEvent:{get:t.throwInstantiationError},show:{get:t.throwInstantiationError}}),i.prototype.update=t.throwInstantiationError,i.setLoading=function(e,t){e._isLoading!==t&&(t?e._entityCollection.suspendEvents():e._entityCollection.resumeEvents(),e._isLoading=t,e._loading.raiseEvent(e,t))},i}),define("Cesium/DataSources/CustomDataSource",["../Core/defineProperties","../Core/Event","./DataSource","./EntityCollection"],function(e,t,i,n){"use strict";function r(e){this._name=e,this._clock=void 0,this._changed=new t,this._error=new t,this._isLoading=!1,this._loading=new t,this._entityCollection=new n(this)}return e(r.prototype,{name:{get:function(){return this._name},set:function(e){this._name!==e&&(this._name=e,this._changed.raiseEvent(this))}},clock:{get:function(){return this._clock},set:function(e){this._clock!==e&&(this._clock=e,this._changed.raiseEvent(this))}},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading},set:function(e){i.setLoading(this,e)}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},show:{get:function(){return this._entityCollection.show},set:function(e){this._entityCollection.show=e; +}}}),r}),define("Cesium/DataSources/CylinderGeometryUpdater",["../Core/Cartesian3","../Core/Color","../Core/ColorGeometryInstanceAttribute","../Core/CylinderGeometry","../Core/CylinderOutlineGeometry","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/destroyObject","../Core/DeveloperError","../Core/Event","../Core/GeometryInstance","../Core/Iso8601","../Core/ShowGeometryInstanceAttribute","../Scene/MaterialAppearance","../Scene/PerInstanceColorAppearance","../Scene/Primitive","./ColorMaterialProperty","./ConstantProperty","./dynamicGeometryGetBoundingSphere","./MaterialProperty","./Property"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g,v,_,y,C,w){"use strict";function E(e){this.id=e,this.vertexFormat=void 0,this.length=void 0,this.topRadius=void 0,this.bottomRadius=void 0,this.slices=void 0,this.numberOfVerticalLines=void 0}function b(e,t){this._entity=e,this._scene=t,this._entitySubscription=e.definitionChanged.addEventListener(b.prototype._onEntityPropertyChanged,this),this._fillEnabled=!1,this._dynamic=!1,this._outlineEnabled=!1,this._geometryChanged=new c,this._showProperty=void 0,this._materialProperty=void 0,this._hasConstantOutline=!0,this._showOutlineProperty=void 0,this._outlineColorProperty=void 0,this._outlineWidth=1,this._options=new E(e),this._onEntityPropertyChanged(e,"cylinder",e.cylinder,void 0)}function S(e,t){this._primitives=e,this._primitive=void 0,this._outlinePrimitive=void 0,this._geometryUpdater=t,this._options=new E(t._entity)}var T=new v(t.WHITE),x=new _(!0),A=new _(!0),P=new _(!1),M=new _(t.BLACK),D=new t;return s(b,{perInstanceColorAppearanceType:{value:f},materialAppearanceType:{value:m}}),s(b.prototype,{entity:{get:function(){return this._entity}},fillEnabled:{get:function(){return this._fillEnabled}},hasConstantFill:{get:function(){return!this._fillEnabled||!a(this._entity.availability)&&w.isConstant(this._showProperty)&&w.isConstant(this._fillProperty)}},fillMaterialProperty:{get:function(){return this._materialProperty}},outlineEnabled:{get:function(){return this._outlineEnabled}},hasConstantOutline:{get:function(){return!this._outlineEnabled||!a(this._entity.availability)&&w.isConstant(this._showProperty)&&w.isConstant(this._showOutlineProperty)}},outlineColorProperty:{get:function(){return this._outlineColorProperty}},outlineWidth:{get:function(){return this._outlineWidth}},isDynamic:{get:function(){return this._dynamic}},isClosed:{value:!0},geometryChanged:{get:function(){return this._geometryChanged}}}),b.prototype.isOutlineVisible=function(e){var t=this._entity;return this._outlineEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)},b.prototype.isFilled=function(e){var t=this._entity;return this._fillEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)},b.prototype.createFillGeometryInstance=function(e){var r,o,s=this._entity,l=s.isAvailable(e),u=new p(l&&s.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e));if(this._materialProperty instanceof v){var c=t.WHITE;a(this._materialProperty.color)&&(this._materialProperty.color.isConstant||l)&&(c=this._materialProperty.color.getValue(e)),o=i.fromColor(c),r={show:u,color:o}}else r={show:u};return new h({id:s,geometry:new n(this._options),modelMatrix:s._getModelMatrix(d.MINIMUM_VALUE),attributes:r})},b.prototype.createOutlineGeometryInstance=function(e){var n=this._entity,o=n.isAvailable(e),a=w.getValueOrDefault(this._outlineColorProperty,e,t.BLACK);return new h({id:n,geometry:new r(this._options),modelMatrix:n._getModelMatrix(d.MINIMUM_VALUE),attributes:{show:new p(o&&n.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:i.fromColor(a)}})},b.prototype.isDestroyed=function(){return!1},b.prototype.destroy=function(){this._entitySubscription(),l(this)},b.prototype._onEntityPropertyChanged=function(e,t,i,n){if("availability"===t||"position"===t||"orientation"===t||"cylinder"===t){var r=e.cylinder;if(!a(r))return void((this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this)));var s=r.fill,l=a(s)&&s.isConstant?s.getValue(d.MINIMUM_VALUE):!0,u=r.outline,c=a(u);if(c&&u.isConstant&&(c=u.getValue(d.MINIMUM_VALUE)),!l&&!c)return void((this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this)));var h=e.position,p=r.length,g=r.topRadius,_=r.bottomRadius,y=r.show;if(a(y)&&y.isConstant&&!y.getValue(d.MINIMUM_VALUE)||!a(h)||!a(p)||!a(g)||!a(_))return void((this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this)));var C=o(r.material,T),E=C instanceof v;this._materialProperty=C,this._fillProperty=o(s,A),this._showProperty=o(y,x),this._showOutlineProperty=o(r.outline,P),this._outlineColorProperty=c?o(r.outlineColor,M):void 0;var b=r.slices,S=r.outlineWidth,D=r.numberOfVerticalLines;if(this._fillEnabled=l,this._outlineEnabled=c,h.isConstant&&w.isConstant(e.orientation)&&p.isConstant&&g.isConstant&&_.isConstant&&w.isConstant(b)&&w.isConstant(S)&&w.isConstant(D)){var I=this._options;I.vertexFormat=E?f.VERTEX_FORMAT:m.MaterialSupport.TEXTURED.vertexFormat,I.length=p.getValue(d.MINIMUM_VALUE),I.topRadius=g.getValue(d.MINIMUM_VALUE),I.bottomRadius=_.getValue(d.MINIMUM_VALUE),I.slices=a(b)?b.getValue(d.MINIMUM_VALUE):void 0,I.numberOfVerticalLines=a(D)?D.getValue(d.MINIMUM_VALUE):void 0,this._outlineWidth=a(S)?S.getValue(d.MINIMUM_VALUE):1,this._dynamic=!1,this._geometryChanged.raiseEvent(this)}else this._dynamic||(this._dynamic=!0,this._geometryChanged.raiseEvent(this))}},b.prototype.createDynamicUpdater=function(e){return new S(e,this)},S.prototype.update=function(e){var o=this._primitives;o.removeAndDestroy(this._primitive),o.removeAndDestroy(this._outlinePrimitive),this._primitive=void 0,this._outlinePrimitive=void 0;var s=this._geometryUpdater,l=s._entity,u=l.cylinder;if(l.isShowing&&l.isAvailable(e)&&w.getValueOrDefault(u.show,e,!0)){var c=this._options,d=l._getModelMatrix(e),p=w.getValueOrUndefined(u.length,e),v=w.getValueOrUndefined(u.topRadius,e),_=w.getValueOrUndefined(u.bottomRadius,e);if(a(d)&&a(p)&&a(v)&&a(_)){if(c.length=p,c.topRadius=v,c.bottomRadius=_,c.slices=w.getValueOrUndefined(u.slices,e),c.numberOfVerticalLines=w.getValueOrUndefined(u.numberOfVerticalLines,e),w.getValueOrDefault(u.fill,e,!0)){var y=C.getValue(e,s.fillMaterialProperty,this._material);this._material=y;var E=new m({material:y,translucent:y.isTranslucent(),closed:!0});c.vertexFormat=E.vertexFormat,this._primitive=o.add(new g({geometryInstances:new h({id:l,geometry:new n(c),modelMatrix:d}),appearance:E,asynchronous:!1}))}if(w.getValueOrDefault(u.outline,e,!1)){c.vertexFormat=f.VERTEX_FORMAT;var b=w.getValueOrClonedDefault(u.outlineColor,e,t.BLACK,D),S=w.getValueOrDefault(u.outlineWidth,e,1),T=1!==b.alpha;this._outlinePrimitive=o.add(new g({geometryInstances:new h({id:l,geometry:new r(c),modelMatrix:d,attributes:{color:i.fromColor(b)}}),appearance:new f({flat:!0,translucent:T,renderState:{lineWidth:s._scene.clampLineWidth(S)}}),asynchronous:!1}))}}}},S.prototype.getBoundingSphere=function(e,t){return y(e,this._primitive,this._outlinePrimitive,t)},S.prototype.isDestroyed=function(){return!1},S.prototype.destroy=function(){var e=this._primitives;e.removeAndDestroy(this._primitive),e.removeAndDestroy(this._outlinePrimitive),l(this)},b}),define("Cesium/Scene/LabelStyle",["../Core/freezeObject"],function(e){"use strict";var t={FILL:0,OUTLINE:1,FILL_AND_OUTLINE:2};return e(t)}),define("Cesium/DataSources/DataSourceClock",["../Core/Clock","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Event","../Core/JulianDate","./createRawPropertyDescriptor"],function(e,t,i,n,r,o,a,s){"use strict";function l(){this._startTime=void 0,this._stopTime=void 0,this._currentTime=void 0,this._clockRange=void 0,this._clockStep=void 0,this._multiplier=void 0,this._definitionChanged=new o}return n(l.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},startTime:s("startTime"),stopTime:s("stopTime"),currentTime:s("currentTime"),clockRange:s("clockRange"),clockStep:s("clockStep"),multiplier:s("multiplier")}),l.prototype.clone=function(e){return i(e)||(e=new l),e.startTime=this.startTime,e.stopTime=this.stopTime,e.currentTime=this.currentTime,e.clockRange=this.clockRange,e.clockStep=this.clockStep,e.multiplier=this.multiplier,e},l.prototype.equals=function(e){return this===e||i(e)&&a.equals(this.startTime,e.startTime)&&a.equals(this.stopTime,e.stopTime)&&a.equals(this.currentTime,e.currentTime)&&this.clockRange===e.clockRange&&this.clockStep===e.clockStep&&this.multiplier===e.multiplier},l.prototype.merge=function(e){this.startTime=t(this.startTime,e.startTime),this.stopTime=t(this.stopTime,e.stopTime),this.currentTime=t(this.currentTime,e.currentTime),this.clockRange=t(this.clockRange,e.clockRange),this.clockStep=t(this.clockStep,e.clockStep),this.multiplier=t(this.multiplier,e.multiplier)},l.prototype.getValue=function(t){return i(t)||(t=new e),t.startTime=this.startTime,t.stopTime=this.stopTime,t.currentTime=this.currentTime,t.clockRange=this.clockRange,t.multiplier=this.multiplier,t.clockStep=this.clockStep,t},l}),define("Cesium/DataSources/GridMaterialProperty",["../Core/Cartesian2","../Core/Color","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/Event","./createPropertyDescriptor","./Property"],function(e,t,i,n,r,o,a,s){"use strict";function l(e){e=i(e,i.EMPTY_OBJECT),this._definitionChanged=new o,this._color=void 0,this._colorSubscription=void 0,this._cellAlpha=void 0,this._cellAlphaSubscription=void 0,this._lineCount=void 0,this._lineCountSubscription=void 0,this._lineThickness=void 0,this._lineThicknessSubscription=void 0,this._lineOffset=void 0,this._lineOffsetSubscription=void 0,this.color=e.color,this.cellAlpha=e.cellAlpha,this.lineCount=e.lineCount,this.lineThickness=e.lineThickness,this.lineOffset=e.lineOffset}var u=t.WHITE,c=.1,h=new e(8,8),d=new e(0,0),p=new e(1,1);return r(l.prototype,{isConstant:{get:function(){return s.isConstant(this._color)&&s.isConstant(this._cellAlpha)&&s.isConstant(this._lineCount)&&s.isConstant(this._lineThickness)&&s.isConstant(this._lineOffset)}},definitionChanged:{get:function(){return this._definitionChanged}},color:a("color"),cellAlpha:a("cellAlpha"),lineCount:a("lineCount"),lineThickness:a("lineThickness"),lineOffset:a("lineOffset")}),l.prototype.getType=function(e){return"Grid"},l.prototype.getValue=function(e,t){return n(t)||(t={}),t.color=s.getValueOrClonedDefault(this._color,e,u,t.color),t.cellAlpha=s.getValueOrDefault(this._cellAlpha,e,c),t.lineCount=s.getValueOrClonedDefault(this._lineCount,e,h,t.lineCount),t.lineThickness=s.getValueOrClonedDefault(this._lineThickness,e,p,t.lineThickness),t.lineOffset=s.getValueOrClonedDefault(this._lineOffset,e,d,t.lineOffset),t},l.prototype.equals=function(e){return this===e||e instanceof l&&s.equals(this._color,e._color)&&s.equals(this._cellAlpha,e._cellAlpha)&&s.equals(this._lineCount,e._lineCount)&&s.equals(this._lineThickness,e._lineThickness)&&s.equals(this._lineOffset,e._lineOffset)},l}),define("Cesium/DataSources/PolylineArrowMaterialProperty",["../Core/Color","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Event","./ConstantProperty","./createPropertyDescriptor","./Property"],function(e,t,i,n,r,o,a,s){"use strict";function l(e){this._definitionChanged=new r,this._color=void 0,this._colorSubscription=void 0,this.color=e}return i(l.prototype,{isConstant:{get:function(){return s.isConstant(this._color)}},definitionChanged:{get:function(){return this._definitionChanged}},color:a("color")}),l.prototype.getType=function(e){return"PolylineArrow"},l.prototype.getValue=function(i,n){return t(n)||(n={}),n.color=s.getValueOrClonedDefault(this._color,i,e.WHITE,n.color),n},l.prototype.equals=function(e){return this===e||e instanceof l&&s.equals(this._color,e._color)},l}),define("Cesium/DataSources/PolylineGlowMaterialProperty",["../Core/Color","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/Event","./createPropertyDescriptor","./Property"],function(e,t,i,n,r,o,a){"use strict";function s(e){e=t(e,t.EMPTY_OBJECT),this._definitionChanged=new r,this._color=void 0,this._colorSubscription=void 0,this._glowPower=void 0,this._glowPowerSubscription=void 0,this.color=e.color,this.glowPower=e.glowPower}var l=e.WHITE,u=.25;return n(s.prototype,{isConstant:{get:function(){return a.isConstant(this._color)&&a.isConstant(this._glow)}},definitionChanged:{get:function(){return this._definitionChanged}},color:o("color"),glowPower:o("glowPower")}),s.prototype.getType=function(e){return"PolylineGlow"},s.prototype.getValue=function(e,t){return i(t)||(t={}),t.color=a.getValueOrClonedDefault(this._color,e,l,t.color),t.glowPower=a.getValueOrDefault(this._glowPower,e,u,t.glowPower),t},s.prototype.equals=function(e){return this===e||e instanceof s&&a.equals(this._color,e._color)&&a.equals(this._glowPower,e._glowPower)},s}),define("Cesium/DataSources/PolylineOutlineMaterialProperty",["../Core/Color","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/Event","./createPropertyDescriptor","./Property"],function(e,t,i,n,r,o,a){"use strict";function s(e){e=t(e,t.EMPTY_OBJECT),this._definitionChanged=new r,this._color=void 0,this._colorSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this.color=e.color,this.outlineColor=e.outlineColor,this.outlineWidth=e.outlineWidth}var l=e.WHITE,u=e.BLACK,c=1;return n(s.prototype,{isConstant:{get:function(){return a.isConstant(this._color)&&a.isConstant(this._outlineColor)&&a.isConstant(this._outlineWidth)}},definitionChanged:{get:function(){return this._definitionChanged}},color:o("color"),outlineColor:o("outlineColor"),outlineWidth:o("outlineWidth")}),s.prototype.getType=function(e){return"PolylineOutline"},s.prototype.getValue=function(e,t){return i(t)||(t={}),t.color=a.getValueOrClonedDefault(this._color,e,l,t.color),t.outlineColor=a.getValueOrClonedDefault(this._outlineColor,e,u,t.outlineColor),t.outlineWidth=a.getValueOrDefault(this._outlineWidth,e,c),t},s.prototype.equals=function(e){return this===e||e instanceof s&&a.equals(this._color,e._color)&&a.equals(this._outlineColor,e._outlineColor)&&a.equals(this._outlineWidth,e._outlineWidth)},s}),define("Cesium/DataSources/PositionPropertyArray",["../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Event","../Core/EventHelper","../Core/ReferenceFrame","./Property"],function(e,t,i,n,r,o,a,s){"use strict";function l(t,i){this._value=void 0,this._definitionChanged=new r,this._eventHelper=new o,this._referenceFrame=e(i,a.FIXED),this.setValue(t)}return i(l.prototype,{isConstant:{get:function(){var e=this._value;if(!t(e))return!0;for(var i=e.length,n=0;i>n;n++)if(!s.isConstant(e[n]))return!1;return!0}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return this._referenceFrame}}}),l.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,a.FIXED,t)},l.prototype.getValueInReferenceFrame=function(e,i,n){var r=this._value;if(t(r)){var o=r.length;t(n)||(n=new Array(o));for(var a=0,s=0;o>a;){var l=r[a],u=l.getValueInReferenceFrame(e,i,n[a]);t(u)&&(n[s]=u,s++),a++}return n.length=s,n}},l.prototype.setValue=function(e){var i=this._eventHelper;if(i.removeAll(),t(e)){this._value=e.slice();for(var n=e.length,r=0;n>r;r++){var o=e[r];t(o)&&i.add(o.definitionChanged,l.prototype._raiseDefinitionChanged,this)}}else this._value=void 0;this._definitionChanged.raiseEvent(this)},l.prototype.equals=function(e){return this===e||e instanceof l&&this._referenceFrame===e._referenceFrame&&s.arrayEquals(this._value,e._value)},l.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)},l}),define("Cesium/DataSources/PropertyArray",["../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Event","../Core/EventHelper","./Property"],function(e,t,i,n,r,o){"use strict";function a(e){this._value=void 0,this._definitionChanged=new n,this._eventHelper=new r,this.setValue(e)}return t(a.prototype,{isConstant:{get:function(){var t=this._value;if(!e(t))return!0;for(var i=t.length,n=0;i>n;n++)if(!o.isConstant(t[n]))return!1;return!0}},definitionChanged:{get:function(){return this._definitionChanged}}}),a.prototype.getValue=function(t,i){var n=this._value;if(e(n)){var r=n.length;e(i)||(i=new Array(r));for(var o=0,a=0;r>o;){var s=this._value[o],l=s.getValue(t,i[o]);e(l)&&(i[a]=l,a++),o++}return i.length=a,i}},a.prototype.setValue=function(t){var i=this._eventHelper;if(i.removeAll(),e(t)){this._value=t.slice();for(var n=t.length,r=0;n>r;r++){var o=t[r];e(o)&&i.add(o.definitionChanged,a.prototype._raiseDefinitionChanged,this)}}else this._value=void 0;this._definitionChanged.raiseEvent(this)},a.prototype.equals=function(e){return this===e||e instanceof a&&o.arrayEquals(this._value,e._value)},a.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)},a}),define("Cesium/DataSources/ReferenceProperty",["../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Event","../Core/RuntimeError","./Property"],function(e,t,i,n,r,o){"use strict";function a(t){var i=!0;if(t._resolveEntity){var n=t._targetCollection.getById(t._targetId);if(e(n)?(n.definitionChanged.addEventListener(l.prototype._onTargetEntityDefinitionChanged,t),t._targetEntity=n,t._resolveEntity=!1):(n=t._targetEntity,i=!1),!e(n))throw new r('target entity "'+t._targetId+'" could not be resolved.')}return i}function s(t){var i=t._targetProperty;if(t._resolveProperty){var n=a(t),o=t._targetPropertyNames;i=t._targetEntity;for(var s=o.length,l=0;s>l&&e(i);l++)i=i[o[l]];if(e(i))t._targetProperty=i,t._resolveProperty=!n;else if(!e(t._targetProperty))throw new r('targetProperty "'+t._targetId+"."+o.join(".")+'" could not be resolved.')}return i}function l(e,t,i){this._targetCollection=e,this._targetId=t,this._targetPropertyNames=i,this._targetProperty=void 0,this._targetEntity=void 0,this._definitionChanged=new n,this._resolveEntity=!0,this._resolveProperty=!0,e.collectionChanged.addEventListener(l.prototype._onCollectionChanged,this)}return t(l.prototype,{isConstant:{get:function(){return o.isConstant(s(this))}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return s(this).referenceFrame}},targetId:{get:function(){return this._targetId}},targetCollection:{get:function(){return this._targetCollection}},targetPropertyNames:{get:function(){return this._targetPropertyNames}},resolvedProperty:{get:function(){return s(this)}}}),l.fromString=function(e,t){for(var i,n=[],r=!0,o=!1,a="",s=0;sr;r++)if(t[r]!==i[r])return!1;return!0},l.prototype._onTargetEntityDefinitionChanged=function(e,t,i,n){this._targetPropertyNames[0]===t&&(this._resolveProperty=!0,this._definitionChanged.raiseEvent(this))},l.prototype._onCollectionChanged=function(t,i,n){var r=this._targetEntity;e(r)&&(-1!==n.indexOf(r)?(r.definitionChanged.removeEventListener(l.prototype._onTargetEntityDefinitionChanged,this),this._resolveEntity=!0,this._resolveProperty=!0):this._resolveEntity&&(s(this),this._resolveEntity||this._definitionChanged.raiseEvent(this)))},l}),define("Cesium/DataSources/Rotation",["../Core/defaultValue","../Core/defined","../Core/DeveloperError","../Core/Math"],function(e,t,i,n){"use strict";var r={packedLength:1,pack:function(t,i,n){n=e(n,0),i[n]=t},unpack:function(t,i,n){return i=e(i,0),t[i]},convertPackedArrayForInterpolation:function(t,i,r,o){i=e(i,0),r=e(r,t.length);for(var a,s=0,l=r-i+1;l>s;s++){var u=t[i+s];0===s||Math.abs(a-u)o?o+n.TWO_PI:o}};return r}),define("Cesium/DataSources/SampledProperty",["../Core/binarySearch","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Event","../Core/ExtrapolationType","../Core/JulianDate","../Core/LinearApproximation"],function(e,t,i,n,r,o,a,s,l){"use strict";function u(e,t,i){var n,r=e.length,o=i.length,a=r+o;if(e.length=a,r!==t){var s=r-1;for(n=a-1;n>=t;n--)e[n]=e[s--]}for(n=0;o>n;n++)e[t++]=i[n]}function c(e,t){return e instanceof s?e:"string"==typeof e?s.fromIso8601(e):s.addSeconds(t,e,new s)}function h(t,n,r,o,a){for(var l,h,d,p,g,v,_=0;_d){for(d=~d,p=d*a,h=void 0,v=n[d];_=0||i(v)&&s.compare(g,v)>=0));){for(m[y++]=g,_+=1,l=0;a>l;l++)f[C++]=o[_],_+=1;h=g}y>0&&(f.length=C,u(r,p,f),m.length=y,u(n,d,m))}else{for(l=0;a>l;l++)_++,r[d*a+l]=o[_];_++}}}function d(e,n){var r=e;r===Number&&(r=p);var s,u=r.packedLength,c=t(r.packedInterpolationLength,u),h=0;if(i(n)){var d=n.length;s=new Array(d);for(var m=0;d>m;m++){var f=n[m];f===Number&&(f=p);var g=f.packedLength;u+=g,c+=t(f.packedInterpolationLength,g),s[m]=f}h=d}this._type=e,this._innerType=r,this._interpolationDegree=1,this._interpolationAlgorithm=l,this._numberOfPoints=0,this._times=[],this._values=[],this._xTable=[],this._yTable=[],this._packedLength=u,this._packedInterpolationLength=c,this._updateTableLength=!0,this._interpolationResult=new Array(c),this._definitionChanged=new o,this._derivativeTypes=n,this._innerDerivativeTypes=s,this._inputOrder=h,this._forwardExtrapolationType=a.NONE,this._forwardExtrapolationDuration=0,this._backwardExtrapolationType=a.NONE,this._backwardExtrapolationDuration=0}var p={packedLength:1,pack:function(e,i,n){n=t(n,0),i[n]=e},unpack:function(e,i,n){return i=t(i,0),e[i]}},m=[],f=[];return n(d.prototype,{isConstant:{get:function(){return 0===this._values.length}},definitionChanged:{get:function(){return this._definitionChanged}},type:{get:function(){return this._type}},derivativeTypes:{get:function(){return this._derivativeTypes}},interpolationDegree:{get:function(){return this._interpolationDegree}},interpolationAlgorithm:{get:function(){return this._interpolationAlgorithm}},forwardExtrapolationType:{get:function(){return this._forwardExtrapolationType},set:function(e){this._forwardExtrapolationType!==e&&(this._forwardExtrapolationType=e,this._definitionChanged.raiseEvent(this))}},forwardExtrapolationDuration:{get:function(){return this._forwardExtrapolationDuration},set:function(e){this._forwardExtrapolationDuration!==e&&(this._forwardExtrapolationDuration=e,this._definitionChanged.raiseEvent(this))}},backwardExtrapolationType:{get:function(){return this._backwardExtrapolationType},set:function(e){this._backwardExtrapolationType!==e&&(this._backwardExtrapolationType=e,this._definitionChanged.raiseEvent(this))}},backwardExtrapolationDuration:{get:function(){return this._backwardExtrapolationDuration},set:function(e){this._backwardExtrapolationDuration!==e&&(this._backwardExtrapolationDuration=e,this._definitionChanged.raiseEvent(this))}}}),d.prototype.getValue=function(t,n){var r=this._times,o=r.length;if(0!==o){var l,u=this._innerType,c=this._values,h=e(r,t,s.compare);if(0>h){if(h=~h,0===h){var d=r[h];if(l=this._backwardExtrapolationDuration,this._backwardExtrapolationType===a.NONE||0!==l&&s.secondsDifference(d,t)>l)return;if(this._backwardExtrapolationType===a.HOLD)return u.unpack(c,0,n)}if(h>=o){h=o-1;var p=r[h];if(l=this._forwardExtrapolationDuration,this._forwardExtrapolationType===a.NONE||0!==l&&s.secondsDifference(t,p)>l)return;if(this._forwardExtrapolationType===a.HOLD)return h=o-1,u.unpack(c,h*u.packedLength,n)}var m=this._xTable,f=this._yTable,g=this._interpolationAlgorithm,v=this._packedInterpolationLength,_=this._inputOrder;if(this._updateTableLength){this._updateTableLength=!1;var y=Math.min(g.getRequiredDataPoints(this._interpolationDegree,_),o);y!==this._numberOfPoints&&(this._numberOfPoints=y,m.length=y,f.length=y*v)}var C=this._numberOfPoints-1;if(1>C)return;var w=0,E=o-1,b=E-w+1;if(b>=C+1){var S=h-(C/2|0)-1;w>S&&(S=w);var T=S+C;T>E&&(T=E,S=T-C,w>S&&(S=w)),w=S,E=T}for(var x=E-w+1,A=0;x>A;++A)m[A]=s.secondsDifference(r[w+A],r[E]);if(i(u.convertPackedArrayForInterpolation))u.convertPackedArrayForInterpolation(c,w,E,f);else for(var P=0,M=this._packedLength,D=w*M,I=(E+1)*M;I>D;)f[P]=c[D],D++,P++;var R,O=s.secondsDifference(t,r[E]);if(0!==_&&i(g.interpolate)){var L=Math.floor(v/(_+1));R=g.interpolate(O,m,f,L,_,_,this._interpolationResult)}else R=g.interpolateOrderZero(O,m,f,v,this._interpolationResult);return i(u.unpackInterpolationResult)?u.unpackInterpolationResult(R,c,w,E,n):u.unpack(R,0,n)}return u.unpack(c,h*this._packedLength,n)}},d.prototype.setInterpolationOptions=function(e){var t=!1,i=e.interpolationAlgorithm,n=e.interpolationDegree;this._interpolationAlgorithm!==i&&(this._interpolationAlgorithm=i,t=!0),this._interpolationDegree!==n&&(this._interpolationDegree=n,t=!0),t&&(this._updateTableLength=!0,this._definitionChanged.raiseEvent(this))},d.prototype.addSample=function(e,t,n){var r=this._innerDerivativeTypes,o=i(r),a=this._innerType,s=[];if(s.push(e),a.pack(t,s,s.length),o)for(var l=r.length,u=0;l>u;u++)r[u].pack(n[u],s,s.length);h(void 0,this._times,this._values,s,this._packedLength),this._updateTableLength=!0,this._definitionChanged.raiseEvent(this)},d.prototype.addSamples=function(e,t,n){for(var r=this._innerDerivativeTypes,o=i(r),a=this._innerType,s=e.length,l=[],u=0;s>u;u++)if(l.push(e[u]),a.pack(t[u],l,l.length),o)for(var c=n[u],d=r.length,p=0;d>p;p++)r[p].pack(c[p],l,l.length);h(void 0,this._times,this._values,l,this._packedLength),this._updateTableLength=!0,this._definitionChanged.raiseEvent(this)},d.prototype.addSamplesPackedArray=function(e,t){h(t,this._times,this._values,e,this._packedLength),this._updateTableLength=!0,this._definitionChanged.raiseEvent(this)},d.prototype.equals=function(e){if(this===e)return!0;if(!i(e))return!1;if(this._type!==e._type||this._interpolationDegree!==e._interpolationDegree||this._interpolationAlgorithm!==e._interpolationAlgorithm)return!1;var t=this._derivativeTypes,n=i(t),r=e._derivativeTypes,o=i(r);if(n!==o)return!1;var a,l;if(n){if(l=t.length,l!==r.length)return!1;for(a=0;l>a;a++)if(t[a]!==r[a])return!1}var u=this._times,c=e._times;if(l=u.length,l!==c.length)return!1;for(a=0;l>a;a++)if(!s.equals(u[a],c[a]))return!1;var h=this._values,d=e._values;for(a=0;l>a;a++)if(h[a]!==d[a])return!1;return!0},d._mergeNewSamples=h,d}),define("Cesium/DataSources/SampledPositionProperty",["../Core/Cartesian3","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Event","../Core/ReferenceFrame","./PositionProperty","./Property","./SampledProperty"],function(e,t,i,n,r,o,a,s,l,u){"use strict";function c(i,n){n=t(n,0);var r;if(n>0){r=new Array(n);for(var s=0;n>s;s++)r[s]=e}this._numberOfDerivatives=n,this._property=new u(e,r),this._definitionChanged=new o,this._referenceFrame=t(i,a.FIXED),this._property._definitionChanged.addEventListener(function(){this._definitionChanged.raiseEvent(this)},this)}return n(c.prototype,{isConstant:{get:function(){return this._property.isConstant}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return this._referenceFrame}},interpolationDegree:{get:function(){return this._property.interpolationDegree}},interpolationAlgorithm:{get:function(){return this._property.interpolationAlgorithm}},numberOfDerivatives:{get:function(){return this._numberOfDerivatives}},forwardExtrapolationType:{get:function(){return this._property.forwardExtrapolationType},set:function(e){this._property.forwardExtrapolationType=e}},forwardExtrapolationDuration:{get:function(){return this._property.forwardExtrapolationDuration},set:function(e){this._property.forwardExtrapolationDuration=e}},backwardExtrapolationType:{get:function(){return this._property.backwardExtrapolationType},set:function(e){this._property.backwardExtrapolationType=e}},backwardExtrapolationDuration:{get:function(){return this._property.backwardExtrapolationDuration},set:function(e){this._property.backwardExtrapolationDuration=e}}}),c.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,a.FIXED,t)},c.prototype.getValueInReferenceFrame=function(e,t,n){return n=this._property.getValue(e,n),i(n)?s.convertToReferenceFrame(e,n,this._referenceFrame,t,n):void 0},c.prototype.setInterpolationOptions=function(e){this._property.setInterpolationOptions(e)},c.prototype.addSample=function(e,t,i){this._numberOfDerivatives;this._property.addSample(e,t,i)},c.prototype.addSamples=function(e,t,i){this._property.addSamples(e,t,i)},c.prototype.addSamplesPackedArray=function(e,t){this._property.addSamplesPackedArray(e,t)},c.prototype.equals=function(e){return this===e||e instanceof c&&l.equals(this._property,e._property)&&this._referenceFrame===e._referenceFrame},c}),define("Cesium/DataSources/StripeOrientation",["../Core/freezeObject"],function(e){"use strict";var t={HORIZONTAL:0,VERTICAL:1};return e(t)}),define("Cesium/DataSources/StripeMaterialProperty",["../Core/Color","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/Event","./createPropertyDescriptor","./Property","./StripeOrientation"],function(e,t,i,n,r,o,a,s){"use strict";function l(e){e=t(e,t.EMPTY_OBJECT),this._definitionChanged=new r,this._orientation=void 0,this._orientationSubscription=void 0,this._evenColor=void 0,this._evenColorSubscription=void 0,this._oddColor=void 0,this._oddColorSubscription=void 0,this._offset=void 0,this._offsetSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this.orientation=e.orientation,this.evenColor=e.evenColor,this.oddColor=e.oddColor,this.offset=e.offset,this.repeat=e.repeat}var u=s.HORIZONTAL,c=e.WHITE,h=e.BLACK,d=0,p=1;return n(l.prototype,{isConstant:{get:function(){return a.isConstant(this._orientation)&&a.isConstant(this._evenColor)&&a.isConstant(this._oddColor)&&a.isConstant(this._offset)&&a.isConstant(this._repeat)}},definitionChanged:{get:function(){return this._definitionChanged}},orientation:o("orientation"),evenColor:o("evenColor"),oddColor:o("oddColor"),offset:o("offset"),repeat:o("repeat")}),l.prototype.getType=function(e){return"Stripe"},l.prototype.getValue=function(e,t){return i(t)||(t={}),t.horizontal=a.getValueOrDefault(this._orientation,e,u)===s.HORIZONTAL,t.evenColor=a.getValueOrClonedDefault(this._evenColor,e,c,t.evenColor),t.oddColor=a.getValueOrClonedDefault(this._oddColor,e,h,t.oddColor),t.offset=a.getValueOrDefault(this._offset,e,d),t.repeat=a.getValueOrDefault(this._repeat,e,p),t},l.prototype.equals=function(e){return this===e||e instanceof l&&a.equals(this._orientation,e._orientation)&&a.equals(this._evenColor,e._evenColor)&&a.equals(this._oddColor,e._oddColor)&&a.equals(this._offset,e._offset)&&a.equals(this._repeat,e._repeat)},l}),define("Cesium/DataSources/TimeIntervalCollectionPositionProperty",["../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Event","../Core/ReferenceFrame","../Core/TimeIntervalCollection","./PositionProperty","./Property"],function(e,t,i,n,r,o,a,s,l){"use strict";function u(t){this._definitionChanged=new r, +this._intervals=new a,this._intervals.changedEvent.addEventListener(u.prototype._intervalsChanged,this),this._referenceFrame=e(t,o.FIXED)}return i(u.prototype,{isConstant:{get:function(){return this._intervals.isEmpty}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._intervals}},referenceFrame:{get:function(){return this._referenceFrame}}}),u.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,o.FIXED,t)},u.prototype.getValueInReferenceFrame=function(e,i,n){var r=this._intervals.findDataForIntervalContainingDate(e);return t(r)?s.convertToReferenceFrame(e,r,this._referenceFrame,i,n):void 0},u.prototype.equals=function(e){return this===e||e instanceof u&&this._intervals.equals(e._intervals,l.equals)&&this._referenceFrame===e._referenceFrame},u.prototype._intervalsChanged=function(){this._definitionChanged.raiseEvent(this)},u}),define("Cesium/DataSources/TimeIntervalCollectionProperty",["../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Event","../Core/TimeIntervalCollection","./Property"],function(e,t,i,n,r,o){"use strict";function a(){this._definitionChanged=new n,this._intervals=new r,this._intervals.changedEvent.addEventListener(a.prototype._intervalsChanged,this)}return t(a.prototype,{isConstant:{get:function(){return this._intervals.isEmpty}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._intervals}}}),a.prototype.getValue=function(t,i){var n=this._intervals.findDataForIntervalContainingDate(t);return e(n)&&"function"==typeof n.clone?n.clone(i):n},a.prototype.equals=function(e){return this===e||e instanceof a&&this._intervals.equals(e._intervals,o.equals)},a.prototype._intervalsChanged=function(){this._definitionChanged.raiseEvent(this)},a}),define("Cesium/DataSources/CzmlDataSource",["../Core/BoundingRectangle","../Core/Cartesian2","../Core/Cartesian3","../Core/Cartographic","../Core/ClockRange","../Core/ClockStep","../Core/Color","../Core/CornerType","../Core/createGuid","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Ellipsoid","../Core/Event","../Core/ExtrapolationType","../Core/getAbsoluteUri","../Core/getFilenameFromUri","../Core/HermitePolynomialApproximation","../Core/isArray","../Core/Iso8601","../Core/JulianDate","../Core/LagrangePolynomialApproximation","../Core/LinearApproximation","../Core/loadJson","../Core/Math","../Core/NearFarScalar","../Core/Quaternion","../Core/Rectangle","../Core/ReferenceFrame","../Core/RuntimeError","../Core/Spherical","../Core/TimeInterval","../Core/TimeIntervalCollection","../Scene/HeightReference","../Scene/HorizontalOrigin","../Scene/LabelStyle","../Scene/VerticalOrigin","../ThirdParty/Uri","../ThirdParty/when","./BillboardGraphics","./BoxGraphics","./ColorMaterialProperty","./CompositeMaterialProperty","./CompositePositionProperty","./CompositeProperty","./ConstantPositionProperty","./ConstantProperty","./CorridorGraphics","./CylinderGraphics","./DataSource","./DataSourceClock","./EllipseGraphics","./EllipsoidGraphics","./EntityCollection","./GridMaterialProperty","./ImageMaterialProperty","./LabelGraphics","./ModelGraphics","./NodeTransformationProperty","./PathGraphics","./PointGraphics","./PolygonGraphics","./PolylineArrowMaterialProperty","./PolylineGlowMaterialProperty","./PolylineGraphics","./PolylineOutlineMaterialProperty","./PositionPropertyArray","./PropertyArray","./PropertyBag","./RectangleGraphics","./ReferenceProperty","./Rotation","./SampledPositionProperty","./SampledProperty","./StripeMaterialProperty","./StripeOrientation","./TimeIntervalCollectionPositionProperty","./TimeIntervalCollectionProperty","./WallGraphics"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g,v,_,y,C,w,E,b,S,T,x,A,P,M,D,I,R,O,L,N,F,k,B,z,V,U,G,W,H,q,j,Y,X,Z,K,J,Q,$,ee,te,ie,ne,re,oe,ae,se,le,ue,ce,he,de,pe,me,fe,ge,ve,_e,ye,Ce,we,Ee,be,Se,Te){"use strict";function xe(e,t){return"#"===t[0]&&(t=bt+t),ve.fromString(e,t)}function Ae(e){var t=e.rgbaf;if(c(t))return t;var i=e.rgba;if(c(i)){var n=i.length;if(n===a.packedLength)return[a.byteToFloat(i[0]),a.byteToFloat(i[1]),a.byteToFloat(i[2]),a.byteToFloat(i[3])];t=new Array(n);for(var r=0;n>r;r+=5)t[r]=i[r],t[r+1]=a.byteToFloat(i[r+1]),t[r+2]=a.byteToFloat(i[r+2]),t[r+3]=a.byteToFloat(i[r+3]),t[r+4]=a.byteToFloat(i[r+4]);return t}}function Pe(e,t){var i=u(e.uri,e);return c(t)&&(i=g(i,g(t))),i}function Me(e){var t=e.wsen;if(c(t))return t;var i=e.wsenDegrees;if(c(i)){var n=i.length;if(n===P.packedLength)return[T.toRadians(i[0]),T.toRadians(i[1]),T.toRadians(i[2]),T.toRadians(i[3])];t=new Array(n);for(var r=0;n>r;r+=5)t[r]=i[r],t[r+1]=T.toRadians(i[r+1]),t[r+2]=T.toRadians(i[r+2]),t[r+3]=T.toRadians(i[r+3]),t[r+4]=T.toRadians(i[r+4]);return t}}function De(e){var t=e.length;if(Tt.magnitude=1,2===t)return Tt.clock=e[0],Tt.cone=e[1],i.fromSpherical(Tt,St),[St.x,St.y,St.z];for(var n=new Array(t/3*4),r=0,o=0;t>r;r+=3,o+=4)n[o]=e[r],Tt.clock=e[r+1],Tt.cone=e[r+2],i.fromSpherical(Tt,St),n[o+1]=St.x,n[o+2]=St.y,n[o+3]=St.z;return n}function Ie(e){var t=e.length;if(3===t)return Tt.clock=e[0],Tt.cone=e[1],Tt.magnitude=e[2],i.fromSpherical(Tt,St),[St.x,St.y,St.z];for(var n=new Array(t),r=0;t>r;r+=4)n[r]=e[r],Tt.clock=e[r+1],Tt.cone=e[r+2],Tt.magnitude=e[r+3],i.fromSpherical(Tt,St),n[r+1]=St.x,n[r+2]=St.y,n[r+3]=St.z;return n}function Re(e){var t=e.length;if(3===t)return xt.longitude=e[0],xt.latitude=e[1],xt.height=e[2],p.WGS84.cartographicToCartesian(xt,St),[St.x,St.y,St.z];for(var i=new Array(t),n=0;t>n;n+=4)i[n]=e[n],xt.longitude=e[n+1],xt.latitude=e[n+2],xt.height=e[n+3],p.WGS84.cartographicToCartesian(xt,St),i[n+1]=St.x,i[n+2]=St.y,i[n+3]=St.z;return i}function Oe(e){var t=e.length;if(3===t)return xt.longitude=T.toRadians(e[0]),xt.latitude=T.toRadians(e[1]),xt.height=e[2],p.WGS84.cartographicToCartesian(xt,St),[St.x,St.y,St.z];for(var i=new Array(t),n=0;t>n;n+=4)i[n]=e[n],xt.longitude=T.toRadians(e[n+1]),xt.latitude=T.toRadians(e[n+2]),xt.height=e[n+3],p.WGS84.cartographicToCartesian(xt,St),i[n+1]=St.x,i[n+2]=St.y,i[n+3]=St.z;return i}function Le(e){var t=e.cartesian;if(c(t))return t;var i=e.cartesianVelocity;if(c(i))return i;var n=e.unitCartesian;if(c(n))return n;var r=e.unitSpherical;if(c(r))return De(r);var o=e.spherical;if(c(o))return Ie(o);var a=e.cartographicRadians;if(c(a))return Re(a);var s=e.cartographicDegrees;if(c(s))return Oe(s);throw new D(JSON.stringify(e)+" is not a valid CZML interval.")}function Ne(e,t){var i=e[t],n=e[t+1],r=e[t+2],o=e[t+3],a=1/Math.sqrt(i*i+n*n+r*r+o*o);e[t]=i*a,e[t+1]=n*a,e[t+2]=r*a,e[t+3]=o*a}function Fe(e){var t=e.unitQuaternion;if(c(t)){if(4===t.length)return Ne(t,0),t;for(var i=1;ih);var v="function"==typeof e.unpack&&e!==_e;if(!d&&!g)return void(f?t[i]=xe(a,n.reference):v?t[i]=new Y(e.unpack(p,0)):t[i]=new Y(p));var _,y=t[i],E=n.epoch;if(c(E)&&(_=w.fromIso8601(E)),d&&!g)return y instanceof Ce||(y=new Ce(e),t[i]=y),y.addSamplesPackedArray(p,_),void Be(n,y);var b;if(!d&&g)return s=s.clone(),f?s.data=xe(a,n.reference):v?s.data=e.unpack(p,0):s.data=p,c(y)||(y=f?new q:new Se,t[i]=y),void(!f&&y instanceof Se?y.intervals.addInterval(s):y instanceof q?(s.data=f?s.data:new Y(s.data),y.intervals.addInterval(s)):(b=C.MAXIMUM_INTERVAL.clone(),b.data=y,y=new q,t[i]=y,y.intervals.addInterval(b),s.data=f?s.data:new Y(s.data),y.intervals.addInterval(s)));c(y)||(y=new q,t[i]=y),y instanceof q||(b=C.MAXIMUM_INTERVAL.clone(),b.data=y,y=new q,t[i]=y,y.intervals.addInterval(b));var S=y.intervals;b=S.findInterval(s),c(b)&&b.data instanceof Ce||(b=s.clone(),b.data=new Ce(e),S.addInterval(b)),b.data.addSamplesPackedArray(p,_),Be(n,b.data)}function Ve(e,t,i,n,r,o,a){if(c(n))if(y(n))for(var s=0,l=n.length;l>s;s++)ze(e,t,i,n[s],r,o,a);else ze(e,t,i,n,r,o,a)}function Ue(e,t,n,r,o,a){var s,l=n.interval;c(l)?(Mt.iso8601=l,s=R.fromIso8601(Mt),c(r)&&(s=R.intersect(s,r,At))):c(r)&&(s=r);var h,d,p,m=!1,f=c(n.cartesianVelocity)?1:0,g=i.packedLength*(f+1),v=c(n.reference),_=c(s)&&!s.equals(C.MAXIMUM_INTERVAL);if(v||(c(n.referenceFrame)&&(h=M[n.referenceFrame]),h=u(h,M.FIXED),d=Le(n),p=u(d.length,1),m=p>g),!m&&!_)return void(v?e[t]=xe(a,n.reference):e[t]=new j(i.unpack(d),h));var y,E=e[t],b=n.epoch;if(c(b)&&(y=w.fromIso8601(b)),m&&!_)return(!(E instanceof ye)||c(h)&&E.referenceFrame!==h)&&(E=new ye(h,f),e[t]=E),E.addSamplesPackedArray(d,y),void Be(n,E);var S;if(!m&&_)return s=s.clone(),v?s.data=xe(a,n.reference):s.data=i.unpack(d),c(E)||(E=v?new H(h):new be(h),e[t]=E),void(!v&&E instanceof be&&c(h)&&E.referenceFrame===h?E.intervals.addInterval(s):E instanceof H?(s.data=v?s.data:new j(s.data,h),E.intervals.addInterval(s)):(S=C.MAXIMUM_INTERVAL.clone(),S.data=E,E=new H(E.referenceFrame),e[t]=E,E.intervals.addInterval(S),s.data=v?s.data:new j(s.data,h),E.intervals.addInterval(s)));c(E)?E instanceof H||(S=C.MAXIMUM_INTERVAL.clone(),S.data=E,E=new H(E.referenceFrame),e[t]=E,E.intervals.addInterval(S)):(E=new H(h),e[t]=E);var T=E.intervals;S=T.findInterval(s),c(S)&&S.data instanceof ye&&(!c(h)||S.data.referenceFrame===h)||(S=s.clone(),S.data=new ye(h,f),T.addInterval(S)),S.data.addSamplesPackedArray(d,y),Be(n,S.data)}function Ge(e,t,i,n,r,o){if(c(i))if(y(i))for(var a=0,s=i.length;s>a;a++)Ue(e,t,i[a],n,r,o);else Ue(e,t,i,n,r,o)}function We(e,i,n,r,o,s){var l,u=n.interval;c(u)?(Mt.iso8601=u,l=R.fromIso8601(Mt),c(r)&&(l=R.intersect(l,r,At))):c(r)&&(l=r);var h,d,p=e[i];if(c(l)){p instanceof W||(p=new W,e[i]=p);var m=p.intervals;d=m.findInterval({start:l.start,stop:l.stop}),c(d)?h=d.data:(d=l.clone(),m.addInterval(d))}else h=p;var f;c(n.solidColor)?(h instanceof G||(h=new G),f=n.solidColor,Ve(a,h,"color",f.color,void 0,void 0,s)):c(n.grid)?(h instanceof te||(h=new te),f=n.grid,Ve(a,h,"color",f.color,void 0,o,s),Ve(Number,h,"cellAlpha",f.cellAlpha,void 0,o,s),Ve(t,h,"lineCount",f.lineCount,void 0,o,s),Ve(t,h,"lineThickness",f.lineThickness,void 0,o,s),Ve(t,h,"lineOffset",f.lineOffset,void 0,o,s)):c(n.image)?(h instanceof ie||(h=new ie),f=n.image,Ve(Image,h,"image",f.image,void 0,o,s),Ve(t,h,"repeat",f.repeat,void 0,o,s),Ve(a,h,"color",f.color,void 0,o,s),Ve(Boolean,h,"transparent",f.transparent,void 0,o,s)):c(n.stripe)?(h instanceof we||(h=new we),f=n.stripe,Ve(Ee,h,"orientation",f.orientation,void 0,o,s),Ve(a,h,"evenColor",f.evenColor,void 0,o,s),Ve(a,h,"oddColor",f.oddColor,void 0,o,s),Ve(Number,h,"offset",f.offset,void 0,o,s),Ve(Number,h,"repeat",f.repeat,void 0,o,s)):c(n.polylineOutline)?(h instanceof de||(h=new de),f=n.polylineOutline,Ve(a,h,"color",f.color,void 0,o,s),Ve(a,h,"outlineColor",f.outlineColor,void 0,o,s),Ve(Number,h,"outlineWidth",f.outlineWidth,void 0,o,s)):c(n.polylineGlow)?(h instanceof ce||(h=new ce),f=n.polylineGlow,Ve(a,h,"color",f.color,void 0,o,s),Ve(Number,h,"glowPower",f.glowPower,void 0,o,s)):c(n.polylineArrow)&&(h instanceof ue||(h=new ue),f=n.polylineArrow,Ve(a,h,"color",f.color,void 0,void 0,s)),c(d)?d.data=h:e[i]=h}function He(e,t,i,n,r,o){if(c(i))if(y(i))for(var a=0,s=i.length;s>a;a++)We(e,t,i[a],n,r,o);else We(e,t,i,n,r,o)}function qe(e,t,i,n){e.name=u(t.name,e.name)}function je(e,t,i,n){var r=t.description;c(r)&&Ve(String,e,"description",r,void 0,n,i)}function Ye(e,t,i,n){var r=t.position;c(r)&&Ge(e,"position",r,void 0,n,i)}function Xe(e,t,n,r){var o=t.viewFrom;c(o)&&Ve(i,e,"viewFrom",o,void 0,r,n)}function Ze(e,t,i,n){var r=t.orientation;c(r)&&Ve(A,e,"orientation",r,void 0,n,i)}function Ke(e,t,i,n){var r=i.references;if(c(r)){var o=r.map(function(e){return xe(n,e)}),a=i.interval;if(c(a)){if(a=R.fromIso8601(a),!(e[t]instanceof H)){a.data=new me(o);var s=new q;s.intervals.addInterval(a),e[t]=s}}else e[t]=new me(o)}else Ve(Array,e,t,i,void 0,void 0,n)}function Je(e,t,i,n){if(c(i))if(y(i))for(var r=0,o=i.length;o>r;++r)Ke(e,t,i[r],n);else Ke(e,t,i,n)}function Qe(e,t,n,r){if(c(n.references)){var o=n.references.map(function(e){return xe(r,e)}),a=n.interval;if(c(a)){if(a=R.fromIso8601(a),!(e[t]instanceof H)){a.data=new pe(o);var s=new H;s.intervals.addInterval(a),e[t]=s}}else e[t]=new pe(o)}else c(n.cartesian)?n.array=i.unpackArray(n.cartesian):c(n.cartographicRadians)?n.array=i.fromRadiansArrayHeights(n.cartographicRadians):c(n.cartographicDegrees)&&(n.array=i.fromDegreesArrayHeights(n.cartographicDegrees)),c(n.array)&&Ve(Array,e,t,n,void 0,void 0,r)}function $e(e,t,i,n){if(c(i))if(y(i))for(var r=0,o=i.length;o>r;r++)Qe(e,t,i[r],n);else Qe(e,t,i,n)}function et(e,t,i,n){var r,o=t.availability;if(c(o)){var a;if(y(o))for(var s=o.length,l=0;s>l;l++)c(a)||(a=new O),Mt.iso8601=o[l],r=R.fromIso8601(Mt),a.addInterval(r);else Mt.iso8601=o,r=R.fromIso8601(Mt),a=new O,a.addInterval(r);e.availability=a}}function tt(n,r,o,s){var l=r.billboard;if(c(l)){var u,h=l.interval;c(h)&&(Mt.iso8601=h,u=R.fromIso8601(Mt));var d=n.billboard;c(d)||(n.billboard=d=new V),Ve(Boolean,d,"show",l.show,u,s,o),Ve(Image,d,"image",l.image,u,s,o),Ve(Number,d,"scale",l.scale,u,s,o),Ve(t,d,"pixelOffset",l.pixelOffset,u,s,o),Ve(i,d,"eyeOffset",l.eyeOffset,u,s,o),Ve(N,d,"horizontalOrigin",l.horizontalOrigin,u,s,o),Ve(k,d,"verticalOrigin",l.verticalOrigin,u,s,o),Ve(L,d,"heightReference",l.heightReference,u,s,o),Ve(a,d,"color",l.color,u,s,o),Ve(_e,d,"rotation",l.rotation,u,s,o),Ve(i,d,"alignedAxis",l.alignedAxis,u,s,o),Ve(Boolean,d,"sizeInMeters",l.sizeInMeters,u,s,o),Ve(Number,d,"width",l.width,u,s,o),Ve(Number,d,"height",l.height,u,s,o),Ve(x,d,"scaleByDistance",l.scaleByDistance,u,s,o),Ve(x,d,"translucencyByDistance",l.translucencyByDistance,u,s,o),Ve(x,d,"pixelOffsetScaleByDistance",l.pixelOffsetScaleByDistance,u,s,o),Ve(e,d,"imageSubRegion",l.imageSubRegion,u,s,o)}}function it(e,t,n,r){var o=t.box;if(c(o)){var s,l=o.interval;c(l)&&(Mt.iso8601=l,s=R.fromIso8601(Mt));var u=e.box;c(u)||(e.box=u=new U),Ve(Boolean,u,"show",o.show,s,r,n),Ve(i,u,"dimensions",o.dimensions,s,r,n),Ve(Boolean,u,"fill",o.fill,s,r,n),He(u,"material",o.material,s,r,n),Ve(Boolean,u,"outline",o.outline,s,r,n),Ve(a,u,"outlineColor",o.outlineColor,s,r,n),Ve(Number,u,"outlineWidth",o.outlineWidth,s,r,n)}}function nt(e,t,i,n){var r=t.corridor;if(c(r)){var o,l=r.interval;c(l)&&(Mt.iso8601=l,o=R.fromIso8601(Mt));var u=e.corridor;c(u)||(e.corridor=u=new X),Ve(Boolean,u,"show",r.show,o,n,i),$e(u,"positions",r.positions,i),Ve(Number,u,"width",r.width,o,n,i),Ve(Number,u,"height",r.height,o,n,i),Ve(Number,u,"extrudedHeight",r.extrudedHeight,o,n,i),Ve(s,u,"cornerType",r.cornerType,o,n,i),Ve(Number,u,"granularity",r.granularity,o,n,i),Ve(Boolean,u,"fill",r.fill,o,n,i),He(u,"material",r.material,o,n,i),Ve(Boolean,u,"outline",r.outline,o,n,i),Ve(a,u,"outlineColor",r.outlineColor,o,n,i),Ve(Number,u,"outlineWidth",r.outlineWidth,o,n,i)}}function rt(e,t,i,n){var r=t.cylinder;if(c(r)){var o,s=r.interval;c(s)&&(Mt.iso8601=s,o=R.fromIso8601(Mt));var l=e.cylinder;c(l)||(e.cylinder=l=new Z),Ve(Boolean,l,"show",r.show,o,n,i),Ve(Number,l,"length",r.length,o,n,i),Ve(Number,l,"topRadius",r.topRadius,o,n,i),Ve(Number,l,"bottomRadius",r.bottomRadius,o,n,i),Ve(Boolean,l,"fill",r.fill,o,n,i),He(l,"material",r.material,o,n,i),Ve(Boolean,l,"outline",r.outline,o,n,i),Ve(a,l,"outlineColor",r.outlineColor,o,n,i),Ve(Number,l,"outlineWidth",r.outlineWidth,o,n,i),Ve(Number,l,"numberOfVerticalLines",r.numberOfVerticalLines,o,n,i),Ve(Number,l,"slices",r.slices,o,n,i)}}function ot(e,t){var i=e.version;if(c(i)&&"string"==typeof i){var n=i.split(".");if(2===n.length){if("1"!==n[0])throw new D("Cesium only supports CZML version 1.");t._version=i}}if(!c(t._version))throw new D("CZML version information invalid. It is expected to be a property on the document object in the . version format.");var r=t._documentPacket;c(e.name)&&(r.name=e.name);var o=e.clock;if(c(o)){var a=r.clock;c(a)?(a.interval=u(o.interval,a.interval),a.currentTime=u(o.currentTime,a.currentTime),a.range=u(o.range,a.range),a.step=u(o.step,a.step),a.multiplier=u(o.multiplier,a.multiplier)):r.clock={interval:o.interval,currentTime:o.currentTime,range:o.range,step:o.step,multiplier:o.multiplier}}}function at(e,t,i,n){var r=t.ellipse;if(c(r)){var o,s=r.interval;c(s)&&(Mt.iso8601=s,o=R.fromIso8601(Mt));var l=e.ellipse;c(l)||(e.ellipse=l=new Q),Ve(Boolean,l,"show",r.show,o,n,i),Ve(Number,l,"semiMajorAxis",r.semiMajorAxis,o,n,i),Ve(Number,l,"semiMinorAxis",r.semiMinorAxis,o,n,i),Ve(Number,l,"height",r.height,o,n,i),Ve(Number,l,"extrudedHeight",r.extrudedHeight,o,n,i),Ve(_e,l,"rotation",r.rotation,o,n,i),Ve(_e,l,"stRotation",r.stRotation,o,n,i),Ve(Number,l,"granularity",r.granularity,o,n,i),Ve(Boolean,l,"fill",r.fill,o,n,i),He(l,"material",r.material,o,n,i),Ve(Boolean,l,"outline",r.outline,o,n,i),Ve(a,l,"outlineColor",r.outlineColor,o,n,i),Ve(Number,l,"outlineWidth",r.outlineWidth,o,n,i),Ve(Number,l,"numberOfVerticalLines",r.numberOfVerticalLines,o,n,i)}}function st(e,t,n,r){var o=t.ellipsoid;if(c(o)){var s,l=o.interval;c(l)&&(Mt.iso8601=l,s=R.fromIso8601(Mt));var u=e.ellipsoid;c(u)||(e.ellipsoid=u=new $),Ve(Boolean,u,"show",o.show,s,r,n),Ve(i,u,"radii",o.radii,s,r,n),Ve(Boolean,u,"fill",o.fill,s,r,n),He(u,"material",o.material,s,r,n),Ve(Boolean,u,"outline",o.outline,s,r,n),Ve(a,u,"outlineColor",o.outlineColor,s,r,n),Ve(Number,u,"outlineWidth",o.outlineWidth,s,r,n),Ve(Number,u,"stackPartitions",o.stackPartitions,s,r,n),Ve(Number,u,"slicePartitions",o.slicePartitions,s,r,n),Ve(Number,u,"subdivisions",o.subdivisions,s,r,n)}}function lt(e,n,r,o){var s=n.label;if(c(s)){var l,u=s.interval;c(u)&&(Mt.iso8601=u,l=R.fromIso8601(Mt));var h=e.label;c(h)||(e.label=h=new ne),Ve(Boolean,h,"show",s.show,l,o,r),Ve(String,h,"text",s.text,l,o,r),Ve(String,h,"font",s.font,l,o,r),Ve(F,h,"style",s.style,l,o,r),Ve(Number,h,"scale",s.scale,l,o,r),Ve(t,h,"pixelOffset",s.pixelOffset,l,o,r),Ve(i,h,"eyeOffset",s.eyeOffset,l,o,r),Ve(N,h,"horizontalOrigin",s.horizontalOrigin,l,o,r),Ve(k,h,"verticalOrigin",s.verticalOrigin,l,o,r),Ve(L,h,"heightReference",s.heightReference,l,o,r),Ve(a,h,"fillColor",s.fillColor,l,o,r),Ve(a,h,"outlineColor",s.outlineColor,l,o,r),Ve(Number,h,"outlineWidth",s.outlineWidth,l,o,r),Ve(x,h,"translucencyByDistance",s.translucencyByDistance,l,o,r),Ve(x,h,"pixelOffsetScaleByDistance",s.pixelOffsetScaleByDistance,l,o,r)}}function ut(e,t,i,n){var r=t.model;if(c(r)){var o,a=r.interval;c(a)&&(Mt.iso8601=a,o=R.fromIso8601(Mt));var s=e.model;c(s)||(e.model=s=new re),Ve(Boolean,s,"show",r.show,o,n,i),Ve(B,s,"uri",r.gltf,o,n,i),Ve(Number,s,"scale",r.scale,o,n,i),Ve(Number,s,"minimumPixelSize",r.minimumPixelSize,o,n,i),Ve(Number,s,"maximumScale",r.maximumScale,o,n,i),Ve(Boolean,s,"incrementallyLoadTextures",r.incrementallyLoadTextures,o,n,i),Ve(Boolean,s,"castShadows",r.castShadows,o,n,i),Ve(Boolean,s,"receiveShadows",r.receiveShadows,o,n,i),Ve(Boolean,s,"runAnimations",r.runAnimations,o,n,i),Ve(L,s,"heightReference",r.heightReference,o,n,i);var l=r.nodeTransformations;if(c(l))if(y(l))for(var u=0,h=l.length;h>u;u++)ct(s,l[u],o,n,i);else ct(s,l,o,n,i)}}function ct(e,t,n,r,o){var a,s=t.interval;c(s)?(Mt.iso8601=s,a=R.fromIso8601(Mt),c(n)&&(a=R.intersect(a,n,At))):c(n)&&(a=n);for(var l=e.nodeTransformations,u=Object.keys(t),h=0,d=u.length;d>h;++h){var p=u[h];if("interval"!==p){var m=t[p];if(c(m)){c(l)||(e.nodeTransformations=l=new fe),l.hasProperty(p)||l.addProperty(p);var f=l[p];c(f)||(l[p]=f=new oe),Ve(i,f,"translation",m.translation,a,r,o),Ve(A,f,"rotation",m.rotation,a,r,o),Ve(i,f,"scale",m.scale,a,r,o)}}}}function ht(e,t,i,n){var r=t.path;if(c(r)){var o,a=r.interval;c(a)&&(Mt.iso8601=a,o=R.fromIso8601(Mt));var s=e.path;c(s)||(e.path=s=new ae),Ve(Boolean,s,"show",r.show,o,n,i),Ve(Number,s,"width",r.width,o,n,i),Ve(Number,s,"resolution",r.resolution,o,n,i),Ve(Number,s,"leadTime",r.leadTime,o,n,i),Ve(Number,s,"trailTime",r.trailTime,o,n,i),He(s,"material",r.material,o,n,i)}}function dt(e,t,i,n){var r=t.point;if(c(r)){var o,s=r.interval;c(s)&&(Mt.iso8601=s,o=R.fromIso8601(Mt));var l=e.point;c(l)||(e.point=l=new se),Ve(Boolean,l,"show",r.show,o,n,i),Ve(Number,l,"pixelSize",r.pixelSize,o,n,i),Ve(a,l,"color",r.color,o,n,i),Ve(a,l,"outlineColor",r.outlineColor,o,n,i),Ve(Number,l,"outlineWidth",r.outlineWidth,o,n,i),Ve(x,l,"scaleByDistance",r.scaleByDistance,o,n,i),Ve(x,l,"translucencyByDistance",r.translucencyByDistance,o,n,i),Ve(L,l,"heightReference",r.heightReference,o,n,i)}}function pt(e,t,i,n){var r=t.polygon;if(c(r)){var o,s=r.interval;c(s)&&(Mt.iso8601=s,o=R.fromIso8601(Mt));var l=e.polygon;c(l)||(e.polygon=l=new le),Ve(Boolean,l,"show",r.show,o,n,i),$e(l,"hierarchy",r.positions,i),Ve(Number,l,"height",r.height,o,n,i),Ve(Number,l,"extrudedHeight",r.extrudedHeight,o,n,i),Ve(_e,l,"stRotation",r.stRotation,o,n,i),Ve(Number,l,"granularity",r.granularity,o,n,i),Ve(Boolean,l,"fill",r.fill,o,n,i),He(l,"material",r.material,o,n,i),Ve(Boolean,l,"outline",r.outline,o,n,i),Ve(a,l,"outlineColor",r.outlineColor,o,n,i),Ve(Number,l,"outlineWidth",r.outlineWidth,o,n,i),Ve(Boolean,l,"perPositionHeight",r.perPositionHeight,o,n,i),Ve(Boolean,l,"closeTop",r.closeTop,o,n,i),Ve(Boolean,l,"closeBottom",r.closeBottom,o,n,i)}}function mt(e,t,i,n){var r=t.polyline;if(c(r)){var o,a=r.interval;c(a)&&(Mt.iso8601=a,o=R.fromIso8601(Mt));var s=e.polyline;c(s)||(e.polyline=s=new he),Ve(Boolean,s,"show",r.show,o,n,i),$e(s,"positions",r.positions,i),Ve(Number,s,"width",r.width,o,n,i),Ve(Number,s,"granularity",r.granularity,o,n,i),He(s,"material",r.material,o,n,i),Ve(Boolean,s,"followSurface",r.followSurface,o,n,i)}}function ft(e,t,i,n){var r=t.rectangle;if(c(r)){var o,s=r.interval;c(s)&&(Mt.iso8601=s,o=R.fromIso8601(Mt));var l=e.rectangle;c(l)||(e.rectangle=l=new ge),Ve(Boolean,l,"show",r.show,o,n,i),Ve(P,l,"coordinates",r.coordinates,o,n,i),Ve(Number,l,"height",r.height,o,n,i),Ve(Number,l,"extrudedHeight",r.extrudedHeight,o,n,i),Ve(_e,l,"rotation",r.rotation,o,n,i),Ve(_e,l,"stRotation",r.stRotation,o,n,i),Ve(Number,l,"granularity",r.granularity,o,n,i),Ve(Boolean,l,"fill",r.fill,o,n,i),He(l,"material",r.material,o,n,i),Ve(Boolean,l,"outline",r.outline,o,n,i),Ve(a,l,"outlineColor",r.outlineColor,o,n,i),Ve(Number,l,"outlineWidth",r.outlineWidth,o,n,i),Ve(Boolean,l,"closeTop",r.closeTop,o,n,i),Ve(Boolean,l,"closeBottom",r.closeBottom,o,n,i)}}function gt(e,t,i,n){var r=t.wall;if(c(r)){var o,s=r.interval;c(s)&&(Mt.iso8601=s,o=R.fromIso8601(Mt));var l=e.wall;c(l)||(e.wall=l=new Te),Ve(Boolean,l,"show",r.show,o,n,i),$e(l,"positions",r.positions,i),Je(l,"minimumHeights",r.minimumHeights,i),Je(l,"maximumHeights",r.maximumHeights,i),Ve(Number,l,"granularity",r.granularity,o,n,i),Ve(Boolean,l,"fill",r.fill,o,n,i),He(l,"material",r.material,o,n,i),Ve(Boolean,l,"outline",r.outline,o,n,i),Ve(a,l,"outlineColor",r.outlineColor,o,n,i),Ve(Number,l,"outlineWidth",r.outlineWidth,o,n,i)}}function vt(e,t,i,n,r){var o=e.id;if(c(o)||(o=l()),bt=o,!c(r._version)&&"document"!==o)throw new D("The first CZML packet is required to be the document object.");if(e["delete"]===!0)t.removeById(o);else if("document"===o)ot(e,r);else{var a=t.getOrCreateEntity(o),s=e.parent;c(s)&&(a.parent=t.getOrCreateEntity(s));for(var u=i.length-1;u>-1;u--)i[u](a,e,t,n)}bt=void 0}function _t(e){var t,i=e._documentPacket.clock;if(!c(i)){if(!c(e._clock)){var n=e._entityCollection.computeAvailability();if(!n.start.equals(C.MINIMUM_VALUE)){var a=n.start,s=n.stop,l=w.secondsDifference(s,a),h=Math.round(l/120);return t=new J,t.startTime=w.clone(a),t.stopTime=w.clone(s),t.clockRange=r.LOOP_STOP,t.multiplier=h,t.currentTime=w.clone(a),t.clockStep=o.SYSTEM_CLOCK_MULTIPLIER,e._clock=t,!0}}return!1}if(c(e._clock)?t=e._clock.clone():(t=new J,t.startTime=C.MINIMUM_VALUE.clone(),t.stopTime=C.MAXIMUM_VALUE.clone(),t.currentTime=C.MINIMUM_VALUE.clone(),t.clockRange=r.LOOP_STOP,t.clockStep=o.SYSTEM_CLOCK_MULTIPLIER,t.multiplier=1),c(i.interval)){Mt.iso8601=i.interval;var d=R.fromIso8601(Mt);t.startTime=d.start,t.stopTime=d.stop}return c(i.currentTime)&&(t.currentTime=w.fromIso8601(i.currentTime)),c(i.range)&&(t.clockRange=u(r[i.range],r.LOOP_STOP)),c(i.step)&&(t.clockStep=u(o[i.step],o.SYSTEM_CLOCK_MULTIPLIER)),c(i.multiplier)&&(t.multiplier=i.multiplier),t.equals(e._clock)?!1:(e._clock=t.clone(e._clock),!0)}function yt(e,t,i,n){i=u(i,u.EMPTY_OBJECT);var r=t,o=i.sourceUri;return"string"==typeof t&&(r=S(t),o=u(o,t)),K.setLoading(e,!0),z(r,function(t){return Ct(e,t,o,n)}).otherwise(function(t){return K.setLoading(e,!1),e._error.raiseEvent(e,t),console.log(t),z.reject(t)})}function Ct(e,t,i,n){K.setLoading(e,!0);var r=e._entityCollection;n&&(e._version=void 0,e._documentPacket=new wt,r.removeAll()),Et._processCzml(t,r,i,void 0,e);var o=_t(e),a=e._documentPacket;return c(a.name)&&e._name!==a.name?(e._name=a.name,o=!0):!c(e._name)&&c(i)&&(e._name=v(i),o=!0),K.setLoading(e,!1),o&&e._changed.raiseEvent(e),e}function wt(){this.name=void 0,this.clock=void 0}function Et(e){this._name=e,this._changed=new m,this._error=new m,this._isLoading=!1,this._loading=new m,this._clock=void 0,this._documentPacket=new wt,this._version=void 0,this._entityCollection=new ee(this)}var bt,St=new i,Tt=new I,xt=new n,At=new R,Pt={HERMITE:_,LAGRANGE:E,LINEAR:b},Mt={iso8601:void 0};return Et.load=function(e,t){return(new Et).load(e,t)},h(Et.prototype,{name:{get:function(){return this._name}},clock:{get:function(){return this._clock}},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},show:{get:function(){return this._entityCollection.show},set:function(e){this._entityCollection.show=e}}}),Et.updaters=[tt,it,nt,rt,at,st,lt,ut,qe,je,ht,dt,pt,mt,ft,Ye,Xe,gt,Ze,et],Et.prototype.process=function(e,t){return yt(this,e,t,!1)},Et.prototype.load=function(e,t){return yt(this,e,t,!0)},Et.processPacketData=Ve,Et.processPositionPacketData=Ge,Et.processMaterialPacketData=He,Et._processCzml=function(e,t,i,n,r){if(n=c(n)?n:Et.updaters,y(e))for(var o=0,a=e.length;a>o;o++)vt(e[o],t,n,i,r);else vt(e,t,n,i,r)},Et}),define("Cesium/DataSources/DataSourceCollection",["../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/destroyObject","../Core/DeveloperError","../Core/Event","../ThirdParty/when"],function(e,t,i,n,r,o,a){"use strict";function s(){this._dataSources=[],this._dataSourceAdded=new o,this._dataSourceRemoved=new o}return i(s.prototype,{length:{get:function(){return this._dataSources.length}},dataSourceAdded:{get:function(){return this._dataSourceAdded}},dataSourceRemoved:{get:function(){return this._dataSourceRemoved}}}),s.prototype.add=function(e){var t=this,i=this._dataSources;return a(e,function(e){return i===t._dataSources&&(t._dataSources.push(e),t._dataSourceAdded.raiseEvent(t,e)),e})},s.prototype.remove=function(t,i){i=e(i,!1);var n=this._dataSources.indexOf(t);return-1!==n?(this._dataSources.splice(n,1),this._dataSourceRemoved.raiseEvent(this,t),i&&"function"==typeof t.destroy&&t.destroy(),!0):!1},s.prototype.removeAll=function(t){t=e(t,!1);for(var i=this._dataSources,n=0,r=i.length;r>n;++n){var o=i[n];this._dataSourceRemoved.raiseEvent(this,o),t&&"function"==typeof o.destroy&&o.destroy()}this._dataSources=[]},s.prototype.contains=function(e){return-1!==this.indexOf(e)},s.prototype.indexOf=function(e){return this._dataSources.indexOf(e)},s.prototype.get=function(e){return this._dataSources[e]},s.prototype.isDestroyed=function(){return!1},s.prototype.destroy=function(){return this.removeAll(!0),n(this)},s}),define("Cesium/DataSources/EllipseGeometryUpdater",["../Core/Color","../Core/ColorGeometryInstanceAttribute","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/destroyObject","../Core/DeveloperError","../Core/EllipseGeometry","../Core/EllipseOutlineGeometry","../Core/Event","../Core/GeometryInstance","../Core/Iso8601","../Core/oneTimeWarning","../Core/ShowGeometryInstanceAttribute","../Scene/GroundPrimitive","../Scene/MaterialAppearance","../Scene/PerInstanceColorAppearance","../Scene/Primitive","./ColorMaterialProperty","./ConstantProperty","./dynamicGeometryGetBoundingSphere","./MaterialProperty","./Property"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g,v,_,y,C,w,E){"use strict";function b(e){this.id=e,this.vertexFormat=void 0,this.center=void 0,this.semiMajorAxis=void 0,this.semiMinorAxis=void 0,this.rotation=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.stRotation=void 0,this.numberOfVerticalLines=void 0}function S(e,t){this._entity=e,this._scene=t,this._entitySubscription=e.definitionChanged.addEventListener(S.prototype._onEntityPropertyChanged,this),this._fillEnabled=!1,this._isClosed=!1,this._dynamic=!1,this._outlineEnabled=!1,this._geometryChanged=new u,this._showProperty=void 0,this._materialProperty=void 0,this._hasConstantOutline=!0,this._showOutlineProperty=void 0,this._outlineColorProperty=void 0,this._outlineWidth=1,this._onTerrain=!1,this._options=new b(e),this._onEntityPropertyChanged(e,"ellipse",e.ellipse,void 0)}function T(e,t,i){this._primitives=e,this._groundPrimitives=t,this._primitive=void 0,this._outlinePrimitive=void 0,this._geometryUpdater=i,this._options=new b(i._entity)}var x=new _(e.WHITE),A=new y(!0),P=new y(!0),M=new y(!1),D=new y(e.BLACK),I=new e;return r(S,{perInstanceColorAppearanceType:{value:g},materialAppearanceType:{value:f}}),r(S.prototype,{entity:{get:function(){return this._entity}},fillEnabled:{get:function(){return this._fillEnabled}},hasConstantFill:{get:function(){return!this._fillEnabled||!n(this._entity.availability)&&E.isConstant(this._showProperty)&&E.isConstant(this._fillProperty)}},fillMaterialProperty:{get:function(){return this._materialProperty}},outlineEnabled:{get:function(){return this._outlineEnabled}},hasConstantOutline:{get:function(){return!this._outlineEnabled||!n(this._entity.availability)&&E.isConstant(this._showProperty)&&E.isConstant(this._showOutlineProperty)}},outlineColorProperty:{get:function(){return this._outlineColorProperty}},outlineWidth:{get:function(){return this._outlineWidth}},isDynamic:{get:function(){return this._dynamic}},isClosed:{get:function(){return this._isClosed}},onTerrain:{get:function(){return this._onTerrain}},geometryChanged:{get:function(){return this._geometryChanged}}}),S.prototype.isOutlineVisible=function(e){var t=this._entity;return this._outlineEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)},S.prototype.isFilled=function(e){var t=this._entity;return this._fillEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)},S.prototype.createFillGeometryInstance=function(i){ +var r,o,a=this._entity,l=a.isAvailable(i),u=new p(l&&a.isShowing&&this._showProperty.getValue(i)&&this._fillProperty.getValue(i));if(this._materialProperty instanceof _){var h=e.WHITE;n(this._materialProperty.color)&&(this._materialProperty.color.isConstant||l)&&(h=this._materialProperty.color.getValue(i)),o=t.fromColor(h),r={show:u,color:o}}else r={show:u};return new c({id:a,geometry:new s(this._options),attributes:r})},S.prototype.createOutlineGeometryInstance=function(i){var n=this._entity,r=n.isAvailable(i),o=E.getValueOrDefault(this._outlineColorProperty,i,e.BLACK);return new c({id:n,geometry:new l(this._options),attributes:{show:new p(r&&n.isShowing&&this._showProperty.getValue(i)&&this._showOutlineProperty.getValue(i)),color:t.fromColor(o)}})},S.prototype.isDestroyed=function(){return!1},S.prototype.destroy=function(){this._entitySubscription(),o(this)},S.prototype._onEntityPropertyChanged=function(e,t,r,o){if("availability"===t||"position"===t||"ellipse"===t){var a=this._entity.ellipse;if(!n(a))return void((this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this)));var s=a.fill,l=n(s)&&s.isConstant?s.getValue(h.MINIMUM_VALUE):!0,u=a.outline,c=n(u);if(c&&u.isConstant&&(c=u.getValue(h.MINIMUM_VALUE)),!l&&!c)return void((this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this)));var p=this._entity.position,v=a.semiMajorAxis,y=a.semiMinorAxis,C=a.show;if(n(C)&&C.isConstant&&!C.getValue(h.MINIMUM_VALUE)||!n(p)||!n(v)||!n(y))return void((this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this)));var w=i(a.material,x),b=w instanceof _;this._materialProperty=w,this._fillProperty=i(s,P),this._showProperty=i(C,A),this._showOutlineProperty=i(a.outline,M),this._outlineColorProperty=c?i(a.outlineColor,D):void 0;var S=a.rotation,T=a.height,I=a.extrudedHeight,R=a.granularity,O=a.stRotation,L=a.outlineWidth,N=a.numberOfVerticalLines,F=l&&!n(T)&&!n(I)&&b&&m.isSupported(this._scene);if(c&&F&&(d(d.geometryOutlines),c=!1),this._fillEnabled=l,this._onTerrain=F,this._isClosed=n(I)||F,this._outlineEnabled=c,p.isConstant&&v.isConstant&&y.isConstant&&E.isConstant(S)&&E.isConstant(T)&&E.isConstant(I)&&E.isConstant(R)&&E.isConstant(O)&&E.isConstant(L)&&E.isConstant(N)){var k=this._options;k.vertexFormat=b?g.VERTEX_FORMAT:f.MaterialSupport.TEXTURED.vertexFormat,k.center=p.getValue(h.MINIMUM_VALUE,k.center),k.semiMajorAxis=v.getValue(h.MINIMUM_VALUE,k.semiMajorAxis),k.semiMinorAxis=y.getValue(h.MINIMUM_VALUE,k.semiMinorAxis),k.rotation=n(S)?S.getValue(h.MINIMUM_VALUE):void 0,k.height=n(T)?T.getValue(h.MINIMUM_VALUE):void 0,k.extrudedHeight=n(I)?I.getValue(h.MINIMUM_VALUE):void 0,k.granularity=n(R)?R.getValue(h.MINIMUM_VALUE):void 0,k.stRotation=n(O)?O.getValue(h.MINIMUM_VALUE):void 0,k.numberOfVerticalLines=n(N)?N.getValue(h.MINIMUM_VALUE):void 0,this._outlineWidth=n(L)?L.getValue(h.MINIMUM_VALUE):1,this._dynamic=!1,this._geometryChanged.raiseEvent(this)}else this._dynamic||(this._dynamic=!0,this._geometryChanged.raiseEvent(this))}},S.prototype.createDynamicUpdater=function(e,t){return new T(e,t,this)},T.prototype.update=function(i){var r=this._geometryUpdater,o=r._onTerrain,a=this._primitives,u=this._groundPrimitives;o?u.removeAndDestroy(this._primitive):(a.removeAndDestroy(this._primitive),a.removeAndDestroy(this._outlinePrimitive),this._outlinePrimitive=void 0),this._primitive=void 0;var h=r._entity,d=h.ellipse;if(h.isShowing&&h.isAvailable(i)&&E.getValueOrDefault(d.show,i,!0)){var p=this._options,_=E.getValueOrUndefined(h.position,i,p.center),y=E.getValueOrUndefined(d.semiMajorAxis,i),C=E.getValueOrUndefined(d.semiMinorAxis,i);if(n(_)&&n(y)&&n(C)){if(p.center=_,p.semiMajorAxis=y,p.semiMinorAxis=C,p.rotation=E.getValueOrUndefined(d.rotation,i),p.height=E.getValueOrUndefined(d.height,i),p.extrudedHeight=E.getValueOrUndefined(d.extrudedHeight,i),p.granularity=E.getValueOrUndefined(d.granularity,i),p.stRotation=E.getValueOrUndefined(d.stRotation,i),p.numberOfVerticalLines=E.getValueOrUndefined(d.numberOfVerticalLines,i),E.getValueOrDefault(d.fill,i,!0)){var b=r.fillMaterialProperty,S=w.getValue(i,b,this._material);if(this._material=S,o){var T=e.WHITE;n(b.color)&&(T=b.color.getValue(i)),this._primitive=u.add(new m({geometryInstance:new c({id:h,geometry:new s(p),attributes:{color:t.fromColor(T)}}),asynchronous:!1}))}else{var x=new f({material:S,translucent:S.isTranslucent(),closed:n(p.extrudedHeight)});p.vertexFormat=x.vertexFormat,this._primitive=a.add(new v({geometryInstances:new c({id:h,geometry:new s(p)}),appearance:x,asynchronous:!1}))}}if(!o&&E.getValueOrDefault(d.outline,i,!1)){p.vertexFormat=g.VERTEX_FORMAT;var A=E.getValueOrClonedDefault(d.outlineColor,i,e.BLACK,I),P=E.getValueOrDefault(d.outlineWidth,i,1),M=1!==A.alpha;this._outlinePrimitive=a.add(new v({geometryInstances:new c({id:h,geometry:new l(p),attributes:{color:t.fromColor(A)}}),appearance:new g({flat:!0,translucent:M,renderState:{lineWidth:r._scene.clampLineWidth(P)}}),asynchronous:!1}))}}}},T.prototype.getBoundingSphere=function(e,t){return C(e,this._primitive,this._outlinePrimitive,t)},T.prototype.isDestroyed=function(){return!1},T.prototype.destroy=function(){var e=this._primitives,t=this._groundPrimitives;this._geometryUpdater._onTerrain?t.removeAndDestroy(this._primitive):e.removeAndDestroy(this._primitive),e.removeAndDestroy(this._outlinePrimitive),o(this)},S}),define("Cesium/DataSources/EllipsoidGeometryUpdater",["../Core/Cartesian3","../Core/Color","../Core/ColorGeometryInstanceAttribute","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/destroyObject","../Core/DeveloperError","../Core/EllipsoidGeometry","../Core/EllipsoidOutlineGeometry","../Core/Event","../Core/GeometryInstance","../Core/Iso8601","../Core/Matrix4","../Core/ShowGeometryInstanceAttribute","../Scene/MaterialAppearance","../Scene/PerInstanceColorAppearance","../Scene/Primitive","../Scene/SceneMode","./ColorMaterialProperty","./ConstantProperty","./dynamicGeometryGetBoundingSphere","./MaterialProperty","./Property"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g,v,_,y,C,w,E,b){"use strict";function S(e){this.id=e,this.vertexFormat=void 0,this.radii=void 0,this.stackPartitions=void 0,this.slicePartitions=void 0,this.subdivisions=void 0}function T(e,t){this._scene=t,this._entity=e,this._entitySubscription=e.definitionChanged.addEventListener(T.prototype._onEntityPropertyChanged,this),this._fillEnabled=!1,this._dynamic=!1,this._outlineEnabled=!1,this._geometryChanged=new c,this._showProperty=void 0,this._materialProperty=void 0,this._hasConstantOutline=!0,this._showOutlineProperty=void 0,this._outlineColorProperty=void 0,this._outlineWidth=1,this._options=new S(e),this._onEntityPropertyChanged(e,"ellipsoid",e.ellipsoid,void 0)}function x(e,t){this._entity=t._entity,this._scene=t._scene,this._primitives=e,this._primitive=void 0,this._outlinePrimitive=void 0,this._geometryUpdater=t,this._options=new S(t._entity),this._modelMatrix=new p,this._material=void 0,this._attributes=void 0,this._outlineAttributes=void 0,this._lastSceneMode=void 0,this._lastShow=void 0,this._lastOutlineShow=void 0,this._lastOutlineWidth=void 0,this._lastOutlineColor=void 0}var A=new y(t.WHITE),P=new C(!0),M=new C(!0),D=new C(!1),I=new C(t.BLACK),R=new e,O=new t,L=new e(1,1,1);return o(T,{perInstanceColorAppearanceType:{value:g},materialAppearanceType:{value:f}}),o(T.prototype,{entity:{get:function(){return this._entity}},fillEnabled:{get:function(){return this._fillEnabled}},hasConstantFill:{get:function(){return!this._fillEnabled||!r(this._entity.availability)&&b.isConstant(this._showProperty)&&b.isConstant(this._fillProperty)}},fillMaterialProperty:{get:function(){return this._materialProperty}},outlineEnabled:{get:function(){return this._outlineEnabled}},hasConstantOutline:{get:function(){return!this._outlineEnabled||!r(this._entity.availability)&&b.isConstant(this._showProperty)&&b.isConstant(this._showOutlineProperty)}},outlineColorProperty:{get:function(){return this._outlineColorProperty}},outlineWidth:{get:function(){return this._outlineWidth}},isDynamic:{get:function(){return this._dynamic}},isClosed:{value:!0},geometryChanged:{get:function(){return this._geometryChanged}}}),T.prototype.isOutlineVisible=function(e){var t=this._entity;return this._outlineEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)},T.prototype.isFilled=function(e){var t=this._entity;return this._fillEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)},T.prototype.createFillGeometryInstance=function(e){var n,o,a=this._entity,s=a.isAvailable(e),u=new m(s&&a.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e));if(this._materialProperty instanceof y){var c=t.WHITE;r(this._materialProperty.color)&&(this._materialProperty.color.isConstant||s)&&(c=this._materialProperty.color.getValue(e)),o=i.fromColor(c),n={show:u,color:o}}else n={show:u};return new h({id:a,geometry:new l(this._options),modelMatrix:a._getModelMatrix(d.MINIMUM_VALUE),attributes:n})},T.prototype.createOutlineGeometryInstance=function(e){var n=this._entity,r=n.isAvailable(e),o=b.getValueOrDefault(this._outlineColorProperty,e,t.BLACK);return new h({id:n,geometry:new u(this._options),modelMatrix:n._getModelMatrix(d.MINIMUM_VALUE),attributes:{show:new m(r&&n.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:i.fromColor(o)}})},T.prototype.isDestroyed=function(){return!1},T.prototype.destroy=function(){this._entitySubscription(),a(this)},T.prototype._onEntityPropertyChanged=function(e,t,i,o){if("availability"===t||"position"===t||"orientation"===t||"ellipsoid"===t){var a=e.ellipsoid;if(!r(a))return void((this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this)));var s=a.fill,l=r(s)&&s.isConstant?s.getValue(d.MINIMUM_VALUE):!0,u=a.outline,c=r(u);if(c&&u.isConstant&&(c=u.getValue(d.MINIMUM_VALUE)),!l&&!c)return void((this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this)));var h=e.position,p=a.radii,m=a.show;if(r(m)&&m.isConstant&&!m.getValue(d.MINIMUM_VALUE)||!r(h)||!r(p))return void((this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this)));var v=n(a.material,A),_=v instanceof y;this._materialProperty=v,this._fillProperty=n(s,M),this._showProperty=n(m,P),this._showOutlineProperty=n(a.outline,D),this._outlineColorProperty=c?n(a.outlineColor,I):void 0,this._fillEnabled=l,this._outlineEnabled=c;var C=a.stackPartitions,w=a.slicePartitions,E=a.outlineWidth,S=a.subdivisions;if(h.isConstant&&b.isConstant(e.orientation)&&p.isConstant&&b.isConstant(C)&&b.isConstant(w)&&b.isConstant(E)&&b.isConstant(S)){var T=this._options;T.vertexFormat=_?g.VERTEX_FORMAT:f.MaterialSupport.TEXTURED.vertexFormat,T.radii=p.getValue(d.MINIMUM_VALUE,T.radii),T.stackPartitions=r(C)?C.getValue(d.MINIMUM_VALUE):void 0,T.slicePartitions=r(w)?w.getValue(d.MINIMUM_VALUE):void 0,T.subdivisions=r(S)?S.getValue(d.MINIMUM_VALUE):void 0,this._outlineWidth=r(E)?E.getValue(d.MINIMUM_VALUE):1,this._dynamic=!1,this._geometryChanged.raiseEvent(this)}else this._dynamic||(this._dynamic=!0,this._geometryChanged.raiseEvent(this))}},T.prototype.createDynamicUpdater=function(e){return new x(e,this)},x.prototype.update=function(e){var o=this._entity,a=o.ellipsoid;if(!o.isShowing||!o.isAvailable(e)||!b.getValueOrDefault(a.show,e,!0))return r(this._primitive)&&(this._primitive.show=!1),void(r(this._outlinePrimitive)&&(this._outlinePrimitive.show=!1));var s=b.getValueOrUndefined(a.radii,e,R),c=o._getModelMatrix(e,this._modelMatrix);if(!r(c)||!r(s))return r(this._primitive)&&(this._primitive.show=!1),void(r(this._outlinePrimitive)&&(this._outlinePrimitive.show=!1));var d,y=b.getValueOrDefault(a.fill,e,!0),C=b.getValueOrDefault(a.outline,e,!1),w=b.getValueOrClonedDefault(a.outlineColor,e,t.BLACK,O),S=E.getValue(e,n(a.material,A),this._material);this._material=S;var T=b.getValueOrUndefined(a.stackPartitions,e),x=b.getValueOrUndefined(a.slicePartitions,e),P=b.getValueOrUndefined(a.subdivisions,e),M=b.getValueOrDefault(a.outlineWidth,e,1),D=this._scene.mode,I=D===_.SCENE3D,N=this._options,F=!I||this._lastSceneMode!==D||!r(this._primitive)||N.stackPartitions!==T||N.slicePartitions!==x||N.subdivisions!==P||this._lastOutlineWidth!==M;if(F){var k=this._primitives;k.removeAndDestroy(this._primitive),k.removeAndDestroy(this._outlinePrimitive),this._primitive=void 0,this._outlinePrimitive=void 0,this._lastSceneMode=D,this._lastOutlineWidth=M,N.stackPartitions=T,N.slicePartitions=x,N.subdivisions=P,N.radii=I?L:s,d=new f({material:S,translucent:S.isTranslucent(),closed:!0}),N.vertexFormat=d.vertexFormat,this._primitive=k.add(new v({geometryInstances:new h({id:o,geometry:new l(N),modelMatrix:I?void 0:c,attributes:{show:new m(y)}}),appearance:d,asynchronous:!1})),N.vertexFormat=g.VERTEX_FORMAT,this._outlinePrimitive=k.add(new v({geometryInstances:new h({id:o,geometry:new u(N),modelMatrix:I?void 0:c,attributes:{show:new m(C),color:i.fromColor(w)}}),appearance:new g({flat:!0,translucent:1!==w.alpha,renderState:{lineWidth:this._geometryUpdater._scene.clampLineWidth(M)}}),asynchronous:!1})),this._lastShow=y,this._lastOutlineShow=C,this._lastOutlineColor=t.clone(w,this._lastOutlineColor)}else if(this._primitive.ready){var B=this._primitive,z=this._outlinePrimitive;B.show=!0,z.show=!0,d=B.appearance,d.material=S;var V=this._attributes;r(V)||(V=B.getGeometryInstanceAttributes(o),this._attributes=V),y!==this._lastShow&&(V.show=m.toValue(y,V.show),this._lastShow=y);var U=this._outlineAttributes;r(U)||(U=z.getGeometryInstanceAttributes(o),this._outlineAttributes=U),C!==this._lastOutlineShow&&(U.show=m.toValue(C,U.show),this._lastOutlineShow=C),t.equals(w,this._lastOutlineColor)||(U.color=i.toValue(w,U.color),t.clone(w,this._lastOutlineColor))}I&&(s.x=Math.max(s.x,.001),s.y=Math.max(s.y,.001),s.z=Math.max(s.z,.001),c=p.multiplyByScale(c,s,c),this._primitive.modelMatrix=c,this._outlinePrimitive.modelMatrix=c)},x.prototype.getBoundingSphere=function(e,t){return w(e,this._primitive,this._outlinePrimitive,t)},x.prototype.isDestroyed=function(){return!1},x.prototype.destroy=function(){var e=this._primitives;e.removeAndDestroy(this._primitive),e.removeAndDestroy(this._outlinePrimitive),a(this)},T}),define("Cesium/DataSources/StaticGeometryColorBatch",["../Core/AssociativeArray","../Core/Color","../Core/ColorGeometryInstanceAttribute","../Core/defined","../Core/ShowGeometryInstanceAttribute","../Scene/Primitive","./BoundingSphereState"],function(e,t,i,n,r,o,a){"use strict";function s(t,i,n,r){this.translucent=i,this.appearanceType=n,this.closed=r,this.primitives=t,this.createPrimitive=!1,this.waitingOnCreate=!1,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new e,this.updaters=new e,this.updatersWithAttributes=new e,this.attributes=new e,this.subscriptions=new e,this.showsUpdated=new e,this.itemsToRemove=[]}function l(e,t,i){this._solidBatch=new s(e,!1,t,i),this._translucentBatch=new s(e,!0,t,i)}var u=new t;return s.prototype.add=function(e,t){var i=e.entity.id;if(this.createPrimitive=!0,this.geometry.set(i,t),this.updaters.set(i,e),e.hasConstantFill&&e.fillMaterialProperty.isConstant){var n=this;this.subscriptions.set(i,e.entity.definitionChanged.addEventListener(function(t,i,r,o){"isShowing"===i&&n.showsUpdated.set(t.id,e)}))}else this.updatersWithAttributes.set(i,e)},s.prototype.remove=function(e){var t=e.entity.id;if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.updatersWithAttributes.remove(t);var i=this.subscriptions.get(t);n(i)&&(i(),this.subscriptions.remove(t))}},s.prototype.update=function(e){var a,s,l=!0,c=0,h=this.primitive,d=this.primitives;if(this.createPrimitive){var p=this.geometry.values,m=p.length;if(m>0){for(n(h)&&(n(this.oldPrimitive)?d.remove(h):this.oldPrimitive=h),s=0;m>s;s++){var f=p[s],g=f.attributes;a=this.attributes.get(f.id.id),n(a)&&(n(g.show)&&(g.show.value=a.show),n(g.color)&&(g.color.value=a.color))}h=new o({asynchronous:!0,geometryInstances:p,appearance:new this.appearanceType({translucent:this.translucent,closed:this.closed})}),d.add(h),l=!1}else{n(h)&&(d.remove(h),h=void 0);var v=this.oldPrimitive;n(v)&&(d.remove(v),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=h,this.createPrimitive=!1,this.waitingOnCreate=!0}else if(n(h)&&h.ready){n(this.oldPrimitive)&&(d.remove(this.oldPrimitive),this.oldPrimitive=void 0);var _=this.updatersWithAttributes.values,y=_.length,C=this.waitingOnCreate;for(s=0;y>s;s++){var w=_[s],E=this.geometry.get(w.entity.id);if(a=this.attributes.get(E.id.id),n(a)||(a=h.getGeometryInstanceAttributes(E.id),this.attributes.set(E.id.id,a)),!w.fillMaterialProperty.isConstant||C){var b=w.fillMaterialProperty.color;b.getValue(e,u),t.equals(a._lastColor,u)||(a._lastColor=t.clone(u,a._lastColor),a.color=i.toValue(u,a.color),(this.translucent&&255===a.color[3]||!this.translucent&&255!==a.color[3])&&(this.itemsToRemove[c++]=w))}var S=w.entity.isShowing&&(w.hasConstantFill||w.isFilled(e)),T=1===a.show[0];S!==T&&(a.show=r.toValue(S,a.show))}this.updateShows(h),this.waitingOnCreate=!1}else n(h)&&!h.ready&&(l=!1);return this.itemsToRemove.length=c,l},s.prototype.updateShows=function(e){for(var t=this.showsUpdated.values,i=t.length,o=0;i>o;o++){var a=t[o],s=this.geometry.get(a.entity.id),l=this.attributes.get(s.id.id);n(l)||(l=e.getGeometryInstanceAttributes(s.id),this.attributes.set(s.id.id,l));var u=a.entity.isShowing,c=1===l.show[0];u!==c&&(l.show=r.toValue(u,l.show))}this.showsUpdated.removeAll()},s.prototype.contains=function(e){return this.updaters.contains(e.id)},s.prototype.getBoundingSphere=function(e,t){var i=this.primitive;if(!i.ready)return a.PENDING;var r=i.getGeometryInstanceAttributes(e);return!n(r)||!n(r.boundingSphere)||n(r.show)&&0===r.show[0]?a.FAILED:(r.boundingSphere.clone(t),a.DONE)},s.prototype.removeAllPrimitives=function(){var e=this.primitives,t=this.primitive;n(t)&&(e.remove(t),this.primitive=void 0,this.geometry.removeAll(),this.updaters.removeAll());var i=this.oldPrimitive;n(i)&&(e.remove(i),this.oldPrimitive=void 0)},l.prototype.add=function(e,t){var i=t.createFillGeometryInstance(e);255===i.attributes.color.value[3]?this._solidBatch.add(t,i):this._translucentBatch.add(t,i)},l.prototype.remove=function(e){this._solidBatch.remove(e)||this._translucentBatch.remove(e)},l.prototype.update=function(e){var t,i,n=this._solidBatch.update(e);n=this._translucentBatch.update(e)&&n;var r=this._solidBatch.itemsToRemove,o=r.length;if(o>0)for(t=0;o>t;t++)i=r[t],this._solidBatch.remove(i),this._translucentBatch.add(i,i.createFillGeometryInstance(e));r=this._translucentBatch.itemsToRemove;var a=r.length;if(a>0)for(t=0;a>t;t++)i=r[t],this._translucentBatch.remove(i),this._solidBatch.add(i,i.createFillGeometryInstance(e));return(o>0||a>0)&&(n=this._solidBatch.update(e)&&n,n=this._translucentBatch.update(e)&&n),n},l.prototype.getBoundingSphere=function(e,t){return this._solidBatch.contains(e)?this._solidBatch.getBoundingSphere(e,t):this._translucentBatch.contains(e)?this._translucentBatch.getBoundingSphere(e,t):a.FAILED},l.prototype.removeAllPrimitives=function(){this._solidBatch.removeAllPrimitives(),this._translucentBatch.removeAllPrimitives()},l}),define("Cesium/DataSources/StaticGeometryPerMaterialBatch",["../Core/AssociativeArray","../Core/defined","../Core/ShowGeometryInstanceAttribute","../Scene/Primitive","./BoundingSphereState","./MaterialProperty"],function(e,t,i,n,r,o){"use strict";function a(t,i,n,r){this.primitives=t,this.appearanceType=i,this.materialProperty=n,this.closed=r,this.updaters=new e,this.createPrimitive=!0,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new e,this.material=void 0,this.updatersWithAttributes=new e,this.attributes=new e,this.invalidated=!1,this.removeMaterialSubscription=n.definitionChanged.addEventListener(a.prototype.onMaterialChanged,this),this.subscriptions=new e,this.showsUpdated=new e}function s(e,t,i){this._items=[],this._primitives=e,this._appearanceType=t,this._closed=i}return a.prototype.onMaterialChanged=function(){this.invalidated=!0},a.prototype.isMaterial=function(e){var i=this.materialProperty,n=e.fillMaterialProperty;return n===i?!0:t(i)?i.equals(n):!1},a.prototype.add=function(e,t){var i=t.entity.id;if(this.updaters.set(i,t),this.geometry.set(i,t.createFillGeometryInstance(e)),t.hasConstantFill&&t.fillMaterialProperty.isConstant){var n=this;this.subscriptions.set(i,t.entity.definitionChanged.addEventListener(function(e,i,r,o){"isShowing"===i&&n.showsUpdated.set(e.id,t)}))}else this.updatersWithAttributes.set(i,t);this.createPrimitive=!0},a.prototype.remove=function(e){var i=e.entity.id,n=this.updaters.remove(i);if(n){this.geometry.remove(i),this.updatersWithAttributes.remove(i);var r=this.subscriptions.get(i);t(r)&&(r(),this.subscriptions.remove(i))}return this.createPrimitive=n,n},a.prototype.update=function(e){var r,a,s=!0,l=this.primitive,u=this.primitives,c=this.geometry.values;if(this.createPrimitive){var h=c.length;if(h>0){for(t(l)&&(t(this.oldPrimitive)?u.remove(l):this.oldPrimitive=l),a=0;h>a;a++){var d=c[a],p=d.attributes;r=this.attributes.get(d.id.id),t(r)&&(t(p.show)&&(p.show.value=r.show),t(p.color)&&(p.color.value=r.color))}this.material=o.getValue(e,this.materialProperty,this.material),l=new n({asynchronous:!0,geometryInstances:c,appearance:new this.appearanceType({material:this.material,translucent:this.material.isTranslucent(),closed:this.closed})}),u.add(l),s=!1}else{t(l)&&(u.remove(l),l=void 0);var m=this.oldPrimitive;t(m)&&(u.remove(m),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=l,this.createPrimitive=!1}else if(t(l)&&l.ready){t(this.oldPrimitive)&&(u.remove(this.oldPrimitive),this.oldPrimitive=void 0),this.material=o.getValue(e,this.materialProperty,this.material),this.primitive.appearance.material=this.material;var f=this.updatersWithAttributes.values,g=f.length;for(a=0;g>a;a++){var v=f[a],_=v.entity,y=this.geometry.get(_.id);r=this.attributes.get(y.id.id),t(r)||(r=l.getGeometryInstanceAttributes(y.id),this.attributes.set(y.id.id,r));var C=_.isShowing&&(v.hasConstantFill||v.isFilled(e)),w=1===r.show[0];C!==w&&(r.show=i.toValue(C,r.show))}this.updateShows(l)}else t(l)&&!l.ready&&(s=!1);return s},a.prototype.updateShows=function(e){for(var n=this.showsUpdated.values,r=n.length,o=0;r>o;o++){var a=n[o],s=a.entity,l=this.geometry.get(s.id),u=this.attributes.get(l.id.id);t(u)||(u=e.getGeometryInstanceAttributes(l.id),this.attributes.set(l.id.id,u));var c=s.isShowing,h=1===u.show[0];c!==h&&(u.show=i.toValue(c,u.show))}this.showsUpdated.removeAll()},a.prototype.contains=function(e){return this.updaters.contains(e.id)},a.prototype.getBoundingSphere=function(e,i){var n=this.primitive;if(!n.ready)return r.PENDING;var o=n.getGeometryInstanceAttributes(e);return!t(o)||!t(o.boundingSphere)||t(o.show)&&0===o.show[0]?r.FAILED:(o.boundingSphere.clone(i),r.DONE)},a.prototype.destroy=function(e){var i=this.primitive,n=this.primitives;t(i)&&n.remove(i);var r=this.oldPrimitive;t(r)&&n.remove(r),this.removeMaterialSubscription()},s.prototype.add=function(e,t){for(var i=this._items,n=i.length,r=0;n>r;r++){var o=i[r];if(o.isMaterial(t))return void o.add(e,t)}var s=new a(this._primitives,this._appearanceType,t.fillMaterialProperty,this._closed);s.add(e,t),i.push(s)},s.prototype.remove=function(e){for(var t=this._items,i=t.length,n=i-1;n>=0;n--){var r=t[n];if(r.remove(e)){0===r.updaters.length&&(t.splice(n,1),r.destroy());break}}},s.prototype.update=function(e){var t,i=this._items,n=i.length;for(t=n-1;t>=0;t--){var r=i[t];if(r.invalidated){i.splice(t,1);for(var o=r.updaters.values,a=o.length,s=0;a>s;s++)this.add(e,o[s]);r.destroy()}}var l=!0;for(t=0;n>t;t++)l=i[t].update(e)&&l;return l},s.prototype.getBoundingSphere=function(e,t){for(var i=this._items,n=i.length,o=0;n>o;o++){var a=i[o];if(a.contains(e))return a.getBoundingSphere(e,t)}return r.FAILED},s.prototype.removeAllPrimitives=function(){for(var e=this._items,t=e.length,i=0;t>i;i++)e[i].destroy();this._items.length=0},s}),define("Cesium/DataSources/StaticGroundGeometryColorBatch",["../Core/AssociativeArray","../Core/Color","../Core/ColorGeometryInstanceAttribute","../Core/defined","../Core/ShowGeometryInstanceAttribute","../Scene/GroundPrimitive","./BoundingSphereState"],function(e,t,i,n,r,o,a){"use strict";function s(t,i,n){this.primitives=t,this.color=i,this.key=n,this.createPrimitive=!1,this.waitingOnCreate=!1,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new e,this.updaters=new e,this.updatersWithAttributes=new e,this.attributes=new e,this.subscriptions=new e,this.showsUpdated=new e,this.itemsToRemove=[],this.isDirty=!1}function l(t){this._batches=new e,this._primitives=t}var u=new t;s.prototype.add=function(e,t){var i=e.entity.id;if(this.createPrimitive=!0,this.geometry.set(i,t),this.updaters.set(i,e),e.hasConstantFill&&e.fillMaterialProperty.isConstant){var n=this;this.subscriptions.set(i,e.entity.definitionChanged.addEventListener(function(t,i,r,o){"isShowing"===i&&n.showsUpdated.set(t.id,e)}))}else this.updatersWithAttributes.set(i,e)},s.prototype.remove=function(e){var t=e.entity.id;if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.updatersWithAttributes.remove(t);var i=this.subscriptions.get(t);n(i)&&(i(),this.subscriptions.remove(t))}};var c=new Array(4);return s.prototype.update=function(e){var i,a,s=!0,l=0,h=this.primitive,d=this.primitives;if(this.createPrimitive){var p=this.geometry.values,m=p.length;if(m>0){for(n(h)&&(n(this.oldPrimitive)?d.remove(h):this.oldPrimitive=h),a=0;m>a;a++){var f=p[a],g=f.attributes;i=this.attributes.get(f.id.id),n(i)&&(n(g.show)&&(g.show.value=i.show),n(g.color)&&(g.color.value=i.color))}h=new o({asynchronous:!0,geometryInstances:p}),d.add(h),s=!1}else{n(h)&&(d.remove(h),h=void 0);var v=this.oldPrimitive;n(v)&&(d.remove(v),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=h,this.createPrimitive=!1,this.waitingOnCreate=!0}else if(n(h)&&h.ready){n(this.oldPrimitive)&&(d.remove(this.oldPrimitive),this.oldPrimitive=void 0);var _=this.updatersWithAttributes.values,y=_.length,C=this.waitingOnCreate;for(a=0;y>a;a++){var w=_[a],E=this.geometry.get(w.entity.id);if(i=this.attributes.get(E.id.id),n(i)||(i=h.getGeometryInstanceAttributes(E.id),this.attributes.set(E.id.id,i)),!w.fillMaterialProperty.isConstant||C){var b=w.fillMaterialProperty.color;if(b.getValue(e,u),!t.equals(i._lastColor,u)){i._lastColor=t.clone(u,i._lastColor);var S=this.color,T=u.toBytes(c);(S[0]!==T[0]||S[1]!==T[1]||S[2]!==T[2]||S[3]!==T[3])&&(this.itemsToRemove[l++]=w)}}var x=w.entity.isShowing&&(w.hasConstantFill||w.isFilled(e)),A=1===i.show[0];x!==A&&(i.show=r.toValue(x,i.show))}this.updateShows(h),this.waitingOnCreate=!1}else n(h)&&!h.ready&&(s=!1);return this.itemsToRemove.length=l,s},s.prototype.updateShows=function(e){for(var t=this.showsUpdated.values,i=t.length,o=0;i>o;o++){var a=t[o],s=this.geometry.get(a.entity.id),l=this.attributes.get(s.id.id);n(l)||(l=e.getGeometryInstanceAttributes(s.id),this.attributes.set(s.id.id,l));var u=a.entity.isShowing,c=1===l.show[0];u!==c&&(l.show=r.toValue(u,l.show))}this.showsUpdated.removeAll()},s.prototype.contains=function(e){return this.updaters.contains(e.id)},s.prototype.getBoundingSphere=function(e,t){var i=this.primitive;if(!i.ready)return a.PENDING;var r=i.getBoundingSphere(e);return n(r)?(r.clone(t),a.DONE):a.FAILED},s.prototype.removeAllPrimitives=function(){var e=this.primitives,t=this.primitive;n(t)&&(e.remove(t),this.primitive=void 0,this.geometry.removeAll(),this.updaters.removeAll());var i=this.oldPrimitive;n(i)&&(e.remove(i),this.oldPrimitive=void 0)},l.prototype.add=function(e,t){var i,n=t.createFillGeometryInstance(e),r=this._batches,o=new Uint32Array(n.attributes.color.value.buffer)[0];return r.contains(o)?i=r.get(o):(i=new s(this._primitives,n.attributes.color.value,o),r.set(o,i)),i.add(t,n),i},l.prototype.remove=function(e){for(var t=this._batches.values,i=t.length,n=0;i>n;++n)if(t[n].remove(e))return},l.prototype.update=function(e){var t,i,n=!0,r=this._batches,o=r.values,a=o.length;for(t=0;a>t;++t)n=o[t].update(e)&&n;for(t=0;a>t;++t)for(var s=o[t],l=s.itemsToRemove,u=l.length,c=0;u>c;c++){i=l[c],s.remove(i);var h=this.add(e,i);s.isDirty=!0,h.isDirty=!0}var d=o.slice(),p=d.length;for(t=0;p>t;++t){var m=d[t];0===m.geometry.length?r.remove(m.key):m.isDirty&&(n=d[t].update(e)&&n,m.isDirty=!1)}return n},l.prototype.getBoundingSphere=function(e,t){for(var i=this._batches.values,n=i.length,r=0;n>r;++r){var o=i[r];if(o.contains(e))return o.getBoundingSphere(e,t)}return a.FAILED},l.prototype.removeAllPrimitives=function(){for(var e=this._batches.values,t=e.length,i=0;t>i;++i)e[i].removeAllPrimitives()},l}),define("Cesium/DataSources/StaticOutlineGeometryBatch",["../Core/AssociativeArray","../Core/Color","../Core/ColorGeometryInstanceAttribute","../Core/defined","../Core/ShowGeometryInstanceAttribute","../Scene/PerInstanceColorAppearance","../Scene/Primitive","./BoundingSphereState"],function(e,t,i,n,r,o,a,s){"use strict";function l(t,i,n){this.translucent=i,this.primitives=t,this.createPrimitive=!1,this.waitingOnCreate=!1,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new e,this.updaters=new e,this.updatersWithAttributes=new e,this.attributes=new e,this.itemsToRemove=[],this.width=n,this.subscriptions=new e,this.showsUpdated=new e}function u(t,i){this._primitives=t,this._scene=i,this._solidBatches=new e,this._translucentBatches=new e}l.prototype.add=function(e,t){var i=e.entity.id;if(this.createPrimitive=!0,this.geometry.set(i,t),this.updaters.set(i,e),e.hasConstantOutline&&e.outlineColorProperty.isConstant){var n=this;this.subscriptions.set(i,e.entity.definitionChanged.addEventListener(function(t,i,r,o){"isShowing"===i&&n.showsUpdated.set(t.id,e)}))}else this.updatersWithAttributes.set(i,e)},l.prototype.remove=function(e){var t=e.entity.id;if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.updatersWithAttributes.remove(t);var i=this.subscriptions.get(t);n(i)&&(i(),this.subscriptions.remove(t))}};var c=new t;return l.prototype.update=function(e){var s,l,u=!0,h=0,d=this.primitive,p=this.primitives;if(this.createPrimitive){var m=this.geometry.values,f=m.length;if(f>0){for(n(d)&&(n(this.oldPrimitive)?p.remove(d):this.oldPrimitive=d),l=0;f>l;l++){var g=m[l],v=g.attributes;s=this.attributes.get(g.id.id),n(s)&&(n(v.show)&&(v.show.value=s.show),n(v.color)&&(v.color.value=s.color))}d=new a({asynchronous:!0,geometryInstances:m,appearance:new o({flat:!0,translucent:this.translucent,renderState:{lineWidth:this.width}})}),p.add(d),u=!1}else{n(d)&&(p.remove(d),d=void 0);var _=this.oldPrimitive;n(_)&&(p.remove(_),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=d,this.createPrimitive=!1,this.waitingOnCreate=!0}else if(n(d)&&d.ready){n(this.oldPrimitive)&&(p.remove(this.oldPrimitive),this.oldPrimitive=void 0);var y=this.updatersWithAttributes.values,C=y.length,w=this.waitingOnCreate;for(l=0;C>l;l++){var E=y[l],b=this.geometry.get(E.entity.id);if(s=this.attributes.get(b.id.id),n(s)||(s=d.getGeometryInstanceAttributes(b.id),this.attributes.set(b.id.id,s)),!E.outlineColorProperty.isConstant||w){var S=E.outlineColorProperty;S.getValue(e,c),t.equals(s._lastColor,c)||(s._lastColor=t.clone(c,s._lastColor),s.color=i.toValue(c,s.color),(this.translucent&&255===s.color[3]||!this.translucent&&255!==s.color[3])&&(this.itemsToRemove[h++]=E))}var T=E.entity.isShowing&&(E.hasConstantOutline||E.isOutlineVisible(e)),x=1===s.show[0];T!==x&&(s.show=r.toValue(T,s.show))}this.updateShows(d),this.waitingOnCreate=!1; +}else n(d)&&!d.ready&&(u=!1);return this.itemsToRemove.length=h,u},l.prototype.updateShows=function(e){for(var t=this.showsUpdated.values,i=t.length,o=0;i>o;o++){var a=t[o],s=this.geometry.get(a.entity.id),l=this.attributes.get(s.id.id);n(l)||(l=e.getGeometryInstanceAttributes(s.id),this.attributes.set(s.id.id,l));var u=a.entity.isShowing,c=1===l.show[0];u!==c&&(l.show=r.toValue(u,l.show))}this.showsUpdated.removeAll()},l.prototype.contains=function(e){return this.updaters.contains(e.id)},l.prototype.getBoundingSphere=function(e,t){var i=this.primitive;if(!i.ready)return s.PENDING;var r=i.getGeometryInstanceAttributes(e);return!n(r)||!n(r.boundingSphere)||n(r.show)&&0===r.show[0]?s.FAILED:(r.boundingSphere.clone(t),s.DONE)},l.prototype.removeAllPrimitives=function(){var e=this.primitives,t=this.primitive;n(t)&&(e.remove(t),this.primitive=void 0,this.geometry.removeAll(),this.updaters.removeAll());var i=this.oldPrimitive;n(i)&&(e.remove(i),this.oldPrimitive=void 0)},u.prototype.add=function(e,t){var i,r,o=t.createOutlineGeometryInstance(e),a=this._scene.clampLineWidth(t.outlineWidth);255===o.attributes.color.value[3]?(i=this._solidBatches,r=i.get(a),n(r)||(r=new l(this._primitives,!1,a),i.set(a,r)),r.add(t,o)):(i=this._translucentBatches,r=i.get(a),n(r)||(r=new l(this._primitives,!0,a),i.set(a,r)),r.add(t,o))},u.prototype.remove=function(e){var t,i=this._solidBatches.values,n=i.length;for(t=0;n>t;t++)if(i[t].remove(e))return;var r=this._translucentBatches.values,o=r.length;for(t=0;o>t;t++)if(r[t].remove(e))return},u.prototype.update=function(e){var t,i,n,r,o,a=this._solidBatches.values,s=a.length,l=this._translucentBatches.values,u=l.length,c=!0,h=!1;do{for(h=!1,i=0;s>i;i++){r=a[i],c=r.update(e),o=r.itemsToRemove;var d=o.length;if(d>0)for(h=!0,t=0;d>t;t++)n=o[t],r.remove(n),this.add(e,n)}for(i=0;u>i;i++){r=l[i],c=r.update(e),o=r.itemsToRemove;var p=o.length;if(p>0)for(h=!0,t=0;p>t;t++)n=o[t],r.remove(n),this.add(e,n)}}while(h);return c},u.prototype.getBoundingSphere=function(e,t){var i,n=this._solidBatches.values,r=n.length;for(i=0;r>i;i++){var o=n[i];if(o.contains(e))return o.getBoundingSphere(e,t)}var a=this._translucentBatches.values,l=a.length;for(i=0;l>i;i++){var u=a[i];if(u.contains(e))return u.getBoundingSphere(e,t)}return s.FAILED},u.prototype.removeAllPrimitives=function(){var e,t=this._solidBatches.values,i=t.length;for(e=0;i>e;e++)t[e].removeAllPrimitives();var n=this._translucentBatches.values,r=n.length;for(e=0;r>e;e++)n[e].removeAllPrimitives()},u}),define("Cesium/DataSources/GeometryVisualizer",["../Core/AssociativeArray","../Core/BoundingSphere","../Core/defined","../Core/destroyObject","../Core/DeveloperError","./BoundingSphereState","./ColorMaterialProperty","./StaticGeometryColorBatch","./StaticGeometryPerMaterialBatch","./StaticGroundGeometryColorBatch","./StaticOutlineGeometryBatch"],function(e,t,i,n,r,o,a,s,l,u,c){"use strict";function h(t,i){this._primitives=t,this._groundPrimitives=i,this._dynamicUpdaters=new e}function d(e,t){for(var i=e._batches,n=i.length,r=0;n>r;r++)i[r].remove(t)}function p(e,t,i){return i.isDynamic?void e._dynamicBatch.add(t,i):(i.outlineEnabled&&e._outlineBatch.add(t,i),void(i.fillEnabled&&(i.onTerrain?e._groundColorBatch.add(t,i):i.isClosed?i.fillMaterialProperty instanceof a?e._closedColorBatch.add(t,i):e._closedMaterialBatch.add(t,i):i.fillMaterialProperty instanceof a?e._openColorBatch.add(t,i):e._openMaterialBatch.add(t,i))))}function m(t,i,n){this._type=t;var r=i.primitives,o=i.groundPrimitives;this._scene=i,this._primitives=r,this._groundPrimitives=o,this._entityCollection=void 0,this._addedObjects=new e,this._removedObjects=new e,this._changedObjects=new e,this._outlineBatch=new c(r,i),this._closedColorBatch=new s(r,t.perInstanceColorAppearanceType,!0),this._closedMaterialBatch=new l(r,t.materialAppearanceType,!0),this._openColorBatch=new s(r,t.perInstanceColorAppearanceType,!1),this._openMaterialBatch=new l(r,t.materialAppearanceType,!1),this._groundColorBatch=new u(o),this._dynamicBatch=new h(r,o),this._batches=[this._closedColorBatch,this._closedMaterialBatch,this._openColorBatch,this._openMaterialBatch,this._groundColorBatch,this._dynamicBatch,this._outlineBatch],this._subscriptions=new e,this._updaters=new e,this._entityCollection=n,n.collectionChanged.addEventListener(m.prototype._onCollectionChanged,this),this._onCollectionChanged(n,n.values,f)}var f=[];h.prototype.add=function(e,t){this._dynamicUpdaters.set(t.entity.id,t.createDynamicUpdater(this._primitives,this._groundPrimitives))},h.prototype.remove=function(e){var t=e.entity.id,n=this._dynamicUpdaters.get(t);i(n)&&(this._dynamicUpdaters.remove(t),n.destroy())},h.prototype.update=function(e){for(var t=this._dynamicUpdaters.values,i=0,n=t.length;n>i;i++)t[i].update(e);return!0},h.prototype.removeAllPrimitives=function(){for(var e=this._dynamicUpdaters.values,t=0,i=e.length;i>t;t++)e[t].destroy();this._dynamicUpdaters.removeAll()},h.prototype.getBoundingSphere=function(e,t){var n=this._dynamicUpdaters.get(e.id);return i(n)&&i(n.getBoundingSphere)?n.getBoundingSphere(e,t):o.FAILED},m.prototype.update=function(e){var t,i,n,r,o=this._addedObjects,a=o.values,s=this._removedObjects,l=s.values,u=this._changedObjects,c=u.values;for(t=c.length-1;t>-1;t--)i=c[t],n=i.id,r=this._updaters.get(n),r.entity===i?(d(this,r),p(this,e,r)):(l.push(i),a.push(i));for(t=l.length-1;t>-1;t--)i=l[t],n=i.id,r=this._updaters.get(n),d(this,r),r.destroy(),this._updaters.remove(n),this._subscriptions.get(n)(),this._subscriptions.remove(n);for(t=a.length-1;t>-1;t--)i=a[t],n=i.id,r=new this._type(i,this._scene),this._updaters.set(n,r),p(this,e,r),this._subscriptions.set(n,r.geometryChanged.addEventListener(m._onGeometryChanged,this));o.removeAll(),s.removeAll(),u.removeAll();var h=!0,f=this._batches,g=f.length;for(t=0;g>t;t++)h=f[t].update(e)&&h;return h};var g=[],v=new t;return m.prototype.getBoundingSphere=function(e,i){for(var n=g,r=v,a=0,s=o.DONE,l=this._batches,u=l.length,c=0;u>c;c++){if(s=l[c].getBoundingSphere(e,r),s===o.PENDING)return o.PENDING;s===o.DONE&&(n[a]=t.clone(r,n[a]),a++)}return 0===a?o.FAILED:(n.length=a,t.fromBoundingSpheres(n,i),o.DONE)},m.prototype.isDestroyed=function(){return!1},m.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(m.prototype._onCollectionChanged,this),this._addedObjects.removeAll(),this._removedObjects.removeAll();var e,t=this._batches,i=t.length;for(e=0;i>e;e++)t[e].removeAllPrimitives();var r=this._subscriptions.values;for(i=r.length,e=0;i>e;e++)r[e]();return this._subscriptions.removeAll(),n(this)},m._onGeometryChanged=function(e){var t=this._removedObjects,n=this._changedObjects,r=e.entity,o=r.id;i(t.get(o))||i(n.get(o))||n.set(o,r)},m.prototype._onCollectionChanged=function(e,t,i){var n,r,o,a=this._addedObjects,s=this._removedObjects,l=this._changedObjects;for(n=i.length-1;n>-1;n--)o=i[n],r=o.id,a.remove(r)||(s.set(r,o),l.remove(r));for(n=t.length-1;n>-1;n--)o=t[n],r=o.id,s.remove(r)?l.set(r,o):a.set(r,o)},m}),define("Cesium/Scene/Label",["../Core/Cartesian2","../Core/Cartesian3","../Core/Color","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/NearFarScalar","./Billboard","./HeightReference","./HorizontalOrigin","./LabelStyle","./VerticalOrigin"],function(e,t,i,n,r,o,a,s,l,u,c,h,d){"use strict";function p(e){e._rebindAllGlyphs||e._repositionAllGlyphs||e._labelCollection._labelsToUpdate.push(e),e._rebindAllGlyphs=!0}function m(e){e._rebindAllGlyphs||e._repositionAllGlyphs||e._labelCollection._labelsToUpdate.push(e),e._repositionAllGlyphs=!0}function f(r,o){r=n(r,n.EMPTY_OBJECT),this._text=n(r.text,""),this._show=n(r.show,!0),this._font=n(r.font,"30px sans-serif"),this._fillColor=i.clone(n(r.fillColor,i.WHITE)),this._outlineColor=i.clone(n(r.outlineColor,i.BLACK)),this._outlineWidth=n(r.outlineWidth,1),this._style=n(r.style,h.FILL),this._verticalOrigin=n(r.verticalOrigin,d.BOTTOM),this._horizontalOrigin=n(r.horizontalOrigin,c.LEFT),this._pixelOffset=e.clone(n(r.pixelOffset,e.ZERO)),this._eyeOffset=t.clone(n(r.eyeOffset,t.ZERO)),this._position=t.clone(n(r.position,t.ZERO)),this._scale=n(r.scale,1),this._id=r.id,this._translucencyByDistance=r.translucencyByDistance,this._pixelOffsetScaleByDistance=r.pixelOffsetScaleByDistance,this._heightReference=n(r.heightReference,u.NONE),this._labelCollection=o,this._glyphs=[],this._rebindAllGlyphs=!0,this._repositionAllGlyphs=!0,this._actualClampedPosition=void 0,this._removeCallbackFunc=void 0,this._mode=void 0,this._updateClamping()}return o(f.prototype,{show:{get:function(){return this._show},set:function(e){if(this._show!==e){this._show=e;for(var t=this._glyphs,i=0,n=t.length;n>i;i++){var o=t[i].billboard;r(o)&&(o.show=e)}}}},position:{get:function(){return this._position},set:function(e){var i=this._position;if(!t.equals(i,e))if(t.clone(e,i),this._heightReference===u.NONE)for(var n=this._glyphs,o=0,a=n.length;a>o;o++){var s=n[o].billboard;r(s)&&(s.position=e)}else this._updateClamping()}},heightReference:{get:function(){return this._heightReference},set:function(e){if(e!==this._heightReference){this._heightReference=e;for(var t=this._glyphs,i=0,n=t.length;n>i;i++){var o=t[i].billboard;r(o)&&(o.heightReference=e)}m(this),this._updateClamping()}}},text:{get:function(){return this._text},set:function(e){this._text!==e&&(this._text=e,p(this))}},font:{get:function(){return this._font},set:function(e){this._font!==e&&(this._font=e,p(this))}},fillColor:{get:function(){return this._fillColor},set:function(e){var t=this._fillColor;i.equals(t,e)||(i.clone(e,t),p(this))}},outlineColor:{get:function(){return this._outlineColor},set:function(e){var t=this._outlineColor;i.equals(t,e)||(i.clone(e,t),p(this))}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){this._outlineWidth!==e&&(this._outlineWidth=e,p(this))}},style:{get:function(){return this._style},set:function(e){this._style!==e&&(this._style=e,p(this))}},pixelOffset:{get:function(){return this._pixelOffset},set:function(t){var i=this._pixelOffset;if(!e.equals(i,t)){e.clone(t,i);for(var n=this._glyphs,o=0,a=n.length;a>o;o++){var s=n[o];r(s.billboard)&&(s.billboard.pixelOffset=t)}}}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){var t=this._translucencyByDistance;if(!s.equals(t,e)){this._translucencyByDistance=s.clone(e,t);for(var i=this._glyphs,n=0,o=i.length;o>n;n++){var a=i[n];r(a.billboard)&&(a.billboard.translucencyByDistance=e)}}}},pixelOffsetScaleByDistance:{get:function(){return this._pixelOffsetScaleByDistance},set:function(e){var t=this._pixelOffsetScaleByDistance;if(!s.equals(t,e)){this._pixelOffsetScaleByDistance=s.clone(e,t);for(var i=this._glyphs,n=0,o=i.length;o>n;n++){var a=i[n];r(a.billboard)&&(a.billboard.pixelOffsetScaleByDistance=e)}}}},eyeOffset:{get:function(){return this._eyeOffset},set:function(e){var i=this._eyeOffset;if(!t.equals(i,e)){t.clone(e,i);for(var n=this._glyphs,o=0,a=n.length;a>o;o++){var s=n[o];r(s.billboard)&&(s.billboard.eyeOffset=e)}}}},horizontalOrigin:{get:function(){return this._horizontalOrigin},set:function(e){this._horizontalOrigin!==e&&(this._horizontalOrigin=e,m(this))}},verticalOrigin:{get:function(){return this._verticalOrigin},set:function(e){if(this._verticalOrigin!==e){this._verticalOrigin=e;for(var t=this._glyphs,i=0,n=t.length;n>i;i++){var o=t[i];r(o.billboard)&&(o.billboard.verticalOrigin=e)}m(this)}}},scale:{get:function(){return this._scale},set:function(e){if(this._scale!==e){this._scale=e;for(var t=this._glyphs,i=0,n=t.length;n>i;i++){var o=t[i];r(o.billboard)&&(o.billboard.scale=e)}m(this)}}},id:{get:function(){return this._id},set:function(e){if(this._id!==e){this._id=e;for(var t=this._glyphs,i=0,n=t.length;n>i;i++){var o=t[i];r(o.billboard)&&(o.billboard.id=e)}}}},_clampedPosition:{get:function(){return this._actualClampedPosition},set:function(e){this._actualClampedPosition=t.clone(e,this._actualClampedPosition);for(var i=this._glyphs,n=0,o=i.length;o>n;n++){var a=i[n];r(a.billboard)&&(a.billboard._position=e,a.billboard._actualPosition=e,a.billboard._clampedPosition=e)}}}}),f.prototype._updateClamping=function(){l._updateClamping(this._labelCollection,this)},f.prototype.computeScreenSpacePosition=function(t,i){r(i)||(i=new e);var n=this._labelCollection,o=n.modelMatrix,a=r(this._actualClampedPosition)?this._actualClampedPosition:this._position,s=l._computeScreenSpacePosition(o,a,this._eyeOffset,this._pixelOffset,t,i);return s},f.prototype.equals=function(n){return this===n||r(n)&&this._show===n._show&&this._scale===n._scale&&this._style===n._style&&this._verticalOrigin===n._verticalOrigin&&this._horizontalOrigin===n._horizontalOrigin&&this._heightReference===n._heightReference&&this._text===n._text&&this._font===n._font&&t.equals(this._position,n._position)&&i.equals(this._fillColor,n._fillColor)&&i.equals(this._outlineColor,n._outlineColor)&&e.equals(this._pixelOffset,n._pixelOffset)&&t.equals(this._eyeOffset,n._eyeOffset)&&s.equals(this._translucencyByDistance,n._translucencyByDistance)&&s.equals(this._pixelOffsetScaleByDistance,n._pixelOffsetScaleByDistance)&&this._id===n._id},f.prototype.isDestroyed=function(){return!1},f}),define("Cesium/Scene/LabelCollection",["../Core/Cartesian2","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/destroyObject","../Core/DeveloperError","../Core/Matrix4","../Core/writeTextToCanvas","./BillboardCollection","./HeightReference","./HorizontalOrigin","./Label","./LabelStyle","./TextureAtlas","./VerticalOrigin"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m){"use strict";function f(){this.textureInfo=void 0,this.dimensions=void 0,this.billboard=void 0}function g(e,t,i){this.labelCollection=e,this.index=t,this.dimensions=i}function v(e,t,i,n,r,o,a){return S.font=t,S.fillColor=i,S.strokeColor=n,S.strokeWidth=r,a===m.BOTTOM?S.textBaseline="bottom":a===m.TOP?S.textBaseline="top":S.textBaseline="middle",S.fill=o===d.FILL||o===d.FILL_AND_OUTLINE,S.stroke=o===d.OUTLINE||o===d.FILL_AND_OUTLINE,s(e,S)}function _(e,t){t.textureInfo=void 0,t.dimensions=void 0;var n=t.billboard;i(n)&&(n.show=!1,n.image=void 0,e._spareBillboards.push(n),t.billboard=void 0)}function y(e,t,i,n){e.addImage(t,i).then(function(e,t){n.index=e})}function C(e,t){var n,r,o,a=t._text,s=a.length,l=t._glyphs,u=l.length;if(u>s)for(r=s;u>r;++r)_(e,l[r]);l.length=s;var h=e._glyphTextureCache;for(o=0;s>o;++o){var d=a.charAt(o),p=t._font,m=t._fillColor,C=t._outlineColor,w=t._outlineWidth,E=t._style,b=t._verticalOrigin,S=JSON.stringify([d,p,m.toRgba(),C.toRgba(),w,+E,+b]),T=h[S];if(!i(T)){var x=v(d,p,m,C,w,E,b);T=new g(e,-1,x.dimensions),h[S]=T,x.width>0&&x.height>0&&y(e._textureAtlas,S,x,T)}if(n=l[o],i(n)?-1===T.index?_(e,n):i(n.textureInfo)&&(n.textureInfo=void 0):(n=new f,l[o]=n),n.textureInfo=T,n.dimensions=T.dimensions,-1!==T.index){var A=n.billboard;i(A)||(A=e._spareBillboards.length>0?e._spareBillboards.pop():e._billboardCollection.add({collection:e}),n.billboard=A),A.show=t._show,A.position=t._position,A.eyeOffset=t._eyeOffset,A.pixelOffset=t._pixelOffset,A.horizontalOrigin=c.LEFT,A.verticalOrigin=t._verticalOrigin,A.heightReference=t._heightReference,A.scale=t._scale,A.pickPrimitive=t,A.id=t._id,A.image=S,A.translucencyByDistance=t._translucencyByDistance,A.pixelOffsetScaleByDistance=t._pixelOffsetScaleByDistance}}t._repositionAllGlyphs=!0}function w(e,t){var n,r,o=e._glyphs,a=0,s=0,l=0,h=o.length;for(l=0;h>l;++l)n=o[l],r=n.dimensions,a+=r.computedWidth,s=Math.max(s,r.height);var d=e._scale,p=e._horizontalOrigin,f=0;p===c.CENTER?f-=a/2*d:p===c.RIGHT&&(f-=a*d),T.x=f*t,T.y=0;var g=e._heightReference,v=g===u.NONE?e._verticalOrigin:m.BOTTOM;for(l=0;h>l;++l)n=o[l],r=n.dimensions,v===m.BOTTOM||r.height===s?T.y=-r.descent*d:v===m.TOP?T.y=-(s-r.height)*d-r.descent*d:v===m.CENTER&&(T.y=-(s-r.height)/2*d-r.descent*d),T.y*=t,i(n.billboard)&&n.billboard._setTranslate(T),T.x+=r.computedWidth*d*t}function E(e,t){for(var n=t._glyphs,o=0,a=n.length;a>o;++o)_(e,n[o]);t._labelCollection=void 0,i(t._removeCallbackFunc)&&t._removeCallbackFunc(),r(t)}function b(e){e=t(e,t.EMPTY_OBJECT),this._scene=e.scene,this._textureAtlas=void 0,this._billboardCollection=new l({scene:this._scene}),this._billboardCollection.destroyTextureAtlas=!1,this._spareBillboards=[],this._glyphTextureCache={},this._labels=[],this._labelsToUpdate=[],this._totalGlyphCount=0,this._resolutionScale=void 0,this.modelMatrix=a.clone(t(e.modelMatrix,a.IDENTITY)),this.debugShowBoundingVolume=t(e.debugShowBoundingVolume,!1)}var S={},T=new e;return n(b.prototype,{length:{get:function(){return this._labels.length}}}),b.prototype.add=function(e){var t=new h(e,this);return this._labels.push(t),this._labelsToUpdate.push(t),t},b.prototype.remove=function(e){if(i(e)&&e._labelCollection===this){var t=this._labels.indexOf(e);if(-1!==t)return this._labels.splice(t,1),E(this,e),!0}return!1},b.prototype.removeAll=function(){for(var e=this._labels,t=0,i=e.length;i>t;++t)E(this,e[t]);e.length=0},b.prototype.contains=function(e){return i(e)&&e._labelCollection===this},b.prototype.get=function(e){return this._labels[e]},b.prototype.update=function(e){var t=this._billboardCollection;t.modelMatrix=this.modelMatrix,t.debugShowBoundingVolume=this.debugShowBoundingVolume;var n=e.context;i(this._textureAtlas)||(this._textureAtlas=new p({context:n}),t.textureAtlas=this._textureAtlas);var r=n.uniformState,o=r.resolutionScale,a=this._resolutionScale!==o;this._resolutionScale=o;var s;s=a?this._labels:this._labelsToUpdate;for(var l=s.length,u=0;l>u;++u){var c=s[u];if(!c.isDestroyed()){var h=c._glyphs.length;c._rebindAllGlyphs&&(C(this,c),c._rebindAllGlyphs=!1),(a||c._repositionAllGlyphs)&&(w(c,o),c._repositionAllGlyphs=!1);var d=c._glyphs.length-h;this._totalGlyphCount+=d}}this._labelsToUpdate.length=0,t.update(e)},b.prototype.isDestroyed=function(){return!1},b.prototype.destroy=function(){return this.removeAll(),this._billboardCollection=this._billboardCollection.destroy(),this._textureAtlas=this._textureAtlas&&this._textureAtlas.destroy(),r(this)},b}),define("Cesium/DataSources/LabelVisualizer",["../Core/AssociativeArray","../Core/Cartesian2","../Core/Cartesian3","../Core/Color","../Core/defaultValue","../Core/defined","../Core/destroyObject","../Core/DeveloperError","../Core/NearFarScalar","../Scene/HeightReference","../Scene/HorizontalOrigin","../Scene/LabelCollection","../Scene/LabelStyle","../Scene/VerticalOrigin","./BoundingSphereState","./Property"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f){"use strict";function g(e){this.entity=e,this.label=void 0,this.index=void 0}function v(t,i){i.collectionChanged.addEventListener(v.prototype._onCollectionChanged,this),this._scene=t,this._unusedIndexes=[],this._labelCollection=void 0,this._entityCollection=i,this._items=new e,this._onCollectionChanged(i,i.values,[],[])}function _(e,t){if(o(e)){var i=e.label;o(i)&&(t.push(e.index),i.id=void 0,i.show=!1,e.label=void 0,e.index=-1)}}var y=1,C="30px sans-serif",w=d.FILL,E=n.WHITE,b=n.BLACK,S=1,T=t.ZERO,x=i.ZERO,A=u.NONE,P=c.CENTER,M=p.CENTER,D=new i,I=new n,R=new n,O=new i,L=new t,N=new l,F=new l;return v.prototype.update=function(e){for(var t=this._items.values,i=this._unusedIndexes,n=0,r=t.length;r>n;n++){var a,s=t[n],l=s.entity,u=l._label,c=s.label,d=l.isShowing&&l.isAvailable(e)&&f.getValueOrDefault(u._show,e,!0);if(d&&(D=f.getValueOrUndefined(l._position,e,D),a=f.getValueOrUndefined(u._text,e),d=o(D)&&o(a)),d){if(!o(c)){var p=this._labelCollection;o(p)||(p=this._scene.primitives.add(new h({scene:this._scene})),this._labelCollection=p);var m=i.length;if(m>0){var g=i.pop();s.index=g,c=p.get(g)}else c=p.add(),s.index=p.length-1;c.id=l,s.label=c}c.show=!0,c.position=D,c.text=a,c.scale=f.getValueOrDefault(u._scale,e,y),c.font=f.getValueOrDefault(u._font,e,C),c.style=f.getValueOrDefault(u._style,e,w),c.fillColor=f.getValueOrDefault(u._fillColor,e,E,I),c.outlineColor=f.getValueOrDefault(u._outlineColor,e,b,R),c.outlineWidth=f.getValueOrDefault(u._outlineWidth,e,S),c.pixelOffset=f.getValueOrDefault(u._pixelOffset,e,T,L),c.eyeOffset=f.getValueOrDefault(u._eyeOffset,e,x,O),c.heightReference=f.getValueOrDefault(u._heightReference,e,A),c.horizontalOrigin=f.getValueOrDefault(u._horizontalOrigin,e,P),c.verticalOrigin=f.getValueOrDefault(u._verticalOrigin,e,M),c.translucencyByDistance=f.getValueOrUndefined(u._translucencyByDistance,e,N),c.pixelOffsetScaleByDistance=f.getValueOrUndefined(u._pixelOffsetScaleByDistance,e,F)}else _(s,i)}return!0},v.prototype.getBoundingSphere=function(e,t){var n=this._items.get(e.id);if(!o(n)||!o(n.label))return m.FAILED;var a=n.label;return t.center=i.clone(r(a._clampedPosition,a.position),t.center),t.radius=0,m.DONE},v.prototype.isDestroyed=function(){return!1},v.prototype.destroy=function(){return this._entityCollection.collectionChanged.removeEventListener(v.prototype._onCollectionChanged,this),o(this._labelCollection)&&this._scene.primitives.remove(this._labelCollection),a(this)},v.prototype._onCollectionChanged=function(e,t,i,n){var r,a,s=this._unusedIndexes,l=this._items;for(r=t.length-1;r>-1;r--)a=t[r],o(a._label)&&o(a._position)&&l.set(a.id,new g(a));for(r=n.length-1;r>-1;r--)a=n[r],o(a._label)&&o(a._position)?l.contains(a.id)||l.set(a.id,new g(a)):(_(l.get(a.id),s),l.remove(a.id));for(r=i.length-1;r>-1;r--)a=i[r],_(l.get(a.id),s),l.remove(a.id)},v}),define("Cesium/ThirdParty/gltfDefaults",["../Core/Cartesian3","../Core/defaultValue","../Core/defined","../Core/Quaternion","../Renderer/WebGLConstants"],function(e,t,i,n,r){"use strict";function o(e){i(e.accessors)||(e.accessors={});var n=e.accessors;for(var r in n)if(n.hasOwnProperty(r)){var o=n[r];o.byteStride=t(o.byteStride,0)}}function a(e){i(e.animations)||(e.animations={});var n=e.animations;for(var r in n)if(n.hasOwnProperty(r)){var o=n[r];i(o.channels)||(o.channels=[]),i(o.parameters)||(o.parameters={}),i(o.samplers)||(o.samplers={});var a=n.samplers;for(var s in a)if(a.hasOwnProperty(s)){var l=a[s];l.interpolation=t(l.interpolation,"LINEAR")}}}function s(e){i(e.asset)||(e.asset={});var n=e.asset;i(n.profile)&&"string"!=typeof n.profile||(n.profile={});var r=n.profile;n.premultipliedAlpha=t(n.premultipliedAlpha,!1),r.api=t(r.api,"WebGL"),r.version=t(r.version,"1.0.2"),i(e.version)&&(n.version=t(n.version,e.version),delete e.version),"number"==typeof n.version&&(n.version=n.version.toFixed(1).toString())}function l(e){i(e.buffers)||(e.buffers={});var n=e.buffers;for(var r in n)if(n.hasOwnProperty(r)){var o=n[r];o.type=t(o.type,"arraybuffer")}}function u(e){i(e.bufferViews)||(e.bufferViews={})}function c(e){i(e.cameras)||(e.cameras={})}function h(e){i(e.images)||(e.images={})}function d(e){i(e.extensions)||(e.extensions={});var n=e.extensions;i(n.KHR_materials_common)||(n.KHR_materials_common={});var r=n.KHR_materials_common;i(e.lights)?(r.lights=e.lights,delete e.lights):i(r.lights)||(r.lights={});var o=r.lights;for(var a in o)if(o.hasOwnProperty(a)){var s=o[a];if("ambient"===s.type){i(s.ambient)||(s.ambient={});var l=s.ambient;i(l.color)||(l.color=[1,1,1])}else if("directional"===s.type){i(s.directional)||(s.directional={});var u=s.directional;i(u.color)||(u.color=[1,1,1])}else if("point"===s.type){i(s.point)||(s.point={});var c=s.point;i(c.color)||(c.color=[1,1,1]),c.constantAttenuation=t(c.constantAttenuation,1),c.linearAttenuation=t(c.linearAttenuation,0),c.quadraticAttenuation=t(c.quadraticAttenuation,0)}else if("spot"===s.type){i(s.spot)||(s.spot={});var h=s.spot;i(h.color)||(h.color=[1,1,1]),h.constantAttenuation=t(h.constantAttenuation,1),h.fallOffAngle=t(h.fallOffAngle,3.14159265),h.fallOffExponent=t(h.fallOffExponent,0),h.linearAttenuation=t(h.linearAttenuation,0),h.quadraticAttenuation=t(h.quadraticAttenuation,0)}}}function p(e){i(e.materials)||(e.materials={});var t=e.materials;for(var n in t)if(t.hasOwnProperty(n)){var o=t[n],a=o.instanceTechnique;if(i(a)&&(o.technique=a.technique,o.values=a.values,delete o.instanceTechnique),!i(o.extensions))if(i(o.technique))i(o.values)||(o.values={});else{delete o.values,o.extensions={KHR_materials_common:{technique:"CONSTANT",transparent:!1,values:{emission:{type:r.FLOAT_VEC4,value:[.5,.5,.5,1]}}}},i(e.extensionsUsed)||(e.extensionsUsed=[]);var s=e.extensionsUsed;-1===s.indexOf("KHR_materials_common")&&s.push("KHR_materials_common")}}}function m(e){i(e.meshes)||(e.meshes={});var n=e.meshes;for(var o in n)if(n.hasOwnProperty(o)){var a=n[o];i(a.primitives)||(a.primitives=[]);for(var s=a.primitives.length,l=s.length,u=0;l>u;++u){var c=s[u];i(c.attributes)||(c.attributes={});var h=t(c.primitive,r.TRIANGLES);c.mode=t(c.mode,h)}}}function f(t){i(t.nodes)||(t.nodes={});var r=t.nodes,o=parseFloat(t.asset.version)<1,a=new e,s=new n;for(var l in r)if(r.hasOwnProperty(l)){var u=r[l];if(i(u.children)||(u.children=[]),o&&i(u.rotation)){var c=u.rotation;e.fromArray(c,0,a),n.fromAxisAngle(a,c[3],s),u.rotation=[s.x,s.y,s.z,s.w]}i(u.matrix)||(i(u.translation)||i(u.rotation)||i(u.scale)?(i(u.translation)||(u.translation=[0,0,0]),i(u.rotation)||(u.rotation=[0,0,0,1]),i(u.scale)||(u.scale=[1,1,1])):u.matrix=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);var h=u.instanceSkin;i(h)&&(u.skeletons=h.skeletons,u.skin=h.skin,u.meshes=h.meshes,delete u.instanceSkin)}}function g(e){i(e.programs)||(e.programs={});var t=e.programs;for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];i(r.attributes)||(r.attributes=[])}}function v(e){i(e.samplers)||(e.samplers={});var n=e.samplers;for(var o in n)if(n.hasOwnProperty(o)){var a=n[o];a.magFilter=t(a.magFilter,r.LINEAR),a.minFilter=t(a.minFilter,r.NEAREST_MIPMAP_LINEAR),a.wrapS=t(a.wrapS,r.REPEAT),a.wrapT=t(a.wrapT,r.REPEAT)}}function _(e){i(e.scenes)||(e.scenes={});var t=e.scenes;for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];i(r.node)||(r.node=[])}}function y(e){i(e.shaders)||(e.shaders={})}function C(e){i(e.skins)||(e.skins={});var t=e.skins;for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];i(r.bindShapeMatrix)&&(r.bindShapeMatrix=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}}function w(e){i(e.enable)||(e.enable=[]),i(e.disable)||(e.disable=[])}function E(e){i(e.techniques)||(e.techniques={});var n=e.techniques;for(var r in n)if(n.hasOwnProperty(r)){var o=n[r];i(o.parameters)||(o.parameters={});var a=o.parameters;for(var s in a){var l=a[s];l.node=t(l.node,l.source),l.source=void 0}var u=o.passes;if(i(u)){var c=t(o.pass,"defaultPass");if(u.hasOwnProperty(c)){var h=u[c],d=h.instanceProgram;o.attributes=t(o.attributes,d.attributes),o.program=t(o.program,d.program),o.uniforms=t(o.uniforms,d.uniforms),o.states=t(o.states,h.states)}o.passes=void 0,o.pass=void 0}i(o.attributes)||(o.attributes={}),i(o.uniforms)||(o.uniforms={}),i(o.states)||(o.states={}),w(o.states)}}function b(e){i(e.textures)||(e.textures={});var n=e.textures;for(var o in n)if(n.hasOwnProperty(o)){var a=n[o];a.format=t(a.format,r.RGBA),a.internalFormat=t(a.internalFormat,a.format),a.target=t(a.target,r.TEXTURE_2D),a.type=t(a.type,r.UNSIGNED_BYTE)}}var S=function(e){return i(e)?(i(e.allExtensions)&&(e.extensionsUsed=e.allExtensions,e.allExtensions=void 0),e.extensionsUsed=t(e.extensionsUsed,[]),o(e),a(e),s(e),l(e),u(e),c(e),h(e),d(e),p(e),m(e),f(e),g(e),v(e),_(e),y(e),C(e),E(e),b(e),e):void 0};return S}),define("Cesium/Scene/getModelAccessor",["../Core/ComponentDatatype"],function(e){"use strict";function t(t){var n=t.componentType,r=i[t.type];return{componentsPerAttribute:r,createArrayBufferView:function(t,i,o){return e.createArrayBufferView(n,t,i,r*o)}}}var i={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16};return t}),define("Cesium/Scene/ModelAnimationCache",["../Core/Cartesian3","../Core/defaultValue","../Core/defined","../Core/LinearSpline","../Core/Matrix4","../Core/Quaternion","../Core/QuaternionSpline","../Renderer/WebGLConstants","./getModelAccessor"],function(e,t,i,n,r,o,a,s,l){"use strict";function u(){}function c(e,i){var n=e.gltf,r=n.buffers,o=n.bufferViews,a=o[i.bufferView],s=r[a.buffer],u=a.byteOffset+i.byteOffset,c=i.count*l(i).componentsPerAttribute;return e.cacheKey+"//"+t(s.path,"")+"/"+u+"/"+c}function h(e,t,i){return e.cacheKey+"//"+t+"/"+i}function d(e){this._value=e}var p={},m=new e;u.getAnimationParameterValues=function(t,n){var r=c(t,n),a=p[r];if(!i(a)){var u,h=t._loadResources,d=t.gltf,f=parseFloat(d.asset.version)<1,g=d.bufferViews,v=g[n.bufferView],_=n.componentType,y=n.type,C=n.count,w=h.getBuffer(v),E=l(n).createArrayBufferView(w.buffer,w.byteOffset+n.byteOffset,C);if(_===s.FLOAT&&"SCALAR"===y)a=E;else if(_===s.FLOAT&&"VEC3"===y)for(a=new Array(C),u=0;C>u;++u)a[u]=e.fromArray(E,3*u);else if(_===s.FLOAT&&"VEC4"===y)for(a=new Array(C),u=0;C>u;++u){var b=4*u;f?a[u]=o.fromAxisAngle(e.fromArray(E,b,m),E[b+3]):a[u]=o.unpack(E,b)}i(t.cacheKey)&&(p[r]=a)}return a};var f={};d.prototype.evaluate=function(e,t){return this._value},u.getAnimationSpline=function(e,t,r,o,l,u){var c=h(e,t,o),p=f[c];if(!i(p)){var m=u[l.input],g=e.gltf.accessors[r.parameters[l.output]],v=u[l.output];if(1===m.length&&1===v.length)p=new d(v[0]);else{var _=g.componentType,y=g.type;"LINEAR"===l.interpolation&&(_===s.FLOAT&&"VEC3"===y?p=new n({times:m,points:v}):_===s.FLOAT&&"VEC4"===y&&(p=new a({times:m,points:v})))}i(e.cacheKey)&&(f[c]=p)}return p};var g={};return u.getSkinInverseBindMatrices=function(e,t){var n=c(e,t),o=g[n];if(!i(o)){var a=e._loadResources,u=e.gltf,h=u.bufferViews,d=h[t.bufferView],p=t.componentType,m=t.type,f=t.count,v=a.getBuffer(d),_=l(t).createArrayBufferView(v.buffer,v.byteOffset+t.byteOffset,f);if(o=new Array(f),p===s.FLOAT&&"MAT4"===m)for(var y=0;f>y;++y)o[y]=r.fromArray(_,16*y);g[n]=o}return o},u}),define("Cesium/Scene/ModelAnimationLoop",["../Core/freezeObject"],function(e){"use strict";var t={NONE:0,REPEAT:1,MIRRORED_REPEAT:2};return e(t)}),define("Cesium/Scene/ModelAnimationState",["../Core/freezeObject"],function(e){"use strict";return e({STOPPED:0,ANIMATING:1})}),define("Cesium/Scene/ModelAnimation",["../Core/defaultValue","../Core/defineProperties","../Core/Event","../Core/JulianDate","./ModelAnimationLoop","./ModelAnimationState"],function(e,t,i,n,r,o){"use strict";function a(t,a,s){this._name=t.name,this._startTime=n.clone(t.startTime),this._delay=e(t.delay,0),this._stopTime=t.stopTime,this.removeOnStop=e(t.removeOnStop,!1),this._speedup=e(t.speedup,1),this._reverse=e(t.reverse,!1),this._loop=e(t.loop,r.NONE),this.start=new i,this.update=new i,this.stop=new i,this._state=o.STOPPED,this._runtimeAnimation=s,this._computedStartTime=void 0,this._duration=void 0;var l=this;this._raiseStartEvent=function(){l.start.raiseEvent(a,l)},this._updateEventTime=0,this._raiseUpdateEvent=function(){l.update.raiseEvent(a,l,l._updateEventTime)},this._raiseStopEvent=function(){l.stop.raiseEvent(a,l)}}return t(a.prototype,{name:{get:function(){return this._name}},startTime:{get:function(){return this._startTime}},delay:{get:function(){return this._delay}},stopTime:{get:function(){return this._stopTime}},speedup:{get:function(){return this._speedup}},reverse:{get:function(){return this._reverse}},loop:{get:function(){return this._loop}}}),a}),define("Cesium/Scene/ModelAnimationCollection",["../Core/clone","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Event","../Core/JulianDate","../Core/Math","./ModelAnimation","./ModelAnimationLoop","./ModelAnimationState"],function(e,t,i,n,r,o,a,s,l,u,c){"use strict";function h(e){this.animationAdded=new o,this.animationRemoved=new o,this._model=e,this._scheduledAnimations=[],this._previousTime=void 0}function d(e,t){for(var i=e.channelEvaluators,n=i.length,r=0;n>r;++r)i[r](t)}function p(e,t,i){return function(){e.animationRemoved.raiseEvent(t,i)}}n(h.prototype,{length:{get:function(){return this._scheduledAnimations.length}}}),h.prototype.add=function(e){e=t(e,t.EMPTY_OBJECT);var i=this._model,n=i._runtime.animations,r=n[e.name],o=new l(e,i,r);return this._scheduledAnimations.push(o),this.animationAdded.raiseEvent(i,o),o},h.prototype.addAll=function(i){i=t(i,t.EMPTY_OBJECT),i=e(i);for(var n=[],r=this._model._animationIds,o=r.length,a=0;o>a;++a)i.name=r[a], +n.push(this.add(i));return n},h.prototype.remove=function(e){if(i(e)){var t=this._scheduledAnimations,n=t.indexOf(e);if(-1!==n)return t.splice(n,1),this.animationRemoved.raiseEvent(this._model,e),!0}return!1},h.prototype.removeAll=function(){var e=this._model,t=this._scheduledAnimations,i=t.length;this._scheduledAnimations=[];for(var n=0;i>n;++n)this.animationRemoved.raiseEvent(e,t[n])},h.prototype.contains=function(e){return i(e)?-1!==this._scheduledAnimations.indexOf(e):!1},h.prototype.get=function(e){return this._scheduledAnimations[e]};var m=[];return h.prototype.update=function(e){var n=this._scheduledAnimations,r=n.length;if(0===r)return this._previousTime=void 0,!1;if(a.equals(e.time,this._previousTime))return!1;this._previousTime=a.clone(e.time,this._previousTime);for(var o=!1,l=e.time,h=this._model,f=0;r>f;++f){var g=n[f],v=g._runtimeAnimation;i(g._computedStartTime)||(g._computedStartTime=a.addSeconds(t(g.startTime,l),g.delay,new a)),i(g._duration)||(g._duration=v.stopTime*(1/g.speedup));var _=g._computedStartTime,y=g._duration,C=g.stopTime,w=0!==y?a.secondsDifference(l,_)/y:0,E=w>=0,b=g.loop===u.REPEAT||g.loop===u.MIRRORED_REPEAT,S=(E||b&&!i(g.startTime))&&(1>=w||b)&&(!i(C)||a.lessThanOrEquals(l,C));if(S){if(g._state===c.STOPPED&&(g._state=c.ANIMATING,g.start.numberOfListeners>0&&e.afterRender.push(g._raiseStartEvent)),g.loop===u.REPEAT)w-=Math.floor(w);else if(g.loop===u.MIRRORED_REPEAT){var T=Math.floor(w),x=w-T;w=T%2===1?1-x:x}g.reverse&&(w=1-w);var A=w*y*g.speedup;A=s.clamp(A,v.startTime,v.stopTime),d(v,A),g.update.numberOfListeners>0&&(g._updateEventTime=A,e.afterRender.push(g._raiseUpdateEvent)),o=!0}else E&&g._state===c.ANIMATING&&(g._state=c.STOPPED,g.stop.numberOfListeners>0&&e.afterRender.push(g._raiseStopEvent),g.removeOnStop&&m.push(g))}r=m.length;for(var P=0;r>P;++P){var M=m[P];n.splice(n.indexOf(M),1),e.afterRender.push(p(this,h,M))}return m.length=0,o},h}),define("Cesium/Scene/ModelMaterial",["../Core/defined","../Core/defineProperties","../Core/DeveloperError"],function(e,t,i){"use strict";function n(e,t,i){this._name=t.name,this._id=i,this._uniformMap=e._uniformMaps[i]}return t(n.prototype,{name:{get:function(){return this._name}},id:{get:function(){return this._id}}}),n.prototype.setValue=function(e,t){var i=this._uniformMap.values[e];i.value=i.clone(t,i.value)},n.prototype.getValue=function(t){var i=this._uniformMap.values[t];if(e(i))return i.value},n}),define("Cesium/Scene/modelMaterialsCommon",["../Core/defaultValue","../Core/defined","../Renderer/WebGLConstants"],function(e,t,i){"use strict";function n(e){switch(e){case i.FLOAT:return"float";case i.FLOAT_VEC2:return"vec2";case i.FLOAT_VEC3:return"vec3";case i.FLOAT_VEC4:return"vec4";case i.FLOAT_MAT2:return"mat2";case i.FLOAT_MAT3:return"mat3";case i.FLOAT_MAT4:return"mat4";case i.SAMPLER_2D:return"sampler2D"}}function r(e){var n,r={};if(t(e.extensions)&&t(e.extensions.KHR_materials_common)&&(n=e.extensions.KHR_materials_common.lights),t(n)){var o=e.nodes;for(var a in o)if(o.hasOwnProperty(a)){var s=o[a];if(t(s.extensions)&&t(s.extensions.KHR_materials_common)){var l=s.extensions.KHR_materials_common.light;t(l)&&t(n[l])&&(n[l].node=a),delete s.extensions.KHR_materials_common}}var u=0;for(var c in n)if(n.hasOwnProperty(c)){var h=n[c],d=h.type;if("ambient"!==d&&!t(h.node)){delete n[c];continue}var p="light"+u.toString();switch(h.baseName=p,d){case"ambient":var m=h.ambient;r[p+"Color"]={type:i.FLOAT_VEC3,value:m.color};break;case"directional":var f=h.directional;r[p+"Color"]={type:i.FLOAT_VEC3,value:f.color},t(h.node)&&(r[p+"Transform"]={node:h.node,semantic:"MODELVIEW",type:i.FLOAT_MAT4});break;case"point":var g=h.point;r[p+"Color"]={type:i.FLOAT_VEC3,value:g.color},t(h.node)&&(r[p+"Transform"]={node:h.node,semantic:"MODELVIEW",type:i.FLOAT_MAT4}),r[p+"Attenuation"]={type:i.FLOAT_VEC3,value:[g.constantAttenuation,g.linearAttenuation,g.quadraticAttenuation]};break;case"spot":var v=h.spot;r[p+"Color"]={type:i.FLOAT_VEC3,value:v.color},t(h.node)&&(r[p+"Transform"]={node:h.node,semantic:"MODELVIEW",type:i.FLOAT_MAT4},r[p+"InverseTransform"]={node:h.node,semantic:"MODELVIEWINVERSE",type:i.FLOAT_MAT4,useInFragment:!0}),r[p+"Attenuation"]={type:i.FLOAT_VEC3,value:[v.constantAttenuation,v.linearAttenuation,v.quadraticAttenuation]},r[p+"FallOff"]={type:i.FLOAT_VEC2,value:[v.fallOffAngle,v.fallOffExponent]}}++u}}return r}function o(i,n,r){var o,a=e(r,0);do o=n+(a++).toString();while(t(i[o]));return o}function a(r,a,l){var u,m=r.techniques,f=r.shaders,g=r.programs,v=a.technique.toUpperCase();t(r.extensions)&&t(r.extensions.KHR_materials_common)&&(u=r.extensions.KHR_materials_common.lights);var _=e(a.jointCount,0),y=_>0,C=a.values,w="precision highp float;\n",E="precision highp float;\n",b=o(m,"technique",c),S=o(f,"vertexShader",h),T=o(f,"fragmentShader",d),x=o(g,"program",p),A="CONSTANT"!==v,P={modelViewMatrix:{semantic:"MODELVIEW",type:i.FLOAT_MAT4},projectionMatrix:{semantic:"PROJECTION",type:i.FLOAT_MAT4}};A&&(P.normalMatrix={semantic:"MODELVIEWINVERSETRANSPOSE",type:i.FLOAT_MAT3}),y&&(P.jointMatrix={count:_,semantic:"JOINTMATRIX",type:i.FLOAT_MAT4});var M,D=!1;for(var I in C)if(C.hasOwnProperty(I)&&"transparent"!==I&&"doubleSided"!==I){var R=s(I,C[I]);M=I.toLowerCase(),D||R!==i.SAMPLER_2D||(D=!0),P[M]={type:R}}if(t(l))for(var O in l)l.hasOwnProperty(O)&&(P[O]=l[O]);var L={};for(var N in P)if(P.hasOwnProperty(N)){var F=P[N];L["u_"+N]=N;var k=t(F.count)?"["+F.count+"]":"";F.type!==i.FLOAT_MAT3&&F.type!==i.FLOAT_MAT4||F.useInFragment?(E+="uniform "+n(F.type)+" u_"+N+k+";\n",delete F.useInFragment):w+="uniform "+n(F.type)+" u_"+N+k+";\n"}var B="";y&&(B+=" mat4 skinMat = a_weight.x * u_jointMatrix[int(a_joint.x)];\n",B+=" skinMat += a_weight.y * u_jointMatrix[int(a_joint.y)];\n",B+=" skinMat += a_weight.z * u_jointMatrix[int(a_joint.z)];\n",B+=" skinMat += a_weight.w * u_jointMatrix[int(a_joint.w)];\n");var z={a_position:"position"};P.position={semantic:"POSITION",type:i.FLOAT_VEC3},w+="attribute vec3 a_position;\n",w+="varying vec3 v_positionEC;\n",B+=y?" vec4 pos = u_modelViewMatrix * skinMat * vec4(a_position,1.0);\n":" vec4 pos = u_modelViewMatrix * vec4(a_position,1.0);\n",B+=" v_positionEC = pos.xyz;\n",B+=" gl_Position = u_projectionMatrix * pos;\n",E+="varying vec3 v_positionEC;\n",A&&(z.a_normal="normal",P.normal={semantic:"NORMAL",type:i.FLOAT_VEC3},w+="attribute vec3 a_normal;\n",w+="varying vec3 v_normal;\n",B+=y?" v_normal = u_normalMatrix * mat3(skinMat) * a_normal;\n":" v_normal = u_normalMatrix * a_normal;\n",E+="varying vec3 v_normal;\n");var V;D&&(z.a_texcoord_0="texcoord_0",P.texcoord_0={semantic:"TEXCOORD_0",type:i.FLOAT_VEC2},V="v_texcoord_0",w+="attribute vec2 a_texcoord_0;\n",w+="varying vec2 "+V+";\n",B+=" "+V+" = a_texcoord_0;\n",E+="varying vec2 "+V+";\n"),y&&(z.a_joint="joint",P.joint={semantic:"JOINT",type:i.FLOAT_VEC4},z.a_weight="weight",P.weight={semantic:"WEIGHT",type:i.FLOAT_VEC4},w+="attribute vec4 a_joint;\n",w+="attribute vec4 a_weight;\n");var U=A&&("BLINN"===v||"PHONG"===v)&&t(P.specular)&&t(P.shininess),G=!1,W=!1,H="";for(var q in u)if(u.hasOwnProperty(q)){var j=u[q],Y=j.type.toLowerCase(),X=j.baseName;H+=" {\n";var Z,K,J="u_"+X+"Color";"ambient"===Y?(W=!0,H+=" ambientLight += "+J+";\n"):A&&(G=!0,Z="v_"+X+"Direction",K="v_"+X+"Position","point"!==Y&&(w+="varying vec3 "+Z+";\n",E+="varying vec3 "+Z+";\n",B+=" "+Z+" = mat3(u_"+X+"Transform) * vec3(0.,0.,1.);\n","directional"===Y&&(H+=" vec3 l = normalize("+Z+");\n")),"directional"!==Y?(w+="varying vec3 "+K+";\n",E+="varying vec3 "+K+";\n",B+=" "+K+" = u_"+X+"Transform[3].xyz;\n",H+=" vec3 VP = "+K+" - v_positionEC;\n",H+=" vec3 l = normalize(VP);\n",H+=" float range = length(VP);\n",H+=" float attenuation = 1.0 / (u_"+X+"Attenuation.x + ",H+="(u_"+X+"Attenuation.y * range) + ",H+="(u_"+X+"Attenuation.z * range * range));\n"):H+=" float attenuation = 1.0;\n","spot"===Y&&(H+=" float spotDot = dot(l, normalize("+Z+"));\n",H+=" if (spotDot < cos(u_"+X+"FallOff.x * 0.5))\n",H+=" {\n",H+=" attenuation = 0.0;\n",H+=" }\n",H+=" else\n",H+=" {\n",H+=" attenuation *= max(0.0, pow(spotDot, u_"+X+"FallOff.y));\n",H+=" }\n"),H+=" diffuseLight += "+J+"* max(dot(normal,l), 0.) * attenuation;\n",U&&("BLINN"===v?(H+=" vec3 h = normalize(l + viewDir);\n",H+=" float specularIntensity = max(0., pow(max(dot(normal, h), 0.), u_shininess)) * attenuation;\n"):(H+=" vec3 reflectDir = reflect(-l, normal);\n",H+=" float specularIntensity = max(0., pow(max(dot(reflectDir, viewDir), 0.), u_shininess)) * attenuation;\n"),H+=" specularLight += "+J+" * specularIntensity;\n")),H+=" }\n"}W||(H+=" ambientLight += vec3(0.2, 0.2, 0.2);\n"),G||"CONSTANT"===v||(H+=" vec3 l = normalize(czm_sunDirectionEC);\n",H+=" diffuseLight += vec3(1.0, 1.0, 1.0) * max(dot(normal,l), 0.);\n",U&&("BLINN"===v?(H+=" vec3 h = normalize(l + viewDir);\n",H+=" float specularIntensity = max(0., pow(max(dot(normal, h), 0.), u_shininess));\n"):(H+=" vec3 reflectDir = reflect(-l, normal);\n",H+=" float specularIntensity = max(0., pow(max(dot(reflectDir, viewDir), 0.), u_shininess));\n"),H+=" specularLight += vec3(1.0, 1.0, 1.0) * specularIntensity;\n")),w+="void main(void) {\n",w+=B,w+="}\n",E+="void main(void) {\n";var Q=" vec3 color = vec3(0.0, 0.0, 0.0);\n";A&&(E+=" vec3 normal = normalize(v_normal);\n",a.doubleSided&&(E+=" if (gl_FrontFacing == false)\n",E+=" {\n",E+=" normal = -normal;\n",E+=" }\n"));var $;"CONSTANT"!==v?(t(P.diffuse)&&(E+=P.diffuse.type===i.SAMPLER_2D?" vec4 diffuse = texture2D(u_diffuse, "+V+");\n":" vec4 diffuse = u_diffuse;\n",E+=" vec3 diffuseLight = vec3(0.0, 0.0, 0.0);\n",Q+=" color += diffuse.rgb * diffuseLight;\n"),U&&(E+=P.specular.type===i.SAMPLER_2D?" vec3 specular = texture2D(u_specular, "+V+").rgb;\n":" vec3 specular = u_specular.rgb;\n",E+=" vec3 specularLight = vec3(0.0, 0.0, 0.0);\n",Q+=" color += specular * specularLight;\n"),$=t(P.transparency)?" gl_FragColor = vec4(color * diffuse.a, diffuse.a * u_transparency);\n":" gl_FragColor = vec4(color * diffuse.a, diffuse.a);\n"):$=t(P.transparency)?" gl_FragColor = vec4(color, u_transparency);\n":" gl_FragColor = vec4(color, 1.0);\n",t(P.emission)&&(E+=P.emission.type===i.SAMPLER_2D?" vec3 emission = texture2D(u_emission, "+V+").rgb;\n":" vec3 emission = u_emission.rgb;\n",Q+=" color += emission;\n"),(t(P.ambient)||"CONSTANT"!==v)&&(E+=t(P.ambient)?P.ambient.type===i.SAMPLER_2D?" vec3 ambient = texture2D(u_ambient, "+V+").rgb;\n":" vec3 ambient = u_ambient.rgb;\n":" vec3 ambient = diffuse.rgb;\n",Q+=" color += ambient * ambientLight;\n"),E+=" vec3 viewDir = -normalize(v_positionEC);\n",E+=" vec3 ambientLight = vec3(0.0, 0.0, 0.0);\n",E+=H,E+=Q,E+=$,E+="}\n";var ee;ee=a.transparent?{enable:[i.DEPTH_TEST,i.BLEND],depthMask:!1,functions:{blendEquationSeparate:[i.FUNC_ADD,i.FUNC_ADD],blendFuncSeparate:[i.ONE,i.ONE_MINUS_SRC_ALPHA,i.ONE,i.ONE_MINUS_SRC_ALPHA]}}:a.doubleSided?{enable:[i.DEPTH_TEST]}:{enable:[i.CULL_FACE,i.DEPTH_TEST]},m[b]={attributes:z,parameters:P,program:x,states:ee,uniforms:L},f[S]={type:i.VERTEX_SHADER,uri:"",extras:{source:w}},f[T]={type:i.FRAGMENT_SHADER,uri:"",extras:{source:E}};var te=Object.keys(z);return g[x]={attributes:te,fragmentShader:T,vertexShader:S},b}function s(e,n){var r;switch(r=t(n.value)?n.value:n,e){case"ambient":return r instanceof String||"string"==typeof r?i.SAMPLER_2D:i.FLOAT_VEC4;case"diffuse":return r instanceof String||"string"==typeof r?i.SAMPLER_2D:i.FLOAT_VEC4;case"emission":return r instanceof String||"string"==typeof r?i.SAMPLER_2D:i.FLOAT_VEC4;case"specular":return r instanceof String||"string"==typeof r?i.SAMPLER_2D:i.FLOAT_VEC4;case"shininess":return i.FLOAT;case"transparency":return i.FLOAT;case"transparent":return i.BOOL;case"doubleSided":return i.BOOL}}function l(t){var i="";i+="technique:"+t.technique+";";for(var n=t.values,r=Object.keys(n).sort(),o=r.length,a=0;o>a;++a){var l=r[a];n.hasOwnProperty(l)&&"transparent"!==l&&"doubleSided"!==l&&(i+=l+":"+s(l,n[l]),i+=";")}var u=e(t.doubleSided,!1);i+=u.toString()+";";var c=e(t.transparent,!1);i+=c.toString()+";";var h=e(t.jointCount,0);return i+=h.toString()+";"}function u(e){if(t(e)){var i=!1,n=e.extensionsUsed;if(t(n))for(var o=n.length,s=0;o>s;++s)if("KHR_materials_common"===n[s]){i=!0,n.splice(s,1);break}if(i){t(e.programs)||(e.programs={}),t(e.shaders)||(e.shaders={}),t(e.techniques)||(e.techniques={});var u=r(e),c={},h=e.materials;for(var d in h)if(h.hasOwnProperty(d)){var p=h[d];if(t(p.extensions)&&t(p.extensions.KHR_materials_common)){var m=p.extensions.KHR_materials_common,f=l(m),g=c[f];t(g)||(g=a(e,m,u),c[f]=g),p.values={};var v=m.values;for(var _ in v)if(v.hasOwnProperty(_)){var y=v[_];t(y.value)?p.values[_]=y.value:p.values[_]=y}p.technique=g,delete p.extensions.KHR_materials_common}}t(e.extensions)&&delete e.extensions.KHR_materials_common}return e}}var c=0,h=0,d=0,p=0;return u}),define("Cesium/Scene/ModelMesh",["../Core/defineProperties"],function(e){"use strict";function t(e,t,i){for(var n=[],r=e.primitives,o=r.length,a=0;o>a;++a){var s=r[a];n[a]=t[s.material]}this._name=e.name,this._materials=n,this._id=i}return e(t.prototype,{name:{get:function(){return this._name}},id:{get:function(){return this._id}},materials:{get:function(){return this._materials}}}),t}),define("Cesium/Scene/ModelNode",["../Core/defaultValue","../Core/defineProperties","../Core/Matrix4"],function(e,t,i){"use strict";function n(e,t,n,r,o){this._model=e,this._runtimeNode=n,this._name=t.name,this._id=r,this.useMatrix=!1,this._show=!0,this._matrix=i.clone(o)}return t(n.prototype,{name:{get:function(){return this._name}},id:{get:function(){return this._id}},show:{get:function(){return this._show},set:function(e){this._show!==e&&(this._show=e,this._model._perNodeShowDirty=!0)}},matrix:{get:function(){return this._matrix},set:function(e){this._matrix=i.clone(e,this._matrix),this.useMatrix=!0;var t=this._model;t._cesiumAnimationsDirty=!0,this._runtimeNode.dirtyNumber=t._maxDirtyNumber}}}),n.prototype.setMatrix=function(e){i.clone(e,this._matrix)},n}),define("Cesium/Scene/Model",["../Core/BoundingSphere","../Core/Cartesian2","../Core/Cartesian3","../Core/Cartesian4","../Core/Cartographic","../Core/clone","../Core/combine","../Core/ComponentDatatype","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/destroyObject","../Core/DeveloperError","../Core/FeatureDetection","../Core/getAbsoluteUri","../Core/getBaseUri","../Core/getMagic","../Core/getStringFromTypedArray","../Core/IndexDatatype","../Core/loadArrayBuffer","../Core/loadImage","../Core/loadImageFromTypedArray","../Core/loadText","../Core/Math","../Core/Matrix2","../Core/Matrix3","../Core/Matrix4","../Core/PrimitiveType","../Core/Quaternion","../Core/Queue","../Core/RuntimeError","../Core/Transforms","../Renderer/Buffer","../Renderer/BufferUsage","../Renderer/DrawCommand","../Renderer/RenderState","../Renderer/Sampler","../Renderer/ShaderProgram","../Renderer/ShaderSource","../Renderer/Texture","../Renderer/TextureMinificationFilter","../Renderer/TextureWrap","../Renderer/VertexArray","../Renderer/WebGLConstants","../ThirdParty/gltfDefaults","../ThirdParty/Uri","../ThirdParty/when","./getModelAccessor","./HeightReference","./ModelAnimationCache","./ModelAnimationCollection","./ModelMaterial","./modelMaterialsCommon","./ModelMesh","./ModelNode","./Pass","./SceneMode"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g,v,_,y,C,w,E,b,S,T,x,A,P,M,D,I,R,O,L,N,F,k,B,z,V,U,G,W,H,q,j,Y,X,Z,K,J,Q,$,ee,te,ie){"use strict";function ne(){this.buffersToCreate=new M,this.buffers={},this.pendingBufferLoads=0,this.programsToCreate=new M,this.shaders={},this.pendingShaderLoads=0,this.texturesToCreate=new M,this.pendingTextureLoads=0,this.texturesToCreateFromBufferView=new M,this.pendingBufferViewToImage=0,this.createSamplers=!0,this.createSkins=!0,this.createRuntimeAnimations=!0,this.createVertexArrays=!0,this.createRenderStates=!0,this.createUniformMaps=!0,this.createRuntimeNodes=!0,this.skinnedNodesIds=[]}function re(e,t){e._cachedGltf=t,e._animationIds=ae(t)}function oe(e){this._gltf=Q(H(e.gltf)),this._bgltf=e.bgltf,this.ready=e.ready,this.modelsToLoad=[],this.count=0}function ae(e){var t=[];if(u(e)&&u(e.gltf)){var i=e.gltf.animations;for(var n in i)i.hasOwnProperty(n)&&t.push(n)}return t}function se(t){t=l(t,l.EMPTY_OBJECT);var i=t.cacheKey;this._cacheKey=i,this._cachedGltf=void 0,this._releaseGltfJson=l(t.releaseGltfJson,!1),this._animationIds=void 0;var n;if(u(i)&&u(Ut[i])&&Ut[i].ready)n=Ut[i],++n.count;else{var r=t.gltf;if(u(r)){if(r instanceof ArrayBuffer&&(r=new Uint8Array(r)),r instanceof Uint8Array){var o=ce(r);0!==o.binaryOffset&&(r=r.subarray(o.binaryOffset)),n=new oe({gltf:o.glTF,bgltf:r,ready:!0})}else n=new oe({gltf:t.gltf,ready:!0});n.count=1,u(i)&&(Ut[i]=n)}}re(this,n),this._basePath=l(t.basePath,"");var a=new q(document.location.href),s=new q(this._basePath);this._baseUri=s.resolve(a),this.show=l(t.show,!0),this.modelMatrix=x.clone(l(t.modelMatrix,x.IDENTITY)),this._modelMatrix=x.clone(this.modelMatrix),this._clampedModelMatrix=void 0,this.scale=l(t.scale,1),this._scale=this.scale,this.minimumPixelSize=l(t.minimumPixelSize,0),this._minimumPixelSize=this.minimumPixelSize,this.maximumScale=t.maximumScale,this._maximumScale=this.maximumScale,this.id=t.id,this._id=t.id,this.heightReference=l(t.heightReference,X.NONE),this._heightReference=this.heightReference,this._heightChanged=!1,this._removeUpdateHeightCallback=void 0;var c=t.scene;this._scene=c,u(c)&&c.terrainProviderChanged.addEventListener(function(){this._heightChanged=!0},this),this.pickPrimitive=t.pickPrimitive,this._allowPicking=l(t.allowPicking,!0),this._ready=!1,this._readyPromise=j.defer(),this.activeAnimations=new K(this),this._defaultTexture=void 0,this._incrementallyLoadTextures=l(t.incrementallyLoadTextures,!0),this._asynchronous=l(t.asynchronous,!0),this.castShadows=l(t.castShadows,!0),this._castShadows=this.castShadows,this.receiveShadows=l(t.receiveShadows,!0),this._receiveShadows=this.receiveShadows,this.debugShowBoundingVolume=l(t.debugShowBoundingVolume,!1),this._debugShowBoundingVolume=!1,this.debugWireframe=l(t.debugWireframe,!1),this._debugWireframe=!1,this._precreatedAttributes=t.precreatedAttributes,this._vertexShaderLoaded=t.vertexShaderLoaded,this._fragmentShaderLoaded=t.fragmentShaderLoaded,this._uniformMapLoaded=t.uniformMapLoaded,this._pickVertexShaderLoaded=t.pickVertexShaderLoaded,this._pickFragmentShaderLoaded=t.pickFragmentShaderLoaded,this._pickUniformMapLoaded=t.pickUniformMapLoaded,this._ignoreCommands=l(t.ignoreCommands,!1),this.cull=l(t.cull,!0),this._computedModelMatrix=new x,this._initialRadius=void 0,this._boundingSphere=void 0,this._scaledBoundingSphere=new e,this._state=zt.NEEDS_LOAD,this._loadResources=void 0,this._mode=void 0,this._perNodeShowDirty=!1,this._cesiumAnimationsDirty=!1,this._dirty=!1,this._maxDirtyNumber=0,this._runtime={animations:void 0,rootNodes:void 0,nodes:void 0,nodesByName:void 0,skinnedNodes:void 0,meshesByName:void 0,materialsByName:void 0,materialsById:void 0},this._uniformMaps={},this._extensionsUsed=void 0,this._quantizedUniforms={},this._programPrimitives={},this._rendererResources={buffers:{},vertexArrays:{},programs:{},pickPrograms:{},textures:{},samplers:{},renderStates:{}},this._cachedRendererResources=void 0,this._loadRendererResourcesFromCache=!1,this._nodeCommands=[],this._pickIds=[],this._rtcCenter=void 0,this._rtcCenterEye=void 0}function le(e,t,i){return e.subarray(t,t+i)}function ue(e){var t=g(e);return"glTF"===t}function ce(e){if(!ue(e))throw new d("bgltf is not a valid Binary glTF file.");var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i=0;i+=Gt,i+=Gt,i+=Gt;var n=t.getUint32(i,!0);i+=Gt+Gt;var r=i,o=r+n,a=v(e,r,n);return{glTF:JSON.parse(a),binaryOffset:o}}function he(e,t,i){return e._runtime[t][i]}function de(e,t){var i=e.accessors[t],n=i.extensions,r=i.min,o=i.max;if(u(n)){var a=n.WEB3D_quantized_attributes;u(a)&&(r=a.decodedMin,o=a.decodedMax)}return{min:r,max:o}}function pe(t){for(var n=t.nodes,r=t.meshes,o=t.scenes[t.scene].nodes,a=o.length,s=[],l=new i(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),c=new i(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),h=0;a>h;++h){var d=n[o[h]];for(d._transformToRoot=be(d),s.push(d);s.length>0;){d=s.pop();var p=d._transformToRoot,m=d.meshes;if(u(m))for(var f=m.length,g=0;f>g;++g)for(var v=r[m[g]].primitives,_=v.length,y=0;_>y;++y){var C=v[y].attributes.POSITION;if(u(C)){var w=de(t,C),E=i.fromArray(w.min,0,Wt),b=i.fromArray(w.max,0,Ht);u(l)&&u(c)&&(x.multiplyByPoint(p,E,E),x.multiplyByPoint(p,b,b),i.minimumByComponent(l,E,l),i.maximumByComponent(c,b,c))}}for(var S=d.children,T=S.length,A=0;T>A;++A){var P=n[S[A]];P._transformToRoot=be(P),x.multiplyTransformation(p,P._transformToRoot,P._transformToRoot),s.push(P)}delete d._transformToRoot}}var M=e.fromCornerPoints(l,c);return e.transformWithoutScale(M,kt,M)}function me(e,t,i){return function(){e._state=zt.FAILED,e._readyPromise.reject(new D("Failed to load "+t+": "+i))}}function fe(e,t){return function(i){var n=e._loadResources;n.buffers[t]=new Uint8Array(i),--n.pendingBufferLoads}}function ge(e){var t=e.gltf.buffers;for(var i in t)if(t.hasOwnProperty(i)){var n=t[i];if("binary_glTF"===i||"KHR_binary_glTF"===i){var r=e._loadResources;r.buffers[i]=e._cachedGltf.bgltf}else if("arraybuffer"===n.type){++e._loadResources.pendingBufferLoads;var o=new q(n.uri),a=o.resolve(e._baseUri).toString();y(a).then(fe(e,i)).otherwise(me(e,"buffer",a))}}}function ve(e){var t=e.gltf.bufferViews;for(var i in t)t.hasOwnProperty(i)&&t[i].target===W.ARRAY_BUFFER&&e._loadResources.buffersToCreate.enqueue(i)}function _e(e,t){return function(i){var n=e._loadResources;n.shaders[t]={source:i,bufferView:void 0},--n.pendingShaderLoads}}function ye(e){var t=e.gltf.shaders;for(var i in t)if(t.hasOwnProperty(i)){var n=t[i];if(u(n.extras)&&u(n.extras.source))e._loadResources.shaders[i]={source:n.extras.source,bufferView:void 0};else if(u(n.extensions)&&u(n.extensions.KHR_binary_glTF)){var r=n.extensions.KHR_binary_glTF;e._loadResources.shaders[i]={source:void 0,bufferView:r.bufferView}}else{++e._loadResources.pendingShaderLoads;var o=new q(n.uri),a=o.resolve(e._baseUri).toString();E(a).then(_e(e,i)).otherwise(me(e,"shader",a))}}}function Ce(e){var t=e.gltf.programs;for(var i in t)t.hasOwnProperty(i)&&e._loadResources.programsToCreate.enqueue(i)}function we(e,t){return function(i){var n=e._loadResources;--n.pendingTextureLoads,n.texturesToCreate.enqueue({id:t,image:i,bufferView:void 0})}}function Ee(e){var t=e.gltf.images,i=e.gltf.textures;for(var n in i)if(i.hasOwnProperty(n)){var r=t[i[n].source];if(u(r.extensions)&&u(r.extensions.KHR_binary_glTF)){var o=r.extensions.KHR_binary_glTF;e._loadResources.texturesToCreateFromBufferView.enqueue({id:n,image:void 0,bufferView:o.bufferView,mimeType:o.mimeType})}else{++e._loadResources.pendingTextureLoads;var a=new q(r.uri),s=a.resolve(e._baseUri).toString();C(s).then(we(e,n)).otherwise(me(e,"image",s))}}}function be(e){return u(e.matrix)?x.fromArray(e.matrix):x.fromTranslationQuaternionRotationScale(i.fromArray(e.translation,0,qt),P.unpack(e.rotation,0,jt),i.fromArray(e.scale,0,Yt))}function Se(e){var t={},i={},n=[],r=e._loadResources.skinnedNodesIds,o=e.gltf.nodes;for(var a in o)if(o.hasOwnProperty(a)){var s=o[a],l={matrix:void 0,translation:void 0,rotation:void 0,scale:void 0,computedShow:!0,transformToRoot:new x,computedMatrix:new x,dirtyNumber:0,commands:[],inverseBindMatrices:void 0,bindShapeMatrix:void 0,joints:[],computedJointMatrices:[],jointName:s.jointName,children:[],parents:[],publicNode:void 0};l.publicNode=new ee(e,s,l,a,be(s)),t[a]=l,i[s.name]=l,u(s.skin)&&(r.push(a),n.push(l))}e._runtime.nodes=t,e._runtime.nodesByName=i,e._runtime.skinnedNodes=n}function Te(e){var t={},i={},n=e.gltf.materials,r=e._uniformMaps;for(var o in n)if(n.hasOwnProperty(o)){r[o]={uniformMap:void 0,values:void 0,jointMatrixUniformName:void 0};var a=n[o],s=new J(e,a,o);t[a.name]=s,i[o]=s}e._runtime.materialsByName=t,e._runtime.materialsById=i}function xe(e){var t={},i=e._runtime.materialsById,n=e.gltf.meshes,r=Pe(e,"WEB3D_quantized_attributes");for(var o in n)if(n.hasOwnProperty(o)){var a=n[o];if(t[a.name]=new $(a,i,o),r)for(var s=a.primitives,l=s.length,c=0;l>c;c++){var h=s[c],d=Oe(e,h),p=e._programPrimitives[d];u(p)||(p=[],e._programPrimitives[d]=p),p.push(h)}}e._runtime.meshesByName=t}function Ae(e){e._loadRendererResourcesFromCache||(ge(e),ve(e),ye(e),Ce(e),Ee(e)),Te(e),xe(e),Se(e)}function Pe(e,t){var i=e._extensionsUsed;if(!u(i)){var n=e.gltf.extensionsUsed;i={};for(var r=n.length,o=0;r>o;o++)i[n[o]]=!0}return u(i[t])}function Me(e,t){var i=e._loadResources;if(0===i.pendingBufferLoads){for(var n,r=e.gltf.bufferViews,o=e._rendererResources.buffers;i.buffersToCreate.length>0;){var a=i.buffersToCreate.dequeue();n=r[a];var s=R.createVertexBuffer({context:t,typedArray:i.getBuffer(n),usage:O.STATIC_DRAW});s.vertexArrayDestroyable=!1,o[a]=s}var l=e.gltf.accessors;for(var c in l)if(l.hasOwnProperty(c)){var h=l[c];if(n=r[h.bufferView],n.target===W.ELEMENT_ARRAY_BUFFER&&!u(o[h.bufferView])){var d=R.createIndexBuffer({context:t,typedArray:i.getBuffer(n),usage:O.STATIC_DRAW,indexDatatype:h.componentType});d.vertexArrayDestroyable=!1,o[h.bufferView]=d}}}}function De(e,t){var i,n={},r=t.length;for(i=1;r>i;++i){var o=t[i];if(/position/i.test(o)){t[i]=t[0],t[0]=o;break}}for(i=0;r>i;++i)n[t[i]]=i;return n}function Ie(e,t){if(u(t.source))return t.source;var i=e._loadResources,n=e.gltf,r=n.bufferViews[t.bufferView];return v(i.getBuffer(r))}function Re(e,t,i){var n=e.indexOf(t);return e.replace(new RegExp(t,"g"),function(e,t,r){return n===t?e:i})}function Oe(e,t){var i=e.gltf,n=t.material,r=i.materials[n],o=r.technique,a=i.techniques[o];return a.program}function Le(e,t){var i=e.gltf,n=i.accessors[t],r=n.extensions;return u(r)?r.WEB3D_quantized_attributes:void 0}function Ne(e,t,i){var n=e.gltf,r=t.material,o=n.materials[r],a=o.technique,s=n.techniques[a];for(var l in s.parameters)if(s.parameters.hasOwnProperty(l)){var u=s.parameters[l].semantic;if(u===i){var c=s.attributes;for(var h in c)if(c.hasOwnProperty(h)){var d=c[h];if(d===l)return h}}}}function Fe(e,t,i,n){var r={};i._quantizedUniforms[t]=r;for(var o=i._programPrimitives[t],a=0;a2?"vec"+(y-1):"float",e=C+" "+_+";\n"+e;var w="";5===y?(e="uniform mat4 "+h+";\n"+e,e="uniform vec4 "+d+";\n"+e,w="\nvoid main() {\n "+_+" = "+h+" * "+f+" + "+d+";\n "+v+"();\n}\n",r[h]={mat:4},r[d]={vec:4}):(e="uniform mat"+y+" "+c+";\n"+e,w="\nvoid main() {\n "+_+" = "+C+"("+c+" * vec"+y+"("+f+",1.0));\n "+v+"();\n}\n",r[c]={mat:y}),e=B.replaceMain(e,v),e+=w}}}}return i._programPrimitives[t]=void 0,e}function ke(e,t,i){return u(i)&&(e=i(e,t)),e}function Be(e,t,i){var n=t.gltf.programs,r=t._loadResources.shaders,o=n[e],a=De(t,o.attributes),s=Ie(t,r[o.vertexShader]),l=Ie(t,r[o.fragmentShader]),c=o.attributes.length,h=t._precreatedAttributes;if(u(h))for(var d in h)h.hasOwnProperty(d)&&(a[d]=c++);Pe(t,"WEB3D_quantized_attributes")&&(s=Fe(s,e,t,i));var p=ke(s,e,t._vertexShaderLoaded),m=ke(l,e,t._fragmentShaderLoaded);if(t._rendererResources.programs[e]=k.fromCache({context:i,vertexShaderSource:p,fragmentShaderSource:m,attributeLocations:a}),t.allowPicking){var f=ke(s,e,t._pickVertexShaderLoaded),g=ke(l,e,t._pickFragmentShaderLoaded);t._pickFragmentShaderLoaded||(g=B.createPickFragmentShaderSource(l,"uniform")),t._rendererResources.pickPrograms[e]=k.fromCache({context:i,vertexShaderSource:f,fragmentShaderSource:g,attributeLocations:a})}}function ze(e,t){var i,n=e._loadResources;if(0===n.pendingShaderLoads&&0===n.pendingBufferLoads)if(e.asynchronous)n.programsToCreate.length>0&&(i=n.programsToCreate.dequeue(),Be(i,e,t));else for(;n.programsToCreate.length>0;)i=n.programsToCreate.dequeue(),Be(i,e,t)}function Ve(e,t){return function(i){e.texturesToCreate.enqueue({id:t.id,image:i,bufferView:void 0}),--e.pendingBufferViewToImage}}function Ue(e){var t=e._loadResources;if(0===t.pendingBufferLoads)for(;t.texturesToCreateFromBufferView.length>0;){var i=t.texturesToCreateFromBufferView.dequeue(),n=e.gltf,r=n.bufferViews[i.bufferView],o=Ve(t,i),a=me(e,"image","id: "+i.id+", bufferView: "+i.bufferView);w(t.getBuffer(r),i.mimeType).then(o).otherwise(a),++t.pendingBufferViewToImage}}function Ge(e,t){var i=e._loadResources;if(i.createSamplers){i.createSamplers=!1;var n=e._rendererResources.samplers,r=e.gltf.samplers;for(var o in r)if(r.hasOwnProperty(o)){var a=r[o];n[o]=new F({wrapS:a.wrapS,wrapT:a.wrapT,minificationFilter:a.minFilter,magnificationFilter:a.magFilter})}}}function We(e,t,i){var n=t.gltf.textures,r=n[e.id],o=t._rendererResources.samplers,a=o[r.sampler],s=a.minificationFilter===V.NEAREST_MIPMAP_NEAREST||a.minificationFilter===V.NEAREST_MIPMAP_LINEAR||a.minificationFilter===V.LINEAR_MIPMAP_NEAREST||a.minificationFilter===V.LINEAR_MIPMAP_LINEAR,l=s||a.wrapS===U.REPEAT||a.wrapS===U.MIRRORED_REPEAT||a.wrapT===U.REPEAT||a.wrapT===U.MIRRORED_REPEAT,u=e.image,c=!b.isPowerOfTwo(u.width)||!b.isPowerOfTwo(u.height);if(l&&c){var h=document.createElement("canvas");h.width=b.nextPowerOfTwo(u.width),h.height=b.nextPowerOfTwo(u.height);var d=h.getContext("2d");d.drawImage(u,0,0,u.width,u.height,0,0,h.width,h.height),u=h}var p;r.target===W.TEXTURE_2D&&(p=new z({context:i,source:u,pixelFormat:r.internalFormat,pixelDatatype:r.type,sampler:a,flipY:!1})),s&&p.generateMipmap(),t._rendererResources.textures[e.id]=p}function He(e,t){var i,n=e._loadResources;if(e.asynchronous)n.texturesToCreate.length>0&&(i=n.texturesToCreate.dequeue(),We(i,e,t));else for(;n.texturesToCreate.length>0;)i=n.texturesToCreate.dequeue(),We(i,e,t)}function qe(e,t){var i=e.gltf,n=i.techniques,r=i.materials,o={},a=n[r[t.material].technique],s=a.parameters,l=a.attributes,c=e._rendererResources.programs[a.program].vertexAttributes;for(var h in c)if(c.hasOwnProperty(h)){var d=l[h],p=c[h].index;if(u(d)){var m=s[d];o[m.semantic]=p}else o[h]=p}return o}function je(e,t,i){for(var n=e.length,r=0;n>r;++r)for(var o=[e[r]];o.length>0;){var a=o.pop(),s=i[a];if(s.jointName===t)return a;for(var l=s.children,u=l.length,c=0;u>c;++c)o.push(l[c])}}function Ye(e,t){for(var i=e.gltf,n=i.skins,r=i.nodes,o=e._runtime.nodes,a=e._loadResources.skinnedNodesIds,s=a.length,l=0;s>l;++l){var u=a[l],c=o[u],h=r[u],d=t[h.skin];c.inverseBindMatrices=d.inverseBindMatrices,c.bindShapeMatrix=d.bindShapeMatrix;for(var p=[],m=h.skeletons,f=m.length,g=0;f>g;++g)p.push(m[g]);for(var v=n[h.skin].jointNames,_=v.length,y=0;_>y;++y){var C=v[y],w=o[je(p,C,r)];c.joints.push(w)}}}function Xe(e){var t=e._loadResources;if(0===t.pendingBufferLoads&&t.createSkins){t.createSkins=!1;var i=e.gltf,n=i.accessors,r=i.skins,o={};for(var a in r)if(r.hasOwnProperty(a)){var s,l=r[a],u=n[l.inverseBindMatrices];x.equals(l.bindShapeMatrix,x.IDENTITY)||(s=x.clone(l.bindShapeMatrix)),o[a]={inverseBindMatrices:Z.getSkinInverseBindMatrices(e,u),bindShapeMatrix:s}}Ye(e,o)}}function Ze(e,t,i,n){return function(r){t[i]=n.evaluate(r,t[i]),t.dirtyNumber=e._maxDirtyNumber}}function Ke(e){var t=e._loadResources;if(t.finishedPendingBufferLoads()&&t.createRuntimeAnimations){t.createRuntimeAnimations=!1,e._runtime.animations={};var i=e._runtime.nodes,n=e.gltf.animations,r=e.gltf.accessors;for(var o in n)if(n.hasOwnProperty(o)){var a=n[o],s=a.channels,l=a.parameters,u=a.samplers,c={};for(var h in l)l.hasOwnProperty(h)&&(c[h]=Z.getAnimationParameterValues(e,r[l[h]]));for(var d=Number.MAX_VALUE,p=-Number.MAX_VALUE,m=s.length,f=new Array(m),g=0;m>g;++g){var v=s[g],_=v.target,y=u[v.sampler],C=c[y.input];d=Math.min(d,C[0]),p=Math.max(p,C[C.length-1]); +var w=Z.getAnimationSpline(e,o,a,v.sampler,y,c);f[g]=Ze(e,i[_.id],_.path,w)}e._runtime.animations[o]={startTime:d,stopTime:p,channelEvaluators:f}}}}function Je(e,t){var i=e._loadResources;if(i.finishedBuffersCreation()&&i.finishedProgramCreation()&&i.createVertexArrays){i.createVertexArrays=!1;var n=e._rendererResources.buffers,r=e._rendererResources.vertexArrays,o=e.gltf,a=o.accessors,s=o.meshes;for(var l in s)if(s.hasOwnProperty(l))for(var c=s[l].primitives,h=c.length,d=0;h>d;++d){var p,m,f,g=c[d],v=qe(e,g),_=[],y=g.attributes;for(p in y)if(y.hasOwnProperty(p)&&(m=v[p],u(m))){var C=a[y[p]];_.push({index:m,vertexBuffer:n[C.bufferView],componentsPerAttribute:Y(C).componentsPerAttribute,componentDatatype:C.componentType,normalize:!1,offsetInBytes:C.byteOffset,strideInBytes:C.byteStride})}var w=e._precreatedAttributes;if(u(w))for(p in w)w.hasOwnProperty(p)&&(m=v[p],u(m)&&(f=w[p],f.index=m,_.push(f)));var E;if(u(g.indices)){var b=a[g.indices];E=n[b.bufferView]}r[l+".primitive."+d]=new G({context:t,attributes:_,indexBuffer:E})}}}function Qe(e){var t={};t[W.BLEND]=!1,t[W.CULL_FACE]=!1,t[W.DEPTH_TEST]=!1,t[W.POLYGON_OFFSET_FILL]=!1,t[W.SCISSOR_TEST]=!1;var i,n=e.enable,r=n.length;for(i=0;r>i;++i)t[n[i]]=!0;return t}function $e(e,t){var i=e._loadResources,n=e.gltf.techniques;if(i.createRenderStates){i.createRenderStates=!1;for(var r in n)n.hasOwnProperty(r)&&et(e,r,t)}}function et(e,t,i){var n=e._rendererResources.renderStates,r=e.gltf.techniques,o=r[t],a=o.states,s=Qe(a),c=l(a.functions,l.EMPTY_OBJECT),h=l(c.blendColor,[0,0,0,0]),d=l(c.blendEquationSeparate,[W.FUNC_ADD,W.FUNC_ADD]),p=l(c.blendFuncSeparate,[W.ONE,W.ONE,W.ZERO,W.ZERO]),m=l(c.colorMask,[!0,!0,!0,!0]),f=l(c.depthRange,[0,1]),g=l(c.polygonOffset,[0,0]),v=l(c.scissor,[0,0,0,0]);n[t]=N.fromCache({frontFace:u(c.frontFace)?c.frontFace[0]:W.CCW,cull:{enabled:s[W.CULL_FACE],face:u(c.cullFace)?c.cullFace[0]:W.BACK},lineWidth:u(c.lineWidth)?c.lineWidth[0]:1,polygonOffset:{enabled:s[W.POLYGON_OFFSET_FILL],factor:g[0],units:g[1]},scissorTest:{enabled:s[W.SCISSOR_TEST],rectangle:{x:v[0],y:v[1],width:v[2],height:v[3]}},depthRange:{near:f[0],far:f[1]},depthTest:{enabled:s[W.DEPTH_TEST],func:u(c.depthFunc)?c.depthFunc[0]:W.LESS},colorMask:{red:m[0],green:m[1],blue:m[2],alpha:m[3]},depthMask:u(c.depthMask)?c.depthMask[0]:!0,blending:{enabled:s[W.BLEND],color:{red:h[0],green:h[1],blue:h[2],alpha:h[3]},equationRgb:d[0],equationAlpha:d[1],functionSourceRgb:p[0],functionSourceAlpha:p[1],functionDestinationRgb:p[2],functionDestinationAlpha:p[3]}})}function tt(e,t){var i={value:e,clone:function(e,t){return e},func:function(){return i.value}};return i}function it(e,i){var n={value:t.fromArray(e),clone:t.clone,func:function(){return n.value}};return n}function nt(e,t){var n={value:i.fromArray(e),clone:i.clone,func:function(){return n.value}};return n}function rt(e,t){var i={value:n.fromArray(e),clone:n.clone,func:function(){return i.value}};return i}function ot(e,t){var i={value:S.fromColumnMajorArray(e),clone:S.clone,func:function(){return i.value}};return i}function at(e,t){var i={value:T.fromColumnMajorArray(e),clone:T.clone,func:function(){return i.value}};return i}function st(e,t){var i={value:x.fromColumnMajorArray(e),clone:x.clone,func:function(){return i.value}};return i}function lt(e,t){this._value=void 0,this._textureId=e,this._model=t}function ut(e,t){var i=new lt(e,t);return i.func=function(){return i.value},i}function ct(e,t,i,n){var r=t._runtime.nodes[e];return Jt[i](n,t,r)}function ht(e,t){var i=e._loadResources;if(i.finishedProgramCreation()&&i.createUniformMaps){i.createUniformMaps=!1;var n=e.gltf,r=n.materials,o=n.techniques,a=e._uniformMaps;for(var s in r)if(r.hasOwnProperty(s)){var l,c=r[s],h=c.values,d=o[c.technique],p=d.parameters,m=d.uniforms,f={},g={};for(var v in m)if(m.hasOwnProperty(v)){var _=m[v],y=p[_];if(u(h[_])){var C=Kt[y.type](h[_],e);f[v]=C.func,g[_]=C}else if(u(y.node))f[v]=ct(y.node,e,y.semantic,t.uniformState);else if(u(y.semantic))"JOINTMATRIX"!==y.semantic?f[v]=Zt[y.semantic](t.uniformState,e):l=v;else if(u(y.value)){var w=Kt[y.type](y.value,e);f[v]=w.func,g[_]=w}}var E=a[s];E.uniformMap=f,E.values=g,E.jointMatrixUniformName=l}}}function dt(e){return[e[0],e[1],e[2],e[3],e[5],e[6],e[7],e[8],e[10],e[11],e[12],e[13],e[15],e[16],e[17],e[18]]}function pt(e){return[e[20],e[21],e[22],e[23]]}function mt(e,t,i){var n=e.gltf,r=n.accessors,o=Oe(e,t),a=e._quantizedUniforms[o],s={},l={};for(var c in t.attributes)if(t.attributes.hasOwnProperty(c)){var h=t.attributes[c],d=r[h],p=d.extensions;if(u(p)){var m=p.WEB3D_quantized_attributes;if(u(m)){var f=m.decodeMatrix,g="czm_u_dec_"+c.toLowerCase();switch(d.type){case"SCALAR":l[g]=ot(f,e).func,s[g]=!0;break;case"VEC2":l[g]=at(f,e).func,s[g]=!0;break;case"VEC3":l[g]=st(f,e).func,s[g]=!0;break;case"VEC4":var v=g+"_scale",_=g+"_translate";l[v]=st(dt(f),e).func,l[_]=rt(pt(f),e).func,s[v]=!0,s[_]=!0}}}}for(var y in a)if(a.hasOwnProperty(y)&&!s[y]){var C=a[y];u(C.mat)&&(2===C.mat?l[y]=ot(S.IDENTITY,e).func:3===C.mat?l[y]=at(T.IDENTITY,e).func:4===C.mat&&(l[y]=st(x.IDENTITY,e).func)),u(C.vec)&&4===C.vec&&(l[y]=rt([0,0,0,0],e).func)}return l}function ft(e){return function(){return e}}function gt(e){return function(){return e.computedJointMatrices}}function vt(t,n,r,o,c){for(var h=t._nodeCommands,d=t._pickIds,p=t.allowPicking,m=t._runtime.meshesByName,f=t._rendererResources,g=f.vertexArrays,v=f.programs,y=f.pickPrograms,C=f.renderStates,w=t._uniformMaps,E=t.gltf,b=E.accessors,S=E.meshes,T=E.techniques,A=E.materials,P=n.meshes,M=P.length,D=0;M>D;++D)for(var I=P[D],R=S[I],O=R.primitives,N=O.length,F=0;N>F;++F){var k,B=O[F],z=b[B.indices],V=A[B.material],U=T[V.technique],G=U.program,W=B.attributes.POSITION;if(u(W)){var H=de(E,W);k=e.fromCornerPoints(i.fromArray(H.min),i.fromArray(H.max))}var q,j,X=g[I+".primitive."+F];if(u(z))j=z.count,q=z.byteOffset/_.getSizeInBytes(z.componentType);else{var Z=b[B.attributes.POSITION];j=Z.count;var K=Y(Z);q=Z.byteOffset/(K.componentsPerAttribute*s.getSizeInBytes(Z.componentType))}var J=w[B.material],Q=J.uniformMap;if(u(J.jointMatrixUniformName)){var $={};$[J.jointMatrixUniformName]=gt(r),Q=a(Q,$)}if(u(t._uniformMapLoaded)&&(Q=t._uniformMapLoaded(Q,G,r)),Pe(t,"WEB3D_quantized_attributes")){var ee=mt(t,B,o);Q=a(Q,ee)}var ie,ne=C[V.technique],re=ne.blending.enabled,oe={primitive:l(t.pickPrimitive,t),id:t.id,node:r.publicNode,mesh:m[R.name]},ae=new L({boundingVolume:new e,cull:t.cull,modelMatrix:new x,primitiveType:B.mode,vertexArray:X,count:j,offset:q,shaderProgram:v[U.program],castShadows:t._castShadows,receiveShadows:t._receiveShadows,uniformMap:Q,renderState:ne,owner:oe,pass:re?te.TRANSLUCENT:te.OPAQUE});if(p){var se;if(u(t._pickFragmentShaderLoaded))se=u(t._pickUniformMapLoaded)?t._pickUniformMapLoaded(Q):a(Q);else{var le=o.createPickId(oe);d.push(le);var ue={czm_pickColor:ft(le.color)};se=a(Q,ue)}ie=new L({boundingVolume:new e,cull:t.cull,modelMatrix:new x,primitiveType:B.mode,vertexArray:X,count:j,offset:q,shaderProgram:y[U.program],uniformMap:se,renderState:ne,owner:oe,pass:re?te.TRANSLUCENT:te.OPAQUE})}var ce,he;c||(ce=L.shallowClone(ae),ce.boundingVolume=new e,ce.modelMatrix=new x,p&&(he=L.shallowClone(ie),he.boundingVolume=new e,he.modelMatrix=new x));var pe={show:!0,boundingSphere:k,command:ae,pickCommand:ie,command2D:ce,pickCommand2D:he};r.commands.push(pe),h.push(pe)}}function _t(e,t,n){var r=e._loadResources;if(r.finishedEverythingButTextureCreation()&&r.createRuntimeNodes){r.createRuntimeNodes=!1;for(var o=[],a=e._runtime.nodes,s=e.gltf,l=s.nodes,c=s.scenes[s.scene],h=c.nodes,d=h.length,p=[],m=0;d>m;++m)for(p.push({parentRuntimeNode:void 0,gltfNode:l[h[m]],id:h[m]});p.length>0;){var f=p.pop(),g=f.parentRuntimeNode,v=f.gltfNode,_=a[f.id];if(0===_.parents.length)if(u(v.matrix))_.matrix=x.fromColumnMajorArray(v.matrix);else{var y=v.rotation;_.translation=i.fromArray(v.translation),_.rotation=P.unpack(y),_.scale=i.fromArray(v.scale)}u(g)?(g.children.push(_),_.parents.push(g)):o.push(_),u(v.meshes)&&vt(e,v,_,t,n);for(var C=v.children,w=C.length,E=0;w>E;++E)p.push({parentRuntimeNode:_,gltfNode:l[C[E]],id:C[E]})}e._runtime.rootNodes=o,e._runtime.nodes=a}}function yt(e,t){var i=t.context,n=t.scene3DOnly;if(e._loadRendererResourcesFromCache){var r=e._rendererResources,o=e._cachedRendererResources;r.buffers=o.buffers,r.vertexArrays=o.vertexArrays,r.programs=o.programs,r.pickPrograms=o.pickPrograms,r.textures=o.textures,r.samplers=o.samplers,r.renderStates=o.renderStates,u(e._precreatedAttributes)&&Je(e,i)}else Me(e,i),ze(e,i),Ge(e,i),Ue(e),He(e,i);Xe(e),Ke(e),e._loadRendererResourcesFromCache||(Je(e,i),$e(e,i)),ht(e,i),_t(e,i,n)}function Ct(e,t){var i=e.publicNode,n=i.matrix;i.useMatrix&&u(n)?x.clone(n,t):u(e.matrix)?x.clone(e.matrix,t):(x.fromTranslationQuaternionRotationScale(e.translation,e.rotation,e.scale,t),i.setMatrix(t))}function wt(t,n,r,o){var a=t._maxDirtyNumber,s=t.allowPicking,l=t._runtime.rootNodes,c=l.length,h=Qt,d=t._computedModelMatrix;t._mode!==ie.SCENE3D&&(d=I.basisTo2D(o,d,$t));for(var p=0;c>p;++p){var m=l[p];for(Ct(m,m.transformToRoot),h.push(m);h.length>0;){m=h.pop();var f=m.transformToRoot,g=m.commands;if(m.dirtyNumber===a||n||r){var v=x.multiplyTransformation(d,f,m.computedMatrix),_=g.length;if(_>0)for(var y=0;_>y;++y){var C=g[y],w=C.command;if(x.clone(v,w.modelMatrix),e.transform(C.boundingSphere,w.modelMatrix,w.boundingVolume),u(t._rtcCenter)&&i.add(t._rtcCenter,w.boundingVolume.center,w.boundingVolume.center),s){var E=C.pickCommand;x.clone(w.modelMatrix,E.modelMatrix),e.clone(w.boundingVolume,E.boundingVolume)}if(w=C.command2D,u(w)&&t._mode===ie.SCENE2D&&(x.clone(v,w.modelMatrix),w.modelMatrix[13]-=2*b.sign(w.modelMatrix[13])*b.PI*o.ellipsoid.maximumRadius,e.transform(C.boundingSphere,w.modelMatrix,w.boundingVolume),s)){var S=C.pickCommand2D;x.clone(w.modelMatrix,S.modelMatrix),e.clone(w.boundingVolume,S.boundingVolume)}}}for(var T=m.children,A=T.length,P=0;A>P;++P){var M=T[P];M.dirtyNumber=Math.max(M.dirtyNumber,m.dirtyNumber),(M.dirtyNumber===a||r)&&(Ct(M,M.transformToRoot),x.multiplyTransformation(f,M.transformToRoot,M.transformToRoot)),h.push(M)}}}++t._maxDirtyNumber}function Et(e){for(var t=e._runtime.skinnedNodes,i=t.length,n=0;i>n;++n){var r=t[n];ei=x.inverseTransformation(r.transformToRoot,ei);for(var o=r.computedJointMatrices,a=r.joints,s=r.bindShapeMatrix,l=r.inverseBindMatrices,c=l.length,h=0;c>h;++h)u(o[h])||(o[h]=new x),o[h]=x.multiplyTransformation(ei,a[h].transformToRoot,o[h]),o[h]=x.multiplyTransformation(o[h],l[h],o[h]),u(s)&&(o[h]=x.multiplyTransformation(o[h],s,o[h]))}}function bt(e){for(var t=e._runtime.rootNodes,i=t.length,n=Qt,r=0;i>r;++r){var o=t[r];for(o.computedShow=o.publicNode.show,n.push(o);n.length>0;){o=n.pop();for(var a=o.computedShow,s=o.commands,l=s.length,u=0;l>u;++u)s[u].show=a;for(var c=o.children,h=c.length,d=0;h>d;++d){var p=c[d];p.computedShow=a&&p.publicNode.show,n.push(p)}}}}function St(e,t){var i=e.id;if(e._id!==i){e._id=i;for(var n=e._pickIds,r=n.length,o=0;r>o;++o)n[o].object.id=i}}function Tt(e){if(e._debugWireframe!==e.debugWireframe){e._debugWireframe=e.debugWireframe;for(var t=e.debugWireframe?A.LINES:A.TRIANGLES,i=e._nodeCommands,n=i.length,r=0;n>r;++r)i[r].command.primitiveType=t}}function xt(e){if(e.debugShowBoundingVolume!==e._debugShowBoundingVolume){e._debugShowBoundingVolume=e.debugShowBoundingVolume;for(var t=e.debugShowBoundingVolume,i=e._nodeCommands,n=i.length,r=0;n>r;++r)i[r].command.debugShowBoundingVolume=t}}function At(e){if(e.castShadows!==e._castShadows||e.receiveShadows!==e._receiveShadows){e._castShadows=e.castShadows,e._receiveShadows=e.receiveShadows;for(var t=e.castShadows,i=e.receiveShadows,n=e._nodeCommands,r=n.length,o=0;r>o;o++){var a=n[o];a.command.castShadows=t,a.command.receiveShadows=i}}}function Pt(e,t,i){return ti.center=e,ti.radius=t,i.camera.getPixelSize(ti,i.context.drawingBufferWidth,i.context.drawingBufferHeight)}function Mt(e,t){var n=e.scale;if(0!==e.minimumPixelSize){var r=t.context,o=Math.max(r.drawingBufferWidth,r.drawingBufferHeight),a=u(e._clampedModelMatrix)?e._clampedModelMatrix:e.modelMatrix;if(ii.x=a[12],ii.y=a[13],ii.z=a[14],u(e._rtcCenter)&&i.add(e._rtcCenter,ii,ii),e._mode!==ie.SCENE3D){var s=t.mapProjection,l=s.ellipsoid.cartesianToCartographic(ii,ni);s.project(l,ii),i.fromElements(ii.z,ii.x,ii.y,ii)}var c=e.boundingSphere.radius,h=Pt(ii,c,t),d=1/h,p=Math.min(d*(2*c),o);pn;++n){var r=t[n];if("CESIUM_RTC"!==r&&"KHR_binary_glTF"!==r&&"KHR_materials_common"!==r&&"WEB3D_quantized_attributes"!==r)throw new D("Unsupported glTF Extension: "+r)}}function Rt(e,t){this.buffers=void 0,this.vertexArrays=void 0,this.programs=void 0,this.pickPrograms=void 0,this.textures=void 0,this.samplers=void 0,this.renderStates=void 0,this.ready=!1,this.context=e,this.cacheKey=t,this.count=0}function Ot(e){for(var t in e)e.hasOwnProperty(t)&&e[t].destroy()}function Lt(e){Ot(e.buffers),Ot(e.vertexArrays),Ot(e.programs),Ot(e.pickPrograms),Ot(e.textures)}function Nt(e,t,i){return function(n){if(e.heightReference===X.RELATIVE_TO_GROUND){var r=t.cartesianToCartographic(n,ni);r.height+=i.height,t.cartographicToCartesian(r,n)}var o=e._clampedModelMatrix;x.clone(e.modelMatrix,o),o[12]=n.x,o[13]=n.y,o[14]=n.z,e._heightChanged=!0}}function Ft(e){u(e._removeUpdateHeightCallback)&&(e._removeUpdateHeightCallback(),e._removeUpdateHeightCallback=void 0);var t=e._scene;if(!u(t)||e.heightReference===X.NONE)return void(e._clampedModelMatrix=void 0);var i=t.globe,n=i.ellipsoid,o=e.modelMatrix;ii.x=o[12],ii.y=o[13],ii.z=o[14];var a=n.cartesianToCartographic(ii);u(e._clampedModelMatrix)||(e._clampedModelMatrix=x.clone(o,new x));var s=i._surface;e._removeUpdateHeightCallback=s.updateHeight(a,Nt(e,n,a));var l=i.getHeight(a);if(u(l)){var c=Nt(e,n,a);r.clone(a,ni),ni.height=l,n.cartographicToCartesian(ni,ii),c(ii)}}if(!p.supportsTypedArrays())return{};var kt=x.fromRotationTranslation(T.fromRotationX(b.PI_OVER_TWO)),Bt=new i,zt={NEEDS_LOAD:0,LOADING:1,LOADED:2,FAILED:3},Vt="model/vnd.gltf.binary,model/vnd.gltf+json,model/gltf.binary,model/gltf+json;q=0.8,application/json;q=0.2,*/*;q=0.01";ne.prototype.getBuffer=function(e){return le(this.buffers[e.buffer],e.byteOffset,e.byteLength)},ne.prototype.finishedPendingBufferLoads=function(){return 0===this.pendingBufferLoads},ne.prototype.finishedBuffersCreation=function(){return 0===this.pendingBufferLoads&&0===this.buffersToCreate.length},ne.prototype.finishedProgramCreation=function(){return 0===this.pendingShaderLoads&&0===this.programsToCreate.length},ne.prototype.finishedTextureCreation=function(){var e=0===this.pendingTextureLoads,t=0===this.texturesToCreate.length&&0===this.texturesToCreateFromBufferView.length;return e&&t},ne.prototype.finishedEverythingButTextureCreation=function(){var e=0===this.pendingBufferLoads&&0===this.pendingShaderLoads,t=0===this.buffersToCreate.length&&0===this.programsToCreate.length&&0===this.pendingBufferViewToImage;return e&&t},ne.prototype.finished=function(){return this.finishedTextureCreation()&&this.finishedEverythingButTextureCreation()},c(oe.prototype,{gltf:{set:function(e){this._gltf=Q(H(e))},get:function(){return this._gltf}},bgltf:{get:function(){return this._bgltf}}}),oe.prototype.makeReady=function(e,t){this.gltf=e,this._bgltf=t;for(var i=this.modelsToLoad,n=i.length,r=0;n>r;++r){var o=i[r];o.isDestroyed()||re(o,this)}this.modelsToLoad=void 0,this.ready=!0};var Ut={};c(se.prototype,{gltf:{get:function(){return u(this._cachedGltf)?this._cachedGltf.gltf:void 0}},releaseGltfJson:{get:function(){return this._releaseGltfJson}},cacheKey:{get:function(){return this._cacheKey}},basePath:{get:function(){return this._basePath}},boundingSphere:{get:function(){var e=this.modelMatrix;this.heightReference!==X.NONE&&this._clampedModelMatrix&&(e=this._clampedModelMatrix);var t=x.getScale(e,Bt),n=u(this.maximumScale)?Math.min(this.maximumScale,this.scale):this.scale;i.multiplyByScalar(t,n,t);var r=this._scaledBoundingSphere;return r.center=i.multiplyComponents(this._boundingSphere.center,t,r.center),r.radius=i.maximumComponent(t)*this._initialRadius,u(this._rtcCenter)&&i.add(this._rtcCenter,r.center,r.center),r}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},asynchronous:{get:function(){return this._asynchronous}},allowPicking:{get:function(){return this._allowPicking}},incrementallyLoadTextures:{get:function(){return this._incrementallyLoadTextures}},pendingTextureLoads:{get:function(){return u(this._loadResources)?this._loadResources.pendingTextureLoads:0}},dirty:{get:function(){return this._dirty}}});var Gt=Uint32Array.BYTES_PER_ELEMENT;se.fromGltf=function(e){var t=e.url,i=l(e.cacheKey,m(t));e=o(e),e.basePath=f(t),e.cacheKey=i;var n=new se(e);e.headers=u(e.headers)?o(e.headers):{},u(e.headers.Accept)||(e.headers.Accept=Vt);var r=Ut[i];return u(r)?r.ready||(++r.count,r.modelsToLoad.push(n)):(r=new oe({ready:!1}),r.count=1,r.modelsToLoad.push(n),re(n,r),Ut[i]=r,y(t,e.headers).then(function(e){var t=new Uint8Array(e);if(ue(t)){var i=ce(t);0!==i.binaryOffset&&(t=t.subarray(i.binaryOffset)),r.makeReady(i.glTF,t)}else{var n=v(t);r.makeReady(JSON.parse(n))}}).otherwise(me(n,"model",t))),n},se._gltfCache=Ut,se.prototype.getNode=function(e){var t=he(this,"nodesByName",e);return u(t)?t.publicNode:void 0},se.prototype.getMesh=function(e){return he(this,"meshesByName",e)},se.prototype.getMaterial=function(e){return he(this,"materialsByName",e)};var Wt=new i,Ht=new i,qt=new i,jt=new P,Yt=new i,Xt=new i,Zt={MODEL:function(e,t){return function(){return e.model}},VIEW:function(e,t){return function(){return e.view}},PROJECTION:function(e,t){return function(){return e.projection}},MODELVIEW:function(e,t){return function(){return e.modelView}},CESIUM_RTC_MODELVIEW:function(e,t){var n=new x;return function(){return x.getTranslation(e.model,Xt),i.add(Xt,t._rtcCenter,Xt),x.multiplyByPoint(e.view,Xt,Xt),x.setTranslation(e.modelView,Xt,n)}},MODELVIEWPROJECTION:function(e,t){return function(){return e.modelViewProjection}},MODELINVERSE:function(e,t){return function(){return e.inverseModel}},VIEWINVERSE:function(e,t){return function(){return e.inverseView}},PROJECTIONINVERSE:function(e,t){return function(){return e.inverseProjection}},MODELVIEWINVERSE:function(e,t){return function(){return e.inverseModelView}},MODELVIEWPROJECTIONINVERSE:function(e,t){return function(){return e.inverseModelViewProjection}},MODELINVERSETRANSPOSE:function(e,t){return function(){return e.inverseTranposeModel}},MODELVIEWINVERSETRANSPOSE:function(e,t){return function(){return e.normal}},VIEWPORT:function(e,t){return function(){return e.viewportCartesian4}}};c(lt.prototype,{value:{get:function(){if(!u(this._value)){var e=this._model._rendererResources.textures[this._textureId];if(!u(e))return this._model._defaultTexture;this._value=e}return this._value},set:function(e){this._value=e}}}),lt.prototype.clone=function(e,t){return e},lt.prototype.func=void 0;var Kt={};Kt[W.FLOAT]=tt,Kt[W.FLOAT_VEC2]=it,Kt[W.FLOAT_VEC3]=nt,Kt[W.FLOAT_VEC4]=rt,Kt[W.INT]=tt,Kt[W.INT_VEC2]=it,Kt[W.INT_VEC3]=nt,Kt[W.INT_VEC4]=rt,Kt[W.BOOL]=tt,Kt[W.BOOL_VEC2]=it,Kt[W.BOOL_VEC3]=nt,Kt[W.BOOL_VEC4]=rt,Kt[W.FLOAT_MAT2]=ot,Kt[W.FLOAT_MAT3]=at,Kt[W.FLOAT_MAT4]=st,Kt[W.SAMPLER_2D]=ut;var Jt={MODEL:function(e,t,i){return function(){return i.computedMatrix}},VIEW:function(e,t,i){return function(){return e.view}},PROJECTION:function(e,t,i){return function(){return e.projection}},MODELVIEW:function(e,t,i){var n=new x;return function(){return x.multiplyTransformation(e.view,i.computedMatrix,n)}},CESIUM_RTC_MODELVIEW:function(e,t,i){var n=new x;return function(){return x.multiplyTransformation(e.view,i.computedMatrix,n),x.setTranslation(n,t._rtcCenterEye,n)}},MODELVIEWPROJECTION:function(e,t,i){var n=new x;return function(){return x.multiplyTransformation(e.view,i.computedMatrix,n),x.multiply(e._projection,n,n)}},MODELINVERSE:function(e,t,i){var n=new x;return function(){return x.inverse(i.computedMatrix,n)}},VIEWINVERSE:function(e,t){return function(){return e.inverseView}},PROJECTIONINVERSE:function(e,t,i){return function(){return e.inverseProjection}},MODELVIEWINVERSE:function(e,t,i){var n=new x,r=new x;return function(){return x.multiplyTransformation(e.view,i.computedMatrix,n),x.inverse(n,r)}},MODELVIEWPROJECTIONINVERSE:function(e,t,i){var n=new x,r=new x;return function(){return x.multiplyTransformation(e.view,i.computedMatrix,n),x.multiply(e._projection,n,n),x.inverse(n,r)}},MODELINVERSETRANSPOSE:function(e,t,i){var n=new x,r=new T;return function(){return x.inverse(i.computedMatrix,n),x.getRotation(n,r),T.transpose(r,r)}},MODELVIEWINVERSETRANSPOSE:function(e,t,i){var n=new x,r=new x,o=new T;return function(){return x.multiplyTransformation(e.view,i.computedMatrix,n),x.inverse(n,r),x.getRotation(r,o),T.transpose(o,o)}},VIEWPORT:function(e,t,i){return function(){return e.viewportCartesian4}}},Qt=[],$t=new x,ei=new x,ti=new e,ii=new i,ni=new r;return Rt.prototype.release=function(){return 0===--this.count?(u(this.cacheKey)&&delete this.context.cache.modelRendererResourceCache[this.cacheKey],Lt(this),h(this)):void 0},se.prototype.update=function(e){if(e.mode!==ie.MORPHING){var t=e.context;if(this._defaultTexture=t.defaultTexture,this._state===zt.NEEDS_LOAD&&u(this.gltf)){var n,r=this.cacheKey;if(u(r)){t.cache.modelRendererResourceCache=l(t.cache.modelRendererResourceCache,{});var o=t.cache.modelRendererResourceCache;if(n=o[this.cacheKey],u(n)){if(!n.ready)return;++n.count,this._loadRendererResourcesFromCache=!0}else n=new Rt(t,r),n.count=1,o[this.cacheKey]=n;this._cachedRendererResources=n}else n=new Rt(t),n.count=1,this._cachedRendererResources=n;if(this._state=zt.LOADING,this._boundingSphere=pe(this.gltf),this._initialRadius=this._boundingSphere.radius,It(this),this._state!==zt.FAILED){var a=this.gltf.extensions;u(a)&&u(a.CESIUM_RTC)&&(this._rtcCenter=i.fromArray(a.CESIUM_RTC.center),this._rtcCenterEye=new i),this._loadResources=new ne,Ae(this)}}var s=this._loadResources,c=this._incrementallyLoadTextures,h=!1;if(this._state===zt.LOADING&&(yt(this,e),(s.finished()||c&&s.finishedEverythingButTextureCreation())&&(this._state=zt.LOADED,h=!0)),u(s)&&this._state===zt.LOADED&&(c&&!h&&yt(this,e),s.finished())){this._loadResources=void 0;var d=this._rendererResources,p=this._cachedRendererResources;p.buffers=d.buffers,p.vertexArrays=d.vertexArrays,p.programs=d.programs,p.pickPrograms=d.pickPrograms,p.textures=d.textures,p.samplers=d.samplers,p.renderStates=d.renderStates,p.ready=!0,u(this._precreatedAttributes)&&(p.vertexArrays={}),this.releaseGltfJson&&Dt(this)}var m=this.show&&0!==this.scale;if(m&&this._state===zt.LOADED||h){var f=this.activeAnimations.update(e)||this._cesiumAnimationsDirty;this._cesiumAnimationsDirty=!1,this._dirty=!1;var g=this.modelMatrix,v=e.mode!==this._mode;this._mode=e.mode;var _=!x.equals(this._modelMatrix,g)||this._scale!==this.scale||this._minimumPixelSize!==this.minimumPixelSize||0!==this.minimumPixelSize||this._maximumScale!==this.maximumScale||this._heightReference!==this.heightReference||this._heightChanged||v;if(_||h){x.clone(g,this._modelMatrix),Ft(this),u(this._clampedModelMatrix)&&(g=this._clampedModelMatrix),this._scale=this.scale,this._minimumPixelSize=this.minimumPixelSize,this._maximumScale=this.maximumScale,this._heightReference=this.heightReference,this._heightChanged=!1;var y=Mt(this,e),C=this._computedModelMatrix;x.multiplyByUniformScale(g,y,C),x.multiplyTransformation(C,kt,C)}(f||_||h)&&(wt(this,_,h,e.mapProjection),this._dirty=!0,(f||h)&&Et(this)),this._perNodeShowDirty&&(this._perNodeShowDirty=!1,bt(this)),St(this,t),Tt(this),xt(this),At(this)}if(h){var w=this;return void e.afterRender.push(function(){w._ready=!0,w._readyPromise.resolve(w)})}if(m&&!this._ignoreCommands){var E,S,T,A=e.commandList,P=e.passes,M=this._nodeCommands,D=M.length,I=e.mapProjection.ellipsoid.maximumRadius*b.PI;if(P.render)for(E=0;D>E;++E)if(S=M[E],S.show){var R=S.command;A.push(R),T=R.boundingVolume,e.mode===ie.SCENE2D&&(T.center.y+T.radius>I||T.center.y-T.radiusE;++E)if(S=M[E],S.show){var O=S.pickCommand;A.push(O),T=O.boundingVolume,e.mode===ie.SCENE2D&&(T.center.y+T.radius>I||T.center.y-T.radiusi;++i)e[i].destroy();return Dt(this),h(this)},se}),define("Cesium/DataSources/ModelVisualizer",["../Core/AssociativeArray","../Core/BoundingSphere","../Core/defined","../Core/destroyObject","../Core/DeveloperError","../Core/Matrix4","../Scene/HeightReference","../Scene/Model","../Scene/ModelAnimationLoop","./BoundingSphereState","./Property"],function(e,t,i,n,r,o,a,s,l,u,c){"use strict";function h(t,i){i.collectionChanged.addEventListener(h.prototype._onCollectionChanged,this),this._scene=t,this._primitives=t.primitives,this._entityCollection=i,this._modelHash={},this._entitiesToVisualize=new e,this._onCollectionChanged(i,i.values,[],[])}function d(e,t,n,r){var o=n[t.id];i(o)&&(r.removeAndDestroy(o.modelPrimitive),delete n[t.id])}function p(e,t){var n=t[e.id];i(n)&&(n.nodeTransformationsScratch={})}function m(e){console.error(e)}var f=1,g=0,v=!0,_=a.NONE,y=!0,C=!0,w=new o,E=new o;return h.prototype.update=function(e){for(var t=this._entitiesToVisualize.values,n=this._modelHash,r=this._primitives,a=0,u=t.length;u>a;a++){var h,d,p=t[a],b=p._model,S=n[p.id],T=p.isShowing&&p.isAvailable(e)&&c.getValueOrDefault(b._show,e,!0);if(T&&(d=p._getModelMatrix(e,w),h=c.getValueOrUndefined(b._uri,e),T=i(d)&&i(h)),T){var x=i(S)?S.modelPrimitive:void 0;if(i(x)&&h===S.uri||(i(x)&&(r.removeAndDestroy(x),delete n[p.id]),x=s.fromGltf({url:h,incrementallyLoadTextures:c.getValueOrDefault(b._incrementallyLoadTextures,e,v),scene:this._scene}),x.readyPromise.otherwise(m),x.id=p,r.add(x),S={modelPrimitive:x,uri:h,animationsRunning:!1,nodeTransformationsScratch:{},originalNodeMatrixHash:{}},n[p.id]=S),x.show=!0,x.scale=c.getValueOrDefault(b._scale,e,f),x.minimumPixelSize=c.getValueOrDefault(b._minimumPixelSize,e,g),x.maximumScale=c.getValueOrUndefined(b._maximumScale,e),x.castShadows=c.getValueOrDefault(b._castShadows,e,y),x.receiveShadows=c.getValueOrDefault(b._receiveShadows,e,C),x.modelMatrix=o.clone(d,x.modelMatrix),x.heightReference=c.getValueOrDefault(b._heightReference,e,_),x.ready){var A=c.getValueOrDefault(b._runAnimations,e,!0);S.animationsRunning!==A&&(A?x.activeAnimations.addAll({loop:l.REPEAT}):x.activeAnimations.removeAll(),S.animationsRunning=A);var P=c.getValueOrUndefined(b._nodeTransformations,e,S.nodeTransformationsScratch);if(i(P))for(var M=S.originalNodeMatrixHash,D=Object.keys(P),I=0,R=D.length;R>I;++I){var O=D[I],L=P[O];if(i(L)){var N=x.getNode(O);if(i(N)){var F=M[O];i(F)||(F=N.matrix.clone(),M[O]=F);var k=o.fromTranslationRotationScale(L,E);N.matrix=o.multiply(F,k,k)}}}}}else i(S)&&(S.modelPrimitive.show=!1)}return!0},h.prototype.isDestroyed=function(){return!1},h.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(h.prototype._onCollectionChanged,this);for(var e=this._entitiesToVisualize.values,t=this._modelHash,i=this._primitives,r=e.length-1;r>-1;r--)d(this,e[r],t,i);return n(this)},h.prototype.getBoundingSphere=function(e,n){var r=this._modelHash[e.id];if(!i(r))return u.FAILED;var o=r.modelPrimitive;if(!i(o)||!o.show)return u.FAILED;if(!o.ready)return u.PENDING;if(o.heightReference===a.NONE)t.transform(o.boundingSphere,o.modelMatrix,n);else{if(!i(o._clampedModelMatrix))return u.PENDING;t.transform(o.boundingSphere,o._clampedModelMatrix,n)}return u.DONE},h.prototype._onCollectionChanged=function(e,t,n,r){var o,a,s=this._entitiesToVisualize,l=this._modelHash,u=this._primitives;for(o=t.length-1;o>-1;o--)a=t[o],i(a._model)&&i(a._position)&&s.set(a.id,a);for(o=r.length-1;o>-1;o--)a=r[o],i(a._model)&&i(a._position)?(p(a,l),s.set(a.id,a)):(d(this,a,l,u),s.remove(a.id));for(o=n.length-1;o>-1;o--)a=n[o],d(this,a,l,u),s.remove(a.id)},h}),define("Cesium/Shaders/PolylineCommon",[],function(){"use strict";return"void clipLineSegmentToNearPlane(\n vec3 p0,\n vec3 p1,\n out vec4 positionWC,\n out bool clipped,\n out bool culledByNearPlane)\n{\n culledByNearPlane = false;\n clipped = false;\n \n vec3 p1ToP0 = p1 - p0;\n float magnitude = length(p1ToP0);\n vec3 direction = normalize(p1ToP0);\n float endPoint0Distance = -(czm_currentFrustum.x + p0.z);\n float denominator = -direction.z;\n \n if (endPoint0Distance < 0.0 && abs(denominator) < czm_epsilon7)\n {\n culledByNearPlane = true;\n }\n else if (endPoint0Distance < 0.0 && abs(denominator) > czm_epsilon7)\n {\n // t = (-plane distance - dot(plane normal, ray origin)) / dot(plane normal, ray direction)\n float t = (czm_currentFrustum.x + p0.z) / denominator;\n if (t < 0.0 || t > magnitude)\n {\n culledByNearPlane = true;\n }\n else\n {\n p0 = p0 + t * direction;\n clipped = true;\n }\n }\n \n positionWC = czm_eyeToWindowCoordinates(vec4(p0, 1.0));\n}\n\nvec4 getPolylineWindowCoordinates(vec4 position, vec4 previous, vec4 next, float expandDirection, float width, bool usePrevious) {\n vec4 endPointWC, p0, p1;\n bool culledByNearPlane, clipped;\n \n vec4 positionEC = czm_modelViewRelativeToEye * position;\n vec4 prevEC = czm_modelViewRelativeToEye * previous;\n vec4 nextEC = czm_modelViewRelativeToEye * next;\n \n clipLineSegmentToNearPlane(prevEC.xyz, positionEC.xyz, p0, clipped, culledByNearPlane);\n clipLineSegmentToNearPlane(nextEC.xyz, positionEC.xyz, p1, clipped, culledByNearPlane);\n clipLineSegmentToNearPlane(positionEC.xyz, usePrevious ? prevEC.xyz : nextEC.xyz, endPointWC, clipped, culledByNearPlane);\n \n if (culledByNearPlane)\n {\n return vec4(0.0, 0.0, 0.0, 1.0);\n }\n \n vec2 prevWC = normalize(p0.xy - endPointWC.xy);\n vec2 nextWC = normalize(p1.xy - endPointWC.xy);\n \n float expandWidth = width * 0.5;\n vec2 direction;\n\n if (czm_equalsEpsilon(previous.xyz - position.xyz, vec3(0.0), czm_epsilon1) || czm_equalsEpsilon(prevWC, -nextWC, czm_epsilon1))\n {\n direction = vec2(-nextWC.y, nextWC.x);\n }\n else if (czm_equalsEpsilon(next.xyz - position.xyz, vec3(0.0), czm_epsilon1) || clipped)\n {\n direction = vec2(prevWC.y, -prevWC.x);\n }\n else\n {\n vec2 normal = vec2(-nextWC.y, nextWC.x);\n direction = normalize((nextWC + prevWC) * 0.5);\n if (dot(direction, normal) < 0.0)\n {\n direction = -direction;\n }\n\n // The sine of the angle between the two vectors is given by the formula\n // |a x b| = |a||b|sin(theta)\n // which is\n // float sinAngle = length(cross(vec3(direction, 0.0), vec3(nextWC, 0.0)));\n // Because the z components of both vectors are zero, the x and y coordinate will be zero.\n // Therefore, the sine of the angle is just the z component of the cross product.\n float sinAngle = abs(direction.x * nextWC.y - direction.y * nextWC.x);\n expandWidth = clamp(expandWidth / sinAngle, 0.0, width * 2.0);\n }\n\n vec2 offset = direction * expandDirection * expandWidth * czm_resolutionScale;\n return vec4(endPointWC.xy + offset, -endPointWC.z, 1.0);\n}\n"}),define("Cesium/Shaders/PolylineFS",[],function(){"use strict"; +return"varying vec2 v_st;\n\nvoid main()\n{\n czm_materialInput materialInput;\n \n materialInput.s = v_st.s;\n materialInput.st = v_st;\n materialInput.str = vec3(v_st, 0.0);\n \n czm_material material = czm_getMaterial(materialInput);\n gl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n}"}),define("Cesium/Shaders/PolylineVS",[],function(){"use strict";return"attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 position2DHigh;\nattribute vec3 position2DLow;\nattribute vec3 prevPosition3DHigh;\nattribute vec3 prevPosition3DLow;\nattribute vec3 prevPosition2DHigh;\nattribute vec3 prevPosition2DLow;\nattribute vec3 nextPosition3DHigh;\nattribute vec3 nextPosition3DLow;\nattribute vec3 nextPosition2DHigh;\nattribute vec3 nextPosition2DLow;\nattribute vec4 texCoordExpandWidthAndShow;\nattribute vec4 pickColor;\n\nvarying vec2 v_st;\nvarying float v_width;\nvarying vec4 czm_pickColor;\n\nvoid main() \n{\n float texCoord = texCoordExpandWidthAndShow.x;\n float expandDir = texCoordExpandWidthAndShow.y;\n float width = abs(texCoordExpandWidthAndShow.z) + 0.5;\n bool usePrev = texCoordExpandWidthAndShow.z < 0.0;\n float show = texCoordExpandWidthAndShow.w;\n \n vec4 p, prev, next;\n if (czm_morphTime == 1.0)\n {\n p = czm_translateRelativeToEye(position3DHigh.xyz, position3DLow.xyz);\n prev = czm_translateRelativeToEye(prevPosition3DHigh.xyz, prevPosition3DLow.xyz);\n next = czm_translateRelativeToEye(nextPosition3DHigh.xyz, nextPosition3DLow.xyz);\n }\n else if (czm_morphTime == 0.0)\n {\n p = czm_translateRelativeToEye(position2DHigh.zxy, position2DLow.zxy);\n prev = czm_translateRelativeToEye(prevPosition2DHigh.zxy, prevPosition2DLow.zxy);\n next = czm_translateRelativeToEye(nextPosition2DHigh.zxy, nextPosition2DLow.zxy);\n }\n else\n {\n p = czm_columbusViewMorph(\n czm_translateRelativeToEye(position2DHigh.zxy, position2DLow.zxy),\n czm_translateRelativeToEye(position3DHigh.xyz, position3DLow.xyz),\n czm_morphTime);\n prev = czm_columbusViewMorph(\n czm_translateRelativeToEye(prevPosition2DHigh.zxy, prevPosition2DLow.zxy),\n czm_translateRelativeToEye(prevPosition3DHigh.xyz, prevPosition3DLow.xyz),\n czm_morphTime);\n next = czm_columbusViewMorph(\n czm_translateRelativeToEye(nextPosition2DHigh.zxy, nextPosition2DLow.zxy),\n czm_translateRelativeToEye(nextPosition3DHigh.xyz, nextPosition3DLow.xyz),\n czm_morphTime);\n }\n \n vec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev);\n gl_Position = czm_viewportOrthographic * positionWC * show;\n \n v_st = vec2(texCoord, clamp(expandDir, 0.0, 1.0));\n v_width = width;\n czm_pickColor = pickColor;\n}\n"}),define("Cesium/Scene/Polyline",["../Core/arrayRemoveDuplicates","../Core/BoundingSphere","../Core/Cartesian3","../Core/Color","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Matrix4","../Core/PolylinePipeline","./Material"],function(e,t,i,n,r,o,a,s,l,u,c){"use strict";function h(a,s){a=r(a,r.EMPTY_OBJECT),this._show=r(a.show,!0),this._width=r(a.width,1),this._loop=r(a.loop,!1),this._material=a.material,o(this._material)||(this._material=c.fromType(c.ColorType,{color:new n(1,1,1,1)}));var h=a.positions;o(h)||(h=[]),this._positions=h,this._actualPositions=e(h,i.equalsEpsilon),this._loop&&this._actualPositions.length>2&&(this._actualPositions===this._positions&&(this._actualPositions=h.slice()),this._actualPositions.push(i.clone(this._actualPositions[0]))),this._length=this._actualPositions.length,this._id=a.id;var d;o(s)&&(d=l.clone(s.modelMatrix)),this._modelMatrix=d,this._segments=u.wrapLongitude(this._actualPositions,d),this._actualLength=void 0,this._propertiesChanged=new Uint32Array(_),this._polylineCollection=s,this._dirty=!1,this._pickId=void 0,this._boundingVolume=t.fromPoints(this._actualPositions),this._boundingVolumeWC=t.transform(this._boundingVolume,this._modelMatrix),this._boundingVolume2D=new t}function d(e,t){++e._propertiesChanged[t];var i=e._polylineCollection;o(i)&&(i._updatePolyline(e,t),e._dirty=!0)}var p=h.SHOW_INDEX=0,m=h.WIDTH_INDEX=1,f=h.POSITION_INDEX=2,g=h.MATERIAL_INDEX=3,v=h.POSITION_SIZE_INDEX=4,_=h.NUMBER_OF_PROPERTIES=5;return a(h.prototype,{show:{get:function(){return this._show},set:function(e){e!==this._show&&(this._show=e,d(this,p))}},positions:{get:function(){return this._positions},set:function(n){var r=e(n,i.equalsEpsilon);this._loop&&r.length>2&&(r===n&&(r=n.slice()),r.push(i.clone(r[0]))),(this._actualPositions.length!==r.length||this._actualPositions.length!==this._length)&&d(this,v),this._positions=n,this._actualPositions=r,this._length=r.length,this._boundingVolume=t.fromPoints(this._actualPositions,this._boundingVolume),this._boundingVolumeWC=t.transform(this._boundingVolume,this._modelMatrix,this._boundingVolumeWC),d(this,f),this.update()}},material:{get:function(){return this._material},set:function(e){this._material!==e&&(this._material=e,d(this,g))}},width:{get:function(){return this._width},set:function(e){var t=this._width;e!==t&&(this._width=e,d(this,m))}},loop:{get:function(){return this._loop},set:function(e){if(e!==this._loop){var t=this._actualPositions;e?t.length>2&&!i.equals(t[0],t[t.length-1])&&(t.length===this._positions.length&&(this._actualPositions=t=this._positions.slice()),t.push(i.clone(t[0]))):t.length>2&&i.equals(t[0],t[t.length-1])&&(t.length-1===this._positions.length?this._actualPositions=this._positions:t.pop()),this._loop=e,d(this,v)}}},id:{get:function(){return this._id},set:function(e){this._id=e,o(this._pickId)&&(this._pickId.object.id=e)}}}),h.prototype.update=function(){var e=l.IDENTITY;o(this._polylineCollection)&&(e=this._polylineCollection.modelMatrix);var i=this._segments.positions.length,n=this._segments.lengths,r=this._propertiesChanged[f]>0||this._propertiesChanged[v]>0;if((!l.equals(e,this._modelMatrix)||r)&&(this._segments=u.wrapLongitude(this._actualPositions,e),this._boundingVolumeWC=t.transform(this._boundingVolume,e,this._boundingVolumeWC)),this._modelMatrix=e,this._segments.positions.length!==i)d(this,v);else for(var a=n.length,s=0;a>s;++s)if(n[s]!==this._segments.lengths[s]){d(this,v);break}},h.prototype.getPickId=function(e){return o(this._pickId)||(this._pickId=e.createPickId({primitive:this,collection:this._polylineCollection,id:this._id})),this._pickId},h.prototype._clean=function(){this._dirty=!1;for(var e=this._propertiesChanged,t=0;_-1>t;++t)e[t]=0},h.prototype._destroy=function(){this._pickId=this._pickId&&this._pickId.destroy(),this._material=this._material&&this._material.destroy(),this._polylineCollection=void 0},h}),define("Cesium/Scene/PolylineCollection",["../Core/BoundingSphere","../Core/Cartesian3","../Core/Cartesian4","../Core/Cartographic","../Core/Color","../Core/ComponentDatatype","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/destroyObject","../Core/DeveloperError","../Core/EncodedCartesian3","../Core/IndexDatatype","../Core/Intersect","../Core/Math","../Core/Matrix4","../Core/Plane","../Renderer/Buffer","../Renderer/BufferUsage","../Renderer/DrawCommand","../Renderer/RenderState","../Renderer/ShaderProgram","../Renderer/ShaderSource","../Renderer/VertexArray","../Shaders/PolylineCommon","../Shaders/PolylineFS","../Shaders/PolylineVS","./BlendingState","./Material","./Pass","./Polyline","./SceneMode"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g,v,_,y,C,w,E,b,S,T,x,A,P,M,D,I){"use strict";function R(e){e=a(e,a.EMPTY_OBJECT),this.modelMatrix=f.clone(a(e.modelMatrix,f.IDENTITY)),this._modelMatrix=f.clone(f.IDENTITY),this.debugShowBoundingVolume=a(e.debugShowBoundingVolume,!1),this._opaqueRS=void 0,this._translucentRS=void 0,this._colorCommands=[],this._pickCommands=[],this._polylinesUpdated=!1,this._polylinesRemoved=!1,this._createVertexArray=!1,this._propertiesChanged=new Uint32Array(J),this._polylines=[],this._polylineBuckets={},this._buffersUsage=[{bufferUsage:_.STATIC_DRAW,frameCount:0},{bufferUsage:_.STATIC_DRAW,frameCount:0},{bufferUsage:_.STATIC_DRAW,frameCount:0}],this._mode=void 0,this._polylinesToUpdate=[],this._vertexArrays=[],this._positionBuffer=void 0,this._pickColorBuffer=void 0,this._texCoordExpandWidthAndShowBuffer=void 0}function O(t,i,n,r,o){for(var a=i.context,l=i.commandList,u=n.length,c=0,h=!0,d=t._vertexArrays,p=t.debugShowBoundingVolume,m=d.length,f=0;m>f;++f)for(var g=d[f],v=g.buckets,_=v.length,C=0;_>C;++C){for(var w,E,b,S=v[C],T=S.offset,x=o?S.bucket.shaderProgram:S.bucket.pickShaderProgram,A=S.bucket.polylines,P=A.length,D=0,R=0;P>R;++R){var O=A[R],L=F(O._material);if(L!==w){if(s(w)&&D>0){var N=E.isTranslucent();c>=u?(b=new y({owner:t}),n.push(b)):b=n[c],++c,b.boundingVolume=e.clone($,b.boundingVolume),b.modelMatrix=r,b.shaderProgram=x,b.vertexArray=g.va,b.renderState=N?t._translucentRS:t._opaqueRS,b.pass=N?M.TRANSLUCENT:M.OPAQUE,b.debugShowBoundingVolume=o?p:!1,b.uniformMap=E._uniforms,b.count=D,b.offset=T,T+=D,D=0,h=!0,l.push(b)}E=O._material,E.update(a),w=L}for(var k=O._locatorBuckets,B=k.length,z=0;B>z;++z){var V=k[z];V.locator===S&&(D+=V.count)}var U;i.mode===I.SCENE3D?U=O._boundingVolumeWC:i.mode===I.COLUMBUS_VIEW?U=O._boundingVolume2D:i.mode===I.SCENE2D?s(O._boundingVolume2D)&&(U=e.clone(O._boundingVolume2D,ee),U.center.x=0):s(O._boundingVolumeWC)&&s(O._boundingVolume2D)&&(U=e.union(O._boundingVolumeWC,O._boundingVolume2D,ee)),h?(h=!1,e.clone(U,$)):e.union(U,$,$)}s(w)&&D>0&&(c>=u?(b=new y({owner:t}),n.push(b)):b=n[c],++c,b.boundingVolume=e.clone($,b.boundingVolume),b.modelMatrix=r,b.shaderProgram=x,b.vertexArray=g.va,b.renderState=E.isTranslucent()?t._translucentRS:t._opaqueRS,b.pass=E.isTranslucent()?M.TRANSLUCENT:M.OPAQUE,b.debugShowBoundingVolume=o?p:!1,b.uniformMap=E._uniforms,b.count=D,b.offset=T,h=!0,l.push(b)),w=void 0}n.length=c}function L(e){for(var t=e._buffersUsage,i=!1,n=e._propertiesChanged,r=0;J-2>r;++r){var o=t[r];n[r]?o.bufferUsage!==_.STREAM_DRAW?(i=!0,o.bufferUsage=_.STREAM_DRAW,o.frameCount=100):o.frameCount=100:o.bufferUsage!==_.STATIC_DRAW&&(0===o.frameCount?(i=!0,o.bufferUsage=_.STATIC_DRAW):o.frameCount--)}return i}function N(e,t,i){e._createVertexArray=!1,V(e),U(e),k(e);var n,r,a=[[]],l=a[0],u=[0],c=0,h=[[]],p=0,f=e._polylineBuckets;for(n in f)f.hasOwnProperty(n)&&(r=f[n],r.updateShader(t),p+=r.lengthOfPositions);if(p>0){var g,y=e._mode,C=new Float32Array(6*p*3),w=new Uint8Array(4*p),E=new Float32Array(4*p),S=0,T=0,x=0;for(n in f)if(f.hasOwnProperty(n)){r=f[n],r.write(C,w,E,S,T,x,t,i),y===I.MORPHING&&(s(g)||(g=new Float32Array(6*p*3)),r.writeForMorph(g,S));var A=r.lengthOfPositions;S+=6*A*3,T+=4*A,x+=4*A,c=r.updateIndices(a,u,h,c)}var P=e._buffersUsage[X].bufferUsage,M=e._buffersUsage[j].bufferUsage,D=e._buffersUsage[Y].bufferUsage,R=M===_.STREAM_DRAW||D===_.STREAM_DRAW?_.STREAM_DRAW:_.STATIC_DRAW;e._positionBuffer=v.createVertexBuffer({context:t,typedArray:C,usage:P});var O;s(g)&&(O=v.createVertexBuffer({context:t,typedArray:g,usage:P})),e._pickColorBuffer=v.createVertexBuffer({context:t,typedArray:w,usage:_.STATIC_DRAW}),e._texCoordExpandWidthAndShowBuffer=v.createVertexBuffer({context:t,typedArray:E,usage:R});for(var L=4*Uint8Array.BYTES_PER_ELEMENT,N=3*Float32Array.BYTES_PER_ELEMENT,F=4*Float32Array.BYTES_PER_ELEMENT,B=0,z=a.length,G=0;z>G;++G)if(l=a[G],l.length>0){var W=new Uint16Array(l),H=v.createIndexBuffer({context:t,typedArray:W,usage:_.STATIC_DRAW,indexDatatype:d.UNSIGNED_SHORT});B+=u[G];var q,Z,K,J,$=6*(G*(N*m.SIXTY_FOUR_KILOBYTES)-B*N),ee=N+$,ie=N+ee,ne=N+ie,re=N+ne,oe=N+re,ae=G*(L*m.SIXTY_FOUR_KILOBYTES)-B*L,se=G*(F*m.SIXTY_FOUR_KILOBYTES)-B*F,le=[{index:Q.position3DHigh,componentsPerAttribute:3,componentDatatype:o.FLOAT,offsetInBytes:$,strideInBytes:6*N},{index:Q.position3DLow,componentsPerAttribute:3,componentDatatype:o.FLOAT,offsetInBytes:ee,strideInBytes:6*N},{index:Q.position2DHigh,componentsPerAttribute:3,componentDatatype:o.FLOAT,offsetInBytes:$,strideInBytes:6*N},{index:Q.position2DLow,componentsPerAttribute:3,componentDatatype:o.FLOAT,offsetInBytes:ee,strideInBytes:6*N},{index:Q.prevPosition3DHigh,componentsPerAttribute:3,componentDatatype:o.FLOAT,offsetInBytes:ie,strideInBytes:6*N},{index:Q.prevPosition3DLow,componentsPerAttribute:3,componentDatatype:o.FLOAT,offsetInBytes:ne,strideInBytes:6*N},{index:Q.prevPosition2DHigh,componentsPerAttribute:3,componentDatatype:o.FLOAT,offsetInBytes:ie,strideInBytes:6*N},{index:Q.prevPosition2DLow,componentsPerAttribute:3,componentDatatype:o.FLOAT,offsetInBytes:ne,strideInBytes:6*N},{index:Q.nextPosition3DHigh,componentsPerAttribute:3,componentDatatype:o.FLOAT,offsetInBytes:re,strideInBytes:6*N},{index:Q.nextPosition3DLow,componentsPerAttribute:3,componentDatatype:o.FLOAT,offsetInBytes:oe,strideInBytes:6*N},{index:Q.nextPosition2DHigh,componentsPerAttribute:3,componentDatatype:o.FLOAT,offsetInBytes:re,strideInBytes:6*N},{index:Q.nextPosition2DLow,componentsPerAttribute:3,componentDatatype:o.FLOAT,offsetInBytes:oe,strideInBytes:6*N},{index:Q.texCoordExpandWidthAndShow,componentsPerAttribute:4,componentDatatype:o.FLOAT,vertexBuffer:e._texCoordExpandWidthAndShowBuffer,offsetInBytes:se},{index:Q.pickColor,componentsPerAttribute:4,componentDatatype:o.UNSIGNED_BYTE,vertexBuffer:e._pickColorBuffer,offsetInBytes:ae,normalize:!0}];y===I.SCENE3D?(q=e._positionBuffer,Z="vertexBuffer",K=te,J="value"):y===I.SCENE2D||y===I.COLUMBUS_VIEW?(q=te,Z="value",K=e._positionBuffer,J="vertexBuffer"):(q=O,Z="vertexBuffer",K=e._positionBuffer,J="vertexBuffer"),le[0][Z]=q,le[1][Z]=q,le[2][J]=K,le[3][J]=K,le[4][Z]=q,le[5][Z]=q,le[6][J]=K,le[7][J]=K,le[8][Z]=q,le[9][Z]=q,le[10][J]=K,le[11][J]=K;var ue=new b({context:t,attributes:le,indexBuffer:H});e._vertexArrays.push({va:ue,buckets:h[G]})}}}function F(e){var t=P._uniformList[e.type],i=t.length;ie.length=2*i;for(var n=0,r=0;i>r;++r){var o=t[r];ie[n]=o,ie[n+1]=e._uniforms[o](),n+=2}return e.type+":"+JSON.stringify(ie)}function k(e){for(var t=e._mode,i=e._modelMatrix,n=e._polylineBuckets={},r=e._polylines,o=r.length,a=0;o>a;++a){var l=r[a];if(l._actualPositions.length>1){l.update();var u=l.material,c=n[u.type];s(c)||(c=n[u.type]=new H(u,t,i)),c.addPolyline(l)}}}function B(e,t){var i=t.mode;e._mode===i&&f.equals(e._modelMatrix,e.modelMatrix)||(e._mode=i,e._modelMatrix=f.clone(e.modelMatrix),e._createVertexArray=!0)}function z(e){if(e._polylinesRemoved){e._polylinesRemoved=!1;for(var t=[],i=e._polylines.length,n=0,r=0;i>n;++n){var o=e._polylines[n];s(o)&&(o._index=r++,t.push(o))}e._polylines=t}}function V(e){for(var t=e._polylines,i=t.length,n=0;i>n;++n)if(s(t[n])){var r=t[n]._bucket;s(r)&&(r.shaderProgram=r.shaderProgram&&r.shaderProgram.destroy())}}function U(e){for(var t=e._vertexArrays.length,i=0;t>i;++i)e._vertexArrays[i].va.destroy();e._vertexArrays.length=0}function G(e){for(var t=e._polylines,i=t.length,n=0;i>n;++n)s(t[n])&&t[n]._destroy()}function W(e,t,i){this.count=e,this.offset=t,this.bucket=i}function H(e,t,i){this.polylines=[],this.lengthOfPositions=0,this.material=e,this.shaderProgram=void 0,this.pickShaderProgram=void 0,this.mode=t,this.modelMatrix=i}function q(e){return t.dot(t.UNIT_X,e._boundingVolume.center)<0||e._boundingVolume.intersectPlane(g.ORIGIN_ZX_PLANE)===p.INTERSECTING}var j=D.SHOW_INDEX,Y=D.WIDTH_INDEX,X=D.POSITION_INDEX,Z=D.MATERIAL_INDEX,K=D.POSITION_SIZE_INDEX,J=D.NUMBER_OF_PROPERTIES,Q={texCoordExpandWidthAndShow:0,position3DHigh:1,position3DLow:2,position2DHigh:3,position2DLow:4,prevPosition3DHigh:5,prevPosition3DLow:6,prevPosition2DHigh:7,prevPosition2DLow:8,nextPosition3DHigh:9,nextPosition3DLow:10,nextPosition2DHigh:11,nextPosition2DLow:12,pickColor:13};l(R.prototype,{length:{get:function(){return z(this),this._polylines.length}}}),R.prototype.add=function(e){var t=new D(e,this);return t._index=this._polylines.length,this._polylines.push(t),this._createVertexArray=!0,t},R.prototype.remove=function(e){if(this.contains(e)){if(this._polylines[e._index]=void 0,this._polylinesRemoved=!0,this._createVertexArray=!0,s(e._bucket)){var t=e._bucket;t.shaderProgram=t.shaderProgram&&t.shaderProgram.destroy(),t.pickShaderProgram=t.pickShaderProgram&&t.pickShaderProgram.destroy()}return e._destroy(),!0}return!1},R.prototype.removeAll=function(){V(this),G(this),this._polylineBuckets={},this._polylinesRemoved=!1,this._polylines.length=0,this._polylinesToUpdate.length=0,this._createVertexArray=!0},R.prototype.contains=function(e){return s(e)&&e._polylineCollection===this},R.prototype.get=function(e){return z(this),this._polylines[e]},R.prototype.update=function(e,t){if(z(this),0!==this._polylines.length){B(this,e);var i,n=e.context,r=e.mapProjection,o=this._propertiesChanged;if(this._createVertexArray||L(this))N(this,n,r);else if(this._polylinesUpdated){var a=this._polylinesToUpdate;if(this._mode!==I.SCENE3D)for(var l=a.length,u=0;l>u;++u)i=a[u],i.update();if(o[K]||o[Z])N(this,n,r);else for(var c=a.length,h=this._polylineBuckets,d=0;c>d;++d){i=a[d],o=i._propertiesChanged;var p=i._bucket,m=0;for(var g in h)if(h.hasOwnProperty(g)){if(h[g]===p){(o[X]||o[j]||o[Y])&&p.writeUpdate(m,i,this._positionBuffer,this._texCoordExpandWidthAndShowBuffer,r);break}m+=h[g].lengthOfPositions}i._clean()}a.length=0,this._polylinesUpdated=!1}o=this._propertiesChanged;for(var v=0;J>v;++v)o[v]=0;var _=f.IDENTITY;e.mode===I.SCENE3D&&(_=this.modelMatrix);var y=e.passes,w=0!==e.morphTime;if(s(this._opaqueRS)&&this._opaqueRS.depthTest.enabled===w||(this._opaqueRS=C.fromCache({depthMask:w,depthTest:{enabled:w}})),s(this._translucentRS)&&this._translucentRS.depthTest.enabled===w||(this._translucentRS=C.fromCache({blending:A.ALPHA_BLEND,depthMask:!w,depthTest:{enabled:w}})),y.render){var E=this._colorCommands;O(this,e,E,_,!0)}if(y.pick){var b=this._pickCommands;O(this,e,b,_,!1)}}};var $=new e,ee=new e;R.prototype.isDestroyed=function(){return!1},R.prototype.destroy=function(){return U(this),V(this),G(this),u(this)};var te=[0,0,0],ie=[];R.prototype._updatePolyline=function(e,t){this._polylinesUpdated=!0,this._polylinesToUpdate.push(e),++this._propertiesChanged[t]},H.prototype.addPolyline=function(e){var t=this.polylines;t.push(e),e._actualLength=this.getPolylinePositionsLength(e),this.lengthOfPositions+=e._actualLength,e._bucket=this},H.prototype.updateShader=function(e){if(!s(this.shaderProgram)){var t=new E({sources:[S,x]}),i=new E({sources:[this.material.shaderSource,T]}),n=new E({sources:i.sources,pickColorQualifier:"varying"});this.shaderProgram=w.fromCache({context:e,vertexShaderSource:t,fragmentShaderSource:i,attributeLocations:Q}),this.pickShaderProgram=w.fromCache({context:e,vertexShaderSource:t,fragmentShaderSource:n,attributeLocations:Q})}},H.prototype.getPolylinePositionsLength=function(e){var t;if(this.mode===I.SCENE3D||!q(e))return t=e._actualPositions.length,4*t-4;var i=0,n=e._segments.lengths;t=n.length;for(var r=0;t>r;++r)i+=4*n[r]-4;return i};var ne=new t,re=new t,oe=new t,ae=new t;H.prototype.write=function(e,i,n,o,a,s,l,u){for(var c=this.mode,d=u.ellipsoid.maximumRadius*m.PI,p=this.polylines,f=p.length,g=0;f>g;++g)for(var v,_=p[g],y=_.width,C=_.show&&y>0,w=this.getSegments(_,u),E=w.positions,b=w.lengths,S=E.length,T=_.getPickId(l).color,x=0,A=0,P=0;S>P;++P){0===P?_._loop?v=E[S-2]:(v=ae,t.subtract(E[0],E[1],v),t.add(E[0],v,v)):v=E[P-1],t.clone(v,re),t.clone(E[P],ne),P===S-1?_._loop?v=E[1]:(v=ae,t.subtract(E[S-1],E[S-2],v),t.add(E[S-1],v,v)):v=E[P+1],t.clone(v,oe);var M=b[x];P===A+M&&(A+=M,++x);var D=P-A===0,R=P===A+b[x]-1;c===I.SCENE2D&&(re.z=0,ne.z=0,oe.z=0),(c===I.SCENE2D||c===I.MORPHING)&&(D||R)&&d-Math.abs(ne.x)<1&&((ne.x<0&&re.x>0||ne.x>0&&re.x<0)&&t.clone(ne,re),(ne.x<0&&oe.x>0||ne.x>0&&oe.x<0)&&t.clone(ne,oe));for(var O=D?2:0,L=R?2:4,N=O;L>N;++N){h.writeElements(ne,e,o),h.writeElements(re,e,o+6),h.writeElements(oe,e,o+12),i[a]=r.floatToByte(T.red),i[a+1]=r.floatToByte(T.green),i[a+2]=r.floatToByte(T.blue),i[a+3]=r.floatToByte(T.alpha);var F=0>N-2?-1:1;n[s]=P/(S-1),n[s+1]=2*(N%2)-1,n[s+2]=F*y,n[s+3]=C,o+=18,a+=4,s+=4}}};var se=new t,le=new t,ue=new t,ce=new t;H.prototype.writeForMorph=function(e,i){for(var n=this.modelMatrix,r=this.polylines,o=r.length,a=0;o>a;++a)for(var s=r[a],l=s._segments.positions,u=s._segments.lengths,c=l.length,d=0,p=0,m=0;c>m;++m){var g;0===m?s._loop?g=l[c-2]:(g=ce,t.subtract(l[0],l[1],g),t.add(l[0],g,g)):g=l[m-1],g=f.multiplyByPoint(n,g,le);var v,_=f.multiplyByPoint(n,l[m],se);m===c-1?s._loop?v=l[1]:(v=ce,t.subtract(l[c-1],l[c-2],v),t.add(l[c-1],v,v)):v=l[m+1],v=f.multiplyByPoint(n,v,ue);var y=u[d];m===p+y&&(p+=y,++d);for(var C=m-p===0,w=m===p+u[d]-1,E=C?2:0,b=w?2:4,S=E;b>S;++S)h.writeElements(_,e,i),h.writeElements(g,e,i+6),h.writeElements(v,e,i+12),i+=18}};var he=new Array(1);H.prototype.updateIndices=function(e,t,i,n){var r=i.length-1,o=new W(0,n,this);i[r].push(o);var a=0,s=e[e.length-1],l=0;s.length>0&&(l=s[s.length-1]+1);for(var u=this.polylines,c=u.length,h=0;c>h;++h){var d=u[h];d._locatorBuckets=[];var p;if(this.mode===I.SCENE3D){p=he;var f=d._actualPositions.length;if(!(f>0))continue;p[0]=f}else p=d._segments.lengths;var g=p.length;if(g>0){for(var v=0,_=0;g>_;++_)for(var y=p[_]-1,C=0;y>C;++C)l+4>=m.SIXTY_FOUR_KILOBYTES-2&&(d._locatorBuckets.push({locator:o,count:v}),v=0,t.push(4),s=[],e.push(s),l=0,o.count=a,a=0,n=0,o=new W(0,0,this),i[++r]=[o]),s.push(l,l+2,l+1),s.push(l+1,l+2,l+3),v+=6,a+=6,n+=6,l+=4;d._locatorBuckets.push({locator:o,count:v}),l+4>=m.SIXTY_FOUR_KILOBYTES-2&&(t.push(0),s=[],e.push(s),l=0,o.count=a,n=0,a=0,o=new W(0,0,this),i[++r]=[o])}d._clean()}return o.count=a,n},H.prototype.getPolylineStartIndex=function(e){for(var t=this.polylines,i=0,n=t.length,r=0;n>r;++r){var o=t[r];if(o===e)break;i+=o._actualLength}return i};var de={positions:void 0,lengths:void 0},pe=new Array(1),me=new t,fe=new n;H.prototype.getSegments=function(i,n){var r=i._actualPositions;if(this.mode===I.SCENE3D)return pe[0]=r.length,de.positions=r,de.lengths=pe,de;q(i)&&(r=i._segments.positions);for(var o,a=n.ellipsoid,s=[],l=this.modelMatrix,u=r.length,c=me,h=0;u>h;++h)o=r[h],c=f.multiplyByPoint(l,o,c),s.push(n.project(a.cartesianToCartographic(c,fe)));if(s.length>0){i._boundingVolume2D=e.fromPoints(s,i._boundingVolume2D);var d=i._boundingVolume2D.center;i._boundingVolume2D.center=new t(d.z,d.x,d.y)}return de.positions=s,de.lengths=i._segments.lengths,de};var ge,ve;return H.prototype.writeUpdate=function(e,i,n,r,o){var a=this.mode,l=o.ellipsoid.maximumRadius*m.PI,u=i._actualLength;if(u){e+=this.getPolylineStartIndex(i);var c=ge,d=ve,p=6*u*3;!s(c)||c.lengthp&&(c=new Float32Array(c.buffer,0,p),d=new Float32Array(d.buffer,0,4*u));var f,g=0,v=0,_=this.getSegments(i,o),y=_.positions,C=_.lengths,w=0,E=0,b=i.width,S=i.show&&b>0;u=y.length;for(var T=0;u>T;++T){0===T?i._loop?f=y[u-2]:(f=ae,t.subtract(y[0],y[1],f),t.add(y[0],f,f)):f=y[T-1],t.clone(f,re),t.clone(y[T],ne),T===u-1?i._loop?f=y[1]:(f=ae,t.subtract(y[u-1],y[u-2],f),t.add(y[u-1],f,f)):f=y[T+1],t.clone(f,oe);var x=C[w];T===E+x&&(E+=x,++w);var A=T-E===0,P=T===E+C[w]-1;a===I.SCENE2D&&(re.z=0,ne.z=0,oe.z=0),(a===I.SCENE2D||a===I.MORPHING)&&(A||P)&&l-Math.abs(ne.x)<1&&((ne.x<0&&re.x>0||ne.x>0&&re.x<0)&&t.clone(ne,re),(ne.x<0&&oe.x>0||ne.x>0&&oe.x<0)&&t.clone(ne,oe));for(var M=A?2:0,D=P?2:4,R=M;D>R;++R){h.writeElements(ne,c,g),h.writeElements(re,c,g+6),h.writeElements(oe,c,g+12);var O=0>R-2?-1:1;d[v]=T/(u-1),d[v+1]=2*(R%2)-1,d[v+2]=O*b,d[v+3]=S,g+=18,v+=4}}n.copyFromArrayView(c,18*Float32Array.BYTES_PER_ELEMENT*e),r.copyFromArrayView(d,4*Float32Array.BYTES_PER_ELEMENT*e)}},R}),define("Cesium/DataSources/ScaledPositionProperty",["../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Ellipsoid","../Core/Event","../Core/ReferenceFrame","./Property"],function(e,t,i,n,r,o,a){"use strict";function s(e){this._definitionChanged=new r,this._value=void 0,this._removeSubscription=void 0,this.setValue(e)}return t(s.prototype,{isConstant:{get:function(){return a.isConstant(this._value)}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return e(this._value)?this._value.referenceFrame:o.FIXED}}}),s.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,o.FIXED,t)},s.prototype.setValue=function(t){this._value!==t&&(this._value=t,e(this._removeSubscription)&&(this._removeSubscription(),this._removeSubscription=void 0),e(t)&&(this._removeSubscription=t.definitionChanged.addEventListener(this._raiseDefinitionChanged,this)),this._definitionChanged.raiseEvent(this))},s.prototype.getValueInReferenceFrame=function(t,i,r){return e(this._value)?(r=this._value.getValueInReferenceFrame(t,i,r),e(r)?n.WGS84.scaleToGeodeticSurface(r,r):void 0):void 0},s.prototype.equals=function(e){return this===e||e instanceof s&&this._value===e._value},s.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)},s}),define("Cesium/DataSources/PathVisualizer",["../Core/AssociativeArray","../Core/Cartesian3","../Core/defined","../Core/destroyObject","../Core/DeveloperError","../Core/JulianDate","../Core/Matrix3","../Core/Matrix4","../Core/ReferenceFrame","../Core/TimeInterval","../Core/Transforms","../Scene/PolylineCollection","../Scene/SceneMode","./CompositePositionProperty","./ConstantPositionProperty","./MaterialProperty","./Property","./ReferenceProperty","./SampledPositionProperty","./ScaledPositionProperty","./TimeIntervalCollectionPositionProperty"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g,v,_,y,C){"use strict";function w(e){this.entity=e,this.polyline=void 0,this.index=void 0,this.updater=void 0}function E(e,t,n,r,a,s,l,u,c){var h,d=u;h=e.getValueInReferenceFrame(t,s,c[d]),i(h)&&(c[d++]=h);for(var p,m,f,g=!i(a)||o.lessThanOrEquals(a,t)||o.greaterThanOrEquals(a,n),v=0,_=r.length,y=r[v],C=n,w=!1;_>v;){if(!g&&o.greaterThanOrEquals(y,a)&&(h=e.getValueInReferenceFrame(a,s,c[d]),i(h)&&(c[d++]=h),g=!0),o.greaterThan(y,t)&&o.lessThan(y,C)&&!y.equals(a)&&(h=e.getValueInReferenceFrame(y,s,c[d]),i(h)&&(c[d++]=h)),_-1>v){if(l>0&&!w){var E=r[v+1],b=o.secondsDifference(E,y);w=b>l,w&&(p=Math.ceil(b/l),m=0,f=b/Math.max(p,2),p=Math.max(p-1,1))}if(w&&p>m){y=o.addSeconds(y,f,new o),m++;continue}}w=!1,v++,y=r[v]}return h=e.getValueInReferenceFrame(n,s,c[d]),i(h)&&(c[d++]=h),d}function b(e,t,n,r,a,s,l,u){for(var c,h=0,d=l,p=t,m=Math.max(s,60),f=!i(r)||o.lessThanOrEquals(r,t)||o.greaterThanOrEquals(r,n);o.lessThan(p,n);)!f&&o.greaterThanOrEquals(p,r)&&(f=!0,c=e.getValueInReferenceFrame(r,a,u[d]),i(c)&&(u[d]=c,d++)),c=e.getValueInReferenceFrame(p,a,u[d]),i(c)&&(u[d]=c,d++),h++,p=o.addSeconds(t,m*h,new o);return c=e.getValueInReferenceFrame(n,a,u[d]),i(c)&&(u[d]=c,d++),d}function S(e,t,n,r,a,s,l,c){N.start=t,N.stop=n;for(var h=l,d=e.intervals,p=0;p0){var S=E.pop();c=this._polylineCollection.get(S),t.index=S}else t.index=this._polylineCollection.length,c=this._polylineCollection.add();c.id=a,t.polyline=c}var T=g.getValueOrDefault(s._resolution,e,I);c.show=!0,c.positions=P(l,n,r,e,this._referenceFrame,T,c.positions.slice()),c.material=f.getValue(e,s._material,c.material),c.width=g.getValueOrDefault(s._width,e,R)},M.prototype.removeObject=function(e){var t=e.polyline;i(t)&&(this._unusedIndexes.push(e.index),e.polyline=void 0,t.show=!1,t.id=void 0,e.index=void 0)},M.prototype.destroy=function(){return this._scene.primitives.remove(this._polylineCollection),n(this)},D.prototype.update=function(e){var t=this._updaters;for(var n in t)t.hasOwnProperty(n)&&t[n].update(e);for(var r=this._items.values,o=0,a=r.length;a>o;o++){var s=r[o],u=s.entity,c=u._position,h=s.updater,p=l.FIXED;this._scene.mode===d.SCENE3D&&(p=c.referenceFrame);var m=this._updaters[p];h===m&&i(m)?m.updateObject(e,s):(i(h)&&h.removeObject(s),i(m)||(m=new M(this._scene,p),m.update(e),this._updaters[p]=m),s.updater=m,i(m)&&m.updateObject(e,s))}return!0},D.prototype.isDestroyed=function(){return!1},D.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(D.prototype._onCollectionChanged,this);var e=this._updaters;for(var t in e)e.hasOwnProperty(t)&&e[t].destroy();return n(this)},D.prototype._onCollectionChanged=function(e,t,n,r){var o,a,s,l=this._items;for(o=t.length-1;o>-1;o--)a=t[o],i(a._path)&&i(a._position)&&l.set(a.id,new w(a));for(o=r.length-1;o>-1;o--)a=r[o],i(a._path)&&i(a._position)?l.contains(a.id)||l.set(a.id,new w(a)):(s=l.get(a.id),i(s)&&(s.updater.removeObject(s),l.remove(a.id)));for(o=n.length-1;o>-1;o--)a=n[o],s=l.get(a.id),i(s)&&(i(s.updater)&&s.updater.removeObject(s),l.remove(a.id))},D._subSample=P,D}),define("Cesium/Shaders/PointPrimitiveCollectionFS",[],function(){"use strict";return"varying vec4 v_color;\nvarying vec4 v_outlineColor;\nvarying float v_innerPercent;\nvarying float v_pixelDistance;\n\n#ifdef RENDER_FOR_PICK\nvarying vec4 v_pickColor;\n#endif\n\nvoid main()\n{\n // The distance in UV space from this fragment to the center of the point, at most 0.5.\n float distanceToCenter = length(gl_PointCoord - vec2(0.5));\n // The max distance stops one pixel shy of the edge to leave space for anti-aliasing.\n float maxDistance = max(0.0, 0.5 - v_pixelDistance);\n float wholeAlpha = 1.0 - smoothstep(maxDistance, 0.5, distanceToCenter);\n float innerAlpha = 1.0 - smoothstep(maxDistance * v_innerPercent, 0.5 * v_innerPercent, distanceToCenter);\n\n vec4 color = mix(v_outlineColor, v_color, innerAlpha);\n color.a *= wholeAlpha;\n if (color.a < 0.005)\n {\n discard;\n }\n\n#ifdef RENDER_FOR_PICK\n gl_FragColor = v_pickColor;\n#else\n gl_FragColor = color;\n#endif\n}"; +}),define("Cesium/Shaders/PointPrimitiveCollectionVS",[],function(){"use strict";return'uniform float u_maxTotalPointSize;\n\nattribute vec4 positionHighAndSize;\nattribute vec4 positionLowAndOutline;\nattribute vec4 compressedAttribute0; // color, outlineColor, pick color\nattribute vec4 compressedAttribute1; // show, translucency by distance, some free space\nattribute vec4 scaleByDistance; // near, nearScale, far, farScale\n\nvarying vec4 v_color;\nvarying vec4 v_outlineColor;\nvarying float v_innerPercent;\nvarying float v_pixelDistance;\n\n#ifdef RENDER_FOR_PICK\nvarying vec4 v_pickColor;\n#endif\n\nconst float SHIFT_LEFT8 = 256.0;\nconst float SHIFT_RIGHT8 = 1.0 / 256.0;\n\nvoid main()\n{\n // Modifying this shader may also require modifications to PointPrimitive._computeScreenSpacePosition\n\n // unpack attributes\n vec3 positionHigh = positionHighAndSize.xyz;\n vec3 positionLow = positionLowAndOutline.xyz;\n float outlineWidthBothSides = 2.0 * positionLowAndOutline.w;\n float totalSize = positionHighAndSize.w + outlineWidthBothSides;\n float outlinePercent = outlineWidthBothSides / totalSize;\n // Scale in response to browser-zoom.\n totalSize *= czm_resolutionScale;\n // Add padding for anti-aliasing on both sides.\n totalSize += 3.0;\n\n float temp = compressedAttribute1.x * SHIFT_RIGHT8;\n float show = floor(temp);\n\n#ifdef EYE_DISTANCE_TRANSLUCENCY\n vec4 translucencyByDistance;\n translucencyByDistance.x = compressedAttribute1.z;\n translucencyByDistance.z = compressedAttribute1.w;\n\n translucencyByDistance.y = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;\n\n temp = compressedAttribute1.y * SHIFT_RIGHT8;\n translucencyByDistance.w = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;\n#endif\n\n ///////////////////////////////////////////////////////////////////////////\n\n vec4 color;\n vec4 outlineColor;\n#ifdef RENDER_FOR_PICK\n // compressedAttribute0.z => pickColor.rgb\n\n color = vec4(0.0);\n outlineColor = vec4(0.0);\n vec4 pickColor;\n temp = compressedAttribute0.z * SHIFT_RIGHT8;\n pickColor.b = (temp - floor(temp)) * SHIFT_LEFT8;\n temp = floor(temp) * SHIFT_RIGHT8;\n pickColor.g = (temp - floor(temp)) * SHIFT_LEFT8;\n pickColor.r = floor(temp);\n#else\n // compressedAttribute0.x => color.rgb\n\n temp = compressedAttribute0.x * SHIFT_RIGHT8;\n color.b = (temp - floor(temp)) * SHIFT_LEFT8;\n temp = floor(temp) * SHIFT_RIGHT8;\n color.g = (temp - floor(temp)) * SHIFT_LEFT8;\n color.r = floor(temp);\n\n // compressedAttribute0.y => outlineColor.rgb\n\n temp = compressedAttribute0.y * SHIFT_RIGHT8;\n outlineColor.b = (temp - floor(temp)) * SHIFT_LEFT8;\n temp = floor(temp) * SHIFT_RIGHT8;\n outlineColor.g = (temp - floor(temp)) * SHIFT_LEFT8;\n outlineColor.r = floor(temp);\n#endif\n\n // compressedAttribute0.w => color.a, outlineColor.a, pickColor.a\n\n temp = compressedAttribute0.w * SHIFT_RIGHT8;\n#ifdef RENDER_FOR_PICK\n pickColor.a = (temp - floor(temp)) * SHIFT_LEFT8;\n pickColor = pickColor / 255.0;\n#endif\n temp = floor(temp) * SHIFT_RIGHT8;\n outlineColor.a = (temp - floor(temp)) * SHIFT_LEFT8;\n outlineColor /= 255.0;\n color.a = floor(temp);\n color /= 255.0;\n\n ///////////////////////////////////////////////////////////////////////////\n\n vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);\n vec4 positionEC = czm_modelViewRelativeToEye * p;\n positionEC.xyz *= show;\n\n ///////////////////////////////////////////////////////////////////////////\n\n#if defined(EYE_DISTANCE_SCALING) || defined(EYE_DISTANCE_TRANSLUCENCY)\n float lengthSq;\n if (czm_sceneMode == czm_sceneMode2D)\n {\n // 2D camera distance is a special case\n // treat all billboards as flattened to the z=0.0 plane\n lengthSq = czm_eyeHeight2D.y;\n }\n else\n {\n lengthSq = dot(positionEC.xyz, positionEC.xyz);\n }\n#endif\n\n#ifdef EYE_DISTANCE_SCALING\n totalSize *= czm_nearFarScalar(scaleByDistance, lengthSq);\n#endif\n // Clamp to max point size.\n totalSize = min(totalSize, u_maxTotalPointSize);\n // If size is too small, push vertex behind near plane for clipping.\n // Note that context.minimumAliasedPointSize "will be at most 1.0".\n if (totalSize < 1.0)\n {\n positionEC.xyz = vec3(0.0);\n totalSize = 1.0;\n }\n\n float translucency = 1.0;\n#ifdef EYE_DISTANCE_TRANSLUCENCY\n translucency = czm_nearFarScalar(translucencyByDistance, lengthSq);\n // push vertex behind near plane for clipping\n if (translucency < 0.004)\n {\n positionEC.xyz = vec3(0.0);\n }\n#endif\n\n vec4 positionWC = czm_eyeToWindowCoordinates(positionEC);\n\n gl_Position = czm_viewportOrthographic * vec4(positionWC.xy, -positionWC.z, 1.0);\n\n v_color = color;\n v_color.a *= translucency;\n v_outlineColor = outlineColor;\n v_outlineColor.a *= translucency;\n\n v_innerPercent = 1.0 - outlinePercent;\n v_pixelDistance = 2.0 / totalSize;\n gl_PointSize = totalSize;\n\n#ifdef RENDER_FOR_PICK\n v_pickColor = pickColor;\n#endif\n}\n'}),define("Cesium/Scene/PointPrimitive",["../Core/Cartesian2","../Core/Cartesian3","../Core/Cartesian4","../Core/Color","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Matrix4","../Core/NearFarScalar","./SceneMode","./SceneTransforms"],function(e,t,i,n,r,o,a,s,l,u,c,h){"use strict";function d(e,i){e=r(e,r.EMPTY_OBJECT),this._show=r(e.show,!0),this._position=t.clone(r(e.position,t.ZERO)),this._actualPosition=t.clone(this._position),this._color=n.clone(r(e.color,n.WHITE)),this._outlineColor=n.clone(r(e.outlineColor,n.TRANSPARENT)),this._outlineWidth=r(e.outlineWidth,0),this._pixelSize=r(e.pixelSize,10),this._scaleByDistance=e.scaleByDistance,this._translucencyByDistance=e.translucencyByDistance,this._id=e.id,this._collection=r(e.collection,i),this._pickId=void 0,this._pointPrimitiveCollection=i,this._dirty=!1,this._index=-1}function p(e,t){var i=e._pointPrimitiveCollection;o(i)&&(i._updatePointPrimitive(e,t),e._dirty=!0)}var m=d.SHOW_INDEX=0,f=d.POSITION_INDEX=1,g=d.COLOR_INDEX=2,v=d.OUTLINE_COLOR_INDEX=3,_=d.OUTLINE_WIDTH_INDEX=4,y=d.PIXEL_SIZE_INDEX=5,C=d.SCALE_BY_DISTANCE_INDEX=6,w=d.TRANSLUCENCY_BY_DISTANCE_INDEX=7;d.NUMBER_OF_PROPERTIES=8,a(d.prototype,{show:{get:function(){return this._show},set:function(e){this._show!==e&&(this._show=e,p(this,m))}},position:{get:function(){return this._position},set:function(e){var i=this._position;t.equals(i,e)||(t.clone(e,i),t.clone(e,this._actualPosition),p(this,f))}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){var t=this._scaleByDistance;u.equals(t,e)||(this._scaleByDistance=u.clone(e,t),p(this,C))}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){var t=this._translucencyByDistance;u.equals(t,e)||(this._translucencyByDistance=u.clone(e,t),p(this,w))}},pixelSize:{get:function(){return this._pixelSize},set:function(e){this._pixelSize!==e&&(this._pixelSize=e,p(this,y))}},color:{get:function(){return this._color},set:function(e){var t=this._color;n.equals(t,e)||(n.clone(e,t),p(this,g))}},outlineColor:{get:function(){return this._outlineColor},set:function(e){var t=this._outlineColor;n.equals(t,e)||(n.clone(e,t),p(this,v))}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){this._outlineWidth!==e&&(this._outlineWidth=e,p(this,_))}},id:{get:function(){return this._id},set:function(e){this._id=e,o(this._pickId)&&(this._pickId.object.id=e)}}}),d.prototype.getPickId=function(e){return o(this._pickId)||(this._pickId=e.createPickId({primitive:this,collection:this._collection,id:this._id})),this._pickId},d.prototype._getActualPosition=function(){return this._actualPosition},d.prototype._setActualPosition=function(e){t.clone(e,this._actualPosition),p(this,f)};var E=new i;d._computeActualPosition=function(e,t,i){return t.mode===c.SCENE3D?e:(l.multiplyByPoint(i,e,E),h.computeActualWgs84Position(t,E))};var b=new i;return d._computeScreenSpacePosition=function(e,t,n,r){var o=l.multiplyByVector(e,i.fromElements(t.x,t.y,t.z,1,b),b),a=h.wgs84ToWindowCoordinates(n,o,r);return a},d.prototype.computeScreenSpacePosition=function(t,i){var n=this._pointPrimitiveCollection;o(i)||(i=new e);var r=n.modelMatrix,a=d._computeScreenSpacePosition(r,this._actualPosition,t,i);return a.y=t.canvas.clientHeight-a.y,a},d.prototype.equals=function(e){return this===e||o(e)&&this._id===e._id&&t.equals(this._position,e._position)&&n.equals(this._color,e._color)&&this._pixelSize===e._pixelSize&&this._outlineWidth===e._outlineWidth&&this._show===e._show&&n.equals(this._outlineColor,e._outlineColor)&&u.equals(this._scaleByDistance,e._scaleByDistance)&&u.equals(this._translucencyByDistance,e._translucencyByDistance)},d.prototype._destroy=function(){this._pickId=this._pickId&&this._pickId.destroy(),this._pointPrimitiveCollection=void 0},d}),define("Cesium/Scene/PointPrimitiveCollection",["../Core/BoundingSphere","../Core/Cartesian2","../Core/Cartesian3","../Core/Color","../Core/ComponentDatatype","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/destroyObject","../Core/DeveloperError","../Core/EncodedCartesian3","../Core/Math","../Core/Matrix4","../Core/PrimitiveType","../Renderer/BufferUsage","../Renderer/ContextLimits","../Renderer/DrawCommand","../Renderer/RenderState","../Renderer/ShaderProgram","../Renderer/ShaderSource","../Renderer/VertexArrayFacade","../Shaders/PointPrimitiveCollectionFS","../Shaders/PointPrimitiveCollectionVS","./BlendingState","./Pass","./PointPrimitive","./SceneMode"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g,v,_,y,C,w,E,b,S,T,x){"use strict";function A(t){t=o(t,o.EMPTY_OBJECT),this._sp=void 0,this._rs=void 0,this._vaf=void 0,this._spPick=void 0,this._pointPrimitives=[],this._pointPrimitivesToUpdate=[],this._pointPrimitivesToUpdateIndex=0,this._pointPrimitivesRemoved=!1,this._createVertexArray=!1,this._shaderScaleByDistance=!1,this._compiledShaderScaleByDistance=!1,this._compiledShaderScaleByDistancePick=!1,this._shaderTranslucencyByDistance=!1,this._compiledShaderTranslucencyByDistance=!1,this._compiledShaderTranslucencyByDistancePick=!1,this._propertiesChanged=new Uint32Array(Y),this._maxPixelSize=1,this._baseVolume=new e,this._baseVolumeWC=new e,this._baseVolume2D=new e,this._boundingVolume=new e,this._boundingVolumeDirty=!1,this._colorCommands=[],this._pickCommands=[],this.modelMatrix=d.clone(o(t.modelMatrix,d.IDENTITY)),this._modelMatrix=d.clone(d.IDENTITY),this.debugShowBoundingVolume=o(t.debugShowBoundingVolume,!1),this._mode=x.SCENE3D,this._maxTotalPointSize=1,this._buffersUsage=[m.STATIC_DRAW,m.STATIC_DRAW,m.STATIC_DRAW,m.STATIC_DRAW,m.STATIC_DRAW,m.STATIC_DRAW,m.STATIC_DRAW,m.STATIC_DRAW];var i=this;this._uniforms={u_maxTotalPointSize:function(){return i._maxTotalPointSize}}}function P(e){for(var t=e.length,i=0;t>i;++i)e[i]&&e[i]._destroy()}function M(e){if(e._pointPrimitivesRemoved){e._pointPrimitivesRemoved=!1;for(var t=[],i=e._pointPrimitives,n=i.length,r=0,o=0;n>r;++r){var a=i[r];a&&(a._index=o++,t.push(a))}e._pointPrimitives=t}}function D(e,t,i){return new C(e,[{index:X.positionHighAndSize,componentsPerAttribute:4,componentDatatype:r.FLOAT,usage:i[V]},{index:X.positionLowAndShow,componentsPerAttribute:4,componentDatatype:r.FLOAT,usage:i[V]},{index:X.compressedAttribute0,componentsPerAttribute:4,componentDatatype:r.FLOAT,usage:i[U]},{index:X.compressedAttribute1,componentsPerAttribute:4,componentDatatype:r.FLOAT,usage:i[j]},{index:X.scaleByDistance,componentsPerAttribute:4,componentDatatype:r.FLOAT,usage:i[q]}],t)}function I(t,i,n,r){var o=r._index,a=r._getActualPosition();t._mode===x.SCENE3D&&(e.expand(t._baseVolume,a,t._baseVolume),t._boundingVolumeDirty=!0),c.fromCartesian(a,Z);var s=r.pixelSize,l=r.outlineWidth;t._maxPixelSize=Math.max(t._maxPixelSize,s+l);var u=n[X.positionHighAndSize],h=Z.high;u(o,h.x,h.y,h.z,s);var d=n[X.positionLowAndOutline],p=Z.low;d(o,p.x,p.y,p.z,l)}function R(e,t,i,r){var o=r._index,a=r.color,s=r.getPickId(t).color,l=r.outlineColor,u=n.floatToByte(a.red),c=n.floatToByte(a.green),h=n.floatToByte(a.blue),d=u*K+c*J+h;u=n.floatToByte(l.red),c=n.floatToByte(l.green),h=n.floatToByte(l.blue);var p=u*K+c*J+h;u=n.floatToByte(s.red),c=n.floatToByte(s.green),h=n.floatToByte(s.blue);var m=u*K+c*J+h,f=n.floatToByte(a.alpha)*K+n.floatToByte(l.alpha)*J+n.floatToByte(s.alpha),g=i[X.compressedAttribute0];g(o,d,p,m,f)}function O(e,t,i,n){var r=n._index,o=0,s=1,l=1,u=1,c=n.translucencyByDistance;a(c)&&(o=c.near,s=c.nearValue,l=c.far,u=c.farValue,(1!==s||1!==u)&&(e._shaderTranslucencyByDistance=!0));var d=n.show;0===n.color.alpha&&0===n.outlineColor.alpha&&(d=!1),s=h.clamp(s,0,1),s=1===s?255:255*s|0;var p=(d?1:0)*J+s;u=h.clamp(u,0,1),u=1===u?255:255*u|0;var m=u,f=i[X.compressedAttribute1];f(r,p,m,o,l)}function L(e,t,i,n){var r=n._index,o=i[X.scaleByDistance],s=0,l=1,u=1,c=1,h=n.scaleByDistance;a(h)&&(s=h.near,l=h.nearValue,u=h.far,c=h.farValue,(1!==l||1!==c)&&(e._shaderScaleByDistance=!0)),o(r,s,l,u,c)}function N(e,t,i,n){I(e,t,i,n),R(e,t,i,n),O(e,t,i,n),L(e,t,i,n)}function F(t,i,n,r,o,s){var l;r.mode===x.SCENE3D?(l=t._baseVolume,t._boundingVolumeDirty=!0):l=t._baseVolume2D;for(var u=[],c=0;n>c;++c){var h=i[c],d=h.position,p=T._computeActualPosition(d,r,o);a(p)&&(h._setActualPosition(p),s?u.push(p):e.expand(l,p,l))}s&&e.fromPoints(u,l)}function k(e,t){var i=t.mode,n=e._pointPrimitives,r=e._pointPrimitivesToUpdate,o=e._modelMatrix;e._createVertexArray||e._mode!==i||i!==x.SCENE3D&&!d.equals(o,e.modelMatrix)?(e._mode=i,d.clone(e.modelMatrix,o),e._createVertexArray=!0,(i===x.SCENE3D||i===x.SCENE2D||i===x.COLUMBUS_VIEW)&&F(e,n,n.length,t,o,!0)):i===x.MORPHING?F(e,n,n.length,t,o,!0):(i===x.SCENE2D||i===x.COLUMBUS_VIEW)&&F(e,r,e._pointPrimitivesToUpdateIndex,t,o,!1)}function B(e,t,i){var n=t.camera.getPixelSize(i,t.context.drawingBufferWidth,t.context.drawingBufferHeight),r=n*e._maxPixelSize;i.radius+=r}var z=T.SHOW_INDEX,V=T.POSITION_INDEX,U=T.COLOR_INDEX,G=T.OUTLINE_COLOR_INDEX,W=T.OUTLINE_WIDTH_INDEX,H=T.PIXEL_SIZE_INDEX,q=T.SCALE_BY_DISTANCE_INDEX,j=T.TRANSLUCENCY_BY_DISTANCE_INDEX,Y=T.NUMBER_OF_PROPERTIES,X={positionHighAndSize:0,positionLowAndOutline:1,compressedAttribute0:2,compressedAttribute1:3,scaleByDistance:4};s(A.prototype,{length:{get:function(){return M(this),this._pointPrimitives.length}}}),A.prototype.add=function(e){var t=new T(e,this);return t._index=this._pointPrimitives.length,this._pointPrimitives.push(t),this._createVertexArray=!0,t},A.prototype.remove=function(e){return this.contains(e)?(this._pointPrimitives[e._index]=null,this._pointPrimitivesRemoved=!0,this._createVertexArray=!0,e._destroy(),!0):!1},A.prototype.removeAll=function(){P(this._pointPrimitives),this._pointPrimitives=[],this._pointPrimitivesToUpdate=[],this._pointPrimitivesToUpdateIndex=0,this._pointPrimitivesRemoved=!1,this._createVertexArray=!0},A.prototype._updatePointPrimitive=function(e,t){e._dirty||(this._pointPrimitivesToUpdate[this._pointPrimitivesToUpdateIndex++]=e),++this._propertiesChanged[t]},A.prototype.contains=function(e){return a(e)&&e._pointPrimitiveCollection===this},A.prototype.get=function(e){return M(this),this._pointPrimitives[e]},A.prototype.computeNewBuffersUsage=function(){for(var e=this._buffersUsage,t=!1,i=this._propertiesChanged,n=0;Y>n;++n){var r=0===i[n]?m.STATIC_DRAW:m.STREAM_DRAW;t=t||e[n]!==r,e[n]=r}return t};var Z=new c,K=65536,J=256,Q=[];return A.prototype.update=function(t){M(this),this._maxTotalPointSize=f.maximumAliasedPointSize,k(this,t);var i,n=this._pointPrimitives,r=n.length,o=this._pointPrimitivesToUpdate,s=this._pointPrimitivesToUpdateIndex,l=this._propertiesChanged,u=this._createVertexArray,c=t.context,h=t.passes,m=h.pick;if(u||!m&&this.computeNewBuffersUsage()){this._createVertexArray=!1;for(var C=0;Y>C;++C)l[C]=0;if(this._vaf=this._vaf&&this._vaf.destroy(),r>0){this._vaf=D(c,r,this._buffersUsage),i=this._vaf.writers;for(var T=0;r>T;++T){var A=this._pointPrimitives[T];A._dirty=!1,N(this,c,i,A)}this._vaf.commit()}this._pointPrimitivesToUpdateIndex=0}else if(s>0){var P=Q;P.length=0,(l[V]||l[W]||l[H])&&P.push(I),(l[U]||l[G])&&P.push(R),(l[z]||l[j])&&P.push(O),l[q]&&P.push(L);var F=P.length;if(i=this._vaf.writers,s/r>.1){for(var Z=0;s>Z;++Z){var K=o[Z];K._dirty=!1;for(var J=0;F>J;++J)P[J](this,c,i,K)}this._vaf.commit()}else{for(var $=0;s>$;++$){var ee=o[$];ee._dirty=!1;for(var te=0;F>te;++te)P[te](this,c,i,ee);this._vaf.subCommit(ee._index,1)}this._vaf.endSubCommits()}this._pointPrimitivesToUpdateIndex=0}if(s>1.5*r&&(o.length=r),a(this._vaf)&&a(this._vaf.va)){this._boundingVolumeDirty&&(this._boundingVolumeDirty=!1,e.transform(this._baseVolume,this.modelMatrix,this._baseVolumeWC));var ie,ne=d.IDENTITY;t.mode===x.SCENE3D?(ne=this.modelMatrix,ie=e.clone(this._baseVolumeWC,this._boundingVolume)):ie=e.clone(this._baseVolume2D,this._boundingVolume),B(this,t,ie);var re,oe,ae,se,le,ue,ce=t.commandList;if(h.render){var he=this._colorCommands;for(a(this._rs)||(this._rs=v.fromCache({depthTest:{enabled:!0},blending:b.ALPHA_BLEND})),(!a(this._sp)||this._shaderScaleByDistance&&!this._compiledShaderScaleByDistance||this._shaderTranslucencyByDistance&&!this._compiledShaderTranslucencyByDistance)&&(le=new y({sources:[E]}),this._shaderScaleByDistance&&le.defines.push("EYE_DISTANCE_SCALING"),this._shaderTranslucencyByDistance&&le.defines.push("EYE_DISTANCE_TRANSLUCENCY"),this._sp=_.replaceCache({context:c,shaderProgram:this._sp,vertexShaderSource:le,fragmentShaderSource:w,attributeLocations:X}),this._compiledShaderScaleByDistance=this._shaderScaleByDistance,this._compiledShaderTranslucencyByDistance=this._shaderTranslucencyByDistance),re=this._vaf.va,oe=re.length,he.length=oe,se=0;oe>se;++se)ae=he[se],a(ae)||(ae=he[se]=new g({primitiveType:p.POINTS,pass:S.OPAQUE,owner:this})),ae.boundingVolume=ie,ae.modelMatrix=ne,ae.shaderProgram=this._sp,ae.uniformMap=this._uniforms,ae.vertexArray=re[se].va,ae.renderState=this._rs,ae.debugShowBoundingVolume=this.debugShowBoundingVolume,ce.push(ae)}if(m){var de=this._pickCommands;for((!a(this._spPick)||this._shaderScaleByDistance&&!this._compiledShaderScaleByDistancePick||this._shaderTranslucencyByDistance&&!this._compiledShaderTranslucencyByDistancePick)&&(le=new y({defines:["RENDER_FOR_PICK"],sources:[E]}),this._shaderScaleByDistance&&le.defines.push("EYE_DISTANCE_SCALING"),this._shaderTranslucencyByDistance&&le.defines.push("EYE_DISTANCE_TRANSLUCENCY"),ue=new y({defines:["RENDER_FOR_PICK"],sources:[w]}),this._spPick=_.replaceCache({context:c,shaderProgram:this._spPick,vertexShaderSource:le,fragmentShaderSource:ue,attributeLocations:X}),this._compiledShaderScaleByDistancePick=this._shaderScaleByDistance,this._compiledShaderTranslucencyByDistancePick=this._shaderTranslucencyByDistance),re=this._vaf.va,oe=re.length,de.length=oe,se=0;oe>se;++se)ae=de[se],a(ae)||(ae=de[se]=new g({primitiveType:p.POINTS,pass:S.OPAQUE,owner:this})),ae.boundingVolume=ie,ae.modelMatrix=ne,ae.shaderProgram=this._spPick,ae.uniformMap=this._uniforms,ae.vertexArray=re[se].va,ae.renderState=this._rs,ce.push(ae)}}},A.prototype.isDestroyed=function(){return!1},A.prototype.destroy=function(){return this._sp=this._sp&&this._sp.destroy(),this._spPick=this._spPick&&this._spPick.destroy(),this._vaf=this._vaf&&this._vaf.destroy(),P(this._pointPrimitives),l(this)},A}),define("Cesium/DataSources/PointVisualizer",["../Core/AssociativeArray","../Core/Cartesian3","../Core/Color","../Core/defaultValue","../Core/defined","../Core/destroyObject","../Core/DeveloperError","../Core/NearFarScalar","../Scene/BillboardCollection","../Scene/HeightReference","../Scene/PointPrimitiveCollection","./BoundingSphereState","./Property"],function(e,t,i,n,r,o,a,s,l,u,c,h,d){"use strict";function p(e){this.entity=e,this.pointPrimitive=void 0,this.billboard=void 0,this.color=void 0,this.outlineColor=void 0,this.pixelSize=void 0,this.outlineWidth=void 0}function m(t,i){i.collectionChanged.addEventListener(m.prototype._onCollectionChanged,this),this._scene=t,this._unusedPointIndexes=[],this._unusedBillboardIndexes=[],this._entityCollection=i,this._pointPrimitiveCollection=void 0,this._billboardCollection=void 0,this._items=new e,this._onCollectionChanged(i,i.values,[],[])}function f(e,t,i){if(r(e)){var n=e.pointPrimitive;if(r(n))return e.pointPrimitive=void 0,n.id=void 0,n.show=!1,void t.push(n._index);var o=e.billboard;r(o)&&(e.billboard=void 0,o.id=void 0,o.show=!1,i.push(o._index))}}function g(e,t,i,n,r){return function(o){var a=document.createElement("canvas"),s=r+2*n;a.height=a.width=s;var l=a.getContext("2d");return l.clearRect(0,0,s,s),0!==n&&(l.beginPath(),l.arc(s/2,s/2,s/2,0,2*Math.PI,!0),l.closePath(),l.fillStyle=i,l.fill(),1>e&&(l.save(),l.globalCompositeOperation="destination-out",l.beginPath(),l.arc(s/2,s/2,r/2,0,2*Math.PI,!0),l.closePath(),l.fillStyle="black",l.fill(),l.restore())),l.beginPath(),l.arc(s/2,s/2,r/2,0,2*Math.PI,!0),l.closePath(),l.fillStyle=t,l.fill(),a}}var v=i.WHITE,_=i.BLACK,y=0,C=1,w=new i,E=new t,b=new i,S=new s,T=new s;return m.prototype.update=function(e){for(var t=this._scene,n=this._items.values,o=this._unusedPointIndexes,a=this._unusedBillboardIndexes,s=0,h=n.length;h>s;s++){var p=n[s],m=p.entity,x=m._point,A=p.pointPrimitive,P=p.billboard,M=d.getValueOrDefault(x._heightReference,e,u.NONE),D=m.isShowing&&m.isAvailable(e)&&d.getValueOrDefault(x._show,e,!0);if(D&&(E=d.getValueOrUndefined(m._position,e,E),D=r(E)),D){var I=!1;if(M===u.NONE||r(P)){if(M===u.NONE&&!r(A)){r(P)&&(f(p,o,a),P=void 0);var R=this._pointPrimitiveCollection;r(R)||(R=new c,this._pointPrimitiveCollection=R,t.primitives.add(R)),A=o.length>0?R.get(o.pop()):R.add(),A.id=m,p.pointPrimitive=A}}else{r(A)&&(f(p,o,a),A=void 0);var O=this._billboardCollection;r(O)||(O=new l({scene:t}),this._billboardCollection=O,t.primitives.add(O)),P=a.length>0?O.get(a.pop()):O.add(),P.id=m,P.image=void 0,p.billboard=P,I=!0}if(r(A))A.show=!0,A.position=E,A.scaleByDistance=d.getValueOrUndefined(x._scaleByDistance,e,S),A.translucencyByDistance=d.getValueOrUndefined(x._translucencyByDistance,e,T),A.color=d.getValueOrDefault(x._color,e,v,w),A.outlineColor=d.getValueOrDefault(x._outlineColor,e,_,b),A.outlineWidth=d.getValueOrDefault(x._outlineWidth,e,y),A.pixelSize=d.getValueOrDefault(x._pixelSize,e,C);else{P.show=!0,P.position=E,P.scaleByDistance=d.getValueOrUndefined(x._scaleByDistance,e,S),P.translucencyByDistance=d.getValueOrUndefined(x._translucencyByDistance,e,T),P.heightReference=M;var L=d.getValueOrDefault(x._color,e,v,w),N=d.getValueOrDefault(x._outlineColor,e,_,b),F=Math.round(d.getValueOrDefault(x._outlineWidth,e,y)),k=Math.max(1,Math.round(d.getValueOrDefault(x._pixelSize,e,C)));if(F>0?(P.scale=1,I=I||F!==p.outlineWidth||k!==p.pixelSize||!i.equals(L,p.color)||!i.equals(N,p.outlineColor)):(P.scale=k/50,k=50,I=I||F!==p.outlineWidth||!i.equals(L,p.color)||!i.equals(N,p.outlineColor)),I){p.color=i.clone(L,p.color),p.outlineColor=i.clone(N,p.outlineColor),p.pixelSize=k,p.outlineWidth=F;var B=L.alpha,z=L.toCssColorString(),V=N.toCssColorString(),U=JSON.stringify([z,k,V,F]);P.setImage(U,g(B,z,V,F,k))}}}else f(p,o,a)}return!0},m.prototype.getBoundingSphere=function(e,i){var n=this._items.get(e.id);if(!r(n)||!r(n.pointPrimitive)&&!r(n.billboard))return h.FAILED;if(r(n.pointPrimitive))i.center=t.clone(n.pointPrimitive.position,i.center);else{var o=n.billboard;if(!r(o._clampedPosition))return h.PENDING;i.center=t.clone(o._clampedPosition,i.center)}return i.radius=0,h.DONE},m.prototype.isDestroyed=function(){return!1},m.prototype.destroy=function(){return this._entityCollection.collectionChanged.removeEventListener(m.prototype._onCollectionChanged,this),r(this._pointPrimitiveCollection)&&this._scene.primitives.remove(this._pointPrimitiveCollection),r(this._billboardCollection)&&this._scene.primitives.remove(this._billboardCollection),o(this)},m.prototype._onCollectionChanged=function(e,t,i,n){var o,a,s=this._unusedPointIndexes,l=this._unusedBillboardIndexes,u=this._items;for(o=t.length-1;o>-1;o--)a=t[o],r(a._point)&&r(a._position)&&u.set(a.id,new p(a));for(o=n.length-1;o>-1;o--)a=n[o],r(a._point)&&r(a._position)?u.contains(a.id)||u.set(a.id,new p(a)):(f(u.get(a.id),s,l),u.remove(a.id));for(o=i.length-1;o>-1;o--)a=i[o],f(u.get(a.id),s,l),u.remove(a.id)},m}),define("Cesium/DataSources/PolygonGeometryUpdater",["../Core/Color","../Core/ColorGeometryInstanceAttribute","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/destroyObject","../Core/DeveloperError","../Core/Event","../Core/GeometryInstance","../Core/isArray","../Core/Iso8601","../Core/oneTimeWarning","../Core/PolygonGeometry","../Core/PolygonHierarchy","../Core/PolygonOutlineGeometry","../Core/ShowGeometryInstanceAttribute","../Scene/GroundPrimitive","../Scene/MaterialAppearance","../Scene/PerInstanceColorAppearance","../Scene/Primitive","./ColorMaterialProperty","./ConstantProperty","./dynamicGeometryGetBoundingSphere","./MaterialProperty","./Property"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g,v,_,y,C,w,E,b,S){"use strict";function T(e){this.id=e,this.vertexFormat=void 0,this.polygonHierarchy=void 0,this.perPositionHeight=void 0,this.closeTop=void 0,this.closeBottom=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.stRotation=void 0}function x(e,t){this._entity=e,this._scene=t,this._entitySubscription=e.definitionChanged.addEventListener(x.prototype._onEntityPropertyChanged,this),this._fillEnabled=!1,this._isClosed=!1,this._dynamic=!1,this._outlineEnabled=!1,this._geometryChanged=new s,this._showProperty=void 0,this._materialProperty=void 0,this._hasConstantOutline=!0,this._showOutlineProperty=void 0,this._outlineColorProperty=void 0,this._outlineWidth=1,this._onTerrain=!1,this._options=new T(e),this._onEntityPropertyChanged(e,"polygon",e.polygon,void 0)}function A(e,t,i){this._primitives=e,this._groundPrimitives=t,this._primitive=void 0,this._outlinePrimitive=void 0,this._geometryUpdater=i,this._options=new T(i._entity)}var P=new C(e.WHITE),M=new w(!0),D=new w(!0),I=new w(!1),R=new w(e.BLACK),O=new e;return r(x,{perInstanceColorAppearanceType:{value:_},materialAppearanceType:{value:v}}),r(x.prototype,{entity:{get:function(){return this._entity}},fillEnabled:{get:function(){return this._fillEnabled}},hasConstantFill:{get:function(){return!this._fillEnabled||!n(this._entity.availability)&&S.isConstant(this._showProperty)&&S.isConstant(this._fillProperty)}},fillMaterialProperty:{get:function(){return this._materialProperty}},outlineEnabled:{get:function(){return this._outlineEnabled}},hasConstantOutline:{get:function(){return!this._outlineEnabled||!n(this._entity.availability)&&S.isConstant(this._showProperty)&&S.isConstant(this._showOutlineProperty)}},outlineColorProperty:{get:function(){return this._outlineColorProperty}},outlineWidth:{get:function(){return this._outlineWidth}},isDynamic:{get:function(){return this._dynamic}},isClosed:{get:function(){return this._isClosed}},onTerrain:{get:function(){return this._onTerrain}},geometryChanged:{get:function(){return this._geometryChanged}}}),x.prototype.isOutlineVisible=function(e){var t=this._entity;return this._outlineEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)},x.prototype.isFilled=function(e){var t=this._entity;return this._fillEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)},x.prototype.createFillGeometryInstance=function(i){var r,o,a=this._entity,s=a.isAvailable(i),u=new f(s&&a.isShowing&&this._showProperty.getValue(i)&&this._fillProperty.getValue(i));if(this._materialProperty instanceof C){var c=e.WHITE;n(this._materialProperty.color)&&(this._materialProperty.color.isConstant||s)&&(c=this._materialProperty.color.getValue(i)),o=t.fromColor(c),r={show:u,color:o}}else r={show:u};return new l({id:a,geometry:new d(this._options),attributes:r})},x.prototype.createOutlineGeometryInstance=function(i){var n=this._entity,r=n.isAvailable(i),o=S.getValueOrDefault(this._outlineColorProperty,i,e.BLACK);return new l({id:n,geometry:new m(this._options),attributes:{show:new f(r&&n.isShowing&&this._showProperty.getValue(i)&&this._showOutlineProperty.getValue(i)),color:t.fromColor(o)}})},x.prototype.isDestroyed=function(){return!1},x.prototype.destroy=function(){this._entitySubscription(),o(this)},x.prototype._onEntityPropertyChanged=function(e,t,r,o){if("availability"===t||"polygon"===t){var a=this._entity.polygon;if(!n(a))return void((this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this)));var s=a.fill,l=n(s)&&s.isConstant?s.getValue(c.MINIMUM_VALUE):!0,d=a.perPositionHeight,m=n(d)&&(d.isConstant?d.getValue(c.MINIMUM_VALUE):!0),f=a.outline,y=n(f);if(y&&f.isConstant&&(y=f.getValue(c.MINIMUM_VALUE)),!l&&!y)return void((this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this)));var w=a.hierarchy,E=a.show;if(n(E)&&E.isConstant&&!E.getValue(c.MINIMUM_VALUE)||!n(w))return void((this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this)));var b=i(a.material,P),T=b instanceof C;this._materialProperty=b,this._fillProperty=i(s,D),this._showProperty=i(E,M),this._showOutlineProperty=i(a.outline,I),this._outlineColorProperty=y?i(a.outlineColor,R):void 0;var x=a.height,A=a.extrudedHeight,O=a.granularity,L=a.stRotation,N=a.outlineWidth,F=l&&!n(x)&&!n(A)&&T&&!m&&g.isSupported(this._scene);y&&F&&(h(h.geometryOutlines),y=!1);var k=a.perPositionHeight,B=a.closeTop,z=a.closeBottom;if(this._fillEnabled=l,this._onTerrain=F,this._outlineEnabled=y,w.isConstant&&S.isConstant(x)&&S.isConstant(A)&&S.isConstant(O)&&S.isConstant(L)&&S.isConstant(N)&&S.isConstant(d)&&S.isConstant(k)&&S.isConstant(B)&&S.isConstant(z)){var V=this._options;V.vertexFormat=T?_.VERTEX_FORMAT:v.MaterialSupport.TEXTURED.vertexFormat;var U=w.getValue(c.MINIMUM_VALUE);u(U)&&(U=new p(U));var G=S.getValueOrUndefined(x,c.MINIMUM_VALUE),W=S.getValueOrDefault(B,c.MINIMUM_VALUE,!0),H=S.getValueOrDefault(z,c.MINIMUM_VALUE,!0),q=S.getValueOrUndefined(A,c.MINIMUM_VALUE);V.polygonHierarchy=U,V.height=G,V.extrudedHeight=q,V.granularity=S.getValueOrUndefined(O,c.MINIMUM_VALUE),V.stRotation=S.getValueOrUndefined(L,c.MINIMUM_VALUE),V.perPositionHeight=S.getValueOrUndefined(k,c.MINIMUM_VALUE),V.closeTop=W,V.closeBottom=H,this._outlineWidth=S.getValueOrDefault(N,c.MINIMUM_VALUE,1),this._isClosed=n(q)&&q!==G&&W&&H,this._dynamic=!1,this._geometryChanged.raiseEvent(this)}else this._dynamic||(this._dynamic=!0,this._geometryChanged.raiseEvent(this))}},x.prototype.createDynamicUpdater=function(e,t){return new A(e,t,this)},A.prototype.update=function(i){var r=this._geometryUpdater,o=r._onTerrain,a=this._primitives,s=this._groundPrimitives;o?s.removeAndDestroy(this._primitive):(a.removeAndDestroy(this._primitive),a.removeAndDestroy(this._outlinePrimitive),this._outlinePrimitive=void 0),this._primitive=void 0;var c=r._entity,h=c.polygon;if(c.isShowing&&c.isAvailable(i)&&S.getValueOrDefault(h.show,i,!0)){var f=this._options,C=S.getValueOrUndefined(h.hierarchy,i);if(n(C)){u(C)?f.polygonHierarchy=new p(C):f.polygonHierarchy=C;var w=S.getValueOrDefault(h.closeTop,i,!0),E=S.getValueOrDefault(h.closeBottom,i,!0);if(f.height=S.getValueOrUndefined(h.height,i),f.extrudedHeight=S.getValueOrUndefined(h.extrudedHeight,i),f.granularity=S.getValueOrUndefined(h.granularity,i),f.stRotation=S.getValueOrUndefined(h.stRotation,i),f.perPositionHeight=S.getValueOrUndefined(h.perPositionHeight,i),f.closeTop=w,f.closeBottom=E,S.getValueOrDefault(h.fill,i,!0)){var T=r.fillMaterialProperty,x=b.getValue(i,T,this._material);if(this._material=x,o){var A=e.WHITE;n(T.color)&&(A=T.color.getValue(i)),this._primitive=s.add(new g({geometryInstance:new l({ +id:c,geometry:new d(f),attributes:{color:t.fromColor(A)}}),asynchronous:!1}))}else{var P=new v({material:x,translucent:x.isTranslucent(),closed:n(f.extrudedHeight)&&f.extrudedHeight!==f.height&&w&&E});f.vertexFormat=P.vertexFormat,this._primitive=a.add(new y({geometryInstances:new l({id:c,geometry:new d(f)}),appearance:P,asynchronous:!1}))}}if(!o&&S.getValueOrDefault(h.outline,i,!1)){f.vertexFormat=_.VERTEX_FORMAT;var M=S.getValueOrClonedDefault(h.outlineColor,i,e.BLACK,O),D=S.getValueOrDefault(h.outlineWidth,i,1),I=1!==M.alpha;this._outlinePrimitive=a.add(new y({geometryInstances:new l({id:c,geometry:new m(f),attributes:{color:t.fromColor(M)}}),appearance:new _({flat:!0,translucent:I,renderState:{lineWidth:r._scene.clampLineWidth(D)}}),asynchronous:!1}))}}}},A.prototype.getBoundingSphere=function(e,t){return E(e,this._primitive,this._outlinePrimitive,t)},A.prototype.isDestroyed=function(){return!1},A.prototype.destroy=function(){var e=this._primitives,t=this._groundPrimitives;this._geometryUpdater._onTerrain?t.removeAndDestroy(this._primitive):e.removeAndDestroy(this._primitive),e.removeAndDestroy(this._outlinePrimitive),o(this)},x}),define("Cesium/Shaders/Appearances/PolylineColorAppearanceVS",[],function(){"use strict";return"attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 prevPosition3DHigh;\nattribute vec3 prevPosition3DLow;\nattribute vec3 nextPosition3DHigh;\nattribute vec3 nextPosition3DLow;\nattribute vec2 expandAndWidth;\nattribute vec4 color;\n\nvarying vec4 v_color;\n\nvoid main() \n{\n float expandDir = expandAndWidth.x;\n float width = abs(expandAndWidth.y) + 0.5;\n bool usePrev = expandAndWidth.y < 0.0;\n \n vec4 p = czm_computePosition();\n vec4 prev = czm_computePrevPosition();\n vec4 next = czm_computeNextPosition();\n \n v_color = color;\n \n vec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev);\n gl_Position = czm_viewportOrthographic * positionWC;\n}\n"}),define("Cesium/Scene/PolylineColorAppearance",["../Core/defaultValue","../Core/defineProperties","../Core/VertexFormat","../Shaders/Appearances/PerInstanceFlatColorAppearanceFS","../Shaders/Appearances/PolylineColorAppearanceVS","../Shaders/PolylineCommon","./Appearance"],function(e,t,i,n,r,o,a){"use strict";function s(t){t=e(t,e.EMPTY_OBJECT);var i=e(t.translucent,!0),n=!1,r=s.VERTEX_FORMAT;this.material=void 0,this.translucent=i,this._vertexShaderSource=e(t.vertexShaderSource,l),this._fragmentShaderSource=e(t.fragmentShaderSource,u),this._renderState=a.getDefaultRenderState(i,n,t.renderState),this._closed=n,this._vertexFormat=r}var l=o+"\n"+r,u=n;return t(s.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},vertexFormat:{get:function(){return this._vertexFormat}}}),s.VERTEX_FORMAT=i.POSITION_ONLY,s.prototype.getFragmentShaderSource=a.prototype.getFragmentShaderSource,s.prototype.isTranslucent=a.prototype.isTranslucent,s.prototype.getRenderState=a.prototype.getRenderState,s}),define("Cesium/Shaders/Appearances/PolylineMaterialAppearanceVS",[],function(){"use strict";return"attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 prevPosition3DHigh;\nattribute vec3 prevPosition3DLow;\nattribute vec3 nextPosition3DHigh;\nattribute vec3 nextPosition3DLow;\nattribute vec2 expandAndWidth;\nattribute vec2 st;\n\nvarying float v_width;\nvarying vec2 v_st;\n\nvoid main() \n{\n float expandDir = expandAndWidth.x;\n float width = abs(expandAndWidth.y) + 0.5;\n bool usePrev = expandAndWidth.y < 0.0;\n \n vec4 p = czm_computePosition();\n vec4 prev = czm_computePrevPosition();\n vec4 next = czm_computeNextPosition();\n \n v_width = width;\n v_st = st;\n \n vec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev);\n gl_Position = czm_viewportOrthographic * positionWC;\n}\n"}),define("Cesium/Scene/PolylineMaterialAppearance",["../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/VertexFormat","../Shaders/Appearances/PolylineMaterialAppearanceVS","../Shaders/PolylineCommon","../Shaders/PolylineFS","./Appearance","./Material"],function(e,t,i,n,r,o,a,s,l){"use strict";function u(i){i=e(i,e.EMPTY_OBJECT);var n=e(i.translucent,!0),r=!1,o=u.VERTEX_FORMAT;this.material=t(i.material)?i.material:l.fromType(l.ColorType),this.translucent=n,this._vertexShaderSource=e(i.vertexShaderSource,c),this._fragmentShaderSource=e(i.fragmentShaderSource,h),this._renderState=s.getDefaultRenderState(n,r,i.renderState),this._closed=r,this._vertexFormat=o}var c=o+"\n"+r,h=a;return i(u.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},vertexFormat:{get:function(){return this._vertexFormat}}}),u.VERTEX_FORMAT=n.POSITION_AND_ST,u.prototype.getFragmentShaderSource=s.prototype.getFragmentShaderSource,u.prototype.isTranslucent=s.prototype.isTranslucent,u.prototype.getRenderState=s.prototype.getRenderState,u}),define("Cesium/DataSources/PolylineGeometryUpdater",["../Core/BoundingSphere","../Core/Color","../Core/ColorGeometryInstanceAttribute","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/destroyObject","../Core/DeveloperError","../Core/Ellipsoid","../Core/Event","../Core/GeometryInstance","../Core/Iso8601","../Core/PolylineGeometry","../Core/PolylinePipeline","../Core/ShowGeometryInstanceAttribute","../Scene/PolylineCollection","../Scene/PolylineColorAppearance","../Scene/PolylineMaterialAppearance","./BoundingSphereState","./ColorMaterialProperty","./ConstantProperty","./MaterialProperty","./Property"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g,v,_,y,C,w,E){"use strict";function b(e){this.id=e,this.vertexFormat=void 0,this.positions=void 0,this.width=void 0,this.followSurface=void 0,this.granularity=void 0}function S(e,t){this._entity=e,this._scene=t,this._entitySubscription=e.definitionChanged.addEventListener(S.prototype._onEntityPropertyChanged,this),this._fillEnabled=!1,this._dynamic=!1,this._geometryChanged=new u,this._showProperty=void 0,this._materialProperty=void 0,this._options=new b(e),this._onEntityPropertyChanged(e,"polyline",e.polyline,void 0)}function T(e,t){var i=t._scene.id,n=x[i];!r(n)||n.isDestroyed()?(n=new f,x[i]=n,e.add(n)):e.contains(n)||e.add(n);var o=n.add();o.id=t._entity,this._line=o,this._primitives=e,this._geometryUpdater=t,this._positions=[],M.ellipsoid=t._scene.globe.ellipsoid}var x={},A=new y(t.WHITE),P=new C(!0);o(S,{perInstanceColorAppearanceType:{value:g},materialAppearanceType:{value:v}}),o(S.prototype,{entity:{get:function(){return this._entity}},fillEnabled:{get:function(){return this._fillEnabled}},hasConstantFill:{get:function(){return!this._fillEnabled||!r(this._entity.availability)&&E.isConstant(this._showProperty)}},fillMaterialProperty:{get:function(){return this._materialProperty}},outlineEnabled:{value:!1},hasConstantOutline:{value:!0},outlineColorProperty:{value:void 0},isDynamic:{get:function(){return this._dynamic}},isClosed:{value:!1},geometryChanged:{get:function(){return this._geometryChanged}}}),S.prototype.isOutlineVisible=function(e){return!1},S.prototype.isFilled=function(e){var t=this._entity;return this._fillEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e)},S.prototype.createFillGeometryInstance=function(e){var n,o,a=this._entity,s=a.isAvailable(e),l=new m(s&&a.isShowing&&this._showProperty.getValue(e));if(this._materialProperty instanceof y){var u=t.WHITE;r(this._materialProperty.color)&&(this._materialProperty.color.isConstant||s)&&(u=this._materialProperty.color.getValue(e)),n=i.fromColor(u),o={show:l,color:n}}else o={show:l};return new c({id:a,geometry:new d(this._options),attributes:o})},S.prototype.createOutlineGeometryInstance=function(e){},S.prototype.isDestroyed=function(){return!1},S.prototype.destroy=function(){this._entitySubscription(),a(this)},S.prototype._onEntityPropertyChanged=function(e,t,i,o){if("availability"===t||"polyline"===t){var a=this._entity.polyline;if(!r(a))return void(this._fillEnabled&&(this._fillEnabled=!1,this._geometryChanged.raiseEvent(this)));var s=a.positions,l=a.show;if(r(l)&&l.isConstant&&!l.getValue(h.MINIMUM_VALUE)||!r(s))return void(this._fillEnabled&&(this._fillEnabled=!1,this._geometryChanged.raiseEvent(this)));var u=n(a.material,A),c=u instanceof y;this._materialProperty=u,this._showProperty=n(l,P),this._fillEnabled=!0;var d=a.width,p=a.followSurface,m=a.granularity;if(s.isConstant&&E.isConstant(d)&&E.isConstant(p)&&E.isConstant(m)){var f=this._options,_=s.getValue(h.MINIMUM_VALUE,f.positions);if(!r(_)||_.length<2)return void(this._fillEnabled&&(this._fillEnabled=!1,this._geometryChanged.raiseEvent(this)));f.vertexFormat=c?g.VERTEX_FORMAT:v.VERTEX_FORMAT,f.positions=_,f.width=r(d)?d.getValue(h.MINIMUM_VALUE):void 0,f.followSurface=r(p)?p.getValue(h.MINIMUM_VALUE):void 0,f.granularity=r(m)?m.getValue(h.MINIMUM_VALUE):void 0,this._dynamic=!1,this._geometryChanged.raiseEvent(this)}else this._dynamic||(this._dynamic=!0,this._geometryChanged.raiseEvent(this))}},S.prototype.createDynamicUpdater=function(e){return new T(e,this)};var M={positions:void 0,granularity:void 0,height:void 0,ellipsoid:void 0};return T.prototype.update=function(e){var t=this._geometryUpdater,i=t._entity,n=i.polyline,o=this._line;if(!i.isShowing||!i.isAvailable(e)||!E.getValueOrDefault(n._show,e,!0))return void(o.show=!1);var a=n.positions,s=E.getValueOrUndefined(a,e,this._positions);if(!r(s)||s.length<2)return void(o.show=!1);var l=E.getValueOrDefault(n._followSurface,e,!0);l&&(M.positions=s,M.granularity=E.getValueOrUndefined(n._granularity,e),M.height=p.extractHeights(s,this._geometryUpdater._scene.globe.ellipsoid),s=p.generateCartesianArc(M)),o.show=!0,o.positions=s.slice(),o.material=w.getValue(e,t.fillMaterialProperty,o.material),o.width=E.getValueOrDefault(n._width,e,1)},T.prototype.getBoundingSphere=function(t,i){var n=this._line;return n.show&&n.positions.length>0?(e.fromPoints(n.positions,i),_.DONE):_.FAILED},T.prototype.isDestroyed=function(){return!1},T.prototype.destroy=function(){var e=this._geometryUpdater,t=e._scene.id,i=x[t];i.remove(this._line),0===i.length&&(this._primitives.removeAndDestroy(i),delete x[t]),a(this)},S}),define("Cesium/DataSources/PolylineVolumeGeometryUpdater",["../Core/Color","../Core/ColorGeometryInstanceAttribute","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/destroyObject","../Core/DeveloperError","../Core/Event","../Core/GeometryInstance","../Core/Iso8601","../Core/PolylineVolumeGeometry","../Core/PolylineVolumeOutlineGeometry","../Core/ShowGeometryInstanceAttribute","../Scene/MaterialAppearance","../Scene/PerInstanceColorAppearance","../Scene/Primitive","./ColorMaterialProperty","./ConstantProperty","./dynamicGeometryGetBoundingSphere","./MaterialProperty","./Property"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g,v,_,y,C){"use strict";function w(e){this.id=e,this.vertexFormat=void 0,this.polylinePositions=void 0,this.shapePositions=void 0,this.cornerType=void 0,this.granularity=void 0}function E(e,t){this._entity=e,this._scene=t,this._entitySubscription=e.definitionChanged.addEventListener(E.prototype._onEntityPropertyChanged,this),this._fillEnabled=!1,this._dynamic=!1,this._outlineEnabled=!1,this._geometryChanged=new s,this._showProperty=void 0,this._materialProperty=void 0,this._hasConstantOutline=!0,this._showOutlineProperty=void 0,this._outlineColorProperty=void 0,this._outlineWidth=1,this._options=new w(e),this._onEntityPropertyChanged(e,"polylineVolume",e.polylineVolume,void 0)}function b(e,t){this._primitives=e,this._primitive=void 0,this._outlinePrimitive=void 0,this._geometryUpdater=t,this._options=new w(t._entity)}var S=new g(e.WHITE),T=new v(!0),x=new v(!0),A=new v(!1),P=new v(e.BLACK),M=new e;return r(E,{perInstanceColorAppearanceType:{value:m},materialAppearanceType:{value:p}}),r(E.prototype,{entity:{get:function(){return this._entity}},fillEnabled:{get:function(){return this._fillEnabled}},hasConstantFill:{get:function(){return!this._fillEnabled||!n(this._entity.availability)&&C.isConstant(this._showProperty)&&C.isConstant(this._fillProperty)}},fillMaterialProperty:{get:function(){return this._materialProperty}},outlineEnabled:{get:function(){return this._outlineEnabled}},hasConstantOutline:{get:function(){return!this._outlineEnabled||!n(this._entity.availability)&&C.isConstant(this._showProperty)&&C.isConstant(this._showOutlineProperty)}},outlineColorProperty:{get:function(){return this._outlineColorProperty}},outlineWidth:{get:function(){return this._outlineWidth}},isDynamic:{get:function(){return this._dynamic}},isClosed:{value:!0},geometryChanged:{get:function(){return this._geometryChanged}}}),E.prototype.isOutlineVisible=function(e){var t=this._entity;return this._outlineEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)},E.prototype.isFilled=function(e){var t=this._entity;return this._fillEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)},E.prototype.createFillGeometryInstance=function(i){var r,o,a=this._entity,s=a.isAvailable(i),u=new d(s&&a.isShowing&&this._showProperty.getValue(i)&&this._fillProperty.getValue(i));if(this._materialProperty instanceof g){var h=e.WHITE;n(this._materialProperty.color)&&(this._materialProperty.color.isConstant||s)&&(h=this._materialProperty.color.getValue(i)),o=t.fromColor(h),r={show:u,color:o}}else r={show:u};return new l({id:a,geometry:new c(this._options),attributes:r})},E.prototype.createOutlineGeometryInstance=function(i){var n=this._entity,r=n.isAvailable(i),o=C.getValueOrDefault(this._outlineColorProperty,i,e.BLACK);return new l({id:n,geometry:new h(this._options),attributes:{show:new d(r&&n.isShowing&&this._showProperty.getValue(i)&&this._showOutlineProperty.getValue(i)),color:t.fromColor(o)}})},E.prototype.isDestroyed=function(){return!1},E.prototype.destroy=function(){this._entitySubscription(),o(this)},E.prototype._onEntityPropertyChanged=function(e,t,r,o){if("availability"===t||"polylineVolume"===t){var a=this._entity.polylineVolume;if(!n(a))return void((this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this)));var s=a.fill,l=n(s)&&s.isConstant?s.getValue(u.MINIMUM_VALUE):!0,c=a.outline,h=n(c);if(h&&c.isConstant&&(h=c.getValue(u.MINIMUM_VALUE)),!l&&!h)return void((this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this)));var d=a.positions,f=a.shape,v=a.show;if(!n(d)||!n(f)||n(v)&&v.isConstant&&!v.getValue(u.MINIMUM_VALUE))return void((this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this)));var _=i(a.material,S),y=_ instanceof g;this._materialProperty=_,this._fillProperty=i(s,x),this._showProperty=i(v,T),this._showOutlineProperty=i(a.outline,A),this._outlineColorProperty=h?i(a.outlineColor,P):void 0;var w=a.granularity,E=a.outlineWidth,b=a.cornerType;if(this._fillEnabled=l,this._outlineEnabled=h,d.isConstant&&f.isConstant&&C.isConstant(w)&&C.isConstant(E)&&C.isConstant(b)){var M=this._options;M.vertexFormat=y?m.VERTEX_FORMAT:p.MaterialSupport.TEXTURED.vertexFormat,M.polylinePositions=d.getValue(u.MINIMUM_VALUE,M.polylinePositions),M.shapePositions=f.getValue(u.MINIMUM_VALUE,M.shape),M.granularity=n(w)?w.getValue(u.MINIMUM_VALUE):void 0,M.cornerType=n(b)?b.getValue(u.MINIMUM_VALUE):void 0,this._outlineWidth=n(E)?E.getValue(u.MINIMUM_VALUE):1,this._dynamic=!1,this._geometryChanged.raiseEvent(this)}else this._dynamic||(this._dynamic=!0,this._geometryChanged.raiseEvent(this))}},E.prototype.createDynamicUpdater=function(e){return new b(e,this)},b.prototype.update=function(i){var r=this._primitives;r.removeAndDestroy(this._primitive),r.removeAndDestroy(this._outlinePrimitive),this._primitive=void 0,this._outlinePrimitive=void 0;var o=this._geometryUpdater,a=o._entity,s=a.polylineVolume;if(a.isShowing&&a.isAvailable(i)&&C.getValueOrDefault(s.show,i,!0)){var u=this._options,d=C.getValueOrUndefined(s.positions,i,u.polylinePositions),g=C.getValueOrUndefined(s.shape,i);if(n(d)&&n(g)){if(u.polylinePositions=d,u.shapePositions=g,u.granularity=C.getValueOrUndefined(s.granularity,i),u.cornerType=C.getValueOrUndefined(s.cornerType,i),!n(s.fill)||s.fill.getValue(i)){var v=y.getValue(i,o.fillMaterialProperty,this._material);this._material=v;var _=new p({material:v,translucent:v.isTranslucent(),closed:!0});u.vertexFormat=_.vertexFormat,this._primitive=r.add(new f({geometryInstances:new l({id:a,geometry:new c(u)}),appearance:_,asynchronous:!1}))}if(n(s.outline)&&s.outline.getValue(i)){u.vertexFormat=m.VERTEX_FORMAT;var w=C.getValueOrClonedDefault(s.outlineColor,i,e.BLACK,M),E=C.getValueOrDefault(s.outlineWidth,i,1),b=1!==w.alpha;this._outlinePrimitive=r.add(new f({geometryInstances:new l({id:a,geometry:new h(u),attributes:{color:t.fromColor(w)}}),appearance:new m({flat:!0,translucent:b,renderState:{lineWidth:o._scene.clampLineWidth(E)}}),asynchronous:!1}))}}}},b.prototype.getBoundingSphere=function(e,t){return _(e,this._primitive,this._outlinePrimitive,t)},b.prototype.isDestroyed=function(){return!1},b.prototype.destroy=function(){var e=this._primitives;e.removeAndDestroy(this._primitive),e.removeAndDestroy(this._outlinePrimitive),o(this)},E}),define("Cesium/DataSources/RectangleGeometryUpdater",["../Core/Color","../Core/ColorGeometryInstanceAttribute","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/destroyObject","../Core/DeveloperError","../Core/Event","../Core/GeometryInstance","../Core/Iso8601","../Core/oneTimeWarning","../Core/RectangleGeometry","../Core/RectangleOutlineGeometry","../Core/ShowGeometryInstanceAttribute","../Scene/GroundPrimitive","../Scene/MaterialAppearance","../Scene/PerInstanceColorAppearance","../Scene/Primitive","./ColorMaterialProperty","./ConstantProperty","./dynamicGeometryGetBoundingSphere","./MaterialProperty","./Property"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g,v,_,y,C,w,E){"use strict";function b(e){this.id=e,this.vertexFormat=void 0,this.rectangle=void 0,this.closeBottom=void 0,this.closeTop=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.stRotation=void 0,this.rotation=void 0}function S(e,t){this._entity=e,this._scene=t,this._entitySubscription=e.definitionChanged.addEventListener(S.prototype._onEntityPropertyChanged,this),this._fillEnabled=!1,this._isClosed=!1,this._dynamic=!1,this._outlineEnabled=!1,this._geometryChanged=new s,this._showProperty=void 0,this._materialProperty=void 0,this._hasConstantOutline=!0,this._showOutlineProperty=void 0,this._outlineColorProperty=void 0,this._outlineWidth=1,this._onTerrain=!1,this._options=new b(e),this._onEntityPropertyChanged(e,"rectangle",e.rectangle,void 0)}function T(e,t,i){this._primitives=e,this._groundPrimitives=t,this._primitive=void 0,this._outlinePrimitive=void 0,this._geometryUpdater=i,this._options=new b(i._entity)}var x=new _(e.WHITE),A=new y(!0),P=new y(!0),M=new y(!1),D=new y(e.BLACK),I=new e;return r(S,{perInstanceColorAppearanceType:{value:g},materialAppearanceType:{value:f}}),r(S.prototype,{entity:{get:function(){return this._entity}},fillEnabled:{get:function(){return this._fillEnabled}},hasConstantFill:{get:function(){return!this._fillEnabled||!n(this._entity.availability)&&E.isConstant(this._showProperty)&&E.isConstant(this._fillProperty)}},fillMaterialProperty:{get:function(){return this._materialProperty}},outlineEnabled:{get:function(){return this._outlineEnabled}},hasConstantOutline:{get:function(){return!this._outlineEnabled||!n(this._entity.availability)&&E.isConstant(this._showProperty)&&E.isConstant(this._showOutlineProperty)}},outlineColorProperty:{get:function(){return this._outlineColorProperty}},outlineWidth:{get:function(){return this._outlineWidth}},isDynamic:{get:function(){return this._dynamic}},isClosed:{get:function(){return this._isClosed}},onTerrain:{get:function(){return this._onTerrain}},geometryChanged:{get:function(){return this._geometryChanged}}}),S.prototype.isOutlineVisible=function(e){var t=this._entity;return this._outlineEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)},S.prototype.isFilled=function(e){var t=this._entity;return this._fillEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)},S.prototype.createFillGeometryInstance=function(i){var r,o,a=this._entity,s=a.isAvailable(i),u=new p(s&&a.isShowing&&this._showProperty.getValue(i)&&this._fillProperty.getValue(i));if(this._materialProperty instanceof _){var c=e.WHITE;n(this._materialProperty.color)&&(this._materialProperty.color.isConstant||s)&&(c=this._materialProperty.color.getValue(i)),o=t.fromColor(c),r={show:u,color:o}}else r={show:u};return new l({id:a,geometry:new h(this._options),attributes:r})},S.prototype.createOutlineGeometryInstance=function(i){var n=this._entity,r=n.isAvailable(i),o=E.getValueOrDefault(this._outlineColorProperty,i,e.BLACK);return new l({id:n,geometry:new d(this._options),attributes:{show:new p(r&&n.isShowing&&this._showProperty.getValue(i)&&this._showOutlineProperty.getValue(i)),color:t.fromColor(o)}})},S.prototype.isDestroyed=function(){return!1},S.prototype.destroy=function(){this._entitySubscription(),o(this)},S.prototype._onEntityPropertyChanged=function(e,t,r,o){if("availability"===t||"rectangle"===t){var a=this._entity.rectangle;if(!n(a))return void((this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this)));var s=a.fill,l=n(s)&&s.isConstant?s.getValue(u.MINIMUM_VALUE):!0,h=a.outline,d=n(h);if(d&&h.isConstant&&(d=h.getValue(u.MINIMUM_VALUE)),!l&&!d)return void((this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this)));var p=a.coordinates,v=a.show;if(n(v)&&v.isConstant&&!v.getValue(u.MINIMUM_VALUE)||!n(p))return void((this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this)));var y=i(a.material,x),C=y instanceof _;this._materialProperty=y,this._fillProperty=i(s,P),this._showProperty=i(v,A),this._showOutlineProperty=i(a.outline,M),this._outlineColorProperty=d?i(a.outlineColor,D):void 0;var w=a.height,b=a.extrudedHeight,S=a.granularity,T=a.stRotation,I=a.rotation,R=a.outlineWidth,O=a.closeBottom,L=a.closeTop,N=l&&!n(w)&&!n(b)&&C&&m.isSupported(this._scene);if(d&&N&&(c(c.geometryOutlines),d=!1),this._fillEnabled=l,this._onTerrain=N,this._outlineEnabled=d,p.isConstant&&E.isConstant(w)&&E.isConstant(b)&&E.isConstant(S)&&E.isConstant(T)&&E.isConstant(I)&&E.isConstant(R)&&E.isConstant(O)&&E.isConstant(L)){var F=this._options;F.vertexFormat=C?g.VERTEX_FORMAT:f.MaterialSupport.TEXTURED.vertexFormat,F.rectangle=p.getValue(u.MINIMUM_VALUE,F.rectangle),F.height=n(w)?w.getValue(u.MINIMUM_VALUE):void 0,F.extrudedHeight=n(b)?b.getValue(u.MINIMUM_VALUE):void 0,F.granularity=n(S)?S.getValue(u.MINIMUM_VALUE):void 0,F.stRotation=n(T)?T.getValue(u.MINIMUM_VALUE):void 0,F.rotation=n(I)?I.getValue(u.MINIMUM_VALUE):void 0,F.closeBottom=n(O)?O.getValue(u.MINIMUM_VALUE):void 0,F.closeTop=n(L)?L.getValue(u.MINIMUM_VALUE):void 0,this._isClosed=n(b)&&n(F.closeTop)&&n(F.closeBottom)&&F.closeTop&&F.closeBottom,this._outlineWidth=n(R)?R.getValue(u.MINIMUM_VALUE):1,this._dynamic=!1,this._geometryChanged.raiseEvent(this)}else this._dynamic||(this._dynamic=!0,this._geometryChanged.raiseEvent(this))}},S.prototype.createDynamicUpdater=function(e,t){return new T(e,t,this)},T.prototype.update=function(i){var r=this._geometryUpdater,o=r._onTerrain,a=this._primitives,s=this._groundPrimitives;o?s.removeAndDestroy(this._primitive):(a.removeAndDestroy(this._primitive),a.removeAndDestroy(this._outlinePrimitive),this._outlinePrimitive=void 0),this._primitive=void 0;var u=r._entity,c=u.rectangle;if(u.isShowing&&u.isAvailable(i)&&E.getValueOrDefault(c.show,i,!0)){var p=this._options,_=E.getValueOrUndefined(c.coordinates,i,p.rectangle);if(n(_)){if(p.rectangle=_,p.height=E.getValueOrUndefined(c.height,i),p.extrudedHeight=E.getValueOrUndefined(c.extrudedHeight,i),p.granularity=E.getValueOrUndefined(c.granularity,i),p.stRotation=E.getValueOrUndefined(c.stRotation,i),p.rotation=E.getValueOrUndefined(c.rotation,i),p.closeBottom=E.getValueOrUndefined(c.closeBottom,i),p.closeTop=E.getValueOrUndefined(c.closeTop,i),E.getValueOrDefault(c.fill,i,!0)){var y=r.fillMaterialProperty,C=w.getValue(i,y,this._material);if(this._material=C,o){var b=e.WHITE;n(y.color)&&(b=y.color.getValue(i)),this._primitive=s.add(new m({geometryInstance:new l({id:u,geometry:new h(p),attributes:{color:t.fromColor(b)}}),asynchronous:!1}))}else{var S=new f({material:C,translucent:C.isTranslucent(),closed:n(p.extrudedHeight)});p.vertexFormat=S.vertexFormat,this._primitive=a.add(new v({geometryInstances:new l({id:u,geometry:new h(p)}),appearance:S,asynchronous:!1}))}}if(!o&&E.getValueOrDefault(c.outline,i,!1)){p.vertexFormat=g.VERTEX_FORMAT;var T=E.getValueOrClonedDefault(c.outlineColor,i,e.BLACK,I),x=E.getValueOrDefault(c.outlineWidth,i,1),A=1!==T.alpha;this._outlinePrimitive=a.add(new v({geometryInstances:new l({id:u,geometry:new d(p),attributes:{color:t.fromColor(T)}}),appearance:new g({flat:!0,translucent:A,renderState:{lineWidth:r._scene.clampLineWidth(x)}}),asynchronous:!1}))}}}},T.prototype.getBoundingSphere=function(e,t){return C(e,this._primitive,this._outlinePrimitive,t)},T.prototype.isDestroyed=function(){return!1},T.prototype.destroy=function(){var e=this._primitives,t=this._groundPrimitives;this._geometryUpdater._onTerrain?t.removeAndDestroy(this._primitive):e.removeAndDestroy(this._primitive),e.removeAndDestroy(this._outlinePrimitive),o(this)},S}),define("Cesium/DataSources/WallGeometryUpdater",["../Core/Color","../Core/ColorGeometryInstanceAttribute","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/destroyObject","../Core/DeveloperError","../Core/Event","../Core/GeometryInstance","../Core/Iso8601","../Core/ShowGeometryInstanceAttribute","../Core/WallGeometry","../Core/WallOutlineGeometry","../Scene/MaterialAppearance","../Scene/PerInstanceColorAppearance","../Scene/Primitive","./ColorMaterialProperty","./ConstantProperty","./dynamicGeometryGetBoundingSphere","./MaterialProperty","./Property"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g,v,_,y,C){"use strict";function w(e){this.id=e,this.vertexFormat=void 0,this.positions=void 0,this.minimumHeights=void 0,this.maximumHeights=void 0,this.granularity=void 0}function E(e,t){this._entity=e,this._scene=t,this._entitySubscription=e.definitionChanged.addEventListener(E.prototype._onEntityPropertyChanged,this),this._fillEnabled=!1,this._dynamic=!1,this._outlineEnabled=!1,this._geometryChanged=new s,this._showProperty=void 0,this._materialProperty=void 0,this._hasConstantOutline=!0,this._showOutlineProperty=void 0,this._outlineColorProperty=void 0,this._outlineWidth=1,this._options=new w(e),this._onEntityPropertyChanged(e,"wall",e.wall,void 0)}function b(e,t){this._primitives=e,this._primitive=void 0,this._outlinePrimitive=void 0,this._geometryUpdater=t,this._options=new w(t._entity)}var S=new g(e.WHITE),T=new v(!0),x=new v(!0),A=new v(!1),P=new v(e.BLACK),M=new e;return r(E,{perInstanceColorAppearanceType:{value:m},materialAppearanceType:{value:p}}),r(E.prototype,{entity:{get:function(){return this._entity}},fillEnabled:{get:function(){return this._fillEnabled}},hasConstantFill:{get:function(){return!this._fillEnabled||!n(this._entity.availability)&&C.isConstant(this._showProperty)&&C.isConstant(this._fillProperty)}},fillMaterialProperty:{get:function(){return this._materialProperty}},outlineEnabled:{get:function(){return this._outlineEnabled}},hasConstantOutline:{get:function(){return!this._outlineEnabled||!n(this._entity.availability)&&C.isConstant(this._showProperty)&&C.isConstant(this._showOutlineProperty)}},outlineColorProperty:{get:function(){return this._outlineColorProperty}},outlineWidth:{get:function(){return this._outlineWidth}},isDynamic:{get:function(){return this._dynamic}},isClosed:{get:function(){return!1}},geometryChanged:{get:function(){return this._geometryChanged}}}),E.prototype.isOutlineVisible=function(e){var t=this._entity;return this._outlineEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)},E.prototype.isFilled=function(e){var t=this._entity;return this._fillEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)},E.prototype.createFillGeometryInstance=function(i){var r,o,a=this._entity,s=a.isAvailable(i),u=new c(s&&a.isShowing&&this._showProperty.getValue(i)&&this._fillProperty.getValue(i));if(this._materialProperty instanceof g){var d=e.WHITE;n(this._materialProperty.color)&&(this._materialProperty.color.isConstant||s)&&(d=this._materialProperty.color.getValue(i)),o=t.fromColor(d),r={show:u,color:o}}else r={show:u};return new l({id:a,geometry:new h(this._options),attributes:r})},E.prototype.createOutlineGeometryInstance=function(i){var n=this._entity,r=n.isAvailable(i),o=C.getValueOrDefault(this._outlineColorProperty,i,e.BLACK);return new l({id:n,geometry:new d(this._options),attributes:{show:new c(r&&n.isShowing&&this._showProperty.getValue(i)&&this._showOutlineProperty.getValue(i)),color:t.fromColor(o)}})},E.prototype.isDestroyed=function(){return!1},E.prototype.destroy=function(){this._entitySubscription(),o(this)},E.prototype._onEntityPropertyChanged=function(e,t,r,o){if("availability"===t||"wall"===t){var a=this._entity.wall;if(!n(a))return void((this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this)));var s=a.fill,l=n(s)&&s.isConstant?s.getValue(u.MINIMUM_VALUE):!0,c=a.outline,h=n(c);if(h&&c.isConstant&&(h=c.getValue(u.MINIMUM_VALUE)),!l&&!h)return void((this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this)));var d=a.positions,f=a.show;if(n(f)&&f.isConstant&&!f.getValue(u.MINIMUM_VALUE)||!n(d))return void((this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this)));var v=i(a.material,S),_=v instanceof g;this._materialProperty=v,this._fillProperty=i(s,x),this._showProperty=i(f,T),this._showOutlineProperty=i(a.outline,A),this._outlineColorProperty=h?i(a.outlineColor,P):void 0;var y=a.minimumHeights,w=a.maximumHeights,E=a.outlineWidth,b=a.granularity;if(this._fillEnabled=l,this._outlineEnabled=h,d.isConstant&&C.isConstant(y)&&C.isConstant(w)&&C.isConstant(E)&&C.isConstant(b)){var M=this._options;M.vertexFormat=_?m.VERTEX_FORMAT:p.MaterialSupport.TEXTURED.vertexFormat,M.positions=d.getValue(u.MINIMUM_VALUE,M.positions),M.minimumHeights=n(y)?y.getValue(u.MINIMUM_VALUE,M.minimumHeights):void 0,M.maximumHeights=n(w)?w.getValue(u.MINIMUM_VALUE,M.maximumHeights):void 0,M.granularity=n(b)?b.getValue(u.MINIMUM_VALUE):void 0,this._outlineWidth=n(E)?E.getValue(u.MINIMUM_VALUE):1,this._dynamic=!1,this._geometryChanged.raiseEvent(this)}else this._dynamic||(this._dynamic=!0,this._geometryChanged.raiseEvent(this))}},E.prototype.createDynamicUpdater=function(e){return new b(e,this)},b.prototype.update=function(i){var r=this._primitives;r.removeAndDestroy(this._primitive),r.removeAndDestroy(this._outlinePrimitive),this._primitive=void 0,this._outlinePrimitive=void 0;var o=this._geometryUpdater,a=o._entity,s=a.wall;if(a.isShowing&&a.isAvailable(i)&&C.getValueOrDefault(s.show,i,!0)){ +var u=this._options,c=C.getValueOrUndefined(s.positions,i,u.positions);if(n(c)){if(u.positions=c,u.minimumHeights=C.getValueOrUndefined(s.minimumHeights,i,u.minimumHeights),u.maximumHeights=C.getValueOrUndefined(s.maximumHeights,i,u.maximumHeights),u.granularity=C.getValueOrUndefined(s.granularity,i),C.getValueOrDefault(s.fill,i,!0)){var g=y.getValue(i,o.fillMaterialProperty,this._material);this._material=g;var v=new p({material:g,translucent:g.isTranslucent(),closed:n(u.extrudedHeight)});u.vertexFormat=v.vertexFormat,this._primitive=r.add(new f({geometryInstances:new l({id:a,geometry:new h(u)}),appearance:v,asynchronous:!1}))}if(C.getValueOrDefault(s.outline,i,!1)){u.vertexFormat=m.VERTEX_FORMAT;var _=C.getValueOrClonedDefault(s.outlineColor,i,e.BLACK,M),w=C.getValueOrDefault(s.outlineWidth,i,1),E=1!==_.alpha;this._outlinePrimitive=r.add(new f({geometryInstances:new l({id:a,geometry:new d(u),attributes:{color:t.fromColor(_)}}),appearance:new m({flat:!0,translucent:E,renderState:{lineWidth:o._scene.clampLineWidth(w)}}),asynchronous:!1}))}}}},b.prototype.getBoundingSphere=function(e,t){return _(e,this._primitive,this._outlinePrimitive,t)},b.prototype.isDestroyed=function(){return!1},b.prototype.destroy=function(){var e=this._primitives;e.removeAndDestroy(this._primitive),e.removeAndDestroy(this._outlinePrimitive),o(this)},E}),define("Cesium/DataSources/DataSourceDisplay",["../Core/BoundingSphere","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/destroyObject","../Core/DeveloperError","../Core/EventHelper","./BillboardVisualizer","./BoundingSphereState","./BoxGeometryUpdater","./CorridorGeometryUpdater","./CustomDataSource","./CylinderGeometryUpdater","./EllipseGeometryUpdater","./EllipsoidGeometryUpdater","./GeometryVisualizer","./LabelVisualizer","./ModelVisualizer","./PathVisualizer","./PointVisualizer","./PolygonGeometryUpdater","./PolylineGeometryUpdater","./PolylineVolumeGeometryUpdater","./RectangleGeometryUpdater","./WallGeometryUpdater"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g,v,_,y,C,w,E,b,S){"use strict";function T(e){var i=e.scene,n=e.dataSourceCollection;this._eventHelper=new a,this._eventHelper.add(n.dataSourceAdded,this._onDataSourceAdded,this),this._eventHelper.add(n.dataSourceRemoved,this._onDataSourceRemoved,this),this._dataSourceCollection=n,this._scene=i,this._visualizersCallback=t(e.visualizersCallback,T.defaultVisualizersCallback);for(var r=0,o=n.length;o>r;r++)this._onDataSourceAdded(n,n.get(r));var s=new h;this._onDataSourceAdded(void 0,s),this._defaultDataSource=s,this._ready=!1}T.defaultVisualizersCallback=function(e,t){var i=t.entities;return[new s(e,i),new f(u,e,i),new f(d,e,i),new f(c,e,i),new f(p,e,i),new f(m,e,i),new f(C,e,i),new f(w,e,i),new f(E,e,i),new f(b,e,i),new f(S,e,i),new g(e,i),new v(e,i),new y(e,i),new _(e,i)]},n(T.prototype,{scene:{get:function(){return this._scene}},dataSources:{get:function(){return this._dataSourceCollection}},defaultDataSource:{get:function(){return this._defaultDataSource}},ready:{get:function(){return this._ready}}}),T.prototype.isDestroyed=function(){return!1},T.prototype.destroy=function(){this._eventHelper.removeAll();for(var e=this._dataSourceCollection,t=0,i=e.length;i>t;++t)this._onDataSourceRemoved(this._dataSourceCollection,e.get(t));return this._onDataSourceRemoved(void 0,this._defaultDataSource),r(this)},T.prototype.update=function(e){var t,n,r,o,a=!0,s=this._dataSourceCollection,l=s.length;for(t=0;l>t;t++){var u=s.get(t);for(i(u.update)&&(a=u.update(e)&&a),r=u._visualizers,o=r.length,n=0;o>n;n++)a=r[n].update(e)&&a}for(r=this._defaultDataSource._visualizers,o=r.length,n=0;o>n;n++)a=r[n].update(e)&&a;return this._ready=a,a};var x=[],A=new e;return T.prototype.getBoundingSphere=function(t,n,r){var o,a,s=this._defaultDataSource;if(!s.entities.contains(t)){s=void 0;var u=this._dataSourceCollection;for(a=u.length,o=0;a>o;o++){var c=u.get(o);if(c.entities.contains(t)){s=c;break}}}if(!i(s))return l.FAILED;var h=x,d=A,p=0,m=l.DONE,f=s._visualizers,g=f.length;for(o=0;g>o;o++){var v=f[o];if(i(v.getBoundingSphere)){if(m=f[o].getBoundingSphere(t,d),!n&&m===l.PENDING)return l.PENDING;m===l.DONE&&(h[p]=e.clone(d,h[p]),p++)}}return 0===p?l.FAILED:(h.length=p,e.fromBoundingSpheres(h,r),l.DONE)},T.prototype._onDataSourceAdded=function(e,t){var i=this._visualizersCallback(this._scene,t);t._visualizers=i},T.prototype._onDataSourceRemoved=function(e,t){for(var i=t._visualizers,n=i.length,r=0;n>r;r++)i[r].destroy(),t._visualizers=void 0},T}),define("Cesium/DataSources/DynamicGeometryUpdater",["../Core/DeveloperError"],function(e){"use strict";function t(){e.throwInstantiationError()}return t.prototype.update=e.throwInstantiationError,t.prototype.getBoundingSphere=e.throwInstantiationError,t.prototype.isDestroyed=e.throwInstantiationError,t.prototype.destroy=e.throwInstantiationError,t}),define("Cesium/DataSources/EntityView",["../Core/BoundingSphere","../Core/Cartesian3","../Core/Cartesian4","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Ellipsoid","../Core/HeadingPitchRange","../Core/JulianDate","../Core/Math","../Core/Matrix3","../Core/Matrix4","../Core/Transforms","../Scene/SceneMode"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m){"use strict";function f(e,i,n,o,a,s,l){var d=e.scene.mode,f=a.getValue(s,e._lastCartesian);if(r(f)){var g,M,D,I=!1;if(d===m.SCENE3D){A=u.addSeconds(s,.001,A);var R=a.getValue(A,w);if(r(R)){var O,L=p.computeFixedToIcrfMatrix(s,v),N=p.computeFixedToIcrfMatrix(A,_);r(L)&&r(N)?O=h.transpose(L,y):(O=p.computeTemeToPseudoFixedMatrix(s,y),L=h.transpose(O,v),N=p.computeTemeToPseudoFixedMatrix(A,_),h.transpose(N,N));var F=h.multiplyByVector(L,f,T),k=h.multiplyByVector(N,R,x);t.subtract(F,k,S);var B=1e3*t.magnitude(S),z=3986004418e5,V=-z/(B*B-2*z/t.magnitude(F));0>V||V>P*l.maximumRadius?(g=E,t.normalize(f,g),t.negate(g,g),D=t.clone(t.UNIT_Z,b),M=t.cross(D,g,w),t.magnitude(M)>c.EPSILON7&&(t.normalize(g,g),t.normalize(M,M),D=t.cross(g,M,b),t.normalize(D,D),I=!0)):t.equalsEpsilon(f,R,c.EPSILON7)||(D=E,t.normalize(F,D),t.normalize(k,k),M=t.cross(D,k,b),t.equalsEpsilon(M,t.ZERO,c.EPSILON7)||(g=t.cross(M,D,w),h.multiplyByVector(O,g,g),h.multiplyByVector(O,M,M),h.multiplyByVector(O,D,D),t.normalize(g,g),t.normalize(M,M),t.normalize(D,D),I=!0))}}r(e.boundingSphere)&&(f=e.boundingSphere.center);var U,G,W;o&&(U=t.clone(i.position,S),G=t.clone(i.direction,T),W=t.clone(i.up,x));var H=C;I?(H[0]=g.x,H[1]=g.y,H[2]=g.z,H[3]=0,H[4]=M.x,H[5]=M.y,H[6]=M.z,H[7]=0,H[8]=D.x,H[9]=D.y,H[10]=D.z,H[11]=0,H[12]=f.x,H[13]=f.y,H[14]=f.z,H[15]=0):p.eastNorthUpToFixedFrame(f,l,H),i._setTransform(H),o&&(t.clone(U,i.position),t.clone(G,i.direction),t.clone(W,i.up),t.cross(G,W,i.right))}if(n){var q=d===m.SCENE2D||t.equals(e._offset3D,t.ZERO)?void 0:e._offset3D;i.lookAtTransform(i.transform,q)}}function g(e,i,r){this.entity=e,this.scene=i,this.ellipsoid=n(r,s.WGS84),this.boundingSphere=void 0,this._lastEntity=void 0,this._mode=void 0,this._lastCartesian=new t,this._defaultOffset3D=void 0,this._offset3D=new t}var v=new h,_=new h,y=new h,C=new d,w=new t,E=new t,b=new t,S=new t,T=new t,x=new t,A=new u,P=1.25;o(g,{defaultOffset3D:{get:function(){return this._defaultOffset3D},set:function(e){this._defaultOffset3D=t.clone(e,new t)}}}),g.defaultOffset3D=new t(-14e3,3500,3500);var M=new l,D=new t;return g.prototype.update=function(e,i){var n=this.scene,o=this.entity,a=this.ellipsoid,s=n.mode;if(s!==m.MORPHING){var l=o.position,u=o!==this._lastEntity,h=s!==this._mode,d=this._offset3D,p=n.camera,v=u||h,_=!0;if(u){var y=o.viewFrom,C=r(y);if(!C&&r(i)){var w=n.screenSpaceCameraController;w.minimumZoomDistance=Math.min(w.minimumZoomDistance,.5*i.radius),M.pitch=-c.PI_OVER_FOUR,M.range=0;var E=l.getValue(e,D);if(r(E)){var b=2-1/Math.max(1,t.magnitude(E)/a.maximumRadius);M.pitch*=b}p.viewBoundingSphere(i,M),this.boundingSphere=i,v=!1,_=!1}else C&&r(y.getValue(e,d))||t.clone(g._defaultOffset3D,d)}else h||n.mode===m.MORPHING||this._mode===m.SCENE2D||t.clone(p.position,d);this._lastEntity=o,this._mode=n.mode!==m.MORPHING?n.mode:this._mode,n.mode!==m.MORPHING&&f(this,p,v,_,l,e,a)}},g}),!function(){function e(e,t){function i(t){var i,n=e.arcs[0>t?~t:t],r=n[0];return e.transform?(i=[0,0],n.forEach(function(e){i[0]+=e[0],i[1]+=e[1]})):i=n[n.length-1],0>t?[i,r]:[r,i]}function n(e,t){for(var i in e){var n=e[i];delete t[n.start],delete n.start,delete n.end,n.forEach(function(e){r[0>e?~e:e]=1}),s.push(n)}}var r={},o={},a={},s=[],l=-1;return t.forEach(function(i,n){var r,o=e.arcs[0>i?~i:i];o.length<3&&!o[1][0]&&!o[1][1]&&(r=t[++l],t[l]=i,t[n]=r)}),t.forEach(function(e){var t,n,r=i(e),s=r[0],l=r[1];if(t=a[s])if(delete a[t.end],t.push(e),t.end=l,n=o[l]){delete o[n.start];var u=n===t?t:t.concat(n);o[u.start=t.start]=a[u.end=n.end]=u}else o[t.start]=a[t.end]=t;else if(t=o[l])if(delete o[t.start],t.unshift(e),t.start=s,n=a[s]){delete a[n.end];var c=n===t?t:n.concat(t);o[c.start=n.start]=a[c.end=t.end]=c}else o[t.start]=a[t.end]=t;else t=[e],o[t.start=s]=a[t.end=l]=t}),n(a,o),n(o,a),t.forEach(function(e){r[0>e?~e:e]||s.push([e])}),s}function t(t,i,n){function r(e){var t=0>e?~e:e;(c[t]||(c[t]=[])).push({i:e,g:u})}function o(e){e.forEach(r)}function a(e){e.forEach(o)}function s(e){"GeometryCollection"===e.type?e.geometries.forEach(s):e.type in h&&(u=e,h[e.type](e.arcs))}var l=[];if(arguments.length>1){var u,c=[],h={LineString:o,MultiLineString:a,Polygon:a,MultiPolygon:function(e){e.forEach(a)}};s(i),c.forEach(arguments.length<3?function(e){l.push(e[0].i)}:function(e){n(e[0].g,e[e.length-1].g)&&l.push(e[0].i)})}else for(var d=0,p=t.arcs.length;p>d;++d)l.push(d);return{type:"MultiLineString",arcs:e(t,l)}}function i(t,i){function r(e){e.forEach(function(t){t.forEach(function(t){(s[t=0>t?~t:t]||(s[t]=[])).push(e)})}),l.push(e)}function o(e){return h(a(t,{type:"Polygon",arcs:[e]}).coordinates[0])>0}var s={},l=[],u=[];return i.forEach(function(e){"Polygon"===e.type?r(e.arcs):"MultiPolygon"===e.type&&e.arcs.forEach(r)}),l.forEach(function(e){if(!e._){var t=[],i=[e];for(e._=1,u.push(t);e=i.pop();)t.push(e),e.forEach(function(e){e.forEach(function(e){s[0>e?~e:e].forEach(function(e){e._||(e._=1,i.push(e))})})})}}),l.forEach(function(e){delete e._}),{type:"MultiPolygon",arcs:u.map(function(i){var r=[];if(i.forEach(function(e){e.forEach(function(e){e.forEach(function(e){s[0>e?~e:e].length<2&&r.push(e)})})}),r=e(t,r),(n=r.length)>1)for(var a,l=o(i[0][0]),u=0;ue?~e:e],r=0,o=n.length;o>r;++r)t.push(i=n[r].slice()),u(i,r);0>e&&s(t,o)}function n(e){return e=e.slice(),u(e,0),e}function r(e){for(var t=[],n=0,r=e.length;r>n;++n)i(e[n],t);return t.length<2&&t.push(t[0].slice()),t}function o(e){for(var t=r(e);t.length<4;)t.push(t[0].slice());return t}function a(e){return e.map(o)}function l(e){var t=e.type;return"GeometryCollection"===t?{type:t,geometries:e.geometries.map(l)}:t in h?{type:t,coordinates:h[t](e)}:null}var u=f(e.transform),c=e.arcs,h={Point:function(e){return n(e.coordinates)},MultiPoint:function(e){return e.coordinates.map(n)},LineString:function(e){return r(e.arcs)},MultiLineString:function(e){return e.arcs.map(r)},Polygon:function(e){return a(e.arcs)},MultiPolygon:function(e){return e.arcs.map(a)}};return l(t)}function s(e,t){for(var i,n=e.length,r=n-t;r<--n;)i=e[r],e[r++]=e[n],e[n]=i}function l(e,t){for(var i=0,n=e.length;n>i;){var r=i+n>>>1;e[r]e&&(e=~e);var i=r[e];i?i.push(t):r[e]=[t]})}function i(e,i){e.forEach(function(e){t(e,i)})}function n(e,t){"GeometryCollection"===e.type?e.geometries.forEach(function(e){n(e,t)}):e.type in a&&a[e.type](e.arcs,t)}var r={},o=e.map(function(){return[]}),a={LineString:t,MultiLineString:i,Polygon:i,MultiPolygon:function(e,t){e.forEach(function(e){i(e,t)})}};e.forEach(n);for(var s in r)for(var u=r[s],c=u.length,h=0;c>h;++h)for(var d=h+1;c>d;++d){var p,m=u[h],f=u[d];(p=o[m])[s=l(p,f)]!==f&&p.splice(s,0,f),(p=o[f])[s=l(p,m)]!==m&&p.splice(s,0,m)}return o}function c(e,t){function i(e){o.remove(e),e[1][2]=t(e),o.push(e)}var n=f(e.transform),r=g(e.transform),o=m();return t||(t=d),e.arcs.forEach(function(e){for(var a,s,l=[],u=0,c=0,h=e.length;h>c;++c)s=e[c],n(e[c]=[s[0],s[1],1/0],c);for(var c=1,h=e.length-1;h>c;++c)a=e.slice(c-1,c+2),a[1][2]=t(a),l.push(a),o.push(a);for(var c=0,h=l.length;h>c;++c)a=l[c],a.previous=l[c-1],a.next=l[c+1];for(;a=o.pop();){var d=a.previous,p=a.next;a[1][2]0;){var i=(t+1>>1)-1,r=n[i];if(p(e,r)>=0)break;n[r._=t]=r,n[e._=t=i]=e}}function t(e,t){for(;;){var i=t+1<<1,o=i-1,a=t,s=n[a];if(r>o&&p(n[o],s)<0&&(s=n[a=o]),r>i&&p(n[i],s)<0&&(s=n[a=i]),a===t)break;n[s._=t]=s,n[e._=t=a]=e}}var i={},n=[],r=0;return i.push=function(t){return e(n[t._=r]=t,r++),r},i.pop=function(){if(!(0>=r)){var e,i=n[0];return--r>0&&(e=n[r],t(n[e._=0]=e,0)),i}},i.remove=function(i){var o,a=i._;if(n[a]===i)return a!==--r&&(o=n[r],(p(o,i)<0?e:t)(n[o._=a]=o,a)),a},i}function f(e){if(!e)return v;var t,i,n=e.scale[0],r=e.scale[1],o=e.translate[0],a=e.translate[1];return function(e,s){s||(t=i=0),e[0]=(t+=e[0])*n+o,e[1]=(i+=e[1])*r+a}}function g(e){if(!e)return v;var t,i,n=e.scale[0],r=e.scale[1],o=e.translate[0],a=e.translate[1];return function(e,s){s||(t=i=0);var l=(e[0]-o)/n|0,u=(e[1]-a)/r|0;e[0]=l-t,e[1]=u-i,t=l,i=u}}function v(){}var _={version:"1.6.18",mesh:function(e){return a(e,t.apply(this,arguments))},meshArcs:t,merge:function(e){return a(e,i.apply(this,arguments))},mergeArcs:i,feature:r,neighbors:u,presimplify:c};"function"==typeof define&&define.amd?define("Cesium/ThirdParty/topojson",_):"object"==typeof module&&module.exports?module.exports=_:this.topojson=_}(),define("Cesium/DataSources/GeoJsonDataSource",["../Core/Cartesian3","../Core/Color","../Core/createGuid","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Event","../Core/getFilenameFromUri","../Core/loadJson","../Core/PinBuilder","../Core/PolygonHierarchy","../Core/RuntimeError","../Scene/HeightReference","../Scene/VerticalOrigin","../ThirdParty/topojson","../ThirdParty/when","./BillboardGraphics","./CallbackProperty","./ColorMaterialProperty","./ConstantPositionProperty","./ConstantProperty","./CorridorGraphics","./DataSource","./EntityCollection","./PolygonGraphics","./PolylineGraphics"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g,v,_,y,C,w,E,b,S,T,x){"use strict";function A(t){return e.fromDegrees(t[0],t[1],t[2])}function P(e,t){var i="";for(var n in e)if(e.hasOwnProperty(n)){if(n===t||-1!==le.indexOf(n))continue;var o=e[n];r(o)&&(i+="object"==typeof o?""+n+""+P(o)+"":""+n+""+o+"")}return i.length>0&&(i=''+i+"
"),i}function M(e,t,i){var n;return function(o,a){return r(n)||(n=e(t,i)),n}}function D(e,t){return new _(M(P,e,t),!0)}function I(e,t,n){var o=e.id;if(r(o)&&"Feature"===e.type){for(var a=2,s=o;r(t.getById(s));)s=o+"_"+a,a++;o=s}else o=i();var l=t.getOrCreateEntity(o),u=e.properties;if(r(u)){l.addProperty("properties"),l.properties=u;var c,h=u.title;if(r(h))l.name=h,c="title";else{var d=Number.MAX_VALUE;for(var p in u)if(u.hasOwnProperty(p)&&u[p]){var m=p.toLowerCase();if(d>1&&"title"===m){d=1,c=p;break}d>2&&"name"===m?(d=2,c=p):d>3&&/title/i.test(p)?(d=3,c=p):d>4&&/name/i.test(p)&&(d=4,c=p)}r(c)&&(l.name=u[c])}var f=u.description;null!==f&&(l.description=r(f)?new w(f):n(u,c))}return l}function R(e,t){for(var i=new Array(e.length),n=0;na;a++)O(e,o[a],void 0,n,r)}function N(e,t,i,n,o){for(var a=i.geometries,s=0,l=a.length;l>s;s++){var u=a[s],c=u.type,h=ce[c];if(!r(h))throw new d("Unknown geometry type: "+c);h(e,t,u,n,o)}}function F(e,i,o,a,s){var l=s.markerSymbol,u=s.markerColor,c=s.markerSize,h=i.properties;if(r(h)){var d=h["marker-color"];r(d)&&(u=t.fromCssColorString(d)),c=n(se[h["marker-size"]],c);var f=h["marker-symbol"];r(f)&&(l=f)}var _;_=r(l)?1===l.length?e._pinBuilder.fromText(l.toUpperCase(),u,c):e._pinBuilder.fromMakiIconId(l,u,c):e._pinBuilder.fromColor(u,c),e._promises.push(g(_,function(t){var n=new v;n.verticalOrigin=new w(m.BOTTOM),n.image=new w(t),2===a.length&&(n.heightReference=p.CLAMP_TO_GROUND);var r=I(i,e._entityCollection,s.describe);r.billboard=n,r.position=new C(o(a))}))}function k(e,t,i,n,r){F(e,t,n,i.coordinates,r)}function B(e,t,i,n,r){for(var o=i.coordinates,a=0;aE;E++)C.push(new h(R(o[E],n)));var S=o[0];_.hierarchy=new w(new h(R(S,n),C)),S[0].length>2?_.perPositionHeight=new w(!0):a.clampToGround||(_.height=0);var x=I(i,e._entityCollection,a.describe);x.polygon=_}}function W(e,t,i,n,r){G(e,t,n,i.coordinates,r)}function H(e,t,i,n,r){for(var o=i.coordinates,a=0;ao;o++){var s=i[o],l=s.getType(),u=s.getText();if("element"===l)"a"===s.getTagName()&&(s.isClosing()?n=Math.max(n-1,0):n++),r.push(u);else if("entity"===l||"comment"===l)r.push(u);else if(0===n){var c=this.linkifyStr(u);r.push(c)}else r.push(u)}return r.join("")},linkifyStr:function(e){return this.getMatchParser().replace(e,this.createMatchReturnVal,this)},createMatchReturnVal:function(t){var i;if(this.replaceFn&&(i=this.replaceFn.call(this,this,t)),"string"==typeof i)return i;if(i===!1)return t.getMatchedText();if(i instanceof e.HtmlTag)return i.toAnchorString();var n=this.getTagBuilder(),r=n.build(t);return r.toAnchorString()},getHtmlParser:function(){var t=this.htmlParser;return t||(t=this.htmlParser=new e.htmlParser.HtmlParser),t},getMatchParser:function(){var t=this.matchParser;return t||(t=this.matchParser=new e.matchParser.MatchParser({urls:this.urls,email:this.email,twitter:this.twitter,phone:this.phone,hashtag:this.hashtag,stripPrefix:this.stripPrefix})),t},getTagBuilder:function(){var t=this.tagBuilder;return t||(t=this.tagBuilder=new e.AnchorTagBuilder({newWindow:this.newWindow,truncate:this.truncate,className:this.className})),t}},e.link=function(t,i){var n=new e(i);return n.link(t)},e.match={},e.htmlParser={},e.matchParser={},e.Util={abstractMethod:function(){throw"abstract"},trimRegex:/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,assign:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);return e},extend:function(t,i){var n=t.prototype,r=function(){};r.prototype=n;var o;o=i.hasOwnProperty("constructor")?i.constructor:function(){n.constructor.apply(this,arguments)};var a=o.prototype=new r;return a.constructor=o,a.superclass=n,delete i.constructor,e.Util.assign(a,i),o},ellipsis:function(e,t,i){return e.length>t&&(i=null==i?"..":i,e=e.substring(0,t-i.length)+i),e},indexOf:function(e,t){if(Array.prototype.indexOf)return e.indexOf(t);for(var i=0,n=e.length;n>i;i++)if(e[i]===t)return i;return-1},splitAndCapture:function(e,t){if(!t.global)throw new Error("`splitRegex` must have the 'g' flag set");for(var i,n=[],r=0;i=t.exec(e);)n.push(e.substring(r,i.index)),n.push(i[0]),r=i.index+i[0].length;return n.push(e.substring(r)),n},trim:function(e){return e.replace(this.trimRegex,"")}},e.HtmlTag=e.Util.extend(Object,{whitespaceRegex:/\s+/,constructor:function(t){e.Util.assign(this,t),this.innerHtml=this.innerHtml||this.innerHTML},setTagName:function(e){return this.tagName=e,this},getTagName:function(){return this.tagName||""},setAttr:function(e,t){var i=this.getAttrs();return i[e]=t,this},getAttr:function(e){return this.getAttrs()[e]},setAttrs:function(t){var i=this.getAttrs();return e.Util.assign(i,t),this},getAttrs:function(){return this.attrs||(this.attrs={})},setClass:function(e){return this.setAttr("class",e)},addClass:function(t){for(var i,n=this.getClass(),r=this.whitespaceRegex,o=e.Util.indexOf,a=n?n.split(r):[],s=t.split(r);i=s.shift();)-1===o(a,i)&&a.push(i);return this.getAttrs()["class"]=a.join(" "),this},removeClass:function(t){for(var i,n=this.getClass(),r=this.whitespaceRegex,o=e.Util.indexOf,a=n?n.split(r):[],s=t.split(r);a.length&&(i=s.shift());){var l=o(a,i);-1!==l&&a.splice(l,1)}return this.getAttrs()["class"]=a.join(" "),this},getClass:function(){return this.getAttrs()["class"]||""},hasClass:function(e){return-1!==(" "+this.getClass()+" ").indexOf(" "+e+" ")},setInnerHtml:function(e){return this.innerHtml=e,this},getInnerHtml:function(){return this.innerHtml||""},toAnchorString:function(){var e=this.getTagName(),t=this.buildAttrsStr();return t=t?" "+t:"",["<",e,t,">",this.getInnerHtml(),""].join("")},buildAttrsStr:function(){if(!this.attrs)return"";var e=this.getAttrs(),t=[];for(var i in e)e.hasOwnProperty(i)&&t.push(i+'="'+e[i]+'"');return t.join(" ")}}),e.AnchorTagBuilder=e.Util.extend(Object,{constructor:function(t){e.Util.assign(this,t)},build:function(t){var i=new e.HtmlTag({tagName:"a",attrs:this.createAttrs(t.getType(),t.getAnchorHref()),innerHtml:this.processAnchorText(t.getAnchorText())});return i},createAttrs:function(e,t){var i={href:t},n=this.createCssClass(e);return n&&(i["class"]=n),this.newWindow&&(i.target="_blank"),i},createCssClass:function(e){var t=this.className;return t?t+" "+t+"-"+e:""},processAnchorText:function(e){return e=this.doTruncate(e)},doTruncate:function(t){return e.Util.ellipsis(t,this.truncate||Number.POSITIVE_INFINITY)}}),e.htmlParser.HtmlParser=e.Util.extend(Object,{htmlRegex:function(){var e=/!--([\s\S]+?)--/,t=/[0-9a-zA-Z][0-9a-zA-Z:]*/,i=/[^\s\0"'>\/=\x01-\x1F\x7F]+/,n=/(?:"[^"]*?"|'[^']*?'|[^'"=<>`\s]+)/,r=i.source+"(?:\\s*=\\s*"+n.source+")?";return new RegExp(["(?:","<(!DOCTYPE)","(?:","\\s+","(?:",r,"|",n.source+")",")*",">",")","|","(?:","<(/)?","(?:",e.source,"|","(?:","("+t.source+")","(?:","\\s+",r,")*","\\s*/?",")",")",">",")"].join(""),"gi")}(),htmlCharacterEntitiesRegex:/( | |<|<|>|>|"|"|')/gi,parse:function(e){for(var t,i,n=this.htmlRegex,r=0,o=[];null!==(t=n.exec(e));){var a=t[0],s=t[3],l=t[1]||t[4],u=!!t[2],c=e.substring(r,t.index);c&&(i=this.parseTextAndEntityNodes(c),o.push.apply(o,i)),s?o.push(this.createCommentNode(a,s)):o.push(this.createElementNode(a,l,u)),r=t.index+a.length}if(rr;r+=2){var a=n[r],s=n[r+1];a&&i.push(this.createTextNode(a)),s&&i.push(this.createEntityNode(s))}return i},createCommentNode:function(t,i){return new e.htmlParser.CommentNode({text:t,comment:e.Util.trim(i)})},createElementNode:function(t,i,n){return new e.htmlParser.ElementNode({text:t,tagName:i.toLowerCase(),closing:n})},createEntityNode:function(t){return new e.htmlParser.EntityNode({text:t})},createTextNode:function(t){return new e.htmlParser.TextNode({text:t})}}),e.htmlParser.HtmlNode=e.Util.extend(Object,{text:"",constructor:function(t){e.Util.assign(this,t)},getType:e.Util.abstractMethod,getText:function(){return this.text}}),e.htmlParser.CommentNode=e.Util.extend(e.htmlParser.HtmlNode,{comment:"",getType:function(){return"comment"},getComment:function(){return this.comment}}),e.htmlParser.ElementNode=e.Util.extend(e.htmlParser.HtmlNode,{tagName:"",closing:!1,getType:function(){return"element"},getTagName:function(){return this.tagName},isClosing:function(){return this.closing}}),e.htmlParser.EntityNode=e.Util.extend(e.htmlParser.HtmlNode,{getType:function(){return"entity"}}),e.htmlParser.TextNode=e.Util.extend(e.htmlParser.HtmlNode,{getType:function(){return"text"}}),e.matchParser.MatchParser=e.Util.extend(Object,{urls:!0,email:!0,twitter:!0,phone:!0,hashtag:!1,stripPrefix:!0,matcherRegex:function(){var e=/(^|[^\w])@(\w{1,15})/,t=/(^|[^\w])#(\w{1,15})/,i=/(?:[\-;:&=\+\$,\w\.]+@)/,n=/(?:\+?\d{1,3}[-\s.])?\(?\d{3}\)?[-\s.]?\d{3}[-\s.]\d{4}/,r=/(?:[A-Za-z][-.+A-Za-z0-9]+:(?![A-Za-z][-.+A-Za-z0-9]+:\/\/)(?!\d+\/?)(?:\/\/)?)/,o=/(?:www\.)/,a=/[A-Za-z0-9\.\-]*[A-Za-z0-9\-]/,s=/\.(?:international|construction|contractors|enterprises|photography|productions|foundation|immobilien|industries|management|properties|technology|christmas|community|directory|education|equipment|institute|marketing|solutions|vacations|bargains|boutique|builders|catering|cleaning|clothing|computer|democrat|diamonds|graphics|holdings|lighting|partners|plumbing|supplies|training|ventures|academy|careers|company|cruises|domains|exposed|flights|florist|gallery|guitars|holiday|kitchen|neustar|okinawa|recipes|rentals|reviews|shiksha|singles|support|systems|agency|berlin|camera|center|coffee|condos|dating|estate|events|expert|futbol|kaufen|luxury|maison|monash|museum|nagoya|photos|repair|report|social|supply|tattoo|tienda|travel|viajes|villas|vision|voting|voyage|actor|build|cards|cheap|codes|dance|email|glass|house|mango|ninja|parts|photo|shoes|solar|today|tokyo|tools|watch|works|aero|arpa|asia|best|bike|blue|buzz|camp|club|cool|coop|farm|fish|gift|guru|info|jobs|kiwi|kred|land|limo|link|menu|mobi|moda|name|pics|pink|post|qpon|rich|ruhr|sexy|tips|vote|voto|wang|wien|wiki|zone|bar|bid|biz|cab|cat|ceo|com|edu|gov|int|kim|mil|net|onl|org|pro|pub|red|tel|uno|wed|xxx|xyz|ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw)\b/,l=/[\-A-Za-z0-9+&@#\/%=~_()|'$*\[\]?!:,.;]*[\-A-Za-z0-9+&@#\/%=~_()|'$*\[\]]/; +return new RegExp(["(",e.source,")","|","(",i.source,a.source,s.source,")","|","(","(?:","(",r.source,a.source,")","|","(?:","(.?//)?",o.source,a.source,")","|","(?:","(.?//)?",a.source,s.source,")",")","(?:"+l.source+")?",")","|","(",n.source,")","|","(",t.source,")"].join(""),"gi")}(),charBeforeProtocolRelMatchRegex:/^(.)?\/\//,constructor:function(t){e.Util.assign(this,t),this.matchValidator=new e.MatchValidator},replace:function(e,t,i){var n=this;return e.replace(this.matcherRegex,function(e,r,o,a,s,l,u,c,h,d,p,m,f){var g=n.processCandidateMatch(e,r,o,a,s,l,u,c,h,d,p,m,f);if(g){var v=t.call(i,g.match);return g.prefixStr+v+g.suffixStr}return e})},processCandidateMatch:function(t,i,n,r,o,a,s,l,u,c,h,d,p){var m,f=l||u,g="",v="";if(a&&!this.urls||o&&!this.email||c&&!this.phone||i&&!this.twitter||h&&!this.hashtag||!this.matchValidator.isValidMatch(a,s,f))return null;if(this.matchHasUnbalancedClosingParen(t)&&(t=t.substr(0,t.length-1),v=")"),o)m=new e.match.Email({matchedText:t,email:o});else if(i)n&&(g=n,t=t.slice(1)),m=new e.match.Twitter({matchedText:t,twitterHandle:r});else if(c){var _=t.replace(/\D/g,"");m=new e.match.Phone({matchedText:t,number:_})}else if(h)d&&(g=d,t=t.slice(1)),m=new e.match.Hashtag({matchedText:t,serviceName:this.hashtag,hashtag:p});else{if(f){var y=f.match(this.charBeforeProtocolRelMatchRegex)[1]||"";y&&(g=y,t=t.slice(1))}m=new e.match.Url({matchedText:t,url:t,protocolUrlMatch:!!s,protocolRelativeMatch:!!f,stripPrefix:this.stripPrefix})}return{prefixStr:g,suffixStr:v,match:m}},matchHasUnbalancedClosingParen:function(e){var t=e.charAt(e.length-1);if(")"===t){var i=e.match(/\(/g),n=e.match(/\)/g),r=i&&i.length||0,o=n&&n.length||0;if(o>r)return!0}return!1}}),e.MatchValidator=e.Util.extend(Object,{invalidProtocolRelMatchRegex:/^[\w]\/\//,hasFullProtocolRegex:/^[A-Za-z][-.+A-Za-z0-9]+:\/\//,uriSchemeRegex:/^[A-Za-z][-.+A-Za-z0-9]+:/,hasWordCharAfterProtocolRegex:/:[^\s]*?[A-Za-z]/,isValidMatch:function(e,t,i){return t&&!this.isValidUriScheme(t)||this.urlMatchDoesNotHaveProtocolOrDot(e,t)||this.urlMatchDoesNotHaveAtLeastOneWordChar(e,t)||this.isInvalidProtocolRelativeMatch(i)?!1:!0},isValidUriScheme:function(e){var t=e.match(this.uriSchemeRegex)[0].toLowerCase();return"javascript:"!==t&&"vbscript:"!==t},urlMatchDoesNotHaveProtocolOrDot:function(e,t){return!(!e||t&&this.hasFullProtocolRegex.test(t)||-1!==e.indexOf("."))},urlMatchDoesNotHaveAtLeastOneWordChar:function(e,t){return e&&t?!this.hasWordCharAfterProtocolRegex.test(e):!1},isInvalidProtocolRelativeMatch:function(e){return!!e&&this.invalidProtocolRelMatchRegex.test(e)}}),e.match.Match=e.Util.extend(Object,{constructor:function(t){e.Util.assign(this,t)},getType:e.Util.abstractMethod,getMatchedText:function(){return this.matchedText},getAnchorHref:e.Util.abstractMethod,getAnchorText:e.Util.abstractMethod}),e.match.Email=e.Util.extend(e.match.Match,{getType:function(){return"email"},getEmail:function(){return this.email},getAnchorHref:function(){return"mailto:"+this.email},getAnchorText:function(){return this.email}}),e.match.Hashtag=e.Util.extend(e.match.Match,{getType:function(){return"hashtag"},getHashtag:function(){return this.hashtag},getAnchorHref:function(){var e=this.serviceName,t=this.hashtag;switch(e){case"twitter":return"https://twitter.com/hashtag/"+t;case"facebook":return"https://www.facebook.com/hashtag/"+t;default:throw new Error("Unknown service name to point hashtag to: ",e)}},getAnchorText:function(){return"#"+this.hashtag}}),e.match.Phone=e.Util.extend(e.match.Match,{getType:function(){return"phone"},getNumber:function(){return this.number},getAnchorHref:function(){return"tel:"+this.number},getAnchorText:function(){return this.matchedText}}),e.match.Twitter=e.Util.extend(e.match.Match,{getType:function(){return"twitter"},getTwitterHandle:function(){return this.twitterHandle},getAnchorHref:function(){return"https://twitter.com/"+this.twitterHandle},getAnchorText:function(){return"@"+this.twitterHandle}}),e.match.Url=e.Util.extend(e.match.Match,{urlPrefixRegex:/^(https?:\/\/)?(www\.)?/i,protocolRelativeRegex:/^\/\//,protocolPrepended:!1,getType:function(){return"url"},getUrl:function(){var e=this.url;return this.protocolRelativeMatch||this.protocolUrlMatch||this.protocolPrepended||(e=this.url="http://"+e,this.protocolPrepended=!0),e},getAnchorHref:function(){var e=this.getUrl();return e.replace(/&/g,"&")},getAnchorText:function(){var e=this.getUrl();return this.protocolRelativeMatch&&(e=this.stripProtocolRelativePrefix(e)),this.stripPrefix&&(e=this.stripUrlPrefix(e)),e=this.removeTrailingSlash(e)},stripUrlPrefix:function(e){return e.replace(this.urlPrefixRegex,"")},stripProtocolRelativePrefix:function(e){return e.replace(this.protocolRelativeRegex,"")},removeTrailingSlash:function(e){return"/"===e.charAt(e.length-1)&&(e=e.slice(0,-1)),e}}),e}),define("Cesium/ThirdParty/zip",["../Core/buildModuleUrl","../Core/defineProperties"],function(e,t){var i={};return function(i){function n(){var e=-1,t=this;t.append=function(i){var n,r=t.table;for(n=0;n>>8^r[255&(e^i[n])]},t.get=function(){return~e}}function r(e,t,i){return e.slice?e.slice(t,t+i):e.webkitSlice?e.webkitSlice(t,t+i):e.mozSlice?e.mozSlice(t,t+i):e.msSlice?e.msSlice(t,t+i):void 0}function o(e,t){var i,n;return i=new ArrayBuffer(e),n=new Uint8Array(i),t&&n.set(t,0),{buffer:i,array:n,view:new DataView(i)}}function a(){}function s(e){function t(t,i){var o=new Blob([e],{type:V});n=new u(o),n.init(function(){r.size=n.size,t()},i)}function i(e,t,i,r){n.readUint8Array(e,t,i,r)}var n,r=this;r.size=0,r.init=t,r.readUint8Array=i}function l(e){function t(t){for(var i=e.length;"="==e.charAt(i-1);)i--;n=e.indexOf(",")+1,r.size=Math.floor(.75*(i-n)),t()}function i(t,i,r){var a,s=o(i),l=4*Math.floor(t/3),u=4*Math.ceil((t+i)/3),c=window.atob(e.substring(l+n,u+n)),h=t-3*Math.floor(l/4);for(a=h;h+i>a;a++)s.array[a-h]=c.charCodeAt(a);r(s.array)}var n,r=this;r.size=0,r.init=t,r.readUint8Array=i}function u(e){function t(t){this.size=e.size,t()}function i(t,i,n,o){var a=new FileReader;a.onload=function(e){n(new Uint8Array(e.target.result))},a.onerror=o,a.readAsArrayBuffer(r(e,t,i))}var n=this;n.size=0,n.init=t,n.readUint8Array=i}function c(){}function h(e){function t(e){r=new Blob([],{type:V}),e()}function i(e,t){r=new Blob([r,P?e:e.buffer],{type:V}),t()}function n(t,i){var n=new FileReader;n.onload=function(e){t(e.target.result)},n.onerror=i,n.readAsText(r,e)}var r,o=this;o.init=t,o.writeUint8Array=i,o.getData=n}function d(e){function t(t){o+="data:"+(e||"")+";base64,",t()}function i(e,t){var i,n=a.length,r=a;for(a="",i=0;i<3*Math.floor((n+e.length)/3)-n;i++)r+=String.fromCharCode(e[i]);for(;i2?o+=window.btoa(r):a=r,t()}function n(e){e(o+window.btoa(a))}var r=this,o="",a="";r.init=t,r.writeUint8Array=i,r.getData=n}function p(e){function t(t){r=new Blob([],{type:e}),t()}function i(t,i){r=new Blob([r,P?t:t.buffer],{type:e}),i()}function n(e){e(r)}var r,o=this;o.init=t,o.writeUint8Array=i,o.getData=n}function m(e,t,i,n,r,o,a,s,l,u){function c(){e.removeEventListener(U,h,!1),s(m)}function h(e){var t=e.data,n=t.data;t.onappend&&(m+=n.length,i.writeUint8Array(n,function(){o(!1,n),d()},u)),t.onflush&&(n?(m+=n.length,i.writeUint8Array(n,function(){o(!1,n),c()},u)):c()),t.progress&&a&&a(p+t.current,r)}function d(){p=f*k,r>p?t.readUint8Array(n+p,Math.min(k,r-p),function(t){e.postMessage({append:!0,data:t}),f++,a&&a(p,r),o(!0,t)},l):e.postMessage({flush:!0})}var p,m,f=0;m=0,e.addEventListener(U,h,!1),d()}function f(e,t,i,n,r,o,a,s,l,u){function c(){var m;h=d*k,r>h?t.readUint8Array(n+h,Math.min(k,r-h),function(t){var s=e.append(t,function(){a&&a(n+h,r)});p+=s.length,o(!0,t),i.writeUint8Array(s,function(){o(!1,s),d++,setTimeout(c,1)},u),a&&a(h,r)},l):(m=e.flush(),m?(p+=m.length,i.writeUint8Array(m,function(){o(!1,m),s(p)},u)):s(p))}var h,d=0,p=0;c()}function g(e,t,r,o,a,s,l,u,c){function h(e,t){a&&!e&&g.append(t)}function d(e){s(e,g.get())}var p,g=new n;return i.zip.useWebWorkers?(p=new Worker(i.zip.workerScriptsPath+B),m(p,e,t,r,o,h,l,d,u,c)):f(new i.zip.Inflater,e,t,r,o,h,l,d,u,c),p}function v(e,t,r,o,a,s,l){function u(e,t){e&&p.append(t)}function c(e){o(e,p.get())}function h(){d.removeEventListener(U,h,!1),m(d,e,t,0,e.size,u,a,c,s,l)}var d,p=new n;return i.zip.useWebWorkers?(d=new Worker(i.zip.workerScriptsPath+z),d.addEventListener(U,h,!1),d.postMessage({init:!0,level:r})):f(new i.zip.Deflater,e,t,0,e.size,u,a,c,s,l),d}function _(e,t,i,r,o,a,s,l,u){function c(){var n=h*k;r>n?e.readUint8Array(i+n,Math.min(k,r-n),function(e){o&&d.append(e),s&&s(n,r,e),t.writeUint8Array(e,function(){h++,c()},u)},l):a(r,d.get())}var h=0,d=new n;c()}function y(e){var t,i,n="",r=["Ç","ü","é","â","ä","à","å","ç","ê","ë","è","ï","î","ì","Ä","Å","É","æ","Æ","ô","ö","ò","û","ù","ÿ","Ö","Ü","ø","£","Ø","×","ƒ","á","í","ó","ú","ñ","Ñ","ª","º","¿","®","¬","½","¼","¡","«","»","_","_","_","¦","¦","Á","Â","À","©","¦","¦","+","+","¢","¥","+","+","-","-","+","-","+","ã","Ã","+","+","-","-","¦","-","+","¤","ð","Ð","Ê","Ë","È","i","Í","Î","Ï","+","+","_","_","¦","Ì","_","Ó","ß","Ô","Ò","õ","Õ","µ","þ","Þ","Ú","Û","Ù","ý","Ý","¯","´","­","±","_","¾","¶","§","÷","¸","°","¨","·","¹","³","²","_"," "];for(t=0;t127?r[i-128]:String.fromCharCode(i);return n}function C(e){return decodeURIComponent(escape(e))}function w(e){var t,i="";for(t=0;t>16,i=65535&e;try{return new Date(1980+((65024&t)>>9),((480&t)>>5)-1,31&t,(63488&i)>>11,(2016&i)>>5,2*(31&i),0)}catch(n){}}function b(e,t,i,n,r){return e.version=t.view.getUint16(i,!0),e.bitFlag=t.view.getUint16(i+2,!0),e.compressionMethod=t.view.getUint16(i+4,!0),e.lastModDateRaw=t.view.getUint32(i+6,!0),e.lastModDate=E(e.lastModDateRaw),1===(1&e.bitFlag)?void r(D):((n||8!=(8&e.bitFlag))&&(e.crc32=t.view.getUint32(i+10,!0),e.compressedSize=t.view.getUint32(i+14,!0),e.uncompressedSize=t.view.getUint32(i+18,!0)),4294967295===e.compressedSize||4294967295===e.uncompressedSize?void r(I):(e.filenameLength=t.view.getUint16(i+22,!0),void(e.extraFieldLength=t.view.getUint16(i+24,!0))))}function S(e,t){function i(){}function n(i,r){e.readUint8Array(e.size-i,i,function(e){var t=o(e.length,e).view;1347093766!=t.getUint32(0)?n(i+1,r):r(t)},function(){t(R)})}return i.prototype.getData=function(i,n,r,a){function s(e,t){d&&d.terminate(),d=null,e&&e(t)}function l(e){var t=o(4);return t.view.setUint32(0,e),p.crc32==t.view.getUint32(0)}function u(e,t){a&&!l(t)?c():i.getData(function(e){s(n,e)})}function c(){s(t,N)}function h(){s(t,L)}var d,p=this;e.readUint8Array(p.offset,30,function(n){var s,l=o(n.length,n);return 1347093252!=l.view.getUint32(0)?void t(M):(b(p,l,4,!1,t),s=p.offset+30+p.filenameLength+p.extraFieldLength,void i.init(function(){0===p.compressionMethod?_(e,i,s,p.compressedSize,a,u,r,c,h):d=g(e,i,s,p.compressedSize,a,u,r,c,h)},h))},c)},{getEntries:function(r){return e.size<22?void t(M):void n(22,function(n){var a,s;a=n.getUint32(16,!0),s=n.getUint16(8,!0),e.readUint8Array(a,e.size-a,function(e){var n,a,l,u,c=0,h=[],d=o(e.length,e);for(n=0;s>n;n++){if(a=new i,1347092738!=d.view.getUint32(c))return void t(M);b(a,d,c+6,!0,t),a.commentLength=d.view.getUint16(c+32,!0),a.directory=16==(16&d.view.getUint8(c+38)),a.offset=d.view.getUint32(c+42,!0),l=w(d.array.subarray(c+46,c+46+a.filenameLength)),a.filename=2048===(2048&a.bitFlag)?C(l):y(l),a.directory||"/"!=a.filename.charAt(a.filename.length-1)||(a.directory=!0),u=w(d.array.subarray(c+46+a.filenameLength+a.extraFieldLength,c+46+a.filenameLength+a.extraFieldLength+a.commentLength)),a.comment=2048===(2048&a.bitFlag)?C(u):y(u),h.push(a),c+=46+a.filenameLength+a.extraFieldLength+a.commentLength}r(h)},function(){t(R)})})},close:function(e){e&&e()}}}function T(e){return unescape(encodeURIComponent(e))}function x(e){var t,i=[];for(t=0;te;e++){for(i=e,t=0;8>t;t++)1&i?i=i>>>1^3988292384:i>>>=1;n[e]=i}return n}(),s.prototype=new a,s.prototype.constructor=s,l.prototype=new a,l.prototype.constructor=l,u.prototype=new a,u.prototype.constructor=u,c.prototype.getData=function(e){e(this.data)},h.prototype=new c,h.prototype.constructor=h,d.prototype=new c,d.prototype.constructor=d,p.prototype=new c,p.prototype.constructor=p,i.zip={Reader:a,Writer:c,BlobReader:u,Data64URIReader:l,TextReader:s,BlobWriter:p,Data64URIWriter:d,TextWriter:h,createReader:function(e,t,i){e.init(function(){t(S(e,i))},i)},createWriter:function(e,t,i,n){e.init(function(){t(A(e,i,n))},i)},useWebWorkers:!0};var W;t(i.zip,{workerScriptsPath:{get:function(){return"undefined"==typeof W&&(W=e("ThirdParty/Workers/")),W}}})}(i),i.zip}),define("Cesium/DataSources/KmlDataSource",["../Core/AssociativeArray","../Core/BoundingRectangle","../Core/Cartesian2","../Core/Cartesian3","../Core/Cartographic","../Core/ClockRange","../Core/ClockStep","../Core/Color","../Core/createGuid","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Ellipsoid","../Core/Event","../Core/getAbsoluteUri","../Core/getExtensionFromUri","../Core/getFilenameFromUri","../Core/Iso8601","../Core/joinUrls","../Core/JulianDate","../Core/loadBlob","../Core/loadXML","../Core/Math","../Core/NearFarScalar","../Core/PinBuilder","../Core/PolygonHierarchy","../Core/Rectangle","../Core/RuntimeError","../Core/TimeInterval","../Core/TimeIntervalCollection","../Scene/HeightReference","../Scene/HorizontalOrigin","../Scene/LabelStyle","../Scene/SceneMode","../ThirdParty/Autolinker","../ThirdParty/Uri","../ThirdParty/when","../ThirdParty/zip","./BillboardGraphics","./CompositePositionProperty","./ConstantPositionProperty","./CorridorGraphics","./DataSource","./DataSourceClock","./Entity","./EntityCollection","./LabelGraphics","./PathGraphics","./PolygonGraphics","./PolylineGraphics","./PositionPropertyArray","./RectangleGraphics","./ReferenceProperty","./SampledPositionProperty","./ScaledPositionProperty","./TimeIntervalCollectionProperty","./WallGraphics"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g,v,_,y,C,w,E,b,S,T,x,A,P,M,D,I,R,O,L,N,F,k,B,z,V,U,G,W,H,q,j,Y,X,Z,K,J,Q,$,ee,te,ie,ne){"use strict";function re(e){var t=e.slice(0,Math.min(4,e.size)),i=k.defer(),n=new FileReader;return n.addEventListener("load",function(){i.resolve(1347093252===new DataView(n.result).getUint32(0,!1))}),n.addEventListener("error",function(){i.reject(n.error)}),n.readAsArrayBuffer(t),i.promise}function oe(e){var t=k.defer(),i=new FileReader;return i.addEventListener("load",function(){t.resolve(i.result)}),i.addEventListener("error",function(){t.reject(i.error)}),i.readAsText(e),t.promise}function ae(e,t,i,n){t.getData(new B.TextWriter,function(e){i.kml=gt.parseFromString(e,"application/xml"),n.resolve()})}function se(e,t,i,n){var r=u(ft.detectFromFilename(t.filename),"application/octet-stream");t.getData(new B.Data64URIWriter(r),function(e){i[t.filename]=e,n.resolve()})}function le(e,t,i,n){for(var r=n.keys,o=new F("."),a=e.querySelectorAll(t),s=0;so;o++)n[r++]=de(t[o]);return n}}}function me(e,t){if(c(e)){var i=e.getAttribute(t);if(null!==i){var n=parseFloat(i);return isNaN(n)?void 0:n}}}function fe(e,t){if(c(e)){var i=e.getAttribute(t);return null!==i?i:void 0}}function ge(e,t,i){if(c(e))for(var n=e.childNodes,r=n.length,o=0;r>o;o++){var a=n[o];if(a.localName===t&&-1!==i.indexOf(a.namespaceURI))return a}}function ve(e,t,i){if(c(e)){for(var n=[],r=e.getElementsByTagNameNS("*",t),o=r.length,a=0;o>a;a++){var s=r[a];s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s)}return n}}function _e(e,t,i){if(!c(e))return[];for(var n=[],r=e.childNodes,o=r.length,a=0;o>a;a++){var s=r[a];s.localName===t&&-1!==i.indexOf(s.namespaceURI)&&n.push(s)}return n}function ye(e,t,i){var n=ge(e,t,i);if(c(n)){var r=parseFloat(n.textContent);return isNaN(r)?void 0:r}}function Ce(e,t,i){var n=ge(e,t,i);return c(n)?n.textContent.trim():void 0}function we(e,t,i){var n=ge(e,t,i);if(c(n)){var r=n.textContent.trim();return"1"===r||/^true$/i.test(r)}}function Ee(e,t,i,n){if(c(e)){var r=!1;if(c(n)){var o=n[e];c(o)&&(r=!0,e=o)}return!r&&c(i)&&(e=f(e,f(i)),e=ue(e,t)),e}}function be(e,t){if(c(e)){"#"===e[0]&&(e=e.substring(1));var i=parseInt(e.substring(0,2),16)/255,n=parseInt(e.substring(2,4),16)/255,r=parseInt(e.substring(4,6),16)/255,o=parseInt(e.substring(6,8),16)/255;return t?(o>0?At.maximumRed=o:At.red=0,r>0?At.maximumGreen=r:At.green=0,n>0?At.maximumBlue=n:At.blue=0,At.alpha=i,s.fromRandom(At)):new s(o,r,n,i)}}function Se(e,t,i){var n=Ce(e,t,i);if(c(n))return be(n,"random"===Ce(e,"colorMode",i))}function Te(e){var t=ge(e,"TimeStamp",xt.kmlgx),i=Ce(t,"when",xt.kmlgx);if(c(t)&&c(i)&&0!==i.length){var n=C.fromIso8601(i),r=new D;return r.addInterval(new M({start:n,stop:_.MAXIMUM_VALUE})),r}}function xe(e){var t=ge(e,"TimeSpan",xt.kmlgx);if(c(t)){var i,n=ge(t,"begin",xt.kmlgx),r=c(n)?C.fromIso8601(n.textContent):void 0,o=ge(t,"end",xt.kmlgx),a=c(o)?C.fromIso8601(o.textContent):void 0;if(c(r)&&c(a)){if(C.lessThan(a,r)){var s=r;r=a,a=s}i=new D,i.addInterval(new M({start:r,stop:a}))}else c(r)?(i=new D,i.addInterval(new M({start:r,stop:_.MAXIMUM_VALUE}))):c(a)&&(i=new D,i.addInterval(new M({start:_.MINIMUM_VALUE,stop:a})));return i}}function Ae(){var e=new z;return e.width=_t,e.height=_t,e.scaleByDistance=new S(yt,Ct,wt,Et),e.pixelOffsetScaleByDistance=new S(yt,Ct,wt,Et),e}function Pe(){var e=new Z;return e.outline=!0,e.outlineColor=s.WHITE,e}function Me(){var e=new Y;return e.translucencyByDistance=new S(3e6,1,5e6,0),e.pixelOffset=new i(17,0),e.horizontalOrigin=R.LEFT,e.font="16px sans-serif",e.style=O.FILL_AND_OUTLINE,e}function De(e,t,i,n,r){var o=Ce(e,"href",xt.kml);if(c(o)&&0!==o.length){if(0===o.indexOf("root://icons/palette-")){var a=o.charAt(21),s=u(ye(e,"x",xt.gx),0),l=u(ye(e,"y",xt.gx),0);s=Math.min(s/32,7),l=7-Math.min(l/32,7);var h=8*l+s;o="https://maps.google.com/mapfiles/kml/pal"+a+"/icon"+h+".png"}if(o=Ee(o,t._proxy,i,n),r){var d=Ce(e,"refreshMode",xt.kml),p=Ce(e,"viewRefreshMode",xt.kml);"onInterval"===d||"onExpire"===d?console.log("KML - Unsupported Icon refreshMode: "+d):("onStop"===p||"onRegion"===p)&&console.log("KML - Unsupported Icon viewRefreshMode: "+p);var m=u(Ce(e,"viewBoundScale",xt.kml),1),f="onStop"===p?"BBOX=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth]":"",g=u(Ce(e,"viewFormat",xt.kml),f),v=Ce(e,"httpQuery",xt.kml),_=ot(g,v),C=y(o,_,!1);return at(t._camera,t._canvas,C,m,t._lastCameraView.bbox)}return o}}function Ie(e,r,o,a,s){var l=ye(r,"scale",xt.kml),h=ye(r,"heading",xt.kml),d=Se(r,"color",xt.kml),p=ge(r,"Icon",xt.kml),m=De(p,e,a,s,!1),f=ye(p,"x",xt.gx),g=ye(p,"y",xt.gx),v=ye(p,"w",xt.gx),_=ye(p,"h",xt.gx),y=ge(r,"hotSpot",xt.kml),C=me(y,"x"),w=me(y,"y"),E=fe(y,"xunits"),S=fe(y,"yunits"),T=o.billboard;c(T)||(T=Ae(),o.billboard=T),T.image=m,T.scale=l,T.color=d,(c(f)||c(g)||c(v)||c(_))&&(T.imageSubRegion=new t(f,g,v,_)),c(h)&&0!==h&&(T.rotation=b.toRadians(-h),T.alignedAxis=n.UNIT_Z),l=u(l,1);var x,A;c(C)&&("pixels"===E?x=-C*l:"insetPixels"===E?x=(C-_t)*l:"fraction"===E&&(x=-_t*l*C),x+=.5*_t*l),c(w)&&("pixels"===S?A=w:"insetPixels"===S?A=-w:"fraction"===S&&(A=w*_t),A-=.5*_t*l),(c(x)||c(A))&&(T.pixelOffset=new i(x,A))}function Re(e,t,i,n,r){for(var o=0,a=t.childNodes.length;a>o;o++){var l=t.childNodes.item(o);if("IconStyle"===l.localName)Ie(e,l,i,n,r);else if("LabelStyle"===l.localName){var h=i.label;c(h)||(h=Me(),i.label=h),h.scale=u(ye(l,"scale",xt.kml),h.scale),h.fillColor=u(Se(l,"color",xt.kml),h.fillColor),h.text=i.name}else if("LineStyle"===l.localName){var d=i.polyline;c(d)||(d=new K,i.polyline=d),d.width=ye(l,"width",xt.kml),d.material=Se(l,"color",xt.kml),c(Se(l,"outerColor",xt.gx))&&console.log("KML - gx:outerColor is not supported in a LineStyle"),c(ye(l,"outerWidth",xt.gx))&&console.log("KML - gx:outerWidth is not supported in a LineStyle"),c(ye(l,"physicalWidth",xt.gx))&&console.log("KML - gx:physicalWidth is not supported in a LineStyle"),c(we(l,"labelVisibility",xt.gx))&&console.log("KML - gx:labelVisibility is not supported in a LineStyle")}else if("PolyStyle"===l.localName){var p=i.polygon;c(p)||(p=Pe(),i.polygon=p),p.material=u(Se(l,"color",xt.kml),p.material),p.fill=u(we(l,"fill",xt.kml),p.fill),p.outline=u(we(l,"outline",xt.kml),p.outline)}else if("BalloonStyle"===l.localName){var m=u(be(Ce(l,"bgColor",xt.kml)),s.WHITE),f=u(be(Ce(l,"textColor",xt.kml)),s.BLACK),g=Ce(l,"text",xt.kml);i.addProperty("balloonStyle"),i.balloonStyle={bgColor:m,textColor:f,text:g}}else if("ListStyle"===l.localName){var v=Ce(l,"listItemType",xt.kml);("radioFolder"===v||"checkOffOnly"===v)&&console.log("KML - Unsupported ListStyle with listItemType: "+v)}}}function Oe(e,t,i,n,r,o){for(var a,s=new q,l=-1,u=i.childNodes,h=u.length,d=0;h>d;d++){var p=u[d];("Style"===p.localName||"StyleMap"===p.localName)&&(l=d)}if(-1!==l){var m=u[l];if("Style"===m.localName)Re(t,m,s,r,o);else for(var g=_e(m,"Pair",xt.kml),v=0;va;a++)u=h[a],s=fe(u,"id"),c(s)&&(s="#"+s,r&&c(n)&&(s=n+s),c(i.getById(s))||(l=new q({id:s}),i.add(l),Re(e,u,l,n,o)))}var p=ve(t,"StyleMap",xt.kml);if(c(p)){var m=p.length;for(a=0;m>a;a++){var g=p[a];if(s=fe(g,"id"),c(s))for(var v=_e(g,"Pair",xt.kml),_=0;_a;a++){var A=T[a].textContent;if("#"!==A[0]){var P=A.split("#");if(2===P.length){var M=P[0];c(b[M])||(c(n)&&(M=f(M,f(n))),S.push(Le(e,M,i,n)))}}}return S}function Fe(e,t,i){var n=new $(e,t.id,["position"]),r=new te(t.position);t.polyline=c(i.polyline)?i.polyline.clone():new K,t.polyline.positions=new J([n,r])}function ke(e,t){return!c(e)&&!c(t)||"clampToGround"===e?I.CLAMP_TO_GROUND:"relativeToGround"===e?I.RELATIVE_TO_GROUND:"absolute"===e?I.NONE:"clampToSeaFloor"===t?(console.log("KML - :clampToSeaFloor is currently not supported, using :clampToGround."),I.CLAMP_TO_GROUND):"relativeToSeaFloor"===t?(console.log("KML - :relativeToSeaFloor is currently not supported, using :relativeToGround."),I.RELATIVE_TO_GROUND):(c(e)?console.log("KML - Unknown :"+e+", using :CLAMP_TO_GROUND."):console.log("KML - Unknown :"+t+", using :CLAMP_TO_GROUND."),I.CLAMP_TO_GROUND)}function Be(e,t,i){return"relativeToSeaFloor"===i||"absolute"===t||"relativeToGround"===t?e:((c(t)&&"clampToGround"!==t||c(i)&&"clampToSeaFloor"!==i)&&console.log("KML - Unknown altitudeMode: "+u(t,i)),new te(e))}function ze(e,t,i){if(c(e)){if("relativeToSeaFloor"===i||"absolute"===t||"relativeToGround"===t)return e;(c(t)&&"clampToGround"!==t||c(i)&&"clampToSeaFloor"!==i)&&console.log("KML - Unknown altitudeMode: "+u(t,i));for(var n=e.length,r=0;n>r;r++){var o=e[r];p.WGS84.scaleToGeodeticSurface(o,o)}return e}}function Ve(e,t,n,r){var o=t.label;c(o)||(o=c(n.label)?n.label.clone():Me(),t.label=o),o.text=t.name;var a=t.billboard;if(c(a)||(a=c(n.billboard)?n.billboard.clone():Ae(),t.billboard=a),c(a.image)||(a.image=e._pinBuilder.fromColor(s.YELLOW,64)),c(a.scale)){var l=a.scale.getValue();0!==l?o.pixelOffset=new i(16*l+1,0):(o.pixelOffset=void 0,o.horizontalOrigin=void 0)}c(r)&&(a.heightReference=r,o.heightReference=r)}function Ue(e,t,i){var n=t.path;c(n)||(n=new X,n.leadTime=0,t.path=n);var r=i.polyline;c(r)&&(n.material=r.material,n.width=r.width)}function Ge(e,t,i,n,r){var o=Ce(i,"coordinates",xt.kml),a=Ce(i,"altitudeMode",xt.kml),s=Ce(i,"altitudeMode",xt.gx),l=we(i,"extrude",xt.kml),u=de(o);return n.position=u,Ve(e,n,r,ke(a,s)),l&&he(a,s)&&Fe(t,n,r),!0}function We(e,t,i,n,r){var o=ge(i,"coordinates",xt.kml),a=Ce(i,"altitudeMode",xt.kml),l=Ce(i,"altitudeMode",xt.gx),h=we(i,"extrude",xt.kml),d=we(i,"tessellate",xt.kml),p=he(a,l);c(ye(i,"drawOrder",xt.gx))&&console.log("KML - gx:drawOrder is not supported in LineStrings");var m=pe(o),f=r.polyline;if(p&&h){var g=new ne;n.wall=g,g.positions=m;var v=r.polygon;c(v)&&(g.fill=v.fill,g.outline=v.outline,g.material=v.material),c(f)&&(g.outlineColor=c(f.material)?f.material.color:s.WHITE,g.outlineWidth=f.width)}else if(e._clampToGround&&!p&&d){var _=new G;n.corridor=_,_.positions=m,c(f)?(_.material=c(f.material)?f.material.color:s.WHITE,_.width=u(f.width,1)):(_.material=s.WHITE,_.width=1)}else f=c(f)?f.clone():new K,n.polyline=f,f.positions=ze(m,a,l),(!d||p)&&(f.followSurface=!1);return!0}function He(e,t,i,n,r){var o=ge(i,"outerBoundaryIs",xt.kml),a=ge(o,"LinearRing",xt.kml),l=ge(a,"coordinates",xt.kml),u=pe(l),h=we(i,"extrude",xt.kml),d=Ce(i,"altitudeMode",xt.kml),p=Ce(i,"altitudeMode",xt.gx),m=he(d,p),f=c(r.polygon)?r.polygon.clone():Pe(),g=r.polyline;if(c(g)&&(f.outlineColor=c(g.material)?g.material.color:s.WHITE,f.outlineWidth=g.width),n.polygon=f,m?(f.perPositionHeight=!0,f.extrudedHeight=h?0:void 0):e._clampToGround||(f.height=0),c(u)){for(var v=new x(u),_=_e(i,"innerBoundaryIs",xt.kml),y=0;y<_.length;y++){a=_e(_[y],"LinearRing",xt.kml);for(var C=0;C0&&console.log("KML - gx:angles are not supported in gx:Tracks");for(var d=Math.min(s.length,u.length),p=[],m=[],f=0;d>f;f++){var g=de(s[f].textContent);p.push(g),m.push(C.fromIso8601(u[f].textContent))}var v=new ee;return v.addSamples(m,p),n.position=v,Ve(e,n,r,ke(o,a)),Ue(e,n,r),n.availability=new D,u.length>0&&n.availability.addInterval(new M({start:m[0],stop:m[m.length-1]})),h&&c&&Fe(t,n,r),!0}function je(e,t,i,n,r,o,a,s,l){var u=e[0],c=e[e.length-1],h=new ee;h.addSamples(e,t),i.intervals.addInterval(new M({start:u,stop:c,isStartIncluded:l,isStopIncluded:l,data:Be(h,a,s)})),n.addInterval(new M({start:u,stop:c,isStartIncluded:l,isStopIncluded:l})),r.intervals.addInterval(new M({start:u,stop:c,isStartIncluded:l,isStopIncluded:l,data:o}))}function Ye(e,t,i,n,r){for(var o,a,s,l=we(i,"interpolate",xt.gx),u=_e(i,"Track",xt.gx),h=!1,d=new ie,p=new D,m=new V,f=0,g=u.length;g>f;f++){var v=u[f],_=_e(v,"when",xt.kml),y=_e(v,"coord",xt.gx),w=Ce(v,"altitudeMode",xt.kml),E=Ce(v,"altitudeMode",xt.gx),b=he(w,E),S=we(v,"extrude",xt.kml),T=Math.min(y.length,_.length),x=[];o=[];for(var A=0;T>A;A++){var P=de(y[A].textContent);x.push(P),o.push(C.fromIso8601(_[A].textContent))}l&&(c(a)&&je([a,o[0]],[s,x[0]],m,p,d,!1,"absolute",void 0,!1),a=o[T-1],s=x[x.length-1]),je(o,x,m,p,d,b&&S,w,E,!0),h=h||b&&S}return n.availability=p,n.position=m,Ve(e,n,r),Ue(e,n,r),h&&(Fe(t,n,r),n.polyline.show=d),!0}function Xe(e,t,i,n,r,o){for(var a=i.childNodes,s=!1,l=0,u=a.length;u>l;l++){var h=a.item(l),d=Mt[h.localName];if(c(d)){var p=ce(h,t,o);p.parent=n,p.name=n.name,p.availability=n.availability,p.description=n.description,p.kml=n.kml,d(e,t,h,p,r)&&(s=!0)}}return s}function Ze(e,t,i,n,r){return console.log("KML - Unsupported geometry: "+i.localName),!1}function Ke(e,t){var i=ge(e,"ExtendedData",xt.kml);if(c(i)){c(ge(i,"SchemaData",xt.kml))&&console.log("KML - SchemaData is unsupported"),c(fe(i,"xmlns:prefix"))&&console.log("KML - ExtendedData with xmlns:prefix is unsupported");var n={},r=_e(i,"Data",xt.kml);if(c(r))for(var o=r.length,a=0;o>a;a++){var s=r[a],l=fe(s,"name");c(l)&&(n[l]={displayName:Ce(s,"displayName",xt.kml),value:Ce(s,"value",xt.kml)})}t.kml.extendedData=n}}function Je(e,t,i,n){var r,o,a,l=t.kml,h=l.extendedData,d=Ce(e,"description",xt.kml),p=u(t.balloonStyle,i.balloonStyle),m=s.WHITE,f=s.BLACK,g=d;c(p)&&(m=u(p.bgColor,s.WHITE),f=u(p.textColor,s.BLACK),g=u(p.text,d));var v;if(c(g)){ +if(g=g.replace("$[name]",u(t.name,"")),g=g.replace("$[description]",u(d,"")),g=g.replace("$[address]",u(l.address,"")),g=g.replace("$[Snippet]",u(l.snippet,"")),g=g.replace("$[id]",t.id),g=g.replace("$[geDirections]",""),c(h)){var _=g.match(/\$\[.+?\]/g);if(null!==_)for(r=0;r<_.length;r++){var y=_[r],C=y.substr(2,y.length-3),w=/\/displayName$/.test(C);C=C.replace(/\/displayName$/,""),v=h[C],c(v)&&(v=w?v.displayName:v.value),c(v)&&(g=g.replace(y,u(v,"")))}}}else if(c(h)&&(a=Object.keys(h),a.length>0)){for(g='',r=0;r";g+="
"+u(v.displayName,o)+""+u(v.value,"")+"
"}if(c(g)){g=vt.link(g),Pt.innerHTML=g;var E=Pt.querySelectorAll("a");for(r=0;r1&&(le(Pt,"a","href",n),le(Pt,"img","src",n));var b='
",Pt.innerHTML="",t.description=b}}function Qe(e,t,i,n,r,o,a){var s=ce(i,n),l=s.kml,h=Oe(s,e,i,r,o,a),d=Ce(i,"name",xt.kml);s.name=d,s.parent=t;var p=xe(i);c(p)||(p=Te(i)),s.availability=p;var m=we(i,"visibility",xt.kml);s.show=u(m,!0);var f=ge(i,"author",xt.atom),g=l.author;g.name=Ce(f,"name",xt.atom),g.uri=Ce(f,"uri",xt.atom),g.email=Ce(f,"email",xt.atom);var v=ge(i,"link",xt.atom),_=l.link;return _.href=fe(v,"href"),_.hreflang=fe(v,"hreflang"),_.rel=fe(v,"rel"),_.type=fe(v,"type"),_.title=fe(v,"title"),_.length=fe(v,"length"),l.address=Ce(i,"address",xt.kml),l.phoneNumber=Ce(i,"phoneNumber",xt.kml),l.snippet=Ce(i,"Snippet",xt.kml),Ke(i,s),Je(i,s,h,a),c(ge(i,"Camera",xt.kml))&&console.log("KML - Unsupported view: Camera"),c(ge(i,"LookAt",xt.kml))&&console.log("KML - Unsupported view: LookAt"),c(ge(i,"Region",xt.kml))&&console.log("KML - Placemark Regions are unsupported"),{entity:s,styleEntity:h}}function $e(e,t,i,n,r,o,a){for(var s=Object.keys(Nt),l=s.length,u=0;l>u;u++)for(var c=s[u],h=Nt[c],d=i.childNodes,p=d.length,m=0;p>m;m++){var f=d[m];f.localName!==c||-1===xt.kml.indexOf(f.namespaceURI)&&-1===xt.gx.indexOf(f.namespaceURI)||h(e,t,f,n,r,o,a)}}function et(e,t,i,n,r,o,a){var s=Qe(e,t,i,n,r,o,a);$e(e,s.entity,i,n,r,o,a)}function tt(e,t,i,n,r,o,a){for(var s=Qe(e,t,i,n,r,o,a),l=s.entity,u=s.styleEntity,h=!1,d=i.childNodes,p=0,m=d.length;m>p&&!h;p++){var f=d.item(p),g=Mt[f.localName];c(g)&&(g(e,n,f,l,u,l.id),h=!0)}h||(l.merge(u),Ve(e,l,u))}function it(e,t,i,n,r,o,a){var s,l=Qe(e,t,i,n,r,o,a),u=l.entity,h=!1,d=pe(ge(i,"LatLonQuad",xt.gx));if(c(d))s=Pe(),s.hierarchy=new x(d),u.polygon=s,h=!0;else{s=new Q,u.rectangle=s;var p=ge(i,"LatLonBox",xt.kml);if(c(p)){var m=ye(p,"west",xt.kml),f=ye(p,"south",xt.kml),g=ye(p,"east",xt.kml),v=ye(p,"north",xt.kml);c(m)&&(m=b.negativePiToPi(b.toRadians(m))),c(f)&&(f=b.negativePiToPi(b.toRadians(f))),c(g)&&(g=b.negativePiToPi(b.toRadians(g))),c(v)&&(v=b.negativePiToPi(b.toRadians(v))),s.coordinates=new A(m,f,g,v);var _=ye(p,"rotation",xt.kml);c(_)&&(s.rotation=b.toRadians(_))}}var y=ge(i,"Icon",xt.kml),C=De(y,e,o,a,!0);if(c(C)){h&&console.log("KML - gx:LatLonQuad Icon does not support texture projection.");var w=ye(y,"x",xt.gx),E=ye(y,"y",xt.gx),S=ye(y,"w",xt.gx),T=ye(y,"h",xt.gx);(c(w)||c(E)||c(S)||c(T))&&console.log("KML - gx:x, gx:y, gx:w, gx:h aren't supported for GroundOverlays"),s.material=C,s.material.color=Se(i,"color",xt.kml),s.material.transparent=!0}else s.material=Se(i,"color",xt.kml);var P=Ce(i,"altitudeMode",xt.kml);c(P)?"absolute"===P?s.height=ye(i,"altitude",xt.kml):"clampToGround"!==P&&console.log("KML - Unknown altitudeMode: "+P):(P=Ce(i,"altitudeMode",xt.gx),"relativeToSeaFloor"===P?(console.log("KML - altitudeMode relativeToSeaFloor is currently not supported, treating as absolute."),s.height=ye(i,"altitude",xt.kml)):"clampToSeaFloor"===P?console.log("KML - altitudeMode clampToSeaFloor is currently not supported, treating as clampToGround."):c(P)&&console.log("KML - Unknown altitudeMode: "+P))}function nt(e,t,i,n,r,o,a){e._unsupportedNode.raiseEvent(e,i,a),console.log("KML - Unsupported feature: "+i.localName)}function rt(e){if(!c(e)||0===e.length)return"";var t=e[0];return"&"===t&&e.splice(0,1),"?"!==t&&(e="?"+e),e}function ot(e,t){var i="";return(c(e)&&e.length>0||c(t)&&t.length>0)&&(i+=y(rt(e),rt(t),!1)),i}function at(e,t,i,r,o){function a(e){return e<-b.PI_OVER_TWO?-b.PI_OVER_TWO:e>b.PI_OVER_TWO?b.PI_OVER_TWO:e}function s(e){return e>b.PI?e-b.TWO_PI:e<-b.PI?e+b.TWO_PI:e}if(c(e)&&e._mode!==L.MORPHING){var l,h,d=p.WGS84;if(o=u(o,It),c(t)&&(Ot.x=.5*t.clientWidth,Ot.y=.5*t.clientHeight,l=e.pickEllipsoid(Ot,d,Lt)),c(l)?h=d.cartesianToCartographic(l,Rt):(h=A.center(o,Rt),l=d.cartographicToCartesian(h)),c(r)&&!b.equalsEpsilon(r,1,b.EPSILON9)){var m=o.width*r*.5,f=o.height*r*.5;o=new A(s(h.longitude-m),a(h.latitude-f),s(h.longitude+m),a(h.latitude+f))}i=i.replace("[bboxWest]",b.toDegrees(o.west).toString()),i=i.replace("[bboxSouth]",b.toDegrees(o.south).toString()),i=i.replace("[bboxEast]",b.toDegrees(o.east).toString()),i=i.replace("[bboxNorth]",b.toDegrees(o.north).toString());var g=b.toDegrees(h.longitude).toString(),v=b.toDegrees(h.latitude).toString();i=i.replace("[lookatLon]",g),i=i.replace("[lookatLat]",v),i=i.replace("[lookatTilt]",b.toDegrees(e.pitch).toString()),i=i.replace("[lookatHeading]",b.toDegrees(e.heading).toString()),i=i.replace("[lookatRange]",n.distance(e.positionWC,l)),i=i.replace("[lookatTerrainLon]",g),i=i.replace("[lookatTerrainLat]",v),i=i.replace("[lookatTerrainAlt]",h.height.toString()),d.cartesianToCartographic(e.positionWC,Rt),i=i.replace("[cameraLon]",b.toDegrees(Rt.longitude).toString()),i=i.replace("[cameraLat]",b.toDegrees(Rt.latitude).toString()),i=i.replace("[cameraAlt]",b.toDegrees(Rt.height).toString());var _=e.frustum,y=_.aspectRatio,C="",w="";if(c(y)){var E=b.toDegrees(_.fov);y>1?(C=E,w=E/y):(w=E,C=E*y)}i=i.replace("[horizFov]",C.toString()),i=i.replace("[vertFov]",w.toString())}else i=i.replace("[bboxWest]","-180"),i=i.replace("[bboxSouth]","-90"),i=i.replace("[bboxEast]","180"),i=i.replace("[bboxNorth]","90"),i=i.replace("[lookatLon]",""),i=i.replace("[lookatLat]",""),i=i.replace("[lookatRange]",""),i=i.replace("[lookatTilt]",""),i=i.replace("[lookatHeading]",""),i=i.replace("[lookatTerrainLon]",""),i=i.replace("[lookatTerrainLat]",""),i=i.replace("[lookatTerrainAlt]",""),i=i.replace("[cameraLon]",""),i=i.replace("[cameraLat]",""),i=i.replace("[cameraAlt]",""),i=i.replace("[horizFov]",""),i=i.replace("[vertFov]","");return c(t)?(i=i.replace("[horizPixels]",t.clientWidth),i=i.replace("[vertPixels]",t.clientHeight)):(i=i.replace("[horizPixels]",""),i=i.replace("[vertPixels]","")),i=i.replace("[terrainEnabled]","1"),i=i.replace("[clientVersion]","1"),i=i.replace("[kmlVersion]","2.2"),i=i.replace("[clientName]","Cesium"),i=i.replace("[language]","English")}function st(e,t,i,n,r,o,a){var s=Qe(e,t,i,n,r,o,a),h=s.entity,d=ge(i,"Link",xt.kml);if(c(d)||(d=ge(i,"Url",xt.kml)),c(d)){var p=Ce(d,"href",xt.kml);if(c(p)){p=Ee(p,void 0,o,a);var m=Ce(d,"viewRefreshMode",xt.kml),f=u(Ce(d,"viewBoundScale",xt.kml),1),g="onStop"===m?"BBOX=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth]":"",v=u(Ce(d,"viewFormat",xt.kml),g),_=Ce(d,"httpQuery",xt.kml),w=ot(v,_),E=new j,b=at(e._camera,e._canvas,y(p,w,!1),f,e._lastCameraView.bbox),S=k(ht(e,E,b),function(t){var i=e._entityCollection,n=E.values;i.suspendEvents();for(var r=0;r0||"onExpire"===a||"onStop"===m){var g=ge(t,"NetworkLinkControl",xt.kml),v=c(g),_=C.now(),y={id:l(),href:p,cookie:"",queryString:w,lastUpdated:_,updating:!1,entity:h,viewBoundScale:f,needsUpdate:!1,cameraUpdateTime:_},b=0;if(v&&(y.cookie=u(Ce(g,"cookie",xt.kml),""),b=u(ye(g,"minRefreshPeriod",xt.kml),0)),"onInterval"===a)v&&(s=Math.max(b,s)),y.refreshMode=Dt.INTERVAL,y.time=s;else if("onExpire"===a){var S;if(v&&(S=Ce(g,"expires",xt.kml)),c(S))try{var T=C.fromIso8601(S),x=C.secondsDifference(T,_);x>0&&b>x&&C.addSeconds(_,b,T),y.refreshMode=Dt.EXPIRE,y.time=T}catch(A){console.log("KML - NetworkLinkControl expires is not a valid date")}else console.log("KML - refreshMode of onExpire requires the NetworkLinkControl to have an expires element")}else e._camera?(y.refreshMode=Dt.STOP,y.time=u(ye(d,"viewRefreshTime",xt.kml),0)):console.log("A NetworkLink with viewRefreshMode=onStop requires a camera be passed in when creating the KmlDataSource");c(y.refreshMode)&&e._networkLinks.set(y.id,y)}else"onRegion"===m&&console.log("KML - Unsupported viewRefreshMode: onRegion")});c(e._promises)&&e._promises.push(S)}}}function lt(e,t,i,n,r,o,a){var s=Nt[t.localName];c(s)?s(e,i,t,n,r,o,a):(e._unsupportedNode.raiseEvent(e,t,a),console.log("KML - Unsupported feature node: "+t.localName))}function ut(e,t,i,n,r){var o=k.defer();t.removeAll();var a=i.documentElement,s="Document"===a.localName?a:ge(a,"Document",xt.kml),l=Ce(s,"name",xt.kml);!c(l)&&c(n)&&(l=v(n)),c(e._name)||(e._name=l);var u=new j(e);return k.all(Ne(e,i,u,n,!1,r),function(){var a=i.documentElement;if("kml"===a.localName)for(var s=a.childNodes,l=0;ln;++n)a(t[n])}if(n.contains(t.id)){var s=!1,l=ge(o,"NetworkLinkControl",xt.kml),h=c(l),d=0;if(h){if(c(ge(l,"Update",xt.kml)))return console.log("KML - NetworkLinkControl updates aren't supported."),t.updating=!1,void n.remove(t.id);t.cookie=u(Ce(l,"cookie",xt.kml),""),d=u(ye(l,"minRefreshPeriod",xt.kml),0)}var p=C.now(),m=t.refreshMode;if(m===Dt.INTERVAL)c(l)&&(t.time=Math.max(d,t.time));else if(m===Dt.EXPIRE){var f;if(c(l)&&(f=Ce(l,"expires",xt.kml)),c(f))try{var g=C.fromIso8601(f),v=C.secondsDifference(g,p);v>0&&d>v&&C.addSeconds(p,d,g),t.time=g}catch(y){console.log("KML - NetworkLinkControl expires is not a valid date"),s=!0}else console.log("KML - refreshMode of onExpire requires the NetworkLinkControl to have an expires element"),s=!0}var w=t.entity,E=e._entityCollection,b=i.values;E.suspendEvents();for(var S=E.values.slice(),T=0;Tr;++r){var o=t[r];Ft.set(o.id,o),i(o)}}var r=this._networkLinks;if(0===r.length)return!0;var o=C.now(),a=this;Ft.removeAll();var s=!1,l=this._lastCameraView,u=this._camera;!c(u)||u.positionWC.equalsEpsilon(l.position,b.EPSILON7)&&u.directionWC.equalsEpsilon(l.direction,b.EPSILON7)&&u.upWC.equalsEpsilon(l.up,b.EPSILON7)||(l.position=n.clone(u.positionWC),l.direction=n.clone(u.directionWC),l.up=n.clone(u.upWC),l.bbox=u.computeViewRectangle(),s=!0);var h=new e,d=!1;return r.values.forEach(function(e){var t=e.entity;if(!Ft.contains(t.id)){if(!e.updating){var n=!1;if(e.refreshMode===Dt.INTERVAL?C.secondsDifference(o,e.lastUpdated)>e.time&&(n=!0):e.refreshMode===Dt.EXPIRE?C.greaterThan(o,e.time)&&(n=!0):e.refreshMode===Dt.STOP&&(s&&(e.needsUpdate=!0,e.cameraUpdateTime=o),e.needsUpdate&&C.secondsDifference(o,e.cameraUpdateTime)>=e.time&&(n=!0)),n){i(t),e.updating=!0;var r=new j,u=y(e.href,ot(e.cookie,e.queryString),!1);u=at(a._camera,a._canvas,u,e.viewBoundScale,l.bbox),ht(a,r,u).then(pt(a,e,r,h,u)).otherwise(function(t){var i="NetworkLink "+e.href+" refresh failed: "+t;console.log(i),a._error.raiseEvent(a,i)}),d=!0}}h.set(e.id,e)}}),d&&(this._networkLinks=h,this._changed.raiseEvent(this)),!0},dt}),define("Cesium/DataSources/VelocityVectorProperty",["../Core/Cartesian3","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Event","../Core/JulianDate","./Property"],function(e,t,i,n,r,o,a,s){"use strict";function l(e){this._position=void 0,this._subscription=void 0,this._definitionChanged=new o,this.position=e}n(l.prototype,{isConstant:{get:function(){return s.isConstant(this._position)}},definitionChanged:{get:function(){return this._definitionChanged}},position:{get:function(){return this._position},set:function(e){var t=this._position;t!==e&&(i(t)&&this._subscription(),this._position=e,i(e)&&(this._subscription=e._definitionChanged.addEventListener(function(){this._definitionChanged.raiseEvent(this)},this)),this._definitionChanged.raiseEvent(this))}}});var u=new e,c=new e,h=new e,d=new a,p=1/60;return l.prototype.getValue=function(e,t){return this._getValue(e,t)},l.prototype._getValue=function(t,n,r){i(n)||(n=new e);var o=this._position;if(!s.isConstant(o)){var l=o.getValue(t,u),m=o.getValue(a.addSeconds(t,p,d),c);if(i(l)&&(i(m)||(m=l,l=o.getValue(a.addSeconds(t,-p,d),c),i(l)))&&!e.equals(l,m)){i(r)&&l.clone(r);var f=e.subtract(m,l,h);return e.normalize(f,n)}}},l.prototype.equals=function(e){return this===e||e instanceof l&&s.equals(this._position,e._position)},l}),define("Cesium/DataSources/VelocityOrientationProperty",["../Core/Cartesian3","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Ellipsoid","../Core/Event","../Core/JulianDate","../Core/Matrix3","../Core/Quaternion","../Core/Transforms","./Property","./VelocityVectorProperty"],function(e,t,i,n,r,o,a,s,l,u,c,h,d){"use strict";function p(e,i){this._velocityVectorProperty=new d(e),this._subscription=void 0,this._ellipsoid=void 0,this._definitionChanged=new a,this.ellipsoid=t(i,o.WGS84);var n=this;this._velocityVectorProperty.definitionChanged.addEventListener(function(){n._definitionChanged.raiseEvent(n)})}n(p.prototype,{isConstant:{get:function(){return h.isConstant(this._velocityVectorProperty)}},definitionChanged:{get:function(){return this._definitionChanged}},position:{get:function(){return this._velocityVectorProperty.position},set:function(e){this._velocityVectorProperty.position=e}},ellipsoid:{get:function(){return this._ellipsoid},set:function(e){var t=this._ellipsoid;t!==e&&(this._ellipsoid=e,this._definitionChanged.raiseEvent(this))}}});var m=new e,f=new e,g=new l;return p.prototype.getValue=function(e,t){var n=this._velocityVectorProperty._getValue(e,f,m);if(i(n))return c.rotationMatrixFromPositionVelocity(m,n,this._ellipsoid,g),u.fromRotationMatrix(g,t)},p.prototype.equals=function(e){return this===e||e instanceof p&&h.equals(this._velocityVectorProperty,e._velocityVectorProperty)&&(this._ellipsoid===e._ellipsoid||this._ellipsoid.equals(e._ellipsoid))},p}),define("Cesium/DataSources/Visualizer",["../Core/DeveloperError"],function(e){"use strict";function t(){e.throwInstantiationError()}return t.prototype.update=e.throwInstantiationError,t.prototype.getBoundingSphere=e.throwInstantiationError,t.prototype.isDestroyed=e.throwInstantiationError,t.prototype.destroy=e.throwInstantiationError,t}),define("Cesium/Renderer/ClearCommand",["../Core/Color","../Core/defaultValue","../Core/freezeObject"],function(e,t,i){"use strict";function n(e){e=t(e,t.EMPTY_OBJECT),this.color=e.color,this.depth=e.depth,this.stencil=e.stencil,this.renderState=e.renderState,this.framebuffer=e.framebuffer,this.owner=e.owner}return n.ALL=i(new n({color:new e(0,0,0,0),depth:1,stencil:0})),n.prototype.execute=function(e,t){e.clear(this,t)},n}),define("Cesium/Renderer/ComputeCommand",["../Core/defaultValue","../Core/PrimitiveType","../Scene/Pass"],function(e,t,i){"use strict";function n(t){t=e(t,e.EMPTY_OBJECT),this.vertexArray=t.vertexArray,this.fragmentShaderSource=t.fragmentShaderSource,this.shaderProgram=t.shaderProgram,this.uniformMap=t.uniformMap,this.outputTexture=t.outputTexture,this.preExecute=t.preExecute,this.postExecute=t.postExecute,this.persists=e(t.persists,!1),this.pass=i.COMPUTE,this.owner=t.owner}return n.prototype.execute=function(e){e.execute(this)},n}),define("Cesium/Shaders/ViewportQuadVS",[],function(){"use strict";return"attribute vec4 position;\nattribute vec2 textureCoordinates;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main() \n{\n gl_Position = position;\n v_textureCoordinates = textureCoordinates;\n}"}),define("Cesium/Renderer/ComputeEngine",["../Core/BoundingRectangle","../Core/Color","../Core/ComponentDatatype","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/destroyObject","../Core/DeveloperError","../Core/Geometry","../Core/GeometryAttribute","../Core/PrimitiveType","../Shaders/ViewportQuadVS","./BufferUsage","./ClearCommand","./DrawCommand","./Framebuffer","./RenderState","./ShaderProgram"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g,v){"use strict";function _(e){this._context=e}function y(e,t){return new f({context:e,colorTextures:[t],destroyAttachments:!1})}function C(e,t){return v.fromCache({context:e,vertexShaderSource:h,fragmentShaderSource:t,attributeLocations:{position:0,textureCoordinates:1}})}function w(t,i){return r(E)&&E.viewport.width===t&&E.viewport.height===i||(E=g.fromCache({viewport:new e(0,0,t,i)})),E}var E,b=new m({primitiveType:c.TRIANGLES}),S=new p({color:new t(0,0,0,0)});return _.prototype.execute=function(e){r(e.preExecute)&&e.preExecute(e);var t=e.outputTexture,i=t.width,n=t.height,o=this._context,a=r(e.vertexArray)?e.vertexArray:o.getViewportQuadVertexArray(),s=r(e.shaderProgram)?e.shaderProgram:C(o,e.fragmentShaderSource),l=y(o,t),u=w(i,n),c=e.uniformMap,h=S;h.framebuffer=l,h.renderState=u,h.execute(o);var d=b;d.vertexArray=a,d.renderState=u,d.shaderProgram=s,d.uniformMap=c,d.framebuffer=l,d.execute(o),l.destroy(),e.persists||(s.destroy(),r(e.vertexArray)&&a.destroy()),r(e.postExecute)&&e.postExecute(t)},_.prototype.isDestroyed=function(){return!1},_.prototype.destroy=function(){return a(this)},_}),define("Cesium/Renderer/PassState",["../Core/BoundingRectangle"],function(e){"use strict";function t(e){this.context=e,this.framebuffer=void 0,this.blendingEnabled=void 0,this.scissorTest=void 0,this.viewport=void 0}return t}),define("Cesium/Renderer/RenderbufferFormat",["../Core/freezeObject","./WebGLConstants"],function(e,t){"use strict";var i={RGBA4:t.RGBA4,RGB5_A1:t.RGB5_A1,RGB565:t.RGB565,DEPTH_COMPONENT16:t.DEPTH_COMPONENT16,STENCIL_INDEX8:t.STENCIL_INDEX8,DEPTH_STENCIL:t.DEPTH_STENCIL,validate:function(e){return e===i.RGBA4||e===i.RGB5_A1||e===i.RGB565||e===i.DEPTH_COMPONENT16||e===i.STENCIL_INDEX8||e===i.DEPTH_STENCIL}};return e(i)}),define("Cesium/Renderer/Renderbuffer",["../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/destroyObject","../Core/DeveloperError","./ContextLimits","./RenderbufferFormat"],function(e,t,i,n,r,o,a){"use strict";function s(i){i=e(i,e.EMPTY_OBJECT);var n=i.context,r=n._gl,s=(o.maximumRenderbufferSize,e(i.format,a.RGBA4)),l=t(i.width)?i.width:r.drawingBufferWidth,u=t(i.height)?i.height:r.drawingBufferHeight;this._gl=r,this._format=s,this._width=l,this._height=u,this._renderbuffer=this._gl.createRenderbuffer(),r.bindRenderbuffer(r.RENDERBUFFER,this._renderbuffer),r.renderbufferStorage(r.RENDERBUFFER,s,l,u),r.bindRenderbuffer(r.RENDERBUFFER,null)}return i(s.prototype,{format:{get:function(){return this._format}},width:{get:function(){return this._width}},height:{get:function(){return this._height}}}),s.prototype._getRenderbuffer=function(){return this._renderbuffer},s.prototype.isDestroyed=function(){return!1},s.prototype.destroy=function(){return this._gl.deleteRenderbuffer(this._renderbuffer),n(this)},s}),define("Cesium/Renderer/PickFramebuffer",["../Core/BoundingRectangle","../Core/Color","../Core/defaultValue","../Core/defined","../Core/destroyObject","./Framebuffer","./PassState","./Renderbuffer","./RenderbufferFormat","./Texture"],function(e,t,i,n,r,o,a,s,l,u){"use strict";function c(t){var i=new a(t);i.blendingEnabled=!1,i.scissorTest={enabled:!0,rectangle:new e},i.viewport=new e,this._context=t,this._fb=void 0,this._passState=i,this._width=0,this._height=0}c.prototype.begin=function(t){var i=this._context,r=i.drawingBufferWidth,a=i.drawingBufferHeight;return e.clone(t,this._passState.scissorTest.rectangle),n(this._fb)&&this._width===r&&this._height===a||(this._width=r,this._height=a,this._fb=this._fb&&this._fb.destroy(),this._fb=new o({context:i,colorTextures:[new u({context:i,width:r,height:a})],depthStencilRenderbuffer:new s({context:i,format:l.DEPTH_STENCIL})}),this._passState.framebuffer=this._fb),this._passState.viewport.width=r,this._passState.viewport.height=a,this._passState};var h=new t;return c.prototype.end=function(e){for(var r=i(e.width,1),o=i(e.height,1),a=this._context,s=a.readPixels({x:e.x,y:e.y,width:r,height:o,framebuffer:this._fb}),l=Math.max(r,o),u=l*l,c=Math.floor(.5*r),d=Math.floor(.5*o),p=0,m=0,f=0,g=-1,v=0;u>v;++v){if(p>=-c&&c>=p&&m>=-d&&d>=m){var _=4*((d-m)*r+p+c);h.red=t.byteToFloat(s[_]),h.green=t.byteToFloat(s[_+1]),h.blue=t.byteToFloat(s[_+2]),h.alpha=t.byteToFloat(s[_+3]);var y=a.getObjectByPickColor(h);if(n(y))return y}if(p===m||0>p&&-p===m||p>0&&p===1-m){var C=f;f=-g,g=C}p+=f,m+=g}},c.prototype.isDestroyed=function(){return!1},c.prototype.destroy=function(){return this._fb=this._fb&&this._fb.destroy(),r(this)},c}),define("Cesium/Renderer/ShaderCache",["../Core/defined","../Core/defineProperties","../Core/destroyObject","./ShaderProgram","./ShaderSource"],function(e,t,i,n,r){"use strict";function o(e){this._context=e,this._shaders={},this._numberOfShaders=0,this._shadersToRelease={}}return t(o.prototype,{numberOfShaders:{get:function(){return this._numberOfShaders}}}),o.prototype.replaceShaderProgram=function(t){return e(t.shaderProgram)&&t.shaderProgram.destroy(),this.getShaderProgram(t)},o.prototype.getShaderProgram=function(e){var t=e.vertexShaderSource,i=e.fragmentShaderSource,o=e.attributeLocations;"string"==typeof t&&(t=new r({sources:[t]})),"string"==typeof i&&(i=new r({sources:[i]}));var a,s=t.createCombinedVertexShader(),l=i.createCombinedFragmentShader(),u=s+l+JSON.stringify(o);if(this._shaders[u])a=this._shaders[u],delete this._shadersToRelease[u];else{var c=this._context,h=new n({gl:c._gl,logShaderCompilation:c.logShaderCompilation,debugShaders:c.debugShaders,vertexShaderSource:t,vertexShaderText:s,fragmentShaderSource:i,fragmentShaderText:l,attributeLocations:o});a={cache:this,shaderProgram:h,keyword:u,count:0},h._cachedShader=a,this._shaders[u]=a,++this._numberOfShaders}return++a.count,a.shaderProgram},o.prototype.destroyReleasedShaderPrograms=function(){var e=this._shadersToRelease;for(var t in e)if(e.hasOwnProperty(t)){var i=e[t];delete this._shaders[i.keyword],i.shaderProgram.finalDestroy(),--this._numberOfShaders}this._shadersToRelease={}},o.prototype.releaseShaderProgram=function(t){if(e(t)){var i=t._cachedShader;i&&0===--i.count&&(this._shadersToRelease[i.keyword]=i)}},o.prototype.isDestroyed=function(){return!1},o.prototype.destroy=function(){var e=this._shaders;for(var t in e)e.hasOwnProperty(t)&&e[t].shaderProgram.finalDestroy();return i(this)},o}),define("Cesium/Renderer/UniformState",["../Core/BoundingRectangle","../Core/Cartesian2","../Core/Cartesian3","../Core/Cartesian4","../Core/Cartographic","../Core/defined","../Core/defineProperties","../Core/EncodedCartesian3","../Core/Math","../Core/Matrix3","../Core/Matrix4","../Core/Simon1994PlanetaryPositions","../Core/Transforms","../Scene/SceneMode"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p){"use strict";function m(){this.globeDepthTexture=void 0,this._viewport=new e,this._viewportCartesian4=new n,this._viewportDirty=!1,this._viewportOrthographicMatrix=c.clone(c.IDENTITY),this._viewportTransformation=c.clone(c.IDENTITY),this._model=c.clone(c.IDENTITY),this._view=c.clone(c.IDENTITY),this._inverseView=c.clone(c.IDENTITY),this._projection=c.clone(c.IDENTITY),this._infiniteProjection=c.clone(c.IDENTITY),this._entireFrustum=new t,this._currentFrustum=new t,this._frustumPlanes=new n,this._frameState=void 0,this._temeToPseudoFixed=u.clone(c.IDENTITY),this._view3DDirty=!0,this._view3D=new c,this._inverseView3DDirty=!0,this._inverseView3D=new c,this._inverseModelDirty=!0,this._inverseModel=new c,this._inverseTransposeModelDirty=!0,this._inverseTransposeModel=new u,this._viewRotation=new u,this._inverseViewRotation=new u,this._viewRotation3D=new u,this._inverseViewRotation3D=new u,this._inverseProjectionDirty=!0,this._inverseProjection=new c,this._inverseProjectionOITDirty=!0,this._inverseProjectionOIT=new c,this._modelViewDirty=!0,this._modelView=new c,this._modelView3DDirty=!0,this._modelView3D=new c,this._modelViewRelativeToEyeDirty=!0,this._modelViewRelativeToEye=new c,this._inverseModelViewDirty=!0,this._inverseModelView=new c,this._inverseModelView3DDirty=!0,this._inverseModelView3D=new c,this._viewProjectionDirty=!0,this._viewProjection=new c,this._inverseViewProjectionDirty=!0,this._inverseViewProjection=new c,this._modelViewProjectionDirty=!0,this._modelViewProjection=new c,this._inverseModelViewProjectionDirty=!0,this._inverseModelViewProjection=new c,this._modelViewProjectionRelativeToEyeDirty=!0,this._modelViewProjectionRelativeToEye=new c,this._modelViewInfiniteProjectionDirty=!0,this._modelViewInfiniteProjection=new c,this._normalDirty=!0,this._normal=new u,this._normal3DDirty=!0,this._normal3D=new u,this._inverseNormalDirty=!0,this._inverseNormal=new u,this._inverseNormal3DDirty=!0,this._inverseNormal3D=new u,this._encodedCameraPositionMCDirty=!0,this._encodedCameraPositionMC=new s,this._cameraPosition=new i,this._sunPositionWC=new i,this._sunPositionColumbusView=new i,this._sunDirectionWC=new i,this._sunDirectionEC=new i,this._moonDirectionEC=new i,this._pass=void 0,this._mode=void 0,this._mapProjection=void 0,this._cameraDirection=new i,this._cameraRight=new i,this._cameraUp=new i,this._frustum2DWidth=0,this._eyeHeight2D=new t,this._resolutionScale=1,this._fogDensity=void 0; +}function f(e,t){c.clone(t,e._view),c.getRotation(t,e._viewRotation),e._view3DDirty=!0,e._inverseView3DDirty=!0,e._modelViewDirty=!0,e._modelView3DDirty=!0,e._modelViewRelativeToEyeDirty=!0,e._inverseModelViewDirty=!0,e._inverseModelView3DDirty=!0,e._viewProjectionDirty=!0,e._inverseViewProjectionDirty=!0,e._modelViewProjectionDirty=!0,e._modelViewProjectionRelativeToEyeDirty=!0,e._modelViewInfiniteProjectionDirty=!0,e._normalDirty=!0,e._inverseNormalDirty=!0,e._normal3DDirty=!0,e._inverseNormal3DDirty=!0}function g(e,t){c.clone(t,e._inverseView),c.getRotation(t,e._inverseViewRotation)}function v(e,t){c.clone(t,e._projection),e._inverseProjectionDirty=!0,e._inverseProjectionOITDirty=!0,e._viewProjectionDirty=!0,e._inverseViewProjectionDirty=!0,e._modelViewProjectionDirty=!0,e._modelViewProjectionRelativeToEyeDirty=!0}function _(e,t){c.clone(t,e._infiniteProjection),e._modelViewInfiniteProjectionDirty=!0}function y(e,t){i.clone(t.positionWC,e._cameraPosition),i.clone(t.directionWC,e._cameraDirection),i.clone(t.rightWC,e._cameraRight),i.clone(t.upWC,e._cameraUp),e._encodedCameraPositionMCDirty=!0}function C(e,t){o(d.computeIcrfToFixedMatrix(t.time,W))||(W=d.computeTemeToPseudoFixedMatrix(t.time,W));var n=h.computeSunPositionInEarthInertialFrame(t.time,e._sunPositionWC);u.multiplyByVector(W,n,n),i.normalize(n,e._sunDirectionWC),n=u.multiplyByVector(e.viewRotation3D,n,e._sunDirectionEC),i.normalize(n,n),n=h.computeMoonPositionInEarthInertialFrame(t.time,e._moonDirectionEC),u.multiplyByVector(W,n,n),u.multiplyByVector(e.viewRotation3D,n,n),i.normalize(n,n);var r=t.mapProjection,a=r.ellipsoid,s=a.cartesianToCartographic(e._sunPositionWC,H);r.project(s,e._sunPositionColumbusView)}function w(e){if(e._viewportDirty){var t=e._viewport;c.computeOrthographicOffCenter(t.x,t.x+t.width,t.y,t.y+t.height,0,1,e._viewportOrthographicMatrix),c.computeViewportTransformation(t,0,1,e._viewportTransformation),e._viewportDirty=!1}}function E(e){e._inverseProjectionDirty&&(e._inverseProjectionDirty=!1,c.inverse(e._projection,e._inverseProjection))}function b(e){e._inverseProjectionOITDirty&&(e._inverseProjectionOITDirty=!1,e._mode!==p.SCENE2D&&e._mode!==p.MORPHING?c.inverse(e._projection,e._inverseProjectionOIT):c.clone(c.IDENTITY,e._inverseProjectionOIT))}function S(e){e._modelViewDirty&&(e._modelViewDirty=!1,c.multiplyTransformation(e._view,e._model,e._modelView))}function T(e){e._modelView3DDirty&&(e._modelView3DDirty=!1,c.multiplyTransformation(e.view3D,e._model,e._modelView3D))}function x(e){e._inverseModelViewDirty&&(e._inverseModelViewDirty=!1,c.inverse(e.modelView,e._inverseModelView))}function A(e){e._inverseModelView3DDirty&&(e._inverseModelView3DDirty=!1,c.inverse(e.modelView3D,e._inverseModelView3D))}function P(e){e._viewProjectionDirty&&(e._viewProjectionDirty=!1,c.multiply(e._projection,e._view,e._viewProjection))}function M(e){e._inverseViewProjectionDirty&&(e._inverseViewProjectionDirty=!1,c.inverse(e.viewProjection,e._inverseViewProjection))}function D(e){e._modelViewProjectionDirty&&(e._modelViewProjectionDirty=!1,c.multiply(e._projection,e.modelView,e._modelViewProjection))}function I(e){if(e._modelViewRelativeToEyeDirty){e._modelViewRelativeToEyeDirty=!1;var t=e.modelView,i=e._modelViewRelativeToEye;i[0]=t[0],i[1]=t[1],i[2]=t[2],i[3]=t[3],i[4]=t[4],i[5]=t[5],i[6]=t[6],i[7]=t[7],i[8]=t[8],i[9]=t[9],i[10]=t[10],i[11]=t[11],i[12]=0,i[13]=0,i[14]=0,i[15]=t[15]}}function R(e){e._inverseModelViewProjectionDirty&&(e._inverseModelViewProjectionDirty=!1,c.inverse(e.modelViewProjection,e._inverseModelViewProjection))}function O(e){e._modelViewProjectionRelativeToEyeDirty&&(e._modelViewProjectionRelativeToEyeDirty=!1,c.multiply(e._projection,e.modelViewRelativeToEye,e._modelViewProjectionRelativeToEye))}function L(e){e._modelViewInfiniteProjectionDirty&&(e._modelViewInfiniteProjectionDirty=!1,c.multiply(e._infiniteProjection,e.modelView,e._modelViewInfiniteProjection))}function N(e){if(e._normalDirty){e._normalDirty=!1;var t=e._normal;c.getRotation(e.inverseModelView,t),u.transpose(t,t)}}function F(e){if(e._normal3DDirty){e._normal3DDirty=!1;var t=e._normal3D;c.getRotation(e.inverseModelView3D,t),u.transpose(t,t)}}function k(e){e._inverseNormalDirty&&(e._inverseNormalDirty=!1,c.getRotation(e.inverseModelView,e._inverseNormal))}function B(e){e._inverseNormal3DDirty&&(e._inverseNormal3DDirty=!1,c.getRotation(e.inverseModelView3D,e._inverseNormal3D))}function z(e){e._encodedCameraPositionMCDirty&&(e._encodedCameraPositionMCDirty=!1,c.multiplyByPoint(e.inverseModel,e._cameraPosition,q),s.fromCartesian(q,e._encodedCameraPositionMC))}function V(e,t,n,r,a,s,u,h){var m=j;m.x=e.y,m.y=e.z,m.z=e.x;var f=Y;f.x=n.y,f.y=n.z,f.z=n.x;var g=X;g.x=r.y,g.y=r.z,g.z=r.x;var v=Z;v.x=t.y,v.y=t.z,v.z=t.x,s===p.SCENE2D&&(m.z=.5*a);var _=u.unproject(m,K);_.longitude=l.clamp(_.longitude,-Math.PI,Math.PI),_.latitude=l.clamp(_.latitude,-l.PI_OVER_TWO,l.PI_OVER_TWO);var y=u.ellipsoid,C=y.cartographicToCartesian(_,J),w=d.eastNorthUpToFixedFrame(C,y,Q);return c.multiplyByPointAsVector(w,f,f),c.multiplyByPointAsVector(w,g,g),c.multiplyByPointAsVector(w,v,v),o(h)||(h=new c),h[0]=f.x,h[1]=g.x,h[2]=-v.x,h[3]=0,h[4]=f.y,h[5]=g.y,h[6]=-v.y,h[7]=0,h[8]=f.z,h[9]=g.z,h[10]=-v.z,h[11]=0,h[12]=-i.dot(f,C),h[13]=-i.dot(g,C),h[14]=i.dot(v,C),h[15]=1,h}function U(e){e._view3DDirty&&(e._mode===p.SCENE3D?c.clone(e._view,e._view3D):V(e._cameraPosition,e._cameraDirection,e._cameraRight,e._cameraUp,e._frustum2DWidth,e._mode,e._mapProjection,e._view3D),c.getRotation(e._view3D,e._viewRotation3D),e._view3DDirty=!1)}function G(e){e._inverseView3DDirty&&(c.inverseTransformation(e.view3D,e._inverseView3D),c.getRotation(e._inverseView3D,e._inverseViewRotation3D),e._inverseView3DDirty=!1)}a(m.prototype,{frameState:{get:function(){return this._frameState}},viewport:{get:function(){return this._viewport},set:function(t){if(!e.equals(t,this._viewport)){e.clone(t,this._viewport);var i=this._viewport,n=this._viewportCartesian4;n.x=i.x,n.y=i.y,n.z=i.width,n.w=i.height,this._viewportDirty=!0}}},viewportCartesian4:{get:function(){return this._viewportCartesian4}},viewportOrthographic:{get:function(){return w(this),this._viewportOrthographicMatrix}},viewportTransformation:{get:function(){return w(this),this._viewportTransformation}},model:{get:function(){return this._model},set:function(e){c.clone(e,this._model),this._modelView3DDirty=!0,this._inverseModelView3DDirty=!0,this._inverseModelDirty=!0,this._inverseTransposeModelDirty=!0,this._modelViewDirty=!0,this._inverseModelViewDirty=!0,this._modelViewRelativeToEyeDirty=!0,this._inverseModelViewDirty=!0,this._modelViewProjectionDirty=!0,this._inverseModelViewProjectionDirty=!0,this._modelViewProjectionRelativeToEyeDirty=!0,this._modelViewInfiniteProjectionDirty=!0,this._normalDirty=!0,this._inverseNormalDirty=!0,this._normal3DDirty=!0,this._inverseNormal3DDirty=!0,this._encodedCameraPositionMCDirty=!0}},inverseModel:{get:function(){return this._inverseModelDirty&&(this._inverseModelDirty=!1,c.inverse(this._model,this._inverseModel)),this._inverseModel}},inverseTranposeModel:{get:function(){var e=this._inverseTransposeModel;return this._inverseTransposeModelDirty&&(this._inverseTransposeModelDirty=!1,c.getRotation(this.inverseModel,e),u.transpose(e,e)),e}},view:{get:function(){return this._view}},view3D:{get:function(){return U(this),this._view3D}},viewRotation:{get:function(){return U(this),this._viewRotation}},viewRotation3D:{get:function(){return U(this),this._viewRotation3D}},inverseView:{get:function(){return this._inverseView}},inverseView3D:{get:function(){return G(this),this._inverseView3D}},inverseViewRotation:{get:function(){return this._inverseViewRotation}},inverseViewRotation3D:{get:function(){return G(this),this._inverseViewRotation3D}},projection:{get:function(){return this._projection}},inverseProjection:{get:function(){return E(this),this._inverseProjection}},inverseProjectionOIT:{get:function(){return b(this),this._inverseProjectionOIT}},infiniteProjection:{get:function(){return this._infiniteProjection}},modelView:{get:function(){return S(this),this._modelView}},modelView3D:{get:function(){return T(this),this._modelView3D}},modelViewRelativeToEye:{get:function(){return I(this),this._modelViewRelativeToEye}},inverseModelView:{get:function(){return x(this),this._inverseModelView}},inverseModelView3D:{get:function(){return A(this),this._inverseModelView3D}},viewProjection:{get:function(){return P(this),this._viewProjection}},inverseViewProjection:{get:function(){return M(this),this._inverseViewProjection}},modelViewProjection:{get:function(){return D(this),this._modelViewProjection}},inverseModelViewProjection:{get:function(){return R(this),this._inverseModelViewProjection}},modelViewProjectionRelativeToEye:{get:function(){return O(this),this._modelViewProjectionRelativeToEye}},modelViewInfiniteProjection:{get:function(){return L(this),this._modelViewInfiniteProjection}},normal:{get:function(){return N(this),this._normal}},normal3D:{get:function(){return F(this),this._normal3D}},inverseNormal:{get:function(){return k(this),this._inverseNormal}},inverseNormal3D:{get:function(){return B(this),this._inverseNormal3D}},entireFrustum:{get:function(){return this._entireFrustum}},currentFrustum:{get:function(){return this._currentFrustum}},frustumPlanes:{get:function(){return this._frustumPlanes}},eyeHeight2D:{get:function(){return this._eyeHeight2D}},sunPositionWC:{get:function(){return this._sunPositionWC}},sunPositionColumbusView:{get:function(){return this._sunPositionColumbusView}},sunDirectionWC:{get:function(){return this._sunDirectionWC}},sunDirectionEC:{get:function(){return this._sunDirectionEC}},moonDirectionEC:{get:function(){return this._moonDirectionEC}},encodedCameraPositionMCHigh:{get:function(){return z(this),this._encodedCameraPositionMC.high}},encodedCameraPositionMCLow:{get:function(){return z(this),this._encodedCameraPositionMC.low}},temeToPseudoFixedMatrix:{get:function(){return this._temeToPseudoFixed}},resolutionScale:{get:function(){return this._resolutionScale}},fogDensity:{get:function(){return this._fogDensity}},pass:{get:function(){return this._pass}}});var W=new u,H=new r;m.prototype.updateCamera=function(e){f(this,e.viewMatrix),g(this,e.inverseViewMatrix),y(this,e),this._entireFrustum.x=e.frustum.near,this._entireFrustum.y=e.frustum.far,this.updateFrustum(e.frustum)},m.prototype.updateFrustum=function(e){v(this,e.projectionMatrix),o(e.infiniteProjectionMatrix)&&_(this,e.infiniteProjectionMatrix),this._currentFrustum.x=e.near,this._currentFrustum.y=e.far,o(e.top)||(e=e._offCenterFrustum),this._frustumPlanes.x=e.top,this._frustumPlanes.y=e.bottom,this._frustumPlanes.z=e.left,this._frustumPlanes.w=e.right},m.prototype.updatePass=function(e){this._pass=e},m.prototype.update=function(e){this._mode=e.mode,this._mapProjection=e.mapProjection;var t=e.context._canvas;this._resolutionScale=t.width/t.clientWidth;var i=e.camera;this.updateCamera(i),e.mode===p.SCENE2D?(this._frustum2DWidth=i.frustum.right-i.frustum.left,this._eyeHeight2D.x=.5*this._frustum2DWidth,this._eyeHeight2D.y=this._eyeHeight2D.x*this._eyeHeight2D.x):(this._frustum2DWidth=0,this._eyeHeight2D.x=0,this._eyeHeight2D.y=0),C(this,e),this._fogDensity=e.fog.density,this._frameState=e,this._temeToPseudoFixed=d.computeTemeToPseudoFixedMatrix(e.time,this._temeToPseudoFixed)};var q=new i,j=new i,Y=new i,X=new i,Z=new i,K=new r,J=new i,Q=new c;return m}),define("Cesium/Renderer/Context",["../Core/clone","../Core/Color","../Core/ComponentDatatype","../Core/createGuid","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/destroyObject","../Core/DeveloperError","../Core/FeatureDetection","../Core/Geometry","../Core/GeometryAttribute","../Core/Math","../Core/Matrix4","../Core/PrimitiveType","../Core/RuntimeError","../Shaders/ViewportQuadVS","./BufferUsage","./ClearCommand","./ContextLimits","./CubeMap","./DrawCommand","./PassState","./PickFramebuffer","./PixelDatatype","./RenderbufferFormat","./RenderState","./ShaderCache","./ShaderProgram","./Texture","./UniformState","./VertexArray","./WebGLConstants"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g,v,_,y,C,w,E,b,S,T,x,A,P,M,D,I,R){"use strict";function O(e,t){var i="WebGL Error: ";switch(t){case e.INVALID_ENUM:i+="INVALID_ENUM";break;case e.INVALID_VALUE:i+="INVALID_VALUE";break;case e.INVALID_OPERATION:i+="INVALID_OPERATION";break;case e.OUT_OF_MEMORY:i+="OUT_OF_MEMORY";break;case e.CONTEXT_LOST_WEBGL:i+="CONTEXT_LOST_WEBGL lost";break;default:i+="Unknown ("+t+")"}return i}function L(e,t,i,n){for(var r=O(e,n)+": "+t.name+"(",o=0;on;++n){var r=e.getExtension(t[n]);if(r)return r}}function z(i,a){if("undefined"==typeof WebGLRenderingContext)throw new f("The browser does not support WebGL. Visit http://get.webgl.org.");this._canvas=i,a=e(a,!0),a=r(a,{}),a.allowTextureFilterAnisotropic=r(a.allowTextureFilterAnisotropic,!0);var s=r(a.webgl,{});s.alpha=r(s.alpha,!1);var l,u=!1,c="undefined"!=typeof WebGL2RenderingContext,h=!1;if(u&&c&&(l=i.getContext("webgl2",s)||i.getContext("experimental-webgl2",s)||void 0,o(l)&&(h=!0)),o(l)||(l=i.getContext("webgl",s)||i.getContext("experimental-webgl",s)||void 0),!o(l))throw new f("The browser supports WebGL, but initialization failed.");this._originalGLContext=l,this._webgl2=h,this._id=n(),this.validateFramebuffer=!1,this.validateShaderProgram=!1,this.logShaderCompilation=!1,this._throwOnWebGLError=!1,this._shaderCache=new A(this);var d=this._gl=this._originalGLContext;this._redBits=d.getParameter(d.RED_BITS),this._greenBits=d.getParameter(d.GREEN_BITS),this._blueBits=d.getParameter(d.BLUE_BITS),this._alphaBits=d.getParameter(d.ALPHA_BITS),this._depthBits=d.getParameter(d.DEPTH_BITS),this._stencilBits=d.getParameter(d.STENCIL_BITS),y._maximumCombinedTextureImageUnits=d.getParameter(d.MAX_COMBINED_TEXTURE_IMAGE_UNITS),y._maximumCubeMapSize=d.getParameter(d.MAX_CUBE_MAP_TEXTURE_SIZE),y._maximumFragmentUniformVectors=d.getParameter(d.MAX_FRAGMENT_UNIFORM_VECTORS),y._maximumTextureImageUnits=d.getParameter(d.MAX_TEXTURE_IMAGE_UNITS),y._maximumRenderbufferSize=d.getParameter(d.MAX_RENDERBUFFER_SIZE),y._maximumTextureSize=d.getParameter(d.MAX_TEXTURE_SIZE),y._maximumVaryingVectors=d.getParameter(d.MAX_VARYING_VECTORS),y._maximumVertexAttributes=d.getParameter(d.MAX_VERTEX_ATTRIBS),y._maximumVertexTextureImageUnits=d.getParameter(d.MAX_VERTEX_TEXTURE_IMAGE_UNITS),y._maximumVertexUniformVectors=d.getParameter(d.MAX_VERTEX_UNIFORM_VECTORS);var p=d.getParameter(d.ALIASED_LINE_WIDTH_RANGE);y._minimumAliasedLineWidth=p[0],y._maximumAliasedLineWidth=p[1];var m=d.getParameter(d.ALIASED_POINT_SIZE_RANGE);y._minimumAliasedPointSize=m[0],y._maximumAliasedPointSize=m[1];var g=d.getParameter(d.MAX_VIEWPORT_DIMS);y._maximumViewportWidth=g[0],y._maximumViewportHeight=g[1];var v=d.getShaderPrecisionFormat(d.FRAGMENT_SHADER,d.HIGH_FLOAT);y._highpFloatSupported=0!==v.precision;var _=d.getShaderPrecisionFormat(d.FRAGMENT_SHADER,d.HIGH_INT);y._highpIntSupported=0!==_.rangeMax,this._antialias=d.getContextAttributes().antialias,this._standardDerivatives=!!B(d,["OES_standard_derivatives"]),this._elementIndexUint=!!B(d,["OES_element_index_uint"]),this._depthTexture=!!B(d,["WEBGL_depth_texture","WEBKIT_WEBGL_depth_texture"]),this._textureFloat=!!B(d,["OES_texture_float"]),this._fragDepth=!!B(d,["EXT_frag_depth"]),this._debugShaders=B(d,["WEBGL_debug_shaders"]);var C=a.allowTextureFilterAnisotropic?B(d,["EXT_texture_filter_anisotropic","WEBKIT_EXT_texture_filter_anisotropic"]):void 0;this._textureFilterAnisotropic=C,y._maximumTextureFilterAnisotropy=o(C)?d.getParameter(C.MAX_TEXTURE_MAX_ANISOTROPY_EXT):1;var w,b,S,T,P,M,I,O,L,N;if(h){var F=this;w=function(){return F._gl.createVertexArray()},b=function(e){F._gl.bindVertexArray(e)},S=function(e){F._gl.deleteVertexArray(e)},T=function(e,t,i,n,r){d.drawElementsInstanced(e,t,i,n,r)},P=function(e,t,i,n){d.drawArraysInstanced(e,t,i,n)},M=function(e,t){d.vertexAttribDivisor(e,t)},I=function(e){d.drawBuffers(e)}}else O=B(d,["OES_vertex_array_object"]),o(O)&&(w=function(){return O.createVertexArrayOES()},b=function(e){O.bindVertexArrayOES(e)},S=function(e){O.deleteVertexArrayOES(e)}),L=B(d,["ANGLE_instanced_arrays"]),o(L)&&(T=function(e,t,i,n,r){L.drawElementsInstancedANGLE(e,t,i,n,r)},P=function(e,t,i,n){L.drawArraysInstancedANGLE(e,t,i,n)},M=function(e,t){L.vertexAttribDivisorANGLE(e,t)}),N=B(d,["WEBGL_draw_buffers"]),o(N)&&(I=function(e){N.drawBuffersWEBGL(e)});this.glCreateVertexArray=w,this.glBindVertexArray=b,this.glDeleteVertexArray=S,this.glDrawElementsInstanced=T,this.glDrawArraysInstanced=P,this.glVertexAttribDivisor=M,this.glDrawBuffers=I,this._vertexArrayObject=!!O,this._instancedArrays=!!L,this._drawBuffers=!!N,y._maximumDrawBuffers=this.drawBuffers?d.getParameter(R.MAX_DRAW_BUFFERS):1,y._maximumColorAttachments=this.drawBuffers?d.getParameter(R.MAX_COLOR_ATTACHMENTS):1;var k=d.getParameter(d.COLOR_CLEAR_VALUE);this._clearColor=new t(k[0],k[1],k[2],k[3]),this._clearDepth=d.getParameter(d.DEPTH_CLEAR_VALUE),this._clearStencil=d.getParameter(d.STENCIL_CLEAR_VALUE);var z=new D,V=new E(this),U=x.fromCache();this._defaultPassState=V,this._defaultRenderState=U,this._defaultTexture=void 0,this._defaultCubeMap=void 0,this._us=z,this._currentRenderState=U,this._currentPassState=V,this._currentFramebuffer=void 0,this._maxFrameTextureUnitIndex=0,this._vertexAttribDivisors=[],this._previousDrawInstanced=!1;for(var G=0;Gn;++n)e.activeTexture(e.TEXTURE0+n),e.bindTexture(e.TEXTURE_2D,null),e.bindTexture(e.TEXTURE_CUBE_MAP,null)},z.prototype.readPixels=function(e){var t=this._gl;e=e||{};var i=Math.max(e.x||0,0),n=Math.max(e.y||0,0),r=e.width||t.drawingBufferWidth,o=e.height||t.drawingBufferHeight,a=e.framebuffer,s=new Uint8Array(4*r*o);return G(this,a),t.readPixels(i,n,r,o,t.RGBA,t.UNSIGNED_BYTE,s),s};var Z={position:0,textureCoordinates:1};return z.prototype.getViewportQuadVertexArray=function(){var e=this.cache.viewportQuad_vertexArray;if(!o(e)){var t=new c({attributes:{position:new h({componentDatatype:i.FLOAT,componentsPerAttribute:2,values:[-1,-1,1,-1,1,1,-1,1]}),textureCoordinates:new h({componentDatatype:i.FLOAT,componentsPerAttribute:2,values:[0,0,1,0,1,1,0,1]})},indices:new Uint16Array([0,1,2,0,2,3]),primitiveType:m.TRIANGLES});e=I.fromGeometry({context:this,geometry:t,attributeLocations:Z,bufferUsage:v.STATIC_DRAW,interleave:!0}),this.cache.viewportQuad_vertexArray=e}return e},z.prototype.createViewportQuadCommand=function(e,t){return t=r(t,r.EMPTY_OBJECT),new w({vertexArray:this.getViewportQuadVertexArray(),primitiveType:m.TRIANGLES,renderState:t.renderState,shaderProgram:P.fromCache({context:this,vertexShaderSource:g,fragmentShaderSource:e,attributeLocations:Z}),uniformMap:t.uniformMap,owner:t.owner,framebuffer:t.framebuffer})},z.prototype.createPickFramebuffer=function(){return new b(this)},z.prototype.getObjectByPickColor=function(e){return this._pickObjects[e.toRgba()]},a(q.prototype,{object:{get:function(){return this._pickObjects[this.key]},set:function(e){this._pickObjects[this.key]=e}}}),q.prototype.destroy=function(){delete this._pickObjects[this.key]},z.prototype.createPickId=function(e){++this._nextPickColor[0];var i=this._nextPickColor[0];if(0===i)throw new f("Out of unique Pick IDs.");return this._pickObjects[i]=e,new q(this._pickObjects,i,t.fromRgba(i))},z.prototype.isDestroyed=function(){return!1},z.prototype.destroy=function(){var e=this.cache;for(var t in e)if(e.hasOwnProperty(t)){var i=e[t];o(i.destroy)&&i.destroy()}return this._shaderCache=this._shaderCache.destroy(),this._defaultTexture=this._defaultTexture&&this._defaultTexture.destroy(),this._defaultCubeMap=this._defaultCubeMap&&this._defaultCubeMap.destroy(),s(this)},z}),define("Cesium/Renderer/loadCubeMap",["../Core/defined","../Core/DeveloperError","../Core/loadImage","../ThirdParty/when","./CubeMap"],function(e,t,i,n,r){"use strict";function o(e,t,o){var a=[i(t.positiveX,o),i(t.negativeX,o),i(t.positiveY,o),i(t.negativeY,o),i(t.positiveZ,o),i(t.negativeZ,o)];return n.all(a,function(t){return new r({context:e,source:{positiveX:t[0],negativeX:t[1],positiveY:t[2],negativeY:t[3],positiveZ:t[4],negativeZ:t[5]}})})}return o}),define("Cesium/Scene/DiscardMissingTileImagePolicy",["../Core/defaultValue","../Core/defined","../Core/DeveloperError","../Core/getImagePixels","../Core/loadImageViaBlob","../ThirdParty/when"],function(e,t,i,n,r,o){"use strict";function a(a){function s(e){t(e.blob)&&(u._missingImageByteLength=e.blob.size);var i=n(e);if(a.disableCheckIfAllPixelsAreTransparent){for(var r=!0,o=e.width,s=a.pixelsToCheck,l=0,c=s.length;r&&c>l;++l){var h=s[l],d=4*h.x+h.y*o,p=i[d+3];p>0&&(r=!1)}r&&(i=void 0)}u._missingImagePixels=i,u._isReady=!0}function l(){u._missingImagePixels=void 0,u._isReady=!0}if(a=e(a,e.EMPTY_OBJECT),!t(a.missingImageUrl))throw new i("options.missingImageUrl is required.");if(!t(a.pixelsToCheck))throw new i("options.pixelsToCheck is required.");this._pixelsToCheck=a.pixelsToCheck,this._missingImagePixels=void 0,this._missingImageByteLength=void 0,this._isReady=!1;var u=this;o(r(a.missingImageUrl),s,l)}return a.prototype.isReady=function(){return this._isReady},a.prototype.shouldDiscardImage=function(e){if(!this._isReady)throw new i("shouldDiscardImage must not be called before the discard policy is ready.");var r=this._pixelsToCheck,o=this._missingImagePixels;if(!t(o))return!1;if(t(e.blob)&&e.blob.size!==this._missingImageByteLength)return!1;for(var a=n(e),s=e.width,l=0,u=r.length;u>l;++l)for(var c=r[l],h=4*c.x+c.y*s,d=0;4>d;++d){var p=h+d;if(a[p]!==o[p])return!1}return!0},a}),define("Cesium/Scene/ImageryLayerFeatureInfo",["../Core/defined"],function(e){"use strict";function t(){this.name=void 0,this.description=void 0,this.position=void 0,this.data=void 0,this.imageryLayer=void 0}return t.prototype.configureNameFromProperties=function(t){var i,n=10;for(var r in t)if(t.hasOwnProperty(r)&&t[r]){var o=r.toLowerCase();n>1&&"name"===o?(n=1,i=r):n>2&&"title"===o?(n=2,i=r):n>3&&/name/i.test(r)?(n=3,i=r):n>4&&/title/i.test(r)&&(n=4,i=r)}e(i)&&(this.name=t[i])},t.prototype.configureDescriptionFromProperties=function(t){function i(t){var n='';for(var r in t)if(t.hasOwnProperty(r)){var o=t[r];e(o)&&(n+="object"==typeof o?"":"")}return n+="
"+r+""+i(o)+"
"+r+""+o+"
"}this.description=i(t)},t}),define("Cesium/Scene/ImageryProvider",["../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/loadImage","../Core/loadImageViaBlob","../Core/throttleRequestByServer"],function(e,t,i,n,r,o){"use strict";function a(){this.defaultAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,i.throwInstantiationError()}return t(a.prototype,{ready:{get:i.throwInstantiationError},readyPromise:{get:i.throwInstantiationError},rectangle:{get:i.throwInstantiationError},tileWidth:{get:i.throwInstantiationError},tileHeight:{get:i.throwInstantiationError},maximumLevel:{get:i.throwInstantiationError},minimumLevel:{get:i.throwInstantiationError},tilingScheme:{get:i.throwInstantiationError},tileDiscardPolicy:{get:i.throwInstantiationError},errorEvent:{get:i.throwInstantiationError},credit:{get:i.throwInstantiationError},proxy:{get:i.throwInstantiationError},hasAlphaChannel:{get:i.throwInstantiationError}}),a.prototype.getTileCredits=i.throwInstantiationError,a.prototype.requestImage=i.throwInstantiationError,a.prototype.pickFeatures=i.throwInstantiationError,a.loadImage=function(t,i){return e(t.tileDiscardPolicy)?o(i,r):o(i,n)},a}),define("Cesium/Scene/ArcGisMapServerImageryProvider",["../Core/Cartesian2","../Core/Cartesian3","../Core/Cartographic","../Core/Credit","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Event","../Core/GeographicProjection","../Core/GeographicTilingScheme","../Core/loadJson","../Core/loadJsonp","../Core/Math","../Core/Rectangle","../Core/RuntimeError","../Core/TileProviderError","../Core/WebMercatorProjection","../Core/WebMercatorTilingScheme","../ThirdParty/when","./DiscardMissingTileImagePolicy","./ImageryLayerFeatureInfo","./ImageryProvider"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g,v,_,y,C,w,E){"use strict";function b(i){function a(r){var a=r.tileInfo;if(o(a)){if(p._tileWidth=a.rows,p._tileHeight=a.cols,102100===a.spatialReference.wkid||102113===a.spatialReference.wkid)p._tilingScheme=new _({ellipsoid:i.ellipsoid});else{if(4326!==r.tileInfo.spatialReference.wkid){var s="Tile spatial reference WKID "+r.tileInfo.spatialReference.wkid+" is not supported.";return void(h=g.handleError(h,p,p._errorEvent,s,void 0,void 0,void 0,u))}p._tilingScheme=new c({ellipsoid:i.ellipsoid})}if(p._maximumLevel=r.tileInfo.lods.length-1,o(r.fullExtent)){if(o(r.fullExtent.spatialReference)&&o(r.fullExtent.spatialReference.wkid))if(102100===r.fullExtent.spatialReference.wkid||102113===r.fullExtent.spatialReference.wkid){var l=new v,d=r.fullExtent,f=l.unproject(new t(Math.max(d.xmin,-p._tilingScheme.ellipsoid.maximumRadius*Math.PI),Math.max(d.ymin,-p._tilingScheme.ellipsoid.maximumRadius*Math.PI),0)),y=l.unproject(new t(Math.min(d.xmax,p._tilingScheme.ellipsoid.maximumRadius*Math.PI),Math.min(d.ymax,p._tilingScheme.ellipsoid.maximumRadius*Math.PI),0));p._rectangle=new m(f.longitude,f.latitude,y.longitude,y.latitude)}else{if(4326!==r.fullExtent.spatialReference.wkid){var w="fullExtent.spatialReference WKID "+r.fullExtent.spatialReference.wkid+" is not supported.";return void(h=g.handleError(h,p,p._errorEvent,w,void 0,void 0,void 0,u)); +}p._rectangle=m.fromDegrees(r.fullExtent.xmin,r.fullExtent.ymin,r.fullExtent.xmax,r.fullExtent.ymax)}}else p._rectangle=p._tilingScheme.rectangle;o(p._tileDiscardPolicy)||(p._tileDiscardPolicy=new C({missingImageUrl:S(p,0,0,p._maximumLevel),pixelsToCheck:[new e(0,0),new e(200,20),new e(20,200),new e(80,110),new e(160,130)],disableCheckIfAllPixelsAreTransparent:!0})),p._useTiles=!0}else p._useTiles=!1;o(r.copyrightText)&&r.copyrightText.length>0&&(p._credit=new n(r.copyrightText)),p._ready=!0,p._readyPromise.resolve(!0),g.handleSuccess(h)}function s(e){var t="An error occurred while accessing "+p._url+".";h=g.handleError(h,p,p._errorEvent,t,void 0,void 0,void 0,u),p._readyPromise.reject(new f(t))}function u(){var e={f:"json"};o(p._token)&&(e.token=p._token);var t=d(p._url,{parameters:e,proxy:p._proxy});y(t,a,s)}i=r(i,{}),this._url=i.url,this._token=i.token,this._tileDiscardPolicy=i.tileDiscardPolicy,this._proxy=i.proxy,this._tileWidth=r(i.tileWidth,256),this._tileHeight=r(i.tileHeight,256),this._maximumLevel=i.maximumLevel,this._tilingScheme=r(i.tilingScheme,new c({ellipsoid:i.ellipsoid})),this._credit=void 0,this._useTiles=r(i.usePreCachedTilesIfAvailable,!0),this._rectangle=r(i.rectangle,this._tilingScheme.rectangle),this._layers=i.layers,this.enablePickFeatures=r(i.enablePickFeatures,!0),this._errorEvent=new l,this._ready=!1,this._readyPromise=y.defer();var h,p=this;this._useTiles?u():(this._ready=!0,this._readyPromise.resolve(!0))}function S(e,t,i,n){var r;if(e._useTiles)r=e._url+"/tile/"+n+"/"+i+"/"+t;else{var a=e._tilingScheme.tileXYToNativeRectangle(t,i,n),s=a.west+"%2C"+a.south+"%2C"+a.east+"%2C"+a.north;r=e._url+"/export?",r+="bbox="+s,r+=e._tilingScheme instanceof c?"&bboxSR=4326&imageSR=4326":"&bboxSR=3857&imageSR=3857",r+="&size="+e._tileWidth+"%2C"+e._tileHeight,r+="&format=png&transparent=true&f=image",e.layers&&(r+="&layers=show:"+e.layers)}var l=e._token;o(l)&&(-1===r.indexOf("?")&&(r+="?"),"?"!==r[r.length-1]&&(r+="&"),r+="token="+l);var u=e._proxy;return o(u)&&(r=u.getURL(r)),r}return a(b.prototype,{url:{get:function(){return this._url}},token:{get:function(){return this._token}},proxy:{get:function(){return this._proxy}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return 0}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},credit:{get:function(){return this._credit}},usingPrecachedTiles:{get:function(){return this._useTiles}},hasAlphaChannel:{get:function(){return!0}},layers:{get:function(){return this._layers}}}),b.prototype.getTileCredits=function(e,t,i){},b.prototype.requestImage=function(e,t,i){var n=S(this,e,t,i);return E.loadImage(this,n)},b.prototype.pickFeatures=function(e,n,r,a,s){if(this.enablePickFeatures){var l,u,d,m=this._tilingScheme.tileXYToNativeRectangle(e,n,r);if(this._tilingScheme instanceof c)l=p.toDegrees(a),u=p.toDegrees(s),d="4326";else{var f=this._tilingScheme.projection.project(new i(a,s,0));l=f.x,u=f.y,d="3857"}var g=this._url+"/identify?f=json&tolerance=2&geometryType=esriGeometryPoint";return g+="&geometry="+l+","+u,g+="&mapExtent="+m.west+","+m.south+","+m.east+","+m.north,g+="&imageDisplay="+this._tileWidth+","+this._tileHeight+",96",g+="&sr="+d,g+="&layers=visible",o(this._layers)&&(g+=":"+this._layers),o(this._token)&&(g+="&token="+this._token),o(this._proxy)&&(g=this._proxy.getURL(g)),h(g).then(function(e){var n=[],r=e.results;if(!o(r))return n;for(var a=0;al;++l){var p=s[l];p.credit=new i(p.attribution);for(var m=p.coverageAreas,f=0,v=p.coverageAreas.length;v>f;++f){var _=m[f],C=_.bbox;_.bbox=new c(u.toRadians(C[1]),u.toRadians(C[0]),u.toRadians(C[3]),u.toRadians(C[2]))}}b._ready=!0,b._readyPromise.resolve(!0),d.handleSuccess(w)}function v(e){var t="An error occurred while accessing "+E+".";w=d.handleError(w,b,b._errorEvent,t,void 0,void 0,void 0,C),b._readyPromise.reject(new h(t))}function C(){var e=l(E,{callbackParameterName:"jsonp",proxy:b._proxy});m(e,a,v)}o=n(o,{}),this._key=e.getKey(o.key),this._keyErrorCredit=e.getErrorCredit(o.key),this._url=o.url,this._tileProtocol=o.tileProtocol,this._mapStyle=n(o.mapStyle,f.AERIAL),this._culture=n(o.culture,""),this._tileDiscardPolicy=o.tileDiscardPolicy,this._proxy=o.proxy,this._credit=new i("Bing Imagery",_._logoData,"http://www.bing.com"),this.defaultGamma=1,(this._mapStyle===f.AERIAL||this._mapStyle===f.AERIAL_WITH_LABELS)&&(this.defaultGamma=1.3),this._tilingScheme=new p({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,ellipsoid:o.ellipsoid}),this._tileWidth=void 0,this._tileHeight=void 0,this._maximumLevel=void 0,this._imageUrlTemplate=void 0,this._imageUrlSubdomains=void 0,this._errorEvent=new s,this._ready=!1,this._readyPromise=m.defer();var w,E=this._url+"/REST/v1/Imagery/Metadata/"+this._mapStyle+"?incl=ImageryProviders&key="+this._key,b=this;C()}function y(e,t,i,n){var o=e._imageUrlTemplate,a=_.tileXYToQuadKey(t,i,n);o=o.replace("{quadkey}",a);var s=e._imageUrlSubdomains,l=(t+i+n)%s.length;o=o.replace("{subdomain}",s[l]);var u=e._proxy;return r(u)&&(o=u.getURL(o)),o}function C(e,t,i){++t;for(var n=[],o=0,a=e.length;a>o;++o){for(var s=e[o],l=s.coverageAreas,u=!1,h=0,d=s.coverageAreas.length;!u&&d>h;++h){var p=l[h];if(t>=p.zoomMin&&t<=p.zoomMax){var m=c.intersection(i,p.bbox,E);r(m)&&(u=!0)}}u&&n.push(s.credit)}return n}o(_.prototype,{url:{get:function(){return this._url}},proxy:{get:function(){return this._proxy}},key:{get:function(){return this._key}},mapStyle:{get:function(){return this._mapStyle}},culture:{get:function(){return this._culture}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return 0}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!1}}});var w=new c;_.prototype.getTileCredits=function(e,t,i){if(!this._ready)throw new a("getTileCredits must not be called before the imagery provider is ready.");var n=this._tilingScheme.tileXYToRectangle(e,t,i,w),o=C(this._attributionList,i,n);return r(this._keyErrorCredit)&&o.push(this._keyErrorCredit),o},_.prototype.requestImage=function(e,t,i){var n=y(this,e,t,i);return v.loadImage(this,n)},_.prototype.pickFeatures=function(){},_._logoData="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAD0AAAAaCAYAAAAEy1RnAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAB3RJTUUH3gIDEgcPTMnXOQAAClZJREFUWMPdWGtsFNcV/u689uH1+sXaONhlWQzBENtxiUFBpBSLd60IpXHSNig4URtSYQUkRJNSi0igViVVVBJBaBsiAgKRQJSG8AgEHCCWU4iBCprY2MSgXfOI16y9D3s9Mzsztz9yB12WNU2i9Ecy0tHOzN4793zn3POdcy7BnRfJ8I7iB3SRDPeEExswLz8Y0DZIAYDIRGAgLQAm+7Xle31J3L3Anp1MZPY+BUBjorN332vgYhpgV1FRUd6TTz45ubq6OtDV1SXpuu5g//Oept9wNwlMyAi8IXDjyF245TsDTdivDMATCATGNDU1/WbhwoWPTZs2bWx1dXWhx+Oxrl+/PqTrus5t9W8KWEzjinTAYhro/xuBStwiIgBnJBLxKIoy1u/3V/r9/krDMMz3339/Z3t7e38ikUgCMDLEt8W+Q0cAI3McYTDDmZxh7DESG5Ni43jg9Gsa+X+OsxWxPSJTSj3JZFK5ZRVJErOzs8e6XC4fgGwALhbzDgAKU1hK28KEA6PMmTMn56233qpevnz5PQDcbJ7EzVUAuMrLy3MBeABkcWOEDELSyFe4y7iMoHkriZZlKYZh8ASHZDKpJJPJHAC5APIA5APIAeBlCjo5TwlpXnbOmTPHP3fu3KZVq1atZKBcDJQ9x7V48WJfc3Pzhp6enj+tXLnyR8w4MjdG4gyVDk7KICMClzKlLUrpbQMNw5AkScppbGz8cWdn57WjR4/2caw+DEBlYjO8wX1foZQWuN3uKZIklQD4G+fhlG0Yl8uVm5WVVW6app6dne0D0G8vnxbjJntHubCUOK/badZICyWanrJuAaeUknTQpmlKkUhEWbx48U8LCwtHhUKha+fPn+85fPhwV0tLyzUACSZx9jvMFhIByNFoVDEMw/qKB5HPvJfkUqBr9+7deklJyZ/j8bi5ffv2OAslieMLsG+m2DybT2QuzEQOsF5SUqJfvXo1yc2l6Xn6rgSRSCSEc+fOhVeuXLmwoqJixvTp0wcWLFgQ7unpudHR0dF97ty5z/fu3XseQJh5adjeerquy5ZlCalUivh8Pt8HH3ywzOPxyD09PZ81NjZ+2NnZaQEQx40b54vFYqaqquEVK1b4a2tr/WvWrDn18ssv144fP36SqqoD69ev371nz57rDLwAwHHkyJGfjRs3rtowDOv06dOnu7q6rs6bN2/s7Nmz9zIjDKenWoFZKg/AlMLCwl82Nzf/m3LX22+/fXb06NF/ALC8u7u7m6ZdkUhksL29/UpLS0vzunXrVgAoBzAaQBGAiY2NjUui0ei1RCLRFwwG/9PX19cVi8WCqqoOdHd3HysrK6sDMCccDl8IBoOtiqIsOnbs2D+i0eiV3t7ez8Ph8GeRSKRT07TB/v7+i1OnTp0HYBqABzs7O/+paVo0Fot1RyKRi/F4/Gp/f39XIpHoZnoUMn6wU+ZtRDaymwmxZFk2AWjvvvvuJ/F4PMn/n5+fn1VeXu6fOXNmbU1NzUOM4Bz8QqIoyg6HwxuLxfq3bdu2a+vWrW/09/dfKy0tffDVV199BEC20+n0ud3uQgBup9Pp83g8JYqieE+ePPnxxo0bt33xxRen8/Ly7n3hhRcWASh47bXX5pWVldWFw+GuXbt27XjzzTd3BoPBDq/XG1AUZRRHmAKPVfqaoKkgCCkA+oYNG84Eg0FHTU1N5ezZs8eWlJQ4CSF8/LvZYhJPQoQQpFKpwcrKyo1su9HBwUF99erVv588eXINgOOmacIwDEopdaZSKUIpxYkTJz6sr68/BMBav379RcMwZk2aNOl+AP+qq6t7xDTNVEVFxR+j0WgSAJk4ceKlTz/9tNzpdHpZvIvpjVW6pykhhBJCbkvwgiAQQogEQL558ybdtGlTsLm5OWJZdxZmlmWll5OUEEJN0zSGhob6GcOrALSzZ8/2apqWcLlc2axGACNRkRAimqaph0Kh68xIwwB0y7IMSZKcABz5+fkl8Xj8y2g0apOb5na7rYGBgS/JV54Q0qpAAoBKaS0jBWClg1ZVFeFw2AlgVF1dXeDpp5+eWVFRUVpcXOzgvQwAbrcbDJhdudlGpKZpGtx6JCcnRxIEQbQsS2PjbjM+AMvlchnMSBaXkr7ymCCIhmEYfMoVRVESBEHI0CaTTNubssUsQRBuubCtra33pZdeCk6YMCGwZs2aipqaGn9paWmuJEl3JP0bN258eeTIkRMABrm0YomiaImiKGVlZeWxLecAgBkzZvgdDkfWjRs3ggA0bpfpoiiahBCqKEqKAy2yULMA6MlkMp6Xl3cP1x2SWCwmFhQU+CmlFhfHNFOevpX4LcvSJUkyAeDQoUOh119//fpTTz01Zf78+UWBQCBHUZQ7yE/TNGPfvn0n33vvvSP79+//BECMeZsCMGRZNgRBgNPpHHXx4sVVDQ0Nf1+wYMGYJ554YikAevDgwUMA4oIgQJZlSggZdDqdBiGEZGdn6ww0tQlJURTT4/EMHz9+/MCjjz7622AwuHbZsmVbiouLvWvXrm1wOp3ZqVRqaKQTIInf1gAMl8ulU0q1CxcuBGOxmL5u3bryQCDgycrKEjORXGtra8eOHTsOHz169OyVK1cuA+hlRYrGlNRkWR7UNO2mYRiaz+cb3dLS8gYhhOi6Hj116tSOVatWHQNALcsaME0zLghClBDSZ9+zQsZ2SoJS2udwOKLPPffcvsrKyrJAIPDQ/v37txiGofX19V3r7e29UlBQMHqEVpjwnrYA6PF4PK6q6s2qqqqpZWVlitvtljOB7enpiWzbtu3wgQMHTre1tV0E0MeKkkGuIhMAqHv37u30er3Px+NxlyiKygMPPOAnhFiXLl0Kbd68uYPNsXbu3Lk6mUwaqqr2btmyZUdtbe3hd955pwvAEFNcO3jw4K/b2tqiqqpGIpGI4/HHH/9rQ0PDCa/XOyoSidDLly8PNTU1PcZ4QuNK1ju6NYHFRAGASXPnzv1Fa2vrxzTDpapqateuXR/Nnz+/SVGUhwFMBzCBFSLZLF75DsrJGpXRAH4EIABgPIBxAEoBFAPwARjFif1sNzZ25+VlOhaxufcCqAFQC+BhAPVLliz5XSqVUkOhUAuAKWnFyR3dlsw+fg+A+8eMGfPzTZs2bY9GozEb8JkzZ9qXLl36l+Li4l8B+AmAyQDGsGrOzfXNPGPawG2l85jksmcPm+vihH+2W1iF3bvZPN+sWbPuGx4eDrW3t+85fvz41o6OjmZN04Y0TYvV19cvYIbN5QqUjG2mwj5YAqDK4XDMe+aZZ55vbW09+sorr2yuqqpqYFatAuBn3uB7XzJCY297XeaUd2RoGzOJmHb6IjFj5D777LP3DQwMfDw8PBxSVbUvkUj0hEKhj1588cXH2O7zMSPdplumoxveMx5Zlj3jx4/39vb26gMDA4MsvgYZo+p8Pr7LqQX5Ds/U7d0jFxUVZS1atKg4Nzc317Isp67rZldXV6y5ufkmI78hFtcmrx8ZweMit6XsUs4+6kmlgbW+peLf9gyMZNCR374G0y/FxEzX8b/8+bkXEBxKFwAAAABJRU5ErkJggg==",_.tileXYToQuadKey=function(e,t,i){for(var n="",r=i;r>=0;--r){var o=1<=0;--r){var o=1<m;++m){var f=l[m],g=a[p],v=a[p+1];n(g)||(g=a[p]=new t),n(v)||(v=a[p+1]=new t),e.multiplyByScalar(f,-d,u),e.add(h,u,u),g.x=f.x,g.y=f.y,g.z=f.z,g.w=-e.dot(f,u),e.multiplyByScalar(f,d,u),e.add(h,u,u),v.x=-f.x,v.y=-f.y,v.z=-f.z,v.w=-e.dot(e.negate(f,c),u),p+=2}return r},s.prototype.computeVisibility=function(e){for(var t=this.planes,i=!1,n=0,r=t.length;r>n;++n){var s=e.intersectPlane(a.fromCartesian4(t[n],h));if(s===o.OUTSIDE)return o.OUTSIDE;s===o.INTERSECTING&&(i=!0)}return i?o.INTERSECTING:o.INSIDE},s.prototype.computeVisibilityWithPlaneMask=function(e,t){if(t===s.MASK_OUTSIDE||t===s.MASK_INSIDE)return t;for(var i=s.MASK_INSIDE,n=this.planes,r=0,l=n.length;l>r;++r){var u=31>r?1<r&&0===(t&u))){var c=e.intersectPlane(a.fromCartesian4(n[r],h));if(c===o.OUTSIDE)return s.MASK_OUTSIDE;c===o.INTERSECTING&&(i|=u)}}return i},s.MASK_OUTSIDE=4294967295,s.MASK_INSIDE=0,s.MASK_INDETERMINATE=2147483647,s}),define("Cesium/Scene/PerspectiveOffCenterFrustum",["../Core/Cartesian2","../Core/Cartesian3","../Core/Cartesian4","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Matrix4","./CullingVolume"],function(e,t,i,n,r,o,a,s,l){"use strict";function u(){this.left=void 0,this._left=void 0,this.right=void 0,this._right=void 0,this.top=void 0,this._top=void 0,this.bottom=void 0,this._bottom=void 0,this.near=1,this._near=this.near,this.far=5e8,this._far=this.far,this._cullingVolume=new l,this._perspectiveMatrix=new s,this._infinitePerspective=new s}function c(e){var t=e.top,i=e.bottom,n=e.right,r=e.left,o=e.near,a=e.far;(t!==e._top||i!==e._bottom||r!==e._left||n!==e._right||o!==e._near||a!==e._far)&&(e._left=r,e._right=n,e._top=t,e._bottom=i,e._near=o,e._far=a,e._perspectiveMatrix=s.computePerspectiveOffCenter(r,n,i,t,o,a,e._perspectiveMatrix),e._infinitePerspective=s.computeInfinitePerspectiveOffCenter(r,n,i,t,o,e._infinitePerspective))}o(u.prototype,{projectionMatrix:{get:function(){return c(this),this._perspectiveMatrix}},infiniteProjectionMatrix:{get:function(){return c(this),this._infinitePerspective}}});var h=new t,d=new t,p=new t,m=new t;return u.prototype.computeCullingVolume=function(e,n,o){var a=this._cullingVolume.planes,s=this.top,l=this.bottom,u=this.right,c=this.left,f=this.near,g=this.far,v=t.cross(n,o,h),_=d;t.multiplyByScalar(n,f,_),t.add(e,_,_);var y=p;t.multiplyByScalar(n,g,y),t.add(e,y,y);var C=m;t.multiplyByScalar(v,c,C),t.add(_,C,C),t.subtract(C,e,C),t.normalize(C,C),t.cross(C,o,C);var w=a[0];return r(w)||(w=a[0]=new i),w.x=C.x,w.y=C.y,w.z=C.z,w.w=-t.dot(C,e),t.multiplyByScalar(v,u,C),t.add(_,C,C),t.subtract(C,e,C),t.normalize(C,C),t.cross(o,C,C),w=a[1],r(w)||(w=a[1]=new i),w.x=C.x,w.y=C.y,w.z=C.z,w.w=-t.dot(C,e),t.multiplyByScalar(o,l,C),t.add(_,C,C),t.subtract(C,e,C),t.normalize(C,C),t.cross(v,C,C),w=a[2],r(w)||(w=a[2]=new i),w.x=C.x,w.y=C.y,w.z=C.z,w.w=-t.dot(C,e),t.multiplyByScalar(o,s,C),t.add(_,C,C),t.subtract(C,e,C),t.normalize(C,C),t.cross(C,v,C),w=a[3],r(w)||(w=a[3]=new i),w.x=C.x,w.y=C.y,w.z=C.z,w.w=-t.dot(C,e),w=a[4],r(w)||(w=a[4]=new i),w.x=n.x,w.y=n.y,w.z=n.z,w.w=-t.dot(n,_),t.negate(n,C),w=a[5],r(w)||(w=a[5]=new i),w.x=C.x,w.y=C.y,w.z=C.z,w.w=-t.dot(C,y),this._cullingVolume},u.prototype.getPixelDimensions=function(e,t,i,n){c(this);var r=1/this.near,o=this.top*r,a=2*i*o/t;o=this.right*r;var s=2*i*o/e;return n.x=s,n.y=a,n},u.prototype.clone=function(e){return r(e)||(e=new u),e.right=this.right,e.left=this.left,e.top=this.top,e.bottom=this.bottom,e.near=this.near,e.far=this.far,e._left=void 0,e._right=void 0,e._top=void 0,e._bottom=void 0,e._near=void 0,e._far=void 0,e},u.prototype.equals=function(e){return r(e)&&this.right===e.right&&this.left===e.left&&this.top===e.top&&this.bottom===e.bottom&&this.near===e.near&&this.far===e.far},u}),define("Cesium/Scene/PerspectiveFrustum",["../Core/defined","../Core/defineProperties","../Core/DeveloperError","./PerspectiveOffCenterFrustum"],function(e,t,i,n){"use strict";function r(){this._offCenterFrustum=new n,this.fov=void 0,this._fov=void 0,this._fovy=void 0,this._sseDenominator=void 0,this.aspectRatio=void 0,this._aspectRatio=void 0,this.near=1,this._near=this.near,this.far=5e8,this._far=this.far,this.xOffset=0,this._xOffset=this.xOffset,this.yOffset=0,this._yOffset=this.yOffset}function o(e){var t=e._offCenterFrustum;(e.fov!==e._fov||e.aspectRatio!==e._aspectRatio||e.near!==e._near||e.far!==e._far||e.xOffset!==e._xOffset||e.yOffset!==e._yOffset)&&(e._aspectRatio=e.aspectRatio,e._fov=e.fov,e._fovy=e.aspectRatio<=1?e.fov:2*Math.atan(Math.tan(.5*e.fov)/e.aspectRatio),e._near=e.near,e._far=e.far,e._sseDenominator=2*Math.tan(.5*e._fovy),e._xOffset=e.xOffset,e._yOffset=e.yOffset,t.top=e.near*Math.tan(.5*e._fovy),t.bottom=-t.top,t.right=e.aspectRatio*t.top,t.left=-t.right,t.near=e.near,t.far=e.far,t.right+=e.xOffset,t.left+=e.xOffset,t.top+=e.yOffset,t.bottom+=e.yOffset)}return t(r.prototype,{projectionMatrix:{get:function(){return o(this),this._offCenterFrustum.projectionMatrix}},infiniteProjectionMatrix:{get:function(){return o(this),this._offCenterFrustum.infiniteProjectionMatrix}},fovy:{get:function(){return o(this),this._fovy}},sseDenominator:{get:function(){return o(this),this._sseDenominator}}}),r.prototype.computeCullingVolume=function(e,t,i){return o(this),this._offCenterFrustum.computeCullingVolume(e,t,i)},r.prototype.getPixelDimensions=function(e,t,i,n){return o(this),this._offCenterFrustum.getPixelDimensions(e,t,i,n)},r.prototype.clone=function(t){return e(t)||(t=new r),t.aspectRatio=this.aspectRatio,t.fov=this.fov,t.near=this.near,t.far=this.far,t._aspectRatio=void 0,t._fov=void 0,t._near=void 0,t._far=void 0,this._offCenterFrustum.clone(t._offCenterFrustum),t},r.prototype.equals=function(t){return e(t)?(o(this),o(t),this.fov===t.fov&&this.aspectRatio===t.aspectRatio&&this.near===t.near&&this.far===t.far&&this._offCenterFrustum.equals(t._offCenterFrustum)):!1},r}),define("Cesium/Scene/CameraFlightPath",["../Core/Cartesian2","../Core/Cartesian3","../Core/Cartographic","../Core/defaultValue","../Core/defined","../Core/DeveloperError","../Core/EasingFunction","../Core/Math","./PerspectiveFrustum","./PerspectiveOffCenterFrustum","./SceneMode"],function(e,t,i,n,r,o,a,s,l,u,c){"use strict";function h(e,t,i){var n,r,o;if(e instanceof l){var a=Math.tan(.5*e.fovy);return n=e.near,r=e.near*a,o=e.aspectRatio*r,Math.max(t*n/o,i*n/r)}return e instanceof u?(n=e.near,r=e.top,o=e.right,Math.max(t*n/o,i*n/r)):Math.max(t,i)}function d(e,i,n,o,a){var l=a,u=Math.max(n,o);if(!r(l)){var c=e.position,d=i,p=e.up,m=e.right,f=e.frustum,g=t.subtract(c,d,C),v=t.magnitude(t.multiplyByScalar(p,t.dot(g,p),w)),_=t.magnitude(t.multiplyByScalar(m,t.dot(g,m),w));l=Math.min(.2*h(f,v,_),1e9)}if(l>u){var y=8,E=1e6,b=-Math.pow((l-n)*E,1/y),S=Math.pow((l-o)*E,1/y);return function(e){var t=e*(S-b)+b;return-Math.pow(t,y)/E+l}}return function(e){return s.lerp(n,o,e)}}function p(e,t){return s.equalsEpsilon(e,s.TWO_PI,s.EPSILON11)&&(e=0),t>e+Math.PI?e+=s.TWO_PI:ts.PI&&(C.longitude+=s.TWO_PI);var E=d(h,r,g.height,C.height,u);return c}function g(i,n,r,o,a,l,u){function c(t){var i=t.time/n;h.setView({orientation:{heading:s.lerp(f,o,i)}}),e.lerp(m,r,i,h.position);var a=v(i),l=h.frustum,u=l.top/l.right,c=.5*(a-(l.right-l.left));l.right+=c,l.left-=c,l.top=u*l.right,l.bottom=-l.top}var h=i.camera,m=t.clone(h.position,E),f=p(h.heading,o),g=h.frustum.right-h.frustum.left,v=d(h,r,g,r.z,u);return c}function v(e,t){return{startObject:{},stopObject:{},duration:0,complete:e,cancel:t}}function _(e,t){function i(){"function"==typeof t&&t(),e.enableInputs=!0}return i}var y={},C=new t,w=new t,E=new t,b=new i,S=new i,T=new i,x=new t;return y.createTween=function(i,o){o=n(o,n.EMPTY_OBJECT);var l=o.destination,u=i.mode;if(u===c.MORPHING)return v();var h=n(o.convert,!0),d=i.mapProjection,p=d.ellipsoid,y=o.maximumHeight,C=o.easingFunction;h&&u!==c.SCENE3D&&(p.cartesianToCartographic(l,T),l=d.project(T,x));var w=i.camera,E=o.endTransform;r(E)&&w._setTransform(E);var b=o.duration;r(b)||(b=Math.ceil(t.distance(w.position,l)/1e6)+2,b=Math.min(b,3));var S=n(o.heading,0),A=n(o.pitch,-s.PI_OVER_TWO),P=n(o.roll,0),M=i.screenSpaceCameraController;M.enableInputs=!1;var D=_(M,o.complete),I=_(M,o.cancel),R=w.frustum,O=i.mode===c.SCENE2D;if(O=O&&e.equalsEpsilon(w.position,l,s.EPSILON6),O=O&&s.equalsEpsilon(Math.max(R.right-R.left,R.top-R.bottom),l.z,s.EPSILON6),O=O||i.mode!==c.SCENE2D&&t.equalsEpsilon(l,w.position,s.EPSILON10),O=O&&s.equalsEpsilon(s.negativePiToPi(S),s.negativePiToPi(w.heading),s.EPSILON10)&&s.equalsEpsilon(s.negativePiToPi(A),s.negativePiToPi(w.pitch),s.EPSILON10)&&s.equalsEpsilon(s.negativePiToPi(P),s.negativePiToPi(w.roll),s.EPSILON10))return v(D,I);var L=new Array(4);if(L[c.SCENE2D]=g,L[c.SCENE3D]=f,L[c.COLUMBUS_VIEW]=m,0>=b){var N=function(){var e=L[u](i,1,l,S,A,P,y);e({time:1}),"function"==typeof D&&D()};return v(N,I)}var F=L[u](i,b,l,S,A,P,y);if(!r(C)){var k=w.positionCartographic.height,B=u===c.SCENE3D?p.cartesianToCartographic(l).height:l.z;C=k>B&&k>11500?a.CUBIC_OUT:a.QUINTIC_IN_OUT}return{duration:b,easingFunction:C,startObject:{time:0},stopObject:{time:b},update:F,complete:D,cancel:I}},y}),define("Cesium/Scene/MapMode2D",["../Core/freezeObject"],function(e){"use strict";var t={ROTATE:0,INFINITE_SCROLL:1};return e(t)}),define("Cesium/Scene/Camera",["../Core/BoundingSphere","../Core/Cartesian2","../Core/Cartesian3","../Core/Cartesian4","../Core/Cartographic","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/EasingFunction","../Core/Ellipsoid","../Core/EllipsoidGeodesic","../Core/Event","../Core/HeadingPitchRange","../Core/Intersect","../Core/IntersectionTests","../Core/Math","../Core/Matrix3","../Core/Matrix4","../Core/Quaternion","../Core/Ray","../Core/Rectangle","../Core/Transforms","./CameraFlightPath","./MapMode2D","./PerspectiveFrustum","./SceneMode"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g,v,_,y,C,w,E,b,S,T,x){"use strict";function A(e){this._scene=e,this._transform=_.clone(_.IDENTITY),this._invTransform=_.clone(_.IDENTITY),this._actualTransform=_.clone(_.IDENTITY),this._actualInvTransform=_.clone(_.IDENTITY),this._transformChanged=!1,this.position=new i,this._position=new i,this._positionWC=new i,this._positionCartographic=new r,this.direction=new i,this._direction=new i,this._directionWC=new i,this.up=new i,this._up=new i,this._upWC=new i,this.right=new i,this._right=new i,this._rightWC=new i,this.frustum=new T,this.frustum.aspectRatio=e.drawingBufferWidth/e.drawingBufferHeight,this.frustum.fov=g.toRadians(60),this.defaultMoveAmount=1e5,this.defaultLookAmount=Math.PI/60,this.defaultRotateAmount=Math.PI/3600,this.defaultZoomAmount=1e5,this.constrainedAxis=void 0,this.maximumZoomFactor=1.5,this._moveStart=new d,this._moveEnd=new d,this._changed=new d,this._changedPosition=void 0,this._changedDirection=void 0,this._changedFrustum=void 0,this.percentageChanged=.5,this._viewMatrix=new _,this._invViewMatrix=new _,P(this),this._mode=x.SCENE3D,this._modeChanged=!0;var t=e.mapProjection;this._projection=t,this._maxCoord=t.project(new r(Math.PI,g.PI_OVER_TWO)),this._max2Dfrustum=void 0,j(this,A.DEFAULT_VIEW_RECTANGLE,this.position,!0);var n=i.magnitude(this.position);n+=n*A.DEFAULT_VIEW_FACTOR,i.normalize(this.position,this.position),i.multiplyByScalar(this.position,n,this.position)}function P(e){_.computeView(e._position,e._direction,e._up,e._right,e._viewMatrix),_.multiply(e._viewMatrix,e._actualInvTransform,e._viewMatrix),_.inverseTransformation(e._viewMatrix,e._invViewMatrix)}function M(e){E.basisTo2D(e._projection,e._transform,e._actualTransform)}function D(e){var t=e._projection,r=t.ellipsoid,o=_.getColumn(e._transform,3,ce),a=r.cartesianToCartographic(o,se),s=t.project(a,le),l=he;l.x=s.z,l.y=s.x,l.z=s.y,l.w=1;var u=n.clone(n.UNIT_X,me),c=n.add(_.getColumn(e._transform,0,ue),o,ue);r.cartesianToCartographic(c,a),t.project(a,s);var h=de;h.x=s.z,h.y=s.x,h.z=s.y,h.w=0,i.subtract(h,l,h),h.x=0;var d=pe;if(i.magnitudeSquared(h)>g.EPSILON10)i.cross(u,h,d);else{var p=n.add(_.getColumn(e._transform,1,ue),o,ue);r.cartesianToCartographic(p,a),t.project(a,s),d.x=s.z,d.y=s.x,d.z=s.y,d.w=0,i.subtract(d,l,d),d.x=0,i.magnitudeSquared(d)g.EPSILON2){var y=1/i.magnitudeSquared(u),C=i.dot(u,s)*y,w=i.multiplyByScalar(s,C,fe);u=i.normalize(i.subtract(u,w,e._up),e._up),i.clone(u,e.up),h=i.cross(s,u,e._right),i.clone(h,e.right)}}(l||p)&&(e._directionWC=_.multiplyByPointAsVector(m,s,e._directionWC)),(c||p)&&(e._upWC=_.multiplyByPointAsVector(m,u,e._upWC)),(d||p)&&(e._rightWC=_.multiplyByPointAsVector(m,h,e._rightWC)),(a||l||c||d||p)&&P(e)}function R(e,t){var i;return i=g.equalsEpsilon(Math.abs(e.z),1,g.EPSILON3)?Math.atan2(t.y,t.x)-g.PI_OVER_TWO:Math.atan2(e.y,e.x)-g.PI_OVER_TWO,g.TWO_PI-g.zeroToTwoPi(i)}function O(e){return g.PI_OVER_TWO-g.acosClamped(e.z)}function L(e,t,i){var n=0;return g.equalsEpsilon(Math.abs(e.z),1,g.EPSILON3)||(n=Math.atan2(-i.z,t.z),n=g.zeroToTwoPi(n+g.TWO_PI)),n}function N(e,t,n,r,o){var a=_.clone(e.transform,Ee),s=E.eastNorthUpToFixedFrame(t,e._projection.ellipsoid,be);e._setTransform(s),i.clone(i.ZERO,e.position);var l=y.fromHeadingPitchRoll(n-g.PI_OVER_TWO,r,o,Se),u=v.fromQuaternion(l,Te);v.getColumn(u,0,e.direction),v.getColumn(u,2,e.up),i.cross(e.direction,e.up,e.right),e._setTransform(a)}function F(e,t,n,r,o,a){var s=_.clone(e.transform,Ee);if(e._setTransform(_.IDENTITY),!i.equals(t,e.positionWC)){if(a){var l=e._projection,u=l.ellipsoid.cartesianToCartographic(t,xe);t=l.project(u,we)}i.clone(t,e.position)}var c=y.fromHeadingPitchRoll(n-g.PI_OVER_TWO,r,o,Se),h=v.fromQuaternion(c,Te);v.getColumn(h,0,e.direction),v.getColumn(h,2,e.up),i.cross(e.direction,e.up,e.right),e._setTransform(s)}function k(e,n,r,o){var a=-g.PI_OVER_TWO,s=0,l=_.clone(e.transform,Ee);if(e._setTransform(_.IDENTITY),!i.equals(n,e.positionWC)){if(o){var u=e._projection,c=u.ellipsoid.cartesianToCartographic(n,xe);n=u.project(c,we)}t.clone(n,e.position);var h=.5*-n.z,d=-h,p=e.frustum;if(d>h){var m=p.top/p.right;p.right=d,p.left=h,p.top=p.right*m,p.bottom=-p.top}}if(e._scene.mapMode2D===S.ROTATE){var f=y.fromHeadingPitchRoll(r-g.PI_OVER_TWO,a,s,Se),C=v.fromQuaternion(f,Te);v.getColumn(C,2,e.up),i.cross(e.direction,e.up,e.right)}e._setTransform(l)}function B(e,t,n,r){var o=i.clone(n.direction,Ae),a=i.clone(n.up,Pe);if(e._scene.mode===x.SCENE3D){var s=e._projection.ellipsoid,l=E.eastNorthUpToFixedFrame(t,s,ge),u=_.inverseTransformation(l,ve);_.multiplyByPointAsVector(u,o,o),_.multiplyByPointAsVector(u,a,a)}var c=i.cross(o,a,Me);return r.heading=R(o,a),r.pitch=O(o),r.roll=L(o,a,c),r}function z(e,t){var i,n,r=e._scene.mapMode2D===S.ROTATE,o=e._maxCoord.x,a=e._maxCoord.y;r?(n=o,i=-n):(n=t.x-2*o,i=t.x+2*o),t.x>o&&(t.x=n),t.x<-o&&(t.x=i),t.y>a&&(t.y=a),t.y<-a&&(t.y=-a)}function V(e,t){var n=e.position,r=i.normalize(n,ke);if(a(e.constrainedAxis)){var o=i.equalsEpsilon(r,e.constrainedAxis,g.EPSILON2),s=i.equalsEpsilon(r,i.negate(e.constrainedAxis,Ve),g.EPSILON2);if(o||s)(o&&0>t||s&&t>0)&&e.rotate(e.right,t);else{var l=i.normalize(e.constrainedAxis,Be),u=i.dot(r,l),c=g.acosClamped(u);t>0&&t>c&&(t=c-g.EPSILON4),u=i.dot(r,i.negate(l,Ve)),c=g.acosClamped(u),0>t&&-t>c&&(t=-c+g.EPSILON4);var h=i.cross(l,r,ze);e.rotate(h,t)}}else e.rotate(e.right,t)}function U(e,t){a(e.constrainedAxis)?e.rotate(e.constrainedAxis,t):e.rotate(e.up,t)}function G(e,t){var i=e.frustum;t=.5*t;var n=i.right-t,r=i.left+t,o=e._maxCoord.x;e._scene.mapMode2D===S.ROTATE&&(o*=e.maximumZoomFactor),n>o&&(n=o,r=-o),r>=n&&(n=1,r=-1);var a=i.top/i.right;i.right=n,i.left=r,i.top=i.right*a,i.bottom=-i.top}function W(e,t){e.move(e.direction,t)}function H(e,t,n){t=g.clamp(t,-g.PI_OVER_TWO,g.PI_OVER_TWO),e=g.zeroToTwoPi(e)-g.PI_OVER_TWO;var r=y.fromAxisAngle(i.UNIT_Y,-t,We),o=y.fromAxisAngle(i.UNIT_Z,-e,He),a=y.multiply(o,r,o),s=v.fromQuaternion(a,qe),l=i.clone(i.UNIT_X,Ge);return v.multiplyByVector(s,l,l),i.negate(l,l),i.multiplyByScalar(l,n,l),l}function q(e,t,n,r){ +var o=Math.abs(i.dot(t,n));return o/r-i.dot(e,n)}function j(e,t,n,r){var o=e._projection.ellipsoid,s=r?e:nt,l=t.north,u=t.south,c=t.east,d=t.west;d>c&&(c+=g.TWO_PI);var p,m=.5*(d+c);if(u<-g.PI_OVER_TWO+g.RADIANS_PER_DEGREE&&l>g.PI_OVER_TWO-g.RADIANS_PER_DEGREE)p=0;else{var f=Ye;f.longitude=m,f.latitude=l,f.height=0;var v=Xe;v.longitude=m,v.latitude=u,v.height=0;var _=je;a(_)&&_.ellipsoid===o||(je=_=new h(void 0,void 0,o)),_.setEndPoints(f,v),p=_.interpolateUsingFraction(.5,Ye).latitude}var y=Ye;y.longitude=m,y.latitude=p,y.height=0;var C=o.cartographicToCartesian(y,tt),w=Ye;w.longitude=c,w.latitude=l;var E=o.cartographicToCartesian(w,Ze);w.longitude=d;var b=o.cartographicToCartesian(w,Je);w.longitude=m;var S=o.cartographicToCartesian(w,$e);w.latitude=u;var T=o.cartographicToCartesian(w,et);w.longitude=c;var x=o.cartographicToCartesian(w,Qe);w.longitude=d;var A=o.cartographicToCartesian(w,Ke);i.subtract(b,C,b),i.subtract(x,C,x),i.subtract(E,C,E),i.subtract(A,C,A),i.subtract(S,C,S),i.subtract(T,C,T);var P=o.geodeticSurfaceNormal(C,s.direction);i.negate(P,P);var M=i.cross(P,i.UNIT_Z,s.right);i.normalize(M,M);var D=i.cross(M,P,s.up),I=Math.tan(.5*e.frustum.fovy),R=e.frustum.aspectRatio*I,O=Math.max(q(P,D,b,I),q(P,D,x,I),q(P,D,E,I),q(P,D,A,I),q(P,D,S,I),q(P,D,T,I),q(P,M,b,R),q(P,M,x,R),q(P,M,E,R),q(P,M,A,R),q(P,M,S,R),q(P,M,T,R));if(0>u&&l>0){var L=Ye;L.longitude=d,L.latitude=0,L.height=0;var N=o.cartographicToCartesian(L,it);i.subtract(N,C,N),O=Math.max(O,q(P,D,N,I),q(P,M,N,R)),L.longitude=c,N=o.cartographicToCartesian(L,it),i.subtract(N,C,N),O=Math.max(O,q(P,D,N,I),q(P,M,N,R))}return i.add(C,i.multiplyByScalar(P,-O,it),n)}function Y(e,t,i){var n=e._projection;t.west>t.east&&(t=w.MAX_VALUE);var r=e._actualTransform,o=e._actualInvTransform,a=rt;a.longitude=t.east,a.latitude=t.north;var s=n.project(a,ot);_.multiplyByPoint(r,s,s),_.multiplyByPoint(o,s,s),a.longitude=t.west,a.latitude=t.south;var l=n.project(a,at);_.multiplyByPoint(r,l,l),_.multiplyByPoint(o,l,l);var u=Math.tan(.5*e.frustum.fovy),c=e.frustum.aspectRatio*u;return i.x=.5*(s.x-l.x)+l.x,i.y=.5*(s.y-l.y)+l.y,i.z=.5*Math.max((s.x-l.x)/c,(s.y-l.y)/u),i}function X(e,t,i){var n=e._projection;t.west>t.east&&(t=w.MAX_VALUE);var r=st;r.longitude=t.east,r.latitude=t.north;var o=n.project(r,lt);r.longitude=t.west,r.latitude=t.south;var a,s,l=n.project(r,ut),u=.5*Math.abs(o.x-l.x),c=.5*Math.abs(o.y-l.y),h=e.frustum.right/e.frustum.top,d=c*h;return u>d?(a=u,s=a/h):(s=c,a=d),c=Math.max(2*a,2*s),i.x=.5*(o.x-l.x)+l.x,i.y=.5*(o.y-l.y)+l.y,r=n.unproject(i,r),r.height=c,i=n.project(r,i)}function Z(e,t,i,n){i=o(i,c.WGS84);var r=e.getPickRay(t,ct),a=f.rayEllipsoid(r,i);if(a){var s=a.start>0?a.start:a.stop;return C.getPoint(r,s,n)}}function K(e,t,i,n){var r=e.getPickRay(t,ht),o=r.origin;o.z=0;var a=i.unproject(o);return a.latitude<-g.PI_OVER_TWO||a.latitude>g.PI_OVER_TWO?void 0:i.ellipsoid.cartographicToCartesian(a,n)}function J(e,t,n,r){var o=e.getPickRay(t,dt),a=-o.origin.x/o.direction.x;C.getPoint(o,a,r);var s=n.unproject(new i(r.y,r.z,0));return s.latitude<-g.PI_OVER_TWO||s.latitude>g.PI_OVER_TWO||s.longitude<-Math.PI||s.longitude>Math.PI?void 0:n.ellipsoid.cartographicToCartesian(s,r)}function Q(e,t,n){var r=e._scene.canvas,o=r.clientWidth,a=r.clientHeight,s=Math.tan(.5*e.frustum.fovy),l=e.frustum.aspectRatio*s,u=e.frustum.near,c=2/o*t.x-1,h=2/a*(a-t.y)-1,d=e.positionWC;i.clone(d,n.origin);var p=i.multiplyByScalar(e.directionWC,u,pt);i.add(d,p,p);var m=i.multiplyByScalar(e.rightWC,c*u*l,mt),f=i.multiplyByScalar(e.upWC,h*u*s,ft),g=i.add(p,m,n.direction);return i.add(g,f,g),i.subtract(g,d,g),i.normalize(g,g),n}function $(e,t,n){var r=e._scene.canvas,o=r.clientWidth,a=r.clientHeight,s=2/o*t.x-1;s*=.5*(e.frustum.right-e.frustum.left);var l=2/a*(a-t.y)-1;l*=.5*(e.frustum.top-e.frustum.bottom);var u=n.origin;return i.clone(e.position,u),i.multiplyByScalar(e.right,s,gt),i.add(gt,u,u),i.multiplyByScalar(e.up,l,gt),i.add(gt,u,u),i.clone(e.directionWC,n.direction),n}function ee(e,t,n,r,o,a){function s(n){var r=i.lerp(t,l,n.time,new i);e.worldToCameraCoordinatesPoint(r,e.position)}var l=i.clone(t);return n.y>r?l.y-=n.y-r:n.y<-r&&(l.y+=-r-n.y),n.z>o?l.z-=n.z-o:n.z<-o&&(l.z+=-o-n.z),{easingFunction:u.EXPONENTIAL_OUT,startObject:{time:0},stopObject:{time:1},duration:a,update:s}}function te(e,t){var n=e.position,r=e.direction,o=e.worldToCameraCoordinatesVector(i.UNIT_X,Ct),a=-i.dot(o,n)/i.dot(o,r),s=i.add(n,i.multiplyByScalar(r,a,wt),wt);e.cameraToWorldCoordinatesPoint(s,s),n=e.cameraToWorldCoordinatesPoint(e.position,Et);var l=Math.tan(.5*e.frustum.fovy),u=e.frustum.aspectRatio*l,c=i.magnitude(i.subtract(n,s,bt)),h=u*c,d=l*c,p=e._maxCoord.x,m=e._maxCoord.y,f=Math.max(h-p,p),g=Math.max(d-m,m);if(n.z<-f||n.z>f||n.y<-g||n.y>g){var v=s.y<-f||s.y>f,_=s.z<-g||s.z>g;if(v||_)return ee(e,n,s,f,g,t)}}function ie(e,t){var i=e.frustum,n=Math.tan(.5*i.fovy),r=i.aspectRatio*n;return Math.max(t/r,t/n)}function ne(e,t){var i,n,r=e.frustum,o=r.right/r.top,a=t*o;return t>a?(i=t,n=i/o):(n=t,i=a),1.5*Math.max(i,n)}function re(e,t,i){a(i)||(i=p.clone(At));var n=i.range;if(!a(n)||0===n){var r=t.radius;0===r?i.range=Pt:i.range=e._mode===x.SCENE2D?ne(e,r):ie(e,r)}return i}function oe(e,t){var n=t.radii,r=e.positionWC,o=i.multiplyComponents(t.oneOverRadii,r,kt),a=i.magnitude(o),s=i.normalize(o,Bt),l=i.normalize(i.cross(i.UNIT_Z,o,zt),zt),u=i.normalize(i.cross(s,l,Vt),Vt),c=Math.sqrt(i.magnitudeSquared(o)-1),h=i.multiplyByScalar(s,1/a,kt),d=c/a,p=i.multiplyByScalar(l,d,Bt),m=i.multiplyByScalar(u,d,zt),f=i.add(h,m,Ut[0]);i.subtract(f,p,f),i.multiplyComponents(n,f,f);var g=i.subtract(h,m,Ut[1]);i.subtract(g,p,g),i.multiplyComponents(n,g,g);var v=i.subtract(h,m,Ut[2]);i.add(v,p,v),i.multiplyComponents(n,v,v);var _=i.add(h,m,Ut[3]);return i.add(_,p,_),i.multiplyComponents(n,_,_),Ut}function ae(e,t,i,n,r,o){Gt.x=e,Gt.y=t;var s=n.pickEllipsoid(Gt,r,Wt);return a(s)?(Ht[i]=r.cartesianToCartographic(s,Ht[i]),1):(Ht[i]=r.cartesianToCartographic(o[i],Ht[i]),0)}A.TRANSFORM_2D=new _(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),A.TRANSFORM_2D_INVERSE=_.inverseTransformation(A.TRANSFORM_2D,new _),A.DEFAULT_VIEW_RECTANGLE=w.fromDegrees(-95,-20,-70,90),A.DEFAULT_VIEW_FACTOR=.5,A.prototype._updateCameraChanged=function(){var e=this;if(0!==e._changed.numberOfListeners){var t=e.percentageChanged;if(e._mode===x.SCENE2D){if(!a(e._changedFrustum))return e._changedPosition=i.clone(e.position,e._changedPosition),void(e._changedFrustum=e.frustum.clone());var n,r=e.position,o=e._changedPosition,s=e.frustum,l=e._changedFrustum,u=r.x+s.left,c=r.x+s.right,h=o.x+l.left,d=o.x+l.right,p=r.y+s.bottom,m=r.y+s.top,f=o.y+l.bottom,v=o.y+l.top,_=Math.max(u,h),y=Math.min(c,d),C=Math.max(p,f),w=Math.min(m,v);if(_>=y||C>=m)n=1;else{var E=l;h>u&&c>d&&f>p&&m>v&&(E=s),n=1-(y-_)*(w-C)/((E.right-E.left)*(E.top-E.bottom))}return void(n>t&&(e._changed.raiseEvent(n),e._changedPosition=i.clone(e.position,e._changedPosition),e._changedFrustum=e.frustum.clone(e._changedFrustum)))}if(!a(e._changedDirection))return e._changedPosition=i.clone(e.positionWC,e._changedPosition),void(e._changedDirection=i.clone(e.directionWC,e._changedDirection));var b=g.acosClamped(i.dot(e.directionWC,e._changedDirection)),S=b/(.5*e.frustum.fovy),T=i.distance(e.positionWC,e._changedPosition),A=T/e.positionCartographic.height;(S>t||A>t)&&(e._changed.raiseEvent(Math.max(S,A)),e._changedPosition=i.clone(e.positionWC,e._changedPosition),e._changedDirection=i.clone(e.directionWC,e._changedDirection))}};var se=new r,le=new i,ue=new i,ce=new n,he=new n,de=new n,pe=new n,me=new n,fe=new i,ge=new _,ve=new _;s(A.prototype,{transform:{get:function(){return this._transform}},inverseTransform:{get:function(){return I(this),this._invTransform}},viewMatrix:{get:function(){return I(this),this._viewMatrix}},inverseViewMatrix:{get:function(){return I(this),this._invViewMatrix}},positionCartographic:{get:function(){return I(this),this._positionCartographic}},positionWC:{get:function(){return I(this),this._positionWC}},directionWC:{get:function(){return I(this),this._directionWC}},upWC:{get:function(){return I(this),this._upWC}},rightWC:{get:function(){return I(this),this._rightWC}},heading:{get:function(){if(this._mode!==x.MORPHING){var e=this._projection.ellipsoid,t=_.clone(this._transform,ge),i=E.eastNorthUpToFixedFrame(this.positionWC,e,ve);this._setTransform(i);var n=R(this.direction,this.up);return this._setTransform(t),n}}},pitch:{get:function(){if(this._mode!==x.MORPHING){var e=this._projection.ellipsoid,t=_.clone(this._transform,ge),i=E.eastNorthUpToFixedFrame(this.positionWC,e,ve);this._setTransform(i);var n=O(this.direction);return this._setTransform(t),n}}},roll:{get:function(){if(this._mode!==x.MORPHING){var e=this._projection.ellipsoid,t=_.clone(this._transform,ge),i=E.eastNorthUpToFixedFrame(this.positionWC,e,ve);this._setTransform(i);var n=L(this.direction,this.up,this.right);return this._setTransform(t),n}}},moveStart:{get:function(){return this._moveStart}},moveEnd:{get:function(){return this._moveEnd}},changed:{get:function(){return this._changed}}}),A.prototype.update=function(e){var t=!1;if(e!==this._mode&&(this._mode=e,this._modeChanged=e!==x.MORPHING,t=this._mode===x.SCENE2D),t){var i=this._max2Dfrustum=this.frustum.clone(),n=2,r=i.top/i.right;i.right=this._maxCoord.x*n,i.left=-i.right,i.top=r*i.right,i.bottom=-i.top}this._mode===x.SCENE2D&&z(this,this.position)};var _e=new i,ye=new i,Ce=new i;A.prototype._setTransform=function(e){var t=i.clone(this.positionWC,_e),n=i.clone(this.upWC,ye),r=i.clone(this.directionWC,Ce);_.clone(e,this._transform),this._transformChanged=!0,I(this);var o=this._actualInvTransform;_.multiplyByPoint(o,t,this.position),_.multiplyByPointAsVector(o,r,this.direction),_.multiplyByPointAsVector(o,n,this.up),i.cross(this.direction,this.up,this.right),I(this)};var we=new i,Ee=new _,be=new _,Se=new y,Te=new v,xe=new r,Ae=new i,Pe=new i,Me=new i,De={destination:void 0,orientation:{direction:void 0,up:void 0,heading:void 0,pitch:void 0,roll:void 0},convert:void 0,endTransform:void 0};A.prototype.setView=function(e){e=o(e,o.EMPTY_OBJECT);var t=o(e.orientation,o.EMPTY_OBJECT),n=this._mode;if(n!==x.MORPHING){a(e.endTransform)&&this._setTransform(e.endTransform);var r=o(e.convert,!0),s=o(e.destination,i.clone(this.positionWC,we));a(s)&&a(s.west)&&(s=this.getRectangleCameraCoordinates(s,we),r=!1),a(t.direction)&&(t=B(this,s,t,De.orientation));var l=o(t.heading,0),u=o(t.pitch,-g.PI_OVER_TWO),c=o(t.roll,0);n===x.SCENE3D?N(this,s,l,u,c):n===x.SCENE2D?k(this,s,l,r):F(this,s,l,u,c,r)}};var Ie=new i;A.prototype.flyHome=function(e){var t=this._mode;if(t===x.MORPHING&&this._scene.completeMorph(),t===x.SCENE2D)this.flyTo({destination:w.MAX_VALUE,duration:e,endTransform:_.IDENTITY});else if(t===x.SCENE3D){var n=this.getRectangleCameraCoordinates(A.DEFAULT_VIEW_RECTANGLE),r=i.magnitude(n);r+=r*A.DEFAULT_VIEW_FACTOR,i.normalize(n,n),i.multiplyByScalar(n,r,n),this.flyTo({destination:n,duration:e,endTransform:_.IDENTITY})}else if(t===x.COLUMBUS_VIEW){var o=this._projection.ellipsoid.maximumRadius,a=new i(0,-1,1);a=i.multiplyByScalar(i.normalize(a,a),5*o,a),this.flyTo({destination:a,duration:e,orientation:{heading:0,pitch:-Math.acos(i.normalize(a,Ie).z),roll:0},endTransform:_.IDENTITY,convert:!1})}},A.prototype.worldToCameraCoordinates=function(e,t){return a(t)||(t=new n),I(this),_.multiplyByVector(this._actualInvTransform,e,t)},A.prototype.worldToCameraCoordinatesPoint=function(e,t){return a(t)||(t=new i),I(this),_.multiplyByPoint(this._actualInvTransform,e,t)},A.prototype.worldToCameraCoordinatesVector=function(e,t){return a(t)||(t=new i),I(this),_.multiplyByPointAsVector(this._actualInvTransform,e,t)},A.prototype.cameraToWorldCoordinates=function(e,t){return a(t)||(t=new n),I(this),_.multiplyByVector(this._actualTransform,e,t)},A.prototype.cameraToWorldCoordinatesPoint=function(e,t){return a(t)||(t=new i),I(this),_.multiplyByPoint(this._actualTransform,e,t)},A.prototype.cameraToWorldCoordinatesVector=function(e,t){return a(t)||(t=new i),I(this),_.multiplyByPointAsVector(this._actualTransform,e,t)};var Re=new i;A.prototype.move=function(e,t){var n=this.position;i.multiplyByScalar(e,t,Re),i.add(n,Re,n),this._mode===x.SCENE2D&&z(this,n)},A.prototype.moveForward=function(e){e=o(e,this.defaultMoveAmount),this.move(this.direction,e)},A.prototype.moveBackward=function(e){e=o(e,this.defaultMoveAmount),this.move(this.direction,-e)},A.prototype.moveUp=function(e){e=o(e,this.defaultMoveAmount),this.move(this.up,e)},A.prototype.moveDown=function(e){e=o(e,this.defaultMoveAmount),this.move(this.up,-e)},A.prototype.moveRight=function(e){e=o(e,this.defaultMoveAmount),this.move(this.right,e)},A.prototype.moveLeft=function(e){e=o(e,this.defaultMoveAmount),this.move(this.right,-e)},A.prototype.lookLeft=function(e){e=o(e,this.defaultLookAmount),this.look(this.up,-e)},A.prototype.lookRight=function(e){e=o(e,this.defaultLookAmount),this.look(this.up,e)},A.prototype.lookUp=function(e){e=o(e,this.defaultLookAmount),this.look(this.right,-e)},A.prototype.lookDown=function(e){e=o(e,this.defaultLookAmount),this.look(this.right,e)};var Oe=new y,Le=new v;A.prototype.look=function(e,t){var i=o(t,this.defaultLookAmount),n=y.fromAxisAngle(e,-i,Oe),r=v.fromQuaternion(n,Le),a=this.direction,s=this.up,l=this.right;v.multiplyByVector(r,a,a),v.multiplyByVector(r,s,s),v.multiplyByVector(r,l,l)},A.prototype.twistLeft=function(e){e=o(e,this.defaultLookAmount),this.look(this.direction,e)},A.prototype.twistRight=function(e){e=o(e,this.defaultLookAmount),this.look(this.direction,-e)};var Ne=new y,Fe=new v;A.prototype.rotate=function(e,t){var n=o(t,this.defaultRotateAmount),r=y.fromAxisAngle(e,-n,Ne),a=v.fromQuaternion(r,Fe);v.multiplyByVector(a,this.position,this.position),v.multiplyByVector(a,this.direction,this.direction),v.multiplyByVector(a,this.up,this.up),i.cross(this.direction,this.up,this.right),i.cross(this.right,this.direction,this.up)},A.prototype.rotateDown=function(e){e=o(e,this.defaultRotateAmount),V(this,e)},A.prototype.rotateUp=function(e){e=o(e,this.defaultRotateAmount),V(this,-e)};var ke=new i,Be=new i,ze=new i,Ve=new i;A.prototype.rotateRight=function(e){e=o(e,this.defaultRotateAmount),U(this,-e)},A.prototype.rotateLeft=function(e){e=o(e,this.defaultRotateAmount),U(this,e)},A.prototype.zoomIn=function(e){e=o(e,this.defaultZoomAmount),this._mode===x.SCENE2D?G(this,e):W(this,e)},A.prototype.zoomOut=function(e){e=o(e,this.defaultZoomAmount),this._mode===x.SCENE2D?G(this,-e):W(this,-e)},A.prototype.getMagnitude=function(){return this._mode===x.SCENE3D?i.magnitude(this.position):this._mode===x.COLUMBUS_VIEW?Math.abs(this.position.z):this._mode===x.SCENE2D?Math.max(this.frustum.right-this.frustum.left,this.frustum.top-this.frustum.bottom):void 0};var Ue=new _;A.prototype.lookAt=function(e,t){var i=E.eastNorthUpToFixedFrame(e,c.WGS84,Ue);this.lookAtTransform(i,t)};var Ge=new i,We=new y,He=new y,qe=new v;A.prototype.lookAtTransform=function(e,n){if(this._setTransform(e),a(n)){var r;if(r=a(n.heading)?H(n.heading,n.pitch,n.range):n,this._mode===x.SCENE2D){t.clone(t.ZERO,this.position),i.negate(r,this.up),this.up.z=0,i.magnitudeSquared(this.up)d)return w.MAX_VALUE;n=w.fromCartographicArray(Ht,n);for(var f=0,v=Ht[3].longitude,_=0;4>_;++_){var y=Ht[_].longitude,C=Math.abs(y-v);f+=C>g.PI?g.TWO_PI-C:C,v=y}return g.equalsEpsilon(Math.abs(f),g.TWO_PI,g.EPSILON9)&&(n.west=-g.PI,n.east=g.PI,Ht[0].latitude>=0?n.north=g.PI_OVER_TWO:n.south=-g.PI_OVER_TWO),n}},A.clone=function(e,t){return a(t)||(t=new A(e._scene)),i.clone(e.position,t.position),i.clone(e.direction,t.direction),i.clone(e.up,t.up),i.clone(e.right,t.right),_.clone(e._transform,t.transform),t._transformChanged=!0,t},A}),define("Cesium/Scene/CameraEventType",["../Core/freezeObject"],function(e){"use strict";var t={LEFT_DRAG:0,RIGHT_DRAG:1,MIDDLE_DRAG:2,WHEEL:3,PINCH:4};return e(t)}),define("Cesium/Scene/CameraEventAggregator",["../Core/Cartesian2","../Core/defined","../Core/defineProperties","../Core/destroyObject","../Core/DeveloperError","../Core/KeyboardEventModifier","../Core/Math","../Core/ScreenSpaceEventHandler","../Core/ScreenSpaceEventType","./CameraEventType"],function(e,t,i,n,r,o,a,s,l,u){"use strict";function c(e,i){var n=e;return t(i)&&(n+="+"+i),n}function h(t,i){e.clone(t.distance.startPosition,i.distance.startPosition),e.clone(t.distance.endPosition,i.distance.endPosition),e.clone(t.angleAndHeight.startPosition,i.angleAndHeight.startPosition),e.clone(t.angleAndHeight.endPosition,i.angleAndHeight.endPosition)}function d(i,n,r){var o=c(u.PINCH,n),a=i._update,s=i._isDown,d=i._eventStartPosition,p=i._pressTime,m=i._releaseTime;a[o]=!0,s[o]=!1,d[o]=new e;var f=i._movement[o];t(f)||(f=i._movement[o]={}),f.distance={startPosition:new e,endPosition:new e},f.angleAndHeight={startPosition:new e,endPosition:new e},f.prevAngle=0,i._eventHandler.setInputAction(function(e){i._buttonsDown++,s[o]=!0,p[o]=new Date},l.PINCH_START,n),i._eventHandler.setInputAction(function(){i._buttonsDown=Math.max(i._buttonsDown-1,0),s[o]=!1,m[o]=new Date},l.PINCH_END,n),i._eventHandler.setInputAction(function(t){if(s[o]){a[o]?(h(t,f),a[o]=!1,f.prevAngle=f.angleAndHeight.startPosition.x):(e.clone(t.distance.endPosition,f.distance.endPosition),e.clone(t.angleAndHeight.endPosition,f.angleAndHeight.endPosition));for(var i=f.angleAndHeight.endPosition.x,n=f.prevAngle,l=2*Math.PI;i>=n+Math.PI;)i-=l;for(;i0||e}}}),v.prototype.isMoving=function(e,t){var i=c(e,t);return!this._update[i]},v.prototype.getMovement=function(e,t){var i=c(e,t),n=this._movement[i];return n},v.prototype.getLastMovement=function(e,t){var i=c(e,t),n=this._lastMovement[i];return n.valid?n:void 0},v.prototype.isButtonDown=function(e,t){var i=c(e,t);return this._isDown[i]},v.prototype.getStartMousePosition=function(e,t){if(e===u.WHEEL||e===u.PINCH)return this._currentMousePosition;var i=c(e,t);return this._eventStartPosition[i]},v.prototype.getButtonPressTime=function(e,t){var i=c(e,t);return this._pressTime[i]},v.prototype.getButtonReleaseTime=function(e,t){var i=c(e,t);return this._releaseTime[i]},v.prototype.reset=function(){for(var e in this._update)this._update.hasOwnProperty(e)&&(this._update[e]=!0)},v.prototype.isDestroyed=function(){return!1},v.prototype.destroy=function(){return this._eventHandler=this._eventHandler&&this._eventHandler.destroy(),n(this)},v}),define("Cesium/Scene/UrlTemplateImageryProvider",["../Core/Cartesian2","../Core/Cartesian3","../Core/Cartographic","../Core/combine","../Core/Credit","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Event","../Core/freezeObject","../Core/GeographicTilingScheme","../Core/loadJson","../Core/loadText","../Core/loadWithXhr","../Core/loadXML","../Core/Math","../Core/Rectangle","../Core/TileProviderError","../Core/WebMercatorTilingScheme","../ThirdParty/when","./ImageryProvider"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g,v,_,y,C,w){"use strict";function E(e){this._errorEvent=new u,this._url=void 0,this._pickFeaturesUrl=void 0,this._proxy=void 0,this._tileWidth=void 0,this._tileHeight=void 0,this._maximumLevel=void 0,this._minimumLevel=void 0,this._tilingScheme=void 0,this._rectangle=void 0,this._tileDiscardPolicy=void 0,this._credit=void 0,this._hasAlphaChannel=void 0,this._readyPromise=void 0,this.enablePickFeatures=!0,this.reinitialize(e)}function b(e,t,i,n){return ne=!1,oe=!1,T(e,e._urlParts,function(r){return r(e,t,i,n)})}function S(e,t,i,n,r,o,a){return ne=!1,oe=!1,se=!1,ce=!1,T(e,e._pickFeaturesUrlParts,function(s){return s(e,t,i,n,r,o,a)})}function T(e,t,i){for(var n="",r=0;r=0&&i>u&&(i=u,n=s[l])}a(n)?(i>o&&r.push(e.substring(o,i)),r.push(t[n]),o=i+n.length):(r.push(e.substring(o)),o=e.length)}return r}}function A(e,t,i,n){return t}function P(e,t,i,n){return e.tilingScheme.getNumberOfXTilesAtLevel(n)-t-1}function M(e,t,i,n){return i}function D(e,t,i,n){return e.tilingScheme.getNumberOfYTilesAtLevel(n)-i-1}function I(e,t,i,n){var r=e.maximumLevel;return a(r)&&r>n?r-n-1:n}function R(e,t,i,n){return n}function O(e,t,i,n){var r=(t+i+n)%e._subdomains.length;return e._subdomains[r]}function L(e,t,i,n){ne||(e.tilingScheme.tileXYToRectangle(t,i,n,re),re.west=g.toDegrees(re.west),re.south=g.toDegrees(re.south),re.east=g.toDegrees(re.east),re.north=g.toDegrees(re.north),ne=!0)}function N(e,t,i,n){return L(e,t,i,n),re.west}function F(e,t,i,n){return L(e,t,i,n),re.south}function k(e,t,i,n){return L(e,t,i,n),re.east}function B(e,t,i,n){return L(e,t,i,n),re.north}function z(e,t,i,n){oe||(e.tilingScheme.tileXYToNativeRectangle(t,i,n,ae),oe=!0)}function V(e,t,i,n){return z(e,t,i,n),ae.west}function U(e,t,i,n){return z(e,t,i,n),ae.south}function G(e,t,i,n){return z(e,t,i,n),ae.east}function W(e,t,i,n){return z(e,t,i,n),ae.north}function H(e,t,i,n){return e.tileWidth}function q(e,t,i,n){return e.tileHeight}function j(e,t,i,n,r,o,a){return K(e,t,i,n,r,o),le.x}function Y(e,t,i,n,r,o,a){return K(e,t,i,n,r,o),le.y}function X(e,t,i,n,r,o,a){return K(e,t,i,n,r,o),e.tileWidth-le.x-1}function Z(e,t,i,n,r,o,a){return K(e,t,i,n,r,o),e.tileHeight-le.y-1}function K(e,t,i,n,r,o,a){if(!se){te(e,t,i,n,r,o);var s=he,l=e.tilingScheme.tileXYToNativeRectangle(t,i,n,ue);le.x=e.tileWidth*(s.x-l.west)/l.width|0,le.y=e.tileHeight*(l.north-s.y)/l.height|0,se=!0}}function J(e,t,i,n,r,o,a){return g.toDegrees(r)}function Q(e,t,i,n,r,o,a){return g.toDegrees(o)}function $(e,t,i,n,r,o,a){return te(e,t,i,n,r,o),he.x}function ee(e,t,i,n,r,o,a){return te(e,t,i,n,r,o),he.y}function te(e,t,i,n,r,o,a){if(!ce){var s;if(e.tilingScheme instanceof h)he.x=g.toDegrees(r),he.y=g.toDegrees(o);else{var l=de;l.longitude=r,l.latitude=o,s=e.tilingScheme.projection.project(l,he)}ce=!0}}function ie(e,t,i,n,r,o,a){return a}s(E.prototype,{url:{get:function(){return this._url}},pickFeaturesUrl:{get:function(){return this._pickFeaturesUrl}},proxy:{get:function(){return this._proxy}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return this._minimumLevel}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return a(this._urlParts)}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return this._hasAlphaChannel}}}),E.prototype.reinitialize=function(e){var t=this;t._readyPromise=C(e).then(function(e){t.enablePickFeatures=o(e.enablePickFeatures,t.enablePickFeatures),t._url=e.url,t._pickFeaturesUrl=e.pickFeaturesUrl,t._proxy=e.proxy,t._tileDiscardPolicy=e.tileDiscardPolicy,t._getFeatureInfoFormats=e.getFeatureInfoFormats,t._subdomains=e.subdomains,Array.isArray(t._subdomains)?t._subdomains=t._subdomains.slice():a(t._subdomains)&&t._subdomains.length>0?t._subdomains=t._subdomains.split(""):t._subdomains=["a","b","c"],t._tileWidth=o(e.tileWidth,256),t._tileHeight=o(e.tileHeight,256),t._minimumLevel=o(e.minimumLevel,0),t._maximumLevel=e.maximumLevel,t._tilingScheme=o(e.tilingScheme,new y({ellipsoid:e.ellipsoid})),t._rectangle=o(e.rectangle,t._tilingScheme.rectangle),t._rectangle=v.intersection(t._rectangle,t._tilingScheme.rectangle),t._hasAlphaChannel=o(e.hasAlphaChannel,!0);var i=e.credit;return"string"==typeof i&&(i=new r(i)),t._credit=i,t._urlParts=x(t._url,pe),t._pickFeaturesUrlParts=x(t._pickFeaturesUrl,me),!0})},E.prototype.getTileCredits=function(e,t,i){},E.prototype.requestImage=function(e,t,i){var n=b(this,e,t,i);return w.loadImage(this,n)},E.prototype.pickFeatures=function(e,t,i,n,r){function o(e,t){return e.callback(t)}function s(){if(l>=u._getFeatureInfoFormats.length)return C([]);var a=u._getFeatureInfoFormats[l],c=S(u,e,t,i,n,r,a.format);return++l, +"json"===a.type?d(c).then(a.callback).otherwise(s):"xml"===a.type?f(c).then(a.callback).otherwise(s):"text"===a.type||"html"===a.type?p(c).then(a.callback).otherwise(s):m({url:c,responseType:a.format}).then(o.bind(void 0,a)).otherwise(s)}if(this.enablePickFeatures&&a(this._pickFeaturesUrl)&&0!==this._getFeatureInfoFormats.length){var l=0,u=this;return s()}};var ne=!1,re=new v,oe=!1,ae=new v,se=!1,le=new e,ue=new v,ce=!1,he=new t,de=new i,pe={"{x}":A,"{y}":M,"{z}":R,"{s}":O,"{reverseX}":P,"{reverseY}":D,"{reverseZ}":I,"{westDegrees}":N,"{southDegrees}":F,"{eastDegrees}":k,"{northDegrees}":B,"{westProjected}":V,"{southProjected}":U,"{eastProjected}":G,"{northProjected}":W,"{width}":H,"{height}":q},me=n(pe,{"{i}":j,"{j}":Y,"{reverseI}":X,"{reverseJ}":Z,"{longitudeDegrees}":J,"{latitudeDegrees}":Q,"{longitudeProjected}":$,"{latitudeProjected}":ee,"{format}":ie});return E}),define("Cesium/Scene/createOpenStreetMapImageryProvider",["../Core/Credit","../Core/defaultValue","../Core/DeveloperError","../Core/Rectangle","../Core/WebMercatorTilingScheme","./UrlTemplateImageryProvider"],function(e,t,i,n,r,o){"use strict";function a(a){a=t(a,{});var u=t(a.url,"https://a.tile.openstreetmap.org/");s.test(u)||(u+="/");var c=t(a.fileExtension,"png"),h=new r({ellipsoid:a.ellipsoid}),d=256,p=256,m=t(a.minimumLevel,0),f=a.maximumLevel,g=t(a.rectangle,h.rectangle),v=h.positionToTileXY(n.southwest(g),m),_=h.positionToTileXY(n.northeast(g),m),y=(Math.abs(_.x-v.x)+1)*(Math.abs(_.y-v.y)+1);if(y>4)throw new i("The rectangle and minimumLevel indicate that there are "+y+" tiles at the minimum level. Imagery providers with more than four tiles at the minimum level are not supported.");var C=t(a.credit,l);"string"==typeof C&&(C=new e(C));var w=u+"{z}/{x}/{y}."+c;return new o({url:w,proxy:a.proxy,credit:C,tilingScheme:h,tileWidth:d,tileHeight:p,minimumLevel:m,maximumLevel:f,rectangle:g})}var s=/\/$/,l=new e("MapQuest, Open Street Map and contributors, CC-BY-SA");return a}),define("Cesium/Scene/createTangentSpaceDebugPrimitive",["../Core/ColorGeometryInstanceAttribute","../Core/defaultValue","../Core/defined","../Core/DeveloperError","../Core/GeometryInstance","../Core/GeometryPipeline","../Core/Matrix4","./PerInstanceColorAppearance","./Primitive"],function(e,t,i,n,r,o,a,s,l){"use strict";function u(n){n=t(n,t.EMPTY_OBJECT);var u=[],c=n.geometry;i(c.attributes)&&i(c.primitiveType)||(c=c.constructor.createGeometry(c));var h=c.attributes,d=a.clone(t(n.modelMatrix,a.IDENTITY)),p=t(n.length,1e4);return i(h.normal)&&u.push(new r({geometry:o.createLineSegmentsForVectors(c,"normal",p),attributes:{color:new e(1,0,0,1)},modelMatrix:d})),i(h.binormal)&&u.push(new r({geometry:o.createLineSegmentsForVectors(c,"binormal",p),attributes:{color:new e(0,1,0,1)},modelMatrix:d})),i(h.tangent)&&u.push(new r({geometry:o.createLineSegmentsForVectors(c,"tangent",p),attributes:{color:new e(0,0,1,1)},modelMatrix:d})),u.length>0?new l({asynchronous:!1,geometryInstances:u,appearance:new s({flat:!0,translucent:!1})}):void 0}return u}),define("Cesium/Scene/createTileMapServiceImageryProvider",["../Core/Cartesian2","../Core/Cartographic","../Core/Credit","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Event","../Core/GeographicTilingScheme","../Core/joinUrls","../Core/loadXML","../Core/Rectangle","../Core/RuntimeError","../Core/TileProviderError","../Core/WebMercatorTilingScheme","../ThirdParty/when","./UrlTemplateImageryProvider"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g){"use strict";function v(i){function o(o){for(var a,c,f,g,w=/tileformat/i,E=/tileset/i,b=/tilesets/i,S=/boundingbox/i,T=/srs/i,x=[],A=o.childNodes[0].childNodes,P=0;Pk.rectangle.east&&(z.east=k.rectangle.east),z.southk.rectangle.north&&(z.north=k.rectangle.north);var Y=k.positionToTileXY(h.southwest(z),L),X=k.positionToTileXY(h.northeast(z),L),Z=(Math.abs(X.x-Y.x)+1)*(Math.abs(X.y-Y.y)+1);Z>4&&(L=0);var K=u(_,"{z}/{x}/{reverseY}."+I);y.resolve({url:K,tilingScheme:k,rectangle:z,tileWidth:R,tileHeight:O,minimumLevel:L,maximumLevel:N,proxy:i.proxy,tileDiscardPolicy:i.tileDiscardPolicy,credit:i.credit})}function a(e){var t=n(i.fileExtension,"png"),o=n(i.tileWidth,256),a=n(i.tileHeight,256),s=n(i.minimumLevel,0),l=i.maximumLevel,c=r(i.tilingScheme)?i.tilingScheme:new m({ellipsoid:i.ellipsoid}),h=n(i.rectangle,c.rectangle),d=u(_,"{z}/{x}/{reverseY}."+t);y.resolve({url:d,tilingScheme:c,rectangle:h,tileWidth:o,tileHeight:a,minimumLevel:s,maximumLevel:l,proxy:i.proxy,tileDiscardPolicy:i.tileDiscardPolicy,credit:i.credit})}function s(){var e=u(_,"tilemapresource.xml"),t=i.proxy;r(t)&&(e=t.getURL(e)),c(e).then(o).otherwise(a)}i=n(i,{});var v,_=i.url,y=f.defer(),C=new g(y.promise);return s(),C}return v}),define("Cesium/Scene/CreditDisplay",["../Core/Credit","../Core/defaultValue","../Core/defined","../Core/destroyObject","../Core/DeveloperError"],function(e,t,i,n,r){"use strict";function o(e,t,n){if(!i(e.element)){var r=e.text,o=e.link,a=document.createElement("span");if(e.hasLink()){var s=document.createElement("a");s.textContent=r,s.href=o,s.target="_blank",a.appendChild(s)}else a.textContent=r;a.className="cesium-credit-text",e.element=a}if(t.hasChildNodes()){var l=document.createElement("span");l.textContent=n,l.className="cesium-credit-delimiter",t.appendChild(l)}t.appendChild(e.element)}function a(e,t){if(!i(e.element)){var n=e.text,r=e.link,o=document.createElement("span"),a=document.createElement("img");if(a.src=e.imageUrl,a.style["vertical-align"]="bottom",i(n)&&(a.alt=n,a.title=n),e.hasLink()){var s=document.createElement("a");s.appendChild(a),s.href=r,s.target="_blank",o.appendChild(s)}else o.appendChild(a);o.className="cesium-credit-image",e.element=o}t.appendChild(e.element)}function s(t,i){for(var n=t.length,r=0;n>r;r++){var o=t[r];if(e.equals(o,i))return!0}return!1}function l(e){var t=e.element;if(i(t)){var n=t.parentNode;if(!e.hasImage()){var r=t.previousSibling;null===r&&(r=t.nextSibling),null!==r&&n.removeChild(r)}n.removeChild(t)}}function u(e,t){var n,r,a,s=e._displayedCredits.textCredits;for(n=0;n= 0.0) {\n t1 = (-b - sqrt(discriminant)) * 0.5;\n t2 = (-b + sqrt(discriminant)) * 0.5;\n }\n \n if (t1 < 0.0 && t2 < 0.0) {\n discard;\n }\n \n float t = min(t1, t2);\n if (t < 0.0) {\n t = 0.0;\n }\n \n // March ray forward to intersection with larger sphere and find\n // actual intersection point with ellipsoid.\n czm_ellipsoid ellipsoid = czm_ellipsoidNew(ellipsoidCenter, u_radii);\n czm_ray ray = czm_ray(t * direction, direction);\n czm_raySegment intersection = czm_rayEllipsoidIntersectionInterval(ray, ellipsoid);\n \n if (czm_isEmpty(intersection))\n {\n discard;\n }\n\n // If the viewer is outside, compute outsideFaceColor, with normals facing outward.\n vec4 outsideFaceColor = (intersection.start != 0.0) ? computeEllipsoidColor(ray, intersection.start, 1.0) : vec4(0.0);\n\n // If the viewer either is inside or can see inside, compute insideFaceColor, with normals facing inward.\n vec4 insideFaceColor = (outsideFaceColor.a < 1.0) ? computeEllipsoidColor(ray, intersection.stop, -1.0) : vec4(0.0);\n\n gl_FragColor = mix(insideFaceColor, outsideFaceColor, outsideFaceColor.a);\n gl_FragColor.a = 1.0 - (1.0 - insideFaceColor.a) * (1.0 - outsideFaceColor.a);\n \n#ifdef WRITE_DEPTH\n#ifdef GL_EXT_frag_depth\n t = (intersection.start != 0.0) ? intersection.start : intersection.stop;\n vec3 positionEC = czm_pointAlongRay(ray, t);\n vec4 positionCC = czm_projection * vec4(positionEC, 1.0);\n float z = positionCC.z / positionCC.w;\n \n float n = czm_depthRange.near;\n float f = czm_depthRange.far;\n \n gl_FragDepthEXT = (z * (f - n) + f + n) * 0.5;\n#endif\n#endif\n}\n"}),define("Cesium/Shaders/EllipsoidVS",[],function(){"use strict";return"attribute vec3 position;\n\nuniform vec3 u_radii;\n\nvarying vec3 v_positionEC;\n\nvoid main() \n{\n // In the vertex data, the cube goes from (-1.0, -1.0, -1.0) to (1.0, 1.0, 1.0) in model coordinates.\n // Scale to consider the radii. We could also do this once on the CPU when using the BoxGeometry,\n // but doing it here allows us to change the radii without rewriting the vertex data, and\n // allows all ellipsoids to reuse the same vertex data.\n vec4 p = vec4(u_radii * position, 1.0);\n\n v_positionEC = (czm_modelView * p).xyz; // position in eye coordinates\n gl_Position = czm_modelViewProjection * p; // position in clip coordinates\n\n // With multi-frustum, when the ellipsoid primitive is positioned on the intersection of two frustums \n // and close to terrain, the terrain (writes depth) in the closest frustum can overwrite part of the \n // ellipsoid (does not write depth) that was rendered in the farther frustum.\n //\n // Here, we clamp the depth in the vertex shader to avoid being overwritten; however, this creates\n // artifacts since some fragments can be alpha blended twice. This is solved by only rendering\n // the ellipsoid in the closest frustum to the viewer.\n gl_Position.z = clamp(gl_Position.z, czm_depthRange.near, czm_depthRange.far);\n}\n"}),define("Cesium/Scene/EllipsoidPrimitive",["../Core/BoundingSphere","../Core/BoxGeometry","../Core/Cartesian3","../Core/combine","../Core/defaultValue","../Core/defined","../Core/destroyObject","../Core/DeveloperError","../Core/Matrix4","../Core/VertexFormat","../Renderer/BufferUsage","../Renderer/DrawCommand","../Renderer/RenderState","../Renderer/ShaderProgram","../Renderer/ShaderSource","../Renderer/VertexArray","../Shaders/EllipsoidFS","../Shaders/EllipsoidVS","./BlendingState","./CullFace","./Material","./Pass","./SceneMode"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g,v,_,y,C,w,E){"use strict";function b(t){t=r(t,r.EMPTY_OBJECT),this.center=i.clone(r(t.center,i.ZERO)),this._center=new i,this.radii=i.clone(t.radii),this._radii=new i,this._oneOverEllipsoidRadiiSquared=new i,this._boundingSphere=new e,this.modelMatrix=l.clone(r(t.modelMatrix,l.IDENTITY)),this._modelMatrix=new l,this._computedModelMatrix=new l,this.show=r(t.show,!0),this.material=r(t.material,C.fromType(C.ColorType)),this._material=void 0,this._translucent=void 0,this.id=t.id,this._id=void 0,this.debugShowBoundingVolume=r(t.debugShowBoundingVolume,!1),this.onlySunLighting=r(t.onlySunLighting,!1),this._onlySunLighting=!1,this._depthTestEnabled=r(t.depthTestEnabled,!0),this._sp=void 0,this._rs=void 0,this._va=void 0,this._pickSP=void 0,this._pickId=void 0,this._colorCommand=new h({owner:r(t._owner,this)}),this._pickCommand=new h({owner:r(t._owner,this)});var n=this;this._uniforms={u_radii:function(){return n.radii},u_oneOverEllipsoidRadiiSquared:function(){return n._oneOverEllipsoidRadiiSquared}},this._pickUniforms={czm_pickColor:function(){return n._pickId.color}}}function S(e){var n=e.cache.ellipsoidPrimitive_vertexArray;if(o(n))return n;var r=t.createGeometry(t.fromDimensions({dimensions:new i(2,2,2),vertexFormat:u.POSITION_ONLY}));return n=f.fromGeometry({context:e,geometry:r,attributeLocations:T,bufferUsage:c.STATIC_DRAW,interleave:!0}),e.cache.ellipsoidPrimitive_vertexArray=n,n}var T={position:0};return b.prototype.update=function(t){if(this.show&&t.mode===E.SCENE3D&&o(this.center)&&o(this.radii)){var r=t.context,a=this.material.isTranslucent(),s=this._translucent!==a;(!o(this._rs)||s)&&(this._translucent=a,this._rs=d.fromCache({cull:{enabled:!0,face:y.FRONT},depthTest:{enabled:this._depthTestEnabled},depthMask:!a&&r.fragmentDepth,blending:a?_.ALPHA_BLEND:void 0})),o(this._va)||(this._va=S(r));var u=!1,c=this.radii;if(!i.equals(this._radii,c)){i.clone(c,this._radii);var h=this._oneOverEllipsoidRadiiSquared;h.x=1/(c.x*c.x),h.y=1/(c.y*c.y),h.z=1/(c.z*c.z),u=!0}l.equals(this.modelMatrix,this._modelMatrix)&&i.equals(this.center,this._center)||(l.clone(this.modelMatrix,this._modelMatrix),i.clone(this.center,this._center),l.multiplyByTranslation(this.modelMatrix,this.center,this._computedModelMatrix),u=!0),u&&(i.clone(i.ZERO,this._boundingSphere.center),this._boundingSphere.radius=i.maximumComponent(c),e.transform(this._boundingSphere,this._computedModelMatrix,this._boundingSphere));var f=this._material!==this.material;this._material=this.material,this._material.update(r);var C=this.onlySunLighting!==this._onlySunLighting;this._onlySunLighting=this.onlySunLighting;var b,x=this._colorCommand;(f||C||s)&&(b=new m({sources:[this.material.shaderSource,g]}),this.onlySunLighting&&b.defines.push("ONLY_SUN_LIGHTING"),!a&&r.fragmentDepth&&b.defines.push("WRITE_DEPTH"),this._sp=p.replaceCache({context:r,shaderProgram:this._sp,vertexShaderSource:v,fragmentShaderSource:b,attributeLocations:T}),x.vertexArray=this._va,x.renderState=this._rs,x.shaderProgram=this._sp,x.uniformMap=n(this._uniforms,this.material._uniforms),x.executeInClosestFrustum=a);var A=t.commandList,P=t.passes;if(P.render&&(x.boundingVolume=this._boundingSphere,x.debugShowBoundingVolume=this.debugShowBoundingVolume,x.modelMatrix=this._computedModelMatrix,x.pass=a?w.TRANSLUCENT:w.OPAQUE,A.push(x)),P.pick){var M=this._pickCommand;o(this._pickId)&&this._id===this.id||(this._id=this.id,this._pickId=this._pickId&&this._pickId.destroy(),this._pickId=r.createPickId({primitive:this,id:this.id})),(f||C||!o(this._pickSP))&&(b=new m({sources:[this.material.shaderSource,g],pickColorQualifier:"uniform"}),this.onlySunLighting&&b.defines.push("ONLY_SUN_LIGHTING"),!a&&r.fragmentDepth&&b.defines.push("WRITE_DEPTH"),this._pickSP=p.replaceCache({context:r,shaderProgram:this._pickSP,vertexShaderSource:v,fragmentShaderSource:b,attributeLocations:T}),M.vertexArray=this._va,M.renderState=this._rs,M.shaderProgram=this._pickSP,M.uniformMap=n(n(this._uniforms,this._pickUniforms),this.material._uniforms),M.executeInClosestFrustum=a),M.boundingVolume=this._boundingSphere,M.modelMatrix=this._computedModelMatrix,M.pass=a?w.TRANSLUCENT:w.OPAQUE,A.push(M)}}},b.prototype.isDestroyed=function(){return!1},b.prototype.destroy=function(){return this._sp=this._sp&&this._sp.destroy(),this._pickSP=this._pickSP&&this._pickSP.destroy(),this._pickId=this._pickId&&this._pickId.destroy(),a(this)},b}),define("Cesium/Shaders/Appearances/EllipsoidSurfaceAppearanceFS",[],function(){"use strict";return"varying vec3 v_positionMC;\nvarying vec3 v_positionEC;\nvarying vec2 v_st;\n\nvoid main()\n{\n czm_materialInput materialInput;\n \n vec3 normalEC = normalize(czm_normal3D * czm_geodeticSurfaceNormal(v_positionMC, vec3(0.0), vec3(1.0)));\n#ifdef FACE_FORWARD\n normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);\n#endif\n \n materialInput.s = v_st.s;\n materialInput.st = v_st;\n materialInput.str = vec3(v_st, 0.0);\n \n // Convert tangent space material normal to eye space\n materialInput.normalEC = normalEC;\n materialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(v_positionMC, materialInput.normalEC);\n \n // Convert view vector to world space\n vec3 positionToEyeEC = -v_positionEC; \n materialInput.positionToEyeEC = positionToEyeEC;\n\n czm_material material = czm_getMaterial(materialInput);\n \n#ifdef FLAT \n gl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#else\n gl_FragColor = czm_phong(normalize(positionToEyeEC), material);\n#endif\n}\n"}),define("Cesium/Shaders/Appearances/EllipsoidSurfaceAppearanceVS",[],function(){"use strict";return"attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec2 st;\n\nvarying vec3 v_positionMC;\nvarying vec3 v_positionEC;\nvarying vec2 v_st;\n\nvoid main() \n{\n vec4 p = czm_computePosition();\n\n v_positionMC = position3DHigh + position3DLow; // position in model coordinates\n v_positionEC = (czm_modelViewRelativeToEye * p).xyz; // position in eye coordinates\n v_st = st;\n \n gl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n"}),define("Cesium/Scene/EllipsoidSurfaceAppearance",["../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/VertexFormat","../Shaders/Appearances/EllipsoidSurfaceAppearanceFS","../Shaders/Appearances/EllipsoidSurfaceAppearanceVS","./Appearance","./Material"],function(e,t,i,n,r,o,a,s){"use strict";function l(i){i=e(i,e.EMPTY_OBJECT);var n=e(i.translucent,!0),l=e(i.aboveGround,!1);this.material=t(i.material)?i.material:s.fromType(s.ColorType),this.translucent=e(i.translucent,!0),this._vertexShaderSource=e(i.vertexShaderSource,o),this._fragmentShaderSource=e(i.fragmentShaderSource,r),this._renderState=a.getDefaultRenderState(n,!l,i.renderState),this._closed=!1,this._flat=e(i.flat,!1),this._faceForward=e(i.faceForward,l),this._aboveGround=l}return i(l.prototype,{vertexShaderSource:{ +get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},vertexFormat:{get:function(){return l.VERTEX_FORMAT}},flat:{get:function(){return this._flat}},faceForward:{get:function(){return this._faceForward}},aboveGround:{get:function(){return this._aboveGround}}}),l.VERTEX_FORMAT=n.POSITION_AND_ST,l.prototype.getFragmentShaderSource=a.prototype.getFragmentShaderSource,l.prototype.isTranslucent=a.prototype.isTranslucent,l.prototype.getRenderState=a.prototype.getRenderState,l}),define("Cesium/Scene/Fog",["../Core/Cartesian3","../Core/defined","../Core/Math","./SceneMode"],function(e,t,i,n){"use strict";function r(){this.enabled=!0,this.density=2e-4,this.screenSpaceErrorFactor=2}function o(e){var t=a,i=t.length;if(et[i-1])return d=i-2;if(e>=t[d]){if(i>d+1&&ed+2&&e=0&&e>=t[d-1])return--d,d;var n;for(n=0;i-2>n&&!(e>=t[n]&&e8e5||r.mode!==n.SCENE3D)return void(r.fog.enabled=!1);var m=d.height,f=o(m),g=i.clamp((m-a[f])/(a[f+1]-a[f]),0,1),v=i.lerp(s[f],s[f+1],g),_=1e6*this.density,y=_/u*c;v=v*(_-y)*1e-6;var C=e.normalize(h.positionWC,p),w=i.clamp(e.dot(h.directionWC,C),0,1);v*=1-w,r.fog.density=v,r.fog.sse=this.screenSpaceErrorFactor}},r}),define("Cesium/Scene/FrameRateMonitor",["../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/destroyObject","../Core/DeveloperError","../Core/Event","../Core/getTimestamp","../Core/TimeConstants"],function(e,t,i,n,r,o,a,s){"use strict";function l(i){function n(){c(r)}this._scene=i.scene,this.samplingWindow=e(i.samplingWindow,l.defaultSettings.samplingWindow),this.quietPeriod=e(i.quietPeriod,l.defaultSettings.quietPeriod),this.warmupPeriod=e(i.warmupPeriod,l.defaultSettings.warmupPeriod),this.minimumFrameRateDuringWarmup=e(i.minimumFrameRateDuringWarmup,l.defaultSettings.minimumFrameRateDuringWarmup),this.minimumFrameRateAfterWarmup=e(i.minimumFrameRateAfterWarmup,l.defaultSettings.minimumFrameRateAfterWarmup),this._lowFrameRate=new o,this._nominalFrameRate=new o,this._frameTimes=[],this._needsQuietPeriod=!0,this._quietPeriodEndTime=0,this._warmupPeriodEndTime=0,this._frameRateIsLow=!1,this._lastFramesPerSecond=void 0,this._pauseCount=0;var r=this;this._preRenderRemoveListener=this._scene.preRender.addEventListener(function(e,t){u(r,t)}),this._hiddenPropertyName=void 0!==document.hidden?"hidden":void 0!==document.mozHidden?"mozHidden":void 0!==document.msHidden?"msHidden":void 0!==document.webkitHidden?"webkitHidden":void 0;var a=void 0!==document.hidden?"visibilitychange":void 0!==document.mozHidden?"mozvisibilitychange":void 0!==document.msHidden?"msvisibilitychange":void 0!==document.webkitHidden?"webkitvisibilitychange":void 0;this._visibilityChangeRemoveListener=void 0,t(a)&&(document.addEventListener(a,n,!1),this._visibilityChangeRemoveListener=function(){document.removeEventListener(a,n,!1)})}function u(e,t){if(!(e._pauseCount>0)){var i=a();if(e._needsQuietPeriod)e._needsQuietPeriod=!1,e._frameTimes.length=0,e._quietPeriodEndTime=i+e.quietPeriod/s.SECONDS_PER_MILLISECOND,e._warmupPeriodEndTime=e._quietPeriodEndTime+(e.warmupPeriod+e.samplingWindow)/s.SECONDS_PER_MILLISECOND;else if(i>=e._quietPeriodEndTime){e._frameTimes.push(i);var n=i-e.samplingWindow/s.SECONDS_PER_MILLISECOND;if(e._frameTimes.length>=2&&e._frameTimes[0]<=n){for(;e._frameTimes.length>=2&&e._frameTimes[1]e._warmupPeriodEndTime?e.minimumFrameRateAfterWarmup:e.minimumFrameRateDuringWarmup);r>o?e._frameRateIsLow||(e._frameRateIsLow=!0,e._needsQuietPeriod=!0,e.lowFrameRate.raiseEvent(e.scene,e._lastFramesPerSecond)):e._frameRateIsLow&&(e._frameRateIsLow=!1,e._needsQuietPeriod=!0,e.nominalFrameRate.raiseEvent(e.scene,e._lastFramesPerSecond))}}}}function c(e){document[e._hiddenPropertyName]?e.pause():e.unpause()}return l.defaultSettings={samplingWindow:5,quietPeriod:2,warmupPeriod:5,minimumFrameRateDuringWarmup:4,minimumFrameRateAfterWarmup:8},l.fromScene=function(e){return(!t(e._frameRateMonitor)||e._frameRateMonitor.isDestroyed())&&(e._frameRateMonitor=new l({scene:e})),e._frameRateMonitor},i(l.prototype,{scene:{get:function(){return this._scene}},lowFrameRate:{get:function(){return this._lowFrameRate}},nominalFrameRate:{get:function(){return this._nominalFrameRate}},lastFramesPerSecond:{get:function(){return this._lastFramesPerSecond}}}),l.prototype.pause=function(){++this._pauseCount,1===this._pauseCount&&(this._frameTimes.length=0,this._lastFramesPerSecond=void 0)},l.prototype.unpause=function(){--this._pauseCount,this._pauseCount<=0&&(this._pauseCount=0,this._needsQuietPeriod=!0)},l.prototype.isDestroyed=function(){return!1},l.prototype.destroy=function(){return this._preRenderRemoveListener(),t(this._visibilityChangeRemoveListener)&&this._visibilityChangeRemoveListener(),n(this)},l}),define("Cesium/Scene/FrameState",["./SceneMode"],function(e){"use strict";function t(t,i){this.context=t,this.commandList=[],this.shadowMaps=[],this.mode=e.SCENE3D,this.morphTime=e.getMorphTime(e.SCENE3D),this.frameNumber=0,this.time=void 0,this.mapProjection=void 0,this.camera=void 0,this.cullingVolume=void 0,this.occluder=void 0,this.passes={render:!1,pick:!1},this.creditDisplay=i,this.afterRender=[],this.scene3DOnly=!1,this.fog={enabled:!1,density:void 0,sse:void 0},this.terrainExaggeration=1,this.shadowHints={nearPlane:1,farPlane:5e3,closestObjectSize:1e3,lastDirtyTime:0,outOfView:!0}}return t}),define("Cesium/Scene/FrustumCommands",["../Core/defaultValue","./Pass"],function(e,t){"use strict";function i(i,n){this.near=e(i,0),this.far=e(n,0);for(var r=t.NUMBER_OF_PASSES,o=new Array(r),a=new Array(r),s=0;r>s;++s)o[s]=[],a[s]=0;this.commands=o,this.indices=a}return i}),define("Cesium/Shaders/PostProcessFilters/FXAA",[],function(){"use strict";return"/**\n * @license\n * Copyright (c) 2011 NVIDIA Corporation. All rights reserved.\n *\n * TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED\n * *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS\n * OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, NONINFRINGEMENT,IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA \n * OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT, OR \n * CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS \n * OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY \n * OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, \n * EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\n */\n\n/*\nFXAA_PRESET - Choose compile-in knob preset 0-5.\n------------------------------------------------------------------------------\nFXAA_EDGE_THRESHOLD - The minimum amount of local contrast required \n to apply algorithm.\n 1.0/3.0 - too little\n 1.0/4.0 - good start\n 1.0/8.0 - applies to more edges\n 1.0/16.0 - overkill\n------------------------------------------------------------------------------\nFXAA_EDGE_THRESHOLD_MIN - Trims the algorithm from processing darks.\n Perf optimization.\n 1.0/32.0 - visible limit (smaller isn't visible)\n 1.0/16.0 - good compromise\n 1.0/12.0 - upper limit (seeing artifacts)\n------------------------------------------------------------------------------\nFXAA_SEARCH_STEPS - Maximum number of search steps for end of span.\n------------------------------------------------------------------------------\nFXAA_SEARCH_THRESHOLD - Controls when to stop searching.\n 1.0/4.0 - seems to be the best quality wise\n------------------------------------------------------------------------------\nFXAA_SUBPIX_TRIM - Controls sub-pixel aliasing removal.\n 1.0/2.0 - low removal\n 1.0/3.0 - medium removal\n 1.0/4.0 - default removal\n 1.0/8.0 - high removal\n 0.0 - complete removal\n------------------------------------------------------------------------------\nFXAA_SUBPIX_CAP - Insures fine detail is not completely removed.\n This is important for the transition of sub-pixel detail,\n like fences and wires.\n 3.0/4.0 - default (medium amount of filtering)\n 7.0/8.0 - high amount of filtering\n 1.0 - no capping of sub-pixel aliasing removal\n*/\n\n#ifndef FXAA_PRESET\n #define FXAA_PRESET 3\n#endif\n#if (FXAA_PRESET == 3)\n #define FXAA_EDGE_THRESHOLD (1.0/8.0)\n #define FXAA_EDGE_THRESHOLD_MIN (1.0/24.0)\n #define FXAA_SEARCH_STEPS 16\n #define FXAA_SEARCH_THRESHOLD (1.0/4.0)\n #define FXAA_SUBPIX_CAP (3.0/4.0)\n #define FXAA_SUBPIX_TRIM (1.0/4.0)\n#endif\n#if (FXAA_PRESET == 4)\n #define FXAA_EDGE_THRESHOLD (1.0/8.0)\n #define FXAA_EDGE_THRESHOLD_MIN (1.0/24.0)\n #define FXAA_SEARCH_STEPS 24\n #define FXAA_SEARCH_THRESHOLD (1.0/4.0)\n #define FXAA_SUBPIX_CAP (3.0/4.0)\n #define FXAA_SUBPIX_TRIM (1.0/4.0)\n#endif\n#if (FXAA_PRESET == 5)\n #define FXAA_EDGE_THRESHOLD (1.0/8.0)\n #define FXAA_EDGE_THRESHOLD_MIN (1.0/24.0)\n #define FXAA_SEARCH_STEPS 32\n #define FXAA_SEARCH_THRESHOLD (1.0/4.0)\n #define FXAA_SUBPIX_CAP (3.0/4.0)\n #define FXAA_SUBPIX_TRIM (1.0/4.0)\n#endif\n\n#define FXAA_SUBPIX_TRIM_SCALE (1.0/(1.0 - FXAA_SUBPIX_TRIM))\n\n// Return the luma, the estimation of luminance from rgb inputs.\n// This approximates luma using one FMA instruction,\n// skipping normalization and tossing out blue.\n// FxaaLuma() will range 0.0 to 2.963210702.\nfloat FxaaLuma(vec3 rgb) {\n return rgb.y * (0.587/0.299) + rgb.x;\n}\n\nvec3 FxaaLerp3(vec3 a, vec3 b, float amountOfA) {\n return (vec3(-amountOfA) * b) + ((a * vec3(amountOfA)) + b);\n}\n\nvec4 FxaaTexOff(sampler2D tex, vec2 pos, ivec2 off, vec2 rcpFrame) {\n float x = pos.x + float(off.x) * rcpFrame.x;\n float y = pos.y + float(off.y) * rcpFrame.y;\n return texture2D(tex, vec2(x, y));\n}\n\n// pos is the output of FxaaVertexShader interpolated across screen.\n// xy -> actual texture position {0.0 to 1.0}\n// rcpFrame should be a uniform equal to {1.0/frameWidth, 1.0/frameHeight}\nvec3 FxaaPixelShader(vec2 pos, sampler2D tex, vec2 rcpFrame)\n{\n vec3 rgbN = FxaaTexOff(tex, pos.xy, ivec2( 0,-1), rcpFrame).xyz;\n vec3 rgbW = FxaaTexOff(tex, pos.xy, ivec2(-1, 0), rcpFrame).xyz;\n vec3 rgbM = FxaaTexOff(tex, pos.xy, ivec2( 0, 0), rcpFrame).xyz;\n vec3 rgbE = FxaaTexOff(tex, pos.xy, ivec2( 1, 0), rcpFrame).xyz;\n vec3 rgbS = FxaaTexOff(tex, pos.xy, ivec2( 0, 1), rcpFrame).xyz;\n \n float lumaN = FxaaLuma(rgbN);\n float lumaW = FxaaLuma(rgbW);\n float lumaM = FxaaLuma(rgbM);\n float lumaE = FxaaLuma(rgbE);\n float lumaS = FxaaLuma(rgbS);\n float rangeMin = min(lumaM, min(min(lumaN, lumaW), min(lumaS, lumaE)));\n float rangeMax = max(lumaM, max(max(lumaN, lumaW), max(lumaS, lumaE)));\n \n float range = rangeMax - rangeMin;\n if(range < max(FXAA_EDGE_THRESHOLD_MIN, rangeMax * FXAA_EDGE_THRESHOLD))\n {\n return rgbM;\n }\n \n vec3 rgbL = rgbN + rgbW + rgbM + rgbE + rgbS;\n \n float lumaL = (lumaN + lumaW + lumaE + lumaS) * 0.25;\n float rangeL = abs(lumaL - lumaM);\n float blendL = max(0.0, (rangeL / range) - FXAA_SUBPIX_TRIM) * FXAA_SUBPIX_TRIM_SCALE; \n blendL = min(FXAA_SUBPIX_CAP, blendL);\n \n vec3 rgbNW = FxaaTexOff(tex, pos.xy, ivec2(-1,-1), rcpFrame).xyz;\n vec3 rgbNE = FxaaTexOff(tex, pos.xy, ivec2( 1,-1), rcpFrame).xyz;\n vec3 rgbSW = FxaaTexOff(tex, pos.xy, ivec2(-1, 1), rcpFrame).xyz;\n vec3 rgbSE = FxaaTexOff(tex, pos.xy, ivec2( 1, 1), rcpFrame).xyz;\n rgbL += (rgbNW + rgbNE + rgbSW + rgbSE);\n rgbL *= vec3(1.0/9.0);\n \n float lumaNW = FxaaLuma(rgbNW);\n float lumaNE = FxaaLuma(rgbNE);\n float lumaSW = FxaaLuma(rgbSW);\n float lumaSE = FxaaLuma(rgbSE);\n \n float edgeVert = \n abs((0.25 * lumaNW) + (-0.5 * lumaN) + (0.25 * lumaNE)) +\n abs((0.50 * lumaW ) + (-1.0 * lumaM) + (0.50 * lumaE )) +\n abs((0.25 * lumaSW) + (-0.5 * lumaS) + (0.25 * lumaSE));\n float edgeHorz = \n abs((0.25 * lumaNW) + (-0.5 * lumaW) + (0.25 * lumaSW)) +\n abs((0.50 * lumaN ) + (-1.0 * lumaM) + (0.50 * lumaS )) +\n abs((0.25 * lumaNE) + (-0.5 * lumaE) + (0.25 * lumaSE));\n \n bool horzSpan = edgeHorz >= edgeVert;\n float lengthSign = horzSpan ? -rcpFrame.y : -rcpFrame.x;\n \n if(!horzSpan)\n {\n lumaN = lumaW;\n lumaS = lumaE;\n }\n \n float gradientN = abs(lumaN - lumaM);\n float gradientS = abs(lumaS - lumaM);\n lumaN = (lumaN + lumaM) * 0.5;\n lumaS = (lumaS + lumaM) * 0.5;\n \n if (gradientN < gradientS)\n {\n lumaN = lumaS;\n lumaN = lumaS;\n gradientN = gradientS;\n lengthSign *= -1.0;\n }\n \n vec2 posN;\n posN.x = pos.x + (horzSpan ? 0.0 : lengthSign * 0.5);\n posN.y = pos.y + (horzSpan ? lengthSign * 0.5 : 0.0);\n \n gradientN *= FXAA_SEARCH_THRESHOLD;\n \n vec2 posP = posN;\n vec2 offNP = horzSpan ? vec2(rcpFrame.x, 0.0) : vec2(0.0, rcpFrame.y); \n float lumaEndN = lumaN;\n float lumaEndP = lumaN;\n bool doneN = false;\n bool doneP = false;\n posN += offNP * vec2(-1.0, -1.0);\n posP += offNP * vec2( 1.0, 1.0);\n \n for(int i = 0; i < FXAA_SEARCH_STEPS; i++) {\n if(!doneN)\n {\n lumaEndN = FxaaLuma(texture2D(tex, posN.xy).xyz);\n }\n if(!doneP)\n {\n lumaEndP = FxaaLuma(texture2D(tex, posP.xy).xyz);\n }\n \n doneN = doneN || (abs(lumaEndN - lumaN) >= gradientN);\n doneP = doneP || (abs(lumaEndP - lumaN) >= gradientN);\n \n if(doneN && doneP)\n {\n break;\n }\n if(!doneN)\n {\n posN -= offNP;\n }\n if(!doneP)\n {\n posP += offNP;\n }\n }\n \n float dstN = horzSpan ? pos.x - posN.x : pos.y - posN.y;\n float dstP = horzSpan ? posP.x - pos.x : posP.y - pos.y;\n bool directionN = dstN < dstP;\n lumaEndN = directionN ? lumaEndN : lumaEndP;\n \n if(((lumaM - lumaN) < 0.0) == ((lumaEndN - lumaN) < 0.0))\n {\n lengthSign = 0.0;\n }\n \n\n float spanLength = (dstP + dstN);\n dstN = directionN ? dstN : dstP;\n float subPixelOffset = (0.5 + (dstN * (-1.0/spanLength))) * lengthSign;\n vec3 rgbF = texture2D(tex, vec2(\n pos.x + (horzSpan ? 0.0 : subPixelOffset),\n pos.y + (horzSpan ? subPixelOffset : 0.0))).xyz;\n return FxaaLerp3(rgbL, rgbF, blendL); \n}\n\nuniform sampler2D u_texture;\nuniform vec2 u_step;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main()\n{\n gl_FragColor = vec4(FxaaPixelShader(v_textureCoordinates, u_texture, u_step), 1.0);\n}\n"}),define("Cesium/Scene/FXAA",["../Core/BoundingRectangle","../Core/Cartesian2","../Core/Color","../Core/defined","../Core/destroyObject","../Core/PixelFormat","../Renderer/ClearCommand","../Renderer/Framebuffer","../Renderer/PixelDatatype","../Renderer/Renderbuffer","../Renderer/RenderbufferFormat","../Renderer/RenderState","../Renderer/Texture","../Shaders/PostProcessFilters/FXAA"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p){"use strict";function m(t){this._texture=void 0,this._depthTexture=void 0,this._depthRenderbuffer=void 0,this._fbo=void 0,this._command=void 0,this._viewport=new e,this._rs=void 0;var n=new a({color:new i(0,0,0,0),depth:1,owner:this});this._clearCommand=n}function f(e){e._fbo=e._fbo&&e._fbo.destroy(),e._texture=e._texture&&e._texture.destroy(),e._depthTexture=e._depthTexture&&e._depthTexture.destroy(),e._depthRenderbuffer=e._depthRenderbuffer&&e._depthRenderbuffer.destroy(),e._fbo=void 0,e._texture=void 0,e._depthTexture=void 0,e._depthRenderbuffer=void 0,n(e._command)&&(e._command.shaderProgram=e._command.shaderProgram&&e._command.shaderProgram.destroy(),e._command=void 0)}return m.prototype.update=function(i){var r=i.drawingBufferWidth,a=i.drawingBufferHeight,m=this._texture,f=!n(m)||m.width!==r||m.height!==a;if(f&&(this._texture=this._texture&&this._texture.destroy(),this._depthTexture=this._depthTexture&&this._depthTexture.destroy(),this._depthRenderbuffer=this._depthRenderbuffer&&this._depthRenderbuffer.destroy(),this._texture=new d({context:i,width:r,height:a,pixelFormat:o.RGBA,pixelDatatype:l.UNSIGNED_BYTE}),i.depthTexture?this._depthTexture=new d({context:i,width:r,height:a,pixelFormat:o.DEPTH_COMPONENT,pixelDatatype:l.UNSIGNED_SHORT}):this._depthRenderbuffer=new u({context:i,width:r,height:a,format:c.DEPTH_COMPONENT16})),(!n(this._fbo)||f)&&(this._fbo=this._fbo&&this._fbo.destroy(),this._fbo=new s({context:i,colorTextures:[this._texture],depthTexture:this._depthTexture,depthRenderbuffer:this._depthRenderbuffer,destroyAttachments:!1})),n(this._command)||(this._command=i.createViewportQuadCommand(p,{owner:this})),this._viewport.width=r,this._viewport.height=a,n(this._rs)&&e.equals(this._rs.viewport,this._viewport)||(this._rs=h.fromCache({viewport:this._viewport})),this._command.renderState=this._rs,f){var g=this,v=new t(1/this._texture.width,1/this._texture.height);this._command.uniformMap={u_texture:function(){return g._texture},u_step:function(){return v}}}},m.prototype.execute=function(e,t){this._command.execute(e,t)},m.prototype.clear=function(e,t,n){var r=t.framebuffer;t.framebuffer=this._fbo,i.clone(n,this._clearCommand.color),this._clearCommand.execute(e,t),t.framebuffer=r},m.prototype.getColorFramebuffer=function(){return this._fbo},m.prototype.isDestroyed=function(){return!1},m.prototype.destroy=function(){return f(this),r(this)},m}),define("Cesium/Scene/GetFeatureInfoFormat",["../Core/Cartographic","../Core/defaultValue","../Core/defined","../Core/DeveloperError","../Core/RuntimeError","./ImageryLayerFeatureInfo"],function(e,t,i,n,r,o){"use strict";function a(e,t,n){this.type=e,i(t)||("json"===e?t="application/json":"xml"===e?t="text/xml":"html"===e?t="text/html":"text"===e&&(t="text/plain")),this.format=t,i(n)||("json"===e?n=s:"xml"===e?n=l:"html"===e?n=g:"text"===e&&(n=g)),this.callback=n}function s(t){for(var n=[],r=t.features,a=0;a0)for(var o=0;o1&&(t=i[1]);var n=new o;return n.name=t,n.description=e,n.data=e,[n]}}var v="http://www.mapinfo.com/mxp",_="http://www.esri.com/wms",y="http://www.opengis.net/wfs",C="http://www.opengis.net/gml",w=/\s*<\/body>/im,E=//im,b=/([\s\S]*)<\/title>/im;return a}),define("Cesium/Shaders/GlobeFS",[],function(){"use strict";return"//#define SHOW_TILE_BOUNDARIES\n\nuniform vec4 u_initialColor;\n\n#if TEXTURE_UNITS > 0\nuniform sampler2D u_dayTextures[TEXTURE_UNITS];\nuniform vec4 u_dayTextureTranslationAndScale[TEXTURE_UNITS];\n\n#ifdef APPLY_ALPHA\nuniform float u_dayTextureAlpha[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_BRIGHTNESS\nuniform float u_dayTextureBrightness[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_CONTRAST\nuniform float u_dayTextureContrast[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_HUE\nuniform float u_dayTextureHue[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_SATURATION\nuniform float u_dayTextureSaturation[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_GAMMA\nuniform float u_dayTextureOneOverGamma[TEXTURE_UNITS];\n#endif\n\nuniform vec4 u_dayTextureTexCoordsRectangle[TEXTURE_UNITS];\n#endif\n\n#ifdef SHOW_REFLECTIVE_OCEAN\nuniform sampler2D u_waterMask;\nuniform vec4 u_waterMaskTranslationAndScale;\nuniform float u_zoomedOutOceanSpecularIntensity;\n#endif\n\n#ifdef SHOW_OCEAN_WAVES\nuniform sampler2D u_oceanNormalMap;\n#endif\n\n#ifdef ENABLE_DAYNIGHT_SHADING\nuniform vec2 u_lightingFadeDistance;\n#endif\n\nvarying vec3 v_positionMC;\nvarying vec3 v_positionEC;\nvarying vec2 v_textureCoordinates;\nvarying vec3 v_normalMC;\nvarying vec3 v_normalEC;\n\n#ifdef FOG\nvarying float v_distance;\nvarying vec3 v_rayleighColor;\nvarying vec3 v_mieColor;\n#endif\n\nvec4 sampleAndBlend(\n vec4 previousColor,\n sampler2D texture,\n vec2 tileTextureCoordinates,\n vec4 textureCoordinateRectangle,\n vec4 textureCoordinateTranslationAndScale,\n float textureAlpha,\n float textureBrightness,\n float textureContrast,\n float textureHue,\n float textureSaturation,\n float textureOneOverGamma)\n{\n // This crazy step stuff sets the alpha to 0.0 if this following condition is true:\n // tileTextureCoordinates.s < textureCoordinateRectangle.s ||\n // tileTextureCoordinates.s > textureCoordinateRectangle.p ||\n // tileTextureCoordinates.t < textureCoordinateRectangle.t ||\n // tileTextureCoordinates.t > textureCoordinateRectangle.q\n // In other words, the alpha is zero if the fragment is outside the rectangle\n // covered by this texture. Would an actual 'if' yield better performance?\n vec2 alphaMultiplier = step(textureCoordinateRectangle.st, tileTextureCoordinates); \n textureAlpha = textureAlpha * alphaMultiplier.x * alphaMultiplier.y;\n \n alphaMultiplier = step(vec2(0.0), textureCoordinateRectangle.pq - tileTextureCoordinates);\n textureAlpha = textureAlpha * alphaMultiplier.x * alphaMultiplier.y;\n \n vec2 translation = textureCoordinateTranslationAndScale.xy;\n vec2 scale = textureCoordinateTranslationAndScale.zw;\n vec2 textureCoordinates = tileTextureCoordinates * scale + translation;\n vec4 value = texture2D(texture, textureCoordinates);\n vec3 color = value.rgb;\n float alpha = value.a;\n \n#ifdef APPLY_BRIGHTNESS\n color = mix(vec3(0.0), color, textureBrightness);\n#endif\n\n#ifdef APPLY_CONTRAST\n color = mix(vec3(0.5), color, textureContrast);\n#endif\n\n#ifdef APPLY_HUE\n color = czm_hue(color, textureHue);\n#endif\n\n#ifdef APPLY_SATURATION\n color = czm_saturation(color, textureSaturation);\n#endif\n\n#ifdef APPLY_GAMMA\n color = pow(color, vec3(textureOneOverGamma));\n#endif\n\n float sourceAlpha = alpha * textureAlpha;\n float outAlpha = mix(previousColor.a, 1.0, sourceAlpha);\n vec3 outColor = mix(previousColor.rgb * previousColor.a, color, sourceAlpha) / outAlpha;\n return vec4(outColor, outAlpha);\n}\n\nvec4 computeDayColor(vec4 initialColor, vec2 textureCoordinates);\nvec4 computeWaterColor(vec3 positionEyeCoordinates, vec2 textureCoordinates, mat3 enuToEye, vec4 imageryColor, float specularMapValue);\n\nvoid main()\n{\n // The clamp below works around an apparent bug in Chrome Canary v23.0.1241.0\n // where the fragment shader sees textures coordinates < 0.0 and > 1.0 for the\n // fragments on the edges of tiles even though the vertex shader is outputting\n // coordinates strictly in the 0-1 range.\n vec4 color = computeDayColor(u_initialColor, clamp(v_textureCoordinates, 0.0, 1.0));\n\n#ifdef SHOW_TILE_BOUNDARIES\n if (v_textureCoordinates.x < (1.0/256.0) || v_textureCoordinates.x > (255.0/256.0) ||\n v_textureCoordinates.y < (1.0/256.0) || v_textureCoordinates.y > (255.0/256.0))\n {\n color = vec4(1.0, 0.0, 0.0, 1.0);\n }\n#endif\n\n#if defined(SHOW_REFLECTIVE_OCEAN) || defined(ENABLE_DAYNIGHT_SHADING)\n vec3 normalMC = czm_geodeticSurfaceNormal(v_positionMC, vec3(0.0), vec3(1.0)); // normalized surface normal in model coordinates\n vec3 normalEC = czm_normal3D * normalMC; // normalized surface normal in eye coordiantes\n#endif\n\n#ifdef SHOW_REFLECTIVE_OCEAN\n vec2 waterMaskTranslation = u_waterMaskTranslationAndScale.xy;\n vec2 waterMaskScale = u_waterMaskTranslationAndScale.zw;\n vec2 waterMaskTextureCoordinates = v_textureCoordinates * waterMaskScale + waterMaskTranslation;\n\n float mask = texture2D(u_waterMask, waterMaskTextureCoordinates).r;\n\n if (mask > 0.0)\n {\n mat3 enuToEye = czm_eastNorthUpToEyeCoordinates(v_positionMC, normalEC);\n \n vec2 ellipsoidTextureCoordinates = czm_ellipsoidWgs84TextureCoordinates(normalMC);\n vec2 ellipsoidFlippedTextureCoordinates = czm_ellipsoidWgs84TextureCoordinates(normalMC.zyx);\n\n vec2 textureCoordinates = mix(ellipsoidTextureCoordinates, ellipsoidFlippedTextureCoordinates, czm_morphTime * smoothstep(0.9, 0.95, normalMC.z));\n\n color = computeWaterColor(v_positionEC, textureCoordinates, enuToEye, color, mask);\n }\n#endif\n\n#ifdef ENABLE_VERTEX_LIGHTING\n float diffuseIntensity = clamp(czm_getLambertDiffuse(czm_sunDirectionEC, normalize(v_normalEC)) * 0.9 + 0.3, 0.0, 1.0);\n vec4 finalColor = vec4(color.rgb * diffuseIntensity, color.a);\n#elif defined(ENABLE_DAYNIGHT_SHADING)\n float diffuseIntensity = clamp(czm_getLambertDiffuse(czm_sunDirectionEC, normalEC) * 5.0 + 0.3, 0.0, 1.0);\n float cameraDist = length(czm_view[3]);\n float fadeOutDist = u_lightingFadeDistance.x;\n float fadeInDist = u_lightingFadeDistance.y;\n float t = clamp((cameraDist - fadeOutDist) / (fadeInDist - fadeOutDist), 0.0, 1.0);\n diffuseIntensity = mix(1.0, diffuseIntensity, t);\n vec4 finalColor = vec4(color.rgb * diffuseIntensity, color.a);\n#else\n vec4 finalColor = color;\n#endif\n\n\n#ifdef FOG\n const float fExposure = 2.0;\n vec3 fogColor = v_mieColor + finalColor.rgb * v_rayleighColor;\n fogColor = vec3(1.0) - exp(-fExposure * fogColor);\n \n gl_FragColor = vec4(czm_fog(v_distance, finalColor.rgb, fogColor), finalColor.a);\n#else\n gl_FragColor = finalColor;\n#endif\n}\n\n#ifdef SHOW_REFLECTIVE_OCEAN\n\nfloat waveFade(float edge0, float edge1, float x)\n{\n float y = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\n return pow(1.0 - y, 5.0);\n}\n\nfloat linearFade(float edge0, float edge1, float x)\n{\n return clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\n}\n\n// Based on water rendering by Jonas Wagner:\n// http://29a.ch/2012/7/19/webgl-terrain-rendering-water-fog\n\n// low altitude wave settings\nconst float oceanFrequencyLowAltitude = 825000.0;\nconst float oceanAnimationSpeedLowAltitude = 0.004;\nconst float oceanOneOverAmplitudeLowAltitude = 1.0 / 2.0;\nconst float oceanSpecularIntensity = 0.5;\n \n// high altitude wave settings\nconst float oceanFrequencyHighAltitude = 125000.0;\nconst float oceanAnimationSpeedHighAltitude = 0.008;\nconst float oceanOneOverAmplitudeHighAltitude = 1.0 / 2.0;\n\nvec4 computeWaterColor(vec3 positionEyeCoordinates, vec2 textureCoordinates, mat3 enuToEye, vec4 imageryColor, float maskValue)\n{\n vec3 positionToEyeEC = -positionEyeCoordinates;\n float positionToEyeECLength = length(positionToEyeEC);\n\n // The double normalize below works around a bug in Firefox on Android devices.\n vec3 normalizedpositionToEyeEC = normalize(normalize(positionToEyeEC));\n \n // Fade out the waves as the camera moves far from the surface.\n float waveIntensity = waveFade(70000.0, 1000000.0, positionToEyeECLength);\n\n#ifdef SHOW_OCEAN_WAVES\n // high altitude waves\n float time = czm_frameNumber * oceanAnimationSpeedHighAltitude;\n vec4 noise = czm_getWaterNoise(u_oceanNormalMap, textureCoordinates * oceanFrequencyHighAltitude, time, 0.0);\n vec3 normalTangentSpaceHighAltitude = vec3(noise.xy, noise.z * oceanOneOverAmplitudeHighAltitude);\n \n // low altitude waves\n time = czm_frameNumber * oceanAnimationSpeedLowAltitude;\n noise = czm_getWaterNoise(u_oceanNormalMap, textureCoordinates * oceanFrequencyLowAltitude, time, 0.0);\n vec3 normalTangentSpaceLowAltitude = vec3(noise.xy, noise.z * oceanOneOverAmplitudeLowAltitude);\n \n // blend the 2 wave layers based on distance to surface\n float highAltitudeFade = linearFade(0.0, 60000.0, positionToEyeECLength);\n float lowAltitudeFade = 1.0 - linearFade(20000.0, 60000.0, positionToEyeECLength);\n vec3 normalTangentSpace = \n (highAltitudeFade * normalTangentSpaceHighAltitude) + \n (lowAltitudeFade * normalTangentSpaceLowAltitude);\n normalTangentSpace = normalize(normalTangentSpace);\n \n // fade out the normal perturbation as we move farther from the water surface\n normalTangentSpace.xy *= waveIntensity;\n normalTangentSpace = normalize(normalTangentSpace);\n#else\n vec3 normalTangentSpace = vec3(0.0, 0.0, 1.0);\n#endif\n\n vec3 normalEC = enuToEye * normalTangentSpace;\n \n const vec3 waveHighlightColor = vec3(0.3, 0.45, 0.6);\n \n // Use diffuse light to highlight the waves\n float diffuseIntensity = czm_getLambertDiffuse(czm_sunDirectionEC, normalEC) * maskValue;\n vec3 diffuseHighlight = waveHighlightColor * diffuseIntensity;\n \n#ifdef SHOW_OCEAN_WAVES\n // Where diffuse light is low or non-existent, use wave highlights based solely on\n // the wave bumpiness and no particular light direction.\n float tsPerturbationRatio = normalTangentSpace.z;\n vec3 nonDiffuseHighlight = mix(waveHighlightColor * 5.0 * (1.0 - tsPerturbationRatio), vec3(0.0), diffuseIntensity);\n#else\n vec3 nonDiffuseHighlight = vec3(0.0);\n#endif\n\n // Add specular highlights in 3D, and in all modes when zoomed in.\n float specularIntensity = czm_getSpecular(czm_sunDirectionEC, normalizedpositionToEyeEC, normalEC, 10.0) + 0.25 * czm_getSpecular(czm_moonDirectionEC, normalizedpositionToEyeEC, normalEC, 10.0);\n float surfaceReflectance = mix(0.0, mix(u_zoomedOutOceanSpecularIntensity, oceanSpecularIntensity, waveIntensity), maskValue);\n float specular = specularIntensity * surfaceReflectance;\n \n return vec4(imageryColor.rgb + diffuseHighlight + nonDiffuseHighlight + specular, imageryColor.a); \n}\n\n#endif // #ifdef SHOW_REFLECTIVE_OCEAN\n"; +}),define("Cesium/Shaders/GlobeVS",[],function(){"use strict";return"#ifdef QUANTIZATION_BITS12\nattribute vec4 compressed;\n#else\nattribute vec4 position3DAndHeight;\nattribute vec3 textureCoordAndEncodedNormals;\n#endif\n\nuniform vec3 u_center3D;\nuniform mat4 u_modifiedModelView;\nuniform mat4 u_modifiedModelViewProjection;\nuniform vec4 u_tileRectangle;\n\n// Uniforms for 2D Mercator projection\nuniform vec2 u_southAndNorthLatitude;\nuniform vec2 u_southMercatorYAndOneOverHeight;\n\nvarying vec3 v_positionMC;\nvarying vec3 v_positionEC;\n\nvarying vec2 v_textureCoordinates;\nvarying vec3 v_normalMC;\nvarying vec3 v_normalEC;\n\n#ifdef FOG\nvarying float v_distance;\nvarying vec3 v_mieColor;\nvarying vec3 v_rayleighColor;\n#endif\n\n// These functions are generated at runtime.\nvec4 getPosition(vec3 position, float height, vec2 textureCoordinates);\nfloat get2DYPositionFraction(vec2 textureCoordinates);\n\nvec4 getPosition3DMode(vec3 position, float height, vec2 textureCoordinates)\n{\n return u_modifiedModelViewProjection * vec4(position, 1.0);\n}\n\nfloat get2DMercatorYPositionFraction(vec2 textureCoordinates)\n{\n // The width of a tile at level 11, in radians and assuming a single root tile, is\n // 2.0 * czm_pi / pow(2.0, 11.0)\n // We want to just linearly interpolate the 2D position from the texture coordinates\n // when we're at this level or higher. The constant below is the expression\n // above evaluated and then rounded up at the 4th significant digit.\n const float maxTileWidth = 0.003068;\n float positionFraction = textureCoordinates.y;\n float southLatitude = u_southAndNorthLatitude.x;\n float northLatitude = u_southAndNorthLatitude.y;\n if (northLatitude - southLatitude > maxTileWidth)\n {\n float southMercatorY = u_southMercatorYAndOneOverHeight.x;\n float oneOverMercatorHeight = u_southMercatorYAndOneOverHeight.y;\n\n float currentLatitude = mix(southLatitude, northLatitude, textureCoordinates.y);\n currentLatitude = clamp(currentLatitude, -czm_webMercatorMaxLatitude, czm_webMercatorMaxLatitude);\n positionFraction = czm_latitudeToWebMercatorFraction(currentLatitude, southMercatorY, oneOverMercatorHeight);\n } \n return positionFraction;\n}\n\nfloat get2DGeographicYPositionFraction(vec2 textureCoordinates)\n{\n return textureCoordinates.y;\n}\n\nvec4 getPositionPlanarEarth(vec3 position, float height, vec2 textureCoordinates)\n{\n float yPositionFraction = get2DYPositionFraction(textureCoordinates);\n vec4 rtcPosition2D = vec4(height, mix(u_tileRectangle.st, u_tileRectangle.pq, vec2(textureCoordinates.x, yPositionFraction)), 1.0);\n return u_modifiedModelViewProjection * rtcPosition2D;\n}\n\nvec4 getPosition2DMode(vec3 position, float height, vec2 textureCoordinates)\n{\n return getPositionPlanarEarth(position, 0.0, textureCoordinates);\n}\n\nvec4 getPositionColumbusViewMode(vec3 position, float height, vec2 textureCoordinates)\n{\n return getPositionPlanarEarth(position, height, textureCoordinates);\n}\n\nvec4 getPositionMorphingMode(vec3 position, float height, vec2 textureCoordinates)\n{\n // We do not do RTC while morphing, so there is potential for jitter.\n // This is unlikely to be noticeable, though.\n vec3 position3DWC = position + u_center3D;\n float yPositionFraction = get2DYPositionFraction(textureCoordinates);\n vec4 position2DWC = vec4(height, mix(u_tileRectangle.st, u_tileRectangle.pq, vec2(textureCoordinates.x, yPositionFraction)), 1.0);\n vec4 morphPosition = czm_columbusViewMorph(position2DWC, vec4(position3DWC, 1.0), czm_morphTime);\n return czm_modelViewProjection * morphPosition;\n}\n\n#ifdef QUANTIZATION_BITS12\nuniform vec2 u_minMaxHeight;\nuniform mat4 u_scaleAndBias;\n#endif\n\nvoid main() \n{\n#ifdef QUANTIZATION_BITS12\n vec2 xy = czm_decompressTextureCoordinates(compressed.x);\n vec2 zh = czm_decompressTextureCoordinates(compressed.y);\n vec3 position = vec3(xy, zh.x);\n float height = zh.y;\n vec2 textureCoordinates = czm_decompressTextureCoordinates(compressed.z);\n float encodedNormal = compressed.w;\n\n height = height * (u_minMaxHeight.y - u_minMaxHeight.x) + u_minMaxHeight.x;\n position = (u_scaleAndBias * vec4(position, 1.0)).xyz;\n#else\n vec3 position = position3DAndHeight.xyz;\n float height = position3DAndHeight.w;\n vec2 textureCoordinates = textureCoordAndEncodedNormals.xy;\n float encodedNormal = textureCoordAndEncodedNormals.z;\n#endif\n\n vec3 position3DWC = position + u_center3D;\n gl_Position = getPosition(position, height, textureCoordinates);\n\n v_textureCoordinates = textureCoordinates;\n\n#if defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL)\n v_positionEC = (u_modifiedModelView * vec4(position, 1.0)).xyz;\n v_positionMC = position3DWC; // position in model coordinates\n v_normalMC = czm_octDecode(encodedNormal);\n v_normalEC = czm_normal3D * v_normalMC;\n#elif defined(SHOW_REFLECTIVE_OCEAN) || defined(ENABLE_DAYNIGHT_SHADING) || defined(GENERATE_POSITION)\n v_positionEC = (u_modifiedModelView * vec4(position, 1.0)).xyz;\n v_positionMC = position3DWC; // position in model coordinates\n#endif\n \n#ifdef FOG\n AtmosphereColor atmosColor = computeGroundAtmosphereFromSpace(position3DWC);\n v_mieColor = atmosColor.mie;\n v_rayleighColor = atmosColor.rayleigh;\n v_distance = length((czm_modelView3D * vec4(position3DWC, 1.0)).xyz);\n#endif\n}"}),define("Cesium/Shaders/GroundAtmosphere",[],function(){"use strict";return"/*!\n * Atmosphere code:\n *\n * Copyright (c) 2000-2005, Sean O'Neil (s_p_oneil@hotmail.com)\n * All rights reserved.\n * \n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * \n * * Redistributions of source code must retain the above copyright notice,\n * this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation\n * and/or other materials provided with the distribution.\n * * Neither the name of the project nor the names of its contributors may be\n * used to endorse or promote products derived from this software without\n * specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * Modifications made by Analytical Graphics, Inc.\n */\n \n // Atmosphere:\n // Code: http://sponeil.net/\n // GPU Gems 2 Article: http://http.developer.nvidia.com/GPUGems2/gpugems2_chapter16.html\n\nconst float fInnerRadius = 6378137.0;\nconst float fOuterRadius = 6378137.0 * 1.025;\nconst float fOuterRadius2 = fOuterRadius * fOuterRadius;\n\nconst float Kr = 0.0025;\nconst float Km = 0.0015;\nconst float ESun = 15.0;\n\nconst float fKrESun = Kr * ESun;\nconst float fKmESun = Km * ESun;\nconst float fKr4PI = Kr * 4.0 * czm_pi;\nconst float fKm4PI = Km * 4.0 * czm_pi;\n\nconst float fScale = 1.0 / (fOuterRadius - fInnerRadius);\nconst float fScaleDepth = 0.25;\nconst float fScaleOverScaleDepth = fScale / fScaleDepth;\n\nstruct AtmosphereColor\n{\n vec3 mie;\n vec3 rayleigh;\n};\n\nconst int nSamples = 2;\nconst float fSamples = 2.0;\n\nfloat scale(float fCos)\n{\n float x = 1.0 - fCos;\n return fScaleDepth * exp(-0.00287 + x*(0.459 + x*(3.83 + x*(-6.80 + x*5.25))));\n}\n\nAtmosphereColor computeGroundAtmosphereFromSpace(vec3 v3Pos)\n{\n vec3 v3InvWavelength = vec3(1.0 / pow(0.650, 4.0), 1.0 / pow(0.570, 4.0), 1.0 / pow(0.475, 4.0));\n\n // Get the ray from the camera to the vertex and its length (which is the far point of the ray passing through the atmosphere)\n vec3 v3Ray = v3Pos - czm_viewerPositionWC;\n float fFar = length(v3Ray);\n v3Ray /= fFar;\n \n float fCameraHeight = length(czm_viewerPositionWC);\n float fCameraHeight2 = fCameraHeight * fCameraHeight;\n\n // This next line is an ANGLE workaround. It is equivalent to B = 2.0 * dot(czm_viewerPositionWC, v3Ray), \n // which is what it should be, but there are problems at the poles.\n float B = 2.0 * length(czm_viewerPositionWC) * dot(normalize(czm_viewerPositionWC), v3Ray);\n float C = fCameraHeight2 - fOuterRadius2;\n float fDet = max(0.0, B*B - 4.0 * C);\n float fNear = 0.5 * (-B - sqrt(fDet));\n\n // Calculate the ray's starting position, then calculate its scattering offset\n vec3 v3Start = czm_viewerPositionWC + v3Ray * fNear;\n fFar -= fNear;\n float fDepth = exp((fInnerRadius - fOuterRadius) / fScaleDepth);\n \n // The light angle based on the sun position would be:\n // dot(czm_sunDirectionWC, v3Pos) / length(v3Pos);\n // We want the atmosphere to be uniform over the globe so it is set to 1.0.\n float fLightAngle = 1.0;\n float fCameraAngle = dot(-v3Ray, v3Pos) / length(v3Pos);\n float fCameraScale = scale(fCameraAngle);\n float fLightScale = scale(fLightAngle);\n float fCameraOffset = fDepth*fCameraScale;\n float fTemp = (fLightScale + fCameraScale);\n\n // Initialize the scattering loop variables\n float fSampleLength = fFar / fSamples;\n float fScaledLength = fSampleLength * fScale;\n vec3 v3SampleRay = v3Ray * fSampleLength;\n vec3 v3SamplePoint = v3Start + v3SampleRay * 0.5;\n\n // Now loop through the sample rays\n vec3 v3FrontColor = vec3(0.0);\n vec3 v3Attenuate = vec3(0.0);\n for(int i=0; i<nSamples; i++)\n {\n float fHeight = length(v3SamplePoint);\n float fDepth = exp(fScaleOverScaleDepth * (fInnerRadius - fHeight));\n float fScatter = fDepth*fTemp - fCameraOffset;\n v3Attenuate = exp(-fScatter * (v3InvWavelength * fKr4PI + fKm4PI));\n v3FrontColor += v3Attenuate * (fDepth * fScaledLength);\n v3SamplePoint += v3SampleRay;\n }\n \n AtmosphereColor color;\n color.mie = v3FrontColor * (v3InvWavelength * fKrESun + fKmESun);\n color.rayleigh = v3Attenuate; // Calculate the attenuation factor for the ground\n \n return color;\n}\n\n"}),define("Cesium/Scene/GlobeSurfaceShaderSet",["../Core/defined","../Core/destroyObject","../Core/TerrainQuantization","../Renderer/ShaderProgram","../Scene/SceneMode"],function(e,t,i,n,r){"use strict";function o(e,t,i){this.numberOfDayTextures=e,this.flags=t,this.shaderProgram=i}function a(){this.baseVertexShaderSource=void 0,this.baseFragmentShaderSource=void 0,this._shadersByTexturesFlags=[],this._pickShaderPrograms=[]}function s(e){var t,i="vec4 getPosition(vec3 position, float height, vec2 textureCoordinates) { return getPosition3DMode(position, height, textureCoordinates); }",n="vec4 getPosition(vec3 position, float height, vec2 textureCoordinates) { return getPositionColumbusViewMode(position, height, textureCoordinates); }",o="vec4 getPosition(vec3 position, float height, vec2 textureCoordinates) { return getPositionMorphingMode(position, height, textureCoordinates); }";switch(e){case r.SCENE3D:t=i;break;case r.SCENE2D:case r.COLUMBUS_VIEW:t=n;break;case r.MORPHING:t=o}return t}function l(e){var t="float get2DYPositionFraction(vec2 textureCoordinates) { return get2DGeographicYPositionFraction(textureCoordinates); }",i="float get2DYPositionFraction(vec2 textureCoordinates) { return get2DMercatorYPositionFraction(textureCoordinates); }";return e?i:t}return a.prototype.getShaderProgram=function(t,r,a,u,c,h,d,p,m,f,g,v,_,y,C){var w=0,E="",b=r.pickTerrain.mesh.encoding,S=b.quantization;S===i.BITS12&&(w=1,E="QUANTIZATION_BITS12");var T=t.mode,x=T|u<<2|c<<3|h<<4|d<<5|p<<6|m<<7|f<<8|g<<9|v<<10|_<<11|y<<12|C<<13|w<<14,A=r.surfaceShader;if(e(A)&&A.numberOfDayTextures===a&&A.flags===x)return A.shaderProgram;var P=this._shadersByTexturesFlags[a];if(e(P)||(P=this._shadersByTexturesFlags[a]=[]),A=P[x],!e(A)){var M=this.baseVertexShaderSource.clone(),D=this.baseFragmentShaderSource.clone();M.defines.push(E),D.defines.push("TEXTURE_UNITS "+a),u&&D.defines.push("APPLY_BRIGHTNESS"),c&&D.defines.push("APPLY_CONTRAST"),h&&D.defines.push("APPLY_HUE"),d&&D.defines.push("APPLY_SATURATION"),p&&D.defines.push("APPLY_GAMMA"),m&&D.defines.push("APPLY_ALPHA"),f&&(D.defines.push("SHOW_REFLECTIVE_OCEAN"),M.defines.push("SHOW_REFLECTIVE_OCEAN")),g&&D.defines.push("SHOW_OCEAN_WAVES"),v&&(_?(M.defines.push("ENABLE_VERTEX_LIGHTING"),D.defines.push("ENABLE_VERTEX_LIGHTING")):(M.defines.push("ENABLE_DAYNIGHT_SHADING"),D.defines.push("ENABLE_DAYNIGHT_SHADING"))),C&&(M.defines.push("FOG"),D.defines.push("FOG"));for(var I=" vec4 computeDayColor(vec4 initialColor, vec2 textureCoordinates)\n {\n vec4 color = initialColor;\n",R=0;a>R;++R)I+=" color = sampleAndBlend(\n color,\n u_dayTextures["+R+"],\n textureCoordinates,\n u_dayTextureTexCoordsRectangle["+R+"],\n u_dayTextureTranslationAndScale["+R+"],\n "+(m?"u_dayTextureAlpha["+R+"]":"1.0")+",\n "+(u?"u_dayTextureBrightness["+R+"]":"0.0")+",\n "+(c?"u_dayTextureContrast["+R+"]":"0.0")+",\n "+(h?"u_dayTextureHue["+R+"]":"0.0")+",\n "+(d?"u_dayTextureSaturation["+R+"]":"0.0")+",\n "+(p?"u_dayTextureOneOverGamma["+R+"]":"0.0")+"\n );\n";I+=" return color;\n }",D.sources.push(I),M.sources.push(s(T)),M.sources.push(l(y));var O=n.fromCache({context:t.context,vertexShaderSource:M,fragmentShaderSource:D,attributeLocations:b.getAttributeLocations()});A=P[x]=new o(a,x,O)}return r.surfaceShader=A,A.shaderProgram},a.prototype.getPickShaderProgram=function(t,r,o){var a=0,u="",c=r.pickTerrain.mesh.encoding,h=c.quantization;h===i.BITS12&&(a=1,u="QUANTIZATION_BITS12");var d=t.mode,p=d|o<<2|a<<3,m=this._pickShaderPrograms[p];if(!e(m)){var f=this.baseVertexShaderSource.clone();f.defines.push(u),f.sources.push(s(d)),f.sources.push(l(o));var g="void main()\n{\n gl_FragColor = vec4(1.0, 1.0, 0.0, 1.0);\n}\n";m=this._pickShaderPrograms[p]=n.fromCache({context:t.context,vertexShaderSource:f,fragmentShaderSource:g,attributeLocations:c.getAttributeLocations()})}return m},a.prototype.destroy=function(){var i,n,r=this._shadersByTexturesFlags;for(var o in r)if(r.hasOwnProperty(o)){var a=r[o];if(!e(a))continue;for(i in a)a.hasOwnProperty(i)&&(n=a[i],e(n)&&n.shaderProgram.destroy())}var s=this._pickShaderPrograms;for(i in s)s.hasOwnProperty(i)&&(n=s[i],n.destroy());return t(this)},a}),define("Cesium/Scene/ImageryState",["../Core/freezeObject"],function(e){"use strict";var t={UNLOADED:0,TRANSITIONING:1,RECEIVED:2,TEXTURE_LOADED:3,READY:4,FAILED:5,INVALID:6,PLACEHOLDER:7};return e(t)}),define("Cesium/Scene/QuadtreeTileLoadState",["../Core/freezeObject"],function(e){"use strict";var t={START:0,LOADING:1,DONE:2,FAILED:3};return e(t)}),define("Cesium/Scene/TerrainState",["../Core/freezeObject"],function(e){"use strict";var t={FAILED:0,UNLOADED:1,RECEIVING:2,RECEIVED:3,TRANSFORMING:4,TRANSFORMED:5,READY:6};return e(t)}),define("Cesium/Scene/TileBoundingBox",["../Core/Cartesian3","../Core/Cartographic","../Core/defaultValue","../Core/defined","../Core/DeveloperError","../Core/Ellipsoid","../Core/Rectangle","./SceneMode"],function(e,t,i,n,r,o,a,s){"use strict";function l(t,i,n){n.cartographicToCartesian(a.southwest(i),t.southwestCornerCartesian),n.cartographicToCartesian(a.northeast(i),t.northeastCornerCartesian),m.longitude=i.west,m.latitude=.5*(i.south+i.north),m.height=0;var r=n.cartographicToCartesian(m,d),o=e.cross(r,e.UNIT_Z,c);e.normalize(o,t.westNormal),m.longitude=i.east;var s=n.cartographicToCartesian(m,p),l=e.cross(e.UNIT_Z,s,c);e.normalize(l,t.eastNormal);var u=n.geodeticSurfaceNormalCartographic(a.southeast(i),h),f=e.subtract(r,s,c),g=e.cross(u,f,h);e.normalize(g,t.southNormal);var v=n.geodeticSurfaceNormalCartographic(a.northwest(i),h),_=e.cross(f,v,h);e.normalize(_,t.northNormal)}var u=function(t){t=i(t,i.EMPTY_OBJECT),this.rectangle=a.clone(t.rectangle),this.minimumHeight=i(t.minimumHeight,0),this.maximumHeight=i(t.maximumHeight,0),this.southwestCornerCartesian=new e,this.northeastCornerCartesian=new e,this.westNormal=new e,this.southNormal=new e,this.eastNormal=new e,this.northNormal=new e;var n=i(t.ellipsoid,o.WGS84);l(this,t.rectangle,n)},c=new e,h=new e,d=new e,p=new e,m=new t,f=new e,g=new e,v=new e(0,-1,0),_=new e(0,0,-1),y=new e;return u.prototype.distanceToCamera=function(t){var i=t.camera,n=i.positionWC,r=i.positionCartographic,o=0;if(!a.contains(this.rectangle,r)){var l=this.southwestCornerCartesian,u=this.northeastCornerCartesian,c=this.westNormal,h=this.southNormal,d=this.eastNormal,p=this.northNormal;t.mode!==s.SCENE3D&&(l=t.mapProjection.project(a.southwest(this.rectangle),f),l.z=l.y,l.y=l.x,l.x=0,u=t.mapProjection.project(a.northeast(this.rectangle),g),u.z=u.y,u.y=u.x,u.x=0,c=v,d=e.UNIT_Y,h=_,p=e.UNIT_Z);var m=e.subtract(n,l,y),C=e.dot(m,c),w=e.dot(m,h),E=e.subtract(n,u,y),b=e.dot(E,d),S=e.dot(E,p);C>0?o+=C*C:b>0&&(o+=b*b),w>0?o+=w*w:S>0&&(o+=S*S)}var T;T=t.mode===s.SCENE3D?r.height:n.x;var x=t.mode===s.SCENE3D?this.maximumHeight:0,A=T-x;return A>0&&(o+=A*A),Math.sqrt(o)},u}),define("Cesium/Scene/TileTerrain",["../Core/BoundingSphere","../Core/Cartesian3","../Core/ComponentDatatype","../Core/defined","../Core/DeveloperError","../Core/IndexDatatype","../Core/OrientedBoundingBox","../Core/TileProviderError","../Renderer/Buffer","../Renderer/BufferUsage","../Renderer/VertexArray","../ThirdParty/when","./TerrainState","./TileBoundingBox"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p){"use strict";function m(e){this.state=d.UNLOADED,this.data=void 0,this.mesh=void 0,this.vertexArray=void 0,this.upsampleDetails=e}function f(e,t,i,r,o){function a(t){e.data=t,e.state=d.RECEIVED}function l(){e.state=d.FAILED;var n="Failed to obtain terrain tile X: "+i+" Y: "+r+" Level: "+o+".";t._requestError=s.handleError(t._requestError,t,t.errorEvent,n,i,r,o,u)}function u(){e.data=t.requestTileGeometry(i,r,o),n(e.data)?(e.state=d.RECEIVING,h(e.data,a,l)):e.state=d.UNLOADED}u()}function g(e,t,i,r,o,a){var s=i.tilingScheme,l=e.data,u=l.createMesh(s,r,o,a,t.terrainExaggeration);n(u)&&(e.state=d.TRANSFORMING,h(u,function(t){e.mesh=t,e.state=d.TRANSFORMED},function(){e.state=d.FAILED}))}function v(e,t,i,r,a,s){var h=e.mesh.vertices,p=l.createVertexBuffer({context:t,typedArray:h,usage:u.STATIC_DRAW}),m=e.mesh.encoding.getAttributes(p),f=e.mesh.indices.indexBuffers||{},g=f[t.id];if(!n(g)||g.isDestroyed()){var v=e.mesh.indices,_=2===v.BYTES_PER_ELEMENT?o.UNSIGNED_SHORT:o.UNSIGNED_INT;g=l.createIndexBuffer({context:t,typedArray:v,usage:u.STATIC_DRAW,indexDatatype:_}),g.vertexArrayDestroyable=!1,g.referenceCount=1,f[t.id]=g,e.mesh.indices.indexBuffers=f}else++g.referenceCount;e.vertexArray=new c({context:t,attributes:m,indexBuffer:g}),e.state=d.READY}return m.prototype.freeResources=function(){if(this.state=d.UNLOADED,this.data=void 0,this.mesh=void 0,n(this.vertexArray)){var e=this.vertexArray.indexBuffer;this.vertexArray.destroy(),this.vertexArray=void 0,!e.isDestroyed()&&n(e.referenceCount)&&(--e.referenceCount,0===e.referenceCount&&e.destroy())}},m.prototype.publishToTile=function(i){var n=i.data,r=this.mesh;t.clone(r.center,n.center),n.minimumHeight=r.minimumHeight,n.maximumHeight=r.maximumHeight,n.boundingSphere3D=e.clone(r.boundingSphere3D,n.boundingSphere3D),n.orientedBoundingBox=a.clone(r.orientedBoundingBox,n.orientedBoundingBox),n.tileBoundingBox=new p({rectangle:i.rectangle,minimumHeight:r.minimumHeight,maximumHeight:r.maximumHeight,ellipsoid:i.tilingScheme.ellipsoid}),i.data.occludeePointInScaledSpace=t.clone(r.occludeePointInScaledSpace,n.occludeePointInScaledSpace)},m.prototype.processLoadStateMachine=function(e,t,i,n,r){this.state===d.UNLOADED&&f(this,t,i,n,r),this.state===d.RECEIVED&&g(this,e,t,i,n,r),this.state===d.TRANSFORMED&&v(this,e.context,t,i,n,r)},m.prototype.processUpsampleStateMachine=function(e,t,i,r,o){if(this.state===d.UNLOADED){var a=this.upsampleDetails,s=a.data,l=a.x,u=a.y,c=a.level;if(this.data=s.upsample(t.tilingScheme,l,u,c,i,r,o),!n(this.data))return;this.state=d.RECEIVING;var p=this;h(this.data,function(e){p.data=e,p.state=d.RECEIVED},function(){p.state=d.FAILED})}this.state===d.RECEIVED&&g(this,e,t,i,r,o),this.state===d.TRANSFORMED&&v(this,e.context,t,i,r,o)},m}),define("Cesium/Scene/GlobeSurfaceTile",["../Core/BoundingSphere","../Core/Cartesian3","../Core/Cartesian4","../Core/Cartographic","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/IntersectionTests","../Core/PixelFormat","../Core/Rectangle","../Renderer/PixelDatatype","../Renderer/Sampler","../Renderer/Texture","../Renderer/TextureMagnificationFilter","../Renderer/TextureMinificationFilter","../Renderer/TextureWrap","./ImageryState","./QuadtreeTileLoadState","./SceneMode","./TerrainState","./TileBoundingBox","./TileTerrain"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g,v,_,y,C,w){"use strict";function E(){this.imagery=[],this.waterMaskTexture=void 0,this.waterMaskTranslationAndScale=new i(0,0,1,1),this.terrainData=void 0,this.center=new t,this.vertexArray=void 0,this.minimumHeight=0,this.maximumHeight=0,this.boundingSphere3D=new e,this.boundingSphere2D=new e,this.orientedBoundingBox=void 0,this.tileBoundingBox=void 0,this.occludeePointInScaledSpace=new t,this.loadedTerrain=void 0,this.upsampledTerrain=void 0,this.pickBoundingSphere=new e,this.pickTerrain=void 0,this.surfaceShader=void 0}function b(e,i,n,r,a,s){if(e.decodePosition(r,a,s),o(i)&&i!==_.SCENE3D){var l=n.ellipsoid,u=l.cartesianToCartographic(s);n.project(u,s),t.fromElements(s.z,s.x,s.y,s)}return s}function S(e,t,i){var n=e.data,r=x(e);o(r)&&(n.upsampledTerrain=new w(r)),M(e,t)&&(n.loadedTerrain=new w);for(var a=0,s=i.length;s>a;++a){var l=i.get(a);l.show&&l._createTileImagerySkeletons(e,t)}}function T(e,t,i,n){var a=e.data,s=a.loadedTerrain,l=a.upsampledTerrain,u=!1;o(s)&&(s.processLoadStateMachine(t,i,e.x,e.y,e.level),s.state>=y.RECEIVED&&(a.terrainData!==s.data&&(a.terrainData=s.data,I(t.context,a),P(e)),u=!0),s.state===y.READY?(s.publishToTile(e),o(e.data.vertexArray)&&n.push(e.data.vertexArray),e.data.vertexArray=s.vertexArray,s.vertexArray=void 0,a.pickTerrain=r(a.loadedTerrain,a.upsampledTerrain),a.loadedTerrain=void 0,a.upsampledTerrain=void 0):s.state===y.FAILED&&(a.loadedTerrain=void 0)),!u&&o(l)&&(l.processUpsampleStateMachine(t,i,e.x,e.y,e.level),l.state>=y.RECEIVED&&a.terrainData!==l.data&&(a.terrainData=l.data,i.hasWaterMask&&R(e),A(e)),l.state===y.READY?(l.publishToTile(e),o(e.data.vertexArray)&&n.push(e.data.vertexArray),e.data.vertexArray=l.vertexArray,l.vertexArray=void 0,a.pickTerrain=a.upsampledTerrain,a.upsampledTerrain=void 0):l.state===y.FAILED&&(a.upsampledTerrain=void 0))}function x(e){for(var t=e.parent;o(t)&&o(t.data)&&!o(t.data.terrainData);)t=t.parent;return o(t)&&o(t.data)?{data:t.data.terrainData,x:t.x,y:t.y,level:t.level}:void 0}function A(e){var t=e.data;if(o(e._children))for(var i=0;4>i;++i){var n=e._children[i];if(n.state!==v.START){var r=n.data;if(o(r.terrainData)&&!r.terrainData.wasCreatedByUpsampling())continue;o(r.upsampledTerrain)&&r.upsampledTerrain.freeResources(),r.upsampledTerrain=new w({data:t.terrainData,x:e.x,y:e.y,level:e.level}),n.state=v.LOADING}}}function P(e){var t=e.data;if(o(e.children))for(var i=0;4>i;++i){var n=e.children[i];if(n.state!==v.START){var r=n.data;if(o(r.terrainData)&&!r.terrainData.wasCreatedByUpsampling())continue;o(r.upsampledTerrain)&&r.upsampledTerrain.freeResources(),r.upsampledTerrain=new w({data:t.terrainData,x:e.x,y:e.y,level:e.level}),t.terrainData.isChildAvailable(e.x,e.y,n.x,n.y)&&(o(r.loadedTerrain)||(r.loadedTerrain=new w)),n.state=v.LOADING}}}function M(e,t){var i=t.getTileDataAvailable(e.x,e.y,e.level);if(o(i))return i;var n=e.parent;return o(n)?o(n.data)&&o(n.data.terrainData)?n.data.terrainData.isChildAvailable(n.x,n.y,e.x,e.y):!1:!0}function D(e){var t=e.cache.tile_waterMaskData;if(!o(t)){var i=new d({context:e,pixelFormat:l.LUMINANCE,pixelDatatype:c.UNSIGNED_BYTE,source:{arrayBufferView:new Uint8Array([255]),width:1,height:1}});i.referenceCount=1;var n=new h({wrapS:f.CLAMP_TO_EDGE,wrapT:f.CLAMP_TO_EDGE,minificationFilter:m.LINEAR,magnificationFilter:p.LINEAR});t={allWaterTexture:i,sampler:n,destroy:function(){this.allWaterTexture.destroy()}},e.cache.tile_waterMaskData=t}return t}function I(e,t){var n=t.waterMaskTexture;o(n)&&(--n.referenceCount,0===n.referenceCount&&n.destroy(),t.waterMaskTexture=void 0);var r=t.terrainData.waterMask;if(o(r)){var a,s=D(e),u=r.length;if(1===u){if(0===r[0])return;a=s.allWaterTexture}else{var h=Math.sqrt(u);a=new d({context:e,pixelFormat:l.LUMINANCE,pixelDatatype:c.UNSIGNED_BYTE,source:{width:h,height:h,arrayBufferView:r},sampler:s.sampler}),a.referenceCount=0}++a.referenceCount,t.waterMaskTexture=a,i.fromElements(0,0,1,1,t.waterMaskTranslationAndScale)}}function R(e){for(var t=e.data,i=e.parent;o(i)&&!o(i.data.terrainData)||i.data.terrainData.wasCreatedByUpsampling();)i=i.parent;if(o(i)&&o(i.data.waterMaskTexture)){t.waterMaskTexture=i.data.waterMaskTexture,++t.waterMaskTexture.referenceCount;var n=i.rectangle,r=e.rectangle,a=r.width,s=r.height,l=a/n.width,u=s/n.height;t.waterMaskTranslationAndScale.x=l*(r.west-n.west)/a,t.waterMaskTranslationAndScale.y=u*(r.south-n.south)/s,t.waterMaskTranslationAndScale.z=l,t.waterMaskTranslationAndScale.w=u}}a(E.prototype,{eligibleForUnloading:{get:function(){for(var e=this.loadedTerrain,t=o(e)&&(e.state===y.RECEIVING||e.state===y.TRANSFORMING),i=this.upsampledTerrain,n=o(i)&&(i.state===y.RECEIVING||i.state===y.TRANSFORMING),r=!t&&!n,a=this.imagery,s=0,l=a.length;r&&l>s;++s){var u=a[s];r=!o(u.loadingImagery)||u.loadingImagery.state!==g.TRANSITIONING}return r}}});var O=new t,L=new t,N=new t,F=new t;return E.prototype.pick=function(e,i,n,r,a){var l=this.pickTerrain;if(o(l)){var u=l.mesh;if(o(u))for(var c=u.vertices,h=u.indices,d=u.encoding,p=h.length,m=0;p>m;m+=3){var f=h[m],g=h[m+1],v=h[m+2],_=b(d,i,n,c,f,O),y=b(d,i,n,c,g,L),C=b(d,i,n,c,v,N),w=s.rayTriangle(e,_,y,C,r,F);if(o(w))return t.clone(w,a)}}},E.prototype.freeResources=function(){o(this.waterMaskTexture)&&(--this.waterMaskTexture.referenceCount,0===this.waterMaskTexture.referenceCount&&this.waterMaskTexture.destroy(),this.waterMaskTexture=void 0),this.terrainData=void 0,o(this.loadedTerrain)&&(this.loadedTerrain.freeResources(),this.loadedTerrain=void 0),o(this.upsampledTerrain)&&(this.upsampledTerrain.freeResources(),this.upsampledTerrain=void 0),o(this.pickTerrain)&&(this.pickTerrain.freeResources(),this.pickTerrain=void 0);var e,t,i=this.imagery;for(e=0,t=i.length;t>e;++e)i[e].freeResources();this.imagery.length=0,this.freeVertexArray()},E.prototype.freeVertexArray=function(){var e;o(this.vertexArray)&&(e=this.vertexArray.indexBuffer,this.vertexArray=this.vertexArray.destroy(),!e.isDestroyed()&&o(e.referenceCount)&&(--e.referenceCount,0===e.referenceCount&&e.destroy())),o(this.wireframeVertexArray)&&(e=this.wireframeVertexArray.indexBuffer,this.wireframeVertexArray=this.wireframeVertexArray.destroy(),!e.isDestroyed()&&o(e.referenceCount)&&(--e.referenceCount,0===e.referenceCount&&e.destroy()))},E.processStateMachine=function(e,t,i,n,r){var a=e.data;o(a)||(a=e.data=new E),e.state===v.START&&(S(e,i,n),e.state=v.LOADING),e.state===v.LOADING&&T(e,t,i,r);for(var s=o(a.vertexArray),l=!o(a.loadedTerrain)&&!o(a.upsampledTerrain),u=o(a.terrainData)&&a.terrainData.wasCreatedByUpsampling(),c=a.imagery,h=0,d=c.length;d>h;++h){var p=c[h];if(o(p.loadingImagery)){if(p.loadingImagery.state===g.PLACEHOLDER){var m=p.loadingImagery.imageryLayer;if(m.imageryProvider.ready){p.freeResources(),c.splice(h,1),m._createTileImagerySkeletons(e,i,h),--h,d=c.length;continue}u=!1}var f=p.processStateMachine(e,t);l=l&&f,s=s&&(f||o(p.readyImagery)),u=u&&o(p.loadingImagery)&&(p.loadingImagery.state===g.FAILED||p.loadingImagery.state===g.INVALID)}else u=!1}e.upsampledFromParent=u,h===d&&(s&&(e.renderable=!0),l&&(e.state=v.DONE))},E}),define("Cesium/Shaders/ReprojectWebMercatorFS",[],function(){"use strict";return"uniform sampler2D u_texture;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main()\n{\n gl_FragColor = texture2D(u_texture, v_textureCoordinates);\n}\n"}),define("Cesium/Shaders/ReprojectWebMercatorVS",[],function(){"use strict";return"attribute vec4 position;\nattribute float webMercatorT;\n\nuniform vec2 u_textureDimensions;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main()\n{\n v_textureCoordinates = vec2(position.x, webMercatorT);\n gl_Position = czm_viewportOrthographic * (position * vec4(u_textureDimensions, 1.0, 1.0));\n}\n"}),define("Cesium/Scene/Imagery",["../Core/defined","../Core/destroyObject","./ImageryState"],function(e,t,i){"use strict";function n(t,n,r,o,a){if(this.imageryLayer=t,this.x=n,this.y=r,this.level=o,0!==o){var s=n/2|0,l=r/2|0,u=o-1;this.parent=t.getImageryFromCache(s,l,u)}if(this.state=i.UNLOADED,this.imageUrl=void 0,this.image=void 0,this.texture=void 0,this.credits=void 0,this.referenceCount=0,!e(a)&&t.imageryProvider.ready){var c=t.imageryProvider.tilingScheme;a=c.tileXYToRectangle(n,r,o)}this.rectangle=a}return n.createPlaceholder=function(e){var t=new n(e,0,0,0);return t.addReference(),t.state=i.PLACEHOLDER,t},n.prototype.addReference=function(){++this.referenceCount},n.prototype.releaseReference=function(){return--this.referenceCount,0===this.referenceCount?(this.imageryLayer.removeImageryFromCache(this),e(this.parent)&&this.parent.releaseReference(),e(this.image)&&e(this.image.destroy)&&this.image.destroy(),e(this.texture)&&this.texture.destroy(),t(this),0):this.referenceCount},n.prototype.processStateMachine=function(e){this.state===i.UNLOADED&&(this.state=i.TRANSITIONING,this.imageryLayer._requestImagery(this)),this.state===i.RECEIVED&&(this.state=i.TRANSITIONING,this.imageryLayer._createTexture(e.context,this)),this.state===i.TEXTURE_LOADED&&(this.state=i.TRANSITIONING,this.imageryLayer._reprojectTexture(e,this))},n}),define("Cesium/Scene/TileImagery",["../Core/defined","./ImageryState"],function(e,t){"use strict";function i(e,t){this.readyImagery=void 0,this.loadingImagery=e,this.textureCoordinateRectangle=t,this.textureTranslationAndScale=void 0}return i.prototype.freeResources=function(){e(this.readyImagery)&&this.readyImagery.releaseReference(),e(this.loadingImagery)&&this.loadingImagery.releaseReference()},i.prototype.processStateMachine=function(i,n){var r=this.loadingImagery,o=r.imageryLayer;if(r.processStateMachine(n),r.state===t.READY)return e(this.readyImagery)&&this.readyImagery.releaseReference(),this.readyImagery=this.loadingImagery,this.loadingImagery=void 0,this.textureTranslationAndScale=o._calculateTextureTranslationAndScale(i,this),!0;for(var a,s=r.parent;e(s)&&s.state!==t.READY;)s.state!==t.FAILED&&s.state!==t.INVALID&&(a=a||s),s=s.parent;return this.readyImagery!==s&&(e(this.readyImagery)&&this.readyImagery.releaseReference(),this.readyImagery=s,e(s)&&(s.addReference(),this.textureTranslationAndScale=o._calculateTextureTranslationAndScale(i,this))),r.state===t.FAILED||r.state===t.INVALID?e(a)?(a.processStateMachine(n),!1):!0:!1},i}),define("Cesium/Scene/ImageryLayer",["../Core/BoundingRectangle","../Core/Cartesian2","../Core/Cartesian4","../Core/Color","../Core/ComponentDatatype","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/destroyObject","../Core/FeatureDetection","../Core/GeographicTilingScheme","../Core/IndexDatatype","../Core/Math","../Core/PixelFormat","../Core/PrimitiveType","../Core/Rectangle","../Core/TerrainProvider","../Core/TileProviderError","../Renderer/Buffer","../Renderer/BufferUsage","../Renderer/ClearCommand","../Renderer/ComputeCommand","../Renderer/ContextLimits","../Renderer/DrawCommand","../Renderer/Framebuffer","../Renderer/MipmapHint","../Renderer/RenderState","../Renderer/Sampler","../Renderer/ShaderProgram","../Renderer/ShaderSource","../Renderer/Texture","../Renderer/TextureMagnificationFilter","../Renderer/TextureMinificationFilter","../Renderer/TextureWrap","../Renderer/VertexArray","../Shaders/ReprojectWebMercatorFS","../Shaders/ReprojectWebMercatorVS","../ThirdParty/when","./Imagery","./ImageryState","./TileImagery"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g,v,_,y,C,w,E,b,S,T,x,A,P,M,D,I,R,O,L,N,F,k,B,z,V){ +"use strict";function U(e,t){this._imageryProvider=e,t=o(t,{}),this.alpha=o(t.alpha,o(e.defaultAlpha,1)),this.brightness=o(t.brightness,o(e.defaultBrightness,U.DEFAULT_BRIGHTNESS)),this.contrast=o(t.contrast,o(e.defaultContrast,U.DEFAULT_CONTRAST)),this.hue=o(t.hue,o(e.defaultHue,U.DEFAULT_HUE)),this.saturation=o(t.saturation,o(e.defaultSaturation,U.DEFAULT_SATURATION)),this.gamma=o(t.gamma,o(e.defaultGamma,U.DEFAULT_GAMMA)),this.show=o(t.show,!0),this._minimumTerrainLevel=t.minimumTerrainLevel,this._maximumTerrainLevel=t.maximumTerrainLevel,this._rectangle=o(t.rectangle,f.MAX_VALUE),this._maximumAnisotropy=t.maximumAnisotropy,this._imageryCache={},this._skeletonPlaceholder=new V(B.createPlaceholder(this)),this._show=!0,this._layerIndex=-1,this._isBaseLayer=!1,this._requestImageError=void 0,this._reprojectComputeCommands=[]}function G(e,t,i,n){if(d.isPowerOfTwo(n.width)&&d.isPowerOfTwo(n.height)){var r=t.cache.imageryLayer_mipmapSampler;if(!a(r)){var s=E.maximumTextureFilterAnisotropy;r=t.cache.imageryLayer_mipmapSampler=new A({wrapS:O.CLAMP_TO_EDGE,wrapT:O.CLAMP_TO_EDGE,minificationFilter:R.LINEAR_MIPMAP_LINEAR,magnificationFilter:I.LINEAR,maximumAnisotropy:Math.min(s,o(e._maximumAnisotropy,s))})}n.generateMipmap(T.NICEST),n.sampler=r}else{var l=t.cache.imageryLayer_nonMipmapSampler;a(l)||(l=t.cache.imageryLayer_nonMipmapSampler=new A({wrapS:O.CLAMP_TO_EDGE,wrapT:O.CLAMP_TO_EDGE,minificationFilter:R.LINEAR,magnificationFilter:I.LINEAR})),n.sampler=l}i.state=z.READY}function W(e,t,i){return JSON.stringify([e,t,i])}function H(e,t,i,n){var r=t.cache.imageryLayer_reproject;if(!a(r)){r=t.cache.imageryLayer_reproject={vertexArray:void 0,shaderProgram:void 0,sampler:void 0,destroy:function(){a(this.framebuffer)&&this.framebuffer.destroy(),a(this.vertexArray)&&this.vertexArray.destroy(),a(this.shaderProgram)&&this.shaderProgram.destroy()}};for(var o=new Float32Array(256),s=0,l=0;64>l;++l){var u=l/63;o[s++]=0,o[s++]=u,o[s++]=1,o[s++]=u}var c={position:0,webMercatorT:1},p=g.getRegularGridIndices(2,64),m=_.createIndexBuffer({context:t,typedArray:p,usage:y.STATIC_DRAW,indexDatatype:h.UNSIGNED_SHORT});r.vertexArray=new L({context:t,attributes:[{index:c.position,vertexBuffer:_.createVertexBuffer({context:t,typedArray:o,usage:y.STATIC_DRAW}),componentsPerAttribute:2},{index:c.webMercatorT,vertexBuffer:_.createVertexBuffer({context:t,sizeInBytes:512,usage:y.STREAM_DRAW}),componentsPerAttribute:1}],indexBuffer:m});var f=new M({sources:[F]});r.shaderProgram=P.fromCache({context:t,vertexShaderSource:f,fragmentShaderSource:N,attributeLocations:c}),r.sampler=new A({wrapS:O.CLAMP_TO_EDGE,wrapT:O.CLAMP_TO_EDGE,minificationFilter:R.LINEAR,magnificationFilter:I.LINEAR})}i.sampler=r.sampler;var v=i.width,C=i.height;Z.textureDimensions.x=v,Z.textureDimensions.y=C,Z.texture=i;var w=Math.sin(n.south),E=.5*Math.log((1+w)/(1-w));w=Math.sin(n.north);var b=.5*Math.log((1+w)/(1-w)),S=1/(b-E),x=new D({context:t,width:v,height:C,pixelFormat:i.pixelFormat,pixelDatatype:i.pixelDatatype,preMultiplyAlpha:i.preMultiplyAlpha});d.isPowerOfTwo(v)&&d.isPowerOfTwo(C)&&x.generateMipmap(T.NICEST);for(var k=n.south,B=n.north,z=K,V=0,U=0;64>U;++U){var G=U/63,W=d.lerp(k,B,G);w=Math.sin(W);var H=.5*Math.log((1+w)/(1-w)),q=(H-E)*S;z[V++]=q,z[V++]=q}r.vertexArray.getAttribute(1).vertexBuffer.copyFromArrayView(z),e.shaderProgram=r.shaderProgram,e.outputTexture=x,e.uniformMap=Z,e.vertexArray=r.vertexArray}function q(e,t,i){var n=e._imageryProvider,r=n.tilingScheme,o=r.ellipsoid,a=e._imageryProvider.tilingScheme instanceof c?1:Math.cos(i),s=r.rectangle,l=o.maximumRadius*s.width*a/(n.tileWidth*r.getNumberOfXTilesAtLevel(0)),u=l/t,h=Math.log(u)/Math.log(2),d=Math.round(h);return 0|d}s(U.prototype,{imageryProvider:{get:function(){return this._imageryProvider}},rectangle:{get:function(){return this._rectangle}}}),U.DEFAULT_BRIGHTNESS=1,U.DEFAULT_CONTRAST=1,U.DEFAULT_HUE=0,U.DEFAULT_SATURATION=1,U.DEFAULT_GAMMA=1,U.prototype.isBaseLayer=function(){return this._isBaseLayer},U.prototype.isDestroyed=function(){return!1},U.prototype.destroy=function(){return l(this)};var j=new f,Y=new f,X=new f;U.prototype.getViewableRectangle=function(){var e=this._imageryProvider,t=this._rectangle;return e.readyPromise.then(function(){return f.intersection(e.rectangle,t)})},U.prototype._createTileImagerySkeletons=function(e,t,n){var r=e.data;if(a(this._minimumTerrainLevel)&&e.level<this._minimumTerrainLevel)return!1;if(a(this._maximumTerrainLevel)&&e.level>this._maximumTerrainLevel)return!1;var o=this._imageryProvider;if(a(n)||(n=r.imagery.length),!o.ready)return this._skeletonPlaceholder.loadingImagery.addReference(),r.imagery.splice(n,0,this._skeletonPlaceholder),!0;var s=f.intersection(o.rectangle,this._rectangle,j),l=f.intersection(e.rectangle,s,Y);if(!a(l)){if(!this.isBaseLayer())return!1;var u=s,c=e.rectangle;l=Y,c.south>=u.north?l.north=l.south=u.north:c.north<=u.south?l.north=l.south=u.south:(l.south=Math.max(c.south,u.south),l.north=Math.min(c.north,u.north)),c.west>=u.east?l.west=l.east=u.east:c.east<=u.west?l.west=l.east=u.west:(l.west=Math.max(c.west,u.west),l.east=Math.min(c.east,u.east))}var h=0;l.south>0?h=l.south:l.north<0&&(h=l.north);var d=1,p=d*t.getLevelMaximumGeometricError(e.level),m=q(this,p,h);m=Math.max(0,m);var g=o.maximumLevel;if(m>g&&(m=g),a(o.minimumLevel)){var v=o.minimumLevel;v>m&&(m=v)}var _=o.tilingScheme,y=_.positionToTileXY(f.northwest(l),m),C=_.positionToTileXY(f.southeast(l),m),w=e.rectangle.height/512,E=e.rectangle.width/512,b=_.tileXYToRectangle(y.x,y.y,m);Math.abs(b.south-e.rectangle.north)<E&&y.y<C.y&&++y.y,Math.abs(b.east-e.rectangle.west)<w&&y.x<C.x&&++y.x;var S=_.tileXYToRectangle(C.x,C.y,m);Math.abs(S.north-e.rectangle.south)<E&&C.y>y.y&&--C.y,Math.abs(S.west-e.rectangle.east)<w&&C.x>y.x&&--C.x;var T,x,A=e.rectangle,P=_.tileXYToRectangle(y.x,y.y,m),M=f.intersection(P,s,X),D=0,I=1;!this.isBaseLayer()&&Math.abs(M.west-e.rectangle.west)>=w&&(D=Math.min(1,(M.west-A.west)/A.width)),!this.isBaseLayer()&&Math.abs(M.north-e.rectangle.north)>=E&&(I=Math.max(0,(M.north-A.south)/A.height));for(var R=I,O=y.x;O<=C.x;O++){T=D,P=_.tileXYToRectangle(O,y.y,m),M=f.intersection(P,s,X),D=Math.min(1,(M.east-A.west)/A.width),O===C.x&&(this.isBaseLayer()||Math.abs(M.east-e.rectangle.east)<w)&&(D=1),I=R;for(var L=y.y;L<=C.y;L++){x=I,P=_.tileXYToRectangle(O,L,m),M=f.intersection(P,s,X),I=Math.max(0,(M.south-A.south)/A.height),L===C.y&&(this.isBaseLayer()||Math.abs(M.south-e.rectangle.south)<E)&&(I=0);var N=new i(T,I,D,x),F=this.getImageryFromCache(O,L,m,P);r.imagery.splice(n,0,new V(F,N)),++n}}return!0},U.prototype._calculateTextureTranslationAndScale=function(e,t){var n=t.readyImagery.rectangle,r=e.rectangle,o=r.width,a=r.height,s=o/n.width,l=a/n.height;return new i(s*(r.west-n.west)/o,l*(r.south-n.south)/a,s,l)},U.prototype._requestImagery=function(e){function t(t){return a(t)?(e.image=t,e.state=z.RECEIVED,void v.handleSuccess(o._requestImageError)):i()}function i(t){e.state=z.FAILED;var i="Failed to obtain image tile X: "+e.x+" Y: "+e.y+" Level: "+e.level+".";o._requestImageError=v.handleError(o._requestImageError,r,r.errorEvent,i,e.x,e.y,e.level,n,t)}function n(){e.state=z.TRANSITIONING;var n=r.requestImage(e.x,e.y,e.level);return a(n)?(a(r.getTileCredits)&&(e.credits=r.getTileCredits(e.x,e.y,e.level)),void k(n,t,i)):void(e.state=z.UNLOADED)}var r=this._imageryProvider,o=this;n()},U.prototype._createTexture=function(e,t){var i=this._imageryProvider;if(a(i.tileDiscardPolicy)){var n=i.tileDiscardPolicy;if(a(n)){if(!n.isReady())return void(t.state=z.RECEIVED);if(n.shouldDiscardImage(t.image))return void(t.state=z.INVALID)}}var r=new D({context:e,source:t.image,pixelFormat:i.hasAlphaChannel?p.RGBA:p.RGB});t.texture=r,t.image=void 0,t.state=z.TEXTURE_LOADED},U.prototype._reprojectTexture=function(e,t){var i=t.texture,n=t.rectangle,r=e.context;if(!(this._imageryProvider.tilingScheme instanceof c)&&n.width/i.width>1e-5){var o=this,a=new w({persists:!0,owner:this,preExecute:function(e){H(e,r,i,t.rectangle)},postExecute:function(e){i.destroy(),t.texture=e,G(o,r,t,e)}});this._reprojectComputeCommands.push(a)}else G(this,r,t,i)},U.prototype.queueReprojectionCommands=function(e){for(var t=this._reprojectComputeCommands,i=t.length,n=0;i>n;++n)e.commandList.push(t[n]);t.length=0},U.prototype.cancelReprojections=function(){this._reprojectComputeCommands.length=0},U.prototype.getImageryFromCache=function(e,t,i,n){var r=W(e,t,i),o=this._imageryCache[r];return a(o)||(o=new B(this,e,t,i,n),this._imageryCache[r]=o),o.addReference(),o},U.prototype.removeImageryFromCache=function(e){var t=W(e.x,e.y,e.level);delete this._imageryCache[t]};var Z={u_textureDimensions:function(){return this.textureDimensions},u_texture:function(){return this.texture},textureDimensions:new t,texture:void 0},K=u.supportsTypedArrays()?new Float32Array(128):void 0;return U}),define("Cesium/Scene/GlobeSurfaceTileProvider",["../Core/BoundingSphere","../Core/BoxOutlineGeometry","../Core/Cartesian2","../Core/Cartesian3","../Core/Cartesian4","../Core/Color","../Core/ColorGeometryInstanceAttribute","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/destroyObject","../Core/DeveloperError","../Core/Event","../Core/FeatureDetection","../Core/GeometryInstance","../Core/GeometryPipeline","../Core/IndexDatatype","../Core/Intersect","../Core/Math","../Core/Matrix4","../Core/OrientedBoundingBox","../Core/PrimitiveType","../Core/Rectangle","../Core/SphereOutlineGeometry","../Core/TerrainQuantization","../Core/Visibility","../Core/WebMercatorProjection","../Renderer/Buffer","../Renderer/BufferUsage","../Renderer/ContextLimits","../Renderer/DrawCommand","../Renderer/RenderState","../Renderer/VertexArray","../Scene/BlendingState","../Scene/DepthFunction","../Scene/Pass","../Scene/PerInstanceColorAppearance","../Scene/Primitive","../ThirdParty/when","./GlobeSurfaceTile","./ImageryLayer","./ImageryState","./QuadtreeTileLoadState","./SceneMode"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g,v,_,y,C,w,E,b,S,T,x,A,P,M,D,I,R,O,L,N,F,k,B,z,V,U,G,W){"use strict";function H(e){this.lightingFadeOutDistance=65e5,this.lightingFadeInDistance=9e6,this.hasWaterMask=!1,this.oceanNormalMap=void 0,this.zoomedOutOceanSpecularIntensity=.5,this.enableLighting=!1,this.castShadows=!1,this.receiveShadows=!1,this._quadtree=void 0,this._terrainProvider=e.terrainProvider,this._imageryLayers=e.imageryLayers,this._surfaceShaderSet=e.surfaceShaderSet,this._renderState=void 0,this._blendRenderState=void 0,this._pickRenderState=void 0,this._errorEvent=new d,this._imageryLayers.layerAdded.addEventListener(H.prototype._onLayerAdded,this),this._imageryLayers.layerRemoved.addEventListener(H.prototype._onLayerRemoved,this),this._imageryLayers.layerMoved.addEventListener(H.prototype._onLayerMoved,this),this._imageryLayers.layerShownOrHidden.addEventListener(H.prototype._onLayerShownOrHidden,this),this._layerOrderChanged=!1,this._tilesToRenderByTextureCount=[],this._drawCommands=[],this._uniformMaps=[],this._pickCommands=[],this._usedDrawCommands=0,this._usedPickCommands=0,this._vertexArraysToDestroy=[],this._debug={wireframe:!1,boundingSphereTile:void 0},this._baseColor=void 0,this._firstPassInitialColor=void 0,this.baseColor=new o(0,0,.5,1)}function q(e,t){var i=e.loadingImagery;l(i)||(i=e.readyImagery);var n=t.loadingImagery;return l(n)||(n=t.readyImagery),i.imageryLayer._layerIndex-n.imageryLayer._layerIndex}function j(e){var t=e.indexBuffer;e.destroy(),!t.isDestroyed()&&l(t.referenceCount)&&(--t.referenceCount,0===t.referenceCount&&t.destroy())}function Y(e){var t={u_initialColor:function(){return this.properties.initialColor},u_zoomedOutOceanSpecularIntensity:function(){return this.properties.zoomedOutOceanSpecularIntensity},u_oceanNormalMap:function(){return this.properties.oceanNormalMap},u_lightingFadeDistance:function(){return this.properties.lightingFadeDistance},u_center3D:function(){return this.properties.center3D},u_tileRectangle:function(){return this.properties.tileRectangle},u_modifiedModelView:function(){var t=e.context.uniformState.view,i=y.multiplyByPoint(t,this.properties.rtc,ne);return y.setTranslation(t,i,$),$},u_modifiedModelViewProjection:function(){var t=e.context.uniformState.view,i=e.context.uniformState.projection,n=y.multiplyByPoint(t,this.properties.rtc,ne);return y.setTranslation(t,n,ee),y.multiply(i,ee,ee),ee},u_dayTextures:function(){return this.properties.dayTextures},u_dayTextureTranslationAndScale:function(){return this.properties.dayTextureTranslationAndScale},u_dayTextureTexCoordsRectangle:function(){return this.properties.dayTextureTexCoordsRectangle},u_dayTextureAlpha:function(){return this.properties.dayTextureAlpha},u_dayTextureBrightness:function(){return this.properties.dayTextureBrightness},u_dayTextureContrast:function(){return this.properties.dayTextureContrast},u_dayTextureHue:function(){return this.properties.dayTextureHue},u_dayTextureSaturation:function(){return this.properties.dayTextureSaturation},u_dayTextureOneOverGamma:function(){return this.properties.dayTextureOneOverGamma},u_dayIntensity:function(){return this.properties.dayIntensity},u_southAndNorthLatitude:function(){return this.properties.southAndNorthLatitude},u_southMercatorYAndOneOverHeight:function(){return this.properties.southMercatorYAndOneOverHeight},u_waterMask:function(){return this.properties.waterMask},u_waterMaskTranslationAndScale:function(){return this.properties.waterMaskTranslationAndScale},u_minMaxHeight:function(){return this.properties.minMaxHeight},u_scaleAndBias:function(){return this.properties.scaleAndBias},properties:{initialColor:new r(0,0,.5,1),zoomedOutOceanSpecularIntensity:.5,oceanNormalMap:void 0,lightingFadeDistance:new i(65e5,9e6),center3D:void 0,rtc:new n,modifiedModelView:new y,tileRectangle:new r,dayTextures:[],dayTextureTranslationAndScale:[],dayTextureTexCoordsRectangle:[],dayTextureAlpha:[],dayTextureBrightness:[],dayTextureContrast:[],dayTextureHue:[],dayTextureSaturation:[],dayTextureOneOverGamma:[],dayIntensity:0,southAndNorthLatitude:new i,southMercatorYAndOneOverHeight:new i,waterMask:void 0,waterMaskTranslationAndScale:new r,minMaxHeight:new i,scaleAndBias:new y}};return t}function X(e,t,i){var n=i.data;l(n.wireframeVertexArray)||l(n.terrainData)&&l(n.terrainData._mesh)&&(n.wireframeVertexArray=Z(e,n.vertexArray,n.terrainData._mesh))}function Z(e,t,i){var n={indices:i.indices,primitiveType:w.TRIANGLES};f.toWireframe(n);var r=n.indices,o=A.createIndexBuffer({context:e,typedArray:r,usage:P.STATIC_DRAW,indexDatatype:g.UNSIGNED_SHORT});return new R({context:e,attributes:t._attributes,indexBuffer:o})}function K(t,i,a){var s=i.data,u=M.maximumTextureImageUnits,c=s.waterMaskTexture,h=t.hasWaterMask&&l(c),d=t.oceanNormalMap,p=h&&l(d),m=t.terrainProvider.ready&&t.terrainProvider.hasVertexNormals,f=a.fog.enabled,g=t.castShadows,v=t.receiveShadows;h&&--u,p&&--u;var b=s.center,T=s.pickTerrain.mesh.encoding,A=te,P=0,I=0,R=0,O=0,L=!1;if(a.mode!==W.SCENE3D){var F=a.mapProjection,k=F.project(E.southwest(i.rectangle),re),B=F.project(E.northeast(i.rectangle),oe);if(A.x=k.x,A.y=k.y,A.z=B.x,A.w=B.y,a.mode!==W.MORPHING&&(b=ie,b.x=0,b.y=.5*(A.z+A.x),b.z=.5*(A.w+A.y),A.x-=b.y,A.y-=b.z,A.z-=b.y,A.w-=b.z),a.mode===W.SCENE2D&&T.quantization===S.BITS12){var z=1/(Math.pow(2,12)-1)*.5,G=(A.z-A.x)*z,H=(A.w-A.y)*z;A.x-=G,A.y-=H,A.z+=G,A.w+=H}F instanceof x&&(P=i.rectangle.south,I=i.rectangle.north,R=x.geodeticLatitudeToMercatorAngle(P),O=1/(x.geodeticLatitudeToMercatorAngle(I)-R),L=!0)}var q=s.imagery,j=0,Z=q.length,K=t._renderState,J=t._blendRenderState,Q=K,$=t._firstPassInitialColor,ee=a.context;l(t._debug.boundingSphereTile)||le();do{var ne,ce,he=0;t._drawCommands.length<=t._usedDrawCommands?(ne=new D,ne.owner=i,ne.cull=!1,ne.boundingVolume=new e,ne.orientedBoundingBox=void 0,ce=Y(a),t._drawCommands.push(ne),t._uniformMaps.push(ce)):(ne=t._drawCommands[t._usedDrawCommands],ce=t._uniformMaps[t._usedDrawCommands]),ne.owner=i,++t._usedDrawCommands,i===t._debug.boundingSphereTile&&(l(s.orientedBoundingBox)?ae(s.orientedBoundingBox,o.RED).update(a):l(s.boundingSphere3D)&&se(s.boundingSphere3D,o.RED).update(a));var de=ce.properties;r.clone($,de.initialColor),de.oceanNormalMap=d,de.lightingFadeDistance.x=t.lightingFadeOutDistance,de.lightingFadeDistance.y=t.lightingFadeInDistance,de.zoomedOutOceanSpecularIntensity=t.zoomedOutOceanSpecularIntensity,de.center3D=s.center,n.clone(b,de.rtc),r.clone(A,de.tileRectangle),de.southAndNorthLatitude.x=P,de.southAndNorthLatitude.y=I,de.southMercatorYAndOneOverHeight.x=R,de.southMercatorYAndOneOverHeight.y=O;for(var pe=f&&_.fog(i._distance,a.fog.density)>_.EPSILON3,me=!1,fe=!1,ge=!1,ve=!1,_e=!1,ye=!1;u>he&&Z>j;){var Ce=q[j],we=Ce.readyImagery;if(++j,l(we)&&we.state===U.READY&&0!==we.imageryLayer.alpha){var Ee=we.imageryLayer;if(l(Ce.textureTranslationAndScale)||(Ce.textureTranslationAndScale=Ee._calculateTextureTranslationAndScale(i,Ce)),de.dayTextures[he]=we.texture,de.dayTextureTranslationAndScale[he]=Ce.textureTranslationAndScale,de.dayTextureTexCoordsRectangle[he]=Ce.textureCoordinateRectangle,de.dayTextureAlpha[he]=Ee.alpha,ye=ye||1!==de.dayTextureAlpha[he],de.dayTextureBrightness[he]=Ee.brightness,me=me||de.dayTextureBrightness[he]!==V.DEFAULT_BRIGHTNESS,de.dayTextureContrast[he]=Ee.contrast,fe=fe||de.dayTextureContrast[he]!==V.DEFAULT_CONTRAST,de.dayTextureHue[he]=Ee.hue,ge=ge||de.dayTextureHue[he]!==V.DEFAULT_HUE,de.dayTextureSaturation[he]=Ee.saturation,ve=ve||de.dayTextureSaturation[he]!==V.DEFAULT_SATURATION,de.dayTextureOneOverGamma[he]=1/Ee.gamma,_e=_e||de.dayTextureOneOverGamma[he]!==1/V.DEFAULT_GAMMA,l(we.credits))for(var be=a.creditDisplay,Se=we.credits,Te=0,xe=Se.length;xe>Te;++Te)be.addCredit(Se[Te]);++he}}de.dayTextures.length=he,de.waterMask=c,r.clone(s.waterMaskTranslationAndScale,de.waterMaskTranslationAndScale),de.minMaxHeight.x=T.minimumHeight,de.minMaxHeight.y=T.maximumHeight,y.clone(T.matrix,de.scaleAndBias),ne.shaderProgram=t._surfaceShaderSet.getShaderProgram(a,s,he,me,fe,ge,ve,_e,ye,h,p,t.enableLighting,m,L,pe),ne.castShadows=g,ne.receiveShadows=v,ne.renderState=Q,ne.primitiveType=w.TRIANGLES,ne.vertexArray=s.vertexArray,ne.uniformMap=ce,ne.pass=N.GLOBE,t._debug.wireframe&&(X(ee,t,i),l(s.wireframeVertexArray)&&(ne.vertexArray=s.wireframeVertexArray,ne.primitiveType=w.LINES));var Ae=ne.boundingVolume,Pe=ne.orientedBoundingBox;a.mode!==W.SCENE3D?(e.fromRectangleWithHeights2D(i.rectangle,a.mapProjection,s.minimumHeight,s.maximumHeight,Ae),n.fromElements(Ae.center.z,Ae.center.x,Ae.center.y,Ae.center),a.mode===W.MORPHING&&(Ae=e.union(s.boundingSphere3D,Ae,Ae))):(ne.boundingVolume=e.clone(s.boundingSphere3D,Ae),ne.orientedBoundingBox=C.clone(s.orientedBoundingBox,Pe)),a.commandList.push(ne),Q=J,$=ue}while(Z>j)}function J(e,t,i){var n;e._pickCommands.length<=e._usedPickCommands?(n=new D,n.cull=!1,e._pickCommands.push(n)):n=e._pickCommands[e._usedPickCommands],++e._usedPickCommands;var r=t.owner.data,o=i.projection instanceof x;n.shaderProgram=e._surfaceShaderSet.getPickShaderProgram(i,r,o),n.renderState=e._pickRenderState,n.owner=t.owner,n.primitiveType=t.primitiveType,n.vertexArray=t.vertexArray,n.uniformMap=t.uniformMap,n.boundingVolume=t.boundingVolume,n.orientedBoundingBox=t.orientedBoundingBox,n.pass=t.pass,i.commandList.push(n)}u(H.prototype,{baseColor:{get:function(){return this._baseColor},set:function(e){this._baseColor=e,this._firstPassInitialColor=r.fromColor(e,this._firstPassInitialColor)}},quadtree:{get:function(){return this._quadtree},set:function(e){this._quadtree=e}},ready:{get:function(){return this._terrainProvider.ready&&(0===this._imageryLayers.length||this._imageryLayers.get(0).imageryProvider.ready)}},tilingScheme:{get:function(){return this._terrainProvider.tilingScheme}},errorEvent:{get:function(){return this._errorEvent}},terrainProvider:{get:function(){return this._terrainProvider},set:function(e){this._terrainProvider!==e&&(this._terrainProvider=e,l(this._quadtree)&&this._quadtree.invalidateAllTiles())}}}),H.prototype.initialize=function(e){var t=this._imageryLayers;t._update(),t.queueReprojectionCommands(e),this._layerOrderChanged&&(this._layerOrderChanged=!1,this._quadtree.forEachLoadedTile(function(e){e.data.imagery.sort(q)}));var i=e.creditDisplay;this._terrainProvider.ready&&l(this._terrainProvider.credit)&&i.addCredit(this._terrainProvider.credit);for(var n=0,r=t.length;r>n;++n){var o=t.get(n).imageryProvider;o.ready&&l(o.credit)&&i.addCredit(o.credit)}for(var a=this._vertexArraysToDestroy,s=a.length,u=0;s>u;++u)j(a[u]);a.length=0},H.prototype.beginUpdate=function(e){for(var t=this._tilesToRenderByTextureCount,i=0,n=t.length;n>i;++i){var r=t[i];l(r)&&(r.length=0)}this._usedDrawCommands=0},H.prototype.endUpdate=function(e){l(this._renderState)||(this._renderState=I.fromCache({cull:{enabled:!0},depthTest:{enabled:!0,func:L.LESS}}),this._blendRenderState=I.fromCache({cull:{enabled:!0},depthTest:{enabled:!0,func:L.LESS_OR_EQUAL},blending:O.ALPHA_BLEND}));for(var t=this._tilesToRenderByTextureCount,i=0,n=t.length;n>i;++i){var r=t[i];if(l(r))for(var o=0,a=r.length;a>o;++o)K(this,r[o],e)}},H.prototype.updateForPick=function(e){l(this._pickRenderState)||(this._pickRenderState=I.fromCache({colorMask:{red:!1,green:!1,blue:!1,alpha:!1},depthTest:{enabled:!0}})),this._usedPickCommands=0;for(var t=this._drawCommands,i=0,n=this._usedDrawCommands;n>i;++i)J(this,t[i],e)},H.prototype.cancelReprojections=function(){this._imageryLayers.cancelReprojections()},H.prototype.getLevelMaximumGeometricError=function(e){return this._terrainProvider.getLevelMaximumGeometricError(e)},H.prototype.loadTile=function(e,t){z.processStateMachine(t,e,this._terrainProvider,this._imageryLayers,this._vertexArraysToDestroy)};var Q=new e;H.prototype.computeTileVisibility=function(t,i,r){var o=this.computeDistanceToTile(t,i);if(t._distance=o,i.fog.enabled&&_.fog(o,i.fog.density)>=1)return T.NONE;var a=t.data,u=i.cullingVolume,c=s(a.orientedBoundingBox,a.boundingSphere3D);i.mode!==W.SCENE3D&&(c=Q,e.fromRectangleWithHeights2D(t.rectangle,i.mapProjection,a.minimumHeight,a.maximumHeight,c),n.fromElements(c.center.z,c.center.x,c.center.y,c.center),i.mode===W.MORPHING&&(c=e.union(a.boundingSphere3D,c,c)));var h=u.computeVisibility(c);if(h===v.OUTSIDE)return T.NONE;if(i.mode===W.SCENE3D){var d=a.occludeePointInScaledSpace;return l(d)?r.ellipsoid.isScaledSpacePointVisible(d)?h:T.NONE:h}return h};var $=new y,ee=new y,te=new r,ie=new n,ne=new n,re=new n,oe=new n;H.prototype.showTileThisFrame=function(e,t){for(var i=0,n=e.data.imagery,r=0,o=n.length;o>r;++r){var a=n[r];l(a.readyImagery)&&0!==a.readyImagery.imageryLayer.alpha&&++i}var s=this._tilesToRenderByTextureCount[i];l(s)||(s=[],this._tilesToRenderByTextureCount[i]=s),s.push(e);var u=this._debug;++u.tilesRendered,u.texturesRendered+=i},H.prototype.computeDistanceToTile=function(e,t){var i=e.data,n=i.tileBoundingBox;return n.distanceToCamera(t)},H.prototype.isDestroyed=function(){return!1},H.prototype.destroy=function(){return this._tileProvider=this._tileProvider&&this._tileProvider.destroy(),c(this)},H.prototype._onLayerAdded=function(e,t){if(e.show){var i=this._terrainProvider;this._quadtree.forEachLoadedTile(function(t){e._createTileImagerySkeletons(t,i)&&(t.state=G.LOADING)}),this._layerOrderChanged=!0}},H.prototype._onLayerRemoved=function(e,t){this._quadtree.forEachLoadedTile(function(t){for(var i=t.data.imagery,n=-1,r=0,o=0,a=i.length;a>o;++o){var s=i[o],u=s.loadingImagery;if(l(u)||(u=s.readyImagery),u.imageryLayer===e)-1===n&&(n=o),s.freeResources(),++r;else if(-1!==n)break}-1!==n&&i.splice(n,r)})},H.prototype._onLayerMoved=function(e,t,i){this._layerOrderChanged=!0},H.prototype._onLayerShownOrHidden=function(e,t,i){i?this._onLayerAdded(e,t):this._onLayerRemoved(e,t)};var ae,se,le;!function(){function e(e){return new k({geometryInstances:e,appearance:new F({translucent:!1,flat:!0}),asynchronous:!1})}var i,r,o=new m({geometry:t.fromDimensions({dimensions:new n(2,2,2)})}),s=new m({geometry:new b({radius:1})}),u=new y;ae=function(t,n){return t===i?r:(le(),i=t,u=y.fromRotationTranslation(t.halfAxes,t.center,u),o.modelMatrix=u,o.attributes.color=a.fromColor(n),r=e(o))},se=function(t,n){return t===i?r:(le(),i=t,u=y.fromTranslation(t.center,u),u=y.multiplyByUniformScale(u,t.radius,u),s.modelMatrix=u,s.attributes.color=a.fromColor(n),r=e(s))},le=function(){l(r)&&(r.destroy(),r=void 0,i=void 0)}}();var ue=new r(0,0,0,0);return H}),define("Cesium/Scene/ImageryLayerCollection",["../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/destroyObject","../Core/DeveloperError","../Core/Event","../Core/Math","../Core/Rectangle","../ThirdParty/when","./ImageryLayer"],function(e,t,i,n,r,o,a,s,l,u){"use strict";function c(){this._layers=[],this.layerAdded=new o,this.layerRemoved=new o,this.layerMoved=new o,this.layerShownOrHidden=new o}function h(e,t){var i=e.indexOf(t);return i}function d(e,t,i){var n=e._layers;if(t=a.clamp(t,0,n.length-1),i=a.clamp(i,0,n.length-1),t!==i){var r=n[t];n[t]=n[i],n[i]=r,e._update(),e.layerMoved.raiseEvent(r,i,t)}}i(c.prototype,{length:{get:function(){return this._layers.length}}}),c.prototype.add=function(e,i){var n=t(i);n?this._layers.splice(i,0,e):(i=this._layers.length,this._layers.push(e)),this._update(),this.layerAdded.raiseEvent(e,i)},c.prototype.addImageryProvider=function(e,t){var i=new u(e);return this.add(i,t),i},c.prototype.remove=function(t,i){i=e(i,!0);var n=this._layers.indexOf(t);return-1!==n?(this._layers.splice(n,1),this._update(),this.layerRemoved.raiseEvent(t,n),i&&t.destroy(),!0):!1},c.prototype.removeAll=function(t){t=e(t,!0);for(var i=this._layers,n=0,r=i.length;r>n;n++){var o=i[n];this.layerRemoved.raiseEvent(o,n),t&&o.destroy()}this._layers=[]},c.prototype.contains=function(e){return-1!==this.indexOf(e)},c.prototype.indexOf=function(e){return this._layers.indexOf(e)},c.prototype.get=function(e){return this._layers[e]},c.prototype.raise=function(e){var t=h(this._layers,e);d(this,t,t+1)},c.prototype.lower=function(e){var t=h(this._layers,e);d(this,t,t-1)},c.prototype.raiseToTop=function(e){var t=h(this._layers,e);t!==this._layers.length-1&&(this._layers.splice(t,1),this._layers.push(e),this._update(),this.layerMoved.raiseEvent(e,this._layers.length-1,t))},c.prototype.lowerToBottom=function(e){var t=h(this._layers,e);0!==t&&(this._layers.splice(t,1),this._layers.splice(0,0,e),this._update(),this.layerMoved.raiseEvent(e,0,t))};var p=new s;return c.prototype.pickImageryLayerFeatures=function(e,i){var n=i.globe.pick(e,i);if(t(n)){for(var r,o=i.globe.ellipsoid.cartesianToCartographic(n),u=i.globe._surface._tilesToRender,c=0;!t(r)&&c<u.length;++c){var h=u[c];s.contains(h.rectangle,o)&&(r=h)}if(t(r)){for(var d=r.data.imagery,m=[],f=[],g=d.length-1;g>=0;--g){var v=d[g],_=v.readyImagery;if(t(_)){var y=_.imageryLayer.imageryProvider;if(t(y.pickFeatures)&&s.contains(_.rectangle,o)){var C=p,w=1/1024;if(C.west=a.lerp(r.rectangle.west,r.rectangle.east,v.textureCoordinateRectangle.x-w),C.east=a.lerp(r.rectangle.west,r.rectangle.east,v.textureCoordinateRectangle.z+w),C.south=a.lerp(r.rectangle.south,r.rectangle.north,v.textureCoordinateRectangle.y-w),C.north=a.lerp(r.rectangle.south,r.rectangle.north,v.textureCoordinateRectangle.w+w),s.contains(C,o)){var E=y.pickFeatures(_.x,_.y,_.level,o.longitude,o.latitude);t(E)&&(m.push(E),f.push(_.imageryLayer))}}}}if(0!==m.length)return l.all(m,function(e){for(var i=[],n=0;n<e.length;++n){var r=e[n],a=f[n];if(t(r)&&r.length>0)for(var s=0;s<r.length;++s){var l=r[s];l.imageryLayer=a,t(l.position)||(l.position=o),i.push(l)}}return i})}}},c.prototype.queueReprojectionCommands=function(e){for(var t=this._layers,i=0,n=t.length;n>i;++i)t[i].queueReprojectionCommands(e)},c.prototype.cancelReprojections=function(){for(var e=this._layers,t=0,i=e.length;i>t;++t)e[t].cancelReprojections()},c.prototype.isDestroyed=function(){return!1},c.prototype.destroy=function(){return this.removeAll(!0),n(this)},c.prototype._update=function(){for(var e,i,n=!0,r=this._layers,o=0,a=r.length;a>o;++o)i=r[o],i._layerIndex=o,i.show?(i._isBaseLayer=n,n=!1):i._isBaseLayer=!1,i.show!==i._show&&(t(i._show)&&(t(e)||(e=[]),e.push(i)),i._show=i.show);if(t(e))for(o=0,a=e.length;a>o;++o)i=e[o],this.layerShownOrHidden.raiseEvent(i,i._layerIndex,i.show)},c}),define("Cesium/Scene/QuadtreeOccluders",["../Core/Cartesian3","../Core/defineProperties","../Core/EllipsoidalOccluder"],function(e,t,i){"use strict";function n(t){this._ellipsoid=new i(t.ellipsoid,e.ZERO)}return t(n.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),n}),define("Cesium/Scene/QuadtreeTile",["../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Rectangle","./QuadtreeTileLoadState"],function(e,t,i,n,r){"use strict";function o(e){this._tilingScheme=e.tilingScheme,this._x=e.x,this._y=e.y,this._level=e.level,this._parent=e.parent,this._rectangle=this._tilingScheme.tileXYToRectangle(this._x,this._y,this._level),this._children=void 0,this._replacementPrevious=void 0,this._replacementNext=void 0,this._distance=0,this._customData=[],this._frameUpdated=void 0,this._frameRendered=void 0,this.state=r.START,this.renderable=!1,this.upsampledFromParent=!1,this.data=void 0}return o.createLevelZeroTiles=function(t){if(!e(t))throw new i("tilingScheme is required.");for(var n=t.getNumberOfXTilesAtLevel(0),r=t.getNumberOfYTilesAtLevel(0),a=new Array(n*r),s=0,l=0;r>l;++l)for(var u=0;n>u;++u)a[s++]=new o({tilingScheme:t,x:u,y:l,level:0});return a},o.prototype._updateCustomData=function(t,i,r){var o,a,s,l=this.customData;if(e(i)&&e(r)){for(l=l.filter(function(e){return-1===r.indexOf(e)}),this._customData=l,s=this._rectangle,o=0;o<i.length;++o)a=i[o],n.contains(s,a.positionCartographic)&&l.push(a);this._frameUpdated=t}else{var u=this._parent;if(e(u)&&this._frameUpdated!==u._frameUpdated){l.length=0,s=this._rectangle;var c=u.customData;for(o=0;o<c.length;++o)a=c[o],n.contains(s,a.positionCartographic)&&l.push(a);this._frameUpdated=u._frameUpdated}}},t(o.prototype,{tilingScheme:{get:function(){return this._tilingScheme}},x:{get:function(){return this._x}},y:{get:function(){return this._y}},level:{get:function(){return this._level}},parent:{get:function(){return this._parent}},rectangle:{get:function(){return this._rectangle}},children:{get:function(){if(!e(this._children)){var t=this.tilingScheme,i=this.level+1,n=2*this.x,r=2*this.y;this._children=[new o({tilingScheme:t,x:n,y:r,level:i,parent:this}),new o({tilingScheme:t,x:n+1,y:r,level:i,parent:this}),new o({tilingScheme:t,x:n,y:r+1,level:i,parent:this}),new o({tilingScheme:t,x:n+1,y:r+1,level:i,parent:this})]}return this._children}},customData:{get:function(){return this._customData}},needsLoading:{get:function(){return this.state<r.DONE}},eligibleForUnloading:{get:function(){var t=!0;return e(this.data)&&(t=this.data.eligibleForUnloading,e(t)||(t=!0)),t}}}),o.prototype.freeResources=function(){if(this.state=r.START,this.renderable=!1,this.upsampledFromParent=!1,e(this.data)&&e(this.data.freeResources)&&this.data.freeResources(),e(this._children)){for(var t=0,i=this._children.length;i>t;++t)this._children[t].freeResources();this._children=void 0}},o}),define("Cesium/Scene/TileReplacementQueue",["../Core/defined"],function(e){"use strict";function t(){this.head=void 0,this.tail=void 0,this.count=0,this._lastBeforeStartOfFrame=void 0}function i(e,t){var i=t.replacementPrevious,n=t.replacementNext;t===e._lastBeforeStartOfFrame&&(e._lastBeforeStartOfFrame=n),t===e.head?e.head=n:i.replacementNext=n,t===e.tail?e.tail=i:n.replacementPrevious=i,t.replacementPrevious=void 0,t.replacementNext=void 0,--e.count}return t.prototype.markStartOfRenderFrame=function(){this._lastBeforeStartOfFrame=this.head},t.prototype.trimTiles=function(t){for(var n=this.tail,r=!0;r&&e(this._lastBeforeStartOfFrame)&&this.count>t&&e(n);){r=n!==this._lastBeforeStartOfFrame;var o=n.replacementPrevious;n.eligibleForUnloading&&(n.freeResources(),i(this,n)),n=o}},t.prototype.markTileRendered=function(t){var n=this.head;return n===t?void(t===this._lastBeforeStartOfFrame&&(this._lastBeforeStartOfFrame=t.replacementNext)):(++this.count, +e(n)?((e(t.replacementPrevious)||e(t.replacementNext))&&i(this,t),t.replacementPrevious=void 0,t.replacementNext=n,n.replacementPrevious=t,void(this.head=t)):(t.replacementPrevious=void 0,t.replacementNext=void 0,this.head=t,void(this.tail=t)))},t}),define("Cesium/Scene/QuadtreePrimitive",["../Core/Cartesian3","../Core/Cartographic","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Event","../Core/getTimestamp","../Core/Math","../Core/Queue","../Core/Ray","../Core/Rectangle","../Core/Visibility","./QuadtreeOccluders","./QuadtreeTile","./QuadtreeTileLoadState","./SceneMode","./TileReplacementQueue"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g,v){"use strict";function _(e){this._tileProvider=e.tileProvider,this._tileProvider.quadtree=this,this._debug={enableDebugOutput:!1,maxDepth:0,tilesVisited:0,tilesCulled:0,tilesRendered:0,tilesWaitingForChildren:0,lastMaxDepth:-1,lastTilesVisited:-1,lastTilesCulled:-1,lastTilesRendered:-1,lastTilesWaitingForChildren:-1,suspendLodUpdate:!1};var t=this._tileProvider.tilingScheme,n=t.ellipsoid;this._tilesToRender=[],this._tileTraversalQueue=new u,this._tileLoadQueue=[],this._tileReplacementQueue=new v,this._levelZeroTiles=void 0,this._levelZeroTilesReady=!1,this._loadQueueTimeSlice=5,this._addHeightCallbacks=[],this._removeHeightCallbacks=[],this._tileToUpdateHeights=[],this._lastTileIndex=0,this._updateHeightsTimeSlice=2,this.maximumScreenSpaceError=i(e.maximumScreenSpaceError,2),this.tileCacheSize=i(e.tileCacheSize,100),this._occluders=new p({ellipsoid:n}),this._tileLoadProgressEvent=new a,this._lastTileLoadQueueLength=0}function y(e,t){var i=e._debug;if(!i.suspendLodUpdate){var r,o,a=e._tilesToRender;a.length=0;var s=e._tileTraversalQueue;if(s.clear(),!n(e._levelZeroTiles)){if(!e._tileProvider.ready)return;var l=e._tileProvider.tilingScheme;e._levelZeroTiles=m.createLevelZeroTiles(l)}e._occluders.ellipsoid.cameraPosition=t.camera.positionWC;var u,c=e._tileProvider,h=e._occluders,p=e._levelZeroTiles,f=e._addHeightCallbacks,g=e._removeHeightCallbacks,v=t.frameNumber;if(f.length>0||g.length>0){for(r=0,o=p.length;o>r;++r)u=p[r],u._updateCustomData(v,f,g);f.length=0,g.length=0}for(r=0,o=p.length;o>r;++r)u=p[r],e._tileReplacementQueue.markTileRendered(u),u.needsLoading&&T(e,u),u.renderable&&c.computeTileVisibility(u,t,h)!==d.NONE?s.enqueue(u):(++i.tilesCulled,u.renderable||++i.tilesWaitingForChildren);for(;n(u=s.dequeue());)if(++i.tilesVisited,e._tileReplacementQueue.markTileRendered(u),u._updateCustomData(v),u.level>i.maxDepth&&(i.maxDepth=u.level),w(e,t,u)<e.maximumScreenSpaceError)b(e,u);else if(S(e,u)){var _=u.children;for(r=0,o=_.length;o>r;++r)c.computeTileVisibility(_[r],t,h)!==d.NONE?s.enqueue(_[r]):++i.tilesCulled}else b(e,u);C(e)}}function C(e){var t=e._tileLoadQueue.length;t!==e._lastTileLoadQueueLength&&(e._tileLoadProgressEvent.raiseEvent(t),e._lastTileLoadQueueLength=t)}function w(e,t,i){if(t.mode===g.SCENE2D)return E(e,t,i);var n=e._tileProvider.getLevelMaximumGeometricError(i.level),r=i._distance,o=t.context.drawingBufferHeight,a=t.camera.frustum.sseDenominator,s=n*o/(r*a);return t.fog.enabled&&(s-=l.fog(r,t.fog.density)*t.fog.sse),s}function E(e,t,i){var n=t.camera,r=n.frustum,o=t.context,a=o.drawingBufferWidth,s=o.drawingBufferHeight,l=e._tileProvider.getLevelMaximumGeometricError(i.level),u=Math.max(r.top-r.bottom,r.right-r.left)/Math.max(a,s);return l/u}function b(e,t){e._tilesToRender.push(t),++e._debug.tilesRendered}function S(e,t){for(var i=!0,n=!0,r=t.children,o=0,a=r.length;a>o;++o){var s=r[o];e._tileReplacementQueue.markTileRendered(s),n=n&&s.upsampledFromParent,i=i&&s.renderable,s.needsLoading&&T(e,s)}return i||++e._debug.tilesWaitingForChildren,i&&!n}function T(e,t){e._tileLoadQueue.push(t)}function x(e,t){var i=e._tileLoadQueue,n=e._tileProvider;if(0!==i.length){e._tileReplacementQueue.trimTiles(e.tileCacheSize);for(var r=s(),o=e._loadQueueTimeSlice,a=r+o,l=i.length-1;l>=0;--l){var u=i[l];if(e._tileReplacementQueue.markTileRendered(u),n.loadTile(t,u),s()>=a)break}}}function A(i,r){for(var o=i._tileToUpdateHeights,a=i._tileProvider.terrainProvider,l=s(),u=i._updateHeightsTimeSlice,c=l+u,d=r.mode,p=r.mapProjection,m=p.ellipsoid;o.length>0;){var f=o[o.length-1];f!==i._lastTileUpdated&&(i._lastTileIndex=0);for(var v=f.customData,_=v.length,y=!1,C=i._lastTileIndex;_>C;++C){var w=v[C];if(f.level>w.level){n(w.position)||(w.position=m.cartographicToCartesian(w.positionCartographic)),d===g.SCENE3D?(e.clone(e.ZERO,D.origin),e.normalize(w.position,D.direction)):(t.clone(w.positionCartographic,I),I.height=-11500,p.project(I,R),e.fromElements(R.z,R.x,R.y,R),e.clone(R,D.origin),e.clone(e.UNIT_X,D.direction));var E=f.data.pick(D,d,p,!1,R);n(E)&&w.callback(E),w.level=f.level}else if(f.level===w.level){for(var b,S=f.children,T=S.length,x=0;T>x&&(b=S[x],!h.contains(b.rectangle,w.positionCartographic));++x);var A=a.getTileDataAvailable(b.x,b.y,b.level),P=f.parent;(n(A)&&!A||n(P)&&n(P.data)&&n(P.data.terrainData)&&!P.data.terrainData.isChildAvailable(P.x,P.y,b.x,b.y))&&w.removeFunc()}if(s()>=c){y=!0;break}}if(y){i._lastTileUpdated=f,i._lastTileIndex=C;break}o.pop()}}function P(e,t){return e._distance-t._distance}function M(e,t){var i=e._tileProvider,n=e._tilesToRender,r=e._tileToUpdateHeights;n.sort(P);for(var o=0,a=n.length;a>o;++o){var s=n[o];i.showTileThisFrame(s,t),s._frameRendered!==t.frameNumber-1&&r.push(s),s._frameRendered=t.frameNumber}}r(_.prototype,{tileProvider:{get:function(){return this._tileProvider}},tileLoadProgressEvent:{get:function(){return this._tileLoadProgressEvent}}}),_.prototype.invalidateAllTiles=function(){var e=this._tileReplacementQueue;e.head=void 0,e.tail=void 0,e.count=0;var t=this._levelZeroTiles;if(n(t))for(var i=0;i<t.length;++i){for(var r=t[i],o=r.customData,a=o.length,s=0;a>s;++s){var l=o[s];l.level=0,this._addHeightCallbacks.push(l)}t[i].freeResources()}this._levelZeroTiles=void 0,this._tileProvider.cancelReprojections()},_.prototype.forEachLoadedTile=function(e){for(var t=this._tileReplacementQueue.head;n(t);)t.state!==f.START&&e(t),t=t.replacementNext},_.prototype.forEachRenderedTile=function(e){for(var t=this._tilesToRender,i=0,n=t.length;n>i;++i)e(t[i])},_.prototype.updateHeight=function(e,t){var i=this,n={position:void 0,positionCartographic:e,level:-1,callback:t};return n.removeFunc=function(){for(var e=i._addHeightCallbacks,t=e.length,r=0;t>r;++r)if(e[r]===n){e.splice(r,1);break}i._removeHeightCallbacks.push(n)},i._addHeightCallbacks.push(n),n.removeFunc},_.prototype.beginFrame=function(e){var t=e.passes;if(t.render){this._tileProvider.initialize(e);var i=this._debug;i.suspendLodUpdate||(i.maxDepth=0,i.tilesVisited=0,i.tilesCulled=0,i.tilesRendered=0,i.tilesWaitingForChildren=0,this._tileLoadQueue.length=0,this._tileReplacementQueue.markStartOfRenderFrame())}},_.prototype.update=function(e){var t=e.passes;t.render&&(this._tileProvider.beginUpdate(e),y(this,e),M(this,e),this._tileProvider.endUpdate(e)),t.pick&&this._tilesToRender.length>0&&this._tileProvider.updateForPick(e)},_.prototype.endFrame=function(e){var t=e.passes;if(t.render){x(this,e),A(this,e);var i=this._debug;i.suspendLodUpdate||i.enableDebugOutput&&(i.tilesVisited!==i.lastTilesVisited||i.tilesRendered!==i.lastTilesRendered||i.tilesCulled!==i.lastTilesCulled||i.maxDepth!==i.lastMaxDepth||i.tilesWaitingForChildren!==i.lastTilesWaitingForChildren)&&(console.log("Visited "+i.tilesVisited+", Rendered: "+i.tilesRendered+", Culled: "+i.tilesCulled+", Max Depth: "+i.maxDepth+", Waiting for children: "+i.tilesWaitingForChildren),i.lastTilesVisited=i.tilesVisited,i.lastTilesRendered=i.tilesRendered,i.lastTilesCulled=i.tilesCulled,i.lastMaxDepth=i.maxDepth,i.lastTilesWaitingForChildren=i.tilesWaitingForChildren)}},_.prototype.isDestroyed=function(){return!1},_.prototype.destroy=function(){this._tileProvider=this._tileProvider&&this._tileProvider.destroy()};var D=new c,I=new t,R=new e;return _}),define("Cesium/Scene/Globe",["../Core/BoundingSphere","../Core/buildModuleUrl","../Core/Cartesian3","../Core/Cartographic","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/destroyObject","../Core/DeveloperError","../Core/Ellipsoid","../Core/EllipsoidTerrainProvider","../Core/Event","../Core/GeographicProjection","../Core/IntersectionTests","../Core/loadImage","../Core/Ray","../Core/Rectangle","../Renderer/ShaderSource","../Renderer/Texture","../Shaders/GlobeFS","../Shaders/GlobeVS","../Shaders/GroundAtmosphere","../ThirdParty/when","./GlobeSurfaceShaderSet","./GlobeSurfaceTileProvider","./ImageryLayerCollection","./QuadtreePrimitive","./SceneMode"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g,v,_,y,C,w,E,b,S,T,x,A){"use strict";function P(e){e=r(e,u.WGS84);var i=new c({ellipsoid:e}),n=new T;this._ellipsoid=e,this._imageryLayerCollection=n,this._surfaceShaderSet=new b,this._surfaceShaderSet.baseVertexShaderSource=new v({sources:[w,C]}),this._surfaceShaderSet.baseFragmentShaderSource=new v({sources:[y]}),this._surface=new x({tileProvider:new S({terrainProvider:i,imageryLayers:n,surfaceShaderSet:this._surfaceShaderSet})}),this._terrainProvider=i,this._terrainProviderChanged=new h,this.show=!0,this.oceanNormalMapUrl=t("Assets/Textures/waterNormalsSmall.jpg"),this._oceanNormalMapUrl=void 0,this.maximumScreenSpaceError=2,this.tileCacheSize=100,this.enableLighting=!1,this.lightingFadeOutDistance=65e5,this.lightingFadeInDistance=9e6,this.showWaterEffect=!0,this.depthTestAgainstTerrain=!1,this.castShadows=!1,this.receiveShadows=!0,this._oceanNormalMap=void 0,this._zoomedOutOceanSpecularIntensity=.5}function M(t){return function(i,n){var r=e.distanceSquaredTo(i.pickBoundingSphere,t),o=e.distanceSquaredTo(n.pickBoundingSphere,t);return r-o}}a(P.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},imageryLayers:{get:function(){return this._imageryLayerCollection}},baseColor:{get:function(){return this._surface.tileProvider.baseColor},set:function(e){this._surface.tileProvider.baseColor=e}},terrainProvider:{get:function(){return this._terrainProvider},set:function(e){e!==this._terrainProvider&&(this._terrainProvider=e,this._terrainProviderChanged.raiseEvent(e))}},terrainProviderChanged:{get:function(){return this._terrainProviderChanged}},tileLoadProgressEvent:{get:function(){return this._surface.tileLoadProgressEvent}}});var D=[],I={start:0,stop:0};P.prototype.pick=function(t,n,r){var a=n.mode,s=n.mapProjection,l=D;l.length=0;var u,c,h=this._surface._tilesToRender,d=h.length;for(c=0;d>c;++c){u=h[c];var m=u.data;if(o(m)){var f=m.pickBoundingSphere;a!==A.SCENE3D?(e.fromRectangleWithHeights2D(u.rectangle,s,m.minimumHeight,m.maximumHeight,f),i.fromElements(f.center.z,f.center.x,f.center.y,f.center)):e.clone(m.boundingSphere3D,f);var g=p.raySphere(t,f,I);o(g)&&l.push(m)}}l.sort(M(t.origin));var v;for(d=l.length,c=0;d>c&&(v=l[c].pick(t,n.mode,n.mapProjection,!0,r),!o(v));++c);return v};var R=new i,O=new i,L=new n,N=new f;return P.prototype.getHeight=function(e){var t=this._surface._levelZeroTiles;if(o(t)){var n,r,a=t.length;for(r=0;a>r&&(n=t[r],!g.contains(n.rectangle,e));++r);if(o(n)&&g.contains(n.rectangle,e)){for(;n.renderable;){var s=n.children;for(a=s.length,r=0;a>r&&(n=s[r],!g.contains(n.rectangle,e));++r);}for(;o(n)&&(!o(n.data)||!o(n.data.pickTerrain));)n=n.parent;if(o(n)){var l=this._surface._tileProvider.tilingScheme.ellipsoid,u=l.cartographicToCartesian(e,R),c=N;i.normalize(u,c.direction);var h=n.data.pick(c,void 0,void 0,!1,O);if(o(h))return l.cartesianToCartographic(h,L).height}}}},P.prototype.beginFrame=function(e){if(this.show){var t=this._surface,i=t.tileProvider,n=this.terrainProvider,r=this.showWaterEffect&&n.ready&&n.hasWaterMask;if(r&&this.oceanNormalMapUrl!==this._oceanNormalMapUrl){var a=this.oceanNormalMapUrl;if(this._oceanNormalMapUrl=a,o(a)){var s=this;E(m(a),function(t){a===s.oceanNormalMapUrl&&(s._oceanNormalMap=s._oceanNormalMap&&s._oceanNormalMap.destroy(),s._oceanNormalMap=new _({context:e.context,source:t}))})}else this._oceanNormalMap=this._oceanNormalMap&&this._oceanNormalMap.destroy()}var l=e.mode,u=e.passes;u.render&&(l===A.SCENE3D?this._zoomedOutOceanSpecularIntensity=.5:this._zoomedOutOceanSpecularIntensity=0,t.maximumScreenSpaceError=this.maximumScreenSpaceError,t.tileCacheSize=this.tileCacheSize,i.terrainProvider=this.terrainProvider,i.lightingFadeOutDistance=this.lightingFadeOutDistance,i.lightingFadeInDistance=this.lightingFadeInDistance,i.zoomedOutOceanSpecularIntensity=this._zoomedOutOceanSpecularIntensity,i.hasWaterMask=r,i.oceanNormalMap=this._oceanNormalMap,i.enableLighting=this.enableLighting,i.castShadows=this.castShadows,i.receiveShadows=this.receiveShadows,t.beginFrame(e))}},P.prototype.update=function(e){if(this.show){var t=this._surface,i=e.passes;i.render&&t.update(e),i.pick&&t.update(e)}},P.prototype.endFrame=function(e){this.show&&e.passes.render&&this._surface.endFrame(e)},P.prototype.isDestroyed=function(){return!1},P.prototype.destroy=function(){return this._surfaceShaderSet=this._surfaceShaderSet&&this._surfaceShaderSet.destroy(),this._surface=this._surface&&this._surface.destroy(),this._oceanNormalMap=this._oceanNormalMap&&this._oceanNormalMap.destroy(),s(this)},P}),define("Cesium/Shaders/PostProcessFilters/PassThrough",[],function(){"use strict";return"uniform sampler2D u_texture;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main() \n{\n gl_FragColor = texture2D(u_texture, v_textureCoordinates);\n}\n"}),define("Cesium/Scene/GlobeDepth",["../Core/BoundingRectangle","../Core/Color","../Core/defined","../Core/defineProperties","../Core/destroyObject","../Core/PixelFormat","../Renderer/ClearCommand","../Renderer/Framebuffer","../Renderer/PixelDatatype","../Renderer/RenderState","../Renderer/Texture","../Shaders/PostProcessFilters/PassThrough"],function(e,t,i,n,r,o,a,s,l,u,c,h){"use strict";function d(){this._colorTexture=void 0,this._depthStencilTexture=void 0,this._globeDepthTexture=void 0,this.framebuffer=void 0,this._copyDepthFramebuffer=void 0,this._clearColorCommand=void 0,this._copyColorCommand=void 0,this._copyDepthCommand=void 0,this._viewport=new e,this._rs=void 0,this._debugGlobeDepthViewportCommand=void 0}function p(e,t,n){if(!i(e._debugGlobeDepthViewportCommand)){var r="uniform sampler2D u_texture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n float z_window = czm_unpackDepth(texture2D(u_texture, v_textureCoordinates));\n float n_range = czm_depthRange.near;\n float f_range = czm_depthRange.far;\n float z_ndc = (2.0 * z_window - n_range - f_range) / (f_range - n_range);\n float scale = pow(z_ndc * 0.5 + 0.5, 8.0);\n gl_FragColor = vec4(mix(vec3(0.0), vec3(1.0), scale), 1.0);\n}\n";e._debugGlobeDepthViewportCommand=t.createViewportQuadCommand(r,{uniformMap:{u_texture:function(){return e._globeDepthTexture}},owner:e})}e._debugGlobeDepthViewportCommand.execute(t,n)}function m(e){e._colorTexture=e._colorTexture&&!e._colorTexture.isDestroyed()&&e._colorTexture.destroy(),e._depthStencilTexture=e._depthStencilTexture&&!e._depthStencilTexture.isDestroyed()&&e._depthStencilTexture.destroy(),e._globeDepthTexture=e._globeDepthTexture&&!e._globeDepthTexture.isDestroyed()&&e._globeDepthTexture.destroy()}function f(e){e.framebuffer=e.framebuffer&&!e.framebuffer.isDestroyed()&&e.framebuffer.destroy(),e._copyDepthFramebuffer=e._copyDepthFramebuffer&&!e._copyDepthFramebuffer.isDestroyed()&&e._copyDepthFramebuffer.destroy()}function g(e,t,i,n){e._colorTexture=new c({context:t,width:i,height:n,pixelFormat:o.RGBA,pixelDatatype:l.UNSIGNED_BYTE}),e._depthStencilTexture=new c({context:t,width:i,height:n,pixelFormat:o.DEPTH_STENCIL,pixelDatatype:l.UNSIGNED_INT_24_8}),e._globeDepthTexture=new c({context:t,width:i,height:n,pixelFormat:o.RGBA,pixelDatatype:l.UNSIGNED_BYTE})}function v(e,t,i,n){e.framebuffer=new s({context:t,colorTextures:[e._colorTexture],depthStencilTexture:e._depthStencilTexture,destroyAttachments:!1}),e._copyDepthFramebuffer=new s({context:t,colorTextures:[e._globeDepthTexture],destroyAttachments:!1})}function _(e,t,n,r){var o=e._colorTexture,a=!i(o)||o.width!==n||o.height!==r;(!i(e.framebuffer)||a)&&(m(e),f(e),g(e,t,n,r),v(e,t,n,r))}function y(n,r,o,s){if(n._viewport.width=o,n._viewport.height=s,i(n._rs)&&e.equals(n._viewport,n._rs.viewport)||(n._rs=u.fromCache({viewport:n._viewport})),!i(n._copyDepthCommand)){var l="uniform sampler2D u_texture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n gl_FragColor = czm_packDepth(texture2D(u_texture, v_textureCoordinates).r);\n}\n";n._copyDepthCommand=r.createViewportQuadCommand(l,{uniformMap:{u_texture:function(){return n._depthStencilTexture}},owner:n})}n._copyDepthCommand.framebuffer=n._copyDepthFramebuffer,i(n._copyColorCommand)||(n._copyColorCommand=r.createViewportQuadCommand(h,{uniformMap:{u_texture:function(){return n._colorTexture}},owner:n})),n._copyDepthCommand.renderState=n._rs,n._copyColorCommand.renderState=n._rs,i(n._clearColorCommand)||(n._clearColorCommand=new a({color:new t(0,0,0,0),stencil:0,owner:n})),n._clearColorCommand.framebuffer=n.framebuffer}return d.prototype.executeDebugGlobeDepth=function(e,t){p(this,e,t)},d.prototype.update=function(e){var t=e.drawingBufferWidth,i=e.drawingBufferHeight;_(this,e,t,i),y(this,e,t,i),e.uniformState.globeDepthTexture=void 0},d.prototype.executeCopyDepth=function(e,t){i(this._copyDepthCommand)&&(this._copyDepthCommand.execute(e,t),e.uniformState.globeDepthTexture=this._globeDepthTexture)},d.prototype.executeCopyColor=function(e,t){i(this._copyColorCommand)&&this._copyColorCommand.execute(e,t)},d.prototype.clear=function(e,n,r){var o=this._clearColorCommand;i(o)&&(t.clone(r,o.color),o.execute(e,n))},d.prototype.isDestroyed=function(){return!1},d.prototype.destroy=function(){m(this),f(this),i(this._copyColorCommand)&&(this._copyColorCommand.shaderProgram=this._copyColorCommand.shaderProgram.destroy()),i(this._copyDepthCommand)&&(this._copyDepthCommand.shaderProgram=this._copyDepthCommand.shaderProgram.destroy());var e=this._debugGlobeDepthViewportCommand;return i(e)&&(e.shaderProgram=e.shaderProgram.destroy()),r(this)},d}),define("Cesium/Scene/GoogleEarthImageryProvider",["../Core/Credit","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Event","../Core/GeographicTilingScheme","../Core/loadText","../Core/Rectangle","../Core/RuntimeError","../Core/TileProviderError","../Core/WebMercatorTilingScheme","../ThirdParty/when","./ImageryProvider"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p){"use strict";function m(n){function r(e){var t;try{t=JSON.parse(e)}catch(r){t=JSON.parse(e.replace(/([\[\{,])[\n\r ]*([A-Za-z0-9]+)[\n\r ]*:/g,'$1"$2":'))}for(var o,s=0;s<t.layers.length;s++)if(t.layers[s].id===_._channel){o=t.layers[s];break}var d;if(!i(o))throw d="Could not find layer with channel (id) of "+_._channel+".",g=c.handleError(g,_,_._errorEvent,d,void 0,void 0,void 0,f),new u(d);if(!i(o.version))throw d="Could not find a version in channel (id) "+_._channel+".",g=c.handleError(g,_,_._errorEvent,d,void 0,void 0,void 0,f),new u(d);if(_._version=o.version,i(t.projection)&&"flat"===t.projection)_._tilingScheme=new a({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new l(-Math.PI,-Math.PI,Math.PI,Math.PI),ellipsoid:n.ellipsoid});else{if(i(t.projection)&&"mercator"!==t.projection)throw d="Unsupported projection "+t.projection+".",g=c.handleError(g,_,_._errorEvent,d,void 0,void 0,void 0,f),new u(d);_._tilingScheme=new h({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,ellipsoid:n.ellipsoid})}_._imageUrlTemplate=_._imageUrlTemplate.replace("{request}",_._requestType).replace("{channel}",_._channel).replace("{version}",_._version),_._ready=!0,_._readyPromise.resolve(!0),c.handleSuccess(g)}function p(e){var t="An error occurred while accessing "+v+".";g=c.handleError(g,_,_._errorEvent,t,void 0,void 0,void 0,f),_._readyPromise.reject(new u(t))}function f(){var e=i(_._proxy)?_._proxy.getURL(v):v,t=s(e);d(t,r,p)}n=t(n,{}),this._url=n.url,this._path=t(n.path,"/default_map"),this._tileDiscardPolicy=n.tileDiscardPolicy,this._proxy=n.proxy,this._channel=n.channel,this._requestType="ImageryMaps",this._credit=new e("Google Imagery",m._logoData,"http://www.google.com/enterprise/mapsearth/products/earthenterprise.html"),this.defaultGamma=1.9,this._tilingScheme=void 0,this._version=void 0,this._tileWidth=256,this._tileHeight=256,this._maximumLevel=n.maximumLevel,this._imageUrlTemplate=this._url+this._path+"/query?request={request}&channel={channel}&version={version}&x={x}&y={y}&z={zoom}",this._errorEvent=new o,this._ready=!1,this._readyPromise=d.defer();var g,v=this._url+this._path+"/query?request=Json&vars=geeServerDefs&is2d=t",_=this;f()}function f(e,t,n,r){var o=e._imageUrlTemplate;o=o.replace("{x}",t),o=o.replace("{y}",n),o=o.replace("{zoom}",r+1);var a=e._proxy;return i(a)&&(o=a.getURL(o)),o}return n(m.prototype,{url:{get:function(){return this._url}},path:{get:function(){return this._path}},proxy:{get:function(){return this._proxy}},channel:{get:function(){return this._channel}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return 0}},tilingScheme:{get:function(){return this._tilingScheme}},version:{get:function(){return this._version}},requestType:{get:function(){return this._requestType}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!0}}}),m.prototype.getTileCredits=function(e,t,i){},m.prototype.requestImage=function(e,t,i){var n=f(this,e,t,i);return p.loadImage(this,n)},m.prototype.pickFeatures=function(){},m._logoData="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALQAAAAnCAYAAACmP2LfAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsIAAA7CARUoSoAAAAAHdElNRQfcDB4TJDr1mp5kAAAAGnRFWHRTb2Z0d2FyZQBQYWludC5ORVQgdjMuNS4xMDD0cqEAAB1zSURBVHhe7ZwHeFTFFsf/u+l9N70npOxuSAKEFFIhCSH0qhEQUHkgKCgWUFGBB6IoCAoo0ntooaRvEkIIBBBpoYSa3nvvfd+5u4sQUigPfMX8v2/Y3Tkzs3fv/d0z58zcgF69Ql1SY+MM1wQJem44ZeiJk8beEOqPwG6uC7ZqyElb9eo/JZEIkH2nRQkBIlNMauuPCS3uGN/kjkmNDghoskBAgzrZ2NLmf1+JwIKQpYsoxdmIV9+N07onCegzBPM9bOdmYKnazF6g/1N6UySPqSJzvCaaiLHtP8G/Phq+FRfgU5ogKWUXMLT6Mvzqr2BE40mMadqO8c3zMabBC6PqDDC8SlY60t9HByCLVTKu+ERmHr5TWI9wjVxEaOZivWo1pil8D1tZeWnLXv1l8iZ3PF2kjymiWRgvCoJv5U243IyAXcQq8A9Mg9W+4bDe6wv+kVGwCZkL+4Sf4ZR+BZ5VGQR3EkbWn8Hopm3wq54Lz2JD6ah/P21XGopQ9Qoc16jGSqVyTJWbQbUsibFXf42mihTwZpsvAtp3k0dOhFOSEH1+ngaDefrgjFCgFkxY8fCisCBvKgODzxRh9qslBFGfYmDGLbiV5mBwRRo8KtPhVBgPu8teMP7u73chD6kMRYRGBY5xqrFKqQwz5SdTbS/Qf5mmUYw8rf01CjHC4VP7AHZxO6E3qy9ZZCQNnio2rE/4o9/tkxiQUYp+KRXgx8XC5FsXcLz/hkCrDUU4pxLHuDVYpdwL9F+qqSJZKlPwenskfOoI5tN7YPCJGVme7wKYr5EBXzgYfW+mwTI0Gjrznaj2WW+I/y8dVPdDGLcKRzXrsEqlHO8oTKHaXqAZWe9hQXCi63NhHWYI3ilfWIW/YLjqL2JRiOFBJRz+LffhcPs09D+0J8vzn3zXdBnYnp8Mi6NboTWzH9X8fVc+DhDQodxqAroe36lU9AJNWr4cEAjNwI8OAC9cT1rbUfzwGeCfKiL7dGnNc+q1NiO80b4BY1oT4V6WDcsdc6j2xbyq4wMWrA9rQmeWFn36ey/jBaoPQ4hmLYI0G/AtAf22fC/QDols8ITrIYi/Bl6knbS2o3gRbxHQxQQ0k0S/gCa2v4OJovPwacqAQ1ICjL40klr+UrWoQbFBETo18jCpZsOoFODkvuCNJYoHW3QKXFEM7ETRcKfiQe8d6NVIFImXvg4skhY40mxnQYVRIIeA1qrHEc1GrFSpxFtP99AiFbDbNKDZpAzzGkVYVcvBuBJQEo/9/6C+dyjPitwLwak74D8V6Bfw0P5VShjXFoTR7TfhUZkL29M/wfATJan1lauWC3aDOgyaVDCuTgbf1bFkfmtkye1ogsK2asivLYfCglIoD8qCknI2NHuG4QSVGMgQyMbt0fioRYh9VYcRU7QX55uDcaHtFOJEsThMtmWtQgxsDodsWaC0c3ea3MzGBJEqxrfbYmzr6xjfPAeTmt5HQPO7eK1xDibUz8eY+k8xtHYJPCtXwvHOu7AXMrMTsF/TH8HajTis1YwVqpWY0TXQDKy1OpBr5EJA52Fukxx+bmKxtjWx2DuaWawNlZD5qhzyo9KhpHAbKpJO/6t65UCPbPHA2PYrGNacgkElabCJJDev/MpDhUKKnuq44LRoYEK1IiswkS1zYCfk5y+F0qjvoTwqBOof34dGeAnUL1ZCLboEnJ9zoe0QD/Nuj00UBVXRabzVLETM3S0ICfwA8yc7Y6C3ANYbZsA7aQ1W1xzEfZEQ6dT2BkG9pP4ouo7jGE1u42JS20QMrzkCr4xwuN4+AM+cYII3EaNar2J86zmMrP8DHulCON4NhU3YWuhOYy6SZENpH9cfx7WacFC7BSvUqjBDsRPQIiugURvazeqYVaqAw6dYrJ9WQy7gayj4nYDy3HtQOVQGpYRqKEWXQf2HdGha/AFdae9Xr4czz0ubISRA75ECbSut7agegO75OLxpahze8j5GtifBpzEDLiV30Dd2mNT6StWiCbVmLt5rUkBQCEt2zWzIMSA8HgrIBkLD+Sp0jhHISYXQ/KMYukfvQ3fQxq68XCTBHId/tMTg7LV1CFs4BszJ6hBarBgHlcRv8H7tbuSKQpFPYGe0BmND+nZ0npECaPKf0r4UIxsuoF/IMpitsAVnrA4s15uh3x8fwLXkLobUZGJIXTqcUzbDaJE5FAVq0t4S7dEcjqMEc6B2K5arVWN6Z6AbdOmm5mJelQKOHWSxF44Cy4CqxW0s6RwchCovFRohdGNfLgX3WiZ0N4aD++y7jfwYJUrAPCle/ZjKV+BFTSegrGAZIm3QjXhBytTWB3zhByzryMUU986jz16wD+96ijCNUIAgmkc3tS6G7GERjCbgR82B4OTbEESqIiCIcqsIYzoGGyrBEMSmgh8xBoIIAR2fAHZhj8Z9DOhl9FHeKkSDvn809fuc+iyCddRYaiOZBTvIt1YJfs0b4N+WDO+GHPLQN2Ab7S61vjJV60C9SRPvNSqzTpxlyQfS1dGUmjppK7gW16B/LhN6abnQu5cDwzO3YNhhqqK4WJY887sEdGzWFpxfOxmDpKZOOvgWFB8sx9L6nShvP4FyUQjKGg5gScpGKEqbUE7RxiGYv6QQ4zIG/r4D2m88sjEy/EIW/a6+TQ4gHe5VhXCvy4JL7gLYnesI2i6t4Tii04r92u1YKt767gB0ozrkGzmY26zEOh7Hkt+kAKhLTX9qOVVdg9aoNOjcToR+wUVKLYKgN0Zq7l7884wn9CKgr4AfWw/B6SwqKQRKOdXVghe9CpbherASSjtIpGpxRIHFjwygNreoXy0lb+lU7lHJBP9kPcGXQnBNghUB/Lh44fbUp5JA+5Hs71LbPPLCVRDEJZDNGIJgeQI6mG6KegKzldq1U7tGKjQmHR8vwl86kgRoAQN0xBw6ztn0nQ/ocxEdQ7L4d/BjG6g+m8aZTL/xsXPuW82Fb8t+DG1Ox5D6XAwqvQ67OA+p9ZWoUQPsei78mjSwNU9GLmEzVGZJTd3qFPTn3YZhXgYMMjNhlHsDxms/hNWfoUdrNPgEc2h7BG5d/Bo7Blt0BuNxXf4MVmXrkdRyEHWiY6hr2oc7mevRX2wc18gioEeI1+N9a+/CNnImVAZ0mhEoNOPAJT8MHjUF8KTiWhqHgbfMpVaJdhLQh3XasU9bJAZ6ekeg6zQwgEKuLSWysmd3QGmatLqD8qDNug3dCX/AIPk4jGr2wDB/JXTmkan70IvmZTY/rB9BdZlKLkG0lG0d5klAObKsw1+jzyFiWPnRawiaDrMYwTyMwMwh220WP2IWFVfqN4CKO8E3n0C6R/ZUej9Y2kUiMdDRFTRePH3nA3q/m7xpAEtAXl0QrkTwscnmS/3eptdzNEYevZLnZ5booqk8tuYs9tAny+n1LL1mghezlcULH0VtHamOZhvhIvoNOXQsd2EZIbluYnlWaMO75TCFG9kYXJ8H14o76H/10Z3yClSrCm6jGtbWK7LC7kIlYRfUmY2XHnUa+mbXYRSfCuNCptyE6b1jMBD/EPKwchQPLxGdxOWWI8iKXYBPqLozgI8pfA5YBWvxbfMeNLUfRmPTLjRnr8YKsdGvRQ5j2zZTSSRQ78H+7GhxfScFAINypsG9ukDspZ0LKKE+O0pqlGi71ggcIqD3dga6RhFKjSqYT+VEFkvu/E9Q+HNWKaE2VVDgVkPFqwAaay5CN3En9M59BM2vfKDs7AvljjPGE5LlharQdL+LoCmhOHU0rIUyD+NgVTOa+q2iVQiIcAKpHtbhXuJOjPqeVCRYThNE6VTvKNs3hM3cHGIxntxKyCbP7Erj1lHZJbVIJAG6iiCroZCAPGukvOyASJbvCgoaAoKoAQ1kHcGC7nmZDkmhBR2PfSQLtkcl4zCSAE2eO6qExYuYxrE4KqdvelBiM4+ncYQy1IY8d0wbhUSLJAZGbsUceNYdwJCGPAyuy4NbZToG3JoO1Qk9AvHvqF4ejo0KCKlisyl04Jw+AE1ma71HRUJP+QqM1t2HcVEyTEoSYVYQCuN3HenCt4XDhGA+KorAnYZ9KIj5ELOl3XpU/k/wrt+OmraDaG7cjpacbxFvYAAZDG5Vw/DWCxjRdp+ATsWAS6+D69H1+XDNsoVb1T06b0VwzCmBIOYdqUWibTojcFBH1CXQctBtUcA6Oh/RmVC4sBmKA5j6erC1qqE4sRpqG25A43QIOHuXgvOmP5R4ZH6m5UY2L9SSLjZ5sKjjsI/o8olH8ngjCZoSgmw9DMIl3t42Up0g+pq89/sEjLK47knZhSkSuDepJP4JOyNJyEFAR8VQKMOR1nbWM69yxNJYwh+VLE90ffPyxLE3EwL9Jq0huWQqwL1iA7zq8+FVl0+epgBO6T+gb2TH+OglqgastxtZrNNlkLt8E5oJx6HZdab7mFZBk3UZRjMewCT7HkzLfodZxREYr5sBjiIBPYiAPt8ehvSGPSg5vwjzpd16VNkmmDTswp22QDTXbkJrxhJkzHGDFoUQmvBpvo2hrZl0TnLhlLIYfUO7nt7dSg3hURcP1/JiDEgphuXBqVKLRFsfA3oJAf3mI6Cr2OjTwGYdqWGzzmZD6WoYVCfehdqsZKjuuwS1oB1Q+5piHac3oaxBzZ9vLZ4nHEeesoXg6niDPSYWP9yUgD5PHu48eKE64krHcErchHIEuRysTpAXjObQWIYEHiV4EQYEojp5aEoyY+IIpOQugKYYOnIdJXrdJ63PtWwXMQM6m6SVT4gfZkbHV0XHsVtaQ3K8yoJr0YfwoHDDq5ZiQSqDik/B4Q9taYtn18gyNia1qGJsmTrGlUjK2FJ1jCjRwOASDnkxDvN95ZD/og5yl0qgfCMJ2leDoeksHaFHXYOJVyrMkm/DrPwMzGr2wmjnLGipthyHL0W7t9pDkduwF2U3lmGFtvbTdyirt0OreT+iWwPRUrUBbSkLkT/fCUZwKVYikBMwpDlPXNzLwuAQ2rWX8KzUh2dDDJyLSmB7/S5Mf3WRWiR6CPSezkCXQs6qBnLCKsheyoXqnTCoL9oOFd9/Qtl9KJT6UJMX3/zhCz8iuCjhiviSYtMx3ZTJBN8lCE7eIRgF0p6krRRaRBDskTTGySBKws5SuUjJHYUiMQdpzCUE0Q3y5MnSDhJJQg5JUvjSgO5hHZofaioGmvc40IycMgbRtJktjgOZ5Ma9irzSg46xYHcaVEZevkgBHqUWGFK+FENKQ+BdGAq/wiMYWbwHI6h4FwTDOes0BMKFMHxPNg9qn1dANakYanfuQSs5FJoTpaP1qBswsSGgb9+EeUU0Af0LDH4dBhXlmv3wajuOpPYQFDcEojxtNQ6sn9ZzUsiofjfUWg/iYOt+tJatRtvN95DqZgxNuKTKwLV4Jdyqc8Wz1uCGTLjmDIVDQqewQ8anwpJi6GsYkF4Ey2O/QvsfXKlJIgboAwT07s5AZ0G1TylUIsuhdKMI6vcuQ3PVAqg+9UZ8JvGEywiuNoIwD4IzaV2X+HSa1otgE3+NwJImVkycG0kx8snfyUZJW+QFApeSu+hN9BpIn6n+ZBp9bqDv+C8Fum+8IpzzJNOmR3UhTaGFcC07iAHXmamuZw28C/S/aIt+CcthF7+ToN0EQdhqOFzcBu/Sm/ApvAGX3DzYXIiF9jtWTJf74L6ZC83UfGg8SId2xnloSZKxp+gWjC0J6KSrMK8KhmnlSugtInpkCzaBV78Hl5oPoaLpECrLt+Bi4jfgS7t1q+YDUGsPwj5KDFsLlqD97JuIpmpZmP+TftM1ezjlxsOllM4H3eReDWHwKrOBW84jqMeK5OBTv4Bu6HxxgqU1s/N3MkAHSoH+ioCe+gjoJHB0s8ENLID6/UJo3E+GVlwoNEwY278tXhR50RhmeexzgmM8JXjdF36MHwEoiXn70Csv6gxBm8PiRc6gJFD1HDzFpq1cP0omo5QJZAfqQzH0f6uHZjQgeR4cC/IJZCnUtSkYVPAWBiX2/CdU/S7Ql+9TgtFCTaiP0qAEXA2yRsqwuzECziWZcM4tgv2DSljF7ID+l+JNh9+hY38HuvcYmLOhk5EEnVPfQOmpW+33YGaXhj53E2BWuxvGebOh5cPUX/sWSgXrsa9mB2qaDqCK4C7I2IA3jn8u7tat2g6D034MIbWb0fZgHlr2DscXUhNNuYdkYRPrg/7JiXDMLYBrZS6GNEZgVJM/JjWY4I16G4xr/BCDq2nKjjoAvY+Zpwo7eXBskQK9Swr0lEdAn4a2wk3o/DMNWmn54KYUQIuZsebGQuXFQ42H4kfNk4QckSOkNZ1lGkGAUoInOKkAm2jJsVtH+om9Nj9ytZxNcNdhljXByo+JJXj/i4G2u2xM02YInPJLxFB7VudTPH0ZHkWu0hbPpwHpfnAszoFDVgVsb1fDMmoL9L8S7wTFQE/1AvR33oB+QSp0czKgl34B2iO9uwJCKib5SGaZjbqLPlkhMG1YDr1gQyioSs24vQTDitagsnIL6loCUVu9C2EJK9FjYtsWBNP2Q7hb9A155zdwY5mTeGexo0w32hEcy2F7JQaOqZfgk38KY6rDMKFBiGHNt+iGPgCNYd0/s/sbAb2fgN5JQC9Wq8bkR0AzioOOx3Xo30mGbnY+tNMKoJOQCm03qfnFxRf6E1yUFAqZJcyuZRWuQmB+TWHJcgJfkjPxImcSSIUsXviMx/O9DvqfALrPDjb6nhuBAWkZ5JFKKTYuIqhz4FUdAo9CGwzO7Ra2LjUg0w9OxdlwyKxAXzHQm8lDi4HeAT1WMPSHnYXR7aswKE6Gfl4K9PdfgZ6+uG8XSmMbKyXD/LsEmFduglH2NHA7rA3Hvg+Ve1/gYO4KNFRvQUPLQVRU7MG4yn1dJ4eiULAo3JhW9xsa77+Hml8GY8FQ425uAM5wRRivNoPlTjs4XhoH35oLGFZ/S/wglyDkbWmrrsUAvY+A3kHlSwJ6ihKzCvLnuQyElmIs9LdfhmHxA+jn5kI3jcrRFOjxU6DTbTx9DybsOBh0f034EeYEVyaFD0IYhnQ9y1pTIsiPvU5AnKYkUBL78yKmQhDLgDRPSWtPp/HFkFtHqFCfRBr73wX67qsD+qFsEubCnqKBAZllcCkkT12RjSHVMfApH0bJXfcH+aQGZg6FU1EWeeoK2NwgoMM3Q++zP/fq/Smf2g392ZEwzk2Acfl9GBHURmuSYPyn132oHBizH8B8wjX0SadQI2cWtOZZQbHTdEgRn8XN93EiczFayn5GU3Mg7lJMPab5SEeoCWZZ0TF4Ne/A/ZSPUbXdDz9Qdddrrk/KtcwR7jX34VXDzGCFGFT0GzyLu922x069kdiv145tOu34jlOHBWoz4arUAZQt0LYOhmFcHJ2H6zAsYnZDc2FwKhv60+m9UQrLUJ4hSYQAVhpM1O6jj30EDD33Q6frZyoY8cMVaWZZR560kuB5V9H6iVUas+Py5L1/IHsT2ZldR4nEkMdkUd8Y8tYd43mLIMhYhenDWvgjQSQiGFOkiEv0rEAzK2u8yG10M2WwBWFdb6q9NKDNd6rCOuYD9L2VI/57QMfcEniU5cCnJgG+lR9haAnz4MzT5ZjmA4e8HBqnGtYXamF+nK7bpx0uwHxoqGyE3sKD5HHjYVJ1C6Z5qTD5Ph2G1hnQEV/0LBhxU2E+4yYsbgTCJGsuNBfYQrnjA0CPxDo2CRYJ0xGesgD1ZWvQ3LQbKeSJ54uC0UcUDVVRGExFR/FB2y7cSf4C+Zv9sXSUeQ9P2z2pQdnmBHQsPKqKqFCyWJsM75o1GMw8O/iEhFZs/KK9CD9wRfhCTYTP1dqwnBOHrQYz8IuuH5ZxxI/MLQZH5kfoeu6D4cVQGNecgXHFbRgXZsD4Xg5MjqfDeE0KTBbRDLXsLiwOR8HkxCJoOs+Eavdr08ZBBGdYP7rYzAZILsH3LYUYtgSsAXlYRwLqW0r8Ksl2id4/Onaz47IE+kayUfwddYhsgwkqXRrLgOpHEuyhVF9B7ytoTAL//qNjeFagGfGEi5nvYPEifqOx/ek4p1J/8aKBWC8N6Icy2+oL6zOhECTmw46SuoHZpXBn/pK7/DK8K1bCp3Q0vAv7wqfIBD55OuS9teFVYASPfAFccseThw+E4Ho5LOMqYB6ZCeOdK6H1bleJH2sOOPZradqlC3otDqY5F2GafQmmCZdgFnMBZteEML2yCnprh0CZWVp66gbDuD5Q2uSLUacm43jSB0gq+h55JeuRX7wRqUUbkJL8DS4GTcPqCdZgduZ6XiZjgvcp9fIY3aAH/yY+3KvcMDBjLSXQBXDML4VbaQG8a9PgUxcOzyIneKY/Or6FHDO8q7INY+RiMFJaJijE4i2VeEylej/FDs99TAPH8Dvofv8bDK/vhVHxMRhX0W+vOgXTijiY5UXANGkNnYeRUGN2VrsPNx6XVaQNgRNM03sBgUjeOKJJ/Cr+LNzFsg61YB5/elyKtic0qM031CaZAG0gqJnVEuYBIoI49gy9D6DXrQR3GoU2j3YE+WE2FI9TGBG1FLywnhNbPt1Y/OhY+o5iGqsGNmdLaVxfqZUB+g0Iztwi2AOkNZ3FCzOm30bHeHK9tKYHKfPZMFhlAtM9c2EpjALv93zY3qlE/8xyOOUVUTiSBrfy83CvDIdbRZC4uJSGwzHzd0qgkmEVfRnGW/dC79vPobtkFLRmm0HDpVt43MnrzoOm/dfQeeOf0P3wB+guJogXrIDuhHfAsdOFbKdQ5GkaYQbNNYNht2c8/AOnYNKB6Ri//Q14zRwIuohdPC76pCbWKGFCkx9GNC7B0NZD8CiJh8Odi7A59zud7EuwvU4hVUYZBhUXwqsqA56V0RiUM1Dam36UoiyFuprQhc6fRZuKKhV5+rcLKD2hrPQ+NPsvgNb0j6C9eCG0v/kU2l9/BK0ZM8EdRJQ833noG8Qib6lDkA0lYD6i8GIJlffZ/IhhbJtQjW4TP164EiWWztTnH9T+a4L/MxpjAn02hWWYDAQnefSZzm7Io7zDOpiSzGh3grwPwd3zDccPZdH4phBEkXcWBrD4wlE07qObw5pmBUGsK43T/YPfgmAFWEe5U2EeCXhGcV5nQ3u2KrTf6w+jdTNhtud7mB/ZC4vg43QAwbAMDYLF0e3os+8HGP80D7oLx0F9dD+oj9AGZ4Y85K0Yj/Vs3kQiFgeybFPIySiDzdwAz9O3JzHjPNtYk8gjv948FOOatlGodR0Dk07Bau9n0F8wFBp+luBO1CXeuDD51Q3830PRP7UIzgUlcC0vhHPRSdic6eI53ecT3W0sKyjI2EFRxhzyz3sOO8voBkEUTclYhAyshCwr642PR79diwlbBOEs8vLMFjgbbuelhpeoz5rEDxsNNl/+9ON5RWJOLsXCysQdh5IhWWbzhUmoel6v/l/RxGpZTKgbh3EtEZQMp5AX2ASd2f3AVu7695ky/7nOuc2U/BZSCFIGp+I82F/rfprsVa/+Mk0sZ2F0tTvGNZ+gRO8B7C/HQ92beWine+/IDWDBbJUmbBN/hUNOGRyyStH34vfQeP3ZV4R61atXIu9Kefg1rIB/XRJciwso9nymLXmxbP+wxcCsVAxIKwfv1AZoDH96jN6rXr1SuVeowKsuFINrs+BSXATbc59JLU/XwCwdDMw7B/vUEpgHfQYZ7v9HCNar/2E55ynDpSwYrhXF4uKUeQiY0/Oy3kM555nCITcJgmvp0F30Yo8L9KpXL1X9E2XhkPoVBuYWwbmolKDOhmv+WHiXyGNkgbTRE1pOublXkRycCz+AfUoRzPdsgKJN1w/19KpXf7n6xlnCPikE/SkWdswrozDkNoZUfIWhFTYYWaPy4a6NkgSR2XAZXSOLIWUWcCv7FP1T7sH8wFZwp7ycxz971auXIm4AG+b77MFLEKLv7ULJMy0FefCsPAOv0t0YUrIMg0s+gVfxYrgVbIJLUSzsrl2F2ZZl4L7J/Pdp/956ca969UrEna0O41/HwSJ4F3in42Fz5Trsbt5Bv3u30e9uImyvnoV15GGY/LIA6kOZP1966pZ8r3r1n5eqhwZ0F/aB4ToHGK9zh/FPHjD60RE6H1tDaaA2cdy7mvFfI+BffksPNrEksu0AAAAASUVORK5CYII=", +m}),define("Cesium/Scene/GridImageryProvider",["../Core/Color","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/Event","../Core/GeographicTilingScheme","../ThirdParty/when"],function(e,t,i,n,r,o,a){"use strict";function s(e){e=t(e,t.EMPTY_OBJECT),this._tilingScheme=i(e.tilingScheme)?e.tilingScheme:new o({ellipsoid:e.ellipsoid}),this._cells=t(e.cells,8),this._color=t(e.color,l),this._glowColor=t(e.glowColor,u),this._glowWidth=t(e.glowWidth,6),this._backgroundColor=t(e.backgroundColor,c),this._errorEvent=new r,this._tileWidth=t(e.tileWidth,256),this._tileHeight=t(e.tileHeight,256),this._canvasSize=t(e.canvasSize,256),this._canvas=this._createGridCanvas(),this._readyPromise=a.resolve(!0)}var l=new e(1,1,1,.4),u=new e(0,1,0,.05),c=new e(0,.5,0,.2);return n(s.prototype,{proxy:{get:function(){}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){}},minimumLevel:{get:function(){}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return!0}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){}},hasAlphaChannel:{get:function(){return!0}}}),s.prototype._drawGrid=function(e){for(var t=0,i=this._canvasSize,n=0;n<=this._cells;++n){var r=n/this._cells,o=1+r*(i-1);e.moveTo(o,t),e.lineTo(o,i),e.moveTo(t,o),e.lineTo(i,o)}e.stroke()},s.prototype._createGridCanvas=function(){var e=document.createElement("canvas");e.width=this._canvasSize,e.height=this._canvasSize;var t=0,i=this._canvasSize,n=e.getContext("2d"),r=this._backgroundColor.toCssColorString();n.fillStyle=r,n.fillRect(t,t,i,i);var o=this._glowColor.toCssColorString();n.strokeStyle=o,n.lineWidth=this._glowWidth,n.strokeRect(t,t,i,i),this._drawGrid(n),n.lineWidth=.5*this._glowWidth,n.strokeRect(t,t,i,i),this._drawGrid(n);var a=this._color.toCssColorString();return n.strokeStyle=a,n.lineWidth=2,n.strokeRect(t,t,i,i),n.lineWidth=1,this._drawGrid(n),e},s.prototype.getTileCredits=function(e,t,i){},s.prototype.requestImage=function(e,t,i){return this._canvas},s.prototype.pickFeatures=function(){},s}),define("Cesium/Scene/MapboxImageryProvider",["../Core/Credit","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/MapboxApi","./UrlTemplateImageryProvider"],function(e,t,i,n,r,o,a){"use strict";function s(n){n=t(n,t.EMPTY_OBJECT);var r=n.mapId,s=t(n.url,"https://api.mapbox.com/v4/");this._url=s,this._mapId=r,this._accessToken=o.getAccessToken(n.accessToken);var h=t(n.format,"png");this._format=h.replace(".","");var d=s;if(l.test(s)||(d+="/"),d+=r+"/{z}/{x}/{y}."+this._format,i(this._accessToken)&&(d+="?access_token="+this._accessToken),i(n.credit)){var p=n.credit;"string"==typeof p&&(p=new e(p)),u=p,c.length=0}this._imageryProvider=new a({url:d,proxy:n.proxy,credit:u,ellipsoid:n.ellipsoid,minimumLevel:n.minimumLevel,maximumLevel:n.maximumLevel,rectangle:n.rectangle})}var l=/\/$/,u=new e("© Mapbox © OpenStreetMap",void 0,"https://www.mapbox.com/about/maps/"),c=[new e("Improve this map",void 0,"https://www.mapbox.com/map-feedback/")];return n(s.prototype,{url:{get:function(){return this._url}},ready:{get:function(){return this._imageryProvider.ready}},readyPromise:{get:function(){return this._imageryProvider.readyPromise}},rectangle:{get:function(){return this._imageryProvider.rectangle}},tileWidth:{get:function(){return this._imageryProvider.tileWidth}},tileHeight:{get:function(){return this._imageryProvider.tileHeight}},maximumLevel:{get:function(){return this._imageryProvider.maximumLevel}},minimumLevel:{get:function(){return this._imageryProvider.minimumLevel}},tilingScheme:{get:function(){return this._imageryProvider.tilingScheme}},tileDiscardPolicy:{get:function(){return this._imageryProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._imageryProvider.errorEvent}},credit:{get:function(){return this._imageryProvider.credit}},proxy:{get:function(){return this._imageryProvider.proxy}},hasAlphaChannel:{get:function(){return this._imageryProvider.hasAlphaChannel}}}),s.prototype.getTileCredits=function(e,t,i){return c},s.prototype.requestImage=function(e,t,i){return this._imageryProvider.requestImage(e,t,i)},s.prototype.pickFeatures=function(e,t,i,n,r){return this._imageryProvider.pickFeatures(e,t,i,n,r)},s}),define("Cesium/Scene/Moon",["../Core/buildModuleUrl","../Core/Cartesian3","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/destroyObject","../Core/Ellipsoid","../Core/IauOrientationAxes","../Core/Matrix3","../Core/Matrix4","../Core/Simon1994PlanetaryPositions","../Core/Transforms","./EllipsoidPrimitive","./Material"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p){"use strict";function m(t){t=i(t,i.EMPTY_OBJECT);var r=t.textureUrl;n(r)||(r=e("Assets/Textures/moonSmall.jpg")),this.show=i(t.show,!0),this.textureUrl=r,this._ellipsoid=i(t.ellipsoid,a.MOON),this.onlySunLighting=i(t.onlySunLighting,!0),this._ellipsoidPrimitive=new d({radii:this.ellipsoid.radii,material:p.fromType(p.ImageType),depthTestEnabled:!1,_owner:this}),this._ellipsoidPrimitive.material.translucent=!1,this._axes=new s}r(m.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}});var f=new l,g=new l,v=new t,_=[];return m.prototype.update=function(e){if(this.show){var t=this._ellipsoidPrimitive;t.material.uniforms.image=this.textureUrl,t.onlySunLighting=this.onlySunLighting;var i=e.time;n(h.computeIcrfToFixedMatrix(i,f))||h.computeTemeToPseudoFixedMatrix(i,f);var r=this._axes.evaluate(i,g);l.transpose(r,r),l.multiply(f,r,r);var o=c.computeMoonPositionInEarthInertialFrame(i,v);l.multiplyByVector(f,o,o),u.fromRotationTranslation(r,o,t.modelMatrix);var a=e.commandList;return e.commandList=_,_.length=0,t.update(e),e.commandList=a,1===_.length?_[0]:void 0}},m.prototype.isDestroyed=function(){return!1},m.prototype.destroy=function(){return this._ellipsoidPrimitive=this._ellipsoidPrimitive&&this._ellipsoidPrimitive.destroy(),o(this)},m}),define("Cesium/Scene/NeverTileDiscardPolicy",[],function(){"use strict";function e(e){}return e.prototype.isReady=function(){return!0},e.prototype.shouldDiscardImage=function(e){return!1},e}),define("Cesium/Shaders/AdjustTranslucentFS",[],function(){"use strict";return"#ifdef MRT\n#extension GL_EXT_draw_buffers : enable\n#endif\n\nuniform vec4 u_bgColor;\nuniform sampler2D u_depthTexture;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main()\n{\n if (texture2D(u_depthTexture, v_textureCoordinates).r < 1.0)\n {\n#ifdef MRT\n gl_FragData[0] = u_bgColor;\n gl_FragData[1] = vec4(u_bgColor.a);\n#else\n gl_FragColor = u_bgColor;\n#endif\n return;\n }\n \n discard;\n}"}),define("Cesium/Shaders/CompositeOITFS",[],function(){"use strict";return"/**\n * Compositing for Weighted Blended Order-Independent Transparency. See:\n * - http://jcgt.org/published/0002/02/09/\n * - http://casual-effects.blogspot.com/2014/03/weighted-blended-order-independent.html\n */\n \nuniform sampler2D u_opaque;\nuniform sampler2D u_accumulation;\nuniform sampler2D u_revealage;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main()\n{\n vec4 opaque = texture2D(u_opaque, v_textureCoordinates);\n vec4 accum = texture2D(u_accumulation, v_textureCoordinates);\n float r = texture2D(u_revealage, v_textureCoordinates).r;\n \n#ifdef MRT\n vec4 transparent = vec4(accum.rgb / clamp(r, 1e-4, 5e4), accum.a);\n#else\n vec4 transparent = vec4(accum.rgb / clamp(accum.a, 1e-4, 5e4), r);\n#endif\n \n gl_FragColor = (1.0 - transparent.a) * transparent + transparent.a * opaque;\n}\n"}),define("Cesium/Scene/OIT",["../Core/BoundingRectangle","../Core/Color","../Core/defined","../Core/destroyObject","../Core/PixelFormat","../Renderer/ClearCommand","../Renderer/DrawCommand","../Renderer/Framebuffer","../Renderer/PixelDatatype","../Renderer/RenderState","../Renderer/ShaderProgram","../Renderer/ShaderSource","../Renderer/Texture","../Renderer/WebGLConstants","../Shaders/AdjustTranslucentFS","../Shaders/CompositeOITFS","./BlendEquation","./BlendFunction"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g,v){"use strict";function _(i){this._translucentMultipassSupport=!1,this._translucentMRTSupport=!1;var n=i.floatingPointTexture&&i.depthTexture;this._translucentMRTSupport=i.drawBuffers&&n,this._translucentMultipassSupport=!this._translucentMRTSupport&&n,this._opaqueFBO=void 0,this._opaqueTexture=void 0,this._depthStencilTexture=void 0,this._accumulationTexture=void 0,this._translucentFBO=void 0,this._alphaFBO=void 0,this._adjustTranslucentFBO=void 0,this._adjustAlphaFBO=void 0,this._opaqueClearCommand=new o({color:new t(0,0,0,0),owner:this}),this._translucentMRTClearCommand=new o({color:new t(0,0,0,1),owner:this}),this._translucentMultipassClearCommand=new o({color:new t(0,0,0,0),owner:this}),this._alphaClearCommand=new o({color:new t(1,1,1,1),owner:this}),this._translucentRenderStateCache={},this._alphaRenderStateCache={},this._translucentShaderCache={},this._alphaShaderCache={},this._compositeCommand=void 0,this._adjustTranslucentCommand=void 0,this._adjustAlphaCommand=void 0,this._viewport=new e,this._rs=void 0}function y(e){e._accumulationTexture=e._accumulationTexture&&!e._accumulationTexture.isDestroyed()&&e._accumulationTexture.destroy(),e._revealageTexture=e._revealageTexture&&!e._revealageTexture.isDestroyed()&&e._revealageTexture.destroy()}function C(e){e._translucentFBO=e._translucentFBO&&!e._translucentFBO.isDestroyed()&&e._translucentFBO.destroy(),e._alphaFBO=e._alphaFBO&&!e._alphaFBO.isDestroyed()&&e._alphaFBO.destroy(),e._adjustTranslucentFBO=e._adjustTranslucentFBO&&!e._adjustTranslucentFBO.isDestroyed()&&e._adjustTranslucentFBO.destroy(),e._adjustAlphaFBO=e._adjustAlphaFBO&&!e._adjustAlphaFBO.isDestroyed()&&e._adjustAlphaFBO.destroy()}function w(e){y(e),C(e)}function E(e,t,i,n){y(e),e._accumulationTexture=new d({context:t,width:i,height:n,pixelFormat:r.RGBA,pixelDatatype:l.FLOAT}),e._revealageTexture=new d({context:t,width:i,height:n,pixelFormat:r.RGBA,pixelDatatype:l.FLOAT})}function b(e,t){C(e);var i=p.FRAMEBUFFER_COMPLETE,n=!0;if(e._translucentMRTSupport&&(e._translucentFBO=new s({context:t,colorTextures:[e._accumulationTexture,e._revealageTexture],depthStencilTexture:e._depthStencilTexture,destroyAttachments:!1}),e._adjustTranslucentFBO=new s({context:t,colorTextures:[e._accumulationTexture,e._revealageTexture],destroyAttachments:!1}),(e._translucentFBO.status!==i||e._adjustTranslucentFBO.status!==i)&&(C(e),e._translucentMRTSupport=!1)),!e._translucentMRTSupport){e._translucentFBO=new s({context:t,colorTextures:[e._accumulationTexture],depthStencilTexture:e._depthStencilTexture,destroyAttachments:!1}),e._alphaFBO=new s({context:t,colorTextures:[e._revealageTexture],depthStencilTexture:e._depthStencilTexture,destroyAttachments:!1}),e._adjustTranslucentFBO=new s({context:t,colorTextures:[e._accumulationTexture],destroyAttachments:!1}),e._adjustAlphaFBO=new s({context:t,colorTextures:[e._revealageTexture],destroyAttachments:!1});var r=e._translucentFBO.status===i,o=e._alphaFBO.status===i,a=e._adjustTranslucentFBO.status===i,l=e._adjustAlphaFBO.status===i;r&&o&&a&&l||(w(e),e._translucentMultipassSupport=!1,n=!1)}return n}function S(e,t,n,r){var o=n[r.id];if(!i(o)){var a=u.getState(r);a.depthMask=!1,a.blending=t,o=u.fromCache(a),n[r.id]=o}return o}function T(e,t,i){return S(t,L,e._translucentRenderStateCache,i)}function x(e,t,i){return S(t,N,e._translucentRenderStateCache,i)}function A(e,t,i){return S(t,F,e._alphaRenderStateCache,i)}function P(e,t,n,r){var o=t.id,a=n[o];if(!i(a)){var s=t._attributeLocations,l=t.fragmentShaderSource.clone();l.sources=l.sources.map(function(e){return e=h.replaceMain(e,"czm_translucent_main"),e=e.replace(/gl_FragColor/g,"czm_gl_FragColor"),e=e.replace(/\bdiscard\b/g,"czm_discard = true"),e=e.replace(/czm_phong/g,"czm_translucentPhong")}),l.sources.splice(0,0,(-1!==r.indexOf("gl_FragData")?"#extension GL_EXT_draw_buffers : enable \n":"")+"vec4 czm_gl_FragColor;\nbool czm_discard = false;\n"),l.sources.push("void main()\n{\n czm_translucent_main();\n if (czm_discard)\n {\n discard;\n }\n"+r+"}\n"),a=c.fromCache({context:e,vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:l,attributeLocations:s}),n[o]=a}return a}function M(e,t,i){return P(t,i,e._translucentShaderCache,k)}function D(e,t,i){return P(t,i,e._translucentShaderCache,B)}function I(e,t,i){return P(t,i,e._alphaShaderCache,z)}function R(e,t,i,n,r){var o,a,s,l=t.context,u=n.framebuffer,c=r.length;n.framebuffer=e._adjustTranslucentFBO,e._adjustTranslucentCommand.execute(l,n),n.framebuffer=e._adjustAlphaFBO,e._adjustAlphaCommand.execute(l,n);var h=e._opaqueFBO;for(n.framebuffer=e._translucentFBO,s=0;c>s;++s)o=r[s],a=o.derivedCommands.oit.translucentCommand,i(a,t,l,n,h);for(n.framebuffer=e._alphaFBO,s=0;c>s;++s)o=r[s],a=o.derivedCommands.oit.alphaCommand,i(a,t,l,n,h);n.framebuffer=u}function O(e,t,i,n,r){var o=t.context,a=n.framebuffer,s=r.length;n.framebuffer=e._adjustTranslucentFBO,e._adjustTranslucentCommand.execute(o,n);var l=e._opaqueFBO;n.framebuffer=e._translucentFBO;for(var u=0;s>u;++u){var c=r[u],h=c.derivedCommands.oit.translucentCommand;i(h,t,o,n,l)}n.framebuffer=a}_.prototype.update=function(t,n){if(this.isSupported()){this._opaqueFBO=n,this._opaqueTexture=n.getColorTexture(0),this._depthStencilTexture=n.depthStencilTexture;var r=this._opaqueTexture.width,o=this._opaqueTexture.height,a=this._accumulationTexture,s=!i(a)||a.width!==r||a.height!==o;if(s&&E(this,t,r,o),i(this._translucentFBO)&&!s||b(this,t)){var l,c,d=this;i(this._compositeCommand)||(l=new h({sources:[f]}),this._translucentMRTSupport&&l.defines.push("MRT"),c={u_opaque:function(){return d._opaqueTexture},u_accumulation:function(){return d._accumulationTexture},u_revealage:function(){return d._revealageTexture}},this._compositeCommand=t.createViewportQuadCommand(l,{uniformMap:c,owner:this})),i(this._adjustTranslucentCommand)||(this._translucentMRTSupport?(l=new h({defines:["MRT"],sources:[m]}),c={u_bgColor:function(){return d._translucentMRTClearCommand.color},u_depthTexture:function(){return d._depthStencilTexture}},this._adjustTranslucentCommand=t.createViewportQuadCommand(l,{uniformMap:c,owner:this})):this._translucentMultipassSupport&&(l=new h({sources:[m]}),c={u_bgColor:function(){return d._translucentMultipassClearCommand.color},u_depthTexture:function(){return d._depthStencilTexture}},this._adjustTranslucentCommand=t.createViewportQuadCommand(l,{uniformMap:c,owner:this}),c={u_bgColor:function(){return d._alphaClearCommand.color},u_depthTexture:function(){return d._depthStencilTexture}},this._adjustAlphaCommand=t.createViewportQuadCommand(l,{uniformMap:c,owner:this}))),this._viewport.width=r,this._viewport.height=o,i(this._rs)&&e.equals(this._viewport,this._rs.viewport)||(this._rs=u.fromCache({viewport:this._viewport})),i(this._compositeCommand)&&(this._compositeCommand.renderState=this._rs),this._adjustTranslucentCommand&&(this._adjustTranslucentCommand.renderState=this._rs),i(this._adjustAlphaCommand)&&(this._adjustAlphaCommand.renderState=this._rs)}}};var L={enabled:!0,color:new t(0,0,0,0),equationRgb:g.ADD,equationAlpha:g.ADD,functionSourceRgb:v.ONE,functionDestinationRgb:v.ONE,functionSourceAlpha:v.ZERO,functionDestinationAlpha:v.ONE_MINUS_SOURCE_ALPHA},N={enabled:!0,color:new t(0,0,0,0),equationRgb:g.ADD,equationAlpha:g.ADD,functionSourceRgb:v.ONE,functionDestinationRgb:v.ONE,functionSourceAlpha:v.ONE,functionDestinationAlpha:v.ONE},F={enabled:!0,color:new t(0,0,0,0),equationRgb:g.ADD,equationAlpha:g.ADD,functionSourceRgb:v.ZERO,functionDestinationRgb:v.ONE_MINUS_SOURCE_ALPHA,functionSourceAlpha:v.ZERO,functionDestinationAlpha:v.ONE_MINUS_SOURCE_ALPHA},k=" vec3 Ci = czm_gl_FragColor.rgb * czm_gl_FragColor.a;\n float ai = czm_gl_FragColor.a;\n float wzi = czm_alphaWeight(ai);\n gl_FragData[0] = vec4(Ci * wzi, ai);\n gl_FragData[1] = vec4(ai * wzi);\n",B=" vec3 Ci = czm_gl_FragColor.rgb * czm_gl_FragColor.a;\n float ai = czm_gl_FragColor.a;\n float wzi = czm_alphaWeight(ai);\n gl_FragColor = vec4(Ci, ai) * wzi;\n",z=" float ai = czm_gl_FragColor.a;\n gl_FragColor = vec4(ai);\n";return _.prototype.createDerivedCommands=function(e,t,n){if(i(n)||(n={}),this._translucentMRTSupport){var r,o;i(n.translucentCommand)&&(r=n.translucentCommand.shaderProgram,o=n.translucentCommand.renderState),n.translucentCommand=a.shallowClone(e,n.translucentCommand),i(r)&&n.shaderProgramId===e.shaderProgram.id?(n.translucentCommand.shaderProgram=r,n.translucentCommand.renderState=o):(n.translucentCommand.shaderProgram=M(this,t,e.shaderProgram),n.translucentCommand.renderState=T(this,t,e.renderState),n.shaderProgramId=e.shaderProgram.id)}else{var s,l,u,c;i(n.translucentCommand)&&(s=n.translucentCommand.shaderProgram,l=n.translucentCommand.renderState,u=n.alphaCommand.shaderProgram,c=n.alphaCommand.renderState),n.translucentCommand=a.shallowClone(e,n.translucentCommand),n.alphaCommand=a.shallowClone(e,n.alphaCommand),i(s)&&n.shaderProgramId===e.shaderProgram.id?(n.translucentCommand.shaderProgram=s,n.translucentCommand.renderState=l,n.alphaCommand.shaderProgram=u,n.alphaCommand.renderState=c):(n.translucentCommand.shaderProgram=D(this,t,e.shaderProgram),n.translucentCommand.renderState=x(this,t,e.renderState),n.alphaCommand.shaderProgram=I(this,t,e.shaderProgram),n.alphaCommand.renderState=A(this,t,e.renderState),n.shaderProgramId=e.shaderProgram.id)}return n},_.prototype.executeCommands=function(e,t,i,n){return this._translucentMRTSupport?void O(this,e,t,i,n):void R(this,e,t,i,n)},_.prototype.execute=function(e,t){this._compositeCommand.execute(e,t)},_.prototype.clear=function(e,i,n){var r=i.framebuffer;i.framebuffer=this._opaqueFBO,t.clone(n,this._opaqueClearCommand.color),this._opaqueClearCommand.execute(e,i),i.framebuffer=this._translucentFBO;var o=this._translucentMRTSupport?this._translucentMRTClearCommand:this._translucentMultipassClearCommand;o.execute(e,i),this._translucentMultipassSupport&&(i.framebuffer=this._alphaFBO,this._alphaClearCommand.execute(e,i)),i.framebuffer=r},_.prototype.isSupported=function(){return this._translucentMRTSupport||this._translucentMultipassSupport},_.prototype.isDestroyed=function(){return!1},_.prototype.destroy=function(){w(this),i(this._compositeCommand)&&(this._compositeCommand.shaderProgram=this._compositeCommand.shaderProgram&&this._compositeCommand.shaderProgram.destroy()),i(this._adjustTranslucentCommand)&&(this._adjustTranslucentCommand.shaderProgram=this._adjustTranslucentCommand.shaderProgram&&this._adjustTranslucentCommand.shaderProgram.destroy()),i(this._adjustAlphaCommand)&&(this._adjustAlphaCommand.shaderProgram=this._adjustAlphaCommand.shaderProgram&&this._adjustAlphaCommand.shaderProgram.destroy());var e,t=this._translucentShaderCache;for(e in t)t.hasOwnProperty(e)&&i(t[e])&&t[e].destroy();this._translucentShaderCache={},t=this._alphaShaderCache;for(e in t)t.hasOwnProperty(e)&&i(t[e])&&t[e].destroy();return this._alphaShaderCache={},n(this)},_}),define("Cesium/Scene/OrthographicFrustum",["../Core/Cartesian2","../Core/Cartesian3","../Core/Cartesian4","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Matrix4","./CullingVolume"],function(e,t,i,n,r,o,a,s){"use strict";function l(){this.left=void 0,this._left=void 0,this.right=void 0,this._right=void 0,this.top=void 0,this._top=void 0,this.bottom=void 0,this._bottom=void 0,this.near=1,this._near=this.near,this.far=5e8,this._far=this.far,this._cullingVolume=new s,this._orthographicMatrix=new a}function u(e){(e.top!==e._top||e.bottom!==e._bottom||e.left!==e._left||e.right!==e._right||e.near!==e._near||e.far!==e._far)&&(e._left=e.left,e._right=e.right,e._top=e.top,e._bottom=e.bottom,e._near=e.near,e._far=e.far,e._orthographicMatrix=a.computeOrthographicOffCenter(e.left,e.right,e.bottom,e.top,e.near,e.far,e._orthographicMatrix))}r(l.prototype,{projectionMatrix:{get:function(){return u(this),this._orthographicMatrix}}});var c=new t,h=new t,d=new t,p=new t;return l.prototype.computeCullingVolume=function(e,r,o){var a=this._cullingVolume.planes,s=this.top,l=this.bottom,u=this.right,m=this.left,f=this.near,g=this.far,v=t.cross(r,o,c),_=h;t.multiplyByScalar(r,f,_),t.add(e,_,_);var y=d;t.multiplyByScalar(v,m,y),t.add(_,y,y);var C=a[0];return n(C)||(C=a[0]=new i),C.x=v.x,C.y=v.y,C.z=v.z,C.w=-t.dot(v,y),t.multiplyByScalar(v,u,y),t.add(_,y,y),C=a[1],n(C)||(C=a[1]=new i),C.x=-v.x,C.y=-v.y,C.z=-v.z,C.w=-t.dot(t.negate(v,p),y),t.multiplyByScalar(o,l,y),t.add(_,y,y),C=a[2],n(C)||(C=a[2]=new i),C.x=o.x,C.y=o.y,C.z=o.z,C.w=-t.dot(o,y),t.multiplyByScalar(o,s,y),t.add(_,y,y),C=a[3],n(C)||(C=a[3]=new i),C.x=-o.x,C.y=-o.y,C.z=-o.z,C.w=-t.dot(t.negate(o,p),y),C=a[4],n(C)||(C=a[4]=new i),C.x=r.x,C.y=r.y,C.z=r.z,C.w=-t.dot(r,_),t.multiplyByScalar(r,g,y),t.add(e,y,y),C=a[5],n(C)||(C=a[5]=new i),C.x=-r.x,C.y=-r.y,C.z=-r.z,C.w=-t.dot(t.negate(r,p),y),this._cullingVolume},l.prototype.getPixelDimensions=function(e,t,i,n){u(this);var r=this.right-this.left,o=this.top-this.bottom,a=r/e,s=o/t;return n.x=a,n.y=s,n},l.prototype.clone=function(e){return n(e)||(e=new l),e.left=this.left,e.right=this.right,e.top=this.top,e.bottom=this.bottom,e.near=this.near,e.far=this.far,e._left=void 0,e._right=void 0,e._top=void 0,e._bottom=void 0,e._near=void 0,e._far=void 0,e},l.prototype.equals=function(e){return n(e)&&this.right===e.right&&this.left===e.left&&this.top===e.top&&this.bottom===e.bottom&&this.near===e.near&&this.far===e.far},l}),define("Cesium/Widgets/getElement",["../Core/DeveloperError"],function(e){"use strict";function t(e){if("string"==typeof e){var t=document.getElementById(e);e=t}return e}return t}),define("Cesium/Scene/PerformanceDisplay",["../Core/Color","../Core/defaultValue","../Core/defined","../Core/destroyObject","../Core/DeveloperError","../Core/getTimestamp","../Widgets/getElement"],function(e,t,i,n,r,o,a){"use strict";function s(e){e=t(e,t.EMPTY_OBJECT);var n=a(e.container);if(!i(n))throw new r("container is required");this._container=n;var o=document.createElement("div");o.className="cesium-performanceDisplay";var s=document.createElement("div");s.className="cesium-performanceDisplay-fps",this._fpsText=document.createTextNode(""),s.appendChild(this._fpsText);var l=document.createElement("div");l.className="cesium-performanceDisplay-ms",this._msText=document.createTextNode(""),l.appendChild(this._msText),o.appendChild(l),o.appendChild(s),this._container.appendChild(o),this._lastFpsSampleTime=void 0,this._frameCount=0,this._time=void 0,this._fps=0,this._frameTime=0}return s.prototype.update=function(){if(!i(this._time))return this._lastFpsSampleTime=o(),void(this._time=o());var e=this._time,t=o();this._time=t;var n=t-e;this._frameCount++;var r=this._fps,a=t-this._lastFpsSampleTime;a>1e3&&(r=1e3*this._frameCount/a|0,this._lastFpsSampleTime=t,this._frameCount=0),r!==this._fps&&(this._fpsText.nodeValue=r+" FPS",this._fps=r),n!==this._frameTime&&(this._msText.nodeValue=n.toFixed(2)+" MS",this._frameTime=n)},s.prototype.destroy=function(){return n(this)},s}),define("Cesium/Scene/PickDepth",["../Core/defined","../Core/defineProperties","../Core/destroyObject","../Core/PixelFormat","../Renderer/Framebuffer","../Renderer/PixelDatatype","../Renderer/RenderState","../Renderer/Texture","../Shaders/PostProcessFilters/PassThrough"],function(e,t,i,n,r,o,a,s,l){"use strict";function u(){this.framebuffer=void 0,this._depthTexture=void 0,this._textureToCopy=void 0,this._copyDepthCommand=void 0,this._debugPickDepthViewportCommand=void 0}function c(t,i,n){if(!e(t._debugPickDepthViewportCommand)){var r="uniform sampler2D u_texture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n float z_window = czm_unpackDepth(texture2D(u_texture, v_textureCoordinates));\n float n_range = czm_depthRange.near;\n float f_range = czm_depthRange.far;\n float z_ndc = (2.0 * z_window - n_range - f_range) / (f_range - n_range);\n float scale = pow(z_ndc * 0.5 + 0.5, 8.0);\n gl_FragColor = vec4(mix(vec3(0.0), vec3(1.0), scale), 1.0);\n}\n";t._debugPickDepthViewportCommand=i.createViewportQuadCommand(r,{uniformMap:{u_texture:function(){return t._depthTexture}},owner:t})}t._debugPickDepthViewportCommand.execute(i,n)}function h(e){e._depthTexture=e._depthTexture&&!e._depthTexture.isDestroyed()&&e._depthTexture.destroy()}function d(e){e.framebuffer=e.framebuffer&&!e.framebuffer.isDestroyed()&&e.framebuffer.destroy()}function p(e,t,i,r){e._depthTexture=new s({context:t,width:i,height:r,pixelFormat:n.RGBA,pixelDatatype:o.UNSIGNED_BYTE})}function m(e,t,i,n){h(e),d(e),p(e,t,i,n),e.framebuffer=new r({context:t,colorTextures:[e._depthTexture],destroyAttachments:!1})}function f(t,i,n){var r=n.width,o=n.height,a=t._depthTexture,s=!e(a)||a.width!==r||a.height!==o;(!e(t.framebuffer)||s)&&m(t,i,r,o)}function g(t,i,n){if(!e(t._copyDepthCommand)){var r="uniform sampler2D u_texture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n gl_FragColor = czm_packDepth(texture2D(u_texture, v_textureCoordinates).r);\n}\n";t._copyDepthCommand=i.createViewportQuadCommand(r,{renderState:a.fromCache(),uniformMap:{u_texture:function(){return t._textureToCopy}},owner:t})}t._textureToCopy=n,t._copyDepthCommand.framebuffer=t.framebuffer}return u.prototype.executeDebugPickDepth=function(e,t){c(this,e,t)},u.prototype.update=function(e,t){f(this,e,t),g(this,e,t)},u.prototype.executeCopyDepth=function(e,t){this._copyDepthCommand.execute(e,t)},u.prototype.isDestroyed=function(){return!1},u.prototype.destroy=function(){return h(this),d(this),this._copyDepthCommand.shaderProgram=e(this._copyDepthCommand.shaderProgram)&&this._copyDepthCommand.shaderProgram.destroy(),i(this)},u}),define("Cesium/Shaders/Appearances/PointAppearanceFS",[],function(){"use strict";return"uniform vec4 highlightColor;\n\nvarying vec3 v_color;\n\nvoid main()\n{\n gl_FragColor = vec4(v_color * highlightColor.rgb, highlightColor.a);\n}\n"}),define("Cesium/Shaders/Appearances/PointAppearanceVS",[],function(){"use strict";return"attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 color;\n\nuniform float pointSize;\n\nvarying vec3 v_positionEC;\nvarying vec3 v_color;\n\nvoid main() \n{\n v_color = color;\n gl_Position = czm_modelViewProjectionRelativeToEye * czm_computePosition();\n gl_PointSize = pointSize;\n}\n"}),define("Cesium/Scene/PointAppearance",["../Core/clone","../Core/Color","../Core/combine","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/VertexFormat","../Shaders/Appearances/PointAppearanceFS","../Shaders/Appearances/PointAppearanceVS","./Appearance"],function(e,t,i,n,r,o,a,s,l,u){"use strict";function c(e){e=n(e,n.EMPTY_OBJECT),this._vertexShaderSource=n(e.vertexShaderSource,l),this._fragmentShaderSource=n(e.fragmentShaderSource,s),this._renderState=u.getDefaultRenderState(!1,!1,e.renderState),this._pointSize=n(e.pointSize,2),this._highlightColor=r(e.highlightColor)?e.highlightColor:new t,this.material=void 0,this.translucent=n(e.translucent,!1),this.uniforms={highlightColor:this._highlightColor,pointSize:this._pointSize};var o=e.uniforms;this.uniforms=i(this.uniforms,o,!0)}return o(c.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return!1}},vertexFormat:{get:function(){return c.VERTEX_FORMAT}},pixelSize:{get:function(){return this._pointSize}}}),c.VERTEX_FORMAT=a.POSITION_AND_COLOR,c.prototype.getFragmentShaderSource=u.prototype.getFragmentShaderSource,c.prototype.isTranslucent=u.prototype.isTranslucent,c.prototype.getRenderState=u.prototype.getRenderState,c}),define("Cesium/Scene/PrimitiveCollection",["../Core/createGuid","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/destroyObject","../Core/DeveloperError"],function(e,t,i,n,r,o){"use strict";function a(i){i=t(i,t.EMPTY_OBJECT),this._primitives=[],this._guid=e(),this.show=t(i.show,!0),this.destroyPrimitives=t(i.destroyPrimitives,!0)}function s(e,t){return e._primitives.indexOf(t)}return n(a.prototype,{length:{get:function(){return this._primitives.length}}}),a.prototype.add=function(e){var t=e._external=e._external||{},i=t._composites=t._composites||{};return i[this._guid]={collection:this},this._primitives.push(e),e},a.prototype.remove=function(e){if(this.contains(e)){var t=this._primitives.indexOf(e);if(-1!==t)return this._primitives.splice(t,1),delete e._external._composites[this._guid],this.destroyPrimitives&&e.destroy(),!0}return!1},a.prototype.removeAndDestroy=function(e){var t=this.remove(e);return t&&!this.destroyPrimitives&&e.destroy(),t},a.prototype.removeAll=function(){if(this.destroyPrimitives)for(var e=this._primitives,t=e.length,i=0;t>i;++i)e[i].destroy();this._primitives=[]},a.prototype.contains=function(e){return!!(i(e)&&e._external&&e._external._composites&&e._external._composites[this._guid])},a.prototype.raise=function(e){if(i(e)){var t=s(this,e),n=this._primitives;if(t!==n.length-1){var r=n[t];n[t]=n[t+1],n[t+1]=r}}},a.prototype.raiseToTop=function(e){if(i(e)){var t=s(this,e),n=this._primitives;t!==n.length-1&&(n.splice(t,1),n.push(e))}},a.prototype.lower=function(e){if(i(e)){var t=s(this,e),n=this._primitives;if(0!==t){var r=n[t];n[t]=n[t-1],n[t-1]=r}}},a.prototype.lowerToBottom=function(e){if(i(e)){var t=s(this,e),n=this._primitives;0!==t&&(n.splice(t,1),n.unshift(e))}},a.prototype.get=function(e){return this._primitives[e]},a.prototype.update=function(e){if(this.show)for(var t=this._primitives,i=0;i<t.length;++i)t[i].update(e)},a.prototype.isDestroyed=function(){return!1},a.prototype.destroy=function(){return this.removeAll(),r(this)},a}),define("Cesium/Scene/QuadtreeTileProvider",["../Core/defineProperties","../Core/DeveloperError"],function(e,t){"use strict";function i(){t.throwInstantiationError()}return i.computeDefaultLevelZeroMaximumGeometricError=function(e){return 2*e.ellipsoid.maximumRadius*Math.PI*.25/(65*e.getNumberOfXTilesAtLevel(0))},e(i.prototype,{quadtree:{get:t.throwInstantiationError,set:t.throwInstantiationError},ready:{get:t.throwInstantiationError},tilingScheme:{get:t.throwInstantiationError},errorEvent:{get:t.throwInstantiationError}}),i.prototype.beginUpdate=t.throwInstantiationError,i.prototype.endUpdate=t.throwInstantiationError,i.prototype.getLevelMaximumGeometricError=t.throwInstantiationError,i.prototype.loadTile=t.throwInstantiationError,i.prototype.computeTileVisibility=t.throwInstantiationError,i.prototype.showTileThisFrame=t.throwInstantiationError,i.prototype.computeDistanceToTile=t.throwInstantiationError,i.prototype.isDestroyed=t.throwInstantiationError,i.prototype.destroy=t.throwInstantiationError,i}),define("Cesium/Scene/SceneTransitioner",["../Core/Cartesian3","../Core/Cartographic","../Core/defaultValue","../Core/defined","../Core/destroyObject","../Core/DeveloperError","../Core/EasingFunction","../Core/Ellipsoid","../Core/Math","../Core/Matrix4","../Core/Ray","../Core/ScreenSpaceEventHandler","../Core/ScreenSpaceEventType","../Core/Transforms","./Camera","./OrthographicFrustum","./PerspectiveFrustum","./SceneMode"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g,v){"use strict";function _(e,t){this._scene=e,this._currentTweens=[],this._morphHandler=void 0,this._morphCancelled=!1,this._completeMorph=void 0}function y(e,t){if(e._scene.completeMorphOnUserInput){e._morphHandler=new h(e._scene.canvas,!1);var i=function(){e._morphCancelled=!0,t(e)};e._completeMorph=i,e._morphHandler.setInputAction(i,d.LEFT_DOWN),e._morphHandler.setInputAction(i,d.MIDDLE_DOWN),e._morphHandler.setInputAction(i,d.RIGHT_DOWN),e._morphHandler.setInputAction(i,d.WHEEL)}}function C(e){for(var t=e._currentTweens,i=0;i<t.length;++i)t[i].cancelTween();e._currentTweens.length=0, +e._morphHandler=e._morphHandler&&e._morphHandler.destroy()}function w(e,t){var i=e._scene,n=i.camera,r=Z,o=r.position,a=r.direction,s=r.up,l=i.mapProjection.unproject(n.position,j);t.cartographicToCartesian(l,o);var c=t.scaleToGeodeticSurface(o,Y),h=p.eastNorthUpToFixedFrame(c,t,X);return u.multiplyByPointAsVector(h,n.direction,a),u.multiplyByPointAsVector(h,n.up,s),r}function E(t,i,n,r){function o(t){S(c,p,t.time,l.position),S(h,f,t.time,l.direction),S(d,g,t.time,l.up),e.cross(l.direction,l.up,l.right),e.normalize(l.right,l.right)}i*=.5;var s=t._scene,l=s.camera,c=e.clone(l.position,K),h=e.clone(l.direction,J),d=e.clone(l.up,Q),p=u.multiplyByPoint(m.TRANSFORM_2D_INVERSE,n.position,$),f=u.multiplyByPointAsVector(m.TRANSFORM_2D_INVERSE,n.direction,ee),g=u.multiplyByPointAsVector(m.TRANSFORM_2D_INVERSE,n.up,te),v=s.tweens.add({duration:i,easingFunction:a.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:o,complete:function(){I(t,s,0,1,i,r)}});t._currentTweens.push(v)}function b(t,i,n){i*=.5;var r=t._scene,o=ie;o.aspectRatio=r.drawingBufferWidth/r.drawingBufferHeight,o.fov=l.toRadians(60);var a;if(i>0)a=Z,e.fromDegrees(0,0,5*n.maximumRadius,n,a.position),e.negate(a.position,a.direction),e.normalize(a.direction,a.direction),e.clone(e.UNIT_Z,a.up);else{var s=r.camera;s.position.z=s.frustum.right-s.frustum.left,a=w(t,n)}a.frustum=o;var u=R(a);y(t,u),P(t,i,a,function(){E(t,i,a,u)})}function S(t,i,n,r){return e.lerp(t,i,n,r)}function T(e,t,i,n,r){function o(e){u.frustum.fov=l.lerp(c,h,e.time);var t=d/Math.tan(.5*u.frustum.fov);n(u,t)}var s=e._scene,u=s.camera,c=u.frustum.fov,h=.5*l.RADIANS_PER_DEGREE,d=i.position.z*Math.tan(.5*c);u.frustum.far=d/Math.tan(.5*h)+1e7;var p=s.tweens.add({duration:t,easingFunction:a.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:o,complete:function(){u.frustum=i.frustum.clone(),r(e)}});e._currentTweens.push(p)}function x(t,i){function r(t){S(c,g,t.time,l.position),S(h,p,t.time,l.direction),S(d,f,t.time,l.up),e.cross(l.direction,l.up,l.right),e.normalize(l.right,l.right)}function o(e,t){e.position.z=t}i*=.5;var s=t._scene,l=s.camera,c=e.clone(l.position,ne),h=e.clone(l.direction,re),d=e.clone(l.up,oe),p=e.negate(e.UNIT_Z,se),f=e.clone(e.UNIT_Y,le),g=ae;if(i>0)e.clone(e.ZERO,ae),g.z=5*s.mapProjection.ellipsoid.maximumRadius;else{e.clone(c,ae);var v=ce;u.multiplyByPoint(m.TRANSFORM_2D,c,v.origin),u.multiplyByPointAsVector(m.TRANSFORM_2D,h,v.direction);var _=s.globe;if(n(_)){var C=_.pick(v,s,he);n(C)&&(u.multiplyByPoint(m.TRANSFORM_2D_INVERSE,C,g),g.z+=e.distance(c,g))}}var w=ue;w.right=.5*g.z,w.left=-w.right,w.top=w.right*(s.drawingBufferHeight/s.drawingBufferWidth),w.bottom=-w.top;var E=de;E.position=g,E.direction=p,E.up=f,E.frustum=w;var b=O(E);y(t,b);var x=s.tweens.add({duration:i,easingFunction:a.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:r,complete:function(){T(t,i,E,o,b)}});t._currentTweens.push(x)}function A(t,i,r){function o(e,t){e.position.x=t}function a(){T(t,i,c,o,b)}i*=.5;var s=t._scene,l=s.camera,c=me;if(i>0)e.clone(e.ZERO,c.position),c.position.z=5*r.maximumRadius,e.negate(e.UNIT_Z,c.direction),e.clone(e.UNIT_Y,c.up);else{r.cartesianToCartographic(l.positionWC,pe),s.mapProjection.project(pe,c.position),e.negate(e.UNIT_Z,c.direction),e.clone(e.UNIT_Y,c.up);var h=ve;e.clone(c.position2D,h.origin);var d=e.clone(l.directionWC,h.direction),f=r.scaleToGeodeticSurface(l.positionWC,ye),g=p.eastNorthUpToFixedFrame(f,r,_e);u.inverseTransformation(g,g),u.multiplyByPointAsVector(g,d,d),u.multiplyByPointAsVector(m.TRANSFORM_2D,d,d);var v=s.globe;if(n(v)){var _=v.pick(h,s,ge);if(n(_)){var C=e.distance(c.position2D,_);_.x+=C,e.clone(_,c.position2D)}}}u.multiplyByPoint(m.TRANSFORM_2D,c.position,c.position2D),u.multiplyByPointAsVector(m.TRANSFORM_2D,c.direction,c.direction2D),u.multiplyByPointAsVector(m.TRANSFORM_2D,c.up,c.up2D);var w=c.frustum;w.right=.5*c.position.z,w.left=-w.right,w.top=w.right*(s.drawingBufferHeight/s.drawingBufferWidth),w.bottom=-w.top;var E=fe;u.multiplyByPoint(m.TRANSFORM_2D_INVERSE,c.position2D,E.position),e.clone(c.direction,E.direction),e.clone(c.up,E.up),E.frustum=w;var b=O(E);y(t,b),D(t,i,c,a)}function P(e,t,i,n){function r(e){s.frustum.fov=l.lerp(h,c,e.time),s.position.z=d/Math.tan(.5*s.frustum.fov)}var o=e._scene,s=o.camera,u=s.frustum.right-s.frustum.left;s.frustum=i.frustum.clone();var c=s.frustum.fov,h=.5*l.RADIANS_PER_DEGREE,d=u*Math.tan(.5*c);s.frustum.far=d/Math.tan(.5*h)+1e7,s.frustum.fov=h;var p=o.tweens.add({duration:t,easingFunction:a.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:r,complete:function(){n(e)}});e._currentTweens.push(p)}function M(t,i,n,r){function o(t){S(c,p,t.time,u.position),S(h,m,t.time,u.direction),S(d,f,t.time,u.up),e.cross(u.direction,u.up,u.right),e.normalize(u.right,u.right);var i=u.frustum;i.right=l.lerp(g,_,t.time),i.left=-i.right,i.top=i.right*(s.drawingBufferHeight/s.drawingBufferWidth),i.bottom=-i.top,u.position.z=2*s.mapProjection.ellipsoid.maximumRadius}i*=.5;var s=t._scene,u=s.camera,c=e.clone(u.position,Ce),h=e.clone(u.direction,we),d=e.clone(u.up,Ee),p=e.clone(n.position,be),m=e.clone(n.direction,Se),f=e.clone(n.up,Te),g=u.frustum.right,_=.5*p.z,y=s.tweens.add({duration:i,easingFunction:a.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:o,complete:function(){s._mode=v.MORPHING,P(t,i,n,r)}});t._currentTweens.push(y)}function D(t,i,n,r){function o(t){S(u,d,t.time,l.position),S(c,p,t.time,l.direction),S(h,m,t.time,l.up),e.cross(l.direction,l.up,l.right),e.normalize(l.right,l.right)}var s=t._scene,l=s.camera,u=e.clone(l.position,Ce),c=e.clone(l.direction,we),h=e.clone(l.up,Ee),d=e.clone(n.position2D,be),p=e.clone(n.direction2D,Se),m=e.clone(n.up2D,Te),f=s.tweens.add({duration:i,easingFunction:a.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:o,complete:function(){I(t,s,1,0,i,r)}});t._currentTweens.push(f)}function I(e,t,i,r,o,s){var l={object:t,property:"morphTime",startValue:i,stopValue:r,duration:o,easingFunction:a.QUARTIC_OUT};n(s)&&(l.complete=function(){s(e)});var u=t.tweens.addProperty(l);e._currentTweens.push(u)}function R(t){return function(i){var r=i._scene;if(r._mode=v.SCENE3D,r.morphTime=v.getMorphTime(v.SCENE3D),C(i),i._previousMode!==v.MORPHING||i._morphCancelled){i._morphCancelled=!1;var o=r.camera;e.clone(t.position,o.position),e.clone(t.direction,o.direction),e.clone(t.up,o.up),e.cross(o.direction,o.up,o.right),e.normalize(o.right,o.right),n(t.frustum)&&(o.frustum=t.frustum.clone())}var a=n(i._completeMorph);i._completeMorph=void 0,r.camera.update(r.mode),i._scene.morphComplete.raiseEvent(i,i._previousMode,v.SCENE3D,a)}}function O(t){return function(i){var r=i._scene;r._mode=v.SCENE2D,r.morphTime=v.getMorphTime(v.SCENE2D),C(i);var o=r.camera;e.clone(t.position,o.position),o.position.z=2*r.mapProjection.ellipsoid.maximumRadius,e.clone(t.direction,o.direction),e.clone(t.up,o.up),e.cross(o.direction,o.up,o.right),e.normalize(o.right,o.right),o.frustum=t.frustum.clone();var a=n(i._completeMorph);i._completeMorph=void 0,r.camera.update(r.mode),i._scene.morphComplete.raiseEvent(i,i._previousMode,v.SCENE2D,a)}}function L(t){return function(i){var r=i._scene;if(r._mode=v.COLUMBUS_VIEW,r.morphTime=v.getMorphTime(v.COLUMBUS_VIEW),C(i),r.camera.frustum=t.frustum.clone(),i._previousModeMode!==v.MORPHING||i._morphCancelled){i._morphCancelled=!1;var o=r.camera;e.clone(t.position,o.position),e.clone(t.direction,o.direction),e.clone(t.up,o.up),e.cross(o.direction,o.up,o.right),e.normalize(o.right,o.right)}var a=n(i._completeMorph);i._completeMorph=void 0,r.camera.update(r.mode),i._scene.morphComplete.raiseEvent(i,i._previousMode,v.COLUMBUS_VIEW,a)}}_.prototype.completeMorph=function(){n(this._completeMorph)&&this._completeMorph()},_.prototype.morphTo2D=function(e,t){n(this._completeMorph)&&this._completeMorph();var i=this._scene;this._previousMode=i.mode,this._previousMode!==v.SCENE2D&&this._previousMode!==v.MORPHING&&(this._scene.morphStart.raiseEvent(this,this._previousMode,v.SCENE2D,!0),i._mode=v.MORPHING,i.camera._setTransform(u.IDENTITY),this._previousMode===v.COLUMBUS_VIEW?x(this,e):A(this,e,t),0===e&&n(this._completeMorph)&&this._completeMorph())};var N=new e,F=new e,k=new e,B=new e,z=new e,V=new e,U=new e,G=new t,W=new u,H=new g,q={position:void 0,direction:void 0,up:void 0,position2D:void 0,direction2D:void 0,up2D:void 0,frustum:void 0};_.prototype.morphToColumbusView=function(t,i){n(this._completeMorph)&&this._completeMorph();var r=this._scene;if(this._previousMode=r.mode,this._previousMode!==v.COLUMBUS_VIEW&&this._previousMode!==v.MORPHING){this._scene.morphStart.raiseEvent(this,this._previousMode,v.COLUMBUS_VIEW,!0),r.camera._setTransform(u.IDENTITY);var o=N,a=F,s=k;if(t>0)o.x=0,o.y=0,o.z=5*i.maximumRadius,e.negate(e.UNIT_Z,a),e.clone(e.UNIT_Y,s);else{var c=r.camera;if(this._previousMode===v.SCENE2D)e.clone(c.position,o),o.z=c.frustum.right-c.frustum.left,e.negate(e.UNIT_Z,a),e.clone(e.UNIT_Y,s);else{e.clone(c.positionWC,o),e.clone(c.directionWC,a),e.clone(c.upWC,s);var h=i.scaleToGeodeticSurface(o,U),d=p.eastNorthUpToFixedFrame(h,i,W);u.inverseTransformation(d,d),r.mapProjection.project(i.cartesianToCartographic(o,G),o),u.multiplyByPointAsVector(d,a,a),u.multiplyByPointAsVector(d,s,s)}}var f=H;f.aspectRatio=r.drawingBufferWidth/r.drawingBufferHeight,f.fov=l.toRadians(60);var g=q;g.position=o,g.direction=a,g.up=s,g.frustum=f;var _=L(g);y(this,_),this._previousMode===v.SCENE2D?M(this,t,g,_):(g.position2D=u.multiplyByPoint(m.TRANSFORM_2D,o,B),g.direction2D=u.multiplyByPointAsVector(m.TRANSFORM_2D,a,z),g.up2D=u.multiplyByPointAsVector(m.TRANSFORM_2D,s,V),r._mode=v.MORPHING,D(this,t,g,_)),0===t&&n(this._completeMorph)&&this._completeMorph()}},_.prototype.morphTo3D=function(t,i){n(this._completeMorph)&&this._completeMorph();var r=this._scene;if(this._previousMode=r.mode,this._previousMode!==v.SCENE3D&&this._previousMode!==v.MORPHING){if(this._scene.morphStart.raiseEvent(this,this._previousMode,v.SCENE3D,!0),r._mode=v.MORPHING,r.camera._setTransform(u.IDENTITY),this._previousMode===v.SCENE2D)b(this,t,i);else{var o;t>0?(o=Z,e.fromDegrees(0,0,5*i.maximumRadius,i,o.position),e.negate(o.position,o.direction),e.normalize(o.direction,o.direction),e.clone(e.UNIT_Z,o.up)):o=w(this,i);var a=R(o);y(this,a),E(this,t,o,a)}0===t&&n(this._completeMorph)&&this._completeMorph()}},_.prototype.isDestroyed=function(){return!1},_.prototype.destroy=function(){return C(this),r(this)};var j=new t,Y=new e,X=new u,Z={position:new e,direction:new e,up:new e,frustum:void 0},K=new e,J=new e,Q=new e,$=new e,ee=new e,te=new e,ie=new g,ne=new e,re=new e,oe=new e,ae=new e,se=new e,le=new e,ue=new f,ce=new c,he=new e,de={position:void 0,direction:void 0,up:void 0,frustum:void 0},pe=new t,me={position:new e,direction:new e,up:new e,position2D:new e,direction2D:new e,up2D:new e,frustum:new f},fe={position:new e,direction:new e,up:new e,frustum:void 0},ge=new e,ve=new c,_e=new u,ye=new e,Ce=new e,we=new e,Ee=new e,be=new e,Se=new e,Te=new e;return _}),define("Cesium/Scene/TweenCollection",["../Core/clone","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/EasingFunction","../Core/getTimestamp","../Core/TimeConstants","../ThirdParty/Tween"],function(e,t,i,n,r,o,a,s,l){"use strict";function u(t,i,n,r,o,a,s,l,u,c){this._tweens=t,this._tweenjs=i,this._startObject=e(n),this._stopObject=e(r),this._duration=o,this._delay=a,this._easingFunction=s,this._update=l,this._complete=u,this.cancel=c,this.needsStart=!0}function c(){this._tweens=[]}return n(u.prototype,{startObject:{get:function(){return this._startObject}},stopObject:{get:function(){return this._stopObject}},duration:{get:function(){return this._duration}},delay:{get:function(){return this._delay}},easingFunction:{get:function(){return this._easingFunction}},update:{get:function(){return this._update}},complete:{get:function(){return this._complete}},tweenjs:{get:function(){return this._tweenjs}}}),u.prototype.cancelTween=function(){this._tweens.remove(this)},n(c.prototype,{length:{get:function(){return this._tweens.length}}}),c.prototype.add=function(n){if(n=t(n,t.EMPTY_OBJECT),0===n.duration)return i(n.complete)&&n.complete(),new u(this);var r=n.duration/s.SECONDS_PER_MILLISECOND,a=t(n.delay,0),c=a/s.SECONDS_PER_MILLISECOND,h=t(n.easingFunction,o.LINEAR_NONE),d=n.startObject,p=new l.Tween(d);p.to(e(n.stopObject),r),p.delay(c),p.easing(h),i(n.update)&&p.onUpdate(function(){n.update(d)}),p.onComplete(t(n.complete,null)),p.repeat(t(n._repeat,0));var m=new u(this,p,n.startObject,n.stopObject,n.duration,a,h,n.update,n.complete,n.cancel);return this._tweens.push(m),m},c.prototype.addProperty=function(e){function i(e){n[r]=e.value}e=t(e,t.EMPTY_OBJECT);var n=e.object,r=e.property,o=e.startValue,a=e.stopValue;return this.add({startObject:{value:o},stopObject:{value:a},duration:t(e.duration,3),delay:e.delay,easingFunction:e.easingFunction,update:i,complete:e.complete,cancel:e.cancel,_repeat:e._repeat})},c.prototype.addAlpha=function(e){function n(e){for(var t=o.length,i=0;t>i;++i)r.uniforms[o[i]].alpha=e.alpha}e=t(e,t.EMPTY_OBJECT);var r=e.material,o=[];for(var a in r.uniforms)r.uniforms.hasOwnProperty(a)&&i(r.uniforms[a])&&i(r.uniforms[a].alpha)&&o.push(a);return this.add({startObject:{alpha:t(e.startValue,0)},stopObject:{alpha:t(e.stopValue,1)},duration:t(e.duration,3),delay:e.delay,easingFunction:e.easingFunction,update:n,complete:e.complete,cancel:e.cancel})},c.prototype.addOffsetIncrement=function(e){e=t(e,t.EMPTY_OBJECT);var i=e.material,n=i.uniforms;return this.addProperty({object:n,property:"offset",startValue:n.offset,stopValue:n.offset+1,duration:e.duration,delay:e.delay,easingFunction:e.easingFunction,update:e.update,cancel:e.cancel,_repeat:1/0})},c.prototype.remove=function(e){if(!i(e))return!1;var t=this._tweens.indexOf(e);return-1!==t?(e.tweenjs.stop(),i(e.cancel)&&e.cancel(),this._tweens.splice(t,1),!0):!1},c.prototype.removeAll=function(){for(var e=this._tweens,t=0;t<e.length;++t){var n=e[t];n.tweenjs.stop(),i(n.cancel)&&n.cancel()}e.length=0},c.prototype.contains=function(e){return i(e)&&-1!==this._tweens.indexOf(e)},c.prototype.get=function(e){return this._tweens[e]},c.prototype.update=function(e){var t=this._tweens,n=0;for(e=i(e)?e/s.SECONDS_PER_MILLISECOND:a();n<t.length;){var r=t[n],o=r.tweenjs;r.needsStart?(r.needsStart=!1,o.start(e)):o.update(e)?n++:(o.stop(),t.splice(n,1))}},c}),define("Cesium/Scene/ScreenSpaceCameraController",["../Core/Cartesian2","../Core/Cartesian3","../Core/Cartesian4","../Core/Cartographic","../Core/defaultValue","../Core/defined","../Core/destroyObject","../Core/DeveloperError","../Core/Ellipsoid","../Core/IntersectionTests","../Core/isArray","../Core/KeyboardEventModifier","../Core/Math","../Core/Matrix3","../Core/Matrix4","../Core/Plane","../Core/Quaternion","../Core/Ray","../Core/Transforms","./CameraEventAggregator","./CameraEventType","./MapMode2D","./SceneMode","./SceneTransforms","./TweenCollection"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g,v,_,y,C,w,E,b,S){"use strict";function T(i){this.enableInputs=!0,this.enableTranslate=!0,this.enableZoom=!0,this.enableRotate=!0,this.enableTilt=!0,this.enableLook=!0,this.inertiaSpin=.9,this.inertiaTranslate=.9,this.inertiaZoom=.8,this.maximumMovementRatio=.1,this.bounceAnimationTime=3,this.minimumZoomDistance=1,this.maximumZoomDistance=Number.POSITIVE_INFINITY,this.translateEventTypes=C.LEFT_DRAG,this.zoomEventTypes=[C.RIGHT_DRAG,C.WHEEL,C.PINCH],this.rotateEventTypes=C.LEFT_DRAG,this.tiltEventTypes=[C.MIDDLE_DRAG,C.PINCH,{eventType:C.LEFT_DRAG,modifier:h.CTRL},{eventType:C.RIGHT_DRAG,modifier:h.CTRL}],this.lookEventTypes={eventType:C.LEFT_DRAG,modifier:h.SHIFT},this.minimumPickingTerrainHeight=15e4,this._minimumPickingTerrainHeight=this.minimumPickingTerrainHeight,this.minimumCollisionTerrainHeight=15e3,this._minimumCollisionTerrainHeight=this.minimumCollisionTerrainHeight,this.minimumTrackBallHeight=75e5,this._minimumTrackBallHeight=this.minimumTrackBallHeight,this.enableCollisionDetection=!0,this._scene=i,this._globe=void 0,this._ellipsoid=void 0,this._aggregator=new y(i.canvas),this._lastInertiaSpinMovement=void 0,this._lastInertiaZoomMovement=void 0,this._lastInertiaTranslateMovement=void 0,this._lastInertiaTiltMovement=void 0,this._tweens=new S,this._tween=void 0,this._horizontalRotationAxis=void 0,this._tiltCenterMousePosition=new e(-1,-1),this._tiltCenter=new t,this._rotateMousePosition=new e(-1,-1),this._rotateStartPosition=new t,this._strafeStartPosition=new t,this._zoomMouseStart=new e,this._zoomWorldPosition=new t,this._tiltCVOffMap=!1,this._looking=!1,this._rotating=!1,this._strafing=!1,this._zoomingOnVector=!1,this._rotatingZoom=!1;var r=i.mapProjection;this._maxCoord=r.project(new n(Math.PI,d.PI_OVER_TWO)),this._zoomFactor=5,this._rotateFactor=void 0,this._rotateRateRangeAdjustment=void 0,this._maximumRotateRate=1.77,this._minimumRotateRate=2e-4,this._minimumZoomRate=20,this._maximumZoomRate=5906376272e3}function x(e,t){if(0>e)return 0;var i=25*(1-t);return Math.exp(-i*e)}function A(t){return e.equalsEpsilon(t.startPosition,t.endPosition,d.EPSILON14)}function P(t,i,n,r,a,s,l){var u=s[l];o(u)||(u=s[l]={startPosition:new e,endPosition:new e,motion:new e,active:!1});var c=t.getButtonPressTime(i,n),h=t.getButtonReleaseTime(i,n),d=c&&h&&(h.getTime()-c.getTime())/1e3,p=new Date,m=h&&(p.getTime()-h.getTime())/1e3;if(c&&h&&ee>d){var f=x(m,r);if(u.active)u.startPosition=e.clone(u.endPosition,u.startPosition),u.endPosition=e.multiplyByScalar(u.motion,f,u.endPosition),u.endPosition=e.add(u.startPosition,u.endPosition,u.endPosition),u.motion=e.clone(e.ZERO,u.motion);else{var g=t.getLastMovement(i,n);if(!o(g)||A(g))return;u.motion.x=.5*(g.endPosition.x-g.startPosition.x),u.motion.y=.5*(g.endPosition.y-g.startPosition.y),u.startPosition=e.clone(g.startPosition,u.startPosition),u.endPosition=e.multiplyByScalar(u.motion,f,u.endPosition),u.endPosition=e.add(u.startPosition,u.endPosition,u.endPosition),u.active=!0}if(isNaN(u.endPosition.x)||isNaN(u.endPosition.y)||e.distance(u.startPosition,u.endPosition)<.5)return void(u.active=!1);if(!t.isButtonDown(i,n)){var v=t.getStartMousePosition(i,n);a(s,v,u)}}else u.active=!1}function M(e,t,i,n,r,a){if(o(i)){var s=e._aggregator;c(i)||(te[0]=i,i=te);for(var l=i.length,u=0;l>u;++u){var h=i[u],d=o(h.eventType)?h.eventType:h,p=h.modifier,m=s.isMoving(d,p)&&s.getMovement(d,p),f=s.getStartMousePosition(d,p);e.enableInputs&&t&&(m?n(e,f,m):1>r&&P(s,d,p,r,n,e,a))}}}function D(i,n,r,a,s,l){var u=1;o(l)&&(u=d.clamp(Math.abs(l),.25,1));var c=i.minimumZoomDistance*u,h=i.maximumZoomDistance,p=s-c,m=a*p;m=d.clamp(m,i._minimumZoomRate,i._maximumZoomRate);var f=r.endPosition.y-r.startPosition.y,g=f/i._scene.canvas.clientHeight;g=Math.min(g,i.maximumMovementRatio);var v=m*g;if(!(v>0&&Math.abs(s-c)<1||0>v&&Math.abs(s-h)<1)){c>s-v?v=s-c-1:s-v>h&&(v=s-h);var _,y=i._scene,C=y.camera,w=y.mode;if(o(i._globe)&&(_=w!==E.SCENE2D?F(i,n,ne):C.getPickRay(n,ie).origin),!o(_))return void C.zoomIn(v);var S=e.equals(n,i._zoomMouseStart),T=i._zoomingOnVector,x=i._rotatingZoom;S||(i._zoomMouseStart=e.clone(n,i._zoomMouseStart),i._zoomWorldPosition=t.clone(_,i._zoomWorldPosition),T=i._zoomingOnVector=!1,x=i._rotatingZoom=!1);var A=w===E.COLUMBUS_VIEW;if(C.positionCartographic.height<2e6&&(x=!0),!S||x){if(w===E.SCENE2D){var P=i._zoomWorldPosition,M=C.position;if(!t.equals(P,M)&&C.positionCartographic.height<2*i._maxCoord.x){var D=C.position.x,I=t.subtract(P,M,oe);t.normalize(I,I);var R=t.distance(P,M)*v/(.5*C.getMagnitude());C.move(I,.5*R),(C.position.x<0&&D>0||C.position.x>0&&0>D)&&(_=C.getPickRay(n,ie).origin,i._zoomWorldPosition=t.clone(_,i._zoomWorldPosition))}}else if(w===E.SCENE3D){var O=t.normalize(C.position,he);if(C.positionCartographic.height<3e3&&Math.abs(t.dot(C.direction,O))<.6)A=!0;else{var L=y.canvas,N=ae;N.x=L.clientWidth/2,N.y=L.clientHeight/2;var k=F(i,N,se);if(o(k)&&C.positionCartographic.height<1e6){var B=pe;t.clone(C.position,B);var z=i._zoomWorldPosition,V=de;if(V=t.normalize(z,V),t.dot(V,O)<0)return;var U=we,G=ge;t.clone(C.direction,G),t.add(B,t.multiplyByScalar(G,1e3,Ee),U);var W=ve,H=_e;t.subtract(z,B,W),t.normalize(W,H);var q=Math.acos(-t.dot(O,H)),j=t.magnitude(B),Y=t.magnitude(z),X=j-v,Z=t.magnitude(W),K=Math.asin(d.clamp(Z/Y*Math.sin(q),-1,1)),J=Math.asin(d.clamp(X/Y*Math.sin(q),-1,1)),Q=K-J+q,$=me;t.normalize(B,$);var ee=fe;ee=t.cross(H,$,ee),ee=t.normalize(ee,ee),t.normalize(t.cross($,ee,Ee),G),t.multiplyByScalar(t.normalize(U,Ee),t.magnitude(U)-v,U),t.normalize(B,B),t.multiplyByScalar(B,X,B);var te=ye;t.multiplyByScalar(t.add(t.multiplyByScalar($,Math.cos(Q)-1,be),t.multiplyByScalar(G,Math.sin(Q),Se),Ee),X,te),t.add(B,te,B),t.normalize(U,$),t.normalize(t.cross($,ee,Ee),G);var Te=Ce;return t.multiplyByScalar(t.add(t.multiplyByScalar($,Math.cos(Q)-1,be),t.multiplyByScalar(G,Math.sin(Q),Se),Ee),t.magnitude(U),Te),t.add(U,Te,U),t.clone(B,C.position),t.normalize(t.subtract(U,B,Ee),C.direction),t.clone(C.direction,C.direction),t.cross(C.direction,C.up,C.right),void t.cross(C.right,C.direction,C.up)}if(o(k)){var xe=t.normalize(k,le),Ae=t.normalize(i._zoomWorldPosition,ue),Pe=t.dot(Ae,xe);if(Pe>0){var Me=d.acosClamped(Pe),De=t.cross(Ae,xe,ce),Ie=Math.abs(Me)>d.toRadians(20)?.75*C.positionCartographic.height:C.positionCartographic.height-v,Re=v/Ie;C.rotate(De,Me*Re)}}else A=!0}}i._rotatingZoom=!A}if(!S&&A||T){var Oe,Le=b.wgs84ToWindowCoordinates(y,i._zoomWorldPosition,re);Oe=w!==E.COLUMBUS_VIEW&&e.equals(n,i._zoomMouseStart)&&o(Le)?C.getPickRay(Le,ie):C.getPickRay(n,ie);var Ne=Oe.direction;w===E.COLUMBUS_VIEW&&t.fromElements(Ne.y,Ne.z,Ne.x,Ne),C.move(Ne,v),i._zoomingOnVector=!0}else C.zoomIn(v)}}function I(e,i,n){var r=e._scene,o=r.camera,a=o.getPickRay(n.startPosition,Te).origin,s=o.getPickRay(n.endPosition,xe).origin,l=t.subtract(a,s,Ae),u=t.magnitude(l);u>0&&(t.normalize(l,l),o.move(l,u))}function R(e,t,i){o(i.distance)&&(i=i.distance);var n=e._scene,r=n.camera;D(e,t,i,e._zoomFactor,r.getMagnitude())}function O(t,i,n){if(o(n.angleAndHeight))return void L(t,i,n.angleAndHeight);var r=t._scene,a=r.camera,s=r.canvas,l=s.clientWidth,u=s.clientHeight,c=Pe;c.x=2/l*n.startPosition.x-1,c.y=2/u*(u-n.startPosition.y)-1,c=e.normalize(c,c);var h=Me;h.x=2/l*n.endPosition.x-1,h.y=2/u*(u-n.endPosition.y)-1,h=e.normalize(h,h);var p=d.acosClamped(c.x);c.y<0&&(p=d.TWO_PI-p);var m=d.acosClamped(h.x);h.y<0&&(m=d.TWO_PI-m);var f=m-p;a.twistRight(f)}function L(e,t,i){var n=e._rotateFactor*e._rotateRateRangeAdjustment;n>e._maximumRotateRate&&(n=e._maximumRotateRate),n<e._minimumRotateRate&&(n=e._minimumRotateRate);var r=e._scene,o=r.camera,a=r.canvas,s=(i.endPosition.x-i.startPosition.x)/a.clientWidth;s=Math.min(s,e.maximumMovementRatio);var l=n*s*Math.PI*4;o.twistRight(l)}function N(e){var t=e._scene.mapMode2D===w.ROTATE;m.equals(m.IDENTITY,e._scene.camera.transform)?(M(e,e.enableTranslate,e.translateEventTypes,I,e.inertiaTranslate,"_lastInertiaTranslateMovement"),M(e,e.enableZoom,e.zoomEventTypes,R,e.inertiaZoom,"_lastInertiaZoomMovement"),t&&M(e,e.enableRotate,e.tiltEventTypes,O,e.inertiaSpin,"_lastInertiaTiltMovement")):(M(e,e.enableZoom,e.zoomEventTypes,R,e.inertiaZoom,"_lastInertiaZoomMovement"),t&&M(e,e.enableRotate,e.translateEventTypes,O,e.inertiaSpin,"_lastInertiaSpinMovement"))}function F(e,i,n){var r=e._scene,a=e._globe,s=r.camera;if(o(a)){var l;r.pickPositionSupported&&(l=r.pickPosition(i,Ie));var u=s.getPickRay(i,De),c=a.pick(u,r,Re),h=o(l)?t.distance(l,s.positionWC):Number.POSITIVE_INFINITY,d=o(c)?t.distance(c,s.positionWC):Number.POSITIVE_INFINITY;return d>h?t.clone(l,n):t.clone(c,n)}}function k(i,n,r){if(t.equals(n,i._translateMousePosition)||(i._looking=!1),t.equals(n,i._strafeMousePosition)||(i._strafing=!1),i._looking)return void J(i,n,r);if(i._strafing)return void W(i,n,r);var a,s=i._scene,l=s.camera,c=e.clone(r.startPosition,Ve),h=e.clone(r.endPosition,Ue),p=l.getPickRay(c,Oe),m=t.clone(t.ZERO,Be),g=t.UNIT_X;if(l.position.z<i._minimumPickingTerrainHeight&&(a=F(i,c,Ne),o(a)&&(m.x=a.x)),m.x>l.position.z&&o(a))return t.clone(a,i._strafeStartPosition),i._strafing=!0,W(i,n,r),void(i._strafeMousePosition=e.clone(n,i._strafeMousePosition));var v=f.fromPointNormal(m,g,ze);p=l.getPickRay(c,Oe);var _=u.rayPlane(p,v,Ne),y=l.getPickRay(h,Le),C=u.rayPlane(y,v,Fe);if(!o(_)||!o(C))return i._looking=!0,J(i,n,r),void e.clone(n,i._translateMousePosition);var w=t.subtract(_,C,ke),E=w.x;w.x=w.y,w.y=w.z,w.z=E;var b=t.magnitude(w);b>d.EPSILON6&&(t.normalize(w,w),l.move(w,b))}function B(t,i,n){if(o(n.angleAndHeight)&&(n=n.angleAndHeight),e.equals(i,t._tiltCenterMousePosition)||(t._tiltCVOffMap=!1,t._looking=!1),t._looking)return void J(t,i,n);var r=t._scene,a=r.camera,s=t._maxCoord,l=Math.abs(a.position.x)-s.x<0&&Math.abs(a.position.y)-s.y<0;t._tiltCVOffMap||!l||a.position.z>t._minimumPickingTerrainHeight?(t._tiltCVOffMap=!0,z(t,i,n)):V(t,i,n)}function z(i,n,r){var a=i._scene,s=a.camera,u=a.canvas,c=Ge;c.x=u.clientWidth/2,c.y=u.clientHeight/2;var h,p=s.getPickRay(c,We),f=t.UNIT_X,g=p.origin,v=p.direction,y=t.dot(f,v);if(Math.abs(y)>d.EPSILON6&&(h=-t.dot(f,g)/y),!o(h)||0>=h)return i._looking=!0,J(i,n,r),void e.clone(n,i._tiltCenterMousePosition);var C=t.multiplyByScalar(v,h,He);t.add(g,C,C);var w=a.mapProjection,E=w.ellipsoid;t.fromElements(C.y,C.z,C.x,C);var b=w.unproject(C,Je);E.cartographicToCartesian(b,C);var S=_.eastNorthUpToFixedFrame(C,E,je),T=i._globe,x=i._ellipsoid;i._globe=void 0,i._ellipsoid=l.UNIT_SPHERE,i._rotateFactor=1,i._rotateRateRangeAdjustment=1;var A=m.clone(s.transform,Qe);s._setTransform(S),q(i,n,r,t.UNIT_Z),s._setTransform(A),i._globe=T,i._ellipsoid=x;var P=x.maximumRadius;i._rotateFactor=1/P,i._rotateRateRangeAdjustment=P}function V(i,n,r){var a,s,c=i._ellipsoid,h=i._scene,v=h.camera,y=t.UNIT_X;if(e.equals(n,i._tiltCenterMousePosition))a=t.clone(i._tiltCenter,He);else{if(v.position.z<i._minimumPickingTerrainHeight&&(a=F(i,n,He)),!o(a)){s=v.getPickRay(n,We);var C,w=s.origin,E=s.direction,b=t.dot(y,E);if(Math.abs(b)>d.EPSILON6&&(C=-t.dot(y,w)/b),!o(C)||0>=C)return i._looking=!0,J(i,n,r),void e.clone(n,i._tiltCenterMousePosition);a=t.multiplyByScalar(E,C,He),t.add(w,a,a)}e.clone(n,i._tiltCenterMousePosition),t.clone(a,i._tiltCenter)}var S=h.canvas,T=Ge;T.x=S.clientWidth/2,T.y=i._tiltCenterMousePosition.y,s=v.getPickRay(T,We);var x=t.clone(t.ZERO,Xe);x.x=a.x;var A=f.fromPointNormal(x,y,Ze),P=u.rayPlane(s,A,qe),M=v._projection;c=M.ellipsoid,t.fromElements(a.y,a.z,a.x,a);var D=M.unproject(a,Je);c.cartographicToCartesian(D,a);var I,R=_.eastNorthUpToFixedFrame(a,c,je);o(P)?(t.fromElements(P.y,P.z,P.x,P),D=M.unproject(P,Je),c.cartographicToCartesian(D,P),I=_.eastNorthUpToFixedFrame(P,c,Ye)):I=R;var O=i._globe,L=i._ellipsoid;i._globe=void 0,i._ellipsoid=l.UNIT_SPHERE,i._rotateFactor=1,i._rotateRateRangeAdjustment=1;var N=t.UNIT_Z,k=m.clone(v.transform,Qe);v._setTransform(R);var B=t.cross(t.UNIT_Z,t.normalize(v.position,Ke),Ke),z=t.dot(v.right,B);if(q(i,n,r,N,!1,!0),v._setTransform(I),0>z){r.startPosition.y>r.endPosition.y&&(N=void 0);var V=v.constrainedAxis;v.constrainedAxis=void 0,q(i,n,r,N,!0,!1),v.constrainedAxis=V}else q(i,n,r,N,!0,!1);if(o(v.constrainedAxis)){var U=t.cross(v.direction,v.constrainedAxis,Dt);t.equalsEpsilon(U,t.ZERO,d.EPSILON6)||(t.dot(U,v.right)<0&&t.negate(U,U),t.cross(U,v.direction,v.up),t.cross(v.direction,v.up,v.right),t.normalize(v.up,v.up),t.normalize(v.right,v.right))}v._setTransform(k),i._globe=O,i._ellipsoid=L;var G=L.maximumRadius;i._rotateFactor=1/G,i._rotateRateRangeAdjustment=G;var W=t.clone(v.positionWC,Ke);if($(i),!t.equals(v.positionWC,W)){v._setTransform(I),v.worldToCameraCoordinatesPoint(W,W);var H=t.magnitudeSquared(W);t.magnitudeSquared(v.position)>H&&(t.normalize(v.position,v.position),t.multiplyByScalar(v.position,Math.sqrt(H),v.position));var j=t.angleBetween(W,v.position),Y=t.cross(W,v.position,W);t.normalize(Y,Y);var X=g.fromAxisAngle(Y,j,$e),Z=p.fromQuaternion(X,et);p.multiplyByVector(Z,v.direction,v.direction),p.multiplyByVector(Z,v.up,v.up),t.cross(v.direction,v.up,v.right),t.cross(v.right,v.direction,v.up),v._setTransform(k)}}function U(e,i,n){o(n.distance)&&(n=n.distance);var r=e._scene,a=r.camera,s=r.canvas,l=tt;l.x=s.clientWidth/2,l.y=s.clientHeight/2;var u,c=a.getPickRay(l,it);a.position.z<e._minimumPickingTerrainHeight&&(u=F(e,l,nt));var h;if(o(u))h=t.distance(c.origin,u);else{var d=t.UNIT_X,p=c.origin,m=c.direction;h=-t.dot(d,p)/t.dot(d,m)}D(e,i,n,e._zoomFactor,h)}function G(e){var t=e._scene,i=t.camera;if(m.equals(m.IDENTITY,i.transform)){var n=e._tweens;if(e._aggregator.anyButtonDown&&n.removeAll(),M(e,e.enableTilt,e.tiltEventTypes,B,e.inertiaSpin,"_lastInertiaTiltMovement"),M(e,e.enableTranslate,e.translateEventTypes,k,e.inertiaTranslate,"_lastInertiaTranslateMovement"),M(e,e.enableZoom,e.zoomEventTypes,U,e.inertiaZoom,"_lastInertiaZoomMovement"),M(e,e.enableLook,e.lookEventTypes,J),!(e._aggregator.anyButtonDown||o(e._lastInertiaZoomMovement)&&e._lastInertiaZoomMovement.active||o(e._lastInertiaTranslateMovement)&&e._lastInertiaTranslateMovement.active||n.contains(e._tween))){var r=i.createCorrectPositionTween(e.bounceAnimationTime);o(r)&&(e._tween=n.add(r))}n.update()}else M(e,e.enableRotate,e.rotateEventTypes,q,e.inertiaSpin,"_lastInertiaSpinMovement"),M(e,e.enableZoom,e.zoomEventTypes,Y,e.inertiaZoom,"_lastInertiaZoomMovement")}function W(e,i,n){var r=e._scene,a=r.camera,s=F(e,n.startPosition,ct);if(o(s)){var l=n.endPosition,c=a.getPickRay(l,rt),h=t.clone(a.direction,st);r.mode===E.COLUMBUS_VIEW&&t.fromElements(h.z,h.x,h.y,h);var d=f.fromPointNormal(s,h,ot),p=u.rayPlane(c,d,at);o(p)&&(h=t.subtract(s,p,h),r.mode===E.COLUMBUS_VIEW&&t.fromElements(h.y,h.z,h.x,h),t.add(a.position,h,a.position))}}function H(i,n,r){var a=i._scene,s=a.camera;if(!m.equals(s.transform,m.IDENTITY))return void q(i,n,r);var u,c,h,d,p=i._ellipsoid.geodeticSurfaceNormal(s.position,pt),f=i._ellipsoid.cartesianToCartographic(s.positionWC,ut).height,g=i._globe,v=!1;if(o(g)&&f<i._minimumPickingTerrainHeight&&(d=F(i,r.startPosition,ct),o(d))){var _=s.getPickRay(r.startPosition,De),y=i._ellipsoid.geodeticSurfaceNormal(d);v=Math.abs(t.dot(_.direction,y))<.05,v&&!i._looking&&(i._rotating=!1,i._strafing=!0)}return e.equals(n,i._rotateMousePosition)?void(i._looking?J(i,n,r,p):i._rotating?q(i,n,r):i._strafing?(t.clone(d,i._strafeStartPosition),W(i,n,r)):(u=t.magnitude(i._rotateStartPosition),c=ht,c.x=c.y=c.z=u,h=l.fromCartesian3(c,dt),j(i,n,r,h))):(i._looking=!1,i._rotating=!1,i._strafing=!1,o(g)&&f<i._minimumPickingTerrainHeight?o(d)?t.magnitude(s.position)<t.magnitude(d)?(t.clone(d,i._strafeStartPosition),i._strafing=!0,W(i,n,r)):(u=t.magnitude(d),c=ht,c.x=c.y=c.z=u,h=l.fromCartesian3(c,dt),j(i,n,r,h),t.clone(d,i._rotateStartPosition)):(i._looking=!0,J(i,n,r,p)):o(s.pickEllipsoid(r.startPosition,i._ellipsoid,lt))?(j(i,n,r,i._ellipsoid),t.clone(lt,i._rotateStartPosition)):f>i._minimumTrackBallHeight?(i._rotating=!0,q(i,n,r)):(i._looking=!0,J(i,n,r,p)),void e.clone(n,i._rotateMousePosition))}function q(e,i,n,a,s,l){s=r(s,!1),l=r(l,!1);var u=e._scene,c=u.camera,h=u.canvas,d=c.constrainedAxis;o(a)&&(c.constrainedAxis=a);var p=t.magnitude(c.position),m=e._rotateFactor*(p-e._rotateRateRangeAdjustment);m>e._maximumRotateRate&&(m=e._maximumRotateRate),m<e._minimumRotateRate&&(m=e._minimumRotateRate);var f=(n.startPosition.x-n.endPosition.x)/h.clientWidth,g=(n.startPosition.y-n.endPosition.y)/h.clientHeight;f=Math.min(f,e.maximumMovementRatio),g=Math.min(g,e.maximumMovementRatio);var v=m*f*Math.PI*2,_=m*g*Math.PI;s||c.rotateRight(v),l||c.rotateUp(_),c.constrainedAxis=d}function j(i,n,r,a){var s=i._scene,l=s.camera,u=e.clone(r.startPosition,Ct),c=e.clone(r.endPosition,wt),h=l.pickEllipsoid(u,a,mt),p=l.pickEllipsoid(c,a,ft);if(!o(h)||!o(p))return i._rotating=!0,void q(i,n,r);if(h=l.worldToCameraCoordinates(h,h),p=l.worldToCameraCoordinates(p,p),o(l.constrainedAxis)){var m=l.constrainedAxis,f=t.mostOrthogonalAxis(m,gt);t.cross(f,m,f),t.normalize(f,f);var g=t.cross(m,f,vt),v=t.magnitude(h),_=t.dot(m,h),y=Math.acos(_/v),C=t.multiplyByScalar(m,_,_t); +t.subtract(h,C,C),t.normalize(C,C);var w=t.magnitude(p),E=t.dot(m,p),b=Math.acos(E/w),S=t.multiplyByScalar(m,E,yt);t.subtract(p,S,S),t.normalize(S,S);var T=Math.acos(t.dot(C,f));t.dot(C,g)<0&&(T=d.TWO_PI-T);var x=Math.acos(t.dot(S,f));t.dot(S,g)<0&&(x=d.TWO_PI-x);var A,P=T-x;A=t.equalsEpsilon(m,l.position,d.EPSILON2)?l.right:t.cross(m,l.position,gt);var M,D=t.cross(m,A,gt),I=t.dot(D,t.subtract(h,m,vt)),R=t.dot(D,t.subtract(p,m,vt));M=I>0&&R>0?b-y:I>0&&0>=R?t.dot(l.position,m)>0?-y-b:y+b:y-b,l.rotateRight(P),l.rotateUp(M)}else{t.normalize(h,h),t.normalize(p,p);var O=t.dot(h,p),L=t.cross(h,p,gt);if(1>O&&!t.equalsEpsilon(L,t.ZERO,d.EPSILON14)){var N=Math.acos(O);l.rotate(L,N)}}}function Y(e,i,n){o(n.distance)&&(n=n.distance);var r=e._ellipsoid,a=e._scene,s=a.camera,l=a.canvas,u=tt;u.x=l.clientWidth/2,u.y=l.clientHeight/2;var c,h=s.getPickRay(u,it),d=r.cartesianToCartographic(s.position,bt).height;d<e._minimumPickingTerrainHeight&&(c=F(e,u,nt));var p;p=o(c)?t.distance(h.origin,c):d;var m=t.normalize(s.position,Et);D(e,i,n,e._zoomFactor,p,t.dot(m,s.direction))}function X(t,i,n){var r=t._scene,a=r.camera;if(m.equals(a.transform,m.IDENTITY)){if(o(n.angleAndHeight)&&(n=n.angleAndHeight),e.equals(i,t._tiltCenterMousePosition)||(t._tiltOnEllipsoid=!1,t._looking=!1),t._looking){var s=t._ellipsoid.geodeticSurfaceNormal(a.position,Nt);return void J(t,i,n,s)}var l=t._ellipsoid,u=l.cartesianToCartographic(a.position,Lt);t._tiltOnEllipsoid||u.height>t._minimumCollisionTerrainHeight?(t._tiltOnEllipsoid=!0,Z(t,i,n)):K(t,i,n)}}function Z(i,n,r){var a=i._ellipsoid,s=i._scene,c=s.camera,h=.25*i.minimumZoomDistance,p=a.cartesianToCartographic(c.positionWC,Ft).height;if(!(p-h-1<d.EPSILON3&&r.endPosition.y-r.startPosition.y<0)){var f=s.canvas,g=St;g.x=f.clientWidth/2,g.y=f.clientHeight/2;var y,C=c.getPickRay(g,Tt),w=u.rayEllipsoid(C,a);if(o(w))y=v.getPoint(C,w.start,xt);else{if(!(p>i._minimumTrackBallHeight)){i._looking=!0;var E=i._ellipsoid.geodeticSurfaceNormal(c.position,Nt);return J(i,n,r,E),void e.clone(n,i._tiltCenterMousePosition)}var b=u.grazingAltitudeLocation(C,a);if(!o(b))return;var S=a.cartesianToCartographic(b,Lt);S.height=0,y=a.cartographicToCartesian(S,xt)}var T=_.eastNorthUpToFixedFrame(y,a,Pt),x=i._globe,A=i._ellipsoid;i._globe=void 0,i._ellipsoid=l.UNIT_SPHERE,i._rotateFactor=1,i._rotateRateRangeAdjustment=1;var P=m.clone(c.transform,It);c._setTransform(T),q(i,n,r,t.UNIT_Z),c._setTransform(P),i._globe=x,i._ellipsoid=A;var M=A.maximumRadius;i._rotateFactor=1/M,i._rotateRateRangeAdjustment=M}}function K(i,n,r){var a,s,c,h=i._ellipsoid,f=i._scene,y=f.camera;if(e.equals(n,i._tiltCenterMousePosition))a=t.clone(i._tiltCenter,xt);else{if(a=F(i,n,xt),!o(a)){if(s=y.getPickRay(n,Tt),c=u.rayEllipsoid(s,h),!o(c)){var C=h.cartesianToCartographic(y.position,Lt);if(C.height<=i._minimumTrackBallHeight){i._looking=!0;var w=i._ellipsoid.geodeticSurfaceNormal(y.position,Nt);J(i,n,r,w),e.clone(n,i._tiltCenterMousePosition)}return}a=v.getPoint(s,c.start,xt)}e.clone(n,i._tiltCenterMousePosition),t.clone(a,i._tiltCenter)}var E=f.canvas,b=St;b.x=E.clientWidth/2,b.y=i._tiltCenterMousePosition.y,s=y.getPickRay(b,Tt);var S=t.magnitude(a),T=t.fromElements(S,S,S,ht),x=l.fromCartesian3(T,dt);if(c=u.rayEllipsoid(s,x),o(c)){var A=t.magnitude(s.origin)>S?c.start:c.stop,P=v.getPoint(s,A,At),M=_.eastNorthUpToFixedFrame(a,h,Pt),D=_.eastNorthUpToFixedFrame(P,x,Mt),I=i._globe,R=i._ellipsoid;i._globe=void 0,i._ellipsoid=l.UNIT_SPHERE,i._rotateFactor=1,i._rotateRateRangeAdjustment=1;var O=t.UNIT_Z,L=m.clone(y.transform,It);y._setTransform(M);var N=t.cross(P,y.positionWC,Dt),k=t.dot(y.rightWC,N);if(q(i,n,r,O,!1,!0),y._setTransform(D),0>k){r.startPosition.y>r.endPosition.y&&(O=void 0);var B=y.constrainedAxis;y.constrainedAxis=void 0,q(i,n,r,O,!0,!1),y.constrainedAxis=B}else q(i,n,r,O,!0,!1);if(o(y.constrainedAxis)){var z=t.cross(y.direction,y.constrainedAxis,Dt);t.equalsEpsilon(z,t.ZERO,d.EPSILON6)||(t.dot(z,y.right)<0&&t.negate(z,z),t.cross(z,y.direction,y.up),t.cross(y.direction,y.up,y.right),t.normalize(y.up,y.up),t.normalize(y.right,y.right))}y._setTransform(L),i._globe=I,i._ellipsoid=R;var V=R.maximumRadius;i._rotateFactor=1/V,i._rotateRateRangeAdjustment=V;var U=t.clone(y.positionWC,Dt);if($(i),!t.equals(y.positionWC,U)){y._setTransform(D),y.worldToCameraCoordinatesPoint(U,U);var G=t.magnitudeSquared(U);t.magnitudeSquared(y.position)>G&&(t.normalize(y.position,y.position),t.multiplyByScalar(y.position,Math.sqrt(G),y.position));var W=t.angleBetween(U,y.position),H=t.cross(U,y.position,U);t.normalize(H,H);var j=g.fromAxisAngle(H,W,Rt),Y=p.fromQuaternion(j,Ot);p.multiplyByVector(Y,y.direction,y.direction),p.multiplyByVector(Y,y.up,y.up),t.cross(y.direction,y.up,y.right),t.cross(y.right,y.direction,y.up),y._setTransform(L)}}}function J(e,i,n,a){var s=e._scene,l=s.camera,u=kt;u.x=n.startPosition.x,u.y=0;var c=Bt;c.x=n.endPosition.x,c.y=0;var h=l.getPickRay(u,zt).direction,p=l.getPickRay(c,Vt).direction,m=0,f=t.dot(h,p);1>f&&(m=Math.acos(f)),m=n.startPosition.x>n.endPosition.x?-m:m;var g=e._horizontalRotationAxis;if(o(a)?l.look(a,-m):o(g)?l.look(g,-m):l.lookLeft(m),u.x=0,u.y=n.startPosition.y,c.x=0,c.y=n.endPosition.y,h=l.getPickRay(u,zt).direction,p=l.getPickRay(c,Vt).direction,m=0,f=t.dot(h,p),1>f&&(m=Math.acos(f)),m=n.startPosition.y>n.endPosition.y?-m:m,a=r(a,g),o(a)){var v=l.direction,_=t.negate(a,Ut),y=t.equalsEpsilon(v,a,d.EPSILON2),C=t.equalsEpsilon(v,_,d.EPSILON2);if(y||C)(y&&0>m||C&&m>0)&&l.look(l.right,-m);else{f=t.dot(v,a);var w=d.acosClamped(f);m>0&&m>w&&(m=w-d.EPSILON4),f=t.dot(v,_),w=d.acosClamped(f),0>m&&-m>w&&(m=-w+d.EPSILON4);var E=t.cross(a,v,Gt);l.look(E,m)}}else l.lookUp(m)}function Q(e){M(e,e.enableRotate,e.rotateEventTypes,H,e.inertiaSpin,"_lastInertiaSpinMovement"),M(e,e.enableZoom,e.zoomEventTypes,Y,e.inertiaZoom,"_lastInertiaZoomMovement"),M(e,e.enableTilt,e.tiltEventTypes,X,e.inertiaSpin,"_lastInertiaTiltMovement"),M(e,e.enableLook,e.lookEventTypes,J)}function $(e){if(e.enableCollisionDetection){var i=e._scene,n=i.mode,r=i.globe;if(o(r)&&n!==E.SCENE2D&&n!==E.MORPHING){var a,s,l=i.camera,u=r.ellipsoid,c=i.mapProjection;m.equals(l.transform,m.IDENTITY)||(a=m.clone(l.transform),s=t.magnitude(l.position),l._setTransform(m.IDENTITY));var h=Wt;n===E.SCENE3D?u.cartesianToCartographic(l.position,h):c.unproject(l.position,h);var d=!1;if(h.height<e._minimumCollisionTerrainHeight){var p=r.getHeight(h);o(p)&&(p+=e.minimumZoomDistance,h.height<p&&(h.height=p,n===E.SCENE3D?u.cartographicToCartesian(h,l.position):c.project(h,l.position),d=!0))}o(a)&&(l._setTransform(a),d&&(t.normalize(l.position,l.position),t.negate(l.position,l.direction),t.multiplyByScalar(l.position,Math.max(s,e.minimumZoomDistance),l.position),t.normalize(l.direction,l.direction),t.cross(l.direction,l.up,l.right),t.cross(l.right,l.direction,l.up)))}}}var ee=.4,te=[],ie=new v,ne=new t,re=new e,oe=new t,ae=new e,se=new t,le=new t,ue=new t,ce=new t,he=new t,de=new t,pe=new t,me=new t,fe=new t,ge=new t,ve=new t,_e=new t,ye=new t,Ce=new t,we=new t,Ee=new t,be=new t,Se=new t,Te=new v,xe=new v,Ae=new t,Pe=new e,Me=new e,De=new v,Ie=new t,Re=new t,Oe=new v,Le=new v,Ne=new t,Fe=new t,ke=new t,Be=new t,ze=new f(t.ZERO,0),Ve=new e,Ue=new e,Ge=new e,We=new v,He=new t,qe=new t,je=new m,Ye=new m,Xe=new t,Ze=new f(t.ZERO,0),Ke=new t,Je=new n,Qe=new m,$e=new g,et=new p,tt=new e,it=new v,nt=new t,rt=new v,ot=new f(t.ZERO,0),at=new t,st=new t,lt=new t,ut=new n,ct=new t,ht=new t,dt=new l,pt=new t,mt=i.clone(i.UNIT_W),ft=i.clone(i.UNIT_W),gt=new t,vt=new t,_t=new t,yt=new t,Ct=new e,wt=new e,Et=new t,bt=new n,St=new e,Tt=new v,xt=new t,At=new t,Pt=new m,Mt=new m,Dt=new t,It=new m,Rt=new g,Ot=new p,Lt=new n,Nt=new t,Ft=new n,kt=new e,Bt=new e,zt=new v,Vt=new v,Ut=new t,Gt=new t,Wt=new n;return T.prototype.update=function(){m.equals(this._scene.camera.transform,m.IDENTITY)?(this._globe=this._scene.globe,this._ellipsoid=o(this._globe)?this._globe.ellipsoid:this._scene.mapProjection.ellipsoid):(this._globe=void 0,this._ellipsoid=l.UNIT_SPHERE),this._minimumCollisionTerrainHeight=this.minimumCollisionTerrainHeight*this._scene.terrainExaggeration,this._minimumPickingTerrainHeight=this.minimumPickingTerrainHeight*this._scene.terrainExaggeration,this._minimumTrackBallHeight=this.minimumTrackBallHeight*this._scene.terrainExaggeration;var e=this._ellipsoid.maximumRadius;this._rotateFactor=1/e,this._rotateRateRangeAdjustment=e;var i=this._scene,n=i.mode;n===E.SCENE2D?N(this):n===E.COLUMBUS_VIEW?(this._horizontalRotationAxis=t.UNIT_Z,G(this)):n===E.SCENE3D&&(this._horizontalRotationAxis=void 0,Q(this)),$(this),this._aggregator.reset()},T.prototype.isDestroyed=function(){return!1},T.prototype.destroy=function(){return this._tweens.removeAll(),this._aggregator=this._aggregator&&this._aggregator.destroy(),a(this)},T}),define("Cesium/Scene/ShadowMapShader",["../Core/defaultValue","../Core/defined","../Renderer/ShaderSource"],function(e,t,i){"use strict";function n(){}return n.createShadowCastVertexShader=function(e,n,r){var o=e.defines.slice(0),a=e.sources.slice(0);r&&o.push("GENERATE_POSITION");var s=i.findPositionVarying(e),l=t(s);if(n&&!l){for(var u=a.length,c=0;u>c;++c)a[c]=i.replaceMain(a[c],"czm_shadow_cast_main");var h="varying vec3 v_positionEC; \nvoid main() \n{ \n czm_shadow_cast_main(); \n v_positionEC = (czm_inverseProjection * gl_Position).xyz; \n}";a.push(h)}return new i({defines:o,sources:a})},n.createShadowCastFragmentShader=function(e,n,r,o){var a=e.defines.slice(0),s=e.sources.slice(0),l=i.findPositionVarying(e),u=t(l);u||(l="v_positionEC");for(var c=s.length,h=0;c>h;++h)s[h]=i.replaceMain(s[h],"czm_shadow_cast_main");var d="";return n&&(u||(d+="varying vec3 v_positionEC; \n"),d+="uniform vec4 shadowMap_lightPositionEC; \n"),d+=o?"void main() \n{ \n":"void main() \n{ \n czm_shadow_cast_main(); \n if (gl_FragColor.a == 0.0) \n { \n discard; \n } \n",d+=n?"float distance = length("+l+"); \ndistance /= shadowMap_lightPositionEC.w; // radius \ngl_FragColor = czm_packDepth(distance); \n":r?"gl_FragColor = vec4(1.0); \n":"gl_FragColor = czm_packDepth(gl_FragCoord.z); \n",d+="} \n",s.push(d),new i({defines:a,sources:s})},n.createShadowReceiveVertexShader=function(e,t,n){var r=e.defines.slice(0),o=e.sources.slice(0);return t&&(n?r.push("GENERATE_POSITION_AND_NORMAL"):r.push("GENERATE_POSITION")),new i({defines:r,sources:o})},n.createShadowReceiveFragmentShader=function(e,n,r,o,a){for(var s=i.findNormalVarying(e),l=!o&&t(s)||o&&a,u=i.findPositionVarying(e),c=t(u),h=n._usesDepthTexture,d=n._isPointLight,p=n._isSpotLight,m=n._numberOfCascades>1,f=n.debugCascadeColors,g=n.softShadows,v=d?n._pointBias:o?n._terrainBias:n._primitiveBias,_=e.defines.slice(0),y=e.sources.slice(0),C=y.length,w=0;C>w;++w)y[w]=i.replaceMain(y[w],"czm_shadow_receive_main");d?_.push("USE_CUBE_MAP_SHADOW"):h&&_.push("USE_SHADOW_DEPTH_TEXTURE"),g&&!d&&_.push("USE_SOFT_SHADOWS"),m&&r&&o&&(l?_.push("ENABLE_VERTEX_LIGHTING"):_.push("ENABLE_DAYNIGHT_SHADING")),r&&v.normalShading&&l&&(_.push("USE_NORMAL_SHADING"),v.normalShadingSmooth>0&&_.push("USE_NORMAL_SHADING_SMOOTH"));var E="";return E+=d?"uniform samplerCube shadowMap_textureCube; \n":"uniform sampler2D shadowMap_texture; \n",E+="uniform mat4 shadowMap_matrix; \nuniform vec3 shadowMap_lightDirectionEC; \nuniform vec4 shadowMap_lightPositionEC; \nuniform vec4 shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness; \nuniform vec4 shadowMap_texelSizeDepthBiasAndNormalShadingSmooth; \nvec4 getPositionEC() \n{ \n"+(c?" return vec4("+u+", 1.0); \n":" return czm_windowToEyeCoordinates(gl_FragCoord); \n")+"} \nvec3 getNormalEC() \n{ \n"+(l?" return normalize("+s+"); \n":" return vec3(1.0); \n")+"} \nvoid applyNormalOffset(inout vec4 positionEC, vec3 normalEC, float nDotL) \n{ \n"+(v.normalOffset&&l?" float normalOffset = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.x; \n float normalOffsetScale = 1.0 - nDotL; \n vec3 offset = normalOffset * normalOffsetScale * normalEC; \n positionEC.xyz += offset; \n":"")+"} \n",E+="void main() \n{ \n czm_shadow_receive_main(); \n vec4 positionEC = getPositionEC(); \n vec3 normalEC = getNormalEC(); \n float depth = -positionEC.z; \n",E+=" czm_shadowParameters shadowParameters; \n shadowParameters.texelStepSize = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.xy; \n shadowParameters.depthBias = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.z; \n shadowParameters.normalShadingSmooth = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.w; \n shadowParameters.darkness = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.w; \n",E+=o?" shadowParameters.depthBias *= max(depth * 0.01, 1.0); \n":" shadowParameters.depthBias *= mix(1.0, 100.0, depth * 0.0015); \n",E+=d?" vec3 directionEC = positionEC.xyz - shadowMap_lightPositionEC.xyz; \n float distance = length(directionEC); \n directionEC = normalize(directionEC); \n float radius = shadowMap_lightPositionEC.w; \n // Stop early if the fragment is beyond the point light radius \n if (distance > radius) \n { \n return; \n } \n vec3 directionWC = czm_inverseViewRotation * directionEC; \n shadowParameters.depth = distance / radius; \n shadowParameters.nDotL = clamp(dot(normalEC, -directionEC), 0.0, 1.0); \n shadowParameters.texCoords = directionWC; \n float visibility = czm_shadowVisibility(shadowMap_textureCube, shadowParameters); \n":p?" vec3 directionEC = normalize(positionEC.xyz - shadowMap_lightPositionEC.xyz); \n float nDotL = clamp(dot(normalEC, -directionEC), 0.0, 1.0); \n applyNormalOffset(positionEC, normalEC, nDotL); \n vec4 shadowPosition = shadowMap_matrix * positionEC; \n // Spot light uses a perspective projection, so perform the perspective divide \n shadowPosition /= shadowPosition.w; \n // Stop early if the fragment is not in the shadow bounds \n if (any(lessThan(shadowPosition.xyz, vec3(0.0))) || any(greaterThan(shadowPosition.xyz, vec3(1.0)))) \n { \n return; \n } \n shadowParameters.texCoords = shadowPosition.xy; \n shadowParameters.depth = shadowPosition.z; \n shadowParameters.nDotL = nDotL; \n float visibility = czm_shadowVisibility(shadowMap_texture, shadowParameters); \n":m?" float maxDepth = shadowMap_cascadeSplits[1].w; \n // Stop early if the eye depth exceeds the last cascade \n if (depth > maxDepth) \n { \n return; \n } \n // Get the cascade based on the eye-space depth \n vec4 weights = czm_cascadeWeights(depth); \n // Apply normal offset \n float nDotL = clamp(dot(normalEC, shadowMap_lightDirectionEC), 0.0, 1.0); \n applyNormalOffset(positionEC, normalEC, nDotL); \n // Transform position into the cascade \n vec4 shadowPosition = czm_cascadeMatrix(weights) * positionEC; \n // Get visibility \n shadowParameters.texCoords = shadowPosition.xy; \n shadowParameters.depth = shadowPosition.z; \n shadowParameters.nDotL = nDotL; \n float visibility = czm_shadowVisibility(shadowMap_texture, shadowParameters); \n // Fade out shadows that are far away \n float shadowMapMaximumDistance = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.z; \n float fade = max((depth - shadowMapMaximumDistance * 0.8) / (shadowMapMaximumDistance * 0.2), 0.0); \n visibility = mix(visibility, 1.0, fade); \n"+(f?" // Draw cascade colors for debugging \n gl_FragColor *= czm_cascadeColor(weights); \n":""):" float nDotL = clamp(dot(normalEC, shadowMap_lightDirectionEC), 0.0, 1.0); \n applyNormalOffset(positionEC, normalEC, nDotL); \n vec4 shadowPosition = shadowMap_matrix * positionEC; \n // Stop early if the fragment is not in the shadow bounds \n if (any(lessThan(shadowPosition.xyz, vec3(0.0))) || any(greaterThan(shadowPosition.xyz, vec3(1.0)))) \n { \n return; \n } \n shadowParameters.texCoords = shadowPosition.xy; \n shadowParameters.depth = shadowPosition.z; \n shadowParameters.nDotL = nDotL; \n float visibility = czm_shadowVisibility(shadowMap_texture, shadowParameters); \n",E+=" gl_FragColor.rgb *= visibility; \n} \n",y.push(E),new i({defines:_,sources:y})},n}),define("Cesium/Scene/ShadowMap",["../Core/BoundingRectangle","../Core/BoundingSphere","../Core/BoxOutlineGeometry","../Core/Cartesian2","../Core/Cartesian3","../Core/Cartesian4","../Core/Cartographic","../Core/clone","../Core/Color","../Core/ColorGeometryInstanceAttribute","../Core/combine","../Core/ComponentDatatype","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/destroyObject","../Core/DeveloperError","../Core/FeatureDetection","../Core/Geometry","../Core/GeometryAttribute","../Core/GeometryAttributes","../Core/GeometryInstance","../Core/Intersect","../Core/Math","../Core/Matrix4","../Core/PixelFormat","../Core/PrimitiveType","../Core/Quaternion","../Core/SphereOutlineGeometry","../Renderer/ClearCommand","../Renderer/ContextLimits","../Renderer/CubeMap","../Renderer/DrawCommand","../Renderer/Framebuffer","../Renderer/PassState","../Renderer/PixelDatatype","../Renderer/Renderbuffer","../Renderer/RenderbufferFormat","../Renderer/RenderState","../Renderer/Sampler","../Renderer/ShaderProgram","../Renderer/ShaderSource","../Renderer/Texture","../Renderer/TextureMagnificationFilter","../Renderer/TextureMinificationFilter","../Renderer/TextureWrap","../Renderer/WebGLConstants","./Camera","./CullFace","./CullingVolume","./OrthographicFrustum","./Pass","./PerInstanceColorAppearance","./PerspectiveFrustum","./Primitive","./ShadowMapShader"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g,v,_,y,C,w,E,b,S,T,x,A,P,M,D,I,R,O,L,N,F,k,B,z,V,U,G,W,H,q,j,Y,X,Z,K,J,Q,$,ee,te){"use strict";function ie(e){e=d(e,d.EMPTY_OBJECT);var i=e.context;this._enabled=d(e.enabled,!0),this._softShadows=d(e.softShadows,!1),this.dirty=!0,this.darkness=d(e.darkness,.3),this._darkness=this.darkness,this.maximumDistance=d(e.maximumDistance,5e3),this._outOfView=!1,this._outOfViewPrevious=!1,this._needsUpdate=!0;var a=!0;v.isInternetExplorer&&(a=!1),this._polygonOffsetSupported=a,this._terrainBias={polygonOffset:a,polygonOffsetFactor:1.1,polygonOffsetUnits:4,normalOffset:!0,normalOffsetScale:.5,normalShading:!0,normalShadingSmooth:.3,depthBias:1e-4},this._primitiveBias={polygonOffset:a,polygonOffsetFactor:1.1,polygonOffsetUnits:4,normalOffset:!0,normalOffsetScale:.1,normalShading:!0,normalShadingSmooth:.05,depthBias:2e-5},this._pointBias={polygonOffset:!1,polygonOffsetFactor:1.1,polygonOffsetUnits:4,normalOffset:!1,normalOffsetScale:0,normalShading:!0,normalShadingSmooth:.1,depthBias:5e-4},this._depthAttachment=void 0,this._colorAttachment=void 0,this._shadowMapMatrix=new S,this._shadowMapTexture=void 0,this._lightDirectionEC=new r,this._lightPositionEC=new o,this._distance=0,this._lightCamera=e.lightCamera,this._shadowMapCamera=new we,this._shadowMapCullingVolume=void 0,this._sceneCamera=void 0,this._boundingSphere=new t,this._isPointLight=d(e.isPointLight,!1),this._pointLightRadius=d(e.pointLightRadius,100),this._cascadesEnabled=this._isPointLight?!1:d(e.cascadesEnabled,!0),this._numberOfCascades=this._cascadesEnabled?d(e.numberOfCascades,4):0,this._fitNearFar=!0,this._maximumCascadeDistances=[25,150,700,Number.MAX_VALUE],this._textureSize=new n,this._isSpotLight=!1,this._cascadesEnabled?this._shadowMapCamera.frustum=new K:p(this._lightCamera.frustum.fov)&&(this._isSpotLight=!0),this._cascadeSplits=[new o,new o],this._cascadeMatrices=[new S,new S,new S,new S],this._cascadeDistances=new o;var s;s=this._isPointLight?6:this._cascadesEnabled?this._numberOfCascades:1,this._passes=new Array(s);for(var u=0;s>u;++u)this._passes[u]=new ne(i);this.debugShow=!1,this.debugFreezeFrame=!1,this._debugFreezeFrame=!1,this._debugCascadeColors=!1,this._debugLightFrustum=void 0,this._debugCameraFrustum=void 0,this._debugCascadeFrustums=new Array(this._numberOfCascades),this._debugShadowViewCommand=void 0,this._usesDepthTexture=i.depthTexture,this._isPointLight&&(this._usesDepthTexture=!1),this._primitiveRenderState=void 0,this._terrainRenderState=void 0,this._pointRenderState=void 0,oe(this),this._clearCommand=new M({depth:1,color:new l}),this._clearPassState=new L(i),this._size=d(e.size,2048),this.size=this._size}function ne(e){this.camera=new we,this.passState=new L(e),this.framebuffer=void 0,this.textureOffsets=void 0,this.commandList=[],this.cullingVolume=void 0}function re(e,t){return B.fromCache({cull:{enabled:!0,face:X.BACK},depthTest:{enabled:!0},colorMask:{red:e,green:e,blue:e,alpha:e},depthMask:!0,polygonOffset:{enabled:t.polygonOffset,factor:t.polygonOffsetFactor,units:t.polygonOffsetUnits}})}function oe(e){var t=!e._usesDepthTexture;e._primitiveRenderState=re(t,e._primitiveBias),e._terrainRenderState=re(t,e._terrainBias),e._pointRenderState=re(t,e._pointBias)}function ae(e){for(var t=e._passes.length,i=0;t>i;++i){var n=e._passes[i],r=n.framebuffer;p(r)&&!r.isDestroyed()&&r.destroy(),n.framebuffer=void 0}e._depthAttachment=e._depthAttachment&&e._depthAttachment.destroy(),e._colorAttachment=e._colorAttachment&&e._colorAttachment.destroy()}function se(){return new z({wrapS:q.CLAMP_TO_EDGE,wrapT:q.CLAMP_TO_EDGE,minificationFilter:H.NEAREST,magnificationFilter:W.NEAREST})}function le(e,t){for(var i=new F({context:t,width:e._textureSize.x,height:e._textureSize.y,format:k.DEPTH_COMPONENT16}),n=new G({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:T.RGBA,pixelDatatype:N.UNSIGNED_BYTE,sampler:se()}),r=new O({context:t,depthRenderbuffer:i,colorTextures:[n],destroyAttachments:!1}),o=e._passes.length,a=0;o>a;++a){var s=e._passes[a];s.framebuffer=r,s.passState.framebuffer=r}e._shadowMapTexture=n,e._depthAttachment=i,e._colorAttachment=n}function ue(e,t){for(var i=new G({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:T.DEPTH_STENCIL,pixelDatatype:N.UNSIGNED_INT_24_8,sampler:se()}),n=new O({context:t,depthStencilTexture:i,destroyAttachments:!1}),r=e._passes.length,o=0;r>o;++o){var a=e._passes[o];a.framebuffer=n,a.passState.framebuffer=n}e._shadowMapTexture=i,e._depthAttachment=i}function ce(e,t){for(var i=new F({context:t,width:e._textureSize.x,height:e._textureSize.y,format:k.DEPTH_COMPONENT16}),n=new I({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:T.RGBA,pixelDatatype:N.UNSIGNED_BYTE,sampler:se()}),r=[n.negativeX,n.negativeY,n.negativeZ,n.positiveX,n.positiveY,n.positiveZ],o=0;6>o;++o){var a=new O({context:t,depthRenderbuffer:i,colorTextures:[r[o]],destroyAttachments:!1}),s=e._passes[o];s.framebuffer=a,s.passState.framebuffer=a}e._shadowMapTexture=n,e._depthAttachment=i,e._colorAttachment=n}function he(e,t){e._isPointLight?ce(e,t):e._usesDepthTexture?ue(e,t):le(e,t)}function de(e,t){e._usesDepthTexture&&e._passes[0].framebuffer.status!==j.FRAMEBUFFER_COMPLETE&&(e._usesDepthTexture=!1,oe(e),ae(e),he(e,t))}function pe(e,t){p(e._passes[0].framebuffer)&&e._shadowMapTexture.width===e._textureSize.x||(ae(e),he(e,t),de(e,t),me(e,t))}function me(e,t,i){i=d(i,0),(e._isPointLight||0===i)&&(e._clearCommand.framebuffer=e._passes[i].framebuffer,e._clearCommand.execute(t,e._clearPassState))}function fe(t,i){t._size=i;var n=t._passes,r=n.length,o=t._textureSize;if(t._isPointLight){i=D.maximumCubeMapSize>=i?i:D.maximumCubeMapSize,o.x=i,o.y=i;var a=new e(0,0,i,i);n[0].passState.viewport=a,n[1].passState.viewport=a,n[2].passState.viewport=a,n[3].passState.viewport=a,n[4].passState.viewport=a,n[5].passState.viewport=a}else 1===r?(i=D.maximumTextureSize>=i?i:D.maximumTextureSize,o.x=i,o.y=i,n[0].passState.viewport=new e(0,0,i,i)):4===r&&(i=D.maximumTextureSize>=2*i?i:D.maximumTextureSize/2,o.x=2*i,o.y=2*i,n[0].passState.viewport=new e(0,0,i,i),n[1].passState.viewport=new e(i,0,i,i),n[2].passState.viewport=new e(0,i,i,i),n[3].passState.viewport=new e(i,i,i,i));t._clearPassState.viewport=new e(0,0,o.x,o.y);for(var s=0;r>s;++s){var l=n[s],u=l.passState.viewport,c=u.x/o.x,h=u.y/o.y,d=u.width/o.x,p=u.height/o.y;l.textureOffsets=new S(d,0,0,c,0,p,0,h,0,0,1,0,0,0,0,1)}}function ge(e,t){var i;i=e._isPointLight?"uniform samplerCube shadowMap_textureCube; \nvarying vec2 v_textureCoordinates; \nvoid main() \n{ \n vec2 uv = v_textureCoordinates; \n vec3 dir; \n \n if (uv.y < 0.5) \n { \n if (uv.x < 0.333) \n { \n dir.x = -1.0; \n dir.y = uv.x * 6.0 - 1.0; \n dir.z = uv.y * 4.0 - 1.0; \n } \n else if (uv.x < 0.666) \n { \n dir.y = -1.0; \n dir.x = uv.x * 6.0 - 3.0; \n dir.z = uv.y * 4.0 - 1.0; \n } \n else \n { \n dir.z = -1.0; \n dir.x = uv.x * 6.0 - 5.0; \n dir.y = uv.y * 4.0 - 1.0; \n } \n } \n else \n { \n if (uv.x < 0.333) \n { \n dir.x = 1.0; \n dir.y = uv.x * 6.0 - 1.0; \n dir.z = uv.y * 4.0 - 3.0; \n } \n else if (uv.x < 0.666) \n { \n dir.y = 1.0; \n dir.x = uv.x * 6.0 - 3.0; \n dir.z = uv.y * 4.0 - 3.0; \n } \n else \n { \n dir.z = 1.0; \n dir.x = uv.x * 6.0 - 5.0; \n dir.y = uv.y * 4.0 - 3.0; \n } \n } \n \n float shadow = czm_unpackDepth(textureCube(shadowMap_textureCube, dir)); \n gl_FragColor = vec4(vec3(shadow), 1.0); \n} \n":"uniform sampler2D shadowMap_texture; \nvarying vec2 v_textureCoordinates; \nvoid main() \n{ \n"+(e._usesDepthTexture?" float shadow = texture2D(shadowMap_texture, v_textureCoordinates).r; \n":" float shadow = czm_unpackDepth(texture2D(shadowMap_texture, v_textureCoordinates)); \n")+" gl_FragColor = vec4(vec3(shadow), 1.0); \n} \n";var n=t.createViewportQuadCommand(i,{uniformMap:{shadowMap_texture:function(){return e._shadowMapTexture},shadowMap_textureCube:function(){return e._shadowMapTexture}}});return n.pass=J.OVERLAY,n}function ve(t,i){var n=i.context,r=i.context.drawingBufferWidth,o=i.context.drawingBufferHeight,a=.3*Math.min(r,o),s=Me;s.x=r-a,s.y=0,s.width=a,s.height=a;var l=t._debugShadowViewCommand;p(l)||(l=ge(t,n),t._debugShadowViewCommand=l),p(l.renderState)&&e.equals(l.renderState.viewport,s)||(l.renderState=B.fromCache({viewport:e.clone(s)})),i.commandList.push(t._debugShadowViewCommand)}function _e(e,t){var n=new w({geometry:new i({minimum:new r(-.5,-.5,-.5),maximum:new r(.5,.5,.5)}),attributes:{color:u.fromColor(t)}}),o=new w({geometry:new P({radius:.5}),attributes:{color:u.fromColor(t)}});return new ee({geometryInstances:[n,o],appearance:new Q({translucent:!1,flat:!0}),asynchronous:!1,modelMatrix:e})}function ye(e,i){for(var n=e.viewMatrix,a=e.frustum.projectionMatrix,s=S.multiply(a,n,Ie),l=S.inverse(s,Ie),c=new Float64Array(24),d=0;8>d;++d){var p=o.clone(De[d],Re[d]);S.multiplyByVector(l,p,p),r.divideByScalar(p,p.w,p),c[3*d+0]=p.x,c[3*d+1]=p.y,c[3*d+2]=p.z}var m=new C;m.position=new y({componentDatatype:h.DOUBLE,componentsPerAttribute:3,values:c});var f=new Uint16Array([0,1,1,2,2,3,3,0,0,4,4,7,7,3,7,6,6,2,2,1,1,5,5,4,5,6]),g=new _({attributes:m,indices:f,primitiveType:x.LINES,boundingSphere:new t.fromVertices(c)}),v=new ee({geometryInstances:new w({geometry:g,attributes:{color:u.fromColor(i)}}),appearance:new Q({translucent:!1,flat:!0}),asynchronous:!1});return v}function Ce(e,t){ve(e,t);var i=e.debugFreezeFrame&&!e._debugFreezeFrame;if(e._debugFreezeFrame=e.debugFreezeFrame,e.debugFreezeFrame&&(i&&(e._debugCameraFrustum=e._debugCameraFrustum&&e._debugCameraFrustum.destroy(),e._debugCameraFrustum=ye(e._sceneCamera,l.CYAN)),e._debugCameraFrustum.update(t)),e._cascadesEnabled){if(e.debugFreezeFrame){i&&(e._debugLightFrustum=e._debugLightFrustum&&e._debugLightFrustum.destroy(),e._debugLightFrustum=ye(e._shadowMapCamera,l.YELLOW)),e._debugLightFrustum.update(t);for(var n=0;n<e._numberOfCascades;++n)i&&(e._debugCascadeFrustums[n]=e._debugCascadeFrustums[n]&&e._debugCascadeFrustums[n].destroy(),e._debugCascadeFrustums[n]=ye(e._passes[n].camera,Le[n])),e._debugCascadeFrustums[n].update(t)}}else if(e._isPointLight){if(!p(e._debugLightFrustum)||e._needsUpdate){var o=e._shadowMapCamera.positionWC,a=A.IDENTITY,s=2*e._pointLightRadius,u=r.fromElements(s,s,s,Ne),c=S.fromTranslationQuaternionRotationScale(o,a,u,Ie);e._debugLightFrustum=e._debugLightFrustum&&e._debugLightFrustum.destroy(),e._debugLightFrustum=_e(c,l.YELLOW)}e._debugLightFrustum.update(t)}else(!p(e._debugLightFrustum)||e._needsUpdate)&&(e._debugLightFrustum=ye(e._shadowMapCamera,l.YELLOW)),e._debugLightFrustum.update(t)}function we(){this.viewMatrix=new S,this.inverseViewMatrix=new S,this.frustum=void 0,this.positionCartographic=new a,this.positionWC=new r,this.directionWC=new r,this.upWC=new r,this.rightWC=new r,this.viewProjectionMatrix=new S}function Ee(e,t){var i,n=e._shadowMapCamera,a=e._sceneCamera,s=a.frustum.near,l=a.frustum.far,u=e._numberOfCascades,c=l-s,h=l/s,d=.9,p=!1;t.shadowHints.closestObjectSize<200&&(p=!0,d=.9);var m=ze,f=ke;for(f[0]=s,f[u]=l,i=0;u>i;++i){var g=(i+1)/u,v=s*Math.pow(h,g),_=s+c*g,y=b.lerp(_,v,d);f[i+1]=y,m[i]=y-f[i]}if(p){for(i=0;u>i;++i)m[i]=Math.min(m[i],e._maximumCascadeDistances[i]);var C=f[0];for(i=0;u-1>i;++i)C+=m[i],f[i+1]=C}o.unpack(f,0,e._cascadeSplits[0]),o.unpack(f,1,e._cascadeSplits[1]),o.unpack(m,0,e._cascadeDistances);var w=n.frustum,E=w.left,T=w.right,x=w.bottom,A=w.top,P=w.near,M=w.far,D=n.positionWC,I=n.directionWC,R=n.upWC,O=a.frustum.clone(Be),L=n.getViewProjection();for(i=0;u>i;++i){O.near=f[i],O.far=f[i+1];for(var N=S.multiply(O.projectionMatrix,a.viewMatrix,Ie),F=S.inverse(N,Ie),k=S.multiply(L,F,Ie),B=r.fromElements(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,We),z=r.fromElements(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE,He),V=0;8>V;++V){var U=o.clone(De[V],Re[V]);S.multiplyByVector(k,U,U),r.divideByScalar(U,U.w,U),r.minimumByComponent(U,B,B),r.maximumByComponent(U,z,z)}B.x=Math.max(B.x,0),B.y=Math.max(B.y,0),B.z=0,z.x=Math.min(z.x,1),z.y=Math.min(z.y,1),z.z=Math.min(z.z,1);var G=e._passes[i],W=G.camera;W.clone(n);var H=W.frustum;H.left=E+B.x*(T-E),H.right=E+z.x*(T-E),H.bottom=x+B.y*(A-x),H.top=x+z.y*(A-x),H.near=P+B.z*(M-P),H.far=P+z.z*(M-P),G.cullingVolume=W.frustum.computeCullingVolume(D,I,R);var q=e._cascadeMatrices[i];S.multiply(W.getViewProjection(),a.inverseViewMatrix,q),S.multiply(G.textureOffsets,q,q)}}function be(e,t){var i=e._shadowMapCamera,n=e._sceneCamera,a=S.multiply(n.frustum.projectionMatrix,n.viewMatrix,Ie),s=S.inverse(a,Ie),l=i.directionWC,u=n.directionWC,c=r.cross(l,u,Ue);u=r.cross(c,l,Ge),r.normalize(u,u),r.normalize(c,c);for(var h=r.fromElements(0,0,0,qe),d=S.computeView(h,l,u,c,Ve),p=S.multiply(d,s,Ie),m=r.fromElements(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,We),f=r.fromElements(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE,He),g=0;8>g;++g){var v=o.clone(De[g],Re[g]);S.multiplyByVector(p,v,v),r.divideByScalar(v,v.w,v),r.minimumByComponent(v,m,m),r.maximumByComponent(v,f,f)}f.z+=1e3,m.z-=10;var _=qe;_.x=-(.5*(m.x+f.x)),_.y=-(.5*(m.y+f.y)),_.z=-f.z;var y=S.fromTranslation(_,Ie);d=S.multiply(y,d,d);var C=.5*(f.x-m.x),w=.5*(f.y-m.y),E=f.z-m.z,b=i.frustum;b.left=-C,b.right=C,b.bottom=-w,b.top=w,b.near=.01,b.far=E,S.clone(d,i.viewMatrix),S.inverse(d,i.inverseViewMatrix),S.getTranslation(i.inverseViewMatrix,i.positionWC),t.mapProjection.ellipsoid.cartesianToCartographic(i.positionWC,i.positionCartographic),r.clone(l,i.directionWC),r.clone(u,i.upWC),r.clone(c,i.rightWC)}function Se(e,t){var i=new $;i.fov=b.PI_OVER_TWO,i.near=1,i.far=e._pointLightRadius,i.aspectRatio=1;for(var n=0;6>n;++n){var r=e._passes[n].camera;r.positionWC=e._shadowMapCamera.positionWC,r.positionCartographic=t.mapProjection.ellipsoid.cartesianToCartographic(r.positionWC,r.positionCartographic),r.directionWC=je[n],r.upWC=Ye[n],r.rightWC=Xe[n],S.computeView(r.positionWC,r.directionWC,r.upWC,r.rightWC,r.viewMatrix),S.inverse(r.viewMatrix,r.inverseViewMatrix),r.frustum=i}}function Te(e,i){var n=e._sceneCamera,o=e._shadowMapCamera,a=Je;if(e._cascadesEnabled){if(n.frustum.near>=e.maximumDistance)return e._outOfView=!0, +void(e._needsUpdate=!1);var s=i.mapProjection.ellipsoid.geodeticSurfaceNormal(n.positionWC,Ze),l=r.negate(o.directionWC,Ke),u=r.dot(s,l),c=b.clamp(u/.1,0,1);if(e._darkness=b.lerp(1,e.darkness,c),0>u)return e._outOfView=!0,void(e._needsUpdate=!1);e._needsUpdate=!0,e._outOfView=!1}else if(e._isPointLight)a.center=o.positionWC,a.radius=e._pointLightRadius,e._outOfView=i.cullingVolume.computeVisibility(a)===E.OUTSIDE,e._needsUpdate=!e._outOfView&&!e._boundingSphere.equals(a),t.clone(a,e._boundingSphere);else{var h=o.frustum.far/2,d=r.add(o.positionWC,r.multiplyByScalar(o.directionWC,h,Qe),Qe);a.center=d,a.radius=h,e._outOfView=i.cullingVolume.computeVisibility(a)===E.OUTSIDE,e._needsUpdate=!e._outOfView&&!e._boundingSphere.equals(a),t.clone(a,e._boundingSphere)}}function xe(e,t){var i=t.camera,n=e._lightCamera,o=e._sceneCamera,a=e._shadowMapCamera;e._cascadesEnabled?r.clone(n.directionWC,a.directionWC):e._isPointLight?r.clone(n.positionWC,a.positionWC):a.clone(n);var s=e._lightDirectionEC;S.multiplyByPointAsVector(i.viewMatrix,a.directionWC,s),r.normalize(s,s),r.negate(s,s),S.multiplyByPoint(i.viewMatrix,a.positionWC,e._lightPositionEC),e._lightPositionEC.w=e._pointLightRadius;var l,u;e._fitNearFar?(l=Math.min(t.shadowHints.nearPlane,e.maximumDistance),u=Math.min(t.shadowHints.farPlane,e.maximumDistance)):(l=i.frustum.near,u=e.maximumDistance),e._sceneCamera=Y.clone(i,o),i.frustum.clone(e._sceneCamera.frustum),e._sceneCamera.frustum.near=l,e._sceneCamera.frustum.far=u,e._distance=u-l,Te(e,t),!e._outOfViewPrevious&&e._outOfView&&(e._needsUpdate=!0),e._outOfViewPrevious=e._outOfView}function Ae(e,t,i){var n=e._isPointLight?e._pointBias:i?e._terrainBias:e._primitiveBias,r={shadowMap_texture:function(){return e._shadowMapTexture},shadowMap_textureCube:function(){return e._shadowMapTexture},shadowMap_matrix:function(){return e._shadowMapMatrix},shadowMap_cascadeSplits:function(){return e._cascadeSplits},shadowMap_cascadeMatrices:function(){return e._cascadeMatrices},shadowMap_lightDirectionEC:function(){return e._lightDirectionEC},shadowMap_lightPositionEC:function(){return e._lightPositionEC},shadowMap_cascadeDistances:function(){return e._cascadeDistances},shadowMap_texelSizeDepthBiasAndNormalShadingSmooth:function(){var t=$e;return t.x=1/e._textureSize.x,t.y=1/e._textureSize.y,o.fromElements(t.x,t.y,n.depthBias,n.normalShadingSmooth,this.combinedUniforms1)},shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness:function(){return o.fromElements(n.normalOffsetScale,e._distance,e.maximumDistance,e._darkness,this.combinedUniforms2)},combinedUniforms1:new o,combinedUniforms2:new o};return c(t,r,!1)}function Pe(e,t,i,n,r,o){var a,l,u;if(p(o)&&(a=o.shaderProgram,l=o.renderState,u=o.uniformMap),o=R.shallowClone(i,o),o.castShadows=!0,o.receiveShadows=!1,!p(a)||r!==i.shaderProgram.id||t){p(a)&&a.destroy();var c=i.shaderProgram,h=c.vertexShaderSource,d=c.fragmentShaderSource,m=i.pass===J.GLOBE,f=i.pass!==J.TRANSLUCENT,g=e._isPointLight,v=e._usesDepthTexture,_=te.createShadowCastVertexShader(h,g,m),y=te.createShadowCastFragmentShader(d,g,v,f);a=V.fromCache({context:n,vertexShaderSource:_,fragmentShaderSource:y,attributeLocations:c._attributeLocations}),l=e._primitiveRenderState,g?l=e._pointRenderState:m&&(l=e._terrainRenderState);var C=i.renderState.cull.enabled;C||(l=s(l,!1),l.cull.enabled=!1,l=B.fromCache(l)),u=Ae(e,i.uniformMap,m)}return o.shaderProgram=a,o.renderState=l,o.uniformMap=u,o}ie.MAXIMUM_DISTANCE=2e4,ie.prototype.debugCreateRenderStates=function(){oe(this)},m(ie.prototype,{enabled:{get:function(){return this._enabled},set:function(e){this.dirty=this._enabled!==e,this._enabled=e}},softShadows:{get:function(){return this._softShadows},set:function(e){this.dirty=this._softShadows!==e,this._softShadows=e}},size:{get:function(){return this._size},set:function(e){fe(this,e)}},outOfView:{get:function(){return this._outOfView}},shadowMapCullingVolume:{get:function(){return this._shadowMapCullingVolume}},passes:{get:function(){return this._passes}},isPointLight:{get:function(){return this._isPointLight}},debugCascadeColors:{get:function(){return this._debugCascadeColors},set:function(e){this.dirty=this._debugCascadeColors!==e,this._debugCascadeColors=e}}});var Me=new e,De=new Array(8);De[0]=new o(-1,-1,-1,1),De[1]=new o(1,-1,-1,1),De[2]=new o(1,1,-1,1),De[3]=new o(-1,1,-1,1),De[4]=new o(-1,-1,1,1),De[5]=new o(1,-1,1,1),De[6]=new o(1,1,1,1),De[7]=new o(-1,1,1,1);for(var Ie=new S,Re=new Array(8),Oe=0;8>Oe;++Oe)Re[Oe]=new o;var Le=[l.RED,l.GREEN,l.BLUE,l.MAGENTA],Ne=new r;we.prototype.clone=function(e){S.clone(e.viewMatrix,this.viewMatrix),S.clone(e.inverseViewMatrix,this.inverseViewMatrix),this.frustum=e.frustum.clone(this.frustum),a.clone(e.positionCartographic,this.positionCartographic),r.clone(e.positionWC,this.positionWC),r.clone(e.directionWC,this.directionWC),r.clone(e.upWC,this.upWC),r.clone(e.rightWC,this.rightWC)};var Fe=new S(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1);we.prototype.getViewProjection=function(){var e=this.viewMatrix,t=this.frustum.projectionMatrix;return S.multiply(t,e,this.viewProjectionMatrix),S.multiply(Fe,this.viewProjectionMatrix,this.viewProjectionMatrix),this.viewProjectionMatrix};var ke=new Array(5),Be=new $,ze=new Array(4),Ve=new S,Ue=new r,Ge=new r,We=new r,He=new r,qe=new r,je=[new r(-1,0,0),new r(0,-1,0),new r(0,0,-1),new r(1,0,0),new r(0,1,0),new r(0,0,1)],Ye=[new r(0,-1,0),new r(0,0,-1),new r(0,-1,0),new r(0,-1,0),new r(0,0,1),new r(0,-1,0)],Xe=[new r(0,0,1),new r(1,0,0),new r(-1,0,0),new r(0,0,-1),new r(1,0,0),new r(1,0,0)],Ze=new r,Ke=new r,Je=new t,Qe=Je.center;ie.prototype.update=function(e){if(xe(this,e),this._needsUpdate)if(pe(this,e.context),this._isPointLight&&Se(this,e),this._cascadesEnabled&&(be(this,e),this._numberOfCascades>1&&Ee(this,e)),this._isPointLight)this._shadowMapCullingVolume=Z.fromBoundingSphere(this._boundingSphere);else{var t=this._shadowMapCamera,i=t.positionWC,n=t.directionWC,r=t.upWC;this._shadowMapCullingVolume=t.frustum.computeCullingVolume(i,n,r),1===this._passes.length&&this._passes[0].camera.clone(t)}if(1===this._passes.length){var o=this._sceneCamera.inverseViewMatrix;S.multiply(this._shadowMapCamera.getViewProjection(),o,this._shadowMapMatrix)}this.debugShow&&Ce(this,e)},ie.prototype.updatePass=function(e,t){me(this,e,t)};var $e=new n;return ie.createDerivedCommands=function(e,t,i,n,r){p(r)||(r={});var o=t.shaderProgram,a=o.vertexShaderSource,s=o.fragmentShaderSource,l=t.pass===J.GLOBE,u=!1;if(l&&(u=t.owner.data.pickTerrain.mesh.encoding.hasVertexNormals),t.castShadows){var c=r.castCommands;p(c)||(c=r.castCommands=[]);var h=r.castShaderProgramId,d=e.length;c.length=d;for(var m=0;d>m;++m)c[m]=Pe(e[m],i,t,n,h,c[m]);r.castShaderProgramId=t.shaderProgram.id}if(t.receiveShadows){var f,g;p(r.receiveCommand)&&(f=r.receiveCommand.shaderProgram,g=r.receiveCommand.uniformMap),r.receiveCommand=R.shallowClone(t,r.receiveCommand),r.castShadows=!1,r.receiveShadows=!0;var v=r.receiveShaderCastShadows!==t.castShadows,_=r.receiveShaderProgramId!==t.shaderProgram.id;if(!p(f)||_||i||v){p(f)&&f.destroy();var y=te.createShadowReceiveVertexShader(a,l,u),C=te.createShadowReceiveFragmentShader(s,e[0],t.castShadows,l,u);f=V.fromCache({context:n,vertexShaderSource:y,fragmentShaderSource:C,attributeLocations:o._attributeLocations}),g=Ae(e[0],t.uniformMap,l)}r.receiveCommand.shaderProgram=f,r.receiveCommand.uniformMap=g,r.receiveShaderProgramId=t.shaderProgram.id,r.receiveShaderCastShadows=t.castShadows}return r},ie.prototype.isDestroyed=function(){return!1},ie.prototype.destroy=function(){ae(this),this._debugLightFrustum=this._debugLightFrustum&&this._debugLightFrustum.destroy(),this._debugCameraFrustum=this._debugCameraFrustum&&this._debugCameraFrustum.destroy(),this._debugShadowViewCommand=this._debugShadowViewCommand&&this._debugShadowViewCommand.shaderProgram&&this._debugShadowViewCommand.shaderProgram.destroy();for(var e=0;e<this._numberOfCascades;++e)this._debugCascadeFrustums[e]=this._debugCascadeFrustums[e]&&this._debugCascadeFrustums[e].destroy();return f(this)},ie}),define("Cesium/Shaders/PostProcessFilters/AdditiveBlend",[],function(){"use strict";return"uniform sampler2D u_texture0;\nuniform sampler2D u_texture1;\n\nuniform vec2 u_center;\nuniform float u_radius;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main()\n{\n vec4 color0 = texture2D(u_texture0, v_textureCoordinates);\n vec4 color1 = texture2D(u_texture1, v_textureCoordinates);\n \n float x = length(gl_FragCoord.xy - u_center) / u_radius;\n float t = smoothstep(0.5, 0.8, x);\n gl_FragColor = mix(color0 + color1, color0, t);\n}\n"}),define("Cesium/Shaders/PostProcessFilters/BrightPass",[],function(){"use strict";return'uniform sampler2D u_texture;\n\nuniform float u_avgLuminance;\nuniform float u_threshold;\nuniform float u_offset;\n\nvarying vec2 v_textureCoordinates;\n\nfloat key(float avg)\n{\n float guess = 1.5 - (1.5 / (avg * 0.1 + 1.0));\n return max(0.0, guess) + 0.1;\n}\n\n// See section 9. "The bright-pass filter" of Realtime HDR Rendering\n// http://www.cg.tuwien.ac.at/research/publications/2007/Luksch_2007_RHR/Luksch_2007_RHR-RealtimeHDR%20.pdf\n\nvoid main()\n{\n vec4 color = texture2D(u_texture, v_textureCoordinates);\n vec3 xyz = czm_RGBToXYZ(color.rgb);\n float luminance = xyz.r;\n \n float scaledLum = key(u_avgLuminance) * luminance / u_avgLuminance;\n float brightLum = max(scaledLum - u_threshold, 0.0);\n float brightness = brightLum / (u_offset + brightLum);\n \n xyz.r = brightness;\n gl_FragColor = vec4(czm_XYZToRGB(xyz), 1.0);\n}\n'}),define("Cesium/Shaders/PostProcessFilters/GaussianBlur1D",[],function(){"use strict";return"#define SAMPLES 8\n\nuniform float delta;\nuniform float sigma;\nuniform float direction; // 0.0 for x direction, 1.0 for y direction\n\nuniform sampler2D u_texture;\nuniform vec2 u_step;\n\nvarying vec2 v_textureCoordinates;\n\n// Incremental Computation of the Gaussian:\n// http://http.developer.nvidia.com/GPUGems3/gpugems3_ch40.html\n\nvoid main()\n{\n vec2 st = v_textureCoordinates;\n \n vec2 dir = vec2(1.0 - direction, direction);\n \n vec3 g;\n g.x = 1.0 / (sqrt(czm_twoPi) * sigma);\n g.y = exp((-0.5 * delta * delta) / (sigma * sigma));\n g.z = g.y * g.y;\n \n vec4 result = texture2D(u_texture, st) * g.x;\n for (int i = 1; i < SAMPLES; ++i)\n {\n g.xy *= g.yz;\n \n vec2 offset = float(i) * dir * u_step;\n result += texture2D(u_texture, st - offset) * g.x;\n result += texture2D(u_texture, st + offset) * g.x;\n }\n \n gl_FragColor = result;\n}\n"}),define("Cesium/Scene/SunPostProcess",["../Core/BoundingRectangle","../Core/Cartesian2","../Core/Cartesian4","../Core/Color","../Core/defaultValue","../Core/defined","../Core/destroyObject","../Core/Math","../Core/Matrix4","../Core/PixelFormat","../Core/Transforms","../Renderer/ClearCommand","../Renderer/Framebuffer","../Renderer/PassState","../Renderer/PixelDatatype","../Renderer/Renderbuffer","../Renderer/RenderbufferFormat","../Renderer/RenderState","../Renderer/Texture","../Shaders/PostProcessFilters/AdditiveBlend","../Shaders/PostProcessFilters/BrightPass","../Shaders/PostProcessFilters/GaussianBlur1D","../Shaders/PostProcessFilters/PassThrough"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g,v,_,y,C,w,E){"use strict";function b(){this._fbo=void 0,this._downSampleFBO1=void 0,this._downSampleFBO2=void 0,this._clearFBO1Command=void 0,this._clearFBO2Command=void 0,this._downSampleCommand=void 0,this._brightPassCommand=void 0,this._blurXCommand=void 0,this._blurYCommand=void 0,this._blendCommand=void 0,this._fullScreenCommand=void 0,this._downSamplePassState=new p,this._downSamplePassState.scissorTest={enable:!0,rectangle:new e},this._upSamplePassState=new p,this._upSamplePassState.scissorTest={enabled:!0,rectangle:new e},this._uCenter=new t,this._uRadius=void 0,this._blurStep=new t}b.prototype.clear=function(e,t){var i=this._clearFBO1Command;n.clone(r(t,n.BLACK),i.color),i.execute(e),i=this._clearFBO2Command,n.clone(r(t,n.BLACK),i.color),i.execute(e)},b.prototype.execute=function(e,t){this._downSampleCommand.execute(e,this._downSamplePassState),this._brightPassCommand.execute(e,this._downSamplePassState),this._blurXCommand.execute(e,this._downSamplePassState),this._blurYCommand.execute(e,this._downSamplePassState),this._fullScreenCommand.framebuffer=t,this._blendCommand.framebuffer=t,this._fullScreenCommand.execute(e),this._blendCommand.execute(e,this._upSamplePassState)};var S=new e,T=new e,x=new i,A=new t,P=new t,M=new l;return b.prototype.update=function(e){var i=e.context,r=e.viewport,a=i.drawingBufferWidth,p=i.drawingBufferHeight,b=this;if(!o(this._downSampleCommand)){this._clearFBO1Command=new h({color:new n}),this._clearFBO2Command=new h({color:new n});var D={};this._downSampleCommand=i.createViewportQuadCommand(E,{uniformMap:D,owner:this}),D={u_avgLuminance:function(){return.5},u_threshold:function(){return.25},u_offset:function(){return.1}},this._brightPassCommand=i.createViewportQuadCommand(C,{uniformMap:D,owner:this});var I=1,R=2;D={delta:function(){return I},sigma:function(){return R},direction:function(){return 0}},this._blurXCommand=i.createViewportQuadCommand(w,{uniformMap:D,owner:this}),D={delta:function(){return I},sigma:function(){return R},direction:function(){return 1}},this._blurYCommand=i.createViewportQuadCommand(w,{uniformMap:D,owner:this}),D={u_center:function(){return b._uCenter},u_radius:function(){return b._uRadius}},this._blendCommand=i.createViewportQuadCommand(y,{uniformMap:D,owner:this}),D={},this._fullScreenCommand=i.createViewportQuadCommand(E,{uniformMap:D,owner:this})}var O=Math.pow(2,Math.ceil(Math.log(a)/Math.log(2))-2),L=Math.pow(2,Math.ceil(Math.log(p)/Math.log(2))-2),N=Math.max(1,O,L),F=T;F.width=N,F.height=N;var k=this._fbo,B=o(k)&&k.getColorTexture(0)||void 0;if(!o(B)||B.width!==a||B.height!==p){k=k&&k.destroy(),this._downSampleFBO1=this._downSampleFBO1&&this._downSampleFBO1.destroy(),this._downSampleFBO2=this._downSampleFBO2&&this._downSampleFBO2.destroy(),this._blurStep.x=this._blurStep.y=1/N;var z=[new _({context:i,width:a,height:p})];k=i.depthTexture?this._fbo=new d({context:i,colorTextures:z,depthTexture:new _({context:i,width:a,height:p,pixelFormat:u.DEPTH_COMPONENT,pixelDatatype:m.UNSIGNED_SHORT})}):this._fbo=new d({context:i,colorTextures:z,depthRenderbuffer:new f({context:i,format:g.DEPTH_COMPONENT16})}),this._downSampleFBO1=new d({context:i,colorTextures:[new _({context:i,width:N,height:N})]}),this._downSampleFBO2=new d({context:i,colorTextures:[new _({context:i,width:N,height:N})]}),this._clearFBO1Command.framebuffer=this._downSampleFBO1,this._clearFBO2Command.framebuffer=this._downSampleFBO2,this._downSampleCommand.framebuffer=this._downSampleFBO1,this._brightPassCommand.framebuffer=this._downSampleFBO2,this._blurXCommand.framebuffer=this._downSampleFBO1,this._blurYCommand.framebuffer=this._downSampleFBO2;var V=v.fromCache({viewport:F});this._downSampleCommand.uniformMap.u_texture=function(){return k.getColorTexture(0)},this._downSampleCommand.renderState=V,this._brightPassCommand.uniformMap.u_texture=function(){return b._downSampleFBO1.getColorTexture(0)},this._brightPassCommand.renderState=V,this._blurXCommand.uniformMap.u_texture=function(){return b._downSampleFBO2.getColorTexture(0)},this._blurXCommand.uniformMap.u_step=function(){return b._blurStep},this._blurXCommand.renderState=V,this._blurYCommand.uniformMap.u_texture=function(){return b._downSampleFBO1.getColorTexture(0)},this._blurYCommand.uniformMap.u_step=function(){return b._blurStep},this._blurYCommand.renderState=V;var U=S;U.width=a,U.height=p;var G=v.fromCache({viewport:U});this._blendCommand.uniformMap.u_texture0=function(){return k.getColorTexture(0)},this._blendCommand.uniformMap.u_texture1=function(){return b._downSampleFBO2.getColorTexture(0)},this._blendCommand.renderState=G,this._fullScreenCommand.uniformMap.u_texture=function(){return k.getColorTexture(0)},this._fullScreenCommand.renderState=G}var W=i.uniformState,H=W.sunPositionWC,q=W.view,j=W.viewProjection,Y=W.projection,X=l.computeViewportTransformation(r,0,1,M),Z=l.multiplyByPoint(q,H,x),K=c.pointToGLWindowCoordinates(j,X,H,A);Z.x+=s.SOLAR_RADIUS;var J=c.pointToGLWindowCoordinates(Y,X,Z,Z),Q=30*t.magnitude(t.subtract(J,K,J))*2,$=P;$.x=Q,$.y=Q;var ee=this._upSamplePassState.scissorTest.rectangle;return ee.x=Math.max(K.x-.5*$.x,0),ee.y=Math.max(K.y-.5*$.y,0),ee.width=Math.min($.x,a),ee.height=Math.min($.y,p),this._uCenter=t.clone(K,this._uCenter),this._uRadius=.5*Math.max($.x,$.y),X=l.computeViewportTransformation(F,0,1,M),K=c.pointToGLWindowCoordinates(j,X,H,A),$.x*=O/a,$.y*=L/p,ee=this._downSamplePassState.scissorTest.rectangle,ee.x=Math.max(K.x-.5*$.x,0),ee.y=Math.max(K.y-.5*$.y,0),ee.width=Math.min($.x,a),ee.height=Math.min($.y,p),this._downSamplePassState.context=i,this._upSamplePassState.context=i,this._fbo},b.prototype.isDestroyed=function(){return!1},b.prototype.destroy=function(){return this._fbo=this._fbo&&this._fbo.destroy(),this._downSampleFBO1=this._downSampleFBO1&&this._downSampleFBO1.destroy(),this._downSampleFBO2=this._downSampleFBO2&&this._downSampleFBO2.destroy(),this._downSampleCommand=this._downSampleCommand&&this._downSampleCommand.shaderProgram&&this._downSampleCommand.shaderProgram.destroy(),this._brightPassCommand=this._brightPassCommand&&this._brightPassCommand.shaderProgram&&this._brightPassCommand.shaderProgram.destroy(),this._blurXCommand=this._blurXCommand&&this._blurXCommand.shaderProgram&&this._blurXCommand.shaderProgram.destroy(),this._blurYCommand=this._blurYCommand&&this._blurYCommand.shaderProgram&&this._blurYCommand.shaderProgram.destroy(),this._blendCommand=this._blendCommand&&this._blendCommand.shaderProgram&&this._blendCommand.shaderProgram.destroy(),this._fullScreenCommand=this._fullScreenCommand&&this._fullScreenCommand.shaderProgram&&this._fullScreenCommand.shaderProgram.destroy(),a(this)},b}),define("Cesium/Scene/Scene",["../Core/BoundingRectangle","../Core/BoundingSphere","../Core/BoxGeometry","../Core/Cartesian2","../Core/Cartesian3","../Core/Cartesian4","../Core/Cartographic","../Core/Color","../Core/ColorGeometryInstanceAttribute","../Core/createGuid","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/destroyObject","../Core/DeveloperError","../Core/EllipsoidGeometry","../Core/Event","../Core/GeographicProjection","../Core/GeometryInstance","../Core/GeometryPipeline","../Core/getTimestamp","../Core/Intersect","../Core/Interval","../Core/JulianDate","../Core/Math","../Core/Matrix4","../Core/mergeSort","../Core/Occluder","../Core/ShowGeometryInstanceAttribute","../Core/Transforms","../Renderer/ClearCommand","../Renderer/ComputeEngine","../Renderer/Context","../Renderer/ContextLimits","../Renderer/DrawCommand","../Renderer/PassState","../Renderer/ShaderProgram","../Renderer/ShaderSource","./Camera","./CreditDisplay","./CullingVolume","./DepthPlane","./DeviceOrientationCameraController","./Fog","./FrameState","./FrustumCommands","./FXAA","./GlobeDepth","./MapMode2D","./OIT","./OrthographicFrustum","./Pass","./PerformanceDisplay","./PerInstanceColorAppearance","./PerspectiveFrustum","./PerspectiveOffCenterFrustum","./PickDepth","./Primitive","./PrimitiveCollection","./SceneMode","./SceneTransforms","./SceneTransitioner","./ScreenSpaceCameraController","./ShadowMap","./SunPostProcess","./TweenCollection"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g,v,_,y,C,w,E,b,S,T,x,A,P,M,D,I,R,O,L,N,F,k,B,z,V,U,G,W,H,q,j,Y,X,Z,K,J,Q,$,ee,te,ie,ne,re,oe,ae,se,le,ue,ce,he){"use strict";function de(t){t=c(t,c.EMPTY_OBJECT);var i=t.canvas,n=t.contextOptions,r=t.creditContainer,o=new R(i,n);h(r)||(r=document.createElement("div"),r.style.position="absolute",r.style.bottom="0",r.style["text-shadow"]="0px 0px 2px #000000",r.style.color="#ffffff",r.style["font-size"]="10px",r.style["padding-right"]="5px",i.parentNode.appendChild(r)),this._id=u(),this._frameState=new H(o,new z(r)),this._frameState.scene3DOnly=c(t.scene3DOnly,!1);var a=new N(o);a.viewport=new e,a.viewport.x=0,a.viewport.y=0,a.viewport.width=o.drawingBufferWidth,a.viewport.height=o.drawingBufferHeight,this._passState=a,this._canvas=i,this._context=o,this._computeEngine=new I(o),this._globe=void 0,this._primitives=new re,this._groundPrimitives=new re,this._tweens=new he,this._shaderFrameCount=0,this._sunPostProcess=void 0,this._computeCommandList=[],this._frustumCommandsList=[],this._overlayCommandList=[],this._pickFramebuffer=void 0,this._useOIT=c(t.orderIndependentTranslucency,!0),this._executeOITFunction=void 0;var l;o.depthTexture&&(l=new Y);var d;this._useOIT&&h(l)&&(d=new Z(o)),this._globeDepth=l,this._depthPlane=new U,this._oit=d,this._fxaa=new j,this._clearColorCommand=new D({color:new s,stencil:0,owner:this}),this._depthClearCommand=new D({depth:1,owner:this}),this._pickDepths=[],this._debugGlobeDepths=[],this._transitioner=new se(this),this._renderError=new g,this._preRender=new g,this._postRender=new g,this._cameraStartFired=!1,this._cameraMovedTime=void 0,this.rethrowRenderErrors=!1,this.completeMorphOnUserInput=!0,this.morphStart=new g,this.morphComplete=new g,this.skyBox=void 0,this.skyAtmosphere=void 0,this.sun=void 0,this.sunBloom=!0,this._sunBloom=void 0,this.moon=void 0,this.backgroundColor=s.clone(s.BLACK),this._mode=oe.SCENE3D,this._mapProjection=h(t.mapProjection)?t.mapProjection:new v,this._transitioner=new se(this,this._mapProjection.ellipsoid),this.morphTime=1,this.farToNearRatio=1e3,this.nearToFarDistance2D=175e4,this.debugCommandFilter=void 0,this.debugShowCommands=!1,this.debugShowFrustums=!1,this._debugFrustumStatistics=void 0,this.debugShowFramesPerSecond=!1,this.debugShowGlobeDepth=!1,this.debugShowDepthFrustum=1,this.fxaa=!0,this.useDepthPicking=!0,this.cameraEventWaitTime=500,this.copyGlobeDepth=!1,this.fog=new W,this._sunCamera=new B(this),this.shadowMap=new ue({context:o,lightCamera:this._sunCamera,enabled:c(t.shadows,!1)}),this._terrainExaggeration=c(t.terrainExaggeration,1),this._performanceDisplay=void 0,this._debugVolume=void 0;var p=new B(this);this._camera=p,this._cameraClone=B.clone(p),this._screenSpaceCameraController=new le(this),this._mapMode2D=c(t.mapMode2D,X.INFINITE_SCROLL),this._environmentState={skyBoxCommand:void 0,skyAtmosphereCommand:void 0,sunDrawCommand:void 0,sunComputeCommand:void 0,moonCommand:void 0,isSunVisible:!1,isMoonVisible:!1,isReadyForAtmosphere:!1,isSkyAtmosphereVisible:!1,clearGlobeDepth:!1,useDepthPlane:!1,originalFramebuffer:void 0,useGlobeDepthFramebuffer:!1,useOIT:!1,useFXAA:!1},this._useWebVR=!1,this._cameraVR=void 0,this._aspectRatioVR=void 0;var m=p.frustum.near,f=p.frustum.far,_=Math.ceil(Math.log(f/m)/Math.log(this.farToNearRatio));ye(m,f,this.farToNearRatio,_,this._frustumCommandsList,!1,void 0),_e(this,0,b.now()),this.initializeFrame()}function pe(e,t){var i=Math.max(Math.abs(e.x),Math.abs(t.x)),n=Math.max(Math.abs(e.y),Math.abs(t.y)),r=Math.max(Math.abs(e.z),Math.abs(t.z));return Math.max(Math.max(i,n),r)}function me(e,t,i){var n=1/Math.max(1,pe(e.position,t.position));return r.multiplyByScalar(e.position,n,Je),r.multiplyByScalar(t.position,n,Qe),r.equalsEpsilon(Je,Qe,i)&&r.equalsEpsilon(e.direction,t.direction,i)&&r.equalsEpsilon(e.up,t.up,i)&&r.equalsEpsilon(e.right,t.right,i)&&T.equalsEpsilon(e.transform,t.transform,i)}function fe(e,t){var i=e.frameState,n=i.shadowMaps,r=e._context,o=i.shadowHints.shadowsEnabled,a=!1;if(o&&(t.receiveShadows||t.castShadows)){var s=i.shadowHints.lastDirtyTime;t.lastDirtyTime!==s&&(t.lastDirtyTime=s,t.dirty=!0,a=!0)}if(t.dirty){t.dirty=!1;var l=t.derivedCommands;o&&(t.receiveShadows||t.castShadows)&&(l.shadows=ue.createDerivedCommands(n,t,a,r,l.shadows));var u=e._oit;t.pass===J.TRANSLUCENT&&h(u)&&u.isSupported()&&(o&&t.receiveShadows?l.oit=u.createDerivedCommands(t.derivedCommands.shadows.receiveCommand,r,l.oit):l.oit=u.createDerivedCommands(t,r,l.oit))}}function ge(e){var t=e.globe;if(e._mode===oe.SCENE3D&&h(t)){var i=t.ellipsoid;return $e.radius=i.minimumRadius,Ke=A.fromBoundingSphere($e,e._camera.positionWC,Ke)}}function ve(e){e.render=!1,e.pick=!1}function _e(e,t,i){var n=e._camera,r=e._frameState;r.commandList.length=0,r.shadowMaps.length=0,r.mode=e._mode,r.morphTime=e.morphTime,r.mapProjection=e.mapProjection,r.frameNumber=t,r.time=b.clone(i,r.time),r.camera=n,r.cullingVolume=n.frustum.computeCullingVolume(n.positionWC,n.directionWC,n.upWC),r.occluder=ge(e),r.terrainExaggeration=e._terrainExaggeration,ve(r.passes)}function ye(e,t,i,n,r,o,a){r.length=n;for(var s=0;n>s;++s){var l,u;o?(l=Math.min(t-a,e+s*a),u=Math.min(t,l+a)):(l=Math.max(e,Math.pow(i,s)*e),u=Math.min(t,i*l));var c=r[s];h(c)?(c.near=l,c.far=u):c=r[s]=new q(l,u)}}function Ce(e,t,i){e.debugShowFrustums&&(t.debugOverlappingFrustums=0),e.frameState.passes.pick||fe(e,t);for(var n=e._frustumCommandsList,r=n.length,o=0;r>o;++o){var a=n[o],s=a.near,l=a.far;if(!(i.start>l)){if(i.stop<s)break;var u=t instanceof D?J.OPAQUE:t.pass,c=a.indices[u]++;if(a.commands[u][c]=t,e.debugShowFrustums&&(t.debugOverlappingFrustums|=1<<o),t.executeInClosestFrustum)break}}if(e.debugShowFrustums){var d=e._debugFrustumStatistics.commandsInFrustums;d[t.debugOverlappingFrustums]=h(d[t.debugOverlappingFrustums])?d[t.debugOverlappingFrustums]+1:1,++e._debugFrustumStatistics.totalCommands}}function we(e,t,i){return h(e)&&(!h(e.boundingVolume)||!e.cull||t.computeVisibility(e.boundingVolume)!==w.OUTSIDE&&(!h(i)||!e.boundingVolume.isOccluded(i)))}function Ee(e){var t=e._frameState,i=t.camera,n=i.directionWC,r=i.positionWC,o=e._computeCommandList,a=e._overlayCommandList,s=t.commandList;e.debugShowFrustums&&(e._debugFrustumStatistics={totalCommands:0,commandsInFrustums:{}});for(var l=e._frustumCommandsList,u=l.length,c=J.NUMBER_OF_PASSES,d=0;u>d;++d)for(var p=0;c>p;++p)l[d].indices[p]=0;o.length=0,a.length=0;for(var m=Number.MAX_VALUE,f=-Number.MAX_VALUE,g=!1,v=t.shadowHints.shadowsEnabled,_=Number.MAX_VALUE,y=-Number.MAX_VALUE,C=Number.MAX_VALUE,w=t.mode===oe.SCENE3D?t.occluder:void 0,E=t.cullingVolume,b=et.planes,S=0;5>S;++S)b[S]=E.planes[S];E=et;var T=e._environmentState;T.isSkyAtmosphereVisible=h(T.skyAtmosphereCommand)&&T.isReadyForAtmosphere,T.isSunVisible=we(T.sunDrawCommand,E,w),T.isMoonVisible=we(T.moonCommand,E,w);for(var x=s.length,A=0;x>A;++A){var P=s[A],M=P.pass;if(M===J.COMPUTE)o.push(P);else if(M===J.OVERLAY)a.push(P);else{var I=P.boundingVolume;if(h(I)){if(!we(P,E,w))continue;if(tt=I.computePlaneDistances(r,n,tt),m=Math.min(m,tt.start),f=Math.max(f,tt.stop),v&&P.receiveShadows&&tt.start<ue.MAXIMUM_DISTANCE&&!(M===J.GLOBE&&tt.start<-100&&tt.stop>100)){var R=tt.stop-tt.start;M!==J.GLOBE&&tt.start<100&&(C=Math.min(C,R)),_=Math.min(_,tt.start),y=Math.max(y,tt.stop)}}else tt.start=i.frustum.near,tt.stop=i.frustum.far,g=!(P instanceof D);Ce(e,P,tt)}}g?(m=i.frustum.near,f=i.frustum.far):(m=Math.min(Math.max(m,i.frustum.near),i.frustum.far),f=Math.max(Math.min(f,i.frustum.far),m),v&&(_=Math.min(Math.max(_,i.frustum.near),i.frustum.far),y=Math.max(Math.min(y,i.frustum.far),_))),v&&(t.shadowHints.nearPlane=_,t.shadowHints.farPlane=y,t.shadowHints.closestObjectSize=C);var O,L=e.mode===oe.SCENE2D,N=e.farToNearRatio;L?(f=Math.min(f,i.position.z+e.nearToFarDistance2D),m=Math.min(m,f),O=Math.ceil(Math.max(1,f-m)/e.nearToFarDistance2D)):O=Math.ceil(Math.log(f/m)/Math.log(N)),m!==Number.MAX_VALUE&&(O!==u||0!==l.length&&(m<l[0].near||f>l[u-1].far))&&(ye(m,f,N,O,l,L,e.nearToFarDistance2D),Ee(e))}function be(e){var t={},i=e.vertexAttributes;for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n].index);return t}function Se(e,t,i){var n=t.context,r=c(i,e.shaderProgram),o=r.fragmentShaderSource.clone();o.sources=o.sources.map(function(e){return e=k.replaceMain(e,"czm_Debug_main")});var a="void main() \n{ \n czm_Debug_main(); \n";if(t.debugShowCommands){h(e._debugColor)||(e._debugColor=s.fromRandom());var l=e._debugColor;a+=" gl_FragColor.rgb *= vec3("+l.red+", "+l.green+", "+l.blue+"); \n"}if(t.debugShowFrustums){var u=1&e.debugOverlappingFrustums?"1.0":"0.0",d=2&e.debugOverlappingFrustums?"1.0":"0.0",p=4&e.debugOverlappingFrustums?"1.0":"0.0";a+=" gl_FragColor.rgb *= vec3("+u+", "+d+", "+p+"); \n"}a+="}",o.sources.push(a);var m=be(r);return F.fromCache({context:n,vertexShaderSource:r.vertexShaderSource,fragmentShaderSource:o,attributeLocations:m})}function Te(e,t,i){var n=L.shallowClone(e);n.shaderProgram=Se(e,t),n.execute(t.context,i),n.shaderProgram.destroy()}function xe(e,t,n,o,a){if((!h(t.debugCommandFilter)||t.debugCommandFilter(e))&&(t.debugShowCommands||t.debugShowFrustums?Te(e,t,o):t.frameState.shadowHints.shadowsEnabled&&e.receiveShadows&&h(e.derivedCommands.shadows)?e.derivedCommands.shadows.receiveCommand.execute(n,o):e.execute(n,o),e.debugShowBoundingVolume&&h(e.boundingVolume))){var s=t._frameState,u=e.boundingVolume;h(t._debugVolume)&&t._debugVolume.destroy();var c,d=r.clone(u.center);if(s.mode!==oe.SCENE3D){d=T.multiplyByPoint(it,d,d);var p=s.mapProjection,m=p.unproject(d);d=p.ellipsoid.cartographicToCartesian(m)}if(h(u.radius)){var g=u.radius;c=y.toWireframe(f.createGeometry(new f({radii:new r(g,g,g),vertexFormat:$.FLAT_VERTEX_FORMAT}))),t._debugVolume=new ne({geometryInstances:new _({geometry:c,modelMatrix:T.multiplyByTranslation(T.IDENTITY,d,new T),attributes:{color:new l(1,0,0,1)}}),appearance:new $({flat:!0,translucent:!1}),asynchronous:!1})}else{var v=u.halfAxes;c=y.toWireframe(i.createGeometry(i.fromDimensions({dimensions:new r(2,2,2),vertexFormat:$.FLAT_VERTEX_FORMAT}))),t._debugVolume=new ne({geometryInstances:new _({geometry:c,modelMatrix:T.fromRotationTranslation(v,d,new T),attributes:{color:new l(1,0,0,1)}}),appearance:new $({flat:!0,translucent:!1}),asynchronous:!1})}var C=s.commandList,w=s.commandList=[];t._debugVolume.update(s);var E;h(a)&&(E=o.framebuffer,o.framebuffer=a),w[0].execute(n,o),h(E)&&(o.framebuffer=E),s.commandList=C}}function Ae(e,t,i){return t.boundingVolume.distanceSquaredTo(i)-e.boundingVolume.distanceSquaredTo(i)}function Pe(e,t,i,n){var r=e.context;x(n,Ae,e._camera.positionWC);for(var o=n.length,a=0;o>a;++a)t(n[a],e,r,i)}function Me(e,t){var i=e._debugGlobeDepths[t];return!h(i)&&e.context.depthTexture&&(i=new Y,e._debugGlobeDepths[t]=i),i}function De(e,t){var i=e._pickDepths[t];return h(i)||(i=new ie,e._pickDepths[t]=i),i}function Ie(e,t){var i=e._camera,n=e.context,r=n.uniformState;r.updateCamera(i);var o;o=h(i.frustum.fov)?i.frustum.clone(nt):h(i.frustum.infiniteProjectionMatrix)?i.frustum.clone(rt):i.frustum.clone(ot),o.near=i.frustum.near,o.far=i.frustum.far,r.updateFrustum(o),r.updatePass(J.ENVIRONMENT);var a=e._environmentState,s=a.skyBoxCommand;h(s)&&xe(s,e,n,t),a.isSkyAtmosphereVisible&&xe(a.skyAtmosphereCommand,e,n,t);var l=e._useWebVR&&e.mode!==oe.SCENE2D;if(a.isSunVisible&&(a.sunDrawCommand.execute(n,t),e.sunBloom&&!l)){var u;u=a.useGlobeDepthFramebuffer?e._globeDepth.framebuffer:a.useFXAA?e._fxaa.getColorFramebuffer():a.originalFramebuffer,e._sunPostProcess.execute(n,u),t.framebuffer=u}a.isMoonVisible&&a.moonCommand.execute(n,t);var c;a.useOIT?(h(e._executeOITFunction)||(e._executeOITFunction=function(e,t,i,n){e._oit.executeCommands(e,t,i,n)}),c=e._executeOITFunction):c=Pe;for(var d,p=a.clearGlobeDepth,m=a.useDepthPlane,f=e._depthClearCommand,g=e._depthPlane,v=i.position.z,_=e._frustumCommandsList,y=_.length,C=0;y>C;++C){var w=y-C-1,E=_[w];e.mode===oe.SCENE2D?(i.position.z=v-E.near+1,o.far=Math.max(1,E.far-E.near),o.near=1,r.update(e.frameState),r.updateFrustum(o)):(o.near=0!==w?E.near*Ze:E.near,o.far=E.far,r.updateFrustum(o));var b,S=e.debugShowGlobeDepth?Me(e,w):e._globeDepth;e.debugShowGlobeDepth&&h(S)&&a.useGlobeDepthFramebuffer&&(b=t.framebuffer,t.framebuffer=S.framebuffer),f.execute(n,t),r.updatePass(J.GLOBE);var T=E.commands[J.GLOBE],x=E.indices[J.GLOBE];for(d=0;x>d;++d)xe(T[d],e,n,t);for(h(S)&&a.useGlobeDepthFramebuffer&&(e.copyGlobeDepth||e.debugShowGlobeDepth)&&(S.update(n),S.executeCopyDepth(n,t)),e.debugShowGlobeDepth&&h(S)&&a.useGlobeDepthFramebuffer&&(t.framebuffer=b), +r.updatePass(J.GROUND),T=E.commands[J.GROUND],x=E.indices[J.GROUND],d=0;x>d;++d)xe(T[d],e,n,t);p&&(f.execute(n,t),m&&g.execute(n,t));for(var A=J.GROUND+1,P=J.TRANSLUCENT,M=A;P>M;++M)for(r.updatePass(M),T=E.commands[M],x=E.indices[M],d=0;x>d;++d)xe(T[d],e,n,t);if(0!==w&&e.mode!==oe.SCENE2D&&(o.near=E.near,r.updateFrustum(o)),r.updatePass(J.TRANSLUCENT),T=E.commands[J.TRANSLUCENT],T.length=E.indices[J.TRANSLUCENT],c(e,xe,t,T),h(S)&&a.useGlobeDepthFramebuffer&&e.useDepthPicking){var D=De(e,w);D.update(n,S.framebuffer.depthStencilTexture),D.executeCopyDepth(n,t)}}}function Re(e){var t=e.context.uniformState;t.updatePass(J.COMPUTE);var i=e._environmentState.sunComputeCommand;h(i)&&i.execute(e._computeEngine);for(var n=e._computeCommandList,r=n.length,o=0;r>o;++o)n[o].execute(e._computeEngine)}function Oe(e,t){var i=e.context.uniformState;i.updatePass(J.OVERLAY);for(var n=e.context,r=e._overlayCommandList,o=r.length,a=0;o>a;++a)r[a].execute(n,t)}function Le(e,t,i){for(var n=i.shadowMapCullingVolume,r=i.isPointLight,o=i.passes,a=o.length,s=t.length,l=0;s>l;++l){var u=t[l];if(fe(e,u),u.castShadows&&(u.pass===J.GLOBE||u.pass===J.OPAQUE||u.pass===J.TRANSLUCENT)&&we(u,n))if(r)for(var c=0;a>c;++c)o[c].commandList.push(u);else if(1>=a)o[0].commandList.push(u);else for(var h=!1,d=a-1;d>=0;--d){var p=o[d].cullingVolume;if(we(u,p))o[d].commandList.push(u),h=!0;else if(h)break}}}function Ne(e){var t=e.frameState,i=t.shadowMaps,n=i.length;if(t.shadowHints.shadowsEnabled)for(var r=e.context,o=r.uniformState,a=0;n>a;++a){var s=i[a];if(!s.outOfView){var l,u=s.passes,c=u.length;for(l=0;c>l;++l)u[l].commandList.length=0;var h=e.frameState.commandList;for(Le(e,h,s),l=0;c>l;++l){var d=s.passes[l];o.updateCamera(d.camera),s.updatePass(r,l);for(var p=d.commandList.length,m=0;p>m;++m){var f=d.commandList[m];o.updatePass(f.pass),xe(f.derivedCommands.shadows.castCommands[a],e,r,d.passState)}}}}}function Fe(e,t,i,n){var o=e._context,a=t.viewport,s=e._frameState,l=s.camera,u=s.mode;if(e._useWebVR&&u!==oe.SCENE2D){Ue(e),Ee(e),Ge(e,t,i,n),Re(e),Ne(e),a.x=0,a.y=0,a.width=.5*o.drawingBufferWidth,a.height=o.drawingBufferHeight;var c=B.clone(l,e._cameraVR),h=l.frustum.near,d=5*h,p=d/30,m=r.multiplyByScalar(c.right,.5*p,pt);l.frustum.aspectRatio=a.width/a.height;var f=.5*p*h/d;r.add(c.position,m,l.position),l.frustum.xOffset=f,Ie(e,t),a.x=t.viewport.width,r.subtract(c.position,m,l.position),l.frustum.xOffset=-f,Ie(e,t),B.clone(c,l)}else a.x=0,a.y=0,a.width=o.drawingBufferWidth,a.height=o.drawingBufferHeight,u!==oe.SCENE2D||e._mapMode2D===X.ROTATE?Be(!0,e,t,i,n):ke(e,t,i,n)}function ke(e,t,i,n){var o=e.context,a=e.frameState,s=e.camera,l=t.viewport,u=at,c=st,h=e.mapProjection;h.project(u,c);var d=r.clone(s.position,lt),p=T.clone(s.transform,ct),m=s.frustum.clone();s._setTransform(T.IDENTITY);var f=T.computeViewportTransformation(l,0,1,ut),g=s.frustum.projectionMatrix,v=s.positionWC.y,_=r.fromElements(S.sign(v)*c.x-v,0,-s.positionWC.x,ht),y=M.pointToGLWindowCoordinates(g,f,_,dt);y.x=Math.floor(y.x);var C=l.x,w=l.width;if(0===v||y.x<=0||y.x>=o.drawingBufferWidth)Be(!0,e,t,i,n);else if(Math.abs(.5*o.drawingBufferWidth-y.x)<1)l.width=y.x,s.position.x*=S.sign(s.position.x),s.frustum.right=0,a.cullingVolume=s.frustum.computeCullingVolume(s.positionWC,s.directionWC,s.upWC),o.uniformState.update(a),Be(!0,e,t,i,n),l.x=l.width,s.position.x=-s.position.x,s.frustum.right=-s.frustum.left,s.frustum.left=0,a.cullingVolume=s.frustum.computeCullingVolume(s.positionWC,s.directionWC,s.upWC),o.uniformState.update(a),Be(!1,e,t,i,n);else if(y.x>.5*o.drawingBufferWidth){l.width=y.x;var E=s.frustum.right;s.frustum.right=c.x-v,a.cullingVolume=s.frustum.computeCullingVolume(s.positionWC,s.directionWC,s.upWC),o.uniformState.update(a),Be(!0,e,t,i,n),l.x+=y.x,l.width=o.drawingBufferWidth-y.x,s.position.x=-s.position.x,s.frustum.left=-s.frustum.right,s.frustum.right=E-2*s.frustum.right,a.cullingVolume=s.frustum.computeCullingVolume(s.positionWC,s.directionWC,s.upWC),o.uniformState.update(a),Be(!1,e,t,i,n)}else{l.x=y.x,l.width=o.drawingBufferWidth-y.x;var b=s.frustum.left;s.frustum.left=-c.x-v,a.cullingVolume=s.frustum.computeCullingVolume(s.positionWC,s.directionWC,s.upWC),o.uniformState.update(a),Be(!0,e,t,i,n),l.x=0,l.width=y.x,s.position.x=-s.position.x,s.frustum.right=-s.frustum.left,s.frustum.left=b-2*s.frustum.left,a.cullingVolume=s.frustum.computeCullingVolume(s.positionWC,s.directionWC,s.upWC),o.uniformState.update(a),Be(!1,e,t,i,n)}s._setTransform(p),r.clone(d,s.position),s.frustum=m.clone(),l.x=C,l.width=w}function Be(e,t,i,n,r){e||(t.frameState.commandList.length=0),Ue(t),Ee(t),e&&(Ge(t,i,n,r),Re(t),Ne(t)),Ie(t,i)}function ze(e){var t=e._frameState,i=e._environmentState,n=t.passes.render;i.skyBoxCommand=n&&h(e.skyBox)?e.skyBox.update(t):void 0;var r=e.skyAtmosphere,o=e.globe;h(r)&&h(o)&&(r.setDynamicAtmosphereColor(o.enableLighting),i.isReadyForAtmosphere=i.isReadyForAtmosphere||o._surface._tilesToRender.length>0),i.skyAtmosphereCommand=n&&h(r)?r.update(t):void 0;var a=n&&h(e.sun)?e.sun.update(e):void 0;i.sunDrawCommand=h(a)?a.drawCommand:void 0,i.sunComputeCommand=h(a)?a.computeCommand:void 0,i.moonCommand=n&&h(e.moon)?e.moon.update(t):void 0;var s=i.clearGlobeDepth=h(o)&&(!o.depthTestAgainstTerrain||e.mode===oe.SCENE2D),l=i.useDepthPlane=s&&e.mode===oe.SCENE3D;l&&e._depthPlane.update(t)}function Ve(e){var t=e._frameState,i=t.shadowMaps,n=i.length;if(t.shadowHints.shadowsEnabled=n>0&&!t.passes.pick,t.shadowHints.shadowsEnabled)for(var r=0;n>r;++r){var o=i[r];o.update(t),o.dirty&&(++t.shadowHints.lastDirtyTime,o.dirty=!1)}}function Ue(e){var t=e._frameState;e._groundPrimitives.update(t),e._primitives.update(t),Ve(e),e._globe&&e._globe.update(t)}function Ge(e,t,i,n){var r=e._context,o=e._environmentState,a=e._useWebVR&&e.mode!==oe.SCENE2D;o.originalFramebuffer=t.framebuffer,h(e.sun)&&e.sunBloom!==e._sunBloom?(e.sunBloom&&!a?e._sunPostProcess=new ce:h(e._sunPostProcess)&&(e._sunPostProcess=e._sunPostProcess.destroy()),e._sunBloom=e.sunBloom):!h(e.sun)&&h(e._sunPostProcess)&&(e._sunPostProcess=e._sunPostProcess.destroy(),e._sunBloom=!1);var l=e._clearColorCommand;s.clone(i,l.color),l.execute(r,t);var u=o.useGlobeDepthFramebuffer=!n&&h(e._globeDepth);u&&(e._globeDepth.update(r),e._globeDepth.clear(r,t,i));for(var c=!1,d=e._frustumCommandsList,p=d.length,m=0;p>m;++m)if(d[m].indices[J.TRANSLUCENT]>0){c=!0;break}var f=o.useOIT=!n&&c&&h(e._oit)&&e._oit.isSupported();f&&(e._oit.update(r,e._globeDepth.framebuffer),e._oit.clear(r,t,i),o.useOIT=e._oit.isSupported());var g=o.useFXAA=!n&&e.fxaa;g&&(e._fxaa.update(r),e._fxaa.clear(r,t,i)),o.isSunVisible&&e.sunBloom&&!a?t.framebuffer=e._sunPostProcess.update(t):u?t.framebuffer=e._globeDepth.framebuffer:g&&(t.framebuffer=e._fxaa.getColorFramebuffer()),h(t.framebuffer)&&l.execute(r,t)}function We(e,t){var i=e._context,n=e._environmentState,r=n.useGlobeDepthFramebuffer;if(e.debugShowGlobeDepth&&r){var o=Me(e,e.debugShowDepthFrustum-1);o.executeDebugGlobeDepth(i,t)}if(e.debugShowPickDepth&&r){var a=De(e,e.debugShowDepthFrustum-1);a.executeDebugPickDepth(i,t)}var s=n.useOIT,l=n.useFXAA;s&&(t.framebuffer=l?e._fxaa.getColorFramebuffer():void 0,e._oit.execute(i,t)),l&&(!s&&r&&(t.framebuffer=e._fxaa.getColorFramebuffer(),e._globeDepth.executeCopyColor(i,t)),t.framebuffer=n.originalFramebuffer,e._fxaa.execute(i,t)),s||l||!r||(t.framebuffer=n.originalFramebuffer,e._globeDepth.executeCopyColor(i,t))}function He(e){for(var t=e.afterRender,i=0,n=t.length;n>i;++i)t[i]();t.length=0}function qe(e,t){h(t)||(t=b.now());var i=e._camera;me(i,e._cameraClone,S.EPSILON6)?e._cameraStartFired&&C()-e._cameraMovedTime>e.cameraEventWaitTime&&(i.moveEnd.raiseEvent(),e._cameraStartFired=!1):(e._cameraStartFired||(i.moveStart.raiseEvent(),e._cameraStartFired=!0),e._cameraMovedTime=C(),B.clone(i,e._cameraClone)),e._preRender.raiseEvent(e,t);var n=e.context,o=n.uniformState,a=e._frameState,l=S.incrementWrap(a.frameNumber,15e6,1);_e(e,l,t),a.passes.render=!0,a.creditDisplay.beginFrame(),e.fog.update(a),o.update(a);var u=e.shadowMap;h(u)&&u.enabled&&(r.negate(o.sunDirectionWC,e._sunCamera.direction),a.shadowMaps.push(u)),e._computeCommandList.length=0,e._overlayCommandList.length=0;var d=e._passState;if(d.framebuffer=void 0,d.blendingEnabled=void 0,d.scissorTest=void 0,h(e.globe)&&e.globe.beginFrame(a),ze(e),Fe(e,d,c(e.backgroundColor,s.BLACK)),We(e,d),Oe(e,d),h(e.globe)&&e.globe.endFrame(a),a.creditDisplay.endFrame(),e.debugShowFramesPerSecond){if(!h(e._performanceDisplay)){var p=document.createElement("div");p.className="cesium-performanceDisplay-defaultContainer";var m=e._canvas.parentNode;m.appendChild(p);var f=new Q({container:p});e._performanceDisplay=f,e._performanceContainer=p}e._performanceDisplay.update()}else h(e._performanceDisplay)&&(e._performanceDisplay=e._performanceDisplay&&e._performanceDisplay.destroy(),e._performanceContainer.parentNode.removeChild(e._performanceContainer));n.endFrame(),He(a),e._postRender.raiseEvent(e,t)}function je(e,t,i,n){var o=e._camera,a=o.frustum,s=e._passState.viewport,l=2*(t.x-s.x)/s.width-1;l*=.5*(a.right-a.left);var u=2*(s.height-t.y-s.y)/s.height-1;u*=.5*(a.top-a.bottom);var c=T.clone(o.transform,_t);o._setTransform(T.IDENTITY);var h=r.clone(o.position,ft);r.multiplyByScalar(o.right,l,gt),r.add(gt,h,h),r.multiplyByScalar(o.up,u,gt),r.add(gt,h,h),o._setTransform(c),r.fromElements(h.z,h.x,h.y,h);var d=a.getPixelDimensions(s.width,s.height,1,vt),p=mt;return p.right=.5*d.x,p.left=-p.right,p.top=.5*d.y,p.bottom=-p.top,p.near=a.near,p.far=a.far,p.computeCullingVolume(h,o.directionWC,o.upWC)}function Ye(e,t,i,n){var r=e._camera,o=r.frustum,a=o.near,s=Math.tan(.5*o.fovy),l=o.aspectRatio*s,u=e._passState.viewport,c=2*(t.x-u.x)/u.width-1,h=2*(u.height-t.y-u.y)/u.height-1,d=c*a*l,p=h*a*s,m=o.getPixelDimensions(u.width,u.height,1,vt),f=m.x*i*.5,g=m.y*n*.5,v=yt;return v.top=p+g,v.bottom=p-g,v.right=d+f,v.left=d-f,v.near=a,v.far=o.far,v.computeCullingVolume(r.positionWC,r.directionWC,r.upWC)}function Xe(e,t,i,n){return e._mode===oe.SCENE2D?je(e,t,i,n):Ye(e,t,i,n)}var Ze=.99;d(de.prototype,{canvas:{get:function(){return this._canvas}},drawingBufferHeight:{get:function(){return this._context.drawingBufferHeight}},drawingBufferWidth:{get:function(){return this._context.drawingBufferWidth}},maximumAliasedLineWidth:{get:function(){return O.maximumAliasedLineWidth}},maximumCubeMapSize:{get:function(){return O.maximumCubeMapSize}},pickPositionSupported:{get:function(){return this._context.depthTexture}},globe:{get:function(){return this._globe},set:function(e){this._globe=this._globe&&this._globe.destroy(),this._globe=e}},primitives:{get:function(){return this._primitives}},groundPrimitives:{get:function(){return this._groundPrimitives}},camera:{get:function(){return this._camera}},screenSpaceCameraController:{get:function(){return this._screenSpaceCameraController}},mapProjection:{get:function(){return this._mapProjection}},frameState:{get:function(){return this._frameState}},tweens:{get:function(){return this._tweens}},imageryLayers:{get:function(){return this.globe.imageryLayers}},terrainProvider:{get:function(){return this.globe.terrainProvider},set:function(e){this.globe.terrainProvider=e}},terrainProviderChanged:{get:function(){return this.globe.terrainProviderChanged}},renderError:{get:function(){return this._renderError}},preRender:{get:function(){return this._preRender}},postRender:{get:function(){return this._postRender}},context:{get:function(){return this._context}},debugFrustumStatistics:{get:function(){return this._debugFrustumStatistics}},scene3DOnly:{get:function(){return this._frameState.scene3DOnly}},orderIndependentTranslucency:{get:function(){return h(this._oit)}},id:{get:function(){return this._id}},mode:{get:function(){return this._mode},set:function(e){e===oe.SCENE2D?this.morphTo2D(0):e===oe.SCENE3D?this.morphTo3D(0):e===oe.COLUMBUS_VIEW&&this.morphToColumbusView(0),this._mode=e}},numberOfFrustums:{get:function(){return this._frustumCommandsList.length}},terrainExaggeration:{get:function(){return this._terrainExaggeration}},useWebVR:{get:function(){return this._useWebVR},set:function(e){this._useWebVR=e,this._useWebVR?(this._frameState.creditDisplay.container.style.visibility="hidden",this._cameraVR=new B(this),h(this._deviceOrientationCameraController)||(this._deviceOrientationCameraController=new G(this)),this._aspectRatioVR=this._camera.frustum.aspectRatio):(this._frameState.creditDisplay.container.style.visibility="visible",this._cameraVR=void 0,this._deviceOrientationCameraController=this._deviceOrientationCameraController&&!this._deviceOrientationCameraController.isDestroyed()&&this._deviceOrientationCameraController.destroy(),this._camera.frustum.aspectRatio=this._aspectRatioVR,this._camera.frustum.xOffset=0)}},mapMode2D:{get:function(){return this._mapMode2D}}});var Ke,Je=new r,Qe=new r,$e=new t,et=new V,tt=new E,it=new T(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1);it=T.inverseTransformation(it,it);var nt=new ee,rt=new te,ot=new K,at=new a(Math.PI,S.PI_OVER_TWO),st=new r,lt=new r,ut=new T,ct=new T,ht=new r,dt=new r;de.prototype.initializeFrame=function(){120===this._shaderFrameCount++&&(this._shaderFrameCount=0,this._context.shaderCache.destroyReleasedShaderPrograms()),this._tweens.update(),this._camera.update(this._mode),this._camera._updateCameraChanged(),this._screenSpaceCameraController.update(),h(this._deviceOrientationCameraController)&&this._deviceOrientationCameraController.update()};var pt=new r;de.prototype.render=function(e){try{qe(this,e)}catch(t){if(this._renderError.raiseEvent(this,t),this.rethrowRenderErrors)throw t}},de.prototype.clampLineWidth=function(e){return Math.max(O.minimumAliasedLineWidth,Math.min(e,O.maximumAliasedLineWidth))};var mt=new K,ft=new r,gt=new r,vt=new n,_t=new T,yt=new te,Ct=3,wt=3,Et=new e(0,0,Ct,wt),bt=new s(0,0,0,0),St=new n;de.prototype.pick=function(e){var t=this._context,i=t.uniformState,n=this._frameState,r=ae.transformWindowToDrawingBuffer(this,e,St);h(this._pickFramebuffer)||(this._pickFramebuffer=t.createPickFramebuffer()),_e(this,n.frameNumber,n.time),n.cullingVolume=Xe(this,r,Ct,wt),n.passes.pick=!0,i.update(n),Et.x=r.x-.5*(Ct-1),Et.y=this.drawingBufferHeight-r.y-.5*(wt-1);var o=this._pickFramebuffer.begin(Et);Fe(this,o,bt,!0),We(this,o);var a=this._pickFramebuffer.end(Et);return t.endFrame(),He(n),a};var Tt=new o,xt=new o(1,1/255,1/65025,1/160581375);return de.prototype.pickPosition=function(e,t){if(this.useDepthPicking){var i=this._context,n=i.uniformState,r=ae.transformWindowToDrawingBuffer(this,e,St);r.y=this.drawingBufferHeight-r.y;var a,s=this._camera;h(s.frustum.fov)?a=s.frustum.clone(nt):h(s.frustum.infiniteProjectionMatrix)&&(a=s.frustum.clone(rt));for(var l=this.numberOfFrustums,u=0;l>u;++u){var c=De(this,u),d=i.readPixels({x:r.x,y:r.y,width:1,height:1,framebuffer:c.framebuffer}),p=o.unpack(d,0,Tt);o.divideByScalar(p,255,p);var m=o.dot(p,xt);if(m>0&&1>m){var f=this._frustumCommandsList[u];return a.near=f.near*(0!==u?Ze:1),a.far=f.far,n.updateFrustum(a),ae.drawingBufferToWgs84Coordinates(this,r,m,t)}}}},de.prototype.drillPick=function(e,t){var i,n,r=[],o=[],a=[];h(t)||(t=Number.MAX_VALUE);for(var s=this.pick(e);h(s)&&h(s.primitive)&&(r.push(s),!(0>=--t));){var l=s.primitive,u=!1;"function"==typeof l.getGeometryInstanceAttributes&&h(s.id)&&(n=l.getGeometryInstanceAttributes(s.id),h(n)&&h(n.show)&&(u=!0,n.show=P.toValue(!1,n.show),a.push(n))),u||(l.show=!1,o.push(l)),s=this.pick(e)}for(i=0;i<o.length;++i)o[i].show=!0;for(i=0;i<a.length;++i)n=a[i],n.show=P.toValue(!0,n.show);return r},de.prototype.completeMorph=function(){this._transitioner.completeMorph()},de.prototype.morphTo2D=function(e){var t,i=this.globe;t=h(i)?i.ellipsoid:this.mapProjection.ellipsoid,e=c(e,2),this._transitioner.morphTo2D(e,t)},de.prototype.morphToColumbusView=function(e){var t,i=this.globe;t=h(i)?i.ellipsoid:this.mapProjection.ellipsoid,e=c(e,2),this._transitioner.morphToColumbusView(e,t)},de.prototype.morphTo3D=function(e){var t,i=this.globe;t=h(i)?i.ellipsoid:this.mapProjection.ellipsoid,e=c(e,2),this._transitioner.morphTo3D(e,t)},de.prototype.isDestroyed=function(){return!1},de.prototype.destroy=function(){return this._tweens.removeAll(),this._computeEngine=this._computeEngine&&this._computeEngine.destroy(),this._screenSpaceCameraController=this._screenSpaceCameraController&&this._screenSpaceCameraController.destroy(),this._deviceOrientationCameraController=this._deviceOrientationCameraController&&!this._deviceOrientationCameraController.isDestroyed()&&this._deviceOrientationCameraController.destroy(),this._pickFramebuffer=this._pickFramebuffer&&this._pickFramebuffer.destroy(),this._primitives=this._primitives&&this._primitives.destroy(),this._groundPrimitives=this._groundPrimitives&&this._groundPrimitives.destroy(),this._globe=this._globe&&this._globe.destroy(),this.skyBox=this.skyBox&&this.skyBox.destroy(),this.skyAtmosphere=this.skyAtmosphere&&this.skyAtmosphere.destroy(),this._debugSphere=this._debugSphere&&this._debugSphere.destroy(),this.sun=this.sun&&this.sun.destroy(),this._sunPostProcess=this._sunPostProcess&&this._sunPostProcess.destroy(),this._depthPlane=this._depthPlane&&this._depthPlane.destroy(),this._transitioner.destroy(),h(this._globeDepth)&&this._globeDepth.destroy(),h(this._oit)&&this._oit.destroy(),this._fxaa.destroy(),this._context=this._context&&this._context.destroy(),this._frameState.creditDisplay.destroy(),h(this._performanceDisplay)&&(this._performanceDisplay=this._performanceDisplay&&this._performanceDisplay.destroy(),this._performanceContainer.parentNode.removeChild(this._performanceContainer)),p(this)},de}),define("Cesium/Scene/SingleTileImageryProvider",["../Core/Credit","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Event","../Core/GeographicTilingScheme","../Core/loadImage","../Core/Rectangle","../Core/RuntimeError","../Core/TileProviderError","../ThirdParty/when"],function(e,t,i,n,r,o,a,s,l,u,c,h){"use strict";function d(n){function r(e){w._image=e,w._tileWidth=e.width,w._tileHeight=e.height,w._ready=!0,w._readyPromise.resolve(!0),c.handleSuccess(w._errorEvent)}function d(e){var t="Failed to load image "+_+".";C=c.handleError(C,w,w._errorEvent,t,0,0,0,p,e),w._readyPromise.reject(new u(t))}function p(){h(s(_),r,d)}n=t(n,{});var m=n.url;this._url=m;var f=n.proxy;this._proxy=f;var g=t(n.rectangle,l.MAX_VALUE),v=new a({rectangle:g,numberOfLevelZeroTilesX:1,numberOfLevelZeroTilesY:1,ellipsoid:n.ellipsoid});this._tilingScheme=v,this._image=void 0,this._texture=void 0,this._tileWidth=0,this._tileHeight=0,this._errorEvent=new o,this._ready=!1,this._readyPromise=h.defer();var _=m;i(f)&&(_=f.getURL(_));var y=n.credit;"string"==typeof y&&(y=new e(y)),this._credit=y;var C,w=this;p()}return n(d.prototype,{url:{get:function(){return this._url}},proxy:{get:function(){return this._proxy}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return 0}},minimumLevel:{get:function(){return 0}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!0}}}),d.prototype.getTileCredits=function(e,t,i){},d.prototype.requestImage=function(e,t,i){return this._image},d.prototype.pickFeatures=function(){},d}),define("Cesium/Shaders/SkyAtmosphereFS",[],function(){"use strict";return'/**\n * @license\n * Copyright (c) 2000-2005, Sean O\'Neil (s_p_oneil@hotmail.com)\n * All rights reserved.\n * \n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * \n * * Redistributions of source code must retain the above copyright notice,\n * this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation\n * and/or other materials provided with the distribution.\n * * Neither the name of the project nor the names of its contributors may be\n * used to endorse or promote products derived from this software without\n * specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * Modifications made by Analytical Graphics, Inc.\n */\n \n // Code: http://sponeil.net/\n // GPU Gems 2 Article: http://http.developer.nvidia.com/GPUGems2/gpugems2_chapter16.html\n // HSV/HSB <-> RGB conversion with minimal branching: http://lolengine.net/blog/2013/07/27/rgb-to-hsv-in-glsl\n\n#ifdef COLOR_CORRECT\nuniform vec3 u_hsbShift; // Hue, saturation, brightness\n#endif\n\nconst float g = -0.95;\nconst float g2 = g * g;\nconst vec4 K_RGB2HSB = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);\nconst vec4 K_HSB2RGB = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n\nvarying vec3 v_rayleighColor;\nvarying vec3 v_mieColor;\nvarying vec3 v_toCamera;\nvarying vec3 v_positionEC;\n\n#ifdef COLOR_CORRECT\nvec3 rgb2hsb(vec3 rgbColor)\n{\n vec4 p = mix(vec4(rgbColor.bg, K_RGB2HSB.wz), vec4(rgbColor.gb, K_RGB2HSB.xy), step(rgbColor.b, rgbColor.g));\n vec4 q = mix(vec4(p.xyw, rgbColor.r), vec4(rgbColor.r, p.yzx), step(p.x, rgbColor.r));\n\n float d = q.x - min(q.w, q.y);\n return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + czm_epsilon7)), d / (q.x + czm_epsilon7), q.x);\n}\n\nvec3 hsb2rgb(vec3 hsbColor)\n{\n vec3 p = abs(fract(hsbColor.xxx + K_HSB2RGB.xyz) * 6.0 - K_HSB2RGB.www);\n return hsbColor.z * mix(K_HSB2RGB.xxx, clamp(p - K_HSB2RGB.xxx, 0.0, 1.0), hsbColor.y);\n}\n#endif\n\nvoid main (void)\n{\n // Extra normalize added for Android\n float cosAngle = dot(czm_sunDirectionWC, normalize(v_toCamera)) / length(v_toCamera);\n float rayleighPhase = 0.75 * (1.0 + cosAngle * cosAngle);\n float miePhase = 1.5 * ((1.0 - g2) / (2.0 + g2)) * (1.0 + cosAngle * cosAngle) / pow(1.0 + g2 - 2.0 * g * cosAngle, 1.5);\n \n const float exposure = 2.0;\n \n vec3 rgb = rayleighPhase * v_rayleighColor + miePhase * v_mieColor;\n rgb = vec3(1.0) - exp(-exposure * rgb);\n // Compute luminance before color correction to avoid strangely gray night skies\n float l = czm_luminance(rgb);\n\n#ifdef COLOR_CORRECT\n // Convert rgb color to hsb\n vec3 hsb = rgb2hsb(rgb);\n // Perform hsb shift\n hsb.x += u_hsbShift.x; // hue\n hsb.y = clamp(hsb.y + u_hsbShift.y, 0.0, 1.0); // saturation\n hsb.z = hsb.z > czm_epsilon7 ? hsb.z + u_hsbShift.z : 0.0; // brightness\n // Convert shifted hsb back to rgb\n rgb = hsb2rgb(hsb);\n\n // Check if correction decreased the luminance to 0\n l = min(l, czm_luminance(rgb));\n#endif\n\n gl_FragColor = vec4(rgb, min(smoothstep(0.0, 0.1, l), 1.0) * smoothstep(0.0, 1.0, czm_morphTime));\n}\n'}),define("Cesium/Shaders/SkyAtmosphereVS",[],function(){"use strict";return"/**\n * @license\n * Copyright (c) 2000-2005, Sean O'Neil (s_p_oneil@hotmail.com)\n * All rights reserved.\n * \n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * \n * * Redistributions of source code must retain the above copyright notice,\n * this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation\n * and/or other materials provided with the distribution.\n * * Neither the name of the project nor the names of its contributors may be\n * used to endorse or promote products derived from this software without\n * specific prior written permission.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * Modifications made by Analytical Graphics, Inc.\n */\n \n // Code: http://sponeil.net/\n // GPU Gems 2 Article: http://http.developer.nvidia.com/GPUGems2/gpugems2_chapter16.html\n \nattribute vec4 position;\n\nuniform vec4 u_cameraAndRadiiAndDynamicAtmosphereColor; // Camera height, outer radius, inner radius, dynamic atmosphere color flag\n\nconst float Kr = 0.0025;\nconst float Kr4PI = Kr * 4.0 * czm_pi;\nconst float Km = 0.0015;\nconst float Km4PI = Km * 4.0 * czm_pi;\nconst float ESun = 15.0;\nconst float KmESun = Km * ESun;\nconst float KrESun = Kr * ESun;\nconst vec3 InvWavelength = vec3(\n 5.60204474633241, // Red = 1.0 / Math.pow(0.650, 4.0)\n 9.473284437923038, // Green = 1.0 / Math.pow(0.570, 4.0)\n 19.643802610477206); // Blue = 1.0 / Math.pow(0.475, 4.0)\nconst float rayleighScaleDepth = 0.25;\n \nconst int nSamples = 2;\nconst float fSamples = 2.0;\n\nvarying vec3 v_rayleighColor;\nvarying vec3 v_mieColor;\nvarying vec3 v_toCamera;\n\nfloat scale(float cosAngle)\n{\n float x = 1.0 - cosAngle;\n return rayleighScaleDepth * exp(-0.00287 + x*(0.459 + x*(3.83 + x*(-6.80 + x*5.25))));\n}\n\nvoid main(void)\n{\n // Unpack attributes\n float cameraHeight = u_cameraAndRadiiAndDynamicAtmosphereColor.x;\n float outerRadius = u_cameraAndRadiiAndDynamicAtmosphereColor.y;\n float innerRadius = u_cameraAndRadiiAndDynamicAtmosphereColor.z;\n\n // Get the ray from the camera to the vertex and its length (which is the far point of the ray passing through the atmosphere)\n vec3 positionV3 = position.xyz;\n vec3 ray = positionV3 - czm_viewerPositionWC;\n float far = length(ray);\n ray /= far;\n float atmosphereScale = 1.0 / (outerRadius - innerRadius);\n\n#ifdef SKY_FROM_SPACE\n // Calculate the closest intersection of the ray with the outer atmosphere (which is the near point of the ray passing through the atmosphere)\n float B = 2.0 * dot(czm_viewerPositionWC, ray);\n float C = cameraHeight * cameraHeight - outerRadius * outerRadius;\n float det = max(0.0, B*B - 4.0 * C);\n float near = 0.5 * (-B - sqrt(det));\n\n // Calculate the ray's starting position, then calculate its scattering offset\n vec3 start = czm_viewerPositionWC + ray * near;\n far -= near;\n float startAngle = dot(ray, start) / outerRadius;\n float startDepth = exp(-1.0 / rayleighScaleDepth );\n float startOffset = startDepth*scale(startAngle);\n#else // SKY_FROM_ATMOSPHERE\n // Calculate the ray's starting position, then calculate its scattering offset\n vec3 start = czm_viewerPositionWC;\n float height = length(start);\n float depth = exp((atmosphereScale / rayleighScaleDepth ) * (innerRadius - cameraHeight));\n float startAngle = dot(ray, start) / height;\n float startOffset = depth*scale(startAngle);\n#endif\n\n // Initialize the scattering loop variables\n float sampleLength = far / fSamples;\n float scaledLength = sampleLength * atmosphereScale;\n vec3 sampleRay = ray * sampleLength;\n vec3 samplePoint = start + sampleRay * 0.5;\n\n // Now loop through the sample rays\n vec3 frontColor = vec3(0.0, 0.0, 0.0);\n vec3 lightDir = (u_cameraAndRadiiAndDynamicAtmosphereColor.w > 0.0) ? czm_sunPositionWC - czm_viewerPositionWC : czm_viewerPositionWC;\n lightDir = normalize(lightDir);\n\n for(int i=0; i<nSamples; i++)\n {\n float height = length(samplePoint);\n float depth = exp((atmosphereScale / rayleighScaleDepth ) * (innerRadius - height));\n float fLightAngle = dot(lightDir, samplePoint) / height;\n float fCameraAngle = dot(ray, samplePoint) / height;\n float fScatter = (startOffset + depth*(scale(fLightAngle) - scale(fCameraAngle)));\n vec3 attenuate = exp(-fScatter * (InvWavelength * Kr4PI + Km4PI));\n frontColor += attenuate * (depth * scaledLength);\n samplePoint += sampleRay;\n }\n\n // Finally, scale the Mie and Rayleigh colors and set up the varying variables for the pixel shader\n v_mieColor = frontColor * KmESun;\n v_rayleighColor = frontColor * (InvWavelength * KrESun);\n v_toCamera = czm_viewerPositionWC - positionV3;\n gl_Position = czm_modelViewProjection * position;\n}\n"}),define("Cesium/Scene/SkyAtmosphere",["../Core/Cartesian3","../Core/Cartesian4","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/destroyObject","../Core/Ellipsoid","../Core/EllipsoidGeometry","../Core/GeometryPipeline","../Core/Math","../Core/VertexFormat","../Renderer/BufferUsage","../Renderer/DrawCommand","../Renderer/RenderState","../Renderer/ShaderProgram","../Renderer/ShaderSource","../Renderer/VertexArray","../Shaders/SkyAtmosphereFS","../Shaders/SkyAtmosphereVS","./BlendingState","./CullFace","./SceneMode"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g,v,_,y,C,w){"use strict";function E(n){n=i(n,a.WGS84),this.show=!0,this._ellipsoid=n,this._command=new d({owner:this}),this._spSkyFromSpace=void 0,this._spSkyFromAtmosphere=void 0,this._spSkyFromSpaceColorCorrect=void 0,this._spSkyFromAtmosphereColorCorrect=void 0,this.hueShift=0,this.saturationShift=0,this.brightnessShift=0,this._hueSaturationBrightness=new e;var r=new t;r.w=0,r.y=e.maximumComponent(e.multiplyByScalar(n.radii,1.025,new e)),r.z=n.maximumRadius,this._cameraAndRadiiAndDynamicAtmosphereColor=r;var o=this;this._command.uniformMap={u_cameraAndRadiiAndDynamicAtmosphereColor:function(){return o._cameraAndRadiiAndDynamicAtmosphereColor},u_hsbShift:function(){return o._hueSaturationBrightness.x=o.hueShift,o._hueSaturationBrightness.y=o.saturationShift,o._hueSaturationBrightness.z=o.brightnessShift,o._hueSaturationBrightness}}}function b(e){return!(u.equalsEpsilon(e.hueShift,0,u.EPSILON7)&&u.equalsEpsilon(e.saturationShift,0,u.EPSILON7)&&u.equalsEpsilon(e.brightnessShift,0,u.EPSILON7))}return r(E.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),E.prototype.setDynamicAtmosphereColor=function(e){this._cameraAndRadiiAndDynamicAtmosphereColor.w=e?1:0},E.prototype.update=function(t){if(this.show&&(t.mode===w.SCENE3D||t.mode===w.MORPHING)&&t.passes.render){var i=this._command;if(!n(i.vertexArray)){var r=t.context,o=s.createGeometry(new s({radii:e.multiplyByScalar(this._ellipsoid.radii,1.025,new e),slicePartitions:256,stackPartitions:256,vertexFormat:c.POSITION_ONLY}));i.vertexArray=g.fromGeometry({context:r,geometry:o,attributeLocations:l.createAttributeLocations(o),bufferUsage:h.STATIC_DRAW}),i.renderState=p.fromCache({cull:{ +enabled:!0,face:C.FRONT},blending:y.ALPHA_BLEND});var a=new f({defines:["SKY_FROM_SPACE"],sources:[_]});this._spSkyFromSpace=m.fromCache({context:r,vertexShaderSource:a,fragmentShaderSource:v}),a=new f({defines:["SKY_FROM_ATMOSPHERE"],sources:[_]}),this._spSkyFromAtmosphere=m.fromCache({context:r,vertexShaderSource:a,fragmentShaderSource:v})}var u=b(this);if(u&&(!n(this._spSkyFromSpaceColorCorrect)||!n(this._spSkyFromAtmosphereColorCorrect))){var d=t.context,E=new f({defines:["SKY_FROM_SPACE"],sources:[_]}),S=new f({defines:["COLOR_CORRECT"],sources:[v]});this._spSkyFromSpaceColorCorrect=m.fromCache({context:d,vertexShaderSource:E,fragmentShaderSource:S}),E=new f({defines:["SKY_FROM_ATMOSPHERE"],sources:[_]}),this._spSkyFromAtmosphereColorCorrect=m.fromCache({context:d,vertexShaderSource:E,fragmentShaderSource:S})}var T=t.camera.positionWC,x=e.magnitude(T);return this._cameraAndRadiiAndDynamicAtmosphereColor.x=x,x>this._cameraAndRadiiAndDynamicAtmosphereColor.y?i.shaderProgram=u?this._spSkyFromSpaceColorCorrect:this._spSkyFromSpace:i.shaderProgram=u?this._spSkyFromAtmosphereColorCorrect:this._spSkyFromAtmosphere,i}},E.prototype.isDestroyed=function(){return!1},E.prototype.destroy=function(){var e=this._command;return e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),this._spSkyFromSpace=this._spSkyFromSpace&&this._spSkyFromSpace.destroy(),this._spSkyFromAtmosphere=this._spSkyFromAtmosphere&&this._spSkyFromAtmosphere.destroy(),this._spSkyFromSpaceColorCorrect=this._spSkyFromSpaceColorCorrect&&this._spSkyFromSpaceColorCorrect.destroy(),this._spSkyFromAtmosphereColorCorrect=this._spSkyFromAtmosphereColorCorrect&&this._spSkyFromAtmosphereColorCorrect.destroy(),o(this)},E}),define("Cesium/Shaders/SkyBoxFS",[],function(){"use strict";return"uniform samplerCube u_cubeMap;\n\nvarying vec3 v_texCoord;\n\nvoid main()\n{\n vec3 rgb = textureCube(u_cubeMap, normalize(v_texCoord)).rgb;\n gl_FragColor = vec4(rgb, czm_morphTime);\n}\n"}),define("Cesium/Shaders/SkyBoxVS",[],function(){"use strict";return"attribute vec3 position;\n\nvarying vec3 v_texCoord;\n\nvoid main()\n{\n vec3 p = czm_viewRotation * (czm_temeToPseudoFixed * (czm_entireFrustum.y * position));\n gl_Position = czm_projection * vec4(p, 1.0);\n v_texCoord = position.xyz;\n}\n"}),define("Cesium/Scene/SkyBox",["../Core/BoxGeometry","../Core/Cartesian3","../Core/defaultValue","../Core/defined","../Core/destroyObject","../Core/DeveloperError","../Core/GeometryPipeline","../Core/Matrix4","../Core/VertexFormat","../Renderer/BufferUsage","../Renderer/CubeMap","../Renderer/DrawCommand","../Renderer/loadCubeMap","../Renderer/RenderState","../Renderer/ShaderProgram","../Renderer/VertexArray","../Shaders/SkyBoxFS","../Shaders/SkyBoxVS","./BlendingState","./SceneMode"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g,v,_,y){"use strict";function C(e){this.sources=e.sources,this._sources=void 0,this.show=i(e.show,!0),this._command=new h({modelMatrix:s.clone(s.IDENTITY),owner:this}),this._cubeMap=void 0}return C.prototype.update=function(i){if(this.show&&(i.mode===y.SCENE3D||i.mode===y.MORPHING)&&i.passes.render){var r=i.context;if(this._sources!==this.sources){this._sources=this.sources;var o=this.sources;"string"==typeof o.positiveX?d(r,this._sources).then(function(e){h._cubeMap=h._cubeMap&&h._cubeMap.destroy(),h._cubeMap=e}):(this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),this._cubeMap=new c({context:r,source:o}))}var s=this._command;if(!n(s.vertexArray)){var h=this;s.uniformMap={u_cubeMap:function(){return h._cubeMap}};var C=e.createGeometry(e.fromDimensions({dimensions:new t(2,2,2),vertexFormat:l.POSITION_ONLY})),w=a.createAttributeLocations(C);s.vertexArray=f.fromGeometry({context:r,geometry:C,attributeLocations:w,bufferUsage:u.STATIC_DRAW}),s.shaderProgram=m.fromCache({context:r,vertexShaderSource:v,fragmentShaderSource:g,attributeLocations:w}),s.renderState=p.fromCache({blending:_.ALPHA_BLEND})}if(n(this._cubeMap))return s}},C.prototype.isDestroyed=function(){return!1},C.prototype.destroy=function(){var e=this._command;return e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy(),this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),r(this)},C}),define("Cesium/Shaders/SunFS",[],function(){"use strict";return"uniform sampler2D u_texture;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main()\n{\n gl_FragColor = texture2D(u_texture, v_textureCoordinates);\n}\n"}),define("Cesium/Shaders/SunTextureFS",[],function(){"use strict";return"uniform float u_glowLengthTS;\nuniform float u_radiusTS;\n\nvarying vec2 v_textureCoordinates;\n\nvec2 rotate(vec2 p, vec2 direction)\n{\n return vec2(p.x * direction.x - p.y * direction.y, p.x * direction.y + p.y * direction.x);\n}\n\nvec4 addBurst(vec2 position, vec2 direction)\n{\n vec2 rotatedPosition = rotate(position, direction) * vec2(25.0, 0.75);\n float radius = length(rotatedPosition);\n float burst = 1.0 - smoothstep(0.0, 0.55, radius);\n\n return vec4(burst);\n}\n\nvoid main()\n{\n vec2 position = v_textureCoordinates - vec2(0.5);\n float radius = length(position);\n float surface = step(radius, u_radiusTS);\n vec4 color = vec4(1.0, 1.0, surface + 0.2, surface);\n\n float glow = 1.0 - smoothstep(0.0, 0.55, radius);\n color.ba += mix(vec2(0.0), vec2(1.0), glow) * 0.75;\n\n vec4 burst = vec4(0.0);\n\n // The following loop has been manually unrolled for speed, to\n // avoid sin() and cos().\n //\n //for (float i = 0.4; i < 3.2; i += 1.047) {\n // vec2 direction = vec2(sin(i), cos(i));\n // burst += 0.4 * addBurst(position, direction);\n //\n // direction = vec2(sin(i - 0.08), cos(i - 0.08));\n // burst += 0.3 * addBurst(position, direction);\n //}\n\n burst += 0.4 * addBurst(position, vec2(0.38942, 0.92106)); // angle == 0.4\n burst += 0.4 * addBurst(position, vec2(0.99235, 0.12348)); // angle == 0.4 + 1.047\n burst += 0.4 * addBurst(position, vec2(0.60327, -0.79754)); // angle == 0.4 + 1.047 * 2.0\n\n burst += 0.3 * addBurst(position, vec2(0.31457, 0.94924)); // angle == 0.4 - 0.08\n burst += 0.3 * addBurst(position, vec2(0.97931, 0.20239)); // angle == 0.4 + 1.047 - 0.08\n burst += 0.3 * addBurst(position, vec2(0.66507, -0.74678)); // angle == 0.4 + 1.047 * 2.0 - 0.08\n\n // End of manual loop unrolling.\n\n color += clamp(burst, vec4(0.0), vec4(1.0)) * 0.15;\n \n gl_FragColor = clamp(color, vec4(0.0), vec4(1.0));\n}\n"}),define("Cesium/Shaders/SunVS",[],function(){"use strict";return"attribute vec2 direction;\n\nuniform float u_size;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main() \n{\n vec4 position;\n if (czm_morphTime == 1.0)\n {\n position = vec4(czm_sunPositionWC, 1.0);\n }\n else\n {\n position = vec4(czm_sunPositionColumbusView.zxy, 1.0);\n }\n \n vec4 positionEC = czm_view * position;\n vec4 positionWC = czm_eyeToWindowCoordinates(positionEC);\n \n vec2 halfSize = vec2(u_size * 0.5);\n halfSize *= ((direction * 2.0) - 1.0);\n \n gl_Position = czm_viewportOrthographic * vec4(positionWC.xy + halfSize, -positionWC.z, 1.0);\n \n v_textureCoordinates = direction;\n}\n"}),define("Cesium/Scene/Sun",["../Core/BoundingRectangle","../Core/BoundingSphere","../Core/Cartesian2","../Core/Cartesian3","../Core/Cartesian4","../Core/Color","../Core/ComponentDatatype","../Core/defined","../Core/defineProperties","../Core/destroyObject","../Core/IndexDatatype","../Core/Math","../Core/Matrix4","../Core/PixelFormat","../Core/PrimitiveType","../Renderer/Buffer","../Renderer/BufferUsage","../Renderer/ClearCommand","../Renderer/ComputeCommand","../Renderer/DrawCommand","../Renderer/Framebuffer","../Renderer/RenderState","../Renderer/ShaderProgram","../Renderer/Texture","../Renderer/VertexArray","../Shaders/SunFS","../Shaders/SunTextureFS","../Shaders/SunVS","./BlendingState","./SceneMode","./SceneTransforms"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g,v,_,y,C,w,E,b,S,T,x,A,P,M,D){"use strict";function I(){this.show=!0,this._drawCommand=new y({primitiveType:m.TRIANGLES,boundingVolume:new t,owner:this}),this._commands={drawCommand:this._drawCommand,computeCommand:void 0},this._boundingVolume=new t,this._boundingVolume2D=new t,this._texture=void 0,this._drawingBufferWidth=void 0,this._drawingBufferHeight=void 0,this._radiusTS=void 0,this._size=void 0,this.glowFactor=1,this._glowFactorDirty=!1;var e=this;this._uniformMap={u_texture:function(){return e._texture},u_size:function(){return e._size}}}l(I.prototype,{glowFactor:{get:function(){return this._glowFactor},set:function(e){e=Math.max(e,0),this._glowFactor=e,this._glowFactorDirty=!0}}});var R=new i,O=new i,L=new r,N=new r;return I.prototype.update=function(e){var r=e._passState,o=e.frameState,l=e.context;if(this.show){var u=o.mode;if(u!==M.SCENE2D&&u!==M.MORPHING&&o.passes.render){var m=r.viewport.width,v=r.viewport.height;if(!s(this._texture)||m!==this._drawingBufferWidth||v!==this._drawingBufferHeight||this._glowFactorDirty){this._texture=this._texture&&this._texture.destroy(),this._drawingBufferWidth=m,this._drawingBufferHeight=v,this._glowFactorDirty=!1;var y=Math.max(m,v);y=Math.pow(2,Math.ceil(Math.log(y)/Math.log(2))-2),y=Math.max(1,y),this._texture=new b({context:l,width:y,height:y,pixelFormat:p.RGBA}),this._glowLengthTS=5*this._glowFactor,this._radiusTS=1/(1+2*this._glowLengthTS)*.5;var C=this,I={u_glowLengthTS:function(){return C._glowLengthTS},u_radiusTS:function(){return C._radiusTS}};this._commands.computeCommand=new _({fragmentShaderSource:x,outputTexture:this._texture,uniformMap:I,persists:!1,owner:this,postExecute:function(){C._commands.computeCommand=void 0}})}var F=this._drawCommand;if(!s(F.vertexArray)){var k={direction:0},B=new Uint8Array(8);B[0]=0,B[1]=0,B[2]=255,B[3]=0,B[4]=255,B[5]=255,B[6]=0,B[7]=255;var z=f.createVertexBuffer({context:l,typedArray:B,usage:g.STATIC_DRAW}),V=[{index:k.direction,vertexBuffer:z,componentsPerAttribute:2,normalize:!0,componentDatatype:a.UNSIGNED_BYTE}],U=f.createIndexBuffer({context:l,typedArray:new Uint16Array([0,1,2,0,2,3]),usage:g.STATIC_DRAW,indexDatatype:c.UNSIGNED_SHORT});F.vertexArray=new S({context:l,attributes:V,indexBuffer:U}),F.shaderProgram=E.fromCache({context:l,vertexShaderSource:A,fragmentShaderSource:T,attributeLocations:k}),F.renderState=w.fromCache({blending:P.ALPHA_BLEND}),F.uniformMap=this._uniformMap}var G=l.uniformState.sunPositionWC,W=l.uniformState.sunPositionColumbusView,H=this._boundingVolume,q=this._boundingVolume2D;n.clone(G,H.center),q.center.x=W.z,q.center.y=W.x,q.center.z=W.y,H.radius=h.SOLAR_RADIUS+h.SOLAR_RADIUS*this._glowLengthTS,q.radius=H.radius,u===M.SCENE3D?t.clone(H,F.boundingVolume):u===M.COLUMBUS_VIEW&&t.clone(q,F.boundingVolume);var j=D.computeActualWgs84Position(o,G,N),Y=n.magnitude(n.subtract(j,e.camera.position,N)),X=l.uniformState.projection,Z=L;Z.x=0,Z.y=0,Z.z=-Y,Z.w=1;var K=d.multiplyByVector(X,Z,N),J=D.clipToDrawingBufferCoordinates(r.viewport,K,R);Z.x=h.SOLAR_RADIUS;var Q=d.multiplyByVector(X,Z,N),$=D.clipToDrawingBufferCoordinates(r.viewport,Q,O);return this._size=Math.ceil(i.magnitude(i.subtract($,J,N))),this._size=2*this._size*(1+2*this._glowLengthTS),this._commands}}},I.prototype.isDestroyed=function(){return!1},I.prototype.destroy=function(){var e=this._drawCommand;return e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy(),this._texture=this._texture&&this._texture.destroy(),u(this)},I}),define("Cesium/Scene/TileCoordinatesImageryProvider",["../Core/Color","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/Event","../Core/GeographicTilingScheme","../ThirdParty/when"],function(e,t,i,n,r,o,a){"use strict";function s(n){n=t(n,t.EMPTY_OBJECT),this._tilingScheme=i(n.tilingScheme)?n.tilingScheme:new o({ellipsoid:n.ellipsoid}),this._color=t(n.color,e.YELLOW),this._errorEvent=new r,this._tileWidth=t(n.tileWidth,256),this._tileHeight=t(n.tileHeight,256),this._readyPromise=a.resolve(!0)}return n(s.prototype,{proxy:{get:function(){}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){}},minimumLevel:{get:function(){}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return!0}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){}},hasAlphaChannel:{get:function(){return!0}}}),s.prototype.getTileCredits=function(e,t,i){},s.prototype.requestImage=function(e,t,i){var n=document.createElement("canvas");n.width=256,n.height=256;var r=n.getContext("2d"),o=this._color.toCssColorString();r.strokeStyle=o,r.lineWidth=2,r.strokeRect(1,1,255,255);var a="L"+i+"X"+e+"Y"+t;return r.font="bold 25px Arial",r.textAlign="center",r.fillStyle="black",r.fillText(a,127,127),r.fillStyle=o,r.fillText(a,124,124),n},s.prototype.pickFeatures=function(){},s}),define("Cesium/Scene/TileDiscardPolicy",["../Core/DeveloperError"],function(e){"use strict";function t(t){e.throwInstantiationError()}return t.prototype.isReady=e.throwInstantiationError,t.prototype.shouldDiscardImage=e.throwInstantiationError,t}),define("Cesium/Scene/TileState",["../Core/freezeObject"],function(e){"use strict";var t={START:0,LOADING:1,READY:2,UPSAMPLED_ONLY:3};return e(t)}),define("Cesium/Shaders/ViewportQuadFS",[],function(){"use strict";return"\nvarying vec2 v_textureCoordinates;\n\nvoid main()\n{\n czm_materialInput materialInput;\n \n materialInput.s = v_textureCoordinates.s;\n materialInput.st = v_textureCoordinates;\n materialInput.str = vec3(v_textureCoordinates, 0.0);\n materialInput.normalEC = vec3(0.0, 0.0, -1.0);\n \n czm_material material = czm_getMaterial(materialInput);\n\n gl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n}"}),define("Cesium/Scene/ViewportQuad",["../Core/BoundingRectangle","../Core/Color","../Core/defined","../Core/destroyObject","../Core/DeveloperError","../Renderer/RenderState","../Renderer/ShaderSource","../Shaders/ViewportQuadFS","./BlendingState","./Material","./Pass"],function(e,t,i,n,r,o,a,s,l,u,c){"use strict";function h(n,r){this.show=!0,i(n)||(n=new e),this.rectangle=e.clone(n),i(r)||(r=u.fromType(u.ColorType,{color:new t(1,1,1,1)})),this.material=r,this._material=void 0,this._overlayCommand=void 0,this._rs=void 0}return h.prototype.update=function(t){if(this.show){var n=this._rs;i(n)&&e.equals(n.viewport,this.rectangle)||(this._rs=o.fromCache({blending:l.ALPHA_BLEND,viewport:this.rectangle}));var r=t.passes;if(r.render){var u=t.context;if(this._material!==this.material||!i(this._overlayCommand)){this._material=this.material,i(this._overlayCommand)&&this._overlayCommand.shaderProgram.destroy();var h=new a({sources:[this._material.shaderSource,s]});this._overlayCommand=u.createViewportQuadCommand(h,{renderState:this._rs,uniformMap:this._material._uniforms,owner:this}),this._overlayCommand.pass=c.OVERLAY}this._material.update(u),this._overlayCommand.uniformMap=this._material._uniforms,t.commandList.push(this._overlayCommand)}}},h.prototype.isDestroyed=function(){return!1},h.prototype.destroy=function(){return i(this._overlayCommand)&&(this._overlayCommand.shaderProgram=this._overlayCommand.shaderProgram&&this._overlayCommand.shaderProgram.destroy()),n(this)},h}),define("Cesium/Scene/WebMapServiceImageryProvider",["../Core/combine","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/freezeObject","../Core/GeographicTilingScheme","../Core/objectToQuery","../Core/queryToObject","../Core/WebMercatorTilingScheme","../ThirdParty/Uri","./GetFeatureInfoFormat","./UrlTemplateImageryProvider"],function(e,t,i,n,r,o,a,s,l,u,c,h,d){"use strict";function p(n){function r(e,t){i(f[e])||(f[e]=t),i(_)&&!i(_[e])&&(_[e]=t)}n=t(n,t.EMPTY_OBJECT),this._url=n.url,this._layers=n.layers;var o=t(n.getFeatureInfoFormats,p.DefaultGetFeatureInfoFormats),h=new c(n.url),f=l(t(h.query,"")),g=e(m(t(n.parameters,t.EMPTY_OBJECT)),p.DefaultParameters);f=e(g,f);var v,_;v=new c(n.url),_=l(t(v.query,""));var y=e(m(t(n.getFeatureInfoParameters,t.EMPTY_OBJECT)),p.GetFeatureInfoDefaultParameters);_=e(y,_),r("layers",n.layers),r("srs",n.tilingScheme instanceof u?"EPSG:3857":"EPSG:4326"),r("bbox","{westProjected},{southProjected},{eastProjected},{northProjected}"),r("width","{width}"),r("height","{height}"),h.query=s(f);var C,w=h.toString().replace(/%7B/g,"{").replace(/%7D/g,"}");i(_)&&(i(_.query_layers)||(_.query_layers=n.layers),i(_.x)||(_.x="{i}"),i(_.y)||(_.y="{j}"),i(_.info_format)||(_.info_format="{format}"),v.query=s(_),C=v.toString().replace(/%7B/g,"{").replace(/%7D/g,"}")),this._tileProvider=new d({url:w,pickFeaturesUrl:C,tilingScheme:t(n.tilingScheme,new a({ellipsoid:n.ellipsoid})),rectangle:n.rectangle,tileWidth:n.tileWidth,tileHeight:n.tileHeight,minimumLevel:n.minimumLevel,maximumLevel:n.maximumLevel,proxy:n.proxy,subdomains:n.subdomains,tileDiscardPolicy:n.tileDiscardPolicy,credit:n.credit,getFeatureInfoFormats:o,enablePickFeatures:n.enablePickFeatures})}function m(e){var t={};for(var i in e)e.hasOwnProperty(i)&&(t[i.toLowerCase()]=e[i]);return t}return n(p.prototype,{url:{get:function(){return this._url}},proxy:{get:function(){return this._tileProvider.proxy}},layers:{get:function(){return this._layers}},tileWidth:{get:function(){return this._tileProvider.tileWidth}},tileHeight:{get:function(){return this._tileProvider.tileHeight}},maximumLevel:{get:function(){return this._tileProvider.maximumLevel}},minimumLevel:{get:function(){return this._tileProvider.minimumLevel}},tilingScheme:{get:function(){return this._tileProvider.tilingScheme}},rectangle:{get:function(){return this._tileProvider.rectangle}},tileDiscardPolicy:{get:function(){return this._tileProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._tileProvider.errorEvent}},ready:{get:function(){return this._tileProvider.ready}},readyPromise:{get:function(){return this._tileProvider.readyPromise}},credit:{get:function(){return this._tileProvider.credit}},hasAlphaChannel:{get:function(){return this._tileProvider.hasAlphaChannel}},enablePickFeatures:{get:function(){return this._tileProvider.enablePickFeatures},set:function(e){this._tileProvider.enablePickFeatures=e}}}),p.prototype.getTileCredits=function(e,t,i){return this._tileProvider.getTileCredits(e,t,i)},p.prototype.requestImage=function(e,t,i){return this._tileProvider.requestImage(e,t,i)},p.prototype.pickFeatures=function(e,t,i,n,r){return this._tileProvider.pickFeatures(e,t,i,n,r)},p.DefaultParameters=o({service:"WMS",version:"1.1.1",request:"GetMap",styles:"",format:"image/jpeg"}),p.GetFeatureInfoDefaultParameters=o({service:"WMS",version:"1.1.1",request:"GetFeatureInfo"}),p.DefaultGetFeatureInfoFormats=o([o(new h("json","application/json")),o(new h("xml","text/xml")),o(new h("text","text/html"))]),p}),define("Cesium/Scene/WebMapTileServiceImageryProvider",["../Core/combine","../Core/Credit","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Event","../Core/freezeObject","../Core/objectToQuery","../Core/queryToObject","../Core/Rectangle","../Core/WebMercatorTilingScheme","../ThirdParty/Uri","../ThirdParty/when","./ImageryProvider"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m){"use strict";function f(e){if(e=i(e,i.EMPTY_OBJECT),!n(e.url))throw new o("options.url is required.");if(!n(e.layer))throw new o("options.layer is required.");if(!n(e.style))throw new o("options.style is required.");if(!n(e.tileMatrixSetID))throw new o("options.tileMatrixSetID is required.");this._url=e.url,this._layer=e.layer,this._style=e.style,this._tileMatrixSetID=e.tileMatrixSetID,this._tileMatrixLabels=e.tileMatrixLabels,this._format=i(e.format,"image/jpeg"),this._proxy=e.proxy,this._tileDiscardPolicy=e.tileDiscardPolicy,this._tilingScheme=n(e.tilingScheme)?e.tilingScheme:new h({ellipsoid:e.ellipsoid}),this._tileWidth=i(e.tileWidth,256),this._tileHeight=i(e.tileHeight,256),this._minimumLevel=i(e.minimumLevel,0),this._maximumLevel=e.maximumLevel,this._rectangle=i(e.rectangle,this._tilingScheme.rectangle),this._readyPromise=p.resolve(!0);var r=this._tilingScheme.positionToTileXY(c.southwest(this._rectangle),this._minimumLevel),s=this._tilingScheme.positionToTileXY(c.northeast(this._rectangle),this._minimumLevel),l=(Math.abs(s.x-r.x)+1)*(Math.abs(s.y-r.y)+1);if(l>4)throw new o("The imagery provider's rectangle and minimumLevel indicate that there are "+l+" tiles at the minimum level. Imagery providers with more than four tiles at the minimum level are not supported.");this._errorEvent=new a;var u=e.credit;this._credit="string"==typeof u?new t(u):u,this._subdomains=e.subdomains,Array.isArray(this._subdomains)?this._subdomains=this._subdomains.slice():n(this._subdomains)&&this._subdomains.length>0?this._subdomains=this._subdomains.split(""):this._subdomains=["a","b","c"]}function g(t,r,o,a){var s,c=t._tileMatrixLabels,h=n(c)?c[a]:a.toString(),p=t._subdomains;if(t._url.indexOf("{")>=0)s=t._url.replace("{style}",t._style).replace("{Style}",t._style).replace("{TileMatrixSet}",t._tileMatrixSetID).replace("{TileMatrix}",h).replace("{TileRow}",o.toString()).replace("{TileCol}",r.toString()).replace("{s}",p[(r+o+a)%p.length]);else{var m=new d(t._url),f=u(i(m.query,""));f=e(v,f),f.tilematrix=h,f.layer=t._layer,f.style=t._style,f.tilerow=o,f.tilecol=r,f.tilematrixset=t._tileMatrixSetID,f.format=t._format,m.query=l(f),s=m.toString()}var g=t._proxy;return n(g)&&(s=g.getURL(s)),s}var v=s({service:"WMTS",version:"1.0.0",request:"GetTile"});return r(f.prototype,{url:{get:function(){return this._url}},proxy:{get:function(){return this._proxy}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return this._minimumLevel}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},format:{get:function(){return this._format}},ready:{value:!0},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!0}}}),f.prototype.getTileCredits=function(e,t,i){},f.prototype.requestImage=function(e,t,i){var n=g(this,e,t,i);return m.loadImage(this,n)},f.prototype.pickFeatures=function(){},f}),function(){!function(e){var t=this||(0,eval)("this"),i=t.document,n=t.navigator,r=t.jQuery,o=t.JSON;!function(e){"function"==typeof define&&define.amd?define("Cesium/ThirdParty/knockout-3.4.0",["exports","require"],e):e("object"==typeof exports&&"object"==typeof module?module.exports||exports:t.ko={})}(function(a,s){function l(e,t){return null===e||typeof e in g?e===t:!1}function u(t,i){var n;return function(){n||(n=f.a.setTimeout(function(){n=e,t()},i))}}function c(e,t){var i;return function(){clearTimeout(i),i=f.a.setTimeout(e,t)}}function h(e,t){t&&t!==v?"beforeChange"===t?this.Kb(e):this.Ha(e,t):this.Lb(e)}function d(e,t){null!==t&&t.k&&t.k()}function p(e,t){var i=this.Hc,n=i[E];n.R||(this.lb&&this.Ma[t]?(i.Pb(t,e,this.Ma[t]),this.Ma[t]=null,--this.lb):n.r[t]||i.Pb(t,e,n.s?{ia:e}:i.uc(e)))}function m(e,t,i,n){f.d[e]={init:function(e,r,o,a,s){var l,u;return f.m(function(){var o=f.a.c(r()),a=!i!=!o,c=!u;(c||t||a!==l)&&(c&&f.va.Aa()&&(u=f.a.ua(f.f.childNodes(e),!0)),a?(c||f.f.da(e,f.a.ua(u)),f.eb(n?n(s,o):s,e)):f.f.xa(e),l=a)},null,{i:e}),{controlsDescendantBindings:!0}}},f.h.ta[e]=!1,f.f.Z[e]=!0}var f="undefined"!=typeof a?a:{};f.b=function(e,t){for(var i=e.split("."),n=f,r=0;r<i.length-1;r++)n=n[i[r]];n[i[i.length-1]]=t},f.G=function(e,t,i){e[t]=i},f.version="3.4.0",f.b("version",f.version),f.options={deferUpdates:!1,useOnlyNativeEvents:!1},f.a=function(){function a(e,t){for(var i in e)e.hasOwnProperty(i)&&t(i,e[i])}function s(e,t){if(t)for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);return e}function l(e,t){return e.__proto__=t,e}function u(e,t,i,n){var r=e[t].match(v)||[];f.a.q(i.match(v),function(e){f.a.pa(r,e,n)}),e[t]=r.join(" ")}var c={__proto__:[]}instanceof Array,h="function"==typeof Symbol,d={},p={};d[n&&/Firefox\/2/i.test(n.userAgent)?"KeyboardEvent":"UIEvents"]=["keyup","keydown","keypress"],d.MouseEvents="click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave".split(" "),a(d,function(e,t){if(t.length)for(var i=0,n=t.length;n>i;i++)p[t[i]]=e});var m={propertychange:!0},g=i&&function(){for(var t=3,n=i.createElement("div"),r=n.getElementsByTagName("i");n.innerHTML="<!--[if gt IE "+ ++t+"]><i></i><![endif]-->",r[0];);return t>4?t:e}(),v=/\S+/g;return{cc:["authenticity_token",/^__RequestVerificationToken(_.*)?$/],q:function(e,t){for(var i=0,n=e.length;n>i;i++)t(e[i],i)},o:function(e,t){if("function"==typeof Array.prototype.indexOf)return Array.prototype.indexOf.call(e,t);for(var i=0,n=e.length;n>i;i++)if(e[i]===t)return i;return-1},Sb:function(e,t,i){for(var n=0,r=e.length;r>n;n++)if(t.call(i,e[n],n))return e[n];return null},La:function(e,t){var i=f.a.o(e,t);i>0?e.splice(i,1):0===i&&e.shift()},Tb:function(e){e=e||[];for(var t=[],i=0,n=e.length;n>i;i++)0>f.a.o(t,e[i])&&t.push(e[i]);return t},fb:function(e,t){e=e||[];for(var i=[],n=0,r=e.length;r>n;n++)i.push(t(e[n],n));return i},Ka:function(e,t){e=e||[];for(var i=[],n=0,r=e.length;r>n;n++)t(e[n],n)&&i.push(e[n]);return i},ra:function(e,t){if(t instanceof Array)e.push.apply(e,t);else for(var i=0,n=t.length;n>i;i++)e.push(t[i]);return e},pa:function(e,t,i){var n=f.a.o(f.a.zb(e),t);0>n?i&&e.push(t):i||e.splice(n,1)},ka:c,extend:s,Xa:l,Ya:c?l:s,D:a,Ca:function(e,t){if(!e)return e;var i,n={};for(i in e)e.hasOwnProperty(i)&&(n[i]=t(e[i],i,e));return n},ob:function(e){for(;e.firstChild;)f.removeNode(e.firstChild)},jc:function(e){e=f.a.V(e);for(var t=(e[0]&&e[0].ownerDocument||i).createElement("div"),n=0,r=e.length;r>n;n++)t.appendChild(f.$(e[n]));return t},ua:function(e,t){for(var i=0,n=e.length,r=[];n>i;i++){var o=e[i].cloneNode(!0);r.push(t?f.$(o):o)}return r},da:function(e,t){if(f.a.ob(e),t)for(var i=0,n=t.length;n>i;i++)e.appendChild(t[i])},qc:function(e,t){var i=e.nodeType?[e]:e;if(0<i.length){for(var n=i[0],r=n.parentNode,o=0,a=t.length;a>o;o++)r.insertBefore(t[o],n);for(o=0,a=i.length;a>o;o++)f.removeNode(i[o])}},za:function(e,t){if(e.length){for(t=8===t.nodeType&&t.parentNode||t;e.length&&e[0].parentNode!==t;)e.splice(0,1);for(;1<e.length&&e[e.length-1].parentNode!==t;)e.length--;if(1<e.length){var i=e[0],n=e[e.length-1];for(e.length=0;i!==n;)e.push(i),i=i.nextSibling;e.push(n)}}return e},sc:function(e,t){7>g?e.setAttribute("selected",t):e.selected=t},$a:function(t){return null===t||t===e?"":t.trim?t.trim():t.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},nd:function(e,t){return e=e||"",t.length>e.length?!1:e.substring(0,t.length)===t},Mc:function(e,t){if(e===t)return!0;if(11===e.nodeType)return!1;if(t.contains)return t.contains(3===e.nodeType?e.parentNode:e);if(t.compareDocumentPosition)return 16==(16&t.compareDocumentPosition(e));for(;e&&e!=t;)e=e.parentNode;return!!e},nb:function(e){return f.a.Mc(e,e.ownerDocument.documentElement)},Qb:function(e){return!!f.a.Sb(e,f.a.nb)},A:function(e){return e&&e.tagName&&e.tagName.toLowerCase()},Wb:function(e){return f.onError?function(){try{return e.apply(this,arguments)}catch(t){throw f.onError&&f.onError(t),t}}:e},setTimeout:function(e,t){return setTimeout(f.a.Wb(e),t)},$b:function(e){setTimeout(function(){throw f.onError&&f.onError(e),e},0)},p:function(e,t,i){var n=f.a.Wb(i);if(i=g&&m[t],f.options.useOnlyNativeEvents||i||!r)if(i||"function"!=typeof e.addEventListener){if("undefined"==typeof e.attachEvent)throw Error("Browser doesn't support addEventListener or attachEvent");var o=function(t){n.call(e,t)},a="on"+t;e.attachEvent(a,o),f.a.F.oa(e,function(){e.detachEvent(a,o)})}else e.addEventListener(t,n,!1);else r(e).bind(t,n)},Da:function(e,n){if(!e||!e.nodeType)throw Error("element must be a DOM node when calling triggerEvent");var o;if("input"===f.a.A(e)&&e.type&&"click"==n.toLowerCase()?(o=e.type,o="checkbox"==o||"radio"==o):o=!1,f.options.useOnlyNativeEvents||!r||o)if("function"==typeof i.createEvent){if("function"!=typeof e.dispatchEvent)throw Error("The supplied element doesn't support dispatchEvent");o=i.createEvent(p[n]||"HTMLEvents"),o.initEvent(n,!0,!0,t,0,0,0,0,0,!1,!1,!1,!1,0,e),e.dispatchEvent(o)}else if(o&&e.click)e.click();else{if("undefined"==typeof e.fireEvent)throw Error("Browser doesn't support triggering events");e.fireEvent("on"+n)}else r(e).trigger(n)},c:function(e){return f.H(e)?e():e},zb:function(e){return f.H(e)?e.t():e},bb:function(e,t,i){var n;t&&("object"==typeof e.classList?(n=e.classList[i?"add":"remove"],f.a.q(t.match(v),function(t){n.call(e.classList,t)})):"string"==typeof e.className.baseVal?u(e.className,"baseVal",t,i):u(e,"className",t,i))},Za:function(t,i){var n=f.a.c(i);(null===n||n===e)&&(n="");var r=f.f.firstChild(t);!r||3!=r.nodeType||f.f.nextSibling(r)?f.f.da(t,[t.ownerDocument.createTextNode(n)]):r.data=n,f.a.Rc(t)},rc:function(e,t){if(e.name=t,7>=g)try{e.mergeAttributes(i.createElement("<input name='"+e.name+"'/>"),!1)}catch(n){}},Rc:function(e){g>=9&&(e=1==e.nodeType?e:e.parentNode,e.style&&(e.style.zoom=e.style.zoom))},Nc:function(e){if(g){var t=e.style.width;e.style.width=0,e.style.width=t}},hd:function(e,t){e=f.a.c(e),t=f.a.c(t);for(var i=[],n=e;t>=n;n++)i.push(n);return i},V:function(e){for(var t=[],i=0,n=e.length;n>i;i++)t.push(e[i]);return t},Yb:function(e){return h?Symbol(e):e},rd:6===g,sd:7===g,C:g,ec:function(e,t){for(var i=f.a.V(e.getElementsByTagName("input")).concat(f.a.V(e.getElementsByTagName("textarea"))),n="string"==typeof t?function(e){return e.name===t}:function(e){return t.test(e.name)},r=[],o=i.length-1;o>=0;o--)n(i[o])&&r.push(i[o]);return r},ed:function(e){return"string"==typeof e&&(e=f.a.$a(e))?o&&o.parse?o.parse(e):new Function("return "+e)():null},Eb:function(e,t,i){if(!o||!o.stringify)throw Error("Cannot find JSON.stringify(). Some browsers (e.g., IE < 8) don't support it natively, but you can overcome this by adding a script reference to json2.js, downloadable from http://www.json.org/json2.js");return o.stringify(f.a.c(e),t,i)},fd:function(e,t,n){n=n||{};var r=n.params||{},o=n.includeFields||this.cc,s=e;if("object"==typeof e&&"form"===f.a.A(e))for(var s=e.action,l=o.length-1;l>=0;l--)for(var u=f.a.ec(e,o[l]),c=u.length-1;c>=0;c--)r[u[c].name]=u[c].value;t=f.a.c(t);var h=i.createElement("form");h.style.display="none",h.action=s,h.method="post";for(var d in t)e=i.createElement("input"),e.type="hidden",e.name=d,e.value=f.a.Eb(f.a.c(t[d])),h.appendChild(e);a(r,function(e,t){var n=i.createElement("input");n.type="hidden",n.name=e,n.value=t,h.appendChild(n)}),i.body.appendChild(h),n.submitter?n.submitter(h):h.submit(),setTimeout(function(){h.parentNode.removeChild(h)},0)}}}(),f.b("utils",f.a),f.b("utils.arrayForEach",f.a.q),f.b("utils.arrayFirst",f.a.Sb),f.b("utils.arrayFilter",f.a.Ka),f.b("utils.arrayGetDistinctValues",f.a.Tb),f.b("utils.arrayIndexOf",f.a.o),f.b("utils.arrayMap",f.a.fb),f.b("utils.arrayPushAll",f.a.ra),f.b("utils.arrayRemoveItem",f.a.La),f.b("utils.extend",f.a.extend),f.b("utils.fieldsIncludedWithJsonPost",f.a.cc),f.b("utils.getFormFields",f.a.ec),f.b("utils.peekObservable",f.a.zb),f.b("utils.postJson",f.a.fd),f.b("utils.parseJson",f.a.ed),f.b("utils.registerEventHandler",f.a.p),f.b("utils.stringifyJson",f.a.Eb),f.b("utils.range",f.a.hd),f.b("utils.toggleDomNodeCssClass",f.a.bb),f.b("utils.triggerEvent",f.a.Da),f.b("utils.unwrapObservable",f.a.c),f.b("utils.objectForEach",f.a.D),f.b("utils.addOrRemoveItem",f.a.pa),f.b("utils.setTextContent",f.a.Za),f.b("unwrap",f.a.c),Function.prototype.bind||(Function.prototype.bind=function(e){ +var t=this;if(1===arguments.length)return function(){return t.apply(e,arguments)};var i=Array.prototype.slice.call(arguments,1);return function(){var n=i.slice(0);return n.push.apply(n,arguments),t.apply(e,n)}}),f.a.e=new function(){function t(t,o){var a=t[n];if(!a||"null"===a||!r[a]){if(!o)return e;a=t[n]="ko"+i++,r[a]={}}return r[a]}var i=0,n="__ko__"+(new Date).getTime(),r={};return{get:function(i,n){var r=t(i,!1);return r===e?e:r[n]},set:function(i,n,r){(r!==e||t(i,!1)!==e)&&(t(i,!0)[n]=r)},clear:function(e){var t=e[n];return t?(delete r[t],e[n]=null,!0):!1},I:function(){return i++ +n}}},f.b("utils.domData",f.a.e),f.b("utils.domData.clear",f.a.e.clear),f.a.F=new function(){function t(t,i){var r=f.a.e.get(t,n);return r===e&&i&&(r=[],f.a.e.set(t,n,r)),r}function i(e){var n=t(e,!1);if(n)for(var n=n.slice(0),r=0;r<n.length;r++)n[r](e);if(f.a.e.clear(e),f.a.F.cleanExternalData(e),a[e.nodeType])for(n=e.firstChild;e=n;)n=e.nextSibling,8===e.nodeType&&i(e)}var n=f.a.e.I(),o={1:!0,8:!0,9:!0},a={1:!0,9:!0};return{oa:function(e,i){if("function"!=typeof i)throw Error("Callback must be a function");t(e,!0).push(i)},pc:function(i,r){var o=t(i,!1);o&&(f.a.La(o,r),0==o.length&&f.a.e.set(i,n,e))},$:function(e){if(o[e.nodeType]&&(i(e),a[e.nodeType])){var t=[];f.a.ra(t,e.getElementsByTagName("*"));for(var n=0,r=t.length;r>n;n++)i(t[n])}return e},removeNode:function(e){f.$(e),e.parentNode&&e.parentNode.removeChild(e)},cleanExternalData:function(e){r&&"function"==typeof r.cleanData&&r.cleanData([e])}}},f.$=f.a.F.$,f.removeNode=f.a.F.removeNode,f.b("cleanNode",f.$),f.b("removeNode",f.removeNode),f.b("utils.domNodeDisposal",f.a.F),f.b("utils.domNodeDisposal.addDisposeCallback",f.a.F.oa),f.b("utils.domNodeDisposal.removeDisposeCallback",f.a.F.pc),function(){var n=[0,"",""],o=[1,"<table>","</table>"],a=[3,"<table><tbody><tr>","</tr></tbody></table>"],s=[1,"<select multiple='multiple'>","</select>"],l={thead:o,tbody:o,tfoot:o,tr:[2,"<table><tbody>","</tbody></table>"],td:a,th:a,option:s,optgroup:s},u=8>=f.a.C;f.a.ma=function(e,o){var a;if(r){if(r.parseHTML)a=r.parseHTML(e,o)||[];else if((a=r.clean([e],o))&&a[0]){for(var s=a[0];s.parentNode&&11!==s.parentNode.nodeType;)s=s.parentNode;s.parentNode&&s.parentNode.removeChild(s)}}else{(a=o)||(a=i);var c,s=a.parentWindow||a.defaultView||t,h=f.a.$a(e).toLowerCase(),d=a.createElement("div");for(c=(h=h.match(/^<([a-z]+)[ >]/))&&l[h[1]]||n,h=c[0],c="ignored<div>"+c[1]+e+c[2]+"</div>","function"==typeof s.innerShiv?d.appendChild(s.innerShiv(c)):(u&&a.appendChild(d),d.innerHTML=c,u&&d.parentNode.removeChild(d));h--;)d=d.lastChild;a=f.a.V(d.lastChild.childNodes)}return a},f.a.Cb=function(t,i){if(f.a.ob(t),i=f.a.c(i),null!==i&&i!==e)if("string"!=typeof i&&(i=i.toString()),r)r(t).html(i);else for(var n=f.a.ma(i,t.ownerDocument),o=0;o<n.length;o++)t.appendChild(n[o])}}(),f.b("utils.parseHtmlFragment",f.a.ma),f.b("utils.setHtml",f.a.Cb),f.M=function(){function t(e,i){if(e)if(8==e.nodeType){var n=f.M.lc(e.nodeValue);null!=n&&i.push({Lc:e,cd:n})}else if(1==e.nodeType)for(var n=0,r=e.childNodes,o=r.length;o>n;n++)t(r[n],i)}var i={};return{wb:function(e){if("function"!=typeof e)throw Error("You can only pass a function to ko.memoization.memoize()");var t=(4294967296*(1+Math.random())|0).toString(16).substring(1)+(4294967296*(1+Math.random())|0).toString(16).substring(1);return i[t]=e,"<!--[ko_memo:"+t+"]-->"},xc:function(t,n){var r=i[t];if(r===e)throw Error("Couldn't find any memo with ID "+t+". Perhaps it's already been unmemoized.");try{return r.apply(null,n||[]),!0}finally{delete i[t]}},yc:function(e,i){var n=[];t(e,n);for(var r=0,o=n.length;o>r;r++){var a=n[r].Lc,s=[a];i&&f.a.ra(s,i),f.M.xc(n[r].cd,s),a.nodeValue="",a.parentNode&&a.parentNode.removeChild(a)}},lc:function(e){return(e=e.match(/^\[ko_memo\:(.*?)\]$/))?e[1]:null}}}(),f.b("memoization",f.M),f.b("memoization.memoize",f.M.wb),f.b("memoization.unmemoize",f.M.xc),f.b("memoization.parseMemoText",f.M.lc),f.b("memoization.unmemoizeDomNodeAndDescendants",f.M.yc),f.Y=function(){function e(){if(o)for(var e,t=o,i=0;o>s;)if(e=r[s++]){if(s>t){if(5e3<=++i){s=o,f.a.$b(Error("'Too much recursion' after processing "+i+" task groups."));break}t=o}try{e()}catch(n){f.a.$b(n)}}}function n(){e(),s=o=r.length=0}var r=[],o=0,a=1,s=0;return{scheduler:t.MutationObserver?function(e){var t=i.createElement("div");return new MutationObserver(e).observe(t,{attributes:!0}),function(){t.classList.toggle("foo")}}(n):i&&"onreadystatechange"in i.createElement("script")?function(e){var t=i.createElement("script");t.onreadystatechange=function(){t.onreadystatechange=null,i.documentElement.removeChild(t),t=null,e()},i.documentElement.appendChild(t)}:function(e){setTimeout(e,0)},Wa:function(e){return o||f.Y.scheduler(n),r[o++]=e,a++},cancel:function(e){e-=a-o,e>=s&&o>e&&(r[e]=null)},resetForTesting:function(){var e=o-s;return s=o=r.length=0,e},md:e}}(),f.b("tasks",f.Y),f.b("tasks.schedule",f.Y.Wa),f.b("tasks.runEarly",f.Y.md),f.ya={throttle:function(e,t){e.throttleEvaluation=t;var i=null;return f.B({read:e,write:function(n){clearTimeout(i),i=f.a.setTimeout(function(){e(n)},t)}})},rateLimit:function(e,t){var i,n,r;"number"==typeof t?i=t:(i=t.timeout,n=t.method),e.cb=!1,r="notifyWhenChangesStop"==n?c:u,e.Ta(function(e){return r(e,i)})},deferred:function(t,i){if(!0!==i)throw Error("The 'deferred' extender only accepts the value 'true', because it is not supported to turn deferral off once enabled.");t.cb||(t.cb=!0,t.Ta(function(i){var n;return function(){f.Y.cancel(n),n=f.Y.Wa(i),t.notifySubscribers(e,"dirty")}}))},notify:function(e,t){e.equalityComparer="always"==t?null:l}};var g={undefined:1,"boolean":1,number:1,string:1};f.b("extenders",f.ya),f.vc=function(e,t,i){this.ia=e,this.gb=t,this.Kc=i,this.R=!1,f.G(this,"dispose",this.k)},f.vc.prototype.k=function(){this.R=!0,this.Kc()},f.J=function(){f.a.Ya(this,_),_.rb(this)};var v="change",_={rb:function(e){e.K={},e.Nb=1},X:function(e,t,i){var n=this;i=i||v;var r=new f.vc(n,t?e.bind(t):e,function(){f.a.La(n.K[i],r),n.Ia&&n.Ia(i)});return n.sa&&n.sa(i),n.K[i]||(n.K[i]=[]),n.K[i].push(r),r},notifySubscribers:function(e,t){if(t=t||v,t===v&&this.zc(),this.Pa(t))try{f.l.Ub();for(var i,n=this.K[t].slice(0),r=0;i=n[r];++r)i.R||i.gb(e)}finally{f.l.end()}},Na:function(){return this.Nb},Uc:function(e){return this.Na()!==e},zc:function(){++this.Nb},Ta:function(e){var t,i,n,r=this,o=f.H(r);r.Ha||(r.Ha=r.notifySubscribers,r.notifySubscribers=h);var a=e(function(){r.Mb=!1,o&&n===r&&(n=r()),t=!1,r.tb(i,n)&&r.Ha(i=n)});r.Lb=function(e){r.Mb=t=!0,n=e,a()},r.Kb=function(e){t||(i=e,r.Ha(e,"beforeChange"))}},Pa:function(e){return this.K[e]&&this.K[e].length},Sc:function(e){if(e)return this.K[e]&&this.K[e].length||0;var t=0;return f.a.D(this.K,function(e,i){"dirty"!==e&&(t+=i.length)}),t},tb:function(e,t){return!this.equalityComparer||!this.equalityComparer(e,t)},extend:function(e){var t=this;return e&&f.a.D(e,function(e,i){var n=f.ya[e];"function"==typeof n&&(t=n(t,i)||t)}),t}};f.G(_,"subscribe",_.X),f.G(_,"extend",_.extend),f.G(_,"getSubscriptionsCount",_.Sc),f.a.ka&&f.a.Xa(_,Function.prototype),f.J.fn=_,f.hc=function(e){return null!=e&&"function"==typeof e.X&&"function"==typeof e.notifySubscribers},f.b("subscribable",f.J),f.b("isSubscribable",f.hc),f.va=f.l=function(){function e(e){n.push(i),i=e}function t(){i=n.pop()}var i,n=[],r=0;return{Ub:e,end:t,oc:function(e){if(i){if(!f.hc(e))throw Error("Only subscribable things can act as dependencies");i.gb.call(i.Gc,e,e.Cc||(e.Cc=++r))}},w:function(i,n,r){try{return e(),i.apply(n,r||[])}finally{t()}},Aa:function(){return i?i.m.Aa():void 0},Sa:function(){return i?i.Sa:void 0}}}(),f.b("computedContext",f.va),f.b("computedContext.getDependenciesCount",f.va.Aa),f.b("computedContext.isInitial",f.va.Sa),f.b("ignoreDependencies",f.qd=f.l.w);var y=f.a.Yb("_latestValue");f.N=function(e){function t(){return 0<arguments.length?(t.tb(t[y],arguments[0])&&(t.ga(),t[y]=arguments[0],t.fa()),this):(f.l.oc(t),t[y])}return t[y]=e,f.a.ka||f.a.extend(t,f.J.fn),f.J.fn.rb(t),f.a.Ya(t,C),f.options.deferUpdates&&f.ya.deferred(t,!0),t};var C={equalityComparer:l,t:function(){return this[y]},fa:function(){this.notifySubscribers(this[y])},ga:function(){this.notifySubscribers(this[y],"beforeChange")}};f.a.ka&&f.a.Xa(C,f.J.fn);var w=f.N.gd="__ko_proto__";C[w]=f.N,f.Oa=function(t,i){return null===t||t===e||t[w]===e?!1:t[w]===i?!0:f.Oa(t[w],i)},f.H=function(e){return f.Oa(e,f.N)},f.Ba=function(e){return"function"==typeof e&&e[w]===f.N||"function"==typeof e&&e[w]===f.B&&e.Vc?!0:!1},f.b("observable",f.N),f.b("isObservable",f.H),f.b("isWriteableObservable",f.Ba),f.b("isWritableObservable",f.Ba),f.b("observable.fn",C),f.G(C,"peek",C.t),f.G(C,"valueHasMutated",C.fa),f.G(C,"valueWillMutate",C.ga),f.la=function(e){if(e=e||[],"object"!=typeof e||!("length"in e))throw Error("The argument passed when initializing an observable array must be an array, or null, or undefined.");return e=f.N(e),f.a.Ya(e,f.la.fn),e.extend({trackArrayChanges:!0})},f.la.fn={remove:function(e){for(var t=this.t(),i=[],n="function"!=typeof e||f.H(e)?function(t){return t===e}:e,r=0;r<t.length;r++){var o=t[r];n(o)&&(0===i.length&&this.ga(),i.push(o),t.splice(r,1),r--)}return i.length&&this.fa(),i},removeAll:function(t){if(t===e){var i=this.t(),n=i.slice(0);return this.ga(),i.splice(0,i.length),this.fa(),n}return t?this.remove(function(e){return 0<=f.a.o(t,e)}):[]},destroy:function(e){var t=this.t(),i="function"!=typeof e||f.H(e)?function(t){return t===e}:e;this.ga();for(var n=t.length-1;n>=0;n--)i(t[n])&&(t[n]._destroy=!0);this.fa()},destroyAll:function(t){return t===e?this.destroy(function(){return!0}):t?this.destroy(function(e){return 0<=f.a.o(t,e)}):[]},indexOf:function(e){var t=this();return f.a.o(t,e)},replace:function(e,t){var i=this.indexOf(e);i>=0&&(this.ga(),this.t()[i]=t,this.fa())}},f.a.ka&&f.a.Xa(f.la.fn,f.N.fn),f.a.q("pop push reverse shift sort splice unshift".split(" "),function(e){f.la.fn[e]=function(){var t=this.t();this.ga(),this.Vb(t,e,arguments);var i=t[e].apply(t,arguments);return this.fa(),i===t?this:i}}),f.a.q(["slice"],function(e){f.la.fn[e]=function(){var t=this();return t[e].apply(t,arguments)}}),f.b("observableArray",f.la),f.ya.trackArrayChanges=function(e,t){function i(){if(!r){r=!0;var t=e.notifySubscribers;e.notifySubscribers=function(e,i){return i&&i!==v||++a,t.apply(this,arguments)};var i=[].concat(e.t()||[]);o=null,n=e.X(function(t){if(t=[].concat(t||[]),e.Pa("arrayChange")){var n;(!o||a>1)&&(o=f.a.ib(i,t,e.hb)),n=o}i=t,o=null,a=0,n&&n.length&&e.notifySubscribers(n,"arrayChange")})}}if(e.hb={},t&&"object"==typeof t&&f.a.extend(e.hb,t),e.hb.sparse=!0,!e.Vb){var n,r=!1,o=null,a=0,s=e.sa,l=e.Ia;e.sa=function(t){s&&s.call(e,t),"arrayChange"===t&&i()},e.Ia=function(t){l&&l.call(e,t),"arrayChange"!==t||e.Pa("arrayChange")||(n.k(),r=!1)},e.Vb=function(e,t,i){function n(e,t,i){return s[s.length]={status:e,value:t,index:i}}if(r&&!a){var s=[],l=e.length,u=i.length,c=0;switch(t){case"push":c=l;case"unshift":for(t=0;u>t;t++)n("added",i[t],c+t);break;case"pop":c=l-1;case"shift":l&&n("deleted",e[c],c);break;case"splice":t=Math.min(Math.max(0,0>i[0]?l+i[0]:i[0]),l);for(var l=1===u?l:Math.min(t+(i[1]||0),l),u=t+u-2,c=Math.max(l,u),h=[],d=[],p=2;c>t;++t,++p)l>t&&d.push(n("deleted",e[t],t)),u>t&&h.push(n("added",i[p],t));f.a.dc(d,h);break;default:return}o=s}}}};var E=f.a.Yb("_state");f.m=f.B=function(t,i,n){function r(){if(0<arguments.length){if("function"!=typeof o)throw Error("Cannot write a value to a ko.computed unless you specify a 'write' option. If you wish to read the current value, don't pass any parameters.");return o.apply(a.pb,arguments),this}return f.l.oc(r),(a.S||a.s&&r.Qa())&&r.aa(),a.T}if("object"==typeof t?n=t:(n=n||{},t&&(n.read=t)),"function"!=typeof n.read)throw Error("Pass a function that returns the value of the ko.computed");var o=n.write,a={T:e,S:!0,Ra:!1,Fb:!1,R:!1,Va:!1,s:!1,jd:n.read,pb:i||n.owner,i:n.disposeWhenNodeIsRemoved||n.i||null,wa:n.disposeWhen||n.wa,mb:null,r:{},L:0,bc:null};return r[E]=a,r.Vc="function"==typeof o,f.a.ka||f.a.extend(r,f.J.fn),f.J.fn.rb(r),f.a.Ya(r,b),n.pure?(a.Va=!0,a.s=!0,f.a.extend(r,S)):n.deferEvaluation&&f.a.extend(r,T),f.options.deferUpdates&&f.ya.deferred(r,!0),a.i&&(a.Fb=!0,a.i.nodeType||(a.i=null)),a.s||n.deferEvaluation||r.aa(),a.i&&r.ba()&&f.a.F.oa(a.i,a.mb=function(){r.k()}),r};var b={equalityComparer:l,Aa:function(){return this[E].L},Pb:function(e,t,i){if(this[E].Va&&t===this)throw Error("A 'pure' computed must not be called recursively");this[E].r[e]=i,i.Ga=this[E].L++,i.na=t.Na()},Qa:function(){var e,t,i=this[E].r;for(e in i)if(i.hasOwnProperty(e)&&(t=i[e],t.ia.Uc(t.na)))return!0},bd:function(){this.Fa&&!this[E].Ra&&this.Fa()},ba:function(){return this[E].S||0<this[E].L},ld:function(){this.Mb||this.ac()},uc:function(e){if(e.cb&&!this[E].i){var t=e.X(this.bd,this,"dirty"),i=e.X(this.ld,this);return{ia:e,k:function(){t.k(),i.k()}}}return e.X(this.ac,this)},ac:function(){var e=this,t=e.throttleEvaluation;t&&t>=0?(clearTimeout(this[E].bc),this[E].bc=f.a.setTimeout(function(){e.aa(!0)},t)):e.Fa?e.Fa():e.aa(!0)},aa:function(e){var t=this[E],i=t.wa;if(!t.Ra&&!t.R){if(t.i&&!f.a.nb(t.i)||i&&i()){if(!t.Fb)return void this.k()}else t.Fb=!1;t.Ra=!0;try{this.Qc(e)}finally{t.Ra=!1}t.L||this.k()}},Qc:function(t){var i=this[E],n=i.Va?e:!i.L,r={Hc:this,Ma:i.r,lb:i.L};f.l.Ub({Gc:r,gb:p,m:this,Sa:n}),i.r={},i.L=0,r=this.Pc(i,r),this.tb(i.T,r)&&(i.s||this.notifySubscribers(i.T,"beforeChange"),i.T=r,i.s?this.zc():t&&this.notifySubscribers(i.T)),n&&this.notifySubscribers(i.T,"awake")},Pc:function(e,t){try{var i=e.jd;return e.pb?i.call(e.pb):i()}finally{f.l.end(),t.lb&&!e.s&&f.a.D(t.Ma,d),e.S=!1}},t:function(){var e=this[E];return(e.S&&!e.L||e.s&&this.Qa())&&this.aa(),e.T},Ta:function(e){f.J.fn.Ta.call(this,e),this.Fa=function(){this.Kb(this[E].T),this[E].S=!0,this.Lb(this)}},k:function(){var e=this[E];!e.s&&e.r&&f.a.D(e.r,function(e,t){t.k&&t.k()}),e.i&&e.mb&&f.a.F.pc(e.i,e.mb),e.r=null,e.L=0,e.R=!0,e.S=!1,e.s=!1,e.i=null}},S={sa:function(e){var t=this,i=t[E];if(!i.R&&i.s&&"change"==e){if(i.s=!1,i.S||t.Qa())i.r=null,i.L=0,i.S=!0,t.aa();else{var n=[];f.a.D(i.r,function(e,t){n[t.Ga]=e}),f.a.q(n,function(e,n){var r=i.r[e],o=t.uc(r.ia);o.Ga=n,o.na=r.na,i.r[e]=o})}i.R||t.notifySubscribers(i.T,"awake")}},Ia:function(t){var i=this[E];i.R||"change"!=t||this.Pa("change")||(f.a.D(i.r,function(e,t){t.k&&(i.r[e]={ia:t.ia,Ga:t.Ga,na:t.na},t.k())}),i.s=!0,this.notifySubscribers(e,"asleep"))},Na:function(){var e=this[E];return e.s&&(e.S||this.Qa())&&this.aa(),f.J.fn.Na.call(this)}},T={sa:function(e){"change"!=e&&"beforeChange"!=e||this.t()}};f.a.ka&&f.a.Xa(b,f.J.fn);var x=f.N.gd;f.m[x]=f.N,b[x]=f.m,f.Xc=function(e){return f.Oa(e,f.m)},f.Yc=function(e){return f.Oa(e,f.m)&&e[E]&&e[E].Va},f.b("computed",f.m),f.b("dependentObservable",f.m),f.b("isComputed",f.Xc),f.b("isPureComputed",f.Yc),f.b("computed.fn",b),f.G(b,"peek",b.t),f.G(b,"dispose",b.k),f.G(b,"isActive",b.ba),f.G(b,"getDependenciesCount",b.Aa),f.nc=function(e,t){return"function"==typeof e?f.m(e,t,{pure:!0}):(e=f.a.extend({},e),e.pure=!0,f.m(e,t))},f.b("pureComputed",f.nc),function(){function t(r,o,a){if(a=a||new n,r=o(r),"object"!=typeof r||null===r||r===e||r instanceof RegExp||r instanceof Date||r instanceof String||r instanceof Number||r instanceof Boolean)return r;var s=r instanceof Array?[]:{};return a.save(r,s),i(r,function(i){var n=o(r[i]);switch(typeof n){case"boolean":case"number":case"string":case"function":s[i]=n;break;case"object":case"undefined":var l=a.get(n);s[i]=l!==e?l:t(n,o,a)}}),s}function i(e,t){if(e instanceof Array){for(var i=0;i<e.length;i++)t(i);"function"==typeof e.toJSON&&t("toJSON")}else for(i in e)t(i)}function n(){this.keys=[],this.Ib=[]}f.wc=function(e){if(0==arguments.length)throw Error("When calling ko.toJS, pass the object you want to convert.");return t(e,function(e){for(var t=0;f.H(e)&&10>t;t++)e=e();return e})},f.toJSON=function(e,t,i){return e=f.wc(e),f.a.Eb(e,t,i)},n.prototype={save:function(e,t){var i=f.a.o(this.keys,e);i>=0?this.Ib[i]=t:(this.keys.push(e),this.Ib.push(t))},get:function(t){return t=f.a.o(this.keys,t),t>=0?this.Ib[t]:e}}}(),f.b("toJS",f.wc),f.b("toJSON",f.toJSON),function(){f.j={u:function(t){switch(f.a.A(t)){case"option":return!0===t.__ko__hasDomDataOptionValue__?f.a.e.get(t,f.d.options.xb):7>=f.a.C?t.getAttributeNode("value")&&t.getAttributeNode("value").specified?t.value:t.text:t.value;case"select":return 0<=t.selectedIndex?f.j.u(t.options[t.selectedIndex]):e;default:return t.value}},ha:function(t,i,n){switch(f.a.A(t)){case"option":switch(typeof i){case"string":f.a.e.set(t,f.d.options.xb,e),"__ko__hasDomDataOptionValue__"in t&&delete t.__ko__hasDomDataOptionValue__,t.value=i;break;default:f.a.e.set(t,f.d.options.xb,i),t.__ko__hasDomDataOptionValue__=!0,t.value="number"==typeof i?i:""}break;case"select":(""===i||null===i)&&(i=e);for(var r,o=-1,a=0,s=t.options.length;s>a;++a)if(r=f.j.u(t.options[a]),r==i||""==r&&i===e){o=a;break}(n||o>=0||i===e&&1<t.size)&&(t.selectedIndex=o);break;default:(null===i||i===e)&&(i=""),t.value=i}}}}(),f.b("selectExtensions",f.j),f.b("selectExtensions.readValue",f.j.u),f.b("selectExtensions.writeValue",f.j.ha),f.h=function(){function e(e){e=f.a.$a(e),123===e.charCodeAt(0)&&(e=e.slice(1,-1));var t,i=[],a=e.match(n),s=[],l=0;if(a){a.push(",");for(var u,c=0;u=a[c];++c){var h=u.charCodeAt(0);if(44===h){if(0>=l){i.push(t&&s.length?{key:t,value:s.join("")}:{unknown:t||s.join("")}),t=l=0,s=[];continue}}else if(58===h){if(!l&&!t&&1===s.length){t=s.pop();continue}}else 47===h&&c&&1<u.length?(h=a[c-1].match(r))&&!o[h[0]]&&(e=e.substr(e.indexOf(u)+1),a=e.match(n),a.push(","),c=-1,u="/"):40===h||123===h||91===h?++l:41===h||125===h||93===h?--l:t||s.length||34!==h&&39!==h||(u=u.slice(1,-1));s.push(u)}}return i}var t=["true","false","null","undefined"],i=/^(?:[$_a-z][$\w]*|(.+)(\.\s*[$_a-z][$\w]*|\[.+\]))$/i,n=RegExp("\"(?:[^\"\\\\]|\\\\.)*\"|'(?:[^'\\\\]|\\\\.)*'|/(?:[^/\\\\]|\\\\.)*/w*|[^\\s:,/][^,\"'{}()/:[\\]]*[^\\s,\"'{}()/:[\\]]|[^\\s]","g"),r=/[\])"'A-Za-z0-9_$]+$/,o={"in":1,"return":1,"typeof":1},a={};return{ta:[],ea:a,yb:e,Ua:function(n,r){function o(e,n){var r;if(!c){var h=f.getBindingHandler(e);if(h&&h.preprocess&&!(n=h.preprocess(n,e,o)))return;(h=a[e])&&(r=n,0<=f.a.o(t,r)?r=!1:(h=r.match(i),r=null===h?!1:h[1]?"Object("+h[1]+")"+h[2]:r),h=r),h&&l.push("'"+e+"':function(_z){"+r+"=_z}")}u&&(n="function(){return "+n+" }"),s.push("'"+e+"':"+n)}r=r||{};var s=[],l=[],u=r.valueAccessors,c=r.bindingParams,h="string"==typeof n?e(n):n;return f.a.q(h,function(e){o(e.key||e.unknown,e.value)}),l.length&&o("_ko_property_writers","{"+l.join(",")+" }"),s.join(",")},ad:function(e,t){for(var i=0;i<e.length;i++)if(e[i].key==t)return!0;return!1},Ea:function(e,t,i,n,r){e&&f.H(e)?!f.Ba(e)||r&&e.t()===n||e(n):(e=t.get("_ko_property_writers"))&&e[i]&&e[i](n)}}}(),f.b("expressionRewriting",f.h),f.b("expressionRewriting.bindingRewriteValidators",f.h.ta),f.b("expressionRewriting.parseObjectLiteral",f.h.yb),f.b("expressionRewriting.preProcessBindings",f.h.Ua),f.b("expressionRewriting._twoWayBindings",f.h.ea),f.b("jsonExpressionRewriting",f.h),f.b("jsonExpressionRewriting.insertPropertyAccessorsIntoJson",f.h.Ua),function(){function e(e){return 8==e.nodeType&&a.test(o?e.text:e.nodeValue)}function t(e){return 8==e.nodeType&&s.test(o?e.text:e.nodeValue)}function n(i,n){for(var r=i,o=1,a=[];r=r.nextSibling;){if(t(r)&&(o--,0===o))return a;a.push(r),e(r)&&o++}if(!n)throw Error("Cannot find closing comment tag to match: "+i.nodeValue);return null}function r(e,t){var i=n(e,t);return i?0<i.length?i[i.length-1].nextSibling:e.nextSibling:null}var o=i&&"<!--test-->"===i.createComment("test").text,a=o?/^\x3c!--\s*ko(?:\s+([\s\S]+))?\s*--\x3e$/:/^\s*ko(?:\s+([\s\S]+))?\s*$/,s=o?/^\x3c!--\s*\/ko\s*--\x3e$/:/^\s*\/ko\s*$/,l={ul:!0,ol:!0};f.f={Z:{},childNodes:function(t){return e(t)?n(t):t.childNodes},xa:function(t){if(e(t)){t=f.f.childNodes(t);for(var i=0,n=t.length;n>i;i++)f.removeNode(t[i])}else f.a.ob(t)},da:function(t,i){if(e(t)){f.f.xa(t);for(var n=t.nextSibling,r=0,o=i.length;o>r;r++)n.parentNode.insertBefore(i[r],n)}else f.a.da(t,i)},mc:function(t,i){e(t)?t.parentNode.insertBefore(i,t.nextSibling):t.firstChild?t.insertBefore(i,t.firstChild):t.appendChild(i)},gc:function(t,i,n){n?e(t)?t.parentNode.insertBefore(i,n.nextSibling):n.nextSibling?t.insertBefore(i,n.nextSibling):t.appendChild(i):f.f.mc(t,i)},firstChild:function(i){return e(i)?!i.nextSibling||t(i.nextSibling)?null:i.nextSibling:i.firstChild},nextSibling:function(i){return e(i)&&(i=r(i)),i.nextSibling&&t(i.nextSibling)?null:i.nextSibling},Tc:e,pd:function(e){return(e=(o?e.text:e.nodeValue).match(a))?e[1]:null},kc:function(i){if(l[f.a.A(i)]){var n=i.firstChild;if(n)do if(1===n.nodeType){var o;o=n.firstChild;var a=null;if(o)do if(a)a.push(o);else if(e(o)){var s=r(o,!0);s?o=s:a=[o]}else t(o)&&(a=[o]);while(o=o.nextSibling);if(o=a)for(a=n.nextSibling,s=0;s<o.length;s++)a?i.insertBefore(o[s],a):i.appendChild(o[s])}while(n=n.nextSibling)}}}}(),f.b("virtualElements",f.f),f.b("virtualElements.allowedBindings",f.f.Z),f.b("virtualElements.emptyNode",f.f.xa),f.b("virtualElements.insertAfter",f.f.gc),f.b("virtualElements.prepend",f.f.mc),f.b("virtualElements.setDomNodeChildren",f.f.da),function(){f.Q=function(){this.Fc={}},f.a.extend(f.Q.prototype,{nodeHasBindings:function(e){switch(e.nodeType){case 1:return null!=e.getAttribute("data-bind")||f.g.getComponentNameForNode(e);case 8:return f.f.Tc(e);default:return!1}},getBindings:function(e,t){var i=this.getBindingsString(e,t),i=i?this.parseBindingsString(i,t,e):null;return f.g.Ob(i,e,t,!1)},getBindingAccessors:function(e,t){var i=this.getBindingsString(e,t),i=i?this.parseBindingsString(i,t,e,{valueAccessors:!0}):null;return f.g.Ob(i,e,t,!0)},getBindingsString:function(e){switch(e.nodeType){case 1:return e.getAttribute("data-bind");case 8:return f.f.pd(e);default:return null}},parseBindingsString:function(e,t,i,n){try{var r,o=this.Fc,a=e+(n&&n.valueAccessors||"");if(!(r=o[a])){var s,l="with($context){with($data||{}){return{"+f.h.Ua(e,n)+"}}}";s=new Function("$context","$element",l),r=o[a]=s}return r(t,i)}catch(u){throw u.message="Unable to parse bindings.\nBindings value: "+e+"\nMessage: "+u.message,u}}}),f.Q.instance=new f.Q}(),f.b("bindingProvider",f.Q),function(){function i(e){return function(){return e}}function n(e){return e()}function o(e){return f.a.Ca(f.l.w(e),function(t,i){return function(){return e()[i]}})}function a(e,t,n){return"function"==typeof e?o(e.bind(null,t,n)):f.a.Ca(e,i)}function s(e,t){return o(this.getBindings.bind(this,e,t))}function l(e,t,i){var n,r=f.f.firstChild(t),o=f.Q.instance,a=o.preprocessNode;if(a){for(;n=r;)r=f.f.nextSibling(n),a.call(o,n);r=f.f.firstChild(t)}for(;n=r;)r=f.f.nextSibling(n),u(e,n,i)}function u(e,t,i){var n=!0,r=1===t.nodeType;r&&f.f.kc(t),(r&&i||f.Q.instance.nodeHasBindings(t))&&(n=h(t,null,e,i).shouldBindDescendants),n&&!p[f.a.A(t)]&&l(e,t,!r)}function c(e){var t=[],i={},n=[];return f.a.D(e,function r(o){if(!i[o]){var a=f.getBindingHandler(o);a&&(a.after&&(n.push(o),f.a.q(a.after,function(t){if(e[t]){if(-1!==f.a.o(n,t))throw Error("Cannot combine the following bindings, because they have a cyclic dependency: "+n.join(", "));r(t)}}),n.length--),t.push({key:o,fc:a})),i[o]=!0}}),t}function h(t,i,r,o){var a=f.a.e.get(t,m);if(!i){if(a)throw Error("You cannot apply bindings multiple times to the same element.");f.a.e.set(t,m,!0)}!a&&o&&f.tc(t,r);var l;if(i&&"function"!=typeof i)l=i;else{var u=f.Q.instance,h=u.getBindingAccessors||s,d=f.B(function(){return(l=i?i(r,t):h.call(u,t,r))&&r.P&&r.P(),l},null,{i:t});l&&d.ba()||(d=null)}var p;if(l){var g=d?function(e){return function(){return n(d()[e])}}:function(e){return l[e]},v=function(){return f.a.Ca(d?d():l,n)};v.get=function(e){return l[e]&&n(g(e))},v.has=function(e){return e in l},o=c(l),f.a.q(o,function(i){var n=i.fc.init,o=i.fc.update,a=i.key;if(8===t.nodeType&&!f.f.Z[a])throw Error("The binding '"+a+"' cannot be used with virtual elements");try{"function"==typeof n&&f.l.w(function(){var i=n(t,g(a),v,r.$data,r);if(i&&i.controlsDescendantBindings){if(p!==e)throw Error("Multiple bindings ("+p+" and "+a+") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.");p=a}}),"function"==typeof o&&f.B(function(){o(t,g(a),v,r.$data,r)},null,{i:t})}catch(s){throw s.message='Unable to process binding "'+a+": "+l[a]+'"\nMessage: '+s.message,s}})}return{shouldBindDescendants:p===e}}function d(e){return e&&e instanceof f.U?e:new f.U(e)}f.d={};var p={script:!0,textarea:!0,template:!0};f.getBindingHandler=function(e){return f.d[e]},f.U=function(t,i,n,r){var o,a=this,s="function"==typeof t&&!f.H(t),l=f.B(function(){var e=s?t():t,o=f.a.c(e);return i?(i.P&&i.P(),f.a.extend(a,i),l&&(a.P=l)):(a.$parents=[],a.$root=o,a.ko=f),a.$rawData=e,a.$data=o,n&&(a[n]=o),r&&r(a,i,o),a.$data},null,{wa:function(){return o&&!f.a.Qb(o)},i:!0});l.ba()&&(a.P=l,l.equalityComparer=null,o=[],l.Ac=function(t){o.push(t),f.a.F.oa(t,function(t){f.a.La(o,t),o.length||(l.k(),a.P=l=e)})})},f.U.prototype.createChildContext=function(e,t,i){return new f.U(e,this,t,function(e,t){e.$parentContext=t,e.$parent=t.$data,e.$parents=(t.$parents||[]).slice(0),e.$parents.unshift(e.$parent),i&&i(e)})},f.U.prototype.extend=function(e){return new f.U(this.P||this.$data,this,null,function(t,i){t.$rawData=i.$rawData,f.a.extend(t,"function"==typeof e?e():e)})};var m=f.a.e.I(),g=f.a.e.I();f.tc=function(e,t){return 2!=arguments.length?f.a.e.get(e,g):(f.a.e.set(e,g,t),void(t.P&&t.P.Ac(e)))},f.Ja=function(e,t,i){return 1===e.nodeType&&f.f.kc(e),h(e,t,d(i),!0)},f.Dc=function(e,t,i){return i=d(i),f.Ja(e,a(t,i,e),i)},f.eb=function(e,t){1!==t.nodeType&&8!==t.nodeType||l(d(e),t,!0)},f.Rb=function(e,i){if(!r&&t.jQuery&&(r=t.jQuery),i&&1!==i.nodeType&&8!==i.nodeType)throw Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node");i=i||t.document.body,u(d(e),i,!0)},f.kb=function(t){switch(t.nodeType){case 1:case 8:var i=f.tc(t);if(i)return i;if(t.parentNode)return f.kb(t.parentNode)}return e},f.Jc=function(t){return(t=f.kb(t))?t.$data:e},f.b("bindingHandlers",f.d),f.b("applyBindings",f.Rb),f.b("applyBindingsToDescendants",f.eb),f.b("applyBindingAccessorsToNode",f.Ja),f.b("applyBindingsToNode",f.Dc),f.b("contextFor",f.kb),f.b("dataFor",f.Jc)}(),function(e){function t(t,n){var a,s=r.hasOwnProperty(t)?r[t]:e;s?s.X(n):(s=r[t]=new f.J,s.X(n),i(t,function(e,i){var n=!(!i||!i.synchronous);o[t]={definition:e,Zc:n},delete r[t],a||n?s.notifySubscribers(e):f.Y.Wa(function(){s.notifySubscribers(e)})}),a=!0)}function i(e,t){n("getConfig",[e],function(i){i?n("loadComponent",[e,i],function(e){t(e,i)}):t(null,null)})}function n(t,i,r,o){o||(o=f.g.loaders.slice(0));var a=o.shift();if(a){var s=a[t];if(s){var l=!1;if(s.apply(a,i.concat(function(e){l?r(null):null!==e?r(e):n(t,i,r,o)}))!==e&&(l=!0,!a.suppressLoaderExceptions))throw Error("Component loaders must supply values by invoking the callback, not by returning values synchronously.")}else n(t,i,r,o)}else r(null)}var r={},o={};f.g={get:function(i,n){var r=o.hasOwnProperty(i)?o[i]:e;r?r.Zc?f.l.w(function(){n(r.definition)}):f.Y.Wa(function(){n(r.definition)}):t(i,n)},Xb:function(e){delete o[e]},Jb:n},f.g.loaders=[],f.b("components",f.g),f.b("components.get",f.g.get),f.b("components.clearCachedDefinition",f.g.Xb)}(),function(){function e(e,t,i,n){function r(){0===--s&&n(o)}var o={},s=2,l=i.template;i=i.viewModel,l?a(t,l,function(t){f.g.Jb("loadTemplate",[e,t],function(e){o.template=e,r()})}):r(),i?a(t,i,function(t){f.g.Jb("loadViewModel",[e,t],function(e){o[c]=e,r()})}):r()}function n(e,t,i){if("function"==typeof t)i(function(e){return new t(e)});else if("function"==typeof t[c])i(t[c]);else if("instance"in t){var r=t.instance;i(function(){return r})}else"viewModel"in t?n(e,t.viewModel,i):e("Unknown viewModel value: "+t)}function r(e){switch(f.a.A(e)){case"script":return f.a.ma(e.text);case"textarea":return f.a.ma(e.value);case"template":if(o(e.content))return f.a.ua(e.content.childNodes)}return f.a.ua(e.childNodes)}function o(e){return t.DocumentFragment?e instanceof DocumentFragment:e&&11===e.nodeType}function a(e,i,n){"string"==typeof i.require?s||t.require?(s||t.require)([i.require],n):e("Uses require, but no AMD loader is present"):n(i)}function l(e){return function(t){throw Error("Component '"+e+"': "+t)}}var u={};f.g.register=function(e,t){if(!t)throw Error("Invalid configuration for "+e);if(f.g.ub(e))throw Error("Component "+e+" is already registered");u[e]=t},f.g.ub=function(e){return u.hasOwnProperty(e)},f.g.od=function(e){delete u[e],f.g.Xb(e)},f.g.Zb={getConfig:function(e,t){t(u.hasOwnProperty(e)?u[e]:null)},loadComponent:function(t,i,n){var r=l(t);a(r,i,function(i){e(t,r,i,n)})},loadTemplate:function(e,n,a){if(e=l(e),"string"==typeof n)a(f.a.ma(n));else if(n instanceof Array)a(n);else if(o(n))a(f.a.V(n.childNodes));else if(n.element)if(n=n.element,t.HTMLElement?n instanceof HTMLElement:n&&n.tagName&&1===n.nodeType)a(r(n));else if("string"==typeof n){var s=i.getElementById(n);s?a(r(s)):e("Cannot find element with ID "+n)}else e("Unknown element type: "+n);else e("Unknown template value: "+n)},loadViewModel:function(e,t,i){n(l(e),t,i)}};var c="createViewModel";f.b("components.register",f.g.register),f.b("components.isRegistered",f.g.ub),f.b("components.unregister",f.g.od),f.b("components.defaultLoader",f.g.Zb),f.g.loaders.push(f.g.Zb),f.g.Bc=u}(),function(){function e(e,i){var n=e.getAttribute("params");if(n){var n=t.parseBindingsString(n,i,e,{valueAccessors:!0,bindingParams:!0}),n=f.a.Ca(n,function(t){return f.m(t,null,{i:e})}),r=f.a.Ca(n,function(t){var i=t.t();return t.ba()?f.m({read:function(){return f.a.c(t())},write:f.Ba(i)&&function(e){t()(e)},i:e}):i});return r.hasOwnProperty("$raw")||(r.$raw=n),r}return{$raw:{}}}f.g.getComponentNameForNode=function(e){var t=f.a.A(e);return f.g.ub(t)&&(-1!=t.indexOf("-")||"[object HTMLUnknownElement]"==""+e||8>=f.a.C&&e.tagName===t)?t:void 0},f.g.Ob=function(t,i,n,r){if(1===i.nodeType){var o=f.g.getComponentNameForNode(i);if(o){if(t=t||{},t.component)throw Error('Cannot use the "component" binding on a custom element matching a component');var a={name:o,params:e(i,n)};t.component=r?function(){return a}:a}}return t};var t=new f.Q;9>f.a.C&&(f.g.register=function(e){return function(t){return i.createElement(t),e.apply(this,arguments)}}(f.g.register),i.createDocumentFragment=function(e){return function(){var t,i=e(),n=f.g.Bc;for(t in n)n.hasOwnProperty(t)&&i.createElement(t);return i}}(i.createDocumentFragment))}(),function(e){function t(e,t,i){if(t=t.template,!t)throw Error("Component '"+e+"' has no template");e=f.a.ua(t),f.f.da(i,e)}function i(e,t,i,n){var r=e.createViewModel;return r?r.call(e,n,{element:t,templateNodes:i}):n}var n=0;f.d.component={init:function(r,o,a,s,l){function u(){var e=c&&c.dispose;"function"==typeof e&&e.call(c),h=c=null}var c,h,d=f.a.V(f.f.childNodes(r));return f.a.F.oa(r,u),f.m(function(){var a,s,p=f.a.c(o());if("string"==typeof p?a=p:(a=f.a.c(p.name),s=f.a.c(p.params)),!a)throw Error("No component name specified");var m=h=++n;f.g.get(a,function(n){if(h===m){if(u(),!n)throw Error("Unknown component '"+a+"'");t(a,n,r);var o=i(n,r,d,s);n=l.createChildContext(o,e,function(e){e.$component=o,e.$componentTemplateNodes=d}),c=o,f.eb(n,r)}})},null,{i:r}),{controlsDescendantBindings:!0}}},f.f.Z.component=!0}();var A={"class":"className","for":"htmlFor"};f.d.attr={update:function(t,i){var n=f.a.c(i())||{};f.a.D(n,function(i,n){n=f.a.c(n);var r=!1===n||null===n||n===e;r&&t.removeAttribute(i),8>=f.a.C&&i in A?(i=A[i],r?t.removeAttribute(i):t[i]=n):r||t.setAttribute(i,n.toString()),"name"===i&&f.a.rc(t,r?"":n.toString())})}},function(){f.d.checked={after:["value","attr"],init:function(t,i,n){function r(){var e=t.checked,r=p?a():e;if(!f.va.Sa()&&(!l||e)){var o=f.l.w(i);if(c){var s=h?o.t():o;d!==r?(e&&(f.a.pa(s,r,!0),f.a.pa(s,d,!1)),d=r):f.a.pa(s,r,e),h&&f.Ba(o)&&o(s)}else f.h.Ea(o,n,"checked",r,!0); +}}function o(){var e=f.a.c(i());t.checked=c?0<=f.a.o(e,a()):s?e:a()===e}var a=f.nc(function(){return n.has("checkedValue")?f.a.c(n.get("checkedValue")):n.has("value")?f.a.c(n.get("value")):t.value}),s="checkbox"==t.type,l="radio"==t.type;if(s||l){var u=i(),c=s&&f.a.c(u)instanceof Array,h=!(c&&u.push&&u.splice),d=c?a():e,p=l||c;l&&!t.name&&f.d.uniqueName.init(t,function(){return!0}),f.m(r,null,{i:t}),f.a.p(t,"click",r),f.m(o,null,{i:t}),u=e}}},f.h.ea.checked=!0,f.d.checkedValue={update:function(e,t){e.value=f.a.c(t())}}}(),f.d.css={update:function(e,t){var i=f.a.c(t());null!==i&&"object"==typeof i?f.a.D(i,function(t,i){i=f.a.c(i),f.a.bb(e,t,i)}):(i=f.a.$a(String(i||"")),f.a.bb(e,e.__ko__cssValue,!1),e.__ko__cssValue=i,f.a.bb(e,i,!0))}},f.d.enable={update:function(e,t){var i=f.a.c(t());i&&e.disabled?e.removeAttribute("disabled"):i||e.disabled||(e.disabled=!0)}},f.d.disable={update:function(e,t){f.d.enable.update(e,function(){return!f.a.c(t())})}},f.d.event={init:function(e,t,i,n,r){var o=t()||{};f.a.D(o,function(o){"string"==typeof o&&f.a.p(e,o,function(e){var a,s=t()[o];if(s){try{var l=f.a.V(arguments);n=r.$data,l.unshift(n),a=s.apply(n,l)}finally{!0!==a&&(e.preventDefault?e.preventDefault():e.returnValue=!1)}!1===i.get(o+"Bubble")&&(e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation())}})})}},f.d.foreach={ic:function(e){return function(){var t=e(),i=f.a.zb(t);return i&&"number"!=typeof i.length?(f.a.c(t),{foreach:i.data,as:i.as,includeDestroyed:i.includeDestroyed,afterAdd:i.afterAdd,beforeRemove:i.beforeRemove,afterRender:i.afterRender,beforeMove:i.beforeMove,afterMove:i.afterMove,templateEngine:f.W.sb}):{foreach:t,templateEngine:f.W.sb}}},init:function(e,t){return f.d.template.init(e,f.d.foreach.ic(t))},update:function(e,t,i,n,r){return f.d.template.update(e,f.d.foreach.ic(t),i,n,r)}},f.h.ta.foreach=!1,f.f.Z.foreach=!0,f.d.hasfocus={init:function(e,t,i){function n(n){e.__ko_hasfocusUpdating=!0;var r=e.ownerDocument;if("activeElement"in r){var o;try{o=r.activeElement}catch(a){o=r.body}n=o===e}r=t(),f.h.Ea(r,i,"hasfocus",n,!0),e.__ko_hasfocusLastValue=n,e.__ko_hasfocusUpdating=!1}var r=n.bind(null,!0),o=n.bind(null,!1);f.a.p(e,"focus",r),f.a.p(e,"focusin",r),f.a.p(e,"blur",o),f.a.p(e,"focusout",o)},update:function(e,t){var i=!!f.a.c(t());e.__ko_hasfocusUpdating||e.__ko_hasfocusLastValue===i||(i?e.focus():e.blur(),!i&&e.__ko_hasfocusLastValue&&e.ownerDocument.body.focus(),f.l.w(f.a.Da,null,[e,i?"focusin":"focusout"]))}},f.h.ea.hasfocus=!0,f.d.hasFocus=f.d.hasfocus,f.h.ea.hasFocus=!0,f.d.html={init:function(){return{controlsDescendantBindings:!0}},update:function(e,t){f.a.Cb(e,t())}},m("if"),m("ifnot",!1,!0),m("with",!0,!1,function(e,t){return e.createChildContext(t)});var P={};f.d.options={init:function(e){if("select"!==f.a.A(e))throw Error("options binding applies only to SELECT elements");for(;0<e.length;)e.remove(0);return{controlsDescendantBindings:!0}},update:function(t,i,n){function r(){return f.a.Ka(t.options,function(e){return e.selected})}function o(e,t,i){var n=typeof t;return"function"==n?t(e):"string"==n?e[t]:i}function a(e,i){if(m&&c)f.j.ha(t,f.a.c(n.get("value")),!0);else if(p.length){var r=0<=f.a.o(p,f.j.u(i[0]));f.a.sc(i[0],r),m&&!r&&f.l.w(f.a.Da,null,[t,"change"])}}var s=t.multiple,l=0!=t.length&&s?t.scrollTop:null,u=f.a.c(i()),c=n.get("valueAllowUnset")&&n.has("value"),h=n.get("optionsIncludeDestroyed");i={};var d,p=[];c||(s?p=f.a.fb(r(),f.j.u):0<=t.selectedIndex&&p.push(f.j.u(t.options[t.selectedIndex]))),u&&("undefined"==typeof u.length&&(u=[u]),d=f.a.Ka(u,function(t){return h||t===e||null===t||!f.a.c(t._destroy)}),n.has("optionsCaption")&&(u=f.a.c(n.get("optionsCaption")),null!==u&&u!==e&&d.unshift(P)));var m=!1;i.beforeRemove=function(e){t.removeChild(e)},u=a,n.has("optionsAfterRender")&&"function"==typeof n.get("optionsAfterRender")&&(u=function(t,i){a(0,i),f.l.w(n.get("optionsAfterRender"),null,[i[0],t!==P?t:e])}),f.a.Bb(t,d,function(i,r,a){return a.length&&(p=!c&&a[0].selected?[f.j.u(a[0])]:[],m=!0),r=t.ownerDocument.createElement("option"),i===P?(f.a.Za(r,n.get("optionsCaption")),f.j.ha(r,e)):(a=o(i,n.get("optionsValue"),i),f.j.ha(r,f.a.c(a)),i=o(i,n.get("optionsText"),a),f.a.Za(r,i)),[r]},i,u),f.l.w(function(){c?f.j.ha(t,f.a.c(n.get("value")),!0):(s?p.length&&r().length<p.length:p.length&&0<=t.selectedIndex?f.j.u(t.options[t.selectedIndex])!==p[0]:p.length||0<=t.selectedIndex)&&f.a.Da(t,"change")}),f.a.Nc(t),l&&20<Math.abs(l-t.scrollTop)&&(t.scrollTop=l)}},f.d.options.xb=f.a.e.I(),f.d.selectedOptions={after:["options","foreach"],init:function(e,t,i){f.a.p(e,"change",function(){var n=t(),r=[];f.a.q(e.getElementsByTagName("option"),function(e){e.selected&&r.push(f.j.u(e))}),f.h.Ea(n,i,"selectedOptions",r)})},update:function(e,t){if("select"!=f.a.A(e))throw Error("values binding applies only to SELECT elements");var i=f.a.c(t()),n=e.scrollTop;i&&"number"==typeof i.length&&f.a.q(e.getElementsByTagName("option"),function(e){var t=0<=f.a.o(i,f.j.u(e));e.selected!=t&&f.a.sc(e,t)}),e.scrollTop=n}},f.h.ea.selectedOptions=!0,f.d.style={update:function(t,i){var n=f.a.c(i()||{});f.a.D(n,function(i,n){n=f.a.c(n),(null===n||n===e||!1===n)&&(n=""),t.style[i]=n})}},f.d.submit={init:function(e,t,i,n,r){if("function"!=typeof t())throw Error("The value for a submit binding must be a function");f.a.p(e,"submit",function(i){var n,o=t();try{n=o.call(r.$data,e)}finally{!0!==n&&(i.preventDefault?i.preventDefault():i.returnValue=!1)}})}},f.d.text={init:function(){return{controlsDescendantBindings:!0}},update:function(e,t){f.a.Za(e,t())}},f.f.Z.text=!0,function(){if(t&&t.navigator)var i=function(e){return e?parseFloat(e[1]):void 0},n=t.opera&&t.opera.version&&parseInt(t.opera.version()),r=t.navigator.userAgent,o=i(r.match(/^(?:(?!chrome).)*version\/([^ ]*) safari/i)),a=i(r.match(/Firefox\/([^ ]*)/));if(10>f.a.C)var s=f.a.e.I(),l=f.a.e.I(),u=function(e){var t=this.activeElement;(t=t&&f.a.e.get(t,l))&&t(e)},c=function(e,t){var i=e.ownerDocument;f.a.e.get(i,s)||(f.a.e.set(i,s,!0),f.a.p(i,"selectionchange",u)),f.a.e.set(e,l,t)};f.d.textInput={init:function(t,i,r){function s(e,i){f.a.p(t,e,i)}function l(){var n=f.a.c(i());(null===n||n===e)&&(n=""),p!==e&&n===p?f.a.setTimeout(l,4):t.value!==n&&(m=n,t.value=n)}function u(){d||(p=t.value,d=f.a.setTimeout(h,4))}function h(){clearTimeout(d),p=d=e;var n=t.value;m!==n&&(m=n,f.h.Ea(i(),r,"textInput",n))}var d,p,m=t.value,g=9==f.a.C?u:h;10>f.a.C?(s("propertychange",function(e){"value"===e.propertyName&&g(e)}),8==f.a.C&&(s("keyup",h),s("keydown",h)),8<=f.a.C&&(c(t,g),s("dragend",u))):(s("input",h),5>o&&"textarea"===f.a.A(t)?(s("keydown",u),s("paste",u),s("cut",u)):11>n?s("keydown",u):4>a&&(s("DOMAutoComplete",h),s("dragdrop",h),s("drop",h))),s("change",h),f.m(l,null,{i:t})}},f.h.ea.textInput=!0,f.d.textinput={preprocess:function(e,t,i){i("textInput",e)}}}(),f.d.uniqueName={init:function(e,t){if(t()){var i="ko_unique_"+ ++f.d.uniqueName.Ic;f.a.rc(e,i)}}},f.d.uniqueName.Ic=0,f.d.value={after:["options","foreach"],init:function(e,t,i){if("input"!=e.tagName.toLowerCase()||"checkbox"!=e.type&&"radio"!=e.type){var n=["change"],r=i.get("valueUpdate"),o=!1,a=null;r&&("string"==typeof r&&(r=[r]),f.a.ra(n,r),n=f.a.Tb(n));var s=function(){a=null,o=!1;var n=t(),r=f.j.u(e);f.h.Ea(n,i,"value",r)};!f.a.C||"input"!=e.tagName.toLowerCase()||"text"!=e.type||"off"==e.autocomplete||e.form&&"off"==e.form.autocomplete||-1!=f.a.o(n,"propertychange")||(f.a.p(e,"propertychange",function(){o=!0}),f.a.p(e,"focus",function(){o=!1}),f.a.p(e,"blur",function(){o&&s()})),f.a.q(n,function(t){var i=s;f.a.nd(t,"after")&&(i=function(){a=f.j.u(e),f.a.setTimeout(s,0)},t=t.substring(5)),f.a.p(e,t,i)});var l=function(){var n=f.a.c(t()),r=f.j.u(e);if(null!==a&&n===a)f.a.setTimeout(l,0);else if(n!==r)if("select"===f.a.A(e)){var o=i.get("valueAllowUnset"),r=function(){f.j.ha(e,n,o)};r(),o||n===f.j.u(e)?f.a.setTimeout(r,0):f.l.w(f.a.Da,null,[e,"change"])}else f.j.ha(e,n)};f.m(l,null,{i:e})}else f.Ja(e,{checkedValue:t})},update:function(){}},f.h.ea.value=!0,f.d.visible={update:function(e,t){var i=f.a.c(t()),n="none"!=e.style.display;i&&!n?e.style.display="":!i&&n&&(e.style.display="none")}},function(e){f.d[e]={init:function(t,i,n,r,o){return f.d.event.init.call(this,t,function(){var t={};return t[e]=i(),t},n,r,o)}}}("click"),f.O=function(){},f.O.prototype.renderTemplateSource=function(){throw Error("Override renderTemplateSource")},f.O.prototype.createJavaScriptEvaluatorBlock=function(){throw Error("Override createJavaScriptEvaluatorBlock")},f.O.prototype.makeTemplateSource=function(e,t){if("string"==typeof e){t=t||i;var n=t.getElementById(e);if(!n)throw Error("Cannot find template with ID "+e);return new f.v.n(n)}if(1==e.nodeType||8==e.nodeType)return new f.v.qa(e);throw Error("Unknown template type: "+e)},f.O.prototype.renderTemplate=function(e,t,i,n){return e=this.makeTemplateSource(e,n),this.renderTemplateSource(e,t,i,n)},f.O.prototype.isTemplateRewritten=function(e,t){return!1===this.allowTemplateRewriting?!0:this.makeTemplateSource(e,t).data("isRewritten")},f.O.prototype.rewriteTemplate=function(e,t,i){e=this.makeTemplateSource(e,i),t=t(e.text()),e.text(t),e.data("isRewritten",!0)},f.b("templateEngine",f.O),f.Gb=function(){function e(e,t,i,n){e=f.h.yb(e);for(var r=f.h.ta,o=0;o<e.length;o++){var a=e[o].key;if(r.hasOwnProperty(a)){var s=r[a];if("function"==typeof s){if(a=s(e[o].value))throw Error(a)}else if(!s)throw Error("This template engine does not support the '"+a+"' binding within its templates")}}return i="ko.__tr_ambtns(function($context,$element){return(function(){return{ "+f.h.Ua(e,{valueAccessors:!0})+" } })()},'"+i.toLowerCase()+"')",n.createJavaScriptEvaluatorBlock(i)+t}var t=/(<([a-z]+\d*)(?:\s+(?!data-bind\s*=\s*)[a-z0-9\-]+(?:=(?:\"[^\"]*\"|\'[^\']*\'|[^>]*))?)*\s+)data-bind\s*=\s*(["'])([\s\S]*?)\3/gi,i=/\x3c!--\s*ko\b\s*([\s\S]*?)\s*--\x3e/g;return{Oc:function(e,t,i){t.isTemplateRewritten(e,i)||t.rewriteTemplate(e,function(e){return f.Gb.dd(e,t)},i)},dd:function(n,r){return n.replace(t,function(t,i,n,o,a){return e(a,i,n,r)}).replace(i,function(t,i){return e(i,"<!-- ko -->","#comment",r)})},Ec:function(e,t){return f.M.wb(function(i,n){var r=i.nextSibling;r&&r.nodeName.toLowerCase()===t&&f.Ja(r,e,n)})}}}(),f.b("__tr_ambtns",f.Gb.Ec),function(){f.v={},f.v.n=function(e){if(this.n=e){var t=f.a.A(e);this.ab="script"===t?1:"textarea"===t?2:"template"==t&&e.content&&11===e.content.nodeType?3:4}},f.v.n.prototype.text=function(){var e=1===this.ab?"text":2===this.ab?"value":"innerHTML";if(0==arguments.length)return this.n[e];var t=arguments[0];"innerHTML"===e?f.a.Cb(this.n,t):this.n[e]=t};var t=f.a.e.I()+"_";f.v.n.prototype.data=function(e){return 1===arguments.length?f.a.e.get(this.n,t+e):void f.a.e.set(this.n,t+e,arguments[1])};var i=f.a.e.I();f.v.n.prototype.nodes=function(){var t=this.n;return 0==arguments.length?(f.a.e.get(t,i)||{}).jb||(3===this.ab?t.content:4===this.ab?t:e):void f.a.e.set(t,i,{jb:arguments[0]})},f.v.qa=function(e){this.n=e},f.v.qa.prototype=new f.v.n,f.v.qa.prototype.text=function(){if(0==arguments.length){var t=f.a.e.get(this.n,i)||{};return t.Hb===e&&t.jb&&(t.Hb=t.jb.innerHTML),t.Hb}f.a.e.set(this.n,i,{Hb:arguments[0]})},f.b("templateSources",f.v),f.b("templateSources.domElement",f.v.n),f.b("templateSources.anonymousTemplate",f.v.qa)}(),function(){function t(e,t,i){var n;for(t=f.f.nextSibling(t);e&&(n=e)!==t;)e=f.f.nextSibling(n),i(n,e)}function i(e,i){if(e.length){var n=e[0],r=e[e.length-1],o=n.parentNode,a=f.Q.instance,s=a.preprocessNode;if(s){if(t(n,r,function(e,t){var i=e.previousSibling,o=s.call(a,e);o&&(e===n&&(n=o[0]||t),e===r&&(r=o[o.length-1]||i))}),e.length=0,!n)return;n===r?e.push(n):(e.push(n,r),f.a.za(e,o))}t(n,r,function(e){1!==e.nodeType&&8!==e.nodeType||f.Rb(i,e)}),t(n,r,function(e){1!==e.nodeType&&8!==e.nodeType||f.M.yc(e,[i])}),f.a.za(e,o)}}function n(e){return e.nodeType?e:0<e.length?e[0]:null}function r(e,t,r,o,s){s=s||{};var l=(e&&n(e)||r||{}).ownerDocument,u=s.templateEngine||a;if(f.Gb.Oc(r,u,l),r=u.renderTemplate(r,o,s,l),"number"!=typeof r.length||0<r.length&&"number"!=typeof r[0].nodeType)throw Error("Template engine must return an array of DOM nodes");switch(l=!1,t){case"replaceChildren":f.f.da(e,r),l=!0;break;case"replaceNode":f.a.qc(e,r),l=!0;break;case"ignoreTargetNode":break;default:throw Error("Unknown renderMode: "+t)}return l&&(i(r,o),s.afterRender&&f.l.w(s.afterRender,null,[r,o.$data])),r}function o(e,t,i){return f.H(e)?e():"function"==typeof e?e(t,i):e}var a;f.Db=function(t){if(t!=e&&!(t instanceof f.O))throw Error("templateEngine must inherit from ko.templateEngine");a=t},f.Ab=function(t,i,s,l,u){if(s=s||{},(s.templateEngine||a)==e)throw Error("Set a template engine before calling renderTemplate");if(u=u||"replaceChildren",l){var c=n(l);return f.B(function(){var e=i&&i instanceof f.U?i:new f.U(f.a.c(i)),a=o(t,e.$data,e),e=r(l,u,a,e,s);"replaceNode"==u&&(l=e,c=n(l))},null,{wa:function(){return!c||!f.a.nb(c)},i:c&&"replaceNode"==u?c.parentNode:c})}return f.M.wb(function(e){f.Ab(t,i,s,e,"replaceNode")})},f.kd=function(t,n,a,s,l){function u(e,t){i(t,h),a.afterRender&&a.afterRender(t,e),h=null}function c(e,i){h=l.createChildContext(e,a.as,function(e){e.$index=i});var n=o(t,e,h);return r(null,"ignoreTargetNode",n,h,a)}var h;return f.B(function(){var t=f.a.c(n)||[];"undefined"==typeof t.length&&(t=[t]),t=f.a.Ka(t,function(t){return a.includeDestroyed||t===e||null===t||!f.a.c(t._destroy)}),f.l.w(f.a.Bb,null,[s,t,c,a,u])},null,{i:s})};var s=f.a.e.I();f.d.template={init:function(e,t){var i=f.a.c(t());if("string"==typeof i||i.name)f.f.xa(e);else{if("nodes"in i){if(i=i.nodes||[],f.H(i))throw Error('The "nodes" option must be a plain, non-observable array.')}else i=f.f.childNodes(e);i=f.a.jc(i),new f.v.qa(e).nodes(i)}return{controlsDescendantBindings:!0}},update:function(t,i,n,r,o){var a,l=i();i=f.a.c(l),n=!0,r=null,"string"==typeof i?i={}:(l=i.name,"if"in i&&(n=f.a.c(i["if"])),n&&"ifnot"in i&&(n=!f.a.c(i.ifnot)),a=f.a.c(i.data)),"foreach"in i?r=f.kd(l||t,n&&i.foreach||[],i,t,o):n?(o="data"in i?o.createChildContext(a,i.as):o,r=f.Ab(l||t,o,i,t)):f.f.xa(t),o=r,(a=f.a.e.get(t,s))&&"function"==typeof a.k&&a.k(),f.a.e.set(t,s,o&&o.ba()?o:e)}},f.h.ta.template=function(e){return e=f.h.yb(e),1==e.length&&e[0].unknown||f.h.ad(e,"name")?null:"This template engine does not support anonymous templates nested within its templates"},f.f.Z.template=!0}(),f.b("setTemplateEngine",f.Db),f.b("renderTemplate",f.Ab),f.a.dc=function(e,t,i){if(e.length&&t.length){var n,r,o,a,s;for(n=r=0;(!i||i>n)&&(a=e[r]);++r){for(o=0;s=t[o];++o)if(a.value===s.value){a.moved=s.index,s.moved=a.index,t.splice(o,1),n=o=0;break}n+=o}}},f.a.ib=function(){function e(e,t,i,n,r){var o,a,s,l,u,c=Math.min,h=Math.max,d=[],p=e.length,m=t.length,g=m-p||1,v=p+m+1;for(o=0;p>=o;o++)for(l=s,d.push(s=[]),u=c(m,o+g),a=h(0,o-1);u>=a;a++)s[a]=a?o?e[o-1]===t[a-1]?l[a-1]:c(l[a]||v,s[a-1]||v)+1:a+1:o+1;for(c=[],h=[],g=[],o=p,a=m;o||a;)m=d[o][a]-1,a&&m===d[o][a-1]?h.push(c[c.length]={status:i,value:t[--a],index:a}):o&&m===d[o-1][a]?g.push(c[c.length]={status:n,value:e[--o],index:o}):(--a,--o,r.sparse||c.push({status:"retained",value:t[a]}));return f.a.dc(g,h,!r.dontLimitMoves&&10*p),c.reverse()}return function(t,i,n){return n="boolean"==typeof n?{dontLimitMoves:n}:n||{},t=t||[],i=i||[],t.length<i.length?e(t,i,"added","deleted",n):e(i,t,"deleted","added",n)}}(),f.b("utils.compareArrays",f.a.ib),function(){function t(t,i,n,r,o){var a=[],s=f.B(function(){var e=i(n,o,f.a.za(a,t))||[];0<a.length&&(f.a.qc(a,e),r&&f.l.w(r,null,[n,e,o])),a.length=0,f.a.ra(a,e)},null,{i:t,wa:function(){return!f.a.Qb(a)}});return{ca:a,B:s.ba()?s:e}}var i=f.a.e.I(),n=f.a.e.I();f.a.Bb=function(r,o,a,s,l){function u(e,t){w=d[t],_!==t&&(S[e]=w),w.qb(_++),f.a.za(w.ca,r),g.push(w),C.push(w)}function c(e,t){if(e)for(var i=0,n=t.length;n>i;i++)t[i]&&f.a.q(t[i].ca,function(n){e(n,i,t[i].ja)})}o=o||[],s=s||{};var h=f.a.e.get(r,i)===e,d=f.a.e.get(r,i)||[],p=f.a.fb(d,function(e){return e.ja}),m=f.a.ib(p,o,s.dontLimitMoves),g=[],v=0,_=0,y=[],C=[];o=[];for(var w,E,b,S=[],p=[],T=0;E=m[T];T++)switch(b=E.moved,E.status){case"deleted":b===e&&(w=d[v],w.B&&(w.B.k(),w.B=e),f.a.za(w.ca,r).length&&(s.beforeRemove&&(g.push(w),C.push(w),w.ja===n?w=null:o[T]=w),w&&y.push.apply(y,w.ca))),v++;break;case"retained":u(T,v++);break;case"added":b!==e?u(T,b):(w={ja:E.value,qb:f.N(_++)},g.push(w),C.push(w),h||(p[T]=w))}f.a.e.set(r,i,g),c(s.beforeMove,S),f.a.q(y,s.beforeRemove?f.$:f.removeNode);for(var x,T=0,h=f.f.firstChild(r);w=C[T];T++){for(w.ca||f.a.extend(w,t(r,a,w.ja,l,w.qb)),v=0;m=w.ca[v];h=m.nextSibling,x=m,v++)m!==h&&f.f.gc(r,m,x);!w.Wc&&l&&(l(w.ja,w.ca,w.qb),w.Wc=!0)}for(c(s.beforeRemove,o),T=0;T<o.length;++T)o[T]&&(o[T].ja=n);c(s.afterMove,S),c(s.afterAdd,p)}}(),f.b("utils.setDomNodeChildrenFromArrayMapping",f.a.Bb),f.W=function(){this.allowTemplateRewriting=!1},f.W.prototype=new f.O,f.W.prototype.renderTemplateSource=function(e,t,i,n){return(t=(9>f.a.C?0:e.nodes)?e.nodes():null)?f.a.V(t.cloneNode(!0).childNodes):(e=e.text(),f.a.ma(e,n))},f.W.sb=new f.W,f.Db(f.W.sb),f.b("nativeTemplateEngine",f.W),function(){f.vb=function(){var e=this.$c=function(){if(!r||!r.tmpl)return 0;try{if(0<=r.tmpl.tag.tmpl.open.toString().indexOf("__"))return 2}catch(e){}return 1}();this.renderTemplateSource=function(t,n,o,a){if(a=a||i,o=o||{},2>e)throw Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later.");var s=t.data("precompiled");return s||(s=t.text()||"",s=r.template(null,"{{ko_with $item.koBindingContext}}"+s+"{{/ko_with}}"),t.data("precompiled",s)),t=[n.$data],n=r.extend({koBindingContext:n},o.templateOptions),n=r.tmpl(s,t,n),n.appendTo(a.createElement("div")),r.fragments={},n},this.createJavaScriptEvaluatorBlock=function(e){return"{{ko_code ((function() { return "+e+" })()) }}"},this.addTemplate=function(e,t){i.write("<script type='text/html' id='"+e+"'>"+t+"</script>")},e>0&&(r.tmpl.tag.ko_code={open:"__.push($1 || '');"},r.tmpl.tag.ko_with={open:"with($1) {",close:"} "})},f.vb.prototype=new f.O;var e=new f.vb;0<e.$c&&f.Db(e),f.b("jqueryTmplTemplateEngine",f.vb)}()})}()}(),define("Cesium/ThirdParty/knockout-es5",[],function(){"use strict";function e(e,i){if(!e)throw new Error("When calling ko.track, you must pass an object as the first parameter.");var r=this,o=t(e,!0);return i=i||Object.getOwnPropertyNames(e),i.forEach(function(t){if(t!==h&&t!==d&&!(t in o)){var i=e[t],a=i instanceof Array,s=r.isObservable(i)?i:a?r.observableArray(i):r.observable(i);Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:s,set:r.isWriteableObservable(s)?s:void 0}),o[t]=s,a&&n(r,s)}}),e}function t(e,t){var i=e[h];return!i&&t&&(i={},Object.defineProperty(e,h,{value:i})),i}function i(t,i,n){var r=this,o={owner:t,deferEvaluation:!0};if("function"==typeof n)o.read=n;else{if("value"in n)throw new Error('For ko.defineProperty, you must not specify a "value" for the property. You must provide a "get" function.');if("function"!=typeof n.get)throw new Error('For ko.defineProperty, the third parameter must be either an evaluator function, or an options object containing a function called "get".');o.read=n.get,o.write=n.set}return t[i]=r.computed(o),e.call(r,t,[i]),t}function n(e,t){var i=null;e.computed(function(){i&&(i.dispose(),i=null);var n=t();n instanceof Array&&(i=r(e,t,n))})}function r(e,t,i){var n=o(e,i);return n.subscribe(t)}function o(e,t){var i=t[d];if(!i){i=new e.subscribable,Object.defineProperty(t,d,{value:i});var n={};a(t,i,n),s(e,t,i,n)}return i}function a(e,t,i){["pop","push","reverse","shift","sort","splice","unshift"].forEach(function(n){var r=e[n];e[n]=function(){var e=r.apply(this,arguments);return i.pause!==!0&&t.notifySubscribers(this),e}})}function s(e,t,i,n){["remove","removeAll","destroy","destroyAll","replace"].forEach(function(r){Object.defineProperty(t,r,{enumerable:!1,value:function(){var o;n.pause=!0;try{o=e.observableArray.fn[r].apply(e.observableArray(t),arguments)}finally{n.pause=!1}return i.notifySubscribers(t),o}})})}function l(e,i){if(!e)return null;var n=t(e,!1);return n&&n[i]||null}function u(e,t){var i=l(e,t);i&&i.valueHasMutated()}function c(t){t.track=e,t.getObservable=l,t.valueHasMutated=u,t.defineProperty=i}var h="__knockoutObservables",d="__knockoutSubscribable";return{attachToKo:c}}),define("Cesium/Widgets/SvgPathBindingHandler",[],function(){"use strict";var e="http://www.w3.org/2000/svg",t="cesium-svgPath-svg",i={register:function(i){i.bindingHandlers.cesiumSvgPath={init:function(n,r){var o=document.createElementNS(e,"svg:svg");o.setAttribute("class",t);var a=document.createElementNS(e,"path");return o.appendChild(a),i.virtualElements.setDomNodeChildren(n,[o]),i.computed({read:function(){var e=i.unwrap(r());a.setAttribute("d",i.unwrap(e.path));var n=i.unwrap(e.width),s=i.unwrap(e.height);o.setAttribute("width",n),o.setAttribute("height",s),o.setAttribute("viewBox","0 0 "+n+" "+s),e.css&&o.setAttribute("class",t+" "+i.unwrap(e.css))},disposeWhenNodeIsRemoved:n}),{controlsDescendantBindings:!0}}},i.virtualElements.allowedBindings.cesiumSvgPath=!0}};return i}),define("Cesium/ThirdParty/knockout",["./knockout-3.4.0","./knockout-es5","../Widgets/SvgPathBindingHandler"],function(e,t,i){"use strict";return t.attachToKo(e),i.register(e),e}),define("Cesium/ThirdParty/NoSleep",[],function(){"use strict";function e(e,t,i){var n=document.createElement("source");n.src=i,n.type="video/"+t,e.appendChild(n)}var t={Android:"undefined"!=typeof navigator&&/Android/gi.test(navigator.userAgent),iOS:"undefined"!=typeof navigator&&/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent)},i={WebM:"data:video/webm;base64,GkXfo0AgQoaBAUL3gQFC8oEEQvOBCEKCQAR3ZWJtQoeBAkKFgQIYU4BnQI0VSalmQCgq17FAAw9CQE2AQAZ3aGFtbXlXQUAGd2hhbW15RIlACECPQAAAAAAAFlSua0AxrkAu14EBY8WBAZyBACK1nEADdW5khkAFVl9WUDglhohAA1ZQOIOBAeBABrCBCLqBCB9DtnVAIueBAKNAHIEAAIAwAQCdASoIAAgAAUAmJaQAA3AA/vz0AAA=",MP4:"data:video/mp4;base64,AAAAHGZ0eXBpc29tAAACAGlzb21pc28ybXA0MQAAAAhmcmVlAAAAG21kYXQAAAGzABAHAAABthADAowdbb9/AAAC6W1vb3YAAABsbXZoZAAAAAB8JbCAfCWwgAAAA+gAAAAAAAEAAAEAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAIVdHJhawAAAFx0a2hkAAAAD3wlsIB8JbCAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAQAAAAAAIAAAACAAAAAABsW1kaWEAAAAgbWRoZAAAAAB8JbCAfCWwgAAAA+gAAAAAVcQAAAAAAC1oZGxyAAAAAAAAAAB2aWRlAAAAAAAAAAAAAAAAVmlkZW9IYW5kbGVyAAAAAVxtaW5mAAAAFHZtaGQAAAABAAAAAAAAAAAAAAAkZGluZgAAABxkcmVmAAAAAAAAAAEAAAAMdXJsIAAAAAEAAAEcc3RibAAAALhzdHNkAAAAAAAAAAEAAACobXA0dgAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAIAAgASAAAAEgAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABj//wAAAFJlc2RzAAAAAANEAAEABDwgEQAAAAADDUAAAAAABS0AAAGwAQAAAbWJEwAAAQAAAAEgAMSNiB9FAEQBFGMAAAGyTGF2YzUyLjg3LjQGAQIAAAAYc3R0cwAAAAAAAAABAAAAAQAAAAAAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAEAAAABAAAAFHN0c3oAAAAAAAAAEwAAAAEAAAAUc3RjbwAAAAAAAAABAAAALAAAAGB1ZHRhAAAAWG1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAAK2lsc3QAAAAjqXRvbwAAABtkYXRhAAAAAQAAAABMYXZmNTIuNzguMw=="},n=function(){return t.iOS?this.noSleepTimer=null:t.Android&&(this.noSleepVideo=document.createElement("video"),this.noSleepVideo.setAttribute("loop",""),e(this.noSleepVideo,"webm",i.WebM),e(this.noSleepVideo,"mp4",i.MP4)),this};return n.prototype.enable=function(e){t.iOS?(this.disable(),this.noSleepTimer=window.setInterval(function(){window.location=window.location,window.setTimeout(window.stop,0)},e||15e3)):t.Android&&this.noSleepVideo.play()},n.prototype.disable=function(){t.iOS?this.noSleepTimer&&(window.clearInterval(this.noSleepTimer),this.noSleepTimer=null):t.Android&&this.noSleepVideo.pause()},n}),define("Cesium/Widgets/subscribeAndEvaluate",["../ThirdParty/knockout"],function(e){"use strict";function t(t,i,n,r,o){return n.call(r,t[i]),e.getObservable(t,i).subscribe(n,r,o)}return t}),define("Cesium/Widgets/Animation/Animation",["../../Core/Color","../../Core/defined","../../Core/defineProperties","../../Core/destroyObject","../../Core/DeveloperError","../getElement","../subscribeAndEvaluate"],function(e,t,i,n,r,o,a){"use strict";function s(t){return e.fromCssColorString(window.getComputedStyle(t).getPropertyValue("color"))}function l(e){var t=document.createElementNS(_,e.tagName);for(var i in e)if(e.hasOwnProperty(i)&&"tagName"!==i)if("children"===i){var n,r=e.children.length;for(n=0;r>n;++n)t.appendChild(l(e.children[n]))}else 0===i.indexOf("xlink:")?t.setAttributeNS(y,i.substring(6),e[i]):"textContent"===i?t.textContent=e[i]:t.setAttribute(i,e[i]);return t}function u(e,t,i){var n=document.createElementNS(_,"text");n.setAttribute("x",e),n.setAttribute("y",t),n.setAttribute("class","cesium-animation-svgText");var r=document.createElementNS(_,"tspan");return r.textContent=i,n.appendChild(r),n}function c(e,t,i){e.setAttribute("transform","translate(100,100) rotate("+i+")"),t.setAttribute("transform","rotate("+i+")")}function h(e,t){var i=t.alpha,n=1-i;return P.red=e.red*n+t.red*i,P.green=e.green*n+t.green*i,P.blue=e.blue*n+t.blue*i,P.toCssColorString()}function d(e,t,i){var n={tagName:"g","class":"cesium-animation-rectButton",transform:"translate("+e+","+t+")",children:[{tagName:"rect","class":"cesium-animation-buttonGlow",width:32,height:32,rx:2,ry:2},{tagName:"rect","class":"cesium-animation-buttonMain",width:32,height:32,rx:4,ry:4},{tagName:"use","class":"cesium-animation-buttonPath","xlink:href":i},{tagName:"title",textContent:""}]};return l(n)}function p(e,t,i){var n={tagName:"g","class":"cesium-animation-rectButton",transform:"translate("+e+","+t+")",children:[{tagName:"use","class":"cesium-animation-buttonGlow","xlink:href":"#animation_pathWingButton"},{tagName:"use","class":"cesium-animation-buttonMain","xlink:href":"#animation_pathWingButton"},{tagName:"use","class":"cesium-animation-buttonPath","xlink:href":i},{tagName:"title",textContent:""}]};return l(n)}function m(e,t){var i=e._viewModel,n=i.shuttleRingDragging;if(!n||v===e)if("mousedown"===t.type||n&&"mousemove"===t.type||"touchstart"===t.type&&1===t.touches.length||n&&"touchmove"===t.type&&1===t.touches.length){var r,o,a=e._centerX,s=e._centerY,l=e._svgNode,u=l.getBoundingClientRect();if("touchstart"===t.type||"touchmove"===t.type?(r=t.touches[0].clientX,o=t.touches[0].clientY):(r=t.clientX,o=t.clientY),!n&&(r>u.right||r<u.left||o<u.top||o>u.bottom))return;var c=e._shuttleRingPointer.getBoundingClientRect(),h=r-a-u.left,d=o-s-u.top,p=180*Math.atan2(d,h)/Math.PI+90;p>180&&(p-=360);var m=i.shuttleRingAngle;n||r<c.right&&r>c.left&&o>c.top&&o<c.bottom?(v=e,i.shuttleRingDragging=!0,i.shuttleRingAngle=p):m>p?i.slower():p>m&&i.faster(),t.preventDefault()}else e===v&&(v=void 0),i.shuttleRingDragging=!1}function f(e,t){this._viewModel=t,this.svgElement=e,this._enabled=void 0,this._toggled=void 0;var i=this;this._clickFunction=function(){var e=i._viewModel.command;e.canExecute&&e()},e.addEventListener("click",this._clickFunction,!0),this._subscriptions=[a(t,"toggled",this.setToggled,this),a(t,"tooltip",this.setTooltip,this),a(t.command,"canExecute",this.setEnabled,this)]}function g(e,t){function i(e){m(x,e)}e=o(e),this._viewModel=t,this._container=e,this._centerX=0,this._centerY=0,this._defsElement=void 0,this._svgNode=void 0,this._topG=void 0,this._lastHeight=void 0,this._lastWidth=void 0;var n=document.createElement("style");n.textContent=".cesium-animation-rectButton .cesium-animation-buttonGlow { filter: url(#animation_blurred); }.cesium-animation-rectButton .cesium-animation-buttonMain { fill: url(#animation_buttonNormal); }.cesium-animation-buttonToggled .cesium-animation-buttonMain { fill: url(#animation_buttonToggled); }.cesium-animation-rectButton:hover .cesium-animation-buttonMain { fill: url(#animation_buttonHovered); }.cesium-animation-buttonDisabled .cesium-animation-buttonMain { fill: url(#animation_buttonDisabled); }.cesium-animation-shuttleRingG .cesium-animation-shuttleRingSwoosh { fill: url(#animation_shuttleRingSwooshGradient); }.cesium-animation-shuttleRingG:hover .cesium-animation-shuttleRingSwoosh { fill: url(#animation_shuttleRingSwooshHovered); }.cesium-animation-shuttleRingPointer { fill: url(#animation_shuttleRingPointerGradient); }.cesium-animation-shuttleRingPausePointer { fill: url(#animation_shuttleRingPointerPaused); }.cesium-animation-knobOuter { fill: url(#animation_knobOuter); }.cesium-animation-knobInner { fill: url(#animation_knobInner); }",document.head.insertBefore(n,document.head.childNodes[0]);var r=document.createElement("div");r.className="cesium-animation-theme",r.innerHTML='<div class="cesium-animation-themeNormal"></div><div class="cesium-animation-themeHover"></div><div class="cesium-animation-themeSelect"></div><div class="cesium-animation-themeDisabled"></div><div class="cesium-animation-themeKnob"></div><div class="cesium-animation-themePointer"></div><div class="cesium-animation-themeSwoosh"></div><div class="cesium-animation-themeSwooshHover"></div>',this._theme=r,this._themeNormal=r.childNodes[0],this._themeHover=r.childNodes[1],this._themeSelect=r.childNodes[2],this._themeDisabled=r.childNodes[3],this._themeKnob=r.childNodes[4],this._themePointer=r.childNodes[5],this._themeSwoosh=r.childNodes[6],this._themeSwooshHover=r.childNodes[7];var s=document.createElementNS(_,"svg:svg");this._svgNode=s,s.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",y);var h=document.createElementNS(_,"g");this._topG=h,this._realtimeSVG=new f(p(3,4,"#animation_pathClock"),t.playRealtimeViewModel),this._playReverseSVG=new f(d(44,99,"#animation_pathPlayReverse"),t.playReverseViewModel),this._playForwardSVG=new f(d(124,99,"#animation_pathPlay"),t.playForwardViewModel),this._pauseSVG=new f(d(84,99,"#animation_pathPause"),t.pauseViewModel);var g=document.createElementNS(_,"g");g.appendChild(this._realtimeSVG.svgElement),g.appendChild(this._playReverseSVG.svgElement),g.appendChild(this._playForwardSVG.svgElement),g.appendChild(this._pauseSVG.svgElement);var v=l({tagName:"circle","class":"cesium-animation-shuttleRingBack",cx:100,cy:100,r:99});this._shuttleRingBackPanel=v;var C=l({tagName:"g","class":"cesium-animation-shuttleRingSwoosh",children:[{tagName:"use",transform:"translate(100,97) scale(-1,1)","xlink:href":"#animation_pathSwooshFX"},{tagName:"use",transform:"translate(100,97)","xlink:href":"#animation_pathSwooshFX"},{tagName:"line",x1:100,y1:8,x2:100,y2:22}]});this._shuttleRingSwooshG=C,this._shuttleRingPointer=l({tagName:"use","class":"cesium-animation-shuttleRingPointer","xlink:href":"#animation_pathPointer"});var w=l({tagName:"g",transform:"translate(100,100)"});this._knobOuter=l({tagName:"circle","class":"cesium-animation-knobOuter",cx:0,cy:0,r:71});var E=61,b=l({tagName:"circle","class":"cesium-animation-knobInner",cx:0,cy:0,r:E});this._knobDate=u(0,-24,""),this._knobTime=u(0,-7,""),this._knobStatus=u(0,-41,"");var S=l({tagName:"circle","class":"cesium-animation-blank",cx:0,cy:0,r:E}),T=document.createElementNS(_,"g");T.setAttribute("class","cesium-animation-shuttleRingG"),e.appendChild(r),h.appendChild(T),h.appendChild(w),h.appendChild(g),T.appendChild(v),T.appendChild(C),T.appendChild(this._shuttleRingPointer),w.appendChild(this._knobOuter),w.appendChild(b),w.appendChild(this._knobDate),w.appendChild(this._knobTime),w.appendChild(this._knobStatus),w.appendChild(S),s.appendChild(h),e.appendChild(s);var x=this;this._mouseCallback=i,v.addEventListener("mousedown",i,!0),v.addEventListener("touchstart",i,!0),C.addEventListener("mousedown",i,!0),C.addEventListener("touchstart",i,!0),document.addEventListener("mousemove",i,!0),document.addEventListener("touchmove",i,!0),document.addEventListener("mouseup",i,!0),document.addEventListener("touchend",i,!0),this._shuttleRingPointer.addEventListener("mousedown",i,!0),this._shuttleRingPointer.addEventListener("touchstart",i,!0),this._knobOuter.addEventListener("mousedown",i,!0),this._knobOuter.addEventListener("touchstart",i,!0);var A,P=this._knobTime.childNodes[0],M=this._knobDate.childNodes[0],D=this._knobStatus.childNodes[0];this._subscriptions=[a(t.pauseViewModel,"toggled",function(e){A!==e&&(A=e, +A?x._shuttleRingPointer.setAttribute("class","cesium-animation-shuttleRingPausePointer"):x._shuttleRingPointer.setAttribute("class","cesium-animation-shuttleRingPointer"))}),a(t,"shuttleRingAngle",function(e){c(x._shuttleRingPointer,x._knobOuter,e)}),a(t,"dateLabel",function(e){M.textContent!==e&&(M.textContent=e)}),a(t,"timeLabel",function(e){P.textContent!==e&&(P.textContent=e)}),a(t,"multiplierLabel",function(e){D.textContent!==e&&(D.textContent=e)})],this.applyThemeChanges(),this.resize()}var v,_="http://www.w3.org/2000/svg",y="http://www.w3.org/1999/xlink",C=e.fromCssColorString("rgba(247,250,255,0.384)"),w=e.fromCssColorString("rgba(143,191,255,0.216)"),E=e.fromCssColorString("rgba(153,197,255,0.098)"),b=e.fromCssColorString("rgba(255,255,255,0.086)"),S=e.fromCssColorString("rgba(255,255,255,0.267)"),T=e.fromCssColorString("rgba(255,255,255,0)"),x=e.fromCssColorString("rgba(66,67,68,0.3)"),A=e.fromCssColorString("rgba(0,0,0,0.5)"),P=new e;return f.prototype.destroy=function(){this.svgElement.removeEventListener("click",this._clickFunction,!0);for(var e=this._subscriptions,t=0,i=e.length;i>t;t++)e[t].dispose();n(this)},f.prototype.isDestroyed=function(){return!1},f.prototype.setEnabled=function(e){if(this._enabled!==e){if(this._enabled=e,!e)return void this.svgElement.setAttribute("class","cesium-animation-buttonDisabled");if(this._toggled)return void this.svgElement.setAttribute("class","cesium-animation-rectButton cesium-animation-buttonToggled");this.svgElement.setAttribute("class","cesium-animation-rectButton")}},f.prototype.setToggled=function(e){this._toggled!==e&&(this._toggled=e,this._enabled&&(e?this.svgElement.setAttribute("class","cesium-animation-rectButton cesium-animation-buttonToggled"):this.svgElement.setAttribute("class","cesium-animation-rectButton")))},f.prototype.setTooltip=function(e){this.svgElement.getElementsByTagName("title")[0].textContent=e},i(g.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),g.prototype.isDestroyed=function(){return!1},g.prototype.destroy=function(){var e=this._mouseCallback;this._shuttleRingBackPanel.removeEventListener("mousedown",e,!0),this._shuttleRingBackPanel.removeEventListener("touchstart",e,!0),this._shuttleRingSwooshG.removeEventListener("mousedown",e,!0),this._shuttleRingSwooshG.removeEventListener("touchstart",e,!0),document.removeEventListener("mousemove",e,!0),document.removeEventListener("touchmove",e,!0),document.removeEventListener("mouseup",e,!0),document.removeEventListener("touchend",e,!0),this._shuttleRingPointer.removeEventListener("mousedown",e,!0),this._shuttleRingPointer.removeEventListener("touchstart",e,!0),this._knobOuter.removeEventListener("mousedown",e,!0),this._knobOuter.removeEventListener("touchstart",e,!0),this._container.removeChild(this._svgNode),this._container.removeChild(this._theme),this._realtimeSVG.destroy(),this._playReverseSVG.destroy(),this._playForwardSVG.destroy(),this._pauseSVG.destroy();for(var t=this._subscriptions,i=0,r=t.length;r>i;i++)t[i].dispose();return n(this)},g.prototype.resize=function(){var e=this._container.clientWidth,t=this._container.clientHeight;if(e!==this._lastWidth||t!==this._lastHeight){var i=this._svgNode,n=200,r=132,o=e,a=t;0===e&&0===t?(o=n,a=r):0===e?(a=t,o=n*(t/r)):0===t&&(o=e,a=r*(e/n));var s=o/n,l=a/r;i.style.cssText="width: "+o+"px; height: "+a+"px; position: absolute; bottom: 0; left: 0; overflow: hidden;",i.setAttribute("width",o),i.setAttribute("height",a),i.setAttribute("viewBox","0 0 "+o+" "+a),this._topG.setAttribute("transform","scale("+s+","+l+")"),this._centerX=Math.max(1,100*s),this._centerY=Math.max(1,100*l),this._lastHeight=e,this._lastWidth=t}},g.prototype.applyThemeChanges=function(){var e=s(this._themeNormal),i=s(this._themeHover),n=s(this._themeSelect),r=s(this._themeDisabled),o=s(this._themeKnob),a=s(this._themePointer),u=s(this._themeSwoosh),c=s(this._themeSwooshHover),d=l({tagName:"defs",children:[{id:"animation_buttonNormal",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":h(e,C)},{tagName:"stop",offset:"12%","stop-color":h(e,w)},{tagName:"stop",offset:"46%","stop-color":h(e,E)},{tagName:"stop",offset:"81%","stop-color":h(e,b)}]},{id:"animation_buttonHovered",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":h(i,C)},{tagName:"stop",offset:"12%","stop-color":h(i,w)},{tagName:"stop",offset:"46%","stop-color":h(i,E)},{tagName:"stop",offset:"81%","stop-color":h(i,b)}]},{id:"animation_buttonToggled",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":h(n,C)},{tagName:"stop",offset:"12%","stop-color":h(n,w)},{tagName:"stop",offset:"46%","stop-color":h(n,E)},{tagName:"stop",offset:"81%","stop-color":h(n,b)}]},{id:"animation_buttonDisabled",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":h(r,S)},{tagName:"stop",offset:"75%","stop-color":h(r,T)}]},{id:"animation_blurred",tagName:"filter",width:"200%",height:"200%",x:"-50%",y:"-50%",children:[{tagName:"feGaussianBlur",stdDeviation:4,"in":"SourceGraphic"}]},{id:"animation_shuttleRingSwooshGradient",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-opacity":.2,"stop-color":u.toCssColorString()},{tagName:"stop",offset:"85%","stop-opacity":.85,"stop-color":u.toCssColorString()},{tagName:"stop",offset:"95%","stop-opacity":.05,"stop-color":u.toCssColorString()}]},{id:"animation_shuttleRingSwooshHovered",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-opacity":.2,"stop-color":c.toCssColorString()},{tagName:"stop",offset:"85%","stop-opacity":.85,"stop-color":c.toCssColorString()},{tagName:"stop",offset:"95%","stop-opacity":.05,"stop-color":c.toCssColorString()}]},{id:"animation_shuttleRingPointerGradient",tagName:"linearGradient",x1:"0%",y1:"50%",x2:"100%",y2:"50%",children:[{tagName:"stop",offset:"0%","stop-color":a.toCssColorString()},{tagName:"stop",offset:"40%","stop-color":a.toCssColorString()},{tagName:"stop",offset:"60%","stop-color":h(a,A)},{tagName:"stop",offset:"100%","stop-color":h(a,A)}]},{id:"animation_shuttleRingPointerPaused",tagName:"linearGradient",x1:"0%",y1:"50%",x2:"100%",y2:"50%",children:[{tagName:"stop",offset:"0%","stop-color":"#CCC"},{tagName:"stop",offset:"40%","stop-color":"#CCC"},{tagName:"stop",offset:"60%","stop-color":"#555"},{tagName:"stop",offset:"100%","stop-color":"#555"}]},{id:"animation_knobOuter",tagName:"linearGradient",x1:"20%",y1:"0%",x2:"90%",y2:"100%",children:[{tagName:"stop",offset:"5%","stop-color":h(o,C)},{tagName:"stop",offset:"60%","stop-color":h(o,x)},{tagName:"stop",offset:"85%","stop-color":h(o,w)}]},{id:"animation_knobInner",tagName:"linearGradient",x1:"20%",y1:"0%",x2:"90%",y2:"100%",children:[{tagName:"stop",offset:"5%","stop-color":h(o,x)},{tagName:"stop",offset:"60%","stop-color":h(o,C)},{tagName:"stop",offset:"85%","stop-color":h(o,b)}]},{id:"animation_pathReset",tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-16)",d:"M24.316,5.318,9.833,13.682,9.833,5.5,5.5,5.5,5.5,25.5,9.833,25.5,9.833,17.318,24.316,25.682z"},{id:"animation_pathPause",tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-16)",d:"M13,5.5,7.5,5.5,7.5,25.5,13,25.5zM24.5,5.5,19,5.5,19,25.5,24.5,25.5z"},{id:"animation_pathPlay",tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-16)",d:"M6.684,25.682L24.316,15.5L6.684,5.318V25.682z"},{id:"animation_pathPlayReverse",tagName:"path",transform:"translate(16,16) scale(-0.85,0.85) translate(-16,-16)",d:"M6.684,25.682L24.316,15.5L6.684,5.318V25.682z"},{id:"animation_pathLoop",tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-16)",d:"M24.249,15.499c-0.009,4.832-3.918,8.741-8.75,8.75c-2.515,0-4.768-1.064-6.365-2.763l2.068-1.442l-7.901-3.703l0.744,8.694l2.193-1.529c2.244,2.594,5.562,4.242,9.26,4.242c6.767,0,12.249-5.482,12.249-12.249H24.249zM15.499,6.75c2.516,0,4.769,1.065,6.367,2.764l-2.068,1.443l7.901,3.701l-0.746-8.693l-2.192,1.529c-2.245-2.594-5.562-4.245-9.262-4.245C8.734,3.25,3.25,8.734,3.249,15.499H6.75C6.758,10.668,10.668,6.758,15.499,6.75z"},{id:"animation_pathClock",tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-15.5)",d:"M15.5,2.374C8.251,2.375,2.376,8.251,2.374,15.5C2.376,22.748,8.251,28.623,15.5,28.627c7.249-0.004,13.124-5.879,13.125-13.127C28.624,8.251,22.749,2.375,15.5,2.374zM15.5,25.623C9.909,25.615,5.385,21.09,5.375,15.5C5.385,9.909,9.909,5.384,15.5,5.374c5.59,0.01,10.115,4.535,10.124,10.125C25.615,21.09,21.091,25.615,15.5,25.623zM8.625,15.5c-0.001-0.552-0.448-0.999-1.001-1c-0.553,0-1,0.448-1,1c0,0.553,0.449,1,1,1C8.176,16.5,8.624,16.053,8.625,15.5zM8.179,18.572c-0.478,0.277-0.642,0.889-0.365,1.367c0.275,0.479,0.889,0.641,1.365,0.365c0.479-0.275,0.643-0.887,0.367-1.367C9.27,18.461,8.658,18.297,8.179,18.572zM9.18,10.696c-0.479-0.276-1.09-0.112-1.366,0.366s-0.111,1.09,0.365,1.366c0.479,0.276,1.09,0.113,1.367-0.366C9.821,11.584,9.657,10.973,9.18,10.696zM22.822,12.428c0.478-0.275,0.643-0.888,0.366-1.366c-0.275-0.478-0.89-0.642-1.366-0.366c-0.479,0.278-0.642,0.89-0.366,1.367C21.732,12.54,22.344,12.705,22.822,12.428zM12.062,21.455c-0.478-0.275-1.089-0.111-1.366,0.367c-0.275,0.479-0.111,1.09,0.366,1.365c0.478,0.277,1.091,0.111,1.365-0.365C12.704,22.344,12.54,21.732,12.062,21.455zM12.062,9.545c0.479-0.276,0.642-0.888,0.366-1.366c-0.276-0.478-0.888-0.642-1.366-0.366s-0.642,0.888-0.366,1.366C10.973,9.658,11.584,9.822,12.062,9.545zM22.823,18.572c-0.48-0.275-1.092-0.111-1.367,0.365c-0.275,0.479-0.112,1.092,0.367,1.367c0.477,0.275,1.089,0.113,1.365-0.365C23.464,19.461,23.3,18.848,22.823,18.572zM19.938,7.813c-0.477-0.276-1.091-0.111-1.365,0.366c-0.275,0.48-0.111,1.091,0.366,1.367s1.089,0.112,1.366-0.366C20.581,8.702,20.418,8.089,19.938,7.813zM23.378,14.5c-0.554,0.002-1.001,0.45-1.001,1c0.001,0.552,0.448,1,1.001,1c0.551,0,1-0.447,1-1C24.378,14.949,23.929,14.5,23.378,14.5zM15.501,6.624c-0.552,0-1,0.448-1,1l-0.466,7.343l-3.004,1.96c-0.478,0.277-0.642,0.889-0.365,1.365c0.275,0.479,0.889,0.643,1.365,0.367l3.305-1.676C15.39,16.99,15.444,17,15.501,17c0.828,0,1.5-0.671,1.5-1.5l-0.5-7.876C16.501,7.072,16.053,6.624,15.501,6.624zM15.501,22.377c-0.552,0-1,0.447-1,1s0.448,1,1,1s1-0.447,1-1S16.053,22.377,15.501,22.377zM18.939,21.455c-0.479,0.277-0.643,0.889-0.366,1.367c0.275,0.477,0.888,0.643,1.366,0.365c0.478-0.275,0.642-0.889,0.366-1.365C20.028,21.344,19.417,21.18,18.939,21.455z"},{id:"animation_pathWingButton",tagName:"path",d:"m 4.5,0.5 c -2.216,0 -4,1.784 -4,4 l 0,24 c 0,2.216 1.784,4 4,4 l 13.71875,0 C 22.478584,27.272785 27.273681,22.511272 32.5,18.25 l 0,-13.75 c 0,-2.216 -1.784,-4 -4,-4 l -24,0 z"},{id:"animation_pathPointer",tagName:"path",d:"M-15,-65,-15,-55,15,-55,15,-65,0,-95z"},{id:"animation_pathSwooshFX",tagName:"path",d:"m 85,0 c 0,16.617 -4.813944,35.356 -13.131081,48.4508 h 6.099803 c 8.317138,-13.0948 13.13322,-28.5955 13.13322,-45.2124 0,-46.94483 -38.402714,-85.00262 -85.7743869,-85.00262 -1.0218522,0 -2.0373001,0.0241 -3.0506131,0.0589 45.958443,1.59437 82.723058,35.77285 82.723058,81.70532 z"}]});t(this._defsElement)?this._svgNode.replaceChild(d,this._defsElement):this._svgNode.appendChild(d),this._defsElement=d},g}),define("Cesium/Widgets/createCommand",["../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Event","../ThirdParty/knockout"],function(e,t,i,n,r,o){"use strict";function a(t,n){function a(){var e,i={args:arguments,cancel:!1};return s.raiseEvent(i),i.cancel||(e=t.apply(null,arguments),l.raiseEvent(e)),e}n=e(n,!0);var s=new r,l=new r;return a.canExecute=n,o.track(a,["canExecute"]),i(a,{beforeExecute:{value:s},afterExecute:{value:l}}),a}return a}),define("Cesium/Widgets/ToggleButtonViewModel",["../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../ThirdParty/knockout"],function(e,t,i,n,r){"use strict";function o(t,i){this._command=t,i=e(i,e.EMPTY_OBJECT),this.toggled=e(i.toggled,!1),this.tooltip=e(i.tooltip,""),r.track(this,["toggled","tooltip"])}return i(o.prototype,{command:{get:function(){return this._command}}}),o}),define("Cesium/Widgets/Animation/AnimationViewModel",["../../Core/binarySearch","../../Core/ClockRange","../../Core/ClockStep","../../Core/defined","../../Core/defineProperties","../../Core/DeveloperError","../../Core/JulianDate","../../ThirdParty/knockout","../../ThirdParty/sprintf","../createCommand","../ToggleButtonViewModel"],function(e,t,i,n,r,o,a,s,l,u,c){"use strict";function h(e,t){return e-t}function d(t,i){var n=e(i,t,h);return 0>n?~n:n}function p(e,t){if(Math.abs(e)<=v)return e/v;var i,n,r=v,o=_,a=0;return e>0?(i=Math.log(t[t.length-1]),n=(i-a)/(o-r),Math.exp(a+n*(e-r))):(i=Math.log(-t[0]),n=(i-a)/(o-r),-Math.exp(a+n*(Math.abs(e)-r)))}function m(e,t,n){if(n.clockStep===i.SYSTEM_CLOCK)return v;if(Math.abs(e)<=1)return e*v;var r=t[t.length-1];e>r?e=r:-r>e&&(e=-r);var o,a,s=v,l=_,u=0;return e>0?(o=Math.log(r),a=(o-u)/(l-s),(Math.log(e)-u)/a+s):(o=Math.log(-t[0]),a=(o-u)/(l-s),-((Math.log(Math.abs(e))-u)/a+s))}function f(e){var n=this;this._clockViewModel=e,this._allShuttleRingTicks=[],this._dateFormatter=f.defaultDateFormatter,this._timeFormatter=f.defaultTimeFormatter,this.shuttleRingDragging=!1,this.snapToTicks=!1,s.track(this,["_allShuttleRingTicks","_dateFormatter","_timeFormatter","shuttleRingDragging","snapToTicks"]),this._sortedFilteredPositiveTicks=[],this.setShuttleRingTicks(f.defaultTicks),this.timeLabel=void 0,s.defineProperty(this,"timeLabel",function(){return n._timeFormatter(n._clockViewModel.currentTime,n)}),this.dateLabel=void 0,s.defineProperty(this,"dateLabel",function(){return n._dateFormatter(n._clockViewModel.currentTime,n)}),this.multiplierLabel=void 0,s.defineProperty(this,"multiplierLabel",function(){var e=n._clockViewModel;if(e.clockStep===i.SYSTEM_CLOCK)return"Today";var t=e.multiplier;return t%1===0?t.toFixed(0)+"x":t.toFixed(3).replace(/0{0,3}$/,"")+"x"}),this.shuttleRingAngle=void 0,s.defineProperty(this,"shuttleRingAngle",{get:function(){return m(e.multiplier,n._allShuttleRingTicks,e)},set:function(e){e=Math.max(Math.min(e,_),-_);var t=n._allShuttleRingTicks,r=n._clockViewModel;if(r.clockStep=i.SYSTEM_CLOCK_MULTIPLIER,Math.abs(e)===_)return void(r.multiplier=e>0?t[t.length-1]:t[0]);var o=p(e,t);if(n.snapToTicks)o=t[d(o,t)];else if(0!==o){var a=Math.abs(o);if(a>100){var s=a.toFixed(0).length-2,l=Math.pow(10,s);o=Math.round(o/l)*l|0}else a>v?o=Math.round(o):a>1?o=+o.toFixed(1):a>0&&(o=+o.toFixed(2))}r.multiplier=o}}),this._canAnimate=void 0,s.defineProperty(this,"_canAnimate",function(){var e=n._clockViewModel,i=e.clockRange;if(n.shuttleRingDragging||i===t.UNBOUNDED)return!0;var r=e.multiplier,o=e.currentTime,s=e.startTime,l=!1;if(i===t.LOOP_STOP)l=a.greaterThan(o,s)||o.equals(s)&&r>0;else{var u=e.stopTime;l=a.greaterThan(o,s)&&a.lessThan(o,u)||o.equals(s)&&r>0||o.equals(u)&&0>r}return l||(e.shouldAnimate=!1),l}),this._isSystemTimeAvailable=void 0,s.defineProperty(this,"_isSystemTimeAvailable",function(){var e=n._clockViewModel,i=e.clockRange;if(i===t.UNBOUNDED)return!0;var r=e.systemTime;return a.greaterThanOrEquals(r,e.startTime)&&a.lessThanOrEquals(r,e.stopTime)}),this._isAnimating=void 0,s.defineProperty(this,"_isAnimating",function(){return n._clockViewModel.shouldAnimate&&(n._canAnimate||n.shuttleRingDragging)});var r=u(function(){var e=n._clockViewModel;e.shouldAnimate?e.shouldAnimate=!1:n._canAnimate&&(e.shouldAnimate=!0)});this._pauseViewModel=new c(r,{toggled:s.computed(function(){return!n._isAnimating}),tooltip:"Pause"});var o=u(function(){var e=n._clockViewModel,t=e.multiplier;t>0&&(e.multiplier=-t),e.shouldAnimate=!0});this._playReverseViewModel=new c(o,{toggled:s.computed(function(){return n._isAnimating&&e.multiplier<0}),tooltip:"Play Reverse"});var l=u(function(){var e=n._clockViewModel,t=e.multiplier;0>t&&(e.multiplier=-t),e.shouldAnimate=!0});this._playForwardViewModel=new c(l,{toggled:s.computed(function(){return n._isAnimating&&e.multiplier>0&&e.clockStep!==i.SYSTEM_CLOCK}),tooltip:"Play Forward"});var h=u(function(){n._clockViewModel.clockStep=i.SYSTEM_CLOCK},s.getObservable(this,"_isSystemTimeAvailable"));this._playRealtimeViewModel=new c(h,{toggled:s.computed(function(){return e.clockStep===i.SYSTEM_CLOCK}),tooltip:s.computed(function(){return n._isSystemTimeAvailable?"Today (real-time)":"Current time not in range"})}),this._slower=u(function(){var e=n._clockViewModel,t=n._allShuttleRingTicks,i=e.multiplier,r=d(i,t)-1;r>=0&&(e.multiplier=t[r])}),this._faster=u(function(){var e=n._clockViewModel,t=n._allShuttleRingTicks,i=e.multiplier,r=d(i,t)+1;r<t.length&&(e.multiplier=t[r])})}var g=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],v=15,_=105;return f.defaultDateFormatter=function(e,t){var i=a.toGregorianDate(e);return g[i.month-1]+" "+i.day+" "+i.year},f.defaultTicks=[.001,.002,.005,.01,.02,.05,.1,.25,.5,1,2,5,10,15,30,60,120,300,600,900,1800,3600,7200,14400,21600,43200,86400,172800,345600,604800],f.defaultTimeFormatter=function(e,t){var i=a.toGregorianDate(e),n=Math.round(i.millisecond);return Math.abs(t._clockViewModel.multiplier)<1?l("%02d:%02d:%02d.%03d",i.hour,i.minute,i.second,n):l("%02d:%02d:%02d UTC",i.hour,i.minute,i.second)},f.prototype.getShuttleRingTicks=function(){return this._sortedFilteredPositiveTicks.slice(0)},f.prototype.setShuttleRingTicks=function(e){var t,i,n,r={},o=this._sortedFilteredPositiveTicks;for(o.length=0,t=0,i=e.length;i>t;++t)n=e[t],r.hasOwnProperty(n)||(r[n]=!0,o.push(n));o.sort(h);var a=[];for(i=o.length,t=i-1;t>=0;--t)n=o[t],0!==n&&a.push(-n);Array.prototype.push.apply(a,o),this._allShuttleRingTicks=a},r(f.prototype,{slower:{get:function(){return this._slower}},faster:{get:function(){return this._faster}},clockViewModel:{get:function(){return this._clockViewModel}},pauseViewModel:{get:function(){return this._pauseViewModel}},playReverseViewModel:{get:function(){return this._playReverseViewModel}},playForwardViewModel:{get:function(){return this._playForwardViewModel}},playRealtimeViewModel:{get:function(){return this._playRealtimeViewModel}},dateFormatter:{get:function(){return this._dateFormatter},set:function(e){this._dateFormatter=e}},timeFormatter:{get:function(){return this._timeFormatter},set:function(e){this._timeFormatter=e}}}),f._maxShuttleRingAngle=_,f._realtimeShuttleRingAngle=v,f}),define("Cesium/Widgets/BaseLayerPicker/BaseLayerPickerViewModel",["../../Core/defaultValue","../../Core/defined","../../Core/defineProperties","../../Core/DeveloperError","../../Core/EllipsoidTerrainProvider","../../Core/isArray","../../ThirdParty/knockout","../createCommand"],function(e,t,i,n,r,o,a,s){"use strict";function l(i){i=e(i,e.EMPTY_OBJECT);var n=i.globe,l=e(i.imageryProviderViewModels,[]),u=e(i.terrainProviderViewModels,[]);this._globe=n,this.imageryProviderViewModels=l.slice(0),this.terrainProviderViewModels=u.slice(0),this.dropDownVisible=!1,a.track(this,["imageryProviderViewModels","terrainProviderViewModels","dropDownVisible"]),this.buttonTooltip=void 0,a.defineProperty(this,"buttonTooltip",function(){var e=this.selectedImagery,i=this.selectedTerrain,n=t(e)?e.name:void 0,r=t(i)?i.name:void 0;return t(n)&&t(r)?n+"\n"+r:t(n)?n:r}),this.buttonImageUrl=void 0,a.defineProperty(this,"buttonImageUrl",function(){var e=this.selectedImagery;return t(e)?e.iconUrl:void 0}),this.selectedImagery=void 0;var c=a.observable();this._currentImageryProviders=[],a.defineProperty(this,"selectedImagery",{get:function(){return c()},set:function(e){if(c()===e)return void(this.dropDownVisible=!1);var i,n=this._currentImageryProviders,r=n.length,a=this._globe.imageryLayers;for(i=0;r>i;i++)for(var s=a.length,l=0;s>l;l++){var u=a.get(l);if(u.imageryProvider===n[i]){a.remove(u);break}}if(t(e)){var h=e.creationCommand();if(o(h)){var d=h.length;for(i=d-1;i>=0;i--)a.addImageryProvider(h[i],0);this._currentImageryProviders=h.slice(0)}else this._currentImageryProviders=[h],a.addImageryProvider(h,0)}c(e),this.dropDownVisible=!1}}),this.selectedTerrain=void 0;var h=a.observable();a.defineProperty(this,"selectedTerrain",{get:function(){return h()},set:function(e){if(h()===e)return void(this.dropDownVisible=!1);var i;t(e)&&(i=e.creationCommand()),this._globe.depthTestAgainstTerrain=!(i instanceof r),this._globe.terrainProvider=i,h(e),this.dropDownVisible=!1}});var d=this;this._toggleDropDown=s(function(){d.dropDownVisible=!d.dropDownVisible}),this.selectedImagery=e(i.selectedImageryProviderViewModel,l[0]),this.selectedTerrain=e(i.selectedTerrainProviderViewModel,u[0])}return i(l.prototype,{toggleDropDown:{get:function(){return this._toggleDropDown}},globe:{get:function(){return this._globe}}}),l}),define("Cesium/Widgets/BaseLayerPicker/BaseLayerPicker",["../../Core/defined","../../Core/defineProperties","../../Core/destroyObject","../../Core/DeveloperError","../../Core/FeatureDetection","../../ThirdParty/knockout","../getElement","./BaseLayerPickerViewModel"],function(e,t,i,n,r,o,a,s){"use strict";function l(e,t){e=a(e);var i=new s(t),n=document.createElement("button");n.type="button",n.className="cesium-button cesium-toolbar-button",n.setAttribute("data-bind","attr: { title: buttonTooltip },click: toggleDropDown"),e.appendChild(n);var l=document.createElement("img");l.setAttribute("draggable","false"),l.className="cesium-baseLayerPicker-selected",l.setAttribute("data-bind","attr: { src: buttonImageUrl }"),n.appendChild(l);var u=document.createElement("div");u.className="cesium-baseLayerPicker-dropDown",u.setAttribute("data-bind",'css: { "cesium-baseLayerPicker-dropDown-visible" : dropDownVisible }'),e.appendChild(u);var c=document.createElement("div");c.className="cesium-baseLayerPicker-sectionTitle",c.setAttribute("data-bind","visible: imageryProviderViewModels.length > 0"),c.innerHTML="Imagery",u.appendChild(c);var h=document.createElement("div");h.className="cesium-baseLayerPicker-choices",h.setAttribute("data-bind","foreach: imageryProviderViewModels"),u.appendChild(h);var d=document.createElement("div");d.className="cesium-baseLayerPicker-item",d.setAttribute("data-bind",'css: { "cesium-baseLayerPicker-selectedItem" : $data === $parent.selectedImagery },attr: { title: tooltip },visible: creationCommand.canExecute,click: function($data) { $parent.selectedImagery = $data; }'),h.appendChild(d);var p=document.createElement("img");p.className="cesium-baseLayerPicker-itemIcon",p.setAttribute("data-bind","attr: { src: iconUrl }"),p.setAttribute("draggable","false"),d.appendChild(p);var m=document.createElement("div");m.className="cesium-baseLayerPicker-itemLabel",m.setAttribute("data-bind","text: name"),d.appendChild(m);var f=document.createElement("div");f.className="cesium-baseLayerPicker-sectionTitle",f.setAttribute("data-bind","visible: terrainProviderViewModels.length > 0"),f.innerHTML="Terrain",u.appendChild(f);var g=document.createElement("div");g.className="cesium-baseLayerPicker-choices",g.setAttribute("data-bind","foreach: terrainProviderViewModels"),u.appendChild(g);var v=document.createElement("div");v.className="cesium-baseLayerPicker-item",v.setAttribute("data-bind",'css: { "cesium-baseLayerPicker-selectedItem" : $data === $parent.selectedTerrain },attr: { title: tooltip },visible: creationCommand.canExecute,click: function($data) { $parent.selectedTerrain = $data; }'),g.appendChild(v);var _=document.createElement("img");_.className="cesium-baseLayerPicker-itemIcon",_.setAttribute("data-bind","attr: { src: iconUrl }"),_.setAttribute("draggable","false"),v.appendChild(_);var y=document.createElement("div");y.className="cesium-baseLayerPicker-itemLabel",y.setAttribute("data-bind","text: name"),v.appendChild(y),o.applyBindings(i,n),o.applyBindings(i,u),this._viewModel=i,this._container=e,this._element=n,this._dropPanel=u,this._closeDropDown=function(e){n.contains(e.target)||u.contains(e.target)||(i.dropDownVisible=!1)},r.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}return t(l.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),l.prototype.isDestroyed=function(){return!1},l.prototype.destroy=function(){return r.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),o.cleanNode(this._element),o.cleanNode(this._dropPanel),this._container.removeChild(this._element),this._container.removeChild(this._dropPanel),i(this)},l}),define("Cesium/Widgets/BaseLayerPicker/ProviderViewModel",["../../Core/defined","../../Core/defineProperties","../../Core/DeveloperError","../../ThirdParty/knockout","../createCommand"],function(e,t,i,n,r){"use strict";function o(t){var i=t.creationFunction;e(i.canExecute)||(i=r(i)),this._creationCommand=i,this.name=t.name,this.tooltip=t.tooltip,this.iconUrl=t.iconUrl,n.track(this,["name","tooltip","iconUrl"])}return t(o.prototype,{creationCommand:{get:function(){return this._creationCommand}}}),o}),define("Cesium/Widgets/BaseLayerPicker/createDefaultImageryProviderViewModels",["../../Core/buildModuleUrl","../../Scene/ArcGisMapServerImageryProvider","../../Scene/BingMapsImageryProvider","../../Scene/BingMapsStyle","../../Scene/createOpenStreetMapImageryProvider","../../Scene/createTileMapServiceImageryProvider","../../Scene/MapboxImageryProvider","../BaseLayerPicker/ProviderViewModel"],function(e,t,i,n,r,o,a,s){"use strict";function l(){var l=[];return l.push(new s({name:"Bing Maps Aerial",iconUrl:e("Widgets/Images/ImageryProviders/bingAerial.png"),tooltip:"Bing Maps aerial imagery \nhttp://www.bing.com/maps",creationFunction:function(){return new i({url:"https://dev.virtualearth.net",mapStyle:n.AERIAL})}})),l.push(new s({name:"Bing Maps Aerial with Labels",iconUrl:e("Widgets/Images/ImageryProviders/bingAerialLabels.png"),tooltip:"Bing Maps aerial imagery with label overlays \nhttp://www.bing.com/maps",creationFunction:function(){return new i({url:"https://dev.virtualearth.net",mapStyle:n.AERIAL_WITH_LABELS})}})),l.push(new s({name:"Bing Maps Roads",iconUrl:e("Widgets/Images/ImageryProviders/bingRoads.png"),tooltip:"Bing Maps standard road maps\nhttp://www.bing.com/maps",creationFunction:function(){return new i({url:"https://dev.virtualearth.net",mapStyle:n.ROAD})}})),l.push(new s({name:"Mapbox Satellite",tooltip:"Mapbox satellite imagery https://www.mapbox.com/maps/",iconUrl:e("Widgets/Images/ImageryProviders/mapboxSatellite.png"),creationFunction:function(){return new a({mapId:"mapbox.satellite"})}})),l.push(new s({name:"Mapbox Streets",tooltip:"Mapbox streets imagery https://www.mapbox.com/maps/",iconUrl:e("Widgets/Images/ImageryProviders/mapboxTerrain.png"),creationFunction:function(){return new a({mapId:"mapbox.streets"})}})),l.push(new s({name:"Mapbox Streets Classic",tooltip:"Mapbox streets basic imagery https://www.mapbox.com/maps/",iconUrl:e("Widgets/Images/ImageryProviders/mapboxStreets.png"),creationFunction:function(){return new a({mapId:"mapbox.streets-basic"})}})),l.push(new s({name:"ESRI World Imagery",iconUrl:e("Widgets/Images/ImageryProviders/esriWorldImagery.png"),tooltip:"World Imagery provides one meter or better satellite and aerial imagery in many parts of the world and lower resolution satellite imagery worldwide. The map includes NASA Blue Marble: Next Generation 500m resolution imagery at small scales (above 1:1,000,000), i-cubed 15m eSAT imagery at medium-to-large scales (down to 1:70,000) for the world, and USGS 15m Landsat imagery for Antarctica. The map features 0.3m resolution imagery in the continental United States and 0.6m resolution imagery in parts of Western Europe from DigitalGlobe. In other parts of the world, 1 meter resolution imagery is available from GeoEye IKONOS, i-cubed Nationwide Prime, Getmapping, AeroGRID, IGN Spain, and IGP Portugal. Additionally, imagery at different resolutions has been contributed by the GIS User Community.\nhttp://www.esri.com",creationFunction:function(){return new t({url:"https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer",enablePickFeatures:!1})}})),l.push(new s({name:"ESRI World Street Map",iconUrl:e("Widgets/Images/ImageryProviders/esriWorldStreetMap.png"),tooltip:"This worldwide street map presents highway-level data for the world. Street-level data includes the United States; much of Canada; Japan; most countries in Europe; Australia and New Zealand; India; parts of South America including Argentina, Brazil, Chile, Colombia, and Venezuela; Ghana; and parts of southern Africa including Botswana, Lesotho, Namibia, South Africa, and Swaziland.\nhttp://www.esri.com",creationFunction:function(){return new t({url:"https://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer",enablePickFeatures:!1})}})),l.push(new s({name:"ESRI National Geographic",iconUrl:e("Widgets/Images/ImageryProviders/esriNationalGeographic.png"),tooltip:"This web map contains the National Geographic World Map service. This map service is designed to be used as a general reference map for informational and educational purposes as well as a basemap by GIS professionals and other users for creating web maps and web mapping applications.\nhttp://www.esri.com",creationFunction:function(){return new t({url:"https://services.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer/",enablePickFeatures:!1})}})),l.push(new s({name:"Open­Street­Map",iconUrl:e("Widgets/Images/ImageryProviders/openStreetMap.png"),tooltip:"OpenStreetMap (OSM) is a collaborative project to create a free editable map of the world.\nhttp://www.openstreetmap.org",creationFunction:function(){return r({url:"https://a.tile.openstreetmap.org/"})}})),l.push(new s({name:"Stamen Watercolor",iconUrl:e("Widgets/Images/ImageryProviders/stamenWatercolor.png"),tooltip:"Reminiscent of hand drawn maps, Stamen watercolor maps apply raster effect area washes and organic edges over a paper texture to add warm pop to any map.\nhttp://maps.stamen.com",creationFunction:function(){return r({url:"https://stamen-tiles.a.ssl.fastly.net/watercolor/",credit:"Map tiles by Stamen Design, under CC BY 3.0. Data by OpenStreetMap, under CC BY SA."})}})),l.push(new s({name:"Stamen Toner",iconUrl:e("Widgets/Images/ImageryProviders/stamenToner.png"),tooltip:"A high contrast black and white map.\nhttp://maps.stamen.com",creationFunction:function(){return r({url:"https://stamen-tiles.a.ssl.fastly.net/toner/",credit:"Map tiles by Stamen Design, under CC BY 3.0. Data by OpenStreetMap, under CC BY SA."})}})),l.push(new s({name:"MapQuest Open­Street­Map",iconUrl:e("Widgets/Images/ImageryProviders/mapQuestOpenStreetMap.png"),tooltip:"OpenStreetMap (OSM) is a collaborative project to create a free editable map of the world.\nhttp://www.openstreetmap.org",creationFunction:function(){return r({url:"https://otile1-s.mqcdn.com/tiles/1.0.0/osm/"})}})),l.push(new s({name:"The Black Marble",iconUrl:e("Widgets/Images/ImageryProviders/blackMarble.png"),tooltip:"The lights of cities and villages trace the outlines of civilization in this global view of the Earth at night as seen by NASA/NOAA's Suomi NPP satellite.",creationFunction:function(){return o({url:"https://cesiumjs.org/blackmarble",flipXY:!0,credit:"Black Marble imagery courtesy NASA Earth Observatory"})}})),l.push(new s({name:"Natural Earth II",iconUrl:e("Widgets/Images/ImageryProviders/naturalEarthII.png"),tooltip:"Natural Earth II, darkened for contrast.\nhttp://www.naturalearthdata.com/",creationFunction:function(){return o({url:e("Assets/Textures/NaturalEarthII")})}})),l}return l}),define("Cesium/Widgets/BaseLayerPicker/createDefaultTerrainProviderViewModels",["../../Core/buildModuleUrl","../../Core/CesiumTerrainProvider","../../Core/EllipsoidTerrainProvider","../BaseLayerPicker/ProviderViewModel"],function(e,t,i,n){ +"use strict";function r(){var r=[];return r.push(new n({name:"WGS84 Ellipsoid",iconUrl:e("Widgets/Images/TerrainProviders/Ellipsoid.png"),tooltip:"WGS84 standard ellipsoid, also known as EPSG:4326",creationFunction:function(){return new i}})),r.push(new n({name:"STK World Terrain meshes",iconUrl:e("Widgets/Images/TerrainProviders/STK.png"),tooltip:"High-resolution, mesh-based terrain for the entire globe. Free for use on the Internet. Closed-network options are available.\nhttp://www.agi.com",creationFunction:function(){return new t({url:"https://assets.agi.com/stk-terrain/world",requestWaterMask:!0,requestVertexNormals:!0})}})),r}return r}),define("Cesium/Widgets/CesiumInspector/CesiumInspectorViewModel",["../../Core/Color","../../Core/defined","../../Core/defineProperties","../../Core/destroyObject","../../Core/DeveloperError","../../Core/Rectangle","../../Core/ScreenSpaceEventHandler","../../Core/ScreenSpaceEventType","../../Scene/DebugModelMatrixPrimitive","../../Scene/PerformanceDisplay","../../Scene/TileCoordinatesImageryProvider","../../ThirdParty/knockout","../createCommand"],function(e,t,i,n,r,o,a,s,l,u,c,h,d){"use strict";function p(e){var i;if(t(e)){i="Command Statistics";var n=e.commandsInFrustums;for(var r in n)if(n.hasOwnProperty(r)){var o,a=parseInt(r,10);if(7===a)o="1, 2 and 3";else{for(var s=[],l=2;l>=0;l--){var u=Math.pow(2,l);a>=u&&(s.push(l+1),a-=u)}o=s.reverse().join(" and ")}i+="<br>    "+n[r]+" in frustum "+o}i+="<br>Total: "+e.totalCommands}return i}function m(e,t,i){var n=Math.min(i,t);return n=Math.max(n,e)}function f(e,i){function n(e){g.removeInputAction(s.LEFT_CLICK),p.pickPrimitiveActive=!1;var i=p._scene.pick({x:e.position.x,y:e.position.y});t(i)&&(p.primitive=t(i.collection)?i.collection:i.primitive)}function r(e){var i,n=v.ellipsoid,r=p._scene.camera.pickEllipsoid({x:e.position.x,y:e.position.y},n);if(t(r))for(var a=n.cartesianToCartographic(r),l=v._surface.tileProvider._tilesToRenderByTextureCount,u=0;!i&&u<l.length;++u){var c=l[u];if(t(c))for(var h=0;!i&&h<c.length;++h){var d=c[h];o.contains(d.rectangle,a)&&(i=d)}}p.tile=i,g.removeInputAction(s.LEFT_CLICK),p.pickTileActive=!1}var p=this,f=e.canvas,g=new a(f);this._eventHandler=g,this._scene=e,this._canvas=f,this._primitive=void 0,this._tile=void 0,this._modelMatrixPrimitive=void 0,this._performanceDisplay=void 0,this._performanceContainer=i;var v=this._scene.globe;v.depthTestAgainstTerrain=!0,this.frustums=!1,this.performance=!1,this.shaderCacheText="",this.primitiveBoundingSphere=!1,this.primitiveReferenceFrame=!1,this.filterPrimitive=!1,this.tileBoundingSphere=!1,this.filterTile=!1,this.wireframe=!1,this.globeDepth=!1,this.pickDepth=!1,this.depthFrustum=1,this._numberOfFrustums=1,this.depthFrustumText="1 of 1",this.suspendUpdates=!1,this.tileCoordinates=!1,this.frustumStatisticText="",this.tileText="",this.hasPickedPrimitive=!1,this.hasPickedTile=!1,this.pickPimitiveActive=!1,this.pickTileActive=!1,this.dropDownVisible=!0,this.generalVisible=!0,this.primitivesVisible=!1,this.terrainVisible=!1,this.generalSwitchText="-",this.primitivesSwitchText="+",this.terrainSwitchText="+",h.track(this,["filterTile","suspendUpdates","dropDownVisible","shaderCacheText","frustums","frustumStatisticText","pickTileActive","pickPrimitiveActive","hasPickedPrimitive","hasPickedTile","tileText","generalVisible","generalSwitchText","primitivesVisible","primitivesSwitchText","terrainVisible","terrainSwitchText","depthFrustumText"]),this._toggleDropDown=d(function(){p.dropDownVisible=!p.dropDownVisible}),this._toggleGeneral=d(function(){p.generalVisible=!p.generalVisible,p.generalSwitchText=p.generalVisible?"-":"+"}),this._togglePrimitives=d(function(){p.primitivesVisible=!p.primitivesVisible,p.primitivesSwitchText=p.primitivesVisible?"-":"+"}),this._toggleTerrain=d(function(){p.terrainVisible=!p.terrainVisible,p.terrainSwitchText=p.terrainVisible?"-":"+"}),this._showFrustums=d(function(){return p.frustums?p._scene.debugShowFrustums=!0:p._scene.debugShowFrustums=!1,!0}),this._showPerformance=d(function(){return p.performance?p._performanceDisplay=new u({container:p._performanceContainer}):p._performanceContainer.innerHTML="",!0}),this._showPrimitiveBoundingSphere=d(function(){return p._primitive.debugShowBoundingVolume=p.primitiveBoundingSphere,!0}),this._showPrimitiveReferenceFrame=d(function(){if(p.primitiveReferenceFrame){var e=p._primitive.modelMatrix;p._modelMatrixPrimitive=new l({modelMatrix:e}),p._scene.primitives.add(p._modelMatrixPrimitive)}else t(p._modelMatrixPrimitive)&&(p._scene.primitives.remove(p._modelMatrixPrimitive),p._modelMatrixPrimitive=void 0);return!0}),this._doFilterPrimitive=d(function(){return p.filterPrimitive?p._scene.debugCommandFilter=function(e){return t(p._modelMatrixPrimitive)&&e.owner===p._modelMatrixPrimitive._primitive?!0:t(p._primitive)?e.owner===p._primitive||e.owner===p._primitive._billboardCollection||e.owner.primitive===p._primitive:!1}:p._scene.debugCommandFilter=void 0,!0}),this._showWireframe=d(function(){return v._surface.tileProvider._debug.wireframe=p.wireframe,!0}),this._showGlobeDepth=d(function(){return p._scene.debugShowGlobeDepth=p.globeDepth,!0}),this._showPickDepth=d(function(){return p._scene.debugShowPickDepth=p.pickDepth,!0}),this._incrementDepthFrustum=d(function(){var e=p.depthFrustum+1;return p.depthFrustum=m(1,p._numberOfFrustums,e),p.scene.debugShowDepthFrustum=p.depthFrustum,!0}),this._decrementDepthFrustum=d(function(){var e=p.depthFrustum-1;return p.depthFrustum=m(1,p._numberOfFrustums,e),p.scene.debugShowDepthFrustum=p.depthFrustum,!0}),this._doSuspendUpdates=d(function(){return v._surface._debug.suspendLodUpdate=p.suspendUpdates,p.suspendUpdates||(p.filterTile=!1),!0});var _;this._showTileCoordinates=d(function(){return p.tileCoordinates&&!t(_)?_=e.imageryLayers.addImageryProvider(new c({tilingScheme:e.terrainProvider.tilingScheme})):!p.tileCoordinates&&t(_)&&(e.imageryLayers.remove(_),_=void 0),!0}),this._showTileBoundingSphere=d(function(){return p.tileBoundingSphere?v._surface.tileProvider._debug.boundingSphereTile=p._tile:v._surface.tileProvider._debug.boundingSphereTile=void 0,!0}),this._doFilterTile=d(function(){return p.filterTile?(p.suspendUpdates=!0,p.doSuspendUpdates(),v._surface._tilesToRender=[],t(p._tile)&&v._surface._tilesToRender.push(p._tile)):(p.suspendUpdates=!1,p.doSuspendUpdates()),!0}),this._pickPrimitive=d(function(){p.pickPrimitiveActive=!p.pickPrimitiveActive,p.pickPrimitiveActive?g.setInputAction(n,s.LEFT_CLICK):g.removeInputAction(s.LEFT_CLICK)}),this._pickTile=d(function(){p.pickTileActive=!p.pickTileActive,p.pickTileActive?g.setInputAction(r,s.LEFT_CLICK):g.removeInputAction(s.LEFT_CLICK)})}return i(f.prototype,{scene:{get:function(){return this._scene}},performanceContainer:{get:function(){return this._performanceContainer}},toggleDropDown:{get:function(){return this._toggleDropDown}},showFrustums:{get:function(){return this._showFrustums}},showPerformance:{get:function(){return this._showPerformance}},showPrimitiveBoundingSphere:{get:function(){return this._showPrimitiveBoundingSphere}},showPrimitiveReferenceFrame:{get:function(){return this._showPrimitiveReferenceFrame}},doFilterPrimitive:{get:function(){return this._doFilterPrimitive}},showWireframe:{get:function(){return this._showWireframe}},showGlobeDepth:{get:function(){return this._showGlobeDepth}},showPickDepth:{get:function(){return this._showPickDepth}},incrementDepthFrustum:{get:function(){return this._incrementDepthFrustum}},decrementDepthFrustum:{get:function(){return this._decrementDepthFrustum}},doSuspendUpdates:{get:function(){return this._doSuspendUpdates}},showTileCoordinates:{get:function(){return this._showTileCoordinates}},showTileBoundingSphere:{get:function(){return this._showTileBoundingSphere}},doFilterTile:{get:function(){return this._doFilterTile}},toggleGeneral:{get:function(){return this._toggleGeneral}},togglePrimitives:{get:function(){return this._togglePrimitives}},toggleTerrain:{get:function(){return this._toggleTerrain}},pickPrimitive:{get:function(){return this._pickPrimitive}},pickTile:{get:function(){return this._pickTile}},selectParent:{get:function(){var e=this;return d(function(){e.tile=e.tile.parent})}},selectNW:{get:function(){var e=this;return d(function(){e.tile=e.tile.children[0]})}},selectNE:{get:function(){var e=this;return d(function(){e.tile=e.tile.children[1]})}},selectSW:{get:function(){var e=this;return d(function(){e.tile=e.tile.children[2]})}},selectSE:{get:function(){var e=this;return d(function(){e.tile=e.tile.children[3]})}},primitive:{set:function(e){var i=this._primitive;e!==i&&(this.hasPickedPrimitive=!0,t(i)&&(i.debugShowBoundingVolume=!1),this._scene.debugCommandFilter=void 0,t(this._modelMatrixPrimitive)&&(this._scene.primitives.remove(this._modelMatrixPrimitive),this._modelMatrixPrimitive=void 0),this._primitive=e,e.show=!1,setTimeout(function(){e.show=!0},50),this.showPrimitiveBoundingSphere(),this.showPrimitiveReferenceFrame(),this.doFilterPrimitive())},get:function(){return this._primitive}},tile:{set:function(e){if(t(e)){this.hasPickedTile=!0;var i=this._tile;e!==i&&(this.tileText="L: "+e.level+" X: "+e.x+" Y: "+e.y,this.tileText+="<br>SW corner: "+e.rectangle.west+", "+e.rectangle.south,this.tileText+="<br>NE corner: "+e.rectangle.east+", "+e.rectangle.north,this.tileText+="<br>Min: "+e.data.minimumHeight+" Max: "+e.data.maximumHeight),this._tile=e,this.showTileBoundingSphere(),this.doFilterTile()}else this.hasPickedTile=!1,this._tile=void 0},get:function(){return this._tile}},update:{get:function(){var e=this;return function(){e.frustums&&(e.frustumStatisticText=p(e._scene.debugFrustumStatistics));var t=e._scene.numberOfFrustums;e._numberOfFrustums=t;var i=m(1,t,e.depthFrustum);e.depthFrustum=i,e.scene.debugShowDepthFrustum=i,e.depthFrustumText=i+" of "+t,e.performance&&e._performanceDisplay.update(),e.primitiveReferenceFrame&&(e._modelMatrixPrimitive.modelMatrix=e._primitive.modelMatrix),e.shaderCacheText="Cached shaders: "+e._scene.context.shaderCache.numberOfShaders}}}}),f.prototype.isDestroyed=function(){return!1},f.prototype.destroy=function(){return this._eventHandler.destroy(),n(this)},f}),define("Cesium/Widgets/CesiumInspector/CesiumInspector",["../../Core/defined","../../Core/defineProperties","../../Core/destroyObject","../../Core/DeveloperError","../../ThirdParty/knockout","../getElement","./CesiumInspectorViewModel"],function(e,t,i,n,r,o,a){"use strict";function s(t,i){if(!e(t))throw new n("container is required.");if(!e(i))throw new n("scene is required.");t=o(t);var s=document.createElement("div"),l=new a(i,s);this._viewModel=l,this._container=t;var u=document.createElement("div");this._element=u;var c=document.createElement("div");c.textContent="Cesium Inspector",c.className="cesium-cesiumInspector-button",c.setAttribute("data-bind","click: toggleDropDown"),u.appendChild(c),u.className="cesium-cesiumInspector",u.setAttribute("data-bind",'css: { "cesium-cesiumInspector-visible" : dropDownVisible, "cesium-cesiumInspector-hidden" : !dropDownVisible }'),t.appendChild(this._element);var h=document.createElement("div");this._panel=h,h.className="cesium-cesiumInspector-dropDown",u.appendChild(h);var d=document.createElement("div");d.className="cesium-cesiumInspector-sectionHeader";var p=document.createElement("span");p.className="cesium-cesiumInspector-toggleSwitch",p.setAttribute("data-bind","click: toggleGeneral, text: generalSwitchText"),d.appendChild(p),d.appendChild(document.createTextNode("General")),h.appendChild(d);var m=document.createElement("div");m.className="cesium-cesiumInspector-section",m.setAttribute("data-bind",'css: {"cesium-cesiumInspector-show" : generalVisible, "cesium-cesiumInspector-hide" : !generalVisible}'),h.appendChild(m);var f=document.createElement("div");m.appendChild(f);var g=document.createElement("div");g.className="cesium-cesiumInspector-frustumStats",g.setAttribute("data-bind",'css: {"cesium-cesiumInspector-show" : frustums, "cesium-cesiumInspector-hide" : !frustums}, html: frustumStatisticText');var v=document.createElement("input");v.type="checkbox",v.setAttribute("data-bind","checked: frustums, click: showFrustums"),f.appendChild(v),f.appendChild(document.createTextNode("Show Frustums")),f.appendChild(g);var _=document.createElement("div");m.appendChild(_);var y=document.createElement("input");y.type="checkbox",y.setAttribute("data-bind","checked: performance, click: showPerformance"),_.appendChild(y),_.appendChild(document.createTextNode("Performance Display")),s.className="cesium-cesiumInspector-performanceDisplay",m.appendChild(s);var C=document.createElement("div");C.className="cesium-cesiumInspector-shaderCache",C.setAttribute("data-bind","html: shaderCacheText"),m.appendChild(C);var w=document.createElement("div");m.appendChild(w);var E=document.createElement("input");E.type="checkbox",E.setAttribute("data-bind","checked: globeDepth, click: showGlobeDepth"),w.appendChild(E),w.appendChild(document.createTextNode("Show globe depth"));var b=document.createElement("div");w.appendChild(b);var S=document.createElement("div");m.appendChild(S);var T=document.createElement("input");T.type="checkbox",T.setAttribute("data-bind","checked: pickDepth, click: showPickDepth"),S.appendChild(T),S.appendChild(document.createTextNode("Show pick depth"));var x=document.createElement("div");m.appendChild(x);var A=document.createElement("span");A.setAttribute("data-bind",'html: "     Frustum:"'),x.appendChild(A);var P=document.createElement("span");P.setAttribute("data-bind","text: depthFrustumText"),x.appendChild(P);var M=document.createElement("input");M.type="button",M.value="-",M.className="cesium-cesiumInspector-pickButton",M.setAttribute("data-bind","click: decrementDepthFrustum"),x.appendChild(M);var D=document.createElement("input");D.type="button",D.value="+",D.className="cesium-cesiumInspector-pickButton",D.setAttribute("data-bind","click: incrementDepthFrustum"),x.appendChild(D);var I=document.createElement("div");I.className="cesium-cesiumInspector-sectionHeader",p=document.createElement("span"),p.className="cesium-cesiumInspector-toggleSwitch",p.setAttribute("data-bind","click: togglePrimitives, text: primitivesSwitchText"),I.appendChild(p),I.appendChild(document.createTextNode("Primitives")),h.appendChild(I);var R=document.createElement("div");R.className="cesium-cesiumInspector-section",R.setAttribute("data-bind",'css: {"cesium-cesiumInspector-show" : primitivesVisible, "cesium-cesiumInspector-hide" : !primitivesVisible}'),h.appendChild(R);var O=document.createElement("div");O.className="cesium-cesiumInspector-pickSection",R.appendChild(O);var L=document.createElement("input");L.type="button",L.value="Pick a primitive",L.className="cesium-cesiumInspector-pickButton",L.setAttribute("data-bind",'css: {"cesium-cesiumInspector-pickButtonHighlight" : pickPrimitiveActive}, click: pickPrimitive');var N=document.createElement("div");N.className="cesium-cesiumInspector-center",N.appendChild(L),O.appendChild(N);var F=document.createElement("div");O.appendChild(F);var k=document.createElement("input");k.type="checkbox",k.setAttribute("data-bind","checked: primitiveBoundingSphere, click: showPrimitiveBoundingSphere, enable: hasPickedPrimitive"),F.appendChild(k),F.appendChild(document.createTextNode("Show bounding sphere"));var B=document.createElement("div");O.appendChild(B);var z=document.createElement("input");z.type="checkbox",z.setAttribute("data-bind","checked: primitiveReferenceFrame, click: showPrimitiveReferenceFrame, enable: hasPickedPrimitive"),B.appendChild(z),B.appendChild(document.createTextNode("Show reference frame"));var V=document.createElement("div");this._primitiveOnly=V,O.appendChild(V);var U=document.createElement("input");U.type="checkbox",U.setAttribute("data-bind","checked: filterPrimitive, click: doFilterPrimitive, enable: hasPickedPrimitive"),V.appendChild(U),V.appendChild(document.createTextNode("Show only selected"));var G=document.createElement("div");G.className="cesium-cesiumInspector-sectionHeader",p=document.createElement("span"),p.className="cesium-cesiumInspector-toggleSwitch",p.setAttribute("data-bind","click: toggleTerrain, text: terrainSwitchText"),G.appendChild(p),G.appendChild(document.createTextNode("Terrain")),h.appendChild(G);var W=document.createElement("div");W.className="cesium-cesiumInspector-section",W.setAttribute("data-bind",'css: {"cesium-cesiumInspector-show" : terrainVisible, "cesium-cesiumInspector-hide" : !terrainVisible}'),h.appendChild(W);var H=document.createElement("div");H.className="cesium-cesiumInspector-pickSection",W.appendChild(H);var q=document.createElement("input");q.type="button",q.value="Pick a tile",q.className="cesium-cesiumInspector-pickButton",q.setAttribute("data-bind",'css: {"cesium-cesiumInspector-pickButtonHighlight" : pickTileActive}, click: pickTile'),N=document.createElement("div"),N.appendChild(q),N.className="cesium-cesiumInspector-center",H.appendChild(N);var j=document.createElement("div");H.appendChild(j);var Y=document.createElement("input");Y.type="button",Y.value="Parent",Y.className="cesium-cesiumInspector-pickButton",Y.setAttribute("data-bind","click: selectParent");var X=document.createElement("input");X.type="button",X.value="NW",X.className="cesium-cesiumInspector-pickButton",X.setAttribute("data-bind","click: selectNW");var Z=document.createElement("input");Z.type="button",Z.value="NE",Z.className="cesium-cesiumInspector-pickButton",Z.setAttribute("data-bind","click: selectNE");var K=document.createElement("input");K.type="button",K.value="SW",K.className="cesium-cesiumInspector-pickButton",K.setAttribute("data-bind","click: selectSW");var J=document.createElement("input");J.type="button",J.value="SE",J.className="cesium-cesiumInspector-pickButton",J.setAttribute("data-bind","click: selectSE");var Q=document.createElement("div");Q.className="cesium-cesiumInspector-tileText",j.className="cesium-cesiumInspector-frustumStats",j.appendChild(Q),j.setAttribute("data-bind",'css: {"cesium-cesiumInspector-show" : hasPickedTile, "cesium-cesiumInspector-hide" : !hasPickedTile}'),Q.setAttribute("data-bind","html: tileText");var $=document.createElement("div");$.className="cesium-cesiumInspector-relativeText",$.textContent="Select relative:",j.appendChild($);var ee=document.createElement("table"),te=document.createElement("tr"),ie=document.createElement("tr"),ne=document.createElement("td");ne.appendChild(Y);var re=document.createElement("td");re.appendChild(X);var oe=document.createElement("td");oe.appendChild(Z),te.appendChild(ne),te.appendChild(re),te.appendChild(oe);var ae=document.createElement("td"),se=document.createElement("td");se.appendChild(K);var le=document.createElement("td");le.appendChild(J),ie.appendChild(ae),ie.appendChild(se),ie.appendChild(le),ee.appendChild(te),ee.appendChild(ie),j.appendChild(ee);var ue=document.createElement("div");H.appendChild(ue);var ce=document.createElement("input");ce.type="checkbox",ce.setAttribute("data-bind","checked: tileBoundingSphere, enable: hasPickedTile, click: showTileBoundingSphere"),ue.appendChild(ce),ue.appendChild(document.createTextNode("Show bounding volume"));var he=document.createElement("div");H.appendChild(he);var de=document.createElement("input");de.type="checkbox",de.setAttribute("data-bind","checked: filterTile, enable: hasPickedTile, click: doFilterTile"),he.appendChild(de),he.appendChild(document.createTextNode("Show only selected"));var pe=document.createElement("div");W.appendChild(pe);var me=document.createElement("input");me.type="checkbox",me.setAttribute("data-bind","checked: wireframe, click: showWireframe"),pe.appendChild(me),pe.appendChild(document.createTextNode("Wireframe"));var fe=document.createElement("div");W.appendChild(fe);var ge=document.createElement("input");ge.type="checkbox",ge.setAttribute("data-bind","checked: suspendUpdates, click: doSuspendUpdates"),fe.appendChild(ge),fe.appendChild(document.createTextNode("Suspend LOD update"));var ve=document.createElement("div");W.appendChild(ve);var _e=document.createElement("input");_e.type="checkbox",_e.setAttribute("data-bind","checked: tileCoordinates, click: showTileCoordinates"),ve.appendChild(_e),ve.appendChild(document.createTextNode("Show tile coordinates")),r.applyBindings(l,this._element)}return t(s.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),s.prototype.isDestroyed=function(){return!1},s.prototype.destroy=function(){return r.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),i(this)},s}),define("Cesium/Widgets/CesiumWidget/CesiumWidget",["../../Core/buildModuleUrl","../../Core/Cartesian3","../../Core/Clock","../../Core/Credit","../../Core/defaultValue","../../Core/defined","../../Core/defineProperties","../../Core/destroyObject","../../Core/DeveloperError","../../Core/Ellipsoid","../../Core/FeatureDetection","../../Core/formatError","../../Core/requestAnimationFrame","../../Core/ScreenSpaceEventHandler","../../Scene/BingMapsImageryProvider","../../Scene/Globe","../../Scene/Moon","../../Scene/Scene","../../Scene/SceneMode","../../Scene/SkyAtmosphere","../../Scene/SkyBox","../../Scene/Sun","../getElement"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g,v,_,y,C,w,E){"use strict";function b(t){return e("Assets/Textures/SkyBox/tycho2t3_80_"+t+".jpg")}function S(e){function t(n){if(!e.isDestroyed())if(e._useDefaultRenderLoop)try{var r=e._targetFrameRate;if(o(r)){var a=1e3/r,s=n-i;s>a&&(e.resize(),e.render(),i=n-s%a),d(t)}else e.resize(),e.render(),d(t)}catch(l){if(e._useDefaultRenderLoop=!1,e._renderLoopRunning=!1,e._showRenderLoopErrors){var u="An error occurred while rendering. Rendering has stopped.";e.showErrorPanel(u,void 0,l)}}else e._renderLoopRunning=!1}e._renderLoopRunning=!0;var i=0;d(t)}function T(e){var t=e._canvas,i=t.clientWidth,n=t.clientHeight,o=e._resolutionScale;e._supportsImageRenderingPixelated||(o*=r(window.devicePixelRatio,1)),e._canvasWidth=i,e._canvasHeight=n,i*=o,n*=o,t.width=i,t.height=n,e._canRender=0!==i&&0!==n}function x(e){var t=e._canvas,i=t.width,n=t.height;if(0!==i&&0!==n){var r=e._scene.camera.frustum;o(r.aspectRatio)?r.aspectRatio=i/n:(r.top=r.right*(n/i),r.bottom=-r.top)}}function A(e,a){e=E(e),a=r(a,{});var s=document.createElement("div");s.className="cesium-widget",e.appendChild(s);var l=document.createElement("canvas"),h=c.supportsImageRenderingPixelated();this._supportsImageRenderingPixelated=h,h&&(l.style.imageRendering=c.imageRenderingValue()),l.oncontextmenu=function(){return!1},l.onselectstart=function(){return!1},s.appendChild(l);var d=document.createElement("div");d.className="cesium-widget-credits";var S=o(a.creditContainer)?E(a.creditContainer):s;S.appendChild(d);var A=r(a.showRenderLoopErrors,!0);this._element=s,this._container=e,this._canvas=l,this._canvasWidth=0,this._canvasHeight=0,this._creditContainer=d,this._canRender=!1,this._renderLoopRunning=!1,this._showRenderLoopErrors=A,this._resolutionScale=1,this._forceResize=!1,this._clock=o(a.clock)?a.clock:new i,T(this);try{var M=new v({canvas:l,contextOptions:a.contextOptions,creditContainer:d,mapProjection:a.mapProjection,orderIndependentTranslucency:a.orderIndependentTranslucency,scene3DOnly:r(a.scene3DOnly,!1),terrainExaggeration:a.terrainExaggeration,shadows:a.shadows,mapMode2D:a.mapMode2D});this._scene=M,M.camera.constrainedAxis=t.UNIT_Z,x(this);var D=r(M.mapProjection.ellipsoid,u.WGS84),I=M.frameState.creditDisplay,R=new n("Cesium",P,"http://cesiumjs.org/");I.addDefaultCredit(R);var O=a.globe;o(O)||(O=new f(D)),O!==!1&&(M.globe=O,M.globe.castShadows=r(a.terrainShadows,!1));var L=a.skyBox;o(L)||(L=new C({sources:{positiveX:b("px"),negativeX:b("mx"),positiveY:b("py"),negativeY:b("my"),positiveZ:b("pz"),negativeZ:b("mz")}})),L!==!1&&(M.skyBox=L,M.sun=new w,M.moon=new g);var N=a.skyAtmosphere;o(N)||(N=new y(D)),N!==!1&&(M.skyAtmosphere=N);var F=a.globe===!1?!1:a.imageryProvider;o(F)||(F=new m({url:"https://dev.virtualearth.net"})),F!==!1&&M.imageryLayers.addImageryProvider(F),o(a.terrainProvider)&&a.globe!==!1&&(M.terrainProvider=a.terrainProvider),this._screenSpaceEventHandler=new p(l,!1),o(a.sceneMode)&&(a.sceneMode===_.SCENE2D&&this._scene.morphTo2D(0),a.sceneMode===_.COLUMBUS_VIEW&&this._scene.morphToColumbusView(0)),this._useDefaultRenderLoop=void 0,this.useDefaultRenderLoop=r(a.useDefaultRenderLoop,!0),this._targetFrameRate=void 0,this.targetFrameRate=a.targetFrameRate;var k=this;M.renderError.addEventListener(function(e,t){if(k._useDefaultRenderLoop=!1,k._renderLoopRunning=!1,k._showRenderLoopErrors){var i="An error occurred while rendering. Rendering has stopped.";k.showErrorPanel(i,void 0,t)}})}catch(B){if(A){var z="Error constructing CesiumWidget.",V='Visit <a href="http://get.webgl.org">http://get.webgl.org</a> to verify that your web browser and hardware support WebGL. Consider trying a different web browser or updating your video drivers. Detailed error information is below:';this.showErrorPanel(z,V,B)}throw B}}var P="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHYAAAAaCAYAAABikagwAAAAAXNSR0IArs4c6QAAAAlwSFlzAAAN1wAADdcBQiibeAAAAAd0SU1FB9wGGRQyF371QVsAABOHSURBVGje7Vp5cFTHmf91v2Nm3owGnYMuEEJCOBiEjDlsDMYQjGMOOwmXcWxiLywpJ9iuTXZd612corJssFOxi8LerXizxEGUvWsivNxxHHCQ8WYBYSFzmUMCCXQjaUajOd/V+4f6Kc14kI/KZv/xq+p6M/PmO15/9/c1wa0vwpcMQAHgBuAFoPG7mz8jAGwASQBxADFhJQGYACwAjK+vrr/AJQ8jVMqfuwH4AGQByAaQnTNqXGHWqHGFbq8/g1BJsgw9GQ12Bds/qWsxEvEeAEEAfQDCAKKCgPGVcP//BOsIVQHgAZAJIACgsHTqvDvK7150T2bR2DFaZm6W4slwUypR20yaiUg4OtDbcaP36rlPPt6/7f2B3q5mAB0AeriAE18J9y93kVu4X4W73BwAhQBK5v/gZ98ZVXXvDG92IJMx569MQDEoK0tPmOHu1s4L7799sH7vtvcAXAPQCaCfu2qLu+7h+Eh3sS8Bcyt48iVgPos2+4J7jS+BIx2etDBSynfH/Xq46y0CUL70n3/zXMmUuXepWoZHFCQhFIQARCBFJYV6/Nn+QHnVBH9Ovq/51JFWADpfJhcqEzyDcx9ukTTr/xr2VnDpng0nuHR0h1u3wvWF6EspgBIAFYAfQAGAsuU/rfm7kePvvJ0QiTj6QSgBISS9ujEGSikkxaXklIwfK8uK2Xru2HVurWKspZyezGmmWwp/LqVsupPQub4grPQ5YIejKQvPJAGflLLJSBGmxPEqKXhU4XdJEBq7BR5Z+L+DKx3MTTHWEaybx9WCud/btCJQMeX2Qevk+NPoks0YPArF/RUj0NyXxOmO2CAy1a1OmL9yUVfTmatXTx52EildYFQVNlgRmBR1xQJgCBbPBAVUhcw8lTObLz0FVk4RIEmJJyJNZzFBiCTFBRL+f50rriFUATRFiZSU/XYEAw6X5LlIUghZqXvl5p8pfycRZsgjymlKGw1Adm7JbRUVs785nwGghP5pp9mfFMOxWstmuC3gwdcrRqA/buJUWwyKRMAYgydrZNZt9337623njn+ixyN9nAmdM5nBvYOPfxc3mnEmTQ4T5VZv8hfz8aUKnocJd5tvVhxAhOMADzNefleFjRUFa/D/xzi8LQhIEpTG4VXnNBzlZYISufk7juCfqaAoLkHYcZ6HBAEM8O+ObJz3HcFDpJfDJwWYfiHMMTklviocKHv6I3+zRFLdKhEEatmALBFIBIibNhQ6KFyJEjT2JHDoUj/a+nVIVIBhBGOnzptWXzhmTFfT2TZBOH4AgSeeeGJqRUVFqdfr9btcLnVQXwapmqZpJZPJRCgUCh47duzie++9dwWAXl5enrlp06bF0WhUM01TYYwRrmg2vzNKqS3Lsunz+Yy6urpTP//5z09blkVLSkryVq9ePT03NzegqqqbUnqTGyOEMNM0k319fX2///3vz9bW1l4DYD700EPFy5Ytm65pmvbBBx9c2rp166Wnnnqq7MEHH5zAGIu8/vrr+w8ePPgJVwrRO2gAcg8cOLA2mUx62tvbB9avX39s+fLlo++///5JXNiwbXugpqam9tChQ2cEj6NzuQwlsi+//PKSzMzMQtu2qcfjMZqbm09v2LDht4J3sQEQOU2Jo8mKKzt7VEU5lSgFBi3PZkBZrgv3lGbCo1Jc7I7iSGN40JcQgoGkhXdO94ESQJEoGI+1k/M9mDKqQHEv++akl186e45rNAAE3njjjccWLFhwfyAQyJEkiabGbcc7JJNJva2trX3Lli3vvPbaa+eKi4uLV6xY8d10cf5TcZ8x5OXl5b366qs9lFLtrbfeWldVVXW7pmkuxhjS0SSEIJlMGitXrrz2/PPPv1lTU3NtypQp0x955JG/kmVZdrlcR7du3WrOnTt33pIlS+YDwNGjR68ePHiwjVtukm+wI9ichQsXPgUAHR0d3evXr78xc+bMu9asWbOQUjpENz8/v/jQoUP/IiiH40UzAeQvW7Zs1rp16/7a5/NpDr/19fWlGzZsOM4tNsphkc5iPaXTvl6uuDUvY4MZLwNQ4Ffw+LR8+KQQTCuJSQUFcMsEe88FoSkSKCFwyWSISQbg9pEefHdGAJHIdUydVjFecL3K448/Pm3hwoUPBAKBHFGIlmU5pRCRpMGEze12q2PHjh2zatWqeTt37gwODAxkOQIJhUJ6Y2Njn6IojFJqE0KYsGyPx0POnTvXnUgkfGvXrr1j5syZU7iFsKampv5YLBZ34GzbJgAwatSo7MzMTE95eXnZT37yk0dramr+PRQKZSQSCdPn88nBYNADID8UCmkAYBiGGQ6Hna6cksbdZliWZUuSRKPRKAAUBINBfywWM30+n+yEtenTp9+5YsWKGTt37oxwz+a44RwARc8+++xSr9eriQrY398v8311CUncTTHN0Q7Vl1OQJymq4iBwyxQPT8qDVwri1d1/i8ttp/AP39mOBeMn41pQx9mOGFSZ3qT52ZqMR6aMRGvXKfzbgX9Ea3PnSLEdOWXKlK/5/X4/AFy8ePHG6tWr90QikS5VVaOEEIsxRhljngcffLBi8+bNjxBCUFJSMrKkpMRvGIbboXP27Nn+2bNn/3cgEIgSQmKEEAOARQixKKVxRVEioVAoYtu2dMcdd4x24Hbv3t3+ox/96ONoNBqklMa4ppNkMinNnz8///nnn6/y+Xw0mUxaANy6rrsdl28YhguAX9d1F98jwn9TUjJkJ5N1DWV0ti0ByDAMw+PsbzQatX0+Hy0oKMhcvnz5nP3791+IxWJRIUaPfO655+ZVVlaOA4BoNGprmkZ5uJJThZouKyYAqOrWVEKoE7cwszQDlQUK3jr8S5y++iEIIXh55/fwylOH8e3KHHSEdfQnLFBuRbJEsLQyF27Sh3eO/iuudV+EaSuqkJF6MjMzs9xutwIAv/rVr06eOHHiEwCtPBHQOaPaxYsXLxcXF8cKCwtzOzo6+ltbW4OFhYU+h2nDMAgAqbu7W8xkLSEBcsos1bbtocZIIBBQs7Ky5Pb2dkvXdV1wfaipqemsqak5yF1bFABljNEU4Sj87nia1LKHCJWGLLh6AkDhiksAoLq6um/VqlWZWVlZ8gMPPHDHwoULK2tqasJcYJ7y8vKyb33rW/f4/X43YwybNm26vnnz5pIUb0tvVe44maSVjEfizDJtmwFlOS4srczGiQvv4ncnd4ASAkIo+mN92LLrB/j7Vb/GQxOz8Z/1PTDsQXc6p3QEqopU7Dr6S5y8fAiKpCKhs6SQSUqyLKsO4d7e3j4AvbxD1csFQQF4EolEaP369TVCFjuiqKiogG8w5s6dm8sY++ZwcfbZZ5/dvHXr1isnT55scVz+rFmz8urr6xc4Ls22bZZIJExd181oNGr09PREDx06dPmFF144Ho/HTVGIjiE4guECoyl1LYTPcppGEAghDAAikUjixRdfbHnppZfKfD6fa82aNfMOHz7cHgwGbwBwr1ix4u677rqrgsfU4I4dO66lCPZTXSkqpOaMa60e7mjuosw0RmYoWHf3SLT3NOKt91+CbsZBeOlDCcX5luP4rw9fw4wSH+4p9cMlU3xtpAfLJmej/vIR7PnjLyDRwXeKhoxubokWAOYkDXxTLE5brB11oTZMCrWoNQgymJwZhsHC4bAZjUaNaDRqxGIx3VnxeDzJky8TQGLHjh3n9u3bd6ytrS3U2dkZ6e3tjfX398cHBgYS8XjcIIQQr9frKioq8ldWVhb88Ic/vHfbtm3zAXhs25aHUx7uEt1COeXEXM3JfAWLvWnSxRhLbNu2rampqSlMCME3vvGNyXPmzKkCUFZeXn776tWr72WMwbZtvPDCCx+5XK6wo6BcOdhwQ4Chuu/KR39onDGS9T80u9ivkgiqD/0UbT2NcKvelMaEhXfrqlGaPwEPT5qH0lwvqopcaOtpxPb3/gmGmYBEFRBC0HUlfp67tQQALxMKYsaYU+tlcSadNN8NIOO+++4bnZ2d7Q+Hw+zIkSNJxtiQ9TQ1NUW3bNnSmJWVlZBlWaeUWs5SVTUxYsSIRF1dXScAwzTN2MMPP7w3Pz//ZFVVVUFubq7L6/VKmqZRl8ulKIriVlVVmz59ev6cOXMCLpeLLliwYDyAOpGm08SglA659mQy6eHTrwiPtRYXbi6vP2/yjI61AoDL5Ur09vZ2bt++/ezGjRvvppSSjRs3Lti9e/fvnnzyyfHjx48fyRjDwYMHL9TW1jYWFhZ6xfIs3UhUTlPQRwGE9Gv/c/ba9YGi2rPv0FONf/iUUB3Lj8SDqD60GYtmdGBcYSVOnL+K39b9Gp19zVDkwZzBSpLY9Qv9Z3lKHgOgmaYZd9zg1KlTS994441L3G3lcD6oo/1btmxZFwgEctrb27vWrFlzwLIs2cmKW1pa4q+//vp1AbchdIKiPGZHAJDFixcHpk+ffnsoFNLefvvt3ra2Nl0YSDhdt4zy8vLwsWPHsl0ul6ooigSACuEZXKBJwzAMxhhUVZW8Xm8uH5hQ3mCwOf95VVVVYx03yQVhUEpNQbBxADfefPPN6NKlS8dUVlYWVlZW5r344osz1q1bV8IYQzAYjFVXV5+IxWIdkiTlpfDCUgcC6Sw2CqBvw4ZN+7/9d+Wzo1avT5HU9N1tMpj4dfU14z/efxletx9xPYpIPAhVccO2bVBKcf189I/h3mSLkBi5b9y40RWLxZJer9f12GOPTa6oqMjq6enpJYQYlFLGyx21tLQ0MGnSpDGEECQSCZMQIjuNCF6aqI8++mheVlZWJrdYkzcoLEVREj6fL1FfX39x165dzfPnzy/7/ve/v1LXdWvlypVde/bsuRKLxQyn1LEsS2aMeebNm1fs8/lkxhgsy7IAJBRF0Yc2TZZ1AANNTU0djoJt2rRpzqxZs/K6urq6JUnSCSHMMAxZ07SsxYsXV1JKCWMMAwMDMQBhVVWTjtU6gr1y5Yq1d+/ej8aNG5eraZr6zDPPjPV4PBJjDLW1ted27dr1MYCYqqpDcpMkyRIaEyydxToxNgagr7e3t+XEe0rNxPkjnvhTznNr4Sb0KBL6YO9BovJQnRXptTqaPgr9wTLsDgAhTkOurq4+unz58vs1TRvl9/vVuXPnljHGxgqxw2GcEjLYJLlw4cKV06dPd06bNo04+MePH+/ftm3bNNG1iW5KVVVl//79ew4cONC8d+/ey88884ysKIp85513jpo8eXJh2pHX4EUIITh58uRFAN1utzvHcb0ejycGoKuurk5vbW29u7i4ODB69OisJ5988i4xxDhsKIoiEUJgmqZ94MCBOgBdmqaVODxrmhbhiaP+4x//+N2lS5dOmjBhwhiPxyMBQFdXV191dfX7tm23AdBdLtdQzFYUxWmb3iRcmqbh7vQfOz9+v/PdjvP6kcHuE288MJZWuM4Smw1mgkQvHw/v6Wga+BjADY53AEDfmTNnLq9du/Znp06datB13RA3ROwGmaZphcPhgX379v326aefftO27Tafz9fJGGOmadqMMSbLMpEkiaZbjDFommYQQsK1tbWNr7zyymvhcLifEIJbwRBCmGVZ1vHjxz9atGjRLwA0Z2dndzpdHb/fHwTQcuLEiYann3761fPnz3+i67pBCCGUUkoIofwjpZQS27ZZd3f3ja1bt1Zv3LhxL4CrmZmZPYQQkxCCjIyMEIB2AG0Amrdv3/6beDweNwzD1nXdPHXq1Indu3cf48+7MjIyupw98ng8EW4wCWH4kHbQLgsnJ4oAlN332Ji1hbeps6lEaLohQLrhQCJi9zcei77TcLh9H4CrALp4rLN5LBvBE4scAP6JEyfmBQIBL6VUopSCMcYGBgYSly5dCvX19YW5QkQAmD6fz3PvvfeWxmIxr2EYHqFXPBRrKKWWJEmG1+uNtbW1dTU0NNzgz7wA/OXl5bkFBQV+XsYQwVpZMpk0jh8/3snpRQCYo0aN8k6YMCHX5XLRa9euBRsaGnr4Jnp458c7ceLEbK/X6xL5MQzDbGhoCNq2HeO4YgBYWVmZv6KiIkdVVbS0tHQ3NDR0CsORrDlz5oyllHoYY3p9ff31cDjczeGhaVrGkiVLSg3DkLu7u/s+/PDDFn4UKeJYLhnmAJvGs9QCAKOnLMhfNHqSNl/LlHOpTORbWa4et2ORXqv1wgf9NVfO9B7nTYcuPvlICq02t9CJ8ggjOJomodOF0ZQtHNvxCC08pBnbmcIhO53jdA7mpXaKUkOSWGoxYaaKlIa7IozT0uET+XDGehDGhhBGb6bTmBHezeb8OyNPCPQk/ptzeHConCSfcZDNI1hWQXaBVl5254hZmSPVce4MKUdxEQ+VJMnUbcNIWJFoyOzoa02eOX2k+yg/79TFNWkgZchOUobe4vA63WzUEmpYsa+dCoM0Izgz5aQkTUOPpGvUpKFJBaUR8Q03cLdT8NkppyEgPGOCYcnCiNASsn2SwrstDA2Gxnbkc5xSdHGrcmaBWYoqZ+YUe4pcXuqXJCobupWIhaze3vZohzAfdOaKN2mSwPxwR0ZSZ6uptZoIN9yxFCYIiqV5v3THStgwNNPhvtXxFgzDP9K8q52Cj6ZRNnaLffoUDfI5zhVLgrvxCN0Ux5URYXYYF84Wf2qqf4uDV591ZuiLHir7c8F+mZOU5M+Iazg8n3mYjnxORkV3I6dxg6KrMQW3Yaexlq+uv8D1v2IL+t4z3B/NAAAAAElFTkSuQmCC";return a(A.prototype,{container:{get:function(){return this._container; +}},canvas:{get:function(){return this._canvas}},creditContainer:{get:function(){return this._creditContainer}},scene:{get:function(){return this._scene}},imageryLayers:{get:function(){return this._scene.imageryLayers}},terrainProvider:{get:function(){return this._scene.terrainProvider},set:function(e){this._scene.terrainProvider=e}},camera:{get:function(){return this._scene.camera}},clock:{get:function(){return this._clock}},screenSpaceEventHandler:{get:function(){return this._screenSpaceEventHandler}},targetFrameRate:{get:function(){return this._targetFrameRate},set:function(e){if(0>=e)throw new l("targetFrameRate must be greater than 0, or undefined.");this._targetFrameRate=e}},useDefaultRenderLoop:{get:function(){return this._useDefaultRenderLoop},set:function(e){this._useDefaultRenderLoop!==e&&(this._useDefaultRenderLoop=e,e&&!this._renderLoopRunning&&S(this))}},resolutionScale:{get:function(){return this._resolutionScale},set:function(e){if(0>=e)throw new l("resolutionScale must be greater than 0.");this._resolutionScale=e,this._forceResize=!0}}}),A.prototype.showErrorPanel=function(e,t,i){function n(){u.style.maxHeight=Math.max(Math.round(.9*r.clientHeight-100),30)+"px"}var r=this._element,a=document.createElement("div");a.className="cesium-widget-errorPanel";var s=document.createElement("div");s.className="cesium-widget-errorPanel-content",a.appendChild(s);var l=document.createElement("div");l.className="cesium-widget-errorPanel-header",l.appendChild(document.createTextNode(e)),s.appendChild(l);var u=document.createElement("div");if(u.className="cesium-widget-errorPanel-scroll",s.appendChild(u),n(),o(window.addEventListener)&&window.addEventListener("resize",n,!1),o(t)){var c=document.createElement("div");c.className="cesium-widget-errorPanel-message",c.innerHTML="<p>"+t+"</p>",u.appendChild(c)}var d="(no error details available)";o(i)&&(d=h(i));var p=document.createElement("div");p.className="cesium-widget-errorPanel-message",p.appendChild(document.createTextNode(d)),u.appendChild(p);var m=document.createElement("div");m.className="cesium-widget-errorPanel-buttonPanel",s.appendChild(m);var f=document.createElement("button");f.setAttribute("type","button"),f.className="cesium-button",f.appendChild(document.createTextNode("OK")),f.onclick=function(){o(n)&&o(window.removeEventListener)&&window.removeEventListener("resize",n,!1),r.removeChild(a)},m.appendChild(f),r.appendChild(a),"undefined"!=typeof console&&console.error(e+"\n"+t+"\n"+d)},A.prototype.isDestroyed=function(){return!1},A.prototype.destroy=function(){this._scene=this._scene&&this._scene.destroy(),this._container.removeChild(this._element),s(this)},A.prototype.resize=function(){var e=this._canvas,t=e.clientWidth,i=e.clientHeight;(this._forceResize||this._canvasWidth!==t||this._canvasHeight!==i)&&(this._forceResize=!1,T(this),x(this))},A.prototype.render=function(){if(this._canRender){this._scene.initializeFrame();var e=this._clock.tick();this._scene.render(e)}else this._clock.tick()},A}),define("Cesium/Widgets/ClockViewModel",["../Core/Clock","../Core/defined","../Core/defineProperties","../Core/destroyObject","../Core/EventHelper","../Core/JulianDate","../ThirdParty/knockout"],function(e,t,i,n,r,o,a){"use strict";function s(i){t(i)||(i=new e),this._clock=i,this._eventHelper=new r,this._eventHelper.add(i.onTick,this.synchronize,this),this.systemTime=a.observable(o.now()),this.systemTime.equalityComparer=o.equals,this.startTime=a.observable(i.startTime),this.startTime.equalityComparer=o.equals,this.startTime.subscribe(function(e){i.startTime=e,this.synchronize()},this),this.stopTime=a.observable(i.stopTime),this.stopTime.equalityComparer=o.equals,this.stopTime.subscribe(function(e){i.stopTime=e,this.synchronize()},this),this.currentTime=a.observable(i.currentTime),this.currentTime.equalityComparer=o.equals,this.currentTime.subscribe(function(e){i.currentTime=e,this.synchronize()},this),this.multiplier=a.observable(i.multiplier),this.multiplier.subscribe(function(e){i.multiplier=e,this.synchronize()},this),this.clockStep=a.observable(i.clockStep),this.clockStep.subscribe(function(e){i.clockStep=e,this.synchronize()},this),this.clockRange=a.observable(i.clockRange),this.clockRange.subscribe(function(e){i.clockRange=e,this.synchronize()},this),this.canAnimate=a.observable(i.canAnimate),this.canAnimate.subscribe(function(e){i.canAnimate=e,this.synchronize()},this),this.shouldAnimate=a.observable(i.shouldAnimate),this.shouldAnimate.subscribe(function(e){i.shouldAnimate=e,this.synchronize()},this),a.track(this,["systemTime","startTime","stopTime","currentTime","multiplier","clockStep","clockRange","canAnimate","shouldAnimate"])}return i(s.prototype,{clock:{get:function(){return this._clock}}}),s.prototype.synchronize=function(){var e=this._clock;this.systemTime=o.now(),this.startTime=e.startTime,this.stopTime=e.stopTime,this.currentTime=e.currentTime,this.multiplier=e.multiplier,this.clockStep=e.clockStep,this.clockRange=e.clockRange,this.canAnimate=e.canAnimate,this.shouldAnimate=e.shouldAnimate},s.prototype.isDestroyed=function(){return!1},s.prototype.destroy=function(){this._eventHelper.removeAll(),n(this)},s}),define("Cesium/Widgets/Command",["../Core/DeveloperError"],function(e){"use strict";function t(){this.canExecute=void 0,this.beforeExecute=void 0,this.afterExecute=void 0,e.throwInstantiationError()}return t}),define("Cesium/Widgets/FullscreenButton/FullscreenButtonViewModel",["../../Core/defaultValue","../../Core/defineProperties","../../Core/destroyObject","../../Core/DeveloperError","../../Core/Fullscreen","../../ThirdParty/knockout","../createCommand","../getElement"],function(e,t,i,n,r,o,a,s){"use strict";function l(t){var i=this,n=o.observable(r.fullscreen),l=o.observable(r.enabled);this.isFullscreen=void 0,o.defineProperty(this,"isFullscreen",{get:function(){return n()}}),this.isFullscreenEnabled=void 0,o.defineProperty(this,"isFullscreenEnabled",{get:function(){return l()},set:function(e){l(e&&r.enabled)}}),this.tooltip=void 0,o.defineProperty(this,"tooltip",function(){return this.isFullscreenEnabled?n()?"Exit full screen":"Full screen":"Full screen unavailable"}),this._command=a(function(){r.fullscreen?r.exitFullscreen():r.requestFullscreen(i._fullscreenElement)},o.getObservable(this,"isFullscreenEnabled")),this._fullscreenElement=e(s(t),document.body),this._callback=function(){n(r.fullscreen)},document.addEventListener(r.changeEventName,this._callback)}return t(l.prototype,{fullscreenElement:{get:function(){return this._fullscreenElement},set:function(e){this._fullscreenElement=e}},command:{get:function(){return this._command}}}),l.prototype.isDestroyed=function(){return!1},l.prototype.destroy=function(){document.removeEventListener(r.changeEventName,this._callback),i(this)},l}),define("Cesium/Widgets/FullscreenButton/FullscreenButton",["../../Core/defined","../../Core/defineProperties","../../Core/destroyObject","../../Core/DeveloperError","../../ThirdParty/knockout","../getElement","./FullscreenButtonViewModel"],function(e,t,i,n,r,o,a){"use strict";function s(e,t){e=o(e);var i=new a(t);i._exitFullScreenPath=u,i._enterFullScreenPath=l;var n=document.createElement("button");n.type="button",n.className="cesium-button cesium-fullscreenButton",n.setAttribute("data-bind","attr: { title: tooltip },click: command,enable: isFullscreenEnabled,cesiumSvgPath: { path: isFullscreen ? _exitFullScreenPath : _enterFullScreenPath, width: 128, height: 128 }"),e.appendChild(n),r.applyBindings(i,n),this._container=e,this._viewModel=i,this._element=n}var l="M 83.96875 17.5625 L 83.96875 17.59375 L 76.65625 24.875 L 97.09375 24.96875 L 76.09375 45.96875 L 81.9375 51.8125 L 102.78125 30.9375 L 102.875 51.15625 L 110.15625 43.875 L 110.1875 17.59375 L 83.96875 17.5625 z M 44.125 17.59375 L 17.90625 17.625 L 17.9375 43.90625 L 25.21875 51.1875 L 25.3125 30.96875 L 46.15625 51.8125 L 52 45.96875 L 31 25 L 51.4375 24.90625 L 44.125 17.59375 z M 46.0625 76.03125 L 25.1875 96.875 L 25.09375 76.65625 L 17.8125 83.9375 L 17.8125 110.21875 L 44 110.25 L 51.3125 102.9375 L 30.90625 102.84375 L 51.875 81.875 L 46.0625 76.03125 z M 82 76.15625 L 76.15625 82 L 97.15625 103 L 76.71875 103.0625 L 84.03125 110.375 L 110.25 110.34375 L 110.21875 84.0625 L 102.9375 76.8125 L 102.84375 97 L 82 76.15625 z",u="M 104.34375 17.5625 L 83.5 38.4375 L 83.40625 18.21875 L 76.125 25.5 L 76.09375 51.78125 L 102.3125 51.8125 L 102.3125 51.78125 L 109.625 44.5 L 89.1875 44.40625 L 110.1875 23.40625 L 104.34375 17.5625 z M 23.75 17.59375 L 17.90625 23.4375 L 38.90625 44.4375 L 18.5 44.53125 L 25.78125 51.8125 L 52 51.78125 L 51.96875 25.53125 L 44.6875 18.25 L 44.625 38.46875 L 23.75 17.59375 z M 25.6875 76.03125 L 18.375 83.3125 L 38.78125 83.40625 L 17.8125 104.40625 L 23.625 110.25 L 44.5 89.375 L 44.59375 109.59375 L 51.875 102.3125 L 51.875 76.0625 L 25.6875 76.03125 z M 102.375 76.15625 L 76.15625 76.1875 L 76.1875 102.4375 L 83.46875 109.71875 L 83.5625 89.53125 L 104.40625 110.375 L 110.25 104.53125 L 89.25 83.53125 L 109.6875 83.46875 L 102.375 76.15625 z";return t(s.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),s.prototype.isDestroyed=function(){return!1},s.prototype.destroy=function(){return this._viewModel.destroy(),r.cleanNode(this._element),this._container.removeChild(this._element),i(this)},s}),define("Cesium/Widgets/Geocoder/GeocoderViewModel",["../../Core/BingMapsApi","../../Core/Cartesian3","../../Core/defaultValue","../../Core/defined","../../Core/defineProperties","../../Core/DeveloperError","../../Core/Event","../../Core/loadJsonp","../../Core/Matrix4","../../Core/Rectangle","../../Scene/SceneMode","../../ThirdParty/knockout","../../ThirdParty/when","../createCommand"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p){"use strict";function m(t){this._url=i(t.url,"https://dev.virtualearth.net/"),this._url.length>0&&"/"!==this._url[this._url.length-1]&&(this._url+="/"),this._key=e.getKey(t.key);var r=e.getErrorCredit(t.key);n(r)&&t.scene._frameState.creditDisplay.addDefaultCredit(r),this._scene=t.scene,this._flightDuration=t.flightDuration,this._searchText="",this._isSearchInProgress=!1,this._geocodeInProgress=void 0,this._complete=new a;var o=this;this._searchCommand=p(function(){o.isSearchInProgress?v(o):g(o)}),h.track(this,["_searchText","_isSearchInProgress"]),this.isSearchInProgress=void 0,h.defineProperty(this,"isSearchInProgress",{get:function(){return this._isSearchInProgress}}),this.searchText=void 0,h.defineProperty(this,"searchText",{get:function(){return this.isSearchInProgress?"Searching...":this._searchText},set:function(e){this._searchText=e}}),this.flightDuration=void 0,h.defineProperty(this,"flightDuration",{get:function(){return this._flightDuration},set:function(e){this._flightDuration=e}})}function f(e,t){e._scene.camera.flyTo({destination:t,complete:function(){e._complete.raiseEvent()},duration:e._flightDuration,endTransform:l.IDENTITY})}function g(e){var i=e.searchText;if(!/^\s*$/.test(i)){var n=i.match(/[^\s,\n]+/g);if(2===n.length||3===n.length){var r=+n[0],o=+n[1],a=3===n.length?+n[2]:300;if(!isNaN(r)&&!isNaN(o)&&!isNaN(a))return void f(e,t.fromDegrees(r,o,a))}e._isSearchInProgress=!0;var l=s(e._url+"REST/v1/Locations",{parameters:{query:i,key:e._key},callbackParameterName:"jsonp"}),c=e._geocodeInProgress=d(l,function(t){if(!c.cancel){if(e._isSearchInProgress=!1,0===t.resourceSets.length)return void(e.searchText=e._searchText+" (not found)");var i=t.resourceSets[0];if(0===i.resources.length)return void(e.searchText=e._searchText+" (not found)");var n=i.resources[0];e._searchText=n.name;var r=n.bbox,o=r[0],a=r[1],s=r[2],l=r[3];f(e,u.fromDegrees(a,o,l,s))}},function(){c.cancel||(e._isSearchInProgress=!1,e.searchText=e._searchText+" (error)")})}}function v(e){e._isSearchInProgress=!1,n(e._geocodeInProgress)&&(e._geocodeInProgress.cancel=!0,e._geocodeInProgress=void 0)}return r(m.prototype,{url:{get:function(){return this._url}},key:{get:function(){return this._key}},complete:{get:function(){return this._complete}},scene:{get:function(){return this._scene}},search:{get:function(){return this._searchCommand}}}),m}),define("Cesium/Widgets/Geocoder/Geocoder",["../../Core/defined","../../Core/defineProperties","../../Core/destroyObject","../../Core/DeveloperError","../../Core/FeatureDetection","../../ThirdParty/knockout","../getElement","./GeocoderViewModel"],function(e,t,i,n,r,o,a,s){"use strict";function l(e){var t=a(e.container),i=new s(e);i._startSearchPath=u,i._stopSearchPath=c;var n=document.createElement("form");n.setAttribute("data-bind","submit: search");var l=document.createElement("input");l.type="search",l.className="cesium-geocoder-input",l.setAttribute("placeholder","Enter an address or landmark..."),l.setAttribute("data-bind",'value: searchText,valueUpdate: "afterkeydown",disable: isSearchInProgress,css: { "cesium-geocoder-input-wide" : searchText.length > 0 }'),n.appendChild(l);var h=document.createElement("span");h.className="cesium-geocoder-searchButton",h.setAttribute("data-bind","click: search,cesiumSvgPath: { path: isSearchInProgress ? _stopSearchPath : _startSearchPath, width: 32, height: 32 }"),n.appendChild(h),t.appendChild(n),o.applyBindings(i,n),this._container=t,this._viewModel=i,this._form=n,this._onInputBegin=function(e){t.contains(e.target)||l.blur()},this._onInputEnd=function(e){t.contains(e.target)&&l.focus()},r.supportsPointerEvents()?(document.addEventListener("pointerdown",this._onInputBegin,!0),document.addEventListener("pointerup",this._onInputEnd,!0)):(document.addEventListener("mousedown",this._onInputBegin,!0),document.addEventListener("mouseup",this._onInputEnd,!0),document.addEventListener("touchstart",this._onInputBegin,!0),document.addEventListener("touchend",this._onInputEnd,!0))}var u="M29.772,26.433l-7.126-7.126c0.96-1.583,1.523-3.435,1.524-5.421C24.169,8.093,19.478,3.401,13.688,3.399C7.897,3.401,3.204,8.093,3.204,13.885c0,5.789,4.693,10.481,10.484,10.481c1.987,0,3.839-0.563,5.422-1.523l7.128,7.127L29.772,26.433zM7.203,13.885c0.006-3.582,2.903-6.478,6.484-6.486c3.579,0.008,6.478,2.904,6.484,6.486c-0.007,3.58-2.905,6.476-6.484,6.484C10.106,20.361,7.209,17.465,7.203,13.885z",c="M24.778,21.419 19.276,15.917 24.777,10.415 21.949,7.585 16.447,13.087 10.945,7.585 8.117,10.415 13.618,15.917 8.116,21.419 10.946,24.248 16.447,18.746 21.948,24.248z";return t(l.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),l.prototype.isDestroyed=function(){return!1},l.prototype.destroy=function(){return r.supportsPointerEvents()?(document.removeEventListener("pointerdown",this._onInputBegin,!0),document.removeEventListener("pointerup",this._onInputEnd,!0)):(document.removeEventListener("mousedown",this._onInputBegin,!0),document.removeEventListener("mouseup",this._onInputEnd,!0),document.removeEventListener("touchstart",this._onInputBegin,!0),document.removeEventListener("touchend",this._onInputEnd,!0)),o.cleanNode(this._form),this._container.removeChild(this._form),i(this)},l}),define("Cesium/Widgets/HomeButton/HomeButtonViewModel",["../../Core/Cartesian3","../../Core/defaultValue","../../Core/defined","../../Core/defineProperties","../../Core/DeveloperError","../../Core/Matrix4","../../Core/Rectangle","../../Scene/Camera","../../Scene/SceneMode","../../ThirdParty/knockout","../createCommand"],function(e,t,i,n,r,o,a,s,l,u,c){"use strict";function h(e,t){this._scene=e,this._duration=t;var i=this;this._command=c(function(){i._scene.camera.flyHome(i._duration)}),this.tooltip="View Home",u.track(this,["tooltip"])}return n(h.prototype,{scene:{get:function(){return this._scene}},command:{get:function(){return this._command}},duration:{get:function(){return this._duration},set:function(e){this._duration=e}}}),h}),define("Cesium/Widgets/HomeButton/HomeButton",["../../Core/defined","../../Core/defineProperties","../../Core/destroyObject","../../Core/DeveloperError","../../ThirdParty/knockout","../getElement","./HomeButtonViewModel"],function(e,t,i,n,r,o,a){"use strict";function s(e,t,i){e=o(e);var n=new a(t,i);n._svgPath="M14,4l-10,8.75h20l-4.25-3.7188v-4.6562h-2.812v2.1875l-2.938-2.5625zm-7.0938,9.906v10.094h14.094v-10.094h-14.094zm2.1876,2.313h3.3122v4.25h-3.3122v-4.25zm5.8442,1.281h3.406v6.438h-3.406v-6.438z";var s=document.createElement("button");s.type="button",s.className="cesium-button cesium-toolbar-button cesium-home-button",s.setAttribute("data-bind","attr: { title: tooltip },click: command,cesiumSvgPath: { path: _svgPath, width: 28, height: 28 }"),e.appendChild(s),r.applyBindings(n,s),this._container=e,this._viewModel=n,this._element=s}return t(s.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),s.prototype.isDestroyed=function(){return!1},s.prototype.destroy=function(){return r.cleanNode(this._element),this._container.removeChild(this._element),i(this)},s}),define("Cesium/Widgets/InfoBox/InfoBoxViewModel",["../../Core/defined","../../Core/defineProperties","../../Core/Event","../../ThirdParty/knockout"],function(e,t,i,n){"use strict";function r(){this._cameraClicked=new i,this._closeClicked=new i,this.maxHeight=500,this.enableCamera=!1,this.isCameraTracking=!1,this.showInfo=!1,this.titleText="",this.description="",n.track(this,["showInfo","titleText","description","maxHeight","enableCamera","isCameraTracking"]),this._loadingIndicatorHtml='<div class="cesium-infoBox-loadingContainer"><span class="cesium-infoBox-loading"></span></div>',this.cameraIconPath=void 0,n.defineProperty(this,"cameraIconPath",{get:function(){return!this.enableCamera||this.isCameraTracking?a:o}}),n.defineProperty(this,"_bodyless",{get:function(){return!e(this.description)||0===this.description.length}})}var o="M 13.84375 7.03125 C 11.412798 7.03125 9.46875 8.975298 9.46875 11.40625 L 9.46875 11.59375 L 2.53125 7.21875 L 2.53125 24.0625 L 9.46875 19.6875 C 9.4853444 22.104033 11.423165 24.0625 13.84375 24.0625 L 25.875 24.0625 C 28.305952 24.0625 30.28125 22.087202 30.28125 19.65625 L 30.28125 11.40625 C 30.28125 8.975298 28.305952 7.03125 25.875 7.03125 L 13.84375 7.03125 z",a="M 27.34375 1.65625 L 5.28125 27.9375 L 8.09375 30.3125 L 30.15625 4.03125 L 27.34375 1.65625 z M 13.84375 7.03125 C 11.412798 7.03125 9.46875 8.975298 9.46875 11.40625 L 9.46875 11.59375 L 2.53125 7.21875 L 2.53125 24.0625 L 9.46875 19.6875 C 9.4724893 20.232036 9.5676108 20.7379 9.75 21.21875 L 21.65625 7.03125 L 13.84375 7.03125 z M 28.21875 7.71875 L 14.53125 24.0625 L 25.875 24.0625 C 28.305952 24.0625 30.28125 22.087202 30.28125 19.65625 L 30.28125 11.40625 C 30.28125 9.8371439 29.456025 8.4902779 28.21875 7.71875 z";return r.prototype.maxHeightOffset=function(e){return this.maxHeight-e+"px"},t(r.prototype,{cameraClicked:{get:function(){return this._cameraClicked}},closeClicked:{get:function(){return this._closeClicked}}}),r}),define("Cesium/Widgets/InfoBox/InfoBox",["../../Core/buildModuleUrl","../../Core/Color","../../Core/defined","../../Core/defineProperties","../../Core/destroyObject","../../Core/DeveloperError","../../ThirdParty/knockout","../getElement","../subscribeAndEvaluate","./InfoBoxViewModel"],function(e,t,i,n,r,o,a,s,l,u){"use strict";function c(n){n=s(n);var r=document.createElement("div");r.className="cesium-infoBox",r.setAttribute("data-bind",'css: { "cesium-infoBox-visible" : showInfo, "cesium-infoBox-bodyless" : _bodyless }'),n.appendChild(r);var o=document.createElement("div");o.className="cesium-infoBox-title",o.setAttribute("data-bind","text: titleText"),r.appendChild(o);var c=document.createElement("button");c.type="button",c.className="cesium-button cesium-infoBox-camera",c.setAttribute("data-bind",'attr: { title: "Focus camera on object" },click: function () { cameraClicked.raiseEvent(this); },enable: enableCamera,cesiumSvgPath: { path: cameraIconPath, width: 32, height: 32 }'),r.appendChild(c);var h=document.createElement("button");h.type="button",h.className="cesium-infoBox-close",h.setAttribute("data-bind","click: function () { closeClicked.raiseEvent(this); }"),h.innerHTML="×",r.appendChild(h);var d=document.createElement("iframe");d.className="cesium-infoBox-iframe",d.setAttribute("sandbox","allow-same-origin allow-popups allow-forms"),d.setAttribute("data-bind","style : { maxHeight : maxHeightOffset(40) }"),d.setAttribute("allowfullscreen",!0),r.appendChild(d);var p=new u;a.applyBindings(p,r),this._container=n,this._element=r,this._frame=d,this._viewModel=p,this._descriptionSubscription=void 0;var m=this;d.addEventListener("load",function(){var n=d.contentDocument,o=n.createElement("link");o.href=e("Widgets/InfoBox/InfoBoxDescription.css"),o.rel="stylesheet",o.type="text/css";var a=n.createElement("div");a.className="cesium-infoBox-description",n.head.appendChild(o),n.body.appendChild(a),m._descriptionSubscription=l(p,"description",function(e){d.style.height="5px",a.innerHTML=e;var n=null,o=a.firstElementChild;if(null!==o&&1===a.childNodes.length){var s=window.getComputedStyle(o);if(null!==s){var l=s["background-color"],u=t.fromCssColorString(l);i(u)&&0!==u.alpha&&(n=s["background-color"])}}r.style["background-color"]=n;var c=a.getBoundingClientRect().height;d.style.height=c+"px"})}),d.setAttribute("src","about:blank")}return n(c.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}},frame:{get:function(){return this._frame}}}),c.prototype.isDestroyed=function(){return!1},c.prototype.destroy=function(){var e=this._container;return a.cleanNode(this._element),e.removeChild(this._element),i(this._descriptionSubscription)&&this._descriptionSubscription.dispose(),r(this)},c}),define("Cesium/Widgets/NavigationHelpButton/NavigationHelpButtonViewModel",["../../Core/defineProperties","../../ThirdParty/knockout","../createCommand"],function(e,t,i){"use strict";function n(){this.showInstructions=!1;var e=this;this._command=i(function(){e.showInstructions=!e.showInstructions}),this._showClick=i(function(){e._touch=!1}),this._showTouch=i(function(){e._touch=!0}),this._touch=!1,this.tooltip="Navigation Instructions",t.track(this,["tooltip","showInstructions","_touch"])}return e(n.prototype,{command:{get:function(){return this._command}},showClick:{get:function(){return this._showClick}},showTouch:{get:function(){return this._showTouch}}}),n}),define("Cesium/Widgets/NavigationHelpButton/NavigationHelpButton",["../../Core/buildModuleUrl","../../Core/defaultValue","../../Core/defined","../../Core/defineProperties","../../Core/destroyObject","../../Core/DeveloperError","../../Core/FeatureDetection","../../ThirdParty/knockout","../getElement","./NavigationHelpButtonViewModel"],function(e,t,i,n,r,o,a,s,l,u){"use strict";function c(i){var n=l(i.container),r=new u,o=t(i.instructionsInitiallyVisible,!1);r.showInstructions=o,r._svgPath="M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466z M17.328,24.371h-2.707v-2.596h2.707V24.371zM17.328,19.003v0.858h-2.707v-1.057c0-3.19,3.63-3.696,3.63-5.963c0-1.034-0.924-1.826-2.134-1.826c-1.254,0-2.354,0.924-2.354,0.924l-1.541-1.915c0,0,1.519-1.584,4.137-1.584c2.487,0,4.796,1.54,4.796,4.136C21.156,16.208,17.328,16.627,17.328,19.003z";var c=document.createElement("span");c.className="cesium-navigationHelpButton-wrapper",n.appendChild(c);var h=document.createElement("button");h.type="button",h.className="cesium-button cesium-toolbar-button cesium-navigation-help-button",h.setAttribute("data-bind","attr: { title: tooltip },click: command,cesiumSvgPath: { path: _svgPath, width: 32, height: 32 }"),c.appendChild(h);var d=document.createElement("div");d.className="cesium-navigation-help",d.setAttribute("data-bind",'css: { "cesium-navigation-help-visible" : showInstructions}'),c.appendChild(d);var p=document.createElement("button");p.type="button",p.className="cesium-navigation-button cesium-navigation-button-left",p.setAttribute("data-bind",'click: showClick, css: {"cesium-navigation-button-selected": !_touch, "cesium-navigation-button-unselected": _touch}');var m=document.createElement("img");m.src=e("Widgets/Images/NavigationHelp/Mouse.svg"),m.className="cesium-navigation-button-icon",m.style.width="25px",m.style.height="25px",p.appendChild(m),p.appendChild(document.createTextNode("Mouse"));var f=document.createElement("button");f.type="button",f.className="cesium-navigation-button cesium-navigation-button-right",f.setAttribute("data-bind",'click: showTouch, css: {"cesium-navigation-button-selected": _touch, "cesium-navigation-button-unselected": !_touch}');var g=document.createElement("img");g.src=e("Widgets/Images/NavigationHelp/Touch.svg"),g.className="cesium-navigation-button-icon",g.style.width="25px",g.style.height="25px",f.appendChild(g),f.appendChild(document.createTextNode("Touch")),d.appendChild(p),d.appendChild(f);var v=document.createElement("div");v.className="cesium-click-navigation-help cesium-navigation-help-instructions",v.setAttribute("data-bind",'css: { "cesium-click-navigation-help-visible" : !_touch}'),v.innerHTML=' <table> <tr> <td><img src="'+e("Widgets/Images/NavigationHelp/MouseLeft.svg")+'" width="48" height="48" /></td> <td> <div class="cesium-navigation-help-pan">Pan view</div> <div class="cesium-navigation-help-details">Left click + drag</div> </td> </tr> <tr> <td><img src="'+e("Widgets/Images/NavigationHelp/MouseRight.svg")+'" width="48" height="48" /></td> <td> <div class="cesium-navigation-help-zoom">Zoom view</div> <div class="cesium-navigation-help-details">Right click + drag, or</div> <div class="cesium-navigation-help-details">Mouse wheel scroll</div> </td> </tr> <tr> <td><img src="'+e("Widgets/Images/NavigationHelp/MouseMiddle.svg")+'" width="48" height="48" /></td> <td> <div class="cesium-navigation-help-rotate">Rotate view</div> <div class="cesium-navigation-help-details">Middle click + drag, or</div> <div class="cesium-navigation-help-details">CTRL + Left/Right click + drag</div> </td> </tr> </table>',d.appendChild(v);var _=document.createElement("div");_.className="cesium-touch-navigation-help cesium-navigation-help-instructions",_.setAttribute("data-bind",'css: { "cesium-touch-navigation-help-visible" : _touch}'),_.innerHTML=' <table> <tr> <td><img src="'+e("Widgets/Images/NavigationHelp/TouchDrag.svg")+'" width="70" height="48" /></td> <td> <div class="cesium-navigation-help-pan">Pan view</div> <div class="cesium-navigation-help-details">One finger drag</div> </td> </tr> <tr> <td><img src="'+e("Widgets/Images/NavigationHelp/TouchZoom.svg")+'" width="70" height="48" /></td> <td> <div class="cesium-navigation-help-zoom">Zoom view</div> <div class="cesium-navigation-help-details">Two finger pinch</div> </td> </tr> <tr> <td><img src="'+e("Widgets/Images/NavigationHelp/TouchTilt.svg")+'" width="70" height="48" /></td> <td> <div class="cesium-navigation-help-rotate">Tilt view</div> <div class="cesium-navigation-help-details">Two finger drag, same direction</div> </td> </tr> <tr> <td><img src="'+e("Widgets/Images/NavigationHelp/TouchRotate.svg")+'" width="70" height="48" /></td> <td> <div class="cesium-navigation-help-tilt">Rotate view</div> <div class="cesium-navigation-help-details">Two finger drag, opposite direction</div> </td> </tr> </table>',d.appendChild(_),s.applyBindings(r,c),this._container=n,this._viewModel=r,this._wrapper=c,this._closeInstructions=function(e){c.contains(e.target)||(r.showInstructions=!1)},a.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeInstructions,!0):(document.addEventListener("mousedown",this._closeInstructions,!0),document.addEventListener("touchstart",this._closeInstructions,!0))}return n(c.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),c.prototype.isDestroyed=function(){return!1},c.prototype.destroy=function(){return a.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeInstructions,!0):(document.removeEventListener("mousedown",this._closeInstructions,!0),document.removeEventListener("touchstart",this._closeInstructions,!0)),s.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),r(this)},c}),define("Cesium/Widgets/PerformanceWatchdog/PerformanceWatchdogViewModel",["../../Core/defaultValue","../../Core/defined","../../Core/defineProperties","../../Core/destroyObject","../../Core/DeveloperError","../../Scene/FrameRateMonitor","../../ThirdParty/knockout","../createCommand"],function(e,t,i,n,r,o,a,s){"use strict";function l(t){this._scene=t.scene,this.lowFrameRateMessage=e(t.lowFrameRateMessage,"This application appears to be performing poorly on your system. Please try using a different web browser or updating your video drivers."),this.lowFrameRateMessageDismissed=!1,this.showingLowFrameRateMessage=!1,a.track(this,["lowFrameRateMessage","lowFrameRateMessageDismissed","showingLowFrameRateMessage"]);var i=this;this._dismissMessage=s(function(){i.showingLowFrameRateMessage=!1,i.lowFrameRateMessageDismissed=!0});var n=o.fromScene(t.scene);this._unsubscribeLowFrameRate=n.lowFrameRate.addEventListener(function(){i.lowFrameRateMessageDismissed||(i.showingLowFrameRateMessage=!0)}),this._unsubscribeNominalFrameRate=n.nominalFrameRate.addEventListener(function(){i.showingLowFrameRateMessage=!1})}return i(l.prototype,{scene:{get:function(){return this._scene}},dismissMessage:{get:function(){return this._dismissMessage}}}),l.prototype.destroy=function(){return this._unsubscribeLowFrameRate(),this._unsubscribeNominalFrameRate(),n(this)},l}),define("Cesium/Widgets/PerformanceWatchdog/PerformanceWatchdog",["../../Core/defined","../../Core/defineProperties","../../Core/destroyObject","../../Core/DeveloperError","../../ThirdParty/knockout","../getElement","./PerformanceWatchdogViewModel"],function(e,t,i,n,r,o,a){"use strict";function s(e){var t=o(e.container),i=new a(e),n=document.createElement("div");n.className="cesium-performance-watchdog-message-area",n.setAttribute("data-bind","visible: showingLowFrameRateMessage");var s=document.createElement("button");s.setAttribute("type","button"),s.className="cesium-performance-watchdog-message-dismiss",s.innerHTML="×",s.setAttribute("data-bind","click: dismissMessage"),n.appendChild(s);var l=document.createElement("div");l.className="cesium-performance-watchdog-message",l.setAttribute("data-bind","html: lowFrameRateMessage"),n.appendChild(l),t.appendChild(n),r.applyBindings(i,n),this._container=t,this._viewModel=i,this._element=n}return t(s.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),s.prototype.isDestroyed=function(){return!1},s.prototype.destroy=function(){return this._viewModel.destroy(),r.cleanNode(this._element),this._container.removeChild(this._element),i(this)},s}),define("Cesium/Widgets/SceneModePicker/SceneModePickerViewModel",["../../Core/defaultValue","../../Core/defined","../../Core/defineProperties","../../Core/destroyObject","../../Core/DeveloperError","../../Core/EventHelper","../../Scene/SceneMode","../../ThirdParty/knockout","../createCommand"],function(e,t,i,n,r,o,a,s,l){ +"use strict";function u(t,i){this._scene=t;var n=this,r=function(e,t,i,r){n.sceneMode=i,n.dropDownVisible=!1};this._eventHelper=new o,this._eventHelper.add(t.morphStart,r),this._duration=e(i,2),this.sceneMode=t.mode,this.dropDownVisible=!1,this.tooltip2D="2D",this.tooltip3D="3D",this.tooltipColumbusView="Columbus View",s.track(this,["sceneMode","dropDownVisible","tooltip2D","tooltip3D","tooltipColumbusView"]),this.selectedTooltip=void 0,s.defineProperty(this,"selectedTooltip",function(){var e=n.sceneMode;return e===a.SCENE2D?n.tooltip2D:e===a.SCENE3D?n.tooltip3D:n.tooltipColumbusView}),this._toggleDropDown=l(function(){n.dropDownVisible=!n.dropDownVisible}),this._morphTo2D=l(function(){t.morphTo2D(n._duration)}),this._morphTo3D=l(function(){t.morphTo3D(n._duration)}),this._morphToColumbusView=l(function(){t.morphToColumbusView(n._duration)}),this._sceneMode=a}return i(u.prototype,{scene:{get:function(){return this._scene}},duration:{get:function(){return this._duration},set:function(e){this._duration=e}},toggleDropDown:{get:function(){return this._toggleDropDown}},morphTo2D:{get:function(){return this._morphTo2D}},morphTo3D:{get:function(){return this._morphTo3D}},morphToColumbusView:{get:function(){return this._morphToColumbusView}}}),u.prototype.isDestroyed=function(){return!1},u.prototype.destroy=function(){this._eventHelper.removeAll(),n(this)},u}),define("Cesium/Widgets/SceneModePicker/SceneModePicker",["../../Core/defined","../../Core/defineProperties","../../Core/destroyObject","../../Core/DeveloperError","../../Core/FeatureDetection","../../ThirdParty/knockout","../getElement","./SceneModePickerViewModel"],function(e,t,i,n,r,o,a,s){"use strict";function l(e,t,i){e=a(e);var n=new s(t,i);n._globePath=u,n._flatMapPath=c,n._columbusViewPath=h;var l=document.createElement("span");l.className="cesium-sceneModePicker-wrapper cesium-toolbar-button",e.appendChild(l);var d=document.createElement("button");d.type="button",d.className="cesium-button cesium-toolbar-button",d.setAttribute("data-bind",'css: { "cesium-sceneModePicker-button2D": sceneMode === _sceneMode.SCENE2D, "cesium-sceneModePicker-button3D": sceneMode === _sceneMode.SCENE3D, "cesium-sceneModePicker-buttonColumbusView": sceneMode === _sceneMode.COLUMBUS_VIEW, "cesium-sceneModePicker-selected": dropDownVisible },attr: { title: selectedTooltip },click: toggleDropDown'),d.innerHTML='<!-- ko cesiumSvgPath: { path: _globePath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-icon3D" } --><!-- /ko --><!-- ko cesiumSvgPath: { path: _flatMapPath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-icon2D" } --><!-- /ko --><!-- ko cesiumSvgPath: { path: _columbusViewPath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-iconColumbusView" } --><!-- /ko -->',l.appendChild(d);var p=document.createElement("button");p.type="button",p.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",p.setAttribute("data-bind",'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.SCENE3D)) || (!dropDownVisible && (sceneMode === _sceneMode.SCENE3D)), "cesium-sceneModePicker-none" : sceneMode === _sceneMode.SCENE3D, "cesium-sceneModePicker-hidden" : !dropDownVisible },attr: { title: tooltip3D },click: morphTo3D,cesiumSvgPath: { path: _globePath, width: 64, height: 64 }'),l.appendChild(p);var m=document.createElement("button");m.type="button",m.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",m.setAttribute("data-bind",'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.SCENE2D)), "cesium-sceneModePicker-none" : sceneMode === _sceneMode.SCENE2D, "cesium-sceneModePicker-hidden" : !dropDownVisible },attr: { title: tooltip2D },click: morphTo2D,cesiumSvgPath: { path: _flatMapPath, width: 64, height: 64 }'),l.appendChild(m);var f=document.createElement("button");f.type="button",f.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",f.setAttribute("data-bind",'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.COLUMBUS_VIEW)) || (!dropDownVisible && (sceneMode === _sceneMode.COLUMBUS_VIEW)), "cesium-sceneModePicker-none" : sceneMode === _sceneMode.COLUMBUS_VIEW, "cesium-sceneModePicker-hidden" : !dropDownVisible},attr: { title: tooltipColumbusView },click: morphToColumbusView,cesiumSvgPath: { path: _columbusViewPath, width: 64, height: 64 }'),l.appendChild(f),o.applyBindings(n,l),this._viewModel=n,this._container=e,this._wrapper=l,this._closeDropDown=function(e){l.contains(e.target)||(n.dropDownVisible=!1)},r.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}var u="m 32.401392,4.9330437 c -7.087603,0 -14.096095,2.884602 -19.10793,7.8946843 -5.0118352,5.010083 -7.9296167,11.987468 -7.9296167,19.072999 0,7.085531 2.9177815,14.097848 7.9296167,19.107931 4.837653,4.835961 11.541408,7.631372 18.374354,7.82482 0.05712,0.01231 0.454119,0.139729 0.454119,0.139729 l 0.03493,-0.104797 c 0.08246,7.84e-4 0.162033,0.03493 0.244525,0.03493 0.08304,0 0.161515,-0.03414 0.244526,-0.03493 l 0.03493,0.104797 c 0,0 0.309474,-0.129487 0.349323,-0.139729 6.867765,-0.168094 13.582903,-2.965206 18.444218,-7.82482 2.558195,-2.5573 4.551081,-5.638134 5.903547,-8.977584 1.297191,-3.202966 2.02607,-6.661489 2.02607,-10.130347 0,-6.237309 -2.366261,-12.31219 -6.322734,-17.116794 -0.0034,-0.02316 0.0049,-0.04488 0,-0.06986 -0.01733,-0.08745 -0.104529,-0.278855 -0.104797,-0.279458 -5.31e-4,-0.0012 -0.522988,-0.628147 -0.523984,-0.62878 -3.47e-4,-2.2e-4 -0.133444,-0.03532 -0.244525,-0.06987 C 51.944299,13.447603 51.751076,13.104317 51.474391,12.827728 46.462556,7.8176457 39.488996,4.9330437 32.401392,4.9330437 z m -2.130866,3.5281554 0.104797,9.6762289 c -4.111695,-0.08361 -7.109829,-0.423664 -9.257041,-0.943171 1.198093,-2.269271 2.524531,-4.124404 3.91241,-5.414496 2.167498,-2.0147811 3.950145,-2.8540169 5.239834,-3.3185619 z m 2.794579,0 c 1.280302,0.4754953 3.022186,1.3285948 5.065173,3.2486979 1.424667,1.338973 2.788862,3.303645 3.982275,5.728886 -2.29082,0.403367 -5.381258,0.621049 -8.942651,0.698645 L 33.065105,8.4611991 z m 5.728886,0.2445256 c 4.004072,1.1230822 7.793098,3.1481363 10.724195,6.0782083 0.03468,0.03466 0.07033,0.06991 0.104797,0.104797 -0.45375,0.313891 -0.923054,0.663002 -1.956205,1.082899 -0.647388,0.263114 -1.906242,0.477396 -2.829511,0.733577 -1.382296,-2.988132 -3.027146,-5.368585 -4.785716,-7.0213781 -0.422866,-0.397432 -0.835818,-0.6453247 -1.25756,-0.9781032 z m -15.33525,0.7685092 c -0.106753,0.09503 -0.207753,0.145402 -0.31439,0.244526 -1.684973,1.5662541 -3.298068,3.8232211 -4.680919,6.5672591 -0.343797,-0.14942 -1.035052,-0.273198 -1.292493,-0.419186 -0.956528,-0.542427 -1.362964,-1.022024 -1.537018,-1.292493 -0.0241,-0.03745 -0.01868,-0.0401 -0.03493,-0.06986 2.250095,-2.163342 4.948824,-3.869984 7.859752,-5.0302421 z m -9.641296,7.0912431 c 0.464973,0.571618 0.937729,1.169056 1.956205,1.746612 0.349907,0.198425 1.107143,0.335404 1.537018,0.523983 -1.20166,3.172984 -1.998037,7.051901 -2.165798,11.772162 C 14.256557,30.361384 12.934823,30.161483 12.280427,29.90959 10.644437,29.279855 9.6888882,28.674891 9.1714586,28.267775 8.6540289,27.860658 8.6474751,27.778724 8.6474751,27.778724 l -0.069864,0.03493 C 9.3100294,23.691285 11.163248,19.798527 13.817445,16.565477 z m 37.552149,0.523984 c 2.548924,3.289983 4.265057,7.202594 4.890513,11.318043 -0.650428,0.410896 -1.756876,1.001936 -3.563088,1.606882 -1.171552,0.392383 -3.163859,0.759153 -4.960377,1.117832 -0.04367,-4.752703 -0.784809,-8.591423 -1.88634,-11.807094 0.917574,-0.263678 2.170552,-0.486495 2.864443,-0.76851 1.274693,-0.518066 2.003942,-1.001558 2.654849,-1.467153 z m -31.439008,2.619917 c 2.487341,0.672766 5.775813,1.137775 10.479669,1.222628 l 0.104797,10.689263 0,0.03493 0,0.733577 c -5.435005,-0.09059 -9.512219,-0.519044 -12.610536,-1.117831 0.106127,-4.776683 0.879334,-8.55791 2.02607,-11.562569 z m 23.264866,0.31439 c 1.073459,3.067541 1.833795,6.821314 1.816476,11.702298 -3.054474,0.423245 -7.062018,0.648559 -11.702298,0.698644 l 0,-0.838373 -0.104796,-10.654331 c 4.082416,-0.0864 7.404468,-0.403886 9.990618,-0.908238 z M 8.2632205,30.922625 c 0.7558676,0.510548 1.5529563,1.013339 3.0041715,1.57195 0.937518,0.360875 2.612202,0.647642 3.91241,0.978102 0.112814,3.85566 0.703989,7.107756 1.606883,9.920754 -1.147172,-0.324262 -2.644553,-0.640648 -3.423359,-0.978102 -1.516688,-0.657177 -2.386627,-1.287332 -2.864443,-1.71168 -0.477816,-0.424347 -0.489051,-0.489051 -0.489051,-0.489051 L 9.8002387,40.319395 C 8.791691,37.621767 8.1584238,34.769583 8.1584238,31.900727 c 0,-0.330153 0.090589,-0.648169 0.1047967,-0.978102 z m 48.2763445,0.419186 c 0.0047,0.188973 0.06986,0.36991 0.06986,0.558916 0,2.938869 -0.620228,5.873558 -1.676747,8.628261 -0.07435,0.07583 -0.06552,0.07411 -0.454119,0.349323 -0.606965,0.429857 -1.631665,1.042044 -3.318562,1.676747 -1.208528,0.454713 -3.204964,0.850894 -5.135038,1.25756 0.84593,-2.765726 1.41808,-6.005357 1.606883,-9.815957 2.232369,-0.413371 4.483758,-0.840201 5.938479,-1.327425 1.410632,-0.472457 2.153108,-0.89469 2.96924,-1.327425 z m -38.530252,2.864443 c 3.208141,0.56697 7.372279,0.898588 12.575603,0.978103 l 0.174662,9.885821 c -4.392517,-0.06139 -8.106722,-0.320566 -10.863925,-0.803441 -1.051954,-2.664695 -1.692909,-6.043794 -1.88634,-10.060483 z m 26.793022,0.31439 c -0.246298,3.923551 -0.877762,7.263679 -1.816476,9.885822 -2.561957,0.361954 -5.766249,0.560708 -9.431703,0.62878 l -0.174661,-9.815957 c 4.491734,-0.04969 8.334769,-0.293032 11.42284,-0.698645 z M 12.035901,44.860585 c 0.09977,0.04523 0.105535,0.09465 0.209594,0.139729 1.337656,0.579602 3.441099,1.058072 5.589157,1.537018 1.545042,3.399208 3.548524,5.969402 5.589157,7.789888 -3.034411,-1.215537 -5.871615,-3.007978 -8.174142,-5.309699 -1.245911,-1.245475 -2.271794,-2.662961 -3.213766,-4.156936 z m 40.69605,0 c -0.941972,1.493975 -1.967855,2.911461 -3.213765,4.156936 -2.74253,2.741571 -6.244106,4.696717 -9.955686,5.868615 0.261347,-0.241079 0.507495,-0.394491 0.768509,-0.663713 1.674841,-1.727516 3.320792,-4.181056 4.645987,-7.265904 2.962447,-0.503021 5.408965,-1.122293 7.161107,-1.781544 0.284034,-0.106865 0.337297,-0.207323 0.593848,-0.31439 z m -31.404076,2.305527 c 2.645807,0.376448 5.701178,0.649995 9.466635,0.698645 l 0.139729,7.789888 c -1.38739,-0.480844 -3.316218,-1.29837 -5.659022,-3.388427 -1.388822,-1.238993 -2.743668,-3.0113 -3.947342,-5.100106 z m 20.365491,0.104797 c -1.04872,2.041937 -2.174337,3.779068 -3.353494,4.995309 -1.853177,1.911459 -3.425515,2.82679 -4.611055,3.353494 l -0.139729,-7.789887 c 3.13091,-0.05714 5.728238,-0.278725 8.104278,-0.558916 z",c="m 2.9825053,17.550598 0,1.368113 0,26.267766 0,1.368113 1.36811,0 54.9981397,0 1.36811,0 0,-1.368113 0,-26.267766 0,-1.368113 -1.36811,0 -54.9981397,0 -1.36811,0 z m 2.73623,2.736226 10.3292497,0 0,10.466063 -10.3292497,0 0,-10.466063 z m 13.0654697,0 11.69737,0 0,10.466063 -11.69737,0 0,-10.466063 z m 14.43359,0 11.69737,0 0,10.466063 -11.69737,0 0,-10.466063 z m 14.43359,0 10.32926,0 0,10.466063 -10.32926,0 0,-10.466063 z m -41.9326497,13.202288 10.3292497,0 0,10.329252 -10.3292497,0 0,-10.329252 z m 13.0654697,0 11.69737,0 0,10.329252 -11.69737,0 0,-10.329252 z m 14.43359,0 11.69737,0 0,10.329252 -11.69737,0 0,-10.329252 z m 14.43359,0 10.32926,0 0,10.329252 -10.32926,0 0,-10.329252 z",h="m 14.723969,17.675598 -0.340489,0.817175 -11.1680536,26.183638 -0.817175,1.872692 2.076986,0 54.7506996,0 2.07698,0 -0.81717,-1.872692 -11.16805,-26.183638 -0.34049,-0.817175 -0.91933,0 -32.414586,0 -0.919322,0 z m 1.838643,2.723916 6.196908,0 -2.928209,10.418977 -7.729111,0 4.460412,-10.418977 z m 9.02297,0 4.903049,0 0,10.418977 -7.831258,0 2.928209,-10.418977 z m 7.626964,0 5.584031,0 2.62176,10.418977 -8.205791,0 0,-10.418977 z m 8.410081,0 5.51593,0 4.46042,10.418977 -7.38863,0 -2.58772,-10.418977 z m -30.678091,13.142892 8.103649,0 -2.89416,10.282782 -9.6018026,0 4.3923136,-10.282782 z m 10.929711,0 8.614384,0 0,10.282782 -11.508544,0 2.89416,-10.282782 z m 11.338299,0 8.852721,0 2.58772,10.282782 -11.440441,0 0,-10.282782 z m 11.678781,0 7.86531,0 4.39231,10.282782 -9.6699,0 -2.58772,-10.282782 z";return t(l.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),l.prototype.isDestroyed=function(){return!1},l.prototype.destroy=function(){return this._viewModel.destroy(),r.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),o.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),i(this)},l}),define("Cesium/Widgets/SelectionIndicator/SelectionIndicatorViewModel",["../../Core/Cartesian2","../../Core/defaultValue","../../Core/defined","../../Core/defineProperties","../../Core/DeveloperError","../../Core/EasingFunction","../../Scene/SceneTransforms","../../ThirdParty/knockout"],function(e,t,i,n,r,o,a,s){"use strict";function l(e,n,r){this._scene=e,this._screenPositionX=c,this._screenPositionY=c,this._tweens=e.tweens,this._container=t(r,document.body),this._selectionIndicatorElement=n,this._scale=1,this.position=void 0,this.showSelection=!1,s.track(this,["position","_screenPositionX","_screenPositionY","_scale","showSelection"]),this.isVisible=void 0,s.defineProperty(this,"isVisible",{get:function(){return this.showSelection&&i(this.position)}}),s.defineProperty(this,"_transform",{get:function(){return"scale("+this._scale+")"}}),this.computeScreenSpacePosition=function(t,i){return a.wgs84ToWindowCoordinates(e,t,i)}}var u=new e,c="-1000px";return l.prototype.update=function(){if(this.showSelection&&i(this.position)){var e=this.computeScreenSpacePosition(this.position,u);if(i(e)){var t=this._container,n=t.parentNode.clientWidth,r=t.parentNode.clientHeight,o=this._selectionIndicatorElement.clientWidth,a=.5*o;e.x=Math.min(Math.max(e.x,-o),n+o)-a,e.y=Math.min(Math.max(e.y,-o),r+o)-a,this._screenPositionX=Math.floor(e.x+.25)+"px",this._screenPositionY=Math.floor(e.y+.25)+"px"}else this._screenPositionX=c,this._screenPositionY=c}},l.prototype.animateAppear=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:2,stopValue:1,duration:.8,easingFunction:o.EXPONENTIAL_OUT})},l.prototype.animateDepart=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:this._scale,stopValue:1.5,duration:.8,easingFunction:o.EXPONENTIAL_OUT})},n(l.prototype,{container:{get:function(){return this._container}},selectionIndicatorElement:{get:function(){return this._selectionIndicatorElement}},scene:{get:function(){return this._scene}}}),l}),define("Cesium/Widgets/SelectionIndicator/SelectionIndicator",["../../Core/defined","../../Core/defineProperties","../../Core/destroyObject","../../Core/DeveloperError","../../ThirdParty/knockout","../getElement","./SelectionIndicatorViewModel"],function(e,t,i,n,r,o,a){"use strict";function s(e,t){e=o(e),this._container=e;var i=document.createElement("div");i.className="cesium-selection-wrapper",i.setAttribute("data-bind",'style: { "top" : _screenPositionY, "left" : _screenPositionX },css: { "cesium-selection-wrapper-visible" : isVisible }'),e.appendChild(i),this._element=i;var n="http://www.w3.org/2000/svg",s="M -34 -34 L -34 -11.25 L -30 -15.25 L -30 -30 L -15.25 -30 L -11.25 -34 L -34 -34 z M 11.25 -34 L 15.25 -30 L 30 -30 L 30 -15.25 L 34 -11.25 L 34 -34 L 11.25 -34 z M -34 11.25 L -34 34 L -11.25 34 L -15.25 30 L -30 30 L -30 15.25 L -34 11.25 z M 34 11.25 L 30 15.25 L 30 30 L 15.25 30 L 11.25 34 L 34 34 L 34 11.25 z",l=document.createElementNS(n,"svg:svg");l.setAttribute("width",160),l.setAttribute("height",160),l.setAttribute("viewBox","0 0 160 160");var u=document.createElementNS(n,"g");u.setAttribute("transform","translate(80,80)"),l.appendChild(u);var c=document.createElementNS(n,"path");c.setAttribute("data-bind","attr: { transform: _transform }"),c.setAttribute("d",s),u.appendChild(c),i.appendChild(l);var h=new a(t,this._element,this._container);this._viewModel=h,r.applyBindings(this._viewModel,this._element)}return t(s.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),s.prototype.isDestroyed=function(){return!1},s.prototype.destroy=function(){var e=this._container;return r.cleanNode(this._element),e.removeChild(this._element),i(this)},s}),define("Cesium/Widgets/Timeline/TimelineHighlightRange",["../../Core/defaultValue","../../Core/JulianDate"],function(e,t){"use strict";function i(t,i,n){this._color=t,this._height=i,this._base=e(n,0)}return i.prototype.getHeight=function(){return this._height},i.prototype.getBase=function(){return this._base},i.prototype.getStartTime=function(){return this._start},i.prototype.getStopTime=function(){return this._stop},i.prototype.setRange=function(e,t){this._start=e,this._stop=t},i.prototype.render=function(e){var i="";if(this._start&&this._stop&&this._color){var n=t.secondsDifference(this._start,e.epochJulian),r=Math.round(e.timeBarWidth*e.getAlpha(n)),o=t.secondsDifference(this._stop,e.epochJulian),a=Math.round(e.timeBarWidth*e.getAlpha(o))-r;0>r&&(a+=r,r=0),r+a>e.timeBarWidth&&(a=e.timeBarWidth-r),a>0&&(i='<span class="cesium-timeline-highlight" style="left: '+r.toString()+"px; width: "+a.toString()+"px; bottom: "+this._base.toString()+"px; height: "+this._height+"px; background-color: "+this._color+';"></span>')}return i},i}),define("Cesium/Widgets/Timeline/TimelineTrack",["../../Core/Color","../../Core/defined","../../Core/JulianDate"],function(e,t,i){"use strict";function n(t,i,n,r){this.interval=t,this.height=i,this.color=n||new e(.5,.5,.5,1),this.backgroundColor=r||new e(0,0,0,0)}return n.prototype.render=function(e,n){var r=this.interval.start,o=this.interval.stop,a=n.startJulian,s=i.addSeconds(n.startJulian,n.duration,new i);if(i.lessThan(r,a)&&i.greaterThan(o,s))e.fillStyle=this.color.toCssColorString(),e.fillRect(0,n.y,n.timeBarWidth,this.height);else if(i.lessThanOrEquals(r,s)&&i.greaterThanOrEquals(o,a)){var l,u,c;for(l=0;l<n.timeBarWidth;++l){var h=i.addSeconds(n.startJulian,l/n.timeBarWidth*n.duration,new i);!t(u)&&i.greaterThanOrEquals(h,r)?u=l:!t(c)&&i.greaterThanOrEquals(h,o)&&(c=l)}e.fillStyle=this.backgroundColor.toCssColorString(),e.fillRect(0,n.y,n.timeBarWidth,this.height),t(u)&&(t(c)||(c=n.timeBarWidth),e.fillStyle=this.color.toCssColorString(),e.fillRect(u,n.y,Math.max(c-u,1),this.height))}},n}),define("Cesium/Widgets/Timeline/Timeline",["../../Core/ClockRange","../../Core/defined","../../Core/destroyObject","../../Core/DeveloperError","../../Core/JulianDate","../getElement","./TimelineHighlightRange","./TimelineTrack"],function(e,t,i,n,r,o,a,s){"use strict";function l(e,t){e=o(e),this.container=e;var i=document.createElement("div");i.className="cesium-timeline-main",e.appendChild(i),this._topDiv=i,this._endJulian=void 0,this._epochJulian=void 0,this._lastXPos=void 0,this._scrubElement=void 0,this._startJulian=void 0,this._timeBarSecondsSpan=void 0,this._clock=t,this._scrubJulian=t.currentTime,this._mainTicSpan=-1,this._mouseMode=_.none,this._touchMode=y.none,this._touchState={centerX:0,spanX:0},this._mouseX=0,this._timelineDrag=0,this._timelineDragLocation=void 0,this._lastHeight=void 0,this._lastWidth=void 0,this._topDiv.innerHTML='<div class="cesium-timeline-bar"></div><div class="cesium-timeline-trackContainer"><canvas class="cesium-timeline-tracks" width="10" height="1"></canvas></div><div class="cesium-timeline-needle"></div><span class="cesium-timeline-ruler"></span>',this._timeBarEle=this._topDiv.childNodes[0],this._trackContainer=this._topDiv.childNodes[1],this._trackListEle=this._topDiv.childNodes[1].childNodes[0],this._needleEle=this._topDiv.childNodes[2],this._rulerEle=this._topDiv.childNodes[3],this._context=this._trackListEle.getContext("2d"),this._trackList=[],this._highlightRanges=[],this.zoomTo(t.startTime,t.stopTime),this._onMouseDown=c(this),this._onMouseUp=h(this),this._onMouseMove=d(this),this._onMouseWheel=p(this),this._onTouchStart=m(this),this._onTouchMove=g(this),this._onTouchEnd=f(this);var n=this._timeBarEle;document.addEventListener("mouseup",this._onMouseUp,!1),document.addEventListener("mousemove",this._onMouseMove,!1),n.addEventListener("mousedown",this._onMouseDown,!1),n.addEventListener("DOMMouseScroll",this._onMouseWheel,!1),n.addEventListener("mousewheel",this._onMouseWheel,!1),n.addEventListener("touchstart",this._onTouchStart,!1),n.addEventListener("touchmove",this._onTouchMove,!1),n.addEventListener("touchend",this._onTouchEnd,!1),this._topDiv.oncontextmenu=function(){return!1},t.onTick.addEventListener(this.updateFromClock,this),this.updateFromClock()}function u(e){return 10>e?"0"+e.toString():e.toString()}function c(e){return function(t){e._mouseMode!==_.touchOnly&&(0===t.button?(e._mouseMode=_.scrub,e._scrubElement&&(e._scrubElement.style.backgroundPosition="-16px 0"),e._onMouseMove(t)):(e._mouseX=t.clientX,2===t.button?e._mouseMode=_.zoom:e._mouseMode=_.slide)),t.preventDefault()}}function h(e){return function(t){e._mouseMode=_.none,e._scrubElement&&(e._scrubElement.style.backgroundPosition="0px 0px"),e._timelineDrag=0,e._timelineDragLocation=void 0}}function d(e){return function(t){var i;if(e._mouseMode===_.scrub){t.preventDefault();var n=t.clientX-e._topDiv.getBoundingClientRect().left;0>n?(e._timelineDragLocation=0,e._timelineDrag=-.01*e._timeBarSecondsSpan):n>e._topDiv.clientWidth?(e._timelineDragLocation=e._topDiv.clientWidth,e._timelineDrag=.01*e._timeBarSecondsSpan):(e._timelineDragLocation=void 0,e._setTimeBarTime(n,n*e._timeBarSecondsSpan/e._topDiv.clientWidth))}else if(e._mouseMode===_.slide){if(i=e._mouseX-t.clientX,e._mouseX=t.clientX,0!==i){var o=i*e._timeBarSecondsSpan/e._topDiv.clientWidth;e.zoomTo(r.addSeconds(e._startJulian,o,new r),r.addSeconds(e._endJulian,o,new r))}}else e._mouseMode===_.zoom&&(i=e._mouseX-t.clientX,e._mouseX=t.clientX,0!==i&&e.zoomFrom(Math.pow(1.01,i)))}}function p(e){return function(t){var i=t.wheelDeltaY||t.wheelDelta||-t.detail;v=Math.max(Math.min(Math.abs(i),v),1),i/=v,e.zoomFrom(Math.pow(1.05,-i))}}function m(e){return function(t){var i,n,o=t.touches.length,a=e._topDiv.getBoundingClientRect().left;t.preventDefault(),e._mouseMode=_.touchOnly,1===o?(i=r.secondsDifference(e._scrubJulian,e._startJulian),n=Math.round(i*e._topDiv.clientWidth/e._timeBarSecondsSpan+a),Math.abs(t.touches[0].clientX-n)<50?(e._touchMode=y.scrub,e._scrubElement&&(e._scrubElement.style.backgroundPosition=1===o?"-16px 0":"0 0")):(e._touchMode=y.singleTap,e._touchState.centerX=t.touches[0].clientX-a)):2===o?(e._touchMode=y.slideZoom,e._touchState.centerX=.5*(t.touches[0].clientX+t.touches[1].clientX)-a,e._touchState.spanX=Math.abs(t.touches[0].clientX-t.touches[1].clientX)):e._touchMode=y.ignore}}function f(e){return function(t){var i=t.touches.length,n=e._topDiv.getBoundingClientRect().left;e._touchMode===y.singleTap?(e._touchMode=y.scrub,e._handleTouchMove(t)):e._touchMode===y.scrub&&e._handleTouchMove(t),e._mouseMode=_.touchOnly,1!==i?e._touchMode=i>0?y.ignore:y.none:e._touchMode===y.slideZoom&&(e._touchState.centerX=t.touches[0].clientX-n),e._scrubElement&&(e._scrubElement.style.backgroundPosition="0 0")}}function g(e){return function(i){var n,o,a,s,l,u,c=1,h=e._topDiv.getBoundingClientRect().left;e._touchMode===y.singleTap&&(e._touchMode=y.slideZoom),e._mouseMode=_.touchOnly,e._touchMode===y.scrub?(i.preventDefault(),1===i.changedTouches.length&&(o=i.changedTouches[0].clientX-h,o>=0&&o<=e._topDiv.clientWidth&&e._setTimeBarTime(o,o*e._timeBarSecondsSpan/e._topDiv.clientWidth))):e._touchMode===y.slideZoom&&(a=i.touches.length,2===a?(s=.5*(i.touches[0].clientX+i.touches[1].clientX)-h,l=Math.abs(i.touches[0].clientX-i.touches[1].clientX)):1===a&&(s=i.touches[0].clientX-h,l=0),t(s)&&(l>0&&e._touchState.spanX>0?(c=e._touchState.spanX/l,u=r.addSeconds(e._startJulian,(e._touchState.centerX*e._timeBarSecondsSpan-s*e._timeBarSecondsSpan*c)/e._topDiv.clientWidth,new r)):(n=e._touchState.centerX-s,u=r.addSeconds(e._startJulian,n*e._timeBarSecondsSpan/e._topDiv.clientWidth,new r)),e.zoomTo(u,r.addSeconds(u,e._timeBarSecondsSpan*c,new r)),e._touchState.centerX=s,e._touchState.spanX=l))}}var v=1e12,_={none:0,scrub:1,slide:2,zoom:3,touchOnly:4},y={none:0,scrub:1,slideZoom:2,singleTap:3,ignore:4},C=[.001,.002,.005,.01,.02,.05,.1,.25,.5,1,2,5,10,15,30,60,120,300,600,900,1800,3600,7200,14400,21600,43200,86400,172800,345600,604800,1296e3,2592e3,5184e3,7776e3,15552e3,31536e3,63072e3,126144e3,15768e4,31536e4,63072e4,126144e4,15768e5,31536e5,63072e5,126144e5,15768e6,31536e6],w=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];return l.prototype.addEventListener=function(e,t,i){this._topDiv.addEventListener(e,t,i)},l.prototype.removeEventListener=function(e,t,i){this._topDiv.removeEventListener(e,t,i)},l.prototype.isDestroyed=function(){return!1},l.prototype.destroy=function(){this._clock.onTick.removeEventListener(this.updateFromClock,this),document.removeEventListener("mouseup",this._onMouseUp,!1),document.removeEventListener("mousemove",this._onMouseMove,!1);var e=this._timeBarEle;e.removeEventListener("mousedown",this._onMouseDown,!1),e.removeEventListener("DOMMouseScroll",this._onMouseWheel,!1),e.removeEventListener("mousewheel",this._onMouseWheel,!1),e.removeEventListener("touchstart",this._onTouchStart,!1),e.removeEventListener("touchmove",this._onTouchMove,!1),e.removeEventListener("touchend",this._onTouchEnd,!1),this.container.removeChild(this._topDiv),i(this)},l.prototype.addHighlightRange=function(e,t,i){var n=new a(e,t,i);return this._highlightRanges.push(n),this.resize(),n},l.prototype.addTrack=function(e,t,i,n){var r=new s(e,t,i,n);return this._trackList.push(r),this._lastHeight=void 0,this.resize(),r},l.prototype.zoomTo=function(t,i){if(this._startJulian=t,this._endJulian=i,this._timeBarSecondsSpan=r.secondsDifference(i,t),this._clock&&this._clock.clockRange!==e.UNBOUNDED){var n=this._clock.startTime,o=this._clock.stopTime,a=r.secondsDifference(o,n),s=r.secondsDifference(n,this._startJulian),l=r.secondsDifference(o,this._endJulian);this._timeBarSecondsSpan>=a?(this._timeBarSecondsSpan=a,this._startJulian=this._clock.startTime,this._endJulian=this._clock.stopTime):s>0?(this._endJulian=r.addSeconds(this._endJulian,s,new r),this._startJulian=n,this._timeBarSecondsSpan=r.secondsDifference(this._endJulian,this._startJulian)):0>l&&(this._startJulian=r.addSeconds(this._startJulian,l,new r),this._endJulian=o,this._timeBarSecondsSpan=r.secondsDifference(this._endJulian,this._startJulian))}this._makeTics();var u=document.createEvent("Event");u.initEvent("setzoom",!0,!0),u.startJulian=this._startJulian,u.endJulian=this._endJulian,u.epochJulian=this._epochJulian,u.totalSpan=this._timeBarSecondsSpan,u.mainTicSpan=this._mainTicSpan,this._topDiv.dispatchEvent(u)},l.prototype.zoomFrom=function(e){var t=r.secondsDifference(this._scrubJulian,this._startJulian);e>1||0>t||t>this._timeBarSecondsSpan?t=.5*this._timeBarSecondsSpan:t+=t-.5*this._timeBarSecondsSpan;var i=this._timeBarSecondsSpan-t;this.zoomTo(r.addSeconds(this._startJulian,t-t*e,new r),r.addSeconds(this._endJulian,i*e-i,new r))},l.prototype.makeLabel=function(e){var t=r.toGregorianDate(e),i=t.millisecond,n=" UTC";if(i>0&&this._timeBarSecondsSpan<3600){for(n=Math.floor(i).toString();n.length<3;)n="0"+n;n="."+n}return w[t.month-1]+" "+t.day+" "+t.year+" "+u(t.hour)+":"+u(t.minute)+":"+u(t.second)+n},l.prototype.smallestTicInPixels=7,l.prototype._makeTics=function(){function e(e){return Math.floor(E/e)*e}function t(e,t){return Math.ceil(e/t+.5)*t}function i(e){return(e-E)/g}function n(e,t){return e-t*Math.round(e/t)}var o,a=this._timeBarEle,s=r.secondsDifference(this._scrubJulian,this._startJulian),l=Math.round(s*this._topDiv.clientWidth/this._timeBarSecondsSpan),u=l-8,c=this;this._needleEle.style.left=l.toString()+"px";var h="",d=.01,p=31536e6,m=1e-10,f=0,g=this._timeBarSecondsSpan;d>g?(g=d,this._timeBarSecondsSpan=d,this._endJulian=r.addSeconds(this._startJulian,d,new r)):g>p&&(g=p,this._timeBarSecondsSpan=p,this._endJulian=r.addSeconds(this._startJulian,p,new r));var v=this._timeBarEle.clientWidth;10>v&&(v=10);var _,y=this._startJulian,w=Math.min(g/v*1e-5,.4);_=g>31536e4?r.fromIso8601(r.toDate(y).toISOString().substring(0,2)+"00-01-01T00:00:00Z"):g>31536e3?r.fromIso8601(r.toDate(y).toISOString().substring(0,3)+"0-01-01T00:00:00Z"):g>86400?r.fromIso8601(r.toDate(y).toISOString().substring(0,4)+"-01-01T00:00:00Z"):r.fromIso8601(r.toDate(y).toISOString().substring(0,10)+"T00:00:00Z");var E=r.secondsDifference(this._startJulian,r.addSeconds(_,w,new r)),b=E+g;this._epochJulian=_,this._rulerEle.innerHTML=this.makeLabel(r.addSeconds(this._endJulian,-d,new r));var S=this._rulerEle.offsetWidth+20;30>S&&(S=180);var T=f;f-=m;var x={startTime:E,startJulian:y,epochJulian:_,duration:g,timeBarWidth:v,getAlpha:i};this._highlightRanges.forEach(function(e){h+=e.render(x)});var A=0,P=0,M=0,D=S/v;D>1&&(D=1),D*=this._timeBarSecondsSpan;var I,R=-1,O=-1,L=C.length;for(I=0;L>I;++I){var N=C[I];if(++R,A=N,N>D&&N>f)break;0>O&&v*(N/this._timeBarSecondsSpan)>=this.smallestTicInPixels&&(O=R)}if(R>0){for(;R>0;)if(--R,Math.abs(n(A,C[R]))<1e-5){C[R]>=f&&(P=C[R]);break}if(O>=0)for(;R>O;){if(Math.abs(n(P,C[O]))<1e-5&&C[O]>=f){M=C[O];break}++O}}f=T,f>m&&1e-5>M&&Math.abs(f-A)>m&&(M=f,A+m>=f&&(P=0));var F,k=-999999;if(v*(M/this._timeBarSecondsSpan)>=3)for(o=e(M);b>=o;o=t(o,M))h+='<span class="cesium-timeline-ticTiny" style="left: '+Math.round(v*i(o)).toString()+'px;"></span>';if(v*(P/this._timeBarSecondsSpan)>=3)for(o=e(P);b>=o;o=t(o,P))h+='<span class="cesium-timeline-ticSub" style="left: '+Math.round(v*i(o)).toString()+'px;"></span>';if(v*(A/this._timeBarSecondsSpan)>=2){this._mainTicSpan=A,b+=A,o=e(A);for(var B=r.computeTaiMinusUtc(_);b>=o;){var z=r.addSeconds(y,o-E,new r);if(A>2.1){var V=r.computeTaiMinusUtc(z);Math.abs(V-B)>.1&&(o+=V-B,z=r.addSeconds(y,o-E,new r))}var U=Math.round(v*i(o)),G=this.makeLabel(z);this._rulerEle.innerHTML=G,F=this._rulerEle.offsetWidth,10>F&&(F=S);var W=U-(F/2-1);W>k?(k=W+F+5,h+='<span class="cesium-timeline-ticMain" style="left: '+U.toString()+'px;"></span><span class="cesium-timeline-ticLabel" style="left: '+W.toString()+'px;">'+G+"</span>"):h+='<span class="cesium-timeline-ticSub" style="left: '+U.toString()+'px;"></span>',o=t(o,A)}}else this._mainTicSpan=-1;h+='<span class="cesium-timeline-icon16" style="left:'+u+'px;bottom:0;background-position: 0px 0px;"></span>',a.innerHTML=h,this._scrubElement=a.lastChild,this._context.clearRect(0,0,this._trackListEle.width,this._trackListEle.height),x.y=0,this._trackList.forEach(function(e){e.render(c._context,x),x.y+=e.height})},l.prototype.updateFromClock=function(){this._scrubJulian=this._clock.currentTime;var e=this._scrubElement;if(t(this._scrubElement)){var i=r.secondsDifference(this._scrubJulian,this._startJulian),n=Math.round(i*this._topDiv.clientWidth/this._timeBarSecondsSpan);this._lastXPos!==n&&(this._lastXPos=n,e.style.left=n-8+"px",this._needleEle.style.left=n+"px")}t(this._timelineDragLocation)&&(this._setTimeBarTime(this._timelineDragLocation,this._timelineDragLocation*this._timeBarSecondsSpan/this._topDiv.clientWidth),this.zoomTo(r.addSeconds(this._startJulian,this._timelineDrag,new r),r.addSeconds(this._endJulian,this._timelineDrag,new r)))},l.prototype._setTimeBarTime=function(e,t){if(e=Math.round(e),this._scrubJulian=r.addSeconds(this._startJulian,t,new r),this._scrubElement){var i=e-8;this._scrubElement.style.left=i.toString()+"px",this._needleEle.style.left=e.toString()+"px"; +}var n=document.createEvent("Event");n.initEvent("settime",!0,!0),n.clientX=e,n.timeSeconds=t,n.timeJulian=this._scrubJulian,n.clock=this._clock,this._topDiv.dispatchEvent(n)},l.prototype.resize=function(){var e=this.container.clientWidth,t=this.container.clientHeight;if(e!==this._lastWidth||t!==this._lastHeight){this._trackContainer.style.height=t+"px";var i=1;this._trackList.forEach(function(e){i+=e.height}),this._trackListEle.style.height=i.toString()+"px",this._trackListEle.width=this._trackListEle.clientWidth,this._trackListEle.height=i,this._makeTics(),this._lastWidth=e,this._lastHeight=t}},l}),define("Cesium/Widgets/VRButton/VRButtonViewModel",["../../Core/defaultValue","../../Core/defined","../../Core/defineProperties","../../Core/destroyObject","../../Core/DeveloperError","../../Core/Fullscreen","../../ThirdParty/knockout","../../ThirdParty/NoSleep","../createCommand","../getElement"],function(e,t,i,n,r,o,a,s,l,u){"use strict";function c(e){var i=!1,n=window.screen;return t(n)&&(t(n.lockOrientation)?i=n.lockOrientation(e):t(n.mozLockOrientation)?i=n.mozLockOrientation(e):t(n.msLockOrientation)?i=n.msLockOrientation(e):t(n.orientation&&n.orientation.lock)&&(i=n.orientation.lock(e))),i}function h(){var e=window.screen;t(e)&&(t(e.unlockOrientation)?e.unlockOrientation():t(e.mozUnlockOrientation)?e.mozUnlockOrientation():t(e.msUnlockOrientation)?e.msUnlockOrientation():t(e.orientation&&e.orientation.unlock)&&e.orientation.unlock())}function d(e,t,i){i()?(t.useWebVR=!1,e._locked&&(h(),e._locked=!1),e._noSleep.disable(),o.exitFullscreen(),i(!1)):(o.fullscreen||o.requestFullscreen(e._vrElement),e._noSleep.enable(),e._locked||(e._locked=c("landscape")),t.useWebVR=!0,i(!0))}function p(t,i){var n=this,r=a.observable(o.enabled),c=a.observable(!1);this.isVRMode=void 0,a.defineProperty(this,"isVRMode",{get:function(){return c()}}),this.isVREnabled=void 0,a.defineProperty(this,"isVREnabled",{get:function(){return r()},set:function(e){r(e&&o.enabled)}}),this.tooltip=void 0,a.defineProperty(this,"tooltip",function(){return r()?c()?"Exit VR mode":"Enter VR mode":"VR mode is unavailable"}),this._locked=!1,this._noSleep=new s,this._command=l(function(){d(n,t,c)},a.getObservable(this,"isVREnabled")),this._vrElement=e(u(i),document.body),this._callback=function(){!o.fullscreen&&c()&&(t.useWebVR=!1,n._locked&&(h(),n._locked=!1),n._noSleep.disable(),c(!1))},document.addEventListener(o.changeEventName,this._callback)}return i(p.prototype,{vrElement:{get:function(){return this._vrElement},set:function(e){this._vrElement=e}},command:{get:function(){return this._command}}}),p.prototype.isDestroyed=function(){return!1},p.prototype.destroy=function(){n(this)},p}),define("Cesium/Widgets/VRButton/VRButton",["../../Core/defined","../../Core/defineProperties","../../Core/destroyObject","../../Core/DeveloperError","../../ThirdParty/knockout","../getElement","./VRButtonViewModel"],function(e,t,i,n,r,o,a){"use strict";function s(e,t,i){e=o(e);var n=new a(t,i);n._exitVRPath=u,n._enterVRPath=l;var s=document.createElement("button");s.type="button",s.className="cesium-button cesium-vrButton",s.setAttribute("data-bind","attr: { title: tooltip },click: command,enable: isVREnabled,cesiumSvgPath: { path: isVRMode ? _exitVRPath : _enterVRPath, width: 32, height: 32 }"),e.appendChild(s),r.applyBindings(n,s),this._container=e,this._viewModel=n,this._element=s}var l="M 5.3125 6.375 C 4.008126 6.375 2.96875 7.4141499 2.96875 8.71875 L 2.96875 19.5 C 2.96875 20.8043 4.008126 21.875 5.3125 21.875 L 13.65625 21.875 C 13.71832 20.0547 14.845166 18.59375 16.21875 18.59375 C 17.592088 18.59375 18.71881 20.0552 18.78125 21.875 L 27.09375 21.875 C 28.398125 21.875 29.4375 20.8043 29.4375 19.5 L 29.4375 8.71875 C 29.4375 7.4141499 28.398125 6.375 27.09375 6.375 L 5.3125 6.375 z M 9.625 10.4375 C 11.55989 10.4375 13.125 12.03385 13.125 13.96875 C 13.125 15.90365 11.55989 17.46875 9.625 17.46875 C 7.69011 17.46875 6.125 15.90365 6.125 13.96875 C 6.125 12.03385 7.69011 10.4375 9.625 10.4375 z M 22.46875 10.4375 C 24.40364 10.4375 25.96875 12.03385 25.96875 13.96875 C 25.96875 15.90365 24.40364 17.46875 22.46875 17.46875 C 20.53386 17.46875 18.96875 15.90365 18.96875 13.96875 C 18.96875 12.03385 20.53386 10.4375 22.46875 10.4375 z",u="M 25.770585,2.4552065 C 15.72282,13.962707 10.699956,19.704407 8.1768352,22.580207 c -1.261561,1.4379 -1.902282,2.1427 -2.21875,2.5 -0.141624,0.1599 -0.208984,0.2355 -0.25,0.2813 l 0.6875,0.75 c 10e-5,-10e-5 0.679191,0.727 0.6875,0.7187 0.01662,-0.016 0.02451,-0.024 0.03125,-0.031 0.01348,-0.014 0.04013,-0.038 0.0625,-0.062 0.04474,-0.05 0.120921,-0.1315 0.28125,-0.3126 0.320657,-0.3619 0.956139,-1.0921 2.2187499,-2.5312 2.5252219,-2.8781 7.5454589,-8.6169 17.5937499,-20.1250005 l -1.5,-1.3125 z m -20.5624998,3.9063 c -1.304375,0 -2.34375,1.0391 -2.34375,2.3437 l 0,10.8125005 c 0,1.3043 1.039375,2.375 2.34375,2.375 l 2.25,0 c 1.9518039,-2.2246 7.4710958,-8.5584 13.5624998,-15.5312005 l -15.8124998,0 z m 21.1249998,0 c -1.855467,2.1245 -2.114296,2.4005 -3.59375,4.0936995 1.767282,0.1815 3.15625,1.685301 3.15625,3.500001 0,1.9349 -1.56511,3.5 -3.5,3.5 -1.658043,0 -3.043426,-1.1411 -3.40625,-2.6875 -1.089617,1.2461 -2.647139,2.9988 -3.46875,3.9375 0.191501,-0.062 0.388502,-0.094 0.59375,-0.094 1.373338,0 2.50006,1.4614 2.5625,3.2812 l 8.3125,0 c 1.304375,0 2.34375,-1.0707 2.34375,-2.375 l 0,-10.8125005 c 0,-1.3046 -1.039375,-2.3437 -2.34375,-2.3437 l -0.65625,0 z M 9.5518351,10.423906 c 1.9348899,0 3.4999999,1.596401 3.4999999,3.531301 0,1.9349 -1.56511,3.5 -3.4999999,3.5 -1.9348899,0 -3.4999999,-1.5651 -3.4999999,-3.5 0,-1.9349 1.56511,-3.531301 3.4999999,-3.531301 z m 4.2187499,10.312601 c -0.206517,0.2356 -0.844218,0.9428 -1.03125,1.1562 l 0.8125,0 c 0.01392,-0.4081 0.107026,-0.7968 0.21875,-1.1562 z";return t(s.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),s.prototype.isDestroyed=function(){return!1},s.prototype.destroy=function(){return this._viewModel.destroy(),r.cleanNode(this._element),this._container.removeChild(this._element),i(this)},s}),define("Cesium/Widgets/Viewer/Viewer",["../../Core/BoundingSphere","../../Core/Cartesian3","../../Core/defaultValue","../../Core/defined","../../Core/defineProperties","../../Core/destroyObject","../../Core/DeveloperError","../../Core/EventHelper","../../Core/Fullscreen","../../Core/isArray","../../Core/Matrix4","../../Core/Rectangle","../../Core/ScreenSpaceEventType","../../DataSources/BoundingSphereState","../../DataSources/ConstantPositionProperty","../../DataSources/DataSourceCollection","../../DataSources/DataSourceDisplay","../../DataSources/Entity","../../DataSources/EntityView","../../DataSources/Property","../../Scene/ImageryLayer","../../Scene/SceneMode","../../ThirdParty/knockout","../../ThirdParty/when","../Animation/Animation","../Animation/AnimationViewModel","../BaseLayerPicker/BaseLayerPicker","../BaseLayerPicker/createDefaultImageryProviderViewModels","../BaseLayerPicker/createDefaultTerrainProviderViewModels","../CesiumWidget/CesiumWidget","../ClockViewModel","../FullscreenButton/FullscreenButton","../Geocoder/Geocoder","../getElement","../HomeButton/HomeButton","../InfoBox/InfoBox","../NavigationHelpButton/NavigationHelpButton","../SceneModePicker/SceneModePicker","../SelectionIndicator/SelectionIndicator","../subscribeAndEvaluate","../Timeline/Timeline","../VRButton/VRButton"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g,v,_,y,C,w,E,b,S,T,x,A,P,M,D,I,R,O,L,N,F,k,B,z,V,U){"use strict";function G(e){var t=e.clock;t.currentTime=e.timeJulian,t.shouldAnimate=!1}function W(e,t){var r=e.scene.pick(t.position);if(n(r)){var o=i(r.id,r.primitive.id);if(o instanceof v)return o}return n(e.scene.globe)?q(e,t.position):void 0}function H(e,t,i){if(n(i)){var r=i.clock;n(r)&&(r.getValue(t),n(e)&&(e.updateFromClock(),e.zoomTo(r.startTime,r.stopTime)))}}function q(e,t){var i=e.scene,r=i.camera.getPickRay(t),o=i.imageryLayers.pickImageryLayerFeatures(r,i);if(n(o)){var a=new v({id:"Loading...",description:"Loading feature information..."});return b(o,function(t){if(e.selectedEntity===a){if(!n(t)||0===t.length)return void(e.selectedEntity=j());var i=t[0],r=new v({id:i.name,description:i.description});if(n(i.position)){var o=e.scene.globe.ellipsoid.cartographicToCartesian(i.position,te);r.position=new m(o)}e.selectedEntity=r}},function(){e.selectedEntity===a&&(e.selectedEntity=j())}),a}}function j(){return new v({id:"None",description:"No features found."})}function Y(e,t){var i=e._geocoder,r=e._homeButton,o=e._sceneModePicker,a=e._baseLayerPicker,s=e._animation,l=e._timeline,u=e._fullscreenButton,c=e._infoBox,h=e._selectionIndicator,d=t?"hidden":"visible";if(n(i)&&(i.container.style.visibility=d),n(r)&&(r.container.style.visibility=d),n(o)&&(o.container.style.visibility=d),n(a)&&(a.container.style.visibility=d),n(s)&&(s.container.style.visibility=d),n(l)&&(l.container.style.visibility=d),n(u)&&u.viewModel.isFullscreenEnabled&&(u.container.style.visibility=d),n(c)&&(c.container.style.visibility=d),n(h)&&(h.container.style.visibility=d),e._container){var p=t||!n(u)?0:u.container.clientWidth;e._vrButton.container.style.right=p+"px",e.forceResize()}}function X(e,t){function r(e){var t=W(u,e);n(t)&&(y.getValueOrUndefined(t.position,u.clock.currentTime)?u.trackedEntity=t:u.zoomTo(t))}function o(e){u.selectedEntity=W(u,e)}e=O(e),t=i(t,i.EMPTY_OBJECT);var l=!(n(t.globe)&&t.globe===!1||n(t.baseLayerPicker)&&t.baseLayerPicker===!1),u=this,c=document.createElement("div");c.className="cesium-viewer",e.appendChild(c);var h=document.createElement("div");h.className="cesium-viewer-cesiumWidgetContainer",c.appendChild(h);var p=document.createElement("div");p.className="cesium-viewer-bottom",c.appendChild(p);var m=i(t.scene3DOnly,!1),v=new M(h,{terrainProvider:t.terrainProvider,imageryProvider:l?!1:t.imageryProvider,clock:t.clock,skyBox:t.skyBox,skyAtmosphere:t.skyAtmosphere,sceneMode:t.sceneMode,mapProjection:t.mapProjection,globe:t.globe,orderIndependentTranslucency:t.orderIndependentTranslucency,contextOptions:t.contextOptions,useDefaultRenderLoop:t.useDefaultRenderLoop,targetFrameRate:t.targetFrameRate,showRenderLoopErrors:t.showRenderLoopErrors,creditContainer:n(t.creditContainer)?t.creditContainer:p,scene3DOnly:m,terrainExaggeration:t.terrainExaggeration,shadows:t.shadows,terrainShadows:t.terrainShadows,mapMode2D:t.mapMode2D}),_=t.dataSources,C=!1;n(_)||(_=new f,C=!0);var w=new g({scene:v.scene,dataSourceCollection:_}),b=v.clock,H=new D(b),q=new s;q.add(b.onTick,X.prototype._onTick,this),q.add(v.scene.morphStart,X.prototype._clearTrackedObject,this);var j;if(!n(t.selectionIndicator)||t.selectionIndicator!==!1){var Z=document.createElement("div");Z.className="cesium-viewer-selectionIndicatorContainer",c.appendChild(Z),j=new B(Z,v.scene)}var K;if(!n(t.infoBox)||t.infoBox!==!1){var J=document.createElement("div");J.className="cesium-viewer-infoBoxContainer",c.appendChild(J),K=new N(J);var Q=K.viewModel;q.add(Q.cameraClicked,X.prototype._onInfoBoxCameraClicked,this),q.add(Q.closeClicked,X.prototype._onInfoBoxClockClicked,this)}var $=document.createElement("div");$.className="cesium-viewer-toolbar",c.appendChild($);var ee;if(!n(t.geocoder)||t.geocoder!==!1){var te=document.createElement("div");te.className="cesium-viewer-geocoderContainer",$.appendChild(te),ee=new R({container:te,scene:v.scene}),q.add(ee.viewModel.search.beforeExecute,X.prototype._clearObjects,this)}var ie;if(n(t.homeButton)&&t.homeButton===!1||(ie=new L($,v.scene),n(ee)&&q.add(ie.viewModel.command.afterExecute,function(){var e=ee.viewModel;e.searchText="",e.isSearchInProgress&&e.search()}),q.add(ie.viewModel.command.beforeExecute,X.prototype._clearTrackedObject,this)),t.sceneModePicker===!0&&m)throw new a("options.sceneModePicker is not available when options.scene3DOnly is set to true.");var ne;m||n(t.sceneModePicker)&&t.sceneModePicker===!1||(ne=new k($,v.scene));var re,oe;if(l){var ae=i(t.imageryProviderViewModels,A()),se=i(t.terrainProviderViewModels,P());re=new x($,{globe:v.scene.globe,imageryProviderViewModels:ae,selectedImageryProviderViewModel:t.selectedImageryProviderViewModel,terrainProviderViewModels:se,selectedTerrainProviderViewModel:t.selectedTerrainProviderViewModel});var le=$.getElementsByClassName("cesium-baseLayerPicker-dropDown");oe=le[0]}var ue;if(!n(t.navigationHelpButton)||t.navigationHelpButton!==!1){var ce=!0;try{if(n(window.localStorage)){var he=window.localStorage.getItem("cesium-hasSeenNavHelp");n(he)&&Boolean(he)?ce=!1:window.localStorage.setItem("cesium-hasSeenNavHelp","true")}}catch(de){}ue=new F({container:$,instructionsInitiallyVisible:i(t.navigationInstructionsInitiallyVisible,ce)})}var pe;if(!n(t.animation)||t.animation!==!1){var me=document.createElement("div");me.className="cesium-viewer-animationContainer",c.appendChild(me),pe=new S(me,new T(H))}var fe;if(!n(t.timeline)||t.timeline!==!1){var ge=document.createElement("div");ge.className="cesium-viewer-timelineContainer",c.appendChild(ge),fe=new V(ge,b),fe.addEventListener("settime",G,!1),fe.zoomTo(b.startTime,b.stopTime)}var ve,_e;if(!n(t.fullscreenButton)||t.fullscreenButton!==!1){var ye=document.createElement("div");ye.className="cesium-viewer-fullscreenContainer",c.appendChild(ye),ve=new I(ye,t.fullscreenElement),_e=z(ve.viewModel,"isFullscreenEnabled",function(e){ye.style.display=e?"block":"none",n(fe)&&(fe.container.style.right=ye.clientWidth+"px",fe.resize())})}var Ce,we,Ee;if(t.vrButton){var be=document.createElement("div");be.className="cesium-viewer-vrContainer",c.appendChild(be),Ce=new U(be,v.scene,t.fullScreenElement),we=z(Ce.viewModel,"isVREnabled",function(e){be.style.display=e?"block":"none",n(ve)&&(be.style.right=ye.clientWidth+"px"),n(fe)&&(fe.container.style.right=be.clientWidth+"px",fe.resize())}),Ee=z(Ce.viewModel,"isVRMode",function(e){Y(u,e)})}this._baseLayerPickerDropDown=oe,this._fullscreenSubscription=_e,this._vrSubscription=we,this._vrModeSubscription=Ee,this._dataSourceChangedListeners={},this._automaticallyTrackDataSourceClocks=i(t.automaticallyTrackDataSourceClocks,!0),this._container=e,this._bottomContainer=p,this._element=c,this._cesiumWidget=v,this._selectionIndicator=j,this._infoBox=K,this._dataSourceCollection=_,this._destroyDataSourceCollection=C,this._dataSourceDisplay=w,this._clockViewModel=H,this._toolbar=$,this._homeButton=ie,this._sceneModePicker=ne,this._baseLayerPicker=re,this._navigationHelpButton=ue,this._animation=pe,this._timeline=fe,this._fullscreenButton=ve,this._vrButton=Ce,this._geocoder=ee,this._eventHelper=q,this._lastWidth=0,this._lastHeight=0,this._allowDataSourcesToSuspendAnimation=!0,this._entityView=void 0,this._enableInfoOrSelection=n(K)||n(j),this._clockTrackedDataSource=void 0,this._trackedEntity=void 0,this._needTrackedEntityUpdate=!1,this._selectedEntity=void 0,this._clockTrackedDataSource=void 0,this._forceResize=!1,this._zoomIsFlight=!1,this._zoomTarget=void 0,this._zoomPromise=void 0,this._zoomOptions=void 0,E.track(this,["_trackedEntity","_selectedEntity","_clockTrackedDataSource"]),q.add(_.dataSourceAdded,X.prototype._onDataSourceAdded,this),q.add(_.dataSourceRemoved,X.prototype._onDataSourceRemoved,this),q.add(v.scene.preRender,X.prototype.resize,this),q.add(v.scene.postRender,X.prototype._postRender,this);for(var Se=_.length,Te=0;Se>Te;Te++)this._dataSourceAdded(_,_.get(Te));this._dataSourceAdded(void 0,w.defaultDataSource),q.add(_.dataSourceAdded,X.prototype._dataSourceAdded,this),q.add(_.dataSourceRemoved,X.prototype._dataSourceRemoved,this),v.screenSpaceEventHandler.setInputAction(o,d.LEFT_CLICK),v.screenSpaceEventHandler.setInputAction(r,d.LEFT_DOUBLE_CLICK)}function Z(e,t,r,o){J(e);var a=b.defer();return e._zoomPromise=a,e._zoomIsFlight=o,e._zoomOptions=r,b(t,function(t){if(e._zoomPromise===a){if(t instanceof C)return void t.getViewableRectangle().then(function(t){e._zoomPromise===a&&(e._zoomTarget=t)});if(t.isLoading&&n(t.loadingEvent))var r=t.loadingEvent.addEventListener(function(){r(),e._zoomPromise===a&&(e._zoomTarget=t.entities.values.slice(0))});else{if(u(t))return void(e._zoomTarget=t.slice(0));t=i(t.values,t),n(t.entities)&&(t=t.entities.values),u(t)?e._zoomTarget=t.slice(0):e._zoomTarget=[t]}}}),a.promise}function K(e){e._zoomPromise=void 0,e._zoomTarget=void 0,e._zoomOptions=void 0}function J(e){var t=e._zoomPromise;n(t)&&(K(e),t.resolve(!1))}function Q(t){var r=t._zoomTarget;if(n(r)&&t.scene.mode!==w.MORPHING){var o=t.scene,a=o.camera,s=t._zoomPromise,l=i(t._zoomOptions,{});if(r instanceof h){var u={destination:r,duration:l.duration,maximumHeight:l.maximumHeight,complete:function(){s.resolve(!0)},cancel:function(){s.resolve(!1)}};return t._zoomIsFlight?a.flyTo(u):(a.setView(u),s.resolve(!0)),void K(t)}for(var d=[],m=0,f=r.length;f>m;m++){var g=t._dataSourceDisplay.getBoundingSphere(r[m],!1,ee);if(g===p.PENDING)return;g!==p.FAILED&&d.push(e.clone(ee))}if(0===d.length)return void J(t);t.trackedEntity=void 0;var v=e.fromBoundingSpheres(d),_=o.screenSpaceCameraController;_.minimumZoomDistance=Math.min(_.minimumZoomDistance,.5*v.radius),t._zoomIsFlight?(K(t),a.flyToBoundingSphere(v,{duration:l.duration,maximumHeight:l.maximumHeight,complete:function(){s.resolve(!0)},cancel:function(){s.resolve(!1)},offset:l.offset})):(a.viewBoundingSphere(v,t._zoomOptions),a.lookAtTransform(c.IDENTITY),K(t),s.resolve(!0))}}function $(e){if(e._needTrackedEntityUpdate){var t=e._trackedEntity,i=e.clock.currentTime,r=y.getValueOrUndefined(t.position,i);if(n(r)){var o=e.scene,a=e._dataSourceDisplay.getBoundingSphere(t,!1,ee);if(a!==p.PENDING){var s=o.mode;(s===w.COLUMBUS_VIEW||s===w.SCENE2D)&&(o.screenSpaceCameraController.enableTranslate=!1),(s===w.COLUMBUS_VIEW||s===w.SCENE3D)&&(o.screenSpaceCameraController.enableTilt=!1);var l=a!==p.FAILED?ee:void 0;e._entityView=new _(t,o,o.mapProjection.ellipsoid),e._entityView.update(i,l),e._needTrackedEntityUpdate=!1}}}}var ee=new e,te=new t;return r(X.prototype,{container:{get:function(){return this._container}},bottomContainer:{get:function(){return this._bottomContainer}},cesiumWidget:{get:function(){return this._cesiumWidget}},selectionIndicator:{get:function(){return this._selectionIndicator}},infoBox:{get:function(){return this._infoBox}},geocoder:{get:function(){return this._geocoder}},homeButton:{get:function(){return this._homeButton}},sceneModePicker:{get:function(){return this._sceneModePicker}},baseLayerPicker:{get:function(){return this._baseLayerPicker}},navigationHelpButton:{get:function(){return this._navigationHelpButton}},animation:{get:function(){return this._animation}},timeline:{get:function(){return this._timeline}},fullscreenButton:{get:function(){return this._fullscreenButton}},vrButton:{get:function(){return this._vrButton}},dataSourceDisplay:{get:function(){return this._dataSourceDisplay}},entities:{get:function(){return this._dataSourceDisplay.defaultDataSource.entities}},dataSources:{get:function(){return this._dataSourceCollection}},canvas:{get:function(){return this._cesiumWidget.canvas}},cesiumLogo:{get:function(){return this._cesiumWidget.cesiumLogo}},scene:{get:function(){return this._cesiumWidget.scene}},shadows:{get:function(){return this.scene.shadowMap.enabled},set:function(e){this.scene.shadowMap.enabled=e}},terrainShadows:{get:function(){return this.scene.globe.castShadows},set:function(e){this.scene.globe.castShadows=e}},shadowMap:{get:function(){return this.scene.shadowMap}},imageryLayers:{get:function(){return this.scene.imageryLayers}},terrainProvider:{get:function(){return this.scene.terrainProvider},set:function(e){this.scene.terrainProvider=e}},camera:{get:function(){return this.scene.camera}},clock:{get:function(){return this._cesiumWidget.clock}},screenSpaceEventHandler:{get:function(){return this._cesiumWidget.screenSpaceEventHandler}},targetFrameRate:{get:function(){return this._cesiumWidget.targetFrameRate},set:function(e){this._cesiumWidget.targetFrameRate=e}},useDefaultRenderLoop:{get:function(){return this._cesiumWidget.useDefaultRenderLoop},set:function(e){this._cesiumWidget.useDefaultRenderLoop=e}},resolutionScale:{get:function(){return this._cesiumWidget.resolutionScale},set:function(e){this._cesiumWidget.resolutionScale=e,this._forceResize=!0}},allowDataSourcesToSuspendAnimation:{get:function(){return this._allowDataSourcesToSuspendAnimation},set:function(e){this._allowDataSourcesToSuspendAnimation=e}},trackedEntity:{get:function(){return this._trackedEntity},set:function(e){if(this._trackedEntity!==e){this._trackedEntity=e,J(this);var t=this.scene,i=t.mode;if(!n(e)||!n(e.position))return this._needTrackedEntityUpdate=!1,(i===w.COLUMBUS_VIEW||i===w.SCENE2D)&&(t.screenSpaceCameraController.enableTranslate=!0),(i===w.COLUMBUS_VIEW||i===w.SCENE3D)&&(t.screenSpaceCameraController.enableTilt=!0),this._entityView=void 0,void this.camera.lookAtTransform(c.IDENTITY);this._needTrackedEntityUpdate=!0}}},selectedEntity:{get:function(){return this._selectedEntity},set:function(e){if(this._selectedEntity!==e){this._selectedEntity=e;var t=n(this._selectionIndicator)?this._selectionIndicator.viewModel:void 0;n(e)?n(t)&&t.animateAppear():n(t)&&t.animateDepart()}}},clockTrackedDataSource:{get:function(){return this._clockTrackedDataSource},set:function(e){this._clockTrackedDataSource!==e&&(this._clockTrackedDataSource=e,H(this._timeline,this.clock,e))}}}),X.prototype.extend=function(e,t){e(this,t)},X.prototype.resize=function(){var e=this._cesiumWidget,t=this._container,i=t.clientWidth,r=t.clientHeight,o=n(this._animation),a=n(this._timeline);if(this._forceResize||i!==this._lastWidth||r!==this._lastHeight){e.resize(),this._forceResize=!1;var s=r-125,l=this._baseLayerPickerDropDown;n(l)&&(l.style.maxHeight=s+"px"),n(this._infoBox)&&(this._infoBox.viewModel.maxHeight=s);var u,c=this._timeline,h=0,d=0,p=0;if(o&&"hidden"!==window.getComputedStyle(this._animation.container).visibility){var m=this._lastWidth;u=this._animation.container,i>900?(h=169,900>=m&&(u.style.width="169px",u.style.height="112px",this._animation.resize())):i>=600?(h=136,(600>m||m>900)&&(u.style.width="136px",u.style.height="90px",this._animation.resize())):(h=106,(m>600||0===m)&&(u.style.width="106px",u.style.height="70px",this._animation.resize())),d=h+5}if(a&&"hidden"!==window.getComputedStyle(this._timeline.container).visibility){var f=this._fullscreenButton,g=this._vrButton,v=c.container,_=v.style;p=v.clientHeight+3,_.left=h+"px";var y=0;n(f)&&(y+=f.container.clientWidth),n(g)&&(y+=g.container.clientWidth),_.right=y+"px",c.resize()}this._bottomContainer.style.left=d+"px",this._bottomContainer.style.bottom=p+"px",this._lastWidth=i,this._lastHeight=r}},X.prototype.forceResize=function(){this._lastWidth=0,this.resize()},X.prototype.render=function(){this._cesiumWidget.render()},X.prototype.isDestroyed=function(){return!1},X.prototype.destroy=function(){var e;this.screenSpaceEventHandler.removeInputAction(d.LEFT_CLICK),this.screenSpaceEventHandler.removeInputAction(d.LEFT_DOUBLE_CLICK);var t=this.dataSources,i=t.length;for(e=0;i>e;e++)this._dataSourceRemoved(t,t.get(e));return this._dataSourceRemoved(void 0,this._dataSourceDisplay.defaultDataSource),this._container.removeChild(this._element),this._element.removeChild(this._toolbar),this._eventHelper.removeAll(),n(this._geocoder)&&(this._geocoder=this._geocoder.destroy()),n(this._homeButton)&&(this._homeButton=this._homeButton.destroy()),n(this._sceneModePicker)&&(this._sceneModePicker=this._sceneModePicker.destroy()),n(this._baseLayerPicker)&&(this._baseLayerPicker=this._baseLayerPicker.destroy()),n(this._animation)&&(this._element.removeChild(this._animation.container),this._animation=this._animation.destroy()),n(this._timeline)&&(this._timeline.removeEventListener("settime",G,!1),this._element.removeChild(this._timeline.container),this._timeline=this._timeline.destroy()),n(this._fullscreenButton)&&(this._fullscreenSubscription.dispose(),this._element.removeChild(this._fullscreenButton.container),this._fullscreenButton=this._fullscreenButton.destroy()),n(this._vrButton)&&(this._vrSubscription.dispose(),this._vrModeSubscription.dispose(),this._element.removeChild(this._vrButton.container),this._vrButton=this._vrButton.destroy()),n(this._infoBox)&&(this._element.removeChild(this._infoBox.container),this._infoBox=this._infoBox.destroy()),n(this._selectionIndicator)&&(this._element.removeChild(this._selectionIndicator.container),this._selectionIndicator=this._selectionIndicator.destroy()),this._clockViewModel=this._clockViewModel.destroy(),this._dataSourceDisplay=this._dataSourceDisplay.destroy(),this._cesiumWidget=this._cesiumWidget.destroy(),this._destroyDataSourceCollection&&(this._dataSourceCollection=this._dataSourceCollection.destroy()),o(this)},X.prototype._dataSourceAdded=function(e,t){var i=t.entities;i.collectionChanged.addEventListener(X.prototype._onEntityCollectionChanged,this)},X.prototype._dataSourceRemoved=function(e,t){var i=t.entities;i.collectionChanged.removeEventListener(X.prototype._onEntityCollectionChanged,this),n(this.trackedEntity)&&i.getById(this.trackedEntity.id)===this.trackedEntity&&(this.trackedEntity=void 0),n(this.selectedEntity)&&i.getById(this.selectedEntity.id)===this.selectedEntity&&(this.selectedEntity=void 0)},X.prototype._onTick=function(e){var r=e.currentTime,o=this._dataSourceDisplay.update(r);this._allowDataSourcesToSuspendAnimation&&(this._clockViewModel.canAnimate=o);var a=this._entityView;if(n(a)){var s=this._trackedEntity,l=this._dataSourceDisplay.getBoundingSphere(s,!1,ee);l===p.DONE&&a.update(r,ee)}var u,c=!1,h=this.selectedEntity,d=n(h)&&this._enableInfoOrSelection;if(d&&h.isShowing&&h.isAvailable(r)){var m=this._dataSourceDisplay.getBoundingSphere(h,!0,ee);m!==p.FAILED?u=ee.center:n(h.position)&&(u=h.position.getValue(r,u)),c=n(u)}var f=n(this._selectionIndicator)?this._selectionIndicator.viewModel:void 0;n(f)&&(f.position=t.clone(u,f.position),f.showSelection=d&&c,f.update());var g=n(this._infoBox)?this._infoBox.viewModel:void 0;n(g)&&(g.showInfo=d,g.enableCamera=c,g.isCameraTracking=this.trackedEntity===this.selectedEntity,d?(g.titleText=i(h.name,h.id),g.description=y.getValueOrDefault(h.description,r,"")):(g.titleText="",g.description=""))},X.prototype._onEntityCollectionChanged=function(e,t,i){for(var n=i.length,r=0;n>r;r++){var o=i[r];this.trackedEntity===o&&(this.trackedEntity=void 0),this.selectedEntity===o&&(this.selectedEntity=void 0)}},X.prototype._onInfoBoxCameraClicked=function(e){if(e.isCameraTracking&&this.trackedEntity===this.selectedEntity)this.trackedEntity=void 0;else{var t=this.selectedEntity,i=t.position;n(i)?this.trackedEntity=this.selectedEntity:this.zoomTo(this.selectedEntity)}},X.prototype._clearTrackedObject=function(){this.trackedEntity=void 0},X.prototype._onInfoBoxClockClicked=function(e){this.selectedEntity=void 0},X.prototype._clearObjects=function(){this.trackedEntity=void 0,this.selectedEntity=void 0},X.prototype._onDataSourceChanged=function(e){this.clockTrackedDataSource===e&&H(this.timeline,this.clock,e)},X.prototype._onDataSourceAdded=function(e,t){this._automaticallyTrackDataSourceClocks&&(this.clockTrackedDataSource=t);var i=t.entities.id,n=this._eventHelper.add(t.changedEvent,X.prototype._onDataSourceChanged,this);this._dataSourceChangedListeners[i]=n},X.prototype._onDataSourceRemoved=function(e,t){var i=this.clockTrackedDataSource===t,n=t.entities.id;if(this._dataSourceChangedListeners[n](),this._dataSourceChangedListeners[n]=void 0,i){var r=e.length;this._automaticallyTrackDataSourceClocks&&r>0?this.clockTrackedDataSource=e.get(r-1):this.clockTrackedDataSource=void 0}},X.prototype.zoomTo=function(e,t){return Z(this,e,t,!1)},X.prototype.flyTo=function(e,t){return Z(this,e,t,!0)},X.prototype._postRender=function(){Q(this),$(this)},X}),define("Cesium/Widgets/Viewer/viewerCesiumInspectorMixin",["../../Core/defined","../../Core/defineProperties","../../Core/DeveloperError","../CesiumInspector/CesiumInspector"],function(e,t,i,n){"use strict";function r(r){if(!e(r))throw new i("viewer is required.");var o=document.createElement("div");o.className="cesium-viewer-cesiumInspectorContainer",r.container.appendChild(o);var a=new n(o,r.scene);t(r,{cesiumInspector:{get:function(){return a}}}),r.scene.postRender.addEventListener(function(){r.cesiumInspector.viewModel.update()})}return r}),define("Cesium/Widgets/Viewer/viewerDragDropMixin",["../../Core/defaultValue","../../Core/defined","../../Core/defineProperties","../../Core/DeveloperError","../../Core/Event","../../Core/wrapFunction","../../DataSources/CzmlDataSource","../../DataSources/GeoJsonDataSource","../../DataSources/KmlDataSource","../../Scene/GroundPrimitive","../getElement"],function(e,t,i,n,r,o,a,s,l,u,c){"use strict";function h(t,n){function a(e){d(e),h&&(t.entities.removeAll(),t.dataSources.removeAll());for(var i=e.dataTransfer.files,n=i.length,r=0;n>r;r++){var o=i[r],a=new FileReader;a.onload=f(t,o,y,_),a.onerror=g(t,o),a.readAsText(o)}}n=e(n,e.EMPTY_OBJECT);var s=!0,l=!0,u=new r,h=e(n.clearOnDrop,!0),v=e(n.dropTarget,t.container),_=e(n.clampToGround,!0),y=n.proxy;v=c(v),i(t,{dropTarget:{get:function(){return v},set:function(e){p(v,a),v=e,m(v,a)}},dropEnabled:{get:function(){return s},set:function(e){e!==s&&(e?m(v,a):p(v,a),s=e)}},dropError:{get:function(){return u}},clearOnDrop:{get:function(){return h},set:function(e){h=e}},flyToOnDrop:{get:function(){return l},set:function(e){l=e}},proxy:{get:function(){return y},set:function(e){y=e}},clampToGround:{get:function(){return _},set:function(e){_=e}}}),m(v,a),t.destroy=o(t,t.destroy,function(){t.dropEnabled=!1}),t._handleDrop=a}function d(e){e.stopPropagation(),e.preventDefault()}function p(e,i){var n=e;t(n)&&(n.removeEventListener("drop",i,!1),n.removeEventListener("dragenter",d,!1),n.removeEventListener("dragover",d,!1),n.removeEventListener("dragexit",d,!1))}function m(e,t){e.addEventListener("drop",t,!1),e.addEventListener("dragenter",d,!1),e.addEventListener("dragover",d,!1),e.addEventListener("dragexit",d,!1)}function f(e,i,n,r){var o=e.scene;return function(u){var c=i.name;try{var h;if(/\.czml$/i.test(c))h=a.load(JSON.parse(u.target.result),{sourceUri:c});else if(/\.geojson$/i.test(c)||/\.json$/i.test(c)||/\.topojson$/i.test(c))h=s.load(JSON.parse(u.target.result),{sourceUri:c,clampToGround:r});else{if(!/\.(kml|kmz)$/i.test(c))return void e.dropError.raiseEvent(e,c,"Unrecognized file: "+c);h=l.load(i,{sourceUri:c,proxy:n,camera:o.camera,canvas:o.canvas})}t(h)&&e.dataSources.add(h).then(function(t){e.flyToOnDrop&&e.flyTo(t)}).otherwise(function(t){e.dropError.raiseEvent(e,c,t)})}catch(d){e.dropError.raiseEvent(e,c,d)}}}function g(e,t){return function(i){e.dropError.raiseEvent(e,t.name,i.target.error)}}return h}),define("Cesium/Widgets/Viewer/viewerPerformanceWatchdogMixin",["../../Core/defaultValue","../../Core/defined","../../Core/defineProperties","../../Core/DeveloperError","../PerformanceWatchdog/PerformanceWatchdog"],function(e,t,i,n,r){"use strict";function o(o,a){if(!t(o))throw new n("viewer is required.");a=e(a,e.EMPTY_OBJECT);var s=new r({scene:o.scene,container:o.bottomContainer,lowFrameRateMessage:a.lowFrameRateMessage});i(o,{performanceWatchdog:{get:function(){return s}}})}return o}),define("Cesium/Workers/createTaskProcessorWorker",["../Core/defaultValue","../Core/defined","../Core/formatError"],function(e,t,i){"use strict";function n(n){var r,o=[],a={id:void 0,result:void 0,error:void 0};return function(s){var l=s.data;o.length=0,a.id=l.id,a.error=void 0,a.result=void 0;try{a.result=n(l.parameters,o)}catch(u){u instanceof Error?a.error={name:u.name,message:u.message,stack:u.stack}:a.error=u}t(r)||(r=e(self.webkitPostMessage,self.postMessage)),l.canTransferArrayBuffer||(o.length=0);try{r(a,o)}catch(u){a.result=void 0,a.error="postMessage failed with error: "+i(u)+"\n with responseMessage: "+JSON.stringify(a),r(a)}}}return n}),define("Cesium/Cesium",["./Core/appendForwardSlash","./Core/ArcGisImageServerTerrainProvider","./Core/arrayRemoveDuplicates","./Core/AssociativeArray","./Core/AttributeCompression","./Core/AxisAlignedBoundingBox","./Core/barycentricCoordinates","./Core/binarySearch","./Core/BingMapsApi","./Core/BoundingRectangle","./Core/BoundingSphere","./Core/BoxGeometry","./Core/BoxOutlineGeometry","./Core/buildModuleUrl","./Core/cancelAnimationFrame","./Core/Cartesian2","./Core/Cartesian3","./Core/Cartesian4","./Core/Cartographic","./Core/CatmullRomSpline","./Core/CesiumTerrainProvider","./Core/CircleGeometry","./Core/CircleOutlineGeometry","./Core/Clock","./Core/ClockRange","./Core/ClockStep","./Core/clone","./Core/Color","./Core/ColorGeometryInstanceAttribute","./Core/combine","./Core/ComponentDatatype","./Core/CornerType","./Core/CorridorGeometry","./Core/CorridorGeometryLibrary","./Core/CorridorOutlineGeometry","./Core/createGuid","./Core/Credit","./Core/CubicRealPolynomial","./Core/CylinderGeometry","./Core/CylinderGeometryLibrary","./Core/CylinderOutlineGeometry","./Core/DefaultProxy","./Core/defaultValue","./Core/defined","./Core/defineProperties","./Core/deprecationWarning","./Core/destroyObject","./Core/DeveloperError","./Core/EarthOrientationParameters","./Core/EarthOrientationParametersSample","./Core/EasingFunction","./Core/EllipseGeometry","./Core/EllipseGeometryLibrary","./Core/EllipseOutlineGeometry","./Core/Ellipsoid","./Core/EllipsoidalOccluder","./Core/EllipsoidGeodesic","./Core/EllipsoidGeometry","./Core/EllipsoidOutlineGeometry","./Core/EllipsoidTangentPlane","./Core/EllipsoidTerrainProvider","./Core/EncodedCartesian3","./Core/Event","./Core/EventHelper","./Core/ExtrapolationType","./Core/FeatureDetection","./Core/formatError","./Core/freezeObject","./Core/Fullscreen","./Core/GeographicProjection","./Core/GeographicTilingScheme","./Core/Geometry","./Core/GeometryAttribute","./Core/GeometryAttributes","./Core/GeometryInstance","./Core/GeometryInstanceAttribute","./Core/GeometryPipeline","./Core/GeometryType","./Core/getAbsoluteUri","./Core/getBaseUri","./Core/getExtensionFromUri","./Core/getFilenameFromUri","./Core/getImagePixels","./Core/getMagic","./Core/getStringFromTypedArray","./Core/getTimestamp","./Core/GregorianDate","./Core/HeadingPitchRange","./Core/HeightmapTerrainData","./Core/HeightmapTessellator","./Core/HermitePolynomialApproximation","./Core/HermiteSpline","./Core/Iau2000Orientation","./Core/Iau2006XysData","./Core/Iau2006XysSample","./Core/IauOrientationAxes","./Core/IauOrientationParameters","./Core/IndexDatatype","./Core/InterpolationAlgorithm","./Core/Intersect","./Core/Intersections2D","./Core/IntersectionTests","./Core/Interval","./Core/isArray","./Core/isCrossOriginUrl","./Core/isLeapYear","./Core/Iso8601","./Core/joinUrls","./Core/JulianDate","./Core/KeyboardEventModifier","./Core/LagrangePolynomialApproximation","./Core/LeapSecond","./Core/LinearApproximation","./Core/LinearSpline","./Core/loadArrayBuffer","./Core/loadBlob","./Core/loadImage","./Core/loadImageFromTypedArray","./Core/loadImageViaBlob","./Core/loadJson","./Core/loadJsonp","./Core/loadText","./Core/loadWithXhr","./Core/loadXML","./Core/MapboxApi","./Core/MapProjection","./Core/Math","./Core/Matrix2","./Core/Matrix3","./Core/Matrix4","./Core/mergeSort","./Core/NearFarScalar","./Core/objectToQuery","./Core/Occluder","./Core/oneTimeWarning","./Core/OrientedBoundingBox","./Core/Packable","./Core/PackableForInterpolation","./Core/parseResponseHeaders","./Core/PinBuilder","./Core/PixelFormat","./Core/Plane","./Core/PointGeometry","./Core/pointInsideTriangle","./Core/PolygonGeometry","./Core/PolygonGeometryLibrary","./Core/PolygonHierarchy","./Core/PolygonOutlineGeometry","./Core/PolygonPipeline","./Core/PolylineGeometry","./Core/PolylinePipeline","./Core/PolylineVolumeGeometry","./Core/PolylineVolumeGeometryLibrary","./Core/PolylineVolumeOutlineGeometry","./Core/PrimitiveType","./Core/QuadraticRealPolynomial","./Core/QuantizedMeshTerrainData","./Core/QuarticRealPolynomial","./Core/Quaternion","./Core/QuaternionSpline","./Core/queryToObject","./Core/Queue","./Core/Ray","./Core/Rectangle","./Core/RectangleGeometry","./Core/RectangleGeometryLibrary","./Core/RectangleOutlineGeometry","./Core/ReferenceFrame","./Core/requestAnimationFrame","./Core/RequestErrorEvent","./Core/RuntimeError","./Core/sampleTerrain","./Core/scaleToGeodeticSurface","./Core/ScreenSpaceEventHandler","./Core/ScreenSpaceEventType","./Core/ShowGeometryInstanceAttribute","./Core/Simon1994PlanetaryPositions","./Core/SimplePolylineGeometry","./Core/SphereGeometry","./Core/SphereOutlineGeometry","./Core/Spherical","./Core/Spline","./Core/subdivideArray","./Core/TaskProcessor","./Core/TerrainData","./Core/TerrainEncoding","./Core/TerrainMesh","./Core/TerrainProvider","./Core/TerrainQuantization","./Core/throttleRequestByServer","./Core/TileProviderError","./Core/TilingScheme","./Core/TimeConstants","./Core/TimeInterval","./Core/TimeIntervalCollection","./Core/TimeStandard","./Core/Tipsify","./Core/Transforms","./Core/TranslationRotationScale","./Core/TridiagonalSystemSolver","./Core/VertexFormat","./Core/VideoSynchronizer","./Core/Visibility","./Core/VRTheWorldTerrainProvider","./Core/WallGeometry","./Core/WallGeometryLibrary","./Core/WallOutlineGeometry","./Core/WebMercatorProjection","./Core/WebMercatorTilingScheme","./Core/WindingOrder","./Core/wrapFunction","./Core/writeTextToCanvas","./DataSources/BillboardGraphics","./DataSources/BillboardVisualizer","./DataSources/BoundingSphereState","./DataSources/BoxGeometryUpdater","./DataSources/BoxGraphics","./DataSources/CallbackProperty","./DataSources/CheckerboardMaterialProperty","./DataSources/ColorMaterialProperty","./DataSources/CompositeEntityCollection","./DataSources/CompositeMaterialProperty","./DataSources/CompositePositionProperty","./DataSources/CompositeProperty","./DataSources/ConstantPositionProperty","./DataSources/ConstantProperty","./DataSources/CorridorGeometryUpdater","./DataSources/CorridorGraphics","./DataSources/createMaterialPropertyDescriptor","./DataSources/createPropertyDescriptor","./DataSources/createRawPropertyDescriptor","./DataSources/CustomDataSource","./DataSources/CylinderGeometryUpdater","./DataSources/CylinderGraphics","./DataSources/CzmlDataSource","./DataSources/DataSource","./DataSources/DataSourceClock","./DataSources/DataSourceCollection","./DataSources/DataSourceDisplay","./DataSources/dynamicGeometryGetBoundingSphere","./DataSources/DynamicGeometryUpdater","./DataSources/EllipseGeometryUpdater","./DataSources/EllipseGraphics","./DataSources/EllipsoidGeometryUpdater","./DataSources/EllipsoidGraphics","./DataSources/Entity","./DataSources/EntityCollection","./DataSources/EntityView","./DataSources/GeoJsonDataSource","./DataSources/GeometryUpdater","./DataSources/GeometryVisualizer","./DataSources/GridMaterialProperty","./DataSources/ImageMaterialProperty","./DataSources/KmlDataSource","./DataSources/LabelGraphics","./DataSources/LabelVisualizer","./DataSources/MaterialProperty","./DataSources/ModelGraphics","./DataSources/ModelVisualizer","./DataSources/NodeTransformationProperty","./DataSources/PathGraphics","./DataSources/PathVisualizer","./DataSources/PointGraphics","./DataSources/PointVisualizer","./DataSources/PolygonGeometryUpdater","./DataSources/PolygonGraphics","./DataSources/PolylineArrowMaterialProperty","./DataSources/PolylineGeometryUpdater","./DataSources/PolylineGlowMaterialProperty","./DataSources/PolylineGraphics","./DataSources/PolylineOutlineMaterialProperty","./DataSources/PolylineVolumeGeometryUpdater","./DataSources/PolylineVolumeGraphics","./DataSources/PositionProperty","./DataSources/PositionPropertyArray","./DataSources/Property","./DataSources/PropertyArray","./DataSources/PropertyBag","./DataSources/RectangleGeometryUpdater","./DataSources/RectangleGraphics","./DataSources/ReferenceProperty","./DataSources/Rotation","./DataSources/SampledPositionProperty","./DataSources/SampledProperty","./DataSources/ScaledPositionProperty","./DataSources/StaticGeometryColorBatch","./DataSources/StaticGeometryPerMaterialBatch","./DataSources/StaticGroundGeometryColorBatch","./DataSources/StaticOutlineGeometryBatch","./DataSources/StripeMaterialProperty","./DataSources/StripeOrientation","./DataSources/TimeIntervalCollectionPositionProperty","./DataSources/TimeIntervalCollectionProperty","./DataSources/VelocityOrientationProperty","./DataSources/VelocityVectorProperty","./DataSources/Visualizer","./DataSources/WallGeometryUpdater","./DataSources/WallGraphics","./Renderer/AutomaticUniforms","./Renderer/Buffer","./Renderer/BufferUsage","./Renderer/ClearCommand","./Renderer/ComputeCommand","./Renderer/ComputeEngine","./Renderer/Context","./Renderer/ContextLimits","./Renderer/createUniform","./Renderer/createUniformArray","./Renderer/CubeMap","./Renderer/CubeMapFace","./Renderer/DrawCommand","./Renderer/Framebuffer","./Renderer/loadCubeMap","./Renderer/MipmapHint","./Renderer/PassState","./Renderer/PickFramebuffer","./Renderer/PixelDatatype","./Renderer/Renderbuffer","./Renderer/RenderbufferFormat","./Renderer/RenderState","./Renderer/Sampler","./Renderer/ShaderCache","./Renderer/ShaderProgram","./Renderer/ShaderSource","./Renderer/Texture","./Renderer/TextureMagnificationFilter","./Renderer/TextureMinificationFilter","./Renderer/TextureWrap","./Renderer/UniformState","./Renderer/VertexArray","./Renderer/VertexArrayFacade","./Renderer/WebGLConstants","./Scene/Appearance","./Scene/ArcGisMapServerImageryProvider","./Scene/Billboard","./Scene/BillboardCollection","./Scene/BingMapsImageryProvider","./Scene/BingMapsStyle","./Scene/BlendEquation","./Scene/BlendFunction","./Scene/BlendingState","./Scene/Camera","./Scene/CameraEventAggregator","./Scene/CameraEventType","./Scene/CameraFlightPath","./Scene/createOpenStreetMapImageryProvider","./Scene/createTangentSpaceDebugPrimitive","./Scene/createTileMapServiceImageryProvider","./Scene/CreditDisplay","./Scene/CullFace","./Scene/CullingVolume","./Scene/DebugAppearance","./Scene/DebugModelMatrixPrimitive","./Scene/DepthFunction","./Scene/DepthPlane","./Scene/DeviceOrientationCameraController","./Scene/DiscardMissingTileImagePolicy","./Scene/EllipsoidPrimitive","./Scene/EllipsoidSurfaceAppearance","./Scene/Fog","./Scene/FrameRateMonitor","./Scene/FrameState","./Scene/FrustumCommands","./Scene/FXAA","./Scene/GetFeatureInfoFormat","./Scene/getModelAccessor","./Scene/Globe","./Scene/GlobeDepth","./Scene/GlobeSurfaceShaderSet","./Scene/GlobeSurfaceTile","./Scene/GlobeSurfaceTileProvider","./Scene/GoogleEarthImageryProvider","./Scene/GridImageryProvider","./Scene/GroundPrimitive","./Scene/HeightReference","./Scene/HorizontalOrigin","./Scene/Imagery","./Scene/ImageryLayer","./Scene/ImageryLayerCollection","./Scene/ImageryLayerFeatureInfo","./Scene/ImageryProvider","./Scene/ImageryState","./Scene/Label","./Scene/LabelCollection","./Scene/LabelStyle","./Scene/MapboxImageryProvider","./Scene/MapMode2D","./Scene/Material","./Scene/MaterialAppearance","./Scene/Model","./Scene/ModelAnimation","./Scene/ModelAnimationCache","./Scene/ModelAnimationCollection","./Scene/ModelAnimationLoop","./Scene/ModelAnimationState","./Scene/ModelMaterial","./Scene/modelMaterialsCommon","./Scene/ModelMesh","./Scene/ModelNode","./Scene/Moon","./Scene/NeverTileDiscardPolicy","./Scene/OIT","./Scene/OrthographicFrustum","./Scene/Pass","./Scene/PerformanceDisplay","./Scene/PerInstanceColorAppearance","./Scene/PerspectiveFrustum","./Scene/PerspectiveOffCenterFrustum","./Scene/PickDepth","./Scene/PointAppearance","./Scene/PointPrimitive","./Scene/PointPrimitiveCollection","./Scene/Polyline","./Scene/PolylineCollection","./Scene/PolylineColorAppearance","./Scene/PolylineMaterialAppearance","./Scene/Primitive","./Scene/PrimitiveCollection","./Scene/PrimitivePipeline","./Scene/PrimitiveState","./Scene/QuadtreeOccluders","./Scene/QuadtreePrimitive","./Scene/QuadtreeTile","./Scene/QuadtreeTileLoadState","./Scene/QuadtreeTileProvider","./Scene/Scene","./Scene/SceneMode","./Scene/SceneTransforms","./Scene/SceneTransitioner","./Scene/ScreenSpaceCameraController","./Scene/ShadowMap","./Scene/ShadowMapShader","./Scene/SingleTileImageryProvider","./Scene/SkyAtmosphere","./Scene/SkyBox","./Scene/StencilFunction","./Scene/StencilOperation","./Scene/Sun","./Scene/SunPostProcess","./Scene/TerrainState","./Scene/TextureAtlas","./Scene/TileBoundingBox","./Scene/TileCoordinatesImageryProvider","./Scene/TileDiscardPolicy","./Scene/TileImagery","./Scene/TileReplacementQueue","./Scene/TileState","./Scene/TileTerrain","./Scene/TweenCollection","./Scene/UrlTemplateImageryProvider","./Scene/VerticalOrigin","./Scene/ViewportQuad","./Scene/WebMapServiceImageryProvider","./Scene/WebMapTileServiceImageryProvider","./Shaders/AdjustTranslucentFS","./Shaders/Appearances/AllMaterialAppearanceFS","./Shaders/Appearances/AllMaterialAppearanceVS","./Shaders/Appearances/BasicMaterialAppearanceFS","./Shaders/Appearances/BasicMaterialAppearanceVS","./Shaders/Appearances/EllipsoidSurfaceAppearanceFS","./Shaders/Appearances/EllipsoidSurfaceAppearanceVS","./Shaders/Appearances/PerInstanceColorAppearanceFS","./Shaders/Appearances/PerInstanceColorAppearanceVS","./Shaders/Appearances/PerInstanceFlatColorAppearanceFS","./Shaders/Appearances/PerInstanceFlatColorAppearanceVS","./Shaders/Appearances/PointAppearanceFS","./Shaders/Appearances/PointAppearanceVS","./Shaders/Appearances/PolylineColorAppearanceVS","./Shaders/Appearances/PolylineMaterialAppearanceVS","./Shaders/Appearances/TexturedMaterialAppearanceFS","./Shaders/Appearances/TexturedMaterialAppearanceVS","./Shaders/BillboardCollectionFS","./Shaders/BillboardCollectionVS","./Shaders/Builtin/Constants/degreesPerRadian","./Shaders/Builtin/Constants/depthRange","./Shaders/Builtin/Constants/epsilon1","./Shaders/Builtin/Constants/epsilon2","./Shaders/Builtin/Constants/epsilon3","./Shaders/Builtin/Constants/epsilon4","./Shaders/Builtin/Constants/epsilon5","./Shaders/Builtin/Constants/epsilon6","./Shaders/Builtin/Constants/epsilon7","./Shaders/Builtin/Constants/infinity","./Shaders/Builtin/Constants/oneOverPi","./Shaders/Builtin/Constants/oneOverTwoPi","./Shaders/Builtin/Constants/passCompute","./Shaders/Builtin/Constants/passEnvironment","./Shaders/Builtin/Constants/passGlobe","./Shaders/Builtin/Constants/passGround","./Shaders/Builtin/Constants/passOpaque","./Shaders/Builtin/Constants/passOverlay","./Shaders/Builtin/Constants/passTranslucent","./Shaders/Builtin/Constants/pi","./Shaders/Builtin/Constants/piOverFour","./Shaders/Builtin/Constants/piOverSix","./Shaders/Builtin/Constants/piOverThree","./Shaders/Builtin/Constants/piOverTwo","./Shaders/Builtin/Constants/radiansPerDegree","./Shaders/Builtin/Constants/sceneMode2D","./Shaders/Builtin/Constants/sceneMode3D","./Shaders/Builtin/Constants/sceneModeColumbusView","./Shaders/Builtin/Constants/sceneModeMorphing","./Shaders/Builtin/Constants/solarRadius","./Shaders/Builtin/Constants/threePiOver2","./Shaders/Builtin/Constants/twoPi","./Shaders/Builtin/Constants/webMercatorMaxLatitude","./Shaders/Builtin/CzmBuiltins","./Shaders/Builtin/Functions/alphaWeight","./Shaders/Builtin/Functions/antialias","./Shaders/Builtin/Functions/cascadeColor","./Shaders/Builtin/Functions/cascadeDistance","./Shaders/Builtin/Functions/cascadeMatrix","./Shaders/Builtin/Functions/cascadeWeights","./Shaders/Builtin/Functions/columbusViewMorph","./Shaders/Builtin/Functions/computePosition","./Shaders/Builtin/Functions/cosineAndSine","./Shaders/Builtin/Functions/decompressTextureCoordinates","./Shaders/Builtin/Functions/eastNorthUpToEyeCoordinates","./Shaders/Builtin/Functions/ellipsoidContainsPoint","./Shaders/Builtin/Functions/ellipsoidNew","./Shaders/Builtin/Functions/ellipsoidWgs84TextureCoordinates","./Shaders/Builtin/Functions/equalsEpsilon","./Shaders/Builtin/Functions/eyeOffset","./Shaders/Builtin/Functions/eyeToWindowCoordinates","./Shaders/Builtin/Functions/fog","./Shaders/Builtin/Functions/geodeticSurfaceNormal","./Shaders/Builtin/Functions/getDefaultMaterial","./Shaders/Builtin/Functions/getLambertDiffuse","./Shaders/Builtin/Functions/getSpecular","./Shaders/Builtin/Functions/getWaterNoise","./Shaders/Builtin/Functions/getWgs84EllipsoidEC","./Shaders/Builtin/Functions/hue","./Shaders/Builtin/Functions/isEmpty","./Shaders/Builtin/Functions/isFull","./Shaders/Builtin/Functions/latitudeToWebMercatorFraction","./Shaders/Builtin/Functions/luminance","./Shaders/Builtin/Functions/metersPerPixel","./Shaders/Builtin/Functions/modelToWindowCoordinates","./Shaders/Builtin/Functions/multiplyWithColorBalance","./Shaders/Builtin/Functions/nearFarScalar","./Shaders/Builtin/Functions/octDecode","./Shaders/Builtin/Functions/packDepth","./Shaders/Builtin/Functions/phong","./Shaders/Builtin/Functions/pointAlongRay","./Shaders/Builtin/Functions/rayEllipsoidIntersectionInterval","./Shaders/Builtin/Functions/RGBToXYZ","./Shaders/Builtin/Functions/saturation","./Shaders/Builtin/Functions/shadowDepthCompare","./Shaders/Builtin/Functions/shadowVisibility","./Shaders/Builtin/Functions/signNotZero","./Shaders/Builtin/Functions/tangentToEyeSpaceMatrix","./Shaders/Builtin/Functions/translateRelativeToEye","./Shaders/Builtin/Functions/translucentPhong","./Shaders/Builtin/Functions/transpose","./Shaders/Builtin/Functions/unpackDepth","./Shaders/Builtin/Functions/windowToEyeCoordinates","./Shaders/Builtin/Functions/XYZToRGB","./Shaders/Builtin/Structs/depthRangeStruct","./Shaders/Builtin/Structs/ellipsoid","./Shaders/Builtin/Structs/material","./Shaders/Builtin/Structs/materialInput","./Shaders/Builtin/Structs/ray","./Shaders/Builtin/Structs/raySegment","./Shaders/Builtin/Structs/shadowParameters","./Shaders/CompositeOITFS","./Shaders/DepthPlaneFS","./Shaders/DepthPlaneVS","./Shaders/EllipsoidFS","./Shaders/EllipsoidVS","./Shaders/GlobeFS","./Shaders/GlobeVS","./Shaders/GroundAtmosphere","./Shaders/Materials/BumpMapMaterial","./Shaders/Materials/CheckerboardMaterial","./Shaders/Materials/DotMaterial","./Shaders/Materials/FadeMaterial","./Shaders/Materials/GridMaterial","./Shaders/Materials/NormalMapMaterial","./Shaders/Materials/PolylineArrowMaterial","./Shaders/Materials/PolylineGlowMaterial","./Shaders/Materials/PolylineOutlineMaterial","./Shaders/Materials/RimLightingMaterial","./Shaders/Materials/StripeMaterial","./Shaders/Materials/Water","./Shaders/PointPrimitiveCollectionFS","./Shaders/PointPrimitiveCollectionVS","./Shaders/PolylineCommon","./Shaders/PolylineFS","./Shaders/PolylineVS","./Shaders/PostProcessFilters/AdditiveBlend","./Shaders/PostProcessFilters/BrightPass","./Shaders/PostProcessFilters/FXAA","./Shaders/PostProcessFilters/GaussianBlur1D","./Shaders/PostProcessFilters/PassThrough","./Shaders/ReprojectWebMercatorFS","./Shaders/ReprojectWebMercatorVS","./Shaders/ShadowVolumeFS","./Shaders/ShadowVolumeVS","./Shaders/SkyAtmosphereFS","./Shaders/SkyAtmosphereVS","./Shaders/SkyBoxFS","./Shaders/SkyBoxVS","./Shaders/SunFS","./Shaders/SunTextureFS","./Shaders/SunVS","./Shaders/ViewportQuadFS","./Shaders/ViewportQuadVS","./ThirdParty/Autolinker","./ThirdParty/earcut-2.1.1","./ThirdParty/gltfDefaults","./ThirdParty/knockout-3.4.0","./ThirdParty/knockout-es5","./ThirdParty/knockout","./ThirdParty/measureText","./ThirdParty/mersenne-twister","./ThirdParty/NoSleep","./ThirdParty/sprintf","./ThirdParty/topojson","./ThirdParty/Tween","./ThirdParty/Uri","./ThirdParty/when","./ThirdParty/zip","./Widgets/Animation/Animation","./Widgets/Animation/AnimationViewModel","./Widgets/BaseLayerPicker/BaseLayerPicker","./Widgets/BaseLayerPicker/BaseLayerPickerViewModel","./Widgets/BaseLayerPicker/createDefaultImageryProviderViewModels","./Widgets/BaseLayerPicker/createDefaultTerrainProviderViewModels","./Widgets/BaseLayerPicker/ProviderViewModel","./Widgets/CesiumInspector/CesiumInspector","./Widgets/CesiumInspector/CesiumInspectorViewModel","./Widgets/CesiumWidget/CesiumWidget","./Widgets/ClockViewModel","./Widgets/Command","./Widgets/createCommand","./Widgets/FullscreenButton/FullscreenButton","./Widgets/FullscreenButton/FullscreenButtonViewModel","./Widgets/Geocoder/Geocoder","./Widgets/Geocoder/GeocoderViewModel","./Widgets/getElement","./Widgets/HomeButton/HomeButton","./Widgets/HomeButton/HomeButtonViewModel","./Widgets/InfoBox/InfoBox","./Widgets/InfoBox/InfoBoxViewModel","./Widgets/NavigationHelpButton/NavigationHelpButton","./Widgets/NavigationHelpButton/NavigationHelpButtonViewModel","./Widgets/PerformanceWatchdog/PerformanceWatchdog","./Widgets/PerformanceWatchdog/PerformanceWatchdogViewModel","./Widgets/SceneModePicker/SceneModePicker","./Widgets/SceneModePicker/SceneModePickerViewModel","./Widgets/SelectionIndicator/SelectionIndicator","./Widgets/SelectionIndicator/SelectionIndicatorViewModel","./Widgets/subscribeAndEvaluate","./Widgets/SvgPathBindingHandler","./Widgets/Timeline/Timeline","./Widgets/Timeline/TimelineHighlightRange","./Widgets/Timeline/TimelineTrack","./Widgets/ToggleButtonViewModel","./Widgets/Viewer/Viewer","./Widgets/Viewer/viewerCesiumInspectorMixin","./Widgets/Viewer/viewerDragDropMixin","./Widgets/Viewer/viewerPerformanceWatchdogMixin","./Widgets/VRButton/VRButton","./Widgets/VRButton/VRButtonViewModel","./Workers/createTaskProcessorWorker"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g,v,_,y,C,w,E,b,S,T,x,A,P,M,D,I,R,O,L,N,F,k,B,z,V,U,G,W,H,q,j,Y,X,Z,K,J,Q,$,ee,te,ie,ne,re,oe,ae,se,le,ue,ce,he,de,pe,me,fe,ge,ve,_e,ye,Ce,we,Ee,be,Se,Te,xe,Ae,Pe,Me,De,Ie,Re,Oe,Le,Ne,Fe,ke,Be,ze,Ve,Ue,Ge,We,He,qe,je,Ye,Xe,Ze,Ke,Je,Qe,$e,et,tt,it,nt,rt,ot,at,st,lt,ut,ct,ht,dt,pt,mt,ft,gt,vt,_t,yt,Ct,wt,Et,bt,St,Tt,xt,At,Pt,Mt,Dt,It,Rt,Ot,Lt,Nt,Ft,kt,Bt,zt,Vt,Ut,Gt,Wt,Ht,qt,jt,Yt,Xt,Zt,Kt,Jt,Qt,$t,ei,ti,ii,ni,ri,oi,ai,si,li,ui,ci,hi,di,pi,mi,fi,gi,vi,_i,yi,Ci,wi,Ei,bi,Si,Ti,xi,Ai,Pi,Mi,Di,Ii,Ri,Oi,Li,Ni,Fi,ki,Bi,zi,Vi,Ui,Gi,Wi,Hi,qi,ji,Yi,Xi,Zi,Ki,Ji,Qi,$i,en,tn,nn,rn,on,an,sn,ln,un,cn,hn,dn,pn,mn,fn,gn,vn,_n,yn,Cn,wn,En,bn,Sn,Tn,xn,An,Pn,Mn,Dn,In,Rn,On,Ln,Nn,Fn,kn,Bn,zn,Vn,Un,Gn,Wn,Hn,qn,jn,Yn,Xn,Zn,Kn,Jn,Qn,$n,er,tr,ir,nr,rr,or,ar,sr,lr,ur,cr,hr,dr,pr,mr,fr,gr,vr,_r,yr,Cr,wr,Er,br,Sr,Tr,xr,Ar,Pr,Mr,Dr,Ir,Rr,Or,Lr,Nr,Fr,kr,Br,zr,Vr,Ur,Gr,Wr,Hr,qr,jr,Yr,Xr,Zr,Kr,Jr,Qr,$r,eo,to,io,no,ro,oo,ao,so,lo,uo,co,ho,po,mo,fo,go,vo,_o,yo,Co,wo,Eo,bo,So,To,xo,Ao,Po,Mo,Do,Io,Ro,Oo,Lo,No,Fo,ko,Bo,zo,Vo,Uo,Go,Wo,Ho,qo,jo,Yo,Xo,Zo,Ko,Jo,Qo,$o,ea,ta,ia,na,ra,oa,aa,sa,la,ua,ca,ha,da,pa,ma,fa,ga,va,_a,ya,Ca,wa,Ea,ba,Sa,Ta,xa,Aa,Pa,Ma,Da,Ia,Ra,Oa,La,Na,Fa,ka,Ba,za,Va,Ua,Ga,Wa,Ha,qa,ja,Ya,Xa,Za,Ka,Ja,Qa,$a,es,ts,is,ns,rs,os,as,ss,ls,us,cs,hs,ds,ps,ms,fs,gs,vs,_s,ys,Cs,ws,Es,bs,Ss,Ts,xs,As,Ps,Ms,Ds,Is,Rs,Os,Ls,Ns,Fs,ks,Bs,zs,Vs,Us,Gs,Ws,Hs,qs,js,Ys,Xs,Zs,Ks,Js,Qs,$s,el,tl,il,nl,rl,ol,al,sl,ll,ul,cl,hl,dl,pl,ml,fl,gl,vl,_l,yl,Cl,wl,El,bl,Sl,Tl,xl,Al,Pl,Ml,Dl,Il,Rl,Ol,Ll,Nl,Fl,kl,Bl,zl,Vl,Ul,Gl,Wl,Hl,ql,jl,Yl,Xl,Zl,Kl,Jl,Ql,$l,eu,tu,iu,nu,ru,ou,au,su,lu,uu,cu,hu,du,pu,mu,fu,gu,vu,_u,yu,Cu,wu,Eu,bu,Su,Tu,xu,Au,Pu,Mu,Du,Iu,Ru,Ou,Lu,Nu,Fu,ku,Bu,zu,Vu,Uu,Gu,Wu,Hu,qu,ju,Yu,Xu,Zu,Ku,Ju,Qu,$u,ec,tc,ic,nc,rc,oc,ac,sc,lc,uc,cc,hc,dc,pc,mc,fc,gc,vc,_c,yc,Cc,wc,Ec,bc,Sc,Tc,xc,Ac,Pc,Mc,Dc,Ic,Rc,Oc,Lc,Nc,Fc,kc,Bc,zc,Vc,Uc,Gc,Wc,Hc,qc,jc,Yc,Xc,Zc,Kc,Jc,Qc,$c,eh,th,ih,nh,rh,oh,ah,sh,lh,uh,ch,hh,dh,ph,mh,fh,gh,vh,_h){ +"use strict";var yh={VERSION:"1.23",_shaders:{}};return yh.appendForwardSlash=e,yh.ArcGisImageServerTerrainProvider=t,yh.arrayRemoveDuplicates=i,yh.AssociativeArray=n,yh.AttributeCompression=r,yh.AxisAlignedBoundingBox=o,yh.barycentricCoordinates=a,yh.binarySearch=s,yh.BingMapsApi=l,yh.BoundingRectangle=u,yh.BoundingSphere=c,yh.BoxGeometry=h,yh.BoxOutlineGeometry=d,yh.buildModuleUrl=p,yh.cancelAnimationFrame=m,yh.Cartesian2=f,yh.Cartesian3=g,yh.Cartesian4=v,yh.Cartographic=_,yh.CatmullRomSpline=y,yh.CesiumTerrainProvider=C,yh.CircleGeometry=w,yh.CircleOutlineGeometry=E,yh.Clock=b,yh.ClockRange=S,yh.ClockStep=T,yh.clone=x,yh.Color=A,yh.ColorGeometryInstanceAttribute=P,yh.combine=M,yh.ComponentDatatype=D,yh.CornerType=I,yh.CorridorGeometry=R,yh.CorridorGeometryLibrary=O,yh.CorridorOutlineGeometry=L,yh.createGuid=N,yh.Credit=F,yh.CubicRealPolynomial=k,yh.CylinderGeometry=B,yh.CylinderGeometryLibrary=z,yh.CylinderOutlineGeometry=V,yh.DefaultProxy=U,yh.defaultValue=G,yh.defined=W,yh.defineProperties=H,yh.deprecationWarning=q,yh.destroyObject=j,yh.DeveloperError=Y,yh.EarthOrientationParameters=X,yh.EarthOrientationParametersSample=Z,yh.EasingFunction=K,yh.EllipseGeometry=J,yh.EllipseGeometryLibrary=Q,yh.EllipseOutlineGeometry=$,yh.Ellipsoid=ee,yh.EllipsoidalOccluder=te,yh.EllipsoidGeodesic=ie,yh.EllipsoidGeometry=ne,yh.EllipsoidOutlineGeometry=re,yh.EllipsoidTangentPlane=oe,yh.EllipsoidTerrainProvider=ae,yh.EncodedCartesian3=se,yh.Event=le,yh.EventHelper=ue,yh.ExtrapolationType=ce,yh.FeatureDetection=he,yh.formatError=de,yh.freezeObject=pe,yh.Fullscreen=me,yh.GeographicProjection=fe,yh.GeographicTilingScheme=ge,yh.Geometry=ve,yh.GeometryAttribute=_e,yh.GeometryAttributes=ye,yh.GeometryInstance=Ce,yh.GeometryInstanceAttribute=we,yh.GeometryPipeline=Ee,yh.GeometryType=be,yh.getAbsoluteUri=Se,yh.getBaseUri=Te,yh.getExtensionFromUri=xe,yh.getFilenameFromUri=Ae,yh.getImagePixels=Pe,yh.getMagic=Me,yh.getStringFromTypedArray=De,yh.getTimestamp=Ie,yh.GregorianDate=Re,yh.HeadingPitchRange=Oe,yh.HeightmapTerrainData=Le,yh.HeightmapTessellator=Ne,yh.HermitePolynomialApproximation=Fe,yh.HermiteSpline=ke,yh.Iau2000Orientation=Be,yh.Iau2006XysData=ze,yh.Iau2006XysSample=Ve,yh.IauOrientationAxes=Ue,yh.IauOrientationParameters=Ge,yh.IndexDatatype=We,yh.InterpolationAlgorithm=He,yh.Intersect=qe,yh.Intersections2D=je,yh.IntersectionTests=Ye,yh.Interval=Xe,yh.isArray=Ze,yh.isCrossOriginUrl=Ke,yh.isLeapYear=Je,yh.Iso8601=Qe,yh.joinUrls=$e,yh.JulianDate=et,yh.KeyboardEventModifier=tt,yh.LagrangePolynomialApproximation=it,yh.LeapSecond=nt,yh.LinearApproximation=rt,yh.LinearSpline=ot,yh.loadArrayBuffer=at,yh.loadBlob=st,yh.loadImage=lt,yh.loadImageFromTypedArray=ut,yh.loadImageViaBlob=ct,yh.loadJson=ht,yh.loadJsonp=dt,yh.loadText=pt,yh.loadWithXhr=mt,yh.loadXML=ft,yh.MapboxApi=gt,yh.MapProjection=vt,yh.Math=_t,yh.Matrix2=yt,yh.Matrix3=Ct,yh.Matrix4=wt,yh.mergeSort=Et,yh.NearFarScalar=bt,yh.objectToQuery=St,yh.Occluder=Tt,yh.oneTimeWarning=xt,yh.OrientedBoundingBox=At,yh.Packable=Pt,yh.PackableForInterpolation=Mt,yh.parseResponseHeaders=Dt,yh.PinBuilder=It,yh.PixelFormat=Rt,yh.Plane=Ot,yh.PointGeometry=Lt,yh.pointInsideTriangle=Nt,yh.PolygonGeometry=Ft,yh.PolygonGeometryLibrary=kt,yh.PolygonHierarchy=Bt,yh.PolygonOutlineGeometry=zt,yh.PolygonPipeline=Vt,yh.PolylineGeometry=Ut,yh.PolylinePipeline=Gt,yh.PolylineVolumeGeometry=Wt,yh.PolylineVolumeGeometryLibrary=Ht,yh.PolylineVolumeOutlineGeometry=qt,yh.PrimitiveType=jt,yh.QuadraticRealPolynomial=Yt,yh.QuantizedMeshTerrainData=Xt,yh.QuarticRealPolynomial=Zt,yh.Quaternion=Kt,yh.QuaternionSpline=Jt,yh.queryToObject=Qt,yh.Queue=$t,yh.Ray=ei,yh.Rectangle=ti,yh.RectangleGeometry=ii,yh.RectangleGeometryLibrary=ni,yh.RectangleOutlineGeometry=ri,yh.ReferenceFrame=oi,yh.requestAnimationFrame=ai,yh.RequestErrorEvent=si,yh.RuntimeError=li,yh.sampleTerrain=ui,yh.scaleToGeodeticSurface=ci,yh.ScreenSpaceEventHandler=hi,yh.ScreenSpaceEventType=di,yh.ShowGeometryInstanceAttribute=pi,yh.Simon1994PlanetaryPositions=mi,yh.SimplePolylineGeometry=fi,yh.SphereGeometry=gi,yh.SphereOutlineGeometry=vi,yh.Spherical=_i,yh.Spline=yi,yh.subdivideArray=Ci,yh.TaskProcessor=wi,yh.TerrainData=Ei,yh.TerrainEncoding=bi,yh.TerrainMesh=Si,yh.TerrainProvider=Ti,yh.TerrainQuantization=xi,yh.throttleRequestByServer=Ai,yh.TileProviderError=Pi,yh.TilingScheme=Mi,yh.TimeConstants=Di,yh.TimeInterval=Ii,yh.TimeIntervalCollection=Ri,yh.TimeStandard=Oi,yh.Tipsify=Li,yh.Transforms=Ni,yh.TranslationRotationScale=Fi,yh.TridiagonalSystemSolver=ki,yh.VertexFormat=Bi,yh.VideoSynchronizer=zi,yh.Visibility=Vi,yh.VRTheWorldTerrainProvider=Ui,yh.WallGeometry=Gi,yh.WallGeometryLibrary=Wi,yh.WallOutlineGeometry=Hi,yh.WebMercatorProjection=qi,yh.WebMercatorTilingScheme=ji,yh.WindingOrder=Yi,yh.wrapFunction=Xi,yh.writeTextToCanvas=Zi,yh.BillboardGraphics=Ki,yh.BillboardVisualizer=Ji,yh.BoundingSphereState=Qi,yh.BoxGeometryUpdater=$i,yh.BoxGraphics=en,yh.CallbackProperty=tn,yh.CheckerboardMaterialProperty=nn,yh.ColorMaterialProperty=rn,yh.CompositeEntityCollection=on,yh.CompositeMaterialProperty=an,yh.CompositePositionProperty=sn,yh.CompositeProperty=ln,yh.ConstantPositionProperty=un,yh.ConstantProperty=cn,yh.CorridorGeometryUpdater=hn,yh.CorridorGraphics=dn,yh.createMaterialPropertyDescriptor=pn,yh.createPropertyDescriptor=mn,yh.createRawPropertyDescriptor=fn,yh.CustomDataSource=gn,yh.CylinderGeometryUpdater=vn,yh.CylinderGraphics=_n,yh.CzmlDataSource=yn,yh.DataSource=Cn,yh.DataSourceClock=wn,yh.DataSourceCollection=En,yh.DataSourceDisplay=bn,yh.dynamicGeometryGetBoundingSphere=Sn,yh.DynamicGeometryUpdater=Tn,yh.EllipseGeometryUpdater=xn,yh.EllipseGraphics=An,yh.EllipsoidGeometryUpdater=Pn,yh.EllipsoidGraphics=Mn,yh.Entity=Dn,yh.EntityCollection=In,yh.EntityView=Rn,yh.GeoJsonDataSource=On,yh.GeometryUpdater=Ln,yh.GeometryVisualizer=Nn,yh.GridMaterialProperty=Fn,yh.ImageMaterialProperty=kn,yh.KmlDataSource=Bn,yh.LabelGraphics=zn,yh.LabelVisualizer=Vn,yh.MaterialProperty=Un,yh.ModelGraphics=Gn,yh.ModelVisualizer=Wn,yh.NodeTransformationProperty=Hn,yh.PathGraphics=qn,yh.PathVisualizer=jn,yh.PointGraphics=Yn,yh.PointVisualizer=Xn,yh.PolygonGeometryUpdater=Zn,yh.PolygonGraphics=Kn,yh.PolylineArrowMaterialProperty=Jn,yh.PolylineGeometryUpdater=Qn,yh.PolylineGlowMaterialProperty=$n,yh.PolylineGraphics=er,yh.PolylineOutlineMaterialProperty=tr,yh.PolylineVolumeGeometryUpdater=ir,yh.PolylineVolumeGraphics=nr,yh.PositionProperty=rr,yh.PositionPropertyArray=or,yh.Property=ar,yh.PropertyArray=sr,yh.PropertyBag=lr,yh.RectangleGeometryUpdater=ur,yh.RectangleGraphics=cr,yh.ReferenceProperty=hr,yh.Rotation=dr,yh.SampledPositionProperty=pr,yh.SampledProperty=mr,yh.ScaledPositionProperty=fr,yh.StaticGeometryColorBatch=gr,yh.StaticGeometryPerMaterialBatch=vr,yh.StaticGroundGeometryColorBatch=_r,yh.StaticOutlineGeometryBatch=yr,yh.StripeMaterialProperty=Cr,yh.StripeOrientation=wr,yh.TimeIntervalCollectionPositionProperty=Er,yh.TimeIntervalCollectionProperty=br,yh.VelocityOrientationProperty=Sr,yh.VelocityVectorProperty=Tr,yh.Visualizer=xr,yh.WallGeometryUpdater=Ar,yh.WallGraphics=Pr,yh.AutomaticUniforms=Mr,yh.Buffer=Dr,yh.BufferUsage=Ir,yh.ClearCommand=Rr,yh.ComputeCommand=Or,yh.ComputeEngine=Lr,yh.Context=Nr,yh.ContextLimits=Fr,yh.createUniform=kr,yh.createUniformArray=Br,yh.CubeMap=zr,yh.CubeMapFace=Vr,yh.DrawCommand=Ur,yh.Framebuffer=Gr,yh.loadCubeMap=Wr,yh.MipmapHint=Hr,yh.PassState=qr,yh.PickFramebuffer=jr,yh.PixelDatatype=Yr,yh.Renderbuffer=Xr,yh.RenderbufferFormat=Zr,yh.RenderState=Kr,yh.Sampler=Jr,yh.ShaderCache=Qr,yh.ShaderProgram=$r,yh.ShaderSource=eo,yh.Texture=to,yh.TextureMagnificationFilter=io,yh.TextureMinificationFilter=no,yh.TextureWrap=ro,yh.UniformState=oo,yh.VertexArray=ao,yh.VertexArrayFacade=so,yh.WebGLConstants=lo,yh.Appearance=uo,yh.ArcGisMapServerImageryProvider=co,yh.Billboard=ho,yh.BillboardCollection=po,yh.BingMapsImageryProvider=mo,yh.BingMapsStyle=fo,yh.BlendEquation=go,yh.BlendFunction=vo,yh.BlendingState=_o,yh.Camera=yo,yh.CameraEventAggregator=Co,yh.CameraEventType=wo,yh.CameraFlightPath=Eo,yh.createOpenStreetMapImageryProvider=bo,yh.createTangentSpaceDebugPrimitive=So,yh.createTileMapServiceImageryProvider=To,yh.CreditDisplay=xo,yh.CullFace=Ao,yh.CullingVolume=Po,yh.DebugAppearance=Mo,yh.DebugModelMatrixPrimitive=Do,yh.DepthFunction=Io,yh.DepthPlane=Ro,yh.DeviceOrientationCameraController=Oo,yh.DiscardMissingTileImagePolicy=Lo,yh.EllipsoidPrimitive=No,yh.EllipsoidSurfaceAppearance=Fo,yh.Fog=ko,yh.FrameRateMonitor=Bo,yh.FrameState=zo,yh.FrustumCommands=Vo,yh.FXAA=Uo,yh.GetFeatureInfoFormat=Go,yh.getModelAccessor=Wo,yh.Globe=Ho,yh.GlobeDepth=qo,yh.GlobeSurfaceShaderSet=jo,yh.GlobeSurfaceTile=Yo,yh.GlobeSurfaceTileProvider=Xo,yh.GoogleEarthImageryProvider=Zo,yh.GridImageryProvider=Ko,yh.GroundPrimitive=Jo,yh.HeightReference=Qo,yh.HorizontalOrigin=$o,yh.Imagery=ea,yh.ImageryLayer=ta,yh.ImageryLayerCollection=ia,yh.ImageryLayerFeatureInfo=na,yh.ImageryProvider=ra,yh.ImageryState=oa,yh.Label=aa,yh.LabelCollection=sa,yh.LabelStyle=la,yh.MapboxImageryProvider=ua,yh.MapMode2D=ca,yh.Material=ha,yh.MaterialAppearance=da,yh.Model=pa,yh.ModelAnimation=ma,yh.ModelAnimationCache=fa,yh.ModelAnimationCollection=ga,yh.ModelAnimationLoop=va,yh.ModelAnimationState=_a,yh.ModelMaterial=ya,yh.modelMaterialsCommon=Ca,yh.ModelMesh=wa,yh.ModelNode=Ea,yh.Moon=ba,yh.NeverTileDiscardPolicy=Sa,yh.OIT=Ta,yh.OrthographicFrustum=xa,yh.Pass=Aa,yh.PerformanceDisplay=Pa,yh.PerInstanceColorAppearance=Ma,yh.PerspectiveFrustum=Da,yh.PerspectiveOffCenterFrustum=Ia,yh.PickDepth=Ra,yh.PointAppearance=Oa,yh.PointPrimitive=La,yh.PointPrimitiveCollection=Na,yh.Polyline=Fa,yh.PolylineCollection=ka,yh.PolylineColorAppearance=Ba,yh.PolylineMaterialAppearance=za,yh.Primitive=Va,yh.PrimitiveCollection=Ua,yh.PrimitivePipeline=Ga,yh.PrimitiveState=Wa,yh.QuadtreeOccluders=Ha,yh.QuadtreePrimitive=qa,yh.QuadtreeTile=ja,yh.QuadtreeTileLoadState=Ya,yh.QuadtreeTileProvider=Xa,yh.Scene=Za,yh.SceneMode=Ka,yh.SceneTransforms=Ja,yh.SceneTransitioner=Qa,yh.ScreenSpaceCameraController=$a,yh.ShadowMap=es,yh.ShadowMapShader=ts,yh.SingleTileImageryProvider=is,yh.SkyAtmosphere=ns,yh.SkyBox=rs,yh.StencilFunction=os,yh.StencilOperation=as,yh.Sun=ss,yh.SunPostProcess=ls,yh.TerrainState=us,yh.TextureAtlas=cs,yh.TileBoundingBox=hs,yh.TileCoordinatesImageryProvider=ds,yh.TileDiscardPolicy=ps,yh.TileImagery=ms,yh.TileReplacementQueue=fs,yh.TileState=gs,yh.TileTerrain=vs,yh.TweenCollection=_s,yh.UrlTemplateImageryProvider=ys,yh.VerticalOrigin=Cs,yh.ViewportQuad=ws,yh.WebMapServiceImageryProvider=Es,yh.WebMapTileServiceImageryProvider=bs,yh._shaders.AdjustTranslucentFS=Ss,yh._shaders.AllMaterialAppearanceFS=Ts,yh._shaders.AllMaterialAppearanceVS=xs,yh._shaders.BasicMaterialAppearanceFS=As,yh._shaders.BasicMaterialAppearanceVS=Ps,yh._shaders.EllipsoidSurfaceAppearanceFS=Ms,yh._shaders.EllipsoidSurfaceAppearanceVS=Ds,yh._shaders.PerInstanceColorAppearanceFS=Is,yh._shaders.PerInstanceColorAppearanceVS=Rs,yh._shaders.PerInstanceFlatColorAppearanceFS=Os,yh._shaders.PerInstanceFlatColorAppearanceVS=Ls,yh._shaders.PointAppearanceFS=Ns,yh._shaders.PointAppearanceVS=Fs,yh._shaders.PolylineColorAppearanceVS=ks,yh._shaders.PolylineMaterialAppearanceVS=Bs,yh._shaders.TexturedMaterialAppearanceFS=zs,yh._shaders.TexturedMaterialAppearanceVS=Vs,yh._shaders.BillboardCollectionFS=Us,yh._shaders.BillboardCollectionVS=Gs,yh._shaders.degreesPerRadian=Ws,yh._shaders.depthRange=Hs,yh._shaders.epsilon1=qs,yh._shaders.epsilon2=js,yh._shaders.epsilon3=Ys,yh._shaders.epsilon4=Xs,yh._shaders.epsilon5=Zs,yh._shaders.epsilon6=Ks,yh._shaders.epsilon7=Js,yh._shaders.infinity=Qs,yh._shaders.oneOverPi=$s,yh._shaders.oneOverTwoPi=el,yh._shaders.passCompute=tl,yh._shaders.passEnvironment=il,yh._shaders.passGlobe=nl,yh._shaders.passGround=rl,yh._shaders.passOpaque=ol,yh._shaders.passOverlay=al,yh._shaders.passTranslucent=sl,yh._shaders.pi=ll,yh._shaders.piOverFour=ul,yh._shaders.piOverSix=cl,yh._shaders.piOverThree=hl,yh._shaders.piOverTwo=dl,yh._shaders.radiansPerDegree=pl,yh._shaders.sceneMode2D=ml,yh._shaders.sceneMode3D=fl,yh._shaders.sceneModeColumbusView=gl,yh._shaders.sceneModeMorphing=vl,yh._shaders.solarRadius=_l,yh._shaders.threePiOver2=yl,yh._shaders.twoPi=Cl,yh._shaders.webMercatorMaxLatitude=wl,yh._shaders.CzmBuiltins=El,yh._shaders.alphaWeight=bl,yh._shaders.antialias=Sl,yh._shaders.cascadeColor=Tl,yh._shaders.cascadeDistance=xl,yh._shaders.cascadeMatrix=Al,yh._shaders.cascadeWeights=Pl,yh._shaders.columbusViewMorph=Ml,yh._shaders.computePosition=Dl,yh._shaders.cosineAndSine=Il,yh._shaders.decompressTextureCoordinates=Rl,yh._shaders.eastNorthUpToEyeCoordinates=Ol,yh._shaders.ellipsoidContainsPoint=Ll,yh._shaders.ellipsoidNew=Nl,yh._shaders.ellipsoidWgs84TextureCoordinates=Fl,yh._shaders.equalsEpsilon=kl,yh._shaders.eyeOffset=Bl,yh._shaders.eyeToWindowCoordinates=zl,yh._shaders.fog=Vl,yh._shaders.geodeticSurfaceNormal=Ul,yh._shaders.getDefaultMaterial=Gl,yh._shaders.getLambertDiffuse=Wl,yh._shaders.getSpecular=Hl,yh._shaders.getWaterNoise=ql,yh._shaders.getWgs84EllipsoidEC=jl,yh._shaders.hue=Yl,yh._shaders.isEmpty=Xl,yh._shaders.isFull=Zl,yh._shaders.latitudeToWebMercatorFraction=Kl,yh._shaders.luminance=Jl,yh._shaders.metersPerPixel=Ql,yh._shaders.modelToWindowCoordinates=$l,yh._shaders.multiplyWithColorBalance=eu,yh._shaders.nearFarScalar=tu,yh._shaders.octDecode=iu,yh._shaders.packDepth=nu,yh._shaders.phong=ru,yh._shaders.pointAlongRay=ou,yh._shaders.rayEllipsoidIntersectionInterval=au,yh._shaders.RGBToXYZ=su,yh._shaders.saturation=lu,yh._shaders.shadowDepthCompare=uu,yh._shaders.shadowVisibility=cu,yh._shaders.signNotZero=hu,yh._shaders.tangentToEyeSpaceMatrix=du,yh._shaders.translateRelativeToEye=pu,yh._shaders.translucentPhong=mu,yh._shaders.transpose=fu,yh._shaders.unpackDepth=gu,yh._shaders.windowToEyeCoordinates=vu,yh._shaders.XYZToRGB=_u,yh._shaders.depthRangeStruct=yu,yh._shaders.ellipsoid=Cu,yh._shaders.material=wu,yh._shaders.materialInput=Eu,yh._shaders.ray=bu,yh._shaders.raySegment=Su,yh._shaders.shadowParameters=Tu,yh._shaders.CompositeOITFS=xu,yh._shaders.DepthPlaneFS=Au,yh._shaders.DepthPlaneVS=Pu,yh._shaders.EllipsoidFS=Mu,yh._shaders.EllipsoidVS=Du,yh._shaders.GlobeFS=Iu,yh._shaders.GlobeVS=Ru,yh._shaders.GroundAtmosphere=Ou,yh._shaders.BumpMapMaterial=Lu,yh._shaders.CheckerboardMaterial=Nu,yh._shaders.DotMaterial=Fu,yh._shaders.FadeMaterial=ku,yh._shaders.GridMaterial=Bu,yh._shaders.NormalMapMaterial=zu,yh._shaders.PolylineArrowMaterial=Vu,yh._shaders.PolylineGlowMaterial=Uu,yh._shaders.PolylineOutlineMaterial=Gu,yh._shaders.RimLightingMaterial=Wu,yh._shaders.StripeMaterial=Hu,yh._shaders.Water=qu,yh._shaders.PointPrimitiveCollectionFS=ju,yh._shaders.PointPrimitiveCollectionVS=Yu,yh._shaders.PolylineCommon=Xu,yh._shaders.PolylineFS=Zu,yh._shaders.PolylineVS=Ku,yh._shaders.AdditiveBlend=Ju,yh._shaders.BrightPass=Qu,yh._shaders.FXAA=$u,yh._shaders.GaussianBlur1D=ec,yh._shaders.PassThrough=tc,yh._shaders.ReprojectWebMercatorFS=ic,yh._shaders.ReprojectWebMercatorVS=nc,yh._shaders.ShadowVolumeFS=rc,yh._shaders.ShadowVolumeVS=oc,yh._shaders.SkyAtmosphereFS=ac,yh._shaders.SkyAtmosphereVS=sc,yh._shaders.SkyBoxFS=lc,yh._shaders.SkyBoxVS=uc,yh._shaders.SunFS=cc,yh._shaders.SunTextureFS=hc,yh._shaders.SunVS=dc,yh._shaders.ViewportQuadFS=pc,yh._shaders.ViewportQuadVS=mc,yh.Autolinker=fc,yh["earcut-2.1.1"]=gc,yh.gltfDefaults=vc,yh["knockout-3.4.0"]=_c,yh["knockout-es5"]=yc,yh.knockout=Cc,yh.measureText=wc,yh["mersenne-twister"]=Ec,yh.NoSleep=bc,yh.sprintf=Sc,yh.topojson=Tc,yh.Tween=xc,yh.Uri=Ac,yh.when=Pc,yh.zip=Mc,yh.Animation=Dc,yh.AnimationViewModel=Ic,yh.BaseLayerPicker=Rc,yh.BaseLayerPickerViewModel=Oc,yh.createDefaultImageryProviderViewModels=Lc,yh.createDefaultTerrainProviderViewModels=Nc,yh.ProviderViewModel=Fc,yh.CesiumInspector=kc,yh.CesiumInspectorViewModel=Bc,yh.CesiumWidget=zc,yh.ClockViewModel=Vc,yh.Command=Uc,yh.createCommand=Gc,yh.FullscreenButton=Wc,yh.FullscreenButtonViewModel=Hc,yh.Geocoder=qc,yh.GeocoderViewModel=jc,yh.getElement=Yc,yh.HomeButton=Xc,yh.HomeButtonViewModel=Zc,yh.InfoBox=Kc,yh.InfoBoxViewModel=Jc,yh.NavigationHelpButton=Qc,yh.NavigationHelpButtonViewModel=$c,yh.PerformanceWatchdog=eh,yh.PerformanceWatchdogViewModel=th,yh.SceneModePicker=ih,yh.SceneModePickerViewModel=nh,yh.SelectionIndicator=rh,yh.SelectionIndicatorViewModel=oh,yh.subscribeAndEvaluate=ah,yh.SvgPathBindingHandler=sh,yh.Timeline=lh,yh.TimelineHighlightRange=uh,yh.TimelineTrack=ch,yh.ToggleButtonViewModel=hh,yh.Viewer=dh,yh.viewerCesiumInspectorMixin=ph,yh.viewerDragDropMixin=mh,yh.viewerPerformanceWatchdogMixin=fh,yh.VRButton=gh,yh.VRButtonViewModel=vh,yh.createTaskProcessorWorker=_h,yh}),define("Source/SpirographPositionProperty_amd",["Cesium/Cesium"],function(e){"use strict";var t=function(t,i,n,r,o,a){this._center=t,this._radiusMedian=i,this._radiusSubCircle=n,this._durationMedianCircle=r,this._durationSubCircle=o,e.defined(a)||(a=e.Ellipsoid.WGS84),this._ellipsoid=a,this._definitionChanged=new e.Event};e.defineProperties(t.prototype,{isConstant:{get:function(){return 0==this._radiusMedian&&0==this._radiusSubCircle}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return e.ReferenceFrame.FIXED}}}),t.prototype.getValue=function(t,i){return this.getValueInReferenceFrame(t,e.ReferenceFrame.FIXED,i)};var i=new e.Cartographic;return t.prototype.getValueInReferenceFrame=function(t,n,r){var o=e.JulianDate.toDate(t).getTime(),a=this._radiusMedian+this._radiusSubCircle*Math.sin(2*Math.PI*(o/this._durationSubCircle));return i.latitude=this._center.latitude+a*Math.cos(2*Math.PI*(o/this._durationMedianCircle)),i.longitude=this._center.longitude+a*Math.sin(2*Math.PI*(o/this._durationMedianCircle)),i.height=this._center.height,r=this._ellipsoid.cartographicToCartesian(i,r),n==e.ReferenceFrame.FIXED?r:e.PositionProperty.convertToReferenceFrame(t,r,e.ReferenceFrame.FIXED,n,r)},t.prototype.equals=function(e){return e instanceof t&&this._center.equals(e._center)&&this._radiusMedian==e._radiusMedian&&this._radiusSubCircle==e._radiusSubCircle&&this._durationMedianCircle==e._durationMedianCircle&&this._durationSubCircle==e._durationSubCircle&&this._ellipsoid.equals(e._ellipsoid)},t}),function(){!function(e){var t=this||(0,eval)("this"),i=t.document,n=t.navigator,r=t.jQuery,o=t.JSON;!function(e){"function"==typeof define&&define.amd?define("knockout",["exports","require"],e):e("object"==typeof exports&&"object"==typeof module?module.exports||exports:t.ko={})}(function(a,s){function l(e,t){return null===e||typeof e in g?e===t:!1}function u(t,i){var n;return function(){n||(n=f.a.setTimeout(function(){n=e,t()},i))}}function c(e,t){var i;return function(){clearTimeout(i),i=f.a.setTimeout(e,t)}}function h(e,t){t&&t!==v?"beforeChange"===t?this.Kb(e):this.Ha(e,t):this.Lb(e)}function d(e,t){null!==t&&t.k&&t.k()}function p(e,t){var i=this.Hc,n=i[E];n.R||(this.lb&&this.Ma[t]?(i.Pb(t,e,this.Ma[t]),this.Ma[t]=null,--this.lb):n.r[t]||i.Pb(t,e,n.s?{ia:e}:i.uc(e)))}function m(e,t,i,n){f.d[e]={init:function(e,r,o,a,s){var l,u;return f.m(function(){var o=f.a.c(r()),a=!i!=!o,c=!u;(c||t||a!==l)&&(c&&f.va.Aa()&&(u=f.a.ua(f.f.childNodes(e),!0)),a?(c||f.f.da(e,f.a.ua(u)),f.eb(n?n(s,o):s,e)):f.f.xa(e),l=a)},null,{i:e}),{controlsDescendantBindings:!0}}},f.h.ta[e]=!1,f.f.Z[e]=!0}var f="undefined"!=typeof a?a:{};f.b=function(e,t){for(var i=e.split("."),n=f,r=0;r<i.length-1;r++)n=n[i[r]];n[i[i.length-1]]=t},f.G=function(e,t,i){e[t]=i},f.version="3.4.0",f.b("version",f.version),f.options={deferUpdates:!1,useOnlyNativeEvents:!1},f.a=function(){function a(e,t){for(var i in e)e.hasOwnProperty(i)&&t(i,e[i])}function s(e,t){if(t)for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);return e}function l(e,t){return e.__proto__=t,e}function u(e,t,i,n){var r=e[t].match(v)||[];f.a.q(i.match(v),function(e){f.a.pa(r,e,n)}),e[t]=r.join(" ")}var c={__proto__:[]}instanceof Array,h="function"==typeof Symbol,d={},p={};d[n&&/Firefox\/2/i.test(n.userAgent)?"KeyboardEvent":"UIEvents"]=["keyup","keydown","keypress"],d.MouseEvents="click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave".split(" "),a(d,function(e,t){if(t.length)for(var i=0,n=t.length;n>i;i++)p[t[i]]=e});var m={propertychange:!0},g=i&&function(){for(var t=3,n=i.createElement("div"),r=n.getElementsByTagName("i");n.innerHTML="<!--[if gt IE "+ ++t+"]><i></i><![endif]-->",r[0];);return t>4?t:e}(),v=/\S+/g;return{cc:["authenticity_token",/^__RequestVerificationToken(_.*)?$/],q:function(e,t){for(var i=0,n=e.length;n>i;i++)t(e[i],i)},o:function(e,t){if("function"==typeof Array.prototype.indexOf)return Array.prototype.indexOf.call(e,t);for(var i=0,n=e.length;n>i;i++)if(e[i]===t)return i;return-1},Sb:function(e,t,i){for(var n=0,r=e.length;r>n;n++)if(t.call(i,e[n],n))return e[n];return null},La:function(e,t){var i=f.a.o(e,t);i>0?e.splice(i,1):0===i&&e.shift()},Tb:function(e){e=e||[];for(var t=[],i=0,n=e.length;n>i;i++)0>f.a.o(t,e[i])&&t.push(e[i]);return t},fb:function(e,t){e=e||[];for(var i=[],n=0,r=e.length;r>n;n++)i.push(t(e[n],n));return i},Ka:function(e,t){e=e||[];for(var i=[],n=0,r=e.length;r>n;n++)t(e[n],n)&&i.push(e[n]);return i},ra:function(e,t){if(t instanceof Array)e.push.apply(e,t);else for(var i=0,n=t.length;n>i;i++)e.push(t[i]);return e},pa:function(e,t,i){var n=f.a.o(f.a.zb(e),t);0>n?i&&e.push(t):i||e.splice(n,1)},ka:c,extend:s,Xa:l,Ya:c?l:s,D:a,Ca:function(e,t){if(!e)return e;var i,n={};for(i in e)e.hasOwnProperty(i)&&(n[i]=t(e[i],i,e));return n},ob:function(e){for(;e.firstChild;)f.removeNode(e.firstChild)},jc:function(e){e=f.a.V(e);for(var t=(e[0]&&e[0].ownerDocument||i).createElement("div"),n=0,r=e.length;r>n;n++)t.appendChild(f.$(e[n]));return t},ua:function(e,t){for(var i=0,n=e.length,r=[];n>i;i++){var o=e[i].cloneNode(!0);r.push(t?f.$(o):o)}return r},da:function(e,t){if(f.a.ob(e),t)for(var i=0,n=t.length;n>i;i++)e.appendChild(t[i])},qc:function(e,t){var i=e.nodeType?[e]:e;if(0<i.length){for(var n=i[0],r=n.parentNode,o=0,a=t.length;a>o;o++)r.insertBefore(t[o],n);for(o=0,a=i.length;a>o;o++)f.removeNode(i[o])}},za:function(e,t){if(e.length){for(t=8===t.nodeType&&t.parentNode||t;e.length&&e[0].parentNode!==t;)e.splice(0,1);for(;1<e.length&&e[e.length-1].parentNode!==t;)e.length--;if(1<e.length){var i=e[0],n=e[e.length-1];for(e.length=0;i!==n;)e.push(i),i=i.nextSibling;e.push(n)}}return e},sc:function(e,t){7>g?e.setAttribute("selected",t):e.selected=t},$a:function(t){return null===t||t===e?"":t.trim?t.trim():t.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},nd:function(e,t){return e=e||"",t.length>e.length?!1:e.substring(0,t.length)===t},Mc:function(e,t){if(e===t)return!0;if(11===e.nodeType)return!1;if(t.contains)return t.contains(3===e.nodeType?e.parentNode:e);if(t.compareDocumentPosition)return 16==(16&t.compareDocumentPosition(e));for(;e&&e!=t;)e=e.parentNode;return!!e},nb:function(e){return f.a.Mc(e,e.ownerDocument.documentElement)},Qb:function(e){return!!f.a.Sb(e,f.a.nb)},A:function(e){return e&&e.tagName&&e.tagName.toLowerCase()},Wb:function(e){return f.onError?function(){try{return e.apply(this,arguments)}catch(t){throw f.onError&&f.onError(t),t}}:e},setTimeout:function(e,t){return setTimeout(f.a.Wb(e),t)},$b:function(e){setTimeout(function(){throw f.onError&&f.onError(e),e},0)},p:function(e,t,i){var n=f.a.Wb(i);if(i=g&&m[t],f.options.useOnlyNativeEvents||i||!r)if(i||"function"!=typeof e.addEventListener){if("undefined"==typeof e.attachEvent)throw Error("Browser doesn't support addEventListener or attachEvent");var o=function(t){n.call(e,t)},a="on"+t;e.attachEvent(a,o),f.a.F.oa(e,function(){e.detachEvent(a,o)})}else e.addEventListener(t,n,!1);else r(e).bind(t,n)},Da:function(e,n){if(!e||!e.nodeType)throw Error("element must be a DOM node when calling triggerEvent");var o;if("input"===f.a.A(e)&&e.type&&"click"==n.toLowerCase()?(o=e.type,o="checkbox"==o||"radio"==o):o=!1,f.options.useOnlyNativeEvents||!r||o)if("function"==typeof i.createEvent){if("function"!=typeof e.dispatchEvent)throw Error("The supplied element doesn't support dispatchEvent");o=i.createEvent(p[n]||"HTMLEvents"),o.initEvent(n,!0,!0,t,0,0,0,0,0,!1,!1,!1,!1,0,e),e.dispatchEvent(o)}else if(o&&e.click)e.click();else{if("undefined"==typeof e.fireEvent)throw Error("Browser doesn't support triggering events");e.fireEvent("on"+n)}else r(e).trigger(n)},c:function(e){return f.H(e)?e():e},zb:function(e){return f.H(e)?e.t():e},bb:function(e,t,i){var n;t&&("object"==typeof e.classList?(n=e.classList[i?"add":"remove"],f.a.q(t.match(v),function(t){n.call(e.classList,t)})):"string"==typeof e.className.baseVal?u(e.className,"baseVal",t,i):u(e,"className",t,i))},Za:function(t,i){var n=f.a.c(i);(null===n||n===e)&&(n="");var r=f.f.firstChild(t);!r||3!=r.nodeType||f.f.nextSibling(r)?f.f.da(t,[t.ownerDocument.createTextNode(n)]):r.data=n,f.a.Rc(t)},rc:function(e,t){if(e.name=t,7>=g)try{e.mergeAttributes(i.createElement("<input name='"+e.name+"'/>"),!1)}catch(n){}},Rc:function(e){g>=9&&(e=1==e.nodeType?e:e.parentNode,e.style&&(e.style.zoom=e.style.zoom))},Nc:function(e){if(g){var t=e.style.width;e.style.width=0,e.style.width=t}},hd:function(e,t){e=f.a.c(e),t=f.a.c(t);for(var i=[],n=e;t>=n;n++)i.push(n);return i},V:function(e){for(var t=[],i=0,n=e.length;n>i;i++)t.push(e[i]);return t},Yb:function(e){return h?Symbol(e):e},rd:6===g,sd:7===g,C:g,ec:function(e,t){for(var i=f.a.V(e.getElementsByTagName("input")).concat(f.a.V(e.getElementsByTagName("textarea"))),n="string"==typeof t?function(e){return e.name===t}:function(e){return t.test(e.name)},r=[],o=i.length-1;o>=0;o--)n(i[o])&&r.push(i[o]);return r},ed:function(e){return"string"==typeof e&&(e=f.a.$a(e))?o&&o.parse?o.parse(e):new Function("return "+e)():null},Eb:function(e,t,i){if(!o||!o.stringify)throw Error("Cannot find JSON.stringify(). Some browsers (e.g., IE < 8) don't support it natively, but you can overcome this by adding a script reference to json2.js, downloadable from http://www.json.org/json2.js");return o.stringify(f.a.c(e),t,i)},fd:function(e,t,n){n=n||{};var r=n.params||{},o=n.includeFields||this.cc,s=e;if("object"==typeof e&&"form"===f.a.A(e))for(var s=e.action,l=o.length-1;l>=0;l--)for(var u=f.a.ec(e,o[l]),c=u.length-1;c>=0;c--)r[u[c].name]=u[c].value;t=f.a.c(t);var h=i.createElement("form");h.style.display="none",h.action=s,h.method="post";for(var d in t)e=i.createElement("input"),e.type="hidden",e.name=d,e.value=f.a.Eb(f.a.c(t[d])),h.appendChild(e);a(r,function(e,t){var n=i.createElement("input");n.type="hidden",n.name=e,n.value=t,h.appendChild(n)}),i.body.appendChild(h),n.submitter?n.submitter(h):h.submit(),setTimeout(function(){h.parentNode.removeChild(h)},0)}}}(),f.b("utils",f.a),f.b("utils.arrayForEach",f.a.q),f.b("utils.arrayFirst",f.a.Sb),f.b("utils.arrayFilter",f.a.Ka),f.b("utils.arrayGetDistinctValues",f.a.Tb),f.b("utils.arrayIndexOf",f.a.o),f.b("utils.arrayMap",f.a.fb),f.b("utils.arrayPushAll",f.a.ra),f.b("utils.arrayRemoveItem",f.a.La),f.b("utils.extend",f.a.extend),f.b("utils.fieldsIncludedWithJsonPost",f.a.cc),f.b("utils.getFormFields",f.a.ec),f.b("utils.peekObservable",f.a.zb),f.b("utils.postJson",f.a.fd),f.b("utils.parseJson",f.a.ed),f.b("utils.registerEventHandler",f.a.p),f.b("utils.stringifyJson",f.a.Eb),f.b("utils.range",f.a.hd),f.b("utils.toggleDomNodeCssClass",f.a.bb),f.b("utils.triggerEvent",f.a.Da),f.b("utils.unwrapObservable",f.a.c),f.b("utils.objectForEach",f.a.D),f.b("utils.addOrRemoveItem",f.a.pa),f.b("utils.setTextContent",f.a.Za),f.b("unwrap",f.a.c),Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if(1===arguments.length)return function(){return t.apply(e,arguments)};var i=Array.prototype.slice.call(arguments,1);return function(){var n=i.slice(0);return n.push.apply(n,arguments),t.apply(e,n)}}),f.a.e=new function(){function t(t,o){var a=t[n];if(!a||"null"===a||!r[a]){if(!o)return e;a=t[n]="ko"+i++,r[a]={}}return r[a]}var i=0,n="__ko__"+(new Date).getTime(),r={};return{get:function(i,n){var r=t(i,!1);return r===e?e:r[n]},set:function(i,n,r){(r!==e||t(i,!1)!==e)&&(t(i,!0)[n]=r)},clear:function(e){var t=e[n];return t?(delete r[t],e[n]=null,!0):!1},I:function(){return i++ +n}}},f.b("utils.domData",f.a.e),f.b("utils.domData.clear",f.a.e.clear),f.a.F=new function(){function t(t,i){var r=f.a.e.get(t,n);return r===e&&i&&(r=[],f.a.e.set(t,n,r)),r}function i(e){var n=t(e,!1);if(n)for(var n=n.slice(0),r=0;r<n.length;r++)n[r](e);if(f.a.e.clear(e),f.a.F.cleanExternalData(e),a[e.nodeType])for(n=e.firstChild;e=n;)n=e.nextSibling,8===e.nodeType&&i(e)}var n=f.a.e.I(),o={1:!0,8:!0,9:!0},a={1:!0,9:!0};return{oa:function(e,i){if("function"!=typeof i)throw Error("Callback must be a function");t(e,!0).push(i)},pc:function(i,r){var o=t(i,!1);o&&(f.a.La(o,r),0==o.length&&f.a.e.set(i,n,e))},$:function(e){if(o[e.nodeType]&&(i(e),a[e.nodeType])){var t=[];f.a.ra(t,e.getElementsByTagName("*"));for(var n=0,r=t.length;r>n;n++)i(t[n])}return e},removeNode:function(e){f.$(e),e.parentNode&&e.parentNode.removeChild(e)},cleanExternalData:function(e){r&&"function"==typeof r.cleanData&&r.cleanData([e])}}},f.$=f.a.F.$,f.removeNode=f.a.F.removeNode,f.b("cleanNode",f.$),f.b("removeNode",f.removeNode),f.b("utils.domNodeDisposal",f.a.F),f.b("utils.domNodeDisposal.addDisposeCallback",f.a.F.oa),f.b("utils.domNodeDisposal.removeDisposeCallback",f.a.F.pc),function(){var n=[0,"",""],o=[1,"<table>","</table>"],a=[3,"<table><tbody><tr>","</tr></tbody></table>"],s=[1,"<select multiple='multiple'>","</select>"],l={thead:o,tbody:o,tfoot:o,tr:[2,"<table><tbody>","</tbody></table>"],td:a,th:a,option:s,optgroup:s},u=8>=f.a.C;f.a.ma=function(e,o){var a;if(r){if(r.parseHTML)a=r.parseHTML(e,o)||[];else if((a=r.clean([e],o))&&a[0]){for(var s=a[0];s.parentNode&&11!==s.parentNode.nodeType;)s=s.parentNode;s.parentNode&&s.parentNode.removeChild(s)}}else{(a=o)||(a=i);var c,s=a.parentWindow||a.defaultView||t,h=f.a.$a(e).toLowerCase(),d=a.createElement("div");for(c=(h=h.match(/^<([a-z]+)[ >]/))&&l[h[1]]||n,h=c[0],c="ignored<div>"+c[1]+e+c[2]+"</div>","function"==typeof s.innerShiv?d.appendChild(s.innerShiv(c)):(u&&a.appendChild(d),d.innerHTML=c,u&&d.parentNode.removeChild(d));h--;)d=d.lastChild;a=f.a.V(d.lastChild.childNodes)}return a},f.a.Cb=function(t,i){if(f.a.ob(t),i=f.a.c(i),null!==i&&i!==e)if("string"!=typeof i&&(i=i.toString()),r)r(t).html(i);else for(var n=f.a.ma(i,t.ownerDocument),o=0;o<n.length;o++)t.appendChild(n[o])}}(),f.b("utils.parseHtmlFragment",f.a.ma),f.b("utils.setHtml",f.a.Cb),f.M=function(){function t(e,i){if(e)if(8==e.nodeType){var n=f.M.lc(e.nodeValue);null!=n&&i.push({Lc:e,cd:n})}else if(1==e.nodeType)for(var n=0,r=e.childNodes,o=r.length;o>n;n++)t(r[n],i)}var i={};return{wb:function(e){if("function"!=typeof e)throw Error("You can only pass a function to ko.memoization.memoize()");var t=(4294967296*(1+Math.random())|0).toString(16).substring(1)+(4294967296*(1+Math.random())|0).toString(16).substring(1);return i[t]=e,"<!--[ko_memo:"+t+"]-->"},xc:function(t,n){var r=i[t];if(r===e)throw Error("Couldn't find any memo with ID "+t+". Perhaps it's already been unmemoized.");try{return r.apply(null,n||[]),!0}finally{delete i[t]}},yc:function(e,i){var n=[];t(e,n);for(var r=0,o=n.length;o>r;r++){var a=n[r].Lc,s=[a];i&&f.a.ra(s,i),f.M.xc(n[r].cd,s),a.nodeValue="",a.parentNode&&a.parentNode.removeChild(a)}},lc:function(e){return(e=e.match(/^\[ko_memo\:(.*?)\]$/))?e[1]:null}}}(),f.b("memoization",f.M),f.b("memoization.memoize",f.M.wb),f.b("memoization.unmemoize",f.M.xc),f.b("memoization.parseMemoText",f.M.lc),f.b("memoization.unmemoizeDomNodeAndDescendants",f.M.yc),f.Y=function(){function e(){if(o)for(var e,t=o,i=0;o>s;)if(e=r[s++]){if(s>t){if(5e3<=++i){s=o,f.a.$b(Error("'Too much recursion' after processing "+i+" task groups."));break}t=o}try{e()}catch(n){f.a.$b(n)}}}function n(){e(),s=o=r.length=0}var r=[],o=0,a=1,s=0;return{scheduler:t.MutationObserver?function(e){var t=i.createElement("div");return new MutationObserver(e).observe(t,{attributes:!0}),function(){t.classList.toggle("foo")}}(n):i&&"onreadystatechange"in i.createElement("script")?function(e){var t=i.createElement("script");t.onreadystatechange=function(){ +t.onreadystatechange=null,i.documentElement.removeChild(t),t=null,e()},i.documentElement.appendChild(t)}:function(e){setTimeout(e,0)},Wa:function(e){return o||f.Y.scheduler(n),r[o++]=e,a++},cancel:function(e){e-=a-o,e>=s&&o>e&&(r[e]=null)},resetForTesting:function(){var e=o-s;return s=o=r.length=0,e},md:e}}(),f.b("tasks",f.Y),f.b("tasks.schedule",f.Y.Wa),f.b("tasks.runEarly",f.Y.md),f.ya={throttle:function(e,t){e.throttleEvaluation=t;var i=null;return f.B({read:e,write:function(n){clearTimeout(i),i=f.a.setTimeout(function(){e(n)},t)}})},rateLimit:function(e,t){var i,n,r;"number"==typeof t?i=t:(i=t.timeout,n=t.method),e.cb=!1,r="notifyWhenChangesStop"==n?c:u,e.Ta(function(e){return r(e,i)})},deferred:function(t,i){if(!0!==i)throw Error("The 'deferred' extender only accepts the value 'true', because it is not supported to turn deferral off once enabled.");t.cb||(t.cb=!0,t.Ta(function(i){var n;return function(){f.Y.cancel(n),n=f.Y.Wa(i),t.notifySubscribers(e,"dirty")}}))},notify:function(e,t){e.equalityComparer="always"==t?null:l}};var g={undefined:1,"boolean":1,number:1,string:1};f.b("extenders",f.ya),f.vc=function(e,t,i){this.ia=e,this.gb=t,this.Kc=i,this.R=!1,f.G(this,"dispose",this.k)},f.vc.prototype.k=function(){this.R=!0,this.Kc()},f.J=function(){f.a.Ya(this,_),_.rb(this)};var v="change",_={rb:function(e){e.K={},e.Nb=1},X:function(e,t,i){var n=this;i=i||v;var r=new f.vc(n,t?e.bind(t):e,function(){f.a.La(n.K[i],r),n.Ia&&n.Ia(i)});return n.sa&&n.sa(i),n.K[i]||(n.K[i]=[]),n.K[i].push(r),r},notifySubscribers:function(e,t){if(t=t||v,t===v&&this.zc(),this.Pa(t))try{f.l.Ub();for(var i,n=this.K[t].slice(0),r=0;i=n[r];++r)i.R||i.gb(e)}finally{f.l.end()}},Na:function(){return this.Nb},Uc:function(e){return this.Na()!==e},zc:function(){++this.Nb},Ta:function(e){var t,i,n,r=this,o=f.H(r);r.Ha||(r.Ha=r.notifySubscribers,r.notifySubscribers=h);var a=e(function(){r.Mb=!1,o&&n===r&&(n=r()),t=!1,r.tb(i,n)&&r.Ha(i=n)});r.Lb=function(e){r.Mb=t=!0,n=e,a()},r.Kb=function(e){t||(i=e,r.Ha(e,"beforeChange"))}},Pa:function(e){return this.K[e]&&this.K[e].length},Sc:function(e){if(e)return this.K[e]&&this.K[e].length||0;var t=0;return f.a.D(this.K,function(e,i){"dirty"!==e&&(t+=i.length)}),t},tb:function(e,t){return!this.equalityComparer||!this.equalityComparer(e,t)},extend:function(e){var t=this;return e&&f.a.D(e,function(e,i){var n=f.ya[e];"function"==typeof n&&(t=n(t,i)||t)}),t}};f.G(_,"subscribe",_.X),f.G(_,"extend",_.extend),f.G(_,"getSubscriptionsCount",_.Sc),f.a.ka&&f.a.Xa(_,Function.prototype),f.J.fn=_,f.hc=function(e){return null!=e&&"function"==typeof e.X&&"function"==typeof e.notifySubscribers},f.b("subscribable",f.J),f.b("isSubscribable",f.hc),f.va=f.l=function(){function e(e){n.push(i),i=e}function t(){i=n.pop()}var i,n=[],r=0;return{Ub:e,end:t,oc:function(e){if(i){if(!f.hc(e))throw Error("Only subscribable things can act as dependencies");i.gb.call(i.Gc,e,e.Cc||(e.Cc=++r))}},w:function(i,n,r){try{return e(),i.apply(n,r||[])}finally{t()}},Aa:function(){return i?i.m.Aa():void 0},Sa:function(){return i?i.Sa:void 0}}}(),f.b("computedContext",f.va),f.b("computedContext.getDependenciesCount",f.va.Aa),f.b("computedContext.isInitial",f.va.Sa),f.b("ignoreDependencies",f.qd=f.l.w);var y=f.a.Yb("_latestValue");f.N=function(e){function t(){return 0<arguments.length?(t.tb(t[y],arguments[0])&&(t.ga(),t[y]=arguments[0],t.fa()),this):(f.l.oc(t),t[y])}return t[y]=e,f.a.ka||f.a.extend(t,f.J.fn),f.J.fn.rb(t),f.a.Ya(t,C),f.options.deferUpdates&&f.ya.deferred(t,!0),t};var C={equalityComparer:l,t:function(){return this[y]},fa:function(){this.notifySubscribers(this[y])},ga:function(){this.notifySubscribers(this[y],"beforeChange")}};f.a.ka&&f.a.Xa(C,f.J.fn);var w=f.N.gd="__ko_proto__";C[w]=f.N,f.Oa=function(t,i){return null===t||t===e||t[w]===e?!1:t[w]===i?!0:f.Oa(t[w],i)},f.H=function(e){return f.Oa(e,f.N)},f.Ba=function(e){return"function"==typeof e&&e[w]===f.N||"function"==typeof e&&e[w]===f.B&&e.Vc?!0:!1},f.b("observable",f.N),f.b("isObservable",f.H),f.b("isWriteableObservable",f.Ba),f.b("isWritableObservable",f.Ba),f.b("observable.fn",C),f.G(C,"peek",C.t),f.G(C,"valueHasMutated",C.fa),f.G(C,"valueWillMutate",C.ga),f.la=function(e){if(e=e||[],"object"!=typeof e||!("length"in e))throw Error("The argument passed when initializing an observable array must be an array, or null, or undefined.");return e=f.N(e),f.a.Ya(e,f.la.fn),e.extend({trackArrayChanges:!0})},f.la.fn={remove:function(e){for(var t=this.t(),i=[],n="function"!=typeof e||f.H(e)?function(t){return t===e}:e,r=0;r<t.length;r++){var o=t[r];n(o)&&(0===i.length&&this.ga(),i.push(o),t.splice(r,1),r--)}return i.length&&this.fa(),i},removeAll:function(t){if(t===e){var i=this.t(),n=i.slice(0);return this.ga(),i.splice(0,i.length),this.fa(),n}return t?this.remove(function(e){return 0<=f.a.o(t,e)}):[]},destroy:function(e){var t=this.t(),i="function"!=typeof e||f.H(e)?function(t){return t===e}:e;this.ga();for(var n=t.length-1;n>=0;n--)i(t[n])&&(t[n]._destroy=!0);this.fa()},destroyAll:function(t){return t===e?this.destroy(function(){return!0}):t?this.destroy(function(e){return 0<=f.a.o(t,e)}):[]},indexOf:function(e){var t=this();return f.a.o(t,e)},replace:function(e,t){var i=this.indexOf(e);i>=0&&(this.ga(),this.t()[i]=t,this.fa())}},f.a.ka&&f.a.Xa(f.la.fn,f.N.fn),f.a.q("pop push reverse shift sort splice unshift".split(" "),function(e){f.la.fn[e]=function(){var t=this.t();this.ga(),this.Vb(t,e,arguments);var i=t[e].apply(t,arguments);return this.fa(),i===t?this:i}}),f.a.q(["slice"],function(e){f.la.fn[e]=function(){var t=this();return t[e].apply(t,arguments)}}),f.b("observableArray",f.la),f.ya.trackArrayChanges=function(e,t){function i(){if(!r){r=!0;var t=e.notifySubscribers;e.notifySubscribers=function(e,i){return i&&i!==v||++a,t.apply(this,arguments)};var i=[].concat(e.t()||[]);o=null,n=e.X(function(t){if(t=[].concat(t||[]),e.Pa("arrayChange")){var n;(!o||a>1)&&(o=f.a.ib(i,t,e.hb)),n=o}i=t,o=null,a=0,n&&n.length&&e.notifySubscribers(n,"arrayChange")})}}if(e.hb={},t&&"object"==typeof t&&f.a.extend(e.hb,t),e.hb.sparse=!0,!e.Vb){var n,r=!1,o=null,a=0,s=e.sa,l=e.Ia;e.sa=function(t){s&&s.call(e,t),"arrayChange"===t&&i()},e.Ia=function(t){l&&l.call(e,t),"arrayChange"!==t||e.Pa("arrayChange")||(n.k(),r=!1)},e.Vb=function(e,t,i){function n(e,t,i){return s[s.length]={status:e,value:t,index:i}}if(r&&!a){var s=[],l=e.length,u=i.length,c=0;switch(t){case"push":c=l;case"unshift":for(t=0;u>t;t++)n("added",i[t],c+t);break;case"pop":c=l-1;case"shift":l&&n("deleted",e[c],c);break;case"splice":t=Math.min(Math.max(0,0>i[0]?l+i[0]:i[0]),l);for(var l=1===u?l:Math.min(t+(i[1]||0),l),u=t+u-2,c=Math.max(l,u),h=[],d=[],p=2;c>t;++t,++p)l>t&&d.push(n("deleted",e[t],t)),u>t&&h.push(n("added",i[p],t));f.a.dc(d,h);break;default:return}o=s}}}};var E=f.a.Yb("_state");f.m=f.B=function(t,i,n){function r(){if(0<arguments.length){if("function"!=typeof o)throw Error("Cannot write a value to a ko.computed unless you specify a 'write' option. If you wish to read the current value, don't pass any parameters.");return o.apply(a.pb,arguments),this}return f.l.oc(r),(a.S||a.s&&r.Qa())&&r.aa(),a.T}if("object"==typeof t?n=t:(n=n||{},t&&(n.read=t)),"function"!=typeof n.read)throw Error("Pass a function that returns the value of the ko.computed");var o=n.write,a={T:e,S:!0,Ra:!1,Fb:!1,R:!1,Va:!1,s:!1,jd:n.read,pb:i||n.owner,i:n.disposeWhenNodeIsRemoved||n.i||null,wa:n.disposeWhen||n.wa,mb:null,r:{},L:0,bc:null};return r[E]=a,r.Vc="function"==typeof o,f.a.ka||f.a.extend(r,f.J.fn),f.J.fn.rb(r),f.a.Ya(r,b),n.pure?(a.Va=!0,a.s=!0,f.a.extend(r,S)):n.deferEvaluation&&f.a.extend(r,T),f.options.deferUpdates&&f.ya.deferred(r,!0),a.i&&(a.Fb=!0,a.i.nodeType||(a.i=null)),a.s||n.deferEvaluation||r.aa(),a.i&&r.ba()&&f.a.F.oa(a.i,a.mb=function(){r.k()}),r};var b={equalityComparer:l,Aa:function(){return this[E].L},Pb:function(e,t,i){if(this[E].Va&&t===this)throw Error("A 'pure' computed must not be called recursively");this[E].r[e]=i,i.Ga=this[E].L++,i.na=t.Na()},Qa:function(){var e,t,i=this[E].r;for(e in i)if(i.hasOwnProperty(e)&&(t=i[e],t.ia.Uc(t.na)))return!0},bd:function(){this.Fa&&!this[E].Ra&&this.Fa()},ba:function(){return this[E].S||0<this[E].L},ld:function(){this.Mb||this.ac()},uc:function(e){if(e.cb&&!this[E].i){var t=e.X(this.bd,this,"dirty"),i=e.X(this.ld,this);return{ia:e,k:function(){t.k(),i.k()}}}return e.X(this.ac,this)},ac:function(){var e=this,t=e.throttleEvaluation;t&&t>=0?(clearTimeout(this[E].bc),this[E].bc=f.a.setTimeout(function(){e.aa(!0)},t)):e.Fa?e.Fa():e.aa(!0)},aa:function(e){var t=this[E],i=t.wa;if(!t.Ra&&!t.R){if(t.i&&!f.a.nb(t.i)||i&&i()){if(!t.Fb)return void this.k()}else t.Fb=!1;t.Ra=!0;try{this.Qc(e)}finally{t.Ra=!1}t.L||this.k()}},Qc:function(t){var i=this[E],n=i.Va?e:!i.L,r={Hc:this,Ma:i.r,lb:i.L};f.l.Ub({Gc:r,gb:p,m:this,Sa:n}),i.r={},i.L=0,r=this.Pc(i,r),this.tb(i.T,r)&&(i.s||this.notifySubscribers(i.T,"beforeChange"),i.T=r,i.s?this.zc():t&&this.notifySubscribers(i.T)),n&&this.notifySubscribers(i.T,"awake")},Pc:function(e,t){try{var i=e.jd;return e.pb?i.call(e.pb):i()}finally{f.l.end(),t.lb&&!e.s&&f.a.D(t.Ma,d),e.S=!1}},t:function(){var e=this[E];return(e.S&&!e.L||e.s&&this.Qa())&&this.aa(),e.T},Ta:function(e){f.J.fn.Ta.call(this,e),this.Fa=function(){this.Kb(this[E].T),this[E].S=!0,this.Lb(this)}},k:function(){var e=this[E];!e.s&&e.r&&f.a.D(e.r,function(e,t){t.k&&t.k()}),e.i&&e.mb&&f.a.F.pc(e.i,e.mb),e.r=null,e.L=0,e.R=!0,e.S=!1,e.s=!1,e.i=null}},S={sa:function(e){var t=this,i=t[E];if(!i.R&&i.s&&"change"==e){if(i.s=!1,i.S||t.Qa())i.r=null,i.L=0,i.S=!0,t.aa();else{var n=[];f.a.D(i.r,function(e,t){n[t.Ga]=e}),f.a.q(n,function(e,n){var r=i.r[e],o=t.uc(r.ia);o.Ga=n,o.na=r.na,i.r[e]=o})}i.R||t.notifySubscribers(i.T,"awake")}},Ia:function(t){var i=this[E];i.R||"change"!=t||this.Pa("change")||(f.a.D(i.r,function(e,t){t.k&&(i.r[e]={ia:t.ia,Ga:t.Ga,na:t.na},t.k())}),i.s=!0,this.notifySubscribers(e,"asleep"))},Na:function(){var e=this[E];return e.s&&(e.S||this.Qa())&&this.aa(),f.J.fn.Na.call(this)}},T={sa:function(e){"change"!=e&&"beforeChange"!=e||this.t()}};f.a.ka&&f.a.Xa(b,f.J.fn);var x=f.N.gd;f.m[x]=f.N,b[x]=f.m,f.Xc=function(e){return f.Oa(e,f.m)},f.Yc=function(e){return f.Oa(e,f.m)&&e[E]&&e[E].Va},f.b("computed",f.m),f.b("dependentObservable",f.m),f.b("isComputed",f.Xc),f.b("isPureComputed",f.Yc),f.b("computed.fn",b),f.G(b,"peek",b.t),f.G(b,"dispose",b.k),f.G(b,"isActive",b.ba),f.G(b,"getDependenciesCount",b.Aa),f.nc=function(e,t){return"function"==typeof e?f.m(e,t,{pure:!0}):(e=f.a.extend({},e),e.pure=!0,f.m(e,t))},f.b("pureComputed",f.nc),function(){function t(r,o,a){if(a=a||new n,r=o(r),"object"!=typeof r||null===r||r===e||r instanceof RegExp||r instanceof Date||r instanceof String||r instanceof Number||r instanceof Boolean)return r;var s=r instanceof Array?[]:{};return a.save(r,s),i(r,function(i){var n=o(r[i]);switch(typeof n){case"boolean":case"number":case"string":case"function":s[i]=n;break;case"object":case"undefined":var l=a.get(n);s[i]=l!==e?l:t(n,o,a)}}),s}function i(e,t){if(e instanceof Array){for(var i=0;i<e.length;i++)t(i);"function"==typeof e.toJSON&&t("toJSON")}else for(i in e)t(i)}function n(){this.keys=[],this.Ib=[]}f.wc=function(e){if(0==arguments.length)throw Error("When calling ko.toJS, pass the object you want to convert.");return t(e,function(e){for(var t=0;f.H(e)&&10>t;t++)e=e();return e})},f.toJSON=function(e,t,i){return e=f.wc(e),f.a.Eb(e,t,i)},n.prototype={save:function(e,t){var i=f.a.o(this.keys,e);i>=0?this.Ib[i]=t:(this.keys.push(e),this.Ib.push(t))},get:function(t){return t=f.a.o(this.keys,t),t>=0?this.Ib[t]:e}}}(),f.b("toJS",f.wc),f.b("toJSON",f.toJSON),function(){f.j={u:function(t){switch(f.a.A(t)){case"option":return!0===t.__ko__hasDomDataOptionValue__?f.a.e.get(t,f.d.options.xb):7>=f.a.C?t.getAttributeNode("value")&&t.getAttributeNode("value").specified?t.value:t.text:t.value;case"select":return 0<=t.selectedIndex?f.j.u(t.options[t.selectedIndex]):e;default:return t.value}},ha:function(t,i,n){switch(f.a.A(t)){case"option":switch(typeof i){case"string":f.a.e.set(t,f.d.options.xb,e),"__ko__hasDomDataOptionValue__"in t&&delete t.__ko__hasDomDataOptionValue__,t.value=i;break;default:f.a.e.set(t,f.d.options.xb,i),t.__ko__hasDomDataOptionValue__=!0,t.value="number"==typeof i?i:""}break;case"select":(""===i||null===i)&&(i=e);for(var r,o=-1,a=0,s=t.options.length;s>a;++a)if(r=f.j.u(t.options[a]),r==i||""==r&&i===e){o=a;break}(n||o>=0||i===e&&1<t.size)&&(t.selectedIndex=o);break;default:(null===i||i===e)&&(i=""),t.value=i}}}}(),f.b("selectExtensions",f.j),f.b("selectExtensions.readValue",f.j.u),f.b("selectExtensions.writeValue",f.j.ha),f.h=function(){function e(e){e=f.a.$a(e),123===e.charCodeAt(0)&&(e=e.slice(1,-1));var t,i=[],a=e.match(n),s=[],l=0;if(a){a.push(",");for(var u,c=0;u=a[c];++c){var h=u.charCodeAt(0);if(44===h){if(0>=l){i.push(t&&s.length?{key:t,value:s.join("")}:{unknown:t||s.join("")}),t=l=0,s=[];continue}}else if(58===h){if(!l&&!t&&1===s.length){t=s.pop();continue}}else 47===h&&c&&1<u.length?(h=a[c-1].match(r))&&!o[h[0]]&&(e=e.substr(e.indexOf(u)+1),a=e.match(n),a.push(","),c=-1,u="/"):40===h||123===h||91===h?++l:41===h||125===h||93===h?--l:t||s.length||34!==h&&39!==h||(u=u.slice(1,-1));s.push(u)}}return i}var t=["true","false","null","undefined"],i=/^(?:[$_a-z][$\w]*|(.+)(\.\s*[$_a-z][$\w]*|\[.+\]))$/i,n=RegExp("\"(?:[^\"\\\\]|\\\\.)*\"|'(?:[^'\\\\]|\\\\.)*'|/(?:[^/\\\\]|\\\\.)*/w*|[^\\s:,/][^,\"'{}()/:[\\]]*[^\\s,\"'{}()/:[\\]]|[^\\s]","g"),r=/[\])"'A-Za-z0-9_$]+$/,o={"in":1,"return":1,"typeof":1},a={};return{ta:[],ea:a,yb:e,Ua:function(n,r){function o(e,n){var r;if(!c){var h=f.getBindingHandler(e);if(h&&h.preprocess&&!(n=h.preprocess(n,e,o)))return;(h=a[e])&&(r=n,0<=f.a.o(t,r)?r=!1:(h=r.match(i),r=null===h?!1:h[1]?"Object("+h[1]+")"+h[2]:r),h=r),h&&l.push("'"+e+"':function(_z){"+r+"=_z}")}u&&(n="function(){return "+n+" }"),s.push("'"+e+"':"+n)}r=r||{};var s=[],l=[],u=r.valueAccessors,c=r.bindingParams,h="string"==typeof n?e(n):n;return f.a.q(h,function(e){o(e.key||e.unknown,e.value)}),l.length&&o("_ko_property_writers","{"+l.join(",")+" }"),s.join(",")},ad:function(e,t){for(var i=0;i<e.length;i++)if(e[i].key==t)return!0;return!1},Ea:function(e,t,i,n,r){e&&f.H(e)?!f.Ba(e)||r&&e.t()===n||e(n):(e=t.get("_ko_property_writers"))&&e[i]&&e[i](n)}}}(),f.b("expressionRewriting",f.h),f.b("expressionRewriting.bindingRewriteValidators",f.h.ta),f.b("expressionRewriting.parseObjectLiteral",f.h.yb),f.b("expressionRewriting.preProcessBindings",f.h.Ua),f.b("expressionRewriting._twoWayBindings",f.h.ea),f.b("jsonExpressionRewriting",f.h),f.b("jsonExpressionRewriting.insertPropertyAccessorsIntoJson",f.h.Ua),function(){function e(e){return 8==e.nodeType&&a.test(o?e.text:e.nodeValue)}function t(e){return 8==e.nodeType&&s.test(o?e.text:e.nodeValue)}function n(i,n){for(var r=i,o=1,a=[];r=r.nextSibling;){if(t(r)&&(o--,0===o))return a;a.push(r),e(r)&&o++}if(!n)throw Error("Cannot find closing comment tag to match: "+i.nodeValue);return null}function r(e,t){var i=n(e,t);return i?0<i.length?i[i.length-1].nextSibling:e.nextSibling:null}var o=i&&"<!--test-->"===i.createComment("test").text,a=o?/^\x3c!--\s*ko(?:\s+([\s\S]+))?\s*--\x3e$/:/^\s*ko(?:\s+([\s\S]+))?\s*$/,s=o?/^\x3c!--\s*\/ko\s*--\x3e$/:/^\s*\/ko\s*$/,l={ul:!0,ol:!0};f.f={Z:{},childNodes:function(t){return e(t)?n(t):t.childNodes},xa:function(t){if(e(t)){t=f.f.childNodes(t);for(var i=0,n=t.length;n>i;i++)f.removeNode(t[i])}else f.a.ob(t)},da:function(t,i){if(e(t)){f.f.xa(t);for(var n=t.nextSibling,r=0,o=i.length;o>r;r++)n.parentNode.insertBefore(i[r],n)}else f.a.da(t,i)},mc:function(t,i){e(t)?t.parentNode.insertBefore(i,t.nextSibling):t.firstChild?t.insertBefore(i,t.firstChild):t.appendChild(i)},gc:function(t,i,n){n?e(t)?t.parentNode.insertBefore(i,n.nextSibling):n.nextSibling?t.insertBefore(i,n.nextSibling):t.appendChild(i):f.f.mc(t,i)},firstChild:function(i){return e(i)?!i.nextSibling||t(i.nextSibling)?null:i.nextSibling:i.firstChild},nextSibling:function(i){return e(i)&&(i=r(i)),i.nextSibling&&t(i.nextSibling)?null:i.nextSibling},Tc:e,pd:function(e){return(e=(o?e.text:e.nodeValue).match(a))?e[1]:null},kc:function(i){if(l[f.a.A(i)]){var n=i.firstChild;if(n)do if(1===n.nodeType){var o;o=n.firstChild;var a=null;if(o)do if(a)a.push(o);else if(e(o)){var s=r(o,!0);s?o=s:a=[o]}else t(o)&&(a=[o]);while(o=o.nextSibling);if(o=a)for(a=n.nextSibling,s=0;s<o.length;s++)a?i.insertBefore(o[s],a):i.appendChild(o[s])}while(n=n.nextSibling)}}}}(),f.b("virtualElements",f.f),f.b("virtualElements.allowedBindings",f.f.Z),f.b("virtualElements.emptyNode",f.f.xa),f.b("virtualElements.insertAfter",f.f.gc),f.b("virtualElements.prepend",f.f.mc),f.b("virtualElements.setDomNodeChildren",f.f.da),function(){f.Q=function(){this.Fc={}},f.a.extend(f.Q.prototype,{nodeHasBindings:function(e){switch(e.nodeType){case 1:return null!=e.getAttribute("data-bind")||f.g.getComponentNameForNode(e);case 8:return f.f.Tc(e);default:return!1}},getBindings:function(e,t){var i=this.getBindingsString(e,t),i=i?this.parseBindingsString(i,t,e):null;return f.g.Ob(i,e,t,!1)},getBindingAccessors:function(e,t){var i=this.getBindingsString(e,t),i=i?this.parseBindingsString(i,t,e,{valueAccessors:!0}):null;return f.g.Ob(i,e,t,!0)},getBindingsString:function(e){switch(e.nodeType){case 1:return e.getAttribute("data-bind");case 8:return f.f.pd(e);default:return null}},parseBindingsString:function(e,t,i,n){try{var r,o=this.Fc,a=e+(n&&n.valueAccessors||"");if(!(r=o[a])){var s,l="with($context){with($data||{}){return{"+f.h.Ua(e,n)+"}}}";s=new Function("$context","$element",l),r=o[a]=s}return r(t,i)}catch(u){throw u.message="Unable to parse bindings.\nBindings value: "+e+"\nMessage: "+u.message,u}}}),f.Q.instance=new f.Q}(),f.b("bindingProvider",f.Q),function(){function i(e){return function(){return e}}function n(e){return e()}function o(e){return f.a.Ca(f.l.w(e),function(t,i){return function(){return e()[i]}})}function a(e,t,n){return"function"==typeof e?o(e.bind(null,t,n)):f.a.Ca(e,i)}function s(e,t){return o(this.getBindings.bind(this,e,t))}function l(e,t,i){var n,r=f.f.firstChild(t),o=f.Q.instance,a=o.preprocessNode;if(a){for(;n=r;)r=f.f.nextSibling(n),a.call(o,n);r=f.f.firstChild(t)}for(;n=r;)r=f.f.nextSibling(n),u(e,n,i)}function u(e,t,i){var n=!0,r=1===t.nodeType;r&&f.f.kc(t),(r&&i||f.Q.instance.nodeHasBindings(t))&&(n=h(t,null,e,i).shouldBindDescendants),n&&!p[f.a.A(t)]&&l(e,t,!r)}function c(e){var t=[],i={},n=[];return f.a.D(e,function r(o){if(!i[o]){var a=f.getBindingHandler(o);a&&(a.after&&(n.push(o),f.a.q(a.after,function(t){if(e[t]){if(-1!==f.a.o(n,t))throw Error("Cannot combine the following bindings, because they have a cyclic dependency: "+n.join(", "));r(t)}}),n.length--),t.push({key:o,fc:a})),i[o]=!0}}),t}function h(t,i,r,o){var a=f.a.e.get(t,m);if(!i){if(a)throw Error("You cannot apply bindings multiple times to the same element.");f.a.e.set(t,m,!0)}!a&&o&&f.tc(t,r);var l;if(i&&"function"!=typeof i)l=i;else{var u=f.Q.instance,h=u.getBindingAccessors||s,d=f.B(function(){return(l=i?i(r,t):h.call(u,t,r))&&r.P&&r.P(),l},null,{i:t});l&&d.ba()||(d=null)}var p;if(l){var g=d?function(e){return function(){return n(d()[e])}}:function(e){return l[e]},v=function(){return f.a.Ca(d?d():l,n)};v.get=function(e){return l[e]&&n(g(e))},v.has=function(e){return e in l},o=c(l),f.a.q(o,function(i){var n=i.fc.init,o=i.fc.update,a=i.key;if(8===t.nodeType&&!f.f.Z[a])throw Error("The binding '"+a+"' cannot be used with virtual elements");try{"function"==typeof n&&f.l.w(function(){var i=n(t,g(a),v,r.$data,r);if(i&&i.controlsDescendantBindings){if(p!==e)throw Error("Multiple bindings ("+p+" and "+a+") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.");p=a}}),"function"==typeof o&&f.B(function(){o(t,g(a),v,r.$data,r)},null,{i:t})}catch(s){throw s.message='Unable to process binding "'+a+": "+l[a]+'"\nMessage: '+s.message,s}})}return{shouldBindDescendants:p===e}}function d(e){return e&&e instanceof f.U?e:new f.U(e)}f.d={};var p={script:!0,textarea:!0,template:!0};f.getBindingHandler=function(e){return f.d[e]},f.U=function(t,i,n,r){var o,a=this,s="function"==typeof t&&!f.H(t),l=f.B(function(){var e=s?t():t,o=f.a.c(e);return i?(i.P&&i.P(),f.a.extend(a,i),l&&(a.P=l)):(a.$parents=[],a.$root=o,a.ko=f),a.$rawData=e,a.$data=o,n&&(a[n]=o),r&&r(a,i,o),a.$data},null,{wa:function(){return o&&!f.a.Qb(o)},i:!0});l.ba()&&(a.P=l,l.equalityComparer=null,o=[],l.Ac=function(t){o.push(t),f.a.F.oa(t,function(t){f.a.La(o,t),o.length||(l.k(),a.P=l=e)})})},f.U.prototype.createChildContext=function(e,t,i){return new f.U(e,this,t,function(e,t){e.$parentContext=t,e.$parent=t.$data,e.$parents=(t.$parents||[]).slice(0),e.$parents.unshift(e.$parent),i&&i(e)})},f.U.prototype.extend=function(e){return new f.U(this.P||this.$data,this,null,function(t,i){t.$rawData=i.$rawData,f.a.extend(t,"function"==typeof e?e():e)})};var m=f.a.e.I(),g=f.a.e.I();f.tc=function(e,t){return 2!=arguments.length?f.a.e.get(e,g):(f.a.e.set(e,g,t),void(t.P&&t.P.Ac(e)))},f.Ja=function(e,t,i){return 1===e.nodeType&&f.f.kc(e),h(e,t,d(i),!0)},f.Dc=function(e,t,i){return i=d(i),f.Ja(e,a(t,i,e),i)},f.eb=function(e,t){1!==t.nodeType&&8!==t.nodeType||l(d(e),t,!0)},f.Rb=function(e,i){if(!r&&t.jQuery&&(r=t.jQuery),i&&1!==i.nodeType&&8!==i.nodeType)throw Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node");i=i||t.document.body,u(d(e),i,!0)},f.kb=function(t){switch(t.nodeType){case 1:case 8:var i=f.tc(t);if(i)return i;if(t.parentNode)return f.kb(t.parentNode)}return e},f.Jc=function(t){return(t=f.kb(t))?t.$data:e},f.b("bindingHandlers",f.d),f.b("applyBindings",f.Rb),f.b("applyBindingsToDescendants",f.eb),f.b("applyBindingAccessorsToNode",f.Ja),f.b("applyBindingsToNode",f.Dc),f.b("contextFor",f.kb),f.b("dataFor",f.Jc)}(),function(e){function t(t,n){var a,s=r.hasOwnProperty(t)?r[t]:e;s?s.X(n):(s=r[t]=new f.J,s.X(n),i(t,function(e,i){var n=!(!i||!i.synchronous);o[t]={definition:e,Zc:n},delete r[t],a||n?s.notifySubscribers(e):f.Y.Wa(function(){s.notifySubscribers(e)})}),a=!0)}function i(e,t){n("getConfig",[e],function(i){i?n("loadComponent",[e,i],function(e){t(e,i)}):t(null,null)})}function n(t,i,r,o){o||(o=f.g.loaders.slice(0));var a=o.shift();if(a){var s=a[t];if(s){var l=!1;if(s.apply(a,i.concat(function(e){l?r(null):null!==e?r(e):n(t,i,r,o)}))!==e&&(l=!0,!a.suppressLoaderExceptions))throw Error("Component loaders must supply values by invoking the callback, not by returning values synchronously.")}else n(t,i,r,o)}else r(null)}var r={},o={};f.g={get:function(i,n){var r=o.hasOwnProperty(i)?o[i]:e;r?r.Zc?f.l.w(function(){n(r.definition)}):f.Y.Wa(function(){n(r.definition)}):t(i,n)},Xb:function(e){delete o[e]},Jb:n},f.g.loaders=[],f.b("components",f.g),f.b("components.get",f.g.get),f.b("components.clearCachedDefinition",f.g.Xb)}(),function(){function e(e,t,i,n){function r(){0===--s&&n(o)}var o={},s=2,l=i.template;i=i.viewModel,l?a(t,l,function(t){f.g.Jb("loadTemplate",[e,t],function(e){o.template=e,r()})}):r(),i?a(t,i,function(t){f.g.Jb("loadViewModel",[e,t],function(e){o[c]=e,r()})}):r()}function n(e,t,i){if("function"==typeof t)i(function(e){return new t(e)});else if("function"==typeof t[c])i(t[c]);else if("instance"in t){var r=t.instance;i(function(){return r})}else"viewModel"in t?n(e,t.viewModel,i):e("Unknown viewModel value: "+t)}function r(e){switch(f.a.A(e)){case"script":return f.a.ma(e.text);case"textarea":return f.a.ma(e.value);case"template":if(o(e.content))return f.a.ua(e.content.childNodes)}return f.a.ua(e.childNodes)}function o(e){return t.DocumentFragment?e instanceof DocumentFragment:e&&11===e.nodeType}function a(e,i,n){"string"==typeof i.require?s||t.require?(s||t.require)([i.require],n):e("Uses require, but no AMD loader is present"):n(i)}function l(e){return function(t){throw Error("Component '"+e+"': "+t)}}var u={};f.g.register=function(e,t){if(!t)throw Error("Invalid configuration for "+e);if(f.g.ub(e))throw Error("Component "+e+" is already registered");u[e]=t},f.g.ub=function(e){return u.hasOwnProperty(e)},f.g.od=function(e){delete u[e],f.g.Xb(e)},f.g.Zb={getConfig:function(e,t){t(u.hasOwnProperty(e)?u[e]:null)},loadComponent:function(t,i,n){var r=l(t);a(r,i,function(i){e(t,r,i,n)})},loadTemplate:function(e,n,a){if(e=l(e),"string"==typeof n)a(f.a.ma(n));else if(n instanceof Array)a(n);else if(o(n))a(f.a.V(n.childNodes));else if(n.element)if(n=n.element,t.HTMLElement?n instanceof HTMLElement:n&&n.tagName&&1===n.nodeType)a(r(n));else if("string"==typeof n){var s=i.getElementById(n);s?a(r(s)):e("Cannot find element with ID "+n)}else e("Unknown element type: "+n);else e("Unknown template value: "+n)},loadViewModel:function(e,t,i){n(l(e),t,i)}};var c="createViewModel";f.b("components.register",f.g.register),f.b("components.isRegistered",f.g.ub),f.b("components.unregister",f.g.od),f.b("components.defaultLoader",f.g.Zb),f.g.loaders.push(f.g.Zb),f.g.Bc=u}(),function(){function e(e,i){var n=e.getAttribute("params");if(n){var n=t.parseBindingsString(n,i,e,{valueAccessors:!0,bindingParams:!0}),n=f.a.Ca(n,function(t){return f.m(t,null,{i:e})}),r=f.a.Ca(n,function(t){var i=t.t();return t.ba()?f.m({read:function(){return f.a.c(t())},write:f.Ba(i)&&function(e){t()(e)},i:e}):i});return r.hasOwnProperty("$raw")||(r.$raw=n),r}return{$raw:{}}}f.g.getComponentNameForNode=function(e){var t=f.a.A(e);return f.g.ub(t)&&(-1!=t.indexOf("-")||"[object HTMLUnknownElement]"==""+e||8>=f.a.C&&e.tagName===t)?t:void 0},f.g.Ob=function(t,i,n,r){if(1===i.nodeType){var o=f.g.getComponentNameForNode(i);if(o){if(t=t||{},t.component)throw Error('Cannot use the "component" binding on a custom element matching a component');var a={name:o,params:e(i,n)};t.component=r?function(){return a}:a}}return t};var t=new f.Q;9>f.a.C&&(f.g.register=function(e){return function(t){return i.createElement(t),e.apply(this,arguments)}}(f.g.register),i.createDocumentFragment=function(e){return function(){var t,i=e(),n=f.g.Bc;for(t in n)n.hasOwnProperty(t)&&i.createElement(t);return i}}(i.createDocumentFragment))}(),function(e){function t(e,t,i){if(t=t.template,!t)throw Error("Component '"+e+"' has no template");e=f.a.ua(t),f.f.da(i,e)}function i(e,t,i,n){var r=e.createViewModel;return r?r.call(e,n,{element:t,templateNodes:i}):n}var n=0;f.d.component={init:function(r,o,a,s,l){function u(){var e=c&&c.dispose;"function"==typeof e&&e.call(c),h=c=null}var c,h,d=f.a.V(f.f.childNodes(r));return f.a.F.oa(r,u),f.m(function(){var a,s,p=f.a.c(o());if("string"==typeof p?a=p:(a=f.a.c(p.name),s=f.a.c(p.params)),!a)throw Error("No component name specified");var m=h=++n;f.g.get(a,function(n){if(h===m){if(u(),!n)throw Error("Unknown component '"+a+"'");t(a,n,r);var o=i(n,r,d,s);n=l.createChildContext(o,e,function(e){e.$component=o,e.$componentTemplateNodes=d}),c=o,f.eb(n,r)}})},null,{i:r}),{controlsDescendantBindings:!0}}},f.f.Z.component=!0}();var A={"class":"className","for":"htmlFor"};f.d.attr={update:function(t,i){var n=f.a.c(i())||{};f.a.D(n,function(i,n){n=f.a.c(n);var r=!1===n||null===n||n===e;r&&t.removeAttribute(i),8>=f.a.C&&i in A?(i=A[i],r?t.removeAttribute(i):t[i]=n):r||t.setAttribute(i,n.toString()),"name"===i&&f.a.rc(t,r?"":n.toString())})}},function(){f.d.checked={after:["value","attr"],init:function(t,i,n){function r(){var e=t.checked,r=p?a():e;if(!f.va.Sa()&&(!l||e)){var o=f.l.w(i);if(c){var s=h?o.t():o;d!==r?(e&&(f.a.pa(s,r,!0),f.a.pa(s,d,!1)),d=r):f.a.pa(s,r,e),h&&f.Ba(o)&&o(s)}else f.h.Ea(o,n,"checked",r,!0)}}function o(){var e=f.a.c(i());t.checked=c?0<=f.a.o(e,a()):s?e:a()===e}var a=f.nc(function(){return n.has("checkedValue")?f.a.c(n.get("checkedValue")):n.has("value")?f.a.c(n.get("value")):t.value}),s="checkbox"==t.type,l="radio"==t.type;if(s||l){var u=i(),c=s&&f.a.c(u)instanceof Array,h=!(c&&u.push&&u.splice),d=c?a():e,p=l||c;l&&!t.name&&f.d.uniqueName.init(t,function(){return!0}),f.m(r,null,{i:t}),f.a.p(t,"click",r),f.m(o,null,{i:t}),u=e}}},f.h.ea.checked=!0,f.d.checkedValue={update:function(e,t){e.value=f.a.c(t())}}}(),f.d.css={update:function(e,t){var i=f.a.c(t());null!==i&&"object"==typeof i?f.a.D(i,function(t,i){i=f.a.c(i),f.a.bb(e,t,i)}):(i=f.a.$a(String(i||"")),f.a.bb(e,e.__ko__cssValue,!1),e.__ko__cssValue=i,f.a.bb(e,i,!0))}},f.d.enable={update:function(e,t){var i=f.a.c(t());i&&e.disabled?e.removeAttribute("disabled"):i||e.disabled||(e.disabled=!0)}},f.d.disable={update:function(e,t){f.d.enable.update(e,function(){return!f.a.c(t())})}},f.d.event={init:function(e,t,i,n,r){var o=t()||{};f.a.D(o,function(o){"string"==typeof o&&f.a.p(e,o,function(e){var a,s=t()[o];if(s){try{var l=f.a.V(arguments);n=r.$data,l.unshift(n),a=s.apply(n,l)}finally{!0!==a&&(e.preventDefault?e.preventDefault():e.returnValue=!1)}!1===i.get(o+"Bubble")&&(e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation())}})})}},f.d.foreach={ic:function(e){return function(){var t=e(),i=f.a.zb(t);return i&&"number"!=typeof i.length?(f.a.c(t),{foreach:i.data,as:i.as,includeDestroyed:i.includeDestroyed,afterAdd:i.afterAdd,beforeRemove:i.beforeRemove,afterRender:i.afterRender,beforeMove:i.beforeMove,afterMove:i.afterMove,templateEngine:f.W.sb}):{foreach:t,templateEngine:f.W.sb}}},init:function(e,t){return f.d.template.init(e,f.d.foreach.ic(t))},update:function(e,t,i,n,r){return f.d.template.update(e,f.d.foreach.ic(t),i,n,r)}},f.h.ta.foreach=!1,f.f.Z.foreach=!0,f.d.hasfocus={init:function(e,t,i){function n(n){e.__ko_hasfocusUpdating=!0;var r=e.ownerDocument;if("activeElement"in r){var o;try{o=r.activeElement}catch(a){o=r.body}n=o===e}r=t(),f.h.Ea(r,i,"hasfocus",n,!0),e.__ko_hasfocusLastValue=n,e.__ko_hasfocusUpdating=!1}var r=n.bind(null,!0),o=n.bind(null,!1);f.a.p(e,"focus",r),f.a.p(e,"focusin",r),f.a.p(e,"blur",o),f.a.p(e,"focusout",o)},update:function(e,t){var i=!!f.a.c(t());e.__ko_hasfocusUpdating||e.__ko_hasfocusLastValue===i||(i?e.focus():e.blur(),!i&&e.__ko_hasfocusLastValue&&e.ownerDocument.body.focus(),f.l.w(f.a.Da,null,[e,i?"focusin":"focusout"]))}},f.h.ea.hasfocus=!0,f.d.hasFocus=f.d.hasfocus,f.h.ea.hasFocus=!0,f.d.html={init:function(){return{controlsDescendantBindings:!0}},update:function(e,t){f.a.Cb(e,t())}},m("if"),m("ifnot",!1,!0),m("with",!0,!1,function(e,t){return e.createChildContext(t)});var P={};f.d.options={init:function(e){if("select"!==f.a.A(e))throw Error("options binding applies only to SELECT elements");for(;0<e.length;)e.remove(0);return{controlsDescendantBindings:!0}},update:function(t,i,n){function r(){return f.a.Ka(t.options,function(e){return e.selected})}function o(e,t,i){var n=typeof t;return"function"==n?t(e):"string"==n?e[t]:i}function a(e,i){if(m&&c)f.j.ha(t,f.a.c(n.get("value")),!0);else if(p.length){var r=0<=f.a.o(p,f.j.u(i[0]));f.a.sc(i[0],r),m&&!r&&f.l.w(f.a.Da,null,[t,"change"])}}var s=t.multiple,l=0!=t.length&&s?t.scrollTop:null,u=f.a.c(i()),c=n.get("valueAllowUnset")&&n.has("value"),h=n.get("optionsIncludeDestroyed");i={};var d,p=[];c||(s?p=f.a.fb(r(),f.j.u):0<=t.selectedIndex&&p.push(f.j.u(t.options[t.selectedIndex]))),u&&("undefined"==typeof u.length&&(u=[u]),d=f.a.Ka(u,function(t){return h||t===e||null===t||!f.a.c(t._destroy)}),n.has("optionsCaption")&&(u=f.a.c(n.get("optionsCaption")),null!==u&&u!==e&&d.unshift(P)));var m=!1;i.beforeRemove=function(e){t.removeChild(e)},u=a,n.has("optionsAfterRender")&&"function"==typeof n.get("optionsAfterRender")&&(u=function(t,i){a(0,i),f.l.w(n.get("optionsAfterRender"),null,[i[0],t!==P?t:e])}),f.a.Bb(t,d,function(i,r,a){return a.length&&(p=!c&&a[0].selected?[f.j.u(a[0])]:[],m=!0),r=t.ownerDocument.createElement("option"),i===P?(f.a.Za(r,n.get("optionsCaption")),f.j.ha(r,e)):(a=o(i,n.get("optionsValue"),i),f.j.ha(r,f.a.c(a)),i=o(i,n.get("optionsText"),a),f.a.Za(r,i)),[r]},i,u),f.l.w(function(){c?f.j.ha(t,f.a.c(n.get("value")),!0):(s?p.length&&r().length<p.length:p.length&&0<=t.selectedIndex?f.j.u(t.options[t.selectedIndex])!==p[0]:p.length||0<=t.selectedIndex)&&f.a.Da(t,"change")}),f.a.Nc(t),l&&20<Math.abs(l-t.scrollTop)&&(t.scrollTop=l)}},f.d.options.xb=f.a.e.I(),f.d.selectedOptions={after:["options","foreach"],init:function(e,t,i){ +f.a.p(e,"change",function(){var n=t(),r=[];f.a.q(e.getElementsByTagName("option"),function(e){e.selected&&r.push(f.j.u(e))}),f.h.Ea(n,i,"selectedOptions",r)})},update:function(e,t){if("select"!=f.a.A(e))throw Error("values binding applies only to SELECT elements");var i=f.a.c(t()),n=e.scrollTop;i&&"number"==typeof i.length&&f.a.q(e.getElementsByTagName("option"),function(e){var t=0<=f.a.o(i,f.j.u(e));e.selected!=t&&f.a.sc(e,t)}),e.scrollTop=n}},f.h.ea.selectedOptions=!0,f.d.style={update:function(t,i){var n=f.a.c(i()||{});f.a.D(n,function(i,n){n=f.a.c(n),(null===n||n===e||!1===n)&&(n=""),t.style[i]=n})}},f.d.submit={init:function(e,t,i,n,r){if("function"!=typeof t())throw Error("The value for a submit binding must be a function");f.a.p(e,"submit",function(i){var n,o=t();try{n=o.call(r.$data,e)}finally{!0!==n&&(i.preventDefault?i.preventDefault():i.returnValue=!1)}})}},f.d.text={init:function(){return{controlsDescendantBindings:!0}},update:function(e,t){f.a.Za(e,t())}},f.f.Z.text=!0,function(){if(t&&t.navigator)var i=function(e){return e?parseFloat(e[1]):void 0},n=t.opera&&t.opera.version&&parseInt(t.opera.version()),r=t.navigator.userAgent,o=i(r.match(/^(?:(?!chrome).)*version\/([^ ]*) safari/i)),a=i(r.match(/Firefox\/([^ ]*)/));if(10>f.a.C)var s=f.a.e.I(),l=f.a.e.I(),u=function(e){var t=this.activeElement;(t=t&&f.a.e.get(t,l))&&t(e)},c=function(e,t){var i=e.ownerDocument;f.a.e.get(i,s)||(f.a.e.set(i,s,!0),f.a.p(i,"selectionchange",u)),f.a.e.set(e,l,t)};f.d.textInput={init:function(t,i,r){function s(e,i){f.a.p(t,e,i)}function l(){var n=f.a.c(i());(null===n||n===e)&&(n=""),p!==e&&n===p?f.a.setTimeout(l,4):t.value!==n&&(m=n,t.value=n)}function u(){d||(p=t.value,d=f.a.setTimeout(h,4))}function h(){clearTimeout(d),p=d=e;var n=t.value;m!==n&&(m=n,f.h.Ea(i(),r,"textInput",n))}var d,p,m=t.value,g=9==f.a.C?u:h;10>f.a.C?(s("propertychange",function(e){"value"===e.propertyName&&g(e)}),8==f.a.C&&(s("keyup",h),s("keydown",h)),8<=f.a.C&&(c(t,g),s("dragend",u))):(s("input",h),5>o&&"textarea"===f.a.A(t)?(s("keydown",u),s("paste",u),s("cut",u)):11>n?s("keydown",u):4>a&&(s("DOMAutoComplete",h),s("dragdrop",h),s("drop",h))),s("change",h),f.m(l,null,{i:t})}},f.h.ea.textInput=!0,f.d.textinput={preprocess:function(e,t,i){i("textInput",e)}}}(),f.d.uniqueName={init:function(e,t){if(t()){var i="ko_unique_"+ ++f.d.uniqueName.Ic;f.a.rc(e,i)}}},f.d.uniqueName.Ic=0,f.d.value={after:["options","foreach"],init:function(e,t,i){if("input"!=e.tagName.toLowerCase()||"checkbox"!=e.type&&"radio"!=e.type){var n=["change"],r=i.get("valueUpdate"),o=!1,a=null;r&&("string"==typeof r&&(r=[r]),f.a.ra(n,r),n=f.a.Tb(n));var s=function(){a=null,o=!1;var n=t(),r=f.j.u(e);f.h.Ea(n,i,"value",r)};!f.a.C||"input"!=e.tagName.toLowerCase()||"text"!=e.type||"off"==e.autocomplete||e.form&&"off"==e.form.autocomplete||-1!=f.a.o(n,"propertychange")||(f.a.p(e,"propertychange",function(){o=!0}),f.a.p(e,"focus",function(){o=!1}),f.a.p(e,"blur",function(){o&&s()})),f.a.q(n,function(t){var i=s;f.a.nd(t,"after")&&(i=function(){a=f.j.u(e),f.a.setTimeout(s,0)},t=t.substring(5)),f.a.p(e,t,i)});var l=function(){var n=f.a.c(t()),r=f.j.u(e);if(null!==a&&n===a)f.a.setTimeout(l,0);else if(n!==r)if("select"===f.a.A(e)){var o=i.get("valueAllowUnset"),r=function(){f.j.ha(e,n,o)};r(),o||n===f.j.u(e)?f.a.setTimeout(r,0):f.l.w(f.a.Da,null,[e,"change"])}else f.j.ha(e,n)};f.m(l,null,{i:e})}else f.Ja(e,{checkedValue:t})},update:function(){}},f.h.ea.value=!0,f.d.visible={update:function(e,t){var i=f.a.c(t()),n="none"!=e.style.display;i&&!n?e.style.display="":!i&&n&&(e.style.display="none")}},function(e){f.d[e]={init:function(t,i,n,r,o){return f.d.event.init.call(this,t,function(){var t={};return t[e]=i(),t},n,r,o)}}}("click"),f.O=function(){},f.O.prototype.renderTemplateSource=function(){throw Error("Override renderTemplateSource")},f.O.prototype.createJavaScriptEvaluatorBlock=function(){throw Error("Override createJavaScriptEvaluatorBlock")},f.O.prototype.makeTemplateSource=function(e,t){if("string"==typeof e){t=t||i;var n=t.getElementById(e);if(!n)throw Error("Cannot find template with ID "+e);return new f.v.n(n)}if(1==e.nodeType||8==e.nodeType)return new f.v.qa(e);throw Error("Unknown template type: "+e)},f.O.prototype.renderTemplate=function(e,t,i,n){return e=this.makeTemplateSource(e,n),this.renderTemplateSource(e,t,i,n)},f.O.prototype.isTemplateRewritten=function(e,t){return!1===this.allowTemplateRewriting?!0:this.makeTemplateSource(e,t).data("isRewritten")},f.O.prototype.rewriteTemplate=function(e,t,i){e=this.makeTemplateSource(e,i),t=t(e.text()),e.text(t),e.data("isRewritten",!0)},f.b("templateEngine",f.O),f.Gb=function(){function e(e,t,i,n){e=f.h.yb(e);for(var r=f.h.ta,o=0;o<e.length;o++){var a=e[o].key;if(r.hasOwnProperty(a)){var s=r[a];if("function"==typeof s){if(a=s(e[o].value))throw Error(a)}else if(!s)throw Error("This template engine does not support the '"+a+"' binding within its templates")}}return i="ko.__tr_ambtns(function($context,$element){return(function(){return{ "+f.h.Ua(e,{valueAccessors:!0})+" } })()},'"+i.toLowerCase()+"')",n.createJavaScriptEvaluatorBlock(i)+t}var t=/(<([a-z]+\d*)(?:\s+(?!data-bind\s*=\s*)[a-z0-9\-]+(?:=(?:\"[^\"]*\"|\'[^\']*\'|[^>]*))?)*\s+)data-bind\s*=\s*(["'])([\s\S]*?)\3/gi,i=/\x3c!--\s*ko\b\s*([\s\S]*?)\s*--\x3e/g;return{Oc:function(e,t,i){t.isTemplateRewritten(e,i)||t.rewriteTemplate(e,function(e){return f.Gb.dd(e,t)},i)},dd:function(n,r){return n.replace(t,function(t,i,n,o,a){return e(a,i,n,r)}).replace(i,function(t,i){return e(i,"<!-- ko -->","#comment",r)})},Ec:function(e,t){return f.M.wb(function(i,n){var r=i.nextSibling;r&&r.nodeName.toLowerCase()===t&&f.Ja(r,e,n)})}}}(),f.b("__tr_ambtns",f.Gb.Ec),function(){f.v={},f.v.n=function(e){if(this.n=e){var t=f.a.A(e);this.ab="script"===t?1:"textarea"===t?2:"template"==t&&e.content&&11===e.content.nodeType?3:4}},f.v.n.prototype.text=function(){var e=1===this.ab?"text":2===this.ab?"value":"innerHTML";if(0==arguments.length)return this.n[e];var t=arguments[0];"innerHTML"===e?f.a.Cb(this.n,t):this.n[e]=t};var t=f.a.e.I()+"_";f.v.n.prototype.data=function(e){return 1===arguments.length?f.a.e.get(this.n,t+e):void f.a.e.set(this.n,t+e,arguments[1])};var i=f.a.e.I();f.v.n.prototype.nodes=function(){var t=this.n;return 0==arguments.length?(f.a.e.get(t,i)||{}).jb||(3===this.ab?t.content:4===this.ab?t:e):void f.a.e.set(t,i,{jb:arguments[0]})},f.v.qa=function(e){this.n=e},f.v.qa.prototype=new f.v.n,f.v.qa.prototype.text=function(){if(0==arguments.length){var t=f.a.e.get(this.n,i)||{};return t.Hb===e&&t.jb&&(t.Hb=t.jb.innerHTML),t.Hb}f.a.e.set(this.n,i,{Hb:arguments[0]})},f.b("templateSources",f.v),f.b("templateSources.domElement",f.v.n),f.b("templateSources.anonymousTemplate",f.v.qa)}(),function(){function t(e,t,i){var n;for(t=f.f.nextSibling(t);e&&(n=e)!==t;)e=f.f.nextSibling(n),i(n,e)}function i(e,i){if(e.length){var n=e[0],r=e[e.length-1],o=n.parentNode,a=f.Q.instance,s=a.preprocessNode;if(s){if(t(n,r,function(e,t){var i=e.previousSibling,o=s.call(a,e);o&&(e===n&&(n=o[0]||t),e===r&&(r=o[o.length-1]||i))}),e.length=0,!n)return;n===r?e.push(n):(e.push(n,r),f.a.za(e,o))}t(n,r,function(e){1!==e.nodeType&&8!==e.nodeType||f.Rb(i,e)}),t(n,r,function(e){1!==e.nodeType&&8!==e.nodeType||f.M.yc(e,[i])}),f.a.za(e,o)}}function n(e){return e.nodeType?e:0<e.length?e[0]:null}function r(e,t,r,o,s){s=s||{};var l=(e&&n(e)||r||{}).ownerDocument,u=s.templateEngine||a;if(f.Gb.Oc(r,u,l),r=u.renderTemplate(r,o,s,l),"number"!=typeof r.length||0<r.length&&"number"!=typeof r[0].nodeType)throw Error("Template engine must return an array of DOM nodes");switch(l=!1,t){case"replaceChildren":f.f.da(e,r),l=!0;break;case"replaceNode":f.a.qc(e,r),l=!0;break;case"ignoreTargetNode":break;default:throw Error("Unknown renderMode: "+t)}return l&&(i(r,o),s.afterRender&&f.l.w(s.afterRender,null,[r,o.$data])),r}function o(e,t,i){return f.H(e)?e():"function"==typeof e?e(t,i):e}var a;f.Db=function(t){if(t!=e&&!(t instanceof f.O))throw Error("templateEngine must inherit from ko.templateEngine");a=t},f.Ab=function(t,i,s,l,u){if(s=s||{},(s.templateEngine||a)==e)throw Error("Set a template engine before calling renderTemplate");if(u=u||"replaceChildren",l){var c=n(l);return f.B(function(){var e=i&&i instanceof f.U?i:new f.U(f.a.c(i)),a=o(t,e.$data,e),e=r(l,u,a,e,s);"replaceNode"==u&&(l=e,c=n(l))},null,{wa:function(){return!c||!f.a.nb(c)},i:c&&"replaceNode"==u?c.parentNode:c})}return f.M.wb(function(e){f.Ab(t,i,s,e,"replaceNode")})},f.kd=function(t,n,a,s,l){function u(e,t){i(t,h),a.afterRender&&a.afterRender(t,e),h=null}function c(e,i){h=l.createChildContext(e,a.as,function(e){e.$index=i});var n=o(t,e,h);return r(null,"ignoreTargetNode",n,h,a)}var h;return f.B(function(){var t=f.a.c(n)||[];"undefined"==typeof t.length&&(t=[t]),t=f.a.Ka(t,function(t){return a.includeDestroyed||t===e||null===t||!f.a.c(t._destroy)}),f.l.w(f.a.Bb,null,[s,t,c,a,u])},null,{i:s})};var s=f.a.e.I();f.d.template={init:function(e,t){var i=f.a.c(t());if("string"==typeof i||i.name)f.f.xa(e);else{if("nodes"in i){if(i=i.nodes||[],f.H(i))throw Error('The "nodes" option must be a plain, non-observable array.')}else i=f.f.childNodes(e);i=f.a.jc(i),new f.v.qa(e).nodes(i)}return{controlsDescendantBindings:!0}},update:function(t,i,n,r,o){var a,l=i();i=f.a.c(l),n=!0,r=null,"string"==typeof i?i={}:(l=i.name,"if"in i&&(n=f.a.c(i["if"])),n&&"ifnot"in i&&(n=!f.a.c(i.ifnot)),a=f.a.c(i.data)),"foreach"in i?r=f.kd(l||t,n&&i.foreach||[],i,t,o):n?(o="data"in i?o.createChildContext(a,i.as):o,r=f.Ab(l||t,o,i,t)):f.f.xa(t),o=r,(a=f.a.e.get(t,s))&&"function"==typeof a.k&&a.k(),f.a.e.set(t,s,o&&o.ba()?o:e)}},f.h.ta.template=function(e){return e=f.h.yb(e),1==e.length&&e[0].unknown||f.h.ad(e,"name")?null:"This template engine does not support anonymous templates nested within its templates"},f.f.Z.template=!0}(),f.b("setTemplateEngine",f.Db),f.b("renderTemplate",f.Ab),f.a.dc=function(e,t,i){if(e.length&&t.length){var n,r,o,a,s;for(n=r=0;(!i||i>n)&&(a=e[r]);++r){for(o=0;s=t[o];++o)if(a.value===s.value){a.moved=s.index,s.moved=a.index,t.splice(o,1),n=o=0;break}n+=o}}},f.a.ib=function(){function e(e,t,i,n,r){var o,a,s,l,u,c=Math.min,h=Math.max,d=[],p=e.length,m=t.length,g=m-p||1,v=p+m+1;for(o=0;p>=o;o++)for(l=s,d.push(s=[]),u=c(m,o+g),a=h(0,o-1);u>=a;a++)s[a]=a?o?e[o-1]===t[a-1]?l[a-1]:c(l[a]||v,s[a-1]||v)+1:a+1:o+1;for(c=[],h=[],g=[],o=p,a=m;o||a;)m=d[o][a]-1,a&&m===d[o][a-1]?h.push(c[c.length]={status:i,value:t[--a],index:a}):o&&m===d[o-1][a]?g.push(c[c.length]={status:n,value:e[--o],index:o}):(--a,--o,r.sparse||c.push({status:"retained",value:t[a]}));return f.a.dc(g,h,!r.dontLimitMoves&&10*p),c.reverse()}return function(t,i,n){return n="boolean"==typeof n?{dontLimitMoves:n}:n||{},t=t||[],i=i||[],t.length<i.length?e(t,i,"added","deleted",n):e(i,t,"deleted","added",n)}}(),f.b("utils.compareArrays",f.a.ib),function(){function t(t,i,n,r,o){var a=[],s=f.B(function(){var e=i(n,o,f.a.za(a,t))||[];0<a.length&&(f.a.qc(a,e),r&&f.l.w(r,null,[n,e,o])),a.length=0,f.a.ra(a,e)},null,{i:t,wa:function(){return!f.a.Qb(a)}});return{ca:a,B:s.ba()?s:e}}var i=f.a.e.I(),n=f.a.e.I();f.a.Bb=function(r,o,a,s,l){function u(e,t){w=d[t],_!==t&&(S[e]=w),w.qb(_++),f.a.za(w.ca,r),g.push(w),C.push(w)}function c(e,t){if(e)for(var i=0,n=t.length;n>i;i++)t[i]&&f.a.q(t[i].ca,function(n){e(n,i,t[i].ja)})}o=o||[],s=s||{};var h=f.a.e.get(r,i)===e,d=f.a.e.get(r,i)||[],p=f.a.fb(d,function(e){return e.ja}),m=f.a.ib(p,o,s.dontLimitMoves),g=[],v=0,_=0,y=[],C=[];o=[];for(var w,E,b,S=[],p=[],T=0;E=m[T];T++)switch(b=E.moved,E.status){case"deleted":b===e&&(w=d[v],w.B&&(w.B.k(),w.B=e),f.a.za(w.ca,r).length&&(s.beforeRemove&&(g.push(w),C.push(w),w.ja===n?w=null:o[T]=w),w&&y.push.apply(y,w.ca))),v++;break;case"retained":u(T,v++);break;case"added":b!==e?u(T,b):(w={ja:E.value,qb:f.N(_++)},g.push(w),C.push(w),h||(p[T]=w))}f.a.e.set(r,i,g),c(s.beforeMove,S),f.a.q(y,s.beforeRemove?f.$:f.removeNode);for(var x,T=0,h=f.f.firstChild(r);w=C[T];T++){for(w.ca||f.a.extend(w,t(r,a,w.ja,l,w.qb)),v=0;m=w.ca[v];h=m.nextSibling,x=m,v++)m!==h&&f.f.gc(r,m,x);!w.Wc&&l&&(l(w.ja,w.ca,w.qb),w.Wc=!0)}for(c(s.beforeRemove,o),T=0;T<o.length;++T)o[T]&&(o[T].ja=n);c(s.afterMove,S),c(s.afterAdd,p)}}(),f.b("utils.setDomNodeChildrenFromArrayMapping",f.a.Bb),f.W=function(){this.allowTemplateRewriting=!1},f.W.prototype=new f.O,f.W.prototype.renderTemplateSource=function(e,t,i,n){return(t=(9>f.a.C?0:e.nodes)?e.nodes():null)?f.a.V(t.cloneNode(!0).childNodes):(e=e.text(),f.a.ma(e,n))},f.W.sb=new f.W,f.Db(f.W.sb),f.b("nativeTemplateEngine",f.W),function(){f.vb=function(){var e=this.$c=function(){if(!r||!r.tmpl)return 0;try{if(0<=r.tmpl.tag.tmpl.open.toString().indexOf("__"))return 2}catch(e){}return 1}();this.renderTemplateSource=function(t,n,o,a){if(a=a||i,o=o||{},2>e)throw Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later.");var s=t.data("precompiled");return s||(s=t.text()||"",s=r.template(null,"{{ko_with $item.koBindingContext}}"+s+"{{/ko_with}}"),t.data("precompiled",s)),t=[n.$data],n=r.extend({koBindingContext:n},o.templateOptions),n=r.tmpl(s,t,n),n.appendTo(a.createElement("div")),r.fragments={},n},this.createJavaScriptEvaluatorBlock=function(e){return"{{ko_code ((function() { return "+e+" })()) }}"},this.addTemplate=function(e,t){i.write("<script type='text/html' id='"+e+"'>"+t+"</script>")},e>0&&(r.tmpl.tag.ko_code={open:"__.push($1 || '');"},r.tmpl.tag.ko_with={open:"with($1) {",close:"} "})},f.vb.prototype=new f.O;var e=new f.vb;0<e.$c&&f.Db(e),f.b("jqueryTmplTemplateEngine",f.vb)}()})}()}(),!function(e,t){"use strict";function i(e,t){if(!e||"object"!=typeof e)throw new Error("When calling ko.track, you must pass an object as the first parameter.");var i;return l(t)?(t.deep=t.deep||!1,t.fields=t.fields||Object.getOwnPropertyNames(e),t.lazy=t.lazy||!1,s(e,t.fields,t)):(i=t||Object.getOwnPropertyNames(e),s(e,i,{})),e}function n(e){return e.name?e.name:(e.toString().trim().match(x)||[])[1]}function r(e){return e&&"object"==typeof e&&"Object"===n(e.constructor)}function o(e,i,n){var r=E.isObservable(e),o=!r&&Array.isArray(e),a=r?e:o?E.observableArray(e):E.observable(e);return n[i]=function(){return a},(o||r&&"push"in a)&&d(E,a),{configurable:!0,enumerable:!0,get:a,set:E.isWriteableObservable(a)?a:t}}function a(e,t,i){function n(e,t){return r?t?r(e):r:Array.isArray(e)?(r=E.observableArray(e),d(E,r),r):r=E.observable(e)}if(E.isObservable(e))return o(e,t,i);var r;return i[t]=function(){return n(e)},{configurable:!0,enumerable:!0,get:function(){return n(e)()},set:function(e){n(e,!0)}}}function s(e,t,i){if(t.length){var n=u(e,!0),l={};t.forEach(function(t){if(!(t in n)&&Object.getOwnPropertyDescriptor(e,t).configurable!==!1){var u=e[t];l[t]=(i.lazy?a:o)(u,t,n),i.deep&&r(u)&&s(u,Object.keys(u),i)}}),Object.defineProperties(e,l)}}function l(e){return!!e&&"object"==typeof e&&e.constructor===Object}function u(e,t){b||(b=T());var i=b.get(e);return!i&&t&&(i={},b.set(e,i)),i}function c(e,t){if(b)if(1===arguments.length)b["delete"](e);else{var i=u(e,!1);i&&t.forEach(function(e){delete i[e]})}}function h(e,t,n){var r=this,o={owner:e,deferEvaluation:!0};if("function"==typeof n)o.read=n;else{if("value"in n)throw new Error('For ko.defineProperty, you must not specify a "value" for the property. You must provide a "get" function.');if("function"!=typeof n.get)throw new Error('For ko.defineProperty, the third parameter must be either an evaluator function, or an options object containing a function called "get".');o.read=n.get,o.write=n.set}return e[t]=r.computed(o),i.call(r,e,[t]),e}function d(e,t){var i=null;e.computed(function(){i&&(i.dispose(),i=null);var n=t();n instanceof Array&&(i=p(e,t,n))})}function p(e,t,i){var n=m(e,i);return n.subscribe(t)}function m(e,t){S||(S=T());var i=S.get(t);if(!i){i=new e.subscribable,S.set(t,i);var n={};f(t,i,n),g(e,t,i,n)}return i}function f(e,t,i){["pop","push","reverse","shift","sort","splice","unshift"].forEach(function(n){var r=e[n];e[n]=function(){var e=r.apply(this,arguments);return i.pause!==!0&&t.notifySubscribers(this),e}})}function g(e,t,i,n){["remove","removeAll","destroy","destroyAll","replace"].forEach(function(r){Object.defineProperty(t,r,{enumerable:!1,value:function(){var o;n.pause=!0;try{o=e.observableArray.fn[r].apply(e.observableArray(t),arguments)}finally{n.pause=!1}return i.notifySubscribers(t),o}})})}function v(e,t){if(!e||"object"!=typeof e)return null;var i=u(e,!1);return i&&t in i?i[t]():null}function _(e,t){if(!e||"object"!=typeof e)return!1;var i=u(e,!1);return!!i&&t in i}function y(e,t){var i=v(e,t);i&&i.valueHasMutated()}function C(e){e.track=i,e.untrack=c,e.getObservable=v,e.valueHasMutated=y,e.defineProperty=h,e.es5={getAllObservablesForObject:u,notifyWhenPresentOrFutureArrayValuesMutate:d,isTracked:_}}function w(){if("object"==typeof exports&&"object"==typeof module){E=require("knockout");var t=require("../lib/weakmap");C(E),T=function(){return new t},module.exports=E}else"function"==typeof define&&define.amd?define("KnockoutES5",["knockout"],function(t){return E=t,C(t),T=function(){return new e.WeakMap},t}):"ko"in e&&(E=e.ko,C(e.ko),T=function(){return new e.WeakMap})}var E,b,S,T,x=/^function\s*([^\s(]+)/;w()}(this),void function(e,t,i){function n(e,t,i){return"function"==typeof t&&(i=t,t=r(i).replace(/_$/,"")),u(e,t,{configurable:!0,writable:!0,value:i})}function r(e){return"function"!=typeof e?"":"_name"in e?e._name:"name"in e?e.name:c.call(e).match(p)[1]}function o(e,t){return t._name=e,t}function a(e){function t(t,r){return r||2===arguments.length?n.set(t,r):(r=n.get(t),r===i&&(r=e(t),n.set(t,r))),r}var n=new f;return e||(e=g),t}var s=Object.getOwnPropertyNames,l="object"==typeof window?Object.getOwnPropertyNames(window):[],u=Object.defineProperty,c=Function.prototype.toString,h=Object.create,d=Object.prototype.hasOwnProperty,p=/^\n?function\s?(\w*)?_?\(/,m=function(){function e(){var e=a(),i={};this.unlock=function(n){var r=p(n);if(d.call(r,e))return r[e](i);var o=h(null,t);return u(r,e,{value:function(e){return e===i?o:void 0}}),o}}var t={value:{writable:!0,value:i}},r=h(null),a=function(){var e=Math.random().toString(36).slice(2);return e in r?a():r[e]=e},c=a(),p=function(e){if(d.call(e,c))return e[c];if(!Object.isExtensible(e))throw new TypeError("Object must be extensible");var t=h(null);return u(e,c,{value:t}),t};return n(Object,o("getOwnPropertyNames",function(e){var t,i=Object(e);if(i!==Window.prototype&&"toString"in i&&"[object Window]"===i.toString())try{t=s(e)}catch(n){t=l}else t=s(e);return d.call(e,c)&&t.splice(t.indexOf(c),1),t})),n(e.prototype,o("get",function(e){return this.unlock(e).value})),n(e.prototype,o("set",function(e,t){this.unlock(e).value=t})),e}(),f=function(a){function s(t){return this===e||null==this||this===s.prototype?new s(t):(f(this,new m),void v(this,t))}function l(e){p(e);var n=g(this).get(e);return n===t?i:n}function u(e,n){p(e),g(this).set(e,n===i?t:n)}function c(e){return p(e),g(this).get(e)!==i}function h(e){p(e);var t=g(this),n=t.get(e)!==i;return t.set(e,i),n}function d(){return g(this),"[object WeakMap]"}var p=function(e){if(null==e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("Invalid WeakMap key")},f=function(e,t){var i=a.unlock(e);if(i.value)throw new TypeError("Object is already a WeakMap");i.value=t},g=function(e){var t=a.unlock(e).value;if(!t)throw new TypeError("WeakMap is not generic");return t},v=function(e,t){null!==t&&"object"==typeof t&&"function"==typeof t.forEach&&t.forEach(function(i,n){i instanceof Array&&2===i.length&&u.call(e,t[n][0],t[n][1])})};l._name="get",u._name="set",c._name="has",d._name="toString";var _=(""+Object).split("Object"),y=o("toString",function(){return _[0]+r(this)+_[1]});n(y,y);var C={__proto__:[]}instanceof Array?function(e){e.__proto__=y}:function(e){n(e,y)};return C(s),[d,l,u,c,h].forEach(function(e){n(s.prototype,e),C(e)}),s}(new m),g=Object.create?function(){return Object.create(null)}:function(){return{}};"undefined"!=typeof module?module.exports=f:"undefined"!=typeof exports?exports.WeakMap=f:"WeakMap"in e||(e.WeakMap=f),f.createStorage=a,e.WeakMap&&(e.WeakMap.createStorage=a)}(function(){return this}()),!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define("markdown-it-sanitizer",[],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.markdownitSanitizer=e()}}(function(){return function e(t,i,n){function r(a,s){if(!i[a]){if(!t[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=i[a]={exports:{}};t[a][0].call(c.exports,function(e){var i=t[a][1][e];return r(i?i:e)},c,c.exports,e,t,i,n)}return i[a].exports}for(var o="function"==typeof require&&require,a=0;a<n.length;a++)r(n[a]);return r}({1:[function(e,t,i){"use strict";t.exports=function(e,t){function i(e){var t=a.match(e);return t&&1===t.length&&0===t[0].index&&t[0].lastIndex===e.length?t[0].url:null}function n(e){var t='<a\\shref="([^"<>]*)"(?:\\stitle="([^"<>]*)")?>',n=RegExp(t,"i"),r='<img\\s([^<>]*src="[^"<>]*"[^<>]*)\\s?\\/?>',o=RegExp(r,"i");return e=e.replace(/<[^<>]*>?/gi,function(e){var t,r,a,l,c;if(/(^<->|^<-\s|^<3\s)/.test(e))return e;if(t=e.match(o)){var g=t[1];if(r=i(g.match(/src="([^"<>]*)"/i)[1]),a=g.match(/alt="([^"<>]*)"/i),a=a&&"undefined"!=typeof a[1]?a[1]:"",l=g.match(/title="([^"<>]*)"/i),l=l&&"undefined"!=typeof l[1]?l[1]:"",r&&/^https?:\/\//i.test(r))return""!==h?'<img src="'+r+'" alt="'+a+'" title="'+l+'" class="'+h+'">':'<img src="'+r+'" alt="'+a+'" title="'+l+'">'}return c=p.indexOf("a"),t=e.match(n),t&&(l="undefined"!=typeof t[2]?t[2]:"",r=i(t[1]),r&&/^(?:https?:\/\/|ftp:\/\/|mailto:|xmpp:)/i.test(r))?(d=!0,m[c]+=1,'<a href="'+r+'" title="'+l+'" target="_blank">'):(t=/<\/a>/i.test(e))?(d=!0,m[c]-=1,m[c]<0&&(f[c]=!0),"</a>"):(t=e.match(/<(br|hr)\s?\/?>/i))?"<"+t[1].toLowerCase()+">":(t=e.match(/<(\/?)(b|blockquote|code|em|h[1-6]|li|ol(?: start="\d+")?|p|pre|s|sub|sup|strong|ul)>/i),t&&!/<\/ol start="\d+"/i.test(e)?(d=!0,c=p.indexOf(t[2].toLowerCase().split(" ")[0]),"/"===t[1]?m[c]-=1:m[c]+=1,m[c]<0&&(f[c]=!0),"<"+t[1]+t[2].toLowerCase()+">"):u===!0?"":s(e))})}function r(e){var t,i,r;for(l=0;l<p.length;l++)m[l]=0;for(l=0;l<p.length;l++)f[l]=!1;for(d=!1,i=0;i<e.tokens.length;i++)if("html_block"===e.tokens[i].type&&(e.tokens[i].content=n(e.tokens[i].content)),"inline"===e.tokens[i].type)for(r=e.tokens[i].children,t=0;t<r.length;t++)"html_inline"===r[t].type&&(r[t].content=n(r[t].content))}function o(e){function t(e,t){var i,n;return i="a"===t?RegExp('<a href="[^"<>]*" title="[^"<>]*" target="_blank">',"g"):"ol"===t?/<ol(?: start="\d+")?>/g:RegExp("<"+t+">","g"),n=RegExp("</"+t+">","g"),c===!0?(e=e.replace(i,""),e=e.replace(n,"")):(e=e.replace(i,function(e){return s(e)}),e=e.replace(n,function(e){return s(e)})),e}function i(e){var i;for(i=0;i<p.length;i++)f[i]===!0&&(e=t(e,p[i]));return e}if(d!==!1){var n,r;for(l=0;l<p.length;l++)0!==m[l]&&(f[l]=!0);for(n=0;n<e.tokens.length;n++)if("html_block"!==e.tokens[n].type){if("inline"===e.tokens[n].type)for(r=e.tokens[n].children,l=0;l<r.length;l++)"html_inline"===r[l].type&&(r[l].content=i(r[l].content))}else e.tokens[n].content=i(e.tokens[n].content)}}var a=e.linkify,s=e.utils.escapeHtml;t=t?t:{};var l,u="undefined"!=typeof t.removeUnknown?t.removeUnknown:!1,c="undefined"!=typeof t.removeUnbalanced?t.removeUnbalanced:!1,h="undefined"!=typeof t.imageClass?t.imageClass:"",d=!1,p=["a","b","blockquote","code","em","h1","h2","h3","h4","h5","h6","li","ol","p","pre","s","sub","sup","strong","ul"],m=new Array(p.length),f=new Array(p.length);for(l=0;l<p.length;l++)m[l]=0;for(l=0;l<p.length;l++)f[l]=!1;e.core.ruler.after("linkify","sanitize_inline",r),e.core.ruler.after("sanitize_inline","sanitize_balance",o)}},{}]},{},[1])(1)}),!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define("markdown-it",[],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.markdownit=e()}}(function(){var e;return function t(e,i,n){function r(a,s){if(!i[a]){if(!e[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=i[a]={exports:{}};e[a][0].call(c.exports,function(t){var i=e[a][1][t];return r(i?i:t)},c,c.exports,t,e,i,n)}return i[a].exports}for(var o="function"==typeof require&&require,a=0;a<n.length;a++)r(n[a]);return r}({1:[function(e,t,i){"use strict";t.exports=e("entities/maps/entities.json")},{"entities/maps/entities.json":53}],2:[function(e,t,i){"use strict";t.exports=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","meta","nav","noframes","ol","optgroup","option","p","param","pre","section","source","title","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]},{}],3:[function(e,t,i){"use strict";var n="[a-zA-Z_:][a-zA-Z0-9:._-]*",r="[^\"'=<>`\\x00-\\x20]+",o="'[^']*'",a='"[^"]*"',s="(?:"+r+"|"+o+"|"+a+")",l="(?:\\s+"+n+"(?:\\s*=\\s*"+s+")?)",u="<[A-Za-z][A-Za-z0-9\\-]*"+l+"*\\s*\\/?>",c="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",h="<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->",d="<[?].*?[?]>",p="<![A-Z]+\\s+[^>]*>",m="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",f=new RegExp("^(?:"+u+"|"+c+"|"+h+"|"+d+"|"+p+"|"+m+")"),g=new RegExp("^(?:"+u+"|"+c+")");t.exports.HTML_TAG_RE=f,t.exports.HTML_OPEN_CLOSE_TAG_RE=g},{}],4:[function(e,t,i){"use strict";function n(e){return Object.prototype.toString.call(e)}function r(e){return"[object String]"===n(e)}function o(e,t){return w.call(e,t)}function a(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach(function(t){if(t){if("object"!=typeof t)throw new TypeError(t+"must be object");Object.keys(t).forEach(function(i){e[i]=t[i]})}}),e}function s(e,t,i){return[].concat(e.slice(0,t),i,e.slice(t+1))}function l(e){return!(e>=55296&&57343>=e||e>=64976&&65007>=e||65535===(65535&e)||65534===(65535&e)||e>=0&&8>=e||11===e||e>=14&&31>=e||e>=127&&159>=e||e>1114111)}function u(e){if(e>65535){e-=65536;var t=55296+(e>>10),i=56320+(1023&e);return String.fromCharCode(t,i)}return String.fromCharCode(e)}function c(e,t){var i=0;return o(x,t)?x[t]:35===t.charCodeAt(0)&&T.test(t)&&(i="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10),l(i))?u(i):e}function h(e){return e.indexOf("\\")<0?e:e.replace(E,"$1")}function d(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(S,function(e,t,i){return t?t:c(e,i)})}function p(e){return M[e]}function m(e){return A.test(e)?e.replace(P,p):e}function f(e){return e.replace(D,"\\$&")}function g(e){switch(e){case 9:case 32:return!0}return!1}function v(e){if(e>=8192&&8202>=e)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function _(e){return I.test(e)}function y(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function C(e){return e.trim().replace(/\s+/g," ").toUpperCase()}var w=Object.prototype.hasOwnProperty,E=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,b=/&([a-z#][a-z0-9]{1,31});/gi,S=new RegExp(E.source+"|"+b.source,"gi"),T=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,x=e("./entities"),A=/[&<>"]/,P=/[&<>"]/g,M={"&":"&","<":"<",">":">",'"':"""},D=/[.?*+^$[\]\\(){}|-]/g,I=e("uc.micro/categories/P/regex");i.lib={},i.lib.mdurl=e("mdurl"),i.lib.ucmicro=e("uc.micro"),i.assign=a,i.isString=r,i.has=o,i.unescapeMd=h,i.unescapeAll=d,i.isValidEntityCode=l,i.fromCodePoint=u,i.escapeHtml=m,i.arrayReplaceAt=s,i.isSpace=g,i.isWhiteSpace=v,i.isMdAsciiPunct=y,i.isPunctChar=_,i.escapeRE=f,i.normalizeReference=C},{"./entities":1,mdurl:59,"uc.micro":65,"uc.micro/categories/P/regex":63}],5:[function(e,t,i){"use strict";i.parseLinkLabel=e("./parse_link_label"),i.parseLinkDestination=e("./parse_link_destination"),i.parseLinkTitle=e("./parse_link_title")},{"./parse_link_destination":6,"./parse_link_label":7,"./parse_link_title":8}],6:[function(e,t,i){"use strict";var n=e("../common/utils").isSpace,r=e("../common/utils").unescapeAll;t.exports=function(e,t,i){var o,a,s=0,l=t,u={ok:!1,pos:0,lines:0,str:""};if(60===e.charCodeAt(t)){for(t++;i>t;){if(o=e.charCodeAt(t),10===o||n(o))return u;if(62===o)return u.pos=t+1,u.str=r(e.slice(l+1,t)),u.ok=!0,u;92===o&&i>t+1?t+=2:t++}return u}for(a=0;i>t&&(o=e.charCodeAt(t),32!==o)&&!(32>o||127===o);)if(92===o&&i>t+1)t+=2;else{if(40===o&&(a++,a>1))break;if(41===o&&(a--,0>a))break;t++}return l===t?u:(u.str=r(e.slice(l,t)),u.lines=s,u.pos=t,u.ok=!0,u)}},{"../common/utils":4}],7:[function(e,t,i){"use strict";t.exports=function(e,t,i){var n,r,o,a,s=-1,l=e.posMax,u=e.pos;for(e.pos=t+1,n=1;e.pos<l;){if(o=e.src.charCodeAt(e.pos),93===o&&(n--,0===n)){r=!0;break}if(a=e.pos,e.md.inline.skipToken(e),91===o)if(a===e.pos-1)n++;else if(i)return e.pos=u,-1}return r&&(s=e.pos),e.pos=u,s}},{}],8:[function(e,t,i){"use strict";var n=e("../common/utils").unescapeAll;t.exports=function(e,t,i){var r,o,a=0,s=t,l={ok:!1,pos:0,lines:0,str:""};if(t>=i)return l;if(o=e.charCodeAt(t),34!==o&&39!==o&&40!==o)return l;for(t++,40===o&&(o=41);i>t;){if(r=e.charCodeAt(t),r===o)return l.pos=t+1,l.lines=a,l.str=n(e.slice(s+1,t)),l.ok=!0,l;10===r?a++:92===r&&i>t+1&&(t++,10===e.charCodeAt(t)&&a++),t++}return l}},{"../common/utils":4}],9:[function(e,t,i){"use strict";function n(e){var t=e.trim().toLowerCase();return!v.test(t)||!!_.test(t)}function r(e){var t=m.parse(e,!0);if(t.hostname&&(!t.protocol||y.indexOf(t.protocol)>=0))try{t.hostname=f.toASCII(t.hostname)}catch(i){}return m.encode(m.format(t))}function o(e){var t=m.parse(e,!0);if(t.hostname&&(!t.protocol||y.indexOf(t.protocol)>=0))try{t.hostname=f.toUnicode(t.hostname)}catch(i){}return m.decode(m.format(t))}function a(e,t){return this instanceof a?(t||s.isString(e)||(t=e||{},e="default"),this.inline=new d,this.block=new h,this.core=new c,this.renderer=new u,this.linkify=new p,this.validateLink=n,this.normalizeLink=r,this.normalizeLinkText=o,this.utils=s,this.helpers=l,this.options={},this.configure(e),void(t&&this.set(t))):new a(e,t)}var s=e("./common/utils"),l=e("./helpers"),u=e("./renderer"),c=e("./parser_core"),h=e("./parser_block"),d=e("./parser_inline"),p=e("linkify-it"),m=e("mdurl"),f=e("punycode"),g={"default":e("./presets/default"),zero:e("./presets/zero"),commonmark:e("./presets/commonmark")},v=/^(vbscript|javascript|file|data):/,_=/^data:image\/(gif|png|jpeg|webp);/,y=["http:","https:","mailto:"];a.prototype.set=function(e){return s.assign(this.options,e),this},a.prototype.configure=function(e){var t,i=this;if(s.isString(e)&&(t=e,e=g[t],!e))throw new Error('Wrong `markdown-it` preset "'+t+'", check name');if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&i.set(e.options),e.components&&Object.keys(e.components).forEach(function(t){e.components[t].rules&&i[t].ruler.enableOnly(e.components[t].rules),e.components[t].rules2&&i[t].ruler2.enableOnly(e.components[t].rules2)}),this},a.prototype.enable=function(e,t){var i=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(t){i=i.concat(this[t].ruler.enable(e,!0))},this),i=i.concat(this.inline.ruler2.enable(e,!0));var n=e.filter(function(e){return i.indexOf(e)<0});if(n.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+n);return this},a.prototype.disable=function(e,t){var i=[];Array.isArray(e)||(e=[e]), +["core","block","inline"].forEach(function(t){i=i.concat(this[t].ruler.disable(e,!0))},this),i=i.concat(this.inline.ruler2.disable(e,!0));var n=e.filter(function(e){return i.indexOf(e)<0});if(n.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+n);return this},a.prototype.use=function(e){var t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},a.prototype.parse=function(e,t){var i=new this.core.State(e,this,t);return this.core.process(i),i.tokens},a.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},a.prototype.parseInline=function(e,t){var i=new this.core.State(e,this,t);return i.inlineMode=!0,this.core.process(i),i.tokens},a.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)},t.exports=a},{"./common/utils":4,"./helpers":5,"./parser_block":10,"./parser_core":11,"./parser_inline":12,"./presets/commonmark":13,"./presets/default":14,"./presets/zero":15,"./renderer":16,"linkify-it":54,mdurl:59,punycode:52}],10:[function(e,t,i){"use strict";function n(){this.ruler=new r;for(var e=0;e<o.length;e++)this.ruler.push(o[e][0],o[e][1],{alt:(o[e][2]||[]).slice()})}var r=e("./ruler"),o=[["table",e("./rules_block/table"),["paragraph","reference"]],["code",e("./rules_block/code")],["fence",e("./rules_block/fence"),["paragraph","reference","blockquote","list"]],["blockquote",e("./rules_block/blockquote"),["paragraph","reference","list"]],["hr",e("./rules_block/hr"),["paragraph","reference","blockquote","list"]],["list",e("./rules_block/list"),["paragraph","reference","blockquote"]],["reference",e("./rules_block/reference")],["heading",e("./rules_block/heading"),["paragraph","reference","blockquote"]],["lheading",e("./rules_block/lheading")],["html_block",e("./rules_block/html_block"),["paragraph","reference","blockquote"]],["paragraph",e("./rules_block/paragraph")]];n.prototype.tokenize=function(e,t,i){for(var n,r,o=this.ruler.getRules(""),a=o.length,s=t,l=!1,u=e.md.options.maxNesting;i>s&&(e.line=s=e.skipEmptyLines(s),!(s>=i))&&!(e.sCount[s]<e.blkIndent);){if(e.level>=u){e.line=i;break}for(r=0;a>r&&!(n=o[r](e,s,i,!1));r++);if(e.tight=!l,e.isEmpty(e.line-1)&&(l=!0),s=e.line,i>s&&e.isEmpty(s)){if(l=!0,s++,i>s&&"list"===e.parentType&&e.isEmpty(s))break;e.line=s}}},n.prototype.parse=function(e,t,i,n){var r;e&&(r=new this.State(e,t,i,n),this.tokenize(r,r.line,r.lineMax))},n.prototype.State=e("./rules_block/state_block"),t.exports=n},{"./ruler":17,"./rules_block/blockquote":18,"./rules_block/code":19,"./rules_block/fence":20,"./rules_block/heading":21,"./rules_block/hr":22,"./rules_block/html_block":23,"./rules_block/lheading":24,"./rules_block/list":25,"./rules_block/paragraph":26,"./rules_block/reference":27,"./rules_block/state_block":28,"./rules_block/table":29}],11:[function(e,t,i){"use strict";function n(){this.ruler=new r;for(var e=0;e<o.length;e++)this.ruler.push(o[e][0],o[e][1])}var r=e("./ruler"),o=[["normalize",e("./rules_core/normalize")],["block",e("./rules_core/block")],["inline",e("./rules_core/inline")],["linkify",e("./rules_core/linkify")],["replacements",e("./rules_core/replacements")],["smartquotes",e("./rules_core/smartquotes")]];n.prototype.process=function(e){var t,i,n;for(n=this.ruler.getRules(""),t=0,i=n.length;i>t;t++)n[t](e)},n.prototype.State=e("./rules_core/state_core"),t.exports=n},{"./ruler":17,"./rules_core/block":30,"./rules_core/inline":31,"./rules_core/linkify":32,"./rules_core/normalize":33,"./rules_core/replacements":34,"./rules_core/smartquotes":35,"./rules_core/state_core":36}],12:[function(e,t,i){"use strict";function n(){var e;for(this.ruler=new r,e=0;e<o.length;e++)this.ruler.push(o[e][0],o[e][1]);for(this.ruler2=new r,e=0;e<a.length;e++)this.ruler2.push(a[e][0],a[e][1])}var r=e("./ruler"),o=[["text",e("./rules_inline/text")],["newline",e("./rules_inline/newline")],["escape",e("./rules_inline/escape")],["backticks",e("./rules_inline/backticks")],["strikethrough",e("./rules_inline/strikethrough").tokenize],["emphasis",e("./rules_inline/emphasis").tokenize],["link",e("./rules_inline/link")],["image",e("./rules_inline/image")],["autolink",e("./rules_inline/autolink")],["html_inline",e("./rules_inline/html_inline")],["entity",e("./rules_inline/entity")]],a=[["balance_pairs",e("./rules_inline/balance_pairs")],["strikethrough",e("./rules_inline/strikethrough").postProcess],["emphasis",e("./rules_inline/emphasis").postProcess],["text_collapse",e("./rules_inline/text_collapse")]];n.prototype.skipToken=function(e){var t,i,n=e.pos,r=this.ruler.getRules(""),o=r.length,a=e.md.options.maxNesting,s=e.cache;if("undefined"!=typeof s[n])return void(e.pos=s[n]);if(e.level<a)for(i=0;o>i&&(e.level++,t=r[i](e,!0),e.level--,!t);i++);else e.pos=e.posMax;t||e.pos++,s[n]=e.pos},n.prototype.tokenize=function(e){for(var t,i,n=this.ruler.getRules(""),r=n.length,o=e.posMax,a=e.md.options.maxNesting;e.pos<o;){if(e.level<a)for(i=0;r>i&&!(t=n[i](e,!1));i++);if(t){if(e.pos>=o)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},n.prototype.parse=function(e,t,i,n){var r,o,a,s=new this.State(e,t,i,n);for(this.tokenize(s),o=this.ruler2.getRules(""),a=o.length,r=0;a>r;r++)o[r](s)},n.prototype.State=e("./rules_inline/state_inline"),t.exports=n},{"./ruler":17,"./rules_inline/autolink":37,"./rules_inline/backticks":38,"./rules_inline/balance_pairs":39,"./rules_inline/emphasis":40,"./rules_inline/entity":41,"./rules_inline/escape":42,"./rules_inline/html_inline":43,"./rules_inline/image":44,"./rules_inline/link":45,"./rules_inline/newline":46,"./rules_inline/state_inline":47,"./rules_inline/strikethrough":48,"./rules_inline/text":49,"./rules_inline/text_collapse":50}],13:[function(e,t,i){"use strict";t.exports={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","text_collapse"]}}}},{}],14:[function(e,t,i){"use strict";t.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}}},{}],15:[function(e,t,i){"use strict";t.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","text_collapse"]}}}},{}],16:[function(e,t,i){"use strict";function n(){this.rules=r({},s)}var r=e("./common/utils").assign,o=e("./common/utils").unescapeAll,a=e("./common/utils").escapeHtml,s={};s.code_inline=function(e,t,i,n,r){var o=e[t],s=r.renderAttrs(o);return"<code"+(s?" "+s:"")+">"+a(e[t].content)+"</code>"},s.code_block=function(e,t,i,n,r){var o=e[t],s=r.renderAttrs(o);return"<pre"+(s?" "+s:"")+"><code>"+a(e[t].content)+"</code></pre>\n"},s.fence=function(e,t,i,n,r){var s,l,u,c,h=e[t],d=h.info?o(h.info).trim():"",p="";return d&&(p=d.split(/\s+/g)[0]),s=i.highlight?i.highlight(h.content,p)||a(h.content):a(h.content),0===s.indexOf("<pre")?s+"\n":d?(l=h.attrIndex("class"),u=h.attrs?h.attrs.slice():[],0>l?u.push(["class",i.langPrefix+p]):u[l]+=" "+i.langPrefix+p,c={attrs:u},"<pre><code"+r.renderAttrs(c)+">"+s+"</code></pre>\n"):"<pre><code"+r.renderAttrs(h)+">"+s+"</code></pre>\n"},s.image=function(e,t,i,n,r){var o=e[t];return o.attrs[o.attrIndex("alt")][1]=r.renderInlineAsText(o.children,i,n),r.renderToken(e,t,i)},s.hardbreak=function(e,t,i){return i.xhtmlOut?"<br />\n":"<br>\n"},s.softbreak=function(e,t,i){return i.breaks?i.xhtmlOut?"<br />\n":"<br>\n":"\n"},s.text=function(e,t){return a(e[t].content)},s.html_block=function(e,t){return e[t].content},s.html_inline=function(e,t){return e[t].content},n.prototype.renderAttrs=function(e){var t,i,n;if(!e.attrs)return"";for(n="",t=0,i=e.attrs.length;i>t;t++)n+=" "+a(e.attrs[t][0])+'="'+a(e.attrs[t][1])+'"';return n},n.prototype.renderToken=function(e,t,i){var n,r="",o=!1,a=e[t];return a.hidden?"":(a.block&&-1!==a.nesting&&t&&e[t-1].hidden&&(r+="\n"),r+=(-1===a.nesting?"</":"<")+a.tag,r+=this.renderAttrs(a),0===a.nesting&&i.xhtmlOut&&(r+=" /"),a.block&&(o=!0,1===a.nesting&&t+1<e.length&&(n=e[t+1],"inline"===n.type||n.hidden?o=!1:-1===n.nesting&&n.tag===a.tag&&(o=!1))),r+=o?">\n":">")},n.prototype.renderInline=function(e,t,i){for(var n,r="",o=this.rules,a=0,s=e.length;s>a;a++)n=e[a].type,r+="undefined"!=typeof o[n]?o[n](e,a,t,i,this):this.renderToken(e,a,t);return r},n.prototype.renderInlineAsText=function(e,t,i){for(var n="",r=0,o=e.length;o>r;r++)"text"===e[r].type?n+=e[r].content:"image"===e[r].type&&(n+=this.renderInlineAsText(e[r].children,t,i));return n},n.prototype.render=function(e,t,i){var n,r,o,a="",s=this.rules;for(n=0,r=e.length;r>n;n++)o=e[n].type,a+="inline"===o?this.renderInline(e[n].children,t,i):"undefined"!=typeof s[o]?s[e[n].type](e,n,t,i,this):this.renderToken(e,n,t,i);return a},t.exports=n},{"./common/utils":4}],17:[function(e,t,i){"use strict";function n(){this.__rules__=[],this.__cache__=null}n.prototype.__find__=function(e){for(var t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1},n.prototype.__compile__=function(){var e=this,t=[""];e.__rules__.forEach(function(e){e.enabled&&e.alt.forEach(function(e){t.indexOf(e)<0&&t.push(e)})}),e.__cache__={},t.forEach(function(t){e.__cache__[t]=[],e.__rules__.forEach(function(i){i.enabled&&(t&&i.alt.indexOf(t)<0||e.__cache__[t].push(i.fn))})})},n.prototype.at=function(e,t,i){var n=this.__find__(e),r=i||{};if(-1===n)throw new Error("Parser rule not found: "+e);this.__rules__[n].fn=t,this.__rules__[n].alt=r.alt||[],this.__cache__=null},n.prototype.before=function(e,t,i,n){var r=this.__find__(e),o=n||{};if(-1===r)throw new Error("Parser rule not found: "+e);this.__rules__.splice(r,0,{name:t,enabled:!0,fn:i,alt:o.alt||[]}),this.__cache__=null},n.prototype.after=function(e,t,i,n){var r=this.__find__(e),o=n||{};if(-1===r)throw new Error("Parser rule not found: "+e);this.__rules__.splice(r+1,0,{name:t,enabled:!0,fn:i,alt:o.alt||[]}),this.__cache__=null},n.prototype.push=function(e,t,i){var n=i||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:n.alt||[]}),this.__cache__=null},n.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);var i=[];return e.forEach(function(e){var n=this.__find__(e);if(0>n){if(t)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[n].enabled=!0,i.push(e)},this),this.__cache__=null,i},n.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(e){e.enabled=!1}),this.enable(e,t)},n.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);var i=[];return e.forEach(function(e){var n=this.__find__(e);if(0>n){if(t)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[n].enabled=!1,i.push(e)},this),this.__cache__=null,i},n.prototype.getRules=function(e){return null===this.__cache__&&this.__compile__(),this.__cache__[e]||[]},t.exports=n},{}],18:[function(e,t,i){"use strict";var n=e("../common/utils").isSpace;t.exports=function(e,t,i,r){var o,a,s,l,u,c,h,d,p,m,f,g,v,_,y,C,w=e.bMarks[t]+e.tShift[t],E=e.eMarks[t];if(62!==e.src.charCodeAt(w++))return!1;if(r)return!0;for(32===e.src.charCodeAt(w)&&w++,c=e.blkIndent,e.blkIndent=0,p=m=e.sCount[t]+w-(e.bMarks[t]+e.tShift[t]),u=[e.bMarks[t]],e.bMarks[t]=w;E>w&&(f=e.src.charCodeAt(w),n(f));)9===f?m+=4-m%4:m++,w++;for(a=w>=E,l=[e.sCount[t]],e.sCount[t]=m-p,s=[e.tShift[t]],e.tShift[t]=w-e.bMarks[t],g=e.md.block.ruler.getRules("blockquote"),o=t+1;i>o&&!(e.sCount[o]<c)&&(w=e.bMarks[o]+e.tShift[o],E=e.eMarks[o],!(w>=E));o++)if(62!==e.src.charCodeAt(w++)){if(a)break;for(C=!1,_=0,y=g.length;y>_;_++)if(g[_](e,o,i,!0)){C=!0;break}if(C)break;u.push(e.bMarks[o]),s.push(e.tShift[o]),l.push(e.sCount[o]),e.sCount[o]=-1}else{for(32===e.src.charCodeAt(w)&&w++,p=m=e.sCount[o]+w-(e.bMarks[o]+e.tShift[o]),u.push(e.bMarks[o]),e.bMarks[o]=w;E>w&&(f=e.src.charCodeAt(w),n(f));)9===f?m+=4-m%4:m++,w++;a=w>=E,l.push(e.sCount[o]),e.sCount[o]=m-p,s.push(e.tShift[o]),e.tShift[o]=w-e.bMarks[o]}for(h=e.parentType,e.parentType="blockquote",v=e.push("blockquote_open","blockquote",1),v.markup=">",v.map=d=[t,0],e.md.block.tokenize(e,t,o),v=e.push("blockquote_close","blockquote",-1),v.markup=">",e.parentType=h,d[1]=e.line,_=0;_<s.length;_++)e.bMarks[_+t]=u[_],e.tShift[_+t]=s[_],e.sCount[_+t]=l[_];return e.blkIndent=c,!0}},{"../common/utils":4}],19:[function(e,t,i){"use strict";t.exports=function(e,t,i){var n,r,o,a=0;if(e.sCount[t]-e.blkIndent<4)return!1;for(r=n=t+1;i>n;)if(e.isEmpty(n)){if(a++,a>=2&&"list"===e.parentType)break;n++}else{if(a=0,!(e.sCount[n]-e.blkIndent>=4))break;n++,r=n}return e.line=r,o=e.push("code_block","code",0),o.content=e.getLines(t,r,4+e.blkIndent,!0),o.map=[t,e.line],!0}},{}],20:[function(e,t,i){"use strict";t.exports=function(e,t,i,n){var r,o,a,s,l,u,c,h=!1,d=e.bMarks[t]+e.tShift[t],p=e.eMarks[t];if(d+3>p)return!1;if(r=e.src.charCodeAt(d),126!==r&&96!==r)return!1;if(l=d,d=e.skipChars(d,r),o=d-l,3>o)return!1;if(c=e.src.slice(l,d),a=e.src.slice(d,p),a.indexOf("`")>=0)return!1;if(n)return!0;for(s=t;s++,!(s>=i||(d=l=e.bMarks[s]+e.tShift[s],p=e.eMarks[s],p>d&&e.sCount[s]<e.blkIndent));)if(e.src.charCodeAt(d)===r&&!(e.sCount[s]-e.blkIndent>=4||(d=e.skipChars(d,r),o>d-l||(d=e.skipSpaces(d),p>d)))){h=!0;break}return o=e.sCount[t],e.line=s+(h?1:0),u=e.push("fence","code",0),u.info=a,u.content=e.getLines(t+1,s,o,!0),u.markup=c,u.map=[t,e.line],!0}},{}],21:[function(e,t,i){"use strict";var n=e("../common/utils").isSpace;t.exports=function(e,t,i,r){var o,a,s,l,u=e.bMarks[t]+e.tShift[t],c=e.eMarks[t];if(o=e.src.charCodeAt(u),35!==o||u>=c)return!1;for(a=1,o=e.src.charCodeAt(++u);35===o&&c>u&&6>=a;)a++,o=e.src.charCodeAt(++u);return!(a>6||c>u&&32!==o||!r&&(c=e.skipSpacesBack(c,u),s=e.skipCharsBack(c,35,u),s>u&&n(e.src.charCodeAt(s-1))&&(c=s),e.line=t+1,l=e.push("heading_open","h"+String(a),1),l.markup="########".slice(0,a),l.map=[t,e.line],l=e.push("inline","",0),l.content=e.src.slice(u,c).trim(),l.map=[t,e.line],l.children=[],l=e.push("heading_close","h"+String(a),-1),l.markup="########".slice(0,a),0))}},{"../common/utils":4}],22:[function(e,t,i){"use strict";var n=e("../common/utils").isSpace;t.exports=function(e,t,i,r){var o,a,s,l,u=e.bMarks[t]+e.tShift[t],c=e.eMarks[t];if(o=e.src.charCodeAt(u++),42!==o&&45!==o&&95!==o)return!1;for(a=1;c>u;){if(s=e.src.charCodeAt(u++),s!==o&&!n(s))return!1;s===o&&a++}return!(3>a||!r&&(e.line=t+1,l=e.push("hr","hr",0),l.map=[t,e.line],l.markup=Array(a+1).join(String.fromCharCode(o)),0))}},{"../common/utils":4}],23:[function(e,t,i){"use strict";var n=e("../common/html_blocks"),r=e("../common/html_re").HTML_OPEN_CLOSE_TAG_RE,o=[[/^<(script|pre|style)(?=(\s|>|$))/i,/<\/(script|pre|style)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+n.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(r.source+"\\s*$"),/^$/,!1]];t.exports=function(e,t,i,n){var r,a,s,l,u=e.bMarks[t]+e.tShift[t],c=e.eMarks[t];if(!e.md.options.html)return!1;if(60!==e.src.charCodeAt(u))return!1;for(l=e.src.slice(u,c),r=0;r<o.length&&!o[r][0].test(l);r++);if(r===o.length)return!1;if(n)return o[r][2];if(a=t+1,!o[r][1].test(l))for(;i>a&&!(e.sCount[a]<e.blkIndent);a++)if(u=e.bMarks[a]+e.tShift[a],c=e.eMarks[a],l=e.src.slice(u,c),o[r][1].test(l)){0!==l.length&&a++;break}return e.line=a,s=e.push("html_block","",0),s.map=[t,a],s.content=e.getLines(t,a,e.blkIndent,!0),!0}},{"../common/html_blocks":2,"../common/html_re":3}],24:[function(e,t,i){"use strict";t.exports=function(e,t,i){for(var n,r,o,a,s,l,u,c,h,d=t+1,p=e.md.block.ruler.getRules("paragraph");i>d&&!e.isEmpty(d);d++)if(!(e.sCount[d]-e.blkIndent>3)){if(e.sCount[d]>=e.blkIndent&&(l=e.bMarks[d]+e.tShift[d],u=e.eMarks[d],u>l&&(h=e.src.charCodeAt(l),(45===h||61===h)&&(l=e.skipChars(l,h),l=e.skipSpaces(l),l>=u)))){c=61===h?1:2;break}if(!(e.sCount[d]<0)){for(r=!1,o=0,a=p.length;a>o;o++)if(p[o](e,d,i,!0)){r=!0;break}if(r)break}}return!!c&&(n=e.getLines(t,d,e.blkIndent,!1).trim(),e.line=d+1,s=e.push("heading_open","h"+String(c),1),s.markup=String.fromCharCode(h),s.map=[t,e.line],s=e.push("inline","",0),s.content=n,s.map=[t,e.line-1],s.children=[],s=e.push("heading_close","h"+String(c),-1),s.markup=String.fromCharCode(h),!0)}},{}],25:[function(e,t,i){"use strict";function n(e,t){var i,n,r,o;return n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t],i=e.src.charCodeAt(n++),42!==i&&45!==i&&43!==i?-1:r>n&&(o=e.src.charCodeAt(n),!a(o))?-1:n}function r(e,t){var i,n=e.bMarks[t]+e.tShift[t],r=n,o=e.eMarks[t];if(r+1>=o)return-1;if(i=e.src.charCodeAt(r++),48>i||i>57)return-1;for(;;){if(r>=o)return-1;if(i=e.src.charCodeAt(r++),!(i>=48&&57>=i)){if(41===i||46===i)break;return-1}if(r-n>=10)return-1}return o>r&&(i=e.src.charCodeAt(r),!a(i))?-1:r}function o(e,t){var i,n,r=e.level+2;for(i=t+2,n=e.tokens.length-2;n>i;i++)e.tokens[i].level===r&&"paragraph_open"===e.tokens[i].type&&(e.tokens[i+2].hidden=!0,e.tokens[i].hidden=!0,i+=2)}var a=e("../common/utils").isSpace;t.exports=function(e,t,i,s){var l,u,c,h,d,p,m,f,g,v,_,y,C,w,E,b,S,T,x,A,P,M,D,I,R,O,L,N,F=!0;if((_=r(e,t))>=0)T=!0;else{if(!((_=n(e,t))>=0))return!1;T=!1}if(S=e.src.charCodeAt(_-1),s)return!0;for(A=e.tokens.length,T?(v=e.bMarks[t]+e.tShift[t],b=Number(e.src.substr(v,_-v-1)),R=e.push("ordered_list_open","ol",1),1!==b&&(R.attrs=[["start",b]])):R=e.push("bullet_list_open","ul",1),R.map=M=[t,0],R.markup=String.fromCharCode(S),l=t,P=!1,I=e.md.block.ruler.getRules("list");i>l;){for(C=_,w=e.eMarks[l],u=c=e.sCount[l]+_-(e.bMarks[t]+e.tShift[t]);w>C&&(y=e.src.charCodeAt(C),a(y));)9===y?c+=4-c%4:c++,C++;if(x=C,E=x>=w?1:c-u,E>4&&(E=1),h=u+E,R=e.push("list_item_open","li",1),R.markup=String.fromCharCode(S),R.map=D=[t,0],p=e.blkIndent,f=e.tight,d=e.tShift[t],m=e.sCount[t],g=e.parentType,e.blkIndent=h,e.tight=!0,e.parentType="list",e.tShift[t]=x-e.bMarks[t],e.sCount[t]=c,x>=w&&e.isEmpty(t+1)?e.line=Math.min(e.line+2,i):e.md.block.tokenize(e,t,i,!0),e.tight&&!P||(F=!1),P=e.line-t>1&&e.isEmpty(e.line-1),e.blkIndent=p,e.tShift[t]=d,e.sCount[t]=m,e.tight=f,e.parentType=g,R=e.push("list_item_close","li",-1),R.markup=String.fromCharCode(S),l=t=e.line,D[1]=l,x=e.bMarks[t],l>=i)break;if(e.isEmpty(l))break;if(e.sCount[l]<e.blkIndent)break;for(N=!1,O=0,L=I.length;L>O;O++)if(I[O](e,l,i,!0)){N=!0;break}if(N)break;if(T){if(_=r(e,l),0>_)break}else if(_=n(e,l),0>_)break;if(S!==e.src.charCodeAt(_-1))break}return R=T?e.push("ordered_list_close","ol",-1):e.push("bullet_list_close","ul",-1),R.markup=String.fromCharCode(S),M[1]=l,e.line=l,F&&o(e,A),!0}},{"../common/utils":4}],26:[function(e,t,i){"use strict";t.exports=function(e,t){for(var i,n,r,o,a,s=t+1,l=e.md.block.ruler.getRules("paragraph"),u=e.lineMax;u>s&&!e.isEmpty(s);s++)if(!(e.sCount[s]-e.blkIndent>3||e.sCount[s]<0)){for(n=!1,r=0,o=l.length;o>r;r++)if(l[r](e,s,u,!0)){n=!0;break}if(n)break}return i=e.getLines(t,s,e.blkIndent,!1).trim(),e.line=s,a=e.push("paragraph_open","p",1),a.map=[t,e.line],a=e.push("inline","",0),a.content=i,a.map=[t,e.line],a.children=[],a=e.push("paragraph_close","p",-1),!0}},{}],27:[function(e,t,i){"use strict";var n=e("../helpers/parse_link_destination"),r=e("../helpers/parse_link_title"),o=e("../common/utils").normalizeReference,a=e("../common/utils").isSpace;t.exports=function(e,t,i,s){var l,u,c,h,d,p,m,f,g,v,_,y,C,w,E,b=0,S=e.bMarks[t]+e.tShift[t],T=e.eMarks[t],x=t+1;if(91!==e.src.charCodeAt(S))return!1;for(;++S<T;)if(93===e.src.charCodeAt(S)&&92!==e.src.charCodeAt(S-1)){if(S+1===T)return!1;if(58!==e.src.charCodeAt(S+1))return!1;break}for(h=e.lineMax,w=e.md.block.ruler.getRules("reference");h>x&&!e.isEmpty(x);x++)if(!(e.sCount[x]-e.blkIndent>3||e.sCount[x]<0)){for(C=!1,p=0,m=w.length;m>p;p++)if(w[p](e,x,h,!0)){C=!0;break}if(C)break}for(y=e.getLines(t,x,e.blkIndent,!1).trim(),T=y.length,S=1;T>S;S++){if(l=y.charCodeAt(S),91===l)return!1;if(93===l){g=S;break}10===l?b++:92===l&&(S++,T>S&&10===y.charCodeAt(S)&&b++)}if(0>g||58!==y.charCodeAt(g+1))return!1;for(S=g+2;T>S;S++)if(l=y.charCodeAt(S),10===l)b++;else if(!a(l))break;if(v=n(y,S,T),!v.ok)return!1;if(d=e.md.normalizeLink(v.str),!e.md.validateLink(d))return!1;for(S=v.pos,b+=v.lines,u=S,c=b,_=S;T>S;S++)if(l=y.charCodeAt(S),10===l)b++;else if(!a(l))break;for(v=r(y,S,T),T>S&&_!==S&&v.ok?(E=v.str,S=v.pos,b+=v.lines):(E="",S=u,b=c);T>S&&(l=y.charCodeAt(S),a(l));)S++;if(T>S&&10!==y.charCodeAt(S)&&E)for(E="",S=u,b=c;T>S&&(l=y.charCodeAt(S),a(l));)S++;return!(T>S&&10!==y.charCodeAt(S)||!(f=o(y.slice(1,g)))||!s&&("undefined"==typeof e.env.references&&(e.env.references={}),"undefined"==typeof e.env.references[f]&&(e.env.references[f]={title:E,href:d}),e.line=t+b+1,0))}},{"../common/utils":4,"../helpers/parse_link_destination":6,"../helpers/parse_link_title":8}],28:[function(e,t,i){"use strict";function n(e,t,i,n){var r,a,s,l,u,c,h,d;for(this.src=e,this.md=t,this.env=i,this.tokens=n,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.parentType="root",this.ddIndent=-1,this.level=0,this.result="",a=this.src,d=!1,s=l=c=h=0,u=a.length;u>l;l++){if(r=a.charCodeAt(l),!d){if(o(r)){c++,9===r?h+=4-h%4:h++;continue}d=!0}10!==r&&l!==u-1||(10!==r&&l++,this.bMarks.push(s),this.eMarks.push(l),this.tShift.push(c),this.sCount.push(h),d=!1,c=0,h=0,s=l+1)}this.bMarks.push(a.length),this.eMarks.push(a.length),this.tShift.push(0),this.sCount.push(0),this.lineMax=this.bMarks.length-1}var r=e("../token"),o=e("../common/utils").isSpace;n.prototype.push=function(e,t,i){var n=new r(e,t,i);return n.block=!0,0>i&&this.level--,n.level=this.level,i>0&&this.level++,this.tokens.push(n),n},n.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},n.prototype.skipEmptyLines=function(e){for(var t=this.lineMax;t>e&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e},n.prototype.skipSpaces=function(e){for(var t,i=this.src.length;i>e&&(t=this.src.charCodeAt(e),o(t));e++);return e},n.prototype.skipSpacesBack=function(e,t){if(t>=e)return e;for(;e>t;)if(!o(this.src.charCodeAt(--e)))return e+1;return e},n.prototype.skipChars=function(e,t){for(var i=this.src.length;i>e&&this.src.charCodeAt(e)===t;e++);return e},n.prototype.skipCharsBack=function(e,t,i){if(i>=e)return e;for(;e>i;)if(t!==this.src.charCodeAt(--e))return e+1;return e},n.prototype.getLines=function(e,t,i,n){var r,a,s,l,u,c,h,d=e;if(e>=t)return"";for(c=new Array(t-e),r=0;t>d;d++,r++){for(a=0,h=l=this.bMarks[d],u=t>d+1||n?this.eMarks[d]+1:this.eMarks[d];u>l&&i>a;){if(s=this.src.charCodeAt(l),o(s))9===s?a+=4-a%4:a++;else{if(!(l-h<this.tShift[d]))break;a++}l++}c[r]=this.src.slice(l,u)}return c.join("")},n.prototype.Token=r,t.exports=n},{"../common/utils":4,"../token":51}],29:[function(e,t,i){"use strict";function n(e,t){var i=e.bMarks[t]+e.blkIndent,n=e.eMarks[t];return e.src.substr(i,n-i)}function r(e){var t,i=[],n=0,r=e.length,o=0,a=0,s=!1,l=0;for(t=e.charCodeAt(n);r>n;)96===t&&o%2===0?(s=!s,l=n):124!==t||o%2!==0||s?92===t?o++:o=0:(i.push(e.substring(a,n)),a=n+1),n++,n===r&&s&&(s=!1,n=l+1),t=e.charCodeAt(n);return i.push(e.substring(a)),i}t.exports=function(e,t,i,o){var a,s,l,u,c,h,d,p,m,f,g,v;if(t+2>i)return!1;if(c=t+1,e.sCount[c]<e.blkIndent)return!1;if(l=e.bMarks[c]+e.tShift[c],l>=e.eMarks[c])return!1;if(a=e.src.charCodeAt(l),124!==a&&45!==a&&58!==a)return!1;if(s=n(e,t+1),!/^[-:| ]+$/.test(s))return!1;for(h=s.split("|"),m=[],u=0;u<h.length;u++){if(f=h[u].trim(),!f){if(0===u||u===h.length-1)continue;return!1}if(!/^:?-+:?$/.test(f))return!1;58===f.charCodeAt(f.length-1)?m.push(58===f.charCodeAt(0)?"center":"right"):58===f.charCodeAt(0)?m.push("left"):m.push("")}if(s=n(e,t).trim(),-1===s.indexOf("|"))return!1;if(h=r(s.replace(/^\||\|$/g,"")),d=h.length,d>m.length)return!1;if(o)return!0;for(p=e.push("table_open","table",1),p.map=g=[t,0],p=e.push("thead_open","thead",1),p.map=[t,t+1],p=e.push("tr_open","tr",1),p.map=[t,t+1],u=0;u<h.length;u++)p=e.push("th_open","th",1),p.map=[t,t+1],m[u]&&(p.attrs=[["style","text-align:"+m[u]]]),p=e.push("inline","",0),p.content=h[u].trim(),p.map=[t,t+1],p.children=[],p=e.push("th_close","th",-1);for(p=e.push("tr_close","tr",-1),p=e.push("thead_close","thead",-1),p=e.push("tbody_open","tbody",1),p.map=v=[t+2,0],c=t+2;i>c&&!(e.sCount[c]<e.blkIndent)&&(s=n(e,c),-1!==s.indexOf("|"));c++){for(h=r(s.replace(/^\||\|\s*$/g,"")),p=e.push("tr_open","tr",1),u=0;d>u;u++)p=e.push("td_open","td",1),m[u]&&(p.attrs=[["style","text-align:"+m[u]]]),p=e.push("inline","",0),p.content=h[u]?h[u].trim():"",p.children=[],p=e.push("td_close","td",-1);p=e.push("tr_close","tr",-1)}return p=e.push("tbody_close","tbody",-1),p=e.push("table_close","table",-1),g[1]=v[1]=c,e.line=c,!0}},{}],30:[function(e,t,i){"use strict";t.exports=function(e){var t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}},{}],31:[function(e,t,i){"use strict";t.exports=function(e){var t,i,n,r=e.tokens;for(i=0,n=r.length;n>i;i++)t=r[i],"inline"===t.type&&e.md.inline.parse(t.content,e.md,e.env,t.children)}},{}],32:[function(e,t,i){"use strict";function n(e){return/^<a[>\s]/i.test(e)}function r(e){return/^<\/a\s*>/i.test(e)}var o=e("../common/utils").arrayReplaceAt;t.exports=function(e){var t,i,a,s,l,u,c,h,d,p,m,f,g,v,_,y,C,w=e.tokens;if(e.md.options.linkify)for(i=0,a=w.length;a>i;i++)if("inline"===w[i].type&&e.md.linkify.pretest(w[i].content))for(s=w[i].children,g=0,t=s.length-1;t>=0;t--)if(u=s[t],"link_close"!==u.type){if("html_inline"===u.type&&(n(u.content)&&g>0&&g--,r(u.content)&&g++),!(g>0)&&"text"===u.type&&e.md.linkify.test(u.content)){for(d=u.content,C=e.md.linkify.match(d),c=[],f=u.level,m=0,h=0;h<C.length;h++)v=C[h].url,_=e.md.normalizeLink(v),e.md.validateLink(_)&&(y=C[h].text,y=C[h].schema?"mailto:"!==C[h].schema||/^mailto:/i.test(y)?e.md.normalizeLinkText(y):e.md.normalizeLinkText("mailto:"+y).replace(/^mailto:/,""):e.md.normalizeLinkText("http://"+y).replace(/^http:\/\//,""),p=C[h].index,p>m&&(l=new e.Token("text","",0),l.content=d.slice(m,p),l.level=f,c.push(l)),l=new e.Token("link_open","a",1),l.attrs=[["href",_]],l.level=f++,l.markup="linkify",l.info="auto",c.push(l),l=new e.Token("text","",0),l.content=y,l.level=f,c.push(l),l=new e.Token("link_close","a",-1),l.level=--f,l.markup="linkify",l.info="auto",c.push(l),m=C[h].lastIndex);m<d.length&&(l=new e.Token("text","",0),l.content=d.slice(m),l.level=f,c.push(l)),w[i].children=s=o(s,t,c)}}else for(t--;s[t].level!==u.level&&"link_open"!==s[t].type;)t--}},{"../common/utils":4}],33:[function(e,t,i){"use strict";var n=/\r[\n\u0085]?|[\u2424\u2028\u0085]/g,r=/\u0000/g;t.exports=function(e){var t;t=e.src.replace(n,"\n"),t=t.replace(r,"�"),e.src=t}},{}],34:[function(e,t,i){"use strict";function n(e,t){return u[t.toLowerCase()]}function r(e){var t,i;for(t=e.length-1;t>=0;t--)i=e[t],"text"===i.type&&(i.content=i.content.replace(l,n))}function o(e){var t,i;for(t=e.length-1;t>=0;t--)i=e[t],"text"===i.type&&a.test(i.content)&&(i.content=i.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])\u2026/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---([^-]|$)/gm,"$1—$2").replace(/(^|\s)--(\s|$)/gm,"$1–$2").replace(/(^|[^-\s])--([^-\s]|$)/gm,"$1–$2"))}var a=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,s=/\((c|tm|r|p)\)/i,l=/\((c|tm|r|p)\)/gi,u={c:"©",r:"®",p:"§",tm:"™"};t.exports=function(e){var t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)"inline"===e.tokens[t].type&&(s.test(e.tokens[t].content)&&r(e.tokens[t].children),a.test(e.tokens[t].content)&&o(e.tokens[t].children))}},{}],35:[function(e,t,i){"use strict";function n(e,t,i){return e.substr(0,t)+i+e.substr(t+1)}function r(e,t){var i,r,l,h,d,p,m,f,g,v,_,y,C,w,E,b,S,T,x,A,P;for(x=[],i=0;i<e.length;i++){for(r=e[i],m=e[i].level,S=x.length-1;S>=0&&!(x[S].level<=m);S--);if(x.length=S+1,"text"===r.type){l=r.content,d=0,p=l.length;e:for(;p>d&&(u.lastIndex=d,h=u.exec(l));){if(E=b=!0,d=h.index+1,T="'"===h[0],g=32,h.index-1>=0)g=l.charCodeAt(h.index-1);else for(S=i-1;S>=0;S--)if("text"===e[S].type){g=e[S].content.charCodeAt(e[S].content.length-1);break}if(v=32,p>d)v=l.charCodeAt(d);else for(S=i+1;S<e.length;S++)if("text"===e[S].type){v=e[S].content.charCodeAt(0);break}if(_=s(g)||a(String.fromCharCode(g)),y=s(v)||a(String.fromCharCode(v)),C=o(g),w=o(v),w?E=!1:y&&(C||_||(E=!1)),C?b=!1:_&&(w||y||(b=!1)),34===v&&'"'===h[0]&&g>=48&&57>=g&&(b=E=!1),E&&b&&(E=!1,b=y),E||b){if(b)for(S=x.length-1;S>=0&&(f=x[S],!(x[S].level<m));S--)if(f.single===T&&x[S].level===m){f=x[S],T?(A=t.md.options.quotes[2],P=t.md.options.quotes[3]):(A=t.md.options.quotes[0],P=t.md.options.quotes[1]),r.content=n(r.content,h.index,P),e[f.token].content=n(e[f.token].content,f.pos,A),d+=P.length-1,f.token===i&&(d+=A.length-1),l=r.content,p=l.length,x.length=S;continue e}E?x.push({token:i,pos:h.index,single:T,level:m}):b&&T&&(r.content=n(r.content,h.index,c))}else T&&(r.content=n(r.content,h.index,c))}}}}var o=e("../common/utils").isWhiteSpace,a=e("../common/utils").isPunctChar,s=e("../common/utils").isMdAsciiPunct,l=/['"]/,u=/['"]/g,c="’";t.exports=function(e){var t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)"inline"===e.tokens[t].type&&l.test(e.tokens[t].content)&&r(e.tokens[t].children,e)}},{"../common/utils":4}],36:[function(e,t,i){"use strict";function n(e,t,i){this.src=e,this.env=i,this.tokens=[],this.inlineMode=!1,this.md=t}var r=e("../token");n.prototype.Token=r,t.exports=n},{"../token":51}],37:[function(e,t,i){"use strict";var n=/^<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/,r=/^<([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)>/;t.exports=function(e,t){var i,o,a,s,l,u,c=e.pos;return 60===e.src.charCodeAt(c)&&(i=e.src.slice(c),!(i.indexOf(">")<0||(r.test(i)?(o=i.match(r),s=o[0].slice(1,-1),l=e.md.normalizeLink(s),!e.md.validateLink(l)||(t||(u=e.push("link_open","a",1),u.attrs=[["href",l]],u.markup="autolink",u.info="auto",u=e.push("text","",0),u.content=e.md.normalizeLinkText(s),u=e.push("link_close","a",-1),u.markup="autolink",u.info="auto"),e.pos+=o[0].length,0)):!n.test(i)||(a=i.match(n),s=a[0].slice(1,-1),l=e.md.normalizeLink("mailto:"+s),!e.md.validateLink(l)||(t||(u=e.push("link_open","a",1),u.attrs=[["href",l]],u.markup="autolink",u.info="auto",u=e.push("text","",0),u.content=e.md.normalizeLinkText(s),u=e.push("link_close","a",-1),u.markup="autolink",u.info="auto"),e.pos+=a[0].length,0)))))}},{}],38:[function(e,t,i){"use strict";t.exports=function(e,t){var i,n,r,o,a,s,l=e.pos,u=e.src.charCodeAt(l);if(96!==u)return!1;for(i=l,l++,n=e.posMax;n>l&&96===e.src.charCodeAt(l);)l++;for(r=e.src.slice(i,l),o=a=l;-1!==(o=e.src.indexOf("`",a));){for(a=o+1;n>a&&96===e.src.charCodeAt(a);)a++;if(a-o===r.length)return t||(s=e.push("code_inline","code",0),s.markup=r,s.content=e.src.slice(l,o).replace(/[ \n]+/g," ").trim()),e.pos=a,!0}return t||(e.pending+=r),e.pos+=r.length,!0}},{}],39:[function(e,t,i){"use strict";t.exports=function(e){var t,i,n,r,o=e.delimiters,a=e.delimiters.length;for(t=0;a>t;t++)if(n=o[t],n.close)for(i=t-n.jump-1;i>=0;){if(r=o[i],r.open&&r.marker===n.marker&&r.end<0&&r.level===n.level){n.jump=t-i,n.open=!1,r.end=t,r.jump=0;break}i-=r.jump+1}}},{}],40:[function(e,t,i){"use strict";t.exports.tokenize=function(e,t){var i,n,r,o=e.pos,a=e.src.charCodeAt(o);if(t)return!1;if(95!==a&&42!==a)return!1;for(n=e.scanDelims(e.pos,42===a),i=0;i<n.length;i++)r=e.push("text","",0),r.content=String.fromCharCode(a),e.delimiters.push({marker:a,jump:i,token:e.tokens.length-1,level:e.level,end:-1,open:n.can_open,close:n.can_close});return e.pos+=n.length, +!0},t.exports.postProcess=function(e){var t,i,n,r,o,a,s=e.delimiters,l=e.delimiters.length;for(t=0;l>t;t++)i=s[t],95!==i.marker&&42!==i.marker||-1!==i.end&&(n=s[i.end],a=l>t+1&&s[t+1].end===i.end-1&&s[t+1].token===i.token+1&&s[i.end-1].token===n.token-1&&s[t+1].marker===i.marker,o=String.fromCharCode(i.marker),r=e.tokens[i.token],r.type=a?"strong_open":"em_open",r.tag=a?"strong":"em",r.nesting=1,r.markup=a?o+o:o,r.content="",r=e.tokens[n.token],r.type=a?"strong_close":"em_close",r.tag=a?"strong":"em",r.nesting=-1,r.markup=a?o+o:o,r.content="",a&&(e.tokens[s[t+1].token].content="",e.tokens[s[i.end-1].token].content="",t++))}},{}],41:[function(e,t,i){"use strict";var n=e("../common/entities"),r=e("../common/utils").has,o=e("../common/utils").isValidEntityCode,a=e("../common/utils").fromCodePoint,s=/^&#((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i,l=/^&([a-z][a-z0-9]{1,31});/i;t.exports=function(e,t){var i,u,c,h=e.pos,d=e.posMax;if(38!==e.src.charCodeAt(h))return!1;if(d>h+1)if(i=e.src.charCodeAt(h+1),35===i){if(c=e.src.slice(h).match(s))return t||(u="x"===c[1][0].toLowerCase()?parseInt(c[1].slice(1),16):parseInt(c[1],10),e.pending+=a(o(u)?u:65533)),e.pos+=c[0].length,!0}else if(c=e.src.slice(h).match(l),c&&r(n,c[1]))return t||(e.pending+=n[c[1]]),e.pos+=c[0].length,!0;return t||(e.pending+="&"),e.pos++,!0}},{"../common/entities":1,"../common/utils":4}],42:[function(e,t,i){"use strict";for(var n=e("../common/utils").isSpace,r=[],o=0;256>o;o++)r.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){r[e.charCodeAt(0)]=1}),t.exports=function(e,t){var i,o=e.pos,a=e.posMax;if(92!==e.src.charCodeAt(o))return!1;if(o++,a>o){if(i=e.src.charCodeAt(o),256>i&&0!==r[i])return t||(e.pending+=e.src[o]),e.pos+=2,!0;if(10===i){for(t||e.push("hardbreak","br",0),o++;a>o&&(i=e.src.charCodeAt(o),n(i));)o++;return e.pos=o,!0}}return t||(e.pending+="\\"),e.pos++,!0}},{"../common/utils":4}],43:[function(e,t,i){"use strict";function n(e){var t=32|e;return t>=97&&122>=t}var r=e("../common/html_re").HTML_TAG_RE;t.exports=function(e,t){var i,o,a,s,l=e.pos;return!(!e.md.options.html||(a=e.posMax,60!==e.src.charCodeAt(l)||l+2>=a||(i=e.src.charCodeAt(l+1),33!==i&&63!==i&&47!==i&&!n(i)||!(o=e.src.slice(l).match(r))||(t||(s=e.push("html_inline","",0),s.content=e.src.slice(l,l+o[0].length)),e.pos+=o[0].length,0))))}},{"../common/html_re":3}],44:[function(e,t,i){"use strict";var n=e("../helpers/parse_link_label"),r=e("../helpers/parse_link_destination"),o=e("../helpers/parse_link_title"),a=e("../common/utils").normalizeReference,s=e("../common/utils").isSpace;t.exports=function(e,t){var i,l,u,c,h,d,p,m,f,g,v,_,y,C="",w=e.pos,E=e.posMax;if(33!==e.src.charCodeAt(e.pos))return!1;if(91!==e.src.charCodeAt(e.pos+1))return!1;if(d=e.pos+2,h=n(e,e.pos+1,!1),0>h)return!1;if(p=h+1,E>p&&40===e.src.charCodeAt(p)){for(p++;E>p&&(l=e.src.charCodeAt(p),s(l)||10===l);p++);if(p>=E)return!1;for(y=p,f=r(e.src,p,e.posMax),f.ok&&(C=e.md.normalizeLink(f.str),e.md.validateLink(C)?p=f.pos:C=""),y=p;E>p&&(l=e.src.charCodeAt(p),s(l)||10===l);p++);if(f=o(e.src,p,e.posMax),E>p&&y!==p&&f.ok)for(g=f.str,p=f.pos;E>p&&(l=e.src.charCodeAt(p),s(l)||10===l);p++);else g="";if(p>=E||41!==e.src.charCodeAt(p))return e.pos=w,!1;p++}else{if("undefined"==typeof e.env.references)return!1;if(E>p&&91===e.src.charCodeAt(p)?(y=p+1,p=n(e,p),p>=0?c=e.src.slice(y,p++):p=h+1):p=h+1,c||(c=e.src.slice(d,h)),m=e.env.references[a(c)],!m)return e.pos=w,!1;C=m.href,g=m.title}return t||(u=e.src.slice(d,h),e.md.inline.parse(u,e.md,e.env,_=[]),v=e.push("image","img",0),v.attrs=i=[["src",C],["alt",""]],v.children=_,v.content=u,g&&i.push(["title",g])),e.pos=p,e.posMax=E,!0}},{"../common/utils":4,"../helpers/parse_link_destination":6,"../helpers/parse_link_label":7,"../helpers/parse_link_title":8}],45:[function(e,t,i){"use strict";var n=e("../helpers/parse_link_label"),r=e("../helpers/parse_link_destination"),o=e("../helpers/parse_link_title"),a=e("../common/utils").normalizeReference,s=e("../common/utils").isSpace;t.exports=function(e,t){var i,l,u,c,h,d,p,m,f,g,v="",_=e.pos,y=e.posMax,C=e.pos;if(91!==e.src.charCodeAt(e.pos))return!1;if(h=e.pos+1,c=n(e,e.pos,!0),0>c)return!1;if(d=c+1,y>d&&40===e.src.charCodeAt(d)){for(d++;y>d&&(l=e.src.charCodeAt(d),s(l)||10===l);d++);if(d>=y)return!1;for(C=d,p=r(e.src,d,e.posMax),p.ok&&(v=e.md.normalizeLink(p.str),e.md.validateLink(v)?d=p.pos:v=""),C=d;y>d&&(l=e.src.charCodeAt(d),s(l)||10===l);d++);if(p=o(e.src,d,e.posMax),y>d&&C!==d&&p.ok)for(f=p.str,d=p.pos;y>d&&(l=e.src.charCodeAt(d),s(l)||10===l);d++);else f="";if(d>=y||41!==e.src.charCodeAt(d))return e.pos=_,!1;d++}else{if("undefined"==typeof e.env.references)return!1;if(y>d&&91===e.src.charCodeAt(d)?(C=d+1,d=n(e,d),d>=0?u=e.src.slice(C,d++):d=c+1):d=c+1,u||(u=e.src.slice(h,c)),m=e.env.references[a(u)],!m)return e.pos=_,!1;v=m.href,f=m.title}return t||(e.pos=h,e.posMax=c,g=e.push("link_open","a",1),g.attrs=i=[["href",v]],f&&i.push(["title",f]),e.md.inline.tokenize(e),g=e.push("link_close","a",-1)),e.pos=d,e.posMax=y,!0}},{"../common/utils":4,"../helpers/parse_link_destination":6,"../helpers/parse_link_label":7,"../helpers/parse_link_title":8}],46:[function(e,t,i){"use strict";t.exports=function(e,t){var i,n,r=e.pos;if(10!==e.src.charCodeAt(r))return!1;for(i=e.pending.length-1,n=e.posMax,t||(i>=0&&32===e.pending.charCodeAt(i)?i>=1&&32===e.pending.charCodeAt(i-1)?(e.pending=e.pending.replace(/ +$/,""),e.push("hardbreak","br",0)):(e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0)):e.push("softbreak","br",0)),r++;n>r&&32===e.src.charCodeAt(r);)r++;return e.pos=r,!0}},{}],47:[function(e,t,i){"use strict";function n(e,t,i,n){this.src=e,this.env=i,this.md=t,this.tokens=n,this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[]}var r=e("../token"),o=e("../common/utils").isWhiteSpace,a=e("../common/utils").isPunctChar,s=e("../common/utils").isMdAsciiPunct;n.prototype.pushPending=function(){var e=new r("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},n.prototype.push=function(e,t,i){this.pending&&this.pushPending();var n=new r(e,t,i);return 0>i&&this.level--,n.level=this.level,i>0&&this.level++,this.pendingLevel=this.level,this.tokens.push(n),n},n.prototype.scanDelims=function(e,t){var i,n,r,l,u,c,h,d,p,m=e,f=!0,g=!0,v=this.posMax,_=this.src.charCodeAt(e);for(i=e>0?this.src.charCodeAt(e-1):32;v>m&&this.src.charCodeAt(m)===_;)m++;return r=m-e,n=v>m?this.src.charCodeAt(m):32,h=s(i)||a(String.fromCharCode(i)),p=s(n)||a(String.fromCharCode(n)),c=o(i),d=o(n),d?f=!1:p&&(c||h||(f=!1)),c?g=!1:h&&(d||p||(g=!1)),t?(l=f,u=g):(l=f&&(!g||h),u=g&&(!f||p)),{can_open:l,can_close:u,length:r}},n.prototype.Token=r,t.exports=n},{"../common/utils":4,"../token":51}],48:[function(e,t,i){"use strict";t.exports.tokenize=function(e,t){var i,n,r,o,a,s=e.pos,l=e.src.charCodeAt(s);if(t)return!1;if(126!==l)return!1;if(n=e.scanDelims(e.pos,!0),o=n.length,a=String.fromCharCode(l),2>o)return!1;for(o%2&&(r=e.push("text","",0),r.content=a,o--),i=0;o>i;i+=2)r=e.push("text","",0),r.content=a+a,e.delimiters.push({marker:l,jump:i,token:e.tokens.length-1,level:e.level,end:-1,open:n.can_open,close:n.can_close});return e.pos+=n.length,!0},t.exports.postProcess=function(e){var t,i,n,r,o,a=[],s=e.delimiters,l=e.delimiters.length;for(t=0;l>t;t++)n=s[t],126===n.marker&&-1!==n.end&&(r=s[n.end],o=e.tokens[n.token],o.type="s_open",o.tag="s",o.nesting=1,o.markup="~~",o.content="",o=e.tokens[r.token],o.type="s_close",o.tag="s",o.nesting=-1,o.markup="~~",o.content="","text"===e.tokens[r.token-1].type&&"~"===e.tokens[r.token-1].content&&a.push(r.token-1));for(;a.length;){for(t=a.pop(),i=t+1;i<e.tokens.length&&"s_close"===e.tokens[i].type;)i++;i--,t!==i&&(o=e.tokens[i],e.tokens[i]=e.tokens[t],e.tokens[t]=o)}}},{}],49:[function(e,t,i){"use strict";function n(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}t.exports=function(e,t){for(var i=e.pos;i<e.posMax&&!n(e.src.charCodeAt(i));)i++;return i!==e.pos&&(t||(e.pending+=e.src.slice(e.pos,i)),e.pos=i,!0)}},{}],50:[function(e,t,i){"use strict";t.exports=function(e){var t,i,n=0,r=e.tokens,o=e.tokens.length;for(t=i=0;o>t;t++)n+=r[t].nesting,r[t].level=n,"text"===r[t].type&&o>t+1&&"text"===r[t+1].type?r[t+1].content=r[t].content+r[t+1].content:(t!==i&&(r[i]=r[t]),i++);t!==i&&(r.length=i)}},{}],51:[function(e,t,i){"use strict";function n(e,t,i){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=i,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}n.prototype.attrIndex=function(e){var t,i,n;if(!this.attrs)return-1;for(t=this.attrs,i=0,n=t.length;n>i;i++)if(t[i][0]===e)return i;return-1},n.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]},n.prototype.attrSet=function(e,t){var i=this.attrIndex(e),n=[e,t];0>i?this.attrPush(n):this.attrs[i]=n},n.prototype.attrGet=function(e){var t=this.attrIndex(e),i=null;return t>=0&&(i=this.attrs[t][1]),i},n.prototype.attrJoin=function(e,t){var i=this.attrIndex(e);0>i?this.attrPush([e,t]):this.attrs[i][1]=this.attrs[i][1]+" "+t},t.exports=n},{}],52:[function(t,i,n){(function(t){!function(r){function o(e){throw new RangeError(L[e])}function a(e,t){for(var i=e.length,n=[];i--;)n[i]=t(e[i]);return n}function s(e,t){var i=e.split("@"),n="";i.length>1&&(n=i[0]+"@",e=i[1]),e=e.replace(O,".");var r=e.split("."),o=a(r,t).join(".");return n+o}function l(e){for(var t,i,n=[],r=0,o=e.length;o>r;)t=e.charCodeAt(r++),t>=55296&&56319>=t&&o>r?(i=e.charCodeAt(r++),56320==(64512&i)?n.push(((1023&t)<<10)+(1023&i)+65536):(n.push(t),r--)):n.push(t);return n}function u(e){return a(e,function(e){var t="";return e>65535&&(e-=65536,t+=k(e>>>10&1023|55296),e=56320|1023&e),t+=k(e)}).join("")}function c(e){return 10>e-48?e-22:26>e-65?e-65:26>e-97?e-97:b}function h(e,t){return e+22+75*(26>e)-((0!=t)<<5)}function d(e,t,i){var n=0;for(e=i?F(e/A):e>>1,e+=F(e/t);e>N*T>>1;n+=b)e=F(e/N);return F(n+(N+1)*e/(e+x))}function p(e){var t,i,n,r,a,s,l,h,p,m,f=[],g=e.length,v=0,_=M,y=P;for(i=e.lastIndexOf(D),0>i&&(i=0),n=0;i>n;++n)e.charCodeAt(n)>=128&&o("not-basic"),f.push(e.charCodeAt(n));for(r=i>0?i+1:0;g>r;){for(a=v,s=1,l=b;r>=g&&o("invalid-input"),h=c(e.charCodeAt(r++)),(h>=b||h>F((E-v)/s))&&o("overflow"),v+=h*s,p=y>=l?S:l>=y+T?T:l-y,!(p>h);l+=b)m=b-p,s>F(E/m)&&o("overflow"),s*=m;t=f.length+1,y=d(v-a,t,0==a),F(v/t)>E-_&&o("overflow"),_+=F(v/t),v%=t,f.splice(v++,0,_)}return u(f)}function m(e){var t,i,n,r,a,s,u,c,p,m,f,g,v,_,y,C=[];for(e=l(e),g=e.length,t=M,i=0,a=P,s=0;g>s;++s)f=e[s],128>f&&C.push(k(f));for(n=r=C.length,r&&C.push(D);g>n;){for(u=E,s=0;g>s;++s)f=e[s],f>=t&&u>f&&(u=f);for(v=n+1,u-t>F((E-i)/v)&&o("overflow"),i+=(u-t)*v,t=u,s=0;g>s;++s)if(f=e[s],t>f&&++i>E&&o("overflow"),f==t){for(c=i,p=b;m=a>=p?S:p>=a+T?T:p-a,!(m>c);p+=b)y=c-m,_=b-m,C.push(k(h(m+y%_,0))),c=F(y/_);C.push(k(h(c,0))),a=d(i,v,n==r),i=0,++n}++i,++t}return C.join("")}function f(e){return s(e,function(e){return I.test(e)?p(e.slice(4).toLowerCase()):e})}function g(e){return s(e,function(e){return R.test(e)?"xn--"+m(e):e})}var v="object"==typeof n&&n&&!n.nodeType&&n,_="object"==typeof i&&i&&!i.nodeType&&i,y="object"==typeof t&&t;y.global!==y&&y.window!==y&&y.self!==y||(r=y);var C,w,E=2147483647,b=36,S=1,T=26,x=38,A=700,P=72,M=128,D="-",I=/^xn--/,R=/[^\x20-\x7E]/,O=/[\x2E\u3002\uFF0E\uFF61]/g,L={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},N=b-S,F=Math.floor,k=String.fromCharCode;if(C={version:"1.4.1",ucs2:{decode:l,encode:u},decode:p,encode:m,toASCII:g,toUnicode:f},"function"==typeof e&&"object"==typeof e.amd&&e.amd)e("punycode",function(){return C});else if(v&&_)if(i.exports==v)_.exports=C;else for(w in C)C.hasOwnProperty(w)&&(v[w]=C[w]);else r.punycode=C}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],53:[function(e,t,i){t.exports={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",amp:"&",AMP:"&",andand:"⩕",And:"⩓",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",apacir:"⩯",ap:"≈",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxHd:"╤",boxhD:"╥",boxHD:"╦",boxhu:"┴",boxHu:"╧",boxhU:"╨",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsolb:"⧅",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",capand:"⩄",capbrcup:"⩉",capcap:"⩋",cap:"∩",Cap:"⋒",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"○",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cup:"∪",Cup:"⋓",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"ⅅ",dd:"ⅆ",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"⇁",DownTeeArrow:"↧",DownTee:"⊤",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",edot:"ė",eDot:"≑",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp13:" ",emsp14:" ",emsp:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",ge:"≥",gE:"≧",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅","in":"∈",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺","int":"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪", +sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}},{}],54:[function(e,t,i){"use strict";function n(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach(function(t){t&&Object.keys(t).forEach(function(i){e[i]=t[i]})}),e}function r(e){return Object.prototype.toString.call(e)}function o(e){return"[object String]"===r(e)}function a(e){return"[object Object]"===r(e)}function s(e){return"[object RegExp]"===r(e)}function l(e){return"[object Function]"===r(e)}function u(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function c(e){return Object.keys(e||{}).reduce(function(e,t){return e||_.hasOwnProperty(t)},!1)}function h(e){e.__index__=-1,e.__text_cache__=""}function d(e){return function(t,i){var n=t.slice(i);return e.test(n)?n.match(e)[0].length:0}}function p(){return function(e,t){t.normalize(e)}}function m(t){function i(e){return e.replace("%TLDS%",r.src_tlds)}function n(e,t){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}var r=t.re=e("./lib/re")(t.__opts__),c=t.__tlds__.slice();t.onCompile(),t.__tlds_replaced__||c.push(C),c.push(r.src_xn),r.src_tlds=c.join("|"),r.email_fuzzy=RegExp(i(r.tpl_email_fuzzy),"i"),r.link_fuzzy=RegExp(i(r.tpl_link_fuzzy),"i"),r.link_no_ip_fuzzy=RegExp(i(r.tpl_link_no_ip_fuzzy),"i"),r.host_fuzzy_test=RegExp(i(r.tpl_host_fuzzy_test),"i");var m=[];t.__compiled__={},Object.keys(t.__schemas__).forEach(function(e){var i=t.__schemas__[e];if(null!==i){var r={validate:null,link:null};return t.__compiled__[e]=r,a(i)?(s(i.validate)?r.validate=d(i.validate):l(i.validate)?r.validate=i.validate:n(e,i),void(l(i.normalize)?r.normalize=i.normalize:i.normalize?n(e,i):r.normalize=p())):o(i)?void m.push(e):void n(e,i)}}),m.forEach(function(e){t.__compiled__[t.__schemas__[e]]&&(t.__compiled__[e].validate=t.__compiled__[t.__schemas__[e]].validate,t.__compiled__[e].normalize=t.__compiled__[t.__schemas__[e]].normalize)}),t.__compiled__[""]={validate:null,normalize:p()};var f=Object.keys(t.__compiled__).filter(function(e){return e.length>0&&t.__compiled__[e]}).map(u).join("|");t.re.schema_test=RegExp("(^|(?!_)(?:[><]|"+r.src_ZPCc+"))("+f+")","i"),t.re.schema_search=RegExp("(^|(?!_)(?:[><]|"+r.src_ZPCc+"))("+f+")","ig"),t.re.pretest=RegExp("("+t.re.schema_test.source+")|("+t.re.host_fuzzy_test.source+")|@","i"),h(t)}function f(e,t){var i=e.__index__,n=e.__last_index__,r=e.__text_cache__.slice(i,n);this.schema=e.__schema__.toLowerCase(),this.index=i+t,this.lastIndex=n+t,this.raw=r,this.text=r,this.url=r}function g(e,t){var i=new f(e,t);return e.__compiled__[i.schema].normalize(i,e),i}function v(e,t){return this instanceof v?(t||c(e)&&(t=e,e={}),this.__opts__=n({},_,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=n({},y,e),this.__compiled__={},this.__tlds__=w,this.__tlds_replaced__=!1,this.re={},void m(this)):new v(e,t)}var _={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1},y={"http:":{validate:function(e,t,i){var n=e.slice(t);return i.re.http||(i.re.http=new RegExp("^\\/\\/"+i.re.src_auth+i.re.src_host_port_strict+i.re.src_path,"i")),i.re.http.test(n)?n.match(i.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,i){var n=e.slice(t);return i.re.no_http||(i.re.no_http=new RegExp("^"+i.re.src_auth+"(?:localhost|(?:(?:"+i.re.src_domain+")\\.)+"+i.re.src_domain_root+")"+i.re.src_port+i.re.src_host_terminator+i.re.src_path,"i")),i.re.no_http.test(n)?t>=3&&":"===e[t-3]?0:t>=3&&"/"===e[t-3]?0:n.match(i.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,i){var n=e.slice(t);return i.re.mailto||(i.re.mailto=new RegExp("^"+i.re.src_email_name+"@"+i.re.src_host_strict,"i")),i.re.mailto.test(n)?n.match(i.re.mailto)[0].length:0}}},C="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",w="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");v.prototype.add=function(e,t){return this.__schemas__[e]=t,m(this),this},v.prototype.set=function(e){return this.__opts__=n(this.__opts__,e),this},v.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,i,n,r,o,a,s,l,u;if(this.re.schema_test.test(e))for(s=this.re.schema_search,s.lastIndex=0;null!==(t=s.exec(e));)if(r=this.testSchemaAt(e,t[2],s.lastIndex)){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+r;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=e.search(this.re.host_fuzzy_test),l>=0&&(this.__index__<0||l<this.__index__)&&null!==(i=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(o=i.index+i[1].length,(this.__index__<0||o<this.__index__)&&(this.__schema__="",this.__index__=o,this.__last_index__=i.index+i[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(u=e.indexOf("@"),u>=0&&null!==(n=e.match(this.re.email_fuzzy))&&(o=n.index+n[1].length,a=n.index+n[0].length,(this.__index__<0||o<this.__index__||o===this.__index__&&a>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=o,this.__last_index__=a))),this.__index__>=0},v.prototype.pretest=function(e){return this.re.pretest.test(e)},v.prototype.testSchemaAt=function(e,t,i){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,i,this):0},v.prototype.match=function(e){var t=0,i=[];this.__index__>=0&&this.__text_cache__===e&&(i.push(g(this,t)),t=this.__last_index__);for(var n=t?e.slice(t):e;this.test(n);)i.push(g(this,t)),n=n.slice(this.__last_index__),t+=this.__last_index__;return i.length?i:null},v.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(e,t,i){return e!==i[t-1]}).reverse(),m(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,m(this),this)},v.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},v.prototype.onCompile=function(){},t.exports=v},{"./lib/re":55}],55:[function(e,t,i){"use strict";t.exports=function(t){var i={};return i.src_Any=e("uc.micro/properties/Any/regex").source,i.src_Cc=e("uc.micro/categories/Cc/regex").source,i.src_Z=e("uc.micro/categories/Z/regex").source,i.src_P=e("uc.micro/categories/P/regex").source,i.src_ZPCc=[i.src_Z,i.src_P,i.src_Cc].join("|"),i.src_ZCc=[i.src_Z,i.src_Cc].join("|"),i.src_pseudo_letter="(?:(?!>|<|"+i.src_ZPCc+")"+i.src_Any+")",i.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",i.src_auth="(?:(?:(?!"+i.src_ZCc+"|[@/]).)+@)?",i.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",i.src_host_terminator="(?=$|>|<|"+i.src_ZPCc+")(?!-|_|:\\d|\\.-|\\.(?!$|"+i.src_ZPCc+"))",i.src_path="(?:[/?#](?:(?!"+i.src_ZCc+"|[()[\\]{}.,\"'?!\\-<>]).|\\[(?:(?!"+i.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+i.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+i.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+i.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+i.src_ZCc+"|[']).)+\\'|\\'(?="+i.src_pseudo_letter+"|[-]).|\\.{2,3}[a-zA-Z0-9%/]|\\.(?!"+i.src_ZCc+"|[.]).|"+(t&&t["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+"\\,(?!"+i.src_ZCc+").|\\!(?!"+i.src_ZCc+"|[!]).|\\?(?!"+i.src_ZCc+"|[?]).)+|\\/)?",i.src_email_name='[\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]+',i.src_xn="xn--[a-z0-9\\-]{1,59}",i.src_domain_root="(?:"+i.src_xn+"|"+i.src_pseudo_letter+"{1,63})",i.src_domain="(?:"+i.src_xn+"|(?:"+i.src_pseudo_letter+")|(?:"+i.src_pseudo_letter+"(?:-(?!-)|"+i.src_pseudo_letter+"){0,61}"+i.src_pseudo_letter+"))",i.src_host="(?:(?:(?:(?:"+i.src_domain+")\\.)*"+i.src_domain_root+"))",i.tpl_host_fuzzy="(?:"+i.src_ip4+"|(?:(?:(?:"+i.src_domain+")\\.)+(?:%TLDS%)))",i.tpl_host_no_ip_fuzzy="(?:(?:(?:"+i.src_domain+")\\.)+(?:%TLDS%))",i.src_host_strict=i.src_host+i.src_host_terminator,i.tpl_host_fuzzy_strict=i.tpl_host_fuzzy+i.src_host_terminator,i.src_host_port_strict=i.src_host+i.src_port+i.src_host_terminator,i.tpl_host_port_fuzzy_strict=i.tpl_host_fuzzy+i.src_port+i.src_host_terminator,i.tpl_host_port_no_ip_fuzzy_strict=i.tpl_host_no_ip_fuzzy+i.src_port+i.src_host_terminator,i.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+i.src_ZPCc+"|>|$))",i.tpl_email_fuzzy="(^|<|>|\\(|"+i.src_ZCc+")("+i.src_email_name+"@"+i.tpl_host_fuzzy_strict+")",i.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|]|"+i.src_ZPCc+"))((?![$+<=>^`|])"+i.tpl_host_port_fuzzy_strict+i.src_path+")",i.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|]|"+i.src_ZPCc+"))((?![$+<=>^`|])"+i.tpl_host_port_no_ip_fuzzy_strict+i.src_path+")",i}},{"uc.micro/categories/Cc/regex":61,"uc.micro/categories/P/regex":63,"uc.micro/categories/Z/regex":64,"uc.micro/properties/Any/regex":66}],56:[function(e,t,i){"use strict";function n(e){var t,i,n=o[e];if(n)return n;for(n=o[e]=[],t=0;128>t;t++)i=String.fromCharCode(t),n.push(i);for(t=0;t<e.length;t++)i=e.charCodeAt(t),n[i]="%"+("0"+i.toString(16).toUpperCase()).slice(-2);return n}function r(e,t){var i;return"string"!=typeof t&&(t=r.defaultChars),i=n(t),e.replace(/(%[a-f0-9]{2})+/gi,function(e){var t,n,r,o,a,s,l,u="";for(t=0,n=e.length;n>t;t+=3)r=parseInt(e.slice(t+1,t+3),16),128>r?u+=i[r]:192===(224&r)&&n>t+3&&(o=parseInt(e.slice(t+4,t+6),16),128===(192&o))?(l=r<<6&1984|63&o,u+=128>l?"��":String.fromCharCode(l),t+=3):224===(240&r)&&n>t+6&&(o=parseInt(e.slice(t+4,t+6),16),a=parseInt(e.slice(t+7,t+9),16),128===(192&o)&&128===(192&a))?(l=r<<12&61440|o<<6&4032|63&a,u+=2048>l||l>=55296&&57343>=l?"���":String.fromCharCode(l),t+=6):240===(248&r)&&n>t+9&&(o=parseInt(e.slice(t+4,t+6),16),a=parseInt(e.slice(t+7,t+9),16),s=parseInt(e.slice(t+10,t+12),16),128===(192&o)&&128===(192&a)&&128===(192&s))?(l=r<<18&1835008|o<<12&258048|a<<6&4032|63&s,65536>l||l>1114111?u+="����":(l-=65536,u+=String.fromCharCode(55296+(l>>10),56320+(1023&l))),t+=9):u+="�";return u})}var o={};r.defaultChars=";/?:@&=+$,#",r.componentChars="",t.exports=r},{}],57:[function(e,t,i){"use strict";function n(e){var t,i,n=o[e];if(n)return n;for(n=o[e]=[],t=0;128>t;t++)i=String.fromCharCode(t),/^[0-9a-z]$/i.test(i)?n.push(i):n.push("%"+("0"+t.toString(16).toUpperCase()).slice(-2));for(t=0;t<e.length;t++)n[e.charCodeAt(t)]=e[t];return n}function r(e,t,i){var o,a,s,l,u,c="";for("string"!=typeof t&&(i=t,t=r.defaultChars),"undefined"==typeof i&&(i=!0),u=n(t),o=0,a=e.length;a>o;o++)if(s=e.charCodeAt(o),i&&37===s&&a>o+2&&/^[0-9a-f]{2}$/i.test(e.slice(o+1,o+3)))c+=e.slice(o,o+3),o+=2;else if(128>s)c+=u[s];else if(s>=55296&&57343>=s){if(s>=55296&&56319>=s&&a>o+1&&(l=e.charCodeAt(o+1),l>=56320&&57343>=l)){c+=encodeURIComponent(e[o]+e[o+1]),o++;continue}c+="%EF%BF%BD"}else c+=encodeURIComponent(e[o]);return c}var o={};r.defaultChars=";/?:@&=+$,-_.!~*'()#",r.componentChars="-_.!~*'()",t.exports=r},{}],58:[function(e,t,i){"use strict";t.exports=function(e){var t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",t+=e.hostname&&-1!==e.hostname.indexOf(":")?"["+e.hostname+"]":e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||""}},{}],59:[function(e,t,i){"use strict";t.exports.encode=e("./encode"),t.exports.decode=e("./decode"),t.exports.format=e("./format"),t.exports.parse=e("./parse")},{"./decode":56,"./encode":57,"./format":58,"./parse":60}],60:[function(e,t,i){"use strict";function n(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}function r(e,t){if(e&&e instanceof n)return e;var i=new n;return i.parse(e,t),i}var o=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,s=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,l=["<",">",'"',"`"," ","\r","\n"," "],u=["{","}","|","\\","^","`"].concat(l),c=["'"].concat(u),h=["%","/","?",";","#"].concat(c),d=["/","?","#"],p=255,m=/^[+a-z0-9A-Z_-]{0,63}$/,f=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,g={javascript:!0,"javascript:":!0},v={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};n.prototype.parse=function(e,t){var i,n,r,a,l,u=e;if(u=u.trim(),!t&&1===e.split("#").length){var c=s.exec(u);if(c)return this.pathname=c[1],c[2]&&(this.search=c[2]),this}var _=o.exec(u);if(_&&(_=_[0],r=_.toLowerCase(),this.protocol=_,u=u.substr(_.length)),(t||_||u.match(/^\/\/[^@\/]+@[^@\/]+/))&&(l="//"===u.substr(0,2),!l||_&&g[_]||(u=u.substr(2),this.slashes=!0)),!g[_]&&(l||_&&!v[_])){var y=-1;for(i=0;i<d.length;i++)a=u.indexOf(d[i]),-1!==a&&(-1===y||y>a)&&(y=a);var C,w;for(w=-1===y?u.lastIndexOf("@"):u.lastIndexOf("@",y),-1!==w&&(C=u.slice(0,w),u=u.slice(w+1),this.auth=C),y=-1,i=0;i<h.length;i++)a=u.indexOf(h[i]),-1!==a&&(-1===y||y>a)&&(y=a);-1===y&&(y=u.length),":"===u[y-1]&&y--;var E=u.slice(0,y);u=u.slice(y),this.parseHost(E),this.hostname=this.hostname||"";var b="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!b){var S=this.hostname.split(/\./);for(i=0,n=S.length;n>i;i++){var T=S[i];if(T&&!T.match(m)){for(var x="",A=0,P=T.length;P>A;A++)x+=T.charCodeAt(A)>127?"x":T[A];if(!x.match(m)){var M=S.slice(0,i),D=S.slice(i+1),I=T.match(f);I&&(M.push(I[1]),D.unshift(I[2])),D.length&&(u=D.join(".")+u),this.hostname=M.join(".");break}}}}this.hostname.length>p&&(this.hostname=""),b&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var R=u.indexOf("#");-1!==R&&(this.hash=u.substr(R),u=u.slice(0,R));var O=u.indexOf("?");return-1!==O&&(this.search=u.substr(O),u=u.slice(0,O)),u&&(this.pathname=u),v[r]&&this.hostname&&!this.pathname&&(this.pathname=""),this},n.prototype.parseHost=function(e){var t=a.exec(e);t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)},t.exports=r},{}],61:[function(e,t,i){t.exports=/[\0-\x1F\x7F-\x9F]/},{}],62:[function(e,t,i){t.exports=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804\uDCBD|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/},{}],63:[function(e,t,i){t.exports=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/},{}],64:[function(e,t,i){t.exports=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/},{}],65:[function(e,t,i){t.exports.Any=e("./properties/Any/regex"),t.exports.Cc=e("./categories/Cc/regex"),t.exports.Cf=e("./categories/Cf/regex"),t.exports.P=e("./categories/P/regex"),t.exports.Z=e("./categories/Z/regex")},{"./categories/Cc/regex":61,"./categories/Cf/regex":62,"./categories/P/regex":63,"./categories/Z/regex":64,"./properties/Any/regex":66}],66:[function(e,t,i){t.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/},{}],67:[function(e,t,i){"use strict";t.exports=e("./lib/")},{"./lib/":9}]},{},[67])(67)}),define("Core/KnockoutMarkdownBinding",["markdown-it-sanitizer","markdown-it"],function(e,t){"use strict";function i(e){if(e instanceof HTMLAnchorElement&&(e.target="_blank"),e.childNodes&&e.childNodes.length>0)for(var t=0;t<e.childNodes.length;++t)i(e.childNodes[t])}var n=/<html(.|\s)*>(.|\s)*<\/html>/im,r=new t({html:!0,linkify:!0});r.use(e,{imageClass:"",removeUnbalanced:!1,removeUnknown:!1});var o={register:function(e){e.bindingHandlers.markdown={init:function(){return{controlsDescendantBindings:!0}},update:function(t,o){for(;t.firstChild;)e.removeNode(t.firstChild);var a,s=e.unwrap(o());a=n.test(s)?s:r.render(s);var l=e.utils.parseHtmlFragment(a,t);t.className=t.className+" markdown";for(var u=0;u<l.length;++u){var c=l[u];i(c),t.appendChild(c)}}}}};return o}),!function(e,t,i,n){"use strict";function r(e,t,i){return setTimeout(u(e,i),t)}function o(e,t,i){return Array.isArray(e)?(a(e,i[t],i),!0):!1}function a(e,t,i){var r;if(e)if(e.forEach)e.forEach(t,i);else if(e.length!==n)for(r=0;r<e.length;)t.call(i,e[r],r,e),r++;else for(r in e)e.hasOwnProperty(r)&&t.call(i,e[r],r,e)}function s(t,i,n){var r="DEPRECATED METHOD: "+i+"\n"+n+" AT \n";return function(){var i=new Error("get-stack-trace"),n=i&&i.stack?i.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=e.console&&(e.console.warn||e.console.log);return o&&o.call(e.console,r,n),t.apply(this,arguments)}}function l(e,t,i){var n,r=t.prototype;n=e.prototype=Object.create(r),n.constructor=e,n._super=r,i&&he(n,i)}function u(e,t){return function(){return e.apply(t,arguments)}}function c(e,t){return typeof e==me?e.apply(t?t[0]||n:n,t):e}function h(e,t){return e===n?t:e}function d(e,t,i){a(g(t),function(t){e.addEventListener(t,i,!1)})}function p(e,t,i){a(g(t),function(t){e.removeEventListener(t,i,!1)})}function m(e,t){for(;e;){if(e==t)return!0;e=e.parentNode}return!1}function f(e,t){return e.indexOf(t)>-1}function g(e){return e.trim().split(/\s+/g)}function v(e,t,i){if(e.indexOf&&!i)return e.indexOf(t);for(var n=0;n<e.length;){if(i&&e[n][i]==t||!i&&e[n]===t)return n;n++}return-1}function _(e){return Array.prototype.slice.call(e,0)}function y(e,t,i){for(var n=[],r=[],o=0;o<e.length;){var a=t?e[o][t]:e[o];v(r,a)<0&&n.push(e[o]),r[o]=a,o++}return i&&(n=t?n.sort(function(e,i){return e[t]>i[t]}):n.sort()),n}function C(e,t){for(var i,r,o=t[0].toUpperCase()+t.slice(1),a=0;a<de.length;){if(i=de[a],r=i?i+o:t,r in e)return r;a++}return n}function w(){return Ce++}function E(t){var i=t.ownerDocument||t;return i.defaultView||i.parentWindow||e}function b(e,t){var i=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){c(e.options.enable,[e])&&i.handler(t)},this.init()}function S(e){var t,i=e.options.inputClass;return new(t=i?i:be?B:Se?U:Ee?W:k)(e,T)}function T(e,t,i){var n=i.pointers.length,r=i.changedPointers.length,o=t&De&&n-r===0,a=t&(Re|Oe)&&n-r===0;i.isFirst=!!o,i.isFinal=!!a,o&&(e.session={}),i.eventType=t,x(e,i),e.emit("hammer.input",i),e.recognize(i),e.session.prevInput=i}function x(e,t){var i=e.session,n=t.pointers,r=n.length;i.firstInput||(i.firstInput=M(t)),r>1&&!i.firstMultiple?i.firstMultiple=M(t):1===r&&(i.firstMultiple=!1);var o=i.firstInput,a=i.firstMultiple,s=a?a.center:o.center,l=t.center=D(n);t.timeStamp=ve(),t.deltaTime=t.timeStamp-o.timeStamp,t.angle=L(s,l),t.distance=O(s,l),A(i,t),t.offsetDirection=R(t.deltaX,t.deltaY);var u=I(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=u.x,t.overallVelocityY=u.y,t.overallVelocity=ge(u.x)>ge(u.y)?u.x:u.y,t.scale=a?F(a.pointers,n):1,t.rotation=a?N(a.pointers,n):0,t.maxPointers=i.prevInput?t.pointers.length>i.prevInput.maxPointers?t.pointers.length:i.prevInput.maxPointers:t.pointers.length,P(i,t);var c=e.element;m(t.srcEvent.target,c)&&(c=t.srcEvent.target),t.target=c}function A(e,t){var i=t.center,n=e.offsetDelta||{},r=e.prevDelta||{},o=e.prevInput||{};t.eventType!==De&&o.eventType!==Re||(r=e.prevDelta={x:o.deltaX||0,y:o.deltaY||0},n=e.offsetDelta={x:i.x,y:i.y}),t.deltaX=r.x+(i.x-n.x),t.deltaY=r.y+(i.y-n.y)}function P(e,t){var i,r,o,a,s=e.lastInterval||t,l=t.timeStamp-s.timeStamp;if(t.eventType!=Oe&&(l>Me||s.velocity===n)){var u=t.deltaX-s.deltaX,c=t.deltaY-s.deltaY,h=I(l,u,c);r=h.x,o=h.y,i=ge(h.x)>ge(h.y)?h.x:h.y,a=R(u,c),e.lastInterval=t}else i=s.velocity,r=s.velocityX,o=s.velocityY,a=s.direction;t.velocity=i,t.velocityX=r,t.velocityY=o,t.direction=a}function M(e){for(var t=[],i=0;i<e.pointers.length;)t[i]={clientX:fe(e.pointers[i].clientX),clientY:fe(e.pointers[i].clientY)},i++;return{timeStamp:ve(),pointers:t,center:D(t),deltaX:e.deltaX,deltaY:e.deltaY}}function D(e){var t=e.length;if(1===t)return{x:fe(e[0].clientX),y:fe(e[0].clientY)};for(var i=0,n=0,r=0;t>r;)i+=e[r].clientX,n+=e[r].clientY,r++;return{x:fe(i/t),y:fe(n/t)}}function I(e,t,i){return{x:t/e||0,y:i/e||0}}function R(e,t){return e===t?Le:ge(e)>=ge(t)?0>e?Ne:Fe:0>t?ke:Be}function O(e,t,i){i||(i=Ge);var n=t[i[0]]-e[i[0]],r=t[i[1]]-e[i[1]];return Math.sqrt(n*n+r*r)}function L(e,t,i){i||(i=Ge);var n=t[i[0]]-e[i[0]],r=t[i[1]]-e[i[1]];return 180*Math.atan2(r,n)/Math.PI}function N(e,t){return L(t[1],t[0],We)+L(e[1],e[0],We)}function F(e,t){return O(t[0],t[1],We)/O(e[0],e[1],We)}function k(){this.evEl=qe,this.evWin=je,this.pressed=!1,b.apply(this,arguments)}function B(){this.evEl=Ze,this.evWin=Ke,b.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function z(){this.evTarget=Qe,this.evWin=$e,this.started=!1,b.apply(this,arguments)}function V(e,t){var i=_(e.touches),n=_(e.changedTouches);return t&(Re|Oe)&&(i=y(i.concat(n),"identifier",!0)),[i,n]}function U(){this.evTarget=tt,this.targetIds={},b.apply(this,arguments)}function G(e,t){var i=_(e.touches),n=this.targetIds;if(t&(De|Ie)&&1===i.length)return n[i[0].identifier]=!0,[i,i];var r,o,a=_(e.changedTouches),s=[],l=this.target;if(o=i.filter(function(e){return m(e.target,l)}),t===De)for(r=0;r<o.length;)n[o[r].identifier]=!0,r++;for(r=0;r<a.length;)n[a[r].identifier]&&s.push(a[r]),t&(Re|Oe)&&delete n[a[r].identifier],r++;return s.length?[y(o.concat(s),"identifier",!0),s]:void 0}function W(){b.apply(this,arguments);var e=u(this.handler,this);this.touch=new U(this.manager,e),this.mouse=new k(this.manager,e),this.primaryTouch=null,this.lastTouches=[]}function H(e,t){e&De?(this.primaryTouch=t.changedPointers[0].identifier,q.call(this,t)):e&(Re|Oe)&&q.call(this,t)}function q(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var i={x:t.clientX,y:t.clientY};this.lastTouches.push(i);var n=this.lastTouches,r=function(){var e=n.indexOf(i);e>-1&&n.splice(e,1)};setTimeout(r,it)}}function j(e){for(var t=e.srcEvent.clientX,i=e.srcEvent.clientY,n=0;n<this.lastTouches.length;n++){var r=this.lastTouches[n],o=Math.abs(t-r.x),a=Math.abs(i-r.y);if(nt>=o&&nt>=a)return!0}return!1}function Y(e,t){this.manager=e,this.set(t)}function X(e){if(f(e,ut))return ut;var t=f(e,ct),i=f(e,ht);return t&&i?ut:t||i?t?ct:ht:f(e,lt)?lt:st}function Z(){if(!ot)return!1;var t={},i=e.CSS&&e.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(n){t[n]=i?e.CSS.supports("touch-action",n):!0}),t}function K(e){this.options=he({},this.defaults,e||{}),this.id=w(),this.manager=null,this.options.enable=h(this.options.enable,!0),this.state=pt,this.simultaneous={},this.requireFail=[]}function J(e){return e&_t?"cancel":e>?"end":e&ft?"move":e&mt?"start":""}function Q(e){return e==Be?"down":e==ke?"up":e==Ne?"left":e==Fe?"right":""}function $(e,t){var i=t.manager;return i?i.get(e):e}function ee(){K.apply(this,arguments)}function te(){ee.apply(this,arguments),this.pX=null,this.pY=null}function ie(){ee.apply(this,arguments)}function ne(){K.apply(this,arguments),this._timer=null,this._input=null}function re(){ee.apply(this,arguments)}function oe(){ee.apply(this,arguments)}function ae(){K.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function se(e,t){return t=t||{},t.recognizers=h(t.recognizers,se.defaults.preset),new le(e,t)}function le(e,t){this.options=he({},se.defaults,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=S(this),this.touchAction=new Y(this,this.options.touchAction),ue(this,!0),a(this.options.recognizers,function(e){var t=this.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])},this)}function ue(e,t){var i=e.element;if(i.style){var n;a(e.options.cssProps,function(r,o){n=C(i.style,o),t?(e.oldCssProps[n]=i.style[n],i.style[n]=r):i.style[n]=e.oldCssProps[n]||""}),t||(e.oldCssProps={})}}function ce(e,i){var n=t.createEvent("Event");n.initEvent(e,!0,!0),n.gesture=i,i.target.dispatchEvent(n)}var he,de=["","webkit","Moz","MS","ms","o"],pe=t.createElement("div"),me="function",fe=Math.round,ge=Math.abs,ve=Date.now;he="function"!=typeof Object.assign?function(e){if(e===n||null===e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),i=1;i<arguments.length;i++){var r=arguments[i];if(r!==n&&null!==r)for(var o in r)r.hasOwnProperty(o)&&(t[o]=r[o])}return t}:Object.assign;var _e=s(function(e,t,i){for(var r=Object.keys(t),o=0;o<r.length;)(!i||i&&e[r[o]]===n)&&(e[r[o]]=t[r[o]]),o++;return e},"extend","Use `assign`."),ye=s(function(e,t){return _e(e,t,!0)},"merge","Use `assign`."),Ce=1,we=/mobile|tablet|ip(ad|hone|od)|android/i,Ee="ontouchstart"in e,be=C(e,"PointerEvent")!==n,Se=Ee&&we.test(navigator.userAgent),Te="touch",xe="pen",Ae="mouse",Pe="kinect",Me=25,De=1,Ie=2,Re=4,Oe=8,Le=1,Ne=2,Fe=4,ke=8,Be=16,ze=Ne|Fe,Ve=ke|Be,Ue=ze|Ve,Ge=["x","y"],We=["clientX","clientY"];b.prototype={handler:function(){},init:function(){this.evEl&&d(this.element,this.evEl,this.domHandler),this.evTarget&&d(this.target,this.evTarget,this.domHandler),this.evWin&&d(E(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&p(this.element,this.evEl,this.domHandler),this.evTarget&&p(this.target,this.evTarget,this.domHandler),this.evWin&&p(E(this.element),this.evWin,this.domHandler)}};var He={mousedown:De,mousemove:Ie,mouseup:Re},qe="mousedown",je="mousemove mouseup";l(k,b,{handler:function(e){var t=He[e.type];t&De&&0===e.button&&(this.pressed=!0),t&Ie&&1!==e.which&&(t=Re),this.pressed&&(t&Re&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:Ae,srcEvent:e})); +}});var Ye={pointerdown:De,pointermove:Ie,pointerup:Re,pointercancel:Oe,pointerout:Oe},Xe={2:Te,3:xe,4:Ae,5:Pe},Ze="pointerdown",Ke="pointermove pointerup pointercancel";e.MSPointerEvent&&!e.PointerEvent&&(Ze="MSPointerDown",Ke="MSPointerMove MSPointerUp MSPointerCancel"),l(B,b,{handler:function(e){var t=this.store,i=!1,n=e.type.toLowerCase().replace("ms",""),r=Ye[n],o=Xe[e.pointerType]||e.pointerType,a=o==Te,s=v(t,e.pointerId,"pointerId");r&De&&(0===e.button||a)?0>s&&(t.push(e),s=t.length-1):r&(Re|Oe)&&(i=!0),0>s||(t[s]=e,this.callback(this.manager,r,{pointers:t,changedPointers:[e],pointerType:o,srcEvent:e}),i&&t.splice(s,1))}});var Je={touchstart:De,touchmove:Ie,touchend:Re,touchcancel:Oe},Qe="touchstart",$e="touchstart touchmove touchend touchcancel";l(z,b,{handler:function(e){var t=Je[e.type];if(t===De&&(this.started=!0),this.started){var i=V.call(this,e,t);t&(Re|Oe)&&i[0].length-i[1].length===0&&(this.started=!1),this.callback(this.manager,t,{pointers:i[0],changedPointers:i[1],pointerType:Te,srcEvent:e})}}});var et={touchstart:De,touchmove:Ie,touchend:Re,touchcancel:Oe},tt="touchstart touchmove touchend touchcancel";l(U,b,{handler:function(e){var t=et[e.type],i=G.call(this,e,t);i&&this.callback(this.manager,t,{pointers:i[0],changedPointers:i[1],pointerType:Te,srcEvent:e})}});var it=2500,nt=25;l(W,b,{handler:function(e,t,i){var n=i.pointerType==Te,r=i.pointerType==Ae;if(!(r&&i.sourceCapabilities&&i.sourceCapabilities.firesTouchEvents)){if(n)H.call(this,t,i);else if(r&&j.call(this,i))return;this.callback(e,t,i)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var rt=C(pe.style,"touchAction"),ot=rt!==n,at="compute",st="auto",lt="manipulation",ut="none",ct="pan-x",ht="pan-y",dt=Z();Y.prototype={set:function(e){e==at&&(e=this.compute()),ot&&this.manager.element.style&&dt[e]&&(this.manager.element.style[rt]=e),this.actions=e.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var e=[];return a(this.manager.recognizers,function(t){c(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))}),X(e.join(" "))},preventDefaults:function(e){var t=e.srcEvent,i=e.offsetDirection;if(this.manager.session.prevented)return void t.preventDefault();var n=this.actions,r=f(n,ut)&&!dt[ut],o=f(n,ht)&&!dt[ht],a=f(n,ct)&&!dt[ct];if(r){var s=1===e.pointers.length,l=e.distance<2,u=e.deltaTime<250;if(s&&l&&u)return}return a&&o?void 0:r||o&&i&ze||a&&i&Ve?this.preventSrc(t):void 0},preventSrc:function(e){this.manager.session.prevented=!0,e.preventDefault()}};var pt=1,mt=2,ft=4,gt=8,vt=gt,_t=16,yt=32;K.prototype={defaults:{},set:function(e){return he(this.options,e),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(e){if(o(e,"recognizeWith",this))return this;var t=this.simultaneous;return e=$(e,this),t[e.id]||(t[e.id]=e,e.recognizeWith(this)),this},dropRecognizeWith:function(e){return o(e,"dropRecognizeWith",this)?this:(e=$(e,this),delete this.simultaneous[e.id],this)},requireFailure:function(e){if(o(e,"requireFailure",this))return this;var t=this.requireFail;return e=$(e,this),-1===v(t,e)&&(t.push(e),e.requireFailure(this)),this},dropRequireFailure:function(e){if(o(e,"dropRequireFailure",this))return this;e=$(e,this);var t=v(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(e){return!!this.simultaneous[e.id]},emit:function(e){function t(t){i.manager.emit(t,e)}var i=this,n=this.state;gt>n&&t(i.options.event+J(n)),t(i.options.event),e.additionalEvent&&t(e.additionalEvent),n>=gt&&t(i.options.event+J(n))},tryEmit:function(e){return this.canEmit()?this.emit(e):void(this.state=yt)},canEmit:function(){for(var e=0;e<this.requireFail.length;){if(!(this.requireFail[e].state&(yt|pt)))return!1;e++}return!0},recognize:function(e){var t=he({},e);return c(this.options.enable,[this,t])?(this.state&(vt|_t|yt)&&(this.state=pt),this.state=this.process(t),void(this.state&(mt|ft|gt|_t)&&this.tryEmit(t))):(this.reset(),void(this.state=yt))},process:function(e){},getTouchAction:function(){},reset:function(){}},l(ee,K,{defaults:{pointers:1},attrTest:function(e){var t=this.options.pointers;return 0===t||e.pointers.length===t},process:function(e){var t=this.state,i=e.eventType,n=t&(mt|ft),r=this.attrTest(e);return n&&(i&Oe||!r)?t|_t:n||r?i&Re?t|gt:t&mt?t|ft:mt:yt}}),l(te,ee,{defaults:{event:"pan",threshold:10,pointers:1,direction:Ue},getTouchAction:function(){var e=this.options.direction,t=[];return e&ze&&t.push(ht),e&Ve&&t.push(ct),t},directionTest:function(e){var t=this.options,i=!0,n=e.distance,r=e.direction,o=e.deltaX,a=e.deltaY;return r&t.direction||(t.direction&ze?(r=0===o?Le:0>o?Ne:Fe,i=o!=this.pX,n=Math.abs(e.deltaX)):(r=0===a?Le:0>a?ke:Be,i=a!=this.pY,n=Math.abs(e.deltaY))),e.direction=r,i&&n>t.threshold&&r&t.direction},attrTest:function(e){return ee.prototype.attrTest.call(this,e)&&(this.state&mt||!(this.state&mt)&&this.directionTest(e))},emit:function(e){this.pX=e.deltaX,this.pY=e.deltaY;var t=Q(e.direction);t&&(e.additionalEvent=this.options.event+t),this._super.emit.call(this,e)}}),l(ie,ee,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[ut]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||this.state&mt)},emit:function(e){if(1!==e.scale){var t=e.scale<1?"in":"out";e.additionalEvent=this.options.event+t}this._super.emit.call(this,e)}}),l(ne,K,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[st]},process:function(e){var t=this.options,i=e.pointers.length===t.pointers,n=e.distance<t.threshold,o=e.deltaTime>t.time;if(this._input=e,!n||!i||e.eventType&(Re|Oe)&&!o)this.reset();else if(e.eventType&De)this.reset(),this._timer=r(function(){this.state=vt,this.tryEmit()},t.time,this);else if(e.eventType&Re)return vt;return yt},reset:function(){clearTimeout(this._timer)},emit:function(e){this.state===vt&&(e&&e.eventType&Re?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=ve(),this.manager.emit(this.options.event,this._input)))}}),l(re,ee,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[ut]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||this.state&mt)}}),l(oe,ee,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:ze|Ve,pointers:1},getTouchAction:function(){return te.prototype.getTouchAction.call(this)},attrTest:function(e){var t,i=this.options.direction;return i&(ze|Ve)?t=e.overallVelocity:i&ze?t=e.overallVelocityX:i&Ve&&(t=e.overallVelocityY),this._super.attrTest.call(this,e)&&i&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers==this.options.pointers&&ge(t)>this.options.velocity&&e.eventType&Re},emit:function(e){var t=Q(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)}}),l(ae,K,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[lt]},process:function(e){var t=this.options,i=e.pointers.length===t.pointers,n=e.distance<t.threshold,o=e.deltaTime<t.time;if(this.reset(),e.eventType&De&&0===this.count)return this.failTimeout();if(n&&o&&i){if(e.eventType!=Re)return this.failTimeout();var a=this.pTime?e.timeStamp-this.pTime<t.interval:!0,s=!this.pCenter||O(this.pCenter,e.center)<t.posThreshold;this.pTime=e.timeStamp,this.pCenter=e.center,s&&a?this.count+=1:this.count=1,this._input=e;var l=this.count%t.taps;if(0===l)return this.hasRequireFailures()?(this._timer=r(function(){this.state=vt,this.tryEmit()},t.interval,this),mt):vt}return yt},failTimeout:function(){return this._timer=r(function(){this.state=yt},this.options.interval,this),yt},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==vt&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),se.VERSION="2.0.7",se.defaults={domEvents:!1,touchAction:at,enable:!0,inputTarget:null,inputClass:null,preset:[[re,{enable:!1}],[ie,{enable:!1},["rotate"]],[oe,{direction:ze}],[te,{direction:ze},["swipe"]],[ae],[ae,{event:"doubletap",taps:2},["tap"]],[ne]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var Ct=1,wt=2;le.prototype={set:function(e){return he(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},stop:function(e){this.session.stopped=e?wt:Ct},recognize:function(e){var t=this.session;if(!t.stopped){this.touchAction.preventDefaults(e);var i,n=this.recognizers,r=t.curRecognizer;(!r||r&&r.state&vt)&&(r=t.curRecognizer=null);for(var o=0;o<n.length;)i=n[o],t.stopped===wt||r&&i!=r&&!i.canRecognizeWith(r)?i.reset():i.recognize(e),!r&&i.state&(mt|ft|gt)&&(r=t.curRecognizer=i),o++}},get:function(e){if(e instanceof K)return e;for(var t=this.recognizers,i=0;i<t.length;i++)if(t[i].options.event==e)return t[i];return null},add:function(e){if(o(e,"add",this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e},remove:function(e){if(o(e,"remove",this))return this;if(e=this.get(e)){var t=this.recognizers,i=v(t,e);-1!==i&&(t.splice(i,1),this.touchAction.update())}return this},on:function(e,t){if(e!==n&&t!==n){var i=this.handlers;return a(g(e),function(e){i[e]=i[e]||[],i[e].push(t)}),this}},off:function(e,t){if(e!==n){var i=this.handlers;return a(g(e),function(e){t?i[e]&&i[e].splice(v(i[e],t),1):delete i[e]}),this}},emit:function(e,t){this.options.domEvents&&ce(e,t);var i=this.handlers[e]&&this.handlers[e].slice();if(i&&i.length){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var n=0;n<i.length;)i[n](t),n++}},destroy:function(){this.element&&ue(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},he(se,{INPUT_START:De,INPUT_MOVE:Ie,INPUT_END:Re,INPUT_CANCEL:Oe,STATE_POSSIBLE:pt,STATE_BEGAN:mt,STATE_CHANGED:ft,STATE_ENDED:gt,STATE_RECOGNIZED:vt,STATE_CANCELLED:_t,STATE_FAILED:yt,DIRECTION_NONE:Le,DIRECTION_LEFT:Ne,DIRECTION_RIGHT:Fe,DIRECTION_UP:ke,DIRECTION_DOWN:Be,DIRECTION_HORIZONTAL:ze,DIRECTION_VERTICAL:Ve,DIRECTION_ALL:Ue,Manager:le,Input:b,TouchAction:Y,TouchInput:U,MouseInput:k,PointerEventInput:B,TouchMouseInput:W,SingleTouchInput:z,Recognizer:K,AttrRecognizer:ee,Tap:ae,Pan:te,Swipe:oe,Pinch:ie,Rotate:re,Press:ne,on:d,off:p,each:a,merge:ye,extend:_e,assign:he,inherit:l,bindFn:u,prefixed:C});var Et="undefined"!=typeof e?e:"undefined"!=typeof self?self:{};Et.Hammer=se,"function"==typeof define&&define.amd?define("Hammer",[],function(){return se}):"undefined"!=typeof module&&module.exports?module.exports=se:e[i]=se}(window,document,"Hammer"),define("Core/KnockoutHammerBinding",["KnockoutES5","Hammer"],function(e,t){"use strict";var i={register:function(e){e.bindingHandlers.swipeLeft={init:function(i,n,r,o,a){var s=e.unwrap(n());new t(i).on("swipeleft",function(e){var t=a.$data;s.apply(t,arguments)})}},e.bindingHandlers.swipeRight={init:function(i,n,r,o,a){var s=e.unwrap(n());new t(i).on("swiperight",function(e){var t=a.$data;s.apply(t,arguments)})}}}};return i}),define("Core/registerKnockoutBindings",["Cesium/Widgets/SvgPathBindingHandler","KnockoutES5","Core/KnockoutMarkdownBinding","Core/KnockoutHammerBinding"],function(e,t,i,n){"use strict";var r=function(){e.register(t),i.register(t),n.register(t),t.bindingHandlers.embeddedComponent={init:function(e,i,n,r,o){var a=t.unwrap(i());return a.show(e),{controlsDescendantBindings:!0}},update:function(e,t,i,n,r){}}};return r}),define("Core/createFragmentFromTemplate",[],function(){"use strict";var e=function(e){var t=document.createElement("div");t.innerHTML=e;for(var i=document.createDocumentFragment();t.firstChild;)i.appendChild(t.firstChild);return i};return e}),define("Core/loadView",["Cesium/Widgets/getElement","KnockoutES5","Core/createFragmentFromTemplate"],function(e,t,i){"use strict";var n=function(n,r,o){r=e(r);var a,s=i(n),l=[];for(a=0;a<s.childNodes.length;++a)l.push(s.childNodes[a]);for(r.appendChild(s),a=0;a<l.length;++a){var u=l[a];(1===u.nodeType||8===u.nodeType)&&t.applyBindings(o,u)}return l};return n}),!function(e,t,i){var n=e.L,r={};r.version="0.7.7","object"==typeof module&&"object"==typeof module.exports?module.exports=r:"function"==typeof define&&define.amd&&define("leaflet",r),r.noConflict=function(){return e.L=n,this},e.L=r,r.Util={extend:function(e){var t,i,n,r,o=Array.prototype.slice.call(arguments,1);for(i=0,n=o.length;n>i;i++){r=o[i]||{};for(t in r)r.hasOwnProperty(t)&&(e[t]=r[t])}return e},bind:function(e,t){var i=arguments.length>2?Array.prototype.slice.call(arguments,2):null;return function(){return e.apply(t,i||arguments)}},stamp:function(){var e=0,t="_leaflet_id";return function(i){return i[t]=i[t]||++e,i[t]}}(),invokeEach:function(e,t,i){var n,r;if("object"==typeof e){r=Array.prototype.slice.call(arguments,3);for(n in e)t.apply(i,[n,e[n]].concat(r));return!0}return!1},limitExecByInterval:function(e,t,i){var n,r;return function o(){var a=arguments;return n?void(r=!0):(n=!0,setTimeout(function(){n=!1,r&&(o.apply(i,a),r=!1)},t),void e.apply(i,a))}},falseFn:function(){return!1},formatNum:function(e,t){var i=Math.pow(10,t||5);return Math.round(e*i)/i},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},splitWords:function(e){return r.Util.trim(e).split(/\s+/)},setOptions:function(e,t){return e.options=r.extend({},e.options,t),e.options},getParamString:function(e,t,i){var n=[];for(var r in e)n.push(encodeURIComponent(i?r.toUpperCase():r)+"="+encodeURIComponent(e[r]));return(t&&-1!==t.indexOf("?")?"&":"?")+n.join("&")},template:function(e,t){return e.replace(/\{ *([\w_]+) *\}/g,function(e,n){var r=t[n];if(r===i)throw new Error("No value provided for variable "+e);return"function"==typeof r&&(r=r(t)),r})},isArray:Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},emptyImageUrl:"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="},function(){function t(t){var i,n,r=["webkit","moz","o","ms"];for(i=0;i<r.length&&!n;i++)n=e[r[i]+t];return n}function i(t){var i=+new Date,r=Math.max(0,16-(i-n));return n=i+r,e.setTimeout(t,r)}var n=0,o=e.requestAnimationFrame||t("RequestAnimationFrame")||i,a=e.cancelAnimationFrame||t("CancelAnimationFrame")||t("CancelRequestAnimationFrame")||function(t){e.clearTimeout(t)};r.Util.requestAnimFrame=function(t,n,a,s){return t=r.bind(t,n),a&&o===i?void t():o.call(e,t,s)},r.Util.cancelAnimFrame=function(t){t&&a.call(e,t)}}(),r.extend=r.Util.extend,r.bind=r.Util.bind,r.stamp=r.Util.stamp,r.setOptions=r.Util.setOptions,r.Class=function(){},r.Class.extend=function(e){var t=function(){this.initialize&&this.initialize.apply(this,arguments),this._initHooks&&this.callInitHooks()},i=function(){};i.prototype=this.prototype;var n=new i;n.constructor=t,t.prototype=n;for(var o in this)this.hasOwnProperty(o)&&"prototype"!==o&&(t[o]=this[o]);e.statics&&(r.extend(t,e.statics),delete e.statics),e.includes&&(r.Util.extend.apply(null,[n].concat(e.includes)),delete e.includes),e.options&&n.options&&(e.options=r.extend({},n.options,e.options)),r.extend(n,e),n._initHooks=[];var a=this;return t.__super__=a.prototype,n.callInitHooks=function(){if(!this._initHooksCalled){a.prototype.callInitHooks&&a.prototype.callInitHooks.call(this),this._initHooksCalled=!0;for(var e=0,t=n._initHooks.length;t>e;e++)n._initHooks[e].call(this)}},t},r.Class.include=function(e){r.extend(this.prototype,e)},r.Class.mergeOptions=function(e){r.extend(this.prototype.options,e)},r.Class.addInitHook=function(e){var t=Array.prototype.slice.call(arguments,1),i="function"==typeof e?e:function(){this[e].apply(this,t)};this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i)};var o="_leaflet_events";r.Mixin={},r.Mixin.Events={addEventListener:function(e,t,i){if(r.Util.invokeEach(e,this.addEventListener,this,t,i))return this;var n,a,s,l,u,c,h,d=this[o]=this[o]||{},p=i&&i!==this&&r.stamp(i);for(e=r.Util.splitWords(e),n=0,a=e.length;a>n;n++)s={action:t,context:i||this},l=e[n],p?(u=l+"_idx",c=u+"_len",h=d[u]=d[u]||{},h[p]||(h[p]=[],d[c]=(d[c]||0)+1),h[p].push(s)):(d[l]=d[l]||[],d[l].push(s));return this},hasEventListeners:function(e){var t=this[o];return!!t&&(e in t&&t[e].length>0||e+"_idx"in t&&t[e+"_idx_len"]>0)},removeEventListener:function(e,t,i){if(!this[o])return this;if(!e)return this.clearAllEventListeners();if(r.Util.invokeEach(e,this.removeEventListener,this,t,i))return this;var n,a,s,l,u,c,h,d,p,m=this[o],f=i&&i!==this&&r.stamp(i);for(e=r.Util.splitWords(e),n=0,a=e.length;a>n;n++)if(s=e[n],c=s+"_idx",h=c+"_len",d=m[c],t){if(l=f&&d?d[f]:m[s]){for(u=l.length-1;u>=0;u--)l[u].action!==t||i&&l[u].context!==i||(p=l.splice(u,1),p[0].action=r.Util.falseFn);i&&d&&0===l.length&&(delete d[f],m[h]--)}}else delete m[s],delete m[c],delete m[h];return this},clearAllEventListeners:function(){return delete this[o],this},fireEvent:function(e,t){if(!this.hasEventListeners(e))return this;var i,n,a,s,l,u=r.Util.extend({},t,{type:e,target:this}),c=this[o];if(c[e])for(i=c[e].slice(),n=0,a=i.length;a>n;n++)i[n].action.call(i[n].context,u);s=c[e+"_idx"];for(l in s)if(i=s[l].slice())for(n=0,a=i.length;a>n;n++)i[n].action.call(i[n].context,u);return this},addOneTimeEventListener:function(e,t,i){if(r.Util.invokeEach(e,this.addOneTimeEventListener,this,t,i))return this;var n=r.bind(function(){this.removeEventListener(e,t,i).removeEventListener(e,n,i)},this);return this.addEventListener(e,t,i).addEventListener(e,n,i)}},r.Mixin.Events.on=r.Mixin.Events.addEventListener,r.Mixin.Events.off=r.Mixin.Events.removeEventListener,r.Mixin.Events.once=r.Mixin.Events.addOneTimeEventListener,r.Mixin.Events.fire=r.Mixin.Events.fireEvent,function(){var n="ActiveXObject"in e,o=n&&!t.addEventListener,a=navigator.userAgent.toLowerCase(),s=-1!==a.indexOf("webkit"),l=-1!==a.indexOf("chrome"),u=-1!==a.indexOf("phantom"),c=-1!==a.indexOf("android"),h=-1!==a.search("android [23]"),d=-1!==a.indexOf("gecko"),p=typeof orientation!=i+"",m=!e.PointerEvent&&e.MSPointerEvent,f=e.PointerEvent&&e.navigator.pointerEnabled||m,g="devicePixelRatio"in e&&e.devicePixelRatio>1||"matchMedia"in e&&e.matchMedia("(min-resolution:144dpi)")&&e.matchMedia("(min-resolution:144dpi)").matches,v=t.documentElement,_=n&&"transition"in v.style,y="WebKitCSSMatrix"in e&&"m11"in new e.WebKitCSSMatrix&&!h,C="MozPerspective"in v.style,w="OTransition"in v.style,E=!e.L_DISABLE_3D&&(_||y||C||w)&&!u,b=!e.L_NO_TOUCH&&!u&&(f||"ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch);r.Browser={ie:n,ielt9:o,webkit:s,gecko:d&&!s&&!e.opera&&!n,android:c,android23:h,chrome:l,ie3d:_,webkit3d:y,gecko3d:C,opera3d:w,any3d:E,mobile:p,mobileWebkit:p&&s,mobileWebkit3d:p&&y,mobileOpera:p&&e.opera,touch:b,msPointer:m,pointer:f,retina:g}}(),r.Point=function(e,t,i){this.x=i?Math.round(e):e,this.y=i?Math.round(t):t},r.Point.prototype={clone:function(){return new r.Point(this.x,this.y)},add:function(e){return this.clone()._add(r.point(e))},_add:function(e){return this.x+=e.x,this.y+=e.y,this},subtract:function(e){return this.clone()._subtract(r.point(e))},_subtract:function(e){return this.x-=e.x,this.y-=e.y,this},divideBy:function(e){return this.clone()._divideBy(e)},_divideBy:function(e){return this.x/=e,this.y/=e,this},multiplyBy:function(e){return this.clone()._multiplyBy(e)},_multiplyBy:function(e){return this.x*=e,this.y*=e,this},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},distanceTo:function(e){e=r.point(e);var t=e.x-this.x,i=e.y-this.y;return Math.sqrt(t*t+i*i)},equals:function(e){return e=r.point(e),e.x===this.x&&e.y===this.y},contains:function(e){return e=r.point(e),Math.abs(e.x)<=Math.abs(this.x)&&Math.abs(e.y)<=Math.abs(this.y)},toString:function(){return"Point("+r.Util.formatNum(this.x)+", "+r.Util.formatNum(this.y)+")"}},r.point=function(e,t,n){return e instanceof r.Point?e:r.Util.isArray(e)?new r.Point(e[0],e[1]):e===i||null===e?e:new r.Point(e,t,n)},r.Bounds=function(e,t){if(e)for(var i=t?[e,t]:e,n=0,r=i.length;r>n;n++)this.extend(i[n])},r.Bounds.prototype={extend:function(e){return e=r.point(e),this.min||this.max?(this.min.x=Math.min(e.x,this.min.x),this.max.x=Math.max(e.x,this.max.x),this.min.y=Math.min(e.y,this.min.y),this.max.y=Math.max(e.y,this.max.y)):(this.min=e.clone(),this.max=e.clone()),this},getCenter:function(e){return new r.Point((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,e)},getBottomLeft:function(){return new r.Point(this.min.x,this.max.y)},getTopRight:function(){return new r.Point(this.max.x,this.min.y)},getSize:function(){return this.max.subtract(this.min)},contains:function(e){var t,i;return e="number"==typeof e[0]||e instanceof r.Point?r.point(e):r.bounds(e),e instanceof r.Bounds?(t=e.min,i=e.max):t=i=e,t.x>=this.min.x&&i.x<=this.max.x&&t.y>=this.min.y&&i.y<=this.max.y},intersects:function(e){e=r.bounds(e);var t=this.min,i=this.max,n=e.min,o=e.max,a=o.x>=t.x&&n.x<=i.x,s=o.y>=t.y&&n.y<=i.y;return a&&s},isValid:function(){return!(!this.min||!this.max)}},r.bounds=function(e,t){return!e||e instanceof r.Bounds?e:new r.Bounds(e,t)},r.Transformation=function(e,t,i,n){this._a=e,this._b=t,this._c=i,this._d=n},r.Transformation.prototype={transform:function(e,t){return this._transform(e.clone(),t)},_transform:function(e,t){return t=t||1,e.x=t*(this._a*e.x+this._b),e.y=t*(this._c*e.y+this._d),e},untransform:function(e,t){return t=t||1,new r.Point((e.x/t-this._b)/this._a,(e.y/t-this._d)/this._c)}},r.DomUtil={get:function(e){return"string"==typeof e?t.getElementById(e):e},getStyle:function(e,i){var n=e.style[i];if(!n&&e.currentStyle&&(n=e.currentStyle[i]),(!n||"auto"===n)&&t.defaultView){var r=t.defaultView.getComputedStyle(e,null);n=r?r[i]:null}return"auto"===n?null:n},getViewportOffset:function(e){var i,n=0,o=0,a=e,s=t.body,l=t.documentElement;do{if(n+=a.offsetTop||0,o+=a.offsetLeft||0,n+=parseInt(r.DomUtil.getStyle(a,"borderTopWidth"),10)||0,o+=parseInt(r.DomUtil.getStyle(a,"borderLeftWidth"),10)||0,i=r.DomUtil.getStyle(a,"position"),a.offsetParent===s&&"absolute"===i)break;if("fixed"===i){n+=s.scrollTop||l.scrollTop||0,o+=s.scrollLeft||l.scrollLeft||0;break}if("relative"===i&&!a.offsetLeft){var u=r.DomUtil.getStyle(a,"width"),c=r.DomUtil.getStyle(a,"max-width"),h=a.getBoundingClientRect();("none"!==u||"none"!==c)&&(o+=h.left+a.clientLeft),n+=h.top+(s.scrollTop||l.scrollTop||0);break}a=a.offsetParent}while(a);a=e;do{if(a===s)break;n-=a.scrollTop||0,o-=a.scrollLeft||0,a=a.parentNode}while(a);return new r.Point(o,n)},documentIsLtr:function(){return r.DomUtil._docIsLtrCached||(r.DomUtil._docIsLtrCached=!0,r.DomUtil._docIsLtr="ltr"===r.DomUtil.getStyle(t.body,"direction")),r.DomUtil._docIsLtr},create:function(e,i,n){var r=t.createElement(e);return r.className=i,n&&n.appendChild(r),r},hasClass:function(e,t){if(e.classList!==i)return e.classList.contains(t);var n=r.DomUtil._getClass(e);return n.length>0&&new RegExp("(^|\\s)"+t+"(\\s|$)").test(n)},addClass:function(e,t){if(e.classList!==i)for(var n=r.Util.splitWords(t),o=0,a=n.length;a>o;o++)e.classList.add(n[o]);else if(!r.DomUtil.hasClass(e,t)){var s=r.DomUtil._getClass(e);r.DomUtil._setClass(e,(s?s+" ":"")+t)}},removeClass:function(e,t){e.classList!==i?e.classList.remove(t):r.DomUtil._setClass(e,r.Util.trim((" "+r.DomUtil._getClass(e)+" ").replace(" "+t+" "," ")))},_setClass:function(e,t){e.className.baseVal===i?e.className=t:e.className.baseVal=t},_getClass:function(e){return e.className.baseVal===i?e.className:e.className.baseVal},setOpacity:function(e,t){if("opacity"in e.style)e.style.opacity=t;else if("filter"in e.style){var i=!1,n="DXImageTransform.Microsoft.Alpha";try{i=e.filters.item(n)}catch(r){if(1===t)return}t=Math.round(100*t),i?(i.Enabled=100!==t,i.Opacity=t):e.style.filter+=" progid:"+n+"(opacity="+t+")"}},testProp:function(e){for(var i=t.documentElement.style,n=0;n<e.length;n++)if(e[n]in i)return e[n];return!1},getTranslateString:function(e){var t=r.Browser.webkit3d,i="translate"+(t?"3d":"")+"(",n=(t?",0":"")+")";return i+e.x+"px,"+e.y+"px"+n},getScaleString:function(e,t){var i=r.DomUtil.getTranslateString(t.add(t.multiplyBy(-1*e))),n=" scale("+e+") ";return i+n},setPosition:function(e,t,i){e._leaflet_pos=t,!i&&r.Browser.any3d?e.style[r.DomUtil.TRANSFORM]=r.DomUtil.getTranslateString(t):(e.style.left=t.x+"px",e.style.top=t.y+"px")},getPosition:function(e){return e._leaflet_pos}},r.DomUtil.TRANSFORM=r.DomUtil.testProp(["transform","WebkitTransform","OTransform","MozTransform","msTransform"]),r.DomUtil.TRANSITION=r.DomUtil.testProp(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),r.DomUtil.TRANSITION_END="webkitTransition"===r.DomUtil.TRANSITION||"OTransition"===r.DomUtil.TRANSITION?r.DomUtil.TRANSITION+"End":"transitionend",function(){if("onselectstart"in t)r.extend(r.DomUtil,{disableTextSelection:function(){r.DomEvent.on(e,"selectstart",r.DomEvent.preventDefault)},enableTextSelection:function(){r.DomEvent.off(e,"selectstart",r.DomEvent.preventDefault)}});else{var i=r.DomUtil.testProp(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);r.extend(r.DomUtil,{disableTextSelection:function(){if(i){var e=t.documentElement.style;this._userSelect=e[i],e[i]="none"}},enableTextSelection:function(){i&&(t.documentElement.style[i]=this._userSelect,delete this._userSelect)}})}r.extend(r.DomUtil,{disableImageDrag:function(){r.DomEvent.on(e,"dragstart",r.DomEvent.preventDefault)},enableImageDrag:function(){r.DomEvent.off(e,"dragstart",r.DomEvent.preventDefault)}})}(),r.LatLng=function(e,t,n){if(e=parseFloat(e),t=parseFloat(t),isNaN(e)||isNaN(t))throw new Error("Invalid LatLng object: ("+e+", "+t+")");this.lat=e,this.lng=t,n!==i&&(this.alt=parseFloat(n))},r.extend(r.LatLng,{DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,MAX_MARGIN:1e-9}),r.LatLng.prototype={equals:function(e){if(!e)return!1;e=r.latLng(e);var t=Math.max(Math.abs(this.lat-e.lat),Math.abs(this.lng-e.lng));return t<=r.LatLng.MAX_MARGIN},toString:function(e){return"LatLng("+r.Util.formatNum(this.lat,e)+", "+r.Util.formatNum(this.lng,e)+")"},distanceTo:function(e){e=r.latLng(e);var t=6378137,i=r.LatLng.DEG_TO_RAD,n=(e.lat-this.lat)*i,o=(e.lng-this.lng)*i,a=this.lat*i,s=e.lat*i,l=Math.sin(n/2),u=Math.sin(o/2),c=l*l+u*u*Math.cos(a)*Math.cos(s);return 2*t*Math.atan2(Math.sqrt(c),Math.sqrt(1-c))},wrap:function(e,t){var i=this.lng;return e=e||-180,t=t||180,i=(i+t)%(t-e)+(e>i||i===t?t:e),new r.LatLng(this.lat,i)}},r.latLng=function(e,t){return e instanceof r.LatLng?e:r.Util.isArray(e)?"number"==typeof e[0]||"string"==typeof e[0]?new r.LatLng(e[0],e[1],e[2]):null:e===i||null===e?e:"object"==typeof e&&"lat"in e?new r.LatLng(e.lat,"lng"in e?e.lng:e.lon):t===i?null:new r.LatLng(e,t)},r.LatLngBounds=function(e,t){if(e)for(var i=t?[e,t]:e,n=0,r=i.length;r>n;n++)this.extend(i[n])},r.LatLngBounds.prototype={extend:function(e){if(!e)return this;var t=r.latLng(e);return e=null!==t?t:r.latLngBounds(e),e instanceof r.LatLng?this._southWest||this._northEast?(this._southWest.lat=Math.min(e.lat,this._southWest.lat),this._southWest.lng=Math.min(e.lng,this._southWest.lng),this._northEast.lat=Math.max(e.lat,this._northEast.lat),this._northEast.lng=Math.max(e.lng,this._northEast.lng)):(this._southWest=new r.LatLng(e.lat,e.lng),this._northEast=new r.LatLng(e.lat,e.lng)):e instanceof r.LatLngBounds&&(this.extend(e._southWest),this.extend(e._northEast)),this},pad:function(e){var t=this._southWest,i=this._northEast,n=Math.abs(t.lat-i.lat)*e,o=Math.abs(t.lng-i.lng)*e;return new r.LatLngBounds(new r.LatLng(t.lat-n,t.lng-o),new r.LatLng(i.lat+n,i.lng+o))},getCenter:function(){return new r.LatLng((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new r.LatLng(this.getNorth(),this.getWest())},getSouthEast:function(){return new r.LatLng(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(e){e="number"==typeof e[0]||e instanceof r.LatLng?r.latLng(e):r.latLngBounds(e);var t,i,n=this._southWest,o=this._northEast;return e instanceof r.LatLngBounds?(t=e.getSouthWest(),i=e.getNorthEast()):t=i=e,t.lat>=n.lat&&i.lat<=o.lat&&t.lng>=n.lng&&i.lng<=o.lng},intersects:function(e){e=r.latLngBounds(e);var t=this._southWest,i=this._northEast,n=e.getSouthWest(),o=e.getNorthEast(),a=o.lat>=t.lat&&n.lat<=i.lat,s=o.lng>=t.lng&&n.lng<=i.lng;return a&&s},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(e){return e?(e=r.latLngBounds(e),this._southWest.equals(e.getSouthWest())&&this._northEast.equals(e.getNorthEast())):!1},isValid:function(){return!(!this._southWest||!this._northEast)}},r.latLngBounds=function(e,t){return!e||e instanceof r.LatLngBounds?e:new r.LatLngBounds(e,t)},r.Projection={},r.Projection.SphericalMercator={MAX_LATITUDE:85.0511287798,project:function(e){var t=r.LatLng.DEG_TO_RAD,i=this.MAX_LATITUDE,n=Math.max(Math.min(i,e.lat),-i),o=e.lng*t,a=n*t;return a=Math.log(Math.tan(Math.PI/4+a/2)),new r.Point(o,a)},unproject:function(e){var t=r.LatLng.RAD_TO_DEG,i=e.x*t,n=(2*Math.atan(Math.exp(e.y))-Math.PI/2)*t;return new r.LatLng(n,i)}},r.Projection.LonLat={project:function(e){return new r.Point(e.lng,e.lat)},unproject:function(e){return new r.LatLng(e.y,e.x)}},r.CRS={latLngToPoint:function(e,t){var i=this.projection.project(e),n=this.scale(t);return this.transformation._transform(i,n)},pointToLatLng:function(e,t){var i=this.scale(t),n=this.transformation.untransform(e,i);return this.projection.unproject(n)},project:function(e){return this.projection.project(e)},scale:function(e){return 256*Math.pow(2,e)},getSize:function(e){var t=this.scale(e);return r.point(t,t)}},r.CRS.Simple=r.extend({},r.CRS,{projection:r.Projection.LonLat,transformation:new r.Transformation(1,0,-1,0),scale:function(e){return Math.pow(2,e)}}),r.CRS.EPSG3857=r.extend({},r.CRS,{code:"EPSG:3857",projection:r.Projection.SphericalMercator,transformation:new r.Transformation(.5/Math.PI,.5,-.5/Math.PI,.5),project:function(e){var t=this.projection.project(e),i=6378137;return t.multiplyBy(i)}}),r.CRS.EPSG900913=r.extend({},r.CRS.EPSG3857,{code:"EPSG:900913"}),r.CRS.EPSG4326=r.extend({},r.CRS,{code:"EPSG:4326",projection:r.Projection.LonLat,transformation:new r.Transformation(1/360,.5,-1/360,.5)}),r.Map=r.Class.extend({includes:r.Mixin.Events,options:{crs:r.CRS.EPSG3857,fadeAnimation:r.DomUtil.TRANSITION&&!r.Browser.android23,trackResize:!0,markerZoomAnimation:r.DomUtil.TRANSITION&&r.Browser.any3d},initialize:function(e,t){t=r.setOptions(this,t),this._initContainer(e),this._initLayout(),this._onResize=r.bind(this._onResize,this),this._initEvents(),t.maxBounds&&this.setMaxBounds(t.maxBounds),t.center&&t.zoom!==i&&this.setView(r.latLng(t.center),t.zoom,{reset:!0}),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._tileLayersNum=0,this.callInitHooks(),this._addLayers(t.layers)},setView:function(e,t){return t=t===i?this.getZoom():t,this._resetView(r.latLng(e),this._limitZoom(t)),this},setZoom:function(e,t){return this._loaded?this.setView(this.getCenter(),e,{zoom:t}):(this._zoom=this._limitZoom(e),this)},zoomIn:function(e,t){return this.setZoom(this._zoom+(e||1),t)},zoomOut:function(e,t){return this.setZoom(this._zoom-(e||1),t)},setZoomAround:function(e,t,i){var n=this.getZoomScale(t),o=this.getSize().divideBy(2),a=e instanceof r.Point?e:this.latLngToContainerPoint(e),s=a.subtract(o).multiplyBy(1-1/n),l=this.containerPointToLatLng(o.add(s)); +return this.setView(l,t,{zoom:i})},fitBounds:function(e,t){t=t||{},e=e.getBounds?e.getBounds():r.latLngBounds(e);var i=r.point(t.paddingTopLeft||t.padding||[0,0]),n=r.point(t.paddingBottomRight||t.padding||[0,0]),o=this.getBoundsZoom(e,!1,i.add(n));o=t.maxZoom?Math.min(t.maxZoom,o):o;var a=n.subtract(i).divideBy(2),s=this.project(e.getSouthWest(),o),l=this.project(e.getNorthEast(),o),u=this.unproject(s.add(l).divideBy(2).add(a),o);return this.setView(u,o,t)},fitWorld:function(e){return this.fitBounds([[-90,-180],[90,180]],e)},panTo:function(e,t){return this.setView(e,this._zoom,{pan:t})},panBy:function(e){return this.fire("movestart"),this._rawPanBy(r.point(e)),this.fire("move"),this.fire("moveend")},setMaxBounds:function(e){return e=r.latLngBounds(e),this.options.maxBounds=e,e?(this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds,this)):this.off("moveend",this._panInsideMaxBounds,this)},panInsideBounds:function(e,t){var i=this.getCenter(),n=this._limitCenter(i,this._zoom,e);return i.equals(n)?this:this.panTo(n,t)},addLayer:function(e){var t=r.stamp(e);return this._layers[t]?this:(this._layers[t]=e,!e.options||isNaN(e.options.maxZoom)&&isNaN(e.options.minZoom)||(this._zoomBoundLayers[t]=e,this._updateZoomLevels()),this.options.zoomAnimation&&r.TileLayer&&e instanceof r.TileLayer&&(this._tileLayersNum++,this._tileLayersToLoad++,e.on("load",this._onTileLayerLoad,this)),this._loaded&&this._layerAdd(e),this)},removeLayer:function(e){var t=r.stamp(e);return this._layers[t]?(this._loaded&&e.onRemove(this),delete this._layers[t],this._loaded&&this.fire("layerremove",{layer:e}),this._zoomBoundLayers[t]&&(delete this._zoomBoundLayers[t],this._updateZoomLevels()),this.options.zoomAnimation&&r.TileLayer&&e instanceof r.TileLayer&&(this._tileLayersNum--,this._tileLayersToLoad--,e.off("load",this._onTileLayerLoad,this)),this):this},hasLayer:function(e){return e?r.stamp(e)in this._layers:!1},eachLayer:function(e,t){for(var i in this._layers)e.call(t,this._layers[i]);return this},invalidateSize:function(e){if(!this._loaded)return this;e=r.extend({animate:!1,pan:!0},e===!0?{animate:!0}:e);var t=this.getSize();this._sizeChanged=!0,this._initialCenter=null;var i=this.getSize(),n=t.divideBy(2).round(),o=i.divideBy(2).round(),a=n.subtract(o);return a.x||a.y?(e.animate&&e.pan?this.panBy(a):(e.pan&&this._rawPanBy(a),this.fire("move"),e.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(r.bind(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:t,newSize:i})):this},addHandler:function(e,t){if(!t)return this;var i=this[e]=new t(this);return this._handlers.push(i),this.options[e]&&i.enable(),this},remove:function(){this._loaded&&this.fire("unload"),this._initEvents("off");try{delete this._container._leaflet}catch(e){this._container._leaflet=i}return this._clearPanes(),this._clearControlPos&&this._clearControlPos(),this._clearHandlers(),this},getCenter:function(){return this._checkIfLoaded(),this._initialCenter&&!this._moved()?this._initialCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var e=this.getPixelBounds(),t=this.unproject(e.getBottomLeft()),i=this.unproject(e.getTopRight());return new r.LatLngBounds(t,i)},getMinZoom:function(){return this.options.minZoom===i?this._layersMinZoom===i?0:this._layersMinZoom:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===i?this._layersMaxZoom===i?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(e,t,i){e=r.latLngBounds(e);var n,o=this.getMinZoom()-(t?1:0),a=this.getMaxZoom(),s=this.getSize(),l=e.getNorthWest(),u=e.getSouthEast(),c=!0;i=r.point(i||[0,0]);do o++,n=this.project(u,o).subtract(this.project(l,o)).add(i),c=t?n.x<s.x||n.y<s.y:s.contains(n);while(c&&a>=o);return c&&t?null:t?o:o-1},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new r.Point(this._container.clientWidth,this._container.clientHeight),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(){var e=this._getTopLeftPoint();return new r.Bounds(e,e.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._initialTopLeftPoint},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(e){var t=this.options.crs;return t.scale(e)/t.scale(this._zoom)},getScaleZoom:function(e){return this._zoom+Math.log(e)/Math.LN2},project:function(e,t){return t=t===i?this._zoom:t,this.options.crs.latLngToPoint(r.latLng(e),t)},unproject:function(e,t){return t=t===i?this._zoom:t,this.options.crs.pointToLatLng(r.point(e),t)},layerPointToLatLng:function(e){var t=r.point(e).add(this.getPixelOrigin());return this.unproject(t)},latLngToLayerPoint:function(e){var t=this.project(r.latLng(e))._round();return t._subtract(this.getPixelOrigin())},containerPointToLayerPoint:function(e){return r.point(e).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(e){return r.point(e).add(this._getMapPanePos())},containerPointToLatLng:function(e){var t=this.containerPointToLayerPoint(r.point(e));return this.layerPointToLatLng(t)},latLngToContainerPoint:function(e){return this.layerPointToContainerPoint(this.latLngToLayerPoint(r.latLng(e)))},mouseEventToContainerPoint:function(e){return r.DomEvent.getMousePosition(e,this._container)},mouseEventToLayerPoint:function(e){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(e))},mouseEventToLatLng:function(e){return this.layerPointToLatLng(this.mouseEventToLayerPoint(e))},_initContainer:function(e){var t=this._container=r.DomUtil.get(e);if(!t)throw new Error("Map container not found.");if(t._leaflet)throw new Error("Map container is already initialized.");t._leaflet=!0},_initLayout:function(){var e=this._container;r.DomUtil.addClass(e,"leaflet-container"+(r.Browser.touch?" leaflet-touch":"")+(r.Browser.retina?" leaflet-retina":"")+(r.Browser.ielt9?" leaflet-oldie":"")+(this.options.fadeAnimation?" leaflet-fade-anim":""));var t=r.DomUtil.getStyle(e,"position");"absolute"!==t&&"relative"!==t&&"fixed"!==t&&(e.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var e=this._panes={};this._mapPane=e.mapPane=this._createPane("leaflet-map-pane",this._container),this._tilePane=e.tilePane=this._createPane("leaflet-tile-pane",this._mapPane),e.objectsPane=this._createPane("leaflet-objects-pane",this._mapPane),e.shadowPane=this._createPane("leaflet-shadow-pane"),e.overlayPane=this._createPane("leaflet-overlay-pane"),e.markerPane=this._createPane("leaflet-marker-pane"),e.popupPane=this._createPane("leaflet-popup-pane");var t=" leaflet-zoom-hide";this.options.markerZoomAnimation||(r.DomUtil.addClass(e.markerPane,t),r.DomUtil.addClass(e.shadowPane,t),r.DomUtil.addClass(e.popupPane,t))},_createPane:function(e,t){return r.DomUtil.create("div",e,t||this._panes.objectsPane)},_clearPanes:function(){this._container.removeChild(this._mapPane)},_addLayers:function(e){e=e?r.Util.isArray(e)?e:[e]:[];for(var t=0,i=e.length;i>t;t++)this.addLayer(e[t])},_resetView:function(e,t,i,n){var o=this._zoom!==t;n||(this.fire("movestart"),o&&this.fire("zoomstart")),this._zoom=t,this._initialCenter=e,this._initialTopLeftPoint=this._getNewTopLeftPoint(e),i?this._initialTopLeftPoint._add(this._getMapPanePos()):r.DomUtil.setPosition(this._mapPane,new r.Point(0,0)),this._tileLayersToLoad=this._tileLayersNum;var a=!this._loaded;this._loaded=!0,this.fire("viewreset",{hard:!i}),a&&(this.fire("load"),this.eachLayer(this._layerAdd,this)),this.fire("move"),(o||n)&&this.fire("zoomend"),this.fire("moveend",{hard:!i})},_rawPanBy:function(e){r.DomUtil.setPosition(this._mapPane,this._getMapPanePos().subtract(e))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_updateZoomLevels:function(){var e,t=1/0,n=-(1/0),r=this._getZoomSpan();for(e in this._zoomBoundLayers){var o=this._zoomBoundLayers[e];isNaN(o.options.minZoom)||(t=Math.min(t,o.options.minZoom)),isNaN(o.options.maxZoom)||(n=Math.max(n,o.options.maxZoom))}e===i?this._layersMaxZoom=this._layersMinZoom=i:(this._layersMaxZoom=n,this._layersMinZoom=t),r!==this._getZoomSpan()&&this.fire("zoomlevelschange")},_panInsideMaxBounds:function(){this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){if(r.DomEvent){t=t||"on",r.DomEvent[t](this._container,"click",this._onMouseClick,this);var i,n,o=["dblclick","mousedown","mouseup","mouseenter","mouseleave","mousemove","contextmenu"];for(i=0,n=o.length;n>i;i++)r.DomEvent[t](this._container,o[i],this._fireMouseEvent,this);this.options.trackResize&&r.DomEvent[t](e,"resize",this._onResize,this)}},_onResize:function(){r.Util.cancelAnimFrame(this._resizeRequest),this._resizeRequest=r.Util.requestAnimFrame(function(){this.invalidateSize({debounceMoveend:!0})},this,!1,this._container)},_onMouseClick:function(e){!this._loaded||!e._simulated&&(this.dragging&&this.dragging.moved()||this.boxZoom&&this.boxZoom.moved())||r.DomEvent._skipped(e)||(this.fire("preclick"),this._fireMouseEvent(e))},_fireMouseEvent:function(e){if(this._loaded&&!r.DomEvent._skipped(e)){var t=e.type;if(t="mouseenter"===t?"mouseover":"mouseleave"===t?"mouseout":t,this.hasEventListeners(t)){"contextmenu"===t&&r.DomEvent.preventDefault(e);var i=this.mouseEventToContainerPoint(e),n=this.containerPointToLayerPoint(i),o=this.layerPointToLatLng(n);this.fire(t,{latlng:o,layerPoint:n,containerPoint:i,originalEvent:e})}}},_onTileLayerLoad:function(){this._tileLayersToLoad--,this._tileLayersNum&&!this._tileLayersToLoad&&this.fire("tilelayersload")},_clearHandlers:function(){for(var e=0,t=this._handlers.length;t>e;e++)this._handlers[e].disable()},whenReady:function(e,t){return this._loaded?e.call(t||this,this):this.on("load",e,t),this},_layerAdd:function(e){e.onAdd(this),this.fire("layeradd",{layer:e})},_getMapPanePos:function(){return r.DomUtil.getPosition(this._mapPane)},_moved:function(){var e=this._getMapPanePos();return e&&!e.equals([0,0])},_getTopLeftPoint:function(){return this.getPixelOrigin().subtract(this._getMapPanePos())},_getNewTopLeftPoint:function(e,t){var i=this.getSize()._divideBy(2);return this.project(e,t)._subtract(i)._round()},_latLngToNewLayerPoint:function(e,t,i){var n=this._getNewTopLeftPoint(i,t).add(this._getMapPanePos());return this.project(e,t)._subtract(n)},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(e){return this.latLngToLayerPoint(e).subtract(this._getCenterLayerPoint())},_limitCenter:function(e,t,i){if(!i)return e;var n=this.project(e,t),o=this.getSize().divideBy(2),a=new r.Bounds(n.subtract(o),n.add(o)),s=this._getBoundsOffset(a,i,t);return this.unproject(n.add(s),t)},_limitOffset:function(e,t){if(!t)return e;var i=this.getPixelBounds(),n=new r.Bounds(i.min.add(e),i.max.add(e));return e.add(this._getBoundsOffset(n,t))},_getBoundsOffset:function(e,t,i){var n=this.project(t.getNorthWest(),i).subtract(e.min),o=this.project(t.getSouthEast(),i).subtract(e.max),a=this._rebound(n.x,-o.x),s=this._rebound(n.y,-o.y);return new r.Point(a,s)},_rebound:function(e,t){return e+t>0?Math.round(e-t)/2:Math.max(0,Math.ceil(e))-Math.max(0,Math.floor(t))},_limitZoom:function(e){var t=this.getMinZoom(),i=this.getMaxZoom();return Math.max(t,Math.min(i,e))}}),r.map=function(e,t){return new r.Map(e,t)},r.Projection.Mercator={MAX_LATITUDE:85.0840591556,R_MINOR:6356752.314245179,R_MAJOR:6378137,project:function(e){var t=r.LatLng.DEG_TO_RAD,i=this.MAX_LATITUDE,n=Math.max(Math.min(i,e.lat),-i),o=this.R_MAJOR,a=this.R_MINOR,s=e.lng*t*o,l=n*t,u=a/o,c=Math.sqrt(1-u*u),h=c*Math.sin(l);h=Math.pow((1-h)/(1+h),.5*c);var d=Math.tan(.5*(.5*Math.PI-l))/h;return l=-o*Math.log(d),new r.Point(s,l)},unproject:function(e){for(var t,i=r.LatLng.RAD_TO_DEG,n=this.R_MAJOR,o=this.R_MINOR,a=e.x*i/n,s=o/n,l=Math.sqrt(1-s*s),u=Math.exp(-e.y/n),c=Math.PI/2-2*Math.atan(u),h=15,d=1e-7,p=h,m=.1;Math.abs(m)>d&&--p>0;)t=l*Math.sin(c),m=Math.PI/2-2*Math.atan(u*Math.pow((1-t)/(1+t),.5*l))-c,c+=m;return new r.LatLng(c*i,a)}},r.CRS.EPSG3395=r.extend({},r.CRS,{code:"EPSG:3395",projection:r.Projection.Mercator,transformation:function(){var e=r.Projection.Mercator,t=e.R_MAJOR,i=.5/(Math.PI*t);return new r.Transformation(i,.5,-i,.5)}()}),r.TileLayer=r.Class.extend({includes:r.Mixin.Events,options:{minZoom:0,maxZoom:18,tileSize:256,subdomains:"abc",errorTileUrl:"",attribution:"",zoomOffset:0,opacity:1,unloadInvisibleTiles:r.Browser.mobile,updateWhenIdle:r.Browser.mobile},initialize:function(e,t){t=r.setOptions(this,t),t.detectRetina&&r.Browser.retina&&t.maxZoom>0&&(t.tileSize=Math.floor(t.tileSize/2),t.zoomOffset++,t.minZoom>0&&t.minZoom--,this.options.maxZoom--),t.bounds&&(t.bounds=r.latLngBounds(t.bounds)),this._url=e;var i=this.options.subdomains;"string"==typeof i&&(this.options.subdomains=i.split(""))},onAdd:function(e){this._map=e,this._animated=e._zoomAnimated,this._initContainer(),e.on({viewreset:this._reset,moveend:this._update},this),this._animated&&e.on({zoomanim:this._animateZoom,zoomend:this._endZoomAnim},this),this.options.updateWhenIdle||(this._limitedUpdate=r.Util.limitExecByInterval(this._update,150,this),e.on("move",this._limitedUpdate,this)),this._reset(),this._update()},addTo:function(e){return e.addLayer(this),this},onRemove:function(e){this._container.parentNode.removeChild(this._container),e.off({viewreset:this._reset,moveend:this._update},this),this._animated&&e.off({zoomanim:this._animateZoom,zoomend:this._endZoomAnim},this),this.options.updateWhenIdle||e.off("move",this._limitedUpdate,this),this._container=null,this._map=null},bringToFront:function(){var e=this._map._panes.tilePane;return this._container&&(e.appendChild(this._container),this._setAutoZIndex(e,Math.max)),this},bringToBack:function(){var e=this._map._panes.tilePane;return this._container&&(e.insertBefore(this._container,e.firstChild),this._setAutoZIndex(e,Math.min)),this},getAttribution:function(){return this.options.attribution},getContainer:function(){return this._container},setOpacity:function(e){return this.options.opacity=e,this._map&&this._updateOpacity(),this},setZIndex:function(e){return this.options.zIndex=e,this._updateZIndex(),this},setUrl:function(e,t){return this._url=e,t||this.redraw(),this},redraw:function(){return this._map&&(this._reset({hard:!0}),this._update()),this},_updateZIndex:function(){this._container&&this.options.zIndex!==i&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(e,t){var i,n,r,o=e.children,a=-t(1/0,-(1/0));for(n=0,r=o.length;r>n;n++)o[n]!==this._container&&(i=parseInt(o[n].style.zIndex,10),isNaN(i)||(a=t(a,i)));this.options.zIndex=this._container.style.zIndex=(isFinite(a)?a:0)+t(1,-1)},_updateOpacity:function(){var e,t=this._tiles;if(r.Browser.ielt9)for(e in t)r.DomUtil.setOpacity(t[e],this.options.opacity);else r.DomUtil.setOpacity(this._container,this.options.opacity)},_initContainer:function(){var e=this._map._panes.tilePane;if(!this._container){if(this._container=r.DomUtil.create("div","leaflet-layer"),this._updateZIndex(),this._animated){var t="leaflet-tile-container";this._bgBuffer=r.DomUtil.create("div",t,this._container),this._tileContainer=r.DomUtil.create("div",t,this._container)}else this._tileContainer=this._container;e.appendChild(this._container),this.options.opacity<1&&this._updateOpacity()}},_reset:function(e){for(var t in this._tiles)this.fire("tileunload",{tile:this._tiles[t]});this._tiles={},this._tilesToLoad=0,this.options.reuseTiles&&(this._unusedTiles=[]),this._tileContainer.innerHTML="",this._animated&&e&&e.hard&&this._clearBgBuffer(),this._initContainer()},_getTileSize:function(){var e=this._map,t=e.getZoom()+this.options.zoomOffset,i=this.options.maxNativeZoom,n=this.options.tileSize;return i&&t>i&&(n=Math.round(e.getZoomScale(t)/e.getZoomScale(i)*n)),n},_update:function(){if(this._map){var e=this._map,t=e.getPixelBounds(),i=e.getZoom(),n=this._getTileSize();if(!(i>this.options.maxZoom||i<this.options.minZoom)){var o=r.bounds(t.min.divideBy(n)._floor(),t.max.divideBy(n)._floor());this._addTilesFromCenterOut(o),(this.options.unloadInvisibleTiles||this.options.reuseTiles)&&this._removeOtherTiles(o)}}},_addTilesFromCenterOut:function(e){var i,n,o,a=[],s=e.getCenter();for(i=e.min.y;i<=e.max.y;i++)for(n=e.min.x;n<=e.max.x;n++)o=new r.Point(n,i),this._tileShouldBeLoaded(o)&&a.push(o);var l=a.length;if(0!==l){a.sort(function(e,t){return e.distanceTo(s)-t.distanceTo(s)});var u=t.createDocumentFragment();for(this._tilesToLoad||this.fire("loading"),this._tilesToLoad+=l,n=0;l>n;n++)this._addTile(a[n],u);this._tileContainer.appendChild(u)}},_tileShouldBeLoaded:function(e){if(e.x+":"+e.y in this._tiles)return!1;var t=this.options;if(!t.continuousWorld){var i=this._getWrapTileNum();if(t.noWrap&&(e.x<0||e.x>=i.x)||e.y<0||e.y>=i.y)return!1}if(t.bounds){var n=this._getTileSize(),r=e.multiplyBy(n),o=r.add([n,n]),a=this._map.unproject(r),s=this._map.unproject(o);if(t.continuousWorld||t.noWrap||(a=a.wrap(),s=s.wrap()),!t.bounds.intersects([a,s]))return!1}return!0},_removeOtherTiles:function(e){var t,i,n,r;for(r in this._tiles)t=r.split(":"),i=parseInt(t[0],10),n=parseInt(t[1],10),(i<e.min.x||i>e.max.x||n<e.min.y||n>e.max.y)&&this._removeTile(r)},_removeTile:function(e){var t=this._tiles[e];this.fire("tileunload",{tile:t,url:t.src}),this.options.reuseTiles?(r.DomUtil.removeClass(t,"leaflet-tile-loaded"),this._unusedTiles.push(t)):t.parentNode===this._tileContainer&&this._tileContainer.removeChild(t),r.Browser.android||(t.onload=null,t.src=r.Util.emptyImageUrl),delete this._tiles[e]},_addTile:function(e,t){var i=this._getTilePos(e),n=this._getTile();r.DomUtil.setPosition(n,i,r.Browser.chrome),this._tiles[e.x+":"+e.y]=n,this._loadTile(n,e),n.parentNode!==this._tileContainer&&t.appendChild(n)},_getZoomForUrl:function(){var e=this.options,t=this._map.getZoom();return e.zoomReverse&&(t=e.maxZoom-t),t+=e.zoomOffset,e.maxNativeZoom?Math.min(t,e.maxNativeZoom):t},_getTilePos:function(e){var t=this._map.getPixelOrigin(),i=this._getTileSize();return e.multiplyBy(i).subtract(t)},getTileUrl:function(e){return r.Util.template(this._url,r.extend({s:this._getSubdomain(e),z:e.z,x:e.x,y:e.y},this.options))},_getWrapTileNum:function(){var e=this._map.options.crs,t=e.getSize(this._map.getZoom());return t.divideBy(this._getTileSize())._floor()},_adjustTilePoint:function(e){var t=this._getWrapTileNum();this.options.continuousWorld||this.options.noWrap||(e.x=(e.x%t.x+t.x)%t.x),this.options.tms&&(e.y=t.y-e.y-1),e.z=this._getZoomForUrl()},_getSubdomain:function(e){var t=Math.abs(e.x+e.y)%this.options.subdomains.length;return this.options.subdomains[t]},_getTile:function(){if(this.options.reuseTiles&&this._unusedTiles.length>0){var e=this._unusedTiles.pop();return this._resetTile(e),e}return this._createTile()},_resetTile:function(){},_createTile:function(){var e=r.DomUtil.create("img","leaflet-tile");return e.style.width=e.style.height=this._getTileSize()+"px",e.galleryimg="no",e.onselectstart=e.onmousemove=r.Util.falseFn,r.Browser.ielt9&&this.options.opacity!==i&&r.DomUtil.setOpacity(e,this.options.opacity),r.Browser.mobileWebkit3d&&(e.style.WebkitBackfaceVisibility="hidden"),e},_loadTile:function(e,t){e._layer=this,e.onload=this._tileOnLoad,e.onerror=this._tileOnError,this._adjustTilePoint(t),e.src=this.getTileUrl(t),this.fire("tileloadstart",{tile:e,url:e.src})},_tileLoaded:function(){this._tilesToLoad--,this._animated&&r.DomUtil.addClass(this._tileContainer,"leaflet-zoom-animated"),this._tilesToLoad||(this.fire("load"),this._animated&&(clearTimeout(this._clearBgBufferTimer),this._clearBgBufferTimer=setTimeout(r.bind(this._clearBgBuffer,this),500)))},_tileOnLoad:function(){var e=this._layer;this.src!==r.Util.emptyImageUrl&&(r.DomUtil.addClass(this,"leaflet-tile-loaded"),e.fire("tileload",{tile:this,url:this.src})),e._tileLoaded()},_tileOnError:function(){var e=this._layer;e.fire("tileerror",{tile:this,url:this.src});var t=e.options.errorTileUrl;t&&(this.src=t),e._tileLoaded()}}),r.tileLayer=function(e,t){return new r.TileLayer(e,t)},r.TileLayer.WMS=r.TileLayer.extend({defaultWmsParams:{service:"WMS",request:"GetMap",version:"1.1.1",layers:"",styles:"",format:"image/jpeg",transparent:!1},initialize:function(e,t){this._url=e;var i=r.extend({},this.defaultWmsParams),n=t.tileSize||this.options.tileSize;t.detectRetina&&r.Browser.retina?i.width=i.height=2*n:i.width=i.height=n;for(var o in t)this.options.hasOwnProperty(o)||"crs"===o||(i[o]=t[o]);this.wmsParams=i,r.setOptions(this,t)},onAdd:function(e){this._crs=this.options.crs||e.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var t=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[t]=this._crs.code,r.TileLayer.prototype.onAdd.call(this,e)},getTileUrl:function(e){var t=this._map,i=this.options.tileSize,n=e.multiplyBy(i),o=n.add([i,i]),a=this._crs.project(t.unproject(n,e.z)),s=this._crs.project(t.unproject(o,e.z)),l=this._wmsVersion>=1.3&&this._crs===r.CRS.EPSG4326?[s.y,a.x,a.y,s.x].join(","):[a.x,s.y,s.x,a.y].join(","),u=r.Util.template(this._url,{s:this._getSubdomain(e)});return u+r.Util.getParamString(this.wmsParams,u,!0)+"&BBOX="+l},setParams:function(e,t){return r.extend(this.wmsParams,e),t||this.redraw(),this}}),r.tileLayer.wms=function(e,t){return new r.TileLayer.WMS(e,t)},r.TileLayer.Canvas=r.TileLayer.extend({options:{async:!1},initialize:function(e){r.setOptions(this,e)},redraw:function(){this._map&&(this._reset({hard:!0}),this._update());for(var e in this._tiles)this._redrawTile(this._tiles[e]);return this},_redrawTile:function(e){this.drawTile(e,e._tilePoint,this._map._zoom)},_createTile:function(){var e=r.DomUtil.create("canvas","leaflet-tile");return e.width=e.height=this.options.tileSize,e.onselectstart=e.onmousemove=r.Util.falseFn,e},_loadTile:function(e,t){e._layer=this,e._tilePoint=t,this._redrawTile(e),this.options.async||this.tileDrawn(e)},drawTile:function(){},tileDrawn:function(e){this._tileOnLoad.call(e)}}),r.tileLayer.canvas=function(e){return new r.TileLayer.Canvas(e)},r.ImageOverlay=r.Class.extend({includes:r.Mixin.Events,options:{opacity:1},initialize:function(e,t,i){this._url=e,this._bounds=r.latLngBounds(t),r.setOptions(this,i)},onAdd:function(e){this._map=e,this._image||this._initImage(),e._panes.overlayPane.appendChild(this._image),e.on("viewreset",this._reset,this),e.options.zoomAnimation&&r.Browser.any3d&&e.on("zoomanim",this._animateZoom,this),this._reset()},onRemove:function(e){e.getPanes().overlayPane.removeChild(this._image),e.off("viewreset",this._reset,this),e.options.zoomAnimation&&e.off("zoomanim",this._animateZoom,this)},addTo:function(e){return e.addLayer(this),this},setOpacity:function(e){return this.options.opacity=e,this._updateOpacity(),this},bringToFront:function(){return this._image&&this._map._panes.overlayPane.appendChild(this._image),this},bringToBack:function(){var e=this._map._panes.overlayPane;return this._image&&e.insertBefore(this._image,e.firstChild),this},setUrl:function(e){this._url=e,this._image.src=this._url},getAttribution:function(){return this.options.attribution},_initImage:function(){this._image=r.DomUtil.create("img","leaflet-image-layer"),this._map.options.zoomAnimation&&r.Browser.any3d?r.DomUtil.addClass(this._image,"leaflet-zoom-animated"):r.DomUtil.addClass(this._image,"leaflet-zoom-hide"),this._updateOpacity(),r.extend(this._image,{galleryimg:"no",onselectstart:r.Util.falseFn,onmousemove:r.Util.falseFn,onload:r.bind(this._onImageLoad,this),src:this._url})},_animateZoom:function(e){var t=this._map,i=this._image,n=t.getZoomScale(e.zoom),o=this._bounds.getNorthWest(),a=this._bounds.getSouthEast(),s=t._latLngToNewLayerPoint(o,e.zoom,e.center),l=t._latLngToNewLayerPoint(a,e.zoom,e.center)._subtract(s),u=s._add(l._multiplyBy(.5*(1-1/n)));i.style[r.DomUtil.TRANSFORM]=r.DomUtil.getTranslateString(u)+" scale("+n+") "},_reset:function(){var e=this._image,t=this._map.latLngToLayerPoint(this._bounds.getNorthWest()),i=this._map.latLngToLayerPoint(this._bounds.getSouthEast())._subtract(t);r.DomUtil.setPosition(e,t),e.style.width=i.x+"px",e.style.height=i.y+"px"},_onImageLoad:function(){this.fire("load")},_updateOpacity:function(){r.DomUtil.setOpacity(this._image,this.options.opacity)}}),r.imageOverlay=function(e,t,i){return new r.ImageOverlay(e,t,i)},r.Icon=r.Class.extend({options:{className:""},initialize:function(e){r.setOptions(this,e)},createIcon:function(e){return this._createIcon("icon",e)},createShadow:function(e){return this._createIcon("shadow",e)},_createIcon:function(e,t){var i=this._getIconUrl(e);if(!i){if("icon"===e)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var n;return n=t&&"IMG"===t.tagName?this._createImg(i,t):this._createImg(i),this._setIconStyles(n,e),n},_setIconStyles:function(e,t){var i,n=this.options,o=r.point(n[t+"Size"]);i="shadow"===t?r.point(n.shadowAnchor||n.iconAnchor):r.point(n.iconAnchor),!i&&o&&(i=o.divideBy(2,!0)),e.className="leaflet-marker-"+t+" "+n.className,i&&(e.style.marginLeft=-i.x+"px",e.style.marginTop=-i.y+"px"),o&&(e.style.width=o.x+"px",e.style.height=o.y+"px")},_createImg:function(e,i){return i=i||t.createElement("img"),i.src=e,i},_getIconUrl:function(e){return r.Browser.retina&&this.options[e+"RetinaUrl"]?this.options[e+"RetinaUrl"]:this.options[e+"Url"]}}),r.icon=function(e){return new r.Icon(e)},r.Icon.Default=r.Icon.extend({options:{iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],shadowSize:[41,41]},_getIconUrl:function(e){var t=e+"Url";if(this.options[t])return this.options[t];r.Browser.retina&&"icon"===e&&(e+="-2x");var i=r.Icon.Default.imagePath;if(!i)throw new Error("Couldn't autodetect L.Icon.Default.imagePath, set it manually.");return i+"/marker-"+e+".png"}}),r.Icon.Default.imagePath=function(){var e,i,n,r,o,a=t.getElementsByTagName("script"),s=/[\/^]leaflet[\-\._]?([\w\-\._]*)\.js\??/;for(e=0,i=a.length;i>e;e++)if(n=a[e].src,r=n.match(s))return o=n.split(s)[0],(o?o+"/":"")+"images"}(),r.Marker=r.Class.extend({includes:r.Mixin.Events,options:{icon:new r.Icon.Default,title:"",alt:"",clickable:!0,draggable:!1,keyboard:!0,zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250},initialize:function(e,t){r.setOptions(this,t),this._latlng=r.latLng(e)},onAdd:function(e){this._map=e,e.on("viewreset",this.update,this),this._initIcon(),this.update(),this.fire("add"),e.options.zoomAnimation&&e.options.markerZoomAnimation&&e.on("zoomanim",this._animateZoom,this)},addTo:function(e){return e.addLayer(this),this},onRemove:function(e){this.dragging&&this.dragging.disable(),this._removeIcon(),this._removeShadow(),this.fire("remove"),e.off({viewreset:this.update,zoomanim:this._animateZoom},this),this._map=null},getLatLng:function(){return this._latlng},setLatLng:function(e){return this._latlng=r.latLng(e),this.update(),this.fire("move",{latlng:this._latlng})},setZIndexOffset:function(e){return this.options.zIndexOffset=e,this.update(),this},setIcon:function(e){return this.options.icon=e,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup),this},update:function(){return this._icon&&this._setPos(this._map.latLngToLayerPoint(this._latlng).round()),this},_initIcon:function(){var e=this.options,t=this._map,i=t.options.zoomAnimation&&t.options.markerZoomAnimation,n=i?"leaflet-zoom-animated":"leaflet-zoom-hide",o=e.icon.createIcon(this._icon),a=!1;o!==this._icon&&(this._icon&&this._removeIcon(),a=!0,e.title&&(o.title=e.title),e.alt&&(o.alt=e.alt)),r.DomUtil.addClass(o,n),e.keyboard&&(o.tabIndex="0"),this._icon=o,this._initInteraction(),e.riseOnHover&&r.DomEvent.on(o,"mouseover",this._bringToFront,this).on(o,"mouseout",this._resetZIndex,this);var s=e.icon.createShadow(this._shadow),l=!1;s!==this._shadow&&(this._removeShadow(),l=!0),s&&r.DomUtil.addClass(s,n),this._shadow=s,e.opacity<1&&this._updateOpacity();var u=this._map._panes;a&&u.markerPane.appendChild(this._icon),s&&l&&u.shadowPane.appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&r.DomEvent.off(this._icon,"mouseover",this._bringToFront).off(this._icon,"mouseout",this._resetZIndex),this._map._panes.markerPane.removeChild(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&this._map._panes.shadowPane.removeChild(this._shadow),this._shadow=null},_setPos:function(e){r.DomUtil.setPosition(this._icon,e),this._shadow&&r.DomUtil.setPosition(this._shadow,e),this._zIndex=e.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(e){this._icon.style.zIndex=this._zIndex+e},_animateZoom:function(e){var t=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center).round();this._setPos(t)},_initInteraction:function(){if(this.options.clickable){var e=this._icon,t=["dblclick","mousedown","mouseover","mouseout","contextmenu"];r.DomUtil.addClass(e,"leaflet-clickable"),r.DomEvent.on(e,"click",this._onMouseClick,this),r.DomEvent.on(e,"keypress",this._onKeyPress,this);for(var i=0;i<t.length;i++)r.DomEvent.on(e,t[i],this._fireMouseEvent,this);r.Handler.MarkerDrag&&(this.dragging=new r.Handler.MarkerDrag(this),this.options.draggable&&this.dragging.enable())}},_onMouseClick:function(e){var t=this.dragging&&this.dragging.moved();(this.hasEventListeners(e.type)||t)&&r.DomEvent.stopPropagation(e),t||(this.dragging&&this.dragging._enabled||!this._map.dragging||!this._map.dragging.moved())&&this.fire(e.type,{originalEvent:e,latlng:this._latlng})},_onKeyPress:function(e){13===e.keyCode&&this.fire("click",{originalEvent:e,latlng:this._latlng})},_fireMouseEvent:function(e){this.fire(e.type,{originalEvent:e,latlng:this._latlng}),"contextmenu"===e.type&&this.hasEventListeners(e.type)&&r.DomEvent.preventDefault(e),"mousedown"!==e.type?r.DomEvent.stopPropagation(e):r.DomEvent.preventDefault(e)},setOpacity:function(e){return this.options.opacity=e,this._map&&this._updateOpacity(),this},_updateOpacity:function(){r.DomUtil.setOpacity(this._icon,this.options.opacity),this._shadow&&r.DomUtil.setOpacity(this._shadow,this.options.opacity)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)}}),r.marker=function(e,t){return new r.Marker(e,t)},r.DivIcon=r.Icon.extend({options:{iconSize:[12,12],className:"leaflet-div-icon",html:!1},createIcon:function(e){var i=e&&"DIV"===e.tagName?e:t.createElement("div"),n=this.options;return n.html!==!1?i.innerHTML=n.html:i.innerHTML="",n.bgPos&&(i.style.backgroundPosition=-n.bgPos.x+"px "+-n.bgPos.y+"px"),this._setIconStyles(i,"icon"),i},createShadow:function(){return null}}),r.divIcon=function(e){return new r.DivIcon(e)},r.Map.mergeOptions({closePopupOnClick:!0}),r.Popup=r.Class.extend({includes:r.Mixin.Events,options:{minWidth:50,maxWidth:300,autoPan:!0,closeButton:!0,offset:[0,7],autoPanPadding:[5,5],keepInView:!1,className:"",zoomAnimation:!0},initialize:function(e,t){r.setOptions(this,e),this._source=t,this._animated=r.Browser.any3d&&this.options.zoomAnimation,this._isOpen=!1},onAdd:function(e){this._map=e,this._container||this._initLayout();var t=e.options.fadeAnimation;t&&r.DomUtil.setOpacity(this._container,0),e._panes.popupPane.appendChild(this._container),e.on(this._getEvents(),this),this.update(),t&&r.DomUtil.setOpacity(this._container,1),this.fire("open"),e.fire("popupopen",{popup:this}),this._source&&this._source.fire("popupopen",{popup:this})},addTo:function(e){return e.addLayer(this),this},openOn:function(e){return e.openPopup(this),this},onRemove:function(e){e._panes.popupPane.removeChild(this._container),r.Util.falseFn(this._container.offsetWidth),e.off(this._getEvents(),this),e.options.fadeAnimation&&r.DomUtil.setOpacity(this._container,0),this._map=null,this.fire("close"),e.fire("popupclose",{popup:this}),this._source&&this._source.fire("popupclose",{popup:this})},getLatLng:function(){return this._latlng},setLatLng:function(e){return this._latlng=r.latLng(e),this._map&&(this._updatePosition(),this._adjustPan()), +this},getContent:function(){return this._content},setContent:function(e){return this._content=e,this.update(),this},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},_getEvents:function(){var e={viewreset:this._updatePosition};return this._animated&&(e.zoomanim=this._zoomAnimation),("closeOnClick"in this.options?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(e.preclick=this._close),this.options.keepInView&&(e.moveend=this._adjustPan),e},_close:function(){this._map&&this._map.closePopup(this)},_initLayout:function(){var e,t="leaflet-popup",i=t+" "+this.options.className+" leaflet-zoom-"+(this._animated?"animated":"hide"),n=this._container=r.DomUtil.create("div",i);this.options.closeButton&&(e=this._closeButton=r.DomUtil.create("a",t+"-close-button",n),e.href="#close",e.innerHTML="×",r.DomEvent.disableClickPropagation(e),r.DomEvent.on(e,"click",this._onCloseButtonClick,this));var o=this._wrapper=r.DomUtil.create("div",t+"-content-wrapper",n);r.DomEvent.disableClickPropagation(o),this._contentNode=r.DomUtil.create("div",t+"-content",o),r.DomEvent.disableScrollPropagation(this._contentNode),r.DomEvent.on(o,"contextmenu",r.DomEvent.stopPropagation),this._tipContainer=r.DomUtil.create("div",t+"-tip-container",n),this._tip=r.DomUtil.create("div",t+"-tip",this._tipContainer)},_updateContent:function(){if(this._content){if("string"==typeof this._content)this._contentNode.innerHTML=this._content;else{for(;this._contentNode.hasChildNodes();)this._contentNode.removeChild(this._contentNode.firstChild);this._contentNode.appendChild(this._content)}this.fire("contentupdate")}},_updateLayout:function(){var e=this._contentNode,t=e.style;t.width="",t.whiteSpace="nowrap";var i=e.offsetWidth;i=Math.min(i,this.options.maxWidth),i=Math.max(i,this.options.minWidth),t.width=i+1+"px",t.whiteSpace="",t.height="";var n=e.offsetHeight,o=this.options.maxHeight,a="leaflet-popup-scrolled";o&&n>o?(t.height=o+"px",r.DomUtil.addClass(e,a)):r.DomUtil.removeClass(e,a),this._containerWidth=this._container.offsetWidth},_updatePosition:function(){if(this._map){var e=this._map.latLngToLayerPoint(this._latlng),t=this._animated,i=r.point(this.options.offset);t&&r.DomUtil.setPosition(this._container,e),this._containerBottom=-i.y-(t?0:e.y),this._containerLeft=-Math.round(this._containerWidth/2)+i.x+(t?0:e.x),this._container.style.bottom=this._containerBottom+"px",this._container.style.left=this._containerLeft+"px"}},_zoomAnimation:function(e){var t=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center);r.DomUtil.setPosition(this._container,t)},_adjustPan:function(){if(this.options.autoPan){var e=this._map,t=this._container.offsetHeight,i=this._containerWidth,n=new r.Point(this._containerLeft,-t-this._containerBottom);this._animated&&n._add(r.DomUtil.getPosition(this._container));var o=e.layerPointToContainerPoint(n),a=r.point(this.options.autoPanPadding),s=r.point(this.options.autoPanPaddingTopLeft||a),l=r.point(this.options.autoPanPaddingBottomRight||a),u=e.getSize(),c=0,h=0;o.x+i+l.x>u.x&&(c=o.x+i-u.x+l.x),o.x-c-s.x<0&&(c=o.x-s.x),o.y+t+l.y>u.y&&(h=o.y+t-u.y+l.y),o.y-h-s.y<0&&(h=o.y-s.y),(c||h)&&e.fire("autopanstart").panBy([c,h])}},_onCloseButtonClick:function(e){this._close(),r.DomEvent.stop(e)}}),r.popup=function(e,t){return new r.Popup(e,t)},r.Map.include({openPopup:function(e,t,i){if(this.closePopup(),!(e instanceof r.Popup)){var n=e;e=new r.Popup(i).setLatLng(t).setContent(n)}return e._isOpen=!0,this._popup=e,this.addLayer(e)},closePopup:function(e){return e&&e!==this._popup||(e=this._popup,this._popup=null),e&&(this.removeLayer(e),e._isOpen=!1),this}}),r.Marker.include({openPopup:function(){return this._popup&&this._map&&!this._map.hasLayer(this._popup)&&(this._popup.setLatLng(this._latlng),this._map.openPopup(this._popup)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(){return this._popup&&(this._popup._isOpen?this.closePopup():this.openPopup()),this},bindPopup:function(e,t){var i=r.point(this.options.icon.options.popupAnchor||[0,0]);return i=i.add(r.Popup.prototype.options.offset),t&&t.offset&&(i=i.add(t.offset)),t=r.extend({offset:i},t),this._popupHandlersAdded||(this.on("click",this.togglePopup,this).on("remove",this.closePopup,this).on("move",this._movePopup,this),this._popupHandlersAdded=!0),e instanceof r.Popup?(r.setOptions(e,t),this._popup=e,e._source=this):this._popup=new r.Popup(t,this).setContent(e),this},setPopupContent:function(e){return this._popup&&this._popup.setContent(e),this},unbindPopup:function(){return this._popup&&(this._popup=null,this.off("click",this.togglePopup,this).off("remove",this.closePopup,this).off("move",this._movePopup,this),this._popupHandlersAdded=!1),this},getPopup:function(){return this._popup},_movePopup:function(e){this._popup.setLatLng(e.latlng)}}),r.LayerGroup=r.Class.extend({initialize:function(e){this._layers={};var t,i;if(e)for(t=0,i=e.length;i>t;t++)this.addLayer(e[t])},addLayer:function(e){var t=this.getLayerId(e);return this._layers[t]=e,this._map&&this._map.addLayer(e),this},removeLayer:function(e){var t=e in this._layers?e:this.getLayerId(e);return this._map&&this._layers[t]&&this._map.removeLayer(this._layers[t]),delete this._layers[t],this},hasLayer:function(e){return e?e in this._layers||this.getLayerId(e)in this._layers:!1},clearLayers:function(){return this.eachLayer(this.removeLayer,this),this},invoke:function(e){var t,i,n=Array.prototype.slice.call(arguments,1);for(t in this._layers)i=this._layers[t],i[e]&&i[e].apply(i,n);return this},onAdd:function(e){this._map=e,this.eachLayer(e.addLayer,e)},onRemove:function(e){this.eachLayer(e.removeLayer,e),this._map=null},addTo:function(e){return e.addLayer(this),this},eachLayer:function(e,t){for(var i in this._layers)e.call(t,this._layers[i]);return this},getLayer:function(e){return this._layers[e]},getLayers:function(){var e=[];for(var t in this._layers)e.push(this._layers[t]);return e},setZIndex:function(e){return this.invoke("setZIndex",e)},getLayerId:function(e){return r.stamp(e)}}),r.layerGroup=function(e){return new r.LayerGroup(e)},r.FeatureGroup=r.LayerGroup.extend({includes:r.Mixin.Events,statics:{EVENTS:"click dblclick mouseover mouseout mousemove contextmenu popupopen popupclose"},addLayer:function(e){return this.hasLayer(e)?this:("on"in e&&e.on(r.FeatureGroup.EVENTS,this._propagateEvent,this),r.LayerGroup.prototype.addLayer.call(this,e),this._popupContent&&e.bindPopup&&e.bindPopup(this._popupContent,this._popupOptions),this.fire("layeradd",{layer:e}))},removeLayer:function(e){return this.hasLayer(e)?(e in this._layers&&(e=this._layers[e]),"off"in e&&e.off(r.FeatureGroup.EVENTS,this._propagateEvent,this),r.LayerGroup.prototype.removeLayer.call(this,e),this._popupContent&&this.invoke("unbindPopup"),this.fire("layerremove",{layer:e})):this},bindPopup:function(e,t){return this._popupContent=e,this._popupOptions=t,this.invoke("bindPopup",e,t)},openPopup:function(e){for(var t in this._layers){this._layers[t].openPopup(e);break}return this},setStyle:function(e){return this.invoke("setStyle",e)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var e=new r.LatLngBounds;return this.eachLayer(function(t){e.extend(t instanceof r.Marker?t.getLatLng():t.getBounds())}),e},_propagateEvent:function(e){e=r.extend({layer:e.target,target:this},e),this.fire(e.type,e)}}),r.featureGroup=function(e){return new r.FeatureGroup(e)},r.Path=r.Class.extend({includes:[r.Mixin.Events],statics:{CLIP_PADDING:function(){var t=r.Browser.mobile?1280:2e3,i=(t/Math.max(e.outerWidth,e.outerHeight)-1)/2;return Math.max(0,Math.min(.5,i))}()},options:{stroke:!0,color:"#0033ff",dashArray:null,lineCap:null,lineJoin:null,weight:5,opacity:.5,fill:!1,fillColor:null,fillOpacity:.2,clickable:!0},initialize:function(e){r.setOptions(this,e)},onAdd:function(e){this._map=e,this._container||(this._initElements(),this._initEvents()),this.projectLatlngs(),this._updatePath(),this._container&&this._map._pathRoot.appendChild(this._container),this.fire("add"),e.on({viewreset:this.projectLatlngs,moveend:this._updatePath},this)},addTo:function(e){return e.addLayer(this),this},onRemove:function(e){e._pathRoot.removeChild(this._container),this.fire("remove"),this._map=null,r.Browser.vml&&(this._container=null,this._stroke=null,this._fill=null),e.off({viewreset:this.projectLatlngs,moveend:this._updatePath},this)},projectLatlngs:function(){},setStyle:function(e){return r.setOptions(this,e),this._container&&this._updateStyle(),this},redraw:function(){return this._map&&(this.projectLatlngs(),this._updatePath()),this}}),r.Map.include({_updatePathViewport:function(){var e=r.Path.CLIP_PADDING,t=this.getSize(),i=r.DomUtil.getPosition(this._mapPane),n=i.multiplyBy(-1)._subtract(t.multiplyBy(e)._round()),o=n.add(t.multiplyBy(1+2*e)._round());this._pathViewport=new r.Bounds(n,o)}}),r.Path.SVG_NS="http://www.w3.org/2000/svg",r.Browser.svg=!(!t.createElementNS||!t.createElementNS(r.Path.SVG_NS,"svg").createSVGRect),r.Path=r.Path.extend({statics:{SVG:r.Browser.svg},bringToFront:function(){var e=this._map._pathRoot,t=this._container;return t&&e.lastChild!==t&&e.appendChild(t),this},bringToBack:function(){var e=this._map._pathRoot,t=this._container,i=e.firstChild;return t&&i!==t&&e.insertBefore(t,i),this},getPathString:function(){},_createElement:function(e){return t.createElementNS(r.Path.SVG_NS,e)},_initElements:function(){this._map._initPathRoot(),this._initPath(),this._initStyle()},_initPath:function(){this._container=this._createElement("g"),this._path=this._createElement("path"),this.options.className&&r.DomUtil.addClass(this._path,this.options.className),this._container.appendChild(this._path)},_initStyle:function(){this.options.stroke&&(this._path.setAttribute("stroke-linejoin","round"),this._path.setAttribute("stroke-linecap","round")),this.options.fill&&this._path.setAttribute("fill-rule","evenodd"),this.options.pointerEvents&&this._path.setAttribute("pointer-events",this.options.pointerEvents),this.options.clickable||this.options.pointerEvents||this._path.setAttribute("pointer-events","none"),this._updateStyle()},_updateStyle:function(){this.options.stroke?(this._path.setAttribute("stroke",this.options.color),this._path.setAttribute("stroke-opacity",this.options.opacity),this._path.setAttribute("stroke-width",this.options.weight),this.options.dashArray?this._path.setAttribute("stroke-dasharray",this.options.dashArray):this._path.removeAttribute("stroke-dasharray"),this.options.lineCap&&this._path.setAttribute("stroke-linecap",this.options.lineCap),this.options.lineJoin&&this._path.setAttribute("stroke-linejoin",this.options.lineJoin)):this._path.setAttribute("stroke","none"),this.options.fill?(this._path.setAttribute("fill",this.options.fillColor||this.options.color),this._path.setAttribute("fill-opacity",this.options.fillOpacity)):this._path.setAttribute("fill","none")},_updatePath:function(){var e=this.getPathString();e||(e="M0 0"),this._path.setAttribute("d",e)},_initEvents:function(){if(this.options.clickable){(r.Browser.svg||!r.Browser.vml)&&r.DomUtil.addClass(this._path,"leaflet-clickable"),r.DomEvent.on(this._container,"click",this._onMouseClick,this);for(var e=["dblclick","mousedown","mouseover","mouseout","mousemove","contextmenu"],t=0;t<e.length;t++)r.DomEvent.on(this._container,e[t],this._fireMouseEvent,this)}},_onMouseClick:function(e){this._map.dragging&&this._map.dragging.moved()||this._fireMouseEvent(e)},_fireMouseEvent:function(e){if(this._map&&this.hasEventListeners(e.type)){var t=this._map,i=t.mouseEventToContainerPoint(e),n=t.containerPointToLayerPoint(i),o=t.layerPointToLatLng(n);this.fire(e.type,{latlng:o,layerPoint:n,containerPoint:i,originalEvent:e}),"contextmenu"===e.type&&r.DomEvent.preventDefault(e),"mousemove"!==e.type&&r.DomEvent.stopPropagation(e)}}}),r.Map.include({_initPathRoot:function(){this._pathRoot||(this._pathRoot=r.Path.prototype._createElement("svg"),this._panes.overlayPane.appendChild(this._pathRoot),this.options.zoomAnimation&&r.Browser.any3d?(r.DomUtil.addClass(this._pathRoot,"leaflet-zoom-animated"),this.on({zoomanim:this._animatePathZoom,zoomend:this._endPathZoom})):r.DomUtil.addClass(this._pathRoot,"leaflet-zoom-hide"),this.on("moveend",this._updateSvgViewport),this._updateSvgViewport())},_animatePathZoom:function(e){var t=this.getZoomScale(e.zoom),i=this._getCenterOffset(e.center)._multiplyBy(-t)._add(this._pathViewport.min);this._pathRoot.style[r.DomUtil.TRANSFORM]=r.DomUtil.getTranslateString(i)+" scale("+t+") ",this._pathZooming=!0},_endPathZoom:function(){this._pathZooming=!1},_updateSvgViewport:function(){if(!this._pathZooming){this._updatePathViewport();var e=this._pathViewport,t=e.min,i=e.max,n=i.x-t.x,o=i.y-t.y,a=this._pathRoot,s=this._panes.overlayPane;r.Browser.mobileWebkit&&s.removeChild(a),r.DomUtil.setPosition(a,t),a.setAttribute("width",n),a.setAttribute("height",o),a.setAttribute("viewBox",[t.x,t.y,n,o].join(" ")),r.Browser.mobileWebkit&&s.appendChild(a)}}}),r.Path.include({bindPopup:function(e,t){return e instanceof r.Popup?this._popup=e:((!this._popup||t)&&(this._popup=new r.Popup(t,this)),this._popup.setContent(e)),this._popupHandlersAdded||(this.on("click",this._openPopup,this).on("remove",this.closePopup,this),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this._popup=null,this.off("click",this._openPopup).off("remove",this.closePopup),this._popupHandlersAdded=!1),this},openPopup:function(e){return this._popup&&(e=e||this._latlng||this._latlngs[Math.floor(this._latlngs.length/2)],this._openPopup({latlng:e})),this},closePopup:function(){return this._popup&&this._popup._close(),this},_openPopup:function(e){this._popup.setLatLng(e.latlng),this._map.openPopup(this._popup)}}),r.Browser.vml=!r.Browser.svg&&function(){try{var e=t.createElement("div");e.innerHTML='<v:shape adj="1"/>';var i=e.firstChild;return i.style.behavior="url(#default#VML)",i&&"object"==typeof i.adj}catch(n){return!1}}(),r.Path=r.Browser.svg||!r.Browser.vml?r.Path:r.Path.extend({statics:{VML:!0,CLIP_PADDING:.02},_createElement:function(){try{return t.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(e){return t.createElement("<lvml:"+e+' class="lvml">')}}catch(e){return function(e){return t.createElement("<"+e+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),_initPath:function(){var e=this._container=this._createElement("shape");r.DomUtil.addClass(e,"leaflet-vml-shape"+(this.options.className?" "+this.options.className:"")),this.options.clickable&&r.DomUtil.addClass(e,"leaflet-clickable"),e.coordsize="1 1",this._path=this._createElement("path"),e.appendChild(this._path),this._map._pathRoot.appendChild(e)},_initStyle:function(){this._updateStyle()},_updateStyle:function(){var e=this._stroke,t=this._fill,i=this.options,n=this._container;n.stroked=i.stroke,n.filled=i.fill,i.stroke?(e||(e=this._stroke=this._createElement("stroke"),e.endcap="round",n.appendChild(e)),e.weight=i.weight+"px",e.color=i.color,e.opacity=i.opacity,i.dashArray?e.dashStyle=r.Util.isArray(i.dashArray)?i.dashArray.join(" "):i.dashArray.replace(/( *, *)/g," "):e.dashStyle="",i.lineCap&&(e.endcap=i.lineCap.replace("butt","flat")),i.lineJoin&&(e.joinstyle=i.lineJoin)):e&&(n.removeChild(e),this._stroke=null),i.fill?(t||(t=this._fill=this._createElement("fill"),n.appendChild(t)),t.color=i.fillColor||i.color,t.opacity=i.fillOpacity):t&&(n.removeChild(t),this._fill=null)},_updatePath:function(){var e=this._container.style;e.display="none",this._path.v=this.getPathString()+" ",e.display=""}}),r.Map.include(r.Browser.svg||!r.Browser.vml?{}:{_initPathRoot:function(){if(!this._pathRoot){var e=this._pathRoot=t.createElement("div");e.className="leaflet-vml-container",this._panes.overlayPane.appendChild(e),this.on("moveend",this._updatePathViewport),this._updatePathViewport()}}}),r.Browser.canvas=function(){return!!t.createElement("canvas").getContext}(),r.Path=r.Path.SVG&&!e.L_PREFER_CANVAS||!r.Browser.canvas?r.Path:r.Path.extend({statics:{CANVAS:!0,SVG:!1},redraw:function(){return this._map&&(this.projectLatlngs(),this._requestUpdate()),this},setStyle:function(e){return r.setOptions(this,e),this._map&&(this._updateStyle(),this._requestUpdate()),this},onRemove:function(e){e.off("viewreset",this.projectLatlngs,this).off("moveend",this._updatePath,this),this.options.clickable&&(this._map.off("click",this._onClick,this),this._map.off("mousemove",this._onMouseMove,this)),this._requestUpdate(),this.fire("remove"),this._map=null},_requestUpdate:function(){this._map&&!r.Path._updateRequest&&(r.Path._updateRequest=r.Util.requestAnimFrame(this._fireMapMoveEnd,this._map))},_fireMapMoveEnd:function(){r.Path._updateRequest=null,this.fire("moveend")},_initElements:function(){this._map._initPathRoot(),this._ctx=this._map._canvasCtx},_updateStyle:function(){var e=this.options;e.stroke&&(this._ctx.lineWidth=e.weight,this._ctx.strokeStyle=e.color),e.fill&&(this._ctx.fillStyle=e.fillColor||e.color),e.lineCap&&(this._ctx.lineCap=e.lineCap),e.lineJoin&&(this._ctx.lineJoin=e.lineJoin)},_drawPath:function(){var e,t,i,n,o,a;for(this._ctx.beginPath(),e=0,i=this._parts.length;i>e;e++){for(t=0,n=this._parts[e].length;n>t;t++)o=this._parts[e][t],a=(0===t?"move":"line")+"To",this._ctx[a](o.x,o.y);this instanceof r.Polygon&&this._ctx.closePath()}},_checkIfEmpty:function(){return!this._parts.length},_updatePath:function(){if(!this._checkIfEmpty()){var e=this._ctx,t=this.options;this._drawPath(),e.save(),this._updateStyle(),t.fill&&(e.globalAlpha=t.fillOpacity,e.fill(t.fillRule||"evenodd")),t.stroke&&(e.globalAlpha=t.opacity,e.stroke()),e.restore()}},_initEvents:function(){this.options.clickable&&(this._map.on("mousemove",this._onMouseMove,this),this._map.on("click dblclick contextmenu",this._fireMouseEvent,this))},_fireMouseEvent:function(e){this._containsPoint(e.layerPoint)&&this.fire(e.type,e)},_onMouseMove:function(e){this._map&&!this._map._animatingZoom&&(this._containsPoint(e.layerPoint)?(this._ctx.canvas.style.cursor="pointer",this._mouseInside=!0,this.fire("mouseover",e)):this._mouseInside&&(this._ctx.canvas.style.cursor="",this._mouseInside=!1,this.fire("mouseout",e)))}}),r.Map.include(r.Path.SVG&&!e.L_PREFER_CANVAS||!r.Browser.canvas?{}:{_initPathRoot:function(){var e,i=this._pathRoot;i||(i=this._pathRoot=t.createElement("canvas"),i.style.position="absolute",e=this._canvasCtx=i.getContext("2d"),e.lineCap="round",e.lineJoin="round",this._panes.overlayPane.appendChild(i),this.options.zoomAnimation&&(this._pathRoot.className="leaflet-zoom-animated",this.on("zoomanim",this._animatePathZoom),this.on("zoomend",this._endPathZoom)),this.on("moveend",this._updateCanvasViewport),this._updateCanvasViewport())},_updateCanvasViewport:function(){if(!this._pathZooming){this._updatePathViewport();var e=this._pathViewport,t=e.min,i=e.max.subtract(t),n=this._pathRoot;r.DomUtil.setPosition(n,t),n.width=i.x,n.height=i.y,n.getContext("2d").translate(-t.x,-t.y)}}}),r.LineUtil={simplify:function(e,t){if(!t||!e.length)return e.slice();var i=t*t;return e=this._reducePoints(e,i),e=this._simplifyDP(e,i)},pointToSegmentDistance:function(e,t,i){return Math.sqrt(this._sqClosestPointOnSegment(e,t,i,!0))},closestPointOnSegment:function(e,t,i){return this._sqClosestPointOnSegment(e,t,i)},_simplifyDP:function(e,t){var n=e.length,r=typeof Uint8Array!=i+""?Uint8Array:Array,o=new r(n);o[0]=o[n-1]=1,this._simplifyDPStep(e,o,t,0,n-1);var a,s=[];for(a=0;n>a;a++)o[a]&&s.push(e[a]);return s},_simplifyDPStep:function(e,t,i,n,r){var o,a,s,l=0;for(a=n+1;r-1>=a;a++)s=this._sqClosestPointOnSegment(e[a],e[n],e[r],!0),s>l&&(o=a,l=s);l>i&&(t[o]=1,this._simplifyDPStep(e,t,i,n,o),this._simplifyDPStep(e,t,i,o,r))},_reducePoints:function(e,t){for(var i=[e[0]],n=1,r=0,o=e.length;o>n;n++)this._sqDist(e[n],e[r])>t&&(i.push(e[n]),r=n);return o-1>r&&i.push(e[o-1]),i},clipSegment:function(e,t,i,n){var r,o,a,s=n?this._lastCode:this._getBitCode(e,i),l=this._getBitCode(t,i);for(this._lastCode=l;;){if(!(s|l))return[e,t];if(s&l)return!1;r=s||l,o=this._getEdgeIntersection(e,t,r,i),a=this._getBitCode(o,i),r===s?(e=o,s=a):(t=o,l=a)}},_getEdgeIntersection:function(e,t,i,n){var o=t.x-e.x,a=t.y-e.y,s=n.min,l=n.max;return 8&i?new r.Point(e.x+o*(l.y-e.y)/a,l.y):4&i?new r.Point(e.x+o*(s.y-e.y)/a,s.y):2&i?new r.Point(l.x,e.y+a*(l.x-e.x)/o):1&i?new r.Point(s.x,e.y+a*(s.x-e.x)/o):void 0},_getBitCode:function(e,t){var i=0;return e.x<t.min.x?i|=1:e.x>t.max.x&&(i|=2),e.y<t.min.y?i|=4:e.y>t.max.y&&(i|=8),i},_sqDist:function(e,t){var i=t.x-e.x,n=t.y-e.y;return i*i+n*n},_sqClosestPointOnSegment:function(e,t,i,n){var o,a=t.x,s=t.y,l=i.x-a,u=i.y-s,c=l*l+u*u;return c>0&&(o=((e.x-a)*l+(e.y-s)*u)/c,o>1?(a=i.x,s=i.y):o>0&&(a+=l*o,s+=u*o)),l=e.x-a,u=e.y-s,n?l*l+u*u:new r.Point(a,s)}},r.Polyline=r.Path.extend({initialize:function(e,t){r.Path.prototype.initialize.call(this,t),this._latlngs=this._convertLatLngs(e)},options:{smoothFactor:1,noClip:!1},projectLatlngs:function(){this._originalPoints=[];for(var e=0,t=this._latlngs.length;t>e;e++)this._originalPoints[e]=this._map.latLngToLayerPoint(this._latlngs[e])},getPathString:function(){for(var e=0,t=this._parts.length,i="";t>e;e++)i+=this._getPathPartStr(this._parts[e]);return i},getLatLngs:function(){return this._latlngs},setLatLngs:function(e){return this._latlngs=this._convertLatLngs(e),this.redraw()},addLatLng:function(e){return this._latlngs.push(r.latLng(e)),this.redraw()},spliceLatLngs:function(){var e=[].splice.apply(this._latlngs,arguments);return this._convertLatLngs(this._latlngs,!0),this.redraw(),e},closestLayerPoint:function(e){for(var t,i,n=1/0,o=this._parts,a=null,s=0,l=o.length;l>s;s++)for(var u=o[s],c=1,h=u.length;h>c;c++){t=u[c-1],i=u[c];var d=r.LineUtil._sqClosestPointOnSegment(e,t,i,!0);n>d&&(n=d,a=r.LineUtil._sqClosestPointOnSegment(e,t,i))}return a&&(a.distance=Math.sqrt(n)),a},getBounds:function(){return new r.LatLngBounds(this.getLatLngs())},_convertLatLngs:function(e,t){var i,n,o=t?e:[];for(i=0,n=e.length;n>i;i++){if(r.Util.isArray(e[i])&&"number"!=typeof e[i][0])return;o[i]=r.latLng(e[i])}return o},_initEvents:function(){r.Path.prototype._initEvents.call(this)},_getPathPartStr:function(e){for(var t,i=r.Path.VML,n=0,o=e.length,a="";o>n;n++)t=e[n],i&&t._round(),a+=(n?"L":"M")+t.x+" "+t.y;return a},_clipPoints:function(){var e,t,i,n=this._originalPoints,o=n.length;if(this.options.noClip)return void(this._parts=[n]);this._parts=[];var a=this._parts,s=this._map._pathViewport,l=r.LineUtil;for(e=0,t=0;o-1>e;e++)i=l.clipSegment(n[e],n[e+1],s,e),i&&(a[t]=a[t]||[],a[t].push(i[0]),(i[1]!==n[e+1]||e===o-2)&&(a[t].push(i[1]),t++))},_simplifyPoints:function(){for(var e=this._parts,t=r.LineUtil,i=0,n=e.length;n>i;i++)e[i]=t.simplify(e[i],this.options.smoothFactor)},_updatePath:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),r.Path.prototype._updatePath.call(this))}}),r.polyline=function(e,t){return new r.Polyline(e,t)},r.PolyUtil={},r.PolyUtil.clipPolygon=function(e,t){var i,n,o,a,s,l,u,c,h,d=[1,4,2,8],p=r.LineUtil;for(n=0,u=e.length;u>n;n++)e[n]._code=p._getBitCode(e[n],t);for(a=0;4>a;a++){for(c=d[a],i=[],n=0,u=e.length,o=u-1;u>n;o=n++)s=e[n],l=e[o],s._code&c?l._code&c||(h=p._getEdgeIntersection(l,s,c,t),h._code=p._getBitCode(h,t),i.push(h)):(l._code&c&&(h=p._getEdgeIntersection(l,s,c,t),h._code=p._getBitCode(h,t),i.push(h)),i.push(s));e=i}return e},r.Polygon=r.Polyline.extend({options:{fill:!0},initialize:function(e,t){r.Polyline.prototype.initialize.call(this,e,t),this._initWithHoles(e)},_initWithHoles:function(e){var t,i,n;if(e&&r.Util.isArray(e[0])&&"number"!=typeof e[0][0])for(this._latlngs=this._convertLatLngs(e[0]),this._holes=e.slice(1),t=0,i=this._holes.length;i>t;t++)n=this._holes[t]=this._convertLatLngs(this._holes[t]),n[0].equals(n[n.length-1])&&n.pop();e=this._latlngs,e.length>=2&&e[0].equals(e[e.length-1])&&e.pop()},projectLatlngs:function(){if(r.Polyline.prototype.projectLatlngs.call(this),this._holePoints=[],this._holes){var e,t,i,n;for(e=0,i=this._holes.length;i>e;e++)for(this._holePoints[e]=[],t=0,n=this._holes[e].length;n>t;t++)this._holePoints[e][t]=this._map.latLngToLayerPoint(this._holes[e][t])}},setLatLngs:function(e){return e&&r.Util.isArray(e[0])&&"number"!=typeof e[0][0]?(this._initWithHoles(e),this.redraw()):r.Polyline.prototype.setLatLngs.call(this,e)},_clipPoints:function(){var e=this._originalPoints,t=[];if(this._parts=[e].concat(this._holePoints),!this.options.noClip){for(var i=0,n=this._parts.length;n>i;i++){var o=r.PolyUtil.clipPolygon(this._parts[i],this._map._pathViewport);o.length&&t.push(o)}this._parts=t}},_getPathPartStr:function(e){var t=r.Polyline.prototype._getPathPartStr.call(this,e);return t+(r.Browser.svg?"z":"x")}}),r.polygon=function(e,t){return new r.Polygon(e,t)},function(){function e(e){return r.FeatureGroup.extend({initialize:function(e,t){this._layers={},this._options=t,this.setLatLngs(e)},setLatLngs:function(t){var i=0,n=t.length;for(this.eachLayer(function(e){n>i?e.setLatLngs(t[i++]):this.removeLayer(e)},this);n>i;)this.addLayer(new e(t[i++],this._options));return this},getLatLngs:function(){var e=[];return this.eachLayer(function(t){e.push(t.getLatLngs())}),e}})}r.MultiPolyline=e(r.Polyline),r.MultiPolygon=e(r.Polygon),r.multiPolyline=function(e,t){return new r.MultiPolyline(e,t)},r.multiPolygon=function(e,t){return new r.MultiPolygon(e,t)}}(),r.Rectangle=r.Polygon.extend({initialize:function(e,t){r.Polygon.prototype.initialize.call(this,this._boundsToLatLngs(e),t)},setBounds:function(e){this.setLatLngs(this._boundsToLatLngs(e))},_boundsToLatLngs:function(e){return e=r.latLngBounds(e),[e.getSouthWest(),e.getNorthWest(),e.getNorthEast(),e.getSouthEast()]}}),r.rectangle=function(e,t){return new r.Rectangle(e,t)},r.Circle=r.Path.extend({initialize:function(e,t,i){r.Path.prototype.initialize.call(this,i),this._latlng=r.latLng(e),this._mRadius=t},options:{fill:!0},setLatLng:function(e){return this._latlng=r.latLng(e),this.redraw()},setRadius:function(e){return this._mRadius=e,this.redraw()},projectLatlngs:function(){var e=this._getLngRadius(),t=this._latlng,i=this._map.latLngToLayerPoint([t.lat,t.lng-e]);this._point=this._map.latLngToLayerPoint(t),this._radius=Math.max(this._point.x-i.x,1)},getBounds:function(){var e=this._getLngRadius(),t=this._mRadius/40075017*360,i=this._latlng;return new r.LatLngBounds([i.lat-t,i.lng-e],[i.lat+t,i.lng+e])},getLatLng:function(){return this._latlng},getPathString:function(){var e=this._point,t=this._radius;return this._checkIfEmpty()?"":r.Browser.svg?"M"+e.x+","+(e.y-t)+"A"+t+","+t+",0,1,1,"+(e.x-.1)+","+(e.y-t)+" z":(e._round(),t=Math.round(t),"AL "+e.x+","+e.y+" "+t+","+t+" 0,23592600")},getRadius:function(){return this._mRadius},_getLatRadius:function(){return this._mRadius/40075017*360},_getLngRadius:function(){return this._getLatRadius()/Math.cos(r.LatLng.DEG_TO_RAD*this._latlng.lat)},_checkIfEmpty:function(){if(!this._map)return!1;var e=this._map._pathViewport,t=this._radius,i=this._point;return i.x-t>e.max.x||i.y-t>e.max.y||i.x+t<e.min.x||i.y+t<e.min.y}}),r.circle=function(e,t,i){return new r.Circle(e,t,i)},r.CircleMarker=r.Circle.extend({options:{radius:10,weight:2},initialize:function(e,t){r.Circle.prototype.initialize.call(this,e,null,t),this._radius=this.options.radius},projectLatlngs:function(){this._point=this._map.latLngToLayerPoint(this._latlng)},_updateStyle:function(){r.Circle.prototype._updateStyle.call(this),this.setRadius(this.options.radius)},setLatLng:function(e){return r.Circle.prototype.setLatLng.call(this,e),this._popup&&this._popup._isOpen&&this._popup.setLatLng(e),this},setRadius:function(e){return this.options.radius=this._radius=e,this.redraw()},getRadius:function(){return this._radius}}),r.circleMarker=function(e,t){return new r.CircleMarker(e,t)},r.Polyline.include(r.Path.CANVAS?{_containsPoint:function(e,t){var i,n,o,a,s,l,u,c=this.options.weight/2;for(r.Browser.touch&&(c+=10),i=0,a=this._parts.length;a>i;i++)for(u=this._parts[i],n=0,s=u.length,o=s-1;s>n;o=n++)if((t||0!==n)&&(l=r.LineUtil.pointToSegmentDistance(e,u[o],u[n]),c>=l))return!0;return!1}}:{}),r.Polygon.include(r.Path.CANVAS?{_containsPoint:function(e){var t,i,n,o,a,s,l,u,c=!1;if(r.Polyline.prototype._containsPoint.call(this,e,!0))return!0;for(o=0,l=this._parts.length;l>o;o++)for(t=this._parts[o],a=0,u=t.length,s=u-1;u>a;s=a++)i=t[a],n=t[s],i.y>e.y!=n.y>e.y&&e.x<(n.x-i.x)*(e.y-i.y)/(n.y-i.y)+i.x&&(c=!c);return c}}:{}),r.Circle.include(r.Path.CANVAS?{_drawPath:function(){var e=this._point;this._ctx.beginPath(),this._ctx.arc(e.x,e.y,this._radius,0,2*Math.PI,!1)},_containsPoint:function(e){var t=this._point,i=this.options.stroke?this.options.weight/2:0;return e.distanceTo(t)<=this._radius+i}}:{}),r.CircleMarker.include(r.Path.CANVAS?{_updateStyle:function(){r.Path.prototype._updateStyle.call(this)}}:{}),r.GeoJSON=r.FeatureGroup.extend({initialize:function(e,t){r.setOptions(this,t),this._layers={},e&&this.addData(e)},addData:function(e){var t,i,n,o=r.Util.isArray(e)?e:e.features;if(o){for(t=0,i=o.length;i>t;t++)n=o[t],(n.geometries||n.geometry||n.features||n.coordinates)&&this.addData(o[t]);return this}var a=this.options;if(!a.filter||a.filter(e)){var s=r.GeoJSON.geometryToLayer(e,a.pointToLayer,a.coordsToLatLng,a);return s.feature=r.GeoJSON.asFeature(e),s.defaultOptions=s.options,this.resetStyle(s),a.onEachFeature&&a.onEachFeature(e,s),this.addLayer(s)}},resetStyle:function(e){var t=this.options.style;t&&(r.Util.extend(e.options,e.defaultOptions),this._setLayerStyle(e,t))},setStyle:function(e){this.eachLayer(function(t){this._setLayerStyle(t,e)},this)},_setLayerStyle:function(e,t){"function"==typeof t&&(t=t(e.feature)),e.setStyle&&e.setStyle(t)}}),r.extend(r.GeoJSON,{geometryToLayer:function(e,t,i,n){var o,a,s,l,u="Feature"===e.type?e.geometry:e,c=u.coordinates,h=[];switch(i=i||this.coordsToLatLng,u.type){case"Point":return o=i(c),t?t(e,o):new r.Marker(o);case"MultiPoint":for(s=0,l=c.length;l>s;s++)o=i(c[s]),h.push(t?t(e,o):new r.Marker(o));return new r.FeatureGroup(h);case"LineString":return a=this.coordsToLatLngs(c,0,i),new r.Polyline(a,n);case"Polygon":if(2===c.length&&!c[1].length)throw new Error("Invalid GeoJSON object.");return a=this.coordsToLatLngs(c,1,i),new r.Polygon(a,n);case"MultiLineString":return a=this.coordsToLatLngs(c,1,i),new r.MultiPolyline(a,n);case"MultiPolygon":return a=this.coordsToLatLngs(c,2,i),new r.MultiPolygon(a,n);case"GeometryCollection":for(s=0,l=u.geometries.length;l>s;s++)h.push(this.geometryToLayer({geometry:u.geometries[s],type:"Feature",properties:e.properties},t,i,n));return new r.FeatureGroup(h);default:throw new Error("Invalid GeoJSON object.")}},coordsToLatLng:function(e){return new r.LatLng(e[1],e[0],e[2])},coordsToLatLngs:function(e,t,i){var n,r,o,a=[];for(r=0,o=e.length;o>r;r++)n=t?this.coordsToLatLngs(e[r],t-1,i):(i||this.coordsToLatLng)(e[r]),a.push(n);return a},latLngToCoords:function(e){var t=[e.lng,e.lat];return e.alt!==i&&t.push(e.alt),t},latLngsToCoords:function(e){for(var t=[],i=0,n=e.length;n>i;i++)t.push(r.GeoJSON.latLngToCoords(e[i]));return t},getFeature:function(e,t){return e.feature?r.extend({},e.feature,{geometry:t}):r.GeoJSON.asFeature(t)},asFeature:function(e){return"Feature"===e.type?e:{type:"Feature",properties:{},geometry:e}}});var a={toGeoJSON:function(){return r.GeoJSON.getFeature(this,{type:"Point",coordinates:r.GeoJSON.latLngToCoords(this.getLatLng())})}};r.Marker.include(a),r.Circle.include(a),r.CircleMarker.include(a),r.Polyline.include({toGeoJSON:function(){return r.GeoJSON.getFeature(this,{type:"LineString",coordinates:r.GeoJSON.latLngsToCoords(this.getLatLngs())})}}),r.Polygon.include({toGeoJSON:function(){var e,t,i,n=[r.GeoJSON.latLngsToCoords(this.getLatLngs())];if(n[0].push(n[0][0]),this._holes)for(e=0,t=this._holes.length;t>e;e++)i=r.GeoJSON.latLngsToCoords(this._holes[e]),i.push(i[0]),n.push(i);return r.GeoJSON.getFeature(this,{ +type:"Polygon",coordinates:n})}}),function(){function e(e){return function(){var t=[];return this.eachLayer(function(e){t.push(e.toGeoJSON().geometry.coordinates)}),r.GeoJSON.getFeature(this,{type:e,coordinates:t})}}r.MultiPolyline.include({toGeoJSON:e("MultiLineString")}),r.MultiPolygon.include({toGeoJSON:e("MultiPolygon")}),r.LayerGroup.include({toGeoJSON:function(){var t,i=this.feature&&this.feature.geometry,n=[];if(i&&"MultiPoint"===i.type)return e("MultiPoint").call(this);var o=i&&"GeometryCollection"===i.type;return this.eachLayer(function(e){e.toGeoJSON&&(t=e.toGeoJSON(),n.push(o?t.geometry:r.GeoJSON.asFeature(t)))}),o?r.GeoJSON.getFeature(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}})}(),r.geoJson=function(e,t){return new r.GeoJSON(e,t)},r.DomEvent={addListener:function(e,t,i,n){var o,a,s,l=r.stamp(i),u="_leaflet_"+t+l;return e[u]?this:(o=function(t){return i.call(n||e,t||r.DomEvent._getEvent())},r.Browser.pointer&&0===t.indexOf("touch")?this.addPointerListener(e,t,o,l):(r.Browser.touch&&"dblclick"===t&&this.addDoubleTapListener&&this.addDoubleTapListener(e,o,l),"addEventListener"in e?"mousewheel"===t?(e.addEventListener("DOMMouseScroll",o,!1),e.addEventListener(t,o,!1)):"mouseenter"===t||"mouseleave"===t?(a=o,s="mouseenter"===t?"mouseover":"mouseout",o=function(t){return r.DomEvent._checkMouse(e,t)?a(t):void 0},e.addEventListener(s,o,!1)):"click"===t&&r.Browser.android?(a=o,o=function(e){return r.DomEvent._filterClick(e,a)},e.addEventListener(t,o,!1)):e.addEventListener(t,o,!1):"attachEvent"in e&&e.attachEvent("on"+t,o),e[u]=o,this))},removeListener:function(e,t,i){var n=r.stamp(i),o="_leaflet_"+t+n,a=e[o];return a?(r.Browser.pointer&&0===t.indexOf("touch")?this.removePointerListener(e,t,n):r.Browser.touch&&"dblclick"===t&&this.removeDoubleTapListener?this.removeDoubleTapListener(e,n):"removeEventListener"in e?"mousewheel"===t?(e.removeEventListener("DOMMouseScroll",a,!1),e.removeEventListener(t,a,!1)):"mouseenter"===t||"mouseleave"===t?e.removeEventListener("mouseenter"===t?"mouseover":"mouseout",a,!1):e.removeEventListener(t,a,!1):"detachEvent"in e&&e.detachEvent("on"+t,a),e[o]=null,this):this},stopPropagation:function(e){return e.stopPropagation?e.stopPropagation():e.cancelBubble=!0,r.DomEvent._skipped(e),this},disableScrollPropagation:function(e){var t=r.DomEvent.stopPropagation;return r.DomEvent.on(e,"mousewheel",t).on(e,"MozMousePixelScroll",t)},disableClickPropagation:function(e){for(var t=r.DomEvent.stopPropagation,i=r.Draggable.START.length-1;i>=0;i--)r.DomEvent.on(e,r.Draggable.START[i],t);return r.DomEvent.on(e,"click",r.DomEvent._fakeStop).on(e,"dblclick",t)},preventDefault:function(e){return e.preventDefault?e.preventDefault():e.returnValue=!1,this},stop:function(e){return r.DomEvent.preventDefault(e).stopPropagation(e)},getMousePosition:function(e,t){if(!t)return new r.Point(e.clientX,e.clientY);var i=t.getBoundingClientRect();return new r.Point(e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop)},getWheelDelta:function(e){var t=0;return e.wheelDelta&&(t=e.wheelDelta/120),e.detail&&(t=-e.detail/3),t},_skipEvents:{},_fakeStop:function(e){r.DomEvent._skipEvents[e.type]=!0},_skipped:function(e){var t=this._skipEvents[e.type];return this._skipEvents[e.type]=!1,t},_checkMouse:function(e,t){var i=t.relatedTarget;if(!i)return!0;try{for(;i&&i!==e;)i=i.parentNode}catch(n){return!1}return i!==e},_getEvent:function(){var t=e.event;if(!t)for(var i=arguments.callee.caller;i&&(t=i.arguments[0],!t||e.Event!==t.constructor);)i=i.caller;return t},_filterClick:function(e,t){var i=e.timeStamp||e.originalEvent.timeStamp,n=r.DomEvent._lastClick&&i-r.DomEvent._lastClick;return n&&n>100&&500>n||e.target._simulatedClick&&!e._simulated?void r.DomEvent.stop(e):(r.DomEvent._lastClick=i,t(e))}},r.DomEvent.on=r.DomEvent.addListener,r.DomEvent.off=r.DomEvent.removeListener,r.Draggable=r.Class.extend({includes:r.Mixin.Events,statics:{START:r.Browser.touch?["touchstart","mousedown"]:["mousedown"],END:{mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},MOVE:{mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"}},initialize:function(e,t){this._element=e,this._dragStartTarget=t||e},enable:function(){if(!this._enabled){for(var e=r.Draggable.START.length-1;e>=0;e--)r.DomEvent.on(this._dragStartTarget,r.Draggable.START[e],this._onDown,this);this._enabled=!0}},disable:function(){if(this._enabled){for(var e=r.Draggable.START.length-1;e>=0;e--)r.DomEvent.off(this._dragStartTarget,r.Draggable.START[e],this._onDown,this);this._enabled=!1,this._moved=!1}},_onDown:function(e){if(this._moved=!1,!e.shiftKey&&(1===e.which||1===e.button||e.touches)&&(r.DomEvent.stopPropagation(e),!r.Draggable._disabled&&(r.DomUtil.disableImageDrag(),r.DomUtil.disableTextSelection(),!this._moving))){var i=e.touches?e.touches[0]:e;this._startPoint=new r.Point(i.clientX,i.clientY),this._startPos=this._newPos=r.DomUtil.getPosition(this._element),r.DomEvent.on(t,r.Draggable.MOVE[e.type],this._onMove,this).on(t,r.Draggable.END[e.type],this._onUp,this)}},_onMove:function(e){if(e.touches&&e.touches.length>1)return void(this._moved=!0);var i=e.touches&&1===e.touches.length?e.touches[0]:e,n=new r.Point(i.clientX,i.clientY),o=n.subtract(this._startPoint);(o.x||o.y)&&(r.Browser.touch&&Math.abs(o.x)+Math.abs(o.y)<3||(r.DomEvent.preventDefault(e),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=r.DomUtil.getPosition(this._element).subtract(o),r.DomUtil.addClass(t.body,"leaflet-dragging"),this._lastTarget=e.target||e.srcElement,r.DomUtil.addClass(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(o),this._moving=!0,r.Util.cancelAnimFrame(this._animRequest),this._animRequest=r.Util.requestAnimFrame(this._updatePosition,this,!0,this._dragStartTarget)))},_updatePosition:function(){this.fire("predrag"),r.DomUtil.setPosition(this._element,this._newPos),this.fire("drag")},_onUp:function(){r.DomUtil.removeClass(t.body,"leaflet-dragging"),this._lastTarget&&(r.DomUtil.removeClass(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null);for(var e in r.Draggable.MOVE)r.DomEvent.off(t,r.Draggable.MOVE[e],this._onMove).off(t,r.Draggable.END[e],this._onUp);r.DomUtil.enableImageDrag(),r.DomUtil.enableTextSelection(),this._moved&&this._moving&&(r.Util.cancelAnimFrame(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1}}),r.Handler=r.Class.extend({initialize:function(e){this._map=e},enable:function(){this._enabled||(this._enabled=!0,this.addHooks())},disable:function(){this._enabled&&(this._enabled=!1,this.removeHooks())},enabled:function(){return!!this._enabled}}),r.Map.mergeOptions({dragging:!0,inertia:!r.Browser.android23,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,inertiaThreshold:r.Browser.touch?32:18,easeLinearity:.25,worldCopyJump:!1}),r.Map.Drag=r.Handler.extend({addHooks:function(){if(!this._draggable){var e=this._map;this._draggable=new r.Draggable(e._mapPane,e._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),e.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDrag,this),e.on("viewreset",this._onViewReset,this),e.whenReady(this._onViewReset,this))}this._draggable.enable()},removeHooks:function(){this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},_onDragStart:function(){var e=this._map;e._panAnim&&e._panAnim.stop(),e.fire("movestart").fire("dragstart"),e.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(){if(this._map.options.inertia){var e=this._lastTime=+new Date,t=this._lastPos=this._draggable._newPos;this._positions.push(t),this._times.push(e),e-this._times[0]>200&&(this._positions.shift(),this._times.shift())}this._map.fire("move").fire("drag")},_onViewReset:function(){var e=this._map.getSize()._divideBy(2),t=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=t.subtract(e).x,this._worldWidth=this._map.project([0,180]).x},_onPreDrag:function(){var e=this._worldWidth,t=Math.round(e/2),i=this._initialWorldOffset,n=this._draggable._newPos.x,r=(n-t+i)%e+t-i,o=(n+t+i)%e-t-i,a=Math.abs(r+i)<Math.abs(o+i)?r:o;this._draggable._newPos.x=a},_onDragEnd:function(e){var t=this._map,i=t.options,n=+new Date-this._lastTime,o=!i.inertia||n>i.inertiaThreshold||!this._positions[0];if(t.fire("dragend",e),o)t.fire("moveend");else{var a=this._lastPos.subtract(this._positions[0]),s=(this._lastTime+n-this._times[0])/1e3,l=i.easeLinearity,u=a.multiplyBy(l/s),c=u.distanceTo([0,0]),h=Math.min(i.inertiaMaxSpeed,c),d=u.multiplyBy(h/c),p=h/(i.inertiaDeceleration*l),m=d.multiplyBy(-p/2).round();m.x&&m.y?(m=t._limitOffset(m,t.options.maxBounds),r.Util.requestAnimFrame(function(){t.panBy(m,{duration:p,easeLinearity:l,noMoveStart:!0})})):t.fire("moveend")}}}),r.Map.addInitHook("addHandler","dragging",r.Map.Drag),r.Map.mergeOptions({doubleClickZoom:!0}),r.Map.DoubleClickZoom=r.Handler.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(e){var t=this._map,i=t.getZoom()+(e.originalEvent.shiftKey?-1:1);"center"===t.options.doubleClickZoom?t.setZoom(i):t.setZoomAround(e.containerPoint,i)}}),r.Map.addInitHook("addHandler","doubleClickZoom",r.Map.DoubleClickZoom),r.Map.mergeOptions({scrollWheelZoom:!0}),r.Map.ScrollWheelZoom=r.Handler.extend({addHooks:function(){r.DomEvent.on(this._map._container,"mousewheel",this._onWheelScroll,this),r.DomEvent.on(this._map._container,"MozMousePixelScroll",r.DomEvent.preventDefault),this._delta=0},removeHooks:function(){r.DomEvent.off(this._map._container,"mousewheel",this._onWheelScroll),r.DomEvent.off(this._map._container,"MozMousePixelScroll",r.DomEvent.preventDefault)},_onWheelScroll:function(e){var t=r.DomEvent.getWheelDelta(e);this._delta+=t,this._lastMousePos=this._map.mouseEventToContainerPoint(e),this._startTime||(this._startTime=+new Date);var i=Math.max(40-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(r.bind(this._performZoom,this),i),r.DomEvent.preventDefault(e),r.DomEvent.stopPropagation(e)},_performZoom:function(){var e=this._map,t=this._delta,i=e.getZoom();t=t>0?Math.ceil(t):Math.floor(t),t=Math.max(Math.min(t,4),-4),t=e._limitZoom(i+t)-i,this._delta=0,this._startTime=null,t&&("center"===e.options.scrollWheelZoom?e.setZoom(i+t):e.setZoomAround(this._lastMousePos,i+t))}}),r.Map.addInitHook("addHandler","scrollWheelZoom",r.Map.ScrollWheelZoom),r.extend(r.DomEvent,{_touchstart:r.Browser.msPointer?"MSPointerDown":r.Browser.pointer?"pointerdown":"touchstart",_touchend:r.Browser.msPointer?"MSPointerUp":r.Browser.pointer?"pointerup":"touchend",addDoubleTapListener:function(e,i,n){function o(e){var t;if(r.Browser.pointer?(m.push(e.pointerId),t=m.length):t=e.touches.length,!(t>1)){var i=Date.now(),n=i-(s||i);l=e.touches?e.touches[0]:e,u=n>0&&c>=n,s=i}}function a(e){if(r.Browser.pointer){var t=m.indexOf(e.pointerId);if(-1===t)return;m.splice(t,1)}if(u){if(r.Browser.pointer){var n,o={};for(var a in l)n=l[a],"function"==typeof n?o[a]=n.bind(l):o[a]=n;l=o}l.type="dblclick",i(l),s=null}}var s,l,u=!1,c=250,h="_leaflet_",d=this._touchstart,p=this._touchend,m=[];e[h+d+n]=o,e[h+p+n]=a;var f=r.Browser.pointer?t.documentElement:e;return e.addEventListener(d,o,!1),f.addEventListener(p,a,!1),r.Browser.pointer&&f.addEventListener(r.DomEvent.POINTER_CANCEL,a,!1),this},removeDoubleTapListener:function(e,i){var n="_leaflet_";return e.removeEventListener(this._touchstart,e[n+this._touchstart+i],!1),(r.Browser.pointer?t.documentElement:e).removeEventListener(this._touchend,e[n+this._touchend+i],!1),r.Browser.pointer&&t.documentElement.removeEventListener(r.DomEvent.POINTER_CANCEL,e[n+this._touchend+i],!1),this}}),r.extend(r.DomEvent,{POINTER_DOWN:r.Browser.msPointer?"MSPointerDown":"pointerdown",POINTER_MOVE:r.Browser.msPointer?"MSPointerMove":"pointermove",POINTER_UP:r.Browser.msPointer?"MSPointerUp":"pointerup",POINTER_CANCEL:r.Browser.msPointer?"MSPointerCancel":"pointercancel",_pointers:[],_pointerDocumentListener:!1,addPointerListener:function(e,t,i,n){switch(t){case"touchstart":return this.addPointerListenerStart(e,t,i,n);case"touchend":return this.addPointerListenerEnd(e,t,i,n);case"touchmove":return this.addPointerListenerMove(e,t,i,n);default:throw"Unknown touch event type"}},addPointerListenerStart:function(e,i,n,o){var a="_leaflet_",s=this._pointers,l=function(e){"mouse"!==e.pointerType&&e.pointerType!==e.MSPOINTER_TYPE_MOUSE&&r.DomEvent.preventDefault(e);for(var t=!1,i=0;i<s.length;i++)if(s[i].pointerId===e.pointerId){t=!0;break}t||s.push(e),e.touches=s.slice(),e.changedTouches=[e],n(e)};if(e[a+"touchstart"+o]=l,e.addEventListener(this.POINTER_DOWN,l,!1),!this._pointerDocumentListener){var u=function(e){for(var t=0;t<s.length;t++)if(s[t].pointerId===e.pointerId){s.splice(t,1);break}};t.documentElement.addEventListener(this.POINTER_UP,u,!1),t.documentElement.addEventListener(this.POINTER_CANCEL,u,!1),this._pointerDocumentListener=!0}return this},addPointerListenerMove:function(e,t,i,n){function r(e){if(e.pointerType!==e.MSPOINTER_TYPE_MOUSE&&"mouse"!==e.pointerType||0!==e.buttons){for(var t=0;t<a.length;t++)if(a[t].pointerId===e.pointerId){a[t]=e;break}e.touches=a.slice(),e.changedTouches=[e],i(e)}}var o="_leaflet_",a=this._pointers;return e[o+"touchmove"+n]=r,e.addEventListener(this.POINTER_MOVE,r,!1),this},addPointerListenerEnd:function(e,t,i,n){var r="_leaflet_",o=this._pointers,a=function(e){for(var t=0;t<o.length;t++)if(o[t].pointerId===e.pointerId){o.splice(t,1);break}e.touches=o.slice(),e.changedTouches=[e],i(e)};return e[r+"touchend"+n]=a,e.addEventListener(this.POINTER_UP,a,!1),e.addEventListener(this.POINTER_CANCEL,a,!1),this},removePointerListener:function(e,t,i){var n="_leaflet_",r=e[n+t+i];switch(t){case"touchstart":e.removeEventListener(this.POINTER_DOWN,r,!1);break;case"touchmove":e.removeEventListener(this.POINTER_MOVE,r,!1);break;case"touchend":e.removeEventListener(this.POINTER_UP,r,!1),e.removeEventListener(this.POINTER_CANCEL,r,!1)}return this}}),r.Map.mergeOptions({touchZoom:r.Browser.touch&&!r.Browser.android23,bounceAtZoomLimits:!0}),r.Map.TouchZoom=r.Handler.extend({addHooks:function(){r.DomEvent.on(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){r.DomEvent.off(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(e){var i=this._map;if(e.touches&&2===e.touches.length&&!i._animatingZoom&&!this._zooming){var n=i.mouseEventToLayerPoint(e.touches[0]),o=i.mouseEventToLayerPoint(e.touches[1]),a=i._getCenterLayerPoint();this._startCenter=n.add(o)._divideBy(2),this._startDist=n.distanceTo(o),this._moved=!1,this._zooming=!0,this._centerOffset=a.subtract(this._startCenter),i._panAnim&&i._panAnim.stop(),r.DomEvent.on(t,"touchmove",this._onTouchMove,this).on(t,"touchend",this._onTouchEnd,this),r.DomEvent.preventDefault(e)}},_onTouchMove:function(e){var t=this._map;if(e.touches&&2===e.touches.length&&this._zooming){var i=t.mouseEventToLayerPoint(e.touches[0]),n=t.mouseEventToLayerPoint(e.touches[1]);this._scale=i.distanceTo(n)/this._startDist,this._delta=i._add(n)._divideBy(2)._subtract(this._startCenter),1!==this._scale&&(t.options.bounceAtZoomLimits||!(t.getZoom()===t.getMinZoom()&&this._scale<1||t.getZoom()===t.getMaxZoom()&&this._scale>1))&&(this._moved||(r.DomUtil.addClass(t._mapPane,"leaflet-touching"),t.fire("movestart").fire("zoomstart"),this._moved=!0),r.Util.cancelAnimFrame(this._animRequest),this._animRequest=r.Util.requestAnimFrame(this._updateOnMove,this,!0,this._map._container),r.DomEvent.preventDefault(e))}},_updateOnMove:function(){var e=this._map,t=this._getScaleOrigin(),i=e.layerPointToLatLng(t),n=e.getScaleZoom(this._scale);e._animateZoom(i,n,this._startCenter,this._scale,this._delta,!1,!0)},_onTouchEnd:function(){if(!this._moved||!this._zooming)return void(this._zooming=!1);var e=this._map;this._zooming=!1,r.DomUtil.removeClass(e._mapPane,"leaflet-touching"),r.Util.cancelAnimFrame(this._animRequest),r.DomEvent.off(t,"touchmove",this._onTouchMove).off(t,"touchend",this._onTouchEnd);var i=this._getScaleOrigin(),n=e.layerPointToLatLng(i),o=e.getZoom(),a=e.getScaleZoom(this._scale)-o,s=a>0?Math.ceil(a):Math.floor(a),l=e._limitZoom(o+s),u=e.getZoomScale(l)/this._scale;e._animateZoom(n,l,i,u)},_getScaleOrigin:function(){var e=this._centerOffset.subtract(this._delta).divideBy(this._scale);return this._startCenter.add(e)}}),r.Map.addInitHook("addHandler","touchZoom",r.Map.TouchZoom),r.Map.mergeOptions({tap:!0,tapTolerance:15}),r.Map.Tap=r.Handler.extend({addHooks:function(){r.DomEvent.on(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){r.DomEvent.off(this._map._container,"touchstart",this._onDown,this)},_onDown:function(e){if(e.touches){if(r.DomEvent.preventDefault(e),this._fireClick=!0,e.touches.length>1)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var i=e.touches[0],n=i.target;this._startPos=this._newPos=new r.Point(i.clientX,i.clientY),n.tagName&&"a"===n.tagName.toLowerCase()&&r.DomUtil.addClass(n,"leaflet-active"),this._holdTimeout=setTimeout(r.bind(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",i))},this),1e3),r.DomEvent.on(t,"touchmove",this._onMove,this).on(t,"touchend",this._onUp,this)}},_onUp:function(e){if(clearTimeout(this._holdTimeout),r.DomEvent.off(t,"touchmove",this._onMove,this).off(t,"touchend",this._onUp,this),this._fireClick&&e&&e.changedTouches){var i=e.changedTouches[0],n=i.target;n&&n.tagName&&"a"===n.tagName.toLowerCase()&&r.DomUtil.removeClass(n,"leaflet-active"),this._isTapValid()&&this._simulateEvent("click",i)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(e){var t=e.touches[0];this._newPos=new r.Point(t.clientX,t.clientY)},_simulateEvent:function(i,n){var r=t.createEvent("MouseEvents");r._simulated=!0,n.target._simulatedClick=!0,r.initMouseEvent(i,!0,!0,e,1,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),n.target.dispatchEvent(r)}}),r.Browser.touch&&!r.Browser.pointer&&r.Map.addInitHook("addHandler","tap",r.Map.Tap),r.Map.mergeOptions({boxZoom:!0}),r.Map.BoxZoom=r.Handler.extend({initialize:function(e){this._map=e,this._container=e._container,this._pane=e._panes.overlayPane,this._moved=!1},addHooks:function(){r.DomEvent.on(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){r.DomEvent.off(this._container,"mousedown",this._onMouseDown),this._moved=!1},moved:function(){return this._moved},_onMouseDown:function(e){return this._moved=!1,!e.shiftKey||1!==e.which&&1!==e.button?!1:(r.DomUtil.disableTextSelection(),r.DomUtil.disableImageDrag(),this._startLayerPoint=this._map.mouseEventToLayerPoint(e),void r.DomEvent.on(t,"mousemove",this._onMouseMove,this).on(t,"mouseup",this._onMouseUp,this).on(t,"keydown",this._onKeyDown,this))},_onMouseMove:function(e){this._moved||(this._box=r.DomUtil.create("div","leaflet-zoom-box",this._pane),r.DomUtil.setPosition(this._box,this._startLayerPoint),this._container.style.cursor="crosshair",this._map.fire("boxzoomstart"));var t=this._startLayerPoint,i=this._box,n=this._map.mouseEventToLayerPoint(e),o=n.subtract(t),a=new r.Point(Math.min(n.x,t.x),Math.min(n.y,t.y));r.DomUtil.setPosition(i,a),this._moved=!0,i.style.width=Math.max(0,Math.abs(o.x)-4)+"px",i.style.height=Math.max(0,Math.abs(o.y)-4)+"px"},_finish:function(){this._moved&&(this._pane.removeChild(this._box),this._container.style.cursor=""),r.DomUtil.enableTextSelection(),r.DomUtil.enableImageDrag(),r.DomEvent.off(t,"mousemove",this._onMouseMove).off(t,"mouseup",this._onMouseUp).off(t,"keydown",this._onKeyDown)},_onMouseUp:function(e){this._finish();var t=this._map,i=t.mouseEventToLayerPoint(e);if(!this._startLayerPoint.equals(i)){var n=new r.LatLngBounds(t.layerPointToLatLng(this._startLayerPoint),t.layerPointToLatLng(i));t.fitBounds(n),t.fire("boxzoomend",{boxZoomBounds:n})}},_onKeyDown:function(e){27===e.keyCode&&this._finish()}}),r.Map.addInitHook("addHandler","boxZoom",r.Map.BoxZoom),r.Map.mergeOptions({keyboard:!0,keyboardPanOffset:80,keyboardZoomOffset:1}),r.Map.Keyboard=r.Handler.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,173]},initialize:function(e){this._map=e,this._setPanOffset(e.options.keyboardPanOffset),this._setZoomOffset(e.options.keyboardZoomOffset)},addHooks:function(){var e=this._map._container;-1===e.tabIndex&&(e.tabIndex="0"),r.DomEvent.on(e,"focus",this._onFocus,this).on(e,"blur",this._onBlur,this).on(e,"mousedown",this._onMouseDown,this),this._map.on("focus",this._addHooks,this).on("blur",this._removeHooks,this)},removeHooks:function(){this._removeHooks();var e=this._map._container;r.DomEvent.off(e,"focus",this._onFocus,this).off(e,"blur",this._onBlur,this).off(e,"mousedown",this._onMouseDown,this),this._map.off("focus",this._addHooks,this).off("blur",this._removeHooks,this)},_onMouseDown:function(){if(!this._focused){var i=t.body,n=t.documentElement,r=i.scrollTop||n.scrollTop,o=i.scrollLeft||n.scrollLeft;this._map._container.focus(),e.scrollTo(o,r)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanOffset:function(e){var t,i,n=this._panKeys={},r=this.keyCodes;for(t=0,i=r.left.length;i>t;t++)n[r.left[t]]=[-1*e,0];for(t=0,i=r.right.length;i>t;t++)n[r.right[t]]=[e,0];for(t=0,i=r.down.length;i>t;t++)n[r.down[t]]=[0,e];for(t=0,i=r.up.length;i>t;t++)n[r.up[t]]=[0,-1*e]},_setZoomOffset:function(e){var t,i,n=this._zoomKeys={},r=this.keyCodes;for(t=0,i=r.zoomIn.length;i>t;t++)n[r.zoomIn[t]]=e;for(t=0,i=r.zoomOut.length;i>t;t++)n[r.zoomOut[t]]=-e},_addHooks:function(){r.DomEvent.on(t,"keydown",this._onKeyDown,this)},_removeHooks:function(){r.DomEvent.off(t,"keydown",this._onKeyDown,this)},_onKeyDown:function(e){var t=e.keyCode,i=this._map;if(t in this._panKeys){if(i._panAnim&&i._panAnim._inProgress)return;i.panBy(this._panKeys[t]),i.options.maxBounds&&i.panInsideBounds(i.options.maxBounds)}else{if(!(t in this._zoomKeys))return;i.setZoom(i.getZoom()+this._zoomKeys[t])}r.DomEvent.stop(e)}}),r.Map.addInitHook("addHandler","keyboard",r.Map.Keyboard),r.Handler.MarkerDrag=r.Handler.extend({initialize:function(e){this._marker=e},addHooks:function(){var e=this._marker._icon;this._draggable||(this._draggable=new r.Draggable(e,e)),this._draggable.on("dragstart",this._onDragStart,this).on("drag",this._onDrag,this).on("dragend",this._onDragEnd,this),this._draggable.enable(),r.DomUtil.addClass(this._marker._icon,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off("dragstart",this._onDragStart,this).off("drag",this._onDrag,this).off("dragend",this._onDragEnd,this),this._draggable.disable(),r.DomUtil.removeClass(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_onDragStart:function(){this._marker.closePopup().fire("movestart").fire("dragstart")},_onDrag:function(){var e=this._marker,t=e._shadow,i=r.DomUtil.getPosition(e._icon),n=e._map.layerPointToLatLng(i);t&&r.DomUtil.setPosition(t,i),e._latlng=n,e.fire("move",{latlng:n}).fire("drag")},_onDragEnd:function(e){this._marker.fire("moveend").fire("dragend",e)}}),r.Control=r.Class.extend({options:{position:"topright"},initialize:function(e){r.setOptions(this,e)},getPosition:function(){return this.options.position},setPosition:function(e){var t=this._map;return t&&t.removeControl(this),this.options.position=e,t&&t.addControl(this),this},getContainer:function(){return this._container},addTo:function(e){this._map=e;var t=this._container=this.onAdd(e),i=this.getPosition(),n=e._controlCorners[i];return r.DomUtil.addClass(t,"leaflet-control"),-1!==i.indexOf("bottom")?n.insertBefore(t,n.firstChild):n.appendChild(t),this},removeFrom:function(e){var t=this.getPosition(),i=e._controlCorners[t];return i.removeChild(this._container),this._map=null,this.onRemove&&this.onRemove(e),this},_refocusOnMap:function(){this._map&&this._map.getContainer().focus()}}),r.control=function(e){return new r.Control(e)},r.Map.include({addControl:function(e){return e.addTo(this),this},removeControl:function(e){return e.removeFrom(this),this},_initControlPos:function(){function e(e,o){var a=i+e+" "+i+o;t[e+o]=r.DomUtil.create("div",a,n)}var t=this._controlCorners={},i="leaflet-",n=this._controlContainer=r.DomUtil.create("div",i+"control-container",this._container);e("top","left"),e("top","right"),e("bottom","left"),e("bottom","right")},_clearControlPos:function(){this._container.removeChild(this._controlContainer)}}),r.Control.Zoom=r.Control.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"-",zoomOutTitle:"Zoom out"},onAdd:function(e){var t="leaflet-control-zoom",i=r.DomUtil.create("div",t+" leaflet-bar");return this._map=e,this._zoomInButton=this._createButton(this.options.zoomInText,this.options.zoomInTitle,t+"-in",i,this._zoomIn,this),this._zoomOutButton=this._createButton(this.options.zoomOutText,this.options.zoomOutTitle,t+"-out",i,this._zoomOut,this),this._updateDisabled(),e.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(e){e.off("zoomend zoomlevelschange",this._updateDisabled,this)},_zoomIn:function(e){this._map.zoomIn(e.shiftKey?3:1)},_zoomOut:function(e){this._map.zoomOut(e.shiftKey?3:1)},_createButton:function(e,t,i,n,o,a){var s=r.DomUtil.create("a",i,n);s.innerHTML=e,s.href="#",s.title=t;var l=r.DomEvent.stopPropagation;return r.DomEvent.on(s,"click",l).on(s,"mousedown",l).on(s,"dblclick",l).on(s,"click",r.DomEvent.preventDefault).on(s,"click",o,a).on(s,"click",this._refocusOnMap,a),s},_updateDisabled:function(){var e=this._map,t="leaflet-disabled";r.DomUtil.removeClass(this._zoomInButton,t),r.DomUtil.removeClass(this._zoomOutButton,t),e._zoom===e.getMinZoom()&&r.DomUtil.addClass(this._zoomOutButton,t),e._zoom===e.getMaxZoom()&&r.DomUtil.addClass(this._zoomInButton,t)}}),r.Map.mergeOptions({zoomControl:!0}),r.Map.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new r.Control.Zoom,this.addControl(this.zoomControl))}),r.control.zoom=function(e){return new r.Control.Zoom(e)},r.Control.Attribution=r.Control.extend({options:{position:"bottomright",prefix:'<a href="http://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'},initialize:function(e){r.setOptions(this,e),this._attributions={}},onAdd:function(e){this._container=r.DomUtil.create("div","leaflet-control-attribution"),r.DomEvent.disableClickPropagation(this._container);for(var t in e._layers)e._layers[t].getAttribution&&this.addAttribution(e._layers[t].getAttribution());return e.on("layeradd",this._onLayerAdd,this).on("layerremove",this._onLayerRemove,this),this._update(),this._container},onRemove:function(e){e.off("layeradd",this._onLayerAdd).off("layerremove",this._onLayerRemove)},setPrefix:function(e){return this.options.prefix=e,this._update(),this},addAttribution:function(e){return e?(this._attributions[e]||(this._attributions[e]=0),this._attributions[e]++,this._update(),this):void 0},removeAttribution:function(e){return e?(this._attributions[e]&&(this._attributions[e]--,this._update()),this):void 0},_update:function(){if(this._map){var e=[];for(var t in this._attributions)this._attributions[t]&&e.push(t);var i=[];this.options.prefix&&i.push(this.options.prefix),e.length&&i.push(e.join(", ")),this._container.innerHTML=i.join(" | ")}},_onLayerAdd:function(e){e.layer.getAttribution&&this.addAttribution(e.layer.getAttribution())},_onLayerRemove:function(e){e.layer.getAttribution&&this.removeAttribution(e.layer.getAttribution())}}),r.Map.mergeOptions({attributionControl:!0}),r.Map.addInitHook(function(){this.options.attributionControl&&(this.attributionControl=(new r.Control.Attribution).addTo(this))}),r.control.attribution=function(e){return new r.Control.Attribution(e)},r.Control.Scale=r.Control.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0,updateWhenIdle:!1},onAdd:function(e){this._map=e;var t="leaflet-control-scale",i=r.DomUtil.create("div",t),n=this.options;return this._addScales(n,t,i),e.on(n.updateWhenIdle?"moveend":"move",this._update,this),e.whenReady(this._update,this),i},onRemove:function(e){e.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(e,t,i){e.metric&&(this._mScale=r.DomUtil.create("div",t+"-line",i)),e.imperial&&(this._iScale=r.DomUtil.create("div",t+"-line",i))},_update:function(){var e=this._map.getBounds(),t=e.getCenter().lat,i=6378137*Math.PI*Math.cos(t*Math.PI/180),n=i*(e.getNorthEast().lng-e.getSouthWest().lng)/180,r=this._map.getSize(),o=this.options,a=0;r.x>0&&(a=n*(o.maxWidth/r.x)),this._updateScales(o,a)},_updateScales:function(e,t){e.metric&&t&&this._updateMetric(t),e.imperial&&t&&this._updateImperial(t)},_updateMetric:function(e){var t=this._getRoundNum(e);this._mScale.style.width=this._getScaleWidth(t/e)+"px",this._mScale.innerHTML=1e3>t?t+" m":t/1e3+" km"},_updateImperial:function(e){var t,i,n,r=3.2808399*e,o=this._iScale;r>5280?(t=r/5280,i=this._getRoundNum(t),o.style.width=this._getScaleWidth(i/t)+"px",o.innerHTML=i+" mi"):(n=this._getRoundNum(r),o.style.width=this._getScaleWidth(n/r)+"px",o.innerHTML=n+" ft")},_getScaleWidth:function(e){return Math.round(this.options.maxWidth*e)-10},_getRoundNum:function(e){var t=Math.pow(10,(Math.floor(e)+"").length-1),i=e/t;return i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:1,t*i}}),r.control.scale=function(e){return new r.Control.Scale(e)},r.Control.Layers=r.Control.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0},initialize:function(e,t,i){r.setOptions(this,i),this._layers={},this._lastZIndex=0,this._handlingClick=!1;for(var n in e)this._addLayer(e[n],n);for(n in t)this._addLayer(t[n],n,!0)},onAdd:function(e){return this._initLayout(),this._update(),e.on("layeradd",this._onLayerChange,this).on("layerremove",this._onLayerChange,this),this._container},onRemove:function(e){e.off("layeradd",this._onLayerChange,this).off("layerremove",this._onLayerChange,this)},addBaseLayer:function(e,t){return this._addLayer(e,t),this._update(),this},addOverlay:function(e,t){return this._addLayer(e,t,!0),this._update(),this},removeLayer:function(e){var t=r.stamp(e);return delete this._layers[t],this._update(),this},_initLayout:function(){var e="leaflet-control-layers",t=this._container=r.DomUtil.create("div",e);t.setAttribute("aria-haspopup",!0),r.Browser.touch?r.DomEvent.on(t,"click",r.DomEvent.stopPropagation):r.DomEvent.disableClickPropagation(t).disableScrollPropagation(t);var i=this._form=r.DomUtil.create("form",e+"-list");if(this.options.collapsed){r.Browser.android||r.DomEvent.on(t,"mouseover",this._expand,this).on(t,"mouseout",this._collapse,this);var n=this._layersLink=r.DomUtil.create("a",e+"-toggle",t);n.href="#",n.title="Layers",r.Browser.touch?r.DomEvent.on(n,"click",r.DomEvent.stop).on(n,"click",this._expand,this):r.DomEvent.on(n,"focus",this._expand,this),r.DomEvent.on(i,"click",function(){setTimeout(r.bind(this._onInputClick,this),0)},this),this._map.on("click",this._collapse,this)}else this._expand();this._baseLayersList=r.DomUtil.create("div",e+"-base",i),this._separator=r.DomUtil.create("div",e+"-separator",i),this._overlaysList=r.DomUtil.create("div",e+"-overlays",i),t.appendChild(i)},_addLayer:function(e,t,i){var n=r.stamp(e);this._layers[n]={layer:e,name:t,overlay:i},this.options.autoZIndex&&e.setZIndex&&(this._lastZIndex++,e.setZIndex(this._lastZIndex))},_update:function(){if(this._container){this._baseLayersList.innerHTML="",this._overlaysList.innerHTML="";var e,t,i=!1,n=!1;for(e in this._layers)t=this._layers[e],this._addItem(t),n=n||t.overlay,i=i||!t.overlay;this._separator.style.display=n&&i?"":"none"}},_onLayerChange:function(e){var t=this._layers[r.stamp(e.layer)];if(t){this._handlingClick||this._update(); +var i=t.overlay?"layeradd"===e.type?"overlayadd":"overlayremove":"layeradd"===e.type?"baselayerchange":null;i&&this._map.fire(i,t)}},_createRadioElement:function(e,i){var n='<input type="radio" class="leaflet-control-layers-selector" name="'+e+'"';i&&(n+=' checked="checked"'),n+="/>";var r=t.createElement("div");return r.innerHTML=n,r.firstChild},_addItem:function(e){var i,n=t.createElement("label"),o=this._map.hasLayer(e.layer);e.overlay?(i=t.createElement("input"),i.type="checkbox",i.className="leaflet-control-layers-selector",i.defaultChecked=o):i=this._createRadioElement("leaflet-base-layers",o),i.layerId=r.stamp(e.layer),r.DomEvent.on(i,"click",this._onInputClick,this);var a=t.createElement("span");a.innerHTML=" "+e.name,n.appendChild(i),n.appendChild(a);var s=e.overlay?this._overlaysList:this._baseLayersList;return s.appendChild(n),n},_onInputClick:function(){var e,t,i,n=this._form.getElementsByTagName("input"),r=n.length;for(this._handlingClick=!0,e=0;r>e;e++)t=n[e],i=this._layers[t.layerId],t.checked&&!this._map.hasLayer(i.layer)?this._map.addLayer(i.layer):!t.checked&&this._map.hasLayer(i.layer)&&this._map.removeLayer(i.layer);this._handlingClick=!1,this._refocusOnMap()},_expand:function(){r.DomUtil.addClass(this._container,"leaflet-control-layers-expanded")},_collapse:function(){this._container.className=this._container.className.replace(" leaflet-control-layers-expanded","")}}),r.control.layers=function(e,t,i){return new r.Control.Layers(e,t,i)},r.PosAnimation=r.Class.extend({includes:r.Mixin.Events,run:function(e,t,i,n){this.stop(),this._el=e,this._inProgress=!0,this._newPos=t,this.fire("start"),e.style[r.DomUtil.TRANSITION]="all "+(i||.25)+"s cubic-bezier(0,0,"+(n||.5)+",1)",r.DomEvent.on(e,r.DomUtil.TRANSITION_END,this._onTransitionEnd,this),r.DomUtil.setPosition(e,t),r.Util.falseFn(e.offsetWidth),this._stepTimer=setInterval(r.bind(this._onStep,this),50)},stop:function(){this._inProgress&&(r.DomUtil.setPosition(this._el,this._getPos()),this._onTransitionEnd(),r.Util.falseFn(this._el.offsetWidth))},_onStep:function(){var e=this._getPos();return e?(this._el._leaflet_pos=e,void this.fire("step")):void this._onTransitionEnd()},_transformRe:/([-+]?(?:\d*\.)?\d+)\D*, ([-+]?(?:\d*\.)?\d+)\D*\)/,_getPos:function(){var t,i,n,o=this._el,a=e.getComputedStyle(o);if(r.Browser.any3d){if(n=a[r.DomUtil.TRANSFORM].match(this._transformRe),!n)return;t=parseFloat(n[1]),i=parseFloat(n[2])}else t=parseFloat(a.left),i=parseFloat(a.top);return new r.Point(t,i,!0)},_onTransitionEnd:function(){r.DomEvent.off(this._el,r.DomUtil.TRANSITION_END,this._onTransitionEnd,this),this._inProgress&&(this._inProgress=!1,this._el.style[r.DomUtil.TRANSITION]="",this._el._leaflet_pos=this._newPos,clearInterval(this._stepTimer),this.fire("step").fire("end"))}}),r.Map.include({setView:function(e,t,n){if(t=t===i?this._zoom:this._limitZoom(t),e=this._limitCenter(r.latLng(e),t,this.options.maxBounds),n=n||{},this._panAnim&&this._panAnim.stop(),this._loaded&&!n.reset&&n!==!0){n.animate!==i&&(n.zoom=r.extend({animate:n.animate},n.zoom),n.pan=r.extend({animate:n.animate},n.pan));var o=this._zoom!==t?this._tryAnimatedZoom&&this._tryAnimatedZoom(e,t,n.zoom):this._tryAnimatedPan(e,n.pan);if(o)return clearTimeout(this._sizeTimer),this}return this._resetView(e,t),this},panBy:function(e,t){if(e=r.point(e).round(),t=t||{},!e.x&&!e.y)return this;if(this._panAnim||(this._panAnim=new r.PosAnimation,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),t.noMoveStart||this.fire("movestart"),t.animate!==!1){r.DomUtil.addClass(this._mapPane,"leaflet-pan-anim");var i=this._getMapPanePos().subtract(e);this._panAnim.run(this._mapPane,i,t.duration||.25,t.easeLinearity)}else this._rawPanBy(e),this.fire("move").fire("moveend");return this},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){r.DomUtil.removeClass(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(e,t){var i=this._getCenterOffset(e)._floor();return(t&&t.animate)===!0||this.getSize().contains(i)?(this.panBy(i,t),!0):!1}}),r.PosAnimation=r.DomUtil.TRANSITION?r.PosAnimation:r.PosAnimation.extend({run:function(e,t,i,n){this.stop(),this._el=e,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=r.DomUtil.getPosition(e),this._offset=t.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(),this._complete())},_animate:function(){this._animId=r.Util.requestAnimFrame(this._animate,this),this._step()},_step:function(){var e=+new Date-this._startTime,t=1e3*this._duration;t>e?this._runFrame(this._easeOut(e/t)):(this._runFrame(1),this._complete())},_runFrame:function(e){var t=this._startPos.add(this._offset.multiplyBy(e));r.DomUtil.setPosition(this._el,t),this.fire("step")},_complete:function(){r.Util.cancelAnimFrame(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(e){return 1-Math.pow(1-e,this._easeOutPower)}}),r.Map.mergeOptions({zoomAnimation:!0,zoomAnimationThreshold:4}),r.DomUtil.TRANSITION&&r.Map.addInitHook(function(){this._zoomAnimated=this.options.zoomAnimation&&r.DomUtil.TRANSITION&&r.Browser.any3d&&!r.Browser.android23&&!r.Browser.mobileOpera,this._zoomAnimated&&r.DomEvent.on(this._mapPane,r.DomUtil.TRANSITION_END,this._catchTransitionEnd,this)}),r.Map.include(r.DomUtil.TRANSITION?{_catchTransitionEnd:function(e){this._animatingZoom&&e.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(e,t,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||i.animate===!1||this._nothingToAnimate()||Math.abs(t-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(t),r=this._getCenterOffset(e)._divideBy(1-1/n),o=this._getCenterLayerPoint()._add(r);return i.animate===!0||this.getSize().contains(r)?(this.fire("movestart").fire("zoomstart"),this._animateZoom(e,t,o,n,null,!0),!0):!1},_animateZoom:function(e,t,i,n,o,a,s){s||(this._animatingZoom=!0),r.DomUtil.addClass(this._mapPane,"leaflet-zoom-anim"),this._animateToCenter=e,this._animateToZoom=t,r.Draggable&&(r.Draggable._disabled=!0),r.Util.requestAnimFrame(function(){this.fire("zoomanim",{center:e,zoom:t,origin:i,scale:n,delta:o,backwards:a}),setTimeout(r.bind(this._onZoomTransitionEnd,this),250)},this)},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._animatingZoom=!1,r.DomUtil.removeClass(this._mapPane,"leaflet-zoom-anim"),r.Util.requestAnimFrame(function(){this._resetView(this._animateToCenter,this._animateToZoom,!0,!0),r.Draggable&&(r.Draggable._disabled=!1)},this))}}:{}),r.TileLayer.include({_animateZoom:function(e){this._animating||(this._animating=!0,this._prepareBgBuffer());var t=this._bgBuffer,i=r.DomUtil.TRANSFORM,n=e.delta?r.DomUtil.getTranslateString(e.delta):t.style[i],o=r.DomUtil.getScaleString(e.scale,e.origin);t.style[i]=e.backwards?o+" "+n:n+" "+o},_endZoomAnim:function(){var e=this._tileContainer,t=this._bgBuffer;e.style.visibility="",e.parentNode.appendChild(e),r.Util.falseFn(t.offsetWidth);var i=this._map.getZoom();(i>this.options.maxZoom||i<this.options.minZoom)&&this._clearBgBuffer(),this._animating=!1},_clearBgBuffer:function(){var e=this._map;!e||e._animatingZoom||e.touchZoom._zooming||(this._bgBuffer.innerHTML="",this._bgBuffer.style[r.DomUtil.TRANSFORM]="")},_prepareBgBuffer:function(){var e=this._tileContainer,t=this._bgBuffer,i=this._getLoadedTilesPercentage(t),n=this._getLoadedTilesPercentage(e);return t&&i>.5&&.5>n?(e.style.visibility="hidden",void this._stopLoadingImages(e)):(t.style.visibility="hidden",t.style[r.DomUtil.TRANSFORM]="",this._tileContainer=t,t=this._bgBuffer=e,this._stopLoadingImages(t),void clearTimeout(this._clearBgBufferTimer))},_getLoadedTilesPercentage:function(e){var t,i,n=e.getElementsByTagName("img"),r=0;for(t=0,i=n.length;i>t;t++)n[t].complete&&r++;return r/i},_stopLoadingImages:function(e){var t,i,n,o=Array.prototype.slice.call(e.getElementsByTagName("img"));for(t=0,i=o.length;i>t;t++)n=o[t],n.complete||(n.onload=r.Util.falseFn,n.onerror=r.Util.falseFn,n.src=r.Util.emptyImageUrl,n.parentNode.removeChild(n))}}),r.Map.include({_defaultLocateOptions:{watch:!1,setView:!1,maxZoom:1/0,timeout:1e4,maximumAge:0,enableHighAccuracy:!1},locate:function(e){if(e=this._locateOptions=r.extend(this._defaultLocateOptions,e),!navigator.geolocation)return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var t=r.bind(this._handleGeolocationResponse,this),i=r.bind(this._handleGeolocationError,this);return e.watch?this._locationWatchId=navigator.geolocation.watchPosition(t,i,e):navigator.geolocation.getCurrentPosition(t,i,e),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(e){var t=e.code,i=e.message||(1===t?"permission denied":2===t?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:t,message:"Geolocation error: "+i+"."})},_handleGeolocationResponse:function(e){var t=e.coords.latitude,i=e.coords.longitude,n=new r.LatLng(t,i),o=180*e.coords.accuracy/40075017,a=o/Math.cos(r.LatLng.DEG_TO_RAD*t),s=r.latLngBounds([t-o,i-a],[t+o,i+a]),l=this._locateOptions;if(l.setView){var u=Math.min(this.getBoundsZoom(s),l.maxZoom);this.setView(n,u)}var c={latlng:n,bounds:s,timestamp:e.timestamp};for(var h in e.coords)"number"==typeof e.coords[h]&&(c[h]=e.coords[h]);this.fire("locationfound",c)}})}(window,document),define("ViewModels/DistanceLegendViewModel",["Cesium/Core/defined","Cesium/Core/DeveloperError","Cesium/Core/EllipsoidGeodesic","Cesium/Core/Cartesian2","Cesium/Core/getTimestamp","Cesium/Core/EventHelper","KnockoutES5","Core/loadView","leaflet"],function(e,t,i,n,r,o,a,s,l){"use strict";function u(t,i){var o=r();if(!(o<t._lastLegendUpdate+250)){t._lastLegendUpdate=o;var a=i.canvas.clientWidth,s=i.canvas.clientHeight,l=i.camera.getPickRay(new n(a/2|0,s-1)),u=i.camera.getPickRay(new n(1+a/2|0,s-1)),c=i.globe,h=c.pick(l,i),m=c.pick(u,i);if(!e(h)||!e(m))return t.barWidth=void 0,void(t.distanceLabel=void 0);var f=c.ellipsoid.cartesianToCartographic(h),g=c.ellipsoid.cartesianToCartographic(m);d.setEndPoints(f,g);for(var v,_=d.surfaceDistance,y=100,C=p.length-1;!e(v)&&C>=0;--C)p[C]/_<y&&(v=p[C]);if(e(v)){var w;w=v>=1e3?(v/1e3).toString()+" km":v.toString()+" m",t.barWidth=v/_|0,t.distanceLabel=w}else t.barWidth=void 0,t.distanceLabel=void 0}}function c(e,t){var i=t.getSize().y/2,n=100,r=t.containerPointToLatLng([0,i]).distanceTo(t.containerPointToLatLng([n,i])),o=l.control.scale()._getRoundNum(r),a=1e3>o?o+" m":o/1e3+" km";e.barWidth=o/r*n,e.distanceLabel=a}var h=function(i){function n(){if(e(r.terria)){var t=r.terria.scene;r._removeSubscription=t.postRender.addEventListener(function(){u(this,t)},r)}else if(e(r.terria.leaflet)){var i=r.terria.leaflet.map,n=function(){c(r,i)};r._removeSubscription=function(){i.off("zoomend",n),i.off("moveend",n)},i.on("zoomend",n),i.on("moveend",n),c(r,i)}}if(!e(i)||!e(i.terria))throw new t("options.terria is required.");this.terria=i.terria,this._removeSubscription=void 0,this._lastLegendUpdate=void 0,this.eventHelper=new o,this.distanceLabel=void 0,this.barWidth=void 0,a.track(this,["distanceLabel","barWidth"]),this.eventHelper.add(this.terria.afterWidgetChanged,function(){e(this._removeSubscription)&&(this._removeSubscription(),this._removeSubscription=void 0)},this);var r=this;n(),this.eventHelper.add(this.terria.afterWidgetChanged,function(){n()},this)};h.prototype.destroy=function(){this.eventHelper.removeAll()},h.prototype.show=function(e){var t='<div class="distance-legend" data-bind="visible: distanceLabel && barWidth"><div class="distance-legend-label" data-bind="text: distanceLabel"></div><div class="distance-legend-scale-bar" data-bind="style: { width: barWidth + \'px\', left: (5 + (125 - barWidth) / 2) + \'px\' }"></div></div>';s(t,e,this)},h.create=function(e){var t=new h(e);return t.show(e.container),t};var d=new i,p=[1,2,3,5,10,20,30,50,100,200,300,500,1e3,2e3,3e3,5e3,1e4,2e4,3e4,5e4,1e5,2e5,3e5,5e5,1e6,2e6,3e6,5e6,1e7,2e7,3e7,5e7];return h}),define("ViewModels/UserInterfaceControl",["Cesium/Core/defined","Cesium/Core/defineProperties","Cesium/Core/DeveloperError","KnockoutES5"],function(e,t,i,n){"use strict";var r=function(t){if(!e(t))throw new i("terria is required");this._terria=t,this.name="Unnamed Control",this.text=void 0,this.svgIcon=void 0,this.svgHeight=void 0,this.svgWidth=void 0,this.cssClass=void 0,this.isActive=!1,n.track(this,["name","svgIcon","svgHeight","svgWidth","cssClass","isActive"])};return t(r.prototype,{terria:{get:function(){return this._terria}},hasText:{get:function(){return e(this.text)&&"string"==typeof this.text}}}),r.prototype.activate=function(){throw new i("activate must be implemented in the derived class.")},r}),define("ViewModels/NavigationControl",["ViewModels/UserInterfaceControl"],function(e){"use strict";var t=function(t){e.apply(this,arguments)};return t.prototype=Object.create(e.prototype),t}),define("SvgPaths/svgReset",[],function(){"use strict";return"M 7.5,0 C 3.375,0 0,3.375 0,7.5 0,11.625 3.375,15 7.5,15 c 3.46875,0 6.375,-2.4375 7.21875,-5.625 l -1.96875,0 C 12,11.53125 9.9375,13.125 7.5,13.125 4.40625,13.125 1.875,10.59375 1.875,7.5 1.875,4.40625 4.40625,1.875 7.5,1.875 c 1.59375,0 2.90625,0.65625 3.9375,1.6875 l -3,3 6.5625,0 L 15,0 12.75,2.25 C 11.4375,0.84375 9.5625,0 7.5,0 z"}),define("ViewModels/ResetViewNavigationControl",["Cesium/Core/defined","Cesium/Scene/Camera","Cesium/Core/Rectangle","Cesium/Core/Cartographic","ViewModels/NavigationControl","SvgPaths/svgReset"],function(e,t,i,n,r,o){"use strict";var a=function(e){r.apply(this,arguments),this.name="Reset View",this.svgIcon=o,this.svgHeight=15,this.svgWidth=15,this.cssClass="navigation-control-icon-reset"};return a.prototype=Object.create(r.prototype),a.prototype.resetView=function(){var r=this.terria.scene,o=r.screenSpaceCameraController;if(o.enableInputs){this.isActive=!0;var a=r.camera;if(e(this.terria.trackedEntity)){var s=this.terria.trackedEntity;this.terria.trackedEntity=void 0,this.terria.trackedEntity=s}else if(this.terria.options.defaultResetView){if(this.terria.options.defaultResetView&&this.terria.options.defaultResetView instanceof n)a.flyTo({destination:r.globe.ellipsoid.cartographicToCartesian(this.terria.options.defaultResetView)});else if(this.terria.options.defaultResetView&&this.terria.options.defaultResetView instanceof i)try{i.validate(this.terria.options.defaultResetView),a.flyTo({destination:this.terria.options.defaultResetView})}catch(l){console.log("Cesium-navigation/ResetViewNavigationControl: options.defaultResetView Cesium rectangle is invalid!")}}else"function"==typeof a.flyHome?a.flyHome(1):a.flyTo({destination:t.DEFAULT_VIEW_RECTANGLE,duration:1});this.isActive=!1}},a.prototype.activate=function(){this.resetView()},a}),define("Core/Utils",["Cesium/Core/defined","Cesium/Core/Ray","Cesium/Core/Cartesian3","Cesium/Core/Cartographic","Cesium/Core/ReferenceFrame","Cesium/Scene/SceneMode"],function(e,t,i,n,r,o){"use strict";var a={},s=new n,l=new t;return a.getCameraFocus=function(t,n,r){var a=t.scene,u=a.camera;return a.mode!=o.MORPHING&&(e(r)||(r=new i),e(t.trackedEntity)?r=t.trackedEntity.position.getValue(t.clock.currentTime,r):(l.origin=u.positionWC,l.direction=u.directionWC,r=a.globe.pick(l,a,r)),e(r))?(a.mode==o.SCENE2D||a.mode==o.COLUMBUS_VIEW?(r=u.worldToCameraCoordinatesPoint(r,r),n&&(r=a.globe.ellipsoid.cartographicToCartesian(a.mapProjection.unproject(r,s),r))):n||(r=u.worldToCameraCoordinatesPoint(r,r)),r):void 0},a}),define("ViewModels/ZoomNavigationControl",["Cesium/Core/defined","Cesium/Core/Ray","Cesium/Core/IntersectionTests","Cesium/Core/Cartesian3","Cesium/Scene/SceneMode","ViewModels/NavigationControl","Core/Utils"],function(e,t,i,n,r,o,a){"use strict";var s=function(e,t){o.apply(this,arguments),this.name="Zoom "+(t?"In":"Out"),this.text=t?"+":"-",this.cssClass="navigation-control-icon-zoom-"+(t?"in":"out"),this.relativeAmount=2,t&&(this.relativeAmount=1/this.relativeAmount)};s.prototype.relativeAmount=1,s.prototype=Object.create(o.prototype),s.prototype.activate=function(){this.zoom(this.relativeAmount)};var l=new n;return s.prototype.zoom=function(o){if(this.isActive=!0,e(this.terria)){var s=this.terria.scene,u=s.screenSpaceCameraController;if(!u.enableInputs||!u.enableZoom)return;var c,h=s.camera;switch(s.mode){case r.MORPHING:break;case r.SCENE2D:h.zoomIn(h.positionCartographic.height*(1-this.relativeAmount));break;default:var d;if(d=e(this.terria.trackedEntity)?new n:a.getCameraFocus(this.terria,!1),e(d))c={direction:h.direction,up:h.up};else{var p=new t(h.worldToCameraCoordinatesPoint(s.globe.ellipsoid.cartographicToCartesian(h.positionCartographic)),h.directionWC);d=i.grazingAltitudeLocation(p,s.globe.ellipsoid),c={heading:h.heading,pitch:h.pitch,roll:h.roll}}var m=n.subtract(h.position,d,l),f=n.multiplyByScalar(m,o,m),g=n.add(d,f,d);e(this.terria.trackedEntity)||s.mode==r.COLUMBUS_VIEW?h.position=g:h.flyTo({destination:g,orientation:c,duration:.5,convert:!1})}}this.isActive=!1},s}),define("SvgPaths/svgCompassOuterRing",[],function(){"use strict";return"m 66.5625,0 0,15.15625 3.71875,0 0,-10.40625 5.5,10.40625 4.375,0 0,-15.15625 -3.71875,0 0,10.40625 L 70.9375,0 66.5625,0 z M 72.5,20.21875 c -28.867432,0 -52.28125,23.407738 -52.28125,52.28125 0,28.87351 23.413818,52.3125 52.28125,52.3125 28.86743,0 52.28125,-23.43899 52.28125,-52.3125 0,-28.873512 -23.41382,-52.28125 -52.28125,-52.28125 z m 0,1.75 c 13.842515,0 26.368948,5.558092 35.5,14.5625 l -11.03125,11 0.625,0.625 11.03125,-11 c 8.9199,9.108762 14.4375,21.579143 14.4375,35.34375 0,13.764606 -5.5176,26.22729 -14.4375,35.34375 l -11.03125,-11 -0.625,0.625 11.03125,11 c -9.130866,9.01087 -21.658601,14.59375 -35.5,14.59375 -13.801622,0 -26.321058,-5.53481 -35.4375,-14.5 l 11.125,-11.09375 c 6.277989,6.12179 14.857796,9.90625 24.3125,9.90625 19.241896,0 34.875,-15.629154 34.875,-34.875 0,-19.245847 -15.633104,-34.84375 -34.875,-34.84375 -9.454704,0 -18.034511,3.760884 -24.3125,9.875 L 37.0625,36.4375 C 46.179178,27.478444 58.696991,21.96875 72.5,21.96875 z m -0.875,0.84375 0,13.9375 1.75,0 0,-13.9375 -1.75,0 z M 36.46875,37.0625 47.5625,48.15625 C 41.429794,54.436565 37.65625,63.027539 37.65625,72.5 c 0,9.472461 3.773544,18.055746 9.90625,24.34375 L 36.46875,107.9375 c -8.96721,-9.1247 -14.5,-21.624886 -14.5,-35.4375 0,-13.812615 5.53279,-26.320526 14.5,-35.4375 z M 72.5,39.40625 c 18.297686,0 33.125,14.791695 33.125,33.09375 0,18.302054 -14.827314,33.125 -33.125,33.125 -18.297687,0 -33.09375,-14.822946 -33.09375,-33.125 0,-18.302056 14.796063,-33.09375 33.09375,-33.09375 z M 22.84375,71.625 l 0,1.75 13.96875,0 0,-1.75 -13.96875,0 z m 85.5625,0 0,1.75 14,0 0,-1.75 -14,0 z M 71.75,108.25 l 0,13.9375 1.71875,0 0,-13.9375 -1.71875,0 z"}),define("SvgPaths/svgCompassGyro",[],function(){"use strict";return"m 72.71875,54.375 c -0.476702,0 -0.908208,0.245402 -1.21875,0.5625 -0.310542,0.317098 -0.551189,0.701933 -0.78125,1.1875 -0.172018,0.363062 -0.319101,0.791709 -0.46875,1.25 -6.91615,1.075544 -12.313231,6.656514 -13,13.625 -0.327516,0.117495 -0.661877,0.244642 -0.9375,0.375 -0.485434,0.22959 -0.901634,0.471239 -1.21875,0.78125 -0.317116,0.310011 -0.5625,0.742111 -0.5625,1.21875 l 0.03125,0 c 0,0.476639 0.245384,0.877489 0.5625,1.1875 0.317116,0.310011 0.702066,0.58291 1.1875,0.8125 0.35554,0.168155 0.771616,0.32165 1.21875,0.46875 1.370803,6.10004 6.420817,10.834127 12.71875,11.8125 0.146999,0.447079 0.30025,0.863113 0.46875,1.21875 0.230061,0.485567 0.470708,0.870402 0.78125,1.1875 0.310542,0.317098 0.742048,0.5625 1.21875,0.5625 0.476702,0 0.876958,-0.245402 1.1875,-0.5625 0.310542,-0.317098 0.582439,-0.701933 0.8125,-1.1875 0.172018,-0.363062 0.319101,-0.791709 0.46875,-1.25 6.249045,-1.017063 11.256351,-5.7184 12.625,-11.78125 0.447134,-0.1471 0.86321,-0.300595 1.21875,-0.46875 0.485434,-0.22959 0.901633,-0.502489 1.21875,-0.8125 0.317117,-0.310011 0.5625,-0.710861 0.5625,-1.1875 l -0.03125,0 c 0,-0.476639 -0.245383,-0.908739 -0.5625,-1.21875 C 89.901633,71.846239 89.516684,71.60459 89.03125,71.375 88.755626,71.244642 88.456123,71.117495 88.125,71 87.439949,64.078341 82.072807,58.503735 75.21875,57.375 c -0.15044,-0.461669 -0.326927,-0.884711 -0.5,-1.25 -0.230061,-0.485567 -0.501958,-0.870402 -0.8125,-1.1875 -0.310542,-0.317098 -0.710798,-0.5625 -1.1875,-0.5625 z m -0.0625,1.40625 c 0.03595,-0.01283 0.05968,0 0.0625,0 0.0056,0 0.04321,-0.02233 0.1875,0.125 0.144288,0.147334 0.34336,0.447188 0.53125,0.84375 0.06385,0.134761 0.123901,0.309578 0.1875,0.46875 -0.320353,-0.01957 -0.643524,-0.0625 -0.96875,-0.0625 -0.289073,0 -0.558569,0.04702 -0.84375,0.0625 C 71.8761,57.059578 71.936151,56.884761 72,56.75 c 0.18789,-0.396562 0.355712,-0.696416 0.5,-0.84375 0.07214,-0.07367 0.120304,-0.112167 0.15625,-0.125 z m 0,2.40625 c 0.448007,0 0.906196,0.05436 1.34375,0.09375 0.177011,0.592256 0.347655,1.271044 0.5,2.03125 0.475097,2.370753 0.807525,5.463852 0.9375,8.9375 -0.906869,-0.02852 -1.834463,-0.0625 -2.78125,-0.0625 -0.92298,0 -1.802327,0.03537 -2.6875,0.0625 0.138529,-3.473648 0.493653,-6.566747 0.96875,-8.9375 0.154684,-0.771878 0.320019,-1.463985 0.5,-2.0625 0.405568,-0.03377 0.804291,-0.0625 1.21875,-0.0625 z m -2.71875,0.28125 c -0.129732,0.498888 -0.259782,0.987558 -0.375,1.5625 -0.498513,2.487595 -0.838088,5.693299 -0.96875,9.25 -3.21363,0.15162 -6.119596,0.480068 -8.40625,0.9375 -0.682394,0.136509 -1.275579,0.279657 -1.84375,0.4375 0.799068,-6.135482 5.504716,-11.036454 11.59375,-12.1875 z M 75.5,58.5 c 6.043169,1.18408 10.705093,6.052712 11.5,12.15625 -0.569435,-0.155806 -1.200273,-0.302525 -1.875,-0.4375 -2.262525,-0.452605 -5.108535,-0.783809 -8.28125,-0.9375 -0.130662,-3.556701 -0.470237,-6.762405 -0.96875,-9.25 C 75.761959,59.467174 75.626981,58.990925 75.5,58.5 z m -2.84375,12.09375 c 0.959338,0 1.895843,0.03282 2.8125,0.0625 C 75.48165,71.267751 75.5,71.871028 75.5,72.5 c 0,1.228616 -0.01449,2.438313 -0.0625,3.59375 -0.897358,0.0284 -1.811972,0.0625 -2.75,0.0625 -0.927373,0 -1.831062,-0.03473 -2.71875,-0.0625 -0.05109,-1.155437 -0.0625,-2.365134 -0.0625,-3.59375 0,-0.628972 0.01741,-1.232249 0.03125,-1.84375 0.895269,-0.02827 1.783025,-0.0625 2.71875,-0.0625 z M 68.5625,70.6875 c -0.01243,0.60601 -0.03125,1.189946 -0.03125,1.8125 0,1.22431 0.01541,2.407837 0.0625,3.5625 -3.125243,-0.150329 -5.92077,-0.471558 -8.09375,-0.90625 -0.784983,-0.157031 -1.511491,-0.316471 -2.125,-0.5 -0.107878,-0.704096 -0.1875,-1.422089 -0.1875,-2.15625 0,-0.115714 0.02849,-0.228688 0.03125,-0.34375 0.643106,-0.20284 1.389577,-0.390377 2.25,-0.5625 2.166953,-0.433487 4.97905,-0.75541 8.09375,-0.90625 z m 8.3125,0.03125 c 3.075121,0.15271 5.824455,0.446046 7.96875,0.875 0.857478,0.171534 1.630962,0.360416 2.28125,0.5625 0.0027,0.114659 0,0.228443 0,0.34375 0,0.735827 -0.07914,1.450633 -0.1875,2.15625 -0.598568,0.180148 -1.29077,0.34562 -2.0625,0.5 -2.158064,0.431708 -4.932088,0.754666 -8.03125,0.90625 0.04709,-1.154663 0.0625,-2.33819 0.0625,-3.5625 0,-0.611824 -0.01924,-1.185379 -0.03125,-1.78125 z M 57.15625,72.5625 c 0.0023,0.572772 0.06082,1.131112 0.125,1.6875 -0.125327,-0.05123 -0.266577,-0.10497 -0.375,-0.15625 -0.396499,-0.187528 -0.665288,-0.387337 -0.8125,-0.53125 -0.147212,-0.143913 -0.15625,-0.182756 -0.15625,-0.1875 0,-0.0047 -0.02221,-0.07484 0.125,-0.21875 0.147212,-0.143913 0.447251,-0.312472 0.84375,-0.5 0.07123,-0.03369 0.171867,-0.06006 0.25,-0.09375 z m 31.03125,0 c 0.08201,0.03503 0.175941,0.05872 0.25,0.09375 0.396499,0.187528 0.665288,0.356087 0.8125,0.5 0.14725,0.14391 0.15625,0.21405 0.15625,0.21875 0,0.0047 -0.009,0.04359 -0.15625,0.1875 -0.147212,0.143913 -0.416001,0.343722 -0.8125,0.53125 -0.09755,0.04613 -0.233314,0.07889 -0.34375,0.125 0.06214,-0.546289 0.09144,-1.094215 0.09375,-1.65625 z m -29.5,3.625 c 0.479308,0.123125 0.983064,0.234089 1.53125,0.34375 2.301781,0.460458 5.229421,0.787224 8.46875,0.9375 0.167006,2.84339 0.46081,5.433176 0.875,7.5 0.115218,0.574942 0.245268,1.063612 0.375,1.5625 -5.463677,-1.028179 -9.833074,-5.091831 -11.25,-10.34375 z m 27.96875,0 C 85.247546,81.408945 80.919274,85.442932 75.5,86.5 c 0.126981,-0.490925 0.261959,-0.967174 0.375,-1.53125 0.41419,-2.066824 0.707994,-4.65661 0.875,-7.5 3.204493,-0.15162 6.088346,-0.480068 8.375,-0.9375 0.548186,-0.109661 1.051942,-0.220625 1.53125,-0.34375 z M 70.0625,77.53125 c 0.865391,0.02589 1.723666,0.03125 2.625,0.03125 0.912062,0 1.782843,-0.0048 2.65625,-0.03125 -0.165173,2.736408 -0.453252,5.207651 -0.84375,7.15625 -0.152345,0.760206 -0.322989,1.438994 -0.5,2.03125 -0.437447,0.03919 -0.895856,0.0625 -1.34375,0.0625 -0.414943,0 -0.812719,-0.02881 -1.21875,-0.0625 -0.177011,-0.592256 -0.347655,-1.271044 -0.5,-2.03125 -0.390498,-1.948599 -0.700644,-4.419842 -0.875,-7.15625 z m 1.75,10.28125 c 0.284911,0.01545 0.554954,0.03125 0.84375,0.03125 0.325029,0 0.648588,-0.01171 0.96875,-0.03125 -0.05999,0.148763 -0.127309,0.31046 -0.1875,0.4375 -0.18789,0.396562 -0.386962,0.696416 -0.53125,0.84375 -0.144288,0.147334 -0.181857,0.125 -0.1875,0.125 -0.0056,0 -0.07446,0.02233 -0.21875,-0.125 C 72.355712,88.946416 72.18789,88.646562 72,88.25 71.939809,88.12296 71.872486,87.961263 71.8125,87.8125 z"}),define("SvgPaths/svgCompassRotationMarker",[],function(){"use strict";return"M 72.46875,22.03125 C 59.505873,22.050338 46.521615,27.004287 36.6875,36.875 L 47.84375,47.96875 C 61.521556,34.240041 83.442603,34.227389 97.125,47.90625 l 11.125,-11.125 C 98.401629,26.935424 85.431627,22.012162 72.46875,22.03125 z"}),define("ViewModels/NavigationViewModel",["Cesium/Core/defined","Cesium/Core/Math","Cesium/Core/getTimestamp","Cesium/Core/EventHelper","Cesium/Core/Transforms","Cesium/Scene/SceneMode","Cesium/Core/Cartesian2","Cesium/Core/Cartesian3","Cesium/Core/Matrix4","Cesium/Core/BoundingSphere","Cesium/Core/HeadingPitchRange","KnockoutES5","Core/loadView","ViewModels/ResetViewNavigationControl","ViewModels/ZoomNavigationControl","SvgPaths/svgCompassOuterRing","SvgPaths/svgCompassGyro","SvgPaths/svgCompassRotationMarker","Core/Utils"],function(e,t,i,n,r,o,a,s,l,u,c,h,d,p,m,f,g,v,_){"use strict";function y(n,u,c){function h(e,i){var r=Math.atan2(-e.y,e.x);n.orbitCursorAngle=t.zeroToTwoPi(r-t.PI_OVER_TWO);var o=a.magnitude(e),s=i/2,l=Math.min(o/s,1),u=.5*l*l+.5;n.orbitCursorOpacity=u}var d=n.terria.scene,p=d.screenSpaceCameraController;if(d.mode!=o.MORPHING&&p.enableInputs){switch(d.mode){case o.COLUMBUS_VIEW:if(p.enableLook)break;if(!p.enableTranslate||!p.enableTilt)return;break;case o.SCENE3D:if(p.enableLook)break;if(!p.enableTilt||!p.enableRotate)return;break;case o.SCENE2D:if(!p.enableTranslate)return}document.removeEventListener("mousemove",n.orbitMouseMoveFunction,!1),document.removeEventListener("mouseup",n.orbitMouseUpFunction,!1),e(n.orbitTickFunction)&&n.terria.clock.onTick.removeEventListener(n.orbitTickFunction),n.orbitMouseMoveFunction=void 0,n.orbitMouseUpFunction=void 0,n.orbitTickFunction=void 0,n.isOrbiting=!0,n.orbitLastTimestamp=i();var m=d.camera;if(e(n.terria.trackedEntity))n.orbitFrame=void 0,n.orbitIsLook=!1;else{var f=_.getCameraFocus(n.terria,!0,T);e(f)?(n.orbitFrame=r.eastNorthUpToFixedFrame(f,d.globe.ellipsoid,S),n.orbitIsLook=!1):(n.orbitFrame=r.eastNorthUpToFixedFrame(m.positionWC,d.globe.ellipsoid,S),n.orbitIsLook=!0)}n.orbitTickFunction=function(r){var a,u=i(),c=u-n.orbitLastTimestamp,h=2.5*(n.orbitCursorOpacity-.5)/1e3,p=c*h,f=n.orbitCursorAngle+t.PI_OVER_TWO,g=Math.cos(f)*p,v=Math.sin(f)*p;e(n.orbitFrame)&&(a=l.clone(m.transform,b),m.lookAtTransform(n.orbitFrame)),d.mode==o.SCENE2D?m.move(new s(g,v,0),Math.max(d.canvas.clientWidth,d.canvas.clientHeight)/100*m.positionCartographic.height*p):n.orbitIsLook?(m.look(s.UNIT_Z,-g),m.look(m.right,-v)):(m.rotateLeft(g),m.rotateUp(v)),e(n.orbitFrame)&&m.lookAtTransform(a),n.orbitLastTimestamp=u},n.orbitMouseMoveFunction=function(e){var t=u.getBoundingClientRect(),i=new a((t.right-t.left)/2,(t.bottom-t.top)/2),n=new a(e.clientX-t.left,e.clientY-t.top),r=a.subtract(n,i,E);h(r,t.width)},n.orbitMouseUpFunction=function(t){n.isOrbiting=!1,document.removeEventListener("mousemove",n.orbitMouseMoveFunction,!1),document.removeEventListener("mouseup",n.orbitMouseUpFunction,!1),e(n.orbitTickFunction)&&n.terria.clock.onTick.removeEventListener(n.orbitTickFunction),n.orbitMouseMoveFunction=void 0,n.orbitMouseUpFunction=void 0,n.orbitTickFunction=void 0},document.addEventListener("mousemove",n.orbitMouseMoveFunction,!1),document.addEventListener("mouseup",n.orbitMouseUpFunction,!1),n.terria.clock.onTick.addEventListener(n.orbitTickFunction),h(c,u.getBoundingClientRect().width)}}function C(i,n,s){var u=i.terria.scene,c=u.camera,h=u.screenSpaceCameraController;if(u.mode!=o.MORPHING&&u.mode!=o.SCENE2D&&h.enableInputs&&(h.enableLook||u.mode!=o.COLUMBUS_VIEW&&(u.mode!=o.SCENE3D||h.enableRotate))){if(document.removeEventListener("mousemove",i.rotateMouseMoveFunction,!1),document.removeEventListener("mouseup",i.rotateMouseUpFunction,!1),i.rotateMouseMoveFunction=void 0,i.rotateMouseUpFunction=void 0,i.isRotating=!0,i.rotateInitialCursorAngle=Math.atan2(-s.y,s.x),e(i.terria.trackedEntity))i.rotateFrame=void 0,i.rotateIsLook=!1;else{var d=_.getCameraFocus(i.terria,!0,T);e(d)&&(u.mode!=o.COLUMBUS_VIEW||h.enableLook||h.enableTranslate)?(i.rotateFrame=r.eastNorthUpToFixedFrame(d,u.globe.ellipsoid,S),i.rotateIsLook=!1):(i.rotateFrame=r.eastNorthUpToFixedFrame(c.positionWC,u.globe.ellipsoid,S),i.rotateIsLook=!0)}var p;e(i.rotateFrame)&&(p=l.clone(c.transform,b),c.lookAtTransform(i.rotateFrame)),i.rotateInitialCameraAngle=-c.heading,e(i.rotateFrame)&&c.lookAtTransform(p),i.rotateMouseMoveFunction=function(r){var o,s=n.getBoundingClientRect(),u=new a((s.right-s.left)/2,(s.bottom-s.top)/2),c=new a(r.clientX-s.left,r.clientY-s.top),h=a.subtract(c,u,E),d=Math.atan2(-h.y,h.x),p=d-i.rotateInitialCursorAngle,m=t.zeroToTwoPi(i.rotateInitialCameraAngle-p),f=i.terria.scene.camera;e(i.rotateFrame)&&(o=l.clone(f.transform,b),f.lookAtTransform(i.rotateFrame));var g=-f.heading;f.rotateRight(m-g),e(i.rotateFrame)&&f.lookAtTransform(o)},i.rotateMouseUpFunction=function(e){i.isRotating=!1,document.removeEventListener("mousemove",i.rotateMouseMoveFunction,!1),document.removeEventListener("mouseup",i.rotateMouseUpFunction,!1),i.rotateMouseMoveFunction=void 0,i.rotateMouseUpFunction=void 0},document.addEventListener("mousemove",i.rotateMouseMoveFunction,!1),document.addEventListener("mouseup",i.rotateMouseUpFunction,!1)}}var w=function(t){function i(){e(r.terria)?(r._unsubcribeFromPostRender&&(r._unsubcribeFromPostRender(),r._unsubcribeFromPostRender=void 0),r.showCompass=!0,r._unsubcribeFromPostRender=r.terria.scene.postRender.addEventListener(function(){r.heading=r.terria.scene.camera.heading})):(r._unsubcribeFromPostRender&&(r._unsubcribeFromPostRender(),r._unsubcribeFromPostRender=void 0),r.showCompass=!1)}this.terria=t.terria,this.eventHelper=new n,this.controls=t.controls,e(this.controls)||(this.controls=[new m(this.terria,!0),new p(this.terria),new m(this.terria,!1)]),this.svgCompassOuterRing=f,this.svgCompassGyro=g,this.svgCompassRotationMarker=v,this.showCompass=e(this.terria),this.heading=this.showCompass?this.terria.scene.camera.heading:0,this.isOrbiting=!1,this.orbitCursorAngle=0,this.orbitCursorOpacity=0,this.orbitLastTimestamp=0,this.orbitFrame=void 0,this.orbitIsLook=!1,this.orbitMouseMoveFunction=void 0,this.orbitMouseUpFunction=void 0,this.isRotating=!1,this.rotateInitialCursorAngle=void 0,this.rotateFrame=void 0,this.rotateIsLook=!1,this.rotateMouseMoveFunction=void 0,this.rotateMouseUpFunction=void 0,this._unsubcribeFromPostRender=void 0,h.track(this,["controls","showCompass","heading","isOrbiting","orbitCursorAngle","isRotating"]);var r=this;this.eventHelper.add(this.terria.afterWidgetChanged,i,this), +i()};w.prototype.destroy=function(){this.eventHelper.removeAll()},w.prototype.show=function(e){var t='<div class="compass" title="Drag outer ring: rotate view. Drag inner gyroscope: free orbit.Double-click: reset view.TIP: You can also free orbit by holding the CTRL key and dragging the map." data-bind="visible: showCompass, event: { mousedown: handleMouseDown, dblclick: handleDoubleClick }"><div class="compass-outer-ring-background"></div>'+" <div class=\"compass-rotation-marker\" data-bind=\"visible: isOrbiting, style: { transform: 'rotate(-' + orbitCursorAngle + 'rad)', '-webkit-transform': 'rotate(-' + orbitCursorAngle + 'rad)', opacity: orbitCursorOpacity }, cesiumSvgPath: { path: svgCompassRotationMarker, width: 145, height: 145 }\"></div> <div class=\"compass-outer-ring\" title=\"Click and drag to rotate the camera\" data-bind=\"style: { transform: 'rotate(-' + heading + 'rad)', '-webkit-transform': 'rotate(-' + heading + 'rad)' }, cesiumSvgPath: { path: svgCompassOuterRing, width: 145, height: 145 }\"></div> <div class=\"compass-gyro-background\"></div> <div class=\"compass-gyro\" data-bind=\"cesiumSvgPath: { path: svgCompassGyro, width: 145, height: 145 }, css: { 'compass-gyro-active': isOrbiting }\"></div></div><div class=\"navigation-controls\"><!-- ko foreach: controls --><div data-bind=\"click: activate, attr: { title: $data.name }, css: $root.isLastControl($data) ? 'navigation-control-last' : 'navigation-control' \"> <!-- ko if: $data.hasText --> <div data-bind=\"text: $data.text, css: $data.isActive ? 'navigation-control-icon-active ' + $data.cssClass : $data.cssClass\"></div> <!-- /ko --> <!-- ko ifnot: $data.hasText --> <div data-bind=\"cesiumSvgPath: { path: $data.svgIcon, width: $data.svgWidth, height: $data.svgHeight }, css: $data.isActive ? 'navigation-control-icon-active ' + $data.cssClass : $data.cssClass\"></div> <!-- /ko --> </div> <!-- /ko --></div>";d(t,e,this)},w.prototype.add=function(e){this.controls.push(e)},w.prototype.remove=function(e){this.controls.remove(e)},w.prototype.isLastControl=function(e){return e===this.controls[this.controls.length-1]};var E=new a;w.prototype.handleMouseDown=function(e,t){var i=this.terria.scene;if(i.mode==o.MORPHING)return!0;var n=t.currentTarget,r=t.currentTarget.getBoundingClientRect(),s=r.width/2,l=new a((r.right-r.left)/2,(r.bottom-r.top)/2),u=new a(t.clientX-r.left,t.clientY-r.top),c=a.subtract(u,l,E),h=a.magnitude(c),d=h/s,p=145,m=50;if(m/p>d)y(this,n,c);else{if(!(1>d))return!0;C(this,n,c)}};var b=new l,S=new l,T=new s;return w.prototype.handleDoubleClick=function(i,n){var r=i.terria.scene,a=r.camera,l=r.screenSpaceCameraController;if(r.mode==o.MORPHING||!l.enableInputs)return!0;if(r.mode!=o.COLUMBUS_VIEW||l.enableTranslate){if(r.mode==o.SCENE3D||r.mode==o.COLUMBUS_VIEW){if(!l.enableLook)return;if(r.mode==o.SCENE3D&&!l.enableRotate)return}var h=_.getCameraFocus(i.terria,!0,T);if(!e(h))return void this.controls[1].resetView();var d=r.globe.ellipsoid.cartographicToCartesian(a.positionCartographic,new s),p=r.globe.ellipsoid.geodeticSurfaceNormal(h),m=new u(h,0);a.flyToBoundingSphere(m,{offset:new c(0,t.PI_OVER_TWO-s.angleBetween(p,a.directionWC),s.distance(d,h)),duration:1.5})}},w.create=function(e){var t=new w(e);return t.show(e.container),t},w}),define("CesiumNavigation",["Cesium/Core/defined","Cesium/Core/defineProperties","Cesium/Core/Event","KnockoutES5","Core/registerKnockoutBindings","ViewModels/DistanceLegendViewModel","ViewModels/NavigationViewModel"],function(e,t,i,n,r,o,a){"use strict";function s(t,n){if(!e(t))throw new DeveloperError("CesiumWidget or Viewer is required.");var s=e(t.cesiumWidget)?t.cesiumWidget:t,l=document.createElement("div");l.className="cesium-widget-cesiumNavigationContainer",s.container.appendChild(l),this.terria=t,this.terria.options=n,this.terria.afterWidgetChanged=new i,this.terria.beforeWidgetChanged=new i,this.container=l,this.navigationDiv=document.createElement("div"),this.navigationDiv.setAttribute("id","navigationDiv"),this.distanceLegendDiv=document.createElement("div"),this.navigationDiv.setAttribute("id","distanceLegendDiv"),l.appendChild(this.navigationDiv),l.appendChild(this.distanceLegendDiv),r(),this.distanceLegendViewModel=o.create({container:this.distanceLegendDiv,terria:this.terria,mapElement:l}),this.navigationViewModel=a.create({container:this.navigationDiv,terria:this.terria})}var l=function(e){s.apply(this,arguments),this._onDestroyListeners=[]};return l.prototype.distanceLegendViewModel=void 0,l.prototype.navigationViewModel=void 0,l.prototype.navigationDiv=void 0,l.prototype.distanceLegendDiv=void 0,l.prototype.terria=void 0,l.prototype.container=void 0,l.prototype._onDestroyListeners=void 0,l.prototype.destroy=function(){e(this.navigationViewModel)&&this.navigationViewModel.destroy(),e(this.distanceLegendViewModel)&&this.distanceLegendViewModel.destroy(),e(this.navigationDiv)&&this.navigationDiv.parentNode.removeChild(this.navigationDiv),delete this.navigationDiv,e(this.distanceLegendDiv)&&this.distanceLegendDiv.parentNode.removeChild(this.distanceLegendDiv),delete this.distanceLegendDiv,e(this.container)&&this.container.parentNode.removeChild(this.container),delete this.container;for(var t=0;t<this._onDestroyListeners.length;t++)this._onDestroyListeners[t]()},l.prototype.addOnDestroyListener=function(e){"function"==typeof e&&this._onDestroyListeners.push(e)},l}),define("dummy/require-less/less/dummy",[],function(){}),define("viewerCesiumNavigationMixin",["Cesium/Core/defined","Cesium/Core/defineProperties","Cesium/Core/DeveloperError","CesiumNavigation","dummy/require-less/less/dummy"],function(e,t,i,n){"use strict";function r(n,r){if(!e(n))throw new i("viewer is required.");var a=o(n,r);a.addOnDestroyListener(function(e){return function(){delete e.cesiumNavigation}}(n)),t(n,{cesiumNavigation:{configurable:!0,get:function(){return n.cesiumWidget.cesiumNavigation}}})}r.mixinWidget=function(e,t){return o.apply(void 0,arguments)};var o=function(i,r){var o=new n(i,r),a=e(i.cesiumWidget)?i.cesiumWidget:i;return t(a,{cesiumNavigation:{configurable:!0,get:function(){return o}}}),o.addOnDestroyListener(function(e){return function(){delete e.cesiumNavigation}}(a)),o};return r}),function(e){var t=document,i="appendChild",n="styleSheet",r=t.createElement("style");r.type="text/css",t.getElementsByTagName("head")[0][i](r),r[n]?r[n].cssText=e:r[i](t.createTextNode(e))}(".full-window{position:absolute;top:0;left:0;right:0;bottom:0;margin:0;overflow:hidden;padding:0;-webkit-transition:left .25s ease-out;-moz-transition:left .25s ease-out;-ms-transition:left .25s ease-out;-o-transition:left .25s ease-out;transition:left .25s ease-out}.transparent-to-input{pointer-events:none}.opaque-to-input{pointer-events:auto}.clickable{cursor:pointer}.markdown a:hover,.markdown u,a:hover{text-decoration:underline}.modal,.modal-background{top:0;left:0;bottom:0;right:0}.modal-background{pointer-events:auto;background-color:rgba(0,0,0,.5);z-index:1000;position:fixed}.modal{position:absolute;margin:auto;background-color:#2f353c;max-height:100%;max-width:100%;font-family:'Roboto',sans-serif;color:#fff}.modal-header{background-color:rgba(0,0,0,.2);border-bottom:1px solid rgba(100,100,100,.6);font-size:15px;line-height:40px;margin:0}.modal-header h1{font-size:15px;color:#fff;margin-left:15px}.modal-content{margin-left:15px;margin-right:15px;margin-bottom:15px;padding-top:15px;overflow:auto}.modal-close-button{position:absolute;right:15px;cursor:pointer;font-size:18px;color:#fff}#ui{z-index:2100}@media print{.full-window{position:initial}}.markdown img{max-width:100%}.markdown svg{max-height:100%}.markdown fieldset,.markdown input,.markdown select,.markdown textarea{font-family:inherit;font-size:1rem;box-sizing:border-box;margin-top:0;margin-bottom:0}.markdown label{vertical-align:middle}.markdown h1,.markdown h2,.markdown h3,.markdown h4,.markdown h5,.markdown h6{font-family:inherit;font-weight:700;line-height:1.25;margin-top:1em;margin-bottom:.5em}.markdown h1{font-size:2rem}.markdown h2{font-size:1.5rem}.markdown h3{font-size:1.25rem}.markdown h4{font-size:1rem}.markdown h5{font-size:.875rem}.markdown h6{font-size:.75rem}.markdown dl,.markdown ol,.markdown p,.markdown ul{margin-top:0;margin-bottom:1rem}.markdown strong{font-weight:700}.markdown em{font-style:italic}.markdown small{font-size:80%}.markdown mark{color:#000;background:#ff0}.markdown s{text-decoration:line-through}.markdown ol{list-style:decimal inside}.markdown ul{list-style:disc inside}.markdown code,.markdown pre,.markdown samp{font-family:monospace;font-size:inherit}.markdown pre{margin-top:0;margin-bottom:1rem;overflow-x:scroll}.markdown a{color:#68adfe;text-decoration:none}.markdown code,.markdown pre{background-color:transparent;border-radius:3px}.markdown hr{border:0;border-bottom-style:solid;border-bottom-width:1px;border-bottom-color:rgba(0,0,0,.125)}.markdown .left-align{text-align:left}.markdown .center{text-align:center}.markdown .right-align{text-align:right}.markdown .justify{text-align:justify}.markdown .truncate{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.markdown ol.upper-roman{list-style-type:upper-roman}.markdown ol.lower-alpha{list-style-type:lower-alpha}.markdown ul.circle{list-style-type:circle}.markdown ul.square{list-style-type:square}.markdown .list-reset{list-style:none;padding-left:0}.floating,.floating-horizontal,.floating-vertical{pointer-events:auto;position:absolute;border-radius:15px;background-color:rgba(47,53,60,.8)}.floating-horizontal{padding-left:5px;padding-right:5px}.floating-vertical{padding-top:5px;padding-bottom:5px}@media print{.floating{display:none}}.distance-legend{pointer-events:auto;position:absolute;border-radius:15px;background-color:rgba(47,53,60,.8);padding-left:5px;padding-right:5px;right:25px;bottom:30px;height:30px;width:125px;border:1px solid rgba(255,255,255,.1);box-sizing:content-box}.distance-legend-label{display:inline-block;font-family:'Roboto',sans-serif;font-size:14px;font-weight:lighter;line-height:30px;color:#fff;width:125px;text-align:center}.distance-legend-scale-bar{border-left:1px solid #fff;border-right:1px solid #fff;border-bottom:1px solid #fff;position:absolute;height:10px;top:15px}@media print{.distance-legend{display:none}}@media screen and (max-width:700px),screen and (max-height:420px){.distance-legend{display:none}}.navigation-controls{position:absolute;right:30px;top:210px;width:30px;border:1px solid rgba(255,255,255,.1);font-weight:300;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.navigation-control{cursor:pointer;border-bottom:1px solid #555}.naviagation-control:active{color:#fff}.navigation-control-last{cursor:pointer;border-bottom:0}.navigation-control-icon-zoom-in{padding-bottom:4px}.navigation-control-icon-zoom-in,.navigation-control-icon-zoom-out{position:relative;text-align:center;font-size:20px;color:#fff}.navigation-control-icon-reset{position:relative;left:10px;width:10px;height:10px;fill:rgba(255,255,255,.8);padding-top:6px;padding-bottom:6px;box-sizing:content-box}.compass,.compass-outer-ring{position:absolute;width:95px;height:95px}.compass{pointer-events:auto;right:0;overflow:hidden;top:100px}.compass-outer-ring{top:0;fill:rgba(255,255,255,.5)}.compass-outer-ring-background{position:absolute;top:14px;left:14px;width:44px;height:44px;border-radius:44px;border:12px solid rgba(47,53,60,.8);box-sizing:content-box}.compass-gyro{pointer-events:none;position:absolute;top:0;width:95px;height:95px;fill:#ccc}.compass-gyro-active,.compass-gyro-background:hover+.compass-gyro{fill:#68adfe}.compass-gyro-background{position:absolute;top:30px;left:30px;width:33px;height:33px;border-radius:33px;background-color:rgba(47,53,60,.8);border:1px solid rgba(255,255,255,.2);box-sizing:content-box}.compass-rotation-marker{position:absolute;top:0;width:95px;height:95px;fill:#68adfe}@media screen and (max-width:700px),screen and (max-height:420px){.compass,.navigation-controls{display:none}}@media print{.compass,.navigation-controls{display:none}}"),define("viewerCesiumNavigationMixin",["viewerCesiumNavigationMixin"],function(e){return e}),require(["Cesium/Cesium","Source/SpirographPositionProperty_amd","viewerCesiumNavigationMixin"],function(e,t,i){"use strict";function n(i,n,o,a,s,l,u,c){var h=e.Cartographic.fromDegrees(n,o,a),d=new t(h,s,l,u,c,r.scene.globe.ellipsoid);r.entities.add({name:i,description:"It is supposed to have a useful desciption here<br />but instead there is just a placeholder to get a larger info box",position:d,orientation:new e.VelocityOrientationProperty(d,r.scene.globe.ellipsoid),model:{uri:i,minimumPixelSize:96}})}var r=new e.Viewer("cesiumContainer");r.extend(i,{}),n("models/Cesium_Air.glb",-100,44,1e4,e.Math.toRadians(.5),e.Math.toRadians(2),1e6,2e5),n("models/Cesium_Ground.glb",-122,45,0,e.Math.toRadians(.1),e.Math.toRadians(1),5e6,7e5)}),define("Source/amd/main",function(){}); \ No newline at end of file diff --git a/Examples/Source/SpirographPositionProperty.js b/Examples/Source/SpirographPositionProperty.js new file mode 100644 index 00000000..96176891 --- /dev/null +++ b/Examples/Source/SpirographPositionProperty.js @@ -0,0 +1,134 @@ +/** + * Created by G.Cordes on 01.06.16. + */ + +(function (Cesium) { + /** + * A position property that simulates a spirograph + * @constructor + * + * @param {Cesium.Cartographic} center The center of the spirograph + * @param {Number} radiusMedian The radius of the median circle + * @param {Number} radiusSubCircle the maximum distance to the median circle + * @param {Number} durationMedianCircle The duration in milliseconds to orbit the median circle + * @param {Number} durationSubCircle The duration in milliseconds to orbit the sub circle + * @param {Cesium.Ellipsoid} [ellipsoid=Cesium.Ellipsoid.WGS84] The ellipsoid to convert cartographic to cartesian + */ + var SpirographPositionProperty = function (center, radiusMedian, radiusSubCircle, durationMedianCircle, durationSubCircle, ellipsoid) { + this._center = center; + this._radiusMedian = radiusMedian; + this._radiusSubCircle = radiusSubCircle; + + this._durationMedianCircle = durationMedianCircle; + this._durationSubCircle = durationSubCircle; + + if (!Cesium.defined(ellipsoid)) { + ellipsoid = Cesium.Ellipsoid.WGS84; + } + this._ellipsoid = ellipsoid; + + this._definitionChanged = new Cesium.Event(); + }; + + Cesium.defineProperties(SpirographPositionProperty.prototype, { + /** + * Gets a value indicating if this property is constant. A property is considered + * constant if getValue always returns the same result for the current definition. + * @memberof PositionProperty.prototype + * + * @type {Boolean} + * @readonly + */ + isConstant: { + get: function () { + return this._radiusMedian == 0 && this._radiusSubCircle == 0; + } + }, + /** + * Gets the event that is raised whenever the definition of this property changes. + * The definition is considered to have changed if a call to getValue would return + * a different result for the same time. + * @memberof PositionProperty.prototype + * + * @type {Event} + * @readonly + */ + definitionChanged: { + get: function () { + return this._definitionChanged; + } + }, + /** + * Gets the reference frame that the position is defined in. + * @memberof PositionProperty.prototype + * @type {ReferenceFrame} + */ + referenceFrame: { + get: function () { + return Cesium.ReferenceFrame.FIXED; + } + } + }); + + /** + * Gets the value of the property at the provided time in the fixed frame. + * @function + * + * @param {JulianDate} time The time for which to retrieve the value. + * @param {Cartesian3} [result] The object to store the value into, if omitted, a new instance is created and returned. + * @returns {Cartesian3} The modified result parameter or a new instance if the result parameter was not supplied. + */ + SpirographPositionProperty.prototype.getValue = function (time, result) { + return this.getValueInReferenceFrame(time, Cesium.ReferenceFrame.FIXED, result); + }; + + var cartographicScratch = new Cesium.Cartographic(); + + /** + * Gets the value of the property at the provided time and in the provided reference frame. + * @function + * + * @param {JulianDate} time The time for which to retrieve the value. + * @param {ReferenceFrame} referenceFrame The desired referenceFrame of the result. + * @param {Cartesian3} [result] The object to store the value into, if omitted, a new instance is created and returned. + * @returns {Cartesian3} The modified result parameter or a new instance if the result parameter was not supplied. + */ + SpirographPositionProperty.prototype.getValueInReferenceFrame = function (time, referenceFrame, result) { + var milliseconds = Cesium.JulianDate.toDate(time).getTime(); + + var radius = this._radiusMedian + this._radiusSubCircle * Math.sin(2 * Math.PI * (milliseconds / this._durationSubCircle)); + + cartographicScratch.latitude = this._center.latitude + radius * Math.cos(2 * Math.PI * (milliseconds / this._durationMedianCircle)); + cartographicScratch.longitude = this._center.longitude + radius * Math.sin(2 * Math.PI * (milliseconds / this._durationMedianCircle)); + cartographicScratch.height = this._center.height; + + result = this._ellipsoid.cartographicToCartesian(cartographicScratch, result); + + if (referenceFrame == Cesium.ReferenceFrame.FIXED) { + return result; + } + + return Cesium.PositionProperty.convertToReferenceFrame(time, result, Cesium.ReferenceFrame.FIXED, referenceFrame, result); + }; + + /** + * Compares this property to the provided property and returns + * <code>true</code> if they are equal, <code>false</code> otherwise. + * @function + * + * @param {Property} [other] The other property. + * @returns {Boolean} <code>true</code> if left and right are equal, <code>false</code> otherwise. + */ + SpirographPositionProperty.prototype.equals = function (other) { + return other instanceof SpirographPositionProperty + && this._center.equals(other._center) + && this._radiusMedian == other._radiusMedian + && this._radiusSubCircle == other._radiusSubCircle + && this._durationMedianCircle == other._durationMedianCircle + && this._durationSubCircle == other._durationSubCircle + && this._ellipsoid.equals(other._ellipsoid); + }; + + Cesium.SpirographPositionProperty = SpirographPositionProperty; + +})(Cesium); \ No newline at end of file diff --git a/Examples/Source/SpirographPositionProperty_amd.js b/Examples/Source/SpirographPositionProperty_amd.js new file mode 100644 index 00000000..269a38d3 --- /dev/null +++ b/Examples/Source/SpirographPositionProperty_amd.js @@ -0,0 +1,137 @@ +/** + * Created by G.Cordes on 01.06.16. + */ + +define([ + 'Cesium/Cesium' +], function (Cesium) { + "use strict"; + + /** + * A position property that simulates a spirograph + * @constructor + * + * @param {Cesium.Cartographic} center The center of the spirograph + * @param {Number} radiusMedian The radius of the median circle + * @param {Number} radiusSubCircle the maximum distance to the median circle + * @param {Number} durationMedianCircle The duration in milliseconds to orbit the median circle + * @param {Number} durationSubCircle The duration in milliseconds to orbit the sub circle + * @param {Cesium.Ellipsoid} [ellipsoid=Cesium.Ellipsoid.WGS84] The ellipsoid to convert cartographic to cartesian + */ + var SpirographPositionProperty = function(center, radiusMedian, radiusSubCircle, durationMedianCircle, durationSubCircle, ellipsoid) { + this._center = center; + this._radiusMedian = radiusMedian; + this._radiusSubCircle = radiusSubCircle; + + this._durationMedianCircle = durationMedianCircle; + this._durationSubCircle = durationSubCircle; + + if(!Cesium.defined(ellipsoid)) { + ellipsoid = Cesium.Ellipsoid.WGS84; + } + this._ellipsoid = ellipsoid; + + this._definitionChanged = new Cesium.Event(); + }; + + Cesium.defineProperties(SpirographPositionProperty.prototype, { + /** + * Gets a value indicating if this property is constant. A property is considered + * constant if getValue always returns the same result for the current definition. + * @memberof PositionProperty.prototype + * + * @type {Boolean} + * @readonly + */ + isConstant : { + get : function() { + return this._radiusMedian == 0 && this._radiusSubCircle == 0; + } + }, + /** + * Gets the event that is raised whenever the definition of this property changes. + * The definition is considered to have changed if a call to getValue would return + * a different result for the same time. + * @memberof PositionProperty.prototype + * + * @type {Event} + * @readonly + */ + definitionChanged : { + get : function() { + return this._definitionChanged; + } + }, + /** + * Gets the reference frame that the position is defined in. + * @memberof PositionProperty.prototype + * @type {ReferenceFrame} + */ + referenceFrame : { + get : function() { + return Cesium.ReferenceFrame.FIXED; + } + } + }); + + /** + * Gets the value of the property at the provided time in the fixed frame. + * @function + * + * @param {JulianDate} time The time for which to retrieve the value. + * @param {Cartesian3} [result] The object to store the value into, if omitted, a new instance is created and returned. + * @returns {Cartesian3} The modified result parameter or a new instance if the result parameter was not supplied. + */ + SpirographPositionProperty.prototype.getValue = function(time, result) { + return this.getValueInReferenceFrame(time, Cesium.ReferenceFrame.FIXED, result); + }; + + var cartographicScratch = new Cesium.Cartographic(); + + /** + * Gets the value of the property at the provided time and in the provided reference frame. + * @function + * + * @param {JulianDate} time The time for which to retrieve the value. + * @param {ReferenceFrame} referenceFrame The desired referenceFrame of the result. + * @param {Cartesian3} [result] The object to store the value into, if omitted, a new instance is created and returned. + * @returns {Cartesian3} The modified result parameter or a new instance if the result parameter was not supplied. + */ + SpirographPositionProperty.prototype.getValueInReferenceFrame = function(time, referenceFrame, result) { + var milliseconds = Cesium.JulianDate.toDate(time).getTime(); + + var radius = this._radiusMedian + this._radiusSubCircle * Math.sin(2 * Math.PI * (milliseconds / this._durationSubCircle)); + + cartographicScratch.latitude = this._center.latitude + radius * Math.cos(2 * Math.PI * (milliseconds / this._durationMedianCircle)); + cartographicScratch.longitude = this._center.longitude + radius * Math.sin(2 * Math.PI * (milliseconds / this._durationMedianCircle)); + cartographicScratch.height = this._center.height; + + result = this._ellipsoid.cartographicToCartesian(cartographicScratch, result); + + if(referenceFrame == Cesium.ReferenceFrame.FIXED) { + return result; + } + + return Cesium.PositionProperty.convertToReferenceFrame(time, result, Cesium.ReferenceFrame.FIXED, referenceFrame, result); + }; + + /** + * Compares this property to the provided property and returns + * <code>true</code> if they are equal, <code>false</code> otherwise. + * @function + * + * @param {Property} [other] The other property. + * @returns {Boolean} <code>true</code> if left and right are equal, <code>false</code> otherwise. + */ + SpirographPositionProperty.prototype.equals = function(other) { + return other instanceof SpirographPositionProperty + && this._center.equals(other._center) + && this._radiusMedian == other._radiusMedian + && this._radiusSubCircle == other._radiusSubCircle + && this._durationMedianCircle == other._durationMedianCircle + && this._durationSubCircle == other._durationSubCircle + && this._ellipsoid.equals(other._ellipsoid); + }; + + return SpirographPositionProperty; +}); \ No newline at end of file diff --git a/Examples/Source/amd/main.js b/Examples/Source/amd/main.js index 3c45ec82..d3a49577 100644 --- a/Examples/Source/amd/main.js +++ b/Examples/Source/amd/main.js @@ -1,36 +1,30 @@ require([ - 'Cesium/Core/Cartesian3', - 'Cesium/Core/Math', - 'Cesium/Core/Transforms', - 'Cesium/Widgets/Viewer/Viewer', + 'Cesium/Cesium', + 'Source/SpirographPositionProperty_amd', 'viewerCesiumNavigationMixin' ], function( - Cartesian3, - CesiumMath, - Transforms, - Viewer, + Cesium, + SpirographPositionProperty, viewerCesiumNavigationMixin) { "use strict"; - var cesiumViewer = new Viewer('cesiumContainer'); + var cesiumViewer = new Cesium.Viewer('cesiumContainer'); - // extend our view by the cesium navigaton mixin + // extend our view by the cesium navigation mixin cesiumViewer.extend(viewerCesiumNavigationMixin, {}); // you can access the cesium navigation by cesiumViewer.cesiumNavigation or cesiumViewer.cesiumWidget.cesiumNavigation - // just some entities - function createModel(url, longitude, latitude, height) { - var position = Cartesian3.fromDegrees(longitude, latitude, height); - var heading = CesiumMath.toRadians(135); - var pitch = 0; - var roll = 0; - var orientation = Transforms.headingPitchRollQuaternion(position, heading, pitch, roll); + function createSpirographEntity(url, longitude, latitude, height, radiusMedian, radiusSubCircle, + durationMedianCircle, durationSubCircle) { + var centerPosition = Cesium.Cartographic.fromDegrees(longitude, latitude, height); + var spirographPositionProperty = new SpirographPositionProperty(centerPosition, radiusMedian, radiusSubCircle, + durationMedianCircle, durationSubCircle, cesiumViewer.scene.globe.ellipsoid); - var entity = cesiumViewer.entities.add({ + cesiumViewer.entities.add({ name : url, description: 'It is supposed to have a useful desciption here<br />but instead there is just a placeholder to get a larger info box', - position : position, - orientation : orientation, + position: spirographPositionProperty, + orientation: new Cesium.VelocityOrientationProperty(spirographPositionProperty, cesiumViewer.scene.globe.ellipsoid), model : { uri : url, minimumPixelSize : 96 @@ -38,6 +32,8 @@ require([ }); } - createModel('models/Cesium_Air.glb', -100, 44, 10000.0); - createModel('models/Cesium_Ground.glb', -122, 45, 0); + createSpirographEntity('models/Cesium_Air.glb', -100, 44, 10000.0, + Cesium.Math.toRadians(0.5), Cesium.Math.toRadians(2), 1e6, 2e5); + createSpirographEntity('models/Cesium_Ground.glb', -122, 45, 0, + Cesium.Math.toRadians(0.1), Cesium.Math.toRadians(1), 5e6, 7e5); }); \ No newline at end of file diff --git a/Examples/Source/mainConfig.js b/Examples/Source/mainConfig.js index eec4adde..a70b73ca 100644 --- a/Examples/Source/mainConfig.js +++ b/Examples/Source/mainConfig.js @@ -3,7 +3,7 @@ requirejs.config({ paths: { // IMPORTANT: this path has to be set because // viewerCesiumNavigationMixin uses 'Cesium/...' for dependencies - Cesium: "empty:", + Cesium: "../node_modules/cesium/Source", viewerCesiumNavigationMixin: "../dist/amd/viewerCesiumNavigationMixin.min" } }); \ No newline at end of file diff --git a/Examples/amd.html b/Examples/amd.html index 99acd337..d4e5b41c 100644 --- a/Examples/amd.html +++ b/Examples/amd.html @@ -3,15 +3,8 @@ <head> <title>Cesium-Navigation Example (using requirejs.optimize) -