diff --git a/cesium-compass-bar.0ee72d25.js b/cesium-compass-bar.0ee72d25.js deleted file mode 100644 index c1ba467..0000000 --- a/cesium-compass-bar.0ee72d25.js +++ /dev/null @@ -1,1409 +0,0 @@ -// modules are defined as an array -// [ module function, map of requires ] -// -// map of requires is short require name -> numeric require -// -// anything defined in a previous bundle is accessed via the -// orig method which is the require for previous bundles - -(function (modules, entry, mainEntry, parcelRequireName, globalName) { - /* eslint-disable no-undef */ - var globalObject = - typeof globalThis !== 'undefined' - ? globalThis - : typeof self !== 'undefined' - ? self - : typeof window !== 'undefined' - ? window - : typeof global !== 'undefined' - ? global - : {}; - /* eslint-enable no-undef */ - - // Save the require from previous bundle to this closure if any - var previousRequire = - typeof globalObject[parcelRequireName] === 'function' && - globalObject[parcelRequireName]; - - var cache = previousRequire.cache || {}; - // Do not use `require` to prevent Webpack from trying to bundle this call - var nodeRequire = - typeof module !== 'undefined' && - typeof module.require === 'function' && - module.require.bind(module); - - function newRequire(name, jumped) { - if (!cache[name]) { - if (!modules[name]) { - // if we cannot find the module within our internal map or - // cache jump to the current global require ie. the last bundle - // that was added to the page. - var currentRequire = - typeof globalObject[parcelRequireName] === 'function' && - globalObject[parcelRequireName]; - if (!jumped && currentRequire) { - return currentRequire(name, true); - } - - // If there are other bundles on this page the require from the - // previous one is saved to 'previousRequire'. Repeat this as - // many times as there are bundles until the module is found or - // we exhaust the require chain. - if (previousRequire) { - return previousRequire(name, true); - } - - // Try the node require function if it exists. - if (nodeRequire && typeof name === 'string') { - return nodeRequire(name); - } - - var err = new Error("Cannot find module '" + name + "'"); - err.code = 'MODULE_NOT_FOUND'; - throw err; - } - - localRequire.resolve = resolve; - localRequire.cache = {}; - - var module = (cache[name] = new newRequire.Module(name)); - - modules[name][0].call( - module.exports, - localRequire, - module, - module.exports, - this - ); - } - - return cache[name].exports; - - function localRequire(x) { - var res = localRequire.resolve(x); - return res === false ? {} : newRequire(res); - } - - function resolve(x) { - var id = modules[name][1][x]; - return id != null ? id : x; - } - } - - function Module(moduleName) { - this.id = moduleName; - this.bundle = newRequire; - this.exports = {}; - } - - newRequire.isParcelRequire = true; - newRequire.Module = Module; - newRequire.modules = modules; - newRequire.cache = cache; - newRequire.parent = previousRequire; - newRequire.register = function (id, exports) { - modules[id] = [ - function (require, module) { - module.exports = exports; - }, - {}, - ]; - }; - - Object.defineProperty(newRequire, 'root', { - get: function () { - return globalObject[parcelRequireName]; - }, - }); - - globalObject[parcelRequireName] = newRequire; - - for (var i = 0; i < entry.length; i++) { - newRequire(entry[i]); - } - - if (mainEntry) { - // Expose entry point to Node, AMD or browser globals - // Based on https://github.com/ForbesLindesay/umd/blob/master/template.js - var mainExports = newRequire(mainEntry); - - // CommonJS - if (typeof exports === 'object' && typeof module !== 'undefined') { - module.exports = mainExports; - - // RequireJS - } else if (typeof define === 'function' && define.amd) { - define(function () { - return mainExports; - }); - - // \n * ```\n * @nocollapse\n * @category styles\n */\n static styles?: CSSResultGroup;\n\n /**\n * Returns a list of attributes corresponding to the registered properties.\n * @nocollapse\n * @category attributes\n */\n static get observedAttributes() {\n // Ensure we've created all properties\n this.finalize();\n // this.__attributeToPropertyMap is only undefined after finalize() in\n // ReactiveElement itself. ReactiveElement.observedAttributes is only\n // accessed with ReactiveElement as the receiver when a subclass or mixin\n // calls super.observedAttributes\n return (\n this.__attributeToPropertyMap && [...this.__attributeToPropertyMap.keys()]\n );\n }\n\n private __instanceProperties?: PropertyValues = undefined;\n\n /**\n * Creates a property accessor on the element prototype if one does not exist\n * and stores a {@linkcode PropertyDeclaration} for the property with the\n * given options. The property setter calls the property's `hasChanged`\n * property option or uses a strict identity check to determine whether or not\n * to request an update.\n *\n * This method may be overridden to customize properties; however,\n * when doing so, it's important to call `super.createProperty` to ensure\n * the property is setup correctly. This method calls\n * `getPropertyDescriptor` internally to get a descriptor to install.\n * To customize what properties do when they are get or set, override\n * `getPropertyDescriptor`. To customize the options for a property,\n * implement `createProperty` like this:\n *\n * ```ts\n * static createProperty(name, options) {\n * options = Object.assign(options, {myOption: true});\n * super.createProperty(name, options);\n * }\n * ```\n *\n * @nocollapse\n * @category properties\n */\n static createProperty(\n name: PropertyKey,\n options: PropertyDeclaration = defaultPropertyDeclaration\n ) {\n // If this is a state property, force the attribute to false.\n if (options.state) {\n (options as Mutable).attribute = false;\n }\n this.__prepare();\n this.elementProperties.set(name, options);\n if (!options.noAccessor) {\n const key = DEV_MODE\n ? // Use Symbol.for in dev mode to make it easier to maintain state\n // when doing HMR.\n Symbol.for(`${String(name)} (@property() cache)`)\n : Symbol();\n const descriptor = this.getPropertyDescriptor(name, key, options);\n if (descriptor !== undefined) {\n defineProperty(this.prototype, name, descriptor);\n }\n }\n }\n\n /**\n * Returns a property descriptor to be defined on the given named property.\n * If no descriptor is returned, the property will not become an accessor.\n * For example,\n *\n * ```ts\n * class MyElement extends LitElement {\n * static getPropertyDescriptor(name, key, options) {\n * const defaultDescriptor =\n * super.getPropertyDescriptor(name, key, options);\n * const setter = defaultDescriptor.set;\n * return {\n * get: defaultDescriptor.get,\n * set(value) {\n * setter.call(this, value);\n * // custom action.\n * },\n * configurable: true,\n * enumerable: true\n * }\n * }\n * }\n * ```\n *\n * @nocollapse\n * @category properties\n */\n protected static getPropertyDescriptor(\n name: PropertyKey,\n key: string | symbol,\n options: PropertyDeclaration\n ): PropertyDescriptor | undefined {\n const {get, set} = getOwnPropertyDescriptor(this.prototype, name) ?? {\n get(this: ReactiveElement) {\n return this[key as keyof typeof this];\n },\n set(this: ReactiveElement, v: unknown) {\n (this as unknown as Record)[key] = v;\n },\n };\n if (DEV_MODE && get == null) {\n if ('value' in (getOwnPropertyDescriptor(this.prototype, name) ?? {})) {\n throw new Error(\n `Field ${JSON.stringify(String(name))} on ` +\n `${this.name} was declared as a reactive property ` +\n `but it's actually declared as a value on the prototype. ` +\n `Usually this is due to using @property or @state on a method.`\n );\n }\n issueWarning(\n 'reactive-property-without-getter',\n `Field ${JSON.stringify(String(name))} on ` +\n `${this.name} was declared as a reactive property ` +\n `but it does not have a getter. This will be an error in a ` +\n `future version of Lit.`\n );\n }\n return {\n get(this: ReactiveElement) {\n return get?.call(this);\n },\n set(this: ReactiveElement, value: unknown) {\n const oldValue = get?.call(this);\n set!.call(this, value);\n this.requestUpdate(name, oldValue, options);\n },\n configurable: true,\n enumerable: true,\n };\n }\n\n /**\n * Returns the property options associated with the given property.\n * These options are defined with a `PropertyDeclaration` via the `properties`\n * object or the `@property` decorator and are registered in\n * `createProperty(...)`.\n *\n * Note, this method should be considered \"final\" and not overridden. To\n * customize the options for a given property, override\n * {@linkcode createProperty}.\n *\n * @nocollapse\n * @final\n * @category properties\n */\n static getPropertyOptions(name: PropertyKey) {\n return this.elementProperties.get(name) ?? defaultPropertyDeclaration;\n }\n\n // Temporary, until google3 is on TypeScript 5.2\n declare static [Symbol.metadata]: object & Record;\n\n /**\n * Initializes static own properties of the class used in bookkeeping\n * for element properties, initializers, etc.\n *\n * Can be called multiple times by code that needs to ensure these\n * properties exist before using them.\n *\n * This method ensures the superclass is finalized so that inherited\n * property metadata can be copied down.\n * @nocollapse\n */\n private static __prepare() {\n if (\n this.hasOwnProperty(JSCompiler_renameProperty('elementProperties', this))\n ) {\n // Already prepared\n return;\n }\n // Finalize any superclasses\n const superCtor = getPrototypeOf(this) as typeof ReactiveElement;\n superCtor.finalize();\n\n // Create own set of initializers for this class if any exist on the\n // superclass and copy them down. Note, for a small perf boost, avoid\n // creating initializers unless needed.\n if (superCtor._initializers !== undefined) {\n this._initializers = [...superCtor._initializers];\n }\n // Initialize elementProperties from the superclass\n this.elementProperties = new Map(superCtor.elementProperties);\n }\n\n /**\n * Finishes setting up the class so that it's ready to be registered\n * as a custom element and instantiated.\n *\n * This method is called by the ReactiveElement.observedAttributes getter.\n * If you override the observedAttributes getter, you must either call\n * super.observedAttributes to trigger finalization, or call finalize()\n * yourself.\n *\n * @nocollapse\n */\n protected static finalize() {\n if (this.hasOwnProperty(JSCompiler_renameProperty('finalized', this))) {\n return;\n }\n this.finalized = true;\n this.__prepare();\n\n // Create properties from the static properties block:\n if (this.hasOwnProperty(JSCompiler_renameProperty('properties', this))) {\n const props = this.properties;\n const propKeys = [\n ...getOwnPropertyNames(props),\n ...getOwnPropertySymbols(props),\n ] as Array;\n for (const p of propKeys) {\n this.createProperty(p, props[p]);\n }\n }\n\n // Create properties from standard decorator metadata:\n const metadata = this[Symbol.metadata];\n if (metadata !== null) {\n const properties = litPropertyMetadata.get(metadata);\n if (properties !== undefined) {\n for (const [p, options] of properties) {\n this.elementProperties.set(p, options);\n }\n }\n }\n\n // Create the attribute-to-property map\n this.__attributeToPropertyMap = new Map();\n for (const [p, options] of this.elementProperties) {\n const attr = this.__attributeNameForProperty(p, options);\n if (attr !== undefined) {\n this.__attributeToPropertyMap.set(attr, p);\n }\n }\n\n this.elementStyles = this.finalizeStyles(this.styles);\n\n if (DEV_MODE) {\n if (this.hasOwnProperty('createProperty')) {\n issueWarning(\n 'no-override-create-property',\n 'Overriding ReactiveElement.createProperty() is deprecated. ' +\n 'The override will not be called with standard decorators'\n );\n }\n if (this.hasOwnProperty('getPropertyDescriptor')) {\n issueWarning(\n 'no-override-get-property-descriptor',\n 'Overriding ReactiveElement.getPropertyDescriptor() is deprecated. ' +\n 'The override will not be called with standard decorators'\n );\n }\n }\n }\n\n /**\n * Options used when calling `attachShadow`. Set this property to customize\n * the options for the shadowRoot; for example, to create a closed\n * shadowRoot: `{mode: 'closed'}`.\n *\n * Note, these options are used in `createRenderRoot`. If this method\n * is customized, options should be respected if possible.\n * @nocollapse\n * @category rendering\n */\n static shadowRootOptions: ShadowRootInit = {mode: 'open'};\n\n /**\n * Takes the styles the user supplied via the `static styles` property and\n * returns the array of styles to apply to the element.\n * Override this method to integrate into a style management system.\n *\n * Styles are deduplicated preserving the _last_ instance in the list. This\n * is a performance optimization to avoid duplicated styles that can occur\n * especially when composing via subclassing. The last item is kept to try\n * to preserve the cascade order with the assumption that it's most important\n * that last added styles override previous styles.\n *\n * @nocollapse\n * @category styles\n */\n protected static finalizeStyles(\n styles?: CSSResultGroup\n ): Array {\n const elementStyles = [];\n if (Array.isArray(styles)) {\n // Dedupe the flattened array in reverse order to preserve the last items.\n // Casting to Array works around TS error that\n // appears to come from trying to flatten a type CSSResultArray.\n const set = new Set((styles as Array).flat(Infinity).reverse());\n // Then preserve original order by adding the set items in reverse order.\n for (const s of set) {\n elementStyles.unshift(getCompatibleStyle(s as CSSResultOrNative));\n }\n } else if (styles !== undefined) {\n elementStyles.push(getCompatibleStyle(styles));\n }\n return elementStyles;\n }\n\n /**\n * Node or ShadowRoot into which element DOM should be rendered. Defaults\n * to an open shadowRoot.\n * @category rendering\n */\n readonly renderRoot!: HTMLElement | DocumentFragment;\n\n /**\n * Returns the property name for the given attribute `name`.\n * @nocollapse\n */\n private static __attributeNameForProperty(\n name: PropertyKey,\n options: PropertyDeclaration\n ) {\n const attribute = options.attribute;\n return attribute === false\n ? undefined\n : typeof attribute === 'string'\n ? attribute\n : typeof name === 'string'\n ? name.toLowerCase()\n : undefined;\n }\n\n // Initialize to an unresolved Promise so we can make sure the element has\n // connected before first update.\n private __updatePromise!: Promise;\n\n /**\n * True if there is a pending update as a result of calling `requestUpdate()`.\n * Should only be read.\n * @category updates\n */\n isUpdatePending = false;\n\n /**\n * Is set to `true` after the first update. The element code cannot assume\n * that `renderRoot` exists before the element `hasUpdated`.\n * @category updates\n */\n hasUpdated = false;\n\n /**\n * Map with keys for any properties that have changed since the last\n * update cycle with previous values.\n *\n * @internal\n */\n _$changedProperties!: PropertyValues;\n\n /**\n * Properties that should be reflected when updated.\n */\n private __reflectingProperties?: Set;\n\n /**\n * Name of currently reflecting property\n */\n private __reflectingProperty: PropertyKey | null = null;\n\n /**\n * Set of controllers.\n */\n private __controllers?: Set;\n\n constructor() {\n super();\n this.__initialize();\n }\n\n /**\n * Internal only override point for customizing work done when elements\n * are constructed.\n */\n private __initialize() {\n this.__updatePromise = new Promise(\n (res) => (this.enableUpdating = res)\n );\n this._$changedProperties = new Map();\n // This enqueues a microtask that ust run before the first update, so it\n // must be called before requestUpdate()\n this.__saveInstanceProperties();\n // ensures first update will be caught by an early access of\n // `updateComplete`\n this.requestUpdate();\n (this.constructor as typeof ReactiveElement)._initializers?.forEach((i) =>\n i(this)\n );\n }\n\n /**\n * Registers a `ReactiveController` to participate in the element's reactive\n * update cycle. The element automatically calls into any registered\n * controllers during its lifecycle callbacks.\n *\n * If the element is connected when `addController()` is called, the\n * controller's `hostConnected()` callback will be immediately called.\n * @category controllers\n */\n addController(controller: ReactiveController) {\n (this.__controllers ??= new Set()).add(controller);\n // If a controller is added after the element has been connected,\n // call hostConnected. Note, re-using existence of `renderRoot` here\n // (which is set in connectedCallback) to avoid the need to track a\n // first connected state.\n if (this.renderRoot !== undefined && this.isConnected) {\n controller.hostConnected?.();\n }\n }\n\n /**\n * Removes a `ReactiveController` from the element.\n * @category controllers\n */\n removeController(controller: ReactiveController) {\n this.__controllers?.delete(controller);\n }\n\n /**\n * Fixes any properties set on the instance before upgrade time.\n * Otherwise these would shadow the accessor and break these properties.\n * The properties are stored in a Map which is played back after the\n * constructor runs. Note, on very old versions of Safari (<=9) or Chrome\n * (<=41), properties created for native platform properties like (`id` or\n * `name`) may not have default values set in the element constructor. On\n * these browsers native properties appear on instances and therefore their\n * default value will overwrite any element default (e.g. if the element sets\n * this.id = 'id' in the constructor, the 'id' will become '' since this is\n * the native platform default).\n */\n private __saveInstanceProperties() {\n const instanceProperties = new Map();\n const elementProperties = (this.constructor as typeof ReactiveElement)\n .elementProperties;\n for (const p of elementProperties.keys() as IterableIterator) {\n if (this.hasOwnProperty(p)) {\n instanceProperties.set(p, this[p]);\n delete this[p];\n }\n }\n if (instanceProperties.size > 0) {\n this.__instanceProperties = instanceProperties;\n }\n }\n\n /**\n * Returns the node into which the element should render and by default\n * creates and returns an open shadowRoot. Implement to customize where the\n * element's DOM is rendered. For example, to render into the element's\n * childNodes, return `this`.\n *\n * @return Returns a node into which to render.\n * @category rendering\n */\n protected createRenderRoot(): HTMLElement | DocumentFragment {\n const renderRoot =\n this.shadowRoot ??\n this.attachShadow(\n (this.constructor as typeof ReactiveElement).shadowRootOptions\n );\n adoptStyles(\n renderRoot,\n (this.constructor as typeof ReactiveElement).elementStyles\n );\n return renderRoot;\n }\n\n /**\n * On first connection, creates the element's renderRoot, sets up\n * element styling, and enables updating.\n * @category lifecycle\n */\n connectedCallback() {\n // Create renderRoot before controllers `hostConnected`\n (this as Mutable).renderRoot ??=\n this.createRenderRoot();\n this.enableUpdating(true);\n this.__controllers?.forEach((c) => c.hostConnected?.());\n }\n\n /**\n * Note, this method should be considered final and not overridden. It is\n * overridden on the element instance with a function that triggers the first\n * update.\n * @category updates\n */\n protected enableUpdating(_requestedUpdate: boolean) {}\n\n /**\n * Allows for `super.disconnectedCallback()` in extensions while\n * reserving the possibility of making non-breaking feature additions\n * when disconnecting at some point in the future.\n * @category lifecycle\n */\n disconnectedCallback() {\n this.__controllers?.forEach((c) => c.hostDisconnected?.());\n }\n\n /**\n * Synchronizes property values when attributes change.\n *\n * Specifically, when an attribute is set, the corresponding property is set.\n * You should rarely need to implement this callback. If this method is\n * overridden, `super.attributeChangedCallback(name, _old, value)` must be\n * called.\n *\n * See [using the lifecycle callbacks](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements#using_the_lifecycle_callbacks)\n * on MDN for more information about the `attributeChangedCallback`.\n * @category attributes\n */\n attributeChangedCallback(\n name: string,\n _old: string | null,\n value: string | null\n ) {\n this._$attributeToProperty(name, value);\n }\n\n private __propertyToAttribute(name: PropertyKey, value: unknown) {\n const elemProperties: PropertyDeclarationMap = (\n this.constructor as typeof ReactiveElement\n ).elementProperties;\n const options = elemProperties.get(name)!;\n const attr = (\n this.constructor as typeof ReactiveElement\n ).__attributeNameForProperty(name, options);\n if (attr !== undefined && options.reflect === true) {\n const converter =\n (options.converter as ComplexAttributeConverter)?.toAttribute !==\n undefined\n ? (options.converter as ComplexAttributeConverter)\n : defaultConverter;\n const attrValue = converter.toAttribute!(value, options.type);\n if (\n DEV_MODE &&\n (this.constructor as typeof ReactiveElement).enabledWarnings!.includes(\n 'migration'\n ) &&\n attrValue === undefined\n ) {\n issueWarning(\n 'undefined-attribute-value',\n `The attribute value for the ${name as string} property is ` +\n `undefined on element ${this.localName}. The attribute will be ` +\n `removed, but in the previous version of \\`ReactiveElement\\`, ` +\n `the attribute would not have changed.`\n );\n }\n // Track if the property is being reflected to avoid\n // setting the property again via `attributeChangedCallback`. Note:\n // 1. this takes advantage of the fact that the callback is synchronous.\n // 2. will behave incorrectly if multiple attributes are in the reaction\n // stack at time of calling. However, since we process attributes\n // in `update` this should not be possible (or an extreme corner case\n // that we'd like to discover).\n // mark state reflecting\n this.__reflectingProperty = name;\n if (attrValue == null) {\n this.removeAttribute(attr);\n } else {\n this.setAttribute(attr, attrValue as string);\n }\n // mark state not reflecting\n this.__reflectingProperty = null;\n }\n }\n\n /** @internal */\n _$attributeToProperty(name: string, value: string | null) {\n const ctor = this.constructor as typeof ReactiveElement;\n // Note, hint this as an `AttributeMap` so closure clearly understands\n // the type; it has issues with tracking types through statics\n const propName = (ctor.__attributeToPropertyMap as AttributeMap).get(name);\n // Use tracking info to avoid reflecting a property value to an attribute\n // if it was just set because the attribute changed.\n if (propName !== undefined && this.__reflectingProperty !== propName) {\n const options = ctor.getPropertyOptions(propName);\n const converter =\n typeof options.converter === 'function'\n ? {fromAttribute: options.converter}\n : options.converter?.fromAttribute !== undefined\n ? options.converter\n : defaultConverter;\n // mark state reflecting\n this.__reflectingProperty = propName;\n this[propName as keyof this] = converter.fromAttribute!(\n value,\n options.type\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ) as any;\n // mark state not reflecting\n this.__reflectingProperty = null;\n }\n }\n\n /**\n * Requests an update which is processed asynchronously. This should be called\n * when an element should update based on some state not triggered by setting\n * a reactive property. In this case, pass no arguments. It should also be\n * called when manually implementing a property setter. In this case, pass the\n * property `name` and `oldValue` to ensure that any configured property\n * options are honored.\n *\n * @param name name of requesting property\n * @param oldValue old value of requesting property\n * @param options property options to use instead of the previously\n * configured options\n * @category updates\n */\n requestUpdate(\n name?: PropertyKey,\n oldValue?: unknown,\n options?: PropertyDeclaration\n ): void {\n // If we have a property key, perform property update steps.\n if (name !== undefined) {\n if (DEV_MODE && (name as unknown) instanceof Event) {\n issueWarning(\n ``,\n `The requestUpdate() method was called with an Event as the property name. This is probably a mistake caused by binding this.requestUpdate as an event listener. Instead bind a function that will call it with no arguments: () => this.requestUpdate()`\n );\n }\n options ??= (\n this.constructor as typeof ReactiveElement\n ).getPropertyOptions(name);\n const hasChanged = options.hasChanged ?? notEqual;\n const newValue = this[name as keyof this];\n if (hasChanged(newValue, oldValue)) {\n this._$changeProperty(name, oldValue, options);\n } else {\n // Abort the request if the property should not be considered changed.\n return;\n }\n }\n if (this.isUpdatePending === false) {\n this.__updatePromise = this.__enqueueUpdate();\n }\n }\n\n /**\n * @internal\n */\n _$changeProperty(\n name: PropertyKey,\n oldValue: unknown,\n options: PropertyDeclaration\n ) {\n // TODO (justinfagnani): Create a benchmark of Map.has() + Map.set(\n // vs just Map.set()\n if (!this._$changedProperties.has(name)) {\n this._$changedProperties.set(name, oldValue);\n }\n // Add to reflecting properties set.\n // Note, it's important that every change has a chance to add the\n // property to `__reflectingProperties`. This ensures setting\n // attribute + property reflects correctly.\n if (options.reflect === true && this.__reflectingProperty !== name) {\n (this.__reflectingProperties ??= new Set()).add(name);\n }\n }\n\n /**\n * Sets up the element to asynchronously update.\n */\n private async __enqueueUpdate() {\n this.isUpdatePending = true;\n try {\n // Ensure any previous update has resolved before updating.\n // This `await` also ensures that property changes are batched.\n await this.__updatePromise;\n } catch (e) {\n // Refire any previous errors async so they do not disrupt the update\n // cycle. Errors are refired so developers have a chance to observe\n // them, and this can be done by implementing\n // `window.onunhandledrejection`.\n Promise.reject(e);\n }\n const result = this.scheduleUpdate();\n // If `scheduleUpdate` returns a Promise, we await it. This is done to\n // enable coordinating updates with a scheduler. Note, the result is\n // checked to avoid delaying an additional microtask unless we need to.\n if (result != null) {\n await result;\n }\n return !this.isUpdatePending;\n }\n\n /**\n * Schedules an element update. You can override this method to change the\n * timing of updates by returning a Promise. The update will await the\n * returned Promise, and you should resolve the Promise to allow the update\n * to proceed. If this method is overridden, `super.scheduleUpdate()`\n * must be called.\n *\n * For instance, to schedule updates to occur just before the next frame:\n *\n * ```ts\n * override protected async scheduleUpdate(): Promise {\n * await new Promise((resolve) => requestAnimationFrame(() => resolve()));\n * super.scheduleUpdate();\n * }\n * ```\n * @category updates\n */\n protected scheduleUpdate(): void | Promise {\n const result = this.performUpdate();\n if (\n DEV_MODE &&\n (this.constructor as typeof ReactiveElement).enabledWarnings!.includes(\n 'async-perform-update'\n ) &&\n typeof (result as unknown as Promise | undefined)?.then ===\n 'function'\n ) {\n issueWarning(\n 'async-perform-update',\n `Element ${this.localName} returned a Promise from performUpdate(). ` +\n `This behavior is deprecated and will be removed in a future ` +\n `version of ReactiveElement.`\n );\n }\n return result;\n }\n\n /**\n * Performs an element update. Note, if an exception is thrown during the\n * update, `firstUpdated` and `updated` will not be called.\n *\n * Call `performUpdate()` to immediately process a pending update. This should\n * generally not be needed, but it can be done in rare cases when you need to\n * update synchronously.\n *\n * @category updates\n */\n protected performUpdate(): void {\n // Abort any update if one is not pending when this is called.\n // This can happen if `performUpdate` is called early to \"flush\"\n // the update.\n if (!this.isUpdatePending) {\n return;\n }\n debugLogEvent?.({kind: 'update'});\n if (!this.hasUpdated) {\n // Create renderRoot before first update. This occurs in `connectedCallback`\n // but is done here to support out of tree calls to `enableUpdating`/`performUpdate`.\n (this as Mutable).renderRoot ??=\n this.createRenderRoot();\n if (DEV_MODE) {\n // Produce warning if any reactive properties on the prototype are\n // shadowed by class fields. Instance fields set before upgrade are\n // deleted by this point, so any own property is caused by class field\n // initialization in the constructor.\n const ctor = this.constructor as typeof ReactiveElement;\n const shadowedProperties = [...ctor.elementProperties.keys()].filter(\n (p) => this.hasOwnProperty(p) && p in getPrototypeOf(this)\n );\n if (shadowedProperties.length) {\n throw new Error(\n `The following properties on element ${this.localName} will not ` +\n `trigger updates as expected because they are set using class ` +\n `fields: ${shadowedProperties.join(', ')}. ` +\n `Native class fields and some compiled output will overwrite ` +\n `accessors used for detecting changes. See ` +\n `https://lit.dev/msg/class-field-shadowing ` +\n `for more information.`\n );\n }\n }\n // Mixin instance properties once, if they exist.\n if (this.__instanceProperties) {\n // TODO (justinfagnani): should we use the stored value? Could a new value\n // have been set since we stored the own property value?\n for (const [p, value] of this.__instanceProperties) {\n this[p as keyof this] = value as this[keyof this];\n }\n this.__instanceProperties = undefined;\n }\n // Trigger initial value reflection and populate the initial\n // changedProperties map, but only for the case of experimental\n // decorators on accessors, which will not have already populated the\n // changedProperties map. We can't know if these accessors had\n // initializers, so we just set them anyway - a difference from\n // experimental decorators on fields and standard decorators on\n // auto-accessors.\n // For context why experimentalDecorators with auto accessors are handled\n // specifically also see:\n // https://github.com/lit/lit/pull/4183#issuecomment-1711959635\n const elementProperties = (this.constructor as typeof ReactiveElement)\n .elementProperties;\n if (elementProperties.size > 0) {\n for (const [p, options] of elementProperties) {\n if (\n options.wrapped === true &&\n !this._$changedProperties.has(p) &&\n this[p as keyof this] !== undefined\n ) {\n this._$changeProperty(p, this[p as keyof this], options);\n }\n }\n }\n }\n let shouldUpdate = false;\n const changedProperties = this._$changedProperties;\n try {\n shouldUpdate = this.shouldUpdate(changedProperties);\n if (shouldUpdate) {\n this.willUpdate(changedProperties);\n this.__controllers?.forEach((c) => c.hostUpdate?.());\n this.update(changedProperties);\n } else {\n this.__markUpdated();\n }\n } catch (e) {\n // Prevent `firstUpdated` and `updated` from running when there's an\n // update exception.\n shouldUpdate = false;\n // Ensure element can accept additional updates after an exception.\n this.__markUpdated();\n throw e;\n }\n // The update is no longer considered pending and further updates are now allowed.\n if (shouldUpdate) {\n this._$didUpdate(changedProperties);\n }\n }\n\n /**\n * Invoked before `update()` to compute values needed during the update.\n *\n * Implement `willUpdate` to compute property values that depend on other\n * properties and are used in the rest of the update process.\n *\n * ```ts\n * willUpdate(changedProperties) {\n * // only need to check changed properties for an expensive computation.\n * if (changedProperties.has('firstName') || changedProperties.has('lastName')) {\n * this.sha = computeSHA(`${this.firstName} ${this.lastName}`);\n * }\n * }\n *\n * render() {\n * return html`SHA: ${this.sha}`;\n * }\n * ```\n *\n * @category updates\n */\n protected willUpdate(_changedProperties: PropertyValues): void {}\n\n // Note, this is an override point for polyfill-support.\n // @internal\n _$didUpdate(changedProperties: PropertyValues) {\n this.__controllers?.forEach((c) => c.hostUpdated?.());\n if (!this.hasUpdated) {\n this.hasUpdated = true;\n this.firstUpdated(changedProperties);\n }\n this.updated(changedProperties);\n if (\n DEV_MODE &&\n this.isUpdatePending &&\n (this.constructor as typeof ReactiveElement).enabledWarnings!.includes(\n 'change-in-update'\n )\n ) {\n issueWarning(\n 'change-in-update',\n `Element ${this.localName} scheduled an update ` +\n `(generally because a property was set) ` +\n `after an update completed, causing a new update to be scheduled. ` +\n `This is inefficient and should be avoided unless the next update ` +\n `can only be scheduled as a side effect of the previous update.`\n );\n }\n }\n\n private __markUpdated() {\n this._$changedProperties = new Map();\n this.isUpdatePending = false;\n }\n\n /**\n * Returns a Promise that resolves when the element has completed updating.\n * The Promise value is a boolean that is `true` if the element completed the\n * update without triggering another update. The Promise result is `false` if\n * a property was set inside `updated()`. If the Promise is rejected, an\n * exception was thrown during the update.\n *\n * To await additional asynchronous work, override the `getUpdateComplete`\n * method. For example, it is sometimes useful to await a rendered element\n * before fulfilling this Promise. To do this, first await\n * `super.getUpdateComplete()`, then any subsequent state.\n *\n * @return A promise of a boolean that resolves to true if the update completed\n * without triggering another update.\n * @category updates\n */\n get updateComplete(): Promise {\n return this.getUpdateComplete();\n }\n\n /**\n * Override point for the `updateComplete` promise.\n *\n * It is not safe to override the `updateComplete` getter directly due to a\n * limitation in TypeScript which means it is not possible to call a\n * superclass getter (e.g. `super.updateComplete.then(...)`) when the target\n * language is ES5 (https://github.com/microsoft/TypeScript/issues/338).\n * This method should be overridden instead. For example:\n *\n * ```ts\n * class MyElement extends LitElement {\n * override async getUpdateComplete() {\n * const result = await super.getUpdateComplete();\n * await this._myChild.updateComplete;\n * return result;\n * }\n * }\n * ```\n *\n * @return A promise of a boolean that resolves to true if the update completed\n * without triggering another update.\n * @category updates\n */\n protected getUpdateComplete(): Promise {\n return this.__updatePromise;\n }\n\n /**\n * Controls whether or not `update()` should be called when the element requests\n * an update. By default, this method always returns `true`, but this can be\n * customized to control when to update.\n *\n * @param _changedProperties Map of changed properties with old values\n * @category updates\n */\n protected shouldUpdate(_changedProperties: PropertyValues): boolean {\n return true;\n }\n\n /**\n * Updates the element. This method reflects property values to attributes.\n * It can be overridden to render and keep updated element DOM.\n * Setting properties inside this method will *not* trigger\n * another update.\n *\n * @param _changedProperties Map of changed properties with old values\n * @category updates\n */\n protected update(_changedProperties: PropertyValues) {\n // The forEach() expression will only run when when __reflectingProperties is\n // defined, and it returns undefined, setting __reflectingProperties to\n // undefined\n this.__reflectingProperties &&= this.__reflectingProperties.forEach((p) =>\n this.__propertyToAttribute(p, this[p as keyof this])\n ) as undefined;\n this.__markUpdated();\n }\n\n /**\n * Invoked whenever the element is updated. Implement to perform\n * post-updating tasks via DOM APIs, for example, focusing an element.\n *\n * Setting properties inside this method will trigger the element to update\n * again after this update cycle completes.\n *\n * @param _changedProperties Map of changed properties with old values\n * @category updates\n */\n protected updated(_changedProperties: PropertyValues) {}\n\n /**\n * Invoked when the element is first updated. Implement to perform one time\n * work on the element after update.\n *\n * ```ts\n * firstUpdated() {\n * this.renderRoot.getElementById('my-text-area').focus();\n * }\n * ```\n *\n * Setting properties inside this method will trigger the element to update\n * again after this update cycle completes.\n *\n * @param _changedProperties Map of changed properties with old values\n * @category updates\n */\n protected firstUpdated(_changedProperties: PropertyValues) {}\n}\n// Assigned here to work around a jscompiler bug with static fields\n// when compiling to ES5.\n// https://github.com/google/closure-compiler/issues/3177\n(ReactiveElement as unknown as Record)[\n JSCompiler_renameProperty('elementProperties', ReactiveElement)\n] = new Map();\n(ReactiveElement as unknown as Record)[\n JSCompiler_renameProperty('finalized', ReactiveElement)\n] = new Map();\n\n// Apply polyfills if available\npolyfillSupport?.({ReactiveElement});\n\n// Dev mode warnings...\nif (DEV_MODE) {\n // Default warning set.\n ReactiveElement.enabledWarnings = [\n 'change-in-update',\n 'async-perform-update',\n ];\n const ensureOwnWarnings = function (ctor: typeof ReactiveElement) {\n if (\n !ctor.hasOwnProperty(JSCompiler_renameProperty('enabledWarnings', ctor))\n ) {\n ctor.enabledWarnings = ctor.enabledWarnings!.slice();\n }\n };\n ReactiveElement.enableWarning = function (\n this: typeof ReactiveElement,\n warning: WarningKind\n ) {\n ensureOwnWarnings(this);\n if (!this.enabledWarnings!.includes(warning)) {\n this.enabledWarnings!.push(warning);\n }\n };\n ReactiveElement.disableWarning = function (\n this: typeof ReactiveElement,\n warning: WarningKind\n ) {\n ensureOwnWarnings(this);\n const i = this.enabledWarnings!.indexOf(warning);\n if (i >= 0) {\n this.enabledWarnings!.splice(i, 1);\n }\n };\n}\n\n// IMPORTANT: do not change the property name or the assignment expression.\n// This line will be used in regexes to search for ReactiveElement usage.\n(global.reactiveElementVersions ??= []).push('2.0.4');\nif (DEV_MODE && global.reactiveElementVersions.length > 1) {\n issueWarning!(\n 'multiple-versions',\n `Multiple versions of Lit loaded. Loading multiple versions ` +\n `is not recommended.`\n );\n}\n",null,"/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nconst NODE_MODE = false;\n\n// Allows minifiers to rename references to globalThis\nconst global = globalThis;\n\n/**\n * Whether the current browser supports `adoptedStyleSheets`.\n */\nexport const supportsAdoptingStyleSheets: boolean =\n global.ShadowRoot &&\n (global.ShadyCSS === undefined || global.ShadyCSS.nativeShadow) &&\n 'adoptedStyleSheets' in Document.prototype &&\n 'replace' in CSSStyleSheet.prototype;\n\n/**\n * A CSSResult or native CSSStyleSheet.\n *\n * In browsers that support constructible CSS style sheets, CSSStyleSheet\n * object can be used for styling along side CSSResult from the `css`\n * template tag.\n */\nexport type CSSResultOrNative = CSSResult | CSSStyleSheet;\n\nexport type CSSResultArray = Array;\n\n/**\n * A single CSSResult, CSSStyleSheet, or an array or nested arrays of those.\n */\nexport type CSSResultGroup = CSSResultOrNative | CSSResultArray;\n\nconst constructionToken = Symbol();\n\nconst cssTagCache = new WeakMap();\n\n/**\n * A container for a string of CSS text, that may be used to create a CSSStyleSheet.\n *\n * CSSResult is the return value of `css`-tagged template literals and\n * `unsafeCSS()`. In order to ensure that CSSResults are only created via the\n * `css` tag and `unsafeCSS()`, CSSResult cannot be constructed directly.\n */\nexport class CSSResult {\n // This property needs to remain unminified.\n ['_$cssResult$'] = true;\n readonly cssText: string;\n private _styleSheet?: CSSStyleSheet;\n private _strings: TemplateStringsArray | undefined;\n\n private constructor(\n cssText: string,\n strings: TemplateStringsArray | undefined,\n safeToken: symbol\n ) {\n if (safeToken !== constructionToken) {\n throw new Error(\n 'CSSResult is not constructable. Use `unsafeCSS` or `css` instead.'\n );\n }\n this.cssText = cssText;\n this._strings = strings;\n }\n\n // This is a getter so that it's lazy. In practice, this means stylesheets\n // are not created until the first element instance is made.\n get styleSheet(): CSSStyleSheet | undefined {\n // If `supportsAdoptingStyleSheets` is true then we assume CSSStyleSheet is\n // constructable.\n let styleSheet = this._styleSheet;\n const strings = this._strings;\n if (supportsAdoptingStyleSheets && styleSheet === undefined) {\n const cacheable = strings !== undefined && strings.length === 1;\n if (cacheable) {\n styleSheet = cssTagCache.get(strings);\n }\n if (styleSheet === undefined) {\n (this._styleSheet = styleSheet = new CSSStyleSheet()).replaceSync(\n this.cssText\n );\n if (cacheable) {\n cssTagCache.set(strings, styleSheet);\n }\n }\n }\n return styleSheet;\n }\n\n toString(): string {\n return this.cssText;\n }\n}\n\ntype ConstructableCSSResult = CSSResult & {\n new (\n cssText: string,\n strings: TemplateStringsArray | undefined,\n safeToken: symbol\n ): CSSResult;\n};\n\nconst textFromCSSResult = (value: CSSResultGroup | number) => {\n // This property needs to remain unminified.\n if ((value as CSSResult)['_$cssResult$'] === true) {\n return (value as CSSResult).cssText;\n } else if (typeof value === 'number') {\n return value;\n } else {\n throw new Error(\n `Value passed to 'css' function must be a 'css' function result: ` +\n `${value}. Use 'unsafeCSS' to pass non-literal values, but take care ` +\n `to ensure page security.`\n );\n }\n};\n\n/**\n * Wrap a value for interpolation in a {@linkcode css} tagged template literal.\n *\n * This is unsafe because untrusted CSS text can be used to phone home\n * or exfiltrate data to an attacker controlled site. Take care to only use\n * this with trusted input.\n */\nexport const unsafeCSS = (value: unknown) =>\n new (CSSResult as ConstructableCSSResult)(\n typeof value === 'string' ? value : String(value),\n undefined,\n constructionToken\n );\n\n/**\n * A template literal tag which can be used with LitElement's\n * {@linkcode LitElement.styles} property to set element styles.\n *\n * For security reasons, only literal string values and number may be used in\n * embedded expressions. To incorporate non-literal values {@linkcode unsafeCSS}\n * may be used inside an expression.\n */\nexport const css = (\n strings: TemplateStringsArray,\n ...values: (CSSResultGroup | number)[]\n): CSSResult => {\n const cssText =\n strings.length === 1\n ? strings[0]\n : values.reduce(\n (acc, v, idx) => acc + textFromCSSResult(v) + strings[idx + 1],\n strings[0]\n );\n return new (CSSResult as ConstructableCSSResult)(\n cssText,\n strings,\n constructionToken\n );\n};\n\n/**\n * Applies the given styles to a `shadowRoot`. When Shadow DOM is\n * available but `adoptedStyleSheets` is not, styles are appended to the\n * `shadowRoot` to [mimic spec behavior](https://wicg.github.io/construct-stylesheets/#using-constructed-stylesheets).\n * Note, when shimming is used, any styles that are subsequently placed into\n * the shadowRoot should be placed *before* any shimmed adopted styles. This\n * will match spec behavior that gives adopted sheets precedence over styles in\n * shadowRoot.\n */\nexport const adoptStyles = (\n renderRoot: ShadowRoot,\n styles: Array\n) => {\n if (supportsAdoptingStyleSheets) {\n (renderRoot as ShadowRoot).adoptedStyleSheets = styles.map((s) =>\n s instanceof CSSStyleSheet ? s : s.styleSheet!\n );\n } else {\n for (const s of styles) {\n const style = document.createElement('style');\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const nonce = (global as any)['litNonce'];\n if (nonce !== undefined) {\n style.setAttribute('nonce', nonce);\n }\n style.textContent = (s as CSSResult).cssText;\n renderRoot.appendChild(style);\n }\n }\n};\n\nconst cssResultFromStyleSheet = (sheet: CSSStyleSheet) => {\n let cssText = '';\n for (const rule of sheet.cssRules) {\n cssText += rule.cssText;\n }\n return unsafeCSS(cssText);\n};\n\nexport const getCompatibleStyle =\n supportsAdoptingStyleSheets ||\n (NODE_MODE && global.CSSStyleSheet === undefined)\n ? (s: CSSResultOrNative) => s\n : (s: CSSResultOrNative) =>\n s instanceof CSSStyleSheet ? cssResultFromStyleSheet(s) : s;\n","exports.interopDefault = function (a) {\n return a && a.__esModule ? a : {default: a};\n};\n\nexports.defineInteropFlag = function (a) {\n Object.defineProperty(a, '__esModule', {value: true});\n};\n\nexports.exportAll = function (source, dest) {\n Object.keys(source).forEach(function (key) {\n if (\n key === 'default' ||\n key === '__esModule' ||\n Object.prototype.hasOwnProperty.call(dest, key)\n ) {\n return;\n }\n\n Object.defineProperty(dest, key, {\n enumerable: true,\n get: function () {\n return source[key];\n },\n });\n });\n\n return dest;\n};\n\nexports.export = function (dest, destName, get) {\n Object.defineProperty(dest, destName, {\n enumerable: true,\n get: get,\n });\n};\n",null,"/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n// IMPORTANT: these imports must be type-only\nimport type {Directive, DirectiveResult, PartInfo} from './directive.js';\nimport type {TrustedHTML, TrustedTypesWindow} from 'trusted-types/lib';\n\nconst DEV_MODE = true;\nconst ENABLE_EXTRA_SECURITY_HOOKS = true;\nconst ENABLE_SHADYDOM_NOPATCH = true;\nconst NODE_MODE = false;\n\n// Allows minifiers to rename references to globalThis\nconst global = globalThis;\n\n/**\n * Contains types that are part of the unstable debug API.\n *\n * Everything in this API is not stable and may change or be removed in the future,\n * even on patch releases.\n */\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport namespace LitUnstable {\n /**\n * When Lit is running in dev mode and `window.emitLitDebugLogEvents` is true,\n * we will emit 'lit-debug' events to window, with live details about the update and render\n * lifecycle. These can be useful for writing debug tooling and visualizations.\n *\n * Please be aware that running with window.emitLitDebugLogEvents has performance overhead,\n * making certain operations that are normally very cheap (like a no-op render) much slower,\n * because we must copy data and dispatch events.\n */\n // eslint-disable-next-line @typescript-eslint/no-namespace\n export namespace DebugLog {\n export type Entry =\n | TemplatePrep\n | TemplateInstantiated\n | TemplateInstantiatedAndUpdated\n | TemplateUpdating\n | BeginRender\n | EndRender\n | CommitPartEntry\n | SetPartValue;\n export interface TemplatePrep {\n kind: 'template prep';\n template: Template;\n strings: TemplateStringsArray;\n clonableTemplate: HTMLTemplateElement;\n parts: TemplatePart[];\n }\n export interface BeginRender {\n kind: 'begin render';\n id: number;\n value: unknown;\n container: HTMLElement | DocumentFragment;\n options: RenderOptions | undefined;\n part: ChildPart | undefined;\n }\n export interface EndRender {\n kind: 'end render';\n id: number;\n value: unknown;\n container: HTMLElement | DocumentFragment;\n options: RenderOptions | undefined;\n part: ChildPart;\n }\n export interface TemplateInstantiated {\n kind: 'template instantiated';\n template: Template | CompiledTemplate;\n instance: TemplateInstance;\n options: RenderOptions | undefined;\n fragment: Node;\n parts: Array;\n values: unknown[];\n }\n export interface TemplateInstantiatedAndUpdated {\n kind: 'template instantiated and updated';\n template: Template | CompiledTemplate;\n instance: TemplateInstance;\n options: RenderOptions | undefined;\n fragment: Node;\n parts: Array;\n values: unknown[];\n }\n export interface TemplateUpdating {\n kind: 'template updating';\n template: Template | CompiledTemplate;\n instance: TemplateInstance;\n options: RenderOptions | undefined;\n parts: Array;\n values: unknown[];\n }\n export interface SetPartValue {\n kind: 'set part';\n part: Part;\n value: unknown;\n valueIndex: number;\n values: unknown[];\n templateInstance: TemplateInstance;\n }\n\n export type CommitPartEntry =\n | CommitNothingToChildEntry\n | CommitText\n | CommitNode\n | CommitAttribute\n | CommitProperty\n | CommitBooleanAttribute\n | CommitEventListener\n | CommitToElementBinding;\n\n export interface CommitNothingToChildEntry {\n kind: 'commit nothing to child';\n start: ChildNode;\n end: ChildNode | null;\n parent: Disconnectable | undefined;\n options: RenderOptions | undefined;\n }\n\n export interface CommitText {\n kind: 'commit text';\n node: Text;\n value: unknown;\n options: RenderOptions | undefined;\n }\n\n export interface CommitNode {\n kind: 'commit node';\n start: Node;\n parent: Disconnectable | undefined;\n value: Node;\n options: RenderOptions | undefined;\n }\n\n export interface CommitAttribute {\n kind: 'commit attribute';\n element: Element;\n name: string;\n value: unknown;\n options: RenderOptions | undefined;\n }\n\n export interface CommitProperty {\n kind: 'commit property';\n element: Element;\n name: string;\n value: unknown;\n options: RenderOptions | undefined;\n }\n\n export interface CommitBooleanAttribute {\n kind: 'commit boolean attribute';\n element: Element;\n name: string;\n value: boolean;\n options: RenderOptions | undefined;\n }\n\n export interface CommitEventListener {\n kind: 'commit event listener';\n element: Element;\n name: string;\n value: unknown;\n oldListener: unknown;\n options: RenderOptions | undefined;\n // True if we're removing the old event listener (e.g. because settings changed, or value is nothing)\n removeListener: boolean;\n // True if we're adding a new event listener (e.g. because first render, or settings changed)\n addListener: boolean;\n }\n\n export interface CommitToElementBinding {\n kind: 'commit to element binding';\n element: Element;\n value: unknown;\n options: RenderOptions | undefined;\n }\n }\n}\n\ninterface DebugLoggingWindow {\n // Even in dev mode, we generally don't want to emit these events, as that's\n // another level of cost, so only emit them when DEV_MODE is true _and_ when\n // window.emitLitDebugEvents is true.\n emitLitDebugLogEvents?: boolean;\n}\n\n/**\n * Useful for visualizing and logging insights into what the Lit template system is doing.\n *\n * Compiled out of prod mode builds.\n */\nconst debugLogEvent = DEV_MODE\n ? (event: LitUnstable.DebugLog.Entry) => {\n const shouldEmit = (global as unknown as DebugLoggingWindow)\n .emitLitDebugLogEvents;\n if (!shouldEmit) {\n return;\n }\n global.dispatchEvent(\n new CustomEvent('lit-debug', {\n detail: event,\n }),\n );\n }\n : undefined;\n// Used for connecting beginRender and endRender events when there are nested\n// renders when errors are thrown preventing an endRender event from being\n// called.\nlet debugLogRenderId = 0;\n\nlet issueWarning: (code: string, warning: string) => void;\n\nif (DEV_MODE) {\n global.litIssuedWarnings ??= new Set();\n\n // Issue a warning, if we haven't already.\n issueWarning = (code: string, warning: string) => {\n warning += code\n ? ` See https://lit.dev/msg/${code} for more information.`\n : '';\n if (!global.litIssuedWarnings!.has(warning)) {\n console.warn(warning);\n global.litIssuedWarnings!.add(warning);\n }\n };\n\n issueWarning(\n 'dev-mode',\n `Lit is in dev mode. Not recommended for production!`,\n );\n}\n\nconst wrap =\n ENABLE_SHADYDOM_NOPATCH &&\n global.ShadyDOM?.inUse &&\n global.ShadyDOM?.noPatch === true\n ? (global.ShadyDOM!.wrap as (node: T) => T)\n : (node: T) => node;\n\nconst trustedTypes = (global as unknown as TrustedTypesWindow).trustedTypes;\n\n/**\n * Our TrustedTypePolicy for HTML which is declared using the html template\n * tag function.\n *\n * That HTML is a developer-authored constant, and is parsed with innerHTML\n * before any untrusted expressions have been mixed in. Therefor it is\n * considered safe by construction.\n */\nconst policy = trustedTypes\n ? trustedTypes.createPolicy('lit-html', {\n createHTML: (s) => s,\n })\n : undefined;\n\n/**\n * Used to sanitize any value before it is written into the DOM. This can be\n * used to implement a security policy of allowed and disallowed values in\n * order to prevent XSS attacks.\n *\n * One way of using this callback would be to check attributes and properties\n * against a list of high risk fields, and require that values written to such\n * fields be instances of a class which is safe by construction. Closure's Safe\n * HTML Types is one implementation of this technique (\n * https://github.com/google/safe-html-types/blob/master/doc/safehtml-types.md).\n * The TrustedTypes polyfill in API-only mode could also be used as a basis\n * for this technique (https://github.com/WICG/trusted-types).\n *\n * @param node The HTML node (usually either a #text node or an Element) that\n * is being written to. Note that this is just an exemplar node, the write\n * may take place against another instance of the same class of node.\n * @param name The name of an attribute or property (for example, 'href').\n * @param type Indicates whether the write that's about to be performed will\n * be to a property or a node.\n * @return A function that will sanitize this class of writes.\n */\nexport type SanitizerFactory = (\n node: Node,\n name: string,\n type: 'property' | 'attribute',\n) => ValueSanitizer;\n\n/**\n * A function which can sanitize values that will be written to a specific kind\n * of DOM sink.\n *\n * See SanitizerFactory.\n *\n * @param value The value to sanitize. Will be the actual value passed into\n * the lit-html template literal, so this could be of any type.\n * @return The value to write to the DOM. Usually the same as the input value,\n * unless sanitization is needed.\n */\nexport type ValueSanitizer = (value: unknown) => unknown;\n\nconst identityFunction: ValueSanitizer = (value: unknown) => value;\nconst noopSanitizer: SanitizerFactory = (\n _node: Node,\n _name: string,\n _type: 'property' | 'attribute',\n) => identityFunction;\n\n/** Sets the global sanitizer factory. */\nconst setSanitizer = (newSanitizer: SanitizerFactory) => {\n if (!ENABLE_EXTRA_SECURITY_HOOKS) {\n return;\n }\n if (sanitizerFactoryInternal !== noopSanitizer) {\n throw new Error(\n `Attempted to overwrite existing lit-html security policy.` +\n ` setSanitizeDOMValueFactory should be called at most once.`,\n );\n }\n sanitizerFactoryInternal = newSanitizer;\n};\n\n/**\n * Only used in internal tests, not a part of the public API.\n */\nconst _testOnlyClearSanitizerFactoryDoNotCallOrElse = () => {\n sanitizerFactoryInternal = noopSanitizer;\n};\n\nconst createSanitizer: SanitizerFactory = (node, name, type) => {\n return sanitizerFactoryInternal(node, name, type);\n};\n\n// Added to an attribute name to mark the attribute as bound so we can find\n// it easily.\nconst boundAttributeSuffix = '$lit$';\n\n// This marker is used in many syntactic positions in HTML, so it must be\n// a valid element name and attribute name. We don't support dynamic names (yet)\n// but this at least ensures that the parse tree is closer to the template\n// intention.\nconst marker = `lit$${Math.random().toFixed(9).slice(2)}$`;\n\n// String used to tell if a comment is a marker comment\nconst markerMatch = '?' + marker;\n\n// Text used to insert a comment marker node. We use processing instruction\n// syntax because it's slightly smaller, but parses as a comment node.\nconst nodeMarker = `<${markerMatch}>`;\n\nconst d =\n NODE_MODE && global.document === undefined\n ? ({\n createTreeWalker() {\n return {};\n },\n } as unknown as Document)\n : document;\n\n// Creates a dynamic marker. We never have to search for these in the DOM.\nconst createMarker = () => d.createComment('');\n\n// https://tc39.github.io/ecma262/#sec-typeof-operator\ntype Primitive = null | undefined | boolean | number | string | symbol | bigint;\nconst isPrimitive = (value: unknown): value is Primitive =>\n value === null || (typeof value != 'object' && typeof value != 'function');\nconst isArray = Array.isArray;\nconst isIterable = (value: unknown): value is Iterable =>\n isArray(value) ||\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n typeof (value as any)?.[Symbol.iterator] === 'function';\n\nconst SPACE_CHAR = `[ \\t\\n\\f\\r]`;\nconst ATTR_VALUE_CHAR = `[^ \\t\\n\\f\\r\"'\\`<>=]`;\nconst NAME_CHAR = `[^\\\\s\"'>=/]`;\n\n// These regexes represent the five parsing states that we care about in the\n// Template's HTML scanner. They match the *end* of the state they're named\n// after.\n// Depending on the match, we transition to a new state. If there's no match,\n// we stay in the same state.\n// Note that the regexes are stateful. We utilize lastIndex and sync it\n// across the multiple regexes used. In addition to the five regexes below\n// we also dynamically create a regex to find the matching end tags for raw\n// text elements.\n\n/**\n * End of text is: `<` followed by:\n * (comment start) or (tag) or (dynamic tag binding)\n */\nconst textEndRegex = /<(?:(!--|\\/[^a-zA-Z])|(\\/?[a-zA-Z][^>\\s]*)|(\\/?$))/g;\nconst COMMENT_START = 1;\nconst TAG_NAME = 2;\nconst DYNAMIC_TAG_NAME = 3;\n\nconst commentEndRegex = /-->/g;\n/**\n * Comments not started with `--my-button-color`\n prop = prop.includes('-')\n ? prop\n : prop\n .replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g, '-$&')\n .toLowerCase();\n return style + `${prop}:${value};`;\n }, '');\n }\n\n override update(part: AttributePart, [styleInfo]: DirectiveParameters) {\n const {style} = part.element as HTMLElement;\n\n if (this._previousStyleProperties === undefined) {\n this._previousStyleProperties = new Set(Object.keys(styleInfo));\n return this.render(styleInfo);\n }\n\n // Remove old properties that no longer exist in styleInfo\n for (const name of this._previousStyleProperties) {\n // If the name isn't in styleInfo or it's null/undefined\n if (styleInfo[name] == null) {\n this._previousStyleProperties!.delete(name);\n if (name.includes('-')) {\n style.removeProperty(name);\n } else {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (style as any)[name] = null;\n }\n }\n }\n\n // Add or update properties\n for (const name in styleInfo) {\n const value = styleInfo[name];\n if (value != null) {\n this._previousStyleProperties.add(name);\n const isImportant =\n typeof value === 'string' && value.endsWith(importantFlag);\n if (name.includes('-') || isImportant) {\n style.setProperty(\n name,\n isImportant\n ? (value as string).slice(0, flagTrim)\n : (value as string),\n isImportant ? important : '',\n );\n } else {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (style as any)[name] = value;\n }\n }\n }\n return noChange;\n }\n}\n\n/**\n * A directive that applies CSS properties to an element.\n *\n * `styleMap` can only be used in the `style` attribute and must be the only\n * expression in the attribute. It takes the property names in the\n * {@link StyleInfo styleInfo} object and adds the properties to the inline\n * style of the element.\n *\n * Property names with dashes (`-`) are assumed to be valid CSS\n * property names and set on the element's style object using `setProperty()`.\n * Names without dashes are assumed to be camelCased JavaScript property names\n * and set on the element's style object using property assignment, allowing the\n * style object to translate JavaScript-style names to CSS property names.\n *\n * For example `styleMap({backgroundColor: 'red', 'border-top': '5px', '--size':\n * '0'})` sets the `background-color`, `border-top` and `--size` properties.\n *\n * @param styleInfo\n * @see {@link https://lit.dev/docs/templates/directives/#stylemap styleMap code samples on Lit.dev}\n */\nexport const styleMap = directive(StyleMapDirective);\n\n/**\n * The type of the class that powers this directive. Necessary for naming the\n * directive's return type.\n */\nexport type {StyleMapDirective};\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},e=t=>(...e)=>({_$litDirective$:t,values:e});class i{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this.t=t,this._$AM=e,this.i=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}export{i as Directive,t as PartType,e as directive};\n//# sourceMappingURL=directive.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {Disconnectable, Part} from './lit-html.js';\n\nexport {\n AttributePart,\n BooleanAttributePart,\n ChildPart,\n ElementPart,\n EventPart,\n Part,\n PropertyPart,\n} from './lit-html.js';\n\nexport interface DirectiveClass {\n new (part: PartInfo): Directive;\n}\n\n/**\n * This utility type extracts the signature of a directive class's render()\n * method so we can use it for the type of the generated directive function.\n */\nexport type DirectiveParameters = Parameters;\n\n/**\n * A generated directive function doesn't evaluate the directive, but just\n * returns a DirectiveResult object that captures the arguments.\n */\nexport interface DirectiveResult {\n /**\n * This property needs to remain unminified.\n * @internal\n */\n ['_$litDirective$']: C;\n /** @internal */\n values: DirectiveParameters>;\n}\n\nexport const PartType = {\n ATTRIBUTE: 1,\n CHILD: 2,\n PROPERTY: 3,\n BOOLEAN_ATTRIBUTE: 4,\n EVENT: 5,\n ELEMENT: 6,\n} as const;\n\nexport type PartType = (typeof PartType)[keyof typeof PartType];\n\nexport interface ChildPartInfo {\n readonly type: typeof PartType.CHILD;\n}\n\nexport interface AttributePartInfo {\n readonly type:\n | typeof PartType.ATTRIBUTE\n | typeof PartType.PROPERTY\n | typeof PartType.BOOLEAN_ATTRIBUTE\n | typeof PartType.EVENT;\n readonly strings?: ReadonlyArray;\n readonly name: string;\n readonly tagName: string;\n}\n\nexport interface ElementPartInfo {\n readonly type: typeof PartType.ELEMENT;\n}\n\n/**\n * Information about the part a directive is bound to.\n *\n * This is useful for checking that a directive is attached to a valid part,\n * such as with directive that can only be used on attribute bindings.\n */\nexport type PartInfo = ChildPartInfo | AttributePartInfo | ElementPartInfo;\n\n/**\n * Creates a user-facing directive function from a Directive class. This\n * function has the same parameters as the directive's render() method.\n */\nexport const directive =\n (c: C) =>\n (...values: DirectiveParameters>): DirectiveResult => ({\n // This property needs to remain unminified.\n ['_$litDirective$']: c,\n values,\n });\n\n/**\n * Base class for creating custom directives. Users should extend this class,\n * implement `render` and/or `update`, and then pass their subclass to\n * `directive`.\n */\nexport abstract class Directive implements Disconnectable {\n //@internal\n __part!: Part;\n //@internal\n __attributeIndex: number | undefined;\n //@internal\n __directive?: Directive;\n\n //@internal\n _$parent!: Disconnectable;\n\n // These will only exist on the AsyncDirective subclass\n //@internal\n _$disconnectableChildren?: Set;\n // This property needs to remain unminified.\n //@internal\n ['_$notifyDirectiveConnectionChanged']?(isConnected: boolean): void;\n\n constructor(_partInfo: PartInfo) {}\n\n // See comment in Disconnectable interface for why this is a getter\n get _$isConnected() {\n return this._$parent._$isConnected;\n }\n\n /** @internal */\n _$initialize(\n part: Part,\n parent: Disconnectable,\n attributeIndex: number | undefined,\n ) {\n this.__part = part;\n this._$parent = parent;\n this.__attributeIndex = attributeIndex;\n }\n /** @internal */\n _$resolve(part: Part, props: Array): unknown {\n return this.update(part, props);\n }\n\n abstract render(...props: Array): unknown;\n\n update(_part: Part, props: Array): unknown {\n return this.render(...props);\n }\n}\n","import Cartesian2 from \"./Cartesian2.js\";\nimport Cartesian3 from \"./Cartesian3.js\";\nimport Cartographic from \"./Cartographic.js\";\nimport Check from \"./Check.js\";\nimport defaultValue from \"./defaultValue.js\";\nimport defined from \"./defined.js\";\nimport DeveloperError from \"./DeveloperError.js\";\nimport CesiumMath from \"./Math.js\";\nimport scaleToGeodeticSurface from \"./scaleToGeodeticSurface.js\";\n\nfunction initialize(ellipsoid, x, y, z) {\n x = defaultValue(x, 0.0);\n y = defaultValue(y, 0.0);\n z = defaultValue(z, 0.0);\n\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.number.greaterThanOrEquals(\"x\", x, 0.0);\n Check.typeOf.number.greaterThanOrEquals(\"y\", y, 0.0);\n Check.typeOf.number.greaterThanOrEquals(\"z\", z, 0.0);\n //>>includeEnd('debug');\n\n ellipsoid._radii = new Cartesian3(x, y, z);\n\n ellipsoid._radiiSquared = new Cartesian3(x * x, y * y, z * z);\n\n ellipsoid._radiiToTheFourth = new Cartesian3(\n x * x * x * x,\n y * y * y * y,\n z * z * z * z,\n );\n\n ellipsoid._oneOverRadii = new Cartesian3(\n x === 0.0 ? 0.0 : 1.0 / x,\n y === 0.0 ? 0.0 : 1.0 / y,\n z === 0.0 ? 0.0 : 1.0 / z,\n );\n\n ellipsoid._oneOverRadiiSquared = new Cartesian3(\n x === 0.0 ? 0.0 : 1.0 / (x * x),\n y === 0.0 ? 0.0 : 1.0 / (y * y),\n z === 0.0 ? 0.0 : 1.0 / (z * z),\n );\n\n ellipsoid._minimumRadius = Math.min(x, y, z);\n\n ellipsoid._maximumRadius = Math.max(x, y, z);\n\n ellipsoid._centerToleranceSquared = CesiumMath.EPSILON1;\n\n if (ellipsoid._radiiSquared.z !== 0) {\n ellipsoid._squaredXOverSquaredZ =\n ellipsoid._radiiSquared.x / ellipsoid._radiiSquared.z;\n }\n}\n\n/**\n * A quadratic surface defined in Cartesian coordinates by the equation\n * (x / a)^2 + (y / b)^2 + (z / c)^2 = 1. Primarily used\n * by Cesium to represent the shape of planetary bodies.\n *\n * Rather than constructing this object directly, one of the provided\n * constants is normally used.\n * @alias Ellipsoid\n * @constructor\n *\n * @param {number} [x=0] The radius in the x direction.\n * @param {number} [y=0] The radius in the y direction.\n * @param {number} [z=0] The radius in the z direction.\n *\n * @exception {DeveloperError} All radii components must be greater than or equal to zero.\n *\n * @see Ellipsoid.fromCartesian3\n * @see Ellipsoid.WGS84\n * @see Ellipsoid.UNIT_SPHERE\n */\nfunction Ellipsoid(x, y, z) {\n this._radii = undefined;\n this._radiiSquared = undefined;\n this._radiiToTheFourth = undefined;\n this._oneOverRadii = undefined;\n this._oneOverRadiiSquared = undefined;\n this._minimumRadius = undefined;\n this._maximumRadius = undefined;\n this._centerToleranceSquared = undefined;\n this._squaredXOverSquaredZ = undefined;\n\n initialize(this, x, y, z);\n}\n\nObject.defineProperties(Ellipsoid.prototype, {\n /**\n * Gets the radii of the ellipsoid.\n * @memberof Ellipsoid.prototype\n * @type {Cartesian3}\n * @readonly\n */\n radii: {\n get: function () {\n return this._radii;\n },\n },\n /**\n * Gets the squared radii of the ellipsoid.\n * @memberof Ellipsoid.prototype\n * @type {Cartesian3}\n * @readonly\n */\n radiiSquared: {\n get: function () {\n return this._radiiSquared;\n },\n },\n /**\n * Gets the radii of the ellipsoid raise to the fourth power.\n * @memberof Ellipsoid.prototype\n * @type {Cartesian3}\n * @readonly\n */\n radiiToTheFourth: {\n get: function () {\n return this._radiiToTheFourth;\n },\n },\n /**\n * Gets one over the radii of the ellipsoid.\n * @memberof Ellipsoid.prototype\n * @type {Cartesian3}\n * @readonly\n */\n oneOverRadii: {\n get: function () {\n return this._oneOverRadii;\n },\n },\n /**\n * Gets one over the squared radii of the ellipsoid.\n * @memberof Ellipsoid.prototype\n * @type {Cartesian3}\n * @readonly\n */\n oneOverRadiiSquared: {\n get: function () {\n return this._oneOverRadiiSquared;\n },\n },\n /**\n * Gets the minimum radius of the ellipsoid.\n * @memberof Ellipsoid.prototype\n * @type {number}\n * @readonly\n */\n minimumRadius: {\n get: function () {\n return this._minimumRadius;\n },\n },\n /**\n * Gets the maximum radius of the ellipsoid.\n * @memberof Ellipsoid.prototype\n * @type {number}\n * @readonly\n */\n maximumRadius: {\n get: function () {\n return this._maximumRadius;\n },\n },\n});\n\n/**\n * Duplicates an Ellipsoid instance.\n *\n * @param {Ellipsoid} ellipsoid The ellipsoid to duplicate.\n * @param {Ellipsoid} [result] The object onto which to store the result, or undefined if a new\n * instance should be created.\n * @returns {Ellipsoid} The cloned Ellipsoid. (Returns undefined if ellipsoid is undefined)\n */\nEllipsoid.clone = function (ellipsoid, result) {\n if (!defined(ellipsoid)) {\n return undefined;\n }\n const radii = ellipsoid._radii;\n\n if (!defined(result)) {\n return new Ellipsoid(radii.x, radii.y, radii.z);\n }\n\n Cartesian3.clone(radii, result._radii);\n Cartesian3.clone(ellipsoid._radiiSquared, result._radiiSquared);\n Cartesian3.clone(ellipsoid._radiiToTheFourth, result._radiiToTheFourth);\n Cartesian3.clone(ellipsoid._oneOverRadii, result._oneOverRadii);\n Cartesian3.clone(ellipsoid._oneOverRadiiSquared, result._oneOverRadiiSquared);\n result._minimumRadius = ellipsoid._minimumRadius;\n result._maximumRadius = ellipsoid._maximumRadius;\n result._centerToleranceSquared = ellipsoid._centerToleranceSquared;\n\n return result;\n};\n\n/**\n * Computes an Ellipsoid from a Cartesian specifying the radii in x, y, and z directions.\n *\n * @param {Cartesian3} [cartesian=Cartesian3.ZERO] The ellipsoid's radius in the x, y, and z directions.\n * @param {Ellipsoid} [result] The object onto which to store the result, or undefined if a new\n * instance should be created.\n * @returns {Ellipsoid} A new Ellipsoid instance.\n *\n * @exception {DeveloperError} All radii components must be greater than or equal to zero.\n *\n * @see Ellipsoid.WGS84\n * @see Ellipsoid.UNIT_SPHERE\n */\nEllipsoid.fromCartesian3 = function (cartesian, result) {\n if (!defined(result)) {\n result = new Ellipsoid();\n }\n\n if (!defined(cartesian)) {\n return result;\n }\n\n initialize(result, cartesian.x, cartesian.y, cartesian.z);\n return result;\n};\n\n/**\n * An Ellipsoid instance initialized to the WGS84 standard.\n *\n * @type {Ellipsoid}\n * @constant\n */\nEllipsoid.WGS84 = Object.freeze(\n new Ellipsoid(6378137.0, 6378137.0, 6356752.3142451793),\n);\n\n/**\n * An Ellipsoid instance initialized to radii of (1.0, 1.0, 1.0).\n *\n * @type {Ellipsoid}\n * @constant\n */\nEllipsoid.UNIT_SPHERE = Object.freeze(new Ellipsoid(1.0, 1.0, 1.0));\n\n/**\n * An Ellipsoid instance initialized to a sphere with the lunar radius.\n *\n * @type {Ellipsoid}\n * @constant\n */\nEllipsoid.MOON = Object.freeze(\n new Ellipsoid(\n CesiumMath.LUNAR_RADIUS,\n CesiumMath.LUNAR_RADIUS,\n CesiumMath.LUNAR_RADIUS,\n ),\n);\n\nEllipsoid._default = Ellipsoid.WGS84;\nObject.defineProperties(Ellipsoid, {\n /**\n * The default ellipsoid used when not otherwise specified.\n * @memberof Ellipsoid\n * @type {Ellipsoid}\n * @example\n * Cesium.Ellipsoid.default = Cesium.Ellipsoid.MOON;\n *\n * // Apollo 11 landing site\n * const position = Cesium.Cartesian3.fromRadians(\n * 0.67416,\n * 23.47315,\n * );\n */\n default: {\n get: function () {\n return Ellipsoid._default;\n },\n set: function (value) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"value\", value);\n //>>includeEnd('debug');\n\n Ellipsoid._default = value;\n Cartesian3._ellipsoidRadiiSquared = value.radiiSquared;\n Cartographic._ellipsoidOneOverRadii = value.oneOverRadii;\n Cartographic._ellipsoidOneOverRadiiSquared = value.oneOverRadiiSquared;\n Cartographic._ellipsoidCenterToleranceSquared =\n value._centerToleranceSquared;\n },\n },\n});\n\n/**\n * Duplicates an Ellipsoid instance.\n *\n * @param {Ellipsoid} [result] The object onto which to store the result, or undefined if a new\n * instance should be created.\n * @returns {Ellipsoid} The cloned Ellipsoid.\n */\nEllipsoid.prototype.clone = function (result) {\n return Ellipsoid.clone(this, result);\n};\n\n/**\n * The number of elements used to pack the object into an array.\n * @type {number}\n */\nEllipsoid.packedLength = Cartesian3.packedLength;\n\n/**\n * Stores the provided instance into the provided array.\n *\n * @param {Ellipsoid} value The value to pack.\n * @param {number[]} array The array to pack into.\n * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.\n *\n * @returns {number[]} The array that was packed into\n */\nEllipsoid.pack = function (value, array, startingIndex) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"value\", value);\n Check.defined(\"array\", array);\n //>>includeEnd('debug');\n\n startingIndex = defaultValue(startingIndex, 0);\n\n Cartesian3.pack(value._radii, array, startingIndex);\n\n return array;\n};\n\n/**\n * Retrieves an instance from a packed array.\n *\n * @param {number[]} array The packed array.\n * @param {number} [startingIndex=0] The starting index of the element to be unpacked.\n * @param {Ellipsoid} [result] The object into which to store the result.\n * @returns {Ellipsoid} The modified result parameter or a new Ellipsoid instance if one was not provided.\n */\nEllipsoid.unpack = function (array, startingIndex, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.defined(\"array\", array);\n //>>includeEnd('debug');\n\n startingIndex = defaultValue(startingIndex, 0);\n\n const radii = Cartesian3.unpack(array, startingIndex);\n return Ellipsoid.fromCartesian3(radii, result);\n};\n\n/**\n * Computes the unit vector directed from the center of this ellipsoid toward the provided Cartesian position.\n * @function\n *\n * @param {Cartesian3} cartesian The Cartesian for which to to determine the geocentric normal.\n * @param {Cartesian3} [result] The object onto which to store the result.\n * @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if none was provided.\n */\nEllipsoid.prototype.geocentricSurfaceNormal = Cartesian3.normalize;\n\n/**\n * Computes the normal of the plane tangent to the surface of the ellipsoid at the provided position.\n *\n * @param {Cartographic} cartographic The cartographic position for which to to determine the geodetic normal.\n * @param {Cartesian3} [result] The object onto which to store the result.\n * @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if none was provided.\n */\nEllipsoid.prototype.geodeticSurfaceNormalCartographic = function (\n cartographic,\n result,\n) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"cartographic\", cartographic);\n //>>includeEnd('debug');\n\n const longitude = cartographic.longitude;\n const latitude = cartographic.latitude;\n const cosLatitude = Math.cos(latitude);\n\n const x = cosLatitude * Math.cos(longitude);\n const y = cosLatitude * Math.sin(longitude);\n const z = Math.sin(latitude);\n\n if (!defined(result)) {\n result = new Cartesian3();\n }\n result.x = x;\n result.y = y;\n result.z = z;\n return Cartesian3.normalize(result, result);\n};\n\n/**\n * Computes the normal of the plane tangent to the surface of the ellipsoid at the provided position.\n *\n * @param {Cartesian3} cartesian The Cartesian position for which to to determine the surface normal.\n * @param {Cartesian3} [result] The object onto which to store the result.\n * @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if none was provided, or undefined if a normal cannot be found.\n */\nEllipsoid.prototype.geodeticSurfaceNormal = function (cartesian, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"cartesian\", cartesian);\n if (isNaN(cartesian.x) || isNaN(cartesian.y) || isNaN(cartesian.z)) {\n throw new DeveloperError(\"cartesian has a NaN component\");\n }\n //>>includeEnd('debug');\n if (\n Cartesian3.equalsEpsilon(cartesian, Cartesian3.ZERO, CesiumMath.EPSILON14)\n ) {\n return undefined;\n }\n if (!defined(result)) {\n result = new Cartesian3();\n }\n result = Cartesian3.multiplyComponents(\n cartesian,\n this._oneOverRadiiSquared,\n result,\n );\n return Cartesian3.normalize(result, result);\n};\n\nconst cartographicToCartesianNormal = new Cartesian3();\nconst cartographicToCartesianK = new Cartesian3();\n\n/**\n * Converts the provided cartographic to Cartesian representation.\n *\n * @param {Cartographic} cartographic The cartographic position.\n * @param {Cartesian3} [result] The object onto which to store the result.\n * @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if none was provided.\n *\n * @example\n * //Create a Cartographic and determine it's Cartesian representation on a WGS84 ellipsoid.\n * const position = new Cesium.Cartographic(Cesium.Math.toRadians(21), Cesium.Math.toRadians(78), 5000);\n * const cartesianPosition = Cesium.Ellipsoid.WGS84.cartographicToCartesian(position);\n */\nEllipsoid.prototype.cartographicToCartesian = function (cartographic, result) {\n //`cartographic is required` is thrown from geodeticSurfaceNormalCartographic.\n const n = cartographicToCartesianNormal;\n const k = cartographicToCartesianK;\n this.geodeticSurfaceNormalCartographic(cartographic, n);\n Cartesian3.multiplyComponents(this._radiiSquared, n, k);\n const gamma = Math.sqrt(Cartesian3.dot(n, k));\n Cartesian3.divideByScalar(k, gamma, k);\n Cartesian3.multiplyByScalar(n, cartographic.height, n);\n\n if (!defined(result)) {\n result = new Cartesian3();\n }\n return Cartesian3.add(k, n, result);\n};\n\n/**\n * Converts the provided array of cartographics to an array of Cartesians.\n *\n * @param {Cartographic[]} cartographics An array of cartographic positions.\n * @param {Cartesian3[]} [result] The object onto which to store the result.\n * @returns {Cartesian3[]} The modified result parameter or a new Array instance if none was provided.\n *\n * @example\n * //Convert an array of Cartographics and determine their Cartesian representation on a WGS84 ellipsoid.\n * const positions = [new Cesium.Cartographic(Cesium.Math.toRadians(21), Cesium.Math.toRadians(78), 0),\n * new Cesium.Cartographic(Cesium.Math.toRadians(21.321), Cesium.Math.toRadians(78.123), 100),\n * new Cesium.Cartographic(Cesium.Math.toRadians(21.645), Cesium.Math.toRadians(78.456), 250)];\n * const cartesianPositions = Cesium.Ellipsoid.WGS84.cartographicArrayToCartesianArray(positions);\n */\nEllipsoid.prototype.cartographicArrayToCartesianArray = function (\n cartographics,\n result,\n) {\n //>>includeStart('debug', pragmas.debug);\n Check.defined(\"cartographics\", cartographics);\n //>>includeEnd('debug')\n\n const length = cartographics.length;\n if (!defined(result)) {\n result = new Array(length);\n } else {\n result.length = length;\n }\n for (let i = 0; i < length; i++) {\n result[i] = this.cartographicToCartesian(cartographics[i], result[i]);\n }\n return result;\n};\n\nconst cartesianToCartographicN = new Cartesian3();\nconst cartesianToCartographicP = new Cartesian3();\nconst cartesianToCartographicH = new Cartesian3();\n\n/**\n * Converts the provided cartesian to cartographic representation.\n * The cartesian is undefined at the center of the ellipsoid.\n *\n * @param {Cartesian3} cartesian The Cartesian position to convert to cartographic representation.\n * @param {Cartographic} [result] The object onto which to store the result.\n * @returns {Cartographic} The modified result parameter, new Cartographic instance if none was provided, or undefined if the cartesian is at the center of the ellipsoid.\n *\n * @example\n * //Create a Cartesian and determine it's Cartographic representation on a WGS84 ellipsoid.\n * const position = new Cesium.Cartesian3(17832.12, 83234.52, 952313.73);\n * const cartographicPosition = Cesium.Ellipsoid.WGS84.cartesianToCartographic(position);\n */\nEllipsoid.prototype.cartesianToCartographic = function (cartesian, result) {\n //`cartesian is required.` is thrown from scaleToGeodeticSurface\n const p = this.scaleToGeodeticSurface(cartesian, cartesianToCartographicP);\n\n if (!defined(p)) {\n return undefined;\n }\n\n const n = this.geodeticSurfaceNormal(p, cartesianToCartographicN);\n const h = Cartesian3.subtract(cartesian, p, cartesianToCartographicH);\n\n const longitude = Math.atan2(n.y, n.x);\n const latitude = Math.asin(n.z);\n const height =\n CesiumMath.sign(Cartesian3.dot(h, cartesian)) * Cartesian3.magnitude(h);\n\n if (!defined(result)) {\n return new Cartographic(longitude, latitude, height);\n }\n result.longitude = longitude;\n result.latitude = latitude;\n result.height = height;\n return result;\n};\n\n/**\n * Converts the provided array of cartesians to an array of cartographics.\n *\n * @param {Cartesian3[]} cartesians An array of Cartesian positions.\n * @param {Cartographic[]} [result] The object onto which to store the result.\n * @returns {Cartographic[]} The modified result parameter or a new Array instance if none was provided.\n *\n * @example\n * //Create an array of Cartesians and determine their Cartographic representation on a WGS84 ellipsoid.\n * const positions = [new Cesium.Cartesian3(17832.12, 83234.52, 952313.73),\n * new Cesium.Cartesian3(17832.13, 83234.53, 952313.73),\n * new Cesium.Cartesian3(17832.14, 83234.54, 952313.73)]\n * const cartographicPositions = Cesium.Ellipsoid.WGS84.cartesianArrayToCartographicArray(positions);\n */\nEllipsoid.prototype.cartesianArrayToCartographicArray = function (\n cartesians,\n result,\n) {\n //>>includeStart('debug', pragmas.debug);\n Check.defined(\"cartesians\", cartesians);\n //>>includeEnd('debug');\n\n const length = cartesians.length;\n if (!defined(result)) {\n result = new Array(length);\n } else {\n result.length = length;\n }\n for (let i = 0; i < length; ++i) {\n result[i] = this.cartesianToCartographic(cartesians[i], result[i]);\n }\n return result;\n};\n\n/**\n * Scales the provided Cartesian position along the geodetic surface normal\n * so that it is on the surface of this ellipsoid. If the position is\n * at the center of the ellipsoid, this function returns undefined.\n *\n * @param {Cartesian3} cartesian The Cartesian position to scale.\n * @param {Cartesian3} [result] The object onto which to store the result.\n * @returns {Cartesian3} The modified result parameter, a new Cartesian3 instance if none was provided, or undefined if the position is at the center.\n */\nEllipsoid.prototype.scaleToGeodeticSurface = function (cartesian, result) {\n return scaleToGeodeticSurface(\n cartesian,\n this._oneOverRadii,\n this._oneOverRadiiSquared,\n this._centerToleranceSquared,\n result,\n );\n};\n\n/**\n * Scales the provided Cartesian position along the geocentric surface normal\n * so that it is on the surface of this ellipsoid.\n *\n * @param {Cartesian3} cartesian The Cartesian position to scale.\n * @param {Cartesian3} [result] The object onto which to store the result.\n * @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if none was provided.\n */\nEllipsoid.prototype.scaleToGeocentricSurface = function (cartesian, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"cartesian\", cartesian);\n //>>includeEnd('debug');\n\n if (!defined(result)) {\n result = new Cartesian3();\n }\n\n const positionX = cartesian.x;\n const positionY = cartesian.y;\n const positionZ = cartesian.z;\n const oneOverRadiiSquared = this._oneOverRadiiSquared;\n\n const beta =\n 1.0 /\n Math.sqrt(\n positionX * positionX * oneOverRadiiSquared.x +\n positionY * positionY * oneOverRadiiSquared.y +\n positionZ * positionZ * oneOverRadiiSquared.z,\n );\n\n return Cartesian3.multiplyByScalar(cartesian, beta, result);\n};\n\n/**\n * Transforms a Cartesian X, Y, Z position to the ellipsoid-scaled space by multiplying\n * its components by the result of {@link Ellipsoid#oneOverRadii}.\n *\n * @param {Cartesian3} position The position to transform.\n * @param {Cartesian3} [result] The position to which to copy the result, or undefined to create and\n * return a new instance.\n * @returns {Cartesian3} The position expressed in the scaled space. The returned instance is the\n * one passed as the result parameter if it is not undefined, or a new instance of it is.\n */\nEllipsoid.prototype.transformPositionToScaledSpace = function (\n position,\n result,\n) {\n if (!defined(result)) {\n result = new Cartesian3();\n }\n\n return Cartesian3.multiplyComponents(position, this._oneOverRadii, result);\n};\n\n/**\n * Transforms a Cartesian X, Y, Z position from the ellipsoid-scaled space by multiplying\n * its components by the result of {@link Ellipsoid#radii}.\n *\n * @param {Cartesian3} position The position to transform.\n * @param {Cartesian3} [result] The position to which to copy the result, or undefined to create and\n * return a new instance.\n * @returns {Cartesian3} The position expressed in the unscaled space. The returned instance is the\n * one passed as the result parameter if it is not undefined, or a new instance of it is.\n */\nEllipsoid.prototype.transformPositionFromScaledSpace = function (\n position,\n result,\n) {\n if (!defined(result)) {\n result = new Cartesian3();\n }\n\n return Cartesian3.multiplyComponents(position, this._radii, result);\n};\n\n/**\n * Compares this Ellipsoid against the provided Ellipsoid componentwise and returns\n * true if they are equal, false otherwise.\n *\n * @param {Ellipsoid} [right] The other Ellipsoid.\n * @returns {boolean} true if they are equal, false otherwise.\n */\nEllipsoid.prototype.equals = function (right) {\n return (\n this === right ||\n (defined(right) && Cartesian3.equals(this._radii, right._radii))\n );\n};\n\n/**\n * Creates a string representing this Ellipsoid in the format '(radii.x, radii.y, radii.z)'.\n *\n * @returns {string} A string representing this ellipsoid in the format '(radii.x, radii.y, radii.z)'.\n */\nEllipsoid.prototype.toString = function () {\n return this._radii.toString();\n};\n\n/**\n * Computes a point which is the intersection of the surface normal with the z-axis.\n *\n * @param {Cartesian3} position the position. must be on the surface of the ellipsoid.\n * @param {number} [buffer = 0.0] A buffer to subtract from the ellipsoid size when checking if the point is inside the ellipsoid.\n * In earth case, with common earth datums, there is no need for this buffer since the intersection point is always (relatively) very close to the center.\n * In WGS84 datum, intersection point is at max z = +-42841.31151331382 (0.673% of z-axis).\n * Intersection point could be outside the ellipsoid if the ratio of MajorAxis / AxisOfRotation is bigger than the square root of 2\n * @param {Cartesian3} [result] The cartesian to which to copy the result, or undefined to create and\n * return a new instance.\n * @returns {Cartesian3 | undefined} the intersection point if it's inside the ellipsoid, undefined otherwise\n *\n * @exception {DeveloperError} position is required.\n * @exception {DeveloperError} Ellipsoid must be an ellipsoid of revolution (radii.x == radii.y).\n * @exception {DeveloperError} Ellipsoid.radii.z must be greater than 0.\n */\nEllipsoid.prototype.getSurfaceNormalIntersectionWithZAxis = function (\n position,\n buffer,\n result,\n) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"position\", position);\n\n if (\n !CesiumMath.equalsEpsilon(\n this._radii.x,\n this._radii.y,\n CesiumMath.EPSILON15,\n )\n ) {\n throw new DeveloperError(\n \"Ellipsoid must be an ellipsoid of revolution (radii.x == radii.y)\",\n );\n }\n\n Check.typeOf.number.greaterThan(\"Ellipsoid.radii.z\", this._radii.z, 0);\n //>>includeEnd('debug');\n\n buffer = defaultValue(buffer, 0.0);\n\n const squaredXOverSquaredZ = this._squaredXOverSquaredZ;\n\n if (!defined(result)) {\n result = new Cartesian3();\n }\n\n result.x = 0.0;\n result.y = 0.0;\n result.z = position.z * (1 - squaredXOverSquaredZ);\n\n if (Math.abs(result.z) >= this._radii.z - buffer) {\n return undefined;\n }\n\n return result;\n};\n\nconst scratchEndpoint = new Cartesian3();\n\n/**\n * Computes the ellipsoid curvatures at a given position on the surface.\n *\n * @param {Cartesian3} surfacePosition The position on the ellipsoid surface where curvatures will be calculated.\n * @param {Cartesian2} [result] The cartesian to which to copy the result, or undefined to create and return a new instance.\n * @returns {Cartesian2} The local curvature of the ellipsoid surface at the provided position, in east and north directions.\n *\n * @exception {DeveloperError} position is required.\n */\nEllipsoid.prototype.getLocalCurvature = function (surfacePosition, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"surfacePosition\", surfacePosition);\n //>>includeEnd('debug');\n\n if (!defined(result)) {\n result = new Cartesian2();\n }\n\n const primeVerticalEndpoint = this.getSurfaceNormalIntersectionWithZAxis(\n surfacePosition,\n 0.0,\n scratchEndpoint,\n );\n const primeVerticalRadius = Cartesian3.distance(\n surfacePosition,\n primeVerticalEndpoint,\n );\n // meridional radius = (1 - e^2) * primeVerticalRadius^3 / a^2\n // where 1 - e^2 = b^2 / a^2,\n // so meridional = b^2 * primeVerticalRadius^3 / a^4\n // = (b * primeVerticalRadius / a^2)^2 * primeVertical\n const radiusRatio =\n (this.minimumRadius * primeVerticalRadius) / this.maximumRadius ** 2;\n const meridionalRadius = primeVerticalRadius * radiusRatio ** 2;\n\n return Cartesian2.fromElements(\n 1.0 / primeVerticalRadius,\n 1.0 / meridionalRadius,\n result,\n );\n};\n\nconst abscissas = [\n 0.14887433898163, 0.43339539412925, 0.67940956829902, 0.86506336668898,\n 0.97390652851717, 0.0,\n];\nconst weights = [\n 0.29552422471475, 0.26926671930999, 0.21908636251598, 0.14945134915058,\n 0.066671344308684, 0.0,\n];\n\n/**\n * Compute the 10th order Gauss-Legendre Quadrature of the given definite integral.\n *\n * @param {number} a The lower bound for the integration.\n * @param {number} b The upper bound for the integration.\n * @param {Ellipsoid~RealValuedScalarFunction} func The function to integrate.\n * @returns {number} The value of the integral of the given function over the given domain.\n *\n * @private\n */\nfunction gaussLegendreQuadrature(a, b, func) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.number(\"a\", a);\n Check.typeOf.number(\"b\", b);\n Check.typeOf.func(\"func\", func);\n //>>includeEnd('debug');\n\n // The range is half of the normal range since the five weights add to one (ten weights add to two).\n // The values of the abscissas are multiplied by two to account for this.\n const xMean = 0.5 * (b + a);\n const xRange = 0.5 * (b - a);\n\n let sum = 0.0;\n for (let i = 0; i < 5; i++) {\n const dx = xRange * abscissas[i];\n sum += weights[i] * (func(xMean + dx) + func(xMean - dx));\n }\n\n // Scale the sum to the range of x.\n sum *= xRange;\n return sum;\n}\n\n/**\n * A real valued scalar function.\n * @callback Ellipsoid~RealValuedScalarFunction\n *\n * @param {number} x The value used to evaluate the function.\n * @returns {number} The value of the function at x.\n *\n * @private\n */\n\n/**\n * Computes an approximation of the surface area of a rectangle on the surface of an ellipsoid using\n * Gauss-Legendre 10th order quadrature.\n *\n * @param {Rectangle} rectangle The rectangle used for computing the surface area.\n * @returns {number} The approximate area of the rectangle on the surface of this ellipsoid.\n */\nEllipsoid.prototype.surfaceArea = function (rectangle) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"rectangle\", rectangle);\n //>>includeEnd('debug');\n const minLongitude = rectangle.west;\n let maxLongitude = rectangle.east;\n const minLatitude = rectangle.south;\n const maxLatitude = rectangle.north;\n\n while (maxLongitude < minLongitude) {\n maxLongitude += CesiumMath.TWO_PI;\n }\n\n const radiiSquared = this._radiiSquared;\n const a2 = radiiSquared.x;\n const b2 = radiiSquared.y;\n const c2 = radiiSquared.z;\n const a2b2 = a2 * b2;\n return gaussLegendreQuadrature(minLatitude, maxLatitude, function (lat) {\n // phi represents the angle measured from the north pole\n // sin(phi) = sin(pi / 2 - lat) = cos(lat), cos(phi) is similar\n const sinPhi = Math.cos(lat);\n const cosPhi = Math.sin(lat);\n return (\n Math.cos(lat) *\n gaussLegendreQuadrature(minLongitude, maxLongitude, function (lon) {\n const cosTheta = Math.cos(lon);\n const sinTheta = Math.sin(lon);\n return Math.sqrt(\n a2b2 * cosPhi * cosPhi +\n c2 *\n (b2 * cosTheta * cosTheta + a2 * sinTheta * sinTheta) *\n sinPhi *\n sinPhi,\n );\n })\n );\n });\n};\n\nexport default Ellipsoid;\n","import Cartesian3 from \"./Cartesian3.js\";\nimport Check from \"./Check.js\";\nimport defaultValue from \"./defaultValue.js\";\nimport defined from \"./defined.js\";\nimport CesiumMath from \"./Math.js\";\nimport scaleToGeodeticSurface from \"./scaleToGeodeticSurface.js\";\n\n/**\n * A position defined by longitude, latitude, and height.\n * @alias Cartographic\n * @constructor\n *\n * @param {number} [longitude=0.0] The longitude, in radians.\n * @param {number} [latitude=0.0] The latitude, in radians.\n * @param {number} [height=0.0] The height, in meters, above the ellipsoid.\n *\n * @see Ellipsoid\n */\nfunction Cartographic(longitude, latitude, height) {\n /**\n * The longitude, in radians.\n * @type {number}\n * @default 0.0\n */\n this.longitude = defaultValue(longitude, 0.0);\n\n /**\n * The latitude, in radians.\n * @type {number}\n * @default 0.0\n */\n this.latitude = defaultValue(latitude, 0.0);\n\n /**\n * The height, in meters, above the ellipsoid.\n * @type {number}\n * @default 0.0\n */\n this.height = defaultValue(height, 0.0);\n}\n\n/**\n * Creates a new Cartographic instance from longitude and latitude\n * specified in radians.\n *\n * @param {number} longitude The longitude, in radians.\n * @param {number} latitude The latitude, in radians.\n * @param {number} [height=0.0] The height, in meters, above the ellipsoid.\n * @param {Cartographic} [result] The object onto which to store the result.\n * @returns {Cartographic} The modified result parameter or a new Cartographic instance if one was not provided.\n */\nCartographic.fromRadians = function (longitude, latitude, height, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.number(\"longitude\", longitude);\n Check.typeOf.number(\"latitude\", latitude);\n //>>includeEnd('debug');\n\n height = defaultValue(height, 0.0);\n\n if (!defined(result)) {\n return new Cartographic(longitude, latitude, height);\n }\n\n result.longitude = longitude;\n result.latitude = latitude;\n result.height = height;\n return result;\n};\n\n/**\n * Creates a new Cartographic instance from longitude and latitude\n * specified in degrees. The values in the resulting object will\n * be in radians.\n *\n * @param {number} longitude The longitude, in degrees.\n * @param {number} latitude The latitude, in degrees.\n * @param {number} [height=0.0] The height, in meters, above the ellipsoid.\n * @param {Cartographic} [result] The object onto which to store the result.\n * @returns {Cartographic} The modified result parameter or a new Cartographic instance if one was not provided.\n */\nCartographic.fromDegrees = function (longitude, latitude, height, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.number(\"longitude\", longitude);\n Check.typeOf.number(\"latitude\", latitude);\n //>>includeEnd('debug');\n\n longitude = CesiumMath.toRadians(longitude);\n latitude = CesiumMath.toRadians(latitude);\n\n return Cartographic.fromRadians(longitude, latitude, height, result);\n};\n\nconst cartesianToCartographicN = new Cartesian3();\nconst cartesianToCartographicP = new Cartesian3();\nconst cartesianToCartographicH = new Cartesian3();\n\n// To avoid circular dependencies, these are set by Ellipsoid when Ellipsoid.default is set.\nCartographic._ellipsoidOneOverRadii = new Cartesian3(\n 1.0 / 6378137.0,\n 1.0 / 6378137.0,\n 1.0 / 6356752.3142451793,\n);\nCartographic._ellipsoidOneOverRadiiSquared = new Cartesian3(\n 1.0 / (6378137.0 * 6378137.0),\n 1.0 / (6378137.0 * 6378137.0),\n 1.0 / (6356752.3142451793 * 6356752.3142451793),\n);\nCartographic._ellipsoidCenterToleranceSquared = CesiumMath.EPSILON1;\n\n/**\n * Creates a new Cartographic instance from a Cartesian position. The values in the\n * resulting object will be in radians.\n *\n * @param {Cartesian3} cartesian The Cartesian position to convert to cartographic representation.\n * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid on which the position lies.\n * @param {Cartographic} [result] The object onto which to store the result.\n * @returns {Cartographic} The modified result parameter, new Cartographic instance if none was provided, or undefined if the cartesian is at the center of the ellipsoid.\n */\nCartographic.fromCartesian = function (cartesian, ellipsoid, result) {\n const oneOverRadii = defined(ellipsoid)\n ? ellipsoid.oneOverRadii\n : Cartographic._ellipsoidOneOverRadii;\n const oneOverRadiiSquared = defined(ellipsoid)\n ? ellipsoid.oneOverRadiiSquared\n : Cartographic._ellipsoidOneOverRadiiSquared;\n const centerToleranceSquared = defined(ellipsoid)\n ? ellipsoid._centerToleranceSquared\n : Cartographic._ellipsoidCenterToleranceSquared;\n\n //`cartesian is required.` is thrown from scaleToGeodeticSurface\n const p = scaleToGeodeticSurface(\n cartesian,\n oneOverRadii,\n oneOverRadiiSquared,\n centerToleranceSquared,\n cartesianToCartographicP,\n );\n\n if (!defined(p)) {\n return undefined;\n }\n\n let n = Cartesian3.multiplyComponents(\n p,\n oneOverRadiiSquared,\n cartesianToCartographicN,\n );\n n = Cartesian3.normalize(n, n);\n\n const h = Cartesian3.subtract(cartesian, p, cartesianToCartographicH);\n\n const longitude = Math.atan2(n.y, n.x);\n const latitude = Math.asin(n.z);\n const height =\n CesiumMath.sign(Cartesian3.dot(h, cartesian)) * Cartesian3.magnitude(h);\n\n if (!defined(result)) {\n return new Cartographic(longitude, latitude, height);\n }\n result.longitude = longitude;\n result.latitude = latitude;\n result.height = height;\n return result;\n};\n\n/**\n * Creates a new Cartesian3 instance from a Cartographic input. The values in the inputted\n * object should be in radians.\n *\n * @param {Cartographic} cartographic Input to be converted into a Cartesian3 output.\n * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid on which the position lies.\n * @param {Cartesian3} [result] The object onto which to store the result.\n * @returns {Cartesian3} The position\n */\nCartographic.toCartesian = function (cartographic, ellipsoid, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.defined(\"cartographic\", cartographic);\n //>>includeEnd('debug');\n\n return Cartesian3.fromRadians(\n cartographic.longitude,\n cartographic.latitude,\n cartographic.height,\n ellipsoid,\n result,\n );\n};\n\n/**\n * Duplicates a Cartographic instance.\n *\n * @param {Cartographic} cartographic The cartographic to duplicate.\n * @param {Cartographic} [result] The object onto which to store the result.\n * @returns {Cartographic} The modified result parameter or a new Cartographic instance if one was not provided. (Returns undefined if cartographic is undefined)\n */\nCartographic.clone = function (cartographic, result) {\n if (!defined(cartographic)) {\n return undefined;\n }\n if (!defined(result)) {\n return new Cartographic(\n cartographic.longitude,\n cartographic.latitude,\n cartographic.height,\n );\n }\n result.longitude = cartographic.longitude;\n result.latitude = cartographic.latitude;\n result.height = cartographic.height;\n return result;\n};\n\n/**\n * Compares the provided cartographics componentwise and returns\n * true if they are equal, false otherwise.\n *\n * @param {Cartographic} [left] The first cartographic.\n * @param {Cartographic} [right] The second cartographic.\n * @returns {boolean} true if left and right are equal, false otherwise.\n */\nCartographic.equals = function (left, right) {\n return (\n left === right ||\n (defined(left) &&\n defined(right) &&\n left.longitude === right.longitude &&\n left.latitude === right.latitude &&\n left.height === right.height)\n );\n};\n\n/**\n * Compares the provided cartographics componentwise and returns\n * true if they are within the provided epsilon,\n * false otherwise.\n *\n * @param {Cartographic} [left] The first cartographic.\n * @param {Cartographic} [right] The second cartographic.\n * @param {number} [epsilon=0] The epsilon to use for equality testing.\n * @returns {boolean} true if left and right are within the provided epsilon, false otherwise.\n */\nCartographic.equalsEpsilon = function (left, right, epsilon) {\n epsilon = defaultValue(epsilon, 0);\n\n return (\n left === right ||\n (defined(left) &&\n defined(right) &&\n Math.abs(left.longitude - right.longitude) <= epsilon &&\n Math.abs(left.latitude - right.latitude) <= epsilon &&\n Math.abs(left.height - right.height) <= epsilon)\n );\n};\n\n/**\n * An immutable Cartographic instance initialized to (0.0, 0.0, 0.0).\n *\n * @type {Cartographic}\n * @constant\n */\nCartographic.ZERO = Object.freeze(new Cartographic(0.0, 0.0, 0.0));\n\n/**\n * Duplicates this instance.\n *\n * @param {Cartographic} [result] The object onto which to store the result.\n * @returns {Cartographic} The modified result parameter or a new Cartographic instance if one was not provided.\n */\nCartographic.prototype.clone = function (result) {\n return Cartographic.clone(this, result);\n};\n\n/**\n * Compares the provided against this cartographic componentwise and returns\n * true if they are equal, false otherwise.\n *\n * @param {Cartographic} [right] The second cartographic.\n * @returns {boolean} true if left and right are equal, false otherwise.\n */\nCartographic.prototype.equals = function (right) {\n return Cartographic.equals(this, right);\n};\n\n/**\n * Compares the provided against this cartographic componentwise and returns\n * true if they are within the provided epsilon,\n * false otherwise.\n *\n * @param {Cartographic} [right] The second cartographic.\n * @param {number} [epsilon=0] The epsilon to use for equality testing.\n * @returns {boolean} true if left and right are within the provided epsilon, false otherwise.\n */\nCartographic.prototype.equalsEpsilon = function (right, epsilon) {\n return Cartographic.equalsEpsilon(this, right, epsilon);\n};\n\n/**\n * Creates a string representing this cartographic in the format '(longitude, latitude, height)'.\n *\n * @returns {string} A string representing the provided cartographic in the format '(longitude, latitude, height)'.\n */\nCartographic.prototype.toString = function () {\n return `(${this.longitude}, ${this.latitude}, ${this.height})`;\n};\nexport default Cartographic;\n","import Cartesian3 from \"./Cartesian3.js\";\nimport defined from \"./defined.js\";\nimport DeveloperError from \"./DeveloperError.js\";\nimport CesiumMath from \"./Math.js\";\n\nconst scaleToGeodeticSurfaceIntersection = new Cartesian3();\nconst scaleToGeodeticSurfaceGradient = new Cartesian3();\n\n/**\n * Scales the provided Cartesian position along the geodetic surface normal\n * so that it is on the surface of this ellipsoid. If the position is\n * at the center of the ellipsoid, this function returns undefined.\n *\n * @param {Cartesian3} cartesian The Cartesian position to scale.\n * @param {Cartesian3} oneOverRadii One over radii of the ellipsoid.\n * @param {Cartesian3} oneOverRadiiSquared One over radii squared of the ellipsoid.\n * @param {number} centerToleranceSquared Tolerance for closeness to the center.\n * @param {Cartesian3} [result] The object onto which to store the result.\n * @returns {Cartesian3} The modified result parameter, a new Cartesian3 instance if none was provided, or undefined if the position is at the center.\n *\n * @function scaleToGeodeticSurface\n *\n * @private\n */\nfunction scaleToGeodeticSurface(\n cartesian,\n oneOverRadii,\n oneOverRadiiSquared,\n centerToleranceSquared,\n result,\n) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(cartesian)) {\n throw new DeveloperError(\"cartesian is required.\");\n }\n if (!defined(oneOverRadii)) {\n throw new DeveloperError(\"oneOverRadii is required.\");\n }\n if (!defined(oneOverRadiiSquared)) {\n throw new DeveloperError(\"oneOverRadiiSquared is required.\");\n }\n if (!defined(centerToleranceSquared)) {\n throw new DeveloperError(\"centerToleranceSquared is required.\");\n }\n //>>includeEnd('debug');\n\n const positionX = cartesian.x;\n const positionY = cartesian.y;\n const positionZ = cartesian.z;\n\n const oneOverRadiiX = oneOverRadii.x;\n const oneOverRadiiY = oneOverRadii.y;\n const oneOverRadiiZ = oneOverRadii.z;\n\n const x2 = positionX * positionX * oneOverRadiiX * oneOverRadiiX;\n const y2 = positionY * positionY * oneOverRadiiY * oneOverRadiiY;\n const z2 = positionZ * positionZ * oneOverRadiiZ * oneOverRadiiZ;\n\n // Compute the squared ellipsoid norm.\n const squaredNorm = x2 + y2 + z2;\n const ratio = Math.sqrt(1.0 / squaredNorm);\n\n // As an initial approximation, assume that the radial intersection is the projection point.\n const intersection = Cartesian3.multiplyByScalar(\n cartesian,\n ratio,\n scaleToGeodeticSurfaceIntersection,\n );\n\n // If the position is near the center, the iteration will not converge.\n if (squaredNorm < centerToleranceSquared) {\n return !isFinite(ratio)\n ? undefined\n : Cartesian3.clone(intersection, result);\n }\n\n const oneOverRadiiSquaredX = oneOverRadiiSquared.x;\n const oneOverRadiiSquaredY = oneOverRadiiSquared.y;\n const oneOverRadiiSquaredZ = oneOverRadiiSquared.z;\n\n // Use the gradient at the intersection point in place of the true unit normal.\n // The difference in magnitude will be absorbed in the multiplier.\n const gradient = scaleToGeodeticSurfaceGradient;\n gradient.x = intersection.x * oneOverRadiiSquaredX * 2.0;\n gradient.y = intersection.y * oneOverRadiiSquaredY * 2.0;\n gradient.z = intersection.z * oneOverRadiiSquaredZ * 2.0;\n\n // Compute the initial guess at the normal vector multiplier, lambda.\n let lambda =\n ((1.0 - ratio) * Cartesian3.magnitude(cartesian)) /\n (0.5 * Cartesian3.magnitude(gradient));\n let correction = 0.0;\n\n let func;\n let denominator;\n let xMultiplier;\n let yMultiplier;\n let zMultiplier;\n let xMultiplier2;\n let yMultiplier2;\n let zMultiplier2;\n let xMultiplier3;\n let yMultiplier3;\n let zMultiplier3;\n\n do {\n lambda -= correction;\n\n xMultiplier = 1.0 / (1.0 + lambda * oneOverRadiiSquaredX);\n yMultiplier = 1.0 / (1.0 + lambda * oneOverRadiiSquaredY);\n zMultiplier = 1.0 / (1.0 + lambda * oneOverRadiiSquaredZ);\n\n xMultiplier2 = xMultiplier * xMultiplier;\n yMultiplier2 = yMultiplier * yMultiplier;\n zMultiplier2 = zMultiplier * zMultiplier;\n\n xMultiplier3 = xMultiplier2 * xMultiplier;\n yMultiplier3 = yMultiplier2 * yMultiplier;\n zMultiplier3 = zMultiplier2 * zMultiplier;\n\n func = x2 * xMultiplier2 + y2 * yMultiplier2 + z2 * zMultiplier2 - 1.0;\n\n // \"denominator\" here refers to the use of this expression in the velocity and acceleration\n // computations in the sections to follow.\n denominator =\n x2 * xMultiplier3 * oneOverRadiiSquaredX +\n y2 * yMultiplier3 * oneOverRadiiSquaredY +\n z2 * zMultiplier3 * oneOverRadiiSquaredZ;\n\n const derivative = -2.0 * denominator;\n\n correction = func / derivative;\n } while (Math.abs(func) > CesiumMath.EPSILON12);\n\n if (!defined(result)) {\n return new Cartesian3(\n positionX * xMultiplier,\n positionY * yMultiplier,\n positionZ * zMultiplier,\n );\n }\n result.x = positionX * xMultiplier;\n result.y = positionY * yMultiplier;\n result.z = positionZ * zMultiplier;\n return result;\n}\nexport default scaleToGeodeticSurface;\n","import Cartesian3 from \"./Cartesian3.js\";\nimport Cartesian4 from \"./Cartesian4.js\";\nimport Check from \"./Check.js\";\nimport defaultValue from \"./defaultValue.js\";\nimport defined from \"./defined.js\";\nimport DeveloperError from \"./DeveloperError.js\";\nimport CesiumMath from \"./Math.js\";\nimport Matrix3 from \"./Matrix3.js\";\nimport RuntimeError from \"./RuntimeError.js\";\n\n/**\n * A 4x4 matrix, indexable as a column-major order array.\n * Constructor parameters are in row-major order for code readability.\n * @alias Matrix4\n * @constructor\n * @implements {ArrayLike}\n *\n * @param {number} [column0Row0=0.0] The value for column 0, row 0.\n * @param {number} [column1Row0=0.0] The value for column 1, row 0.\n * @param {number} [column2Row0=0.0] The value for column 2, row 0.\n * @param {number} [column3Row0=0.0] The value for column 3, row 0.\n * @param {number} [column0Row1=0.0] The value for column 0, row 1.\n * @param {number} [column1Row1=0.0] The value for column 1, row 1.\n * @param {number} [column2Row1=0.0] The value for column 2, row 1.\n * @param {number} [column3Row1=0.0] The value for column 3, row 1.\n * @param {number} [column0Row2=0.0] The value for column 0, row 2.\n * @param {number} [column1Row2=0.0] The value for column 1, row 2.\n * @param {number} [column2Row2=0.0] The value for column 2, row 2.\n * @param {number} [column3Row2=0.0] The value for column 3, row 2.\n * @param {number} [column0Row3=0.0] The value for column 0, row 3.\n * @param {number} [column1Row3=0.0] The value for column 1, row 3.\n * @param {number} [column2Row3=0.0] The value for column 2, row 3.\n * @param {number} [column3Row3=0.0] The value for column 3, row 3.\n *\n * @see Matrix4.fromArray\n * @see Matrix4.fromColumnMajorArray\n * @see Matrix4.fromRowMajorArray\n * @see Matrix4.fromRotationTranslation\n * @see Matrix4.fromTranslationQuaternionRotationScale\n * @see Matrix4.fromTranslationRotationScale\n * @see Matrix4.fromTranslation\n * @see Matrix4.fromScale\n * @see Matrix4.fromUniformScale\n * @see Matrix4.fromRotation\n * @see Matrix4.fromCamera\n * @see Matrix4.computePerspectiveFieldOfView\n * @see Matrix4.computeOrthographicOffCenter\n * @see Matrix4.computePerspectiveOffCenter\n * @see Matrix4.computeInfinitePerspectiveOffCenter\n * @see Matrix4.computeViewportTransformation\n * @see Matrix4.computeView\n * @see Matrix2\n * @see Matrix3\n * @see Packable\n */\nfunction Matrix4(\n column0Row0,\n column1Row0,\n column2Row0,\n column3Row0,\n column0Row1,\n column1Row1,\n column2Row1,\n column3Row1,\n column0Row2,\n column1Row2,\n column2Row2,\n column3Row2,\n column0Row3,\n column1Row3,\n column2Row3,\n column3Row3,\n) {\n this[0] = defaultValue(column0Row0, 0.0);\n this[1] = defaultValue(column0Row1, 0.0);\n this[2] = defaultValue(column0Row2, 0.0);\n this[3] = defaultValue(column0Row3, 0.0);\n this[4] = defaultValue(column1Row0, 0.0);\n this[5] = defaultValue(column1Row1, 0.0);\n this[6] = defaultValue(column1Row2, 0.0);\n this[7] = defaultValue(column1Row3, 0.0);\n this[8] = defaultValue(column2Row0, 0.0);\n this[9] = defaultValue(column2Row1, 0.0);\n this[10] = defaultValue(column2Row2, 0.0);\n this[11] = defaultValue(column2Row3, 0.0);\n this[12] = defaultValue(column3Row0, 0.0);\n this[13] = defaultValue(column3Row1, 0.0);\n this[14] = defaultValue(column3Row2, 0.0);\n this[15] = defaultValue(column3Row3, 0.0);\n}\n\n/**\n * The number of elements used to pack the object into an array.\n * @type {number}\n */\nMatrix4.packedLength = 16;\n\n/**\n * Stores the provided instance into the provided array.\n *\n * @param {Matrix4} value The value to pack.\n * @param {number[]} array The array to pack into.\n * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.\n *\n * @returns {number[]} The array that was packed into\n */\nMatrix4.pack = function (value, array, startingIndex) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"value\", value);\n Check.defined(\"array\", array);\n //>>includeEnd('debug');\n\n startingIndex = defaultValue(startingIndex, 0);\n\n array[startingIndex++] = value[0];\n array[startingIndex++] = value[1];\n array[startingIndex++] = value[2];\n array[startingIndex++] = value[3];\n array[startingIndex++] = value[4];\n array[startingIndex++] = value[5];\n array[startingIndex++] = value[6];\n array[startingIndex++] = value[7];\n array[startingIndex++] = value[8];\n array[startingIndex++] = value[9];\n array[startingIndex++] = value[10];\n array[startingIndex++] = value[11];\n array[startingIndex++] = value[12];\n array[startingIndex++] = value[13];\n array[startingIndex++] = value[14];\n array[startingIndex] = value[15];\n\n return array;\n};\n\n/**\n * Retrieves an instance from a packed array.\n *\n * @param {number[]} array The packed array.\n * @param {number} [startingIndex=0] The starting index of the element to be unpacked.\n * @param {Matrix4} [result] The object into which to store the result.\n * @returns {Matrix4} The modified result parameter or a new Matrix4 instance if one was not provided.\n */\nMatrix4.unpack = function (array, startingIndex, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.defined(\"array\", array);\n //>>includeEnd('debug');\n\n startingIndex = defaultValue(startingIndex, 0);\n\n if (!defined(result)) {\n result = new Matrix4();\n }\n\n result[0] = array[startingIndex++];\n result[1] = array[startingIndex++];\n result[2] = array[startingIndex++];\n result[3] = array[startingIndex++];\n result[4] = array[startingIndex++];\n result[5] = array[startingIndex++];\n result[6] = array[startingIndex++];\n result[7] = array[startingIndex++];\n result[8] = array[startingIndex++];\n result[9] = array[startingIndex++];\n result[10] = array[startingIndex++];\n result[11] = array[startingIndex++];\n result[12] = array[startingIndex++];\n result[13] = array[startingIndex++];\n result[14] = array[startingIndex++];\n result[15] = array[startingIndex];\n return result;\n};\n\n/**\n * Flattens an array of Matrix4s into an array of components. The components\n * are stored in column-major order.\n *\n * @param {Matrix4[]} array The array of matrices to pack.\n * @param {number[]} [result] The array onto which to store the result. If this is a typed array, it must have array.length * 16 components, else a {@link DeveloperError} will be thrown. If it is a regular array, it will be resized to have (array.length * 16) elements.\n * @returns {number[]} The packed array.\n */\nMatrix4.packArray = function (array, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.defined(\"array\", array);\n //>>includeEnd('debug');\n\n const length = array.length;\n const resultLength = length * 16;\n if (!defined(result)) {\n result = new Array(resultLength);\n } else if (!Array.isArray(result) && result.length !== resultLength) {\n //>>includeStart('debug', pragmas.debug);\n throw new DeveloperError(\n \"If result is a typed array, it must have exactly array.length * 16 elements\",\n );\n //>>includeEnd('debug');\n } else if (result.length !== resultLength) {\n result.length = resultLength;\n }\n\n for (let i = 0; i < length; ++i) {\n Matrix4.pack(array[i], result, i * 16);\n }\n return result;\n};\n\n/**\n * Unpacks an array of column-major matrix components into an array of Matrix4s.\n *\n * @param {number[]} array The array of components to unpack.\n * @param {Matrix4[]} [result] The array onto which to store the result.\n * @returns {Matrix4[]} The unpacked array.\n */\nMatrix4.unpackArray = function (array, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.defined(\"array\", array);\n Check.typeOf.number.greaterThanOrEquals(\"array.length\", array.length, 16);\n if (array.length % 16 !== 0) {\n throw new DeveloperError(\"array length must be a multiple of 16.\");\n }\n //>>includeEnd('debug');\n\n const length = array.length;\n if (!defined(result)) {\n result = new Array(length / 16);\n } else {\n result.length = length / 16;\n }\n\n for (let i = 0; i < length; i += 16) {\n const index = i / 16;\n result[index] = Matrix4.unpack(array, i, result[index]);\n }\n return result;\n};\n\n/**\n * Duplicates a Matrix4 instance.\n *\n * @param {Matrix4} matrix The matrix to duplicate.\n * @param {Matrix4} [result] The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter or a new Matrix4 instance if one was not provided. (Returns undefined if matrix is undefined)\n */\nMatrix4.clone = function (matrix, result) {\n if (!defined(matrix)) {\n return undefined;\n }\n if (!defined(result)) {\n return new Matrix4(\n matrix[0],\n matrix[4],\n matrix[8],\n matrix[12],\n matrix[1],\n matrix[5],\n matrix[9],\n matrix[13],\n matrix[2],\n matrix[6],\n matrix[10],\n matrix[14],\n matrix[3],\n matrix[7],\n matrix[11],\n matrix[15],\n );\n }\n result[0] = matrix[0];\n result[1] = matrix[1];\n result[2] = matrix[2];\n result[3] = matrix[3];\n result[4] = matrix[4];\n result[5] = matrix[5];\n result[6] = matrix[6];\n result[7] = matrix[7];\n result[8] = matrix[8];\n result[9] = matrix[9];\n result[10] = matrix[10];\n result[11] = matrix[11];\n result[12] = matrix[12];\n result[13] = matrix[13];\n result[14] = matrix[14];\n result[15] = matrix[15];\n return result;\n};\n\n/**\n * Creates a Matrix4 from 16 consecutive elements in an array.\n * @function\n *\n * @param {number[]} array The array whose 16 consecutive elements correspond to the positions of the matrix. Assumes column-major order.\n * @param {number} [startingIndex=0] The offset into the array of the first element, which corresponds to first column first row position in the matrix.\n * @param {Matrix4} [result] The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter or a new Matrix4 instance if one was not provided.\n *\n * @example\n * // Create the Matrix4:\n * // [1.0, 2.0, 3.0, 4.0]\n * // [1.0, 2.0, 3.0, 4.0]\n * // [1.0, 2.0, 3.0, 4.0]\n * // [1.0, 2.0, 3.0, 4.0]\n *\n * const v = [1.0, 1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 2.0, 3.0, 3.0, 3.0, 3.0, 4.0, 4.0, 4.0, 4.0];\n * const m = Cesium.Matrix4.fromArray(v);\n *\n * // Create same Matrix4 with using an offset into an array\n * const v2 = [0.0, 0.0, 1.0, 1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 2.0, 3.0, 3.0, 3.0, 3.0, 4.0, 4.0, 4.0, 4.0];\n * const m2 = Cesium.Matrix4.fromArray(v2, 2);\n */\nMatrix4.fromArray = Matrix4.unpack;\n\n/**\n * Computes a Matrix4 instance from a column-major order array.\n *\n * @param {number[]} values The column-major order array.\n * @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.\n */\nMatrix4.fromColumnMajorArray = function (values, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.defined(\"values\", values);\n //>>includeEnd('debug');\n\n return Matrix4.clone(values, result);\n};\n\n/**\n * Computes a Matrix4 instance from a row-major order array.\n * The resulting matrix will be in column-major order.\n *\n * @param {number[]} values The row-major order array.\n * @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.\n */\nMatrix4.fromRowMajorArray = function (values, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.defined(\"values\", values);\n //>>includeEnd('debug');\n\n if (!defined(result)) {\n return new Matrix4(\n values[0],\n values[1],\n values[2],\n values[3],\n values[4],\n values[5],\n values[6],\n values[7],\n values[8],\n values[9],\n values[10],\n values[11],\n values[12],\n values[13],\n values[14],\n values[15],\n );\n }\n result[0] = values[0];\n result[1] = values[4];\n result[2] = values[8];\n result[3] = values[12];\n result[4] = values[1];\n result[5] = values[5];\n result[6] = values[9];\n result[7] = values[13];\n result[8] = values[2];\n result[9] = values[6];\n result[10] = values[10];\n result[11] = values[14];\n result[12] = values[3];\n result[13] = values[7];\n result[14] = values[11];\n result[15] = values[15];\n return result;\n};\n\n/**\n * Computes a Matrix4 instance from a Matrix3 representing the rotation\n * and a Cartesian3 representing the translation.\n *\n * @param {Matrix3} rotation The upper left portion of the matrix representing the rotation.\n * @param {Cartesian3} [translation=Cartesian3.ZERO] The upper right portion of the matrix representing the translation.\n * @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.\n */\nMatrix4.fromRotationTranslation = function (rotation, translation, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"rotation\", rotation);\n //>>includeEnd('debug');\n\n translation = defaultValue(translation, Cartesian3.ZERO);\n\n if (!defined(result)) {\n return new Matrix4(\n rotation[0],\n rotation[3],\n rotation[6],\n translation.x,\n rotation[1],\n rotation[4],\n rotation[7],\n translation.y,\n rotation[2],\n rotation[5],\n rotation[8],\n translation.z,\n 0.0,\n 0.0,\n 0.0,\n 1.0,\n );\n }\n\n result[0] = rotation[0];\n result[1] = rotation[1];\n result[2] = rotation[2];\n result[3] = 0.0;\n result[4] = rotation[3];\n result[5] = rotation[4];\n result[6] = rotation[5];\n result[7] = 0.0;\n result[8] = rotation[6];\n result[9] = rotation[7];\n result[10] = rotation[8];\n result[11] = 0.0;\n result[12] = translation.x;\n result[13] = translation.y;\n result[14] = translation.z;\n result[15] = 1.0;\n return result;\n};\n\n/**\n * Computes a Matrix4 instance from a translation, rotation, and scale (TRS)\n * representation with the rotation represented as a quaternion.\n *\n * @param {Cartesian3} translation The translation transformation.\n * @param {Quaternion} rotation The rotation transformation.\n * @param {Cartesian3} scale The non-uniform scale transformation.\n * @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.\n *\n * @example\n * const result = Cesium.Matrix4.fromTranslationQuaternionRotationScale(\n * new Cesium.Cartesian3(1.0, 2.0, 3.0), // translation\n * Cesium.Quaternion.IDENTITY, // rotation\n * new Cesium.Cartesian3(7.0, 8.0, 9.0), // scale\n * result);\n */\nMatrix4.fromTranslationQuaternionRotationScale = function (\n translation,\n rotation,\n scale,\n result,\n) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"translation\", translation);\n Check.typeOf.object(\"rotation\", rotation);\n Check.typeOf.object(\"scale\", scale);\n //>>includeEnd('debug');\n\n if (!defined(result)) {\n result = new Matrix4();\n }\n\n const scaleX = scale.x;\n const scaleY = scale.y;\n const scaleZ = scale.z;\n\n const x2 = rotation.x * rotation.x;\n const xy = rotation.x * rotation.y;\n const xz = rotation.x * rotation.z;\n const xw = rotation.x * rotation.w;\n const y2 = rotation.y * rotation.y;\n const yz = rotation.y * rotation.z;\n const yw = rotation.y * rotation.w;\n const z2 = rotation.z * rotation.z;\n const zw = rotation.z * rotation.w;\n const w2 = rotation.w * rotation.w;\n\n const m00 = x2 - y2 - z2 + w2;\n const m01 = 2.0 * (xy - zw);\n const m02 = 2.0 * (xz + yw);\n\n const m10 = 2.0 * (xy + zw);\n const m11 = -x2 + y2 - z2 + w2;\n const m12 = 2.0 * (yz - xw);\n\n const m20 = 2.0 * (xz - yw);\n const m21 = 2.0 * (yz + xw);\n const m22 = -x2 - y2 + z2 + w2;\n\n result[0] = m00 * scaleX;\n result[1] = m10 * scaleX;\n result[2] = m20 * scaleX;\n result[3] = 0.0;\n result[4] = m01 * scaleY;\n result[5] = m11 * scaleY;\n result[6] = m21 * scaleY;\n result[7] = 0.0;\n result[8] = m02 * scaleZ;\n result[9] = m12 * scaleZ;\n result[10] = m22 * scaleZ;\n result[11] = 0.0;\n result[12] = translation.x;\n result[13] = translation.y;\n result[14] = translation.z;\n result[15] = 1.0;\n\n return result;\n};\n\n/**\n * Creates a Matrix4 instance from a {@link TranslationRotationScale} instance.\n *\n * @param {TranslationRotationScale} translationRotationScale The instance.\n * @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.\n */\nMatrix4.fromTranslationRotationScale = function (\n translationRotationScale,\n result,\n) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"translationRotationScale\", translationRotationScale);\n //>>includeEnd('debug');\n\n return Matrix4.fromTranslationQuaternionRotationScale(\n translationRotationScale.translation,\n translationRotationScale.rotation,\n translationRotationScale.scale,\n result,\n );\n};\n\n/**\n * Creates a Matrix4 instance from a Cartesian3 representing the translation.\n *\n * @param {Cartesian3} translation The upper right portion of the matrix representing the translation.\n * @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.\n *\n * @see Matrix4.multiplyByTranslation\n */\nMatrix4.fromTranslation = function (translation, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"translation\", translation);\n //>>includeEnd('debug');\n\n return Matrix4.fromRotationTranslation(Matrix3.IDENTITY, translation, result);\n};\n\n/**\n * Computes a Matrix4 instance representing a non-uniform scale.\n *\n * @param {Cartesian3} scale The x, y, and z scale factors.\n * @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.\n *\n * @example\n * // Creates\n * // [7.0, 0.0, 0.0, 0.0]\n * // [0.0, 8.0, 0.0, 0.0]\n * // [0.0, 0.0, 9.0, 0.0]\n * // [0.0, 0.0, 0.0, 1.0]\n * const m = Cesium.Matrix4.fromScale(new Cesium.Cartesian3(7.0, 8.0, 9.0));\n */\nMatrix4.fromScale = function (scale, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"scale\", scale);\n //>>includeEnd('debug');\n\n if (!defined(result)) {\n return new Matrix4(\n scale.x,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n scale.y,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n scale.z,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 1.0,\n );\n }\n\n result[0] = scale.x;\n result[1] = 0.0;\n result[2] = 0.0;\n result[3] = 0.0;\n result[4] = 0.0;\n result[5] = scale.y;\n result[6] = 0.0;\n result[7] = 0.0;\n result[8] = 0.0;\n result[9] = 0.0;\n result[10] = scale.z;\n result[11] = 0.0;\n result[12] = 0.0;\n result[13] = 0.0;\n result[14] = 0.0;\n result[15] = 1.0;\n return result;\n};\n\n/**\n * Computes a Matrix4 instance representing a uniform scale.\n *\n * @param {number} scale The uniform scale factor.\n * @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.\n *\n * @example\n * // Creates\n * // [2.0, 0.0, 0.0, 0.0]\n * // [0.0, 2.0, 0.0, 0.0]\n * // [0.0, 0.0, 2.0, 0.0]\n * // [0.0, 0.0, 0.0, 1.0]\n * const m = Cesium.Matrix4.fromUniformScale(2.0);\n */\nMatrix4.fromUniformScale = function (scale, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.number(\"scale\", scale);\n //>>includeEnd('debug');\n\n if (!defined(result)) {\n return new Matrix4(\n scale,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n scale,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n scale,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 1.0,\n );\n }\n\n result[0] = scale;\n result[1] = 0.0;\n result[2] = 0.0;\n result[3] = 0.0;\n result[4] = 0.0;\n result[5] = scale;\n result[6] = 0.0;\n result[7] = 0.0;\n result[8] = 0.0;\n result[9] = 0.0;\n result[10] = scale;\n result[11] = 0.0;\n result[12] = 0.0;\n result[13] = 0.0;\n result[14] = 0.0;\n result[15] = 1.0;\n return result;\n};\n\n/**\n * Creates a rotation matrix.\n *\n * @param {Matrix3} rotation The rotation matrix.\n * @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.\n */\nMatrix4.fromRotation = function (rotation, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"rotation\", rotation);\n //>>includeEnd('debug');\n\n if (!defined(result)) {\n result = new Matrix4();\n }\n result[0] = rotation[0];\n result[1] = rotation[1];\n result[2] = rotation[2];\n result[3] = 0.0;\n\n result[4] = rotation[3];\n result[5] = rotation[4];\n result[6] = rotation[5];\n result[7] = 0.0;\n\n result[8] = rotation[6];\n result[9] = rotation[7];\n result[10] = rotation[8];\n result[11] = 0.0;\n\n result[12] = 0.0;\n result[13] = 0.0;\n result[14] = 0.0;\n result[15] = 1.0;\n\n return result;\n};\n\nconst fromCameraF = new Cartesian3();\nconst fromCameraR = new Cartesian3();\nconst fromCameraU = new Cartesian3();\n\n/**\n * Computes a Matrix4 instance from a Camera.\n *\n * @param {Camera} camera The camera to use.\n * @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.\n */\nMatrix4.fromCamera = function (camera, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"camera\", camera);\n //>>includeEnd('debug');\n\n const position = camera.position;\n const direction = camera.direction;\n const up = camera.up;\n\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"camera.position\", position);\n Check.typeOf.object(\"camera.direction\", direction);\n Check.typeOf.object(\"camera.up\", up);\n //>>includeEnd('debug');\n\n Cartesian3.normalize(direction, fromCameraF);\n Cartesian3.normalize(\n Cartesian3.cross(fromCameraF, up, fromCameraR),\n fromCameraR,\n );\n Cartesian3.normalize(\n Cartesian3.cross(fromCameraR, fromCameraF, fromCameraU),\n fromCameraU,\n );\n\n const sX = fromCameraR.x;\n const sY = fromCameraR.y;\n const sZ = fromCameraR.z;\n const fX = fromCameraF.x;\n const fY = fromCameraF.y;\n const fZ = fromCameraF.z;\n const uX = fromCameraU.x;\n const uY = fromCameraU.y;\n const uZ = fromCameraU.z;\n const positionX = position.x;\n const positionY = position.y;\n const positionZ = position.z;\n const t0 = sX * -positionX + sY * -positionY + sZ * -positionZ;\n const t1 = uX * -positionX + uY * -positionY + uZ * -positionZ;\n const t2 = fX * positionX + fY * positionY + fZ * positionZ;\n\n // The code below this comment is an optimized\n // version of the commented lines.\n // Rather that create two matrices and then multiply,\n // we just bake in the multiplcation as part of creation.\n // const rotation = new Matrix4(\n // sX, sY, sZ, 0.0,\n // uX, uY, uZ, 0.0,\n // -fX, -fY, -fZ, 0.0,\n // 0.0, 0.0, 0.0, 1.0);\n // const translation = new Matrix4(\n // 1.0, 0.0, 0.0, -position.x,\n // 0.0, 1.0, 0.0, -position.y,\n // 0.0, 0.0, 1.0, -position.z,\n // 0.0, 0.0, 0.0, 1.0);\n // return rotation.multiply(translation);\n if (!defined(result)) {\n return new Matrix4(\n sX,\n sY,\n sZ,\n t0,\n uX,\n uY,\n uZ,\n t1,\n -fX,\n -fY,\n -fZ,\n t2,\n 0.0,\n 0.0,\n 0.0,\n 1.0,\n );\n }\n result[0] = sX;\n result[1] = uX;\n result[2] = -fX;\n result[3] = 0.0;\n result[4] = sY;\n result[5] = uY;\n result[6] = -fY;\n result[7] = 0.0;\n result[8] = sZ;\n result[9] = uZ;\n result[10] = -fZ;\n result[11] = 0.0;\n result[12] = t0;\n result[13] = t1;\n result[14] = t2;\n result[15] = 1.0;\n return result;\n};\n\n/**\n * Computes a Matrix4 instance representing a perspective transformation matrix.\n *\n * @param {number} fovY The field of view along the Y axis in radians.\n * @param {number} aspectRatio The aspect ratio.\n * @param {number} near The distance to the near plane in meters.\n * @param {number} far The distance to the far plane in meters.\n * @param {Matrix4} result The object in which the result will be stored.\n * @returns {Matrix4} The modified result parameter.\n *\n * @exception {DeveloperError} fovY must be in (0, PI].\n * @exception {DeveloperError} aspectRatio must be greater than zero.\n * @exception {DeveloperError} near must be greater than zero.\n * @exception {DeveloperError} far must be greater than zero.\n */\nMatrix4.computePerspectiveFieldOfView = function (\n fovY,\n aspectRatio,\n near,\n far,\n result,\n) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.number.greaterThan(\"fovY\", fovY, 0.0);\n Check.typeOf.number.lessThan(\"fovY\", fovY, Math.PI);\n Check.typeOf.number.greaterThan(\"near\", near, 0.0);\n Check.typeOf.number.greaterThan(\"far\", far, 0.0);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const bottom = Math.tan(fovY * 0.5);\n\n const column1Row1 = 1.0 / bottom;\n const column0Row0 = column1Row1 / aspectRatio;\n const column2Row2 = (far + near) / (near - far);\n const column3Row2 = (2.0 * far * near) / (near - far);\n\n result[0] = column0Row0;\n result[1] = 0.0;\n result[2] = 0.0;\n result[3] = 0.0;\n result[4] = 0.0;\n result[5] = column1Row1;\n result[6] = 0.0;\n result[7] = 0.0;\n result[8] = 0.0;\n result[9] = 0.0;\n result[10] = column2Row2;\n result[11] = -1.0;\n result[12] = 0.0;\n result[13] = 0.0;\n result[14] = column3Row2;\n result[15] = 0.0;\n return result;\n};\n\n/**\n * Computes a Matrix4 instance representing an orthographic transformation matrix.\n *\n * @param {number} left The number of meters to the left of the camera that will be in view.\n * @param {number} right The number of meters to the right of the camera that will be in view.\n * @param {number} bottom The number of meters below of the camera that will be in view.\n * @param {number} top The number of meters above of the camera that will be in view.\n * @param {number} near The distance to the near plane in meters.\n * @param {number} far The distance to the far plane in meters.\n * @param {Matrix4} result The object in which the result will be stored.\n * @returns {Matrix4} The modified result parameter.\n */\nMatrix4.computeOrthographicOffCenter = function (\n left,\n right,\n bottom,\n top,\n near,\n far,\n result,\n) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.number(\"left\", left);\n Check.typeOf.number(\"right\", right);\n Check.typeOf.number(\"bottom\", bottom);\n Check.typeOf.number(\"top\", top);\n Check.typeOf.number(\"near\", near);\n Check.typeOf.number(\"far\", far);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n let a = 1.0 / (right - left);\n let b = 1.0 / (top - bottom);\n let c = 1.0 / (far - near);\n\n const tx = -(right + left) * a;\n const ty = -(top + bottom) * b;\n const tz = -(far + near) * c;\n a *= 2.0;\n b *= 2.0;\n c *= -2.0;\n\n result[0] = a;\n result[1] = 0.0;\n result[2] = 0.0;\n result[3] = 0.0;\n result[4] = 0.0;\n result[5] = b;\n result[6] = 0.0;\n result[7] = 0.0;\n result[8] = 0.0;\n result[9] = 0.0;\n result[10] = c;\n result[11] = 0.0;\n result[12] = tx;\n result[13] = ty;\n result[14] = tz;\n result[15] = 1.0;\n return result;\n};\n\n/**\n * Computes a Matrix4 instance representing an off center perspective transformation.\n *\n * @param {number} left The number of meters to the left of the camera that will be in view.\n * @param {number} right The number of meters to the right of the camera that will be in view.\n * @param {number} bottom The number of meters below the camera that will be in view.\n * @param {number} top The number of meters above the camera that will be in view.\n * @param {number} near The distance to the near plane in meters.\n * @param {number} far The distance to the far plane in meters.\n * @param {Matrix4} result The object in which the result will be stored.\n * @returns {Matrix4} The modified result parameter.\n */\nMatrix4.computePerspectiveOffCenter = function (\n left,\n right,\n bottom,\n top,\n near,\n far,\n result,\n) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.number(\"left\", left);\n Check.typeOf.number(\"right\", right);\n Check.typeOf.number(\"bottom\", bottom);\n Check.typeOf.number(\"top\", top);\n Check.typeOf.number(\"near\", near);\n Check.typeOf.number(\"far\", far);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const column0Row0 = (2.0 * near) / (right - left);\n const column1Row1 = (2.0 * near) / (top - bottom);\n const column2Row0 = (right + left) / (right - left);\n const column2Row1 = (top + bottom) / (top - bottom);\n const column2Row2 = -(far + near) / (far - near);\n const column2Row3 = -1.0;\n const column3Row2 = (-2.0 * far * near) / (far - near);\n\n result[0] = column0Row0;\n result[1] = 0.0;\n result[2] = 0.0;\n result[3] = 0.0;\n result[4] = 0.0;\n result[5] = column1Row1;\n result[6] = 0.0;\n result[7] = 0.0;\n result[8] = column2Row0;\n result[9] = column2Row1;\n result[10] = column2Row2;\n result[11] = column2Row3;\n result[12] = 0.0;\n result[13] = 0.0;\n result[14] = column3Row2;\n result[15] = 0.0;\n return result;\n};\n\n/**\n * Computes a Matrix4 instance representing an infinite off center perspective transformation.\n *\n * @param {number} left The number of meters to the left of the camera that will be in view.\n * @param {number} right The number of meters to the right of the camera that will be in view.\n * @param {number} bottom The number of meters below of the camera that will be in view.\n * @param {number} top The number of meters above of the camera that will be in view.\n * @param {number} near The distance to the near plane in meters.\n * @param {Matrix4} result The object in which the result will be stored.\n * @returns {Matrix4} The modified result parameter.\n */\nMatrix4.computeInfinitePerspectiveOffCenter = function (\n left,\n right,\n bottom,\n top,\n near,\n result,\n) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.number(\"left\", left);\n Check.typeOf.number(\"right\", right);\n Check.typeOf.number(\"bottom\", bottom);\n Check.typeOf.number(\"top\", top);\n Check.typeOf.number(\"near\", near);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const column0Row0 = (2.0 * near) / (right - left);\n const column1Row1 = (2.0 * near) / (top - bottom);\n const column2Row0 = (right + left) / (right - left);\n const column2Row1 = (top + bottom) / (top - bottom);\n const column2Row2 = -1.0;\n const column2Row3 = -1.0;\n const column3Row2 = -2.0 * near;\n\n result[0] = column0Row0;\n result[1] = 0.0;\n result[2] = 0.0;\n result[3] = 0.0;\n result[4] = 0.0;\n result[5] = column1Row1;\n result[6] = 0.0;\n result[7] = 0.0;\n result[8] = column2Row0;\n result[9] = column2Row1;\n result[10] = column2Row2;\n result[11] = column2Row3;\n result[12] = 0.0;\n result[13] = 0.0;\n result[14] = column3Row2;\n result[15] = 0.0;\n return result;\n};\n\n/**\n * Computes a Matrix4 instance that transforms from normalized device coordinates to window coordinates.\n *\n * @param {object} [viewport = { x : 0.0, y : 0.0, width : 0.0, height : 0.0 }] The viewport's corners as shown in Example 1.\n * @param {number} [nearDepthRange=0.0] The near plane distance in window coordinates.\n * @param {number} [farDepthRange=1.0] The far plane distance in window coordinates.\n * @param {Matrix4} [result] The object in which the result will be stored.\n * @returns {Matrix4} The modified result parameter.\n *\n * @example\n * // Create viewport transformation using an explicit viewport and depth range.\n * const m = Cesium.Matrix4.computeViewportTransformation({\n * x : 0.0,\n * y : 0.0,\n * width : 1024.0,\n * height : 768.0\n * }, 0.0, 1.0, new Cesium.Matrix4());\n */\nMatrix4.computeViewportTransformation = function (\n viewport,\n nearDepthRange,\n farDepthRange,\n result,\n) {\n if (!defined(result)) {\n result = new Matrix4();\n }\n\n viewport = defaultValue(viewport, defaultValue.EMPTY_OBJECT);\n const x = defaultValue(viewport.x, 0.0);\n const y = defaultValue(viewport.y, 0.0);\n const width = defaultValue(viewport.width, 0.0);\n const height = defaultValue(viewport.height, 0.0);\n nearDepthRange = defaultValue(nearDepthRange, 0.0);\n farDepthRange = defaultValue(farDepthRange, 1.0);\n\n const halfWidth = width * 0.5;\n const halfHeight = height * 0.5;\n const halfDepth = (farDepthRange - nearDepthRange) * 0.5;\n\n const column0Row0 = halfWidth;\n const column1Row1 = halfHeight;\n const column2Row2 = halfDepth;\n const column3Row0 = x + halfWidth;\n const column3Row1 = y + halfHeight;\n const column3Row2 = nearDepthRange + halfDepth;\n const column3Row3 = 1.0;\n\n result[0] = column0Row0;\n result[1] = 0.0;\n result[2] = 0.0;\n result[3] = 0.0;\n result[4] = 0.0;\n result[5] = column1Row1;\n result[6] = 0.0;\n result[7] = 0.0;\n result[8] = 0.0;\n result[9] = 0.0;\n result[10] = column2Row2;\n result[11] = 0.0;\n result[12] = column3Row0;\n result[13] = column3Row1;\n result[14] = column3Row2;\n result[15] = column3Row3;\n\n return result;\n};\n\n/**\n * Computes a Matrix4 instance that transforms from world space to view space.\n *\n * @param {Cartesian3} position The position of the camera.\n * @param {Cartesian3} direction The forward direction.\n * @param {Cartesian3} up The up direction.\n * @param {Cartesian3} right The right direction.\n * @param {Matrix4} result The object in which the result will be stored.\n * @returns {Matrix4} The modified result parameter.\n */\nMatrix4.computeView = function (position, direction, up, right, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"position\", position);\n Check.typeOf.object(\"direction\", direction);\n Check.typeOf.object(\"up\", up);\n Check.typeOf.object(\"right\", right);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result[0] = right.x;\n result[1] = up.x;\n result[2] = -direction.x;\n result[3] = 0.0;\n result[4] = right.y;\n result[5] = up.y;\n result[6] = -direction.y;\n result[7] = 0.0;\n result[8] = right.z;\n result[9] = up.z;\n result[10] = -direction.z;\n result[11] = 0.0;\n result[12] = -Cartesian3.dot(right, position);\n result[13] = -Cartesian3.dot(up, position);\n result[14] = Cartesian3.dot(direction, position);\n result[15] = 1.0;\n return result;\n};\n\n/**\n * Computes an Array from the provided Matrix4 instance.\n * The array will be in column-major order.\n *\n * @param {Matrix4} matrix The matrix to use..\n * @param {number[]} [result] The Array onto which to store the result.\n * @returns {number[]} The modified Array parameter or a new Array instance if one was not provided.\n *\n * @example\n * //create an array from an instance of Matrix4\n * // m = [10.0, 14.0, 18.0, 22.0]\n * // [11.0, 15.0, 19.0, 23.0]\n * // [12.0, 16.0, 20.0, 24.0]\n * // [13.0, 17.0, 21.0, 25.0]\n * const a = Cesium.Matrix4.toArray(m);\n *\n * // m remains the same\n * //creates a = [10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0]\n */\nMatrix4.toArray = function (matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n //>>includeEnd('debug');\n\n if (!defined(result)) {\n return [\n matrix[0],\n matrix[1],\n matrix[2],\n matrix[3],\n matrix[4],\n matrix[5],\n matrix[6],\n matrix[7],\n matrix[8],\n matrix[9],\n matrix[10],\n matrix[11],\n matrix[12],\n matrix[13],\n matrix[14],\n matrix[15],\n ];\n }\n result[0] = matrix[0];\n result[1] = matrix[1];\n result[2] = matrix[2];\n result[3] = matrix[3];\n result[4] = matrix[4];\n result[5] = matrix[5];\n result[6] = matrix[6];\n result[7] = matrix[7];\n result[8] = matrix[8];\n result[9] = matrix[9];\n result[10] = matrix[10];\n result[11] = matrix[11];\n result[12] = matrix[12];\n result[13] = matrix[13];\n result[14] = matrix[14];\n result[15] = matrix[15];\n return result;\n};\n\n/**\n * Computes the array index of the element at the provided row and column.\n *\n * @param {number} row The zero-based index of the row.\n * @param {number} column The zero-based index of the column.\n * @returns {number} The index of the element at the provided row and column.\n *\n * @exception {DeveloperError} row must be 0, 1, 2, or 3.\n * @exception {DeveloperError} column must be 0, 1, 2, or 3.\n *\n * @example\n * const myMatrix = new Cesium.Matrix4();\n * const column1Row0Index = Cesium.Matrix4.getElementIndex(1, 0);\n * const column1Row0 = myMatrix[column1Row0Index];\n * myMatrix[column1Row0Index] = 10.0;\n */\nMatrix4.getElementIndex = function (column, row) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.number.greaterThanOrEquals(\"row\", row, 0);\n Check.typeOf.number.lessThanOrEquals(\"row\", row, 3);\n\n Check.typeOf.number.greaterThanOrEquals(\"column\", column, 0);\n Check.typeOf.number.lessThanOrEquals(\"column\", column, 3);\n //>>includeEnd('debug');\n\n return column * 4 + row;\n};\n\n/**\n * Retrieves a copy of the matrix column at the provided index as a Cartesian4 instance.\n *\n * @param {Matrix4} matrix The matrix to use.\n * @param {number} index The zero-based index of the column to retrieve.\n * @param {Cartesian4} result The object onto which to store the result.\n * @returns {Cartesian4} The modified result parameter.\n *\n * @exception {DeveloperError} index must be 0, 1, 2, or 3.\n *\n * @example\n * //returns a Cartesian4 instance with values from the specified column\n * // m = [10.0, 11.0, 12.0, 13.0]\n * // [14.0, 15.0, 16.0, 17.0]\n * // [18.0, 19.0, 20.0, 21.0]\n * // [22.0, 23.0, 24.0, 25.0]\n *\n * //Example 1: Creates an instance of Cartesian\n * const a = Cesium.Matrix4.getColumn(m, 2, new Cesium.Cartesian4());\n *\n * @example\n * //Example 2: Sets values for Cartesian instance\n * const a = new Cesium.Cartesian4();\n * Cesium.Matrix4.getColumn(m, 2, a);\n *\n * // a.x = 12.0; a.y = 16.0; a.z = 20.0; a.w = 24.0;\n */\nMatrix4.getColumn = function (matrix, index, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n\n Check.typeOf.number.greaterThanOrEquals(\"index\", index, 0);\n Check.typeOf.number.lessThanOrEquals(\"index\", index, 3);\n\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const startIndex = index * 4;\n const x = matrix[startIndex];\n const y = matrix[startIndex + 1];\n const z = matrix[startIndex + 2];\n const w = matrix[startIndex + 3];\n\n result.x = x;\n result.y = y;\n result.z = z;\n result.w = w;\n return result;\n};\n\n/**\n * Computes a new matrix that replaces the specified column in the provided matrix with the provided Cartesian4 instance.\n *\n * @param {Matrix4} matrix The matrix to use.\n * @param {number} index The zero-based index of the column to set.\n * @param {Cartesian4} cartesian The Cartesian whose values will be assigned to the specified column.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n *\n * @exception {DeveloperError} index must be 0, 1, 2, or 3.\n *\n * @example\n * //creates a new Matrix4 instance with new column values from the Cartesian4 instance\n * // m = [10.0, 11.0, 12.0, 13.0]\n * // [14.0, 15.0, 16.0, 17.0]\n * // [18.0, 19.0, 20.0, 21.0]\n * // [22.0, 23.0, 24.0, 25.0]\n *\n * const a = Cesium.Matrix4.setColumn(m, 2, new Cesium.Cartesian4(99.0, 98.0, 97.0, 96.0), new Cesium.Matrix4());\n *\n * // m remains the same\n * // a = [10.0, 11.0, 99.0, 13.0]\n * // [14.0, 15.0, 98.0, 17.0]\n * // [18.0, 19.0, 97.0, 21.0]\n * // [22.0, 23.0, 96.0, 25.0]\n */\nMatrix4.setColumn = function (matrix, index, cartesian, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n\n Check.typeOf.number.greaterThanOrEquals(\"index\", index, 0);\n Check.typeOf.number.lessThanOrEquals(\"index\", index, 3);\n\n Check.typeOf.object(\"cartesian\", cartesian);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result = Matrix4.clone(matrix, result);\n const startIndex = index * 4;\n result[startIndex] = cartesian.x;\n result[startIndex + 1] = cartesian.y;\n result[startIndex + 2] = cartesian.z;\n result[startIndex + 3] = cartesian.w;\n return result;\n};\n\n/**\n * Retrieves a copy of the matrix row at the provided index as a Cartesian4 instance.\n *\n * @param {Matrix4} matrix The matrix to use.\n * @param {number} index The zero-based index of the row to retrieve.\n * @param {Cartesian4} result The object onto which to store the result.\n * @returns {Cartesian4} The modified result parameter.\n *\n * @exception {DeveloperError} index must be 0, 1, 2, or 3.\n *\n * @example\n * //returns a Cartesian4 instance with values from the specified column\n * // m = [10.0, 11.0, 12.0, 13.0]\n * // [14.0, 15.0, 16.0, 17.0]\n * // [18.0, 19.0, 20.0, 21.0]\n * // [22.0, 23.0, 24.0, 25.0]\n *\n * //Example 1: Returns an instance of Cartesian\n * const a = Cesium.Matrix4.getRow(m, 2, new Cesium.Cartesian4());\n *\n * @example\n * //Example 2: Sets values for a Cartesian instance\n * const a = new Cesium.Cartesian4();\n * Cesium.Matrix4.getRow(m, 2, a);\n *\n * // a.x = 18.0; a.y = 19.0; a.z = 20.0; a.w = 21.0;\n */\nMatrix4.getRow = function (matrix, index, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n\n Check.typeOf.number.greaterThanOrEquals(\"index\", index, 0);\n Check.typeOf.number.lessThanOrEquals(\"index\", index, 3);\n\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const x = matrix[index];\n const y = matrix[index + 4];\n const z = matrix[index + 8];\n const w = matrix[index + 12];\n\n result.x = x;\n result.y = y;\n result.z = z;\n result.w = w;\n return result;\n};\n\n/**\n * Computes a new matrix that replaces the specified row in the provided matrix with the provided Cartesian4 instance.\n *\n * @param {Matrix4} matrix The matrix to use.\n * @param {number} index The zero-based index of the row to set.\n * @param {Cartesian4} cartesian The Cartesian whose values will be assigned to the specified row.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n *\n * @exception {DeveloperError} index must be 0, 1, 2, or 3.\n *\n * @example\n * //create a new Matrix4 instance with new row values from the Cartesian4 instance\n * // m = [10.0, 11.0, 12.0, 13.0]\n * // [14.0, 15.0, 16.0, 17.0]\n * // [18.0, 19.0, 20.0, 21.0]\n * // [22.0, 23.0, 24.0, 25.0]\n *\n * const a = Cesium.Matrix4.setRow(m, 2, new Cesium.Cartesian4(99.0, 98.0, 97.0, 96.0), new Cesium.Matrix4());\n *\n * // m remains the same\n * // a = [10.0, 11.0, 12.0, 13.0]\n * // [14.0, 15.0, 16.0, 17.0]\n * // [99.0, 98.0, 97.0, 96.0]\n * // [22.0, 23.0, 24.0, 25.0]\n */\nMatrix4.setRow = function (matrix, index, cartesian, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n\n Check.typeOf.number.greaterThanOrEquals(\"index\", index, 0);\n Check.typeOf.number.lessThanOrEquals(\"index\", index, 3);\n\n Check.typeOf.object(\"cartesian\", cartesian);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result = Matrix4.clone(matrix, result);\n result[index] = cartesian.x;\n result[index + 4] = cartesian.y;\n result[index + 8] = cartesian.z;\n result[index + 12] = cartesian.w;\n return result;\n};\n\n/**\n * Computes a new matrix that replaces the translation in the rightmost column of the provided\n * matrix with the provided translation. This assumes the matrix is an affine transformation.\n *\n * @param {Matrix4} matrix The matrix to use.\n * @param {Cartesian3} translation The translation that replaces the translation of the provided matrix.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n */\nMatrix4.setTranslation = function (matrix, translation, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"translation\", translation);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result[0] = matrix[0];\n result[1] = matrix[1];\n result[2] = matrix[2];\n result[3] = matrix[3];\n\n result[4] = matrix[4];\n result[5] = matrix[5];\n result[6] = matrix[6];\n result[7] = matrix[7];\n\n result[8] = matrix[8];\n result[9] = matrix[9];\n result[10] = matrix[10];\n result[11] = matrix[11];\n\n result[12] = translation.x;\n result[13] = translation.y;\n result[14] = translation.z;\n result[15] = matrix[15];\n\n return result;\n};\n\nconst scaleScratch1 = new Cartesian3();\n\n/**\n * Computes a new matrix that replaces the scale with the provided scale.\n * This assumes the matrix is an affine transformation.\n *\n * @param {Matrix4} matrix The matrix to use.\n * @param {Cartesian3} scale The scale that replaces the scale of the provided matrix.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n *\n * @see Matrix4.setUniformScale\n * @see Matrix4.fromScale\n * @see Matrix4.fromUniformScale\n * @see Matrix4.multiplyByScale\n * @see Matrix4.multiplyByUniformScale\n * @see Matrix4.getScale\n */\nMatrix4.setScale = function (matrix, scale, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"scale\", scale);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const existingScale = Matrix4.getScale(matrix, scaleScratch1);\n const scaleRatioX = scale.x / existingScale.x;\n const scaleRatioY = scale.y / existingScale.y;\n const scaleRatioZ = scale.z / existingScale.z;\n\n result[0] = matrix[0] * scaleRatioX;\n result[1] = matrix[1] * scaleRatioX;\n result[2] = matrix[2] * scaleRatioX;\n result[3] = matrix[3];\n\n result[4] = matrix[4] * scaleRatioY;\n result[5] = matrix[5] * scaleRatioY;\n result[6] = matrix[6] * scaleRatioY;\n result[7] = matrix[7];\n\n result[8] = matrix[8] * scaleRatioZ;\n result[9] = matrix[9] * scaleRatioZ;\n result[10] = matrix[10] * scaleRatioZ;\n result[11] = matrix[11];\n\n result[12] = matrix[12];\n result[13] = matrix[13];\n result[14] = matrix[14];\n result[15] = matrix[15];\n\n return result;\n};\n\nconst scaleScratch2 = new Cartesian3();\n\n/**\n * Computes a new matrix that replaces the scale with the provided uniform scale.\n * This assumes the matrix is an affine transformation.\n *\n * @param {Matrix4} matrix The matrix to use.\n * @param {number} scale The uniform scale that replaces the scale of the provided matrix.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n *\n * @see Matrix4.setScale\n * @see Matrix4.fromScale\n * @see Matrix4.fromUniformScale\n * @see Matrix4.multiplyByScale\n * @see Matrix4.multiplyByUniformScale\n * @see Matrix4.getScale\n */\nMatrix4.setUniformScale = function (matrix, scale, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.number(\"scale\", scale);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const existingScale = Matrix4.getScale(matrix, scaleScratch2);\n const scaleRatioX = scale / existingScale.x;\n const scaleRatioY = scale / existingScale.y;\n const scaleRatioZ = scale / existingScale.z;\n\n result[0] = matrix[0] * scaleRatioX;\n result[1] = matrix[1] * scaleRatioX;\n result[2] = matrix[2] * scaleRatioX;\n result[3] = matrix[3];\n\n result[4] = matrix[4] * scaleRatioY;\n result[5] = matrix[5] * scaleRatioY;\n result[6] = matrix[6] * scaleRatioY;\n result[7] = matrix[7];\n\n result[8] = matrix[8] * scaleRatioZ;\n result[9] = matrix[9] * scaleRatioZ;\n result[10] = matrix[10] * scaleRatioZ;\n result[11] = matrix[11];\n\n result[12] = matrix[12];\n result[13] = matrix[13];\n result[14] = matrix[14];\n result[15] = matrix[15];\n\n return result;\n};\n\nconst scratchColumn = new Cartesian3();\n\n/**\n * Extracts the non-uniform scale assuming the matrix is an affine transformation.\n *\n * @param {Matrix4} matrix The matrix.\n * @param {Cartesian3} result The object onto which to store the result.\n * @returns {Cartesian3} The modified result parameter\n *\n * @see Matrix4.multiplyByScale\n * @see Matrix4.multiplyByUniformScale\n * @see Matrix4.fromScale\n * @see Matrix4.fromUniformScale\n * @see Matrix4.setScale\n * @see Matrix4.setUniformScale\n */\nMatrix4.getScale = function (matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result.x = Cartesian3.magnitude(\n Cartesian3.fromElements(matrix[0], matrix[1], matrix[2], scratchColumn),\n );\n result.y = Cartesian3.magnitude(\n Cartesian3.fromElements(matrix[4], matrix[5], matrix[6], scratchColumn),\n );\n result.z = Cartesian3.magnitude(\n Cartesian3.fromElements(matrix[8], matrix[9], matrix[10], scratchColumn),\n );\n return result;\n};\n\nconst scaleScratch3 = new Cartesian3();\n\n/**\n * Computes the maximum scale assuming the matrix is an affine transformation.\n * The maximum scale is the maximum length of the column vectors in the upper-left\n * 3x3 matrix.\n *\n * @param {Matrix4} matrix The matrix.\n * @returns {number} The maximum scale.\n */\nMatrix4.getMaximumScale = function (matrix) {\n Matrix4.getScale(matrix, scaleScratch3);\n return Cartesian3.maximumComponent(scaleScratch3);\n};\n\nconst scaleScratch4 = new Cartesian3();\n\n/**\n * Sets the rotation assuming the matrix is an affine transformation.\n *\n * @param {Matrix4} matrix The matrix.\n * @param {Matrix3} rotation The rotation matrix.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n *\n * @see Matrix4.fromRotation\n * @see Matrix4.getRotation\n */\nMatrix4.setRotation = function (matrix, rotation, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const scale = Matrix4.getScale(matrix, scaleScratch4);\n\n result[0] = rotation[0] * scale.x;\n result[1] = rotation[1] * scale.x;\n result[2] = rotation[2] * scale.x;\n result[3] = matrix[3];\n\n result[4] = rotation[3] * scale.y;\n result[5] = rotation[4] * scale.y;\n result[6] = rotation[5] * scale.y;\n result[7] = matrix[7];\n\n result[8] = rotation[6] * scale.z;\n result[9] = rotation[7] * scale.z;\n result[10] = rotation[8] * scale.z;\n result[11] = matrix[11];\n\n result[12] = matrix[12];\n result[13] = matrix[13];\n result[14] = matrix[14];\n result[15] = matrix[15];\n\n return result;\n};\n\nconst scaleScratch5 = new Cartesian3();\n\n/**\n * Extracts the rotation matrix assuming the matrix is an affine transformation.\n *\n * @param {Matrix4} matrix The matrix.\n * @param {Matrix3} result The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter.\n *\n * @see Matrix4.setRotation\n * @see Matrix4.fromRotation\n */\nMatrix4.getRotation = function (matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const scale = Matrix4.getScale(matrix, scaleScratch5);\n\n result[0] = matrix[0] / scale.x;\n result[1] = matrix[1] / scale.x;\n result[2] = matrix[2] / scale.x;\n\n result[3] = matrix[4] / scale.y;\n result[4] = matrix[5] / scale.y;\n result[5] = matrix[6] / scale.y;\n\n result[6] = matrix[8] / scale.z;\n result[7] = matrix[9] / scale.z;\n result[8] = matrix[10] / scale.z;\n\n return result;\n};\n\n/**\n * Computes the product of two matrices.\n *\n * @param {Matrix4} left The first matrix.\n * @param {Matrix4} right The second matrix.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n */\nMatrix4.multiply = function (left, right, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"left\", left);\n Check.typeOf.object(\"right\", right);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const left0 = left[0];\n const left1 = left[1];\n const left2 = left[2];\n const left3 = left[3];\n const left4 = left[4];\n const left5 = left[5];\n const left6 = left[6];\n const left7 = left[7];\n const left8 = left[8];\n const left9 = left[9];\n const left10 = left[10];\n const left11 = left[11];\n const left12 = left[12];\n const left13 = left[13];\n const left14 = left[14];\n const left15 = left[15];\n\n const right0 = right[0];\n const right1 = right[1];\n const right2 = right[2];\n const right3 = right[3];\n const right4 = right[4];\n const right5 = right[5];\n const right6 = right[6];\n const right7 = right[7];\n const right8 = right[8];\n const right9 = right[9];\n const right10 = right[10];\n const right11 = right[11];\n const right12 = right[12];\n const right13 = right[13];\n const right14 = right[14];\n const right15 = right[15];\n\n const column0Row0 =\n left0 * right0 + left4 * right1 + left8 * right2 + left12 * right3;\n const column0Row1 =\n left1 * right0 + left5 * right1 + left9 * right2 + left13 * right3;\n const column0Row2 =\n left2 * right0 + left6 * right1 + left10 * right2 + left14 * right3;\n const column0Row3 =\n left3 * right0 + left7 * right1 + left11 * right2 + left15 * right3;\n\n const column1Row0 =\n left0 * right4 + left4 * right5 + left8 * right6 + left12 * right7;\n const column1Row1 =\n left1 * right4 + left5 * right5 + left9 * right6 + left13 * right7;\n const column1Row2 =\n left2 * right4 + left6 * right5 + left10 * right6 + left14 * right7;\n const column1Row3 =\n left3 * right4 + left7 * right5 + left11 * right6 + left15 * right7;\n\n const column2Row0 =\n left0 * right8 + left4 * right9 + left8 * right10 + left12 * right11;\n const column2Row1 =\n left1 * right8 + left5 * right9 + left9 * right10 + left13 * right11;\n const column2Row2 =\n left2 * right8 + left6 * right9 + left10 * right10 + left14 * right11;\n const column2Row3 =\n left3 * right8 + left7 * right9 + left11 * right10 + left15 * right11;\n\n const column3Row0 =\n left0 * right12 + left4 * right13 + left8 * right14 + left12 * right15;\n const column3Row1 =\n left1 * right12 + left5 * right13 + left9 * right14 + left13 * right15;\n const column3Row2 =\n left2 * right12 + left6 * right13 + left10 * right14 + left14 * right15;\n const column3Row3 =\n left3 * right12 + left7 * right13 + left11 * right14 + left15 * right15;\n\n result[0] = column0Row0;\n result[1] = column0Row1;\n result[2] = column0Row2;\n result[3] = column0Row3;\n result[4] = column1Row0;\n result[5] = column1Row1;\n result[6] = column1Row2;\n result[7] = column1Row3;\n result[8] = column2Row0;\n result[9] = column2Row1;\n result[10] = column2Row2;\n result[11] = column2Row3;\n result[12] = column3Row0;\n result[13] = column3Row1;\n result[14] = column3Row2;\n result[15] = column3Row3;\n return result;\n};\n\n/**\n * Computes the sum of two matrices.\n *\n * @param {Matrix4} left The first matrix.\n * @param {Matrix4} right The second matrix.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n */\nMatrix4.add = function (left, right, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"left\", left);\n Check.typeOf.object(\"right\", right);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result[0] = left[0] + right[0];\n result[1] = left[1] + right[1];\n result[2] = left[2] + right[2];\n result[3] = left[3] + right[3];\n result[4] = left[4] + right[4];\n result[5] = left[5] + right[5];\n result[6] = left[6] + right[6];\n result[7] = left[7] + right[7];\n result[8] = left[8] + right[8];\n result[9] = left[9] + right[9];\n result[10] = left[10] + right[10];\n result[11] = left[11] + right[11];\n result[12] = left[12] + right[12];\n result[13] = left[13] + right[13];\n result[14] = left[14] + right[14];\n result[15] = left[15] + right[15];\n return result;\n};\n\n/**\n * Computes the difference of two matrices.\n *\n * @param {Matrix4} left The first matrix.\n * @param {Matrix4} right The second matrix.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n */\nMatrix4.subtract = function (left, right, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"left\", left);\n Check.typeOf.object(\"right\", right);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result[0] = left[0] - right[0];\n result[1] = left[1] - right[1];\n result[2] = left[2] - right[2];\n result[3] = left[3] - right[3];\n result[4] = left[4] - right[4];\n result[5] = left[5] - right[5];\n result[6] = left[6] - right[6];\n result[7] = left[7] - right[7];\n result[8] = left[8] - right[8];\n result[9] = left[9] - right[9];\n result[10] = left[10] - right[10];\n result[11] = left[11] - right[11];\n result[12] = left[12] - right[12];\n result[13] = left[13] - right[13];\n result[14] = left[14] - right[14];\n result[15] = left[15] - right[15];\n return result;\n};\n\n/**\n * Computes the product of two matrices assuming the matrices are affine transformation matrices,\n * where the upper left 3x3 elements are any matrix, and\n * the upper three elements in the fourth column are the translation.\n * The bottom row is assumed to be [0, 0, 0, 1].\n * The matrix is not verified to be in the proper form.\n * This method is faster than computing the product for general 4x4\n * matrices using {@link Matrix4.multiply}.\n *\n * @param {Matrix4} left The first matrix.\n * @param {Matrix4} right The second matrix.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n *\n * @example\n * const m1 = new Cesium.Matrix4(1.0, 6.0, 7.0, 0.0, 2.0, 5.0, 8.0, 0.0, 3.0, 4.0, 9.0, 0.0, 0.0, 0.0, 0.0, 1.0);\n * const m2 = Cesium.Transforms.eastNorthUpToFixedFrame(new Cesium.Cartesian3(1.0, 1.0, 1.0));\n * const m3 = Cesium.Matrix4.multiplyTransformation(m1, m2, new Cesium.Matrix4());\n */\nMatrix4.multiplyTransformation = function (left, right, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"left\", left);\n Check.typeOf.object(\"right\", right);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const left0 = left[0];\n const left1 = left[1];\n const left2 = left[2];\n const left4 = left[4];\n const left5 = left[5];\n const left6 = left[6];\n const left8 = left[8];\n const left9 = left[9];\n const left10 = left[10];\n const left12 = left[12];\n const left13 = left[13];\n const left14 = left[14];\n\n const right0 = right[0];\n const right1 = right[1];\n const right2 = right[2];\n const right4 = right[4];\n const right5 = right[5];\n const right6 = right[6];\n const right8 = right[8];\n const right9 = right[9];\n const right10 = right[10];\n const right12 = right[12];\n const right13 = right[13];\n const right14 = right[14];\n\n const column0Row0 = left0 * right0 + left4 * right1 + left8 * right2;\n const column0Row1 = left1 * right0 + left5 * right1 + left9 * right2;\n const column0Row2 = left2 * right0 + left6 * right1 + left10 * right2;\n\n const column1Row0 = left0 * right4 + left4 * right5 + left8 * right6;\n const column1Row1 = left1 * right4 + left5 * right5 + left9 * right6;\n const column1Row2 = left2 * right4 + left6 * right5 + left10 * right6;\n\n const column2Row0 = left0 * right8 + left4 * right9 + left8 * right10;\n const column2Row1 = left1 * right8 + left5 * right9 + left9 * right10;\n const column2Row2 = left2 * right8 + left6 * right9 + left10 * right10;\n\n const column3Row0 =\n left0 * right12 + left4 * right13 + left8 * right14 + left12;\n const column3Row1 =\n left1 * right12 + left5 * right13 + left9 * right14 + left13;\n const column3Row2 =\n left2 * right12 + left6 * right13 + left10 * right14 + left14;\n\n result[0] = column0Row0;\n result[1] = column0Row1;\n result[2] = column0Row2;\n result[3] = 0.0;\n result[4] = column1Row0;\n result[5] = column1Row1;\n result[6] = column1Row2;\n result[7] = 0.0;\n result[8] = column2Row0;\n result[9] = column2Row1;\n result[10] = column2Row2;\n result[11] = 0.0;\n result[12] = column3Row0;\n result[13] = column3Row1;\n result[14] = column3Row2;\n result[15] = 1.0;\n return result;\n};\n\n/**\n * Multiplies a transformation matrix (with a bottom row of [0.0, 0.0, 0.0, 1.0])\n * by a 3x3 rotation matrix. This is an optimization\n * for Matrix4.multiply(m, Matrix4.fromRotationTranslation(rotation), m); with less allocations and arithmetic operations.\n *\n * @param {Matrix4} matrix The matrix on the left-hand side.\n * @param {Matrix3} rotation The 3x3 rotation matrix on the right-hand side.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n *\n * @example\n * // Instead of Cesium.Matrix4.multiply(m, Cesium.Matrix4.fromRotationTranslation(rotation), m);\n * Cesium.Matrix4.multiplyByMatrix3(m, rotation, m);\n */\nMatrix4.multiplyByMatrix3 = function (matrix, rotation, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"rotation\", rotation);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const left0 = matrix[0];\n const left1 = matrix[1];\n const left2 = matrix[2];\n const left4 = matrix[4];\n const left5 = matrix[5];\n const left6 = matrix[6];\n const left8 = matrix[8];\n const left9 = matrix[9];\n const left10 = matrix[10];\n\n const right0 = rotation[0];\n const right1 = rotation[1];\n const right2 = rotation[2];\n const right4 = rotation[3];\n const right5 = rotation[4];\n const right6 = rotation[5];\n const right8 = rotation[6];\n const right9 = rotation[7];\n const right10 = rotation[8];\n\n const column0Row0 = left0 * right0 + left4 * right1 + left8 * right2;\n const column0Row1 = left1 * right0 + left5 * right1 + left9 * right2;\n const column0Row2 = left2 * right0 + left6 * right1 + left10 * right2;\n\n const column1Row0 = left0 * right4 + left4 * right5 + left8 * right6;\n const column1Row1 = left1 * right4 + left5 * right5 + left9 * right6;\n const column1Row2 = left2 * right4 + left6 * right5 + left10 * right6;\n\n const column2Row0 = left0 * right8 + left4 * right9 + left8 * right10;\n const column2Row1 = left1 * right8 + left5 * right9 + left9 * right10;\n const column2Row2 = left2 * right8 + left6 * right9 + left10 * right10;\n\n result[0] = column0Row0;\n result[1] = column0Row1;\n result[2] = column0Row2;\n result[3] = 0.0;\n result[4] = column1Row0;\n result[5] = column1Row1;\n result[6] = column1Row2;\n result[7] = 0.0;\n result[8] = column2Row0;\n result[9] = column2Row1;\n result[10] = column2Row2;\n result[11] = 0.0;\n result[12] = matrix[12];\n result[13] = matrix[13];\n result[14] = matrix[14];\n result[15] = matrix[15];\n return result;\n};\n\n/**\n * Multiplies a transformation matrix (with a bottom row of [0.0, 0.0, 0.0, 1.0])\n * by an implicit translation matrix defined by a {@link Cartesian3}. This is an optimization\n * for Matrix4.multiply(m, Matrix4.fromTranslation(position), m); with less allocations and arithmetic operations.\n *\n * @param {Matrix4} matrix The matrix on the left-hand side.\n * @param {Cartesian3} translation The translation on the right-hand side.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n *\n * @example\n * // Instead of Cesium.Matrix4.multiply(m, Cesium.Matrix4.fromTranslation(position), m);\n * Cesium.Matrix4.multiplyByTranslation(m, position, m);\n */\nMatrix4.multiplyByTranslation = function (matrix, translation, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"translation\", translation);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const x = translation.x;\n const y = translation.y;\n const z = translation.z;\n\n const tx = x * matrix[0] + y * matrix[4] + z * matrix[8] + matrix[12];\n const ty = x * matrix[1] + y * matrix[5] + z * matrix[9] + matrix[13];\n const tz = x * matrix[2] + y * matrix[6] + z * matrix[10] + matrix[14];\n\n result[0] = matrix[0];\n result[1] = matrix[1];\n result[2] = matrix[2];\n result[3] = matrix[3];\n result[4] = matrix[4];\n result[5] = matrix[5];\n result[6] = matrix[6];\n result[7] = matrix[7];\n result[8] = matrix[8];\n result[9] = matrix[9];\n result[10] = matrix[10];\n result[11] = matrix[11];\n result[12] = tx;\n result[13] = ty;\n result[14] = tz;\n result[15] = matrix[15];\n return result;\n};\n\n/**\n * Multiplies an affine transformation matrix (with a bottom row of [0.0, 0.0, 0.0, 1.0])\n * by an implicit non-uniform scale matrix. This is an optimization\n * for Matrix4.multiply(m, Matrix4.fromUniformScale(scale), m);, where\n * m must be an affine matrix.\n * This function performs fewer allocations and arithmetic operations.\n *\n * @param {Matrix4} matrix The affine matrix on the left-hand side.\n * @param {Cartesian3} scale The non-uniform scale on the right-hand side.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n *\n *\n * @example\n * // Instead of Cesium.Matrix4.multiply(m, Cesium.Matrix4.fromScale(scale), m);\n * Cesium.Matrix4.multiplyByScale(m, scale, m);\n *\n * @see Matrix4.multiplyByUniformScale\n * @see Matrix4.fromScale\n * @see Matrix4.fromUniformScale\n * @see Matrix4.setScale\n * @see Matrix4.setUniformScale\n * @see Matrix4.getScale\n */\nMatrix4.multiplyByScale = function (matrix, scale, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"scale\", scale);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const scaleX = scale.x;\n const scaleY = scale.y;\n const scaleZ = scale.z;\n\n // Faster than Cartesian3.equals\n if (scaleX === 1.0 && scaleY === 1.0 && scaleZ === 1.0) {\n return Matrix4.clone(matrix, result);\n }\n\n result[0] = scaleX * matrix[0];\n result[1] = scaleX * matrix[1];\n result[2] = scaleX * matrix[2];\n result[3] = matrix[3];\n\n result[4] = scaleY * matrix[4];\n result[5] = scaleY * matrix[5];\n result[6] = scaleY * matrix[6];\n result[7] = matrix[7];\n\n result[8] = scaleZ * matrix[8];\n result[9] = scaleZ * matrix[9];\n result[10] = scaleZ * matrix[10];\n result[11] = matrix[11];\n\n result[12] = matrix[12];\n result[13] = matrix[13];\n result[14] = matrix[14];\n result[15] = matrix[15];\n\n return result;\n};\n\n/**\n * Computes the product of a matrix times a uniform scale, as if the scale were a scale matrix.\n *\n * @param {Matrix4} matrix The matrix on the left-hand side.\n * @param {number} scale The uniform scale on the right-hand side.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n *\n * @example\n * // Instead of Cesium.Matrix4.multiply(m, Cesium.Matrix4.fromUniformScale(scale), m);\n * Cesium.Matrix4.multiplyByUniformScale(m, scale, m);\n *\n * @see Matrix4.multiplyByScale\n * @see Matrix4.fromScale\n * @see Matrix4.fromUniformScale\n * @see Matrix4.setScale\n * @see Matrix4.setUniformScale\n * @see Matrix4.getScale\n */\nMatrix4.multiplyByUniformScale = function (matrix, scale, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.number(\"scale\", scale);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result[0] = matrix[0] * scale;\n result[1] = matrix[1] * scale;\n result[2] = matrix[2] * scale;\n result[3] = matrix[3];\n\n result[4] = matrix[4] * scale;\n result[5] = matrix[5] * scale;\n result[6] = matrix[6] * scale;\n result[7] = matrix[7];\n\n result[8] = matrix[8] * scale;\n result[9] = matrix[9] * scale;\n result[10] = matrix[10] * scale;\n result[11] = matrix[11];\n\n result[12] = matrix[12];\n result[13] = matrix[13];\n result[14] = matrix[14];\n result[15] = matrix[15];\n\n return result;\n};\n\n/**\n * Computes the product of a matrix and a column vector.\n *\n * @param {Matrix4} matrix The matrix.\n * @param {Cartesian4} cartesian The vector.\n * @param {Cartesian4} result The object onto which to store the result.\n * @returns {Cartesian4} The modified result parameter.\n */\nMatrix4.multiplyByVector = function (matrix, cartesian, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"cartesian\", cartesian);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const vX = cartesian.x;\n const vY = cartesian.y;\n const vZ = cartesian.z;\n const vW = cartesian.w;\n\n const x = matrix[0] * vX + matrix[4] * vY + matrix[8] * vZ + matrix[12] * vW;\n const y = matrix[1] * vX + matrix[5] * vY + matrix[9] * vZ + matrix[13] * vW;\n const z = matrix[2] * vX + matrix[6] * vY + matrix[10] * vZ + matrix[14] * vW;\n const w = matrix[3] * vX + matrix[7] * vY + matrix[11] * vZ + matrix[15] * vW;\n\n result.x = x;\n result.y = y;\n result.z = z;\n result.w = w;\n return result;\n};\n\n/**\n * Computes the product of a matrix and a {@link Cartesian3}. This is equivalent to calling {@link Matrix4.multiplyByVector}\n * with a {@link Cartesian4} with a w component of zero.\n *\n * @param {Matrix4} matrix The matrix.\n * @param {Cartesian3} cartesian The point.\n * @param {Cartesian3} result The object onto which to store the result.\n * @returns {Cartesian3} The modified result parameter.\n *\n * @example\n * const p = new Cesium.Cartesian3(1.0, 2.0, 3.0);\n * const result = Cesium.Matrix4.multiplyByPointAsVector(matrix, p, new Cesium.Cartesian3());\n * // A shortcut for\n * // Cartesian3 p = ...\n * // Cesium.Matrix4.multiplyByVector(matrix, new Cesium.Cartesian4(p.x, p.y, p.z, 0.0), result);\n */\nMatrix4.multiplyByPointAsVector = function (matrix, cartesian, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"cartesian\", cartesian);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const vX = cartesian.x;\n const vY = cartesian.y;\n const vZ = cartesian.z;\n\n const x = matrix[0] * vX + matrix[4] * vY + matrix[8] * vZ;\n const y = matrix[1] * vX + matrix[5] * vY + matrix[9] * vZ;\n const z = matrix[2] * vX + matrix[6] * vY + matrix[10] * vZ;\n\n result.x = x;\n result.y = y;\n result.z = z;\n return result;\n};\n\n/**\n * Computes the product of a matrix and a {@link Cartesian3}. This is equivalent to calling {@link Matrix4.multiplyByVector}\n * with a {@link Cartesian4} with a w component of 1, but returns a {@link Cartesian3} instead of a {@link Cartesian4}.\n *\n * @param {Matrix4} matrix The matrix.\n * @param {Cartesian3} cartesian The point.\n * @param {Cartesian3} result The object onto which to store the result.\n * @returns {Cartesian3} The modified result parameter.\n *\n * @example\n * const p = new Cesium.Cartesian3(1.0, 2.0, 3.0);\n * const result = Cesium.Matrix4.multiplyByPoint(matrix, p, new Cesium.Cartesian3());\n */\nMatrix4.multiplyByPoint = function (matrix, cartesian, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"cartesian\", cartesian);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const vX = cartesian.x;\n const vY = cartesian.y;\n const vZ = cartesian.z;\n\n const x = matrix[0] * vX + matrix[4] * vY + matrix[8] * vZ + matrix[12];\n const y = matrix[1] * vX + matrix[5] * vY + matrix[9] * vZ + matrix[13];\n const z = matrix[2] * vX + matrix[6] * vY + matrix[10] * vZ + matrix[14];\n\n result.x = x;\n result.y = y;\n result.z = z;\n return result;\n};\n\n/**\n * Computes the product of a matrix and a scalar.\n *\n * @param {Matrix4} matrix The matrix.\n * @param {number} scalar The number to multiply by.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n *\n * @example\n * //create a Matrix4 instance which is a scaled version of the supplied Matrix4\n * // m = [10.0, 11.0, 12.0, 13.0]\n * // [14.0, 15.0, 16.0, 17.0]\n * // [18.0, 19.0, 20.0, 21.0]\n * // [22.0, 23.0, 24.0, 25.0]\n *\n * const a = Cesium.Matrix4.multiplyByScalar(m, -2, new Cesium.Matrix4());\n *\n * // m remains the same\n * // a = [-20.0, -22.0, -24.0, -26.0]\n * // [-28.0, -30.0, -32.0, -34.0]\n * // [-36.0, -38.0, -40.0, -42.0]\n * // [-44.0, -46.0, -48.0, -50.0]\n */\nMatrix4.multiplyByScalar = function (matrix, scalar, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.number(\"scalar\", scalar);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result[0] = matrix[0] * scalar;\n result[1] = matrix[1] * scalar;\n result[2] = matrix[2] * scalar;\n result[3] = matrix[3] * scalar;\n result[4] = matrix[4] * scalar;\n result[5] = matrix[5] * scalar;\n result[6] = matrix[6] * scalar;\n result[7] = matrix[7] * scalar;\n result[8] = matrix[8] * scalar;\n result[9] = matrix[9] * scalar;\n result[10] = matrix[10] * scalar;\n result[11] = matrix[11] * scalar;\n result[12] = matrix[12] * scalar;\n result[13] = matrix[13] * scalar;\n result[14] = matrix[14] * scalar;\n result[15] = matrix[15] * scalar;\n return result;\n};\n\n/**\n * Computes a negated copy of the provided matrix.\n *\n * @param {Matrix4} matrix The matrix to negate.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n *\n * @example\n * //create a new Matrix4 instance which is a negation of a Matrix4\n * // m = [10.0, 11.0, 12.0, 13.0]\n * // [14.0, 15.0, 16.0, 17.0]\n * // [18.0, 19.0, 20.0, 21.0]\n * // [22.0, 23.0, 24.0, 25.0]\n *\n * const a = Cesium.Matrix4.negate(m, new Cesium.Matrix4());\n *\n * // m remains the same\n * // a = [-10.0, -11.0, -12.0, -13.0]\n * // [-14.0, -15.0, -16.0, -17.0]\n * // [-18.0, -19.0, -20.0, -21.0]\n * // [-22.0, -23.0, -24.0, -25.0]\n */\nMatrix4.negate = function (matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result[0] = -matrix[0];\n result[1] = -matrix[1];\n result[2] = -matrix[2];\n result[3] = -matrix[3];\n result[4] = -matrix[4];\n result[5] = -matrix[5];\n result[6] = -matrix[6];\n result[7] = -matrix[7];\n result[8] = -matrix[8];\n result[9] = -matrix[9];\n result[10] = -matrix[10];\n result[11] = -matrix[11];\n result[12] = -matrix[12];\n result[13] = -matrix[13];\n result[14] = -matrix[14];\n result[15] = -matrix[15];\n return result;\n};\n\n/**\n * Computes the transpose of the provided matrix.\n *\n * @param {Matrix4} matrix The matrix to transpose.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n *\n * @example\n * //returns transpose of a Matrix4\n * // m = [10.0, 11.0, 12.0, 13.0]\n * // [14.0, 15.0, 16.0, 17.0]\n * // [18.0, 19.0, 20.0, 21.0]\n * // [22.0, 23.0, 24.0, 25.0]\n *\n * const a = Cesium.Matrix4.transpose(m, new Cesium.Matrix4());\n *\n * // m remains the same\n * // a = [10.0, 14.0, 18.0, 22.0]\n * // [11.0, 15.0, 19.0, 23.0]\n * // [12.0, 16.0, 20.0, 24.0]\n * // [13.0, 17.0, 21.0, 25.0]\n */\nMatrix4.transpose = function (matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const matrix1 = matrix[1];\n const matrix2 = matrix[2];\n const matrix3 = matrix[3];\n const matrix6 = matrix[6];\n const matrix7 = matrix[7];\n const matrix11 = matrix[11];\n\n result[0] = matrix[0];\n result[1] = matrix[4];\n result[2] = matrix[8];\n result[3] = matrix[12];\n result[4] = matrix1;\n result[5] = matrix[5];\n result[6] = matrix[9];\n result[7] = matrix[13];\n result[8] = matrix2;\n result[9] = matrix6;\n result[10] = matrix[10];\n result[11] = matrix[14];\n result[12] = matrix3;\n result[13] = matrix7;\n result[14] = matrix11;\n result[15] = matrix[15];\n return result;\n};\n\n/**\n * Computes a matrix, which contains the absolute (unsigned) values of the provided matrix's elements.\n *\n * @param {Matrix4} matrix The matrix with signed elements.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n */\nMatrix4.abs = function (matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result[0] = Math.abs(matrix[0]);\n result[1] = Math.abs(matrix[1]);\n result[2] = Math.abs(matrix[2]);\n result[3] = Math.abs(matrix[3]);\n result[4] = Math.abs(matrix[4]);\n result[5] = Math.abs(matrix[5]);\n result[6] = Math.abs(matrix[6]);\n result[7] = Math.abs(matrix[7]);\n result[8] = Math.abs(matrix[8]);\n result[9] = Math.abs(matrix[9]);\n result[10] = Math.abs(matrix[10]);\n result[11] = Math.abs(matrix[11]);\n result[12] = Math.abs(matrix[12]);\n result[13] = Math.abs(matrix[13]);\n result[14] = Math.abs(matrix[14]);\n result[15] = Math.abs(matrix[15]);\n\n return result;\n};\n\n/**\n * Compares the provided matrices componentwise and returns\n * true if they are equal, false otherwise.\n *\n * @param {Matrix4} [left] The first matrix.\n * @param {Matrix4} [right] The second matrix.\n * @returns {boolean} true if left and right are equal, false otherwise.\n *\n * @example\n * //compares two Matrix4 instances\n *\n * // a = [10.0, 14.0, 18.0, 22.0]\n * // [11.0, 15.0, 19.0, 23.0]\n * // [12.0, 16.0, 20.0, 24.0]\n * // [13.0, 17.0, 21.0, 25.0]\n *\n * // b = [10.0, 14.0, 18.0, 22.0]\n * // [11.0, 15.0, 19.0, 23.0]\n * // [12.0, 16.0, 20.0, 24.0]\n * // [13.0, 17.0, 21.0, 25.0]\n *\n * if(Cesium.Matrix4.equals(a,b)) {\n * console.log(\"Both matrices are equal\");\n * } else {\n * console.log(\"They are not equal\");\n * }\n *\n * //Prints \"Both matrices are equal\" on the console\n */\nMatrix4.equals = function (left, right) {\n // Given that most matrices will be transformation matrices, the elements\n // are tested in order such that the test is likely to fail as early\n // as possible. I _think_ this is just as friendly to the L1 cache\n // as testing in index order. It is certainty faster in practice.\n return (\n left === right ||\n (defined(left) &&\n defined(right) &&\n // Translation\n left[12] === right[12] &&\n left[13] === right[13] &&\n left[14] === right[14] &&\n // Rotation/scale\n left[0] === right[0] &&\n left[1] === right[1] &&\n left[2] === right[2] &&\n left[4] === right[4] &&\n left[5] === right[5] &&\n left[6] === right[6] &&\n left[8] === right[8] &&\n left[9] === right[9] &&\n left[10] === right[10] &&\n // Bottom row\n left[3] === right[3] &&\n left[7] === right[7] &&\n left[11] === right[11] &&\n left[15] === right[15])\n );\n};\n\n/**\n * Compares the provided matrices componentwise and returns\n * true if they are within the provided epsilon,\n * false otherwise.\n *\n * @param {Matrix4} [left] The first matrix.\n * @param {Matrix4} [right] The second matrix.\n * @param {number} [epsilon=0] The epsilon to use for equality testing.\n * @returns {boolean} true if left and right are within the provided epsilon, false otherwise.\n *\n * @example\n * //compares two Matrix4 instances\n *\n * // a = [10.5, 14.5, 18.5, 22.5]\n * // [11.5, 15.5, 19.5, 23.5]\n * // [12.5, 16.5, 20.5, 24.5]\n * // [13.5, 17.5, 21.5, 25.5]\n *\n * // b = [10.0, 14.0, 18.0, 22.0]\n * // [11.0, 15.0, 19.0, 23.0]\n * // [12.0, 16.0, 20.0, 24.0]\n * // [13.0, 17.0, 21.0, 25.0]\n *\n * if(Cesium.Matrix4.equalsEpsilon(a,b,0.1)){\n * console.log(\"Difference between both the matrices is less than 0.1\");\n * } else {\n * console.log(\"Difference between both the matrices is not less than 0.1\");\n * }\n *\n * //Prints \"Difference between both the matrices is not less than 0.1\" on the console\n */\nMatrix4.equalsEpsilon = function (left, right, epsilon) {\n epsilon = defaultValue(epsilon, 0);\n\n return (\n left === right ||\n (defined(left) &&\n defined(right) &&\n Math.abs(left[0] - right[0]) <= epsilon &&\n Math.abs(left[1] - right[1]) <= epsilon &&\n Math.abs(left[2] - right[2]) <= epsilon &&\n Math.abs(left[3] - right[3]) <= epsilon &&\n Math.abs(left[4] - right[4]) <= epsilon &&\n Math.abs(left[5] - right[5]) <= epsilon &&\n Math.abs(left[6] - right[6]) <= epsilon &&\n Math.abs(left[7] - right[7]) <= epsilon &&\n Math.abs(left[8] - right[8]) <= epsilon &&\n Math.abs(left[9] - right[9]) <= epsilon &&\n Math.abs(left[10] - right[10]) <= epsilon &&\n Math.abs(left[11] - right[11]) <= epsilon &&\n Math.abs(left[12] - right[12]) <= epsilon &&\n Math.abs(left[13] - right[13]) <= epsilon &&\n Math.abs(left[14] - right[14]) <= epsilon &&\n Math.abs(left[15] - right[15]) <= epsilon)\n );\n};\n\n/**\n * Gets the translation portion of the provided matrix, assuming the matrix is an affine transformation matrix.\n *\n * @param {Matrix4} matrix The matrix to use.\n * @param {Cartesian3} result The object onto which to store the result.\n * @returns {Cartesian3} The modified result parameter.\n */\nMatrix4.getTranslation = function (matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result.x = matrix[12];\n result.y = matrix[13];\n result.z = matrix[14];\n return result;\n};\n\n/**\n * Gets the upper left 3x3 matrix of the provided matrix.\n *\n * @param {Matrix4} matrix The matrix to use.\n * @param {Matrix3} result The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter.\n *\n * @example\n * // returns a Matrix3 instance from a Matrix4 instance\n *\n * // m = [10.0, 14.0, 18.0, 22.0]\n * // [11.0, 15.0, 19.0, 23.0]\n * // [12.0, 16.0, 20.0, 24.0]\n * // [13.0, 17.0, 21.0, 25.0]\n *\n * const b = new Cesium.Matrix3();\n * Cesium.Matrix4.getMatrix3(m,b);\n *\n * // b = [10.0, 14.0, 18.0]\n * // [11.0, 15.0, 19.0]\n * // [12.0, 16.0, 20.0]\n */\nMatrix4.getMatrix3 = function (matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result[0] = matrix[0];\n result[1] = matrix[1];\n result[2] = matrix[2];\n result[3] = matrix[4];\n result[4] = matrix[5];\n result[5] = matrix[6];\n result[6] = matrix[8];\n result[7] = matrix[9];\n result[8] = matrix[10];\n return result;\n};\n\nconst scratchInverseRotation = new Matrix3();\nconst scratchMatrix3Zero = new Matrix3();\nconst scratchBottomRow = new Cartesian4();\nconst scratchExpectedBottomRow = new Cartesian4(0.0, 0.0, 0.0, 1.0);\n\n/**\n * Computes the inverse of the provided matrix using Cramers Rule.\n * If the determinant is zero, the matrix can not be inverted, and an exception is thrown.\n * If the matrix is a proper rigid transformation, it is more efficient\n * to invert it with {@link Matrix4.inverseTransformation}.\n *\n * @param {Matrix4} matrix The matrix to invert.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n *\n * @exception {RuntimeError} matrix is not invertible because its determinate is zero.\n */\nMatrix4.inverse = function (matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n //\n // Ported from:\n // ftp://download.intel.com/design/PentiumIII/sml/24504301.pdf\n //\n const src0 = matrix[0];\n const src1 = matrix[4];\n const src2 = matrix[8];\n const src3 = matrix[12];\n const src4 = matrix[1];\n const src5 = matrix[5];\n const src6 = matrix[9];\n const src7 = matrix[13];\n const src8 = matrix[2];\n const src9 = matrix[6];\n const src10 = matrix[10];\n const src11 = matrix[14];\n const src12 = matrix[3];\n const src13 = matrix[7];\n const src14 = matrix[11];\n const src15 = matrix[15];\n\n // calculate pairs for first 8 elements (cofactors)\n let tmp0 = src10 * src15;\n let tmp1 = src11 * src14;\n let tmp2 = src9 * src15;\n let tmp3 = src11 * src13;\n let tmp4 = src9 * src14;\n let tmp5 = src10 * src13;\n let tmp6 = src8 * src15;\n let tmp7 = src11 * src12;\n let tmp8 = src8 * src14;\n let tmp9 = src10 * src12;\n let tmp10 = src8 * src13;\n let tmp11 = src9 * src12;\n\n // calculate first 8 elements (cofactors)\n const dst0 =\n tmp0 * src5 +\n tmp3 * src6 +\n tmp4 * src7 -\n (tmp1 * src5 + tmp2 * src6 + tmp5 * src7);\n const dst1 =\n tmp1 * src4 +\n tmp6 * src6 +\n tmp9 * src7 -\n (tmp0 * src4 + tmp7 * src6 + tmp8 * src7);\n const dst2 =\n tmp2 * src4 +\n tmp7 * src5 +\n tmp10 * src7 -\n (tmp3 * src4 + tmp6 * src5 + tmp11 * src7);\n const dst3 =\n tmp5 * src4 +\n tmp8 * src5 +\n tmp11 * src6 -\n (tmp4 * src4 + tmp9 * src5 + tmp10 * src6);\n const dst4 =\n tmp1 * src1 +\n tmp2 * src2 +\n tmp5 * src3 -\n (tmp0 * src1 + tmp3 * src2 + tmp4 * src3);\n const dst5 =\n tmp0 * src0 +\n tmp7 * src2 +\n tmp8 * src3 -\n (tmp1 * src0 + tmp6 * src2 + tmp9 * src3);\n const dst6 =\n tmp3 * src0 +\n tmp6 * src1 +\n tmp11 * src3 -\n (tmp2 * src0 + tmp7 * src1 + tmp10 * src3);\n const dst7 =\n tmp4 * src0 +\n tmp9 * src1 +\n tmp10 * src2 -\n (tmp5 * src0 + tmp8 * src1 + tmp11 * src2);\n\n // calculate pairs for second 8 elements (cofactors)\n tmp0 = src2 * src7;\n tmp1 = src3 * src6;\n tmp2 = src1 * src7;\n tmp3 = src3 * src5;\n tmp4 = src1 * src6;\n tmp5 = src2 * src5;\n tmp6 = src0 * src7;\n tmp7 = src3 * src4;\n tmp8 = src0 * src6;\n tmp9 = src2 * src4;\n tmp10 = src0 * src5;\n tmp11 = src1 * src4;\n\n // calculate second 8 elements (cofactors)\n const dst8 =\n tmp0 * src13 +\n tmp3 * src14 +\n tmp4 * src15 -\n (tmp1 * src13 + tmp2 * src14 + tmp5 * src15);\n const dst9 =\n tmp1 * src12 +\n tmp6 * src14 +\n tmp9 * src15 -\n (tmp0 * src12 + tmp7 * src14 + tmp8 * src15);\n const dst10 =\n tmp2 * src12 +\n tmp7 * src13 +\n tmp10 * src15 -\n (tmp3 * src12 + tmp6 * src13 + tmp11 * src15);\n const dst11 =\n tmp5 * src12 +\n tmp8 * src13 +\n tmp11 * src14 -\n (tmp4 * src12 + tmp9 * src13 + tmp10 * src14);\n const dst12 =\n tmp2 * src10 +\n tmp5 * src11 +\n tmp1 * src9 -\n (tmp4 * src11 + tmp0 * src9 + tmp3 * src10);\n const dst13 =\n tmp8 * src11 +\n tmp0 * src8 +\n tmp7 * src10 -\n (tmp6 * src10 + tmp9 * src11 + tmp1 * src8);\n const dst14 =\n tmp6 * src9 +\n tmp11 * src11 +\n tmp3 * src8 -\n (tmp10 * src11 + tmp2 * src8 + tmp7 * src9);\n const dst15 =\n tmp10 * src10 +\n tmp4 * src8 +\n tmp9 * src9 -\n (tmp8 * src9 + tmp11 * src10 + tmp5 * src8);\n\n // calculate determinant\n let det = src0 * dst0 + src1 * dst1 + src2 * dst2 + src3 * dst3;\n\n if (Math.abs(det) < CesiumMath.EPSILON21) {\n // Special case for a zero scale matrix that can occur, for example,\n // when a model's node has a [0, 0, 0] scale.\n if (\n Matrix3.equalsEpsilon(\n Matrix4.getMatrix3(matrix, scratchInverseRotation),\n scratchMatrix3Zero,\n CesiumMath.EPSILON7,\n ) &&\n Cartesian4.equals(\n Matrix4.getRow(matrix, 3, scratchBottomRow),\n scratchExpectedBottomRow,\n )\n ) {\n result[0] = 0.0;\n result[1] = 0.0;\n result[2] = 0.0;\n result[3] = 0.0;\n result[4] = 0.0;\n result[5] = 0.0;\n result[6] = 0.0;\n result[7] = 0.0;\n result[8] = 0.0;\n result[9] = 0.0;\n result[10] = 0.0;\n result[11] = 0.0;\n result[12] = -matrix[12];\n result[13] = -matrix[13];\n result[14] = -matrix[14];\n result[15] = 1.0;\n return result;\n }\n\n throw new RuntimeError(\n \"matrix is not invertible because its determinate is zero.\",\n );\n }\n\n // calculate matrix inverse\n det = 1.0 / det;\n\n result[0] = dst0 * det;\n result[1] = dst1 * det;\n result[2] = dst2 * det;\n result[3] = dst3 * det;\n result[4] = dst4 * det;\n result[5] = dst5 * det;\n result[6] = dst6 * det;\n result[7] = dst7 * det;\n result[8] = dst8 * det;\n result[9] = dst9 * det;\n result[10] = dst10 * det;\n result[11] = dst11 * det;\n result[12] = dst12 * det;\n result[13] = dst13 * det;\n result[14] = dst14 * det;\n result[15] = dst15 * det;\n return result;\n};\n\n/**\n * Computes the inverse of the provided matrix assuming it is a proper rigid matrix,\n * where the upper left 3x3 elements are a rotation matrix,\n * and the upper three elements in the fourth column are the translation.\n * The bottom row is assumed to be [0, 0, 0, 1].\n * The matrix is not verified to be in the proper form.\n * This method is faster than computing the inverse for a general 4x4\n * matrix using {@link Matrix4.inverse}.\n *\n * @param {Matrix4} matrix The matrix to invert.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n */\nMatrix4.inverseTransformation = function (matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n //This function is an optimized version of the below 4 lines.\n //const rT = Matrix3.transpose(Matrix4.getMatrix3(matrix));\n //const rTN = Matrix3.negate(rT);\n //const rTT = Matrix3.multiplyByVector(rTN, Matrix4.getTranslation(matrix));\n //return Matrix4.fromRotationTranslation(rT, rTT, result);\n\n const matrix0 = matrix[0];\n const matrix1 = matrix[1];\n const matrix2 = matrix[2];\n const matrix4 = matrix[4];\n const matrix5 = matrix[5];\n const matrix6 = matrix[6];\n const matrix8 = matrix[8];\n const matrix9 = matrix[9];\n const matrix10 = matrix[10];\n\n const vX = matrix[12];\n const vY = matrix[13];\n const vZ = matrix[14];\n\n const x = -matrix0 * vX - matrix1 * vY - matrix2 * vZ;\n const y = -matrix4 * vX - matrix5 * vY - matrix6 * vZ;\n const z = -matrix8 * vX - matrix9 * vY - matrix10 * vZ;\n\n result[0] = matrix0;\n result[1] = matrix4;\n result[2] = matrix8;\n result[3] = 0.0;\n result[4] = matrix1;\n result[5] = matrix5;\n result[6] = matrix9;\n result[7] = 0.0;\n result[8] = matrix2;\n result[9] = matrix6;\n result[10] = matrix10;\n result[11] = 0.0;\n result[12] = x;\n result[13] = y;\n result[14] = z;\n result[15] = 1.0;\n return result;\n};\n\nconst scratchTransposeMatrix = new Matrix4();\n\n/**\n * Computes the inverse transpose of a matrix.\n *\n * @param {Matrix4} matrix The matrix to transpose and invert.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n */\nMatrix4.inverseTranspose = function (matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n return Matrix4.inverse(\n Matrix4.transpose(matrix, scratchTransposeMatrix),\n result,\n );\n};\n\n/**\n * An immutable Matrix4 instance initialized to the identity matrix.\n *\n * @type {Matrix4}\n * @constant\n */\nMatrix4.IDENTITY = Object.freeze(\n new Matrix4(\n 1.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 1.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 1.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 1.0,\n ),\n);\n\n/**\n * An immutable Matrix4 instance initialized to the zero matrix.\n *\n * @type {Matrix4}\n * @constant\n */\nMatrix4.ZERO = Object.freeze(\n new Matrix4(\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n ),\n);\n\n/**\n * The index into Matrix4 for column 0, row 0.\n *\n * @type {number}\n * @constant\n */\nMatrix4.COLUMN0ROW0 = 0;\n\n/**\n * The index into Matrix4 for column 0, row 1.\n *\n * @type {number}\n * @constant\n */\nMatrix4.COLUMN0ROW1 = 1;\n\n/**\n * The index into Matrix4 for column 0, row 2.\n *\n * @type {number}\n * @constant\n */\nMatrix4.COLUMN0ROW2 = 2;\n\n/**\n * The index into Matrix4 for column 0, row 3.\n *\n * @type {number}\n * @constant\n */\nMatrix4.COLUMN0ROW3 = 3;\n\n/**\n * The index into Matrix4 for column 1, row 0.\n *\n * @type {number}\n * @constant\n */\nMatrix4.COLUMN1ROW0 = 4;\n\n/**\n * The index into Matrix4 for column 1, row 1.\n *\n * @type {number}\n * @constant\n */\nMatrix4.COLUMN1ROW1 = 5;\n\n/**\n * The index into Matrix4 for column 1, row 2.\n *\n * @type {number}\n * @constant\n */\nMatrix4.COLUMN1ROW2 = 6;\n\n/**\n * The index into Matrix4 for column 1, row 3.\n *\n * @type {number}\n * @constant\n */\nMatrix4.COLUMN1ROW3 = 7;\n\n/**\n * The index into Matrix4 for column 2, row 0.\n *\n * @type {number}\n * @constant\n */\nMatrix4.COLUMN2ROW0 = 8;\n\n/**\n * The index into Matrix4 for column 2, row 1.\n *\n * @type {number}\n * @constant\n */\nMatrix4.COLUMN2ROW1 = 9;\n\n/**\n * The index into Matrix4 for column 2, row 2.\n *\n * @type {number}\n * @constant\n */\nMatrix4.COLUMN2ROW2 = 10;\n\n/**\n * The index into Matrix4 for column 2, row 3.\n *\n * @type {number}\n * @constant\n */\nMatrix4.COLUMN2ROW3 = 11;\n\n/**\n * The index into Matrix4 for column 3, row 0.\n *\n * @type {number}\n * @constant\n */\nMatrix4.COLUMN3ROW0 = 12;\n\n/**\n * The index into Matrix4 for column 3, row 1.\n *\n * @type {number}\n * @constant\n */\nMatrix4.COLUMN3ROW1 = 13;\n\n/**\n * The index into Matrix4 for column 3, row 2.\n *\n * @type {number}\n * @constant\n */\nMatrix4.COLUMN3ROW2 = 14;\n\n/**\n * The index into Matrix4 for column 3, row 3.\n *\n * @type {number}\n * @constant\n */\nMatrix4.COLUMN3ROW3 = 15;\n\nObject.defineProperties(Matrix4.prototype, {\n /**\n * Gets the number of items in the collection.\n * @memberof Matrix4.prototype\n *\n * @type {number}\n */\n length: {\n get: function () {\n return Matrix4.packedLength;\n },\n },\n});\n\n/**\n * Duplicates the provided Matrix4 instance.\n *\n * @param {Matrix4} [result] The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter or a new Matrix4 instance if one was not provided.\n */\nMatrix4.prototype.clone = function (result) {\n return Matrix4.clone(this, result);\n};\n\n/**\n * Compares this matrix to the provided matrix componentwise and returns\n * true if they are equal, false otherwise.\n *\n * @param {Matrix4} [right] The right hand side matrix.\n * @returns {boolean} true if they are equal, false otherwise.\n */\nMatrix4.prototype.equals = function (right) {\n return Matrix4.equals(this, right);\n};\n\n/**\n * @private\n */\nMatrix4.equalsArray = function (matrix, array, offset) {\n return (\n matrix[0] === array[offset] &&\n matrix[1] === array[offset + 1] &&\n matrix[2] === array[offset + 2] &&\n matrix[3] === array[offset + 3] &&\n matrix[4] === array[offset + 4] &&\n matrix[5] === array[offset + 5] &&\n matrix[6] === array[offset + 6] &&\n matrix[7] === array[offset + 7] &&\n matrix[8] === array[offset + 8] &&\n matrix[9] === array[offset + 9] &&\n matrix[10] === array[offset + 10] &&\n matrix[11] === array[offset + 11] &&\n matrix[12] === array[offset + 12] &&\n matrix[13] === array[offset + 13] &&\n matrix[14] === array[offset + 14] &&\n matrix[15] === array[offset + 15]\n );\n};\n\n/**\n * Compares this matrix to the provided matrix componentwise and returns\n * true if they are within the provided epsilon,\n * false otherwise.\n *\n * @param {Matrix4} [right] The right hand side matrix.\n * @param {number} [epsilon=0] The epsilon to use for equality testing.\n * @returns {boolean} true if they are within the provided epsilon, false otherwise.\n */\nMatrix4.prototype.equalsEpsilon = function (right, epsilon) {\n return Matrix4.equalsEpsilon(this, right, epsilon);\n};\n\n/**\n * Computes a string representing this Matrix with each row being\n * on a separate line and in the format '(column0, column1, column2, column3)'.\n *\n * @returns {string} A string representing the provided Matrix with each row being on a separate line and in the format '(column0, column1, column2, column3)'.\n */\nMatrix4.prototype.toString = function () {\n return (\n `(${this[0]}, ${this[4]}, ${this[8]}, ${this[12]})\\n` +\n `(${this[1]}, ${this[5]}, ${this[9]}, ${this[13]})\\n` +\n `(${this[2]}, ${this[6]}, ${this[10]}, ${this[14]})\\n` +\n `(${this[3]}, ${this[7]}, ${this[11]}, ${this[15]})`\n );\n};\nexport default Matrix4;\n","import Check from \"./Check.js\";\nimport defaultValue from \"./defaultValue.js\";\nimport defined from \"./defined.js\";\nimport DeveloperError from \"./DeveloperError.js\";\nimport CesiumMath from \"./Math.js\";\n\n/**\n * A 4D Cartesian point.\n * @alias Cartesian4\n * @constructor\n *\n * @param {number} [x=0.0] The X component.\n * @param {number} [y=0.0] The Y component.\n * @param {number} [z=0.0] The Z component.\n * @param {number} [w=0.0] The W component.\n *\n * @see Cartesian2\n * @see Cartesian3\n * @see Packable\n */\nfunction Cartesian4(x, y, z, w) {\n /**\n * The X component.\n * @type {number}\n * @default 0.0\n */\n this.x = defaultValue(x, 0.0);\n\n /**\n * The Y component.\n * @type {number}\n * @default 0.0\n */\n this.y = defaultValue(y, 0.0);\n\n /**\n * The Z component.\n * @type {number}\n * @default 0.0\n */\n this.z = defaultValue(z, 0.0);\n\n /**\n * The W component.\n * @type {number}\n * @default 0.0\n */\n this.w = defaultValue(w, 0.0);\n}\n\n/**\n * Creates a Cartesian4 instance from x, y, z and w coordinates.\n *\n * @param {number} x The x coordinate.\n * @param {number} y The y coordinate.\n * @param {number} z The z coordinate.\n * @param {number} w The w coordinate.\n * @param {Cartesian4} [result] The object onto which to store the result.\n * @returns {Cartesian4} The modified result parameter or a new Cartesian4 instance if one was not provided.\n */\nCartesian4.fromElements = function (x, y, z, w, result) {\n if (!defined(result)) {\n return new Cartesian4(x, y, z, w);\n }\n\n result.x = x;\n result.y = y;\n result.z = z;\n result.w = w;\n return result;\n};\n\n/**\n * Creates a Cartesian4 instance from a {@link Color}. red, green, blue,\n * and alpha map to x, y, z, and w, respectively.\n *\n * @param {Color} color The source color.\n * @param {Cartesian4} [result] The object onto which to store the result.\n * @returns {Cartesian4} The modified result parameter or a new Cartesian4 instance if one was not provided.\n */\nCartesian4.fromColor = function (color, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"color\", color);\n //>>includeEnd('debug');\n if (!defined(result)) {\n return new Cartesian4(color.red, color.green, color.blue, color.alpha);\n }\n\n result.x = color.red;\n result.y = color.green;\n result.z = color.blue;\n result.w = color.alpha;\n return result;\n};\n\n/**\n * Duplicates a Cartesian4 instance.\n *\n * @param {Cartesian4} cartesian The Cartesian to duplicate.\n * @param {Cartesian4} [result] The object onto which to store the result.\n * @returns {Cartesian4} The modified result parameter or a new Cartesian4 instance if one was not provided. (Returns undefined if cartesian is undefined)\n */\nCartesian4.clone = function (cartesian, result) {\n if (!defined(cartesian)) {\n return undefined;\n }\n\n if (!defined(result)) {\n return new Cartesian4(cartesian.x, cartesian.y, cartesian.z, cartesian.w);\n }\n\n result.x = cartesian.x;\n result.y = cartesian.y;\n result.z = cartesian.z;\n result.w = cartesian.w;\n return result;\n};\n\n/**\n * The number of elements used to pack the object into an array.\n * @type {number}\n */\nCartesian4.packedLength = 4;\n\n/**\n * Stores the provided instance into the provided array.\n *\n * @param {Cartesian4} value The value to pack.\n * @param {number[]} array The array to pack into.\n * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.\n *\n * @returns {number[]} The array that was packed into\n */\nCartesian4.pack = function (value, array, startingIndex) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"value\", value);\n Check.defined(\"array\", array);\n //>>includeEnd('debug');\n\n startingIndex = defaultValue(startingIndex, 0);\n\n array[startingIndex++] = value.x;\n array[startingIndex++] = value.y;\n array[startingIndex++] = value.z;\n array[startingIndex] = value.w;\n\n return array;\n};\n\n/**\n * Retrieves an instance from a packed array.\n *\n * @param {number[]} array The packed array.\n * @param {number} [startingIndex=0] The starting index of the element to be unpacked.\n * @param {Cartesian4} [result] The object into which to store the result.\n * @returns {Cartesian4} The modified result parameter or a new Cartesian4 instance if one was not provided.\n */\nCartesian4.unpack = function (array, startingIndex, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.defined(\"array\", array);\n //>>includeEnd('debug');\n\n startingIndex = defaultValue(startingIndex, 0);\n\n if (!defined(result)) {\n result = new Cartesian4();\n }\n result.x = array[startingIndex++];\n result.y = array[startingIndex++];\n result.z = array[startingIndex++];\n result.w = array[startingIndex];\n return result;\n};\n\n/**\n * Flattens an array of Cartesian4s into an array of components.\n *\n * @param {Cartesian4[]} array The array of cartesians to pack.\n * @param {number[]} [result] The array onto which to store the result. If this is a typed array, it must have array.length * 4 components, else a {@link DeveloperError} will be thrown. If it is a regular array, it will be resized to have (array.length * 4) elements.\n * @returns {number[]} The packed array.\n */\nCartesian4.packArray = function (array, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.defined(\"array\", array);\n //>>includeEnd('debug');\n\n const length = array.length;\n const resultLength = length * 4;\n if (!defined(result)) {\n result = new Array(resultLength);\n } else if (!Array.isArray(result) && result.length !== resultLength) {\n //>>includeStart('debug', pragmas.debug);\n throw new DeveloperError(\n \"If result is a typed array, it must have exactly array.length * 4 elements\",\n );\n //>>includeEnd('debug');\n } else if (result.length !== resultLength) {\n result.length = resultLength;\n }\n\n for (let i = 0; i < length; ++i) {\n Cartesian4.pack(array[i], result, i * 4);\n }\n return result;\n};\n\n/**\n * Unpacks an array of cartesian components into an array of Cartesian4s.\n *\n * @param {number[]} array The array of components to unpack.\n * @param {Cartesian4[]} [result] The array onto which to store the result.\n * @returns {Cartesian4[]} The unpacked array.\n */\nCartesian4.unpackArray = function (array, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.defined(\"array\", array);\n Check.typeOf.number.greaterThanOrEquals(\"array.length\", array.length, 4);\n if (array.length % 4 !== 0) {\n throw new DeveloperError(\"array length must be a multiple of 4.\");\n }\n //>>includeEnd('debug');\n\n const length = array.length;\n if (!defined(result)) {\n result = new Array(length / 4);\n } else {\n result.length = length / 4;\n }\n\n for (let i = 0; i < length; i += 4) {\n const index = i / 4;\n result[index] = Cartesian4.unpack(array, i, result[index]);\n }\n return result;\n};\n\n/**\n * Creates a Cartesian4 from four consecutive elements in an array.\n * @function\n *\n * @param {number[]} array The array whose four consecutive elements correspond to the x, y, z, and w components, respectively.\n * @param {number} [startingIndex=0] The offset into the array of the first element, which corresponds to the x component.\n * @param {Cartesian4} [result] The object onto which to store the result.\n * @returns {Cartesian4} The modified result parameter or a new Cartesian4 instance if one was not provided.\n *\n * @example\n * // Create a Cartesian4 with (1.0, 2.0, 3.0, 4.0)\n * const v = [1.0, 2.0, 3.0, 4.0];\n * const p = Cesium.Cartesian4.fromArray(v);\n *\n * // Create a Cartesian4 with (1.0, 2.0, 3.0, 4.0) using an offset into an array\n * const v2 = [0.0, 0.0, 1.0, 2.0, 3.0, 4.0];\n * const p2 = Cesium.Cartesian4.fromArray(v2, 2);\n */\nCartesian4.fromArray = Cartesian4.unpack;\n\n/**\n * Computes the value of the maximum component for the supplied Cartesian.\n *\n * @param {Cartesian4} cartesian The cartesian to use.\n * @returns {number} The value of the maximum component.\n */\nCartesian4.maximumComponent = function (cartesian) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"cartesian\", cartesian);\n //>>includeEnd('debug');\n\n return Math.max(cartesian.x, cartesian.y, cartesian.z, cartesian.w);\n};\n\n/**\n * Computes the value of the minimum component for the supplied Cartesian.\n *\n * @param {Cartesian4} cartesian The cartesian to use.\n * @returns {number} The value of the minimum component.\n */\nCartesian4.minimumComponent = function (cartesian) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"cartesian\", cartesian);\n //>>includeEnd('debug');\n\n return Math.min(cartesian.x, cartesian.y, cartesian.z, cartesian.w);\n};\n\n/**\n * Compares two Cartesians and computes a Cartesian which contains the minimum components of the supplied Cartesians.\n *\n * @param {Cartesian4} first A cartesian to compare.\n * @param {Cartesian4} second A cartesian to compare.\n * @param {Cartesian4} result The object into which to store the result.\n * @returns {Cartesian4} A cartesian with the minimum components.\n */\nCartesian4.minimumByComponent = function (first, second, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"first\", first);\n Check.typeOf.object(\"second\", second);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result.x = Math.min(first.x, second.x);\n result.y = Math.min(first.y, second.y);\n result.z = Math.min(first.z, second.z);\n result.w = Math.min(first.w, second.w);\n\n return result;\n};\n\n/**\n * Compares two Cartesians and computes a Cartesian which contains the maximum components of the supplied Cartesians.\n *\n * @param {Cartesian4} first A cartesian to compare.\n * @param {Cartesian4} second A cartesian to compare.\n * @param {Cartesian4} result The object into which to store the result.\n * @returns {Cartesian4} A cartesian with the maximum components.\n */\nCartesian4.maximumByComponent = function (first, second, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"first\", first);\n Check.typeOf.object(\"second\", second);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result.x = Math.max(first.x, second.x);\n result.y = Math.max(first.y, second.y);\n result.z = Math.max(first.z, second.z);\n result.w = Math.max(first.w, second.w);\n\n return result;\n};\n\n/**\n * Constrain a value to lie between two values.\n *\n * @param {Cartesian4} value The value to clamp.\n * @param {Cartesian4} min The minimum bound.\n * @param {Cartesian4} max The maximum bound.\n * @param {Cartesian4} result The object into which to store the result.\n * @returns {Cartesian4} The clamped value such that min <= result <= max.\n */\nCartesian4.clamp = function (value, min, max, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"value\", value);\n Check.typeOf.object(\"min\", min);\n Check.typeOf.object(\"max\", max);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const x = CesiumMath.clamp(value.x, min.x, max.x);\n const y = CesiumMath.clamp(value.y, min.y, max.y);\n const z = CesiumMath.clamp(value.z, min.z, max.z);\n const w = CesiumMath.clamp(value.w, min.w, max.w);\n\n result.x = x;\n result.y = y;\n result.z = z;\n result.w = w;\n\n return result;\n};\n\n/**\n * Computes the provided Cartesian's squared magnitude.\n *\n * @param {Cartesian4} cartesian The Cartesian instance whose squared magnitude is to be computed.\n * @returns {number} The squared magnitude.\n */\nCartesian4.magnitudeSquared = function (cartesian) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"cartesian\", cartesian);\n //>>includeEnd('debug');\n\n return (\n cartesian.x * cartesian.x +\n cartesian.y * cartesian.y +\n cartesian.z * cartesian.z +\n cartesian.w * cartesian.w\n );\n};\n\n/**\n * Computes the Cartesian's magnitude (length).\n *\n * @param {Cartesian4} cartesian The Cartesian instance whose magnitude is to be computed.\n * @returns {number} The magnitude.\n */\nCartesian4.magnitude = function (cartesian) {\n return Math.sqrt(Cartesian4.magnitudeSquared(cartesian));\n};\n\nconst distanceScratch = new Cartesian4();\n\n/**\n * Computes the 4-space distance between two points.\n *\n * @param {Cartesian4} left The first point to compute the distance from.\n * @param {Cartesian4} right The second point to compute the distance to.\n * @returns {number} The distance between two points.\n *\n * @example\n * // Returns 1.0\n * const d = Cesium.Cartesian4.distance(\n * new Cesium.Cartesian4(1.0, 0.0, 0.0, 0.0),\n * new Cesium.Cartesian4(2.0, 0.0, 0.0, 0.0));\n */\nCartesian4.distance = function (left, right) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"left\", left);\n Check.typeOf.object(\"right\", right);\n //>>includeEnd('debug');\n\n Cartesian4.subtract(left, right, distanceScratch);\n return Cartesian4.magnitude(distanceScratch);\n};\n\n/**\n * Computes the squared distance between two points. Comparing squared distances\n * using this function is more efficient than comparing distances using {@link Cartesian4#distance}.\n *\n * @param {Cartesian4} left The first point to compute the distance from.\n * @param {Cartesian4} right The second point to compute the distance to.\n * @returns {number} The distance between two points.\n *\n * @example\n * // Returns 4.0, not 2.0\n * const d = Cesium.Cartesian4.distance(\n * new Cesium.Cartesian4(1.0, 0.0, 0.0, 0.0),\n * new Cesium.Cartesian4(3.0, 0.0, 0.0, 0.0));\n */\nCartesian4.distanceSquared = function (left, right) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"left\", left);\n Check.typeOf.object(\"right\", right);\n //>>includeEnd('debug');\n\n Cartesian4.subtract(left, right, distanceScratch);\n return Cartesian4.magnitudeSquared(distanceScratch);\n};\n\n/**\n * Computes the normalized form of the supplied Cartesian.\n *\n * @param {Cartesian4} cartesian The Cartesian to be normalized.\n * @param {Cartesian4} result The object onto which to store the result.\n * @returns {Cartesian4} The modified result parameter.\n */\nCartesian4.normalize = function (cartesian, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"cartesian\", cartesian);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const magnitude = Cartesian4.magnitude(cartesian);\n\n result.x = cartesian.x / magnitude;\n result.y = cartesian.y / magnitude;\n result.z = cartesian.z / magnitude;\n result.w = cartesian.w / magnitude;\n\n //>>includeStart('debug', pragmas.debug);\n if (\n isNaN(result.x) ||\n isNaN(result.y) ||\n isNaN(result.z) ||\n isNaN(result.w)\n ) {\n throw new DeveloperError(\"normalized result is not a number\");\n }\n //>>includeEnd('debug');\n\n return result;\n};\n\n/**\n * Computes the dot (scalar) product of two Cartesians.\n *\n * @param {Cartesian4} left The first Cartesian.\n * @param {Cartesian4} right The second Cartesian.\n * @returns {number} The dot product.\n */\nCartesian4.dot = function (left, right) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"left\", left);\n Check.typeOf.object(\"right\", right);\n //>>includeEnd('debug');\n\n return (\n left.x * right.x + left.y * right.y + left.z * right.z + left.w * right.w\n );\n};\n\n/**\n * Computes the componentwise product of two Cartesians.\n *\n * @param {Cartesian4} left The first Cartesian.\n * @param {Cartesian4} right The second Cartesian.\n * @param {Cartesian4} result The object onto which to store the result.\n * @returns {Cartesian4} The modified result parameter.\n */\nCartesian4.multiplyComponents = function (left, right, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"left\", left);\n Check.typeOf.object(\"right\", right);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result.x = left.x * right.x;\n result.y = left.y * right.y;\n result.z = left.z * right.z;\n result.w = left.w * right.w;\n return result;\n};\n\n/**\n * Computes the componentwise quotient of two Cartesians.\n *\n * @param {Cartesian4} left The first Cartesian.\n * @param {Cartesian4} right The second Cartesian.\n * @param {Cartesian4} result The object onto which to store the result.\n * @returns {Cartesian4} The modified result parameter.\n */\nCartesian4.divideComponents = function (left, right, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"left\", left);\n Check.typeOf.object(\"right\", right);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result.x = left.x / right.x;\n result.y = left.y / right.y;\n result.z = left.z / right.z;\n result.w = left.w / right.w;\n return result;\n};\n\n/**\n * Computes the componentwise sum of two Cartesians.\n *\n * @param {Cartesian4} left The first Cartesian.\n * @param {Cartesian4} right The second Cartesian.\n * @param {Cartesian4} result The object onto which to store the result.\n * @returns {Cartesian4} The modified result parameter.\n */\nCartesian4.add = function (left, right, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"left\", left);\n Check.typeOf.object(\"right\", right);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result.x = left.x + right.x;\n result.y = left.y + right.y;\n result.z = left.z + right.z;\n result.w = left.w + right.w;\n return result;\n};\n\n/**\n * Computes the componentwise difference of two Cartesians.\n *\n * @param {Cartesian4} left The first Cartesian.\n * @param {Cartesian4} right The second Cartesian.\n * @param {Cartesian4} result The object onto which to store the result.\n * @returns {Cartesian4} The modified result parameter.\n */\nCartesian4.subtract = function (left, right, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"left\", left);\n Check.typeOf.object(\"right\", right);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result.x = left.x - right.x;\n result.y = left.y - right.y;\n result.z = left.z - right.z;\n result.w = left.w - right.w;\n return result;\n};\n\n/**\n * Multiplies the provided Cartesian componentwise by the provided scalar.\n *\n * @param {Cartesian4} cartesian The Cartesian to be scaled.\n * @param {number} scalar The scalar to multiply with.\n * @param {Cartesian4} result The object onto which to store the result.\n * @returns {Cartesian4} The modified result parameter.\n */\nCartesian4.multiplyByScalar = function (cartesian, scalar, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"cartesian\", cartesian);\n Check.typeOf.number(\"scalar\", scalar);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result.x = cartesian.x * scalar;\n result.y = cartesian.y * scalar;\n result.z = cartesian.z * scalar;\n result.w = cartesian.w * scalar;\n return result;\n};\n\n/**\n * Divides the provided Cartesian componentwise by the provided scalar.\n *\n * @param {Cartesian4} cartesian The Cartesian to be divided.\n * @param {number} scalar The scalar to divide by.\n * @param {Cartesian4} result The object onto which to store the result.\n * @returns {Cartesian4} The modified result parameter.\n */\nCartesian4.divideByScalar = function (cartesian, scalar, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"cartesian\", cartesian);\n Check.typeOf.number(\"scalar\", scalar);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result.x = cartesian.x / scalar;\n result.y = cartesian.y / scalar;\n result.z = cartesian.z / scalar;\n result.w = cartesian.w / scalar;\n return result;\n};\n\n/**\n * Negates the provided Cartesian.\n *\n * @param {Cartesian4} cartesian The Cartesian to be negated.\n * @param {Cartesian4} result The object onto which to store the result.\n * @returns {Cartesian4} The modified result parameter.\n */\nCartesian4.negate = function (cartesian, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"cartesian\", cartesian);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result.x = -cartesian.x;\n result.y = -cartesian.y;\n result.z = -cartesian.z;\n result.w = -cartesian.w;\n return result;\n};\n\n/**\n * Computes the absolute value of the provided Cartesian.\n *\n * @param {Cartesian4} cartesian The Cartesian whose absolute value is to be computed.\n * @param {Cartesian4} result The object onto which to store the result.\n * @returns {Cartesian4} The modified result parameter.\n */\nCartesian4.abs = function (cartesian, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"cartesian\", cartesian);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result.x = Math.abs(cartesian.x);\n result.y = Math.abs(cartesian.y);\n result.z = Math.abs(cartesian.z);\n result.w = Math.abs(cartesian.w);\n return result;\n};\n\nconst lerpScratch = new Cartesian4();\n/**\n * Computes the linear interpolation or extrapolation at t using the provided cartesians.\n *\n * @param {Cartesian4} start The value corresponding to t at 0.0.\n * @param {Cartesian4}end The value corresponding to t at 1.0.\n * @param {number} t The point along t at which to interpolate.\n * @param {Cartesian4} result The object onto which to store the result.\n * @returns {Cartesian4} The modified result parameter.\n */\nCartesian4.lerp = function (start, end, t, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"start\", start);\n Check.typeOf.object(\"end\", end);\n Check.typeOf.number(\"t\", t);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n Cartesian4.multiplyByScalar(end, t, lerpScratch);\n result = Cartesian4.multiplyByScalar(start, 1.0 - t, result);\n return Cartesian4.add(lerpScratch, result, result);\n};\n\nconst mostOrthogonalAxisScratch = new Cartesian4();\n/**\n * Returns the axis that is most orthogonal to the provided Cartesian.\n *\n * @param {Cartesian4} cartesian The Cartesian on which to find the most orthogonal axis.\n * @param {Cartesian4} result The object onto which to store the result.\n * @returns {Cartesian4} The most orthogonal axis.\n */\nCartesian4.mostOrthogonalAxis = function (cartesian, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"cartesian\", cartesian);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const f = Cartesian4.normalize(cartesian, mostOrthogonalAxisScratch);\n Cartesian4.abs(f, f);\n\n if (f.x <= f.y) {\n if (f.x <= f.z) {\n if (f.x <= f.w) {\n result = Cartesian4.clone(Cartesian4.UNIT_X, result);\n } else {\n result = Cartesian4.clone(Cartesian4.UNIT_W, result);\n }\n } else if (f.z <= f.w) {\n result = Cartesian4.clone(Cartesian4.UNIT_Z, result);\n } else {\n result = Cartesian4.clone(Cartesian4.UNIT_W, result);\n }\n } else if (f.y <= f.z) {\n if (f.y <= f.w) {\n result = Cartesian4.clone(Cartesian4.UNIT_Y, result);\n } else {\n result = Cartesian4.clone(Cartesian4.UNIT_W, result);\n }\n } else if (f.z <= f.w) {\n result = Cartesian4.clone(Cartesian4.UNIT_Z, result);\n } else {\n result = Cartesian4.clone(Cartesian4.UNIT_W, result);\n }\n\n return result;\n};\n\n/**\n * Compares the provided Cartesians componentwise and returns\n * true if they are equal, false otherwise.\n *\n * @param {Cartesian4} [left] The first Cartesian.\n * @param {Cartesian4} [right] The second Cartesian.\n * @returns {boolean} true if left and right are equal, false otherwise.\n */\nCartesian4.equals = function (left, right) {\n return (\n left === right ||\n (defined(left) &&\n defined(right) &&\n left.x === right.x &&\n left.y === right.y &&\n left.z === right.z &&\n left.w === right.w)\n );\n};\n\n/**\n * @private\n */\nCartesian4.equalsArray = function (cartesian, array, offset) {\n return (\n cartesian.x === array[offset] &&\n cartesian.y === array[offset + 1] &&\n cartesian.z === array[offset + 2] &&\n cartesian.w === array[offset + 3]\n );\n};\n\n/**\n * Compares the provided Cartesians componentwise and returns\n * true if they pass an absolute or relative tolerance test,\n * false otherwise.\n *\n * @param {Cartesian4} [left] The first Cartesian.\n * @param {Cartesian4} [right] The second Cartesian.\n * @param {number} [relativeEpsilon=0] The relative epsilon tolerance to use for equality testing.\n * @param {number} [absoluteEpsilon=relativeEpsilon] The absolute epsilon tolerance to use for equality testing.\n * @returns {boolean} true if left and right are within the provided epsilon, false otherwise.\n */\nCartesian4.equalsEpsilon = function (\n left,\n right,\n relativeEpsilon,\n absoluteEpsilon,\n) {\n return (\n left === right ||\n (defined(left) &&\n defined(right) &&\n CesiumMath.equalsEpsilon(\n left.x,\n right.x,\n relativeEpsilon,\n absoluteEpsilon,\n ) &&\n CesiumMath.equalsEpsilon(\n left.y,\n right.y,\n relativeEpsilon,\n absoluteEpsilon,\n ) &&\n CesiumMath.equalsEpsilon(\n left.z,\n right.z,\n relativeEpsilon,\n absoluteEpsilon,\n ) &&\n CesiumMath.equalsEpsilon(\n left.w,\n right.w,\n relativeEpsilon,\n absoluteEpsilon,\n ))\n );\n};\n\n/**\n * An immutable Cartesian4 instance initialized to (0.0, 0.0, 0.0, 0.0).\n *\n * @type {Cartesian4}\n * @constant\n */\nCartesian4.ZERO = Object.freeze(new Cartesian4(0.0, 0.0, 0.0, 0.0));\n\n/**\n * An immutable Cartesian4 instance initialized to (1.0, 1.0, 1.0, 1.0).\n *\n * @type {Cartesian4}\n * @constant\n */\nCartesian4.ONE = Object.freeze(new Cartesian4(1.0, 1.0, 1.0, 1.0));\n\n/**\n * An immutable Cartesian4 instance initialized to (1.0, 0.0, 0.0, 0.0).\n *\n * @type {Cartesian4}\n * @constant\n */\nCartesian4.UNIT_X = Object.freeze(new Cartesian4(1.0, 0.0, 0.0, 0.0));\n\n/**\n * An immutable Cartesian4 instance initialized to (0.0, 1.0, 0.0, 0.0).\n *\n * @type {Cartesian4}\n * @constant\n */\nCartesian4.UNIT_Y = Object.freeze(new Cartesian4(0.0, 1.0, 0.0, 0.0));\n\n/**\n * An immutable Cartesian4 instance initialized to (0.0, 0.0, 1.0, 0.0).\n *\n * @type {Cartesian4}\n * @constant\n */\nCartesian4.UNIT_Z = Object.freeze(new Cartesian4(0.0, 0.0, 1.0, 0.0));\n\n/**\n * An immutable Cartesian4 instance initialized to (0.0, 0.0, 0.0, 1.0).\n *\n * @type {Cartesian4}\n * @constant\n */\nCartesian4.UNIT_W = Object.freeze(new Cartesian4(0.0, 0.0, 0.0, 1.0));\n\n/**\n * Duplicates this Cartesian4 instance.\n *\n * @param {Cartesian4} [result] The object onto which to store the result.\n * @returns {Cartesian4} The modified result parameter or a new Cartesian4 instance if one was not provided.\n */\nCartesian4.prototype.clone = function (result) {\n return Cartesian4.clone(this, result);\n};\n\n/**\n * Compares this Cartesian against the provided Cartesian componentwise and returns\n * true if they are equal, false otherwise.\n *\n * @param {Cartesian4} [right] The right hand side Cartesian.\n * @returns {boolean} true if they are equal, false otherwise.\n */\nCartesian4.prototype.equals = function (right) {\n return Cartesian4.equals(this, right);\n};\n\n/**\n * Compares this Cartesian against the provided Cartesian componentwise and returns\n * true if they pass an absolute or relative tolerance test,\n * false otherwise.\n *\n * @param {Cartesian4} [right] The right hand side Cartesian.\n * @param {number} [relativeEpsilon=0] The relative epsilon tolerance to use for equality testing.\n * @param {number} [absoluteEpsilon=relativeEpsilon] The absolute epsilon tolerance to use for equality testing.\n * @returns {boolean} true if they are within the provided epsilon, false otherwise.\n */\nCartesian4.prototype.equalsEpsilon = function (\n right,\n relativeEpsilon,\n absoluteEpsilon,\n) {\n return Cartesian4.equalsEpsilon(\n this,\n right,\n relativeEpsilon,\n absoluteEpsilon,\n );\n};\n\n/**\n * Creates a string representing this Cartesian in the format '(x, y, z, w)'.\n *\n * @returns {string} A string representing the provided Cartesian in the format '(x, y, z, w)'.\n */\nCartesian4.prototype.toString = function () {\n return `(${this.x}, ${this.y}, ${this.z}, ${this.w})`;\n};\n\n// scratchU8Array and scratchF32Array are views into the same buffer\nconst scratchF32Array = new Float32Array(1);\nconst scratchU8Array = new Uint8Array(scratchF32Array.buffer);\n\nconst testU32 = new Uint32Array([0x11223344]);\nconst testU8 = new Uint8Array(testU32.buffer);\nconst littleEndian = testU8[0] === 0x44;\n\n/**\n * Packs an arbitrary floating point value to 4 values representable using uint8.\n *\n * @param {number} value A floating point number.\n * @param {Cartesian4} [result] The Cartesian4 that will contain the packed float.\n * @returns {Cartesian4} A Cartesian4 representing the float packed to values in x, y, z, and w.\n */\nCartesian4.packFloat = function (value, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.number(\"value\", value);\n //>>includeEnd('debug');\n\n if (!defined(result)) {\n result = new Cartesian4();\n }\n\n // scratchU8Array and scratchF32Array are views into the same buffer\n scratchF32Array[0] = value;\n\n if (littleEndian) {\n result.x = scratchU8Array[0];\n result.y = scratchU8Array[1];\n result.z = scratchU8Array[2];\n result.w = scratchU8Array[3];\n } else {\n // convert from big-endian to little-endian\n result.x = scratchU8Array[3];\n result.y = scratchU8Array[2];\n result.z = scratchU8Array[1];\n result.w = scratchU8Array[0];\n }\n return result;\n};\n\n/**\n * Unpacks a float packed using Cartesian4.packFloat.\n *\n * @param {Cartesian4} packedFloat A Cartesian4 containing a float packed to 4 values representable using uint8.\n * @returns {number} The unpacked float.\n * @private\n */\nCartesian4.unpackFloat = function (packedFloat) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"packedFloat\", packedFloat);\n //>>includeEnd('debug');\n\n // scratchU8Array and scratchF32Array are views into the same buffer\n if (littleEndian) {\n scratchU8Array[0] = packedFloat.x;\n scratchU8Array[1] = packedFloat.y;\n scratchU8Array[2] = packedFloat.z;\n scratchU8Array[3] = packedFloat.w;\n } else {\n // convert from little-endian to big-endian\n scratchU8Array[0] = packedFloat.w;\n scratchU8Array[1] = packedFloat.z;\n scratchU8Array[2] = packedFloat.y;\n scratchU8Array[3] = packedFloat.x;\n }\n return scratchF32Array[0];\n};\nexport default Cartesian4;\n","import Cartesian3 from \"./Cartesian3.js\";\nimport Check from \"./Check.js\";\nimport defaultValue from \"./defaultValue.js\";\nimport defined from \"./defined.js\";\nimport DeveloperError from \"./DeveloperError.js\";\nimport CesiumMath from \"./Math.js\";\n\n/**\n * A 3x3 matrix, indexable as a column-major order array.\n * Constructor parameters are in row-major order for code readability.\n * @alias Matrix3\n * @constructor\n * @implements {ArrayLike}\n *\n * @param {number} [column0Row0=0.0] The value for column 0, row 0.\n * @param {number} [column1Row0=0.0] The value for column 1, row 0.\n * @param {number} [column2Row0=0.0] The value for column 2, row 0.\n * @param {number} [column0Row1=0.0] The value for column 0, row 1.\n * @param {number} [column1Row1=0.0] The value for column 1, row 1.\n * @param {number} [column2Row1=0.0] The value for column 2, row 1.\n * @param {number} [column0Row2=0.0] The value for column 0, row 2.\n * @param {number} [column1Row2=0.0] The value for column 1, row 2.\n * @param {number} [column2Row2=0.0] The value for column 2, row 2.\n *\n * @see Matrix3.fromArray\n * @see Matrix3.fromColumnMajorArray\n * @see Matrix3.fromRowMajorArray\n * @see Matrix3.fromQuaternion\n * @see Matrix3.fromHeadingPitchRoll\n * @see Matrix3.fromScale\n * @see Matrix3.fromUniformScale\n * @see Matrix3.fromCrossProduct\n * @see Matrix3.fromRotationX\n * @see Matrix3.fromRotationY\n * @see Matrix3.fromRotationZ\n * @see Matrix2\n * @see Matrix4\n */\nfunction Matrix3(\n column0Row0,\n column1Row0,\n column2Row0,\n column0Row1,\n column1Row1,\n column2Row1,\n column0Row2,\n column1Row2,\n column2Row2,\n) {\n this[0] = defaultValue(column0Row0, 0.0);\n this[1] = defaultValue(column0Row1, 0.0);\n this[2] = defaultValue(column0Row2, 0.0);\n this[3] = defaultValue(column1Row0, 0.0);\n this[4] = defaultValue(column1Row1, 0.0);\n this[5] = defaultValue(column1Row2, 0.0);\n this[6] = defaultValue(column2Row0, 0.0);\n this[7] = defaultValue(column2Row1, 0.0);\n this[8] = defaultValue(column2Row2, 0.0);\n}\n\n/**\n * The number of elements used to pack the object into an array.\n * @type {number}\n */\nMatrix3.packedLength = 9;\n\n/**\n * Stores the provided instance into the provided array.\n *\n * @param {Matrix3} value The value to pack.\n * @param {number[]} array The array to pack into.\n * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.\n *\n * @returns {number[]} The array that was packed into\n */\nMatrix3.pack = function (value, array, startingIndex) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"value\", value);\n Check.defined(\"array\", array);\n //>>includeEnd('debug');\n\n startingIndex = defaultValue(startingIndex, 0);\n\n array[startingIndex++] = value[0];\n array[startingIndex++] = value[1];\n array[startingIndex++] = value[2];\n array[startingIndex++] = value[3];\n array[startingIndex++] = value[4];\n array[startingIndex++] = value[5];\n array[startingIndex++] = value[6];\n array[startingIndex++] = value[7];\n array[startingIndex++] = value[8];\n\n return array;\n};\n\n/**\n * Retrieves an instance from a packed array.\n *\n * @param {number[]} array The packed array.\n * @param {number} [startingIndex=0] The starting index of the element to be unpacked.\n * @param {Matrix3} [result] The object into which to store the result.\n * @returns {Matrix3} The modified result parameter or a new Matrix3 instance if one was not provided.\n */\nMatrix3.unpack = function (array, startingIndex, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.defined(\"array\", array);\n //>>includeEnd('debug');\n\n startingIndex = defaultValue(startingIndex, 0);\n\n if (!defined(result)) {\n result = new Matrix3();\n }\n\n result[0] = array[startingIndex++];\n result[1] = array[startingIndex++];\n result[2] = array[startingIndex++];\n result[3] = array[startingIndex++];\n result[4] = array[startingIndex++];\n result[5] = array[startingIndex++];\n result[6] = array[startingIndex++];\n result[7] = array[startingIndex++];\n result[8] = array[startingIndex++];\n return result;\n};\n\n/**\n * Flattens an array of Matrix3s into an array of components. The components\n * are stored in column-major order.\n *\n * @param {Matrix3[]} array The array of matrices to pack.\n * @param {number[]} [result] The array onto which to store the result. If this is a typed array, it must have array.length * 9 components, else a {@link DeveloperError} will be thrown. If it is a regular array, it will be resized to have (array.length * 9) elements.\n * @returns {number[]} The packed array.\n */\nMatrix3.packArray = function (array, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.defined(\"array\", array);\n //>>includeEnd('debug');\n\n const length = array.length;\n const resultLength = length * 9;\n if (!defined(result)) {\n result = new Array(resultLength);\n } else if (!Array.isArray(result) && result.length !== resultLength) {\n //>>includeStart('debug', pragmas.debug);\n throw new DeveloperError(\n \"If result is a typed array, it must have exactly array.length * 9 elements\",\n );\n //>>includeEnd('debug');\n } else if (result.length !== resultLength) {\n result.length = resultLength;\n }\n\n for (let i = 0; i < length; ++i) {\n Matrix3.pack(array[i], result, i * 9);\n }\n return result;\n};\n\n/**\n * Unpacks an array of column-major matrix components into an array of Matrix3s.\n *\n * @param {number[]} array The array of components to unpack.\n * @param {Matrix3[]} [result] The array onto which to store the result.\n * @returns {Matrix3[]} The unpacked array.\n */\nMatrix3.unpackArray = function (array, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.defined(\"array\", array);\n Check.typeOf.number.greaterThanOrEquals(\"array.length\", array.length, 9);\n if (array.length % 9 !== 0) {\n throw new DeveloperError(\"array length must be a multiple of 9.\");\n }\n //>>includeEnd('debug');\n\n const length = array.length;\n if (!defined(result)) {\n result = new Array(length / 9);\n } else {\n result.length = length / 9;\n }\n\n for (let i = 0; i < length; i += 9) {\n const index = i / 9;\n result[index] = Matrix3.unpack(array, i, result[index]);\n }\n return result;\n};\n\n/**\n * Duplicates a Matrix3 instance.\n *\n * @param {Matrix3} matrix The matrix to duplicate.\n * @param {Matrix3} [result] The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter or a new Matrix3 instance if one was not provided. (Returns undefined if matrix is undefined)\n */\nMatrix3.clone = function (matrix, result) {\n if (!defined(matrix)) {\n return undefined;\n }\n if (!defined(result)) {\n return new Matrix3(\n matrix[0],\n matrix[3],\n matrix[6],\n matrix[1],\n matrix[4],\n matrix[7],\n matrix[2],\n matrix[5],\n matrix[8],\n );\n }\n result[0] = matrix[0];\n result[1] = matrix[1];\n result[2] = matrix[2];\n result[3] = matrix[3];\n result[4] = matrix[4];\n result[5] = matrix[5];\n result[6] = matrix[6];\n result[7] = matrix[7];\n result[8] = matrix[8];\n return result;\n};\n\n/**\n * Creates a Matrix3 from 9 consecutive elements in an array.\n *\n * @function\n * @param {number[]} array The array whose 9 consecutive elements correspond to the positions of the matrix. Assumes column-major order.\n * @param {number} [startingIndex=0] The offset into the array of the first element, which corresponds to first column first row position in the matrix.\n * @param {Matrix3} [result] The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter or a new Matrix3 instance if one was not provided.\n *\n * @example\n * // Create the Matrix3:\n * // [1.0, 2.0, 3.0]\n * // [1.0, 2.0, 3.0]\n * // [1.0, 2.0, 3.0]\n *\n * const v = [1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 3.0, 3.0, 3.0];\n * const m = Cesium.Matrix3.fromArray(v);\n *\n * // Create same Matrix3 with using an offset into an array\n * const v2 = [0.0, 0.0, 1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 3.0, 3.0, 3.0];\n * const m2 = Cesium.Matrix3.fromArray(v2, 2);\n */\nMatrix3.fromArray = Matrix3.unpack;\n\n/**\n * Creates a Matrix3 instance from a column-major order array.\n *\n * @param {number[]} values The column-major order array.\n * @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix3} The modified result parameter, or a new Matrix3 instance if one was not provided.\n */\nMatrix3.fromColumnMajorArray = function (values, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.defined(\"values\", values);\n //>>includeEnd('debug');\n\n return Matrix3.clone(values, result);\n};\n\n/**\n * Creates a Matrix3 instance from a row-major order array.\n * The resulting matrix will be in column-major order.\n *\n * @param {number[]} values The row-major order array.\n * @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix3} The modified result parameter, or a new Matrix3 instance if one was not provided.\n */\nMatrix3.fromRowMajorArray = function (values, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.defined(\"values\", values);\n //>>includeEnd('debug');\n\n if (!defined(result)) {\n return new Matrix3(\n values[0],\n values[1],\n values[2],\n values[3],\n values[4],\n values[5],\n values[6],\n values[7],\n values[8],\n );\n }\n result[0] = values[0];\n result[1] = values[3];\n result[2] = values[6];\n result[3] = values[1];\n result[4] = values[4];\n result[5] = values[7];\n result[6] = values[2];\n result[7] = values[5];\n result[8] = values[8];\n return result;\n};\n\n/**\n * Computes a 3x3 rotation matrix from the provided quaternion.\n *\n * @param {Quaternion} quaternion the quaternion to use.\n * @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix3} The 3x3 rotation matrix from this quaternion.\n */\nMatrix3.fromQuaternion = function (quaternion, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"quaternion\", quaternion);\n //>>includeEnd('debug');\n\n const x2 = quaternion.x * quaternion.x;\n const xy = quaternion.x * quaternion.y;\n const xz = quaternion.x * quaternion.z;\n const xw = quaternion.x * quaternion.w;\n const y2 = quaternion.y * quaternion.y;\n const yz = quaternion.y * quaternion.z;\n const yw = quaternion.y * quaternion.w;\n const z2 = quaternion.z * quaternion.z;\n const zw = quaternion.z * quaternion.w;\n const w2 = quaternion.w * quaternion.w;\n\n const m00 = x2 - y2 - z2 + w2;\n const m01 = 2.0 * (xy - zw);\n const m02 = 2.0 * (xz + yw);\n\n const m10 = 2.0 * (xy + zw);\n const m11 = -x2 + y2 - z2 + w2;\n const m12 = 2.0 * (yz - xw);\n\n const m20 = 2.0 * (xz - yw);\n const m21 = 2.0 * (yz + xw);\n const m22 = -x2 - y2 + z2 + w2;\n\n if (!defined(result)) {\n return new Matrix3(m00, m01, m02, m10, m11, m12, m20, m21, m22);\n }\n result[0] = m00;\n result[1] = m10;\n result[2] = m20;\n result[3] = m01;\n result[4] = m11;\n result[5] = m21;\n result[6] = m02;\n result[7] = m12;\n result[8] = m22;\n return result;\n};\n\n/**\n * Computes a 3x3 rotation matrix from the provided headingPitchRoll. (see http://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles )\n *\n * @param {HeadingPitchRoll} headingPitchRoll the headingPitchRoll to use.\n * @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix3} The 3x3 rotation matrix from this headingPitchRoll.\n */\nMatrix3.fromHeadingPitchRoll = function (headingPitchRoll, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"headingPitchRoll\", headingPitchRoll);\n //>>includeEnd('debug');\n\n const cosTheta = Math.cos(-headingPitchRoll.pitch);\n const cosPsi = Math.cos(-headingPitchRoll.heading);\n const cosPhi = Math.cos(headingPitchRoll.roll);\n const sinTheta = Math.sin(-headingPitchRoll.pitch);\n const sinPsi = Math.sin(-headingPitchRoll.heading);\n const sinPhi = Math.sin(headingPitchRoll.roll);\n\n const m00 = cosTheta * cosPsi;\n const m01 = -cosPhi * sinPsi + sinPhi * sinTheta * cosPsi;\n const m02 = sinPhi * sinPsi + cosPhi * sinTheta * cosPsi;\n\n const m10 = cosTheta * sinPsi;\n const m11 = cosPhi * cosPsi + sinPhi * sinTheta * sinPsi;\n const m12 = -sinPhi * cosPsi + cosPhi * sinTheta * sinPsi;\n\n const m20 = -sinTheta;\n const m21 = sinPhi * cosTheta;\n const m22 = cosPhi * cosTheta;\n\n if (!defined(result)) {\n return new Matrix3(m00, m01, m02, m10, m11, m12, m20, m21, m22);\n }\n result[0] = m00;\n result[1] = m10;\n result[2] = m20;\n result[3] = m01;\n result[4] = m11;\n result[5] = m21;\n result[6] = m02;\n result[7] = m12;\n result[8] = m22;\n return result;\n};\n\n/**\n * Computes a Matrix3 instance representing a non-uniform scale.\n *\n * @param {Cartesian3} scale The x, y, and z scale factors.\n * @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix3} The modified result parameter, or a new Matrix3 instance if one was not provided.\n *\n * @example\n * // Creates\n * // [7.0, 0.0, 0.0]\n * // [0.0, 8.0, 0.0]\n * // [0.0, 0.0, 9.0]\n * const m = Cesium.Matrix3.fromScale(new Cesium.Cartesian3(7.0, 8.0, 9.0));\n */\nMatrix3.fromScale = function (scale, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"scale\", scale);\n //>>includeEnd('debug');\n\n if (!defined(result)) {\n return new Matrix3(scale.x, 0.0, 0.0, 0.0, scale.y, 0.0, 0.0, 0.0, scale.z);\n }\n\n result[0] = scale.x;\n result[1] = 0.0;\n result[2] = 0.0;\n result[3] = 0.0;\n result[4] = scale.y;\n result[5] = 0.0;\n result[6] = 0.0;\n result[7] = 0.0;\n result[8] = scale.z;\n return result;\n};\n\n/**\n * Computes a Matrix3 instance representing a uniform scale.\n *\n * @param {number} scale The uniform scale factor.\n * @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix3} The modified result parameter, or a new Matrix3 instance if one was not provided.\n *\n * @example\n * // Creates\n * // [2.0, 0.0, 0.0]\n * // [0.0, 2.0, 0.0]\n * // [0.0, 0.0, 2.0]\n * const m = Cesium.Matrix3.fromUniformScale(2.0);\n */\nMatrix3.fromUniformScale = function (scale, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.number(\"scale\", scale);\n //>>includeEnd('debug');\n\n if (!defined(result)) {\n return new Matrix3(scale, 0.0, 0.0, 0.0, scale, 0.0, 0.0, 0.0, scale);\n }\n\n result[0] = scale;\n result[1] = 0.0;\n result[2] = 0.0;\n result[3] = 0.0;\n result[4] = scale;\n result[5] = 0.0;\n result[6] = 0.0;\n result[7] = 0.0;\n result[8] = scale;\n return result;\n};\n\n/**\n * Computes a Matrix3 instance representing the cross product equivalent matrix of a Cartesian3 vector.\n *\n * @param {Cartesian3} vector the vector on the left hand side of the cross product operation.\n * @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix3} The modified result parameter, or a new Matrix3 instance if one was not provided.\n *\n * @example\n * // Creates\n * // [0.0, -9.0, 8.0]\n * // [9.0, 0.0, -7.0]\n * // [-8.0, 7.0, 0.0]\n * const m = Cesium.Matrix3.fromCrossProduct(new Cesium.Cartesian3(7.0, 8.0, 9.0));\n */\nMatrix3.fromCrossProduct = function (vector, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"vector\", vector);\n //>>includeEnd('debug');\n\n if (!defined(result)) {\n return new Matrix3(\n 0.0,\n -vector.z,\n vector.y,\n vector.z,\n 0.0,\n -vector.x,\n -vector.y,\n vector.x,\n 0.0,\n );\n }\n\n result[0] = 0.0;\n result[1] = vector.z;\n result[2] = -vector.y;\n result[3] = -vector.z;\n result[4] = 0.0;\n result[5] = vector.x;\n result[6] = vector.y;\n result[7] = -vector.x;\n result[8] = 0.0;\n return result;\n};\n\n/**\n * Creates a rotation matrix around the x-axis.\n *\n * @param {number} angle The angle, in radians, of the rotation. Positive angles are counterclockwise.\n * @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix3} The modified result parameter, or a new Matrix3 instance if one was not provided.\n *\n * @example\n * // Rotate a point 45 degrees counterclockwise around the x-axis.\n * const p = new Cesium.Cartesian3(5, 6, 7);\n * const m = Cesium.Matrix3.fromRotationX(Cesium.Math.toRadians(45.0));\n * const rotated = Cesium.Matrix3.multiplyByVector(m, p, new Cesium.Cartesian3());\n */\nMatrix3.fromRotationX = function (angle, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.number(\"angle\", angle);\n //>>includeEnd('debug');\n\n const cosAngle = Math.cos(angle);\n const sinAngle = Math.sin(angle);\n\n if (!defined(result)) {\n return new Matrix3(\n 1.0,\n 0.0,\n 0.0,\n 0.0,\n cosAngle,\n -sinAngle,\n 0.0,\n sinAngle,\n cosAngle,\n );\n }\n\n result[0] = 1.0;\n result[1] = 0.0;\n result[2] = 0.0;\n result[3] = 0.0;\n result[4] = cosAngle;\n result[5] = sinAngle;\n result[6] = 0.0;\n result[7] = -sinAngle;\n result[8] = cosAngle;\n\n return result;\n};\n\n/**\n * Creates a rotation matrix around the y-axis.\n *\n * @param {number} angle The angle, in radians, of the rotation. Positive angles are counterclockwise.\n * @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix3} The modified result parameter, or a new Matrix3 instance if one was not provided.\n *\n * @example\n * // Rotate a point 45 degrees counterclockwise around the y-axis.\n * const p = new Cesium.Cartesian3(5, 6, 7);\n * const m = Cesium.Matrix3.fromRotationY(Cesium.Math.toRadians(45.0));\n * const rotated = Cesium.Matrix3.multiplyByVector(m, p, new Cesium.Cartesian3());\n */\nMatrix3.fromRotationY = function (angle, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.number(\"angle\", angle);\n //>>includeEnd('debug');\n\n const cosAngle = Math.cos(angle);\n const sinAngle = Math.sin(angle);\n\n if (!defined(result)) {\n return new Matrix3(\n cosAngle,\n 0.0,\n sinAngle,\n 0.0,\n 1.0,\n 0.0,\n -sinAngle,\n 0.0,\n cosAngle,\n );\n }\n\n result[0] = cosAngle;\n result[1] = 0.0;\n result[2] = -sinAngle;\n result[3] = 0.0;\n result[4] = 1.0;\n result[5] = 0.0;\n result[6] = sinAngle;\n result[7] = 0.0;\n result[8] = cosAngle;\n\n return result;\n};\n\n/**\n * Creates a rotation matrix around the z-axis.\n *\n * @param {number} angle The angle, in radians, of the rotation. Positive angles are counterclockwise.\n * @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix3} The modified result parameter, or a new Matrix3 instance if one was not provided.\n *\n * @example\n * // Rotate a point 45 degrees counterclockwise around the z-axis.\n * const p = new Cesium.Cartesian3(5, 6, 7);\n * const m = Cesium.Matrix3.fromRotationZ(Cesium.Math.toRadians(45.0));\n * const rotated = Cesium.Matrix3.multiplyByVector(m, p, new Cesium.Cartesian3());\n */\nMatrix3.fromRotationZ = function (angle, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.number(\"angle\", angle);\n //>>includeEnd('debug');\n\n const cosAngle = Math.cos(angle);\n const sinAngle = Math.sin(angle);\n\n if (!defined(result)) {\n return new Matrix3(\n cosAngle,\n -sinAngle,\n 0.0,\n sinAngle,\n cosAngle,\n 0.0,\n 0.0,\n 0.0,\n 1.0,\n );\n }\n\n result[0] = cosAngle;\n result[1] = sinAngle;\n result[2] = 0.0;\n result[3] = -sinAngle;\n result[4] = cosAngle;\n result[5] = 0.0;\n result[6] = 0.0;\n result[7] = 0.0;\n result[8] = 1.0;\n\n return result;\n};\n\n/**\n * Creates an Array from the provided Matrix3 instance.\n * The array will be in column-major order.\n *\n * @param {Matrix3} matrix The matrix to use..\n * @param {number[]} [result] The Array onto which to store the result.\n * @returns {number[]} The modified Array parameter or a new Array instance if one was not provided.\n */\nMatrix3.toArray = function (matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n //>>includeEnd('debug');\n\n if (!defined(result)) {\n return [\n matrix[0],\n matrix[1],\n matrix[2],\n matrix[3],\n matrix[4],\n matrix[5],\n matrix[6],\n matrix[7],\n matrix[8],\n ];\n }\n result[0] = matrix[0];\n result[1] = matrix[1];\n result[2] = matrix[2];\n result[3] = matrix[3];\n result[4] = matrix[4];\n result[5] = matrix[5];\n result[6] = matrix[6];\n result[7] = matrix[7];\n result[8] = matrix[8];\n return result;\n};\n\n/**\n * Computes the array index of the element at the provided row and column.\n *\n * @param {number} column The zero-based index of the column.\n * @param {number} row The zero-based index of the row.\n * @returns {number} The index of the element at the provided row and column.\n *\n * @exception {DeveloperError} row must be 0, 1, or 2.\n * @exception {DeveloperError} column must be 0, 1, or 2.\n *\n * @example\n * const myMatrix = new Cesium.Matrix3();\n * const column1Row0Index = Cesium.Matrix3.getElementIndex(1, 0);\n * const column1Row0 = myMatrix[column1Row0Index]\n * myMatrix[column1Row0Index] = 10.0;\n */\nMatrix3.getElementIndex = function (column, row) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.number.greaterThanOrEquals(\"row\", row, 0);\n Check.typeOf.number.lessThanOrEquals(\"row\", row, 2);\n Check.typeOf.number.greaterThanOrEquals(\"column\", column, 0);\n Check.typeOf.number.lessThanOrEquals(\"column\", column, 2);\n //>>includeEnd('debug');\n\n return column * 3 + row;\n};\n\n/**\n * Retrieves a copy of the matrix column at the provided index as a Cartesian3 instance.\n *\n * @param {Matrix3} matrix The matrix to use.\n * @param {number} index The zero-based index of the column to retrieve.\n * @param {Cartesian3} result The object onto which to store the result.\n * @returns {Cartesian3} The modified result parameter.\n *\n * @exception {DeveloperError} index must be 0, 1, or 2.\n */\nMatrix3.getColumn = function (matrix, index, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.number.greaterThanOrEquals(\"index\", index, 0);\n Check.typeOf.number.lessThanOrEquals(\"index\", index, 2);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const startIndex = index * 3;\n const x = matrix[startIndex];\n const y = matrix[startIndex + 1];\n const z = matrix[startIndex + 2];\n\n result.x = x;\n result.y = y;\n result.z = z;\n return result;\n};\n\n/**\n * Computes a new matrix that replaces the specified column in the provided matrix with the provided Cartesian3 instance.\n *\n * @param {Matrix3} matrix The matrix to use.\n * @param {number} index The zero-based index of the column to set.\n * @param {Cartesian3} cartesian The Cartesian whose values will be assigned to the specified column.\n * @param {Matrix3} result The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter.\n *\n * @exception {DeveloperError} index must be 0, 1, or 2.\n */\nMatrix3.setColumn = function (matrix, index, cartesian, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.number.greaterThanOrEquals(\"index\", index, 0);\n Check.typeOf.number.lessThanOrEquals(\"index\", index, 2);\n Check.typeOf.object(\"cartesian\", cartesian);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result = Matrix3.clone(matrix, result);\n const startIndex = index * 3;\n result[startIndex] = cartesian.x;\n result[startIndex + 1] = cartesian.y;\n result[startIndex + 2] = cartesian.z;\n return result;\n};\n\n/**\n * Retrieves a copy of the matrix row at the provided index as a Cartesian3 instance.\n *\n * @param {Matrix3} matrix The matrix to use.\n * @param {number} index The zero-based index of the row to retrieve.\n * @param {Cartesian3} result The object onto which to store the result.\n * @returns {Cartesian3} The modified result parameter.\n *\n * @exception {DeveloperError} index must be 0, 1, or 2.\n */\nMatrix3.getRow = function (matrix, index, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.number.greaterThanOrEquals(\"index\", index, 0);\n Check.typeOf.number.lessThanOrEquals(\"index\", index, 2);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const x = matrix[index];\n const y = matrix[index + 3];\n const z = matrix[index + 6];\n\n result.x = x;\n result.y = y;\n result.z = z;\n return result;\n};\n\n/**\n * Computes a new matrix that replaces the specified row in the provided matrix with the provided Cartesian3 instance.\n *\n * @param {Matrix3} matrix The matrix to use.\n * @param {number} index The zero-based index of the row to set.\n * @param {Cartesian3} cartesian The Cartesian whose values will be assigned to the specified row.\n * @param {Matrix3} result The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter.\n *\n * @exception {DeveloperError} index must be 0, 1, or 2.\n */\nMatrix3.setRow = function (matrix, index, cartesian, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.number.greaterThanOrEquals(\"index\", index, 0);\n Check.typeOf.number.lessThanOrEquals(\"index\", index, 2);\n Check.typeOf.object(\"cartesian\", cartesian);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result = Matrix3.clone(matrix, result);\n result[index] = cartesian.x;\n result[index + 3] = cartesian.y;\n result[index + 6] = cartesian.z;\n return result;\n};\n\nconst scaleScratch1 = new Cartesian3();\n\n/**\n * Computes a new matrix that replaces the scale with the provided scale.\n * This assumes the matrix is an affine transformation.\n *\n * @param {Matrix3} matrix The matrix to use.\n * @param {Cartesian3} scale The scale that replaces the scale of the provided matrix.\n * @param {Matrix3} result The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter.\n *\n * @see Matrix3.setUniformScale\n * @see Matrix3.fromScale\n * @see Matrix3.fromUniformScale\n * @see Matrix3.multiplyByScale\n * @see Matrix3.multiplyByUniformScale\n * @see Matrix3.getScale\n */\nMatrix3.setScale = function (matrix, scale, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"scale\", scale);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const existingScale = Matrix3.getScale(matrix, scaleScratch1);\n const scaleRatioX = scale.x / existingScale.x;\n const scaleRatioY = scale.y / existingScale.y;\n const scaleRatioZ = scale.z / existingScale.z;\n\n result[0] = matrix[0] * scaleRatioX;\n result[1] = matrix[1] * scaleRatioX;\n result[2] = matrix[2] * scaleRatioX;\n result[3] = matrix[3] * scaleRatioY;\n result[4] = matrix[4] * scaleRatioY;\n result[5] = matrix[5] * scaleRatioY;\n result[6] = matrix[6] * scaleRatioZ;\n result[7] = matrix[7] * scaleRatioZ;\n result[8] = matrix[8] * scaleRatioZ;\n\n return result;\n};\n\nconst scaleScratch2 = new Cartesian3();\n\n/**\n * Computes a new matrix that replaces the scale with the provided uniform scale.\n * This assumes the matrix is an affine transformation.\n *\n * @param {Matrix3} matrix The matrix to use.\n * @param {number} scale The uniform scale that replaces the scale of the provided matrix.\n * @param {Matrix3} result The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter.\n *\n * @see Matrix3.setScale\n * @see Matrix3.fromScale\n * @see Matrix3.fromUniformScale\n * @see Matrix3.multiplyByScale\n * @see Matrix3.multiplyByUniformScale\n * @see Matrix3.getScale\n */\nMatrix3.setUniformScale = function (matrix, scale, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.number(\"scale\", scale);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const existingScale = Matrix3.getScale(matrix, scaleScratch2);\n const scaleRatioX = scale / existingScale.x;\n const scaleRatioY = scale / existingScale.y;\n const scaleRatioZ = scale / existingScale.z;\n\n result[0] = matrix[0] * scaleRatioX;\n result[1] = matrix[1] * scaleRatioX;\n result[2] = matrix[2] * scaleRatioX;\n result[3] = matrix[3] * scaleRatioY;\n result[4] = matrix[4] * scaleRatioY;\n result[5] = matrix[5] * scaleRatioY;\n result[6] = matrix[6] * scaleRatioZ;\n result[7] = matrix[7] * scaleRatioZ;\n result[8] = matrix[8] * scaleRatioZ;\n\n return result;\n};\n\nconst scratchColumn = new Cartesian3();\n\n/**\n * Extracts the non-uniform scale assuming the matrix is an affine transformation.\n *\n * @param {Matrix3} matrix The matrix.\n * @param {Cartesian3} result The object onto which to store the result.\n * @returns {Cartesian3} The modified result parameter.\n *\n * @see Matrix3.multiplyByScale\n * @see Matrix3.multiplyByUniformScale\n * @see Matrix3.fromScale\n * @see Matrix3.fromUniformScale\n * @see Matrix3.setScale\n * @see Matrix3.setUniformScale\n */\nMatrix3.getScale = function (matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result.x = Cartesian3.magnitude(\n Cartesian3.fromElements(matrix[0], matrix[1], matrix[2], scratchColumn),\n );\n result.y = Cartesian3.magnitude(\n Cartesian3.fromElements(matrix[3], matrix[4], matrix[5], scratchColumn),\n );\n result.z = Cartesian3.magnitude(\n Cartesian3.fromElements(matrix[6], matrix[7], matrix[8], scratchColumn),\n );\n return result;\n};\n\nconst scaleScratch3 = new Cartesian3();\n\n/**\n * Computes the maximum scale assuming the matrix is an affine transformation.\n * The maximum scale is the maximum length of the column vectors.\n *\n * @param {Matrix3} matrix The matrix.\n * @returns {number} The maximum scale.\n */\nMatrix3.getMaximumScale = function (matrix) {\n Matrix3.getScale(matrix, scaleScratch3);\n return Cartesian3.maximumComponent(scaleScratch3);\n};\n\nconst scaleScratch4 = new Cartesian3();\n\n/**\n * Sets the rotation assuming the matrix is an affine transformation.\n *\n * @param {Matrix3} matrix The matrix.\n * @param {Matrix3} rotation The rotation matrix.\n * @param {Matrix3} result The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter.\n *\n * @see Matrix3.getRotation\n */\nMatrix3.setRotation = function (matrix, rotation, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const scale = Matrix3.getScale(matrix, scaleScratch4);\n\n result[0] = rotation[0] * scale.x;\n result[1] = rotation[1] * scale.x;\n result[2] = rotation[2] * scale.x;\n result[3] = rotation[3] * scale.y;\n result[4] = rotation[4] * scale.y;\n result[5] = rotation[5] * scale.y;\n result[6] = rotation[6] * scale.z;\n result[7] = rotation[7] * scale.z;\n result[8] = rotation[8] * scale.z;\n\n return result;\n};\n\nconst scaleScratch5 = new Cartesian3();\n\n/**\n * Extracts the rotation matrix assuming the matrix is an affine transformation.\n *\n * @param {Matrix3} matrix The matrix.\n * @param {Matrix3} result The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter.\n *\n * @see Matrix3.setRotation\n */\nMatrix3.getRotation = function (matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const scale = Matrix3.getScale(matrix, scaleScratch5);\n\n result[0] = matrix[0] / scale.x;\n result[1] = matrix[1] / scale.x;\n result[2] = matrix[2] / scale.x;\n result[3] = matrix[3] / scale.y;\n result[4] = matrix[4] / scale.y;\n result[5] = matrix[5] / scale.y;\n result[6] = matrix[6] / scale.z;\n result[7] = matrix[7] / scale.z;\n result[8] = matrix[8] / scale.z;\n\n return result;\n};\n\n/**\n * Computes the product of two matrices.\n *\n * @param {Matrix3} left The first matrix.\n * @param {Matrix3} right The second matrix.\n * @param {Matrix3} result The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter.\n */\nMatrix3.multiply = function (left, right, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"left\", left);\n Check.typeOf.object(\"right\", right);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const column0Row0 =\n left[0] * right[0] + left[3] * right[1] + left[6] * right[2];\n const column0Row1 =\n left[1] * right[0] + left[4] * right[1] + left[7] * right[2];\n const column0Row2 =\n left[2] * right[0] + left[5] * right[1] + left[8] * right[2];\n\n const column1Row0 =\n left[0] * right[3] + left[3] * right[4] + left[6] * right[5];\n const column1Row1 =\n left[1] * right[3] + left[4] * right[4] + left[7] * right[5];\n const column1Row2 =\n left[2] * right[3] + left[5] * right[4] + left[8] * right[5];\n\n const column2Row0 =\n left[0] * right[6] + left[3] * right[7] + left[6] * right[8];\n const column2Row1 =\n left[1] * right[6] + left[4] * right[7] + left[7] * right[8];\n const column2Row2 =\n left[2] * right[6] + left[5] * right[7] + left[8] * right[8];\n\n result[0] = column0Row0;\n result[1] = column0Row1;\n result[2] = column0Row2;\n result[3] = column1Row0;\n result[4] = column1Row1;\n result[5] = column1Row2;\n result[6] = column2Row0;\n result[7] = column2Row1;\n result[8] = column2Row2;\n return result;\n};\n\n/**\n * Computes the sum of two matrices.\n *\n * @param {Matrix3} left The first matrix.\n * @param {Matrix3} right The second matrix.\n * @param {Matrix3} result The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter.\n */\nMatrix3.add = function (left, right, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"left\", left);\n Check.typeOf.object(\"right\", right);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result[0] = left[0] + right[0];\n result[1] = left[1] + right[1];\n result[2] = left[2] + right[2];\n result[3] = left[3] + right[3];\n result[4] = left[4] + right[4];\n result[5] = left[5] + right[5];\n result[6] = left[6] + right[6];\n result[7] = left[7] + right[7];\n result[8] = left[8] + right[8];\n return result;\n};\n\n/**\n * Computes the difference of two matrices.\n *\n * @param {Matrix3} left The first matrix.\n * @param {Matrix3} right The second matrix.\n * @param {Matrix3} result The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter.\n */\nMatrix3.subtract = function (left, right, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"left\", left);\n Check.typeOf.object(\"right\", right);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result[0] = left[0] - right[0];\n result[1] = left[1] - right[1];\n result[2] = left[2] - right[2];\n result[3] = left[3] - right[3];\n result[4] = left[4] - right[4];\n result[5] = left[5] - right[5];\n result[6] = left[6] - right[6];\n result[7] = left[7] - right[7];\n result[8] = left[8] - right[8];\n return result;\n};\n\n/**\n * Computes the product of a matrix and a column vector.\n *\n * @param {Matrix3} matrix The matrix.\n * @param {Cartesian3} cartesian The column.\n * @param {Cartesian3} result The object onto which to store the result.\n * @returns {Cartesian3} The modified result parameter.\n */\nMatrix3.multiplyByVector = function (matrix, cartesian, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"cartesian\", cartesian);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const vX = cartesian.x;\n const vY = cartesian.y;\n const vZ = cartesian.z;\n\n const x = matrix[0] * vX + matrix[3] * vY + matrix[6] * vZ;\n const y = matrix[1] * vX + matrix[4] * vY + matrix[7] * vZ;\n const z = matrix[2] * vX + matrix[5] * vY + matrix[8] * vZ;\n\n result.x = x;\n result.y = y;\n result.z = z;\n return result;\n};\n\n/**\n * Computes the product of a matrix and a scalar.\n *\n * @param {Matrix3} matrix The matrix.\n * @param {number} scalar The number to multiply by.\n * @param {Matrix3} result The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter.\n */\nMatrix3.multiplyByScalar = function (matrix, scalar, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.number(\"scalar\", scalar);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result[0] = matrix[0] * scalar;\n result[1] = matrix[1] * scalar;\n result[2] = matrix[2] * scalar;\n result[3] = matrix[3] * scalar;\n result[4] = matrix[4] * scalar;\n result[5] = matrix[5] * scalar;\n result[6] = matrix[6] * scalar;\n result[7] = matrix[7] * scalar;\n result[8] = matrix[8] * scalar;\n return result;\n};\n\n/**\n * Computes the product of a matrix times a (non-uniform) scale, as if the scale were a scale matrix.\n *\n * @param {Matrix3} matrix The matrix on the left-hand side.\n * @param {Cartesian3} scale The non-uniform scale on the right-hand side.\n * @param {Matrix3} result The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter.\n *\n *\n * @example\n * // Instead of Cesium.Matrix3.multiply(m, Cesium.Matrix3.fromScale(scale), m);\n * Cesium.Matrix3.multiplyByScale(m, scale, m);\n *\n * @see Matrix3.multiplyByUniformScale\n * @see Matrix3.fromScale\n * @see Matrix3.fromUniformScale\n * @see Matrix3.setScale\n * @see Matrix3.setUniformScale\n * @see Matrix3.getScale\n */\nMatrix3.multiplyByScale = function (matrix, scale, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"scale\", scale);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result[0] = matrix[0] * scale.x;\n result[1] = matrix[1] * scale.x;\n result[2] = matrix[2] * scale.x;\n result[3] = matrix[3] * scale.y;\n result[4] = matrix[4] * scale.y;\n result[5] = matrix[5] * scale.y;\n result[6] = matrix[6] * scale.z;\n result[7] = matrix[7] * scale.z;\n result[8] = matrix[8] * scale.z;\n\n return result;\n};\n\n/**\n * Computes the product of a matrix times a uniform scale, as if the scale were a scale matrix.\n *\n * @param {Matrix3} matrix The matrix on the left-hand side.\n * @param {number} scale The uniform scale on the right-hand side.\n * @param {Matrix3} result The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter.\n *\n * @example\n * // Instead of Cesium.Matrix3.multiply(m, Cesium.Matrix3.fromUniformScale(scale), m);\n * Cesium.Matrix3.multiplyByUniformScale(m, scale, m);\n *\n * @see Matrix3.multiplyByScale\n * @see Matrix3.fromScale\n * @see Matrix3.fromUniformScale\n * @see Matrix3.setScale\n * @see Matrix3.setUniformScale\n * @see Matrix3.getScale\n */\nMatrix3.multiplyByUniformScale = function (matrix, scale, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.number(\"scale\", scale);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result[0] = matrix[0] * scale;\n result[1] = matrix[1] * scale;\n result[2] = matrix[2] * scale;\n result[3] = matrix[3] * scale;\n result[4] = matrix[4] * scale;\n result[5] = matrix[5] * scale;\n result[6] = matrix[6] * scale;\n result[7] = matrix[7] * scale;\n result[8] = matrix[8] * scale;\n\n return result;\n};\n\n/**\n * Creates a negated copy of the provided matrix.\n *\n * @param {Matrix3} matrix The matrix to negate.\n * @param {Matrix3} result The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter.\n */\nMatrix3.negate = function (matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result[0] = -matrix[0];\n result[1] = -matrix[1];\n result[2] = -matrix[2];\n result[3] = -matrix[3];\n result[4] = -matrix[4];\n result[5] = -matrix[5];\n result[6] = -matrix[6];\n result[7] = -matrix[7];\n result[8] = -matrix[8];\n return result;\n};\n\n/**\n * Computes the transpose of the provided matrix.\n *\n * @param {Matrix3} matrix The matrix to transpose.\n * @param {Matrix3} result The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter.\n */\nMatrix3.transpose = function (matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const column0Row0 = matrix[0];\n const column0Row1 = matrix[3];\n const column0Row2 = matrix[6];\n const column1Row0 = matrix[1];\n const column1Row1 = matrix[4];\n const column1Row2 = matrix[7];\n const column2Row0 = matrix[2];\n const column2Row1 = matrix[5];\n const column2Row2 = matrix[8];\n\n result[0] = column0Row0;\n result[1] = column0Row1;\n result[2] = column0Row2;\n result[3] = column1Row0;\n result[4] = column1Row1;\n result[5] = column1Row2;\n result[6] = column2Row0;\n result[7] = column2Row1;\n result[8] = column2Row2;\n return result;\n};\n\nfunction computeFrobeniusNorm(matrix) {\n let norm = 0.0;\n for (let i = 0; i < 9; ++i) {\n const temp = matrix[i];\n norm += temp * temp;\n }\n\n return Math.sqrt(norm);\n}\n\nconst rowVal = [1, 0, 0];\nconst colVal = [2, 2, 1];\n\nfunction offDiagonalFrobeniusNorm(matrix) {\n // Computes the \"off-diagonal\" Frobenius norm.\n // Assumes matrix is symmetric.\n\n let norm = 0.0;\n for (let i = 0; i < 3; ++i) {\n const temp = matrix[Matrix3.getElementIndex(colVal[i], rowVal[i])];\n norm += 2.0 * temp * temp;\n }\n\n return Math.sqrt(norm);\n}\n\nfunction shurDecomposition(matrix, result) {\n // This routine was created based upon Matrix Computations, 3rd ed., by Golub and Van Loan,\n // section 8.4.2 The 2by2 Symmetric Schur Decomposition.\n //\n // The routine takes a matrix, which is assumed to be symmetric, and\n // finds the largest off-diagonal term, and then creates\n // a matrix (result) which can be used to help reduce it\n\n const tolerance = CesiumMath.EPSILON15;\n\n let maxDiagonal = 0.0;\n let rotAxis = 1;\n\n // find pivot (rotAxis) based on max diagonal of matrix\n for (let i = 0; i < 3; ++i) {\n const temp = Math.abs(\n matrix[Matrix3.getElementIndex(colVal[i], rowVal[i])],\n );\n if (temp > maxDiagonal) {\n rotAxis = i;\n maxDiagonal = temp;\n }\n }\n\n let c = 1.0;\n let s = 0.0;\n\n const p = rowVal[rotAxis];\n const q = colVal[rotAxis];\n\n if (Math.abs(matrix[Matrix3.getElementIndex(q, p)]) > tolerance) {\n const qq = matrix[Matrix3.getElementIndex(q, q)];\n const pp = matrix[Matrix3.getElementIndex(p, p)];\n const qp = matrix[Matrix3.getElementIndex(q, p)];\n\n const tau = (qq - pp) / 2.0 / qp;\n let t;\n\n if (tau < 0.0) {\n t = -1.0 / (-tau + Math.sqrt(1.0 + tau * tau));\n } else {\n t = 1.0 / (tau + Math.sqrt(1.0 + tau * tau));\n }\n\n c = 1.0 / Math.sqrt(1.0 + t * t);\n s = t * c;\n }\n\n result = Matrix3.clone(Matrix3.IDENTITY, result);\n\n result[Matrix3.getElementIndex(p, p)] = result[\n Matrix3.getElementIndex(q, q)\n ] = c;\n result[Matrix3.getElementIndex(q, p)] = s;\n result[Matrix3.getElementIndex(p, q)] = -s;\n\n return result;\n}\n\nconst jMatrix = new Matrix3();\nconst jMatrixTranspose = new Matrix3();\n\n/**\n * Computes the eigenvectors and eigenvalues of a symmetric matrix.\n *

\n * Returns a diagonal matrix and unitary matrix such that:\n * matrix = unitary matrix * diagonal matrix * transpose(unitary matrix)\n *

\n *

\n * The values along the diagonal of the diagonal matrix are the eigenvalues. The columns\n * of the unitary matrix are the corresponding eigenvectors.\n *

\n *\n * @param {Matrix3} matrix The matrix to decompose into diagonal and unitary matrix. Expected to be symmetric.\n * @param {object} [result] An object with unitary and diagonal properties which are matrices onto which to store the result.\n * @returns {object} An object with unitary and diagonal properties which are the unitary and diagonal matrices, respectively.\n *\n * @example\n * const a = //... symetric matrix\n * const result = {\n * unitary : new Cesium.Matrix3(),\n * diagonal : new Cesium.Matrix3()\n * };\n * Cesium.Matrix3.computeEigenDecomposition(a, result);\n *\n * const unitaryTranspose = Cesium.Matrix3.transpose(result.unitary, new Cesium.Matrix3());\n * const b = Cesium.Matrix3.multiply(result.unitary, result.diagonal, new Cesium.Matrix3());\n * Cesium.Matrix3.multiply(b, unitaryTranspose, b); // b is now equal to a\n *\n * const lambda = Cesium.Matrix3.getColumn(result.diagonal, 0, new Cesium.Cartesian3()).x; // first eigenvalue\n * const v = Cesium.Matrix3.getColumn(result.unitary, 0, new Cesium.Cartesian3()); // first eigenvector\n * const c = Cesium.Cartesian3.multiplyByScalar(v, lambda, new Cesium.Cartesian3()); // equal to Cesium.Matrix3.multiplyByVector(a, v)\n */\nMatrix3.computeEigenDecomposition = function (matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n //>>includeEnd('debug');\n\n // This routine was created based upon Matrix Computations, 3rd ed., by Golub and Van Loan,\n // section 8.4.3 The Classical Jacobi Algorithm\n\n const tolerance = CesiumMath.EPSILON20;\n const maxSweeps = 10;\n\n let count = 0;\n let sweep = 0;\n\n if (!defined(result)) {\n result = {};\n }\n\n const unitaryMatrix = (result.unitary = Matrix3.clone(\n Matrix3.IDENTITY,\n result.unitary,\n ));\n const diagMatrix = (result.diagonal = Matrix3.clone(matrix, result.diagonal));\n\n const epsilon = tolerance * computeFrobeniusNorm(diagMatrix);\n\n while (sweep < maxSweeps && offDiagonalFrobeniusNorm(diagMatrix) > epsilon) {\n shurDecomposition(diagMatrix, jMatrix);\n Matrix3.transpose(jMatrix, jMatrixTranspose);\n Matrix3.multiply(diagMatrix, jMatrix, diagMatrix);\n Matrix3.multiply(jMatrixTranspose, diagMatrix, diagMatrix);\n Matrix3.multiply(unitaryMatrix, jMatrix, unitaryMatrix);\n\n if (++count > 2) {\n ++sweep;\n count = 0;\n }\n }\n\n return result;\n};\n\n/**\n * Computes a matrix, which contains the absolute (unsigned) values of the provided matrix's elements.\n *\n * @param {Matrix3} matrix The matrix with signed elements.\n * @param {Matrix3} result The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter.\n */\nMatrix3.abs = function (matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result[0] = Math.abs(matrix[0]);\n result[1] = Math.abs(matrix[1]);\n result[2] = Math.abs(matrix[2]);\n result[3] = Math.abs(matrix[3]);\n result[4] = Math.abs(matrix[4]);\n result[5] = Math.abs(matrix[5]);\n result[6] = Math.abs(matrix[6]);\n result[7] = Math.abs(matrix[7]);\n result[8] = Math.abs(matrix[8]);\n\n return result;\n};\n\n/**\n * Computes the determinant of the provided matrix.\n *\n * @param {Matrix3} matrix The matrix to use.\n * @returns {number} The value of the determinant of the matrix.\n */\nMatrix3.determinant = function (matrix) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n //>>includeEnd('debug');\n\n const m11 = matrix[0];\n const m21 = matrix[3];\n const m31 = matrix[6];\n const m12 = matrix[1];\n const m22 = matrix[4];\n const m32 = matrix[7];\n const m13 = matrix[2];\n const m23 = matrix[5];\n const m33 = matrix[8];\n\n return (\n m11 * (m22 * m33 - m23 * m32) +\n m12 * (m23 * m31 - m21 * m33) +\n m13 * (m21 * m32 - m22 * m31)\n );\n};\n\n/**\n * Computes the inverse of the provided matrix.\n *\n * @param {Matrix3} matrix The matrix to invert.\n * @param {Matrix3} result The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter.\n *\n * @exception {DeveloperError} matrix is not invertible.\n */\nMatrix3.inverse = function (matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const m11 = matrix[0];\n const m21 = matrix[1];\n const m31 = matrix[2];\n const m12 = matrix[3];\n const m22 = matrix[4];\n const m32 = matrix[5];\n const m13 = matrix[6];\n const m23 = matrix[7];\n const m33 = matrix[8];\n\n const determinant = Matrix3.determinant(matrix);\n\n //>>includeStart('debug', pragmas.debug);\n if (Math.abs(determinant) <= CesiumMath.EPSILON15) {\n throw new DeveloperError(\"matrix is not invertible\");\n }\n //>>includeEnd('debug');\n\n result[0] = m22 * m33 - m23 * m32;\n result[1] = m23 * m31 - m21 * m33;\n result[2] = m21 * m32 - m22 * m31;\n result[3] = m13 * m32 - m12 * m33;\n result[4] = m11 * m33 - m13 * m31;\n result[5] = m12 * m31 - m11 * m32;\n result[6] = m12 * m23 - m13 * m22;\n result[7] = m13 * m21 - m11 * m23;\n result[8] = m11 * m22 - m12 * m21;\n\n const scale = 1.0 / determinant;\n return Matrix3.multiplyByScalar(result, scale, result);\n};\n\nconst scratchTransposeMatrix = new Matrix3();\n\n/**\n * Computes the inverse transpose of a matrix.\n *\n * @param {Matrix3} matrix The matrix to transpose and invert.\n * @param {Matrix3} result The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter.\n */\nMatrix3.inverseTranspose = function (matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n return Matrix3.inverse(\n Matrix3.transpose(matrix, scratchTransposeMatrix),\n result,\n );\n};\n\n/**\n * Compares the provided matrices componentwise and returns\n * true if they are equal, false otherwise.\n *\n * @param {Matrix3} [left] The first matrix.\n * @param {Matrix3} [right] The second matrix.\n * @returns {boolean} true if left and right are equal, false otherwise.\n */\nMatrix3.equals = function (left, right) {\n return (\n left === right ||\n (defined(left) &&\n defined(right) &&\n left[0] === right[0] &&\n left[1] === right[1] &&\n left[2] === right[2] &&\n left[3] === right[3] &&\n left[4] === right[4] &&\n left[5] === right[5] &&\n left[6] === right[6] &&\n left[7] === right[7] &&\n left[8] === right[8])\n );\n};\n\n/**\n * Compares the provided matrices componentwise and returns\n * true if they are within the provided epsilon,\n * false otherwise.\n *\n * @param {Matrix3} [left] The first matrix.\n * @param {Matrix3} [right] The second matrix.\n * @param {number} [epsilon=0] The epsilon to use for equality testing.\n * @returns {boolean} true if left and right are within the provided epsilon, false otherwise.\n */\nMatrix3.equalsEpsilon = function (left, right, epsilon) {\n epsilon = defaultValue(epsilon, 0);\n\n return (\n left === right ||\n (defined(left) &&\n defined(right) &&\n Math.abs(left[0] - right[0]) <= epsilon &&\n Math.abs(left[1] - right[1]) <= epsilon &&\n Math.abs(left[2] - right[2]) <= epsilon &&\n Math.abs(left[3] - right[3]) <= epsilon &&\n Math.abs(left[4] - right[4]) <= epsilon &&\n Math.abs(left[5] - right[5]) <= epsilon &&\n Math.abs(left[6] - right[6]) <= epsilon &&\n Math.abs(left[7] - right[7]) <= epsilon &&\n Math.abs(left[8] - right[8]) <= epsilon)\n );\n};\n\n/**\n * An immutable Matrix3 instance initialized to the identity matrix.\n *\n * @type {Matrix3}\n * @constant\n */\nMatrix3.IDENTITY = Object.freeze(\n new Matrix3(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0),\n);\n\n/**\n * An immutable Matrix3 instance initialized to the zero matrix.\n *\n * @type {Matrix3}\n * @constant\n */\nMatrix3.ZERO = Object.freeze(\n new Matrix3(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0),\n);\n\n/**\n * The index into Matrix3 for column 0, row 0.\n *\n * @type {number}\n * @constant\n */\nMatrix3.COLUMN0ROW0 = 0;\n\n/**\n * The index into Matrix3 for column 0, row 1.\n *\n * @type {number}\n * @constant\n */\nMatrix3.COLUMN0ROW1 = 1;\n\n/**\n * The index into Matrix3 for column 0, row 2.\n *\n * @type {number}\n * @constant\n */\nMatrix3.COLUMN0ROW2 = 2;\n\n/**\n * The index into Matrix3 for column 1, row 0.\n *\n * @type {number}\n * @constant\n */\nMatrix3.COLUMN1ROW0 = 3;\n\n/**\n * The index into Matrix3 for column 1, row 1.\n *\n * @type {number}\n * @constant\n */\nMatrix3.COLUMN1ROW1 = 4;\n\n/**\n * The index into Matrix3 for column 1, row 2.\n *\n * @type {number}\n * @constant\n */\nMatrix3.COLUMN1ROW2 = 5;\n\n/**\n * The index into Matrix3 for column 2, row 0.\n *\n * @type {number}\n * @constant\n */\nMatrix3.COLUMN2ROW0 = 6;\n\n/**\n * The index into Matrix3 for column 2, row 1.\n *\n * @type {number}\n * @constant\n */\nMatrix3.COLUMN2ROW1 = 7;\n\n/**\n * The index into Matrix3 for column 2, row 2.\n *\n * @type {number}\n * @constant\n */\nMatrix3.COLUMN2ROW2 = 8;\n\nObject.defineProperties(Matrix3.prototype, {\n /**\n * Gets the number of items in the collection.\n * @memberof Matrix3.prototype\n *\n * @type {number}\n */\n length: {\n get: function () {\n return Matrix3.packedLength;\n },\n },\n});\n\n/**\n * Duplicates the provided Matrix3 instance.\n *\n * @param {Matrix3} [result] The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter or a new Matrix3 instance if one was not provided.\n */\nMatrix3.prototype.clone = function (result) {\n return Matrix3.clone(this, result);\n};\n\n/**\n * Compares this matrix to the provided matrix componentwise and returns\n * true if they are equal, false otherwise.\n *\n * @param {Matrix3} [right] The right hand side matrix.\n * @returns {boolean} true if they are equal, false otherwise.\n */\nMatrix3.prototype.equals = function (right) {\n return Matrix3.equals(this, right);\n};\n\n/**\n * @private\n */\nMatrix3.equalsArray = function (matrix, array, offset) {\n return (\n matrix[0] === array[offset] &&\n matrix[1] === array[offset + 1] &&\n matrix[2] === array[offset + 2] &&\n matrix[3] === array[offset + 3] &&\n matrix[4] === array[offset + 4] &&\n matrix[5] === array[offset + 5] &&\n matrix[6] === array[offset + 6] &&\n matrix[7] === array[offset + 7] &&\n matrix[8] === array[offset + 8]\n );\n};\n\n/**\n * Compares this matrix to the provided matrix componentwise and returns\n * true if they are within the provided epsilon,\n * false otherwise.\n *\n * @param {Matrix3} [right] The right hand side matrix.\n * @param {number} [epsilon=0] The epsilon to use for equality testing.\n * @returns {boolean} true if they are within the provided epsilon, false otherwise.\n */\nMatrix3.prototype.equalsEpsilon = function (right, epsilon) {\n return Matrix3.equalsEpsilon(this, right, epsilon);\n};\n\n/**\n * Creates a string representing this Matrix with each row being\n * on a separate line and in the format '(column0, column1, column2)'.\n *\n * @returns {string} A string representing the provided Matrix with each row being on a separate line and in the format '(column0, column1, column2)'.\n */\nMatrix3.prototype.toString = function () {\n return (\n `(${this[0]}, ${this[3]}, ${this[6]})\\n` +\n `(${this[1]}, ${this[4]}, ${this[7]})\\n` +\n `(${this[2]}, ${this[5]}, ${this[8]})`\n );\n};\nexport default Matrix3;\n","import defined from \"./defined.js\";\n\n/**\n * Constructs an exception object that is thrown due to an error that can occur at runtime, e.g.,\n * out of memory, could not compile shader, etc. If a function may throw this\n * exception, the calling code should be prepared to catch it.\n *

\n * On the other hand, a {@link DeveloperError} indicates an exception due\n * to a developer error, e.g., invalid argument, that usually indicates a bug in the\n * calling code.\n *\n * @alias RuntimeError\n * @constructor\n * @extends Error\n *\n * @param {string} [message] The error message for this exception.\n *\n * @see DeveloperError\n */\nfunction RuntimeError(message) {\n /**\n * 'RuntimeError' indicating that this exception was thrown due to a runtime error.\n * @type {string}\n * @readonly\n */\n this.name = \"RuntimeError\";\n\n /**\n * The explanation for why this exception was thrown.\n * @type {string}\n * @readonly\n */\n this.message = message;\n\n //Browsers such as IE don't have a stack property until you actually throw the error.\n let stack;\n try {\n throw new Error();\n } catch (e) {\n stack = e.stack;\n }\n\n /**\n * The stack trace of this exception, if available.\n * @type {string}\n * @readonly\n */\n this.stack = stack;\n}\n\nif (defined(Object.create)) {\n RuntimeError.prototype = Object.create(Error.prototype);\n RuntimeError.prototype.constructor = RuntimeError;\n}\n\nRuntimeError.prototype.toString = function () {\n let str = `${this.name}: ${this.message}`;\n\n if (defined(this.stack)) {\n str += `\\n${this.stack.toString()}`;\n }\n\n return str;\n};\nexport default RuntimeError;\n","import Cartesian2 from \"./Cartesian2.js\";\nimport Cartesian3 from \"./Cartesian3.js\";\nimport Cartesian4 from \"./Cartesian4.js\";\nimport Cartographic from \"./Cartographic.js\";\nimport Check from \"./Check.js\";\nimport defaultValue from \"./defaultValue.js\";\nimport defined from \"./defined.js\";\nimport DeveloperError from \"./DeveloperError.js\";\nimport EarthOrientationParameters from \"./EarthOrientationParameters.js\";\nimport EarthOrientationParametersSample from \"./EarthOrientationParametersSample.js\";\nimport Ellipsoid from \"./Ellipsoid.js\";\nimport HeadingPitchRoll from \"./HeadingPitchRoll.js\";\nimport Iau2006XysData from \"./Iau2006XysData.js\";\nimport Iau2006XysSample from \"./Iau2006XysSample.js\";\nimport JulianDate from \"./JulianDate.js\";\nimport CesiumMath from \"./Math.js\";\nimport Matrix3 from \"./Matrix3.js\";\nimport Matrix4 from \"./Matrix4.js\";\nimport Quaternion from \"./Quaternion.js\";\nimport TimeConstants from \"./TimeConstants.js\";\n\n/**\n * Contains functions for transforming positions to various reference frames.\n *\n * @namespace Transforms\n */\nconst Transforms = {};\n\nconst vectorProductLocalFrame = {\n up: {\n south: \"east\",\n north: \"west\",\n west: \"south\",\n east: \"north\",\n },\n down: {\n south: \"west\",\n north: \"east\",\n west: \"north\",\n east: \"south\",\n },\n south: {\n up: \"west\",\n down: \"east\",\n west: \"down\",\n east: \"up\",\n },\n north: {\n up: \"east\",\n down: \"west\",\n west: \"up\",\n east: \"down\",\n },\n west: {\n up: \"north\",\n down: \"south\",\n north: \"down\",\n south: \"up\",\n },\n east: {\n up: \"south\",\n down: \"north\",\n north: \"up\",\n south: \"down\",\n },\n};\n\nconst degeneratePositionLocalFrame = {\n north: [-1, 0, 0],\n east: [0, 1, 0],\n up: [0, 0, 1],\n south: [1, 0, 0],\n west: [0, -1, 0],\n down: [0, 0, -1],\n};\n\nconst localFrameToFixedFrameCache = {};\n\nconst scratchCalculateCartesian = {\n east: new Cartesian3(),\n north: new Cartesian3(),\n up: new Cartesian3(),\n west: new Cartesian3(),\n south: new Cartesian3(),\n down: new Cartesian3(),\n};\nlet scratchFirstCartesian = new Cartesian3();\nlet scratchSecondCartesian = new Cartesian3();\nlet scratchThirdCartesian = new Cartesian3();\n/**\n * Generates a function that computes a 4x4 transformation matrix from a reference frame\n * centered at the provided origin to the provided ellipsoid's fixed reference frame.\n * @param {string} firstAxis name of the first axis of the local reference frame. Must be\n * 'east', 'north', 'up', 'west', 'south' or 'down'.\n * @param {string} secondAxis name of the second axis of the local reference frame. Must be\n * 'east', 'north', 'up', 'west', 'south' or 'down'.\n * @return {Transforms.LocalFrameToFixedFrame} The function that will computes a\n * 4x4 transformation matrix from a reference frame, with first axis and second axis compliant with the parameters,\n */\nTransforms.localFrameToFixedFrameGenerator = function (firstAxis, secondAxis) {\n if (\n !vectorProductLocalFrame.hasOwnProperty(firstAxis) ||\n !vectorProductLocalFrame[firstAxis].hasOwnProperty(secondAxis)\n ) {\n throw new DeveloperError(\n \"firstAxis and secondAxis must be east, north, up, west, south or down.\",\n );\n }\n const thirdAxis = vectorProductLocalFrame[firstAxis][secondAxis];\n\n /**\n * Computes a 4x4 transformation matrix from a reference frame\n * centered at the provided origin to the provided ellipsoid's fixed reference frame.\n * @callback Transforms.LocalFrameToFixedFrame\n * @param {Cartesian3} origin The center point of the local reference frame.\n * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid whose fixed frame is used in the transformation.\n * @param {Matrix4} [result] The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter or a new Matrix4 instance if none was provided.\n */\n let resultat;\n const hashAxis = firstAxis + secondAxis;\n if (defined(localFrameToFixedFrameCache[hashAxis])) {\n resultat = localFrameToFixedFrameCache[hashAxis];\n } else {\n resultat = function (origin, ellipsoid, result) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(origin)) {\n throw new DeveloperError(\"origin is required.\");\n }\n if (isNaN(origin.x) || isNaN(origin.y) || isNaN(origin.z)) {\n throw new DeveloperError(\"origin has a NaN component\");\n }\n //>>includeEnd('debug');\n if (!defined(result)) {\n result = new Matrix4();\n }\n if (\n Cartesian3.equalsEpsilon(origin, Cartesian3.ZERO, CesiumMath.EPSILON14)\n ) {\n // If x, y, and z are zero, use the degenerate local frame, which is a special case\n Cartesian3.unpack(\n degeneratePositionLocalFrame[firstAxis],\n 0,\n scratchFirstCartesian,\n );\n Cartesian3.unpack(\n degeneratePositionLocalFrame[secondAxis],\n 0,\n scratchSecondCartesian,\n );\n Cartesian3.unpack(\n degeneratePositionLocalFrame[thirdAxis],\n 0,\n scratchThirdCartesian,\n );\n } else if (\n CesiumMath.equalsEpsilon(origin.x, 0.0, CesiumMath.EPSILON14) &&\n CesiumMath.equalsEpsilon(origin.y, 0.0, CesiumMath.EPSILON14)\n ) {\n // If x and y are zero, assume origin is at a pole, which is a special case.\n const sign = CesiumMath.sign(origin.z);\n\n Cartesian3.unpack(\n degeneratePositionLocalFrame[firstAxis],\n 0,\n scratchFirstCartesian,\n );\n if (firstAxis !== \"east\" && firstAxis !== \"west\") {\n Cartesian3.multiplyByScalar(\n scratchFirstCartesian,\n sign,\n scratchFirstCartesian,\n );\n }\n\n Cartesian3.unpack(\n degeneratePositionLocalFrame[secondAxis],\n 0,\n scratchSecondCartesian,\n );\n if (secondAxis !== \"east\" && secondAxis !== \"west\") {\n Cartesian3.multiplyByScalar(\n scratchSecondCartesian,\n sign,\n scratchSecondCartesian,\n );\n }\n\n Cartesian3.unpack(\n degeneratePositionLocalFrame[thirdAxis],\n 0,\n scratchThirdCartesian,\n );\n if (thirdAxis !== \"east\" && thirdAxis !== \"west\") {\n Cartesian3.multiplyByScalar(\n scratchThirdCartesian,\n sign,\n scratchThirdCartesian,\n );\n }\n } else {\n ellipsoid = defaultValue(ellipsoid, Ellipsoid.default);\n ellipsoid.geodeticSurfaceNormal(origin, scratchCalculateCartesian.up);\n\n const up = scratchCalculateCartesian.up;\n const east = scratchCalculateCartesian.east;\n east.x = -origin.y;\n east.y = origin.x;\n east.z = 0.0;\n Cartesian3.normalize(east, scratchCalculateCartesian.east);\n Cartesian3.cross(up, east, scratchCalculateCartesian.north);\n\n Cartesian3.multiplyByScalar(\n scratchCalculateCartesian.up,\n -1,\n scratchCalculateCartesian.down,\n );\n Cartesian3.multiplyByScalar(\n scratchCalculateCartesian.east,\n -1,\n scratchCalculateCartesian.west,\n );\n Cartesian3.multiplyByScalar(\n scratchCalculateCartesian.north,\n -1,\n scratchCalculateCartesian.south,\n );\n\n scratchFirstCartesian = scratchCalculateCartesian[firstAxis];\n scratchSecondCartesian = scratchCalculateCartesian[secondAxis];\n scratchThirdCartesian = scratchCalculateCartesian[thirdAxis];\n }\n result[0] = scratchFirstCartesian.x;\n result[1] = scratchFirstCartesian.y;\n result[2] = scratchFirstCartesian.z;\n result[3] = 0.0;\n result[4] = scratchSecondCartesian.x;\n result[5] = scratchSecondCartesian.y;\n result[6] = scratchSecondCartesian.z;\n result[7] = 0.0;\n result[8] = scratchThirdCartesian.x;\n result[9] = scratchThirdCartesian.y;\n result[10] = scratchThirdCartesian.z;\n result[11] = 0.0;\n result[12] = origin.x;\n result[13] = origin.y;\n result[14] = origin.z;\n result[15] = 1.0;\n return result;\n };\n localFrameToFixedFrameCache[hashAxis] = resultat;\n }\n return resultat;\n};\n\n/**\n * Computes a 4x4 transformation matrix from a reference frame with an east-north-up axes\n * centered at the provided origin to the provided ellipsoid's fixed reference frame.\n * The local axes are defined as:\n *
    \n *
  • The x axis points in the local east direction.
  • \n *
  • The y axis points in the local north direction.
  • \n *
  • The z axis points in the direction of the ellipsoid surface normal which passes through the position.
  • \n *
\n *\n * @function\n * @param {Cartesian3} origin The center point of the local reference frame.\n * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid whose fixed frame is used in the transformation.\n * @param {Matrix4} [result] The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter or a new Matrix4 instance if none was provided.\n *\n * @example\n * // Get the transform from local east-north-up at cartographic (0.0, 0.0) to Earth's fixed frame.\n * const center = Cesium.Cartesian3.fromDegrees(0.0, 0.0);\n * const transform = Cesium.Transforms.eastNorthUpToFixedFrame(center);\n */\nTransforms.eastNorthUpToFixedFrame = Transforms.localFrameToFixedFrameGenerator(\n \"east\",\n \"north\",\n);\n\n/**\n * Computes a 4x4 transformation matrix from a reference frame with an north-east-down axes\n * centered at the provided origin to the provided ellipsoid's fixed reference frame.\n * The local axes are defined as:\n *
    \n *
  • The x axis points in the local north direction.
  • \n *
  • The y axis points in the local east direction.
  • \n *
  • The z axis points in the opposite direction of the ellipsoid surface normal which passes through the position.
  • \n *
\n *\n * @function\n * @param {Cartesian3} origin The center point of the local reference frame.\n * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid whose fixed frame is used in the transformation.\n * @param {Matrix4} [result] The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter or a new Matrix4 instance if none was provided.\n *\n * @example\n * // Get the transform from local north-east-down at cartographic (0.0, 0.0) to Earth's fixed frame.\n * const center = Cesium.Cartesian3.fromDegrees(0.0, 0.0);\n * const transform = Cesium.Transforms.northEastDownToFixedFrame(center);\n */\nTransforms.northEastDownToFixedFrame =\n Transforms.localFrameToFixedFrameGenerator(\"north\", \"east\");\n\n/**\n * Computes a 4x4 transformation matrix from a reference frame with an north-up-east axes\n * centered at the provided origin to the provided ellipsoid's fixed reference frame.\n * The local axes are defined as:\n *
    \n *
  • The x axis points in the local north direction.
  • \n *
  • The y axis points in the direction of the ellipsoid surface normal which passes through the position.
  • \n *
  • The z axis points in the local east direction.
  • \n *
\n *\n * @function\n * @param {Cartesian3} origin The center point of the local reference frame.\n * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid whose fixed frame is used in the transformation.\n * @param {Matrix4} [result] The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter or a new Matrix4 instance if none was provided.\n *\n * @example\n * // Get the transform from local north-up-east at cartographic (0.0, 0.0) to Earth's fixed frame.\n * const center = Cesium.Cartesian3.fromDegrees(0.0, 0.0);\n * const transform = Cesium.Transforms.northUpEastToFixedFrame(center);\n */\nTransforms.northUpEastToFixedFrame = Transforms.localFrameToFixedFrameGenerator(\n \"north\",\n \"up\",\n);\n\n/**\n * Computes a 4x4 transformation matrix from a reference frame with an north-west-up axes\n * centered at the provided origin to the provided ellipsoid's fixed reference frame.\n * The local axes are defined as:\n *
    \n *
  • The x axis points in the local north direction.
  • \n *
  • The y axis points in the local west direction.
  • \n *
  • The z axis points in the direction of the ellipsoid surface normal which passes through the position.
  • \n *
\n *\n * @function\n * @param {Cartesian3} origin The center point of the local reference frame.\n * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid whose fixed frame is used in the transformation.\n * @param {Matrix4} [result] The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter or a new Matrix4 instance if none was provided.\n *\n * @example\n * // Get the transform from local north-West-Up at cartographic (0.0, 0.0) to Earth's fixed frame.\n * const center = Cesium.Cartesian3.fromDegrees(0.0, 0.0);\n * const transform = Cesium.Transforms.northWestUpToFixedFrame(center);\n */\nTransforms.northWestUpToFixedFrame = Transforms.localFrameToFixedFrameGenerator(\n \"north\",\n \"west\",\n);\n\nconst scratchHPRQuaternion = new Quaternion();\nconst scratchScale = new Cartesian3(1.0, 1.0, 1.0);\nconst scratchHPRMatrix4 = new Matrix4();\n\n/**\n * Computes a 4x4 transformation matrix from a reference frame with axes computed from the heading-pitch-roll angles\n * centered at the provided origin to the provided ellipsoid's fixed reference frame. Heading is the rotation from the local east\n * direction where a positive angle is increasing eastward. Pitch is the rotation from the local east-north plane. Positive pitch angles\n * are above the plane. Negative pitch angles are below the plane. Roll is the first rotation applied about the local east axis.\n *\n * @param {Cartesian3} origin The center point of the local reference frame.\n * @param {HeadingPitchRoll} headingPitchRoll The heading, pitch, and roll.\n * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid whose fixed frame is used in the transformation.\n * @param {Transforms.LocalFrameToFixedFrame} [fixedFrameTransform=Transforms.eastNorthUpToFixedFrame] A 4x4 transformation\n * matrix from a reference frame to the provided ellipsoid's fixed reference frame\n * @param {Matrix4} [result] The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter or a new Matrix4 instance if none was provided.\n *\n * @example\n * // Get the transform from local heading-pitch-roll at cartographic (0.0, 0.0) to Earth's fixed frame.\n * const center = Cesium.Cartesian3.fromDegrees(0.0, 0.0);\n * const heading = -Cesium.Math.PI_OVER_TWO;\n * const pitch = Cesium.Math.PI_OVER_FOUR;\n * const roll = 0.0;\n * const hpr = new Cesium.HeadingPitchRoll(heading, pitch, roll);\n * const transform = Cesium.Transforms.headingPitchRollToFixedFrame(center, hpr);\n */\nTransforms.headingPitchRollToFixedFrame = function (\n origin,\n headingPitchRoll,\n ellipsoid,\n fixedFrameTransform,\n result,\n) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"HeadingPitchRoll\", headingPitchRoll);\n //>>includeEnd('debug');\n\n fixedFrameTransform = defaultValue(\n fixedFrameTransform,\n Transforms.eastNorthUpToFixedFrame,\n );\n const hprQuaternion = Quaternion.fromHeadingPitchRoll(\n headingPitchRoll,\n scratchHPRQuaternion,\n );\n const hprMatrix = Matrix4.fromTranslationQuaternionRotationScale(\n Cartesian3.ZERO,\n hprQuaternion,\n scratchScale,\n scratchHPRMatrix4,\n );\n result = fixedFrameTransform(origin, ellipsoid, result);\n return Matrix4.multiply(result, hprMatrix, result);\n};\n\nconst scratchENUMatrix4 = new Matrix4();\nconst scratchHPRMatrix3 = new Matrix3();\n\n/**\n * Computes a quaternion from a reference frame with axes computed from the heading-pitch-roll angles\n * centered at the provided origin. Heading is the rotation from the local east\n * direction where a positive angle is increasing eastward. Pitch is the rotation from the local east-north plane. Positive pitch angles\n * are above the plane. Negative pitch angles are below the plane. Roll is the first rotation applied about the local east axis.\n *\n * @param {Cartesian3} origin The center point of the local reference frame.\n * @param {HeadingPitchRoll} headingPitchRoll The heading, pitch, and roll.\n * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid whose fixed frame is used in the transformation.\n * @param {Transforms.LocalFrameToFixedFrame} [fixedFrameTransform=Transforms.eastNorthUpToFixedFrame] A 4x4 transformation\n * matrix from a reference frame to the provided ellipsoid's fixed reference frame\n * @param {Quaternion} [result] The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter or a new Quaternion instance if none was provided.\n *\n * @example\n * // Get the quaternion from local heading-pitch-roll at cartographic (0.0, 0.0) to Earth's fixed frame.\n * const center = Cesium.Cartesian3.fromDegrees(0.0, 0.0);\n * const heading = -Cesium.Math.PI_OVER_TWO;\n * const pitch = Cesium.Math.PI_OVER_FOUR;\n * const roll = 0.0;\n * const hpr = new HeadingPitchRoll(heading, pitch, roll);\n * const quaternion = Cesium.Transforms.headingPitchRollQuaternion(center, hpr);\n */\nTransforms.headingPitchRollQuaternion = function (\n origin,\n headingPitchRoll,\n ellipsoid,\n fixedFrameTransform,\n result,\n) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"HeadingPitchRoll\", headingPitchRoll);\n //>>includeEnd('debug');\n\n const transform = Transforms.headingPitchRollToFixedFrame(\n origin,\n headingPitchRoll,\n ellipsoid,\n fixedFrameTransform,\n scratchENUMatrix4,\n );\n const rotation = Matrix4.getMatrix3(transform, scratchHPRMatrix3);\n return Quaternion.fromRotationMatrix(rotation, result);\n};\n\nconst noScale = new Cartesian3(1.0, 1.0, 1.0);\nconst hprCenterScratch = new Cartesian3();\nconst ffScratch = new Matrix4();\nconst hprTransformScratch = new Matrix4();\nconst hprRotationScratch = new Matrix3();\nconst hprQuaternionScratch = new Quaternion();\n/**\n * Computes heading-pitch-roll angles from a transform in a particular reference frame. Heading is the rotation from the local east\n * direction where a positive angle is increasing eastward. Pitch is the rotation from the local east-north plane. Positive pitch angles\n * are above the plane. Negative pitch angles are below the plane. Roll is the first rotation applied about the local east axis.\n *\n * @param {Matrix4} transform The transform\n * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid whose fixed frame is used in the transformation.\n * @param {Transforms.LocalFrameToFixedFrame} [fixedFrameTransform=Transforms.eastNorthUpToFixedFrame] A 4x4 transformation\n * matrix from a reference frame to the provided ellipsoid's fixed reference frame\n * @param {HeadingPitchRoll} [result] The object onto which to store the result.\n * @returns {HeadingPitchRoll} The modified result parameter or a new HeadingPitchRoll instance if none was provided.\n */\nTransforms.fixedFrameToHeadingPitchRoll = function (\n transform,\n ellipsoid,\n fixedFrameTransform,\n result,\n) {\n //>>includeStart('debug', pragmas.debug);\n Check.defined(\"transform\", transform);\n //>>includeEnd('debug');\n\n ellipsoid = defaultValue(ellipsoid, Ellipsoid.default);\n fixedFrameTransform = defaultValue(\n fixedFrameTransform,\n Transforms.eastNorthUpToFixedFrame,\n );\n if (!defined(result)) {\n result = new HeadingPitchRoll();\n }\n\n const center = Matrix4.getTranslation(transform, hprCenterScratch);\n if (Cartesian3.equals(center, Cartesian3.ZERO)) {\n result.heading = 0;\n result.pitch = 0;\n result.roll = 0;\n return result;\n }\n let toFixedFrame = Matrix4.inverseTransformation(\n fixedFrameTransform(center, ellipsoid, ffScratch),\n ffScratch,\n );\n let transformCopy = Matrix4.setScale(transform, noScale, hprTransformScratch);\n transformCopy = Matrix4.setTranslation(\n transformCopy,\n Cartesian3.ZERO,\n transformCopy,\n );\n\n toFixedFrame = Matrix4.multiply(toFixedFrame, transformCopy, toFixedFrame);\n let quaternionRotation = Quaternion.fromRotationMatrix(\n Matrix4.getMatrix3(toFixedFrame, hprRotationScratch),\n hprQuaternionScratch,\n );\n quaternionRotation = Quaternion.normalize(\n quaternionRotation,\n quaternionRotation,\n );\n\n return HeadingPitchRoll.fromQuaternion(quaternionRotation, result);\n};\n\nconst gmstConstant0 = 6 * 3600 + 41 * 60 + 50.54841;\nconst gmstConstant1 = 8640184.812866;\nconst gmstConstant2 = 0.093104;\nconst gmstConstant3 = -6.2e-6;\nconst rateCoef = 1.1772758384668e-19;\nconst wgs84WRPrecessing = 7.2921158553e-5;\nconst twoPiOverSecondsInDay = CesiumMath.TWO_PI / 86400.0;\nlet dateInUtc = new JulianDate();\n\n/**\n * The default function to compute a rotation matrix to transform a point or vector from the International Celestial\n * Reference Frame (GCRF/ICRF) inertial frame axes to the central body, typically Earth, fixed frame axis at a given\n * time for use in lighting and transformation from inertial reference frames. This function may return undefined if\n * the data necessary to do the transformation is not yet loaded.\n *\n * @param {JulianDate} date The time at which to compute the rotation matrix.\n * @param {Matrix3} [result] The object onto which to store the result. If this parameter is\n * not specified, a new instance is created and returned.\n * @returns {Matrix3|undefined} The rotation matrix, or undefined if the data necessary to do the\n * transformation is not yet loaded.\n *\n * @example\n * // Set the default ICRF to fixed transformation to that of the Moon.\n * Cesium.Transforms.computeIcrfToCentralBodyFixedMatrix = Cesium.Transforms.computeIcrfToMoonFixedMatrix;\n *\n * @see Transforms.computeIcrfToFixedMatrix\n * @see Transforms.computeTemeToPseudoFixedMatrix\n * @see Transforms.computeIcrfToMoonFixedMatrix\n */\nTransforms.computeIcrfToCentralBodyFixedMatrix = function (date, result) {\n let transformMatrix = Transforms.computeIcrfToFixedMatrix(date, result);\n if (!defined(transformMatrix)) {\n transformMatrix = Transforms.computeTemeToPseudoFixedMatrix(date, result);\n }\n\n return transformMatrix;\n};\n\n/**\n * Computes a rotation matrix to transform a point or vector from True Equator Mean Equinox (TEME) axes to the\n * pseudo-fixed axes at a given time. This method treats the UT1 time standard as equivalent to UTC.\n *\n * @param {JulianDate} date The time at which to compute the rotation matrix.\n * @param {Matrix3} [result] The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter or a new Matrix3 instance if none was provided.\n *\n * @example\n * //Set the view to the inertial frame.\n * scene.postUpdate.addEventListener(function(scene, time) {\n * const now = Cesium.JulianDate.now();\n * const offset = Cesium.Matrix4.multiplyByPoint(camera.transform, camera.position, new Cesium.Cartesian3());\n * const transform = Cesium.Matrix4.fromRotationTranslation(Cesium.Transforms.computeTemeToPseudoFixedMatrix(now));\n * const inverseTransform = Cesium.Matrix4.inverseTransformation(transform, new Cesium.Matrix4());\n * Cesium.Matrix4.multiplyByPoint(inverseTransform, offset, offset);\n * camera.lookAtTransform(transform, offset);\n * });\n */\nTransforms.computeTemeToPseudoFixedMatrix = function (date, result) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(date)) {\n throw new DeveloperError(\"date is required.\");\n }\n //>>includeEnd('debug');\n\n // GMST is actually computed using UT1. We're using UTC as an approximation of UT1.\n // We do not want to use the function like convertTaiToUtc in JulianDate because\n // we explicitly do not want to fail when inside the leap second.\n\n dateInUtc = JulianDate.addSeconds(\n date,\n -JulianDate.computeTaiMinusUtc(date),\n dateInUtc,\n );\n const utcDayNumber = dateInUtc.dayNumber;\n const utcSecondsIntoDay = dateInUtc.secondsOfDay;\n\n let t;\n const diffDays = utcDayNumber - 2451545;\n if (utcSecondsIntoDay >= 43200.0) {\n t = (diffDays + 0.5) / TimeConstants.DAYS_PER_JULIAN_CENTURY;\n } else {\n t = (diffDays - 0.5) / TimeConstants.DAYS_PER_JULIAN_CENTURY;\n }\n\n const gmst0 =\n gmstConstant0 +\n t * (gmstConstant1 + t * (gmstConstant2 + t * gmstConstant3));\n const angle = (gmst0 * twoPiOverSecondsInDay) % CesiumMath.TWO_PI;\n const ratio = wgs84WRPrecessing + rateCoef * (utcDayNumber - 2451545.5);\n const secondsSinceMidnight =\n (utcSecondsIntoDay + TimeConstants.SECONDS_PER_DAY * 0.5) %\n TimeConstants.SECONDS_PER_DAY;\n const gha = angle + ratio * secondsSinceMidnight;\n const cosGha = Math.cos(gha);\n const sinGha = Math.sin(gha);\n\n if (!defined(result)) {\n return new Matrix3(\n cosGha,\n sinGha,\n 0.0,\n -sinGha,\n cosGha,\n 0.0,\n 0.0,\n 0.0,\n 1.0,\n );\n }\n result[0] = cosGha;\n result[1] = -sinGha;\n result[2] = 0.0;\n result[3] = sinGha;\n result[4] = cosGha;\n result[5] = 0.0;\n result[6] = 0.0;\n result[7] = 0.0;\n result[8] = 1.0;\n return result;\n};\n\n/**\n * The source of IAU 2006 XYS data, used for computing the transformation between the\n * Fixed and ICRF axes.\n * @type {Iau2006XysData}\n *\n * @see Transforms.computeIcrfToFixedMatrix\n * @see Transforms.computeFixedToIcrfMatrix\n *\n * @private\n */\nTransforms.iau2006XysData = new Iau2006XysData();\n\n/**\n * The source of Earth Orientation Parameters (EOP) data, used for computing the transformation\n * between the Fixed and ICRF axes. By default, zero values are used for all EOP values,\n * yielding a reasonable but not completely accurate representation of the ICRF axes.\n * @type {EarthOrientationParameters}\n *\n * @see Transforms.computeIcrfToFixedMatrix\n * @see Transforms.computeFixedToIcrfMatrix\n *\n * @private\n */\nTransforms.earthOrientationParameters = EarthOrientationParameters.NONE;\n\nconst ttMinusTai = 32.184;\nconst j2000ttDays = 2451545.0;\n\n/**\n * Preloads the data necessary to transform between the ICRF and Fixed axes, in either\n * direction, over a given interval. This function returns a promise that, when resolved,\n * indicates that the preload has completed.\n *\n * @param {TimeInterval} timeInterval The interval to preload.\n * @returns {Promise} A promise that, when resolved, indicates that the preload has completed\n * and evaluation of the transformation between the fixed and ICRF axes will\n * no longer return undefined for a time inside the interval.\n *\n *\n * @example\n * const interval = new Cesium.TimeInterval(...);\n * await Cesium.Transforms.preloadIcrfFixed(interval));\n * // the data is now loaded\n *\n * @see Transforms.computeIcrfToFixedMatrix\n * @see Transforms.computeFixedToIcrfMatrix\n */\nTransforms.preloadIcrfFixed = function (timeInterval) {\n const startDayTT = timeInterval.start.dayNumber;\n const startSecondTT = timeInterval.start.secondsOfDay + ttMinusTai;\n const stopDayTT = timeInterval.stop.dayNumber;\n const stopSecondTT = timeInterval.stop.secondsOfDay + ttMinusTai;\n\n return Transforms.iau2006XysData.preload(\n startDayTT,\n startSecondTT,\n stopDayTT,\n stopSecondTT,\n );\n};\n\n/**\n * Computes a rotation matrix to transform a point or vector from the International Celestial\n * Reference Frame (GCRF/ICRF) inertial frame axes to the Earth-Fixed frame axes (ITRF)\n * at a given time. This function may return undefined if the data necessary to\n * do the transformation is not yet loaded.\n *\n * @param {JulianDate} date The time at which to compute the rotation matrix.\n * @param {Matrix3} [result] The object onto which to store the result. If this parameter is\n * not specified, a new instance is created and returned.\n * @returns {Matrix3|undefined} The rotation matrix, or undefined if the data necessary to do the\n * transformation is not yet loaded.\n *\n *\n * @example\n * scene.postUpdate.addEventListener(function(scene, time) {\n * // View in ICRF.\n * const icrfToFixed = Cesium.Transforms.computeIcrfToFixedMatrix(time);\n * if (Cesium.defined(icrfToFixed)) {\n * const offset = Cesium.Cartesian3.clone(camera.position);\n * const transform = Cesium.Matrix4.fromRotationTranslation(icrfToFixed);\n * camera.lookAtTransform(transform, offset);\n * }\n * });\n *\n * @see Transforms.preloadIcrfFixed\n */\nTransforms.computeIcrfToFixedMatrix = function (date, result) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(date)) {\n throw new DeveloperError(\"date is required.\");\n }\n //>>includeEnd('debug');\n if (!defined(result)) {\n result = new Matrix3();\n }\n\n const fixedToIcrfMtx = Transforms.computeFixedToIcrfMatrix(date, result);\n if (!defined(fixedToIcrfMtx)) {\n return undefined;\n }\n\n return Matrix3.transpose(fixedToIcrfMtx, result);\n};\n\nconst TdtMinusTai = 32.184;\nconst J2000d = 2451545;\nconst scratchHpr = new HeadingPitchRoll();\nconst scratchRotationMatrix = new Matrix3();\nconst dateScratch = new JulianDate();\n\n/**\n * Computes a rotation matrix to transform a point or vector from the Moon-Fixed frame axes\n * to the International Celestial Reference Frame (GCRF/ICRF) inertial frame axes\n * at a given time.\n *\n * @param {JulianDate} date The time at which to compute the rotation matrix.\n * @param {Matrix3} [result] The object onto which to store the result. If this parameter is\n * not specified, a new instance is created and returned.\n * @returns {Matrix3} The rotation matrix.\n *\n * @example\n * // Transform a point from the Fixed axes to the ICRF axes.\n * const now = Cesium.JulianDate.now();\n * const pointInFixed = Cesium.Cartesian3.fromDegrees(0.0, 0.0);\n * const fixedToIcrf = Cesium.Transforms.computeMoonFixedToIcrfMatrix(now);\n * let pointInInertial = new Cesium.Cartesian3();\n * if (Cesium.defined(fixedToIcrf)) {\n * pointInInertial = Cesium.Matrix3.multiplyByVector(fixedToIcrf, pointInFixed, pointInInertial);\n * }\n */\nTransforms.computeMoonFixedToIcrfMatrix = function (date, result) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(date)) {\n throw new DeveloperError(\"date is required.\");\n }\n //>>includeEnd('debug');\n\n if (!defined(result)) {\n result = new Matrix3();\n }\n\n // Converts TAI to TT\n const secondsTT = JulianDate.addSeconds(date, TdtMinusTai, dateScratch);\n\n // Converts TT to TDB, interval in days since the standard epoch\n const d = JulianDate.totalDays(secondsTT) - J2000d;\n\n // Compute the approximate rotation, using https://articles.adsabs.harvard.edu//full/1980CeMec..22..205D/0000209.000.html\n const e1 = CesiumMath.toRadians(12.112) - CesiumMath.toRadians(0.052992) * d;\n const e2 = CesiumMath.toRadians(24.224) - CesiumMath.toRadians(0.105984) * d;\n const e3 = CesiumMath.toRadians(227.645) + CesiumMath.toRadians(13.012) * d;\n const e4 =\n CesiumMath.toRadians(261.105) + CesiumMath.toRadians(13.340716) * d;\n const e5 = CesiumMath.toRadians(358.0) + CesiumMath.toRadians(0.9856) * d;\n\n scratchHpr.pitch =\n CesiumMath.toRadians(270.0 - 90) -\n CesiumMath.toRadians(3.878) * Math.sin(e1) -\n CesiumMath.toRadians(0.12) * Math.sin(e2) +\n CesiumMath.toRadians(0.07) * Math.sin(e3) -\n CesiumMath.toRadians(0.017) * Math.sin(e4);\n scratchHpr.roll =\n CesiumMath.toRadians(66.53 - 90) +\n CesiumMath.toRadians(1.543) * Math.cos(e1) +\n CesiumMath.toRadians(0.24) * Math.cos(e2) -\n CesiumMath.toRadians(0.028) * Math.cos(e3) +\n CesiumMath.toRadians(0.007) * Math.cos(e4);\n scratchHpr.heading =\n CesiumMath.toRadians(244.375 - 90) +\n CesiumMath.toRadians(13.17635831) * d +\n CesiumMath.toRadians(3.558) * Math.sin(e1) +\n CesiumMath.toRadians(0.121) * Math.sin(e2) -\n CesiumMath.toRadians(0.064) * Math.sin(e3) +\n CesiumMath.toRadians(0.016) * Math.sin(e4) +\n CesiumMath.toRadians(0.025) * Math.sin(e5);\n return Matrix3.fromHeadingPitchRoll(scratchHpr, scratchRotationMatrix);\n};\n\n/**\n * Computes a rotation matrix to transform a point or vector from the International Celestial\n * Reference Frame (GCRF/ICRF) inertial frame axes to the Moon-Fixed frame axes\n * at a given time.\n *\n * @param {JulianDate} date The time at which to compute the rotation matrix.\n * @param {Matrix3} [result] The object onto which to store the result. If this parameter is\n * not specified, a new instance is created and returned.\n * @returns {Matrix3} The rotation matrix.\n *\n * @example\n * // Set the default ICRF to fixed transformation to that of the Moon.\n * Cesium.Transforms.computeIcrfToCentralBodyFixedMatrix = Cesium.Transforms.computeIcrfToMoonFixedMatrix;\n */\nTransforms.computeIcrfToMoonFixedMatrix = function (date, result) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(date)) {\n throw new DeveloperError(\"date is required.\");\n }\n //>>includeEnd('debug');\n if (!defined(result)) {\n result = new Matrix3();\n }\n\n const fixedToIcrfMtx = Transforms.computeMoonFixedToIcrfMatrix(date, result);\n if (!defined(fixedToIcrfMtx)) {\n return undefined;\n }\n\n return Matrix3.transpose(fixedToIcrfMtx, result);\n};\n\nconst xysScratch = new Iau2006XysSample(0.0, 0.0, 0.0);\nconst eopScratch = new EarthOrientationParametersSample(\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n);\nconst rotation1Scratch = new Matrix3();\nconst rotation2Scratch = new Matrix3();\n\n/**\n * Computes a rotation matrix to transform a point or vector from the Earth-Fixed frame axes (ITRF)\n * to the International Celestial Reference Frame (GCRF/ICRF) inertial frame axes\n * at a given time. This function may return undefined if the data necessary to\n * do the transformation is not yet loaded.\n *\n * @param {JulianDate} date The time at which to compute the rotation matrix.\n * @param {Matrix3} [result] The object onto which to store the result. If this parameter is\n * not specified, a new instance is created and returned.\n * @returns {Matrix3|undefined} The rotation matrix, or undefined if the data necessary to do the\n * transformation is not yet loaded.\n *\n *\n * @example\n * // Transform a point from the Fixed axes to the ICRF axes.\n * const now = Cesium.JulianDate.now();\n * const pointInFixed = Cesium.Cartesian3.fromDegrees(0.0, 0.0);\n * const fixedToIcrf = Cesium.Transforms.computeFixedToIcrfMatrix(now);\n * let pointInInertial = new Cesium.Cartesian3();\n * if (Cesium.defined(fixedToIcrf)) {\n * pointInInertial = Cesium.Matrix3.multiplyByVector(fixedToIcrf, pointInFixed, pointInInertial);\n * }\n *\n * @see Transforms.preloadIcrfFixed\n */\nTransforms.computeFixedToIcrfMatrix = function (date, result) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(date)) {\n throw new DeveloperError(\"date is required.\");\n }\n //>>includeEnd('debug');\n\n if (!defined(result)) {\n result = new Matrix3();\n }\n\n // Compute pole wander\n const eop = Transforms.earthOrientationParameters.compute(date, eopScratch);\n if (!defined(eop)) {\n return undefined;\n }\n\n // There is no external conversion to Terrestrial Time (TT).\n // So use International Atomic Time (TAI) and convert using offsets.\n // Here we are assuming that dayTT and secondTT are positive\n const dayTT = date.dayNumber;\n // It's possible here that secondTT could roll over 86400\n // This does not seem to affect the precision (unit tests check for this)\n const secondTT = date.secondsOfDay + ttMinusTai;\n\n const xys = Transforms.iau2006XysData.computeXysRadians(\n dayTT,\n secondTT,\n xysScratch,\n );\n if (!defined(xys)) {\n return undefined;\n }\n\n const x = xys.x + eop.xPoleOffset;\n const y = xys.y + eop.yPoleOffset;\n\n // Compute XYS rotation\n const a = 1.0 / (1.0 + Math.sqrt(1.0 - x * x - y * y));\n\n const rotation1 = rotation1Scratch;\n rotation1[0] = 1.0 - a * x * x;\n rotation1[3] = -a * x * y;\n rotation1[6] = x;\n rotation1[1] = -a * x * y;\n rotation1[4] = 1 - a * y * y;\n rotation1[7] = y;\n rotation1[2] = -x;\n rotation1[5] = -y;\n rotation1[8] = 1 - a * (x * x + y * y);\n\n const rotation2 = Matrix3.fromRotationZ(-xys.s, rotation2Scratch);\n const matrixQ = Matrix3.multiply(rotation1, rotation2, rotation1Scratch);\n\n // Similar to TT conversions above\n // It's possible here that secondTT could roll over 86400\n // This does not seem to affect the precision (unit tests check for this)\n const dateUt1day = date.dayNumber;\n const dateUt1sec =\n date.secondsOfDay - JulianDate.computeTaiMinusUtc(date) + eop.ut1MinusUtc;\n\n // Compute Earth rotation angle\n // The IERS standard for era is\n // era = 0.7790572732640 + 1.00273781191135448 * Tu\n // where\n // Tu = JulianDateInUt1 - 2451545.0\n // However, you get much more precision if you make the following simplification\n // era = a + (1 + b) * (JulianDayNumber + FractionOfDay - 2451545)\n // era = a + (JulianDayNumber - 2451545) + FractionOfDay + b (JulianDayNumber - 2451545 + FractionOfDay)\n // era = a + FractionOfDay + b (JulianDayNumber - 2451545 + FractionOfDay)\n // since (JulianDayNumber - 2451545) represents an integer number of revolutions which will be discarded anyway.\n const daysSinceJ2000 = dateUt1day - 2451545;\n const fractionOfDay = dateUt1sec / TimeConstants.SECONDS_PER_DAY;\n let era =\n 0.779057273264 +\n fractionOfDay +\n 0.00273781191135448 * (daysSinceJ2000 + fractionOfDay);\n era = (era % 1.0) * CesiumMath.TWO_PI;\n\n const earthRotation = Matrix3.fromRotationZ(era, rotation2Scratch);\n\n // pseudoFixed to ICRF\n const pfToIcrf = Matrix3.multiply(matrixQ, earthRotation, rotation1Scratch);\n\n // Compute pole wander matrix\n const cosxp = Math.cos(eop.xPoleWander);\n const cosyp = Math.cos(eop.yPoleWander);\n const sinxp = Math.sin(eop.xPoleWander);\n const sinyp = Math.sin(eop.yPoleWander);\n\n let ttt = dayTT - j2000ttDays + secondTT / TimeConstants.SECONDS_PER_DAY;\n ttt /= 36525.0;\n\n // approximate sp value in rad\n const sp = (-47.0e-6 * ttt * CesiumMath.RADIANS_PER_DEGREE) / 3600.0;\n const cossp = Math.cos(sp);\n const sinsp = Math.sin(sp);\n\n const fToPfMtx = rotation2Scratch;\n fToPfMtx[0] = cosxp * cossp;\n fToPfMtx[1] = cosxp * sinsp;\n fToPfMtx[2] = sinxp;\n fToPfMtx[3] = -cosyp * sinsp + sinyp * sinxp * cossp;\n fToPfMtx[4] = cosyp * cossp + sinyp * sinxp * sinsp;\n fToPfMtx[5] = -sinyp * cosxp;\n fToPfMtx[6] = -sinyp * sinsp - cosyp * sinxp * cossp;\n fToPfMtx[7] = sinyp * cossp - cosyp * sinxp * sinsp;\n fToPfMtx[8] = cosyp * cosxp;\n\n return Matrix3.multiply(pfToIcrf, fToPfMtx, result);\n};\n\nconst pointToWindowCoordinatesTemp = new Cartesian4();\n\n/**\n * Transform a point from model coordinates to window coordinates.\n *\n * @param {Matrix4} modelViewProjectionMatrix The 4x4 model-view-projection matrix.\n * @param {Matrix4} viewportTransformation The 4x4 viewport transformation.\n * @param {Cartesian3} point The point to transform.\n * @param {Cartesian2} [result] The object onto which to store the result.\n * @returns {Cartesian2} The modified result parameter or a new Cartesian2 instance if none was provided.\n */\nTransforms.pointToWindowCoordinates = function (\n modelViewProjectionMatrix,\n viewportTransformation,\n point,\n result,\n) {\n result = Transforms.pointToGLWindowCoordinates(\n modelViewProjectionMatrix,\n viewportTransformation,\n point,\n result,\n );\n result.y = 2.0 * viewportTransformation[5] - result.y;\n return result;\n};\n\n/**\n * @private\n */\nTransforms.pointToGLWindowCoordinates = function (\n modelViewProjectionMatrix,\n viewportTransformation,\n point,\n result,\n) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(modelViewProjectionMatrix)) {\n throw new DeveloperError(\"modelViewProjectionMatrix is required.\");\n }\n\n if (!defined(viewportTransformation)) {\n throw new DeveloperError(\"viewportTransformation is required.\");\n }\n\n if (!defined(point)) {\n throw new DeveloperError(\"point is required.\");\n }\n //>>includeEnd('debug');\n\n if (!defined(result)) {\n result = new Cartesian2();\n }\n\n const tmp = pointToWindowCoordinatesTemp;\n\n Matrix4.multiplyByVector(\n modelViewProjectionMatrix,\n Cartesian4.fromElements(point.x, point.y, point.z, 1, tmp),\n tmp,\n );\n Cartesian4.multiplyByScalar(tmp, 1.0 / tmp.w, tmp);\n Matrix4.multiplyByVector(viewportTransformation, tmp, tmp);\n return Cartesian2.fromCartesian4(tmp, result);\n};\n\nconst normalScratch = new Cartesian3();\nconst rightScratch = new Cartesian3();\nconst upScratch = new Cartesian3();\n\n/**\n * Transform a position and velocity to a rotation matrix.\n *\n * @param {Cartesian3} position The position to transform.\n * @param {Cartesian3} velocity The velocity vector to transform.\n * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid whose fixed frame is used in the transformation.\n * @param {Matrix3} [result] The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter or a new Matrix3 instance if none was provided.\n */\nTransforms.rotationMatrixFromPositionVelocity = function (\n position,\n velocity,\n ellipsoid,\n result,\n) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(position)) {\n throw new DeveloperError(\"position is required.\");\n }\n\n if (!defined(velocity)) {\n throw new DeveloperError(\"velocity is required.\");\n }\n //>>includeEnd('debug');\n\n const normal = defaultValue(\n ellipsoid,\n Ellipsoid.default,\n ).geodeticSurfaceNormal(position, normalScratch);\n let right = Cartesian3.cross(velocity, normal, rightScratch);\n\n if (Cartesian3.equalsEpsilon(right, Cartesian3.ZERO, CesiumMath.EPSILON6)) {\n right = Cartesian3.clone(Cartesian3.UNIT_X, right);\n }\n\n const up = Cartesian3.cross(right, velocity, upScratch);\n Cartesian3.normalize(up, up);\n Cartesian3.cross(velocity, up, right);\n Cartesian3.negate(right, right);\n Cartesian3.normalize(right, right);\n\n if (!defined(result)) {\n result = new Matrix3();\n }\n\n result[0] = velocity.x;\n result[1] = velocity.y;\n result[2] = velocity.z;\n result[3] = right.x;\n result[4] = right.y;\n result[5] = right.z;\n result[6] = up.x;\n result[7] = up.y;\n result[8] = up.z;\n\n return result;\n};\n\nconst swizzleMatrix = new Matrix4(\n 0.0,\n 0.0,\n 1.0,\n 0.0,\n 1.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 1.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 1.0,\n);\n\nconst scratchCartographic = new Cartographic();\nconst scratchCartesian3Projection = new Cartesian3();\nconst scratchCenter = new Cartesian3();\nconst scratchRotation = new Matrix3();\nconst scratchFromENU = new Matrix4();\nconst scratchToENU = new Matrix4();\n\n/**\n * @private\n */\nTransforms.basisTo2D = function (projection, matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(projection)) {\n throw new DeveloperError(\"projection is required.\");\n }\n if (!defined(matrix)) {\n throw new DeveloperError(\"matrix is required.\");\n }\n if (!defined(result)) {\n throw new DeveloperError(\"result is required.\");\n }\n //>>includeEnd('debug');\n\n const rtcCenter = Matrix4.getTranslation(matrix, scratchCenter);\n const ellipsoid = projection.ellipsoid;\n\n let projectedPosition;\n if (Cartesian3.equals(rtcCenter, Cartesian3.ZERO)) {\n projectedPosition = Cartesian3.clone(\n Cartesian3.ZERO,\n scratchCartesian3Projection,\n );\n } else {\n // Get the 2D Center\n const cartographic = ellipsoid.cartesianToCartographic(\n rtcCenter,\n scratchCartographic,\n );\n\n projectedPosition = projection.project(\n cartographic,\n scratchCartesian3Projection,\n );\n Cartesian3.fromElements(\n projectedPosition.z,\n projectedPosition.x,\n projectedPosition.y,\n projectedPosition,\n );\n }\n\n // Assuming the instance are positioned on the ellipsoid, invert the ellipsoidal transform to get the local transform and then convert to 2D\n const fromENU = Transforms.eastNorthUpToFixedFrame(\n rtcCenter,\n ellipsoid,\n scratchFromENU,\n );\n const toENU = Matrix4.inverseTransformation(fromENU, scratchToENU);\n const rotation = Matrix4.getMatrix3(matrix, scratchRotation);\n const local = Matrix4.multiplyByMatrix3(toENU, rotation, result);\n Matrix4.multiply(swizzleMatrix, local, result); // Swap x, y, z for 2D\n Matrix4.setTranslation(result, projectedPosition, result); // Use the projected center\n\n return result;\n};\n\n/**\n * @private\n */\nTransforms.ellipsoidTo2DModelMatrix = function (projection, center, result) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(projection)) {\n throw new DeveloperError(\"projection is required.\");\n }\n if (!defined(center)) {\n throw new DeveloperError(\"center is required.\");\n }\n if (!defined(result)) {\n throw new DeveloperError(\"result is required.\");\n }\n //>>includeEnd('debug');\n\n const ellipsoid = projection.ellipsoid;\n\n const fromENU = Transforms.eastNorthUpToFixedFrame(\n center,\n ellipsoid,\n scratchFromENU,\n );\n const toENU = Matrix4.inverseTransformation(fromENU, scratchToENU);\n\n const cartographic = ellipsoid.cartesianToCartographic(\n center,\n scratchCartographic,\n );\n const projectedPosition = projection.project(\n cartographic,\n scratchCartesian3Projection,\n );\n Cartesian3.fromElements(\n projectedPosition.z,\n projectedPosition.x,\n projectedPosition.y,\n projectedPosition,\n );\n\n const translation = Matrix4.fromTranslation(\n projectedPosition,\n scratchFromENU,\n );\n Matrix4.multiply(swizzleMatrix, toENU, result);\n Matrix4.multiply(translation, result, result);\n\n return result;\n};\nexport default Transforms;\n","import binarySearch from \"./binarySearch.js\";\nimport Check from \"./Check.js\";\nimport defaultValue from \"./defaultValue.js\";\nimport defined from \"./defined.js\";\nimport EarthOrientationParametersSample from \"./EarthOrientationParametersSample.js\";\nimport JulianDate from \"./JulianDate.js\";\nimport LeapSecond from \"./LeapSecond.js\";\nimport Resource from \"./Resource.js\";\nimport RuntimeError from \"./RuntimeError.js\";\nimport TimeConstants from \"./TimeConstants.js\";\nimport TimeStandard from \"./TimeStandard.js\";\n\n/**\n * Specifies Earth polar motion coordinates and the difference between UT1 and UTC.\n * These Earth Orientation Parameters (EOP) are primarily used in the transformation from\n * the International Celestial Reference Frame (ICRF) to the International Terrestrial\n * Reference Frame (ITRF).\n * This object is normally not instantiated directly, use {@link EarthOrientationParameters.fromUrl}.\n *\n * @alias EarthOrientationParameters\n * @constructor\n *\n * @param {object} [options] Object with the following properties:\n * @param {object} [options.data] The actual EOP data. If neither this\n * parameter nor options.data is specified, all EOP values are assumed\n * to be 0.0.\n * @param {boolean} [options.addNewLeapSeconds=true] True if leap seconds that\n * are specified in the EOP data but not in {@link JulianDate.leapSeconds}\n * should be added to {@link JulianDate.leapSeconds}. False if\n * new leap seconds should be handled correctly in the context\n * of the EOP data but otherwise ignored.\n *\n * @private\n */\nfunction EarthOrientationParameters(options) {\n options = defaultValue(options, defaultValue.EMPTY_OBJECT);\n\n this._dates = undefined;\n this._samples = undefined;\n\n this._dateColumn = -1;\n this._xPoleWanderRadiansColumn = -1;\n this._yPoleWanderRadiansColumn = -1;\n this._ut1MinusUtcSecondsColumn = -1;\n this._xCelestialPoleOffsetRadiansColumn = -1;\n this._yCelestialPoleOffsetRadiansColumn = -1;\n this._taiMinusUtcSecondsColumn = -1;\n\n this._columnCount = 0;\n this._lastIndex = -1;\n\n this._addNewLeapSeconds = defaultValue(options.addNewLeapSeconds, true);\n\n if (defined(options.data)) {\n // Use supplied EOP data.\n onDataReady(this, options.data);\n } else {\n // Use all zeros for EOP data.\n onDataReady(this, {\n columnNames: [\n \"dateIso8601\",\n \"modifiedJulianDateUtc\",\n \"xPoleWanderRadians\",\n \"yPoleWanderRadians\",\n \"ut1MinusUtcSeconds\",\n \"lengthOfDayCorrectionSeconds\",\n \"xCelestialPoleOffsetRadians\",\n \"yCelestialPoleOffsetRadians\",\n \"taiMinusUtcSeconds\",\n ],\n samples: [],\n });\n }\n}\n\n/**\n *\n * @param {Resource|string} [url] The URL from which to obtain EOP data. If neither this\n * parameter nor options.data is specified, all EOP values are assumed\n * to be 0.0. If options.data is specified, this parameter is\n * ignored.\n * @param {object} [options] Object with the following properties:\n * @param {boolean} [options.addNewLeapSeconds=true] True if leap seconds that\n * are specified in the EOP data but not in {@link JulianDate.leapSeconds}\n * should be added to {@link JulianDate.leapSeconds}. False if\n * new leap seconds should be handled correctly in the context\n * of the EOP data but otherwise ignored.\n *\n * @example\n * // An example EOP data file, EOP.json:\n * {\n * \"columnNames\" : [\"dateIso8601\",\"modifiedJulianDateUtc\",\"xPoleWanderRadians\",\"yPoleWanderRadians\",\"ut1MinusUtcSeconds\",\"lengthOfDayCorrectionSeconds\",\"xCelestialPoleOffsetRadians\",\"yCelestialPoleOffsetRadians\",\"taiMinusUtcSeconds\"],\n * \"samples\" : [\n * \"2011-07-01T00:00:00Z\",55743.0,2.117957047295119e-7,2.111518721609984e-6,-0.2908948,-2.956e-4,3.393695767766752e-11,3.3452143996557983e-10,34.0,\n * \"2011-07-02T00:00:00Z\",55744.0,2.193297093339541e-7,2.115460256837405e-6,-0.29065,-1.824e-4,-8.241832578862112e-11,5.623838700870617e-10,34.0,\n * \"2011-07-03T00:00:00Z\",55745.0,2.262286080161428e-7,2.1191157519929706e-6,-0.2905572,1.9e-6,-3.490658503988659e-10,6.981317007977318e-10,34.0\n * ]\n * }\n *\n * @example\n * // Loading the EOP data\n * const eop = await Cesium.EarthOrientationParameters.fromUrl('Data/EOP.json');\n * Cesium.Transforms.earthOrientationParameters = eop;\n */\nEarthOrientationParameters.fromUrl = async function (url, options) {\n //>>includeStart('debug', pragmas.debug);\n Check.defined(\"url\", url);\n //>>includeEnd('debug');\n\n options = defaultValue(options, defaultValue.EMPTY_OBJECT);\n\n const resource = Resource.createIfNeeded(url);\n\n // Download EOP data.\n let eopData;\n try {\n eopData = await resource.fetchJson();\n } catch (e) {\n throw new RuntimeError(\n `An error occurred while retrieving the EOP data from the URL ${resource.url}.`,\n );\n }\n\n return new EarthOrientationParameters({\n addNewLeapSeconds: options.addNewLeapSeconds,\n data: eopData,\n });\n};\n\n/**\n * A default {@link EarthOrientationParameters} instance that returns zero for all EOP values.\n */\nEarthOrientationParameters.NONE = Object.freeze({\n compute: function (date, result) {\n if (!defined(result)) {\n result = new EarthOrientationParametersSample(0.0, 0.0, 0.0, 0.0, 0.0);\n } else {\n result.xPoleWander = 0.0;\n result.yPoleWander = 0.0;\n result.xPoleOffset = 0.0;\n result.yPoleOffset = 0.0;\n result.ut1MinusUtc = 0.0;\n }\n return result;\n },\n});\n\n/**\n * Computes the Earth Orientation Parameters (EOP) for a given date by interpolating.\n * If the EOP data has not yet been download, this method returns undefined.\n *\n * @param {JulianDate} date The date for each to evaluate the EOP.\n * @param {EarthOrientationParametersSample} [result] The instance to which to copy the result.\n * If this parameter is undefined, a new instance is created and returned.\n * @returns {EarthOrientationParametersSample} The EOP evaluated at the given date, or\n * undefined if the data necessary to evaluate EOP at the date has not yet been\n * downloaded.\n *\n * @exception {RuntimeError} The loaded EOP data has an error and cannot be used.\n *\n * @see EarthOrientationParameters#fromUrl\n */\nEarthOrientationParameters.prototype.compute = function (date, result) {\n // We cannot compute until the samples are available.\n if (!defined(this._samples)) {\n return undefined;\n }\n\n if (!defined(result)) {\n result = new EarthOrientationParametersSample(0.0, 0.0, 0.0, 0.0, 0.0);\n }\n\n if (this._samples.length === 0) {\n result.xPoleWander = 0.0;\n result.yPoleWander = 0.0;\n result.xPoleOffset = 0.0;\n result.yPoleOffset = 0.0;\n result.ut1MinusUtc = 0.0;\n return result;\n }\n\n const dates = this._dates;\n const lastIndex = this._lastIndex;\n\n let before = 0;\n let after = 0;\n if (defined(lastIndex)) {\n const previousIndexDate = dates[lastIndex];\n const nextIndexDate = dates[lastIndex + 1];\n const isAfterPrevious = JulianDate.lessThanOrEquals(\n previousIndexDate,\n date,\n );\n const isAfterLastSample = !defined(nextIndexDate);\n const isBeforeNext =\n isAfterLastSample || JulianDate.greaterThanOrEquals(nextIndexDate, date);\n\n if (isAfterPrevious && isBeforeNext) {\n before = lastIndex;\n\n if (!isAfterLastSample && nextIndexDate.equals(date)) {\n ++before;\n }\n after = before + 1;\n\n interpolate(this, dates, this._samples, date, before, after, result);\n return result;\n }\n }\n\n let index = binarySearch(dates, date, JulianDate.compare, this._dateColumn);\n if (index >= 0) {\n // If the next entry is the same date, use the later entry. This way, if two entries\n // describe the same moment, one before a leap second and the other after, then we will use\n // the post-leap second data.\n if (index < dates.length - 1 && dates[index + 1].equals(date)) {\n ++index;\n }\n before = index;\n after = index;\n } else {\n after = ~index;\n before = after - 1;\n\n // Use the first entry if the date requested is before the beginning of the data.\n if (before < 0) {\n before = 0;\n }\n }\n\n this._lastIndex = before;\n\n interpolate(this, dates, this._samples, date, before, after, result);\n return result;\n};\n\nfunction compareLeapSecondDates(leapSecond, dateToFind) {\n return JulianDate.compare(leapSecond.julianDate, dateToFind);\n}\n\nfunction onDataReady(eop, eopData) {\n if (!defined(eopData.columnNames)) {\n throw new RuntimeError(\n \"Error in loaded EOP data: The columnNames property is required.\",\n );\n }\n\n if (!defined(eopData.samples)) {\n throw new RuntimeError(\n \"Error in loaded EOP data: The samples property is required.\",\n );\n }\n\n const dateColumn = eopData.columnNames.indexOf(\"modifiedJulianDateUtc\");\n const xPoleWanderRadiansColumn =\n eopData.columnNames.indexOf(\"xPoleWanderRadians\");\n const yPoleWanderRadiansColumn =\n eopData.columnNames.indexOf(\"yPoleWanderRadians\");\n const ut1MinusUtcSecondsColumn =\n eopData.columnNames.indexOf(\"ut1MinusUtcSeconds\");\n const xCelestialPoleOffsetRadiansColumn = eopData.columnNames.indexOf(\n \"xCelestialPoleOffsetRadians\",\n );\n const yCelestialPoleOffsetRadiansColumn = eopData.columnNames.indexOf(\n \"yCelestialPoleOffsetRadians\",\n );\n const taiMinusUtcSecondsColumn =\n eopData.columnNames.indexOf(\"taiMinusUtcSeconds\");\n\n if (\n dateColumn < 0 ||\n xPoleWanderRadiansColumn < 0 ||\n yPoleWanderRadiansColumn < 0 ||\n ut1MinusUtcSecondsColumn < 0 ||\n xCelestialPoleOffsetRadiansColumn < 0 ||\n yCelestialPoleOffsetRadiansColumn < 0 ||\n taiMinusUtcSecondsColumn < 0\n ) {\n throw new RuntimeError(\n \"Error in loaded EOP data: The columnNames property must include modifiedJulianDateUtc, xPoleWanderRadians, yPoleWanderRadians, ut1MinusUtcSeconds, xCelestialPoleOffsetRadians, yCelestialPoleOffsetRadians, and taiMinusUtcSeconds columns\",\n );\n }\n\n const samples = (eop._samples = eopData.samples);\n const dates = (eop._dates = []);\n\n eop._dateColumn = dateColumn;\n eop._xPoleWanderRadiansColumn = xPoleWanderRadiansColumn;\n eop._yPoleWanderRadiansColumn = yPoleWanderRadiansColumn;\n eop._ut1MinusUtcSecondsColumn = ut1MinusUtcSecondsColumn;\n eop._xCelestialPoleOffsetRadiansColumn = xCelestialPoleOffsetRadiansColumn;\n eop._yCelestialPoleOffsetRadiansColumn = yCelestialPoleOffsetRadiansColumn;\n eop._taiMinusUtcSecondsColumn = taiMinusUtcSecondsColumn;\n\n eop._columnCount = eopData.columnNames.length;\n eop._lastIndex = undefined;\n\n let lastTaiMinusUtc;\n\n const addNewLeapSeconds = eop._addNewLeapSeconds;\n\n // Convert the ISO8601 dates to JulianDates.\n for (let i = 0, len = samples.length; i < len; i += eop._columnCount) {\n const mjd = samples[i + dateColumn];\n const taiMinusUtc = samples[i + taiMinusUtcSecondsColumn];\n const day = mjd + TimeConstants.MODIFIED_JULIAN_DATE_DIFFERENCE;\n const date = new JulianDate(day, taiMinusUtc, TimeStandard.TAI);\n dates.push(date);\n\n if (addNewLeapSeconds) {\n if (taiMinusUtc !== lastTaiMinusUtc && defined(lastTaiMinusUtc)) {\n // We crossed a leap second boundary, so add the leap second\n // if it does not already exist.\n const leapSeconds = JulianDate.leapSeconds;\n const leapSecondIndex = binarySearch(\n leapSeconds,\n date,\n compareLeapSecondDates,\n );\n if (leapSecondIndex < 0) {\n const leapSecond = new LeapSecond(date, taiMinusUtc);\n leapSeconds.splice(~leapSecondIndex, 0, leapSecond);\n }\n }\n lastTaiMinusUtc = taiMinusUtc;\n }\n }\n}\n\nfunction fillResultFromIndex(eop, samples, index, columnCount, result) {\n const start = index * columnCount;\n result.xPoleWander = samples[start + eop._xPoleWanderRadiansColumn];\n result.yPoleWander = samples[start + eop._yPoleWanderRadiansColumn];\n result.xPoleOffset = samples[start + eop._xCelestialPoleOffsetRadiansColumn];\n result.yPoleOffset = samples[start + eop._yCelestialPoleOffsetRadiansColumn];\n result.ut1MinusUtc = samples[start + eop._ut1MinusUtcSecondsColumn];\n}\n\nfunction linearInterp(dx, y1, y2) {\n return y1 + dx * (y2 - y1);\n}\n\nfunction interpolate(eop, dates, samples, date, before, after, result) {\n const columnCount = eop._columnCount;\n\n // First check the bounds on the EOP data\n // If we are after the bounds of the data, return zeros.\n // The 'before' index should never be less than zero.\n if (after > dates.length - 1) {\n result.xPoleWander = 0;\n result.yPoleWander = 0;\n result.xPoleOffset = 0;\n result.yPoleOffset = 0;\n result.ut1MinusUtc = 0;\n return result;\n }\n\n const beforeDate = dates[before];\n const afterDate = dates[after];\n if (beforeDate.equals(afterDate) || date.equals(beforeDate)) {\n fillResultFromIndex(eop, samples, before, columnCount, result);\n return result;\n } else if (date.equals(afterDate)) {\n fillResultFromIndex(eop, samples, after, columnCount, result);\n return result;\n }\n\n const factor =\n JulianDate.secondsDifference(date, beforeDate) /\n JulianDate.secondsDifference(afterDate, beforeDate);\n\n const startBefore = before * columnCount;\n const startAfter = after * columnCount;\n\n // Handle UT1 leap second edge case\n let beforeUt1MinusUtc = samples[startBefore + eop._ut1MinusUtcSecondsColumn];\n let afterUt1MinusUtc = samples[startAfter + eop._ut1MinusUtcSecondsColumn];\n\n const offsetDifference = afterUt1MinusUtc - beforeUt1MinusUtc;\n if (offsetDifference > 0.5 || offsetDifference < -0.5) {\n // The absolute difference between the values is more than 0.5, so we may have\n // crossed a leap second. Check if this is the case and, if so, adjust the\n // afterValue to account for the leap second. This way, our interpolation will\n // produce reasonable results.\n const beforeTaiMinusUtc =\n samples[startBefore + eop._taiMinusUtcSecondsColumn];\n const afterTaiMinusUtc =\n samples[startAfter + eop._taiMinusUtcSecondsColumn];\n if (beforeTaiMinusUtc !== afterTaiMinusUtc) {\n if (afterDate.equals(date)) {\n // If we are at the end of the leap second interval, take the second value\n // Otherwise, the interpolation below will yield the wrong side of the\n // discontinuity\n // At the end of the leap second, we need to start accounting for the jump\n beforeUt1MinusUtc = afterUt1MinusUtc;\n } else {\n // Otherwise, remove the leap second so that the interpolation is correct\n afterUt1MinusUtc -= afterTaiMinusUtc - beforeTaiMinusUtc;\n }\n }\n }\n\n result.xPoleWander = linearInterp(\n factor,\n samples[startBefore + eop._xPoleWanderRadiansColumn],\n samples[startAfter + eop._xPoleWanderRadiansColumn],\n );\n result.yPoleWander = linearInterp(\n factor,\n samples[startBefore + eop._yPoleWanderRadiansColumn],\n samples[startAfter + eop._yPoleWanderRadiansColumn],\n );\n result.xPoleOffset = linearInterp(\n factor,\n samples[startBefore + eop._xCelestialPoleOffsetRadiansColumn],\n samples[startAfter + eop._xCelestialPoleOffsetRadiansColumn],\n );\n result.yPoleOffset = linearInterp(\n factor,\n samples[startBefore + eop._yCelestialPoleOffsetRadiansColumn],\n samples[startAfter + eop._yCelestialPoleOffsetRadiansColumn],\n );\n result.ut1MinusUtc = linearInterp(\n factor,\n beforeUt1MinusUtc,\n afterUt1MinusUtc,\n );\n return result;\n}\n\nexport default EarthOrientationParameters;\n","import Check from \"./Check.js\";\n\n/**\n * Finds an item in a sorted array.\n *\n * @function\n * @param {Array} array The sorted array to search.\n * @param {*} itemToFind The item to find in the array.\n * @param {binarySearchComparator} comparator The function to use to compare the item to\n * elements in the array.\n * @returns {number} The index of itemToFind in the array, if it exists. If itemToFind\n * does not exist, the return value is a negative number which is the bitwise complement (~)\n * of the index before which the itemToFind should be inserted in order to maintain the\n * sorted order of the array.\n *\n * @example\n * // Create a comparator function to search through an array of numbers.\n * function comparator(a, b) {\n * return a - b;\n * };\n * const numbers = [0, 2, 4, 6, 8];\n * const index = Cesium.binarySearch(numbers, 6, comparator); // 3\n */\nfunction binarySearch(array, itemToFind, comparator) {\n //>>includeStart('debug', pragmas.debug);\n Check.defined(\"array\", array);\n Check.defined(\"itemToFind\", itemToFind);\n Check.defined(\"comparator\", comparator);\n //>>includeEnd('debug');\n\n let low = 0;\n let high = array.length - 1;\n let i;\n let comparison;\n\n while (low <= high) {\n i = ~~((low + high) / 2);\n comparison = comparator(array[i], itemToFind);\n if (comparison < 0) {\n low = i + 1;\n continue;\n }\n if (comparison > 0) {\n high = i - 1;\n continue;\n }\n return i;\n }\n return ~(high + 1);\n}\n\n/**\n * A function used to compare two items while performing a binary search.\n * @callback binarySearchComparator\n *\n * @param {*} a An item in the array.\n * @param {*} b The item being searched for.\n * @returns {number} Returns a negative value if a is less than b,\n * a positive value if a is greater than b, or\n * 0 if a is equal to b.\n *\n * @example\n * function compareNumbers(a, b) {\n * return a - b;\n * }\n */\nexport default binarySearch;\n","/**\n * A set of Earth Orientation Parameters (EOP) sampled at a time.\n *\n * @alias EarthOrientationParametersSample\n * @constructor\n *\n * @param {number} xPoleWander The pole wander about the X axis, in radians.\n * @param {number} yPoleWander The pole wander about the Y axis, in radians.\n * @param {number} xPoleOffset The offset to the Celestial Intermediate Pole (CIP) about the X axis, in radians.\n * @param {number} yPoleOffset The offset to the Celestial Intermediate Pole (CIP) about the Y axis, in radians.\n * @param {number} ut1MinusUtc The difference in time standards, UT1 - UTC, in seconds.\n *\n * @private\n */\nfunction EarthOrientationParametersSample(\n xPoleWander,\n yPoleWander,\n xPoleOffset,\n yPoleOffset,\n ut1MinusUtc,\n) {\n /**\n * The pole wander about the X axis, in radians.\n * @type {number}\n */\n this.xPoleWander = xPoleWander;\n\n /**\n * The pole wander about the Y axis, in radians.\n * @type {number}\n */\n this.yPoleWander = yPoleWander;\n\n /**\n * The offset to the Celestial Intermediate Pole (CIP) about the X axis, in radians.\n * @type {number}\n */\n this.xPoleOffset = xPoleOffset;\n\n /**\n * The offset to the Celestial Intermediate Pole (CIP) about the Y axis, in radians.\n * @type {number}\n */\n this.yPoleOffset = yPoleOffset;\n\n /**\n * The difference in time standards, UT1 - UTC, in seconds.\n * @type {number}\n */\n this.ut1MinusUtc = ut1MinusUtc;\n}\nexport default EarthOrientationParametersSample;\n","import binarySearch from \"./binarySearch.js\";\nimport defaultValue from \"./defaultValue.js\";\nimport defined from \"./defined.js\";\nimport DeveloperError from \"./DeveloperError.js\";\nimport GregorianDate from \"./GregorianDate.js\";\nimport isLeapYear from \"./isLeapYear.js\";\nimport LeapSecond from \"./LeapSecond.js\";\nimport TimeConstants from \"./TimeConstants.js\";\nimport TimeStandard from \"./TimeStandard.js\";\n\nconst gregorianDateScratch = new GregorianDate();\nconst daysInMonth = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\nconst daysInLeapFeburary = 29;\n\nfunction compareLeapSecondDates(leapSecond, dateToFind) {\n return JulianDate.compare(leapSecond.julianDate, dateToFind.julianDate);\n}\n\n// we don't really need a leap second instance, anything with a julianDate property will do\nconst binarySearchScratchLeapSecond = new LeapSecond();\n\nfunction convertUtcToTai(julianDate) {\n //Even though julianDate is in UTC, we'll treat it as TAI and\n //search the leap second table for it.\n binarySearchScratchLeapSecond.julianDate = julianDate;\n const leapSeconds = JulianDate.leapSeconds;\n let index = binarySearch(\n leapSeconds,\n binarySearchScratchLeapSecond,\n compareLeapSecondDates,\n );\n\n if (index < 0) {\n index = ~index;\n }\n\n if (index >= leapSeconds.length) {\n index = leapSeconds.length - 1;\n }\n\n let offset = leapSeconds[index].offset;\n if (index > 0) {\n //Now we have the index of the closest leap second that comes on or after our UTC time.\n //However, if the difference between the UTC date being converted and the TAI\n //defined leap second is greater than the offset, we are off by one and need to use\n //the previous leap second.\n const difference = JulianDate.secondsDifference(\n leapSeconds[index].julianDate,\n julianDate,\n );\n if (difference > offset) {\n index--;\n offset = leapSeconds[index].offset;\n }\n }\n\n JulianDate.addSeconds(julianDate, offset, julianDate);\n}\n\nfunction convertTaiToUtc(julianDate, result) {\n binarySearchScratchLeapSecond.julianDate = julianDate;\n const leapSeconds = JulianDate.leapSeconds;\n let index = binarySearch(\n leapSeconds,\n binarySearchScratchLeapSecond,\n compareLeapSecondDates,\n );\n if (index < 0) {\n index = ~index;\n }\n\n //All times before our first leap second get the first offset.\n if (index === 0) {\n return JulianDate.addSeconds(julianDate, -leapSeconds[0].offset, result);\n }\n\n //All times after our leap second get the last offset.\n if (index >= leapSeconds.length) {\n return JulianDate.addSeconds(\n julianDate,\n -leapSeconds[index - 1].offset,\n result,\n );\n }\n\n //Compute the difference between the found leap second and the time we are converting.\n const difference = JulianDate.secondsDifference(\n leapSeconds[index].julianDate,\n julianDate,\n );\n\n if (difference === 0) {\n //The date is in our leap second table.\n return JulianDate.addSeconds(\n julianDate,\n -leapSeconds[index].offset,\n result,\n );\n }\n\n if (difference <= 1.0) {\n //The requested date is during the moment of a leap second, then we cannot convert to UTC\n return undefined;\n }\n\n //The time is in between two leap seconds, index is the leap second after the date\n //we're converting, so we subtract one to get the correct LeapSecond instance.\n return JulianDate.addSeconds(\n julianDate,\n -leapSeconds[--index].offset,\n result,\n );\n}\n\nfunction setComponents(wholeDays, secondsOfDay, julianDate) {\n const extraDays = (secondsOfDay / TimeConstants.SECONDS_PER_DAY) | 0;\n wholeDays += extraDays;\n secondsOfDay -= TimeConstants.SECONDS_PER_DAY * extraDays;\n\n if (secondsOfDay < 0) {\n wholeDays--;\n secondsOfDay += TimeConstants.SECONDS_PER_DAY;\n }\n\n julianDate.dayNumber = wholeDays;\n julianDate.secondsOfDay = secondsOfDay;\n return julianDate;\n}\n\nfunction computeJulianDateComponents(\n year,\n month,\n day,\n hour,\n minute,\n second,\n millisecond,\n) {\n // Algorithm from page 604 of the Explanatory Supplement to the\n // Astronomical Almanac (Seidelmann 1992).\n\n const a = ((month - 14) / 12) | 0;\n const b = year + 4800 + a;\n let dayNumber =\n (((1461 * b) / 4) | 0) +\n (((367 * (month - 2 - 12 * a)) / 12) | 0) -\n (((3 * (((b + 100) / 100) | 0)) / 4) | 0) +\n day -\n 32075;\n\n // JulianDates are noon-based\n hour = hour - 12;\n if (hour < 0) {\n hour += 24;\n }\n\n const secondsOfDay =\n second +\n (hour * TimeConstants.SECONDS_PER_HOUR +\n minute * TimeConstants.SECONDS_PER_MINUTE +\n millisecond * TimeConstants.SECONDS_PER_MILLISECOND);\n\n if (secondsOfDay >= 43200.0) {\n dayNumber -= 1;\n }\n\n return [dayNumber, secondsOfDay];\n}\n\n//Regular expressions used for ISO8601 date parsing.\n//YYYY\nconst matchCalendarYear = /^(\\d{4})$/;\n//YYYY-MM (YYYYMM is invalid)\nconst matchCalendarMonth = /^(\\d{4})-(\\d{2})$/;\n//YYYY-DDD or YYYYDDD\nconst matchOrdinalDate = /^(\\d{4})-?(\\d{3})$/;\n//YYYY-Www or YYYYWww or YYYY-Www-D or YYYYWwwD\nconst matchWeekDate = /^(\\d{4})-?W(\\d{2})-?(\\d{1})?$/;\n//YYYY-MM-DD or YYYYMMDD\nconst matchCalendarDate = /^(\\d{4})-?(\\d{2})-?(\\d{2})$/;\n// Match utc offset\nconst utcOffset = /([Z+\\-])?(\\d{2})?:?(\\d{2})?$/;\n// Match hours HH or HH.xxxxx\nconst matchHours = /^(\\d{2})(\\.\\d+)?/.source + utcOffset.source;\n// Match hours/minutes HH:MM HHMM.xxxxx\nconst matchHoursMinutes = /^(\\d{2}):?(\\d{2})(\\.\\d+)?/.source + utcOffset.source;\n// Match hours/minutes HH:MM:SS HHMMSS.xxxxx\nconst matchHoursMinutesSeconds =\n /^(\\d{2}):?(\\d{2}):?(\\d{2})(\\.\\d+)?/.source + utcOffset.source;\n\nconst iso8601ErrorMessage = \"Invalid ISO 8601 date.\";\n\n/**\n * Represents an astronomical Julian date, which is the number of days since noon on January 1, -4712 (4713 BC).\n * For increased precision, this class stores the whole number part of the date and the seconds\n * part of the date in separate components. In order to be safe for arithmetic and represent\n * leap seconds, the date is always stored in the International Atomic Time standard\n * {@link TimeStandard.TAI}.\n * @alias JulianDate\n * @constructor\n *\n * @param {number} [julianDayNumber=0.0] The Julian Day Number representing the number of whole days. Fractional days will also be handled correctly.\n * @param {number} [secondsOfDay=0.0] The number of seconds into the current Julian Day Number. Fractional seconds, negative seconds and seconds greater than a day will be handled correctly.\n * @param {TimeStandard} [timeStandard=TimeStandard.UTC] The time standard in which the first two parameters are defined.\n */\nfunction JulianDate(julianDayNumber, secondsOfDay, timeStandard) {\n /**\n * Gets or sets the number of whole days.\n * @type {number}\n */\n this.dayNumber = undefined;\n\n /**\n * Gets or sets the number of seconds into the current day.\n * @type {number}\n */\n this.secondsOfDay = undefined;\n\n julianDayNumber = defaultValue(julianDayNumber, 0.0);\n secondsOfDay = defaultValue(secondsOfDay, 0.0);\n timeStandard = defaultValue(timeStandard, TimeStandard.UTC);\n\n //If julianDayNumber is fractional, make it an integer and add the number of seconds the fraction represented.\n const wholeDays = julianDayNumber | 0;\n secondsOfDay =\n secondsOfDay +\n (julianDayNumber - wholeDays) * TimeConstants.SECONDS_PER_DAY;\n\n setComponents(wholeDays, secondsOfDay, this);\n\n if (timeStandard === TimeStandard.UTC) {\n convertUtcToTai(this);\n }\n}\n\n/**\n * Creates a new instance from a GregorianDate.\n *\n * @param {GregorianDate} date A GregorianDate.\n * @param {JulianDate} [result] An existing instance to use for the result.\n * @returns {JulianDate} The modified result parameter or a new instance if none was provided.\n *\n * @exception {DeveloperError} date must be a valid GregorianDate.\n */\nJulianDate.fromGregorianDate = function (date, result) {\n //>>includeStart('debug', pragmas.debug);\n if (!(date instanceof GregorianDate)) {\n throw new DeveloperError(\"date must be a valid GregorianDate.\");\n }\n //>>includeEnd('debug');\n\n const components = computeJulianDateComponents(\n date.year,\n date.month,\n date.day,\n date.hour,\n date.minute,\n date.second,\n date.millisecond,\n );\n if (!defined(result)) {\n return new JulianDate(components[0], components[1], TimeStandard.UTC);\n }\n setComponents(components[0], components[1], result);\n convertUtcToTai(result);\n return result;\n};\n\n/**\n * Creates a new instance from a JavaScript Date.\n *\n * @param {Date} date A JavaScript Date.\n * @param {JulianDate} [result] An existing instance to use for the result.\n * @returns {JulianDate} The modified result parameter or a new instance if none was provided.\n *\n * @exception {DeveloperError} date must be a valid JavaScript Date.\n */\nJulianDate.fromDate = function (date, result) {\n //>>includeStart('debug', pragmas.debug);\n if (!(date instanceof Date) || isNaN(date.getTime())) {\n throw new DeveloperError(\"date must be a valid JavaScript Date.\");\n }\n //>>includeEnd('debug');\n\n const components = computeJulianDateComponents(\n date.getUTCFullYear(),\n date.getUTCMonth() + 1,\n date.getUTCDate(),\n date.getUTCHours(),\n date.getUTCMinutes(),\n date.getUTCSeconds(),\n date.getUTCMilliseconds(),\n );\n if (!defined(result)) {\n return new JulianDate(components[0], components[1], TimeStandard.UTC);\n }\n setComponents(components[0], components[1], result);\n convertUtcToTai(result);\n return result;\n};\n\n/**\n * Creates a new instance from a from an {@link http://en.wikipedia.org/wiki/ISO_8601|ISO 8601} date.\n * This method is superior to Date.parse because it will handle all valid formats defined by the ISO 8601\n * specification, including leap seconds and sub-millisecond times, which discarded by most JavaScript implementations.\n *\n * @param {string} iso8601String An ISO 8601 date.\n * @param {JulianDate} [result] An existing instance to use for the result.\n * @returns {JulianDate} The modified result parameter or a new instance if none was provided.\n *\n * @exception {DeveloperError} Invalid ISO 8601 date.\n */\nJulianDate.fromIso8601 = function (iso8601String, result) {\n //>>includeStart('debug', pragmas.debug);\n if (typeof iso8601String !== \"string\") {\n throw new DeveloperError(iso8601ErrorMessage);\n }\n //>>includeEnd('debug');\n\n //Comma and decimal point both indicate a fractional number according to ISO 8601,\n //start out by blanket replacing , with . which is the only valid such symbol in JS.\n iso8601String = iso8601String.replace(\",\", \".\");\n\n //Split the string into its date and time components, denoted by a mandatory T\n let tokens = iso8601String.split(\"T\");\n let year;\n let month = 1;\n let day = 1;\n let hour = 0;\n let minute = 0;\n let second = 0;\n let millisecond = 0;\n\n //Lacking a time is okay, but a missing date is illegal.\n const date = tokens[0];\n const time = tokens[1];\n let tmp;\n let inLeapYear;\n //>>includeStart('debug', pragmas.debug);\n if (!defined(date)) {\n throw new DeveloperError(iso8601ErrorMessage);\n }\n\n let dashCount;\n //>>includeEnd('debug');\n\n //First match the date against possible regular expressions.\n tokens = date.match(matchCalendarDate);\n if (tokens !== null) {\n //>>includeStart('debug', pragmas.debug);\n dashCount = date.split(\"-\").length - 1;\n if (dashCount > 0 && dashCount !== 2) {\n throw new DeveloperError(iso8601ErrorMessage);\n }\n //>>includeEnd('debug');\n year = +tokens[1];\n month = +tokens[2];\n day = +tokens[3];\n } else {\n tokens = date.match(matchCalendarMonth);\n if (tokens !== null) {\n year = +tokens[1];\n month = +tokens[2];\n } else {\n tokens = date.match(matchCalendarYear);\n if (tokens !== null) {\n year = +tokens[1];\n } else {\n //Not a year/month/day so it must be an ordinal date.\n let dayOfYear;\n tokens = date.match(matchOrdinalDate);\n if (tokens !== null) {\n year = +tokens[1];\n dayOfYear = +tokens[2];\n inLeapYear = isLeapYear(year);\n\n //This validation is only applicable for this format.\n //>>includeStart('debug', pragmas.debug);\n if (\n dayOfYear < 1 ||\n (inLeapYear && dayOfYear > 366) ||\n (!inLeapYear && dayOfYear > 365)\n ) {\n throw new DeveloperError(iso8601ErrorMessage);\n }\n //>>includeEnd('debug')\n } else {\n tokens = date.match(matchWeekDate);\n if (tokens !== null) {\n //ISO week date to ordinal date from\n //http://en.wikipedia.org/w/index.php?title=ISO_week_date&oldid=474176775\n year = +tokens[1];\n const weekNumber = +tokens[2];\n const dayOfWeek = +tokens[3] || 0;\n\n //>>includeStart('debug', pragmas.debug);\n dashCount = date.split(\"-\").length - 1;\n if (\n dashCount > 0 &&\n ((!defined(tokens[3]) && dashCount !== 1) ||\n (defined(tokens[3]) && dashCount !== 2))\n ) {\n throw new DeveloperError(iso8601ErrorMessage);\n }\n //>>includeEnd('debug')\n\n const january4 = new Date(Date.UTC(year, 0, 4));\n dayOfYear = weekNumber * 7 + dayOfWeek - january4.getUTCDay() - 3;\n } else {\n //None of our regular expressions succeeded in parsing the date properly.\n //>>includeStart('debug', pragmas.debug);\n throw new DeveloperError(iso8601ErrorMessage);\n //>>includeEnd('debug')\n }\n }\n //Split an ordinal date into month/day.\n tmp = new Date(Date.UTC(year, 0, 1));\n tmp.setUTCDate(dayOfYear);\n month = tmp.getUTCMonth() + 1;\n day = tmp.getUTCDate();\n }\n }\n }\n\n //Now that we have all of the date components, validate them to make sure nothing is out of range.\n inLeapYear = isLeapYear(year);\n //>>includeStart('debug', pragmas.debug);\n if (\n month < 1 ||\n month > 12 ||\n day < 1 ||\n ((month !== 2 || !inLeapYear) && day > daysInMonth[month - 1]) ||\n (inLeapYear && month === 2 && day > daysInLeapFeburary)\n ) {\n throw new DeveloperError(iso8601ErrorMessage);\n }\n //>>includeEnd('debug')\n\n //Now move onto the time string, which is much simpler.\n //If no time is specified, it is considered the beginning of the day, UTC to match Javascript's implementation.\n let offsetIndex;\n if (defined(time)) {\n tokens = time.match(matchHoursMinutesSeconds);\n if (tokens !== null) {\n //>>includeStart('debug', pragmas.debug);\n dashCount = time.split(\":\").length - 1;\n if (dashCount > 0 && dashCount !== 2 && dashCount !== 3) {\n throw new DeveloperError(iso8601ErrorMessage);\n }\n //>>includeEnd('debug')\n\n hour = +tokens[1];\n minute = +tokens[2];\n second = +tokens[3];\n millisecond = +(tokens[4] || 0) * 1000.0;\n offsetIndex = 5;\n } else {\n tokens = time.match(matchHoursMinutes);\n if (tokens !== null) {\n //>>includeStart('debug', pragmas.debug);\n dashCount = time.split(\":\").length - 1;\n if (dashCount > 2) {\n throw new DeveloperError(iso8601ErrorMessage);\n }\n //>>includeEnd('debug')\n\n hour = +tokens[1];\n minute = +tokens[2];\n second = +(tokens[3] || 0) * 60.0;\n offsetIndex = 4;\n } else {\n tokens = time.match(matchHours);\n if (tokens !== null) {\n hour = +tokens[1];\n minute = +(tokens[2] || 0) * 60.0;\n offsetIndex = 3;\n } else {\n //>>includeStart('debug', pragmas.debug);\n throw new DeveloperError(iso8601ErrorMessage);\n //>>includeEnd('debug')\n }\n }\n }\n\n //Validate that all values are in proper range. Minutes and hours have special cases at 60 and 24.\n //>>includeStart('debug', pragmas.debug);\n if (\n minute >= 60 ||\n second >= 61 ||\n hour > 24 ||\n (hour === 24 && (minute > 0 || second > 0 || millisecond > 0))\n ) {\n throw new DeveloperError(iso8601ErrorMessage);\n }\n //>>includeEnd('debug');\n\n //Check the UTC offset value, if no value exists, use local time\n //a Z indicates UTC, + or - are offsets.\n const offset = tokens[offsetIndex];\n const offsetHours = +tokens[offsetIndex + 1];\n const offsetMinutes = +(tokens[offsetIndex + 2] || 0);\n switch (offset) {\n case \"+\":\n hour = hour - offsetHours;\n minute = minute - offsetMinutes;\n break;\n case \"-\":\n hour = hour + offsetHours;\n minute = minute + offsetMinutes;\n break;\n case \"Z\":\n break;\n default:\n minute =\n minute +\n new Date(\n Date.UTC(year, month - 1, day, hour, minute),\n ).getTimezoneOffset();\n break;\n }\n }\n\n //ISO8601 denotes a leap second by any time having a seconds component of 60 seconds.\n //If that's the case, we need to temporarily subtract a second in order to build a UTC date.\n //Then we add it back in after converting to TAI.\n const isLeapSecond = second === 60;\n if (isLeapSecond) {\n second--;\n }\n\n //Even if we successfully parsed the string into its components, after applying UTC offset or\n //special cases like 24:00:00 denoting midnight, we need to normalize the data appropriately.\n\n //milliseconds can never be greater than 1000, and seconds can't be above 60, so we start with minutes\n while (minute >= 60) {\n minute -= 60;\n hour++;\n }\n\n while (hour >= 24) {\n hour -= 24;\n day++;\n }\n\n tmp = inLeapYear && month === 2 ? daysInLeapFeburary : daysInMonth[month - 1];\n while (day > tmp) {\n day -= tmp;\n month++;\n\n if (month > 12) {\n month -= 12;\n year++;\n }\n\n tmp =\n inLeapYear && month === 2 ? daysInLeapFeburary : daysInMonth[month - 1];\n }\n\n //If UTC offset is at the beginning/end of the day, minutes can be negative.\n while (minute < 0) {\n minute += 60;\n hour--;\n }\n\n while (hour < 0) {\n hour += 24;\n day--;\n }\n\n while (day < 1) {\n month--;\n if (month < 1) {\n month += 12;\n year--;\n }\n\n tmp =\n inLeapYear && month === 2 ? daysInLeapFeburary : daysInMonth[month - 1];\n day += tmp;\n }\n\n //Now create the JulianDate components from the Gregorian date and actually create our instance.\n const components = computeJulianDateComponents(\n year,\n month,\n day,\n hour,\n minute,\n second,\n millisecond,\n );\n\n if (!defined(result)) {\n result = new JulianDate(components[0], components[1], TimeStandard.UTC);\n } else {\n setComponents(components[0], components[1], result);\n convertUtcToTai(result);\n }\n\n //If we were on a leap second, add it back.\n if (isLeapSecond) {\n JulianDate.addSeconds(result, 1, result);\n }\n\n return result;\n};\n\n/**\n * Creates a new instance that represents the current system time.\n * This is equivalent to calling JulianDate.fromDate(new Date());.\n *\n * @param {JulianDate} [result] An existing instance to use for the result.\n * @returns {JulianDate} The modified result parameter or a new instance if none was provided.\n */\nJulianDate.now = function (result) {\n return JulianDate.fromDate(new Date(), result);\n};\n\nconst toGregorianDateScratch = new JulianDate(0, 0, TimeStandard.TAI);\n\n/**\n * Creates a {@link GregorianDate} from the provided instance.\n *\n * @param {JulianDate} julianDate The date to be converted.\n * @param {GregorianDate} [result] An existing instance to use for the result.\n * @returns {GregorianDate} The modified result parameter or a new instance if none was provided.\n */\nJulianDate.toGregorianDate = function (julianDate, result) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(julianDate)) {\n throw new DeveloperError(\"julianDate is required.\");\n }\n //>>includeEnd('debug');\n\n let isLeapSecond = false;\n let thisUtc = convertTaiToUtc(julianDate, toGregorianDateScratch);\n if (!defined(thisUtc)) {\n //Conversion to UTC will fail if we are during a leap second.\n //If that's the case, subtract a second and convert again.\n //JavaScript doesn't support leap seconds, so this results in second 59 being repeated twice.\n JulianDate.addSeconds(julianDate, -1, toGregorianDateScratch);\n thisUtc = convertTaiToUtc(toGregorianDateScratch, toGregorianDateScratch);\n isLeapSecond = true;\n }\n\n let julianDayNumber = thisUtc.dayNumber;\n const secondsOfDay = thisUtc.secondsOfDay;\n\n if (secondsOfDay >= 43200.0) {\n julianDayNumber += 1;\n }\n\n // Algorithm from page 604 of the Explanatory Supplement to the\n // Astronomical Almanac (Seidelmann 1992).\n let L = (julianDayNumber + 68569) | 0;\n const N = ((4 * L) / 146097) | 0;\n L = (L - (((146097 * N + 3) / 4) | 0)) | 0;\n const I = ((4000 * (L + 1)) / 1461001) | 0;\n L = (L - (((1461 * I) / 4) | 0) + 31) | 0;\n const J = ((80 * L) / 2447) | 0;\n const day = (L - (((2447 * J) / 80) | 0)) | 0;\n L = (J / 11) | 0;\n const month = (J + 2 - 12 * L) | 0;\n const year = (100 * (N - 49) + I + L) | 0;\n\n let hour = (secondsOfDay / TimeConstants.SECONDS_PER_HOUR) | 0;\n let remainingSeconds = secondsOfDay - hour * TimeConstants.SECONDS_PER_HOUR;\n const minute = (remainingSeconds / TimeConstants.SECONDS_PER_MINUTE) | 0;\n remainingSeconds =\n remainingSeconds - minute * TimeConstants.SECONDS_PER_MINUTE;\n let second = remainingSeconds | 0;\n const millisecond =\n (remainingSeconds - second) / TimeConstants.SECONDS_PER_MILLISECOND;\n\n // JulianDates are noon-based\n hour += 12;\n if (hour > 23) {\n hour -= 24;\n }\n\n //If we were on a leap second, add it back.\n if (isLeapSecond) {\n second += 1;\n }\n\n if (!defined(result)) {\n return new GregorianDate(\n year,\n month,\n day,\n hour,\n minute,\n second,\n millisecond,\n isLeapSecond,\n );\n }\n\n result.year = year;\n result.month = month;\n result.day = day;\n result.hour = hour;\n result.minute = minute;\n result.second = second;\n result.millisecond = millisecond;\n result.isLeapSecond = isLeapSecond;\n return result;\n};\n\n/**\n * Creates a JavaScript Date from the provided instance.\n * Since JavaScript dates are only accurate to the nearest millisecond and\n * cannot represent a leap second, consider using {@link JulianDate.toGregorianDate} instead.\n * If the provided JulianDate is during a leap second, the previous second is used.\n *\n * @param {JulianDate} julianDate The date to be converted.\n * @returns {Date} A new instance representing the provided date.\n */\nJulianDate.toDate = function (julianDate) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(julianDate)) {\n throw new DeveloperError(\"julianDate is required.\");\n }\n //>>includeEnd('debug');\n\n const gDate = JulianDate.toGregorianDate(julianDate, gregorianDateScratch);\n let second = gDate.second;\n if (gDate.isLeapSecond) {\n second -= 1;\n }\n return new Date(\n Date.UTC(\n gDate.year,\n gDate.month - 1,\n gDate.day,\n gDate.hour,\n gDate.minute,\n second,\n gDate.millisecond,\n ),\n );\n};\n\n/**\n * Creates an ISO8601 representation of the provided date.\n *\n * @param {JulianDate} julianDate The date to be converted.\n * @param {number} [precision] The number of fractional digits used to represent the seconds component. By default, the most precise representation is used.\n * @returns {string} The ISO8601 representation of the provided date.\n */\nJulianDate.toIso8601 = function (julianDate, precision) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(julianDate)) {\n throw new DeveloperError(\"julianDate is required.\");\n }\n //>>includeEnd('debug');\n\n const gDate = JulianDate.toGregorianDate(julianDate, gregorianDateScratch);\n let year = gDate.year;\n let month = gDate.month;\n let day = gDate.day;\n let hour = gDate.hour;\n const minute = gDate.minute;\n const second = gDate.second;\n const millisecond = gDate.millisecond;\n\n // special case - Iso8601.MAXIMUM_VALUE produces a string which we can't parse unless we adjust.\n // 10000-01-01T00:00:00 is the same instant as 9999-12-31T24:00:00\n if (\n year === 10000 &&\n month === 1 &&\n day === 1 &&\n hour === 0 &&\n minute === 0 &&\n second === 0 &&\n millisecond === 0\n ) {\n year = 9999;\n month = 12;\n day = 31;\n hour = 24;\n }\n\n let millisecondStr;\n\n if (!defined(precision) && millisecond !== 0) {\n //Forces milliseconds into a number with at least 3 digits to whatever the default toString() precision is.\n millisecondStr = (millisecond * 0.01).toString().replace(\".\", \"\");\n return `${year.toString().padStart(4, \"0\")}-${month\n .toString()\n .padStart(2, \"0\")}-${day.toString().padStart(2, \"0\")}T${hour\n .toString()\n .padStart(2, \"0\")}:${minute.toString().padStart(2, \"0\")}:${second\n .toString()\n .padStart(2, \"0\")}.${millisecondStr}Z`;\n }\n\n //Precision is either 0 or milliseconds is 0 with undefined precision, in either case, leave off milliseconds entirely\n if (!defined(precision) || precision === 0) {\n return `${year.toString().padStart(4, \"0\")}-${month\n .toString()\n .padStart(2, \"0\")}-${day.toString().padStart(2, \"0\")}T${hour\n .toString()\n .padStart(2, \"0\")}:${minute\n .toString()\n .padStart(2, \"0\")}:${second.toString().padStart(2, \"0\")}Z`;\n }\n\n //Forces milliseconds into a number with at least 3 digits to whatever the specified precision is.\n millisecondStr = (millisecond * 0.01)\n .toFixed(precision)\n .replace(\".\", \"\")\n .slice(0, precision);\n return `${year.toString().padStart(4, \"0\")}-${month\n .toString()\n .padStart(2, \"0\")}-${day.toString().padStart(2, \"0\")}T${hour\n .toString()\n .padStart(2, \"0\")}:${minute.toString().padStart(2, \"0\")}:${second\n .toString()\n .padStart(2, \"0\")}.${millisecondStr}Z`;\n};\n\n/**\n * Duplicates a JulianDate instance.\n *\n * @param {JulianDate} julianDate The date to duplicate.\n * @param {JulianDate} [result] An existing instance to use for the result.\n * @returns {JulianDate} The modified result parameter or a new instance if none was provided. Returns undefined if julianDate is undefined.\n */\nJulianDate.clone = function (julianDate, result) {\n if (!defined(julianDate)) {\n return undefined;\n }\n if (!defined(result)) {\n return new JulianDate(\n julianDate.dayNumber,\n julianDate.secondsOfDay,\n TimeStandard.TAI,\n );\n }\n result.dayNumber = julianDate.dayNumber;\n result.secondsOfDay = julianDate.secondsOfDay;\n return result;\n};\n\n/**\n * Compares two instances.\n *\n * @param {JulianDate} left The first instance.\n * @param {JulianDate} right The second instance.\n * @returns {number} A negative value if left is less than right, a positive value if left is greater than right, or zero if left and right are equal.\n */\nJulianDate.compare = function (left, right) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(left)) {\n throw new DeveloperError(\"left is required.\");\n }\n if (!defined(right)) {\n throw new DeveloperError(\"right is required.\");\n }\n //>>includeEnd('debug');\n\n const julianDayNumberDifference = left.dayNumber - right.dayNumber;\n if (julianDayNumberDifference !== 0) {\n return julianDayNumberDifference;\n }\n return left.secondsOfDay - right.secondsOfDay;\n};\n\n/**\n * Compares two instances and returns true if they are equal, false otherwise.\n *\n * @param {JulianDate} [left] The first instance.\n * @param {JulianDate} [right] The second instance.\n * @returns {boolean} true if the dates are equal; otherwise, false.\n */\nJulianDate.equals = function (left, right) {\n return (\n left === right ||\n (defined(left) &&\n defined(right) &&\n left.dayNumber === right.dayNumber &&\n left.secondsOfDay === right.secondsOfDay)\n );\n};\n\n/**\n * Compares two instances and returns true if they are within epsilon seconds of\n * each other. That is, in order for the dates to be considered equal (and for\n * this function to return true), the absolute value of the difference between them, in\n * seconds, must be less than epsilon.\n *\n * @param {JulianDate} [left] The first instance.\n * @param {JulianDate} [right] The second instance.\n * @param {number} [epsilon=0] The maximum number of seconds that should separate the two instances.\n * @returns {boolean} true if the two dates are within epsilon seconds of each other; otherwise false.\n */\nJulianDate.equalsEpsilon = function (left, right, epsilon) {\n epsilon = defaultValue(epsilon, 0);\n\n return (\n left === right ||\n (defined(left) &&\n defined(right) &&\n Math.abs(JulianDate.secondsDifference(left, right)) <= epsilon)\n );\n};\n\n/**\n * Computes the total number of whole and fractional days represented by the provided instance.\n *\n * @param {JulianDate} julianDate The date.\n * @returns {number} The Julian date as single floating point number.\n */\nJulianDate.totalDays = function (julianDate) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(julianDate)) {\n throw new DeveloperError(\"julianDate is required.\");\n }\n //>>includeEnd('debug');\n return (\n julianDate.dayNumber +\n julianDate.secondsOfDay / TimeConstants.SECONDS_PER_DAY\n );\n};\n\n/**\n * Computes the difference in seconds between the provided instance.\n *\n * @param {JulianDate} left The first instance.\n * @param {JulianDate} right The second instance.\n * @returns {number} The difference, in seconds, when subtracting right from left.\n */\nJulianDate.secondsDifference = function (left, right) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(left)) {\n throw new DeveloperError(\"left is required.\");\n }\n if (!defined(right)) {\n throw new DeveloperError(\"right is required.\");\n }\n //>>includeEnd('debug');\n\n const dayDifference =\n (left.dayNumber - right.dayNumber) * TimeConstants.SECONDS_PER_DAY;\n return dayDifference + (left.secondsOfDay - right.secondsOfDay);\n};\n\n/**\n * Computes the difference in days between the provided instance.\n *\n * @param {JulianDate} left The first instance.\n * @param {JulianDate} right The second instance.\n * @returns {number} The difference, in days, when subtracting right from left.\n */\nJulianDate.daysDifference = function (left, right) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(left)) {\n throw new DeveloperError(\"left is required.\");\n }\n if (!defined(right)) {\n throw new DeveloperError(\"right is required.\");\n }\n //>>includeEnd('debug');\n\n const dayDifference = left.dayNumber - right.dayNumber;\n const secondDifference =\n (left.secondsOfDay - right.secondsOfDay) / TimeConstants.SECONDS_PER_DAY;\n return dayDifference + secondDifference;\n};\n\n/**\n * Computes the number of seconds the provided instance is ahead of UTC.\n *\n * @param {JulianDate} julianDate The date.\n * @returns {number} The number of seconds the provided instance is ahead of UTC\n */\nJulianDate.computeTaiMinusUtc = function (julianDate) {\n binarySearchScratchLeapSecond.julianDate = julianDate;\n const leapSeconds = JulianDate.leapSeconds;\n let index = binarySearch(\n leapSeconds,\n binarySearchScratchLeapSecond,\n compareLeapSecondDates,\n );\n if (index < 0) {\n index = ~index;\n --index;\n if (index < 0) {\n index = 0;\n }\n }\n return leapSeconds[index].offset;\n};\n\n/**\n * Adds the provided number of seconds to the provided date instance.\n *\n * @param {JulianDate} julianDate The date.\n * @param {number} seconds The number of seconds to add or subtract.\n * @param {JulianDate} result An existing instance to use for the result.\n * @returns {JulianDate} The modified result parameter.\n */\nJulianDate.addSeconds = function (julianDate, seconds, result) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(julianDate)) {\n throw new DeveloperError(\"julianDate is required.\");\n }\n if (!defined(seconds)) {\n throw new DeveloperError(\"seconds is required.\");\n }\n if (!defined(result)) {\n throw new DeveloperError(\"result is required.\");\n }\n //>>includeEnd('debug');\n\n return setComponents(\n julianDate.dayNumber,\n julianDate.secondsOfDay + seconds,\n result,\n );\n};\n\n/**\n * Adds the provided number of minutes to the provided date instance.\n *\n * @param {JulianDate} julianDate The date.\n * @param {number} minutes The number of minutes to add or subtract.\n * @param {JulianDate} result An existing instance to use for the result.\n * @returns {JulianDate} The modified result parameter.\n */\nJulianDate.addMinutes = function (julianDate, minutes, result) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(julianDate)) {\n throw new DeveloperError(\"julianDate is required.\");\n }\n if (!defined(minutes)) {\n throw new DeveloperError(\"minutes is required.\");\n }\n if (!defined(result)) {\n throw new DeveloperError(\"result is required.\");\n }\n //>>includeEnd('debug');\n\n const newSecondsOfDay =\n julianDate.secondsOfDay + minutes * TimeConstants.SECONDS_PER_MINUTE;\n return setComponents(julianDate.dayNumber, newSecondsOfDay, result);\n};\n\n/**\n * Adds the provided number of hours to the provided date instance.\n *\n * @param {JulianDate} julianDate The date.\n * @param {number} hours The number of hours to add or subtract.\n * @param {JulianDate} result An existing instance to use for the result.\n * @returns {JulianDate} The modified result parameter.\n */\nJulianDate.addHours = function (julianDate, hours, result) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(julianDate)) {\n throw new DeveloperError(\"julianDate is required.\");\n }\n if (!defined(hours)) {\n throw new DeveloperError(\"hours is required.\");\n }\n if (!defined(result)) {\n throw new DeveloperError(\"result is required.\");\n }\n //>>includeEnd('debug');\n\n const newSecondsOfDay =\n julianDate.secondsOfDay + hours * TimeConstants.SECONDS_PER_HOUR;\n return setComponents(julianDate.dayNumber, newSecondsOfDay, result);\n};\n\n/**\n * Adds the provided number of days to the provided date instance.\n *\n * @param {JulianDate} julianDate The date.\n * @param {number} days The number of days to add or subtract.\n * @param {JulianDate} result An existing instance to use for the result.\n * @returns {JulianDate} The modified result parameter.\n */\nJulianDate.addDays = function (julianDate, days, result) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(julianDate)) {\n throw new DeveloperError(\"julianDate is required.\");\n }\n if (!defined(days)) {\n throw new DeveloperError(\"days is required.\");\n }\n if (!defined(result)) {\n throw new DeveloperError(\"result is required.\");\n }\n //>>includeEnd('debug');\n\n const newJulianDayNumber = julianDate.dayNumber + days;\n return setComponents(newJulianDayNumber, julianDate.secondsOfDay, result);\n};\n\n/**\n * Compares the provided instances and returns true if left is earlier than right, false otherwise.\n *\n * @param {JulianDate} left The first instance.\n * @param {JulianDate} right The second instance.\n * @returns {boolean} true if left is earlier than right, false otherwise.\n */\nJulianDate.lessThan = function (left, right) {\n return JulianDate.compare(left, right) < 0;\n};\n\n/**\n * Compares the provided instances and returns true if left is earlier than or equal to right, false otherwise.\n *\n * @param {JulianDate} left The first instance.\n * @param {JulianDate} right The second instance.\n * @returns {boolean} true if left is earlier than or equal to right, false otherwise.\n */\nJulianDate.lessThanOrEquals = function (left, right) {\n return JulianDate.compare(left, right) <= 0;\n};\n\n/**\n * Compares the provided instances and returns true if left is later than right, false otherwise.\n *\n * @param {JulianDate} left The first instance.\n * @param {JulianDate} right The second instance.\n * @returns {boolean} true if left is later than right, false otherwise.\n */\nJulianDate.greaterThan = function (left, right) {\n return JulianDate.compare(left, right) > 0;\n};\n\n/**\n * Compares the provided instances and returns true if left is later than or equal to right, false otherwise.\n *\n * @param {JulianDate} left The first instance.\n * @param {JulianDate} right The second instance.\n * @returns {boolean} true if left is later than or equal to right, false otherwise.\n */\nJulianDate.greaterThanOrEquals = function (left, right) {\n return JulianDate.compare(left, right) >= 0;\n};\n\n/**\n * Duplicates this instance.\n *\n * @param {JulianDate} [result] An existing instance to use for the result.\n * @returns {JulianDate} The modified result parameter or a new instance if none was provided.\n */\nJulianDate.prototype.clone = function (result) {\n return JulianDate.clone(this, result);\n};\n\n/**\n * Compares this and the provided instance and returns true if they are equal, false otherwise.\n *\n * @param {JulianDate} [right] The second instance.\n * @returns {boolean} true if the dates are equal; otherwise, false.\n */\nJulianDate.prototype.equals = function (right) {\n return JulianDate.equals(this, right);\n};\n\n/**\n * Compares this and the provided instance and returns true if they are within epsilon seconds of\n * each other. That is, in order for the dates to be considered equal (and for\n * this function to return true), the absolute value of the difference between them, in\n * seconds, must be less than epsilon.\n *\n * @param {JulianDate} [right] The second instance.\n * @param {number} [epsilon=0] The maximum number of seconds that should separate the two instances.\n * @returns {boolean} true if the two dates are within epsilon seconds of each other; otherwise false.\n */\nJulianDate.prototype.equalsEpsilon = function (right, epsilon) {\n return JulianDate.equalsEpsilon(this, right, epsilon);\n};\n\n/**\n * Creates a string representing this date in ISO8601 format.\n *\n * @returns {string} A string representing this date in ISO8601 format.\n */\nJulianDate.prototype.toString = function () {\n return JulianDate.toIso8601(this);\n};\n\n/**\n * Gets or sets the list of leap seconds used throughout Cesium.\n * @memberof JulianDate\n * @type {LeapSecond[]}\n */\nJulianDate.leapSeconds = [\n new LeapSecond(new JulianDate(2441317, 43210.0, TimeStandard.TAI), 10), // January 1, 1972 00:00:00 UTC\n new LeapSecond(new JulianDate(2441499, 43211.0, TimeStandard.TAI), 11), // July 1, 1972 00:00:00 UTC\n new LeapSecond(new JulianDate(2441683, 43212.0, TimeStandard.TAI), 12), // January 1, 1973 00:00:00 UTC\n new LeapSecond(new JulianDate(2442048, 43213.0, TimeStandard.TAI), 13), // January 1, 1974 00:00:00 UTC\n new LeapSecond(new JulianDate(2442413, 43214.0, TimeStandard.TAI), 14), // January 1, 1975 00:00:00 UTC\n new LeapSecond(new JulianDate(2442778, 43215.0, TimeStandard.TAI), 15), // January 1, 1976 00:00:00 UTC\n new LeapSecond(new JulianDate(2443144, 43216.0, TimeStandard.TAI), 16), // January 1, 1977 00:00:00 UTC\n new LeapSecond(new JulianDate(2443509, 43217.0, TimeStandard.TAI), 17), // January 1, 1978 00:00:00 UTC\n new LeapSecond(new JulianDate(2443874, 43218.0, TimeStandard.TAI), 18), // January 1, 1979 00:00:00 UTC\n new LeapSecond(new JulianDate(2444239, 43219.0, TimeStandard.TAI), 19), // January 1, 1980 00:00:00 UTC\n new LeapSecond(new JulianDate(2444786, 43220.0, TimeStandard.TAI), 20), // July 1, 1981 00:00:00 UTC\n new LeapSecond(new JulianDate(2445151, 43221.0, TimeStandard.TAI), 21), // July 1, 1982 00:00:00 UTC\n new LeapSecond(new JulianDate(2445516, 43222.0, TimeStandard.TAI), 22), // July 1, 1983 00:00:00 UTC\n new LeapSecond(new JulianDate(2446247, 43223.0, TimeStandard.TAI), 23), // July 1, 1985 00:00:00 UTC\n new LeapSecond(new JulianDate(2447161, 43224.0, TimeStandard.TAI), 24), // January 1, 1988 00:00:00 UTC\n new LeapSecond(new JulianDate(2447892, 43225.0, TimeStandard.TAI), 25), // January 1, 1990 00:00:00 UTC\n new LeapSecond(new JulianDate(2448257, 43226.0, TimeStandard.TAI), 26), // January 1, 1991 00:00:00 UTC\n new LeapSecond(new JulianDate(2448804, 43227.0, TimeStandard.TAI), 27), // July 1, 1992 00:00:00 UTC\n new LeapSecond(new JulianDate(2449169, 43228.0, TimeStandard.TAI), 28), // July 1, 1993 00:00:00 UTC\n new LeapSecond(new JulianDate(2449534, 43229.0, TimeStandard.TAI), 29), // July 1, 1994 00:00:00 UTC\n new LeapSecond(new JulianDate(2450083, 43230.0, TimeStandard.TAI), 30), // January 1, 1996 00:00:00 UTC\n new LeapSecond(new JulianDate(2450630, 43231.0, TimeStandard.TAI), 31), // July 1, 1997 00:00:00 UTC\n new LeapSecond(new JulianDate(2451179, 43232.0, TimeStandard.TAI), 32), // January 1, 1999 00:00:00 UTC\n new LeapSecond(new JulianDate(2453736, 43233.0, TimeStandard.TAI), 33), // January 1, 2006 00:00:00 UTC\n new LeapSecond(new JulianDate(2454832, 43234.0, TimeStandard.TAI), 34), // January 1, 2009 00:00:00 UTC\n new LeapSecond(new JulianDate(2456109, 43235.0, TimeStandard.TAI), 35), // July 1, 2012 00:00:00 UTC\n new LeapSecond(new JulianDate(2457204, 43236.0, TimeStandard.TAI), 36), // July 1, 2015 00:00:00 UTC\n new LeapSecond(new JulianDate(2457754, 43237.0, TimeStandard.TAI), 37), // January 1, 2017 00:00:00 UTC\n];\nexport default JulianDate;\n","import Check from \"./Check.js\";\nimport defaultValue from \"./defaultValue.js\";\nimport DeveloperError from \"./DeveloperError.js\";\nimport isLeapYear from \"./isLeapYear.js\";\n\nconst daysInYear = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\n\n/**\n * Represents a Gregorian date in a more precise format than the JavaScript Date object.\n * In addition to submillisecond precision, this object can also represent leap seconds.\n * @alias GregorianDate\n * @constructor\n *\n * @param {number} [year] The year as a whole number.\n * @param {number} [month] The month as a whole number with range [1, 12].\n * @param {number} [day] The day of the month as a whole number starting at 1.\n * @param {number} [hour] The hour as a whole number with range [0, 23].\n * @param {number} [minute] The minute of the hour as a whole number with range [0, 59].\n * @param {number} [second] The second of the minute as a whole number with range [0, 60], with 60 representing a leap second.\n * @param {number} [millisecond] The millisecond of the second as a floating point number with range [0.0, 1000.0).\n * @param {boolean} [isLeapSecond] Whether this time is during a leap second.\n *\n * @see JulianDate#toGregorianDate\n */\nfunction GregorianDate(\n year,\n month,\n day,\n hour,\n minute,\n second,\n millisecond,\n isLeapSecond,\n) {\n const minimumYear = 1;\n const minimumMonth = 1;\n const minimumDay = 1;\n const minimumHour = 0;\n const minimumMinute = 0;\n const minimumSecond = 0;\n const minimumMillisecond = 0;\n\n year = defaultValue(year, minimumYear);\n month = defaultValue(month, minimumMonth);\n day = defaultValue(day, minimumDay);\n hour = defaultValue(hour, minimumHour);\n minute = defaultValue(minute, minimumMinute);\n second = defaultValue(second, minimumSecond);\n millisecond = defaultValue(millisecond, minimumMillisecond);\n isLeapSecond = defaultValue(isLeapSecond, false);\n //>>includeStart('debug', pragmas.debug);\n validateRange();\n validateDate();\n //>>includeEnd('debug');\n\n /**\n * Gets or sets the year as a whole number.\n * @type {number}\n */\n this.year = year;\n /**\n * Gets or sets the month as a whole number with range [1, 12].\n * @type {number}\n */\n this.month = month;\n /**\n * Gets or sets the day of the month as a whole number starting at 1.\n * @type {number}\n */\n this.day = day;\n /**\n * Gets or sets the hour as a whole number with range [0, 23].\n * @type {number}\n */\n this.hour = hour;\n /**\n * Gets or sets the minute of the hour as a whole number with range [0, 59].\n * @type {number}\n */\n this.minute = minute;\n /**\n * Gets or sets the second of the minute as a whole number with range [0, 60], with 60 representing a leap second.\n * @type {number}\n */\n this.second = second;\n /**\n * Gets or sets the millisecond of the second as a floating point number with range [0.0, 1000.0).\n * @type {number}\n */\n this.millisecond = millisecond;\n /**\n * Gets or sets whether this time is during a leap second.\n * @type {boolean}\n */\n this.isLeapSecond = isLeapSecond;\n\n function validateRange() {\n const maximumYear = 9999;\n const maximumMonth = 12;\n const maximumDay = 31;\n const maximumHour = 23;\n const maximumMinute = 59;\n const maximumSecond = 59;\n const excludedMaximumMilisecond = 1000;\n\n Check.typeOf.number.greaterThanOrEquals(\"Year\", year, minimumYear);\n Check.typeOf.number.lessThanOrEquals(\"Year\", year, maximumYear);\n\n Check.typeOf.number.greaterThanOrEquals(\"Month\", month, minimumMonth);\n Check.typeOf.number.lessThanOrEquals(\"Month\", month, maximumMonth);\n\n Check.typeOf.number.greaterThanOrEquals(\"Day\", day, minimumDay);\n Check.typeOf.number.lessThanOrEquals(\"Day\", day, maximumDay);\n\n Check.typeOf.number.greaterThanOrEquals(\"Hour\", hour, minimumHour);\n Check.typeOf.number.lessThanOrEquals(\"Hour\", hour, maximumHour);\n\n Check.typeOf.number.greaterThanOrEquals(\"Minute\", minute, minimumMinute);\n Check.typeOf.number.lessThanOrEquals(\"Minute\", minute, maximumMinute);\n\n Check.typeOf.bool(\"IsLeapSecond\", isLeapSecond);\n\n Check.typeOf.number.greaterThanOrEquals(\"Second\", second, minimumSecond);\n Check.typeOf.number.lessThanOrEquals(\n \"Second\",\n second,\n isLeapSecond ? maximumSecond + 1 : maximumSecond,\n );\n\n Check.typeOf.number.greaterThanOrEquals(\n \"Millisecond\",\n millisecond,\n minimumMillisecond,\n );\n Check.typeOf.number.lessThan(\n \"Millisecond\",\n millisecond,\n excludedMaximumMilisecond,\n );\n }\n\n // Javascript date object supports only dates greater than 1901. Thus validating with custom logic\n function validateDate() {\n const daysInMonth =\n month === 2 && isLeapYear(year)\n ? daysInYear[month - 1] + 1\n : daysInYear[month - 1];\n\n if (day > daysInMonth) {\n throw new DeveloperError(\"Month and Day represents invalid date\");\n }\n }\n}\nexport default GregorianDate;\n","import DeveloperError from \"./DeveloperError.js\";\n\n/**\n * Determines if a given date is a leap year.\n *\n * @function isLeapYear\n *\n * @param {number} year The year to be tested.\n * @returns {boolean} True if year is a leap year.\n *\n * @example\n * const leapYear = Cesium.isLeapYear(2000); // true\n */\nfunction isLeapYear(year) {\n //>>includeStart('debug', pragmas.debug);\n if (year === null || isNaN(year)) {\n throw new DeveloperError(\"year is required and must be a number.\");\n }\n //>>includeEnd('debug');\n\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n}\nexport default isLeapYear;\n","/**\n * Describes a single leap second, which is constructed from a {@link JulianDate} and a\n * numerical offset representing the number of seconds TAI is ahead of the UTC time standard.\n * @alias LeapSecond\n * @constructor\n *\n * @param {JulianDate} [date] A Julian date representing the time of the leap second.\n * @param {number} [offset] The cumulative number of seconds that TAI is ahead of UTC at the provided date.\n */\nfunction LeapSecond(date, offset) {\n /**\n * Gets or sets the date at which this leap second occurs.\n * @type {JulianDate}\n */\n this.julianDate = date;\n\n /**\n * Gets or sets the cumulative number of seconds between the UTC and TAI time standards at the time\n * of this leap second.\n * @type {number}\n */\n this.offset = offset;\n}\nexport default LeapSecond;\n","/**\n * Constants for time conversions like those done by {@link JulianDate}.\n *\n * @namespace TimeConstants\n *\n * @see JulianDate\n *\n * @private\n */\nconst TimeConstants = {\n /**\n * The number of seconds in one millisecond: 0.001\n * @type {number}\n * @constant\n */\n SECONDS_PER_MILLISECOND: 0.001,\n\n /**\n * The number of seconds in one minute: 60.\n * @type {number}\n * @constant\n */\n SECONDS_PER_MINUTE: 60.0,\n\n /**\n * The number of minutes in one hour: 60.\n * @type {number}\n * @constant\n */\n MINUTES_PER_HOUR: 60.0,\n\n /**\n * The number of hours in one day: 24.\n * @type {number}\n * @constant\n */\n HOURS_PER_DAY: 24.0,\n\n /**\n * The number of seconds in one hour: 3600.\n * @type {number}\n * @constant\n */\n SECONDS_PER_HOUR: 3600.0,\n\n /**\n * The number of minutes in one day: 1440.\n * @type {number}\n * @constant\n */\n MINUTES_PER_DAY: 1440.0,\n\n /**\n * The number of seconds in one day, ignoring leap seconds: 86400.\n * @type {number}\n * @constant\n */\n SECONDS_PER_DAY: 86400.0,\n\n /**\n * The number of days in one Julian century: 36525.\n * @type {number}\n * @constant\n */\n DAYS_PER_JULIAN_CENTURY: 36525.0,\n\n /**\n * One trillionth of a second.\n * @type {number}\n * @constant\n */\n PICOSECOND: 0.000000001,\n\n /**\n * The number of days to subtract from a Julian date to determine the\n * modified Julian date, which gives the number of days since midnight\n * on November 17, 1858.\n * @type {number}\n * @constant\n */\n MODIFIED_JULIAN_DATE_DIFFERENCE: 2400000.5,\n};\nexport default Object.freeze(TimeConstants);\n","/**\n * Provides the type of time standards which JulianDate can take as input.\n *\n * @enum {number}\n *\n * @see JulianDate\n */\nconst TimeStandard = {\n /**\n * Represents the coordinated Universal Time (UTC) time standard.\n *\n * UTC is related to TAI according to the relationship\n * UTC = TAI - deltaT where deltaT is the number of leap\n * seconds which have been introduced as of the time in TAI.\n *\n * @type {number}\n * @constant\n */\n UTC: 0,\n\n /**\n * Represents the International Atomic Time (TAI) time standard.\n * TAI is the principal time standard to which the other time standards are related.\n *\n * @type {number}\n * @constant\n */\n TAI: 1,\n};\nexport default Object.freeze(TimeStandard);\n","import Uri from \"urijs\";\nimport appendForwardSlash from \"./appendForwardSlash.js\";\nimport Check from \"./Check.js\";\nimport clone from \"./clone.js\";\nimport combine from \"./combine.js\";\nimport defaultValue from \"./defaultValue.js\";\nimport defer from \"./defer.js\";\nimport defined from \"./defined.js\";\nimport DeveloperError from \"./DeveloperError.js\";\nimport getAbsoluteUri from \"./getAbsoluteUri.js\";\nimport getBaseUri from \"./getBaseUri.js\";\nimport getExtensionFromUri from \"./getExtensionFromUri.js\";\nimport getImagePixels from \"./getImagePixels.js\";\nimport isBlobUri from \"./isBlobUri.js\";\nimport isCrossOriginUrl from \"./isCrossOriginUrl.js\";\nimport isDataUri from \"./isDataUri.js\";\nimport loadAndExecuteScript from \"./loadAndExecuteScript.js\";\nimport CesiumMath from \"./Math.js\";\nimport objectToQuery from \"./objectToQuery.js\";\nimport queryToObject from \"./queryToObject.js\";\nimport Request from \"./Request.js\";\nimport RequestErrorEvent from \"./RequestErrorEvent.js\";\nimport RequestScheduler from \"./RequestScheduler.js\";\nimport RequestState from \"./RequestState.js\";\nimport RuntimeError from \"./RuntimeError.js\";\nimport TrustedServers from \"./TrustedServers.js\";\n\nconst xhrBlobSupported = (function () {\n try {\n const xhr = new XMLHttpRequest();\n xhr.open(\"GET\", \"#\", true);\n xhr.responseType = \"blob\";\n return xhr.responseType === \"blob\";\n } catch (e) {\n return false;\n }\n})();\n\n/**\n * @typedef {object} Resource.ConstructorOptions\n *\n * Initialization options for the Resource constructor\n *\n * @property {string} url The url of the resource.\n * @property {object} [queryParameters] An object containing query parameters that will be sent when retrieving the resource.\n * @property {object} [templateValues] Key/Value pairs that are used to replace template values (eg. {x}).\n * @property {object} [headers={}] Additional HTTP headers that will be sent.\n * @property {Proxy} [proxy] A proxy to be used when loading the resource.\n * @property {Resource.RetryCallback} [retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.\n * @property {number} [retryAttempts=0] The number of times the retryCallback should be called before giving up.\n * @property {Request} [request] A Request object that will be used. Intended for internal use only.\n * @property {boolean} [parseUrl=true] If true, parse the url for query parameters; otherwise store the url without change\n */\n\n/**\n * A resource that includes the location and any other parameters we need to retrieve it or create derived resources. It also provides the ability to retry requests.\n *\n * @alias Resource\n * @constructor\n *\n * @param {string|Resource.ConstructorOptions} options A url or an object describing initialization options\n *\n * @example\n * function refreshTokenRetryCallback(resource, error) {\n * if (error.statusCode === 403) {\n * // 403 status code means a new token should be generated\n * return getNewAccessToken()\n * .then(function(token) {\n * resource.queryParameters.access_token = token;\n * return true;\n * })\n * .catch(function() {\n * return false;\n * });\n * }\n *\n * return false;\n * }\n *\n * const resource = new Resource({\n * url: 'http://server.com/path/to/resource.json',\n * proxy: new DefaultProxy('/proxy/'),\n * headers: {\n * 'X-My-Header': 'valueOfHeader'\n * },\n * queryParameters: {\n * 'access_token': '123-435-456-000'\n * },\n * retryCallback: refreshTokenRetryCallback,\n * retryAttempts: 1\n * });\n */\nfunction Resource(options) {\n options = defaultValue(options, defaultValue.EMPTY_OBJECT);\n if (typeof options === \"string\") {\n options = {\n url: options,\n };\n }\n\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.string(\"options.url\", options.url);\n //>>includeEnd('debug');\n\n this._url = undefined;\n this._templateValues = defaultClone(options.templateValues, {});\n this._queryParameters = defaultClone(options.queryParameters, {});\n\n /**\n * Additional HTTP headers that will be sent with the request.\n *\n * @type {object}\n */\n this.headers = defaultClone(options.headers, {});\n\n /**\n * A Request object that will be used. Intended for internal use only.\n *\n * @type {Request}\n */\n this.request = defaultValue(options.request, new Request());\n\n /**\n * A proxy to be used when loading the resource.\n *\n * @type {Proxy}\n */\n this.proxy = options.proxy;\n\n /**\n * Function to call when a request for this resource fails. If it returns true or a Promise that resolves to true, the request will be retried.\n *\n * @type {Function}\n */\n this.retryCallback = options.retryCallback;\n\n /**\n * The number of times the retryCallback should be called before giving up.\n *\n * @type {number}\n */\n this.retryAttempts = defaultValue(options.retryAttempts, 0);\n this._retryCount = 0;\n\n const parseUrl = defaultValue(options.parseUrl, true);\n if (parseUrl) {\n this.parseUrl(options.url, true, true);\n } else {\n this._url = options.url;\n }\n\n this._credits = options.credits;\n}\n\n/**\n * Clones a value if it is defined, otherwise returns the default value\n *\n * @param {object} [value] The value to clone.\n * @param {object} [defaultValue] The default value.\n *\n * @returns {object} A clone of value or the defaultValue.\n *\n * @private\n */\nfunction defaultClone(value, defaultValue) {\n return defined(value) ? clone(value) : defaultValue;\n}\n\n/**\n * A helper function to create a resource depending on whether we have a String or a Resource\n *\n * @param {Resource|string} resource A Resource or a String to use when creating a new Resource.\n *\n * @returns {Resource} If resource is a String, a Resource constructed with the url and options. Otherwise the resource parameter is returned.\n *\n * @private\n */\nResource.createIfNeeded = function (resource) {\n if (resource instanceof Resource) {\n // Keep existing request object. This function is used internally to duplicate a Resource, so that it can't\n // be modified outside of a class that holds it (eg. an imagery or terrain provider). Since the Request objects\n // are managed outside of the providers, by the tile loading code, we want to keep the request property the same so if it is changed\n // in the underlying tiling code the requests for this resource will use it.\n return resource.getDerivedResource({\n request: resource.request,\n });\n }\n\n if (typeof resource !== \"string\") {\n return resource;\n }\n\n return new Resource({\n url: resource,\n });\n};\n\nlet supportsImageBitmapOptionsPromise;\n/**\n * A helper function to check whether createImageBitmap supports passing ImageBitmapOptions.\n *\n * @returns {Promise} A promise that resolves to true if this browser supports creating an ImageBitmap with options.\n *\n * @private\n */\nResource.supportsImageBitmapOptions = function () {\n // Until the HTML folks figure out what to do about this, we need to actually try loading an image to\n // know if this browser supports passing options to the createImageBitmap function.\n // https://github.com/whatwg/html/pull/4248\n //\n // We also need to check whether the colorSpaceConversion option is supported.\n // We do this by loading a PNG with an embedded color profile, first with\n // colorSpaceConversion: \"none\" and then with colorSpaceConversion: \"default\".\n // If the pixel color is different then we know the option is working.\n // As of Webkit 17612.3.6.1.6 the createImageBitmap promise resolves but the\n // option is not actually supported.\n if (defined(supportsImageBitmapOptionsPromise)) {\n return supportsImageBitmapOptionsPromise;\n }\n\n if (typeof createImageBitmap !== \"function\") {\n supportsImageBitmapOptionsPromise = Promise.resolve(false);\n return supportsImageBitmapOptionsPromise;\n }\n\n const imageDataUri =\n \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAABGdBTUEAAE4g3rEiDgAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADElEQVQI12Ng6GAAAAEUAIngE3ZiAAAAAElFTkSuQmCC\";\n\n supportsImageBitmapOptionsPromise = Resource.fetchBlob({\n url: imageDataUri,\n })\n .then(function (blob) {\n const imageBitmapOptions = {\n imageOrientation: \"flipY\", // default is \"none\"\n premultiplyAlpha: \"none\", // default is \"default\"\n colorSpaceConversion: \"none\", // default is \"default\"\n };\n return Promise.all([\n createImageBitmap(blob, imageBitmapOptions),\n createImageBitmap(blob),\n ]);\n })\n .then(function (imageBitmaps) {\n // Check whether the colorSpaceConversion option had any effect on the green channel\n const colorWithOptions = getImagePixels(imageBitmaps[0]);\n const colorWithDefaults = getImagePixels(imageBitmaps[1]);\n return colorWithOptions[1] !== colorWithDefaults[1];\n })\n .catch(function () {\n return false;\n });\n\n return supportsImageBitmapOptionsPromise;\n};\n\nObject.defineProperties(Resource, {\n /**\n * Returns true if blobs are supported.\n *\n * @memberof Resource\n * @type {boolean}\n *\n * @readonly\n */\n isBlobSupported: {\n get: function () {\n return xhrBlobSupported;\n },\n },\n});\n\nObject.defineProperties(Resource.prototype, {\n /**\n * Query parameters appended to the url.\n *\n * @memberof Resource.prototype\n * @type {object}\n *\n * @readonly\n */\n queryParameters: {\n get: function () {\n return this._queryParameters;\n },\n },\n\n /**\n * The key/value pairs used to replace template parameters in the url.\n *\n * @memberof Resource.prototype\n * @type {object}\n *\n * @readonly\n */\n templateValues: {\n get: function () {\n return this._templateValues;\n },\n },\n\n /**\n * The url to the resource with template values replaced, query string appended and encoded by proxy if one was set.\n *\n * @memberof Resource.prototype\n * @type {string}\n */\n url: {\n get: function () {\n return this.getUrlComponent(true, true);\n },\n set: function (value) {\n this.parseUrl(value, false, false);\n },\n },\n\n /**\n * The file extension of the resource.\n *\n * @memberof Resource.prototype\n * @type {string}\n *\n * @readonly\n */\n extension: {\n get: function () {\n return getExtensionFromUri(this._url);\n },\n },\n\n /**\n * True if the Resource refers to a data URI.\n *\n * @memberof Resource.prototype\n * @type {boolean}\n */\n isDataUri: {\n get: function () {\n return isDataUri(this._url);\n },\n },\n\n /**\n * True if the Resource refers to a blob URI.\n *\n * @memberof Resource.prototype\n * @type {boolean}\n */\n isBlobUri: {\n get: function () {\n return isBlobUri(this._url);\n },\n },\n\n /**\n * True if the Resource refers to a cross origin URL.\n *\n * @memberof Resource.prototype\n * @type {boolean}\n */\n isCrossOriginUrl: {\n get: function () {\n return isCrossOriginUrl(this._url);\n },\n },\n\n /**\n * True if the Resource has request headers. This is equivalent to checking if the headers property has any keys.\n *\n * @memberof Resource.prototype\n * @type {boolean}\n */\n hasHeaders: {\n get: function () {\n return Object.keys(this.headers).length > 0;\n },\n },\n\n /**\n * Gets the credits required for attribution of an asset.\n * @private\n */\n credits: {\n get: function () {\n return this._credits;\n },\n },\n});\n\n/**\n * Override Object#toString so that implicit string conversion gives the\n * complete URL represented by this Resource.\n *\n * @returns {string} The URL represented by this Resource\n */\nResource.prototype.toString = function () {\n return this.getUrlComponent(true, true);\n};\n\n/**\n * Parse a url string, and store its info\n *\n * @param {string} url The input url string.\n * @param {boolean} merge If true, we'll merge with the resource's existing queryParameters. Otherwise they will be replaced.\n * @param {boolean} preserveQuery If true duplicate parameters will be concatenated into an array. If false, keys in url will take precedence.\n * @param {string} [baseUrl] If supplied, and input url is a relative url, it will be made absolute relative to baseUrl\n *\n * @private\n */\nResource.prototype.parseUrl = function (url, merge, preserveQuery, baseUrl) {\n let uri = new Uri(url);\n const query = parseQueryString(uri.query());\n\n this._queryParameters = merge\n ? combineQueryParameters(query, this.queryParameters, preserveQuery)\n : query;\n\n // Remove unneeded info from the Uri\n uri.search(\"\");\n uri.fragment(\"\");\n\n if (defined(baseUrl) && uri.scheme() === \"\") {\n uri = uri.absoluteTo(getAbsoluteUri(baseUrl));\n }\n\n this._url = uri.toString();\n};\n\n/**\n * Parses a query string and returns the object equivalent.\n *\n * @param {string} queryString The query string\n * @returns {object}\n *\n * @private\n */\nfunction parseQueryString(queryString) {\n if (queryString.length === 0) {\n return {};\n }\n\n // Special case where the querystring is just a string, not key/value pairs\n if (queryString.indexOf(\"=\") === -1) {\n return { [queryString]: undefined };\n }\n\n return queryToObject(queryString);\n}\n\n/**\n * This combines a map of query parameters.\n *\n * @param {object} q1 The first map of query parameters. Values in this map will take precedence if preserveQueryParameters is false.\n * @param {object} q2 The second map of query parameters.\n * @param {boolean} preserveQueryParameters If true duplicate parameters will be concatenated into an array. If false, keys in q1 will take precedence.\n *\n * @returns {object} The combined map of query parameters.\n *\n * @example\n * const q1 = {\n * a: 1,\n * b: 2\n * };\n * const q2 = {\n * a: 3,\n * c: 4\n * };\n * const q3 = {\n * b: [5, 6],\n * d: 7\n * }\n *\n * // Returns\n * // {\n * // a: [1, 3],\n * // b: 2,\n * // c: 4\n * // };\n * combineQueryParameters(q1, q2, true);\n *\n * // Returns\n * // {\n * // a: 1,\n * // b: 2,\n * // c: 4\n * // };\n * combineQueryParameters(q1, q2, false);\n *\n * // Returns\n * // {\n * // a: 1,\n * // b: [2, 5, 6],\n * // d: 7\n * // };\n * combineQueryParameters(q1, q3, true);\n *\n * // Returns\n * // {\n * // a: 1,\n * // b: 2,\n * // d: 7\n * // };\n * combineQueryParameters(q1, q3, false);\n *\n * @private\n */\nfunction combineQueryParameters(q1, q2, preserveQueryParameters) {\n if (!preserveQueryParameters) {\n return combine(q1, q2);\n }\n\n const result = clone(q1, true);\n for (const param in q2) {\n if (q2.hasOwnProperty(param)) {\n let value = result[param];\n const q2Value = q2[param];\n if (defined(value)) {\n if (!Array.isArray(value)) {\n value = result[param] = [value];\n }\n\n result[param] = value.concat(q2Value);\n } else {\n result[param] = Array.isArray(q2Value) ? q2Value.slice() : q2Value;\n }\n }\n }\n\n return result;\n}\n\n/**\n * Returns the url, optional with the query string and processed by a proxy.\n *\n * @param {boolean} [query=false] If true, the query string is included.\n * @param {boolean} [proxy=false] If true, the url is processed by the proxy object, if defined.\n *\n * @returns {string} The url with all the requested components.\n */\nResource.prototype.getUrlComponent = function (query, proxy) {\n if (this.isDataUri) {\n return this._url;\n }\n\n let url = this._url;\n if (query) {\n url = `${url}${stringifyQuery(this.queryParameters)}`;\n }\n\n // Restore the placeholders, which may have been escaped in objectToQuery or elsewhere\n url = url.replace(/%7B/g, \"{\").replace(/%7D/g, \"}\");\n\n const templateValues = this._templateValues;\n if (Object.keys(templateValues).length > 0) {\n url = url.replace(/{(.*?)}/g, function (match, key) {\n const replacement = templateValues[key];\n if (defined(replacement)) {\n // use the replacement value from templateValues if there is one...\n return encodeURIComponent(replacement);\n }\n // otherwise leave it unchanged\n return match;\n });\n }\n\n if (proxy && defined(this.proxy)) {\n url = this.proxy.getURL(url);\n }\n\n return url;\n};\n\n/**\n * Converts a query object into a string.\n *\n * @param {object} queryObject The object with query parameters\n * @returns {string}\n *\n * @private\n */\nfunction stringifyQuery(queryObject) {\n const keys = Object.keys(queryObject);\n\n if (keys.length === 0) {\n return \"\";\n }\n if (keys.length === 1 && !defined(queryObject[keys[0]])) {\n // We have 1 key with an undefined value, so this is just a string, not key/value pairs\n return `?${keys[0]}`;\n }\n\n return `?${objectToQuery(queryObject)}`;\n}\n\n/**\n * Combines the specified object and the existing query parameters. This allows you to add many parameters at once,\n * as opposed to adding them one at a time to the queryParameters property. If a value is already set, it will be replaced with the new value.\n *\n * @param {object} params The query parameters\n * @param {boolean} [useAsDefault=false] If true the params will be used as the default values, so they will only be set if they are undefined.\n */\nResource.prototype.setQueryParameters = function (params, useAsDefault) {\n if (useAsDefault) {\n this._queryParameters = combineQueryParameters(\n this._queryParameters,\n params,\n false,\n );\n } else {\n this._queryParameters = combineQueryParameters(\n params,\n this._queryParameters,\n false,\n );\n }\n};\n\n/**\n * Combines the specified object and the existing query parameters. This allows you to add many parameters at once,\n * as opposed to adding them one at a time to the queryParameters property.\n *\n * @param {object} params The query parameters\n */\nResource.prototype.appendQueryParameters = function (params) {\n this._queryParameters = combineQueryParameters(\n params,\n this._queryParameters,\n true,\n );\n};\n\n/**\n * Combines the specified object and the existing template values. This allows you to add many values at once,\n * as opposed to adding them one at a time to the templateValues property. If a value is already set, it will become an array and the new value will be appended.\n *\n * @param {object} template The template values\n * @param {boolean} [useAsDefault=false] If true the values will be used as the default values, so they will only be set if they are undefined.\n */\nResource.prototype.setTemplateValues = function (template, useAsDefault) {\n if (useAsDefault) {\n this._templateValues = combine(this._templateValues, template);\n } else {\n this._templateValues = combine(template, this._templateValues);\n }\n};\n\n/**\n * Returns a resource relative to the current instance. All properties remain the same as the current instance unless overridden in options.\n *\n * @param {object} options An object with the following properties\n * @param {string} [options.url] The url that will be resolved relative to the url of the current instance.\n * @param {object} [options.queryParameters] An object containing query parameters that will be combined with those of the current instance.\n * @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}). These will be combined with those of the current instance.\n * @param {object} [options.headers={}] Additional HTTP headers that will be sent.\n * @param {Proxy} [options.proxy] A proxy to be used when loading the resource.\n * @param {Resource.RetryCallback} [options.retryCallback] The function to call when loading the resource fails.\n * @param {number} [options.retryAttempts] The number of times the retryCallback should be called before giving up.\n * @param {Request} [options.request] A Request object that will be used. Intended for internal use only.\n * @param {boolean} [options.preserveQueryParameters=false] If true, this will keep all query parameters from the current resource and derived resource. If false, derived parameters will replace those of the current resource.\n *\n * @returns {Resource} The resource derived from the current one.\n */\nResource.prototype.getDerivedResource = function (options) {\n const resource = this.clone();\n resource._retryCount = 0;\n\n if (defined(options.url)) {\n const preserveQuery = defaultValue(options.preserveQueryParameters, false);\n resource.parseUrl(options.url, true, preserveQuery, this._url);\n }\n\n if (defined(options.queryParameters)) {\n resource._queryParameters = combine(\n options.queryParameters,\n resource.queryParameters,\n );\n }\n if (defined(options.templateValues)) {\n resource._templateValues = combine(\n options.templateValues,\n resource.templateValues,\n );\n }\n if (defined(options.headers)) {\n resource.headers = combine(options.headers, resource.headers);\n }\n if (defined(options.proxy)) {\n resource.proxy = options.proxy;\n }\n if (defined(options.request)) {\n resource.request = options.request;\n }\n if (defined(options.retryCallback)) {\n resource.retryCallback = options.retryCallback;\n }\n if (defined(options.retryAttempts)) {\n resource.retryAttempts = options.retryAttempts;\n }\n\n return resource;\n};\n\n/**\n * Called when a resource fails to load. This will call the retryCallback function if defined until retryAttempts is reached.\n *\n * @param {RequestErrorEvent} [error] The error that was encountered.\n *\n * @returns {Promise} A promise to a boolean, that if true will cause the resource request to be retried.\n *\n * @private\n */\nResource.prototype.retryOnError = function (error) {\n const retryCallback = this.retryCallback;\n if (\n typeof retryCallback !== \"function\" ||\n this._retryCount >= this.retryAttempts\n ) {\n return Promise.resolve(false);\n }\n\n const that = this;\n return Promise.resolve(retryCallback(this, error)).then(function (result) {\n ++that._retryCount;\n\n return result;\n });\n};\n\n/**\n * Duplicates a Resource instance.\n *\n * @param {Resource} [result] The object onto which to store the result.\n *\n * @returns {Resource} The modified result parameter or a new Resource instance if one was not provided.\n */\nResource.prototype.clone = function (result) {\n if (!defined(result)) {\n return new Resource({\n url: this._url,\n queryParameters: this.queryParameters,\n templateValues: this.templateValues,\n headers: this.headers,\n proxy: this.proxy,\n retryCallback: this.retryCallback,\n retryAttempts: this.retryAttempts,\n request: this.request.clone(),\n parseUrl: false,\n credits: defined(this.credits) ? this.credits.slice() : undefined,\n });\n }\n\n result._url = this._url;\n result._queryParameters = clone(this._queryParameters);\n result._templateValues = clone(this._templateValues);\n result.headers = clone(this.headers);\n result.proxy = this.proxy;\n result.retryCallback = this.retryCallback;\n result.retryAttempts = this.retryAttempts;\n result._retryCount = 0;\n result.request = this.request.clone();\n\n return result;\n};\n\n/**\n * Returns the base path of the Resource.\n *\n * @param {boolean} [includeQuery = false] Whether or not to include the query string and fragment form the uri\n *\n * @returns {string} The base URI of the resource\n */\nResource.prototype.getBaseUri = function (includeQuery) {\n return getBaseUri(this.getUrlComponent(includeQuery), includeQuery);\n};\n\n/**\n * Appends a forward slash to the URL.\n */\nResource.prototype.appendForwardSlash = function () {\n this._url = appendForwardSlash(this._url);\n};\n\n/**\n * Asynchronously loads the resource as raw binary data. Returns a promise that will resolve to\n * an ArrayBuffer once loaded, or reject if the resource failed to load. The data is loaded\n * using XMLHttpRequest, which means that in order to make requests to another origin,\n * the server must have Cross-Origin Resource Sharing (CORS) headers enabled.\n *\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n *\n * @example\n * // load a single URL asynchronously\n * resource.fetchArrayBuffer().then(function(arrayBuffer) {\n * // use the data\n * }).catch(function(error) {\n * // an error occurred\n * });\n *\n * @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}\n * @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}\n */\nResource.prototype.fetchArrayBuffer = function () {\n return this.fetch({\n responseType: \"arraybuffer\",\n });\n};\n\n/**\n * Creates a Resource and calls fetchArrayBuffer() on it.\n *\n * @param {string|object} options A url or an object with the following properties\n * @param {string} options.url The url of the resource.\n * @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.\n * @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).\n * @param {object} [options.headers={}] Additional HTTP headers that will be sent.\n * @param {Proxy} [options.proxy] A proxy to be used when loading the resource.\n * @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.\n * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.\n * @param {Request} [options.request] A Request object that will be used. Intended for internal use only.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n */\nResource.fetchArrayBuffer = function (options) {\n const resource = new Resource(options);\n return resource.fetchArrayBuffer();\n};\n\n/**\n * Asynchronously loads the given resource as a blob. Returns a promise that will resolve to\n * a Blob once loaded, or reject if the resource failed to load. The data is loaded\n * using XMLHttpRequest, which means that in order to make requests to another origin,\n * the server must have Cross-Origin Resource Sharing (CORS) headers enabled.\n *\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n *\n * @example\n * // load a single URL asynchronously\n * resource.fetchBlob().then(function(blob) {\n * // use the data\n * }).catch(function(error) {\n * // an error occurred\n * });\n *\n * @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}\n * @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}\n */\nResource.prototype.fetchBlob = function () {\n return this.fetch({\n responseType: \"blob\",\n });\n};\n\n/**\n * Creates a Resource and calls fetchBlob() on it.\n *\n * @param {string|object} options A url or an object with the following properties\n * @param {string} options.url The url of the resource.\n * @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.\n * @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).\n * @param {object} [options.headers={}] Additional HTTP headers that will be sent.\n * @param {Proxy} [options.proxy] A proxy to be used when loading the resource.\n * @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.\n * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.\n * @param {Request} [options.request] A Request object that will be used. Intended for internal use only.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n */\nResource.fetchBlob = function (options) {\n const resource = new Resource(options);\n return resource.fetchBlob();\n};\n\n/**\n * Asynchronously loads the given image resource. Returns a promise that will resolve to\n * an {@link https://developer.mozilla.org/en-US/docs/Web/API/ImageBitmap|ImageBitmap} if preferImageBitmap is true and the browser supports createImageBitmap or otherwise an\n * {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement|Image} once loaded, or reject if the image failed to load.\n *\n * @param {object} [options] An object with the following properties.\n * @param {boolean} [options.preferBlob=false] If true, we will load the image via a blob.\n * @param {boolean} [options.preferImageBitmap=false] If true, image will be decoded during fetch and an ImageBitmap is returned.\n * @param {boolean} [options.flipY=false] If true, image will be vertically flipped during decode. Only applies if the browser supports createImageBitmap.\n * @param {boolean} [options.skipColorSpaceConversion=false] If true, any custom gamma or color profiles in the image will be ignored. Only applies if the browser supports createImageBitmap.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n *\n *\n * @example\n * // load a single image asynchronously\n * resource.fetchImage().then(function(image) {\n * // use the loaded image\n * }).catch(function(error) {\n * // an error occurred\n * });\n *\n * // load several images in parallel\n * Promise.all([resource1.fetchImage(), resource2.fetchImage()]).then(function(images) {\n * // images is an array containing all the loaded images\n * });\n *\n * @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}\n * @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}\n */\nResource.prototype.fetchImage = function (options) {\n options = defaultValue(options, defaultValue.EMPTY_OBJECT);\n const preferImageBitmap = defaultValue(options.preferImageBitmap, false);\n const preferBlob = defaultValue(options.preferBlob, false);\n const flipY = defaultValue(options.flipY, false);\n const skipColorSpaceConversion = defaultValue(\n options.skipColorSpaceConversion,\n false,\n );\n\n checkAndResetRequest(this.request);\n // We try to load the image normally if\n // 1. Blobs aren't supported\n // 2. It's a data URI\n // 3. It's a blob URI\n // 4. It doesn't have request headers and we preferBlob is false\n if (\n !xhrBlobSupported ||\n this.isDataUri ||\n this.isBlobUri ||\n (!this.hasHeaders && !preferBlob)\n ) {\n return fetchImage({\n resource: this,\n flipY: flipY,\n skipColorSpaceConversion: skipColorSpaceConversion,\n preferImageBitmap: preferImageBitmap,\n });\n }\n\n const blobPromise = this.fetchBlob();\n if (!defined(blobPromise)) {\n return;\n }\n\n let supportsImageBitmap;\n let useImageBitmap;\n let generatedBlobResource;\n let generatedBlob;\n return Resource.supportsImageBitmapOptions()\n .then(function (result) {\n supportsImageBitmap = result;\n useImageBitmap = supportsImageBitmap && preferImageBitmap;\n return blobPromise;\n })\n .then(function (blob) {\n if (!defined(blob)) {\n return;\n }\n generatedBlob = blob;\n if (useImageBitmap) {\n return Resource.createImageBitmapFromBlob(blob, {\n flipY: flipY,\n premultiplyAlpha: false,\n skipColorSpaceConversion: skipColorSpaceConversion,\n });\n }\n const blobUrl = window.URL.createObjectURL(blob);\n generatedBlobResource = new Resource({\n url: blobUrl,\n });\n\n return fetchImage({\n resource: generatedBlobResource,\n flipY: flipY,\n skipColorSpaceConversion: skipColorSpaceConversion,\n preferImageBitmap: false,\n });\n })\n .then(function (image) {\n if (!defined(image)) {\n return;\n }\n\n // The blob object may be needed for use by a TileDiscardPolicy,\n // so attach it to the image.\n image.blob = generatedBlob;\n\n if (useImageBitmap) {\n return image;\n }\n\n window.URL.revokeObjectURL(generatedBlobResource.url);\n return image;\n })\n .catch(function (error) {\n if (defined(generatedBlobResource)) {\n window.URL.revokeObjectURL(generatedBlobResource.url);\n }\n\n // If the blob load succeeded but the image decode failed, attach the blob\n // to the error object for use by a TileDiscardPolicy.\n // In particular, BingMapsImageryProvider uses this to detect the\n // zero-length response that is returned when a tile is not available.\n error.blob = generatedBlob;\n\n return Promise.reject(error);\n });\n};\n\n/**\n * Fetches an image and returns a promise to it.\n *\n * @param {object} [options] An object with the following properties.\n * @param {Resource} [options.resource] Resource object that points to an image to fetch.\n * @param {boolean} [options.preferImageBitmap] If true, image will be decoded during fetch and an ImageBitmap is returned.\n * @param {boolean} [options.flipY] If true, image will be vertically flipped during decode. Only applies if the browser supports createImageBitmap.\n * @param {boolean} [options.skipColorSpaceConversion=false] If true, any custom gamma or color profiles in the image will be ignored. Only applies if the browser supports createImageBitmap.\n * @private\n */\nfunction fetchImage(options) {\n const resource = options.resource;\n const flipY = options.flipY;\n const skipColorSpaceConversion = options.skipColorSpaceConversion;\n const preferImageBitmap = options.preferImageBitmap;\n\n const request = resource.request;\n request.url = resource.url;\n request.requestFunction = function () {\n let crossOrigin = false;\n\n // data URIs can't have crossorigin set.\n if (!resource.isDataUri && !resource.isBlobUri) {\n crossOrigin = resource.isCrossOriginUrl;\n }\n\n const deferred = defer();\n Resource._Implementations.createImage(\n request,\n crossOrigin,\n deferred,\n flipY,\n skipColorSpaceConversion,\n preferImageBitmap,\n );\n\n return deferred.promise;\n };\n\n const promise = RequestScheduler.request(request);\n if (!defined(promise)) {\n return;\n }\n\n return promise.catch(function (e) {\n // Don't retry cancelled or otherwise aborted requests\n if (request.state !== RequestState.FAILED) {\n return Promise.reject(e);\n }\n return resource.retryOnError(e).then(function (retry) {\n if (retry) {\n // Reset request so it can try again\n request.state = RequestState.UNISSUED;\n request.deferred = undefined;\n\n return fetchImage({\n resource: resource,\n flipY: flipY,\n skipColorSpaceConversion: skipColorSpaceConversion,\n preferImageBitmap: preferImageBitmap,\n });\n }\n return Promise.reject(e);\n });\n });\n}\n\n/**\n * Creates a Resource and calls fetchImage() on it.\n *\n * @param {string|object} options A url or an object with the following properties\n * @param {string} options.url The url of the resource.\n * @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.\n * @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).\n * @param {object} [options.headers={}] Additional HTTP headers that will be sent.\n * @param {Proxy} [options.proxy] A proxy to be used when loading the resource.\n * @param {boolean} [options.flipY=false] Whether to vertically flip the image during fetch and decode. Only applies when requesting an image and the browser supports createImageBitmap.\n * @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.\n * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.\n * @param {Request} [options.request] A Request object that will be used. Intended for internal use only.\n * @param {boolean} [options.preferBlob=false] If true, we will load the image via a blob.\n * @param {boolean} [options.preferImageBitmap=false] If true, image will be decoded during fetch and an ImageBitmap is returned.\n * @param {boolean} [options.skipColorSpaceConversion=false] If true, any custom gamma or color profiles in the image will be ignored. Only applies when requesting an image and the browser supports createImageBitmap.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n */\nResource.fetchImage = function (options) {\n const resource = new Resource(options);\n return resource.fetchImage({\n flipY: options.flipY,\n skipColorSpaceConversion: options.skipColorSpaceConversion,\n preferBlob: options.preferBlob,\n preferImageBitmap: options.preferImageBitmap,\n });\n};\n\n/**\n * Asynchronously loads the given resource as text. Returns a promise that will resolve to\n * a String once loaded, or reject if the resource failed to load. The data is loaded\n * using XMLHttpRequest, which means that in order to make requests to another origin,\n * the server must have Cross-Origin Resource Sharing (CORS) headers enabled.\n *\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n *\n * @example\n * // load text from a URL, setting a custom header\n * const resource = new Resource({\n * url: 'http://someUrl.com/someJson.txt',\n * headers: {\n * 'X-Custom-Header' : 'some value'\n * }\n * });\n * resource.fetchText().then(function(text) {\n * // Do something with the text\n * }).catch(function(error) {\n * // an error occurred\n * });\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest|XMLHttpRequest}\n * @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}\n * @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}\n */\nResource.prototype.fetchText = function () {\n return this.fetch({\n responseType: \"text\",\n });\n};\n\n/**\n * Creates a Resource and calls fetchText() on it.\n *\n * @param {string|object} options A url or an object with the following properties\n * @param {string} options.url The url of the resource.\n * @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.\n * @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).\n * @param {object} [options.headers={}] Additional HTTP headers that will be sent.\n * @param {Proxy} [options.proxy] A proxy to be used when loading the resource.\n * @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.\n * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.\n * @param {Request} [options.request] A Request object that will be used. Intended for internal use only.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n */\nResource.fetchText = function (options) {\n const resource = new Resource(options);\n return resource.fetchText();\n};\n\n// note: */* below is */* but that ends the comment block early\n/**\n * Asynchronously loads the given resource as JSON. Returns a promise that will resolve to\n * a JSON object once loaded, or reject if the resource failed to load. The data is loaded\n * using XMLHttpRequest, which means that in order to make requests to another origin,\n * the server must have Cross-Origin Resource Sharing (CORS) headers enabled. This function\n * adds 'Accept: application/json,*/*;q=0.01' to the request headers, if not\n * already specified.\n *\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n *\n *\n * @example\n * resource.fetchJson().then(function(jsonData) {\n * // Do something with the JSON object\n * }).catch(function(error) {\n * // an error occurred\n * });\n *\n * @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}\n * @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}\n */\nResource.prototype.fetchJson = function () {\n const promise = this.fetch({\n responseType: \"text\",\n headers: {\n Accept: \"application/json,*/*;q=0.01\",\n },\n });\n\n if (!defined(promise)) {\n return undefined;\n }\n\n return promise.then(function (value) {\n if (!defined(value)) {\n return;\n }\n return JSON.parse(value);\n });\n};\n\n/**\n * Creates a Resource and calls fetchJson() on it.\n *\n * @param {string|object} options A url or an object with the following properties\n * @param {string} options.url The url of the resource.\n * @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.\n * @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).\n * @param {object} [options.headers={}] Additional HTTP headers that will be sent.\n * @param {Proxy} [options.proxy] A proxy to be used when loading the resource.\n * @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.\n * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.\n * @param {Request} [options.request] A Request object that will be used. Intended for internal use only.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n */\nResource.fetchJson = function (options) {\n const resource = new Resource(options);\n return resource.fetchJson();\n};\n\n/**\n * Asynchronously loads the given resource as XML. Returns a promise that will resolve to\n * an XML Document once loaded, or reject if the resource failed to load. The data is loaded\n * using XMLHttpRequest, which means that in order to make requests to another origin,\n * the server must have Cross-Origin Resource Sharing (CORS) headers enabled.\n *\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n *\n *\n * @example\n * // load XML from a URL, setting a custom header\n * Cesium.loadXML('http://someUrl.com/someXML.xml', {\n * 'X-Custom-Header' : 'some value'\n * }).then(function(document) {\n * // Do something with the document\n * }).catch(function(error) {\n * // an error occurred\n * });\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest|XMLHttpRequest}\n * @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}\n * @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}\n */\nResource.prototype.fetchXML = function () {\n return this.fetch({\n responseType: \"document\",\n overrideMimeType: \"text/xml\",\n });\n};\n\n/**\n * Creates a Resource and calls fetchXML() on it.\n *\n * @param {string|object} options A url or an object with the following properties\n * @param {string} options.url The url of the resource.\n * @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.\n * @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).\n * @param {object} [options.headers={}] Additional HTTP headers that will be sent.\n * @param {Proxy} [options.proxy] A proxy to be used when loading the resource.\n * @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.\n * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.\n * @param {Request} [options.request] A Request object that will be used. Intended for internal use only.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n */\nResource.fetchXML = function (options) {\n const resource = new Resource(options);\n return resource.fetchXML();\n};\n\n/**\n * Requests a resource using JSONP.\n *\n * @param {string} [callbackParameterName='callback'] The callback parameter name that the server expects.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n *\n *\n * @example\n * // load a data asynchronously\n * resource.fetchJsonp().then(function(data) {\n * // use the loaded data\n * }).catch(function(error) {\n * // an error occurred\n * });\n *\n * @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}\n */\nResource.prototype.fetchJsonp = function (callbackParameterName) {\n callbackParameterName = defaultValue(callbackParameterName, \"callback\");\n\n checkAndResetRequest(this.request);\n\n //generate a unique function name\n let functionName;\n do {\n functionName = `loadJsonp${CesiumMath.nextRandomNumber()\n .toString()\n .substring(2, 8)}`;\n } while (defined(window[functionName]));\n\n return fetchJsonp(this, callbackParameterName, functionName);\n};\n\nfunction fetchJsonp(resource, callbackParameterName, functionName) {\n const callbackQuery = {};\n callbackQuery[callbackParameterName] = functionName;\n resource.setQueryParameters(callbackQuery);\n\n const request = resource.request;\n const url = resource.url;\n request.url = url;\n request.requestFunction = function () {\n const deferred = defer();\n\n //assign a function with that name in the global scope\n window[functionName] = function (data) {\n deferred.resolve(data);\n\n try {\n delete window[functionName];\n } catch (e) {\n window[functionName] = undefined;\n }\n };\n\n Resource._Implementations.loadAndExecuteScript(url, functionName, deferred);\n return deferred.promise;\n };\n\n const promise = RequestScheduler.request(request);\n if (!defined(promise)) {\n return;\n }\n\n return promise.catch(function (e) {\n if (request.state !== RequestState.FAILED) {\n return Promise.reject(e);\n }\n\n return resource.retryOnError(e).then(function (retry) {\n if (retry) {\n // Reset request so it can try again\n request.state = RequestState.UNISSUED;\n request.deferred = undefined;\n\n return fetchJsonp(resource, callbackParameterName, functionName);\n }\n\n return Promise.reject(e);\n });\n });\n}\n\n/**\n * Creates a Resource from a URL and calls fetchJsonp() on it.\n *\n * @param {string|object} options A url or an object with the following properties\n * @param {string} options.url The url of the resource.\n * @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.\n * @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).\n * @param {object} [options.headers={}] Additional HTTP headers that will be sent.\n * @param {Proxy} [options.proxy] A proxy to be used when loading the resource.\n * @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.\n * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.\n * @param {Request} [options.request] A Request object that will be used. Intended for internal use only.\n * @param {string} [options.callbackParameterName='callback'] The callback parameter name that the server expects.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n */\nResource.fetchJsonp = function (options) {\n const resource = new Resource(options);\n return resource.fetchJsonp(options.callbackParameterName);\n};\n\n/**\n * @private\n */\nResource.prototype._makeRequest = function (options) {\n const resource = this;\n checkAndResetRequest(resource.request);\n\n const request = resource.request;\n const url = resource.url;\n request.url = url;\n\n request.requestFunction = function () {\n const responseType = options.responseType;\n const headers = combine(options.headers, resource.headers);\n const overrideMimeType = options.overrideMimeType;\n const method = options.method;\n const data = options.data;\n const deferred = defer();\n const xhr = Resource._Implementations.loadWithXhr(\n url,\n responseType,\n method,\n data,\n headers,\n deferred,\n overrideMimeType,\n );\n if (defined(xhr) && defined(xhr.abort)) {\n request.cancelFunction = function () {\n xhr.abort();\n };\n }\n return deferred.promise;\n };\n\n const promise = RequestScheduler.request(request);\n if (!defined(promise)) {\n return;\n }\n\n return promise\n .then(function (data) {\n // explicitly set to undefined to ensure GC of request response data. See #8843\n request.cancelFunction = undefined;\n return data;\n })\n .catch(function (e) {\n request.cancelFunction = undefined;\n if (request.state !== RequestState.FAILED) {\n return Promise.reject(e);\n }\n\n return resource.retryOnError(e).then(function (retry) {\n if (retry) {\n // Reset request so it can try again\n request.state = RequestState.UNISSUED;\n request.deferred = undefined;\n\n return resource.fetch(options);\n }\n\n return Promise.reject(e);\n });\n });\n};\n\n/**\n * Checks to make sure the Resource isn't already being requested.\n *\n * @param {Request} request The request to check.\n *\n * @private\n */\nfunction checkAndResetRequest(request) {\n if (\n request.state === RequestState.ISSUED ||\n request.state === RequestState.ACTIVE\n ) {\n throw new RuntimeError(\"The Resource is already being fetched.\");\n }\n\n request.state = RequestState.UNISSUED;\n request.deferred = undefined;\n}\n\nconst dataUriRegex = /^data:(.*?)(;base64)?,(.*)$/;\n\nfunction decodeDataUriText(isBase64, data) {\n const result = decodeURIComponent(data);\n if (isBase64) {\n return atob(result);\n }\n return result;\n}\n\nfunction decodeDataUriArrayBuffer(isBase64, data) {\n const byteString = decodeDataUriText(isBase64, data);\n const buffer = new ArrayBuffer(byteString.length);\n const view = new Uint8Array(buffer);\n for (let i = 0; i < byteString.length; i++) {\n view[i] = byteString.charCodeAt(i);\n }\n return buffer;\n}\n\nfunction decodeDataUri(dataUriRegexResult, responseType) {\n responseType = defaultValue(responseType, \"\");\n const mimeType = dataUriRegexResult[1];\n const isBase64 = !!dataUriRegexResult[2];\n const data = dataUriRegexResult[3];\n let buffer;\n let parser;\n\n switch (responseType) {\n case \"\":\n case \"text\":\n return decodeDataUriText(isBase64, data);\n case \"arraybuffer\":\n return decodeDataUriArrayBuffer(isBase64, data);\n case \"blob\":\n buffer = decodeDataUriArrayBuffer(isBase64, data);\n return new Blob([buffer], {\n type: mimeType,\n });\n case \"document\":\n parser = new DOMParser();\n return parser.parseFromString(\n decodeDataUriText(isBase64, data),\n mimeType,\n );\n case \"json\":\n return JSON.parse(decodeDataUriText(isBase64, data));\n default:\n //>>includeStart('debug', pragmas.debug);\n throw new DeveloperError(`Unhandled responseType: ${responseType}`);\n //>>includeEnd('debug');\n }\n}\n\n/**\n * Asynchronously loads the given resource. Returns a promise that will resolve to\n * the result once loaded, or reject if the resource failed to load. The data is loaded\n * using XMLHttpRequest, which means that in order to make requests to another origin,\n * the server must have Cross-Origin Resource Sharing (CORS) headers enabled. It's recommended that you use\n * the more specific functions eg. fetchJson, fetchBlob, etc.\n *\n * @param {object} [options] Object with the following properties:\n * @param {string} [options.responseType] The type of response. This controls the type of item returned.\n * @param {object} [options.headers] Additional HTTP headers to send with the request, if any.\n * @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n *\n *\n * @example\n * resource.fetch()\n * .then(function(body) {\n * // use the data\n * }).catch(function(error) {\n * // an error occurred\n * });\n *\n * @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}\n * @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}\n */\nResource.prototype.fetch = function (options) {\n options = defaultClone(options, {});\n options.method = \"GET\";\n\n return this._makeRequest(options);\n};\n\n/**\n * Creates a Resource from a URL and calls fetch() on it.\n *\n * @param {string|object} options A url or an object with the following properties\n * @param {string} options.url The url of the resource.\n * @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.\n * @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).\n * @param {object} [options.headers={}] Additional HTTP headers that will be sent.\n * @param {Proxy} [options.proxy] A proxy to be used when loading the resource.\n * @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.\n * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.\n * @param {Request} [options.request] A Request object that will be used. Intended for internal use only.\n * @param {string} [options.responseType] The type of response. This controls the type of item returned.\n * @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n */\nResource.fetch = function (options) {\n const resource = new Resource(options);\n return resource.fetch({\n // Make copy of just the needed fields because headers can be passed to both the constructor and to fetch\n responseType: options.responseType,\n overrideMimeType: options.overrideMimeType,\n });\n};\n\n/**\n * Asynchronously deletes the given resource. Returns a promise that will resolve to\n * the result once loaded, or reject if the resource failed to load. The data is loaded\n * using XMLHttpRequest, which means that in order to make requests to another origin,\n * the server must have Cross-Origin Resource Sharing (CORS) headers enabled.\n *\n * @param {object} [options] Object with the following properties:\n * @param {string} [options.responseType] The type of response. This controls the type of item returned.\n * @param {object} [options.headers] Additional HTTP headers to send with the request, if any.\n * @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n *\n *\n * @example\n * resource.delete()\n * .then(function(body) {\n * // use the data\n * }).catch(function(error) {\n * // an error occurred\n * });\n *\n * @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}\n * @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}\n */\nResource.prototype.delete = function (options) {\n options = defaultClone(options, {});\n options.method = \"DELETE\";\n\n return this._makeRequest(options);\n};\n\n/**\n * Creates a Resource from a URL and calls delete() on it.\n *\n * @param {string|object} options A url or an object with the following properties\n * @param {string} options.url The url of the resource.\n * @param {object} [options.data] Data that is posted with the resource.\n * @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.\n * @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).\n * @param {object} [options.headers={}] Additional HTTP headers that will be sent.\n * @param {Proxy} [options.proxy] A proxy to be used when loading the resource.\n * @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.\n * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.\n * @param {Request} [options.request] A Request object that will be used. Intended for internal use only.\n * @param {string} [options.responseType] The type of response. This controls the type of item returned.\n * @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n */\nResource.delete = function (options) {\n const resource = new Resource(options);\n return resource.delete({\n // Make copy of just the needed fields because headers can be passed to both the constructor and to fetch\n responseType: options.responseType,\n overrideMimeType: options.overrideMimeType,\n data: options.data,\n });\n};\n\n/**\n * Asynchronously gets headers the given resource. Returns a promise that will resolve to\n * the result once loaded, or reject if the resource failed to load. The data is loaded\n * using XMLHttpRequest, which means that in order to make requests to another origin,\n * the server must have Cross-Origin Resource Sharing (CORS) headers enabled.\n *\n * @param {object} [options] Object with the following properties:\n * @param {string} [options.responseType] The type of response. This controls the type of item returned.\n * @param {object} [options.headers] Additional HTTP headers to send with the request, if any.\n * @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n *\n *\n * @example\n * resource.head()\n * .then(function(headers) {\n * // use the data\n * }).catch(function(error) {\n * // an error occurred\n * });\n *\n * @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}\n * @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}\n */\nResource.prototype.head = function (options) {\n options = defaultClone(options, {});\n options.method = \"HEAD\";\n\n return this._makeRequest(options);\n};\n\n/**\n * Creates a Resource from a URL and calls head() on it.\n *\n * @param {string|object} options A url or an object with the following properties\n * @param {string} options.url The url of the resource.\n * @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.\n * @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).\n * @param {object} [options.headers={}] Additional HTTP headers that will be sent.\n * @param {Proxy} [options.proxy] A proxy to be used when loading the resource.\n * @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.\n * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.\n * @param {Request} [options.request] A Request object that will be used. Intended for internal use only.\n * @param {string} [options.responseType] The type of response. This controls the type of item returned.\n * @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n */\nResource.head = function (options) {\n const resource = new Resource(options);\n return resource.head({\n // Make copy of just the needed fields because headers can be passed to both the constructor and to fetch\n responseType: options.responseType,\n overrideMimeType: options.overrideMimeType,\n });\n};\n\n/**\n * Asynchronously gets options the given resource. Returns a promise that will resolve to\n * the result once loaded, or reject if the resource failed to load. The data is loaded\n * using XMLHttpRequest, which means that in order to make requests to another origin,\n * the server must have Cross-Origin Resource Sharing (CORS) headers enabled.\n *\n * @param {object} [options] Object with the following properties:\n * @param {string} [options.responseType] The type of response. This controls the type of item returned.\n * @param {object} [options.headers] Additional HTTP headers to send with the request, if any.\n * @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n *\n *\n * @example\n * resource.options()\n * .then(function(headers) {\n * // use the data\n * }).catch(function(error) {\n * // an error occurred\n * });\n *\n * @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}\n * @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}\n */\nResource.prototype.options = function (options) {\n options = defaultClone(options, {});\n options.method = \"OPTIONS\";\n\n return this._makeRequest(options);\n};\n\n/**\n * Creates a Resource from a URL and calls options() on it.\n *\n * @param {string|object} options A url or an object with the following properties\n * @param {string} options.url The url of the resource.\n * @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.\n * @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).\n * @param {object} [options.headers={}] Additional HTTP headers that will be sent.\n * @param {Proxy} [options.proxy] A proxy to be used when loading the resource.\n * @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.\n * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.\n * @param {Request} [options.request] A Request object that will be used. Intended for internal use only.\n * @param {string} [options.responseType] The type of response. This controls the type of item returned.\n * @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n */\nResource.options = function (options) {\n const resource = new Resource(options);\n return resource.options({\n // Make copy of just the needed fields because headers can be passed to both the constructor and to fetch\n responseType: options.responseType,\n overrideMimeType: options.overrideMimeType,\n });\n};\n\n/**\n * Asynchronously posts data to the given resource. Returns a promise that will resolve to\n * the result once loaded, or reject if the resource failed to load. The data is loaded\n * using XMLHttpRequest, which means that in order to make requests to another origin,\n * the server must have Cross-Origin Resource Sharing (CORS) headers enabled.\n *\n * @param {object} data Data that is posted with the resource.\n * @param {object} [options] Object with the following properties:\n * @param {object} [options.data] Data that is posted with the resource.\n * @param {string} [options.responseType] The type of response. This controls the type of item returned.\n * @param {object} [options.headers] Additional HTTP headers to send with the request, if any.\n * @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n *\n *\n * @example\n * resource.post(data)\n * .then(function(result) {\n * // use the result\n * }).catch(function(error) {\n * // an error occurred\n * });\n *\n * @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}\n * @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}\n */\nResource.prototype.post = function (data, options) {\n Check.defined(\"data\", data);\n\n options = defaultClone(options, {});\n options.method = \"POST\";\n options.data = data;\n\n return this._makeRequest(options);\n};\n\n/**\n * Creates a Resource from a URL and calls post() on it.\n *\n * @param {object} options A url or an object with the following properties\n * @param {string} options.url The url of the resource.\n * @param {object} options.data Data that is posted with the resource.\n * @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.\n * @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).\n * @param {object} [options.headers={}] Additional HTTP headers that will be sent.\n * @param {Proxy} [options.proxy] A proxy to be used when loading the resource.\n * @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.\n * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.\n * @param {Request} [options.request] A Request object that will be used. Intended for internal use only.\n * @param {string} [options.responseType] The type of response. This controls the type of item returned.\n * @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n */\nResource.post = function (options) {\n const resource = new Resource(options);\n return resource.post(options.data, {\n // Make copy of just the needed fields because headers can be passed to both the constructor and to post\n responseType: options.responseType,\n overrideMimeType: options.overrideMimeType,\n });\n};\n\n/**\n * Asynchronously puts data to the given resource. Returns a promise that will resolve to\n * the result once loaded, or reject if the resource failed to load. The data is loaded\n * using XMLHttpRequest, which means that in order to make requests to another origin,\n * the server must have Cross-Origin Resource Sharing (CORS) headers enabled.\n *\n * @param {object} data Data that is posted with the resource.\n * @param {object} [options] Object with the following properties:\n * @param {string} [options.responseType] The type of response. This controls the type of item returned.\n * @param {object} [options.headers] Additional HTTP headers to send with the request, if any.\n * @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n *\n *\n * @example\n * resource.put(data)\n * .then(function(result) {\n * // use the result\n * }).catch(function(error) {\n * // an error occurred\n * });\n *\n * @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}\n * @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}\n */\nResource.prototype.put = function (data, options) {\n Check.defined(\"data\", data);\n\n options = defaultClone(options, {});\n options.method = \"PUT\";\n options.data = data;\n\n return this._makeRequest(options);\n};\n\n/**\n * Creates a Resource from a URL and calls put() on it.\n *\n * @param {object} options A url or an object with the following properties\n * @param {string} options.url The url of the resource.\n * @param {object} options.data Data that is posted with the resource.\n * @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.\n * @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).\n * @param {object} [options.headers={}] Additional HTTP headers that will be sent.\n * @param {Proxy} [options.proxy] A proxy to be used when loading the resource.\n * @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.\n * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.\n * @param {Request} [options.request] A Request object that will be used. Intended for internal use only.\n * @param {string} [options.responseType] The type of response. This controls the type of item returned.\n * @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n */\nResource.put = function (options) {\n const resource = new Resource(options);\n return resource.put(options.data, {\n // Make copy of just the needed fields because headers can be passed to both the constructor and to post\n responseType: options.responseType,\n overrideMimeType: options.overrideMimeType,\n });\n};\n\n/**\n * Asynchronously patches data to the given resource. Returns a promise that will resolve to\n * the result once loaded, or reject if the resource failed to load. The data is loaded\n * using XMLHttpRequest, which means that in order to make requests to another origin,\n * the server must have Cross-Origin Resource Sharing (CORS) headers enabled.\n *\n * @param {object} data Data that is posted with the resource.\n * @param {object} [options] Object with the following properties:\n * @param {string} [options.responseType] The type of response. This controls the type of item returned.\n * @param {object} [options.headers] Additional HTTP headers to send with the request, if any.\n * @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n *\n *\n * @example\n * resource.patch(data)\n * .then(function(result) {\n * // use the result\n * }).catch(function(error) {\n * // an error occurred\n * });\n *\n * @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}\n * @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}\n */\nResource.prototype.patch = function (data, options) {\n Check.defined(\"data\", data);\n\n options = defaultClone(options, {});\n options.method = \"PATCH\";\n options.data = data;\n\n return this._makeRequest(options);\n};\n\n/**\n * Creates a Resource from a URL and calls patch() on it.\n *\n * @param {object} options A url or an object with the following properties\n * @param {string} options.url The url of the resource.\n * @param {object} options.data Data that is posted with the resource.\n * @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.\n * @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).\n * @param {object} [options.headers={}] Additional HTTP headers that will be sent.\n * @param {Proxy} [options.proxy] A proxy to be used when loading the resource.\n * @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.\n * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.\n * @param {Request} [options.request] A Request object that will be used. Intended for internal use only.\n * @param {string} [options.responseType] The type of response. This controls the type of item returned.\n * @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n */\nResource.patch = function (options) {\n const resource = new Resource(options);\n return resource.patch(options.data, {\n // Make copy of just the needed fields because headers can be passed to both the constructor and to post\n responseType: options.responseType,\n overrideMimeType: options.overrideMimeType,\n });\n};\n\n/**\n * Contains implementations of functions that can be replaced for testing\n *\n * @private\n */\nResource._Implementations = {};\n\nResource._Implementations.loadImageElement = function (\n url,\n crossOrigin,\n deferred,\n) {\n const image = new Image();\n\n image.onload = function () {\n // work-around a known issue with Firefox and dimensionless SVG, see:\n // - https://github.com/whatwg/html/issues/3510\n // - https://bugzilla.mozilla.org/show_bug.cgi?id=700533\n if (\n image.naturalWidth === 0 &&\n image.naturalHeight === 0 &&\n image.width === 0 &&\n image.height === 0\n ) {\n // these values affect rasterization and will likely mar the content\n // until Firefox takes a stance on the issue, marred content is better than no content\n // Chromium uses a more refined heuristic about its choice given nil viewBox, and a better stance and solution is\n // proposed later in the original issue thread:\n // - Chromium behavior: https://github.com/CesiumGS/cesium/issues/9188#issuecomment-704400825\n // - Cesium's stance/solve: https://github.com/CesiumGS/cesium/issues/9188#issuecomment-720645777\n image.width = 300;\n image.height = 150;\n }\n deferred.resolve(image);\n };\n\n image.onerror = function (e) {\n deferred.reject(e);\n };\n\n if (crossOrigin) {\n if (TrustedServers.contains(url)) {\n image.crossOrigin = \"use-credentials\";\n } else {\n image.crossOrigin = \"\";\n }\n }\n\n image.src = url;\n};\n\nResource._Implementations.createImage = function (\n request,\n crossOrigin,\n deferred,\n flipY,\n skipColorSpaceConversion,\n preferImageBitmap,\n) {\n const url = request.url;\n // Passing an Image to createImageBitmap will force it to run on the main thread\n // since DOM elements don't exist on workers. We convert it to a blob so it's non-blocking.\n // See:\n // https://bugzilla.mozilla.org/show_bug.cgi?id=1044102#c38\n // https://bugs.chromium.org/p/chromium/issues/detail?id=580202#c10\n Resource.supportsImageBitmapOptions()\n .then(function (supportsImageBitmap) {\n // We can only use ImageBitmap if we can flip on decode.\n // See: https://github.com/CesiumGS/cesium/pull/7579#issuecomment-466146898\n if (!(supportsImageBitmap && preferImageBitmap)) {\n Resource._Implementations.loadImageElement(url, crossOrigin, deferred);\n return;\n }\n const responseType = \"blob\";\n const method = \"GET\";\n const xhrDeferred = defer();\n const xhr = Resource._Implementations.loadWithXhr(\n url,\n responseType,\n method,\n undefined,\n undefined,\n xhrDeferred,\n undefined,\n undefined,\n undefined,\n );\n\n if (defined(xhr) && defined(xhr.abort)) {\n request.cancelFunction = function () {\n xhr.abort();\n };\n }\n return xhrDeferred.promise\n .then(function (blob) {\n if (!defined(blob)) {\n deferred.reject(\n new RuntimeError(\n `Successfully retrieved ${url} but it contained no content.`,\n ),\n );\n return;\n }\n\n return Resource.createImageBitmapFromBlob(blob, {\n flipY: flipY,\n premultiplyAlpha: false,\n skipColorSpaceConversion: skipColorSpaceConversion,\n });\n })\n .then(function (image) {\n deferred.resolve(image);\n });\n })\n .catch(function (e) {\n deferred.reject(e);\n });\n};\n\n/**\n * Wrapper for createImageBitmap\n *\n * @private\n */\nResource.createImageBitmapFromBlob = function (blob, options) {\n Check.defined(\"options\", options);\n Check.typeOf.bool(\"options.flipY\", options.flipY);\n Check.typeOf.bool(\"options.premultiplyAlpha\", options.premultiplyAlpha);\n Check.typeOf.bool(\n \"options.skipColorSpaceConversion\",\n options.skipColorSpaceConversion,\n );\n\n return createImageBitmap(blob, {\n imageOrientation: options.flipY ? \"flipY\" : \"none\",\n premultiplyAlpha: options.premultiplyAlpha ? \"premultiply\" : \"none\",\n colorSpaceConversion: options.skipColorSpaceConversion ? \"none\" : \"default\",\n });\n};\n\nfunction loadWithHttpRequest(\n url,\n responseType,\n method,\n data,\n headers,\n deferred,\n overrideMimeType,\n) {\n // Note: only the 'json' and 'text' responseTypes transforms the loaded buffer\n fetch(url, {\n method,\n headers,\n })\n .then(async (response) => {\n if (!response.ok) {\n const responseHeaders = {};\n response.headers.forEach((value, key) => {\n responseHeaders[key] = value;\n });\n deferred.reject(\n new RequestErrorEvent(response.status, response, responseHeaders),\n );\n return;\n }\n\n switch (responseType) {\n case \"text\":\n deferred.resolve(response.text());\n break;\n case \"json\":\n deferred.resolve(response.json());\n break;\n default:\n deferred.resolve(new Uint8Array(await response.arrayBuffer()).buffer);\n break;\n }\n })\n .catch(() => {\n deferred.reject(new RequestErrorEvent());\n });\n}\n\nconst noXMLHttpRequest = typeof XMLHttpRequest === \"undefined\";\nResource._Implementations.loadWithXhr = function (\n url,\n responseType,\n method,\n data,\n headers,\n deferred,\n overrideMimeType,\n) {\n const dataUriRegexResult = dataUriRegex.exec(url);\n if (dataUriRegexResult !== null) {\n deferred.resolve(decodeDataUri(dataUriRegexResult, responseType));\n return;\n }\n\n if (noXMLHttpRequest) {\n loadWithHttpRequest(\n url,\n responseType,\n method,\n data,\n headers,\n deferred,\n overrideMimeType,\n );\n return;\n }\n\n const xhr = new XMLHttpRequest();\n\n if (TrustedServers.contains(url)) {\n xhr.withCredentials = true;\n }\n\n xhr.open(method, url, true);\n\n if (defined(overrideMimeType) && defined(xhr.overrideMimeType)) {\n xhr.overrideMimeType(overrideMimeType);\n }\n\n if (defined(headers)) {\n for (const key in headers) {\n if (headers.hasOwnProperty(key)) {\n xhr.setRequestHeader(key, headers[key]);\n }\n }\n }\n\n if (defined(responseType)) {\n xhr.responseType = responseType;\n }\n\n // While non-standard, file protocol always returns a status of 0 on success\n let localFile = false;\n if (typeof url === \"string\") {\n localFile =\n url.indexOf(\"file://\") === 0 ||\n (typeof window !== \"undefined\" && window.location.origin === \"file://\");\n }\n\n xhr.onload = function () {\n if (\n (xhr.status < 200 || xhr.status >= 300) &&\n !(localFile && xhr.status === 0)\n ) {\n deferred.reject(\n new RequestErrorEvent(\n xhr.status,\n xhr.response,\n xhr.getAllResponseHeaders(),\n ),\n );\n return;\n }\n\n const response = xhr.response;\n const browserResponseType = xhr.responseType;\n\n if (method === \"HEAD\" || method === \"OPTIONS\") {\n const responseHeaderString = xhr.getAllResponseHeaders();\n const splitHeaders = responseHeaderString.trim().split(/[\\r\\n]+/);\n\n const responseHeaders = {};\n splitHeaders.forEach(function (line) {\n const parts = line.split(\": \");\n const header = parts.shift();\n responseHeaders[header] = parts.join(\": \");\n });\n\n deferred.resolve(responseHeaders);\n return;\n }\n\n //All modern browsers will go into either the first or second if block or last else block.\n //Other code paths support older browsers that either do not support the supplied responseType\n //or do not support the xhr.response property.\n if (xhr.status === 204) {\n // accept no content\n deferred.resolve(undefined);\n } else if (\n defined(response) &&\n (!defined(responseType) || browserResponseType === responseType)\n ) {\n deferred.resolve(response);\n } else if (responseType === \"json\" && typeof response === \"string\") {\n try {\n deferred.resolve(JSON.parse(response));\n } catch (e) {\n deferred.reject(e);\n }\n } else if (\n (browserResponseType === \"\" || browserResponseType === \"document\") &&\n defined(xhr.responseXML) &&\n xhr.responseXML.hasChildNodes()\n ) {\n deferred.resolve(xhr.responseXML);\n } else if (\n (browserResponseType === \"\" || browserResponseType === \"text\") &&\n defined(xhr.responseText)\n ) {\n deferred.resolve(xhr.responseText);\n } else {\n deferred.reject(\n new RuntimeError(\"Invalid XMLHttpRequest response type.\"),\n );\n }\n };\n\n xhr.onerror = function (e) {\n deferred.reject(new RequestErrorEvent());\n };\n\n xhr.send(data);\n\n return xhr;\n};\n\nResource._Implementations.loadAndExecuteScript = function (\n url,\n functionName,\n deferred,\n) {\n return loadAndExecuteScript(url, functionName).catch(function (e) {\n deferred.reject(e);\n });\n};\n\n/**\n * The default implementations\n *\n * @private\n */\nResource._DefaultImplementations = {};\nResource._DefaultImplementations.createImage =\n Resource._Implementations.createImage;\nResource._DefaultImplementations.loadWithXhr =\n Resource._Implementations.loadWithXhr;\nResource._DefaultImplementations.loadAndExecuteScript =\n Resource._Implementations.loadAndExecuteScript;\n\n/**\n * A resource instance initialized to the current browser location\n *\n * @type {Resource}\n * @constant\n */\nResource.DEFAULT = Object.freeze(\n new Resource({\n url:\n typeof document === \"undefined\"\n ? \"\"\n : document.location.href.split(\"?\")[0],\n }),\n);\n\n/**\n * A function that returns the value of the property.\n * @callback Resource.RetryCallback\n *\n * @param {Resource} [resource] The resource that failed to load.\n * @param {RequestErrorEvent} [error] The error that occurred during the loading of the resource.\n * @returns {boolean|Promise} If true or a promise that resolved to true, the resource will be retried. Otherwise the failure will be returned.\n */\nexport default Resource;\n","/*!\n * URI.js - Mutating URLs\n *\n * Version: 1.19.11\n *\n * Author: Rodney Rehm\n * Web: http://medialize.github.io/URI.js/\n *\n * Licensed under\n * MIT License http://www.opensource.org/licenses/mit-license\n *\n */\n(function (root, factory) {\n 'use strict';\n // https://github.com/umdjs/umd/blob/master/returnExports.js\n if (typeof module === 'object' && module.exports) {\n // Node\n module.exports = factory(require('./punycode'), require('./IPv6'), require('./SecondLevelDomains'));\n } else if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define(['./punycode', './IPv6', './SecondLevelDomains'], factory);\n } else {\n // Browser globals (root is window)\n root.URI = factory(root.punycode, root.IPv6, root.SecondLevelDomains, root);\n }\n}(this, function (punycode, IPv6, SLD, root) {\n 'use strict';\n /*global location, escape, unescape */\n // FIXME: v2.0.0 renamce non-camelCase properties to uppercase\n /*jshint camelcase: false */\n\n // save current URI variable, if any\n var _URI = root && root.URI;\n\n function URI(url, base) {\n var _urlSupplied = arguments.length >= 1;\n var _baseSupplied = arguments.length >= 2;\n\n // Allow instantiation without the 'new' keyword\n if (!(this instanceof URI)) {\n if (_urlSupplied) {\n if (_baseSupplied) {\n return new URI(url, base);\n }\n\n return new URI(url);\n }\n\n return new URI();\n }\n\n if (url === undefined) {\n if (_urlSupplied) {\n throw new TypeError('undefined is not a valid argument for URI');\n }\n\n if (typeof location !== 'undefined') {\n url = location.href + '';\n } else {\n url = '';\n }\n }\n\n if (url === null) {\n if (_urlSupplied) {\n throw new TypeError('null is not a valid argument for URI');\n }\n }\n\n this.href(url);\n\n // resolve to base according to http://dvcs.w3.org/hg/url/raw-file/tip/Overview.html#constructor\n if (base !== undefined) {\n return this.absoluteTo(base);\n }\n\n return this;\n }\n\n function isInteger(value) {\n return /^[0-9]+$/.test(value);\n }\n\n URI.version = '1.19.11';\n\n var p = URI.prototype;\n var hasOwn = Object.prototype.hasOwnProperty;\n\n function escapeRegEx(string) {\n // https://github.com/medialize/URI.js/commit/85ac21783c11f8ccab06106dba9735a31a86924d#commitcomment-821963\n return string.replace(/([.*+?^=!:${}()|[\\]\\/\\\\])/g, '\\\\$1');\n }\n\n function getType(value) {\n // IE8 doesn't return [Object Undefined] but [Object Object] for undefined value\n if (value === undefined) {\n return 'Undefined';\n }\n\n return String(Object.prototype.toString.call(value)).slice(8, -1);\n }\n\n function isArray(obj) {\n return getType(obj) === 'Array';\n }\n\n function filterArrayValues(data, value) {\n var lookup = {};\n var i, length;\n\n if (getType(value) === 'RegExp') {\n lookup = null;\n } else if (isArray(value)) {\n for (i = 0, length = value.length; i < length; i++) {\n lookup[value[i]] = true;\n }\n } else {\n lookup[value] = true;\n }\n\n for (i = 0, length = data.length; i < length; i++) {\n /*jshint laxbreak: true */\n var _match = lookup && lookup[data[i]] !== undefined\n || !lookup && value.test(data[i]);\n /*jshint laxbreak: false */\n if (_match) {\n data.splice(i, 1);\n length--;\n i--;\n }\n }\n\n return data;\n }\n\n function arrayContains(list, value) {\n var i, length;\n\n // value may be string, number, array, regexp\n if (isArray(value)) {\n // Note: this can be optimized to O(n) (instead of current O(m * n))\n for (i = 0, length = value.length; i < length; i++) {\n if (!arrayContains(list, value[i])) {\n return false;\n }\n }\n\n return true;\n }\n\n var _type = getType(value);\n for (i = 0, length = list.length; i < length; i++) {\n if (_type === 'RegExp') {\n if (typeof list[i] === 'string' && list[i].match(value)) {\n return true;\n }\n } else if (list[i] === value) {\n return true;\n }\n }\n\n return false;\n }\n\n function arraysEqual(one, two) {\n if (!isArray(one) || !isArray(two)) {\n return false;\n }\n\n // arrays can't be equal if they have different amount of content\n if (one.length !== two.length) {\n return false;\n }\n\n one.sort();\n two.sort();\n\n for (var i = 0, l = one.length; i < l; i++) {\n if (one[i] !== two[i]) {\n return false;\n }\n }\n\n return true;\n }\n\n function trimSlashes(text) {\n var trim_expression = /^\\/+|\\/+$/g;\n return text.replace(trim_expression, '');\n }\n\n URI._parts = function() {\n return {\n protocol: null,\n username: null,\n password: null,\n hostname: null,\n urn: null,\n port: null,\n path: null,\n query: null,\n fragment: null,\n // state\n preventInvalidHostname: URI.preventInvalidHostname,\n duplicateQueryParameters: URI.duplicateQueryParameters,\n escapeQuerySpace: URI.escapeQuerySpace\n };\n };\n // state: throw on invalid hostname\n // see https://github.com/medialize/URI.js/pull/345\n // and https://github.com/medialize/URI.js/issues/354\n URI.preventInvalidHostname = false;\n // state: allow duplicate query parameters (a=1&a=1)\n URI.duplicateQueryParameters = false;\n // state: replaces + with %20 (space in query strings)\n URI.escapeQuerySpace = true;\n // static properties\n URI.protocol_expression = /^[a-z][a-z0-9.+-]*$/i;\n URI.idn_expression = /[^a-z0-9\\._-]/i;\n URI.punycode_expression = /(xn--)/i;\n // well, 333.444.555.666 matches, but it sure ain't no IPv4 - do we care?\n URI.ip4_expression = /^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$/;\n // credits to Rich Brown\n // source: http://forums.intermapper.com/viewtopic.php?p=1096#1096\n // specification: http://www.ietf.org/rfc/rfc4291.txt\n URI.ip6_expression = /^\\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$/;\n // expression used is \"gruber revised\" (@gruber v2) determined to be the\n // best solution in a regex-golf we did a couple of ages ago at\n // * http://mathiasbynens.be/demo/url-regex\n // * http://rodneyrehm.de/t/url-regex.html\n URI.find_uri_expression = /\\b((?:[a-z][\\w-]+:(?:\\/{1,3}|[a-z0-9%])|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}\\/)(?:[^\\s()<>]+|\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\))+(?:\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\)|[^\\s`!()\\[\\]{};:'\".,<>?«»“”‘’]))/ig;\n URI.findUri = {\n // valid \"scheme://\" or \"www.\"\n start: /\\b(?:([a-z][a-z0-9.+-]*:\\/\\/)|www\\.)/gi,\n // everything up to the next whitespace\n end: /[\\s\\r\\n]|$/,\n // trim trailing punctuation captured by end RegExp\n trim: /[`!()\\[\\]{};:'\".,<>?«»“”„‘’]+$/,\n // balanced parens inclusion (), [], {}, <>\n parens: /(\\([^\\)]*\\)|\\[[^\\]]*\\]|\\{[^}]*\\}|<[^>]*>)/g,\n };\n URI.leading_whitespace_expression = /^[\\x00-\\x20\\u00a0\\u1680\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000\\ufeff]+/\n // https://infra.spec.whatwg.org/#ascii-tab-or-newline\n URI.ascii_tab_whitespace = /[\\u0009\\u000A\\u000D]+/g\n // http://www.iana.org/assignments/uri-schemes.html\n // http://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers#Well-known_ports\n URI.defaultPorts = {\n http: '80',\n https: '443',\n ftp: '21',\n gopher: '70',\n ws: '80',\n wss: '443'\n };\n // list of protocols which always require a hostname\n URI.hostProtocols = [\n 'http',\n 'https'\n ];\n\n // allowed hostname characters according to RFC 3986\n // ALPHA DIGIT \"-\" \".\" \"_\" \"~\" \"!\" \"$\" \"&\" \"'\" \"(\" \")\" \"*\" \"+\" \",\" \";\" \"=\" %encoded\n // I've never seen a (non-IDN) hostname other than: ALPHA DIGIT . - _\n URI.invalid_hostname_characters = /[^a-zA-Z0-9\\.\\-:_]/;\n // map DOM Elements to their URI attribute\n URI.domAttributes = {\n 'a': 'href',\n 'blockquote': 'cite',\n 'link': 'href',\n 'base': 'href',\n 'script': 'src',\n 'form': 'action',\n 'img': 'src',\n 'area': 'href',\n 'iframe': 'src',\n 'embed': 'src',\n 'source': 'src',\n 'track': 'src',\n 'input': 'src', // but only if type=\"image\"\n 'audio': 'src',\n 'video': 'src'\n };\n URI.getDomAttribute = function(node) {\n if (!node || !node.nodeName) {\n return undefined;\n }\n\n var nodeName = node.nodeName.toLowerCase();\n // should only expose src for type=\"image\"\n if (nodeName === 'input' && node.type !== 'image') {\n return undefined;\n }\n\n return URI.domAttributes[nodeName];\n };\n\n function escapeForDumbFirefox36(value) {\n // https://github.com/medialize/URI.js/issues/91\n return escape(value);\n }\n\n // encoding / decoding according to RFC3986\n function strictEncodeURIComponent(string) {\n // see https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/encodeURIComponent\n return encodeURIComponent(string)\n .replace(/[!'()*]/g, escapeForDumbFirefox36)\n .replace(/\\*/g, '%2A');\n }\n URI.encode = strictEncodeURIComponent;\n URI.decode = decodeURIComponent;\n URI.iso8859 = function() {\n URI.encode = escape;\n URI.decode = unescape;\n };\n URI.unicode = function() {\n URI.encode = strictEncodeURIComponent;\n URI.decode = decodeURIComponent;\n };\n URI.characters = {\n pathname: {\n encode: {\n // RFC3986 2.1: For consistency, URI producers and normalizers should\n // use uppercase hexadecimal digits for all percent-encodings.\n expression: /%(24|26|2B|2C|3B|3D|3A|40)/ig,\n map: {\n // -._~!'()*\n '%24': '$',\n '%26': '&',\n '%2B': '+',\n '%2C': ',',\n '%3B': ';',\n '%3D': '=',\n '%3A': ':',\n '%40': '@'\n }\n },\n decode: {\n expression: /[\\/\\?#]/g,\n map: {\n '/': '%2F',\n '?': '%3F',\n '#': '%23'\n }\n }\n },\n reserved: {\n encode: {\n // RFC3986 2.1: For consistency, URI producers and normalizers should\n // use uppercase hexadecimal digits for all percent-encodings.\n expression: /%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/ig,\n map: {\n // gen-delims\n '%3A': ':',\n '%2F': '/',\n '%3F': '?',\n '%23': '#',\n '%5B': '[',\n '%5D': ']',\n '%40': '@',\n // sub-delims\n '%21': '!',\n '%24': '$',\n '%26': '&',\n '%27': '\\'',\n '%28': '(',\n '%29': ')',\n '%2A': '*',\n '%2B': '+',\n '%2C': ',',\n '%3B': ';',\n '%3D': '='\n }\n }\n },\n urnpath: {\n // The characters under `encode` are the characters called out by RFC 2141 as being acceptable\n // for usage in a URN. RFC2141 also calls out \"-\", \".\", and \"_\" as acceptable characters, but\n // these aren't encoded by encodeURIComponent, so we don't have to call them out here. Also\n // note that the colon character is not featured in the encoding map; this is because URI.js\n // gives the colons in URNs semantic meaning as the delimiters of path segements, and so it\n // should not appear unencoded in a segment itself.\n // See also the note above about RFC3986 and capitalalized hex digits.\n encode: {\n expression: /%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/ig,\n map: {\n '%21': '!',\n '%24': '$',\n '%27': '\\'',\n '%28': '(',\n '%29': ')',\n '%2A': '*',\n '%2B': '+',\n '%2C': ',',\n '%3B': ';',\n '%3D': '=',\n '%40': '@'\n }\n },\n // These characters are the characters called out by RFC2141 as \"reserved\" characters that\n // should never appear in a URN, plus the colon character (see note above).\n decode: {\n expression: /[\\/\\?#:]/g,\n map: {\n '/': '%2F',\n '?': '%3F',\n '#': '%23',\n ':': '%3A'\n }\n }\n }\n };\n URI.encodeQuery = function(string, escapeQuerySpace) {\n var escaped = URI.encode(string + '');\n if (escapeQuerySpace === undefined) {\n escapeQuerySpace = URI.escapeQuerySpace;\n }\n\n return escapeQuerySpace ? escaped.replace(/%20/g, '+') : escaped;\n };\n URI.decodeQuery = function(string, escapeQuerySpace) {\n string += '';\n if (escapeQuerySpace === undefined) {\n escapeQuerySpace = URI.escapeQuerySpace;\n }\n\n try {\n return URI.decode(escapeQuerySpace ? string.replace(/\\+/g, '%20') : string);\n } catch(e) {\n // we're not going to mess with weird encodings,\n // give up and return the undecoded original string\n // see https://github.com/medialize/URI.js/issues/87\n // see https://github.com/medialize/URI.js/issues/92\n return string;\n }\n };\n // generate encode/decode path functions\n var _parts = {'encode':'encode', 'decode':'decode'};\n var _part;\n var generateAccessor = function(_group, _part) {\n return function(string) {\n try {\n return URI[_part](string + '').replace(URI.characters[_group][_part].expression, function(c) {\n return URI.characters[_group][_part].map[c];\n });\n } catch (e) {\n // we're not going to mess with weird encodings,\n // give up and return the undecoded original string\n // see https://github.com/medialize/URI.js/issues/87\n // see https://github.com/medialize/URI.js/issues/92\n return string;\n }\n };\n };\n\n for (_part in _parts) {\n URI[_part + 'PathSegment'] = generateAccessor('pathname', _parts[_part]);\n URI[_part + 'UrnPathSegment'] = generateAccessor('urnpath', _parts[_part]);\n }\n\n var generateSegmentedPathFunction = function(_sep, _codingFuncName, _innerCodingFuncName) {\n return function(string) {\n // Why pass in names of functions, rather than the function objects themselves? The\n // definitions of some functions (but in particular, URI.decode) will occasionally change due\n // to URI.js having ISO8859 and Unicode modes. Passing in the name and getting it will ensure\n // that the functions we use here are \"fresh\".\n var actualCodingFunc;\n if (!_innerCodingFuncName) {\n actualCodingFunc = URI[_codingFuncName];\n } else {\n actualCodingFunc = function(string) {\n return URI[_codingFuncName](URI[_innerCodingFuncName](string));\n };\n }\n\n var segments = (string + '').split(_sep);\n\n for (var i = 0, length = segments.length; i < length; i++) {\n segments[i] = actualCodingFunc(segments[i]);\n }\n\n return segments.join(_sep);\n };\n };\n\n // This takes place outside the above loop because we don't want, e.g., encodeUrnPath functions.\n URI.decodePath = generateSegmentedPathFunction('/', 'decodePathSegment');\n URI.decodeUrnPath = generateSegmentedPathFunction(':', 'decodeUrnPathSegment');\n URI.recodePath = generateSegmentedPathFunction('/', 'encodePathSegment', 'decode');\n URI.recodeUrnPath = generateSegmentedPathFunction(':', 'encodeUrnPathSegment', 'decode');\n\n URI.encodeReserved = generateAccessor('reserved', 'encode');\n\n URI.parse = function(string, parts) {\n var pos;\n if (!parts) {\n parts = {\n preventInvalidHostname: URI.preventInvalidHostname\n };\n }\n\n string = string.replace(URI.leading_whitespace_expression, '')\n // https://infra.spec.whatwg.org/#ascii-tab-or-newline\n string = string.replace(URI.ascii_tab_whitespace, '')\n\n // [protocol\"://\"[username[\":\"password]\"@\"]hostname[\":\"port]\"/\"?][path][\"?\"querystring][\"#\"fragment]\n\n // extract fragment\n pos = string.indexOf('#');\n if (pos > -1) {\n // escaping?\n parts.fragment = string.substring(pos + 1) || null;\n string = string.substring(0, pos);\n }\n\n // extract query\n pos = string.indexOf('?');\n if (pos > -1) {\n // escaping?\n parts.query = string.substring(pos + 1) || null;\n string = string.substring(0, pos);\n }\n\n // slashes and backslashes have lost all meaning for the web protocols (https, http, wss, ws)\n string = string.replace(/^(https?|ftp|wss?)?:+[/\\\\]*/i, '$1://');\n // slashes and backslashes have lost all meaning for scheme relative URLs\n string = string.replace(/^[/\\\\]{2,}/i, '//');\n\n // extract protocol\n if (string.substring(0, 2) === '//') {\n // relative-scheme\n parts.protocol = null;\n string = string.substring(2);\n // extract \"user:pass@host:port\"\n string = URI.parseAuthority(string, parts);\n } else {\n pos = string.indexOf(':');\n if (pos > -1) {\n parts.protocol = string.substring(0, pos) || null;\n if (parts.protocol && !parts.protocol.match(URI.protocol_expression)) {\n // : may be within the path\n parts.protocol = undefined;\n } else if (string.substring(pos + 1, pos + 3).replace(/\\\\/g, '/') === '//') {\n string = string.substring(pos + 3);\n\n // extract \"user:pass@host:port\"\n string = URI.parseAuthority(string, parts);\n } else {\n string = string.substring(pos + 1);\n parts.urn = true;\n }\n }\n }\n\n // what's left must be the path\n parts.path = string;\n\n // and we're done\n return parts;\n };\n URI.parseHost = function(string, parts) {\n if (!string) {\n string = '';\n }\n\n // Copy chrome, IE, opera backslash-handling behavior.\n // Back slashes before the query string get converted to forward slashes\n // See: https://github.com/joyent/node/blob/386fd24f49b0e9d1a8a076592a404168faeecc34/lib/url.js#L115-L124\n // See: https://code.google.com/p/chromium/issues/detail?id=25916\n // https://github.com/medialize/URI.js/pull/233\n string = string.replace(/\\\\/g, '/');\n\n // extract host:port\n var pos = string.indexOf('/');\n var bracketPos;\n var t;\n\n if (pos === -1) {\n pos = string.length;\n }\n\n if (string.charAt(0) === '[') {\n // IPv6 host - http://tools.ietf.org/html/draft-ietf-6man-text-addr-representation-04#section-6\n // I claim most client software breaks on IPv6 anyways. To simplify things, URI only accepts\n // IPv6+port in the format [2001:db8::1]:80 (for the time being)\n bracketPos = string.indexOf(']');\n parts.hostname = string.substring(1, bracketPos) || null;\n parts.port = string.substring(bracketPos + 2, pos) || null;\n if (parts.port === '/') {\n parts.port = null;\n }\n } else {\n var firstColon = string.indexOf(':');\n var firstSlash = string.indexOf('/');\n var nextColon = string.indexOf(':', firstColon + 1);\n if (nextColon !== -1 && (firstSlash === -1 || nextColon < firstSlash)) {\n // IPv6 host contains multiple colons - but no port\n // this notation is actually not allowed by RFC 3986, but we're a liberal parser\n parts.hostname = string.substring(0, pos) || null;\n parts.port = null;\n } else {\n t = string.substring(0, pos).split(':');\n parts.hostname = t[0] || null;\n parts.port = t[1] || null;\n }\n }\n\n if (parts.hostname && string.substring(pos).charAt(0) !== '/') {\n pos++;\n string = '/' + string;\n }\n\n if (parts.preventInvalidHostname) {\n URI.ensureValidHostname(parts.hostname, parts.protocol);\n }\n\n if (parts.port) {\n URI.ensureValidPort(parts.port);\n }\n\n return string.substring(pos) || '/';\n };\n URI.parseAuthority = function(string, parts) {\n string = URI.parseUserinfo(string, parts);\n return URI.parseHost(string, parts);\n };\n URI.parseUserinfo = function(string, parts) {\n // extract username:password\n var _string = string\n var firstBackSlash = string.indexOf('\\\\');\n if (firstBackSlash !== -1) {\n string = string.replace(/\\\\/g, '/')\n }\n var firstSlash = string.indexOf('/');\n var pos = string.lastIndexOf('@', firstSlash > -1 ? firstSlash : string.length - 1);\n var t;\n\n // authority@ must come before /path or \\path\n if (pos > -1 && (firstSlash === -1 || pos < firstSlash)) {\n t = string.substring(0, pos).split(':');\n parts.username = t[0] ? URI.decode(t[0]) : null;\n t.shift();\n parts.password = t[0] ? URI.decode(t.join(':')) : null;\n string = _string.substring(pos + 1);\n } else {\n parts.username = null;\n parts.password = null;\n }\n\n return string;\n };\n URI.parseQuery = function(string, escapeQuerySpace) {\n if (!string) {\n return {};\n }\n\n // throw out the funky business - \"?\"[name\"=\"value\"&\"]+\n string = string.replace(/&+/g, '&').replace(/^\\?*&*|&+$/g, '');\n\n if (!string) {\n return {};\n }\n\n var items = {};\n var splits = string.split('&');\n var length = splits.length;\n var v, name, value;\n\n for (var i = 0; i < length; i++) {\n v = splits[i].split('=');\n name = URI.decodeQuery(v.shift(), escapeQuerySpace);\n // no \"=\" is null according to http://dvcs.w3.org/hg/url/raw-file/tip/Overview.html#collect-url-parameters\n value = v.length ? URI.decodeQuery(v.join('='), escapeQuerySpace) : null;\n\n if (name === '__proto__') {\n // ignore attempt at exploiting JavaScript internals\n continue;\n } else if (hasOwn.call(items, name)) {\n if (typeof items[name] === 'string' || items[name] === null) {\n items[name] = [items[name]];\n }\n\n items[name].push(value);\n } else {\n items[name] = value;\n }\n }\n\n return items;\n };\n\n URI.build = function(parts) {\n var t = '';\n var requireAbsolutePath = false\n\n if (parts.protocol) {\n t += parts.protocol + ':';\n }\n\n if (!parts.urn && (t || parts.hostname)) {\n t += '//';\n requireAbsolutePath = true\n }\n\n t += (URI.buildAuthority(parts) || '');\n\n if (typeof parts.path === 'string') {\n if (parts.path.charAt(0) !== '/' && requireAbsolutePath) {\n t += '/';\n }\n\n t += parts.path;\n }\n\n if (typeof parts.query === 'string' && parts.query) {\n t += '?' + parts.query;\n }\n\n if (typeof parts.fragment === 'string' && parts.fragment) {\n t += '#' + parts.fragment;\n }\n return t;\n };\n URI.buildHost = function(parts) {\n var t = '';\n\n if (!parts.hostname) {\n return '';\n } else if (URI.ip6_expression.test(parts.hostname)) {\n t += '[' + parts.hostname + ']';\n } else {\n t += parts.hostname;\n }\n\n if (parts.port) {\n t += ':' + parts.port;\n }\n\n return t;\n };\n URI.buildAuthority = function(parts) {\n return URI.buildUserinfo(parts) + URI.buildHost(parts);\n };\n URI.buildUserinfo = function(parts) {\n var t = '';\n\n if (parts.username) {\n t += URI.encode(parts.username);\n }\n\n if (parts.password) {\n t += ':' + URI.encode(parts.password);\n }\n\n if (t) {\n t += '@';\n }\n\n return t;\n };\n URI.buildQuery = function(data, duplicateQueryParameters, escapeQuerySpace) {\n // according to http://tools.ietf.org/html/rfc3986 or http://labs.apache.org/webarch/uri/rfc/rfc3986.html\n // being »-._~!$&'()*+,;=:@/?« %HEX and alnum are allowed\n // the RFC explicitly states ?/foo being a valid use case, no mention of parameter syntax!\n // URI.js treats the query string as being application/x-www-form-urlencoded\n // see http://www.w3.org/TR/REC-html40/interact/forms.html#form-content-type\n\n var t = '';\n var unique, key, i, length;\n for (key in data) {\n if (key === '__proto__') {\n // ignore attempt at exploiting JavaScript internals\n continue;\n } else if (hasOwn.call(data, key)) {\n if (isArray(data[key])) {\n unique = {};\n for (i = 0, length = data[key].length; i < length; i++) {\n if (data[key][i] !== undefined && unique[data[key][i] + ''] === undefined) {\n t += '&' + URI.buildQueryParameter(key, data[key][i], escapeQuerySpace);\n if (duplicateQueryParameters !== true) {\n unique[data[key][i] + ''] = true;\n }\n }\n }\n } else if (data[key] !== undefined) {\n t += '&' + URI.buildQueryParameter(key, data[key], escapeQuerySpace);\n }\n }\n }\n\n return t.substring(1);\n };\n URI.buildQueryParameter = function(name, value, escapeQuerySpace) {\n // http://www.w3.org/TR/REC-html40/interact/forms.html#form-content-type -- application/x-www-form-urlencoded\n // don't append \"=\" for null values, according to http://dvcs.w3.org/hg/url/raw-file/tip/Overview.html#url-parameter-serialization\n return URI.encodeQuery(name, escapeQuerySpace) + (value !== null ? '=' + URI.encodeQuery(value, escapeQuerySpace) : '');\n };\n\n URI.addQuery = function(data, name, value) {\n if (typeof name === 'object') {\n for (var key in name) {\n if (hasOwn.call(name, key)) {\n URI.addQuery(data, key, name[key]);\n }\n }\n } else if (typeof name === 'string') {\n if (data[name] === undefined) {\n data[name] = value;\n return;\n } else if (typeof data[name] === 'string') {\n data[name] = [data[name]];\n }\n\n if (!isArray(value)) {\n value = [value];\n }\n\n data[name] = (data[name] || []).concat(value);\n } else {\n throw new TypeError('URI.addQuery() accepts an object, string as the name parameter');\n }\n };\n\n URI.setQuery = function(data, name, value) {\n if (typeof name === 'object') {\n for (var key in name) {\n if (hasOwn.call(name, key)) {\n URI.setQuery(data, key, name[key]);\n }\n }\n } else if (typeof name === 'string') {\n data[name] = value === undefined ? null : value;\n } else {\n throw new TypeError('URI.setQuery() accepts an object, string as the name parameter');\n }\n };\n\n URI.removeQuery = function(data, name, value) {\n var i, length, key;\n\n if (isArray(name)) {\n for (i = 0, length = name.length; i < length; i++) {\n data[name[i]] = undefined;\n }\n } else if (getType(name) === 'RegExp') {\n for (key in data) {\n if (name.test(key)) {\n data[key] = undefined;\n }\n }\n } else if (typeof name === 'object') {\n for (key in name) {\n if (hasOwn.call(name, key)) {\n URI.removeQuery(data, key, name[key]);\n }\n }\n } else if (typeof name === 'string') {\n if (value !== undefined) {\n if (getType(value) === 'RegExp') {\n if (!isArray(data[name]) && value.test(data[name])) {\n data[name] = undefined;\n } else {\n data[name] = filterArrayValues(data[name], value);\n }\n } else if (data[name] === String(value) && (!isArray(value) || value.length === 1)) {\n data[name] = undefined;\n } else if (isArray(data[name])) {\n data[name] = filterArrayValues(data[name], value);\n }\n } else {\n data[name] = undefined;\n }\n } else {\n throw new TypeError('URI.removeQuery() accepts an object, string, RegExp as the first parameter');\n }\n };\n URI.hasQuery = function(data, name, value, withinArray) {\n switch (getType(name)) {\n case 'String':\n // Nothing to do here\n break;\n\n case 'RegExp':\n for (var key in data) {\n if (hasOwn.call(data, key)) {\n if (name.test(key) && (value === undefined || URI.hasQuery(data, key, value))) {\n return true;\n }\n }\n }\n\n return false;\n\n case 'Object':\n for (var _key in name) {\n if (hasOwn.call(name, _key)) {\n if (!URI.hasQuery(data, _key, name[_key])) {\n return false;\n }\n }\n }\n\n return true;\n\n default:\n throw new TypeError('URI.hasQuery() accepts a string, regular expression or object as the name parameter');\n }\n\n switch (getType(value)) {\n case 'Undefined':\n // true if exists (but may be empty)\n return name in data; // data[name] !== undefined;\n\n case 'Boolean':\n // true if exists and non-empty\n var _booly = Boolean(isArray(data[name]) ? data[name].length : data[name]);\n return value === _booly;\n\n case 'Function':\n // allow complex comparison\n return !!value(data[name], name, data);\n\n case 'Array':\n if (!isArray(data[name])) {\n return false;\n }\n\n var op = withinArray ? arrayContains : arraysEqual;\n return op(data[name], value);\n\n case 'RegExp':\n if (!isArray(data[name])) {\n return Boolean(data[name] && data[name].match(value));\n }\n\n if (!withinArray) {\n return false;\n }\n\n return arrayContains(data[name], value);\n\n case 'Number':\n value = String(value);\n /* falls through */\n case 'String':\n if (!isArray(data[name])) {\n return data[name] === value;\n }\n\n if (!withinArray) {\n return false;\n }\n\n return arrayContains(data[name], value);\n\n default:\n throw new TypeError('URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter');\n }\n };\n\n\n URI.joinPaths = function() {\n var input = [];\n var segments = [];\n var nonEmptySegments = 0;\n\n for (var i = 0; i < arguments.length; i++) {\n var url = new URI(arguments[i]);\n input.push(url);\n var _segments = url.segment();\n for (var s = 0; s < _segments.length; s++) {\n if (typeof _segments[s] === 'string') {\n segments.push(_segments[s]);\n }\n\n if (_segments[s]) {\n nonEmptySegments++;\n }\n }\n }\n\n if (!segments.length || !nonEmptySegments) {\n return new URI('');\n }\n\n var uri = new URI('').segment(segments);\n\n if (input[0].path() === '' || input[0].path().slice(0, 1) === '/') {\n uri.path('/' + uri.path());\n }\n\n return uri.normalize();\n };\n\n URI.commonPath = function(one, two) {\n var length = Math.min(one.length, two.length);\n var pos;\n\n // find first non-matching character\n for (pos = 0; pos < length; pos++) {\n if (one.charAt(pos) !== two.charAt(pos)) {\n pos--;\n break;\n }\n }\n\n if (pos < 1) {\n return one.charAt(0) === two.charAt(0) && one.charAt(0) === '/' ? '/' : '';\n }\n\n // revert to last /\n if (one.charAt(pos) !== '/' || two.charAt(pos) !== '/') {\n pos = one.substring(0, pos).lastIndexOf('/');\n }\n\n return one.substring(0, pos + 1);\n };\n\n URI.withinString = function(string, callback, options) {\n options || (options = {});\n var _start = options.start || URI.findUri.start;\n var _end = options.end || URI.findUri.end;\n var _trim = options.trim || URI.findUri.trim;\n var _parens = options.parens || URI.findUri.parens;\n var _attributeOpen = /[a-z0-9-]=[\"']?$/i;\n\n _start.lastIndex = 0;\n while (true) {\n var match = _start.exec(string);\n if (!match) {\n break;\n }\n\n var start = match.index;\n if (options.ignoreHtml) {\n // attribut(e=[\"']?$)\n var attributeOpen = string.slice(Math.max(start - 3, 0), start);\n if (attributeOpen && _attributeOpen.test(attributeOpen)) {\n continue;\n }\n }\n\n var end = start + string.slice(start).search(_end);\n var slice = string.slice(start, end);\n // make sure we include well balanced parens\n var parensEnd = -1;\n while (true) {\n var parensMatch = _parens.exec(slice);\n if (!parensMatch) {\n break;\n }\n\n var parensMatchEnd = parensMatch.index + parensMatch[0].length;\n parensEnd = Math.max(parensEnd, parensMatchEnd);\n }\n\n if (parensEnd > -1) {\n slice = slice.slice(0, parensEnd) + slice.slice(parensEnd).replace(_trim, '');\n } else {\n slice = slice.replace(_trim, '');\n }\n\n if (slice.length <= match[0].length) {\n // the extract only contains the starting marker of a URI,\n // e.g. \"www\" or \"http://\"\n continue;\n }\n\n if (options.ignore && options.ignore.test(slice)) {\n continue;\n }\n\n end = start + slice.length;\n var result = callback(slice, start, end, string);\n if (result === undefined) {\n _start.lastIndex = end;\n continue;\n }\n\n result = String(result);\n string = string.slice(0, start) + result + string.slice(end);\n _start.lastIndex = start + result.length;\n }\n\n _start.lastIndex = 0;\n return string;\n };\n\n URI.ensureValidHostname = function(v, protocol) {\n // Theoretically URIs allow percent-encoding in Hostnames (according to RFC 3986)\n // they are not part of DNS and therefore ignored by URI.js\n\n var hasHostname = !!v; // not null and not an empty string\n var hasProtocol = !!protocol;\n var rejectEmptyHostname = false;\n\n if (hasProtocol) {\n rejectEmptyHostname = arrayContains(URI.hostProtocols, protocol);\n }\n\n if (rejectEmptyHostname && !hasHostname) {\n throw new TypeError('Hostname cannot be empty, if protocol is ' + protocol);\n } else if (v && v.match(URI.invalid_hostname_characters)) {\n // test punycode\n if (!punycode) {\n throw new TypeError('Hostname \"' + v + '\" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');\n }\n if (punycode.toASCII(v).match(URI.invalid_hostname_characters)) {\n throw new TypeError('Hostname \"' + v + '\" contains characters other than [A-Z0-9.-:_]');\n }\n }\n };\n\n URI.ensureValidPort = function (v) {\n if (!v) {\n return;\n }\n\n var port = Number(v);\n if (isInteger(port) && (port > 0) && (port < 65536)) {\n return;\n }\n\n throw new TypeError('Port \"' + v + '\" is not a valid port');\n };\n\n // noConflict\n URI.noConflict = function(removeAll) {\n if (removeAll) {\n var unconflicted = {\n URI: this.noConflict()\n };\n\n if (root.URITemplate && typeof root.URITemplate.noConflict === 'function') {\n unconflicted.URITemplate = root.URITemplate.noConflict();\n }\n\n if (root.IPv6 && typeof root.IPv6.noConflict === 'function') {\n unconflicted.IPv6 = root.IPv6.noConflict();\n }\n\n if (root.SecondLevelDomains && typeof root.SecondLevelDomains.noConflict === 'function') {\n unconflicted.SecondLevelDomains = root.SecondLevelDomains.noConflict();\n }\n\n return unconflicted;\n } else if (root.URI === this) {\n root.URI = _URI;\n }\n\n return this;\n };\n\n p.build = function(deferBuild) {\n if (deferBuild === true) {\n this._deferred_build = true;\n } else if (deferBuild === undefined || this._deferred_build) {\n this._string = URI.build(this._parts);\n this._deferred_build = false;\n }\n\n return this;\n };\n\n p.clone = function() {\n return new URI(this);\n };\n\n p.valueOf = p.toString = function() {\n return this.build(false)._string;\n };\n\n\n function generateSimpleAccessor(_part){\n return function(v, build) {\n if (v === undefined) {\n return this._parts[_part] || '';\n } else {\n this._parts[_part] = v || null;\n this.build(!build);\n return this;\n }\n };\n }\n\n function generatePrefixAccessor(_part, _key){\n return function(v, build) {\n if (v === undefined) {\n return this._parts[_part] || '';\n } else {\n if (v !== null) {\n v = v + '';\n if (v.charAt(0) === _key) {\n v = v.substring(1);\n }\n }\n\n this._parts[_part] = v;\n this.build(!build);\n return this;\n }\n };\n }\n\n p.protocol = generateSimpleAccessor('protocol');\n p.username = generateSimpleAccessor('username');\n p.password = generateSimpleAccessor('password');\n p.hostname = generateSimpleAccessor('hostname');\n p.port = generateSimpleAccessor('port');\n p.query = generatePrefixAccessor('query', '?');\n p.fragment = generatePrefixAccessor('fragment', '#');\n\n p.search = function(v, build) {\n var t = this.query(v, build);\n return typeof t === 'string' && t.length ? ('?' + t) : t;\n };\n p.hash = function(v, build) {\n var t = this.fragment(v, build);\n return typeof t === 'string' && t.length ? ('#' + t) : t;\n };\n\n p.pathname = function(v, build) {\n if (v === undefined || v === true) {\n var res = this._parts.path || (this._parts.hostname ? '/' : '');\n return v ? (this._parts.urn ? URI.decodeUrnPath : URI.decodePath)(res) : res;\n } else {\n if (this._parts.urn) {\n this._parts.path = v ? URI.recodeUrnPath(v) : '';\n } else {\n this._parts.path = v ? URI.recodePath(v) : '/';\n }\n this.build(!build);\n return this;\n }\n };\n p.path = p.pathname;\n p.href = function(href, build) {\n var key;\n\n if (href === undefined) {\n return this.toString();\n }\n\n this._string = '';\n this._parts = URI._parts();\n\n var _URI = href instanceof URI;\n var _object = typeof href === 'object' && (href.hostname || href.path || href.pathname);\n if (href.nodeName) {\n var attribute = URI.getDomAttribute(href);\n href = href[attribute] || '';\n _object = false;\n }\n\n // window.location is reported to be an object, but it's not the sort\n // of object we're looking for:\n // * location.protocol ends with a colon\n // * location.query != object.search\n // * location.hash != object.fragment\n // simply serializing the unknown object should do the trick\n // (for location, not for everything...)\n if (!_URI && _object && href.pathname !== undefined) {\n href = href.toString();\n }\n\n if (typeof href === 'string' || href instanceof String) {\n this._parts = URI.parse(String(href), this._parts);\n } else if (_URI || _object) {\n var src = _URI ? href._parts : href;\n for (key in src) {\n if (key === 'query') { continue; }\n if (hasOwn.call(this._parts, key)) {\n this._parts[key] = src[key];\n }\n }\n if (src.query) {\n this.query(src.query, false);\n }\n } else {\n throw new TypeError('invalid input');\n }\n\n this.build(!build);\n return this;\n };\n\n // identification accessors\n p.is = function(what) {\n var ip = false;\n var ip4 = false;\n var ip6 = false;\n var name = false;\n var sld = false;\n var idn = false;\n var punycode = false;\n var relative = !this._parts.urn;\n\n if (this._parts.hostname) {\n relative = false;\n ip4 = URI.ip4_expression.test(this._parts.hostname);\n ip6 = URI.ip6_expression.test(this._parts.hostname);\n ip = ip4 || ip6;\n name = !ip;\n sld = name && SLD && SLD.has(this._parts.hostname);\n idn = name && URI.idn_expression.test(this._parts.hostname);\n punycode = name && URI.punycode_expression.test(this._parts.hostname);\n }\n\n switch (what.toLowerCase()) {\n case 'relative':\n return relative;\n\n case 'absolute':\n return !relative;\n\n // hostname identification\n case 'domain':\n case 'name':\n return name;\n\n case 'sld':\n return sld;\n\n case 'ip':\n return ip;\n\n case 'ip4':\n case 'ipv4':\n case 'inet4':\n return ip4;\n\n case 'ip6':\n case 'ipv6':\n case 'inet6':\n return ip6;\n\n case 'idn':\n return idn;\n\n case 'url':\n return !this._parts.urn;\n\n case 'urn':\n return !!this._parts.urn;\n\n case 'punycode':\n return punycode;\n }\n\n return null;\n };\n\n // component specific input validation\n var _protocol = p.protocol;\n var _port = p.port;\n var _hostname = p.hostname;\n\n p.protocol = function(v, build) {\n if (v) {\n // accept trailing ://\n v = v.replace(/:(\\/\\/)?$/, '');\n\n if (!v.match(URI.protocol_expression)) {\n throw new TypeError('Protocol \"' + v + '\" contains characters other than [A-Z0-9.+-] or doesn\\'t start with [A-Z]');\n }\n }\n\n return _protocol.call(this, v, build);\n };\n p.scheme = p.protocol;\n p.port = function(v, build) {\n if (this._parts.urn) {\n return v === undefined ? '' : this;\n }\n\n if (v !== undefined) {\n if (v === 0) {\n v = null;\n }\n\n if (v) {\n v += '';\n if (v.charAt(0) === ':') {\n v = v.substring(1);\n }\n\n URI.ensureValidPort(v);\n }\n }\n return _port.call(this, v, build);\n };\n p.hostname = function(v, build) {\n if (this._parts.urn) {\n return v === undefined ? '' : this;\n }\n\n if (v !== undefined) {\n var x = { preventInvalidHostname: this._parts.preventInvalidHostname };\n var res = URI.parseHost(v, x);\n if (res !== '/') {\n throw new TypeError('Hostname \"' + v + '\" contains characters other than [A-Z0-9.-]');\n }\n\n v = x.hostname;\n if (this._parts.preventInvalidHostname) {\n URI.ensureValidHostname(v, this._parts.protocol);\n }\n }\n\n return _hostname.call(this, v, build);\n };\n\n // compound accessors\n p.origin = function(v, build) {\n if (this._parts.urn) {\n return v === undefined ? '' : this;\n }\n\n if (v === undefined) {\n var protocol = this.protocol();\n var authority = this.authority();\n if (!authority) {\n return '';\n }\n\n return (protocol ? protocol + '://' : '') + this.authority();\n } else {\n var origin = URI(v);\n this\n .protocol(origin.protocol())\n .authority(origin.authority())\n .build(!build);\n return this;\n }\n };\n p.host = function(v, build) {\n if (this._parts.urn) {\n return v === undefined ? '' : this;\n }\n\n if (v === undefined) {\n return this._parts.hostname ? URI.buildHost(this._parts) : '';\n } else {\n var res = URI.parseHost(v, this._parts);\n if (res !== '/') {\n throw new TypeError('Hostname \"' + v + '\" contains characters other than [A-Z0-9.-]');\n }\n\n this.build(!build);\n return this;\n }\n };\n p.authority = function(v, build) {\n if (this._parts.urn) {\n return v === undefined ? '' : this;\n }\n\n if (v === undefined) {\n return this._parts.hostname ? URI.buildAuthority(this._parts) : '';\n } else {\n var res = URI.parseAuthority(v, this._parts);\n if (res !== '/') {\n throw new TypeError('Hostname \"' + v + '\" contains characters other than [A-Z0-9.-]');\n }\n\n this.build(!build);\n return this;\n }\n };\n p.userinfo = function(v, build) {\n if (this._parts.urn) {\n return v === undefined ? '' : this;\n }\n\n if (v === undefined) {\n var t = URI.buildUserinfo(this._parts);\n return t ? t.substring(0, t.length -1) : t;\n } else {\n if (v[v.length-1] !== '@') {\n v += '@';\n }\n\n URI.parseUserinfo(v, this._parts);\n this.build(!build);\n return this;\n }\n };\n p.resource = function(v, build) {\n var parts;\n\n if (v === undefined) {\n return this.path() + this.search() + this.hash();\n }\n\n parts = URI.parse(v);\n this._parts.path = parts.path;\n this._parts.query = parts.query;\n this._parts.fragment = parts.fragment;\n this.build(!build);\n return this;\n };\n\n // fraction accessors\n p.subdomain = function(v, build) {\n if (this._parts.urn) {\n return v === undefined ? '' : this;\n }\n\n // convenience, return \"www\" from \"www.example.org\"\n if (v === undefined) {\n if (!this._parts.hostname || this.is('IP')) {\n return '';\n }\n\n // grab domain and add another segment\n var end = this._parts.hostname.length - this.domain().length - 1;\n return this._parts.hostname.substring(0, end) || '';\n } else {\n var e = this._parts.hostname.length - this.domain().length;\n var sub = this._parts.hostname.substring(0, e);\n var replace = new RegExp('^' + escapeRegEx(sub));\n\n if (v && v.charAt(v.length - 1) !== '.') {\n v += '.';\n }\n\n if (v.indexOf(':') !== -1) {\n throw new TypeError('Domains cannot contain colons');\n }\n\n if (v) {\n URI.ensureValidHostname(v, this._parts.protocol);\n }\n\n this._parts.hostname = this._parts.hostname.replace(replace, v);\n this.build(!build);\n return this;\n }\n };\n p.domain = function(v, build) {\n if (this._parts.urn) {\n return v === undefined ? '' : this;\n }\n\n if (typeof v === 'boolean') {\n build = v;\n v = undefined;\n }\n\n // convenience, return \"example.org\" from \"www.example.org\"\n if (v === undefined) {\n if (!this._parts.hostname || this.is('IP')) {\n return '';\n }\n\n // if hostname consists of 1 or 2 segments, it must be the domain\n var t = this._parts.hostname.match(/\\./g);\n if (t && t.length < 2) {\n return this._parts.hostname;\n }\n\n // grab tld and add another segment\n var end = this._parts.hostname.length - this.tld(build).length - 1;\n end = this._parts.hostname.lastIndexOf('.', end -1) + 1;\n return this._parts.hostname.substring(end) || '';\n } else {\n if (!v) {\n throw new TypeError('cannot set domain empty');\n }\n\n if (v.indexOf(':') !== -1) {\n throw new TypeError('Domains cannot contain colons');\n }\n\n URI.ensureValidHostname(v, this._parts.protocol);\n\n if (!this._parts.hostname || this.is('IP')) {\n this._parts.hostname = v;\n } else {\n var replace = new RegExp(escapeRegEx(this.domain()) + '$');\n this._parts.hostname = this._parts.hostname.replace(replace, v);\n }\n\n this.build(!build);\n return this;\n }\n };\n p.tld = function(v, build) {\n if (this._parts.urn) {\n return v === undefined ? '' : this;\n }\n\n if (typeof v === 'boolean') {\n build = v;\n v = undefined;\n }\n\n // return \"org\" from \"www.example.org\"\n if (v === undefined) {\n if (!this._parts.hostname || this.is('IP')) {\n return '';\n }\n\n var pos = this._parts.hostname.lastIndexOf('.');\n var tld = this._parts.hostname.substring(pos + 1);\n\n if (build !== true && SLD && SLD.list[tld.toLowerCase()]) {\n return SLD.get(this._parts.hostname) || tld;\n }\n\n return tld;\n } else {\n var replace;\n\n if (!v) {\n throw new TypeError('cannot set TLD empty');\n } else if (v.match(/[^a-zA-Z0-9-]/)) {\n if (SLD && SLD.is(v)) {\n replace = new RegExp(escapeRegEx(this.tld()) + '$');\n this._parts.hostname = this._parts.hostname.replace(replace, v);\n } else {\n throw new TypeError('TLD \"' + v + '\" contains characters other than [A-Z0-9]');\n }\n } else if (!this._parts.hostname || this.is('IP')) {\n throw new ReferenceError('cannot set TLD on non-domain host');\n } else {\n replace = new RegExp(escapeRegEx(this.tld()) + '$');\n this._parts.hostname = this._parts.hostname.replace(replace, v);\n }\n\n this.build(!build);\n return this;\n }\n };\n p.directory = function(v, build) {\n if (this._parts.urn) {\n return v === undefined ? '' : this;\n }\n\n if (v === undefined || v === true) {\n if (!this._parts.path && !this._parts.hostname) {\n return '';\n }\n\n if (this._parts.path === '/') {\n return '/';\n }\n\n var end = this._parts.path.length - this.filename().length - 1;\n var res = this._parts.path.substring(0, end) || (this._parts.hostname ? '/' : '');\n\n return v ? URI.decodePath(res) : res;\n\n } else {\n var e = this._parts.path.length - this.filename().length;\n var directory = this._parts.path.substring(0, e);\n var replace = new RegExp('^' + escapeRegEx(directory));\n\n // fully qualifier directories begin with a slash\n if (!this.is('relative')) {\n if (!v) {\n v = '/';\n }\n\n if (v.charAt(0) !== '/') {\n v = '/' + v;\n }\n }\n\n // directories always end with a slash\n if (v && v.charAt(v.length - 1) !== '/') {\n v += '/';\n }\n\n v = URI.recodePath(v);\n this._parts.path = this._parts.path.replace(replace, v);\n this.build(!build);\n return this;\n }\n };\n p.filename = function(v, build) {\n if (this._parts.urn) {\n return v === undefined ? '' : this;\n }\n\n if (typeof v !== 'string') {\n if (!this._parts.path || this._parts.path === '/') {\n return '';\n }\n\n var pos = this._parts.path.lastIndexOf('/');\n var res = this._parts.path.substring(pos+1);\n\n return v ? URI.decodePathSegment(res) : res;\n } else {\n var mutatedDirectory = false;\n\n if (v.charAt(0) === '/') {\n v = v.substring(1);\n }\n\n if (v.match(/\\.?\\//)) {\n mutatedDirectory = true;\n }\n\n var replace = new RegExp(escapeRegEx(this.filename()) + '$');\n v = URI.recodePath(v);\n this._parts.path = this._parts.path.replace(replace, v);\n\n if (mutatedDirectory) {\n this.normalizePath(build);\n } else {\n this.build(!build);\n }\n\n return this;\n }\n };\n p.suffix = function(v, build) {\n if (this._parts.urn) {\n return v === undefined ? '' : this;\n }\n\n if (v === undefined || v === true) {\n if (!this._parts.path || this._parts.path === '/') {\n return '';\n }\n\n var filename = this.filename();\n var pos = filename.lastIndexOf('.');\n var s, res;\n\n if (pos === -1) {\n return '';\n }\n\n // suffix may only contain alnum characters (yup, I made this up.)\n s = filename.substring(pos+1);\n res = (/^[a-z0-9%]+$/i).test(s) ? s : '';\n return v ? URI.decodePathSegment(res) : res;\n } else {\n if (v.charAt(0) === '.') {\n v = v.substring(1);\n }\n\n var suffix = this.suffix();\n var replace;\n\n if (!suffix) {\n if (!v) {\n return this;\n }\n\n this._parts.path += '.' + URI.recodePath(v);\n } else if (!v) {\n replace = new RegExp(escapeRegEx('.' + suffix) + '$');\n } else {\n replace = new RegExp(escapeRegEx(suffix) + '$');\n }\n\n if (replace) {\n v = URI.recodePath(v);\n this._parts.path = this._parts.path.replace(replace, v);\n }\n\n this.build(!build);\n return this;\n }\n };\n p.segment = function(segment, v, build) {\n var separator = this._parts.urn ? ':' : '/';\n var path = this.path();\n var absolute = path.substring(0, 1) === '/';\n var segments = path.split(separator);\n\n if (segment !== undefined && typeof segment !== 'number') {\n build = v;\n v = segment;\n segment = undefined;\n }\n\n if (segment !== undefined && typeof segment !== 'number') {\n throw new Error('Bad segment \"' + segment + '\", must be 0-based integer');\n }\n\n if (absolute) {\n segments.shift();\n }\n\n if (segment < 0) {\n // allow negative indexes to address from the end\n segment = Math.max(segments.length + segment, 0);\n }\n\n if (v === undefined) {\n /*jshint laxbreak: true */\n return segment === undefined\n ? segments\n : segments[segment];\n /*jshint laxbreak: false */\n } else if (segment === null || segments[segment] === undefined) {\n if (isArray(v)) {\n segments = [];\n // collapse empty elements within array\n for (var i=0, l=v.length; i < l; i++) {\n if (!v[i].length && (!segments.length || !segments[segments.length -1].length)) {\n continue;\n }\n\n if (segments.length && !segments[segments.length -1].length) {\n segments.pop();\n }\n\n segments.push(trimSlashes(v[i]));\n }\n } else if (v || typeof v === 'string') {\n v = trimSlashes(v);\n if (segments[segments.length -1] === '') {\n // empty trailing elements have to be overwritten\n // to prevent results such as /foo//bar\n segments[segments.length -1] = v;\n } else {\n segments.push(v);\n }\n }\n } else {\n if (v) {\n segments[segment] = trimSlashes(v);\n } else {\n segments.splice(segment, 1);\n }\n }\n\n if (absolute) {\n segments.unshift('');\n }\n\n return this.path(segments.join(separator), build);\n };\n p.segmentCoded = function(segment, v, build) {\n var segments, i, l;\n\n if (typeof segment !== 'number') {\n build = v;\n v = segment;\n segment = undefined;\n }\n\n if (v === undefined) {\n segments = this.segment(segment, v, build);\n if (!isArray(segments)) {\n segments = segments !== undefined ? URI.decode(segments) : undefined;\n } else {\n for (i = 0, l = segments.length; i < l; i++) {\n segments[i] = URI.decode(segments[i]);\n }\n }\n\n return segments;\n }\n\n if (!isArray(v)) {\n v = (typeof v === 'string' || v instanceof String) ? URI.encode(v) : v;\n } else {\n for (i = 0, l = v.length; i < l; i++) {\n v[i] = URI.encode(v[i]);\n }\n }\n\n return this.segment(segment, v, build);\n };\n\n // mutating query string\n var q = p.query;\n p.query = function(v, build) {\n if (v === true) {\n return URI.parseQuery(this._parts.query, this._parts.escapeQuerySpace);\n } else if (typeof v === 'function') {\n var data = URI.parseQuery(this._parts.query, this._parts.escapeQuerySpace);\n var result = v.call(this, data);\n this._parts.query = URI.buildQuery(result || data, this._parts.duplicateQueryParameters, this._parts.escapeQuerySpace);\n this.build(!build);\n return this;\n } else if (v !== undefined && typeof v !== 'string') {\n this._parts.query = URI.buildQuery(v, this._parts.duplicateQueryParameters, this._parts.escapeQuerySpace);\n this.build(!build);\n return this;\n } else {\n return q.call(this, v, build);\n }\n };\n p.setQuery = function(name, value, build) {\n var data = URI.parseQuery(this._parts.query, this._parts.escapeQuerySpace);\n\n if (typeof name === 'string' || name instanceof String) {\n data[name] = value !== undefined ? value : null;\n } else if (typeof name === 'object') {\n for (var key in name) {\n if (hasOwn.call(name, key)) {\n data[key] = name[key];\n }\n }\n } else {\n throw new TypeError('URI.addQuery() accepts an object, string as the name parameter');\n }\n\n this._parts.query = URI.buildQuery(data, this._parts.duplicateQueryParameters, this._parts.escapeQuerySpace);\n if (typeof name !== 'string') {\n build = value;\n }\n\n this.build(!build);\n return this;\n };\n p.addQuery = function(name, value, build) {\n var data = URI.parseQuery(this._parts.query, this._parts.escapeQuerySpace);\n URI.addQuery(data, name, value === undefined ? null : value);\n this._parts.query = URI.buildQuery(data, this._parts.duplicateQueryParameters, this._parts.escapeQuerySpace);\n if (typeof name !== 'string') {\n build = value;\n }\n\n this.build(!build);\n return this;\n };\n p.removeQuery = function(name, value, build) {\n var data = URI.parseQuery(this._parts.query, this._parts.escapeQuerySpace);\n URI.removeQuery(data, name, value);\n this._parts.query = URI.buildQuery(data, this._parts.duplicateQueryParameters, this._parts.escapeQuerySpace);\n if (typeof name !== 'string') {\n build = value;\n }\n\n this.build(!build);\n return this;\n };\n p.hasQuery = function(name, value, withinArray) {\n var data = URI.parseQuery(this._parts.query, this._parts.escapeQuerySpace);\n return URI.hasQuery(data, name, value, withinArray);\n };\n p.setSearch = p.setQuery;\n p.addSearch = p.addQuery;\n p.removeSearch = p.removeQuery;\n p.hasSearch = p.hasQuery;\n\n // sanitizing URLs\n p.normalize = function() {\n if (this._parts.urn) {\n return this\n .normalizeProtocol(false)\n .normalizePath(false)\n .normalizeQuery(false)\n .normalizeFragment(false)\n .build();\n }\n\n return this\n .normalizeProtocol(false)\n .normalizeHostname(false)\n .normalizePort(false)\n .normalizePath(false)\n .normalizeQuery(false)\n .normalizeFragment(false)\n .build();\n };\n p.normalizeProtocol = function(build) {\n if (typeof this._parts.protocol === 'string') {\n this._parts.protocol = this._parts.protocol.toLowerCase();\n this.build(!build);\n }\n\n return this;\n };\n p.normalizeHostname = function(build) {\n if (this._parts.hostname) {\n if (this.is('IDN') && punycode) {\n this._parts.hostname = punycode.toASCII(this._parts.hostname);\n } else if (this.is('IPv6') && IPv6) {\n this._parts.hostname = IPv6.best(this._parts.hostname);\n }\n\n this._parts.hostname = this._parts.hostname.toLowerCase();\n this.build(!build);\n }\n\n return this;\n };\n p.normalizePort = function(build) {\n // remove port of it's the protocol's default\n if (typeof this._parts.protocol === 'string' && this._parts.port === URI.defaultPorts[this._parts.protocol]) {\n this._parts.port = null;\n this.build(!build);\n }\n\n return this;\n };\n p.normalizePath = function(build) {\n var _path = this._parts.path;\n if (!_path) {\n return this;\n }\n\n if (this._parts.urn) {\n this._parts.path = URI.recodeUrnPath(this._parts.path);\n this.build(!build);\n return this;\n }\n\n if (this._parts.path === '/') {\n return this;\n }\n\n _path = URI.recodePath(_path);\n\n var _was_relative;\n var _leadingParents = '';\n var _parent, _pos;\n\n // handle relative paths\n if (_path.charAt(0) !== '/') {\n _was_relative = true;\n _path = '/' + _path;\n }\n\n // handle relative files (as opposed to directories)\n if (_path.slice(-3) === '/..' || _path.slice(-2) === '/.') {\n _path += '/';\n }\n\n // resolve simples\n _path = _path\n .replace(/(\\/(\\.\\/)+)|(\\/\\.$)/g, '/')\n .replace(/\\/{2,}/g, '/');\n\n // remember leading parents\n if (_was_relative) {\n _leadingParents = _path.substring(1).match(/^(\\.\\.\\/)+/) || '';\n if (_leadingParents) {\n _leadingParents = _leadingParents[0];\n }\n }\n\n // resolve parents\n while (true) {\n _parent = _path.search(/\\/\\.\\.(\\/|$)/);\n if (_parent === -1) {\n // no more ../ to resolve\n break;\n } else if (_parent === 0) {\n // top level cannot be relative, skip it\n _path = _path.substring(3);\n continue;\n }\n\n _pos = _path.substring(0, _parent).lastIndexOf('/');\n if (_pos === -1) {\n _pos = _parent;\n }\n _path = _path.substring(0, _pos) + _path.substring(_parent + 3);\n }\n\n // revert to relative\n if (_was_relative && this.is('relative')) {\n _path = _leadingParents + _path.substring(1);\n }\n\n this._parts.path = _path;\n this.build(!build);\n return this;\n };\n p.normalizePathname = p.normalizePath;\n p.normalizeQuery = function(build) {\n if (typeof this._parts.query === 'string') {\n if (!this._parts.query.length) {\n this._parts.query = null;\n } else {\n this.query(URI.parseQuery(this._parts.query, this._parts.escapeQuerySpace));\n }\n\n this.build(!build);\n }\n\n return this;\n };\n p.normalizeFragment = function(build) {\n if (!this._parts.fragment) {\n this._parts.fragment = null;\n this.build(!build);\n }\n\n return this;\n };\n p.normalizeSearch = p.normalizeQuery;\n p.normalizeHash = p.normalizeFragment;\n\n p.iso8859 = function() {\n // expect unicode input, iso8859 output\n var e = URI.encode;\n var d = URI.decode;\n\n URI.encode = escape;\n URI.decode = decodeURIComponent;\n try {\n this.normalize();\n } finally {\n URI.encode = e;\n URI.decode = d;\n }\n return this;\n };\n\n p.unicode = function() {\n // expect iso8859 input, unicode output\n var e = URI.encode;\n var d = URI.decode;\n\n URI.encode = strictEncodeURIComponent;\n URI.decode = unescape;\n try {\n this.normalize();\n } finally {\n URI.encode = e;\n URI.decode = d;\n }\n return this;\n };\n\n p.readable = function() {\n var uri = this.clone();\n // removing username, password, because they shouldn't be displayed according to RFC 3986\n uri.username('').password('').normalize();\n var t = '';\n if (uri._parts.protocol) {\n t += uri._parts.protocol + '://';\n }\n\n if (uri._parts.hostname) {\n if (uri.is('punycode') && punycode) {\n t += punycode.toUnicode(uri._parts.hostname);\n if (uri._parts.port) {\n t += ':' + uri._parts.port;\n }\n } else {\n t += uri.host();\n }\n }\n\n if (uri._parts.hostname && uri._parts.path && uri._parts.path.charAt(0) !== '/') {\n t += '/';\n }\n\n t += uri.path(true);\n if (uri._parts.query) {\n var q = '';\n for (var i = 0, qp = uri._parts.query.split('&'), l = qp.length; i < l; i++) {\n var kv = (qp[i] || '').split('=');\n q += '&' + URI.decodeQuery(kv[0], this._parts.escapeQuerySpace)\n .replace(/&/g, '%26');\n\n if (kv[1] !== undefined) {\n q += '=' + URI.decodeQuery(kv[1], this._parts.escapeQuerySpace)\n .replace(/&/g, '%26');\n }\n }\n t += '?' + q.substring(1);\n }\n\n t += URI.decodeQuery(uri.hash(), true);\n return t;\n };\n\n // resolving relative and absolute URLs\n p.absoluteTo = function(base) {\n var resolved = this.clone();\n var properties = ['protocol', 'username', 'password', 'hostname', 'port'];\n var basedir, i, p;\n\n if (this._parts.urn) {\n throw new Error('URNs do not have any generally defined hierarchical components');\n }\n\n if (!(base instanceof URI)) {\n base = new URI(base);\n }\n\n if (resolved._parts.protocol) {\n // Directly returns even if this._parts.hostname is empty.\n return resolved;\n } else {\n resolved._parts.protocol = base._parts.protocol;\n }\n\n if (this._parts.hostname) {\n return resolved;\n }\n\n for (i = 0; (p = properties[i]); i++) {\n resolved._parts[p] = base._parts[p];\n }\n\n if (!resolved._parts.path) {\n resolved._parts.path = base._parts.path;\n if (!resolved._parts.query) {\n resolved._parts.query = base._parts.query;\n }\n } else {\n if (resolved._parts.path.substring(-2) === '..') {\n resolved._parts.path += '/';\n }\n\n if (resolved.path().charAt(0) !== '/') {\n basedir = base.directory();\n basedir = basedir ? basedir : base.path().indexOf('/') === 0 ? '/' : '';\n resolved._parts.path = (basedir ? (basedir + '/') : '') + resolved._parts.path;\n resolved.normalizePath();\n }\n }\n\n resolved.build();\n return resolved;\n };\n p.relativeTo = function(base) {\n var relative = this.clone().normalize();\n var relativeParts, baseParts, common, relativePath, basePath;\n\n if (relative._parts.urn) {\n throw new Error('URNs do not have any generally defined hierarchical components');\n }\n\n base = new URI(base).normalize();\n relativeParts = relative._parts;\n baseParts = base._parts;\n relativePath = relative.path();\n basePath = base.path();\n\n if (relativePath.charAt(0) !== '/') {\n throw new Error('URI is already relative');\n }\n\n if (basePath.charAt(0) !== '/') {\n throw new Error('Cannot calculate a URI relative to another relative URI');\n }\n\n if (relativeParts.protocol === baseParts.protocol) {\n relativeParts.protocol = null;\n }\n\n if (relativeParts.username !== baseParts.username || relativeParts.password !== baseParts.password) {\n return relative.build();\n }\n\n if (relativeParts.protocol !== null || relativeParts.username !== null || relativeParts.password !== null) {\n return relative.build();\n }\n\n if (relativeParts.hostname === baseParts.hostname && relativeParts.port === baseParts.port) {\n relativeParts.hostname = null;\n relativeParts.port = null;\n } else {\n return relative.build();\n }\n\n if (relativePath === basePath) {\n relativeParts.path = '';\n return relative.build();\n }\n\n // determine common sub path\n common = URI.commonPath(relativePath, basePath);\n\n // If the paths have nothing in common, return a relative URL with the absolute path.\n if (!common) {\n return relative.build();\n }\n\n var parents = baseParts.path\n .substring(common.length)\n .replace(/[^\\/]*$/, '')\n .replace(/.*?\\//g, '../');\n\n relativeParts.path = (parents + relativeParts.path.substring(common.length)) || './';\n\n return relative.build();\n };\n\n // comparing URIs\n p.equals = function(uri) {\n var one = this.clone();\n var two = new URI(uri);\n var one_map = {};\n var two_map = {};\n var checked = {};\n var one_query, two_query, key;\n\n one.normalize();\n two.normalize();\n\n // exact match\n if (one.toString() === two.toString()) {\n return true;\n }\n\n // extract query string\n one_query = one.query();\n two_query = two.query();\n one.query('');\n two.query('');\n\n // definitely not equal if not even non-query parts match\n if (one.toString() !== two.toString()) {\n return false;\n }\n\n // query parameters have the same length, even if they're permuted\n if (one_query.length !== two_query.length) {\n return false;\n }\n\n one_map = URI.parseQuery(one_query, this._parts.escapeQuerySpace);\n two_map = URI.parseQuery(two_query, this._parts.escapeQuerySpace);\n\n for (key in one_map) {\n if (hasOwn.call(one_map, key)) {\n if (!isArray(one_map[key])) {\n if (one_map[key] !== two_map[key]) {\n return false;\n }\n } else if (!arraysEqual(one_map[key], two_map[key])) {\n return false;\n }\n\n checked[key] = true;\n }\n }\n\n for (key in two_map) {\n if (hasOwn.call(two_map, key)) {\n if (!checked[key]) {\n // two contains a parameter not present in one\n return false;\n }\n }\n }\n\n return true;\n };\n\n // state\n p.preventInvalidHostname = function(v) {\n this._parts.preventInvalidHostname = !!v;\n return this;\n };\n\n p.duplicateQueryParameters = function(v) {\n this._parts.duplicateQueryParameters = !!v;\n return this;\n };\n\n p.escapeQuerySpace = function(v) {\n this._parts.escapeQuerySpace = !!v;\n return this;\n };\n\n return URI;\n}));\n","/**\n * @private\n */\nfunction appendForwardSlash(url) {\n if (url.length === 0 || url[url.length - 1] !== \"/\") {\n url = `${url}/`;\n }\n return url;\n}\nexport default appendForwardSlash;\n","import defaultValue from \"./defaultValue.js\";\n\n/**\n * Clones an object, returning a new object containing the same properties.\n *\n * @function\n *\n * @param {object} object The object to clone.\n * @param {boolean} [deep=false] If true, all properties will be deep cloned recursively.\n * @returns {object} The cloned object.\n */\nfunction clone(object, deep) {\n if (object === null || typeof object !== \"object\") {\n return object;\n }\n\n deep = defaultValue(deep, false);\n\n const result = new object.constructor();\n for (const propertyName in object) {\n if (object.hasOwnProperty(propertyName)) {\n let value = object[propertyName];\n if (deep) {\n value = clone(value, deep);\n }\n result[propertyName] = value;\n }\n }\n\n return result;\n}\nexport default clone;\n","import defaultValue from \"./defaultValue.js\";\nimport defined from \"./defined.js\";\n\n/**\n * Merges two objects, copying their properties onto a new combined object. When two objects have the same\n * property, the value of the property on the first object is used. If either object is undefined,\n * it will be treated as an empty object.\n *\n * @example\n * const object1 = {\n * propOne : 1,\n * propTwo : {\n * value1 : 10\n * }\n * }\n * const object2 = {\n * propTwo : 2\n * }\n * const final = Cesium.combine(object1, object2);\n *\n * // final === {\n * // propOne : 1,\n * // propTwo : {\n * // value1 : 10\n * // }\n * // }\n *\n * @param {object} [object1] The first object to merge.\n * @param {object} [object2] The second object to merge.\n * @param {boolean} [deep=false] Perform a recursive merge.\n * @returns {object} The combined object containing all properties from both objects.\n *\n * @function\n */\nfunction combine(object1, object2, deep) {\n deep = defaultValue(deep, false);\n\n const result = {};\n\n const object1Defined = defined(object1);\n const object2Defined = defined(object2);\n let property;\n let object1Value;\n let object2Value;\n if (object1Defined) {\n for (property in object1) {\n if (object1.hasOwnProperty(property)) {\n object1Value = object1[property];\n if (\n object2Defined &&\n deep &&\n typeof object1Value === \"object\" &&\n object2.hasOwnProperty(property)\n ) {\n object2Value = object2[property];\n if (typeof object2Value === \"object\") {\n result[property] = combine(object1Value, object2Value, deep);\n } else {\n result[property] = object1Value;\n }\n } else {\n result[property] = object1Value;\n }\n }\n }\n }\n if (object2Defined) {\n for (property in object2) {\n if (\n object2.hasOwnProperty(property) &&\n !result.hasOwnProperty(property)\n ) {\n object2Value = object2[property];\n result[property] = object2Value;\n }\n }\n }\n return result;\n}\nexport default combine;\n","/**\n * A function used to resolve a promise upon completion .\n * @callback defer.resolve\n *\n * @param {*} value The resulting value.\n */\n\n/**\n * A function used to reject a promise upon failure.\n * @callback defer.reject\n *\n * @param {*} error The error.\n */\n\n/**\n * An object which contains a promise object, and functions to resolve or reject the promise.\n *\n * @typedef {object} defer.deferred\n * @property {defer.resolve} resolve Resolves the promise when called.\n * @property {defer.reject} reject Rejects the promise when called.\n * @property {Promise} promise Promise object.\n */\n\n/**\n * Creates a deferred object, containing a promise object, and functions to resolve or reject the promise.\n * @returns {defer.deferred}\n * @private\n */\nfunction defer() {\n let resolve;\n let reject;\n const promise = new Promise(function (res, rej) {\n resolve = res;\n reject = rej;\n });\n\n return {\n resolve: resolve,\n reject: reject,\n promise: promise,\n };\n}\n\nexport default defer;\n","import Uri from \"urijs\";\nimport defaultValue from \"./defaultValue.js\";\nimport defined from \"./defined.js\";\nimport DeveloperError from \"./DeveloperError.js\";\n\n/**\n * Given a relative Uri and a base Uri, returns the absolute Uri of the relative Uri.\n * @function\n *\n * @param {string} relative The relative Uri.\n * @param {string} [base] The base Uri.\n * @returns {string} The absolute Uri of the given relative Uri.\n *\n * @example\n * //absolute Uri will be \"https://test.com/awesome.png\";\n * const absoluteUri = Cesium.getAbsoluteUri('awesome.png', 'https://test.com');\n */\nfunction getAbsoluteUri(relative, base) {\n let documentObject;\n if (typeof document !== \"undefined\") {\n documentObject = document;\n }\n\n return getAbsoluteUri._implementation(relative, base, documentObject);\n}\n\ngetAbsoluteUri._implementation = function (relative, base, documentObject) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(relative)) {\n throw new DeveloperError(\"relative uri is required.\");\n }\n //>>includeEnd('debug');\n\n if (!defined(base)) {\n if (typeof documentObject === \"undefined\") {\n return relative;\n }\n base = defaultValue(documentObject.baseURI, documentObject.location.href);\n }\n\n const relativeUri = new Uri(relative);\n if (relativeUri.scheme() !== \"\") {\n return relativeUri.toString();\n }\n return relativeUri.absoluteTo(base).toString();\n};\nexport default getAbsoluteUri;\n","import Uri from \"urijs\";\nimport defined from \"./defined.js\";\nimport DeveloperError from \"./DeveloperError.js\";\n\n/**\n * Given a URI, returns the base path of the URI.\n * @function\n *\n * @param {string} uri The Uri.\n * @param {boolean} [includeQuery = false] Whether or not to include the query string and fragment form the uri\n * @returns {string} The base path of the Uri.\n *\n * @example\n * // basePath will be \"/Gallery/\";\n * const basePath = Cesium.getBaseUri('/Gallery/simple.czml?value=true&example=false');\n *\n * // basePath will be \"/Gallery/?value=true&example=false\";\n * const basePath = Cesium.getBaseUri('/Gallery/simple.czml?value=true&example=false', true);\n */\nfunction getBaseUri(uri, includeQuery) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(uri)) {\n throw new DeveloperError(\"uri is required.\");\n }\n //>>includeEnd('debug');\n\n let basePath = \"\";\n const i = uri.lastIndexOf(\"/\");\n if (i !== -1) {\n basePath = uri.substring(0, i + 1);\n }\n\n if (!includeQuery) {\n return basePath;\n }\n\n uri = new Uri(uri);\n if (uri.query().length !== 0) {\n basePath += `?${uri.query()}`;\n }\n if (uri.fragment().length !== 0) {\n basePath += `#${uri.fragment()}`;\n }\n\n return basePath;\n}\nexport default getBaseUri;\n","import Uri from \"urijs\";\nimport defined from \"./defined.js\";\nimport DeveloperError from \"./DeveloperError.js\";\n\n/**\n * Given a URI, returns the extension of the URI.\n * @function getExtensionFromUri\n *\n * @param {string} uri The Uri.\n * @returns {string} The extension of the Uri.\n *\n * @example\n * //extension will be \"czml\";\n * const extension = Cesium.getExtensionFromUri('/Gallery/simple.czml?value=true&example=false');\n */\nfunction getExtensionFromUri(uri) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(uri)) {\n throw new DeveloperError(\"uri is required.\");\n }\n //>>includeEnd('debug');\n\n const uriObject = new Uri(uri);\n uriObject.normalize();\n let path = uriObject.path();\n let index = path.lastIndexOf(\"/\");\n if (index !== -1) {\n path = path.substr(index + 1);\n }\n index = path.lastIndexOf(\".\");\n if (index === -1) {\n path = \"\";\n } else {\n path = path.substr(index + 1);\n }\n return path;\n}\nexport default getExtensionFromUri;\n","import defined from \"./defined.js\";\n\nconst context2DsByWidthAndHeight = {};\n\n/**\n * Extract a pixel array from a loaded image. Draws the image\n * into a canvas so it can read the pixels back.\n *\n * @function getImagePixels\n *\n * @param {HTMLImageElement|ImageBitmap} image The image to extract pixels from.\n * @param {number} width The width of the image. If not defined, then image.width is assigned.\n * @param {number} height The height of the image. If not defined, then image.height is assigned.\n * @returns {ImageData} The pixels of the image.\n */\nfunction getImagePixels(image, width, height) {\n if (!defined(width)) {\n width = image.width;\n }\n if (!defined(height)) {\n height = image.height;\n }\n\n let context2DsByHeight = context2DsByWidthAndHeight[width];\n if (!defined(context2DsByHeight)) {\n context2DsByHeight = {};\n context2DsByWidthAndHeight[width] = context2DsByHeight;\n }\n\n let context2d = context2DsByHeight[height];\n if (!defined(context2d)) {\n const canvas = document.createElement(\"canvas\");\n canvas.width = width;\n canvas.height = height;\n // Since we re-use contexts, use the willReadFrequently option – See https://html.spec.whatwg.org/multipage/canvas.html#concept-canvas-will-read-frequently\n context2d = canvas.getContext(\"2d\", { willReadFrequently: true });\n context2d.globalCompositeOperation = \"copy\";\n context2DsByHeight[height] = context2d;\n }\n\n context2d.drawImage(image, 0, 0, width, height);\n return context2d.getImageData(0, 0, width, height).data;\n}\nexport default getImagePixels;\n","import Check from \"./Check.js\";\n\nconst blobUriRegex = /^blob:/i;\n\n/**\n * Determines if the specified uri is a blob uri.\n *\n * @function isBlobUri\n *\n * @param {string} uri The uri to test.\n * @returns {boolean} true when the uri is a blob uri; otherwise, false.\n *\n * @private\n */\nfunction isBlobUri(uri) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.string(\"uri\", uri);\n //>>includeEnd('debug');\n\n return blobUriRegex.test(uri);\n}\nexport default isBlobUri;\n","import defined from \"./defined.js\";\n\nlet a;\n\n/**\n * Given a URL, determine whether that URL is considered cross-origin to the current page.\n *\n * @private\n */\nfunction isCrossOriginUrl(url) {\n if (!defined(a)) {\n a = document.createElement(\"a\");\n }\n\n // copy window location into the anchor to get consistent results\n // when the port is default for the protocol (e.g. 80 for HTTP)\n a.href = window.location.href;\n\n // host includes both hostname and port if the port is not standard\n const host = a.host;\n const protocol = a.protocol;\n\n a.href = url;\n // IE only absolutizes href on get, not set\n // eslint-disable-next-line no-self-assign\n a.href = a.href;\n\n return protocol !== a.protocol || host !== a.host;\n}\nexport default isCrossOriginUrl;\n","import Check from \"./Check.js\";\n\nconst dataUriRegex = /^data:/i;\n\n/**\n * Determines if the specified uri is a data uri.\n *\n * @function isDataUri\n *\n * @param {string} uri The uri to test.\n * @returns {boolean} true when the uri is a data uri; otherwise, false.\n *\n * @private\n */\nfunction isDataUri(uri) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.string(\"uri\", uri);\n //>>includeEnd('debug');\n\n return dataUriRegex.test(uri);\n}\nexport default isDataUri;\n","/**\n * @private\n */\nfunction loadAndExecuteScript(url) {\n const script = document.createElement(\"script\");\n script.async = true;\n script.src = url;\n\n return new Promise((resolve, reject) => {\n if (window.crossOriginIsolated) {\n script.setAttribute(\"crossorigin\", \"anonymous\");\n }\n\n const head = document.getElementsByTagName(\"head\")[0];\n script.onload = function () {\n script.onload = undefined;\n head.removeChild(script);\n resolve();\n };\n script.onerror = function (e) {\n reject(e);\n };\n\n head.appendChild(script);\n });\n}\nexport default loadAndExecuteScript;\n","import defined from \"./defined.js\";\nimport DeveloperError from \"./DeveloperError.js\";\n\n/**\n * Converts an object representing a set of name/value pairs into a query string,\n * with names and values encoded properly for use in a URL. Values that are arrays\n * will produce multiple values with the same name.\n * @function objectToQuery\n *\n * @param {object} obj The object containing data to encode.\n * @returns {string} An encoded query string.\n *\n *\n * @example\n * const str = Cesium.objectToQuery({\n * key1 : 'some value',\n * key2 : 'a/b',\n * key3 : ['x', 'y']\n * });\n *\n * @see queryToObject\n * // str will be:\n * // 'key1=some%20value&key2=a%2Fb&key3=x&key3=y'\n */\nfunction objectToQuery(obj) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(obj)) {\n throw new DeveloperError(\"obj is required.\");\n }\n //>>includeEnd('debug');\n\n let result = \"\";\n for (const propName in obj) {\n if (obj.hasOwnProperty(propName)) {\n const value = obj[propName];\n\n const part = `${encodeURIComponent(propName)}=`;\n if (Array.isArray(value)) {\n for (let i = 0, len = value.length; i < len; ++i) {\n result += `${part + encodeURIComponent(value[i])}&`;\n }\n } else {\n result += `${part + encodeURIComponent(value)}&`;\n }\n }\n }\n\n // trim last &\n result = result.slice(0, -1);\n\n // This function used to replace %20 with + which is more compact and readable.\n // However, some servers didn't properly handle + as a space.\n // https://github.com/CesiumGS/cesium/issues/2192\n\n return result;\n}\nexport default objectToQuery;\n","import defined from \"./defined.js\";\nimport DeveloperError from \"./DeveloperError.js\";\n\n/**\n * Parses a query string into an object, where the keys and values of the object are the\n * name/value pairs from the query string, decoded. If a name appears multiple times,\n * the value in the object will be an array of values.\n * @function queryToObject\n *\n * @param {string} queryString The query string.\n * @returns {object} An object containing the parameters parsed from the query string.\n *\n *\n * @example\n * const obj = Cesium.queryToObject('key1=some%20value&key2=a%2Fb&key3=x&key3=y');\n * // obj will be:\n * // {\n * // key1 : 'some value',\n * // key2 : 'a/b',\n * // key3 : ['x', 'y']\n * // }\n *\n * @see objectToQuery\n */\nfunction queryToObject(queryString) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(queryString)) {\n throw new DeveloperError(\"queryString is required.\");\n }\n //>>includeEnd('debug');\n\n const result = {};\n if (queryString === \"\") {\n return result;\n }\n const parts = queryString.replace(/\\+/g, \"%20\").split(/[&;]/);\n for (let i = 0, len = parts.length; i < len; ++i) {\n const subparts = parts[i].split(\"=\");\n\n const name = decodeURIComponent(subparts[0]);\n let value = subparts[1];\n if (defined(value)) {\n value = decodeURIComponent(value);\n } else {\n value = \"\";\n }\n\n const resultValue = result[name];\n if (typeof resultValue === \"string\") {\n // expand the single value to an array\n result[name] = [resultValue, value];\n } else if (Array.isArray(resultValue)) {\n resultValue.push(value);\n } else {\n result[name] = value;\n }\n }\n return result;\n}\nexport default queryToObject;\n","import defaultValue from \"./defaultValue.js\";\nimport defined from \"./defined.js\";\nimport RequestState from \"./RequestState.js\";\nimport RequestType from \"./RequestType.js\";\n\n/**\n * Stores information for making a request. In general this does not need to be constructed directly.\n *\n * @alias Request\n * @constructor\n\n * @param {object} [options] An object with the following properties:\n * @param {string} [options.url] The url to request.\n * @param {Request.RequestCallback} [options.requestFunction] The function that makes the actual data request.\n * @param {Request.CancelCallback} [options.cancelFunction] The function that is called when the request is cancelled.\n * @param {Request.PriorityCallback} [options.priorityFunction] The function that is called to update the request's priority, which occurs once per frame.\n * @param {number} [options.priority=0.0] The initial priority of the request.\n * @param {boolean} [options.throttle=false] Whether to throttle and prioritize the request. If false, the request will be sent immediately. If true, the request will be throttled and sent based on priority.\n * @param {boolean} [options.throttleByServer=false] Whether to throttle the request by server.\n * @param {RequestType} [options.type=RequestType.OTHER] The type of request.\n * @param {string} [options.serverKey] A key used to identify the server that a request is going to.\n */\nfunction Request(options) {\n options = defaultValue(options, defaultValue.EMPTY_OBJECT);\n\n const throttleByServer = defaultValue(options.throttleByServer, false);\n const throttle = defaultValue(options.throttle, false);\n\n /**\n * The URL to request.\n *\n * @type {string}\n */\n this.url = options.url;\n\n /**\n * The function that makes the actual data request.\n *\n * @type {Request.RequestCallback}\n */\n this.requestFunction = options.requestFunction;\n\n /**\n * The function that is called when the request is cancelled.\n *\n * @type {Request.CancelCallback}\n */\n this.cancelFunction = options.cancelFunction;\n\n /**\n * The function that is called to update the request's priority, which occurs once per frame.\n *\n * @type {Request.PriorityCallback}\n */\n this.priorityFunction = options.priorityFunction;\n\n /**\n * Priority is a unit-less value where lower values represent higher priority.\n * For world-based objects, this is usually the distance from the camera.\n * A request that does not have a priority function defaults to a priority of 0.\n *\n * If priorityFunction is defined, this value is updated every frame with the result of that call.\n *\n * @type {number}\n * @default 0.0\n */\n this.priority = defaultValue(options.priority, 0.0);\n\n /**\n * Whether to throttle and prioritize the request. If false, the request will be sent immediately. If true, the\n * request will be throttled and sent based on priority.\n *\n * @type {boolean}\n * @readonly\n *\n * @default false\n */\n this.throttle = throttle;\n\n /**\n * Whether to throttle the request by server. Browsers typically support about 6-8 parallel connections\n * for HTTP/1 servers, and an unlimited amount of connections for HTTP/2 servers. Setting this value\n * to true is preferable for requests going through HTTP/1 servers.\n *\n * @type {boolean}\n * @readonly\n *\n * @default false\n */\n this.throttleByServer = throttleByServer;\n\n /**\n * Type of request.\n *\n * @type {RequestType}\n * @readonly\n *\n * @default RequestType.OTHER\n */\n this.type = defaultValue(options.type, RequestType.OTHER);\n\n /**\n * A key used to identify the server that a request is going to. It is derived from the url's authority and scheme.\n *\n * @type {string}\n *\n * @private\n */\n this.serverKey = options.serverKey;\n\n /**\n * The current state of the request.\n *\n * @type {RequestState}\n * @readonly\n */\n this.state = RequestState.UNISSUED;\n\n /**\n * The requests's deferred promise.\n *\n * @type {object}\n *\n * @private\n */\n this.deferred = undefined;\n\n /**\n * Whether the request was explicitly cancelled.\n *\n * @type {boolean}\n *\n * @private\n */\n this.cancelled = false;\n}\n\n/**\n * Mark the request as cancelled.\n *\n * @private\n */\nRequest.prototype.cancel = function () {\n this.cancelled = true;\n};\n\n/**\n * Duplicates a Request instance.\n *\n * @param {Request} [result] The object onto which to store the result.\n *\n * @returns {Request} The modified result parameter or a new Resource instance if one was not provided.\n */\nRequest.prototype.clone = function (result) {\n if (!defined(result)) {\n return new Request(this);\n }\n\n result.url = this.url;\n result.requestFunction = this.requestFunction;\n result.cancelFunction = this.cancelFunction;\n result.priorityFunction = this.priorityFunction;\n result.priority = this.priority;\n result.throttle = this.throttle;\n result.throttleByServer = this.throttleByServer;\n result.type = this.type;\n result.serverKey = this.serverKey;\n\n // These get defaulted because the cloned request hasn't been issued\n result.state = RequestState.UNISSUED;\n result.deferred = undefined;\n result.cancelled = false;\n\n return result;\n};\n\n/**\n * The function that makes the actual data request.\n * @callback Request.RequestCallback\n * @returns {Promise} A promise for the requested data.\n */\n\n/**\n * The function that is called when the request is cancelled.\n * @callback Request.CancelCallback\n */\n\n/**\n * The function that is called to update the request's priority, which occurs once per frame.\n * @callback Request.PriorityCallback\n * @returns {number} The updated priority value.\n */\nexport default Request;\n","/**\n * State of the request.\n *\n * @enum {number}\n */\nconst RequestState = {\n /**\n * Initial unissued state.\n *\n * @type {number}\n * @constant\n */\n UNISSUED: 0,\n\n /**\n * Issued but not yet active. Will become active when open slots are available.\n *\n * @type {number}\n * @constant\n */\n ISSUED: 1,\n\n /**\n * Actual http request has been sent.\n *\n * @type {number}\n * @constant\n */\n ACTIVE: 2,\n\n /**\n * Request completed successfully.\n *\n * @type {number}\n * @constant\n */\n RECEIVED: 3,\n\n /**\n * Request was cancelled, either explicitly or automatically because of low priority.\n *\n * @type {number}\n * @constant\n */\n CANCELLED: 4,\n\n /**\n * Request failed.\n *\n * @type {number}\n * @constant\n */\n FAILED: 5,\n};\nexport default Object.freeze(RequestState);\n","/**\n * An enum identifying the type of request. Used for finer grained logging and priority sorting.\n *\n * @enum {number}\n */\nconst RequestType = {\n /**\n * Terrain request.\n *\n * @type {number}\n * @constant\n */\n TERRAIN: 0,\n\n /**\n * Imagery request.\n *\n * @type {number}\n * @constant\n */\n IMAGERY: 1,\n\n /**\n * 3D Tiles request.\n *\n * @type {number}\n * @constant\n */\n TILES3D: 2,\n\n /**\n * Other request.\n *\n * @type {number}\n * @constant\n */\n OTHER: 3,\n};\nexport default Object.freeze(RequestType);\n","import defined from \"./defined.js\";\nimport parseResponseHeaders from \"./parseResponseHeaders.js\";\n\n/**\n * An event that is raised when a request encounters an error.\n *\n * @constructor\n * @alias RequestErrorEvent\n *\n * @param {number} [statusCode] The HTTP error status code, such as 404.\n * @param {object} [response] The response included along with the error.\n * @param {string|object} [responseHeaders] The response headers, represented either as an object literal or as a\n * string in the format returned by XMLHttpRequest's getAllResponseHeaders() function.\n */\nfunction RequestErrorEvent(statusCode, response, responseHeaders) {\n /**\n * The HTTP error status code, such as 404. If the error does not have a particular\n * HTTP code, this property will be undefined.\n *\n * @type {number}\n */\n this.statusCode = statusCode;\n\n /**\n * The response included along with the error. If the error does not include a response,\n * this property will be undefined.\n *\n * @type {object}\n */\n this.response = response;\n\n /**\n * The headers included in the response, represented as an object literal of key/value pairs.\n * If the error does not include any headers, this property will be undefined.\n *\n * @type {object}\n */\n this.responseHeaders = responseHeaders;\n\n if (typeof this.responseHeaders === \"string\") {\n this.responseHeaders = parseResponseHeaders(this.responseHeaders);\n }\n}\n\n/**\n * Creates a string representing this RequestErrorEvent.\n * @memberof RequestErrorEvent\n *\n * @returns {string} A string representing the provided RequestErrorEvent.\n */\nRequestErrorEvent.prototype.toString = function () {\n let str = \"Request has failed.\";\n if (defined(this.statusCode)) {\n str += ` Status Code: ${this.statusCode}`;\n }\n return str;\n};\nexport default RequestErrorEvent;\n","/**\n * Parses the result of XMLHttpRequest's getAllResponseHeaders() method into\n * a dictionary.\n *\n * @function parseResponseHeaders\n *\n * @param {string} headerString The header string returned by getAllResponseHeaders(). The format is\n * described here: http://www.w3.org/TR/XMLHttpRequest/#the-getallresponseheaders()-method\n * @returns {object} A dictionary of key/value pairs, where each key is the name of a header and the corresponding value\n * is that header's value.\n *\n * @private\n */\nfunction parseResponseHeaders(headerString) {\n const headers = {};\n\n if (!headerString) {\n return headers;\n }\n\n const headerPairs = headerString.split(\"\\u000d\\u000a\");\n\n for (let i = 0; i < headerPairs.length; ++i) {\n const headerPair = headerPairs[i];\n // Can't use split() here because it does the wrong thing\n // if the header value has the string \": \" in it.\n const index = headerPair.indexOf(\"\\u003a\\u0020\");\n if (index > 0) {\n const key = headerPair.substring(0, index);\n const val = headerPair.substring(index + 2);\n headers[key] = val;\n }\n }\n\n return headers;\n}\nexport default parseResponseHeaders;\n","import Uri from \"urijs\";\nimport Check from \"./Check.js\";\nimport defaultValue from \"./defaultValue.js\";\nimport defer from \"./defer.js\";\nimport defined from \"./defined.js\";\nimport Event from \"./Event.js\";\nimport Heap from \"./Heap.js\";\nimport isBlobUri from \"./isBlobUri.js\";\nimport isDataUri from \"./isDataUri.js\";\nimport RequestState from \"./RequestState.js\";\n\nfunction sortRequests(a, b) {\n return a.priority - b.priority;\n}\n\nconst statistics = {\n numberOfAttemptedRequests: 0,\n numberOfActiveRequests: 0,\n numberOfCancelledRequests: 0,\n numberOfCancelledActiveRequests: 0,\n numberOfFailedRequests: 0,\n numberOfActiveRequestsEver: 0,\n lastNumberOfActiveRequests: 0,\n};\n\nlet priorityHeapLength = 20;\nconst requestHeap = new Heap({\n comparator: sortRequests,\n});\nrequestHeap.maximumLength = priorityHeapLength;\nrequestHeap.reserve(priorityHeapLength);\n\nconst activeRequests = [];\nlet numberOfActiveRequestsByServer = {};\n\nconst pageUri =\n typeof document !== \"undefined\" ? new Uri(document.location.href) : new Uri();\n\nconst requestCompletedEvent = new Event();\n\n/**\n * The request scheduler is used to track and constrain the number of active requests in order to prioritize incoming requests. The ability\n * to retain control over the number of requests in CesiumJS is important because due to events such as changes in the camera position,\n * a lot of new requests may be generated and a lot of in-flight requests may become redundant. The request scheduler manually constrains the\n * number of requests so that newer requests wait in a shorter queue and don't have to compete for bandwidth with requests that have expired.\n *\n * @namespace RequestScheduler\n *\n */\nfunction RequestScheduler() {}\n\n/**\n * The maximum number of simultaneous active requests. Un-throttled requests do not observe this limit.\n * @type {number}\n * @default 50\n */\nRequestScheduler.maximumRequests = 50;\n\n/**\n * The maximum number of simultaneous active requests per server. Un-throttled requests or servers specifically\n * listed in {@link requestsByServer} do not observe this limit.\n * @type {number}\n * @default 18\n */\nRequestScheduler.maximumRequestsPerServer = 18;\n\n/**\n * A per server key list of overrides to use for throttling instead of maximumRequestsPerServer.\n * Useful when streaming data from a known HTTP/2 or HTTP/3 server.\n * @type {object}\n *\n * @example\n * RequestScheduler.requestsByServer[\"myserver.com:443\"] = 18;\n *\n * @example\n * RequestScheduler.requestsByServer = {\n * \"api.cesium.com:443\": 18,\n * \"assets.cesium.com:443\": 18,\n * };\n */\nRequestScheduler.requestsByServer = {};\n\n/**\n * Specifies if the request scheduler should throttle incoming requests, or let the browser queue requests under its control.\n * @type {boolean}\n * @default true\n */\nRequestScheduler.throttleRequests = true;\n\n/**\n * When true, log statistics to the console every frame\n * @type {boolean}\n * @default false\n * @private\n */\nRequestScheduler.debugShowStatistics = false;\n\n/**\n * An event that's raised when a request is completed. Event handlers are passed\n * the error object if the request fails.\n *\n * @type {Event}\n * @default Event()\n * @private\n */\nRequestScheduler.requestCompletedEvent = requestCompletedEvent;\n\nObject.defineProperties(RequestScheduler, {\n /**\n * Returns the statistics used by the request scheduler.\n *\n * @memberof RequestScheduler\n *\n * @type {object}\n * @readonly\n * @private\n */\n statistics: {\n get: function () {\n return statistics;\n },\n },\n\n /**\n * The maximum size of the priority heap. This limits the number of requests that are sorted by priority. Only applies to requests that are not yet active.\n *\n * @memberof RequestScheduler\n *\n * @type {number}\n * @default 20\n * @private\n */\n priorityHeapLength: {\n get: function () {\n return priorityHeapLength;\n },\n set: function (value) {\n // If the new length shrinks the heap, need to cancel some of the requests.\n // Since this value is not intended to be tweaked regularly it is fine to just cancel the high priority requests.\n if (value < priorityHeapLength) {\n while (requestHeap.length > value) {\n const request = requestHeap.pop();\n cancelRequest(request);\n }\n }\n priorityHeapLength = value;\n requestHeap.maximumLength = value;\n requestHeap.reserve(value);\n },\n },\n});\n\nfunction updatePriority(request) {\n if (defined(request.priorityFunction)) {\n request.priority = request.priorityFunction();\n }\n}\n\n/**\n * Check if there are open slots for a particular server key. If desiredRequests is greater than 1, this checks if the queue has room for scheduling multiple requests.\n * @param {string} serverKey The server key returned by {@link RequestScheduler.getServerKey}.\n * @param {number} [desiredRequests=1] How many requests the caller plans to request\n * @return {boolean} True if there are enough open slots for desiredRequests more requests.\n * @private\n */\nRequestScheduler.serverHasOpenSlots = function (serverKey, desiredRequests) {\n desiredRequests = defaultValue(desiredRequests, 1);\n\n const maxRequests = defaultValue(\n RequestScheduler.requestsByServer[serverKey],\n RequestScheduler.maximumRequestsPerServer,\n );\n const hasOpenSlotsServer =\n numberOfActiveRequestsByServer[serverKey] + desiredRequests <= maxRequests;\n\n return hasOpenSlotsServer;\n};\n\n/**\n * Check if the priority heap has open slots, regardless of which server they\n * are from. This is used in {@link Multiple3DTileContent} for determining when\n * all requests can be scheduled\n * @param {number} desiredRequests The number of requests the caller intends to make\n * @return {boolean} true if the heap has enough available slots to meet the desiredRequests. false otherwise.\n *\n * @private\n */\nRequestScheduler.heapHasOpenSlots = function (desiredRequests) {\n const hasOpenSlotsHeap =\n requestHeap.length + desiredRequests <= priorityHeapLength;\n return hasOpenSlotsHeap;\n};\n\nfunction issueRequest(request) {\n if (request.state === RequestState.UNISSUED) {\n request.state = RequestState.ISSUED;\n request.deferred = defer();\n }\n return request.deferred.promise;\n}\n\nfunction getRequestReceivedFunction(request) {\n return function (results) {\n if (request.state === RequestState.CANCELLED) {\n // If the data request comes back but the request is cancelled, ignore it.\n return;\n }\n // explicitly set to undefined to ensure GC of request response data. See #8843\n const deferred = request.deferred;\n\n --statistics.numberOfActiveRequests;\n --numberOfActiveRequestsByServer[request.serverKey];\n requestCompletedEvent.raiseEvent();\n request.state = RequestState.RECEIVED;\n request.deferred = undefined;\n\n deferred.resolve(results);\n };\n}\n\nfunction getRequestFailedFunction(request) {\n return function (error) {\n if (request.state === RequestState.CANCELLED) {\n // If the data request comes back but the request is cancelled, ignore it.\n return;\n }\n ++statistics.numberOfFailedRequests;\n --statistics.numberOfActiveRequests;\n --numberOfActiveRequestsByServer[request.serverKey];\n requestCompletedEvent.raiseEvent(error);\n request.state = RequestState.FAILED;\n request.deferred.reject(error);\n };\n}\n\nfunction startRequest(request) {\n const promise = issueRequest(request);\n request.state = RequestState.ACTIVE;\n activeRequests.push(request);\n ++statistics.numberOfActiveRequests;\n ++statistics.numberOfActiveRequestsEver;\n ++numberOfActiveRequestsByServer[request.serverKey];\n request\n .requestFunction()\n .then(getRequestReceivedFunction(request))\n .catch(getRequestFailedFunction(request));\n return promise;\n}\n\nfunction cancelRequest(request) {\n const active = request.state === RequestState.ACTIVE;\n request.state = RequestState.CANCELLED;\n ++statistics.numberOfCancelledRequests;\n // check that deferred has not been cleared since cancelRequest can be called\n // on a finished request, e.g. by clearForSpecs during tests\n if (defined(request.deferred)) {\n const deferred = request.deferred;\n request.deferred = undefined;\n deferred.reject();\n }\n\n if (active) {\n --statistics.numberOfActiveRequests;\n --numberOfActiveRequestsByServer[request.serverKey];\n ++statistics.numberOfCancelledActiveRequests;\n }\n\n if (defined(request.cancelFunction)) {\n request.cancelFunction();\n }\n}\n\n/**\n * Sort requests by priority and start requests.\n * @private\n */\nRequestScheduler.update = function () {\n let i;\n let request;\n\n // Loop over all active requests. Cancelled, failed, or received requests are removed from the array to make room for new requests.\n let removeCount = 0;\n const activeLength = activeRequests.length;\n for (i = 0; i < activeLength; ++i) {\n request = activeRequests[i];\n if (request.cancelled) {\n // Request was explicitly cancelled\n cancelRequest(request);\n }\n if (request.state !== RequestState.ACTIVE) {\n // Request is no longer active, remove from array\n ++removeCount;\n continue;\n }\n if (removeCount > 0) {\n // Shift back to fill in vacated slots from completed requests\n activeRequests[i - removeCount] = request;\n }\n }\n activeRequests.length -= removeCount;\n\n // Update priority of issued requests and resort the heap\n const issuedRequests = requestHeap.internalArray;\n const issuedLength = requestHeap.length;\n for (i = 0; i < issuedLength; ++i) {\n updatePriority(issuedRequests[i]);\n }\n requestHeap.resort();\n\n // Get the number of open slots and fill with the highest priority requests.\n // Un-throttled requests are automatically added to activeRequests, so activeRequests.length may exceed maximumRequests\n const openSlots = Math.max(\n RequestScheduler.maximumRequests - activeRequests.length,\n 0,\n );\n let filledSlots = 0;\n while (filledSlots < openSlots && requestHeap.length > 0) {\n // Loop until all open slots are filled or the heap becomes empty\n request = requestHeap.pop();\n if (request.cancelled) {\n // Request was explicitly cancelled\n cancelRequest(request);\n continue;\n }\n\n if (\n request.throttleByServer &&\n !RequestScheduler.serverHasOpenSlots(request.serverKey)\n ) {\n // Open slots are available, but the request is throttled by its server. Cancel and try again later.\n cancelRequest(request);\n continue;\n }\n\n startRequest(request);\n ++filledSlots;\n }\n\n updateStatistics();\n};\n\n/**\n * Get the server key from a given url.\n *\n * @param {string} url The url.\n * @returns {string} The server key.\n * @private\n */\nRequestScheduler.getServerKey = function (url) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.string(\"url\", url);\n //>>includeEnd('debug');\n\n let uri = new Uri(url);\n if (uri.scheme() === \"\") {\n uri = uri.absoluteTo(pageUri);\n uri.normalize();\n }\n\n let serverKey = uri.authority();\n if (!/:/.test(serverKey)) {\n // If the authority does not contain a port number, add port 443 for https or port 80 for http\n serverKey = `${serverKey}:${uri.scheme() === \"https\" ? \"443\" : \"80\"}`;\n }\n\n const length = numberOfActiveRequestsByServer[serverKey];\n if (!defined(length)) {\n numberOfActiveRequestsByServer[serverKey] = 0;\n }\n\n return serverKey;\n};\n\n/**\n * Issue a request. If request.throttle is false, the request is sent immediately. Otherwise the request will be\n * queued and sorted by priority before being sent.\n *\n * @param {Request} request The request object.\n *\n * @returns {Promise|undefined} A Promise for the requested data, or undefined if this request does not have high enough priority to be issued.\n *\n * @private\n */\nRequestScheduler.request = function (request) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"request\", request);\n Check.typeOf.string(\"request.url\", request.url);\n Check.typeOf.func(\"request.requestFunction\", request.requestFunction);\n //>>includeEnd('debug');\n\n if (isDataUri(request.url) || isBlobUri(request.url)) {\n requestCompletedEvent.raiseEvent();\n request.state = RequestState.RECEIVED;\n return request.requestFunction();\n }\n\n ++statistics.numberOfAttemptedRequests;\n\n if (!defined(request.serverKey)) {\n request.serverKey = RequestScheduler.getServerKey(request.url);\n }\n\n if (\n RequestScheduler.throttleRequests &&\n request.throttleByServer &&\n !RequestScheduler.serverHasOpenSlots(request.serverKey)\n ) {\n // Server is saturated. Try again later.\n return undefined;\n }\n\n if (!RequestScheduler.throttleRequests || !request.throttle) {\n return startRequest(request);\n }\n\n if (activeRequests.length >= RequestScheduler.maximumRequests) {\n // Active requests are saturated. Try again later.\n return undefined;\n }\n\n // Insert into the priority heap and see if a request was bumped off. If this request is the lowest\n // priority it will be returned.\n updatePriority(request);\n const removedRequest = requestHeap.insert(request);\n\n if (defined(removedRequest)) {\n if (removedRequest === request) {\n // Request does not have high enough priority to be issued\n return undefined;\n }\n // A previously issued request has been bumped off the priority heap, so cancel it\n cancelRequest(removedRequest);\n }\n\n return issueRequest(request);\n};\n\nfunction updateStatistics() {\n if (!RequestScheduler.debugShowStatistics) {\n return;\n }\n\n if (\n statistics.numberOfActiveRequests === 0 &&\n statistics.lastNumberOfActiveRequests > 0\n ) {\n if (statistics.numberOfAttemptedRequests > 0) {\n console.log(\n `Number of attempted requests: ${statistics.numberOfAttemptedRequests}`,\n );\n statistics.numberOfAttemptedRequests = 0;\n }\n\n if (statistics.numberOfCancelledRequests > 0) {\n console.log(\n `Number of cancelled requests: ${statistics.numberOfCancelledRequests}`,\n );\n statistics.numberOfCancelledRequests = 0;\n }\n\n if (statistics.numberOfCancelledActiveRequests > 0) {\n console.log(\n `Number of cancelled active requests: ${statistics.numberOfCancelledActiveRequests}`,\n );\n statistics.numberOfCancelledActiveRequests = 0;\n }\n\n if (statistics.numberOfFailedRequests > 0) {\n console.log(\n `Number of failed requests: ${statistics.numberOfFailedRequests}`,\n );\n statistics.numberOfFailedRequests = 0;\n }\n }\n\n statistics.lastNumberOfActiveRequests = statistics.numberOfActiveRequests;\n}\n\n/**\n * For testing only. Clears any requests that may not have completed from previous tests.\n *\n * @private\n */\nRequestScheduler.clearForSpecs = function () {\n while (requestHeap.length > 0) {\n const request = requestHeap.pop();\n cancelRequest(request);\n }\n const length = activeRequests.length;\n for (let i = 0; i < length; ++i) {\n cancelRequest(activeRequests[i]);\n }\n activeRequests.length = 0;\n numberOfActiveRequestsByServer = {};\n\n // Clear stats\n statistics.numberOfAttemptedRequests = 0;\n statistics.numberOfActiveRequests = 0;\n statistics.numberOfCancelledRequests = 0;\n statistics.numberOfCancelledActiveRequests = 0;\n statistics.numberOfFailedRequests = 0;\n statistics.numberOfActiveRequestsEver = 0;\n statistics.lastNumberOfActiveRequests = 0;\n};\n\n/**\n * For testing only.\n *\n * @private\n */\nRequestScheduler.numberOfActiveRequestsByServer = function (serverKey) {\n return numberOfActiveRequestsByServer[serverKey];\n};\n\n/**\n * For testing only.\n *\n * @private\n */\nRequestScheduler.requestHeap = requestHeap;\nexport default RequestScheduler;\n","import Check from \"./Check.js\";\nimport defined from \"./defined.js\";\n\n/**\n * A generic utility class for managing subscribers for a particular event.\n * This class is usually instantiated inside of a container class and\n * exposed as a property for others to subscribe to.\n *\n * @alias Event\n * @template Listener extends (...args: any[]) => void = (...args: any[]) => void\n * @constructor\n * @example\n * MyObject.prototype.myListener = function(arg1, arg2) {\n * this.myArg1Copy = arg1;\n * this.myArg2Copy = arg2;\n * }\n *\n * const myObjectInstance = new MyObject();\n * const evt = new Cesium.Event();\n * evt.addEventListener(MyObject.prototype.myListener, myObjectInstance);\n * evt.raiseEvent('1', '2');\n * evt.removeEventListener(MyObject.prototype.myListener);\n */\nfunction Event() {\n this._listeners = [];\n this._scopes = [];\n this._toRemove = [];\n this._insideRaiseEvent = false;\n}\n\nObject.defineProperties(Event.prototype, {\n /**\n * The number of listeners currently subscribed to the event.\n * @memberof Event.prototype\n * @type {number}\n * @readonly\n */\n numberOfListeners: {\n get: function () {\n return this._listeners.length - this._toRemove.length;\n },\n },\n});\n\n/**\n * Registers a callback function to be executed whenever the event is raised.\n * An optional scope can be provided to serve as the this pointer\n * in which the function will execute.\n *\n * @param {Listener} listener The function to be executed when the event is raised.\n * @param {object} [scope] An optional object scope to serve as the this\n * pointer in which the listener function will execute.\n * @returns {Event.RemoveCallback} A function that will remove this event listener when invoked.\n *\n * @see Event#raiseEvent\n * @see Event#removeEventListener\n */\nEvent.prototype.addEventListener = function (listener, scope) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.func(\"listener\", listener);\n //>>includeEnd('debug');\n\n this._listeners.push(listener);\n this._scopes.push(scope);\n\n const event = this;\n return function () {\n event.removeEventListener(listener, scope);\n };\n};\n\n/**\n * Unregisters a previously registered callback.\n *\n * @param {Listener} listener The function to be unregistered.\n * @param {object} [scope] The scope that was originally passed to addEventListener.\n * @returns {boolean} true if the listener was removed; false if the listener and scope are not registered with the event.\n *\n * @see Event#addEventListener\n * @see Event#raiseEvent\n */\nEvent.prototype.removeEventListener = function (listener, scope) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.func(\"listener\", listener);\n //>>includeEnd('debug');\n\n const listeners = this._listeners;\n const scopes = this._scopes;\n\n let index = -1;\n for (let i = 0; i < listeners.length; i++) {\n if (listeners[i] === listener && scopes[i] === scope) {\n index = i;\n break;\n }\n }\n\n if (index !== -1) {\n if (this._insideRaiseEvent) {\n //In order to allow removing an event subscription from within\n //a callback, we don't actually remove the items here. Instead\n //remember the index they are at and undefined their value.\n this._toRemove.push(index);\n listeners[index] = undefined;\n scopes[index] = undefined;\n } else {\n listeners.splice(index, 1);\n scopes.splice(index, 1);\n }\n return true;\n }\n\n return false;\n};\n\nfunction compareNumber(a, b) {\n return b - a;\n}\n\n/**\n * Raises the event by calling each registered listener with all supplied arguments.\n *\n * @param {...Parameters} arguments This method takes any number of parameters and passes them through to the listener functions.\n *\n * @see Event#addEventListener\n * @see Event#removeEventListener\n */\nEvent.prototype.raiseEvent = function () {\n this._insideRaiseEvent = true;\n\n let i;\n const listeners = this._listeners;\n const scopes = this._scopes;\n let length = listeners.length;\n\n for (i = 0; i < length; i++) {\n const listener = listeners[i];\n if (defined(listener)) {\n listeners[i].apply(scopes[i], arguments);\n }\n }\n\n //Actually remove items removed in removeEventListener.\n const toRemove = this._toRemove;\n length = toRemove.length;\n if (length > 0) {\n toRemove.sort(compareNumber);\n for (i = 0; i < length; i++) {\n const index = toRemove[i];\n listeners.splice(index, 1);\n scopes.splice(index, 1);\n }\n toRemove.length = 0;\n }\n\n this._insideRaiseEvent = false;\n};\n\n/**\n * A function that removes a listener.\n * @callback Event.RemoveCallback\n */\n\nexport default Event;\n","import Check from \"./Check.js\";\nimport defaultValue from \"./defaultValue.js\";\nimport defined from \"./defined.js\";\n\n/**\n * Array implementation of a heap.\n *\n * @alias Heap\n * @constructor\n * @private\n *\n * @param {object} options Object with the following properties:\n * @param {Heap.ComparatorCallback} options.comparator The comparator to use for the heap. If comparator(a, b) is less than 0, sort a to a lower index than b, otherwise sort to a higher index.\n */\nfunction Heap(options) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"options\", options);\n Check.defined(\"options.comparator\", options.comparator);\n //>>includeEnd('debug');\n\n this._comparator = options.comparator;\n this._array = [];\n this._length = 0;\n this._maximumLength = undefined;\n}\n\nObject.defineProperties(Heap.prototype, {\n /**\n * Gets the length of the heap.\n *\n * @memberof Heap.prototype\n *\n * @type {number}\n * @readonly\n */\n length: {\n get: function () {\n return this._length;\n },\n },\n\n /**\n * Gets the internal array.\n *\n * @memberof Heap.prototype\n *\n * @type {Array}\n * @readonly\n */\n internalArray: {\n get: function () {\n return this._array;\n },\n },\n\n /**\n * Gets and sets the maximum length of the heap.\n *\n * @memberof Heap.prototype\n *\n * @type {number}\n */\n maximumLength: {\n get: function () {\n return this._maximumLength;\n },\n set: function (value) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.number.greaterThanOrEquals(\"maximumLength\", value, 0);\n //>>includeEnd('debug');\n const originalLength = this._length;\n if (value < originalLength) {\n const array = this._array;\n // Remove trailing references\n for (let i = value; i < originalLength; ++i) {\n array[i] = undefined;\n }\n this._length = value;\n array.length = value;\n }\n this._maximumLength = value;\n },\n },\n\n /**\n * The comparator to use for the heap. If comparator(a, b) is less than 0, sort a to a lower index than b, otherwise sort to a higher index.\n *\n * @memberof Heap.prototype\n *\n * @type {Heap.ComparatorCallback}\n */\n comparator: {\n get: function () {\n return this._comparator;\n },\n },\n});\n\nfunction swap(array, a, b) {\n const temp = array[a];\n array[a] = array[b];\n array[b] = temp;\n}\n\n/**\n * Resizes the internal array of the heap.\n *\n * @param {number} [length] The length to resize internal array to. Defaults to the current length of the heap.\n */\nHeap.prototype.reserve = function (length) {\n length = defaultValue(length, this._length);\n this._array.length = length;\n};\n\n/**\n * Update the heap so that index and all descendants satisfy the heap property.\n *\n * @param {number} [index=0] The starting index to heapify from.\n */\nHeap.prototype.heapify = function (index) {\n index = defaultValue(index, 0);\n const length = this._length;\n const comparator = this._comparator;\n const array = this._array;\n let candidate = -1;\n let inserting = true;\n\n while (inserting) {\n const right = 2 * (index + 1);\n const left = right - 1;\n\n if (left < length && comparator(array[left], array[index]) < 0) {\n candidate = left;\n } else {\n candidate = index;\n }\n\n if (right < length && comparator(array[right], array[candidate]) < 0) {\n candidate = right;\n }\n if (candidate !== index) {\n swap(array, candidate, index);\n index = candidate;\n } else {\n inserting = false;\n }\n }\n};\n\n/**\n * Resort the heap.\n */\nHeap.prototype.resort = function () {\n const length = this._length;\n for (let i = Math.ceil(length / 2); i >= 0; --i) {\n this.heapify(i);\n }\n};\n\n/**\n * Insert an element into the heap. If the length would grow greater than maximumLength\n * of the heap, extra elements are removed.\n *\n * @param {*} element The element to insert\n *\n * @return {*} The element that was removed from the heap if the heap is at full capacity.\n */\nHeap.prototype.insert = function (element) {\n //>>includeStart('debug', pragmas.debug);\n Check.defined(\"element\", element);\n //>>includeEnd('debug');\n\n const array = this._array;\n const comparator = this._comparator;\n const maximumLength = this._maximumLength;\n\n let index = this._length++;\n if (index < array.length) {\n array[index] = element;\n } else {\n array.push(element);\n }\n\n while (index !== 0) {\n const parent = Math.floor((index - 1) / 2);\n if (comparator(array[index], array[parent]) < 0) {\n swap(array, index, parent);\n index = parent;\n } else {\n break;\n }\n }\n\n let removedElement;\n\n if (defined(maximumLength) && this._length > maximumLength) {\n removedElement = array[maximumLength];\n this._length = maximumLength;\n }\n\n return removedElement;\n};\n\n/**\n * Remove the element specified by index from the heap and return it.\n *\n * @param {number} [index=0] The index to remove.\n * @returns {*} The specified element of the heap.\n */\nHeap.prototype.pop = function (index) {\n index = defaultValue(index, 0);\n if (this._length === 0) {\n return undefined;\n }\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.number.lessThan(\"index\", index, this._length);\n //>>includeEnd('debug');\n\n const array = this._array;\n const root = array[index];\n swap(array, index, --this._length);\n this.heapify(index);\n array[this._length] = undefined; // Remove trailing reference\n return root;\n};\n\n/**\n * The comparator to use for the heap.\n * @callback Heap.ComparatorCallback\n * @param {*} a An element in the heap.\n * @param {*} b An element in the heap.\n * @returns {number} If the result of the comparison is less than 0, sort a to a lower index than b, otherwise sort to a higher index.\n */\nexport default Heap;\n","import Uri from \"urijs\";\nimport defined from \"./defined.js\";\nimport DeveloperError from \"./DeveloperError.js\";\n\n/**\n * A singleton that contains all of the servers that are trusted. Credentials will be sent with\n * any requests to these servers.\n *\n * @namespace TrustedServers\n *\n * @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}\n */\nconst TrustedServers = {};\nlet _servers = {};\n\n/**\n * Adds a trusted server to the registry\n *\n * @param {string} host The host to be added.\n * @param {number} port The port used to access the host.\n *\n * @example\n * // Add a trusted server\n * TrustedServers.add('my.server.com', 80);\n */\nTrustedServers.add = function (host, port) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(host)) {\n throw new DeveloperError(\"host is required.\");\n }\n if (!defined(port) || port <= 0) {\n throw new DeveloperError(\"port is required to be greater than 0.\");\n }\n //>>includeEnd('debug');\n\n const authority = `${host.toLowerCase()}:${port}`;\n if (!defined(_servers[authority])) {\n _servers[authority] = true;\n }\n};\n\n/**\n * Removes a trusted server from the registry\n *\n * @param {string} host The host to be removed.\n * @param {number} port The port used to access the host.\n *\n * @example\n * // Remove a trusted server\n * TrustedServers.remove('my.server.com', 80);\n */\nTrustedServers.remove = function (host, port) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(host)) {\n throw new DeveloperError(\"host is required.\");\n }\n if (!defined(port) || port <= 0) {\n throw new DeveloperError(\"port is required to be greater than 0.\");\n }\n //>>includeEnd('debug');\n\n const authority = `${host.toLowerCase()}:${port}`;\n if (defined(_servers[authority])) {\n delete _servers[authority];\n }\n};\n\nfunction getAuthority(url) {\n const uri = new Uri(url);\n uri.normalize();\n\n // Removes username:password@ so we just have host[:port]\n let authority = uri.authority();\n if (authority.length === 0) {\n return undefined; // Relative URL\n }\n uri.authority(authority);\n\n if (authority.indexOf(\"@\") !== -1) {\n const parts = authority.split(\"@\");\n authority = parts[1];\n }\n\n // If the port is missing add one based on the scheme\n if (authority.indexOf(\":\") === -1) {\n let scheme = uri.scheme();\n if (scheme.length === 0) {\n scheme = window.location.protocol;\n scheme = scheme.substring(0, scheme.length - 1);\n }\n if (scheme === \"http\") {\n authority += \":80\";\n } else if (scheme === \"https\") {\n authority += \":443\";\n } else {\n return undefined;\n }\n }\n\n return authority;\n}\n\n/**\n * Tests whether a server is trusted or not. The server must have been added with the port if it is included in the url.\n *\n * @param {string} url The url to be tested against the trusted list\n *\n * @returns {boolean} Returns true if url is trusted, false otherwise.\n *\n * @example\n * // Add server\n * TrustedServers.add('my.server.com', 81);\n *\n * // Check if server is trusted\n * if (TrustedServers.contains('https://my.server.com:81/path/to/file.png')) {\n * // my.server.com:81 is trusted\n * }\n * if (TrustedServers.contains('https://my.server.com/path/to/file.png')) {\n * // my.server.com isn't trusted\n * }\n */\nTrustedServers.contains = function (url) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(url)) {\n throw new DeveloperError(\"url is required.\");\n }\n //>>includeEnd('debug');\n const authority = getAuthority(url);\n if (defined(authority) && defined(_servers[authority])) {\n return true;\n }\n\n return false;\n};\n\n/**\n * Clears the registry\n *\n * @example\n * // Remove a trusted server\n * TrustedServers.clear();\n */\nTrustedServers.clear = function () {\n _servers = {};\n};\nexport default TrustedServers;\n","import defaultValue from \"./defaultValue.js\";\nimport defined from \"./defined.js\";\nimport DeveloperError from \"./DeveloperError.js\";\nimport CesiumMath from \"./Math.js\";\n\n/**\n * A rotation expressed as a heading, pitch, and roll. Heading is the rotation about the\n * negative z axis. Pitch is the rotation about the negative y axis. Roll is the rotation about\n * the positive x axis.\n * @alias HeadingPitchRoll\n * @constructor\n *\n * @param {number} [heading=0.0] The heading component in radians.\n * @param {number} [pitch=0.0] The pitch component in radians.\n * @param {number} [roll=0.0] The roll component in radians.\n */\nfunction HeadingPitchRoll(heading, pitch, roll) {\n /**\n * Gets or sets the heading.\n * @type {number}\n * @default 0.0\n */\n this.heading = defaultValue(heading, 0.0);\n /**\n * Gets or sets the pitch.\n * @type {number}\n * @default 0.0\n */\n this.pitch = defaultValue(pitch, 0.0);\n /**\n * Gets or sets the roll.\n * @type {number}\n * @default 0.0\n */\n this.roll = defaultValue(roll, 0.0);\n}\n\n/**\n * Computes the heading, pitch and roll from a quaternion (see http://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles )\n *\n * @param {Quaternion} quaternion The quaternion from which to retrieve heading, pitch, and roll, all expressed in radians.\n * @param {HeadingPitchRoll} [result] The object in which to store the result. If not provided, a new instance is created and returned.\n * @returns {HeadingPitchRoll} The modified result parameter or a new HeadingPitchRoll instance if one was not provided.\n */\nHeadingPitchRoll.fromQuaternion = function (quaternion, result) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(quaternion)) {\n throw new DeveloperError(\"quaternion is required\");\n }\n //>>includeEnd('debug');\n if (!defined(result)) {\n result = new HeadingPitchRoll();\n }\n const test = 2 * (quaternion.w * quaternion.y - quaternion.z * quaternion.x);\n const denominatorRoll =\n 1 - 2 * (quaternion.x * quaternion.x + quaternion.y * quaternion.y);\n const numeratorRoll =\n 2 * (quaternion.w * quaternion.x + quaternion.y * quaternion.z);\n const denominatorHeading =\n 1 - 2 * (quaternion.y * quaternion.y + quaternion.z * quaternion.z);\n const numeratorHeading =\n 2 * (quaternion.w * quaternion.z + quaternion.x * quaternion.y);\n result.heading = -Math.atan2(numeratorHeading, denominatorHeading);\n result.roll = Math.atan2(numeratorRoll, denominatorRoll);\n result.pitch = -CesiumMath.asinClamped(test);\n return result;\n};\n\n/**\n * Returns a new HeadingPitchRoll instance from angles given in degrees.\n *\n * @param {number} heading the heading in degrees\n * @param {number} pitch the pitch in degrees\n * @param {number} roll the heading in degrees\n * @param {HeadingPitchRoll} [result] The object in which to store the result. If not provided, a new instance is created and returned.\n * @returns {HeadingPitchRoll} A new HeadingPitchRoll instance\n */\nHeadingPitchRoll.fromDegrees = function (heading, pitch, roll, result) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(heading)) {\n throw new DeveloperError(\"heading is required\");\n }\n if (!defined(pitch)) {\n throw new DeveloperError(\"pitch is required\");\n }\n if (!defined(roll)) {\n throw new DeveloperError(\"roll is required\");\n }\n //>>includeEnd('debug');\n if (!defined(result)) {\n result = new HeadingPitchRoll();\n }\n result.heading = heading * CesiumMath.RADIANS_PER_DEGREE;\n result.pitch = pitch * CesiumMath.RADIANS_PER_DEGREE;\n result.roll = roll * CesiumMath.RADIANS_PER_DEGREE;\n return result;\n};\n\n/**\n * Duplicates a HeadingPitchRoll instance.\n *\n * @param {HeadingPitchRoll} headingPitchRoll The HeadingPitchRoll to duplicate.\n * @param {HeadingPitchRoll} [result] The object onto which to store the result.\n * @returns {HeadingPitchRoll} The modified result parameter or a new HeadingPitchRoll instance if one was not provided. (Returns undefined if headingPitchRoll is undefined)\n */\nHeadingPitchRoll.clone = function (headingPitchRoll, result) {\n if (!defined(headingPitchRoll)) {\n return undefined;\n }\n if (!defined(result)) {\n return new HeadingPitchRoll(\n headingPitchRoll.heading,\n headingPitchRoll.pitch,\n headingPitchRoll.roll,\n );\n }\n result.heading = headingPitchRoll.heading;\n result.pitch = headingPitchRoll.pitch;\n result.roll = headingPitchRoll.roll;\n return result;\n};\n\n/**\n * Compares the provided HeadingPitchRolls componentwise and returns\n * true if they are equal, false otherwise.\n *\n * @param {HeadingPitchRoll} [left] The first HeadingPitchRoll.\n * @param {HeadingPitchRoll} [right] The second HeadingPitchRoll.\n * @returns {boolean} true if left and right are equal, false otherwise.\n */\nHeadingPitchRoll.equals = function (left, right) {\n return (\n left === right ||\n (defined(left) &&\n defined(right) &&\n left.heading === right.heading &&\n left.pitch === right.pitch &&\n left.roll === right.roll)\n );\n};\n\n/**\n * Compares the provided HeadingPitchRolls componentwise and returns\n * true if they pass an absolute or relative tolerance test,\n * false otherwise.\n *\n * @param {HeadingPitchRoll} [left] The first HeadingPitchRoll.\n * @param {HeadingPitchRoll} [right] The second HeadingPitchRoll.\n * @param {number} [relativeEpsilon=0] The relative epsilon tolerance to use for equality testing.\n * @param {number} [absoluteEpsilon=relativeEpsilon] The absolute epsilon tolerance to use for equality testing.\n * @returns {boolean} true if left and right are within the provided epsilon, false otherwise.\n */\nHeadingPitchRoll.equalsEpsilon = function (\n left,\n right,\n relativeEpsilon,\n absoluteEpsilon,\n) {\n return (\n left === right ||\n (defined(left) &&\n defined(right) &&\n CesiumMath.equalsEpsilon(\n left.heading,\n right.heading,\n relativeEpsilon,\n absoluteEpsilon,\n ) &&\n CesiumMath.equalsEpsilon(\n left.pitch,\n right.pitch,\n relativeEpsilon,\n absoluteEpsilon,\n ) &&\n CesiumMath.equalsEpsilon(\n left.roll,\n right.roll,\n relativeEpsilon,\n absoluteEpsilon,\n ))\n );\n};\n\n/**\n * Duplicates this HeadingPitchRoll instance.\n *\n * @param {HeadingPitchRoll} [result] The object onto which to store the result.\n * @returns {HeadingPitchRoll} The modified result parameter or a new HeadingPitchRoll instance if one was not provided.\n */\nHeadingPitchRoll.prototype.clone = function (result) {\n return HeadingPitchRoll.clone(this, result);\n};\n\n/**\n * Compares this HeadingPitchRoll against the provided HeadingPitchRoll componentwise and returns\n * true if they are equal, false otherwise.\n *\n * @param {HeadingPitchRoll} [right] The right hand side HeadingPitchRoll.\n * @returns {boolean} true if they are equal, false otherwise.\n */\nHeadingPitchRoll.prototype.equals = function (right) {\n return HeadingPitchRoll.equals(this, right);\n};\n\n/**\n * Compares this HeadingPitchRoll against the provided HeadingPitchRoll componentwise and returns\n * true if they pass an absolute or relative tolerance test,\n * false otherwise.\n *\n * @param {HeadingPitchRoll} [right] The right hand side HeadingPitchRoll.\n * @param {number} [relativeEpsilon=0] The relative epsilon tolerance to use for equality testing.\n * @param {number} [absoluteEpsilon=relativeEpsilon] The absolute epsilon tolerance to use for equality testing.\n * @returns {boolean} true if they are within the provided epsilon, false otherwise.\n */\nHeadingPitchRoll.prototype.equalsEpsilon = function (\n right,\n relativeEpsilon,\n absoluteEpsilon,\n) {\n return HeadingPitchRoll.equalsEpsilon(\n this,\n right,\n relativeEpsilon,\n absoluteEpsilon,\n );\n};\n\n/**\n * Creates a string representing this HeadingPitchRoll in the format '(heading, pitch, roll)' in radians.\n *\n * @returns {string} A string representing the provided HeadingPitchRoll in the format '(heading, pitch, roll)'.\n */\nHeadingPitchRoll.prototype.toString = function () {\n return `(${this.heading}, ${this.pitch}, ${this.roll})`;\n};\nexport default HeadingPitchRoll;\n","import buildModuleUrl from \"./buildModuleUrl.js\";\nimport defaultValue from \"./defaultValue.js\";\nimport defined from \"./defined.js\";\nimport Iau2006XysSample from \"./Iau2006XysSample.js\";\nimport JulianDate from \"./JulianDate.js\";\nimport Resource from \"./Resource.js\";\nimport TimeStandard from \"./TimeStandard.js\";\n\n/**\n * A set of IAU2006 XYS data that is used to evaluate the transformation between the International\n * Celestial Reference Frame (ICRF) and the International Terrestrial Reference Frame (ITRF).\n *\n * @alias Iau2006XysData\n * @constructor\n *\n * @param {object} [options] Object with the following properties:\n * @param {Resource|string} [options.xysFileUrlTemplate='Assets/IAU2006_XYS/IAU2006_XYS_{0}.json'] A template URL for obtaining the XYS data. In the template,\n * `{0}` will be replaced with the file index.\n * @param {number} [options.interpolationOrder=9] The order of interpolation to perform on the XYS data.\n * @param {number} [options.sampleZeroJulianEphemerisDate=2442396.5] The Julian ephemeris date (JED) of the\n * first XYS sample.\n * @param {number} [options.stepSizeDays=1.0] The step size, in days, between successive XYS samples.\n * @param {number} [options.samplesPerXysFile=1000] The number of samples in each XYS file.\n * @param {number} [options.totalSamples=27426] The total number of samples in all XYS files.\n *\n * @private\n */\nfunction Iau2006XysData(options) {\n options = defaultValue(options, defaultValue.EMPTY_OBJECT);\n\n this._xysFileUrlTemplate = Resource.createIfNeeded(\n options.xysFileUrlTemplate,\n );\n this._interpolationOrder = defaultValue(options.interpolationOrder, 9);\n this._sampleZeroJulianEphemerisDate = defaultValue(\n options.sampleZeroJulianEphemerisDate,\n 2442396.5,\n );\n this._sampleZeroDateTT = new JulianDate(\n this._sampleZeroJulianEphemerisDate,\n 0.0,\n TimeStandard.TAI,\n );\n this._stepSizeDays = defaultValue(options.stepSizeDays, 1.0);\n this._samplesPerXysFile = defaultValue(options.samplesPerXysFile, 1000);\n this._totalSamples = defaultValue(options.totalSamples, 27426);\n this._samples = new Array(this._totalSamples * 3);\n this._chunkDownloadsInProgress = [];\n\n const order = this._interpolationOrder;\n\n // Compute denominators and X values for interpolation.\n const denom = (this._denominators = new Array(order + 1));\n const xTable = (this._xTable = new Array(order + 1));\n\n const stepN = Math.pow(this._stepSizeDays, order);\n\n for (let i = 0; i <= order; ++i) {\n denom[i] = stepN;\n xTable[i] = i * this._stepSizeDays;\n\n for (let j = 0; j <= order; ++j) {\n if (j !== i) {\n denom[i] *= i - j;\n }\n }\n\n denom[i] = 1.0 / denom[i];\n }\n\n // Allocate scratch arrays for interpolation.\n this._work = new Array(order + 1);\n this._coef = new Array(order + 1);\n}\n\nconst julianDateScratch = new JulianDate(0, 0.0, TimeStandard.TAI);\n\nfunction getDaysSinceEpoch(xys, dayTT, secondTT) {\n const dateTT = julianDateScratch;\n dateTT.dayNumber = dayTT;\n dateTT.secondsOfDay = secondTT;\n return JulianDate.daysDifference(dateTT, xys._sampleZeroDateTT);\n}\n\n/**\n * Preloads XYS data for a specified date range.\n *\n * @param {number} startDayTT The Julian day number of the beginning of the interval to preload, expressed in\n * the Terrestrial Time (TT) time standard.\n * @param {number} startSecondTT The seconds past noon of the beginning of the interval to preload, expressed in\n * the Terrestrial Time (TT) time standard.\n * @param {number} stopDayTT The Julian day number of the end of the interval to preload, expressed in\n * the Terrestrial Time (TT) time standard.\n * @param {number} stopSecondTT The seconds past noon of the end of the interval to preload, expressed in\n * the Terrestrial Time (TT) time standard.\n * @returns {Promise} A promise that, when resolved, indicates that the requested interval has been\n * preloaded.\n */\nIau2006XysData.prototype.preload = function (\n startDayTT,\n startSecondTT,\n stopDayTT,\n stopSecondTT,\n) {\n const startDaysSinceEpoch = getDaysSinceEpoch(\n this,\n startDayTT,\n startSecondTT,\n );\n const stopDaysSinceEpoch = getDaysSinceEpoch(this, stopDayTT, stopSecondTT);\n\n let startIndex =\n (startDaysSinceEpoch / this._stepSizeDays - this._interpolationOrder / 2) |\n 0;\n if (startIndex < 0) {\n startIndex = 0;\n }\n\n let stopIndex =\n (stopDaysSinceEpoch / this._stepSizeDays - this._interpolationOrder / 2) |\n (0 + this._interpolationOrder);\n if (stopIndex >= this._totalSamples) {\n stopIndex = this._totalSamples - 1;\n }\n\n const startChunk = (startIndex / this._samplesPerXysFile) | 0;\n const stopChunk = (stopIndex / this._samplesPerXysFile) | 0;\n\n const promises = [];\n for (let i = startChunk; i <= stopChunk; ++i) {\n promises.push(requestXysChunk(this, i));\n }\n\n return Promise.all(promises);\n};\n\n/**\n * Computes the XYS values for a given date by interpolating. If the required data is not yet downloaded,\n * this method will return undefined.\n *\n * @param {number} dayTT The Julian day number for which to compute the XYS value, expressed in\n * the Terrestrial Time (TT) time standard.\n * @param {number} secondTT The seconds past noon of the date for which to compute the XYS value, expressed in\n * the Terrestrial Time (TT) time standard.\n * @param {Iau2006XysSample} [result] The instance to which to copy the interpolated result. If this parameter\n * is undefined, a new instance is allocated and returned.\n * @returns {Iau2006XysSample} The interpolated XYS values, or undefined if the required data for this\n * computation has not yet been downloaded.\n *\n * @see Iau2006XysData#preload\n */\nIau2006XysData.prototype.computeXysRadians = function (\n dayTT,\n secondTT,\n result,\n) {\n const daysSinceEpoch = getDaysSinceEpoch(this, dayTT, secondTT);\n if (daysSinceEpoch < 0.0) {\n // Can't evaluate prior to the epoch of the data.\n return undefined;\n }\n\n const centerIndex = (daysSinceEpoch / this._stepSizeDays) | 0;\n if (centerIndex >= this._totalSamples) {\n // Can't evaluate after the last sample in the data.\n return undefined;\n }\n\n const degree = this._interpolationOrder;\n\n let firstIndex = centerIndex - ((degree / 2) | 0);\n if (firstIndex < 0) {\n firstIndex = 0;\n }\n let lastIndex = firstIndex + degree;\n if (lastIndex >= this._totalSamples) {\n lastIndex = this._totalSamples - 1;\n firstIndex = lastIndex - degree;\n if (firstIndex < 0) {\n firstIndex = 0;\n }\n }\n\n // Are all the samples we need present?\n // We can assume so if the first and last are present\n let isDataMissing = false;\n const samples = this._samples;\n if (!defined(samples[firstIndex * 3])) {\n requestXysChunk(this, (firstIndex / this._samplesPerXysFile) | 0);\n isDataMissing = true;\n }\n\n if (!defined(samples[lastIndex * 3])) {\n requestXysChunk(this, (lastIndex / this._samplesPerXysFile) | 0);\n isDataMissing = true;\n }\n\n if (isDataMissing) {\n return undefined;\n }\n\n if (!defined(result)) {\n result = new Iau2006XysSample(0.0, 0.0, 0.0);\n } else {\n result.x = 0.0;\n result.y = 0.0;\n result.s = 0.0;\n }\n\n const x = daysSinceEpoch - firstIndex * this._stepSizeDays;\n\n const work = this._work;\n const denom = this._denominators;\n const coef = this._coef;\n const xTable = this._xTable;\n\n let i, j;\n for (i = 0; i <= degree; ++i) {\n work[i] = x - xTable[i];\n }\n\n for (i = 0; i <= degree; ++i) {\n coef[i] = 1.0;\n\n for (j = 0; j <= degree; ++j) {\n if (j !== i) {\n coef[i] *= work[j];\n }\n }\n\n coef[i] *= denom[i];\n\n let sampleIndex = (firstIndex + i) * 3;\n result.x += coef[i] * samples[sampleIndex++];\n result.y += coef[i] * samples[sampleIndex++];\n result.s += coef[i] * samples[sampleIndex];\n }\n\n return result;\n};\n\nfunction requestXysChunk(xysData, chunkIndex) {\n if (xysData._chunkDownloadsInProgress[chunkIndex]) {\n // Chunk has already been requested.\n return xysData._chunkDownloadsInProgress[chunkIndex];\n }\n\n let chunkUrl;\n const xysFileUrlTemplate = xysData._xysFileUrlTemplate;\n if (defined(xysFileUrlTemplate)) {\n chunkUrl = xysFileUrlTemplate.getDerivedResource({\n templateValues: {\n 0: chunkIndex,\n },\n });\n } else {\n chunkUrl = new Resource({\n url: buildModuleUrl(`Assets/IAU2006_XYS/IAU2006_XYS_${chunkIndex}.json`),\n });\n }\n\n const promise = chunkUrl.fetchJson().then(function (chunk) {\n xysData._chunkDownloadsInProgress[chunkIndex] = false;\n\n const samples = xysData._samples;\n const newSamples = chunk.samples;\n const startIndex = chunkIndex * xysData._samplesPerXysFile * 3;\n\n for (let i = 0, len = newSamples.length; i < len; ++i) {\n samples[startIndex + i] = newSamples[i];\n }\n });\n xysData._chunkDownloadsInProgress[chunkIndex] = promise;\n\n return promise;\n}\nexport default Iau2006XysData;\n","import defined from \"./defined.js\";\nimport DeveloperError from \"./DeveloperError.js\";\nimport getAbsoluteUri from \"./getAbsoluteUri.js\";\nimport Resource from \"./Resource.js\";\n\n/*global CESIUM_BASE_URL,define,require*/\n\nconst cesiumScriptRegex = /((?:.*\\/)|^)Cesium\\.js(?:\\?|\\#|$)/;\nfunction getBaseUrlFromCesiumScript() {\n const scripts = document.getElementsByTagName(\"script\");\n for (let i = 0, len = scripts.length; i < len; ++i) {\n const src = scripts[i].getAttribute(\"src\");\n const result = cesiumScriptRegex.exec(src);\n if (result !== null) {\n return result[1];\n }\n }\n return undefined;\n}\n\nlet a;\nfunction tryMakeAbsolute(url) {\n if (typeof document === \"undefined\") {\n // Node.js and Web Workers. In both cases, the URL will already be absolute.\n return url;\n }\n\n if (!defined(a)) {\n a = document.createElement(\"a\");\n }\n a.href = url;\n return a.href;\n}\n\nlet baseResource;\nfunction getCesiumBaseUrl() {\n if (defined(baseResource)) {\n return baseResource;\n }\n\n let baseUrlString;\n if (typeof CESIUM_BASE_URL !== \"undefined\") {\n baseUrlString = CESIUM_BASE_URL;\n } else if (defined(import.meta?.url)) {\n // ESM\n baseUrlString = getAbsoluteUri(\".\", import.meta.url);\n } else if (\n typeof define === \"object\" &&\n defined(define.amd) &&\n !define.amd.toUrlUndefined &&\n defined(require.toUrl)\n ) {\n // RequireJS\n baseUrlString = getAbsoluteUri(\n \"..\",\n buildModuleUrl(\"Core/buildModuleUrl.js\"),\n );\n } else {\n // IIFE\n baseUrlString = getBaseUrlFromCesiumScript();\n }\n\n //>>includeStart('debug', pragmas.debug);\n if (!defined(baseUrlString)) {\n throw new DeveloperError(\n \"Unable to determine Cesium base URL automatically, try defining a global variable called CESIUM_BASE_URL.\",\n );\n }\n //>>includeEnd('debug');\n\n baseResource = new Resource({\n url: tryMakeAbsolute(baseUrlString),\n });\n baseResource.appendForwardSlash();\n\n return baseResource;\n}\n\nfunction buildModuleUrlFromRequireToUrl(moduleID) {\n //moduleID will be non-relative, so require it relative to this module, in Core.\n return tryMakeAbsolute(require.toUrl(`../${moduleID}`));\n}\n\nfunction buildModuleUrlFromBaseUrl(moduleID) {\n const resource = getCesiumBaseUrl().getDerivedResource({\n url: moduleID,\n });\n return resource.url;\n}\n\nlet implementation;\n\n/**\n * Given a relative URL under the Cesium base URL, returns an absolute URL.\n * @function\n *\n * @param {string} relativeUrl The relative path.\n * @returns {string} The absolutely URL representation of the provided path.\n *\n * @example\n * const viewer = new Cesium.Viewer(\"cesiumContainer\", {\n * baseLayer: Cesium.ImageryLayer.fromProviderAsync(\n * Cesium.TileMapServiceImageryProvider.fromUrl(\n * Cesium.buildModuleUrl(\"Assets/Textures/NaturalEarthII\"),\n * )),\n * baseLayerPicker: false,\n * });\n */\nfunction buildModuleUrl(relativeUrl) {\n if (!defined(implementation)) {\n //select implementation\n if (\n typeof define === \"object\" &&\n defined(define.amd) &&\n !define.amd.toUrlUndefined &&\n defined(require.toUrl)\n ) {\n implementation = buildModuleUrlFromRequireToUrl;\n } else {\n implementation = buildModuleUrlFromBaseUrl;\n }\n }\n\n const url = implementation(relativeUrl);\n return url;\n}\n\n// exposed for testing\nbuildModuleUrl._cesiumScriptRegex = cesiumScriptRegex;\nbuildModuleUrl._buildModuleUrlFromBaseUrl = buildModuleUrlFromBaseUrl;\nbuildModuleUrl._clearBaseResource = function () {\n baseResource = undefined;\n};\n\n/**\n * Sets the base URL for resolving modules.\n * @param {string} value The new base URL.\n */\nbuildModuleUrl.setBaseUrl = function (value) {\n baseResource = Resource.DEFAULT.getDerivedResource({\n url: value,\n });\n};\n\n/**\n * Gets the base URL for resolving modules.\n *\n * @function\n * @returns {string} The configured base URL\n */\nbuildModuleUrl.getCesiumBaseUrl = getCesiumBaseUrl;\n\nexport default buildModuleUrl;\n","/**\n * An IAU 2006 XYS value sampled at a particular time.\n *\n * @alias Iau2006XysSample\n * @constructor\n *\n * @param {number} x The X value.\n * @param {number} y The Y value.\n * @param {number} s The S value.\n *\n * @private\n */\nfunction Iau2006XysSample(x, y, s) {\n /**\n * The X value.\n * @type {number}\n */\n this.x = x;\n\n /**\n * The Y value.\n * @type {number}\n */\n this.y = y;\n\n /**\n * The S value.\n * @type {number}\n */\n this.s = s;\n}\nexport default Iau2006XysSample;\n","import Cartesian3 from \"./Cartesian3.js\";\nimport Check from \"./Check.js\";\nimport defaultValue from \"./defaultValue.js\";\nimport defined from \"./defined.js\";\nimport FeatureDetection from \"./FeatureDetection.js\";\nimport CesiumMath from \"./Math.js\";\nimport Matrix3 from \"./Matrix3.js\";\n\n/**\n * A set of 4-dimensional coordinates used to represent rotation in 3-dimensional space.\n * @alias Quaternion\n * @constructor\n *\n * @param {number} [x=0.0] The X component.\n * @param {number} [y=0.0] The Y component.\n * @param {number} [z=0.0] The Z component.\n * @param {number} [w=0.0] The W component.\n *\n * @see PackableForInterpolation\n */\nfunction Quaternion(x, y, z, w) {\n /**\n * The X component.\n * @type {number}\n * @default 0.0\n */\n this.x = defaultValue(x, 0.0);\n\n /**\n * The Y component.\n * @type {number}\n * @default 0.0\n */\n this.y = defaultValue(y, 0.0);\n\n /**\n * The Z component.\n * @type {number}\n * @default 0.0\n */\n this.z = defaultValue(z, 0.0);\n\n /**\n * The W component.\n * @type {number}\n * @default 0.0\n */\n this.w = defaultValue(w, 0.0);\n}\n\nlet fromAxisAngleScratch = new Cartesian3();\n\n/**\n * Computes a quaternion representing a rotation around an axis.\n *\n * @param {Cartesian3} axis The axis of rotation.\n * @param {number} angle The angle in radians to rotate around the axis.\n * @param {Quaternion} [result] The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter or a new Quaternion instance if one was not provided.\n */\nQuaternion.fromAxisAngle = function (axis, angle, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"axis\", axis);\n Check.typeOf.number(\"angle\", angle);\n //>>includeEnd('debug');\n\n const halfAngle = angle / 2.0;\n const s = Math.sin(halfAngle);\n fromAxisAngleScratch = Cartesian3.normalize(axis, fromAxisAngleScratch);\n\n const x = fromAxisAngleScratch.x * s;\n const y = fromAxisAngleScratch.y * s;\n const z = fromAxisAngleScratch.z * s;\n const w = Math.cos(halfAngle);\n if (!defined(result)) {\n return new Quaternion(x, y, z, w);\n }\n result.x = x;\n result.y = y;\n result.z = z;\n result.w = w;\n return result;\n};\n\nconst fromRotationMatrixNext = [1, 2, 0];\nconst fromRotationMatrixQuat = new Array(3);\n/**\n * Computes a Quaternion from the provided Matrix3 instance.\n *\n * @param {Matrix3} matrix The rotation matrix.\n * @param {Quaternion} [result] The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter or a new Quaternion instance if one was not provided.\n *\n * @see Matrix3.fromQuaternion\n */\nQuaternion.fromRotationMatrix = function (matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n //>>includeEnd('debug');\n\n let root;\n let x;\n let y;\n let z;\n let w;\n\n const m00 = matrix[Matrix3.COLUMN0ROW0];\n const m11 = matrix[Matrix3.COLUMN1ROW1];\n const m22 = matrix[Matrix3.COLUMN2ROW2];\n const trace = m00 + m11 + m22;\n\n if (trace > 0.0) {\n // |w| > 1/2, may as well choose w > 1/2\n root = Math.sqrt(trace + 1.0); // 2w\n w = 0.5 * root;\n root = 0.5 / root; // 1/(4w)\n\n x = (matrix[Matrix3.COLUMN1ROW2] - matrix[Matrix3.COLUMN2ROW1]) * root;\n y = (matrix[Matrix3.COLUMN2ROW0] - matrix[Matrix3.COLUMN0ROW2]) * root;\n z = (matrix[Matrix3.COLUMN0ROW1] - matrix[Matrix3.COLUMN1ROW0]) * root;\n } else {\n // |w| <= 1/2\n const next = fromRotationMatrixNext;\n\n let i = 0;\n if (m11 > m00) {\n i = 1;\n }\n if (m22 > m00 && m22 > m11) {\n i = 2;\n }\n const j = next[i];\n const k = next[j];\n\n root = Math.sqrt(\n matrix[Matrix3.getElementIndex(i, i)] -\n matrix[Matrix3.getElementIndex(j, j)] -\n matrix[Matrix3.getElementIndex(k, k)] +\n 1.0,\n );\n\n const quat = fromRotationMatrixQuat;\n quat[i] = 0.5 * root;\n root = 0.5 / root;\n w =\n (matrix[Matrix3.getElementIndex(k, j)] -\n matrix[Matrix3.getElementIndex(j, k)]) *\n root;\n quat[j] =\n (matrix[Matrix3.getElementIndex(j, i)] +\n matrix[Matrix3.getElementIndex(i, j)]) *\n root;\n quat[k] =\n (matrix[Matrix3.getElementIndex(k, i)] +\n matrix[Matrix3.getElementIndex(i, k)]) *\n root;\n\n x = -quat[0];\n y = -quat[1];\n z = -quat[2];\n }\n\n if (!defined(result)) {\n return new Quaternion(x, y, z, w);\n }\n result.x = x;\n result.y = y;\n result.z = z;\n result.w = w;\n return result;\n};\n\nconst scratchHPRQuaternion = new Quaternion();\nlet scratchHeadingQuaternion = new Quaternion();\nlet scratchPitchQuaternion = new Quaternion();\nlet scratchRollQuaternion = new Quaternion();\n\n/**\n * Computes a rotation from the given heading, pitch and roll angles. Heading is the rotation about the\n * negative z axis. Pitch is the rotation about the negative y axis. Roll is the rotation about\n * the positive x axis.\n *\n * @param {HeadingPitchRoll} headingPitchRoll The rotation expressed as a heading, pitch and roll.\n * @param {Quaternion} [result] The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter or a new Quaternion instance if none was provided.\n */\nQuaternion.fromHeadingPitchRoll = function (headingPitchRoll, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"headingPitchRoll\", headingPitchRoll);\n //>>includeEnd('debug');\n\n scratchRollQuaternion = Quaternion.fromAxisAngle(\n Cartesian3.UNIT_X,\n headingPitchRoll.roll,\n scratchHPRQuaternion,\n );\n scratchPitchQuaternion = Quaternion.fromAxisAngle(\n Cartesian3.UNIT_Y,\n -headingPitchRoll.pitch,\n result,\n );\n result = Quaternion.multiply(\n scratchPitchQuaternion,\n scratchRollQuaternion,\n scratchPitchQuaternion,\n );\n scratchHeadingQuaternion = Quaternion.fromAxisAngle(\n Cartesian3.UNIT_Z,\n -headingPitchRoll.heading,\n scratchHPRQuaternion,\n );\n return Quaternion.multiply(scratchHeadingQuaternion, result, result);\n};\n\nconst sampledQuaternionAxis = new Cartesian3();\nconst sampledQuaternionRotation = new Cartesian3();\nconst sampledQuaternionTempQuaternion = new Quaternion();\nconst sampledQuaternionQuaternion0 = new Quaternion();\nconst sampledQuaternionQuaternion0Conjugate = new Quaternion();\n\n/**\n * The number of elements used to pack the object into an array.\n * @type {number}\n */\nQuaternion.packedLength = 4;\n\n/**\n * Stores the provided instance into the provided array.\n *\n * @param {Quaternion} value The value to pack.\n * @param {number[]} array The array to pack into.\n * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.\n *\n * @returns {number[]} The array that was packed into\n */\nQuaternion.pack = function (value, array, startingIndex) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"value\", value);\n Check.defined(\"array\", array);\n //>>includeEnd('debug');\n\n startingIndex = defaultValue(startingIndex, 0);\n\n array[startingIndex++] = value.x;\n array[startingIndex++] = value.y;\n array[startingIndex++] = value.z;\n array[startingIndex] = value.w;\n\n return array;\n};\n\n/**\n * Retrieves an instance from a packed array.\n *\n * @param {number[]} array The packed array.\n * @param {number} [startingIndex=0] The starting index of the element to be unpacked.\n * @param {Quaternion} [result] The object into which to store the result.\n * @returns {Quaternion} The modified result parameter or a new Quaternion instance if one was not provided.\n */\nQuaternion.unpack = function (array, startingIndex, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.defined(\"array\", array);\n //>>includeEnd('debug');\n\n startingIndex = defaultValue(startingIndex, 0);\n\n if (!defined(result)) {\n result = new Quaternion();\n }\n result.x = array[startingIndex];\n result.y = array[startingIndex + 1];\n result.z = array[startingIndex + 2];\n result.w = array[startingIndex + 3];\n return result;\n};\n\n/**\n * The number of elements used to store the object into an array in its interpolatable form.\n * @type {number}\n */\nQuaternion.packedInterpolationLength = 3;\n\n/**\n * Converts a packed array into a form suitable for interpolation.\n *\n * @param {number[]} packedArray The packed array.\n * @param {number} [startingIndex=0] The index of the first element to be converted.\n * @param {number} [lastIndex=packedArray.length] The index of the last element to be converted.\n * @param {number[]} [result] The object into which to store the result.\n */\nQuaternion.convertPackedArrayForInterpolation = function (\n packedArray,\n startingIndex,\n lastIndex,\n result,\n) {\n Quaternion.unpack(\n packedArray,\n lastIndex * 4,\n sampledQuaternionQuaternion0Conjugate,\n );\n Quaternion.conjugate(\n sampledQuaternionQuaternion0Conjugate,\n sampledQuaternionQuaternion0Conjugate,\n );\n\n for (let i = 0, len = lastIndex - startingIndex + 1; i < len; i++) {\n const offset = i * 3;\n Quaternion.unpack(\n packedArray,\n (startingIndex + i) * 4,\n sampledQuaternionTempQuaternion,\n );\n\n Quaternion.multiply(\n sampledQuaternionTempQuaternion,\n sampledQuaternionQuaternion0Conjugate,\n sampledQuaternionTempQuaternion,\n );\n\n if (sampledQuaternionTempQuaternion.w < 0) {\n Quaternion.negate(\n sampledQuaternionTempQuaternion,\n sampledQuaternionTempQuaternion,\n );\n }\n\n Quaternion.computeAxis(\n sampledQuaternionTempQuaternion,\n sampledQuaternionAxis,\n );\n const angle = Quaternion.computeAngle(sampledQuaternionTempQuaternion);\n if (!defined(result)) {\n result = [];\n }\n result[offset] = sampledQuaternionAxis.x * angle;\n result[offset + 1] = sampledQuaternionAxis.y * angle;\n result[offset + 2] = sampledQuaternionAxis.z * angle;\n }\n};\n\n/**\n * Retrieves an instance from a packed array converted with {@link convertPackedArrayForInterpolation}.\n *\n * @param {number[]} array The array previously packed for interpolation.\n * @param {number[]} sourceArray The original packed array.\n * @param {number} [firstIndex=0] The firstIndex used to convert the array.\n * @param {number} [lastIndex=packedArray.length] The lastIndex used to convert the array.\n * @param {Quaternion} [result] The object into which to store the result.\n * @returns {Quaternion} The modified result parameter or a new Quaternion instance if one was not provided.\n */\nQuaternion.unpackInterpolationResult = function (\n array,\n sourceArray,\n firstIndex,\n lastIndex,\n result,\n) {\n if (!defined(result)) {\n result = new Quaternion();\n }\n Cartesian3.fromArray(array, 0, sampledQuaternionRotation);\n const magnitude = Cartesian3.magnitude(sampledQuaternionRotation);\n\n Quaternion.unpack(sourceArray, lastIndex * 4, sampledQuaternionQuaternion0);\n\n if (magnitude === 0) {\n Quaternion.clone(Quaternion.IDENTITY, sampledQuaternionTempQuaternion);\n } else {\n Quaternion.fromAxisAngle(\n sampledQuaternionRotation,\n magnitude,\n sampledQuaternionTempQuaternion,\n );\n }\n\n return Quaternion.multiply(\n sampledQuaternionTempQuaternion,\n sampledQuaternionQuaternion0,\n result,\n );\n};\n\n/**\n * Duplicates a Quaternion instance.\n *\n * @param {Quaternion} quaternion The quaternion to duplicate.\n * @param {Quaternion} [result] The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter or a new Quaternion instance if one was not provided. (Returns undefined if quaternion is undefined)\n */\nQuaternion.clone = function (quaternion, result) {\n if (!defined(quaternion)) {\n return undefined;\n }\n\n if (!defined(result)) {\n return new Quaternion(\n quaternion.x,\n quaternion.y,\n quaternion.z,\n quaternion.w,\n );\n }\n\n result.x = quaternion.x;\n result.y = quaternion.y;\n result.z = quaternion.z;\n result.w = quaternion.w;\n return result;\n};\n\n/**\n * Computes the conjugate of the provided quaternion.\n *\n * @param {Quaternion} quaternion The quaternion to conjugate.\n * @param {Quaternion} result The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter.\n */\nQuaternion.conjugate = function (quaternion, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"quaternion\", quaternion);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result.x = -quaternion.x;\n result.y = -quaternion.y;\n result.z = -quaternion.z;\n result.w = quaternion.w;\n return result;\n};\n\n/**\n * Computes magnitude squared for the provided quaternion.\n *\n * @param {Quaternion} quaternion The quaternion to conjugate.\n * @returns {number} The magnitude squared.\n */\nQuaternion.magnitudeSquared = function (quaternion) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"quaternion\", quaternion);\n //>>includeEnd('debug');\n\n return (\n quaternion.x * quaternion.x +\n quaternion.y * quaternion.y +\n quaternion.z * quaternion.z +\n quaternion.w * quaternion.w\n );\n};\n\n/**\n * Computes magnitude for the provided quaternion.\n *\n * @param {Quaternion} quaternion The quaternion to conjugate.\n * @returns {number} The magnitude.\n */\nQuaternion.magnitude = function (quaternion) {\n return Math.sqrt(Quaternion.magnitudeSquared(quaternion));\n};\n\n/**\n * Computes the normalized form of the provided quaternion.\n *\n * @param {Quaternion} quaternion The quaternion to normalize.\n * @param {Quaternion} result The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter.\n */\nQuaternion.normalize = function (quaternion, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const inverseMagnitude = 1.0 / Quaternion.magnitude(quaternion);\n const x = quaternion.x * inverseMagnitude;\n const y = quaternion.y * inverseMagnitude;\n const z = quaternion.z * inverseMagnitude;\n const w = quaternion.w * inverseMagnitude;\n\n result.x = x;\n result.y = y;\n result.z = z;\n result.w = w;\n return result;\n};\n\n/**\n * Computes the inverse of the provided quaternion.\n *\n * @param {Quaternion} quaternion The quaternion to normalize.\n * @param {Quaternion} result The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter.\n */\nQuaternion.inverse = function (quaternion, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const magnitudeSquared = Quaternion.magnitudeSquared(quaternion);\n result = Quaternion.conjugate(quaternion, result);\n return Quaternion.multiplyByScalar(result, 1.0 / magnitudeSquared, result);\n};\n\n/**\n * Computes the componentwise sum of two quaternions.\n *\n * @param {Quaternion} left The first quaternion.\n * @param {Quaternion} right The second quaternion.\n * @param {Quaternion} result The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter.\n */\nQuaternion.add = function (left, right, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"left\", left);\n Check.typeOf.object(\"right\", right);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result.x = left.x + right.x;\n result.y = left.y + right.y;\n result.z = left.z + right.z;\n result.w = left.w + right.w;\n return result;\n};\n\n/**\n * Computes the componentwise difference of two quaternions.\n *\n * @param {Quaternion} left The first quaternion.\n * @param {Quaternion} right The second quaternion.\n * @param {Quaternion} result The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter.\n */\nQuaternion.subtract = function (left, right, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"left\", left);\n Check.typeOf.object(\"right\", right);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result.x = left.x - right.x;\n result.y = left.y - right.y;\n result.z = left.z - right.z;\n result.w = left.w - right.w;\n return result;\n};\n\n/**\n * Negates the provided quaternion.\n *\n * @param {Quaternion} quaternion The quaternion to be negated.\n * @param {Quaternion} result The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter.\n */\nQuaternion.negate = function (quaternion, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"quaternion\", quaternion);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result.x = -quaternion.x;\n result.y = -quaternion.y;\n result.z = -quaternion.z;\n result.w = -quaternion.w;\n return result;\n};\n\n/**\n * Computes the dot (scalar) product of two quaternions.\n *\n * @param {Quaternion} left The first quaternion.\n * @param {Quaternion} right The second quaternion.\n * @returns {number} The dot product.\n */\nQuaternion.dot = function (left, right) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"left\", left);\n Check.typeOf.object(\"right\", right);\n //>>includeEnd('debug');\n\n return (\n left.x * right.x + left.y * right.y + left.z * right.z + left.w * right.w\n );\n};\n\n/**\n * Computes the product of two quaternions.\n *\n * @param {Quaternion} left The first quaternion.\n * @param {Quaternion} right The second quaternion.\n * @param {Quaternion} result The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter.\n */\nQuaternion.multiply = function (left, right, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"left\", left);\n Check.typeOf.object(\"right\", right);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const leftX = left.x;\n const leftY = left.y;\n const leftZ = left.z;\n const leftW = left.w;\n\n const rightX = right.x;\n const rightY = right.y;\n const rightZ = right.z;\n const rightW = right.w;\n\n const x = leftW * rightX + leftX * rightW + leftY * rightZ - leftZ * rightY;\n const y = leftW * rightY - leftX * rightZ + leftY * rightW + leftZ * rightX;\n const z = leftW * rightZ + leftX * rightY - leftY * rightX + leftZ * rightW;\n const w = leftW * rightW - leftX * rightX - leftY * rightY - leftZ * rightZ;\n\n result.x = x;\n result.y = y;\n result.z = z;\n result.w = w;\n return result;\n};\n\n/**\n * Multiplies the provided quaternion componentwise by the provided scalar.\n *\n * @param {Quaternion} quaternion The quaternion to be scaled.\n * @param {number} scalar The scalar to multiply with.\n * @param {Quaternion} result The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter.\n */\nQuaternion.multiplyByScalar = function (quaternion, scalar, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"quaternion\", quaternion);\n Check.typeOf.number(\"scalar\", scalar);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result.x = quaternion.x * scalar;\n result.y = quaternion.y * scalar;\n result.z = quaternion.z * scalar;\n result.w = quaternion.w * scalar;\n return result;\n};\n\n/**\n * Divides the provided quaternion componentwise by the provided scalar.\n *\n * @param {Quaternion} quaternion The quaternion to be divided.\n * @param {number} scalar The scalar to divide by.\n * @param {Quaternion} result The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter.\n */\nQuaternion.divideByScalar = function (quaternion, scalar, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"quaternion\", quaternion);\n Check.typeOf.number(\"scalar\", scalar);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result.x = quaternion.x / scalar;\n result.y = quaternion.y / scalar;\n result.z = quaternion.z / scalar;\n result.w = quaternion.w / scalar;\n return result;\n};\n\n/**\n * Computes the axis of rotation of the provided quaternion.\n *\n * @param {Quaternion} quaternion The quaternion to use.\n * @param {Cartesian3} result The object onto which to store the result.\n * @returns {Cartesian3} The modified result parameter.\n */\nQuaternion.computeAxis = function (quaternion, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"quaternion\", quaternion);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const w = quaternion.w;\n if (\n Math.abs(w - 1.0) < CesiumMath.EPSILON6 ||\n Math.abs(w + 1.0) < CesiumMath.EPSILON6\n ) {\n result.x = 1;\n result.y = result.z = 0;\n return result;\n }\n\n const scalar = 1.0 / Math.sqrt(1.0 - w * w);\n\n result.x = quaternion.x * scalar;\n result.y = quaternion.y * scalar;\n result.z = quaternion.z * scalar;\n return result;\n};\n\n/**\n * Computes the angle of rotation of the provided quaternion.\n *\n * @param {Quaternion} quaternion The quaternion to use.\n * @returns {number} The angle of rotation.\n */\nQuaternion.computeAngle = function (quaternion) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"quaternion\", quaternion);\n //>>includeEnd('debug');\n\n if (Math.abs(quaternion.w - 1.0) < CesiumMath.EPSILON6) {\n return 0.0;\n }\n return 2.0 * Math.acos(quaternion.w);\n};\n\nlet lerpScratch = new Quaternion();\n/**\n * Computes the linear interpolation or extrapolation at t using the provided quaternions.\n *\n * @param {Quaternion} start The value corresponding to t at 0.0.\n * @param {Quaternion} end The value corresponding to t at 1.0.\n * @param {number} t The point along t at which to interpolate.\n * @param {Quaternion} result The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter.\n */\nQuaternion.lerp = function (start, end, t, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"start\", start);\n Check.typeOf.object(\"end\", end);\n Check.typeOf.number(\"t\", t);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n lerpScratch = Quaternion.multiplyByScalar(end, t, lerpScratch);\n result = Quaternion.multiplyByScalar(start, 1.0 - t, result);\n return Quaternion.add(lerpScratch, result, result);\n};\n\nlet slerpEndNegated = new Quaternion();\nlet slerpScaledP = new Quaternion();\nlet slerpScaledR = new Quaternion();\n/**\n * Computes the spherical linear interpolation or extrapolation at t using the provided quaternions.\n *\n * @param {Quaternion} start The value corresponding to t at 0.0.\n * @param {Quaternion} end The value corresponding to t at 1.0.\n * @param {number} t The point along t at which to interpolate.\n * @param {Quaternion} result The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter.\n *\n * @see Quaternion#fastSlerp\n */\nQuaternion.slerp = function (start, end, t, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"start\", start);\n Check.typeOf.object(\"end\", end);\n Check.typeOf.number(\"t\", t);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n let dot = Quaternion.dot(start, end);\n\n // The angle between start must be acute. Since q and -q represent\n // the same rotation, negate q to get the acute angle.\n let r = end;\n if (dot < 0.0) {\n dot = -dot;\n r = slerpEndNegated = Quaternion.negate(end, slerpEndNegated);\n }\n\n // dot > 0, as the dot product approaches 1, the angle between the\n // quaternions vanishes. use linear interpolation.\n if (1.0 - dot < CesiumMath.EPSILON6) {\n return Quaternion.lerp(start, r, t, result);\n }\n\n const theta = Math.acos(dot);\n slerpScaledP = Quaternion.multiplyByScalar(\n start,\n Math.sin((1 - t) * theta),\n slerpScaledP,\n );\n slerpScaledR = Quaternion.multiplyByScalar(\n r,\n Math.sin(t * theta),\n slerpScaledR,\n );\n result = Quaternion.add(slerpScaledP, slerpScaledR, result);\n return Quaternion.multiplyByScalar(result, 1.0 / Math.sin(theta), result);\n};\n\n/**\n * The logarithmic quaternion function.\n *\n * @param {Quaternion} quaternion The unit quaternion.\n * @param {Cartesian3} result The object onto which to store the result.\n * @returns {Cartesian3} The modified result parameter.\n */\nQuaternion.log = function (quaternion, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"quaternion\", quaternion);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const theta = CesiumMath.acosClamped(quaternion.w);\n let thetaOverSinTheta = 0.0;\n\n if (theta !== 0.0) {\n thetaOverSinTheta = theta / Math.sin(theta);\n }\n\n return Cartesian3.multiplyByScalar(quaternion, thetaOverSinTheta, result);\n};\n\n/**\n * The exponential quaternion function.\n *\n * @param {Cartesian3} cartesian The cartesian.\n * @param {Quaternion} result The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter.\n */\nQuaternion.exp = function (cartesian, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"cartesian\", cartesian);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const theta = Cartesian3.magnitude(cartesian);\n let sinThetaOverTheta = 0.0;\n\n if (theta !== 0.0) {\n sinThetaOverTheta = Math.sin(theta) / theta;\n }\n\n result.x = cartesian.x * sinThetaOverTheta;\n result.y = cartesian.y * sinThetaOverTheta;\n result.z = cartesian.z * sinThetaOverTheta;\n result.w = Math.cos(theta);\n\n return result;\n};\n\nconst squadScratchCartesian0 = new Cartesian3();\nconst squadScratchCartesian1 = new Cartesian3();\nconst squadScratchQuaternion0 = new Quaternion();\nconst squadScratchQuaternion1 = new Quaternion();\n\n/**\n * Computes an inner quadrangle point.\n *

This will compute quaternions that ensure a squad curve is C1.

\n *\n * @param {Quaternion} q0 The first quaternion.\n * @param {Quaternion} q1 The second quaternion.\n * @param {Quaternion} q2 The third quaternion.\n * @param {Quaternion} result The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter.\n *\n * @see Quaternion#squad\n */\nQuaternion.computeInnerQuadrangle = function (q0, q1, q2, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"q0\", q0);\n Check.typeOf.object(\"q1\", q1);\n Check.typeOf.object(\"q2\", q2);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const qInv = Quaternion.conjugate(q1, squadScratchQuaternion0);\n Quaternion.multiply(qInv, q2, squadScratchQuaternion1);\n const cart0 = Quaternion.log(squadScratchQuaternion1, squadScratchCartesian0);\n\n Quaternion.multiply(qInv, q0, squadScratchQuaternion1);\n const cart1 = Quaternion.log(squadScratchQuaternion1, squadScratchCartesian1);\n\n Cartesian3.add(cart0, cart1, cart0);\n Cartesian3.multiplyByScalar(cart0, 0.25, cart0);\n Cartesian3.negate(cart0, cart0);\n Quaternion.exp(cart0, squadScratchQuaternion0);\n\n return Quaternion.multiply(q1, squadScratchQuaternion0, result);\n};\n\n/**\n * Computes the spherical quadrangle interpolation between quaternions.\n *\n * @param {Quaternion} q0 The first quaternion.\n * @param {Quaternion} q1 The second quaternion.\n * @param {Quaternion} s0 The first inner quadrangle.\n * @param {Quaternion} s1 The second inner quadrangle.\n * @param {number} t The time in [0,1] used to interpolate.\n * @param {Quaternion} result The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter.\n *\n *\n * @example\n * // 1. compute the squad interpolation between two quaternions on a curve\n * const s0 = Cesium.Quaternion.computeInnerQuadrangle(quaternions[i - 1], quaternions[i], quaternions[i + 1], new Cesium.Quaternion());\n * const s1 = Cesium.Quaternion.computeInnerQuadrangle(quaternions[i], quaternions[i + 1], quaternions[i + 2], new Cesium.Quaternion());\n * const q = Cesium.Quaternion.squad(quaternions[i], quaternions[i + 1], s0, s1, t, new Cesium.Quaternion());\n *\n * // 2. compute the squad interpolation as above but where the first quaternion is a end point.\n * const s1 = Cesium.Quaternion.computeInnerQuadrangle(quaternions[0], quaternions[1], quaternions[2], new Cesium.Quaternion());\n * const q = Cesium.Quaternion.squad(quaternions[0], quaternions[1], quaternions[0], s1, t, new Cesium.Quaternion());\n *\n * @see Quaternion#computeInnerQuadrangle\n */\nQuaternion.squad = function (q0, q1, s0, s1, t, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"q0\", q0);\n Check.typeOf.object(\"q1\", q1);\n Check.typeOf.object(\"s0\", s0);\n Check.typeOf.object(\"s1\", s1);\n Check.typeOf.number(\"t\", t);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const slerp0 = Quaternion.slerp(q0, q1, t, squadScratchQuaternion0);\n const slerp1 = Quaternion.slerp(s0, s1, t, squadScratchQuaternion1);\n return Quaternion.slerp(slerp0, slerp1, 2.0 * t * (1.0 - t), result);\n};\n\nconst fastSlerpScratchQuaternion = new Quaternion();\n// eslint-disable-next-line no-loss-of-precision\nconst opmu = 1.90110745351730037;\nconst u = FeatureDetection.supportsTypedArrays() ? new Float32Array(8) : [];\nconst v = FeatureDetection.supportsTypedArrays() ? new Float32Array(8) : [];\nconst bT = FeatureDetection.supportsTypedArrays() ? new Float32Array(8) : [];\nconst bD = FeatureDetection.supportsTypedArrays() ? new Float32Array(8) : [];\n\nfor (let i = 0; i < 7; ++i) {\n const s = i + 1.0;\n const t = 2.0 * s + 1.0;\n u[i] = 1.0 / (s * t);\n v[i] = s / t;\n}\n\nu[7] = opmu / (8.0 * 17.0);\nv[7] = (opmu * 8.0) / 17.0;\n\n/**\n * Computes the spherical linear interpolation or extrapolation at t using the provided quaternions.\n * This implementation is faster than {@link Quaternion#slerp}, but is only accurate up to 10-6.\n *\n * @param {Quaternion} start The value corresponding to t at 0.0.\n * @param {Quaternion} end The value corresponding to t at 1.0.\n * @param {number} t The point along t at which to interpolate.\n * @param {Quaternion} result The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter.\n *\n * @see Quaternion#slerp\n */\nQuaternion.fastSlerp = function (start, end, t, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"start\", start);\n Check.typeOf.object(\"end\", end);\n Check.typeOf.number(\"t\", t);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n let x = Quaternion.dot(start, end);\n\n let sign;\n if (x >= 0) {\n sign = 1.0;\n } else {\n sign = -1.0;\n x = -x;\n }\n\n const xm1 = x - 1.0;\n const d = 1.0 - t;\n const sqrT = t * t;\n const sqrD = d * d;\n\n for (let i = 7; i >= 0; --i) {\n bT[i] = (u[i] * sqrT - v[i]) * xm1;\n bD[i] = (u[i] * sqrD - v[i]) * xm1;\n }\n\n const cT =\n sign *\n t *\n (1.0 +\n bT[0] *\n (1.0 +\n bT[1] *\n (1.0 +\n bT[2] *\n (1.0 +\n bT[3] *\n (1.0 +\n bT[4] *\n (1.0 + bT[5] * (1.0 + bT[6] * (1.0 + bT[7]))))))));\n const cD =\n d *\n (1.0 +\n bD[0] *\n (1.0 +\n bD[1] *\n (1.0 +\n bD[2] *\n (1.0 +\n bD[3] *\n (1.0 +\n bD[4] *\n (1.0 + bD[5] * (1.0 + bD[6] * (1.0 + bD[7]))))))));\n\n const temp = Quaternion.multiplyByScalar(\n start,\n cD,\n fastSlerpScratchQuaternion,\n );\n Quaternion.multiplyByScalar(end, cT, result);\n return Quaternion.add(temp, result, result);\n};\n\n/**\n * Computes the spherical quadrangle interpolation between quaternions.\n * An implementation that is faster than {@link Quaternion#squad}, but less accurate.\n *\n * @param {Quaternion} q0 The first quaternion.\n * @param {Quaternion} q1 The second quaternion.\n * @param {Quaternion} s0 The first inner quadrangle.\n * @param {Quaternion} s1 The second inner quadrangle.\n * @param {number} t The time in [0,1] used to interpolate.\n * @param {Quaternion} result The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter or a new instance if none was provided.\n *\n * @see Quaternion#squad\n */\nQuaternion.fastSquad = function (q0, q1, s0, s1, t, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"q0\", q0);\n Check.typeOf.object(\"q1\", q1);\n Check.typeOf.object(\"s0\", s0);\n Check.typeOf.object(\"s1\", s1);\n Check.typeOf.number(\"t\", t);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const slerp0 = Quaternion.fastSlerp(q0, q1, t, squadScratchQuaternion0);\n const slerp1 = Quaternion.fastSlerp(s0, s1, t, squadScratchQuaternion1);\n return Quaternion.fastSlerp(slerp0, slerp1, 2.0 * t * (1.0 - t), result);\n};\n\n/**\n * Compares the provided quaternions componentwise and returns\n * true if they are equal, false otherwise.\n *\n * @param {Quaternion} [left] The first quaternion.\n * @param {Quaternion} [right] The second quaternion.\n * @returns {boolean} true if left and right are equal, false otherwise.\n */\nQuaternion.equals = function (left, right) {\n return (\n left === right ||\n (defined(left) &&\n defined(right) &&\n left.x === right.x &&\n left.y === right.y &&\n left.z === right.z &&\n left.w === right.w)\n );\n};\n\n/**\n * Compares the provided quaternions componentwise and returns\n * true if they are within the provided epsilon,\n * false otherwise.\n *\n * @param {Quaternion} [left] The first quaternion.\n * @param {Quaternion} [right] The second quaternion.\n * @param {number} [epsilon=0] The epsilon to use for equality testing.\n * @returns {boolean} true if left and right are within the provided epsilon, false otherwise.\n */\nQuaternion.equalsEpsilon = function (left, right, epsilon) {\n epsilon = defaultValue(epsilon, 0);\n\n return (\n left === right ||\n (defined(left) &&\n defined(right) &&\n Math.abs(left.x - right.x) <= epsilon &&\n Math.abs(left.y - right.y) <= epsilon &&\n Math.abs(left.z - right.z) <= epsilon &&\n Math.abs(left.w - right.w) <= epsilon)\n );\n};\n\n/**\n * An immutable Quaternion instance initialized to (0.0, 0.0, 0.0, 0.0).\n *\n * @type {Quaternion}\n * @constant\n */\nQuaternion.ZERO = Object.freeze(new Quaternion(0.0, 0.0, 0.0, 0.0));\n\n/**\n * An immutable Quaternion instance initialized to (0.0, 0.0, 0.0, 1.0).\n *\n * @type {Quaternion}\n * @constant\n */\nQuaternion.IDENTITY = Object.freeze(new Quaternion(0.0, 0.0, 0.0, 1.0));\n\n/**\n * Duplicates this Quaternion instance.\n *\n * @param {Quaternion} [result] The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter or a new Quaternion instance if one was not provided.\n */\nQuaternion.prototype.clone = function (result) {\n return Quaternion.clone(this, result);\n};\n\n/**\n * Compares this and the provided quaternion componentwise and returns\n * true if they are equal, false otherwise.\n *\n * @param {Quaternion} [right] The right hand side quaternion.\n * @returns {boolean} true if left and right are equal, false otherwise.\n */\nQuaternion.prototype.equals = function (right) {\n return Quaternion.equals(this, right);\n};\n\n/**\n * Compares this and the provided quaternion componentwise and returns\n * true if they are within the provided epsilon,\n * false otherwise.\n *\n * @param {Quaternion} [right] The right hand side quaternion.\n * @param {number} [epsilon=0] The epsilon to use for equality testing.\n * @returns {boolean} true if left and right are within the provided epsilon, false otherwise.\n */\nQuaternion.prototype.equalsEpsilon = function (right, epsilon) {\n return Quaternion.equalsEpsilon(this, right, epsilon);\n};\n\n/**\n * Returns a string representing this quaternion in the format (x, y, z, w).\n *\n * @returns {string} A string representing this Quaternion.\n */\nQuaternion.prototype.toString = function () {\n return `(${this.x}, ${this.y}, ${this.z}, ${this.w})`;\n};\nexport default Quaternion;\n","import Check from \"./Check.js\";\nimport defaultValue from \"./defaultValue.js\";\nimport defined from \"./defined.js\";\nimport DeveloperError from \"./DeveloperError.js\";\nimport Fullscreen from \"./Fullscreen.js\";\n\nlet theNavigator;\nif (typeof navigator !== \"undefined\") {\n theNavigator = navigator;\n} else {\n theNavigator = {};\n}\n\nfunction extractVersion(versionString) {\n const parts = versionString.split(\".\");\n for (let i = 0, len = parts.length; i < len; ++i) {\n parts[i] = parseInt(parts[i], 10);\n }\n return parts;\n}\n\nlet isChromeResult;\nlet chromeVersionResult;\nfunction isChrome() {\n if (!defined(isChromeResult)) {\n isChromeResult = false;\n // Edge contains Chrome in the user agent too\n if (!isEdge()) {\n const fields = / Chrome\\/([\\.0-9]+)/.exec(theNavigator.userAgent);\n if (fields !== null) {\n isChromeResult = true;\n chromeVersionResult = extractVersion(fields[1]);\n }\n }\n }\n\n return isChromeResult;\n}\n\nfunction chromeVersion() {\n return isChrome() && chromeVersionResult;\n}\n\nlet isSafariResult;\nlet safariVersionResult;\nfunction isSafari() {\n if (!defined(isSafariResult)) {\n isSafariResult = false;\n\n // Chrome and Edge contain Safari in the user agent too\n if (\n !isChrome() &&\n !isEdge() &&\n / Safari\\/[\\.0-9]+/.test(theNavigator.userAgent)\n ) {\n const fields = / Version\\/([\\.0-9]+)/.exec(theNavigator.userAgent);\n if (fields !== null) {\n isSafariResult = true;\n safariVersionResult = extractVersion(fields[1]);\n }\n }\n }\n\n return isSafariResult;\n}\n\nfunction safariVersion() {\n return isSafari() && safariVersionResult;\n}\n\nlet isWebkitResult;\nlet webkitVersionResult;\nfunction isWebkit() {\n if (!defined(isWebkitResult)) {\n isWebkitResult = false;\n\n const fields = / AppleWebKit\\/([\\.0-9]+)(\\+?)/.exec(theNavigator.userAgent);\n if (fields !== null) {\n isWebkitResult = true;\n webkitVersionResult = extractVersion(fields[1]);\n webkitVersionResult.isNightly = !!fields[2];\n }\n }\n\n return isWebkitResult;\n}\n\nfunction webkitVersion() {\n return isWebkit() && webkitVersionResult;\n}\n\nlet isInternetExplorerResult;\nlet internetExplorerVersionResult;\nfunction isInternetExplorer() {\n if (!defined(isInternetExplorerResult)) {\n isInternetExplorerResult = false;\n\n let fields;\n if (theNavigator.appName === \"Microsoft Internet Explorer\") {\n fields = /MSIE ([0-9]{1,}[\\.0-9]{0,})/.exec(theNavigator.userAgent);\n if (fields !== null) {\n isInternetExplorerResult = true;\n internetExplorerVersionResult = extractVersion(fields[1]);\n }\n } else if (theNavigator.appName === \"Netscape\") {\n fields = /Trident\\/.*rv:([0-9]{1,}[\\.0-9]{0,})/.exec(\n theNavigator.userAgent,\n );\n if (fields !== null) {\n isInternetExplorerResult = true;\n internetExplorerVersionResult = extractVersion(fields[1]);\n }\n }\n }\n return isInternetExplorerResult;\n}\n\nfunction internetExplorerVersion() {\n return isInternetExplorer() && internetExplorerVersionResult;\n}\n\nlet isEdgeResult;\nlet edgeVersionResult;\nfunction isEdge() {\n if (!defined(isEdgeResult)) {\n isEdgeResult = false;\n const fields = / Edg\\/([\\.0-9]+)/.exec(theNavigator.userAgent);\n if (fields !== null) {\n isEdgeResult = true;\n edgeVersionResult = extractVersion(fields[1]);\n }\n }\n return isEdgeResult;\n}\n\nfunction edgeVersion() {\n return isEdge() && edgeVersionResult;\n}\n\nlet isFirefoxResult;\nlet firefoxVersionResult;\nfunction isFirefox() {\n if (!defined(isFirefoxResult)) {\n isFirefoxResult = false;\n\n const fields = /Firefox\\/([\\.0-9]+)/.exec(theNavigator.userAgent);\n if (fields !== null) {\n isFirefoxResult = true;\n firefoxVersionResult = extractVersion(fields[1]);\n }\n }\n return isFirefoxResult;\n}\n\nlet isWindowsResult;\nfunction isWindows() {\n if (!defined(isWindowsResult)) {\n isWindowsResult = /Windows/i.test(theNavigator.appVersion);\n }\n return isWindowsResult;\n}\n\nlet isIPadOrIOSResult;\nfunction isIPadOrIOS() {\n if (!defined(isIPadOrIOSResult)) {\n isIPadOrIOSResult =\n navigator.platform === \"iPhone\" ||\n navigator.platform === \"iPod\" ||\n navigator.platform === \"iPad\";\n }\n\n return isIPadOrIOSResult;\n}\n\nfunction firefoxVersion() {\n return isFirefox() && firefoxVersionResult;\n}\n\nlet hasPointerEvents;\nfunction supportsPointerEvents() {\n if (!defined(hasPointerEvents)) {\n //While navigator.pointerEnabled is deprecated in the W3C specification\n //we still need to use it if it exists in order to support browsers\n //that rely on it, such as the Windows WebBrowser control which defines\n //PointerEvent but sets navigator.pointerEnabled to false.\n\n //Firefox disabled because of https://github.com/CesiumGS/cesium/issues/6372\n hasPointerEvents =\n !isFirefox() &&\n typeof PointerEvent !== \"undefined\" &&\n (!defined(theNavigator.pointerEnabled) || theNavigator.pointerEnabled);\n }\n return hasPointerEvents;\n}\n\nlet imageRenderingValueResult;\nlet supportsImageRenderingPixelatedResult;\nfunction supportsImageRenderingPixelated() {\n if (!defined(supportsImageRenderingPixelatedResult)) {\n const canvas = document.createElement(\"canvas\");\n canvas.setAttribute(\n \"style\",\n \"image-rendering: -moz-crisp-edges;\" + \"image-rendering: pixelated;\",\n );\n //canvas.style.imageRendering will be undefined, null or an empty string on unsupported browsers.\n const tmp = canvas.style.imageRendering;\n supportsImageRenderingPixelatedResult = defined(tmp) && tmp !== \"\";\n if (supportsImageRenderingPixelatedResult) {\n imageRenderingValueResult = tmp;\n }\n }\n return supportsImageRenderingPixelatedResult;\n}\n\nfunction imageRenderingValue() {\n return supportsImageRenderingPixelated()\n ? imageRenderingValueResult\n : undefined;\n}\n\nfunction supportsWebP() {\n //>>includeStart('debug', pragmas.debug);\n if (!supportsWebP.initialized) {\n throw new DeveloperError(\n \"You must call FeatureDetection.supportsWebP.initialize and wait for the promise to resolve before calling FeatureDetection.supportsWebP\",\n );\n }\n //>>includeEnd('debug');\n return supportsWebP._result;\n}\nsupportsWebP._promise = undefined;\nsupportsWebP._result = undefined;\nsupportsWebP.initialize = function () {\n // From https://developers.google.com/speed/webp/faq#how_can_i_detect_browser_support_for_webp\n if (defined(supportsWebP._promise)) {\n return supportsWebP._promise;\n }\n\n supportsWebP._promise = new Promise((resolve) => {\n const image = new Image();\n image.onload = function () {\n supportsWebP._result = image.width > 0 && image.height > 0;\n resolve(supportsWebP._result);\n };\n\n image.onerror = function () {\n supportsWebP._result = false;\n resolve(supportsWebP._result);\n };\n image.src =\n \"data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA\";\n });\n\n return supportsWebP._promise;\n};\nObject.defineProperties(supportsWebP, {\n initialized: {\n get: function () {\n return defined(supportsWebP._result);\n },\n },\n});\n\nconst typedArrayTypes = [];\nif (typeof ArrayBuffer !== \"undefined\") {\n typedArrayTypes.push(\n Int8Array,\n Uint8Array,\n Int16Array,\n Uint16Array,\n Int32Array,\n Uint32Array,\n Float32Array,\n Float64Array,\n );\n\n if (typeof Uint8ClampedArray !== \"undefined\") {\n typedArrayTypes.push(Uint8ClampedArray);\n }\n\n if (typeof Uint8ClampedArray !== \"undefined\") {\n typedArrayTypes.push(Uint8ClampedArray);\n }\n\n if (typeof BigInt64Array !== \"undefined\") {\n // eslint-disable-next-line no-undef\n typedArrayTypes.push(BigInt64Array);\n }\n\n if (typeof BigUint64Array !== \"undefined\") {\n // eslint-disable-next-line no-undef\n typedArrayTypes.push(BigUint64Array);\n }\n}\n\n/**\n * A set of functions to detect whether the current browser supports\n * various features.\n *\n * @namespace FeatureDetection\n */\nconst FeatureDetection = {\n isChrome: isChrome,\n chromeVersion: chromeVersion,\n isSafari: isSafari,\n safariVersion: safariVersion,\n isWebkit: isWebkit,\n webkitVersion: webkitVersion,\n isInternetExplorer: isInternetExplorer,\n internetExplorerVersion: internetExplorerVersion,\n isEdge: isEdge,\n edgeVersion: edgeVersion,\n isFirefox: isFirefox,\n firefoxVersion: firefoxVersion,\n isWindows: isWindows,\n isIPadOrIOS: isIPadOrIOS,\n hardwareConcurrency: defaultValue(theNavigator.hardwareConcurrency, 3),\n supportsPointerEvents: supportsPointerEvents,\n supportsImageRenderingPixelated: supportsImageRenderingPixelated,\n supportsWebP: supportsWebP,\n imageRenderingValue: imageRenderingValue,\n typedArrayTypes: typedArrayTypes,\n};\n\n/**\n * Detects whether the current browser supports Basis Universal textures and the web assembly modules needed to transcode them.\n *\n * @param {Scene} scene\n * @returns {boolean} true if the browser supports web assembly modules and the scene supports Basis Universal textures, false if not.\n */\nFeatureDetection.supportsBasis = function (scene) {\n return FeatureDetection.supportsWebAssembly() && scene.context.supportsBasis;\n};\n\n/**\n * Detects whether the current browser supports the full screen standard.\n *\n * @returns {boolean} true if the browser supports the full screen standard, false if not.\n *\n * @see Fullscreen\n * @see {@link http://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html|W3C Fullscreen Living Specification}\n */\nFeatureDetection.supportsFullscreen = function () {\n return Fullscreen.supportsFullscreen();\n};\n\n/**\n * Detects whether the current browser supports typed arrays.\n *\n * @returns {boolean} true if the browser supports typed arrays, false if not.\n *\n * @see {@link https://tc39.es/ecma262/#sec-typedarray-objects|Typed Array Specification}\n */\nFeatureDetection.supportsTypedArrays = function () {\n return typeof ArrayBuffer !== \"undefined\";\n};\n\n/**\n * Detects whether the current browser supports BigInt64Array typed arrays.\n *\n * @returns {boolean} true if the browser supports BigInt64Array typed arrays, false if not.\n *\n * @see {@link https://tc39.es/ecma262/#sec-typedarray-objects|Typed Array Specification}\n */\nFeatureDetection.supportsBigInt64Array = function () {\n return typeof BigInt64Array !== \"undefined\";\n};\n\n/**\n * Detects whether the current browser supports BigUint64Array typed arrays.\n *\n * @returns {boolean} true if the browser supports BigUint64Array typed arrays, false if not.\n *\n * @see {@link https://tc39.es/ecma262/#sec-typedarray-objects|Typed Array Specification}\n */\nFeatureDetection.supportsBigUint64Array = function () {\n return typeof BigUint64Array !== \"undefined\";\n};\n\n/**\n * Detects whether the current browser supports BigInt.\n *\n * @returns {boolean} true if the browser supports BigInt, false if not.\n *\n * @see {@link https://tc39.es/ecma262/#sec-bigint-objects|BigInt Specification}\n */\nFeatureDetection.supportsBigInt = function () {\n return typeof BigInt !== \"undefined\";\n};\n\n/**\n * Detects whether the current browser supports Web Workers.\n *\n * @returns {boolean} true if the browsers supports Web Workers, false if not.\n *\n * @see {@link http://www.w3.org/TR/workers/}\n */\nFeatureDetection.supportsWebWorkers = function () {\n return typeof Worker !== \"undefined\";\n};\n\n/**\n * Detects whether the current browser supports Web Assembly.\n *\n * @returns {boolean} true if the browsers supports Web Assembly, false if not.\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/WebAssembly}\n */\nFeatureDetection.supportsWebAssembly = function () {\n return typeof WebAssembly !== \"undefined\";\n};\n\n/**\n * Detects whether the current browser supports a WebGL2 rendering context for the specified scene.\n *\n * @param {Scene} scene the Cesium scene specifying the rendering context\n * @returns {boolean} true if the browser supports a WebGL2 rendering context, false if not.\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/WebGL2RenderingContext|WebGL2RenderingContext}\n */\nFeatureDetection.supportsWebgl2 = function (scene) {\n //>>includeStart('debug', pragmas.debug);\n Check.defined(\"scene\", scene);\n //>>includeEnd('debug');\n\n return scene.context.webgl2;\n};\n\n/**\n * Detects whether the current browser supports ECMAScript modules in web workers.\n * @returns {boolean} true if the browser supports ECMAScript modules in web workers.\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Worker|Worker}\n */\nFeatureDetection.supportsEsmWebWorkers = function () {\n return !isFirefox() || parseInt(firefoxVersionResult) >= 114;\n};\n\nexport default FeatureDetection;\n","import defined from \"./defined.js\";\n\nlet _supportsFullscreen;\nconst _names = {\n requestFullscreen: undefined,\n exitFullscreen: undefined,\n fullscreenEnabled: undefined,\n fullscreenElement: undefined,\n fullscreenchange: undefined,\n fullscreenerror: undefined,\n};\n\n/**\n * Browser-independent functions for working with the standard fullscreen API.\n *\n * @namespace Fullscreen\n *\n * @see {@link http://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html|W3C Fullscreen Living Specification}\n */\nconst Fullscreen = {};\n\nObject.defineProperties(Fullscreen, {\n /**\n * The element that is currently fullscreen, if any. To simply check if the\n * browser is in fullscreen mode or not, use {@link Fullscreen#fullscreen}.\n * @memberof Fullscreen\n * @type {object}\n * @readonly\n */\n element: {\n get: function () {\n if (!Fullscreen.supportsFullscreen()) {\n return undefined;\n }\n\n return document[_names.fullscreenElement];\n },\n },\n\n /**\n * The name of the event on the document that is fired when fullscreen is\n * entered or exited. This event name is intended for use with addEventListener.\n * In your event handler, to determine if the browser is in fullscreen mode or not,\n * use {@link Fullscreen#fullscreen}.\n * @memberof Fullscreen\n * @type {string}\n * @readonly\n */\n changeEventName: {\n get: function () {\n if (!Fullscreen.supportsFullscreen()) {\n return undefined;\n }\n\n return _names.fullscreenchange;\n },\n },\n\n /**\n * The name of the event that is fired when a fullscreen error\n * occurs. This event name is intended for use with addEventListener.\n * @memberof Fullscreen\n * @type {string}\n * @readonly\n */\n errorEventName: {\n get: function () {\n if (!Fullscreen.supportsFullscreen()) {\n return undefined;\n }\n\n return _names.fullscreenerror;\n },\n },\n\n /**\n * Determine whether the browser will allow an element to be made fullscreen, or not.\n * For example, by default, iframes cannot go fullscreen unless the containing page\n * adds an \"allowfullscreen\" attribute (or prefixed equivalent).\n * @memberof Fullscreen\n * @type {boolean}\n * @readonly\n */\n enabled: {\n get: function () {\n if (!Fullscreen.supportsFullscreen()) {\n return undefined;\n }\n\n return document[_names.fullscreenEnabled];\n },\n },\n\n /**\n * Determines if the browser is currently in fullscreen mode.\n * @memberof Fullscreen\n * @type {boolean}\n * @readonly\n */\n fullscreen: {\n get: function () {\n if (!Fullscreen.supportsFullscreen()) {\n return undefined;\n }\n\n return Fullscreen.element !== null;\n },\n },\n});\n\n/**\n * Detects whether the browser supports the standard fullscreen API.\n *\n * @returns {boolean} true if the browser supports the standard fullscreen API,\n * false otherwise.\n */\nFullscreen.supportsFullscreen = function () {\n if (defined(_supportsFullscreen)) {\n return _supportsFullscreen;\n }\n\n _supportsFullscreen = false;\n\n const body = document.body;\n if (typeof body.requestFullscreen === \"function\") {\n // go with the unprefixed, standard set of names\n _names.requestFullscreen = \"requestFullscreen\";\n _names.exitFullscreen = \"exitFullscreen\";\n _names.fullscreenEnabled = \"fullscreenEnabled\";\n _names.fullscreenElement = \"fullscreenElement\";\n _names.fullscreenchange = \"fullscreenchange\";\n _names.fullscreenerror = \"fullscreenerror\";\n _supportsFullscreen = true;\n return _supportsFullscreen;\n }\n\n //check for the correct combination of prefix plus the various names that browsers use\n const prefixes = [\"webkit\", \"moz\", \"o\", \"ms\", \"khtml\"];\n let name;\n for (let i = 0, len = prefixes.length; i < len; ++i) {\n const prefix = prefixes[i];\n\n // casing of Fullscreen differs across browsers\n name = `${prefix}RequestFullscreen`;\n if (typeof body[name] === \"function\") {\n _names.requestFullscreen = name;\n _supportsFullscreen = true;\n } else {\n name = `${prefix}RequestFullScreen`;\n if (typeof body[name] === \"function\") {\n _names.requestFullscreen = name;\n _supportsFullscreen = true;\n }\n }\n\n // disagreement about whether it's \"exit\" as per spec, or \"cancel\"\n name = `${prefix}ExitFullscreen`;\n if (typeof document[name] === \"function\") {\n _names.exitFullscreen = name;\n } else {\n name = `${prefix}CancelFullScreen`;\n if (typeof document[name] === \"function\") {\n _names.exitFullscreen = name;\n }\n }\n\n // casing of Fullscreen differs across browsers\n name = `${prefix}FullscreenEnabled`;\n if (document[name] !== undefined) {\n _names.fullscreenEnabled = name;\n } else {\n name = `${prefix}FullScreenEnabled`;\n if (document[name] !== undefined) {\n _names.fullscreenEnabled = name;\n }\n }\n\n // casing of Fullscreen differs across browsers\n name = `${prefix}FullscreenElement`;\n if (document[name] !== undefined) {\n _names.fullscreenElement = name;\n } else {\n name = `${prefix}FullScreenElement`;\n if (document[name] !== undefined) {\n _names.fullscreenElement = name;\n }\n }\n\n // thankfully, event names are all lowercase per spec\n name = `${prefix}fullscreenchange`;\n // event names do not have 'on' in the front, but the property on the document does\n if (document[`on${name}`] !== undefined) {\n //except on IE\n if (prefix === \"ms\") {\n name = \"MSFullscreenChange\";\n }\n _names.fullscreenchange = name;\n }\n\n name = `${prefix}fullscreenerror`;\n if (document[`on${name}`] !== undefined) {\n //except on IE\n if (prefix === \"ms\") {\n name = \"MSFullscreenError\";\n }\n _names.fullscreenerror = name;\n }\n }\n\n return _supportsFullscreen;\n};\n\n/**\n * Asynchronously requests the browser to enter fullscreen mode on the given element.\n * If fullscreen mode is not supported by the browser, does nothing.\n *\n * @param {object} element The HTML element which will be placed into fullscreen mode.\n * @param {object} [vrDevice] The HMDVRDevice device.\n *\n * @example\n * // Put the entire page into fullscreen.\n * Cesium.Fullscreen.requestFullscreen(document.body)\n *\n * // Place only the Cesium canvas into fullscreen.\n * Cesium.Fullscreen.requestFullscreen(scene.canvas)\n */\nFullscreen.requestFullscreen = function (element, vrDevice) {\n if (!Fullscreen.supportsFullscreen()) {\n return;\n }\n\n element[_names.requestFullscreen]({ vrDisplay: vrDevice });\n};\n\n/**\n * Asynchronously exits fullscreen mode. If the browser is not currently\n * in fullscreen, or if fullscreen mode is not supported by the browser, does nothing.\n */\nFullscreen.exitFullscreen = function () {\n if (!Fullscreen.supportsFullscreen()) {\n return;\n }\n\n document[_names.exitFullscreen]();\n};\n\n//For unit tests\nFullscreen._names = _names;\nexport default Fullscreen;\n"],"names":["$6fb706f4a1c1ff12$var$a","$b1dcbeb8d31d71ff$var$supportsImageBitmapOptionsPromise","$b73be531cd978718$var$a","$b73be531cd978718$var$baseResource","$b73be531cd978718$var$implementation","$19a47bf34378ad7c$var$_supportsFullscreen","$da149e13e9eaa5f6$var$theNavigator","$da149e13e9eaa5f6$var$isChromeResult","$da149e13e9eaa5f6$var$chromeVersionResult","$da149e13e9eaa5f6$var$isSafariResult","$da149e13e9eaa5f6$var$safariVersionResult","$da149e13e9eaa5f6$var$isWebkitResult","$da149e13e9eaa5f6$var$webkitVersionResult","$da149e13e9eaa5f6$var$isInternetExplorerResult","$da149e13e9eaa5f6$var$internetExplorerVersionResult","$da149e13e9eaa5f6$var$isEdgeResult","$da149e13e9eaa5f6$var$edgeVersionResult","$da149e13e9eaa5f6$var$isFirefoxResult","$da149e13e9eaa5f6$var$firefoxVersionResult","$da149e13e9eaa5f6$var$isWindowsResult","$da149e13e9eaa5f6$var$isIPadOrIOSResult","$da149e13e9eaa5f6$var$hasPointerEvents","$da149e13e9eaa5f6$var$imageRenderingValueResult","$da149e13e9eaa5f6$var$supportsImageRenderingPixelatedResult","t","root","factory","$parcel$global","globalThis","$parcel$interopDefault","a","__esModule","default","$parcel$modules","$parcel$inits","parcelRequire","id","exports","init","module","call","err","Error","code","register","parcelRegister","freeExports","nodeType","freeModule","freeGlobal","global","window","self","punycode","key","regexPunycode","regexNonASCII","regexSeparators","errors","floor","Math","stringFromCharCode","String","fromCharCode","error","type","RangeError","map","array","fn","length","result","mapDomain","string","parts","split","replace","join","ucs2decode","value","extra","output","counter","charCodeAt","push","ucs2encode","digitToBasic","digit","flag","adapt","delta","numPoints","firstTime","k","baseMinusTMin","base","decode","input","codePoint","out","basic","j","index","oldi","w","baseMinusT","inputLength","i","n","bias","lastIndexOf","maxInt","splice","encode","handledCPCount","basicLength","m","q","currentValue","handledCPCountPlusOne","qMinusT","test","slice","toLowerCase","define","amd","hasOwnProperty","_IPv6","IPv6","best","address","pos","_segments","segments","_address","total","shift","pop","indexOf","_best","_current","current","inzeroes","noConflict","_SecondLevelDomains","SecondLevelDomains","SLD","list","has","domain","tldOffset","sldOffset","sldList","is","get","$800sp","$jJTNo","$3baabda811939da5$export$befdefbdce210f91","constructor","_$AU","_$AM","_$AT","e","_$AS","update","render","$74d80410d825d70d$var$ee","$74d80410d825d70d$var$ie","$74d80410d825d70d$export$1e5b4ce2fa884e6a","name","strings","Object","keys","reduce","r","s","includes","style","element","ft","Set","delete","removeProperty","add","endsWith","setProperty","noChange","_$litDirective$","values","$kWQjc","$bXwZF","$3pzcG","$8w8ZH","$jQJji","$AXvpI","$1vHsR","$667f84b0348f3801$var$scaleToGeodeticSurfaceIntersection","$667f84b0348f3801$var$scaleToGeodeticSurfaceGradient","$667f84b0348f3801$export$2e2bcd8739ae039","cartesian","oneOverRadii","oneOverRadiiSquared","centerToleranceSquared","func","xMultiplier","yMultiplier","zMultiplier","xMultiplier2","yMultiplier2","zMultiplier2","xMultiplier3","yMultiplier3","zMultiplier3","positionX","x","positionY","y","positionZ","z","oneOverRadiiX","oneOverRadiiY","oneOverRadiiZ","x2","y2","z2","squaredNorm","ratio","sqrt","intersection","multiplyByScalar","isFinite","clone","undefined","oneOverRadiiSquaredX","oneOverRadiiSquaredY","oneOverRadiiSquaredZ","gradient","lambda","magnitude","correction","abs","EPSILON12","$69f9194a3ef67d4b$var$Cartographic","longitude","latitude","height","fromRadians","typeOf","number","fromDegrees","toRadians","$69f9194a3ef67d4b$var$cartesianToCartographicN","$69f9194a3ef67d4b$var$cartesianToCartographicP","$69f9194a3ef67d4b$var$cartesianToCartographicH","_ellipsoidOneOverRadii","_ellipsoidOneOverRadiiSquared","_ellipsoidCenterToleranceSquared","EPSILON1","fromCartesian","ellipsoid","p","_centerToleranceSquared","multiplyComponents","normalize","h","subtract","atan2","asin","sign","dot","toCartesian","cartographic","defined","equals","left","right","equalsEpsilon","epsilon","ZERO","freeze","prototype","toString","$5237444a2d786ec9$var$initialize","greaterThanOrEquals","_radii","_radiiSquared","_radiiToTheFourth","_oneOverRadii","_oneOverRadiiSquared","_minimumRadius","min","_maximumRadius","max","_squaredXOverSquaredZ","$5237444a2d786ec9$var$Ellipsoid","defineProperties","radii","radiiSquared","radiiToTheFourth","minimumRadius","maximumRadius","fromCartesian3","WGS84","UNIT_SPHERE","MOON","LUNAR_RADIUS","_default","set","object","_ellipsoidRadiiSquared","packedLength","pack","startingIndex","unpack","geocentricSurfaceNormal","geodeticSurfaceNormalCartographic","cosLatitude","cos","sin","geodeticSurfaceNormal","isNaN","EPSILON14","$5237444a2d786ec9$var$cartographicToCartesianNormal","$5237444a2d786ec9$var$cartographicToCartesianK","cartographicToCartesian","gamma","divideByScalar","cartographicArrayToCartesianArray","cartographics","Array","$5237444a2d786ec9$var$cartesianToCartographicN","$5237444a2d786ec9$var$cartesianToCartographicP","$5237444a2d786ec9$var$cartesianToCartographicH","cartesianToCartographic","scaleToGeodeticSurface","cartesianArrayToCartographicArray","cartesians","scaleToGeocentricSurface","beta","transformPositionToScaledSpace","position","transformPositionFromScaledSpace","getSurfaceNormalIntersectionWithZAxis","buffer","EPSILON15","greaterThan","squaredXOverSquaredZ","$5237444a2d786ec9$var$scratchEndpoint","getLocalCurvature","surfacePosition","primeVerticalEndpoint","primeVerticalRadius","distance","radiusRatio","fromElements","$5237444a2d786ec9$var$abscissas","$5237444a2d786ec9$var$weights","$5237444a2d786ec9$var$gaussLegendreQuadrature","b","xMean","xRange","sum","dx","surfaceArea","rectangle","minLongitude","west","maxLongitude","east","minLatitude","south","maxLatitude","north","TWO_PI","a2","b2","c2","a2b2","lat","sinPhi","cosPhi","lon","cosTheta","sinTheta","$dba8420c01d8a224$var$Cartesian4","fromColor","color","red","green","blue","alpha","packArray","resultLength","isArray","unpackArray","fromArray","maximumComponent","minimumComponent","minimumByComponent","first","second","maximumByComponent","clamp","magnitudeSquared","$dba8420c01d8a224$var$distanceScratch","distanceSquared","divideComponents","scalar","negate","$dba8420c01d8a224$var$lerpScratch","lerp","start","end","$dba8420c01d8a224$var$mostOrthogonalAxisScratch","mostOrthogonalAxis","f","UNIT_X","UNIT_W","UNIT_Z","UNIT_Y","equalsArray","offset","relativeEpsilon","absoluteEpsilon","ONE","$dba8420c01d8a224$var$scratchF32Array","Float32Array","$dba8420c01d8a224$var$scratchU8Array","Uint8Array","$dba8420c01d8a224$var$littleEndian","$dba8420c01d8a224$var$testU8","$dba8420c01d8a224$var$testU32","Uint32Array","packFloat","unpackFloat","packedFloat","$490279d1ff27cf6c$var$Matrix3","column0Row0","column1Row0","column2Row0","column0Row1","column1Row1","column2Row1","column0Row2","column1Row2","column2Row2","matrix","fromColumnMajorArray","fromRowMajorArray","fromQuaternion","quaternion","xy","xz","xw","yz","yw","zw","w2","m00","m01","m02","m10","m11","m12","m20","m21","m22","fromHeadingPitchRoll","headingPitchRoll","pitch","cosPsi","heading","roll","sinPsi","fromScale","scale","fromUniformScale","fromCrossProduct","vector","fromRotationX","angle","cosAngle","sinAngle","fromRotationY","fromRotationZ","toArray","getElementIndex","column","row","lessThanOrEquals","getColumn","startIndex","setColumn","getRow","setRow","$490279d1ff27cf6c$var$scaleScratch1","setScale","existingScale","getScale","scaleRatioX","scaleRatioY","scaleRatioZ","$490279d1ff27cf6c$var$scaleScratch2","setUniformScale","$490279d1ff27cf6c$var$scratchColumn","$490279d1ff27cf6c$var$scaleScratch3","getMaximumScale","$490279d1ff27cf6c$var$scaleScratch4","setRotation","rotation","$490279d1ff27cf6c$var$scaleScratch5","getRotation","multiply","multiplyByVector","vX","vY","vZ","multiplyByScale","multiplyByUniformScale","transpose","$490279d1ff27cf6c$var$rowVal","$490279d1ff27cf6c$var$colVal","$490279d1ff27cf6c$var$jMatrix","$490279d1ff27cf6c$var$jMatrixTranspose","computeEigenDecomposition","tolerance","EPSILON20","count","sweep","unitaryMatrix","unitary","IDENTITY","diagMatrix","diagonal","$490279d1ff27cf6c$var$computeFrobeniusNorm","norm","temp","$490279d1ff27cf6c$var$offDiagonalFrobeniusNorm","$490279d1ff27cf6c$var$shurDecomposition","maxDiagonal","rotAxis","c","tau","qq","determinant","m31","m32","m13","m23","m33","inverse","$490279d1ff27cf6c$var$scratchTransposeMatrix","inverseTranspose","COLUMN0ROW0","COLUMN0ROW1","COLUMN0ROW2","COLUMN1ROW0","COLUMN1ROW1","COLUMN1ROW2","COLUMN2ROW0","COLUMN2ROW1","COLUMN2ROW2","$60086b06bf5db23f$var$RuntimeError","message","stack","$7ec6ab76c28fee32$var$Matrix4","column3Row0","column3Row1","column3Row2","column0Row3","column1Row3","column2Row3","column3Row3","create","str","fromRotationTranslation","translation","fromTranslationQuaternionRotationScale","scaleX","scaleY","scaleZ","fromTranslationRotationScale","translationRotationScale","fromTranslation","fromRotation","$7ec6ab76c28fee32$var$fromCameraF","$7ec6ab76c28fee32$var$fromCameraR","$7ec6ab76c28fee32$var$fromCameraU","fromCamera","camera","direction","up","cross","sX","sY","sZ","fX","fY","fZ","uX","uY","uZ","t0","t1","t2","computePerspectiveFieldOfView","fovY","aspectRatio","near","far","lessThan","PI","tan","computeOrthographicOffCenter","bottom","top","tx","ty","tz","computePerspectiveOffCenter","computeInfinitePerspectiveOffCenter","computeViewportTransformation","viewport","nearDepthRange","farDepthRange","EMPTY_OBJECT","width","halfWidth","halfHeight","halfDepth","computeView","setTranslation","$7ec6ab76c28fee32$var$scaleScratch1","$7ec6ab76c28fee32$var$scaleScratch2","$7ec6ab76c28fee32$var$scratchColumn","$7ec6ab76c28fee32$var$scaleScratch3","$7ec6ab76c28fee32$var$scaleScratch4","$7ec6ab76c28fee32$var$scaleScratch5","left0","left1","left2","left3","left4","left5","left6","left7","left8","left9","left10","left11","left12","left13","left14","left15","right0","right1","right2","right3","right4","right5","right6","right7","right8","right9","right10","right11","right12","right13","right14","right15","multiplyTransformation","multiplyByMatrix3","multiplyByTranslation","vW","multiplyByPointAsVector","multiplyByPoint","matrix1","matrix2","matrix3","matrix6","matrix7","matrix11","getTranslation","getMatrix3","$7ec6ab76c28fee32$var$scratchInverseRotation","$7ec6ab76c28fee32$var$scratchMatrix3Zero","$7ec6ab76c28fee32$var$scratchBottomRow","$7ec6ab76c28fee32$var$scratchExpectedBottomRow","src0","src1","src2","src3","src4","src5","src6","src7","src8","src9","src10","src11","src12","src13","src14","src15","tmp0","tmp1","tmp2","tmp3","tmp4","tmp5","tmp6","tmp7","tmp8","tmp9","tmp10","tmp11","dst0","dst1","dst2","dst3","dst4","dst5","dst6","dst7","dst8","dst9","dst10","dst11","dst12","dst13","dst14","dst15","det","EPSILON21","EPSILON7","inverseTransformation","matrix0","matrix4","matrix5","matrix8","matrix9","matrix10","$7ec6ab76c28fee32$var$scratchTransposeMatrix","COLUMN0ROW3","COLUMN1ROW3","COLUMN2ROW3","COLUMN3ROW0","COLUMN3ROW1","COLUMN3ROW2","COLUMN3ROW3","$9btZb","$52c19b09ece4c63f$export$2e2bcd8739ae039","itemToFind","comparator","comparison","low","high","$733293b70aae4cad$export$2e2bcd8739ae039","xPoleWander","yPoleWander","xPoleOffset","yPoleOffset","ut1MinusUtc","$86dc94fb6bcfc713$export$2e2bcd8739ae039","year","$33ab1ce7e2935ae4$var$daysInYear","$33ab1ce7e2935ae4$export$2e2bcd8739ae039","month","day","hour","minute","millisecond","isLeapSecond","bool","maximumSecond","validateDate","daysInMonth","$97869fccaa735547$export$2e2bcd8739ae039","date","julianDate","$e3d50c782acbaff1$export$2e2bcd8739ae039","SECONDS_PER_MILLISECOND","SECONDS_PER_MINUTE","MINUTES_PER_HOUR","HOURS_PER_DAY","SECONDS_PER_HOUR","MINUTES_PER_DAY","SECONDS_PER_DAY","DAYS_PER_JULIAN_CENTURY","PICOSECOND","MODIFIED_JULIAN_DATE_DIFFERENCE","$134462e760c5c083$export$2e2bcd8739ae039","UTC","TAI","$73b9691e04761700$var$gregorianDateScratch","$73b9691e04761700$var$daysInMonth","$73b9691e04761700$var$compareLeapSecondDates","leapSecond","dateToFind","$73b9691e04761700$var$JulianDate","compare","$73b9691e04761700$var$binarySearchScratchLeapSecond","$73b9691e04761700$var$convertUtcToTai","leapSeconds","difference","secondsDifference","addSeconds","$73b9691e04761700$var$convertTaiToUtc","$73b9691e04761700$var$setComponents","wholeDays","secondsOfDay","extraDays","dayNumber","$73b9691e04761700$var$computeJulianDateComponents","$73b9691e04761700$var$matchCalendarYear","$73b9691e04761700$var$matchCalendarMonth","$73b9691e04761700$var$matchOrdinalDate","$73b9691e04761700$var$matchWeekDate","$73b9691e04761700$var$matchCalendarDate","$73b9691e04761700$var$utcOffset","$73b9691e04761700$var$matchHours","source","$73b9691e04761700$var$matchHoursMinutes","$73b9691e04761700$var$matchHoursMinutesSeconds","$73b9691e04761700$var$iso8601ErrorMessage","julianDayNumber","timeStandard","fromGregorianDate","components","fromDate","Date","getTime","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","getUTCMilliseconds","fromIso8601","iso8601String","tmp","inLeapYear","dashCount","offsetIndex","tokens","time","match","dayOfYear","weekNumber","dayOfWeek","january4","getUTCDay","setUTCDate","offsetHours","offsetMinutes","getTimezoneOffset","now","$73b9691e04761700$var$toGregorianDateScratch","toGregorianDate","thisUtc","L","N","I","J","remainingSeconds","toDate","gDate","toIso8601","precision","millisecondStr","toFixed","padStart","julianDayNumberDifference","totalDays","dayDifference","daysDifference","computeTaiMinusUtc","seconds","addMinutes","minutes","newSecondsOfDay","addHours","hours","addDays","days","$f3b7c43a7f0c8e85$exports","_part","_URI","URI","url","_urlSupplied","arguments","_baseSupplied","TypeError","location","href","absoluteTo","version","hasOwn","escapeRegEx","getType","obj","filterArrayValues","data","lookup","arrayContains","_type","arraysEqual","one","two","sort","l","trimSlashes","text","escapeForDumbFirefox36","escape","strictEncodeURIComponent","encodeURIComponent","_parts","protocol","username","password","hostname","urn","port","path","query","fragment","preventInvalidHostname","duplicateQueryParameters","escapeQuerySpace","protocol_expression","idn_expression","punycode_expression","ip4_expression","ip6_expression","find_uri_expression","findUri","trim","parens","leading_whitespace_expression","ascii_tab_whitespace","defaultPorts","http","https","ftp","gopher","ws","wss","hostProtocols","invalid_hostname_characters","domAttributes","getDomAttribute","node","nodeName","decodeURIComponent","iso8859","unescape","unicode","characters","pathname","expression","reserved","urnpath","encodeQuery","escaped","decodeQuery","generateAccessor","_group","generateSegmentedPathFunction","_sep","_codingFuncName","_innerCodingFuncName","actualCodingFunc","generateSimpleAccessor","v","build","generatePrefixAccessor","_key","charAt","substring","decodePath","decodeUrnPath","recodePath","recodeUrnPath","encodeReserved","parse","parseAuthority","parseHost","bracketPos","firstColon","firstSlash","nextColon","ensureValidHostname","ensureValidPort","parseUserinfo","_string","parseQuery","items","splits","requireAbsolutePath","buildAuthority","buildHost","buildUserinfo","buildQuery","unique","buildQueryParameter","addQuery","concat","setQuery","removeQuery","hasQuery","withinArray","Boolean","op","joinPaths","nonEmptySegments","segment","uri","commonPath","withinString","callback","options","_start","_end","_trim","_parens","_attributeOpen","lastIndex","exec","ignoreHtml","attributeOpen","search","parensEnd","parensMatch","ignore","hasHostname","rejectEmptyHostname","toASCII","Number","isInteger","removeAll","unconflicted","URITemplate","deferBuild","_deferred_build","valueOf","hash","res","_object","attribute","src","what","ip","ip4","ip6","sld","idn","relative","_protocol","_port","_hostname","scheme","origin","authority","host","userinfo","resource","subdomain","RegExp","tld","ReferenceError","directory","filename","decodePathSegment","mutatedDirectory","normalizePath","suffix","separator","absolute","unshift","segmentCoded","setSearch","addSearch","removeSearch","hasSearch","normalizeProtocol","normalizeQuery","normalizeFragment","normalizeHostname","normalizePort","_was_relative","_parent","_pos","_path","_leadingParents","normalizePathname","normalizeSearch","normalizeHash","d","readable","toUnicode","qp","kv","basedir","resolved","properties","relativeTo","relativeParts","baseParts","common","relativePath","basePath","parents","one_query","two_query","one_map","two_map","checked","$3f52ff37d0636f55$export$2e2bcd8739ae039","$3f52ff37d0636f55$var$clone","deep","propertyName","$8e522a73a8dfbfe2$export$2e2bcd8739ae039","$8e522a73a8dfbfe2$var$combine","object1","object2","property","object1Value","object2Value","object1Defined","object2Defined","$6e11a2ab1ac0872e$export$2e2bcd8739ae039","resolve","reject","promise","Promise","rej","$5d7f3681ccbe43e2$var$getAbsoluteUri","documentObject","document","_implementation","baseURI","relativeUri","$d4cdc3514a25210c$export$2e2bcd8739ae039","includeQuery","$dce14f3284a3bc25$export$2e2bcd8739ae039","uriObject","substr","$5db98adec2cfcc7b$var$context2DsByWidthAndHeight","$5db98adec2cfcc7b$export$2e2bcd8739ae039","image","context2DsByHeight","context2d","canvas","createElement","getContext","willReadFrequently","globalCompositeOperation","drawImage","getImageData","$9f0272ac2370f543$var$blobUriRegex","$9f0272ac2370f543$export$2e2bcd8739ae039","$6fb706f4a1c1ff12$export$2e2bcd8739ae039","$9cb2c183cad552bd$var$dataUriRegex","$9cb2c183cad552bd$export$2e2bcd8739ae039","$e3fa9c82e19e3667$export$2e2bcd8739ae039","script","async","crossOriginIsolated","setAttribute","head","getElementsByTagName","onload","removeChild","onerror","appendChild","$cdf3d7de0c82329e$export$2e2bcd8739ae039","propName","part","len","$cec685f2ea286a8a$export$2e2bcd8739ae039","queryString","subparts","resultValue","$3f5372c4ce85d94e$export$2e2bcd8739ae039","UNISSUED","ISSUED","ACTIVE","RECEIVED","CANCELLED","FAILED","$a60081784b299462$export$2e2bcd8739ae039","TERRAIN","IMAGERY","TILES3D","OTHER","$b1445a5361079efc$var$Request","throttleByServer","throttle","requestFunction","cancelFunction","priorityFunction","priority","serverKey","state","deferred","cancelled","cancel","$caa58768bf1ed120$export$2e2bcd8739ae039","headerString","headers","headerPairs","headerPair","val","$91769fedd238ef04$var$RequestErrorEvent","statusCode","response","responseHeaders","$280a3f96dcc2704b$var$Event","_listeners","_scopes","_toRemove","_insideRaiseEvent","$280a3f96dcc2704b$var$compareNumber","numberOfListeners","addEventListener","listener","scope","event","removeEventListener","listeners","scopes","raiseEvent","apply","toRemove","$3fa9322de64db78e$var$Heap","_comparator","_array","_length","_maximumLength","$3fa9322de64db78e$var$swap","internalArray","maximumLength","originalLength","reserve","heapify","candidate","inserting","resort","ceil","insert","removedElement","parent","$22996820477a6820$var$statistics","numberOfAttemptedRequests","numberOfActiveRequests","numberOfCancelledRequests","numberOfCancelledActiveRequests","numberOfFailedRequests","numberOfActiveRequestsEver","lastNumberOfActiveRequests","$22996820477a6820$var$priorityHeapLength","$22996820477a6820$var$requestHeap","$22996820477a6820$var$activeRequests","$22996820477a6820$var$numberOfActiveRequestsByServer","$22996820477a6820$var$pageUri","$22996820477a6820$var$requestCompletedEvent","$22996820477a6820$var$RequestScheduler","$22996820477a6820$var$updatePriority","request","$22996820477a6820$var$issueRequest","$22996820477a6820$var$startRequest","then","results","catch","$22996820477a6820$var$cancelRequest","active","maximumRequests","maximumRequestsPerServer","requestsByServer","throttleRequests","debugShowStatistics","requestCompletedEvent","statistics","priorityHeapLength","serverHasOpenSlots","desiredRequests","maxRequests","heapHasOpenSlots","removeCount","activeLength","issuedRequests","issuedLength","openSlots","filledSlots","console","log","getServerKey","removedRequest","clearForSpecs","numberOfActiveRequestsByServer","requestHeap","$501f833019c34c9b$var$TrustedServers","$501f833019c34c9b$var$_servers","remove","contains","$501f833019c34c9b$var$getAuthority","clear","$b1dcbeb8d31d71ff$var$xhrBlobSupported","xhr","XMLHttpRequest","open","responseType","$b1dcbeb8d31d71ff$var$Resource","_url","_templateValues","$b1dcbeb8d31d71ff$var$defaultClone","templateValues","_queryParameters","queryParameters","proxy","retryCallback","retryAttempts","_retryCount","parseUrl","_credits","credits","defaultValue","$b1dcbeb8d31d71ff$var$combineQueryParameters","q1","q2","preserveQueryParameters","param","q2Value","$b1dcbeb8d31d71ff$var$fetchImage","flipY","skipColorSpaceConversion","preferImageBitmap","crossOrigin","isDataUri","isBlobUri","isCrossOriginUrl","_Implementations","createImage","retryOnError","retry","$b1dcbeb8d31d71ff$var$checkAndResetRequest","createIfNeeded","getDerivedResource","supportsImageBitmapOptions","createImageBitmap","fetchBlob","blob","all","imageOrientation","premultiplyAlpha","colorSpaceConversion","imageBitmaps","colorWithOptions","colorWithDefaults","isBlobSupported","getUrlComponent","extension","hasHeaders","merge","preserveQuery","baseUrl","$b1dcbeb8d31d71ff$var$stringifyQuery","queryObject","replacement","getURL","setQueryParameters","params","useAsDefault","appendQueryParameters","setTemplateValues","template","that","getBaseUri","appendForwardSlash","fetchArrayBuffer","fetch","fetchImage","useImageBitmap","generatedBlobResource","generatedBlob","preferBlob","blobPromise","supportsImageBitmap","createImageBitmapFromBlob","URL","createObjectURL","revokeObjectURL","fetchText","fetchJson","Accept","JSON","fetchXML","overrideMimeType","fetchJsonp","callbackParameterName","functionName","nextRandomNumber","$b1dcbeb8d31d71ff$var$fetchJsonp","callbackQuery","loadAndExecuteScript","_makeRequest","method","loadWithXhr","abort","$b1dcbeb8d31d71ff$var$dataUriRegex","$b1dcbeb8d31d71ff$var$decodeDataUriText","isBase64","atob","$b1dcbeb8d31d71ff$var$decodeDataUriArrayBuffer","byteString","ArrayBuffer","view","post","put","patch","loadImageElement","Image","naturalWidth","naturalHeight","xhrDeferred","$b1dcbeb8d31d71ff$var$noXMLHttpRequest","$c1eef27c4238262a$var$EarthOrientationParameters","_dates","_samples","_dateColumn","_xPoleWanderRadiansColumn","_yPoleWanderRadiansColumn","_ut1MinusUtcSecondsColumn","_xCelestialPoleOffsetRadiansColumn","_yCelestialPoleOffsetRadiansColumn","_taiMinusUtcSecondsColumn","_columnCount","_lastIndex","_addNewLeapSeconds","addNewLeapSeconds","$c1eef27c4238262a$var$onDataReady","columnNames","samples","$c1eef27c4238262a$var$compareLeapSecondDates","eop","eopData","lastTaiMinusUtc","dateColumn","xPoleWanderRadiansColumn","yPoleWanderRadiansColumn","ut1MinusUtcSecondsColumn","xCelestialPoleOffsetRadiansColumn","yCelestialPoleOffsetRadiansColumn","taiMinusUtcSecondsColumn","dates","mjd","taiMinusUtc","leapSecondIndex","$c1eef27c4238262a$var$fillResultFromIndex","columnCount","$c1eef27c4238262a$var$interpolate","before","after","y1","beforeDate","afterDate","factor","startBefore","startAfter","beforeUt1MinusUtc","afterUt1MinusUtc","offsetDifference","beforeTaiMinusUtc","afterTaiMinusUtc","dataUriRegexResult","$b1dcbeb8d31d71ff$var$decodeDataUri","mimeType","Blob","parser","DOMParser","parseFromString","$b1dcbeb8d31d71ff$var$loadWithHttpRequest","ok","forEach","status","json","arrayBuffer","withCredentials","setRequestHeader","localFile","getAllResponseHeaders","browserResponseType","splitHeaders","responseHeaderString","line","responseXML","hasChildNodes","responseText","send","_DefaultImplementations","DEFAULT","fromUrl","NONE","compute","previousIndexDate","nextIndexDate","isAfterPrevious","isAfterLastSample","isBeforeNext","$79e069d5452f6556$var$HeadingPitchRoll","denominatorRoll","numeratorRoll","denominatorHeading","numeratorHeading","asinClamped","RADIANS_PER_DEGREE","$b73be531cd978718$import_meta","assign","$b73be531cd978718$var$cesiumScriptRegex","$b73be531cd978718$var$tryMakeAbsolute","$b73be531cd978718$var$getCesiumBaseUrl","baseUrlString","CESIUM_BASE_URL","toUrlUndefined","$b73be531cd978718$var$buildModuleUrl","$b73be531cd978718$var$getBaseUrlFromCesiumScript","scripts","getAttribute","$b73be531cd978718$var$buildModuleUrlFromRequireToUrl","moduleID","$b73be531cd978718$var$buildModuleUrlFromBaseUrl","relativeUrl","_cesiumScriptRegex","_buildModuleUrlFromBaseUrl","_clearBaseResource","setBaseUrl","getCesiumBaseUrl","$c9c1200a42974c2d$export$2e2bcd8739ae039","$7212c54286490aec$var$Iau2006XysData","_xysFileUrlTemplate","xysFileUrlTemplate","_interpolationOrder","interpolationOrder","_sampleZeroJulianEphemerisDate","sampleZeroJulianEphemerisDate","_sampleZeroDateTT","_stepSizeDays","stepSizeDays","_samplesPerXysFile","samplesPerXysFile","_totalSamples","totalSamples","_chunkDownloadsInProgress","order","denom","_denominators","xTable","_xTable","stepN","pow","_work","_coef","$7212c54286490aec$var$julianDateScratch","$7212c54286490aec$var$getDaysSinceEpoch","xys","dayTT","secondTT","dateTT","$7212c54286490aec$var$requestXysChunk","xysData","chunkIndex","chunkUrl","chunk","newSamples","preload","startDayTT","startSecondTT","stopDayTT","stopSecondTT","startDaysSinceEpoch","stopDaysSinceEpoch","stopIndex","startChunk","stopChunk","promises","computeXysRadians","daysSinceEpoch","centerIndex","degree","firstIndex","isDataMissing","work","coef","sampleIndex","$19a47bf34378ad7c$var$_names","requestFullscreen","exitFullscreen","fullscreenEnabled","fullscreenElement","fullscreenchange","fullscreenerror","$19a47bf34378ad7c$var$Fullscreen","$da149e13e9eaa5f6$var$extractVersion","versionString","parseInt","$da149e13e9eaa5f6$var$isChrome","$da149e13e9eaa5f6$var$isEdge","fields","userAgent","$da149e13e9eaa5f6$var$isSafari","$da149e13e9eaa5f6$var$isWebkit","isNightly","$da149e13e9eaa5f6$var$isInternetExplorer","appName","$da149e13e9eaa5f6$var$isFirefox","$da149e13e9eaa5f6$var$supportsImageRenderingPixelated","imageRendering","$da149e13e9eaa5f6$var$supportsWebP","initialized","_result","supportsFullscreen","changeEventName","errorEventName","enabled","fullscreen","body","prefixes","prefix","vrDevice","vrDisplay","_names","navigator","_promise","initialize","$da149e13e9eaa5f6$var$typedArrayTypes","Int8Array","Int16Array","Uint16Array","Int32Array","Float64Array","Uint8ClampedArray","BigInt64Array","BigUint64Array","$da149e13e9eaa5f6$var$FeatureDetection","isChrome","chromeVersion","isSafari","safariVersion","isWebkit","webkitVersion","isInternetExplorer","internetExplorerVersion","isEdge","edgeVersion","isFirefox","firefoxVersion","isWindows","appVersion","isIPadOrIOS","platform","hardwareConcurrency","supportsPointerEvents","PointerEvent","pointerEnabled","supportsImageRenderingPixelated","supportsWebP","imageRenderingValue","typedArrayTypes","supportsBasis","scene","supportsWebAssembly","context","supportsTypedArrays","supportsBigInt64Array","supportsBigUint64Array","supportsBigInt","BigInt","supportsWebWorkers","Worker","WebAssembly","supportsWebgl2","webgl2","supportsEsmWebWorkers","$cd53d4b312c9644c$var$Quaternion","$cd53d4b312c9644c$var$fromAxisAngleScratch","fromAxisAngle","axis","halfAngle","$cd53d4b312c9644c$var$fromRotationMatrixNext","$cd53d4b312c9644c$var$fromRotationMatrixQuat","fromRotationMatrix","trace","next","quat","$cd53d4b312c9644c$var$scratchHPRQuaternion","$cd53d4b312c9644c$var$scratchHeadingQuaternion","$cd53d4b312c9644c$var$scratchPitchQuaternion","$cd53d4b312c9644c$var$scratchRollQuaternion","$cd53d4b312c9644c$var$sampledQuaternionAxis","$cd53d4b312c9644c$var$sampledQuaternionRotation","$cd53d4b312c9644c$var$sampledQuaternionTempQuaternion","$cd53d4b312c9644c$var$sampledQuaternionQuaternion0","$cd53d4b312c9644c$var$sampledQuaternionQuaternion0Conjugate","packedInterpolationLength","convertPackedArrayForInterpolation","packedArray","conjugate","computeAxis","computeAngle","unpackInterpolationResult","sourceArray","inverseMagnitude","leftX","leftY","leftZ","leftW","rightX","rightY","rightZ","rightW","EPSILON6","acos","$cd53d4b312c9644c$var$lerpScratch","$cd53d4b312c9644c$var$slerpEndNegated","$cd53d4b312c9644c$var$slerpScaledP","$cd53d4b312c9644c$var$slerpScaledR","slerp","theta","acosClamped","thetaOverSinTheta","exp","sinThetaOverTheta","$cd53d4b312c9644c$var$squadScratchCartesian0","$cd53d4b312c9644c$var$squadScratchCartesian1","$cd53d4b312c9644c$var$squadScratchQuaternion0","$cd53d4b312c9644c$var$squadScratchQuaternion1","computeInnerQuadrangle","q0","qInv","cart0","cart1","squad","s0","s1","slerp0","slerp1","$cd53d4b312c9644c$var$fastSlerpScratchQuaternion","$cd53d4b312c9644c$var$u","$cd53d4b312c9644c$var$v","$cd53d4b312c9644c$var$bT","$cd53d4b312c9644c$var$bD","$cd53d4b312c9644c$var$opmu","fastSlerp","xm1","sqrT","sqrD","cT","cD","fastSquad","$128fc127c88fc802$var$Transforms","$128fc127c88fc802$var$vectorProductLocalFrame","down","$128fc127c88fc802$var$degeneratePositionLocalFrame","$128fc127c88fc802$var$localFrameToFixedFrameCache","$128fc127c88fc802$var$scratchCalculateCartesian","$128fc127c88fc802$var$scratchFirstCartesian","$128fc127c88fc802$var$scratchSecondCartesian","$128fc127c88fc802$var$scratchThirdCartesian","localFrameToFixedFrameGenerator","firstAxis","secondAxis","resultat","thirdAxis","hashAxis","eastNorthUpToFixedFrame","northEastDownToFixedFrame","northUpEastToFixedFrame","northWestUpToFixedFrame","$128fc127c88fc802$var$scratchHPRQuaternion","$128fc127c88fc802$var$scratchScale","$128fc127c88fc802$var$scratchHPRMatrix4","headingPitchRollToFixedFrame","fixedFrameTransform","hprQuaternion","hprMatrix","$128fc127c88fc802$var$scratchENUMatrix4","$128fc127c88fc802$var$scratchHPRMatrix3","headingPitchRollQuaternion","transform","$128fc127c88fc802$var$noScale","$128fc127c88fc802$var$hprCenterScratch","$128fc127c88fc802$var$ffScratch","$128fc127c88fc802$var$hprTransformScratch","$128fc127c88fc802$var$hprRotationScratch","$128fc127c88fc802$var$hprQuaternionScratch","fixedFrameToHeadingPitchRoll","center","toFixedFrame","transformCopy","quaternionRotation","$128fc127c88fc802$var$twoPiOverSecondsInDay","$128fc127c88fc802$var$dateInUtc","computeIcrfToCentralBodyFixedMatrix","transformMatrix","computeIcrfToFixedMatrix","computeTemeToPseudoFixedMatrix","utcDayNumber","utcSecondsIntoDay","diffDays","gha","$128fc127c88fc802$var$gmstConstant0","$128fc127c88fc802$var$gmstConstant1","$128fc127c88fc802$var$gmstConstant2","$128fc127c88fc802$var$wgs84WRPrecessing","$128fc127c88fc802$var$rateCoef","cosGha","sinGha","iau2006XysData","earthOrientationParameters","preloadIcrfFixed","timeInterval","stop","fixedToIcrfMtx","computeFixedToIcrfMatrix","$128fc127c88fc802$var$scratchHpr","$128fc127c88fc802$var$scratchRotationMatrix","$128fc127c88fc802$var$dateScratch","computeMoonFixedToIcrfMatrix","secondsTT","e1","e2","e3","e4","e5","computeIcrfToMoonFixedMatrix","$128fc127c88fc802$var$xysScratch","$128fc127c88fc802$var$eopScratch","$128fc127c88fc802$var$rotation1Scratch","$128fc127c88fc802$var$rotation2Scratch","rotation1","rotation2","matrixQ","dateUt1day","fractionOfDay","dateUt1sec","era","daysSinceJ2000","earthRotation","pfToIcrf","cosxp","cosyp","sinxp","sinyp","ttt","sp","cossp","sinsp","fToPfMtx","$128fc127c88fc802$var$pointToWindowCoordinatesTemp","pointToWindowCoordinates","modelViewProjectionMatrix","viewportTransformation","point","pointToGLWindowCoordinates","fromCartesian4","$128fc127c88fc802$var$normalScratch","$128fc127c88fc802$var$rightScratch","$128fc127c88fc802$var$upScratch","rotationMatrixFromPositionVelocity","velocity","normal","$128fc127c88fc802$var$swizzleMatrix","$128fc127c88fc802$var$scratchCartographic","$128fc127c88fc802$var$scratchCartesian3Projection","$128fc127c88fc802$var$scratchCenter","$128fc127c88fc802$var$scratchRotation","$128fc127c88fc802$var$scratchFromENU","$128fc127c88fc802$var$scratchToENU","basisTo2D","projection","projectedPosition","rtcCenter","project","fromENU","toENU","local","ellipsoidTo2DModelMatrix","$0ad68ca5cf1aea2c$var$vectorScratch","$0ad68ca5cf1aea2c$var$windowPositionScratch","$0ad68ca5cf1aea2c$var$clickLocationScratch","$0ad68ca5cf1aea2c$var$centerScratch","$0ad68ca5cf1aea2c$var$oldTransformScratch","$0ad68ca5cf1aea2c$var$newTransformScratch","$0ad68ca5cf1aea2c$var$pickRayScratch","$0ad68ca5cf1aea2c$var$outerRingSvg","svg","$0ad68ca5cf1aea2c$var$innerRingSvg","$0ad68ca5cf1aea2c$var$rotationMarkerSvg","$0ad68ca5cf1aea2c$var$CesiumCompass","LitElement","clock","ready","orbitCursorAngle","orbitCursorOpacity","resetSpeed","styles","css","rotateClick","unlistenFromPostRender","unlistenFromClockTick","handleRotatePointerMoveFunction","handleRotatePointerMove","bind","handleRotatePointerUpFunction","handleRotatePointerUp","handleOrbitPointerMoveFunction","handleOrbitPointerMove","handleOrbitPointerUpFunction","handleOrbitPointerUp","handleOrbitTickFunction","handleOrbitTick","updated","postRender","outerRingStyle","rotationMarkerStyle","opacity","disconnectedCallback","handlePointerDown","compassElement","currentTarget","compassRectangle","getBoundingClientRect","compassCenter","clientX","clientY","distanceFromCenter","clientWidth","clientHeight","ray","getPickRay","viewCenter","globe","pick","frame","positionWC","distanceFraction","$0ad68ca5cf1aea2c$var$nominalGyroRadius","orbit","rotate","stopPropagation","preventDefault","cursorVector","rotateInitialCursorAngle","oldTransform","lookAtTransform","rotateInitialCameraAngle","moveUpIfTooCloseToTerrain","angleDifference","newCameraAngle","zeroToTwoPi","currentCameraAngle","rotateRight","resetToNorth","negativePiToPi","PI_OVER_TWO","duration","prevProgress","performance","step","elapsed","progress","rotateLeft","requestAnimationFrame","orbitIsLook","orbitLastTimestamp","onTick","updateAngleAndOpacity","timestamp","deltaT","look","rotateUp","distanceToTerrain","getHeight","positionCartographic","controller","screenSpaceCameraController","enableCollisionDetection","distanceDiff","minimumZoomDistance","moveUp","compassWidth","html","customElements","important","importantFlag","styleMap","directive","Directive","partInfo","super","PartType","ATTRIBUTE","styleInfo","prop","this","_previousStyleProperties","isImportant","CHILD","PROPERTY","BOOLEAN_ATTRIBUTE","EVENT","ELEMENT","_partInfo","_$isConnected","_$parent","_$initialize","attributeIndex","__part","__attributeIndex","_$resolve","props"],"version":3,"file":"cesium-compass.007a20e1.js.map"} \ No newline at end of file diff --git a/cesium-compass.007a20e1.js b/cesium-compass.f610fb3a.js similarity index 99% rename from cesium-compass.007a20e1.js rename to cesium-compass.f610fb3a.js index 43a703a..69b18ac 100644 --- a/cesium-compass.007a20e1.js +++ b/cesium-compass.f610fb3a.js @@ -9,6 +9,10 @@ ${this.stack.toString()}`),e},eT.packedLength=16,eT.pack=function(e,t,r){return( (${this[1]}, ${this[5]}, ${this[9]}, ${this[13]}) (${this[2]}, ${this[6]}, ${this[10]}, ${this[14]}) (${this[3]}, ${this[7]}, ${this[11]}, ${this[15]})`};var eH=z("9btZb"),D=z("kWQjc"),F=z("bXwZF"),L=z("3pzcG"),B=z("8w8ZH"),$=z("jQJji"),H=z("1vHsR"),L=z("3pzcG"),eW=function(e,t,r){let n,a;(0,L.default).defined("array",e),(0,L.default).defined("itemToFind",t),(0,L.default).defined("comparator",r);let o=0,i=e.length-1;for(;o<=i;){if((a=r(e[n=~~((o+i)/2)],t))<0){o=n+1;continue}if(a>0){i=n-1;continue}return n}return~(i+1)},L=z("3pzcG"),B=z("8w8ZH"),$=z("jQJji"),eZ=function(e,t,r,n,a){this.xPoleWander=e,this.yPoleWander=t,this.xPoleOffset=r,this.yPoleOffset=n,this.ut1MinusUtc=a},B=z("8w8ZH"),$=z("jQJji"),H=z("1vHsR"),L=z("3pzcG"),B=z("8w8ZH"),H=(z("1vHsR"),z("1vHsR")),eJ=function(e){if(null===e||isNaN(e))throw new H.default("year is required and must be a number.");return e%4==0&&e%100!=0||e%400==0};const eY=[31,28,31,30,31,30,31,31,30,31,30,31];var eV=function(e,t,r,n,a,o,i,u){e=(0,B.default)(e,1),t=(0,B.default)(t,1),r=(0,B.default)(r,1),n=(0,B.default)(n,0),a=(0,B.default)(a,0),o=(0,B.default)(o,0),i=(0,B.default)(i,0),u=(0,B.default)(u,!1),(0,L.default).typeOf.number.greaterThanOrEquals("Year",e,1),(0,L.default).typeOf.number.lessThanOrEquals("Year",e,9999),(0,L.default).typeOf.number.greaterThanOrEquals("Month",t,1),(0,L.default).typeOf.number.lessThanOrEquals("Month",t,12),(0,L.default).typeOf.number.greaterThanOrEquals("Day",r,1),(0,L.default).typeOf.number.lessThanOrEquals("Day",r,31),(0,L.default).typeOf.number.greaterThanOrEquals("Hour",n,0),(0,L.default).typeOf.number.lessThanOrEquals("Hour",n,23),(0,L.default).typeOf.number.greaterThanOrEquals("Minute",a,0),(0,L.default).typeOf.number.lessThanOrEquals("Minute",a,59),(0,L.default).typeOf.bool("IsLeapSecond",u),(0,L.default).typeOf.number.greaterThanOrEquals("Second",o,0),(0,L.default).typeOf.number.lessThanOrEquals("Second",o,u?60:59),(0,L.default).typeOf.number.greaterThanOrEquals("Millisecond",i,0),(0,L.default).typeOf.number.lessThan("Millisecond",i,1e3),function(){let n=2===t&&eJ(e)?eY[t-1]+1:eY[t-1];if(r>n)throw new H.default("Month and Day represents invalid date")}(),this.year=e,this.month=t,this.day=r,this.hour=n,this.minute=a,this.second=o,this.millisecond=i,this.isLeapSecond=u},eX=function(e,t){this.julianDate=e,this.offset=t},eG=Object.freeze({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}),eK=Object.freeze({UTC:0,TAI:1});const e0=new eV,e1=[31,28,31,30,31,30,31,31,30,31,30,31];function e2(e,t){return ts.compare(e.julianDate,t.julianDate)}const e3=new eX;function e4(e){e3.julianDate=e;let t=ts.leapSeconds,r=eW(t,e3,e2);r<0&&(r=~r),r>=t.length&&(r=t.length-1);let n=t[r].offset;r>0&&ts.secondsDifference(t[r].julianDate,e)>n&&(n=t[--r].offset),ts.addSeconds(e,n,e)}function e5(e,t){e3.julianDate=e;let r=ts.leapSeconds,n=eW(r,e3,e2);if(n<0&&(n=~n),0===n)return ts.addSeconds(e,-r[0].offset,t);if(n>=r.length)return ts.addSeconds(e,-r[n-1].offset,t);let a=ts.secondsDifference(r[n].julianDate,e);return 0===a?ts.addSeconds(e,-r[n].offset,t):a<=1?void 0:ts.addSeconds(e,-r[--n].offset,t)}function e6(e,t,r){let n=t/eG.SECONDS_PER_DAY|0;return e+=n,(t-=eG.SECONDS_PER_DAY*n)<0&&(e--,t+=eG.SECONDS_PER_DAY),r.dayNumber=e,r.secondsOfDay=t,r}function e8(e,t,r,n,a,o,i){let u=(t-14)/12|0,s=e+4800+u,l=(1461*s/4|0)+(367*(t-2-12*u)/12|0)-(3*((s+100)/100|0)/4|0)+r-32075;(n-=12)<0&&(n+=24);let f=o+(n*eG.SECONDS_PER_HOUR+a*eG.SECONDS_PER_MINUTE+i*eG.SECONDS_PER_MILLISECOND);return f>=43200&&(l-=1),[l,f]}const e7=/^(\d{4})$/,e9=/^(\d{4})-(\d{2})$/,te=/^(\d{4})-?(\d{3})$/,tt=/^(\d{4})-?W(\d{2})-?(\d{1})?$/,tr=/^(\d{4})-?(\d{2})-?(\d{2})$/,tn=/([Z+\-])?(\d{2})?:?(\d{2})?$/,ta=/^(\d{2})(\.\d+)?/.source+tn.source,to=/^(\d{2}):?(\d{2})(\.\d+)?/.source+tn.source,ti=/^(\d{2}):?(\d{2}):?(\d{2})(\.\d+)?/.source+tn.source,tu="Invalid ISO 8601 date.";function ts(e,t,r){this.dayNumber=void 0,this.secondsOfDay=void 0,e=(0,B.default)(e,0),t=(0,B.default)(t,0),r=(0,B.default)(r,eK.UTC);let n=0|e;t+=(e-n)*eG.SECONDS_PER_DAY,e6(n,t,this),r===eK.UTC&&e4(this)}ts.fromGregorianDate=function(e,t){if(!(e instanceof eV))throw new H.default("date must be a valid GregorianDate.");let r=e8(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond);return(0,$.default)(t)?(e6(r[0],r[1],t),e4(t),t):new ts(r[0],r[1],eK.UTC)},ts.fromDate=function(e,t){if(!(e instanceof Date)||isNaN(e.getTime()))throw new H.default("date must be a valid JavaScript Date.");let r=e8(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds());return(0,$.default)(t)?(e6(r[0],r[1],t),e4(t),t):new ts(r[0],r[1],eK.UTC)},ts.fromIso8601=function(e,t){let r,n,a,o,i;if("string"!=typeof e)throw new H.default(tu);let u=(e=e.replace(",",".")).split("T"),s=1,l=1,f=0,d=0,c=0,p=0,h=u[0],m=u[1];if(!(0,$.default)(h))throw new H.default(tu);if(null!==(u=h.match(tr))){if((o=h.split("-").length-1)>0&&2!==o)throw new H.default(tu);r=+u[1],s=+u[2],l=+u[3]}else if(null!==(u=h.match(e9)))r=+u[1],s=+u[2];else if(null!==(u=h.match(e7)))r=+u[1];else{let e;if(null!==(u=h.match(te))){if(r=+u[1],e=+u[2],a=eJ(r),e<1||a&&e>366||!a&&e>365)throw new H.default(tu)}else if(null!==(u=h.match(tt))){r=+u[1];let t=+u[2],n=+u[3]||0;if((o=h.split("-").length-1)>0&&(!(0,$.default)(u[3])&&1!==o||(0,$.default)(u[3])&&2!==o))throw new H.default(tu);e=7*t+n-new Date(Date.UTC(r,0,4)).getUTCDay()-3}else throw new H.default(tu);(n=new Date(Date.UTC(r,0,1))).setUTCDate(e),s=n.getUTCMonth()+1,l=n.getUTCDate()}if(a=eJ(r),s<1||s>12||l<1||(2!==s||!a)&&l>e1[s-1]||a&&2===s&&l>29)throw new H.default(tu);if((0,$.default)(m)){if(null!==(u=m.match(ti))){if((o=m.split(":").length-1)>0&&2!==o&&3!==o)throw new H.default(tu);f=+u[1],d=+u[2],c=+u[3],p=1e3*+(u[4]||0),i=5}else if(null!==(u=m.match(to))){if((o=m.split(":").length-1)>2)throw new H.default(tu);f=+u[1],d=+u[2],c=60*+(u[3]||0),i=4}else if(null!==(u=m.match(ta)))f=+u[1],d=60*+(u[2]||0),i=3;else throw new H.default(tu);if(d>=60||c>=61||f>24||24===f&&(d>0||c>0||p>0))throw new H.default(tu);let e=u[i],t=+u[i+1],n=+(u[i+2]||0);switch(e){case"+":f-=t,d-=n;break;case"-":f+=t,d+=n;break;case"Z":break;default:d+=new Date(Date.UTC(r,s-1,l,f,d)).getTimezoneOffset()}}let y=60===c;for(y&&c--;d>=60;)d-=60,f++;for(;f>=24;)f-=24,l++;for(n=a&&2===s?29:e1[s-1];l>n;)l-=n,++s>12&&(s-=12,r++),n=a&&2===s?29:e1[s-1];for(;d<0;)d+=60,f--;for(;f<0;)f+=24,l--;for(;l<1;)--s<1&&(s+=12,r--),l+=n=a&&2===s?29:e1[s-1];let g=e8(r,s,l,f,d,c,p);return(0,$.default)(t)?(e6(g[0],g[1],t),e4(t)):t=new ts(g[0],g[1],eK.UTC),y&&ts.addSeconds(t,1,t),t},ts.now=function(e){return ts.fromDate(new Date,e)};const tl=new ts(0,0,eK.TAI);ts.toGregorianDate=function(e,t){if(!(0,$.default)(e))throw new H.default("julianDate is required.");let r=!1,n=e5(e,tl);(0,$.default)(n)||(ts.addSeconds(e,-1,tl),n=e5(tl,tl),r=!0);let a=n.dayNumber,o=n.secondsOfDay;o>=43200&&(a+=1);let i=a+68569|0,u=4*i/146097|0,s=4e3*((i=i-((146097*u+3)/4|0)|0)+1)/1461001|0,l=80*(i=i-(1461*s/4|0)+31|0)/2447|0,f=i-(2447*l/80|0)|0;i=l/11|0;let d=l+2-12*i|0,c=100*(u-49)+s+i|0,p=o/eG.SECONDS_PER_HOUR|0,h=o-p*eG.SECONDS_PER_HOUR,m=h/eG.SECONDS_PER_MINUTE|0,y=0|(h-=m*eG.SECONDS_PER_MINUTE),g=(h-y)/eG.SECONDS_PER_MILLISECOND;return((p+=12)>23&&(p-=24),r&&(y+=1),(0,$.default)(t))?(t.year=c,t.month=d,t.day=f,t.hour=p,t.minute=m,t.second=y,t.millisecond=g,t.isLeapSecond=r,t):new eV(c,d,f,p,m,y,g,r)},ts.toDate=function(e){if(!(0,$.default)(e))throw new H.default("julianDate is required.");let t=ts.toGregorianDate(e,e0),r=t.second;return t.isLeapSecond&&(r-=1),new Date(Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,r,t.millisecond))},ts.toIso8601=function(e,t){let r;if(!(0,$.default)(e))throw new H.default("julianDate is required.");let n=ts.toGregorianDate(e,e0),a=n.year,o=n.month,i=n.day,u=n.hour,s=n.minute,l=n.second,f=n.millisecond;return(1e4===a&&1===o&&1===i&&0===u&&0===s&&0===l&&0===f&&(a=9999,o=12,i=31,u=24),(0,$.default)(t)||0===f)?(0,$.default)(t)&&0!==t?(r=(.01*f).toFixed(t).replace(".","").slice(0,t),`${a.toString().padStart(4,"0")}-${o.toString().padStart(2,"0")}-${i.toString().padStart(2,"0")}T${u.toString().padStart(2,"0")}:${s.toString().padStart(2,"0")}:${l.toString().padStart(2,"0")}.${r}Z`):`${a.toString().padStart(4,"0")}-${o.toString().padStart(2,"0")}-${i.toString().padStart(2,"0")}T${u.toString().padStart(2,"0")}:${s.toString().padStart(2,"0")}:${l.toString().padStart(2,"0")}Z`:(r=(.01*f).toString().replace(".",""),`${a.toString().padStart(4,"0")}-${o.toString().padStart(2,"0")}-${i.toString().padStart(2,"0")}T${u.toString().padStart(2,"0")}:${s.toString().padStart(2,"0")}:${l.toString().padStart(2,"0")}.${r}Z`)},ts.clone=function(e,t){if((0,$.default)(e))return(0,$.default)(t)?(t.dayNumber=e.dayNumber,t.secondsOfDay=e.secondsOfDay,t):new ts(e.dayNumber,e.secondsOfDay,eK.TAI)},ts.compare=function(e,t){if(!(0,$.default)(e))throw new H.default("left is required.");if(!(0,$.default)(t))throw new H.default("right is required.");let r=e.dayNumber-t.dayNumber;return 0!==r?r:e.secondsOfDay-t.secondsOfDay},ts.equals=function(e,t){return e===t||(0,$.default)(e)&&(0,$.default)(t)&&e.dayNumber===t.dayNumber&&e.secondsOfDay===t.secondsOfDay},ts.equalsEpsilon=function(e,t,r){return r=(0,B.default)(r,0),e===t||(0,$.default)(e)&&(0,$.default)(t)&&Math.abs(ts.secondsDifference(e,t))<=r},ts.totalDays=function(e){if(!(0,$.default)(e))throw new H.default("julianDate is required.");return e.dayNumber+e.secondsOfDay/eG.SECONDS_PER_DAY},ts.secondsDifference=function(e,t){if(!(0,$.default)(e))throw new H.default("left is required.");if(!(0,$.default)(t))throw new H.default("right is required.");return(e.dayNumber-t.dayNumber)*eG.SECONDS_PER_DAY+(e.secondsOfDay-t.secondsOfDay)},ts.daysDifference=function(e,t){if(!(0,$.default)(e))throw new H.default("left is required.");if(!(0,$.default)(t))throw new H.default("right is required.");return e.dayNumber-t.dayNumber+(e.secondsOfDay-t.secondsOfDay)/eG.SECONDS_PER_DAY},ts.computeTaiMinusUtc=function(e){e3.julianDate=e;let t=ts.leapSeconds,r=eW(t,e3,e2);return r<0&&(r=~r,--r<0&&(r=0)),t[r].offset},ts.addSeconds=function(e,t,r){if(!(0,$.default)(e))throw new H.default("julianDate is required.");if(!(0,$.default)(t))throw new H.default("seconds is required.");if(!(0,$.default)(r))throw new H.default("result is required.");return e6(e.dayNumber,e.secondsOfDay+t,r)},ts.addMinutes=function(e,t,r){if(!(0,$.default)(e))throw new H.default("julianDate is required.");if(!(0,$.default)(t))throw new H.default("minutes is required.");if(!(0,$.default)(r))throw new H.default("result is required.");let n=e.secondsOfDay+t*eG.SECONDS_PER_MINUTE;return e6(e.dayNumber,n,r)},ts.addHours=function(e,t,r){if(!(0,$.default)(e))throw new H.default("julianDate is required.");if(!(0,$.default)(t))throw new H.default("hours is required.");if(!(0,$.default)(r))throw new H.default("result is required.");let n=e.secondsOfDay+t*eG.SECONDS_PER_HOUR;return e6(e.dayNumber,n,r)},ts.addDays=function(e,t,r){if(!(0,$.default)(e))throw new H.default("julianDate is required.");if(!(0,$.default)(t))throw new H.default("days is required.");if(!(0,$.default)(r))throw new H.default("result is required.");return e6(e.dayNumber+t,e.secondsOfDay,r)},ts.lessThan=function(e,t){return 0>ts.compare(e,t)},ts.lessThanOrEquals=function(e,t){return 0>=ts.compare(e,t)},ts.greaterThan=function(e,t){return ts.compare(e,t)>0},ts.greaterThanOrEquals=function(e,t){return ts.compare(e,t)>=0},ts.prototype.clone=function(e){return ts.clone(this,e)},ts.prototype.equals=function(e){return ts.equals(this,e)},ts.prototype.equalsEpsilon=function(e,t){return ts.equalsEpsilon(this,e,t)},ts.prototype.toString=function(){return ts.toIso8601(this)},ts.leapSeconds=[new eX(new ts(2441317,43210,eK.TAI),10),new eX(new ts(2441499,43211,eK.TAI),11),new eX(new ts(2441683,43212,eK.TAI),12),new eX(new ts(2442048,43213,eK.TAI),13),new eX(new ts(2442413,43214,eK.TAI),14),new eX(new ts(2442778,43215,eK.TAI),15),new eX(new ts(2443144,43216,eK.TAI),16),new eX(new ts(2443509,43217,eK.TAI),17),new eX(new ts(2443874,43218,eK.TAI),18),new eX(new ts(2444239,43219,eK.TAI),19),new eX(new ts(2444786,43220,eK.TAI),20),new eX(new ts(2445151,43221,eK.TAI),21),new eX(new ts(2445516,43222,eK.TAI),22),new eX(new ts(2446247,43223,eK.TAI),23),new eX(new ts(2447161,43224,eK.TAI),24),new eX(new ts(2447892,43225,eK.TAI),25),new eX(new ts(2448257,43226,eK.TAI),26),new eX(new ts(2448804,43227,eK.TAI),27),new eX(new ts(2449169,43228,eK.TAI),28),new eX(new ts(2449534,43229,eK.TAI),29),new eX(new ts(2450083,43230,eK.TAI),30),new eX(new ts(2450630,43231,eK.TAI),31),new eX(new ts(2451179,43232,eK.TAI),32),new eX(new ts(2453736,43233,eK.TAI),33),new eX(new ts(2454832,43234,eK.TAI),34),new eX(new ts(2456109,43235,eK.TAI),35),new eX(new ts(2457204,43236,eK.TAI),36),new eX(new ts(2457754,43237,eK.TAI),37)];var tf={};j=tf,A=function(e,t,r,n){var a,o=n&&n.URI;function i(e,t){var r=arguments.length>=1,n=arguments.length>=2;if(!(this instanceof i))return r?n?new i(e,t):new i(e):new i;if(void 0===e){if(r)throw TypeError("undefined is not a valid argument for URI");"undefined"!=typeof location?e=location.href+"":e=""}if(null===e&&r)throw TypeError("null is not a valid argument for URI");return(this.href(e),void 0!==t)?this.absoluteTo(t):this}i.version="1.19.11";var u=i.prototype,s=Object.prototype.hasOwnProperty;function l(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function f(e){return void 0===e?"Undefined":String(Object.prototype.toString.call(e)).slice(8,-1)}function d(e){return"Array"===f(e)}function c(e,t){var r,n,a={};if("RegExp"===f(t))a=null;else if(d(t))for(r=0,n=t.length;r]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/ig,i.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},i.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,i.ascii_tab_whitespace=/[\u0009\u000A\u000D]+/g,i.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},i.hostProtocols=["http","https"],i.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,i.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},i.getDomAttribute=function(e){if(e&&e.nodeName){var t=e.nodeName.toLowerCase();if("input"!==t||"image"===e.type)return i.domAttributes[t]}},i.encode=g,i.decode=decodeURIComponent,i.iso8859=function(){i.encode=escape,i.decode=unescape},i.unicode=function(){i.encode=g,i.decode=decodeURIComponent},i.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/ig,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/ig,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/ig,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},i.encodeQuery=function(e,t){var r=i.encode(e+"");return void 0===t&&(t=i.escapeQuerySpace),t?r.replace(/%20/g,"+"):r},i.decodeQuery=function(e,t){e+="",void 0===t&&(t=i.escapeQuerySpace);try{return i.decode(t?e.replace(/\+/g,"%20"):e)}catch(t){return e}};var b={encode:"encode",decode:"decode"},w=function(e,t){return function(r){try{return i[t](r+"").replace(i.characters[e][t].expression,function(r){return i.characters[e][t].map[r]})}catch(e){return r}}};for(a in b)i[a+"PathSegment"]=w("pathname",b[a]),i[a+"UrnPathSegment"]=w("urnpath",b[a]);var O=function(e,t,r){return function(n){a=r?function(e){return i[t](i[r](e))}:i[t];for(var a,o=(n+"").split(e),u=0,s=o.length;u-1&&(t.fragment=e.substring(r+1)||null,e=e.substring(0,r)),(r=e.indexOf("?"))>-1&&(t.query=e.substring(r+1)||null,e=e.substring(0,r)),"//"===(e=(e=e.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://")).replace(/^[/\\]{2,}/i,"//")).substring(0,2)?(t.protocol=null,e=e.substring(2),e=i.parseAuthority(e,t)):(r=e.indexOf(":"))>-1&&(t.protocol=e.substring(0,r)||null,t.protocol&&!t.protocol.match(i.protocol_expression)?t.protocol=void 0:"//"===e.substring(r+1,r+3).replace(/\\/g,"/")?(e=e.substring(r+3),e=i.parseAuthority(e,t)):(e=e.substring(r+1),t.urn=!0)),t.path=e,t},i.parseHost=function(e,t){e||(e="");var r,n,a=(e=e.replace(/\\/g,"/")).indexOf("/");if(-1===a&&(a=e.length),"["===e.charAt(0))r=e.indexOf("]"),t.hostname=e.substring(1,r)||null,t.port=e.substring(r+2,a)||null,"/"===t.port&&(t.port=null);else{var o=e.indexOf(":"),u=e.indexOf("/"),s=e.indexOf(":",o+1);-1!==s&&(-1===u||s-1?a:e.length-1);return o>-1&&(-1===a||o-1?p.slice(0,h)+p.slice(h).replace(o,""):p.replace(o,"")).length<=l[0].length||r.ignore&&r.ignore.test(p))){c=f+p.length;var y=t(p,f,c,e);if(void 0===y){n.lastIndex=c;continue}y=String(y),e=e.slice(0,f)+y+e.slice(c),n.lastIndex=f+y.length}}return n.lastIndex=0,e},i.ensureValidHostname=function(t,r){var n=!!t,a=!1;if(r&&(a=p(i.hostProtocols,r)),a&&!n)throw TypeError("Hostname cannot be empty, if protocol is "+r);if(t&&t.match(i.invalid_hostname_characters)){if(!e)throw TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(e.toASCII(t).match(i.invalid_hostname_characters))throw TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-:_]')}},i.ensureValidPort=function(e){if(e){var t=Number(e);if(!/^[0-9]+$/.test(t)||!(t>0)||!(t<65536))throw TypeError('Port "'+e+'" is not a valid port')}},i.noConflict=function(e){if(e){var t={URI:this.noConflict()};return n.URITemplate&&"function"==typeof n.URITemplate.noConflict&&(t.URITemplate=n.URITemplate.noConflict()),n.IPv6&&"function"==typeof n.IPv6.noConflict&&(t.IPv6=n.IPv6.noConflict()),n.SecondLevelDomains&&"function"==typeof n.SecondLevelDomains.noConflict&&(t.SecondLevelDomains=n.SecondLevelDomains.noConflict()),t}return n.URI===this&&(n.URI=o),this},u.build=function(e){return!0===e?this._deferred_build=!0:(void 0===e||this._deferred_build)&&(this._string=i.build(this._parts),this._deferred_build=!1),this},u.clone=function(){return new i(this)},u.valueOf=u.toString=function(){return this.build(!1)._string},u.protocol=v("protocol"),u.username=v("username"),u.password=v("password"),u.hostname=v("hostname"),u.port=v("port"),u.query=x("query","?"),u.fragment=x("fragment","#"),u.search=function(e,t){var r=this.query(e,t);return"string"==typeof r&&r.length?"?"+r:r},u.hash=function(e,t){var r=this.fragment(e,t);return"string"==typeof r&&r.length?"#"+r:r},u.pathname=function(e,t){if(void 0!==e&&!0!==e)return this._parts.urn?this._parts.path=e?i.recodeUrnPath(e):"":this._parts.path=e?i.recodePath(e):"/",this.build(!t),this;var r=this._parts.path||(this._parts.hostname?"/":"");return e?(this._parts.urn?i.decodeUrnPath:i.decodePath)(r):r},u.path=u.pathname,u.href=function(e,t){if(void 0===e)return this.toString();this._string="",this._parts=i._parts();var r,n=e instanceof i,a="object"==typeof e&&(e.hostname||e.path||e.pathname);if(e.nodeName){var o=i.getDomAttribute(e);e=e[o]||"",a=!1}if(!n&&a&&void 0!==e.pathname&&(e=e.toString()),"string"==typeof e||e instanceof String)this._parts=i.parse(String(e),this._parts);else if(n||a){var u=n?e._parts:e;for(r in u)"query"!==r&&s.call(this._parts,r)&&(this._parts[r]=u[r]);u.query&&this.query(u.query,!1)}else throw TypeError("invalid input");return this.build(!t),this},u.is=function(e){var t=!1,n=!1,a=!1,o=!1,u=!1,s=!1,l=!1,f=!this._parts.urn;switch(this._parts.hostname&&(f=!1,n=i.ip4_expression.test(this._parts.hostname),a=i.ip6_expression.test(this._parts.hostname),u=(o=!(t=n||a))&&r&&r.has(this._parts.hostname),s=o&&i.idn_expression.test(this._parts.hostname),l=o&&i.punycode_expression.test(this._parts.hostname)),e.toLowerCase()){case"relative":return f;case"absolute":return!f;case"domain":case"name":return o;case"sld":return u;case"ip":return t;case"ip4":case"ipv4":case"inet4":return n;case"ip6":case"ipv6":case"inet6":return a;case"idn":return s;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return l}return null};var _=u.protocol,S=u.port,j=u.hostname;u.protocol=function(e,t){if(e&&!(e=e.replace(/:(\/\/)?$/,"")).match(i.protocol_expression))throw TypeError('Protocol "'+e+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return _.call(this,e,t)},u.scheme=u.protocol,u.port=function(e,t){return this._parts.urn?void 0===e?"":this:(void 0!==e&&(0===e&&(e=null),e&&(":"===(e+="").charAt(0)&&(e=e.substring(1)),i.ensureValidPort(e))),S.call(this,e,t))},u.hostname=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0!==e){var r={preventInvalidHostname:this._parts.preventInvalidHostname};if("/"!==i.parseHost(e,r))throw TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');e=r.hostname,this._parts.preventInvalidHostname&&i.ensureValidHostname(e,this._parts.protocol)}return j.call(this,e,t)},u.origin=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){var r=this.protocol();return this.authority()?(r?r+"://":"")+this.authority():""}var n=i(e);return this.protocol(n.protocol()).authority(n.authority()).build(!t),this},u.host=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?i.buildHost(this._parts):"";if("/"!==i.parseHost(e,this._parts))throw TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');return this.build(!t),this},u.authority=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?i.buildAuthority(this._parts):"";if("/"!==i.parseAuthority(e,this._parts))throw TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');return this.build(!t),this},u.userinfo=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0!==e)return"@"!==e[e.length-1]&&(e+="@"),i.parseUserinfo(e,this._parts),this.build(!t),this;var r=i.buildUserinfo(this._parts);return r?r.substring(0,r.length-1):r},u.resource=function(e,t){var r;return void 0===e?this.path()+this.search()+this.hash():(r=i.parse(e),this._parts.path=r.path,this._parts.query=r.query,this._parts.fragment=r.fragment,this.build(!t),this)},u.subdomain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,r)||""}var n=this._parts.hostname.length-this.domain().length,a=RegExp("^"+l(this._parts.hostname.substring(0,n)));if(e&&"."!==e.charAt(e.length-1)&&(e+="."),-1!==e.indexOf(":"))throw TypeError("Domains cannot contain colons");return e&&i.ensureValidHostname(e,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(a,e),this.build(!t),this},u.domain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.match(/\./g);if(r&&r.length<2)return this._parts.hostname;var n=this._parts.hostname.length-this.tld(t).length-1;return n=this._parts.hostname.lastIndexOf(".",n-1)+1,this._parts.hostname.substring(n)||""}if(!e)throw TypeError("cannot set domain empty");if(-1!==e.indexOf(":"))throw TypeError("Domains cannot contain colons");if(i.ensureValidHostname(e,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=e;else{var a=RegExp(l(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(a,e)}return this.build(!t),this},u.tld=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var n,a=this._parts.hostname.lastIndexOf("."),o=this._parts.hostname.substring(a+1);return!0!==t&&r&&r.list[o.toLowerCase()]&&r.get(this._parts.hostname)||o}if(e){if(e.match(/[^a-zA-Z0-9-]/)){if(r&&r.is(e))n=RegExp(l(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(n,e);else throw TypeError('TLD "'+e+'" contains characters other than [A-Z0-9]')}else if(!this._parts.hostname||this.is("IP"))throw ReferenceError("cannot set TLD on non-domain host");else n=RegExp(l(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(n,e)}else throw TypeError("cannot set TLD empty");return this.build(!t),this},u.directory=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var r=this._parts.path.length-this.filename().length-1,n=this._parts.path.substring(0,r)||(this._parts.hostname?"/":"");return e?i.decodePath(n):n}var a=this._parts.path.length-this.filename().length,o=RegExp("^"+l(this._parts.path.substring(0,a)));return this.is("relative")||(e||(e="/"),"/"===e.charAt(0)||(e="/"+e)),e&&"/"!==e.charAt(e.length-1)&&(e+="/"),e=i.recodePath(e),this._parts.path=this._parts.path.replace(o,e),this.build(!t),this},u.filename=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("string"!=typeof e){if(!this._parts.path||"/"===this._parts.path)return"";var r=this._parts.path.lastIndexOf("/"),n=this._parts.path.substring(r+1);return e?i.decodePathSegment(n):n}var a=!1;"/"===e.charAt(0)&&(e=e.substring(1)),e.match(/\.?\//)&&(a=!0);var o=RegExp(l(this.filename())+"$");return e=i.recodePath(e),this._parts.path=this._parts.path.replace(o,e),a?this.normalizePath(t):this.build(!t),this},u.suffix=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path||"/"===this._parts.path)return"";var r,n,a=this.filename(),o=a.lastIndexOf(".");return -1===o?"":(r=a.substring(o+1),n=/^[a-z0-9%]+$/i.test(r)?r:"",e?i.decodePathSegment(n):n)}"."===e.charAt(0)&&(e=e.substring(1));var u,s=this.suffix();if(s)u=e?RegExp(l(s)+"$"):RegExp(l("."+s)+"$");else{if(!e)return this;this._parts.path+="."+i.recodePath(e)}return u&&(e=i.recodePath(e),this._parts.path=this._parts.path.replace(u,e)),this.build(!t),this},u.segment=function(e,t,r){var n=this._parts.urn?":":"/",a=this.path(),o="/"===a.substring(0,1),i=a.split(n);if(void 0!==e&&"number"!=typeof e&&(r=t,t=e,e=void 0),void 0!==e&&"number"!=typeof e)throw Error('Bad segment "'+e+'", must be 0-based integer');if(o&&i.shift(),e<0&&(e=Math.max(i.length+e,0)),void 0===t)return void 0===e?i:i[e];if(null===e||void 0===i[e]){if(d(t)){i=[];for(var u=0,s=t.length;u{window.crossOriginIsolated&&t.setAttribute("crossorigin","anonymous");let n=document.getElementsByTagName("head")[0];t.onload=function(){t.onload=void 0,n.removeChild(t),e()},t.onerror=function(e){r(e)},n.appendChild(t)})},Q=z("AXvpI"),$=z("jQJji"),H=z("1vHsR"),tj=function(e){if(!(0,$.default)(e))throw new H.default("obj is required.");let t="";for(let r in e)if(e.hasOwnProperty(r)){let n=e[r],a=`${encodeURIComponent(r)}=`;if(Array.isArray(n))for(let e=0,r=n.length;e0){let e=n.substring(0,a),r=n.substring(a+2);t[e]=r}}return t};function tz(e,t,r){this.statusCode=e,this.response=t,this.responseHeaders=r,"string"==typeof this.responseHeaders&&(this.responseHeaders=tT(this.responseHeaders))}tz.prototype.toString=function(){let e="Request has failed.";return(0,$.default)(this.statusCode)&&(e+=` Status Code: ${this.statusCode}`),e};var L=z("3pzcG"),B=z("8w8ZH"),$=z("jQJji"),L=z("3pzcG"),$=z("jQJji");function tC(){this._listeners=[],this._scopes=[],this._toRemove=[],this._insideRaiseEvent=!1}function tI(e,t){return t-e}Object.defineProperties(tC.prototype,{numberOfListeners:{get:function(){return this._listeners.length-this._toRemove.length}}}),tC.prototype.addEventListener=function(e,t){(0,L.default).typeOf.func("listener",e),this._listeners.push(e),this._scopes.push(t);let r=this;return function(){r.removeEventListener(e,t)}},tC.prototype.removeEventListener=function(e,t){(0,L.default).typeOf.func("listener",e);let r=this._listeners,n=this._scopes,a=-1;for(let o=0;o0){for(a.sort(tI),e=0;er(n[u],n[e])?u:e,ir(n[i],n[a])&&(a=i),a!==e?(tM(n,a,e),e=a):o=!1}},tP.prototype.resort=function(){let e=this._length;for(let t=Math.ceil(e/2);t>=0;--t)this.heapify(t)},tP.prototype.insert=function(e){let t;(0,L.default).defined("element",e);let r=this._array,n=this._comparator,a=this._maximumLength,o=this._length++;for(on(r[o],r[e]))tM(r,o,e),o=e;else break}return(0,$.default)(a)&&this._length>a&&(t=r[a],this._length=a),t},tP.prototype.pop=function(e){if(e=(0,B.default)(e,0),0===this._length)return;(0,L.default).typeOf.number.lessThan("index",e,this._length);let t=this._array,r=t[e];return tM(t,e,--this._length),this.heapify(e),t[this._length]=void 0,r};const tU={numberOfAttemptedRequests:0,numberOfActiveRequests:0,numberOfCancelledRequests:0,numberOfCancelledActiveRequests:0,numberOfFailedRequests:0,numberOfActiveRequestsEver:0,lastNumberOfActiveRequests:0};let tk=20;const tN=new tP({comparator:function(e,t){return e.priority-t.priority}});tN.maximumLength=tk,tN.reserve(tk);const tD=[];let tF={};const tL="undefined"!=typeof document?new/*@__PURE__*/(R(tf))(document.location.href):new/*@__PURE__*/(R(tf)),tB=new tC;function t$(){}function tQ(e){(0,$.default)(e.priorityFunction)&&(e.priority=e.priorityFunction())}function tH(e){return e.state===tE.UNISSUED&&(e.state=tE.ISSUED,e.deferred=tp()),e.deferred.promise}function tW(e){let t=tH(e);return e.state=tE.ACTIVE,tD.push(e),++tU.numberOfActiveRequests,++tU.numberOfActiveRequestsEver,++tF[e.serverKey],e.requestFunction().then(function(t){if(e.state===tE.CANCELLED)return;let r=e.deferred;--tU.numberOfActiveRequests,--tF[e.serverKey],tB.raiseEvent(),e.state=tE.RECEIVED,e.deferred=void 0,r.resolve(t)}).catch(function(t){e.state!==tE.CANCELLED&&(++tU.numberOfFailedRequests,--tU.numberOfActiveRequests,--tF[e.serverKey],tB.raiseEvent(t),e.state=tE.FAILED,e.deferred.reject(t))}),t}function tZ(e){let t=e.state===tE.ACTIVE;if(e.state=tE.CANCELLED,++tU.numberOfCancelledRequests,(0,$.default)(e.deferred)){let t=e.deferred;e.deferred=void 0,t.reject()}t&&(--tU.numberOfActiveRequests,--tF[e.serverKey],++tU.numberOfCancelledActiveRequests),(0,$.default)(e.cancelFunction)&&e.cancelFunction()}t$.maximumRequests=50,t$.maximumRequestsPerServer=18,t$.requestsByServer={},t$.throttleRequests=!0,t$.debugShowStatistics=!1,t$.requestCompletedEvent=tB,Object.defineProperties(t$,{statistics:{get:function(){return tU}},priorityHeapLength:{get:function(){return tk},set:function(e){if(ee;)tZ(tN.pop());tk=e,tN.maximumLength=e,tN.reserve(e)}}}),t$.serverHasOpenSlots=function(e,t){t=(0,B.default)(t,1);let r=(0,B.default)(t$.requestsByServer[e],t$.maximumRequestsPerServer);return tF[e]+t<=r},t$.heapHasOpenSlots=function(e){return tN.length+e<=tk},t$.update=function(){let e,t;let r=0,n=tD.length;for(e=0;e0&&(tD[e-r]=t)}tD.length-=r;let a=tN.internalArray,o=tN.length;for(e=0;e0;){if((t=tN.pop()).cancelled||t.throttleByServer&&!t$.serverHasOpenSlots(t.serverKey)){tZ(t);continue}tW(t),++u}t$.debugShowStatistics&&(0===tU.numberOfActiveRequests&&tU.lastNumberOfActiveRequests>0&&(tU.numberOfAttemptedRequests>0&&(console.log(`Number of attempted requests: ${tU.numberOfAttemptedRequests}`),tU.numberOfAttemptedRequests=0),tU.numberOfCancelledRequests>0&&(console.log(`Number of cancelled requests: ${tU.numberOfCancelledRequests}`),tU.numberOfCancelledRequests=0),tU.numberOfCancelledActiveRequests>0&&(console.log(`Number of cancelled active requests: ${tU.numberOfCancelledActiveRequests}`),tU.numberOfCancelledActiveRequests=0),tU.numberOfFailedRequests>0&&(console.log(`Number of failed requests: ${tU.numberOfFailedRequests}`),tU.numberOfFailedRequests=0)),tU.lastNumberOfActiveRequests=tU.numberOfActiveRequests)},t$.getServerKey=function(e){(0,L.default).typeOf.string("url",e);let t=new/*@__PURE__*/(R(tf))(e);""===t.scheme()&&(t=t.absoluteTo(tL)).normalize();let r=t.authority();/:/.test(r)||(r=`${r}:${"https"===t.scheme()?"443":"80"}`);let n=tF[r];return(0,$.default)(n)||(tF[r]=0),r},t$.request=function(e){if((0,L.default).typeOf.object("request",e),(0,L.default).typeOf.string("request.url",e.url),(0,L.default).typeOf.func("request.requestFunction",e.requestFunction),t_(e.url)||tO(e.url))return tB.raiseEvent(),e.state=tE.RECEIVED,e.requestFunction();if(++tU.numberOfAttemptedRequests,(0,$.default)(e.serverKey)||(e.serverKey=t$.getServerKey(e.url)),t$.throttleRequests&&e.throttleByServer&&!t$.serverHasOpenSlots(e.serverKey))return;if(!t$.throttleRequests||!e.throttle)return tW(e);if(tD.length>=t$.maximumRequests)return;tQ(e);let t=tN.insert(e);if((0,$.default)(t)){if(t===e)return;tZ(t)}return tH(e)},t$.clearForSpecs=function(){for(;tN.length>0;)tZ(tN.pop());let e=tD.length;for(let t=0;t0}},credits:{get:function(){return this._credits}}}),tX.prototype.toString=function(){return this.getUrlComponent(!0,!0)},tX.prototype.parseUrl=function(e,t,r,n){var a;let o=new/*@__PURE__*/(R(tf))(e),i=0===(a=o.query()).length?{}:-1===a.indexOf("=")?{[a]:void 0}:tA(a);this._queryParameters=t?tK(i,this.queryParameters,r):i,o.search(""),o.fragment(""),(0,$.default)(n)&&""===o.scheme()&&(o=o.absoluteTo(th(n))),this._url=o.toString()},tX.prototype.getUrlComponent=function(e,t){if(this.isDataUri)return this._url;let r=this._url;e&&(r=`${r}${function(e){let t=Object.keys(e);return 0===t.length?"":1!==t.length||(0,$.default)(e[t[0]])?`?${tj(e)}`:`?${t[0]}`}(this.queryParameters)}`),r=r.replace(/%7B/g,"{").replace(/%7D/g,"}");let n=this._templateValues;return Object.keys(n).length>0&&(r=r.replace(/{(.*?)}/g,function(e,t){let r=n[t];return(0,$.default)(r)?encodeURIComponent(r):e})),t&&(0,$.default)(this.proxy)&&(r=this.proxy.getURL(r)),r},tX.prototype.setQueryParameters=function(e,t){t?this._queryParameters=tK(this._queryParameters,e,!1):this._queryParameters=tK(e,this._queryParameters,!1)},tX.prototype.appendQueryParameters=function(e){this._queryParameters=tK(e,this._queryParameters,!0)},tX.prototype.setTemplateValues=function(e,t){t?this._templateValues=tc(this._templateValues,e):this._templateValues=tc(e,this._templateValues)},tX.prototype.getDerivedResource=function(e){let t=this.clone();if(t._retryCount=0,(0,$.default)(e.url)){let r=(0,B.default)(e.preserveQueryParameters,!1);t.parseUrl(e.url,!0,r,this._url)}return(0,$.default)(e.queryParameters)&&(t._queryParameters=tc(e.queryParameters,t.queryParameters)),(0,$.default)(e.templateValues)&&(t._templateValues=tc(e.templateValues,t.templateValues)),(0,$.default)(e.headers)&&(t.headers=tc(e.headers,t.headers)),(0,$.default)(e.proxy)&&(t.proxy=e.proxy),(0,$.default)(e.request)&&(t.request=e.request),(0,$.default)(e.retryCallback)&&(t.retryCallback=e.retryCallback),(0,$.default)(e.retryAttempts)&&(t.retryAttempts=e.retryAttempts),t},tX.prototype.retryOnError=function(e){let t=this.retryCallback;if("function"!=typeof t||this._retryCount>=this.retryAttempts)return Promise.resolve(!1);let r=this;return Promise.resolve(t(this,e)).then(function(e){return++r._retryCount,e})},tX.prototype.clone=function(e){return(0,$.default)(e)?(e._url=this._url,e._queryParameters=td(this._queryParameters),e._templateValues=td(this._templateValues),e.headers=td(this.headers),e.proxy=this.proxy,e.retryCallback=this.retryCallback,e.retryAttempts=this.retryAttempts,e._retryCount=0,e.request=this.request.clone(),e):new tX({url:this._url,queryParameters:this.queryParameters,templateValues:this.templateValues,headers:this.headers,proxy:this.proxy,retryCallback:this.retryCallback,retryAttempts:this.retryAttempts,request:this.request.clone(),parseUrl:!1,credits:(0,$.default)(this.credits)?this.credits.slice():void 0})},tX.prototype.getBaseUri=function(e){return tm(this.getUrlComponent(e),e)},tX.prototype.appendForwardSlash=function(){var e;this._url=((0===(e=this._url).length||"/"!==e[e.length-1])&&(e=`${e}/`),e)},tX.prototype.fetchArrayBuffer=function(){return this.fetch({responseType:"arraybuffer"})},tX.fetchArrayBuffer=function(e){return new tX(e).fetchArrayBuffer()},tX.prototype.fetchBlob=function(){return this.fetch({responseType:"blob"})},tX.fetchBlob=function(e){return new tX(e).fetchBlob()},tX.prototype.fetchImage=function(e){let t,r,n;e=(0,B.default)(e,B.default.EMPTY_OBJECT);let a=(0,B.default)(e.preferImageBitmap,!1),o=(0,B.default)(e.preferBlob,!1),i=(0,B.default)(e.flipY,!1),u=(0,B.default)(e.skipColorSpaceConversion,!1);if(t1(this.request),!tV||this.isDataUri||this.isBlobUri||!this.hasHeaders&&!o)return t0({resource:this,flipY:i,skipColorSpaceConversion:u,preferImageBitmap:a});let s=this.fetchBlob();if((0,$.default)(s))return tX.supportsImageBitmapOptions().then(function(e){return t=e&&a,s}).then(function(e){return(0,$.default)(e)?(n=e,t)?tX.createImageBitmapFromBlob(e,{flipY:i,premultiplyAlpha:!1,skipColorSpaceConversion:u}):t0({resource:r=new tX({url:window.URL.createObjectURL(e)}),flipY:i,skipColorSpaceConversion:u,preferImageBitmap:!1}):void 0}).then(function(e){if((0,$.default)(e))return e.blob=n,t||window.URL.revokeObjectURL(r.url),e}).catch(function(e){return(0,$.default)(r)&&window.URL.revokeObjectURL(r.url),e.blob=n,Promise.reject(e)})},tX.fetchImage=function(e){return new tX(e).fetchImage({flipY:e.flipY,skipColorSpaceConversion:e.skipColorSpaceConversion,preferBlob:e.preferBlob,preferImageBitmap:e.preferImageBitmap})},tX.prototype.fetchText=function(){return this.fetch({responseType:"text"})},tX.fetchText=function(e){return new tX(e).fetchText()},tX.prototype.fetchJson=function(){let e=this.fetch({responseType:"text",headers:{Accept:"application/json,*/*;q=0.01"}});if((0,$.default)(e))return e.then(function(e){if((0,$.default)(e))return JSON.parse(e)})},tX.fetchJson=function(e){return new tX(e).fetchJson()},tX.prototype.fetchXML=function(){return this.fetch({responseType:"document",overrideMimeType:"text/xml"})},tX.fetchXML=function(e){return new tX(e).fetchXML()},tX.prototype.fetchJsonp=function(e){let t;e=(0,B.default)(e,"callback"),t1(this.request);do t=`loadJsonp${(0,Q.default).nextRandomNumber().toString().substring(2,8)}`;while((0,$.default)(window[t]))return function e(t,r,n){let a={};a[r]=n,t.setQueryParameters(a);let o=t.request,i=t.url;o.url=i,o.requestFunction=function(){let e=tp();return window[n]=function(t){e.resolve(t);try{delete window[n]}catch(e){window[n]=void 0}},tX._Implementations.loadAndExecuteScript(i,n,e),e.promise};let u=t$.request(o);if((0,$.default)(u))return u.catch(function(a){return o.state!==tE.FAILED?Promise.reject(a):t.retryOnError(a).then(function(i){return i?(o.state=tE.UNISSUED,o.deferred=void 0,e(t,r,n)):Promise.reject(a)})})}(this,e,t)},tX.fetchJsonp=function(e){return new tX(e).fetchJsonp(e.callbackParameterName)},tX.prototype._makeRequest=function(e){let t=this;t1(t.request);let r=t.request,n=t.url;r.url=n,r.requestFunction=function(){let a=e.responseType,o=tc(e.headers,t.headers),i=e.overrideMimeType,u=e.method,s=e.data,l=tp(),f=tX._Implementations.loadWithXhr(n,a,u,s,o,l,i);return(0,$.default)(f)&&(0,$.default)(f.abort)&&(r.cancelFunction=function(){f.abort()}),l.promise};let a=t$.request(r);if((0,$.default)(a))return a.then(function(e){return r.cancelFunction=void 0,e}).catch(function(n){return(r.cancelFunction=void 0,r.state!==tE.FAILED)?Promise.reject(n):t.retryOnError(n).then(function(a){return a?(r.state=tE.UNISSUED,r.deferred=void 0,t.fetch(e)):Promise.reject(n)})})};const t2=/^data:(.*?)(;base64)?,(.*)$/;function t3(e,t){let r=decodeURIComponent(t);return e?atob(r):r}function t4(e,t){let r=t3(e,t),n=new ArrayBuffer(r.length),a=new Uint8Array(n);for(let e=0;et.length-1)return i.xPoleWander=0,i.yPoleWander=0,i.xPoleOffset=0,i.yPoleOffset=0,i.ut1MinusUtc=0,i;let p=t[a],h=t[o];if(p.equals(h)||n.equals(p))return t9(e,r,a,c,i),i;if(n.equals(h))return t9(e,r,o,c,i),i;let m=ts.secondsDifference(n,p)/ts.secondsDifference(h,p),y=a*c,g=o*c,b=r[y+e._ut1MinusUtcSecondsColumn],w=r[g+e._ut1MinusUtcSecondsColumn],O=w-b;if(O>.5||O<-.5){let t=r[y+e._taiMinusUtcSecondsColumn],a=r[g+e._taiMinusUtcSecondsColumn];t!==a&&(h.equals(n)?b=w:w-=a-t)}return i.xPoleWander=(u=r[y+e._xPoleWanderRadiansColumn])+m*(r[g+e._xPoleWanderRadiansColumn]-u),i.yPoleWander=(s=r[y+e._yPoleWanderRadiansColumn])+m*(r[g+e._yPoleWanderRadiansColumn]-s),i.xPoleOffset=(l=r[y+e._xCelestialPoleOffsetRadiansColumn])+m*(r[g+e._xCelestialPoleOffsetRadiansColumn]-l),i.yPoleOffset=(f=r[y+e._yCelestialPoleOffsetRadiansColumn])+m*(r[g+e._yCelestialPoleOffsetRadiansColumn]-f),i.ut1MinusUtc=(d=b)+m*(w-d),i}tX._Implementations.loadWithXhr=function(e,t,r,n,a,o,i){let u=t2.exec(e);if(null!==u){o.resolve(function(e,t){t=(0,B.default)(t,"");let r=e[1],n=!!e[2],a=e[3];switch(t){case"":case"text":return t3(n,a);case"arraybuffer":return t4(n,a);case"blob":return new Blob([t4(n,a)],{type:r});case"document":return new DOMParser().parseFromString(t3(n,a),r);case"json":return JSON.parse(t3(n,a));default:throw new H.default(`Unhandled responseType: ${t}`)}}(u,t));return}if(t5){!function(e,t,r,n,a,o,i){fetch(e,{method:r,headers:a}).then(async e=>{if(!e.ok){let t={};e.headers.forEach((e,r)=>{t[r]=e}),o.reject(new tz(e.status,e,t));return}switch(t){case"text":o.resolve(e.text());break;case"json":o.resolve(e.json());break;default:o.resolve(new Uint8Array(await e.arrayBuffer()).buffer)}}).catch(()=>{o.reject(new tz)})}(e,t,r,0,a,o,0);return}let s=new XMLHttpRequest;if(tJ.contains(e)&&(s.withCredentials=!0),s.open(r,e,!0),(0,$.default)(i)&&(0,$.default)(s.overrideMimeType)&&s.overrideMimeType(i),(0,$.default)(a))for(let e in a)a.hasOwnProperty(e)&&s.setRequestHeader(e,a[e]);(0,$.default)(t)&&(s.responseType=t);let l=!1;return"string"==typeof e&&(l=0===e.indexOf("file://")||"undefined"!=typeof window&&"file://"===window.location.origin),s.onload=function(){if((s.status<200||s.status>=300)&&!(l&&0===s.status)){o.reject(new tz(s.status,s.response,s.getAllResponseHeaders()));return}let e=s.response,n=s.responseType;if("HEAD"===r||"OPTIONS"===r){let e=s.getAllResponseHeaders().trim().split(/[\r\n]+/),t={};e.forEach(function(e){let r=e.split(": ");t[r.shift()]=r.join(": ")}),o.resolve(t);return}if(204===s.status)o.resolve(void 0);else if((0,$.default)(e)&&(!(0,$.default)(t)||n===t))o.resolve(e);else if("json"===t&&"string"==typeof e)try{o.resolve(JSON.parse(e))}catch(e){o.reject(e)}else(""===n||"document"===n)&&(0,$.default)(s.responseXML)&&s.responseXML.hasChildNodes()?o.resolve(s.responseXML):(""===n||"text"===n)&&(0,$.default)(s.responseText)?o.resolve(s.responseText):o.reject(new eq("Invalid XMLHttpRequest response type."))},s.onerror=function(e){o.reject(new tz)},s.send(n),s},tX._Implementations.loadAndExecuteScript=function(e,t,r){return tS(e,t).catch(function(e){r.reject(e)})},tX._DefaultImplementations={},tX._DefaultImplementations.createImage=tX._Implementations.createImage,tX._DefaultImplementations.loadWithXhr=tX._Implementations.loadWithXhr,tX._DefaultImplementations.loadAndExecuteScript=tX._Implementations.loadAndExecuteScript,tX.DEFAULT=Object.freeze(new tX({url:"undefined"==typeof document?"":document.location.href.split("?")[0]})),t6.fromUrl=async function(e,t){let r;(0,L.default).defined("url",e),t=(0,B.default)(t,B.default.EMPTY_OBJECT);let n=tX.createIfNeeded(e);try{r=await n.fetchJson()}catch(e){throw new eq(`An error occurred while retrieving the EOP data from the URL ${n.url}.`)}return new t6({addNewLeapSeconds:t.addNewLeapSeconds,data:r})},t6.NONE=Object.freeze({compute:function(e,t){return(0,$.default)(t)?(t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0):t=new eZ(0,0,0,0,0),t}}),t6.prototype.compute=function(e,t){if(!(0,$.default)(this._samples))return;if((0,$.default)(t)||(t=new eZ(0,0,0,0,0)),0===this._samples.length)return t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0,t;let r=this._dates,n=this._lastIndex,a=0,o=0;if((0,$.default)(n)){let i=r[n],u=r[n+1],s=ts.lessThanOrEquals(i,e),l=!(0,$.default)(u),f=l||ts.greaterThanOrEquals(u,e);if(s&&f)return a=n,!l&&u.equals(e)&&++a,o=a+1,re(this,r,this._samples,e,a,o,t),t}let i=eW(r,e,ts.compare,this._dateColumn);return i>=0?(i=this._totalSamples&&(u=this._totalSamples-1);let s=i/this._samplesPerXysFile|0,l=u/this._samplesPerXysFile|0,f=[];for(let e=s;e<=l;++e)f.push(rp(this,e));return Promise.all(f)},rf.prototype.computeXysRadians=function(e,t,r){let n,a;let o=rc(this,e,t);if(o<0)return;let i=o/this._stepSizeDays|0;if(i>=this._totalSamples)return;let u=this._interpolationOrder,s=i-(u/2|0);s<0&&(s=0);let l=s+u;l>=this._totalSamples&&(s=(l=this._totalSamples-1)-u)<0&&(s=0);let f=!1,d=this._samples;if((0,$.default)(d[3*s])||(rp(this,s/this._samplesPerXysFile|0),f=!0),(0,$.default)(d[3*l])||(rp(this,l/this._samplesPerXysFile|0),f=!0),f)return;(0,$.default)(r)?(r.x=0,r.y=0,r.s=0):r=new rl(0,0,0);let c=o-s*this._stepSizeDays,p=this._work,h=this._denominators,m=this._coef,y=this._xTable;for(n=0;n<=u;++n)p[n]=c-y[n];for(n=0;n<=u;++n){for(a=0,m[n]=1;a<=u;++a)a!==n&&(m[n]*=p[a]);m[n]*=h[n];let e=(s+n)*3;r.x+=m[n]*d[e++],r.y+=m[n]*d[e++],r.s+=m[n]*d[e]}return r};var Q=z("AXvpI"),F=z("bXwZF"),L=z("3pzcG"),B=z("8w8ZH"),$=z("jQJji"),L=z("3pzcG"),B=z("8w8ZH"),$=z("jQJji"),H=z("1vHsR"),$=z("jQJji");const rh={requestFullscreen:void 0,exitFullscreen:void 0,fullscreenEnabled:void 0,fullscreenElement:void 0,fullscreenchange:void 0,fullscreenerror:void 0},rm={};function ry(e){let t=e.split(".");for(let e=0,r=t.length;e{let t=new Image;t.onload=function(){rS._result=t.width>0&&t.height>0,e(rS._result)},t.onerror=function(){rS._result=!1,e(rS._result)},t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA"})),rS._promise},Object.defineProperties(rS,{initialized:{get:function(){return(0,$.default)(rS._result)}}});const rj=[];"undefined"!=typeof ArrayBuffer&&(rj.push(Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array),"undefined"!=typeof Uint8ClampedArray&&rj.push(Uint8ClampedArray),"undefined"!=typeof Uint8ClampedArray&&rj.push(Uint8ClampedArray),"undefined"!=typeof BigInt64Array&&rj.push(BigInt64Array),"undefined"!=typeof BigUint64Array&&rj.push(BigUint64Array));const rA={isChrome:rg,chromeVersion:function(){return rg()&&s},isSafari:rb,safariVersion:function(){return rb()&&f},isWebkit:rw,webkitVersion:function(){return rw()&&c},isInternetExplorer:rO,internetExplorerVersion:function(){return rO()&&h},isEdge:rv,edgeVersion:function(){return rv()&&y},isFirefox:rx,firefoxVersion:function(){return rx()&&b},isWindows:function(){return(0,$.default)(w)||(w=/Windows/i.test(i.appVersion)),w},isIPadOrIOS:function(){return(0,$.default)(O)||(O="iPhone"===navigator.platform||"iPod"===navigator.platform||"iPad"===navigator.platform),O},hardwareConcurrency:(0,B.default)(i.hardwareConcurrency,3),supportsPointerEvents:function(){return(0,$.default)(v)||(v=!rx()&&"undefined"!=typeof PointerEvent&&(!(0,$.default)(i.pointerEnabled)||i.pointerEnabled)),v},supportsImageRenderingPixelated:r_,supportsWebP:rS,imageRenderingValue:function(){return r_()?x:void 0},typedArrayTypes:rj};rA.supportsBasis=function(e){return rA.supportsWebAssembly()&&e.context.supportsBasis},rA.supportsFullscreen=function(){return rm.supportsFullscreen()},rA.supportsTypedArrays=function(){return"undefined"!=typeof ArrayBuffer},rA.supportsBigInt64Array=function(){return"undefined"!=typeof BigInt64Array},rA.supportsBigUint64Array=function(){return"undefined"!=typeof BigUint64Array},rA.supportsBigInt=function(){return"undefined"!=typeof BigInt},rA.supportsWebWorkers=function(){return"undefined"!=typeof Worker},rA.supportsWebAssembly=function(){return"undefined"!=typeof WebAssembly},rA.supportsWebgl2=function(e){return(0,L.default).defined("scene",e),e.context.webgl2},rA.supportsEsmWebWorkers=function(){return!rx()||parseInt(b)>=114};var Q=z("AXvpI");function rE(e,t,r,n){this.x=(0,B.default)(e,0),this.y=(0,B.default)(t,0),this.z=(0,B.default)(r,0),this.w=(0,B.default)(n,0)}let rR=new F.default;rE.fromAxisAngle=function(e,t,r){(0,L.default).typeOf.object("axis",e),(0,L.default).typeOf.number("angle",t);let n=t/2,a=Math.sin(n),o=(rR=(0,F.default).normalize(e,rR)).x*a,i=rR.y*a,u=rR.z*a,s=Math.cos(n);return(0,$.default)(r)?(r.x=o,r.y=i,r.z=u,r.w=s,r):new rE(o,i,u,s)};const rq=[1,2,0],rT=[,,,];rE.fromRotationMatrix=function(e,t){let r,n,a,o,i;(0,L.default).typeOf.object("matrix",e);let u=e[eg.COLUMN0ROW0],s=e[eg.COLUMN1ROW1],l=e[eg.COLUMN2ROW2],f=u+s+l;if(f>0)i=.5*(r=Math.sqrt(f+1)),r=.5/r,n=(e[eg.COLUMN1ROW2]-e[eg.COLUMN2ROW1])*r,a=(e[eg.COLUMN2ROW0]-e[eg.COLUMN0ROW2])*r,o=(e[eg.COLUMN0ROW1]-e[eg.COLUMN1ROW0])*r;else{let t=0;s>u&&(t=1),l>u&&l>s&&(t=2);let f=rq[t],d=rq[f];r=Math.sqrt(e[eg.getElementIndex(t,t)]-e[eg.getElementIndex(f,f)]-e[eg.getElementIndex(d,d)]+1),rT[t]=.5*r,r=.5/r,i=(e[eg.getElementIndex(d,f)]-e[eg.getElementIndex(f,d)])*r,rT[f]=(e[eg.getElementIndex(f,t)]+e[eg.getElementIndex(t,f)])*r,rT[d]=(e[eg.getElementIndex(d,t)]+e[eg.getElementIndex(t,d)])*r,n=-rT[0],a=-rT[1],o=-rT[2]}return(0,$.default)(t)?(t.x=n,t.y=a,t.z=o,t.w=i,t):new rE(n,a,o,i)};const rz=new rE;let rC=new rE,rI=new rE,rP=new rE;rE.fromHeadingPitchRoll=function(e,t){return(0,L.default).typeOf.object("headingPitchRoll",e),rP=rE.fromAxisAngle(F.default.UNIT_X,e.roll,rz),rI=rE.fromAxisAngle(F.default.UNIT_Y,-e.pitch,t),t=rE.multiply(rI,rP,rI),rC=rE.fromAxisAngle(F.default.UNIT_Z,-e.heading,rz),rE.multiply(rC,t,t)};const rM=new F.default,rU=new F.default,rk=new rE,rN=new rE,rD=new rE;rE.packedLength=4,rE.pack=function(e,t,r){return(0,L.default).typeOf.object("value",e),(0,L.default).defined("array",t),r=(0,B.default)(r,0),t[r++]=e.x,t[r++]=e.y,t[r++]=e.z,t[r]=e.w,t},rE.unpack=function(e,t,r){return(0,L.default).defined("array",e),t=(0,B.default)(t,0),(0,$.default)(r)||(r=new rE),r.x=e[t],r.y=e[t+1],r.z=e[t+2],r.w=e[t+3],r},rE.packedInterpolationLength=3,rE.convertPackedArrayForInterpolation=function(e,t,r,n){rE.unpack(e,4*r,rD),rE.conjugate(rD,rD);for(let a=0,o=r-t+1;a=0?a=1:(a=-1,o=-o);let i=o-1,u=1-r,s=r*r,l=u*u;for(let e=7;e>=0;--e)rX[e]=(rY[e]*s-rV[e])*i,rG[e]=(rY[e]*l-rV[e])*i;let f=a*r*(1+rX[0]*(1+rX[1]*(1+rX[2]*(1+rX[3]*(1+rX[4]*(1+rX[5]*(1+rX[6]*(1+rX[7])))))))),d=u*(1+rG[0]*(1+rG[1]*(1+rG[2]*(1+rG[3]*(1+rG[4]*(1+rG[5]*(1+rG[6]*(1+rG[7])))))))),c=rE.multiplyByScalar(e,d,rJ);return rE.multiplyByScalar(t,f,n),rE.add(c,n,n)},rE.fastSquad=function(e,t,r,n,a,o){(0,L.default).typeOf.object("q0",e),(0,L.default).typeOf.object("q1",t),(0,L.default).typeOf.object("s0",r),(0,L.default).typeOf.object("s1",n),(0,L.default).typeOf.number("t",a),(0,L.default).typeOf.object("result",o);let i=rE.fastSlerp(e,t,a,rW),u=rE.fastSlerp(r,n,a,rZ);return rE.fastSlerp(i,u,2*a*(1-a),o)},rE.equals=function(e,t){return e===t||(0,$.default)(e)&&(0,$.default)(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z&&e.w===t.w},rE.equalsEpsilon=function(e,t,r){return r=(0,B.default)(r,0),e===t||(0,$.default)(e)&&(0,$.default)(t)&&Math.abs(e.x-t.x)<=r&&Math.abs(e.y-t.y)<=r&&Math.abs(e.z-t.z)<=r&&Math.abs(e.w-t.w)<=r},rE.ZERO=Object.freeze(new rE(0,0,0,0)),rE.IDENTITY=Object.freeze(new rE(0,0,0,1)),rE.prototype.clone=function(e){return rE.clone(this,e)},rE.prototype.equals=function(e){return rE.equals(this,e)},rE.prototype.equalsEpsilon=function(e,t){return rE.equalsEpsilon(this,e,t)},rE.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z}, ${this.w})`};const rK={},r0={up:{south:"east",north:"west",west:"south",east:"north"},down:{south:"west",north:"east",west:"north",east:"south"},south:{up:"west",down:"east",west:"down",east:"up"},north:{up:"east",down:"west",west:"up",east:"down"},west:{up:"north",down:"south",north:"down",south:"up"},east:{up:"south",down:"north",north:"up",south:"down"}},r1={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},r2={},r3={east:new F.default,north:new F.default,up:new F.default,west:new F.default,south:new F.default,down:new F.default};let r4=new F.default,r5=new F.default,r6=new F.default;rK.localFrameToFixedFrameGenerator=function(e,t){let r;if(!r0.hasOwnProperty(e)||!r0[e].hasOwnProperty(t))throw new H.default("firstAxis and secondAxis must be east, north, up, west, south or down.");let n=r0[e][t],a=e+t;return(0,$.default)(r2[a])?r=r2[a]:(r=function(r,a,o){if(!(0,$.default)(r))throw new H.default("origin is required.");if(isNaN(r.x)||isNaN(r.y)||isNaN(r.z))throw new H.default("origin has a NaN component");if((0,$.default)(o)||(o=new eT),(0,F.default).equalsEpsilon(r,F.default.ZERO,Q.default.EPSILON14))(0,F.default).unpack(r1[e],0,r4),(0,F.default).unpack(r1[t],0,r5),(0,F.default).unpack(r1[n],0,r6);else if((0,Q.default).equalsEpsilon(r.x,0,Q.default.EPSILON14)&&(0,Q.default).equalsEpsilon(r.y,0,Q.default.EPSILON14)){let a=(0,Q.default).sign(r.z);(0,F.default).unpack(r1[e],0,r4),"east"!==e&&"west"!==e&&(0,F.default).multiplyByScalar(r4,a,r4),(0,F.default).unpack(r1[t],0,r5),"east"!==t&&"west"!==t&&(0,F.default).multiplyByScalar(r5,a,r5),(0,F.default).unpack(r1[n],0,r6),"east"!==n&&"west"!==n&&(0,F.default).multiplyByScalar(r6,a,r6)}else{(a=(0,B.default)(a,ee.default)).geodeticSurfaceNormal(r,r3.up);let o=r3.up,i=r3.east;i.x=-r.y,i.y=r.x,i.z=0,(0,F.default).normalize(i,r3.east),(0,F.default).cross(o,i,r3.north),(0,F.default).multiplyByScalar(r3.up,-1,r3.down),(0,F.default).multiplyByScalar(r3.east,-1,r3.west),(0,F.default).multiplyByScalar(r3.north,-1,r3.south),r4=r3[e],r5=r3[t],r6=r3[n]}return o[0]=r4.x,o[1]=r4.y,o[2]=r4.z,o[3]=0,o[4]=r5.x,o[5]=r5.y,o[6]=r5.z,o[7]=0,o[8]=r6.x,o[9]=r6.y,o[10]=r6.z,o[11]=0,o[12]=r.x,o[13]=r.y,o[14]=r.z,o[15]=1,o},r2[a]=r),r},rK.eastNorthUpToFixedFrame=rK.localFrameToFixedFrameGenerator("east","north"),rK.northEastDownToFixedFrame=rK.localFrameToFixedFrameGenerator("north","east"),rK.northUpEastToFixedFrame=rK.localFrameToFixedFrameGenerator("north","up"),rK.northWestUpToFixedFrame=rK.localFrameToFixedFrameGenerator("north","west");const r8=new rE,r7=new F.default(1,1,1),r9=new eT;rK.headingPitchRollToFixedFrame=function(e,t,r,n,a){(0,L.default).typeOf.object("HeadingPitchRoll",t),n=(0,B.default)(n,rK.eastNorthUpToFixedFrame);let o=rE.fromHeadingPitchRoll(t,r8),i=eT.fromTranslationQuaternionRotationScale(F.default.ZERO,o,r7,r9);return a=n(e,r,a),eT.multiply(a,i,a)};const ne=new eT,nt=new eg;rK.headingPitchRollQuaternion=function(e,t,r,n,a){(0,L.default).typeOf.object("HeadingPitchRoll",t);let o=rK.headingPitchRollToFixedFrame(e,t,r,n,ne),i=eT.getMatrix3(o,nt);return rE.fromRotationMatrix(i,a)};const nr=new F.default(1,1,1),nn=new F.default,na=new eT,no=new eT,ni=new eg,nu=new rE;rK.fixedFrameToHeadingPitchRoll=function(e,t,r,n){(0,L.default).defined("transform",e),t=(0,B.default)(t,ee.default),r=(0,B.default)(r,rK.eastNorthUpToFixedFrame),(0,$.default)(n)||(n=new rt);let a=eT.getTranslation(e,nn);if((0,F.default).equals(a,F.default.ZERO))return n.heading=0,n.pitch=0,n.roll=0,n;let o=eT.inverseTransformation(r(a,t,na),na),i=eT.setScale(e,nr,no);i=eT.setTranslation(i,F.default.ZERO,i),o=eT.multiply(o,i,o);let u=rE.fromRotationMatrix(eT.getMatrix3(o,ni),nu);return u=rE.normalize(u,u),rt.fromQuaternion(u,n)};const ns=Q.default.TWO_PI/86400;let nl=new ts;rK.computeIcrfToCentralBodyFixedMatrix=function(e,t){let r=rK.computeIcrfToFixedMatrix(e,t);return(0,$.default)(r)||(r=rK.computeTemeToPseudoFixedMatrix(e,t)),r},rK.computeTemeToPseudoFixedMatrix=function(e,t){let r;if(!(0,$.default)(e))throw new H.default("date is required.");let n=(nl=ts.addSeconds(e,-ts.computeTaiMinusUtc(e),nl)).dayNumber,a=nl.secondsOfDay,o=n-2451545,i=(24110.54841+(r=a>=43200?(o+.5)/eG.DAYS_PER_JULIAN_CENTURY:(o-.5)/eG.DAYS_PER_JULIAN_CENTURY)*(8640184.812866+r*(.093104+-62e-7*r)))*ns%Q.default.TWO_PI+(72921158553e-15+11772758384668e-32*(n-2451545.5))*((a+.5*eG.SECONDS_PER_DAY)%eG.SECONDS_PER_DAY),u=Math.cos(i),s=Math.sin(i);return(0,$.default)(t)?(t[0]=u,t[1]=-s,t[2]=0,t[3]=s,t[4]=u,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t):new eg(u,s,0,-s,u,0,0,0,1)},rK.iau2006XysData=new rf,rK.earthOrientationParameters=t6.NONE,rK.preloadIcrfFixed=function(e){let t=e.start.dayNumber,r=e.start.secondsOfDay+32.184,n=e.stop.dayNumber,a=e.stop.secondsOfDay+32.184;return rK.iau2006XysData.preload(t,r,n,a)},rK.computeIcrfToFixedMatrix=function(e,t){if(!(0,$.default)(e))throw new H.default("date is required.");(0,$.default)(t)||(t=new eg);let r=rK.computeFixedToIcrfMatrix(e,t);if((0,$.default)(r))return eg.transpose(r,t)};const nf=new rt,nd=new eg,nc=new ts;rK.computeMoonFixedToIcrfMatrix=function(e,t){if(!(0,$.default)(e))throw new H.default("date is required.");(0,$.default)(t)||(t=new eg);let r=ts.addSeconds(e,32.184,nc),n=ts.totalDays(r)-2451545,a=(0,Q.default).toRadians(12.112)-(0,Q.default).toRadians(.052992)*n,o=(0,Q.default).toRadians(24.224)-(0,Q.default).toRadians(.105984)*n,i=(0,Q.default).toRadians(227.645)+(0,Q.default).toRadians(13.012)*n,u=(0,Q.default).toRadians(261.105)+(0,Q.default).toRadians(13.340716)*n,s=(0,Q.default).toRadians(358)+(0,Q.default).toRadians(.9856)*n;return nf.pitch=(0,Q.default).toRadians(180)-(0,Q.default).toRadians(3.878)*Math.sin(a)-(0,Q.default).toRadians(.12)*Math.sin(o)+(0,Q.default).toRadians(.07)*Math.sin(i)-(0,Q.default).toRadians(.017)*Math.sin(u),nf.roll=(0,Q.default).toRadians(-23.47)+(0,Q.default).toRadians(1.543)*Math.cos(a)+(0,Q.default).toRadians(.24)*Math.cos(o)-(0,Q.default).toRadians(.028)*Math.cos(i)+(0,Q.default).toRadians(.007)*Math.cos(u),nf.heading=(0,Q.default).toRadians(154.375)+(0,Q.default).toRadians(13.17635831)*n+(0,Q.default).toRadians(3.558)*Math.sin(a)+(0,Q.default).toRadians(.121)*Math.sin(o)-(0,Q.default).toRadians(.064)*Math.sin(i)+(0,Q.default).toRadians(.016)*Math.sin(u)+(0,Q.default).toRadians(.025)*Math.sin(s),eg.fromHeadingPitchRoll(nf,nd)},rK.computeIcrfToMoonFixedMatrix=function(e,t){if(!(0,$.default)(e))throw new H.default("date is required.");(0,$.default)(t)||(t=new eg);let r=rK.computeMoonFixedToIcrfMatrix(e,t);if((0,$.default)(r))return eg.transpose(r,t)};const np=new rl(0,0,0),nh=new eZ(0,0,0,0,0,0),nm=new eg,ny=new eg;rK.computeFixedToIcrfMatrix=function(e,t){if(!(0,$.default)(e))throw new H.default("date is required.");(0,$.default)(t)||(t=new eg);let r=rK.earthOrientationParameters.compute(e,nh);if(!(0,$.default)(r))return;let n=e.dayNumber,a=e.secondsOfDay+32.184,o=rK.iau2006XysData.computeXysRadians(n,a,np);if(!(0,$.default)(o))return;let i=o.x+r.xPoleOffset,u=o.y+r.yPoleOffset,s=1/(1+Math.sqrt(1-i*i-u*u));nm[0]=1-s*i*i,nm[3]=-s*i*u,nm[6]=i,nm[1]=-s*i*u,nm[4]=1-s*u*u,nm[7]=u,nm[2]=-i,nm[5]=-u,nm[8]=1-s*(i*i+u*u);let l=eg.fromRotationZ(-o.s,ny),f=eg.multiply(nm,l,nm),d=e.dayNumber,c=(e.secondsOfDay-ts.computeTaiMinusUtc(e)+r.ut1MinusUtc)/eG.SECONDS_PER_DAY,p=.779057273264+c+.00273781191135448*(d-2451545+c);p=p%1*Q.default.TWO_PI;let h=eg.fromRotationZ(p,ny),m=eg.multiply(f,h,nm),y=Math.cos(r.xPoleWander),g=Math.cos(r.yPoleWander),b=Math.sin(r.xPoleWander),w=Math.sin(r.yPoleWander),O=n-2451545+a/eG.SECONDS_PER_DAY,v=-47e-6*(O/=36525)*Q.default.RADIANS_PER_DEGREE/3600,x=Math.cos(v),_=Math.sin(v);return ny[0]=y*x,ny[1]=y*_,ny[2]=b,ny[3]=-g*_+w*b*x,ny[4]=g*x+w*b*_,ny[5]=-w*y,ny[6]=-w*_-g*b*x,ny[7]=w*x-g*b*_,ny[8]=g*y,eg.multiply(m,ny,t)};const ng=new ef;rK.pointToWindowCoordinates=function(e,t,r,n){return(n=rK.pointToGLWindowCoordinates(e,t,r,n)).y=2*t[5]-n.y,n},rK.pointToGLWindowCoordinates=function(e,t,r,n){if(!(0,$.default)(e))throw new H.default("modelViewProjectionMatrix is required.");if(!(0,$.default)(t))throw new H.default("viewportTransformation is required.");if(!(0,$.default)(r))throw new H.default("point is required.");return(0,$.default)(n)||(n=new D.default),eT.multiplyByVector(e,ef.fromElements(r.x,r.y,r.z,1,ng),ng),ef.multiplyByScalar(ng,1/ng.w,ng),eT.multiplyByVector(t,ng,ng),(0,D.default).fromCartesian4(ng,n)};const nb=new F.default,nw=new F.default,nO=new F.default;rK.rotationMatrixFromPositionVelocity=function(e,t,r,n){if(!(0,$.default)(e))throw new H.default("position is required.");if(!(0,$.default)(t))throw new H.default("velocity is required.");let a=(0,B.default)(r,ee.default).geodeticSurfaceNormal(e,nb),o=(0,F.default).cross(t,a,nw);(0,F.default).equalsEpsilon(o,F.default.ZERO,Q.default.EPSILON6)&&(o=(0,F.default).clone(F.default.UNIT_X,o));let i=(0,F.default).cross(o,t,nO);return(0,F.default).normalize(i,i),(0,F.default).cross(t,i,o),(0,F.default).negate(o,o),(0,F.default).normalize(o,o),(0,$.default)(n)||(n=new eg),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=o.x,n[4]=o.y,n[5]=o.z,n[6]=i.x,n[7]=i.y,n[8]=i.z,n};const nv=new eT(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),nx=new Y,n_=new F.default,nS=new F.default,nj=new eg,nA=new eT,nE=new eT;rK.basisTo2D=function(e,t,r){let n;if(!(0,$.default)(e))throw new H.default("projection is required.");if(!(0,$.default)(t))throw new H.default("matrix is required.");if(!(0,$.default)(r))throw new H.default("result is required.");let a=eT.getTranslation(t,nS),o=e.ellipsoid;if((0,F.default).equals(a,F.default.ZERO))n=(0,F.default).clone(F.default.ZERO,n_);else{let t=o.cartesianToCartographic(a,nx);n=e.project(t,n_),(0,F.default).fromElements(n.z,n.x,n.y,n)}let i=rK.eastNorthUpToFixedFrame(a,o,nA),u=eT.inverseTransformation(i,nE),s=eT.getMatrix3(t,nj),l=eT.multiplyByMatrix3(u,s,r);return eT.multiply(nv,l,r),eT.setTranslation(r,n,r),r},rK.ellipsoidTo2DModelMatrix=function(e,t,r){if(!(0,$.default)(e))throw new H.default("projection is required.");if(!(0,$.default)(t))throw new H.default("center is required.");if(!(0,$.default)(r))throw new H.default("result is required.");let n=e.ellipsoid,a=rK.eastNorthUpToFixedFrame(t,n,nA),o=eT.inverseTransformation(a,nE),i=n.cartesianToCartographic(t,nx),u=e.project(i,n_);(0,F.default).fromElements(u.z,u.x,u.y,u);let s=eT.fromTranslation(u,nA);return eT.multiply(nv,o,r),eT.multiply(s,r,r),r};const nR=new D.default,nq=new D.default,nT=new D.default,nz=new F.default,nC=new eT,nI=new eT,nP=new eH.default,nM=(0,I.svg)``,nU=(0,I.svg)``,nk=(0,I.svg)``;class nN extends I.LitElement{static get properties(){return{scene:{type:Object},clock:{type:Object},ready:{type:Boolean},heading:{type:Number},orbitCursorAngle:{type:Number},orbitCursorOpacity:{type:Number},resetSpeed:{type:Number}}}static get styles(){return(0,I.css)` + :host { + --cesium-compass-stroke-color: rgba(0, 0, 0, 0.6); + --cesium-compass-fill-color: rgb(224, 225, 226); + } :host * { box-sizing: content-box; } @@ -62,4 +66,4 @@ ${this.stack.toString()}`),e},eT.packedLength=16,eT.pack=function(e,t,r){return(
${nk}
`:(0,I.html)``}}customElements.define("cesium-compass",nN); -//# sourceMappingURL=cesium-compass.007a20e1.js.map +//# sourceMappingURL=cesium-compass.f610fb3a.js.map diff --git a/cesium-compass.f610fb3a.js.map b/cesium-compass.f610fb3a.js.map new file mode 100644 index 0000000..e5641e1 --- /dev/null +++ b/cesium-compass.f610fb3a.js.map @@ -0,0 +1 @@ +{"mappings":"IqCEI,EXmMA,E2BjLA,EAcA,EAwDA,EIxFA,EDIA,EAeA,EACA,EAqBA,EACA,EA0BA,EACA,EAoBA,EACA,EA6BA,EACA,EAiBA,EACA,EAcA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B,IAAI,CAAC,OAAO,CAAC,aAAa,CAAE,IAC3F,IAAI,CAAC,qBAAqB,CAAC,EAAc,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,KAAK,CAE9E,CAKA,qBAAqB,CAAK,CAAE,CAC1B,SAAS,mBAAmB,CAAC,cAAe,IAAI,CAAC,8BAA8B,CAAE,CAAA,GACjF,SAAS,mBAAmB,CAAC,YAAa,IAAI,CAAC,4BAA4B,CAAE,CAAA,GAC7E,IAAI,CAAC,qBAAqB,GAC1B,IAAI,CAAC,kBAAkB,CAAG,CAC5B,CAEA,QAAS,QACP,AAAI,IAAI,CAAC,KAAK,CACL,AAAA,CAAA,EAAA,EAAA,IAAG,AAAH,CAAI,CAAC;0CACwB,EAAE,IAAI,CAAC,iBAAiB,CAAC;;wCAE3B,EAAE,AAAA,EAAS,IAAI,CAAC,cAAc,EAAE,CAAC,EAAE,GAAa;;kCAEtD,EAAE,GAAa;6CACJ,EAAE,AAAA,EAAS,IAAI,CAAC,mBAAmB,EAAE,CAAC,EAAE,GAAkB;;MAEjG,CAAC,CAEM,AAAA,CAAA,EAAA,EAAA,IAAG,AAAH,CAAI,CAAC,CAAC,AAEjB,CACF,CAEA,eAAe,MAAM,CAAC,iBAAkB","sources":["","node_modules/urijs/src/punycode.js","node_modules/urijs/src/IPv6.js","node_modules/urijs/src/SecondLevelDomains.js","packages/cesium-compass/cesium-compass.js","node_modules/lit-html/directives/style-map.js","node_modules/lit-html/src/directives/style-map.ts","node_modules/lit-html/directive.js","node_modules/lit-html/src/directive.ts","node_modules/@cesium/engine/Source/Core/Ellipsoid.js","node_modules/@cesium/engine/Source/Core/Cartographic.js","node_modules/@cesium/engine/Source/Core/scaleToGeodeticSurface.js","node_modules/@cesium/engine/Source/Core/Matrix4.js","node_modules/@cesium/engine/Source/Core/Cartesian4.js","node_modules/@cesium/engine/Source/Core/Matrix3.js","node_modules/@cesium/engine/Source/Core/RuntimeError.js","node_modules/@cesium/engine/Source/Core/Transforms.js","node_modules/@cesium/engine/Source/Core/EarthOrientationParameters.js","node_modules/@cesium/engine/Source/Core/binarySearch.js","node_modules/@cesium/engine/Source/Core/EarthOrientationParametersSample.js","node_modules/@cesium/engine/Source/Core/JulianDate.js","node_modules/@cesium/engine/Source/Core/GregorianDate.js","node_modules/@cesium/engine/Source/Core/isLeapYear.js","node_modules/@cesium/engine/Source/Core/LeapSecond.js","node_modules/@cesium/engine/Source/Core/TimeConstants.js","node_modules/@cesium/engine/Source/Core/TimeStandard.js","node_modules/@cesium/engine/Source/Core/Resource.js","node_modules/urijs/src/URI.js","node_modules/@cesium/engine/Source/Core/appendForwardSlash.js","node_modules/@cesium/engine/Source/Core/clone.js","node_modules/@cesium/engine/Source/Core/combine.js","node_modules/@cesium/engine/Source/Core/defer.js","node_modules/@cesium/engine/Source/Core/getAbsoluteUri.js","node_modules/@cesium/engine/Source/Core/getBaseUri.js","node_modules/@cesium/engine/Source/Core/getExtensionFromUri.js","node_modules/@cesium/engine/Source/Core/getImagePixels.js","node_modules/@cesium/engine/Source/Core/isBlobUri.js","node_modules/@cesium/engine/Source/Core/isCrossOriginUrl.js","node_modules/@cesium/engine/Source/Core/isDataUri.js","node_modules/@cesium/engine/Source/Core/loadAndExecuteScript.js","node_modules/@cesium/engine/Source/Core/objectToQuery.js","node_modules/@cesium/engine/Source/Core/queryToObject.js","node_modules/@cesium/engine/Source/Core/Request.js","node_modules/@cesium/engine/Source/Core/RequestState.js","node_modules/@cesium/engine/Source/Core/RequestType.js","node_modules/@cesium/engine/Source/Core/RequestErrorEvent.js","node_modules/@cesium/engine/Source/Core/parseResponseHeaders.js","node_modules/@cesium/engine/Source/Core/RequestScheduler.js","node_modules/@cesium/engine/Source/Core/Event.js","node_modules/@cesium/engine/Source/Core/Heap.js","node_modules/@cesium/engine/Source/Core/TrustedServers.js","node_modules/@cesium/engine/Source/Core/HeadingPitchRoll.js","node_modules/@cesium/engine/Source/Core/Iau2006XysData.js","node_modules/@cesium/engine/Source/Core/buildModuleUrl.js","node_modules/@cesium/engine/Source/Core/Iau2006XysSample.js","node_modules/@cesium/engine/Source/Core/Quaternion.js","node_modules/@cesium/engine/Source/Core/FeatureDetection.js","node_modules/@cesium/engine/Source/Core/Fullscreen.js"],"sourcesContent":["\n var $parcel$global = globalThis;\n \nfunction $parcel$interopDefault(a) {\n return a && a.__esModule ? a.default : a;\n}\n\nvar $parcel$modules = {};\nvar $parcel$inits = {};\n\nvar parcelRequire = $parcel$global[\"parcelRequire5532\"];\n\nif (parcelRequire == null) {\n parcelRequire = function(id) {\n if (id in $parcel$modules) {\n return $parcel$modules[id].exports;\n }\n if (id in $parcel$inits) {\n var init = $parcel$inits[id];\n delete $parcel$inits[id];\n var module = {id: id, exports: {}};\n $parcel$modules[id] = module;\n init.call(module.exports, module, module.exports);\n return module.exports;\n }\n var err = new Error(\"Cannot find module '\" + id + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n };\n\n parcelRequire.register = function register(id, init) {\n $parcel$inits[id] = init;\n };\n\n $parcel$global[\"parcelRequire5532\"] = parcelRequire;\n}\n\nvar parcelRegister = parcelRequire.register;\nparcelRegister(\"3hCk4\", function(module, exports) {\n(function(root) {\n /** Detect free variables */ var freeExports = exports && !exports.nodeType && exports;\n var freeModule = module && !module.nodeType && module;\n var freeGlobal = typeof $parcel$global == \"object\" && $parcel$global;\n if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal || freeGlobal.self === freeGlobal) root = freeGlobal;\n /**\n\t * The `punycode` object.\n\t * @name punycode\n\t * @type Object\n\t */ var punycode, /** Highest positive signed 32-bit float value */ maxInt = 2147483647, /** Bootstring parameters */ base = 36, tMin = 1, tMax = 26, skew = 38, damp = 700, initialBias = 72, initialN = 128, delimiter = \"-\", /** Regular expressions */ regexPunycode = /^xn--/, regexNonASCII = /[^\\x20-\\x7E]/, regexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g, /** Error messages */ errors = {\n \"overflow\": \"Overflow: input needs wider integers to process\",\n \"not-basic\": \"Illegal input >= 0x80 (not a basic code point)\",\n \"invalid-input\": \"Invalid input\"\n }, /** Convenience shortcuts */ baseMinusTMin = base - tMin, floor = Math.floor, stringFromCharCode = String.fromCharCode, /** Temporary variable */ key;\n /*--------------------------------------------------------------------------*/ /**\n\t * A generic error utility function.\n\t * @private\n\t * @param {String} type The error type.\n\t * @returns {Error} Throws a `RangeError` with the applicable error message.\n\t */ function error(type) {\n throw new RangeError(errors[type]);\n }\n /**\n\t * A generic `Array#map` utility function.\n\t * @private\n\t * @param {Array} array The array to iterate over.\n\t * @param {Function} callback The function that gets called for every array\n\t * item.\n\t * @returns {Array} A new array of values returned by the callback function.\n\t */ function map(array, fn) {\n var length = array.length;\n var result = [];\n while(length--)result[length] = fn(array[length]);\n return result;\n }\n /**\n\t * A simple `Array#map`-like wrapper to work with domain name strings or email\n\t * addresses.\n\t * @private\n\t * @param {String} domain The domain name or email address.\n\t * @param {Function} callback The function that gets called for every\n\t * character.\n\t * @returns {Array} A new string of characters returned by the callback\n\t * function.\n\t */ function mapDomain(string, fn) {\n var parts = string.split(\"@\");\n var result = \"\";\n if (parts.length > 1) {\n // In email addresses, only the domain name should be punycoded. Leave\n // the local part (i.e. everything up to `@`) intact.\n result = parts[0] + \"@\";\n string = parts[1];\n }\n // Avoid `split(regex)` for IE8 compatibility. See #17.\n string = string.replace(regexSeparators, \".\");\n var labels = string.split(\".\");\n var encoded = map(labels, fn).join(\".\");\n return result + encoded;\n }\n /**\n\t * Creates an array containing the numeric code points of each Unicode\n\t * character in the string. While JavaScript uses UCS-2 internally,\n\t * this function will convert a pair of surrogate halves (each of which\n\t * UCS-2 exposes as separate characters) into a single code point,\n\t * matching UTF-16.\n\t * @see `punycode.ucs2.encode`\n\t * @see \n\t * @memberOf punycode.ucs2\n\t * @name decode\n\t * @param {String} string The Unicode input string (UCS-2).\n\t * @returns {Array} The new array of code points.\n\t */ function ucs2decode(string) {\n var output = [], counter = 0, length = string.length, value, extra;\n while(counter < length){\n value = string.charCodeAt(counter++);\n if (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n // high surrogate, and there is a next character\n extra = string.charCodeAt(counter++);\n if ((extra & 0xFC00) == 0xDC00) output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n else {\n // unmatched surrogate; only append this code unit, in case the next\n // code unit is the high surrogate of a surrogate pair\n output.push(value);\n counter--;\n }\n } else output.push(value);\n }\n return output;\n }\n /**\n\t * Creates a string based on an array of numeric code points.\n\t * @see `punycode.ucs2.decode`\n\t * @memberOf punycode.ucs2\n\t * @name encode\n\t * @param {Array} codePoints The array of numeric code points.\n\t * @returns {String} The new Unicode string (UCS-2).\n\t */ function ucs2encode(array) {\n return map(array, function(value) {\n var output = \"\";\n if (value > 0xFFFF) {\n value -= 0x10000;\n output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);\n value = 0xDC00 | value & 0x3FF;\n }\n output += stringFromCharCode(value);\n return output;\n }).join(\"\");\n }\n /**\n\t * Converts a basic code point into a digit/integer.\n\t * @see `digitToBasic()`\n\t * @private\n\t * @param {Number} codePoint The basic numeric code point value.\n\t * @returns {Number} The numeric value of a basic code point (for use in\n\t * representing integers) in the range `0` to `base - 1`, or `base` if\n\t * the code point does not represent a value.\n\t */ function basicToDigit(codePoint) {\n if (codePoint - 48 < 10) return codePoint - 22;\n if (codePoint - 65 < 26) return codePoint - 65;\n if (codePoint - 97 < 26) return codePoint - 97;\n return base;\n }\n /**\n\t * Converts a digit/integer into a basic code point.\n\t * @see `basicToDigit()`\n\t * @private\n\t * @param {Number} digit The numeric value of a basic code point.\n\t * @returns {Number} The basic code point whose value (when used for\n\t * representing integers) is `digit`, which needs to be in the range\n\t * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n\t * used; else, the lowercase form is used. The behavior is undefined\n\t * if `flag` is non-zero and `digit` has no uppercase form.\n\t */ function digitToBasic(digit, flag) {\n // 0..25 map to ASCII a..z or A..Z\n // 26..35 map to ASCII 0..9\n return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n }\n /**\n\t * Bias adaptation function as per section 3.4 of RFC 3492.\n\t * https://tools.ietf.org/html/rfc3492#section-3.4\n\t * @private\n\t */ function adapt(delta, numPoints, firstTime) {\n var k = 0;\n delta = firstTime ? floor(delta / damp) : delta >> 1;\n delta += floor(delta / numPoints);\n for(; delta > baseMinusTMin * tMax >> 1; k += base)delta = floor(delta / baseMinusTMin);\n return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n }\n /**\n\t * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n\t * symbols.\n\t * @memberOf punycode\n\t * @param {String} input The Punycode string of ASCII-only symbols.\n\t * @returns {String} The resulting string of Unicode symbols.\n\t */ function decode(input) {\n // Don't use UCS-2\n var output = [], inputLength = input.length, out, i = 0, n = initialN, bias = initialBias, basic, j, index, oldi, w, k, digit, t, /** Cached calculation results */ baseMinusT;\n // Handle the basic code points: let `basic` be the number of input code\n // points before the last delimiter, or `0` if there is none, then copy\n // the first basic code points to the output.\n basic = input.lastIndexOf(delimiter);\n if (basic < 0) basic = 0;\n for(j = 0; j < basic; ++j){\n // if it's not a basic code point\n if (input.charCodeAt(j) >= 0x80) error(\"not-basic\");\n output.push(input.charCodeAt(j));\n }\n // Main decoding loop: start just after the last delimiter if any basic code\n // points were copied; start at the beginning otherwise.\n for(index = basic > 0 ? basic + 1 : 0; index < inputLength;){\n // `index` is the index of the next character to be consumed.\n // Decode a generalized variable-length integer into `delta`,\n // which gets added to `i`. The overflow checking is easier\n // if we increase `i` as we go, then subtract off its starting\n // value at the end to obtain `delta`.\n for(oldi = i, w = 1, k = base;; k += base){\n if (index >= inputLength) error(\"invalid-input\");\n digit = basicToDigit(input.charCodeAt(index++));\n if (digit >= base || digit > floor((maxInt - i) / w)) error(\"overflow\");\n i += digit * w;\n t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;\n if (digit < t) break;\n baseMinusT = base - t;\n if (w > floor(maxInt / baseMinusT)) error(\"overflow\");\n w *= baseMinusT;\n }\n out = output.length + 1;\n bias = adapt(i - oldi, out, oldi == 0);\n // `i` was supposed to wrap around from `out` to `0`,\n // incrementing `n` each time, so we'll fix that now:\n if (floor(i / out) > maxInt - n) error(\"overflow\");\n n += floor(i / out);\n i %= out;\n // Insert `n` at position `i` of the output\n output.splice(i++, 0, n);\n }\n return ucs2encode(output);\n }\n /**\n\t * Converts a string of Unicode symbols (e.g. a domain name label) to a\n\t * Punycode string of ASCII-only symbols.\n\t * @memberOf punycode\n\t * @param {String} input The string of Unicode symbols.\n\t * @returns {String} The resulting Punycode string of ASCII-only symbols.\n\t */ function encode(input) {\n var n, delta, handledCPCount, basicLength, bias, j, m, q, k, t, currentValue, output = [], /** `inputLength` will hold the number of code points in `input`. */ inputLength, /** Cached calculation results */ handledCPCountPlusOne, baseMinusT, qMinusT;\n // Convert the input in UCS-2 to Unicode\n input = ucs2decode(input);\n // Cache the length\n inputLength = input.length;\n // Initialize the state\n n = initialN;\n delta = 0;\n bias = initialBias;\n // Handle the basic code points\n for(j = 0; j < inputLength; ++j){\n currentValue = input[j];\n if (currentValue < 0x80) output.push(stringFromCharCode(currentValue));\n }\n handledCPCount = basicLength = output.length;\n // `handledCPCount` is the number of code points that have been handled;\n // `basicLength` is the number of basic code points.\n // Finish the basic string - if it is not empty - with a delimiter\n if (basicLength) output.push(delimiter);\n // Main encoding loop:\n while(handledCPCount < inputLength){\n // All non-basic code points < n have been handled already. Find the next\n // larger one:\n for(m = maxInt, j = 0; j < inputLength; ++j){\n currentValue = input[j];\n if (currentValue >= n && currentValue < m) m = currentValue;\n }\n // Increase `delta` enough to advance the decoder's state to ,\n // but guard against overflow\n handledCPCountPlusOne = handledCPCount + 1;\n if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) error(\"overflow\");\n delta += (m - n) * handledCPCountPlusOne;\n n = m;\n for(j = 0; j < inputLength; ++j){\n currentValue = input[j];\n if (currentValue < n && ++delta > maxInt) error(\"overflow\");\n if (currentValue == n) {\n // Represent delta as a generalized variable-length integer\n for(q = delta, k = base;; k += base){\n t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;\n if (q < t) break;\n qMinusT = q - t;\n baseMinusT = base - t;\n output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)));\n q = floor(qMinusT / baseMinusT);\n }\n output.push(stringFromCharCode(digitToBasic(q, 0)));\n bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n delta = 0;\n ++handledCPCount;\n }\n }\n ++delta;\n ++n;\n }\n return output.join(\"\");\n }\n /**\n\t * Converts a Punycode string representing a domain name or an email address\n\t * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n\t * it doesn't matter if you call it on a string that has already been\n\t * converted to Unicode.\n\t * @memberOf punycode\n\t * @param {String} input The Punycoded domain name or email address to\n\t * convert to Unicode.\n\t * @returns {String} The Unicode representation of the given Punycode\n\t * string.\n\t */ function toUnicode(input) {\n return mapDomain(input, function(string) {\n return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string;\n });\n }\n /**\n\t * Converts a Unicode string representing a domain name or an email address to\n\t * Punycode. Only the non-ASCII parts of the domain name will be converted,\n\t * i.e. it doesn't matter if you call it with a domain that's already in\n\t * ASCII.\n\t * @memberOf punycode\n\t * @param {String} input The domain name or email address to convert, as a\n\t * Unicode string.\n\t * @returns {String} The Punycode representation of the given domain name or\n\t * email address.\n\t */ function toASCII(input) {\n return mapDomain(input, function(string) {\n return regexNonASCII.test(string) ? \"xn--\" + encode(string) : string;\n });\n }\n /*--------------------------------------------------------------------------*/ /** Define the public API */ punycode = {\n /**\n\t\t * A string representing the current Punycode.js version number.\n\t\t * @memberOf punycode\n\t\t * @type String\n\t\t */ \"version\": \"1.3.2\",\n /**\n\t\t * An object of methods to convert from JavaScript's internal character\n\t\t * representation (UCS-2) to Unicode code points, and back.\n\t\t * @see \n\t\t * @memberOf punycode\n\t\t * @type Object\n\t\t */ \"ucs2\": {\n \"decode\": ucs2decode,\n \"encode\": ucs2encode\n },\n \"decode\": decode,\n \"encode\": encode,\n \"toASCII\": toASCII,\n \"toUnicode\": toUnicode\n };\n /** Expose `punycode` */ // Some AMD build optimizers, like r.js, check for specific condition patterns\n // like the following:\n if (typeof define == \"function\" && typeof define.amd == \"object\" && define.amd) define(\"punycode\", function() {\n return punycode;\n });\n else if (freeExports && freeModule) {\n if (module.exports == freeExports) // in Node.js, io.js, or RingoJS v0.8.0+\n freeModule.exports = punycode;\n else // in Narwhal or RingoJS v0.7.0-\n for(key in punycode)punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);\n } else // in Rhino or a web browser\n root.punycode = punycode;\n})(this);\n\n});\n\nparcelRegister(\"2Nl4L\", function(module, exports) {\n/*!\n * URI.js - Mutating URLs\n * IPv6 Support\n *\n * Version: 1.19.11\n *\n * Author: Rodney Rehm\n * Web: http://medialize.github.io/URI.js/\n *\n * Licensed under\n * MIT License http://www.opensource.org/licenses/mit-license\n *\n */ (function(root, factory) {\n \"use strict\";\n // https://github.com/umdjs/umd/blob/master/returnExports.js\n if (0, module.exports) // Node\n module.exports = factory();\n else if (typeof define === \"function\" && define.amd) // AMD. Register as an anonymous module.\n define(factory);\n else // Browser globals (root is window)\n root.IPv6 = factory(root);\n})(module.exports, function(root) {\n \"use strict\";\n /*\n var _in = \"fe80:0000:0000:0000:0204:61ff:fe9d:f156\";\n var _out = IPv6.best(_in);\n var _expected = \"fe80::204:61ff:fe9d:f156\";\n\n console.log(_in, _out, _expected, _out === _expected);\n */ // save current IPv6 variable, if any\n var _IPv6 = root && root.IPv6;\n function bestPresentation(address) {\n // based on:\n // Javascript to test an IPv6 address for proper format, and to\n // present the \"best text representation\" according to IETF Draft RFC at\n // http://tools.ietf.org/html/draft-ietf-6man-text-addr-representation-04\n // 8 Feb 2010 Rich Brown, Dartware, LLC\n // Please feel free to use this code as long as you provide a link to\n // http://www.intermapper.com\n // http://intermapper.com/support/tools/IPV6-Validator.aspx\n // http://download.dartware.com/thirdparty/ipv6validator.js\n var _address = address.toLowerCase();\n var segments = _address.split(\":\");\n var length = segments.length;\n var total = 8;\n // trim colons (:: or ::a:b:c… or …a:b:c::)\n if (segments[0] === \"\" && segments[1] === \"\" && segments[2] === \"\") {\n // must have been ::\n // remove first two items\n segments.shift();\n segments.shift();\n } else if (segments[0] === \"\" && segments[1] === \"\") // must have been ::xxxx\n // remove the first item\n segments.shift();\n else if (segments[length - 1] === \"\" && segments[length - 2] === \"\") // must have been xxxx::\n segments.pop();\n length = segments.length;\n // adjust total segments for IPv4 trailer\n if (segments[length - 1].indexOf(\".\") !== -1) // found a \".\" which means IPv4\n total = 7;\n // fill empty segments them with \"0000\"\n var pos;\n for(pos = 0; pos < length; pos++){\n if (segments[pos] === \"\") break;\n }\n if (pos < total) {\n segments.splice(pos, 1, \"0000\");\n while(segments.length < total)segments.splice(pos, 0, \"0000\");\n }\n // strip leading zeros\n var _segments;\n for(var i = 0; i < total; i++){\n _segments = segments[i].split(\"\");\n for(var j = 0; j < 3; j++){\n if (_segments[0] === \"0\" && _segments.length > 1) _segments.splice(0, 1);\n else break;\n }\n segments[i] = _segments.join(\"\");\n }\n // find longest sequence of zeroes and coalesce them into one segment\n var best = -1;\n var _best = 0;\n var _current = 0;\n var current = -1;\n var inzeroes = false;\n // i; already declared\n for(i = 0; i < total; i++){\n if (inzeroes) {\n if (segments[i] === \"0\") _current += 1;\n else {\n inzeroes = false;\n if (_current > _best) {\n best = current;\n _best = _current;\n }\n }\n } else if (segments[i] === \"0\") {\n inzeroes = true;\n current = i;\n _current = 1;\n }\n }\n if (_current > _best) {\n best = current;\n _best = _current;\n }\n if (_best > 1) segments.splice(best, _best, \"\");\n length = segments.length;\n // assemble remaining segments\n var result = \"\";\n if (segments[0] === \"\") result = \":\";\n for(i = 0; i < length; i++){\n result += segments[i];\n if (i === length - 1) break;\n result += \":\";\n }\n if (segments[length - 1] === \"\") result += \":\";\n return result;\n }\n function noConflict() {\n /*jshint validthis: true */ if (root.IPv6 === this) root.IPv6 = _IPv6;\n return this;\n }\n return {\n best: bestPresentation,\n noConflict: noConflict\n };\n});\n\n});\n\nparcelRegister(\"3PMOQ\", function(module, exports) {\n/*!\n * URI.js - Mutating URLs\n * Second Level Domain (SLD) Support\n *\n * Version: 1.19.11\n *\n * Author: Rodney Rehm\n * Web: http://medialize.github.io/URI.js/\n *\n * Licensed under\n * MIT License http://www.opensource.org/licenses/mit-license\n *\n */ (function(root, factory) {\n \"use strict\";\n // https://github.com/umdjs/umd/blob/master/returnExports.js\n if (0, module.exports) // Node\n module.exports = factory();\n else if (typeof define === \"function\" && define.amd) // AMD. Register as an anonymous module.\n define(factory);\n else // Browser globals (root is window)\n root.SecondLevelDomains = factory(root);\n})(module.exports, function(root) {\n \"use strict\";\n // save current SecondLevelDomains variable, if any\n var _SecondLevelDomains = root && root.SecondLevelDomains;\n var SLD = {\n // list of known Second Level Domains\n // converted list of SLDs from https://github.com/gavingmiller/second-level-domains\n // ----\n // publicsuffix.org is more current and actually used by a couple of browsers internally.\n // downside is it also contains domains like \"dyndns.org\" - which is fine for the security\n // issues browser have to deal with (SOP for cookies, etc) - but is way overboard for URI.js\n // ----\n list: {\n \"ac\": \" com gov mil net org \",\n \"ae\": \" ac co gov mil name net org pro sch \",\n \"af\": \" com edu gov net org \",\n \"al\": \" com edu gov mil net org \",\n \"ao\": \" co ed gv it og pb \",\n \"ar\": \" com edu gob gov int mil net org tur \",\n \"at\": \" ac co gv or \",\n \"au\": \" asn com csiro edu gov id net org \",\n \"ba\": \" co com edu gov mil net org rs unbi unmo unsa untz unze \",\n \"bb\": \" biz co com edu gov info net org store tv \",\n \"bh\": \" biz cc com edu gov info net org \",\n \"bn\": \" com edu gov net org \",\n \"bo\": \" com edu gob gov int mil net org tv \",\n \"br\": \" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg \",\n \"bs\": \" com edu gov net org \",\n \"bz\": \" du et om ov rg \",\n \"ca\": \" ab bc mb nb nf nl ns nt nu on pe qc sk yk \",\n \"ck\": \" biz co edu gen gov info net org \",\n \"cn\": \" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj \",\n \"co\": \" com edu gov mil net nom org \",\n \"cr\": \" ac c co ed fi go or sa \",\n \"cy\": \" ac biz com ekloges gov ltd name net org parliament press pro tm \",\n \"do\": \" art com edu gob gov mil net org sld web \",\n \"dz\": \" art asso com edu gov net org pol \",\n \"ec\": \" com edu fin gov info med mil net org pro \",\n \"eg\": \" com edu eun gov mil name net org sci \",\n \"er\": \" com edu gov ind mil net org rochest w \",\n \"es\": \" com edu gob nom org \",\n \"et\": \" biz com edu gov info name net org \",\n \"fj\": \" ac biz com info mil name net org pro \",\n \"fk\": \" ac co gov net nom org \",\n \"fr\": \" asso com f gouv nom prd presse tm \",\n \"gg\": \" co net org \",\n \"gh\": \" com edu gov mil org \",\n \"gn\": \" ac com gov net org \",\n \"gr\": \" com edu gov mil net org \",\n \"gt\": \" com edu gob ind mil net org \",\n \"gu\": \" com edu gov net org \",\n \"hk\": \" com edu gov idv net org \",\n \"hu\": \" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video \",\n \"id\": \" ac co go mil net or sch web \",\n \"il\": \" ac co gov idf k12 muni net org \",\n \"in\": \" ac co edu ernet firm gen gov i ind mil net nic org res \",\n \"iq\": \" com edu gov i mil net org \",\n \"ir\": \" ac co dnssec gov i id net org sch \",\n \"it\": \" edu gov \",\n \"je\": \" co net org \",\n \"jo\": \" com edu gov mil name net org sch \",\n \"jp\": \" ac ad co ed go gr lg ne or \",\n \"ke\": \" ac co go info me mobi ne or sc \",\n \"kh\": \" com edu gov mil net org per \",\n \"ki\": \" biz com de edu gov info mob net org tel \",\n \"km\": \" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire \",\n \"kn\": \" edu gov net org \",\n \"kr\": \" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan \",\n \"kw\": \" com edu gov net org \",\n \"ky\": \" com edu gov net org \",\n \"kz\": \" com edu gov mil net org \",\n \"lb\": \" com edu gov net org \",\n \"lk\": \" assn com edu gov grp hotel int ltd net ngo org sch soc web \",\n \"lr\": \" com edu gov net org \",\n \"lv\": \" asn com conf edu gov id mil net org \",\n \"ly\": \" com edu gov id med net org plc sch \",\n \"ma\": \" ac co gov m net org press \",\n \"mc\": \" asso tm \",\n \"me\": \" ac co edu gov its net org priv \",\n \"mg\": \" com edu gov mil nom org prd tm \",\n \"mk\": \" com edu gov inf name net org pro \",\n \"ml\": \" com edu gov net org presse \",\n \"mn\": \" edu gov org \",\n \"mo\": \" com edu gov net org \",\n \"mt\": \" com edu gov net org \",\n \"mv\": \" aero biz com coop edu gov info int mil museum name net org pro \",\n \"mw\": \" ac co com coop edu gov int museum net org \",\n \"mx\": \" com edu gob net org \",\n \"my\": \" com edu gov mil name net org sch \",\n \"nf\": \" arts com firm info net other per rec store web \",\n \"ng\": \" biz com edu gov mil mobi name net org sch \",\n \"ni\": \" ac co com edu gob mil net nom org \",\n \"np\": \" com edu gov mil net org \",\n \"nr\": \" biz com edu gov info net org \",\n \"om\": \" ac biz co com edu gov med mil museum net org pro sch \",\n \"pe\": \" com edu gob mil net nom org sld \",\n \"ph\": \" com edu gov i mil net ngo org \",\n \"pk\": \" biz com edu fam gob gok gon gop gos gov net org web \",\n \"pl\": \" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora \",\n \"pr\": \" ac biz com edu est gov info isla name net org pro prof \",\n \"ps\": \" com edu gov net org plo sec \",\n \"pw\": \" belau co ed go ne or \",\n \"ro\": \" arts com firm info nom nt org rec store tm www \",\n \"rs\": \" ac co edu gov in org \",\n \"sb\": \" com edu gov net org \",\n \"sc\": \" com edu gov net org \",\n \"sh\": \" co com edu gov net nom org \",\n \"sl\": \" com edu gov net org \",\n \"st\": \" co com consulado edu embaixada gov mil net org principe saotome store \",\n \"sv\": \" com edu gob org red \",\n \"sz\": \" ac co org \",\n \"tr\": \" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web \",\n \"tt\": \" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel \",\n \"tw\": \" club com ebiz edu game gov idv mil net org \",\n \"mu\": \" ac co com gov net or org \",\n \"mz\": \" ac co edu gov org \",\n \"na\": \" co com \",\n \"nz\": \" ac co cri geek gen govt health iwi maori mil net org parliament school \",\n \"pa\": \" abo ac com edu gob ing med net nom org sld \",\n \"pt\": \" com edu gov int net nome org publ \",\n \"py\": \" com edu gov mil net org \",\n \"qa\": \" com edu gov mil net org \",\n \"re\": \" asso com nom \",\n \"ru\": \" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk \",\n \"rw\": \" ac co com edu gouv gov int mil net \",\n \"sa\": \" com edu gov med net org pub sch \",\n \"sd\": \" com edu gov info med net org tv \",\n \"se\": \" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z \",\n \"sg\": \" com edu gov idn net org per \",\n \"sn\": \" art com edu gouv org perso univ \",\n \"sy\": \" com edu gov mil net news org \",\n \"th\": \" ac co go in mi net or \",\n \"tj\": \" ac biz co com edu go gov info int mil name net nic org test web \",\n \"tn\": \" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism \",\n \"tz\": \" ac co go ne or \",\n \"ua\": \" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt \",\n \"ug\": \" ac co go ne or org sc \",\n \"uk\": \" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc \",\n \"us\": \" dni fed isa kids nsn \",\n \"uy\": \" com edu gub mil net org \",\n \"ve\": \" co com edu gob info mil net org web \",\n \"vi\": \" co com k12 net org \",\n \"vn\": \" ac biz com edu gov health info int name net org pro \",\n \"ye\": \" co com gov ltd me net org plc \",\n \"yu\": \" ac co edu gov org \",\n \"za\": \" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web \",\n \"zm\": \" ac co com edu gov net org sch \",\n // https://en.wikipedia.org/wiki/CentralNic#Second-level_domains\n \"com\": \"ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za \",\n \"net\": \"gb jp se uk \",\n \"org\": \"ae\",\n \"de\": \"com \"\n },\n // gorhill 2013-10-25: Using indexOf() instead Regexp(). Significant boost\n // in both performance and memory footprint. No initialization required.\n // http://jsperf.com/uri-js-sld-regex-vs-binary-search/4\n // Following methods use lastIndexOf() rather than array.split() in order\n // to avoid any memory allocations.\n has: function(domain) {\n var tldOffset = domain.lastIndexOf(\".\");\n if (tldOffset <= 0 || tldOffset >= domain.length - 1) return false;\n var sldOffset = domain.lastIndexOf(\".\", tldOffset - 1);\n if (sldOffset <= 0 || sldOffset >= tldOffset - 1) return false;\n var sldList = SLD.list[domain.slice(tldOffset + 1)];\n if (!sldList) return false;\n return sldList.indexOf(\" \" + domain.slice(sldOffset + 1, tldOffset) + \" \") >= 0;\n },\n is: function(domain) {\n var tldOffset = domain.lastIndexOf(\".\");\n if (tldOffset <= 0 || tldOffset >= domain.length - 1) return false;\n var sldOffset = domain.lastIndexOf(\".\", tldOffset - 1);\n if (sldOffset >= 0) return false;\n var sldList = SLD.list[domain.slice(tldOffset + 1)];\n if (!sldList) return false;\n return sldList.indexOf(\" \" + domain.slice(0, tldOffset) + \" \") >= 0;\n },\n get: function(domain) {\n var tldOffset = domain.lastIndexOf(\".\");\n if (tldOffset <= 0 || tldOffset >= domain.length - 1) return null;\n var sldOffset = domain.lastIndexOf(\".\", tldOffset - 1);\n if (sldOffset <= 0 || sldOffset >= tldOffset - 1) return null;\n var sldList = SLD.list[domain.slice(tldOffset + 1)];\n if (!sldList) return null;\n if (sldList.indexOf(\" \" + domain.slice(sldOffset + 1, tldOffset) + \" \") < 0) return null;\n return domain.slice(sldOffset + 1);\n },\n noConflict: function() {\n if (root.SecondLevelDomains === this) root.SecondLevelDomains = _SecondLevelDomains;\n return this;\n }\n };\n return SLD;\n});\n\n});\n\n// Original code from TerriaJS\n// https://github.com/TerriaJS/terriajs/blob/master/lib/ReactViews/Map/Navigation/Compass.jsx\n// SVG images from https://cesium.com/ion/stories/ (with permission from Cesium)\n\nvar $800sp = parcelRequire(\"800sp\");\n\nvar $jJTNo = parcelRequire(\"jJTNo\");\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */ const $3baabda811939da5$export$9ba3b3f20a85bfa = {\n ATTRIBUTE: 1,\n CHILD: 2,\n PROPERTY: 3,\n BOOLEAN_ATTRIBUTE: 4,\n EVENT: 5,\n ELEMENT: 6\n}, $3baabda811939da5$export$99b43ad1ed32e735 = (t)=>(...e)=>({\n _$litDirective$: t,\n values: e\n });\nclass $3baabda811939da5$export$befdefbdce210f91 {\n constructor(t){}\n get _$AU() {\n return this._$AM._$AU;\n }\n _$AT(t, e, i) {\n this.t = t, this._$AM = e, this.i = i;\n }\n _$AS(t, e) {\n return this.update(t, e);\n }\n update(t, e) {\n return this.render(...e);\n }\n}\n\n\n/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */ const $74d80410d825d70d$var$ee = \"important\", $74d80410d825d70d$var$ie = \" !\" + $74d80410d825d70d$var$ee, $74d80410d825d70d$export$1e5b4ce2fa884e6a = (0, $3baabda811939da5$export$99b43ad1ed32e735)(class extends (0, $3baabda811939da5$export$befdefbdce210f91) {\n constructor(e){\n if (super(e), e.type !== (0, $3baabda811939da5$export$9ba3b3f20a85bfa).ATTRIBUTE || \"style\" !== e.name || e.strings?.length > 2) throw Error(\"The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.\");\n }\n render(t) {\n return Object.keys(t).reduce((e, r)=>{\n const s = t[r];\n return null == s ? e : e + `${r = r.includes(\"-\") ? r : r.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g, \"-$&\").toLowerCase()}:${s};`;\n }, \"\");\n }\n update(t, [e]) {\n const { style: r } = t.element;\n if (void 0 === this.ft) return this.ft = new Set(Object.keys(e)), this.render(e);\n for (const t of this.ft)null == e[t] && (this.ft.delete(t), t.includes(\"-\") ? r.removeProperty(t) : r[t] = null);\n for(const t in e){\n const s = e[t];\n if (null != s) {\n this.ft.add(t);\n const e = \"string\" == typeof s && s.endsWith($74d80410d825d70d$var$ie);\n t.includes(\"-\") || e ? r.setProperty(t, e ? s.slice(0, -11) : s, e ? $74d80410d825d70d$var$ee : \"\") : r[t] = s;\n }\n }\n return 0, $jJTNo.noChange;\n }\n});\n\n\n\n\n\nvar $kWQjc = parcelRequire(\"kWQjc\");\nvar $bXwZF = parcelRequire(\"bXwZF\");\nvar $kWQjc = parcelRequire(\"kWQjc\");\n\nvar $bXwZF = parcelRequire(\"bXwZF\");\n\nvar $bXwZF = parcelRequire(\"bXwZF\");\n\nvar $3pzcG = parcelRequire(\"3pzcG\");\n\nvar $8w8ZH = parcelRequire(\"8w8ZH\");\n\nvar $jQJji = parcelRequire(\"jQJji\");\n\nvar $AXvpI = parcelRequire(\"AXvpI\");\n\nvar $bXwZF = parcelRequire(\"bXwZF\");\n\nvar $jQJji = parcelRequire(\"jQJji\");\n\nvar $1vHsR = parcelRequire(\"1vHsR\");\n\nvar $AXvpI = parcelRequire(\"AXvpI\");\nconst $667f84b0348f3801$var$scaleToGeodeticSurfaceIntersection = new (0, $bXwZF.default)();\nconst $667f84b0348f3801$var$scaleToGeodeticSurfaceGradient = new (0, $bXwZF.default)();\n/**\n * Scales the provided Cartesian position along the geodetic surface normal\n * so that it is on the surface of this ellipsoid. If the position is\n * at the center of the ellipsoid, this function returns undefined.\n *\n * @param {Cartesian3} cartesian The Cartesian position to scale.\n * @param {Cartesian3} oneOverRadii One over radii of the ellipsoid.\n * @param {Cartesian3} oneOverRadiiSquared One over radii squared of the ellipsoid.\n * @param {number} centerToleranceSquared Tolerance for closeness to the center.\n * @param {Cartesian3} [result] The object onto which to store the result.\n * @returns {Cartesian3} The modified result parameter, a new Cartesian3 instance if none was provided, or undefined if the position is at the center.\n *\n * @function scaleToGeodeticSurface\n *\n * @private\n */ function $667f84b0348f3801$var$scaleToGeodeticSurface(cartesian, oneOverRadii, oneOverRadiiSquared, centerToleranceSquared, result) {\n //>>includeStart('debug', pragmas.debug);\n if (!(0, $jQJji.default)(cartesian)) throw new (0, $1vHsR.default)(\"cartesian is required.\");\n if (!(0, $jQJji.default)(oneOverRadii)) throw new (0, $1vHsR.default)(\"oneOverRadii is required.\");\n if (!(0, $jQJji.default)(oneOverRadiiSquared)) throw new (0, $1vHsR.default)(\"oneOverRadiiSquared is required.\");\n if (!(0, $jQJji.default)(centerToleranceSquared)) throw new (0, $1vHsR.default)(\"centerToleranceSquared is required.\");\n //>>includeEnd('debug');\n const positionX = cartesian.x;\n const positionY = cartesian.y;\n const positionZ = cartesian.z;\n const oneOverRadiiX = oneOverRadii.x;\n const oneOverRadiiY = oneOverRadii.y;\n const oneOverRadiiZ = oneOverRadii.z;\n const x2 = positionX * positionX * oneOverRadiiX * oneOverRadiiX;\n const y2 = positionY * positionY * oneOverRadiiY * oneOverRadiiY;\n const z2 = positionZ * positionZ * oneOverRadiiZ * oneOverRadiiZ;\n // Compute the squared ellipsoid norm.\n const squaredNorm = x2 + y2 + z2;\n const ratio = Math.sqrt(1.0 / squaredNorm);\n // As an initial approximation, assume that the radial intersection is the projection point.\n const intersection = (0, $bXwZF.default).multiplyByScalar(cartesian, ratio, $667f84b0348f3801$var$scaleToGeodeticSurfaceIntersection);\n // If the position is near the center, the iteration will not converge.\n if (squaredNorm < centerToleranceSquared) return !isFinite(ratio) ? undefined : (0, $bXwZF.default).clone(intersection, result);\n const oneOverRadiiSquaredX = oneOverRadiiSquared.x;\n const oneOverRadiiSquaredY = oneOverRadiiSquared.y;\n const oneOverRadiiSquaredZ = oneOverRadiiSquared.z;\n // Use the gradient at the intersection point in place of the true unit normal.\n // The difference in magnitude will be absorbed in the multiplier.\n const gradient = $667f84b0348f3801$var$scaleToGeodeticSurfaceGradient;\n gradient.x = intersection.x * oneOverRadiiSquaredX * 2.0;\n gradient.y = intersection.y * oneOverRadiiSquaredY * 2.0;\n gradient.z = intersection.z * oneOverRadiiSquaredZ * 2.0;\n // Compute the initial guess at the normal vector multiplier, lambda.\n let lambda = (1.0 - ratio) * (0, $bXwZF.default).magnitude(cartesian) / (0.5 * (0, $bXwZF.default).magnitude(gradient));\n let correction = 0.0;\n let func;\n let denominator;\n let xMultiplier;\n let yMultiplier;\n let zMultiplier;\n let xMultiplier2;\n let yMultiplier2;\n let zMultiplier2;\n let xMultiplier3;\n let yMultiplier3;\n let zMultiplier3;\n do {\n lambda -= correction;\n xMultiplier = 1.0 / (1.0 + lambda * oneOverRadiiSquaredX);\n yMultiplier = 1.0 / (1.0 + lambda * oneOverRadiiSquaredY);\n zMultiplier = 1.0 / (1.0 + lambda * oneOverRadiiSquaredZ);\n xMultiplier2 = xMultiplier * xMultiplier;\n yMultiplier2 = yMultiplier * yMultiplier;\n zMultiplier2 = zMultiplier * zMultiplier;\n xMultiplier3 = xMultiplier2 * xMultiplier;\n yMultiplier3 = yMultiplier2 * yMultiplier;\n zMultiplier3 = zMultiplier2 * zMultiplier;\n func = x2 * xMultiplier2 + y2 * yMultiplier2 + z2 * zMultiplier2 - 1.0;\n // \"denominator\" here refers to the use of this expression in the velocity and acceleration\n // computations in the sections to follow.\n denominator = x2 * xMultiplier3 * oneOverRadiiSquaredX + y2 * yMultiplier3 * oneOverRadiiSquaredY + z2 * zMultiplier3 * oneOverRadiiSquaredZ;\n const derivative = -2 * denominator;\n correction = func / derivative;\n }while (Math.abs(func) > (0, $AXvpI.default).EPSILON12);\n if (!(0, $jQJji.default)(result)) return new (0, $bXwZF.default)(positionX * xMultiplier, positionY * yMultiplier, positionZ * zMultiplier);\n result.x = positionX * xMultiplier;\n result.y = positionY * yMultiplier;\n result.z = positionZ * zMultiplier;\n return result;\n}\nvar $667f84b0348f3801$export$2e2bcd8739ae039 = $667f84b0348f3801$var$scaleToGeodeticSurface;\n\n\n/**\n * A position defined by longitude, latitude, and height.\n * @alias Cartographic\n * @constructor\n *\n * @param {number} [longitude=0.0] The longitude, in radians.\n * @param {number} [latitude=0.0] The latitude, in radians.\n * @param {number} [height=0.0] The height, in meters, above the ellipsoid.\n *\n * @see Ellipsoid\n */ function $69f9194a3ef67d4b$var$Cartographic(longitude, latitude, height) {\n /**\n * The longitude, in radians.\n * @type {number}\n * @default 0.0\n */ this.longitude = (0, $8w8ZH.default)(longitude, 0.0);\n /**\n * The latitude, in radians.\n * @type {number}\n * @default 0.0\n */ this.latitude = (0, $8w8ZH.default)(latitude, 0.0);\n /**\n * The height, in meters, above the ellipsoid.\n * @type {number}\n * @default 0.0\n */ this.height = (0, $8w8ZH.default)(height, 0.0);\n}\n/**\n * Creates a new Cartographic instance from longitude and latitude\n * specified in radians.\n *\n * @param {number} longitude The longitude, in radians.\n * @param {number} latitude The latitude, in radians.\n * @param {number} [height=0.0] The height, in meters, above the ellipsoid.\n * @param {Cartographic} [result] The object onto which to store the result.\n * @returns {Cartographic} The modified result parameter or a new Cartographic instance if one was not provided.\n */ $69f9194a3ef67d4b$var$Cartographic.fromRadians = function(longitude, latitude, height, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.number(\"longitude\", longitude);\n (0, $3pzcG.default).typeOf.number(\"latitude\", latitude);\n //>>includeEnd('debug');\n height = (0, $8w8ZH.default)(height, 0.0);\n if (!(0, $jQJji.default)(result)) return new $69f9194a3ef67d4b$var$Cartographic(longitude, latitude, height);\n result.longitude = longitude;\n result.latitude = latitude;\n result.height = height;\n return result;\n};\n/**\n * Creates a new Cartographic instance from longitude and latitude\n * specified in degrees. The values in the resulting object will\n * be in radians.\n *\n * @param {number} longitude The longitude, in degrees.\n * @param {number} latitude The latitude, in degrees.\n * @param {number} [height=0.0] The height, in meters, above the ellipsoid.\n * @param {Cartographic} [result] The object onto which to store the result.\n * @returns {Cartographic} The modified result parameter or a new Cartographic instance if one was not provided.\n */ $69f9194a3ef67d4b$var$Cartographic.fromDegrees = function(longitude, latitude, height, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.number(\"longitude\", longitude);\n (0, $3pzcG.default).typeOf.number(\"latitude\", latitude);\n //>>includeEnd('debug');\n longitude = (0, $AXvpI.default).toRadians(longitude);\n latitude = (0, $AXvpI.default).toRadians(latitude);\n return $69f9194a3ef67d4b$var$Cartographic.fromRadians(longitude, latitude, height, result);\n};\nconst $69f9194a3ef67d4b$var$cartesianToCartographicN = new (0, $bXwZF.default)();\nconst $69f9194a3ef67d4b$var$cartesianToCartographicP = new (0, $bXwZF.default)();\nconst $69f9194a3ef67d4b$var$cartesianToCartographicH = new (0, $bXwZF.default)();\n// To avoid circular dependencies, these are set by Ellipsoid when Ellipsoid.default is set.\n$69f9194a3ef67d4b$var$Cartographic._ellipsoidOneOverRadii = new (0, $bXwZF.default)(1.0 / 6378137.0, 1.0 / 6378137.0, 1.0 / 6356752.3142451793);\n$69f9194a3ef67d4b$var$Cartographic._ellipsoidOneOverRadiiSquared = new (0, $bXwZF.default)(1.0 / 40680631590769, 1.0 / 40680631590769, 0.000000000000024747391015697002);\n$69f9194a3ef67d4b$var$Cartographic._ellipsoidCenterToleranceSquared = (0, $AXvpI.default).EPSILON1;\n/**\n * Creates a new Cartographic instance from a Cartesian position. The values in the\n * resulting object will be in radians.\n *\n * @param {Cartesian3} cartesian The Cartesian position to convert to cartographic representation.\n * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid on which the position lies.\n * @param {Cartographic} [result] The object onto which to store the result.\n * @returns {Cartographic} The modified result parameter, new Cartographic instance if none was provided, or undefined if the cartesian is at the center of the ellipsoid.\n */ $69f9194a3ef67d4b$var$Cartographic.fromCartesian = function(cartesian, ellipsoid, result) {\n const oneOverRadii = (0, $jQJji.default)(ellipsoid) ? ellipsoid.oneOverRadii : $69f9194a3ef67d4b$var$Cartographic._ellipsoidOneOverRadii;\n const oneOverRadiiSquared = (0, $jQJji.default)(ellipsoid) ? ellipsoid.oneOverRadiiSquared : $69f9194a3ef67d4b$var$Cartographic._ellipsoidOneOverRadiiSquared;\n const centerToleranceSquared = (0, $jQJji.default)(ellipsoid) ? ellipsoid._centerToleranceSquared : $69f9194a3ef67d4b$var$Cartographic._ellipsoidCenterToleranceSquared;\n //`cartesian is required.` is thrown from scaleToGeodeticSurface\n const p = (0, $667f84b0348f3801$export$2e2bcd8739ae039)(cartesian, oneOverRadii, oneOverRadiiSquared, centerToleranceSquared, $69f9194a3ef67d4b$var$cartesianToCartographicP);\n if (!(0, $jQJji.default)(p)) return undefined;\n let n = (0, $bXwZF.default).multiplyComponents(p, oneOverRadiiSquared, $69f9194a3ef67d4b$var$cartesianToCartographicN);\n n = (0, $bXwZF.default).normalize(n, n);\n const h = (0, $bXwZF.default).subtract(cartesian, p, $69f9194a3ef67d4b$var$cartesianToCartographicH);\n const longitude = Math.atan2(n.y, n.x);\n const latitude = Math.asin(n.z);\n const height = (0, $AXvpI.default).sign((0, $bXwZF.default).dot(h, cartesian)) * (0, $bXwZF.default).magnitude(h);\n if (!(0, $jQJji.default)(result)) return new $69f9194a3ef67d4b$var$Cartographic(longitude, latitude, height);\n result.longitude = longitude;\n result.latitude = latitude;\n result.height = height;\n return result;\n};\n/**\n * Creates a new Cartesian3 instance from a Cartographic input. The values in the inputted\n * object should be in radians.\n *\n * @param {Cartographic} cartographic Input to be converted into a Cartesian3 output.\n * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid on which the position lies.\n * @param {Cartesian3} [result] The object onto which to store the result.\n * @returns {Cartesian3} The position\n */ $69f9194a3ef67d4b$var$Cartographic.toCartesian = function(cartographic, ellipsoid, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).defined(\"cartographic\", cartographic);\n //>>includeEnd('debug');\n return (0, $bXwZF.default).fromRadians(cartographic.longitude, cartographic.latitude, cartographic.height, ellipsoid, result);\n};\n/**\n * Duplicates a Cartographic instance.\n *\n * @param {Cartographic} cartographic The cartographic to duplicate.\n * @param {Cartographic} [result] The object onto which to store the result.\n * @returns {Cartographic} The modified result parameter or a new Cartographic instance if one was not provided. (Returns undefined if cartographic is undefined)\n */ $69f9194a3ef67d4b$var$Cartographic.clone = function(cartographic, result) {\n if (!(0, $jQJji.default)(cartographic)) return undefined;\n if (!(0, $jQJji.default)(result)) return new $69f9194a3ef67d4b$var$Cartographic(cartographic.longitude, cartographic.latitude, cartographic.height);\n result.longitude = cartographic.longitude;\n result.latitude = cartographic.latitude;\n result.height = cartographic.height;\n return result;\n};\n/**\n * Compares the provided cartographics componentwise and returns\n * true if they are equal, false otherwise.\n *\n * @param {Cartographic} [left] The first cartographic.\n * @param {Cartographic} [right] The second cartographic.\n * @returns {boolean} true if left and right are equal, false otherwise.\n */ $69f9194a3ef67d4b$var$Cartographic.equals = function(left, right) {\n return left === right || (0, $jQJji.default)(left) && (0, $jQJji.default)(right) && left.longitude === right.longitude && left.latitude === right.latitude && left.height === right.height;\n};\n/**\n * Compares the provided cartographics componentwise and returns\n * true if they are within the provided epsilon,\n * false otherwise.\n *\n * @param {Cartographic} [left] The first cartographic.\n * @param {Cartographic} [right] The second cartographic.\n * @param {number} [epsilon=0] The epsilon to use for equality testing.\n * @returns {boolean} true if left and right are within the provided epsilon, false otherwise.\n */ $69f9194a3ef67d4b$var$Cartographic.equalsEpsilon = function(left, right, epsilon) {\n epsilon = (0, $8w8ZH.default)(epsilon, 0);\n return left === right || (0, $jQJji.default)(left) && (0, $jQJji.default)(right) && Math.abs(left.longitude - right.longitude) <= epsilon && Math.abs(left.latitude - right.latitude) <= epsilon && Math.abs(left.height - right.height) <= epsilon;\n};\n/**\n * An immutable Cartographic instance initialized to (0.0, 0.0, 0.0).\n *\n * @type {Cartographic}\n * @constant\n */ $69f9194a3ef67d4b$var$Cartographic.ZERO = Object.freeze(new $69f9194a3ef67d4b$var$Cartographic(0.0, 0.0, 0.0));\n/**\n * Duplicates this instance.\n *\n * @param {Cartographic} [result] The object onto which to store the result.\n * @returns {Cartographic} The modified result parameter or a new Cartographic instance if one was not provided.\n */ $69f9194a3ef67d4b$var$Cartographic.prototype.clone = function(result) {\n return $69f9194a3ef67d4b$var$Cartographic.clone(this, result);\n};\n/**\n * Compares the provided against this cartographic componentwise and returns\n * true if they are equal, false otherwise.\n *\n * @param {Cartographic} [right] The second cartographic.\n * @returns {boolean} true if left and right are equal, false otherwise.\n */ $69f9194a3ef67d4b$var$Cartographic.prototype.equals = function(right) {\n return $69f9194a3ef67d4b$var$Cartographic.equals(this, right);\n};\n/**\n * Compares the provided against this cartographic componentwise and returns\n * true if they are within the provided epsilon,\n * false otherwise.\n *\n * @param {Cartographic} [right] The second cartographic.\n * @param {number} [epsilon=0] The epsilon to use for equality testing.\n * @returns {boolean} true if left and right are within the provided epsilon, false otherwise.\n */ $69f9194a3ef67d4b$var$Cartographic.prototype.equalsEpsilon = function(right, epsilon) {\n return $69f9194a3ef67d4b$var$Cartographic.equalsEpsilon(this, right, epsilon);\n};\n/**\n * Creates a string representing this cartographic in the format '(longitude, latitude, height)'.\n *\n * @returns {string} A string representing the provided cartographic in the format '(longitude, latitude, height)'.\n */ $69f9194a3ef67d4b$var$Cartographic.prototype.toString = function() {\n return `(${this.longitude}, ${this.latitude}, ${this.height})`;\n};\nvar $69f9194a3ef67d4b$export$2e2bcd8739ae039 = $69f9194a3ef67d4b$var$Cartographic;\n\n\n\nvar $3pzcG = parcelRequire(\"3pzcG\");\n\nvar $8w8ZH = parcelRequire(\"8w8ZH\");\n\nvar $jQJji = parcelRequire(\"jQJji\");\n\nvar $1vHsR = parcelRequire(\"1vHsR\");\n\nvar $AXvpI = parcelRequire(\"AXvpI\");\n\nfunction $5237444a2d786ec9$var$initialize(ellipsoid, x, y, z) {\n x = (0, $8w8ZH.default)(x, 0.0);\n y = (0, $8w8ZH.default)(y, 0.0);\n z = (0, $8w8ZH.default)(z, 0.0);\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.number.greaterThanOrEquals(\"x\", x, 0.0);\n (0, $3pzcG.default).typeOf.number.greaterThanOrEquals(\"y\", y, 0.0);\n (0, $3pzcG.default).typeOf.number.greaterThanOrEquals(\"z\", z, 0.0);\n //>>includeEnd('debug');\n ellipsoid._radii = new (0, $bXwZF.default)(x, y, z);\n ellipsoid._radiiSquared = new (0, $bXwZF.default)(x * x, y * y, z * z);\n ellipsoid._radiiToTheFourth = new (0, $bXwZF.default)(x * x * x * x, y * y * y * y, z * z * z * z);\n ellipsoid._oneOverRadii = new (0, $bXwZF.default)(x === 0.0 ? 0.0 : 1.0 / x, y === 0.0 ? 0.0 : 1.0 / y, z === 0.0 ? 0.0 : 1.0 / z);\n ellipsoid._oneOverRadiiSquared = new (0, $bXwZF.default)(x === 0.0 ? 0.0 : 1.0 / (x * x), y === 0.0 ? 0.0 : 1.0 / (y * y), z === 0.0 ? 0.0 : 1.0 / (z * z));\n ellipsoid._minimumRadius = Math.min(x, y, z);\n ellipsoid._maximumRadius = Math.max(x, y, z);\n ellipsoid._centerToleranceSquared = (0, $AXvpI.default).EPSILON1;\n if (ellipsoid._radiiSquared.z !== 0) ellipsoid._squaredXOverSquaredZ = ellipsoid._radiiSquared.x / ellipsoid._radiiSquared.z;\n}\n/**\n * A quadratic surface defined in Cartesian coordinates by the equation\n * (x / a)^2 + (y / b)^2 + (z / c)^2 = 1. Primarily used\n * by Cesium to represent the shape of planetary bodies.\n *\n * Rather than constructing this object directly, one of the provided\n * constants is normally used.\n * @alias Ellipsoid\n * @constructor\n *\n * @param {number} [x=0] The radius in the x direction.\n * @param {number} [y=0] The radius in the y direction.\n * @param {number} [z=0] The radius in the z direction.\n *\n * @exception {DeveloperError} All radii components must be greater than or equal to zero.\n *\n * @see Ellipsoid.fromCartesian3\n * @see Ellipsoid.WGS84\n * @see Ellipsoid.UNIT_SPHERE\n */ function $5237444a2d786ec9$var$Ellipsoid(x, y, z) {\n this._radii = undefined;\n this._radiiSquared = undefined;\n this._radiiToTheFourth = undefined;\n this._oneOverRadii = undefined;\n this._oneOverRadiiSquared = undefined;\n this._minimumRadius = undefined;\n this._maximumRadius = undefined;\n this._centerToleranceSquared = undefined;\n this._squaredXOverSquaredZ = undefined;\n $5237444a2d786ec9$var$initialize(this, x, y, z);\n}\nObject.defineProperties($5237444a2d786ec9$var$Ellipsoid.prototype, {\n /**\n * Gets the radii of the ellipsoid.\n * @memberof Ellipsoid.prototype\n * @type {Cartesian3}\n * @readonly\n */ radii: {\n get: function() {\n return this._radii;\n }\n },\n /**\n * Gets the squared radii of the ellipsoid.\n * @memberof Ellipsoid.prototype\n * @type {Cartesian3}\n * @readonly\n */ radiiSquared: {\n get: function() {\n return this._radiiSquared;\n }\n },\n /**\n * Gets the radii of the ellipsoid raise to the fourth power.\n * @memberof Ellipsoid.prototype\n * @type {Cartesian3}\n * @readonly\n */ radiiToTheFourth: {\n get: function() {\n return this._radiiToTheFourth;\n }\n },\n /**\n * Gets one over the radii of the ellipsoid.\n * @memberof Ellipsoid.prototype\n * @type {Cartesian3}\n * @readonly\n */ oneOverRadii: {\n get: function() {\n return this._oneOverRadii;\n }\n },\n /**\n * Gets one over the squared radii of the ellipsoid.\n * @memberof Ellipsoid.prototype\n * @type {Cartesian3}\n * @readonly\n */ oneOverRadiiSquared: {\n get: function() {\n return this._oneOverRadiiSquared;\n }\n },\n /**\n * Gets the minimum radius of the ellipsoid.\n * @memberof Ellipsoid.prototype\n * @type {number}\n * @readonly\n */ minimumRadius: {\n get: function() {\n return this._minimumRadius;\n }\n },\n /**\n * Gets the maximum radius of the ellipsoid.\n * @memberof Ellipsoid.prototype\n * @type {number}\n * @readonly\n */ maximumRadius: {\n get: function() {\n return this._maximumRadius;\n }\n }\n});\n/**\n * Duplicates an Ellipsoid instance.\n *\n * @param {Ellipsoid} ellipsoid The ellipsoid to duplicate.\n * @param {Ellipsoid} [result] The object onto which to store the result, or undefined if a new\n * instance should be created.\n * @returns {Ellipsoid} The cloned Ellipsoid. (Returns undefined if ellipsoid is undefined)\n */ $5237444a2d786ec9$var$Ellipsoid.clone = function(ellipsoid, result) {\n if (!(0, $jQJji.default)(ellipsoid)) return undefined;\n const radii = ellipsoid._radii;\n if (!(0, $jQJji.default)(result)) return new $5237444a2d786ec9$var$Ellipsoid(radii.x, radii.y, radii.z);\n (0, $bXwZF.default).clone(radii, result._radii);\n (0, $bXwZF.default).clone(ellipsoid._radiiSquared, result._radiiSquared);\n (0, $bXwZF.default).clone(ellipsoid._radiiToTheFourth, result._radiiToTheFourth);\n (0, $bXwZF.default).clone(ellipsoid._oneOverRadii, result._oneOverRadii);\n (0, $bXwZF.default).clone(ellipsoid._oneOverRadiiSquared, result._oneOverRadiiSquared);\n result._minimumRadius = ellipsoid._minimumRadius;\n result._maximumRadius = ellipsoid._maximumRadius;\n result._centerToleranceSquared = ellipsoid._centerToleranceSquared;\n return result;\n};\n/**\n * Computes an Ellipsoid from a Cartesian specifying the radii in x, y, and z directions.\n *\n * @param {Cartesian3} [cartesian=Cartesian3.ZERO] The ellipsoid's radius in the x, y, and z directions.\n * @param {Ellipsoid} [result] The object onto which to store the result, or undefined if a new\n * instance should be created.\n * @returns {Ellipsoid} A new Ellipsoid instance.\n *\n * @exception {DeveloperError} All radii components must be greater than or equal to zero.\n *\n * @see Ellipsoid.WGS84\n * @see Ellipsoid.UNIT_SPHERE\n */ $5237444a2d786ec9$var$Ellipsoid.fromCartesian3 = function(cartesian, result) {\n if (!(0, $jQJji.default)(result)) result = new $5237444a2d786ec9$var$Ellipsoid();\n if (!(0, $jQJji.default)(cartesian)) return result;\n $5237444a2d786ec9$var$initialize(result, cartesian.x, cartesian.y, cartesian.z);\n return result;\n};\n/**\n * An Ellipsoid instance initialized to the WGS84 standard.\n *\n * @type {Ellipsoid}\n * @constant\n */ $5237444a2d786ec9$var$Ellipsoid.WGS84 = Object.freeze(new $5237444a2d786ec9$var$Ellipsoid(6378137.0, 6378137.0, 6356752.3142451793));\n/**\n * An Ellipsoid instance initialized to radii of (1.0, 1.0, 1.0).\n *\n * @type {Ellipsoid}\n * @constant\n */ $5237444a2d786ec9$var$Ellipsoid.UNIT_SPHERE = Object.freeze(new $5237444a2d786ec9$var$Ellipsoid(1.0, 1.0, 1.0));\n/**\n * An Ellipsoid instance initialized to a sphere with the lunar radius.\n *\n * @type {Ellipsoid}\n * @constant\n */ $5237444a2d786ec9$var$Ellipsoid.MOON = Object.freeze(new $5237444a2d786ec9$var$Ellipsoid((0, $AXvpI.default).LUNAR_RADIUS, (0, $AXvpI.default).LUNAR_RADIUS, (0, $AXvpI.default).LUNAR_RADIUS));\n$5237444a2d786ec9$var$Ellipsoid._default = $5237444a2d786ec9$var$Ellipsoid.WGS84;\nObject.defineProperties($5237444a2d786ec9$var$Ellipsoid, {\n /**\n * The default ellipsoid used when not otherwise specified.\n * @memberof Ellipsoid\n * @type {Ellipsoid}\n * @example\n * Cesium.Ellipsoid.default = Cesium.Ellipsoid.MOON;\n *\n * // Apollo 11 landing site\n * const position = Cesium.Cartesian3.fromRadians(\n * 0.67416,\n * 23.47315,\n * );\n */ default: {\n get: function() {\n return $5237444a2d786ec9$var$Ellipsoid._default;\n },\n set: function(value) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"value\", value);\n //>>includeEnd('debug');\n $5237444a2d786ec9$var$Ellipsoid._default = value;\n (0, $bXwZF.default)._ellipsoidRadiiSquared = value.radiiSquared;\n (0, $69f9194a3ef67d4b$export$2e2bcd8739ae039)._ellipsoidOneOverRadii = value.oneOverRadii;\n (0, $69f9194a3ef67d4b$export$2e2bcd8739ae039)._ellipsoidOneOverRadiiSquared = value.oneOverRadiiSquared;\n (0, $69f9194a3ef67d4b$export$2e2bcd8739ae039)._ellipsoidCenterToleranceSquared = value._centerToleranceSquared;\n }\n }\n});\n/**\n * Duplicates an Ellipsoid instance.\n *\n * @param {Ellipsoid} [result] The object onto which to store the result, or undefined if a new\n * instance should be created.\n * @returns {Ellipsoid} The cloned Ellipsoid.\n */ $5237444a2d786ec9$var$Ellipsoid.prototype.clone = function(result) {\n return $5237444a2d786ec9$var$Ellipsoid.clone(this, result);\n};\n/**\n * The number of elements used to pack the object into an array.\n * @type {number}\n */ $5237444a2d786ec9$var$Ellipsoid.packedLength = (0, $bXwZF.default).packedLength;\n/**\n * Stores the provided instance into the provided array.\n *\n * @param {Ellipsoid} value The value to pack.\n * @param {number[]} array The array to pack into.\n * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.\n *\n * @returns {number[]} The array that was packed into\n */ $5237444a2d786ec9$var$Ellipsoid.pack = function(value, array, startingIndex) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"value\", value);\n (0, $3pzcG.default).defined(\"array\", array);\n //>>includeEnd('debug');\n startingIndex = (0, $8w8ZH.default)(startingIndex, 0);\n (0, $bXwZF.default).pack(value._radii, array, startingIndex);\n return array;\n};\n/**\n * Retrieves an instance from a packed array.\n *\n * @param {number[]} array The packed array.\n * @param {number} [startingIndex=0] The starting index of the element to be unpacked.\n * @param {Ellipsoid} [result] The object into which to store the result.\n * @returns {Ellipsoid} The modified result parameter or a new Ellipsoid instance if one was not provided.\n */ $5237444a2d786ec9$var$Ellipsoid.unpack = function(array, startingIndex, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).defined(\"array\", array);\n //>>includeEnd('debug');\n startingIndex = (0, $8w8ZH.default)(startingIndex, 0);\n const radii = (0, $bXwZF.default).unpack(array, startingIndex);\n return $5237444a2d786ec9$var$Ellipsoid.fromCartesian3(radii, result);\n};\n/**\n * Computes the unit vector directed from the center of this ellipsoid toward the provided Cartesian position.\n * @function\n *\n * @param {Cartesian3} cartesian The Cartesian for which to to determine the geocentric normal.\n * @param {Cartesian3} [result] The object onto which to store the result.\n * @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if none was provided.\n */ $5237444a2d786ec9$var$Ellipsoid.prototype.geocentricSurfaceNormal = (0, $bXwZF.default).normalize;\n/**\n * Computes the normal of the plane tangent to the surface of the ellipsoid at the provided position.\n *\n * @param {Cartographic} cartographic The cartographic position for which to to determine the geodetic normal.\n * @param {Cartesian3} [result] The object onto which to store the result.\n * @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if none was provided.\n */ $5237444a2d786ec9$var$Ellipsoid.prototype.geodeticSurfaceNormalCartographic = function(cartographic, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"cartographic\", cartographic);\n //>>includeEnd('debug');\n const longitude = cartographic.longitude;\n const latitude = cartographic.latitude;\n const cosLatitude = Math.cos(latitude);\n const x = cosLatitude * Math.cos(longitude);\n const y = cosLatitude * Math.sin(longitude);\n const z = Math.sin(latitude);\n if (!(0, $jQJji.default)(result)) result = new (0, $bXwZF.default)();\n result.x = x;\n result.y = y;\n result.z = z;\n return (0, $bXwZF.default).normalize(result, result);\n};\n/**\n * Computes the normal of the plane tangent to the surface of the ellipsoid at the provided position.\n *\n * @param {Cartesian3} cartesian The Cartesian position for which to to determine the surface normal.\n * @param {Cartesian3} [result] The object onto which to store the result.\n * @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if none was provided, or undefined if a normal cannot be found.\n */ $5237444a2d786ec9$var$Ellipsoid.prototype.geodeticSurfaceNormal = function(cartesian, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"cartesian\", cartesian);\n if (isNaN(cartesian.x) || isNaN(cartesian.y) || isNaN(cartesian.z)) throw new (0, $1vHsR.default)(\"cartesian has a NaN component\");\n //>>includeEnd('debug');\n if ((0, $bXwZF.default).equalsEpsilon(cartesian, (0, $bXwZF.default).ZERO, (0, $AXvpI.default).EPSILON14)) return undefined;\n if (!(0, $jQJji.default)(result)) result = new (0, $bXwZF.default)();\n result = (0, $bXwZF.default).multiplyComponents(cartesian, this._oneOverRadiiSquared, result);\n return (0, $bXwZF.default).normalize(result, result);\n};\nconst $5237444a2d786ec9$var$cartographicToCartesianNormal = new (0, $bXwZF.default)();\nconst $5237444a2d786ec9$var$cartographicToCartesianK = new (0, $bXwZF.default)();\n/**\n * Converts the provided cartographic to Cartesian representation.\n *\n * @param {Cartographic} cartographic The cartographic position.\n * @param {Cartesian3} [result] The object onto which to store the result.\n * @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if none was provided.\n *\n * @example\n * //Create a Cartographic and determine it's Cartesian representation on a WGS84 ellipsoid.\n * const position = new Cesium.Cartographic(Cesium.Math.toRadians(21), Cesium.Math.toRadians(78), 5000);\n * const cartesianPosition = Cesium.Ellipsoid.WGS84.cartographicToCartesian(position);\n */ $5237444a2d786ec9$var$Ellipsoid.prototype.cartographicToCartesian = function(cartographic, result) {\n //`cartographic is required` is thrown from geodeticSurfaceNormalCartographic.\n const n = $5237444a2d786ec9$var$cartographicToCartesianNormal;\n const k = $5237444a2d786ec9$var$cartographicToCartesianK;\n this.geodeticSurfaceNormalCartographic(cartographic, n);\n (0, $bXwZF.default).multiplyComponents(this._radiiSquared, n, k);\n const gamma = Math.sqrt((0, $bXwZF.default).dot(n, k));\n (0, $bXwZF.default).divideByScalar(k, gamma, k);\n (0, $bXwZF.default).multiplyByScalar(n, cartographic.height, n);\n if (!(0, $jQJji.default)(result)) result = new (0, $bXwZF.default)();\n return (0, $bXwZF.default).add(k, n, result);\n};\n/**\n * Converts the provided array of cartographics to an array of Cartesians.\n *\n * @param {Cartographic[]} cartographics An array of cartographic positions.\n * @param {Cartesian3[]} [result] The object onto which to store the result.\n * @returns {Cartesian3[]} The modified result parameter or a new Array instance if none was provided.\n *\n * @example\n * //Convert an array of Cartographics and determine their Cartesian representation on a WGS84 ellipsoid.\n * const positions = [new Cesium.Cartographic(Cesium.Math.toRadians(21), Cesium.Math.toRadians(78), 0),\n * new Cesium.Cartographic(Cesium.Math.toRadians(21.321), Cesium.Math.toRadians(78.123), 100),\n * new Cesium.Cartographic(Cesium.Math.toRadians(21.645), Cesium.Math.toRadians(78.456), 250)];\n * const cartesianPositions = Cesium.Ellipsoid.WGS84.cartographicArrayToCartesianArray(positions);\n */ $5237444a2d786ec9$var$Ellipsoid.prototype.cartographicArrayToCartesianArray = function(cartographics, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).defined(\"cartographics\", cartographics);\n //>>includeEnd('debug')\n const length = cartographics.length;\n if (!(0, $jQJji.default)(result)) result = new Array(length);\n else result.length = length;\n for(let i = 0; i < length; i++)result[i] = this.cartographicToCartesian(cartographics[i], result[i]);\n return result;\n};\nconst $5237444a2d786ec9$var$cartesianToCartographicN = new (0, $bXwZF.default)();\nconst $5237444a2d786ec9$var$cartesianToCartographicP = new (0, $bXwZF.default)();\nconst $5237444a2d786ec9$var$cartesianToCartographicH = new (0, $bXwZF.default)();\n/**\n * Converts the provided cartesian to cartographic representation.\n * The cartesian is undefined at the center of the ellipsoid.\n *\n * @param {Cartesian3} cartesian The Cartesian position to convert to cartographic representation.\n * @param {Cartographic} [result] The object onto which to store the result.\n * @returns {Cartographic} The modified result parameter, new Cartographic instance if none was provided, or undefined if the cartesian is at the center of the ellipsoid.\n *\n * @example\n * //Create a Cartesian and determine it's Cartographic representation on a WGS84 ellipsoid.\n * const position = new Cesium.Cartesian3(17832.12, 83234.52, 952313.73);\n * const cartographicPosition = Cesium.Ellipsoid.WGS84.cartesianToCartographic(position);\n */ $5237444a2d786ec9$var$Ellipsoid.prototype.cartesianToCartographic = function(cartesian, result) {\n //`cartesian is required.` is thrown from scaleToGeodeticSurface\n const p = this.scaleToGeodeticSurface(cartesian, $5237444a2d786ec9$var$cartesianToCartographicP);\n if (!(0, $jQJji.default)(p)) return undefined;\n const n = this.geodeticSurfaceNormal(p, $5237444a2d786ec9$var$cartesianToCartographicN);\n const h = (0, $bXwZF.default).subtract(cartesian, p, $5237444a2d786ec9$var$cartesianToCartographicH);\n const longitude = Math.atan2(n.y, n.x);\n const latitude = Math.asin(n.z);\n const height = (0, $AXvpI.default).sign((0, $bXwZF.default).dot(h, cartesian)) * (0, $bXwZF.default).magnitude(h);\n if (!(0, $jQJji.default)(result)) return new (0, $69f9194a3ef67d4b$export$2e2bcd8739ae039)(longitude, latitude, height);\n result.longitude = longitude;\n result.latitude = latitude;\n result.height = height;\n return result;\n};\n/**\n * Converts the provided array of cartesians to an array of cartographics.\n *\n * @param {Cartesian3[]} cartesians An array of Cartesian positions.\n * @param {Cartographic[]} [result] The object onto which to store the result.\n * @returns {Cartographic[]} The modified result parameter or a new Array instance if none was provided.\n *\n * @example\n * //Create an array of Cartesians and determine their Cartographic representation on a WGS84 ellipsoid.\n * const positions = [new Cesium.Cartesian3(17832.12, 83234.52, 952313.73),\n * new Cesium.Cartesian3(17832.13, 83234.53, 952313.73),\n * new Cesium.Cartesian3(17832.14, 83234.54, 952313.73)]\n * const cartographicPositions = Cesium.Ellipsoid.WGS84.cartesianArrayToCartographicArray(positions);\n */ $5237444a2d786ec9$var$Ellipsoid.prototype.cartesianArrayToCartographicArray = function(cartesians, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).defined(\"cartesians\", cartesians);\n //>>includeEnd('debug');\n const length = cartesians.length;\n if (!(0, $jQJji.default)(result)) result = new Array(length);\n else result.length = length;\n for(let i = 0; i < length; ++i)result[i] = this.cartesianToCartographic(cartesians[i], result[i]);\n return result;\n};\n/**\n * Scales the provided Cartesian position along the geodetic surface normal\n * so that it is on the surface of this ellipsoid. If the position is\n * at the center of the ellipsoid, this function returns undefined.\n *\n * @param {Cartesian3} cartesian The Cartesian position to scale.\n * @param {Cartesian3} [result] The object onto which to store the result.\n * @returns {Cartesian3} The modified result parameter, a new Cartesian3 instance if none was provided, or undefined if the position is at the center.\n */ $5237444a2d786ec9$var$Ellipsoid.prototype.scaleToGeodeticSurface = function(cartesian, result) {\n return (0, $667f84b0348f3801$export$2e2bcd8739ae039)(cartesian, this._oneOverRadii, this._oneOverRadiiSquared, this._centerToleranceSquared, result);\n};\n/**\n * Scales the provided Cartesian position along the geocentric surface normal\n * so that it is on the surface of this ellipsoid.\n *\n * @param {Cartesian3} cartesian The Cartesian position to scale.\n * @param {Cartesian3} [result] The object onto which to store the result.\n * @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if none was provided.\n */ $5237444a2d786ec9$var$Ellipsoid.prototype.scaleToGeocentricSurface = function(cartesian, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"cartesian\", cartesian);\n //>>includeEnd('debug');\n if (!(0, $jQJji.default)(result)) result = new (0, $bXwZF.default)();\n const positionX = cartesian.x;\n const positionY = cartesian.y;\n const positionZ = cartesian.z;\n const oneOverRadiiSquared = this._oneOverRadiiSquared;\n const beta = 1.0 / Math.sqrt(positionX * positionX * oneOverRadiiSquared.x + positionY * positionY * oneOverRadiiSquared.y + positionZ * positionZ * oneOverRadiiSquared.z);\n return (0, $bXwZF.default).multiplyByScalar(cartesian, beta, result);\n};\n/**\n * Transforms a Cartesian X, Y, Z position to the ellipsoid-scaled space by multiplying\n * its components by the result of {@link Ellipsoid#oneOverRadii}.\n *\n * @param {Cartesian3} position The position to transform.\n * @param {Cartesian3} [result] The position to which to copy the result, or undefined to create and\n * return a new instance.\n * @returns {Cartesian3} The position expressed in the scaled space. The returned instance is the\n * one passed as the result parameter if it is not undefined, or a new instance of it is.\n */ $5237444a2d786ec9$var$Ellipsoid.prototype.transformPositionToScaledSpace = function(position, result) {\n if (!(0, $jQJji.default)(result)) result = new (0, $bXwZF.default)();\n return (0, $bXwZF.default).multiplyComponents(position, this._oneOverRadii, result);\n};\n/**\n * Transforms a Cartesian X, Y, Z position from the ellipsoid-scaled space by multiplying\n * its components by the result of {@link Ellipsoid#radii}.\n *\n * @param {Cartesian3} position The position to transform.\n * @param {Cartesian3} [result] The position to which to copy the result, or undefined to create and\n * return a new instance.\n * @returns {Cartesian3} The position expressed in the unscaled space. The returned instance is the\n * one passed as the result parameter if it is not undefined, or a new instance of it is.\n */ $5237444a2d786ec9$var$Ellipsoid.prototype.transformPositionFromScaledSpace = function(position, result) {\n if (!(0, $jQJji.default)(result)) result = new (0, $bXwZF.default)();\n return (0, $bXwZF.default).multiplyComponents(position, this._radii, result);\n};\n/**\n * Compares this Ellipsoid against the provided Ellipsoid componentwise and returns\n * true if they are equal, false otherwise.\n *\n * @param {Ellipsoid} [right] The other Ellipsoid.\n * @returns {boolean} true if they are equal, false otherwise.\n */ $5237444a2d786ec9$var$Ellipsoid.prototype.equals = function(right) {\n return this === right || (0, $jQJji.default)(right) && (0, $bXwZF.default).equals(this._radii, right._radii);\n};\n/**\n * Creates a string representing this Ellipsoid in the format '(radii.x, radii.y, radii.z)'.\n *\n * @returns {string} A string representing this ellipsoid in the format '(radii.x, radii.y, radii.z)'.\n */ $5237444a2d786ec9$var$Ellipsoid.prototype.toString = function() {\n return this._radii.toString();\n};\n/**\n * Computes a point which is the intersection of the surface normal with the z-axis.\n *\n * @param {Cartesian3} position the position. must be on the surface of the ellipsoid.\n * @param {number} [buffer = 0.0] A buffer to subtract from the ellipsoid size when checking if the point is inside the ellipsoid.\n * In earth case, with common earth datums, there is no need for this buffer since the intersection point is always (relatively) very close to the center.\n * In WGS84 datum, intersection point is at max z = +-42841.31151331382 (0.673% of z-axis).\n * Intersection point could be outside the ellipsoid if the ratio of MajorAxis / AxisOfRotation is bigger than the square root of 2\n * @param {Cartesian3} [result] The cartesian to which to copy the result, or undefined to create and\n * return a new instance.\n * @returns {Cartesian3 | undefined} the intersection point if it's inside the ellipsoid, undefined otherwise\n *\n * @exception {DeveloperError} position is required.\n * @exception {DeveloperError} Ellipsoid must be an ellipsoid of revolution (radii.x == radii.y).\n * @exception {DeveloperError} Ellipsoid.radii.z must be greater than 0.\n */ $5237444a2d786ec9$var$Ellipsoid.prototype.getSurfaceNormalIntersectionWithZAxis = function(position, buffer, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"position\", position);\n if (!(0, $AXvpI.default).equalsEpsilon(this._radii.x, this._radii.y, (0, $AXvpI.default).EPSILON15)) throw new (0, $1vHsR.default)(\"Ellipsoid must be an ellipsoid of revolution (radii.x == radii.y)\");\n (0, $3pzcG.default).typeOf.number.greaterThan(\"Ellipsoid.radii.z\", this._radii.z, 0);\n //>>includeEnd('debug');\n buffer = (0, $8w8ZH.default)(buffer, 0.0);\n const squaredXOverSquaredZ = this._squaredXOverSquaredZ;\n if (!(0, $jQJji.default)(result)) result = new (0, $bXwZF.default)();\n result.x = 0.0;\n result.y = 0.0;\n result.z = position.z * (1 - squaredXOverSquaredZ);\n if (Math.abs(result.z) >= this._radii.z - buffer) return undefined;\n return result;\n};\nconst $5237444a2d786ec9$var$scratchEndpoint = new (0, $bXwZF.default)();\n/**\n * Computes the ellipsoid curvatures at a given position on the surface.\n *\n * @param {Cartesian3} surfacePosition The position on the ellipsoid surface where curvatures will be calculated.\n * @param {Cartesian2} [result] The cartesian to which to copy the result, or undefined to create and return a new instance.\n * @returns {Cartesian2} The local curvature of the ellipsoid surface at the provided position, in east and north directions.\n *\n * @exception {DeveloperError} position is required.\n */ $5237444a2d786ec9$var$Ellipsoid.prototype.getLocalCurvature = function(surfacePosition, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"surfacePosition\", surfacePosition);\n //>>includeEnd('debug');\n if (!(0, $jQJji.default)(result)) result = new (0, $kWQjc.default)();\n const primeVerticalEndpoint = this.getSurfaceNormalIntersectionWithZAxis(surfacePosition, 0.0, $5237444a2d786ec9$var$scratchEndpoint);\n const primeVerticalRadius = (0, $bXwZF.default).distance(surfacePosition, primeVerticalEndpoint);\n // meridional radius = (1 - e^2) * primeVerticalRadius^3 / a^2\n // where 1 - e^2 = b^2 / a^2,\n // so meridional = b^2 * primeVerticalRadius^3 / a^4\n // = (b * primeVerticalRadius / a^2)^2 * primeVertical\n const radiusRatio = this.minimumRadius * primeVerticalRadius / this.maximumRadius ** 2;\n const meridionalRadius = primeVerticalRadius * radiusRatio ** 2;\n return (0, $kWQjc.default).fromElements(1.0 / primeVerticalRadius, 1.0 / meridionalRadius, result);\n};\nconst $5237444a2d786ec9$var$abscissas = [\n 0.14887433898163,\n 0.43339539412925,\n 0.67940956829902,\n 0.86506336668898,\n 0.97390652851717,\n 0.0\n];\nconst $5237444a2d786ec9$var$weights = [\n 0.29552422471475,\n 0.26926671930999,\n 0.21908636251598,\n 0.14945134915058,\n 0.066671344308684,\n 0.0\n];\n/**\n * Compute the 10th order Gauss-Legendre Quadrature of the given definite integral.\n *\n * @param {number} a The lower bound for the integration.\n * @param {number} b The upper bound for the integration.\n * @param {Ellipsoid~RealValuedScalarFunction} func The function to integrate.\n * @returns {number} The value of the integral of the given function over the given domain.\n *\n * @private\n */ function $5237444a2d786ec9$var$gaussLegendreQuadrature(a, b, func) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.number(\"a\", a);\n (0, $3pzcG.default).typeOf.number(\"b\", b);\n (0, $3pzcG.default).typeOf.func(\"func\", func);\n //>>includeEnd('debug');\n // The range is half of the normal range since the five weights add to one (ten weights add to two).\n // The values of the abscissas are multiplied by two to account for this.\n const xMean = 0.5 * (b + a);\n const xRange = 0.5 * (b - a);\n let sum = 0.0;\n for(let i = 0; i < 5; i++){\n const dx = xRange * $5237444a2d786ec9$var$abscissas[i];\n sum += $5237444a2d786ec9$var$weights[i] * (func(xMean + dx) + func(xMean - dx));\n }\n // Scale the sum to the range of x.\n sum *= xRange;\n return sum;\n}\n/**\n * A real valued scalar function.\n * @callback Ellipsoid~RealValuedScalarFunction\n *\n * @param {number} x The value used to evaluate the function.\n * @returns {number} The value of the function at x.\n *\n * @private\n */ /**\n * Computes an approximation of the surface area of a rectangle on the surface of an ellipsoid using\n * Gauss-Legendre 10th order quadrature.\n *\n * @param {Rectangle} rectangle The rectangle used for computing the surface area.\n * @returns {number} The approximate area of the rectangle on the surface of this ellipsoid.\n */ $5237444a2d786ec9$var$Ellipsoid.prototype.surfaceArea = function(rectangle) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"rectangle\", rectangle);\n //>>includeEnd('debug');\n const minLongitude = rectangle.west;\n let maxLongitude = rectangle.east;\n const minLatitude = rectangle.south;\n const maxLatitude = rectangle.north;\n while(maxLongitude < minLongitude)maxLongitude += (0, $AXvpI.default).TWO_PI;\n const radiiSquared = this._radiiSquared;\n const a2 = radiiSquared.x;\n const b2 = radiiSquared.y;\n const c2 = radiiSquared.z;\n const a2b2 = a2 * b2;\n return $5237444a2d786ec9$var$gaussLegendreQuadrature(minLatitude, maxLatitude, function(lat) {\n // phi represents the angle measured from the north pole\n // sin(phi) = sin(pi / 2 - lat) = cos(lat), cos(phi) is similar\n const sinPhi = Math.cos(lat);\n const cosPhi = Math.sin(lat);\n return Math.cos(lat) * $5237444a2d786ec9$var$gaussLegendreQuadrature(minLongitude, maxLongitude, function(lon) {\n const cosTheta = Math.cos(lon);\n const sinTheta = Math.sin(lon);\n return Math.sqrt(a2b2 * cosPhi * cosPhi + c2 * (b2 * cosTheta * cosTheta + a2 * sinTheta * sinTheta) * sinPhi * sinPhi);\n });\n });\n};\nvar $5237444a2d786ec9$export$2e2bcd8739ae039 = $5237444a2d786ec9$var$Ellipsoid;\n\n\nvar $AXvpI = parcelRequire(\"AXvpI\");\nvar $bXwZF = parcelRequire(\"bXwZF\");\n\nvar $3pzcG = parcelRequire(\"3pzcG\");\n\nvar $8w8ZH = parcelRequire(\"8w8ZH\");\n\nvar $jQJji = parcelRequire(\"jQJji\");\n\nvar $1vHsR = parcelRequire(\"1vHsR\");\n\nvar $AXvpI = parcelRequire(\"AXvpI\");\n/**\n * A 4D Cartesian point.\n * @alias Cartesian4\n * @constructor\n *\n * @param {number} [x=0.0] The X component.\n * @param {number} [y=0.0] The Y component.\n * @param {number} [z=0.0] The Z component.\n * @param {number} [w=0.0] The W component.\n *\n * @see Cartesian2\n * @see Cartesian3\n * @see Packable\n */ function $dba8420c01d8a224$var$Cartesian4(x, y, z, w) {\n /**\n * The X component.\n * @type {number}\n * @default 0.0\n */ this.x = (0, $8w8ZH.default)(x, 0.0);\n /**\n * The Y component.\n * @type {number}\n * @default 0.0\n */ this.y = (0, $8w8ZH.default)(y, 0.0);\n /**\n * The Z component.\n * @type {number}\n * @default 0.0\n */ this.z = (0, $8w8ZH.default)(z, 0.0);\n /**\n * The W component.\n * @type {number}\n * @default 0.0\n */ this.w = (0, $8w8ZH.default)(w, 0.0);\n}\n/**\n * Creates a Cartesian4 instance from x, y, z and w coordinates.\n *\n * @param {number} x The x coordinate.\n * @param {number} y The y coordinate.\n * @param {number} z The z coordinate.\n * @param {number} w The w coordinate.\n * @param {Cartesian4} [result] The object onto which to store the result.\n * @returns {Cartesian4} The modified result parameter or a new Cartesian4 instance if one was not provided.\n */ $dba8420c01d8a224$var$Cartesian4.fromElements = function(x, y, z, w, result) {\n if (!(0, $jQJji.default)(result)) return new $dba8420c01d8a224$var$Cartesian4(x, y, z, w);\n result.x = x;\n result.y = y;\n result.z = z;\n result.w = w;\n return result;\n};\n/**\n * Creates a Cartesian4 instance from a {@link Color}. red, green, blue,\n * and alpha map to x, y, z, and w, respectively.\n *\n * @param {Color} color The source color.\n * @param {Cartesian4} [result] The object onto which to store the result.\n * @returns {Cartesian4} The modified result parameter or a new Cartesian4 instance if one was not provided.\n */ $dba8420c01d8a224$var$Cartesian4.fromColor = function(color, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"color\", color);\n //>>includeEnd('debug');\n if (!(0, $jQJji.default)(result)) return new $dba8420c01d8a224$var$Cartesian4(color.red, color.green, color.blue, color.alpha);\n result.x = color.red;\n result.y = color.green;\n result.z = color.blue;\n result.w = color.alpha;\n return result;\n};\n/**\n * Duplicates a Cartesian4 instance.\n *\n * @param {Cartesian4} cartesian The Cartesian to duplicate.\n * @param {Cartesian4} [result] The object onto which to store the result.\n * @returns {Cartesian4} The modified result parameter or a new Cartesian4 instance if one was not provided. (Returns undefined if cartesian is undefined)\n */ $dba8420c01d8a224$var$Cartesian4.clone = function(cartesian, result) {\n if (!(0, $jQJji.default)(cartesian)) return undefined;\n if (!(0, $jQJji.default)(result)) return new $dba8420c01d8a224$var$Cartesian4(cartesian.x, cartesian.y, cartesian.z, cartesian.w);\n result.x = cartesian.x;\n result.y = cartesian.y;\n result.z = cartesian.z;\n result.w = cartesian.w;\n return result;\n};\n/**\n * The number of elements used to pack the object into an array.\n * @type {number}\n */ $dba8420c01d8a224$var$Cartesian4.packedLength = 4;\n/**\n * Stores the provided instance into the provided array.\n *\n * @param {Cartesian4} value The value to pack.\n * @param {number[]} array The array to pack into.\n * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.\n *\n * @returns {number[]} The array that was packed into\n */ $dba8420c01d8a224$var$Cartesian4.pack = function(value, array, startingIndex) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"value\", value);\n (0, $3pzcG.default).defined(\"array\", array);\n //>>includeEnd('debug');\n startingIndex = (0, $8w8ZH.default)(startingIndex, 0);\n array[startingIndex++] = value.x;\n array[startingIndex++] = value.y;\n array[startingIndex++] = value.z;\n array[startingIndex] = value.w;\n return array;\n};\n/**\n * Retrieves an instance from a packed array.\n *\n * @param {number[]} array The packed array.\n * @param {number} [startingIndex=0] The starting index of the element to be unpacked.\n * @param {Cartesian4} [result] The object into which to store the result.\n * @returns {Cartesian4} The modified result parameter or a new Cartesian4 instance if one was not provided.\n */ $dba8420c01d8a224$var$Cartesian4.unpack = function(array, startingIndex, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).defined(\"array\", array);\n //>>includeEnd('debug');\n startingIndex = (0, $8w8ZH.default)(startingIndex, 0);\n if (!(0, $jQJji.default)(result)) result = new $dba8420c01d8a224$var$Cartesian4();\n result.x = array[startingIndex++];\n result.y = array[startingIndex++];\n result.z = array[startingIndex++];\n result.w = array[startingIndex];\n return result;\n};\n/**\n * Flattens an array of Cartesian4s into an array of components.\n *\n * @param {Cartesian4[]} array The array of cartesians to pack.\n * @param {number[]} [result] The array onto which to store the result. If this is a typed array, it must have array.length * 4 components, else a {@link DeveloperError} will be thrown. If it is a regular array, it will be resized to have (array.length * 4) elements.\n * @returns {number[]} The packed array.\n */ $dba8420c01d8a224$var$Cartesian4.packArray = function(array, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).defined(\"array\", array);\n //>>includeEnd('debug');\n const length = array.length;\n const resultLength = length * 4;\n if (!(0, $jQJji.default)(result)) result = new Array(resultLength);\n else if (!Array.isArray(result) && result.length !== resultLength) //>>includeStart('debug', pragmas.debug);\n throw new (0, $1vHsR.default)(\"If result is a typed array, it must have exactly array.length * 4 elements\");\n else if (result.length !== resultLength) result.length = resultLength;\n for(let i = 0; i < length; ++i)$dba8420c01d8a224$var$Cartesian4.pack(array[i], result, i * 4);\n return result;\n};\n/**\n * Unpacks an array of cartesian components into an array of Cartesian4s.\n *\n * @param {number[]} array The array of components to unpack.\n * @param {Cartesian4[]} [result] The array onto which to store the result.\n * @returns {Cartesian4[]} The unpacked array.\n */ $dba8420c01d8a224$var$Cartesian4.unpackArray = function(array, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).defined(\"array\", array);\n (0, $3pzcG.default).typeOf.number.greaterThanOrEquals(\"array.length\", array.length, 4);\n if (array.length % 4 !== 0) throw new (0, $1vHsR.default)(\"array length must be a multiple of 4.\");\n //>>includeEnd('debug');\n const length = array.length;\n if (!(0, $jQJji.default)(result)) result = new Array(length / 4);\n else result.length = length / 4;\n for(let i = 0; i < length; i += 4){\n const index = i / 4;\n result[index] = $dba8420c01d8a224$var$Cartesian4.unpack(array, i, result[index]);\n }\n return result;\n};\n/**\n * Creates a Cartesian4 from four consecutive elements in an array.\n * @function\n *\n * @param {number[]} array The array whose four consecutive elements correspond to the x, y, z, and w components, respectively.\n * @param {number} [startingIndex=0] The offset into the array of the first element, which corresponds to the x component.\n * @param {Cartesian4} [result] The object onto which to store the result.\n * @returns {Cartesian4} The modified result parameter or a new Cartesian4 instance if one was not provided.\n *\n * @example\n * // Create a Cartesian4 with (1.0, 2.0, 3.0, 4.0)\n * const v = [1.0, 2.0, 3.0, 4.0];\n * const p = Cesium.Cartesian4.fromArray(v);\n *\n * // Create a Cartesian4 with (1.0, 2.0, 3.0, 4.0) using an offset into an array\n * const v2 = [0.0, 0.0, 1.0, 2.0, 3.0, 4.0];\n * const p2 = Cesium.Cartesian4.fromArray(v2, 2);\n */ $dba8420c01d8a224$var$Cartesian4.fromArray = $dba8420c01d8a224$var$Cartesian4.unpack;\n/**\n * Computes the value of the maximum component for the supplied Cartesian.\n *\n * @param {Cartesian4} cartesian The cartesian to use.\n * @returns {number} The value of the maximum component.\n */ $dba8420c01d8a224$var$Cartesian4.maximumComponent = function(cartesian) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"cartesian\", cartesian);\n //>>includeEnd('debug');\n return Math.max(cartesian.x, cartesian.y, cartesian.z, cartesian.w);\n};\n/**\n * Computes the value of the minimum component for the supplied Cartesian.\n *\n * @param {Cartesian4} cartesian The cartesian to use.\n * @returns {number} The value of the minimum component.\n */ $dba8420c01d8a224$var$Cartesian4.minimumComponent = function(cartesian) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"cartesian\", cartesian);\n //>>includeEnd('debug');\n return Math.min(cartesian.x, cartesian.y, cartesian.z, cartesian.w);\n};\n/**\n * Compares two Cartesians and computes a Cartesian which contains the minimum components of the supplied Cartesians.\n *\n * @param {Cartesian4} first A cartesian to compare.\n * @param {Cartesian4} second A cartesian to compare.\n * @param {Cartesian4} result The object into which to store the result.\n * @returns {Cartesian4} A cartesian with the minimum components.\n */ $dba8420c01d8a224$var$Cartesian4.minimumByComponent = function(first, second, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"first\", first);\n (0, $3pzcG.default).typeOf.object(\"second\", second);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n result.x = Math.min(first.x, second.x);\n result.y = Math.min(first.y, second.y);\n result.z = Math.min(first.z, second.z);\n result.w = Math.min(first.w, second.w);\n return result;\n};\n/**\n * Compares two Cartesians and computes a Cartesian which contains the maximum components of the supplied Cartesians.\n *\n * @param {Cartesian4} first A cartesian to compare.\n * @param {Cartesian4} second A cartesian to compare.\n * @param {Cartesian4} result The object into which to store the result.\n * @returns {Cartesian4} A cartesian with the maximum components.\n */ $dba8420c01d8a224$var$Cartesian4.maximumByComponent = function(first, second, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"first\", first);\n (0, $3pzcG.default).typeOf.object(\"second\", second);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n result.x = Math.max(first.x, second.x);\n result.y = Math.max(first.y, second.y);\n result.z = Math.max(first.z, second.z);\n result.w = Math.max(first.w, second.w);\n return result;\n};\n/**\n * Constrain a value to lie between two values.\n *\n * @param {Cartesian4} value The value to clamp.\n * @param {Cartesian4} min The minimum bound.\n * @param {Cartesian4} max The maximum bound.\n * @param {Cartesian4} result The object into which to store the result.\n * @returns {Cartesian4} The clamped value such that min <= result <= max.\n */ $dba8420c01d8a224$var$Cartesian4.clamp = function(value, min, max, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"value\", value);\n (0, $3pzcG.default).typeOf.object(\"min\", min);\n (0, $3pzcG.default).typeOf.object(\"max\", max);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n const x = (0, $AXvpI.default).clamp(value.x, min.x, max.x);\n const y = (0, $AXvpI.default).clamp(value.y, min.y, max.y);\n const z = (0, $AXvpI.default).clamp(value.z, min.z, max.z);\n const w = (0, $AXvpI.default).clamp(value.w, min.w, max.w);\n result.x = x;\n result.y = y;\n result.z = z;\n result.w = w;\n return result;\n};\n/**\n * Computes the provided Cartesian's squared magnitude.\n *\n * @param {Cartesian4} cartesian The Cartesian instance whose squared magnitude is to be computed.\n * @returns {number} The squared magnitude.\n */ $dba8420c01d8a224$var$Cartesian4.magnitudeSquared = function(cartesian) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"cartesian\", cartesian);\n //>>includeEnd('debug');\n return cartesian.x * cartesian.x + cartesian.y * cartesian.y + cartesian.z * cartesian.z + cartesian.w * cartesian.w;\n};\n/**\n * Computes the Cartesian's magnitude (length).\n *\n * @param {Cartesian4} cartesian The Cartesian instance whose magnitude is to be computed.\n * @returns {number} The magnitude.\n */ $dba8420c01d8a224$var$Cartesian4.magnitude = function(cartesian) {\n return Math.sqrt($dba8420c01d8a224$var$Cartesian4.magnitudeSquared(cartesian));\n};\nconst $dba8420c01d8a224$var$distanceScratch = new $dba8420c01d8a224$var$Cartesian4();\n/**\n * Computes the 4-space distance between two points.\n *\n * @param {Cartesian4} left The first point to compute the distance from.\n * @param {Cartesian4} right The second point to compute the distance to.\n * @returns {number} The distance between two points.\n *\n * @example\n * // Returns 1.0\n * const d = Cesium.Cartesian4.distance(\n * new Cesium.Cartesian4(1.0, 0.0, 0.0, 0.0),\n * new Cesium.Cartesian4(2.0, 0.0, 0.0, 0.0));\n */ $dba8420c01d8a224$var$Cartesian4.distance = function(left, right) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"left\", left);\n (0, $3pzcG.default).typeOf.object(\"right\", right);\n //>>includeEnd('debug');\n $dba8420c01d8a224$var$Cartesian4.subtract(left, right, $dba8420c01d8a224$var$distanceScratch);\n return $dba8420c01d8a224$var$Cartesian4.magnitude($dba8420c01d8a224$var$distanceScratch);\n};\n/**\n * Computes the squared distance between two points. Comparing squared distances\n * using this function is more efficient than comparing distances using {@link Cartesian4#distance}.\n *\n * @param {Cartesian4} left The first point to compute the distance from.\n * @param {Cartesian4} right The second point to compute the distance to.\n * @returns {number} The distance between two points.\n *\n * @example\n * // Returns 4.0, not 2.0\n * const d = Cesium.Cartesian4.distance(\n * new Cesium.Cartesian4(1.0, 0.0, 0.0, 0.0),\n * new Cesium.Cartesian4(3.0, 0.0, 0.0, 0.0));\n */ $dba8420c01d8a224$var$Cartesian4.distanceSquared = function(left, right) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"left\", left);\n (0, $3pzcG.default).typeOf.object(\"right\", right);\n //>>includeEnd('debug');\n $dba8420c01d8a224$var$Cartesian4.subtract(left, right, $dba8420c01d8a224$var$distanceScratch);\n return $dba8420c01d8a224$var$Cartesian4.magnitudeSquared($dba8420c01d8a224$var$distanceScratch);\n};\n/**\n * Computes the normalized form of the supplied Cartesian.\n *\n * @param {Cartesian4} cartesian The Cartesian to be normalized.\n * @param {Cartesian4} result The object onto which to store the result.\n * @returns {Cartesian4} The modified result parameter.\n */ $dba8420c01d8a224$var$Cartesian4.normalize = function(cartesian, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"cartesian\", cartesian);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n const magnitude = $dba8420c01d8a224$var$Cartesian4.magnitude(cartesian);\n result.x = cartesian.x / magnitude;\n result.y = cartesian.y / magnitude;\n result.z = cartesian.z / magnitude;\n result.w = cartesian.w / magnitude;\n //>>includeStart('debug', pragmas.debug);\n if (isNaN(result.x) || isNaN(result.y) || isNaN(result.z) || isNaN(result.w)) throw new (0, $1vHsR.default)(\"normalized result is not a number\");\n //>>includeEnd('debug');\n return result;\n};\n/**\n * Computes the dot (scalar) product of two Cartesians.\n *\n * @param {Cartesian4} left The first Cartesian.\n * @param {Cartesian4} right The second Cartesian.\n * @returns {number} The dot product.\n */ $dba8420c01d8a224$var$Cartesian4.dot = function(left, right) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"left\", left);\n (0, $3pzcG.default).typeOf.object(\"right\", right);\n //>>includeEnd('debug');\n return left.x * right.x + left.y * right.y + left.z * right.z + left.w * right.w;\n};\n/**\n * Computes the componentwise product of two Cartesians.\n *\n * @param {Cartesian4} left The first Cartesian.\n * @param {Cartesian4} right The second Cartesian.\n * @param {Cartesian4} result The object onto which to store the result.\n * @returns {Cartesian4} The modified result parameter.\n */ $dba8420c01d8a224$var$Cartesian4.multiplyComponents = function(left, right, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"left\", left);\n (0, $3pzcG.default).typeOf.object(\"right\", right);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n result.x = left.x * right.x;\n result.y = left.y * right.y;\n result.z = left.z * right.z;\n result.w = left.w * right.w;\n return result;\n};\n/**\n * Computes the componentwise quotient of two Cartesians.\n *\n * @param {Cartesian4} left The first Cartesian.\n * @param {Cartesian4} right The second Cartesian.\n * @param {Cartesian4} result The object onto which to store the result.\n * @returns {Cartesian4} The modified result parameter.\n */ $dba8420c01d8a224$var$Cartesian4.divideComponents = function(left, right, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"left\", left);\n (0, $3pzcG.default).typeOf.object(\"right\", right);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n result.x = left.x / right.x;\n result.y = left.y / right.y;\n result.z = left.z / right.z;\n result.w = left.w / right.w;\n return result;\n};\n/**\n * Computes the componentwise sum of two Cartesians.\n *\n * @param {Cartesian4} left The first Cartesian.\n * @param {Cartesian4} right The second Cartesian.\n * @param {Cartesian4} result The object onto which to store the result.\n * @returns {Cartesian4} The modified result parameter.\n */ $dba8420c01d8a224$var$Cartesian4.add = function(left, right, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"left\", left);\n (0, $3pzcG.default).typeOf.object(\"right\", right);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n result.x = left.x + right.x;\n result.y = left.y + right.y;\n result.z = left.z + right.z;\n result.w = left.w + right.w;\n return result;\n};\n/**\n * Computes the componentwise difference of two Cartesians.\n *\n * @param {Cartesian4} left The first Cartesian.\n * @param {Cartesian4} right The second Cartesian.\n * @param {Cartesian4} result The object onto which to store the result.\n * @returns {Cartesian4} The modified result parameter.\n */ $dba8420c01d8a224$var$Cartesian4.subtract = function(left, right, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"left\", left);\n (0, $3pzcG.default).typeOf.object(\"right\", right);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n result.x = left.x - right.x;\n result.y = left.y - right.y;\n result.z = left.z - right.z;\n result.w = left.w - right.w;\n return result;\n};\n/**\n * Multiplies the provided Cartesian componentwise by the provided scalar.\n *\n * @param {Cartesian4} cartesian The Cartesian to be scaled.\n * @param {number} scalar The scalar to multiply with.\n * @param {Cartesian4} result The object onto which to store the result.\n * @returns {Cartesian4} The modified result parameter.\n */ $dba8420c01d8a224$var$Cartesian4.multiplyByScalar = function(cartesian, scalar, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"cartesian\", cartesian);\n (0, $3pzcG.default).typeOf.number(\"scalar\", scalar);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n result.x = cartesian.x * scalar;\n result.y = cartesian.y * scalar;\n result.z = cartesian.z * scalar;\n result.w = cartesian.w * scalar;\n return result;\n};\n/**\n * Divides the provided Cartesian componentwise by the provided scalar.\n *\n * @param {Cartesian4} cartesian The Cartesian to be divided.\n * @param {number} scalar The scalar to divide by.\n * @param {Cartesian4} result The object onto which to store the result.\n * @returns {Cartesian4} The modified result parameter.\n */ $dba8420c01d8a224$var$Cartesian4.divideByScalar = function(cartesian, scalar, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"cartesian\", cartesian);\n (0, $3pzcG.default).typeOf.number(\"scalar\", scalar);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n result.x = cartesian.x / scalar;\n result.y = cartesian.y / scalar;\n result.z = cartesian.z / scalar;\n result.w = cartesian.w / scalar;\n return result;\n};\n/**\n * Negates the provided Cartesian.\n *\n * @param {Cartesian4} cartesian The Cartesian to be negated.\n * @param {Cartesian4} result The object onto which to store the result.\n * @returns {Cartesian4} The modified result parameter.\n */ $dba8420c01d8a224$var$Cartesian4.negate = function(cartesian, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"cartesian\", cartesian);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n result.x = -cartesian.x;\n result.y = -cartesian.y;\n result.z = -cartesian.z;\n result.w = -cartesian.w;\n return result;\n};\n/**\n * Computes the absolute value of the provided Cartesian.\n *\n * @param {Cartesian4} cartesian The Cartesian whose absolute value is to be computed.\n * @param {Cartesian4} result The object onto which to store the result.\n * @returns {Cartesian4} The modified result parameter.\n */ $dba8420c01d8a224$var$Cartesian4.abs = function(cartesian, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"cartesian\", cartesian);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n result.x = Math.abs(cartesian.x);\n result.y = Math.abs(cartesian.y);\n result.z = Math.abs(cartesian.z);\n result.w = Math.abs(cartesian.w);\n return result;\n};\nconst $dba8420c01d8a224$var$lerpScratch = new $dba8420c01d8a224$var$Cartesian4();\n/**\n * Computes the linear interpolation or extrapolation at t using the provided cartesians.\n *\n * @param {Cartesian4} start The value corresponding to t at 0.0.\n * @param {Cartesian4}end The value corresponding to t at 1.0.\n * @param {number} t The point along t at which to interpolate.\n * @param {Cartesian4} result The object onto which to store the result.\n * @returns {Cartesian4} The modified result parameter.\n */ $dba8420c01d8a224$var$Cartesian4.lerp = function(start, end, t, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"start\", start);\n (0, $3pzcG.default).typeOf.object(\"end\", end);\n (0, $3pzcG.default).typeOf.number(\"t\", t);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n $dba8420c01d8a224$var$Cartesian4.multiplyByScalar(end, t, $dba8420c01d8a224$var$lerpScratch);\n result = $dba8420c01d8a224$var$Cartesian4.multiplyByScalar(start, 1.0 - t, result);\n return $dba8420c01d8a224$var$Cartesian4.add($dba8420c01d8a224$var$lerpScratch, result, result);\n};\nconst $dba8420c01d8a224$var$mostOrthogonalAxisScratch = new $dba8420c01d8a224$var$Cartesian4();\n/**\n * Returns the axis that is most orthogonal to the provided Cartesian.\n *\n * @param {Cartesian4} cartesian The Cartesian on which to find the most orthogonal axis.\n * @param {Cartesian4} result The object onto which to store the result.\n * @returns {Cartesian4} The most orthogonal axis.\n */ $dba8420c01d8a224$var$Cartesian4.mostOrthogonalAxis = function(cartesian, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"cartesian\", cartesian);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n const f = $dba8420c01d8a224$var$Cartesian4.normalize(cartesian, $dba8420c01d8a224$var$mostOrthogonalAxisScratch);\n $dba8420c01d8a224$var$Cartesian4.abs(f, f);\n if (f.x <= f.y) {\n if (f.x <= f.z) {\n if (f.x <= f.w) result = $dba8420c01d8a224$var$Cartesian4.clone($dba8420c01d8a224$var$Cartesian4.UNIT_X, result);\n else result = $dba8420c01d8a224$var$Cartesian4.clone($dba8420c01d8a224$var$Cartesian4.UNIT_W, result);\n } else if (f.z <= f.w) result = $dba8420c01d8a224$var$Cartesian4.clone($dba8420c01d8a224$var$Cartesian4.UNIT_Z, result);\n else result = $dba8420c01d8a224$var$Cartesian4.clone($dba8420c01d8a224$var$Cartesian4.UNIT_W, result);\n } else if (f.y <= f.z) {\n if (f.y <= f.w) result = $dba8420c01d8a224$var$Cartesian4.clone($dba8420c01d8a224$var$Cartesian4.UNIT_Y, result);\n else result = $dba8420c01d8a224$var$Cartesian4.clone($dba8420c01d8a224$var$Cartesian4.UNIT_W, result);\n } else if (f.z <= f.w) result = $dba8420c01d8a224$var$Cartesian4.clone($dba8420c01d8a224$var$Cartesian4.UNIT_Z, result);\n else result = $dba8420c01d8a224$var$Cartesian4.clone($dba8420c01d8a224$var$Cartesian4.UNIT_W, result);\n return result;\n};\n/**\n * Compares the provided Cartesians componentwise and returns\n * true if they are equal, false otherwise.\n *\n * @param {Cartesian4} [left] The first Cartesian.\n * @param {Cartesian4} [right] The second Cartesian.\n * @returns {boolean} true if left and right are equal, false otherwise.\n */ $dba8420c01d8a224$var$Cartesian4.equals = function(left, right) {\n return left === right || (0, $jQJji.default)(left) && (0, $jQJji.default)(right) && left.x === right.x && left.y === right.y && left.z === right.z && left.w === right.w;\n};\n/**\n * @private\n */ $dba8420c01d8a224$var$Cartesian4.equalsArray = function(cartesian, array, offset) {\n return cartesian.x === array[offset] && cartesian.y === array[offset + 1] && cartesian.z === array[offset + 2] && cartesian.w === array[offset + 3];\n};\n/**\n * Compares the provided Cartesians componentwise and returns\n * true if they pass an absolute or relative tolerance test,\n * false otherwise.\n *\n * @param {Cartesian4} [left] The first Cartesian.\n * @param {Cartesian4} [right] The second Cartesian.\n * @param {number} [relativeEpsilon=0] The relative epsilon tolerance to use for equality testing.\n * @param {number} [absoluteEpsilon=relativeEpsilon] The absolute epsilon tolerance to use for equality testing.\n * @returns {boolean} true if left and right are within the provided epsilon, false otherwise.\n */ $dba8420c01d8a224$var$Cartesian4.equalsEpsilon = function(left, right, relativeEpsilon, absoluteEpsilon) {\n return left === right || (0, $jQJji.default)(left) && (0, $jQJji.default)(right) && (0, $AXvpI.default).equalsEpsilon(left.x, right.x, relativeEpsilon, absoluteEpsilon) && (0, $AXvpI.default).equalsEpsilon(left.y, right.y, relativeEpsilon, absoluteEpsilon) && (0, $AXvpI.default).equalsEpsilon(left.z, right.z, relativeEpsilon, absoluteEpsilon) && (0, $AXvpI.default).equalsEpsilon(left.w, right.w, relativeEpsilon, absoluteEpsilon);\n};\n/**\n * An immutable Cartesian4 instance initialized to (0.0, 0.0, 0.0, 0.0).\n *\n * @type {Cartesian4}\n * @constant\n */ $dba8420c01d8a224$var$Cartesian4.ZERO = Object.freeze(new $dba8420c01d8a224$var$Cartesian4(0.0, 0.0, 0.0, 0.0));\n/**\n * An immutable Cartesian4 instance initialized to (1.0, 1.0, 1.0, 1.0).\n *\n * @type {Cartesian4}\n * @constant\n */ $dba8420c01d8a224$var$Cartesian4.ONE = Object.freeze(new $dba8420c01d8a224$var$Cartesian4(1.0, 1.0, 1.0, 1.0));\n/**\n * An immutable Cartesian4 instance initialized to (1.0, 0.0, 0.0, 0.0).\n *\n * @type {Cartesian4}\n * @constant\n */ $dba8420c01d8a224$var$Cartesian4.UNIT_X = Object.freeze(new $dba8420c01d8a224$var$Cartesian4(1.0, 0.0, 0.0, 0.0));\n/**\n * An immutable Cartesian4 instance initialized to (0.0, 1.0, 0.0, 0.0).\n *\n * @type {Cartesian4}\n * @constant\n */ $dba8420c01d8a224$var$Cartesian4.UNIT_Y = Object.freeze(new $dba8420c01d8a224$var$Cartesian4(0.0, 1.0, 0.0, 0.0));\n/**\n * An immutable Cartesian4 instance initialized to (0.0, 0.0, 1.0, 0.0).\n *\n * @type {Cartesian4}\n * @constant\n */ $dba8420c01d8a224$var$Cartesian4.UNIT_Z = Object.freeze(new $dba8420c01d8a224$var$Cartesian4(0.0, 0.0, 1.0, 0.0));\n/**\n * An immutable Cartesian4 instance initialized to (0.0, 0.0, 0.0, 1.0).\n *\n * @type {Cartesian4}\n * @constant\n */ $dba8420c01d8a224$var$Cartesian4.UNIT_W = Object.freeze(new $dba8420c01d8a224$var$Cartesian4(0.0, 0.0, 0.0, 1.0));\n/**\n * Duplicates this Cartesian4 instance.\n *\n * @param {Cartesian4} [result] The object onto which to store the result.\n * @returns {Cartesian4} The modified result parameter or a new Cartesian4 instance if one was not provided.\n */ $dba8420c01d8a224$var$Cartesian4.prototype.clone = function(result) {\n return $dba8420c01d8a224$var$Cartesian4.clone(this, result);\n};\n/**\n * Compares this Cartesian against the provided Cartesian componentwise and returns\n * true if they are equal, false otherwise.\n *\n * @param {Cartesian4} [right] The right hand side Cartesian.\n * @returns {boolean} true if they are equal, false otherwise.\n */ $dba8420c01d8a224$var$Cartesian4.prototype.equals = function(right) {\n return $dba8420c01d8a224$var$Cartesian4.equals(this, right);\n};\n/**\n * Compares this Cartesian against the provided Cartesian componentwise and returns\n * true if they pass an absolute or relative tolerance test,\n * false otherwise.\n *\n * @param {Cartesian4} [right] The right hand side Cartesian.\n * @param {number} [relativeEpsilon=0] The relative epsilon tolerance to use for equality testing.\n * @param {number} [absoluteEpsilon=relativeEpsilon] The absolute epsilon tolerance to use for equality testing.\n * @returns {boolean} true if they are within the provided epsilon, false otherwise.\n */ $dba8420c01d8a224$var$Cartesian4.prototype.equalsEpsilon = function(right, relativeEpsilon, absoluteEpsilon) {\n return $dba8420c01d8a224$var$Cartesian4.equalsEpsilon(this, right, relativeEpsilon, absoluteEpsilon);\n};\n/**\n * Creates a string representing this Cartesian in the format '(x, y, z, w)'.\n *\n * @returns {string} A string representing the provided Cartesian in the format '(x, y, z, w)'.\n */ $dba8420c01d8a224$var$Cartesian4.prototype.toString = function() {\n return `(${this.x}, ${this.y}, ${this.z}, ${this.w})`;\n};\n// scratchU8Array and scratchF32Array are views into the same buffer\nconst $dba8420c01d8a224$var$scratchF32Array = new Float32Array(1);\nconst $dba8420c01d8a224$var$scratchU8Array = new Uint8Array($dba8420c01d8a224$var$scratchF32Array.buffer);\nconst $dba8420c01d8a224$var$testU32 = new Uint32Array([\n 0x11223344\n]);\nconst $dba8420c01d8a224$var$testU8 = new Uint8Array($dba8420c01d8a224$var$testU32.buffer);\nconst $dba8420c01d8a224$var$littleEndian = $dba8420c01d8a224$var$testU8[0] === 0x44;\n/**\n * Packs an arbitrary floating point value to 4 values representable using uint8.\n *\n * @param {number} value A floating point number.\n * @param {Cartesian4} [result] The Cartesian4 that will contain the packed float.\n * @returns {Cartesian4} A Cartesian4 representing the float packed to values in x, y, z, and w.\n */ $dba8420c01d8a224$var$Cartesian4.packFloat = function(value, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.number(\"value\", value);\n //>>includeEnd('debug');\n if (!(0, $jQJji.default)(result)) result = new $dba8420c01d8a224$var$Cartesian4();\n // scratchU8Array and scratchF32Array are views into the same buffer\n $dba8420c01d8a224$var$scratchF32Array[0] = value;\n if ($dba8420c01d8a224$var$littleEndian) {\n result.x = $dba8420c01d8a224$var$scratchU8Array[0];\n result.y = $dba8420c01d8a224$var$scratchU8Array[1];\n result.z = $dba8420c01d8a224$var$scratchU8Array[2];\n result.w = $dba8420c01d8a224$var$scratchU8Array[3];\n } else {\n // convert from big-endian to little-endian\n result.x = $dba8420c01d8a224$var$scratchU8Array[3];\n result.y = $dba8420c01d8a224$var$scratchU8Array[2];\n result.z = $dba8420c01d8a224$var$scratchU8Array[1];\n result.w = $dba8420c01d8a224$var$scratchU8Array[0];\n }\n return result;\n};\n/**\n * Unpacks a float packed using Cartesian4.packFloat.\n *\n * @param {Cartesian4} packedFloat A Cartesian4 containing a float packed to 4 values representable using uint8.\n * @returns {number} The unpacked float.\n * @private\n */ $dba8420c01d8a224$var$Cartesian4.unpackFloat = function(packedFloat) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"packedFloat\", packedFloat);\n //>>includeEnd('debug');\n // scratchU8Array and scratchF32Array are views into the same buffer\n if ($dba8420c01d8a224$var$littleEndian) {\n $dba8420c01d8a224$var$scratchU8Array[0] = packedFloat.x;\n $dba8420c01d8a224$var$scratchU8Array[1] = packedFloat.y;\n $dba8420c01d8a224$var$scratchU8Array[2] = packedFloat.z;\n $dba8420c01d8a224$var$scratchU8Array[3] = packedFloat.w;\n } else {\n // convert from little-endian to big-endian\n $dba8420c01d8a224$var$scratchU8Array[0] = packedFloat.w;\n $dba8420c01d8a224$var$scratchU8Array[1] = packedFloat.z;\n $dba8420c01d8a224$var$scratchU8Array[2] = packedFloat.y;\n $dba8420c01d8a224$var$scratchU8Array[3] = packedFloat.x;\n }\n return $dba8420c01d8a224$var$scratchF32Array[0];\n};\nvar $dba8420c01d8a224$export$2e2bcd8739ae039 = $dba8420c01d8a224$var$Cartesian4;\n\n\n\nvar $3pzcG = parcelRequire(\"3pzcG\");\n\nvar $8w8ZH = parcelRequire(\"8w8ZH\");\n\nvar $jQJji = parcelRequire(\"jQJji\");\n\nvar $1vHsR = parcelRequire(\"1vHsR\");\n\nvar $AXvpI = parcelRequire(\"AXvpI\");\n\nvar $bXwZF = parcelRequire(\"bXwZF\");\n\nvar $3pzcG = parcelRequire(\"3pzcG\");\n\nvar $8w8ZH = parcelRequire(\"8w8ZH\");\n\nvar $jQJji = parcelRequire(\"jQJji\");\n\nvar $1vHsR = parcelRequire(\"1vHsR\");\n\nvar $AXvpI = parcelRequire(\"AXvpI\");\n/**\n * A 3x3 matrix, indexable as a column-major order array.\n * Constructor parameters are in row-major order for code readability.\n * @alias Matrix3\n * @constructor\n * @implements {ArrayLike}\n *\n * @param {number} [column0Row0=0.0] The value for column 0, row 0.\n * @param {number} [column1Row0=0.0] The value for column 1, row 0.\n * @param {number} [column2Row0=0.0] The value for column 2, row 0.\n * @param {number} [column0Row1=0.0] The value for column 0, row 1.\n * @param {number} [column1Row1=0.0] The value for column 1, row 1.\n * @param {number} [column2Row1=0.0] The value for column 2, row 1.\n * @param {number} [column0Row2=0.0] The value for column 0, row 2.\n * @param {number} [column1Row2=0.0] The value for column 1, row 2.\n * @param {number} [column2Row2=0.0] The value for column 2, row 2.\n *\n * @see Matrix3.fromArray\n * @see Matrix3.fromColumnMajorArray\n * @see Matrix3.fromRowMajorArray\n * @see Matrix3.fromQuaternion\n * @see Matrix3.fromHeadingPitchRoll\n * @see Matrix3.fromScale\n * @see Matrix3.fromUniformScale\n * @see Matrix3.fromCrossProduct\n * @see Matrix3.fromRotationX\n * @see Matrix3.fromRotationY\n * @see Matrix3.fromRotationZ\n * @see Matrix2\n * @see Matrix4\n */ function $490279d1ff27cf6c$var$Matrix3(column0Row0, column1Row0, column2Row0, column0Row1, column1Row1, column2Row1, column0Row2, column1Row2, column2Row2) {\n this[0] = (0, $8w8ZH.default)(column0Row0, 0.0);\n this[1] = (0, $8w8ZH.default)(column0Row1, 0.0);\n this[2] = (0, $8w8ZH.default)(column0Row2, 0.0);\n this[3] = (0, $8w8ZH.default)(column1Row0, 0.0);\n this[4] = (0, $8w8ZH.default)(column1Row1, 0.0);\n this[5] = (0, $8w8ZH.default)(column1Row2, 0.0);\n this[6] = (0, $8w8ZH.default)(column2Row0, 0.0);\n this[7] = (0, $8w8ZH.default)(column2Row1, 0.0);\n this[8] = (0, $8w8ZH.default)(column2Row2, 0.0);\n}\n/**\n * The number of elements used to pack the object into an array.\n * @type {number}\n */ $490279d1ff27cf6c$var$Matrix3.packedLength = 9;\n/**\n * Stores the provided instance into the provided array.\n *\n * @param {Matrix3} value The value to pack.\n * @param {number[]} array The array to pack into.\n * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.\n *\n * @returns {number[]} The array that was packed into\n */ $490279d1ff27cf6c$var$Matrix3.pack = function(value, array, startingIndex) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"value\", value);\n (0, $3pzcG.default).defined(\"array\", array);\n //>>includeEnd('debug');\n startingIndex = (0, $8w8ZH.default)(startingIndex, 0);\n array[startingIndex++] = value[0];\n array[startingIndex++] = value[1];\n array[startingIndex++] = value[2];\n array[startingIndex++] = value[3];\n array[startingIndex++] = value[4];\n array[startingIndex++] = value[5];\n array[startingIndex++] = value[6];\n array[startingIndex++] = value[7];\n array[startingIndex++] = value[8];\n return array;\n};\n/**\n * Retrieves an instance from a packed array.\n *\n * @param {number[]} array The packed array.\n * @param {number} [startingIndex=0] The starting index of the element to be unpacked.\n * @param {Matrix3} [result] The object into which to store the result.\n * @returns {Matrix3} The modified result parameter or a new Matrix3 instance if one was not provided.\n */ $490279d1ff27cf6c$var$Matrix3.unpack = function(array, startingIndex, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).defined(\"array\", array);\n //>>includeEnd('debug');\n startingIndex = (0, $8w8ZH.default)(startingIndex, 0);\n if (!(0, $jQJji.default)(result)) result = new $490279d1ff27cf6c$var$Matrix3();\n result[0] = array[startingIndex++];\n result[1] = array[startingIndex++];\n result[2] = array[startingIndex++];\n result[3] = array[startingIndex++];\n result[4] = array[startingIndex++];\n result[5] = array[startingIndex++];\n result[6] = array[startingIndex++];\n result[7] = array[startingIndex++];\n result[8] = array[startingIndex++];\n return result;\n};\n/**\n * Flattens an array of Matrix3s into an array of components. The components\n * are stored in column-major order.\n *\n * @param {Matrix3[]} array The array of matrices to pack.\n * @param {number[]} [result] The array onto which to store the result. If this is a typed array, it must have array.length * 9 components, else a {@link DeveloperError} will be thrown. If it is a regular array, it will be resized to have (array.length * 9) elements.\n * @returns {number[]} The packed array.\n */ $490279d1ff27cf6c$var$Matrix3.packArray = function(array, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).defined(\"array\", array);\n //>>includeEnd('debug');\n const length = array.length;\n const resultLength = length * 9;\n if (!(0, $jQJji.default)(result)) result = new Array(resultLength);\n else if (!Array.isArray(result) && result.length !== resultLength) //>>includeStart('debug', pragmas.debug);\n throw new (0, $1vHsR.default)(\"If result is a typed array, it must have exactly array.length * 9 elements\");\n else if (result.length !== resultLength) result.length = resultLength;\n for(let i = 0; i < length; ++i)$490279d1ff27cf6c$var$Matrix3.pack(array[i], result, i * 9);\n return result;\n};\n/**\n * Unpacks an array of column-major matrix components into an array of Matrix3s.\n *\n * @param {number[]} array The array of components to unpack.\n * @param {Matrix3[]} [result] The array onto which to store the result.\n * @returns {Matrix3[]} The unpacked array.\n */ $490279d1ff27cf6c$var$Matrix3.unpackArray = function(array, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).defined(\"array\", array);\n (0, $3pzcG.default).typeOf.number.greaterThanOrEquals(\"array.length\", array.length, 9);\n if (array.length % 9 !== 0) throw new (0, $1vHsR.default)(\"array length must be a multiple of 9.\");\n //>>includeEnd('debug');\n const length = array.length;\n if (!(0, $jQJji.default)(result)) result = new Array(length / 9);\n else result.length = length / 9;\n for(let i = 0; i < length; i += 9){\n const index = i / 9;\n result[index] = $490279d1ff27cf6c$var$Matrix3.unpack(array, i, result[index]);\n }\n return result;\n};\n/**\n * Duplicates a Matrix3 instance.\n *\n * @param {Matrix3} matrix The matrix to duplicate.\n * @param {Matrix3} [result] The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter or a new Matrix3 instance if one was not provided. (Returns undefined if matrix is undefined)\n */ $490279d1ff27cf6c$var$Matrix3.clone = function(matrix, result) {\n if (!(0, $jQJji.default)(matrix)) return undefined;\n if (!(0, $jQJji.default)(result)) return new $490279d1ff27cf6c$var$Matrix3(matrix[0], matrix[3], matrix[6], matrix[1], matrix[4], matrix[7], matrix[2], matrix[5], matrix[8]);\n result[0] = matrix[0];\n result[1] = matrix[1];\n result[2] = matrix[2];\n result[3] = matrix[3];\n result[4] = matrix[4];\n result[5] = matrix[5];\n result[6] = matrix[6];\n result[7] = matrix[7];\n result[8] = matrix[8];\n return result;\n};\n/**\n * Creates a Matrix3 from 9 consecutive elements in an array.\n *\n * @function\n * @param {number[]} array The array whose 9 consecutive elements correspond to the positions of the matrix. Assumes column-major order.\n * @param {number} [startingIndex=0] The offset into the array of the first element, which corresponds to first column first row position in the matrix.\n * @param {Matrix3} [result] The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter or a new Matrix3 instance if one was not provided.\n *\n * @example\n * // Create the Matrix3:\n * // [1.0, 2.0, 3.0]\n * // [1.0, 2.0, 3.0]\n * // [1.0, 2.0, 3.0]\n *\n * const v = [1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 3.0, 3.0, 3.0];\n * const m = Cesium.Matrix3.fromArray(v);\n *\n * // Create same Matrix3 with using an offset into an array\n * const v2 = [0.0, 0.0, 1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 3.0, 3.0, 3.0];\n * const m2 = Cesium.Matrix3.fromArray(v2, 2);\n */ $490279d1ff27cf6c$var$Matrix3.fromArray = $490279d1ff27cf6c$var$Matrix3.unpack;\n/**\n * Creates a Matrix3 instance from a column-major order array.\n *\n * @param {number[]} values The column-major order array.\n * @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix3} The modified result parameter, or a new Matrix3 instance if one was not provided.\n */ $490279d1ff27cf6c$var$Matrix3.fromColumnMajorArray = function(values, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).defined(\"values\", values);\n //>>includeEnd('debug');\n return $490279d1ff27cf6c$var$Matrix3.clone(values, result);\n};\n/**\n * Creates a Matrix3 instance from a row-major order array.\n * The resulting matrix will be in column-major order.\n *\n * @param {number[]} values The row-major order array.\n * @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix3} The modified result parameter, or a new Matrix3 instance if one was not provided.\n */ $490279d1ff27cf6c$var$Matrix3.fromRowMajorArray = function(values, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).defined(\"values\", values);\n //>>includeEnd('debug');\n if (!(0, $jQJji.default)(result)) return new $490279d1ff27cf6c$var$Matrix3(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8]);\n result[0] = values[0];\n result[1] = values[3];\n result[2] = values[6];\n result[3] = values[1];\n result[4] = values[4];\n result[5] = values[7];\n result[6] = values[2];\n result[7] = values[5];\n result[8] = values[8];\n return result;\n};\n/**\n * Computes a 3x3 rotation matrix from the provided quaternion.\n *\n * @param {Quaternion} quaternion the quaternion to use.\n * @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix3} The 3x3 rotation matrix from this quaternion.\n */ $490279d1ff27cf6c$var$Matrix3.fromQuaternion = function(quaternion, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"quaternion\", quaternion);\n //>>includeEnd('debug');\n const x2 = quaternion.x * quaternion.x;\n const xy = quaternion.x * quaternion.y;\n const xz = quaternion.x * quaternion.z;\n const xw = quaternion.x * quaternion.w;\n const y2 = quaternion.y * quaternion.y;\n const yz = quaternion.y * quaternion.z;\n const yw = quaternion.y * quaternion.w;\n const z2 = quaternion.z * quaternion.z;\n const zw = quaternion.z * quaternion.w;\n const w2 = quaternion.w * quaternion.w;\n const m00 = x2 - y2 - z2 + w2;\n const m01 = 2.0 * (xy - zw);\n const m02 = 2.0 * (xz + yw);\n const m10 = 2.0 * (xy + zw);\n const m11 = -x2 + y2 - z2 + w2;\n const m12 = 2.0 * (yz - xw);\n const m20 = 2.0 * (xz - yw);\n const m21 = 2.0 * (yz + xw);\n const m22 = -x2 - y2 + z2 + w2;\n if (!(0, $jQJji.default)(result)) return new $490279d1ff27cf6c$var$Matrix3(m00, m01, m02, m10, m11, m12, m20, m21, m22);\n result[0] = m00;\n result[1] = m10;\n result[2] = m20;\n result[3] = m01;\n result[4] = m11;\n result[5] = m21;\n result[6] = m02;\n result[7] = m12;\n result[8] = m22;\n return result;\n};\n/**\n * Computes a 3x3 rotation matrix from the provided headingPitchRoll. (see http://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles )\n *\n * @param {HeadingPitchRoll} headingPitchRoll the headingPitchRoll to use.\n * @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix3} The 3x3 rotation matrix from this headingPitchRoll.\n */ $490279d1ff27cf6c$var$Matrix3.fromHeadingPitchRoll = function(headingPitchRoll, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"headingPitchRoll\", headingPitchRoll);\n //>>includeEnd('debug');\n const cosTheta = Math.cos(-headingPitchRoll.pitch);\n const cosPsi = Math.cos(-headingPitchRoll.heading);\n const cosPhi = Math.cos(headingPitchRoll.roll);\n const sinTheta = Math.sin(-headingPitchRoll.pitch);\n const sinPsi = Math.sin(-headingPitchRoll.heading);\n const sinPhi = Math.sin(headingPitchRoll.roll);\n const m00 = cosTheta * cosPsi;\n const m01 = -cosPhi * sinPsi + sinPhi * sinTheta * cosPsi;\n const m02 = sinPhi * sinPsi + cosPhi * sinTheta * cosPsi;\n const m10 = cosTheta * sinPsi;\n const m11 = cosPhi * cosPsi + sinPhi * sinTheta * sinPsi;\n const m12 = -sinPhi * cosPsi + cosPhi * sinTheta * sinPsi;\n const m20 = -sinTheta;\n const m21 = sinPhi * cosTheta;\n const m22 = cosPhi * cosTheta;\n if (!(0, $jQJji.default)(result)) return new $490279d1ff27cf6c$var$Matrix3(m00, m01, m02, m10, m11, m12, m20, m21, m22);\n result[0] = m00;\n result[1] = m10;\n result[2] = m20;\n result[3] = m01;\n result[4] = m11;\n result[5] = m21;\n result[6] = m02;\n result[7] = m12;\n result[8] = m22;\n return result;\n};\n/**\n * Computes a Matrix3 instance representing a non-uniform scale.\n *\n * @param {Cartesian3} scale The x, y, and z scale factors.\n * @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix3} The modified result parameter, or a new Matrix3 instance if one was not provided.\n *\n * @example\n * // Creates\n * // [7.0, 0.0, 0.0]\n * // [0.0, 8.0, 0.0]\n * // [0.0, 0.0, 9.0]\n * const m = Cesium.Matrix3.fromScale(new Cesium.Cartesian3(7.0, 8.0, 9.0));\n */ $490279d1ff27cf6c$var$Matrix3.fromScale = function(scale, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"scale\", scale);\n //>>includeEnd('debug');\n if (!(0, $jQJji.default)(result)) return new $490279d1ff27cf6c$var$Matrix3(scale.x, 0.0, 0.0, 0.0, scale.y, 0.0, 0.0, 0.0, scale.z);\n result[0] = scale.x;\n result[1] = 0.0;\n result[2] = 0.0;\n result[3] = 0.0;\n result[4] = scale.y;\n result[5] = 0.0;\n result[6] = 0.0;\n result[7] = 0.0;\n result[8] = scale.z;\n return result;\n};\n/**\n * Computes a Matrix3 instance representing a uniform scale.\n *\n * @param {number} scale The uniform scale factor.\n * @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix3} The modified result parameter, or a new Matrix3 instance if one was not provided.\n *\n * @example\n * // Creates\n * // [2.0, 0.0, 0.0]\n * // [0.0, 2.0, 0.0]\n * // [0.0, 0.0, 2.0]\n * const m = Cesium.Matrix3.fromUniformScale(2.0);\n */ $490279d1ff27cf6c$var$Matrix3.fromUniformScale = function(scale, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.number(\"scale\", scale);\n //>>includeEnd('debug');\n if (!(0, $jQJji.default)(result)) return new $490279d1ff27cf6c$var$Matrix3(scale, 0.0, 0.0, 0.0, scale, 0.0, 0.0, 0.0, scale);\n result[0] = scale;\n result[1] = 0.0;\n result[2] = 0.0;\n result[3] = 0.0;\n result[4] = scale;\n result[5] = 0.0;\n result[6] = 0.0;\n result[7] = 0.0;\n result[8] = scale;\n return result;\n};\n/**\n * Computes a Matrix3 instance representing the cross product equivalent matrix of a Cartesian3 vector.\n *\n * @param {Cartesian3} vector the vector on the left hand side of the cross product operation.\n * @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix3} The modified result parameter, or a new Matrix3 instance if one was not provided.\n *\n * @example\n * // Creates\n * // [0.0, -9.0, 8.0]\n * // [9.0, 0.0, -7.0]\n * // [-8.0, 7.0, 0.0]\n * const m = Cesium.Matrix3.fromCrossProduct(new Cesium.Cartesian3(7.0, 8.0, 9.0));\n */ $490279d1ff27cf6c$var$Matrix3.fromCrossProduct = function(vector, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"vector\", vector);\n //>>includeEnd('debug');\n if (!(0, $jQJji.default)(result)) return new $490279d1ff27cf6c$var$Matrix3(0.0, -vector.z, vector.y, vector.z, 0.0, -vector.x, -vector.y, vector.x, 0.0);\n result[0] = 0.0;\n result[1] = vector.z;\n result[2] = -vector.y;\n result[3] = -vector.z;\n result[4] = 0.0;\n result[5] = vector.x;\n result[6] = vector.y;\n result[7] = -vector.x;\n result[8] = 0.0;\n return result;\n};\n/**\n * Creates a rotation matrix around the x-axis.\n *\n * @param {number} angle The angle, in radians, of the rotation. Positive angles are counterclockwise.\n * @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix3} The modified result parameter, or a new Matrix3 instance if one was not provided.\n *\n * @example\n * // Rotate a point 45 degrees counterclockwise around the x-axis.\n * const p = new Cesium.Cartesian3(5, 6, 7);\n * const m = Cesium.Matrix3.fromRotationX(Cesium.Math.toRadians(45.0));\n * const rotated = Cesium.Matrix3.multiplyByVector(m, p, new Cesium.Cartesian3());\n */ $490279d1ff27cf6c$var$Matrix3.fromRotationX = function(angle, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.number(\"angle\", angle);\n //>>includeEnd('debug');\n const cosAngle = Math.cos(angle);\n const sinAngle = Math.sin(angle);\n if (!(0, $jQJji.default)(result)) return new $490279d1ff27cf6c$var$Matrix3(1.0, 0.0, 0.0, 0.0, cosAngle, -sinAngle, 0.0, sinAngle, cosAngle);\n result[0] = 1.0;\n result[1] = 0.0;\n result[2] = 0.0;\n result[3] = 0.0;\n result[4] = cosAngle;\n result[5] = sinAngle;\n result[6] = 0.0;\n result[7] = -sinAngle;\n result[8] = cosAngle;\n return result;\n};\n/**\n * Creates a rotation matrix around the y-axis.\n *\n * @param {number} angle The angle, in radians, of the rotation. Positive angles are counterclockwise.\n * @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix3} The modified result parameter, or a new Matrix3 instance if one was not provided.\n *\n * @example\n * // Rotate a point 45 degrees counterclockwise around the y-axis.\n * const p = new Cesium.Cartesian3(5, 6, 7);\n * const m = Cesium.Matrix3.fromRotationY(Cesium.Math.toRadians(45.0));\n * const rotated = Cesium.Matrix3.multiplyByVector(m, p, new Cesium.Cartesian3());\n */ $490279d1ff27cf6c$var$Matrix3.fromRotationY = function(angle, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.number(\"angle\", angle);\n //>>includeEnd('debug');\n const cosAngle = Math.cos(angle);\n const sinAngle = Math.sin(angle);\n if (!(0, $jQJji.default)(result)) return new $490279d1ff27cf6c$var$Matrix3(cosAngle, 0.0, sinAngle, 0.0, 1.0, 0.0, -sinAngle, 0.0, cosAngle);\n result[0] = cosAngle;\n result[1] = 0.0;\n result[2] = -sinAngle;\n result[3] = 0.0;\n result[4] = 1.0;\n result[5] = 0.0;\n result[6] = sinAngle;\n result[7] = 0.0;\n result[8] = cosAngle;\n return result;\n};\n/**\n * Creates a rotation matrix around the z-axis.\n *\n * @param {number} angle The angle, in radians, of the rotation. Positive angles are counterclockwise.\n * @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix3} The modified result parameter, or a new Matrix3 instance if one was not provided.\n *\n * @example\n * // Rotate a point 45 degrees counterclockwise around the z-axis.\n * const p = new Cesium.Cartesian3(5, 6, 7);\n * const m = Cesium.Matrix3.fromRotationZ(Cesium.Math.toRadians(45.0));\n * const rotated = Cesium.Matrix3.multiplyByVector(m, p, new Cesium.Cartesian3());\n */ $490279d1ff27cf6c$var$Matrix3.fromRotationZ = function(angle, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.number(\"angle\", angle);\n //>>includeEnd('debug');\n const cosAngle = Math.cos(angle);\n const sinAngle = Math.sin(angle);\n if (!(0, $jQJji.default)(result)) return new $490279d1ff27cf6c$var$Matrix3(cosAngle, -sinAngle, 0.0, sinAngle, cosAngle, 0.0, 0.0, 0.0, 1.0);\n result[0] = cosAngle;\n result[1] = sinAngle;\n result[2] = 0.0;\n result[3] = -sinAngle;\n result[4] = cosAngle;\n result[5] = 0.0;\n result[6] = 0.0;\n result[7] = 0.0;\n result[8] = 1.0;\n return result;\n};\n/**\n * Creates an Array from the provided Matrix3 instance.\n * The array will be in column-major order.\n *\n * @param {Matrix3} matrix The matrix to use..\n * @param {number[]} [result] The Array onto which to store the result.\n * @returns {number[]} The modified Array parameter or a new Array instance if one was not provided.\n */ $490279d1ff27cf6c$var$Matrix3.toArray = function(matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"matrix\", matrix);\n //>>includeEnd('debug');\n if (!(0, $jQJji.default)(result)) return [\n matrix[0],\n matrix[1],\n matrix[2],\n matrix[3],\n matrix[4],\n matrix[5],\n matrix[6],\n matrix[7],\n matrix[8]\n ];\n result[0] = matrix[0];\n result[1] = matrix[1];\n result[2] = matrix[2];\n result[3] = matrix[3];\n result[4] = matrix[4];\n result[5] = matrix[5];\n result[6] = matrix[6];\n result[7] = matrix[7];\n result[8] = matrix[8];\n return result;\n};\n/**\n * Computes the array index of the element at the provided row and column.\n *\n * @param {number} column The zero-based index of the column.\n * @param {number} row The zero-based index of the row.\n * @returns {number} The index of the element at the provided row and column.\n *\n * @exception {DeveloperError} row must be 0, 1, or 2.\n * @exception {DeveloperError} column must be 0, 1, or 2.\n *\n * @example\n * const myMatrix = new Cesium.Matrix3();\n * const column1Row0Index = Cesium.Matrix3.getElementIndex(1, 0);\n * const column1Row0 = myMatrix[column1Row0Index]\n * myMatrix[column1Row0Index] = 10.0;\n */ $490279d1ff27cf6c$var$Matrix3.getElementIndex = function(column, row) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.number.greaterThanOrEquals(\"row\", row, 0);\n (0, $3pzcG.default).typeOf.number.lessThanOrEquals(\"row\", row, 2);\n (0, $3pzcG.default).typeOf.number.greaterThanOrEquals(\"column\", column, 0);\n (0, $3pzcG.default).typeOf.number.lessThanOrEquals(\"column\", column, 2);\n //>>includeEnd('debug');\n return column * 3 + row;\n};\n/**\n * Retrieves a copy of the matrix column at the provided index as a Cartesian3 instance.\n *\n * @param {Matrix3} matrix The matrix to use.\n * @param {number} index The zero-based index of the column to retrieve.\n * @param {Cartesian3} result The object onto which to store the result.\n * @returns {Cartesian3} The modified result parameter.\n *\n * @exception {DeveloperError} index must be 0, 1, or 2.\n */ $490279d1ff27cf6c$var$Matrix3.getColumn = function(matrix, index, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"matrix\", matrix);\n (0, $3pzcG.default).typeOf.number.greaterThanOrEquals(\"index\", index, 0);\n (0, $3pzcG.default).typeOf.number.lessThanOrEquals(\"index\", index, 2);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n const startIndex = index * 3;\n const x = matrix[startIndex];\n const y = matrix[startIndex + 1];\n const z = matrix[startIndex + 2];\n result.x = x;\n result.y = y;\n result.z = z;\n return result;\n};\n/**\n * Computes a new matrix that replaces the specified column in the provided matrix with the provided Cartesian3 instance.\n *\n * @param {Matrix3} matrix The matrix to use.\n * @param {number} index The zero-based index of the column to set.\n * @param {Cartesian3} cartesian The Cartesian whose values will be assigned to the specified column.\n * @param {Matrix3} result The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter.\n *\n * @exception {DeveloperError} index must be 0, 1, or 2.\n */ $490279d1ff27cf6c$var$Matrix3.setColumn = function(matrix, index, cartesian, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"matrix\", matrix);\n (0, $3pzcG.default).typeOf.number.greaterThanOrEquals(\"index\", index, 0);\n (0, $3pzcG.default).typeOf.number.lessThanOrEquals(\"index\", index, 2);\n (0, $3pzcG.default).typeOf.object(\"cartesian\", cartesian);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n result = $490279d1ff27cf6c$var$Matrix3.clone(matrix, result);\n const startIndex = index * 3;\n result[startIndex] = cartesian.x;\n result[startIndex + 1] = cartesian.y;\n result[startIndex + 2] = cartesian.z;\n return result;\n};\n/**\n * Retrieves a copy of the matrix row at the provided index as a Cartesian3 instance.\n *\n * @param {Matrix3} matrix The matrix to use.\n * @param {number} index The zero-based index of the row to retrieve.\n * @param {Cartesian3} result The object onto which to store the result.\n * @returns {Cartesian3} The modified result parameter.\n *\n * @exception {DeveloperError} index must be 0, 1, or 2.\n */ $490279d1ff27cf6c$var$Matrix3.getRow = function(matrix, index, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"matrix\", matrix);\n (0, $3pzcG.default).typeOf.number.greaterThanOrEquals(\"index\", index, 0);\n (0, $3pzcG.default).typeOf.number.lessThanOrEquals(\"index\", index, 2);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n const x = matrix[index];\n const y = matrix[index + 3];\n const z = matrix[index + 6];\n result.x = x;\n result.y = y;\n result.z = z;\n return result;\n};\n/**\n * Computes a new matrix that replaces the specified row in the provided matrix with the provided Cartesian3 instance.\n *\n * @param {Matrix3} matrix The matrix to use.\n * @param {number} index The zero-based index of the row to set.\n * @param {Cartesian3} cartesian The Cartesian whose values will be assigned to the specified row.\n * @param {Matrix3} result The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter.\n *\n * @exception {DeveloperError} index must be 0, 1, or 2.\n */ $490279d1ff27cf6c$var$Matrix3.setRow = function(matrix, index, cartesian, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"matrix\", matrix);\n (0, $3pzcG.default).typeOf.number.greaterThanOrEquals(\"index\", index, 0);\n (0, $3pzcG.default).typeOf.number.lessThanOrEquals(\"index\", index, 2);\n (0, $3pzcG.default).typeOf.object(\"cartesian\", cartesian);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n result = $490279d1ff27cf6c$var$Matrix3.clone(matrix, result);\n result[index] = cartesian.x;\n result[index + 3] = cartesian.y;\n result[index + 6] = cartesian.z;\n return result;\n};\nconst $490279d1ff27cf6c$var$scaleScratch1 = new (0, $bXwZF.default)();\n/**\n * Computes a new matrix that replaces the scale with the provided scale.\n * This assumes the matrix is an affine transformation.\n *\n * @param {Matrix3} matrix The matrix to use.\n * @param {Cartesian3} scale The scale that replaces the scale of the provided matrix.\n * @param {Matrix3} result The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter.\n *\n * @see Matrix3.setUniformScale\n * @see Matrix3.fromScale\n * @see Matrix3.fromUniformScale\n * @see Matrix3.multiplyByScale\n * @see Matrix3.multiplyByUniformScale\n * @see Matrix3.getScale\n */ $490279d1ff27cf6c$var$Matrix3.setScale = function(matrix, scale, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"matrix\", matrix);\n (0, $3pzcG.default).typeOf.object(\"scale\", scale);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n const existingScale = $490279d1ff27cf6c$var$Matrix3.getScale(matrix, $490279d1ff27cf6c$var$scaleScratch1);\n const scaleRatioX = scale.x / existingScale.x;\n const scaleRatioY = scale.y / existingScale.y;\n const scaleRatioZ = scale.z / existingScale.z;\n result[0] = matrix[0] * scaleRatioX;\n result[1] = matrix[1] * scaleRatioX;\n result[2] = matrix[2] * scaleRatioX;\n result[3] = matrix[3] * scaleRatioY;\n result[4] = matrix[4] * scaleRatioY;\n result[5] = matrix[5] * scaleRatioY;\n result[6] = matrix[6] * scaleRatioZ;\n result[7] = matrix[7] * scaleRatioZ;\n result[8] = matrix[8] * scaleRatioZ;\n return result;\n};\nconst $490279d1ff27cf6c$var$scaleScratch2 = new (0, $bXwZF.default)();\n/**\n * Computes a new matrix that replaces the scale with the provided uniform scale.\n * This assumes the matrix is an affine transformation.\n *\n * @param {Matrix3} matrix The matrix to use.\n * @param {number} scale The uniform scale that replaces the scale of the provided matrix.\n * @param {Matrix3} result The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter.\n *\n * @see Matrix3.setScale\n * @see Matrix3.fromScale\n * @see Matrix3.fromUniformScale\n * @see Matrix3.multiplyByScale\n * @see Matrix3.multiplyByUniformScale\n * @see Matrix3.getScale\n */ $490279d1ff27cf6c$var$Matrix3.setUniformScale = function(matrix, scale, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"matrix\", matrix);\n (0, $3pzcG.default).typeOf.number(\"scale\", scale);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n const existingScale = $490279d1ff27cf6c$var$Matrix3.getScale(matrix, $490279d1ff27cf6c$var$scaleScratch2);\n const scaleRatioX = scale / existingScale.x;\n const scaleRatioY = scale / existingScale.y;\n const scaleRatioZ = scale / existingScale.z;\n result[0] = matrix[0] * scaleRatioX;\n result[1] = matrix[1] * scaleRatioX;\n result[2] = matrix[2] * scaleRatioX;\n result[3] = matrix[3] * scaleRatioY;\n result[4] = matrix[4] * scaleRatioY;\n result[5] = matrix[5] * scaleRatioY;\n result[6] = matrix[6] * scaleRatioZ;\n result[7] = matrix[7] * scaleRatioZ;\n result[8] = matrix[8] * scaleRatioZ;\n return result;\n};\nconst $490279d1ff27cf6c$var$scratchColumn = new (0, $bXwZF.default)();\n/**\n * Extracts the non-uniform scale assuming the matrix is an affine transformation.\n *\n * @param {Matrix3} matrix The matrix.\n * @param {Cartesian3} result The object onto which to store the result.\n * @returns {Cartesian3} The modified result parameter.\n *\n * @see Matrix3.multiplyByScale\n * @see Matrix3.multiplyByUniformScale\n * @see Matrix3.fromScale\n * @see Matrix3.fromUniformScale\n * @see Matrix3.setScale\n * @see Matrix3.setUniformScale\n */ $490279d1ff27cf6c$var$Matrix3.getScale = function(matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"matrix\", matrix);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n result.x = (0, $bXwZF.default).magnitude((0, $bXwZF.default).fromElements(matrix[0], matrix[1], matrix[2], $490279d1ff27cf6c$var$scratchColumn));\n result.y = (0, $bXwZF.default).magnitude((0, $bXwZF.default).fromElements(matrix[3], matrix[4], matrix[5], $490279d1ff27cf6c$var$scratchColumn));\n result.z = (0, $bXwZF.default).magnitude((0, $bXwZF.default).fromElements(matrix[6], matrix[7], matrix[8], $490279d1ff27cf6c$var$scratchColumn));\n return result;\n};\nconst $490279d1ff27cf6c$var$scaleScratch3 = new (0, $bXwZF.default)();\n/**\n * Computes the maximum scale assuming the matrix is an affine transformation.\n * The maximum scale is the maximum length of the column vectors.\n *\n * @param {Matrix3} matrix The matrix.\n * @returns {number} The maximum scale.\n */ $490279d1ff27cf6c$var$Matrix3.getMaximumScale = function(matrix) {\n $490279d1ff27cf6c$var$Matrix3.getScale(matrix, $490279d1ff27cf6c$var$scaleScratch3);\n return (0, $bXwZF.default).maximumComponent($490279d1ff27cf6c$var$scaleScratch3);\n};\nconst $490279d1ff27cf6c$var$scaleScratch4 = new (0, $bXwZF.default)();\n/**\n * Sets the rotation assuming the matrix is an affine transformation.\n *\n * @param {Matrix3} matrix The matrix.\n * @param {Matrix3} rotation The rotation matrix.\n * @param {Matrix3} result The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter.\n *\n * @see Matrix3.getRotation\n */ $490279d1ff27cf6c$var$Matrix3.setRotation = function(matrix, rotation, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"matrix\", matrix);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n const scale = $490279d1ff27cf6c$var$Matrix3.getScale(matrix, $490279d1ff27cf6c$var$scaleScratch4);\n result[0] = rotation[0] * scale.x;\n result[1] = rotation[1] * scale.x;\n result[2] = rotation[2] * scale.x;\n result[3] = rotation[3] * scale.y;\n result[4] = rotation[4] * scale.y;\n result[5] = rotation[5] * scale.y;\n result[6] = rotation[6] * scale.z;\n result[7] = rotation[7] * scale.z;\n result[8] = rotation[8] * scale.z;\n return result;\n};\nconst $490279d1ff27cf6c$var$scaleScratch5 = new (0, $bXwZF.default)();\n/**\n * Extracts the rotation matrix assuming the matrix is an affine transformation.\n *\n * @param {Matrix3} matrix The matrix.\n * @param {Matrix3} result The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter.\n *\n * @see Matrix3.setRotation\n */ $490279d1ff27cf6c$var$Matrix3.getRotation = function(matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"matrix\", matrix);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n const scale = $490279d1ff27cf6c$var$Matrix3.getScale(matrix, $490279d1ff27cf6c$var$scaleScratch5);\n result[0] = matrix[0] / scale.x;\n result[1] = matrix[1] / scale.x;\n result[2] = matrix[2] / scale.x;\n result[3] = matrix[3] / scale.y;\n result[4] = matrix[4] / scale.y;\n result[5] = matrix[5] / scale.y;\n result[6] = matrix[6] / scale.z;\n result[7] = matrix[7] / scale.z;\n result[8] = matrix[8] / scale.z;\n return result;\n};\n/**\n * Computes the product of two matrices.\n *\n * @param {Matrix3} left The first matrix.\n * @param {Matrix3} right The second matrix.\n * @param {Matrix3} result The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter.\n */ $490279d1ff27cf6c$var$Matrix3.multiply = function(left, right, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"left\", left);\n (0, $3pzcG.default).typeOf.object(\"right\", right);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n const column0Row0 = left[0] * right[0] + left[3] * right[1] + left[6] * right[2];\n const column0Row1 = left[1] * right[0] + left[4] * right[1] + left[7] * right[2];\n const column0Row2 = left[2] * right[0] + left[5] * right[1] + left[8] * right[2];\n const column1Row0 = left[0] * right[3] + left[3] * right[4] + left[6] * right[5];\n const column1Row1 = left[1] * right[3] + left[4] * right[4] + left[7] * right[5];\n const column1Row2 = left[2] * right[3] + left[5] * right[4] + left[8] * right[5];\n const column2Row0 = left[0] * right[6] + left[3] * right[7] + left[6] * right[8];\n const column2Row1 = left[1] * right[6] + left[4] * right[7] + left[7] * right[8];\n const column2Row2 = left[2] * right[6] + left[5] * right[7] + left[8] * right[8];\n result[0] = column0Row0;\n result[1] = column0Row1;\n result[2] = column0Row2;\n result[3] = column1Row0;\n result[4] = column1Row1;\n result[5] = column1Row2;\n result[6] = column2Row0;\n result[7] = column2Row1;\n result[8] = column2Row2;\n return result;\n};\n/**\n * Computes the sum of two matrices.\n *\n * @param {Matrix3} left The first matrix.\n * @param {Matrix3} right The second matrix.\n * @param {Matrix3} result The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter.\n */ $490279d1ff27cf6c$var$Matrix3.add = function(left, right, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"left\", left);\n (0, $3pzcG.default).typeOf.object(\"right\", right);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n result[0] = left[0] + right[0];\n result[1] = left[1] + right[1];\n result[2] = left[2] + right[2];\n result[3] = left[3] + right[3];\n result[4] = left[4] + right[4];\n result[5] = left[5] + right[5];\n result[6] = left[6] + right[6];\n result[7] = left[7] + right[7];\n result[8] = left[8] + right[8];\n return result;\n};\n/**\n * Computes the difference of two matrices.\n *\n * @param {Matrix3} left The first matrix.\n * @param {Matrix3} right The second matrix.\n * @param {Matrix3} result The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter.\n */ $490279d1ff27cf6c$var$Matrix3.subtract = function(left, right, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"left\", left);\n (0, $3pzcG.default).typeOf.object(\"right\", right);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n result[0] = left[0] - right[0];\n result[1] = left[1] - right[1];\n result[2] = left[2] - right[2];\n result[3] = left[3] - right[3];\n result[4] = left[4] - right[4];\n result[5] = left[5] - right[5];\n result[6] = left[6] - right[6];\n result[7] = left[7] - right[7];\n result[8] = left[8] - right[8];\n return result;\n};\n/**\n * Computes the product of a matrix and a column vector.\n *\n * @param {Matrix3} matrix The matrix.\n * @param {Cartesian3} cartesian The column.\n * @param {Cartesian3} result The object onto which to store the result.\n * @returns {Cartesian3} The modified result parameter.\n */ $490279d1ff27cf6c$var$Matrix3.multiplyByVector = function(matrix, cartesian, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"matrix\", matrix);\n (0, $3pzcG.default).typeOf.object(\"cartesian\", cartesian);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n const vX = cartesian.x;\n const vY = cartesian.y;\n const vZ = cartesian.z;\n const x = matrix[0] * vX + matrix[3] * vY + matrix[6] * vZ;\n const y = matrix[1] * vX + matrix[4] * vY + matrix[7] * vZ;\n const z = matrix[2] * vX + matrix[5] * vY + matrix[8] * vZ;\n result.x = x;\n result.y = y;\n result.z = z;\n return result;\n};\n/**\n * Computes the product of a matrix and a scalar.\n *\n * @param {Matrix3} matrix The matrix.\n * @param {number} scalar The number to multiply by.\n * @param {Matrix3} result The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter.\n */ $490279d1ff27cf6c$var$Matrix3.multiplyByScalar = function(matrix, scalar, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"matrix\", matrix);\n (0, $3pzcG.default).typeOf.number(\"scalar\", scalar);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n result[0] = matrix[0] * scalar;\n result[1] = matrix[1] * scalar;\n result[2] = matrix[2] * scalar;\n result[3] = matrix[3] * scalar;\n result[4] = matrix[4] * scalar;\n result[5] = matrix[5] * scalar;\n result[6] = matrix[6] * scalar;\n result[7] = matrix[7] * scalar;\n result[8] = matrix[8] * scalar;\n return result;\n};\n/**\n * Computes the product of a matrix times a (non-uniform) scale, as if the scale were a scale matrix.\n *\n * @param {Matrix3} matrix The matrix on the left-hand side.\n * @param {Cartesian3} scale The non-uniform scale on the right-hand side.\n * @param {Matrix3} result The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter.\n *\n *\n * @example\n * // Instead of Cesium.Matrix3.multiply(m, Cesium.Matrix3.fromScale(scale), m);\n * Cesium.Matrix3.multiplyByScale(m, scale, m);\n *\n * @see Matrix3.multiplyByUniformScale\n * @see Matrix3.fromScale\n * @see Matrix3.fromUniformScale\n * @see Matrix3.setScale\n * @see Matrix3.setUniformScale\n * @see Matrix3.getScale\n */ $490279d1ff27cf6c$var$Matrix3.multiplyByScale = function(matrix, scale, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"matrix\", matrix);\n (0, $3pzcG.default).typeOf.object(\"scale\", scale);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n result[0] = matrix[0] * scale.x;\n result[1] = matrix[1] * scale.x;\n result[2] = matrix[2] * scale.x;\n result[3] = matrix[3] * scale.y;\n result[4] = matrix[4] * scale.y;\n result[5] = matrix[5] * scale.y;\n result[6] = matrix[6] * scale.z;\n result[7] = matrix[7] * scale.z;\n result[8] = matrix[8] * scale.z;\n return result;\n};\n/**\n * Computes the product of a matrix times a uniform scale, as if the scale were a scale matrix.\n *\n * @param {Matrix3} matrix The matrix on the left-hand side.\n * @param {number} scale The uniform scale on the right-hand side.\n * @param {Matrix3} result The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter.\n *\n * @example\n * // Instead of Cesium.Matrix3.multiply(m, Cesium.Matrix3.fromUniformScale(scale), m);\n * Cesium.Matrix3.multiplyByUniformScale(m, scale, m);\n *\n * @see Matrix3.multiplyByScale\n * @see Matrix3.fromScale\n * @see Matrix3.fromUniformScale\n * @see Matrix3.setScale\n * @see Matrix3.setUniformScale\n * @see Matrix3.getScale\n */ $490279d1ff27cf6c$var$Matrix3.multiplyByUniformScale = function(matrix, scale, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"matrix\", matrix);\n (0, $3pzcG.default).typeOf.number(\"scale\", scale);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n result[0] = matrix[0] * scale;\n result[1] = matrix[1] * scale;\n result[2] = matrix[2] * scale;\n result[3] = matrix[3] * scale;\n result[4] = matrix[4] * scale;\n result[5] = matrix[5] * scale;\n result[6] = matrix[6] * scale;\n result[7] = matrix[7] * scale;\n result[8] = matrix[8] * scale;\n return result;\n};\n/**\n * Creates a negated copy of the provided matrix.\n *\n * @param {Matrix3} matrix The matrix to negate.\n * @param {Matrix3} result The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter.\n */ $490279d1ff27cf6c$var$Matrix3.negate = function(matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"matrix\", matrix);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n result[0] = -matrix[0];\n result[1] = -matrix[1];\n result[2] = -matrix[2];\n result[3] = -matrix[3];\n result[4] = -matrix[4];\n result[5] = -matrix[5];\n result[6] = -matrix[6];\n result[7] = -matrix[7];\n result[8] = -matrix[8];\n return result;\n};\n/**\n * Computes the transpose of the provided matrix.\n *\n * @param {Matrix3} matrix The matrix to transpose.\n * @param {Matrix3} result The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter.\n */ $490279d1ff27cf6c$var$Matrix3.transpose = function(matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"matrix\", matrix);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n const column0Row0 = matrix[0];\n const column0Row1 = matrix[3];\n const column0Row2 = matrix[6];\n const column1Row0 = matrix[1];\n const column1Row1 = matrix[4];\n const column1Row2 = matrix[7];\n const column2Row0 = matrix[2];\n const column2Row1 = matrix[5];\n const column2Row2 = matrix[8];\n result[0] = column0Row0;\n result[1] = column0Row1;\n result[2] = column0Row2;\n result[3] = column1Row0;\n result[4] = column1Row1;\n result[5] = column1Row2;\n result[6] = column2Row0;\n result[7] = column2Row1;\n result[8] = column2Row2;\n return result;\n};\nfunction $490279d1ff27cf6c$var$computeFrobeniusNorm(matrix) {\n let norm = 0.0;\n for(let i = 0; i < 9; ++i){\n const temp = matrix[i];\n norm += temp * temp;\n }\n return Math.sqrt(norm);\n}\nconst $490279d1ff27cf6c$var$rowVal = [\n 1,\n 0,\n 0\n];\nconst $490279d1ff27cf6c$var$colVal = [\n 2,\n 2,\n 1\n];\nfunction $490279d1ff27cf6c$var$offDiagonalFrobeniusNorm(matrix) {\n // Computes the \"off-diagonal\" Frobenius norm.\n // Assumes matrix is symmetric.\n let norm = 0.0;\n for(let i = 0; i < 3; ++i){\n const temp = matrix[$490279d1ff27cf6c$var$Matrix3.getElementIndex($490279d1ff27cf6c$var$colVal[i], $490279d1ff27cf6c$var$rowVal[i])];\n norm += 2.0 * temp * temp;\n }\n return Math.sqrt(norm);\n}\nfunction $490279d1ff27cf6c$var$shurDecomposition(matrix, result) {\n // This routine was created based upon Matrix Computations, 3rd ed., by Golub and Van Loan,\n // section 8.4.2 The 2by2 Symmetric Schur Decomposition.\n //\n // The routine takes a matrix, which is assumed to be symmetric, and\n // finds the largest off-diagonal term, and then creates\n // a matrix (result) which can be used to help reduce it\n const tolerance = (0, $AXvpI.default).EPSILON15;\n let maxDiagonal = 0.0;\n let rotAxis = 1;\n // find pivot (rotAxis) based on max diagonal of matrix\n for(let i = 0; i < 3; ++i){\n const temp = Math.abs(matrix[$490279d1ff27cf6c$var$Matrix3.getElementIndex($490279d1ff27cf6c$var$colVal[i], $490279d1ff27cf6c$var$rowVal[i])]);\n if (temp > maxDiagonal) {\n rotAxis = i;\n maxDiagonal = temp;\n }\n }\n let c = 1.0;\n let s = 0.0;\n const p = $490279d1ff27cf6c$var$rowVal[rotAxis];\n const q = $490279d1ff27cf6c$var$colVal[rotAxis];\n if (Math.abs(matrix[$490279d1ff27cf6c$var$Matrix3.getElementIndex(q, p)]) > tolerance) {\n const qq = matrix[$490279d1ff27cf6c$var$Matrix3.getElementIndex(q, q)];\n const pp = matrix[$490279d1ff27cf6c$var$Matrix3.getElementIndex(p, p)];\n const qp = matrix[$490279d1ff27cf6c$var$Matrix3.getElementIndex(q, p)];\n const tau = (qq - pp) / 2.0 / qp;\n let t;\n if (tau < 0.0) t = -1 / (-tau + Math.sqrt(1.0 + tau * tau));\n else t = 1.0 / (tau + Math.sqrt(1.0 + tau * tau));\n c = 1.0 / Math.sqrt(1.0 + t * t);\n s = t * c;\n }\n result = $490279d1ff27cf6c$var$Matrix3.clone($490279d1ff27cf6c$var$Matrix3.IDENTITY, result);\n result[$490279d1ff27cf6c$var$Matrix3.getElementIndex(p, p)] = result[$490279d1ff27cf6c$var$Matrix3.getElementIndex(q, q)] = c;\n result[$490279d1ff27cf6c$var$Matrix3.getElementIndex(q, p)] = s;\n result[$490279d1ff27cf6c$var$Matrix3.getElementIndex(p, q)] = -s;\n return result;\n}\nconst $490279d1ff27cf6c$var$jMatrix = new $490279d1ff27cf6c$var$Matrix3();\nconst $490279d1ff27cf6c$var$jMatrixTranspose = new $490279d1ff27cf6c$var$Matrix3();\n/**\n * Computes the eigenvectors and eigenvalues of a symmetric matrix.\n *

\n * Returns a diagonal matrix and unitary matrix such that:\n * matrix = unitary matrix * diagonal matrix * transpose(unitary matrix)\n *

\n *

\n * The values along the diagonal of the diagonal matrix are the eigenvalues. The columns\n * of the unitary matrix are the corresponding eigenvectors.\n *

\n *\n * @param {Matrix3} matrix The matrix to decompose into diagonal and unitary matrix. Expected to be symmetric.\n * @param {object} [result] An object with unitary and diagonal properties which are matrices onto which to store the result.\n * @returns {object} An object with unitary and diagonal properties which are the unitary and diagonal matrices, respectively.\n *\n * @example\n * const a = //... symetric matrix\n * const result = {\n * unitary : new Cesium.Matrix3(),\n * diagonal : new Cesium.Matrix3()\n * };\n * Cesium.Matrix3.computeEigenDecomposition(a, result);\n *\n * const unitaryTranspose = Cesium.Matrix3.transpose(result.unitary, new Cesium.Matrix3());\n * const b = Cesium.Matrix3.multiply(result.unitary, result.diagonal, new Cesium.Matrix3());\n * Cesium.Matrix3.multiply(b, unitaryTranspose, b); // b is now equal to a\n *\n * const lambda = Cesium.Matrix3.getColumn(result.diagonal, 0, new Cesium.Cartesian3()).x; // first eigenvalue\n * const v = Cesium.Matrix3.getColumn(result.unitary, 0, new Cesium.Cartesian3()); // first eigenvector\n * const c = Cesium.Cartesian3.multiplyByScalar(v, lambda, new Cesium.Cartesian3()); // equal to Cesium.Matrix3.multiplyByVector(a, v)\n */ $490279d1ff27cf6c$var$Matrix3.computeEigenDecomposition = function(matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"matrix\", matrix);\n //>>includeEnd('debug');\n // This routine was created based upon Matrix Computations, 3rd ed., by Golub and Van Loan,\n // section 8.4.3 The Classical Jacobi Algorithm\n const tolerance = (0, $AXvpI.default).EPSILON20;\n const maxSweeps = 10;\n let count = 0;\n let sweep = 0;\n if (!(0, $jQJji.default)(result)) result = {};\n const unitaryMatrix = result.unitary = $490279d1ff27cf6c$var$Matrix3.clone($490279d1ff27cf6c$var$Matrix3.IDENTITY, result.unitary);\n const diagMatrix = result.diagonal = $490279d1ff27cf6c$var$Matrix3.clone(matrix, result.diagonal);\n const epsilon = tolerance * $490279d1ff27cf6c$var$computeFrobeniusNorm(diagMatrix);\n while(sweep < maxSweeps && $490279d1ff27cf6c$var$offDiagonalFrobeniusNorm(diagMatrix) > epsilon){\n $490279d1ff27cf6c$var$shurDecomposition(diagMatrix, $490279d1ff27cf6c$var$jMatrix);\n $490279d1ff27cf6c$var$Matrix3.transpose($490279d1ff27cf6c$var$jMatrix, $490279d1ff27cf6c$var$jMatrixTranspose);\n $490279d1ff27cf6c$var$Matrix3.multiply(diagMatrix, $490279d1ff27cf6c$var$jMatrix, diagMatrix);\n $490279d1ff27cf6c$var$Matrix3.multiply($490279d1ff27cf6c$var$jMatrixTranspose, diagMatrix, diagMatrix);\n $490279d1ff27cf6c$var$Matrix3.multiply(unitaryMatrix, $490279d1ff27cf6c$var$jMatrix, unitaryMatrix);\n if (++count > 2) {\n ++sweep;\n count = 0;\n }\n }\n return result;\n};\n/**\n * Computes a matrix, which contains the absolute (unsigned) values of the provided matrix's elements.\n *\n * @param {Matrix3} matrix The matrix with signed elements.\n * @param {Matrix3} result The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter.\n */ $490279d1ff27cf6c$var$Matrix3.abs = function(matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"matrix\", matrix);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n result[0] = Math.abs(matrix[0]);\n result[1] = Math.abs(matrix[1]);\n result[2] = Math.abs(matrix[2]);\n result[3] = Math.abs(matrix[3]);\n result[4] = Math.abs(matrix[4]);\n result[5] = Math.abs(matrix[5]);\n result[6] = Math.abs(matrix[6]);\n result[7] = Math.abs(matrix[7]);\n result[8] = Math.abs(matrix[8]);\n return result;\n};\n/**\n * Computes the determinant of the provided matrix.\n *\n * @param {Matrix3} matrix The matrix to use.\n * @returns {number} The value of the determinant of the matrix.\n */ $490279d1ff27cf6c$var$Matrix3.determinant = function(matrix) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"matrix\", matrix);\n //>>includeEnd('debug');\n const m11 = matrix[0];\n const m21 = matrix[3];\n const m31 = matrix[6];\n const m12 = matrix[1];\n const m22 = matrix[4];\n const m32 = matrix[7];\n const m13 = matrix[2];\n const m23 = matrix[5];\n const m33 = matrix[8];\n return m11 * (m22 * m33 - m23 * m32) + m12 * (m23 * m31 - m21 * m33) + m13 * (m21 * m32 - m22 * m31);\n};\n/**\n * Computes the inverse of the provided matrix.\n *\n * @param {Matrix3} matrix The matrix to invert.\n * @param {Matrix3} result The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter.\n *\n * @exception {DeveloperError} matrix is not invertible.\n */ $490279d1ff27cf6c$var$Matrix3.inverse = function(matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"matrix\", matrix);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n const m11 = matrix[0];\n const m21 = matrix[1];\n const m31 = matrix[2];\n const m12 = matrix[3];\n const m22 = matrix[4];\n const m32 = matrix[5];\n const m13 = matrix[6];\n const m23 = matrix[7];\n const m33 = matrix[8];\n const determinant = $490279d1ff27cf6c$var$Matrix3.determinant(matrix);\n //>>includeStart('debug', pragmas.debug);\n if (Math.abs(determinant) <= (0, $AXvpI.default).EPSILON15) throw new (0, $1vHsR.default)(\"matrix is not invertible\");\n //>>includeEnd('debug');\n result[0] = m22 * m33 - m23 * m32;\n result[1] = m23 * m31 - m21 * m33;\n result[2] = m21 * m32 - m22 * m31;\n result[3] = m13 * m32 - m12 * m33;\n result[4] = m11 * m33 - m13 * m31;\n result[5] = m12 * m31 - m11 * m32;\n result[6] = m12 * m23 - m13 * m22;\n result[7] = m13 * m21 - m11 * m23;\n result[8] = m11 * m22 - m12 * m21;\n const scale = 1.0 / determinant;\n return $490279d1ff27cf6c$var$Matrix3.multiplyByScalar(result, scale, result);\n};\nconst $490279d1ff27cf6c$var$scratchTransposeMatrix = new $490279d1ff27cf6c$var$Matrix3();\n/**\n * Computes the inverse transpose of a matrix.\n *\n * @param {Matrix3} matrix The matrix to transpose and invert.\n * @param {Matrix3} result The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter.\n */ $490279d1ff27cf6c$var$Matrix3.inverseTranspose = function(matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"matrix\", matrix);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n return $490279d1ff27cf6c$var$Matrix3.inverse($490279d1ff27cf6c$var$Matrix3.transpose(matrix, $490279d1ff27cf6c$var$scratchTransposeMatrix), result);\n};\n/**\n * Compares the provided matrices componentwise and returns\n * true if they are equal, false otherwise.\n *\n * @param {Matrix3} [left] The first matrix.\n * @param {Matrix3} [right] The second matrix.\n * @returns {boolean} true if left and right are equal, false otherwise.\n */ $490279d1ff27cf6c$var$Matrix3.equals = function(left, right) {\n return left === right || (0, $jQJji.default)(left) && (0, $jQJji.default)(right) && left[0] === right[0] && left[1] === right[1] && left[2] === right[2] && left[3] === right[3] && left[4] === right[4] && left[5] === right[5] && left[6] === right[6] && left[7] === right[7] && left[8] === right[8];\n};\n/**\n * Compares the provided matrices componentwise and returns\n * true if they are within the provided epsilon,\n * false otherwise.\n *\n * @param {Matrix3} [left] The first matrix.\n * @param {Matrix3} [right] The second matrix.\n * @param {number} [epsilon=0] The epsilon to use for equality testing.\n * @returns {boolean} true if left and right are within the provided epsilon, false otherwise.\n */ $490279d1ff27cf6c$var$Matrix3.equalsEpsilon = function(left, right, epsilon) {\n epsilon = (0, $8w8ZH.default)(epsilon, 0);\n return left === right || (0, $jQJji.default)(left) && (0, $jQJji.default)(right) && Math.abs(left[0] - right[0]) <= epsilon && Math.abs(left[1] - right[1]) <= epsilon && Math.abs(left[2] - right[2]) <= epsilon && Math.abs(left[3] - right[3]) <= epsilon && Math.abs(left[4] - right[4]) <= epsilon && Math.abs(left[5] - right[5]) <= epsilon && Math.abs(left[6] - right[6]) <= epsilon && Math.abs(left[7] - right[7]) <= epsilon && Math.abs(left[8] - right[8]) <= epsilon;\n};\n/**\n * An immutable Matrix3 instance initialized to the identity matrix.\n *\n * @type {Matrix3}\n * @constant\n */ $490279d1ff27cf6c$var$Matrix3.IDENTITY = Object.freeze(new $490279d1ff27cf6c$var$Matrix3(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0));\n/**\n * An immutable Matrix3 instance initialized to the zero matrix.\n *\n * @type {Matrix3}\n * @constant\n */ $490279d1ff27cf6c$var$Matrix3.ZERO = Object.freeze(new $490279d1ff27cf6c$var$Matrix3(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0));\n/**\n * The index into Matrix3 for column 0, row 0.\n *\n * @type {number}\n * @constant\n */ $490279d1ff27cf6c$var$Matrix3.COLUMN0ROW0 = 0;\n/**\n * The index into Matrix3 for column 0, row 1.\n *\n * @type {number}\n * @constant\n */ $490279d1ff27cf6c$var$Matrix3.COLUMN0ROW1 = 1;\n/**\n * The index into Matrix3 for column 0, row 2.\n *\n * @type {number}\n * @constant\n */ $490279d1ff27cf6c$var$Matrix3.COLUMN0ROW2 = 2;\n/**\n * The index into Matrix3 for column 1, row 0.\n *\n * @type {number}\n * @constant\n */ $490279d1ff27cf6c$var$Matrix3.COLUMN1ROW0 = 3;\n/**\n * The index into Matrix3 for column 1, row 1.\n *\n * @type {number}\n * @constant\n */ $490279d1ff27cf6c$var$Matrix3.COLUMN1ROW1 = 4;\n/**\n * The index into Matrix3 for column 1, row 2.\n *\n * @type {number}\n * @constant\n */ $490279d1ff27cf6c$var$Matrix3.COLUMN1ROW2 = 5;\n/**\n * The index into Matrix3 for column 2, row 0.\n *\n * @type {number}\n * @constant\n */ $490279d1ff27cf6c$var$Matrix3.COLUMN2ROW0 = 6;\n/**\n * The index into Matrix3 for column 2, row 1.\n *\n * @type {number}\n * @constant\n */ $490279d1ff27cf6c$var$Matrix3.COLUMN2ROW1 = 7;\n/**\n * The index into Matrix3 for column 2, row 2.\n *\n * @type {number}\n * @constant\n */ $490279d1ff27cf6c$var$Matrix3.COLUMN2ROW2 = 8;\nObject.defineProperties($490279d1ff27cf6c$var$Matrix3.prototype, {\n /**\n * Gets the number of items in the collection.\n * @memberof Matrix3.prototype\n *\n * @type {number}\n */ length: {\n get: function() {\n return $490279d1ff27cf6c$var$Matrix3.packedLength;\n }\n }\n});\n/**\n * Duplicates the provided Matrix3 instance.\n *\n * @param {Matrix3} [result] The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter or a new Matrix3 instance if one was not provided.\n */ $490279d1ff27cf6c$var$Matrix3.prototype.clone = function(result) {\n return $490279d1ff27cf6c$var$Matrix3.clone(this, result);\n};\n/**\n * Compares this matrix to the provided matrix componentwise and returns\n * true if they are equal, false otherwise.\n *\n * @param {Matrix3} [right] The right hand side matrix.\n * @returns {boolean} true if they are equal, false otherwise.\n */ $490279d1ff27cf6c$var$Matrix3.prototype.equals = function(right) {\n return $490279d1ff27cf6c$var$Matrix3.equals(this, right);\n};\n/**\n * @private\n */ $490279d1ff27cf6c$var$Matrix3.equalsArray = function(matrix, array, offset) {\n return matrix[0] === array[offset] && matrix[1] === array[offset + 1] && matrix[2] === array[offset + 2] && matrix[3] === array[offset + 3] && matrix[4] === array[offset + 4] && matrix[5] === array[offset + 5] && matrix[6] === array[offset + 6] && matrix[7] === array[offset + 7] && matrix[8] === array[offset + 8];\n};\n/**\n * Compares this matrix to the provided matrix componentwise and returns\n * true if they are within the provided epsilon,\n * false otherwise.\n *\n * @param {Matrix3} [right] The right hand side matrix.\n * @param {number} [epsilon=0] The epsilon to use for equality testing.\n * @returns {boolean} true if they are within the provided epsilon, false otherwise.\n */ $490279d1ff27cf6c$var$Matrix3.prototype.equalsEpsilon = function(right, epsilon) {\n return $490279d1ff27cf6c$var$Matrix3.equalsEpsilon(this, right, epsilon);\n};\n/**\n * Creates a string representing this Matrix with each row being\n * on a separate line and in the format '(column0, column1, column2)'.\n *\n * @returns {string} A string representing the provided Matrix with each row being on a separate line and in the format '(column0, column1, column2)'.\n */ $490279d1ff27cf6c$var$Matrix3.prototype.toString = function() {\n return `(${this[0]}, ${this[3]}, ${this[6]})\\n` + `(${this[1]}, ${this[4]}, ${this[7]})\\n` + `(${this[2]}, ${this[5]}, ${this[8]})`;\n};\nvar $490279d1ff27cf6c$export$2e2bcd8739ae039 = $490279d1ff27cf6c$var$Matrix3;\n\n\n\nvar $jQJji = parcelRequire(\"jQJji\");\n/**\n * Constructs an exception object that is thrown due to an error that can occur at runtime, e.g.,\n * out of memory, could not compile shader, etc. If a function may throw this\n * exception, the calling code should be prepared to catch it.\n *

\n * On the other hand, a {@link DeveloperError} indicates an exception due\n * to a developer error, e.g., invalid argument, that usually indicates a bug in the\n * calling code.\n *\n * @alias RuntimeError\n * @constructor\n * @extends Error\n *\n * @param {string} [message] The error message for this exception.\n *\n * @see DeveloperError\n */ function $60086b06bf5db23f$var$RuntimeError(message) {\n /**\n * 'RuntimeError' indicating that this exception was thrown due to a runtime error.\n * @type {string}\n * @readonly\n */ this.name = \"RuntimeError\";\n /**\n * The explanation for why this exception was thrown.\n * @type {string}\n * @readonly\n */ this.message = message;\n //Browsers such as IE don't have a stack property until you actually throw the error.\n let stack;\n try {\n throw new Error();\n } catch (e) {\n stack = e.stack;\n }\n /**\n * The stack trace of this exception, if available.\n * @type {string}\n * @readonly\n */ this.stack = stack;\n}\nif ((0, $jQJji.default)(Object.create)) {\n $60086b06bf5db23f$var$RuntimeError.prototype = Object.create(Error.prototype);\n $60086b06bf5db23f$var$RuntimeError.prototype.constructor = $60086b06bf5db23f$var$RuntimeError;\n}\n$60086b06bf5db23f$var$RuntimeError.prototype.toString = function() {\n let str = `${this.name}: ${this.message}`;\n if ((0, $jQJji.default)(this.stack)) str += `\\n${this.stack.toString()}`;\n return str;\n};\nvar $60086b06bf5db23f$export$2e2bcd8739ae039 = $60086b06bf5db23f$var$RuntimeError;\n\n\n/**\n * A 4x4 matrix, indexable as a column-major order array.\n * Constructor parameters are in row-major order for code readability.\n * @alias Matrix4\n * @constructor\n * @implements {ArrayLike}\n *\n * @param {number} [column0Row0=0.0] The value for column 0, row 0.\n * @param {number} [column1Row0=0.0] The value for column 1, row 0.\n * @param {number} [column2Row0=0.0] The value for column 2, row 0.\n * @param {number} [column3Row0=0.0] The value for column 3, row 0.\n * @param {number} [column0Row1=0.0] The value for column 0, row 1.\n * @param {number} [column1Row1=0.0] The value for column 1, row 1.\n * @param {number} [column2Row1=0.0] The value for column 2, row 1.\n * @param {number} [column3Row1=0.0] The value for column 3, row 1.\n * @param {number} [column0Row2=0.0] The value for column 0, row 2.\n * @param {number} [column1Row2=0.0] The value for column 1, row 2.\n * @param {number} [column2Row2=0.0] The value for column 2, row 2.\n * @param {number} [column3Row2=0.0] The value for column 3, row 2.\n * @param {number} [column0Row3=0.0] The value for column 0, row 3.\n * @param {number} [column1Row3=0.0] The value for column 1, row 3.\n * @param {number} [column2Row3=0.0] The value for column 2, row 3.\n * @param {number} [column3Row3=0.0] The value for column 3, row 3.\n *\n * @see Matrix4.fromArray\n * @see Matrix4.fromColumnMajorArray\n * @see Matrix4.fromRowMajorArray\n * @see Matrix4.fromRotationTranslation\n * @see Matrix4.fromTranslationQuaternionRotationScale\n * @see Matrix4.fromTranslationRotationScale\n * @see Matrix4.fromTranslation\n * @see Matrix4.fromScale\n * @see Matrix4.fromUniformScale\n * @see Matrix4.fromRotation\n * @see Matrix4.fromCamera\n * @see Matrix4.computePerspectiveFieldOfView\n * @see Matrix4.computeOrthographicOffCenter\n * @see Matrix4.computePerspectiveOffCenter\n * @see Matrix4.computeInfinitePerspectiveOffCenter\n * @see Matrix4.computeViewportTransformation\n * @see Matrix4.computeView\n * @see Matrix2\n * @see Matrix3\n * @see Packable\n */ function $7ec6ab76c28fee32$var$Matrix4(column0Row0, column1Row0, column2Row0, column3Row0, column0Row1, column1Row1, column2Row1, column3Row1, column0Row2, column1Row2, column2Row2, column3Row2, column0Row3, column1Row3, column2Row3, column3Row3) {\n this[0] = (0, $8w8ZH.default)(column0Row0, 0.0);\n this[1] = (0, $8w8ZH.default)(column0Row1, 0.0);\n this[2] = (0, $8w8ZH.default)(column0Row2, 0.0);\n this[3] = (0, $8w8ZH.default)(column0Row3, 0.0);\n this[4] = (0, $8w8ZH.default)(column1Row0, 0.0);\n this[5] = (0, $8w8ZH.default)(column1Row1, 0.0);\n this[6] = (0, $8w8ZH.default)(column1Row2, 0.0);\n this[7] = (0, $8w8ZH.default)(column1Row3, 0.0);\n this[8] = (0, $8w8ZH.default)(column2Row0, 0.0);\n this[9] = (0, $8w8ZH.default)(column2Row1, 0.0);\n this[10] = (0, $8w8ZH.default)(column2Row2, 0.0);\n this[11] = (0, $8w8ZH.default)(column2Row3, 0.0);\n this[12] = (0, $8w8ZH.default)(column3Row0, 0.0);\n this[13] = (0, $8w8ZH.default)(column3Row1, 0.0);\n this[14] = (0, $8w8ZH.default)(column3Row2, 0.0);\n this[15] = (0, $8w8ZH.default)(column3Row3, 0.0);\n}\n/**\n * The number of elements used to pack the object into an array.\n * @type {number}\n */ $7ec6ab76c28fee32$var$Matrix4.packedLength = 16;\n/**\n * Stores the provided instance into the provided array.\n *\n * @param {Matrix4} value The value to pack.\n * @param {number[]} array The array to pack into.\n * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.\n *\n * @returns {number[]} The array that was packed into\n */ $7ec6ab76c28fee32$var$Matrix4.pack = function(value, array, startingIndex) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"value\", value);\n (0, $3pzcG.default).defined(\"array\", array);\n //>>includeEnd('debug');\n startingIndex = (0, $8w8ZH.default)(startingIndex, 0);\n array[startingIndex++] = value[0];\n array[startingIndex++] = value[1];\n array[startingIndex++] = value[2];\n array[startingIndex++] = value[3];\n array[startingIndex++] = value[4];\n array[startingIndex++] = value[5];\n array[startingIndex++] = value[6];\n array[startingIndex++] = value[7];\n array[startingIndex++] = value[8];\n array[startingIndex++] = value[9];\n array[startingIndex++] = value[10];\n array[startingIndex++] = value[11];\n array[startingIndex++] = value[12];\n array[startingIndex++] = value[13];\n array[startingIndex++] = value[14];\n array[startingIndex] = value[15];\n return array;\n};\n/**\n * Retrieves an instance from a packed array.\n *\n * @param {number[]} array The packed array.\n * @param {number} [startingIndex=0] The starting index of the element to be unpacked.\n * @param {Matrix4} [result] The object into which to store the result.\n * @returns {Matrix4} The modified result parameter or a new Matrix4 instance if one was not provided.\n */ $7ec6ab76c28fee32$var$Matrix4.unpack = function(array, startingIndex, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).defined(\"array\", array);\n //>>includeEnd('debug');\n startingIndex = (0, $8w8ZH.default)(startingIndex, 0);\n if (!(0, $jQJji.default)(result)) result = new $7ec6ab76c28fee32$var$Matrix4();\n result[0] = array[startingIndex++];\n result[1] = array[startingIndex++];\n result[2] = array[startingIndex++];\n result[3] = array[startingIndex++];\n result[4] = array[startingIndex++];\n result[5] = array[startingIndex++];\n result[6] = array[startingIndex++];\n result[7] = array[startingIndex++];\n result[8] = array[startingIndex++];\n result[9] = array[startingIndex++];\n result[10] = array[startingIndex++];\n result[11] = array[startingIndex++];\n result[12] = array[startingIndex++];\n result[13] = array[startingIndex++];\n result[14] = array[startingIndex++];\n result[15] = array[startingIndex];\n return result;\n};\n/**\n * Flattens an array of Matrix4s into an array of components. The components\n * are stored in column-major order.\n *\n * @param {Matrix4[]} array The array of matrices to pack.\n * @param {number[]} [result] The array onto which to store the result. If this is a typed array, it must have array.length * 16 components, else a {@link DeveloperError} will be thrown. If it is a regular array, it will be resized to have (array.length * 16) elements.\n * @returns {number[]} The packed array.\n */ $7ec6ab76c28fee32$var$Matrix4.packArray = function(array, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).defined(\"array\", array);\n //>>includeEnd('debug');\n const length = array.length;\n const resultLength = length * 16;\n if (!(0, $jQJji.default)(result)) result = new Array(resultLength);\n else if (!Array.isArray(result) && result.length !== resultLength) //>>includeStart('debug', pragmas.debug);\n throw new (0, $1vHsR.default)(\"If result is a typed array, it must have exactly array.length * 16 elements\");\n else if (result.length !== resultLength) result.length = resultLength;\n for(let i = 0; i < length; ++i)$7ec6ab76c28fee32$var$Matrix4.pack(array[i], result, i * 16);\n return result;\n};\n/**\n * Unpacks an array of column-major matrix components into an array of Matrix4s.\n *\n * @param {number[]} array The array of components to unpack.\n * @param {Matrix4[]} [result] The array onto which to store the result.\n * @returns {Matrix4[]} The unpacked array.\n */ $7ec6ab76c28fee32$var$Matrix4.unpackArray = function(array, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).defined(\"array\", array);\n (0, $3pzcG.default).typeOf.number.greaterThanOrEquals(\"array.length\", array.length, 16);\n if (array.length % 16 !== 0) throw new (0, $1vHsR.default)(\"array length must be a multiple of 16.\");\n //>>includeEnd('debug');\n const length = array.length;\n if (!(0, $jQJji.default)(result)) result = new Array(length / 16);\n else result.length = length / 16;\n for(let i = 0; i < length; i += 16){\n const index = i / 16;\n result[index] = $7ec6ab76c28fee32$var$Matrix4.unpack(array, i, result[index]);\n }\n return result;\n};\n/**\n * Duplicates a Matrix4 instance.\n *\n * @param {Matrix4} matrix The matrix to duplicate.\n * @param {Matrix4} [result] The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter or a new Matrix4 instance if one was not provided. (Returns undefined if matrix is undefined)\n */ $7ec6ab76c28fee32$var$Matrix4.clone = function(matrix, result) {\n if (!(0, $jQJji.default)(matrix)) return undefined;\n if (!(0, $jQJji.default)(result)) return new $7ec6ab76c28fee32$var$Matrix4(matrix[0], matrix[4], matrix[8], matrix[12], matrix[1], matrix[5], matrix[9], matrix[13], matrix[2], matrix[6], matrix[10], matrix[14], matrix[3], matrix[7], matrix[11], matrix[15]);\n result[0] = matrix[0];\n result[1] = matrix[1];\n result[2] = matrix[2];\n result[3] = matrix[3];\n result[4] = matrix[4];\n result[5] = matrix[5];\n result[6] = matrix[6];\n result[7] = matrix[7];\n result[8] = matrix[8];\n result[9] = matrix[9];\n result[10] = matrix[10];\n result[11] = matrix[11];\n result[12] = matrix[12];\n result[13] = matrix[13];\n result[14] = matrix[14];\n result[15] = matrix[15];\n return result;\n};\n/**\n * Creates a Matrix4 from 16 consecutive elements in an array.\n * @function\n *\n * @param {number[]} array The array whose 16 consecutive elements correspond to the positions of the matrix. Assumes column-major order.\n * @param {number} [startingIndex=0] The offset into the array of the first element, which corresponds to first column first row position in the matrix.\n * @param {Matrix4} [result] The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter or a new Matrix4 instance if one was not provided.\n *\n * @example\n * // Create the Matrix4:\n * // [1.0, 2.0, 3.0, 4.0]\n * // [1.0, 2.0, 3.0, 4.0]\n * // [1.0, 2.0, 3.0, 4.0]\n * // [1.0, 2.0, 3.0, 4.0]\n *\n * const v = [1.0, 1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 2.0, 3.0, 3.0, 3.0, 3.0, 4.0, 4.0, 4.0, 4.0];\n * const m = Cesium.Matrix4.fromArray(v);\n *\n * // Create same Matrix4 with using an offset into an array\n * const v2 = [0.0, 0.0, 1.0, 1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 2.0, 3.0, 3.0, 3.0, 3.0, 4.0, 4.0, 4.0, 4.0];\n * const m2 = Cesium.Matrix4.fromArray(v2, 2);\n */ $7ec6ab76c28fee32$var$Matrix4.fromArray = $7ec6ab76c28fee32$var$Matrix4.unpack;\n/**\n * Computes a Matrix4 instance from a column-major order array.\n *\n * @param {number[]} values The column-major order array.\n * @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.\n */ $7ec6ab76c28fee32$var$Matrix4.fromColumnMajorArray = function(values, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).defined(\"values\", values);\n //>>includeEnd('debug');\n return $7ec6ab76c28fee32$var$Matrix4.clone(values, result);\n};\n/**\n * Computes a Matrix4 instance from a row-major order array.\n * The resulting matrix will be in column-major order.\n *\n * @param {number[]} values The row-major order array.\n * @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.\n */ $7ec6ab76c28fee32$var$Matrix4.fromRowMajorArray = function(values, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).defined(\"values\", values);\n //>>includeEnd('debug');\n if (!(0, $jQJji.default)(result)) return new $7ec6ab76c28fee32$var$Matrix4(values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8], values[9], values[10], values[11], values[12], values[13], values[14], values[15]);\n result[0] = values[0];\n result[1] = values[4];\n result[2] = values[8];\n result[3] = values[12];\n result[4] = values[1];\n result[5] = values[5];\n result[6] = values[9];\n result[7] = values[13];\n result[8] = values[2];\n result[9] = values[6];\n result[10] = values[10];\n result[11] = values[14];\n result[12] = values[3];\n result[13] = values[7];\n result[14] = values[11];\n result[15] = values[15];\n return result;\n};\n/**\n * Computes a Matrix4 instance from a Matrix3 representing the rotation\n * and a Cartesian3 representing the translation.\n *\n * @param {Matrix3} rotation The upper left portion of the matrix representing the rotation.\n * @param {Cartesian3} [translation=Cartesian3.ZERO] The upper right portion of the matrix representing the translation.\n * @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.\n */ $7ec6ab76c28fee32$var$Matrix4.fromRotationTranslation = function(rotation, translation, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"rotation\", rotation);\n //>>includeEnd('debug');\n translation = (0, $8w8ZH.default)(translation, (0, $bXwZF.default).ZERO);\n if (!(0, $jQJji.default)(result)) return new $7ec6ab76c28fee32$var$Matrix4(rotation[0], rotation[3], rotation[6], translation.x, rotation[1], rotation[4], rotation[7], translation.y, rotation[2], rotation[5], rotation[8], translation.z, 0.0, 0.0, 0.0, 1.0);\n result[0] = rotation[0];\n result[1] = rotation[1];\n result[2] = rotation[2];\n result[3] = 0.0;\n result[4] = rotation[3];\n result[5] = rotation[4];\n result[6] = rotation[5];\n result[7] = 0.0;\n result[8] = rotation[6];\n result[9] = rotation[7];\n result[10] = rotation[8];\n result[11] = 0.0;\n result[12] = translation.x;\n result[13] = translation.y;\n result[14] = translation.z;\n result[15] = 1.0;\n return result;\n};\n/**\n * Computes a Matrix4 instance from a translation, rotation, and scale (TRS)\n * representation with the rotation represented as a quaternion.\n *\n * @param {Cartesian3} translation The translation transformation.\n * @param {Quaternion} rotation The rotation transformation.\n * @param {Cartesian3} scale The non-uniform scale transformation.\n * @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.\n *\n * @example\n * const result = Cesium.Matrix4.fromTranslationQuaternionRotationScale(\n * new Cesium.Cartesian3(1.0, 2.0, 3.0), // translation\n * Cesium.Quaternion.IDENTITY, // rotation\n * new Cesium.Cartesian3(7.0, 8.0, 9.0), // scale\n * result);\n */ $7ec6ab76c28fee32$var$Matrix4.fromTranslationQuaternionRotationScale = function(translation, rotation, scale, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"translation\", translation);\n (0, $3pzcG.default).typeOf.object(\"rotation\", rotation);\n (0, $3pzcG.default).typeOf.object(\"scale\", scale);\n //>>includeEnd('debug');\n if (!(0, $jQJji.default)(result)) result = new $7ec6ab76c28fee32$var$Matrix4();\n const scaleX = scale.x;\n const scaleY = scale.y;\n const scaleZ = scale.z;\n const x2 = rotation.x * rotation.x;\n const xy = rotation.x * rotation.y;\n const xz = rotation.x * rotation.z;\n const xw = rotation.x * rotation.w;\n const y2 = rotation.y * rotation.y;\n const yz = rotation.y * rotation.z;\n const yw = rotation.y * rotation.w;\n const z2 = rotation.z * rotation.z;\n const zw = rotation.z * rotation.w;\n const w2 = rotation.w * rotation.w;\n const m00 = x2 - y2 - z2 + w2;\n const m01 = 2.0 * (xy - zw);\n const m02 = 2.0 * (xz + yw);\n const m10 = 2.0 * (xy + zw);\n const m11 = -x2 + y2 - z2 + w2;\n const m12 = 2.0 * (yz - xw);\n const m20 = 2.0 * (xz - yw);\n const m21 = 2.0 * (yz + xw);\n const m22 = -x2 - y2 + z2 + w2;\n result[0] = m00 * scaleX;\n result[1] = m10 * scaleX;\n result[2] = m20 * scaleX;\n result[3] = 0.0;\n result[4] = m01 * scaleY;\n result[5] = m11 * scaleY;\n result[6] = m21 * scaleY;\n result[7] = 0.0;\n result[8] = m02 * scaleZ;\n result[9] = m12 * scaleZ;\n result[10] = m22 * scaleZ;\n result[11] = 0.0;\n result[12] = translation.x;\n result[13] = translation.y;\n result[14] = translation.z;\n result[15] = 1.0;\n return result;\n};\n/**\n * Creates a Matrix4 instance from a {@link TranslationRotationScale} instance.\n *\n * @param {TranslationRotationScale} translationRotationScale The instance.\n * @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.\n */ $7ec6ab76c28fee32$var$Matrix4.fromTranslationRotationScale = function(translationRotationScale, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"translationRotationScale\", translationRotationScale);\n //>>includeEnd('debug');\n return $7ec6ab76c28fee32$var$Matrix4.fromTranslationQuaternionRotationScale(translationRotationScale.translation, translationRotationScale.rotation, translationRotationScale.scale, result);\n};\n/**\n * Creates a Matrix4 instance from a Cartesian3 representing the translation.\n *\n * @param {Cartesian3} translation The upper right portion of the matrix representing the translation.\n * @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.\n *\n * @see Matrix4.multiplyByTranslation\n */ $7ec6ab76c28fee32$var$Matrix4.fromTranslation = function(translation, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"translation\", translation);\n //>>includeEnd('debug');\n return $7ec6ab76c28fee32$var$Matrix4.fromRotationTranslation((0, $490279d1ff27cf6c$export$2e2bcd8739ae039).IDENTITY, translation, result);\n};\n/**\n * Computes a Matrix4 instance representing a non-uniform scale.\n *\n * @param {Cartesian3} scale The x, y, and z scale factors.\n * @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.\n *\n * @example\n * // Creates\n * // [7.0, 0.0, 0.0, 0.0]\n * // [0.0, 8.0, 0.0, 0.0]\n * // [0.0, 0.0, 9.0, 0.0]\n * // [0.0, 0.0, 0.0, 1.0]\n * const m = Cesium.Matrix4.fromScale(new Cesium.Cartesian3(7.0, 8.0, 9.0));\n */ $7ec6ab76c28fee32$var$Matrix4.fromScale = function(scale, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"scale\", scale);\n //>>includeEnd('debug');\n if (!(0, $jQJji.default)(result)) return new $7ec6ab76c28fee32$var$Matrix4(scale.x, 0.0, 0.0, 0.0, 0.0, scale.y, 0.0, 0.0, 0.0, 0.0, scale.z, 0.0, 0.0, 0.0, 0.0, 1.0);\n result[0] = scale.x;\n result[1] = 0.0;\n result[2] = 0.0;\n result[3] = 0.0;\n result[4] = 0.0;\n result[5] = scale.y;\n result[6] = 0.0;\n result[7] = 0.0;\n result[8] = 0.0;\n result[9] = 0.0;\n result[10] = scale.z;\n result[11] = 0.0;\n result[12] = 0.0;\n result[13] = 0.0;\n result[14] = 0.0;\n result[15] = 1.0;\n return result;\n};\n/**\n * Computes a Matrix4 instance representing a uniform scale.\n *\n * @param {number} scale The uniform scale factor.\n * @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.\n *\n * @example\n * // Creates\n * // [2.0, 0.0, 0.0, 0.0]\n * // [0.0, 2.0, 0.0, 0.0]\n * // [0.0, 0.0, 2.0, 0.0]\n * // [0.0, 0.0, 0.0, 1.0]\n * const m = Cesium.Matrix4.fromUniformScale(2.0);\n */ $7ec6ab76c28fee32$var$Matrix4.fromUniformScale = function(scale, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.number(\"scale\", scale);\n //>>includeEnd('debug');\n if (!(0, $jQJji.default)(result)) return new $7ec6ab76c28fee32$var$Matrix4(scale, 0.0, 0.0, 0.0, 0.0, scale, 0.0, 0.0, 0.0, 0.0, scale, 0.0, 0.0, 0.0, 0.0, 1.0);\n result[0] = scale;\n result[1] = 0.0;\n result[2] = 0.0;\n result[3] = 0.0;\n result[4] = 0.0;\n result[5] = scale;\n result[6] = 0.0;\n result[7] = 0.0;\n result[8] = 0.0;\n result[9] = 0.0;\n result[10] = scale;\n result[11] = 0.0;\n result[12] = 0.0;\n result[13] = 0.0;\n result[14] = 0.0;\n result[15] = 1.0;\n return result;\n};\n/**\n * Creates a rotation matrix.\n *\n * @param {Matrix3} rotation The rotation matrix.\n * @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.\n */ $7ec6ab76c28fee32$var$Matrix4.fromRotation = function(rotation, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"rotation\", rotation);\n //>>includeEnd('debug');\n if (!(0, $jQJji.default)(result)) result = new $7ec6ab76c28fee32$var$Matrix4();\n result[0] = rotation[0];\n result[1] = rotation[1];\n result[2] = rotation[2];\n result[3] = 0.0;\n result[4] = rotation[3];\n result[5] = rotation[4];\n result[6] = rotation[5];\n result[7] = 0.0;\n result[8] = rotation[6];\n result[9] = rotation[7];\n result[10] = rotation[8];\n result[11] = 0.0;\n result[12] = 0.0;\n result[13] = 0.0;\n result[14] = 0.0;\n result[15] = 1.0;\n return result;\n};\nconst $7ec6ab76c28fee32$var$fromCameraF = new (0, $bXwZF.default)();\nconst $7ec6ab76c28fee32$var$fromCameraR = new (0, $bXwZF.default)();\nconst $7ec6ab76c28fee32$var$fromCameraU = new (0, $bXwZF.default)();\n/**\n * Computes a Matrix4 instance from a Camera.\n *\n * @param {Camera} camera The camera to use.\n * @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.\n */ $7ec6ab76c28fee32$var$Matrix4.fromCamera = function(camera, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"camera\", camera);\n //>>includeEnd('debug');\n const position = camera.position;\n const direction = camera.direction;\n const up = camera.up;\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"camera.position\", position);\n (0, $3pzcG.default).typeOf.object(\"camera.direction\", direction);\n (0, $3pzcG.default).typeOf.object(\"camera.up\", up);\n //>>includeEnd('debug');\n (0, $bXwZF.default).normalize(direction, $7ec6ab76c28fee32$var$fromCameraF);\n (0, $bXwZF.default).normalize((0, $bXwZF.default).cross($7ec6ab76c28fee32$var$fromCameraF, up, $7ec6ab76c28fee32$var$fromCameraR), $7ec6ab76c28fee32$var$fromCameraR);\n (0, $bXwZF.default).normalize((0, $bXwZF.default).cross($7ec6ab76c28fee32$var$fromCameraR, $7ec6ab76c28fee32$var$fromCameraF, $7ec6ab76c28fee32$var$fromCameraU), $7ec6ab76c28fee32$var$fromCameraU);\n const sX = $7ec6ab76c28fee32$var$fromCameraR.x;\n const sY = $7ec6ab76c28fee32$var$fromCameraR.y;\n const sZ = $7ec6ab76c28fee32$var$fromCameraR.z;\n const fX = $7ec6ab76c28fee32$var$fromCameraF.x;\n const fY = $7ec6ab76c28fee32$var$fromCameraF.y;\n const fZ = $7ec6ab76c28fee32$var$fromCameraF.z;\n const uX = $7ec6ab76c28fee32$var$fromCameraU.x;\n const uY = $7ec6ab76c28fee32$var$fromCameraU.y;\n const uZ = $7ec6ab76c28fee32$var$fromCameraU.z;\n const positionX = position.x;\n const positionY = position.y;\n const positionZ = position.z;\n const t0 = sX * -positionX + sY * -positionY + sZ * -positionZ;\n const t1 = uX * -positionX + uY * -positionY + uZ * -positionZ;\n const t2 = fX * positionX + fY * positionY + fZ * positionZ;\n // The code below this comment is an optimized\n // version of the commented lines.\n // Rather that create two matrices and then multiply,\n // we just bake in the multiplcation as part of creation.\n // const rotation = new Matrix4(\n // sX, sY, sZ, 0.0,\n // uX, uY, uZ, 0.0,\n // -fX, -fY, -fZ, 0.0,\n // 0.0, 0.0, 0.0, 1.0);\n // const translation = new Matrix4(\n // 1.0, 0.0, 0.0, -position.x,\n // 0.0, 1.0, 0.0, -position.y,\n // 0.0, 0.0, 1.0, -position.z,\n // 0.0, 0.0, 0.0, 1.0);\n // return rotation.multiply(translation);\n if (!(0, $jQJji.default)(result)) return new $7ec6ab76c28fee32$var$Matrix4(sX, sY, sZ, t0, uX, uY, uZ, t1, -fX, -fY, -fZ, t2, 0.0, 0.0, 0.0, 1.0);\n result[0] = sX;\n result[1] = uX;\n result[2] = -fX;\n result[3] = 0.0;\n result[4] = sY;\n result[5] = uY;\n result[6] = -fY;\n result[7] = 0.0;\n result[8] = sZ;\n result[9] = uZ;\n result[10] = -fZ;\n result[11] = 0.0;\n result[12] = t0;\n result[13] = t1;\n result[14] = t2;\n result[15] = 1.0;\n return result;\n};\n/**\n * Computes a Matrix4 instance representing a perspective transformation matrix.\n *\n * @param {number} fovY The field of view along the Y axis in radians.\n * @param {number} aspectRatio The aspect ratio.\n * @param {number} near The distance to the near plane in meters.\n * @param {number} far The distance to the far plane in meters.\n * @param {Matrix4} result The object in which the result will be stored.\n * @returns {Matrix4} The modified result parameter.\n *\n * @exception {DeveloperError} fovY must be in (0, PI].\n * @exception {DeveloperError} aspectRatio must be greater than zero.\n * @exception {DeveloperError} near must be greater than zero.\n * @exception {DeveloperError} far must be greater than zero.\n */ $7ec6ab76c28fee32$var$Matrix4.computePerspectiveFieldOfView = function(fovY, aspectRatio, near, far, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.number.greaterThan(\"fovY\", fovY, 0.0);\n (0, $3pzcG.default).typeOf.number.lessThan(\"fovY\", fovY, Math.PI);\n (0, $3pzcG.default).typeOf.number.greaterThan(\"near\", near, 0.0);\n (0, $3pzcG.default).typeOf.number.greaterThan(\"far\", far, 0.0);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n const bottom = Math.tan(fovY * 0.5);\n const column1Row1 = 1.0 / bottom;\n const column0Row0 = column1Row1 / aspectRatio;\n const column2Row2 = (far + near) / (near - far);\n const column3Row2 = 2.0 * far * near / (near - far);\n result[0] = column0Row0;\n result[1] = 0.0;\n result[2] = 0.0;\n result[3] = 0.0;\n result[4] = 0.0;\n result[5] = column1Row1;\n result[6] = 0.0;\n result[7] = 0.0;\n result[8] = 0.0;\n result[9] = 0.0;\n result[10] = column2Row2;\n result[11] = -1;\n result[12] = 0.0;\n result[13] = 0.0;\n result[14] = column3Row2;\n result[15] = 0.0;\n return result;\n};\n/**\n * Computes a Matrix4 instance representing an orthographic transformation matrix.\n *\n * @param {number} left The number of meters to the left of the camera that will be in view.\n * @param {number} right The number of meters to the right of the camera that will be in view.\n * @param {number} bottom The number of meters below of the camera that will be in view.\n * @param {number} top The number of meters above of the camera that will be in view.\n * @param {number} near The distance to the near plane in meters.\n * @param {number} far The distance to the far plane in meters.\n * @param {Matrix4} result The object in which the result will be stored.\n * @returns {Matrix4} The modified result parameter.\n */ $7ec6ab76c28fee32$var$Matrix4.computeOrthographicOffCenter = function(left, right, bottom, top, near, far, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.number(\"left\", left);\n (0, $3pzcG.default).typeOf.number(\"right\", right);\n (0, $3pzcG.default).typeOf.number(\"bottom\", bottom);\n (0, $3pzcG.default).typeOf.number(\"top\", top);\n (0, $3pzcG.default).typeOf.number(\"near\", near);\n (0, $3pzcG.default).typeOf.number(\"far\", far);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n let a = 1.0 / (right - left);\n let b = 1.0 / (top - bottom);\n let c = 1.0 / (far - near);\n const tx = -(right + left) * a;\n const ty = -(top + bottom) * b;\n const tz = -(far + near) * c;\n a *= 2.0;\n b *= 2.0;\n c *= -2;\n result[0] = a;\n result[1] = 0.0;\n result[2] = 0.0;\n result[3] = 0.0;\n result[4] = 0.0;\n result[5] = b;\n result[6] = 0.0;\n result[7] = 0.0;\n result[8] = 0.0;\n result[9] = 0.0;\n result[10] = c;\n result[11] = 0.0;\n result[12] = tx;\n result[13] = ty;\n result[14] = tz;\n result[15] = 1.0;\n return result;\n};\n/**\n * Computes a Matrix4 instance representing an off center perspective transformation.\n *\n * @param {number} left The number of meters to the left of the camera that will be in view.\n * @param {number} right The number of meters to the right of the camera that will be in view.\n * @param {number} bottom The number of meters below the camera that will be in view.\n * @param {number} top The number of meters above the camera that will be in view.\n * @param {number} near The distance to the near plane in meters.\n * @param {number} far The distance to the far plane in meters.\n * @param {Matrix4} result The object in which the result will be stored.\n * @returns {Matrix4} The modified result parameter.\n */ $7ec6ab76c28fee32$var$Matrix4.computePerspectiveOffCenter = function(left, right, bottom, top, near, far, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.number(\"left\", left);\n (0, $3pzcG.default).typeOf.number(\"right\", right);\n (0, $3pzcG.default).typeOf.number(\"bottom\", bottom);\n (0, $3pzcG.default).typeOf.number(\"top\", top);\n (0, $3pzcG.default).typeOf.number(\"near\", near);\n (0, $3pzcG.default).typeOf.number(\"far\", far);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n const column0Row0 = 2.0 * near / (right - left);\n const column1Row1 = 2.0 * near / (top - bottom);\n const column2Row0 = (right + left) / (right - left);\n const column2Row1 = (top + bottom) / (top - bottom);\n const column2Row2 = -(far + near) / (far - near);\n const column2Row3 = -1;\n const column3Row2 = -2 * far * near / (far - near);\n result[0] = column0Row0;\n result[1] = 0.0;\n result[2] = 0.0;\n result[3] = 0.0;\n result[4] = 0.0;\n result[5] = column1Row1;\n result[6] = 0.0;\n result[7] = 0.0;\n result[8] = column2Row0;\n result[9] = column2Row1;\n result[10] = column2Row2;\n result[11] = column2Row3;\n result[12] = 0.0;\n result[13] = 0.0;\n result[14] = column3Row2;\n result[15] = 0.0;\n return result;\n};\n/**\n * Computes a Matrix4 instance representing an infinite off center perspective transformation.\n *\n * @param {number} left The number of meters to the left of the camera that will be in view.\n * @param {number} right The number of meters to the right of the camera that will be in view.\n * @param {number} bottom The number of meters below of the camera that will be in view.\n * @param {number} top The number of meters above of the camera that will be in view.\n * @param {number} near The distance to the near plane in meters.\n * @param {Matrix4} result The object in which the result will be stored.\n * @returns {Matrix4} The modified result parameter.\n */ $7ec6ab76c28fee32$var$Matrix4.computeInfinitePerspectiveOffCenter = function(left, right, bottom, top, near, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.number(\"left\", left);\n (0, $3pzcG.default).typeOf.number(\"right\", right);\n (0, $3pzcG.default).typeOf.number(\"bottom\", bottom);\n (0, $3pzcG.default).typeOf.number(\"top\", top);\n (0, $3pzcG.default).typeOf.number(\"near\", near);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n const column0Row0 = 2.0 * near / (right - left);\n const column1Row1 = 2.0 * near / (top - bottom);\n const column2Row0 = (right + left) / (right - left);\n const column2Row1 = (top + bottom) / (top - bottom);\n const column2Row2 = -1;\n const column2Row3 = -1;\n const column3Row2 = -2 * near;\n result[0] = column0Row0;\n result[1] = 0.0;\n result[2] = 0.0;\n result[3] = 0.0;\n result[4] = 0.0;\n result[5] = column1Row1;\n result[6] = 0.0;\n result[7] = 0.0;\n result[8] = column2Row0;\n result[9] = column2Row1;\n result[10] = column2Row2;\n result[11] = column2Row3;\n result[12] = 0.0;\n result[13] = 0.0;\n result[14] = column3Row2;\n result[15] = 0.0;\n return result;\n};\n/**\n * Computes a Matrix4 instance that transforms from normalized device coordinates to window coordinates.\n *\n * @param {object} [viewport = { x : 0.0, y : 0.0, width : 0.0, height : 0.0 }] The viewport's corners as shown in Example 1.\n * @param {number} [nearDepthRange=0.0] The near plane distance in window coordinates.\n * @param {number} [farDepthRange=1.0] The far plane distance in window coordinates.\n * @param {Matrix4} [result] The object in which the result will be stored.\n * @returns {Matrix4} The modified result parameter.\n *\n * @example\n * // Create viewport transformation using an explicit viewport and depth range.\n * const m = Cesium.Matrix4.computeViewportTransformation({\n * x : 0.0,\n * y : 0.0,\n * width : 1024.0,\n * height : 768.0\n * }, 0.0, 1.0, new Cesium.Matrix4());\n */ $7ec6ab76c28fee32$var$Matrix4.computeViewportTransformation = function(viewport, nearDepthRange, farDepthRange, result) {\n if (!(0, $jQJji.default)(result)) result = new $7ec6ab76c28fee32$var$Matrix4();\n viewport = (0, $8w8ZH.default)(viewport, (0, $8w8ZH.default).EMPTY_OBJECT);\n const x = (0, $8w8ZH.default)(viewport.x, 0.0);\n const y = (0, $8w8ZH.default)(viewport.y, 0.0);\n const width = (0, $8w8ZH.default)(viewport.width, 0.0);\n const height = (0, $8w8ZH.default)(viewport.height, 0.0);\n nearDepthRange = (0, $8w8ZH.default)(nearDepthRange, 0.0);\n farDepthRange = (0, $8w8ZH.default)(farDepthRange, 1.0);\n const halfWidth = width * 0.5;\n const halfHeight = height * 0.5;\n const halfDepth = (farDepthRange - nearDepthRange) * 0.5;\n const column0Row0 = halfWidth;\n const column1Row1 = halfHeight;\n const column2Row2 = halfDepth;\n const column3Row0 = x + halfWidth;\n const column3Row1 = y + halfHeight;\n const column3Row2 = nearDepthRange + halfDepth;\n const column3Row3 = 1.0;\n result[0] = column0Row0;\n result[1] = 0.0;\n result[2] = 0.0;\n result[3] = 0.0;\n result[4] = 0.0;\n result[5] = column1Row1;\n result[6] = 0.0;\n result[7] = 0.0;\n result[8] = 0.0;\n result[9] = 0.0;\n result[10] = column2Row2;\n result[11] = 0.0;\n result[12] = column3Row0;\n result[13] = column3Row1;\n result[14] = column3Row2;\n result[15] = column3Row3;\n return result;\n};\n/**\n * Computes a Matrix4 instance that transforms from world space to view space.\n *\n * @param {Cartesian3} position The position of the camera.\n * @param {Cartesian3} direction The forward direction.\n * @param {Cartesian3} up The up direction.\n * @param {Cartesian3} right The right direction.\n * @param {Matrix4} result The object in which the result will be stored.\n * @returns {Matrix4} The modified result parameter.\n */ $7ec6ab76c28fee32$var$Matrix4.computeView = function(position, direction, up, right, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"position\", position);\n (0, $3pzcG.default).typeOf.object(\"direction\", direction);\n (0, $3pzcG.default).typeOf.object(\"up\", up);\n (0, $3pzcG.default).typeOf.object(\"right\", right);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n result[0] = right.x;\n result[1] = up.x;\n result[2] = -direction.x;\n result[3] = 0.0;\n result[4] = right.y;\n result[5] = up.y;\n result[6] = -direction.y;\n result[7] = 0.0;\n result[8] = right.z;\n result[9] = up.z;\n result[10] = -direction.z;\n result[11] = 0.0;\n result[12] = -(0, $bXwZF.default).dot(right, position);\n result[13] = -(0, $bXwZF.default).dot(up, position);\n result[14] = (0, $bXwZF.default).dot(direction, position);\n result[15] = 1.0;\n return result;\n};\n/**\n * Computes an Array from the provided Matrix4 instance.\n * The array will be in column-major order.\n *\n * @param {Matrix4} matrix The matrix to use..\n * @param {number[]} [result] The Array onto which to store the result.\n * @returns {number[]} The modified Array parameter or a new Array instance if one was not provided.\n *\n * @example\n * //create an array from an instance of Matrix4\n * // m = [10.0, 14.0, 18.0, 22.0]\n * // [11.0, 15.0, 19.0, 23.0]\n * // [12.0, 16.0, 20.0, 24.0]\n * // [13.0, 17.0, 21.0, 25.0]\n * const a = Cesium.Matrix4.toArray(m);\n *\n * // m remains the same\n * //creates a = [10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0]\n */ $7ec6ab76c28fee32$var$Matrix4.toArray = function(matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"matrix\", matrix);\n //>>includeEnd('debug');\n if (!(0, $jQJji.default)(result)) return [\n matrix[0],\n matrix[1],\n matrix[2],\n matrix[3],\n matrix[4],\n matrix[5],\n matrix[6],\n matrix[7],\n matrix[8],\n matrix[9],\n matrix[10],\n matrix[11],\n matrix[12],\n matrix[13],\n matrix[14],\n matrix[15]\n ];\n result[0] = matrix[0];\n result[1] = matrix[1];\n result[2] = matrix[2];\n result[3] = matrix[3];\n result[4] = matrix[4];\n result[5] = matrix[5];\n result[6] = matrix[6];\n result[7] = matrix[7];\n result[8] = matrix[8];\n result[9] = matrix[9];\n result[10] = matrix[10];\n result[11] = matrix[11];\n result[12] = matrix[12];\n result[13] = matrix[13];\n result[14] = matrix[14];\n result[15] = matrix[15];\n return result;\n};\n/**\n * Computes the array index of the element at the provided row and column.\n *\n * @param {number} row The zero-based index of the row.\n * @param {number} column The zero-based index of the column.\n * @returns {number} The index of the element at the provided row and column.\n *\n * @exception {DeveloperError} row must be 0, 1, 2, or 3.\n * @exception {DeveloperError} column must be 0, 1, 2, or 3.\n *\n * @example\n * const myMatrix = new Cesium.Matrix4();\n * const column1Row0Index = Cesium.Matrix4.getElementIndex(1, 0);\n * const column1Row0 = myMatrix[column1Row0Index];\n * myMatrix[column1Row0Index] = 10.0;\n */ $7ec6ab76c28fee32$var$Matrix4.getElementIndex = function(column, row) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.number.greaterThanOrEquals(\"row\", row, 0);\n (0, $3pzcG.default).typeOf.number.lessThanOrEquals(\"row\", row, 3);\n (0, $3pzcG.default).typeOf.number.greaterThanOrEquals(\"column\", column, 0);\n (0, $3pzcG.default).typeOf.number.lessThanOrEquals(\"column\", column, 3);\n //>>includeEnd('debug');\n return column * 4 + row;\n};\n/**\n * Retrieves a copy of the matrix column at the provided index as a Cartesian4 instance.\n *\n * @param {Matrix4} matrix The matrix to use.\n * @param {number} index The zero-based index of the column to retrieve.\n * @param {Cartesian4} result The object onto which to store the result.\n * @returns {Cartesian4} The modified result parameter.\n *\n * @exception {DeveloperError} index must be 0, 1, 2, or 3.\n *\n * @example\n * //returns a Cartesian4 instance with values from the specified column\n * // m = [10.0, 11.0, 12.0, 13.0]\n * // [14.0, 15.0, 16.0, 17.0]\n * // [18.0, 19.0, 20.0, 21.0]\n * // [22.0, 23.0, 24.0, 25.0]\n *\n * //Example 1: Creates an instance of Cartesian\n * const a = Cesium.Matrix4.getColumn(m, 2, new Cesium.Cartesian4());\n *\n * @example\n * //Example 2: Sets values for Cartesian instance\n * const a = new Cesium.Cartesian4();\n * Cesium.Matrix4.getColumn(m, 2, a);\n *\n * // a.x = 12.0; a.y = 16.0; a.z = 20.0; a.w = 24.0;\n */ $7ec6ab76c28fee32$var$Matrix4.getColumn = function(matrix, index, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"matrix\", matrix);\n (0, $3pzcG.default).typeOf.number.greaterThanOrEquals(\"index\", index, 0);\n (0, $3pzcG.default).typeOf.number.lessThanOrEquals(\"index\", index, 3);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n const startIndex = index * 4;\n const x = matrix[startIndex];\n const y = matrix[startIndex + 1];\n const z = matrix[startIndex + 2];\n const w = matrix[startIndex + 3];\n result.x = x;\n result.y = y;\n result.z = z;\n result.w = w;\n return result;\n};\n/**\n * Computes a new matrix that replaces the specified column in the provided matrix with the provided Cartesian4 instance.\n *\n * @param {Matrix4} matrix The matrix to use.\n * @param {number} index The zero-based index of the column to set.\n * @param {Cartesian4} cartesian The Cartesian whose values will be assigned to the specified column.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n *\n * @exception {DeveloperError} index must be 0, 1, 2, or 3.\n *\n * @example\n * //creates a new Matrix4 instance with new column values from the Cartesian4 instance\n * // m = [10.0, 11.0, 12.0, 13.0]\n * // [14.0, 15.0, 16.0, 17.0]\n * // [18.0, 19.0, 20.0, 21.0]\n * // [22.0, 23.0, 24.0, 25.0]\n *\n * const a = Cesium.Matrix4.setColumn(m, 2, new Cesium.Cartesian4(99.0, 98.0, 97.0, 96.0), new Cesium.Matrix4());\n *\n * // m remains the same\n * // a = [10.0, 11.0, 99.0, 13.0]\n * // [14.0, 15.0, 98.0, 17.0]\n * // [18.0, 19.0, 97.0, 21.0]\n * // [22.0, 23.0, 96.0, 25.0]\n */ $7ec6ab76c28fee32$var$Matrix4.setColumn = function(matrix, index, cartesian, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"matrix\", matrix);\n (0, $3pzcG.default).typeOf.number.greaterThanOrEquals(\"index\", index, 0);\n (0, $3pzcG.default).typeOf.number.lessThanOrEquals(\"index\", index, 3);\n (0, $3pzcG.default).typeOf.object(\"cartesian\", cartesian);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n result = $7ec6ab76c28fee32$var$Matrix4.clone(matrix, result);\n const startIndex = index * 4;\n result[startIndex] = cartesian.x;\n result[startIndex + 1] = cartesian.y;\n result[startIndex + 2] = cartesian.z;\n result[startIndex + 3] = cartesian.w;\n return result;\n};\n/**\n * Retrieves a copy of the matrix row at the provided index as a Cartesian4 instance.\n *\n * @param {Matrix4} matrix The matrix to use.\n * @param {number} index The zero-based index of the row to retrieve.\n * @param {Cartesian4} result The object onto which to store the result.\n * @returns {Cartesian4} The modified result parameter.\n *\n * @exception {DeveloperError} index must be 0, 1, 2, or 3.\n *\n * @example\n * //returns a Cartesian4 instance with values from the specified column\n * // m = [10.0, 11.0, 12.0, 13.0]\n * // [14.0, 15.0, 16.0, 17.0]\n * // [18.0, 19.0, 20.0, 21.0]\n * // [22.0, 23.0, 24.0, 25.0]\n *\n * //Example 1: Returns an instance of Cartesian\n * const a = Cesium.Matrix4.getRow(m, 2, new Cesium.Cartesian4());\n *\n * @example\n * //Example 2: Sets values for a Cartesian instance\n * const a = new Cesium.Cartesian4();\n * Cesium.Matrix4.getRow(m, 2, a);\n *\n * // a.x = 18.0; a.y = 19.0; a.z = 20.0; a.w = 21.0;\n */ $7ec6ab76c28fee32$var$Matrix4.getRow = function(matrix, index, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"matrix\", matrix);\n (0, $3pzcG.default).typeOf.number.greaterThanOrEquals(\"index\", index, 0);\n (0, $3pzcG.default).typeOf.number.lessThanOrEquals(\"index\", index, 3);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n const x = matrix[index];\n const y = matrix[index + 4];\n const z = matrix[index + 8];\n const w = matrix[index + 12];\n result.x = x;\n result.y = y;\n result.z = z;\n result.w = w;\n return result;\n};\n/**\n * Computes a new matrix that replaces the specified row in the provided matrix with the provided Cartesian4 instance.\n *\n * @param {Matrix4} matrix The matrix to use.\n * @param {number} index The zero-based index of the row to set.\n * @param {Cartesian4} cartesian The Cartesian whose values will be assigned to the specified row.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n *\n * @exception {DeveloperError} index must be 0, 1, 2, or 3.\n *\n * @example\n * //create a new Matrix4 instance with new row values from the Cartesian4 instance\n * // m = [10.0, 11.0, 12.0, 13.0]\n * // [14.0, 15.0, 16.0, 17.0]\n * // [18.0, 19.0, 20.0, 21.0]\n * // [22.0, 23.0, 24.0, 25.0]\n *\n * const a = Cesium.Matrix4.setRow(m, 2, new Cesium.Cartesian4(99.0, 98.0, 97.0, 96.0), new Cesium.Matrix4());\n *\n * // m remains the same\n * // a = [10.0, 11.0, 12.0, 13.0]\n * // [14.0, 15.0, 16.0, 17.0]\n * // [99.0, 98.0, 97.0, 96.0]\n * // [22.0, 23.0, 24.0, 25.0]\n */ $7ec6ab76c28fee32$var$Matrix4.setRow = function(matrix, index, cartesian, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"matrix\", matrix);\n (0, $3pzcG.default).typeOf.number.greaterThanOrEquals(\"index\", index, 0);\n (0, $3pzcG.default).typeOf.number.lessThanOrEquals(\"index\", index, 3);\n (0, $3pzcG.default).typeOf.object(\"cartesian\", cartesian);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n result = $7ec6ab76c28fee32$var$Matrix4.clone(matrix, result);\n result[index] = cartesian.x;\n result[index + 4] = cartesian.y;\n result[index + 8] = cartesian.z;\n result[index + 12] = cartesian.w;\n return result;\n};\n/**\n * Computes a new matrix that replaces the translation in the rightmost column of the provided\n * matrix with the provided translation. This assumes the matrix is an affine transformation.\n *\n * @param {Matrix4} matrix The matrix to use.\n * @param {Cartesian3} translation The translation that replaces the translation of the provided matrix.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n */ $7ec6ab76c28fee32$var$Matrix4.setTranslation = function(matrix, translation, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"matrix\", matrix);\n (0, $3pzcG.default).typeOf.object(\"translation\", translation);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n result[0] = matrix[0];\n result[1] = matrix[1];\n result[2] = matrix[2];\n result[3] = matrix[3];\n result[4] = matrix[4];\n result[5] = matrix[5];\n result[6] = matrix[6];\n result[7] = matrix[7];\n result[8] = matrix[8];\n result[9] = matrix[9];\n result[10] = matrix[10];\n result[11] = matrix[11];\n result[12] = translation.x;\n result[13] = translation.y;\n result[14] = translation.z;\n result[15] = matrix[15];\n return result;\n};\nconst $7ec6ab76c28fee32$var$scaleScratch1 = new (0, $bXwZF.default)();\n/**\n * Computes a new matrix that replaces the scale with the provided scale.\n * This assumes the matrix is an affine transformation.\n *\n * @param {Matrix4} matrix The matrix to use.\n * @param {Cartesian3} scale The scale that replaces the scale of the provided matrix.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n *\n * @see Matrix4.setUniformScale\n * @see Matrix4.fromScale\n * @see Matrix4.fromUniformScale\n * @see Matrix4.multiplyByScale\n * @see Matrix4.multiplyByUniformScale\n * @see Matrix4.getScale\n */ $7ec6ab76c28fee32$var$Matrix4.setScale = function(matrix, scale, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"matrix\", matrix);\n (0, $3pzcG.default).typeOf.object(\"scale\", scale);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n const existingScale = $7ec6ab76c28fee32$var$Matrix4.getScale(matrix, $7ec6ab76c28fee32$var$scaleScratch1);\n const scaleRatioX = scale.x / existingScale.x;\n const scaleRatioY = scale.y / existingScale.y;\n const scaleRatioZ = scale.z / existingScale.z;\n result[0] = matrix[0] * scaleRatioX;\n result[1] = matrix[1] * scaleRatioX;\n result[2] = matrix[2] * scaleRatioX;\n result[3] = matrix[3];\n result[4] = matrix[4] * scaleRatioY;\n result[5] = matrix[5] * scaleRatioY;\n result[6] = matrix[6] * scaleRatioY;\n result[7] = matrix[7];\n result[8] = matrix[8] * scaleRatioZ;\n result[9] = matrix[9] * scaleRatioZ;\n result[10] = matrix[10] * scaleRatioZ;\n result[11] = matrix[11];\n result[12] = matrix[12];\n result[13] = matrix[13];\n result[14] = matrix[14];\n result[15] = matrix[15];\n return result;\n};\nconst $7ec6ab76c28fee32$var$scaleScratch2 = new (0, $bXwZF.default)();\n/**\n * Computes a new matrix that replaces the scale with the provided uniform scale.\n * This assumes the matrix is an affine transformation.\n *\n * @param {Matrix4} matrix The matrix to use.\n * @param {number} scale The uniform scale that replaces the scale of the provided matrix.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n *\n * @see Matrix4.setScale\n * @see Matrix4.fromScale\n * @see Matrix4.fromUniformScale\n * @see Matrix4.multiplyByScale\n * @see Matrix4.multiplyByUniformScale\n * @see Matrix4.getScale\n */ $7ec6ab76c28fee32$var$Matrix4.setUniformScale = function(matrix, scale, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"matrix\", matrix);\n (0, $3pzcG.default).typeOf.number(\"scale\", scale);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n const existingScale = $7ec6ab76c28fee32$var$Matrix4.getScale(matrix, $7ec6ab76c28fee32$var$scaleScratch2);\n const scaleRatioX = scale / existingScale.x;\n const scaleRatioY = scale / existingScale.y;\n const scaleRatioZ = scale / existingScale.z;\n result[0] = matrix[0] * scaleRatioX;\n result[1] = matrix[1] * scaleRatioX;\n result[2] = matrix[2] * scaleRatioX;\n result[3] = matrix[3];\n result[4] = matrix[4] * scaleRatioY;\n result[5] = matrix[5] * scaleRatioY;\n result[6] = matrix[6] * scaleRatioY;\n result[7] = matrix[7];\n result[8] = matrix[8] * scaleRatioZ;\n result[9] = matrix[9] * scaleRatioZ;\n result[10] = matrix[10] * scaleRatioZ;\n result[11] = matrix[11];\n result[12] = matrix[12];\n result[13] = matrix[13];\n result[14] = matrix[14];\n result[15] = matrix[15];\n return result;\n};\nconst $7ec6ab76c28fee32$var$scratchColumn = new (0, $bXwZF.default)();\n/**\n * Extracts the non-uniform scale assuming the matrix is an affine transformation.\n *\n * @param {Matrix4} matrix The matrix.\n * @param {Cartesian3} result The object onto which to store the result.\n * @returns {Cartesian3} The modified result parameter\n *\n * @see Matrix4.multiplyByScale\n * @see Matrix4.multiplyByUniformScale\n * @see Matrix4.fromScale\n * @see Matrix4.fromUniformScale\n * @see Matrix4.setScale\n * @see Matrix4.setUniformScale\n */ $7ec6ab76c28fee32$var$Matrix4.getScale = function(matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"matrix\", matrix);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n result.x = (0, $bXwZF.default).magnitude((0, $bXwZF.default).fromElements(matrix[0], matrix[1], matrix[2], $7ec6ab76c28fee32$var$scratchColumn));\n result.y = (0, $bXwZF.default).magnitude((0, $bXwZF.default).fromElements(matrix[4], matrix[5], matrix[6], $7ec6ab76c28fee32$var$scratchColumn));\n result.z = (0, $bXwZF.default).magnitude((0, $bXwZF.default).fromElements(matrix[8], matrix[9], matrix[10], $7ec6ab76c28fee32$var$scratchColumn));\n return result;\n};\nconst $7ec6ab76c28fee32$var$scaleScratch3 = new (0, $bXwZF.default)();\n/**\n * Computes the maximum scale assuming the matrix is an affine transformation.\n * The maximum scale is the maximum length of the column vectors in the upper-left\n * 3x3 matrix.\n *\n * @param {Matrix4} matrix The matrix.\n * @returns {number} The maximum scale.\n */ $7ec6ab76c28fee32$var$Matrix4.getMaximumScale = function(matrix) {\n $7ec6ab76c28fee32$var$Matrix4.getScale(matrix, $7ec6ab76c28fee32$var$scaleScratch3);\n return (0, $bXwZF.default).maximumComponent($7ec6ab76c28fee32$var$scaleScratch3);\n};\nconst $7ec6ab76c28fee32$var$scaleScratch4 = new (0, $bXwZF.default)();\n/**\n * Sets the rotation assuming the matrix is an affine transformation.\n *\n * @param {Matrix4} matrix The matrix.\n * @param {Matrix3} rotation The rotation matrix.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n *\n * @see Matrix4.fromRotation\n * @see Matrix4.getRotation\n */ $7ec6ab76c28fee32$var$Matrix4.setRotation = function(matrix, rotation, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"matrix\", matrix);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n const scale = $7ec6ab76c28fee32$var$Matrix4.getScale(matrix, $7ec6ab76c28fee32$var$scaleScratch4);\n result[0] = rotation[0] * scale.x;\n result[1] = rotation[1] * scale.x;\n result[2] = rotation[2] * scale.x;\n result[3] = matrix[3];\n result[4] = rotation[3] * scale.y;\n result[5] = rotation[4] * scale.y;\n result[6] = rotation[5] * scale.y;\n result[7] = matrix[7];\n result[8] = rotation[6] * scale.z;\n result[9] = rotation[7] * scale.z;\n result[10] = rotation[8] * scale.z;\n result[11] = matrix[11];\n result[12] = matrix[12];\n result[13] = matrix[13];\n result[14] = matrix[14];\n result[15] = matrix[15];\n return result;\n};\nconst $7ec6ab76c28fee32$var$scaleScratch5 = new (0, $bXwZF.default)();\n/**\n * Extracts the rotation matrix assuming the matrix is an affine transformation.\n *\n * @param {Matrix4} matrix The matrix.\n * @param {Matrix3} result The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter.\n *\n * @see Matrix4.setRotation\n * @see Matrix4.fromRotation\n */ $7ec6ab76c28fee32$var$Matrix4.getRotation = function(matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"matrix\", matrix);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n const scale = $7ec6ab76c28fee32$var$Matrix4.getScale(matrix, $7ec6ab76c28fee32$var$scaleScratch5);\n result[0] = matrix[0] / scale.x;\n result[1] = matrix[1] / scale.x;\n result[2] = matrix[2] / scale.x;\n result[3] = matrix[4] / scale.y;\n result[4] = matrix[5] / scale.y;\n result[5] = matrix[6] / scale.y;\n result[6] = matrix[8] / scale.z;\n result[7] = matrix[9] / scale.z;\n result[8] = matrix[10] / scale.z;\n return result;\n};\n/**\n * Computes the product of two matrices.\n *\n * @param {Matrix4} left The first matrix.\n * @param {Matrix4} right The second matrix.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n */ $7ec6ab76c28fee32$var$Matrix4.multiply = function(left, right, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"left\", left);\n (0, $3pzcG.default).typeOf.object(\"right\", right);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n const left0 = left[0];\n const left1 = left[1];\n const left2 = left[2];\n const left3 = left[3];\n const left4 = left[4];\n const left5 = left[5];\n const left6 = left[6];\n const left7 = left[7];\n const left8 = left[8];\n const left9 = left[9];\n const left10 = left[10];\n const left11 = left[11];\n const left12 = left[12];\n const left13 = left[13];\n const left14 = left[14];\n const left15 = left[15];\n const right0 = right[0];\n const right1 = right[1];\n const right2 = right[2];\n const right3 = right[3];\n const right4 = right[4];\n const right5 = right[5];\n const right6 = right[6];\n const right7 = right[7];\n const right8 = right[8];\n const right9 = right[9];\n const right10 = right[10];\n const right11 = right[11];\n const right12 = right[12];\n const right13 = right[13];\n const right14 = right[14];\n const right15 = right[15];\n const column0Row0 = left0 * right0 + left4 * right1 + left8 * right2 + left12 * right3;\n const column0Row1 = left1 * right0 + left5 * right1 + left9 * right2 + left13 * right3;\n const column0Row2 = left2 * right0 + left6 * right1 + left10 * right2 + left14 * right3;\n const column0Row3 = left3 * right0 + left7 * right1 + left11 * right2 + left15 * right3;\n const column1Row0 = left0 * right4 + left4 * right5 + left8 * right6 + left12 * right7;\n const column1Row1 = left1 * right4 + left5 * right5 + left9 * right6 + left13 * right7;\n const column1Row2 = left2 * right4 + left6 * right5 + left10 * right6 + left14 * right7;\n const column1Row3 = left3 * right4 + left7 * right5 + left11 * right6 + left15 * right7;\n const column2Row0 = left0 * right8 + left4 * right9 + left8 * right10 + left12 * right11;\n const column2Row1 = left1 * right8 + left5 * right9 + left9 * right10 + left13 * right11;\n const column2Row2 = left2 * right8 + left6 * right9 + left10 * right10 + left14 * right11;\n const column2Row3 = left3 * right8 + left7 * right9 + left11 * right10 + left15 * right11;\n const column3Row0 = left0 * right12 + left4 * right13 + left8 * right14 + left12 * right15;\n const column3Row1 = left1 * right12 + left5 * right13 + left9 * right14 + left13 * right15;\n const column3Row2 = left2 * right12 + left6 * right13 + left10 * right14 + left14 * right15;\n const column3Row3 = left3 * right12 + left7 * right13 + left11 * right14 + left15 * right15;\n result[0] = column0Row0;\n result[1] = column0Row1;\n result[2] = column0Row2;\n result[3] = column0Row3;\n result[4] = column1Row0;\n result[5] = column1Row1;\n result[6] = column1Row2;\n result[7] = column1Row3;\n result[8] = column2Row0;\n result[9] = column2Row1;\n result[10] = column2Row2;\n result[11] = column2Row3;\n result[12] = column3Row0;\n result[13] = column3Row1;\n result[14] = column3Row2;\n result[15] = column3Row3;\n return result;\n};\n/**\n * Computes the sum of two matrices.\n *\n * @param {Matrix4} left The first matrix.\n * @param {Matrix4} right The second matrix.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n */ $7ec6ab76c28fee32$var$Matrix4.add = function(left, right, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"left\", left);\n (0, $3pzcG.default).typeOf.object(\"right\", right);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n result[0] = left[0] + right[0];\n result[1] = left[1] + right[1];\n result[2] = left[2] + right[2];\n result[3] = left[3] + right[3];\n result[4] = left[4] + right[4];\n result[5] = left[5] + right[5];\n result[6] = left[6] + right[6];\n result[7] = left[7] + right[7];\n result[8] = left[8] + right[8];\n result[9] = left[9] + right[9];\n result[10] = left[10] + right[10];\n result[11] = left[11] + right[11];\n result[12] = left[12] + right[12];\n result[13] = left[13] + right[13];\n result[14] = left[14] + right[14];\n result[15] = left[15] + right[15];\n return result;\n};\n/**\n * Computes the difference of two matrices.\n *\n * @param {Matrix4} left The first matrix.\n * @param {Matrix4} right The second matrix.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n */ $7ec6ab76c28fee32$var$Matrix4.subtract = function(left, right, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"left\", left);\n (0, $3pzcG.default).typeOf.object(\"right\", right);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n result[0] = left[0] - right[0];\n result[1] = left[1] - right[1];\n result[2] = left[2] - right[2];\n result[3] = left[3] - right[3];\n result[4] = left[4] - right[4];\n result[5] = left[5] - right[5];\n result[6] = left[6] - right[6];\n result[7] = left[7] - right[7];\n result[8] = left[8] - right[8];\n result[9] = left[9] - right[9];\n result[10] = left[10] - right[10];\n result[11] = left[11] - right[11];\n result[12] = left[12] - right[12];\n result[13] = left[13] - right[13];\n result[14] = left[14] - right[14];\n result[15] = left[15] - right[15];\n return result;\n};\n/**\n * Computes the product of two matrices assuming the matrices are affine transformation matrices,\n * where the upper left 3x3 elements are any matrix, and\n * the upper three elements in the fourth column are the translation.\n * The bottom row is assumed to be [0, 0, 0, 1].\n * The matrix is not verified to be in the proper form.\n * This method is faster than computing the product for general 4x4\n * matrices using {@link Matrix4.multiply}.\n *\n * @param {Matrix4} left The first matrix.\n * @param {Matrix4} right The second matrix.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n *\n * @example\n * const m1 = new Cesium.Matrix4(1.0, 6.0, 7.0, 0.0, 2.0, 5.0, 8.0, 0.0, 3.0, 4.0, 9.0, 0.0, 0.0, 0.0, 0.0, 1.0);\n * const m2 = Cesium.Transforms.eastNorthUpToFixedFrame(new Cesium.Cartesian3(1.0, 1.0, 1.0));\n * const m3 = Cesium.Matrix4.multiplyTransformation(m1, m2, new Cesium.Matrix4());\n */ $7ec6ab76c28fee32$var$Matrix4.multiplyTransformation = function(left, right, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"left\", left);\n (0, $3pzcG.default).typeOf.object(\"right\", right);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n const left0 = left[0];\n const left1 = left[1];\n const left2 = left[2];\n const left4 = left[4];\n const left5 = left[5];\n const left6 = left[6];\n const left8 = left[8];\n const left9 = left[9];\n const left10 = left[10];\n const left12 = left[12];\n const left13 = left[13];\n const left14 = left[14];\n const right0 = right[0];\n const right1 = right[1];\n const right2 = right[2];\n const right4 = right[4];\n const right5 = right[5];\n const right6 = right[6];\n const right8 = right[8];\n const right9 = right[9];\n const right10 = right[10];\n const right12 = right[12];\n const right13 = right[13];\n const right14 = right[14];\n const column0Row0 = left0 * right0 + left4 * right1 + left8 * right2;\n const column0Row1 = left1 * right0 + left5 * right1 + left9 * right2;\n const column0Row2 = left2 * right0 + left6 * right1 + left10 * right2;\n const column1Row0 = left0 * right4 + left4 * right5 + left8 * right6;\n const column1Row1 = left1 * right4 + left5 * right5 + left9 * right6;\n const column1Row2 = left2 * right4 + left6 * right5 + left10 * right6;\n const column2Row0 = left0 * right8 + left4 * right9 + left8 * right10;\n const column2Row1 = left1 * right8 + left5 * right9 + left9 * right10;\n const column2Row2 = left2 * right8 + left6 * right9 + left10 * right10;\n const column3Row0 = left0 * right12 + left4 * right13 + left8 * right14 + left12;\n const column3Row1 = left1 * right12 + left5 * right13 + left9 * right14 + left13;\n const column3Row2 = left2 * right12 + left6 * right13 + left10 * right14 + left14;\n result[0] = column0Row0;\n result[1] = column0Row1;\n result[2] = column0Row2;\n result[3] = 0.0;\n result[4] = column1Row0;\n result[5] = column1Row1;\n result[6] = column1Row2;\n result[7] = 0.0;\n result[8] = column2Row0;\n result[9] = column2Row1;\n result[10] = column2Row2;\n result[11] = 0.0;\n result[12] = column3Row0;\n result[13] = column3Row1;\n result[14] = column3Row2;\n result[15] = 1.0;\n return result;\n};\n/**\n * Multiplies a transformation matrix (with a bottom row of [0.0, 0.0, 0.0, 1.0])\n * by a 3x3 rotation matrix. This is an optimization\n * for Matrix4.multiply(m, Matrix4.fromRotationTranslation(rotation), m); with less allocations and arithmetic operations.\n *\n * @param {Matrix4} matrix The matrix on the left-hand side.\n * @param {Matrix3} rotation The 3x3 rotation matrix on the right-hand side.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n *\n * @example\n * // Instead of Cesium.Matrix4.multiply(m, Cesium.Matrix4.fromRotationTranslation(rotation), m);\n * Cesium.Matrix4.multiplyByMatrix3(m, rotation, m);\n */ $7ec6ab76c28fee32$var$Matrix4.multiplyByMatrix3 = function(matrix, rotation, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"matrix\", matrix);\n (0, $3pzcG.default).typeOf.object(\"rotation\", rotation);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n const left0 = matrix[0];\n const left1 = matrix[1];\n const left2 = matrix[2];\n const left4 = matrix[4];\n const left5 = matrix[5];\n const left6 = matrix[6];\n const left8 = matrix[8];\n const left9 = matrix[9];\n const left10 = matrix[10];\n const right0 = rotation[0];\n const right1 = rotation[1];\n const right2 = rotation[2];\n const right4 = rotation[3];\n const right5 = rotation[4];\n const right6 = rotation[5];\n const right8 = rotation[6];\n const right9 = rotation[7];\n const right10 = rotation[8];\n const column0Row0 = left0 * right0 + left4 * right1 + left8 * right2;\n const column0Row1 = left1 * right0 + left5 * right1 + left9 * right2;\n const column0Row2 = left2 * right0 + left6 * right1 + left10 * right2;\n const column1Row0 = left0 * right4 + left4 * right5 + left8 * right6;\n const column1Row1 = left1 * right4 + left5 * right5 + left9 * right6;\n const column1Row2 = left2 * right4 + left6 * right5 + left10 * right6;\n const column2Row0 = left0 * right8 + left4 * right9 + left8 * right10;\n const column2Row1 = left1 * right8 + left5 * right9 + left9 * right10;\n const column2Row2 = left2 * right8 + left6 * right9 + left10 * right10;\n result[0] = column0Row0;\n result[1] = column0Row1;\n result[2] = column0Row2;\n result[3] = 0.0;\n result[4] = column1Row0;\n result[5] = column1Row1;\n result[6] = column1Row2;\n result[7] = 0.0;\n result[8] = column2Row0;\n result[9] = column2Row1;\n result[10] = column2Row2;\n result[11] = 0.0;\n result[12] = matrix[12];\n result[13] = matrix[13];\n result[14] = matrix[14];\n result[15] = matrix[15];\n return result;\n};\n/**\n * Multiplies a transformation matrix (with a bottom row of [0.0, 0.0, 0.0, 1.0])\n * by an implicit translation matrix defined by a {@link Cartesian3}. This is an optimization\n * for Matrix4.multiply(m, Matrix4.fromTranslation(position), m); with less allocations and arithmetic operations.\n *\n * @param {Matrix4} matrix The matrix on the left-hand side.\n * @param {Cartesian3} translation The translation on the right-hand side.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n *\n * @example\n * // Instead of Cesium.Matrix4.multiply(m, Cesium.Matrix4.fromTranslation(position), m);\n * Cesium.Matrix4.multiplyByTranslation(m, position, m);\n */ $7ec6ab76c28fee32$var$Matrix4.multiplyByTranslation = function(matrix, translation, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"matrix\", matrix);\n (0, $3pzcG.default).typeOf.object(\"translation\", translation);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n const x = translation.x;\n const y = translation.y;\n const z = translation.z;\n const tx = x * matrix[0] + y * matrix[4] + z * matrix[8] + matrix[12];\n const ty = x * matrix[1] + y * matrix[5] + z * matrix[9] + matrix[13];\n const tz = x * matrix[2] + y * matrix[6] + z * matrix[10] + matrix[14];\n result[0] = matrix[0];\n result[1] = matrix[1];\n result[2] = matrix[2];\n result[3] = matrix[3];\n result[4] = matrix[4];\n result[5] = matrix[5];\n result[6] = matrix[6];\n result[7] = matrix[7];\n result[8] = matrix[8];\n result[9] = matrix[9];\n result[10] = matrix[10];\n result[11] = matrix[11];\n result[12] = tx;\n result[13] = ty;\n result[14] = tz;\n result[15] = matrix[15];\n return result;\n};\n/**\n * Multiplies an affine transformation matrix (with a bottom row of [0.0, 0.0, 0.0, 1.0])\n * by an implicit non-uniform scale matrix. This is an optimization\n * for Matrix4.multiply(m, Matrix4.fromUniformScale(scale), m);, where\n * m must be an affine matrix.\n * This function performs fewer allocations and arithmetic operations.\n *\n * @param {Matrix4} matrix The affine matrix on the left-hand side.\n * @param {Cartesian3} scale The non-uniform scale on the right-hand side.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n *\n *\n * @example\n * // Instead of Cesium.Matrix4.multiply(m, Cesium.Matrix4.fromScale(scale), m);\n * Cesium.Matrix4.multiplyByScale(m, scale, m);\n *\n * @see Matrix4.multiplyByUniformScale\n * @see Matrix4.fromScale\n * @see Matrix4.fromUniformScale\n * @see Matrix4.setScale\n * @see Matrix4.setUniformScale\n * @see Matrix4.getScale\n */ $7ec6ab76c28fee32$var$Matrix4.multiplyByScale = function(matrix, scale, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"matrix\", matrix);\n (0, $3pzcG.default).typeOf.object(\"scale\", scale);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n const scaleX = scale.x;\n const scaleY = scale.y;\n const scaleZ = scale.z;\n // Faster than Cartesian3.equals\n if (scaleX === 1.0 && scaleY === 1.0 && scaleZ === 1.0) return $7ec6ab76c28fee32$var$Matrix4.clone(matrix, result);\n result[0] = scaleX * matrix[0];\n result[1] = scaleX * matrix[1];\n result[2] = scaleX * matrix[2];\n result[3] = matrix[3];\n result[4] = scaleY * matrix[4];\n result[5] = scaleY * matrix[5];\n result[6] = scaleY * matrix[6];\n result[7] = matrix[7];\n result[8] = scaleZ * matrix[8];\n result[9] = scaleZ * matrix[9];\n result[10] = scaleZ * matrix[10];\n result[11] = matrix[11];\n result[12] = matrix[12];\n result[13] = matrix[13];\n result[14] = matrix[14];\n result[15] = matrix[15];\n return result;\n};\n/**\n * Computes the product of a matrix times a uniform scale, as if the scale were a scale matrix.\n *\n * @param {Matrix4} matrix The matrix on the left-hand side.\n * @param {number} scale The uniform scale on the right-hand side.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n *\n * @example\n * // Instead of Cesium.Matrix4.multiply(m, Cesium.Matrix4.fromUniformScale(scale), m);\n * Cesium.Matrix4.multiplyByUniformScale(m, scale, m);\n *\n * @see Matrix4.multiplyByScale\n * @see Matrix4.fromScale\n * @see Matrix4.fromUniformScale\n * @see Matrix4.setScale\n * @see Matrix4.setUniformScale\n * @see Matrix4.getScale\n */ $7ec6ab76c28fee32$var$Matrix4.multiplyByUniformScale = function(matrix, scale, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"matrix\", matrix);\n (0, $3pzcG.default).typeOf.number(\"scale\", scale);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n result[0] = matrix[0] * scale;\n result[1] = matrix[1] * scale;\n result[2] = matrix[2] * scale;\n result[3] = matrix[3];\n result[4] = matrix[4] * scale;\n result[5] = matrix[5] * scale;\n result[6] = matrix[6] * scale;\n result[7] = matrix[7];\n result[8] = matrix[8] * scale;\n result[9] = matrix[9] * scale;\n result[10] = matrix[10] * scale;\n result[11] = matrix[11];\n result[12] = matrix[12];\n result[13] = matrix[13];\n result[14] = matrix[14];\n result[15] = matrix[15];\n return result;\n};\n/**\n * Computes the product of a matrix and a column vector.\n *\n * @param {Matrix4} matrix The matrix.\n * @param {Cartesian4} cartesian The vector.\n * @param {Cartesian4} result The object onto which to store the result.\n * @returns {Cartesian4} The modified result parameter.\n */ $7ec6ab76c28fee32$var$Matrix4.multiplyByVector = function(matrix, cartesian, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"matrix\", matrix);\n (0, $3pzcG.default).typeOf.object(\"cartesian\", cartesian);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n const vX = cartesian.x;\n const vY = cartesian.y;\n const vZ = cartesian.z;\n const vW = cartesian.w;\n const x = matrix[0] * vX + matrix[4] * vY + matrix[8] * vZ + matrix[12] * vW;\n const y = matrix[1] * vX + matrix[5] * vY + matrix[9] * vZ + matrix[13] * vW;\n const z = matrix[2] * vX + matrix[6] * vY + matrix[10] * vZ + matrix[14] * vW;\n const w = matrix[3] * vX + matrix[7] * vY + matrix[11] * vZ + matrix[15] * vW;\n result.x = x;\n result.y = y;\n result.z = z;\n result.w = w;\n return result;\n};\n/**\n * Computes the product of a matrix and a {@link Cartesian3}. This is equivalent to calling {@link Matrix4.multiplyByVector}\n * with a {@link Cartesian4} with a w component of zero.\n *\n * @param {Matrix4} matrix The matrix.\n * @param {Cartesian3} cartesian The point.\n * @param {Cartesian3} result The object onto which to store the result.\n * @returns {Cartesian3} The modified result parameter.\n *\n * @example\n * const p = new Cesium.Cartesian3(1.0, 2.0, 3.0);\n * const result = Cesium.Matrix4.multiplyByPointAsVector(matrix, p, new Cesium.Cartesian3());\n * // A shortcut for\n * // Cartesian3 p = ...\n * // Cesium.Matrix4.multiplyByVector(matrix, new Cesium.Cartesian4(p.x, p.y, p.z, 0.0), result);\n */ $7ec6ab76c28fee32$var$Matrix4.multiplyByPointAsVector = function(matrix, cartesian, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"matrix\", matrix);\n (0, $3pzcG.default).typeOf.object(\"cartesian\", cartesian);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n const vX = cartesian.x;\n const vY = cartesian.y;\n const vZ = cartesian.z;\n const x = matrix[0] * vX + matrix[4] * vY + matrix[8] * vZ;\n const y = matrix[1] * vX + matrix[5] * vY + matrix[9] * vZ;\n const z = matrix[2] * vX + matrix[6] * vY + matrix[10] * vZ;\n result.x = x;\n result.y = y;\n result.z = z;\n return result;\n};\n/**\n * Computes the product of a matrix and a {@link Cartesian3}. This is equivalent to calling {@link Matrix4.multiplyByVector}\n * with a {@link Cartesian4} with a w component of 1, but returns a {@link Cartesian3} instead of a {@link Cartesian4}.\n *\n * @param {Matrix4} matrix The matrix.\n * @param {Cartesian3} cartesian The point.\n * @param {Cartesian3} result The object onto which to store the result.\n * @returns {Cartesian3} The modified result parameter.\n *\n * @example\n * const p = new Cesium.Cartesian3(1.0, 2.0, 3.0);\n * const result = Cesium.Matrix4.multiplyByPoint(matrix, p, new Cesium.Cartesian3());\n */ $7ec6ab76c28fee32$var$Matrix4.multiplyByPoint = function(matrix, cartesian, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"matrix\", matrix);\n (0, $3pzcG.default).typeOf.object(\"cartesian\", cartesian);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n const vX = cartesian.x;\n const vY = cartesian.y;\n const vZ = cartesian.z;\n const x = matrix[0] * vX + matrix[4] * vY + matrix[8] * vZ + matrix[12];\n const y = matrix[1] * vX + matrix[5] * vY + matrix[9] * vZ + matrix[13];\n const z = matrix[2] * vX + matrix[6] * vY + matrix[10] * vZ + matrix[14];\n result.x = x;\n result.y = y;\n result.z = z;\n return result;\n};\n/**\n * Computes the product of a matrix and a scalar.\n *\n * @param {Matrix4} matrix The matrix.\n * @param {number} scalar The number to multiply by.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n *\n * @example\n * //create a Matrix4 instance which is a scaled version of the supplied Matrix4\n * // m = [10.0, 11.0, 12.0, 13.0]\n * // [14.0, 15.0, 16.0, 17.0]\n * // [18.0, 19.0, 20.0, 21.0]\n * // [22.0, 23.0, 24.0, 25.0]\n *\n * const a = Cesium.Matrix4.multiplyByScalar(m, -2, new Cesium.Matrix4());\n *\n * // m remains the same\n * // a = [-20.0, -22.0, -24.0, -26.0]\n * // [-28.0, -30.0, -32.0, -34.0]\n * // [-36.0, -38.0, -40.0, -42.0]\n * // [-44.0, -46.0, -48.0, -50.0]\n */ $7ec6ab76c28fee32$var$Matrix4.multiplyByScalar = function(matrix, scalar, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"matrix\", matrix);\n (0, $3pzcG.default).typeOf.number(\"scalar\", scalar);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n result[0] = matrix[0] * scalar;\n result[1] = matrix[1] * scalar;\n result[2] = matrix[2] * scalar;\n result[3] = matrix[3] * scalar;\n result[4] = matrix[4] * scalar;\n result[5] = matrix[5] * scalar;\n result[6] = matrix[6] * scalar;\n result[7] = matrix[7] * scalar;\n result[8] = matrix[8] * scalar;\n result[9] = matrix[9] * scalar;\n result[10] = matrix[10] * scalar;\n result[11] = matrix[11] * scalar;\n result[12] = matrix[12] * scalar;\n result[13] = matrix[13] * scalar;\n result[14] = matrix[14] * scalar;\n result[15] = matrix[15] * scalar;\n return result;\n};\n/**\n * Computes a negated copy of the provided matrix.\n *\n * @param {Matrix4} matrix The matrix to negate.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n *\n * @example\n * //create a new Matrix4 instance which is a negation of a Matrix4\n * // m = [10.0, 11.0, 12.0, 13.0]\n * // [14.0, 15.0, 16.0, 17.0]\n * // [18.0, 19.0, 20.0, 21.0]\n * // [22.0, 23.0, 24.0, 25.0]\n *\n * const a = Cesium.Matrix4.negate(m, new Cesium.Matrix4());\n *\n * // m remains the same\n * // a = [-10.0, -11.0, -12.0, -13.0]\n * // [-14.0, -15.0, -16.0, -17.0]\n * // [-18.0, -19.0, -20.0, -21.0]\n * // [-22.0, -23.0, -24.0, -25.0]\n */ $7ec6ab76c28fee32$var$Matrix4.negate = function(matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"matrix\", matrix);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n result[0] = -matrix[0];\n result[1] = -matrix[1];\n result[2] = -matrix[2];\n result[3] = -matrix[3];\n result[4] = -matrix[4];\n result[5] = -matrix[5];\n result[6] = -matrix[6];\n result[7] = -matrix[7];\n result[8] = -matrix[8];\n result[9] = -matrix[9];\n result[10] = -matrix[10];\n result[11] = -matrix[11];\n result[12] = -matrix[12];\n result[13] = -matrix[13];\n result[14] = -matrix[14];\n result[15] = -matrix[15];\n return result;\n};\n/**\n * Computes the transpose of the provided matrix.\n *\n * @param {Matrix4} matrix The matrix to transpose.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n *\n * @example\n * //returns transpose of a Matrix4\n * // m = [10.0, 11.0, 12.0, 13.0]\n * // [14.0, 15.0, 16.0, 17.0]\n * // [18.0, 19.0, 20.0, 21.0]\n * // [22.0, 23.0, 24.0, 25.0]\n *\n * const a = Cesium.Matrix4.transpose(m, new Cesium.Matrix4());\n *\n * // m remains the same\n * // a = [10.0, 14.0, 18.0, 22.0]\n * // [11.0, 15.0, 19.0, 23.0]\n * // [12.0, 16.0, 20.0, 24.0]\n * // [13.0, 17.0, 21.0, 25.0]\n */ $7ec6ab76c28fee32$var$Matrix4.transpose = function(matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"matrix\", matrix);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n const matrix1 = matrix[1];\n const matrix2 = matrix[2];\n const matrix3 = matrix[3];\n const matrix6 = matrix[6];\n const matrix7 = matrix[7];\n const matrix11 = matrix[11];\n result[0] = matrix[0];\n result[1] = matrix[4];\n result[2] = matrix[8];\n result[3] = matrix[12];\n result[4] = matrix1;\n result[5] = matrix[5];\n result[6] = matrix[9];\n result[7] = matrix[13];\n result[8] = matrix2;\n result[9] = matrix6;\n result[10] = matrix[10];\n result[11] = matrix[14];\n result[12] = matrix3;\n result[13] = matrix7;\n result[14] = matrix11;\n result[15] = matrix[15];\n return result;\n};\n/**\n * Computes a matrix, which contains the absolute (unsigned) values of the provided matrix's elements.\n *\n * @param {Matrix4} matrix The matrix with signed elements.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n */ $7ec6ab76c28fee32$var$Matrix4.abs = function(matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"matrix\", matrix);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n result[0] = Math.abs(matrix[0]);\n result[1] = Math.abs(matrix[1]);\n result[2] = Math.abs(matrix[2]);\n result[3] = Math.abs(matrix[3]);\n result[4] = Math.abs(matrix[4]);\n result[5] = Math.abs(matrix[5]);\n result[6] = Math.abs(matrix[6]);\n result[7] = Math.abs(matrix[7]);\n result[8] = Math.abs(matrix[8]);\n result[9] = Math.abs(matrix[9]);\n result[10] = Math.abs(matrix[10]);\n result[11] = Math.abs(matrix[11]);\n result[12] = Math.abs(matrix[12]);\n result[13] = Math.abs(matrix[13]);\n result[14] = Math.abs(matrix[14]);\n result[15] = Math.abs(matrix[15]);\n return result;\n};\n/**\n * Compares the provided matrices componentwise and returns\n * true if they are equal, false otherwise.\n *\n * @param {Matrix4} [left] The first matrix.\n * @param {Matrix4} [right] The second matrix.\n * @returns {boolean} true if left and right are equal, false otherwise.\n *\n * @example\n * //compares two Matrix4 instances\n *\n * // a = [10.0, 14.0, 18.0, 22.0]\n * // [11.0, 15.0, 19.0, 23.0]\n * // [12.0, 16.0, 20.0, 24.0]\n * // [13.0, 17.0, 21.0, 25.0]\n *\n * // b = [10.0, 14.0, 18.0, 22.0]\n * // [11.0, 15.0, 19.0, 23.0]\n * // [12.0, 16.0, 20.0, 24.0]\n * // [13.0, 17.0, 21.0, 25.0]\n *\n * if(Cesium.Matrix4.equals(a,b)) {\n * console.log(\"Both matrices are equal\");\n * } else {\n * console.log(\"They are not equal\");\n * }\n *\n * //Prints \"Both matrices are equal\" on the console\n */ $7ec6ab76c28fee32$var$Matrix4.equals = function(left, right) {\n // Given that most matrices will be transformation matrices, the elements\n // are tested in order such that the test is likely to fail as early\n // as possible. I _think_ this is just as friendly to the L1 cache\n // as testing in index order. It is certainty faster in practice.\n return left === right || (0, $jQJji.default)(left) && (0, $jQJji.default)(right) && // Translation\n left[12] === right[12] && left[13] === right[13] && left[14] === right[14] && // Rotation/scale\n left[0] === right[0] && left[1] === right[1] && left[2] === right[2] && left[4] === right[4] && left[5] === right[5] && left[6] === right[6] && left[8] === right[8] && left[9] === right[9] && left[10] === right[10] && // Bottom row\n left[3] === right[3] && left[7] === right[7] && left[11] === right[11] && left[15] === right[15];\n};\n/**\n * Compares the provided matrices componentwise and returns\n * true if they are within the provided epsilon,\n * false otherwise.\n *\n * @param {Matrix4} [left] The first matrix.\n * @param {Matrix4} [right] The second matrix.\n * @param {number} [epsilon=0] The epsilon to use for equality testing.\n * @returns {boolean} true if left and right are within the provided epsilon, false otherwise.\n *\n * @example\n * //compares two Matrix4 instances\n *\n * // a = [10.5, 14.5, 18.5, 22.5]\n * // [11.5, 15.5, 19.5, 23.5]\n * // [12.5, 16.5, 20.5, 24.5]\n * // [13.5, 17.5, 21.5, 25.5]\n *\n * // b = [10.0, 14.0, 18.0, 22.0]\n * // [11.0, 15.0, 19.0, 23.0]\n * // [12.0, 16.0, 20.0, 24.0]\n * // [13.0, 17.0, 21.0, 25.0]\n *\n * if(Cesium.Matrix4.equalsEpsilon(a,b,0.1)){\n * console.log(\"Difference between both the matrices is less than 0.1\");\n * } else {\n * console.log(\"Difference between both the matrices is not less than 0.1\");\n * }\n *\n * //Prints \"Difference between both the matrices is not less than 0.1\" on the console\n */ $7ec6ab76c28fee32$var$Matrix4.equalsEpsilon = function(left, right, epsilon) {\n epsilon = (0, $8w8ZH.default)(epsilon, 0);\n return left === right || (0, $jQJji.default)(left) && (0, $jQJji.default)(right) && Math.abs(left[0] - right[0]) <= epsilon && Math.abs(left[1] - right[1]) <= epsilon && Math.abs(left[2] - right[2]) <= epsilon && Math.abs(left[3] - right[3]) <= epsilon && Math.abs(left[4] - right[4]) <= epsilon && Math.abs(left[5] - right[5]) <= epsilon && Math.abs(left[6] - right[6]) <= epsilon && Math.abs(left[7] - right[7]) <= epsilon && Math.abs(left[8] - right[8]) <= epsilon && Math.abs(left[9] - right[9]) <= epsilon && Math.abs(left[10] - right[10]) <= epsilon && Math.abs(left[11] - right[11]) <= epsilon && Math.abs(left[12] - right[12]) <= epsilon && Math.abs(left[13] - right[13]) <= epsilon && Math.abs(left[14] - right[14]) <= epsilon && Math.abs(left[15] - right[15]) <= epsilon;\n};\n/**\n * Gets the translation portion of the provided matrix, assuming the matrix is an affine transformation matrix.\n *\n * @param {Matrix4} matrix The matrix to use.\n * @param {Cartesian3} result The object onto which to store the result.\n * @returns {Cartesian3} The modified result parameter.\n */ $7ec6ab76c28fee32$var$Matrix4.getTranslation = function(matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"matrix\", matrix);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n result.x = matrix[12];\n result.y = matrix[13];\n result.z = matrix[14];\n return result;\n};\n/**\n * Gets the upper left 3x3 matrix of the provided matrix.\n *\n * @param {Matrix4} matrix The matrix to use.\n * @param {Matrix3} result The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter.\n *\n * @example\n * // returns a Matrix3 instance from a Matrix4 instance\n *\n * // m = [10.0, 14.0, 18.0, 22.0]\n * // [11.0, 15.0, 19.0, 23.0]\n * // [12.0, 16.0, 20.0, 24.0]\n * // [13.0, 17.0, 21.0, 25.0]\n *\n * const b = new Cesium.Matrix3();\n * Cesium.Matrix4.getMatrix3(m,b);\n *\n * // b = [10.0, 14.0, 18.0]\n * // [11.0, 15.0, 19.0]\n * // [12.0, 16.0, 20.0]\n */ $7ec6ab76c28fee32$var$Matrix4.getMatrix3 = function(matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"matrix\", matrix);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n result[0] = matrix[0];\n result[1] = matrix[1];\n result[2] = matrix[2];\n result[3] = matrix[4];\n result[4] = matrix[5];\n result[5] = matrix[6];\n result[6] = matrix[8];\n result[7] = matrix[9];\n result[8] = matrix[10];\n return result;\n};\nconst $7ec6ab76c28fee32$var$scratchInverseRotation = new (0, $490279d1ff27cf6c$export$2e2bcd8739ae039)();\nconst $7ec6ab76c28fee32$var$scratchMatrix3Zero = new (0, $490279d1ff27cf6c$export$2e2bcd8739ae039)();\nconst $7ec6ab76c28fee32$var$scratchBottomRow = new (0, $dba8420c01d8a224$export$2e2bcd8739ae039)();\nconst $7ec6ab76c28fee32$var$scratchExpectedBottomRow = new (0, $dba8420c01d8a224$export$2e2bcd8739ae039)(0.0, 0.0, 0.0, 1.0);\n/**\n * Computes the inverse of the provided matrix using Cramers Rule.\n * If the determinant is zero, the matrix can not be inverted, and an exception is thrown.\n * If the matrix is a proper rigid transformation, it is more efficient\n * to invert it with {@link Matrix4.inverseTransformation}.\n *\n * @param {Matrix4} matrix The matrix to invert.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n *\n * @exception {RuntimeError} matrix is not invertible because its determinate is zero.\n */ $7ec6ab76c28fee32$var$Matrix4.inverse = function(matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"matrix\", matrix);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n //\n // Ported from:\n // ftp://download.intel.com/design/PentiumIII/sml/24504301.pdf\n //\n const src0 = matrix[0];\n const src1 = matrix[4];\n const src2 = matrix[8];\n const src3 = matrix[12];\n const src4 = matrix[1];\n const src5 = matrix[5];\n const src6 = matrix[9];\n const src7 = matrix[13];\n const src8 = matrix[2];\n const src9 = matrix[6];\n const src10 = matrix[10];\n const src11 = matrix[14];\n const src12 = matrix[3];\n const src13 = matrix[7];\n const src14 = matrix[11];\n const src15 = matrix[15];\n // calculate pairs for first 8 elements (cofactors)\n let tmp0 = src10 * src15;\n let tmp1 = src11 * src14;\n let tmp2 = src9 * src15;\n let tmp3 = src11 * src13;\n let tmp4 = src9 * src14;\n let tmp5 = src10 * src13;\n let tmp6 = src8 * src15;\n let tmp7 = src11 * src12;\n let tmp8 = src8 * src14;\n let tmp9 = src10 * src12;\n let tmp10 = src8 * src13;\n let tmp11 = src9 * src12;\n // calculate first 8 elements (cofactors)\n const dst0 = tmp0 * src5 + tmp3 * src6 + tmp4 * src7 - (tmp1 * src5 + tmp2 * src6 + tmp5 * src7);\n const dst1 = tmp1 * src4 + tmp6 * src6 + tmp9 * src7 - (tmp0 * src4 + tmp7 * src6 + tmp8 * src7);\n const dst2 = tmp2 * src4 + tmp7 * src5 + tmp10 * src7 - (tmp3 * src4 + tmp6 * src5 + tmp11 * src7);\n const dst3 = tmp5 * src4 + tmp8 * src5 + tmp11 * src6 - (tmp4 * src4 + tmp9 * src5 + tmp10 * src6);\n const dst4 = tmp1 * src1 + tmp2 * src2 + tmp5 * src3 - (tmp0 * src1 + tmp3 * src2 + tmp4 * src3);\n const dst5 = tmp0 * src0 + tmp7 * src2 + tmp8 * src3 - (tmp1 * src0 + tmp6 * src2 + tmp9 * src3);\n const dst6 = tmp3 * src0 + tmp6 * src1 + tmp11 * src3 - (tmp2 * src0 + tmp7 * src1 + tmp10 * src3);\n const dst7 = tmp4 * src0 + tmp9 * src1 + tmp10 * src2 - (tmp5 * src0 + tmp8 * src1 + tmp11 * src2);\n // calculate pairs for second 8 elements (cofactors)\n tmp0 = src2 * src7;\n tmp1 = src3 * src6;\n tmp2 = src1 * src7;\n tmp3 = src3 * src5;\n tmp4 = src1 * src6;\n tmp5 = src2 * src5;\n tmp6 = src0 * src7;\n tmp7 = src3 * src4;\n tmp8 = src0 * src6;\n tmp9 = src2 * src4;\n tmp10 = src0 * src5;\n tmp11 = src1 * src4;\n // calculate second 8 elements (cofactors)\n const dst8 = tmp0 * src13 + tmp3 * src14 + tmp4 * src15 - (tmp1 * src13 + tmp2 * src14 + tmp5 * src15);\n const dst9 = tmp1 * src12 + tmp6 * src14 + tmp9 * src15 - (tmp0 * src12 + tmp7 * src14 + tmp8 * src15);\n const dst10 = tmp2 * src12 + tmp7 * src13 + tmp10 * src15 - (tmp3 * src12 + tmp6 * src13 + tmp11 * src15);\n const dst11 = tmp5 * src12 + tmp8 * src13 + tmp11 * src14 - (tmp4 * src12 + tmp9 * src13 + tmp10 * src14);\n const dst12 = tmp2 * src10 + tmp5 * src11 + tmp1 * src9 - (tmp4 * src11 + tmp0 * src9 + tmp3 * src10);\n const dst13 = tmp8 * src11 + tmp0 * src8 + tmp7 * src10 - (tmp6 * src10 + tmp9 * src11 + tmp1 * src8);\n const dst14 = tmp6 * src9 + tmp11 * src11 + tmp3 * src8 - (tmp10 * src11 + tmp2 * src8 + tmp7 * src9);\n const dst15 = tmp10 * src10 + tmp4 * src8 + tmp9 * src9 - (tmp8 * src9 + tmp11 * src10 + tmp5 * src8);\n // calculate determinant\n let det = src0 * dst0 + src1 * dst1 + src2 * dst2 + src3 * dst3;\n if (Math.abs(det) < (0, $AXvpI.default).EPSILON21) {\n // Special case for a zero scale matrix that can occur, for example,\n // when a model's node has a [0, 0, 0] scale.\n if ((0, $490279d1ff27cf6c$export$2e2bcd8739ae039).equalsEpsilon($7ec6ab76c28fee32$var$Matrix4.getMatrix3(matrix, $7ec6ab76c28fee32$var$scratchInverseRotation), $7ec6ab76c28fee32$var$scratchMatrix3Zero, (0, $AXvpI.default).EPSILON7) && (0, $dba8420c01d8a224$export$2e2bcd8739ae039).equals($7ec6ab76c28fee32$var$Matrix4.getRow(matrix, 3, $7ec6ab76c28fee32$var$scratchBottomRow), $7ec6ab76c28fee32$var$scratchExpectedBottomRow)) {\n result[0] = 0.0;\n result[1] = 0.0;\n result[2] = 0.0;\n result[3] = 0.0;\n result[4] = 0.0;\n result[5] = 0.0;\n result[6] = 0.0;\n result[7] = 0.0;\n result[8] = 0.0;\n result[9] = 0.0;\n result[10] = 0.0;\n result[11] = 0.0;\n result[12] = -matrix[12];\n result[13] = -matrix[13];\n result[14] = -matrix[14];\n result[15] = 1.0;\n return result;\n }\n throw new (0, $60086b06bf5db23f$export$2e2bcd8739ae039)(\"matrix is not invertible because its determinate is zero.\");\n }\n // calculate matrix inverse\n det = 1.0 / det;\n result[0] = dst0 * det;\n result[1] = dst1 * det;\n result[2] = dst2 * det;\n result[3] = dst3 * det;\n result[4] = dst4 * det;\n result[5] = dst5 * det;\n result[6] = dst6 * det;\n result[7] = dst7 * det;\n result[8] = dst8 * det;\n result[9] = dst9 * det;\n result[10] = dst10 * det;\n result[11] = dst11 * det;\n result[12] = dst12 * det;\n result[13] = dst13 * det;\n result[14] = dst14 * det;\n result[15] = dst15 * det;\n return result;\n};\n/**\n * Computes the inverse of the provided matrix assuming it is a proper rigid matrix,\n * where the upper left 3x3 elements are a rotation matrix,\n * and the upper three elements in the fourth column are the translation.\n * The bottom row is assumed to be [0, 0, 0, 1].\n * The matrix is not verified to be in the proper form.\n * This method is faster than computing the inverse for a general 4x4\n * matrix using {@link Matrix4.inverse}.\n *\n * @param {Matrix4} matrix The matrix to invert.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n */ $7ec6ab76c28fee32$var$Matrix4.inverseTransformation = function(matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"matrix\", matrix);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n //This function is an optimized version of the below 4 lines.\n //const rT = Matrix3.transpose(Matrix4.getMatrix3(matrix));\n //const rTN = Matrix3.negate(rT);\n //const rTT = Matrix3.multiplyByVector(rTN, Matrix4.getTranslation(matrix));\n //return Matrix4.fromRotationTranslation(rT, rTT, result);\n const matrix0 = matrix[0];\n const matrix1 = matrix[1];\n const matrix2 = matrix[2];\n const matrix4 = matrix[4];\n const matrix5 = matrix[5];\n const matrix6 = matrix[6];\n const matrix8 = matrix[8];\n const matrix9 = matrix[9];\n const matrix10 = matrix[10];\n const vX = matrix[12];\n const vY = matrix[13];\n const vZ = matrix[14];\n const x = -matrix0 * vX - matrix1 * vY - matrix2 * vZ;\n const y = -matrix4 * vX - matrix5 * vY - matrix6 * vZ;\n const z = -matrix8 * vX - matrix9 * vY - matrix10 * vZ;\n result[0] = matrix0;\n result[1] = matrix4;\n result[2] = matrix8;\n result[3] = 0.0;\n result[4] = matrix1;\n result[5] = matrix5;\n result[6] = matrix9;\n result[7] = 0.0;\n result[8] = matrix2;\n result[9] = matrix6;\n result[10] = matrix10;\n result[11] = 0.0;\n result[12] = x;\n result[13] = y;\n result[14] = z;\n result[15] = 1.0;\n return result;\n};\nconst $7ec6ab76c28fee32$var$scratchTransposeMatrix = new $7ec6ab76c28fee32$var$Matrix4();\n/**\n * Computes the inverse transpose of a matrix.\n *\n * @param {Matrix4} matrix The matrix to transpose and invert.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n */ $7ec6ab76c28fee32$var$Matrix4.inverseTranspose = function(matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"matrix\", matrix);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n return $7ec6ab76c28fee32$var$Matrix4.inverse($7ec6ab76c28fee32$var$Matrix4.transpose(matrix, $7ec6ab76c28fee32$var$scratchTransposeMatrix), result);\n};\n/**\n * An immutable Matrix4 instance initialized to the identity matrix.\n *\n * @type {Matrix4}\n * @constant\n */ $7ec6ab76c28fee32$var$Matrix4.IDENTITY = Object.freeze(new $7ec6ab76c28fee32$var$Matrix4(1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0));\n/**\n * An immutable Matrix4 instance initialized to the zero matrix.\n *\n * @type {Matrix4}\n * @constant\n */ $7ec6ab76c28fee32$var$Matrix4.ZERO = Object.freeze(new $7ec6ab76c28fee32$var$Matrix4(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0));\n/**\n * The index into Matrix4 for column 0, row 0.\n *\n * @type {number}\n * @constant\n */ $7ec6ab76c28fee32$var$Matrix4.COLUMN0ROW0 = 0;\n/**\n * The index into Matrix4 for column 0, row 1.\n *\n * @type {number}\n * @constant\n */ $7ec6ab76c28fee32$var$Matrix4.COLUMN0ROW1 = 1;\n/**\n * The index into Matrix4 for column 0, row 2.\n *\n * @type {number}\n * @constant\n */ $7ec6ab76c28fee32$var$Matrix4.COLUMN0ROW2 = 2;\n/**\n * The index into Matrix4 for column 0, row 3.\n *\n * @type {number}\n * @constant\n */ $7ec6ab76c28fee32$var$Matrix4.COLUMN0ROW3 = 3;\n/**\n * The index into Matrix4 for column 1, row 0.\n *\n * @type {number}\n * @constant\n */ $7ec6ab76c28fee32$var$Matrix4.COLUMN1ROW0 = 4;\n/**\n * The index into Matrix4 for column 1, row 1.\n *\n * @type {number}\n * @constant\n */ $7ec6ab76c28fee32$var$Matrix4.COLUMN1ROW1 = 5;\n/**\n * The index into Matrix4 for column 1, row 2.\n *\n * @type {number}\n * @constant\n */ $7ec6ab76c28fee32$var$Matrix4.COLUMN1ROW2 = 6;\n/**\n * The index into Matrix4 for column 1, row 3.\n *\n * @type {number}\n * @constant\n */ $7ec6ab76c28fee32$var$Matrix4.COLUMN1ROW3 = 7;\n/**\n * The index into Matrix4 for column 2, row 0.\n *\n * @type {number}\n * @constant\n */ $7ec6ab76c28fee32$var$Matrix4.COLUMN2ROW0 = 8;\n/**\n * The index into Matrix4 for column 2, row 1.\n *\n * @type {number}\n * @constant\n */ $7ec6ab76c28fee32$var$Matrix4.COLUMN2ROW1 = 9;\n/**\n * The index into Matrix4 for column 2, row 2.\n *\n * @type {number}\n * @constant\n */ $7ec6ab76c28fee32$var$Matrix4.COLUMN2ROW2 = 10;\n/**\n * The index into Matrix4 for column 2, row 3.\n *\n * @type {number}\n * @constant\n */ $7ec6ab76c28fee32$var$Matrix4.COLUMN2ROW3 = 11;\n/**\n * The index into Matrix4 for column 3, row 0.\n *\n * @type {number}\n * @constant\n */ $7ec6ab76c28fee32$var$Matrix4.COLUMN3ROW0 = 12;\n/**\n * The index into Matrix4 for column 3, row 1.\n *\n * @type {number}\n * @constant\n */ $7ec6ab76c28fee32$var$Matrix4.COLUMN3ROW1 = 13;\n/**\n * The index into Matrix4 for column 3, row 2.\n *\n * @type {number}\n * @constant\n */ $7ec6ab76c28fee32$var$Matrix4.COLUMN3ROW2 = 14;\n/**\n * The index into Matrix4 for column 3, row 3.\n *\n * @type {number}\n * @constant\n */ $7ec6ab76c28fee32$var$Matrix4.COLUMN3ROW3 = 15;\nObject.defineProperties($7ec6ab76c28fee32$var$Matrix4.prototype, {\n /**\n * Gets the number of items in the collection.\n * @memberof Matrix4.prototype\n *\n * @type {number}\n */ length: {\n get: function() {\n return $7ec6ab76c28fee32$var$Matrix4.packedLength;\n }\n }\n});\n/**\n * Duplicates the provided Matrix4 instance.\n *\n * @param {Matrix4} [result] The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter or a new Matrix4 instance if one was not provided.\n */ $7ec6ab76c28fee32$var$Matrix4.prototype.clone = function(result) {\n return $7ec6ab76c28fee32$var$Matrix4.clone(this, result);\n};\n/**\n * Compares this matrix to the provided matrix componentwise and returns\n * true if they are equal, false otherwise.\n *\n * @param {Matrix4} [right] The right hand side matrix.\n * @returns {boolean} true if they are equal, false otherwise.\n */ $7ec6ab76c28fee32$var$Matrix4.prototype.equals = function(right) {\n return $7ec6ab76c28fee32$var$Matrix4.equals(this, right);\n};\n/**\n * @private\n */ $7ec6ab76c28fee32$var$Matrix4.equalsArray = function(matrix, array, offset) {\n return matrix[0] === array[offset] && matrix[1] === array[offset + 1] && matrix[2] === array[offset + 2] && matrix[3] === array[offset + 3] && matrix[4] === array[offset + 4] && matrix[5] === array[offset + 5] && matrix[6] === array[offset + 6] && matrix[7] === array[offset + 7] && matrix[8] === array[offset + 8] && matrix[9] === array[offset + 9] && matrix[10] === array[offset + 10] && matrix[11] === array[offset + 11] && matrix[12] === array[offset + 12] && matrix[13] === array[offset + 13] && matrix[14] === array[offset + 14] && matrix[15] === array[offset + 15];\n};\n/**\n * Compares this matrix to the provided matrix componentwise and returns\n * true if they are within the provided epsilon,\n * false otherwise.\n *\n * @param {Matrix4} [right] The right hand side matrix.\n * @param {number} [epsilon=0] The epsilon to use for equality testing.\n * @returns {boolean} true if they are within the provided epsilon, false otherwise.\n */ $7ec6ab76c28fee32$var$Matrix4.prototype.equalsEpsilon = function(right, epsilon) {\n return $7ec6ab76c28fee32$var$Matrix4.equalsEpsilon(this, right, epsilon);\n};\n/**\n * Computes a string representing this Matrix with each row being\n * on a separate line and in the format '(column0, column1, column2, column3)'.\n *\n * @returns {string} A string representing the provided Matrix with each row being on a separate line and in the format '(column0, column1, column2, column3)'.\n */ $7ec6ab76c28fee32$var$Matrix4.prototype.toString = function() {\n return `(${this[0]}, ${this[4]}, ${this[8]}, ${this[12]})\\n` + `(${this[1]}, ${this[5]}, ${this[9]}, ${this[13]})\\n` + `(${this[2]}, ${this[6]}, ${this[10]}, ${this[14]})\\n` + `(${this[3]}, ${this[7]}, ${this[11]}, ${this[15]})`;\n};\nvar $7ec6ab76c28fee32$export$2e2bcd8739ae039 = $7ec6ab76c28fee32$var$Matrix4;\n\n\nvar $9btZb = parcelRequire(\"9btZb\");\nvar $kWQjc = parcelRequire(\"kWQjc\");\n\nvar $bXwZF = parcelRequire(\"bXwZF\");\n\n\n\nvar $3pzcG = parcelRequire(\"3pzcG\");\n\nvar $8w8ZH = parcelRequire(\"8w8ZH\");\n\nvar $jQJji = parcelRequire(\"jQJji\");\n\nvar $1vHsR = parcelRequire(\"1vHsR\");\n\nvar $3pzcG = parcelRequire(\"3pzcG\");\n/**\n * Finds an item in a sorted array.\n *\n * @function\n * @param {Array} array The sorted array to search.\n * @param {*} itemToFind The item to find in the array.\n * @param {binarySearchComparator} comparator The function to use to compare the item to\n * elements in the array.\n * @returns {number} The index of itemToFind in the array, if it exists. If itemToFind\n * does not exist, the return value is a negative number which is the bitwise complement (~)\n * of the index before which the itemToFind should be inserted in order to maintain the\n * sorted order of the array.\n *\n * @example\n * // Create a comparator function to search through an array of numbers.\n * function comparator(a, b) {\n * return a - b;\n * };\n * const numbers = [0, 2, 4, 6, 8];\n * const index = Cesium.binarySearch(numbers, 6, comparator); // 3\n */ function $52c19b09ece4c63f$var$binarySearch(array, itemToFind, comparator) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).defined(\"array\", array);\n (0, $3pzcG.default).defined(\"itemToFind\", itemToFind);\n (0, $3pzcG.default).defined(\"comparator\", comparator);\n //>>includeEnd('debug');\n let low = 0;\n let high = array.length - 1;\n let i;\n let comparison;\n while(low <= high){\n i = ~~((low + high) / 2);\n comparison = comparator(array[i], itemToFind);\n if (comparison < 0) {\n low = i + 1;\n continue;\n }\n if (comparison > 0) {\n high = i - 1;\n continue;\n }\n return i;\n }\n return ~(high + 1);\n}\nvar /**\n * A function used to compare two items while performing a binary search.\n * @callback binarySearchComparator\n *\n * @param {*} a An item in the array.\n * @param {*} b The item being searched for.\n * @returns {number} Returns a negative value if a is less than b,\n * a positive value if a is greater than b, or\n * 0 if a is equal to b.\n *\n * @example\n * function compareNumbers(a, b) {\n * return a - b;\n * }\n */ $52c19b09ece4c63f$export$2e2bcd8739ae039 = $52c19b09ece4c63f$var$binarySearch;\n\n\n\nvar $3pzcG = parcelRequire(\"3pzcG\");\n\nvar $8w8ZH = parcelRequire(\"8w8ZH\");\n\nvar $jQJji = parcelRequire(\"jQJji\");\n/**\n * A set of Earth Orientation Parameters (EOP) sampled at a time.\n *\n * @alias EarthOrientationParametersSample\n * @constructor\n *\n * @param {number} xPoleWander The pole wander about the X axis, in radians.\n * @param {number} yPoleWander The pole wander about the Y axis, in radians.\n * @param {number} xPoleOffset The offset to the Celestial Intermediate Pole (CIP) about the X axis, in radians.\n * @param {number} yPoleOffset The offset to the Celestial Intermediate Pole (CIP) about the Y axis, in radians.\n * @param {number} ut1MinusUtc The difference in time standards, UT1 - UTC, in seconds.\n *\n * @private\n */ function $733293b70aae4cad$var$EarthOrientationParametersSample(xPoleWander, yPoleWander, xPoleOffset, yPoleOffset, ut1MinusUtc) {\n /**\n * The pole wander about the X axis, in radians.\n * @type {number}\n */ this.xPoleWander = xPoleWander;\n /**\n * The pole wander about the Y axis, in radians.\n * @type {number}\n */ this.yPoleWander = yPoleWander;\n /**\n * The offset to the Celestial Intermediate Pole (CIP) about the X axis, in radians.\n * @type {number}\n */ this.xPoleOffset = xPoleOffset;\n /**\n * The offset to the Celestial Intermediate Pole (CIP) about the Y axis, in radians.\n * @type {number}\n */ this.yPoleOffset = yPoleOffset;\n /**\n * The difference in time standards, UT1 - UTC, in seconds.\n * @type {number}\n */ this.ut1MinusUtc = ut1MinusUtc;\n}\nvar $733293b70aae4cad$export$2e2bcd8739ae039 = $733293b70aae4cad$var$EarthOrientationParametersSample;\n\n\n\n\nvar $8w8ZH = parcelRequire(\"8w8ZH\");\n\nvar $jQJji = parcelRequire(\"jQJji\");\n\nvar $1vHsR = parcelRequire(\"1vHsR\");\n\nvar $3pzcG = parcelRequire(\"3pzcG\");\n\nvar $8w8ZH = parcelRequire(\"8w8ZH\");\n\nvar $1vHsR = parcelRequire(\"1vHsR\");\n\nvar $1vHsR = parcelRequire(\"1vHsR\");\n/**\n * Determines if a given date is a leap year.\n *\n * @function isLeapYear\n *\n * @param {number} year The year to be tested.\n * @returns {boolean} True if year is a leap year.\n *\n * @example\n * const leapYear = Cesium.isLeapYear(2000); // true\n */ function $86dc94fb6bcfc713$var$isLeapYear(year) {\n //>>includeStart('debug', pragmas.debug);\n if (year === null || isNaN(year)) throw new (0, $1vHsR.default)(\"year is required and must be a number.\");\n //>>includeEnd('debug');\n return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;\n}\nvar $86dc94fb6bcfc713$export$2e2bcd8739ae039 = $86dc94fb6bcfc713$var$isLeapYear;\n\n\nconst $33ab1ce7e2935ae4$var$daysInYear = [\n 31,\n 28,\n 31,\n 30,\n 31,\n 30,\n 31,\n 31,\n 30,\n 31,\n 30,\n 31\n];\n/**\n * Represents a Gregorian date in a more precise format than the JavaScript Date object.\n * In addition to submillisecond precision, this object can also represent leap seconds.\n * @alias GregorianDate\n * @constructor\n *\n * @param {number} [year] The year as a whole number.\n * @param {number} [month] The month as a whole number with range [1, 12].\n * @param {number} [day] The day of the month as a whole number starting at 1.\n * @param {number} [hour] The hour as a whole number with range [0, 23].\n * @param {number} [minute] The minute of the hour as a whole number with range [0, 59].\n * @param {number} [second] The second of the minute as a whole number with range [0, 60], with 60 representing a leap second.\n * @param {number} [millisecond] The millisecond of the second as a floating point number with range [0.0, 1000.0).\n * @param {boolean} [isLeapSecond] Whether this time is during a leap second.\n *\n * @see JulianDate#toGregorianDate\n */ function $33ab1ce7e2935ae4$var$GregorianDate(year, month, day, hour, minute, second, millisecond, isLeapSecond) {\n const minimumYear = 1;\n const minimumMonth = 1;\n const minimumDay = 1;\n const minimumHour = 0;\n const minimumMinute = 0;\n const minimumSecond = 0;\n const minimumMillisecond = 0;\n year = (0, $8w8ZH.default)(year, minimumYear);\n month = (0, $8w8ZH.default)(month, minimumMonth);\n day = (0, $8w8ZH.default)(day, minimumDay);\n hour = (0, $8w8ZH.default)(hour, minimumHour);\n minute = (0, $8w8ZH.default)(minute, minimumMinute);\n second = (0, $8w8ZH.default)(second, minimumSecond);\n millisecond = (0, $8w8ZH.default)(millisecond, minimumMillisecond);\n isLeapSecond = (0, $8w8ZH.default)(isLeapSecond, false);\n //>>includeStart('debug', pragmas.debug);\n validateRange();\n validateDate();\n //>>includeEnd('debug');\n /**\n * Gets or sets the year as a whole number.\n * @type {number}\n */ this.year = year;\n /**\n * Gets or sets the month as a whole number with range [1, 12].\n * @type {number}\n */ this.month = month;\n /**\n * Gets or sets the day of the month as a whole number starting at 1.\n * @type {number}\n */ this.day = day;\n /**\n * Gets or sets the hour as a whole number with range [0, 23].\n * @type {number}\n */ this.hour = hour;\n /**\n * Gets or sets the minute of the hour as a whole number with range [0, 59].\n * @type {number}\n */ this.minute = minute;\n /**\n * Gets or sets the second of the minute as a whole number with range [0, 60], with 60 representing a leap second.\n * @type {number}\n */ this.second = second;\n /**\n * Gets or sets the millisecond of the second as a floating point number with range [0.0, 1000.0).\n * @type {number}\n */ this.millisecond = millisecond;\n /**\n * Gets or sets whether this time is during a leap second.\n * @type {boolean}\n */ this.isLeapSecond = isLeapSecond;\n function validateRange() {\n const maximumYear = 9999;\n const maximumMonth = 12;\n const maximumDay = 31;\n const maximumHour = 23;\n const maximumMinute = 59;\n const maximumSecond = 59;\n const excludedMaximumMilisecond = 1000;\n (0, $3pzcG.default).typeOf.number.greaterThanOrEquals(\"Year\", year, minimumYear);\n (0, $3pzcG.default).typeOf.number.lessThanOrEquals(\"Year\", year, maximumYear);\n (0, $3pzcG.default).typeOf.number.greaterThanOrEquals(\"Month\", month, minimumMonth);\n (0, $3pzcG.default).typeOf.number.lessThanOrEquals(\"Month\", month, maximumMonth);\n (0, $3pzcG.default).typeOf.number.greaterThanOrEquals(\"Day\", day, minimumDay);\n (0, $3pzcG.default).typeOf.number.lessThanOrEquals(\"Day\", day, maximumDay);\n (0, $3pzcG.default).typeOf.number.greaterThanOrEquals(\"Hour\", hour, minimumHour);\n (0, $3pzcG.default).typeOf.number.lessThanOrEquals(\"Hour\", hour, maximumHour);\n (0, $3pzcG.default).typeOf.number.greaterThanOrEquals(\"Minute\", minute, minimumMinute);\n (0, $3pzcG.default).typeOf.number.lessThanOrEquals(\"Minute\", minute, maximumMinute);\n (0, $3pzcG.default).typeOf.bool(\"IsLeapSecond\", isLeapSecond);\n (0, $3pzcG.default).typeOf.number.greaterThanOrEquals(\"Second\", second, minimumSecond);\n (0, $3pzcG.default).typeOf.number.lessThanOrEquals(\"Second\", second, isLeapSecond ? maximumSecond + 1 : maximumSecond);\n (0, $3pzcG.default).typeOf.number.greaterThanOrEquals(\"Millisecond\", millisecond, minimumMillisecond);\n (0, $3pzcG.default).typeOf.number.lessThan(\"Millisecond\", millisecond, excludedMaximumMilisecond);\n }\n // Javascript date object supports only dates greater than 1901. Thus validating with custom logic\n function validateDate() {\n const daysInMonth = month === 2 && (0, $86dc94fb6bcfc713$export$2e2bcd8739ae039)(year) ? $33ab1ce7e2935ae4$var$daysInYear[month - 1] + 1 : $33ab1ce7e2935ae4$var$daysInYear[month - 1];\n if (day > daysInMonth) throw new (0, $1vHsR.default)(\"Month and Day represents invalid date\");\n }\n}\nvar $33ab1ce7e2935ae4$export$2e2bcd8739ae039 = $33ab1ce7e2935ae4$var$GregorianDate;\n\n\n\n/**\n * Describes a single leap second, which is constructed from a {@link JulianDate} and a\n * numerical offset representing the number of seconds TAI is ahead of the UTC time standard.\n * @alias LeapSecond\n * @constructor\n *\n * @param {JulianDate} [date] A Julian date representing the time of the leap second.\n * @param {number} [offset] The cumulative number of seconds that TAI is ahead of UTC at the provided date.\n */ function $97869fccaa735547$var$LeapSecond(date, offset) {\n /**\n * Gets or sets the date at which this leap second occurs.\n * @type {JulianDate}\n */ this.julianDate = date;\n /**\n * Gets or sets the cumulative number of seconds between the UTC and TAI time standards at the time\n * of this leap second.\n * @type {number}\n */ this.offset = offset;\n}\nvar $97869fccaa735547$export$2e2bcd8739ae039 = $97869fccaa735547$var$LeapSecond;\n\n\n/**\n * Constants for time conversions like those done by {@link JulianDate}.\n *\n * @namespace TimeConstants\n *\n * @see JulianDate\n *\n * @private\n */ const $e3d50c782acbaff1$var$TimeConstants = {\n /**\n * The number of seconds in one millisecond: 0.001\n * @type {number}\n * @constant\n */ SECONDS_PER_MILLISECOND: 0.001,\n /**\n * The number of seconds in one minute: 60.\n * @type {number}\n * @constant\n */ SECONDS_PER_MINUTE: 60.0,\n /**\n * The number of minutes in one hour: 60.\n * @type {number}\n * @constant\n */ MINUTES_PER_HOUR: 60.0,\n /**\n * The number of hours in one day: 24.\n * @type {number}\n * @constant\n */ HOURS_PER_DAY: 24.0,\n /**\n * The number of seconds in one hour: 3600.\n * @type {number}\n * @constant\n */ SECONDS_PER_HOUR: 3600.0,\n /**\n * The number of minutes in one day: 1440.\n * @type {number}\n * @constant\n */ MINUTES_PER_DAY: 1440.0,\n /**\n * The number of seconds in one day, ignoring leap seconds: 86400.\n * @type {number}\n * @constant\n */ SECONDS_PER_DAY: 86400.0,\n /**\n * The number of days in one Julian century: 36525.\n * @type {number}\n * @constant\n */ DAYS_PER_JULIAN_CENTURY: 36525.0,\n /**\n * One trillionth of a second.\n * @type {number}\n * @constant\n */ PICOSECOND: 0.000000001,\n /**\n * The number of days to subtract from a Julian date to determine the\n * modified Julian date, which gives the number of days since midnight\n * on November 17, 1858.\n * @type {number}\n * @constant\n */ MODIFIED_JULIAN_DATE_DIFFERENCE: 2400000.5\n};\nvar $e3d50c782acbaff1$export$2e2bcd8739ae039 = Object.freeze($e3d50c782acbaff1$var$TimeConstants);\n\n\n/**\n * Provides the type of time standards which JulianDate can take as input.\n *\n * @enum {number}\n *\n * @see JulianDate\n */ const $134462e760c5c083$var$TimeStandard = {\n /**\n * Represents the coordinated Universal Time (UTC) time standard.\n *\n * UTC is related to TAI according to the relationship\n * UTC = TAI - deltaT where deltaT is the number of leap\n * seconds which have been introduced as of the time in TAI.\n *\n * @type {number}\n * @constant\n */ UTC: 0,\n /**\n * Represents the International Atomic Time (TAI) time standard.\n * TAI is the principal time standard to which the other time standards are related.\n *\n * @type {number}\n * @constant\n */ TAI: 1\n};\nvar $134462e760c5c083$export$2e2bcd8739ae039 = Object.freeze($134462e760c5c083$var$TimeStandard);\n\n\nconst $73b9691e04761700$var$gregorianDateScratch = new (0, $33ab1ce7e2935ae4$export$2e2bcd8739ae039)();\nconst $73b9691e04761700$var$daysInMonth = [\n 31,\n 28,\n 31,\n 30,\n 31,\n 30,\n 31,\n 31,\n 30,\n 31,\n 30,\n 31\n];\nconst $73b9691e04761700$var$daysInLeapFeburary = 29;\nfunction $73b9691e04761700$var$compareLeapSecondDates(leapSecond, dateToFind) {\n return $73b9691e04761700$var$JulianDate.compare(leapSecond.julianDate, dateToFind.julianDate);\n}\n// we don't really need a leap second instance, anything with a julianDate property will do\nconst $73b9691e04761700$var$binarySearchScratchLeapSecond = new (0, $97869fccaa735547$export$2e2bcd8739ae039)();\nfunction $73b9691e04761700$var$convertUtcToTai(julianDate) {\n //Even though julianDate is in UTC, we'll treat it as TAI and\n //search the leap second table for it.\n $73b9691e04761700$var$binarySearchScratchLeapSecond.julianDate = julianDate;\n const leapSeconds = $73b9691e04761700$var$JulianDate.leapSeconds;\n let index = (0, $52c19b09ece4c63f$export$2e2bcd8739ae039)(leapSeconds, $73b9691e04761700$var$binarySearchScratchLeapSecond, $73b9691e04761700$var$compareLeapSecondDates);\n if (index < 0) index = ~index;\n if (index >= leapSeconds.length) index = leapSeconds.length - 1;\n let offset = leapSeconds[index].offset;\n if (index > 0) {\n //Now we have the index of the closest leap second that comes on or after our UTC time.\n //However, if the difference between the UTC date being converted and the TAI\n //defined leap second is greater than the offset, we are off by one and need to use\n //the previous leap second.\n const difference = $73b9691e04761700$var$JulianDate.secondsDifference(leapSeconds[index].julianDate, julianDate);\n if (difference > offset) {\n index--;\n offset = leapSeconds[index].offset;\n }\n }\n $73b9691e04761700$var$JulianDate.addSeconds(julianDate, offset, julianDate);\n}\nfunction $73b9691e04761700$var$convertTaiToUtc(julianDate, result) {\n $73b9691e04761700$var$binarySearchScratchLeapSecond.julianDate = julianDate;\n const leapSeconds = $73b9691e04761700$var$JulianDate.leapSeconds;\n let index = (0, $52c19b09ece4c63f$export$2e2bcd8739ae039)(leapSeconds, $73b9691e04761700$var$binarySearchScratchLeapSecond, $73b9691e04761700$var$compareLeapSecondDates);\n if (index < 0) index = ~index;\n //All times before our first leap second get the first offset.\n if (index === 0) return $73b9691e04761700$var$JulianDate.addSeconds(julianDate, -leapSeconds[0].offset, result);\n //All times after our leap second get the last offset.\n if (index >= leapSeconds.length) return $73b9691e04761700$var$JulianDate.addSeconds(julianDate, -leapSeconds[index - 1].offset, result);\n //Compute the difference between the found leap second and the time we are converting.\n const difference = $73b9691e04761700$var$JulianDate.secondsDifference(leapSeconds[index].julianDate, julianDate);\n if (difference === 0) //The date is in our leap second table.\n return $73b9691e04761700$var$JulianDate.addSeconds(julianDate, -leapSeconds[index].offset, result);\n if (difference <= 1.0) //The requested date is during the moment of a leap second, then we cannot convert to UTC\n return undefined;\n //The time is in between two leap seconds, index is the leap second after the date\n //we're converting, so we subtract one to get the correct LeapSecond instance.\n return $73b9691e04761700$var$JulianDate.addSeconds(julianDate, -leapSeconds[--index].offset, result);\n}\nfunction $73b9691e04761700$var$setComponents(wholeDays, secondsOfDay, julianDate) {\n const extraDays = secondsOfDay / (0, $e3d50c782acbaff1$export$2e2bcd8739ae039).SECONDS_PER_DAY | 0;\n wholeDays += extraDays;\n secondsOfDay -= (0, $e3d50c782acbaff1$export$2e2bcd8739ae039).SECONDS_PER_DAY * extraDays;\n if (secondsOfDay < 0) {\n wholeDays--;\n secondsOfDay += (0, $e3d50c782acbaff1$export$2e2bcd8739ae039).SECONDS_PER_DAY;\n }\n julianDate.dayNumber = wholeDays;\n julianDate.secondsOfDay = secondsOfDay;\n return julianDate;\n}\nfunction $73b9691e04761700$var$computeJulianDateComponents(year, month, day, hour, minute, second, millisecond) {\n // Algorithm from page 604 of the Explanatory Supplement to the\n // Astronomical Almanac (Seidelmann 1992).\n const a = (month - 14) / 12 | 0;\n const b = year + 4800 + a;\n let dayNumber = (1461 * b / 4 | 0) + (367 * (month - 2 - 12 * a) / 12 | 0) - (3 * ((b + 100) / 100 | 0) / 4 | 0) + day - 32075;\n // JulianDates are noon-based\n hour = hour - 12;\n if (hour < 0) hour += 24;\n const secondsOfDay = second + (hour * (0, $e3d50c782acbaff1$export$2e2bcd8739ae039).SECONDS_PER_HOUR + minute * (0, $e3d50c782acbaff1$export$2e2bcd8739ae039).SECONDS_PER_MINUTE + millisecond * (0, $e3d50c782acbaff1$export$2e2bcd8739ae039).SECONDS_PER_MILLISECOND);\n if (secondsOfDay >= 43200.0) dayNumber -= 1;\n return [\n dayNumber,\n secondsOfDay\n ];\n}\n//Regular expressions used for ISO8601 date parsing.\n//YYYY\nconst $73b9691e04761700$var$matchCalendarYear = /^(\\d{4})$/;\n//YYYY-MM (YYYYMM is invalid)\nconst $73b9691e04761700$var$matchCalendarMonth = /^(\\d{4})-(\\d{2})$/;\n//YYYY-DDD or YYYYDDD\nconst $73b9691e04761700$var$matchOrdinalDate = /^(\\d{4})-?(\\d{3})$/;\n//YYYY-Www or YYYYWww or YYYY-Www-D or YYYYWwwD\nconst $73b9691e04761700$var$matchWeekDate = /^(\\d{4})-?W(\\d{2})-?(\\d{1})?$/;\n//YYYY-MM-DD or YYYYMMDD\nconst $73b9691e04761700$var$matchCalendarDate = /^(\\d{4})-?(\\d{2})-?(\\d{2})$/;\n// Match utc offset\nconst $73b9691e04761700$var$utcOffset = /([Z+\\-])?(\\d{2})?:?(\\d{2})?$/;\n// Match hours HH or HH.xxxxx\nconst $73b9691e04761700$var$matchHours = /^(\\d{2})(\\.\\d+)?/.source + $73b9691e04761700$var$utcOffset.source;\n// Match hours/minutes HH:MM HHMM.xxxxx\nconst $73b9691e04761700$var$matchHoursMinutes = /^(\\d{2}):?(\\d{2})(\\.\\d+)?/.source + $73b9691e04761700$var$utcOffset.source;\n// Match hours/minutes HH:MM:SS HHMMSS.xxxxx\nconst $73b9691e04761700$var$matchHoursMinutesSeconds = /^(\\d{2}):?(\\d{2}):?(\\d{2})(\\.\\d+)?/.source + $73b9691e04761700$var$utcOffset.source;\nconst $73b9691e04761700$var$iso8601ErrorMessage = \"Invalid ISO 8601 date.\";\n/**\n * Represents an astronomical Julian date, which is the number of days since noon on January 1, -4712 (4713 BC).\n * For increased precision, this class stores the whole number part of the date and the seconds\n * part of the date in separate components. In order to be safe for arithmetic and represent\n * leap seconds, the date is always stored in the International Atomic Time standard\n * {@link TimeStandard.TAI}.\n * @alias JulianDate\n * @constructor\n *\n * @param {number} [julianDayNumber=0.0] The Julian Day Number representing the number of whole days. Fractional days will also be handled correctly.\n * @param {number} [secondsOfDay=0.0] The number of seconds into the current Julian Day Number. Fractional seconds, negative seconds and seconds greater than a day will be handled correctly.\n * @param {TimeStandard} [timeStandard=TimeStandard.UTC] The time standard in which the first two parameters are defined.\n */ function $73b9691e04761700$var$JulianDate(julianDayNumber, secondsOfDay, timeStandard) {\n /**\n * Gets or sets the number of whole days.\n * @type {number}\n */ this.dayNumber = undefined;\n /**\n * Gets or sets the number of seconds into the current day.\n * @type {number}\n */ this.secondsOfDay = undefined;\n julianDayNumber = (0, $8w8ZH.default)(julianDayNumber, 0.0);\n secondsOfDay = (0, $8w8ZH.default)(secondsOfDay, 0.0);\n timeStandard = (0, $8w8ZH.default)(timeStandard, (0, $134462e760c5c083$export$2e2bcd8739ae039).UTC);\n //If julianDayNumber is fractional, make it an integer and add the number of seconds the fraction represented.\n const wholeDays = julianDayNumber | 0;\n secondsOfDay = secondsOfDay + (julianDayNumber - wholeDays) * (0, $e3d50c782acbaff1$export$2e2bcd8739ae039).SECONDS_PER_DAY;\n $73b9691e04761700$var$setComponents(wholeDays, secondsOfDay, this);\n if (timeStandard === (0, $134462e760c5c083$export$2e2bcd8739ae039).UTC) $73b9691e04761700$var$convertUtcToTai(this);\n}\n/**\n * Creates a new instance from a GregorianDate.\n *\n * @param {GregorianDate} date A GregorianDate.\n * @param {JulianDate} [result] An existing instance to use for the result.\n * @returns {JulianDate} The modified result parameter or a new instance if none was provided.\n *\n * @exception {DeveloperError} date must be a valid GregorianDate.\n */ $73b9691e04761700$var$JulianDate.fromGregorianDate = function(date, result) {\n //>>includeStart('debug', pragmas.debug);\n if (!(date instanceof (0, $33ab1ce7e2935ae4$export$2e2bcd8739ae039))) throw new (0, $1vHsR.default)(\"date must be a valid GregorianDate.\");\n //>>includeEnd('debug');\n const components = $73b9691e04761700$var$computeJulianDateComponents(date.year, date.month, date.day, date.hour, date.minute, date.second, date.millisecond);\n if (!(0, $jQJji.default)(result)) return new $73b9691e04761700$var$JulianDate(components[0], components[1], (0, $134462e760c5c083$export$2e2bcd8739ae039).UTC);\n $73b9691e04761700$var$setComponents(components[0], components[1], result);\n $73b9691e04761700$var$convertUtcToTai(result);\n return result;\n};\n/**\n * Creates a new instance from a JavaScript Date.\n *\n * @param {Date} date A JavaScript Date.\n * @param {JulianDate} [result] An existing instance to use for the result.\n * @returns {JulianDate} The modified result parameter or a new instance if none was provided.\n *\n * @exception {DeveloperError} date must be a valid JavaScript Date.\n */ $73b9691e04761700$var$JulianDate.fromDate = function(date, result) {\n //>>includeStart('debug', pragmas.debug);\n if (!(date instanceof Date) || isNaN(date.getTime())) throw new (0, $1vHsR.default)(\"date must be a valid JavaScript Date.\");\n //>>includeEnd('debug');\n const components = $73b9691e04761700$var$computeJulianDateComponents(date.getUTCFullYear(), date.getUTCMonth() + 1, date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds(), date.getUTCMilliseconds());\n if (!(0, $jQJji.default)(result)) return new $73b9691e04761700$var$JulianDate(components[0], components[1], (0, $134462e760c5c083$export$2e2bcd8739ae039).UTC);\n $73b9691e04761700$var$setComponents(components[0], components[1], result);\n $73b9691e04761700$var$convertUtcToTai(result);\n return result;\n};\n/**\n * Creates a new instance from a from an {@link http://en.wikipedia.org/wiki/ISO_8601|ISO 8601} date.\n * This method is superior to Date.parse because it will handle all valid formats defined by the ISO 8601\n * specification, including leap seconds and sub-millisecond times, which discarded by most JavaScript implementations.\n *\n * @param {string} iso8601String An ISO 8601 date.\n * @param {JulianDate} [result] An existing instance to use for the result.\n * @returns {JulianDate} The modified result parameter or a new instance if none was provided.\n *\n * @exception {DeveloperError} Invalid ISO 8601 date.\n */ $73b9691e04761700$var$JulianDate.fromIso8601 = function(iso8601String, result) {\n //>>includeStart('debug', pragmas.debug);\n if (typeof iso8601String !== \"string\") throw new (0, $1vHsR.default)($73b9691e04761700$var$iso8601ErrorMessage);\n //>>includeEnd('debug');\n //Comma and decimal point both indicate a fractional number according to ISO 8601,\n //start out by blanket replacing , with . which is the only valid such symbol in JS.\n iso8601String = iso8601String.replace(\",\", \".\");\n //Split the string into its date and time components, denoted by a mandatory T\n let tokens = iso8601String.split(\"T\");\n let year;\n let month = 1;\n let day = 1;\n let hour = 0;\n let minute = 0;\n let second = 0;\n let millisecond = 0;\n //Lacking a time is okay, but a missing date is illegal.\n const date = tokens[0];\n const time = tokens[1];\n let tmp;\n let inLeapYear;\n //>>includeStart('debug', pragmas.debug);\n if (!(0, $jQJji.default)(date)) throw new (0, $1vHsR.default)($73b9691e04761700$var$iso8601ErrorMessage);\n let dashCount;\n //>>includeEnd('debug');\n //First match the date against possible regular expressions.\n tokens = date.match($73b9691e04761700$var$matchCalendarDate);\n if (tokens !== null) {\n //>>includeStart('debug', pragmas.debug);\n dashCount = date.split(\"-\").length - 1;\n if (dashCount > 0 && dashCount !== 2) throw new (0, $1vHsR.default)($73b9691e04761700$var$iso8601ErrorMessage);\n //>>includeEnd('debug');\n year = +tokens[1];\n month = +tokens[2];\n day = +tokens[3];\n } else {\n tokens = date.match($73b9691e04761700$var$matchCalendarMonth);\n if (tokens !== null) {\n year = +tokens[1];\n month = +tokens[2];\n } else {\n tokens = date.match($73b9691e04761700$var$matchCalendarYear);\n if (tokens !== null) year = +tokens[1];\n else {\n //Not a year/month/day so it must be an ordinal date.\n let dayOfYear;\n tokens = date.match($73b9691e04761700$var$matchOrdinalDate);\n if (tokens !== null) {\n year = +tokens[1];\n dayOfYear = +tokens[2];\n inLeapYear = (0, $86dc94fb6bcfc713$export$2e2bcd8739ae039)(year);\n //This validation is only applicable for this format.\n //>>includeStart('debug', pragmas.debug);\n if (dayOfYear < 1 || inLeapYear && dayOfYear > 366 || !inLeapYear && dayOfYear > 365) throw new (0, $1vHsR.default)($73b9691e04761700$var$iso8601ErrorMessage);\n //>>includeEnd('debug')\n } else {\n tokens = date.match($73b9691e04761700$var$matchWeekDate);\n if (tokens !== null) {\n //ISO week date to ordinal date from\n //http://en.wikipedia.org/w/index.php?title=ISO_week_date&oldid=474176775\n year = +tokens[1];\n const weekNumber = +tokens[2];\n const dayOfWeek = +tokens[3] || 0;\n //>>includeStart('debug', pragmas.debug);\n dashCount = date.split(\"-\").length - 1;\n if (dashCount > 0 && (!(0, $jQJji.default)(tokens[3]) && dashCount !== 1 || (0, $jQJji.default)(tokens[3]) && dashCount !== 2)) throw new (0, $1vHsR.default)($73b9691e04761700$var$iso8601ErrorMessage);\n //>>includeEnd('debug')\n const january4 = new Date(Date.UTC(year, 0, 4));\n dayOfYear = weekNumber * 7 + dayOfWeek - january4.getUTCDay() - 3;\n } else //None of our regular expressions succeeded in parsing the date properly.\n //>>includeStart('debug', pragmas.debug);\n throw new (0, $1vHsR.default)($73b9691e04761700$var$iso8601ErrorMessage);\n }\n //Split an ordinal date into month/day.\n tmp = new Date(Date.UTC(year, 0, 1));\n tmp.setUTCDate(dayOfYear);\n month = tmp.getUTCMonth() + 1;\n day = tmp.getUTCDate();\n }\n }\n }\n //Now that we have all of the date components, validate them to make sure nothing is out of range.\n inLeapYear = (0, $86dc94fb6bcfc713$export$2e2bcd8739ae039)(year);\n //>>includeStart('debug', pragmas.debug);\n if (month < 1 || month > 12 || day < 1 || (month !== 2 || !inLeapYear) && day > $73b9691e04761700$var$daysInMonth[month - 1] || inLeapYear && month === 2 && day > $73b9691e04761700$var$daysInLeapFeburary) throw new (0, $1vHsR.default)($73b9691e04761700$var$iso8601ErrorMessage);\n //>>includeEnd('debug')\n //Now move onto the time string, which is much simpler.\n //If no time is specified, it is considered the beginning of the day, UTC to match Javascript's implementation.\n let offsetIndex;\n if ((0, $jQJji.default)(time)) {\n tokens = time.match($73b9691e04761700$var$matchHoursMinutesSeconds);\n if (tokens !== null) {\n //>>includeStart('debug', pragmas.debug);\n dashCount = time.split(\":\").length - 1;\n if (dashCount > 0 && dashCount !== 2 && dashCount !== 3) throw new (0, $1vHsR.default)($73b9691e04761700$var$iso8601ErrorMessage);\n //>>includeEnd('debug')\n hour = +tokens[1];\n minute = +tokens[2];\n second = +tokens[3];\n millisecond = +(tokens[4] || 0) * 1000.0;\n offsetIndex = 5;\n } else {\n tokens = time.match($73b9691e04761700$var$matchHoursMinutes);\n if (tokens !== null) {\n //>>includeStart('debug', pragmas.debug);\n dashCount = time.split(\":\").length - 1;\n if (dashCount > 2) throw new (0, $1vHsR.default)($73b9691e04761700$var$iso8601ErrorMessage);\n //>>includeEnd('debug')\n hour = +tokens[1];\n minute = +tokens[2];\n second = +(tokens[3] || 0) * 60.0;\n offsetIndex = 4;\n } else {\n tokens = time.match($73b9691e04761700$var$matchHours);\n if (tokens !== null) {\n hour = +tokens[1];\n minute = +(tokens[2] || 0) * 60.0;\n offsetIndex = 3;\n } else //>>includeStart('debug', pragmas.debug);\n throw new (0, $1vHsR.default)($73b9691e04761700$var$iso8601ErrorMessage);\n }\n }\n //Validate that all values are in proper range. Minutes and hours have special cases at 60 and 24.\n //>>includeStart('debug', pragmas.debug);\n if (minute >= 60 || second >= 61 || hour > 24 || hour === 24 && (minute > 0 || second > 0 || millisecond > 0)) throw new (0, $1vHsR.default)($73b9691e04761700$var$iso8601ErrorMessage);\n //>>includeEnd('debug');\n //Check the UTC offset value, if no value exists, use local time\n //a Z indicates UTC, + or - are offsets.\n const offset = tokens[offsetIndex];\n const offsetHours = +tokens[offsetIndex + 1];\n const offsetMinutes = +(tokens[offsetIndex + 2] || 0);\n switch(offset){\n case \"+\":\n hour = hour - offsetHours;\n minute = minute - offsetMinutes;\n break;\n case \"-\":\n hour = hour + offsetHours;\n minute = minute + offsetMinutes;\n break;\n case \"Z\":\n break;\n default:\n minute = minute + new Date(Date.UTC(year, month - 1, day, hour, minute)).getTimezoneOffset();\n break;\n }\n }\n //ISO8601 denotes a leap second by any time having a seconds component of 60 seconds.\n //If that's the case, we need to temporarily subtract a second in order to build a UTC date.\n //Then we add it back in after converting to TAI.\n const isLeapSecond = second === 60;\n if (isLeapSecond) second--;\n //Even if we successfully parsed the string into its components, after applying UTC offset or\n //special cases like 24:00:00 denoting midnight, we need to normalize the data appropriately.\n //milliseconds can never be greater than 1000, and seconds can't be above 60, so we start with minutes\n while(minute >= 60){\n minute -= 60;\n hour++;\n }\n while(hour >= 24){\n hour -= 24;\n day++;\n }\n tmp = inLeapYear && month === 2 ? $73b9691e04761700$var$daysInLeapFeburary : $73b9691e04761700$var$daysInMonth[month - 1];\n while(day > tmp){\n day -= tmp;\n month++;\n if (month > 12) {\n month -= 12;\n year++;\n }\n tmp = inLeapYear && month === 2 ? $73b9691e04761700$var$daysInLeapFeburary : $73b9691e04761700$var$daysInMonth[month - 1];\n }\n //If UTC offset is at the beginning/end of the day, minutes can be negative.\n while(minute < 0){\n minute += 60;\n hour--;\n }\n while(hour < 0){\n hour += 24;\n day--;\n }\n while(day < 1){\n month--;\n if (month < 1) {\n month += 12;\n year--;\n }\n tmp = inLeapYear && month === 2 ? $73b9691e04761700$var$daysInLeapFeburary : $73b9691e04761700$var$daysInMonth[month - 1];\n day += tmp;\n }\n //Now create the JulianDate components from the Gregorian date and actually create our instance.\n const components = $73b9691e04761700$var$computeJulianDateComponents(year, month, day, hour, minute, second, millisecond);\n if (!(0, $jQJji.default)(result)) result = new $73b9691e04761700$var$JulianDate(components[0], components[1], (0, $134462e760c5c083$export$2e2bcd8739ae039).UTC);\n else {\n $73b9691e04761700$var$setComponents(components[0], components[1], result);\n $73b9691e04761700$var$convertUtcToTai(result);\n }\n //If we were on a leap second, add it back.\n if (isLeapSecond) $73b9691e04761700$var$JulianDate.addSeconds(result, 1, result);\n return result;\n};\n/**\n * Creates a new instance that represents the current system time.\n * This is equivalent to calling JulianDate.fromDate(new Date());.\n *\n * @param {JulianDate} [result] An existing instance to use for the result.\n * @returns {JulianDate} The modified result parameter or a new instance if none was provided.\n */ $73b9691e04761700$var$JulianDate.now = function(result) {\n return $73b9691e04761700$var$JulianDate.fromDate(new Date(), result);\n};\nconst $73b9691e04761700$var$toGregorianDateScratch = new $73b9691e04761700$var$JulianDate(0, 0, (0, $134462e760c5c083$export$2e2bcd8739ae039).TAI);\n/**\n * Creates a {@link GregorianDate} from the provided instance.\n *\n * @param {JulianDate} julianDate The date to be converted.\n * @param {GregorianDate} [result] An existing instance to use for the result.\n * @returns {GregorianDate} The modified result parameter or a new instance if none was provided.\n */ $73b9691e04761700$var$JulianDate.toGregorianDate = function(julianDate, result) {\n //>>includeStart('debug', pragmas.debug);\n if (!(0, $jQJji.default)(julianDate)) throw new (0, $1vHsR.default)(\"julianDate is required.\");\n //>>includeEnd('debug');\n let isLeapSecond = false;\n let thisUtc = $73b9691e04761700$var$convertTaiToUtc(julianDate, $73b9691e04761700$var$toGregorianDateScratch);\n if (!(0, $jQJji.default)(thisUtc)) {\n //Conversion to UTC will fail if we are during a leap second.\n //If that's the case, subtract a second and convert again.\n //JavaScript doesn't support leap seconds, so this results in second 59 being repeated twice.\n $73b9691e04761700$var$JulianDate.addSeconds(julianDate, -1, $73b9691e04761700$var$toGregorianDateScratch);\n thisUtc = $73b9691e04761700$var$convertTaiToUtc($73b9691e04761700$var$toGregorianDateScratch, $73b9691e04761700$var$toGregorianDateScratch);\n isLeapSecond = true;\n }\n let julianDayNumber = thisUtc.dayNumber;\n const secondsOfDay = thisUtc.secondsOfDay;\n if (secondsOfDay >= 43200.0) julianDayNumber += 1;\n // Algorithm from page 604 of the Explanatory Supplement to the\n // Astronomical Almanac (Seidelmann 1992).\n let L = julianDayNumber + 68569 | 0;\n const N = 4 * L / 146097 | 0;\n L = L - ((146097 * N + 3) / 4 | 0) | 0;\n const I = 4000 * (L + 1) / 1461001 | 0;\n L = L - (1461 * I / 4 | 0) + 31 | 0;\n const J = 80 * L / 2447 | 0;\n const day = L - (2447 * J / 80 | 0) | 0;\n L = J / 11 | 0;\n const month = J + 2 - 12 * L | 0;\n const year = 100 * (N - 49) + I + L | 0;\n let hour = secondsOfDay / (0, $e3d50c782acbaff1$export$2e2bcd8739ae039).SECONDS_PER_HOUR | 0;\n let remainingSeconds = secondsOfDay - hour * (0, $e3d50c782acbaff1$export$2e2bcd8739ae039).SECONDS_PER_HOUR;\n const minute = remainingSeconds / (0, $e3d50c782acbaff1$export$2e2bcd8739ae039).SECONDS_PER_MINUTE | 0;\n remainingSeconds = remainingSeconds - minute * (0, $e3d50c782acbaff1$export$2e2bcd8739ae039).SECONDS_PER_MINUTE;\n let second = remainingSeconds | 0;\n const millisecond = (remainingSeconds - second) / (0, $e3d50c782acbaff1$export$2e2bcd8739ae039).SECONDS_PER_MILLISECOND;\n // JulianDates are noon-based\n hour += 12;\n if (hour > 23) hour -= 24;\n //If we were on a leap second, add it back.\n if (isLeapSecond) second += 1;\n if (!(0, $jQJji.default)(result)) return new (0, $33ab1ce7e2935ae4$export$2e2bcd8739ae039)(year, month, day, hour, minute, second, millisecond, isLeapSecond);\n result.year = year;\n result.month = month;\n result.day = day;\n result.hour = hour;\n result.minute = minute;\n result.second = second;\n result.millisecond = millisecond;\n result.isLeapSecond = isLeapSecond;\n return result;\n};\n/**\n * Creates a JavaScript Date from the provided instance.\n * Since JavaScript dates are only accurate to the nearest millisecond and\n * cannot represent a leap second, consider using {@link JulianDate.toGregorianDate} instead.\n * If the provided JulianDate is during a leap second, the previous second is used.\n *\n * @param {JulianDate} julianDate The date to be converted.\n * @returns {Date} A new instance representing the provided date.\n */ $73b9691e04761700$var$JulianDate.toDate = function(julianDate) {\n //>>includeStart('debug', pragmas.debug);\n if (!(0, $jQJji.default)(julianDate)) throw new (0, $1vHsR.default)(\"julianDate is required.\");\n //>>includeEnd('debug');\n const gDate = $73b9691e04761700$var$JulianDate.toGregorianDate(julianDate, $73b9691e04761700$var$gregorianDateScratch);\n let second = gDate.second;\n if (gDate.isLeapSecond) second -= 1;\n return new Date(Date.UTC(gDate.year, gDate.month - 1, gDate.day, gDate.hour, gDate.minute, second, gDate.millisecond));\n};\n/**\n * Creates an ISO8601 representation of the provided date.\n *\n * @param {JulianDate} julianDate The date to be converted.\n * @param {number} [precision] The number of fractional digits used to represent the seconds component. By default, the most precise representation is used.\n * @returns {string} The ISO8601 representation of the provided date.\n */ $73b9691e04761700$var$JulianDate.toIso8601 = function(julianDate, precision) {\n //>>includeStart('debug', pragmas.debug);\n if (!(0, $jQJji.default)(julianDate)) throw new (0, $1vHsR.default)(\"julianDate is required.\");\n //>>includeEnd('debug');\n const gDate = $73b9691e04761700$var$JulianDate.toGregorianDate(julianDate, $73b9691e04761700$var$gregorianDateScratch);\n let year = gDate.year;\n let month = gDate.month;\n let day = gDate.day;\n let hour = gDate.hour;\n const minute = gDate.minute;\n const second = gDate.second;\n const millisecond = gDate.millisecond;\n // special case - Iso8601.MAXIMUM_VALUE produces a string which we can't parse unless we adjust.\n // 10000-01-01T00:00:00 is the same instant as 9999-12-31T24:00:00\n if (year === 10000 && month === 1 && day === 1 && hour === 0 && minute === 0 && second === 0 && millisecond === 0) {\n year = 9999;\n month = 12;\n day = 31;\n hour = 24;\n }\n let millisecondStr;\n if (!(0, $jQJji.default)(precision) && millisecond !== 0) {\n //Forces milliseconds into a number with at least 3 digits to whatever the default toString() precision is.\n millisecondStr = (millisecond * 0.01).toString().replace(\".\", \"\");\n return `${year.toString().padStart(4, \"0\")}-${month.toString().padStart(2, \"0\")}-${day.toString().padStart(2, \"0\")}T${hour.toString().padStart(2, \"0\")}:${minute.toString().padStart(2, \"0\")}:${second.toString().padStart(2, \"0\")}.${millisecondStr}Z`;\n }\n //Precision is either 0 or milliseconds is 0 with undefined precision, in either case, leave off milliseconds entirely\n if (!(0, $jQJji.default)(precision) || precision === 0) return `${year.toString().padStart(4, \"0\")}-${month.toString().padStart(2, \"0\")}-${day.toString().padStart(2, \"0\")}T${hour.toString().padStart(2, \"0\")}:${minute.toString().padStart(2, \"0\")}:${second.toString().padStart(2, \"0\")}Z`;\n //Forces milliseconds into a number with at least 3 digits to whatever the specified precision is.\n millisecondStr = (millisecond * 0.01).toFixed(precision).replace(\".\", \"\").slice(0, precision);\n return `${year.toString().padStart(4, \"0\")}-${month.toString().padStart(2, \"0\")}-${day.toString().padStart(2, \"0\")}T${hour.toString().padStart(2, \"0\")}:${minute.toString().padStart(2, \"0\")}:${second.toString().padStart(2, \"0\")}.${millisecondStr}Z`;\n};\n/**\n * Duplicates a JulianDate instance.\n *\n * @param {JulianDate} julianDate The date to duplicate.\n * @param {JulianDate} [result] An existing instance to use for the result.\n * @returns {JulianDate} The modified result parameter or a new instance if none was provided. Returns undefined if julianDate is undefined.\n */ $73b9691e04761700$var$JulianDate.clone = function(julianDate, result) {\n if (!(0, $jQJji.default)(julianDate)) return undefined;\n if (!(0, $jQJji.default)(result)) return new $73b9691e04761700$var$JulianDate(julianDate.dayNumber, julianDate.secondsOfDay, (0, $134462e760c5c083$export$2e2bcd8739ae039).TAI);\n result.dayNumber = julianDate.dayNumber;\n result.secondsOfDay = julianDate.secondsOfDay;\n return result;\n};\n/**\n * Compares two instances.\n *\n * @param {JulianDate} left The first instance.\n * @param {JulianDate} right The second instance.\n * @returns {number} A negative value if left is less than right, a positive value if left is greater than right, or zero if left and right are equal.\n */ $73b9691e04761700$var$JulianDate.compare = function(left, right) {\n //>>includeStart('debug', pragmas.debug);\n if (!(0, $jQJji.default)(left)) throw new (0, $1vHsR.default)(\"left is required.\");\n if (!(0, $jQJji.default)(right)) throw new (0, $1vHsR.default)(\"right is required.\");\n //>>includeEnd('debug');\n const julianDayNumberDifference = left.dayNumber - right.dayNumber;\n if (julianDayNumberDifference !== 0) return julianDayNumberDifference;\n return left.secondsOfDay - right.secondsOfDay;\n};\n/**\n * Compares two instances and returns true if they are equal, false otherwise.\n *\n * @param {JulianDate} [left] The first instance.\n * @param {JulianDate} [right] The second instance.\n * @returns {boolean} true if the dates are equal; otherwise, false.\n */ $73b9691e04761700$var$JulianDate.equals = function(left, right) {\n return left === right || (0, $jQJji.default)(left) && (0, $jQJji.default)(right) && left.dayNumber === right.dayNumber && left.secondsOfDay === right.secondsOfDay;\n};\n/**\n * Compares two instances and returns true if they are within epsilon seconds of\n * each other. That is, in order for the dates to be considered equal (and for\n * this function to return true), the absolute value of the difference between them, in\n * seconds, must be less than epsilon.\n *\n * @param {JulianDate} [left] The first instance.\n * @param {JulianDate} [right] The second instance.\n * @param {number} [epsilon=0] The maximum number of seconds that should separate the two instances.\n * @returns {boolean} true if the two dates are within epsilon seconds of each other; otherwise false.\n */ $73b9691e04761700$var$JulianDate.equalsEpsilon = function(left, right, epsilon) {\n epsilon = (0, $8w8ZH.default)(epsilon, 0);\n return left === right || (0, $jQJji.default)(left) && (0, $jQJji.default)(right) && Math.abs($73b9691e04761700$var$JulianDate.secondsDifference(left, right)) <= epsilon;\n};\n/**\n * Computes the total number of whole and fractional days represented by the provided instance.\n *\n * @param {JulianDate} julianDate The date.\n * @returns {number} The Julian date as single floating point number.\n */ $73b9691e04761700$var$JulianDate.totalDays = function(julianDate) {\n //>>includeStart('debug', pragmas.debug);\n if (!(0, $jQJji.default)(julianDate)) throw new (0, $1vHsR.default)(\"julianDate is required.\");\n //>>includeEnd('debug');\n return julianDate.dayNumber + julianDate.secondsOfDay / (0, $e3d50c782acbaff1$export$2e2bcd8739ae039).SECONDS_PER_DAY;\n};\n/**\n * Computes the difference in seconds between the provided instance.\n *\n * @param {JulianDate} left The first instance.\n * @param {JulianDate} right The second instance.\n * @returns {number} The difference, in seconds, when subtracting right from left.\n */ $73b9691e04761700$var$JulianDate.secondsDifference = function(left, right) {\n //>>includeStart('debug', pragmas.debug);\n if (!(0, $jQJji.default)(left)) throw new (0, $1vHsR.default)(\"left is required.\");\n if (!(0, $jQJji.default)(right)) throw new (0, $1vHsR.default)(\"right is required.\");\n //>>includeEnd('debug');\n const dayDifference = (left.dayNumber - right.dayNumber) * (0, $e3d50c782acbaff1$export$2e2bcd8739ae039).SECONDS_PER_DAY;\n return dayDifference + (left.secondsOfDay - right.secondsOfDay);\n};\n/**\n * Computes the difference in days between the provided instance.\n *\n * @param {JulianDate} left The first instance.\n * @param {JulianDate} right The second instance.\n * @returns {number} The difference, in days, when subtracting right from left.\n */ $73b9691e04761700$var$JulianDate.daysDifference = function(left, right) {\n //>>includeStart('debug', pragmas.debug);\n if (!(0, $jQJji.default)(left)) throw new (0, $1vHsR.default)(\"left is required.\");\n if (!(0, $jQJji.default)(right)) throw new (0, $1vHsR.default)(\"right is required.\");\n //>>includeEnd('debug');\n const dayDifference = left.dayNumber - right.dayNumber;\n const secondDifference = (left.secondsOfDay - right.secondsOfDay) / (0, $e3d50c782acbaff1$export$2e2bcd8739ae039).SECONDS_PER_DAY;\n return dayDifference + secondDifference;\n};\n/**\n * Computes the number of seconds the provided instance is ahead of UTC.\n *\n * @param {JulianDate} julianDate The date.\n * @returns {number} The number of seconds the provided instance is ahead of UTC\n */ $73b9691e04761700$var$JulianDate.computeTaiMinusUtc = function(julianDate) {\n $73b9691e04761700$var$binarySearchScratchLeapSecond.julianDate = julianDate;\n const leapSeconds = $73b9691e04761700$var$JulianDate.leapSeconds;\n let index = (0, $52c19b09ece4c63f$export$2e2bcd8739ae039)(leapSeconds, $73b9691e04761700$var$binarySearchScratchLeapSecond, $73b9691e04761700$var$compareLeapSecondDates);\n if (index < 0) {\n index = ~index;\n --index;\n if (index < 0) index = 0;\n }\n return leapSeconds[index].offset;\n};\n/**\n * Adds the provided number of seconds to the provided date instance.\n *\n * @param {JulianDate} julianDate The date.\n * @param {number} seconds The number of seconds to add or subtract.\n * @param {JulianDate} result An existing instance to use for the result.\n * @returns {JulianDate} The modified result parameter.\n */ $73b9691e04761700$var$JulianDate.addSeconds = function(julianDate, seconds, result) {\n //>>includeStart('debug', pragmas.debug);\n if (!(0, $jQJji.default)(julianDate)) throw new (0, $1vHsR.default)(\"julianDate is required.\");\n if (!(0, $jQJji.default)(seconds)) throw new (0, $1vHsR.default)(\"seconds is required.\");\n if (!(0, $jQJji.default)(result)) throw new (0, $1vHsR.default)(\"result is required.\");\n //>>includeEnd('debug');\n return $73b9691e04761700$var$setComponents(julianDate.dayNumber, julianDate.secondsOfDay + seconds, result);\n};\n/**\n * Adds the provided number of minutes to the provided date instance.\n *\n * @param {JulianDate} julianDate The date.\n * @param {number} minutes The number of minutes to add or subtract.\n * @param {JulianDate} result An existing instance to use for the result.\n * @returns {JulianDate} The modified result parameter.\n */ $73b9691e04761700$var$JulianDate.addMinutes = function(julianDate, minutes, result) {\n //>>includeStart('debug', pragmas.debug);\n if (!(0, $jQJji.default)(julianDate)) throw new (0, $1vHsR.default)(\"julianDate is required.\");\n if (!(0, $jQJji.default)(minutes)) throw new (0, $1vHsR.default)(\"minutes is required.\");\n if (!(0, $jQJji.default)(result)) throw new (0, $1vHsR.default)(\"result is required.\");\n //>>includeEnd('debug');\n const newSecondsOfDay = julianDate.secondsOfDay + minutes * (0, $e3d50c782acbaff1$export$2e2bcd8739ae039).SECONDS_PER_MINUTE;\n return $73b9691e04761700$var$setComponents(julianDate.dayNumber, newSecondsOfDay, result);\n};\n/**\n * Adds the provided number of hours to the provided date instance.\n *\n * @param {JulianDate} julianDate The date.\n * @param {number} hours The number of hours to add or subtract.\n * @param {JulianDate} result An existing instance to use for the result.\n * @returns {JulianDate} The modified result parameter.\n */ $73b9691e04761700$var$JulianDate.addHours = function(julianDate, hours, result) {\n //>>includeStart('debug', pragmas.debug);\n if (!(0, $jQJji.default)(julianDate)) throw new (0, $1vHsR.default)(\"julianDate is required.\");\n if (!(0, $jQJji.default)(hours)) throw new (0, $1vHsR.default)(\"hours is required.\");\n if (!(0, $jQJji.default)(result)) throw new (0, $1vHsR.default)(\"result is required.\");\n //>>includeEnd('debug');\n const newSecondsOfDay = julianDate.secondsOfDay + hours * (0, $e3d50c782acbaff1$export$2e2bcd8739ae039).SECONDS_PER_HOUR;\n return $73b9691e04761700$var$setComponents(julianDate.dayNumber, newSecondsOfDay, result);\n};\n/**\n * Adds the provided number of days to the provided date instance.\n *\n * @param {JulianDate} julianDate The date.\n * @param {number} days The number of days to add or subtract.\n * @param {JulianDate} result An existing instance to use for the result.\n * @returns {JulianDate} The modified result parameter.\n */ $73b9691e04761700$var$JulianDate.addDays = function(julianDate, days, result) {\n //>>includeStart('debug', pragmas.debug);\n if (!(0, $jQJji.default)(julianDate)) throw new (0, $1vHsR.default)(\"julianDate is required.\");\n if (!(0, $jQJji.default)(days)) throw new (0, $1vHsR.default)(\"days is required.\");\n if (!(0, $jQJji.default)(result)) throw new (0, $1vHsR.default)(\"result is required.\");\n //>>includeEnd('debug');\n const newJulianDayNumber = julianDate.dayNumber + days;\n return $73b9691e04761700$var$setComponents(newJulianDayNumber, julianDate.secondsOfDay, result);\n};\n/**\n * Compares the provided instances and returns true if left is earlier than right, false otherwise.\n *\n * @param {JulianDate} left The first instance.\n * @param {JulianDate} right The second instance.\n * @returns {boolean} true if left is earlier than right, false otherwise.\n */ $73b9691e04761700$var$JulianDate.lessThan = function(left, right) {\n return $73b9691e04761700$var$JulianDate.compare(left, right) < 0;\n};\n/**\n * Compares the provided instances and returns true if left is earlier than or equal to right, false otherwise.\n *\n * @param {JulianDate} left The first instance.\n * @param {JulianDate} right The second instance.\n * @returns {boolean} true if left is earlier than or equal to right, false otherwise.\n */ $73b9691e04761700$var$JulianDate.lessThanOrEquals = function(left, right) {\n return $73b9691e04761700$var$JulianDate.compare(left, right) <= 0;\n};\n/**\n * Compares the provided instances and returns true if left is later than right, false otherwise.\n *\n * @param {JulianDate} left The first instance.\n * @param {JulianDate} right The second instance.\n * @returns {boolean} true if left is later than right, false otherwise.\n */ $73b9691e04761700$var$JulianDate.greaterThan = function(left, right) {\n return $73b9691e04761700$var$JulianDate.compare(left, right) > 0;\n};\n/**\n * Compares the provided instances and returns true if left is later than or equal to right, false otherwise.\n *\n * @param {JulianDate} left The first instance.\n * @param {JulianDate} right The second instance.\n * @returns {boolean} true if left is later than or equal to right, false otherwise.\n */ $73b9691e04761700$var$JulianDate.greaterThanOrEquals = function(left, right) {\n return $73b9691e04761700$var$JulianDate.compare(left, right) >= 0;\n};\n/**\n * Duplicates this instance.\n *\n * @param {JulianDate} [result] An existing instance to use for the result.\n * @returns {JulianDate} The modified result parameter or a new instance if none was provided.\n */ $73b9691e04761700$var$JulianDate.prototype.clone = function(result) {\n return $73b9691e04761700$var$JulianDate.clone(this, result);\n};\n/**\n * Compares this and the provided instance and returns true if they are equal, false otherwise.\n *\n * @param {JulianDate} [right] The second instance.\n * @returns {boolean} true if the dates are equal; otherwise, false.\n */ $73b9691e04761700$var$JulianDate.prototype.equals = function(right) {\n return $73b9691e04761700$var$JulianDate.equals(this, right);\n};\n/**\n * Compares this and the provided instance and returns true if they are within epsilon seconds of\n * each other. That is, in order for the dates to be considered equal (and for\n * this function to return true), the absolute value of the difference between them, in\n * seconds, must be less than epsilon.\n *\n * @param {JulianDate} [right] The second instance.\n * @param {number} [epsilon=0] The maximum number of seconds that should separate the two instances.\n * @returns {boolean} true if the two dates are within epsilon seconds of each other; otherwise false.\n */ $73b9691e04761700$var$JulianDate.prototype.equalsEpsilon = function(right, epsilon) {\n return $73b9691e04761700$var$JulianDate.equalsEpsilon(this, right, epsilon);\n};\n/**\n * Creates a string representing this date in ISO8601 format.\n *\n * @returns {string} A string representing this date in ISO8601 format.\n */ $73b9691e04761700$var$JulianDate.prototype.toString = function() {\n return $73b9691e04761700$var$JulianDate.toIso8601(this);\n};\n/**\n * Gets or sets the list of leap seconds used throughout Cesium.\n * @memberof JulianDate\n * @type {LeapSecond[]}\n */ $73b9691e04761700$var$JulianDate.leapSeconds = [\n new (0, $97869fccaa735547$export$2e2bcd8739ae039)(new $73b9691e04761700$var$JulianDate(2441317, 43210.0, (0, $134462e760c5c083$export$2e2bcd8739ae039).TAI), 10),\n new (0, $97869fccaa735547$export$2e2bcd8739ae039)(new $73b9691e04761700$var$JulianDate(2441499, 43211.0, (0, $134462e760c5c083$export$2e2bcd8739ae039).TAI), 11),\n new (0, $97869fccaa735547$export$2e2bcd8739ae039)(new $73b9691e04761700$var$JulianDate(2441683, 43212.0, (0, $134462e760c5c083$export$2e2bcd8739ae039).TAI), 12),\n new (0, $97869fccaa735547$export$2e2bcd8739ae039)(new $73b9691e04761700$var$JulianDate(2442048, 43213.0, (0, $134462e760c5c083$export$2e2bcd8739ae039).TAI), 13),\n new (0, $97869fccaa735547$export$2e2bcd8739ae039)(new $73b9691e04761700$var$JulianDate(2442413, 43214.0, (0, $134462e760c5c083$export$2e2bcd8739ae039).TAI), 14),\n new (0, $97869fccaa735547$export$2e2bcd8739ae039)(new $73b9691e04761700$var$JulianDate(2442778, 43215.0, (0, $134462e760c5c083$export$2e2bcd8739ae039).TAI), 15),\n new (0, $97869fccaa735547$export$2e2bcd8739ae039)(new $73b9691e04761700$var$JulianDate(2443144, 43216.0, (0, $134462e760c5c083$export$2e2bcd8739ae039).TAI), 16),\n new (0, $97869fccaa735547$export$2e2bcd8739ae039)(new $73b9691e04761700$var$JulianDate(2443509, 43217.0, (0, $134462e760c5c083$export$2e2bcd8739ae039).TAI), 17),\n new (0, $97869fccaa735547$export$2e2bcd8739ae039)(new $73b9691e04761700$var$JulianDate(2443874, 43218.0, (0, $134462e760c5c083$export$2e2bcd8739ae039).TAI), 18),\n new (0, $97869fccaa735547$export$2e2bcd8739ae039)(new $73b9691e04761700$var$JulianDate(2444239, 43219.0, (0, $134462e760c5c083$export$2e2bcd8739ae039).TAI), 19),\n new (0, $97869fccaa735547$export$2e2bcd8739ae039)(new $73b9691e04761700$var$JulianDate(2444786, 43220.0, (0, $134462e760c5c083$export$2e2bcd8739ae039).TAI), 20),\n new (0, $97869fccaa735547$export$2e2bcd8739ae039)(new $73b9691e04761700$var$JulianDate(2445151, 43221.0, (0, $134462e760c5c083$export$2e2bcd8739ae039).TAI), 21),\n new (0, $97869fccaa735547$export$2e2bcd8739ae039)(new $73b9691e04761700$var$JulianDate(2445516, 43222.0, (0, $134462e760c5c083$export$2e2bcd8739ae039).TAI), 22),\n new (0, $97869fccaa735547$export$2e2bcd8739ae039)(new $73b9691e04761700$var$JulianDate(2446247, 43223.0, (0, $134462e760c5c083$export$2e2bcd8739ae039).TAI), 23),\n new (0, $97869fccaa735547$export$2e2bcd8739ae039)(new $73b9691e04761700$var$JulianDate(2447161, 43224.0, (0, $134462e760c5c083$export$2e2bcd8739ae039).TAI), 24),\n new (0, $97869fccaa735547$export$2e2bcd8739ae039)(new $73b9691e04761700$var$JulianDate(2447892, 43225.0, (0, $134462e760c5c083$export$2e2bcd8739ae039).TAI), 25),\n new (0, $97869fccaa735547$export$2e2bcd8739ae039)(new $73b9691e04761700$var$JulianDate(2448257, 43226.0, (0, $134462e760c5c083$export$2e2bcd8739ae039).TAI), 26),\n new (0, $97869fccaa735547$export$2e2bcd8739ae039)(new $73b9691e04761700$var$JulianDate(2448804, 43227.0, (0, $134462e760c5c083$export$2e2bcd8739ae039).TAI), 27),\n new (0, $97869fccaa735547$export$2e2bcd8739ae039)(new $73b9691e04761700$var$JulianDate(2449169, 43228.0, (0, $134462e760c5c083$export$2e2bcd8739ae039).TAI), 28),\n new (0, $97869fccaa735547$export$2e2bcd8739ae039)(new $73b9691e04761700$var$JulianDate(2449534, 43229.0, (0, $134462e760c5c083$export$2e2bcd8739ae039).TAI), 29),\n new (0, $97869fccaa735547$export$2e2bcd8739ae039)(new $73b9691e04761700$var$JulianDate(2450083, 43230.0, (0, $134462e760c5c083$export$2e2bcd8739ae039).TAI), 30),\n new (0, $97869fccaa735547$export$2e2bcd8739ae039)(new $73b9691e04761700$var$JulianDate(2450630, 43231.0, (0, $134462e760c5c083$export$2e2bcd8739ae039).TAI), 31),\n new (0, $97869fccaa735547$export$2e2bcd8739ae039)(new $73b9691e04761700$var$JulianDate(2451179, 43232.0, (0, $134462e760c5c083$export$2e2bcd8739ae039).TAI), 32),\n new (0, $97869fccaa735547$export$2e2bcd8739ae039)(new $73b9691e04761700$var$JulianDate(2453736, 43233.0, (0, $134462e760c5c083$export$2e2bcd8739ae039).TAI), 33),\n new (0, $97869fccaa735547$export$2e2bcd8739ae039)(new $73b9691e04761700$var$JulianDate(2454832, 43234.0, (0, $134462e760c5c083$export$2e2bcd8739ae039).TAI), 34),\n new (0, $97869fccaa735547$export$2e2bcd8739ae039)(new $73b9691e04761700$var$JulianDate(2456109, 43235.0, (0, $134462e760c5c083$export$2e2bcd8739ae039).TAI), 35),\n new (0, $97869fccaa735547$export$2e2bcd8739ae039)(new $73b9691e04761700$var$JulianDate(2457204, 43236.0, (0, $134462e760c5c083$export$2e2bcd8739ae039).TAI), 36),\n new (0, $97869fccaa735547$export$2e2bcd8739ae039)(new $73b9691e04761700$var$JulianDate(2457754, 43237.0, (0, $134462e760c5c083$export$2e2bcd8739ae039).TAI), 37)\n];\nvar $73b9691e04761700$export$2e2bcd8739ae039 = $73b9691e04761700$var$JulianDate;\n\n\n\nvar $f3b7c43a7f0c8e85$exports = {};\n\n\n\n/*!\n * URI.js - Mutating URLs\n *\n * Version: 1.19.11\n *\n * Author: Rodney Rehm\n * Web: http://medialize.github.io/URI.js/\n *\n * Licensed under\n * MIT License http://www.opensource.org/licenses/mit-license\n *\n */ (function(root, factory) {\n \"use strict\";\n // https://github.com/umdjs/umd/blob/master/returnExports.js\n if (0, $f3b7c43a7f0c8e85$exports) // Node\n $f3b7c43a7f0c8e85$exports = factory((parcelRequire(\"3hCk4\")), (parcelRequire(\"2Nl4L\")), (parcelRequire(\"3PMOQ\")));\n else if (typeof define === \"function\" && define.amd) // AMD. Register as an anonymous module.\n define([\n \"./punycode\",\n \"./IPv6\",\n \"./SecondLevelDomains\"\n ], factory);\n else // Browser globals (root is window)\n root.URI = factory(root.punycode, root.IPv6, root.SecondLevelDomains, root);\n})($f3b7c43a7f0c8e85$exports, function(punycode, IPv6, SLD, root) {\n \"use strict\";\n /*global location, escape, unescape */ // FIXME: v2.0.0 renamce non-camelCase properties to uppercase\n /*jshint camelcase: false */ // save current URI variable, if any\n var _URI = root && root.URI;\n function URI(url, base) {\n var _urlSupplied = arguments.length >= 1;\n var _baseSupplied = arguments.length >= 2;\n // Allow instantiation without the 'new' keyword\n if (!(this instanceof URI)) {\n if (_urlSupplied) {\n if (_baseSupplied) return new URI(url, base);\n return new URI(url);\n }\n return new URI();\n }\n if (url === undefined) {\n if (_urlSupplied) throw new TypeError(\"undefined is not a valid argument for URI\");\n if (typeof location !== \"undefined\") url = location.href + \"\";\n else url = \"\";\n }\n if (url === null) {\n if (_urlSupplied) throw new TypeError(\"null is not a valid argument for URI\");\n }\n this.href(url);\n // resolve to base according to http://dvcs.w3.org/hg/url/raw-file/tip/Overview.html#constructor\n if (base !== undefined) return this.absoluteTo(base);\n return this;\n }\n function isInteger(value) {\n return /^[0-9]+$/.test(value);\n }\n URI.version = \"1.19.11\";\n var p = URI.prototype;\n var hasOwn = Object.prototype.hasOwnProperty;\n function escapeRegEx(string) {\n // https://github.com/medialize/URI.js/commit/85ac21783c11f8ccab06106dba9735a31a86924d#commitcomment-821963\n return string.replace(/([.*+?^=!:${}()|[\\]\\/\\\\])/g, \"\\\\$1\");\n }\n function getType(value) {\n // IE8 doesn't return [Object Undefined] but [Object Object] for undefined value\n if (value === undefined) return \"Undefined\";\n return String(Object.prototype.toString.call(value)).slice(8, -1);\n }\n function isArray(obj) {\n return getType(obj) === \"Array\";\n }\n function filterArrayValues(data, value) {\n var lookup = {};\n var i, length;\n if (getType(value) === \"RegExp\") lookup = null;\n else if (isArray(value)) for(i = 0, length = value.length; i < length; i++)lookup[value[i]] = true;\n else lookup[value] = true;\n for(i = 0, length = data.length; i < length; i++){\n /*jshint laxbreak: true */ var _match = lookup && lookup[data[i]] !== undefined || !lookup && value.test(data[i]);\n /*jshint laxbreak: false */ if (_match) {\n data.splice(i, 1);\n length--;\n i--;\n }\n }\n return data;\n }\n function arrayContains(list, value) {\n var i, length;\n // value may be string, number, array, regexp\n if (isArray(value)) {\n // Note: this can be optimized to O(n) (instead of current O(m * n))\n for(i = 0, length = value.length; i < length; i++){\n if (!arrayContains(list, value[i])) return false;\n }\n return true;\n }\n var _type = getType(value);\n for(i = 0, length = list.length; i < length; i++){\n if (_type === \"RegExp\") {\n if (typeof list[i] === \"string\" && list[i].match(value)) return true;\n } else if (list[i] === value) return true;\n }\n return false;\n }\n function arraysEqual(one, two) {\n if (!isArray(one) || !isArray(two)) return false;\n // arrays can't be equal if they have different amount of content\n if (one.length !== two.length) return false;\n one.sort();\n two.sort();\n for(var i = 0, l = one.length; i < l; i++){\n if (one[i] !== two[i]) return false;\n }\n return true;\n }\n function trimSlashes(text) {\n var trim_expression = /^\\/+|\\/+$/g;\n return text.replace(trim_expression, \"\");\n }\n URI._parts = function() {\n return {\n protocol: null,\n username: null,\n password: null,\n hostname: null,\n urn: null,\n port: null,\n path: null,\n query: null,\n fragment: null,\n // state\n preventInvalidHostname: URI.preventInvalidHostname,\n duplicateQueryParameters: URI.duplicateQueryParameters,\n escapeQuerySpace: URI.escapeQuerySpace\n };\n };\n // state: throw on invalid hostname\n // see https://github.com/medialize/URI.js/pull/345\n // and https://github.com/medialize/URI.js/issues/354\n URI.preventInvalidHostname = false;\n // state: allow duplicate query parameters (a=1&a=1)\n URI.duplicateQueryParameters = false;\n // state: replaces + with %20 (space in query strings)\n URI.escapeQuerySpace = true;\n // static properties\n URI.protocol_expression = /^[a-z][a-z0-9.+-]*$/i;\n URI.idn_expression = /[^a-z0-9\\._-]/i;\n URI.punycode_expression = /(xn--)/i;\n // well, 333.444.555.666 matches, but it sure ain't no IPv4 - do we care?\n URI.ip4_expression = /^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$/;\n // credits to Rich Brown\n // source: http://forums.intermapper.com/viewtopic.php?p=1096#1096\n // specification: http://www.ietf.org/rfc/rfc4291.txt\n URI.ip6_expression = /^\\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$/;\n // expression used is \"gruber revised\" (@gruber v2) determined to be the\n // best solution in a regex-golf we did a couple of ages ago at\n // * http://mathiasbynens.be/demo/url-regex\n // * http://rodneyrehm.de/t/url-regex.html\n URI.find_uri_expression = /\\b((?:[a-z][\\w-]+:(?:\\/{1,3}|[a-z0-9%])|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}\\/)(?:[^\\s()<>]+|\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\))+(?:\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\)|[^\\s`!()\\[\\]{};:'\".,<>?«»“”‘’]))/ig;\n URI.findUri = {\n // valid \"scheme://\" or \"www.\"\n start: /\\b(?:([a-z][a-z0-9.+-]*:\\/\\/)|www\\.)/gi,\n // everything up to the next whitespace\n end: /[\\s\\r\\n]|$/,\n // trim trailing punctuation captured by end RegExp\n trim: /[`!()\\[\\]{};:'\".,<>?«»“”„‘’]+$/,\n // balanced parens inclusion (), [], {}, <>\n parens: /(\\([^\\)]*\\)|\\[[^\\]]*\\]|\\{[^}]*\\}|<[^>]*>)/g\n };\n URI.leading_whitespace_expression = /^[\\x00-\\x20\\u00a0\\u1680\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000\\ufeff]+/;\n // https://infra.spec.whatwg.org/#ascii-tab-or-newline\n URI.ascii_tab_whitespace = /[\\u0009\\u000A\\u000D]+/g;\n // http://www.iana.org/assignments/uri-schemes.html\n // http://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers#Well-known_ports\n URI.defaultPorts = {\n http: \"80\",\n https: \"443\",\n ftp: \"21\",\n gopher: \"70\",\n ws: \"80\",\n wss: \"443\"\n };\n // list of protocols which always require a hostname\n URI.hostProtocols = [\n \"http\",\n \"https\"\n ];\n // allowed hostname characters according to RFC 3986\n // ALPHA DIGIT \"-\" \".\" \"_\" \"~\" \"!\" \"$\" \"&\" \"'\" \"(\" \")\" \"*\" \"+\" \",\" \";\" \"=\" %encoded\n // I've never seen a (non-IDN) hostname other than: ALPHA DIGIT . - _\n URI.invalid_hostname_characters = /[^a-zA-Z0-9\\.\\-:_]/;\n // map DOM Elements to their URI attribute\n URI.domAttributes = {\n \"a\": \"href\",\n \"blockquote\": \"cite\",\n \"link\": \"href\",\n \"base\": \"href\",\n \"script\": \"src\",\n \"form\": \"action\",\n \"img\": \"src\",\n \"area\": \"href\",\n \"iframe\": \"src\",\n \"embed\": \"src\",\n \"source\": \"src\",\n \"track\": \"src\",\n \"input\": \"src\",\n \"audio\": \"src\",\n \"video\": \"src\"\n };\n URI.getDomAttribute = function(node) {\n if (!node || !node.nodeName) return undefined;\n var nodeName = node.nodeName.toLowerCase();\n // should only expose src for type=\"image\"\n if (nodeName === \"input\" && node.type !== \"image\") return undefined;\n return URI.domAttributes[nodeName];\n };\n function escapeForDumbFirefox36(value) {\n // https://github.com/medialize/URI.js/issues/91\n return escape(value);\n }\n // encoding / decoding according to RFC3986\n function strictEncodeURIComponent(string) {\n // see https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/encodeURIComponent\n return encodeURIComponent(string).replace(/[!'()*]/g, escapeForDumbFirefox36).replace(/\\*/g, \"%2A\");\n }\n URI.encode = strictEncodeURIComponent;\n URI.decode = decodeURIComponent;\n URI.iso8859 = function() {\n URI.encode = escape;\n URI.decode = unescape;\n };\n URI.unicode = function() {\n URI.encode = strictEncodeURIComponent;\n URI.decode = decodeURIComponent;\n };\n URI.characters = {\n pathname: {\n encode: {\n // RFC3986 2.1: For consistency, URI producers and normalizers should\n // use uppercase hexadecimal digits for all percent-encodings.\n expression: /%(24|26|2B|2C|3B|3D|3A|40)/ig,\n map: {\n // -._~!'()*\n \"%24\": \"$\",\n \"%26\": \"&\",\n \"%2B\": \"+\",\n \"%2C\": \",\",\n \"%3B\": \";\",\n \"%3D\": \"=\",\n \"%3A\": \":\",\n \"%40\": \"@\"\n }\n },\n decode: {\n expression: /[\\/\\?#]/g,\n map: {\n \"/\": \"%2F\",\n \"?\": \"%3F\",\n \"#\": \"%23\"\n }\n }\n },\n reserved: {\n encode: {\n // RFC3986 2.1: For consistency, URI producers and normalizers should\n // use uppercase hexadecimal digits for all percent-encodings.\n expression: /%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/ig,\n map: {\n // gen-delims\n \"%3A\": \":\",\n \"%2F\": \"/\",\n \"%3F\": \"?\",\n \"%23\": \"#\",\n \"%5B\": \"[\",\n \"%5D\": \"]\",\n \"%40\": \"@\",\n // sub-delims\n \"%21\": \"!\",\n \"%24\": \"$\",\n \"%26\": \"&\",\n \"%27\": \"'\",\n \"%28\": \"(\",\n \"%29\": \")\",\n \"%2A\": \"*\",\n \"%2B\": \"+\",\n \"%2C\": \",\",\n \"%3B\": \";\",\n \"%3D\": \"=\"\n }\n }\n },\n urnpath: {\n // The characters under `encode` are the characters called out by RFC 2141 as being acceptable\n // for usage in a URN. RFC2141 also calls out \"-\", \".\", and \"_\" as acceptable characters, but\n // these aren't encoded by encodeURIComponent, so we don't have to call them out here. Also\n // note that the colon character is not featured in the encoding map; this is because URI.js\n // gives the colons in URNs semantic meaning as the delimiters of path segements, and so it\n // should not appear unencoded in a segment itself.\n // See also the note above about RFC3986 and capitalalized hex digits.\n encode: {\n expression: /%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/ig,\n map: {\n \"%21\": \"!\",\n \"%24\": \"$\",\n \"%27\": \"'\",\n \"%28\": \"(\",\n \"%29\": \")\",\n \"%2A\": \"*\",\n \"%2B\": \"+\",\n \"%2C\": \",\",\n \"%3B\": \";\",\n \"%3D\": \"=\",\n \"%40\": \"@\"\n }\n },\n // These characters are the characters called out by RFC2141 as \"reserved\" characters that\n // should never appear in a URN, plus the colon character (see note above).\n decode: {\n expression: /[\\/\\?#:]/g,\n map: {\n \"/\": \"%2F\",\n \"?\": \"%3F\",\n \"#\": \"%23\",\n \":\": \"%3A\"\n }\n }\n }\n };\n URI.encodeQuery = function(string, escapeQuerySpace) {\n var escaped = URI.encode(string + \"\");\n if (escapeQuerySpace === undefined) escapeQuerySpace = URI.escapeQuerySpace;\n return escapeQuerySpace ? escaped.replace(/%20/g, \"+\") : escaped;\n };\n URI.decodeQuery = function(string, escapeQuerySpace) {\n string += \"\";\n if (escapeQuerySpace === undefined) escapeQuerySpace = URI.escapeQuerySpace;\n try {\n return URI.decode(escapeQuerySpace ? string.replace(/\\+/g, \"%20\") : string);\n } catch (e) {\n // we're not going to mess with weird encodings,\n // give up and return the undecoded original string\n // see https://github.com/medialize/URI.js/issues/87\n // see https://github.com/medialize/URI.js/issues/92\n return string;\n }\n };\n // generate encode/decode path functions\n var _parts = {\n \"encode\": \"encode\",\n \"decode\": \"decode\"\n };\n var _part;\n var generateAccessor = function(_group, _part) {\n return function(string) {\n try {\n return URI[_part](string + \"\").replace(URI.characters[_group][_part].expression, function(c) {\n return URI.characters[_group][_part].map[c];\n });\n } catch (e) {\n // we're not going to mess with weird encodings,\n // give up and return the undecoded original string\n // see https://github.com/medialize/URI.js/issues/87\n // see https://github.com/medialize/URI.js/issues/92\n return string;\n }\n };\n };\n for(_part in _parts){\n URI[_part + \"PathSegment\"] = generateAccessor(\"pathname\", _parts[_part]);\n URI[_part + \"UrnPathSegment\"] = generateAccessor(\"urnpath\", _parts[_part]);\n }\n var generateSegmentedPathFunction = function(_sep, _codingFuncName, _innerCodingFuncName) {\n return function(string) {\n // Why pass in names of functions, rather than the function objects themselves? The\n // definitions of some functions (but in particular, URI.decode) will occasionally change due\n // to URI.js having ISO8859 and Unicode modes. Passing in the name and getting it will ensure\n // that the functions we use here are \"fresh\".\n var actualCodingFunc;\n if (!_innerCodingFuncName) actualCodingFunc = URI[_codingFuncName];\n else actualCodingFunc = function(string) {\n return URI[_codingFuncName](URI[_innerCodingFuncName](string));\n };\n var segments = (string + \"\").split(_sep);\n for(var i = 0, length = segments.length; i < length; i++)segments[i] = actualCodingFunc(segments[i]);\n return segments.join(_sep);\n };\n };\n // This takes place outside the above loop because we don't want, e.g., encodeUrnPath functions.\n URI.decodePath = generateSegmentedPathFunction(\"/\", \"decodePathSegment\");\n URI.decodeUrnPath = generateSegmentedPathFunction(\":\", \"decodeUrnPathSegment\");\n URI.recodePath = generateSegmentedPathFunction(\"/\", \"encodePathSegment\", \"decode\");\n URI.recodeUrnPath = generateSegmentedPathFunction(\":\", \"encodeUrnPathSegment\", \"decode\");\n URI.encodeReserved = generateAccessor(\"reserved\", \"encode\");\n URI.parse = function(string, parts) {\n var pos;\n if (!parts) parts = {\n preventInvalidHostname: URI.preventInvalidHostname\n };\n string = string.replace(URI.leading_whitespace_expression, \"\");\n // https://infra.spec.whatwg.org/#ascii-tab-or-newline\n string = string.replace(URI.ascii_tab_whitespace, \"\");\n // [protocol\"://\"[username[\":\"password]\"@\"]hostname[\":\"port]\"/\"?][path][\"?\"querystring][\"#\"fragment]\n // extract fragment\n pos = string.indexOf(\"#\");\n if (pos > -1) {\n // escaping?\n parts.fragment = string.substring(pos + 1) || null;\n string = string.substring(0, pos);\n }\n // extract query\n pos = string.indexOf(\"?\");\n if (pos > -1) {\n // escaping?\n parts.query = string.substring(pos + 1) || null;\n string = string.substring(0, pos);\n }\n // slashes and backslashes have lost all meaning for the web protocols (https, http, wss, ws)\n string = string.replace(/^(https?|ftp|wss?)?:+[/\\\\]*/i, \"$1://\");\n // slashes and backslashes have lost all meaning for scheme relative URLs\n string = string.replace(/^[/\\\\]{2,}/i, \"//\");\n // extract protocol\n if (string.substring(0, 2) === \"//\") {\n // relative-scheme\n parts.protocol = null;\n string = string.substring(2);\n // extract \"user:pass@host:port\"\n string = URI.parseAuthority(string, parts);\n } else {\n pos = string.indexOf(\":\");\n if (pos > -1) {\n parts.protocol = string.substring(0, pos) || null;\n if (parts.protocol && !parts.protocol.match(URI.protocol_expression)) // : may be within the path\n parts.protocol = undefined;\n else if (string.substring(pos + 1, pos + 3).replace(/\\\\/g, \"/\") === \"//\") {\n string = string.substring(pos + 3);\n // extract \"user:pass@host:port\"\n string = URI.parseAuthority(string, parts);\n } else {\n string = string.substring(pos + 1);\n parts.urn = true;\n }\n }\n }\n // what's left must be the path\n parts.path = string;\n // and we're done\n return parts;\n };\n URI.parseHost = function(string, parts) {\n if (!string) string = \"\";\n // Copy chrome, IE, opera backslash-handling behavior.\n // Back slashes before the query string get converted to forward slashes\n // See: https://github.com/joyent/node/blob/386fd24f49b0e9d1a8a076592a404168faeecc34/lib/url.js#L115-L124\n // See: https://code.google.com/p/chromium/issues/detail?id=25916\n // https://github.com/medialize/URI.js/pull/233\n string = string.replace(/\\\\/g, \"/\");\n // extract host:port\n var pos = string.indexOf(\"/\");\n var bracketPos;\n var t;\n if (pos === -1) pos = string.length;\n if (string.charAt(0) === \"[\") {\n // IPv6 host - http://tools.ietf.org/html/draft-ietf-6man-text-addr-representation-04#section-6\n // I claim most client software breaks on IPv6 anyways. To simplify things, URI only accepts\n // IPv6+port in the format [2001:db8::1]:80 (for the time being)\n bracketPos = string.indexOf(\"]\");\n parts.hostname = string.substring(1, bracketPos) || null;\n parts.port = string.substring(bracketPos + 2, pos) || null;\n if (parts.port === \"/\") parts.port = null;\n } else {\n var firstColon = string.indexOf(\":\");\n var firstSlash = string.indexOf(\"/\");\n var nextColon = string.indexOf(\":\", firstColon + 1);\n if (nextColon !== -1 && (firstSlash === -1 || nextColon < firstSlash)) {\n // IPv6 host contains multiple colons - but no port\n // this notation is actually not allowed by RFC 3986, but we're a liberal parser\n parts.hostname = string.substring(0, pos) || null;\n parts.port = null;\n } else {\n t = string.substring(0, pos).split(\":\");\n parts.hostname = t[0] || null;\n parts.port = t[1] || null;\n }\n }\n if (parts.hostname && string.substring(pos).charAt(0) !== \"/\") {\n pos++;\n string = \"/\" + string;\n }\n if (parts.preventInvalidHostname) URI.ensureValidHostname(parts.hostname, parts.protocol);\n if (parts.port) URI.ensureValidPort(parts.port);\n return string.substring(pos) || \"/\";\n };\n URI.parseAuthority = function(string, parts) {\n string = URI.parseUserinfo(string, parts);\n return URI.parseHost(string, parts);\n };\n URI.parseUserinfo = function(string, parts) {\n // extract username:password\n var _string = string;\n var firstBackSlash = string.indexOf(\"\\\\\");\n if (firstBackSlash !== -1) string = string.replace(/\\\\/g, \"/\");\n var firstSlash = string.indexOf(\"/\");\n var pos = string.lastIndexOf(\"@\", firstSlash > -1 ? firstSlash : string.length - 1);\n var t;\n // authority@ must come before /path or \\path\n if (pos > -1 && (firstSlash === -1 || pos < firstSlash)) {\n t = string.substring(0, pos).split(\":\");\n parts.username = t[0] ? URI.decode(t[0]) : null;\n t.shift();\n parts.password = t[0] ? URI.decode(t.join(\":\")) : null;\n string = _string.substring(pos + 1);\n } else {\n parts.username = null;\n parts.password = null;\n }\n return string;\n };\n URI.parseQuery = function(string, escapeQuerySpace) {\n if (!string) return {};\n // throw out the funky business - \"?\"[name\"=\"value\"&\"]+\n string = string.replace(/&+/g, \"&\").replace(/^\\?*&*|&+$/g, \"\");\n if (!string) return {};\n var items = {};\n var splits = string.split(\"&\");\n var length = splits.length;\n var v, name, value;\n for(var i = 0; i < length; i++){\n v = splits[i].split(\"=\");\n name = URI.decodeQuery(v.shift(), escapeQuerySpace);\n // no \"=\" is null according to http://dvcs.w3.org/hg/url/raw-file/tip/Overview.html#collect-url-parameters\n value = v.length ? URI.decodeQuery(v.join(\"=\"), escapeQuerySpace) : null;\n if (name === \"__proto__\") continue;\n else if (hasOwn.call(items, name)) {\n if (typeof items[name] === \"string\" || items[name] === null) items[name] = [\n items[name]\n ];\n items[name].push(value);\n } else items[name] = value;\n }\n return items;\n };\n URI.build = function(parts) {\n var t = \"\";\n var requireAbsolutePath = false;\n if (parts.protocol) t += parts.protocol + \":\";\n if (!parts.urn && (t || parts.hostname)) {\n t += \"//\";\n requireAbsolutePath = true;\n }\n t += URI.buildAuthority(parts) || \"\";\n if (typeof parts.path === \"string\") {\n if (parts.path.charAt(0) !== \"/\" && requireAbsolutePath) t += \"/\";\n t += parts.path;\n }\n if (typeof parts.query === \"string\" && parts.query) t += \"?\" + parts.query;\n if (typeof parts.fragment === \"string\" && parts.fragment) t += \"#\" + parts.fragment;\n return t;\n };\n URI.buildHost = function(parts) {\n var t = \"\";\n if (!parts.hostname) return \"\";\n else if (URI.ip6_expression.test(parts.hostname)) t += \"[\" + parts.hostname + \"]\";\n else t += parts.hostname;\n if (parts.port) t += \":\" + parts.port;\n return t;\n };\n URI.buildAuthority = function(parts) {\n return URI.buildUserinfo(parts) + URI.buildHost(parts);\n };\n URI.buildUserinfo = function(parts) {\n var t = \"\";\n if (parts.username) t += URI.encode(parts.username);\n if (parts.password) t += \":\" + URI.encode(parts.password);\n if (t) t += \"@\";\n return t;\n };\n URI.buildQuery = function(data, duplicateQueryParameters, escapeQuerySpace) {\n // according to http://tools.ietf.org/html/rfc3986 or http://labs.apache.org/webarch/uri/rfc/rfc3986.html\n // being »-._~!$&'()*+,;=:@/?« %HEX and alnum are allowed\n // the RFC explicitly states ?/foo being a valid use case, no mention of parameter syntax!\n // URI.js treats the query string as being application/x-www-form-urlencoded\n // see http://www.w3.org/TR/REC-html40/interact/forms.html#form-content-type\n var t = \"\";\n var unique, key, i, length;\n for(key in data){\n if (key === \"__proto__\") continue;\n else if (hasOwn.call(data, key)) {\n if (isArray(data[key])) {\n unique = {};\n for(i = 0, length = data[key].length; i < length; i++)if (data[key][i] !== undefined && unique[data[key][i] + \"\"] === undefined) {\n t += \"&\" + URI.buildQueryParameter(key, data[key][i], escapeQuerySpace);\n if (duplicateQueryParameters !== true) unique[data[key][i] + \"\"] = true;\n }\n } else if (data[key] !== undefined) t += \"&\" + URI.buildQueryParameter(key, data[key], escapeQuerySpace);\n }\n }\n return t.substring(1);\n };\n URI.buildQueryParameter = function(name, value, escapeQuerySpace) {\n // http://www.w3.org/TR/REC-html40/interact/forms.html#form-content-type -- application/x-www-form-urlencoded\n // don't append \"=\" for null values, according to http://dvcs.w3.org/hg/url/raw-file/tip/Overview.html#url-parameter-serialization\n return URI.encodeQuery(name, escapeQuerySpace) + (value !== null ? \"=\" + URI.encodeQuery(value, escapeQuerySpace) : \"\");\n };\n URI.addQuery = function(data, name, value) {\n if (typeof name === \"object\") {\n for(var key in name)if (hasOwn.call(name, key)) URI.addQuery(data, key, name[key]);\n } else if (typeof name === \"string\") {\n if (data[name] === undefined) {\n data[name] = value;\n return;\n } else if (typeof data[name] === \"string\") data[name] = [\n data[name]\n ];\n if (!isArray(value)) value = [\n value\n ];\n data[name] = (data[name] || []).concat(value);\n } else throw new TypeError(\"URI.addQuery() accepts an object, string as the name parameter\");\n };\n URI.setQuery = function(data, name, value) {\n if (typeof name === \"object\") {\n for(var key in name)if (hasOwn.call(name, key)) URI.setQuery(data, key, name[key]);\n } else if (typeof name === \"string\") data[name] = value === undefined ? null : value;\n else throw new TypeError(\"URI.setQuery() accepts an object, string as the name parameter\");\n };\n URI.removeQuery = function(data, name, value) {\n var i, length, key;\n if (isArray(name)) for(i = 0, length = name.length; i < length; i++)data[name[i]] = undefined;\n else if (getType(name) === \"RegExp\") {\n for(key in data)if (name.test(key)) data[key] = undefined;\n } else if (typeof name === \"object\") {\n for(key in name)if (hasOwn.call(name, key)) URI.removeQuery(data, key, name[key]);\n } else if (typeof name === \"string\") {\n if (value !== undefined) {\n if (getType(value) === \"RegExp\") {\n if (!isArray(data[name]) && value.test(data[name])) data[name] = undefined;\n else data[name] = filterArrayValues(data[name], value);\n } else if (data[name] === String(value) && (!isArray(value) || value.length === 1)) data[name] = undefined;\n else if (isArray(data[name])) data[name] = filterArrayValues(data[name], value);\n } else data[name] = undefined;\n } else throw new TypeError(\"URI.removeQuery() accepts an object, string, RegExp as the first parameter\");\n };\n URI.hasQuery = function(data, name, value, withinArray) {\n switch(getType(name)){\n case \"String\":\n break;\n case \"RegExp\":\n for(var key in data)if (hasOwn.call(data, key)) {\n if (name.test(key) && (value === undefined || URI.hasQuery(data, key, value))) return true;\n }\n return false;\n case \"Object\":\n for(var _key in name)if (hasOwn.call(name, _key)) {\n if (!URI.hasQuery(data, _key, name[_key])) return false;\n }\n return true;\n default:\n throw new TypeError(\"URI.hasQuery() accepts a string, regular expression or object as the name parameter\");\n }\n switch(getType(value)){\n case \"Undefined\":\n // true if exists (but may be empty)\n return name in data; // data[name] !== undefined;\n case \"Boolean\":\n // true if exists and non-empty\n var _booly = Boolean(isArray(data[name]) ? data[name].length : data[name]);\n return value === _booly;\n case \"Function\":\n // allow complex comparison\n return !!value(data[name], name, data);\n case \"Array\":\n if (!isArray(data[name])) return false;\n var op = withinArray ? arrayContains : arraysEqual;\n return op(data[name], value);\n case \"RegExp\":\n if (!isArray(data[name])) return Boolean(data[name] && data[name].match(value));\n if (!withinArray) return false;\n return arrayContains(data[name], value);\n case \"Number\":\n value = String(value);\n /* falls through */ case \"String\":\n if (!isArray(data[name])) return data[name] === value;\n if (!withinArray) return false;\n return arrayContains(data[name], value);\n default:\n throw new TypeError(\"URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter\");\n }\n };\n URI.joinPaths = function() {\n var input = [];\n var segments = [];\n var nonEmptySegments = 0;\n for(var i = 0; i < arguments.length; i++){\n var url = new URI(arguments[i]);\n input.push(url);\n var _segments = url.segment();\n for(var s = 0; s < _segments.length; s++){\n if (typeof _segments[s] === \"string\") segments.push(_segments[s]);\n if (_segments[s]) nonEmptySegments++;\n }\n }\n if (!segments.length || !nonEmptySegments) return new URI(\"\");\n var uri = new URI(\"\").segment(segments);\n if (input[0].path() === \"\" || input[0].path().slice(0, 1) === \"/\") uri.path(\"/\" + uri.path());\n return uri.normalize();\n };\n URI.commonPath = function(one, two) {\n var length = Math.min(one.length, two.length);\n var pos;\n // find first non-matching character\n for(pos = 0; pos < length; pos++)if (one.charAt(pos) !== two.charAt(pos)) {\n pos--;\n break;\n }\n if (pos < 1) return one.charAt(0) === two.charAt(0) && one.charAt(0) === \"/\" ? \"/\" : \"\";\n // revert to last /\n if (one.charAt(pos) !== \"/\" || two.charAt(pos) !== \"/\") pos = one.substring(0, pos).lastIndexOf(\"/\");\n return one.substring(0, pos + 1);\n };\n URI.withinString = function(string, callback, options) {\n options || (options = {});\n var _start = options.start || URI.findUri.start;\n var _end = options.end || URI.findUri.end;\n var _trim = options.trim || URI.findUri.trim;\n var _parens = options.parens || URI.findUri.parens;\n var _attributeOpen = /[a-z0-9-]=[\"']?$/i;\n _start.lastIndex = 0;\n while(true){\n var match = _start.exec(string);\n if (!match) break;\n var start = match.index;\n if (options.ignoreHtml) {\n // attribut(e=[\"']?$)\n var attributeOpen = string.slice(Math.max(start - 3, 0), start);\n if (attributeOpen && _attributeOpen.test(attributeOpen)) continue;\n }\n var end = start + string.slice(start).search(_end);\n var slice = string.slice(start, end);\n // make sure we include well balanced parens\n var parensEnd = -1;\n while(true){\n var parensMatch = _parens.exec(slice);\n if (!parensMatch) break;\n var parensMatchEnd = parensMatch.index + parensMatch[0].length;\n parensEnd = Math.max(parensEnd, parensMatchEnd);\n }\n if (parensEnd > -1) slice = slice.slice(0, parensEnd) + slice.slice(parensEnd).replace(_trim, \"\");\n else slice = slice.replace(_trim, \"\");\n if (slice.length <= match[0].length) continue;\n if (options.ignore && options.ignore.test(slice)) continue;\n end = start + slice.length;\n var result = callback(slice, start, end, string);\n if (result === undefined) {\n _start.lastIndex = end;\n continue;\n }\n result = String(result);\n string = string.slice(0, start) + result + string.slice(end);\n _start.lastIndex = start + result.length;\n }\n _start.lastIndex = 0;\n return string;\n };\n URI.ensureValidHostname = function(v, protocol) {\n // Theoretically URIs allow percent-encoding in Hostnames (according to RFC 3986)\n // they are not part of DNS and therefore ignored by URI.js\n var hasHostname = !!v; // not null and not an empty string\n var hasProtocol = !!protocol;\n var rejectEmptyHostname = false;\n if (hasProtocol) rejectEmptyHostname = arrayContains(URI.hostProtocols, protocol);\n if (rejectEmptyHostname && !hasHostname) throw new TypeError(\"Hostname cannot be empty, if protocol is \" + protocol);\n else if (v && v.match(URI.invalid_hostname_characters)) {\n // test punycode\n if (!punycode) throw new TypeError('Hostname \"' + v + '\" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');\n if (punycode.toASCII(v).match(URI.invalid_hostname_characters)) throw new TypeError('Hostname \"' + v + '\" contains characters other than [A-Z0-9.-:_]');\n }\n };\n URI.ensureValidPort = function(v) {\n if (!v) return;\n var port = Number(v);\n if (isInteger(port) && port > 0 && port < 65536) return;\n throw new TypeError('Port \"' + v + '\" is not a valid port');\n };\n // noConflict\n URI.noConflict = function(removeAll) {\n if (removeAll) {\n var unconflicted = {\n URI: this.noConflict()\n };\n if (root.URITemplate && typeof root.URITemplate.noConflict === \"function\") unconflicted.URITemplate = root.URITemplate.noConflict();\n if (root.IPv6 && typeof root.IPv6.noConflict === \"function\") unconflicted.IPv6 = root.IPv6.noConflict();\n if (root.SecondLevelDomains && typeof root.SecondLevelDomains.noConflict === \"function\") unconflicted.SecondLevelDomains = root.SecondLevelDomains.noConflict();\n return unconflicted;\n } else if (root.URI === this) root.URI = _URI;\n return this;\n };\n p.build = function(deferBuild) {\n if (deferBuild === true) this._deferred_build = true;\n else if (deferBuild === undefined || this._deferred_build) {\n this._string = URI.build(this._parts);\n this._deferred_build = false;\n }\n return this;\n };\n p.clone = function() {\n return new URI(this);\n };\n p.valueOf = p.toString = function() {\n return this.build(false)._string;\n };\n function generateSimpleAccessor(_part) {\n return function(v, build) {\n if (v === undefined) return this._parts[_part] || \"\";\n else {\n this._parts[_part] = v || null;\n this.build(!build);\n return this;\n }\n };\n }\n function generatePrefixAccessor(_part, _key) {\n return function(v, build) {\n if (v === undefined) return this._parts[_part] || \"\";\n else {\n if (v !== null) {\n v = v + \"\";\n if (v.charAt(0) === _key) v = v.substring(1);\n }\n this._parts[_part] = v;\n this.build(!build);\n return this;\n }\n };\n }\n p.protocol = generateSimpleAccessor(\"protocol\");\n p.username = generateSimpleAccessor(\"username\");\n p.password = generateSimpleAccessor(\"password\");\n p.hostname = generateSimpleAccessor(\"hostname\");\n p.port = generateSimpleAccessor(\"port\");\n p.query = generatePrefixAccessor(\"query\", \"?\");\n p.fragment = generatePrefixAccessor(\"fragment\", \"#\");\n p.search = function(v, build) {\n var t = this.query(v, build);\n return typeof t === \"string\" && t.length ? \"?\" + t : t;\n };\n p.hash = function(v, build) {\n var t = this.fragment(v, build);\n return typeof t === \"string\" && t.length ? \"#\" + t : t;\n };\n p.pathname = function(v, build) {\n if (v === undefined || v === true) {\n var res = this._parts.path || (this._parts.hostname ? \"/\" : \"\");\n return v ? (this._parts.urn ? URI.decodeUrnPath : URI.decodePath)(res) : res;\n } else {\n if (this._parts.urn) this._parts.path = v ? URI.recodeUrnPath(v) : \"\";\n else this._parts.path = v ? URI.recodePath(v) : \"/\";\n this.build(!build);\n return this;\n }\n };\n p.path = p.pathname;\n p.href = function(href, build) {\n var key;\n if (href === undefined) return this.toString();\n this._string = \"\";\n this._parts = URI._parts();\n var _URI = href instanceof URI;\n var _object = typeof href === \"object\" && (href.hostname || href.path || href.pathname);\n if (href.nodeName) {\n var attribute = URI.getDomAttribute(href);\n href = href[attribute] || \"\";\n _object = false;\n }\n // window.location is reported to be an object, but it's not the sort\n // of object we're looking for:\n // * location.protocol ends with a colon\n // * location.query != object.search\n // * location.hash != object.fragment\n // simply serializing the unknown object should do the trick\n // (for location, not for everything...)\n if (!_URI && _object && href.pathname !== undefined) href = href.toString();\n if (typeof href === \"string\" || href instanceof String) this._parts = URI.parse(String(href), this._parts);\n else if (_URI || _object) {\n var src = _URI ? href._parts : href;\n for(key in src){\n if (key === \"query\") continue;\n if (hasOwn.call(this._parts, key)) this._parts[key] = src[key];\n }\n if (src.query) this.query(src.query, false);\n } else throw new TypeError(\"invalid input\");\n this.build(!build);\n return this;\n };\n // identification accessors\n p.is = function(what) {\n var ip = false;\n var ip4 = false;\n var ip6 = false;\n var name = false;\n var sld = false;\n var idn = false;\n var punycode = false;\n var relative = !this._parts.urn;\n if (this._parts.hostname) {\n relative = false;\n ip4 = URI.ip4_expression.test(this._parts.hostname);\n ip6 = URI.ip6_expression.test(this._parts.hostname);\n ip = ip4 || ip6;\n name = !ip;\n sld = name && SLD && SLD.has(this._parts.hostname);\n idn = name && URI.idn_expression.test(this._parts.hostname);\n punycode = name && URI.punycode_expression.test(this._parts.hostname);\n }\n switch(what.toLowerCase()){\n case \"relative\":\n return relative;\n case \"absolute\":\n return !relative;\n // hostname identification\n case \"domain\":\n case \"name\":\n return name;\n case \"sld\":\n return sld;\n case \"ip\":\n return ip;\n case \"ip4\":\n case \"ipv4\":\n case \"inet4\":\n return ip4;\n case \"ip6\":\n case \"ipv6\":\n case \"inet6\":\n return ip6;\n case \"idn\":\n return idn;\n case \"url\":\n return !this._parts.urn;\n case \"urn\":\n return !!this._parts.urn;\n case \"punycode\":\n return punycode;\n }\n return null;\n };\n // component specific input validation\n var _protocol = p.protocol;\n var _port = p.port;\n var _hostname = p.hostname;\n p.protocol = function(v, build) {\n if (v) {\n // accept trailing ://\n v = v.replace(/:(\\/\\/)?$/, \"\");\n if (!v.match(URI.protocol_expression)) throw new TypeError('Protocol \"' + v + \"\\\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]\");\n }\n return _protocol.call(this, v, build);\n };\n p.scheme = p.protocol;\n p.port = function(v, build) {\n if (this._parts.urn) return v === undefined ? \"\" : this;\n if (v !== undefined) {\n if (v === 0) v = null;\n if (v) {\n v += \"\";\n if (v.charAt(0) === \":\") v = v.substring(1);\n URI.ensureValidPort(v);\n }\n }\n return _port.call(this, v, build);\n };\n p.hostname = function(v, build) {\n if (this._parts.urn) return v === undefined ? \"\" : this;\n if (v !== undefined) {\n var x = {\n preventInvalidHostname: this._parts.preventInvalidHostname\n };\n var res = URI.parseHost(v, x);\n if (res !== \"/\") throw new TypeError('Hostname \"' + v + '\" contains characters other than [A-Z0-9.-]');\n v = x.hostname;\n if (this._parts.preventInvalidHostname) URI.ensureValidHostname(v, this._parts.protocol);\n }\n return _hostname.call(this, v, build);\n };\n // compound accessors\n p.origin = function(v, build) {\n if (this._parts.urn) return v === undefined ? \"\" : this;\n if (v === undefined) {\n var protocol = this.protocol();\n var authority = this.authority();\n if (!authority) return \"\";\n return (protocol ? protocol + \"://\" : \"\") + this.authority();\n } else {\n var origin = URI(v);\n this.protocol(origin.protocol()).authority(origin.authority()).build(!build);\n return this;\n }\n };\n p.host = function(v, build) {\n if (this._parts.urn) return v === undefined ? \"\" : this;\n if (v === undefined) return this._parts.hostname ? URI.buildHost(this._parts) : \"\";\n else {\n var res = URI.parseHost(v, this._parts);\n if (res !== \"/\") throw new TypeError('Hostname \"' + v + '\" contains characters other than [A-Z0-9.-]');\n this.build(!build);\n return this;\n }\n };\n p.authority = function(v, build) {\n if (this._parts.urn) return v === undefined ? \"\" : this;\n if (v === undefined) return this._parts.hostname ? URI.buildAuthority(this._parts) : \"\";\n else {\n var res = URI.parseAuthority(v, this._parts);\n if (res !== \"/\") throw new TypeError('Hostname \"' + v + '\" contains characters other than [A-Z0-9.-]');\n this.build(!build);\n return this;\n }\n };\n p.userinfo = function(v, build) {\n if (this._parts.urn) return v === undefined ? \"\" : this;\n if (v === undefined) {\n var t = URI.buildUserinfo(this._parts);\n return t ? t.substring(0, t.length - 1) : t;\n } else {\n if (v[v.length - 1] !== \"@\") v += \"@\";\n URI.parseUserinfo(v, this._parts);\n this.build(!build);\n return this;\n }\n };\n p.resource = function(v, build) {\n var parts;\n if (v === undefined) return this.path() + this.search() + this.hash();\n parts = URI.parse(v);\n this._parts.path = parts.path;\n this._parts.query = parts.query;\n this._parts.fragment = parts.fragment;\n this.build(!build);\n return this;\n };\n // fraction accessors\n p.subdomain = function(v, build) {\n if (this._parts.urn) return v === undefined ? \"\" : this;\n // convenience, return \"www\" from \"www.example.org\"\n if (v === undefined) {\n if (!this._parts.hostname || this.is(\"IP\")) return \"\";\n // grab domain and add another segment\n var end = this._parts.hostname.length - this.domain().length - 1;\n return this._parts.hostname.substring(0, end) || \"\";\n } else {\n var e = this._parts.hostname.length - this.domain().length;\n var sub = this._parts.hostname.substring(0, e);\n var replace = new RegExp(\"^\" + escapeRegEx(sub));\n if (v && v.charAt(v.length - 1) !== \".\") v += \".\";\n if (v.indexOf(\":\") !== -1) throw new TypeError(\"Domains cannot contain colons\");\n if (v) URI.ensureValidHostname(v, this._parts.protocol);\n this._parts.hostname = this._parts.hostname.replace(replace, v);\n this.build(!build);\n return this;\n }\n };\n p.domain = function(v, build) {\n if (this._parts.urn) return v === undefined ? \"\" : this;\n if (typeof v === \"boolean\") {\n build = v;\n v = undefined;\n }\n // convenience, return \"example.org\" from \"www.example.org\"\n if (v === undefined) {\n if (!this._parts.hostname || this.is(\"IP\")) return \"\";\n // if hostname consists of 1 or 2 segments, it must be the domain\n var t = this._parts.hostname.match(/\\./g);\n if (t && t.length < 2) return this._parts.hostname;\n // grab tld and add another segment\n var end = this._parts.hostname.length - this.tld(build).length - 1;\n end = this._parts.hostname.lastIndexOf(\".\", end - 1) + 1;\n return this._parts.hostname.substring(end) || \"\";\n } else {\n if (!v) throw new TypeError(\"cannot set domain empty\");\n if (v.indexOf(\":\") !== -1) throw new TypeError(\"Domains cannot contain colons\");\n URI.ensureValidHostname(v, this._parts.protocol);\n if (!this._parts.hostname || this.is(\"IP\")) this._parts.hostname = v;\n else {\n var replace = new RegExp(escapeRegEx(this.domain()) + \"$\");\n this._parts.hostname = this._parts.hostname.replace(replace, v);\n }\n this.build(!build);\n return this;\n }\n };\n p.tld = function(v, build) {\n if (this._parts.urn) return v === undefined ? \"\" : this;\n if (typeof v === \"boolean\") {\n build = v;\n v = undefined;\n }\n // return \"org\" from \"www.example.org\"\n if (v === undefined) {\n if (!this._parts.hostname || this.is(\"IP\")) return \"\";\n var pos = this._parts.hostname.lastIndexOf(\".\");\n var tld = this._parts.hostname.substring(pos + 1);\n if (build !== true && SLD && SLD.list[tld.toLowerCase()]) return SLD.get(this._parts.hostname) || tld;\n return tld;\n } else {\n var replace;\n if (!v) throw new TypeError(\"cannot set TLD empty\");\n else if (v.match(/[^a-zA-Z0-9-]/)) {\n if (SLD && SLD.is(v)) {\n replace = new RegExp(escapeRegEx(this.tld()) + \"$\");\n this._parts.hostname = this._parts.hostname.replace(replace, v);\n } else throw new TypeError('TLD \"' + v + '\" contains characters other than [A-Z0-9]');\n } else if (!this._parts.hostname || this.is(\"IP\")) throw new ReferenceError(\"cannot set TLD on non-domain host\");\n else {\n replace = new RegExp(escapeRegEx(this.tld()) + \"$\");\n this._parts.hostname = this._parts.hostname.replace(replace, v);\n }\n this.build(!build);\n return this;\n }\n };\n p.directory = function(v, build) {\n if (this._parts.urn) return v === undefined ? \"\" : this;\n if (v === undefined || v === true) {\n if (!this._parts.path && !this._parts.hostname) return \"\";\n if (this._parts.path === \"/\") return \"/\";\n var end = this._parts.path.length - this.filename().length - 1;\n var res = this._parts.path.substring(0, end) || (this._parts.hostname ? \"/\" : \"\");\n return v ? URI.decodePath(res) : res;\n } else {\n var e = this._parts.path.length - this.filename().length;\n var directory = this._parts.path.substring(0, e);\n var replace = new RegExp(\"^\" + escapeRegEx(directory));\n // fully qualifier directories begin with a slash\n if (!this.is(\"relative\")) {\n if (!v) v = \"/\";\n if (v.charAt(0) !== \"/\") v = \"/\" + v;\n }\n // directories always end with a slash\n if (v && v.charAt(v.length - 1) !== \"/\") v += \"/\";\n v = URI.recodePath(v);\n this._parts.path = this._parts.path.replace(replace, v);\n this.build(!build);\n return this;\n }\n };\n p.filename = function(v, build) {\n if (this._parts.urn) return v === undefined ? \"\" : this;\n if (typeof v !== \"string\") {\n if (!this._parts.path || this._parts.path === \"/\") return \"\";\n var pos = this._parts.path.lastIndexOf(\"/\");\n var res = this._parts.path.substring(pos + 1);\n return v ? URI.decodePathSegment(res) : res;\n } else {\n var mutatedDirectory = false;\n if (v.charAt(0) === \"/\") v = v.substring(1);\n if (v.match(/\\.?\\//)) mutatedDirectory = true;\n var replace = new RegExp(escapeRegEx(this.filename()) + \"$\");\n v = URI.recodePath(v);\n this._parts.path = this._parts.path.replace(replace, v);\n if (mutatedDirectory) this.normalizePath(build);\n else this.build(!build);\n return this;\n }\n };\n p.suffix = function(v, build) {\n if (this._parts.urn) return v === undefined ? \"\" : this;\n if (v === undefined || v === true) {\n if (!this._parts.path || this._parts.path === \"/\") return \"\";\n var filename = this.filename();\n var pos = filename.lastIndexOf(\".\");\n var s, res;\n if (pos === -1) return \"\";\n // suffix may only contain alnum characters (yup, I made this up.)\n s = filename.substring(pos + 1);\n res = /^[a-z0-9%]+$/i.test(s) ? s : \"\";\n return v ? URI.decodePathSegment(res) : res;\n } else {\n if (v.charAt(0) === \".\") v = v.substring(1);\n var suffix = this.suffix();\n var replace;\n if (!suffix) {\n if (!v) return this;\n this._parts.path += \".\" + URI.recodePath(v);\n } else if (!v) replace = new RegExp(escapeRegEx(\".\" + suffix) + \"$\");\n else replace = new RegExp(escapeRegEx(suffix) + \"$\");\n if (replace) {\n v = URI.recodePath(v);\n this._parts.path = this._parts.path.replace(replace, v);\n }\n this.build(!build);\n return this;\n }\n };\n p.segment = function(segment, v, build) {\n var separator = this._parts.urn ? \":\" : \"/\";\n var path = this.path();\n var absolute = path.substring(0, 1) === \"/\";\n var segments = path.split(separator);\n if (segment !== undefined && typeof segment !== \"number\") {\n build = v;\n v = segment;\n segment = undefined;\n }\n if (segment !== undefined && typeof segment !== \"number\") throw new Error('Bad segment \"' + segment + '\", must be 0-based integer');\n if (absolute) segments.shift();\n if (segment < 0) // allow negative indexes to address from the end\n segment = Math.max(segments.length + segment, 0);\n if (v === undefined) /*jshint laxbreak: true */ return segment === undefined ? segments : segments[segment];\n else if (segment === null || segments[segment] === undefined) {\n if (isArray(v)) {\n segments = [];\n // collapse empty elements within array\n for(var i = 0, l = v.length; i < l; i++){\n if (!v[i].length && (!segments.length || !segments[segments.length - 1].length)) continue;\n if (segments.length && !segments[segments.length - 1].length) segments.pop();\n segments.push(trimSlashes(v[i]));\n }\n } else if (v || typeof v === \"string\") {\n v = trimSlashes(v);\n if (segments[segments.length - 1] === \"\") // empty trailing elements have to be overwritten\n // to prevent results such as /foo//bar\n segments[segments.length - 1] = v;\n else segments.push(v);\n }\n } else if (v) segments[segment] = trimSlashes(v);\n else segments.splice(segment, 1);\n if (absolute) segments.unshift(\"\");\n return this.path(segments.join(separator), build);\n };\n p.segmentCoded = function(segment, v, build) {\n var segments, i, l;\n if (typeof segment !== \"number\") {\n build = v;\n v = segment;\n segment = undefined;\n }\n if (v === undefined) {\n segments = this.segment(segment, v, build);\n if (!isArray(segments)) segments = segments !== undefined ? URI.decode(segments) : undefined;\n else for(i = 0, l = segments.length; i < l; i++)segments[i] = URI.decode(segments[i]);\n return segments;\n }\n if (!isArray(v)) v = typeof v === \"string\" || v instanceof String ? URI.encode(v) : v;\n else for(i = 0, l = v.length; i < l; i++)v[i] = URI.encode(v[i]);\n return this.segment(segment, v, build);\n };\n // mutating query string\n var q = p.query;\n p.query = function(v, build) {\n if (v === true) return URI.parseQuery(this._parts.query, this._parts.escapeQuerySpace);\n else if (typeof v === \"function\") {\n var data = URI.parseQuery(this._parts.query, this._parts.escapeQuerySpace);\n var result = v.call(this, data);\n this._parts.query = URI.buildQuery(result || data, this._parts.duplicateQueryParameters, this._parts.escapeQuerySpace);\n this.build(!build);\n return this;\n } else if (v !== undefined && typeof v !== \"string\") {\n this._parts.query = URI.buildQuery(v, this._parts.duplicateQueryParameters, this._parts.escapeQuerySpace);\n this.build(!build);\n return this;\n } else return q.call(this, v, build);\n };\n p.setQuery = function(name, value, build) {\n var data = URI.parseQuery(this._parts.query, this._parts.escapeQuerySpace);\n if (typeof name === \"string\" || name instanceof String) data[name] = value !== undefined ? value : null;\n else if (typeof name === \"object\") {\n for(var key in name)if (hasOwn.call(name, key)) data[key] = name[key];\n } else throw new TypeError(\"URI.addQuery() accepts an object, string as the name parameter\");\n this._parts.query = URI.buildQuery(data, this._parts.duplicateQueryParameters, this._parts.escapeQuerySpace);\n if (typeof name !== \"string\") build = value;\n this.build(!build);\n return this;\n };\n p.addQuery = function(name, value, build) {\n var data = URI.parseQuery(this._parts.query, this._parts.escapeQuerySpace);\n URI.addQuery(data, name, value === undefined ? null : value);\n this._parts.query = URI.buildQuery(data, this._parts.duplicateQueryParameters, this._parts.escapeQuerySpace);\n if (typeof name !== \"string\") build = value;\n this.build(!build);\n return this;\n };\n p.removeQuery = function(name, value, build) {\n var data = URI.parseQuery(this._parts.query, this._parts.escapeQuerySpace);\n URI.removeQuery(data, name, value);\n this._parts.query = URI.buildQuery(data, this._parts.duplicateQueryParameters, this._parts.escapeQuerySpace);\n if (typeof name !== \"string\") build = value;\n this.build(!build);\n return this;\n };\n p.hasQuery = function(name, value, withinArray) {\n var data = URI.parseQuery(this._parts.query, this._parts.escapeQuerySpace);\n return URI.hasQuery(data, name, value, withinArray);\n };\n p.setSearch = p.setQuery;\n p.addSearch = p.addQuery;\n p.removeSearch = p.removeQuery;\n p.hasSearch = p.hasQuery;\n // sanitizing URLs\n p.normalize = function() {\n if (this._parts.urn) return this.normalizeProtocol(false).normalizePath(false).normalizeQuery(false).normalizeFragment(false).build();\n return this.normalizeProtocol(false).normalizeHostname(false).normalizePort(false).normalizePath(false).normalizeQuery(false).normalizeFragment(false).build();\n };\n p.normalizeProtocol = function(build) {\n if (typeof this._parts.protocol === \"string\") {\n this._parts.protocol = this._parts.protocol.toLowerCase();\n this.build(!build);\n }\n return this;\n };\n p.normalizeHostname = function(build) {\n if (this._parts.hostname) {\n if (this.is(\"IDN\") && punycode) this._parts.hostname = punycode.toASCII(this._parts.hostname);\n else if (this.is(\"IPv6\") && IPv6) this._parts.hostname = IPv6.best(this._parts.hostname);\n this._parts.hostname = this._parts.hostname.toLowerCase();\n this.build(!build);\n }\n return this;\n };\n p.normalizePort = function(build) {\n // remove port of it's the protocol's default\n if (typeof this._parts.protocol === \"string\" && this._parts.port === URI.defaultPorts[this._parts.protocol]) {\n this._parts.port = null;\n this.build(!build);\n }\n return this;\n };\n p.normalizePath = function(build) {\n var _path = this._parts.path;\n if (!_path) return this;\n if (this._parts.urn) {\n this._parts.path = URI.recodeUrnPath(this._parts.path);\n this.build(!build);\n return this;\n }\n if (this._parts.path === \"/\") return this;\n _path = URI.recodePath(_path);\n var _was_relative;\n var _leadingParents = \"\";\n var _parent, _pos;\n // handle relative paths\n if (_path.charAt(0) !== \"/\") {\n _was_relative = true;\n _path = \"/\" + _path;\n }\n // handle relative files (as opposed to directories)\n if (_path.slice(-3) === \"/..\" || _path.slice(-2) === \"/.\") _path += \"/\";\n // resolve simples\n _path = _path.replace(/(\\/(\\.\\/)+)|(\\/\\.$)/g, \"/\").replace(/\\/{2,}/g, \"/\");\n // remember leading parents\n if (_was_relative) {\n _leadingParents = _path.substring(1).match(/^(\\.\\.\\/)+/) || \"\";\n if (_leadingParents) _leadingParents = _leadingParents[0];\n }\n // resolve parents\n while(true){\n _parent = _path.search(/\\/\\.\\.(\\/|$)/);\n if (_parent === -1) break;\n else if (_parent === 0) {\n // top level cannot be relative, skip it\n _path = _path.substring(3);\n continue;\n }\n _pos = _path.substring(0, _parent).lastIndexOf(\"/\");\n if (_pos === -1) _pos = _parent;\n _path = _path.substring(0, _pos) + _path.substring(_parent + 3);\n }\n // revert to relative\n if (_was_relative && this.is(\"relative\")) _path = _leadingParents + _path.substring(1);\n this._parts.path = _path;\n this.build(!build);\n return this;\n };\n p.normalizePathname = p.normalizePath;\n p.normalizeQuery = function(build) {\n if (typeof this._parts.query === \"string\") {\n if (!this._parts.query.length) this._parts.query = null;\n else this.query(URI.parseQuery(this._parts.query, this._parts.escapeQuerySpace));\n this.build(!build);\n }\n return this;\n };\n p.normalizeFragment = function(build) {\n if (!this._parts.fragment) {\n this._parts.fragment = null;\n this.build(!build);\n }\n return this;\n };\n p.normalizeSearch = p.normalizeQuery;\n p.normalizeHash = p.normalizeFragment;\n p.iso8859 = function() {\n // expect unicode input, iso8859 output\n var e = URI.encode;\n var d = URI.decode;\n URI.encode = escape;\n URI.decode = decodeURIComponent;\n try {\n this.normalize();\n } finally{\n URI.encode = e;\n URI.decode = d;\n }\n return this;\n };\n p.unicode = function() {\n // expect iso8859 input, unicode output\n var e = URI.encode;\n var d = URI.decode;\n URI.encode = strictEncodeURIComponent;\n URI.decode = unescape;\n try {\n this.normalize();\n } finally{\n URI.encode = e;\n URI.decode = d;\n }\n return this;\n };\n p.readable = function() {\n var uri = this.clone();\n // removing username, password, because they shouldn't be displayed according to RFC 3986\n uri.username(\"\").password(\"\").normalize();\n var t = \"\";\n if (uri._parts.protocol) t += uri._parts.protocol + \"://\";\n if (uri._parts.hostname) {\n if (uri.is(\"punycode\") && punycode) {\n t += punycode.toUnicode(uri._parts.hostname);\n if (uri._parts.port) t += \":\" + uri._parts.port;\n } else t += uri.host();\n }\n if (uri._parts.hostname && uri._parts.path && uri._parts.path.charAt(0) !== \"/\") t += \"/\";\n t += uri.path(true);\n if (uri._parts.query) {\n var q = \"\";\n for(var i = 0, qp = uri._parts.query.split(\"&\"), l = qp.length; i < l; i++){\n var kv = (qp[i] || \"\").split(\"=\");\n q += \"&\" + URI.decodeQuery(kv[0], this._parts.escapeQuerySpace).replace(/&/g, \"%26\");\n if (kv[1] !== undefined) q += \"=\" + URI.decodeQuery(kv[1], this._parts.escapeQuerySpace).replace(/&/g, \"%26\");\n }\n t += \"?\" + q.substring(1);\n }\n t += URI.decodeQuery(uri.hash(), true);\n return t;\n };\n // resolving relative and absolute URLs\n p.absoluteTo = function(base) {\n var resolved = this.clone();\n var properties = [\n \"protocol\",\n \"username\",\n \"password\",\n \"hostname\",\n \"port\"\n ];\n var basedir, i, p;\n if (this._parts.urn) throw new Error(\"URNs do not have any generally defined hierarchical components\");\n if (!(base instanceof URI)) base = new URI(base);\n if (resolved._parts.protocol) // Directly returns even if this._parts.hostname is empty.\n return resolved;\n else resolved._parts.protocol = base._parts.protocol;\n if (this._parts.hostname) return resolved;\n for(i = 0; p = properties[i]; i++)resolved._parts[p] = base._parts[p];\n if (!resolved._parts.path) {\n resolved._parts.path = base._parts.path;\n if (!resolved._parts.query) resolved._parts.query = base._parts.query;\n } else {\n if (resolved._parts.path.substring(-2) === \"..\") resolved._parts.path += \"/\";\n if (resolved.path().charAt(0) !== \"/\") {\n basedir = base.directory();\n basedir = basedir ? basedir : base.path().indexOf(\"/\") === 0 ? \"/\" : \"\";\n resolved._parts.path = (basedir ? basedir + \"/\" : \"\") + resolved._parts.path;\n resolved.normalizePath();\n }\n }\n resolved.build();\n return resolved;\n };\n p.relativeTo = function(base) {\n var relative = this.clone().normalize();\n var relativeParts, baseParts, common, relativePath, basePath;\n if (relative._parts.urn) throw new Error(\"URNs do not have any generally defined hierarchical components\");\n base = new URI(base).normalize();\n relativeParts = relative._parts;\n baseParts = base._parts;\n relativePath = relative.path();\n basePath = base.path();\n if (relativePath.charAt(0) !== \"/\") throw new Error(\"URI is already relative\");\n if (basePath.charAt(0) !== \"/\") throw new Error(\"Cannot calculate a URI relative to another relative URI\");\n if (relativeParts.protocol === baseParts.protocol) relativeParts.protocol = null;\n if (relativeParts.username !== baseParts.username || relativeParts.password !== baseParts.password) return relative.build();\n if (relativeParts.protocol !== null || relativeParts.username !== null || relativeParts.password !== null) return relative.build();\n if (relativeParts.hostname === baseParts.hostname && relativeParts.port === baseParts.port) {\n relativeParts.hostname = null;\n relativeParts.port = null;\n } else return relative.build();\n if (relativePath === basePath) {\n relativeParts.path = \"\";\n return relative.build();\n }\n // determine common sub path\n common = URI.commonPath(relativePath, basePath);\n // If the paths have nothing in common, return a relative URL with the absolute path.\n if (!common) return relative.build();\n var parents = baseParts.path.substring(common.length).replace(/[^\\/]*$/, \"\").replace(/.*?\\//g, \"../\");\n relativeParts.path = parents + relativeParts.path.substring(common.length) || \"./\";\n return relative.build();\n };\n // comparing URIs\n p.equals = function(uri) {\n var one = this.clone();\n var two = new URI(uri);\n var one_map = {};\n var two_map = {};\n var checked = {};\n var one_query, two_query, key;\n one.normalize();\n two.normalize();\n // exact match\n if (one.toString() === two.toString()) return true;\n // extract query string\n one_query = one.query();\n two_query = two.query();\n one.query(\"\");\n two.query(\"\");\n // definitely not equal if not even non-query parts match\n if (one.toString() !== two.toString()) return false;\n // query parameters have the same length, even if they're permuted\n if (one_query.length !== two_query.length) return false;\n one_map = URI.parseQuery(one_query, this._parts.escapeQuerySpace);\n two_map = URI.parseQuery(two_query, this._parts.escapeQuerySpace);\n for(key in one_map)if (hasOwn.call(one_map, key)) {\n if (!isArray(one_map[key])) {\n if (one_map[key] !== two_map[key]) return false;\n } else if (!arraysEqual(one_map[key], two_map[key])) return false;\n checked[key] = true;\n }\n for(key in two_map)if (hasOwn.call(two_map, key)) {\n if (!checked[key]) // two contains a parameter not present in one\n return false;\n }\n return true;\n };\n // state\n p.preventInvalidHostname = function(v) {\n this._parts.preventInvalidHostname = !!v;\n return this;\n };\n p.duplicateQueryParameters = function(v) {\n this._parts.duplicateQueryParameters = !!v;\n return this;\n };\n p.escapeQuerySpace = function(v) {\n this._parts.escapeQuerySpace = !!v;\n return this;\n };\n return URI;\n});\n\n\n/**\n * @private\n */ function $120bf72c64f9e0f4$var$appendForwardSlash(url) {\n if (url.length === 0 || url[url.length - 1] !== \"/\") url = `${url}/`;\n return url;\n}\nvar $120bf72c64f9e0f4$export$2e2bcd8739ae039 = $120bf72c64f9e0f4$var$appendForwardSlash;\n\n\n\nvar $3pzcG = parcelRequire(\"3pzcG\");\n\nvar $8w8ZH = parcelRequire(\"8w8ZH\");\n/**\n * Clones an object, returning a new object containing the same properties.\n *\n * @function\n *\n * @param {object} object The object to clone.\n * @param {boolean} [deep=false] If true, all properties will be deep cloned recursively.\n * @returns {object} The cloned object.\n */ function $3f52ff37d0636f55$var$clone(object, deep) {\n if (object === null || typeof object !== \"object\") return object;\n deep = (0, $8w8ZH.default)(deep, false);\n const result = new object.constructor();\n for(const propertyName in object)if (object.hasOwnProperty(propertyName)) {\n let value = object[propertyName];\n if (deep) value = $3f52ff37d0636f55$var$clone(value, deep);\n result[propertyName] = value;\n }\n return result;\n}\nvar $3f52ff37d0636f55$export$2e2bcd8739ae039 = $3f52ff37d0636f55$var$clone;\n\n\n\nvar $8w8ZH = parcelRequire(\"8w8ZH\");\n\nvar $jQJji = parcelRequire(\"jQJji\");\n/**\n * Merges two objects, copying their properties onto a new combined object. When two objects have the same\n * property, the value of the property on the first object is used. If either object is undefined,\n * it will be treated as an empty object.\n *\n * @example\n * const object1 = {\n * propOne : 1,\n * propTwo : {\n * value1 : 10\n * }\n * }\n * const object2 = {\n * propTwo : 2\n * }\n * const final = Cesium.combine(object1, object2);\n *\n * // final === {\n * // propOne : 1,\n * // propTwo : {\n * // value1 : 10\n * // }\n * // }\n *\n * @param {object} [object1] The first object to merge.\n * @param {object} [object2] The second object to merge.\n * @param {boolean} [deep=false] Perform a recursive merge.\n * @returns {object} The combined object containing all properties from both objects.\n *\n * @function\n */ function $8e522a73a8dfbfe2$var$combine(object1, object2, deep) {\n deep = (0, $8w8ZH.default)(deep, false);\n const result = {};\n const object1Defined = (0, $jQJji.default)(object1);\n const object2Defined = (0, $jQJji.default)(object2);\n let property;\n let object1Value;\n let object2Value;\n if (object1Defined) {\n for(property in object1)if (object1.hasOwnProperty(property)) {\n object1Value = object1[property];\n if (object2Defined && deep && typeof object1Value === \"object\" && object2.hasOwnProperty(property)) {\n object2Value = object2[property];\n if (typeof object2Value === \"object\") result[property] = $8e522a73a8dfbfe2$var$combine(object1Value, object2Value, deep);\n else result[property] = object1Value;\n } else result[property] = object1Value;\n }\n }\n if (object2Defined) {\n for(property in object2)if (object2.hasOwnProperty(property) && !result.hasOwnProperty(property)) {\n object2Value = object2[property];\n result[property] = object2Value;\n }\n }\n return result;\n}\nvar $8e522a73a8dfbfe2$export$2e2bcd8739ae039 = $8e522a73a8dfbfe2$var$combine;\n\n\n\nvar $8w8ZH = parcelRequire(\"8w8ZH\");\n/**\n * A function used to resolve a promise upon completion .\n * @callback defer.resolve\n *\n * @param {*} value The resulting value.\n */ /**\n * A function used to reject a promise upon failure.\n * @callback defer.reject\n *\n * @param {*} error The error.\n */ /**\n * An object which contains a promise object, and functions to resolve or reject the promise.\n *\n * @typedef {object} defer.deferred\n * @property {defer.resolve} resolve Resolves the promise when called.\n * @property {defer.reject} reject Rejects the promise when called.\n * @property {Promise} promise Promise object.\n */ /**\n * Creates a deferred object, containing a promise object, and functions to resolve or reject the promise.\n * @returns {defer.deferred}\n * @private\n */ function $6e11a2ab1ac0872e$var$defer() {\n let resolve;\n let reject;\n const promise = new Promise(function(res, rej) {\n resolve = res;\n reject = rej;\n });\n return {\n resolve: resolve,\n reject: reject,\n promise: promise\n };\n}\nvar $6e11a2ab1ac0872e$export$2e2bcd8739ae039 = $6e11a2ab1ac0872e$var$defer;\n\n\n\nvar $jQJji = parcelRequire(\"jQJji\");\n\nvar $1vHsR = parcelRequire(\"1vHsR\");\n\n\nvar $8w8ZH = parcelRequire(\"8w8ZH\");\n\nvar $jQJji = parcelRequire(\"jQJji\");\n\nvar $1vHsR = parcelRequire(\"1vHsR\");\n/**\n * Given a relative Uri and a base Uri, returns the absolute Uri of the relative Uri.\n * @function\n *\n * @param {string} relative The relative Uri.\n * @param {string} [base] The base Uri.\n * @returns {string} The absolute Uri of the given relative Uri.\n *\n * @example\n * //absolute Uri will be \"https://test.com/awesome.png\";\n * const absoluteUri = Cesium.getAbsoluteUri('awesome.png', 'https://test.com');\n */ function $5d7f3681ccbe43e2$var$getAbsoluteUri(relative, base) {\n let documentObject;\n if (typeof document !== \"undefined\") documentObject = document;\n return $5d7f3681ccbe43e2$var$getAbsoluteUri._implementation(relative, base, documentObject);\n}\n$5d7f3681ccbe43e2$var$getAbsoluteUri._implementation = function(relative, base, documentObject) {\n //>>includeStart('debug', pragmas.debug);\n if (!(0, $jQJji.default)(relative)) throw new (0, $1vHsR.default)(\"relative uri is required.\");\n //>>includeEnd('debug');\n if (!(0, $jQJji.default)(base)) {\n if (typeof documentObject === \"undefined\") return relative;\n base = (0, $8w8ZH.default)(documentObject.baseURI, documentObject.location.href);\n }\n const relativeUri = new (0, (/*@__PURE__*/$parcel$interopDefault($f3b7c43a7f0c8e85$exports)))(relative);\n if (relativeUri.scheme() !== \"\") return relativeUri.toString();\n return relativeUri.absoluteTo(base).toString();\n};\nvar $5d7f3681ccbe43e2$export$2e2bcd8739ae039 = $5d7f3681ccbe43e2$var$getAbsoluteUri;\n\n\n\n\nvar $jQJji = parcelRequire(\"jQJji\");\n\nvar $1vHsR = parcelRequire(\"1vHsR\");\n/**\n * Given a URI, returns the base path of the URI.\n * @function\n *\n * @param {string} uri The Uri.\n * @param {boolean} [includeQuery = false] Whether or not to include the query string and fragment form the uri\n * @returns {string} The base path of the Uri.\n *\n * @example\n * // basePath will be \"/Gallery/\";\n * const basePath = Cesium.getBaseUri('/Gallery/simple.czml?value=true&example=false');\n *\n * // basePath will be \"/Gallery/?value=true&example=false\";\n * const basePath = Cesium.getBaseUri('/Gallery/simple.czml?value=true&example=false', true);\n */ function $d4cdc3514a25210c$var$getBaseUri(uri, includeQuery) {\n //>>includeStart('debug', pragmas.debug);\n if (!(0, $jQJji.default)(uri)) throw new (0, $1vHsR.default)(\"uri is required.\");\n //>>includeEnd('debug');\n let basePath = \"\";\n const i = uri.lastIndexOf(\"/\");\n if (i !== -1) basePath = uri.substring(0, i + 1);\n if (!includeQuery) return basePath;\n uri = new (0, (/*@__PURE__*/$parcel$interopDefault($f3b7c43a7f0c8e85$exports)))(uri);\n if (uri.query().length !== 0) basePath += `?${uri.query()}`;\n if (uri.fragment().length !== 0) basePath += `#${uri.fragment()}`;\n return basePath;\n}\nvar $d4cdc3514a25210c$export$2e2bcd8739ae039 = $d4cdc3514a25210c$var$getBaseUri;\n\n\n\n\nvar $jQJji = parcelRequire(\"jQJji\");\n\nvar $1vHsR = parcelRequire(\"1vHsR\");\n/**\n * Given a URI, returns the extension of the URI.\n * @function getExtensionFromUri\n *\n * @param {string} uri The Uri.\n * @returns {string} The extension of the Uri.\n *\n * @example\n * //extension will be \"czml\";\n * const extension = Cesium.getExtensionFromUri('/Gallery/simple.czml?value=true&example=false');\n */ function $dce14f3284a3bc25$var$getExtensionFromUri(uri) {\n //>>includeStart('debug', pragmas.debug);\n if (!(0, $jQJji.default)(uri)) throw new (0, $1vHsR.default)(\"uri is required.\");\n //>>includeEnd('debug');\n const uriObject = new (0, (/*@__PURE__*/$parcel$interopDefault($f3b7c43a7f0c8e85$exports)))(uri);\n uriObject.normalize();\n let path = uriObject.path();\n let index = path.lastIndexOf(\"/\");\n if (index !== -1) path = path.substr(index + 1);\n index = path.lastIndexOf(\".\");\n if (index === -1) path = \"\";\n else path = path.substr(index + 1);\n return path;\n}\nvar $dce14f3284a3bc25$export$2e2bcd8739ae039 = $dce14f3284a3bc25$var$getExtensionFromUri;\n\n\n\nvar $jQJji = parcelRequire(\"jQJji\");\nconst $5db98adec2cfcc7b$var$context2DsByWidthAndHeight = {};\n/**\n * Extract a pixel array from a loaded image. Draws the image\n * into a canvas so it can read the pixels back.\n *\n * @function getImagePixels\n *\n * @param {HTMLImageElement|ImageBitmap} image The image to extract pixels from.\n * @param {number} width The width of the image. If not defined, then image.width is assigned.\n * @param {number} height The height of the image. If not defined, then image.height is assigned.\n * @returns {ImageData} The pixels of the image.\n */ function $5db98adec2cfcc7b$var$getImagePixels(image, width, height) {\n if (!(0, $jQJji.default)(width)) width = image.width;\n if (!(0, $jQJji.default)(height)) height = image.height;\n let context2DsByHeight = $5db98adec2cfcc7b$var$context2DsByWidthAndHeight[width];\n if (!(0, $jQJji.default)(context2DsByHeight)) {\n context2DsByHeight = {};\n $5db98adec2cfcc7b$var$context2DsByWidthAndHeight[width] = context2DsByHeight;\n }\n let context2d = context2DsByHeight[height];\n if (!(0, $jQJji.default)(context2d)) {\n const canvas = document.createElement(\"canvas\");\n canvas.width = width;\n canvas.height = height;\n // Since we re-use contexts, use the willReadFrequently option – See https://html.spec.whatwg.org/multipage/canvas.html#concept-canvas-will-read-frequently\n context2d = canvas.getContext(\"2d\", {\n willReadFrequently: true\n });\n context2d.globalCompositeOperation = \"copy\";\n context2DsByHeight[height] = context2d;\n }\n context2d.drawImage(image, 0, 0, width, height);\n return context2d.getImageData(0, 0, width, height).data;\n}\nvar $5db98adec2cfcc7b$export$2e2bcd8739ae039 = $5db98adec2cfcc7b$var$getImagePixels;\n\n\n\nvar $3pzcG = parcelRequire(\"3pzcG\");\nconst $9f0272ac2370f543$var$blobUriRegex = /^blob:/i;\n/**\n * Determines if the specified uri is a blob uri.\n *\n * @function isBlobUri\n *\n * @param {string} uri The uri to test.\n * @returns {boolean} true when the uri is a blob uri; otherwise, false.\n *\n * @private\n */ function $9f0272ac2370f543$var$isBlobUri(uri) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.string(\"uri\", uri);\n //>>includeEnd('debug');\n return $9f0272ac2370f543$var$blobUriRegex.test(uri);\n}\nvar $9f0272ac2370f543$export$2e2bcd8739ae039 = $9f0272ac2370f543$var$isBlobUri;\n\n\n\nvar $jQJji = parcelRequire(\"jQJji\");\nlet $6fb706f4a1c1ff12$var$a;\n/**\n * Given a URL, determine whether that URL is considered cross-origin to the current page.\n *\n * @private\n */ function $6fb706f4a1c1ff12$var$isCrossOriginUrl(url) {\n if (!(0, $jQJji.default)($6fb706f4a1c1ff12$var$a)) $6fb706f4a1c1ff12$var$a = document.createElement(\"a\");\n // copy window location into the anchor to get consistent results\n // when the port is default for the protocol (e.g. 80 for HTTP)\n $6fb706f4a1c1ff12$var$a.href = window.location.href;\n // host includes both hostname and port if the port is not standard\n const host = $6fb706f4a1c1ff12$var$a.host;\n const protocol = $6fb706f4a1c1ff12$var$a.protocol;\n $6fb706f4a1c1ff12$var$a.href = url;\n // IE only absolutizes href on get, not set\n // eslint-disable-next-line no-self-assign\n $6fb706f4a1c1ff12$var$a.href = $6fb706f4a1c1ff12$var$a.href;\n return protocol !== $6fb706f4a1c1ff12$var$a.protocol || host !== $6fb706f4a1c1ff12$var$a.host;\n}\nvar $6fb706f4a1c1ff12$export$2e2bcd8739ae039 = $6fb706f4a1c1ff12$var$isCrossOriginUrl;\n\n\n\nvar $3pzcG = parcelRequire(\"3pzcG\");\nconst $9cb2c183cad552bd$var$dataUriRegex = /^data:/i;\n/**\n * Determines if the specified uri is a data uri.\n *\n * @function isDataUri\n *\n * @param {string} uri The uri to test.\n * @returns {boolean} true when the uri is a data uri; otherwise, false.\n *\n * @private\n */ function $9cb2c183cad552bd$var$isDataUri(uri) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.string(\"uri\", uri);\n //>>includeEnd('debug');\n return $9cb2c183cad552bd$var$dataUriRegex.test(uri);\n}\nvar $9cb2c183cad552bd$export$2e2bcd8739ae039 = $9cb2c183cad552bd$var$isDataUri;\n\n\n/**\n * @private\n */ function $e3fa9c82e19e3667$var$loadAndExecuteScript(url) {\n const script = document.createElement(\"script\");\n script.async = true;\n script.src = url;\n return new Promise((resolve, reject)=>{\n if (window.crossOriginIsolated) script.setAttribute(\"crossorigin\", \"anonymous\");\n const head = document.getElementsByTagName(\"head\")[0];\n script.onload = function() {\n script.onload = undefined;\n head.removeChild(script);\n resolve();\n };\n script.onerror = function(e) {\n reject(e);\n };\n head.appendChild(script);\n });\n}\nvar $e3fa9c82e19e3667$export$2e2bcd8739ae039 = $e3fa9c82e19e3667$var$loadAndExecuteScript;\n\n\n\nvar $AXvpI = parcelRequire(\"AXvpI\");\n\nvar $jQJji = parcelRequire(\"jQJji\");\n\nvar $1vHsR = parcelRequire(\"1vHsR\");\n/**\n * Converts an object representing a set of name/value pairs into a query string,\n * with names and values encoded properly for use in a URL. Values that are arrays\n * will produce multiple values with the same name.\n * @function objectToQuery\n *\n * @param {object} obj The object containing data to encode.\n * @returns {string} An encoded query string.\n *\n *\n * @example\n * const str = Cesium.objectToQuery({\n * key1 : 'some value',\n * key2 : 'a/b',\n * key3 : ['x', 'y']\n * });\n *\n * @see queryToObject\n * // str will be:\n * // 'key1=some%20value&key2=a%2Fb&key3=x&key3=y'\n */ function $cdf3d7de0c82329e$var$objectToQuery(obj) {\n //>>includeStart('debug', pragmas.debug);\n if (!(0, $jQJji.default)(obj)) throw new (0, $1vHsR.default)(\"obj is required.\");\n //>>includeEnd('debug');\n let result = \"\";\n for(const propName in obj)if (obj.hasOwnProperty(propName)) {\n const value = obj[propName];\n const part = `${encodeURIComponent(propName)}=`;\n if (Array.isArray(value)) for(let i = 0, len = value.length; i < len; ++i)result += `${part + encodeURIComponent(value[i])}&`;\n else result += `${part + encodeURIComponent(value)}&`;\n }\n // trim last &\n result = result.slice(0, -1);\n // This function used to replace %20 with + which is more compact and readable.\n // However, some servers didn't properly handle + as a space.\n // https://github.com/CesiumGS/cesium/issues/2192\n return result;\n}\nvar $cdf3d7de0c82329e$export$2e2bcd8739ae039 = $cdf3d7de0c82329e$var$objectToQuery;\n\n\n\nvar $jQJji = parcelRequire(\"jQJji\");\n\nvar $1vHsR = parcelRequire(\"1vHsR\");\n/**\n * Parses a query string into an object, where the keys and values of the object are the\n * name/value pairs from the query string, decoded. If a name appears multiple times,\n * the value in the object will be an array of values.\n * @function queryToObject\n *\n * @param {string} queryString The query string.\n * @returns {object} An object containing the parameters parsed from the query string.\n *\n *\n * @example\n * const obj = Cesium.queryToObject('key1=some%20value&key2=a%2Fb&key3=x&key3=y');\n * // obj will be:\n * // {\n * // key1 : 'some value',\n * // key2 : 'a/b',\n * // key3 : ['x', 'y']\n * // }\n *\n * @see objectToQuery\n */ function $cec685f2ea286a8a$var$queryToObject(queryString) {\n //>>includeStart('debug', pragmas.debug);\n if (!(0, $jQJji.default)(queryString)) throw new (0, $1vHsR.default)(\"queryString is required.\");\n //>>includeEnd('debug');\n const result = {};\n if (queryString === \"\") return result;\n const parts = queryString.replace(/\\+/g, \"%20\").split(/[&;]/);\n for(let i = 0, len = parts.length; i < len; ++i){\n const subparts = parts[i].split(\"=\");\n const name = decodeURIComponent(subparts[0]);\n let value = subparts[1];\n if ((0, $jQJji.default)(value)) value = decodeURIComponent(value);\n else value = \"\";\n const resultValue = result[name];\n if (typeof resultValue === \"string\") // expand the single value to an array\n result[name] = [\n resultValue,\n value\n ];\n else if (Array.isArray(resultValue)) resultValue.push(value);\n else result[name] = value;\n }\n return result;\n}\nvar $cec685f2ea286a8a$export$2e2bcd8739ae039 = $cec685f2ea286a8a$var$queryToObject;\n\n\n\nvar $8w8ZH = parcelRequire(\"8w8ZH\");\n\nvar $jQJji = parcelRequire(\"jQJji\");\n/**\n * State of the request.\n *\n * @enum {number}\n */ const $3f5372c4ce85d94e$var$RequestState = {\n /**\n * Initial unissued state.\n *\n * @type {number}\n * @constant\n */ UNISSUED: 0,\n /**\n * Issued but not yet active. Will become active when open slots are available.\n *\n * @type {number}\n * @constant\n */ ISSUED: 1,\n /**\n * Actual http request has been sent.\n *\n * @type {number}\n * @constant\n */ ACTIVE: 2,\n /**\n * Request completed successfully.\n *\n * @type {number}\n * @constant\n */ RECEIVED: 3,\n /**\n * Request was cancelled, either explicitly or automatically because of low priority.\n *\n * @type {number}\n * @constant\n */ CANCELLED: 4,\n /**\n * Request failed.\n *\n * @type {number}\n * @constant\n */ FAILED: 5\n};\nvar $3f5372c4ce85d94e$export$2e2bcd8739ae039 = Object.freeze($3f5372c4ce85d94e$var$RequestState);\n\n\n/**\n * An enum identifying the type of request. Used for finer grained logging and priority sorting.\n *\n * @enum {number}\n */ const $a60081784b299462$var$RequestType = {\n /**\n * Terrain request.\n *\n * @type {number}\n * @constant\n */ TERRAIN: 0,\n /**\n * Imagery request.\n *\n * @type {number}\n * @constant\n */ IMAGERY: 1,\n /**\n * 3D Tiles request.\n *\n * @type {number}\n * @constant\n */ TILES3D: 2,\n /**\n * Other request.\n *\n * @type {number}\n * @constant\n */ OTHER: 3\n};\nvar $a60081784b299462$export$2e2bcd8739ae039 = Object.freeze($a60081784b299462$var$RequestType);\n\n\n/**\n * Stores information for making a request. In general this does not need to be constructed directly.\n *\n * @alias Request\n * @constructor\n\n * @param {object} [options] An object with the following properties:\n * @param {string} [options.url] The url to request.\n * @param {Request.RequestCallback} [options.requestFunction] The function that makes the actual data request.\n * @param {Request.CancelCallback} [options.cancelFunction] The function that is called when the request is cancelled.\n * @param {Request.PriorityCallback} [options.priorityFunction] The function that is called to update the request's priority, which occurs once per frame.\n * @param {number} [options.priority=0.0] The initial priority of the request.\n * @param {boolean} [options.throttle=false] Whether to throttle and prioritize the request. If false, the request will be sent immediately. If true, the request will be throttled and sent based on priority.\n * @param {boolean} [options.throttleByServer=false] Whether to throttle the request by server.\n * @param {RequestType} [options.type=RequestType.OTHER] The type of request.\n * @param {string} [options.serverKey] A key used to identify the server that a request is going to.\n */ function $b1445a5361079efc$var$Request(options) {\n options = (0, $8w8ZH.default)(options, (0, $8w8ZH.default).EMPTY_OBJECT);\n const throttleByServer = (0, $8w8ZH.default)(options.throttleByServer, false);\n const throttle = (0, $8w8ZH.default)(options.throttle, false);\n /**\n * The URL to request.\n *\n * @type {string}\n */ this.url = options.url;\n /**\n * The function that makes the actual data request.\n *\n * @type {Request.RequestCallback}\n */ this.requestFunction = options.requestFunction;\n /**\n * The function that is called when the request is cancelled.\n *\n * @type {Request.CancelCallback}\n */ this.cancelFunction = options.cancelFunction;\n /**\n * The function that is called to update the request's priority, which occurs once per frame.\n *\n * @type {Request.PriorityCallback}\n */ this.priorityFunction = options.priorityFunction;\n /**\n * Priority is a unit-less value where lower values represent higher priority.\n * For world-based objects, this is usually the distance from the camera.\n * A request that does not have a priority function defaults to a priority of 0.\n *\n * If priorityFunction is defined, this value is updated every frame with the result of that call.\n *\n * @type {number}\n * @default 0.0\n */ this.priority = (0, $8w8ZH.default)(options.priority, 0.0);\n /**\n * Whether to throttle and prioritize the request. If false, the request will be sent immediately. If true, the\n * request will be throttled and sent based on priority.\n *\n * @type {boolean}\n * @readonly\n *\n * @default false\n */ this.throttle = throttle;\n /**\n * Whether to throttle the request by server. Browsers typically support about 6-8 parallel connections\n * for HTTP/1 servers, and an unlimited amount of connections for HTTP/2 servers. Setting this value\n * to true is preferable for requests going through HTTP/1 servers.\n *\n * @type {boolean}\n * @readonly\n *\n * @default false\n */ this.throttleByServer = throttleByServer;\n /**\n * Type of request.\n *\n * @type {RequestType}\n * @readonly\n *\n * @default RequestType.OTHER\n */ this.type = (0, $8w8ZH.default)(options.type, (0, $a60081784b299462$export$2e2bcd8739ae039).OTHER);\n /**\n * A key used to identify the server that a request is going to. It is derived from the url's authority and scheme.\n *\n * @type {string}\n *\n * @private\n */ this.serverKey = options.serverKey;\n /**\n * The current state of the request.\n *\n * @type {RequestState}\n * @readonly\n */ this.state = (0, $3f5372c4ce85d94e$export$2e2bcd8739ae039).UNISSUED;\n /**\n * The requests's deferred promise.\n *\n * @type {object}\n *\n * @private\n */ this.deferred = undefined;\n /**\n * Whether the request was explicitly cancelled.\n *\n * @type {boolean}\n *\n * @private\n */ this.cancelled = false;\n}\n/**\n * Mark the request as cancelled.\n *\n * @private\n */ $b1445a5361079efc$var$Request.prototype.cancel = function() {\n this.cancelled = true;\n};\n/**\n * Duplicates a Request instance.\n *\n * @param {Request} [result] The object onto which to store the result.\n *\n * @returns {Request} The modified result parameter or a new Resource instance if one was not provided.\n */ $b1445a5361079efc$var$Request.prototype.clone = function(result) {\n if (!(0, $jQJji.default)(result)) return new $b1445a5361079efc$var$Request(this);\n result.url = this.url;\n result.requestFunction = this.requestFunction;\n result.cancelFunction = this.cancelFunction;\n result.priorityFunction = this.priorityFunction;\n result.priority = this.priority;\n result.throttle = this.throttle;\n result.throttleByServer = this.throttleByServer;\n result.type = this.type;\n result.serverKey = this.serverKey;\n // These get defaulted because the cloned request hasn't been issued\n result.state = (0, $3f5372c4ce85d94e$export$2e2bcd8739ae039).UNISSUED;\n result.deferred = undefined;\n result.cancelled = false;\n return result;\n};\nvar /**\n * The function that makes the actual data request.\n * @callback Request.RequestCallback\n * @returns {Promise} A promise for the requested data.\n */ /**\n * The function that is called when the request is cancelled.\n * @callback Request.CancelCallback\n */ /**\n * The function that is called to update the request's priority, which occurs once per frame.\n * @callback Request.PriorityCallback\n * @returns {number} The updated priority value.\n */ $b1445a5361079efc$export$2e2bcd8739ae039 = $b1445a5361079efc$var$Request;\n\n\n\nvar $jQJji = parcelRequire(\"jQJji\");\n/**\n * Parses the result of XMLHttpRequest's getAllResponseHeaders() method into\n * a dictionary.\n *\n * @function parseResponseHeaders\n *\n * @param {string} headerString The header string returned by getAllResponseHeaders(). The format is\n * described here: http://www.w3.org/TR/XMLHttpRequest/#the-getallresponseheaders()-method\n * @returns {object} A dictionary of key/value pairs, where each key is the name of a header and the corresponding value\n * is that header's value.\n *\n * @private\n */ function $caa58768bf1ed120$var$parseResponseHeaders(headerString) {\n const headers = {};\n if (!headerString) return headers;\n const headerPairs = headerString.split(\"\\r\\n\");\n for(let i = 0; i < headerPairs.length; ++i){\n const headerPair = headerPairs[i];\n // Can't use split() here because it does the wrong thing\n // if the header value has the string \": \" in it.\n const index = headerPair.indexOf(\": \");\n if (index > 0) {\n const key = headerPair.substring(0, index);\n const val = headerPair.substring(index + 2);\n headers[key] = val;\n }\n }\n return headers;\n}\nvar $caa58768bf1ed120$export$2e2bcd8739ae039 = $caa58768bf1ed120$var$parseResponseHeaders;\n\n\n/**\n * An event that is raised when a request encounters an error.\n *\n * @constructor\n * @alias RequestErrorEvent\n *\n * @param {number} [statusCode] The HTTP error status code, such as 404.\n * @param {object} [response] The response included along with the error.\n * @param {string|object} [responseHeaders] The response headers, represented either as an object literal or as a\n * string in the format returned by XMLHttpRequest's getAllResponseHeaders() function.\n */ function $91769fedd238ef04$var$RequestErrorEvent(statusCode, response, responseHeaders) {\n /**\n * The HTTP error status code, such as 404. If the error does not have a particular\n * HTTP code, this property will be undefined.\n *\n * @type {number}\n */ this.statusCode = statusCode;\n /**\n * The response included along with the error. If the error does not include a response,\n * this property will be undefined.\n *\n * @type {object}\n */ this.response = response;\n /**\n * The headers included in the response, represented as an object literal of key/value pairs.\n * If the error does not include any headers, this property will be undefined.\n *\n * @type {object}\n */ this.responseHeaders = responseHeaders;\n if (typeof this.responseHeaders === \"string\") this.responseHeaders = (0, $caa58768bf1ed120$export$2e2bcd8739ae039)(this.responseHeaders);\n}\n/**\n * Creates a string representing this RequestErrorEvent.\n * @memberof RequestErrorEvent\n *\n * @returns {string} A string representing the provided RequestErrorEvent.\n */ $91769fedd238ef04$var$RequestErrorEvent.prototype.toString = function() {\n let str = \"Request has failed.\";\n if ((0, $jQJji.default)(this.statusCode)) str += ` Status Code: ${this.statusCode}`;\n return str;\n};\nvar $91769fedd238ef04$export$2e2bcd8739ae039 = $91769fedd238ef04$var$RequestErrorEvent;\n\n\n\n\nvar $3pzcG = parcelRequire(\"3pzcG\");\n\nvar $8w8ZH = parcelRequire(\"8w8ZH\");\n\n\nvar $jQJji = parcelRequire(\"jQJji\");\n\nvar $3pzcG = parcelRequire(\"3pzcG\");\n\nvar $jQJji = parcelRequire(\"jQJji\");\n/**\n * A generic utility class for managing subscribers for a particular event.\n * This class is usually instantiated inside of a container class and\n * exposed as a property for others to subscribe to.\n *\n * @alias Event\n * @template Listener extends (...args: any[]) => void = (...args: any[]) => void\n * @constructor\n * @example\n * MyObject.prototype.myListener = function(arg1, arg2) {\n * this.myArg1Copy = arg1;\n * this.myArg2Copy = arg2;\n * }\n *\n * const myObjectInstance = new MyObject();\n * const evt = new Cesium.Event();\n * evt.addEventListener(MyObject.prototype.myListener, myObjectInstance);\n * evt.raiseEvent('1', '2');\n * evt.removeEventListener(MyObject.prototype.myListener);\n */ function $280a3f96dcc2704b$var$Event() {\n this._listeners = [];\n this._scopes = [];\n this._toRemove = [];\n this._insideRaiseEvent = false;\n}\nObject.defineProperties($280a3f96dcc2704b$var$Event.prototype, {\n /**\n * The number of listeners currently subscribed to the event.\n * @memberof Event.prototype\n * @type {number}\n * @readonly\n */ numberOfListeners: {\n get: function() {\n return this._listeners.length - this._toRemove.length;\n }\n }\n});\n/**\n * Registers a callback function to be executed whenever the event is raised.\n * An optional scope can be provided to serve as the this pointer\n * in which the function will execute.\n *\n * @param {Listener} listener The function to be executed when the event is raised.\n * @param {object} [scope] An optional object scope to serve as the this\n * pointer in which the listener function will execute.\n * @returns {Event.RemoveCallback} A function that will remove this event listener when invoked.\n *\n * @see Event#raiseEvent\n * @see Event#removeEventListener\n */ $280a3f96dcc2704b$var$Event.prototype.addEventListener = function(listener, scope) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.func(\"listener\", listener);\n //>>includeEnd('debug');\n this._listeners.push(listener);\n this._scopes.push(scope);\n const event = this;\n return function() {\n event.removeEventListener(listener, scope);\n };\n};\n/**\n * Unregisters a previously registered callback.\n *\n * @param {Listener} listener The function to be unregistered.\n * @param {object} [scope] The scope that was originally passed to addEventListener.\n * @returns {boolean} true if the listener was removed; false if the listener and scope are not registered with the event.\n *\n * @see Event#addEventListener\n * @see Event#raiseEvent\n */ $280a3f96dcc2704b$var$Event.prototype.removeEventListener = function(listener, scope) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.func(\"listener\", listener);\n //>>includeEnd('debug');\n const listeners = this._listeners;\n const scopes = this._scopes;\n let index = -1;\n for(let i = 0; i < listeners.length; i++)if (listeners[i] === listener && scopes[i] === scope) {\n index = i;\n break;\n }\n if (index !== -1) {\n if (this._insideRaiseEvent) {\n //In order to allow removing an event subscription from within\n //a callback, we don't actually remove the items here. Instead\n //remember the index they are at and undefined their value.\n this._toRemove.push(index);\n listeners[index] = undefined;\n scopes[index] = undefined;\n } else {\n listeners.splice(index, 1);\n scopes.splice(index, 1);\n }\n return true;\n }\n return false;\n};\nfunction $280a3f96dcc2704b$var$compareNumber(a, b) {\n return b - a;\n}\n/**\n * Raises the event by calling each registered listener with all supplied arguments.\n *\n * @param {...Parameters} arguments This method takes any number of parameters and passes them through to the listener functions.\n *\n * @see Event#addEventListener\n * @see Event#removeEventListener\n */ $280a3f96dcc2704b$var$Event.prototype.raiseEvent = function() {\n this._insideRaiseEvent = true;\n let i;\n const listeners = this._listeners;\n const scopes = this._scopes;\n let length = listeners.length;\n for(i = 0; i < length; i++){\n const listener = listeners[i];\n if ((0, $jQJji.default)(listener)) listeners[i].apply(scopes[i], arguments);\n }\n //Actually remove items removed in removeEventListener.\n const toRemove = this._toRemove;\n length = toRemove.length;\n if (length > 0) {\n toRemove.sort($280a3f96dcc2704b$var$compareNumber);\n for(i = 0; i < length; i++){\n const index = toRemove[i];\n listeners.splice(index, 1);\n scopes.splice(index, 1);\n }\n toRemove.length = 0;\n }\n this._insideRaiseEvent = false;\n};\nvar /**\n * A function that removes a listener.\n * @callback Event.RemoveCallback\n */ $280a3f96dcc2704b$export$2e2bcd8739ae039 = $280a3f96dcc2704b$var$Event;\n\n\n\nvar $3pzcG = parcelRequire(\"3pzcG\");\n\nvar $8w8ZH = parcelRequire(\"8w8ZH\");\n\nvar $jQJji = parcelRequire(\"jQJji\");\n/**\n * Array implementation of a heap.\n *\n * @alias Heap\n * @constructor\n * @private\n *\n * @param {object} options Object with the following properties:\n * @param {Heap.ComparatorCallback} options.comparator The comparator to use for the heap. If comparator(a, b) is less than 0, sort a to a lower index than b, otherwise sort to a higher index.\n */ function $3fa9322de64db78e$var$Heap(options) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"options\", options);\n (0, $3pzcG.default).defined(\"options.comparator\", options.comparator);\n //>>includeEnd('debug');\n this._comparator = options.comparator;\n this._array = [];\n this._length = 0;\n this._maximumLength = undefined;\n}\nObject.defineProperties($3fa9322de64db78e$var$Heap.prototype, {\n /**\n * Gets the length of the heap.\n *\n * @memberof Heap.prototype\n *\n * @type {number}\n * @readonly\n */ length: {\n get: function() {\n return this._length;\n }\n },\n /**\n * Gets the internal array.\n *\n * @memberof Heap.prototype\n *\n * @type {Array}\n * @readonly\n */ internalArray: {\n get: function() {\n return this._array;\n }\n },\n /**\n * Gets and sets the maximum length of the heap.\n *\n * @memberof Heap.prototype\n *\n * @type {number}\n */ maximumLength: {\n get: function() {\n return this._maximumLength;\n },\n set: function(value) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.number.greaterThanOrEquals(\"maximumLength\", value, 0);\n //>>includeEnd('debug');\n const originalLength = this._length;\n if (value < originalLength) {\n const array = this._array;\n // Remove trailing references\n for(let i = value; i < originalLength; ++i)array[i] = undefined;\n this._length = value;\n array.length = value;\n }\n this._maximumLength = value;\n }\n },\n /**\n * The comparator to use for the heap. If comparator(a, b) is less than 0, sort a to a lower index than b, otherwise sort to a higher index.\n *\n * @memberof Heap.prototype\n *\n * @type {Heap.ComparatorCallback}\n */ comparator: {\n get: function() {\n return this._comparator;\n }\n }\n});\nfunction $3fa9322de64db78e$var$swap(array, a, b) {\n const temp = array[a];\n array[a] = array[b];\n array[b] = temp;\n}\n/**\n * Resizes the internal array of the heap.\n *\n * @param {number} [length] The length to resize internal array to. Defaults to the current length of the heap.\n */ $3fa9322de64db78e$var$Heap.prototype.reserve = function(length) {\n length = (0, $8w8ZH.default)(length, this._length);\n this._array.length = length;\n};\n/**\n * Update the heap so that index and all descendants satisfy the heap property.\n *\n * @param {number} [index=0] The starting index to heapify from.\n */ $3fa9322de64db78e$var$Heap.prototype.heapify = function(index) {\n index = (0, $8w8ZH.default)(index, 0);\n const length = this._length;\n const comparator = this._comparator;\n const array = this._array;\n let candidate = -1;\n let inserting = true;\n while(inserting){\n const right = 2 * (index + 1);\n const left = right - 1;\n if (left < length && comparator(array[left], array[index]) < 0) candidate = left;\n else candidate = index;\n if (right < length && comparator(array[right], array[candidate]) < 0) candidate = right;\n if (candidate !== index) {\n $3fa9322de64db78e$var$swap(array, candidate, index);\n index = candidate;\n } else inserting = false;\n }\n};\n/**\n * Resort the heap.\n */ $3fa9322de64db78e$var$Heap.prototype.resort = function() {\n const length = this._length;\n for(let i = Math.ceil(length / 2); i >= 0; --i)this.heapify(i);\n};\n/**\n * Insert an element into the heap. If the length would grow greater than maximumLength\n * of the heap, extra elements are removed.\n *\n * @param {*} element The element to insert\n *\n * @return {*} The element that was removed from the heap if the heap is at full capacity.\n */ $3fa9322de64db78e$var$Heap.prototype.insert = function(element) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).defined(\"element\", element);\n //>>includeEnd('debug');\n const array = this._array;\n const comparator = this._comparator;\n const maximumLength = this._maximumLength;\n let index = this._length++;\n if (index < array.length) array[index] = element;\n else array.push(element);\n while(index !== 0){\n const parent = Math.floor((index - 1) / 2);\n if (comparator(array[index], array[parent]) < 0) {\n $3fa9322de64db78e$var$swap(array, index, parent);\n index = parent;\n } else break;\n }\n let removedElement;\n if ((0, $jQJji.default)(maximumLength) && this._length > maximumLength) {\n removedElement = array[maximumLength];\n this._length = maximumLength;\n }\n return removedElement;\n};\n/**\n * Remove the element specified by index from the heap and return it.\n *\n * @param {number} [index=0] The index to remove.\n * @returns {*} The specified element of the heap.\n */ $3fa9322de64db78e$var$Heap.prototype.pop = function(index) {\n index = (0, $8w8ZH.default)(index, 0);\n if (this._length === 0) return undefined;\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.number.lessThan(\"index\", index, this._length);\n //>>includeEnd('debug');\n const array = this._array;\n const root = array[index];\n $3fa9322de64db78e$var$swap(array, index, --this._length);\n this.heapify(index);\n array[this._length] = undefined; // Remove trailing reference\n return root;\n};\nvar /**\n * The comparator to use for the heap.\n * @callback Heap.ComparatorCallback\n * @param {*} a An element in the heap.\n * @param {*} b An element in the heap.\n * @returns {number} If the result of the comparison is less than 0, sort a to a lower index than b, otherwise sort to a higher index.\n */ $3fa9322de64db78e$export$2e2bcd8739ae039 = $3fa9322de64db78e$var$Heap;\n\n\n\n\n\nfunction $22996820477a6820$var$sortRequests(a, b) {\n return a.priority - b.priority;\n}\nconst $22996820477a6820$var$statistics = {\n numberOfAttemptedRequests: 0,\n numberOfActiveRequests: 0,\n numberOfCancelledRequests: 0,\n numberOfCancelledActiveRequests: 0,\n numberOfFailedRequests: 0,\n numberOfActiveRequestsEver: 0,\n lastNumberOfActiveRequests: 0\n};\nlet $22996820477a6820$var$priorityHeapLength = 20;\nconst $22996820477a6820$var$requestHeap = new (0, $3fa9322de64db78e$export$2e2bcd8739ae039)({\n comparator: $22996820477a6820$var$sortRequests\n});\n$22996820477a6820$var$requestHeap.maximumLength = $22996820477a6820$var$priorityHeapLength;\n$22996820477a6820$var$requestHeap.reserve($22996820477a6820$var$priorityHeapLength);\nconst $22996820477a6820$var$activeRequests = [];\nlet $22996820477a6820$var$numberOfActiveRequestsByServer = {};\nconst $22996820477a6820$var$pageUri = typeof document !== \"undefined\" ? new (0, (/*@__PURE__*/$parcel$interopDefault($f3b7c43a7f0c8e85$exports)))(document.location.href) : new (0, (/*@__PURE__*/$parcel$interopDefault($f3b7c43a7f0c8e85$exports)))();\nconst $22996820477a6820$var$requestCompletedEvent = new (0, $280a3f96dcc2704b$export$2e2bcd8739ae039)();\n/**\n * The request scheduler is used to track and constrain the number of active requests in order to prioritize incoming requests. The ability\n * to retain control over the number of requests in CesiumJS is important because due to events such as changes in the camera position,\n * a lot of new requests may be generated and a lot of in-flight requests may become redundant. The request scheduler manually constrains the\n * number of requests so that newer requests wait in a shorter queue and don't have to compete for bandwidth with requests that have expired.\n *\n * @namespace RequestScheduler\n *\n */ function $22996820477a6820$var$RequestScheduler() {}\n/**\n * The maximum number of simultaneous active requests. Un-throttled requests do not observe this limit.\n * @type {number}\n * @default 50\n */ $22996820477a6820$var$RequestScheduler.maximumRequests = 50;\n/**\n * The maximum number of simultaneous active requests per server. Un-throttled requests or servers specifically\n * listed in {@link requestsByServer} do not observe this limit.\n * @type {number}\n * @default 18\n */ $22996820477a6820$var$RequestScheduler.maximumRequestsPerServer = 18;\n/**\n * A per server key list of overrides to use for throttling instead of maximumRequestsPerServer.\n * Useful when streaming data from a known HTTP/2 or HTTP/3 server.\n * @type {object}\n *\n * @example\n * RequestScheduler.requestsByServer[\"myserver.com:443\"] = 18;\n *\n * @example\n * RequestScheduler.requestsByServer = {\n * \"api.cesium.com:443\": 18,\n * \"assets.cesium.com:443\": 18,\n * };\n */ $22996820477a6820$var$RequestScheduler.requestsByServer = {};\n/**\n * Specifies if the request scheduler should throttle incoming requests, or let the browser queue requests under its control.\n * @type {boolean}\n * @default true\n */ $22996820477a6820$var$RequestScheduler.throttleRequests = true;\n/**\n * When true, log statistics to the console every frame\n * @type {boolean}\n * @default false\n * @private\n */ $22996820477a6820$var$RequestScheduler.debugShowStatistics = false;\n/**\n * An event that's raised when a request is completed. Event handlers are passed\n * the error object if the request fails.\n *\n * @type {Event}\n * @default Event()\n * @private\n */ $22996820477a6820$var$RequestScheduler.requestCompletedEvent = $22996820477a6820$var$requestCompletedEvent;\nObject.defineProperties($22996820477a6820$var$RequestScheduler, {\n /**\n * Returns the statistics used by the request scheduler.\n *\n * @memberof RequestScheduler\n *\n * @type {object}\n * @readonly\n * @private\n */ statistics: {\n get: function() {\n return $22996820477a6820$var$statistics;\n }\n },\n /**\n * The maximum size of the priority heap. This limits the number of requests that are sorted by priority. Only applies to requests that are not yet active.\n *\n * @memberof RequestScheduler\n *\n * @type {number}\n * @default 20\n * @private\n */ priorityHeapLength: {\n get: function() {\n return $22996820477a6820$var$priorityHeapLength;\n },\n set: function(value) {\n // If the new length shrinks the heap, need to cancel some of the requests.\n // Since this value is not intended to be tweaked regularly it is fine to just cancel the high priority requests.\n if (value < $22996820477a6820$var$priorityHeapLength) while($22996820477a6820$var$requestHeap.length > value){\n const request = $22996820477a6820$var$requestHeap.pop();\n $22996820477a6820$var$cancelRequest(request);\n }\n $22996820477a6820$var$priorityHeapLength = value;\n $22996820477a6820$var$requestHeap.maximumLength = value;\n $22996820477a6820$var$requestHeap.reserve(value);\n }\n }\n});\nfunction $22996820477a6820$var$updatePriority(request) {\n if ((0, $jQJji.default)(request.priorityFunction)) request.priority = request.priorityFunction();\n}\n/**\n * Check if there are open slots for a particular server key. If desiredRequests is greater than 1, this checks if the queue has room for scheduling multiple requests.\n * @param {string} serverKey The server key returned by {@link RequestScheduler.getServerKey}.\n * @param {number} [desiredRequests=1] How many requests the caller plans to request\n * @return {boolean} True if there are enough open slots for desiredRequests more requests.\n * @private\n */ $22996820477a6820$var$RequestScheduler.serverHasOpenSlots = function(serverKey, desiredRequests) {\n desiredRequests = (0, $8w8ZH.default)(desiredRequests, 1);\n const maxRequests = (0, $8w8ZH.default)($22996820477a6820$var$RequestScheduler.requestsByServer[serverKey], $22996820477a6820$var$RequestScheduler.maximumRequestsPerServer);\n const hasOpenSlotsServer = $22996820477a6820$var$numberOfActiveRequestsByServer[serverKey] + desiredRequests <= maxRequests;\n return hasOpenSlotsServer;\n};\n/**\n * Check if the priority heap has open slots, regardless of which server they\n * are from. This is used in {@link Multiple3DTileContent} for determining when\n * all requests can be scheduled\n * @param {number} desiredRequests The number of requests the caller intends to make\n * @return {boolean} true if the heap has enough available slots to meet the desiredRequests. false otherwise.\n *\n * @private\n */ $22996820477a6820$var$RequestScheduler.heapHasOpenSlots = function(desiredRequests) {\n const hasOpenSlotsHeap = $22996820477a6820$var$requestHeap.length + desiredRequests <= $22996820477a6820$var$priorityHeapLength;\n return hasOpenSlotsHeap;\n};\nfunction $22996820477a6820$var$issueRequest(request) {\n if (request.state === (0, $3f5372c4ce85d94e$export$2e2bcd8739ae039).UNISSUED) {\n request.state = (0, $3f5372c4ce85d94e$export$2e2bcd8739ae039).ISSUED;\n request.deferred = (0, $6e11a2ab1ac0872e$export$2e2bcd8739ae039)();\n }\n return request.deferred.promise;\n}\nfunction $22996820477a6820$var$getRequestReceivedFunction(request) {\n return function(results) {\n if (request.state === (0, $3f5372c4ce85d94e$export$2e2bcd8739ae039).CANCELLED) // If the data request comes back but the request is cancelled, ignore it.\n return;\n // explicitly set to undefined to ensure GC of request response data. See #8843\n const deferred = request.deferred;\n --$22996820477a6820$var$statistics.numberOfActiveRequests;\n --$22996820477a6820$var$numberOfActiveRequestsByServer[request.serverKey];\n $22996820477a6820$var$requestCompletedEvent.raiseEvent();\n request.state = (0, $3f5372c4ce85d94e$export$2e2bcd8739ae039).RECEIVED;\n request.deferred = undefined;\n deferred.resolve(results);\n };\n}\nfunction $22996820477a6820$var$getRequestFailedFunction(request) {\n return function(error) {\n if (request.state === (0, $3f5372c4ce85d94e$export$2e2bcd8739ae039).CANCELLED) // If the data request comes back but the request is cancelled, ignore it.\n return;\n ++$22996820477a6820$var$statistics.numberOfFailedRequests;\n --$22996820477a6820$var$statistics.numberOfActiveRequests;\n --$22996820477a6820$var$numberOfActiveRequestsByServer[request.serverKey];\n $22996820477a6820$var$requestCompletedEvent.raiseEvent(error);\n request.state = (0, $3f5372c4ce85d94e$export$2e2bcd8739ae039).FAILED;\n request.deferred.reject(error);\n };\n}\nfunction $22996820477a6820$var$startRequest(request) {\n const promise = $22996820477a6820$var$issueRequest(request);\n request.state = (0, $3f5372c4ce85d94e$export$2e2bcd8739ae039).ACTIVE;\n $22996820477a6820$var$activeRequests.push(request);\n ++$22996820477a6820$var$statistics.numberOfActiveRequests;\n ++$22996820477a6820$var$statistics.numberOfActiveRequestsEver;\n ++$22996820477a6820$var$numberOfActiveRequestsByServer[request.serverKey];\n request.requestFunction().then($22996820477a6820$var$getRequestReceivedFunction(request)).catch($22996820477a6820$var$getRequestFailedFunction(request));\n return promise;\n}\nfunction $22996820477a6820$var$cancelRequest(request) {\n const active = request.state === (0, $3f5372c4ce85d94e$export$2e2bcd8739ae039).ACTIVE;\n request.state = (0, $3f5372c4ce85d94e$export$2e2bcd8739ae039).CANCELLED;\n ++$22996820477a6820$var$statistics.numberOfCancelledRequests;\n // check that deferred has not been cleared since cancelRequest can be called\n // on a finished request, e.g. by clearForSpecs during tests\n if ((0, $jQJji.default)(request.deferred)) {\n const deferred = request.deferred;\n request.deferred = undefined;\n deferred.reject();\n }\n if (active) {\n --$22996820477a6820$var$statistics.numberOfActiveRequests;\n --$22996820477a6820$var$numberOfActiveRequestsByServer[request.serverKey];\n ++$22996820477a6820$var$statistics.numberOfCancelledActiveRequests;\n }\n if ((0, $jQJji.default)(request.cancelFunction)) request.cancelFunction();\n}\n/**\n * Sort requests by priority and start requests.\n * @private\n */ $22996820477a6820$var$RequestScheduler.update = function() {\n let i;\n let request;\n // Loop over all active requests. Cancelled, failed, or received requests are removed from the array to make room for new requests.\n let removeCount = 0;\n const activeLength = $22996820477a6820$var$activeRequests.length;\n for(i = 0; i < activeLength; ++i){\n request = $22996820477a6820$var$activeRequests[i];\n if (request.cancelled) // Request was explicitly cancelled\n $22996820477a6820$var$cancelRequest(request);\n if (request.state !== (0, $3f5372c4ce85d94e$export$2e2bcd8739ae039).ACTIVE) {\n // Request is no longer active, remove from array\n ++removeCount;\n continue;\n }\n if (removeCount > 0) // Shift back to fill in vacated slots from completed requests\n $22996820477a6820$var$activeRequests[i - removeCount] = request;\n }\n $22996820477a6820$var$activeRequests.length -= removeCount;\n // Update priority of issued requests and resort the heap\n const issuedRequests = $22996820477a6820$var$requestHeap.internalArray;\n const issuedLength = $22996820477a6820$var$requestHeap.length;\n for(i = 0; i < issuedLength; ++i)$22996820477a6820$var$updatePriority(issuedRequests[i]);\n $22996820477a6820$var$requestHeap.resort();\n // Get the number of open slots and fill with the highest priority requests.\n // Un-throttled requests are automatically added to activeRequests, so activeRequests.length may exceed maximumRequests\n const openSlots = Math.max($22996820477a6820$var$RequestScheduler.maximumRequests - $22996820477a6820$var$activeRequests.length, 0);\n let filledSlots = 0;\n while(filledSlots < openSlots && $22996820477a6820$var$requestHeap.length > 0){\n // Loop until all open slots are filled or the heap becomes empty\n request = $22996820477a6820$var$requestHeap.pop();\n if (request.cancelled) {\n // Request was explicitly cancelled\n $22996820477a6820$var$cancelRequest(request);\n continue;\n }\n if (request.throttleByServer && !$22996820477a6820$var$RequestScheduler.serverHasOpenSlots(request.serverKey)) {\n // Open slots are available, but the request is throttled by its server. Cancel and try again later.\n $22996820477a6820$var$cancelRequest(request);\n continue;\n }\n $22996820477a6820$var$startRequest(request);\n ++filledSlots;\n }\n $22996820477a6820$var$updateStatistics();\n};\n/**\n * Get the server key from a given url.\n *\n * @param {string} url The url.\n * @returns {string} The server key.\n * @private\n */ $22996820477a6820$var$RequestScheduler.getServerKey = function(url) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.string(\"url\", url);\n //>>includeEnd('debug');\n let uri = new (0, (/*@__PURE__*/$parcel$interopDefault($f3b7c43a7f0c8e85$exports)))(url);\n if (uri.scheme() === \"\") {\n uri = uri.absoluteTo($22996820477a6820$var$pageUri);\n uri.normalize();\n }\n let serverKey = uri.authority();\n if (!/:/.test(serverKey)) // If the authority does not contain a port number, add port 443 for https or port 80 for http\n serverKey = `${serverKey}:${uri.scheme() === \"https\" ? \"443\" : \"80\"}`;\n const length = $22996820477a6820$var$numberOfActiveRequestsByServer[serverKey];\n if (!(0, $jQJji.default)(length)) $22996820477a6820$var$numberOfActiveRequestsByServer[serverKey] = 0;\n return serverKey;\n};\n/**\n * Issue a request. If request.throttle is false, the request is sent immediately. Otherwise the request will be\n * queued and sorted by priority before being sent.\n *\n * @param {Request} request The request object.\n *\n * @returns {Promise|undefined} A Promise for the requested data, or undefined if this request does not have high enough priority to be issued.\n *\n * @private\n */ $22996820477a6820$var$RequestScheduler.request = function(request) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"request\", request);\n (0, $3pzcG.default).typeOf.string(\"request.url\", request.url);\n (0, $3pzcG.default).typeOf.func(\"request.requestFunction\", request.requestFunction);\n //>>includeEnd('debug');\n if ((0, $9cb2c183cad552bd$export$2e2bcd8739ae039)(request.url) || (0, $9f0272ac2370f543$export$2e2bcd8739ae039)(request.url)) {\n $22996820477a6820$var$requestCompletedEvent.raiseEvent();\n request.state = (0, $3f5372c4ce85d94e$export$2e2bcd8739ae039).RECEIVED;\n return request.requestFunction();\n }\n ++$22996820477a6820$var$statistics.numberOfAttemptedRequests;\n if (!(0, $jQJji.default)(request.serverKey)) request.serverKey = $22996820477a6820$var$RequestScheduler.getServerKey(request.url);\n if ($22996820477a6820$var$RequestScheduler.throttleRequests && request.throttleByServer && !$22996820477a6820$var$RequestScheduler.serverHasOpenSlots(request.serverKey)) // Server is saturated. Try again later.\n return undefined;\n if (!$22996820477a6820$var$RequestScheduler.throttleRequests || !request.throttle) return $22996820477a6820$var$startRequest(request);\n if ($22996820477a6820$var$activeRequests.length >= $22996820477a6820$var$RequestScheduler.maximumRequests) // Active requests are saturated. Try again later.\n return undefined;\n // Insert into the priority heap and see if a request was bumped off. If this request is the lowest\n // priority it will be returned.\n $22996820477a6820$var$updatePriority(request);\n const removedRequest = $22996820477a6820$var$requestHeap.insert(request);\n if ((0, $jQJji.default)(removedRequest)) {\n if (removedRequest === request) // Request does not have high enough priority to be issued\n return undefined;\n // A previously issued request has been bumped off the priority heap, so cancel it\n $22996820477a6820$var$cancelRequest(removedRequest);\n }\n return $22996820477a6820$var$issueRequest(request);\n};\nfunction $22996820477a6820$var$updateStatistics() {\n if (!$22996820477a6820$var$RequestScheduler.debugShowStatistics) return;\n if ($22996820477a6820$var$statistics.numberOfActiveRequests === 0 && $22996820477a6820$var$statistics.lastNumberOfActiveRequests > 0) {\n if ($22996820477a6820$var$statistics.numberOfAttemptedRequests > 0) {\n console.log(`Number of attempted requests: ${$22996820477a6820$var$statistics.numberOfAttemptedRequests}`);\n $22996820477a6820$var$statistics.numberOfAttemptedRequests = 0;\n }\n if ($22996820477a6820$var$statistics.numberOfCancelledRequests > 0) {\n console.log(`Number of cancelled requests: ${$22996820477a6820$var$statistics.numberOfCancelledRequests}`);\n $22996820477a6820$var$statistics.numberOfCancelledRequests = 0;\n }\n if ($22996820477a6820$var$statistics.numberOfCancelledActiveRequests > 0) {\n console.log(`Number of cancelled active requests: ${$22996820477a6820$var$statistics.numberOfCancelledActiveRequests}`);\n $22996820477a6820$var$statistics.numberOfCancelledActiveRequests = 0;\n }\n if ($22996820477a6820$var$statistics.numberOfFailedRequests > 0) {\n console.log(`Number of failed requests: ${$22996820477a6820$var$statistics.numberOfFailedRequests}`);\n $22996820477a6820$var$statistics.numberOfFailedRequests = 0;\n }\n }\n $22996820477a6820$var$statistics.lastNumberOfActiveRequests = $22996820477a6820$var$statistics.numberOfActiveRequests;\n}\n/**\n * For testing only. Clears any requests that may not have completed from previous tests.\n *\n * @private\n */ $22996820477a6820$var$RequestScheduler.clearForSpecs = function() {\n while($22996820477a6820$var$requestHeap.length > 0){\n const request = $22996820477a6820$var$requestHeap.pop();\n $22996820477a6820$var$cancelRequest(request);\n }\n const length = $22996820477a6820$var$activeRequests.length;\n for(let i = 0; i < length; ++i)$22996820477a6820$var$cancelRequest($22996820477a6820$var$activeRequests[i]);\n $22996820477a6820$var$activeRequests.length = 0;\n $22996820477a6820$var$numberOfActiveRequestsByServer = {};\n // Clear stats\n $22996820477a6820$var$statistics.numberOfAttemptedRequests = 0;\n $22996820477a6820$var$statistics.numberOfActiveRequests = 0;\n $22996820477a6820$var$statistics.numberOfCancelledRequests = 0;\n $22996820477a6820$var$statistics.numberOfCancelledActiveRequests = 0;\n $22996820477a6820$var$statistics.numberOfFailedRequests = 0;\n $22996820477a6820$var$statistics.numberOfActiveRequestsEver = 0;\n $22996820477a6820$var$statistics.lastNumberOfActiveRequests = 0;\n};\n/**\n * For testing only.\n *\n * @private\n */ $22996820477a6820$var$RequestScheduler.numberOfActiveRequestsByServer = function(serverKey) {\n return $22996820477a6820$var$numberOfActiveRequestsByServer[serverKey];\n};\n/**\n * For testing only.\n *\n * @private\n */ $22996820477a6820$var$RequestScheduler.requestHeap = $22996820477a6820$var$requestHeap;\nvar $22996820477a6820$export$2e2bcd8739ae039 = $22996820477a6820$var$RequestScheduler;\n\n\n\n\n\n\nvar $jQJji = parcelRequire(\"jQJji\");\n\nvar $1vHsR = parcelRequire(\"1vHsR\");\n/**\n * A singleton that contains all of the servers that are trusted. Credentials will be sent with\n * any requests to these servers.\n *\n * @namespace TrustedServers\n *\n * @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}\n */ const $501f833019c34c9b$var$TrustedServers = {};\nlet $501f833019c34c9b$var$_servers = {};\n/**\n * Adds a trusted server to the registry\n *\n * @param {string} host The host to be added.\n * @param {number} port The port used to access the host.\n *\n * @example\n * // Add a trusted server\n * TrustedServers.add('my.server.com', 80);\n */ $501f833019c34c9b$var$TrustedServers.add = function(host, port) {\n //>>includeStart('debug', pragmas.debug);\n if (!(0, $jQJji.default)(host)) throw new (0, $1vHsR.default)(\"host is required.\");\n if (!(0, $jQJji.default)(port) || port <= 0) throw new (0, $1vHsR.default)(\"port is required to be greater than 0.\");\n //>>includeEnd('debug');\n const authority = `${host.toLowerCase()}:${port}`;\n if (!(0, $jQJji.default)($501f833019c34c9b$var$_servers[authority])) $501f833019c34c9b$var$_servers[authority] = true;\n};\n/**\n * Removes a trusted server from the registry\n *\n * @param {string} host The host to be removed.\n * @param {number} port The port used to access the host.\n *\n * @example\n * // Remove a trusted server\n * TrustedServers.remove('my.server.com', 80);\n */ $501f833019c34c9b$var$TrustedServers.remove = function(host, port) {\n //>>includeStart('debug', pragmas.debug);\n if (!(0, $jQJji.default)(host)) throw new (0, $1vHsR.default)(\"host is required.\");\n if (!(0, $jQJji.default)(port) || port <= 0) throw new (0, $1vHsR.default)(\"port is required to be greater than 0.\");\n //>>includeEnd('debug');\n const authority = `${host.toLowerCase()}:${port}`;\n if ((0, $jQJji.default)($501f833019c34c9b$var$_servers[authority])) delete $501f833019c34c9b$var$_servers[authority];\n};\nfunction $501f833019c34c9b$var$getAuthority(url) {\n const uri = new (0, (/*@__PURE__*/$parcel$interopDefault($f3b7c43a7f0c8e85$exports)))(url);\n uri.normalize();\n // Removes username:password@ so we just have host[:port]\n let authority = uri.authority();\n if (authority.length === 0) return undefined; // Relative URL\n uri.authority(authority);\n if (authority.indexOf(\"@\") !== -1) {\n const parts = authority.split(\"@\");\n authority = parts[1];\n }\n // If the port is missing add one based on the scheme\n if (authority.indexOf(\":\") === -1) {\n let scheme = uri.scheme();\n if (scheme.length === 0) {\n scheme = window.location.protocol;\n scheme = scheme.substring(0, scheme.length - 1);\n }\n if (scheme === \"http\") authority += \":80\";\n else if (scheme === \"https\") authority += \":443\";\n else return undefined;\n }\n return authority;\n}\n/**\n * Tests whether a server is trusted or not. The server must have been added with the port if it is included in the url.\n *\n * @param {string} url The url to be tested against the trusted list\n *\n * @returns {boolean} Returns true if url is trusted, false otherwise.\n *\n * @example\n * // Add server\n * TrustedServers.add('my.server.com', 81);\n *\n * // Check if server is trusted\n * if (TrustedServers.contains('https://my.server.com:81/path/to/file.png')) {\n * // my.server.com:81 is trusted\n * }\n * if (TrustedServers.contains('https://my.server.com/path/to/file.png')) {\n * // my.server.com isn't trusted\n * }\n */ $501f833019c34c9b$var$TrustedServers.contains = function(url) {\n //>>includeStart('debug', pragmas.debug);\n if (!(0, $jQJji.default)(url)) throw new (0, $1vHsR.default)(\"url is required.\");\n //>>includeEnd('debug');\n const authority = $501f833019c34c9b$var$getAuthority(url);\n if ((0, $jQJji.default)(authority) && (0, $jQJji.default)($501f833019c34c9b$var$_servers[authority])) return true;\n return false;\n};\n/**\n * Clears the registry\n *\n * @example\n * // Remove a trusted server\n * TrustedServers.clear();\n */ $501f833019c34c9b$var$TrustedServers.clear = function() {\n $501f833019c34c9b$var$_servers = {};\n};\nvar $501f833019c34c9b$export$2e2bcd8739ae039 = $501f833019c34c9b$var$TrustedServers;\n\n\nconst $b1dcbeb8d31d71ff$var$xhrBlobSupported = function() {\n try {\n const xhr = new XMLHttpRequest();\n xhr.open(\"GET\", \"#\", true);\n xhr.responseType = \"blob\";\n return xhr.responseType === \"blob\";\n } catch (e) {\n return false;\n }\n}();\n/**\n * @typedef {object} Resource.ConstructorOptions\n *\n * Initialization options for the Resource constructor\n *\n * @property {string} url The url of the resource.\n * @property {object} [queryParameters] An object containing query parameters that will be sent when retrieving the resource.\n * @property {object} [templateValues] Key/Value pairs that are used to replace template values (eg. {x}).\n * @property {object} [headers={}] Additional HTTP headers that will be sent.\n * @property {Proxy} [proxy] A proxy to be used when loading the resource.\n * @property {Resource.RetryCallback} [retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.\n * @property {number} [retryAttempts=0] The number of times the retryCallback should be called before giving up.\n * @property {Request} [request] A Request object that will be used. Intended for internal use only.\n * @property {boolean} [parseUrl=true] If true, parse the url for query parameters; otherwise store the url without change\n */ /**\n * A resource that includes the location and any other parameters we need to retrieve it or create derived resources. It also provides the ability to retry requests.\n *\n * @alias Resource\n * @constructor\n *\n * @param {string|Resource.ConstructorOptions} options A url or an object describing initialization options\n *\n * @example\n * function refreshTokenRetryCallback(resource, error) {\n * if (error.statusCode === 403) {\n * // 403 status code means a new token should be generated\n * return getNewAccessToken()\n * .then(function(token) {\n * resource.queryParameters.access_token = token;\n * return true;\n * })\n * .catch(function() {\n * return false;\n * });\n * }\n *\n * return false;\n * }\n *\n * const resource = new Resource({\n * url: 'http://server.com/path/to/resource.json',\n * proxy: new DefaultProxy('/proxy/'),\n * headers: {\n * 'X-My-Header': 'valueOfHeader'\n * },\n * queryParameters: {\n * 'access_token': '123-435-456-000'\n * },\n * retryCallback: refreshTokenRetryCallback,\n * retryAttempts: 1\n * });\n */ function $b1dcbeb8d31d71ff$var$Resource(options) {\n options = (0, $8w8ZH.default)(options, (0, $8w8ZH.default).EMPTY_OBJECT);\n if (typeof options === \"string\") options = {\n url: options\n };\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.string(\"options.url\", options.url);\n //>>includeEnd('debug');\n this._url = undefined;\n this._templateValues = $b1dcbeb8d31d71ff$var$defaultClone(options.templateValues, {});\n this._queryParameters = $b1dcbeb8d31d71ff$var$defaultClone(options.queryParameters, {});\n /**\n * Additional HTTP headers that will be sent with the request.\n *\n * @type {object}\n */ this.headers = $b1dcbeb8d31d71ff$var$defaultClone(options.headers, {});\n /**\n * A Request object that will be used. Intended for internal use only.\n *\n * @type {Request}\n */ this.request = (0, $8w8ZH.default)(options.request, new (0, $b1445a5361079efc$export$2e2bcd8739ae039)());\n /**\n * A proxy to be used when loading the resource.\n *\n * @type {Proxy}\n */ this.proxy = options.proxy;\n /**\n * Function to call when a request for this resource fails. If it returns true or a Promise that resolves to true, the request will be retried.\n *\n * @type {Function}\n */ this.retryCallback = options.retryCallback;\n /**\n * The number of times the retryCallback should be called before giving up.\n *\n * @type {number}\n */ this.retryAttempts = (0, $8w8ZH.default)(options.retryAttempts, 0);\n this._retryCount = 0;\n const parseUrl = (0, $8w8ZH.default)(options.parseUrl, true);\n if (parseUrl) this.parseUrl(options.url, true, true);\n else this._url = options.url;\n this._credits = options.credits;\n}\n/**\n * Clones a value if it is defined, otherwise returns the default value\n *\n * @param {object} [value] The value to clone.\n * @param {object} [defaultValue] The default value.\n *\n * @returns {object} A clone of value or the defaultValue.\n *\n * @private\n */ function $b1dcbeb8d31d71ff$var$defaultClone(value, defaultValue) {\n return (0, $jQJji.default)(value) ? (0, $3f52ff37d0636f55$export$2e2bcd8739ae039)(value) : defaultValue;\n}\n/**\n * A helper function to create a resource depending on whether we have a String or a Resource\n *\n * @param {Resource|string} resource A Resource or a String to use when creating a new Resource.\n *\n * @returns {Resource} If resource is a String, a Resource constructed with the url and options. Otherwise the resource parameter is returned.\n *\n * @private\n */ $b1dcbeb8d31d71ff$var$Resource.createIfNeeded = function(resource) {\n if (resource instanceof $b1dcbeb8d31d71ff$var$Resource) // Keep existing request object. This function is used internally to duplicate a Resource, so that it can't\n // be modified outside of a class that holds it (eg. an imagery or terrain provider). Since the Request objects\n // are managed outside of the providers, by the tile loading code, we want to keep the request property the same so if it is changed\n // in the underlying tiling code the requests for this resource will use it.\n return resource.getDerivedResource({\n request: resource.request\n });\n if (typeof resource !== \"string\") return resource;\n return new $b1dcbeb8d31d71ff$var$Resource({\n url: resource\n });\n};\nlet $b1dcbeb8d31d71ff$var$supportsImageBitmapOptionsPromise;\n/**\n * A helper function to check whether createImageBitmap supports passing ImageBitmapOptions.\n *\n * @returns {Promise} A promise that resolves to true if this browser supports creating an ImageBitmap with options.\n *\n * @private\n */ $b1dcbeb8d31d71ff$var$Resource.supportsImageBitmapOptions = function() {\n // Until the HTML folks figure out what to do about this, we need to actually try loading an image to\n // know if this browser supports passing options to the createImageBitmap function.\n // https://github.com/whatwg/html/pull/4248\n //\n // We also need to check whether the colorSpaceConversion option is supported.\n // We do this by loading a PNG with an embedded color profile, first with\n // colorSpaceConversion: \"none\" and then with colorSpaceConversion: \"default\".\n // If the pixel color is different then we know the option is working.\n // As of Webkit 17612.3.6.1.6 the createImageBitmap promise resolves but the\n // option is not actually supported.\n if ((0, $jQJji.default)($b1dcbeb8d31d71ff$var$supportsImageBitmapOptionsPromise)) return $b1dcbeb8d31d71ff$var$supportsImageBitmapOptionsPromise;\n if (typeof createImageBitmap !== \"function\") {\n $b1dcbeb8d31d71ff$var$supportsImageBitmapOptionsPromise = Promise.resolve(false);\n return $b1dcbeb8d31d71ff$var$supportsImageBitmapOptionsPromise;\n }\n const imageDataUri = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAABGdBTUEAAE4g3rEiDgAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADElEQVQI12Ng6GAAAAEUAIngE3ZiAAAAAElFTkSuQmCC\";\n $b1dcbeb8d31d71ff$var$supportsImageBitmapOptionsPromise = $b1dcbeb8d31d71ff$var$Resource.fetchBlob({\n url: imageDataUri\n }).then(function(blob) {\n const imageBitmapOptions = {\n imageOrientation: \"flipY\",\n premultiplyAlpha: \"none\",\n colorSpaceConversion: \"none\"\n };\n return Promise.all([\n createImageBitmap(blob, imageBitmapOptions),\n createImageBitmap(blob)\n ]);\n }).then(function(imageBitmaps) {\n // Check whether the colorSpaceConversion option had any effect on the green channel\n const colorWithOptions = (0, $5db98adec2cfcc7b$export$2e2bcd8739ae039)(imageBitmaps[0]);\n const colorWithDefaults = (0, $5db98adec2cfcc7b$export$2e2bcd8739ae039)(imageBitmaps[1]);\n return colorWithOptions[1] !== colorWithDefaults[1];\n }).catch(function() {\n return false;\n });\n return $b1dcbeb8d31d71ff$var$supportsImageBitmapOptionsPromise;\n};\nObject.defineProperties($b1dcbeb8d31d71ff$var$Resource, {\n /**\n * Returns true if blobs are supported.\n *\n * @memberof Resource\n * @type {boolean}\n *\n * @readonly\n */ isBlobSupported: {\n get: function() {\n return $b1dcbeb8d31d71ff$var$xhrBlobSupported;\n }\n }\n});\nObject.defineProperties($b1dcbeb8d31d71ff$var$Resource.prototype, {\n /**\n * Query parameters appended to the url.\n *\n * @memberof Resource.prototype\n * @type {object}\n *\n * @readonly\n */ queryParameters: {\n get: function() {\n return this._queryParameters;\n }\n },\n /**\n * The key/value pairs used to replace template parameters in the url.\n *\n * @memberof Resource.prototype\n * @type {object}\n *\n * @readonly\n */ templateValues: {\n get: function() {\n return this._templateValues;\n }\n },\n /**\n * The url to the resource with template values replaced, query string appended and encoded by proxy if one was set.\n *\n * @memberof Resource.prototype\n * @type {string}\n */ url: {\n get: function() {\n return this.getUrlComponent(true, true);\n },\n set: function(value) {\n this.parseUrl(value, false, false);\n }\n },\n /**\n * The file extension of the resource.\n *\n * @memberof Resource.prototype\n * @type {string}\n *\n * @readonly\n */ extension: {\n get: function() {\n return (0, $dce14f3284a3bc25$export$2e2bcd8739ae039)(this._url);\n }\n },\n /**\n * True if the Resource refers to a data URI.\n *\n * @memberof Resource.prototype\n * @type {boolean}\n */ isDataUri: {\n get: function() {\n return (0, $9cb2c183cad552bd$export$2e2bcd8739ae039)(this._url);\n }\n },\n /**\n * True if the Resource refers to a blob URI.\n *\n * @memberof Resource.prototype\n * @type {boolean}\n */ isBlobUri: {\n get: function() {\n return (0, $9f0272ac2370f543$export$2e2bcd8739ae039)(this._url);\n }\n },\n /**\n * True if the Resource refers to a cross origin URL.\n *\n * @memberof Resource.prototype\n * @type {boolean}\n */ isCrossOriginUrl: {\n get: function() {\n return (0, $6fb706f4a1c1ff12$export$2e2bcd8739ae039)(this._url);\n }\n },\n /**\n * True if the Resource has request headers. This is equivalent to checking if the headers property has any keys.\n *\n * @memberof Resource.prototype\n * @type {boolean}\n */ hasHeaders: {\n get: function() {\n return Object.keys(this.headers).length > 0;\n }\n },\n /**\n * Gets the credits required for attribution of an asset.\n * @private\n */ credits: {\n get: function() {\n return this._credits;\n }\n }\n});\n/**\n * Override Object#toString so that implicit string conversion gives the\n * complete URL represented by this Resource.\n *\n * @returns {string} The URL represented by this Resource\n */ $b1dcbeb8d31d71ff$var$Resource.prototype.toString = function() {\n return this.getUrlComponent(true, true);\n};\n/**\n * Parse a url string, and store its info\n *\n * @param {string} url The input url string.\n * @param {boolean} merge If true, we'll merge with the resource's existing queryParameters. Otherwise they will be replaced.\n * @param {boolean} preserveQuery If true duplicate parameters will be concatenated into an array. If false, keys in url will take precedence.\n * @param {string} [baseUrl] If supplied, and input url is a relative url, it will be made absolute relative to baseUrl\n *\n * @private\n */ $b1dcbeb8d31d71ff$var$Resource.prototype.parseUrl = function(url, merge, preserveQuery, baseUrl) {\n let uri = new (0, (/*@__PURE__*/$parcel$interopDefault($f3b7c43a7f0c8e85$exports)))(url);\n const query = $b1dcbeb8d31d71ff$var$parseQueryString(uri.query());\n this._queryParameters = merge ? $b1dcbeb8d31d71ff$var$combineQueryParameters(query, this.queryParameters, preserveQuery) : query;\n // Remove unneeded info from the Uri\n uri.search(\"\");\n uri.fragment(\"\");\n if ((0, $jQJji.default)(baseUrl) && uri.scheme() === \"\") uri = uri.absoluteTo((0, $5d7f3681ccbe43e2$export$2e2bcd8739ae039)(baseUrl));\n this._url = uri.toString();\n};\n/**\n * Parses a query string and returns the object equivalent.\n *\n * @param {string} queryString The query string\n * @returns {object}\n *\n * @private\n */ function $b1dcbeb8d31d71ff$var$parseQueryString(queryString) {\n if (queryString.length === 0) return {};\n // Special case where the querystring is just a string, not key/value pairs\n if (queryString.indexOf(\"=\") === -1) return {\n [queryString]: undefined\n };\n return (0, $cec685f2ea286a8a$export$2e2bcd8739ae039)(queryString);\n}\n/**\n * This combines a map of query parameters.\n *\n * @param {object} q1 The first map of query parameters. Values in this map will take precedence if preserveQueryParameters is false.\n * @param {object} q2 The second map of query parameters.\n * @param {boolean} preserveQueryParameters If true duplicate parameters will be concatenated into an array. If false, keys in q1 will take precedence.\n *\n * @returns {object} The combined map of query parameters.\n *\n * @example\n * const q1 = {\n * a: 1,\n * b: 2\n * };\n * const q2 = {\n * a: 3,\n * c: 4\n * };\n * const q3 = {\n * b: [5, 6],\n * d: 7\n * }\n *\n * // Returns\n * // {\n * // a: [1, 3],\n * // b: 2,\n * // c: 4\n * // };\n * combineQueryParameters(q1, q2, true);\n *\n * // Returns\n * // {\n * // a: 1,\n * // b: 2,\n * // c: 4\n * // };\n * combineQueryParameters(q1, q2, false);\n *\n * // Returns\n * // {\n * // a: 1,\n * // b: [2, 5, 6],\n * // d: 7\n * // };\n * combineQueryParameters(q1, q3, true);\n *\n * // Returns\n * // {\n * // a: 1,\n * // b: 2,\n * // d: 7\n * // };\n * combineQueryParameters(q1, q3, false);\n *\n * @private\n */ function $b1dcbeb8d31d71ff$var$combineQueryParameters(q1, q2, preserveQueryParameters) {\n if (!preserveQueryParameters) return (0, $8e522a73a8dfbfe2$export$2e2bcd8739ae039)(q1, q2);\n const result = (0, $3f52ff37d0636f55$export$2e2bcd8739ae039)(q1, true);\n for(const param in q2)if (q2.hasOwnProperty(param)) {\n let value = result[param];\n const q2Value = q2[param];\n if ((0, $jQJji.default)(value)) {\n if (!Array.isArray(value)) value = result[param] = [\n value\n ];\n result[param] = value.concat(q2Value);\n } else result[param] = Array.isArray(q2Value) ? q2Value.slice() : q2Value;\n }\n return result;\n}\n/**\n * Returns the url, optional with the query string and processed by a proxy.\n *\n * @param {boolean} [query=false] If true, the query string is included.\n * @param {boolean} [proxy=false] If true, the url is processed by the proxy object, if defined.\n *\n * @returns {string} The url with all the requested components.\n */ $b1dcbeb8d31d71ff$var$Resource.prototype.getUrlComponent = function(query, proxy) {\n if (this.isDataUri) return this._url;\n let url = this._url;\n if (query) url = `${url}${$b1dcbeb8d31d71ff$var$stringifyQuery(this.queryParameters)}`;\n // Restore the placeholders, which may have been escaped in objectToQuery or elsewhere\n url = url.replace(/%7B/g, \"{\").replace(/%7D/g, \"}\");\n const templateValues = this._templateValues;\n if (Object.keys(templateValues).length > 0) url = url.replace(/{(.*?)}/g, function(match, key) {\n const replacement = templateValues[key];\n if ((0, $jQJji.default)(replacement)) // use the replacement value from templateValues if there is one...\n return encodeURIComponent(replacement);\n // otherwise leave it unchanged\n return match;\n });\n if (proxy && (0, $jQJji.default)(this.proxy)) url = this.proxy.getURL(url);\n return url;\n};\n/**\n * Converts a query object into a string.\n *\n * @param {object} queryObject The object with query parameters\n * @returns {string}\n *\n * @private\n */ function $b1dcbeb8d31d71ff$var$stringifyQuery(queryObject) {\n const keys = Object.keys(queryObject);\n if (keys.length === 0) return \"\";\n if (keys.length === 1 && !(0, $jQJji.default)(queryObject[keys[0]])) // We have 1 key with an undefined value, so this is just a string, not key/value pairs\n return `?${keys[0]}`;\n return `?${(0, $cdf3d7de0c82329e$export$2e2bcd8739ae039)(queryObject)}`;\n}\n/**\n * Combines the specified object and the existing query parameters. This allows you to add many parameters at once,\n * as opposed to adding them one at a time to the queryParameters property. If a value is already set, it will be replaced with the new value.\n *\n * @param {object} params The query parameters\n * @param {boolean} [useAsDefault=false] If true the params will be used as the default values, so they will only be set if they are undefined.\n */ $b1dcbeb8d31d71ff$var$Resource.prototype.setQueryParameters = function(params, useAsDefault) {\n if (useAsDefault) this._queryParameters = $b1dcbeb8d31d71ff$var$combineQueryParameters(this._queryParameters, params, false);\n else this._queryParameters = $b1dcbeb8d31d71ff$var$combineQueryParameters(params, this._queryParameters, false);\n};\n/**\n * Combines the specified object and the existing query parameters. This allows you to add many parameters at once,\n * as opposed to adding them one at a time to the queryParameters property.\n *\n * @param {object} params The query parameters\n */ $b1dcbeb8d31d71ff$var$Resource.prototype.appendQueryParameters = function(params) {\n this._queryParameters = $b1dcbeb8d31d71ff$var$combineQueryParameters(params, this._queryParameters, true);\n};\n/**\n * Combines the specified object and the existing template values. This allows you to add many values at once,\n * as opposed to adding them one at a time to the templateValues property. If a value is already set, it will become an array and the new value will be appended.\n *\n * @param {object} template The template values\n * @param {boolean} [useAsDefault=false] If true the values will be used as the default values, so they will only be set if they are undefined.\n */ $b1dcbeb8d31d71ff$var$Resource.prototype.setTemplateValues = function(template, useAsDefault) {\n if (useAsDefault) this._templateValues = (0, $8e522a73a8dfbfe2$export$2e2bcd8739ae039)(this._templateValues, template);\n else this._templateValues = (0, $8e522a73a8dfbfe2$export$2e2bcd8739ae039)(template, this._templateValues);\n};\n/**\n * Returns a resource relative to the current instance. All properties remain the same as the current instance unless overridden in options.\n *\n * @param {object} options An object with the following properties\n * @param {string} [options.url] The url that will be resolved relative to the url of the current instance.\n * @param {object} [options.queryParameters] An object containing query parameters that will be combined with those of the current instance.\n * @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}). These will be combined with those of the current instance.\n * @param {object} [options.headers={}] Additional HTTP headers that will be sent.\n * @param {Proxy} [options.proxy] A proxy to be used when loading the resource.\n * @param {Resource.RetryCallback} [options.retryCallback] The function to call when loading the resource fails.\n * @param {number} [options.retryAttempts] The number of times the retryCallback should be called before giving up.\n * @param {Request} [options.request] A Request object that will be used. Intended for internal use only.\n * @param {boolean} [options.preserveQueryParameters=false] If true, this will keep all query parameters from the current resource and derived resource. If false, derived parameters will replace those of the current resource.\n *\n * @returns {Resource} The resource derived from the current one.\n */ $b1dcbeb8d31d71ff$var$Resource.prototype.getDerivedResource = function(options) {\n const resource = this.clone();\n resource._retryCount = 0;\n if ((0, $jQJji.default)(options.url)) {\n const preserveQuery = (0, $8w8ZH.default)(options.preserveQueryParameters, false);\n resource.parseUrl(options.url, true, preserveQuery, this._url);\n }\n if ((0, $jQJji.default)(options.queryParameters)) resource._queryParameters = (0, $8e522a73a8dfbfe2$export$2e2bcd8739ae039)(options.queryParameters, resource.queryParameters);\n if ((0, $jQJji.default)(options.templateValues)) resource._templateValues = (0, $8e522a73a8dfbfe2$export$2e2bcd8739ae039)(options.templateValues, resource.templateValues);\n if ((0, $jQJji.default)(options.headers)) resource.headers = (0, $8e522a73a8dfbfe2$export$2e2bcd8739ae039)(options.headers, resource.headers);\n if ((0, $jQJji.default)(options.proxy)) resource.proxy = options.proxy;\n if ((0, $jQJji.default)(options.request)) resource.request = options.request;\n if ((0, $jQJji.default)(options.retryCallback)) resource.retryCallback = options.retryCallback;\n if ((0, $jQJji.default)(options.retryAttempts)) resource.retryAttempts = options.retryAttempts;\n return resource;\n};\n/**\n * Called when a resource fails to load. This will call the retryCallback function if defined until retryAttempts is reached.\n *\n * @param {RequestErrorEvent} [error] The error that was encountered.\n *\n * @returns {Promise} A promise to a boolean, that if true will cause the resource request to be retried.\n *\n * @private\n */ $b1dcbeb8d31d71ff$var$Resource.prototype.retryOnError = function(error) {\n const retryCallback = this.retryCallback;\n if (typeof retryCallback !== \"function\" || this._retryCount >= this.retryAttempts) return Promise.resolve(false);\n const that = this;\n return Promise.resolve(retryCallback(this, error)).then(function(result) {\n ++that._retryCount;\n return result;\n });\n};\n/**\n * Duplicates a Resource instance.\n *\n * @param {Resource} [result] The object onto which to store the result.\n *\n * @returns {Resource} The modified result parameter or a new Resource instance if one was not provided.\n */ $b1dcbeb8d31d71ff$var$Resource.prototype.clone = function(result) {\n if (!(0, $jQJji.default)(result)) return new $b1dcbeb8d31d71ff$var$Resource({\n url: this._url,\n queryParameters: this.queryParameters,\n templateValues: this.templateValues,\n headers: this.headers,\n proxy: this.proxy,\n retryCallback: this.retryCallback,\n retryAttempts: this.retryAttempts,\n request: this.request.clone(),\n parseUrl: false,\n credits: (0, $jQJji.default)(this.credits) ? this.credits.slice() : undefined\n });\n result._url = this._url;\n result._queryParameters = (0, $3f52ff37d0636f55$export$2e2bcd8739ae039)(this._queryParameters);\n result._templateValues = (0, $3f52ff37d0636f55$export$2e2bcd8739ae039)(this._templateValues);\n result.headers = (0, $3f52ff37d0636f55$export$2e2bcd8739ae039)(this.headers);\n result.proxy = this.proxy;\n result.retryCallback = this.retryCallback;\n result.retryAttempts = this.retryAttempts;\n result._retryCount = 0;\n result.request = this.request.clone();\n return result;\n};\n/**\n * Returns the base path of the Resource.\n *\n * @param {boolean} [includeQuery = false] Whether or not to include the query string and fragment form the uri\n *\n * @returns {string} The base URI of the resource\n */ $b1dcbeb8d31d71ff$var$Resource.prototype.getBaseUri = function(includeQuery) {\n return (0, $d4cdc3514a25210c$export$2e2bcd8739ae039)(this.getUrlComponent(includeQuery), includeQuery);\n};\n/**\n * Appends a forward slash to the URL.\n */ $b1dcbeb8d31d71ff$var$Resource.prototype.appendForwardSlash = function() {\n this._url = (0, $120bf72c64f9e0f4$export$2e2bcd8739ae039)(this._url);\n};\n/**\n * Asynchronously loads the resource as raw binary data. Returns a promise that will resolve to\n * an ArrayBuffer once loaded, or reject if the resource failed to load. The data is loaded\n * using XMLHttpRequest, which means that in order to make requests to another origin,\n * the server must have Cross-Origin Resource Sharing (CORS) headers enabled.\n *\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n *\n * @example\n * // load a single URL asynchronously\n * resource.fetchArrayBuffer().then(function(arrayBuffer) {\n * // use the data\n * }).catch(function(error) {\n * // an error occurred\n * });\n *\n * @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}\n * @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}\n */ $b1dcbeb8d31d71ff$var$Resource.prototype.fetchArrayBuffer = function() {\n return this.fetch({\n responseType: \"arraybuffer\"\n });\n};\n/**\n * Creates a Resource and calls fetchArrayBuffer() on it.\n *\n * @param {string|object} options A url or an object with the following properties\n * @param {string} options.url The url of the resource.\n * @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.\n * @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).\n * @param {object} [options.headers={}] Additional HTTP headers that will be sent.\n * @param {Proxy} [options.proxy] A proxy to be used when loading the resource.\n * @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.\n * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.\n * @param {Request} [options.request] A Request object that will be used. Intended for internal use only.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n */ $b1dcbeb8d31d71ff$var$Resource.fetchArrayBuffer = function(options) {\n const resource = new $b1dcbeb8d31d71ff$var$Resource(options);\n return resource.fetchArrayBuffer();\n};\n/**\n * Asynchronously loads the given resource as a blob. Returns a promise that will resolve to\n * a Blob once loaded, or reject if the resource failed to load. The data is loaded\n * using XMLHttpRequest, which means that in order to make requests to another origin,\n * the server must have Cross-Origin Resource Sharing (CORS) headers enabled.\n *\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n *\n * @example\n * // load a single URL asynchronously\n * resource.fetchBlob().then(function(blob) {\n * // use the data\n * }).catch(function(error) {\n * // an error occurred\n * });\n *\n * @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}\n * @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}\n */ $b1dcbeb8d31d71ff$var$Resource.prototype.fetchBlob = function() {\n return this.fetch({\n responseType: \"blob\"\n });\n};\n/**\n * Creates a Resource and calls fetchBlob() on it.\n *\n * @param {string|object} options A url or an object with the following properties\n * @param {string} options.url The url of the resource.\n * @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.\n * @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).\n * @param {object} [options.headers={}] Additional HTTP headers that will be sent.\n * @param {Proxy} [options.proxy] A proxy to be used when loading the resource.\n * @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.\n * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.\n * @param {Request} [options.request] A Request object that will be used. Intended for internal use only.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n */ $b1dcbeb8d31d71ff$var$Resource.fetchBlob = function(options) {\n const resource = new $b1dcbeb8d31d71ff$var$Resource(options);\n return resource.fetchBlob();\n};\n/**\n * Asynchronously loads the given image resource. Returns a promise that will resolve to\n * an {@link https://developer.mozilla.org/en-US/docs/Web/API/ImageBitmap|ImageBitmap} if preferImageBitmap is true and the browser supports createImageBitmap or otherwise an\n * {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement|Image} once loaded, or reject if the image failed to load.\n *\n * @param {object} [options] An object with the following properties.\n * @param {boolean} [options.preferBlob=false] If true, we will load the image via a blob.\n * @param {boolean} [options.preferImageBitmap=false] If true, image will be decoded during fetch and an ImageBitmap is returned.\n * @param {boolean} [options.flipY=false] If true, image will be vertically flipped during decode. Only applies if the browser supports createImageBitmap.\n * @param {boolean} [options.skipColorSpaceConversion=false] If true, any custom gamma or color profiles in the image will be ignored. Only applies if the browser supports createImageBitmap.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n *\n *\n * @example\n * // load a single image asynchronously\n * resource.fetchImage().then(function(image) {\n * // use the loaded image\n * }).catch(function(error) {\n * // an error occurred\n * });\n *\n * // load several images in parallel\n * Promise.all([resource1.fetchImage(), resource2.fetchImage()]).then(function(images) {\n * // images is an array containing all the loaded images\n * });\n *\n * @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}\n * @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}\n */ $b1dcbeb8d31d71ff$var$Resource.prototype.fetchImage = function(options) {\n options = (0, $8w8ZH.default)(options, (0, $8w8ZH.default).EMPTY_OBJECT);\n const preferImageBitmap = (0, $8w8ZH.default)(options.preferImageBitmap, false);\n const preferBlob = (0, $8w8ZH.default)(options.preferBlob, false);\n const flipY = (0, $8w8ZH.default)(options.flipY, false);\n const skipColorSpaceConversion = (0, $8w8ZH.default)(options.skipColorSpaceConversion, false);\n $b1dcbeb8d31d71ff$var$checkAndResetRequest(this.request);\n // We try to load the image normally if\n // 1. Blobs aren't supported\n // 2. It's a data URI\n // 3. It's a blob URI\n // 4. It doesn't have request headers and we preferBlob is false\n if (!$b1dcbeb8d31d71ff$var$xhrBlobSupported || this.isDataUri || this.isBlobUri || !this.hasHeaders && !preferBlob) return $b1dcbeb8d31d71ff$var$fetchImage({\n resource: this,\n flipY: flipY,\n skipColorSpaceConversion: skipColorSpaceConversion,\n preferImageBitmap: preferImageBitmap\n });\n const blobPromise = this.fetchBlob();\n if (!(0, $jQJji.default)(blobPromise)) return;\n let supportsImageBitmap;\n let useImageBitmap;\n let generatedBlobResource;\n let generatedBlob;\n return $b1dcbeb8d31d71ff$var$Resource.supportsImageBitmapOptions().then(function(result) {\n supportsImageBitmap = result;\n useImageBitmap = supportsImageBitmap && preferImageBitmap;\n return blobPromise;\n }).then(function(blob) {\n if (!(0, $jQJji.default)(blob)) return;\n generatedBlob = blob;\n if (useImageBitmap) return $b1dcbeb8d31d71ff$var$Resource.createImageBitmapFromBlob(blob, {\n flipY: flipY,\n premultiplyAlpha: false,\n skipColorSpaceConversion: skipColorSpaceConversion\n });\n const blobUrl = window.URL.createObjectURL(blob);\n generatedBlobResource = new $b1dcbeb8d31d71ff$var$Resource({\n url: blobUrl\n });\n return $b1dcbeb8d31d71ff$var$fetchImage({\n resource: generatedBlobResource,\n flipY: flipY,\n skipColorSpaceConversion: skipColorSpaceConversion,\n preferImageBitmap: false\n });\n }).then(function(image) {\n if (!(0, $jQJji.default)(image)) return;\n // The blob object may be needed for use by a TileDiscardPolicy,\n // so attach it to the image.\n image.blob = generatedBlob;\n if (useImageBitmap) return image;\n window.URL.revokeObjectURL(generatedBlobResource.url);\n return image;\n }).catch(function(error) {\n if ((0, $jQJji.default)(generatedBlobResource)) window.URL.revokeObjectURL(generatedBlobResource.url);\n // If the blob load succeeded but the image decode failed, attach the blob\n // to the error object for use by a TileDiscardPolicy.\n // In particular, BingMapsImageryProvider uses this to detect the\n // zero-length response that is returned when a tile is not available.\n error.blob = generatedBlob;\n return Promise.reject(error);\n });\n};\n/**\n * Fetches an image and returns a promise to it.\n *\n * @param {object} [options] An object with the following properties.\n * @param {Resource} [options.resource] Resource object that points to an image to fetch.\n * @param {boolean} [options.preferImageBitmap] If true, image will be decoded during fetch and an ImageBitmap is returned.\n * @param {boolean} [options.flipY] If true, image will be vertically flipped during decode. Only applies if the browser supports createImageBitmap.\n * @param {boolean} [options.skipColorSpaceConversion=false] If true, any custom gamma or color profiles in the image will be ignored. Only applies if the browser supports createImageBitmap.\n * @private\n */ function $b1dcbeb8d31d71ff$var$fetchImage(options) {\n const resource = options.resource;\n const flipY = options.flipY;\n const skipColorSpaceConversion = options.skipColorSpaceConversion;\n const preferImageBitmap = options.preferImageBitmap;\n const request = resource.request;\n request.url = resource.url;\n request.requestFunction = function() {\n let crossOrigin = false;\n // data URIs can't have crossorigin set.\n if (!resource.isDataUri && !resource.isBlobUri) crossOrigin = resource.isCrossOriginUrl;\n const deferred = (0, $6e11a2ab1ac0872e$export$2e2bcd8739ae039)();\n $b1dcbeb8d31d71ff$var$Resource._Implementations.createImage(request, crossOrigin, deferred, flipY, skipColorSpaceConversion, preferImageBitmap);\n return deferred.promise;\n };\n const promise = (0, $22996820477a6820$export$2e2bcd8739ae039).request(request);\n if (!(0, $jQJji.default)(promise)) return;\n return promise.catch(function(e) {\n // Don't retry cancelled or otherwise aborted requests\n if (request.state !== (0, $3f5372c4ce85d94e$export$2e2bcd8739ae039).FAILED) return Promise.reject(e);\n return resource.retryOnError(e).then(function(retry) {\n if (retry) {\n // Reset request so it can try again\n request.state = (0, $3f5372c4ce85d94e$export$2e2bcd8739ae039).UNISSUED;\n request.deferred = undefined;\n return $b1dcbeb8d31d71ff$var$fetchImage({\n resource: resource,\n flipY: flipY,\n skipColorSpaceConversion: skipColorSpaceConversion,\n preferImageBitmap: preferImageBitmap\n });\n }\n return Promise.reject(e);\n });\n });\n}\n/**\n * Creates a Resource and calls fetchImage() on it.\n *\n * @param {string|object} options A url or an object with the following properties\n * @param {string} options.url The url of the resource.\n * @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.\n * @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).\n * @param {object} [options.headers={}] Additional HTTP headers that will be sent.\n * @param {Proxy} [options.proxy] A proxy to be used when loading the resource.\n * @param {boolean} [options.flipY=false] Whether to vertically flip the image during fetch and decode. Only applies when requesting an image and the browser supports createImageBitmap.\n * @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.\n * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.\n * @param {Request} [options.request] A Request object that will be used. Intended for internal use only.\n * @param {boolean} [options.preferBlob=false] If true, we will load the image via a blob.\n * @param {boolean} [options.preferImageBitmap=false] If true, image will be decoded during fetch and an ImageBitmap is returned.\n * @param {boolean} [options.skipColorSpaceConversion=false] If true, any custom gamma or color profiles in the image will be ignored. Only applies when requesting an image and the browser supports createImageBitmap.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n */ $b1dcbeb8d31d71ff$var$Resource.fetchImage = function(options) {\n const resource = new $b1dcbeb8d31d71ff$var$Resource(options);\n return resource.fetchImage({\n flipY: options.flipY,\n skipColorSpaceConversion: options.skipColorSpaceConversion,\n preferBlob: options.preferBlob,\n preferImageBitmap: options.preferImageBitmap\n });\n};\n/**\n * Asynchronously loads the given resource as text. Returns a promise that will resolve to\n * a String once loaded, or reject if the resource failed to load. The data is loaded\n * using XMLHttpRequest, which means that in order to make requests to another origin,\n * the server must have Cross-Origin Resource Sharing (CORS) headers enabled.\n *\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n *\n * @example\n * // load text from a URL, setting a custom header\n * const resource = new Resource({\n * url: 'http://someUrl.com/someJson.txt',\n * headers: {\n * 'X-Custom-Header' : 'some value'\n * }\n * });\n * resource.fetchText().then(function(text) {\n * // Do something with the text\n * }).catch(function(error) {\n * // an error occurred\n * });\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest|XMLHttpRequest}\n * @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}\n * @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}\n */ $b1dcbeb8d31d71ff$var$Resource.prototype.fetchText = function() {\n return this.fetch({\n responseType: \"text\"\n });\n};\n/**\n * Creates a Resource and calls fetchText() on it.\n *\n * @param {string|object} options A url or an object with the following properties\n * @param {string} options.url The url of the resource.\n * @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.\n * @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).\n * @param {object} [options.headers={}] Additional HTTP headers that will be sent.\n * @param {Proxy} [options.proxy] A proxy to be used when loading the resource.\n * @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.\n * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.\n * @param {Request} [options.request] A Request object that will be used. Intended for internal use only.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n */ $b1dcbeb8d31d71ff$var$Resource.fetchText = function(options) {\n const resource = new $b1dcbeb8d31d71ff$var$Resource(options);\n return resource.fetchText();\n};\n// note: */* below is */* but that ends the comment block early\n/**\n * Asynchronously loads the given resource as JSON. Returns a promise that will resolve to\n * a JSON object once loaded, or reject if the resource failed to load. The data is loaded\n * using XMLHttpRequest, which means that in order to make requests to another origin,\n * the server must have Cross-Origin Resource Sharing (CORS) headers enabled. This function\n * adds 'Accept: application/json,*/*;q=0.01' to the request headers, if not\n * already specified.\n *\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n *\n *\n * @example\n * resource.fetchJson().then(function(jsonData) {\n * // Do something with the JSON object\n * }).catch(function(error) {\n * // an error occurred\n * });\n *\n * @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}\n * @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}\n */ $b1dcbeb8d31d71ff$var$Resource.prototype.fetchJson = function() {\n const promise = this.fetch({\n responseType: \"text\",\n headers: {\n Accept: \"application/json,*/*;q=0.01\"\n }\n });\n if (!(0, $jQJji.default)(promise)) return undefined;\n return promise.then(function(value) {\n if (!(0, $jQJji.default)(value)) return;\n return JSON.parse(value);\n });\n};\n/**\n * Creates a Resource and calls fetchJson() on it.\n *\n * @param {string|object} options A url or an object with the following properties\n * @param {string} options.url The url of the resource.\n * @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.\n * @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).\n * @param {object} [options.headers={}] Additional HTTP headers that will be sent.\n * @param {Proxy} [options.proxy] A proxy to be used when loading the resource.\n * @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.\n * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.\n * @param {Request} [options.request] A Request object that will be used. Intended for internal use only.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n */ $b1dcbeb8d31d71ff$var$Resource.fetchJson = function(options) {\n const resource = new $b1dcbeb8d31d71ff$var$Resource(options);\n return resource.fetchJson();\n};\n/**\n * Asynchronously loads the given resource as XML. Returns a promise that will resolve to\n * an XML Document once loaded, or reject if the resource failed to load. The data is loaded\n * using XMLHttpRequest, which means that in order to make requests to another origin,\n * the server must have Cross-Origin Resource Sharing (CORS) headers enabled.\n *\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n *\n *\n * @example\n * // load XML from a URL, setting a custom header\n * Cesium.loadXML('http://someUrl.com/someXML.xml', {\n * 'X-Custom-Header' : 'some value'\n * }).then(function(document) {\n * // Do something with the document\n * }).catch(function(error) {\n * // an error occurred\n * });\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest|XMLHttpRequest}\n * @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}\n * @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}\n */ $b1dcbeb8d31d71ff$var$Resource.prototype.fetchXML = function() {\n return this.fetch({\n responseType: \"document\",\n overrideMimeType: \"text/xml\"\n });\n};\n/**\n * Creates a Resource and calls fetchXML() on it.\n *\n * @param {string|object} options A url or an object with the following properties\n * @param {string} options.url The url of the resource.\n * @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.\n * @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).\n * @param {object} [options.headers={}] Additional HTTP headers that will be sent.\n * @param {Proxy} [options.proxy] A proxy to be used when loading the resource.\n * @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.\n * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.\n * @param {Request} [options.request] A Request object that will be used. Intended for internal use only.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n */ $b1dcbeb8d31d71ff$var$Resource.fetchXML = function(options) {\n const resource = new $b1dcbeb8d31d71ff$var$Resource(options);\n return resource.fetchXML();\n};\n/**\n * Requests a resource using JSONP.\n *\n * @param {string} [callbackParameterName='callback'] The callback parameter name that the server expects.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n *\n *\n * @example\n * // load a data asynchronously\n * resource.fetchJsonp().then(function(data) {\n * // use the loaded data\n * }).catch(function(error) {\n * // an error occurred\n * });\n *\n * @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}\n */ $b1dcbeb8d31d71ff$var$Resource.prototype.fetchJsonp = function(callbackParameterName) {\n callbackParameterName = (0, $8w8ZH.default)(callbackParameterName, \"callback\");\n $b1dcbeb8d31d71ff$var$checkAndResetRequest(this.request);\n //generate a unique function name\n let functionName;\n do functionName = `loadJsonp${(0, $AXvpI.default).nextRandomNumber().toString().substring(2, 8)}`;\n while ((0, $jQJji.default)(window[functionName]));\n return $b1dcbeb8d31d71ff$var$fetchJsonp(this, callbackParameterName, functionName);\n};\nfunction $b1dcbeb8d31d71ff$var$fetchJsonp(resource, callbackParameterName, functionName) {\n const callbackQuery = {};\n callbackQuery[callbackParameterName] = functionName;\n resource.setQueryParameters(callbackQuery);\n const request = resource.request;\n const url = resource.url;\n request.url = url;\n request.requestFunction = function() {\n const deferred = (0, $6e11a2ab1ac0872e$export$2e2bcd8739ae039)();\n //assign a function with that name in the global scope\n window[functionName] = function(data) {\n deferred.resolve(data);\n try {\n delete window[functionName];\n } catch (e) {\n window[functionName] = undefined;\n }\n };\n $b1dcbeb8d31d71ff$var$Resource._Implementations.loadAndExecuteScript(url, functionName, deferred);\n return deferred.promise;\n };\n const promise = (0, $22996820477a6820$export$2e2bcd8739ae039).request(request);\n if (!(0, $jQJji.default)(promise)) return;\n return promise.catch(function(e) {\n if (request.state !== (0, $3f5372c4ce85d94e$export$2e2bcd8739ae039).FAILED) return Promise.reject(e);\n return resource.retryOnError(e).then(function(retry) {\n if (retry) {\n // Reset request so it can try again\n request.state = (0, $3f5372c4ce85d94e$export$2e2bcd8739ae039).UNISSUED;\n request.deferred = undefined;\n return $b1dcbeb8d31d71ff$var$fetchJsonp(resource, callbackParameterName, functionName);\n }\n return Promise.reject(e);\n });\n });\n}\n/**\n * Creates a Resource from a URL and calls fetchJsonp() on it.\n *\n * @param {string|object} options A url or an object with the following properties\n * @param {string} options.url The url of the resource.\n * @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.\n * @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).\n * @param {object} [options.headers={}] Additional HTTP headers that will be sent.\n * @param {Proxy} [options.proxy] A proxy to be used when loading the resource.\n * @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.\n * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.\n * @param {Request} [options.request] A Request object that will be used. Intended for internal use only.\n * @param {string} [options.callbackParameterName='callback'] The callback parameter name that the server expects.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n */ $b1dcbeb8d31d71ff$var$Resource.fetchJsonp = function(options) {\n const resource = new $b1dcbeb8d31d71ff$var$Resource(options);\n return resource.fetchJsonp(options.callbackParameterName);\n};\n/**\n * @private\n */ $b1dcbeb8d31d71ff$var$Resource.prototype._makeRequest = function(options) {\n const resource = this;\n $b1dcbeb8d31d71ff$var$checkAndResetRequest(resource.request);\n const request = resource.request;\n const url = resource.url;\n request.url = url;\n request.requestFunction = function() {\n const responseType = options.responseType;\n const headers = (0, $8e522a73a8dfbfe2$export$2e2bcd8739ae039)(options.headers, resource.headers);\n const overrideMimeType = options.overrideMimeType;\n const method = options.method;\n const data = options.data;\n const deferred = (0, $6e11a2ab1ac0872e$export$2e2bcd8739ae039)();\n const xhr = $b1dcbeb8d31d71ff$var$Resource._Implementations.loadWithXhr(url, responseType, method, data, headers, deferred, overrideMimeType);\n if ((0, $jQJji.default)(xhr) && (0, $jQJji.default)(xhr.abort)) request.cancelFunction = function() {\n xhr.abort();\n };\n return deferred.promise;\n };\n const promise = (0, $22996820477a6820$export$2e2bcd8739ae039).request(request);\n if (!(0, $jQJji.default)(promise)) return;\n return promise.then(function(data) {\n // explicitly set to undefined to ensure GC of request response data. See #8843\n request.cancelFunction = undefined;\n return data;\n }).catch(function(e) {\n request.cancelFunction = undefined;\n if (request.state !== (0, $3f5372c4ce85d94e$export$2e2bcd8739ae039).FAILED) return Promise.reject(e);\n return resource.retryOnError(e).then(function(retry) {\n if (retry) {\n // Reset request so it can try again\n request.state = (0, $3f5372c4ce85d94e$export$2e2bcd8739ae039).UNISSUED;\n request.deferred = undefined;\n return resource.fetch(options);\n }\n return Promise.reject(e);\n });\n });\n};\n/**\n * Checks to make sure the Resource isn't already being requested.\n *\n * @param {Request} request The request to check.\n *\n * @private\n */ function $b1dcbeb8d31d71ff$var$checkAndResetRequest(request) {\n if (request.state === (0, $3f5372c4ce85d94e$export$2e2bcd8739ae039).ISSUED || request.state === (0, $3f5372c4ce85d94e$export$2e2bcd8739ae039).ACTIVE) throw new (0, $60086b06bf5db23f$export$2e2bcd8739ae039)(\"The Resource is already being fetched.\");\n request.state = (0, $3f5372c4ce85d94e$export$2e2bcd8739ae039).UNISSUED;\n request.deferred = undefined;\n}\nconst $b1dcbeb8d31d71ff$var$dataUriRegex = /^data:(.*?)(;base64)?,(.*)$/;\nfunction $b1dcbeb8d31d71ff$var$decodeDataUriText(isBase64, data) {\n const result = decodeURIComponent(data);\n if (isBase64) return atob(result);\n return result;\n}\nfunction $b1dcbeb8d31d71ff$var$decodeDataUriArrayBuffer(isBase64, data) {\n const byteString = $b1dcbeb8d31d71ff$var$decodeDataUriText(isBase64, data);\n const buffer = new ArrayBuffer(byteString.length);\n const view = new Uint8Array(buffer);\n for(let i = 0; i < byteString.length; i++)view[i] = byteString.charCodeAt(i);\n return buffer;\n}\nfunction $b1dcbeb8d31d71ff$var$decodeDataUri(dataUriRegexResult, responseType) {\n responseType = (0, $8w8ZH.default)(responseType, \"\");\n const mimeType = dataUriRegexResult[1];\n const isBase64 = !!dataUriRegexResult[2];\n const data = dataUriRegexResult[3];\n let buffer;\n let parser;\n switch(responseType){\n case \"\":\n case \"text\":\n return $b1dcbeb8d31d71ff$var$decodeDataUriText(isBase64, data);\n case \"arraybuffer\":\n return $b1dcbeb8d31d71ff$var$decodeDataUriArrayBuffer(isBase64, data);\n case \"blob\":\n buffer = $b1dcbeb8d31d71ff$var$decodeDataUriArrayBuffer(isBase64, data);\n return new Blob([\n buffer\n ], {\n type: mimeType\n });\n case \"document\":\n parser = new DOMParser();\n return parser.parseFromString($b1dcbeb8d31d71ff$var$decodeDataUriText(isBase64, data), mimeType);\n case \"json\":\n return JSON.parse($b1dcbeb8d31d71ff$var$decodeDataUriText(isBase64, data));\n default:\n //>>includeStart('debug', pragmas.debug);\n throw new (0, $1vHsR.default)(`Unhandled responseType: ${responseType}`);\n }\n}\n/**\n * Asynchronously loads the given resource. Returns a promise that will resolve to\n * the result once loaded, or reject if the resource failed to load. The data is loaded\n * using XMLHttpRequest, which means that in order to make requests to another origin,\n * the server must have Cross-Origin Resource Sharing (CORS) headers enabled. It's recommended that you use\n * the more specific functions eg. fetchJson, fetchBlob, etc.\n *\n * @param {object} [options] Object with the following properties:\n * @param {string} [options.responseType] The type of response. This controls the type of item returned.\n * @param {object} [options.headers] Additional HTTP headers to send with the request, if any.\n * @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n *\n *\n * @example\n * resource.fetch()\n * .then(function(body) {\n * // use the data\n * }).catch(function(error) {\n * // an error occurred\n * });\n *\n * @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}\n * @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}\n */ $b1dcbeb8d31d71ff$var$Resource.prototype.fetch = function(options) {\n options = $b1dcbeb8d31d71ff$var$defaultClone(options, {});\n options.method = \"GET\";\n return this._makeRequest(options);\n};\n/**\n * Creates a Resource from a URL and calls fetch() on it.\n *\n * @param {string|object} options A url or an object with the following properties\n * @param {string} options.url The url of the resource.\n * @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.\n * @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).\n * @param {object} [options.headers={}] Additional HTTP headers that will be sent.\n * @param {Proxy} [options.proxy] A proxy to be used when loading the resource.\n * @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.\n * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.\n * @param {Request} [options.request] A Request object that will be used. Intended for internal use only.\n * @param {string} [options.responseType] The type of response. This controls the type of item returned.\n * @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n */ $b1dcbeb8d31d71ff$var$Resource.fetch = function(options) {\n const resource = new $b1dcbeb8d31d71ff$var$Resource(options);\n return resource.fetch({\n // Make copy of just the needed fields because headers can be passed to both the constructor and to fetch\n responseType: options.responseType,\n overrideMimeType: options.overrideMimeType\n });\n};\n/**\n * Asynchronously deletes the given resource. Returns a promise that will resolve to\n * the result once loaded, or reject if the resource failed to load. The data is loaded\n * using XMLHttpRequest, which means that in order to make requests to another origin,\n * the server must have Cross-Origin Resource Sharing (CORS) headers enabled.\n *\n * @param {object} [options] Object with the following properties:\n * @param {string} [options.responseType] The type of response. This controls the type of item returned.\n * @param {object} [options.headers] Additional HTTP headers to send with the request, if any.\n * @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n *\n *\n * @example\n * resource.delete()\n * .then(function(body) {\n * // use the data\n * }).catch(function(error) {\n * // an error occurred\n * });\n *\n * @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}\n * @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}\n */ $b1dcbeb8d31d71ff$var$Resource.prototype.delete = function(options) {\n options = $b1dcbeb8d31d71ff$var$defaultClone(options, {});\n options.method = \"DELETE\";\n return this._makeRequest(options);\n};\n/**\n * Creates a Resource from a URL and calls delete() on it.\n *\n * @param {string|object} options A url or an object with the following properties\n * @param {string} options.url The url of the resource.\n * @param {object} [options.data] Data that is posted with the resource.\n * @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.\n * @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).\n * @param {object} [options.headers={}] Additional HTTP headers that will be sent.\n * @param {Proxy} [options.proxy] A proxy to be used when loading the resource.\n * @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.\n * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.\n * @param {Request} [options.request] A Request object that will be used. Intended for internal use only.\n * @param {string} [options.responseType] The type of response. This controls the type of item returned.\n * @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n */ $b1dcbeb8d31d71ff$var$Resource.delete = function(options) {\n const resource = new $b1dcbeb8d31d71ff$var$Resource(options);\n return resource.delete({\n // Make copy of just the needed fields because headers can be passed to both the constructor and to fetch\n responseType: options.responseType,\n overrideMimeType: options.overrideMimeType,\n data: options.data\n });\n};\n/**\n * Asynchronously gets headers the given resource. Returns a promise that will resolve to\n * the result once loaded, or reject if the resource failed to load. The data is loaded\n * using XMLHttpRequest, which means that in order to make requests to another origin,\n * the server must have Cross-Origin Resource Sharing (CORS) headers enabled.\n *\n * @param {object} [options] Object with the following properties:\n * @param {string} [options.responseType] The type of response. This controls the type of item returned.\n * @param {object} [options.headers] Additional HTTP headers to send with the request, if any.\n * @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n *\n *\n * @example\n * resource.head()\n * .then(function(headers) {\n * // use the data\n * }).catch(function(error) {\n * // an error occurred\n * });\n *\n * @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}\n * @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}\n */ $b1dcbeb8d31d71ff$var$Resource.prototype.head = function(options) {\n options = $b1dcbeb8d31d71ff$var$defaultClone(options, {});\n options.method = \"HEAD\";\n return this._makeRequest(options);\n};\n/**\n * Creates a Resource from a URL and calls head() on it.\n *\n * @param {string|object} options A url or an object with the following properties\n * @param {string} options.url The url of the resource.\n * @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.\n * @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).\n * @param {object} [options.headers={}] Additional HTTP headers that will be sent.\n * @param {Proxy} [options.proxy] A proxy to be used when loading the resource.\n * @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.\n * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.\n * @param {Request} [options.request] A Request object that will be used. Intended for internal use only.\n * @param {string} [options.responseType] The type of response. This controls the type of item returned.\n * @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n */ $b1dcbeb8d31d71ff$var$Resource.head = function(options) {\n const resource = new $b1dcbeb8d31d71ff$var$Resource(options);\n return resource.head({\n // Make copy of just the needed fields because headers can be passed to both the constructor and to fetch\n responseType: options.responseType,\n overrideMimeType: options.overrideMimeType\n });\n};\n/**\n * Asynchronously gets options the given resource. Returns a promise that will resolve to\n * the result once loaded, or reject if the resource failed to load. The data is loaded\n * using XMLHttpRequest, which means that in order to make requests to another origin,\n * the server must have Cross-Origin Resource Sharing (CORS) headers enabled.\n *\n * @param {object} [options] Object with the following properties:\n * @param {string} [options.responseType] The type of response. This controls the type of item returned.\n * @param {object} [options.headers] Additional HTTP headers to send with the request, if any.\n * @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n *\n *\n * @example\n * resource.options()\n * .then(function(headers) {\n * // use the data\n * }).catch(function(error) {\n * // an error occurred\n * });\n *\n * @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}\n * @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}\n */ $b1dcbeb8d31d71ff$var$Resource.prototype.options = function(options) {\n options = $b1dcbeb8d31d71ff$var$defaultClone(options, {});\n options.method = \"OPTIONS\";\n return this._makeRequest(options);\n};\n/**\n * Creates a Resource from a URL and calls options() on it.\n *\n * @param {string|object} options A url or an object with the following properties\n * @param {string} options.url The url of the resource.\n * @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.\n * @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).\n * @param {object} [options.headers={}] Additional HTTP headers that will be sent.\n * @param {Proxy} [options.proxy] A proxy to be used when loading the resource.\n * @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.\n * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.\n * @param {Request} [options.request] A Request object that will be used. Intended for internal use only.\n * @param {string} [options.responseType] The type of response. This controls the type of item returned.\n * @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n */ $b1dcbeb8d31d71ff$var$Resource.options = function(options) {\n const resource = new $b1dcbeb8d31d71ff$var$Resource(options);\n return resource.options({\n // Make copy of just the needed fields because headers can be passed to both the constructor and to fetch\n responseType: options.responseType,\n overrideMimeType: options.overrideMimeType\n });\n};\n/**\n * Asynchronously posts data to the given resource. Returns a promise that will resolve to\n * the result once loaded, or reject if the resource failed to load. The data is loaded\n * using XMLHttpRequest, which means that in order to make requests to another origin,\n * the server must have Cross-Origin Resource Sharing (CORS) headers enabled.\n *\n * @param {object} data Data that is posted with the resource.\n * @param {object} [options] Object with the following properties:\n * @param {object} [options.data] Data that is posted with the resource.\n * @param {string} [options.responseType] The type of response. This controls the type of item returned.\n * @param {object} [options.headers] Additional HTTP headers to send with the request, if any.\n * @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n *\n *\n * @example\n * resource.post(data)\n * .then(function(result) {\n * // use the result\n * }).catch(function(error) {\n * // an error occurred\n * });\n *\n * @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}\n * @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}\n */ $b1dcbeb8d31d71ff$var$Resource.prototype.post = function(data, options) {\n (0, $3pzcG.default).defined(\"data\", data);\n options = $b1dcbeb8d31d71ff$var$defaultClone(options, {});\n options.method = \"POST\";\n options.data = data;\n return this._makeRequest(options);\n};\n/**\n * Creates a Resource from a URL and calls post() on it.\n *\n * @param {object} options A url or an object with the following properties\n * @param {string} options.url The url of the resource.\n * @param {object} options.data Data that is posted with the resource.\n * @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.\n * @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).\n * @param {object} [options.headers={}] Additional HTTP headers that will be sent.\n * @param {Proxy} [options.proxy] A proxy to be used when loading the resource.\n * @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.\n * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.\n * @param {Request} [options.request] A Request object that will be used. Intended for internal use only.\n * @param {string} [options.responseType] The type of response. This controls the type of item returned.\n * @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n */ $b1dcbeb8d31d71ff$var$Resource.post = function(options) {\n const resource = new $b1dcbeb8d31d71ff$var$Resource(options);\n return resource.post(options.data, {\n // Make copy of just the needed fields because headers can be passed to both the constructor and to post\n responseType: options.responseType,\n overrideMimeType: options.overrideMimeType\n });\n};\n/**\n * Asynchronously puts data to the given resource. Returns a promise that will resolve to\n * the result once loaded, or reject if the resource failed to load. The data is loaded\n * using XMLHttpRequest, which means that in order to make requests to another origin,\n * the server must have Cross-Origin Resource Sharing (CORS) headers enabled.\n *\n * @param {object} data Data that is posted with the resource.\n * @param {object} [options] Object with the following properties:\n * @param {string} [options.responseType] The type of response. This controls the type of item returned.\n * @param {object} [options.headers] Additional HTTP headers to send with the request, if any.\n * @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n *\n *\n * @example\n * resource.put(data)\n * .then(function(result) {\n * // use the result\n * }).catch(function(error) {\n * // an error occurred\n * });\n *\n * @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}\n * @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}\n */ $b1dcbeb8d31d71ff$var$Resource.prototype.put = function(data, options) {\n (0, $3pzcG.default).defined(\"data\", data);\n options = $b1dcbeb8d31d71ff$var$defaultClone(options, {});\n options.method = \"PUT\";\n options.data = data;\n return this._makeRequest(options);\n};\n/**\n * Creates a Resource from a URL and calls put() on it.\n *\n * @param {object} options A url or an object with the following properties\n * @param {string} options.url The url of the resource.\n * @param {object} options.data Data that is posted with the resource.\n * @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.\n * @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).\n * @param {object} [options.headers={}] Additional HTTP headers that will be sent.\n * @param {Proxy} [options.proxy] A proxy to be used when loading the resource.\n * @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.\n * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.\n * @param {Request} [options.request] A Request object that will be used. Intended for internal use only.\n * @param {string} [options.responseType] The type of response. This controls the type of item returned.\n * @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n */ $b1dcbeb8d31d71ff$var$Resource.put = function(options) {\n const resource = new $b1dcbeb8d31d71ff$var$Resource(options);\n return resource.put(options.data, {\n // Make copy of just the needed fields because headers can be passed to both the constructor and to post\n responseType: options.responseType,\n overrideMimeType: options.overrideMimeType\n });\n};\n/**\n * Asynchronously patches data to the given resource. Returns a promise that will resolve to\n * the result once loaded, or reject if the resource failed to load. The data is loaded\n * using XMLHttpRequest, which means that in order to make requests to another origin,\n * the server must have Cross-Origin Resource Sharing (CORS) headers enabled.\n *\n * @param {object} data Data that is posted with the resource.\n * @param {object} [options] Object with the following properties:\n * @param {string} [options.responseType] The type of response. This controls the type of item returned.\n * @param {object} [options.headers] Additional HTTP headers to send with the request, if any.\n * @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n *\n *\n * @example\n * resource.patch(data)\n * .then(function(result) {\n * // use the result\n * }).catch(function(error) {\n * // an error occurred\n * });\n *\n * @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}\n * @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}\n */ $b1dcbeb8d31d71ff$var$Resource.prototype.patch = function(data, options) {\n (0, $3pzcG.default).defined(\"data\", data);\n options = $b1dcbeb8d31d71ff$var$defaultClone(options, {});\n options.method = \"PATCH\";\n options.data = data;\n return this._makeRequest(options);\n};\n/**\n * Creates a Resource from a URL and calls patch() on it.\n *\n * @param {object} options A url or an object with the following properties\n * @param {string} options.url The url of the resource.\n * @param {object} options.data Data that is posted with the resource.\n * @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.\n * @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).\n * @param {object} [options.headers={}] Additional HTTP headers that will be sent.\n * @param {Proxy} [options.proxy] A proxy to be used when loading the resource.\n * @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.\n * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.\n * @param {Request} [options.request] A Request object that will be used. Intended for internal use only.\n * @param {string} [options.responseType] The type of response. This controls the type of item returned.\n * @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n */ $b1dcbeb8d31d71ff$var$Resource.patch = function(options) {\n const resource = new $b1dcbeb8d31d71ff$var$Resource(options);\n return resource.patch(options.data, {\n // Make copy of just the needed fields because headers can be passed to both the constructor and to post\n responseType: options.responseType,\n overrideMimeType: options.overrideMimeType\n });\n};\n/**\n * Contains implementations of functions that can be replaced for testing\n *\n * @private\n */ $b1dcbeb8d31d71ff$var$Resource._Implementations = {};\n$b1dcbeb8d31d71ff$var$Resource._Implementations.loadImageElement = function(url, crossOrigin, deferred) {\n const image = new Image();\n image.onload = function() {\n // work-around a known issue with Firefox and dimensionless SVG, see:\n // - https://github.com/whatwg/html/issues/3510\n // - https://bugzilla.mozilla.org/show_bug.cgi?id=700533\n if (image.naturalWidth === 0 && image.naturalHeight === 0 && image.width === 0 && image.height === 0) {\n // these values affect rasterization and will likely mar the content\n // until Firefox takes a stance on the issue, marred content is better than no content\n // Chromium uses a more refined heuristic about its choice given nil viewBox, and a better stance and solution is\n // proposed later in the original issue thread:\n // - Chromium behavior: https://github.com/CesiumGS/cesium/issues/9188#issuecomment-704400825\n // - Cesium's stance/solve: https://github.com/CesiumGS/cesium/issues/9188#issuecomment-720645777\n image.width = 300;\n image.height = 150;\n }\n deferred.resolve(image);\n };\n image.onerror = function(e) {\n deferred.reject(e);\n };\n if (crossOrigin) {\n if ((0, $501f833019c34c9b$export$2e2bcd8739ae039).contains(url)) image.crossOrigin = \"use-credentials\";\n else image.crossOrigin = \"\";\n }\n image.src = url;\n};\n$b1dcbeb8d31d71ff$var$Resource._Implementations.createImage = function(request, crossOrigin, deferred, flipY, skipColorSpaceConversion, preferImageBitmap) {\n const url = request.url;\n // Passing an Image to createImageBitmap will force it to run on the main thread\n // since DOM elements don't exist on workers. We convert it to a blob so it's non-blocking.\n // See:\n // https://bugzilla.mozilla.org/show_bug.cgi?id=1044102#c38\n // https://bugs.chromium.org/p/chromium/issues/detail?id=580202#c10\n $b1dcbeb8d31d71ff$var$Resource.supportsImageBitmapOptions().then(function(supportsImageBitmap) {\n // We can only use ImageBitmap if we can flip on decode.\n // See: https://github.com/CesiumGS/cesium/pull/7579#issuecomment-466146898\n if (!(supportsImageBitmap && preferImageBitmap)) {\n $b1dcbeb8d31d71ff$var$Resource._Implementations.loadImageElement(url, crossOrigin, deferred);\n return;\n }\n const responseType = \"blob\";\n const method = \"GET\";\n const xhrDeferred = (0, $6e11a2ab1ac0872e$export$2e2bcd8739ae039)();\n const xhr = $b1dcbeb8d31d71ff$var$Resource._Implementations.loadWithXhr(url, responseType, method, undefined, undefined, xhrDeferred, undefined, undefined, undefined);\n if ((0, $jQJji.default)(xhr) && (0, $jQJji.default)(xhr.abort)) request.cancelFunction = function() {\n xhr.abort();\n };\n return xhrDeferred.promise.then(function(blob) {\n if (!(0, $jQJji.default)(blob)) {\n deferred.reject(new (0, $60086b06bf5db23f$export$2e2bcd8739ae039)(`Successfully retrieved ${url} but it contained no content.`));\n return;\n }\n return $b1dcbeb8d31d71ff$var$Resource.createImageBitmapFromBlob(blob, {\n flipY: flipY,\n premultiplyAlpha: false,\n skipColorSpaceConversion: skipColorSpaceConversion\n });\n }).then(function(image) {\n deferred.resolve(image);\n });\n }).catch(function(e) {\n deferred.reject(e);\n });\n};\n/**\n * Wrapper for createImageBitmap\n *\n * @private\n */ $b1dcbeb8d31d71ff$var$Resource.createImageBitmapFromBlob = function(blob, options) {\n (0, $3pzcG.default).defined(\"options\", options);\n (0, $3pzcG.default).typeOf.bool(\"options.flipY\", options.flipY);\n (0, $3pzcG.default).typeOf.bool(\"options.premultiplyAlpha\", options.premultiplyAlpha);\n (0, $3pzcG.default).typeOf.bool(\"options.skipColorSpaceConversion\", options.skipColorSpaceConversion);\n return createImageBitmap(blob, {\n imageOrientation: options.flipY ? \"flipY\" : \"none\",\n premultiplyAlpha: options.premultiplyAlpha ? \"premultiply\" : \"none\",\n colorSpaceConversion: options.skipColorSpaceConversion ? \"none\" : \"default\"\n });\n};\nfunction $b1dcbeb8d31d71ff$var$loadWithHttpRequest(url, responseType, method, data, headers, deferred, overrideMimeType) {\n // Note: only the 'json' and 'text' responseTypes transforms the loaded buffer\n fetch(url, {\n method: method,\n headers: headers\n }).then(async (response)=>{\n if (!response.ok) {\n const responseHeaders = {};\n response.headers.forEach((value, key)=>{\n responseHeaders[key] = value;\n });\n deferred.reject(new (0, $91769fedd238ef04$export$2e2bcd8739ae039)(response.status, response, responseHeaders));\n return;\n }\n switch(responseType){\n case \"text\":\n deferred.resolve(response.text());\n break;\n case \"json\":\n deferred.resolve(response.json());\n break;\n default:\n deferred.resolve(new Uint8Array(await response.arrayBuffer()).buffer);\n break;\n }\n }).catch(()=>{\n deferred.reject(new (0, $91769fedd238ef04$export$2e2bcd8739ae039)());\n });\n}\nconst $b1dcbeb8d31d71ff$var$noXMLHttpRequest = typeof XMLHttpRequest === \"undefined\";\n$b1dcbeb8d31d71ff$var$Resource._Implementations.loadWithXhr = function(url, responseType, method, data, headers, deferred, overrideMimeType) {\n const dataUriRegexResult = $b1dcbeb8d31d71ff$var$dataUriRegex.exec(url);\n if (dataUriRegexResult !== null) {\n deferred.resolve($b1dcbeb8d31d71ff$var$decodeDataUri(dataUriRegexResult, responseType));\n return;\n }\n if ($b1dcbeb8d31d71ff$var$noXMLHttpRequest) {\n $b1dcbeb8d31d71ff$var$loadWithHttpRequest(url, responseType, method, data, headers, deferred, overrideMimeType);\n return;\n }\n const xhr = new XMLHttpRequest();\n if ((0, $501f833019c34c9b$export$2e2bcd8739ae039).contains(url)) xhr.withCredentials = true;\n xhr.open(method, url, true);\n if ((0, $jQJji.default)(overrideMimeType) && (0, $jQJji.default)(xhr.overrideMimeType)) xhr.overrideMimeType(overrideMimeType);\n if ((0, $jQJji.default)(headers)) {\n for(const key in headers)if (headers.hasOwnProperty(key)) xhr.setRequestHeader(key, headers[key]);\n }\n if ((0, $jQJji.default)(responseType)) xhr.responseType = responseType;\n // While non-standard, file protocol always returns a status of 0 on success\n let localFile = false;\n if (typeof url === \"string\") localFile = url.indexOf(\"file://\") === 0 || typeof window !== \"undefined\" && window.location.origin === \"file://\";\n xhr.onload = function() {\n if ((xhr.status < 200 || xhr.status >= 300) && !(localFile && xhr.status === 0)) {\n deferred.reject(new (0, $91769fedd238ef04$export$2e2bcd8739ae039)(xhr.status, xhr.response, xhr.getAllResponseHeaders()));\n return;\n }\n const response = xhr.response;\n const browserResponseType = xhr.responseType;\n if (method === \"HEAD\" || method === \"OPTIONS\") {\n const responseHeaderString = xhr.getAllResponseHeaders();\n const splitHeaders = responseHeaderString.trim().split(/[\\r\\n]+/);\n const responseHeaders = {};\n splitHeaders.forEach(function(line) {\n const parts = line.split(\": \");\n const header = parts.shift();\n responseHeaders[header] = parts.join(\": \");\n });\n deferred.resolve(responseHeaders);\n return;\n }\n //All modern browsers will go into either the first or second if block or last else block.\n //Other code paths support older browsers that either do not support the supplied responseType\n //or do not support the xhr.response property.\n if (xhr.status === 204) // accept no content\n deferred.resolve(undefined);\n else if ((0, $jQJji.default)(response) && (!(0, $jQJji.default)(responseType) || browserResponseType === responseType)) deferred.resolve(response);\n else if (responseType === \"json\" && typeof response === \"string\") try {\n deferred.resolve(JSON.parse(response));\n } catch (e) {\n deferred.reject(e);\n }\n else if ((browserResponseType === \"\" || browserResponseType === \"document\") && (0, $jQJji.default)(xhr.responseXML) && xhr.responseXML.hasChildNodes()) deferred.resolve(xhr.responseXML);\n else if ((browserResponseType === \"\" || browserResponseType === \"text\") && (0, $jQJji.default)(xhr.responseText)) deferred.resolve(xhr.responseText);\n else deferred.reject(new (0, $60086b06bf5db23f$export$2e2bcd8739ae039)(\"Invalid XMLHttpRequest response type.\"));\n };\n xhr.onerror = function(e) {\n deferred.reject(new (0, $91769fedd238ef04$export$2e2bcd8739ae039)());\n };\n xhr.send(data);\n return xhr;\n};\n$b1dcbeb8d31d71ff$var$Resource._Implementations.loadAndExecuteScript = function(url, functionName, deferred) {\n return (0, $e3fa9c82e19e3667$export$2e2bcd8739ae039)(url, functionName).catch(function(e) {\n deferred.reject(e);\n });\n};\n/**\n * The default implementations\n *\n * @private\n */ $b1dcbeb8d31d71ff$var$Resource._DefaultImplementations = {};\n$b1dcbeb8d31d71ff$var$Resource._DefaultImplementations.createImage = $b1dcbeb8d31d71ff$var$Resource._Implementations.createImage;\n$b1dcbeb8d31d71ff$var$Resource._DefaultImplementations.loadWithXhr = $b1dcbeb8d31d71ff$var$Resource._Implementations.loadWithXhr;\n$b1dcbeb8d31d71ff$var$Resource._DefaultImplementations.loadAndExecuteScript = $b1dcbeb8d31d71ff$var$Resource._Implementations.loadAndExecuteScript;\n/**\n * A resource instance initialized to the current browser location\n *\n * @type {Resource}\n * @constant\n */ $b1dcbeb8d31d71ff$var$Resource.DEFAULT = Object.freeze(new $b1dcbeb8d31d71ff$var$Resource({\n url: typeof document === \"undefined\" ? \"\" : document.location.href.split(\"?\")[0]\n}));\nvar /**\n * A function that returns the value of the property.\n * @callback Resource.RetryCallback\n *\n * @param {Resource} [resource] The resource that failed to load.\n * @param {RequestErrorEvent} [error] The error that occurred during the loading of the resource.\n * @returns {boolean|Promise} If true or a promise that resolved to true, the resource will be retried. Otherwise the failure will be returned.\n */ $b1dcbeb8d31d71ff$export$2e2bcd8739ae039 = $b1dcbeb8d31d71ff$var$Resource;\n\n\n\n\n\n/**\n * Specifies Earth polar motion coordinates and the difference between UT1 and UTC.\n * These Earth Orientation Parameters (EOP) are primarily used in the transformation from\n * the International Celestial Reference Frame (ICRF) to the International Terrestrial\n * Reference Frame (ITRF).\n * This object is normally not instantiated directly, use {@link EarthOrientationParameters.fromUrl}.\n *\n * @alias EarthOrientationParameters\n * @constructor\n *\n * @param {object} [options] Object with the following properties:\n * @param {object} [options.data] The actual EOP data. If neither this\n * parameter nor options.data is specified, all EOP values are assumed\n * to be 0.0.\n * @param {boolean} [options.addNewLeapSeconds=true] True if leap seconds that\n * are specified in the EOP data but not in {@link JulianDate.leapSeconds}\n * should be added to {@link JulianDate.leapSeconds}. False if\n * new leap seconds should be handled correctly in the context\n * of the EOP data but otherwise ignored.\n *\n * @private\n */ function $c1eef27c4238262a$var$EarthOrientationParameters(options) {\n options = (0, $8w8ZH.default)(options, (0, $8w8ZH.default).EMPTY_OBJECT);\n this._dates = undefined;\n this._samples = undefined;\n this._dateColumn = -1;\n this._xPoleWanderRadiansColumn = -1;\n this._yPoleWanderRadiansColumn = -1;\n this._ut1MinusUtcSecondsColumn = -1;\n this._xCelestialPoleOffsetRadiansColumn = -1;\n this._yCelestialPoleOffsetRadiansColumn = -1;\n this._taiMinusUtcSecondsColumn = -1;\n this._columnCount = 0;\n this._lastIndex = -1;\n this._addNewLeapSeconds = (0, $8w8ZH.default)(options.addNewLeapSeconds, true);\n if ((0, $jQJji.default)(options.data)) // Use supplied EOP data.\n $c1eef27c4238262a$var$onDataReady(this, options.data);\n else // Use all zeros for EOP data.\n $c1eef27c4238262a$var$onDataReady(this, {\n columnNames: [\n \"dateIso8601\",\n \"modifiedJulianDateUtc\",\n \"xPoleWanderRadians\",\n \"yPoleWanderRadians\",\n \"ut1MinusUtcSeconds\",\n \"lengthOfDayCorrectionSeconds\",\n \"xCelestialPoleOffsetRadians\",\n \"yCelestialPoleOffsetRadians\",\n \"taiMinusUtcSeconds\"\n ],\n samples: []\n });\n}\n/**\n *\n * @param {Resource|string} [url] The URL from which to obtain EOP data. If neither this\n * parameter nor options.data is specified, all EOP values are assumed\n * to be 0.0. If options.data is specified, this parameter is\n * ignored.\n * @param {object} [options] Object with the following properties:\n * @param {boolean} [options.addNewLeapSeconds=true] True if leap seconds that\n * are specified in the EOP data but not in {@link JulianDate.leapSeconds}\n * should be added to {@link JulianDate.leapSeconds}. False if\n * new leap seconds should be handled correctly in the context\n * of the EOP data but otherwise ignored.\n *\n * @example\n * // An example EOP data file, EOP.json:\n * {\n * \"columnNames\" : [\"dateIso8601\",\"modifiedJulianDateUtc\",\"xPoleWanderRadians\",\"yPoleWanderRadians\",\"ut1MinusUtcSeconds\",\"lengthOfDayCorrectionSeconds\",\"xCelestialPoleOffsetRadians\",\"yCelestialPoleOffsetRadians\",\"taiMinusUtcSeconds\"],\n * \"samples\" : [\n * \"2011-07-01T00:00:00Z\",55743.0,2.117957047295119e-7,2.111518721609984e-6,-0.2908948,-2.956e-4,3.393695767766752e-11,3.3452143996557983e-10,34.0,\n * \"2011-07-02T00:00:00Z\",55744.0,2.193297093339541e-7,2.115460256837405e-6,-0.29065,-1.824e-4,-8.241832578862112e-11,5.623838700870617e-10,34.0,\n * \"2011-07-03T00:00:00Z\",55745.0,2.262286080161428e-7,2.1191157519929706e-6,-0.2905572,1.9e-6,-3.490658503988659e-10,6.981317007977318e-10,34.0\n * ]\n * }\n *\n * @example\n * // Loading the EOP data\n * const eop = await Cesium.EarthOrientationParameters.fromUrl('Data/EOP.json');\n * Cesium.Transforms.earthOrientationParameters = eop;\n */ $c1eef27c4238262a$var$EarthOrientationParameters.fromUrl = async function(url, options) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).defined(\"url\", url);\n //>>includeEnd('debug');\n options = (0, $8w8ZH.default)(options, (0, $8w8ZH.default).EMPTY_OBJECT);\n const resource = (0, $b1dcbeb8d31d71ff$export$2e2bcd8739ae039).createIfNeeded(url);\n // Download EOP data.\n let eopData;\n try {\n eopData = await resource.fetchJson();\n } catch (e) {\n throw new (0, $60086b06bf5db23f$export$2e2bcd8739ae039)(`An error occurred while retrieving the EOP data from the URL ${resource.url}.`);\n }\n return new $c1eef27c4238262a$var$EarthOrientationParameters({\n addNewLeapSeconds: options.addNewLeapSeconds,\n data: eopData\n });\n};\n/**\n * A default {@link EarthOrientationParameters} instance that returns zero for all EOP values.\n */ $c1eef27c4238262a$var$EarthOrientationParameters.NONE = Object.freeze({\n compute: function(date, result) {\n if (!(0, $jQJji.default)(result)) result = new (0, $733293b70aae4cad$export$2e2bcd8739ae039)(0.0, 0.0, 0.0, 0.0, 0.0);\n else {\n result.xPoleWander = 0.0;\n result.yPoleWander = 0.0;\n result.xPoleOffset = 0.0;\n result.yPoleOffset = 0.0;\n result.ut1MinusUtc = 0.0;\n }\n return result;\n }\n});\n/**\n * Computes the Earth Orientation Parameters (EOP) for a given date by interpolating.\n * If the EOP data has not yet been download, this method returns undefined.\n *\n * @param {JulianDate} date The date for each to evaluate the EOP.\n * @param {EarthOrientationParametersSample} [result] The instance to which to copy the result.\n * If this parameter is undefined, a new instance is created and returned.\n * @returns {EarthOrientationParametersSample} The EOP evaluated at the given date, or\n * undefined if the data necessary to evaluate EOP at the date has not yet been\n * downloaded.\n *\n * @exception {RuntimeError} The loaded EOP data has an error and cannot be used.\n *\n * @see EarthOrientationParameters#fromUrl\n */ $c1eef27c4238262a$var$EarthOrientationParameters.prototype.compute = function(date, result) {\n // We cannot compute until the samples are available.\n if (!(0, $jQJji.default)(this._samples)) return undefined;\n if (!(0, $jQJji.default)(result)) result = new (0, $733293b70aae4cad$export$2e2bcd8739ae039)(0.0, 0.0, 0.0, 0.0, 0.0);\n if (this._samples.length === 0) {\n result.xPoleWander = 0.0;\n result.yPoleWander = 0.0;\n result.xPoleOffset = 0.0;\n result.yPoleOffset = 0.0;\n result.ut1MinusUtc = 0.0;\n return result;\n }\n const dates = this._dates;\n const lastIndex = this._lastIndex;\n let before = 0;\n let after = 0;\n if ((0, $jQJji.default)(lastIndex)) {\n const previousIndexDate = dates[lastIndex];\n const nextIndexDate = dates[lastIndex + 1];\n const isAfterPrevious = (0, $73b9691e04761700$export$2e2bcd8739ae039).lessThanOrEquals(previousIndexDate, date);\n const isAfterLastSample = !(0, $jQJji.default)(nextIndexDate);\n const isBeforeNext = isAfterLastSample || (0, $73b9691e04761700$export$2e2bcd8739ae039).greaterThanOrEquals(nextIndexDate, date);\n if (isAfterPrevious && isBeforeNext) {\n before = lastIndex;\n if (!isAfterLastSample && nextIndexDate.equals(date)) ++before;\n after = before + 1;\n $c1eef27c4238262a$var$interpolate(this, dates, this._samples, date, before, after, result);\n return result;\n }\n }\n let index = (0, $52c19b09ece4c63f$export$2e2bcd8739ae039)(dates, date, (0, $73b9691e04761700$export$2e2bcd8739ae039).compare, this._dateColumn);\n if (index >= 0) {\n // If the next entry is the same date, use the later entry. This way, if two entries\n // describe the same moment, one before a leap second and the other after, then we will use\n // the post-leap second data.\n if (index < dates.length - 1 && dates[index + 1].equals(date)) ++index;\n before = index;\n after = index;\n } else {\n after = ~index;\n before = after - 1;\n // Use the first entry if the date requested is before the beginning of the data.\n if (before < 0) before = 0;\n }\n this._lastIndex = before;\n $c1eef27c4238262a$var$interpolate(this, dates, this._samples, date, before, after, result);\n return result;\n};\nfunction $c1eef27c4238262a$var$compareLeapSecondDates(leapSecond, dateToFind) {\n return (0, $73b9691e04761700$export$2e2bcd8739ae039).compare(leapSecond.julianDate, dateToFind);\n}\nfunction $c1eef27c4238262a$var$onDataReady(eop, eopData) {\n if (!(0, $jQJji.default)(eopData.columnNames)) throw new (0, $60086b06bf5db23f$export$2e2bcd8739ae039)(\"Error in loaded EOP data: The columnNames property is required.\");\n if (!(0, $jQJji.default)(eopData.samples)) throw new (0, $60086b06bf5db23f$export$2e2bcd8739ae039)(\"Error in loaded EOP data: The samples property is required.\");\n const dateColumn = eopData.columnNames.indexOf(\"modifiedJulianDateUtc\");\n const xPoleWanderRadiansColumn = eopData.columnNames.indexOf(\"xPoleWanderRadians\");\n const yPoleWanderRadiansColumn = eopData.columnNames.indexOf(\"yPoleWanderRadians\");\n const ut1MinusUtcSecondsColumn = eopData.columnNames.indexOf(\"ut1MinusUtcSeconds\");\n const xCelestialPoleOffsetRadiansColumn = eopData.columnNames.indexOf(\"xCelestialPoleOffsetRadians\");\n const yCelestialPoleOffsetRadiansColumn = eopData.columnNames.indexOf(\"yCelestialPoleOffsetRadians\");\n const taiMinusUtcSecondsColumn = eopData.columnNames.indexOf(\"taiMinusUtcSeconds\");\n if (dateColumn < 0 || xPoleWanderRadiansColumn < 0 || yPoleWanderRadiansColumn < 0 || ut1MinusUtcSecondsColumn < 0 || xCelestialPoleOffsetRadiansColumn < 0 || yCelestialPoleOffsetRadiansColumn < 0 || taiMinusUtcSecondsColumn < 0) throw new (0, $60086b06bf5db23f$export$2e2bcd8739ae039)(\"Error in loaded EOP data: The columnNames property must include modifiedJulianDateUtc, xPoleWanderRadians, yPoleWanderRadians, ut1MinusUtcSeconds, xCelestialPoleOffsetRadians, yCelestialPoleOffsetRadians, and taiMinusUtcSeconds columns\");\n const samples = eop._samples = eopData.samples;\n const dates = eop._dates = [];\n eop._dateColumn = dateColumn;\n eop._xPoleWanderRadiansColumn = xPoleWanderRadiansColumn;\n eop._yPoleWanderRadiansColumn = yPoleWanderRadiansColumn;\n eop._ut1MinusUtcSecondsColumn = ut1MinusUtcSecondsColumn;\n eop._xCelestialPoleOffsetRadiansColumn = xCelestialPoleOffsetRadiansColumn;\n eop._yCelestialPoleOffsetRadiansColumn = yCelestialPoleOffsetRadiansColumn;\n eop._taiMinusUtcSecondsColumn = taiMinusUtcSecondsColumn;\n eop._columnCount = eopData.columnNames.length;\n eop._lastIndex = undefined;\n let lastTaiMinusUtc;\n const addNewLeapSeconds = eop._addNewLeapSeconds;\n // Convert the ISO8601 dates to JulianDates.\n for(let i = 0, len = samples.length; i < len; i += eop._columnCount){\n const mjd = samples[i + dateColumn];\n const taiMinusUtc = samples[i + taiMinusUtcSecondsColumn];\n const day = mjd + (0, $e3d50c782acbaff1$export$2e2bcd8739ae039).MODIFIED_JULIAN_DATE_DIFFERENCE;\n const date = new (0, $73b9691e04761700$export$2e2bcd8739ae039)(day, taiMinusUtc, (0, $134462e760c5c083$export$2e2bcd8739ae039).TAI);\n dates.push(date);\n if (addNewLeapSeconds) {\n if (taiMinusUtc !== lastTaiMinusUtc && (0, $jQJji.default)(lastTaiMinusUtc)) {\n // We crossed a leap second boundary, so add the leap second\n // if it does not already exist.\n const leapSeconds = (0, $73b9691e04761700$export$2e2bcd8739ae039).leapSeconds;\n const leapSecondIndex = (0, $52c19b09ece4c63f$export$2e2bcd8739ae039)(leapSeconds, date, $c1eef27c4238262a$var$compareLeapSecondDates);\n if (leapSecondIndex < 0) {\n const leapSecond = new (0, $97869fccaa735547$export$2e2bcd8739ae039)(date, taiMinusUtc);\n leapSeconds.splice(~leapSecondIndex, 0, leapSecond);\n }\n }\n lastTaiMinusUtc = taiMinusUtc;\n }\n }\n}\nfunction $c1eef27c4238262a$var$fillResultFromIndex(eop, samples, index, columnCount, result) {\n const start = index * columnCount;\n result.xPoleWander = samples[start + eop._xPoleWanderRadiansColumn];\n result.yPoleWander = samples[start + eop._yPoleWanderRadiansColumn];\n result.xPoleOffset = samples[start + eop._xCelestialPoleOffsetRadiansColumn];\n result.yPoleOffset = samples[start + eop._yCelestialPoleOffsetRadiansColumn];\n result.ut1MinusUtc = samples[start + eop._ut1MinusUtcSecondsColumn];\n}\nfunction $c1eef27c4238262a$var$linearInterp(dx, y1, y2) {\n return y1 + dx * (y2 - y1);\n}\nfunction $c1eef27c4238262a$var$interpolate(eop, dates, samples, date, before, after, result) {\n const columnCount = eop._columnCount;\n // First check the bounds on the EOP data\n // If we are after the bounds of the data, return zeros.\n // The 'before' index should never be less than zero.\n if (after > dates.length - 1) {\n result.xPoleWander = 0;\n result.yPoleWander = 0;\n result.xPoleOffset = 0;\n result.yPoleOffset = 0;\n result.ut1MinusUtc = 0;\n return result;\n }\n const beforeDate = dates[before];\n const afterDate = dates[after];\n if (beforeDate.equals(afterDate) || date.equals(beforeDate)) {\n $c1eef27c4238262a$var$fillResultFromIndex(eop, samples, before, columnCount, result);\n return result;\n } else if (date.equals(afterDate)) {\n $c1eef27c4238262a$var$fillResultFromIndex(eop, samples, after, columnCount, result);\n return result;\n }\n const factor = (0, $73b9691e04761700$export$2e2bcd8739ae039).secondsDifference(date, beforeDate) / (0, $73b9691e04761700$export$2e2bcd8739ae039).secondsDifference(afterDate, beforeDate);\n const startBefore = before * columnCount;\n const startAfter = after * columnCount;\n // Handle UT1 leap second edge case\n let beforeUt1MinusUtc = samples[startBefore + eop._ut1MinusUtcSecondsColumn];\n let afterUt1MinusUtc = samples[startAfter + eop._ut1MinusUtcSecondsColumn];\n const offsetDifference = afterUt1MinusUtc - beforeUt1MinusUtc;\n if (offsetDifference > 0.5 || offsetDifference < -0.5) {\n // The absolute difference between the values is more than 0.5, so we may have\n // crossed a leap second. Check if this is the case and, if so, adjust the\n // afterValue to account for the leap second. This way, our interpolation will\n // produce reasonable results.\n const beforeTaiMinusUtc = samples[startBefore + eop._taiMinusUtcSecondsColumn];\n const afterTaiMinusUtc = samples[startAfter + eop._taiMinusUtcSecondsColumn];\n if (beforeTaiMinusUtc !== afterTaiMinusUtc) {\n if (afterDate.equals(date)) // If we are at the end of the leap second interval, take the second value\n // Otherwise, the interpolation below will yield the wrong side of the\n // discontinuity\n // At the end of the leap second, we need to start accounting for the jump\n beforeUt1MinusUtc = afterUt1MinusUtc;\n else // Otherwise, remove the leap second so that the interpolation is correct\n afterUt1MinusUtc -= afterTaiMinusUtc - beforeTaiMinusUtc;\n }\n }\n result.xPoleWander = $c1eef27c4238262a$var$linearInterp(factor, samples[startBefore + eop._xPoleWanderRadiansColumn], samples[startAfter + eop._xPoleWanderRadiansColumn]);\n result.yPoleWander = $c1eef27c4238262a$var$linearInterp(factor, samples[startBefore + eop._yPoleWanderRadiansColumn], samples[startAfter + eop._yPoleWanderRadiansColumn]);\n result.xPoleOffset = $c1eef27c4238262a$var$linearInterp(factor, samples[startBefore + eop._xCelestialPoleOffsetRadiansColumn], samples[startAfter + eop._xCelestialPoleOffsetRadiansColumn]);\n result.yPoleOffset = $c1eef27c4238262a$var$linearInterp(factor, samples[startBefore + eop._yCelestialPoleOffsetRadiansColumn], samples[startAfter + eop._yCelestialPoleOffsetRadiansColumn]);\n result.ut1MinusUtc = $c1eef27c4238262a$var$linearInterp(factor, beforeUt1MinusUtc, afterUt1MinusUtc);\n return result;\n}\nvar $c1eef27c4238262a$export$2e2bcd8739ae039 = $c1eef27c4238262a$var$EarthOrientationParameters;\n\n\n\n\n\nvar $8w8ZH = parcelRequire(\"8w8ZH\");\n\nvar $jQJji = parcelRequire(\"jQJji\");\n\nvar $1vHsR = parcelRequire(\"1vHsR\");\n\nvar $AXvpI = parcelRequire(\"AXvpI\");\n/**\n * A rotation expressed as a heading, pitch, and roll. Heading is the rotation about the\n * negative z axis. Pitch is the rotation about the negative y axis. Roll is the rotation about\n * the positive x axis.\n * @alias HeadingPitchRoll\n * @constructor\n *\n * @param {number} [heading=0.0] The heading component in radians.\n * @param {number} [pitch=0.0] The pitch component in radians.\n * @param {number} [roll=0.0] The roll component in radians.\n */ function $79e069d5452f6556$var$HeadingPitchRoll(heading, pitch, roll) {\n /**\n * Gets or sets the heading.\n * @type {number}\n * @default 0.0\n */ this.heading = (0, $8w8ZH.default)(heading, 0.0);\n /**\n * Gets or sets the pitch.\n * @type {number}\n * @default 0.0\n */ this.pitch = (0, $8w8ZH.default)(pitch, 0.0);\n /**\n * Gets or sets the roll.\n * @type {number}\n * @default 0.0\n */ this.roll = (0, $8w8ZH.default)(roll, 0.0);\n}\n/**\n * Computes the heading, pitch and roll from a quaternion (see http://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles )\n *\n * @param {Quaternion} quaternion The quaternion from which to retrieve heading, pitch, and roll, all expressed in radians.\n * @param {HeadingPitchRoll} [result] The object in which to store the result. If not provided, a new instance is created and returned.\n * @returns {HeadingPitchRoll} The modified result parameter or a new HeadingPitchRoll instance if one was not provided.\n */ $79e069d5452f6556$var$HeadingPitchRoll.fromQuaternion = function(quaternion, result) {\n //>>includeStart('debug', pragmas.debug);\n if (!(0, $jQJji.default)(quaternion)) throw new (0, $1vHsR.default)(\"quaternion is required\");\n //>>includeEnd('debug');\n if (!(0, $jQJji.default)(result)) result = new $79e069d5452f6556$var$HeadingPitchRoll();\n const test = 2 * (quaternion.w * quaternion.y - quaternion.z * quaternion.x);\n const denominatorRoll = 1 - 2 * (quaternion.x * quaternion.x + quaternion.y * quaternion.y);\n const numeratorRoll = 2 * (quaternion.w * quaternion.x + quaternion.y * quaternion.z);\n const denominatorHeading = 1 - 2 * (quaternion.y * quaternion.y + quaternion.z * quaternion.z);\n const numeratorHeading = 2 * (quaternion.w * quaternion.z + quaternion.x * quaternion.y);\n result.heading = -Math.atan2(numeratorHeading, denominatorHeading);\n result.roll = Math.atan2(numeratorRoll, denominatorRoll);\n result.pitch = -(0, $AXvpI.default).asinClamped(test);\n return result;\n};\n/**\n * Returns a new HeadingPitchRoll instance from angles given in degrees.\n *\n * @param {number} heading the heading in degrees\n * @param {number} pitch the pitch in degrees\n * @param {number} roll the heading in degrees\n * @param {HeadingPitchRoll} [result] The object in which to store the result. If not provided, a new instance is created and returned.\n * @returns {HeadingPitchRoll} A new HeadingPitchRoll instance\n */ $79e069d5452f6556$var$HeadingPitchRoll.fromDegrees = function(heading, pitch, roll, result) {\n //>>includeStart('debug', pragmas.debug);\n if (!(0, $jQJji.default)(heading)) throw new (0, $1vHsR.default)(\"heading is required\");\n if (!(0, $jQJji.default)(pitch)) throw new (0, $1vHsR.default)(\"pitch is required\");\n if (!(0, $jQJji.default)(roll)) throw new (0, $1vHsR.default)(\"roll is required\");\n //>>includeEnd('debug');\n if (!(0, $jQJji.default)(result)) result = new $79e069d5452f6556$var$HeadingPitchRoll();\n result.heading = heading * (0, $AXvpI.default).RADIANS_PER_DEGREE;\n result.pitch = pitch * (0, $AXvpI.default).RADIANS_PER_DEGREE;\n result.roll = roll * (0, $AXvpI.default).RADIANS_PER_DEGREE;\n return result;\n};\n/**\n * Duplicates a HeadingPitchRoll instance.\n *\n * @param {HeadingPitchRoll} headingPitchRoll The HeadingPitchRoll to duplicate.\n * @param {HeadingPitchRoll} [result] The object onto which to store the result.\n * @returns {HeadingPitchRoll} The modified result parameter or a new HeadingPitchRoll instance if one was not provided. (Returns undefined if headingPitchRoll is undefined)\n */ $79e069d5452f6556$var$HeadingPitchRoll.clone = function(headingPitchRoll, result) {\n if (!(0, $jQJji.default)(headingPitchRoll)) return undefined;\n if (!(0, $jQJji.default)(result)) return new $79e069d5452f6556$var$HeadingPitchRoll(headingPitchRoll.heading, headingPitchRoll.pitch, headingPitchRoll.roll);\n result.heading = headingPitchRoll.heading;\n result.pitch = headingPitchRoll.pitch;\n result.roll = headingPitchRoll.roll;\n return result;\n};\n/**\n * Compares the provided HeadingPitchRolls componentwise and returns\n * true if they are equal, false otherwise.\n *\n * @param {HeadingPitchRoll} [left] The first HeadingPitchRoll.\n * @param {HeadingPitchRoll} [right] The second HeadingPitchRoll.\n * @returns {boolean} true if left and right are equal, false otherwise.\n */ $79e069d5452f6556$var$HeadingPitchRoll.equals = function(left, right) {\n return left === right || (0, $jQJji.default)(left) && (0, $jQJji.default)(right) && left.heading === right.heading && left.pitch === right.pitch && left.roll === right.roll;\n};\n/**\n * Compares the provided HeadingPitchRolls componentwise and returns\n * true if they pass an absolute or relative tolerance test,\n * false otherwise.\n *\n * @param {HeadingPitchRoll} [left] The first HeadingPitchRoll.\n * @param {HeadingPitchRoll} [right] The second HeadingPitchRoll.\n * @param {number} [relativeEpsilon=0] The relative epsilon tolerance to use for equality testing.\n * @param {number} [absoluteEpsilon=relativeEpsilon] The absolute epsilon tolerance to use for equality testing.\n * @returns {boolean} true if left and right are within the provided epsilon, false otherwise.\n */ $79e069d5452f6556$var$HeadingPitchRoll.equalsEpsilon = function(left, right, relativeEpsilon, absoluteEpsilon) {\n return left === right || (0, $jQJji.default)(left) && (0, $jQJji.default)(right) && (0, $AXvpI.default).equalsEpsilon(left.heading, right.heading, relativeEpsilon, absoluteEpsilon) && (0, $AXvpI.default).equalsEpsilon(left.pitch, right.pitch, relativeEpsilon, absoluteEpsilon) && (0, $AXvpI.default).equalsEpsilon(left.roll, right.roll, relativeEpsilon, absoluteEpsilon);\n};\n/**\n * Duplicates this HeadingPitchRoll instance.\n *\n * @param {HeadingPitchRoll} [result] The object onto which to store the result.\n * @returns {HeadingPitchRoll} The modified result parameter or a new HeadingPitchRoll instance if one was not provided.\n */ $79e069d5452f6556$var$HeadingPitchRoll.prototype.clone = function(result) {\n return $79e069d5452f6556$var$HeadingPitchRoll.clone(this, result);\n};\n/**\n * Compares this HeadingPitchRoll against the provided HeadingPitchRoll componentwise and returns\n * true if they are equal, false otherwise.\n *\n * @param {HeadingPitchRoll} [right] The right hand side HeadingPitchRoll.\n * @returns {boolean} true if they are equal, false otherwise.\n */ $79e069d5452f6556$var$HeadingPitchRoll.prototype.equals = function(right) {\n return $79e069d5452f6556$var$HeadingPitchRoll.equals(this, right);\n};\n/**\n * Compares this HeadingPitchRoll against the provided HeadingPitchRoll componentwise and returns\n * true if they pass an absolute or relative tolerance test,\n * false otherwise.\n *\n * @param {HeadingPitchRoll} [right] The right hand side HeadingPitchRoll.\n * @param {number} [relativeEpsilon=0] The relative epsilon tolerance to use for equality testing.\n * @param {number} [absoluteEpsilon=relativeEpsilon] The absolute epsilon tolerance to use for equality testing.\n * @returns {boolean} true if they are within the provided epsilon, false otherwise.\n */ $79e069d5452f6556$var$HeadingPitchRoll.prototype.equalsEpsilon = function(right, relativeEpsilon, absoluteEpsilon) {\n return $79e069d5452f6556$var$HeadingPitchRoll.equalsEpsilon(this, right, relativeEpsilon, absoluteEpsilon);\n};\n/**\n * Creates a string representing this HeadingPitchRoll in the format '(heading, pitch, roll)' in radians.\n *\n * @returns {string} A string representing the provided HeadingPitchRoll in the format '(heading, pitch, roll)'.\n */ $79e069d5452f6556$var$HeadingPitchRoll.prototype.toString = function() {\n return `(${this.heading}, ${this.pitch}, ${this.roll})`;\n};\nvar $79e069d5452f6556$export$2e2bcd8739ae039 = $79e069d5452f6556$var$HeadingPitchRoll;\n\n\n\nvar $jQJji = parcelRequire(\"jQJji\");\n\nvar $1vHsR = parcelRequire(\"1vHsR\");\n\n\nvar $b73be531cd978718$import_meta = Object.assign(Object.create(null), {\n url: \"file:///node_modules/@cesium/engine/Source/Core/buildModuleUrl.js\"\n});\n/*global CESIUM_BASE_URL,define,require*/ const $b73be531cd978718$var$cesiumScriptRegex = /((?:.*\\/)|^)Cesium\\.js(?:\\?|\\#|$)/;\nfunction $b73be531cd978718$var$getBaseUrlFromCesiumScript() {\n const scripts = document.getElementsByTagName(\"script\");\n for(let i = 0, len = scripts.length; i < len; ++i){\n const src = scripts[i].getAttribute(\"src\");\n const result = $b73be531cd978718$var$cesiumScriptRegex.exec(src);\n if (result !== null) return result[1];\n }\n return undefined;\n}\nlet $b73be531cd978718$var$a;\nfunction $b73be531cd978718$var$tryMakeAbsolute(url) {\n if (typeof document === \"undefined\") // Node.js and Web Workers. In both cases, the URL will already be absolute.\n return url;\n if (!(0, $jQJji.default)($b73be531cd978718$var$a)) $b73be531cd978718$var$a = document.createElement(\"a\");\n $b73be531cd978718$var$a.href = url;\n return $b73be531cd978718$var$a.href;\n}\nlet $b73be531cd978718$var$baseResource;\nfunction $b73be531cd978718$var$getCesiumBaseUrl() {\n if ((0, $jQJji.default)($b73be531cd978718$var$baseResource)) return $b73be531cd978718$var$baseResource;\n let baseUrlString;\n if (typeof CESIUM_BASE_URL !== \"undefined\") baseUrlString = CESIUM_BASE_URL;\n else if ((0, $jQJji.default)($b73be531cd978718$import_meta?.url)) // ESM\n baseUrlString = (0, $5d7f3681ccbe43e2$export$2e2bcd8739ae039)(\".\", \"file:///node_modules/@cesium/engine/Source/Core/buildModuleUrl.js\");\n else if (typeof define === \"object\" && (0, $jQJji.default)(define.amd) && !define.amd.toUrlUndefined && (0, $jQJji.default)(undefined)) // RequireJS\n baseUrlString = (0, $5d7f3681ccbe43e2$export$2e2bcd8739ae039)(\"..\", $b73be531cd978718$var$buildModuleUrl(\"Core/buildModuleUrl.js\"));\n else // IIFE\n baseUrlString = $b73be531cd978718$var$getBaseUrlFromCesiumScript();\n //>>includeStart('debug', pragmas.debug);\n if (!(0, $jQJji.default)(baseUrlString)) throw new (0, $1vHsR.default)(\"Unable to determine Cesium base URL automatically, try defining a global variable called CESIUM_BASE_URL.\");\n //>>includeEnd('debug');\n $b73be531cd978718$var$baseResource = new (0, $b1dcbeb8d31d71ff$export$2e2bcd8739ae039)({\n url: $b73be531cd978718$var$tryMakeAbsolute(baseUrlString)\n });\n $b73be531cd978718$var$baseResource.appendForwardSlash();\n return $b73be531cd978718$var$baseResource;\n}\nfunction $b73be531cd978718$var$buildModuleUrlFromRequireToUrl(moduleID) {\n //moduleID will be non-relative, so require it relative to this module, in Core.\n return $b73be531cd978718$var$tryMakeAbsolute(undefined(`../${moduleID}`));\n}\nfunction $b73be531cd978718$var$buildModuleUrlFromBaseUrl(moduleID) {\n const resource = $b73be531cd978718$var$getCesiumBaseUrl().getDerivedResource({\n url: moduleID\n });\n return resource.url;\n}\nlet $b73be531cd978718$var$implementation;\n/**\n * Given a relative URL under the Cesium base URL, returns an absolute URL.\n * @function\n *\n * @param {string} relativeUrl The relative path.\n * @returns {string} The absolutely URL representation of the provided path.\n *\n * @example\n * const viewer = new Cesium.Viewer(\"cesiumContainer\", {\n * baseLayer: Cesium.ImageryLayer.fromProviderAsync(\n * Cesium.TileMapServiceImageryProvider.fromUrl(\n * Cesium.buildModuleUrl(\"Assets/Textures/NaturalEarthII\"),\n * )),\n * baseLayerPicker: false,\n * });\n */ function $b73be531cd978718$var$buildModuleUrl(relativeUrl) {\n if (!(0, $jQJji.default)($b73be531cd978718$var$implementation)) {\n //select implementation\n if (typeof define === \"object\" && (0, $jQJji.default)(define.amd) && !define.amd.toUrlUndefined && (0, $jQJji.default)(undefined)) $b73be531cd978718$var$implementation = $b73be531cd978718$var$buildModuleUrlFromRequireToUrl;\n else $b73be531cd978718$var$implementation = $b73be531cd978718$var$buildModuleUrlFromBaseUrl;\n }\n const url = $b73be531cd978718$var$implementation(relativeUrl);\n return url;\n}\n// exposed for testing\n$b73be531cd978718$var$buildModuleUrl._cesiumScriptRegex = $b73be531cd978718$var$cesiumScriptRegex;\n$b73be531cd978718$var$buildModuleUrl._buildModuleUrlFromBaseUrl = $b73be531cd978718$var$buildModuleUrlFromBaseUrl;\n$b73be531cd978718$var$buildModuleUrl._clearBaseResource = function() {\n $b73be531cd978718$var$baseResource = undefined;\n};\n/**\n * Sets the base URL for resolving modules.\n * @param {string} value The new base URL.\n */ $b73be531cd978718$var$buildModuleUrl.setBaseUrl = function(value) {\n $b73be531cd978718$var$baseResource = (0, $b1dcbeb8d31d71ff$export$2e2bcd8739ae039).DEFAULT.getDerivedResource({\n url: value\n });\n};\n/**\n * Gets the base URL for resolving modules.\n *\n * @function\n * @returns {string} The configured base URL\n */ $b73be531cd978718$var$buildModuleUrl.getCesiumBaseUrl = $b73be531cd978718$var$getCesiumBaseUrl;\nvar $b73be531cd978718$export$2e2bcd8739ae039 = $b73be531cd978718$var$buildModuleUrl;\n\n\n\nvar $8w8ZH = parcelRequire(\"8w8ZH\");\n\nvar $jQJji = parcelRequire(\"jQJji\");\n/**\n * An IAU 2006 XYS value sampled at a particular time.\n *\n * @alias Iau2006XysSample\n * @constructor\n *\n * @param {number} x The X value.\n * @param {number} y The Y value.\n * @param {number} s The S value.\n *\n * @private\n */ function $c9c1200a42974c2d$var$Iau2006XysSample(x, y, s) {\n /**\n * The X value.\n * @type {number}\n */ this.x = x;\n /**\n * The Y value.\n * @type {number}\n */ this.y = y;\n /**\n * The S value.\n * @type {number}\n */ this.s = s;\n}\nvar $c9c1200a42974c2d$export$2e2bcd8739ae039 = $c9c1200a42974c2d$var$Iau2006XysSample;\n\n\n\n\n\n/**\n * A set of IAU2006 XYS data that is used to evaluate the transformation between the International\n * Celestial Reference Frame (ICRF) and the International Terrestrial Reference Frame (ITRF).\n *\n * @alias Iau2006XysData\n * @constructor\n *\n * @param {object} [options] Object with the following properties:\n * @param {Resource|string} [options.xysFileUrlTemplate='Assets/IAU2006_XYS/IAU2006_XYS_{0}.json'] A template URL for obtaining the XYS data. In the template,\n * `{0}` will be replaced with the file index.\n * @param {number} [options.interpolationOrder=9] The order of interpolation to perform on the XYS data.\n * @param {number} [options.sampleZeroJulianEphemerisDate=2442396.5] The Julian ephemeris date (JED) of the\n * first XYS sample.\n * @param {number} [options.stepSizeDays=1.0] The step size, in days, between successive XYS samples.\n * @param {number} [options.samplesPerXysFile=1000] The number of samples in each XYS file.\n * @param {number} [options.totalSamples=27426] The total number of samples in all XYS files.\n *\n * @private\n */ function $7212c54286490aec$var$Iau2006XysData(options) {\n options = (0, $8w8ZH.default)(options, (0, $8w8ZH.default).EMPTY_OBJECT);\n this._xysFileUrlTemplate = (0, $b1dcbeb8d31d71ff$export$2e2bcd8739ae039).createIfNeeded(options.xysFileUrlTemplate);\n this._interpolationOrder = (0, $8w8ZH.default)(options.interpolationOrder, 9);\n this._sampleZeroJulianEphemerisDate = (0, $8w8ZH.default)(options.sampleZeroJulianEphemerisDate, 2442396.5);\n this._sampleZeroDateTT = new (0, $73b9691e04761700$export$2e2bcd8739ae039)(this._sampleZeroJulianEphemerisDate, 0.0, (0, $134462e760c5c083$export$2e2bcd8739ae039).TAI);\n this._stepSizeDays = (0, $8w8ZH.default)(options.stepSizeDays, 1.0);\n this._samplesPerXysFile = (0, $8w8ZH.default)(options.samplesPerXysFile, 1000);\n this._totalSamples = (0, $8w8ZH.default)(options.totalSamples, 27426);\n this._samples = new Array(this._totalSamples * 3);\n this._chunkDownloadsInProgress = [];\n const order = this._interpolationOrder;\n // Compute denominators and X values for interpolation.\n const denom = this._denominators = new Array(order + 1);\n const xTable = this._xTable = new Array(order + 1);\n const stepN = Math.pow(this._stepSizeDays, order);\n for(let i = 0; i <= order; ++i){\n denom[i] = stepN;\n xTable[i] = i * this._stepSizeDays;\n for(let j = 0; j <= order; ++j)if (j !== i) denom[i] *= i - j;\n denom[i] = 1.0 / denom[i];\n }\n // Allocate scratch arrays for interpolation.\n this._work = new Array(order + 1);\n this._coef = new Array(order + 1);\n}\nconst $7212c54286490aec$var$julianDateScratch = new (0, $73b9691e04761700$export$2e2bcd8739ae039)(0, 0.0, (0, $134462e760c5c083$export$2e2bcd8739ae039).TAI);\nfunction $7212c54286490aec$var$getDaysSinceEpoch(xys, dayTT, secondTT) {\n const dateTT = $7212c54286490aec$var$julianDateScratch;\n dateTT.dayNumber = dayTT;\n dateTT.secondsOfDay = secondTT;\n return (0, $73b9691e04761700$export$2e2bcd8739ae039).daysDifference(dateTT, xys._sampleZeroDateTT);\n}\n/**\n * Preloads XYS data for a specified date range.\n *\n * @param {number} startDayTT The Julian day number of the beginning of the interval to preload, expressed in\n * the Terrestrial Time (TT) time standard.\n * @param {number} startSecondTT The seconds past noon of the beginning of the interval to preload, expressed in\n * the Terrestrial Time (TT) time standard.\n * @param {number} stopDayTT The Julian day number of the end of the interval to preload, expressed in\n * the Terrestrial Time (TT) time standard.\n * @param {number} stopSecondTT The seconds past noon of the end of the interval to preload, expressed in\n * the Terrestrial Time (TT) time standard.\n * @returns {Promise} A promise that, when resolved, indicates that the requested interval has been\n * preloaded.\n */ $7212c54286490aec$var$Iau2006XysData.prototype.preload = function(startDayTT, startSecondTT, stopDayTT, stopSecondTT) {\n const startDaysSinceEpoch = $7212c54286490aec$var$getDaysSinceEpoch(this, startDayTT, startSecondTT);\n const stopDaysSinceEpoch = $7212c54286490aec$var$getDaysSinceEpoch(this, stopDayTT, stopSecondTT);\n let startIndex = startDaysSinceEpoch / this._stepSizeDays - this._interpolationOrder / 2 | 0;\n if (startIndex < 0) startIndex = 0;\n let stopIndex = stopDaysSinceEpoch / this._stepSizeDays - this._interpolationOrder / 2 | 0 + this._interpolationOrder;\n if (stopIndex >= this._totalSamples) stopIndex = this._totalSamples - 1;\n const startChunk = startIndex / this._samplesPerXysFile | 0;\n const stopChunk = stopIndex / this._samplesPerXysFile | 0;\n const promises = [];\n for(let i = startChunk; i <= stopChunk; ++i)promises.push($7212c54286490aec$var$requestXysChunk(this, i));\n return Promise.all(promises);\n};\n/**\n * Computes the XYS values for a given date by interpolating. If the required data is not yet downloaded,\n * this method will return undefined.\n *\n * @param {number} dayTT The Julian day number for which to compute the XYS value, expressed in\n * the Terrestrial Time (TT) time standard.\n * @param {number} secondTT The seconds past noon of the date for which to compute the XYS value, expressed in\n * the Terrestrial Time (TT) time standard.\n * @param {Iau2006XysSample} [result] The instance to which to copy the interpolated result. If this parameter\n * is undefined, a new instance is allocated and returned.\n * @returns {Iau2006XysSample} The interpolated XYS values, or undefined if the required data for this\n * computation has not yet been downloaded.\n *\n * @see Iau2006XysData#preload\n */ $7212c54286490aec$var$Iau2006XysData.prototype.computeXysRadians = function(dayTT, secondTT, result) {\n const daysSinceEpoch = $7212c54286490aec$var$getDaysSinceEpoch(this, dayTT, secondTT);\n if (daysSinceEpoch < 0.0) // Can't evaluate prior to the epoch of the data.\n return undefined;\n const centerIndex = daysSinceEpoch / this._stepSizeDays | 0;\n if (centerIndex >= this._totalSamples) // Can't evaluate after the last sample in the data.\n return undefined;\n const degree = this._interpolationOrder;\n let firstIndex = centerIndex - (degree / 2 | 0);\n if (firstIndex < 0) firstIndex = 0;\n let lastIndex = firstIndex + degree;\n if (lastIndex >= this._totalSamples) {\n lastIndex = this._totalSamples - 1;\n firstIndex = lastIndex - degree;\n if (firstIndex < 0) firstIndex = 0;\n }\n // Are all the samples we need present?\n // We can assume so if the first and last are present\n let isDataMissing = false;\n const samples = this._samples;\n if (!(0, $jQJji.default)(samples[firstIndex * 3])) {\n $7212c54286490aec$var$requestXysChunk(this, firstIndex / this._samplesPerXysFile | 0);\n isDataMissing = true;\n }\n if (!(0, $jQJji.default)(samples[lastIndex * 3])) {\n $7212c54286490aec$var$requestXysChunk(this, lastIndex / this._samplesPerXysFile | 0);\n isDataMissing = true;\n }\n if (isDataMissing) return undefined;\n if (!(0, $jQJji.default)(result)) result = new (0, $c9c1200a42974c2d$export$2e2bcd8739ae039)(0.0, 0.0, 0.0);\n else {\n result.x = 0.0;\n result.y = 0.0;\n result.s = 0.0;\n }\n const x = daysSinceEpoch - firstIndex * this._stepSizeDays;\n const work = this._work;\n const denom = this._denominators;\n const coef = this._coef;\n const xTable = this._xTable;\n let i, j;\n for(i = 0; i <= degree; ++i)work[i] = x - xTable[i];\n for(i = 0; i <= degree; ++i){\n coef[i] = 1.0;\n for(j = 0; j <= degree; ++j)if (j !== i) coef[i] *= work[j];\n coef[i] *= denom[i];\n let sampleIndex = (firstIndex + i) * 3;\n result.x += coef[i] * samples[sampleIndex++];\n result.y += coef[i] * samples[sampleIndex++];\n result.s += coef[i] * samples[sampleIndex];\n }\n return result;\n};\nfunction $7212c54286490aec$var$requestXysChunk(xysData, chunkIndex) {\n if (xysData._chunkDownloadsInProgress[chunkIndex]) // Chunk has already been requested.\n return xysData._chunkDownloadsInProgress[chunkIndex];\n let chunkUrl;\n const xysFileUrlTemplate = xysData._xysFileUrlTemplate;\n if ((0, $jQJji.default)(xysFileUrlTemplate)) chunkUrl = xysFileUrlTemplate.getDerivedResource({\n templateValues: {\n 0: chunkIndex\n }\n });\n else chunkUrl = new (0, $b1dcbeb8d31d71ff$export$2e2bcd8739ae039)({\n url: (0, $b73be531cd978718$export$2e2bcd8739ae039)(`Assets/IAU2006_XYS/IAU2006_XYS_${chunkIndex}.json`)\n });\n const promise = chunkUrl.fetchJson().then(function(chunk) {\n xysData._chunkDownloadsInProgress[chunkIndex] = false;\n const samples = xysData._samples;\n const newSamples = chunk.samples;\n const startIndex = chunkIndex * xysData._samplesPerXysFile * 3;\n for(let i = 0, len = newSamples.length; i < len; ++i)samples[startIndex + i] = newSamples[i];\n });\n xysData._chunkDownloadsInProgress[chunkIndex] = promise;\n return promise;\n}\nvar $7212c54286490aec$export$2e2bcd8739ae039 = $7212c54286490aec$var$Iau2006XysData;\n\n\n\n\n\nvar $AXvpI = parcelRequire(\"AXvpI\");\n\n\n\nvar $bXwZF = parcelRequire(\"bXwZF\");\n\nvar $3pzcG = parcelRequire(\"3pzcG\");\n\nvar $8w8ZH = parcelRequire(\"8w8ZH\");\n\nvar $jQJji = parcelRequire(\"jQJji\");\n\nvar $3pzcG = parcelRequire(\"3pzcG\");\n\nvar $8w8ZH = parcelRequire(\"8w8ZH\");\n\nvar $jQJji = parcelRequire(\"jQJji\");\n\nvar $1vHsR = parcelRequire(\"1vHsR\");\n\nvar $jQJji = parcelRequire(\"jQJji\");\nlet $19a47bf34378ad7c$var$_supportsFullscreen;\nconst $19a47bf34378ad7c$var$_names = {\n requestFullscreen: undefined,\n exitFullscreen: undefined,\n fullscreenEnabled: undefined,\n fullscreenElement: undefined,\n fullscreenchange: undefined,\n fullscreenerror: undefined\n};\n/**\n * Browser-independent functions for working with the standard fullscreen API.\n *\n * @namespace Fullscreen\n *\n * @see {@link http://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html|W3C Fullscreen Living Specification}\n */ const $19a47bf34378ad7c$var$Fullscreen = {};\nObject.defineProperties($19a47bf34378ad7c$var$Fullscreen, {\n /**\n * The element that is currently fullscreen, if any. To simply check if the\n * browser is in fullscreen mode or not, use {@link Fullscreen#fullscreen}.\n * @memberof Fullscreen\n * @type {object}\n * @readonly\n */ element: {\n get: function() {\n if (!$19a47bf34378ad7c$var$Fullscreen.supportsFullscreen()) return undefined;\n return document[$19a47bf34378ad7c$var$_names.fullscreenElement];\n }\n },\n /**\n * The name of the event on the document that is fired when fullscreen is\n * entered or exited. This event name is intended for use with addEventListener.\n * In your event handler, to determine if the browser is in fullscreen mode or not,\n * use {@link Fullscreen#fullscreen}.\n * @memberof Fullscreen\n * @type {string}\n * @readonly\n */ changeEventName: {\n get: function() {\n if (!$19a47bf34378ad7c$var$Fullscreen.supportsFullscreen()) return undefined;\n return $19a47bf34378ad7c$var$_names.fullscreenchange;\n }\n },\n /**\n * The name of the event that is fired when a fullscreen error\n * occurs. This event name is intended for use with addEventListener.\n * @memberof Fullscreen\n * @type {string}\n * @readonly\n */ errorEventName: {\n get: function() {\n if (!$19a47bf34378ad7c$var$Fullscreen.supportsFullscreen()) return undefined;\n return $19a47bf34378ad7c$var$_names.fullscreenerror;\n }\n },\n /**\n * Determine whether the browser will allow an element to be made fullscreen, or not.\n * For example, by default, iframes cannot go fullscreen unless the containing page\n * adds an \"allowfullscreen\" attribute (or prefixed equivalent).\n * @memberof Fullscreen\n * @type {boolean}\n * @readonly\n */ enabled: {\n get: function() {\n if (!$19a47bf34378ad7c$var$Fullscreen.supportsFullscreen()) return undefined;\n return document[$19a47bf34378ad7c$var$_names.fullscreenEnabled];\n }\n },\n /**\n * Determines if the browser is currently in fullscreen mode.\n * @memberof Fullscreen\n * @type {boolean}\n * @readonly\n */ fullscreen: {\n get: function() {\n if (!$19a47bf34378ad7c$var$Fullscreen.supportsFullscreen()) return undefined;\n return $19a47bf34378ad7c$var$Fullscreen.element !== null;\n }\n }\n});\n/**\n * Detects whether the browser supports the standard fullscreen API.\n *\n * @returns {boolean} true if the browser supports the standard fullscreen API,\n * false otherwise.\n */ $19a47bf34378ad7c$var$Fullscreen.supportsFullscreen = function() {\n if ((0, $jQJji.default)($19a47bf34378ad7c$var$_supportsFullscreen)) return $19a47bf34378ad7c$var$_supportsFullscreen;\n $19a47bf34378ad7c$var$_supportsFullscreen = false;\n const body = document.body;\n if (typeof body.requestFullscreen === \"function\") {\n // go with the unprefixed, standard set of names\n $19a47bf34378ad7c$var$_names.requestFullscreen = \"requestFullscreen\";\n $19a47bf34378ad7c$var$_names.exitFullscreen = \"exitFullscreen\";\n $19a47bf34378ad7c$var$_names.fullscreenEnabled = \"fullscreenEnabled\";\n $19a47bf34378ad7c$var$_names.fullscreenElement = \"fullscreenElement\";\n $19a47bf34378ad7c$var$_names.fullscreenchange = \"fullscreenchange\";\n $19a47bf34378ad7c$var$_names.fullscreenerror = \"fullscreenerror\";\n $19a47bf34378ad7c$var$_supportsFullscreen = true;\n return $19a47bf34378ad7c$var$_supportsFullscreen;\n }\n //check for the correct combination of prefix plus the various names that browsers use\n const prefixes = [\n \"webkit\",\n \"moz\",\n \"o\",\n \"ms\",\n \"khtml\"\n ];\n let name;\n for(let i = 0, len = prefixes.length; i < len; ++i){\n const prefix = prefixes[i];\n // casing of Fullscreen differs across browsers\n name = `${prefix}RequestFullscreen`;\n if (typeof body[name] === \"function\") {\n $19a47bf34378ad7c$var$_names.requestFullscreen = name;\n $19a47bf34378ad7c$var$_supportsFullscreen = true;\n } else {\n name = `${prefix}RequestFullScreen`;\n if (typeof body[name] === \"function\") {\n $19a47bf34378ad7c$var$_names.requestFullscreen = name;\n $19a47bf34378ad7c$var$_supportsFullscreen = true;\n }\n }\n // disagreement about whether it's \"exit\" as per spec, or \"cancel\"\n name = `${prefix}ExitFullscreen`;\n if (typeof document[name] === \"function\") $19a47bf34378ad7c$var$_names.exitFullscreen = name;\n else {\n name = `${prefix}CancelFullScreen`;\n if (typeof document[name] === \"function\") $19a47bf34378ad7c$var$_names.exitFullscreen = name;\n }\n // casing of Fullscreen differs across browsers\n name = `${prefix}FullscreenEnabled`;\n if (document[name] !== undefined) $19a47bf34378ad7c$var$_names.fullscreenEnabled = name;\n else {\n name = `${prefix}FullScreenEnabled`;\n if (document[name] !== undefined) $19a47bf34378ad7c$var$_names.fullscreenEnabled = name;\n }\n // casing of Fullscreen differs across browsers\n name = `${prefix}FullscreenElement`;\n if (document[name] !== undefined) $19a47bf34378ad7c$var$_names.fullscreenElement = name;\n else {\n name = `${prefix}FullScreenElement`;\n if (document[name] !== undefined) $19a47bf34378ad7c$var$_names.fullscreenElement = name;\n }\n // thankfully, event names are all lowercase per spec\n name = `${prefix}fullscreenchange`;\n // event names do not have 'on' in the front, but the property on the document does\n if (document[`on${name}`] !== undefined) {\n //except on IE\n if (prefix === \"ms\") name = \"MSFullscreenChange\";\n $19a47bf34378ad7c$var$_names.fullscreenchange = name;\n }\n name = `${prefix}fullscreenerror`;\n if (document[`on${name}`] !== undefined) {\n //except on IE\n if (prefix === \"ms\") name = \"MSFullscreenError\";\n $19a47bf34378ad7c$var$_names.fullscreenerror = name;\n }\n }\n return $19a47bf34378ad7c$var$_supportsFullscreen;\n};\n/**\n * Asynchronously requests the browser to enter fullscreen mode on the given element.\n * If fullscreen mode is not supported by the browser, does nothing.\n *\n * @param {object} element The HTML element which will be placed into fullscreen mode.\n * @param {object} [vrDevice] The HMDVRDevice device.\n *\n * @example\n * // Put the entire page into fullscreen.\n * Cesium.Fullscreen.requestFullscreen(document.body)\n *\n * // Place only the Cesium canvas into fullscreen.\n * Cesium.Fullscreen.requestFullscreen(scene.canvas)\n */ $19a47bf34378ad7c$var$Fullscreen.requestFullscreen = function(element, vrDevice) {\n if (!$19a47bf34378ad7c$var$Fullscreen.supportsFullscreen()) return;\n element[$19a47bf34378ad7c$var$_names.requestFullscreen]({\n vrDisplay: vrDevice\n });\n};\n/**\n * Asynchronously exits fullscreen mode. If the browser is not currently\n * in fullscreen, or if fullscreen mode is not supported by the browser, does nothing.\n */ $19a47bf34378ad7c$var$Fullscreen.exitFullscreen = function() {\n if (!$19a47bf34378ad7c$var$Fullscreen.supportsFullscreen()) return;\n document[$19a47bf34378ad7c$var$_names.exitFullscreen]();\n};\n//For unit tests\n$19a47bf34378ad7c$var$Fullscreen._names = $19a47bf34378ad7c$var$_names;\nvar $19a47bf34378ad7c$export$2e2bcd8739ae039 = $19a47bf34378ad7c$var$Fullscreen;\n\n\nlet $da149e13e9eaa5f6$var$theNavigator;\nif (typeof navigator !== \"undefined\") $da149e13e9eaa5f6$var$theNavigator = navigator;\nelse $da149e13e9eaa5f6$var$theNavigator = {};\nfunction $da149e13e9eaa5f6$var$extractVersion(versionString) {\n const parts = versionString.split(\".\");\n for(let i = 0, len = parts.length; i < len; ++i)parts[i] = parseInt(parts[i], 10);\n return parts;\n}\nlet $da149e13e9eaa5f6$var$isChromeResult;\nlet $da149e13e9eaa5f6$var$chromeVersionResult;\nfunction $da149e13e9eaa5f6$var$isChrome() {\n if (!(0, $jQJji.default)($da149e13e9eaa5f6$var$isChromeResult)) {\n $da149e13e9eaa5f6$var$isChromeResult = false;\n // Edge contains Chrome in the user agent too\n if (!$da149e13e9eaa5f6$var$isEdge()) {\n const fields = / Chrome\\/([\\.0-9]+)/.exec($da149e13e9eaa5f6$var$theNavigator.userAgent);\n if (fields !== null) {\n $da149e13e9eaa5f6$var$isChromeResult = true;\n $da149e13e9eaa5f6$var$chromeVersionResult = $da149e13e9eaa5f6$var$extractVersion(fields[1]);\n }\n }\n }\n return $da149e13e9eaa5f6$var$isChromeResult;\n}\nfunction $da149e13e9eaa5f6$var$chromeVersion() {\n return $da149e13e9eaa5f6$var$isChrome() && $da149e13e9eaa5f6$var$chromeVersionResult;\n}\nlet $da149e13e9eaa5f6$var$isSafariResult;\nlet $da149e13e9eaa5f6$var$safariVersionResult;\nfunction $da149e13e9eaa5f6$var$isSafari() {\n if (!(0, $jQJji.default)($da149e13e9eaa5f6$var$isSafariResult)) {\n $da149e13e9eaa5f6$var$isSafariResult = false;\n // Chrome and Edge contain Safari in the user agent too\n if (!$da149e13e9eaa5f6$var$isChrome() && !$da149e13e9eaa5f6$var$isEdge() && / Safari\\/[\\.0-9]+/.test($da149e13e9eaa5f6$var$theNavigator.userAgent)) {\n const fields = / Version\\/([\\.0-9]+)/.exec($da149e13e9eaa5f6$var$theNavigator.userAgent);\n if (fields !== null) {\n $da149e13e9eaa5f6$var$isSafariResult = true;\n $da149e13e9eaa5f6$var$safariVersionResult = $da149e13e9eaa5f6$var$extractVersion(fields[1]);\n }\n }\n }\n return $da149e13e9eaa5f6$var$isSafariResult;\n}\nfunction $da149e13e9eaa5f6$var$safariVersion() {\n return $da149e13e9eaa5f6$var$isSafari() && $da149e13e9eaa5f6$var$safariVersionResult;\n}\nlet $da149e13e9eaa5f6$var$isWebkitResult;\nlet $da149e13e9eaa5f6$var$webkitVersionResult;\nfunction $da149e13e9eaa5f6$var$isWebkit() {\n if (!(0, $jQJji.default)($da149e13e9eaa5f6$var$isWebkitResult)) {\n $da149e13e9eaa5f6$var$isWebkitResult = false;\n const fields = / AppleWebKit\\/([\\.0-9]+)(\\+?)/.exec($da149e13e9eaa5f6$var$theNavigator.userAgent);\n if (fields !== null) {\n $da149e13e9eaa5f6$var$isWebkitResult = true;\n $da149e13e9eaa5f6$var$webkitVersionResult = $da149e13e9eaa5f6$var$extractVersion(fields[1]);\n $da149e13e9eaa5f6$var$webkitVersionResult.isNightly = !!fields[2];\n }\n }\n return $da149e13e9eaa5f6$var$isWebkitResult;\n}\nfunction $da149e13e9eaa5f6$var$webkitVersion() {\n return $da149e13e9eaa5f6$var$isWebkit() && $da149e13e9eaa5f6$var$webkitVersionResult;\n}\nlet $da149e13e9eaa5f6$var$isInternetExplorerResult;\nlet $da149e13e9eaa5f6$var$internetExplorerVersionResult;\nfunction $da149e13e9eaa5f6$var$isInternetExplorer() {\n if (!(0, $jQJji.default)($da149e13e9eaa5f6$var$isInternetExplorerResult)) {\n $da149e13e9eaa5f6$var$isInternetExplorerResult = false;\n let fields;\n if ($da149e13e9eaa5f6$var$theNavigator.appName === \"Microsoft Internet Explorer\") {\n fields = /MSIE ([0-9]{1,}[\\.0-9]{0,})/.exec($da149e13e9eaa5f6$var$theNavigator.userAgent);\n if (fields !== null) {\n $da149e13e9eaa5f6$var$isInternetExplorerResult = true;\n $da149e13e9eaa5f6$var$internetExplorerVersionResult = $da149e13e9eaa5f6$var$extractVersion(fields[1]);\n }\n } else if ($da149e13e9eaa5f6$var$theNavigator.appName === \"Netscape\") {\n fields = /Trident\\/.*rv:([0-9]{1,}[\\.0-9]{0,})/.exec($da149e13e9eaa5f6$var$theNavigator.userAgent);\n if (fields !== null) {\n $da149e13e9eaa5f6$var$isInternetExplorerResult = true;\n $da149e13e9eaa5f6$var$internetExplorerVersionResult = $da149e13e9eaa5f6$var$extractVersion(fields[1]);\n }\n }\n }\n return $da149e13e9eaa5f6$var$isInternetExplorerResult;\n}\nfunction $da149e13e9eaa5f6$var$internetExplorerVersion() {\n return $da149e13e9eaa5f6$var$isInternetExplorer() && $da149e13e9eaa5f6$var$internetExplorerVersionResult;\n}\nlet $da149e13e9eaa5f6$var$isEdgeResult;\nlet $da149e13e9eaa5f6$var$edgeVersionResult;\nfunction $da149e13e9eaa5f6$var$isEdge() {\n if (!(0, $jQJji.default)($da149e13e9eaa5f6$var$isEdgeResult)) {\n $da149e13e9eaa5f6$var$isEdgeResult = false;\n const fields = / Edg\\/([\\.0-9]+)/.exec($da149e13e9eaa5f6$var$theNavigator.userAgent);\n if (fields !== null) {\n $da149e13e9eaa5f6$var$isEdgeResult = true;\n $da149e13e9eaa5f6$var$edgeVersionResult = $da149e13e9eaa5f6$var$extractVersion(fields[1]);\n }\n }\n return $da149e13e9eaa5f6$var$isEdgeResult;\n}\nfunction $da149e13e9eaa5f6$var$edgeVersion() {\n return $da149e13e9eaa5f6$var$isEdge() && $da149e13e9eaa5f6$var$edgeVersionResult;\n}\nlet $da149e13e9eaa5f6$var$isFirefoxResult;\nlet $da149e13e9eaa5f6$var$firefoxVersionResult;\nfunction $da149e13e9eaa5f6$var$isFirefox() {\n if (!(0, $jQJji.default)($da149e13e9eaa5f6$var$isFirefoxResult)) {\n $da149e13e9eaa5f6$var$isFirefoxResult = false;\n const fields = /Firefox\\/([\\.0-9]+)/.exec($da149e13e9eaa5f6$var$theNavigator.userAgent);\n if (fields !== null) {\n $da149e13e9eaa5f6$var$isFirefoxResult = true;\n $da149e13e9eaa5f6$var$firefoxVersionResult = $da149e13e9eaa5f6$var$extractVersion(fields[1]);\n }\n }\n return $da149e13e9eaa5f6$var$isFirefoxResult;\n}\nlet $da149e13e9eaa5f6$var$isWindowsResult;\nfunction $da149e13e9eaa5f6$var$isWindows() {\n if (!(0, $jQJji.default)($da149e13e9eaa5f6$var$isWindowsResult)) $da149e13e9eaa5f6$var$isWindowsResult = /Windows/i.test($da149e13e9eaa5f6$var$theNavigator.appVersion);\n return $da149e13e9eaa5f6$var$isWindowsResult;\n}\nlet $da149e13e9eaa5f6$var$isIPadOrIOSResult;\nfunction $da149e13e9eaa5f6$var$isIPadOrIOS() {\n if (!(0, $jQJji.default)($da149e13e9eaa5f6$var$isIPadOrIOSResult)) $da149e13e9eaa5f6$var$isIPadOrIOSResult = navigator.platform === \"iPhone\" || navigator.platform === \"iPod\" || navigator.platform === \"iPad\";\n return $da149e13e9eaa5f6$var$isIPadOrIOSResult;\n}\nfunction $da149e13e9eaa5f6$var$firefoxVersion() {\n return $da149e13e9eaa5f6$var$isFirefox() && $da149e13e9eaa5f6$var$firefoxVersionResult;\n}\nlet $da149e13e9eaa5f6$var$hasPointerEvents;\nfunction $da149e13e9eaa5f6$var$supportsPointerEvents() {\n if (!(0, $jQJji.default)($da149e13e9eaa5f6$var$hasPointerEvents)) //While navigator.pointerEnabled is deprecated in the W3C specification\n //we still need to use it if it exists in order to support browsers\n //that rely on it, such as the Windows WebBrowser control which defines\n //PointerEvent but sets navigator.pointerEnabled to false.\n //Firefox disabled because of https://github.com/CesiumGS/cesium/issues/6372\n $da149e13e9eaa5f6$var$hasPointerEvents = !$da149e13e9eaa5f6$var$isFirefox() && typeof PointerEvent !== \"undefined\" && (!(0, $jQJji.default)($da149e13e9eaa5f6$var$theNavigator.pointerEnabled) || $da149e13e9eaa5f6$var$theNavigator.pointerEnabled);\n return $da149e13e9eaa5f6$var$hasPointerEvents;\n}\nlet $da149e13e9eaa5f6$var$imageRenderingValueResult;\nlet $da149e13e9eaa5f6$var$supportsImageRenderingPixelatedResult;\nfunction $da149e13e9eaa5f6$var$supportsImageRenderingPixelated() {\n if (!(0, $jQJji.default)($da149e13e9eaa5f6$var$supportsImageRenderingPixelatedResult)) {\n const canvas = document.createElement(\"canvas\");\n canvas.setAttribute(\"style\", \"image-rendering: -moz-crisp-edges;image-rendering: pixelated;\");\n //canvas.style.imageRendering will be undefined, null or an empty string on unsupported browsers.\n const tmp = canvas.style.imageRendering;\n $da149e13e9eaa5f6$var$supportsImageRenderingPixelatedResult = (0, $jQJji.default)(tmp) && tmp !== \"\";\n if ($da149e13e9eaa5f6$var$supportsImageRenderingPixelatedResult) $da149e13e9eaa5f6$var$imageRenderingValueResult = tmp;\n }\n return $da149e13e9eaa5f6$var$supportsImageRenderingPixelatedResult;\n}\nfunction $da149e13e9eaa5f6$var$imageRenderingValue() {\n return $da149e13e9eaa5f6$var$supportsImageRenderingPixelated() ? $da149e13e9eaa5f6$var$imageRenderingValueResult : undefined;\n}\nfunction $da149e13e9eaa5f6$var$supportsWebP() {\n //>>includeStart('debug', pragmas.debug);\n if (!$da149e13e9eaa5f6$var$supportsWebP.initialized) throw new (0, $1vHsR.default)(\"You must call FeatureDetection.supportsWebP.initialize and wait for the promise to resolve before calling FeatureDetection.supportsWebP\");\n //>>includeEnd('debug');\n return $da149e13e9eaa5f6$var$supportsWebP._result;\n}\n$da149e13e9eaa5f6$var$supportsWebP._promise = undefined;\n$da149e13e9eaa5f6$var$supportsWebP._result = undefined;\n$da149e13e9eaa5f6$var$supportsWebP.initialize = function() {\n // From https://developers.google.com/speed/webp/faq#how_can_i_detect_browser_support_for_webp\n if ((0, $jQJji.default)($da149e13e9eaa5f6$var$supportsWebP._promise)) return $da149e13e9eaa5f6$var$supportsWebP._promise;\n $da149e13e9eaa5f6$var$supportsWebP._promise = new Promise((resolve)=>{\n const image = new Image();\n image.onload = function() {\n $da149e13e9eaa5f6$var$supportsWebP._result = image.width > 0 && image.height > 0;\n resolve($da149e13e9eaa5f6$var$supportsWebP._result);\n };\n image.onerror = function() {\n $da149e13e9eaa5f6$var$supportsWebP._result = false;\n resolve($da149e13e9eaa5f6$var$supportsWebP._result);\n };\n image.src = \"data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA\";\n });\n return $da149e13e9eaa5f6$var$supportsWebP._promise;\n};\nObject.defineProperties($da149e13e9eaa5f6$var$supportsWebP, {\n initialized: {\n get: function() {\n return (0, $jQJji.default)($da149e13e9eaa5f6$var$supportsWebP._result);\n }\n }\n});\nconst $da149e13e9eaa5f6$var$typedArrayTypes = [];\nif (typeof ArrayBuffer !== \"undefined\") {\n $da149e13e9eaa5f6$var$typedArrayTypes.push(Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array);\n if (typeof Uint8ClampedArray !== \"undefined\") $da149e13e9eaa5f6$var$typedArrayTypes.push(Uint8ClampedArray);\n if (typeof Uint8ClampedArray !== \"undefined\") $da149e13e9eaa5f6$var$typedArrayTypes.push(Uint8ClampedArray);\n if (typeof BigInt64Array !== \"undefined\") // eslint-disable-next-line no-undef\n $da149e13e9eaa5f6$var$typedArrayTypes.push(BigInt64Array);\n if (typeof BigUint64Array !== \"undefined\") // eslint-disable-next-line no-undef\n $da149e13e9eaa5f6$var$typedArrayTypes.push(BigUint64Array);\n}\n/**\n * A set of functions to detect whether the current browser supports\n * various features.\n *\n * @namespace FeatureDetection\n */ const $da149e13e9eaa5f6$var$FeatureDetection = {\n isChrome: $da149e13e9eaa5f6$var$isChrome,\n chromeVersion: $da149e13e9eaa5f6$var$chromeVersion,\n isSafari: $da149e13e9eaa5f6$var$isSafari,\n safariVersion: $da149e13e9eaa5f6$var$safariVersion,\n isWebkit: $da149e13e9eaa5f6$var$isWebkit,\n webkitVersion: $da149e13e9eaa5f6$var$webkitVersion,\n isInternetExplorer: $da149e13e9eaa5f6$var$isInternetExplorer,\n internetExplorerVersion: $da149e13e9eaa5f6$var$internetExplorerVersion,\n isEdge: $da149e13e9eaa5f6$var$isEdge,\n edgeVersion: $da149e13e9eaa5f6$var$edgeVersion,\n isFirefox: $da149e13e9eaa5f6$var$isFirefox,\n firefoxVersion: $da149e13e9eaa5f6$var$firefoxVersion,\n isWindows: $da149e13e9eaa5f6$var$isWindows,\n isIPadOrIOS: $da149e13e9eaa5f6$var$isIPadOrIOS,\n hardwareConcurrency: (0, $8w8ZH.default)($da149e13e9eaa5f6$var$theNavigator.hardwareConcurrency, 3),\n supportsPointerEvents: $da149e13e9eaa5f6$var$supportsPointerEvents,\n supportsImageRenderingPixelated: $da149e13e9eaa5f6$var$supportsImageRenderingPixelated,\n supportsWebP: $da149e13e9eaa5f6$var$supportsWebP,\n imageRenderingValue: $da149e13e9eaa5f6$var$imageRenderingValue,\n typedArrayTypes: $da149e13e9eaa5f6$var$typedArrayTypes\n};\n/**\n * Detects whether the current browser supports Basis Universal textures and the web assembly modules needed to transcode them.\n *\n * @param {Scene} scene\n * @returns {boolean} true if the browser supports web assembly modules and the scene supports Basis Universal textures, false if not.\n */ $da149e13e9eaa5f6$var$FeatureDetection.supportsBasis = function(scene) {\n return $da149e13e9eaa5f6$var$FeatureDetection.supportsWebAssembly() && scene.context.supportsBasis;\n};\n/**\n * Detects whether the current browser supports the full screen standard.\n *\n * @returns {boolean} true if the browser supports the full screen standard, false if not.\n *\n * @see Fullscreen\n * @see {@link http://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html|W3C Fullscreen Living Specification}\n */ $da149e13e9eaa5f6$var$FeatureDetection.supportsFullscreen = function() {\n return (0, $19a47bf34378ad7c$export$2e2bcd8739ae039).supportsFullscreen();\n};\n/**\n * Detects whether the current browser supports typed arrays.\n *\n * @returns {boolean} true if the browser supports typed arrays, false if not.\n *\n * @see {@link https://tc39.es/ecma262/#sec-typedarray-objects|Typed Array Specification}\n */ $da149e13e9eaa5f6$var$FeatureDetection.supportsTypedArrays = function() {\n return typeof ArrayBuffer !== \"undefined\";\n};\n/**\n * Detects whether the current browser supports BigInt64Array typed arrays.\n *\n * @returns {boolean} true if the browser supports BigInt64Array typed arrays, false if not.\n *\n * @see {@link https://tc39.es/ecma262/#sec-typedarray-objects|Typed Array Specification}\n */ $da149e13e9eaa5f6$var$FeatureDetection.supportsBigInt64Array = function() {\n return typeof BigInt64Array !== \"undefined\";\n};\n/**\n * Detects whether the current browser supports BigUint64Array typed arrays.\n *\n * @returns {boolean} true if the browser supports BigUint64Array typed arrays, false if not.\n *\n * @see {@link https://tc39.es/ecma262/#sec-typedarray-objects|Typed Array Specification}\n */ $da149e13e9eaa5f6$var$FeatureDetection.supportsBigUint64Array = function() {\n return typeof BigUint64Array !== \"undefined\";\n};\n/**\n * Detects whether the current browser supports BigInt.\n *\n * @returns {boolean} true if the browser supports BigInt, false if not.\n *\n * @see {@link https://tc39.es/ecma262/#sec-bigint-objects|BigInt Specification}\n */ $da149e13e9eaa5f6$var$FeatureDetection.supportsBigInt = function() {\n return typeof BigInt !== \"undefined\";\n};\n/**\n * Detects whether the current browser supports Web Workers.\n *\n * @returns {boolean} true if the browsers supports Web Workers, false if not.\n *\n * @see {@link http://www.w3.org/TR/workers/}\n */ $da149e13e9eaa5f6$var$FeatureDetection.supportsWebWorkers = function() {\n return typeof Worker !== \"undefined\";\n};\n/**\n * Detects whether the current browser supports Web Assembly.\n *\n * @returns {boolean} true if the browsers supports Web Assembly, false if not.\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/WebAssembly}\n */ $da149e13e9eaa5f6$var$FeatureDetection.supportsWebAssembly = function() {\n return typeof WebAssembly !== \"undefined\";\n};\n/**\n * Detects whether the current browser supports a WebGL2 rendering context for the specified scene.\n *\n * @param {Scene} scene the Cesium scene specifying the rendering context\n * @returns {boolean} true if the browser supports a WebGL2 rendering context, false if not.\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/WebGL2RenderingContext|WebGL2RenderingContext}\n */ $da149e13e9eaa5f6$var$FeatureDetection.supportsWebgl2 = function(scene) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).defined(\"scene\", scene);\n //>>includeEnd('debug');\n return scene.context.webgl2;\n};\n/**\n * Detects whether the current browser supports ECMAScript modules in web workers.\n * @returns {boolean} true if the browser supports ECMAScript modules in web workers.\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Worker|Worker}\n */ $da149e13e9eaa5f6$var$FeatureDetection.supportsEsmWebWorkers = function() {\n return !$da149e13e9eaa5f6$var$isFirefox() || parseInt($da149e13e9eaa5f6$var$firefoxVersionResult) >= 114;\n};\nvar $da149e13e9eaa5f6$export$2e2bcd8739ae039 = $da149e13e9eaa5f6$var$FeatureDetection;\n\n\n\nvar $AXvpI = parcelRequire(\"AXvpI\");\n\n/**\n * A set of 4-dimensional coordinates used to represent rotation in 3-dimensional space.\n * @alias Quaternion\n * @constructor\n *\n * @param {number} [x=0.0] The X component.\n * @param {number} [y=0.0] The Y component.\n * @param {number} [z=0.0] The Z component.\n * @param {number} [w=0.0] The W component.\n *\n * @see PackableForInterpolation\n */ function $cd53d4b312c9644c$var$Quaternion(x, y, z, w) {\n /**\n * The X component.\n * @type {number}\n * @default 0.0\n */ this.x = (0, $8w8ZH.default)(x, 0.0);\n /**\n * The Y component.\n * @type {number}\n * @default 0.0\n */ this.y = (0, $8w8ZH.default)(y, 0.0);\n /**\n * The Z component.\n * @type {number}\n * @default 0.0\n */ this.z = (0, $8w8ZH.default)(z, 0.0);\n /**\n * The W component.\n * @type {number}\n * @default 0.0\n */ this.w = (0, $8w8ZH.default)(w, 0.0);\n}\nlet $cd53d4b312c9644c$var$fromAxisAngleScratch = new (0, $bXwZF.default)();\n/**\n * Computes a quaternion representing a rotation around an axis.\n *\n * @param {Cartesian3} axis The axis of rotation.\n * @param {number} angle The angle in radians to rotate around the axis.\n * @param {Quaternion} [result] The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter or a new Quaternion instance if one was not provided.\n */ $cd53d4b312c9644c$var$Quaternion.fromAxisAngle = function(axis, angle, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"axis\", axis);\n (0, $3pzcG.default).typeOf.number(\"angle\", angle);\n //>>includeEnd('debug');\n const halfAngle = angle / 2.0;\n const s = Math.sin(halfAngle);\n $cd53d4b312c9644c$var$fromAxisAngleScratch = (0, $bXwZF.default).normalize(axis, $cd53d4b312c9644c$var$fromAxisAngleScratch);\n const x = $cd53d4b312c9644c$var$fromAxisAngleScratch.x * s;\n const y = $cd53d4b312c9644c$var$fromAxisAngleScratch.y * s;\n const z = $cd53d4b312c9644c$var$fromAxisAngleScratch.z * s;\n const w = Math.cos(halfAngle);\n if (!(0, $jQJji.default)(result)) return new $cd53d4b312c9644c$var$Quaternion(x, y, z, w);\n result.x = x;\n result.y = y;\n result.z = z;\n result.w = w;\n return result;\n};\nconst $cd53d4b312c9644c$var$fromRotationMatrixNext = [\n 1,\n 2,\n 0\n];\nconst $cd53d4b312c9644c$var$fromRotationMatrixQuat = new Array(3);\n/**\n * Computes a Quaternion from the provided Matrix3 instance.\n *\n * @param {Matrix3} matrix The rotation matrix.\n * @param {Quaternion} [result] The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter or a new Quaternion instance if one was not provided.\n *\n * @see Matrix3.fromQuaternion\n */ $cd53d4b312c9644c$var$Quaternion.fromRotationMatrix = function(matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"matrix\", matrix);\n //>>includeEnd('debug');\n let root;\n let x;\n let y;\n let z;\n let w;\n const m00 = matrix[(0, $490279d1ff27cf6c$export$2e2bcd8739ae039).COLUMN0ROW0];\n const m11 = matrix[(0, $490279d1ff27cf6c$export$2e2bcd8739ae039).COLUMN1ROW1];\n const m22 = matrix[(0, $490279d1ff27cf6c$export$2e2bcd8739ae039).COLUMN2ROW2];\n const trace = m00 + m11 + m22;\n if (trace > 0.0) {\n // |w| > 1/2, may as well choose w > 1/2\n root = Math.sqrt(trace + 1.0); // 2w\n w = 0.5 * root;\n root = 0.5 / root; // 1/(4w)\n x = (matrix[(0, $490279d1ff27cf6c$export$2e2bcd8739ae039).COLUMN1ROW2] - matrix[(0, $490279d1ff27cf6c$export$2e2bcd8739ae039).COLUMN2ROW1]) * root;\n y = (matrix[(0, $490279d1ff27cf6c$export$2e2bcd8739ae039).COLUMN2ROW0] - matrix[(0, $490279d1ff27cf6c$export$2e2bcd8739ae039).COLUMN0ROW2]) * root;\n z = (matrix[(0, $490279d1ff27cf6c$export$2e2bcd8739ae039).COLUMN0ROW1] - matrix[(0, $490279d1ff27cf6c$export$2e2bcd8739ae039).COLUMN1ROW0]) * root;\n } else {\n // |w| <= 1/2\n const next = $cd53d4b312c9644c$var$fromRotationMatrixNext;\n let i = 0;\n if (m11 > m00) i = 1;\n if (m22 > m00 && m22 > m11) i = 2;\n const j = next[i];\n const k = next[j];\n root = Math.sqrt(matrix[(0, $490279d1ff27cf6c$export$2e2bcd8739ae039).getElementIndex(i, i)] - matrix[(0, $490279d1ff27cf6c$export$2e2bcd8739ae039).getElementIndex(j, j)] - matrix[(0, $490279d1ff27cf6c$export$2e2bcd8739ae039).getElementIndex(k, k)] + 1.0);\n const quat = $cd53d4b312c9644c$var$fromRotationMatrixQuat;\n quat[i] = 0.5 * root;\n root = 0.5 / root;\n w = (matrix[(0, $490279d1ff27cf6c$export$2e2bcd8739ae039).getElementIndex(k, j)] - matrix[(0, $490279d1ff27cf6c$export$2e2bcd8739ae039).getElementIndex(j, k)]) * root;\n quat[j] = (matrix[(0, $490279d1ff27cf6c$export$2e2bcd8739ae039).getElementIndex(j, i)] + matrix[(0, $490279d1ff27cf6c$export$2e2bcd8739ae039).getElementIndex(i, j)]) * root;\n quat[k] = (matrix[(0, $490279d1ff27cf6c$export$2e2bcd8739ae039).getElementIndex(k, i)] + matrix[(0, $490279d1ff27cf6c$export$2e2bcd8739ae039).getElementIndex(i, k)]) * root;\n x = -quat[0];\n y = -quat[1];\n z = -quat[2];\n }\n if (!(0, $jQJji.default)(result)) return new $cd53d4b312c9644c$var$Quaternion(x, y, z, w);\n result.x = x;\n result.y = y;\n result.z = z;\n result.w = w;\n return result;\n};\nconst $cd53d4b312c9644c$var$scratchHPRQuaternion = new $cd53d4b312c9644c$var$Quaternion();\nlet $cd53d4b312c9644c$var$scratchHeadingQuaternion = new $cd53d4b312c9644c$var$Quaternion();\nlet $cd53d4b312c9644c$var$scratchPitchQuaternion = new $cd53d4b312c9644c$var$Quaternion();\nlet $cd53d4b312c9644c$var$scratchRollQuaternion = new $cd53d4b312c9644c$var$Quaternion();\n/**\n * Computes a rotation from the given heading, pitch and roll angles. Heading is the rotation about the\n * negative z axis. Pitch is the rotation about the negative y axis. Roll is the rotation about\n * the positive x axis.\n *\n * @param {HeadingPitchRoll} headingPitchRoll The rotation expressed as a heading, pitch and roll.\n * @param {Quaternion} [result] The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter or a new Quaternion instance if none was provided.\n */ $cd53d4b312c9644c$var$Quaternion.fromHeadingPitchRoll = function(headingPitchRoll, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"headingPitchRoll\", headingPitchRoll);\n //>>includeEnd('debug');\n $cd53d4b312c9644c$var$scratchRollQuaternion = $cd53d4b312c9644c$var$Quaternion.fromAxisAngle((0, $bXwZF.default).UNIT_X, headingPitchRoll.roll, $cd53d4b312c9644c$var$scratchHPRQuaternion);\n $cd53d4b312c9644c$var$scratchPitchQuaternion = $cd53d4b312c9644c$var$Quaternion.fromAxisAngle((0, $bXwZF.default).UNIT_Y, -headingPitchRoll.pitch, result);\n result = $cd53d4b312c9644c$var$Quaternion.multiply($cd53d4b312c9644c$var$scratchPitchQuaternion, $cd53d4b312c9644c$var$scratchRollQuaternion, $cd53d4b312c9644c$var$scratchPitchQuaternion);\n $cd53d4b312c9644c$var$scratchHeadingQuaternion = $cd53d4b312c9644c$var$Quaternion.fromAxisAngle((0, $bXwZF.default).UNIT_Z, -headingPitchRoll.heading, $cd53d4b312c9644c$var$scratchHPRQuaternion);\n return $cd53d4b312c9644c$var$Quaternion.multiply($cd53d4b312c9644c$var$scratchHeadingQuaternion, result, result);\n};\nconst $cd53d4b312c9644c$var$sampledQuaternionAxis = new (0, $bXwZF.default)();\nconst $cd53d4b312c9644c$var$sampledQuaternionRotation = new (0, $bXwZF.default)();\nconst $cd53d4b312c9644c$var$sampledQuaternionTempQuaternion = new $cd53d4b312c9644c$var$Quaternion();\nconst $cd53d4b312c9644c$var$sampledQuaternionQuaternion0 = new $cd53d4b312c9644c$var$Quaternion();\nconst $cd53d4b312c9644c$var$sampledQuaternionQuaternion0Conjugate = new $cd53d4b312c9644c$var$Quaternion();\n/**\n * The number of elements used to pack the object into an array.\n * @type {number}\n */ $cd53d4b312c9644c$var$Quaternion.packedLength = 4;\n/**\n * Stores the provided instance into the provided array.\n *\n * @param {Quaternion} value The value to pack.\n * @param {number[]} array The array to pack into.\n * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.\n *\n * @returns {number[]} The array that was packed into\n */ $cd53d4b312c9644c$var$Quaternion.pack = function(value, array, startingIndex) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"value\", value);\n (0, $3pzcG.default).defined(\"array\", array);\n //>>includeEnd('debug');\n startingIndex = (0, $8w8ZH.default)(startingIndex, 0);\n array[startingIndex++] = value.x;\n array[startingIndex++] = value.y;\n array[startingIndex++] = value.z;\n array[startingIndex] = value.w;\n return array;\n};\n/**\n * Retrieves an instance from a packed array.\n *\n * @param {number[]} array The packed array.\n * @param {number} [startingIndex=0] The starting index of the element to be unpacked.\n * @param {Quaternion} [result] The object into which to store the result.\n * @returns {Quaternion} The modified result parameter or a new Quaternion instance if one was not provided.\n */ $cd53d4b312c9644c$var$Quaternion.unpack = function(array, startingIndex, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).defined(\"array\", array);\n //>>includeEnd('debug');\n startingIndex = (0, $8w8ZH.default)(startingIndex, 0);\n if (!(0, $jQJji.default)(result)) result = new $cd53d4b312c9644c$var$Quaternion();\n result.x = array[startingIndex];\n result.y = array[startingIndex + 1];\n result.z = array[startingIndex + 2];\n result.w = array[startingIndex + 3];\n return result;\n};\n/**\n * The number of elements used to store the object into an array in its interpolatable form.\n * @type {number}\n */ $cd53d4b312c9644c$var$Quaternion.packedInterpolationLength = 3;\n/**\n * Converts a packed array into a form suitable for interpolation.\n *\n * @param {number[]} packedArray The packed array.\n * @param {number} [startingIndex=0] The index of the first element to be converted.\n * @param {number} [lastIndex=packedArray.length] The index of the last element to be converted.\n * @param {number[]} [result] The object into which to store the result.\n */ $cd53d4b312c9644c$var$Quaternion.convertPackedArrayForInterpolation = function(packedArray, startingIndex, lastIndex, result) {\n $cd53d4b312c9644c$var$Quaternion.unpack(packedArray, lastIndex * 4, $cd53d4b312c9644c$var$sampledQuaternionQuaternion0Conjugate);\n $cd53d4b312c9644c$var$Quaternion.conjugate($cd53d4b312c9644c$var$sampledQuaternionQuaternion0Conjugate, $cd53d4b312c9644c$var$sampledQuaternionQuaternion0Conjugate);\n for(let i = 0, len = lastIndex - startingIndex + 1; i < len; i++){\n const offset = i * 3;\n $cd53d4b312c9644c$var$Quaternion.unpack(packedArray, (startingIndex + i) * 4, $cd53d4b312c9644c$var$sampledQuaternionTempQuaternion);\n $cd53d4b312c9644c$var$Quaternion.multiply($cd53d4b312c9644c$var$sampledQuaternionTempQuaternion, $cd53d4b312c9644c$var$sampledQuaternionQuaternion0Conjugate, $cd53d4b312c9644c$var$sampledQuaternionTempQuaternion);\n if ($cd53d4b312c9644c$var$sampledQuaternionTempQuaternion.w < 0) $cd53d4b312c9644c$var$Quaternion.negate($cd53d4b312c9644c$var$sampledQuaternionTempQuaternion, $cd53d4b312c9644c$var$sampledQuaternionTempQuaternion);\n $cd53d4b312c9644c$var$Quaternion.computeAxis($cd53d4b312c9644c$var$sampledQuaternionTempQuaternion, $cd53d4b312c9644c$var$sampledQuaternionAxis);\n const angle = $cd53d4b312c9644c$var$Quaternion.computeAngle($cd53d4b312c9644c$var$sampledQuaternionTempQuaternion);\n if (!(0, $jQJji.default)(result)) result = [];\n result[offset] = $cd53d4b312c9644c$var$sampledQuaternionAxis.x * angle;\n result[offset + 1] = $cd53d4b312c9644c$var$sampledQuaternionAxis.y * angle;\n result[offset + 2] = $cd53d4b312c9644c$var$sampledQuaternionAxis.z * angle;\n }\n};\n/**\n * Retrieves an instance from a packed array converted with {@link convertPackedArrayForInterpolation}.\n *\n * @param {number[]} array The array previously packed for interpolation.\n * @param {number[]} sourceArray The original packed array.\n * @param {number} [firstIndex=0] The firstIndex used to convert the array.\n * @param {number} [lastIndex=packedArray.length] The lastIndex used to convert the array.\n * @param {Quaternion} [result] The object into which to store the result.\n * @returns {Quaternion} The modified result parameter or a new Quaternion instance if one was not provided.\n */ $cd53d4b312c9644c$var$Quaternion.unpackInterpolationResult = function(array, sourceArray, firstIndex, lastIndex, result) {\n if (!(0, $jQJji.default)(result)) result = new $cd53d4b312c9644c$var$Quaternion();\n (0, $bXwZF.default).fromArray(array, 0, $cd53d4b312c9644c$var$sampledQuaternionRotation);\n const magnitude = (0, $bXwZF.default).magnitude($cd53d4b312c9644c$var$sampledQuaternionRotation);\n $cd53d4b312c9644c$var$Quaternion.unpack(sourceArray, lastIndex * 4, $cd53d4b312c9644c$var$sampledQuaternionQuaternion0);\n if (magnitude === 0) $cd53d4b312c9644c$var$Quaternion.clone($cd53d4b312c9644c$var$Quaternion.IDENTITY, $cd53d4b312c9644c$var$sampledQuaternionTempQuaternion);\n else $cd53d4b312c9644c$var$Quaternion.fromAxisAngle($cd53d4b312c9644c$var$sampledQuaternionRotation, magnitude, $cd53d4b312c9644c$var$sampledQuaternionTempQuaternion);\n return $cd53d4b312c9644c$var$Quaternion.multiply($cd53d4b312c9644c$var$sampledQuaternionTempQuaternion, $cd53d4b312c9644c$var$sampledQuaternionQuaternion0, result);\n};\n/**\n * Duplicates a Quaternion instance.\n *\n * @param {Quaternion} quaternion The quaternion to duplicate.\n * @param {Quaternion} [result] The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter or a new Quaternion instance if one was not provided. (Returns undefined if quaternion is undefined)\n */ $cd53d4b312c9644c$var$Quaternion.clone = function(quaternion, result) {\n if (!(0, $jQJji.default)(quaternion)) return undefined;\n if (!(0, $jQJji.default)(result)) return new $cd53d4b312c9644c$var$Quaternion(quaternion.x, quaternion.y, quaternion.z, quaternion.w);\n result.x = quaternion.x;\n result.y = quaternion.y;\n result.z = quaternion.z;\n result.w = quaternion.w;\n return result;\n};\n/**\n * Computes the conjugate of the provided quaternion.\n *\n * @param {Quaternion} quaternion The quaternion to conjugate.\n * @param {Quaternion} result The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter.\n */ $cd53d4b312c9644c$var$Quaternion.conjugate = function(quaternion, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"quaternion\", quaternion);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n result.x = -quaternion.x;\n result.y = -quaternion.y;\n result.z = -quaternion.z;\n result.w = quaternion.w;\n return result;\n};\n/**\n * Computes magnitude squared for the provided quaternion.\n *\n * @param {Quaternion} quaternion The quaternion to conjugate.\n * @returns {number} The magnitude squared.\n */ $cd53d4b312c9644c$var$Quaternion.magnitudeSquared = function(quaternion) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"quaternion\", quaternion);\n //>>includeEnd('debug');\n return quaternion.x * quaternion.x + quaternion.y * quaternion.y + quaternion.z * quaternion.z + quaternion.w * quaternion.w;\n};\n/**\n * Computes magnitude for the provided quaternion.\n *\n * @param {Quaternion} quaternion The quaternion to conjugate.\n * @returns {number} The magnitude.\n */ $cd53d4b312c9644c$var$Quaternion.magnitude = function(quaternion) {\n return Math.sqrt($cd53d4b312c9644c$var$Quaternion.magnitudeSquared(quaternion));\n};\n/**\n * Computes the normalized form of the provided quaternion.\n *\n * @param {Quaternion} quaternion The quaternion to normalize.\n * @param {Quaternion} result The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter.\n */ $cd53d4b312c9644c$var$Quaternion.normalize = function(quaternion, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n const inverseMagnitude = 1.0 / $cd53d4b312c9644c$var$Quaternion.magnitude(quaternion);\n const x = quaternion.x * inverseMagnitude;\n const y = quaternion.y * inverseMagnitude;\n const z = quaternion.z * inverseMagnitude;\n const w = quaternion.w * inverseMagnitude;\n result.x = x;\n result.y = y;\n result.z = z;\n result.w = w;\n return result;\n};\n/**\n * Computes the inverse of the provided quaternion.\n *\n * @param {Quaternion} quaternion The quaternion to normalize.\n * @param {Quaternion} result The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter.\n */ $cd53d4b312c9644c$var$Quaternion.inverse = function(quaternion, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n const magnitudeSquared = $cd53d4b312c9644c$var$Quaternion.magnitudeSquared(quaternion);\n result = $cd53d4b312c9644c$var$Quaternion.conjugate(quaternion, result);\n return $cd53d4b312c9644c$var$Quaternion.multiplyByScalar(result, 1.0 / magnitudeSquared, result);\n};\n/**\n * Computes the componentwise sum of two quaternions.\n *\n * @param {Quaternion} left The first quaternion.\n * @param {Quaternion} right The second quaternion.\n * @param {Quaternion} result The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter.\n */ $cd53d4b312c9644c$var$Quaternion.add = function(left, right, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"left\", left);\n (0, $3pzcG.default).typeOf.object(\"right\", right);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n result.x = left.x + right.x;\n result.y = left.y + right.y;\n result.z = left.z + right.z;\n result.w = left.w + right.w;\n return result;\n};\n/**\n * Computes the componentwise difference of two quaternions.\n *\n * @param {Quaternion} left The first quaternion.\n * @param {Quaternion} right The second quaternion.\n * @param {Quaternion} result The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter.\n */ $cd53d4b312c9644c$var$Quaternion.subtract = function(left, right, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"left\", left);\n (0, $3pzcG.default).typeOf.object(\"right\", right);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n result.x = left.x - right.x;\n result.y = left.y - right.y;\n result.z = left.z - right.z;\n result.w = left.w - right.w;\n return result;\n};\n/**\n * Negates the provided quaternion.\n *\n * @param {Quaternion} quaternion The quaternion to be negated.\n * @param {Quaternion} result The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter.\n */ $cd53d4b312c9644c$var$Quaternion.negate = function(quaternion, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"quaternion\", quaternion);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n result.x = -quaternion.x;\n result.y = -quaternion.y;\n result.z = -quaternion.z;\n result.w = -quaternion.w;\n return result;\n};\n/**\n * Computes the dot (scalar) product of two quaternions.\n *\n * @param {Quaternion} left The first quaternion.\n * @param {Quaternion} right The second quaternion.\n * @returns {number} The dot product.\n */ $cd53d4b312c9644c$var$Quaternion.dot = function(left, right) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"left\", left);\n (0, $3pzcG.default).typeOf.object(\"right\", right);\n //>>includeEnd('debug');\n return left.x * right.x + left.y * right.y + left.z * right.z + left.w * right.w;\n};\n/**\n * Computes the product of two quaternions.\n *\n * @param {Quaternion} left The first quaternion.\n * @param {Quaternion} right The second quaternion.\n * @param {Quaternion} result The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter.\n */ $cd53d4b312c9644c$var$Quaternion.multiply = function(left, right, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"left\", left);\n (0, $3pzcG.default).typeOf.object(\"right\", right);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n const leftX = left.x;\n const leftY = left.y;\n const leftZ = left.z;\n const leftW = left.w;\n const rightX = right.x;\n const rightY = right.y;\n const rightZ = right.z;\n const rightW = right.w;\n const x = leftW * rightX + leftX * rightW + leftY * rightZ - leftZ * rightY;\n const y = leftW * rightY - leftX * rightZ + leftY * rightW + leftZ * rightX;\n const z = leftW * rightZ + leftX * rightY - leftY * rightX + leftZ * rightW;\n const w = leftW * rightW - leftX * rightX - leftY * rightY - leftZ * rightZ;\n result.x = x;\n result.y = y;\n result.z = z;\n result.w = w;\n return result;\n};\n/**\n * Multiplies the provided quaternion componentwise by the provided scalar.\n *\n * @param {Quaternion} quaternion The quaternion to be scaled.\n * @param {number} scalar The scalar to multiply with.\n * @param {Quaternion} result The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter.\n */ $cd53d4b312c9644c$var$Quaternion.multiplyByScalar = function(quaternion, scalar, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"quaternion\", quaternion);\n (0, $3pzcG.default).typeOf.number(\"scalar\", scalar);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n result.x = quaternion.x * scalar;\n result.y = quaternion.y * scalar;\n result.z = quaternion.z * scalar;\n result.w = quaternion.w * scalar;\n return result;\n};\n/**\n * Divides the provided quaternion componentwise by the provided scalar.\n *\n * @param {Quaternion} quaternion The quaternion to be divided.\n * @param {number} scalar The scalar to divide by.\n * @param {Quaternion} result The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter.\n */ $cd53d4b312c9644c$var$Quaternion.divideByScalar = function(quaternion, scalar, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"quaternion\", quaternion);\n (0, $3pzcG.default).typeOf.number(\"scalar\", scalar);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n result.x = quaternion.x / scalar;\n result.y = quaternion.y / scalar;\n result.z = quaternion.z / scalar;\n result.w = quaternion.w / scalar;\n return result;\n};\n/**\n * Computes the axis of rotation of the provided quaternion.\n *\n * @param {Quaternion} quaternion The quaternion to use.\n * @param {Cartesian3} result The object onto which to store the result.\n * @returns {Cartesian3} The modified result parameter.\n */ $cd53d4b312c9644c$var$Quaternion.computeAxis = function(quaternion, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"quaternion\", quaternion);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n const w = quaternion.w;\n if (Math.abs(w - 1.0) < (0, $AXvpI.default).EPSILON6 || Math.abs(w + 1.0) < (0, $AXvpI.default).EPSILON6) {\n result.x = 1;\n result.y = result.z = 0;\n return result;\n }\n const scalar = 1.0 / Math.sqrt(1.0 - w * w);\n result.x = quaternion.x * scalar;\n result.y = quaternion.y * scalar;\n result.z = quaternion.z * scalar;\n return result;\n};\n/**\n * Computes the angle of rotation of the provided quaternion.\n *\n * @param {Quaternion} quaternion The quaternion to use.\n * @returns {number} The angle of rotation.\n */ $cd53d4b312c9644c$var$Quaternion.computeAngle = function(quaternion) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"quaternion\", quaternion);\n //>>includeEnd('debug');\n if (Math.abs(quaternion.w - 1.0) < (0, $AXvpI.default).EPSILON6) return 0.0;\n return 2.0 * Math.acos(quaternion.w);\n};\nlet $cd53d4b312c9644c$var$lerpScratch = new $cd53d4b312c9644c$var$Quaternion();\n/**\n * Computes the linear interpolation or extrapolation at t using the provided quaternions.\n *\n * @param {Quaternion} start The value corresponding to t at 0.0.\n * @param {Quaternion} end The value corresponding to t at 1.0.\n * @param {number} t The point along t at which to interpolate.\n * @param {Quaternion} result The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter.\n */ $cd53d4b312c9644c$var$Quaternion.lerp = function(start, end, t, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"start\", start);\n (0, $3pzcG.default).typeOf.object(\"end\", end);\n (0, $3pzcG.default).typeOf.number(\"t\", t);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n $cd53d4b312c9644c$var$lerpScratch = $cd53d4b312c9644c$var$Quaternion.multiplyByScalar(end, t, $cd53d4b312c9644c$var$lerpScratch);\n result = $cd53d4b312c9644c$var$Quaternion.multiplyByScalar(start, 1.0 - t, result);\n return $cd53d4b312c9644c$var$Quaternion.add($cd53d4b312c9644c$var$lerpScratch, result, result);\n};\nlet $cd53d4b312c9644c$var$slerpEndNegated = new $cd53d4b312c9644c$var$Quaternion();\nlet $cd53d4b312c9644c$var$slerpScaledP = new $cd53d4b312c9644c$var$Quaternion();\nlet $cd53d4b312c9644c$var$slerpScaledR = new $cd53d4b312c9644c$var$Quaternion();\n/**\n * Computes the spherical linear interpolation or extrapolation at t using the provided quaternions.\n *\n * @param {Quaternion} start The value corresponding to t at 0.0.\n * @param {Quaternion} end The value corresponding to t at 1.0.\n * @param {number} t The point along t at which to interpolate.\n * @param {Quaternion} result The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter.\n *\n * @see Quaternion#fastSlerp\n */ $cd53d4b312c9644c$var$Quaternion.slerp = function(start, end, t, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"start\", start);\n (0, $3pzcG.default).typeOf.object(\"end\", end);\n (0, $3pzcG.default).typeOf.number(\"t\", t);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n let dot = $cd53d4b312c9644c$var$Quaternion.dot(start, end);\n // The angle between start must be acute. Since q and -q represent\n // the same rotation, negate q to get the acute angle.\n let r = end;\n if (dot < 0.0) {\n dot = -dot;\n r = $cd53d4b312c9644c$var$slerpEndNegated = $cd53d4b312c9644c$var$Quaternion.negate(end, $cd53d4b312c9644c$var$slerpEndNegated);\n }\n // dot > 0, as the dot product approaches 1, the angle between the\n // quaternions vanishes. use linear interpolation.\n if (1.0 - dot < (0, $AXvpI.default).EPSILON6) return $cd53d4b312c9644c$var$Quaternion.lerp(start, r, t, result);\n const theta = Math.acos(dot);\n $cd53d4b312c9644c$var$slerpScaledP = $cd53d4b312c9644c$var$Quaternion.multiplyByScalar(start, Math.sin((1 - t) * theta), $cd53d4b312c9644c$var$slerpScaledP);\n $cd53d4b312c9644c$var$slerpScaledR = $cd53d4b312c9644c$var$Quaternion.multiplyByScalar(r, Math.sin(t * theta), $cd53d4b312c9644c$var$slerpScaledR);\n result = $cd53d4b312c9644c$var$Quaternion.add($cd53d4b312c9644c$var$slerpScaledP, $cd53d4b312c9644c$var$slerpScaledR, result);\n return $cd53d4b312c9644c$var$Quaternion.multiplyByScalar(result, 1.0 / Math.sin(theta), result);\n};\n/**\n * The logarithmic quaternion function.\n *\n * @param {Quaternion} quaternion The unit quaternion.\n * @param {Cartesian3} result The object onto which to store the result.\n * @returns {Cartesian3} The modified result parameter.\n */ $cd53d4b312c9644c$var$Quaternion.log = function(quaternion, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"quaternion\", quaternion);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n const theta = (0, $AXvpI.default).acosClamped(quaternion.w);\n let thetaOverSinTheta = 0.0;\n if (theta !== 0.0) thetaOverSinTheta = theta / Math.sin(theta);\n return (0, $bXwZF.default).multiplyByScalar(quaternion, thetaOverSinTheta, result);\n};\n/**\n * The exponential quaternion function.\n *\n * @param {Cartesian3} cartesian The cartesian.\n * @param {Quaternion} result The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter.\n */ $cd53d4b312c9644c$var$Quaternion.exp = function(cartesian, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"cartesian\", cartesian);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n const theta = (0, $bXwZF.default).magnitude(cartesian);\n let sinThetaOverTheta = 0.0;\n if (theta !== 0.0) sinThetaOverTheta = Math.sin(theta) / theta;\n result.x = cartesian.x * sinThetaOverTheta;\n result.y = cartesian.y * sinThetaOverTheta;\n result.z = cartesian.z * sinThetaOverTheta;\n result.w = Math.cos(theta);\n return result;\n};\nconst $cd53d4b312c9644c$var$squadScratchCartesian0 = new (0, $bXwZF.default)();\nconst $cd53d4b312c9644c$var$squadScratchCartesian1 = new (0, $bXwZF.default)();\nconst $cd53d4b312c9644c$var$squadScratchQuaternion0 = new $cd53d4b312c9644c$var$Quaternion();\nconst $cd53d4b312c9644c$var$squadScratchQuaternion1 = new $cd53d4b312c9644c$var$Quaternion();\n/**\n * Computes an inner quadrangle point.\n *

This will compute quaternions that ensure a squad curve is C1.

\n *\n * @param {Quaternion} q0 The first quaternion.\n * @param {Quaternion} q1 The second quaternion.\n * @param {Quaternion} q2 The third quaternion.\n * @param {Quaternion} result The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter.\n *\n * @see Quaternion#squad\n */ $cd53d4b312c9644c$var$Quaternion.computeInnerQuadrangle = function(q0, q1, q2, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"q0\", q0);\n (0, $3pzcG.default).typeOf.object(\"q1\", q1);\n (0, $3pzcG.default).typeOf.object(\"q2\", q2);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n const qInv = $cd53d4b312c9644c$var$Quaternion.conjugate(q1, $cd53d4b312c9644c$var$squadScratchQuaternion0);\n $cd53d4b312c9644c$var$Quaternion.multiply(qInv, q2, $cd53d4b312c9644c$var$squadScratchQuaternion1);\n const cart0 = $cd53d4b312c9644c$var$Quaternion.log($cd53d4b312c9644c$var$squadScratchQuaternion1, $cd53d4b312c9644c$var$squadScratchCartesian0);\n $cd53d4b312c9644c$var$Quaternion.multiply(qInv, q0, $cd53d4b312c9644c$var$squadScratchQuaternion1);\n const cart1 = $cd53d4b312c9644c$var$Quaternion.log($cd53d4b312c9644c$var$squadScratchQuaternion1, $cd53d4b312c9644c$var$squadScratchCartesian1);\n (0, $bXwZF.default).add(cart0, cart1, cart0);\n (0, $bXwZF.default).multiplyByScalar(cart0, 0.25, cart0);\n (0, $bXwZF.default).negate(cart0, cart0);\n $cd53d4b312c9644c$var$Quaternion.exp(cart0, $cd53d4b312c9644c$var$squadScratchQuaternion0);\n return $cd53d4b312c9644c$var$Quaternion.multiply(q1, $cd53d4b312c9644c$var$squadScratchQuaternion0, result);\n};\n/**\n * Computes the spherical quadrangle interpolation between quaternions.\n *\n * @param {Quaternion} q0 The first quaternion.\n * @param {Quaternion} q1 The second quaternion.\n * @param {Quaternion} s0 The first inner quadrangle.\n * @param {Quaternion} s1 The second inner quadrangle.\n * @param {number} t The time in [0,1] used to interpolate.\n * @param {Quaternion} result The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter.\n *\n *\n * @example\n * // 1. compute the squad interpolation between two quaternions on a curve\n * const s0 = Cesium.Quaternion.computeInnerQuadrangle(quaternions[i - 1], quaternions[i], quaternions[i + 1], new Cesium.Quaternion());\n * const s1 = Cesium.Quaternion.computeInnerQuadrangle(quaternions[i], quaternions[i + 1], quaternions[i + 2], new Cesium.Quaternion());\n * const q = Cesium.Quaternion.squad(quaternions[i], quaternions[i + 1], s0, s1, t, new Cesium.Quaternion());\n *\n * // 2. compute the squad interpolation as above but where the first quaternion is a end point.\n * const s1 = Cesium.Quaternion.computeInnerQuadrangle(quaternions[0], quaternions[1], quaternions[2], new Cesium.Quaternion());\n * const q = Cesium.Quaternion.squad(quaternions[0], quaternions[1], quaternions[0], s1, t, new Cesium.Quaternion());\n *\n * @see Quaternion#computeInnerQuadrangle\n */ $cd53d4b312c9644c$var$Quaternion.squad = function(q0, q1, s0, s1, t, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"q0\", q0);\n (0, $3pzcG.default).typeOf.object(\"q1\", q1);\n (0, $3pzcG.default).typeOf.object(\"s0\", s0);\n (0, $3pzcG.default).typeOf.object(\"s1\", s1);\n (0, $3pzcG.default).typeOf.number(\"t\", t);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n const slerp0 = $cd53d4b312c9644c$var$Quaternion.slerp(q0, q1, t, $cd53d4b312c9644c$var$squadScratchQuaternion0);\n const slerp1 = $cd53d4b312c9644c$var$Quaternion.slerp(s0, s1, t, $cd53d4b312c9644c$var$squadScratchQuaternion1);\n return $cd53d4b312c9644c$var$Quaternion.slerp(slerp0, slerp1, 2.0 * t * (1.0 - t), result);\n};\nconst $cd53d4b312c9644c$var$fastSlerpScratchQuaternion = new $cd53d4b312c9644c$var$Quaternion();\n// eslint-disable-next-line no-loss-of-precision\nconst $cd53d4b312c9644c$var$opmu = 1.90110745351730037;\nconst $cd53d4b312c9644c$var$u = (0, $da149e13e9eaa5f6$export$2e2bcd8739ae039).supportsTypedArrays() ? new Float32Array(8) : [];\nconst $cd53d4b312c9644c$var$v = (0, $da149e13e9eaa5f6$export$2e2bcd8739ae039).supportsTypedArrays() ? new Float32Array(8) : [];\nconst $cd53d4b312c9644c$var$bT = (0, $da149e13e9eaa5f6$export$2e2bcd8739ae039).supportsTypedArrays() ? new Float32Array(8) : [];\nconst $cd53d4b312c9644c$var$bD = (0, $da149e13e9eaa5f6$export$2e2bcd8739ae039).supportsTypedArrays() ? new Float32Array(8) : [];\nfor(let i = 0; i < 7; ++i){\n const s = i + 1.0;\n const t = 2.0 * s + 1.0;\n $cd53d4b312c9644c$var$u[i] = 1.0 / (s * t);\n $cd53d4b312c9644c$var$v[i] = s / t;\n}\n$cd53d4b312c9644c$var$u[7] = $cd53d4b312c9644c$var$opmu / 136;\n$cd53d4b312c9644c$var$v[7] = $cd53d4b312c9644c$var$opmu * 8.0 / 17.0;\n/**\n * Computes the spherical linear interpolation or extrapolation at t using the provided quaternions.\n * This implementation is faster than {@link Quaternion#slerp}, but is only accurate up to 10-6.\n *\n * @param {Quaternion} start The value corresponding to t at 0.0.\n * @param {Quaternion} end The value corresponding to t at 1.0.\n * @param {number} t The point along t at which to interpolate.\n * @param {Quaternion} result The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter.\n *\n * @see Quaternion#slerp\n */ $cd53d4b312c9644c$var$Quaternion.fastSlerp = function(start, end, t, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"start\", start);\n (0, $3pzcG.default).typeOf.object(\"end\", end);\n (0, $3pzcG.default).typeOf.number(\"t\", t);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n let x = $cd53d4b312c9644c$var$Quaternion.dot(start, end);\n let sign;\n if (x >= 0) sign = 1.0;\n else {\n sign = -1;\n x = -x;\n }\n const xm1 = x - 1.0;\n const d = 1.0 - t;\n const sqrT = t * t;\n const sqrD = d * d;\n for(let i = 7; i >= 0; --i){\n $cd53d4b312c9644c$var$bT[i] = ($cd53d4b312c9644c$var$u[i] * sqrT - $cd53d4b312c9644c$var$v[i]) * xm1;\n $cd53d4b312c9644c$var$bD[i] = ($cd53d4b312c9644c$var$u[i] * sqrD - $cd53d4b312c9644c$var$v[i]) * xm1;\n }\n const cT = sign * t * (1.0 + $cd53d4b312c9644c$var$bT[0] * (1.0 + $cd53d4b312c9644c$var$bT[1] * (1.0 + $cd53d4b312c9644c$var$bT[2] * (1.0 + $cd53d4b312c9644c$var$bT[3] * (1.0 + $cd53d4b312c9644c$var$bT[4] * (1.0 + $cd53d4b312c9644c$var$bT[5] * (1.0 + $cd53d4b312c9644c$var$bT[6] * (1.0 + $cd53d4b312c9644c$var$bT[7]))))))));\n const cD = d * (1.0 + $cd53d4b312c9644c$var$bD[0] * (1.0 + $cd53d4b312c9644c$var$bD[1] * (1.0 + $cd53d4b312c9644c$var$bD[2] * (1.0 + $cd53d4b312c9644c$var$bD[3] * (1.0 + $cd53d4b312c9644c$var$bD[4] * (1.0 + $cd53d4b312c9644c$var$bD[5] * (1.0 + $cd53d4b312c9644c$var$bD[6] * (1.0 + $cd53d4b312c9644c$var$bD[7]))))))));\n const temp = $cd53d4b312c9644c$var$Quaternion.multiplyByScalar(start, cD, $cd53d4b312c9644c$var$fastSlerpScratchQuaternion);\n $cd53d4b312c9644c$var$Quaternion.multiplyByScalar(end, cT, result);\n return $cd53d4b312c9644c$var$Quaternion.add(temp, result, result);\n};\n/**\n * Computes the spherical quadrangle interpolation between quaternions.\n * An implementation that is faster than {@link Quaternion#squad}, but less accurate.\n *\n * @param {Quaternion} q0 The first quaternion.\n * @param {Quaternion} q1 The second quaternion.\n * @param {Quaternion} s0 The first inner quadrangle.\n * @param {Quaternion} s1 The second inner quadrangle.\n * @param {number} t The time in [0,1] used to interpolate.\n * @param {Quaternion} result The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter or a new instance if none was provided.\n *\n * @see Quaternion#squad\n */ $cd53d4b312c9644c$var$Quaternion.fastSquad = function(q0, q1, s0, s1, t, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"q0\", q0);\n (0, $3pzcG.default).typeOf.object(\"q1\", q1);\n (0, $3pzcG.default).typeOf.object(\"s0\", s0);\n (0, $3pzcG.default).typeOf.object(\"s1\", s1);\n (0, $3pzcG.default).typeOf.number(\"t\", t);\n (0, $3pzcG.default).typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n const slerp0 = $cd53d4b312c9644c$var$Quaternion.fastSlerp(q0, q1, t, $cd53d4b312c9644c$var$squadScratchQuaternion0);\n const slerp1 = $cd53d4b312c9644c$var$Quaternion.fastSlerp(s0, s1, t, $cd53d4b312c9644c$var$squadScratchQuaternion1);\n return $cd53d4b312c9644c$var$Quaternion.fastSlerp(slerp0, slerp1, 2.0 * t * (1.0 - t), result);\n};\n/**\n * Compares the provided quaternions componentwise and returns\n * true if they are equal, false otherwise.\n *\n * @param {Quaternion} [left] The first quaternion.\n * @param {Quaternion} [right] The second quaternion.\n * @returns {boolean} true if left and right are equal, false otherwise.\n */ $cd53d4b312c9644c$var$Quaternion.equals = function(left, right) {\n return left === right || (0, $jQJji.default)(left) && (0, $jQJji.default)(right) && left.x === right.x && left.y === right.y && left.z === right.z && left.w === right.w;\n};\n/**\n * Compares the provided quaternions componentwise and returns\n * true if they are within the provided epsilon,\n * false otherwise.\n *\n * @param {Quaternion} [left] The first quaternion.\n * @param {Quaternion} [right] The second quaternion.\n * @param {number} [epsilon=0] The epsilon to use for equality testing.\n * @returns {boolean} true if left and right are within the provided epsilon, false otherwise.\n */ $cd53d4b312c9644c$var$Quaternion.equalsEpsilon = function(left, right, epsilon) {\n epsilon = (0, $8w8ZH.default)(epsilon, 0);\n return left === right || (0, $jQJji.default)(left) && (0, $jQJji.default)(right) && Math.abs(left.x - right.x) <= epsilon && Math.abs(left.y - right.y) <= epsilon && Math.abs(left.z - right.z) <= epsilon && Math.abs(left.w - right.w) <= epsilon;\n};\n/**\n * An immutable Quaternion instance initialized to (0.0, 0.0, 0.0, 0.0).\n *\n * @type {Quaternion}\n * @constant\n */ $cd53d4b312c9644c$var$Quaternion.ZERO = Object.freeze(new $cd53d4b312c9644c$var$Quaternion(0.0, 0.0, 0.0, 0.0));\n/**\n * An immutable Quaternion instance initialized to (0.0, 0.0, 0.0, 1.0).\n *\n * @type {Quaternion}\n * @constant\n */ $cd53d4b312c9644c$var$Quaternion.IDENTITY = Object.freeze(new $cd53d4b312c9644c$var$Quaternion(0.0, 0.0, 0.0, 1.0));\n/**\n * Duplicates this Quaternion instance.\n *\n * @param {Quaternion} [result] The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter or a new Quaternion instance if one was not provided.\n */ $cd53d4b312c9644c$var$Quaternion.prototype.clone = function(result) {\n return $cd53d4b312c9644c$var$Quaternion.clone(this, result);\n};\n/**\n * Compares this and the provided quaternion componentwise and returns\n * true if they are equal, false otherwise.\n *\n * @param {Quaternion} [right] The right hand side quaternion.\n * @returns {boolean} true if left and right are equal, false otherwise.\n */ $cd53d4b312c9644c$var$Quaternion.prototype.equals = function(right) {\n return $cd53d4b312c9644c$var$Quaternion.equals(this, right);\n};\n/**\n * Compares this and the provided quaternion componentwise and returns\n * true if they are within the provided epsilon,\n * false otherwise.\n *\n * @param {Quaternion} [right] The right hand side quaternion.\n * @param {number} [epsilon=0] The epsilon to use for equality testing.\n * @returns {boolean} true if left and right are within the provided epsilon, false otherwise.\n */ $cd53d4b312c9644c$var$Quaternion.prototype.equalsEpsilon = function(right, epsilon) {\n return $cd53d4b312c9644c$var$Quaternion.equalsEpsilon(this, right, epsilon);\n};\n/**\n * Returns a string representing this quaternion in the format (x, y, z, w).\n *\n * @returns {string} A string representing this Quaternion.\n */ $cd53d4b312c9644c$var$Quaternion.prototype.toString = function() {\n return `(${this.x}, ${this.y}, ${this.z}, ${this.w})`;\n};\nvar $cd53d4b312c9644c$export$2e2bcd8739ae039 = $cd53d4b312c9644c$var$Quaternion;\n\n\n\n/**\n * Contains functions for transforming positions to various reference frames.\n *\n * @namespace Transforms\n */ const $128fc127c88fc802$var$Transforms = {};\nconst $128fc127c88fc802$var$vectorProductLocalFrame = {\n up: {\n south: \"east\",\n north: \"west\",\n west: \"south\",\n east: \"north\"\n },\n down: {\n south: \"west\",\n north: \"east\",\n west: \"north\",\n east: \"south\"\n },\n south: {\n up: \"west\",\n down: \"east\",\n west: \"down\",\n east: \"up\"\n },\n north: {\n up: \"east\",\n down: \"west\",\n west: \"up\",\n east: \"down\"\n },\n west: {\n up: \"north\",\n down: \"south\",\n north: \"down\",\n south: \"up\"\n },\n east: {\n up: \"south\",\n down: \"north\",\n north: \"up\",\n south: \"down\"\n }\n};\nconst $128fc127c88fc802$var$degeneratePositionLocalFrame = {\n north: [\n -1,\n 0,\n 0\n ],\n east: [\n 0,\n 1,\n 0\n ],\n up: [\n 0,\n 0,\n 1\n ],\n south: [\n 1,\n 0,\n 0\n ],\n west: [\n 0,\n -1,\n 0\n ],\n down: [\n 0,\n 0,\n -1\n ]\n};\nconst $128fc127c88fc802$var$localFrameToFixedFrameCache = {};\nconst $128fc127c88fc802$var$scratchCalculateCartesian = {\n east: new (0, $bXwZF.default)(),\n north: new (0, $bXwZF.default)(),\n up: new (0, $bXwZF.default)(),\n west: new (0, $bXwZF.default)(),\n south: new (0, $bXwZF.default)(),\n down: new (0, $bXwZF.default)()\n};\nlet $128fc127c88fc802$var$scratchFirstCartesian = new (0, $bXwZF.default)();\nlet $128fc127c88fc802$var$scratchSecondCartesian = new (0, $bXwZF.default)();\nlet $128fc127c88fc802$var$scratchThirdCartesian = new (0, $bXwZF.default)();\n/**\n * Generates a function that computes a 4x4 transformation matrix from a reference frame\n * centered at the provided origin to the provided ellipsoid's fixed reference frame.\n * @param {string} firstAxis name of the first axis of the local reference frame. Must be\n * 'east', 'north', 'up', 'west', 'south' or 'down'.\n * @param {string} secondAxis name of the second axis of the local reference frame. Must be\n * 'east', 'north', 'up', 'west', 'south' or 'down'.\n * @return {Transforms.LocalFrameToFixedFrame} The function that will computes a\n * 4x4 transformation matrix from a reference frame, with first axis and second axis compliant with the parameters,\n */ $128fc127c88fc802$var$Transforms.localFrameToFixedFrameGenerator = function(firstAxis, secondAxis) {\n if (!$128fc127c88fc802$var$vectorProductLocalFrame.hasOwnProperty(firstAxis) || !$128fc127c88fc802$var$vectorProductLocalFrame[firstAxis].hasOwnProperty(secondAxis)) throw new (0, $1vHsR.default)(\"firstAxis and secondAxis must be east, north, up, west, south or down.\");\n const thirdAxis = $128fc127c88fc802$var$vectorProductLocalFrame[firstAxis][secondAxis];\n /**\n * Computes a 4x4 transformation matrix from a reference frame\n * centered at the provided origin to the provided ellipsoid's fixed reference frame.\n * @callback Transforms.LocalFrameToFixedFrame\n * @param {Cartesian3} origin The center point of the local reference frame.\n * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid whose fixed frame is used in the transformation.\n * @param {Matrix4} [result] The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter or a new Matrix4 instance if none was provided.\n */ let resultat;\n const hashAxis = firstAxis + secondAxis;\n if ((0, $jQJji.default)($128fc127c88fc802$var$localFrameToFixedFrameCache[hashAxis])) resultat = $128fc127c88fc802$var$localFrameToFixedFrameCache[hashAxis];\n else {\n resultat = function(origin, ellipsoid, result) {\n //>>includeStart('debug', pragmas.debug);\n if (!(0, $jQJji.default)(origin)) throw new (0, $1vHsR.default)(\"origin is required.\");\n if (isNaN(origin.x) || isNaN(origin.y) || isNaN(origin.z)) throw new (0, $1vHsR.default)(\"origin has a NaN component\");\n //>>includeEnd('debug');\n if (!(0, $jQJji.default)(result)) result = new (0, $7ec6ab76c28fee32$export$2e2bcd8739ae039)();\n if ((0, $bXwZF.default).equalsEpsilon(origin, (0, $bXwZF.default).ZERO, (0, $AXvpI.default).EPSILON14)) {\n // If x, y, and z are zero, use the degenerate local frame, which is a special case\n (0, $bXwZF.default).unpack($128fc127c88fc802$var$degeneratePositionLocalFrame[firstAxis], 0, $128fc127c88fc802$var$scratchFirstCartesian);\n (0, $bXwZF.default).unpack($128fc127c88fc802$var$degeneratePositionLocalFrame[secondAxis], 0, $128fc127c88fc802$var$scratchSecondCartesian);\n (0, $bXwZF.default).unpack($128fc127c88fc802$var$degeneratePositionLocalFrame[thirdAxis], 0, $128fc127c88fc802$var$scratchThirdCartesian);\n } else if ((0, $AXvpI.default).equalsEpsilon(origin.x, 0.0, (0, $AXvpI.default).EPSILON14) && (0, $AXvpI.default).equalsEpsilon(origin.y, 0.0, (0, $AXvpI.default).EPSILON14)) {\n // If x and y are zero, assume origin is at a pole, which is a special case.\n const sign = (0, $AXvpI.default).sign(origin.z);\n (0, $bXwZF.default).unpack($128fc127c88fc802$var$degeneratePositionLocalFrame[firstAxis], 0, $128fc127c88fc802$var$scratchFirstCartesian);\n if (firstAxis !== \"east\" && firstAxis !== \"west\") (0, $bXwZF.default).multiplyByScalar($128fc127c88fc802$var$scratchFirstCartesian, sign, $128fc127c88fc802$var$scratchFirstCartesian);\n (0, $bXwZF.default).unpack($128fc127c88fc802$var$degeneratePositionLocalFrame[secondAxis], 0, $128fc127c88fc802$var$scratchSecondCartesian);\n if (secondAxis !== \"east\" && secondAxis !== \"west\") (0, $bXwZF.default).multiplyByScalar($128fc127c88fc802$var$scratchSecondCartesian, sign, $128fc127c88fc802$var$scratchSecondCartesian);\n (0, $bXwZF.default).unpack($128fc127c88fc802$var$degeneratePositionLocalFrame[thirdAxis], 0, $128fc127c88fc802$var$scratchThirdCartesian);\n if (thirdAxis !== \"east\" && thirdAxis !== \"west\") (0, $bXwZF.default).multiplyByScalar($128fc127c88fc802$var$scratchThirdCartesian, sign, $128fc127c88fc802$var$scratchThirdCartesian);\n } else {\n ellipsoid = (0, $8w8ZH.default)(ellipsoid, (0, $5237444a2d786ec9$export$2e2bcd8739ae039).default);\n ellipsoid.geodeticSurfaceNormal(origin, $128fc127c88fc802$var$scratchCalculateCartesian.up);\n const up = $128fc127c88fc802$var$scratchCalculateCartesian.up;\n const east = $128fc127c88fc802$var$scratchCalculateCartesian.east;\n east.x = -origin.y;\n east.y = origin.x;\n east.z = 0.0;\n (0, $bXwZF.default).normalize(east, $128fc127c88fc802$var$scratchCalculateCartesian.east);\n (0, $bXwZF.default).cross(up, east, $128fc127c88fc802$var$scratchCalculateCartesian.north);\n (0, $bXwZF.default).multiplyByScalar($128fc127c88fc802$var$scratchCalculateCartesian.up, -1, $128fc127c88fc802$var$scratchCalculateCartesian.down);\n (0, $bXwZF.default).multiplyByScalar($128fc127c88fc802$var$scratchCalculateCartesian.east, -1, $128fc127c88fc802$var$scratchCalculateCartesian.west);\n (0, $bXwZF.default).multiplyByScalar($128fc127c88fc802$var$scratchCalculateCartesian.north, -1, $128fc127c88fc802$var$scratchCalculateCartesian.south);\n $128fc127c88fc802$var$scratchFirstCartesian = $128fc127c88fc802$var$scratchCalculateCartesian[firstAxis];\n $128fc127c88fc802$var$scratchSecondCartesian = $128fc127c88fc802$var$scratchCalculateCartesian[secondAxis];\n $128fc127c88fc802$var$scratchThirdCartesian = $128fc127c88fc802$var$scratchCalculateCartesian[thirdAxis];\n }\n result[0] = $128fc127c88fc802$var$scratchFirstCartesian.x;\n result[1] = $128fc127c88fc802$var$scratchFirstCartesian.y;\n result[2] = $128fc127c88fc802$var$scratchFirstCartesian.z;\n result[3] = 0.0;\n result[4] = $128fc127c88fc802$var$scratchSecondCartesian.x;\n result[5] = $128fc127c88fc802$var$scratchSecondCartesian.y;\n result[6] = $128fc127c88fc802$var$scratchSecondCartesian.z;\n result[7] = 0.0;\n result[8] = $128fc127c88fc802$var$scratchThirdCartesian.x;\n result[9] = $128fc127c88fc802$var$scratchThirdCartesian.y;\n result[10] = $128fc127c88fc802$var$scratchThirdCartesian.z;\n result[11] = 0.0;\n result[12] = origin.x;\n result[13] = origin.y;\n result[14] = origin.z;\n result[15] = 1.0;\n return result;\n };\n $128fc127c88fc802$var$localFrameToFixedFrameCache[hashAxis] = resultat;\n }\n return resultat;\n};\n/**\n * Computes a 4x4 transformation matrix from a reference frame with an east-north-up axes\n * centered at the provided origin to the provided ellipsoid's fixed reference frame.\n * The local axes are defined as:\n *
    \n *
  • The x axis points in the local east direction.
  • \n *
  • The y axis points in the local north direction.
  • \n *
  • The z axis points in the direction of the ellipsoid surface normal which passes through the position.
  • \n *
\n *\n * @function\n * @param {Cartesian3} origin The center point of the local reference frame.\n * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid whose fixed frame is used in the transformation.\n * @param {Matrix4} [result] The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter or a new Matrix4 instance if none was provided.\n *\n * @example\n * // Get the transform from local east-north-up at cartographic (0.0, 0.0) to Earth's fixed frame.\n * const center = Cesium.Cartesian3.fromDegrees(0.0, 0.0);\n * const transform = Cesium.Transforms.eastNorthUpToFixedFrame(center);\n */ $128fc127c88fc802$var$Transforms.eastNorthUpToFixedFrame = $128fc127c88fc802$var$Transforms.localFrameToFixedFrameGenerator(\"east\", \"north\");\n/**\n * Computes a 4x4 transformation matrix from a reference frame with an north-east-down axes\n * centered at the provided origin to the provided ellipsoid's fixed reference frame.\n * The local axes are defined as:\n *
    \n *
  • The x axis points in the local north direction.
  • \n *
  • The y axis points in the local east direction.
  • \n *
  • The z axis points in the opposite direction of the ellipsoid surface normal which passes through the position.
  • \n *
\n *\n * @function\n * @param {Cartesian3} origin The center point of the local reference frame.\n * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid whose fixed frame is used in the transformation.\n * @param {Matrix4} [result] The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter or a new Matrix4 instance if none was provided.\n *\n * @example\n * // Get the transform from local north-east-down at cartographic (0.0, 0.0) to Earth's fixed frame.\n * const center = Cesium.Cartesian3.fromDegrees(0.0, 0.0);\n * const transform = Cesium.Transforms.northEastDownToFixedFrame(center);\n */ $128fc127c88fc802$var$Transforms.northEastDownToFixedFrame = $128fc127c88fc802$var$Transforms.localFrameToFixedFrameGenerator(\"north\", \"east\");\n/**\n * Computes a 4x4 transformation matrix from a reference frame with an north-up-east axes\n * centered at the provided origin to the provided ellipsoid's fixed reference frame.\n * The local axes are defined as:\n *
    \n *
  • The x axis points in the local north direction.
  • \n *
  • The y axis points in the direction of the ellipsoid surface normal which passes through the position.
  • \n *
  • The z axis points in the local east direction.
  • \n *
\n *\n * @function\n * @param {Cartesian3} origin The center point of the local reference frame.\n * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid whose fixed frame is used in the transformation.\n * @param {Matrix4} [result] The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter or a new Matrix4 instance if none was provided.\n *\n * @example\n * // Get the transform from local north-up-east at cartographic (0.0, 0.0) to Earth's fixed frame.\n * const center = Cesium.Cartesian3.fromDegrees(0.0, 0.0);\n * const transform = Cesium.Transforms.northUpEastToFixedFrame(center);\n */ $128fc127c88fc802$var$Transforms.northUpEastToFixedFrame = $128fc127c88fc802$var$Transforms.localFrameToFixedFrameGenerator(\"north\", \"up\");\n/**\n * Computes a 4x4 transformation matrix from a reference frame with an north-west-up axes\n * centered at the provided origin to the provided ellipsoid's fixed reference frame.\n * The local axes are defined as:\n *
    \n *
  • The x axis points in the local north direction.
  • \n *
  • The y axis points in the local west direction.
  • \n *
  • The z axis points in the direction of the ellipsoid surface normal which passes through the position.
  • \n *
\n *\n * @function\n * @param {Cartesian3} origin The center point of the local reference frame.\n * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid whose fixed frame is used in the transformation.\n * @param {Matrix4} [result] The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter or a new Matrix4 instance if none was provided.\n *\n * @example\n * // Get the transform from local north-West-Up at cartographic (0.0, 0.0) to Earth's fixed frame.\n * const center = Cesium.Cartesian3.fromDegrees(0.0, 0.0);\n * const transform = Cesium.Transforms.northWestUpToFixedFrame(center);\n */ $128fc127c88fc802$var$Transforms.northWestUpToFixedFrame = $128fc127c88fc802$var$Transforms.localFrameToFixedFrameGenerator(\"north\", \"west\");\nconst $128fc127c88fc802$var$scratchHPRQuaternion = new (0, $cd53d4b312c9644c$export$2e2bcd8739ae039)();\nconst $128fc127c88fc802$var$scratchScale = new (0, $bXwZF.default)(1.0, 1.0, 1.0);\nconst $128fc127c88fc802$var$scratchHPRMatrix4 = new (0, $7ec6ab76c28fee32$export$2e2bcd8739ae039)();\n/**\n * Computes a 4x4 transformation matrix from a reference frame with axes computed from the heading-pitch-roll angles\n * centered at the provided origin to the provided ellipsoid's fixed reference frame. Heading is the rotation from the local east\n * direction where a positive angle is increasing eastward. Pitch is the rotation from the local east-north plane. Positive pitch angles\n * are above the plane. Negative pitch angles are below the plane. Roll is the first rotation applied about the local east axis.\n *\n * @param {Cartesian3} origin The center point of the local reference frame.\n * @param {HeadingPitchRoll} headingPitchRoll The heading, pitch, and roll.\n * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid whose fixed frame is used in the transformation.\n * @param {Transforms.LocalFrameToFixedFrame} [fixedFrameTransform=Transforms.eastNorthUpToFixedFrame] A 4x4 transformation\n * matrix from a reference frame to the provided ellipsoid's fixed reference frame\n * @param {Matrix4} [result] The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter or a new Matrix4 instance if none was provided.\n *\n * @example\n * // Get the transform from local heading-pitch-roll at cartographic (0.0, 0.0) to Earth's fixed frame.\n * const center = Cesium.Cartesian3.fromDegrees(0.0, 0.0);\n * const heading = -Cesium.Math.PI_OVER_TWO;\n * const pitch = Cesium.Math.PI_OVER_FOUR;\n * const roll = 0.0;\n * const hpr = new Cesium.HeadingPitchRoll(heading, pitch, roll);\n * const transform = Cesium.Transforms.headingPitchRollToFixedFrame(center, hpr);\n */ $128fc127c88fc802$var$Transforms.headingPitchRollToFixedFrame = function(origin, headingPitchRoll, ellipsoid, fixedFrameTransform, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"HeadingPitchRoll\", headingPitchRoll);\n //>>includeEnd('debug');\n fixedFrameTransform = (0, $8w8ZH.default)(fixedFrameTransform, $128fc127c88fc802$var$Transforms.eastNorthUpToFixedFrame);\n const hprQuaternion = (0, $cd53d4b312c9644c$export$2e2bcd8739ae039).fromHeadingPitchRoll(headingPitchRoll, $128fc127c88fc802$var$scratchHPRQuaternion);\n const hprMatrix = (0, $7ec6ab76c28fee32$export$2e2bcd8739ae039).fromTranslationQuaternionRotationScale((0, $bXwZF.default).ZERO, hprQuaternion, $128fc127c88fc802$var$scratchScale, $128fc127c88fc802$var$scratchHPRMatrix4);\n result = fixedFrameTransform(origin, ellipsoid, result);\n return (0, $7ec6ab76c28fee32$export$2e2bcd8739ae039).multiply(result, hprMatrix, result);\n};\nconst $128fc127c88fc802$var$scratchENUMatrix4 = new (0, $7ec6ab76c28fee32$export$2e2bcd8739ae039)();\nconst $128fc127c88fc802$var$scratchHPRMatrix3 = new (0, $490279d1ff27cf6c$export$2e2bcd8739ae039)();\n/**\n * Computes a quaternion from a reference frame with axes computed from the heading-pitch-roll angles\n * centered at the provided origin. Heading is the rotation from the local east\n * direction where a positive angle is increasing eastward. Pitch is the rotation from the local east-north plane. Positive pitch angles\n * are above the plane. Negative pitch angles are below the plane. Roll is the first rotation applied about the local east axis.\n *\n * @param {Cartesian3} origin The center point of the local reference frame.\n * @param {HeadingPitchRoll} headingPitchRoll The heading, pitch, and roll.\n * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid whose fixed frame is used in the transformation.\n * @param {Transforms.LocalFrameToFixedFrame} [fixedFrameTransform=Transforms.eastNorthUpToFixedFrame] A 4x4 transformation\n * matrix from a reference frame to the provided ellipsoid's fixed reference frame\n * @param {Quaternion} [result] The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter or a new Quaternion instance if none was provided.\n *\n * @example\n * // Get the quaternion from local heading-pitch-roll at cartographic (0.0, 0.0) to Earth's fixed frame.\n * const center = Cesium.Cartesian3.fromDegrees(0.0, 0.0);\n * const heading = -Cesium.Math.PI_OVER_TWO;\n * const pitch = Cesium.Math.PI_OVER_FOUR;\n * const roll = 0.0;\n * const hpr = new HeadingPitchRoll(heading, pitch, roll);\n * const quaternion = Cesium.Transforms.headingPitchRollQuaternion(center, hpr);\n */ $128fc127c88fc802$var$Transforms.headingPitchRollQuaternion = function(origin, headingPitchRoll, ellipsoid, fixedFrameTransform, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).typeOf.object(\"HeadingPitchRoll\", headingPitchRoll);\n //>>includeEnd('debug');\n const transform = $128fc127c88fc802$var$Transforms.headingPitchRollToFixedFrame(origin, headingPitchRoll, ellipsoid, fixedFrameTransform, $128fc127c88fc802$var$scratchENUMatrix4);\n const rotation = (0, $7ec6ab76c28fee32$export$2e2bcd8739ae039).getMatrix3(transform, $128fc127c88fc802$var$scratchHPRMatrix3);\n return (0, $cd53d4b312c9644c$export$2e2bcd8739ae039).fromRotationMatrix(rotation, result);\n};\nconst $128fc127c88fc802$var$noScale = new (0, $bXwZF.default)(1.0, 1.0, 1.0);\nconst $128fc127c88fc802$var$hprCenterScratch = new (0, $bXwZF.default)();\nconst $128fc127c88fc802$var$ffScratch = new (0, $7ec6ab76c28fee32$export$2e2bcd8739ae039)();\nconst $128fc127c88fc802$var$hprTransformScratch = new (0, $7ec6ab76c28fee32$export$2e2bcd8739ae039)();\nconst $128fc127c88fc802$var$hprRotationScratch = new (0, $490279d1ff27cf6c$export$2e2bcd8739ae039)();\nconst $128fc127c88fc802$var$hprQuaternionScratch = new (0, $cd53d4b312c9644c$export$2e2bcd8739ae039)();\n/**\n * Computes heading-pitch-roll angles from a transform in a particular reference frame. Heading is the rotation from the local east\n * direction where a positive angle is increasing eastward. Pitch is the rotation from the local east-north plane. Positive pitch angles\n * are above the plane. Negative pitch angles are below the plane. Roll is the first rotation applied about the local east axis.\n *\n * @param {Matrix4} transform The transform\n * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid whose fixed frame is used in the transformation.\n * @param {Transforms.LocalFrameToFixedFrame} [fixedFrameTransform=Transforms.eastNorthUpToFixedFrame] A 4x4 transformation\n * matrix from a reference frame to the provided ellipsoid's fixed reference frame\n * @param {HeadingPitchRoll} [result] The object onto which to store the result.\n * @returns {HeadingPitchRoll} The modified result parameter or a new HeadingPitchRoll instance if none was provided.\n */ $128fc127c88fc802$var$Transforms.fixedFrameToHeadingPitchRoll = function(transform, ellipsoid, fixedFrameTransform, result) {\n //>>includeStart('debug', pragmas.debug);\n (0, $3pzcG.default).defined(\"transform\", transform);\n //>>includeEnd('debug');\n ellipsoid = (0, $8w8ZH.default)(ellipsoid, (0, $5237444a2d786ec9$export$2e2bcd8739ae039).default);\n fixedFrameTransform = (0, $8w8ZH.default)(fixedFrameTransform, $128fc127c88fc802$var$Transforms.eastNorthUpToFixedFrame);\n if (!(0, $jQJji.default)(result)) result = new (0, $79e069d5452f6556$export$2e2bcd8739ae039)();\n const center = (0, $7ec6ab76c28fee32$export$2e2bcd8739ae039).getTranslation(transform, $128fc127c88fc802$var$hprCenterScratch);\n if ((0, $bXwZF.default).equals(center, (0, $bXwZF.default).ZERO)) {\n result.heading = 0;\n result.pitch = 0;\n result.roll = 0;\n return result;\n }\n let toFixedFrame = (0, $7ec6ab76c28fee32$export$2e2bcd8739ae039).inverseTransformation(fixedFrameTransform(center, ellipsoid, $128fc127c88fc802$var$ffScratch), $128fc127c88fc802$var$ffScratch);\n let transformCopy = (0, $7ec6ab76c28fee32$export$2e2bcd8739ae039).setScale(transform, $128fc127c88fc802$var$noScale, $128fc127c88fc802$var$hprTransformScratch);\n transformCopy = (0, $7ec6ab76c28fee32$export$2e2bcd8739ae039).setTranslation(transformCopy, (0, $bXwZF.default).ZERO, transformCopy);\n toFixedFrame = (0, $7ec6ab76c28fee32$export$2e2bcd8739ae039).multiply(toFixedFrame, transformCopy, toFixedFrame);\n let quaternionRotation = (0, $cd53d4b312c9644c$export$2e2bcd8739ae039).fromRotationMatrix((0, $7ec6ab76c28fee32$export$2e2bcd8739ae039).getMatrix3(toFixedFrame, $128fc127c88fc802$var$hprRotationScratch), $128fc127c88fc802$var$hprQuaternionScratch);\n quaternionRotation = (0, $cd53d4b312c9644c$export$2e2bcd8739ae039).normalize(quaternionRotation, quaternionRotation);\n return (0, $79e069d5452f6556$export$2e2bcd8739ae039).fromQuaternion(quaternionRotation, result);\n};\nconst $128fc127c88fc802$var$gmstConstant0 = 24110.54841;\nconst $128fc127c88fc802$var$gmstConstant1 = 8640184.812866;\nconst $128fc127c88fc802$var$gmstConstant2 = 0.093104;\nconst $128fc127c88fc802$var$gmstConstant3 = -0.0000062;\nconst $128fc127c88fc802$var$rateCoef = 1.1772758384668e-19;\nconst $128fc127c88fc802$var$wgs84WRPrecessing = 7.2921158553e-5;\nconst $128fc127c88fc802$var$twoPiOverSecondsInDay = (0, $AXvpI.default).TWO_PI / 86400.0;\nlet $128fc127c88fc802$var$dateInUtc = new (0, $73b9691e04761700$export$2e2bcd8739ae039)();\n/**\n * The default function to compute a rotation matrix to transform a point or vector from the International Celestial\n * Reference Frame (GCRF/ICRF) inertial frame axes to the central body, typically Earth, fixed frame axis at a given\n * time for use in lighting and transformation from inertial reference frames. This function may return undefined if\n * the data necessary to do the transformation is not yet loaded.\n *\n * @param {JulianDate} date The time at which to compute the rotation matrix.\n * @param {Matrix3} [result] The object onto which to store the result. If this parameter is\n * not specified, a new instance is created and returned.\n * @returns {Matrix3|undefined} The rotation matrix, or undefined if the data necessary to do the\n * transformation is not yet loaded.\n *\n * @example\n * // Set the default ICRF to fixed transformation to that of the Moon.\n * Cesium.Transforms.computeIcrfToCentralBodyFixedMatrix = Cesium.Transforms.computeIcrfToMoonFixedMatrix;\n *\n * @see Transforms.computeIcrfToFixedMatrix\n * @see Transforms.computeTemeToPseudoFixedMatrix\n * @see Transforms.computeIcrfToMoonFixedMatrix\n */ $128fc127c88fc802$var$Transforms.computeIcrfToCentralBodyFixedMatrix = function(date, result) {\n let transformMatrix = $128fc127c88fc802$var$Transforms.computeIcrfToFixedMatrix(date, result);\n if (!(0, $jQJji.default)(transformMatrix)) transformMatrix = $128fc127c88fc802$var$Transforms.computeTemeToPseudoFixedMatrix(date, result);\n return transformMatrix;\n};\n/**\n * Computes a rotation matrix to transform a point or vector from True Equator Mean Equinox (TEME) axes to the\n * pseudo-fixed axes at a given time. This method treats the UT1 time standard as equivalent to UTC.\n *\n * @param {JulianDate} date The time at which to compute the rotation matrix.\n * @param {Matrix3} [result] The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter or a new Matrix3 instance if none was provided.\n *\n * @example\n * //Set the view to the inertial frame.\n * scene.postUpdate.addEventListener(function(scene, time) {\n * const now = Cesium.JulianDate.now();\n * const offset = Cesium.Matrix4.multiplyByPoint(camera.transform, camera.position, new Cesium.Cartesian3());\n * const transform = Cesium.Matrix4.fromRotationTranslation(Cesium.Transforms.computeTemeToPseudoFixedMatrix(now));\n * const inverseTransform = Cesium.Matrix4.inverseTransformation(transform, new Cesium.Matrix4());\n * Cesium.Matrix4.multiplyByPoint(inverseTransform, offset, offset);\n * camera.lookAtTransform(transform, offset);\n * });\n */ $128fc127c88fc802$var$Transforms.computeTemeToPseudoFixedMatrix = function(date, result) {\n //>>includeStart('debug', pragmas.debug);\n if (!(0, $jQJji.default)(date)) throw new (0, $1vHsR.default)(\"date is required.\");\n //>>includeEnd('debug');\n // GMST is actually computed using UT1. We're using UTC as an approximation of UT1.\n // We do not want to use the function like convertTaiToUtc in JulianDate because\n // we explicitly do not want to fail when inside the leap second.\n $128fc127c88fc802$var$dateInUtc = (0, $73b9691e04761700$export$2e2bcd8739ae039).addSeconds(date, -(0, $73b9691e04761700$export$2e2bcd8739ae039).computeTaiMinusUtc(date), $128fc127c88fc802$var$dateInUtc);\n const utcDayNumber = $128fc127c88fc802$var$dateInUtc.dayNumber;\n const utcSecondsIntoDay = $128fc127c88fc802$var$dateInUtc.secondsOfDay;\n let t;\n const diffDays = utcDayNumber - 2451545;\n if (utcSecondsIntoDay >= 43200.0) t = (diffDays + 0.5) / (0, $e3d50c782acbaff1$export$2e2bcd8739ae039).DAYS_PER_JULIAN_CENTURY;\n else t = (diffDays - 0.5) / (0, $e3d50c782acbaff1$export$2e2bcd8739ae039).DAYS_PER_JULIAN_CENTURY;\n const gmst0 = $128fc127c88fc802$var$gmstConstant0 + t * ($128fc127c88fc802$var$gmstConstant1 + t * ($128fc127c88fc802$var$gmstConstant2 + t * $128fc127c88fc802$var$gmstConstant3));\n const angle = gmst0 * $128fc127c88fc802$var$twoPiOverSecondsInDay % (0, $AXvpI.default).TWO_PI;\n const ratio = $128fc127c88fc802$var$wgs84WRPrecessing + $128fc127c88fc802$var$rateCoef * (utcDayNumber - 2451545.5);\n const secondsSinceMidnight = (utcSecondsIntoDay + (0, $e3d50c782acbaff1$export$2e2bcd8739ae039).SECONDS_PER_DAY * 0.5) % (0, $e3d50c782acbaff1$export$2e2bcd8739ae039).SECONDS_PER_DAY;\n const gha = angle + ratio * secondsSinceMidnight;\n const cosGha = Math.cos(gha);\n const sinGha = Math.sin(gha);\n if (!(0, $jQJji.default)(result)) return new (0, $490279d1ff27cf6c$export$2e2bcd8739ae039)(cosGha, sinGha, 0.0, -sinGha, cosGha, 0.0, 0.0, 0.0, 1.0);\n result[0] = cosGha;\n result[1] = -sinGha;\n result[2] = 0.0;\n result[3] = sinGha;\n result[4] = cosGha;\n result[5] = 0.0;\n result[6] = 0.0;\n result[7] = 0.0;\n result[8] = 1.0;\n return result;\n};\n/**\n * The source of IAU 2006 XYS data, used for computing the transformation between the\n * Fixed and ICRF axes.\n * @type {Iau2006XysData}\n *\n * @see Transforms.computeIcrfToFixedMatrix\n * @see Transforms.computeFixedToIcrfMatrix\n *\n * @private\n */ $128fc127c88fc802$var$Transforms.iau2006XysData = new (0, $7212c54286490aec$export$2e2bcd8739ae039)();\n/**\n * The source of Earth Orientation Parameters (EOP) data, used for computing the transformation\n * between the Fixed and ICRF axes. By default, zero values are used for all EOP values,\n * yielding a reasonable but not completely accurate representation of the ICRF axes.\n * @type {EarthOrientationParameters}\n *\n * @see Transforms.computeIcrfToFixedMatrix\n * @see Transforms.computeFixedToIcrfMatrix\n *\n * @private\n */ $128fc127c88fc802$var$Transforms.earthOrientationParameters = (0, $c1eef27c4238262a$export$2e2bcd8739ae039).NONE;\nconst $128fc127c88fc802$var$ttMinusTai = 32.184;\nconst $128fc127c88fc802$var$j2000ttDays = 2451545.0;\n/**\n * Preloads the data necessary to transform between the ICRF and Fixed axes, in either\n * direction, over a given interval. This function returns a promise that, when resolved,\n * indicates that the preload has completed.\n *\n * @param {TimeInterval} timeInterval The interval to preload.\n * @returns {Promise} A promise that, when resolved, indicates that the preload has completed\n * and evaluation of the transformation between the fixed and ICRF axes will\n * no longer return undefined for a time inside the interval.\n *\n *\n * @example\n * const interval = new Cesium.TimeInterval(...);\n * await Cesium.Transforms.preloadIcrfFixed(interval));\n * // the data is now loaded\n *\n * @see Transforms.computeIcrfToFixedMatrix\n * @see Transforms.computeFixedToIcrfMatrix\n */ $128fc127c88fc802$var$Transforms.preloadIcrfFixed = function(timeInterval) {\n const startDayTT = timeInterval.start.dayNumber;\n const startSecondTT = timeInterval.start.secondsOfDay + $128fc127c88fc802$var$ttMinusTai;\n const stopDayTT = timeInterval.stop.dayNumber;\n const stopSecondTT = timeInterval.stop.secondsOfDay + $128fc127c88fc802$var$ttMinusTai;\n return $128fc127c88fc802$var$Transforms.iau2006XysData.preload(startDayTT, startSecondTT, stopDayTT, stopSecondTT);\n};\n/**\n * Computes a rotation matrix to transform a point or vector from the International Celestial\n * Reference Frame (GCRF/ICRF) inertial frame axes to the Earth-Fixed frame axes (ITRF)\n * at a given time. This function may return undefined if the data necessary to\n * do the transformation is not yet loaded.\n *\n * @param {JulianDate} date The time at which to compute the rotation matrix.\n * @param {Matrix3} [result] The object onto which to store the result. If this parameter is\n * not specified, a new instance is created and returned.\n * @returns {Matrix3|undefined} The rotation matrix, or undefined if the data necessary to do the\n * transformation is not yet loaded.\n *\n *\n * @example\n * scene.postUpdate.addEventListener(function(scene, time) {\n * // View in ICRF.\n * const icrfToFixed = Cesium.Transforms.computeIcrfToFixedMatrix(time);\n * if (Cesium.defined(icrfToFixed)) {\n * const offset = Cesium.Cartesian3.clone(camera.position);\n * const transform = Cesium.Matrix4.fromRotationTranslation(icrfToFixed);\n * camera.lookAtTransform(transform, offset);\n * }\n * });\n *\n * @see Transforms.preloadIcrfFixed\n */ $128fc127c88fc802$var$Transforms.computeIcrfToFixedMatrix = function(date, result) {\n //>>includeStart('debug', pragmas.debug);\n if (!(0, $jQJji.default)(date)) throw new (0, $1vHsR.default)(\"date is required.\");\n //>>includeEnd('debug');\n if (!(0, $jQJji.default)(result)) result = new (0, $490279d1ff27cf6c$export$2e2bcd8739ae039)();\n const fixedToIcrfMtx = $128fc127c88fc802$var$Transforms.computeFixedToIcrfMatrix(date, result);\n if (!(0, $jQJji.default)(fixedToIcrfMtx)) return undefined;\n return (0, $490279d1ff27cf6c$export$2e2bcd8739ae039).transpose(fixedToIcrfMtx, result);\n};\nconst $128fc127c88fc802$var$TdtMinusTai = 32.184;\nconst $128fc127c88fc802$var$J2000d = 2451545;\nconst $128fc127c88fc802$var$scratchHpr = new (0, $79e069d5452f6556$export$2e2bcd8739ae039)();\nconst $128fc127c88fc802$var$scratchRotationMatrix = new (0, $490279d1ff27cf6c$export$2e2bcd8739ae039)();\nconst $128fc127c88fc802$var$dateScratch = new (0, $73b9691e04761700$export$2e2bcd8739ae039)();\n/**\n * Computes a rotation matrix to transform a point or vector from the Moon-Fixed frame axes\n * to the International Celestial Reference Frame (GCRF/ICRF) inertial frame axes\n * at a given time.\n *\n * @param {JulianDate} date The time at which to compute the rotation matrix.\n * @param {Matrix3} [result] The object onto which to store the result. If this parameter is\n * not specified, a new instance is created and returned.\n * @returns {Matrix3} The rotation matrix.\n *\n * @example\n * // Transform a point from the Fixed axes to the ICRF axes.\n * const now = Cesium.JulianDate.now();\n * const pointInFixed = Cesium.Cartesian3.fromDegrees(0.0, 0.0);\n * const fixedToIcrf = Cesium.Transforms.computeMoonFixedToIcrfMatrix(now);\n * let pointInInertial = new Cesium.Cartesian3();\n * if (Cesium.defined(fixedToIcrf)) {\n * pointInInertial = Cesium.Matrix3.multiplyByVector(fixedToIcrf, pointInFixed, pointInInertial);\n * }\n */ $128fc127c88fc802$var$Transforms.computeMoonFixedToIcrfMatrix = function(date, result) {\n //>>includeStart('debug', pragmas.debug);\n if (!(0, $jQJji.default)(date)) throw new (0, $1vHsR.default)(\"date is required.\");\n //>>includeEnd('debug');\n if (!(0, $jQJji.default)(result)) result = new (0, $490279d1ff27cf6c$export$2e2bcd8739ae039)();\n // Converts TAI to TT\n const secondsTT = (0, $73b9691e04761700$export$2e2bcd8739ae039).addSeconds(date, $128fc127c88fc802$var$TdtMinusTai, $128fc127c88fc802$var$dateScratch);\n // Converts TT to TDB, interval in days since the standard epoch\n const d = (0, $73b9691e04761700$export$2e2bcd8739ae039).totalDays(secondsTT) - $128fc127c88fc802$var$J2000d;\n // Compute the approximate rotation, using https://articles.adsabs.harvard.edu//full/1980CeMec..22..205D/0000209.000.html\n const e1 = (0, $AXvpI.default).toRadians(12.112) - (0, $AXvpI.default).toRadians(0.052992) * d;\n const e2 = (0, $AXvpI.default).toRadians(24.224) - (0, $AXvpI.default).toRadians(0.105984) * d;\n const e3 = (0, $AXvpI.default).toRadians(227.645) + (0, $AXvpI.default).toRadians(13.012) * d;\n const e4 = (0, $AXvpI.default).toRadians(261.105) + (0, $AXvpI.default).toRadians(13.340716) * d;\n const e5 = (0, $AXvpI.default).toRadians(358.0) + (0, $AXvpI.default).toRadians(0.9856) * d;\n $128fc127c88fc802$var$scratchHpr.pitch = (0, $AXvpI.default).toRadians(180) - (0, $AXvpI.default).toRadians(3.878) * Math.sin(e1) - (0, $AXvpI.default).toRadians(0.12) * Math.sin(e2) + (0, $AXvpI.default).toRadians(0.07) * Math.sin(e3) - (0, $AXvpI.default).toRadians(0.017) * Math.sin(e4);\n $128fc127c88fc802$var$scratchHpr.roll = (0, $AXvpI.default).toRadians(-23.47) + (0, $AXvpI.default).toRadians(1.543) * Math.cos(e1) + (0, $AXvpI.default).toRadians(0.24) * Math.cos(e2) - (0, $AXvpI.default).toRadians(0.028) * Math.cos(e3) + (0, $AXvpI.default).toRadians(0.007) * Math.cos(e4);\n $128fc127c88fc802$var$scratchHpr.heading = (0, $AXvpI.default).toRadians(154.375) + (0, $AXvpI.default).toRadians(13.17635831) * d + (0, $AXvpI.default).toRadians(3.558) * Math.sin(e1) + (0, $AXvpI.default).toRadians(0.121) * Math.sin(e2) - (0, $AXvpI.default).toRadians(0.064) * Math.sin(e3) + (0, $AXvpI.default).toRadians(0.016) * Math.sin(e4) + (0, $AXvpI.default).toRadians(0.025) * Math.sin(e5);\n return (0, $490279d1ff27cf6c$export$2e2bcd8739ae039).fromHeadingPitchRoll($128fc127c88fc802$var$scratchHpr, $128fc127c88fc802$var$scratchRotationMatrix);\n};\n/**\n * Computes a rotation matrix to transform a point or vector from the International Celestial\n * Reference Frame (GCRF/ICRF) inertial frame axes to the Moon-Fixed frame axes\n * at a given time.\n *\n * @param {JulianDate} date The time at which to compute the rotation matrix.\n * @param {Matrix3} [result] The object onto which to store the result. If this parameter is\n * not specified, a new instance is created and returned.\n * @returns {Matrix3} The rotation matrix.\n *\n * @example\n * // Set the default ICRF to fixed transformation to that of the Moon.\n * Cesium.Transforms.computeIcrfToCentralBodyFixedMatrix = Cesium.Transforms.computeIcrfToMoonFixedMatrix;\n */ $128fc127c88fc802$var$Transforms.computeIcrfToMoonFixedMatrix = function(date, result) {\n //>>includeStart('debug', pragmas.debug);\n if (!(0, $jQJji.default)(date)) throw new (0, $1vHsR.default)(\"date is required.\");\n //>>includeEnd('debug');\n if (!(0, $jQJji.default)(result)) result = new (0, $490279d1ff27cf6c$export$2e2bcd8739ae039)();\n const fixedToIcrfMtx = $128fc127c88fc802$var$Transforms.computeMoonFixedToIcrfMatrix(date, result);\n if (!(0, $jQJji.default)(fixedToIcrfMtx)) return undefined;\n return (0, $490279d1ff27cf6c$export$2e2bcd8739ae039).transpose(fixedToIcrfMtx, result);\n};\nconst $128fc127c88fc802$var$xysScratch = new (0, $c9c1200a42974c2d$export$2e2bcd8739ae039)(0.0, 0.0, 0.0);\nconst $128fc127c88fc802$var$eopScratch = new (0, $733293b70aae4cad$export$2e2bcd8739ae039)(0.0, 0.0, 0.0, 0.0, 0.0, 0.0);\nconst $128fc127c88fc802$var$rotation1Scratch = new (0, $490279d1ff27cf6c$export$2e2bcd8739ae039)();\nconst $128fc127c88fc802$var$rotation2Scratch = new (0, $490279d1ff27cf6c$export$2e2bcd8739ae039)();\n/**\n * Computes a rotation matrix to transform a point or vector from the Earth-Fixed frame axes (ITRF)\n * to the International Celestial Reference Frame (GCRF/ICRF) inertial frame axes\n * at a given time. This function may return undefined if the data necessary to\n * do the transformation is not yet loaded.\n *\n * @param {JulianDate} date The time at which to compute the rotation matrix.\n * @param {Matrix3} [result] The object onto which to store the result. If this parameter is\n * not specified, a new instance is created and returned.\n * @returns {Matrix3|undefined} The rotation matrix, or undefined if the data necessary to do the\n * transformation is not yet loaded.\n *\n *\n * @example\n * // Transform a point from the Fixed axes to the ICRF axes.\n * const now = Cesium.JulianDate.now();\n * const pointInFixed = Cesium.Cartesian3.fromDegrees(0.0, 0.0);\n * const fixedToIcrf = Cesium.Transforms.computeFixedToIcrfMatrix(now);\n * let pointInInertial = new Cesium.Cartesian3();\n * if (Cesium.defined(fixedToIcrf)) {\n * pointInInertial = Cesium.Matrix3.multiplyByVector(fixedToIcrf, pointInFixed, pointInInertial);\n * }\n *\n * @see Transforms.preloadIcrfFixed\n */ $128fc127c88fc802$var$Transforms.computeFixedToIcrfMatrix = function(date, result) {\n //>>includeStart('debug', pragmas.debug);\n if (!(0, $jQJji.default)(date)) throw new (0, $1vHsR.default)(\"date is required.\");\n //>>includeEnd('debug');\n if (!(0, $jQJji.default)(result)) result = new (0, $490279d1ff27cf6c$export$2e2bcd8739ae039)();\n // Compute pole wander\n const eop = $128fc127c88fc802$var$Transforms.earthOrientationParameters.compute(date, $128fc127c88fc802$var$eopScratch);\n if (!(0, $jQJji.default)(eop)) return undefined;\n // There is no external conversion to Terrestrial Time (TT).\n // So use International Atomic Time (TAI) and convert using offsets.\n // Here we are assuming that dayTT and secondTT are positive\n const dayTT = date.dayNumber;\n // It's possible here that secondTT could roll over 86400\n // This does not seem to affect the precision (unit tests check for this)\n const secondTT = date.secondsOfDay + $128fc127c88fc802$var$ttMinusTai;\n const xys = $128fc127c88fc802$var$Transforms.iau2006XysData.computeXysRadians(dayTT, secondTT, $128fc127c88fc802$var$xysScratch);\n if (!(0, $jQJji.default)(xys)) return undefined;\n const x = xys.x + eop.xPoleOffset;\n const y = xys.y + eop.yPoleOffset;\n // Compute XYS rotation\n const a = 1.0 / (1.0 + Math.sqrt(1.0 - x * x - y * y));\n const rotation1 = $128fc127c88fc802$var$rotation1Scratch;\n rotation1[0] = 1.0 - a * x * x;\n rotation1[3] = -a * x * y;\n rotation1[6] = x;\n rotation1[1] = -a * x * y;\n rotation1[4] = 1 - a * y * y;\n rotation1[7] = y;\n rotation1[2] = -x;\n rotation1[5] = -y;\n rotation1[8] = 1 - a * (x * x + y * y);\n const rotation2 = (0, $490279d1ff27cf6c$export$2e2bcd8739ae039).fromRotationZ(-xys.s, $128fc127c88fc802$var$rotation2Scratch);\n const matrixQ = (0, $490279d1ff27cf6c$export$2e2bcd8739ae039).multiply(rotation1, rotation2, $128fc127c88fc802$var$rotation1Scratch);\n // Similar to TT conversions above\n // It's possible here that secondTT could roll over 86400\n // This does not seem to affect the precision (unit tests check for this)\n const dateUt1day = date.dayNumber;\n const dateUt1sec = date.secondsOfDay - (0, $73b9691e04761700$export$2e2bcd8739ae039).computeTaiMinusUtc(date) + eop.ut1MinusUtc;\n // Compute Earth rotation angle\n // The IERS standard for era is\n // era = 0.7790572732640 + 1.00273781191135448 * Tu\n // where\n // Tu = JulianDateInUt1 - 2451545.0\n // However, you get much more precision if you make the following simplification\n // era = a + (1 + b) * (JulianDayNumber + FractionOfDay - 2451545)\n // era = a + (JulianDayNumber - 2451545) + FractionOfDay + b (JulianDayNumber - 2451545 + FractionOfDay)\n // era = a + FractionOfDay + b (JulianDayNumber - 2451545 + FractionOfDay)\n // since (JulianDayNumber - 2451545) represents an integer number of revolutions which will be discarded anyway.\n const daysSinceJ2000 = dateUt1day - 2451545;\n const fractionOfDay = dateUt1sec / (0, $e3d50c782acbaff1$export$2e2bcd8739ae039).SECONDS_PER_DAY;\n let era = 0.779057273264 + fractionOfDay + 0.00273781191135448 * (daysSinceJ2000 + fractionOfDay);\n era = era % 1.0 * (0, $AXvpI.default).TWO_PI;\n const earthRotation = (0, $490279d1ff27cf6c$export$2e2bcd8739ae039).fromRotationZ(era, $128fc127c88fc802$var$rotation2Scratch);\n // pseudoFixed to ICRF\n const pfToIcrf = (0, $490279d1ff27cf6c$export$2e2bcd8739ae039).multiply(matrixQ, earthRotation, $128fc127c88fc802$var$rotation1Scratch);\n // Compute pole wander matrix\n const cosxp = Math.cos(eop.xPoleWander);\n const cosyp = Math.cos(eop.yPoleWander);\n const sinxp = Math.sin(eop.xPoleWander);\n const sinyp = Math.sin(eop.yPoleWander);\n let ttt = dayTT - $128fc127c88fc802$var$j2000ttDays + secondTT / (0, $e3d50c782acbaff1$export$2e2bcd8739ae039).SECONDS_PER_DAY;\n ttt /= 36525.0;\n // approximate sp value in rad\n const sp = -0.000047 * ttt * (0, $AXvpI.default).RADIANS_PER_DEGREE / 3600.0;\n const cossp = Math.cos(sp);\n const sinsp = Math.sin(sp);\n const fToPfMtx = $128fc127c88fc802$var$rotation2Scratch;\n fToPfMtx[0] = cosxp * cossp;\n fToPfMtx[1] = cosxp * sinsp;\n fToPfMtx[2] = sinxp;\n fToPfMtx[3] = -cosyp * sinsp + sinyp * sinxp * cossp;\n fToPfMtx[4] = cosyp * cossp + sinyp * sinxp * sinsp;\n fToPfMtx[5] = -sinyp * cosxp;\n fToPfMtx[6] = -sinyp * sinsp - cosyp * sinxp * cossp;\n fToPfMtx[7] = sinyp * cossp - cosyp * sinxp * sinsp;\n fToPfMtx[8] = cosyp * cosxp;\n return (0, $490279d1ff27cf6c$export$2e2bcd8739ae039).multiply(pfToIcrf, fToPfMtx, result);\n};\nconst $128fc127c88fc802$var$pointToWindowCoordinatesTemp = new (0, $dba8420c01d8a224$export$2e2bcd8739ae039)();\n/**\n * Transform a point from model coordinates to window coordinates.\n *\n * @param {Matrix4} modelViewProjectionMatrix The 4x4 model-view-projection matrix.\n * @param {Matrix4} viewportTransformation The 4x4 viewport transformation.\n * @param {Cartesian3} point The point to transform.\n * @param {Cartesian2} [result] The object onto which to store the result.\n * @returns {Cartesian2} The modified result parameter or a new Cartesian2 instance if none was provided.\n */ $128fc127c88fc802$var$Transforms.pointToWindowCoordinates = function(modelViewProjectionMatrix, viewportTransformation, point, result) {\n result = $128fc127c88fc802$var$Transforms.pointToGLWindowCoordinates(modelViewProjectionMatrix, viewportTransformation, point, result);\n result.y = 2.0 * viewportTransformation[5] - result.y;\n return result;\n};\n/**\n * @private\n */ $128fc127c88fc802$var$Transforms.pointToGLWindowCoordinates = function(modelViewProjectionMatrix, viewportTransformation, point, result) {\n //>>includeStart('debug', pragmas.debug);\n if (!(0, $jQJji.default)(modelViewProjectionMatrix)) throw new (0, $1vHsR.default)(\"modelViewProjectionMatrix is required.\");\n if (!(0, $jQJji.default)(viewportTransformation)) throw new (0, $1vHsR.default)(\"viewportTransformation is required.\");\n if (!(0, $jQJji.default)(point)) throw new (0, $1vHsR.default)(\"point is required.\");\n //>>includeEnd('debug');\n if (!(0, $jQJji.default)(result)) result = new (0, $kWQjc.default)();\n const tmp = $128fc127c88fc802$var$pointToWindowCoordinatesTemp;\n (0, $7ec6ab76c28fee32$export$2e2bcd8739ae039).multiplyByVector(modelViewProjectionMatrix, (0, $dba8420c01d8a224$export$2e2bcd8739ae039).fromElements(point.x, point.y, point.z, 1, tmp), tmp);\n (0, $dba8420c01d8a224$export$2e2bcd8739ae039).multiplyByScalar(tmp, 1.0 / tmp.w, tmp);\n (0, $7ec6ab76c28fee32$export$2e2bcd8739ae039).multiplyByVector(viewportTransformation, tmp, tmp);\n return (0, $kWQjc.default).fromCartesian4(tmp, result);\n};\nconst $128fc127c88fc802$var$normalScratch = new (0, $bXwZF.default)();\nconst $128fc127c88fc802$var$rightScratch = new (0, $bXwZF.default)();\nconst $128fc127c88fc802$var$upScratch = new (0, $bXwZF.default)();\n/**\n * Transform a position and velocity to a rotation matrix.\n *\n * @param {Cartesian3} position The position to transform.\n * @param {Cartesian3} velocity The velocity vector to transform.\n * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid whose fixed frame is used in the transformation.\n * @param {Matrix3} [result] The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter or a new Matrix3 instance if none was provided.\n */ $128fc127c88fc802$var$Transforms.rotationMatrixFromPositionVelocity = function(position, velocity, ellipsoid, result) {\n //>>includeStart('debug', pragmas.debug);\n if (!(0, $jQJji.default)(position)) throw new (0, $1vHsR.default)(\"position is required.\");\n if (!(0, $jQJji.default)(velocity)) throw new (0, $1vHsR.default)(\"velocity is required.\");\n //>>includeEnd('debug');\n const normal = (0, $8w8ZH.default)(ellipsoid, (0, $5237444a2d786ec9$export$2e2bcd8739ae039).default).geodeticSurfaceNormal(position, $128fc127c88fc802$var$normalScratch);\n let right = (0, $bXwZF.default).cross(velocity, normal, $128fc127c88fc802$var$rightScratch);\n if ((0, $bXwZF.default).equalsEpsilon(right, (0, $bXwZF.default).ZERO, (0, $AXvpI.default).EPSILON6)) right = (0, $bXwZF.default).clone((0, $bXwZF.default).UNIT_X, right);\n const up = (0, $bXwZF.default).cross(right, velocity, $128fc127c88fc802$var$upScratch);\n (0, $bXwZF.default).normalize(up, up);\n (0, $bXwZF.default).cross(velocity, up, right);\n (0, $bXwZF.default).negate(right, right);\n (0, $bXwZF.default).normalize(right, right);\n if (!(0, $jQJji.default)(result)) result = new (0, $490279d1ff27cf6c$export$2e2bcd8739ae039)();\n result[0] = velocity.x;\n result[1] = velocity.y;\n result[2] = velocity.z;\n result[3] = right.x;\n result[4] = right.y;\n result[5] = right.z;\n result[6] = up.x;\n result[7] = up.y;\n result[8] = up.z;\n return result;\n};\nconst $128fc127c88fc802$var$swizzleMatrix = new (0, $7ec6ab76c28fee32$export$2e2bcd8739ae039)(0.0, 0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0);\nconst $128fc127c88fc802$var$scratchCartographic = new (0, $69f9194a3ef67d4b$export$2e2bcd8739ae039)();\nconst $128fc127c88fc802$var$scratchCartesian3Projection = new (0, $bXwZF.default)();\nconst $128fc127c88fc802$var$scratchCenter = new (0, $bXwZF.default)();\nconst $128fc127c88fc802$var$scratchRotation = new (0, $490279d1ff27cf6c$export$2e2bcd8739ae039)();\nconst $128fc127c88fc802$var$scratchFromENU = new (0, $7ec6ab76c28fee32$export$2e2bcd8739ae039)();\nconst $128fc127c88fc802$var$scratchToENU = new (0, $7ec6ab76c28fee32$export$2e2bcd8739ae039)();\n/**\n * @private\n */ $128fc127c88fc802$var$Transforms.basisTo2D = function(projection, matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n if (!(0, $jQJji.default)(projection)) throw new (0, $1vHsR.default)(\"projection is required.\");\n if (!(0, $jQJji.default)(matrix)) throw new (0, $1vHsR.default)(\"matrix is required.\");\n if (!(0, $jQJji.default)(result)) throw new (0, $1vHsR.default)(\"result is required.\");\n //>>includeEnd('debug');\n const rtcCenter = (0, $7ec6ab76c28fee32$export$2e2bcd8739ae039).getTranslation(matrix, $128fc127c88fc802$var$scratchCenter);\n const ellipsoid = projection.ellipsoid;\n let projectedPosition;\n if ((0, $bXwZF.default).equals(rtcCenter, (0, $bXwZF.default).ZERO)) projectedPosition = (0, $bXwZF.default).clone((0, $bXwZF.default).ZERO, $128fc127c88fc802$var$scratchCartesian3Projection);\n else {\n // Get the 2D Center\n const cartographic = ellipsoid.cartesianToCartographic(rtcCenter, $128fc127c88fc802$var$scratchCartographic);\n projectedPosition = projection.project(cartographic, $128fc127c88fc802$var$scratchCartesian3Projection);\n (0, $bXwZF.default).fromElements(projectedPosition.z, projectedPosition.x, projectedPosition.y, projectedPosition);\n }\n // Assuming the instance are positioned on the ellipsoid, invert the ellipsoidal transform to get the local transform and then convert to 2D\n const fromENU = $128fc127c88fc802$var$Transforms.eastNorthUpToFixedFrame(rtcCenter, ellipsoid, $128fc127c88fc802$var$scratchFromENU);\n const toENU = (0, $7ec6ab76c28fee32$export$2e2bcd8739ae039).inverseTransformation(fromENU, $128fc127c88fc802$var$scratchToENU);\n const rotation = (0, $7ec6ab76c28fee32$export$2e2bcd8739ae039).getMatrix3(matrix, $128fc127c88fc802$var$scratchRotation);\n const local = (0, $7ec6ab76c28fee32$export$2e2bcd8739ae039).multiplyByMatrix3(toENU, rotation, result);\n (0, $7ec6ab76c28fee32$export$2e2bcd8739ae039).multiply($128fc127c88fc802$var$swizzleMatrix, local, result); // Swap x, y, z for 2D\n (0, $7ec6ab76c28fee32$export$2e2bcd8739ae039).setTranslation(result, projectedPosition, result); // Use the projected center\n return result;\n};\n/**\n * @private\n */ $128fc127c88fc802$var$Transforms.ellipsoidTo2DModelMatrix = function(projection, center, result) {\n //>>includeStart('debug', pragmas.debug);\n if (!(0, $jQJji.default)(projection)) throw new (0, $1vHsR.default)(\"projection is required.\");\n if (!(0, $jQJji.default)(center)) throw new (0, $1vHsR.default)(\"center is required.\");\n if (!(0, $jQJji.default)(result)) throw new (0, $1vHsR.default)(\"result is required.\");\n //>>includeEnd('debug');\n const ellipsoid = projection.ellipsoid;\n const fromENU = $128fc127c88fc802$var$Transforms.eastNorthUpToFixedFrame(center, ellipsoid, $128fc127c88fc802$var$scratchFromENU);\n const toENU = (0, $7ec6ab76c28fee32$export$2e2bcd8739ae039).inverseTransformation(fromENU, $128fc127c88fc802$var$scratchToENU);\n const cartographic = ellipsoid.cartesianToCartographic(center, $128fc127c88fc802$var$scratchCartographic);\n const projectedPosition = projection.project(cartographic, $128fc127c88fc802$var$scratchCartesian3Projection);\n (0, $bXwZF.default).fromElements(projectedPosition.z, projectedPosition.x, projectedPosition.y, projectedPosition);\n const translation = (0, $7ec6ab76c28fee32$export$2e2bcd8739ae039).fromTranslation(projectedPosition, $128fc127c88fc802$var$scratchFromENU);\n (0, $7ec6ab76c28fee32$export$2e2bcd8739ae039).multiply($128fc127c88fc802$var$swizzleMatrix, toENU, result);\n (0, $7ec6ab76c28fee32$export$2e2bcd8739ae039).multiply(translation, result, result);\n return result;\n};\nvar $128fc127c88fc802$export$2e2bcd8739ae039 = $128fc127c88fc802$var$Transforms;\n\n\nconst $0ad68ca5cf1aea2c$var$vectorScratch = new (0, $kWQjc.default)();\nconst $0ad68ca5cf1aea2c$var$windowPositionScratch = new (0, $kWQjc.default)();\nconst $0ad68ca5cf1aea2c$var$clickLocationScratch = new (0, $kWQjc.default)();\nconst $0ad68ca5cf1aea2c$var$centerScratch = new (0, $bXwZF.default)();\nconst $0ad68ca5cf1aea2c$var$oldTransformScratch = new (0, $7ec6ab76c28fee32$export$2e2bcd8739ae039)();\nconst $0ad68ca5cf1aea2c$var$newTransformScratch = new (0, $7ec6ab76c28fee32$export$2e2bcd8739ae039)();\nconst $0ad68ca5cf1aea2c$var$pickRayScratch = new (0, $9btZb.default)();\nconst $0ad68ca5cf1aea2c$var$nominalTotalRadius = 145;\nconst $0ad68ca5cf1aea2c$var$nominalGyroRadius = 50;\nconst $0ad68ca5cf1aea2c$var$outerRingSvg = (0, $800sp.svg)``;\nconst $0ad68ca5cf1aea2c$var$innerRingSvg = (0, $800sp.svg)``;\nconst $0ad68ca5cf1aea2c$var$rotationMarkerSvg = (0, $800sp.svg)``;\nclass $0ad68ca5cf1aea2c$var$CesiumCompass extends (0, $800sp.LitElement) {\n static get properties() {\n return {\n scene: {\n type: Object\n },\n clock: {\n type: Object\n },\n ready: {\n type: Boolean\n },\n heading: {\n type: Number\n },\n orbitCursorAngle: {\n type: Number\n },\n orbitCursorOpacity: {\n type: Number\n },\n resetSpeed: {\n type: Number\n }\n };\n }\n static get styles() {\n return (0, $800sp.css)`\n :host {\n --cesium-compass-stroke-color: rgba(0, 0, 0, 0.6);\n --cesium-compass-fill-color: rgb(224, 225, 226);\n }\n :host * {\n box-sizing: content-box;\n }\n .compass {\n position: absolute;\n right: 0;\n top: 0;\n width: 95px;\n height: 95px;\n cursor: pointer;\n }\n .outer-ring-background {\n position: absolute;\n top: 14px;\n left: 14px;\n width: 44px;\n height: 44px;\n border-radius: 100%;\n border: 12px solid var(--cesium-compass-fill-color);\n }\n .inner-ring-background {\n position: absolute;\n top: 30px;\n left: 30px;\n width: 33px;\n height: 33px;\n border-radius: 100%;\n background-color: var(--cesium-compass-fill-color);\n border: 1px solid var(--cesium-compass-stroke-color);\n }\n .rotation-marker, .outer-ring {\n will-change: opacity, transform;\n }\n .rotation-marker, .outer-ring, .inner-ring {\n position: absolute;\n top: 0;\n width: 95px;\n height: 95px;\n fill: var(--cesium-compass-stroke-color);\n }\n .rotation-marker svg, .outer-ring svg, .inner-ring svg {\n width: 100%;\n height: 100%;\n }\n `;\n }\n constructor(){\n super();\n /**\n * @type {import('cesium').Scene}\n */ this.scene;\n /**\n * @type {import('cesium').Clock}\n */ this.clock = undefined;\n /**\n * @type {boolean}\n */ this.ready = false;\n /**\n * @type {number}\n */ this.resetSpeed = Math.PI / 100;\n /**\n * @type {boolean}\n */ this.rotateClick = undefined;\n /**\n * @type {import('cesium').Event.RemoveCallback}\n */ this.unlistenFromPostRender = null;\n /**\n * @type {import('cesium').Event.RemoveCallback}\n */ this.unlistenFromClockTick = null;\n /**\n * @type {number}\n */ this.orbitCursorOpacity = 0;\n this.handleRotatePointerMoveFunction = this.handleRotatePointerMove.bind(this);\n this.handleRotatePointerUpFunction = this.handleRotatePointerUp.bind(this);\n this.handleOrbitPointerMoveFunction = this.handleOrbitPointerMove.bind(this);\n this.handleOrbitPointerUpFunction = this.handleOrbitPointerUp.bind(this);\n this.handleOrbitTickFunction = this.handleOrbitTick.bind(this);\n this.context = {};\n }\n updated() {\n if (this.scene && this.clock && !this.unlistenFromPostRender) {\n this.unlistenFromPostRender = this.scene.postRender.addEventListener(()=>{\n this.heading = this.scene.camera.heading;\n });\n this.ready = true;\n }\n }\n get outerRingStyle() {\n return {\n transform: `rotate(-${this.heading}rad)`\n };\n }\n get rotationMarkerStyle() {\n return {\n transform: `rotate(-${this.orbitCursorAngle}rad)`,\n opacity: `${this.orbitCursorOpacity}`\n };\n }\n disconnectedCallback() {\n if (this.unlistenFromPostRender) this.unlistenFromPostRender();\n super.disconnectedCallback();\n }\n /**\n * @param {PointerEvent} event\n */ handlePointerDown(event) {\n const camera = this.scene.camera;\n const compassElement = /** @type {HTMLDivElement} */ event.currentTarget;\n this.context.compassRectangle = compassElement.getBoundingClientRect();\n this.context.compassCenter = new (0, $kWQjc.default)((this.context.compassRectangle.right - this.context.compassRectangle.left) / 2, (this.context.compassRectangle.bottom - this.context.compassRectangle.top) / 2);\n $0ad68ca5cf1aea2c$var$clickLocationScratch.x = event.clientX - this.context.compassRectangle.left;\n $0ad68ca5cf1aea2c$var$clickLocationScratch.y = event.clientY - this.context.compassRectangle.top;\n const vector = (0, $kWQjc.default).subtract($0ad68ca5cf1aea2c$var$clickLocationScratch, this.context.compassCenter, $0ad68ca5cf1aea2c$var$vectorScratch);\n const distanceFromCenter = (0, $kWQjc.default).magnitude(vector);\n $0ad68ca5cf1aea2c$var$windowPositionScratch.x = this.scene.canvas.clientWidth / 2;\n $0ad68ca5cf1aea2c$var$windowPositionScratch.y = this.scene.canvas.clientHeight / 2;\n const ray = camera.getPickRay($0ad68ca5cf1aea2c$var$windowPositionScratch, $0ad68ca5cf1aea2c$var$pickRayScratch);\n this.context.viewCenter = this.scene.globe.pick(ray, this.scene, $0ad68ca5cf1aea2c$var$centerScratch);\n this.context.frame = (0, $128fc127c88fc802$export$2e2bcd8739ae039).eastNorthUpToFixedFrame(this.context.viewCenter ? this.context.viewCenter : camera.positionWC, (0, $5237444a2d786ec9$export$2e2bcd8739ae039).WGS84, $0ad68ca5cf1aea2c$var$newTransformScratch);\n const maxDistance = this.context.compassRectangle.width / 2;\n const distanceFraction = distanceFromCenter / maxDistance;\n if (distanceFraction < $0ad68ca5cf1aea2c$var$nominalGyroRadius / $0ad68ca5cf1aea2c$var$nominalTotalRadius) this.orbit(vector);\n else if (distanceFraction < 1) this.rotate(vector);\n event.stopPropagation();\n event.preventDefault();\n }\n /**\n * @param {Cartesian2} cursorVector\n */ rotate(cursorVector) {\n const camera = this.scene.camera;\n this.context.rotateInitialCursorAngle = Math.atan2(-cursorVector.y, cursorVector.x);\n const oldTransform = (0, $7ec6ab76c28fee32$export$2e2bcd8739ae039).clone(camera.transform, $0ad68ca5cf1aea2c$var$oldTransformScratch);\n camera.lookAtTransform(this.context.frame);\n this.context.rotateInitialCameraAngle = Math.atan2(camera.position.y, camera.position.x);\n camera.lookAtTransform(oldTransform);\n this.rotateClick = true;\n document.addEventListener(\"pointermove\", this.handleRotatePointerMoveFunction, false);\n document.addEventListener(\"pointerup\", this.handleRotatePointerUpFunction, false);\n }\n /**\n * @param {PointerEvent} event\n */ handleRotatePointerMove(event) {\n if (this.moveUpIfTooCloseToTerrain()) return;\n const camera = this.scene.camera;\n $0ad68ca5cf1aea2c$var$clickLocationScratch.x = event.clientX - this.context.compassRectangle.left;\n $0ad68ca5cf1aea2c$var$clickLocationScratch.y = event.clientY - this.context.compassRectangle.top;\n const vector = (0, $kWQjc.default).subtract($0ad68ca5cf1aea2c$var$clickLocationScratch, this.context.compassCenter, $0ad68ca5cf1aea2c$var$vectorScratch);\n const angle = Math.atan2(-vector.y, vector.x);\n const angleDifference = angle - this.context.rotateInitialCursorAngle;\n const newCameraAngle = (0, $AXvpI.default).zeroToTwoPi(this.context.rotateInitialCameraAngle - angleDifference);\n const oldTransform = (0, $7ec6ab76c28fee32$export$2e2bcd8739ae039).clone(camera.transform, $0ad68ca5cf1aea2c$var$oldTransformScratch);\n camera.lookAtTransform(this.context.frame);\n const currentCameraAngle = Math.atan2(camera.position.y, camera.position.x);\n camera.rotateRight(newCameraAngle - currentCameraAngle);\n camera.lookAtTransform(oldTransform);\n this.rotateClick = false;\n }\n /**\n * @param {PointerEvent} event\n */ handleRotatePointerUp(event) {\n document.removeEventListener(\"pointermove\", this.handleRotatePointerMoveFunction, false);\n document.removeEventListener(\"pointerup\", this.handleRotatePointerUpFunction, false);\n if (this.rotateClick) this.resetToNorth();\n }\n resetToNorth() {\n const camera = this.scene.camera;\n const oldTransform = (0, $7ec6ab76c28fee32$export$2e2bcd8739ae039).clone(camera.transform, $0ad68ca5cf1aea2c$var$oldTransformScratch);\n camera.lookAtTransform(this.context.frame);\n const newCameraAngle = (0, $AXvpI.default).negativePiToPi((0, $AXvpI.default).PI_OVER_TWO + Math.atan2(camera.position.y, camera.position.x));\n const duration = Math.abs(newCameraAngle) / this.resetSpeed;\n let prevProgress = 0;\n const start = performance.now();\n const step = ()=>{\n const elapsed = performance.now() - start;\n const progress = (0, $AXvpI.default).clamp(elapsed / duration, 0, 1);\n camera.rotateLeft((progress - prevProgress) * newCameraAngle);\n prevProgress = progress;\n if (progress < 1) window.requestAnimationFrame(step);\n else camera.lookAtTransform(oldTransform);\n };\n window.requestAnimationFrame(step);\n }\n /**\n * @param {Cartesian2} cursorVector\n */ orbit(cursorVector) {\n this.context.orbitIsLook = !this.context.viewCenter;\n this.context.orbitLastTimestamp = performance.now();\n document.addEventListener(\"pointermove\", this.handleOrbitPointerMoveFunction, false);\n document.addEventListener(\"pointerup\", this.handleOrbitPointerUpFunction, false);\n this.unlistenFromClockTick = this.clock.onTick.addEventListener(this.handleOrbitTickFunction);\n this.updateAngleAndOpacity(cursorVector, this.context.compassRectangle.width);\n }\n handleOrbitTick() {\n if (this.moveUpIfTooCloseToTerrain()) return;\n const camera = this.scene.camera;\n const timestamp = performance.now();\n const deltaT = timestamp - this.context.orbitLastTimestamp;\n const rate = (this.orbitCursorOpacity - 0.5) * 2.5 / 1000;\n const distance = deltaT * rate;\n const angle = this.orbitCursorAngle + (0, $AXvpI.default).PI_OVER_TWO;\n const x = Math.cos(angle) * distance;\n const y = Math.sin(angle) * distance;\n const oldTransform = (0, $7ec6ab76c28fee32$export$2e2bcd8739ae039).clone(camera.transform, $0ad68ca5cf1aea2c$var$oldTransformScratch);\n camera.lookAtTransform(this.context.frame);\n if (this.context.orbitIsLook) {\n camera.look((0, $bXwZF.default).UNIT_Z, -x);\n camera.look(camera.right, -y);\n } else {\n camera.rotateLeft(x);\n camera.rotateUp(y);\n }\n camera.lookAtTransform(oldTransform);\n this.context.orbitLastTimestamp = timestamp;\n }\n distanceToTerrain() {\n const camera = this.scene.camera;\n const height = this.scene.globe.getHeight(camera.positionCartographic);\n return camera.positionCartographic.height - height;\n }\n moveUpIfTooCloseToTerrain() {\n const controller = this.scene.screenSpaceCameraController;\n if (!controller.enableCollisionDetection) return false;\n const distanceDiff = this.distanceToTerrain() - controller.minimumZoomDistance;\n if ((0, $AXvpI.default).lessThan(distanceDiff, 0.0, (0, $AXvpI.default).EPSILON1)) {\n this.scene.camera.moveUp(-distanceDiff);\n return true;\n }\n return false;\n }\n /**\n * @param {Cartesian2} vector\n * @param {number} compassWidth\n */ updateAngleAndOpacity(vector, compassWidth) {\n const angle = Math.atan2(-vector.y, vector.x);\n this.orbitCursorAngle = (0, $AXvpI.default).zeroToTwoPi(angle - (0, $AXvpI.default).PI_OVER_TWO);\n const distance = (0, $kWQjc.default).magnitude(vector);\n const maxDistance = compassWidth / 2.0;\n const distanceFraction = Math.min(distance / maxDistance, 1.0);\n this.orbitCursorOpacity = 0.5 * distanceFraction * distanceFraction + 0.5;\n }\n /**\n * @param {PointerEvent} event\n */ handleOrbitPointerMove(event) {\n $0ad68ca5cf1aea2c$var$clickLocationScratch.x = event.clientX - this.context.compassRectangle.left;\n $0ad68ca5cf1aea2c$var$clickLocationScratch.y = event.clientY - this.context.compassRectangle.top;\n const cursorVector = (0, $kWQjc.default).subtract($0ad68ca5cf1aea2c$var$clickLocationScratch, this.context.compassCenter, $0ad68ca5cf1aea2c$var$vectorScratch);\n this.updateAngleAndOpacity(cursorVector, this.context.compassRectangle.width);\n }\n /**\n * @param {PointerEvent} event\n */ handleOrbitPointerUp(event) {\n document.removeEventListener(\"pointermove\", this.handleOrbitPointerMoveFunction, false);\n document.removeEventListener(\"pointerup\", this.handleOrbitPointerUpFunction, false);\n this.unlistenFromClockTick();\n this.orbitCursorOpacity = 0;\n }\n render() {\n if (this.ready) return (0, $800sp.html)`\n
\n
\n
${$0ad68ca5cf1aea2c$var$outerRingSvg}
\n
\n
${$0ad68ca5cf1aea2c$var$innerRingSvg}
\n
${$0ad68ca5cf1aea2c$var$rotationMarkerSvg}
\n
\n `;\n else return (0, $800sp.html)``;\n }\n}\ncustomElements.define(\"cesium-compass\", $0ad68ca5cf1aea2c$var$CesiumCompass);\n\n\n//# sourceMappingURL=cesium-compass.f610fb3a.js.map\n","/*! https://mths.be/punycode v1.4.0 by @mathias */\n;(function(root) {\n\n\t/** Detect free variables */\n\tvar freeExports = typeof exports == 'object' && exports &&\n\t\t!exports.nodeType && exports;\n\tvar freeModule = typeof module == 'object' && module &&\n\t\t!module.nodeType && module;\n\tvar freeGlobal = typeof global == 'object' && global;\n\tif (\n\t\tfreeGlobal.global === freeGlobal ||\n\t\tfreeGlobal.window === freeGlobal ||\n\t\tfreeGlobal.self === freeGlobal\n\t) {\n\t\troot = freeGlobal;\n\t}\n\n\t/**\n\t * The `punycode` object.\n\t * @name punycode\n\t * @type Object\n\t */\n\tvar punycode,\n\n\t/** Highest positive signed 32-bit float value */\n\tmaxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1\n\n\t/** Bootstring parameters */\n\tbase = 36,\n\ttMin = 1,\n\ttMax = 26,\n\tskew = 38,\n\tdamp = 700,\n\tinitialBias = 72,\n\tinitialN = 128, // 0x80\n\tdelimiter = '-', // '\\x2D'\n\n\t/** Regular expressions */\n\tregexPunycode = /^xn--/,\n\tregexNonASCII = /[^\\x20-\\x7E]/, // unprintable ASCII chars + non-ASCII chars\n\tregexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g, // RFC 3490 separators\n\n\t/** Error messages */\n\terrors = {\n\t\t'overflow': 'Overflow: input needs wider integers to process',\n\t\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t\t'invalid-input': 'Invalid input'\n\t},\n\n\t/** Convenience shortcuts */\n\tbaseMinusTMin = base - tMin,\n\tfloor = Math.floor,\n\tstringFromCharCode = String.fromCharCode,\n\n\t/** Temporary variable */\n\tkey;\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/**\n\t * A generic error utility function.\n\t * @private\n\t * @param {String} type The error type.\n\t * @returns {Error} Throws a `RangeError` with the applicable error message.\n\t */\n\tfunction error(type) {\n\t\tthrow new RangeError(errors[type]);\n\t}\n\n\t/**\n\t * A generic `Array#map` utility function.\n\t * @private\n\t * @param {Array} array The array to iterate over.\n\t * @param {Function} callback The function that gets called for every array\n\t * item.\n\t * @returns {Array} A new array of values returned by the callback function.\n\t */\n\tfunction map(array, fn) {\n\t\tvar length = array.length;\n\t\tvar result = [];\n\t\twhile (length--) {\n\t\t\tresult[length] = fn(array[length]);\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * A simple `Array#map`-like wrapper to work with domain name strings or email\n\t * addresses.\n\t * @private\n\t * @param {String} domain The domain name or email address.\n\t * @param {Function} callback The function that gets called for every\n\t * character.\n\t * @returns {Array} A new string of characters returned by the callback\n\t * function.\n\t */\n\tfunction mapDomain(string, fn) {\n\t\tvar parts = string.split('@');\n\t\tvar result = '';\n\t\tif (parts.length > 1) {\n\t\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t\t// the local part (i.e. everything up to `@`) intact.\n\t\t\tresult = parts[0] + '@';\n\t\t\tstring = parts[1];\n\t\t}\n\t\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\t\tstring = string.replace(regexSeparators, '\\x2E');\n\t\tvar labels = string.split('.');\n\t\tvar encoded = map(labels, fn).join('.');\n\t\treturn result + encoded;\n\t}\n\n\t/**\n\t * Creates an array containing the numeric code points of each Unicode\n\t * character in the string. While JavaScript uses UCS-2 internally,\n\t * this function will convert a pair of surrogate halves (each of which\n\t * UCS-2 exposes as separate characters) into a single code point,\n\t * matching UTF-16.\n\t * @see `punycode.ucs2.encode`\n\t * @see \n\t * @memberOf punycode.ucs2\n\t * @name decode\n\t * @param {String} string The Unicode input string (UCS-2).\n\t * @returns {Array} The new array of code points.\n\t */\n\tfunction ucs2decode(string) {\n\t\tvar output = [],\n\t\t counter = 0,\n\t\t length = string.length,\n\t\t value,\n\t\t extra;\n\t\twhile (counter < length) {\n\t\t\tvalue = string.charCodeAt(counter++);\n\t\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t\t// high surrogate, and there is a next character\n\t\t\t\textra = string.charCodeAt(counter++);\n\t\t\t\tif ((extra & 0xFC00) == 0xDC00) { // low surrogate\n\t\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t\t} else {\n\t\t\t\t\t// unmatched surrogate; only append this code unit, in case the next\n\t\t\t\t\t// code unit is the high surrogate of a surrogate pair\n\t\t\t\t\toutput.push(value);\n\t\t\t\t\tcounter--;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\toutput.push(value);\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t}\n\n\t/**\n\t * Creates a string based on an array of numeric code points.\n\t * @see `punycode.ucs2.decode`\n\t * @memberOf punycode.ucs2\n\t * @name encode\n\t * @param {Array} codePoints The array of numeric code points.\n\t * @returns {String} The new Unicode string (UCS-2).\n\t */\n\tfunction ucs2encode(array) {\n\t\treturn map(array, function(value) {\n\t\t\tvar output = '';\n\t\t\tif (value > 0xFFFF) {\n\t\t\t\tvalue -= 0x10000;\n\t\t\t\toutput += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);\n\t\t\t\tvalue = 0xDC00 | value & 0x3FF;\n\t\t\t}\n\t\t\toutput += stringFromCharCode(value);\n\t\t\treturn output;\n\t\t}).join('');\n\t}\n\n\t/**\n\t * Converts a basic code point into a digit/integer.\n\t * @see `digitToBasic()`\n\t * @private\n\t * @param {Number} codePoint The basic numeric code point value.\n\t * @returns {Number} The numeric value of a basic code point (for use in\n\t * representing integers) in the range `0` to `base - 1`, or `base` if\n\t * the code point does not represent a value.\n\t */\n\tfunction basicToDigit(codePoint) {\n\t\tif (codePoint - 48 < 10) {\n\t\t\treturn codePoint - 22;\n\t\t}\n\t\tif (codePoint - 65 < 26) {\n\t\t\treturn codePoint - 65;\n\t\t}\n\t\tif (codePoint - 97 < 26) {\n\t\t\treturn codePoint - 97;\n\t\t}\n\t\treturn base;\n\t}\n\n\t/**\n\t * Converts a digit/integer into a basic code point.\n\t * @see `basicToDigit()`\n\t * @private\n\t * @param {Number} digit The numeric value of a basic code point.\n\t * @returns {Number} The basic code point whose value (when used for\n\t * representing integers) is `digit`, which needs to be in the range\n\t * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n\t * used; else, the lowercase form is used. The behavior is undefined\n\t * if `flag` is non-zero and `digit` has no uppercase form.\n\t */\n\tfunction digitToBasic(digit, flag) {\n\t\t// 0..25 map to ASCII a..z or A..Z\n\t\t// 26..35 map to ASCII 0..9\n\t\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n\t}\n\n\t/**\n\t * Bias adaptation function as per section 3.4 of RFC 3492.\n\t * https://tools.ietf.org/html/rfc3492#section-3.4\n\t * @private\n\t */\n\tfunction adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}\n\n\t/**\n\t * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n\t * symbols.\n\t * @memberOf punycode\n\t * @param {String} input The Punycode string of ASCII-only symbols.\n\t * @returns {String} The resulting string of Unicode symbols.\n\t */\n\tfunction decode(input) {\n\t\t// Don't use UCS-2\n\t\tvar output = [],\n\t\t inputLength = input.length,\n\t\t out,\n\t\t i = 0,\n\t\t n = initialN,\n\t\t bias = initialBias,\n\t\t basic,\n\t\t j,\n\t\t index,\n\t\t oldi,\n\t\t w,\n\t\t k,\n\t\t digit,\n\t\t t,\n\t\t /** Cached calculation results */\n\t\t baseMinusT;\n\n\t\t// Handle the basic code points: let `basic` be the number of input code\n\t\t// points before the last delimiter, or `0` if there is none, then copy\n\t\t// the first basic code points to the output.\n\n\t\tbasic = input.lastIndexOf(delimiter);\n\t\tif (basic < 0) {\n\t\t\tbasic = 0;\n\t\t}\n\n\t\tfor (j = 0; j < basic; ++j) {\n\t\t\t// if it's not a basic code point\n\t\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\t\terror('not-basic');\n\t\t\t}\n\t\t\toutput.push(input.charCodeAt(j));\n\t\t}\n\n\t\t// Main decoding loop: start just after the last delimiter if any basic code\n\t\t// points were copied; start at the beginning otherwise.\n\n\t\tfor (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t\t// `index` is the index of the next character to be consumed.\n\t\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t\t// which gets added to `i`. The overflow checking is easier\n\t\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t\t// value at the end to obtain `delta`.\n\t\t\tfor (oldi = i, w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\t\tif (index >= inputLength) {\n\t\t\t\t\terror('invalid-input');\n\t\t\t\t}\n\n\t\t\t\tdigit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\t\tif (digit >= base || digit > floor((maxInt - i) / w)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\ti += digit * w;\n\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\t\tif (digit < t) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tbaseMinusT = base - t;\n\t\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tw *= baseMinusT;\n\n\t\t\t}\n\n\t\t\tout = output.length + 1;\n\t\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t\t// incrementing `n` each time, so we'll fix that now:\n\t\t\tif (floor(i / out) > maxInt - n) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tn += floor(i / out);\n\t\t\ti %= out;\n\n\t\t\t// Insert `n` at position `i` of the output\n\t\t\toutput.splice(i++, 0, n);\n\n\t\t}\n\n\t\treturn ucs2encode(output);\n\t}\n\n\t/**\n\t * Converts a string of Unicode symbols (e.g. a domain name label) to a\n\t * Punycode string of ASCII-only symbols.\n\t * @memberOf punycode\n\t * @param {String} input The string of Unicode symbols.\n\t * @returns {String} The resulting Punycode string of ASCII-only symbols.\n\t */\n\tfunction encode(input) {\n\t\tvar n,\n\t\t delta,\n\t\t handledCPCount,\n\t\t basicLength,\n\t\t bias,\n\t\t j,\n\t\t m,\n\t\t q,\n\t\t k,\n\t\t t,\n\t\t currentValue,\n\t\t output = [],\n\t\t /** `inputLength` will hold the number of code points in `input`. */\n\t\t inputLength,\n\t\t /** Cached calculation results */\n\t\t handledCPCountPlusOne,\n\t\t baseMinusT,\n\t\t qMinusT;\n\n\t\t// Convert the input in UCS-2 to Unicode\n\t\tinput = ucs2decode(input);\n\n\t\t// Cache the length\n\t\tinputLength = input.length;\n\n\t\t// Initialize the state\n\t\tn = initialN;\n\t\tdelta = 0;\n\t\tbias = initialBias;\n\n\t\t// Handle the basic code points\n\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\tcurrentValue = input[j];\n\t\t\tif (currentValue < 0x80) {\n\t\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t\t}\n\t\t}\n\n\t\thandledCPCount = basicLength = output.length;\n\n\t\t// `handledCPCount` is the number of code points that have been handled;\n\t\t// `basicLength` is the number of basic code points.\n\n\t\t// Finish the basic string - if it is not empty - with a delimiter\n\t\tif (basicLength) {\n\t\t\toutput.push(delimiter);\n\t\t}\n\n\t\t// Main encoding loop:\n\t\twhile (handledCPCount < inputLength) {\n\n\t\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t\t// larger one:\n\t\t\tfor (m = maxInt, j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\t\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\t\tm = currentValue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Increase `delta` enough to advance the decoder's state to ,\n\t\t\t// but guard against overflow\n\t\t\thandledCPCountPlusOne = handledCPCount + 1;\n\t\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\t\tn = m;\n\n\t\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\n\t\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tif (currentValue == n) {\n\t\t\t\t\t// Represent delta as a generalized variable-length integer\n\t\t\t\t\tfor (q = delta, k = base; /* no condition */; k += base) {\n\t\t\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tqMinusT = q - t;\n\t\t\t\t\t\tbaseMinusT = base - t;\n\t\t\t\t\t\toutput.push(\n\t\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t\t);\n\t\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t\t}\n\n\t\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n\t\t\t\t\tdelta = 0;\n\t\t\t\t\t++handledCPCount;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t++delta;\n\t\t\t++n;\n\n\t\t}\n\t\treturn output.join('');\n\t}\n\n\t/**\n\t * Converts a Punycode string representing a domain name or an email address\n\t * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n\t * it doesn't matter if you call it on a string that has already been\n\t * converted to Unicode.\n\t * @memberOf punycode\n\t * @param {String} input The Punycoded domain name or email address to\n\t * convert to Unicode.\n\t * @returns {String} The Unicode representation of the given Punycode\n\t * string.\n\t */\n\tfunction toUnicode(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexPunycode.test(string)\n\t\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/**\n\t * Converts a Unicode string representing a domain name or an email address to\n\t * Punycode. Only the non-ASCII parts of the domain name will be converted,\n\t * i.e. it doesn't matter if you call it with a domain that's already in\n\t * ASCII.\n\t * @memberOf punycode\n\t * @param {String} input The domain name or email address to convert, as a\n\t * Unicode string.\n\t * @returns {String} The Punycode representation of the given domain name or\n\t * email address.\n\t */\n\tfunction toASCII(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexNonASCII.test(string)\n\t\t\t\t? 'xn--' + encode(string)\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/** Define the public API */\n\tpunycode = {\n\t\t/**\n\t\t * A string representing the current Punycode.js version number.\n\t\t * @memberOf punycode\n\t\t * @type String\n\t\t */\n\t\t'version': '1.3.2',\n\t\t/**\n\t\t * An object of methods to convert from JavaScript's internal character\n\t\t * representation (UCS-2) to Unicode code points, and back.\n\t\t * @see \n\t\t * @memberOf punycode\n\t\t * @type Object\n\t\t */\n\t\t'ucs2': {\n\t\t\t'decode': ucs2decode,\n\t\t\t'encode': ucs2encode\n\t\t},\n\t\t'decode': decode,\n\t\t'encode': encode,\n\t\t'toASCII': toASCII,\n\t\t'toUnicode': toUnicode\n\t};\n\n\t/** Expose `punycode` */\n\t// Some AMD build optimizers, like r.js, check for specific condition patterns\n\t// like the following:\n\tif (\n\t\ttypeof define == 'function' &&\n\t\ttypeof define.amd == 'object' &&\n\t\tdefine.amd\n\t) {\n\t\tdefine('punycode', function() {\n\t\t\treturn punycode;\n\t\t});\n\t} else if (freeExports && freeModule) {\n\t\tif (module.exports == freeExports) {\n\t\t\t// in Node.js, io.js, or RingoJS v0.8.0+\n\t\t\tfreeModule.exports = punycode;\n\t\t} else {\n\t\t\t// in Narwhal or RingoJS v0.7.0-\n\t\t\tfor (key in punycode) {\n\t\t\t\tpunycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// in Rhino or a web browser\n\t\troot.punycode = punycode;\n\t}\n\n}(this));\n","/*!\n * URI.js - Mutating URLs\n * IPv6 Support\n *\n * Version: 1.19.11\n *\n * Author: Rodney Rehm\n * Web: http://medialize.github.io/URI.js/\n *\n * Licensed under\n * MIT License http://www.opensource.org/licenses/mit-license\n *\n */\n\n(function (root, factory) {\n 'use strict';\n // https://github.com/umdjs/umd/blob/master/returnExports.js\n if (typeof module === 'object' && module.exports) {\n // Node\n module.exports = factory();\n } else if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define(factory);\n } else {\n // Browser globals (root is window)\n root.IPv6 = factory(root);\n }\n}(this, function (root) {\n 'use strict';\n\n /*\n var _in = \"fe80:0000:0000:0000:0204:61ff:fe9d:f156\";\n var _out = IPv6.best(_in);\n var _expected = \"fe80::204:61ff:fe9d:f156\";\n\n console.log(_in, _out, _expected, _out === _expected);\n */\n\n // save current IPv6 variable, if any\n var _IPv6 = root && root.IPv6;\n\n function bestPresentation(address) {\n // based on:\n // Javascript to test an IPv6 address for proper format, and to\n // present the \"best text representation\" according to IETF Draft RFC at\n // http://tools.ietf.org/html/draft-ietf-6man-text-addr-representation-04\n // 8 Feb 2010 Rich Brown, Dartware, LLC\n // Please feel free to use this code as long as you provide a link to\n // http://www.intermapper.com\n // http://intermapper.com/support/tools/IPV6-Validator.aspx\n // http://download.dartware.com/thirdparty/ipv6validator.js\n\n var _address = address.toLowerCase();\n var segments = _address.split(':');\n var length = segments.length;\n var total = 8;\n\n // trim colons (:: or ::a:b:c… or …a:b:c::)\n if (segments[0] === '' && segments[1] === '' && segments[2] === '') {\n // must have been ::\n // remove first two items\n segments.shift();\n segments.shift();\n } else if (segments[0] === '' && segments[1] === '') {\n // must have been ::xxxx\n // remove the first item\n segments.shift();\n } else if (segments[length - 1] === '' && segments[length - 2] === '') {\n // must have been xxxx::\n segments.pop();\n }\n\n length = segments.length;\n\n // adjust total segments for IPv4 trailer\n if (segments[length - 1].indexOf('.') !== -1) {\n // found a \".\" which means IPv4\n total = 7;\n }\n\n // fill empty segments them with \"0000\"\n var pos;\n for (pos = 0; pos < length; pos++) {\n if (segments[pos] === '') {\n break;\n }\n }\n\n if (pos < total) {\n segments.splice(pos, 1, '0000');\n while (segments.length < total) {\n segments.splice(pos, 0, '0000');\n }\n }\n\n // strip leading zeros\n var _segments;\n for (var i = 0; i < total; i++) {\n _segments = segments[i].split('');\n for (var j = 0; j < 3 ; j++) {\n if (_segments[0] === '0' && _segments.length > 1) {\n _segments.splice(0,1);\n } else {\n break;\n }\n }\n\n segments[i] = _segments.join('');\n }\n\n // find longest sequence of zeroes and coalesce them into one segment\n var best = -1;\n var _best = 0;\n var _current = 0;\n var current = -1;\n var inzeroes = false;\n // i; already declared\n\n for (i = 0; i < total; i++) {\n if (inzeroes) {\n if (segments[i] === '0') {\n _current += 1;\n } else {\n inzeroes = false;\n if (_current > _best) {\n best = current;\n _best = _current;\n }\n }\n } else {\n if (segments[i] === '0') {\n inzeroes = true;\n current = i;\n _current = 1;\n }\n }\n }\n\n if (_current > _best) {\n best = current;\n _best = _current;\n }\n\n if (_best > 1) {\n segments.splice(best, _best, '');\n }\n\n length = segments.length;\n\n // assemble remaining segments\n var result = '';\n if (segments[0] === '') {\n result = ':';\n }\n\n for (i = 0; i < length; i++) {\n result += segments[i];\n if (i === length - 1) {\n break;\n }\n\n result += ':';\n }\n\n if (segments[length - 1] === '') {\n result += ':';\n }\n\n return result;\n }\n\n function noConflict() {\n /*jshint validthis: true */\n if (root.IPv6 === this) {\n root.IPv6 = _IPv6;\n }\n\n return this;\n }\n\n return {\n best: bestPresentation,\n noConflict: noConflict\n };\n}));\n","/*!\n * URI.js - Mutating URLs\n * Second Level Domain (SLD) Support\n *\n * Version: 1.19.11\n *\n * Author: Rodney Rehm\n * Web: http://medialize.github.io/URI.js/\n *\n * Licensed under\n * MIT License http://www.opensource.org/licenses/mit-license\n *\n */\n\n(function (root, factory) {\n 'use strict';\n // https://github.com/umdjs/umd/blob/master/returnExports.js\n if (typeof module === 'object' && module.exports) {\n // Node\n module.exports = factory();\n } else if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define(factory);\n } else {\n // Browser globals (root is window)\n root.SecondLevelDomains = factory(root);\n }\n}(this, function (root) {\n 'use strict';\n\n // save current SecondLevelDomains variable, if any\n var _SecondLevelDomains = root && root.SecondLevelDomains;\n\n var SLD = {\n // list of known Second Level Domains\n // converted list of SLDs from https://github.com/gavingmiller/second-level-domains\n // ----\n // publicsuffix.org is more current and actually used by a couple of browsers internally.\n // downside is it also contains domains like \"dyndns.org\" - which is fine for the security\n // issues browser have to deal with (SOP for cookies, etc) - but is way overboard for URI.js\n // ----\n list: {\n 'ac':' com gov mil net org ',\n 'ae':' ac co gov mil name net org pro sch ',\n 'af':' com edu gov net org ',\n 'al':' com edu gov mil net org ',\n 'ao':' co ed gv it og pb ',\n 'ar':' com edu gob gov int mil net org tur ',\n 'at':' ac co gv or ',\n 'au':' asn com csiro edu gov id net org ',\n 'ba':' co com edu gov mil net org rs unbi unmo unsa untz unze ',\n 'bb':' biz co com edu gov info net org store tv ',\n 'bh':' biz cc com edu gov info net org ',\n 'bn':' com edu gov net org ',\n 'bo':' com edu gob gov int mil net org tv ',\n 'br':' adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ',\n 'bs':' com edu gov net org ',\n 'bz':' du et om ov rg ',\n 'ca':' ab bc mb nb nf nl ns nt nu on pe qc sk yk ',\n 'ck':' biz co edu gen gov info net org ',\n 'cn':' ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ',\n 'co':' com edu gov mil net nom org ',\n 'cr':' ac c co ed fi go or sa ',\n 'cy':' ac biz com ekloges gov ltd name net org parliament press pro tm ',\n 'do':' art com edu gob gov mil net org sld web ',\n 'dz':' art asso com edu gov net org pol ',\n 'ec':' com edu fin gov info med mil net org pro ',\n 'eg':' com edu eun gov mil name net org sci ',\n 'er':' com edu gov ind mil net org rochest w ',\n 'es':' com edu gob nom org ',\n 'et':' biz com edu gov info name net org ',\n 'fj':' ac biz com info mil name net org pro ',\n 'fk':' ac co gov net nom org ',\n 'fr':' asso com f gouv nom prd presse tm ',\n 'gg':' co net org ',\n 'gh':' com edu gov mil org ',\n 'gn':' ac com gov net org ',\n 'gr':' com edu gov mil net org ',\n 'gt':' com edu gob ind mil net org ',\n 'gu':' com edu gov net org ',\n 'hk':' com edu gov idv net org ',\n 'hu':' 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ',\n 'id':' ac co go mil net or sch web ',\n 'il':' ac co gov idf k12 muni net org ',\n 'in':' ac co edu ernet firm gen gov i ind mil net nic org res ',\n 'iq':' com edu gov i mil net org ',\n 'ir':' ac co dnssec gov i id net org sch ',\n 'it':' edu gov ',\n 'je':' co net org ',\n 'jo':' com edu gov mil name net org sch ',\n 'jp':' ac ad co ed go gr lg ne or ',\n 'ke':' ac co go info me mobi ne or sc ',\n 'kh':' com edu gov mil net org per ',\n 'ki':' biz com de edu gov info mob net org tel ',\n 'km':' asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ',\n 'kn':' edu gov net org ',\n 'kr':' ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ',\n 'kw':' com edu gov net org ',\n 'ky':' com edu gov net org ',\n 'kz':' com edu gov mil net org ',\n 'lb':' com edu gov net org ',\n 'lk':' assn com edu gov grp hotel int ltd net ngo org sch soc web ',\n 'lr':' com edu gov net org ',\n 'lv':' asn com conf edu gov id mil net org ',\n 'ly':' com edu gov id med net org plc sch ',\n 'ma':' ac co gov m net org press ',\n 'mc':' asso tm ',\n 'me':' ac co edu gov its net org priv ',\n 'mg':' com edu gov mil nom org prd tm ',\n 'mk':' com edu gov inf name net org pro ',\n 'ml':' com edu gov net org presse ',\n 'mn':' edu gov org ',\n 'mo':' com edu gov net org ',\n 'mt':' com edu gov net org ',\n 'mv':' aero biz com coop edu gov info int mil museum name net org pro ',\n 'mw':' ac co com coop edu gov int museum net org ',\n 'mx':' com edu gob net org ',\n 'my':' com edu gov mil name net org sch ',\n 'nf':' arts com firm info net other per rec store web ',\n 'ng':' biz com edu gov mil mobi name net org sch ',\n 'ni':' ac co com edu gob mil net nom org ',\n 'np':' com edu gov mil net org ',\n 'nr':' biz com edu gov info net org ',\n 'om':' ac biz co com edu gov med mil museum net org pro sch ',\n 'pe':' com edu gob mil net nom org sld ',\n 'ph':' com edu gov i mil net ngo org ',\n 'pk':' biz com edu fam gob gok gon gop gos gov net org web ',\n 'pl':' art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ',\n 'pr':' ac biz com edu est gov info isla name net org pro prof ',\n 'ps':' com edu gov net org plo sec ',\n 'pw':' belau co ed go ne or ',\n 'ro':' arts com firm info nom nt org rec store tm www ',\n 'rs':' ac co edu gov in org ',\n 'sb':' com edu gov net org ',\n 'sc':' com edu gov net org ',\n 'sh':' co com edu gov net nom org ',\n 'sl':' com edu gov net org ',\n 'st':' co com consulado edu embaixada gov mil net org principe saotome store ',\n 'sv':' com edu gob org red ',\n 'sz':' ac co org ',\n 'tr':' av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ',\n 'tt':' aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ',\n 'tw':' club com ebiz edu game gov idv mil net org ',\n 'mu':' ac co com gov net or org ',\n 'mz':' ac co edu gov org ',\n 'na':' co com ',\n 'nz':' ac co cri geek gen govt health iwi maori mil net org parliament school ',\n 'pa':' abo ac com edu gob ing med net nom org sld ',\n 'pt':' com edu gov int net nome org publ ',\n 'py':' com edu gov mil net org ',\n 'qa':' com edu gov mil net org ',\n 're':' asso com nom ',\n 'ru':' ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ',\n 'rw':' ac co com edu gouv gov int mil net ',\n 'sa':' com edu gov med net org pub sch ',\n 'sd':' com edu gov info med net org tv ',\n 'se':' a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ',\n 'sg':' com edu gov idn net org per ',\n 'sn':' art com edu gouv org perso univ ',\n 'sy':' com edu gov mil net news org ',\n 'th':' ac co go in mi net or ',\n 'tj':' ac biz co com edu go gov info int mil name net nic org test web ',\n 'tn':' agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ',\n 'tz':' ac co go ne or ',\n 'ua':' biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ',\n 'ug':' ac co go ne or org sc ',\n 'uk':' ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ',\n 'us':' dni fed isa kids nsn ',\n 'uy':' com edu gub mil net org ',\n 've':' co com edu gob info mil net org web ',\n 'vi':' co com k12 net org ',\n 'vn':' ac biz com edu gov health info int name net org pro ',\n 'ye':' co com gov ltd me net org plc ',\n 'yu':' ac co edu gov org ',\n 'za':' ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ',\n 'zm':' ac co com edu gov net org sch ',\n // https://en.wikipedia.org/wiki/CentralNic#Second-level_domains\n 'com': 'ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za ',\n 'net': 'gb jp se uk ',\n 'org': 'ae',\n 'de': 'com '\n },\n // gorhill 2013-10-25: Using indexOf() instead Regexp(). Significant boost\n // in both performance and memory footprint. No initialization required.\n // http://jsperf.com/uri-js-sld-regex-vs-binary-search/4\n // Following methods use lastIndexOf() rather than array.split() in order\n // to avoid any memory allocations.\n has: function(domain) {\n var tldOffset = domain.lastIndexOf('.');\n if (tldOffset <= 0 || tldOffset >= (domain.length-1)) {\n return false;\n }\n var sldOffset = domain.lastIndexOf('.', tldOffset-1);\n if (sldOffset <= 0 || sldOffset >= (tldOffset-1)) {\n return false;\n }\n var sldList = SLD.list[domain.slice(tldOffset+1)];\n if (!sldList) {\n return false;\n }\n return sldList.indexOf(' ' + domain.slice(sldOffset+1, tldOffset) + ' ') >= 0;\n },\n is: function(domain) {\n var tldOffset = domain.lastIndexOf('.');\n if (tldOffset <= 0 || tldOffset >= (domain.length-1)) {\n return false;\n }\n var sldOffset = domain.lastIndexOf('.', tldOffset-1);\n if (sldOffset >= 0) {\n return false;\n }\n var sldList = SLD.list[domain.slice(tldOffset+1)];\n if (!sldList) {\n return false;\n }\n return sldList.indexOf(' ' + domain.slice(0, tldOffset) + ' ') >= 0;\n },\n get: function(domain) {\n var tldOffset = domain.lastIndexOf('.');\n if (tldOffset <= 0 || tldOffset >= (domain.length-1)) {\n return null;\n }\n var sldOffset = domain.lastIndexOf('.', tldOffset-1);\n if (sldOffset <= 0 || sldOffset >= (tldOffset-1)) {\n return null;\n }\n var sldList = SLD.list[domain.slice(tldOffset+1)];\n if (!sldList) {\n return null;\n }\n if (sldList.indexOf(' ' + domain.slice(sldOffset+1, tldOffset) + ' ') < 0) {\n return null;\n }\n return domain.slice(sldOffset+1);\n },\n noConflict: function(){\n if (root.SecondLevelDomains === this) {\n root.SecondLevelDomains = _SecondLevelDomains;\n }\n return this;\n }\n };\n\n return SLD;\n}));\n","// Original code from TerriaJS\n// https://github.com/TerriaJS/terriajs/blob/master/lib/ReactViews/Map/Navigation/Compass.jsx\n\n// SVG images from https://cesium.com/ion/stories/ (with permission from Cesium)\n\nimport {LitElement, css, svg, html} from 'lit';\nimport {styleMap} from 'lit/directives/style-map.js';\n\nimport {Cartesian2, Cartesian3, Matrix4, Transforms, Ellipsoid, Ray, Math as CesiumMath} from 'cesium';\n\nconst vectorScratch = new Cartesian2();\nconst windowPositionScratch = new Cartesian2();\nconst clickLocationScratch = new Cartesian2();\nconst centerScratch = new Cartesian3();\nconst oldTransformScratch = new Matrix4();\nconst newTransformScratch = new Matrix4();\n\nconst pickRayScratch = new Ray();\n\nconst nominalTotalRadius = 145;\nconst nominalGyroRadius = 50;\n\n\nconst outerRingSvg = svg``;\nconst innerRingSvg = svg``;\nconst rotationMarkerSvg = svg``;\n\nclass CesiumCompass extends LitElement {\n\n static get properties() {\n return {\n scene: {type: Object},\n clock: {type: Object},\n ready: {type: Boolean},\n heading: {type: Number},\n orbitCursorAngle: {type: Number},\n orbitCursorOpacity: {type: Number},\n resetSpeed: {type: Number},\n };\n }\n\n static get styles() {\n return css`\n :host {\n --cesium-compass-stroke-color: rgba(0, 0, 0, 0.6);\n --cesium-compass-fill-color: rgb(224, 225, 226);\n }\n :host * {\n box-sizing: content-box;\n }\n .compass {\n position: absolute;\n right: 0;\n top: 0;\n width: 95px;\n height: 95px;\n cursor: pointer;\n }\n .outer-ring-background {\n position: absolute;\n top: 14px;\n left: 14px;\n width: 44px;\n height: 44px;\n border-radius: 100%;\n border: 12px solid var(--cesium-compass-fill-color);\n }\n .inner-ring-background {\n position: absolute;\n top: 30px;\n left: 30px;\n width: 33px;\n height: 33px;\n border-radius: 100%;\n background-color: var(--cesium-compass-fill-color);\n border: 1px solid var(--cesium-compass-stroke-color);\n }\n .rotation-marker, .outer-ring {\n will-change: opacity, transform;\n }\n .rotation-marker, .outer-ring, .inner-ring {\n position: absolute;\n top: 0;\n width: 95px;\n height: 95px;\n fill: var(--cesium-compass-stroke-color);\n }\n .rotation-marker svg, .outer-ring svg, .inner-ring svg {\n width: 100%;\n height: 100%;\n }\n `;\n }\n\n constructor() {\n super();\n\n /**\n * @type {import('cesium').Scene}\n */\n this.scene;\n\n /**\n * @type {import('cesium').Clock}\n */\n this.clock = undefined;\n\n /**\n * @type {boolean}\n */\n this.ready = false;\n\n /**\n * @type {number}\n */\n this.resetSpeed = Math.PI / 100;\n\n /**\n * @type {boolean}\n */\n this.rotateClick = undefined;\n\n /**\n * @type {import('cesium').Event.RemoveCallback}\n */\n this.unlistenFromPostRender = null;\n\n /**\n * @type {import('cesium').Event.RemoveCallback}\n */\n this.unlistenFromClockTick = null;\n\n /**\n * @type {number}\n */\n this.orbitCursorOpacity = 0;\n\n this.handleRotatePointerMoveFunction = this.handleRotatePointerMove.bind(this);\n this.handleRotatePointerUpFunction = this.handleRotatePointerUp.bind(this);\n\n this.handleOrbitPointerMoveFunction = this.handleOrbitPointerMove.bind(this);\n this.handleOrbitPointerUpFunction = this.handleOrbitPointerUp.bind(this);\n this.handleOrbitTickFunction = this.handleOrbitTick.bind(this);\n\n this.context = {};\n }\n\n updated() {\n if (this.scene && this.clock && !this.unlistenFromPostRender) {\n this.unlistenFromPostRender = this.scene.postRender.addEventListener(() => {\n this.heading = this.scene.camera.heading;\n });\n this.ready = true;\n }\n }\n\n get outerRingStyle() {\n return {\n transform: `rotate(-${this.heading}rad)`\n };\n }\n\n get rotationMarkerStyle() {\n return {\n transform: `rotate(-${this.orbitCursorAngle}rad)`,\n opacity: `${this.orbitCursorOpacity}`\n };\n }\n\n disconnectedCallback() {\n if (this.unlistenFromPostRender) {\n this.unlistenFromPostRender();\n }\n super.disconnectedCallback();\n }\n\n /**\n * @param {PointerEvent} event\n */\n handlePointerDown(event) {\n const camera = this.scene.camera;\n const compassElement = /** @type {HTMLDivElement} */ (event.currentTarget);\n this.context.compassRectangle = compassElement.getBoundingClientRect();\n this.context.compassCenter = new Cartesian2(\n (this.context.compassRectangle.right - this.context.compassRectangle.left) / 2,\n (this.context.compassRectangle.bottom - this.context.compassRectangle.top) / 2\n );\n clickLocationScratch.x = event.clientX - this.context.compassRectangle.left;\n clickLocationScratch.y = event.clientY - this.context.compassRectangle.top;\n const vector = Cartesian2.subtract(clickLocationScratch, this.context.compassCenter, vectorScratch);\n const distanceFromCenter = Cartesian2.magnitude(vector);\n\n windowPositionScratch.x = this.scene.canvas.clientWidth / 2;\n windowPositionScratch.y = this.scene.canvas.clientHeight / 2;\n const ray = camera.getPickRay(windowPositionScratch, pickRayScratch);\n this.context.viewCenter = this.scene.globe.pick(ray, this.scene, centerScratch);\n\n this.context.frame = Transforms.eastNorthUpToFixedFrame(\n this.context.viewCenter ? this.context.viewCenter : camera.positionWC,\n Ellipsoid.WGS84,\n newTransformScratch\n );\n\n const maxDistance = this.context.compassRectangle.width / 2;\n const distanceFraction = distanceFromCenter / maxDistance;\n\n if (distanceFraction < nominalGyroRadius / nominalTotalRadius) {\n this.orbit(vector);\n } else if (distanceFraction < 1) {\n this.rotate(vector);\n }\n event.stopPropagation();\n event.preventDefault();\n }\n\n /**\n * @param {Cartesian2} cursorVector\n */\n rotate(cursorVector) {\n const camera = this.scene.camera;\n\n this.context.rotateInitialCursorAngle = Math.atan2(-cursorVector.y, cursorVector.x);\n\n const oldTransform = Matrix4.clone(camera.transform, oldTransformScratch);\n\n camera.lookAtTransform(this.context.frame);\n this.context.rotateInitialCameraAngle = Math.atan2(camera.position.y, camera.position.x);\n camera.lookAtTransform(oldTransform);\n\n this.rotateClick = true;\n\n document.addEventListener('pointermove', this.handleRotatePointerMoveFunction, false);\n document.addEventListener('pointerup', this.handleRotatePointerUpFunction, false);\n }\n\n /**\n * @param {PointerEvent} event\n */\n handleRotatePointerMove(event) {\n if (this.moveUpIfTooCloseToTerrain()) {\n return;\n }\n const camera = this.scene.camera;\n clickLocationScratch.x = event.clientX - this.context.compassRectangle.left;\n clickLocationScratch.y = event.clientY - this.context.compassRectangle.top;\n const vector = Cartesian2.subtract(clickLocationScratch, this.context.compassCenter, vectorScratch);\n const angle = Math.atan2(-vector.y, vector.x);\n\n const angleDifference = angle - this.context.rotateInitialCursorAngle;\n const newCameraAngle = CesiumMath.zeroToTwoPi(\n this.context.rotateInitialCameraAngle - angleDifference\n );\n\n const oldTransform = Matrix4.clone(camera.transform, oldTransformScratch);\n camera.lookAtTransform(this.context.frame);\n const currentCameraAngle = Math.atan2(camera.position.y, camera.position.x);\n camera.rotateRight(newCameraAngle - currentCameraAngle);\n camera.lookAtTransform(oldTransform);\n\n this.rotateClick = false;\n }\n\n /**\n * @param {PointerEvent} event\n */\n handleRotatePointerUp(event) {\n document.removeEventListener('pointermove', this.handleRotatePointerMoveFunction, false);\n document.removeEventListener('pointerup', this.handleRotatePointerUpFunction, false);\n\n if (this.rotateClick) {\n this.resetToNorth();\n }\n }\n\n resetToNorth() {\n const camera = this.scene.camera;\n const oldTransform = Matrix4.clone(camera.transform, oldTransformScratch);\n camera.lookAtTransform(this.context.frame);\n const newCameraAngle = CesiumMath.negativePiToPi(\n CesiumMath.PI_OVER_TWO + Math.atan2(camera.position.y, camera.position.x)\n );\n const duration = Math.abs(newCameraAngle) / this.resetSpeed;\n\n let prevProgress = 0;\n const start = performance.now();\n const step = () => {\n const elapsed = performance.now() - start;\n const progress = CesiumMath.clamp(elapsed / duration, 0, 1);\n\n camera.rotateLeft((progress - prevProgress) * newCameraAngle);\n\n prevProgress = progress;\n if (progress < 1) {\n window.requestAnimationFrame(step);\n } else {\n camera.lookAtTransform(oldTransform);\n }\n };\n window.requestAnimationFrame(step);\n }\n\n /**\n * @param {Cartesian2} cursorVector\n */\n orbit(cursorVector) {\n this.context.orbitIsLook = !this.context.viewCenter;\n this.context.orbitLastTimestamp = performance.now();\n\n document.addEventListener('pointermove', this.handleOrbitPointerMoveFunction, false);\n document.addEventListener('pointerup', this.handleOrbitPointerUpFunction, false);\n\n this.unlistenFromClockTick = this.clock.onTick.addEventListener(this.handleOrbitTickFunction);\n\n this.updateAngleAndOpacity(cursorVector, this.context.compassRectangle.width);\n }\n\n handleOrbitTick() {\n if (this.moveUpIfTooCloseToTerrain()) {\n return;\n }\n const camera = this.scene.camera;\n const timestamp = performance.now();\n\n const deltaT = timestamp - this.context.orbitLastTimestamp;\n const rate = ((this.orbitCursorOpacity - 0.5) * 2.5) / 1000;\n const distance = deltaT * rate;\n\n const angle = this.orbitCursorAngle + CesiumMath.PI_OVER_TWO;\n const x = Math.cos(angle) * distance;\n const y = Math.sin(angle) * distance;\n\n const oldTransform = Matrix4.clone(camera.transform, oldTransformScratch);\n camera.lookAtTransform(this.context.frame);\n if (this.context.orbitIsLook) {\n camera.look(Cartesian3.UNIT_Z, -x);\n camera.look(camera.right, -y);\n } else {\n camera.rotateLeft(x);\n camera.rotateUp(y);\n }\n camera.lookAtTransform(oldTransform);\n\n this.context.orbitLastTimestamp = timestamp;\n }\n\n distanceToTerrain() {\n const camera = this.scene.camera;\n const height = this.scene.globe.getHeight(camera.positionCartographic);\n return camera.positionCartographic.height - height;\n }\n\n moveUpIfTooCloseToTerrain() {\n const controller = this.scene.screenSpaceCameraController;\n if (!controller.enableCollisionDetection) {\n return false;\n }\n const distanceDiff = this.distanceToTerrain() - controller.minimumZoomDistance;\n if (CesiumMath.lessThan(distanceDiff, 0.0, CesiumMath.EPSILON1)) {\n this.scene.camera.moveUp(-distanceDiff);\n return true;\n }\n return false;\n }\n\n /**\n * @param {Cartesian2} vector\n * @param {number} compassWidth\n */\n updateAngleAndOpacity(vector, compassWidth) {\n const angle = Math.atan2(-vector.y, vector.x);\n this.orbitCursorAngle = CesiumMath.zeroToTwoPi(angle - CesiumMath.PI_OVER_TWO);\n\n const distance = Cartesian2.magnitude(vector);\n const maxDistance = compassWidth / 2.0;\n const distanceFraction = Math.min(distance / maxDistance, 1.0);\n this.orbitCursorOpacity = 0.5 * distanceFraction * distanceFraction + 0.5;\n }\n\n /**\n * @param {PointerEvent} event\n */\n handleOrbitPointerMove(event) {\n clickLocationScratch.x = event.clientX - this.context.compassRectangle.left;\n clickLocationScratch.y = event.clientY - this.context.compassRectangle.top;\n const cursorVector = Cartesian2.subtract(clickLocationScratch, this.context.compassCenter, vectorScratch);\n this.updateAngleAndOpacity(cursorVector, this.context.compassRectangle.width);\n\n }\n\n /**\n * @param {PointerEvent} event\n */\n handleOrbitPointerUp(event) {\n document.removeEventListener('pointermove', this.handleOrbitPointerMoveFunction, false);\n document.removeEventListener('pointerup', this.handleOrbitPointerUpFunction, false);\n this.unlistenFromClockTick();\n this.orbitCursorOpacity = 0;\n }\n\n render() {\n if (this.ready) {\n return html`\n
\n
\n
${outerRingSvg}
\n
\n
${innerRingSvg}
\n
${rotationMarkerSvg}
\n
\n `;\n } else {\n return html``;\n }\n }\n}\n\ncustomElements.define('cesium-compass', CesiumCompass);\n","import{noChange as R}from\"../lit-html.js\";import{directive as e,Directive as i,PartType as t}from\"../directive.js\";\n/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const ee=\"important\",ie=\" !\"+ee,se=e(class extends i{constructor(e){if(super(e),e.type!==t.ATTRIBUTE||\"style\"!==e.name||e.strings?.length>2)throw Error(\"The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.\")}render(t){return Object.keys(t).reduce(((e,r)=>{const s=t[r];return null==s?e:e+`${r=r.includes(\"-\")?r:r.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,\"-$&\").toLowerCase()}:${s};`}),\"\")}update(t,[e]){const{style:r}=t.element;if(void 0===this.ft)return this.ft=new Set(Object.keys(e)),this.render(e);for(const t of this.ft)null==e[t]&&(this.ft.delete(t),t.includes(\"-\")?r.removeProperty(t):r[t]=null);for(const t in e){const s=e[t];if(null!=s){this.ft.add(t);const e=\"string\"==typeof s&&s.endsWith(ie);t.includes(\"-\")||e?r.setProperty(t,e?s.slice(0,-11):s,e?ee:\"\"):r[t]=s}}return R}});export{se as styleMap};\n//# sourceMappingURL=style-map.js.map\n","/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {AttributePart, noChange} from '../lit-html.js';\nimport {\n directive,\n Directive,\n DirectiveParameters,\n PartInfo,\n PartType,\n} from '../directive.js';\n\n/**\n * A key-value set of CSS properties and values.\n *\n * The key should be either a valid CSS property name string, like\n * `'background-color'`, or a valid JavaScript camel case property name\n * for CSSStyleDeclaration like `backgroundColor`.\n */\nexport interface StyleInfo {\n [name: string]: string | number | undefined | null;\n}\n\nconst important = 'important';\n// The leading space is important\nconst importantFlag = ' !' + important;\n// How many characters to remove from a value, as a negative number\nconst flagTrim = 0 - importantFlag.length;\n\nclass StyleMapDirective extends Directive {\n private _previousStyleProperties?: Set;\n\n constructor(partInfo: PartInfo) {\n super(partInfo);\n if (\n partInfo.type !== PartType.ATTRIBUTE ||\n partInfo.name !== 'style' ||\n (partInfo.strings?.length as number) > 2\n ) {\n throw new Error(\n 'The `styleMap` directive must be used in the `style` attribute ' +\n 'and must be the only part in the attribute.',\n );\n }\n }\n\n render(styleInfo: Readonly) {\n return Object.keys(styleInfo).reduce((style, prop) => {\n const value = styleInfo[prop];\n if (value == null) {\n return style;\n }\n // Convert property names from camel-case to dash-case, i.e.:\n // `backgroundColor` -> `background-color`\n // Vendor-prefixed names need an extra `-` appended to front:\n // `webkitAppearance` -> `-webkit-appearance`\n // Exception is any property name containing a dash, including\n // custom properties; we assume these are already dash-cased i.e.:\n // `--my-button-color` --> `--my-button-color`\n prop = prop.includes('-')\n ? prop\n : prop\n .replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g, '-$&')\n .toLowerCase();\n return style + `${prop}:${value};`;\n }, '');\n }\n\n override update(part: AttributePart, [styleInfo]: DirectiveParameters) {\n const {style} = part.element as HTMLElement;\n\n if (this._previousStyleProperties === undefined) {\n this._previousStyleProperties = new Set(Object.keys(styleInfo));\n return this.render(styleInfo);\n }\n\n // Remove old properties that no longer exist in styleInfo\n for (const name of this._previousStyleProperties) {\n // If the name isn't in styleInfo or it's null/undefined\n if (styleInfo[name] == null) {\n this._previousStyleProperties!.delete(name);\n if (name.includes('-')) {\n style.removeProperty(name);\n } else {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (style as any)[name] = null;\n }\n }\n }\n\n // Add or update properties\n for (const name in styleInfo) {\n const value = styleInfo[name];\n if (value != null) {\n this._previousStyleProperties.add(name);\n const isImportant =\n typeof value === 'string' && value.endsWith(importantFlag);\n if (name.includes('-') || isImportant) {\n style.setProperty(\n name,\n isImportant\n ? (value as string).slice(0, flagTrim)\n : (value as string),\n isImportant ? important : '',\n );\n } else {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (style as any)[name] = value;\n }\n }\n }\n return noChange;\n }\n}\n\n/**\n * A directive that applies CSS properties to an element.\n *\n * `styleMap` can only be used in the `style` attribute and must be the only\n * expression in the attribute. It takes the property names in the\n * {@link StyleInfo styleInfo} object and adds the properties to the inline\n * style of the element.\n *\n * Property names with dashes (`-`) are assumed to be valid CSS\n * property names and set on the element's style object using `setProperty()`.\n * Names without dashes are assumed to be camelCased JavaScript property names\n * and set on the element's style object using property assignment, allowing the\n * style object to translate JavaScript-style names to CSS property names.\n *\n * For example `styleMap({backgroundColor: 'red', 'border-top': '5px', '--size':\n * '0'})` sets the `background-color`, `border-top` and `--size` properties.\n *\n * @param styleInfo\n * @see {@link https://lit.dev/docs/templates/directives/#stylemap styleMap code samples on Lit.dev}\n */\nexport const styleMap = directive(StyleMapDirective);\n\n/**\n * The type of the class that powers this directive. Necessary for naming the\n * directive's return type.\n */\nexport type {StyleMapDirective};\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},e=t=>(...e)=>({_$litDirective$:t,values:e});class i{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this.t=t,this._$AM=e,this.i=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}export{i as Directive,t as PartType,e as directive};\n//# sourceMappingURL=directive.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {Disconnectable, Part} from './lit-html.js';\n\nexport {\n AttributePart,\n BooleanAttributePart,\n ChildPart,\n ElementPart,\n EventPart,\n Part,\n PropertyPart,\n} from './lit-html.js';\n\nexport interface DirectiveClass {\n new (part: PartInfo): Directive;\n}\n\n/**\n * This utility type extracts the signature of a directive class's render()\n * method so we can use it for the type of the generated directive function.\n */\nexport type DirectiveParameters = Parameters;\n\n/**\n * A generated directive function doesn't evaluate the directive, but just\n * returns a DirectiveResult object that captures the arguments.\n */\nexport interface DirectiveResult {\n /**\n * This property needs to remain unminified.\n * @internal\n */\n ['_$litDirective$']: C;\n /** @internal */\n values: DirectiveParameters>;\n}\n\nexport const PartType = {\n ATTRIBUTE: 1,\n CHILD: 2,\n PROPERTY: 3,\n BOOLEAN_ATTRIBUTE: 4,\n EVENT: 5,\n ELEMENT: 6,\n} as const;\n\nexport type PartType = (typeof PartType)[keyof typeof PartType];\n\nexport interface ChildPartInfo {\n readonly type: typeof PartType.CHILD;\n}\n\nexport interface AttributePartInfo {\n readonly type:\n | typeof PartType.ATTRIBUTE\n | typeof PartType.PROPERTY\n | typeof PartType.BOOLEAN_ATTRIBUTE\n | typeof PartType.EVENT;\n readonly strings?: ReadonlyArray;\n readonly name: string;\n readonly tagName: string;\n}\n\nexport interface ElementPartInfo {\n readonly type: typeof PartType.ELEMENT;\n}\n\n/**\n * Information about the part a directive is bound to.\n *\n * This is useful for checking that a directive is attached to a valid part,\n * such as with directive that can only be used on attribute bindings.\n */\nexport type PartInfo = ChildPartInfo | AttributePartInfo | ElementPartInfo;\n\n/**\n * Creates a user-facing directive function from a Directive class. This\n * function has the same parameters as the directive's render() method.\n */\nexport const directive =\n (c: C) =>\n (...values: DirectiveParameters>): DirectiveResult => ({\n // This property needs to remain unminified.\n ['_$litDirective$']: c,\n values,\n });\n\n/**\n * Base class for creating custom directives. Users should extend this class,\n * implement `render` and/or `update`, and then pass their subclass to\n * `directive`.\n */\nexport abstract class Directive implements Disconnectable {\n //@internal\n __part!: Part;\n //@internal\n __attributeIndex: number | undefined;\n //@internal\n __directive?: Directive;\n\n //@internal\n _$parent!: Disconnectable;\n\n // These will only exist on the AsyncDirective subclass\n //@internal\n _$disconnectableChildren?: Set;\n // This property needs to remain unminified.\n //@internal\n ['_$notifyDirectiveConnectionChanged']?(isConnected: boolean): void;\n\n constructor(_partInfo: PartInfo) {}\n\n // See comment in Disconnectable interface for why this is a getter\n get _$isConnected() {\n return this._$parent._$isConnected;\n }\n\n /** @internal */\n _$initialize(\n part: Part,\n parent: Disconnectable,\n attributeIndex: number | undefined,\n ) {\n this.__part = part;\n this._$parent = parent;\n this.__attributeIndex = attributeIndex;\n }\n /** @internal */\n _$resolve(part: Part, props: Array): unknown {\n return this.update(part, props);\n }\n\n abstract render(...props: Array): unknown;\n\n update(_part: Part, props: Array): unknown {\n return this.render(...props);\n }\n}\n","import Cartesian2 from \"./Cartesian2.js\";\nimport Cartesian3 from \"./Cartesian3.js\";\nimport Cartographic from \"./Cartographic.js\";\nimport Check from \"./Check.js\";\nimport defaultValue from \"./defaultValue.js\";\nimport defined from \"./defined.js\";\nimport DeveloperError from \"./DeveloperError.js\";\nimport CesiumMath from \"./Math.js\";\nimport scaleToGeodeticSurface from \"./scaleToGeodeticSurface.js\";\n\nfunction initialize(ellipsoid, x, y, z) {\n x = defaultValue(x, 0.0);\n y = defaultValue(y, 0.0);\n z = defaultValue(z, 0.0);\n\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.number.greaterThanOrEquals(\"x\", x, 0.0);\n Check.typeOf.number.greaterThanOrEquals(\"y\", y, 0.0);\n Check.typeOf.number.greaterThanOrEquals(\"z\", z, 0.0);\n //>>includeEnd('debug');\n\n ellipsoid._radii = new Cartesian3(x, y, z);\n\n ellipsoid._radiiSquared = new Cartesian3(x * x, y * y, z * z);\n\n ellipsoid._radiiToTheFourth = new Cartesian3(\n x * x * x * x,\n y * y * y * y,\n z * z * z * z,\n );\n\n ellipsoid._oneOverRadii = new Cartesian3(\n x === 0.0 ? 0.0 : 1.0 / x,\n y === 0.0 ? 0.0 : 1.0 / y,\n z === 0.0 ? 0.0 : 1.0 / z,\n );\n\n ellipsoid._oneOverRadiiSquared = new Cartesian3(\n x === 0.0 ? 0.0 : 1.0 / (x * x),\n y === 0.0 ? 0.0 : 1.0 / (y * y),\n z === 0.0 ? 0.0 : 1.0 / (z * z),\n );\n\n ellipsoid._minimumRadius = Math.min(x, y, z);\n\n ellipsoid._maximumRadius = Math.max(x, y, z);\n\n ellipsoid._centerToleranceSquared = CesiumMath.EPSILON1;\n\n if (ellipsoid._radiiSquared.z !== 0) {\n ellipsoid._squaredXOverSquaredZ =\n ellipsoid._radiiSquared.x / ellipsoid._radiiSquared.z;\n }\n}\n\n/**\n * A quadratic surface defined in Cartesian coordinates by the equation\n * (x / a)^2 + (y / b)^2 + (z / c)^2 = 1. Primarily used\n * by Cesium to represent the shape of planetary bodies.\n *\n * Rather than constructing this object directly, one of the provided\n * constants is normally used.\n * @alias Ellipsoid\n * @constructor\n *\n * @param {number} [x=0] The radius in the x direction.\n * @param {number} [y=0] The radius in the y direction.\n * @param {number} [z=0] The radius in the z direction.\n *\n * @exception {DeveloperError} All radii components must be greater than or equal to zero.\n *\n * @see Ellipsoid.fromCartesian3\n * @see Ellipsoid.WGS84\n * @see Ellipsoid.UNIT_SPHERE\n */\nfunction Ellipsoid(x, y, z) {\n this._radii = undefined;\n this._radiiSquared = undefined;\n this._radiiToTheFourth = undefined;\n this._oneOverRadii = undefined;\n this._oneOverRadiiSquared = undefined;\n this._minimumRadius = undefined;\n this._maximumRadius = undefined;\n this._centerToleranceSquared = undefined;\n this._squaredXOverSquaredZ = undefined;\n\n initialize(this, x, y, z);\n}\n\nObject.defineProperties(Ellipsoid.prototype, {\n /**\n * Gets the radii of the ellipsoid.\n * @memberof Ellipsoid.prototype\n * @type {Cartesian3}\n * @readonly\n */\n radii: {\n get: function () {\n return this._radii;\n },\n },\n /**\n * Gets the squared radii of the ellipsoid.\n * @memberof Ellipsoid.prototype\n * @type {Cartesian3}\n * @readonly\n */\n radiiSquared: {\n get: function () {\n return this._radiiSquared;\n },\n },\n /**\n * Gets the radii of the ellipsoid raise to the fourth power.\n * @memberof Ellipsoid.prototype\n * @type {Cartesian3}\n * @readonly\n */\n radiiToTheFourth: {\n get: function () {\n return this._radiiToTheFourth;\n },\n },\n /**\n * Gets one over the radii of the ellipsoid.\n * @memberof Ellipsoid.prototype\n * @type {Cartesian3}\n * @readonly\n */\n oneOverRadii: {\n get: function () {\n return this._oneOverRadii;\n },\n },\n /**\n * Gets one over the squared radii of the ellipsoid.\n * @memberof Ellipsoid.prototype\n * @type {Cartesian3}\n * @readonly\n */\n oneOverRadiiSquared: {\n get: function () {\n return this._oneOverRadiiSquared;\n },\n },\n /**\n * Gets the minimum radius of the ellipsoid.\n * @memberof Ellipsoid.prototype\n * @type {number}\n * @readonly\n */\n minimumRadius: {\n get: function () {\n return this._minimumRadius;\n },\n },\n /**\n * Gets the maximum radius of the ellipsoid.\n * @memberof Ellipsoid.prototype\n * @type {number}\n * @readonly\n */\n maximumRadius: {\n get: function () {\n return this._maximumRadius;\n },\n },\n});\n\n/**\n * Duplicates an Ellipsoid instance.\n *\n * @param {Ellipsoid} ellipsoid The ellipsoid to duplicate.\n * @param {Ellipsoid} [result] The object onto which to store the result, or undefined if a new\n * instance should be created.\n * @returns {Ellipsoid} The cloned Ellipsoid. (Returns undefined if ellipsoid is undefined)\n */\nEllipsoid.clone = function (ellipsoid, result) {\n if (!defined(ellipsoid)) {\n return undefined;\n }\n const radii = ellipsoid._radii;\n\n if (!defined(result)) {\n return new Ellipsoid(radii.x, radii.y, radii.z);\n }\n\n Cartesian3.clone(radii, result._radii);\n Cartesian3.clone(ellipsoid._radiiSquared, result._radiiSquared);\n Cartesian3.clone(ellipsoid._radiiToTheFourth, result._radiiToTheFourth);\n Cartesian3.clone(ellipsoid._oneOverRadii, result._oneOverRadii);\n Cartesian3.clone(ellipsoid._oneOverRadiiSquared, result._oneOverRadiiSquared);\n result._minimumRadius = ellipsoid._minimumRadius;\n result._maximumRadius = ellipsoid._maximumRadius;\n result._centerToleranceSquared = ellipsoid._centerToleranceSquared;\n\n return result;\n};\n\n/**\n * Computes an Ellipsoid from a Cartesian specifying the radii in x, y, and z directions.\n *\n * @param {Cartesian3} [cartesian=Cartesian3.ZERO] The ellipsoid's radius in the x, y, and z directions.\n * @param {Ellipsoid} [result] The object onto which to store the result, or undefined if a new\n * instance should be created.\n * @returns {Ellipsoid} A new Ellipsoid instance.\n *\n * @exception {DeveloperError} All radii components must be greater than or equal to zero.\n *\n * @see Ellipsoid.WGS84\n * @see Ellipsoid.UNIT_SPHERE\n */\nEllipsoid.fromCartesian3 = function (cartesian, result) {\n if (!defined(result)) {\n result = new Ellipsoid();\n }\n\n if (!defined(cartesian)) {\n return result;\n }\n\n initialize(result, cartesian.x, cartesian.y, cartesian.z);\n return result;\n};\n\n/**\n * An Ellipsoid instance initialized to the WGS84 standard.\n *\n * @type {Ellipsoid}\n * @constant\n */\nEllipsoid.WGS84 = Object.freeze(\n new Ellipsoid(6378137.0, 6378137.0, 6356752.3142451793),\n);\n\n/**\n * An Ellipsoid instance initialized to radii of (1.0, 1.0, 1.0).\n *\n * @type {Ellipsoid}\n * @constant\n */\nEllipsoid.UNIT_SPHERE = Object.freeze(new Ellipsoid(1.0, 1.0, 1.0));\n\n/**\n * An Ellipsoid instance initialized to a sphere with the lunar radius.\n *\n * @type {Ellipsoid}\n * @constant\n */\nEllipsoid.MOON = Object.freeze(\n new Ellipsoid(\n CesiumMath.LUNAR_RADIUS,\n CesiumMath.LUNAR_RADIUS,\n CesiumMath.LUNAR_RADIUS,\n ),\n);\n\nEllipsoid._default = Ellipsoid.WGS84;\nObject.defineProperties(Ellipsoid, {\n /**\n * The default ellipsoid used when not otherwise specified.\n * @memberof Ellipsoid\n * @type {Ellipsoid}\n * @example\n * Cesium.Ellipsoid.default = Cesium.Ellipsoid.MOON;\n *\n * // Apollo 11 landing site\n * const position = Cesium.Cartesian3.fromRadians(\n * 0.67416,\n * 23.47315,\n * );\n */\n default: {\n get: function () {\n return Ellipsoid._default;\n },\n set: function (value) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"value\", value);\n //>>includeEnd('debug');\n\n Ellipsoid._default = value;\n Cartesian3._ellipsoidRadiiSquared = value.radiiSquared;\n Cartographic._ellipsoidOneOverRadii = value.oneOverRadii;\n Cartographic._ellipsoidOneOverRadiiSquared = value.oneOverRadiiSquared;\n Cartographic._ellipsoidCenterToleranceSquared =\n value._centerToleranceSquared;\n },\n },\n});\n\n/**\n * Duplicates an Ellipsoid instance.\n *\n * @param {Ellipsoid} [result] The object onto which to store the result, or undefined if a new\n * instance should be created.\n * @returns {Ellipsoid} The cloned Ellipsoid.\n */\nEllipsoid.prototype.clone = function (result) {\n return Ellipsoid.clone(this, result);\n};\n\n/**\n * The number of elements used to pack the object into an array.\n * @type {number}\n */\nEllipsoid.packedLength = Cartesian3.packedLength;\n\n/**\n * Stores the provided instance into the provided array.\n *\n * @param {Ellipsoid} value The value to pack.\n * @param {number[]} array The array to pack into.\n * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.\n *\n * @returns {number[]} The array that was packed into\n */\nEllipsoid.pack = function (value, array, startingIndex) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"value\", value);\n Check.defined(\"array\", array);\n //>>includeEnd('debug');\n\n startingIndex = defaultValue(startingIndex, 0);\n\n Cartesian3.pack(value._radii, array, startingIndex);\n\n return array;\n};\n\n/**\n * Retrieves an instance from a packed array.\n *\n * @param {number[]} array The packed array.\n * @param {number} [startingIndex=0] The starting index of the element to be unpacked.\n * @param {Ellipsoid} [result] The object into which to store the result.\n * @returns {Ellipsoid} The modified result parameter or a new Ellipsoid instance if one was not provided.\n */\nEllipsoid.unpack = function (array, startingIndex, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.defined(\"array\", array);\n //>>includeEnd('debug');\n\n startingIndex = defaultValue(startingIndex, 0);\n\n const radii = Cartesian3.unpack(array, startingIndex);\n return Ellipsoid.fromCartesian3(radii, result);\n};\n\n/**\n * Computes the unit vector directed from the center of this ellipsoid toward the provided Cartesian position.\n * @function\n *\n * @param {Cartesian3} cartesian The Cartesian for which to to determine the geocentric normal.\n * @param {Cartesian3} [result] The object onto which to store the result.\n * @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if none was provided.\n */\nEllipsoid.prototype.geocentricSurfaceNormal = Cartesian3.normalize;\n\n/**\n * Computes the normal of the plane tangent to the surface of the ellipsoid at the provided position.\n *\n * @param {Cartographic} cartographic The cartographic position for which to to determine the geodetic normal.\n * @param {Cartesian3} [result] The object onto which to store the result.\n * @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if none was provided.\n */\nEllipsoid.prototype.geodeticSurfaceNormalCartographic = function (\n cartographic,\n result,\n) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"cartographic\", cartographic);\n //>>includeEnd('debug');\n\n const longitude = cartographic.longitude;\n const latitude = cartographic.latitude;\n const cosLatitude = Math.cos(latitude);\n\n const x = cosLatitude * Math.cos(longitude);\n const y = cosLatitude * Math.sin(longitude);\n const z = Math.sin(latitude);\n\n if (!defined(result)) {\n result = new Cartesian3();\n }\n result.x = x;\n result.y = y;\n result.z = z;\n return Cartesian3.normalize(result, result);\n};\n\n/**\n * Computes the normal of the plane tangent to the surface of the ellipsoid at the provided position.\n *\n * @param {Cartesian3} cartesian The Cartesian position for which to to determine the surface normal.\n * @param {Cartesian3} [result] The object onto which to store the result.\n * @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if none was provided, or undefined if a normal cannot be found.\n */\nEllipsoid.prototype.geodeticSurfaceNormal = function (cartesian, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"cartesian\", cartesian);\n if (isNaN(cartesian.x) || isNaN(cartesian.y) || isNaN(cartesian.z)) {\n throw new DeveloperError(\"cartesian has a NaN component\");\n }\n //>>includeEnd('debug');\n if (\n Cartesian3.equalsEpsilon(cartesian, Cartesian3.ZERO, CesiumMath.EPSILON14)\n ) {\n return undefined;\n }\n if (!defined(result)) {\n result = new Cartesian3();\n }\n result = Cartesian3.multiplyComponents(\n cartesian,\n this._oneOverRadiiSquared,\n result,\n );\n return Cartesian3.normalize(result, result);\n};\n\nconst cartographicToCartesianNormal = new Cartesian3();\nconst cartographicToCartesianK = new Cartesian3();\n\n/**\n * Converts the provided cartographic to Cartesian representation.\n *\n * @param {Cartographic} cartographic The cartographic position.\n * @param {Cartesian3} [result] The object onto which to store the result.\n * @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if none was provided.\n *\n * @example\n * //Create a Cartographic and determine it's Cartesian representation on a WGS84 ellipsoid.\n * const position = new Cesium.Cartographic(Cesium.Math.toRadians(21), Cesium.Math.toRadians(78), 5000);\n * const cartesianPosition = Cesium.Ellipsoid.WGS84.cartographicToCartesian(position);\n */\nEllipsoid.prototype.cartographicToCartesian = function (cartographic, result) {\n //`cartographic is required` is thrown from geodeticSurfaceNormalCartographic.\n const n = cartographicToCartesianNormal;\n const k = cartographicToCartesianK;\n this.geodeticSurfaceNormalCartographic(cartographic, n);\n Cartesian3.multiplyComponents(this._radiiSquared, n, k);\n const gamma = Math.sqrt(Cartesian3.dot(n, k));\n Cartesian3.divideByScalar(k, gamma, k);\n Cartesian3.multiplyByScalar(n, cartographic.height, n);\n\n if (!defined(result)) {\n result = new Cartesian3();\n }\n return Cartesian3.add(k, n, result);\n};\n\n/**\n * Converts the provided array of cartographics to an array of Cartesians.\n *\n * @param {Cartographic[]} cartographics An array of cartographic positions.\n * @param {Cartesian3[]} [result] The object onto which to store the result.\n * @returns {Cartesian3[]} The modified result parameter or a new Array instance if none was provided.\n *\n * @example\n * //Convert an array of Cartographics and determine their Cartesian representation on a WGS84 ellipsoid.\n * const positions = [new Cesium.Cartographic(Cesium.Math.toRadians(21), Cesium.Math.toRadians(78), 0),\n * new Cesium.Cartographic(Cesium.Math.toRadians(21.321), Cesium.Math.toRadians(78.123), 100),\n * new Cesium.Cartographic(Cesium.Math.toRadians(21.645), Cesium.Math.toRadians(78.456), 250)];\n * const cartesianPositions = Cesium.Ellipsoid.WGS84.cartographicArrayToCartesianArray(positions);\n */\nEllipsoid.prototype.cartographicArrayToCartesianArray = function (\n cartographics,\n result,\n) {\n //>>includeStart('debug', pragmas.debug);\n Check.defined(\"cartographics\", cartographics);\n //>>includeEnd('debug')\n\n const length = cartographics.length;\n if (!defined(result)) {\n result = new Array(length);\n } else {\n result.length = length;\n }\n for (let i = 0; i < length; i++) {\n result[i] = this.cartographicToCartesian(cartographics[i], result[i]);\n }\n return result;\n};\n\nconst cartesianToCartographicN = new Cartesian3();\nconst cartesianToCartographicP = new Cartesian3();\nconst cartesianToCartographicH = new Cartesian3();\n\n/**\n * Converts the provided cartesian to cartographic representation.\n * The cartesian is undefined at the center of the ellipsoid.\n *\n * @param {Cartesian3} cartesian The Cartesian position to convert to cartographic representation.\n * @param {Cartographic} [result] The object onto which to store the result.\n * @returns {Cartographic} The modified result parameter, new Cartographic instance if none was provided, or undefined if the cartesian is at the center of the ellipsoid.\n *\n * @example\n * //Create a Cartesian and determine it's Cartographic representation on a WGS84 ellipsoid.\n * const position = new Cesium.Cartesian3(17832.12, 83234.52, 952313.73);\n * const cartographicPosition = Cesium.Ellipsoid.WGS84.cartesianToCartographic(position);\n */\nEllipsoid.prototype.cartesianToCartographic = function (cartesian, result) {\n //`cartesian is required.` is thrown from scaleToGeodeticSurface\n const p = this.scaleToGeodeticSurface(cartesian, cartesianToCartographicP);\n\n if (!defined(p)) {\n return undefined;\n }\n\n const n = this.geodeticSurfaceNormal(p, cartesianToCartographicN);\n const h = Cartesian3.subtract(cartesian, p, cartesianToCartographicH);\n\n const longitude = Math.atan2(n.y, n.x);\n const latitude = Math.asin(n.z);\n const height =\n CesiumMath.sign(Cartesian3.dot(h, cartesian)) * Cartesian3.magnitude(h);\n\n if (!defined(result)) {\n return new Cartographic(longitude, latitude, height);\n }\n result.longitude = longitude;\n result.latitude = latitude;\n result.height = height;\n return result;\n};\n\n/**\n * Converts the provided array of cartesians to an array of cartographics.\n *\n * @param {Cartesian3[]} cartesians An array of Cartesian positions.\n * @param {Cartographic[]} [result] The object onto which to store the result.\n * @returns {Cartographic[]} The modified result parameter or a new Array instance if none was provided.\n *\n * @example\n * //Create an array of Cartesians and determine their Cartographic representation on a WGS84 ellipsoid.\n * const positions = [new Cesium.Cartesian3(17832.12, 83234.52, 952313.73),\n * new Cesium.Cartesian3(17832.13, 83234.53, 952313.73),\n * new Cesium.Cartesian3(17832.14, 83234.54, 952313.73)]\n * const cartographicPositions = Cesium.Ellipsoid.WGS84.cartesianArrayToCartographicArray(positions);\n */\nEllipsoid.prototype.cartesianArrayToCartographicArray = function (\n cartesians,\n result,\n) {\n //>>includeStart('debug', pragmas.debug);\n Check.defined(\"cartesians\", cartesians);\n //>>includeEnd('debug');\n\n const length = cartesians.length;\n if (!defined(result)) {\n result = new Array(length);\n } else {\n result.length = length;\n }\n for (let i = 0; i < length; ++i) {\n result[i] = this.cartesianToCartographic(cartesians[i], result[i]);\n }\n return result;\n};\n\n/**\n * Scales the provided Cartesian position along the geodetic surface normal\n * so that it is on the surface of this ellipsoid. If the position is\n * at the center of the ellipsoid, this function returns undefined.\n *\n * @param {Cartesian3} cartesian The Cartesian position to scale.\n * @param {Cartesian3} [result] The object onto which to store the result.\n * @returns {Cartesian3} The modified result parameter, a new Cartesian3 instance if none was provided, or undefined if the position is at the center.\n */\nEllipsoid.prototype.scaleToGeodeticSurface = function (cartesian, result) {\n return scaleToGeodeticSurface(\n cartesian,\n this._oneOverRadii,\n this._oneOverRadiiSquared,\n this._centerToleranceSquared,\n result,\n );\n};\n\n/**\n * Scales the provided Cartesian position along the geocentric surface normal\n * so that it is on the surface of this ellipsoid.\n *\n * @param {Cartesian3} cartesian The Cartesian position to scale.\n * @param {Cartesian3} [result] The object onto which to store the result.\n * @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if none was provided.\n */\nEllipsoid.prototype.scaleToGeocentricSurface = function (cartesian, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"cartesian\", cartesian);\n //>>includeEnd('debug');\n\n if (!defined(result)) {\n result = new Cartesian3();\n }\n\n const positionX = cartesian.x;\n const positionY = cartesian.y;\n const positionZ = cartesian.z;\n const oneOverRadiiSquared = this._oneOverRadiiSquared;\n\n const beta =\n 1.0 /\n Math.sqrt(\n positionX * positionX * oneOverRadiiSquared.x +\n positionY * positionY * oneOverRadiiSquared.y +\n positionZ * positionZ * oneOverRadiiSquared.z,\n );\n\n return Cartesian3.multiplyByScalar(cartesian, beta, result);\n};\n\n/**\n * Transforms a Cartesian X, Y, Z position to the ellipsoid-scaled space by multiplying\n * its components by the result of {@link Ellipsoid#oneOverRadii}.\n *\n * @param {Cartesian3} position The position to transform.\n * @param {Cartesian3} [result] The position to which to copy the result, or undefined to create and\n * return a new instance.\n * @returns {Cartesian3} The position expressed in the scaled space. The returned instance is the\n * one passed as the result parameter if it is not undefined, or a new instance of it is.\n */\nEllipsoid.prototype.transformPositionToScaledSpace = function (\n position,\n result,\n) {\n if (!defined(result)) {\n result = new Cartesian3();\n }\n\n return Cartesian3.multiplyComponents(position, this._oneOverRadii, result);\n};\n\n/**\n * Transforms a Cartesian X, Y, Z position from the ellipsoid-scaled space by multiplying\n * its components by the result of {@link Ellipsoid#radii}.\n *\n * @param {Cartesian3} position The position to transform.\n * @param {Cartesian3} [result] The position to which to copy the result, or undefined to create and\n * return a new instance.\n * @returns {Cartesian3} The position expressed in the unscaled space. The returned instance is the\n * one passed as the result parameter if it is not undefined, or a new instance of it is.\n */\nEllipsoid.prototype.transformPositionFromScaledSpace = function (\n position,\n result,\n) {\n if (!defined(result)) {\n result = new Cartesian3();\n }\n\n return Cartesian3.multiplyComponents(position, this._radii, result);\n};\n\n/**\n * Compares this Ellipsoid against the provided Ellipsoid componentwise and returns\n * true if they are equal, false otherwise.\n *\n * @param {Ellipsoid} [right] The other Ellipsoid.\n * @returns {boolean} true if they are equal, false otherwise.\n */\nEllipsoid.prototype.equals = function (right) {\n return (\n this === right ||\n (defined(right) && Cartesian3.equals(this._radii, right._radii))\n );\n};\n\n/**\n * Creates a string representing this Ellipsoid in the format '(radii.x, radii.y, radii.z)'.\n *\n * @returns {string} A string representing this ellipsoid in the format '(radii.x, radii.y, radii.z)'.\n */\nEllipsoid.prototype.toString = function () {\n return this._radii.toString();\n};\n\n/**\n * Computes a point which is the intersection of the surface normal with the z-axis.\n *\n * @param {Cartesian3} position the position. must be on the surface of the ellipsoid.\n * @param {number} [buffer = 0.0] A buffer to subtract from the ellipsoid size when checking if the point is inside the ellipsoid.\n * In earth case, with common earth datums, there is no need for this buffer since the intersection point is always (relatively) very close to the center.\n * In WGS84 datum, intersection point is at max z = +-42841.31151331382 (0.673% of z-axis).\n * Intersection point could be outside the ellipsoid if the ratio of MajorAxis / AxisOfRotation is bigger than the square root of 2\n * @param {Cartesian3} [result] The cartesian to which to copy the result, or undefined to create and\n * return a new instance.\n * @returns {Cartesian3 | undefined} the intersection point if it's inside the ellipsoid, undefined otherwise\n *\n * @exception {DeveloperError} position is required.\n * @exception {DeveloperError} Ellipsoid must be an ellipsoid of revolution (radii.x == radii.y).\n * @exception {DeveloperError} Ellipsoid.radii.z must be greater than 0.\n */\nEllipsoid.prototype.getSurfaceNormalIntersectionWithZAxis = function (\n position,\n buffer,\n result,\n) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"position\", position);\n\n if (\n !CesiumMath.equalsEpsilon(\n this._radii.x,\n this._radii.y,\n CesiumMath.EPSILON15,\n )\n ) {\n throw new DeveloperError(\n \"Ellipsoid must be an ellipsoid of revolution (radii.x == radii.y)\",\n );\n }\n\n Check.typeOf.number.greaterThan(\"Ellipsoid.radii.z\", this._radii.z, 0);\n //>>includeEnd('debug');\n\n buffer = defaultValue(buffer, 0.0);\n\n const squaredXOverSquaredZ = this._squaredXOverSquaredZ;\n\n if (!defined(result)) {\n result = new Cartesian3();\n }\n\n result.x = 0.0;\n result.y = 0.0;\n result.z = position.z * (1 - squaredXOverSquaredZ);\n\n if (Math.abs(result.z) >= this._radii.z - buffer) {\n return undefined;\n }\n\n return result;\n};\n\nconst scratchEndpoint = new Cartesian3();\n\n/**\n * Computes the ellipsoid curvatures at a given position on the surface.\n *\n * @param {Cartesian3} surfacePosition The position on the ellipsoid surface where curvatures will be calculated.\n * @param {Cartesian2} [result] The cartesian to which to copy the result, or undefined to create and return a new instance.\n * @returns {Cartesian2} The local curvature of the ellipsoid surface at the provided position, in east and north directions.\n *\n * @exception {DeveloperError} position is required.\n */\nEllipsoid.prototype.getLocalCurvature = function (surfacePosition, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"surfacePosition\", surfacePosition);\n //>>includeEnd('debug');\n\n if (!defined(result)) {\n result = new Cartesian2();\n }\n\n const primeVerticalEndpoint = this.getSurfaceNormalIntersectionWithZAxis(\n surfacePosition,\n 0.0,\n scratchEndpoint,\n );\n const primeVerticalRadius = Cartesian3.distance(\n surfacePosition,\n primeVerticalEndpoint,\n );\n // meridional radius = (1 - e^2) * primeVerticalRadius^3 / a^2\n // where 1 - e^2 = b^2 / a^2,\n // so meridional = b^2 * primeVerticalRadius^3 / a^4\n // = (b * primeVerticalRadius / a^2)^2 * primeVertical\n const radiusRatio =\n (this.minimumRadius * primeVerticalRadius) / this.maximumRadius ** 2;\n const meridionalRadius = primeVerticalRadius * radiusRatio ** 2;\n\n return Cartesian2.fromElements(\n 1.0 / primeVerticalRadius,\n 1.0 / meridionalRadius,\n result,\n );\n};\n\nconst abscissas = [\n 0.14887433898163, 0.43339539412925, 0.67940956829902, 0.86506336668898,\n 0.97390652851717, 0.0,\n];\nconst weights = [\n 0.29552422471475, 0.26926671930999, 0.21908636251598, 0.14945134915058,\n 0.066671344308684, 0.0,\n];\n\n/**\n * Compute the 10th order Gauss-Legendre Quadrature of the given definite integral.\n *\n * @param {number} a The lower bound for the integration.\n * @param {number} b The upper bound for the integration.\n * @param {Ellipsoid~RealValuedScalarFunction} func The function to integrate.\n * @returns {number} The value of the integral of the given function over the given domain.\n *\n * @private\n */\nfunction gaussLegendreQuadrature(a, b, func) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.number(\"a\", a);\n Check.typeOf.number(\"b\", b);\n Check.typeOf.func(\"func\", func);\n //>>includeEnd('debug');\n\n // The range is half of the normal range since the five weights add to one (ten weights add to two).\n // The values of the abscissas are multiplied by two to account for this.\n const xMean = 0.5 * (b + a);\n const xRange = 0.5 * (b - a);\n\n let sum = 0.0;\n for (let i = 0; i < 5; i++) {\n const dx = xRange * abscissas[i];\n sum += weights[i] * (func(xMean + dx) + func(xMean - dx));\n }\n\n // Scale the sum to the range of x.\n sum *= xRange;\n return sum;\n}\n\n/**\n * A real valued scalar function.\n * @callback Ellipsoid~RealValuedScalarFunction\n *\n * @param {number} x The value used to evaluate the function.\n * @returns {number} The value of the function at x.\n *\n * @private\n */\n\n/**\n * Computes an approximation of the surface area of a rectangle on the surface of an ellipsoid using\n * Gauss-Legendre 10th order quadrature.\n *\n * @param {Rectangle} rectangle The rectangle used for computing the surface area.\n * @returns {number} The approximate area of the rectangle on the surface of this ellipsoid.\n */\nEllipsoid.prototype.surfaceArea = function (rectangle) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"rectangle\", rectangle);\n //>>includeEnd('debug');\n const minLongitude = rectangle.west;\n let maxLongitude = rectangle.east;\n const minLatitude = rectangle.south;\n const maxLatitude = rectangle.north;\n\n while (maxLongitude < minLongitude) {\n maxLongitude += CesiumMath.TWO_PI;\n }\n\n const radiiSquared = this._radiiSquared;\n const a2 = radiiSquared.x;\n const b2 = radiiSquared.y;\n const c2 = radiiSquared.z;\n const a2b2 = a2 * b2;\n return gaussLegendreQuadrature(minLatitude, maxLatitude, function (lat) {\n // phi represents the angle measured from the north pole\n // sin(phi) = sin(pi / 2 - lat) = cos(lat), cos(phi) is similar\n const sinPhi = Math.cos(lat);\n const cosPhi = Math.sin(lat);\n return (\n Math.cos(lat) *\n gaussLegendreQuadrature(minLongitude, maxLongitude, function (lon) {\n const cosTheta = Math.cos(lon);\n const sinTheta = Math.sin(lon);\n return Math.sqrt(\n a2b2 * cosPhi * cosPhi +\n c2 *\n (b2 * cosTheta * cosTheta + a2 * sinTheta * sinTheta) *\n sinPhi *\n sinPhi,\n );\n })\n );\n });\n};\n\nexport default Ellipsoid;\n","import Cartesian3 from \"./Cartesian3.js\";\nimport Check from \"./Check.js\";\nimport defaultValue from \"./defaultValue.js\";\nimport defined from \"./defined.js\";\nimport CesiumMath from \"./Math.js\";\nimport scaleToGeodeticSurface from \"./scaleToGeodeticSurface.js\";\n\n/**\n * A position defined by longitude, latitude, and height.\n * @alias Cartographic\n * @constructor\n *\n * @param {number} [longitude=0.0] The longitude, in radians.\n * @param {number} [latitude=0.0] The latitude, in radians.\n * @param {number} [height=0.0] The height, in meters, above the ellipsoid.\n *\n * @see Ellipsoid\n */\nfunction Cartographic(longitude, latitude, height) {\n /**\n * The longitude, in radians.\n * @type {number}\n * @default 0.0\n */\n this.longitude = defaultValue(longitude, 0.0);\n\n /**\n * The latitude, in radians.\n * @type {number}\n * @default 0.0\n */\n this.latitude = defaultValue(latitude, 0.0);\n\n /**\n * The height, in meters, above the ellipsoid.\n * @type {number}\n * @default 0.0\n */\n this.height = defaultValue(height, 0.0);\n}\n\n/**\n * Creates a new Cartographic instance from longitude and latitude\n * specified in radians.\n *\n * @param {number} longitude The longitude, in radians.\n * @param {number} latitude The latitude, in radians.\n * @param {number} [height=0.0] The height, in meters, above the ellipsoid.\n * @param {Cartographic} [result] The object onto which to store the result.\n * @returns {Cartographic} The modified result parameter or a new Cartographic instance if one was not provided.\n */\nCartographic.fromRadians = function (longitude, latitude, height, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.number(\"longitude\", longitude);\n Check.typeOf.number(\"latitude\", latitude);\n //>>includeEnd('debug');\n\n height = defaultValue(height, 0.0);\n\n if (!defined(result)) {\n return new Cartographic(longitude, latitude, height);\n }\n\n result.longitude = longitude;\n result.latitude = latitude;\n result.height = height;\n return result;\n};\n\n/**\n * Creates a new Cartographic instance from longitude and latitude\n * specified in degrees. The values in the resulting object will\n * be in radians.\n *\n * @param {number} longitude The longitude, in degrees.\n * @param {number} latitude The latitude, in degrees.\n * @param {number} [height=0.0] The height, in meters, above the ellipsoid.\n * @param {Cartographic} [result] The object onto which to store the result.\n * @returns {Cartographic} The modified result parameter or a new Cartographic instance if one was not provided.\n */\nCartographic.fromDegrees = function (longitude, latitude, height, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.number(\"longitude\", longitude);\n Check.typeOf.number(\"latitude\", latitude);\n //>>includeEnd('debug');\n\n longitude = CesiumMath.toRadians(longitude);\n latitude = CesiumMath.toRadians(latitude);\n\n return Cartographic.fromRadians(longitude, latitude, height, result);\n};\n\nconst cartesianToCartographicN = new Cartesian3();\nconst cartesianToCartographicP = new Cartesian3();\nconst cartesianToCartographicH = new Cartesian3();\n\n// To avoid circular dependencies, these are set by Ellipsoid when Ellipsoid.default is set.\nCartographic._ellipsoidOneOverRadii = new Cartesian3(\n 1.0 / 6378137.0,\n 1.0 / 6378137.0,\n 1.0 / 6356752.3142451793,\n);\nCartographic._ellipsoidOneOverRadiiSquared = new Cartesian3(\n 1.0 / (6378137.0 * 6378137.0),\n 1.0 / (6378137.0 * 6378137.0),\n 1.0 / (6356752.3142451793 * 6356752.3142451793),\n);\nCartographic._ellipsoidCenterToleranceSquared = CesiumMath.EPSILON1;\n\n/**\n * Creates a new Cartographic instance from a Cartesian position. The values in the\n * resulting object will be in radians.\n *\n * @param {Cartesian3} cartesian The Cartesian position to convert to cartographic representation.\n * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid on which the position lies.\n * @param {Cartographic} [result] The object onto which to store the result.\n * @returns {Cartographic} The modified result parameter, new Cartographic instance if none was provided, or undefined if the cartesian is at the center of the ellipsoid.\n */\nCartographic.fromCartesian = function (cartesian, ellipsoid, result) {\n const oneOverRadii = defined(ellipsoid)\n ? ellipsoid.oneOverRadii\n : Cartographic._ellipsoidOneOverRadii;\n const oneOverRadiiSquared = defined(ellipsoid)\n ? ellipsoid.oneOverRadiiSquared\n : Cartographic._ellipsoidOneOverRadiiSquared;\n const centerToleranceSquared = defined(ellipsoid)\n ? ellipsoid._centerToleranceSquared\n : Cartographic._ellipsoidCenterToleranceSquared;\n\n //`cartesian is required.` is thrown from scaleToGeodeticSurface\n const p = scaleToGeodeticSurface(\n cartesian,\n oneOverRadii,\n oneOverRadiiSquared,\n centerToleranceSquared,\n cartesianToCartographicP,\n );\n\n if (!defined(p)) {\n return undefined;\n }\n\n let n = Cartesian3.multiplyComponents(\n p,\n oneOverRadiiSquared,\n cartesianToCartographicN,\n );\n n = Cartesian3.normalize(n, n);\n\n const h = Cartesian3.subtract(cartesian, p, cartesianToCartographicH);\n\n const longitude = Math.atan2(n.y, n.x);\n const latitude = Math.asin(n.z);\n const height =\n CesiumMath.sign(Cartesian3.dot(h, cartesian)) * Cartesian3.magnitude(h);\n\n if (!defined(result)) {\n return new Cartographic(longitude, latitude, height);\n }\n result.longitude = longitude;\n result.latitude = latitude;\n result.height = height;\n return result;\n};\n\n/**\n * Creates a new Cartesian3 instance from a Cartographic input. The values in the inputted\n * object should be in radians.\n *\n * @param {Cartographic} cartographic Input to be converted into a Cartesian3 output.\n * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid on which the position lies.\n * @param {Cartesian3} [result] The object onto which to store the result.\n * @returns {Cartesian3} The position\n */\nCartographic.toCartesian = function (cartographic, ellipsoid, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.defined(\"cartographic\", cartographic);\n //>>includeEnd('debug');\n\n return Cartesian3.fromRadians(\n cartographic.longitude,\n cartographic.latitude,\n cartographic.height,\n ellipsoid,\n result,\n );\n};\n\n/**\n * Duplicates a Cartographic instance.\n *\n * @param {Cartographic} cartographic The cartographic to duplicate.\n * @param {Cartographic} [result] The object onto which to store the result.\n * @returns {Cartographic} The modified result parameter or a new Cartographic instance if one was not provided. (Returns undefined if cartographic is undefined)\n */\nCartographic.clone = function (cartographic, result) {\n if (!defined(cartographic)) {\n return undefined;\n }\n if (!defined(result)) {\n return new Cartographic(\n cartographic.longitude,\n cartographic.latitude,\n cartographic.height,\n );\n }\n result.longitude = cartographic.longitude;\n result.latitude = cartographic.latitude;\n result.height = cartographic.height;\n return result;\n};\n\n/**\n * Compares the provided cartographics componentwise and returns\n * true if they are equal, false otherwise.\n *\n * @param {Cartographic} [left] The first cartographic.\n * @param {Cartographic} [right] The second cartographic.\n * @returns {boolean} true if left and right are equal, false otherwise.\n */\nCartographic.equals = function (left, right) {\n return (\n left === right ||\n (defined(left) &&\n defined(right) &&\n left.longitude === right.longitude &&\n left.latitude === right.latitude &&\n left.height === right.height)\n );\n};\n\n/**\n * Compares the provided cartographics componentwise and returns\n * true if they are within the provided epsilon,\n * false otherwise.\n *\n * @param {Cartographic} [left] The first cartographic.\n * @param {Cartographic} [right] The second cartographic.\n * @param {number} [epsilon=0] The epsilon to use for equality testing.\n * @returns {boolean} true if left and right are within the provided epsilon, false otherwise.\n */\nCartographic.equalsEpsilon = function (left, right, epsilon) {\n epsilon = defaultValue(epsilon, 0);\n\n return (\n left === right ||\n (defined(left) &&\n defined(right) &&\n Math.abs(left.longitude - right.longitude) <= epsilon &&\n Math.abs(left.latitude - right.latitude) <= epsilon &&\n Math.abs(left.height - right.height) <= epsilon)\n );\n};\n\n/**\n * An immutable Cartographic instance initialized to (0.0, 0.0, 0.0).\n *\n * @type {Cartographic}\n * @constant\n */\nCartographic.ZERO = Object.freeze(new Cartographic(0.0, 0.0, 0.0));\n\n/**\n * Duplicates this instance.\n *\n * @param {Cartographic} [result] The object onto which to store the result.\n * @returns {Cartographic} The modified result parameter or a new Cartographic instance if one was not provided.\n */\nCartographic.prototype.clone = function (result) {\n return Cartographic.clone(this, result);\n};\n\n/**\n * Compares the provided against this cartographic componentwise and returns\n * true if they are equal, false otherwise.\n *\n * @param {Cartographic} [right] The second cartographic.\n * @returns {boolean} true if left and right are equal, false otherwise.\n */\nCartographic.prototype.equals = function (right) {\n return Cartographic.equals(this, right);\n};\n\n/**\n * Compares the provided against this cartographic componentwise and returns\n * true if they are within the provided epsilon,\n * false otherwise.\n *\n * @param {Cartographic} [right] The second cartographic.\n * @param {number} [epsilon=0] The epsilon to use for equality testing.\n * @returns {boolean} true if left and right are within the provided epsilon, false otherwise.\n */\nCartographic.prototype.equalsEpsilon = function (right, epsilon) {\n return Cartographic.equalsEpsilon(this, right, epsilon);\n};\n\n/**\n * Creates a string representing this cartographic in the format '(longitude, latitude, height)'.\n *\n * @returns {string} A string representing the provided cartographic in the format '(longitude, latitude, height)'.\n */\nCartographic.prototype.toString = function () {\n return `(${this.longitude}, ${this.latitude}, ${this.height})`;\n};\nexport default Cartographic;\n","import Cartesian3 from \"./Cartesian3.js\";\nimport defined from \"./defined.js\";\nimport DeveloperError from \"./DeveloperError.js\";\nimport CesiumMath from \"./Math.js\";\n\nconst scaleToGeodeticSurfaceIntersection = new Cartesian3();\nconst scaleToGeodeticSurfaceGradient = new Cartesian3();\n\n/**\n * Scales the provided Cartesian position along the geodetic surface normal\n * so that it is on the surface of this ellipsoid. If the position is\n * at the center of the ellipsoid, this function returns undefined.\n *\n * @param {Cartesian3} cartesian The Cartesian position to scale.\n * @param {Cartesian3} oneOverRadii One over radii of the ellipsoid.\n * @param {Cartesian3} oneOverRadiiSquared One over radii squared of the ellipsoid.\n * @param {number} centerToleranceSquared Tolerance for closeness to the center.\n * @param {Cartesian3} [result] The object onto which to store the result.\n * @returns {Cartesian3} The modified result parameter, a new Cartesian3 instance if none was provided, or undefined if the position is at the center.\n *\n * @function scaleToGeodeticSurface\n *\n * @private\n */\nfunction scaleToGeodeticSurface(\n cartesian,\n oneOverRadii,\n oneOverRadiiSquared,\n centerToleranceSquared,\n result,\n) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(cartesian)) {\n throw new DeveloperError(\"cartesian is required.\");\n }\n if (!defined(oneOverRadii)) {\n throw new DeveloperError(\"oneOverRadii is required.\");\n }\n if (!defined(oneOverRadiiSquared)) {\n throw new DeveloperError(\"oneOverRadiiSquared is required.\");\n }\n if (!defined(centerToleranceSquared)) {\n throw new DeveloperError(\"centerToleranceSquared is required.\");\n }\n //>>includeEnd('debug');\n\n const positionX = cartesian.x;\n const positionY = cartesian.y;\n const positionZ = cartesian.z;\n\n const oneOverRadiiX = oneOverRadii.x;\n const oneOverRadiiY = oneOverRadii.y;\n const oneOverRadiiZ = oneOverRadii.z;\n\n const x2 = positionX * positionX * oneOverRadiiX * oneOverRadiiX;\n const y2 = positionY * positionY * oneOverRadiiY * oneOverRadiiY;\n const z2 = positionZ * positionZ * oneOverRadiiZ * oneOverRadiiZ;\n\n // Compute the squared ellipsoid norm.\n const squaredNorm = x2 + y2 + z2;\n const ratio = Math.sqrt(1.0 / squaredNorm);\n\n // As an initial approximation, assume that the radial intersection is the projection point.\n const intersection = Cartesian3.multiplyByScalar(\n cartesian,\n ratio,\n scaleToGeodeticSurfaceIntersection,\n );\n\n // If the position is near the center, the iteration will not converge.\n if (squaredNorm < centerToleranceSquared) {\n return !isFinite(ratio)\n ? undefined\n : Cartesian3.clone(intersection, result);\n }\n\n const oneOverRadiiSquaredX = oneOverRadiiSquared.x;\n const oneOverRadiiSquaredY = oneOverRadiiSquared.y;\n const oneOverRadiiSquaredZ = oneOverRadiiSquared.z;\n\n // Use the gradient at the intersection point in place of the true unit normal.\n // The difference in magnitude will be absorbed in the multiplier.\n const gradient = scaleToGeodeticSurfaceGradient;\n gradient.x = intersection.x * oneOverRadiiSquaredX * 2.0;\n gradient.y = intersection.y * oneOverRadiiSquaredY * 2.0;\n gradient.z = intersection.z * oneOverRadiiSquaredZ * 2.0;\n\n // Compute the initial guess at the normal vector multiplier, lambda.\n let lambda =\n ((1.0 - ratio) * Cartesian3.magnitude(cartesian)) /\n (0.5 * Cartesian3.magnitude(gradient));\n let correction = 0.0;\n\n let func;\n let denominator;\n let xMultiplier;\n let yMultiplier;\n let zMultiplier;\n let xMultiplier2;\n let yMultiplier2;\n let zMultiplier2;\n let xMultiplier3;\n let yMultiplier3;\n let zMultiplier3;\n\n do {\n lambda -= correction;\n\n xMultiplier = 1.0 / (1.0 + lambda * oneOverRadiiSquaredX);\n yMultiplier = 1.0 / (1.0 + lambda * oneOverRadiiSquaredY);\n zMultiplier = 1.0 / (1.0 + lambda * oneOverRadiiSquaredZ);\n\n xMultiplier2 = xMultiplier * xMultiplier;\n yMultiplier2 = yMultiplier * yMultiplier;\n zMultiplier2 = zMultiplier * zMultiplier;\n\n xMultiplier3 = xMultiplier2 * xMultiplier;\n yMultiplier3 = yMultiplier2 * yMultiplier;\n zMultiplier3 = zMultiplier2 * zMultiplier;\n\n func = x2 * xMultiplier2 + y2 * yMultiplier2 + z2 * zMultiplier2 - 1.0;\n\n // \"denominator\" here refers to the use of this expression in the velocity and acceleration\n // computations in the sections to follow.\n denominator =\n x2 * xMultiplier3 * oneOverRadiiSquaredX +\n y2 * yMultiplier3 * oneOverRadiiSquaredY +\n z2 * zMultiplier3 * oneOverRadiiSquaredZ;\n\n const derivative = -2.0 * denominator;\n\n correction = func / derivative;\n } while (Math.abs(func) > CesiumMath.EPSILON12);\n\n if (!defined(result)) {\n return new Cartesian3(\n positionX * xMultiplier,\n positionY * yMultiplier,\n positionZ * zMultiplier,\n );\n }\n result.x = positionX * xMultiplier;\n result.y = positionY * yMultiplier;\n result.z = positionZ * zMultiplier;\n return result;\n}\nexport default scaleToGeodeticSurface;\n","import Cartesian3 from \"./Cartesian3.js\";\nimport Cartesian4 from \"./Cartesian4.js\";\nimport Check from \"./Check.js\";\nimport defaultValue from \"./defaultValue.js\";\nimport defined from \"./defined.js\";\nimport DeveloperError from \"./DeveloperError.js\";\nimport CesiumMath from \"./Math.js\";\nimport Matrix3 from \"./Matrix3.js\";\nimport RuntimeError from \"./RuntimeError.js\";\n\n/**\n * A 4x4 matrix, indexable as a column-major order array.\n * Constructor parameters are in row-major order for code readability.\n * @alias Matrix4\n * @constructor\n * @implements {ArrayLike}\n *\n * @param {number} [column0Row0=0.0] The value for column 0, row 0.\n * @param {number} [column1Row0=0.0] The value for column 1, row 0.\n * @param {number} [column2Row0=0.0] The value for column 2, row 0.\n * @param {number} [column3Row0=0.0] The value for column 3, row 0.\n * @param {number} [column0Row1=0.0] The value for column 0, row 1.\n * @param {number} [column1Row1=0.0] The value for column 1, row 1.\n * @param {number} [column2Row1=0.0] The value for column 2, row 1.\n * @param {number} [column3Row1=0.0] The value for column 3, row 1.\n * @param {number} [column0Row2=0.0] The value for column 0, row 2.\n * @param {number} [column1Row2=0.0] The value for column 1, row 2.\n * @param {number} [column2Row2=0.0] The value for column 2, row 2.\n * @param {number} [column3Row2=0.0] The value for column 3, row 2.\n * @param {number} [column0Row3=0.0] The value for column 0, row 3.\n * @param {number} [column1Row3=0.0] The value for column 1, row 3.\n * @param {number} [column2Row3=0.0] The value for column 2, row 3.\n * @param {number} [column3Row3=0.0] The value for column 3, row 3.\n *\n * @see Matrix4.fromArray\n * @see Matrix4.fromColumnMajorArray\n * @see Matrix4.fromRowMajorArray\n * @see Matrix4.fromRotationTranslation\n * @see Matrix4.fromTranslationQuaternionRotationScale\n * @see Matrix4.fromTranslationRotationScale\n * @see Matrix4.fromTranslation\n * @see Matrix4.fromScale\n * @see Matrix4.fromUniformScale\n * @see Matrix4.fromRotation\n * @see Matrix4.fromCamera\n * @see Matrix4.computePerspectiveFieldOfView\n * @see Matrix4.computeOrthographicOffCenter\n * @see Matrix4.computePerspectiveOffCenter\n * @see Matrix4.computeInfinitePerspectiveOffCenter\n * @see Matrix4.computeViewportTransformation\n * @see Matrix4.computeView\n * @see Matrix2\n * @see Matrix3\n * @see Packable\n */\nfunction Matrix4(\n column0Row0,\n column1Row0,\n column2Row0,\n column3Row0,\n column0Row1,\n column1Row1,\n column2Row1,\n column3Row1,\n column0Row2,\n column1Row2,\n column2Row2,\n column3Row2,\n column0Row3,\n column1Row3,\n column2Row3,\n column3Row3,\n) {\n this[0] = defaultValue(column0Row0, 0.0);\n this[1] = defaultValue(column0Row1, 0.0);\n this[2] = defaultValue(column0Row2, 0.0);\n this[3] = defaultValue(column0Row3, 0.0);\n this[4] = defaultValue(column1Row0, 0.0);\n this[5] = defaultValue(column1Row1, 0.0);\n this[6] = defaultValue(column1Row2, 0.0);\n this[7] = defaultValue(column1Row3, 0.0);\n this[8] = defaultValue(column2Row0, 0.0);\n this[9] = defaultValue(column2Row1, 0.0);\n this[10] = defaultValue(column2Row2, 0.0);\n this[11] = defaultValue(column2Row3, 0.0);\n this[12] = defaultValue(column3Row0, 0.0);\n this[13] = defaultValue(column3Row1, 0.0);\n this[14] = defaultValue(column3Row2, 0.0);\n this[15] = defaultValue(column3Row3, 0.0);\n}\n\n/**\n * The number of elements used to pack the object into an array.\n * @type {number}\n */\nMatrix4.packedLength = 16;\n\n/**\n * Stores the provided instance into the provided array.\n *\n * @param {Matrix4} value The value to pack.\n * @param {number[]} array The array to pack into.\n * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.\n *\n * @returns {number[]} The array that was packed into\n */\nMatrix4.pack = function (value, array, startingIndex) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"value\", value);\n Check.defined(\"array\", array);\n //>>includeEnd('debug');\n\n startingIndex = defaultValue(startingIndex, 0);\n\n array[startingIndex++] = value[0];\n array[startingIndex++] = value[1];\n array[startingIndex++] = value[2];\n array[startingIndex++] = value[3];\n array[startingIndex++] = value[4];\n array[startingIndex++] = value[5];\n array[startingIndex++] = value[6];\n array[startingIndex++] = value[7];\n array[startingIndex++] = value[8];\n array[startingIndex++] = value[9];\n array[startingIndex++] = value[10];\n array[startingIndex++] = value[11];\n array[startingIndex++] = value[12];\n array[startingIndex++] = value[13];\n array[startingIndex++] = value[14];\n array[startingIndex] = value[15];\n\n return array;\n};\n\n/**\n * Retrieves an instance from a packed array.\n *\n * @param {number[]} array The packed array.\n * @param {number} [startingIndex=0] The starting index of the element to be unpacked.\n * @param {Matrix4} [result] The object into which to store the result.\n * @returns {Matrix4} The modified result parameter or a new Matrix4 instance if one was not provided.\n */\nMatrix4.unpack = function (array, startingIndex, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.defined(\"array\", array);\n //>>includeEnd('debug');\n\n startingIndex = defaultValue(startingIndex, 0);\n\n if (!defined(result)) {\n result = new Matrix4();\n }\n\n result[0] = array[startingIndex++];\n result[1] = array[startingIndex++];\n result[2] = array[startingIndex++];\n result[3] = array[startingIndex++];\n result[4] = array[startingIndex++];\n result[5] = array[startingIndex++];\n result[6] = array[startingIndex++];\n result[7] = array[startingIndex++];\n result[8] = array[startingIndex++];\n result[9] = array[startingIndex++];\n result[10] = array[startingIndex++];\n result[11] = array[startingIndex++];\n result[12] = array[startingIndex++];\n result[13] = array[startingIndex++];\n result[14] = array[startingIndex++];\n result[15] = array[startingIndex];\n return result;\n};\n\n/**\n * Flattens an array of Matrix4s into an array of components. The components\n * are stored in column-major order.\n *\n * @param {Matrix4[]} array The array of matrices to pack.\n * @param {number[]} [result] The array onto which to store the result. If this is a typed array, it must have array.length * 16 components, else a {@link DeveloperError} will be thrown. If it is a regular array, it will be resized to have (array.length * 16) elements.\n * @returns {number[]} The packed array.\n */\nMatrix4.packArray = function (array, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.defined(\"array\", array);\n //>>includeEnd('debug');\n\n const length = array.length;\n const resultLength = length * 16;\n if (!defined(result)) {\n result = new Array(resultLength);\n } else if (!Array.isArray(result) && result.length !== resultLength) {\n //>>includeStart('debug', pragmas.debug);\n throw new DeveloperError(\n \"If result is a typed array, it must have exactly array.length * 16 elements\",\n );\n //>>includeEnd('debug');\n } else if (result.length !== resultLength) {\n result.length = resultLength;\n }\n\n for (let i = 0; i < length; ++i) {\n Matrix4.pack(array[i], result, i * 16);\n }\n return result;\n};\n\n/**\n * Unpacks an array of column-major matrix components into an array of Matrix4s.\n *\n * @param {number[]} array The array of components to unpack.\n * @param {Matrix4[]} [result] The array onto which to store the result.\n * @returns {Matrix4[]} The unpacked array.\n */\nMatrix4.unpackArray = function (array, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.defined(\"array\", array);\n Check.typeOf.number.greaterThanOrEquals(\"array.length\", array.length, 16);\n if (array.length % 16 !== 0) {\n throw new DeveloperError(\"array length must be a multiple of 16.\");\n }\n //>>includeEnd('debug');\n\n const length = array.length;\n if (!defined(result)) {\n result = new Array(length / 16);\n } else {\n result.length = length / 16;\n }\n\n for (let i = 0; i < length; i += 16) {\n const index = i / 16;\n result[index] = Matrix4.unpack(array, i, result[index]);\n }\n return result;\n};\n\n/**\n * Duplicates a Matrix4 instance.\n *\n * @param {Matrix4} matrix The matrix to duplicate.\n * @param {Matrix4} [result] The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter or a new Matrix4 instance if one was not provided. (Returns undefined if matrix is undefined)\n */\nMatrix4.clone = function (matrix, result) {\n if (!defined(matrix)) {\n return undefined;\n }\n if (!defined(result)) {\n return new Matrix4(\n matrix[0],\n matrix[4],\n matrix[8],\n matrix[12],\n matrix[1],\n matrix[5],\n matrix[9],\n matrix[13],\n matrix[2],\n matrix[6],\n matrix[10],\n matrix[14],\n matrix[3],\n matrix[7],\n matrix[11],\n matrix[15],\n );\n }\n result[0] = matrix[0];\n result[1] = matrix[1];\n result[2] = matrix[2];\n result[3] = matrix[3];\n result[4] = matrix[4];\n result[5] = matrix[5];\n result[6] = matrix[6];\n result[7] = matrix[7];\n result[8] = matrix[8];\n result[9] = matrix[9];\n result[10] = matrix[10];\n result[11] = matrix[11];\n result[12] = matrix[12];\n result[13] = matrix[13];\n result[14] = matrix[14];\n result[15] = matrix[15];\n return result;\n};\n\n/**\n * Creates a Matrix4 from 16 consecutive elements in an array.\n * @function\n *\n * @param {number[]} array The array whose 16 consecutive elements correspond to the positions of the matrix. Assumes column-major order.\n * @param {number} [startingIndex=0] The offset into the array of the first element, which corresponds to first column first row position in the matrix.\n * @param {Matrix4} [result] The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter or a new Matrix4 instance if one was not provided.\n *\n * @example\n * // Create the Matrix4:\n * // [1.0, 2.0, 3.0, 4.0]\n * // [1.0, 2.0, 3.0, 4.0]\n * // [1.0, 2.0, 3.0, 4.0]\n * // [1.0, 2.0, 3.0, 4.0]\n *\n * const v = [1.0, 1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 2.0, 3.0, 3.0, 3.0, 3.0, 4.0, 4.0, 4.0, 4.0];\n * const m = Cesium.Matrix4.fromArray(v);\n *\n * // Create same Matrix4 with using an offset into an array\n * const v2 = [0.0, 0.0, 1.0, 1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 2.0, 3.0, 3.0, 3.0, 3.0, 4.0, 4.0, 4.0, 4.0];\n * const m2 = Cesium.Matrix4.fromArray(v2, 2);\n */\nMatrix4.fromArray = Matrix4.unpack;\n\n/**\n * Computes a Matrix4 instance from a column-major order array.\n *\n * @param {number[]} values The column-major order array.\n * @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.\n */\nMatrix4.fromColumnMajorArray = function (values, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.defined(\"values\", values);\n //>>includeEnd('debug');\n\n return Matrix4.clone(values, result);\n};\n\n/**\n * Computes a Matrix4 instance from a row-major order array.\n * The resulting matrix will be in column-major order.\n *\n * @param {number[]} values The row-major order array.\n * @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.\n */\nMatrix4.fromRowMajorArray = function (values, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.defined(\"values\", values);\n //>>includeEnd('debug');\n\n if (!defined(result)) {\n return new Matrix4(\n values[0],\n values[1],\n values[2],\n values[3],\n values[4],\n values[5],\n values[6],\n values[7],\n values[8],\n values[9],\n values[10],\n values[11],\n values[12],\n values[13],\n values[14],\n values[15],\n );\n }\n result[0] = values[0];\n result[1] = values[4];\n result[2] = values[8];\n result[3] = values[12];\n result[4] = values[1];\n result[5] = values[5];\n result[6] = values[9];\n result[7] = values[13];\n result[8] = values[2];\n result[9] = values[6];\n result[10] = values[10];\n result[11] = values[14];\n result[12] = values[3];\n result[13] = values[7];\n result[14] = values[11];\n result[15] = values[15];\n return result;\n};\n\n/**\n * Computes a Matrix4 instance from a Matrix3 representing the rotation\n * and a Cartesian3 representing the translation.\n *\n * @param {Matrix3} rotation The upper left portion of the matrix representing the rotation.\n * @param {Cartesian3} [translation=Cartesian3.ZERO] The upper right portion of the matrix representing the translation.\n * @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.\n */\nMatrix4.fromRotationTranslation = function (rotation, translation, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"rotation\", rotation);\n //>>includeEnd('debug');\n\n translation = defaultValue(translation, Cartesian3.ZERO);\n\n if (!defined(result)) {\n return new Matrix4(\n rotation[0],\n rotation[3],\n rotation[6],\n translation.x,\n rotation[1],\n rotation[4],\n rotation[7],\n translation.y,\n rotation[2],\n rotation[5],\n rotation[8],\n translation.z,\n 0.0,\n 0.0,\n 0.0,\n 1.0,\n );\n }\n\n result[0] = rotation[0];\n result[1] = rotation[1];\n result[2] = rotation[2];\n result[3] = 0.0;\n result[4] = rotation[3];\n result[5] = rotation[4];\n result[6] = rotation[5];\n result[7] = 0.0;\n result[8] = rotation[6];\n result[9] = rotation[7];\n result[10] = rotation[8];\n result[11] = 0.0;\n result[12] = translation.x;\n result[13] = translation.y;\n result[14] = translation.z;\n result[15] = 1.0;\n return result;\n};\n\n/**\n * Computes a Matrix4 instance from a translation, rotation, and scale (TRS)\n * representation with the rotation represented as a quaternion.\n *\n * @param {Cartesian3} translation The translation transformation.\n * @param {Quaternion} rotation The rotation transformation.\n * @param {Cartesian3} scale The non-uniform scale transformation.\n * @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.\n *\n * @example\n * const result = Cesium.Matrix4.fromTranslationQuaternionRotationScale(\n * new Cesium.Cartesian3(1.0, 2.0, 3.0), // translation\n * Cesium.Quaternion.IDENTITY, // rotation\n * new Cesium.Cartesian3(7.0, 8.0, 9.0), // scale\n * result);\n */\nMatrix4.fromTranslationQuaternionRotationScale = function (\n translation,\n rotation,\n scale,\n result,\n) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"translation\", translation);\n Check.typeOf.object(\"rotation\", rotation);\n Check.typeOf.object(\"scale\", scale);\n //>>includeEnd('debug');\n\n if (!defined(result)) {\n result = new Matrix4();\n }\n\n const scaleX = scale.x;\n const scaleY = scale.y;\n const scaleZ = scale.z;\n\n const x2 = rotation.x * rotation.x;\n const xy = rotation.x * rotation.y;\n const xz = rotation.x * rotation.z;\n const xw = rotation.x * rotation.w;\n const y2 = rotation.y * rotation.y;\n const yz = rotation.y * rotation.z;\n const yw = rotation.y * rotation.w;\n const z2 = rotation.z * rotation.z;\n const zw = rotation.z * rotation.w;\n const w2 = rotation.w * rotation.w;\n\n const m00 = x2 - y2 - z2 + w2;\n const m01 = 2.0 * (xy - zw);\n const m02 = 2.0 * (xz + yw);\n\n const m10 = 2.0 * (xy + zw);\n const m11 = -x2 + y2 - z2 + w2;\n const m12 = 2.0 * (yz - xw);\n\n const m20 = 2.0 * (xz - yw);\n const m21 = 2.0 * (yz + xw);\n const m22 = -x2 - y2 + z2 + w2;\n\n result[0] = m00 * scaleX;\n result[1] = m10 * scaleX;\n result[2] = m20 * scaleX;\n result[3] = 0.0;\n result[4] = m01 * scaleY;\n result[5] = m11 * scaleY;\n result[6] = m21 * scaleY;\n result[7] = 0.0;\n result[8] = m02 * scaleZ;\n result[9] = m12 * scaleZ;\n result[10] = m22 * scaleZ;\n result[11] = 0.0;\n result[12] = translation.x;\n result[13] = translation.y;\n result[14] = translation.z;\n result[15] = 1.0;\n\n return result;\n};\n\n/**\n * Creates a Matrix4 instance from a {@link TranslationRotationScale} instance.\n *\n * @param {TranslationRotationScale} translationRotationScale The instance.\n * @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.\n */\nMatrix4.fromTranslationRotationScale = function (\n translationRotationScale,\n result,\n) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"translationRotationScale\", translationRotationScale);\n //>>includeEnd('debug');\n\n return Matrix4.fromTranslationQuaternionRotationScale(\n translationRotationScale.translation,\n translationRotationScale.rotation,\n translationRotationScale.scale,\n result,\n );\n};\n\n/**\n * Creates a Matrix4 instance from a Cartesian3 representing the translation.\n *\n * @param {Cartesian3} translation The upper right portion of the matrix representing the translation.\n * @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.\n *\n * @see Matrix4.multiplyByTranslation\n */\nMatrix4.fromTranslation = function (translation, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"translation\", translation);\n //>>includeEnd('debug');\n\n return Matrix4.fromRotationTranslation(Matrix3.IDENTITY, translation, result);\n};\n\n/**\n * Computes a Matrix4 instance representing a non-uniform scale.\n *\n * @param {Cartesian3} scale The x, y, and z scale factors.\n * @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.\n *\n * @example\n * // Creates\n * // [7.0, 0.0, 0.0, 0.0]\n * // [0.0, 8.0, 0.0, 0.0]\n * // [0.0, 0.0, 9.0, 0.0]\n * // [0.0, 0.0, 0.0, 1.0]\n * const m = Cesium.Matrix4.fromScale(new Cesium.Cartesian3(7.0, 8.0, 9.0));\n */\nMatrix4.fromScale = function (scale, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"scale\", scale);\n //>>includeEnd('debug');\n\n if (!defined(result)) {\n return new Matrix4(\n scale.x,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n scale.y,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n scale.z,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 1.0,\n );\n }\n\n result[0] = scale.x;\n result[1] = 0.0;\n result[2] = 0.0;\n result[3] = 0.0;\n result[4] = 0.0;\n result[5] = scale.y;\n result[6] = 0.0;\n result[7] = 0.0;\n result[8] = 0.0;\n result[9] = 0.0;\n result[10] = scale.z;\n result[11] = 0.0;\n result[12] = 0.0;\n result[13] = 0.0;\n result[14] = 0.0;\n result[15] = 1.0;\n return result;\n};\n\n/**\n * Computes a Matrix4 instance representing a uniform scale.\n *\n * @param {number} scale The uniform scale factor.\n * @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.\n *\n * @example\n * // Creates\n * // [2.0, 0.0, 0.0, 0.0]\n * // [0.0, 2.0, 0.0, 0.0]\n * // [0.0, 0.0, 2.0, 0.0]\n * // [0.0, 0.0, 0.0, 1.0]\n * const m = Cesium.Matrix4.fromUniformScale(2.0);\n */\nMatrix4.fromUniformScale = function (scale, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.number(\"scale\", scale);\n //>>includeEnd('debug');\n\n if (!defined(result)) {\n return new Matrix4(\n scale,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n scale,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n scale,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 1.0,\n );\n }\n\n result[0] = scale;\n result[1] = 0.0;\n result[2] = 0.0;\n result[3] = 0.0;\n result[4] = 0.0;\n result[5] = scale;\n result[6] = 0.0;\n result[7] = 0.0;\n result[8] = 0.0;\n result[9] = 0.0;\n result[10] = scale;\n result[11] = 0.0;\n result[12] = 0.0;\n result[13] = 0.0;\n result[14] = 0.0;\n result[15] = 1.0;\n return result;\n};\n\n/**\n * Creates a rotation matrix.\n *\n * @param {Matrix3} rotation The rotation matrix.\n * @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.\n */\nMatrix4.fromRotation = function (rotation, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"rotation\", rotation);\n //>>includeEnd('debug');\n\n if (!defined(result)) {\n result = new Matrix4();\n }\n result[0] = rotation[0];\n result[1] = rotation[1];\n result[2] = rotation[2];\n result[3] = 0.0;\n\n result[4] = rotation[3];\n result[5] = rotation[4];\n result[6] = rotation[5];\n result[7] = 0.0;\n\n result[8] = rotation[6];\n result[9] = rotation[7];\n result[10] = rotation[8];\n result[11] = 0.0;\n\n result[12] = 0.0;\n result[13] = 0.0;\n result[14] = 0.0;\n result[15] = 1.0;\n\n return result;\n};\n\nconst fromCameraF = new Cartesian3();\nconst fromCameraR = new Cartesian3();\nconst fromCameraU = new Cartesian3();\n\n/**\n * Computes a Matrix4 instance from a Camera.\n *\n * @param {Camera} camera The camera to use.\n * @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.\n */\nMatrix4.fromCamera = function (camera, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"camera\", camera);\n //>>includeEnd('debug');\n\n const position = camera.position;\n const direction = camera.direction;\n const up = camera.up;\n\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"camera.position\", position);\n Check.typeOf.object(\"camera.direction\", direction);\n Check.typeOf.object(\"camera.up\", up);\n //>>includeEnd('debug');\n\n Cartesian3.normalize(direction, fromCameraF);\n Cartesian3.normalize(\n Cartesian3.cross(fromCameraF, up, fromCameraR),\n fromCameraR,\n );\n Cartesian3.normalize(\n Cartesian3.cross(fromCameraR, fromCameraF, fromCameraU),\n fromCameraU,\n );\n\n const sX = fromCameraR.x;\n const sY = fromCameraR.y;\n const sZ = fromCameraR.z;\n const fX = fromCameraF.x;\n const fY = fromCameraF.y;\n const fZ = fromCameraF.z;\n const uX = fromCameraU.x;\n const uY = fromCameraU.y;\n const uZ = fromCameraU.z;\n const positionX = position.x;\n const positionY = position.y;\n const positionZ = position.z;\n const t0 = sX * -positionX + sY * -positionY + sZ * -positionZ;\n const t1 = uX * -positionX + uY * -positionY + uZ * -positionZ;\n const t2 = fX * positionX + fY * positionY + fZ * positionZ;\n\n // The code below this comment is an optimized\n // version of the commented lines.\n // Rather that create two matrices and then multiply,\n // we just bake in the multiplcation as part of creation.\n // const rotation = new Matrix4(\n // sX, sY, sZ, 0.0,\n // uX, uY, uZ, 0.0,\n // -fX, -fY, -fZ, 0.0,\n // 0.0, 0.0, 0.0, 1.0);\n // const translation = new Matrix4(\n // 1.0, 0.0, 0.0, -position.x,\n // 0.0, 1.0, 0.0, -position.y,\n // 0.0, 0.0, 1.0, -position.z,\n // 0.0, 0.0, 0.0, 1.0);\n // return rotation.multiply(translation);\n if (!defined(result)) {\n return new Matrix4(\n sX,\n sY,\n sZ,\n t0,\n uX,\n uY,\n uZ,\n t1,\n -fX,\n -fY,\n -fZ,\n t2,\n 0.0,\n 0.0,\n 0.0,\n 1.0,\n );\n }\n result[0] = sX;\n result[1] = uX;\n result[2] = -fX;\n result[3] = 0.0;\n result[4] = sY;\n result[5] = uY;\n result[6] = -fY;\n result[7] = 0.0;\n result[8] = sZ;\n result[9] = uZ;\n result[10] = -fZ;\n result[11] = 0.0;\n result[12] = t0;\n result[13] = t1;\n result[14] = t2;\n result[15] = 1.0;\n return result;\n};\n\n/**\n * Computes a Matrix4 instance representing a perspective transformation matrix.\n *\n * @param {number} fovY The field of view along the Y axis in radians.\n * @param {number} aspectRatio The aspect ratio.\n * @param {number} near The distance to the near plane in meters.\n * @param {number} far The distance to the far plane in meters.\n * @param {Matrix4} result The object in which the result will be stored.\n * @returns {Matrix4} The modified result parameter.\n *\n * @exception {DeveloperError} fovY must be in (0, PI].\n * @exception {DeveloperError} aspectRatio must be greater than zero.\n * @exception {DeveloperError} near must be greater than zero.\n * @exception {DeveloperError} far must be greater than zero.\n */\nMatrix4.computePerspectiveFieldOfView = function (\n fovY,\n aspectRatio,\n near,\n far,\n result,\n) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.number.greaterThan(\"fovY\", fovY, 0.0);\n Check.typeOf.number.lessThan(\"fovY\", fovY, Math.PI);\n Check.typeOf.number.greaterThan(\"near\", near, 0.0);\n Check.typeOf.number.greaterThan(\"far\", far, 0.0);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const bottom = Math.tan(fovY * 0.5);\n\n const column1Row1 = 1.0 / bottom;\n const column0Row0 = column1Row1 / aspectRatio;\n const column2Row2 = (far + near) / (near - far);\n const column3Row2 = (2.0 * far * near) / (near - far);\n\n result[0] = column0Row0;\n result[1] = 0.0;\n result[2] = 0.0;\n result[3] = 0.0;\n result[4] = 0.0;\n result[5] = column1Row1;\n result[6] = 0.0;\n result[7] = 0.0;\n result[8] = 0.0;\n result[9] = 0.0;\n result[10] = column2Row2;\n result[11] = -1.0;\n result[12] = 0.0;\n result[13] = 0.0;\n result[14] = column3Row2;\n result[15] = 0.0;\n return result;\n};\n\n/**\n * Computes a Matrix4 instance representing an orthographic transformation matrix.\n *\n * @param {number} left The number of meters to the left of the camera that will be in view.\n * @param {number} right The number of meters to the right of the camera that will be in view.\n * @param {number} bottom The number of meters below of the camera that will be in view.\n * @param {number} top The number of meters above of the camera that will be in view.\n * @param {number} near The distance to the near plane in meters.\n * @param {number} far The distance to the far plane in meters.\n * @param {Matrix4} result The object in which the result will be stored.\n * @returns {Matrix4} The modified result parameter.\n */\nMatrix4.computeOrthographicOffCenter = function (\n left,\n right,\n bottom,\n top,\n near,\n far,\n result,\n) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.number(\"left\", left);\n Check.typeOf.number(\"right\", right);\n Check.typeOf.number(\"bottom\", bottom);\n Check.typeOf.number(\"top\", top);\n Check.typeOf.number(\"near\", near);\n Check.typeOf.number(\"far\", far);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n let a = 1.0 / (right - left);\n let b = 1.0 / (top - bottom);\n let c = 1.0 / (far - near);\n\n const tx = -(right + left) * a;\n const ty = -(top + bottom) * b;\n const tz = -(far + near) * c;\n a *= 2.0;\n b *= 2.0;\n c *= -2.0;\n\n result[0] = a;\n result[1] = 0.0;\n result[2] = 0.0;\n result[3] = 0.0;\n result[4] = 0.0;\n result[5] = b;\n result[6] = 0.0;\n result[7] = 0.0;\n result[8] = 0.0;\n result[9] = 0.0;\n result[10] = c;\n result[11] = 0.0;\n result[12] = tx;\n result[13] = ty;\n result[14] = tz;\n result[15] = 1.0;\n return result;\n};\n\n/**\n * Computes a Matrix4 instance representing an off center perspective transformation.\n *\n * @param {number} left The number of meters to the left of the camera that will be in view.\n * @param {number} right The number of meters to the right of the camera that will be in view.\n * @param {number} bottom The number of meters below the camera that will be in view.\n * @param {number} top The number of meters above the camera that will be in view.\n * @param {number} near The distance to the near plane in meters.\n * @param {number} far The distance to the far plane in meters.\n * @param {Matrix4} result The object in which the result will be stored.\n * @returns {Matrix4} The modified result parameter.\n */\nMatrix4.computePerspectiveOffCenter = function (\n left,\n right,\n bottom,\n top,\n near,\n far,\n result,\n) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.number(\"left\", left);\n Check.typeOf.number(\"right\", right);\n Check.typeOf.number(\"bottom\", bottom);\n Check.typeOf.number(\"top\", top);\n Check.typeOf.number(\"near\", near);\n Check.typeOf.number(\"far\", far);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const column0Row0 = (2.0 * near) / (right - left);\n const column1Row1 = (2.0 * near) / (top - bottom);\n const column2Row0 = (right + left) / (right - left);\n const column2Row1 = (top + bottom) / (top - bottom);\n const column2Row2 = -(far + near) / (far - near);\n const column2Row3 = -1.0;\n const column3Row2 = (-2.0 * far * near) / (far - near);\n\n result[0] = column0Row0;\n result[1] = 0.0;\n result[2] = 0.0;\n result[3] = 0.0;\n result[4] = 0.0;\n result[5] = column1Row1;\n result[6] = 0.0;\n result[7] = 0.0;\n result[8] = column2Row0;\n result[9] = column2Row1;\n result[10] = column2Row2;\n result[11] = column2Row3;\n result[12] = 0.0;\n result[13] = 0.0;\n result[14] = column3Row2;\n result[15] = 0.0;\n return result;\n};\n\n/**\n * Computes a Matrix4 instance representing an infinite off center perspective transformation.\n *\n * @param {number} left The number of meters to the left of the camera that will be in view.\n * @param {number} right The number of meters to the right of the camera that will be in view.\n * @param {number} bottom The number of meters below of the camera that will be in view.\n * @param {number} top The number of meters above of the camera that will be in view.\n * @param {number} near The distance to the near plane in meters.\n * @param {Matrix4} result The object in which the result will be stored.\n * @returns {Matrix4} The modified result parameter.\n */\nMatrix4.computeInfinitePerspectiveOffCenter = function (\n left,\n right,\n bottom,\n top,\n near,\n result,\n) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.number(\"left\", left);\n Check.typeOf.number(\"right\", right);\n Check.typeOf.number(\"bottom\", bottom);\n Check.typeOf.number(\"top\", top);\n Check.typeOf.number(\"near\", near);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const column0Row0 = (2.0 * near) / (right - left);\n const column1Row1 = (2.0 * near) / (top - bottom);\n const column2Row0 = (right + left) / (right - left);\n const column2Row1 = (top + bottom) / (top - bottom);\n const column2Row2 = -1.0;\n const column2Row3 = -1.0;\n const column3Row2 = -2.0 * near;\n\n result[0] = column0Row0;\n result[1] = 0.0;\n result[2] = 0.0;\n result[3] = 0.0;\n result[4] = 0.0;\n result[5] = column1Row1;\n result[6] = 0.0;\n result[7] = 0.0;\n result[8] = column2Row0;\n result[9] = column2Row1;\n result[10] = column2Row2;\n result[11] = column2Row3;\n result[12] = 0.0;\n result[13] = 0.0;\n result[14] = column3Row2;\n result[15] = 0.0;\n return result;\n};\n\n/**\n * Computes a Matrix4 instance that transforms from normalized device coordinates to window coordinates.\n *\n * @param {object} [viewport = { x : 0.0, y : 0.0, width : 0.0, height : 0.0 }] The viewport's corners as shown in Example 1.\n * @param {number} [nearDepthRange=0.0] The near plane distance in window coordinates.\n * @param {number} [farDepthRange=1.0] The far plane distance in window coordinates.\n * @param {Matrix4} [result] The object in which the result will be stored.\n * @returns {Matrix4} The modified result parameter.\n *\n * @example\n * // Create viewport transformation using an explicit viewport and depth range.\n * const m = Cesium.Matrix4.computeViewportTransformation({\n * x : 0.0,\n * y : 0.0,\n * width : 1024.0,\n * height : 768.0\n * }, 0.0, 1.0, new Cesium.Matrix4());\n */\nMatrix4.computeViewportTransformation = function (\n viewport,\n nearDepthRange,\n farDepthRange,\n result,\n) {\n if (!defined(result)) {\n result = new Matrix4();\n }\n\n viewport = defaultValue(viewport, defaultValue.EMPTY_OBJECT);\n const x = defaultValue(viewport.x, 0.0);\n const y = defaultValue(viewport.y, 0.0);\n const width = defaultValue(viewport.width, 0.0);\n const height = defaultValue(viewport.height, 0.0);\n nearDepthRange = defaultValue(nearDepthRange, 0.0);\n farDepthRange = defaultValue(farDepthRange, 1.0);\n\n const halfWidth = width * 0.5;\n const halfHeight = height * 0.5;\n const halfDepth = (farDepthRange - nearDepthRange) * 0.5;\n\n const column0Row0 = halfWidth;\n const column1Row1 = halfHeight;\n const column2Row2 = halfDepth;\n const column3Row0 = x + halfWidth;\n const column3Row1 = y + halfHeight;\n const column3Row2 = nearDepthRange + halfDepth;\n const column3Row3 = 1.0;\n\n result[0] = column0Row0;\n result[1] = 0.0;\n result[2] = 0.0;\n result[3] = 0.0;\n result[4] = 0.0;\n result[5] = column1Row1;\n result[6] = 0.0;\n result[7] = 0.0;\n result[8] = 0.0;\n result[9] = 0.0;\n result[10] = column2Row2;\n result[11] = 0.0;\n result[12] = column3Row0;\n result[13] = column3Row1;\n result[14] = column3Row2;\n result[15] = column3Row3;\n\n return result;\n};\n\n/**\n * Computes a Matrix4 instance that transforms from world space to view space.\n *\n * @param {Cartesian3} position The position of the camera.\n * @param {Cartesian3} direction The forward direction.\n * @param {Cartesian3} up The up direction.\n * @param {Cartesian3} right The right direction.\n * @param {Matrix4} result The object in which the result will be stored.\n * @returns {Matrix4} The modified result parameter.\n */\nMatrix4.computeView = function (position, direction, up, right, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"position\", position);\n Check.typeOf.object(\"direction\", direction);\n Check.typeOf.object(\"up\", up);\n Check.typeOf.object(\"right\", right);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result[0] = right.x;\n result[1] = up.x;\n result[2] = -direction.x;\n result[3] = 0.0;\n result[4] = right.y;\n result[5] = up.y;\n result[6] = -direction.y;\n result[7] = 0.0;\n result[8] = right.z;\n result[9] = up.z;\n result[10] = -direction.z;\n result[11] = 0.0;\n result[12] = -Cartesian3.dot(right, position);\n result[13] = -Cartesian3.dot(up, position);\n result[14] = Cartesian3.dot(direction, position);\n result[15] = 1.0;\n return result;\n};\n\n/**\n * Computes an Array from the provided Matrix4 instance.\n * The array will be in column-major order.\n *\n * @param {Matrix4} matrix The matrix to use..\n * @param {number[]} [result] The Array onto which to store the result.\n * @returns {number[]} The modified Array parameter or a new Array instance if one was not provided.\n *\n * @example\n * //create an array from an instance of Matrix4\n * // m = [10.0, 14.0, 18.0, 22.0]\n * // [11.0, 15.0, 19.0, 23.0]\n * // [12.0, 16.0, 20.0, 24.0]\n * // [13.0, 17.0, 21.0, 25.0]\n * const a = Cesium.Matrix4.toArray(m);\n *\n * // m remains the same\n * //creates a = [10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0]\n */\nMatrix4.toArray = function (matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n //>>includeEnd('debug');\n\n if (!defined(result)) {\n return [\n matrix[0],\n matrix[1],\n matrix[2],\n matrix[3],\n matrix[4],\n matrix[5],\n matrix[6],\n matrix[7],\n matrix[8],\n matrix[9],\n matrix[10],\n matrix[11],\n matrix[12],\n matrix[13],\n matrix[14],\n matrix[15],\n ];\n }\n result[0] = matrix[0];\n result[1] = matrix[1];\n result[2] = matrix[2];\n result[3] = matrix[3];\n result[4] = matrix[4];\n result[5] = matrix[5];\n result[6] = matrix[6];\n result[7] = matrix[7];\n result[8] = matrix[8];\n result[9] = matrix[9];\n result[10] = matrix[10];\n result[11] = matrix[11];\n result[12] = matrix[12];\n result[13] = matrix[13];\n result[14] = matrix[14];\n result[15] = matrix[15];\n return result;\n};\n\n/**\n * Computes the array index of the element at the provided row and column.\n *\n * @param {number} row The zero-based index of the row.\n * @param {number} column The zero-based index of the column.\n * @returns {number} The index of the element at the provided row and column.\n *\n * @exception {DeveloperError} row must be 0, 1, 2, or 3.\n * @exception {DeveloperError} column must be 0, 1, 2, or 3.\n *\n * @example\n * const myMatrix = new Cesium.Matrix4();\n * const column1Row0Index = Cesium.Matrix4.getElementIndex(1, 0);\n * const column1Row0 = myMatrix[column1Row0Index];\n * myMatrix[column1Row0Index] = 10.0;\n */\nMatrix4.getElementIndex = function (column, row) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.number.greaterThanOrEquals(\"row\", row, 0);\n Check.typeOf.number.lessThanOrEquals(\"row\", row, 3);\n\n Check.typeOf.number.greaterThanOrEquals(\"column\", column, 0);\n Check.typeOf.number.lessThanOrEquals(\"column\", column, 3);\n //>>includeEnd('debug');\n\n return column * 4 + row;\n};\n\n/**\n * Retrieves a copy of the matrix column at the provided index as a Cartesian4 instance.\n *\n * @param {Matrix4} matrix The matrix to use.\n * @param {number} index The zero-based index of the column to retrieve.\n * @param {Cartesian4} result The object onto which to store the result.\n * @returns {Cartesian4} The modified result parameter.\n *\n * @exception {DeveloperError} index must be 0, 1, 2, or 3.\n *\n * @example\n * //returns a Cartesian4 instance with values from the specified column\n * // m = [10.0, 11.0, 12.0, 13.0]\n * // [14.0, 15.0, 16.0, 17.0]\n * // [18.0, 19.0, 20.0, 21.0]\n * // [22.0, 23.0, 24.0, 25.0]\n *\n * //Example 1: Creates an instance of Cartesian\n * const a = Cesium.Matrix4.getColumn(m, 2, new Cesium.Cartesian4());\n *\n * @example\n * //Example 2: Sets values for Cartesian instance\n * const a = new Cesium.Cartesian4();\n * Cesium.Matrix4.getColumn(m, 2, a);\n *\n * // a.x = 12.0; a.y = 16.0; a.z = 20.0; a.w = 24.0;\n */\nMatrix4.getColumn = function (matrix, index, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n\n Check.typeOf.number.greaterThanOrEquals(\"index\", index, 0);\n Check.typeOf.number.lessThanOrEquals(\"index\", index, 3);\n\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const startIndex = index * 4;\n const x = matrix[startIndex];\n const y = matrix[startIndex + 1];\n const z = matrix[startIndex + 2];\n const w = matrix[startIndex + 3];\n\n result.x = x;\n result.y = y;\n result.z = z;\n result.w = w;\n return result;\n};\n\n/**\n * Computes a new matrix that replaces the specified column in the provided matrix with the provided Cartesian4 instance.\n *\n * @param {Matrix4} matrix The matrix to use.\n * @param {number} index The zero-based index of the column to set.\n * @param {Cartesian4} cartesian The Cartesian whose values will be assigned to the specified column.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n *\n * @exception {DeveloperError} index must be 0, 1, 2, or 3.\n *\n * @example\n * //creates a new Matrix4 instance with new column values from the Cartesian4 instance\n * // m = [10.0, 11.0, 12.0, 13.0]\n * // [14.0, 15.0, 16.0, 17.0]\n * // [18.0, 19.0, 20.0, 21.0]\n * // [22.0, 23.0, 24.0, 25.0]\n *\n * const a = Cesium.Matrix4.setColumn(m, 2, new Cesium.Cartesian4(99.0, 98.0, 97.0, 96.0), new Cesium.Matrix4());\n *\n * // m remains the same\n * // a = [10.0, 11.0, 99.0, 13.0]\n * // [14.0, 15.0, 98.0, 17.0]\n * // [18.0, 19.0, 97.0, 21.0]\n * // [22.0, 23.0, 96.0, 25.0]\n */\nMatrix4.setColumn = function (matrix, index, cartesian, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n\n Check.typeOf.number.greaterThanOrEquals(\"index\", index, 0);\n Check.typeOf.number.lessThanOrEquals(\"index\", index, 3);\n\n Check.typeOf.object(\"cartesian\", cartesian);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result = Matrix4.clone(matrix, result);\n const startIndex = index * 4;\n result[startIndex] = cartesian.x;\n result[startIndex + 1] = cartesian.y;\n result[startIndex + 2] = cartesian.z;\n result[startIndex + 3] = cartesian.w;\n return result;\n};\n\n/**\n * Retrieves a copy of the matrix row at the provided index as a Cartesian4 instance.\n *\n * @param {Matrix4} matrix The matrix to use.\n * @param {number} index The zero-based index of the row to retrieve.\n * @param {Cartesian4} result The object onto which to store the result.\n * @returns {Cartesian4} The modified result parameter.\n *\n * @exception {DeveloperError} index must be 0, 1, 2, or 3.\n *\n * @example\n * //returns a Cartesian4 instance with values from the specified column\n * // m = [10.0, 11.0, 12.0, 13.0]\n * // [14.0, 15.0, 16.0, 17.0]\n * // [18.0, 19.0, 20.0, 21.0]\n * // [22.0, 23.0, 24.0, 25.0]\n *\n * //Example 1: Returns an instance of Cartesian\n * const a = Cesium.Matrix4.getRow(m, 2, new Cesium.Cartesian4());\n *\n * @example\n * //Example 2: Sets values for a Cartesian instance\n * const a = new Cesium.Cartesian4();\n * Cesium.Matrix4.getRow(m, 2, a);\n *\n * // a.x = 18.0; a.y = 19.0; a.z = 20.0; a.w = 21.0;\n */\nMatrix4.getRow = function (matrix, index, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n\n Check.typeOf.number.greaterThanOrEquals(\"index\", index, 0);\n Check.typeOf.number.lessThanOrEquals(\"index\", index, 3);\n\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const x = matrix[index];\n const y = matrix[index + 4];\n const z = matrix[index + 8];\n const w = matrix[index + 12];\n\n result.x = x;\n result.y = y;\n result.z = z;\n result.w = w;\n return result;\n};\n\n/**\n * Computes a new matrix that replaces the specified row in the provided matrix with the provided Cartesian4 instance.\n *\n * @param {Matrix4} matrix The matrix to use.\n * @param {number} index The zero-based index of the row to set.\n * @param {Cartesian4} cartesian The Cartesian whose values will be assigned to the specified row.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n *\n * @exception {DeveloperError} index must be 0, 1, 2, or 3.\n *\n * @example\n * //create a new Matrix4 instance with new row values from the Cartesian4 instance\n * // m = [10.0, 11.0, 12.0, 13.0]\n * // [14.0, 15.0, 16.0, 17.0]\n * // [18.0, 19.0, 20.0, 21.0]\n * // [22.0, 23.0, 24.0, 25.0]\n *\n * const a = Cesium.Matrix4.setRow(m, 2, new Cesium.Cartesian4(99.0, 98.0, 97.0, 96.0), new Cesium.Matrix4());\n *\n * // m remains the same\n * // a = [10.0, 11.0, 12.0, 13.0]\n * // [14.0, 15.0, 16.0, 17.0]\n * // [99.0, 98.0, 97.0, 96.0]\n * // [22.0, 23.0, 24.0, 25.0]\n */\nMatrix4.setRow = function (matrix, index, cartesian, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n\n Check.typeOf.number.greaterThanOrEquals(\"index\", index, 0);\n Check.typeOf.number.lessThanOrEquals(\"index\", index, 3);\n\n Check.typeOf.object(\"cartesian\", cartesian);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result = Matrix4.clone(matrix, result);\n result[index] = cartesian.x;\n result[index + 4] = cartesian.y;\n result[index + 8] = cartesian.z;\n result[index + 12] = cartesian.w;\n return result;\n};\n\n/**\n * Computes a new matrix that replaces the translation in the rightmost column of the provided\n * matrix with the provided translation. This assumes the matrix is an affine transformation.\n *\n * @param {Matrix4} matrix The matrix to use.\n * @param {Cartesian3} translation The translation that replaces the translation of the provided matrix.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n */\nMatrix4.setTranslation = function (matrix, translation, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"translation\", translation);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result[0] = matrix[0];\n result[1] = matrix[1];\n result[2] = matrix[2];\n result[3] = matrix[3];\n\n result[4] = matrix[4];\n result[5] = matrix[5];\n result[6] = matrix[6];\n result[7] = matrix[7];\n\n result[8] = matrix[8];\n result[9] = matrix[9];\n result[10] = matrix[10];\n result[11] = matrix[11];\n\n result[12] = translation.x;\n result[13] = translation.y;\n result[14] = translation.z;\n result[15] = matrix[15];\n\n return result;\n};\n\nconst scaleScratch1 = new Cartesian3();\n\n/**\n * Computes a new matrix that replaces the scale with the provided scale.\n * This assumes the matrix is an affine transformation.\n *\n * @param {Matrix4} matrix The matrix to use.\n * @param {Cartesian3} scale The scale that replaces the scale of the provided matrix.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n *\n * @see Matrix4.setUniformScale\n * @see Matrix4.fromScale\n * @see Matrix4.fromUniformScale\n * @see Matrix4.multiplyByScale\n * @see Matrix4.multiplyByUniformScale\n * @see Matrix4.getScale\n */\nMatrix4.setScale = function (matrix, scale, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"scale\", scale);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const existingScale = Matrix4.getScale(matrix, scaleScratch1);\n const scaleRatioX = scale.x / existingScale.x;\n const scaleRatioY = scale.y / existingScale.y;\n const scaleRatioZ = scale.z / existingScale.z;\n\n result[0] = matrix[0] * scaleRatioX;\n result[1] = matrix[1] * scaleRatioX;\n result[2] = matrix[2] * scaleRatioX;\n result[3] = matrix[3];\n\n result[4] = matrix[4] * scaleRatioY;\n result[5] = matrix[5] * scaleRatioY;\n result[6] = matrix[6] * scaleRatioY;\n result[7] = matrix[7];\n\n result[8] = matrix[8] * scaleRatioZ;\n result[9] = matrix[9] * scaleRatioZ;\n result[10] = matrix[10] * scaleRatioZ;\n result[11] = matrix[11];\n\n result[12] = matrix[12];\n result[13] = matrix[13];\n result[14] = matrix[14];\n result[15] = matrix[15];\n\n return result;\n};\n\nconst scaleScratch2 = new Cartesian3();\n\n/**\n * Computes a new matrix that replaces the scale with the provided uniform scale.\n * This assumes the matrix is an affine transformation.\n *\n * @param {Matrix4} matrix The matrix to use.\n * @param {number} scale The uniform scale that replaces the scale of the provided matrix.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n *\n * @see Matrix4.setScale\n * @see Matrix4.fromScale\n * @see Matrix4.fromUniformScale\n * @see Matrix4.multiplyByScale\n * @see Matrix4.multiplyByUniformScale\n * @see Matrix4.getScale\n */\nMatrix4.setUniformScale = function (matrix, scale, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.number(\"scale\", scale);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const existingScale = Matrix4.getScale(matrix, scaleScratch2);\n const scaleRatioX = scale / existingScale.x;\n const scaleRatioY = scale / existingScale.y;\n const scaleRatioZ = scale / existingScale.z;\n\n result[0] = matrix[0] * scaleRatioX;\n result[1] = matrix[1] * scaleRatioX;\n result[2] = matrix[2] * scaleRatioX;\n result[3] = matrix[3];\n\n result[4] = matrix[4] * scaleRatioY;\n result[5] = matrix[5] * scaleRatioY;\n result[6] = matrix[6] * scaleRatioY;\n result[7] = matrix[7];\n\n result[8] = matrix[8] * scaleRatioZ;\n result[9] = matrix[9] * scaleRatioZ;\n result[10] = matrix[10] * scaleRatioZ;\n result[11] = matrix[11];\n\n result[12] = matrix[12];\n result[13] = matrix[13];\n result[14] = matrix[14];\n result[15] = matrix[15];\n\n return result;\n};\n\nconst scratchColumn = new Cartesian3();\n\n/**\n * Extracts the non-uniform scale assuming the matrix is an affine transformation.\n *\n * @param {Matrix4} matrix The matrix.\n * @param {Cartesian3} result The object onto which to store the result.\n * @returns {Cartesian3} The modified result parameter\n *\n * @see Matrix4.multiplyByScale\n * @see Matrix4.multiplyByUniformScale\n * @see Matrix4.fromScale\n * @see Matrix4.fromUniformScale\n * @see Matrix4.setScale\n * @see Matrix4.setUniformScale\n */\nMatrix4.getScale = function (matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result.x = Cartesian3.magnitude(\n Cartesian3.fromElements(matrix[0], matrix[1], matrix[2], scratchColumn),\n );\n result.y = Cartesian3.magnitude(\n Cartesian3.fromElements(matrix[4], matrix[5], matrix[6], scratchColumn),\n );\n result.z = Cartesian3.magnitude(\n Cartesian3.fromElements(matrix[8], matrix[9], matrix[10], scratchColumn),\n );\n return result;\n};\n\nconst scaleScratch3 = new Cartesian3();\n\n/**\n * Computes the maximum scale assuming the matrix is an affine transformation.\n * The maximum scale is the maximum length of the column vectors in the upper-left\n * 3x3 matrix.\n *\n * @param {Matrix4} matrix The matrix.\n * @returns {number} The maximum scale.\n */\nMatrix4.getMaximumScale = function (matrix) {\n Matrix4.getScale(matrix, scaleScratch3);\n return Cartesian3.maximumComponent(scaleScratch3);\n};\n\nconst scaleScratch4 = new Cartesian3();\n\n/**\n * Sets the rotation assuming the matrix is an affine transformation.\n *\n * @param {Matrix4} matrix The matrix.\n * @param {Matrix3} rotation The rotation matrix.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n *\n * @see Matrix4.fromRotation\n * @see Matrix4.getRotation\n */\nMatrix4.setRotation = function (matrix, rotation, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const scale = Matrix4.getScale(matrix, scaleScratch4);\n\n result[0] = rotation[0] * scale.x;\n result[1] = rotation[1] * scale.x;\n result[2] = rotation[2] * scale.x;\n result[3] = matrix[3];\n\n result[4] = rotation[3] * scale.y;\n result[5] = rotation[4] * scale.y;\n result[6] = rotation[5] * scale.y;\n result[7] = matrix[7];\n\n result[8] = rotation[6] * scale.z;\n result[9] = rotation[7] * scale.z;\n result[10] = rotation[8] * scale.z;\n result[11] = matrix[11];\n\n result[12] = matrix[12];\n result[13] = matrix[13];\n result[14] = matrix[14];\n result[15] = matrix[15];\n\n return result;\n};\n\nconst scaleScratch5 = new Cartesian3();\n\n/**\n * Extracts the rotation matrix assuming the matrix is an affine transformation.\n *\n * @param {Matrix4} matrix The matrix.\n * @param {Matrix3} result The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter.\n *\n * @see Matrix4.setRotation\n * @see Matrix4.fromRotation\n */\nMatrix4.getRotation = function (matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const scale = Matrix4.getScale(matrix, scaleScratch5);\n\n result[0] = matrix[0] / scale.x;\n result[1] = matrix[1] / scale.x;\n result[2] = matrix[2] / scale.x;\n\n result[3] = matrix[4] / scale.y;\n result[4] = matrix[5] / scale.y;\n result[5] = matrix[6] / scale.y;\n\n result[6] = matrix[8] / scale.z;\n result[7] = matrix[9] / scale.z;\n result[8] = matrix[10] / scale.z;\n\n return result;\n};\n\n/**\n * Computes the product of two matrices.\n *\n * @param {Matrix4} left The first matrix.\n * @param {Matrix4} right The second matrix.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n */\nMatrix4.multiply = function (left, right, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"left\", left);\n Check.typeOf.object(\"right\", right);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const left0 = left[0];\n const left1 = left[1];\n const left2 = left[2];\n const left3 = left[3];\n const left4 = left[4];\n const left5 = left[5];\n const left6 = left[6];\n const left7 = left[7];\n const left8 = left[8];\n const left9 = left[9];\n const left10 = left[10];\n const left11 = left[11];\n const left12 = left[12];\n const left13 = left[13];\n const left14 = left[14];\n const left15 = left[15];\n\n const right0 = right[0];\n const right1 = right[1];\n const right2 = right[2];\n const right3 = right[3];\n const right4 = right[4];\n const right5 = right[5];\n const right6 = right[6];\n const right7 = right[7];\n const right8 = right[8];\n const right9 = right[9];\n const right10 = right[10];\n const right11 = right[11];\n const right12 = right[12];\n const right13 = right[13];\n const right14 = right[14];\n const right15 = right[15];\n\n const column0Row0 =\n left0 * right0 + left4 * right1 + left8 * right2 + left12 * right3;\n const column0Row1 =\n left1 * right0 + left5 * right1 + left9 * right2 + left13 * right3;\n const column0Row2 =\n left2 * right0 + left6 * right1 + left10 * right2 + left14 * right3;\n const column0Row3 =\n left3 * right0 + left7 * right1 + left11 * right2 + left15 * right3;\n\n const column1Row0 =\n left0 * right4 + left4 * right5 + left8 * right6 + left12 * right7;\n const column1Row1 =\n left1 * right4 + left5 * right5 + left9 * right6 + left13 * right7;\n const column1Row2 =\n left2 * right4 + left6 * right5 + left10 * right6 + left14 * right7;\n const column1Row3 =\n left3 * right4 + left7 * right5 + left11 * right6 + left15 * right7;\n\n const column2Row0 =\n left0 * right8 + left4 * right9 + left8 * right10 + left12 * right11;\n const column2Row1 =\n left1 * right8 + left5 * right9 + left9 * right10 + left13 * right11;\n const column2Row2 =\n left2 * right8 + left6 * right9 + left10 * right10 + left14 * right11;\n const column2Row3 =\n left3 * right8 + left7 * right9 + left11 * right10 + left15 * right11;\n\n const column3Row0 =\n left0 * right12 + left4 * right13 + left8 * right14 + left12 * right15;\n const column3Row1 =\n left1 * right12 + left5 * right13 + left9 * right14 + left13 * right15;\n const column3Row2 =\n left2 * right12 + left6 * right13 + left10 * right14 + left14 * right15;\n const column3Row3 =\n left3 * right12 + left7 * right13 + left11 * right14 + left15 * right15;\n\n result[0] = column0Row0;\n result[1] = column0Row1;\n result[2] = column0Row2;\n result[3] = column0Row3;\n result[4] = column1Row0;\n result[5] = column1Row1;\n result[6] = column1Row2;\n result[7] = column1Row3;\n result[8] = column2Row0;\n result[9] = column2Row1;\n result[10] = column2Row2;\n result[11] = column2Row3;\n result[12] = column3Row0;\n result[13] = column3Row1;\n result[14] = column3Row2;\n result[15] = column3Row3;\n return result;\n};\n\n/**\n * Computes the sum of two matrices.\n *\n * @param {Matrix4} left The first matrix.\n * @param {Matrix4} right The second matrix.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n */\nMatrix4.add = function (left, right, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"left\", left);\n Check.typeOf.object(\"right\", right);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result[0] = left[0] + right[0];\n result[1] = left[1] + right[1];\n result[2] = left[2] + right[2];\n result[3] = left[3] + right[3];\n result[4] = left[4] + right[4];\n result[5] = left[5] + right[5];\n result[6] = left[6] + right[6];\n result[7] = left[7] + right[7];\n result[8] = left[8] + right[8];\n result[9] = left[9] + right[9];\n result[10] = left[10] + right[10];\n result[11] = left[11] + right[11];\n result[12] = left[12] + right[12];\n result[13] = left[13] + right[13];\n result[14] = left[14] + right[14];\n result[15] = left[15] + right[15];\n return result;\n};\n\n/**\n * Computes the difference of two matrices.\n *\n * @param {Matrix4} left The first matrix.\n * @param {Matrix4} right The second matrix.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n */\nMatrix4.subtract = function (left, right, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"left\", left);\n Check.typeOf.object(\"right\", right);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result[0] = left[0] - right[0];\n result[1] = left[1] - right[1];\n result[2] = left[2] - right[2];\n result[3] = left[3] - right[3];\n result[4] = left[4] - right[4];\n result[5] = left[5] - right[5];\n result[6] = left[6] - right[6];\n result[7] = left[7] - right[7];\n result[8] = left[8] - right[8];\n result[9] = left[9] - right[9];\n result[10] = left[10] - right[10];\n result[11] = left[11] - right[11];\n result[12] = left[12] - right[12];\n result[13] = left[13] - right[13];\n result[14] = left[14] - right[14];\n result[15] = left[15] - right[15];\n return result;\n};\n\n/**\n * Computes the product of two matrices assuming the matrices are affine transformation matrices,\n * where the upper left 3x3 elements are any matrix, and\n * the upper three elements in the fourth column are the translation.\n * The bottom row is assumed to be [0, 0, 0, 1].\n * The matrix is not verified to be in the proper form.\n * This method is faster than computing the product for general 4x4\n * matrices using {@link Matrix4.multiply}.\n *\n * @param {Matrix4} left The first matrix.\n * @param {Matrix4} right The second matrix.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n *\n * @example\n * const m1 = new Cesium.Matrix4(1.0, 6.0, 7.0, 0.0, 2.0, 5.0, 8.0, 0.0, 3.0, 4.0, 9.0, 0.0, 0.0, 0.0, 0.0, 1.0);\n * const m2 = Cesium.Transforms.eastNorthUpToFixedFrame(new Cesium.Cartesian3(1.0, 1.0, 1.0));\n * const m3 = Cesium.Matrix4.multiplyTransformation(m1, m2, new Cesium.Matrix4());\n */\nMatrix4.multiplyTransformation = function (left, right, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"left\", left);\n Check.typeOf.object(\"right\", right);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const left0 = left[0];\n const left1 = left[1];\n const left2 = left[2];\n const left4 = left[4];\n const left5 = left[5];\n const left6 = left[6];\n const left8 = left[8];\n const left9 = left[9];\n const left10 = left[10];\n const left12 = left[12];\n const left13 = left[13];\n const left14 = left[14];\n\n const right0 = right[0];\n const right1 = right[1];\n const right2 = right[2];\n const right4 = right[4];\n const right5 = right[5];\n const right6 = right[6];\n const right8 = right[8];\n const right9 = right[9];\n const right10 = right[10];\n const right12 = right[12];\n const right13 = right[13];\n const right14 = right[14];\n\n const column0Row0 = left0 * right0 + left4 * right1 + left8 * right2;\n const column0Row1 = left1 * right0 + left5 * right1 + left9 * right2;\n const column0Row2 = left2 * right0 + left6 * right1 + left10 * right2;\n\n const column1Row0 = left0 * right4 + left4 * right5 + left8 * right6;\n const column1Row1 = left1 * right4 + left5 * right5 + left9 * right6;\n const column1Row2 = left2 * right4 + left6 * right5 + left10 * right6;\n\n const column2Row0 = left0 * right8 + left4 * right9 + left8 * right10;\n const column2Row1 = left1 * right8 + left5 * right9 + left9 * right10;\n const column2Row2 = left2 * right8 + left6 * right9 + left10 * right10;\n\n const column3Row0 =\n left0 * right12 + left4 * right13 + left8 * right14 + left12;\n const column3Row1 =\n left1 * right12 + left5 * right13 + left9 * right14 + left13;\n const column3Row2 =\n left2 * right12 + left6 * right13 + left10 * right14 + left14;\n\n result[0] = column0Row0;\n result[1] = column0Row1;\n result[2] = column0Row2;\n result[3] = 0.0;\n result[4] = column1Row0;\n result[5] = column1Row1;\n result[6] = column1Row2;\n result[7] = 0.0;\n result[8] = column2Row0;\n result[9] = column2Row1;\n result[10] = column2Row2;\n result[11] = 0.0;\n result[12] = column3Row0;\n result[13] = column3Row1;\n result[14] = column3Row2;\n result[15] = 1.0;\n return result;\n};\n\n/**\n * Multiplies a transformation matrix (with a bottom row of [0.0, 0.0, 0.0, 1.0])\n * by a 3x3 rotation matrix. This is an optimization\n * for Matrix4.multiply(m, Matrix4.fromRotationTranslation(rotation), m); with less allocations and arithmetic operations.\n *\n * @param {Matrix4} matrix The matrix on the left-hand side.\n * @param {Matrix3} rotation The 3x3 rotation matrix on the right-hand side.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n *\n * @example\n * // Instead of Cesium.Matrix4.multiply(m, Cesium.Matrix4.fromRotationTranslation(rotation), m);\n * Cesium.Matrix4.multiplyByMatrix3(m, rotation, m);\n */\nMatrix4.multiplyByMatrix3 = function (matrix, rotation, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"rotation\", rotation);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const left0 = matrix[0];\n const left1 = matrix[1];\n const left2 = matrix[2];\n const left4 = matrix[4];\n const left5 = matrix[5];\n const left6 = matrix[6];\n const left8 = matrix[8];\n const left9 = matrix[9];\n const left10 = matrix[10];\n\n const right0 = rotation[0];\n const right1 = rotation[1];\n const right2 = rotation[2];\n const right4 = rotation[3];\n const right5 = rotation[4];\n const right6 = rotation[5];\n const right8 = rotation[6];\n const right9 = rotation[7];\n const right10 = rotation[8];\n\n const column0Row0 = left0 * right0 + left4 * right1 + left8 * right2;\n const column0Row1 = left1 * right0 + left5 * right1 + left9 * right2;\n const column0Row2 = left2 * right0 + left6 * right1 + left10 * right2;\n\n const column1Row0 = left0 * right4 + left4 * right5 + left8 * right6;\n const column1Row1 = left1 * right4 + left5 * right5 + left9 * right6;\n const column1Row2 = left2 * right4 + left6 * right5 + left10 * right6;\n\n const column2Row0 = left0 * right8 + left4 * right9 + left8 * right10;\n const column2Row1 = left1 * right8 + left5 * right9 + left9 * right10;\n const column2Row2 = left2 * right8 + left6 * right9 + left10 * right10;\n\n result[0] = column0Row0;\n result[1] = column0Row1;\n result[2] = column0Row2;\n result[3] = 0.0;\n result[4] = column1Row0;\n result[5] = column1Row1;\n result[6] = column1Row2;\n result[7] = 0.0;\n result[8] = column2Row0;\n result[9] = column2Row1;\n result[10] = column2Row2;\n result[11] = 0.0;\n result[12] = matrix[12];\n result[13] = matrix[13];\n result[14] = matrix[14];\n result[15] = matrix[15];\n return result;\n};\n\n/**\n * Multiplies a transformation matrix (with a bottom row of [0.0, 0.0, 0.0, 1.0])\n * by an implicit translation matrix defined by a {@link Cartesian3}. This is an optimization\n * for Matrix4.multiply(m, Matrix4.fromTranslation(position), m); with less allocations and arithmetic operations.\n *\n * @param {Matrix4} matrix The matrix on the left-hand side.\n * @param {Cartesian3} translation The translation on the right-hand side.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n *\n * @example\n * // Instead of Cesium.Matrix4.multiply(m, Cesium.Matrix4.fromTranslation(position), m);\n * Cesium.Matrix4.multiplyByTranslation(m, position, m);\n */\nMatrix4.multiplyByTranslation = function (matrix, translation, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"translation\", translation);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const x = translation.x;\n const y = translation.y;\n const z = translation.z;\n\n const tx = x * matrix[0] + y * matrix[4] + z * matrix[8] + matrix[12];\n const ty = x * matrix[1] + y * matrix[5] + z * matrix[9] + matrix[13];\n const tz = x * matrix[2] + y * matrix[6] + z * matrix[10] + matrix[14];\n\n result[0] = matrix[0];\n result[1] = matrix[1];\n result[2] = matrix[2];\n result[3] = matrix[3];\n result[4] = matrix[4];\n result[5] = matrix[5];\n result[6] = matrix[6];\n result[7] = matrix[7];\n result[8] = matrix[8];\n result[9] = matrix[9];\n result[10] = matrix[10];\n result[11] = matrix[11];\n result[12] = tx;\n result[13] = ty;\n result[14] = tz;\n result[15] = matrix[15];\n return result;\n};\n\n/**\n * Multiplies an affine transformation matrix (with a bottom row of [0.0, 0.0, 0.0, 1.0])\n * by an implicit non-uniform scale matrix. This is an optimization\n * for Matrix4.multiply(m, Matrix4.fromUniformScale(scale), m);, where\n * m must be an affine matrix.\n * This function performs fewer allocations and arithmetic operations.\n *\n * @param {Matrix4} matrix The affine matrix on the left-hand side.\n * @param {Cartesian3} scale The non-uniform scale on the right-hand side.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n *\n *\n * @example\n * // Instead of Cesium.Matrix4.multiply(m, Cesium.Matrix4.fromScale(scale), m);\n * Cesium.Matrix4.multiplyByScale(m, scale, m);\n *\n * @see Matrix4.multiplyByUniformScale\n * @see Matrix4.fromScale\n * @see Matrix4.fromUniformScale\n * @see Matrix4.setScale\n * @see Matrix4.setUniformScale\n * @see Matrix4.getScale\n */\nMatrix4.multiplyByScale = function (matrix, scale, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"scale\", scale);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const scaleX = scale.x;\n const scaleY = scale.y;\n const scaleZ = scale.z;\n\n // Faster than Cartesian3.equals\n if (scaleX === 1.0 && scaleY === 1.0 && scaleZ === 1.0) {\n return Matrix4.clone(matrix, result);\n }\n\n result[0] = scaleX * matrix[0];\n result[1] = scaleX * matrix[1];\n result[2] = scaleX * matrix[2];\n result[3] = matrix[3];\n\n result[4] = scaleY * matrix[4];\n result[5] = scaleY * matrix[5];\n result[6] = scaleY * matrix[6];\n result[7] = matrix[7];\n\n result[8] = scaleZ * matrix[8];\n result[9] = scaleZ * matrix[9];\n result[10] = scaleZ * matrix[10];\n result[11] = matrix[11];\n\n result[12] = matrix[12];\n result[13] = matrix[13];\n result[14] = matrix[14];\n result[15] = matrix[15];\n\n return result;\n};\n\n/**\n * Computes the product of a matrix times a uniform scale, as if the scale were a scale matrix.\n *\n * @param {Matrix4} matrix The matrix on the left-hand side.\n * @param {number} scale The uniform scale on the right-hand side.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n *\n * @example\n * // Instead of Cesium.Matrix4.multiply(m, Cesium.Matrix4.fromUniformScale(scale), m);\n * Cesium.Matrix4.multiplyByUniformScale(m, scale, m);\n *\n * @see Matrix4.multiplyByScale\n * @see Matrix4.fromScale\n * @see Matrix4.fromUniformScale\n * @see Matrix4.setScale\n * @see Matrix4.setUniformScale\n * @see Matrix4.getScale\n */\nMatrix4.multiplyByUniformScale = function (matrix, scale, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.number(\"scale\", scale);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result[0] = matrix[0] * scale;\n result[1] = matrix[1] * scale;\n result[2] = matrix[2] * scale;\n result[3] = matrix[3];\n\n result[4] = matrix[4] * scale;\n result[5] = matrix[5] * scale;\n result[6] = matrix[6] * scale;\n result[7] = matrix[7];\n\n result[8] = matrix[8] * scale;\n result[9] = matrix[9] * scale;\n result[10] = matrix[10] * scale;\n result[11] = matrix[11];\n\n result[12] = matrix[12];\n result[13] = matrix[13];\n result[14] = matrix[14];\n result[15] = matrix[15];\n\n return result;\n};\n\n/**\n * Computes the product of a matrix and a column vector.\n *\n * @param {Matrix4} matrix The matrix.\n * @param {Cartesian4} cartesian The vector.\n * @param {Cartesian4} result The object onto which to store the result.\n * @returns {Cartesian4} The modified result parameter.\n */\nMatrix4.multiplyByVector = function (matrix, cartesian, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"cartesian\", cartesian);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const vX = cartesian.x;\n const vY = cartesian.y;\n const vZ = cartesian.z;\n const vW = cartesian.w;\n\n const x = matrix[0] * vX + matrix[4] * vY + matrix[8] * vZ + matrix[12] * vW;\n const y = matrix[1] * vX + matrix[5] * vY + matrix[9] * vZ + matrix[13] * vW;\n const z = matrix[2] * vX + matrix[6] * vY + matrix[10] * vZ + matrix[14] * vW;\n const w = matrix[3] * vX + matrix[7] * vY + matrix[11] * vZ + matrix[15] * vW;\n\n result.x = x;\n result.y = y;\n result.z = z;\n result.w = w;\n return result;\n};\n\n/**\n * Computes the product of a matrix and a {@link Cartesian3}. This is equivalent to calling {@link Matrix4.multiplyByVector}\n * with a {@link Cartesian4} with a w component of zero.\n *\n * @param {Matrix4} matrix The matrix.\n * @param {Cartesian3} cartesian The point.\n * @param {Cartesian3} result The object onto which to store the result.\n * @returns {Cartesian3} The modified result parameter.\n *\n * @example\n * const p = new Cesium.Cartesian3(1.0, 2.0, 3.0);\n * const result = Cesium.Matrix4.multiplyByPointAsVector(matrix, p, new Cesium.Cartesian3());\n * // A shortcut for\n * // Cartesian3 p = ...\n * // Cesium.Matrix4.multiplyByVector(matrix, new Cesium.Cartesian4(p.x, p.y, p.z, 0.0), result);\n */\nMatrix4.multiplyByPointAsVector = function (matrix, cartesian, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"cartesian\", cartesian);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const vX = cartesian.x;\n const vY = cartesian.y;\n const vZ = cartesian.z;\n\n const x = matrix[0] * vX + matrix[4] * vY + matrix[8] * vZ;\n const y = matrix[1] * vX + matrix[5] * vY + matrix[9] * vZ;\n const z = matrix[2] * vX + matrix[6] * vY + matrix[10] * vZ;\n\n result.x = x;\n result.y = y;\n result.z = z;\n return result;\n};\n\n/**\n * Computes the product of a matrix and a {@link Cartesian3}. This is equivalent to calling {@link Matrix4.multiplyByVector}\n * with a {@link Cartesian4} with a w component of 1, but returns a {@link Cartesian3} instead of a {@link Cartesian4}.\n *\n * @param {Matrix4} matrix The matrix.\n * @param {Cartesian3} cartesian The point.\n * @param {Cartesian3} result The object onto which to store the result.\n * @returns {Cartesian3} The modified result parameter.\n *\n * @example\n * const p = new Cesium.Cartesian3(1.0, 2.0, 3.0);\n * const result = Cesium.Matrix4.multiplyByPoint(matrix, p, new Cesium.Cartesian3());\n */\nMatrix4.multiplyByPoint = function (matrix, cartesian, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"cartesian\", cartesian);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const vX = cartesian.x;\n const vY = cartesian.y;\n const vZ = cartesian.z;\n\n const x = matrix[0] * vX + matrix[4] * vY + matrix[8] * vZ + matrix[12];\n const y = matrix[1] * vX + matrix[5] * vY + matrix[9] * vZ + matrix[13];\n const z = matrix[2] * vX + matrix[6] * vY + matrix[10] * vZ + matrix[14];\n\n result.x = x;\n result.y = y;\n result.z = z;\n return result;\n};\n\n/**\n * Computes the product of a matrix and a scalar.\n *\n * @param {Matrix4} matrix The matrix.\n * @param {number} scalar The number to multiply by.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n *\n * @example\n * //create a Matrix4 instance which is a scaled version of the supplied Matrix4\n * // m = [10.0, 11.0, 12.0, 13.0]\n * // [14.0, 15.0, 16.0, 17.0]\n * // [18.0, 19.0, 20.0, 21.0]\n * // [22.0, 23.0, 24.0, 25.0]\n *\n * const a = Cesium.Matrix4.multiplyByScalar(m, -2, new Cesium.Matrix4());\n *\n * // m remains the same\n * // a = [-20.0, -22.0, -24.0, -26.0]\n * // [-28.0, -30.0, -32.0, -34.0]\n * // [-36.0, -38.0, -40.0, -42.0]\n * // [-44.0, -46.0, -48.0, -50.0]\n */\nMatrix4.multiplyByScalar = function (matrix, scalar, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.number(\"scalar\", scalar);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result[0] = matrix[0] * scalar;\n result[1] = matrix[1] * scalar;\n result[2] = matrix[2] * scalar;\n result[3] = matrix[3] * scalar;\n result[4] = matrix[4] * scalar;\n result[5] = matrix[5] * scalar;\n result[6] = matrix[6] * scalar;\n result[7] = matrix[7] * scalar;\n result[8] = matrix[8] * scalar;\n result[9] = matrix[9] * scalar;\n result[10] = matrix[10] * scalar;\n result[11] = matrix[11] * scalar;\n result[12] = matrix[12] * scalar;\n result[13] = matrix[13] * scalar;\n result[14] = matrix[14] * scalar;\n result[15] = matrix[15] * scalar;\n return result;\n};\n\n/**\n * Computes a negated copy of the provided matrix.\n *\n * @param {Matrix4} matrix The matrix to negate.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n *\n * @example\n * //create a new Matrix4 instance which is a negation of a Matrix4\n * // m = [10.0, 11.0, 12.0, 13.0]\n * // [14.0, 15.0, 16.0, 17.0]\n * // [18.0, 19.0, 20.0, 21.0]\n * // [22.0, 23.0, 24.0, 25.0]\n *\n * const a = Cesium.Matrix4.negate(m, new Cesium.Matrix4());\n *\n * // m remains the same\n * // a = [-10.0, -11.0, -12.0, -13.0]\n * // [-14.0, -15.0, -16.0, -17.0]\n * // [-18.0, -19.0, -20.0, -21.0]\n * // [-22.0, -23.0, -24.0, -25.0]\n */\nMatrix4.negate = function (matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result[0] = -matrix[0];\n result[1] = -matrix[1];\n result[2] = -matrix[2];\n result[3] = -matrix[3];\n result[4] = -matrix[4];\n result[5] = -matrix[5];\n result[6] = -matrix[6];\n result[7] = -matrix[7];\n result[8] = -matrix[8];\n result[9] = -matrix[9];\n result[10] = -matrix[10];\n result[11] = -matrix[11];\n result[12] = -matrix[12];\n result[13] = -matrix[13];\n result[14] = -matrix[14];\n result[15] = -matrix[15];\n return result;\n};\n\n/**\n * Computes the transpose of the provided matrix.\n *\n * @param {Matrix4} matrix The matrix to transpose.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n *\n * @example\n * //returns transpose of a Matrix4\n * // m = [10.0, 11.0, 12.0, 13.0]\n * // [14.0, 15.0, 16.0, 17.0]\n * // [18.0, 19.0, 20.0, 21.0]\n * // [22.0, 23.0, 24.0, 25.0]\n *\n * const a = Cesium.Matrix4.transpose(m, new Cesium.Matrix4());\n *\n * // m remains the same\n * // a = [10.0, 14.0, 18.0, 22.0]\n * // [11.0, 15.0, 19.0, 23.0]\n * // [12.0, 16.0, 20.0, 24.0]\n * // [13.0, 17.0, 21.0, 25.0]\n */\nMatrix4.transpose = function (matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const matrix1 = matrix[1];\n const matrix2 = matrix[2];\n const matrix3 = matrix[3];\n const matrix6 = matrix[6];\n const matrix7 = matrix[7];\n const matrix11 = matrix[11];\n\n result[0] = matrix[0];\n result[1] = matrix[4];\n result[2] = matrix[8];\n result[3] = matrix[12];\n result[4] = matrix1;\n result[5] = matrix[5];\n result[6] = matrix[9];\n result[7] = matrix[13];\n result[8] = matrix2;\n result[9] = matrix6;\n result[10] = matrix[10];\n result[11] = matrix[14];\n result[12] = matrix3;\n result[13] = matrix7;\n result[14] = matrix11;\n result[15] = matrix[15];\n return result;\n};\n\n/**\n * Computes a matrix, which contains the absolute (unsigned) values of the provided matrix's elements.\n *\n * @param {Matrix4} matrix The matrix with signed elements.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n */\nMatrix4.abs = function (matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result[0] = Math.abs(matrix[0]);\n result[1] = Math.abs(matrix[1]);\n result[2] = Math.abs(matrix[2]);\n result[3] = Math.abs(matrix[3]);\n result[4] = Math.abs(matrix[4]);\n result[5] = Math.abs(matrix[5]);\n result[6] = Math.abs(matrix[6]);\n result[7] = Math.abs(matrix[7]);\n result[8] = Math.abs(matrix[8]);\n result[9] = Math.abs(matrix[9]);\n result[10] = Math.abs(matrix[10]);\n result[11] = Math.abs(matrix[11]);\n result[12] = Math.abs(matrix[12]);\n result[13] = Math.abs(matrix[13]);\n result[14] = Math.abs(matrix[14]);\n result[15] = Math.abs(matrix[15]);\n\n return result;\n};\n\n/**\n * Compares the provided matrices componentwise and returns\n * true if they are equal, false otherwise.\n *\n * @param {Matrix4} [left] The first matrix.\n * @param {Matrix4} [right] The second matrix.\n * @returns {boolean} true if left and right are equal, false otherwise.\n *\n * @example\n * //compares two Matrix4 instances\n *\n * // a = [10.0, 14.0, 18.0, 22.0]\n * // [11.0, 15.0, 19.0, 23.0]\n * // [12.0, 16.0, 20.0, 24.0]\n * // [13.0, 17.0, 21.0, 25.0]\n *\n * // b = [10.0, 14.0, 18.0, 22.0]\n * // [11.0, 15.0, 19.0, 23.0]\n * // [12.0, 16.0, 20.0, 24.0]\n * // [13.0, 17.0, 21.0, 25.0]\n *\n * if(Cesium.Matrix4.equals(a,b)) {\n * console.log(\"Both matrices are equal\");\n * } else {\n * console.log(\"They are not equal\");\n * }\n *\n * //Prints \"Both matrices are equal\" on the console\n */\nMatrix4.equals = function (left, right) {\n // Given that most matrices will be transformation matrices, the elements\n // are tested in order such that the test is likely to fail as early\n // as possible. I _think_ this is just as friendly to the L1 cache\n // as testing in index order. It is certainty faster in practice.\n return (\n left === right ||\n (defined(left) &&\n defined(right) &&\n // Translation\n left[12] === right[12] &&\n left[13] === right[13] &&\n left[14] === right[14] &&\n // Rotation/scale\n left[0] === right[0] &&\n left[1] === right[1] &&\n left[2] === right[2] &&\n left[4] === right[4] &&\n left[5] === right[5] &&\n left[6] === right[6] &&\n left[8] === right[8] &&\n left[9] === right[9] &&\n left[10] === right[10] &&\n // Bottom row\n left[3] === right[3] &&\n left[7] === right[7] &&\n left[11] === right[11] &&\n left[15] === right[15])\n );\n};\n\n/**\n * Compares the provided matrices componentwise and returns\n * true if they are within the provided epsilon,\n * false otherwise.\n *\n * @param {Matrix4} [left] The first matrix.\n * @param {Matrix4} [right] The second matrix.\n * @param {number} [epsilon=0] The epsilon to use for equality testing.\n * @returns {boolean} true if left and right are within the provided epsilon, false otherwise.\n *\n * @example\n * //compares two Matrix4 instances\n *\n * // a = [10.5, 14.5, 18.5, 22.5]\n * // [11.5, 15.5, 19.5, 23.5]\n * // [12.5, 16.5, 20.5, 24.5]\n * // [13.5, 17.5, 21.5, 25.5]\n *\n * // b = [10.0, 14.0, 18.0, 22.0]\n * // [11.0, 15.0, 19.0, 23.0]\n * // [12.0, 16.0, 20.0, 24.0]\n * // [13.0, 17.0, 21.0, 25.0]\n *\n * if(Cesium.Matrix4.equalsEpsilon(a,b,0.1)){\n * console.log(\"Difference between both the matrices is less than 0.1\");\n * } else {\n * console.log(\"Difference between both the matrices is not less than 0.1\");\n * }\n *\n * //Prints \"Difference between both the matrices is not less than 0.1\" on the console\n */\nMatrix4.equalsEpsilon = function (left, right, epsilon) {\n epsilon = defaultValue(epsilon, 0);\n\n return (\n left === right ||\n (defined(left) &&\n defined(right) &&\n Math.abs(left[0] - right[0]) <= epsilon &&\n Math.abs(left[1] - right[1]) <= epsilon &&\n Math.abs(left[2] - right[2]) <= epsilon &&\n Math.abs(left[3] - right[3]) <= epsilon &&\n Math.abs(left[4] - right[4]) <= epsilon &&\n Math.abs(left[5] - right[5]) <= epsilon &&\n Math.abs(left[6] - right[6]) <= epsilon &&\n Math.abs(left[7] - right[7]) <= epsilon &&\n Math.abs(left[8] - right[8]) <= epsilon &&\n Math.abs(left[9] - right[9]) <= epsilon &&\n Math.abs(left[10] - right[10]) <= epsilon &&\n Math.abs(left[11] - right[11]) <= epsilon &&\n Math.abs(left[12] - right[12]) <= epsilon &&\n Math.abs(left[13] - right[13]) <= epsilon &&\n Math.abs(left[14] - right[14]) <= epsilon &&\n Math.abs(left[15] - right[15]) <= epsilon)\n );\n};\n\n/**\n * Gets the translation portion of the provided matrix, assuming the matrix is an affine transformation matrix.\n *\n * @param {Matrix4} matrix The matrix to use.\n * @param {Cartesian3} result The object onto which to store the result.\n * @returns {Cartesian3} The modified result parameter.\n */\nMatrix4.getTranslation = function (matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result.x = matrix[12];\n result.y = matrix[13];\n result.z = matrix[14];\n return result;\n};\n\n/**\n * Gets the upper left 3x3 matrix of the provided matrix.\n *\n * @param {Matrix4} matrix The matrix to use.\n * @param {Matrix3} result The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter.\n *\n * @example\n * // returns a Matrix3 instance from a Matrix4 instance\n *\n * // m = [10.0, 14.0, 18.0, 22.0]\n * // [11.0, 15.0, 19.0, 23.0]\n * // [12.0, 16.0, 20.0, 24.0]\n * // [13.0, 17.0, 21.0, 25.0]\n *\n * const b = new Cesium.Matrix3();\n * Cesium.Matrix4.getMatrix3(m,b);\n *\n * // b = [10.0, 14.0, 18.0]\n * // [11.0, 15.0, 19.0]\n * // [12.0, 16.0, 20.0]\n */\nMatrix4.getMatrix3 = function (matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result[0] = matrix[0];\n result[1] = matrix[1];\n result[2] = matrix[2];\n result[3] = matrix[4];\n result[4] = matrix[5];\n result[5] = matrix[6];\n result[6] = matrix[8];\n result[7] = matrix[9];\n result[8] = matrix[10];\n return result;\n};\n\nconst scratchInverseRotation = new Matrix3();\nconst scratchMatrix3Zero = new Matrix3();\nconst scratchBottomRow = new Cartesian4();\nconst scratchExpectedBottomRow = new Cartesian4(0.0, 0.0, 0.0, 1.0);\n\n/**\n * Computes the inverse of the provided matrix using Cramers Rule.\n * If the determinant is zero, the matrix can not be inverted, and an exception is thrown.\n * If the matrix is a proper rigid transformation, it is more efficient\n * to invert it with {@link Matrix4.inverseTransformation}.\n *\n * @param {Matrix4} matrix The matrix to invert.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n *\n * @exception {RuntimeError} matrix is not invertible because its determinate is zero.\n */\nMatrix4.inverse = function (matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n //\n // Ported from:\n // ftp://download.intel.com/design/PentiumIII/sml/24504301.pdf\n //\n const src0 = matrix[0];\n const src1 = matrix[4];\n const src2 = matrix[8];\n const src3 = matrix[12];\n const src4 = matrix[1];\n const src5 = matrix[5];\n const src6 = matrix[9];\n const src7 = matrix[13];\n const src8 = matrix[2];\n const src9 = matrix[6];\n const src10 = matrix[10];\n const src11 = matrix[14];\n const src12 = matrix[3];\n const src13 = matrix[7];\n const src14 = matrix[11];\n const src15 = matrix[15];\n\n // calculate pairs for first 8 elements (cofactors)\n let tmp0 = src10 * src15;\n let tmp1 = src11 * src14;\n let tmp2 = src9 * src15;\n let tmp3 = src11 * src13;\n let tmp4 = src9 * src14;\n let tmp5 = src10 * src13;\n let tmp6 = src8 * src15;\n let tmp7 = src11 * src12;\n let tmp8 = src8 * src14;\n let tmp9 = src10 * src12;\n let tmp10 = src8 * src13;\n let tmp11 = src9 * src12;\n\n // calculate first 8 elements (cofactors)\n const dst0 =\n tmp0 * src5 +\n tmp3 * src6 +\n tmp4 * src7 -\n (tmp1 * src5 + tmp2 * src6 + tmp5 * src7);\n const dst1 =\n tmp1 * src4 +\n tmp6 * src6 +\n tmp9 * src7 -\n (tmp0 * src4 + tmp7 * src6 + tmp8 * src7);\n const dst2 =\n tmp2 * src4 +\n tmp7 * src5 +\n tmp10 * src7 -\n (tmp3 * src4 + tmp6 * src5 + tmp11 * src7);\n const dst3 =\n tmp5 * src4 +\n tmp8 * src5 +\n tmp11 * src6 -\n (tmp4 * src4 + tmp9 * src5 + tmp10 * src6);\n const dst4 =\n tmp1 * src1 +\n tmp2 * src2 +\n tmp5 * src3 -\n (tmp0 * src1 + tmp3 * src2 + tmp4 * src3);\n const dst5 =\n tmp0 * src0 +\n tmp7 * src2 +\n tmp8 * src3 -\n (tmp1 * src0 + tmp6 * src2 + tmp9 * src3);\n const dst6 =\n tmp3 * src0 +\n tmp6 * src1 +\n tmp11 * src3 -\n (tmp2 * src0 + tmp7 * src1 + tmp10 * src3);\n const dst7 =\n tmp4 * src0 +\n tmp9 * src1 +\n tmp10 * src2 -\n (tmp5 * src0 + tmp8 * src1 + tmp11 * src2);\n\n // calculate pairs for second 8 elements (cofactors)\n tmp0 = src2 * src7;\n tmp1 = src3 * src6;\n tmp2 = src1 * src7;\n tmp3 = src3 * src5;\n tmp4 = src1 * src6;\n tmp5 = src2 * src5;\n tmp6 = src0 * src7;\n tmp7 = src3 * src4;\n tmp8 = src0 * src6;\n tmp9 = src2 * src4;\n tmp10 = src0 * src5;\n tmp11 = src1 * src4;\n\n // calculate second 8 elements (cofactors)\n const dst8 =\n tmp0 * src13 +\n tmp3 * src14 +\n tmp4 * src15 -\n (tmp1 * src13 + tmp2 * src14 + tmp5 * src15);\n const dst9 =\n tmp1 * src12 +\n tmp6 * src14 +\n tmp9 * src15 -\n (tmp0 * src12 + tmp7 * src14 + tmp8 * src15);\n const dst10 =\n tmp2 * src12 +\n tmp7 * src13 +\n tmp10 * src15 -\n (tmp3 * src12 + tmp6 * src13 + tmp11 * src15);\n const dst11 =\n tmp5 * src12 +\n tmp8 * src13 +\n tmp11 * src14 -\n (tmp4 * src12 + tmp9 * src13 + tmp10 * src14);\n const dst12 =\n tmp2 * src10 +\n tmp5 * src11 +\n tmp1 * src9 -\n (tmp4 * src11 + tmp0 * src9 + tmp3 * src10);\n const dst13 =\n tmp8 * src11 +\n tmp0 * src8 +\n tmp7 * src10 -\n (tmp6 * src10 + tmp9 * src11 + tmp1 * src8);\n const dst14 =\n tmp6 * src9 +\n tmp11 * src11 +\n tmp3 * src8 -\n (tmp10 * src11 + tmp2 * src8 + tmp7 * src9);\n const dst15 =\n tmp10 * src10 +\n tmp4 * src8 +\n tmp9 * src9 -\n (tmp8 * src9 + tmp11 * src10 + tmp5 * src8);\n\n // calculate determinant\n let det = src0 * dst0 + src1 * dst1 + src2 * dst2 + src3 * dst3;\n\n if (Math.abs(det) < CesiumMath.EPSILON21) {\n // Special case for a zero scale matrix that can occur, for example,\n // when a model's node has a [0, 0, 0] scale.\n if (\n Matrix3.equalsEpsilon(\n Matrix4.getMatrix3(matrix, scratchInverseRotation),\n scratchMatrix3Zero,\n CesiumMath.EPSILON7,\n ) &&\n Cartesian4.equals(\n Matrix4.getRow(matrix, 3, scratchBottomRow),\n scratchExpectedBottomRow,\n )\n ) {\n result[0] = 0.0;\n result[1] = 0.0;\n result[2] = 0.0;\n result[3] = 0.0;\n result[4] = 0.0;\n result[5] = 0.0;\n result[6] = 0.0;\n result[7] = 0.0;\n result[8] = 0.0;\n result[9] = 0.0;\n result[10] = 0.0;\n result[11] = 0.0;\n result[12] = -matrix[12];\n result[13] = -matrix[13];\n result[14] = -matrix[14];\n result[15] = 1.0;\n return result;\n }\n\n throw new RuntimeError(\n \"matrix is not invertible because its determinate is zero.\",\n );\n }\n\n // calculate matrix inverse\n det = 1.0 / det;\n\n result[0] = dst0 * det;\n result[1] = dst1 * det;\n result[2] = dst2 * det;\n result[3] = dst3 * det;\n result[4] = dst4 * det;\n result[5] = dst5 * det;\n result[6] = dst6 * det;\n result[7] = dst7 * det;\n result[8] = dst8 * det;\n result[9] = dst9 * det;\n result[10] = dst10 * det;\n result[11] = dst11 * det;\n result[12] = dst12 * det;\n result[13] = dst13 * det;\n result[14] = dst14 * det;\n result[15] = dst15 * det;\n return result;\n};\n\n/**\n * Computes the inverse of the provided matrix assuming it is a proper rigid matrix,\n * where the upper left 3x3 elements are a rotation matrix,\n * and the upper three elements in the fourth column are the translation.\n * The bottom row is assumed to be [0, 0, 0, 1].\n * The matrix is not verified to be in the proper form.\n * This method is faster than computing the inverse for a general 4x4\n * matrix using {@link Matrix4.inverse}.\n *\n * @param {Matrix4} matrix The matrix to invert.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n */\nMatrix4.inverseTransformation = function (matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n //This function is an optimized version of the below 4 lines.\n //const rT = Matrix3.transpose(Matrix4.getMatrix3(matrix));\n //const rTN = Matrix3.negate(rT);\n //const rTT = Matrix3.multiplyByVector(rTN, Matrix4.getTranslation(matrix));\n //return Matrix4.fromRotationTranslation(rT, rTT, result);\n\n const matrix0 = matrix[0];\n const matrix1 = matrix[1];\n const matrix2 = matrix[2];\n const matrix4 = matrix[4];\n const matrix5 = matrix[5];\n const matrix6 = matrix[6];\n const matrix8 = matrix[8];\n const matrix9 = matrix[9];\n const matrix10 = matrix[10];\n\n const vX = matrix[12];\n const vY = matrix[13];\n const vZ = matrix[14];\n\n const x = -matrix0 * vX - matrix1 * vY - matrix2 * vZ;\n const y = -matrix4 * vX - matrix5 * vY - matrix6 * vZ;\n const z = -matrix8 * vX - matrix9 * vY - matrix10 * vZ;\n\n result[0] = matrix0;\n result[1] = matrix4;\n result[2] = matrix8;\n result[3] = 0.0;\n result[4] = matrix1;\n result[5] = matrix5;\n result[6] = matrix9;\n result[7] = 0.0;\n result[8] = matrix2;\n result[9] = matrix6;\n result[10] = matrix10;\n result[11] = 0.0;\n result[12] = x;\n result[13] = y;\n result[14] = z;\n result[15] = 1.0;\n return result;\n};\n\nconst scratchTransposeMatrix = new Matrix4();\n\n/**\n * Computes the inverse transpose of a matrix.\n *\n * @param {Matrix4} matrix The matrix to transpose and invert.\n * @param {Matrix4} result The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter.\n */\nMatrix4.inverseTranspose = function (matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n return Matrix4.inverse(\n Matrix4.transpose(matrix, scratchTransposeMatrix),\n result,\n );\n};\n\n/**\n * An immutable Matrix4 instance initialized to the identity matrix.\n *\n * @type {Matrix4}\n * @constant\n */\nMatrix4.IDENTITY = Object.freeze(\n new Matrix4(\n 1.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 1.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 1.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 1.0,\n ),\n);\n\n/**\n * An immutable Matrix4 instance initialized to the zero matrix.\n *\n * @type {Matrix4}\n * @constant\n */\nMatrix4.ZERO = Object.freeze(\n new Matrix4(\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n ),\n);\n\n/**\n * The index into Matrix4 for column 0, row 0.\n *\n * @type {number}\n * @constant\n */\nMatrix4.COLUMN0ROW0 = 0;\n\n/**\n * The index into Matrix4 for column 0, row 1.\n *\n * @type {number}\n * @constant\n */\nMatrix4.COLUMN0ROW1 = 1;\n\n/**\n * The index into Matrix4 for column 0, row 2.\n *\n * @type {number}\n * @constant\n */\nMatrix4.COLUMN0ROW2 = 2;\n\n/**\n * The index into Matrix4 for column 0, row 3.\n *\n * @type {number}\n * @constant\n */\nMatrix4.COLUMN0ROW3 = 3;\n\n/**\n * The index into Matrix4 for column 1, row 0.\n *\n * @type {number}\n * @constant\n */\nMatrix4.COLUMN1ROW0 = 4;\n\n/**\n * The index into Matrix4 for column 1, row 1.\n *\n * @type {number}\n * @constant\n */\nMatrix4.COLUMN1ROW1 = 5;\n\n/**\n * The index into Matrix4 for column 1, row 2.\n *\n * @type {number}\n * @constant\n */\nMatrix4.COLUMN1ROW2 = 6;\n\n/**\n * The index into Matrix4 for column 1, row 3.\n *\n * @type {number}\n * @constant\n */\nMatrix4.COLUMN1ROW3 = 7;\n\n/**\n * The index into Matrix4 for column 2, row 0.\n *\n * @type {number}\n * @constant\n */\nMatrix4.COLUMN2ROW0 = 8;\n\n/**\n * The index into Matrix4 for column 2, row 1.\n *\n * @type {number}\n * @constant\n */\nMatrix4.COLUMN2ROW1 = 9;\n\n/**\n * The index into Matrix4 for column 2, row 2.\n *\n * @type {number}\n * @constant\n */\nMatrix4.COLUMN2ROW2 = 10;\n\n/**\n * The index into Matrix4 for column 2, row 3.\n *\n * @type {number}\n * @constant\n */\nMatrix4.COLUMN2ROW3 = 11;\n\n/**\n * The index into Matrix4 for column 3, row 0.\n *\n * @type {number}\n * @constant\n */\nMatrix4.COLUMN3ROW0 = 12;\n\n/**\n * The index into Matrix4 for column 3, row 1.\n *\n * @type {number}\n * @constant\n */\nMatrix4.COLUMN3ROW1 = 13;\n\n/**\n * The index into Matrix4 for column 3, row 2.\n *\n * @type {number}\n * @constant\n */\nMatrix4.COLUMN3ROW2 = 14;\n\n/**\n * The index into Matrix4 for column 3, row 3.\n *\n * @type {number}\n * @constant\n */\nMatrix4.COLUMN3ROW3 = 15;\n\nObject.defineProperties(Matrix4.prototype, {\n /**\n * Gets the number of items in the collection.\n * @memberof Matrix4.prototype\n *\n * @type {number}\n */\n length: {\n get: function () {\n return Matrix4.packedLength;\n },\n },\n});\n\n/**\n * Duplicates the provided Matrix4 instance.\n *\n * @param {Matrix4} [result] The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter or a new Matrix4 instance if one was not provided.\n */\nMatrix4.prototype.clone = function (result) {\n return Matrix4.clone(this, result);\n};\n\n/**\n * Compares this matrix to the provided matrix componentwise and returns\n * true if they are equal, false otherwise.\n *\n * @param {Matrix4} [right] The right hand side matrix.\n * @returns {boolean} true if they are equal, false otherwise.\n */\nMatrix4.prototype.equals = function (right) {\n return Matrix4.equals(this, right);\n};\n\n/**\n * @private\n */\nMatrix4.equalsArray = function (matrix, array, offset) {\n return (\n matrix[0] === array[offset] &&\n matrix[1] === array[offset + 1] &&\n matrix[2] === array[offset + 2] &&\n matrix[3] === array[offset + 3] &&\n matrix[4] === array[offset + 4] &&\n matrix[5] === array[offset + 5] &&\n matrix[6] === array[offset + 6] &&\n matrix[7] === array[offset + 7] &&\n matrix[8] === array[offset + 8] &&\n matrix[9] === array[offset + 9] &&\n matrix[10] === array[offset + 10] &&\n matrix[11] === array[offset + 11] &&\n matrix[12] === array[offset + 12] &&\n matrix[13] === array[offset + 13] &&\n matrix[14] === array[offset + 14] &&\n matrix[15] === array[offset + 15]\n );\n};\n\n/**\n * Compares this matrix to the provided matrix componentwise and returns\n * true if they are within the provided epsilon,\n * false otherwise.\n *\n * @param {Matrix4} [right] The right hand side matrix.\n * @param {number} [epsilon=0] The epsilon to use for equality testing.\n * @returns {boolean} true if they are within the provided epsilon, false otherwise.\n */\nMatrix4.prototype.equalsEpsilon = function (right, epsilon) {\n return Matrix4.equalsEpsilon(this, right, epsilon);\n};\n\n/**\n * Computes a string representing this Matrix with each row being\n * on a separate line and in the format '(column0, column1, column2, column3)'.\n *\n * @returns {string} A string representing the provided Matrix with each row being on a separate line and in the format '(column0, column1, column2, column3)'.\n */\nMatrix4.prototype.toString = function () {\n return (\n `(${this[0]}, ${this[4]}, ${this[8]}, ${this[12]})\\n` +\n `(${this[1]}, ${this[5]}, ${this[9]}, ${this[13]})\\n` +\n `(${this[2]}, ${this[6]}, ${this[10]}, ${this[14]})\\n` +\n `(${this[3]}, ${this[7]}, ${this[11]}, ${this[15]})`\n );\n};\nexport default Matrix4;\n","import Check from \"./Check.js\";\nimport defaultValue from \"./defaultValue.js\";\nimport defined from \"./defined.js\";\nimport DeveloperError from \"./DeveloperError.js\";\nimport CesiumMath from \"./Math.js\";\n\n/**\n * A 4D Cartesian point.\n * @alias Cartesian4\n * @constructor\n *\n * @param {number} [x=0.0] The X component.\n * @param {number} [y=0.0] The Y component.\n * @param {number} [z=0.0] The Z component.\n * @param {number} [w=0.0] The W component.\n *\n * @see Cartesian2\n * @see Cartesian3\n * @see Packable\n */\nfunction Cartesian4(x, y, z, w) {\n /**\n * The X component.\n * @type {number}\n * @default 0.0\n */\n this.x = defaultValue(x, 0.0);\n\n /**\n * The Y component.\n * @type {number}\n * @default 0.0\n */\n this.y = defaultValue(y, 0.0);\n\n /**\n * The Z component.\n * @type {number}\n * @default 0.0\n */\n this.z = defaultValue(z, 0.0);\n\n /**\n * The W component.\n * @type {number}\n * @default 0.0\n */\n this.w = defaultValue(w, 0.0);\n}\n\n/**\n * Creates a Cartesian4 instance from x, y, z and w coordinates.\n *\n * @param {number} x The x coordinate.\n * @param {number} y The y coordinate.\n * @param {number} z The z coordinate.\n * @param {number} w The w coordinate.\n * @param {Cartesian4} [result] The object onto which to store the result.\n * @returns {Cartesian4} The modified result parameter or a new Cartesian4 instance if one was not provided.\n */\nCartesian4.fromElements = function (x, y, z, w, result) {\n if (!defined(result)) {\n return new Cartesian4(x, y, z, w);\n }\n\n result.x = x;\n result.y = y;\n result.z = z;\n result.w = w;\n return result;\n};\n\n/**\n * Creates a Cartesian4 instance from a {@link Color}. red, green, blue,\n * and alpha map to x, y, z, and w, respectively.\n *\n * @param {Color} color The source color.\n * @param {Cartesian4} [result] The object onto which to store the result.\n * @returns {Cartesian4} The modified result parameter or a new Cartesian4 instance if one was not provided.\n */\nCartesian4.fromColor = function (color, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"color\", color);\n //>>includeEnd('debug');\n if (!defined(result)) {\n return new Cartesian4(color.red, color.green, color.blue, color.alpha);\n }\n\n result.x = color.red;\n result.y = color.green;\n result.z = color.blue;\n result.w = color.alpha;\n return result;\n};\n\n/**\n * Duplicates a Cartesian4 instance.\n *\n * @param {Cartesian4} cartesian The Cartesian to duplicate.\n * @param {Cartesian4} [result] The object onto which to store the result.\n * @returns {Cartesian4} The modified result parameter or a new Cartesian4 instance if one was not provided. (Returns undefined if cartesian is undefined)\n */\nCartesian4.clone = function (cartesian, result) {\n if (!defined(cartesian)) {\n return undefined;\n }\n\n if (!defined(result)) {\n return new Cartesian4(cartesian.x, cartesian.y, cartesian.z, cartesian.w);\n }\n\n result.x = cartesian.x;\n result.y = cartesian.y;\n result.z = cartesian.z;\n result.w = cartesian.w;\n return result;\n};\n\n/**\n * The number of elements used to pack the object into an array.\n * @type {number}\n */\nCartesian4.packedLength = 4;\n\n/**\n * Stores the provided instance into the provided array.\n *\n * @param {Cartesian4} value The value to pack.\n * @param {number[]} array The array to pack into.\n * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.\n *\n * @returns {number[]} The array that was packed into\n */\nCartesian4.pack = function (value, array, startingIndex) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"value\", value);\n Check.defined(\"array\", array);\n //>>includeEnd('debug');\n\n startingIndex = defaultValue(startingIndex, 0);\n\n array[startingIndex++] = value.x;\n array[startingIndex++] = value.y;\n array[startingIndex++] = value.z;\n array[startingIndex] = value.w;\n\n return array;\n};\n\n/**\n * Retrieves an instance from a packed array.\n *\n * @param {number[]} array The packed array.\n * @param {number} [startingIndex=0] The starting index of the element to be unpacked.\n * @param {Cartesian4} [result] The object into which to store the result.\n * @returns {Cartesian4} The modified result parameter or a new Cartesian4 instance if one was not provided.\n */\nCartesian4.unpack = function (array, startingIndex, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.defined(\"array\", array);\n //>>includeEnd('debug');\n\n startingIndex = defaultValue(startingIndex, 0);\n\n if (!defined(result)) {\n result = new Cartesian4();\n }\n result.x = array[startingIndex++];\n result.y = array[startingIndex++];\n result.z = array[startingIndex++];\n result.w = array[startingIndex];\n return result;\n};\n\n/**\n * Flattens an array of Cartesian4s into an array of components.\n *\n * @param {Cartesian4[]} array The array of cartesians to pack.\n * @param {number[]} [result] The array onto which to store the result. If this is a typed array, it must have array.length * 4 components, else a {@link DeveloperError} will be thrown. If it is a regular array, it will be resized to have (array.length * 4) elements.\n * @returns {number[]} The packed array.\n */\nCartesian4.packArray = function (array, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.defined(\"array\", array);\n //>>includeEnd('debug');\n\n const length = array.length;\n const resultLength = length * 4;\n if (!defined(result)) {\n result = new Array(resultLength);\n } else if (!Array.isArray(result) && result.length !== resultLength) {\n //>>includeStart('debug', pragmas.debug);\n throw new DeveloperError(\n \"If result is a typed array, it must have exactly array.length * 4 elements\",\n );\n //>>includeEnd('debug');\n } else if (result.length !== resultLength) {\n result.length = resultLength;\n }\n\n for (let i = 0; i < length; ++i) {\n Cartesian4.pack(array[i], result, i * 4);\n }\n return result;\n};\n\n/**\n * Unpacks an array of cartesian components into an array of Cartesian4s.\n *\n * @param {number[]} array The array of components to unpack.\n * @param {Cartesian4[]} [result] The array onto which to store the result.\n * @returns {Cartesian4[]} The unpacked array.\n */\nCartesian4.unpackArray = function (array, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.defined(\"array\", array);\n Check.typeOf.number.greaterThanOrEquals(\"array.length\", array.length, 4);\n if (array.length % 4 !== 0) {\n throw new DeveloperError(\"array length must be a multiple of 4.\");\n }\n //>>includeEnd('debug');\n\n const length = array.length;\n if (!defined(result)) {\n result = new Array(length / 4);\n } else {\n result.length = length / 4;\n }\n\n for (let i = 0; i < length; i += 4) {\n const index = i / 4;\n result[index] = Cartesian4.unpack(array, i, result[index]);\n }\n return result;\n};\n\n/**\n * Creates a Cartesian4 from four consecutive elements in an array.\n * @function\n *\n * @param {number[]} array The array whose four consecutive elements correspond to the x, y, z, and w components, respectively.\n * @param {number} [startingIndex=0] The offset into the array of the first element, which corresponds to the x component.\n * @param {Cartesian4} [result] The object onto which to store the result.\n * @returns {Cartesian4} The modified result parameter or a new Cartesian4 instance if one was not provided.\n *\n * @example\n * // Create a Cartesian4 with (1.0, 2.0, 3.0, 4.0)\n * const v = [1.0, 2.0, 3.0, 4.0];\n * const p = Cesium.Cartesian4.fromArray(v);\n *\n * // Create a Cartesian4 with (1.0, 2.0, 3.0, 4.0) using an offset into an array\n * const v2 = [0.0, 0.0, 1.0, 2.0, 3.0, 4.0];\n * const p2 = Cesium.Cartesian4.fromArray(v2, 2);\n */\nCartesian4.fromArray = Cartesian4.unpack;\n\n/**\n * Computes the value of the maximum component for the supplied Cartesian.\n *\n * @param {Cartesian4} cartesian The cartesian to use.\n * @returns {number} The value of the maximum component.\n */\nCartesian4.maximumComponent = function (cartesian) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"cartesian\", cartesian);\n //>>includeEnd('debug');\n\n return Math.max(cartesian.x, cartesian.y, cartesian.z, cartesian.w);\n};\n\n/**\n * Computes the value of the minimum component for the supplied Cartesian.\n *\n * @param {Cartesian4} cartesian The cartesian to use.\n * @returns {number} The value of the minimum component.\n */\nCartesian4.minimumComponent = function (cartesian) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"cartesian\", cartesian);\n //>>includeEnd('debug');\n\n return Math.min(cartesian.x, cartesian.y, cartesian.z, cartesian.w);\n};\n\n/**\n * Compares two Cartesians and computes a Cartesian which contains the minimum components of the supplied Cartesians.\n *\n * @param {Cartesian4} first A cartesian to compare.\n * @param {Cartesian4} second A cartesian to compare.\n * @param {Cartesian4} result The object into which to store the result.\n * @returns {Cartesian4} A cartesian with the minimum components.\n */\nCartesian4.minimumByComponent = function (first, second, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"first\", first);\n Check.typeOf.object(\"second\", second);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result.x = Math.min(first.x, second.x);\n result.y = Math.min(first.y, second.y);\n result.z = Math.min(first.z, second.z);\n result.w = Math.min(first.w, second.w);\n\n return result;\n};\n\n/**\n * Compares two Cartesians and computes a Cartesian which contains the maximum components of the supplied Cartesians.\n *\n * @param {Cartesian4} first A cartesian to compare.\n * @param {Cartesian4} second A cartesian to compare.\n * @param {Cartesian4} result The object into which to store the result.\n * @returns {Cartesian4} A cartesian with the maximum components.\n */\nCartesian4.maximumByComponent = function (first, second, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"first\", first);\n Check.typeOf.object(\"second\", second);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result.x = Math.max(first.x, second.x);\n result.y = Math.max(first.y, second.y);\n result.z = Math.max(first.z, second.z);\n result.w = Math.max(first.w, second.w);\n\n return result;\n};\n\n/**\n * Constrain a value to lie between two values.\n *\n * @param {Cartesian4} value The value to clamp.\n * @param {Cartesian4} min The minimum bound.\n * @param {Cartesian4} max The maximum bound.\n * @param {Cartesian4} result The object into which to store the result.\n * @returns {Cartesian4} The clamped value such that min <= result <= max.\n */\nCartesian4.clamp = function (value, min, max, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"value\", value);\n Check.typeOf.object(\"min\", min);\n Check.typeOf.object(\"max\", max);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const x = CesiumMath.clamp(value.x, min.x, max.x);\n const y = CesiumMath.clamp(value.y, min.y, max.y);\n const z = CesiumMath.clamp(value.z, min.z, max.z);\n const w = CesiumMath.clamp(value.w, min.w, max.w);\n\n result.x = x;\n result.y = y;\n result.z = z;\n result.w = w;\n\n return result;\n};\n\n/**\n * Computes the provided Cartesian's squared magnitude.\n *\n * @param {Cartesian4} cartesian The Cartesian instance whose squared magnitude is to be computed.\n * @returns {number} The squared magnitude.\n */\nCartesian4.magnitudeSquared = function (cartesian) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"cartesian\", cartesian);\n //>>includeEnd('debug');\n\n return (\n cartesian.x * cartesian.x +\n cartesian.y * cartesian.y +\n cartesian.z * cartesian.z +\n cartesian.w * cartesian.w\n );\n};\n\n/**\n * Computes the Cartesian's magnitude (length).\n *\n * @param {Cartesian4} cartesian The Cartesian instance whose magnitude is to be computed.\n * @returns {number} The magnitude.\n */\nCartesian4.magnitude = function (cartesian) {\n return Math.sqrt(Cartesian4.magnitudeSquared(cartesian));\n};\n\nconst distanceScratch = new Cartesian4();\n\n/**\n * Computes the 4-space distance between two points.\n *\n * @param {Cartesian4} left The first point to compute the distance from.\n * @param {Cartesian4} right The second point to compute the distance to.\n * @returns {number} The distance between two points.\n *\n * @example\n * // Returns 1.0\n * const d = Cesium.Cartesian4.distance(\n * new Cesium.Cartesian4(1.0, 0.0, 0.0, 0.0),\n * new Cesium.Cartesian4(2.0, 0.0, 0.0, 0.0));\n */\nCartesian4.distance = function (left, right) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"left\", left);\n Check.typeOf.object(\"right\", right);\n //>>includeEnd('debug');\n\n Cartesian4.subtract(left, right, distanceScratch);\n return Cartesian4.magnitude(distanceScratch);\n};\n\n/**\n * Computes the squared distance between two points. Comparing squared distances\n * using this function is more efficient than comparing distances using {@link Cartesian4#distance}.\n *\n * @param {Cartesian4} left The first point to compute the distance from.\n * @param {Cartesian4} right The second point to compute the distance to.\n * @returns {number} The distance between two points.\n *\n * @example\n * // Returns 4.0, not 2.0\n * const d = Cesium.Cartesian4.distance(\n * new Cesium.Cartesian4(1.0, 0.0, 0.0, 0.0),\n * new Cesium.Cartesian4(3.0, 0.0, 0.0, 0.0));\n */\nCartesian4.distanceSquared = function (left, right) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"left\", left);\n Check.typeOf.object(\"right\", right);\n //>>includeEnd('debug');\n\n Cartesian4.subtract(left, right, distanceScratch);\n return Cartesian4.magnitudeSquared(distanceScratch);\n};\n\n/**\n * Computes the normalized form of the supplied Cartesian.\n *\n * @param {Cartesian4} cartesian The Cartesian to be normalized.\n * @param {Cartesian4} result The object onto which to store the result.\n * @returns {Cartesian4} The modified result parameter.\n */\nCartesian4.normalize = function (cartesian, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"cartesian\", cartesian);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const magnitude = Cartesian4.magnitude(cartesian);\n\n result.x = cartesian.x / magnitude;\n result.y = cartesian.y / magnitude;\n result.z = cartesian.z / magnitude;\n result.w = cartesian.w / magnitude;\n\n //>>includeStart('debug', pragmas.debug);\n if (\n isNaN(result.x) ||\n isNaN(result.y) ||\n isNaN(result.z) ||\n isNaN(result.w)\n ) {\n throw new DeveloperError(\"normalized result is not a number\");\n }\n //>>includeEnd('debug');\n\n return result;\n};\n\n/**\n * Computes the dot (scalar) product of two Cartesians.\n *\n * @param {Cartesian4} left The first Cartesian.\n * @param {Cartesian4} right The second Cartesian.\n * @returns {number} The dot product.\n */\nCartesian4.dot = function (left, right) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"left\", left);\n Check.typeOf.object(\"right\", right);\n //>>includeEnd('debug');\n\n return (\n left.x * right.x + left.y * right.y + left.z * right.z + left.w * right.w\n );\n};\n\n/**\n * Computes the componentwise product of two Cartesians.\n *\n * @param {Cartesian4} left The first Cartesian.\n * @param {Cartesian4} right The second Cartesian.\n * @param {Cartesian4} result The object onto which to store the result.\n * @returns {Cartesian4} The modified result parameter.\n */\nCartesian4.multiplyComponents = function (left, right, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"left\", left);\n Check.typeOf.object(\"right\", right);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result.x = left.x * right.x;\n result.y = left.y * right.y;\n result.z = left.z * right.z;\n result.w = left.w * right.w;\n return result;\n};\n\n/**\n * Computes the componentwise quotient of two Cartesians.\n *\n * @param {Cartesian4} left The first Cartesian.\n * @param {Cartesian4} right The second Cartesian.\n * @param {Cartesian4} result The object onto which to store the result.\n * @returns {Cartesian4} The modified result parameter.\n */\nCartesian4.divideComponents = function (left, right, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"left\", left);\n Check.typeOf.object(\"right\", right);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result.x = left.x / right.x;\n result.y = left.y / right.y;\n result.z = left.z / right.z;\n result.w = left.w / right.w;\n return result;\n};\n\n/**\n * Computes the componentwise sum of two Cartesians.\n *\n * @param {Cartesian4} left The first Cartesian.\n * @param {Cartesian4} right The second Cartesian.\n * @param {Cartesian4} result The object onto which to store the result.\n * @returns {Cartesian4} The modified result parameter.\n */\nCartesian4.add = function (left, right, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"left\", left);\n Check.typeOf.object(\"right\", right);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result.x = left.x + right.x;\n result.y = left.y + right.y;\n result.z = left.z + right.z;\n result.w = left.w + right.w;\n return result;\n};\n\n/**\n * Computes the componentwise difference of two Cartesians.\n *\n * @param {Cartesian4} left The first Cartesian.\n * @param {Cartesian4} right The second Cartesian.\n * @param {Cartesian4} result The object onto which to store the result.\n * @returns {Cartesian4} The modified result parameter.\n */\nCartesian4.subtract = function (left, right, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"left\", left);\n Check.typeOf.object(\"right\", right);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result.x = left.x - right.x;\n result.y = left.y - right.y;\n result.z = left.z - right.z;\n result.w = left.w - right.w;\n return result;\n};\n\n/**\n * Multiplies the provided Cartesian componentwise by the provided scalar.\n *\n * @param {Cartesian4} cartesian The Cartesian to be scaled.\n * @param {number} scalar The scalar to multiply with.\n * @param {Cartesian4} result The object onto which to store the result.\n * @returns {Cartesian4} The modified result parameter.\n */\nCartesian4.multiplyByScalar = function (cartesian, scalar, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"cartesian\", cartesian);\n Check.typeOf.number(\"scalar\", scalar);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result.x = cartesian.x * scalar;\n result.y = cartesian.y * scalar;\n result.z = cartesian.z * scalar;\n result.w = cartesian.w * scalar;\n return result;\n};\n\n/**\n * Divides the provided Cartesian componentwise by the provided scalar.\n *\n * @param {Cartesian4} cartesian The Cartesian to be divided.\n * @param {number} scalar The scalar to divide by.\n * @param {Cartesian4} result The object onto which to store the result.\n * @returns {Cartesian4} The modified result parameter.\n */\nCartesian4.divideByScalar = function (cartesian, scalar, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"cartesian\", cartesian);\n Check.typeOf.number(\"scalar\", scalar);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result.x = cartesian.x / scalar;\n result.y = cartesian.y / scalar;\n result.z = cartesian.z / scalar;\n result.w = cartesian.w / scalar;\n return result;\n};\n\n/**\n * Negates the provided Cartesian.\n *\n * @param {Cartesian4} cartesian The Cartesian to be negated.\n * @param {Cartesian4} result The object onto which to store the result.\n * @returns {Cartesian4} The modified result parameter.\n */\nCartesian4.negate = function (cartesian, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"cartesian\", cartesian);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result.x = -cartesian.x;\n result.y = -cartesian.y;\n result.z = -cartesian.z;\n result.w = -cartesian.w;\n return result;\n};\n\n/**\n * Computes the absolute value of the provided Cartesian.\n *\n * @param {Cartesian4} cartesian The Cartesian whose absolute value is to be computed.\n * @param {Cartesian4} result The object onto which to store the result.\n * @returns {Cartesian4} The modified result parameter.\n */\nCartesian4.abs = function (cartesian, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"cartesian\", cartesian);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result.x = Math.abs(cartesian.x);\n result.y = Math.abs(cartesian.y);\n result.z = Math.abs(cartesian.z);\n result.w = Math.abs(cartesian.w);\n return result;\n};\n\nconst lerpScratch = new Cartesian4();\n/**\n * Computes the linear interpolation or extrapolation at t using the provided cartesians.\n *\n * @param {Cartesian4} start The value corresponding to t at 0.0.\n * @param {Cartesian4}end The value corresponding to t at 1.0.\n * @param {number} t The point along t at which to interpolate.\n * @param {Cartesian4} result The object onto which to store the result.\n * @returns {Cartesian4} The modified result parameter.\n */\nCartesian4.lerp = function (start, end, t, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"start\", start);\n Check.typeOf.object(\"end\", end);\n Check.typeOf.number(\"t\", t);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n Cartesian4.multiplyByScalar(end, t, lerpScratch);\n result = Cartesian4.multiplyByScalar(start, 1.0 - t, result);\n return Cartesian4.add(lerpScratch, result, result);\n};\n\nconst mostOrthogonalAxisScratch = new Cartesian4();\n/**\n * Returns the axis that is most orthogonal to the provided Cartesian.\n *\n * @param {Cartesian4} cartesian The Cartesian on which to find the most orthogonal axis.\n * @param {Cartesian4} result The object onto which to store the result.\n * @returns {Cartesian4} The most orthogonal axis.\n */\nCartesian4.mostOrthogonalAxis = function (cartesian, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"cartesian\", cartesian);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const f = Cartesian4.normalize(cartesian, mostOrthogonalAxisScratch);\n Cartesian4.abs(f, f);\n\n if (f.x <= f.y) {\n if (f.x <= f.z) {\n if (f.x <= f.w) {\n result = Cartesian4.clone(Cartesian4.UNIT_X, result);\n } else {\n result = Cartesian4.clone(Cartesian4.UNIT_W, result);\n }\n } else if (f.z <= f.w) {\n result = Cartesian4.clone(Cartesian4.UNIT_Z, result);\n } else {\n result = Cartesian4.clone(Cartesian4.UNIT_W, result);\n }\n } else if (f.y <= f.z) {\n if (f.y <= f.w) {\n result = Cartesian4.clone(Cartesian4.UNIT_Y, result);\n } else {\n result = Cartesian4.clone(Cartesian4.UNIT_W, result);\n }\n } else if (f.z <= f.w) {\n result = Cartesian4.clone(Cartesian4.UNIT_Z, result);\n } else {\n result = Cartesian4.clone(Cartesian4.UNIT_W, result);\n }\n\n return result;\n};\n\n/**\n * Compares the provided Cartesians componentwise and returns\n * true if they are equal, false otherwise.\n *\n * @param {Cartesian4} [left] The first Cartesian.\n * @param {Cartesian4} [right] The second Cartesian.\n * @returns {boolean} true if left and right are equal, false otherwise.\n */\nCartesian4.equals = function (left, right) {\n return (\n left === right ||\n (defined(left) &&\n defined(right) &&\n left.x === right.x &&\n left.y === right.y &&\n left.z === right.z &&\n left.w === right.w)\n );\n};\n\n/**\n * @private\n */\nCartesian4.equalsArray = function (cartesian, array, offset) {\n return (\n cartesian.x === array[offset] &&\n cartesian.y === array[offset + 1] &&\n cartesian.z === array[offset + 2] &&\n cartesian.w === array[offset + 3]\n );\n};\n\n/**\n * Compares the provided Cartesians componentwise and returns\n * true if they pass an absolute or relative tolerance test,\n * false otherwise.\n *\n * @param {Cartesian4} [left] The first Cartesian.\n * @param {Cartesian4} [right] The second Cartesian.\n * @param {number} [relativeEpsilon=0] The relative epsilon tolerance to use for equality testing.\n * @param {number} [absoluteEpsilon=relativeEpsilon] The absolute epsilon tolerance to use for equality testing.\n * @returns {boolean} true if left and right are within the provided epsilon, false otherwise.\n */\nCartesian4.equalsEpsilon = function (\n left,\n right,\n relativeEpsilon,\n absoluteEpsilon,\n) {\n return (\n left === right ||\n (defined(left) &&\n defined(right) &&\n CesiumMath.equalsEpsilon(\n left.x,\n right.x,\n relativeEpsilon,\n absoluteEpsilon,\n ) &&\n CesiumMath.equalsEpsilon(\n left.y,\n right.y,\n relativeEpsilon,\n absoluteEpsilon,\n ) &&\n CesiumMath.equalsEpsilon(\n left.z,\n right.z,\n relativeEpsilon,\n absoluteEpsilon,\n ) &&\n CesiumMath.equalsEpsilon(\n left.w,\n right.w,\n relativeEpsilon,\n absoluteEpsilon,\n ))\n );\n};\n\n/**\n * An immutable Cartesian4 instance initialized to (0.0, 0.0, 0.0, 0.0).\n *\n * @type {Cartesian4}\n * @constant\n */\nCartesian4.ZERO = Object.freeze(new Cartesian4(0.0, 0.0, 0.0, 0.0));\n\n/**\n * An immutable Cartesian4 instance initialized to (1.0, 1.0, 1.0, 1.0).\n *\n * @type {Cartesian4}\n * @constant\n */\nCartesian4.ONE = Object.freeze(new Cartesian4(1.0, 1.0, 1.0, 1.0));\n\n/**\n * An immutable Cartesian4 instance initialized to (1.0, 0.0, 0.0, 0.0).\n *\n * @type {Cartesian4}\n * @constant\n */\nCartesian4.UNIT_X = Object.freeze(new Cartesian4(1.0, 0.0, 0.0, 0.0));\n\n/**\n * An immutable Cartesian4 instance initialized to (0.0, 1.0, 0.0, 0.0).\n *\n * @type {Cartesian4}\n * @constant\n */\nCartesian4.UNIT_Y = Object.freeze(new Cartesian4(0.0, 1.0, 0.0, 0.0));\n\n/**\n * An immutable Cartesian4 instance initialized to (0.0, 0.0, 1.0, 0.0).\n *\n * @type {Cartesian4}\n * @constant\n */\nCartesian4.UNIT_Z = Object.freeze(new Cartesian4(0.0, 0.0, 1.0, 0.0));\n\n/**\n * An immutable Cartesian4 instance initialized to (0.0, 0.0, 0.0, 1.0).\n *\n * @type {Cartesian4}\n * @constant\n */\nCartesian4.UNIT_W = Object.freeze(new Cartesian4(0.0, 0.0, 0.0, 1.0));\n\n/**\n * Duplicates this Cartesian4 instance.\n *\n * @param {Cartesian4} [result] The object onto which to store the result.\n * @returns {Cartesian4} The modified result parameter or a new Cartesian4 instance if one was not provided.\n */\nCartesian4.prototype.clone = function (result) {\n return Cartesian4.clone(this, result);\n};\n\n/**\n * Compares this Cartesian against the provided Cartesian componentwise and returns\n * true if they are equal, false otherwise.\n *\n * @param {Cartesian4} [right] The right hand side Cartesian.\n * @returns {boolean} true if they are equal, false otherwise.\n */\nCartesian4.prototype.equals = function (right) {\n return Cartesian4.equals(this, right);\n};\n\n/**\n * Compares this Cartesian against the provided Cartesian componentwise and returns\n * true if they pass an absolute or relative tolerance test,\n * false otherwise.\n *\n * @param {Cartesian4} [right] The right hand side Cartesian.\n * @param {number} [relativeEpsilon=0] The relative epsilon tolerance to use for equality testing.\n * @param {number} [absoluteEpsilon=relativeEpsilon] The absolute epsilon tolerance to use for equality testing.\n * @returns {boolean} true if they are within the provided epsilon, false otherwise.\n */\nCartesian4.prototype.equalsEpsilon = function (\n right,\n relativeEpsilon,\n absoluteEpsilon,\n) {\n return Cartesian4.equalsEpsilon(\n this,\n right,\n relativeEpsilon,\n absoluteEpsilon,\n );\n};\n\n/**\n * Creates a string representing this Cartesian in the format '(x, y, z, w)'.\n *\n * @returns {string} A string representing the provided Cartesian in the format '(x, y, z, w)'.\n */\nCartesian4.prototype.toString = function () {\n return `(${this.x}, ${this.y}, ${this.z}, ${this.w})`;\n};\n\n// scratchU8Array and scratchF32Array are views into the same buffer\nconst scratchF32Array = new Float32Array(1);\nconst scratchU8Array = new Uint8Array(scratchF32Array.buffer);\n\nconst testU32 = new Uint32Array([0x11223344]);\nconst testU8 = new Uint8Array(testU32.buffer);\nconst littleEndian = testU8[0] === 0x44;\n\n/**\n * Packs an arbitrary floating point value to 4 values representable using uint8.\n *\n * @param {number} value A floating point number.\n * @param {Cartesian4} [result] The Cartesian4 that will contain the packed float.\n * @returns {Cartesian4} A Cartesian4 representing the float packed to values in x, y, z, and w.\n */\nCartesian4.packFloat = function (value, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.number(\"value\", value);\n //>>includeEnd('debug');\n\n if (!defined(result)) {\n result = new Cartesian4();\n }\n\n // scratchU8Array and scratchF32Array are views into the same buffer\n scratchF32Array[0] = value;\n\n if (littleEndian) {\n result.x = scratchU8Array[0];\n result.y = scratchU8Array[1];\n result.z = scratchU8Array[2];\n result.w = scratchU8Array[3];\n } else {\n // convert from big-endian to little-endian\n result.x = scratchU8Array[3];\n result.y = scratchU8Array[2];\n result.z = scratchU8Array[1];\n result.w = scratchU8Array[0];\n }\n return result;\n};\n\n/**\n * Unpacks a float packed using Cartesian4.packFloat.\n *\n * @param {Cartesian4} packedFloat A Cartesian4 containing a float packed to 4 values representable using uint8.\n * @returns {number} The unpacked float.\n * @private\n */\nCartesian4.unpackFloat = function (packedFloat) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"packedFloat\", packedFloat);\n //>>includeEnd('debug');\n\n // scratchU8Array and scratchF32Array are views into the same buffer\n if (littleEndian) {\n scratchU8Array[0] = packedFloat.x;\n scratchU8Array[1] = packedFloat.y;\n scratchU8Array[2] = packedFloat.z;\n scratchU8Array[3] = packedFloat.w;\n } else {\n // convert from little-endian to big-endian\n scratchU8Array[0] = packedFloat.w;\n scratchU8Array[1] = packedFloat.z;\n scratchU8Array[2] = packedFloat.y;\n scratchU8Array[3] = packedFloat.x;\n }\n return scratchF32Array[0];\n};\nexport default Cartesian4;\n","import Cartesian3 from \"./Cartesian3.js\";\nimport Check from \"./Check.js\";\nimport defaultValue from \"./defaultValue.js\";\nimport defined from \"./defined.js\";\nimport DeveloperError from \"./DeveloperError.js\";\nimport CesiumMath from \"./Math.js\";\n\n/**\n * A 3x3 matrix, indexable as a column-major order array.\n * Constructor parameters are in row-major order for code readability.\n * @alias Matrix3\n * @constructor\n * @implements {ArrayLike}\n *\n * @param {number} [column0Row0=0.0] The value for column 0, row 0.\n * @param {number} [column1Row0=0.0] The value for column 1, row 0.\n * @param {number} [column2Row0=0.0] The value for column 2, row 0.\n * @param {number} [column0Row1=0.0] The value for column 0, row 1.\n * @param {number} [column1Row1=0.0] The value for column 1, row 1.\n * @param {number} [column2Row1=0.0] The value for column 2, row 1.\n * @param {number} [column0Row2=0.0] The value for column 0, row 2.\n * @param {number} [column1Row2=0.0] The value for column 1, row 2.\n * @param {number} [column2Row2=0.0] The value for column 2, row 2.\n *\n * @see Matrix3.fromArray\n * @see Matrix3.fromColumnMajorArray\n * @see Matrix3.fromRowMajorArray\n * @see Matrix3.fromQuaternion\n * @see Matrix3.fromHeadingPitchRoll\n * @see Matrix3.fromScale\n * @see Matrix3.fromUniformScale\n * @see Matrix3.fromCrossProduct\n * @see Matrix3.fromRotationX\n * @see Matrix3.fromRotationY\n * @see Matrix3.fromRotationZ\n * @see Matrix2\n * @see Matrix4\n */\nfunction Matrix3(\n column0Row0,\n column1Row0,\n column2Row0,\n column0Row1,\n column1Row1,\n column2Row1,\n column0Row2,\n column1Row2,\n column2Row2,\n) {\n this[0] = defaultValue(column0Row0, 0.0);\n this[1] = defaultValue(column0Row1, 0.0);\n this[2] = defaultValue(column0Row2, 0.0);\n this[3] = defaultValue(column1Row0, 0.0);\n this[4] = defaultValue(column1Row1, 0.0);\n this[5] = defaultValue(column1Row2, 0.0);\n this[6] = defaultValue(column2Row0, 0.0);\n this[7] = defaultValue(column2Row1, 0.0);\n this[8] = defaultValue(column2Row2, 0.0);\n}\n\n/**\n * The number of elements used to pack the object into an array.\n * @type {number}\n */\nMatrix3.packedLength = 9;\n\n/**\n * Stores the provided instance into the provided array.\n *\n * @param {Matrix3} value The value to pack.\n * @param {number[]} array The array to pack into.\n * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.\n *\n * @returns {number[]} The array that was packed into\n */\nMatrix3.pack = function (value, array, startingIndex) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"value\", value);\n Check.defined(\"array\", array);\n //>>includeEnd('debug');\n\n startingIndex = defaultValue(startingIndex, 0);\n\n array[startingIndex++] = value[0];\n array[startingIndex++] = value[1];\n array[startingIndex++] = value[2];\n array[startingIndex++] = value[3];\n array[startingIndex++] = value[4];\n array[startingIndex++] = value[5];\n array[startingIndex++] = value[6];\n array[startingIndex++] = value[7];\n array[startingIndex++] = value[8];\n\n return array;\n};\n\n/**\n * Retrieves an instance from a packed array.\n *\n * @param {number[]} array The packed array.\n * @param {number} [startingIndex=0] The starting index of the element to be unpacked.\n * @param {Matrix3} [result] The object into which to store the result.\n * @returns {Matrix3} The modified result parameter or a new Matrix3 instance if one was not provided.\n */\nMatrix3.unpack = function (array, startingIndex, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.defined(\"array\", array);\n //>>includeEnd('debug');\n\n startingIndex = defaultValue(startingIndex, 0);\n\n if (!defined(result)) {\n result = new Matrix3();\n }\n\n result[0] = array[startingIndex++];\n result[1] = array[startingIndex++];\n result[2] = array[startingIndex++];\n result[3] = array[startingIndex++];\n result[4] = array[startingIndex++];\n result[5] = array[startingIndex++];\n result[6] = array[startingIndex++];\n result[7] = array[startingIndex++];\n result[8] = array[startingIndex++];\n return result;\n};\n\n/**\n * Flattens an array of Matrix3s into an array of components. The components\n * are stored in column-major order.\n *\n * @param {Matrix3[]} array The array of matrices to pack.\n * @param {number[]} [result] The array onto which to store the result. If this is a typed array, it must have array.length * 9 components, else a {@link DeveloperError} will be thrown. If it is a regular array, it will be resized to have (array.length * 9) elements.\n * @returns {number[]} The packed array.\n */\nMatrix3.packArray = function (array, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.defined(\"array\", array);\n //>>includeEnd('debug');\n\n const length = array.length;\n const resultLength = length * 9;\n if (!defined(result)) {\n result = new Array(resultLength);\n } else if (!Array.isArray(result) && result.length !== resultLength) {\n //>>includeStart('debug', pragmas.debug);\n throw new DeveloperError(\n \"If result is a typed array, it must have exactly array.length * 9 elements\",\n );\n //>>includeEnd('debug');\n } else if (result.length !== resultLength) {\n result.length = resultLength;\n }\n\n for (let i = 0; i < length; ++i) {\n Matrix3.pack(array[i], result, i * 9);\n }\n return result;\n};\n\n/**\n * Unpacks an array of column-major matrix components into an array of Matrix3s.\n *\n * @param {number[]} array The array of components to unpack.\n * @param {Matrix3[]} [result] The array onto which to store the result.\n * @returns {Matrix3[]} The unpacked array.\n */\nMatrix3.unpackArray = function (array, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.defined(\"array\", array);\n Check.typeOf.number.greaterThanOrEquals(\"array.length\", array.length, 9);\n if (array.length % 9 !== 0) {\n throw new DeveloperError(\"array length must be a multiple of 9.\");\n }\n //>>includeEnd('debug');\n\n const length = array.length;\n if (!defined(result)) {\n result = new Array(length / 9);\n } else {\n result.length = length / 9;\n }\n\n for (let i = 0; i < length; i += 9) {\n const index = i / 9;\n result[index] = Matrix3.unpack(array, i, result[index]);\n }\n return result;\n};\n\n/**\n * Duplicates a Matrix3 instance.\n *\n * @param {Matrix3} matrix The matrix to duplicate.\n * @param {Matrix3} [result] The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter or a new Matrix3 instance if one was not provided. (Returns undefined if matrix is undefined)\n */\nMatrix3.clone = function (matrix, result) {\n if (!defined(matrix)) {\n return undefined;\n }\n if (!defined(result)) {\n return new Matrix3(\n matrix[0],\n matrix[3],\n matrix[6],\n matrix[1],\n matrix[4],\n matrix[7],\n matrix[2],\n matrix[5],\n matrix[8],\n );\n }\n result[0] = matrix[0];\n result[1] = matrix[1];\n result[2] = matrix[2];\n result[3] = matrix[3];\n result[4] = matrix[4];\n result[5] = matrix[5];\n result[6] = matrix[6];\n result[7] = matrix[7];\n result[8] = matrix[8];\n return result;\n};\n\n/**\n * Creates a Matrix3 from 9 consecutive elements in an array.\n *\n * @function\n * @param {number[]} array The array whose 9 consecutive elements correspond to the positions of the matrix. Assumes column-major order.\n * @param {number} [startingIndex=0] The offset into the array of the first element, which corresponds to first column first row position in the matrix.\n * @param {Matrix3} [result] The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter or a new Matrix3 instance if one was not provided.\n *\n * @example\n * // Create the Matrix3:\n * // [1.0, 2.0, 3.0]\n * // [1.0, 2.0, 3.0]\n * // [1.0, 2.0, 3.0]\n *\n * const v = [1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 3.0, 3.0, 3.0];\n * const m = Cesium.Matrix3.fromArray(v);\n *\n * // Create same Matrix3 with using an offset into an array\n * const v2 = [0.0, 0.0, 1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 3.0, 3.0, 3.0];\n * const m2 = Cesium.Matrix3.fromArray(v2, 2);\n */\nMatrix3.fromArray = Matrix3.unpack;\n\n/**\n * Creates a Matrix3 instance from a column-major order array.\n *\n * @param {number[]} values The column-major order array.\n * @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix3} The modified result parameter, or a new Matrix3 instance if one was not provided.\n */\nMatrix3.fromColumnMajorArray = function (values, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.defined(\"values\", values);\n //>>includeEnd('debug');\n\n return Matrix3.clone(values, result);\n};\n\n/**\n * Creates a Matrix3 instance from a row-major order array.\n * The resulting matrix will be in column-major order.\n *\n * @param {number[]} values The row-major order array.\n * @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix3} The modified result parameter, or a new Matrix3 instance if one was not provided.\n */\nMatrix3.fromRowMajorArray = function (values, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.defined(\"values\", values);\n //>>includeEnd('debug');\n\n if (!defined(result)) {\n return new Matrix3(\n values[0],\n values[1],\n values[2],\n values[3],\n values[4],\n values[5],\n values[6],\n values[7],\n values[8],\n );\n }\n result[0] = values[0];\n result[1] = values[3];\n result[2] = values[6];\n result[3] = values[1];\n result[4] = values[4];\n result[5] = values[7];\n result[6] = values[2];\n result[7] = values[5];\n result[8] = values[8];\n return result;\n};\n\n/**\n * Computes a 3x3 rotation matrix from the provided quaternion.\n *\n * @param {Quaternion} quaternion the quaternion to use.\n * @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix3} The 3x3 rotation matrix from this quaternion.\n */\nMatrix3.fromQuaternion = function (quaternion, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"quaternion\", quaternion);\n //>>includeEnd('debug');\n\n const x2 = quaternion.x * quaternion.x;\n const xy = quaternion.x * quaternion.y;\n const xz = quaternion.x * quaternion.z;\n const xw = quaternion.x * quaternion.w;\n const y2 = quaternion.y * quaternion.y;\n const yz = quaternion.y * quaternion.z;\n const yw = quaternion.y * quaternion.w;\n const z2 = quaternion.z * quaternion.z;\n const zw = quaternion.z * quaternion.w;\n const w2 = quaternion.w * quaternion.w;\n\n const m00 = x2 - y2 - z2 + w2;\n const m01 = 2.0 * (xy - zw);\n const m02 = 2.0 * (xz + yw);\n\n const m10 = 2.0 * (xy + zw);\n const m11 = -x2 + y2 - z2 + w2;\n const m12 = 2.0 * (yz - xw);\n\n const m20 = 2.0 * (xz - yw);\n const m21 = 2.0 * (yz + xw);\n const m22 = -x2 - y2 + z2 + w2;\n\n if (!defined(result)) {\n return new Matrix3(m00, m01, m02, m10, m11, m12, m20, m21, m22);\n }\n result[0] = m00;\n result[1] = m10;\n result[2] = m20;\n result[3] = m01;\n result[4] = m11;\n result[5] = m21;\n result[6] = m02;\n result[7] = m12;\n result[8] = m22;\n return result;\n};\n\n/**\n * Computes a 3x3 rotation matrix from the provided headingPitchRoll. (see http://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles )\n *\n * @param {HeadingPitchRoll} headingPitchRoll the headingPitchRoll to use.\n * @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix3} The 3x3 rotation matrix from this headingPitchRoll.\n */\nMatrix3.fromHeadingPitchRoll = function (headingPitchRoll, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"headingPitchRoll\", headingPitchRoll);\n //>>includeEnd('debug');\n\n const cosTheta = Math.cos(-headingPitchRoll.pitch);\n const cosPsi = Math.cos(-headingPitchRoll.heading);\n const cosPhi = Math.cos(headingPitchRoll.roll);\n const sinTheta = Math.sin(-headingPitchRoll.pitch);\n const sinPsi = Math.sin(-headingPitchRoll.heading);\n const sinPhi = Math.sin(headingPitchRoll.roll);\n\n const m00 = cosTheta * cosPsi;\n const m01 = -cosPhi * sinPsi + sinPhi * sinTheta * cosPsi;\n const m02 = sinPhi * sinPsi + cosPhi * sinTheta * cosPsi;\n\n const m10 = cosTheta * sinPsi;\n const m11 = cosPhi * cosPsi + sinPhi * sinTheta * sinPsi;\n const m12 = -sinPhi * cosPsi + cosPhi * sinTheta * sinPsi;\n\n const m20 = -sinTheta;\n const m21 = sinPhi * cosTheta;\n const m22 = cosPhi * cosTheta;\n\n if (!defined(result)) {\n return new Matrix3(m00, m01, m02, m10, m11, m12, m20, m21, m22);\n }\n result[0] = m00;\n result[1] = m10;\n result[2] = m20;\n result[3] = m01;\n result[4] = m11;\n result[5] = m21;\n result[6] = m02;\n result[7] = m12;\n result[8] = m22;\n return result;\n};\n\n/**\n * Computes a Matrix3 instance representing a non-uniform scale.\n *\n * @param {Cartesian3} scale The x, y, and z scale factors.\n * @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix3} The modified result parameter, or a new Matrix3 instance if one was not provided.\n *\n * @example\n * // Creates\n * // [7.0, 0.0, 0.0]\n * // [0.0, 8.0, 0.0]\n * // [0.0, 0.0, 9.0]\n * const m = Cesium.Matrix3.fromScale(new Cesium.Cartesian3(7.0, 8.0, 9.0));\n */\nMatrix3.fromScale = function (scale, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"scale\", scale);\n //>>includeEnd('debug');\n\n if (!defined(result)) {\n return new Matrix3(scale.x, 0.0, 0.0, 0.0, scale.y, 0.0, 0.0, 0.0, scale.z);\n }\n\n result[0] = scale.x;\n result[1] = 0.0;\n result[2] = 0.0;\n result[3] = 0.0;\n result[4] = scale.y;\n result[5] = 0.0;\n result[6] = 0.0;\n result[7] = 0.0;\n result[8] = scale.z;\n return result;\n};\n\n/**\n * Computes a Matrix3 instance representing a uniform scale.\n *\n * @param {number} scale The uniform scale factor.\n * @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix3} The modified result parameter, or a new Matrix3 instance if one was not provided.\n *\n * @example\n * // Creates\n * // [2.0, 0.0, 0.0]\n * // [0.0, 2.0, 0.0]\n * // [0.0, 0.0, 2.0]\n * const m = Cesium.Matrix3.fromUniformScale(2.0);\n */\nMatrix3.fromUniformScale = function (scale, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.number(\"scale\", scale);\n //>>includeEnd('debug');\n\n if (!defined(result)) {\n return new Matrix3(scale, 0.0, 0.0, 0.0, scale, 0.0, 0.0, 0.0, scale);\n }\n\n result[0] = scale;\n result[1] = 0.0;\n result[2] = 0.0;\n result[3] = 0.0;\n result[4] = scale;\n result[5] = 0.0;\n result[6] = 0.0;\n result[7] = 0.0;\n result[8] = scale;\n return result;\n};\n\n/**\n * Computes a Matrix3 instance representing the cross product equivalent matrix of a Cartesian3 vector.\n *\n * @param {Cartesian3} vector the vector on the left hand side of the cross product operation.\n * @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix3} The modified result parameter, or a new Matrix3 instance if one was not provided.\n *\n * @example\n * // Creates\n * // [0.0, -9.0, 8.0]\n * // [9.0, 0.0, -7.0]\n * // [-8.0, 7.0, 0.0]\n * const m = Cesium.Matrix3.fromCrossProduct(new Cesium.Cartesian3(7.0, 8.0, 9.0));\n */\nMatrix3.fromCrossProduct = function (vector, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"vector\", vector);\n //>>includeEnd('debug');\n\n if (!defined(result)) {\n return new Matrix3(\n 0.0,\n -vector.z,\n vector.y,\n vector.z,\n 0.0,\n -vector.x,\n -vector.y,\n vector.x,\n 0.0,\n );\n }\n\n result[0] = 0.0;\n result[1] = vector.z;\n result[2] = -vector.y;\n result[3] = -vector.z;\n result[4] = 0.0;\n result[5] = vector.x;\n result[6] = vector.y;\n result[7] = -vector.x;\n result[8] = 0.0;\n return result;\n};\n\n/**\n * Creates a rotation matrix around the x-axis.\n *\n * @param {number} angle The angle, in radians, of the rotation. Positive angles are counterclockwise.\n * @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix3} The modified result parameter, or a new Matrix3 instance if one was not provided.\n *\n * @example\n * // Rotate a point 45 degrees counterclockwise around the x-axis.\n * const p = new Cesium.Cartesian3(5, 6, 7);\n * const m = Cesium.Matrix3.fromRotationX(Cesium.Math.toRadians(45.0));\n * const rotated = Cesium.Matrix3.multiplyByVector(m, p, new Cesium.Cartesian3());\n */\nMatrix3.fromRotationX = function (angle, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.number(\"angle\", angle);\n //>>includeEnd('debug');\n\n const cosAngle = Math.cos(angle);\n const sinAngle = Math.sin(angle);\n\n if (!defined(result)) {\n return new Matrix3(\n 1.0,\n 0.0,\n 0.0,\n 0.0,\n cosAngle,\n -sinAngle,\n 0.0,\n sinAngle,\n cosAngle,\n );\n }\n\n result[0] = 1.0;\n result[1] = 0.0;\n result[2] = 0.0;\n result[3] = 0.0;\n result[4] = cosAngle;\n result[5] = sinAngle;\n result[6] = 0.0;\n result[7] = -sinAngle;\n result[8] = cosAngle;\n\n return result;\n};\n\n/**\n * Creates a rotation matrix around the y-axis.\n *\n * @param {number} angle The angle, in radians, of the rotation. Positive angles are counterclockwise.\n * @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix3} The modified result parameter, or a new Matrix3 instance if one was not provided.\n *\n * @example\n * // Rotate a point 45 degrees counterclockwise around the y-axis.\n * const p = new Cesium.Cartesian3(5, 6, 7);\n * const m = Cesium.Matrix3.fromRotationY(Cesium.Math.toRadians(45.0));\n * const rotated = Cesium.Matrix3.multiplyByVector(m, p, new Cesium.Cartesian3());\n */\nMatrix3.fromRotationY = function (angle, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.number(\"angle\", angle);\n //>>includeEnd('debug');\n\n const cosAngle = Math.cos(angle);\n const sinAngle = Math.sin(angle);\n\n if (!defined(result)) {\n return new Matrix3(\n cosAngle,\n 0.0,\n sinAngle,\n 0.0,\n 1.0,\n 0.0,\n -sinAngle,\n 0.0,\n cosAngle,\n );\n }\n\n result[0] = cosAngle;\n result[1] = 0.0;\n result[2] = -sinAngle;\n result[3] = 0.0;\n result[4] = 1.0;\n result[5] = 0.0;\n result[6] = sinAngle;\n result[7] = 0.0;\n result[8] = cosAngle;\n\n return result;\n};\n\n/**\n * Creates a rotation matrix around the z-axis.\n *\n * @param {number} angle The angle, in radians, of the rotation. Positive angles are counterclockwise.\n * @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.\n * @returns {Matrix3} The modified result parameter, or a new Matrix3 instance if one was not provided.\n *\n * @example\n * // Rotate a point 45 degrees counterclockwise around the z-axis.\n * const p = new Cesium.Cartesian3(5, 6, 7);\n * const m = Cesium.Matrix3.fromRotationZ(Cesium.Math.toRadians(45.0));\n * const rotated = Cesium.Matrix3.multiplyByVector(m, p, new Cesium.Cartesian3());\n */\nMatrix3.fromRotationZ = function (angle, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.number(\"angle\", angle);\n //>>includeEnd('debug');\n\n const cosAngle = Math.cos(angle);\n const sinAngle = Math.sin(angle);\n\n if (!defined(result)) {\n return new Matrix3(\n cosAngle,\n -sinAngle,\n 0.0,\n sinAngle,\n cosAngle,\n 0.0,\n 0.0,\n 0.0,\n 1.0,\n );\n }\n\n result[0] = cosAngle;\n result[1] = sinAngle;\n result[2] = 0.0;\n result[3] = -sinAngle;\n result[4] = cosAngle;\n result[5] = 0.0;\n result[6] = 0.0;\n result[7] = 0.0;\n result[8] = 1.0;\n\n return result;\n};\n\n/**\n * Creates an Array from the provided Matrix3 instance.\n * The array will be in column-major order.\n *\n * @param {Matrix3} matrix The matrix to use..\n * @param {number[]} [result] The Array onto which to store the result.\n * @returns {number[]} The modified Array parameter or a new Array instance if one was not provided.\n */\nMatrix3.toArray = function (matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n //>>includeEnd('debug');\n\n if (!defined(result)) {\n return [\n matrix[0],\n matrix[1],\n matrix[2],\n matrix[3],\n matrix[4],\n matrix[5],\n matrix[6],\n matrix[7],\n matrix[8],\n ];\n }\n result[0] = matrix[0];\n result[1] = matrix[1];\n result[2] = matrix[2];\n result[3] = matrix[3];\n result[4] = matrix[4];\n result[5] = matrix[5];\n result[6] = matrix[6];\n result[7] = matrix[7];\n result[8] = matrix[8];\n return result;\n};\n\n/**\n * Computes the array index of the element at the provided row and column.\n *\n * @param {number} column The zero-based index of the column.\n * @param {number} row The zero-based index of the row.\n * @returns {number} The index of the element at the provided row and column.\n *\n * @exception {DeveloperError} row must be 0, 1, or 2.\n * @exception {DeveloperError} column must be 0, 1, or 2.\n *\n * @example\n * const myMatrix = new Cesium.Matrix3();\n * const column1Row0Index = Cesium.Matrix3.getElementIndex(1, 0);\n * const column1Row0 = myMatrix[column1Row0Index]\n * myMatrix[column1Row0Index] = 10.0;\n */\nMatrix3.getElementIndex = function (column, row) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.number.greaterThanOrEquals(\"row\", row, 0);\n Check.typeOf.number.lessThanOrEquals(\"row\", row, 2);\n Check.typeOf.number.greaterThanOrEquals(\"column\", column, 0);\n Check.typeOf.number.lessThanOrEquals(\"column\", column, 2);\n //>>includeEnd('debug');\n\n return column * 3 + row;\n};\n\n/**\n * Retrieves a copy of the matrix column at the provided index as a Cartesian3 instance.\n *\n * @param {Matrix3} matrix The matrix to use.\n * @param {number} index The zero-based index of the column to retrieve.\n * @param {Cartesian3} result The object onto which to store the result.\n * @returns {Cartesian3} The modified result parameter.\n *\n * @exception {DeveloperError} index must be 0, 1, or 2.\n */\nMatrix3.getColumn = function (matrix, index, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.number.greaterThanOrEquals(\"index\", index, 0);\n Check.typeOf.number.lessThanOrEquals(\"index\", index, 2);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const startIndex = index * 3;\n const x = matrix[startIndex];\n const y = matrix[startIndex + 1];\n const z = matrix[startIndex + 2];\n\n result.x = x;\n result.y = y;\n result.z = z;\n return result;\n};\n\n/**\n * Computes a new matrix that replaces the specified column in the provided matrix with the provided Cartesian3 instance.\n *\n * @param {Matrix3} matrix The matrix to use.\n * @param {number} index The zero-based index of the column to set.\n * @param {Cartesian3} cartesian The Cartesian whose values will be assigned to the specified column.\n * @param {Matrix3} result The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter.\n *\n * @exception {DeveloperError} index must be 0, 1, or 2.\n */\nMatrix3.setColumn = function (matrix, index, cartesian, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.number.greaterThanOrEquals(\"index\", index, 0);\n Check.typeOf.number.lessThanOrEquals(\"index\", index, 2);\n Check.typeOf.object(\"cartesian\", cartesian);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result = Matrix3.clone(matrix, result);\n const startIndex = index * 3;\n result[startIndex] = cartesian.x;\n result[startIndex + 1] = cartesian.y;\n result[startIndex + 2] = cartesian.z;\n return result;\n};\n\n/**\n * Retrieves a copy of the matrix row at the provided index as a Cartesian3 instance.\n *\n * @param {Matrix3} matrix The matrix to use.\n * @param {number} index The zero-based index of the row to retrieve.\n * @param {Cartesian3} result The object onto which to store the result.\n * @returns {Cartesian3} The modified result parameter.\n *\n * @exception {DeveloperError} index must be 0, 1, or 2.\n */\nMatrix3.getRow = function (matrix, index, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.number.greaterThanOrEquals(\"index\", index, 0);\n Check.typeOf.number.lessThanOrEquals(\"index\", index, 2);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const x = matrix[index];\n const y = matrix[index + 3];\n const z = matrix[index + 6];\n\n result.x = x;\n result.y = y;\n result.z = z;\n return result;\n};\n\n/**\n * Computes a new matrix that replaces the specified row in the provided matrix with the provided Cartesian3 instance.\n *\n * @param {Matrix3} matrix The matrix to use.\n * @param {number} index The zero-based index of the row to set.\n * @param {Cartesian3} cartesian The Cartesian whose values will be assigned to the specified row.\n * @param {Matrix3} result The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter.\n *\n * @exception {DeveloperError} index must be 0, 1, or 2.\n */\nMatrix3.setRow = function (matrix, index, cartesian, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.number.greaterThanOrEquals(\"index\", index, 0);\n Check.typeOf.number.lessThanOrEquals(\"index\", index, 2);\n Check.typeOf.object(\"cartesian\", cartesian);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result = Matrix3.clone(matrix, result);\n result[index] = cartesian.x;\n result[index + 3] = cartesian.y;\n result[index + 6] = cartesian.z;\n return result;\n};\n\nconst scaleScratch1 = new Cartesian3();\n\n/**\n * Computes a new matrix that replaces the scale with the provided scale.\n * This assumes the matrix is an affine transformation.\n *\n * @param {Matrix3} matrix The matrix to use.\n * @param {Cartesian3} scale The scale that replaces the scale of the provided matrix.\n * @param {Matrix3} result The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter.\n *\n * @see Matrix3.setUniformScale\n * @see Matrix3.fromScale\n * @see Matrix3.fromUniformScale\n * @see Matrix3.multiplyByScale\n * @see Matrix3.multiplyByUniformScale\n * @see Matrix3.getScale\n */\nMatrix3.setScale = function (matrix, scale, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"scale\", scale);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const existingScale = Matrix3.getScale(matrix, scaleScratch1);\n const scaleRatioX = scale.x / existingScale.x;\n const scaleRatioY = scale.y / existingScale.y;\n const scaleRatioZ = scale.z / existingScale.z;\n\n result[0] = matrix[0] * scaleRatioX;\n result[1] = matrix[1] * scaleRatioX;\n result[2] = matrix[2] * scaleRatioX;\n result[3] = matrix[3] * scaleRatioY;\n result[4] = matrix[4] * scaleRatioY;\n result[5] = matrix[5] * scaleRatioY;\n result[6] = matrix[6] * scaleRatioZ;\n result[7] = matrix[7] * scaleRatioZ;\n result[8] = matrix[8] * scaleRatioZ;\n\n return result;\n};\n\nconst scaleScratch2 = new Cartesian3();\n\n/**\n * Computes a new matrix that replaces the scale with the provided uniform scale.\n * This assumes the matrix is an affine transformation.\n *\n * @param {Matrix3} matrix The matrix to use.\n * @param {number} scale The uniform scale that replaces the scale of the provided matrix.\n * @param {Matrix3} result The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter.\n *\n * @see Matrix3.setScale\n * @see Matrix3.fromScale\n * @see Matrix3.fromUniformScale\n * @see Matrix3.multiplyByScale\n * @see Matrix3.multiplyByUniformScale\n * @see Matrix3.getScale\n */\nMatrix3.setUniformScale = function (matrix, scale, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.number(\"scale\", scale);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const existingScale = Matrix3.getScale(matrix, scaleScratch2);\n const scaleRatioX = scale / existingScale.x;\n const scaleRatioY = scale / existingScale.y;\n const scaleRatioZ = scale / existingScale.z;\n\n result[0] = matrix[0] * scaleRatioX;\n result[1] = matrix[1] * scaleRatioX;\n result[2] = matrix[2] * scaleRatioX;\n result[3] = matrix[3] * scaleRatioY;\n result[4] = matrix[4] * scaleRatioY;\n result[5] = matrix[5] * scaleRatioY;\n result[6] = matrix[6] * scaleRatioZ;\n result[7] = matrix[7] * scaleRatioZ;\n result[8] = matrix[8] * scaleRatioZ;\n\n return result;\n};\n\nconst scratchColumn = new Cartesian3();\n\n/**\n * Extracts the non-uniform scale assuming the matrix is an affine transformation.\n *\n * @param {Matrix3} matrix The matrix.\n * @param {Cartesian3} result The object onto which to store the result.\n * @returns {Cartesian3} The modified result parameter.\n *\n * @see Matrix3.multiplyByScale\n * @see Matrix3.multiplyByUniformScale\n * @see Matrix3.fromScale\n * @see Matrix3.fromUniformScale\n * @see Matrix3.setScale\n * @see Matrix3.setUniformScale\n */\nMatrix3.getScale = function (matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result.x = Cartesian3.magnitude(\n Cartesian3.fromElements(matrix[0], matrix[1], matrix[2], scratchColumn),\n );\n result.y = Cartesian3.magnitude(\n Cartesian3.fromElements(matrix[3], matrix[4], matrix[5], scratchColumn),\n );\n result.z = Cartesian3.magnitude(\n Cartesian3.fromElements(matrix[6], matrix[7], matrix[8], scratchColumn),\n );\n return result;\n};\n\nconst scaleScratch3 = new Cartesian3();\n\n/**\n * Computes the maximum scale assuming the matrix is an affine transformation.\n * The maximum scale is the maximum length of the column vectors.\n *\n * @param {Matrix3} matrix The matrix.\n * @returns {number} The maximum scale.\n */\nMatrix3.getMaximumScale = function (matrix) {\n Matrix3.getScale(matrix, scaleScratch3);\n return Cartesian3.maximumComponent(scaleScratch3);\n};\n\nconst scaleScratch4 = new Cartesian3();\n\n/**\n * Sets the rotation assuming the matrix is an affine transformation.\n *\n * @param {Matrix3} matrix The matrix.\n * @param {Matrix3} rotation The rotation matrix.\n * @param {Matrix3} result The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter.\n *\n * @see Matrix3.getRotation\n */\nMatrix3.setRotation = function (matrix, rotation, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const scale = Matrix3.getScale(matrix, scaleScratch4);\n\n result[0] = rotation[0] * scale.x;\n result[1] = rotation[1] * scale.x;\n result[2] = rotation[2] * scale.x;\n result[3] = rotation[3] * scale.y;\n result[4] = rotation[4] * scale.y;\n result[5] = rotation[5] * scale.y;\n result[6] = rotation[6] * scale.z;\n result[7] = rotation[7] * scale.z;\n result[8] = rotation[8] * scale.z;\n\n return result;\n};\n\nconst scaleScratch5 = new Cartesian3();\n\n/**\n * Extracts the rotation matrix assuming the matrix is an affine transformation.\n *\n * @param {Matrix3} matrix The matrix.\n * @param {Matrix3} result The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter.\n *\n * @see Matrix3.setRotation\n */\nMatrix3.getRotation = function (matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const scale = Matrix3.getScale(matrix, scaleScratch5);\n\n result[0] = matrix[0] / scale.x;\n result[1] = matrix[1] / scale.x;\n result[2] = matrix[2] / scale.x;\n result[3] = matrix[3] / scale.y;\n result[4] = matrix[4] / scale.y;\n result[5] = matrix[5] / scale.y;\n result[6] = matrix[6] / scale.z;\n result[7] = matrix[7] / scale.z;\n result[8] = matrix[8] / scale.z;\n\n return result;\n};\n\n/**\n * Computes the product of two matrices.\n *\n * @param {Matrix3} left The first matrix.\n * @param {Matrix3} right The second matrix.\n * @param {Matrix3} result The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter.\n */\nMatrix3.multiply = function (left, right, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"left\", left);\n Check.typeOf.object(\"right\", right);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const column0Row0 =\n left[0] * right[0] + left[3] * right[1] + left[6] * right[2];\n const column0Row1 =\n left[1] * right[0] + left[4] * right[1] + left[7] * right[2];\n const column0Row2 =\n left[2] * right[0] + left[5] * right[1] + left[8] * right[2];\n\n const column1Row0 =\n left[0] * right[3] + left[3] * right[4] + left[6] * right[5];\n const column1Row1 =\n left[1] * right[3] + left[4] * right[4] + left[7] * right[5];\n const column1Row2 =\n left[2] * right[3] + left[5] * right[4] + left[8] * right[5];\n\n const column2Row0 =\n left[0] * right[6] + left[3] * right[7] + left[6] * right[8];\n const column2Row1 =\n left[1] * right[6] + left[4] * right[7] + left[7] * right[8];\n const column2Row2 =\n left[2] * right[6] + left[5] * right[7] + left[8] * right[8];\n\n result[0] = column0Row0;\n result[1] = column0Row1;\n result[2] = column0Row2;\n result[3] = column1Row0;\n result[4] = column1Row1;\n result[5] = column1Row2;\n result[6] = column2Row0;\n result[7] = column2Row1;\n result[8] = column2Row2;\n return result;\n};\n\n/**\n * Computes the sum of two matrices.\n *\n * @param {Matrix3} left The first matrix.\n * @param {Matrix3} right The second matrix.\n * @param {Matrix3} result The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter.\n */\nMatrix3.add = function (left, right, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"left\", left);\n Check.typeOf.object(\"right\", right);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result[0] = left[0] + right[0];\n result[1] = left[1] + right[1];\n result[2] = left[2] + right[2];\n result[3] = left[3] + right[3];\n result[4] = left[4] + right[4];\n result[5] = left[5] + right[5];\n result[6] = left[6] + right[6];\n result[7] = left[7] + right[7];\n result[8] = left[8] + right[8];\n return result;\n};\n\n/**\n * Computes the difference of two matrices.\n *\n * @param {Matrix3} left The first matrix.\n * @param {Matrix3} right The second matrix.\n * @param {Matrix3} result The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter.\n */\nMatrix3.subtract = function (left, right, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"left\", left);\n Check.typeOf.object(\"right\", right);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result[0] = left[0] - right[0];\n result[1] = left[1] - right[1];\n result[2] = left[2] - right[2];\n result[3] = left[3] - right[3];\n result[4] = left[4] - right[4];\n result[5] = left[5] - right[5];\n result[6] = left[6] - right[6];\n result[7] = left[7] - right[7];\n result[8] = left[8] - right[8];\n return result;\n};\n\n/**\n * Computes the product of a matrix and a column vector.\n *\n * @param {Matrix3} matrix The matrix.\n * @param {Cartesian3} cartesian The column.\n * @param {Cartesian3} result The object onto which to store the result.\n * @returns {Cartesian3} The modified result parameter.\n */\nMatrix3.multiplyByVector = function (matrix, cartesian, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"cartesian\", cartesian);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const vX = cartesian.x;\n const vY = cartesian.y;\n const vZ = cartesian.z;\n\n const x = matrix[0] * vX + matrix[3] * vY + matrix[6] * vZ;\n const y = matrix[1] * vX + matrix[4] * vY + matrix[7] * vZ;\n const z = matrix[2] * vX + matrix[5] * vY + matrix[8] * vZ;\n\n result.x = x;\n result.y = y;\n result.z = z;\n return result;\n};\n\n/**\n * Computes the product of a matrix and a scalar.\n *\n * @param {Matrix3} matrix The matrix.\n * @param {number} scalar The number to multiply by.\n * @param {Matrix3} result The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter.\n */\nMatrix3.multiplyByScalar = function (matrix, scalar, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.number(\"scalar\", scalar);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result[0] = matrix[0] * scalar;\n result[1] = matrix[1] * scalar;\n result[2] = matrix[2] * scalar;\n result[3] = matrix[3] * scalar;\n result[4] = matrix[4] * scalar;\n result[5] = matrix[5] * scalar;\n result[6] = matrix[6] * scalar;\n result[7] = matrix[7] * scalar;\n result[8] = matrix[8] * scalar;\n return result;\n};\n\n/**\n * Computes the product of a matrix times a (non-uniform) scale, as if the scale were a scale matrix.\n *\n * @param {Matrix3} matrix The matrix on the left-hand side.\n * @param {Cartesian3} scale The non-uniform scale on the right-hand side.\n * @param {Matrix3} result The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter.\n *\n *\n * @example\n * // Instead of Cesium.Matrix3.multiply(m, Cesium.Matrix3.fromScale(scale), m);\n * Cesium.Matrix3.multiplyByScale(m, scale, m);\n *\n * @see Matrix3.multiplyByUniformScale\n * @see Matrix3.fromScale\n * @see Matrix3.fromUniformScale\n * @see Matrix3.setScale\n * @see Matrix3.setUniformScale\n * @see Matrix3.getScale\n */\nMatrix3.multiplyByScale = function (matrix, scale, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"scale\", scale);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result[0] = matrix[0] * scale.x;\n result[1] = matrix[1] * scale.x;\n result[2] = matrix[2] * scale.x;\n result[3] = matrix[3] * scale.y;\n result[4] = matrix[4] * scale.y;\n result[5] = matrix[5] * scale.y;\n result[6] = matrix[6] * scale.z;\n result[7] = matrix[7] * scale.z;\n result[8] = matrix[8] * scale.z;\n\n return result;\n};\n\n/**\n * Computes the product of a matrix times a uniform scale, as if the scale were a scale matrix.\n *\n * @param {Matrix3} matrix The matrix on the left-hand side.\n * @param {number} scale The uniform scale on the right-hand side.\n * @param {Matrix3} result The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter.\n *\n * @example\n * // Instead of Cesium.Matrix3.multiply(m, Cesium.Matrix3.fromUniformScale(scale), m);\n * Cesium.Matrix3.multiplyByUniformScale(m, scale, m);\n *\n * @see Matrix3.multiplyByScale\n * @see Matrix3.fromScale\n * @see Matrix3.fromUniformScale\n * @see Matrix3.setScale\n * @see Matrix3.setUniformScale\n * @see Matrix3.getScale\n */\nMatrix3.multiplyByUniformScale = function (matrix, scale, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.number(\"scale\", scale);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result[0] = matrix[0] * scale;\n result[1] = matrix[1] * scale;\n result[2] = matrix[2] * scale;\n result[3] = matrix[3] * scale;\n result[4] = matrix[4] * scale;\n result[5] = matrix[5] * scale;\n result[6] = matrix[6] * scale;\n result[7] = matrix[7] * scale;\n result[8] = matrix[8] * scale;\n\n return result;\n};\n\n/**\n * Creates a negated copy of the provided matrix.\n *\n * @param {Matrix3} matrix The matrix to negate.\n * @param {Matrix3} result The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter.\n */\nMatrix3.negate = function (matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result[0] = -matrix[0];\n result[1] = -matrix[1];\n result[2] = -matrix[2];\n result[3] = -matrix[3];\n result[4] = -matrix[4];\n result[5] = -matrix[5];\n result[6] = -matrix[6];\n result[7] = -matrix[7];\n result[8] = -matrix[8];\n return result;\n};\n\n/**\n * Computes the transpose of the provided matrix.\n *\n * @param {Matrix3} matrix The matrix to transpose.\n * @param {Matrix3} result The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter.\n */\nMatrix3.transpose = function (matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const column0Row0 = matrix[0];\n const column0Row1 = matrix[3];\n const column0Row2 = matrix[6];\n const column1Row0 = matrix[1];\n const column1Row1 = matrix[4];\n const column1Row2 = matrix[7];\n const column2Row0 = matrix[2];\n const column2Row1 = matrix[5];\n const column2Row2 = matrix[8];\n\n result[0] = column0Row0;\n result[1] = column0Row1;\n result[2] = column0Row2;\n result[3] = column1Row0;\n result[4] = column1Row1;\n result[5] = column1Row2;\n result[6] = column2Row0;\n result[7] = column2Row1;\n result[8] = column2Row2;\n return result;\n};\n\nfunction computeFrobeniusNorm(matrix) {\n let norm = 0.0;\n for (let i = 0; i < 9; ++i) {\n const temp = matrix[i];\n norm += temp * temp;\n }\n\n return Math.sqrt(norm);\n}\n\nconst rowVal = [1, 0, 0];\nconst colVal = [2, 2, 1];\n\nfunction offDiagonalFrobeniusNorm(matrix) {\n // Computes the \"off-diagonal\" Frobenius norm.\n // Assumes matrix is symmetric.\n\n let norm = 0.0;\n for (let i = 0; i < 3; ++i) {\n const temp = matrix[Matrix3.getElementIndex(colVal[i], rowVal[i])];\n norm += 2.0 * temp * temp;\n }\n\n return Math.sqrt(norm);\n}\n\nfunction shurDecomposition(matrix, result) {\n // This routine was created based upon Matrix Computations, 3rd ed., by Golub and Van Loan,\n // section 8.4.2 The 2by2 Symmetric Schur Decomposition.\n //\n // The routine takes a matrix, which is assumed to be symmetric, and\n // finds the largest off-diagonal term, and then creates\n // a matrix (result) which can be used to help reduce it\n\n const tolerance = CesiumMath.EPSILON15;\n\n let maxDiagonal = 0.0;\n let rotAxis = 1;\n\n // find pivot (rotAxis) based on max diagonal of matrix\n for (let i = 0; i < 3; ++i) {\n const temp = Math.abs(\n matrix[Matrix3.getElementIndex(colVal[i], rowVal[i])],\n );\n if (temp > maxDiagonal) {\n rotAxis = i;\n maxDiagonal = temp;\n }\n }\n\n let c = 1.0;\n let s = 0.0;\n\n const p = rowVal[rotAxis];\n const q = colVal[rotAxis];\n\n if (Math.abs(matrix[Matrix3.getElementIndex(q, p)]) > tolerance) {\n const qq = matrix[Matrix3.getElementIndex(q, q)];\n const pp = matrix[Matrix3.getElementIndex(p, p)];\n const qp = matrix[Matrix3.getElementIndex(q, p)];\n\n const tau = (qq - pp) / 2.0 / qp;\n let t;\n\n if (tau < 0.0) {\n t = -1.0 / (-tau + Math.sqrt(1.0 + tau * tau));\n } else {\n t = 1.0 / (tau + Math.sqrt(1.0 + tau * tau));\n }\n\n c = 1.0 / Math.sqrt(1.0 + t * t);\n s = t * c;\n }\n\n result = Matrix3.clone(Matrix3.IDENTITY, result);\n\n result[Matrix3.getElementIndex(p, p)] = result[\n Matrix3.getElementIndex(q, q)\n ] = c;\n result[Matrix3.getElementIndex(q, p)] = s;\n result[Matrix3.getElementIndex(p, q)] = -s;\n\n return result;\n}\n\nconst jMatrix = new Matrix3();\nconst jMatrixTranspose = new Matrix3();\n\n/**\n * Computes the eigenvectors and eigenvalues of a symmetric matrix.\n *

\n * Returns a diagonal matrix and unitary matrix such that:\n * matrix = unitary matrix * diagonal matrix * transpose(unitary matrix)\n *

\n *

\n * The values along the diagonal of the diagonal matrix are the eigenvalues. The columns\n * of the unitary matrix are the corresponding eigenvectors.\n *

\n *\n * @param {Matrix3} matrix The matrix to decompose into diagonal and unitary matrix. Expected to be symmetric.\n * @param {object} [result] An object with unitary and diagonal properties which are matrices onto which to store the result.\n * @returns {object} An object with unitary and diagonal properties which are the unitary and diagonal matrices, respectively.\n *\n * @example\n * const a = //... symetric matrix\n * const result = {\n * unitary : new Cesium.Matrix3(),\n * diagonal : new Cesium.Matrix3()\n * };\n * Cesium.Matrix3.computeEigenDecomposition(a, result);\n *\n * const unitaryTranspose = Cesium.Matrix3.transpose(result.unitary, new Cesium.Matrix3());\n * const b = Cesium.Matrix3.multiply(result.unitary, result.diagonal, new Cesium.Matrix3());\n * Cesium.Matrix3.multiply(b, unitaryTranspose, b); // b is now equal to a\n *\n * const lambda = Cesium.Matrix3.getColumn(result.diagonal, 0, new Cesium.Cartesian3()).x; // first eigenvalue\n * const v = Cesium.Matrix3.getColumn(result.unitary, 0, new Cesium.Cartesian3()); // first eigenvector\n * const c = Cesium.Cartesian3.multiplyByScalar(v, lambda, new Cesium.Cartesian3()); // equal to Cesium.Matrix3.multiplyByVector(a, v)\n */\nMatrix3.computeEigenDecomposition = function (matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n //>>includeEnd('debug');\n\n // This routine was created based upon Matrix Computations, 3rd ed., by Golub and Van Loan,\n // section 8.4.3 The Classical Jacobi Algorithm\n\n const tolerance = CesiumMath.EPSILON20;\n const maxSweeps = 10;\n\n let count = 0;\n let sweep = 0;\n\n if (!defined(result)) {\n result = {};\n }\n\n const unitaryMatrix = (result.unitary = Matrix3.clone(\n Matrix3.IDENTITY,\n result.unitary,\n ));\n const diagMatrix = (result.diagonal = Matrix3.clone(matrix, result.diagonal));\n\n const epsilon = tolerance * computeFrobeniusNorm(diagMatrix);\n\n while (sweep < maxSweeps && offDiagonalFrobeniusNorm(diagMatrix) > epsilon) {\n shurDecomposition(diagMatrix, jMatrix);\n Matrix3.transpose(jMatrix, jMatrixTranspose);\n Matrix3.multiply(diagMatrix, jMatrix, diagMatrix);\n Matrix3.multiply(jMatrixTranspose, diagMatrix, diagMatrix);\n Matrix3.multiply(unitaryMatrix, jMatrix, unitaryMatrix);\n\n if (++count > 2) {\n ++sweep;\n count = 0;\n }\n }\n\n return result;\n};\n\n/**\n * Computes a matrix, which contains the absolute (unsigned) values of the provided matrix's elements.\n *\n * @param {Matrix3} matrix The matrix with signed elements.\n * @param {Matrix3} result The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter.\n */\nMatrix3.abs = function (matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result[0] = Math.abs(matrix[0]);\n result[1] = Math.abs(matrix[1]);\n result[2] = Math.abs(matrix[2]);\n result[3] = Math.abs(matrix[3]);\n result[4] = Math.abs(matrix[4]);\n result[5] = Math.abs(matrix[5]);\n result[6] = Math.abs(matrix[6]);\n result[7] = Math.abs(matrix[7]);\n result[8] = Math.abs(matrix[8]);\n\n return result;\n};\n\n/**\n * Computes the determinant of the provided matrix.\n *\n * @param {Matrix3} matrix The matrix to use.\n * @returns {number} The value of the determinant of the matrix.\n */\nMatrix3.determinant = function (matrix) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n //>>includeEnd('debug');\n\n const m11 = matrix[0];\n const m21 = matrix[3];\n const m31 = matrix[6];\n const m12 = matrix[1];\n const m22 = matrix[4];\n const m32 = matrix[7];\n const m13 = matrix[2];\n const m23 = matrix[5];\n const m33 = matrix[8];\n\n return (\n m11 * (m22 * m33 - m23 * m32) +\n m12 * (m23 * m31 - m21 * m33) +\n m13 * (m21 * m32 - m22 * m31)\n );\n};\n\n/**\n * Computes the inverse of the provided matrix.\n *\n * @param {Matrix3} matrix The matrix to invert.\n * @param {Matrix3} result The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter.\n *\n * @exception {DeveloperError} matrix is not invertible.\n */\nMatrix3.inverse = function (matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const m11 = matrix[0];\n const m21 = matrix[1];\n const m31 = matrix[2];\n const m12 = matrix[3];\n const m22 = matrix[4];\n const m32 = matrix[5];\n const m13 = matrix[6];\n const m23 = matrix[7];\n const m33 = matrix[8];\n\n const determinant = Matrix3.determinant(matrix);\n\n //>>includeStart('debug', pragmas.debug);\n if (Math.abs(determinant) <= CesiumMath.EPSILON15) {\n throw new DeveloperError(\"matrix is not invertible\");\n }\n //>>includeEnd('debug');\n\n result[0] = m22 * m33 - m23 * m32;\n result[1] = m23 * m31 - m21 * m33;\n result[2] = m21 * m32 - m22 * m31;\n result[3] = m13 * m32 - m12 * m33;\n result[4] = m11 * m33 - m13 * m31;\n result[5] = m12 * m31 - m11 * m32;\n result[6] = m12 * m23 - m13 * m22;\n result[7] = m13 * m21 - m11 * m23;\n result[8] = m11 * m22 - m12 * m21;\n\n const scale = 1.0 / determinant;\n return Matrix3.multiplyByScalar(result, scale, result);\n};\n\nconst scratchTransposeMatrix = new Matrix3();\n\n/**\n * Computes the inverse transpose of a matrix.\n *\n * @param {Matrix3} matrix The matrix to transpose and invert.\n * @param {Matrix3} result The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter.\n */\nMatrix3.inverseTranspose = function (matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n return Matrix3.inverse(\n Matrix3.transpose(matrix, scratchTransposeMatrix),\n result,\n );\n};\n\n/**\n * Compares the provided matrices componentwise and returns\n * true if they are equal, false otherwise.\n *\n * @param {Matrix3} [left] The first matrix.\n * @param {Matrix3} [right] The second matrix.\n * @returns {boolean} true if left and right are equal, false otherwise.\n */\nMatrix3.equals = function (left, right) {\n return (\n left === right ||\n (defined(left) &&\n defined(right) &&\n left[0] === right[0] &&\n left[1] === right[1] &&\n left[2] === right[2] &&\n left[3] === right[3] &&\n left[4] === right[4] &&\n left[5] === right[5] &&\n left[6] === right[6] &&\n left[7] === right[7] &&\n left[8] === right[8])\n );\n};\n\n/**\n * Compares the provided matrices componentwise and returns\n * true if they are within the provided epsilon,\n * false otherwise.\n *\n * @param {Matrix3} [left] The first matrix.\n * @param {Matrix3} [right] The second matrix.\n * @param {number} [epsilon=0] The epsilon to use for equality testing.\n * @returns {boolean} true if left and right are within the provided epsilon, false otherwise.\n */\nMatrix3.equalsEpsilon = function (left, right, epsilon) {\n epsilon = defaultValue(epsilon, 0);\n\n return (\n left === right ||\n (defined(left) &&\n defined(right) &&\n Math.abs(left[0] - right[0]) <= epsilon &&\n Math.abs(left[1] - right[1]) <= epsilon &&\n Math.abs(left[2] - right[2]) <= epsilon &&\n Math.abs(left[3] - right[3]) <= epsilon &&\n Math.abs(left[4] - right[4]) <= epsilon &&\n Math.abs(left[5] - right[5]) <= epsilon &&\n Math.abs(left[6] - right[6]) <= epsilon &&\n Math.abs(left[7] - right[7]) <= epsilon &&\n Math.abs(left[8] - right[8]) <= epsilon)\n );\n};\n\n/**\n * An immutable Matrix3 instance initialized to the identity matrix.\n *\n * @type {Matrix3}\n * @constant\n */\nMatrix3.IDENTITY = Object.freeze(\n new Matrix3(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0),\n);\n\n/**\n * An immutable Matrix3 instance initialized to the zero matrix.\n *\n * @type {Matrix3}\n * @constant\n */\nMatrix3.ZERO = Object.freeze(\n new Matrix3(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0),\n);\n\n/**\n * The index into Matrix3 for column 0, row 0.\n *\n * @type {number}\n * @constant\n */\nMatrix3.COLUMN0ROW0 = 0;\n\n/**\n * The index into Matrix3 for column 0, row 1.\n *\n * @type {number}\n * @constant\n */\nMatrix3.COLUMN0ROW1 = 1;\n\n/**\n * The index into Matrix3 for column 0, row 2.\n *\n * @type {number}\n * @constant\n */\nMatrix3.COLUMN0ROW2 = 2;\n\n/**\n * The index into Matrix3 for column 1, row 0.\n *\n * @type {number}\n * @constant\n */\nMatrix3.COLUMN1ROW0 = 3;\n\n/**\n * The index into Matrix3 for column 1, row 1.\n *\n * @type {number}\n * @constant\n */\nMatrix3.COLUMN1ROW1 = 4;\n\n/**\n * The index into Matrix3 for column 1, row 2.\n *\n * @type {number}\n * @constant\n */\nMatrix3.COLUMN1ROW2 = 5;\n\n/**\n * The index into Matrix3 for column 2, row 0.\n *\n * @type {number}\n * @constant\n */\nMatrix3.COLUMN2ROW0 = 6;\n\n/**\n * The index into Matrix3 for column 2, row 1.\n *\n * @type {number}\n * @constant\n */\nMatrix3.COLUMN2ROW1 = 7;\n\n/**\n * The index into Matrix3 for column 2, row 2.\n *\n * @type {number}\n * @constant\n */\nMatrix3.COLUMN2ROW2 = 8;\n\nObject.defineProperties(Matrix3.prototype, {\n /**\n * Gets the number of items in the collection.\n * @memberof Matrix3.prototype\n *\n * @type {number}\n */\n length: {\n get: function () {\n return Matrix3.packedLength;\n },\n },\n});\n\n/**\n * Duplicates the provided Matrix3 instance.\n *\n * @param {Matrix3} [result] The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter or a new Matrix3 instance if one was not provided.\n */\nMatrix3.prototype.clone = function (result) {\n return Matrix3.clone(this, result);\n};\n\n/**\n * Compares this matrix to the provided matrix componentwise and returns\n * true if they are equal, false otherwise.\n *\n * @param {Matrix3} [right] The right hand side matrix.\n * @returns {boolean} true if they are equal, false otherwise.\n */\nMatrix3.prototype.equals = function (right) {\n return Matrix3.equals(this, right);\n};\n\n/**\n * @private\n */\nMatrix3.equalsArray = function (matrix, array, offset) {\n return (\n matrix[0] === array[offset] &&\n matrix[1] === array[offset + 1] &&\n matrix[2] === array[offset + 2] &&\n matrix[3] === array[offset + 3] &&\n matrix[4] === array[offset + 4] &&\n matrix[5] === array[offset + 5] &&\n matrix[6] === array[offset + 6] &&\n matrix[7] === array[offset + 7] &&\n matrix[8] === array[offset + 8]\n );\n};\n\n/**\n * Compares this matrix to the provided matrix componentwise and returns\n * true if they are within the provided epsilon,\n * false otherwise.\n *\n * @param {Matrix3} [right] The right hand side matrix.\n * @param {number} [epsilon=0] The epsilon to use for equality testing.\n * @returns {boolean} true if they are within the provided epsilon, false otherwise.\n */\nMatrix3.prototype.equalsEpsilon = function (right, epsilon) {\n return Matrix3.equalsEpsilon(this, right, epsilon);\n};\n\n/**\n * Creates a string representing this Matrix with each row being\n * on a separate line and in the format '(column0, column1, column2)'.\n *\n * @returns {string} A string representing the provided Matrix with each row being on a separate line and in the format '(column0, column1, column2)'.\n */\nMatrix3.prototype.toString = function () {\n return (\n `(${this[0]}, ${this[3]}, ${this[6]})\\n` +\n `(${this[1]}, ${this[4]}, ${this[7]})\\n` +\n `(${this[2]}, ${this[5]}, ${this[8]})`\n );\n};\nexport default Matrix3;\n","import defined from \"./defined.js\";\n\n/**\n * Constructs an exception object that is thrown due to an error that can occur at runtime, e.g.,\n * out of memory, could not compile shader, etc. If a function may throw this\n * exception, the calling code should be prepared to catch it.\n *

\n * On the other hand, a {@link DeveloperError} indicates an exception due\n * to a developer error, e.g., invalid argument, that usually indicates a bug in the\n * calling code.\n *\n * @alias RuntimeError\n * @constructor\n * @extends Error\n *\n * @param {string} [message] The error message for this exception.\n *\n * @see DeveloperError\n */\nfunction RuntimeError(message) {\n /**\n * 'RuntimeError' indicating that this exception was thrown due to a runtime error.\n * @type {string}\n * @readonly\n */\n this.name = \"RuntimeError\";\n\n /**\n * The explanation for why this exception was thrown.\n * @type {string}\n * @readonly\n */\n this.message = message;\n\n //Browsers such as IE don't have a stack property until you actually throw the error.\n let stack;\n try {\n throw new Error();\n } catch (e) {\n stack = e.stack;\n }\n\n /**\n * The stack trace of this exception, if available.\n * @type {string}\n * @readonly\n */\n this.stack = stack;\n}\n\nif (defined(Object.create)) {\n RuntimeError.prototype = Object.create(Error.prototype);\n RuntimeError.prototype.constructor = RuntimeError;\n}\n\nRuntimeError.prototype.toString = function () {\n let str = `${this.name}: ${this.message}`;\n\n if (defined(this.stack)) {\n str += `\\n${this.stack.toString()}`;\n }\n\n return str;\n};\nexport default RuntimeError;\n","import Cartesian2 from \"./Cartesian2.js\";\nimport Cartesian3 from \"./Cartesian3.js\";\nimport Cartesian4 from \"./Cartesian4.js\";\nimport Cartographic from \"./Cartographic.js\";\nimport Check from \"./Check.js\";\nimport defaultValue from \"./defaultValue.js\";\nimport defined from \"./defined.js\";\nimport DeveloperError from \"./DeveloperError.js\";\nimport EarthOrientationParameters from \"./EarthOrientationParameters.js\";\nimport EarthOrientationParametersSample from \"./EarthOrientationParametersSample.js\";\nimport Ellipsoid from \"./Ellipsoid.js\";\nimport HeadingPitchRoll from \"./HeadingPitchRoll.js\";\nimport Iau2006XysData from \"./Iau2006XysData.js\";\nimport Iau2006XysSample from \"./Iau2006XysSample.js\";\nimport JulianDate from \"./JulianDate.js\";\nimport CesiumMath from \"./Math.js\";\nimport Matrix3 from \"./Matrix3.js\";\nimport Matrix4 from \"./Matrix4.js\";\nimport Quaternion from \"./Quaternion.js\";\nimport TimeConstants from \"./TimeConstants.js\";\n\n/**\n * Contains functions for transforming positions to various reference frames.\n *\n * @namespace Transforms\n */\nconst Transforms = {};\n\nconst vectorProductLocalFrame = {\n up: {\n south: \"east\",\n north: \"west\",\n west: \"south\",\n east: \"north\",\n },\n down: {\n south: \"west\",\n north: \"east\",\n west: \"north\",\n east: \"south\",\n },\n south: {\n up: \"west\",\n down: \"east\",\n west: \"down\",\n east: \"up\",\n },\n north: {\n up: \"east\",\n down: \"west\",\n west: \"up\",\n east: \"down\",\n },\n west: {\n up: \"north\",\n down: \"south\",\n north: \"down\",\n south: \"up\",\n },\n east: {\n up: \"south\",\n down: \"north\",\n north: \"up\",\n south: \"down\",\n },\n};\n\nconst degeneratePositionLocalFrame = {\n north: [-1, 0, 0],\n east: [0, 1, 0],\n up: [0, 0, 1],\n south: [1, 0, 0],\n west: [0, -1, 0],\n down: [0, 0, -1],\n};\n\nconst localFrameToFixedFrameCache = {};\n\nconst scratchCalculateCartesian = {\n east: new Cartesian3(),\n north: new Cartesian3(),\n up: new Cartesian3(),\n west: new Cartesian3(),\n south: new Cartesian3(),\n down: new Cartesian3(),\n};\nlet scratchFirstCartesian = new Cartesian3();\nlet scratchSecondCartesian = new Cartesian3();\nlet scratchThirdCartesian = new Cartesian3();\n/**\n * Generates a function that computes a 4x4 transformation matrix from a reference frame\n * centered at the provided origin to the provided ellipsoid's fixed reference frame.\n * @param {string} firstAxis name of the first axis of the local reference frame. Must be\n * 'east', 'north', 'up', 'west', 'south' or 'down'.\n * @param {string} secondAxis name of the second axis of the local reference frame. Must be\n * 'east', 'north', 'up', 'west', 'south' or 'down'.\n * @return {Transforms.LocalFrameToFixedFrame} The function that will computes a\n * 4x4 transformation matrix from a reference frame, with first axis and second axis compliant with the parameters,\n */\nTransforms.localFrameToFixedFrameGenerator = function (firstAxis, secondAxis) {\n if (\n !vectorProductLocalFrame.hasOwnProperty(firstAxis) ||\n !vectorProductLocalFrame[firstAxis].hasOwnProperty(secondAxis)\n ) {\n throw new DeveloperError(\n \"firstAxis and secondAxis must be east, north, up, west, south or down.\",\n );\n }\n const thirdAxis = vectorProductLocalFrame[firstAxis][secondAxis];\n\n /**\n * Computes a 4x4 transformation matrix from a reference frame\n * centered at the provided origin to the provided ellipsoid's fixed reference frame.\n * @callback Transforms.LocalFrameToFixedFrame\n * @param {Cartesian3} origin The center point of the local reference frame.\n * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid whose fixed frame is used in the transformation.\n * @param {Matrix4} [result] The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter or a new Matrix4 instance if none was provided.\n */\n let resultat;\n const hashAxis = firstAxis + secondAxis;\n if (defined(localFrameToFixedFrameCache[hashAxis])) {\n resultat = localFrameToFixedFrameCache[hashAxis];\n } else {\n resultat = function (origin, ellipsoid, result) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(origin)) {\n throw new DeveloperError(\"origin is required.\");\n }\n if (isNaN(origin.x) || isNaN(origin.y) || isNaN(origin.z)) {\n throw new DeveloperError(\"origin has a NaN component\");\n }\n //>>includeEnd('debug');\n if (!defined(result)) {\n result = new Matrix4();\n }\n if (\n Cartesian3.equalsEpsilon(origin, Cartesian3.ZERO, CesiumMath.EPSILON14)\n ) {\n // If x, y, and z are zero, use the degenerate local frame, which is a special case\n Cartesian3.unpack(\n degeneratePositionLocalFrame[firstAxis],\n 0,\n scratchFirstCartesian,\n );\n Cartesian3.unpack(\n degeneratePositionLocalFrame[secondAxis],\n 0,\n scratchSecondCartesian,\n );\n Cartesian3.unpack(\n degeneratePositionLocalFrame[thirdAxis],\n 0,\n scratchThirdCartesian,\n );\n } else if (\n CesiumMath.equalsEpsilon(origin.x, 0.0, CesiumMath.EPSILON14) &&\n CesiumMath.equalsEpsilon(origin.y, 0.0, CesiumMath.EPSILON14)\n ) {\n // If x and y are zero, assume origin is at a pole, which is a special case.\n const sign = CesiumMath.sign(origin.z);\n\n Cartesian3.unpack(\n degeneratePositionLocalFrame[firstAxis],\n 0,\n scratchFirstCartesian,\n );\n if (firstAxis !== \"east\" && firstAxis !== \"west\") {\n Cartesian3.multiplyByScalar(\n scratchFirstCartesian,\n sign,\n scratchFirstCartesian,\n );\n }\n\n Cartesian3.unpack(\n degeneratePositionLocalFrame[secondAxis],\n 0,\n scratchSecondCartesian,\n );\n if (secondAxis !== \"east\" && secondAxis !== \"west\") {\n Cartesian3.multiplyByScalar(\n scratchSecondCartesian,\n sign,\n scratchSecondCartesian,\n );\n }\n\n Cartesian3.unpack(\n degeneratePositionLocalFrame[thirdAxis],\n 0,\n scratchThirdCartesian,\n );\n if (thirdAxis !== \"east\" && thirdAxis !== \"west\") {\n Cartesian3.multiplyByScalar(\n scratchThirdCartesian,\n sign,\n scratchThirdCartesian,\n );\n }\n } else {\n ellipsoid = defaultValue(ellipsoid, Ellipsoid.default);\n ellipsoid.geodeticSurfaceNormal(origin, scratchCalculateCartesian.up);\n\n const up = scratchCalculateCartesian.up;\n const east = scratchCalculateCartesian.east;\n east.x = -origin.y;\n east.y = origin.x;\n east.z = 0.0;\n Cartesian3.normalize(east, scratchCalculateCartesian.east);\n Cartesian3.cross(up, east, scratchCalculateCartesian.north);\n\n Cartesian3.multiplyByScalar(\n scratchCalculateCartesian.up,\n -1,\n scratchCalculateCartesian.down,\n );\n Cartesian3.multiplyByScalar(\n scratchCalculateCartesian.east,\n -1,\n scratchCalculateCartesian.west,\n );\n Cartesian3.multiplyByScalar(\n scratchCalculateCartesian.north,\n -1,\n scratchCalculateCartesian.south,\n );\n\n scratchFirstCartesian = scratchCalculateCartesian[firstAxis];\n scratchSecondCartesian = scratchCalculateCartesian[secondAxis];\n scratchThirdCartesian = scratchCalculateCartesian[thirdAxis];\n }\n result[0] = scratchFirstCartesian.x;\n result[1] = scratchFirstCartesian.y;\n result[2] = scratchFirstCartesian.z;\n result[3] = 0.0;\n result[4] = scratchSecondCartesian.x;\n result[5] = scratchSecondCartesian.y;\n result[6] = scratchSecondCartesian.z;\n result[7] = 0.0;\n result[8] = scratchThirdCartesian.x;\n result[9] = scratchThirdCartesian.y;\n result[10] = scratchThirdCartesian.z;\n result[11] = 0.0;\n result[12] = origin.x;\n result[13] = origin.y;\n result[14] = origin.z;\n result[15] = 1.0;\n return result;\n };\n localFrameToFixedFrameCache[hashAxis] = resultat;\n }\n return resultat;\n};\n\n/**\n * Computes a 4x4 transformation matrix from a reference frame with an east-north-up axes\n * centered at the provided origin to the provided ellipsoid's fixed reference frame.\n * The local axes are defined as:\n *
    \n *
  • The x axis points in the local east direction.
  • \n *
  • The y axis points in the local north direction.
  • \n *
  • The z axis points in the direction of the ellipsoid surface normal which passes through the position.
  • \n *
\n *\n * @function\n * @param {Cartesian3} origin The center point of the local reference frame.\n * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid whose fixed frame is used in the transformation.\n * @param {Matrix4} [result] The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter or a new Matrix4 instance if none was provided.\n *\n * @example\n * // Get the transform from local east-north-up at cartographic (0.0, 0.0) to Earth's fixed frame.\n * const center = Cesium.Cartesian3.fromDegrees(0.0, 0.0);\n * const transform = Cesium.Transforms.eastNorthUpToFixedFrame(center);\n */\nTransforms.eastNorthUpToFixedFrame = Transforms.localFrameToFixedFrameGenerator(\n \"east\",\n \"north\",\n);\n\n/**\n * Computes a 4x4 transformation matrix from a reference frame with an north-east-down axes\n * centered at the provided origin to the provided ellipsoid's fixed reference frame.\n * The local axes are defined as:\n *
    \n *
  • The x axis points in the local north direction.
  • \n *
  • The y axis points in the local east direction.
  • \n *
  • The z axis points in the opposite direction of the ellipsoid surface normal which passes through the position.
  • \n *
\n *\n * @function\n * @param {Cartesian3} origin The center point of the local reference frame.\n * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid whose fixed frame is used in the transformation.\n * @param {Matrix4} [result] The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter or a new Matrix4 instance if none was provided.\n *\n * @example\n * // Get the transform from local north-east-down at cartographic (0.0, 0.0) to Earth's fixed frame.\n * const center = Cesium.Cartesian3.fromDegrees(0.0, 0.0);\n * const transform = Cesium.Transforms.northEastDownToFixedFrame(center);\n */\nTransforms.northEastDownToFixedFrame =\n Transforms.localFrameToFixedFrameGenerator(\"north\", \"east\");\n\n/**\n * Computes a 4x4 transformation matrix from a reference frame with an north-up-east axes\n * centered at the provided origin to the provided ellipsoid's fixed reference frame.\n * The local axes are defined as:\n *
    \n *
  • The x axis points in the local north direction.
  • \n *
  • The y axis points in the direction of the ellipsoid surface normal which passes through the position.
  • \n *
  • The z axis points in the local east direction.
  • \n *
\n *\n * @function\n * @param {Cartesian3} origin The center point of the local reference frame.\n * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid whose fixed frame is used in the transformation.\n * @param {Matrix4} [result] The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter or a new Matrix4 instance if none was provided.\n *\n * @example\n * // Get the transform from local north-up-east at cartographic (0.0, 0.0) to Earth's fixed frame.\n * const center = Cesium.Cartesian3.fromDegrees(0.0, 0.0);\n * const transform = Cesium.Transforms.northUpEastToFixedFrame(center);\n */\nTransforms.northUpEastToFixedFrame = Transforms.localFrameToFixedFrameGenerator(\n \"north\",\n \"up\",\n);\n\n/**\n * Computes a 4x4 transformation matrix from a reference frame with an north-west-up axes\n * centered at the provided origin to the provided ellipsoid's fixed reference frame.\n * The local axes are defined as:\n *
    \n *
  • The x axis points in the local north direction.
  • \n *
  • The y axis points in the local west direction.
  • \n *
  • The z axis points in the direction of the ellipsoid surface normal which passes through the position.
  • \n *
\n *\n * @function\n * @param {Cartesian3} origin The center point of the local reference frame.\n * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid whose fixed frame is used in the transformation.\n * @param {Matrix4} [result] The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter or a new Matrix4 instance if none was provided.\n *\n * @example\n * // Get the transform from local north-West-Up at cartographic (0.0, 0.0) to Earth's fixed frame.\n * const center = Cesium.Cartesian3.fromDegrees(0.0, 0.0);\n * const transform = Cesium.Transforms.northWestUpToFixedFrame(center);\n */\nTransforms.northWestUpToFixedFrame = Transforms.localFrameToFixedFrameGenerator(\n \"north\",\n \"west\",\n);\n\nconst scratchHPRQuaternion = new Quaternion();\nconst scratchScale = new Cartesian3(1.0, 1.0, 1.0);\nconst scratchHPRMatrix4 = new Matrix4();\n\n/**\n * Computes a 4x4 transformation matrix from a reference frame with axes computed from the heading-pitch-roll angles\n * centered at the provided origin to the provided ellipsoid's fixed reference frame. Heading is the rotation from the local east\n * direction where a positive angle is increasing eastward. Pitch is the rotation from the local east-north plane. Positive pitch angles\n * are above the plane. Negative pitch angles are below the plane. Roll is the first rotation applied about the local east axis.\n *\n * @param {Cartesian3} origin The center point of the local reference frame.\n * @param {HeadingPitchRoll} headingPitchRoll The heading, pitch, and roll.\n * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid whose fixed frame is used in the transformation.\n * @param {Transforms.LocalFrameToFixedFrame} [fixedFrameTransform=Transforms.eastNorthUpToFixedFrame] A 4x4 transformation\n * matrix from a reference frame to the provided ellipsoid's fixed reference frame\n * @param {Matrix4} [result] The object onto which to store the result.\n * @returns {Matrix4} The modified result parameter or a new Matrix4 instance if none was provided.\n *\n * @example\n * // Get the transform from local heading-pitch-roll at cartographic (0.0, 0.0) to Earth's fixed frame.\n * const center = Cesium.Cartesian3.fromDegrees(0.0, 0.0);\n * const heading = -Cesium.Math.PI_OVER_TWO;\n * const pitch = Cesium.Math.PI_OVER_FOUR;\n * const roll = 0.0;\n * const hpr = new Cesium.HeadingPitchRoll(heading, pitch, roll);\n * const transform = Cesium.Transforms.headingPitchRollToFixedFrame(center, hpr);\n */\nTransforms.headingPitchRollToFixedFrame = function (\n origin,\n headingPitchRoll,\n ellipsoid,\n fixedFrameTransform,\n result,\n) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"HeadingPitchRoll\", headingPitchRoll);\n //>>includeEnd('debug');\n\n fixedFrameTransform = defaultValue(\n fixedFrameTransform,\n Transforms.eastNorthUpToFixedFrame,\n );\n const hprQuaternion = Quaternion.fromHeadingPitchRoll(\n headingPitchRoll,\n scratchHPRQuaternion,\n );\n const hprMatrix = Matrix4.fromTranslationQuaternionRotationScale(\n Cartesian3.ZERO,\n hprQuaternion,\n scratchScale,\n scratchHPRMatrix4,\n );\n result = fixedFrameTransform(origin, ellipsoid, result);\n return Matrix4.multiply(result, hprMatrix, result);\n};\n\nconst scratchENUMatrix4 = new Matrix4();\nconst scratchHPRMatrix3 = new Matrix3();\n\n/**\n * Computes a quaternion from a reference frame with axes computed from the heading-pitch-roll angles\n * centered at the provided origin. Heading is the rotation from the local east\n * direction where a positive angle is increasing eastward. Pitch is the rotation from the local east-north plane. Positive pitch angles\n * are above the plane. Negative pitch angles are below the plane. Roll is the first rotation applied about the local east axis.\n *\n * @param {Cartesian3} origin The center point of the local reference frame.\n * @param {HeadingPitchRoll} headingPitchRoll The heading, pitch, and roll.\n * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid whose fixed frame is used in the transformation.\n * @param {Transforms.LocalFrameToFixedFrame} [fixedFrameTransform=Transforms.eastNorthUpToFixedFrame] A 4x4 transformation\n * matrix from a reference frame to the provided ellipsoid's fixed reference frame\n * @param {Quaternion} [result] The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter or a new Quaternion instance if none was provided.\n *\n * @example\n * // Get the quaternion from local heading-pitch-roll at cartographic (0.0, 0.0) to Earth's fixed frame.\n * const center = Cesium.Cartesian3.fromDegrees(0.0, 0.0);\n * const heading = -Cesium.Math.PI_OVER_TWO;\n * const pitch = Cesium.Math.PI_OVER_FOUR;\n * const roll = 0.0;\n * const hpr = new HeadingPitchRoll(heading, pitch, roll);\n * const quaternion = Cesium.Transforms.headingPitchRollQuaternion(center, hpr);\n */\nTransforms.headingPitchRollQuaternion = function (\n origin,\n headingPitchRoll,\n ellipsoid,\n fixedFrameTransform,\n result,\n) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"HeadingPitchRoll\", headingPitchRoll);\n //>>includeEnd('debug');\n\n const transform = Transforms.headingPitchRollToFixedFrame(\n origin,\n headingPitchRoll,\n ellipsoid,\n fixedFrameTransform,\n scratchENUMatrix4,\n );\n const rotation = Matrix4.getMatrix3(transform, scratchHPRMatrix3);\n return Quaternion.fromRotationMatrix(rotation, result);\n};\n\nconst noScale = new Cartesian3(1.0, 1.0, 1.0);\nconst hprCenterScratch = new Cartesian3();\nconst ffScratch = new Matrix4();\nconst hprTransformScratch = new Matrix4();\nconst hprRotationScratch = new Matrix3();\nconst hprQuaternionScratch = new Quaternion();\n/**\n * Computes heading-pitch-roll angles from a transform in a particular reference frame. Heading is the rotation from the local east\n * direction where a positive angle is increasing eastward. Pitch is the rotation from the local east-north plane. Positive pitch angles\n * are above the plane. Negative pitch angles are below the plane. Roll is the first rotation applied about the local east axis.\n *\n * @param {Matrix4} transform The transform\n * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid whose fixed frame is used in the transformation.\n * @param {Transforms.LocalFrameToFixedFrame} [fixedFrameTransform=Transforms.eastNorthUpToFixedFrame] A 4x4 transformation\n * matrix from a reference frame to the provided ellipsoid's fixed reference frame\n * @param {HeadingPitchRoll} [result] The object onto which to store the result.\n * @returns {HeadingPitchRoll} The modified result parameter or a new HeadingPitchRoll instance if none was provided.\n */\nTransforms.fixedFrameToHeadingPitchRoll = function (\n transform,\n ellipsoid,\n fixedFrameTransform,\n result,\n) {\n //>>includeStart('debug', pragmas.debug);\n Check.defined(\"transform\", transform);\n //>>includeEnd('debug');\n\n ellipsoid = defaultValue(ellipsoid, Ellipsoid.default);\n fixedFrameTransform = defaultValue(\n fixedFrameTransform,\n Transforms.eastNorthUpToFixedFrame,\n );\n if (!defined(result)) {\n result = new HeadingPitchRoll();\n }\n\n const center = Matrix4.getTranslation(transform, hprCenterScratch);\n if (Cartesian3.equals(center, Cartesian3.ZERO)) {\n result.heading = 0;\n result.pitch = 0;\n result.roll = 0;\n return result;\n }\n let toFixedFrame = Matrix4.inverseTransformation(\n fixedFrameTransform(center, ellipsoid, ffScratch),\n ffScratch,\n );\n let transformCopy = Matrix4.setScale(transform, noScale, hprTransformScratch);\n transformCopy = Matrix4.setTranslation(\n transformCopy,\n Cartesian3.ZERO,\n transformCopy,\n );\n\n toFixedFrame = Matrix4.multiply(toFixedFrame, transformCopy, toFixedFrame);\n let quaternionRotation = Quaternion.fromRotationMatrix(\n Matrix4.getMatrix3(toFixedFrame, hprRotationScratch),\n hprQuaternionScratch,\n );\n quaternionRotation = Quaternion.normalize(\n quaternionRotation,\n quaternionRotation,\n );\n\n return HeadingPitchRoll.fromQuaternion(quaternionRotation, result);\n};\n\nconst gmstConstant0 = 6 * 3600 + 41 * 60 + 50.54841;\nconst gmstConstant1 = 8640184.812866;\nconst gmstConstant2 = 0.093104;\nconst gmstConstant3 = -6.2e-6;\nconst rateCoef = 1.1772758384668e-19;\nconst wgs84WRPrecessing = 7.2921158553e-5;\nconst twoPiOverSecondsInDay = CesiumMath.TWO_PI / 86400.0;\nlet dateInUtc = new JulianDate();\n\n/**\n * The default function to compute a rotation matrix to transform a point or vector from the International Celestial\n * Reference Frame (GCRF/ICRF) inertial frame axes to the central body, typically Earth, fixed frame axis at a given\n * time for use in lighting and transformation from inertial reference frames. This function may return undefined if\n * the data necessary to do the transformation is not yet loaded.\n *\n * @param {JulianDate} date The time at which to compute the rotation matrix.\n * @param {Matrix3} [result] The object onto which to store the result. If this parameter is\n * not specified, a new instance is created and returned.\n * @returns {Matrix3|undefined} The rotation matrix, or undefined if the data necessary to do the\n * transformation is not yet loaded.\n *\n * @example\n * // Set the default ICRF to fixed transformation to that of the Moon.\n * Cesium.Transforms.computeIcrfToCentralBodyFixedMatrix = Cesium.Transforms.computeIcrfToMoonFixedMatrix;\n *\n * @see Transforms.computeIcrfToFixedMatrix\n * @see Transforms.computeTemeToPseudoFixedMatrix\n * @see Transforms.computeIcrfToMoonFixedMatrix\n */\nTransforms.computeIcrfToCentralBodyFixedMatrix = function (date, result) {\n let transformMatrix = Transforms.computeIcrfToFixedMatrix(date, result);\n if (!defined(transformMatrix)) {\n transformMatrix = Transforms.computeTemeToPseudoFixedMatrix(date, result);\n }\n\n return transformMatrix;\n};\n\n/**\n * Computes a rotation matrix to transform a point or vector from True Equator Mean Equinox (TEME) axes to the\n * pseudo-fixed axes at a given time. This method treats the UT1 time standard as equivalent to UTC.\n *\n * @param {JulianDate} date The time at which to compute the rotation matrix.\n * @param {Matrix3} [result] The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter or a new Matrix3 instance if none was provided.\n *\n * @example\n * //Set the view to the inertial frame.\n * scene.postUpdate.addEventListener(function(scene, time) {\n * const now = Cesium.JulianDate.now();\n * const offset = Cesium.Matrix4.multiplyByPoint(camera.transform, camera.position, new Cesium.Cartesian3());\n * const transform = Cesium.Matrix4.fromRotationTranslation(Cesium.Transforms.computeTemeToPseudoFixedMatrix(now));\n * const inverseTransform = Cesium.Matrix4.inverseTransformation(transform, new Cesium.Matrix4());\n * Cesium.Matrix4.multiplyByPoint(inverseTransform, offset, offset);\n * camera.lookAtTransform(transform, offset);\n * });\n */\nTransforms.computeTemeToPseudoFixedMatrix = function (date, result) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(date)) {\n throw new DeveloperError(\"date is required.\");\n }\n //>>includeEnd('debug');\n\n // GMST is actually computed using UT1. We're using UTC as an approximation of UT1.\n // We do not want to use the function like convertTaiToUtc in JulianDate because\n // we explicitly do not want to fail when inside the leap second.\n\n dateInUtc = JulianDate.addSeconds(\n date,\n -JulianDate.computeTaiMinusUtc(date),\n dateInUtc,\n );\n const utcDayNumber = dateInUtc.dayNumber;\n const utcSecondsIntoDay = dateInUtc.secondsOfDay;\n\n let t;\n const diffDays = utcDayNumber - 2451545;\n if (utcSecondsIntoDay >= 43200.0) {\n t = (diffDays + 0.5) / TimeConstants.DAYS_PER_JULIAN_CENTURY;\n } else {\n t = (diffDays - 0.5) / TimeConstants.DAYS_PER_JULIAN_CENTURY;\n }\n\n const gmst0 =\n gmstConstant0 +\n t * (gmstConstant1 + t * (gmstConstant2 + t * gmstConstant3));\n const angle = (gmst0 * twoPiOverSecondsInDay) % CesiumMath.TWO_PI;\n const ratio = wgs84WRPrecessing + rateCoef * (utcDayNumber - 2451545.5);\n const secondsSinceMidnight =\n (utcSecondsIntoDay + TimeConstants.SECONDS_PER_DAY * 0.5) %\n TimeConstants.SECONDS_PER_DAY;\n const gha = angle + ratio * secondsSinceMidnight;\n const cosGha = Math.cos(gha);\n const sinGha = Math.sin(gha);\n\n if (!defined(result)) {\n return new Matrix3(\n cosGha,\n sinGha,\n 0.0,\n -sinGha,\n cosGha,\n 0.0,\n 0.0,\n 0.0,\n 1.0,\n );\n }\n result[0] = cosGha;\n result[1] = -sinGha;\n result[2] = 0.0;\n result[3] = sinGha;\n result[4] = cosGha;\n result[5] = 0.0;\n result[6] = 0.0;\n result[7] = 0.0;\n result[8] = 1.0;\n return result;\n};\n\n/**\n * The source of IAU 2006 XYS data, used for computing the transformation between the\n * Fixed and ICRF axes.\n * @type {Iau2006XysData}\n *\n * @see Transforms.computeIcrfToFixedMatrix\n * @see Transforms.computeFixedToIcrfMatrix\n *\n * @private\n */\nTransforms.iau2006XysData = new Iau2006XysData();\n\n/**\n * The source of Earth Orientation Parameters (EOP) data, used for computing the transformation\n * between the Fixed and ICRF axes. By default, zero values are used for all EOP values,\n * yielding a reasonable but not completely accurate representation of the ICRF axes.\n * @type {EarthOrientationParameters}\n *\n * @see Transforms.computeIcrfToFixedMatrix\n * @see Transforms.computeFixedToIcrfMatrix\n *\n * @private\n */\nTransforms.earthOrientationParameters = EarthOrientationParameters.NONE;\n\nconst ttMinusTai = 32.184;\nconst j2000ttDays = 2451545.0;\n\n/**\n * Preloads the data necessary to transform between the ICRF and Fixed axes, in either\n * direction, over a given interval. This function returns a promise that, when resolved,\n * indicates that the preload has completed.\n *\n * @param {TimeInterval} timeInterval The interval to preload.\n * @returns {Promise} A promise that, when resolved, indicates that the preload has completed\n * and evaluation of the transformation between the fixed and ICRF axes will\n * no longer return undefined for a time inside the interval.\n *\n *\n * @example\n * const interval = new Cesium.TimeInterval(...);\n * await Cesium.Transforms.preloadIcrfFixed(interval));\n * // the data is now loaded\n *\n * @see Transforms.computeIcrfToFixedMatrix\n * @see Transforms.computeFixedToIcrfMatrix\n */\nTransforms.preloadIcrfFixed = function (timeInterval) {\n const startDayTT = timeInterval.start.dayNumber;\n const startSecondTT = timeInterval.start.secondsOfDay + ttMinusTai;\n const stopDayTT = timeInterval.stop.dayNumber;\n const stopSecondTT = timeInterval.stop.secondsOfDay + ttMinusTai;\n\n return Transforms.iau2006XysData.preload(\n startDayTT,\n startSecondTT,\n stopDayTT,\n stopSecondTT,\n );\n};\n\n/**\n * Computes a rotation matrix to transform a point or vector from the International Celestial\n * Reference Frame (GCRF/ICRF) inertial frame axes to the Earth-Fixed frame axes (ITRF)\n * at a given time. This function may return undefined if the data necessary to\n * do the transformation is not yet loaded.\n *\n * @param {JulianDate} date The time at which to compute the rotation matrix.\n * @param {Matrix3} [result] The object onto which to store the result. If this parameter is\n * not specified, a new instance is created and returned.\n * @returns {Matrix3|undefined} The rotation matrix, or undefined if the data necessary to do the\n * transformation is not yet loaded.\n *\n *\n * @example\n * scene.postUpdate.addEventListener(function(scene, time) {\n * // View in ICRF.\n * const icrfToFixed = Cesium.Transforms.computeIcrfToFixedMatrix(time);\n * if (Cesium.defined(icrfToFixed)) {\n * const offset = Cesium.Cartesian3.clone(camera.position);\n * const transform = Cesium.Matrix4.fromRotationTranslation(icrfToFixed);\n * camera.lookAtTransform(transform, offset);\n * }\n * });\n *\n * @see Transforms.preloadIcrfFixed\n */\nTransforms.computeIcrfToFixedMatrix = function (date, result) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(date)) {\n throw new DeveloperError(\"date is required.\");\n }\n //>>includeEnd('debug');\n if (!defined(result)) {\n result = new Matrix3();\n }\n\n const fixedToIcrfMtx = Transforms.computeFixedToIcrfMatrix(date, result);\n if (!defined(fixedToIcrfMtx)) {\n return undefined;\n }\n\n return Matrix3.transpose(fixedToIcrfMtx, result);\n};\n\nconst TdtMinusTai = 32.184;\nconst J2000d = 2451545;\nconst scratchHpr = new HeadingPitchRoll();\nconst scratchRotationMatrix = new Matrix3();\nconst dateScratch = new JulianDate();\n\n/**\n * Computes a rotation matrix to transform a point or vector from the Moon-Fixed frame axes\n * to the International Celestial Reference Frame (GCRF/ICRF) inertial frame axes\n * at a given time.\n *\n * @param {JulianDate} date The time at which to compute the rotation matrix.\n * @param {Matrix3} [result] The object onto which to store the result. If this parameter is\n * not specified, a new instance is created and returned.\n * @returns {Matrix3} The rotation matrix.\n *\n * @example\n * // Transform a point from the Fixed axes to the ICRF axes.\n * const now = Cesium.JulianDate.now();\n * const pointInFixed = Cesium.Cartesian3.fromDegrees(0.0, 0.0);\n * const fixedToIcrf = Cesium.Transforms.computeMoonFixedToIcrfMatrix(now);\n * let pointInInertial = new Cesium.Cartesian3();\n * if (Cesium.defined(fixedToIcrf)) {\n * pointInInertial = Cesium.Matrix3.multiplyByVector(fixedToIcrf, pointInFixed, pointInInertial);\n * }\n */\nTransforms.computeMoonFixedToIcrfMatrix = function (date, result) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(date)) {\n throw new DeveloperError(\"date is required.\");\n }\n //>>includeEnd('debug');\n\n if (!defined(result)) {\n result = new Matrix3();\n }\n\n // Converts TAI to TT\n const secondsTT = JulianDate.addSeconds(date, TdtMinusTai, dateScratch);\n\n // Converts TT to TDB, interval in days since the standard epoch\n const d = JulianDate.totalDays(secondsTT) - J2000d;\n\n // Compute the approximate rotation, using https://articles.adsabs.harvard.edu//full/1980CeMec..22..205D/0000209.000.html\n const e1 = CesiumMath.toRadians(12.112) - CesiumMath.toRadians(0.052992) * d;\n const e2 = CesiumMath.toRadians(24.224) - CesiumMath.toRadians(0.105984) * d;\n const e3 = CesiumMath.toRadians(227.645) + CesiumMath.toRadians(13.012) * d;\n const e4 =\n CesiumMath.toRadians(261.105) + CesiumMath.toRadians(13.340716) * d;\n const e5 = CesiumMath.toRadians(358.0) + CesiumMath.toRadians(0.9856) * d;\n\n scratchHpr.pitch =\n CesiumMath.toRadians(270.0 - 90) -\n CesiumMath.toRadians(3.878) * Math.sin(e1) -\n CesiumMath.toRadians(0.12) * Math.sin(e2) +\n CesiumMath.toRadians(0.07) * Math.sin(e3) -\n CesiumMath.toRadians(0.017) * Math.sin(e4);\n scratchHpr.roll =\n CesiumMath.toRadians(66.53 - 90) +\n CesiumMath.toRadians(1.543) * Math.cos(e1) +\n CesiumMath.toRadians(0.24) * Math.cos(e2) -\n CesiumMath.toRadians(0.028) * Math.cos(e3) +\n CesiumMath.toRadians(0.007) * Math.cos(e4);\n scratchHpr.heading =\n CesiumMath.toRadians(244.375 - 90) +\n CesiumMath.toRadians(13.17635831) * d +\n CesiumMath.toRadians(3.558) * Math.sin(e1) +\n CesiumMath.toRadians(0.121) * Math.sin(e2) -\n CesiumMath.toRadians(0.064) * Math.sin(e3) +\n CesiumMath.toRadians(0.016) * Math.sin(e4) +\n CesiumMath.toRadians(0.025) * Math.sin(e5);\n return Matrix3.fromHeadingPitchRoll(scratchHpr, scratchRotationMatrix);\n};\n\n/**\n * Computes a rotation matrix to transform a point or vector from the International Celestial\n * Reference Frame (GCRF/ICRF) inertial frame axes to the Moon-Fixed frame axes\n * at a given time.\n *\n * @param {JulianDate} date The time at which to compute the rotation matrix.\n * @param {Matrix3} [result] The object onto which to store the result. If this parameter is\n * not specified, a new instance is created and returned.\n * @returns {Matrix3} The rotation matrix.\n *\n * @example\n * // Set the default ICRF to fixed transformation to that of the Moon.\n * Cesium.Transforms.computeIcrfToCentralBodyFixedMatrix = Cesium.Transforms.computeIcrfToMoonFixedMatrix;\n */\nTransforms.computeIcrfToMoonFixedMatrix = function (date, result) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(date)) {\n throw new DeveloperError(\"date is required.\");\n }\n //>>includeEnd('debug');\n if (!defined(result)) {\n result = new Matrix3();\n }\n\n const fixedToIcrfMtx = Transforms.computeMoonFixedToIcrfMatrix(date, result);\n if (!defined(fixedToIcrfMtx)) {\n return undefined;\n }\n\n return Matrix3.transpose(fixedToIcrfMtx, result);\n};\n\nconst xysScratch = new Iau2006XysSample(0.0, 0.0, 0.0);\nconst eopScratch = new EarthOrientationParametersSample(\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n);\nconst rotation1Scratch = new Matrix3();\nconst rotation2Scratch = new Matrix3();\n\n/**\n * Computes a rotation matrix to transform a point or vector from the Earth-Fixed frame axes (ITRF)\n * to the International Celestial Reference Frame (GCRF/ICRF) inertial frame axes\n * at a given time. This function may return undefined if the data necessary to\n * do the transformation is not yet loaded.\n *\n * @param {JulianDate} date The time at which to compute the rotation matrix.\n * @param {Matrix3} [result] The object onto which to store the result. If this parameter is\n * not specified, a new instance is created and returned.\n * @returns {Matrix3|undefined} The rotation matrix, or undefined if the data necessary to do the\n * transformation is not yet loaded.\n *\n *\n * @example\n * // Transform a point from the Fixed axes to the ICRF axes.\n * const now = Cesium.JulianDate.now();\n * const pointInFixed = Cesium.Cartesian3.fromDegrees(0.0, 0.0);\n * const fixedToIcrf = Cesium.Transforms.computeFixedToIcrfMatrix(now);\n * let pointInInertial = new Cesium.Cartesian3();\n * if (Cesium.defined(fixedToIcrf)) {\n * pointInInertial = Cesium.Matrix3.multiplyByVector(fixedToIcrf, pointInFixed, pointInInertial);\n * }\n *\n * @see Transforms.preloadIcrfFixed\n */\nTransforms.computeFixedToIcrfMatrix = function (date, result) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(date)) {\n throw new DeveloperError(\"date is required.\");\n }\n //>>includeEnd('debug');\n\n if (!defined(result)) {\n result = new Matrix3();\n }\n\n // Compute pole wander\n const eop = Transforms.earthOrientationParameters.compute(date, eopScratch);\n if (!defined(eop)) {\n return undefined;\n }\n\n // There is no external conversion to Terrestrial Time (TT).\n // So use International Atomic Time (TAI) and convert using offsets.\n // Here we are assuming that dayTT and secondTT are positive\n const dayTT = date.dayNumber;\n // It's possible here that secondTT could roll over 86400\n // This does not seem to affect the precision (unit tests check for this)\n const secondTT = date.secondsOfDay + ttMinusTai;\n\n const xys = Transforms.iau2006XysData.computeXysRadians(\n dayTT,\n secondTT,\n xysScratch,\n );\n if (!defined(xys)) {\n return undefined;\n }\n\n const x = xys.x + eop.xPoleOffset;\n const y = xys.y + eop.yPoleOffset;\n\n // Compute XYS rotation\n const a = 1.0 / (1.0 + Math.sqrt(1.0 - x * x - y * y));\n\n const rotation1 = rotation1Scratch;\n rotation1[0] = 1.0 - a * x * x;\n rotation1[3] = -a * x * y;\n rotation1[6] = x;\n rotation1[1] = -a * x * y;\n rotation1[4] = 1 - a * y * y;\n rotation1[7] = y;\n rotation1[2] = -x;\n rotation1[5] = -y;\n rotation1[8] = 1 - a * (x * x + y * y);\n\n const rotation2 = Matrix3.fromRotationZ(-xys.s, rotation2Scratch);\n const matrixQ = Matrix3.multiply(rotation1, rotation2, rotation1Scratch);\n\n // Similar to TT conversions above\n // It's possible here that secondTT could roll over 86400\n // This does not seem to affect the precision (unit tests check for this)\n const dateUt1day = date.dayNumber;\n const dateUt1sec =\n date.secondsOfDay - JulianDate.computeTaiMinusUtc(date) + eop.ut1MinusUtc;\n\n // Compute Earth rotation angle\n // The IERS standard for era is\n // era = 0.7790572732640 + 1.00273781191135448 * Tu\n // where\n // Tu = JulianDateInUt1 - 2451545.0\n // However, you get much more precision if you make the following simplification\n // era = a + (1 + b) * (JulianDayNumber + FractionOfDay - 2451545)\n // era = a + (JulianDayNumber - 2451545) + FractionOfDay + b (JulianDayNumber - 2451545 + FractionOfDay)\n // era = a + FractionOfDay + b (JulianDayNumber - 2451545 + FractionOfDay)\n // since (JulianDayNumber - 2451545) represents an integer number of revolutions which will be discarded anyway.\n const daysSinceJ2000 = dateUt1day - 2451545;\n const fractionOfDay = dateUt1sec / TimeConstants.SECONDS_PER_DAY;\n let era =\n 0.779057273264 +\n fractionOfDay +\n 0.00273781191135448 * (daysSinceJ2000 + fractionOfDay);\n era = (era % 1.0) * CesiumMath.TWO_PI;\n\n const earthRotation = Matrix3.fromRotationZ(era, rotation2Scratch);\n\n // pseudoFixed to ICRF\n const pfToIcrf = Matrix3.multiply(matrixQ, earthRotation, rotation1Scratch);\n\n // Compute pole wander matrix\n const cosxp = Math.cos(eop.xPoleWander);\n const cosyp = Math.cos(eop.yPoleWander);\n const sinxp = Math.sin(eop.xPoleWander);\n const sinyp = Math.sin(eop.yPoleWander);\n\n let ttt = dayTT - j2000ttDays + secondTT / TimeConstants.SECONDS_PER_DAY;\n ttt /= 36525.0;\n\n // approximate sp value in rad\n const sp = (-47.0e-6 * ttt * CesiumMath.RADIANS_PER_DEGREE) / 3600.0;\n const cossp = Math.cos(sp);\n const sinsp = Math.sin(sp);\n\n const fToPfMtx = rotation2Scratch;\n fToPfMtx[0] = cosxp * cossp;\n fToPfMtx[1] = cosxp * sinsp;\n fToPfMtx[2] = sinxp;\n fToPfMtx[3] = -cosyp * sinsp + sinyp * sinxp * cossp;\n fToPfMtx[4] = cosyp * cossp + sinyp * sinxp * sinsp;\n fToPfMtx[5] = -sinyp * cosxp;\n fToPfMtx[6] = -sinyp * sinsp - cosyp * sinxp * cossp;\n fToPfMtx[7] = sinyp * cossp - cosyp * sinxp * sinsp;\n fToPfMtx[8] = cosyp * cosxp;\n\n return Matrix3.multiply(pfToIcrf, fToPfMtx, result);\n};\n\nconst pointToWindowCoordinatesTemp = new Cartesian4();\n\n/**\n * Transform a point from model coordinates to window coordinates.\n *\n * @param {Matrix4} modelViewProjectionMatrix The 4x4 model-view-projection matrix.\n * @param {Matrix4} viewportTransformation The 4x4 viewport transformation.\n * @param {Cartesian3} point The point to transform.\n * @param {Cartesian2} [result] The object onto which to store the result.\n * @returns {Cartesian2} The modified result parameter or a new Cartesian2 instance if none was provided.\n */\nTransforms.pointToWindowCoordinates = function (\n modelViewProjectionMatrix,\n viewportTransformation,\n point,\n result,\n) {\n result = Transforms.pointToGLWindowCoordinates(\n modelViewProjectionMatrix,\n viewportTransformation,\n point,\n result,\n );\n result.y = 2.0 * viewportTransformation[5] - result.y;\n return result;\n};\n\n/**\n * @private\n */\nTransforms.pointToGLWindowCoordinates = function (\n modelViewProjectionMatrix,\n viewportTransformation,\n point,\n result,\n) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(modelViewProjectionMatrix)) {\n throw new DeveloperError(\"modelViewProjectionMatrix is required.\");\n }\n\n if (!defined(viewportTransformation)) {\n throw new DeveloperError(\"viewportTransformation is required.\");\n }\n\n if (!defined(point)) {\n throw new DeveloperError(\"point is required.\");\n }\n //>>includeEnd('debug');\n\n if (!defined(result)) {\n result = new Cartesian2();\n }\n\n const tmp = pointToWindowCoordinatesTemp;\n\n Matrix4.multiplyByVector(\n modelViewProjectionMatrix,\n Cartesian4.fromElements(point.x, point.y, point.z, 1, tmp),\n tmp,\n );\n Cartesian4.multiplyByScalar(tmp, 1.0 / tmp.w, tmp);\n Matrix4.multiplyByVector(viewportTransformation, tmp, tmp);\n return Cartesian2.fromCartesian4(tmp, result);\n};\n\nconst normalScratch = new Cartesian3();\nconst rightScratch = new Cartesian3();\nconst upScratch = new Cartesian3();\n\n/**\n * Transform a position and velocity to a rotation matrix.\n *\n * @param {Cartesian3} position The position to transform.\n * @param {Cartesian3} velocity The velocity vector to transform.\n * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid whose fixed frame is used in the transformation.\n * @param {Matrix3} [result] The object onto which to store the result.\n * @returns {Matrix3} The modified result parameter or a new Matrix3 instance if none was provided.\n */\nTransforms.rotationMatrixFromPositionVelocity = function (\n position,\n velocity,\n ellipsoid,\n result,\n) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(position)) {\n throw new DeveloperError(\"position is required.\");\n }\n\n if (!defined(velocity)) {\n throw new DeveloperError(\"velocity is required.\");\n }\n //>>includeEnd('debug');\n\n const normal = defaultValue(\n ellipsoid,\n Ellipsoid.default,\n ).geodeticSurfaceNormal(position, normalScratch);\n let right = Cartesian3.cross(velocity, normal, rightScratch);\n\n if (Cartesian3.equalsEpsilon(right, Cartesian3.ZERO, CesiumMath.EPSILON6)) {\n right = Cartesian3.clone(Cartesian3.UNIT_X, right);\n }\n\n const up = Cartesian3.cross(right, velocity, upScratch);\n Cartesian3.normalize(up, up);\n Cartesian3.cross(velocity, up, right);\n Cartesian3.negate(right, right);\n Cartesian3.normalize(right, right);\n\n if (!defined(result)) {\n result = new Matrix3();\n }\n\n result[0] = velocity.x;\n result[1] = velocity.y;\n result[2] = velocity.z;\n result[3] = right.x;\n result[4] = right.y;\n result[5] = right.z;\n result[6] = up.x;\n result[7] = up.y;\n result[8] = up.z;\n\n return result;\n};\n\nconst swizzleMatrix = new Matrix4(\n 0.0,\n 0.0,\n 1.0,\n 0.0,\n 1.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 1.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 0.0,\n 1.0,\n);\n\nconst scratchCartographic = new Cartographic();\nconst scratchCartesian3Projection = new Cartesian3();\nconst scratchCenter = new Cartesian3();\nconst scratchRotation = new Matrix3();\nconst scratchFromENU = new Matrix4();\nconst scratchToENU = new Matrix4();\n\n/**\n * @private\n */\nTransforms.basisTo2D = function (projection, matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(projection)) {\n throw new DeveloperError(\"projection is required.\");\n }\n if (!defined(matrix)) {\n throw new DeveloperError(\"matrix is required.\");\n }\n if (!defined(result)) {\n throw new DeveloperError(\"result is required.\");\n }\n //>>includeEnd('debug');\n\n const rtcCenter = Matrix4.getTranslation(matrix, scratchCenter);\n const ellipsoid = projection.ellipsoid;\n\n let projectedPosition;\n if (Cartesian3.equals(rtcCenter, Cartesian3.ZERO)) {\n projectedPosition = Cartesian3.clone(\n Cartesian3.ZERO,\n scratchCartesian3Projection,\n );\n } else {\n // Get the 2D Center\n const cartographic = ellipsoid.cartesianToCartographic(\n rtcCenter,\n scratchCartographic,\n );\n\n projectedPosition = projection.project(\n cartographic,\n scratchCartesian3Projection,\n );\n Cartesian3.fromElements(\n projectedPosition.z,\n projectedPosition.x,\n projectedPosition.y,\n projectedPosition,\n );\n }\n\n // Assuming the instance are positioned on the ellipsoid, invert the ellipsoidal transform to get the local transform and then convert to 2D\n const fromENU = Transforms.eastNorthUpToFixedFrame(\n rtcCenter,\n ellipsoid,\n scratchFromENU,\n );\n const toENU = Matrix4.inverseTransformation(fromENU, scratchToENU);\n const rotation = Matrix4.getMatrix3(matrix, scratchRotation);\n const local = Matrix4.multiplyByMatrix3(toENU, rotation, result);\n Matrix4.multiply(swizzleMatrix, local, result); // Swap x, y, z for 2D\n Matrix4.setTranslation(result, projectedPosition, result); // Use the projected center\n\n return result;\n};\n\n/**\n * @private\n */\nTransforms.ellipsoidTo2DModelMatrix = function (projection, center, result) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(projection)) {\n throw new DeveloperError(\"projection is required.\");\n }\n if (!defined(center)) {\n throw new DeveloperError(\"center is required.\");\n }\n if (!defined(result)) {\n throw new DeveloperError(\"result is required.\");\n }\n //>>includeEnd('debug');\n\n const ellipsoid = projection.ellipsoid;\n\n const fromENU = Transforms.eastNorthUpToFixedFrame(\n center,\n ellipsoid,\n scratchFromENU,\n );\n const toENU = Matrix4.inverseTransformation(fromENU, scratchToENU);\n\n const cartographic = ellipsoid.cartesianToCartographic(\n center,\n scratchCartographic,\n );\n const projectedPosition = projection.project(\n cartographic,\n scratchCartesian3Projection,\n );\n Cartesian3.fromElements(\n projectedPosition.z,\n projectedPosition.x,\n projectedPosition.y,\n projectedPosition,\n );\n\n const translation = Matrix4.fromTranslation(\n projectedPosition,\n scratchFromENU,\n );\n Matrix4.multiply(swizzleMatrix, toENU, result);\n Matrix4.multiply(translation, result, result);\n\n return result;\n};\nexport default Transforms;\n","import binarySearch from \"./binarySearch.js\";\nimport Check from \"./Check.js\";\nimport defaultValue from \"./defaultValue.js\";\nimport defined from \"./defined.js\";\nimport EarthOrientationParametersSample from \"./EarthOrientationParametersSample.js\";\nimport JulianDate from \"./JulianDate.js\";\nimport LeapSecond from \"./LeapSecond.js\";\nimport Resource from \"./Resource.js\";\nimport RuntimeError from \"./RuntimeError.js\";\nimport TimeConstants from \"./TimeConstants.js\";\nimport TimeStandard from \"./TimeStandard.js\";\n\n/**\n * Specifies Earth polar motion coordinates and the difference between UT1 and UTC.\n * These Earth Orientation Parameters (EOP) are primarily used in the transformation from\n * the International Celestial Reference Frame (ICRF) to the International Terrestrial\n * Reference Frame (ITRF).\n * This object is normally not instantiated directly, use {@link EarthOrientationParameters.fromUrl}.\n *\n * @alias EarthOrientationParameters\n * @constructor\n *\n * @param {object} [options] Object with the following properties:\n * @param {object} [options.data] The actual EOP data. If neither this\n * parameter nor options.data is specified, all EOP values are assumed\n * to be 0.0.\n * @param {boolean} [options.addNewLeapSeconds=true] True if leap seconds that\n * are specified in the EOP data but not in {@link JulianDate.leapSeconds}\n * should be added to {@link JulianDate.leapSeconds}. False if\n * new leap seconds should be handled correctly in the context\n * of the EOP data but otherwise ignored.\n *\n * @private\n */\nfunction EarthOrientationParameters(options) {\n options = defaultValue(options, defaultValue.EMPTY_OBJECT);\n\n this._dates = undefined;\n this._samples = undefined;\n\n this._dateColumn = -1;\n this._xPoleWanderRadiansColumn = -1;\n this._yPoleWanderRadiansColumn = -1;\n this._ut1MinusUtcSecondsColumn = -1;\n this._xCelestialPoleOffsetRadiansColumn = -1;\n this._yCelestialPoleOffsetRadiansColumn = -1;\n this._taiMinusUtcSecondsColumn = -1;\n\n this._columnCount = 0;\n this._lastIndex = -1;\n\n this._addNewLeapSeconds = defaultValue(options.addNewLeapSeconds, true);\n\n if (defined(options.data)) {\n // Use supplied EOP data.\n onDataReady(this, options.data);\n } else {\n // Use all zeros for EOP data.\n onDataReady(this, {\n columnNames: [\n \"dateIso8601\",\n \"modifiedJulianDateUtc\",\n \"xPoleWanderRadians\",\n \"yPoleWanderRadians\",\n \"ut1MinusUtcSeconds\",\n \"lengthOfDayCorrectionSeconds\",\n \"xCelestialPoleOffsetRadians\",\n \"yCelestialPoleOffsetRadians\",\n \"taiMinusUtcSeconds\",\n ],\n samples: [],\n });\n }\n}\n\n/**\n *\n * @param {Resource|string} [url] The URL from which to obtain EOP data. If neither this\n * parameter nor options.data is specified, all EOP values are assumed\n * to be 0.0. If options.data is specified, this parameter is\n * ignored.\n * @param {object} [options] Object with the following properties:\n * @param {boolean} [options.addNewLeapSeconds=true] True if leap seconds that\n * are specified in the EOP data but not in {@link JulianDate.leapSeconds}\n * should be added to {@link JulianDate.leapSeconds}. False if\n * new leap seconds should be handled correctly in the context\n * of the EOP data but otherwise ignored.\n *\n * @example\n * // An example EOP data file, EOP.json:\n * {\n * \"columnNames\" : [\"dateIso8601\",\"modifiedJulianDateUtc\",\"xPoleWanderRadians\",\"yPoleWanderRadians\",\"ut1MinusUtcSeconds\",\"lengthOfDayCorrectionSeconds\",\"xCelestialPoleOffsetRadians\",\"yCelestialPoleOffsetRadians\",\"taiMinusUtcSeconds\"],\n * \"samples\" : [\n * \"2011-07-01T00:00:00Z\",55743.0,2.117957047295119e-7,2.111518721609984e-6,-0.2908948,-2.956e-4,3.393695767766752e-11,3.3452143996557983e-10,34.0,\n * \"2011-07-02T00:00:00Z\",55744.0,2.193297093339541e-7,2.115460256837405e-6,-0.29065,-1.824e-4,-8.241832578862112e-11,5.623838700870617e-10,34.0,\n * \"2011-07-03T00:00:00Z\",55745.0,2.262286080161428e-7,2.1191157519929706e-6,-0.2905572,1.9e-6,-3.490658503988659e-10,6.981317007977318e-10,34.0\n * ]\n * }\n *\n * @example\n * // Loading the EOP data\n * const eop = await Cesium.EarthOrientationParameters.fromUrl('Data/EOP.json');\n * Cesium.Transforms.earthOrientationParameters = eop;\n */\nEarthOrientationParameters.fromUrl = async function (url, options) {\n //>>includeStart('debug', pragmas.debug);\n Check.defined(\"url\", url);\n //>>includeEnd('debug');\n\n options = defaultValue(options, defaultValue.EMPTY_OBJECT);\n\n const resource = Resource.createIfNeeded(url);\n\n // Download EOP data.\n let eopData;\n try {\n eopData = await resource.fetchJson();\n } catch (e) {\n throw new RuntimeError(\n `An error occurred while retrieving the EOP data from the URL ${resource.url}.`,\n );\n }\n\n return new EarthOrientationParameters({\n addNewLeapSeconds: options.addNewLeapSeconds,\n data: eopData,\n });\n};\n\n/**\n * A default {@link EarthOrientationParameters} instance that returns zero for all EOP values.\n */\nEarthOrientationParameters.NONE = Object.freeze({\n compute: function (date, result) {\n if (!defined(result)) {\n result = new EarthOrientationParametersSample(0.0, 0.0, 0.0, 0.0, 0.0);\n } else {\n result.xPoleWander = 0.0;\n result.yPoleWander = 0.0;\n result.xPoleOffset = 0.0;\n result.yPoleOffset = 0.0;\n result.ut1MinusUtc = 0.0;\n }\n return result;\n },\n});\n\n/**\n * Computes the Earth Orientation Parameters (EOP) for a given date by interpolating.\n * If the EOP data has not yet been download, this method returns undefined.\n *\n * @param {JulianDate} date The date for each to evaluate the EOP.\n * @param {EarthOrientationParametersSample} [result] The instance to which to copy the result.\n * If this parameter is undefined, a new instance is created and returned.\n * @returns {EarthOrientationParametersSample} The EOP evaluated at the given date, or\n * undefined if the data necessary to evaluate EOP at the date has not yet been\n * downloaded.\n *\n * @exception {RuntimeError} The loaded EOP data has an error and cannot be used.\n *\n * @see EarthOrientationParameters#fromUrl\n */\nEarthOrientationParameters.prototype.compute = function (date, result) {\n // We cannot compute until the samples are available.\n if (!defined(this._samples)) {\n return undefined;\n }\n\n if (!defined(result)) {\n result = new EarthOrientationParametersSample(0.0, 0.0, 0.0, 0.0, 0.0);\n }\n\n if (this._samples.length === 0) {\n result.xPoleWander = 0.0;\n result.yPoleWander = 0.0;\n result.xPoleOffset = 0.0;\n result.yPoleOffset = 0.0;\n result.ut1MinusUtc = 0.0;\n return result;\n }\n\n const dates = this._dates;\n const lastIndex = this._lastIndex;\n\n let before = 0;\n let after = 0;\n if (defined(lastIndex)) {\n const previousIndexDate = dates[lastIndex];\n const nextIndexDate = dates[lastIndex + 1];\n const isAfterPrevious = JulianDate.lessThanOrEquals(\n previousIndexDate,\n date,\n );\n const isAfterLastSample = !defined(nextIndexDate);\n const isBeforeNext =\n isAfterLastSample || JulianDate.greaterThanOrEquals(nextIndexDate, date);\n\n if (isAfterPrevious && isBeforeNext) {\n before = lastIndex;\n\n if (!isAfterLastSample && nextIndexDate.equals(date)) {\n ++before;\n }\n after = before + 1;\n\n interpolate(this, dates, this._samples, date, before, after, result);\n return result;\n }\n }\n\n let index = binarySearch(dates, date, JulianDate.compare, this._dateColumn);\n if (index >= 0) {\n // If the next entry is the same date, use the later entry. This way, if two entries\n // describe the same moment, one before a leap second and the other after, then we will use\n // the post-leap second data.\n if (index < dates.length - 1 && dates[index + 1].equals(date)) {\n ++index;\n }\n before = index;\n after = index;\n } else {\n after = ~index;\n before = after - 1;\n\n // Use the first entry if the date requested is before the beginning of the data.\n if (before < 0) {\n before = 0;\n }\n }\n\n this._lastIndex = before;\n\n interpolate(this, dates, this._samples, date, before, after, result);\n return result;\n};\n\nfunction compareLeapSecondDates(leapSecond, dateToFind) {\n return JulianDate.compare(leapSecond.julianDate, dateToFind);\n}\n\nfunction onDataReady(eop, eopData) {\n if (!defined(eopData.columnNames)) {\n throw new RuntimeError(\n \"Error in loaded EOP data: The columnNames property is required.\",\n );\n }\n\n if (!defined(eopData.samples)) {\n throw new RuntimeError(\n \"Error in loaded EOP data: The samples property is required.\",\n );\n }\n\n const dateColumn = eopData.columnNames.indexOf(\"modifiedJulianDateUtc\");\n const xPoleWanderRadiansColumn =\n eopData.columnNames.indexOf(\"xPoleWanderRadians\");\n const yPoleWanderRadiansColumn =\n eopData.columnNames.indexOf(\"yPoleWanderRadians\");\n const ut1MinusUtcSecondsColumn =\n eopData.columnNames.indexOf(\"ut1MinusUtcSeconds\");\n const xCelestialPoleOffsetRadiansColumn = eopData.columnNames.indexOf(\n \"xCelestialPoleOffsetRadians\",\n );\n const yCelestialPoleOffsetRadiansColumn = eopData.columnNames.indexOf(\n \"yCelestialPoleOffsetRadians\",\n );\n const taiMinusUtcSecondsColumn =\n eopData.columnNames.indexOf(\"taiMinusUtcSeconds\");\n\n if (\n dateColumn < 0 ||\n xPoleWanderRadiansColumn < 0 ||\n yPoleWanderRadiansColumn < 0 ||\n ut1MinusUtcSecondsColumn < 0 ||\n xCelestialPoleOffsetRadiansColumn < 0 ||\n yCelestialPoleOffsetRadiansColumn < 0 ||\n taiMinusUtcSecondsColumn < 0\n ) {\n throw new RuntimeError(\n \"Error in loaded EOP data: The columnNames property must include modifiedJulianDateUtc, xPoleWanderRadians, yPoleWanderRadians, ut1MinusUtcSeconds, xCelestialPoleOffsetRadians, yCelestialPoleOffsetRadians, and taiMinusUtcSeconds columns\",\n );\n }\n\n const samples = (eop._samples = eopData.samples);\n const dates = (eop._dates = []);\n\n eop._dateColumn = dateColumn;\n eop._xPoleWanderRadiansColumn = xPoleWanderRadiansColumn;\n eop._yPoleWanderRadiansColumn = yPoleWanderRadiansColumn;\n eop._ut1MinusUtcSecondsColumn = ut1MinusUtcSecondsColumn;\n eop._xCelestialPoleOffsetRadiansColumn = xCelestialPoleOffsetRadiansColumn;\n eop._yCelestialPoleOffsetRadiansColumn = yCelestialPoleOffsetRadiansColumn;\n eop._taiMinusUtcSecondsColumn = taiMinusUtcSecondsColumn;\n\n eop._columnCount = eopData.columnNames.length;\n eop._lastIndex = undefined;\n\n let lastTaiMinusUtc;\n\n const addNewLeapSeconds = eop._addNewLeapSeconds;\n\n // Convert the ISO8601 dates to JulianDates.\n for (let i = 0, len = samples.length; i < len; i += eop._columnCount) {\n const mjd = samples[i + dateColumn];\n const taiMinusUtc = samples[i + taiMinusUtcSecondsColumn];\n const day = mjd + TimeConstants.MODIFIED_JULIAN_DATE_DIFFERENCE;\n const date = new JulianDate(day, taiMinusUtc, TimeStandard.TAI);\n dates.push(date);\n\n if (addNewLeapSeconds) {\n if (taiMinusUtc !== lastTaiMinusUtc && defined(lastTaiMinusUtc)) {\n // We crossed a leap second boundary, so add the leap second\n // if it does not already exist.\n const leapSeconds = JulianDate.leapSeconds;\n const leapSecondIndex = binarySearch(\n leapSeconds,\n date,\n compareLeapSecondDates,\n );\n if (leapSecondIndex < 0) {\n const leapSecond = new LeapSecond(date, taiMinusUtc);\n leapSeconds.splice(~leapSecondIndex, 0, leapSecond);\n }\n }\n lastTaiMinusUtc = taiMinusUtc;\n }\n }\n}\n\nfunction fillResultFromIndex(eop, samples, index, columnCount, result) {\n const start = index * columnCount;\n result.xPoleWander = samples[start + eop._xPoleWanderRadiansColumn];\n result.yPoleWander = samples[start + eop._yPoleWanderRadiansColumn];\n result.xPoleOffset = samples[start + eop._xCelestialPoleOffsetRadiansColumn];\n result.yPoleOffset = samples[start + eop._yCelestialPoleOffsetRadiansColumn];\n result.ut1MinusUtc = samples[start + eop._ut1MinusUtcSecondsColumn];\n}\n\nfunction linearInterp(dx, y1, y2) {\n return y1 + dx * (y2 - y1);\n}\n\nfunction interpolate(eop, dates, samples, date, before, after, result) {\n const columnCount = eop._columnCount;\n\n // First check the bounds on the EOP data\n // If we are after the bounds of the data, return zeros.\n // The 'before' index should never be less than zero.\n if (after > dates.length - 1) {\n result.xPoleWander = 0;\n result.yPoleWander = 0;\n result.xPoleOffset = 0;\n result.yPoleOffset = 0;\n result.ut1MinusUtc = 0;\n return result;\n }\n\n const beforeDate = dates[before];\n const afterDate = dates[after];\n if (beforeDate.equals(afterDate) || date.equals(beforeDate)) {\n fillResultFromIndex(eop, samples, before, columnCount, result);\n return result;\n } else if (date.equals(afterDate)) {\n fillResultFromIndex(eop, samples, after, columnCount, result);\n return result;\n }\n\n const factor =\n JulianDate.secondsDifference(date, beforeDate) /\n JulianDate.secondsDifference(afterDate, beforeDate);\n\n const startBefore = before * columnCount;\n const startAfter = after * columnCount;\n\n // Handle UT1 leap second edge case\n let beforeUt1MinusUtc = samples[startBefore + eop._ut1MinusUtcSecondsColumn];\n let afterUt1MinusUtc = samples[startAfter + eop._ut1MinusUtcSecondsColumn];\n\n const offsetDifference = afterUt1MinusUtc - beforeUt1MinusUtc;\n if (offsetDifference > 0.5 || offsetDifference < -0.5) {\n // The absolute difference between the values is more than 0.5, so we may have\n // crossed a leap second. Check if this is the case and, if so, adjust the\n // afterValue to account for the leap second. This way, our interpolation will\n // produce reasonable results.\n const beforeTaiMinusUtc =\n samples[startBefore + eop._taiMinusUtcSecondsColumn];\n const afterTaiMinusUtc =\n samples[startAfter + eop._taiMinusUtcSecondsColumn];\n if (beforeTaiMinusUtc !== afterTaiMinusUtc) {\n if (afterDate.equals(date)) {\n // If we are at the end of the leap second interval, take the second value\n // Otherwise, the interpolation below will yield the wrong side of the\n // discontinuity\n // At the end of the leap second, we need to start accounting for the jump\n beforeUt1MinusUtc = afterUt1MinusUtc;\n } else {\n // Otherwise, remove the leap second so that the interpolation is correct\n afterUt1MinusUtc -= afterTaiMinusUtc - beforeTaiMinusUtc;\n }\n }\n }\n\n result.xPoleWander = linearInterp(\n factor,\n samples[startBefore + eop._xPoleWanderRadiansColumn],\n samples[startAfter + eop._xPoleWanderRadiansColumn],\n );\n result.yPoleWander = linearInterp(\n factor,\n samples[startBefore + eop._yPoleWanderRadiansColumn],\n samples[startAfter + eop._yPoleWanderRadiansColumn],\n );\n result.xPoleOffset = linearInterp(\n factor,\n samples[startBefore + eop._xCelestialPoleOffsetRadiansColumn],\n samples[startAfter + eop._xCelestialPoleOffsetRadiansColumn],\n );\n result.yPoleOffset = linearInterp(\n factor,\n samples[startBefore + eop._yCelestialPoleOffsetRadiansColumn],\n samples[startAfter + eop._yCelestialPoleOffsetRadiansColumn],\n );\n result.ut1MinusUtc = linearInterp(\n factor,\n beforeUt1MinusUtc,\n afterUt1MinusUtc,\n );\n return result;\n}\n\nexport default EarthOrientationParameters;\n","import Check from \"./Check.js\";\n\n/**\n * Finds an item in a sorted array.\n *\n * @function\n * @param {Array} array The sorted array to search.\n * @param {*} itemToFind The item to find in the array.\n * @param {binarySearchComparator} comparator The function to use to compare the item to\n * elements in the array.\n * @returns {number} The index of itemToFind in the array, if it exists. If itemToFind\n * does not exist, the return value is a negative number which is the bitwise complement (~)\n * of the index before which the itemToFind should be inserted in order to maintain the\n * sorted order of the array.\n *\n * @example\n * // Create a comparator function to search through an array of numbers.\n * function comparator(a, b) {\n * return a - b;\n * };\n * const numbers = [0, 2, 4, 6, 8];\n * const index = Cesium.binarySearch(numbers, 6, comparator); // 3\n */\nfunction binarySearch(array, itemToFind, comparator) {\n //>>includeStart('debug', pragmas.debug);\n Check.defined(\"array\", array);\n Check.defined(\"itemToFind\", itemToFind);\n Check.defined(\"comparator\", comparator);\n //>>includeEnd('debug');\n\n let low = 0;\n let high = array.length - 1;\n let i;\n let comparison;\n\n while (low <= high) {\n i = ~~((low + high) / 2);\n comparison = comparator(array[i], itemToFind);\n if (comparison < 0) {\n low = i + 1;\n continue;\n }\n if (comparison > 0) {\n high = i - 1;\n continue;\n }\n return i;\n }\n return ~(high + 1);\n}\n\n/**\n * A function used to compare two items while performing a binary search.\n * @callback binarySearchComparator\n *\n * @param {*} a An item in the array.\n * @param {*} b The item being searched for.\n * @returns {number} Returns a negative value if a is less than b,\n * a positive value if a is greater than b, or\n * 0 if a is equal to b.\n *\n * @example\n * function compareNumbers(a, b) {\n * return a - b;\n * }\n */\nexport default binarySearch;\n","/**\n * A set of Earth Orientation Parameters (EOP) sampled at a time.\n *\n * @alias EarthOrientationParametersSample\n * @constructor\n *\n * @param {number} xPoleWander The pole wander about the X axis, in radians.\n * @param {number} yPoleWander The pole wander about the Y axis, in radians.\n * @param {number} xPoleOffset The offset to the Celestial Intermediate Pole (CIP) about the X axis, in radians.\n * @param {number} yPoleOffset The offset to the Celestial Intermediate Pole (CIP) about the Y axis, in radians.\n * @param {number} ut1MinusUtc The difference in time standards, UT1 - UTC, in seconds.\n *\n * @private\n */\nfunction EarthOrientationParametersSample(\n xPoleWander,\n yPoleWander,\n xPoleOffset,\n yPoleOffset,\n ut1MinusUtc,\n) {\n /**\n * The pole wander about the X axis, in radians.\n * @type {number}\n */\n this.xPoleWander = xPoleWander;\n\n /**\n * The pole wander about the Y axis, in radians.\n * @type {number}\n */\n this.yPoleWander = yPoleWander;\n\n /**\n * The offset to the Celestial Intermediate Pole (CIP) about the X axis, in radians.\n * @type {number}\n */\n this.xPoleOffset = xPoleOffset;\n\n /**\n * The offset to the Celestial Intermediate Pole (CIP) about the Y axis, in radians.\n * @type {number}\n */\n this.yPoleOffset = yPoleOffset;\n\n /**\n * The difference in time standards, UT1 - UTC, in seconds.\n * @type {number}\n */\n this.ut1MinusUtc = ut1MinusUtc;\n}\nexport default EarthOrientationParametersSample;\n","import binarySearch from \"./binarySearch.js\";\nimport defaultValue from \"./defaultValue.js\";\nimport defined from \"./defined.js\";\nimport DeveloperError from \"./DeveloperError.js\";\nimport GregorianDate from \"./GregorianDate.js\";\nimport isLeapYear from \"./isLeapYear.js\";\nimport LeapSecond from \"./LeapSecond.js\";\nimport TimeConstants from \"./TimeConstants.js\";\nimport TimeStandard from \"./TimeStandard.js\";\n\nconst gregorianDateScratch = new GregorianDate();\nconst daysInMonth = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\nconst daysInLeapFeburary = 29;\n\nfunction compareLeapSecondDates(leapSecond, dateToFind) {\n return JulianDate.compare(leapSecond.julianDate, dateToFind.julianDate);\n}\n\n// we don't really need a leap second instance, anything with a julianDate property will do\nconst binarySearchScratchLeapSecond = new LeapSecond();\n\nfunction convertUtcToTai(julianDate) {\n //Even though julianDate is in UTC, we'll treat it as TAI and\n //search the leap second table for it.\n binarySearchScratchLeapSecond.julianDate = julianDate;\n const leapSeconds = JulianDate.leapSeconds;\n let index = binarySearch(\n leapSeconds,\n binarySearchScratchLeapSecond,\n compareLeapSecondDates,\n );\n\n if (index < 0) {\n index = ~index;\n }\n\n if (index >= leapSeconds.length) {\n index = leapSeconds.length - 1;\n }\n\n let offset = leapSeconds[index].offset;\n if (index > 0) {\n //Now we have the index of the closest leap second that comes on or after our UTC time.\n //However, if the difference between the UTC date being converted and the TAI\n //defined leap second is greater than the offset, we are off by one and need to use\n //the previous leap second.\n const difference = JulianDate.secondsDifference(\n leapSeconds[index].julianDate,\n julianDate,\n );\n if (difference > offset) {\n index--;\n offset = leapSeconds[index].offset;\n }\n }\n\n JulianDate.addSeconds(julianDate, offset, julianDate);\n}\n\nfunction convertTaiToUtc(julianDate, result) {\n binarySearchScratchLeapSecond.julianDate = julianDate;\n const leapSeconds = JulianDate.leapSeconds;\n let index = binarySearch(\n leapSeconds,\n binarySearchScratchLeapSecond,\n compareLeapSecondDates,\n );\n if (index < 0) {\n index = ~index;\n }\n\n //All times before our first leap second get the first offset.\n if (index === 0) {\n return JulianDate.addSeconds(julianDate, -leapSeconds[0].offset, result);\n }\n\n //All times after our leap second get the last offset.\n if (index >= leapSeconds.length) {\n return JulianDate.addSeconds(\n julianDate,\n -leapSeconds[index - 1].offset,\n result,\n );\n }\n\n //Compute the difference between the found leap second and the time we are converting.\n const difference = JulianDate.secondsDifference(\n leapSeconds[index].julianDate,\n julianDate,\n );\n\n if (difference === 0) {\n //The date is in our leap second table.\n return JulianDate.addSeconds(\n julianDate,\n -leapSeconds[index].offset,\n result,\n );\n }\n\n if (difference <= 1.0) {\n //The requested date is during the moment of a leap second, then we cannot convert to UTC\n return undefined;\n }\n\n //The time is in between two leap seconds, index is the leap second after the date\n //we're converting, so we subtract one to get the correct LeapSecond instance.\n return JulianDate.addSeconds(\n julianDate,\n -leapSeconds[--index].offset,\n result,\n );\n}\n\nfunction setComponents(wholeDays, secondsOfDay, julianDate) {\n const extraDays = (secondsOfDay / TimeConstants.SECONDS_PER_DAY) | 0;\n wholeDays += extraDays;\n secondsOfDay -= TimeConstants.SECONDS_PER_DAY * extraDays;\n\n if (secondsOfDay < 0) {\n wholeDays--;\n secondsOfDay += TimeConstants.SECONDS_PER_DAY;\n }\n\n julianDate.dayNumber = wholeDays;\n julianDate.secondsOfDay = secondsOfDay;\n return julianDate;\n}\n\nfunction computeJulianDateComponents(\n year,\n month,\n day,\n hour,\n minute,\n second,\n millisecond,\n) {\n // Algorithm from page 604 of the Explanatory Supplement to the\n // Astronomical Almanac (Seidelmann 1992).\n\n const a = ((month - 14) / 12) | 0;\n const b = year + 4800 + a;\n let dayNumber =\n (((1461 * b) / 4) | 0) +\n (((367 * (month - 2 - 12 * a)) / 12) | 0) -\n (((3 * (((b + 100) / 100) | 0)) / 4) | 0) +\n day -\n 32075;\n\n // JulianDates are noon-based\n hour = hour - 12;\n if (hour < 0) {\n hour += 24;\n }\n\n const secondsOfDay =\n second +\n (hour * TimeConstants.SECONDS_PER_HOUR +\n minute * TimeConstants.SECONDS_PER_MINUTE +\n millisecond * TimeConstants.SECONDS_PER_MILLISECOND);\n\n if (secondsOfDay >= 43200.0) {\n dayNumber -= 1;\n }\n\n return [dayNumber, secondsOfDay];\n}\n\n//Regular expressions used for ISO8601 date parsing.\n//YYYY\nconst matchCalendarYear = /^(\\d{4})$/;\n//YYYY-MM (YYYYMM is invalid)\nconst matchCalendarMonth = /^(\\d{4})-(\\d{2})$/;\n//YYYY-DDD or YYYYDDD\nconst matchOrdinalDate = /^(\\d{4})-?(\\d{3})$/;\n//YYYY-Www or YYYYWww or YYYY-Www-D or YYYYWwwD\nconst matchWeekDate = /^(\\d{4})-?W(\\d{2})-?(\\d{1})?$/;\n//YYYY-MM-DD or YYYYMMDD\nconst matchCalendarDate = /^(\\d{4})-?(\\d{2})-?(\\d{2})$/;\n// Match utc offset\nconst utcOffset = /([Z+\\-])?(\\d{2})?:?(\\d{2})?$/;\n// Match hours HH or HH.xxxxx\nconst matchHours = /^(\\d{2})(\\.\\d+)?/.source + utcOffset.source;\n// Match hours/minutes HH:MM HHMM.xxxxx\nconst matchHoursMinutes = /^(\\d{2}):?(\\d{2})(\\.\\d+)?/.source + utcOffset.source;\n// Match hours/minutes HH:MM:SS HHMMSS.xxxxx\nconst matchHoursMinutesSeconds =\n /^(\\d{2}):?(\\d{2}):?(\\d{2})(\\.\\d+)?/.source + utcOffset.source;\n\nconst iso8601ErrorMessage = \"Invalid ISO 8601 date.\";\n\n/**\n * Represents an astronomical Julian date, which is the number of days since noon on January 1, -4712 (4713 BC).\n * For increased precision, this class stores the whole number part of the date and the seconds\n * part of the date in separate components. In order to be safe for arithmetic and represent\n * leap seconds, the date is always stored in the International Atomic Time standard\n * {@link TimeStandard.TAI}.\n * @alias JulianDate\n * @constructor\n *\n * @param {number} [julianDayNumber=0.0] The Julian Day Number representing the number of whole days. Fractional days will also be handled correctly.\n * @param {number} [secondsOfDay=0.0] The number of seconds into the current Julian Day Number. Fractional seconds, negative seconds and seconds greater than a day will be handled correctly.\n * @param {TimeStandard} [timeStandard=TimeStandard.UTC] The time standard in which the first two parameters are defined.\n */\nfunction JulianDate(julianDayNumber, secondsOfDay, timeStandard) {\n /**\n * Gets or sets the number of whole days.\n * @type {number}\n */\n this.dayNumber = undefined;\n\n /**\n * Gets or sets the number of seconds into the current day.\n * @type {number}\n */\n this.secondsOfDay = undefined;\n\n julianDayNumber = defaultValue(julianDayNumber, 0.0);\n secondsOfDay = defaultValue(secondsOfDay, 0.0);\n timeStandard = defaultValue(timeStandard, TimeStandard.UTC);\n\n //If julianDayNumber is fractional, make it an integer and add the number of seconds the fraction represented.\n const wholeDays = julianDayNumber | 0;\n secondsOfDay =\n secondsOfDay +\n (julianDayNumber - wholeDays) * TimeConstants.SECONDS_PER_DAY;\n\n setComponents(wholeDays, secondsOfDay, this);\n\n if (timeStandard === TimeStandard.UTC) {\n convertUtcToTai(this);\n }\n}\n\n/**\n * Creates a new instance from a GregorianDate.\n *\n * @param {GregorianDate} date A GregorianDate.\n * @param {JulianDate} [result] An existing instance to use for the result.\n * @returns {JulianDate} The modified result parameter or a new instance if none was provided.\n *\n * @exception {DeveloperError} date must be a valid GregorianDate.\n */\nJulianDate.fromGregorianDate = function (date, result) {\n //>>includeStart('debug', pragmas.debug);\n if (!(date instanceof GregorianDate)) {\n throw new DeveloperError(\"date must be a valid GregorianDate.\");\n }\n //>>includeEnd('debug');\n\n const components = computeJulianDateComponents(\n date.year,\n date.month,\n date.day,\n date.hour,\n date.minute,\n date.second,\n date.millisecond,\n );\n if (!defined(result)) {\n return new JulianDate(components[0], components[1], TimeStandard.UTC);\n }\n setComponents(components[0], components[1], result);\n convertUtcToTai(result);\n return result;\n};\n\n/**\n * Creates a new instance from a JavaScript Date.\n *\n * @param {Date} date A JavaScript Date.\n * @param {JulianDate} [result] An existing instance to use for the result.\n * @returns {JulianDate} The modified result parameter or a new instance if none was provided.\n *\n * @exception {DeveloperError} date must be a valid JavaScript Date.\n */\nJulianDate.fromDate = function (date, result) {\n //>>includeStart('debug', pragmas.debug);\n if (!(date instanceof Date) || isNaN(date.getTime())) {\n throw new DeveloperError(\"date must be a valid JavaScript Date.\");\n }\n //>>includeEnd('debug');\n\n const components = computeJulianDateComponents(\n date.getUTCFullYear(),\n date.getUTCMonth() + 1,\n date.getUTCDate(),\n date.getUTCHours(),\n date.getUTCMinutes(),\n date.getUTCSeconds(),\n date.getUTCMilliseconds(),\n );\n if (!defined(result)) {\n return new JulianDate(components[0], components[1], TimeStandard.UTC);\n }\n setComponents(components[0], components[1], result);\n convertUtcToTai(result);\n return result;\n};\n\n/**\n * Creates a new instance from a from an {@link http://en.wikipedia.org/wiki/ISO_8601|ISO 8601} date.\n * This method is superior to Date.parse because it will handle all valid formats defined by the ISO 8601\n * specification, including leap seconds and sub-millisecond times, which discarded by most JavaScript implementations.\n *\n * @param {string} iso8601String An ISO 8601 date.\n * @param {JulianDate} [result] An existing instance to use for the result.\n * @returns {JulianDate} The modified result parameter or a new instance if none was provided.\n *\n * @exception {DeveloperError} Invalid ISO 8601 date.\n */\nJulianDate.fromIso8601 = function (iso8601String, result) {\n //>>includeStart('debug', pragmas.debug);\n if (typeof iso8601String !== \"string\") {\n throw new DeveloperError(iso8601ErrorMessage);\n }\n //>>includeEnd('debug');\n\n //Comma and decimal point both indicate a fractional number according to ISO 8601,\n //start out by blanket replacing , with . which is the only valid such symbol in JS.\n iso8601String = iso8601String.replace(\",\", \".\");\n\n //Split the string into its date and time components, denoted by a mandatory T\n let tokens = iso8601String.split(\"T\");\n let year;\n let month = 1;\n let day = 1;\n let hour = 0;\n let minute = 0;\n let second = 0;\n let millisecond = 0;\n\n //Lacking a time is okay, but a missing date is illegal.\n const date = tokens[0];\n const time = tokens[1];\n let tmp;\n let inLeapYear;\n //>>includeStart('debug', pragmas.debug);\n if (!defined(date)) {\n throw new DeveloperError(iso8601ErrorMessage);\n }\n\n let dashCount;\n //>>includeEnd('debug');\n\n //First match the date against possible regular expressions.\n tokens = date.match(matchCalendarDate);\n if (tokens !== null) {\n //>>includeStart('debug', pragmas.debug);\n dashCount = date.split(\"-\").length - 1;\n if (dashCount > 0 && dashCount !== 2) {\n throw new DeveloperError(iso8601ErrorMessage);\n }\n //>>includeEnd('debug');\n year = +tokens[1];\n month = +tokens[2];\n day = +tokens[3];\n } else {\n tokens = date.match(matchCalendarMonth);\n if (tokens !== null) {\n year = +tokens[1];\n month = +tokens[2];\n } else {\n tokens = date.match(matchCalendarYear);\n if (tokens !== null) {\n year = +tokens[1];\n } else {\n //Not a year/month/day so it must be an ordinal date.\n let dayOfYear;\n tokens = date.match(matchOrdinalDate);\n if (tokens !== null) {\n year = +tokens[1];\n dayOfYear = +tokens[2];\n inLeapYear = isLeapYear(year);\n\n //This validation is only applicable for this format.\n //>>includeStart('debug', pragmas.debug);\n if (\n dayOfYear < 1 ||\n (inLeapYear && dayOfYear > 366) ||\n (!inLeapYear && dayOfYear > 365)\n ) {\n throw new DeveloperError(iso8601ErrorMessage);\n }\n //>>includeEnd('debug')\n } else {\n tokens = date.match(matchWeekDate);\n if (tokens !== null) {\n //ISO week date to ordinal date from\n //http://en.wikipedia.org/w/index.php?title=ISO_week_date&oldid=474176775\n year = +tokens[1];\n const weekNumber = +tokens[2];\n const dayOfWeek = +tokens[3] || 0;\n\n //>>includeStart('debug', pragmas.debug);\n dashCount = date.split(\"-\").length - 1;\n if (\n dashCount > 0 &&\n ((!defined(tokens[3]) && dashCount !== 1) ||\n (defined(tokens[3]) && dashCount !== 2))\n ) {\n throw new DeveloperError(iso8601ErrorMessage);\n }\n //>>includeEnd('debug')\n\n const january4 = new Date(Date.UTC(year, 0, 4));\n dayOfYear = weekNumber * 7 + dayOfWeek - january4.getUTCDay() - 3;\n } else {\n //None of our regular expressions succeeded in parsing the date properly.\n //>>includeStart('debug', pragmas.debug);\n throw new DeveloperError(iso8601ErrorMessage);\n //>>includeEnd('debug')\n }\n }\n //Split an ordinal date into month/day.\n tmp = new Date(Date.UTC(year, 0, 1));\n tmp.setUTCDate(dayOfYear);\n month = tmp.getUTCMonth() + 1;\n day = tmp.getUTCDate();\n }\n }\n }\n\n //Now that we have all of the date components, validate them to make sure nothing is out of range.\n inLeapYear = isLeapYear(year);\n //>>includeStart('debug', pragmas.debug);\n if (\n month < 1 ||\n month > 12 ||\n day < 1 ||\n ((month !== 2 || !inLeapYear) && day > daysInMonth[month - 1]) ||\n (inLeapYear && month === 2 && day > daysInLeapFeburary)\n ) {\n throw new DeveloperError(iso8601ErrorMessage);\n }\n //>>includeEnd('debug')\n\n //Now move onto the time string, which is much simpler.\n //If no time is specified, it is considered the beginning of the day, UTC to match Javascript's implementation.\n let offsetIndex;\n if (defined(time)) {\n tokens = time.match(matchHoursMinutesSeconds);\n if (tokens !== null) {\n //>>includeStart('debug', pragmas.debug);\n dashCount = time.split(\":\").length - 1;\n if (dashCount > 0 && dashCount !== 2 && dashCount !== 3) {\n throw new DeveloperError(iso8601ErrorMessage);\n }\n //>>includeEnd('debug')\n\n hour = +tokens[1];\n minute = +tokens[2];\n second = +tokens[3];\n millisecond = +(tokens[4] || 0) * 1000.0;\n offsetIndex = 5;\n } else {\n tokens = time.match(matchHoursMinutes);\n if (tokens !== null) {\n //>>includeStart('debug', pragmas.debug);\n dashCount = time.split(\":\").length - 1;\n if (dashCount > 2) {\n throw new DeveloperError(iso8601ErrorMessage);\n }\n //>>includeEnd('debug')\n\n hour = +tokens[1];\n minute = +tokens[2];\n second = +(tokens[3] || 0) * 60.0;\n offsetIndex = 4;\n } else {\n tokens = time.match(matchHours);\n if (tokens !== null) {\n hour = +tokens[1];\n minute = +(tokens[2] || 0) * 60.0;\n offsetIndex = 3;\n } else {\n //>>includeStart('debug', pragmas.debug);\n throw new DeveloperError(iso8601ErrorMessage);\n //>>includeEnd('debug')\n }\n }\n }\n\n //Validate that all values are in proper range. Minutes and hours have special cases at 60 and 24.\n //>>includeStart('debug', pragmas.debug);\n if (\n minute >= 60 ||\n second >= 61 ||\n hour > 24 ||\n (hour === 24 && (minute > 0 || second > 0 || millisecond > 0))\n ) {\n throw new DeveloperError(iso8601ErrorMessage);\n }\n //>>includeEnd('debug');\n\n //Check the UTC offset value, if no value exists, use local time\n //a Z indicates UTC, + or - are offsets.\n const offset = tokens[offsetIndex];\n const offsetHours = +tokens[offsetIndex + 1];\n const offsetMinutes = +(tokens[offsetIndex + 2] || 0);\n switch (offset) {\n case \"+\":\n hour = hour - offsetHours;\n minute = minute - offsetMinutes;\n break;\n case \"-\":\n hour = hour + offsetHours;\n minute = minute + offsetMinutes;\n break;\n case \"Z\":\n break;\n default:\n minute =\n minute +\n new Date(\n Date.UTC(year, month - 1, day, hour, minute),\n ).getTimezoneOffset();\n break;\n }\n }\n\n //ISO8601 denotes a leap second by any time having a seconds component of 60 seconds.\n //If that's the case, we need to temporarily subtract a second in order to build a UTC date.\n //Then we add it back in after converting to TAI.\n const isLeapSecond = second === 60;\n if (isLeapSecond) {\n second--;\n }\n\n //Even if we successfully parsed the string into its components, after applying UTC offset or\n //special cases like 24:00:00 denoting midnight, we need to normalize the data appropriately.\n\n //milliseconds can never be greater than 1000, and seconds can't be above 60, so we start with minutes\n while (minute >= 60) {\n minute -= 60;\n hour++;\n }\n\n while (hour >= 24) {\n hour -= 24;\n day++;\n }\n\n tmp = inLeapYear && month === 2 ? daysInLeapFeburary : daysInMonth[month - 1];\n while (day > tmp) {\n day -= tmp;\n month++;\n\n if (month > 12) {\n month -= 12;\n year++;\n }\n\n tmp =\n inLeapYear && month === 2 ? daysInLeapFeburary : daysInMonth[month - 1];\n }\n\n //If UTC offset is at the beginning/end of the day, minutes can be negative.\n while (minute < 0) {\n minute += 60;\n hour--;\n }\n\n while (hour < 0) {\n hour += 24;\n day--;\n }\n\n while (day < 1) {\n month--;\n if (month < 1) {\n month += 12;\n year--;\n }\n\n tmp =\n inLeapYear && month === 2 ? daysInLeapFeburary : daysInMonth[month - 1];\n day += tmp;\n }\n\n //Now create the JulianDate components from the Gregorian date and actually create our instance.\n const components = computeJulianDateComponents(\n year,\n month,\n day,\n hour,\n minute,\n second,\n millisecond,\n );\n\n if (!defined(result)) {\n result = new JulianDate(components[0], components[1], TimeStandard.UTC);\n } else {\n setComponents(components[0], components[1], result);\n convertUtcToTai(result);\n }\n\n //If we were on a leap second, add it back.\n if (isLeapSecond) {\n JulianDate.addSeconds(result, 1, result);\n }\n\n return result;\n};\n\n/**\n * Creates a new instance that represents the current system time.\n * This is equivalent to calling JulianDate.fromDate(new Date());.\n *\n * @param {JulianDate} [result] An existing instance to use for the result.\n * @returns {JulianDate} The modified result parameter or a new instance if none was provided.\n */\nJulianDate.now = function (result) {\n return JulianDate.fromDate(new Date(), result);\n};\n\nconst toGregorianDateScratch = new JulianDate(0, 0, TimeStandard.TAI);\n\n/**\n * Creates a {@link GregorianDate} from the provided instance.\n *\n * @param {JulianDate} julianDate The date to be converted.\n * @param {GregorianDate} [result] An existing instance to use for the result.\n * @returns {GregorianDate} The modified result parameter or a new instance if none was provided.\n */\nJulianDate.toGregorianDate = function (julianDate, result) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(julianDate)) {\n throw new DeveloperError(\"julianDate is required.\");\n }\n //>>includeEnd('debug');\n\n let isLeapSecond = false;\n let thisUtc = convertTaiToUtc(julianDate, toGregorianDateScratch);\n if (!defined(thisUtc)) {\n //Conversion to UTC will fail if we are during a leap second.\n //If that's the case, subtract a second and convert again.\n //JavaScript doesn't support leap seconds, so this results in second 59 being repeated twice.\n JulianDate.addSeconds(julianDate, -1, toGregorianDateScratch);\n thisUtc = convertTaiToUtc(toGregorianDateScratch, toGregorianDateScratch);\n isLeapSecond = true;\n }\n\n let julianDayNumber = thisUtc.dayNumber;\n const secondsOfDay = thisUtc.secondsOfDay;\n\n if (secondsOfDay >= 43200.0) {\n julianDayNumber += 1;\n }\n\n // Algorithm from page 604 of the Explanatory Supplement to the\n // Astronomical Almanac (Seidelmann 1992).\n let L = (julianDayNumber + 68569) | 0;\n const N = ((4 * L) / 146097) | 0;\n L = (L - (((146097 * N + 3) / 4) | 0)) | 0;\n const I = ((4000 * (L + 1)) / 1461001) | 0;\n L = (L - (((1461 * I) / 4) | 0) + 31) | 0;\n const J = ((80 * L) / 2447) | 0;\n const day = (L - (((2447 * J) / 80) | 0)) | 0;\n L = (J / 11) | 0;\n const month = (J + 2 - 12 * L) | 0;\n const year = (100 * (N - 49) + I + L) | 0;\n\n let hour = (secondsOfDay / TimeConstants.SECONDS_PER_HOUR) | 0;\n let remainingSeconds = secondsOfDay - hour * TimeConstants.SECONDS_PER_HOUR;\n const minute = (remainingSeconds / TimeConstants.SECONDS_PER_MINUTE) | 0;\n remainingSeconds =\n remainingSeconds - minute * TimeConstants.SECONDS_PER_MINUTE;\n let second = remainingSeconds | 0;\n const millisecond =\n (remainingSeconds - second) / TimeConstants.SECONDS_PER_MILLISECOND;\n\n // JulianDates are noon-based\n hour += 12;\n if (hour > 23) {\n hour -= 24;\n }\n\n //If we were on a leap second, add it back.\n if (isLeapSecond) {\n second += 1;\n }\n\n if (!defined(result)) {\n return new GregorianDate(\n year,\n month,\n day,\n hour,\n minute,\n second,\n millisecond,\n isLeapSecond,\n );\n }\n\n result.year = year;\n result.month = month;\n result.day = day;\n result.hour = hour;\n result.minute = minute;\n result.second = second;\n result.millisecond = millisecond;\n result.isLeapSecond = isLeapSecond;\n return result;\n};\n\n/**\n * Creates a JavaScript Date from the provided instance.\n * Since JavaScript dates are only accurate to the nearest millisecond and\n * cannot represent a leap second, consider using {@link JulianDate.toGregorianDate} instead.\n * If the provided JulianDate is during a leap second, the previous second is used.\n *\n * @param {JulianDate} julianDate The date to be converted.\n * @returns {Date} A new instance representing the provided date.\n */\nJulianDate.toDate = function (julianDate) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(julianDate)) {\n throw new DeveloperError(\"julianDate is required.\");\n }\n //>>includeEnd('debug');\n\n const gDate = JulianDate.toGregorianDate(julianDate, gregorianDateScratch);\n let second = gDate.second;\n if (gDate.isLeapSecond) {\n second -= 1;\n }\n return new Date(\n Date.UTC(\n gDate.year,\n gDate.month - 1,\n gDate.day,\n gDate.hour,\n gDate.minute,\n second,\n gDate.millisecond,\n ),\n );\n};\n\n/**\n * Creates an ISO8601 representation of the provided date.\n *\n * @param {JulianDate} julianDate The date to be converted.\n * @param {number} [precision] The number of fractional digits used to represent the seconds component. By default, the most precise representation is used.\n * @returns {string} The ISO8601 representation of the provided date.\n */\nJulianDate.toIso8601 = function (julianDate, precision) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(julianDate)) {\n throw new DeveloperError(\"julianDate is required.\");\n }\n //>>includeEnd('debug');\n\n const gDate = JulianDate.toGregorianDate(julianDate, gregorianDateScratch);\n let year = gDate.year;\n let month = gDate.month;\n let day = gDate.day;\n let hour = gDate.hour;\n const minute = gDate.minute;\n const second = gDate.second;\n const millisecond = gDate.millisecond;\n\n // special case - Iso8601.MAXIMUM_VALUE produces a string which we can't parse unless we adjust.\n // 10000-01-01T00:00:00 is the same instant as 9999-12-31T24:00:00\n if (\n year === 10000 &&\n month === 1 &&\n day === 1 &&\n hour === 0 &&\n minute === 0 &&\n second === 0 &&\n millisecond === 0\n ) {\n year = 9999;\n month = 12;\n day = 31;\n hour = 24;\n }\n\n let millisecondStr;\n\n if (!defined(precision) && millisecond !== 0) {\n //Forces milliseconds into a number with at least 3 digits to whatever the default toString() precision is.\n millisecondStr = (millisecond * 0.01).toString().replace(\".\", \"\");\n return `${year.toString().padStart(4, \"0\")}-${month\n .toString()\n .padStart(2, \"0\")}-${day.toString().padStart(2, \"0\")}T${hour\n .toString()\n .padStart(2, \"0\")}:${minute.toString().padStart(2, \"0\")}:${second\n .toString()\n .padStart(2, \"0\")}.${millisecondStr}Z`;\n }\n\n //Precision is either 0 or milliseconds is 0 with undefined precision, in either case, leave off milliseconds entirely\n if (!defined(precision) || precision === 0) {\n return `${year.toString().padStart(4, \"0\")}-${month\n .toString()\n .padStart(2, \"0\")}-${day.toString().padStart(2, \"0\")}T${hour\n .toString()\n .padStart(2, \"0\")}:${minute\n .toString()\n .padStart(2, \"0\")}:${second.toString().padStart(2, \"0\")}Z`;\n }\n\n //Forces milliseconds into a number with at least 3 digits to whatever the specified precision is.\n millisecondStr = (millisecond * 0.01)\n .toFixed(precision)\n .replace(\".\", \"\")\n .slice(0, precision);\n return `${year.toString().padStart(4, \"0\")}-${month\n .toString()\n .padStart(2, \"0\")}-${day.toString().padStart(2, \"0\")}T${hour\n .toString()\n .padStart(2, \"0\")}:${minute.toString().padStart(2, \"0\")}:${second\n .toString()\n .padStart(2, \"0\")}.${millisecondStr}Z`;\n};\n\n/**\n * Duplicates a JulianDate instance.\n *\n * @param {JulianDate} julianDate The date to duplicate.\n * @param {JulianDate} [result] An existing instance to use for the result.\n * @returns {JulianDate} The modified result parameter or a new instance if none was provided. Returns undefined if julianDate is undefined.\n */\nJulianDate.clone = function (julianDate, result) {\n if (!defined(julianDate)) {\n return undefined;\n }\n if (!defined(result)) {\n return new JulianDate(\n julianDate.dayNumber,\n julianDate.secondsOfDay,\n TimeStandard.TAI,\n );\n }\n result.dayNumber = julianDate.dayNumber;\n result.secondsOfDay = julianDate.secondsOfDay;\n return result;\n};\n\n/**\n * Compares two instances.\n *\n * @param {JulianDate} left The first instance.\n * @param {JulianDate} right The second instance.\n * @returns {number} A negative value if left is less than right, a positive value if left is greater than right, or zero if left and right are equal.\n */\nJulianDate.compare = function (left, right) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(left)) {\n throw new DeveloperError(\"left is required.\");\n }\n if (!defined(right)) {\n throw new DeveloperError(\"right is required.\");\n }\n //>>includeEnd('debug');\n\n const julianDayNumberDifference = left.dayNumber - right.dayNumber;\n if (julianDayNumberDifference !== 0) {\n return julianDayNumberDifference;\n }\n return left.secondsOfDay - right.secondsOfDay;\n};\n\n/**\n * Compares two instances and returns true if they are equal, false otherwise.\n *\n * @param {JulianDate} [left] The first instance.\n * @param {JulianDate} [right] The second instance.\n * @returns {boolean} true if the dates are equal; otherwise, false.\n */\nJulianDate.equals = function (left, right) {\n return (\n left === right ||\n (defined(left) &&\n defined(right) &&\n left.dayNumber === right.dayNumber &&\n left.secondsOfDay === right.secondsOfDay)\n );\n};\n\n/**\n * Compares two instances and returns true if they are within epsilon seconds of\n * each other. That is, in order for the dates to be considered equal (and for\n * this function to return true), the absolute value of the difference between them, in\n * seconds, must be less than epsilon.\n *\n * @param {JulianDate} [left] The first instance.\n * @param {JulianDate} [right] The second instance.\n * @param {number} [epsilon=0] The maximum number of seconds that should separate the two instances.\n * @returns {boolean} true if the two dates are within epsilon seconds of each other; otherwise false.\n */\nJulianDate.equalsEpsilon = function (left, right, epsilon) {\n epsilon = defaultValue(epsilon, 0);\n\n return (\n left === right ||\n (defined(left) &&\n defined(right) &&\n Math.abs(JulianDate.secondsDifference(left, right)) <= epsilon)\n );\n};\n\n/**\n * Computes the total number of whole and fractional days represented by the provided instance.\n *\n * @param {JulianDate} julianDate The date.\n * @returns {number} The Julian date as single floating point number.\n */\nJulianDate.totalDays = function (julianDate) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(julianDate)) {\n throw new DeveloperError(\"julianDate is required.\");\n }\n //>>includeEnd('debug');\n return (\n julianDate.dayNumber +\n julianDate.secondsOfDay / TimeConstants.SECONDS_PER_DAY\n );\n};\n\n/**\n * Computes the difference in seconds between the provided instance.\n *\n * @param {JulianDate} left The first instance.\n * @param {JulianDate} right The second instance.\n * @returns {number} The difference, in seconds, when subtracting right from left.\n */\nJulianDate.secondsDifference = function (left, right) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(left)) {\n throw new DeveloperError(\"left is required.\");\n }\n if (!defined(right)) {\n throw new DeveloperError(\"right is required.\");\n }\n //>>includeEnd('debug');\n\n const dayDifference =\n (left.dayNumber - right.dayNumber) * TimeConstants.SECONDS_PER_DAY;\n return dayDifference + (left.secondsOfDay - right.secondsOfDay);\n};\n\n/**\n * Computes the difference in days between the provided instance.\n *\n * @param {JulianDate} left The first instance.\n * @param {JulianDate} right The second instance.\n * @returns {number} The difference, in days, when subtracting right from left.\n */\nJulianDate.daysDifference = function (left, right) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(left)) {\n throw new DeveloperError(\"left is required.\");\n }\n if (!defined(right)) {\n throw new DeveloperError(\"right is required.\");\n }\n //>>includeEnd('debug');\n\n const dayDifference = left.dayNumber - right.dayNumber;\n const secondDifference =\n (left.secondsOfDay - right.secondsOfDay) / TimeConstants.SECONDS_PER_DAY;\n return dayDifference + secondDifference;\n};\n\n/**\n * Computes the number of seconds the provided instance is ahead of UTC.\n *\n * @param {JulianDate} julianDate The date.\n * @returns {number} The number of seconds the provided instance is ahead of UTC\n */\nJulianDate.computeTaiMinusUtc = function (julianDate) {\n binarySearchScratchLeapSecond.julianDate = julianDate;\n const leapSeconds = JulianDate.leapSeconds;\n let index = binarySearch(\n leapSeconds,\n binarySearchScratchLeapSecond,\n compareLeapSecondDates,\n );\n if (index < 0) {\n index = ~index;\n --index;\n if (index < 0) {\n index = 0;\n }\n }\n return leapSeconds[index].offset;\n};\n\n/**\n * Adds the provided number of seconds to the provided date instance.\n *\n * @param {JulianDate} julianDate The date.\n * @param {number} seconds The number of seconds to add or subtract.\n * @param {JulianDate} result An existing instance to use for the result.\n * @returns {JulianDate} The modified result parameter.\n */\nJulianDate.addSeconds = function (julianDate, seconds, result) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(julianDate)) {\n throw new DeveloperError(\"julianDate is required.\");\n }\n if (!defined(seconds)) {\n throw new DeveloperError(\"seconds is required.\");\n }\n if (!defined(result)) {\n throw new DeveloperError(\"result is required.\");\n }\n //>>includeEnd('debug');\n\n return setComponents(\n julianDate.dayNumber,\n julianDate.secondsOfDay + seconds,\n result,\n );\n};\n\n/**\n * Adds the provided number of minutes to the provided date instance.\n *\n * @param {JulianDate} julianDate The date.\n * @param {number} minutes The number of minutes to add or subtract.\n * @param {JulianDate} result An existing instance to use for the result.\n * @returns {JulianDate} The modified result parameter.\n */\nJulianDate.addMinutes = function (julianDate, minutes, result) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(julianDate)) {\n throw new DeveloperError(\"julianDate is required.\");\n }\n if (!defined(minutes)) {\n throw new DeveloperError(\"minutes is required.\");\n }\n if (!defined(result)) {\n throw new DeveloperError(\"result is required.\");\n }\n //>>includeEnd('debug');\n\n const newSecondsOfDay =\n julianDate.secondsOfDay + minutes * TimeConstants.SECONDS_PER_MINUTE;\n return setComponents(julianDate.dayNumber, newSecondsOfDay, result);\n};\n\n/**\n * Adds the provided number of hours to the provided date instance.\n *\n * @param {JulianDate} julianDate The date.\n * @param {number} hours The number of hours to add or subtract.\n * @param {JulianDate} result An existing instance to use for the result.\n * @returns {JulianDate} The modified result parameter.\n */\nJulianDate.addHours = function (julianDate, hours, result) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(julianDate)) {\n throw new DeveloperError(\"julianDate is required.\");\n }\n if (!defined(hours)) {\n throw new DeveloperError(\"hours is required.\");\n }\n if (!defined(result)) {\n throw new DeveloperError(\"result is required.\");\n }\n //>>includeEnd('debug');\n\n const newSecondsOfDay =\n julianDate.secondsOfDay + hours * TimeConstants.SECONDS_PER_HOUR;\n return setComponents(julianDate.dayNumber, newSecondsOfDay, result);\n};\n\n/**\n * Adds the provided number of days to the provided date instance.\n *\n * @param {JulianDate} julianDate The date.\n * @param {number} days The number of days to add or subtract.\n * @param {JulianDate} result An existing instance to use for the result.\n * @returns {JulianDate} The modified result parameter.\n */\nJulianDate.addDays = function (julianDate, days, result) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(julianDate)) {\n throw new DeveloperError(\"julianDate is required.\");\n }\n if (!defined(days)) {\n throw new DeveloperError(\"days is required.\");\n }\n if (!defined(result)) {\n throw new DeveloperError(\"result is required.\");\n }\n //>>includeEnd('debug');\n\n const newJulianDayNumber = julianDate.dayNumber + days;\n return setComponents(newJulianDayNumber, julianDate.secondsOfDay, result);\n};\n\n/**\n * Compares the provided instances and returns true if left is earlier than right, false otherwise.\n *\n * @param {JulianDate} left The first instance.\n * @param {JulianDate} right The second instance.\n * @returns {boolean} true if left is earlier than right, false otherwise.\n */\nJulianDate.lessThan = function (left, right) {\n return JulianDate.compare(left, right) < 0;\n};\n\n/**\n * Compares the provided instances and returns true if left is earlier than or equal to right, false otherwise.\n *\n * @param {JulianDate} left The first instance.\n * @param {JulianDate} right The second instance.\n * @returns {boolean} true if left is earlier than or equal to right, false otherwise.\n */\nJulianDate.lessThanOrEquals = function (left, right) {\n return JulianDate.compare(left, right) <= 0;\n};\n\n/**\n * Compares the provided instances and returns true if left is later than right, false otherwise.\n *\n * @param {JulianDate} left The first instance.\n * @param {JulianDate} right The second instance.\n * @returns {boolean} true if left is later than right, false otherwise.\n */\nJulianDate.greaterThan = function (left, right) {\n return JulianDate.compare(left, right) > 0;\n};\n\n/**\n * Compares the provided instances and returns true if left is later than or equal to right, false otherwise.\n *\n * @param {JulianDate} left The first instance.\n * @param {JulianDate} right The second instance.\n * @returns {boolean} true if left is later than or equal to right, false otherwise.\n */\nJulianDate.greaterThanOrEquals = function (left, right) {\n return JulianDate.compare(left, right) >= 0;\n};\n\n/**\n * Duplicates this instance.\n *\n * @param {JulianDate} [result] An existing instance to use for the result.\n * @returns {JulianDate} The modified result parameter or a new instance if none was provided.\n */\nJulianDate.prototype.clone = function (result) {\n return JulianDate.clone(this, result);\n};\n\n/**\n * Compares this and the provided instance and returns true if they are equal, false otherwise.\n *\n * @param {JulianDate} [right] The second instance.\n * @returns {boolean} true if the dates are equal; otherwise, false.\n */\nJulianDate.prototype.equals = function (right) {\n return JulianDate.equals(this, right);\n};\n\n/**\n * Compares this and the provided instance and returns true if they are within epsilon seconds of\n * each other. That is, in order for the dates to be considered equal (and for\n * this function to return true), the absolute value of the difference between them, in\n * seconds, must be less than epsilon.\n *\n * @param {JulianDate} [right] The second instance.\n * @param {number} [epsilon=0] The maximum number of seconds that should separate the two instances.\n * @returns {boolean} true if the two dates are within epsilon seconds of each other; otherwise false.\n */\nJulianDate.prototype.equalsEpsilon = function (right, epsilon) {\n return JulianDate.equalsEpsilon(this, right, epsilon);\n};\n\n/**\n * Creates a string representing this date in ISO8601 format.\n *\n * @returns {string} A string representing this date in ISO8601 format.\n */\nJulianDate.prototype.toString = function () {\n return JulianDate.toIso8601(this);\n};\n\n/**\n * Gets or sets the list of leap seconds used throughout Cesium.\n * @memberof JulianDate\n * @type {LeapSecond[]}\n */\nJulianDate.leapSeconds = [\n new LeapSecond(new JulianDate(2441317, 43210.0, TimeStandard.TAI), 10), // January 1, 1972 00:00:00 UTC\n new LeapSecond(new JulianDate(2441499, 43211.0, TimeStandard.TAI), 11), // July 1, 1972 00:00:00 UTC\n new LeapSecond(new JulianDate(2441683, 43212.0, TimeStandard.TAI), 12), // January 1, 1973 00:00:00 UTC\n new LeapSecond(new JulianDate(2442048, 43213.0, TimeStandard.TAI), 13), // January 1, 1974 00:00:00 UTC\n new LeapSecond(new JulianDate(2442413, 43214.0, TimeStandard.TAI), 14), // January 1, 1975 00:00:00 UTC\n new LeapSecond(new JulianDate(2442778, 43215.0, TimeStandard.TAI), 15), // January 1, 1976 00:00:00 UTC\n new LeapSecond(new JulianDate(2443144, 43216.0, TimeStandard.TAI), 16), // January 1, 1977 00:00:00 UTC\n new LeapSecond(new JulianDate(2443509, 43217.0, TimeStandard.TAI), 17), // January 1, 1978 00:00:00 UTC\n new LeapSecond(new JulianDate(2443874, 43218.0, TimeStandard.TAI), 18), // January 1, 1979 00:00:00 UTC\n new LeapSecond(new JulianDate(2444239, 43219.0, TimeStandard.TAI), 19), // January 1, 1980 00:00:00 UTC\n new LeapSecond(new JulianDate(2444786, 43220.0, TimeStandard.TAI), 20), // July 1, 1981 00:00:00 UTC\n new LeapSecond(new JulianDate(2445151, 43221.0, TimeStandard.TAI), 21), // July 1, 1982 00:00:00 UTC\n new LeapSecond(new JulianDate(2445516, 43222.0, TimeStandard.TAI), 22), // July 1, 1983 00:00:00 UTC\n new LeapSecond(new JulianDate(2446247, 43223.0, TimeStandard.TAI), 23), // July 1, 1985 00:00:00 UTC\n new LeapSecond(new JulianDate(2447161, 43224.0, TimeStandard.TAI), 24), // January 1, 1988 00:00:00 UTC\n new LeapSecond(new JulianDate(2447892, 43225.0, TimeStandard.TAI), 25), // January 1, 1990 00:00:00 UTC\n new LeapSecond(new JulianDate(2448257, 43226.0, TimeStandard.TAI), 26), // January 1, 1991 00:00:00 UTC\n new LeapSecond(new JulianDate(2448804, 43227.0, TimeStandard.TAI), 27), // July 1, 1992 00:00:00 UTC\n new LeapSecond(new JulianDate(2449169, 43228.0, TimeStandard.TAI), 28), // July 1, 1993 00:00:00 UTC\n new LeapSecond(new JulianDate(2449534, 43229.0, TimeStandard.TAI), 29), // July 1, 1994 00:00:00 UTC\n new LeapSecond(new JulianDate(2450083, 43230.0, TimeStandard.TAI), 30), // January 1, 1996 00:00:00 UTC\n new LeapSecond(new JulianDate(2450630, 43231.0, TimeStandard.TAI), 31), // July 1, 1997 00:00:00 UTC\n new LeapSecond(new JulianDate(2451179, 43232.0, TimeStandard.TAI), 32), // January 1, 1999 00:00:00 UTC\n new LeapSecond(new JulianDate(2453736, 43233.0, TimeStandard.TAI), 33), // January 1, 2006 00:00:00 UTC\n new LeapSecond(new JulianDate(2454832, 43234.0, TimeStandard.TAI), 34), // January 1, 2009 00:00:00 UTC\n new LeapSecond(new JulianDate(2456109, 43235.0, TimeStandard.TAI), 35), // July 1, 2012 00:00:00 UTC\n new LeapSecond(new JulianDate(2457204, 43236.0, TimeStandard.TAI), 36), // July 1, 2015 00:00:00 UTC\n new LeapSecond(new JulianDate(2457754, 43237.0, TimeStandard.TAI), 37), // January 1, 2017 00:00:00 UTC\n];\nexport default JulianDate;\n","import Check from \"./Check.js\";\nimport defaultValue from \"./defaultValue.js\";\nimport DeveloperError from \"./DeveloperError.js\";\nimport isLeapYear from \"./isLeapYear.js\";\n\nconst daysInYear = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\n\n/**\n * Represents a Gregorian date in a more precise format than the JavaScript Date object.\n * In addition to submillisecond precision, this object can also represent leap seconds.\n * @alias GregorianDate\n * @constructor\n *\n * @param {number} [year] The year as a whole number.\n * @param {number} [month] The month as a whole number with range [1, 12].\n * @param {number} [day] The day of the month as a whole number starting at 1.\n * @param {number} [hour] The hour as a whole number with range [0, 23].\n * @param {number} [minute] The minute of the hour as a whole number with range [0, 59].\n * @param {number} [second] The second of the minute as a whole number with range [0, 60], with 60 representing a leap second.\n * @param {number} [millisecond] The millisecond of the second as a floating point number with range [0.0, 1000.0).\n * @param {boolean} [isLeapSecond] Whether this time is during a leap second.\n *\n * @see JulianDate#toGregorianDate\n */\nfunction GregorianDate(\n year,\n month,\n day,\n hour,\n minute,\n second,\n millisecond,\n isLeapSecond,\n) {\n const minimumYear = 1;\n const minimumMonth = 1;\n const minimumDay = 1;\n const minimumHour = 0;\n const minimumMinute = 0;\n const minimumSecond = 0;\n const minimumMillisecond = 0;\n\n year = defaultValue(year, minimumYear);\n month = defaultValue(month, minimumMonth);\n day = defaultValue(day, minimumDay);\n hour = defaultValue(hour, minimumHour);\n minute = defaultValue(minute, minimumMinute);\n second = defaultValue(second, minimumSecond);\n millisecond = defaultValue(millisecond, minimumMillisecond);\n isLeapSecond = defaultValue(isLeapSecond, false);\n //>>includeStart('debug', pragmas.debug);\n validateRange();\n validateDate();\n //>>includeEnd('debug');\n\n /**\n * Gets or sets the year as a whole number.\n * @type {number}\n */\n this.year = year;\n /**\n * Gets or sets the month as a whole number with range [1, 12].\n * @type {number}\n */\n this.month = month;\n /**\n * Gets or sets the day of the month as a whole number starting at 1.\n * @type {number}\n */\n this.day = day;\n /**\n * Gets or sets the hour as a whole number with range [0, 23].\n * @type {number}\n */\n this.hour = hour;\n /**\n * Gets or sets the minute of the hour as a whole number with range [0, 59].\n * @type {number}\n */\n this.minute = minute;\n /**\n * Gets or sets the second of the minute as a whole number with range [0, 60], with 60 representing a leap second.\n * @type {number}\n */\n this.second = second;\n /**\n * Gets or sets the millisecond of the second as a floating point number with range [0.0, 1000.0).\n * @type {number}\n */\n this.millisecond = millisecond;\n /**\n * Gets or sets whether this time is during a leap second.\n * @type {boolean}\n */\n this.isLeapSecond = isLeapSecond;\n\n function validateRange() {\n const maximumYear = 9999;\n const maximumMonth = 12;\n const maximumDay = 31;\n const maximumHour = 23;\n const maximumMinute = 59;\n const maximumSecond = 59;\n const excludedMaximumMilisecond = 1000;\n\n Check.typeOf.number.greaterThanOrEquals(\"Year\", year, minimumYear);\n Check.typeOf.number.lessThanOrEquals(\"Year\", year, maximumYear);\n\n Check.typeOf.number.greaterThanOrEquals(\"Month\", month, minimumMonth);\n Check.typeOf.number.lessThanOrEquals(\"Month\", month, maximumMonth);\n\n Check.typeOf.number.greaterThanOrEquals(\"Day\", day, minimumDay);\n Check.typeOf.number.lessThanOrEquals(\"Day\", day, maximumDay);\n\n Check.typeOf.number.greaterThanOrEquals(\"Hour\", hour, minimumHour);\n Check.typeOf.number.lessThanOrEquals(\"Hour\", hour, maximumHour);\n\n Check.typeOf.number.greaterThanOrEquals(\"Minute\", minute, minimumMinute);\n Check.typeOf.number.lessThanOrEquals(\"Minute\", minute, maximumMinute);\n\n Check.typeOf.bool(\"IsLeapSecond\", isLeapSecond);\n\n Check.typeOf.number.greaterThanOrEquals(\"Second\", second, minimumSecond);\n Check.typeOf.number.lessThanOrEquals(\n \"Second\",\n second,\n isLeapSecond ? maximumSecond + 1 : maximumSecond,\n );\n\n Check.typeOf.number.greaterThanOrEquals(\n \"Millisecond\",\n millisecond,\n minimumMillisecond,\n );\n Check.typeOf.number.lessThan(\n \"Millisecond\",\n millisecond,\n excludedMaximumMilisecond,\n );\n }\n\n // Javascript date object supports only dates greater than 1901. Thus validating with custom logic\n function validateDate() {\n const daysInMonth =\n month === 2 && isLeapYear(year)\n ? daysInYear[month - 1] + 1\n : daysInYear[month - 1];\n\n if (day > daysInMonth) {\n throw new DeveloperError(\"Month and Day represents invalid date\");\n }\n }\n}\nexport default GregorianDate;\n","import DeveloperError from \"./DeveloperError.js\";\n\n/**\n * Determines if a given date is a leap year.\n *\n * @function isLeapYear\n *\n * @param {number} year The year to be tested.\n * @returns {boolean} True if year is a leap year.\n *\n * @example\n * const leapYear = Cesium.isLeapYear(2000); // true\n */\nfunction isLeapYear(year) {\n //>>includeStart('debug', pragmas.debug);\n if (year === null || isNaN(year)) {\n throw new DeveloperError(\"year is required and must be a number.\");\n }\n //>>includeEnd('debug');\n\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n}\nexport default isLeapYear;\n","/**\n * Describes a single leap second, which is constructed from a {@link JulianDate} and a\n * numerical offset representing the number of seconds TAI is ahead of the UTC time standard.\n * @alias LeapSecond\n * @constructor\n *\n * @param {JulianDate} [date] A Julian date representing the time of the leap second.\n * @param {number} [offset] The cumulative number of seconds that TAI is ahead of UTC at the provided date.\n */\nfunction LeapSecond(date, offset) {\n /**\n * Gets or sets the date at which this leap second occurs.\n * @type {JulianDate}\n */\n this.julianDate = date;\n\n /**\n * Gets or sets the cumulative number of seconds between the UTC and TAI time standards at the time\n * of this leap second.\n * @type {number}\n */\n this.offset = offset;\n}\nexport default LeapSecond;\n","/**\n * Constants for time conversions like those done by {@link JulianDate}.\n *\n * @namespace TimeConstants\n *\n * @see JulianDate\n *\n * @private\n */\nconst TimeConstants = {\n /**\n * The number of seconds in one millisecond: 0.001\n * @type {number}\n * @constant\n */\n SECONDS_PER_MILLISECOND: 0.001,\n\n /**\n * The number of seconds in one minute: 60.\n * @type {number}\n * @constant\n */\n SECONDS_PER_MINUTE: 60.0,\n\n /**\n * The number of minutes in one hour: 60.\n * @type {number}\n * @constant\n */\n MINUTES_PER_HOUR: 60.0,\n\n /**\n * The number of hours in one day: 24.\n * @type {number}\n * @constant\n */\n HOURS_PER_DAY: 24.0,\n\n /**\n * The number of seconds in one hour: 3600.\n * @type {number}\n * @constant\n */\n SECONDS_PER_HOUR: 3600.0,\n\n /**\n * The number of minutes in one day: 1440.\n * @type {number}\n * @constant\n */\n MINUTES_PER_DAY: 1440.0,\n\n /**\n * The number of seconds in one day, ignoring leap seconds: 86400.\n * @type {number}\n * @constant\n */\n SECONDS_PER_DAY: 86400.0,\n\n /**\n * The number of days in one Julian century: 36525.\n * @type {number}\n * @constant\n */\n DAYS_PER_JULIAN_CENTURY: 36525.0,\n\n /**\n * One trillionth of a second.\n * @type {number}\n * @constant\n */\n PICOSECOND: 0.000000001,\n\n /**\n * The number of days to subtract from a Julian date to determine the\n * modified Julian date, which gives the number of days since midnight\n * on November 17, 1858.\n * @type {number}\n * @constant\n */\n MODIFIED_JULIAN_DATE_DIFFERENCE: 2400000.5,\n};\nexport default Object.freeze(TimeConstants);\n","/**\n * Provides the type of time standards which JulianDate can take as input.\n *\n * @enum {number}\n *\n * @see JulianDate\n */\nconst TimeStandard = {\n /**\n * Represents the coordinated Universal Time (UTC) time standard.\n *\n * UTC is related to TAI according to the relationship\n * UTC = TAI - deltaT where deltaT is the number of leap\n * seconds which have been introduced as of the time in TAI.\n *\n * @type {number}\n * @constant\n */\n UTC: 0,\n\n /**\n * Represents the International Atomic Time (TAI) time standard.\n * TAI is the principal time standard to which the other time standards are related.\n *\n * @type {number}\n * @constant\n */\n TAI: 1,\n};\nexport default Object.freeze(TimeStandard);\n","import Uri from \"urijs\";\nimport appendForwardSlash from \"./appendForwardSlash.js\";\nimport Check from \"./Check.js\";\nimport clone from \"./clone.js\";\nimport combine from \"./combine.js\";\nimport defaultValue from \"./defaultValue.js\";\nimport defer from \"./defer.js\";\nimport defined from \"./defined.js\";\nimport DeveloperError from \"./DeveloperError.js\";\nimport getAbsoluteUri from \"./getAbsoluteUri.js\";\nimport getBaseUri from \"./getBaseUri.js\";\nimport getExtensionFromUri from \"./getExtensionFromUri.js\";\nimport getImagePixels from \"./getImagePixels.js\";\nimport isBlobUri from \"./isBlobUri.js\";\nimport isCrossOriginUrl from \"./isCrossOriginUrl.js\";\nimport isDataUri from \"./isDataUri.js\";\nimport loadAndExecuteScript from \"./loadAndExecuteScript.js\";\nimport CesiumMath from \"./Math.js\";\nimport objectToQuery from \"./objectToQuery.js\";\nimport queryToObject from \"./queryToObject.js\";\nimport Request from \"./Request.js\";\nimport RequestErrorEvent from \"./RequestErrorEvent.js\";\nimport RequestScheduler from \"./RequestScheduler.js\";\nimport RequestState from \"./RequestState.js\";\nimport RuntimeError from \"./RuntimeError.js\";\nimport TrustedServers from \"./TrustedServers.js\";\n\nconst xhrBlobSupported = (function () {\n try {\n const xhr = new XMLHttpRequest();\n xhr.open(\"GET\", \"#\", true);\n xhr.responseType = \"blob\";\n return xhr.responseType === \"blob\";\n } catch (e) {\n return false;\n }\n})();\n\n/**\n * @typedef {object} Resource.ConstructorOptions\n *\n * Initialization options for the Resource constructor\n *\n * @property {string} url The url of the resource.\n * @property {object} [queryParameters] An object containing query parameters that will be sent when retrieving the resource.\n * @property {object} [templateValues] Key/Value pairs that are used to replace template values (eg. {x}).\n * @property {object} [headers={}] Additional HTTP headers that will be sent.\n * @property {Proxy} [proxy] A proxy to be used when loading the resource.\n * @property {Resource.RetryCallback} [retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.\n * @property {number} [retryAttempts=0] The number of times the retryCallback should be called before giving up.\n * @property {Request} [request] A Request object that will be used. Intended for internal use only.\n * @property {boolean} [parseUrl=true] If true, parse the url for query parameters; otherwise store the url without change\n */\n\n/**\n * A resource that includes the location and any other parameters we need to retrieve it or create derived resources. It also provides the ability to retry requests.\n *\n * @alias Resource\n * @constructor\n *\n * @param {string|Resource.ConstructorOptions} options A url or an object describing initialization options\n *\n * @example\n * function refreshTokenRetryCallback(resource, error) {\n * if (error.statusCode === 403) {\n * // 403 status code means a new token should be generated\n * return getNewAccessToken()\n * .then(function(token) {\n * resource.queryParameters.access_token = token;\n * return true;\n * })\n * .catch(function() {\n * return false;\n * });\n * }\n *\n * return false;\n * }\n *\n * const resource = new Resource({\n * url: 'http://server.com/path/to/resource.json',\n * proxy: new DefaultProxy('/proxy/'),\n * headers: {\n * 'X-My-Header': 'valueOfHeader'\n * },\n * queryParameters: {\n * 'access_token': '123-435-456-000'\n * },\n * retryCallback: refreshTokenRetryCallback,\n * retryAttempts: 1\n * });\n */\nfunction Resource(options) {\n options = defaultValue(options, defaultValue.EMPTY_OBJECT);\n if (typeof options === \"string\") {\n options = {\n url: options,\n };\n }\n\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.string(\"options.url\", options.url);\n //>>includeEnd('debug');\n\n this._url = undefined;\n this._templateValues = defaultClone(options.templateValues, {});\n this._queryParameters = defaultClone(options.queryParameters, {});\n\n /**\n * Additional HTTP headers that will be sent with the request.\n *\n * @type {object}\n */\n this.headers = defaultClone(options.headers, {});\n\n /**\n * A Request object that will be used. Intended for internal use only.\n *\n * @type {Request}\n */\n this.request = defaultValue(options.request, new Request());\n\n /**\n * A proxy to be used when loading the resource.\n *\n * @type {Proxy}\n */\n this.proxy = options.proxy;\n\n /**\n * Function to call when a request for this resource fails. If it returns true or a Promise that resolves to true, the request will be retried.\n *\n * @type {Function}\n */\n this.retryCallback = options.retryCallback;\n\n /**\n * The number of times the retryCallback should be called before giving up.\n *\n * @type {number}\n */\n this.retryAttempts = defaultValue(options.retryAttempts, 0);\n this._retryCount = 0;\n\n const parseUrl = defaultValue(options.parseUrl, true);\n if (parseUrl) {\n this.parseUrl(options.url, true, true);\n } else {\n this._url = options.url;\n }\n\n this._credits = options.credits;\n}\n\n/**\n * Clones a value if it is defined, otherwise returns the default value\n *\n * @param {object} [value] The value to clone.\n * @param {object} [defaultValue] The default value.\n *\n * @returns {object} A clone of value or the defaultValue.\n *\n * @private\n */\nfunction defaultClone(value, defaultValue) {\n return defined(value) ? clone(value) : defaultValue;\n}\n\n/**\n * A helper function to create a resource depending on whether we have a String or a Resource\n *\n * @param {Resource|string} resource A Resource or a String to use when creating a new Resource.\n *\n * @returns {Resource} If resource is a String, a Resource constructed with the url and options. Otherwise the resource parameter is returned.\n *\n * @private\n */\nResource.createIfNeeded = function (resource) {\n if (resource instanceof Resource) {\n // Keep existing request object. This function is used internally to duplicate a Resource, so that it can't\n // be modified outside of a class that holds it (eg. an imagery or terrain provider). Since the Request objects\n // are managed outside of the providers, by the tile loading code, we want to keep the request property the same so if it is changed\n // in the underlying tiling code the requests for this resource will use it.\n return resource.getDerivedResource({\n request: resource.request,\n });\n }\n\n if (typeof resource !== \"string\") {\n return resource;\n }\n\n return new Resource({\n url: resource,\n });\n};\n\nlet supportsImageBitmapOptionsPromise;\n/**\n * A helper function to check whether createImageBitmap supports passing ImageBitmapOptions.\n *\n * @returns {Promise} A promise that resolves to true if this browser supports creating an ImageBitmap with options.\n *\n * @private\n */\nResource.supportsImageBitmapOptions = function () {\n // Until the HTML folks figure out what to do about this, we need to actually try loading an image to\n // know if this browser supports passing options to the createImageBitmap function.\n // https://github.com/whatwg/html/pull/4248\n //\n // We also need to check whether the colorSpaceConversion option is supported.\n // We do this by loading a PNG with an embedded color profile, first with\n // colorSpaceConversion: \"none\" and then with colorSpaceConversion: \"default\".\n // If the pixel color is different then we know the option is working.\n // As of Webkit 17612.3.6.1.6 the createImageBitmap promise resolves but the\n // option is not actually supported.\n if (defined(supportsImageBitmapOptionsPromise)) {\n return supportsImageBitmapOptionsPromise;\n }\n\n if (typeof createImageBitmap !== \"function\") {\n supportsImageBitmapOptionsPromise = Promise.resolve(false);\n return supportsImageBitmapOptionsPromise;\n }\n\n const imageDataUri =\n \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAABGdBTUEAAE4g3rEiDgAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADElEQVQI12Ng6GAAAAEUAIngE3ZiAAAAAElFTkSuQmCC\";\n\n supportsImageBitmapOptionsPromise = Resource.fetchBlob({\n url: imageDataUri,\n })\n .then(function (blob) {\n const imageBitmapOptions = {\n imageOrientation: \"flipY\", // default is \"none\"\n premultiplyAlpha: \"none\", // default is \"default\"\n colorSpaceConversion: \"none\", // default is \"default\"\n };\n return Promise.all([\n createImageBitmap(blob, imageBitmapOptions),\n createImageBitmap(blob),\n ]);\n })\n .then(function (imageBitmaps) {\n // Check whether the colorSpaceConversion option had any effect on the green channel\n const colorWithOptions = getImagePixels(imageBitmaps[0]);\n const colorWithDefaults = getImagePixels(imageBitmaps[1]);\n return colorWithOptions[1] !== colorWithDefaults[1];\n })\n .catch(function () {\n return false;\n });\n\n return supportsImageBitmapOptionsPromise;\n};\n\nObject.defineProperties(Resource, {\n /**\n * Returns true if blobs are supported.\n *\n * @memberof Resource\n * @type {boolean}\n *\n * @readonly\n */\n isBlobSupported: {\n get: function () {\n return xhrBlobSupported;\n },\n },\n});\n\nObject.defineProperties(Resource.prototype, {\n /**\n * Query parameters appended to the url.\n *\n * @memberof Resource.prototype\n * @type {object}\n *\n * @readonly\n */\n queryParameters: {\n get: function () {\n return this._queryParameters;\n },\n },\n\n /**\n * The key/value pairs used to replace template parameters in the url.\n *\n * @memberof Resource.prototype\n * @type {object}\n *\n * @readonly\n */\n templateValues: {\n get: function () {\n return this._templateValues;\n },\n },\n\n /**\n * The url to the resource with template values replaced, query string appended and encoded by proxy if one was set.\n *\n * @memberof Resource.prototype\n * @type {string}\n */\n url: {\n get: function () {\n return this.getUrlComponent(true, true);\n },\n set: function (value) {\n this.parseUrl(value, false, false);\n },\n },\n\n /**\n * The file extension of the resource.\n *\n * @memberof Resource.prototype\n * @type {string}\n *\n * @readonly\n */\n extension: {\n get: function () {\n return getExtensionFromUri(this._url);\n },\n },\n\n /**\n * True if the Resource refers to a data URI.\n *\n * @memberof Resource.prototype\n * @type {boolean}\n */\n isDataUri: {\n get: function () {\n return isDataUri(this._url);\n },\n },\n\n /**\n * True if the Resource refers to a blob URI.\n *\n * @memberof Resource.prototype\n * @type {boolean}\n */\n isBlobUri: {\n get: function () {\n return isBlobUri(this._url);\n },\n },\n\n /**\n * True if the Resource refers to a cross origin URL.\n *\n * @memberof Resource.prototype\n * @type {boolean}\n */\n isCrossOriginUrl: {\n get: function () {\n return isCrossOriginUrl(this._url);\n },\n },\n\n /**\n * True if the Resource has request headers. This is equivalent to checking if the headers property has any keys.\n *\n * @memberof Resource.prototype\n * @type {boolean}\n */\n hasHeaders: {\n get: function () {\n return Object.keys(this.headers).length > 0;\n },\n },\n\n /**\n * Gets the credits required for attribution of an asset.\n * @private\n */\n credits: {\n get: function () {\n return this._credits;\n },\n },\n});\n\n/**\n * Override Object#toString so that implicit string conversion gives the\n * complete URL represented by this Resource.\n *\n * @returns {string} The URL represented by this Resource\n */\nResource.prototype.toString = function () {\n return this.getUrlComponent(true, true);\n};\n\n/**\n * Parse a url string, and store its info\n *\n * @param {string} url The input url string.\n * @param {boolean} merge If true, we'll merge with the resource's existing queryParameters. Otherwise they will be replaced.\n * @param {boolean} preserveQuery If true duplicate parameters will be concatenated into an array. If false, keys in url will take precedence.\n * @param {string} [baseUrl] If supplied, and input url is a relative url, it will be made absolute relative to baseUrl\n *\n * @private\n */\nResource.prototype.parseUrl = function (url, merge, preserveQuery, baseUrl) {\n let uri = new Uri(url);\n const query = parseQueryString(uri.query());\n\n this._queryParameters = merge\n ? combineQueryParameters(query, this.queryParameters, preserveQuery)\n : query;\n\n // Remove unneeded info from the Uri\n uri.search(\"\");\n uri.fragment(\"\");\n\n if (defined(baseUrl) && uri.scheme() === \"\") {\n uri = uri.absoluteTo(getAbsoluteUri(baseUrl));\n }\n\n this._url = uri.toString();\n};\n\n/**\n * Parses a query string and returns the object equivalent.\n *\n * @param {string} queryString The query string\n * @returns {object}\n *\n * @private\n */\nfunction parseQueryString(queryString) {\n if (queryString.length === 0) {\n return {};\n }\n\n // Special case where the querystring is just a string, not key/value pairs\n if (queryString.indexOf(\"=\") === -1) {\n return { [queryString]: undefined };\n }\n\n return queryToObject(queryString);\n}\n\n/**\n * This combines a map of query parameters.\n *\n * @param {object} q1 The first map of query parameters. Values in this map will take precedence if preserveQueryParameters is false.\n * @param {object} q2 The second map of query parameters.\n * @param {boolean} preserveQueryParameters If true duplicate parameters will be concatenated into an array. If false, keys in q1 will take precedence.\n *\n * @returns {object} The combined map of query parameters.\n *\n * @example\n * const q1 = {\n * a: 1,\n * b: 2\n * };\n * const q2 = {\n * a: 3,\n * c: 4\n * };\n * const q3 = {\n * b: [5, 6],\n * d: 7\n * }\n *\n * // Returns\n * // {\n * // a: [1, 3],\n * // b: 2,\n * // c: 4\n * // };\n * combineQueryParameters(q1, q2, true);\n *\n * // Returns\n * // {\n * // a: 1,\n * // b: 2,\n * // c: 4\n * // };\n * combineQueryParameters(q1, q2, false);\n *\n * // Returns\n * // {\n * // a: 1,\n * // b: [2, 5, 6],\n * // d: 7\n * // };\n * combineQueryParameters(q1, q3, true);\n *\n * // Returns\n * // {\n * // a: 1,\n * // b: 2,\n * // d: 7\n * // };\n * combineQueryParameters(q1, q3, false);\n *\n * @private\n */\nfunction combineQueryParameters(q1, q2, preserveQueryParameters) {\n if (!preserveQueryParameters) {\n return combine(q1, q2);\n }\n\n const result = clone(q1, true);\n for (const param in q2) {\n if (q2.hasOwnProperty(param)) {\n let value = result[param];\n const q2Value = q2[param];\n if (defined(value)) {\n if (!Array.isArray(value)) {\n value = result[param] = [value];\n }\n\n result[param] = value.concat(q2Value);\n } else {\n result[param] = Array.isArray(q2Value) ? q2Value.slice() : q2Value;\n }\n }\n }\n\n return result;\n}\n\n/**\n * Returns the url, optional with the query string and processed by a proxy.\n *\n * @param {boolean} [query=false] If true, the query string is included.\n * @param {boolean} [proxy=false] If true, the url is processed by the proxy object, if defined.\n *\n * @returns {string} The url with all the requested components.\n */\nResource.prototype.getUrlComponent = function (query, proxy) {\n if (this.isDataUri) {\n return this._url;\n }\n\n let url = this._url;\n if (query) {\n url = `${url}${stringifyQuery(this.queryParameters)}`;\n }\n\n // Restore the placeholders, which may have been escaped in objectToQuery or elsewhere\n url = url.replace(/%7B/g, \"{\").replace(/%7D/g, \"}\");\n\n const templateValues = this._templateValues;\n if (Object.keys(templateValues).length > 0) {\n url = url.replace(/{(.*?)}/g, function (match, key) {\n const replacement = templateValues[key];\n if (defined(replacement)) {\n // use the replacement value from templateValues if there is one...\n return encodeURIComponent(replacement);\n }\n // otherwise leave it unchanged\n return match;\n });\n }\n\n if (proxy && defined(this.proxy)) {\n url = this.proxy.getURL(url);\n }\n\n return url;\n};\n\n/**\n * Converts a query object into a string.\n *\n * @param {object} queryObject The object with query parameters\n * @returns {string}\n *\n * @private\n */\nfunction stringifyQuery(queryObject) {\n const keys = Object.keys(queryObject);\n\n if (keys.length === 0) {\n return \"\";\n }\n if (keys.length === 1 && !defined(queryObject[keys[0]])) {\n // We have 1 key with an undefined value, so this is just a string, not key/value pairs\n return `?${keys[0]}`;\n }\n\n return `?${objectToQuery(queryObject)}`;\n}\n\n/**\n * Combines the specified object and the existing query parameters. This allows you to add many parameters at once,\n * as opposed to adding them one at a time to the queryParameters property. If a value is already set, it will be replaced with the new value.\n *\n * @param {object} params The query parameters\n * @param {boolean} [useAsDefault=false] If true the params will be used as the default values, so they will only be set if they are undefined.\n */\nResource.prototype.setQueryParameters = function (params, useAsDefault) {\n if (useAsDefault) {\n this._queryParameters = combineQueryParameters(\n this._queryParameters,\n params,\n false,\n );\n } else {\n this._queryParameters = combineQueryParameters(\n params,\n this._queryParameters,\n false,\n );\n }\n};\n\n/**\n * Combines the specified object and the existing query parameters. This allows you to add many parameters at once,\n * as opposed to adding them one at a time to the queryParameters property.\n *\n * @param {object} params The query parameters\n */\nResource.prototype.appendQueryParameters = function (params) {\n this._queryParameters = combineQueryParameters(\n params,\n this._queryParameters,\n true,\n );\n};\n\n/**\n * Combines the specified object and the existing template values. This allows you to add many values at once,\n * as opposed to adding them one at a time to the templateValues property. If a value is already set, it will become an array and the new value will be appended.\n *\n * @param {object} template The template values\n * @param {boolean} [useAsDefault=false] If true the values will be used as the default values, so they will only be set if they are undefined.\n */\nResource.prototype.setTemplateValues = function (template, useAsDefault) {\n if (useAsDefault) {\n this._templateValues = combine(this._templateValues, template);\n } else {\n this._templateValues = combine(template, this._templateValues);\n }\n};\n\n/**\n * Returns a resource relative to the current instance. All properties remain the same as the current instance unless overridden in options.\n *\n * @param {object} options An object with the following properties\n * @param {string} [options.url] The url that will be resolved relative to the url of the current instance.\n * @param {object} [options.queryParameters] An object containing query parameters that will be combined with those of the current instance.\n * @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}). These will be combined with those of the current instance.\n * @param {object} [options.headers={}] Additional HTTP headers that will be sent.\n * @param {Proxy} [options.proxy] A proxy to be used when loading the resource.\n * @param {Resource.RetryCallback} [options.retryCallback] The function to call when loading the resource fails.\n * @param {number} [options.retryAttempts] The number of times the retryCallback should be called before giving up.\n * @param {Request} [options.request] A Request object that will be used. Intended for internal use only.\n * @param {boolean} [options.preserveQueryParameters=false] If true, this will keep all query parameters from the current resource and derived resource. If false, derived parameters will replace those of the current resource.\n *\n * @returns {Resource} The resource derived from the current one.\n */\nResource.prototype.getDerivedResource = function (options) {\n const resource = this.clone();\n resource._retryCount = 0;\n\n if (defined(options.url)) {\n const preserveQuery = defaultValue(options.preserveQueryParameters, false);\n resource.parseUrl(options.url, true, preserveQuery, this._url);\n }\n\n if (defined(options.queryParameters)) {\n resource._queryParameters = combine(\n options.queryParameters,\n resource.queryParameters,\n );\n }\n if (defined(options.templateValues)) {\n resource._templateValues = combine(\n options.templateValues,\n resource.templateValues,\n );\n }\n if (defined(options.headers)) {\n resource.headers = combine(options.headers, resource.headers);\n }\n if (defined(options.proxy)) {\n resource.proxy = options.proxy;\n }\n if (defined(options.request)) {\n resource.request = options.request;\n }\n if (defined(options.retryCallback)) {\n resource.retryCallback = options.retryCallback;\n }\n if (defined(options.retryAttempts)) {\n resource.retryAttempts = options.retryAttempts;\n }\n\n return resource;\n};\n\n/**\n * Called when a resource fails to load. This will call the retryCallback function if defined until retryAttempts is reached.\n *\n * @param {RequestErrorEvent} [error] The error that was encountered.\n *\n * @returns {Promise} A promise to a boolean, that if true will cause the resource request to be retried.\n *\n * @private\n */\nResource.prototype.retryOnError = function (error) {\n const retryCallback = this.retryCallback;\n if (\n typeof retryCallback !== \"function\" ||\n this._retryCount >= this.retryAttempts\n ) {\n return Promise.resolve(false);\n }\n\n const that = this;\n return Promise.resolve(retryCallback(this, error)).then(function (result) {\n ++that._retryCount;\n\n return result;\n });\n};\n\n/**\n * Duplicates a Resource instance.\n *\n * @param {Resource} [result] The object onto which to store the result.\n *\n * @returns {Resource} The modified result parameter or a new Resource instance if one was not provided.\n */\nResource.prototype.clone = function (result) {\n if (!defined(result)) {\n return new Resource({\n url: this._url,\n queryParameters: this.queryParameters,\n templateValues: this.templateValues,\n headers: this.headers,\n proxy: this.proxy,\n retryCallback: this.retryCallback,\n retryAttempts: this.retryAttempts,\n request: this.request.clone(),\n parseUrl: false,\n credits: defined(this.credits) ? this.credits.slice() : undefined,\n });\n }\n\n result._url = this._url;\n result._queryParameters = clone(this._queryParameters);\n result._templateValues = clone(this._templateValues);\n result.headers = clone(this.headers);\n result.proxy = this.proxy;\n result.retryCallback = this.retryCallback;\n result.retryAttempts = this.retryAttempts;\n result._retryCount = 0;\n result.request = this.request.clone();\n\n return result;\n};\n\n/**\n * Returns the base path of the Resource.\n *\n * @param {boolean} [includeQuery = false] Whether or not to include the query string and fragment form the uri\n *\n * @returns {string} The base URI of the resource\n */\nResource.prototype.getBaseUri = function (includeQuery) {\n return getBaseUri(this.getUrlComponent(includeQuery), includeQuery);\n};\n\n/**\n * Appends a forward slash to the URL.\n */\nResource.prototype.appendForwardSlash = function () {\n this._url = appendForwardSlash(this._url);\n};\n\n/**\n * Asynchronously loads the resource as raw binary data. Returns a promise that will resolve to\n * an ArrayBuffer once loaded, or reject if the resource failed to load. The data is loaded\n * using XMLHttpRequest, which means that in order to make requests to another origin,\n * the server must have Cross-Origin Resource Sharing (CORS) headers enabled.\n *\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n *\n * @example\n * // load a single URL asynchronously\n * resource.fetchArrayBuffer().then(function(arrayBuffer) {\n * // use the data\n * }).catch(function(error) {\n * // an error occurred\n * });\n *\n * @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}\n * @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}\n */\nResource.prototype.fetchArrayBuffer = function () {\n return this.fetch({\n responseType: \"arraybuffer\",\n });\n};\n\n/**\n * Creates a Resource and calls fetchArrayBuffer() on it.\n *\n * @param {string|object} options A url or an object with the following properties\n * @param {string} options.url The url of the resource.\n * @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.\n * @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).\n * @param {object} [options.headers={}] Additional HTTP headers that will be sent.\n * @param {Proxy} [options.proxy] A proxy to be used when loading the resource.\n * @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.\n * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.\n * @param {Request} [options.request] A Request object that will be used. Intended for internal use only.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n */\nResource.fetchArrayBuffer = function (options) {\n const resource = new Resource(options);\n return resource.fetchArrayBuffer();\n};\n\n/**\n * Asynchronously loads the given resource as a blob. Returns a promise that will resolve to\n * a Blob once loaded, or reject if the resource failed to load. The data is loaded\n * using XMLHttpRequest, which means that in order to make requests to another origin,\n * the server must have Cross-Origin Resource Sharing (CORS) headers enabled.\n *\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n *\n * @example\n * // load a single URL asynchronously\n * resource.fetchBlob().then(function(blob) {\n * // use the data\n * }).catch(function(error) {\n * // an error occurred\n * });\n *\n * @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}\n * @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}\n */\nResource.prototype.fetchBlob = function () {\n return this.fetch({\n responseType: \"blob\",\n });\n};\n\n/**\n * Creates a Resource and calls fetchBlob() on it.\n *\n * @param {string|object} options A url or an object with the following properties\n * @param {string} options.url The url of the resource.\n * @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.\n * @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).\n * @param {object} [options.headers={}] Additional HTTP headers that will be sent.\n * @param {Proxy} [options.proxy] A proxy to be used when loading the resource.\n * @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.\n * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.\n * @param {Request} [options.request] A Request object that will be used. Intended for internal use only.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n */\nResource.fetchBlob = function (options) {\n const resource = new Resource(options);\n return resource.fetchBlob();\n};\n\n/**\n * Asynchronously loads the given image resource. Returns a promise that will resolve to\n * an {@link https://developer.mozilla.org/en-US/docs/Web/API/ImageBitmap|ImageBitmap} if preferImageBitmap is true and the browser supports createImageBitmap or otherwise an\n * {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement|Image} once loaded, or reject if the image failed to load.\n *\n * @param {object} [options] An object with the following properties.\n * @param {boolean} [options.preferBlob=false] If true, we will load the image via a blob.\n * @param {boolean} [options.preferImageBitmap=false] If true, image will be decoded during fetch and an ImageBitmap is returned.\n * @param {boolean} [options.flipY=false] If true, image will be vertically flipped during decode. Only applies if the browser supports createImageBitmap.\n * @param {boolean} [options.skipColorSpaceConversion=false] If true, any custom gamma or color profiles in the image will be ignored. Only applies if the browser supports createImageBitmap.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n *\n *\n * @example\n * // load a single image asynchronously\n * resource.fetchImage().then(function(image) {\n * // use the loaded image\n * }).catch(function(error) {\n * // an error occurred\n * });\n *\n * // load several images in parallel\n * Promise.all([resource1.fetchImage(), resource2.fetchImage()]).then(function(images) {\n * // images is an array containing all the loaded images\n * });\n *\n * @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}\n * @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}\n */\nResource.prototype.fetchImage = function (options) {\n options = defaultValue(options, defaultValue.EMPTY_OBJECT);\n const preferImageBitmap = defaultValue(options.preferImageBitmap, false);\n const preferBlob = defaultValue(options.preferBlob, false);\n const flipY = defaultValue(options.flipY, false);\n const skipColorSpaceConversion = defaultValue(\n options.skipColorSpaceConversion,\n false,\n );\n\n checkAndResetRequest(this.request);\n // We try to load the image normally if\n // 1. Blobs aren't supported\n // 2. It's a data URI\n // 3. It's a blob URI\n // 4. It doesn't have request headers and we preferBlob is false\n if (\n !xhrBlobSupported ||\n this.isDataUri ||\n this.isBlobUri ||\n (!this.hasHeaders && !preferBlob)\n ) {\n return fetchImage({\n resource: this,\n flipY: flipY,\n skipColorSpaceConversion: skipColorSpaceConversion,\n preferImageBitmap: preferImageBitmap,\n });\n }\n\n const blobPromise = this.fetchBlob();\n if (!defined(blobPromise)) {\n return;\n }\n\n let supportsImageBitmap;\n let useImageBitmap;\n let generatedBlobResource;\n let generatedBlob;\n return Resource.supportsImageBitmapOptions()\n .then(function (result) {\n supportsImageBitmap = result;\n useImageBitmap = supportsImageBitmap && preferImageBitmap;\n return blobPromise;\n })\n .then(function (blob) {\n if (!defined(blob)) {\n return;\n }\n generatedBlob = blob;\n if (useImageBitmap) {\n return Resource.createImageBitmapFromBlob(blob, {\n flipY: flipY,\n premultiplyAlpha: false,\n skipColorSpaceConversion: skipColorSpaceConversion,\n });\n }\n const blobUrl = window.URL.createObjectURL(blob);\n generatedBlobResource = new Resource({\n url: blobUrl,\n });\n\n return fetchImage({\n resource: generatedBlobResource,\n flipY: flipY,\n skipColorSpaceConversion: skipColorSpaceConversion,\n preferImageBitmap: false,\n });\n })\n .then(function (image) {\n if (!defined(image)) {\n return;\n }\n\n // The blob object may be needed for use by a TileDiscardPolicy,\n // so attach it to the image.\n image.blob = generatedBlob;\n\n if (useImageBitmap) {\n return image;\n }\n\n window.URL.revokeObjectURL(generatedBlobResource.url);\n return image;\n })\n .catch(function (error) {\n if (defined(generatedBlobResource)) {\n window.URL.revokeObjectURL(generatedBlobResource.url);\n }\n\n // If the blob load succeeded but the image decode failed, attach the blob\n // to the error object for use by a TileDiscardPolicy.\n // In particular, BingMapsImageryProvider uses this to detect the\n // zero-length response that is returned when a tile is not available.\n error.blob = generatedBlob;\n\n return Promise.reject(error);\n });\n};\n\n/**\n * Fetches an image and returns a promise to it.\n *\n * @param {object} [options] An object with the following properties.\n * @param {Resource} [options.resource] Resource object that points to an image to fetch.\n * @param {boolean} [options.preferImageBitmap] If true, image will be decoded during fetch and an ImageBitmap is returned.\n * @param {boolean} [options.flipY] If true, image will be vertically flipped during decode. Only applies if the browser supports createImageBitmap.\n * @param {boolean} [options.skipColorSpaceConversion=false] If true, any custom gamma or color profiles in the image will be ignored. Only applies if the browser supports createImageBitmap.\n * @private\n */\nfunction fetchImage(options) {\n const resource = options.resource;\n const flipY = options.flipY;\n const skipColorSpaceConversion = options.skipColorSpaceConversion;\n const preferImageBitmap = options.preferImageBitmap;\n\n const request = resource.request;\n request.url = resource.url;\n request.requestFunction = function () {\n let crossOrigin = false;\n\n // data URIs can't have crossorigin set.\n if (!resource.isDataUri && !resource.isBlobUri) {\n crossOrigin = resource.isCrossOriginUrl;\n }\n\n const deferred = defer();\n Resource._Implementations.createImage(\n request,\n crossOrigin,\n deferred,\n flipY,\n skipColorSpaceConversion,\n preferImageBitmap,\n );\n\n return deferred.promise;\n };\n\n const promise = RequestScheduler.request(request);\n if (!defined(promise)) {\n return;\n }\n\n return promise.catch(function (e) {\n // Don't retry cancelled or otherwise aborted requests\n if (request.state !== RequestState.FAILED) {\n return Promise.reject(e);\n }\n return resource.retryOnError(e).then(function (retry) {\n if (retry) {\n // Reset request so it can try again\n request.state = RequestState.UNISSUED;\n request.deferred = undefined;\n\n return fetchImage({\n resource: resource,\n flipY: flipY,\n skipColorSpaceConversion: skipColorSpaceConversion,\n preferImageBitmap: preferImageBitmap,\n });\n }\n return Promise.reject(e);\n });\n });\n}\n\n/**\n * Creates a Resource and calls fetchImage() on it.\n *\n * @param {string|object} options A url or an object with the following properties\n * @param {string} options.url The url of the resource.\n * @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.\n * @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).\n * @param {object} [options.headers={}] Additional HTTP headers that will be sent.\n * @param {Proxy} [options.proxy] A proxy to be used when loading the resource.\n * @param {boolean} [options.flipY=false] Whether to vertically flip the image during fetch and decode. Only applies when requesting an image and the browser supports createImageBitmap.\n * @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.\n * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.\n * @param {Request} [options.request] A Request object that will be used. Intended for internal use only.\n * @param {boolean} [options.preferBlob=false] If true, we will load the image via a blob.\n * @param {boolean} [options.preferImageBitmap=false] If true, image will be decoded during fetch and an ImageBitmap is returned.\n * @param {boolean} [options.skipColorSpaceConversion=false] If true, any custom gamma or color profiles in the image will be ignored. Only applies when requesting an image and the browser supports createImageBitmap.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n */\nResource.fetchImage = function (options) {\n const resource = new Resource(options);\n return resource.fetchImage({\n flipY: options.flipY,\n skipColorSpaceConversion: options.skipColorSpaceConversion,\n preferBlob: options.preferBlob,\n preferImageBitmap: options.preferImageBitmap,\n });\n};\n\n/**\n * Asynchronously loads the given resource as text. Returns a promise that will resolve to\n * a String once loaded, or reject if the resource failed to load. The data is loaded\n * using XMLHttpRequest, which means that in order to make requests to another origin,\n * the server must have Cross-Origin Resource Sharing (CORS) headers enabled.\n *\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n *\n * @example\n * // load text from a URL, setting a custom header\n * const resource = new Resource({\n * url: 'http://someUrl.com/someJson.txt',\n * headers: {\n * 'X-Custom-Header' : 'some value'\n * }\n * });\n * resource.fetchText().then(function(text) {\n * // Do something with the text\n * }).catch(function(error) {\n * // an error occurred\n * });\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest|XMLHttpRequest}\n * @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}\n * @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}\n */\nResource.prototype.fetchText = function () {\n return this.fetch({\n responseType: \"text\",\n });\n};\n\n/**\n * Creates a Resource and calls fetchText() on it.\n *\n * @param {string|object} options A url or an object with the following properties\n * @param {string} options.url The url of the resource.\n * @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.\n * @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).\n * @param {object} [options.headers={}] Additional HTTP headers that will be sent.\n * @param {Proxy} [options.proxy] A proxy to be used when loading the resource.\n * @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.\n * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.\n * @param {Request} [options.request] A Request object that will be used. Intended for internal use only.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n */\nResource.fetchText = function (options) {\n const resource = new Resource(options);\n return resource.fetchText();\n};\n\n// note: */* below is */* but that ends the comment block early\n/**\n * Asynchronously loads the given resource as JSON. Returns a promise that will resolve to\n * a JSON object once loaded, or reject if the resource failed to load. The data is loaded\n * using XMLHttpRequest, which means that in order to make requests to another origin,\n * the server must have Cross-Origin Resource Sharing (CORS) headers enabled. This function\n * adds 'Accept: application/json,*/*;q=0.01' to the request headers, if not\n * already specified.\n *\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n *\n *\n * @example\n * resource.fetchJson().then(function(jsonData) {\n * // Do something with the JSON object\n * }).catch(function(error) {\n * // an error occurred\n * });\n *\n * @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}\n * @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}\n */\nResource.prototype.fetchJson = function () {\n const promise = this.fetch({\n responseType: \"text\",\n headers: {\n Accept: \"application/json,*/*;q=0.01\",\n },\n });\n\n if (!defined(promise)) {\n return undefined;\n }\n\n return promise.then(function (value) {\n if (!defined(value)) {\n return;\n }\n return JSON.parse(value);\n });\n};\n\n/**\n * Creates a Resource and calls fetchJson() on it.\n *\n * @param {string|object} options A url or an object with the following properties\n * @param {string} options.url The url of the resource.\n * @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.\n * @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).\n * @param {object} [options.headers={}] Additional HTTP headers that will be sent.\n * @param {Proxy} [options.proxy] A proxy to be used when loading the resource.\n * @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.\n * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.\n * @param {Request} [options.request] A Request object that will be used. Intended for internal use only.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n */\nResource.fetchJson = function (options) {\n const resource = new Resource(options);\n return resource.fetchJson();\n};\n\n/**\n * Asynchronously loads the given resource as XML. Returns a promise that will resolve to\n * an XML Document once loaded, or reject if the resource failed to load. The data is loaded\n * using XMLHttpRequest, which means that in order to make requests to another origin,\n * the server must have Cross-Origin Resource Sharing (CORS) headers enabled.\n *\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n *\n *\n * @example\n * // load XML from a URL, setting a custom header\n * Cesium.loadXML('http://someUrl.com/someXML.xml', {\n * 'X-Custom-Header' : 'some value'\n * }).then(function(document) {\n * // Do something with the document\n * }).catch(function(error) {\n * // an error occurred\n * });\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest|XMLHttpRequest}\n * @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}\n * @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}\n */\nResource.prototype.fetchXML = function () {\n return this.fetch({\n responseType: \"document\",\n overrideMimeType: \"text/xml\",\n });\n};\n\n/**\n * Creates a Resource and calls fetchXML() on it.\n *\n * @param {string|object} options A url or an object with the following properties\n * @param {string} options.url The url of the resource.\n * @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.\n * @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).\n * @param {object} [options.headers={}] Additional HTTP headers that will be sent.\n * @param {Proxy} [options.proxy] A proxy to be used when loading the resource.\n * @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.\n * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.\n * @param {Request} [options.request] A Request object that will be used. Intended for internal use only.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n */\nResource.fetchXML = function (options) {\n const resource = new Resource(options);\n return resource.fetchXML();\n};\n\n/**\n * Requests a resource using JSONP.\n *\n * @param {string} [callbackParameterName='callback'] The callback parameter name that the server expects.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n *\n *\n * @example\n * // load a data asynchronously\n * resource.fetchJsonp().then(function(data) {\n * // use the loaded data\n * }).catch(function(error) {\n * // an error occurred\n * });\n *\n * @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}\n */\nResource.prototype.fetchJsonp = function (callbackParameterName) {\n callbackParameterName = defaultValue(callbackParameterName, \"callback\");\n\n checkAndResetRequest(this.request);\n\n //generate a unique function name\n let functionName;\n do {\n functionName = `loadJsonp${CesiumMath.nextRandomNumber()\n .toString()\n .substring(2, 8)}`;\n } while (defined(window[functionName]));\n\n return fetchJsonp(this, callbackParameterName, functionName);\n};\n\nfunction fetchJsonp(resource, callbackParameterName, functionName) {\n const callbackQuery = {};\n callbackQuery[callbackParameterName] = functionName;\n resource.setQueryParameters(callbackQuery);\n\n const request = resource.request;\n const url = resource.url;\n request.url = url;\n request.requestFunction = function () {\n const deferred = defer();\n\n //assign a function with that name in the global scope\n window[functionName] = function (data) {\n deferred.resolve(data);\n\n try {\n delete window[functionName];\n } catch (e) {\n window[functionName] = undefined;\n }\n };\n\n Resource._Implementations.loadAndExecuteScript(url, functionName, deferred);\n return deferred.promise;\n };\n\n const promise = RequestScheduler.request(request);\n if (!defined(promise)) {\n return;\n }\n\n return promise.catch(function (e) {\n if (request.state !== RequestState.FAILED) {\n return Promise.reject(e);\n }\n\n return resource.retryOnError(e).then(function (retry) {\n if (retry) {\n // Reset request so it can try again\n request.state = RequestState.UNISSUED;\n request.deferred = undefined;\n\n return fetchJsonp(resource, callbackParameterName, functionName);\n }\n\n return Promise.reject(e);\n });\n });\n}\n\n/**\n * Creates a Resource from a URL and calls fetchJsonp() on it.\n *\n * @param {string|object} options A url or an object with the following properties\n * @param {string} options.url The url of the resource.\n * @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.\n * @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).\n * @param {object} [options.headers={}] Additional HTTP headers that will be sent.\n * @param {Proxy} [options.proxy] A proxy to be used when loading the resource.\n * @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.\n * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.\n * @param {Request} [options.request] A Request object that will be used. Intended for internal use only.\n * @param {string} [options.callbackParameterName='callback'] The callback parameter name that the server expects.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n */\nResource.fetchJsonp = function (options) {\n const resource = new Resource(options);\n return resource.fetchJsonp(options.callbackParameterName);\n};\n\n/**\n * @private\n */\nResource.prototype._makeRequest = function (options) {\n const resource = this;\n checkAndResetRequest(resource.request);\n\n const request = resource.request;\n const url = resource.url;\n request.url = url;\n\n request.requestFunction = function () {\n const responseType = options.responseType;\n const headers = combine(options.headers, resource.headers);\n const overrideMimeType = options.overrideMimeType;\n const method = options.method;\n const data = options.data;\n const deferred = defer();\n const xhr = Resource._Implementations.loadWithXhr(\n url,\n responseType,\n method,\n data,\n headers,\n deferred,\n overrideMimeType,\n );\n if (defined(xhr) && defined(xhr.abort)) {\n request.cancelFunction = function () {\n xhr.abort();\n };\n }\n return deferred.promise;\n };\n\n const promise = RequestScheduler.request(request);\n if (!defined(promise)) {\n return;\n }\n\n return promise\n .then(function (data) {\n // explicitly set to undefined to ensure GC of request response data. See #8843\n request.cancelFunction = undefined;\n return data;\n })\n .catch(function (e) {\n request.cancelFunction = undefined;\n if (request.state !== RequestState.FAILED) {\n return Promise.reject(e);\n }\n\n return resource.retryOnError(e).then(function (retry) {\n if (retry) {\n // Reset request so it can try again\n request.state = RequestState.UNISSUED;\n request.deferred = undefined;\n\n return resource.fetch(options);\n }\n\n return Promise.reject(e);\n });\n });\n};\n\n/**\n * Checks to make sure the Resource isn't already being requested.\n *\n * @param {Request} request The request to check.\n *\n * @private\n */\nfunction checkAndResetRequest(request) {\n if (\n request.state === RequestState.ISSUED ||\n request.state === RequestState.ACTIVE\n ) {\n throw new RuntimeError(\"The Resource is already being fetched.\");\n }\n\n request.state = RequestState.UNISSUED;\n request.deferred = undefined;\n}\n\nconst dataUriRegex = /^data:(.*?)(;base64)?,(.*)$/;\n\nfunction decodeDataUriText(isBase64, data) {\n const result = decodeURIComponent(data);\n if (isBase64) {\n return atob(result);\n }\n return result;\n}\n\nfunction decodeDataUriArrayBuffer(isBase64, data) {\n const byteString = decodeDataUriText(isBase64, data);\n const buffer = new ArrayBuffer(byteString.length);\n const view = new Uint8Array(buffer);\n for (let i = 0; i < byteString.length; i++) {\n view[i] = byteString.charCodeAt(i);\n }\n return buffer;\n}\n\nfunction decodeDataUri(dataUriRegexResult, responseType) {\n responseType = defaultValue(responseType, \"\");\n const mimeType = dataUriRegexResult[1];\n const isBase64 = !!dataUriRegexResult[2];\n const data = dataUriRegexResult[3];\n let buffer;\n let parser;\n\n switch (responseType) {\n case \"\":\n case \"text\":\n return decodeDataUriText(isBase64, data);\n case \"arraybuffer\":\n return decodeDataUriArrayBuffer(isBase64, data);\n case \"blob\":\n buffer = decodeDataUriArrayBuffer(isBase64, data);\n return new Blob([buffer], {\n type: mimeType,\n });\n case \"document\":\n parser = new DOMParser();\n return parser.parseFromString(\n decodeDataUriText(isBase64, data),\n mimeType,\n );\n case \"json\":\n return JSON.parse(decodeDataUriText(isBase64, data));\n default:\n //>>includeStart('debug', pragmas.debug);\n throw new DeveloperError(`Unhandled responseType: ${responseType}`);\n //>>includeEnd('debug');\n }\n}\n\n/**\n * Asynchronously loads the given resource. Returns a promise that will resolve to\n * the result once loaded, or reject if the resource failed to load. The data is loaded\n * using XMLHttpRequest, which means that in order to make requests to another origin,\n * the server must have Cross-Origin Resource Sharing (CORS) headers enabled. It's recommended that you use\n * the more specific functions eg. fetchJson, fetchBlob, etc.\n *\n * @param {object} [options] Object with the following properties:\n * @param {string} [options.responseType] The type of response. This controls the type of item returned.\n * @param {object} [options.headers] Additional HTTP headers to send with the request, if any.\n * @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n *\n *\n * @example\n * resource.fetch()\n * .then(function(body) {\n * // use the data\n * }).catch(function(error) {\n * // an error occurred\n * });\n *\n * @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}\n * @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}\n */\nResource.prototype.fetch = function (options) {\n options = defaultClone(options, {});\n options.method = \"GET\";\n\n return this._makeRequest(options);\n};\n\n/**\n * Creates a Resource from a URL and calls fetch() on it.\n *\n * @param {string|object} options A url or an object with the following properties\n * @param {string} options.url The url of the resource.\n * @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.\n * @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).\n * @param {object} [options.headers={}] Additional HTTP headers that will be sent.\n * @param {Proxy} [options.proxy] A proxy to be used when loading the resource.\n * @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.\n * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.\n * @param {Request} [options.request] A Request object that will be used. Intended for internal use only.\n * @param {string} [options.responseType] The type of response. This controls the type of item returned.\n * @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n */\nResource.fetch = function (options) {\n const resource = new Resource(options);\n return resource.fetch({\n // Make copy of just the needed fields because headers can be passed to both the constructor and to fetch\n responseType: options.responseType,\n overrideMimeType: options.overrideMimeType,\n });\n};\n\n/**\n * Asynchronously deletes the given resource. Returns a promise that will resolve to\n * the result once loaded, or reject if the resource failed to load. The data is loaded\n * using XMLHttpRequest, which means that in order to make requests to another origin,\n * the server must have Cross-Origin Resource Sharing (CORS) headers enabled.\n *\n * @param {object} [options] Object with the following properties:\n * @param {string} [options.responseType] The type of response. This controls the type of item returned.\n * @param {object} [options.headers] Additional HTTP headers to send with the request, if any.\n * @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n *\n *\n * @example\n * resource.delete()\n * .then(function(body) {\n * // use the data\n * }).catch(function(error) {\n * // an error occurred\n * });\n *\n * @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}\n * @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}\n */\nResource.prototype.delete = function (options) {\n options = defaultClone(options, {});\n options.method = \"DELETE\";\n\n return this._makeRequest(options);\n};\n\n/**\n * Creates a Resource from a URL and calls delete() on it.\n *\n * @param {string|object} options A url or an object with the following properties\n * @param {string} options.url The url of the resource.\n * @param {object} [options.data] Data that is posted with the resource.\n * @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.\n * @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).\n * @param {object} [options.headers={}] Additional HTTP headers that will be sent.\n * @param {Proxy} [options.proxy] A proxy to be used when loading the resource.\n * @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.\n * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.\n * @param {Request} [options.request] A Request object that will be used. Intended for internal use only.\n * @param {string} [options.responseType] The type of response. This controls the type of item returned.\n * @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n */\nResource.delete = function (options) {\n const resource = new Resource(options);\n return resource.delete({\n // Make copy of just the needed fields because headers can be passed to both the constructor and to fetch\n responseType: options.responseType,\n overrideMimeType: options.overrideMimeType,\n data: options.data,\n });\n};\n\n/**\n * Asynchronously gets headers the given resource. Returns a promise that will resolve to\n * the result once loaded, or reject if the resource failed to load. The data is loaded\n * using XMLHttpRequest, which means that in order to make requests to another origin,\n * the server must have Cross-Origin Resource Sharing (CORS) headers enabled.\n *\n * @param {object} [options] Object with the following properties:\n * @param {string} [options.responseType] The type of response. This controls the type of item returned.\n * @param {object} [options.headers] Additional HTTP headers to send with the request, if any.\n * @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n *\n *\n * @example\n * resource.head()\n * .then(function(headers) {\n * // use the data\n * }).catch(function(error) {\n * // an error occurred\n * });\n *\n * @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}\n * @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}\n */\nResource.prototype.head = function (options) {\n options = defaultClone(options, {});\n options.method = \"HEAD\";\n\n return this._makeRequest(options);\n};\n\n/**\n * Creates a Resource from a URL and calls head() on it.\n *\n * @param {string|object} options A url or an object with the following properties\n * @param {string} options.url The url of the resource.\n * @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.\n * @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).\n * @param {object} [options.headers={}] Additional HTTP headers that will be sent.\n * @param {Proxy} [options.proxy] A proxy to be used when loading the resource.\n * @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.\n * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.\n * @param {Request} [options.request] A Request object that will be used. Intended for internal use only.\n * @param {string} [options.responseType] The type of response. This controls the type of item returned.\n * @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n */\nResource.head = function (options) {\n const resource = new Resource(options);\n return resource.head({\n // Make copy of just the needed fields because headers can be passed to both the constructor and to fetch\n responseType: options.responseType,\n overrideMimeType: options.overrideMimeType,\n });\n};\n\n/**\n * Asynchronously gets options the given resource. Returns a promise that will resolve to\n * the result once loaded, or reject if the resource failed to load. The data is loaded\n * using XMLHttpRequest, which means that in order to make requests to another origin,\n * the server must have Cross-Origin Resource Sharing (CORS) headers enabled.\n *\n * @param {object} [options] Object with the following properties:\n * @param {string} [options.responseType] The type of response. This controls the type of item returned.\n * @param {object} [options.headers] Additional HTTP headers to send with the request, if any.\n * @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n *\n *\n * @example\n * resource.options()\n * .then(function(headers) {\n * // use the data\n * }).catch(function(error) {\n * // an error occurred\n * });\n *\n * @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}\n * @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}\n */\nResource.prototype.options = function (options) {\n options = defaultClone(options, {});\n options.method = \"OPTIONS\";\n\n return this._makeRequest(options);\n};\n\n/**\n * Creates a Resource from a URL and calls options() on it.\n *\n * @param {string|object} options A url or an object with the following properties\n * @param {string} options.url The url of the resource.\n * @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.\n * @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).\n * @param {object} [options.headers={}] Additional HTTP headers that will be sent.\n * @param {Proxy} [options.proxy] A proxy to be used when loading the resource.\n * @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.\n * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.\n * @param {Request} [options.request] A Request object that will be used. Intended for internal use only.\n * @param {string} [options.responseType] The type of response. This controls the type of item returned.\n * @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n */\nResource.options = function (options) {\n const resource = new Resource(options);\n return resource.options({\n // Make copy of just the needed fields because headers can be passed to both the constructor and to fetch\n responseType: options.responseType,\n overrideMimeType: options.overrideMimeType,\n });\n};\n\n/**\n * Asynchronously posts data to the given resource. Returns a promise that will resolve to\n * the result once loaded, or reject if the resource failed to load. The data is loaded\n * using XMLHttpRequest, which means that in order to make requests to another origin,\n * the server must have Cross-Origin Resource Sharing (CORS) headers enabled.\n *\n * @param {object} data Data that is posted with the resource.\n * @param {object} [options] Object with the following properties:\n * @param {object} [options.data] Data that is posted with the resource.\n * @param {string} [options.responseType] The type of response. This controls the type of item returned.\n * @param {object} [options.headers] Additional HTTP headers to send with the request, if any.\n * @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n *\n *\n * @example\n * resource.post(data)\n * .then(function(result) {\n * // use the result\n * }).catch(function(error) {\n * // an error occurred\n * });\n *\n * @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}\n * @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}\n */\nResource.prototype.post = function (data, options) {\n Check.defined(\"data\", data);\n\n options = defaultClone(options, {});\n options.method = \"POST\";\n options.data = data;\n\n return this._makeRequest(options);\n};\n\n/**\n * Creates a Resource from a URL and calls post() on it.\n *\n * @param {object} options A url or an object with the following properties\n * @param {string} options.url The url of the resource.\n * @param {object} options.data Data that is posted with the resource.\n * @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.\n * @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).\n * @param {object} [options.headers={}] Additional HTTP headers that will be sent.\n * @param {Proxy} [options.proxy] A proxy to be used when loading the resource.\n * @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.\n * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.\n * @param {Request} [options.request] A Request object that will be used. Intended for internal use only.\n * @param {string} [options.responseType] The type of response. This controls the type of item returned.\n * @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n */\nResource.post = function (options) {\n const resource = new Resource(options);\n return resource.post(options.data, {\n // Make copy of just the needed fields because headers can be passed to both the constructor and to post\n responseType: options.responseType,\n overrideMimeType: options.overrideMimeType,\n });\n};\n\n/**\n * Asynchronously puts data to the given resource. Returns a promise that will resolve to\n * the result once loaded, or reject if the resource failed to load. The data is loaded\n * using XMLHttpRequest, which means that in order to make requests to another origin,\n * the server must have Cross-Origin Resource Sharing (CORS) headers enabled.\n *\n * @param {object} data Data that is posted with the resource.\n * @param {object} [options] Object with the following properties:\n * @param {string} [options.responseType] The type of response. This controls the type of item returned.\n * @param {object} [options.headers] Additional HTTP headers to send with the request, if any.\n * @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n *\n *\n * @example\n * resource.put(data)\n * .then(function(result) {\n * // use the result\n * }).catch(function(error) {\n * // an error occurred\n * });\n *\n * @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}\n * @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}\n */\nResource.prototype.put = function (data, options) {\n Check.defined(\"data\", data);\n\n options = defaultClone(options, {});\n options.method = \"PUT\";\n options.data = data;\n\n return this._makeRequest(options);\n};\n\n/**\n * Creates a Resource from a URL and calls put() on it.\n *\n * @param {object} options A url or an object with the following properties\n * @param {string} options.url The url of the resource.\n * @param {object} options.data Data that is posted with the resource.\n * @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.\n * @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).\n * @param {object} [options.headers={}] Additional HTTP headers that will be sent.\n * @param {Proxy} [options.proxy] A proxy to be used when loading the resource.\n * @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.\n * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.\n * @param {Request} [options.request] A Request object that will be used. Intended for internal use only.\n * @param {string} [options.responseType] The type of response. This controls the type of item returned.\n * @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n */\nResource.put = function (options) {\n const resource = new Resource(options);\n return resource.put(options.data, {\n // Make copy of just the needed fields because headers can be passed to both the constructor and to post\n responseType: options.responseType,\n overrideMimeType: options.overrideMimeType,\n });\n};\n\n/**\n * Asynchronously patches data to the given resource. Returns a promise that will resolve to\n * the result once loaded, or reject if the resource failed to load. The data is loaded\n * using XMLHttpRequest, which means that in order to make requests to another origin,\n * the server must have Cross-Origin Resource Sharing (CORS) headers enabled.\n *\n * @param {object} data Data that is posted with the resource.\n * @param {object} [options] Object with the following properties:\n * @param {string} [options.responseType] The type of response. This controls the type of item returned.\n * @param {object} [options.headers] Additional HTTP headers to send with the request, if any.\n * @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n *\n *\n * @example\n * resource.patch(data)\n * .then(function(result) {\n * // use the result\n * }).catch(function(error) {\n * // an error occurred\n * });\n *\n * @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}\n * @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}\n */\nResource.prototype.patch = function (data, options) {\n Check.defined(\"data\", data);\n\n options = defaultClone(options, {});\n options.method = \"PATCH\";\n options.data = data;\n\n return this._makeRequest(options);\n};\n\n/**\n * Creates a Resource from a URL and calls patch() on it.\n *\n * @param {object} options A url or an object with the following properties\n * @param {string} options.url The url of the resource.\n * @param {object} options.data Data that is posted with the resource.\n * @param {object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.\n * @param {object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).\n * @param {object} [options.headers={}] Additional HTTP headers that will be sent.\n * @param {Proxy} [options.proxy] A proxy to be used when loading the resource.\n * @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.\n * @param {number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.\n * @param {Request} [options.request] A Request object that will be used. Intended for internal use only.\n * @param {string} [options.responseType] The type of response. This controls the type of item returned.\n * @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.\n * @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.\n */\nResource.patch = function (options) {\n const resource = new Resource(options);\n return resource.patch(options.data, {\n // Make copy of just the needed fields because headers can be passed to both the constructor and to post\n responseType: options.responseType,\n overrideMimeType: options.overrideMimeType,\n });\n};\n\n/**\n * Contains implementations of functions that can be replaced for testing\n *\n * @private\n */\nResource._Implementations = {};\n\nResource._Implementations.loadImageElement = function (\n url,\n crossOrigin,\n deferred,\n) {\n const image = new Image();\n\n image.onload = function () {\n // work-around a known issue with Firefox and dimensionless SVG, see:\n // - https://github.com/whatwg/html/issues/3510\n // - https://bugzilla.mozilla.org/show_bug.cgi?id=700533\n if (\n image.naturalWidth === 0 &&\n image.naturalHeight === 0 &&\n image.width === 0 &&\n image.height === 0\n ) {\n // these values affect rasterization and will likely mar the content\n // until Firefox takes a stance on the issue, marred content is better than no content\n // Chromium uses a more refined heuristic about its choice given nil viewBox, and a better stance and solution is\n // proposed later in the original issue thread:\n // - Chromium behavior: https://github.com/CesiumGS/cesium/issues/9188#issuecomment-704400825\n // - Cesium's stance/solve: https://github.com/CesiumGS/cesium/issues/9188#issuecomment-720645777\n image.width = 300;\n image.height = 150;\n }\n deferred.resolve(image);\n };\n\n image.onerror = function (e) {\n deferred.reject(e);\n };\n\n if (crossOrigin) {\n if (TrustedServers.contains(url)) {\n image.crossOrigin = \"use-credentials\";\n } else {\n image.crossOrigin = \"\";\n }\n }\n\n image.src = url;\n};\n\nResource._Implementations.createImage = function (\n request,\n crossOrigin,\n deferred,\n flipY,\n skipColorSpaceConversion,\n preferImageBitmap,\n) {\n const url = request.url;\n // Passing an Image to createImageBitmap will force it to run on the main thread\n // since DOM elements don't exist on workers. We convert it to a blob so it's non-blocking.\n // See:\n // https://bugzilla.mozilla.org/show_bug.cgi?id=1044102#c38\n // https://bugs.chromium.org/p/chromium/issues/detail?id=580202#c10\n Resource.supportsImageBitmapOptions()\n .then(function (supportsImageBitmap) {\n // We can only use ImageBitmap if we can flip on decode.\n // See: https://github.com/CesiumGS/cesium/pull/7579#issuecomment-466146898\n if (!(supportsImageBitmap && preferImageBitmap)) {\n Resource._Implementations.loadImageElement(url, crossOrigin, deferred);\n return;\n }\n const responseType = \"blob\";\n const method = \"GET\";\n const xhrDeferred = defer();\n const xhr = Resource._Implementations.loadWithXhr(\n url,\n responseType,\n method,\n undefined,\n undefined,\n xhrDeferred,\n undefined,\n undefined,\n undefined,\n );\n\n if (defined(xhr) && defined(xhr.abort)) {\n request.cancelFunction = function () {\n xhr.abort();\n };\n }\n return xhrDeferred.promise\n .then(function (blob) {\n if (!defined(blob)) {\n deferred.reject(\n new RuntimeError(\n `Successfully retrieved ${url} but it contained no content.`,\n ),\n );\n return;\n }\n\n return Resource.createImageBitmapFromBlob(blob, {\n flipY: flipY,\n premultiplyAlpha: false,\n skipColorSpaceConversion: skipColorSpaceConversion,\n });\n })\n .then(function (image) {\n deferred.resolve(image);\n });\n })\n .catch(function (e) {\n deferred.reject(e);\n });\n};\n\n/**\n * Wrapper for createImageBitmap\n *\n * @private\n */\nResource.createImageBitmapFromBlob = function (blob, options) {\n Check.defined(\"options\", options);\n Check.typeOf.bool(\"options.flipY\", options.flipY);\n Check.typeOf.bool(\"options.premultiplyAlpha\", options.premultiplyAlpha);\n Check.typeOf.bool(\n \"options.skipColorSpaceConversion\",\n options.skipColorSpaceConversion,\n );\n\n return createImageBitmap(blob, {\n imageOrientation: options.flipY ? \"flipY\" : \"none\",\n premultiplyAlpha: options.premultiplyAlpha ? \"premultiply\" : \"none\",\n colorSpaceConversion: options.skipColorSpaceConversion ? \"none\" : \"default\",\n });\n};\n\nfunction loadWithHttpRequest(\n url,\n responseType,\n method,\n data,\n headers,\n deferred,\n overrideMimeType,\n) {\n // Note: only the 'json' and 'text' responseTypes transforms the loaded buffer\n fetch(url, {\n method,\n headers,\n })\n .then(async (response) => {\n if (!response.ok) {\n const responseHeaders = {};\n response.headers.forEach((value, key) => {\n responseHeaders[key] = value;\n });\n deferred.reject(\n new RequestErrorEvent(response.status, response, responseHeaders),\n );\n return;\n }\n\n switch (responseType) {\n case \"text\":\n deferred.resolve(response.text());\n break;\n case \"json\":\n deferred.resolve(response.json());\n break;\n default:\n deferred.resolve(new Uint8Array(await response.arrayBuffer()).buffer);\n break;\n }\n })\n .catch(() => {\n deferred.reject(new RequestErrorEvent());\n });\n}\n\nconst noXMLHttpRequest = typeof XMLHttpRequest === \"undefined\";\nResource._Implementations.loadWithXhr = function (\n url,\n responseType,\n method,\n data,\n headers,\n deferred,\n overrideMimeType,\n) {\n const dataUriRegexResult = dataUriRegex.exec(url);\n if (dataUriRegexResult !== null) {\n deferred.resolve(decodeDataUri(dataUriRegexResult, responseType));\n return;\n }\n\n if (noXMLHttpRequest) {\n loadWithHttpRequest(\n url,\n responseType,\n method,\n data,\n headers,\n deferred,\n overrideMimeType,\n );\n return;\n }\n\n const xhr = new XMLHttpRequest();\n\n if (TrustedServers.contains(url)) {\n xhr.withCredentials = true;\n }\n\n xhr.open(method, url, true);\n\n if (defined(overrideMimeType) && defined(xhr.overrideMimeType)) {\n xhr.overrideMimeType(overrideMimeType);\n }\n\n if (defined(headers)) {\n for (const key in headers) {\n if (headers.hasOwnProperty(key)) {\n xhr.setRequestHeader(key, headers[key]);\n }\n }\n }\n\n if (defined(responseType)) {\n xhr.responseType = responseType;\n }\n\n // While non-standard, file protocol always returns a status of 0 on success\n let localFile = false;\n if (typeof url === \"string\") {\n localFile =\n url.indexOf(\"file://\") === 0 ||\n (typeof window !== \"undefined\" && window.location.origin === \"file://\");\n }\n\n xhr.onload = function () {\n if (\n (xhr.status < 200 || xhr.status >= 300) &&\n !(localFile && xhr.status === 0)\n ) {\n deferred.reject(\n new RequestErrorEvent(\n xhr.status,\n xhr.response,\n xhr.getAllResponseHeaders(),\n ),\n );\n return;\n }\n\n const response = xhr.response;\n const browserResponseType = xhr.responseType;\n\n if (method === \"HEAD\" || method === \"OPTIONS\") {\n const responseHeaderString = xhr.getAllResponseHeaders();\n const splitHeaders = responseHeaderString.trim().split(/[\\r\\n]+/);\n\n const responseHeaders = {};\n splitHeaders.forEach(function (line) {\n const parts = line.split(\": \");\n const header = parts.shift();\n responseHeaders[header] = parts.join(\": \");\n });\n\n deferred.resolve(responseHeaders);\n return;\n }\n\n //All modern browsers will go into either the first or second if block or last else block.\n //Other code paths support older browsers that either do not support the supplied responseType\n //or do not support the xhr.response property.\n if (xhr.status === 204) {\n // accept no content\n deferred.resolve(undefined);\n } else if (\n defined(response) &&\n (!defined(responseType) || browserResponseType === responseType)\n ) {\n deferred.resolve(response);\n } else if (responseType === \"json\" && typeof response === \"string\") {\n try {\n deferred.resolve(JSON.parse(response));\n } catch (e) {\n deferred.reject(e);\n }\n } else if (\n (browserResponseType === \"\" || browserResponseType === \"document\") &&\n defined(xhr.responseXML) &&\n xhr.responseXML.hasChildNodes()\n ) {\n deferred.resolve(xhr.responseXML);\n } else if (\n (browserResponseType === \"\" || browserResponseType === \"text\") &&\n defined(xhr.responseText)\n ) {\n deferred.resolve(xhr.responseText);\n } else {\n deferred.reject(\n new RuntimeError(\"Invalid XMLHttpRequest response type.\"),\n );\n }\n };\n\n xhr.onerror = function (e) {\n deferred.reject(new RequestErrorEvent());\n };\n\n xhr.send(data);\n\n return xhr;\n};\n\nResource._Implementations.loadAndExecuteScript = function (\n url,\n functionName,\n deferred,\n) {\n return loadAndExecuteScript(url, functionName).catch(function (e) {\n deferred.reject(e);\n });\n};\n\n/**\n * The default implementations\n *\n * @private\n */\nResource._DefaultImplementations = {};\nResource._DefaultImplementations.createImage =\n Resource._Implementations.createImage;\nResource._DefaultImplementations.loadWithXhr =\n Resource._Implementations.loadWithXhr;\nResource._DefaultImplementations.loadAndExecuteScript =\n Resource._Implementations.loadAndExecuteScript;\n\n/**\n * A resource instance initialized to the current browser location\n *\n * @type {Resource}\n * @constant\n */\nResource.DEFAULT = Object.freeze(\n new Resource({\n url:\n typeof document === \"undefined\"\n ? \"\"\n : document.location.href.split(\"?\")[0],\n }),\n);\n\n/**\n * A function that returns the value of the property.\n * @callback Resource.RetryCallback\n *\n * @param {Resource} [resource] The resource that failed to load.\n * @param {RequestErrorEvent} [error] The error that occurred during the loading of the resource.\n * @returns {boolean|Promise} If true or a promise that resolved to true, the resource will be retried. Otherwise the failure will be returned.\n */\nexport default Resource;\n","/*!\n * URI.js - Mutating URLs\n *\n * Version: 1.19.11\n *\n * Author: Rodney Rehm\n * Web: http://medialize.github.io/URI.js/\n *\n * Licensed under\n * MIT License http://www.opensource.org/licenses/mit-license\n *\n */\n(function (root, factory) {\n 'use strict';\n // https://github.com/umdjs/umd/blob/master/returnExports.js\n if (typeof module === 'object' && module.exports) {\n // Node\n module.exports = factory(require('./punycode'), require('./IPv6'), require('./SecondLevelDomains'));\n } else if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define(['./punycode', './IPv6', './SecondLevelDomains'], factory);\n } else {\n // Browser globals (root is window)\n root.URI = factory(root.punycode, root.IPv6, root.SecondLevelDomains, root);\n }\n}(this, function (punycode, IPv6, SLD, root) {\n 'use strict';\n /*global location, escape, unescape */\n // FIXME: v2.0.0 renamce non-camelCase properties to uppercase\n /*jshint camelcase: false */\n\n // save current URI variable, if any\n var _URI = root && root.URI;\n\n function URI(url, base) {\n var _urlSupplied = arguments.length >= 1;\n var _baseSupplied = arguments.length >= 2;\n\n // Allow instantiation without the 'new' keyword\n if (!(this instanceof URI)) {\n if (_urlSupplied) {\n if (_baseSupplied) {\n return new URI(url, base);\n }\n\n return new URI(url);\n }\n\n return new URI();\n }\n\n if (url === undefined) {\n if (_urlSupplied) {\n throw new TypeError('undefined is not a valid argument for URI');\n }\n\n if (typeof location !== 'undefined') {\n url = location.href + '';\n } else {\n url = '';\n }\n }\n\n if (url === null) {\n if (_urlSupplied) {\n throw new TypeError('null is not a valid argument for URI');\n }\n }\n\n this.href(url);\n\n // resolve to base according to http://dvcs.w3.org/hg/url/raw-file/tip/Overview.html#constructor\n if (base !== undefined) {\n return this.absoluteTo(base);\n }\n\n return this;\n }\n\n function isInteger(value) {\n return /^[0-9]+$/.test(value);\n }\n\n URI.version = '1.19.11';\n\n var p = URI.prototype;\n var hasOwn = Object.prototype.hasOwnProperty;\n\n function escapeRegEx(string) {\n // https://github.com/medialize/URI.js/commit/85ac21783c11f8ccab06106dba9735a31a86924d#commitcomment-821963\n return string.replace(/([.*+?^=!:${}()|[\\]\\/\\\\])/g, '\\\\$1');\n }\n\n function getType(value) {\n // IE8 doesn't return [Object Undefined] but [Object Object] for undefined value\n if (value === undefined) {\n return 'Undefined';\n }\n\n return String(Object.prototype.toString.call(value)).slice(8, -1);\n }\n\n function isArray(obj) {\n return getType(obj) === 'Array';\n }\n\n function filterArrayValues(data, value) {\n var lookup = {};\n var i, length;\n\n if (getType(value) === 'RegExp') {\n lookup = null;\n } else if (isArray(value)) {\n for (i = 0, length = value.length; i < length; i++) {\n lookup[value[i]] = true;\n }\n } else {\n lookup[value] = true;\n }\n\n for (i = 0, length = data.length; i < length; i++) {\n /*jshint laxbreak: true */\n var _match = lookup && lookup[data[i]] !== undefined\n || !lookup && value.test(data[i]);\n /*jshint laxbreak: false */\n if (_match) {\n data.splice(i, 1);\n length--;\n i--;\n }\n }\n\n return data;\n }\n\n function arrayContains(list, value) {\n var i, length;\n\n // value may be string, number, array, regexp\n if (isArray(value)) {\n // Note: this can be optimized to O(n) (instead of current O(m * n))\n for (i = 0, length = value.length; i < length; i++) {\n if (!arrayContains(list, value[i])) {\n return false;\n }\n }\n\n return true;\n }\n\n var _type = getType(value);\n for (i = 0, length = list.length; i < length; i++) {\n if (_type === 'RegExp') {\n if (typeof list[i] === 'string' && list[i].match(value)) {\n return true;\n }\n } else if (list[i] === value) {\n return true;\n }\n }\n\n return false;\n }\n\n function arraysEqual(one, two) {\n if (!isArray(one) || !isArray(two)) {\n return false;\n }\n\n // arrays can't be equal if they have different amount of content\n if (one.length !== two.length) {\n return false;\n }\n\n one.sort();\n two.sort();\n\n for (var i = 0, l = one.length; i < l; i++) {\n if (one[i] !== two[i]) {\n return false;\n }\n }\n\n return true;\n }\n\n function trimSlashes(text) {\n var trim_expression = /^\\/+|\\/+$/g;\n return text.replace(trim_expression, '');\n }\n\n URI._parts = function() {\n return {\n protocol: null,\n username: null,\n password: null,\n hostname: null,\n urn: null,\n port: null,\n path: null,\n query: null,\n fragment: null,\n // state\n preventInvalidHostname: URI.preventInvalidHostname,\n duplicateQueryParameters: URI.duplicateQueryParameters,\n escapeQuerySpace: URI.escapeQuerySpace\n };\n };\n // state: throw on invalid hostname\n // see https://github.com/medialize/URI.js/pull/345\n // and https://github.com/medialize/URI.js/issues/354\n URI.preventInvalidHostname = false;\n // state: allow duplicate query parameters (a=1&a=1)\n URI.duplicateQueryParameters = false;\n // state: replaces + with %20 (space in query strings)\n URI.escapeQuerySpace = true;\n // static properties\n URI.protocol_expression = /^[a-z][a-z0-9.+-]*$/i;\n URI.idn_expression = /[^a-z0-9\\._-]/i;\n URI.punycode_expression = /(xn--)/i;\n // well, 333.444.555.666 matches, but it sure ain't no IPv4 - do we care?\n URI.ip4_expression = /^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$/;\n // credits to Rich Brown\n // source: http://forums.intermapper.com/viewtopic.php?p=1096#1096\n // specification: http://www.ietf.org/rfc/rfc4291.txt\n URI.ip6_expression = /^\\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$/;\n // expression used is \"gruber revised\" (@gruber v2) determined to be the\n // best solution in a regex-golf we did a couple of ages ago at\n // * http://mathiasbynens.be/demo/url-regex\n // * http://rodneyrehm.de/t/url-regex.html\n URI.find_uri_expression = /\\b((?:[a-z][\\w-]+:(?:\\/{1,3}|[a-z0-9%])|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}\\/)(?:[^\\s()<>]+|\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\))+(?:\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\)|[^\\s`!()\\[\\]{};:'\".,<>?«»“”‘’]))/ig;\n URI.findUri = {\n // valid \"scheme://\" or \"www.\"\n start: /\\b(?:([a-z][a-z0-9.+-]*:\\/\\/)|www\\.)/gi,\n // everything up to the next whitespace\n end: /[\\s\\r\\n]|$/,\n // trim trailing punctuation captured by end RegExp\n trim: /[`!()\\[\\]{};:'\".,<>?«»“”„‘’]+$/,\n // balanced parens inclusion (), [], {}, <>\n parens: /(\\([^\\)]*\\)|\\[[^\\]]*\\]|\\{[^}]*\\}|<[^>]*>)/g,\n };\n URI.leading_whitespace_expression = /^[\\x00-\\x20\\u00a0\\u1680\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000\\ufeff]+/\n // https://infra.spec.whatwg.org/#ascii-tab-or-newline\n URI.ascii_tab_whitespace = /[\\u0009\\u000A\\u000D]+/g\n // http://www.iana.org/assignments/uri-schemes.html\n // http://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers#Well-known_ports\n URI.defaultPorts = {\n http: '80',\n https: '443',\n ftp: '21',\n gopher: '70',\n ws: '80',\n wss: '443'\n };\n // list of protocols which always require a hostname\n URI.hostProtocols = [\n 'http',\n 'https'\n ];\n\n // allowed hostname characters according to RFC 3986\n // ALPHA DIGIT \"-\" \".\" \"_\" \"~\" \"!\" \"$\" \"&\" \"'\" \"(\" \")\" \"*\" \"+\" \",\" \";\" \"=\" %encoded\n // I've never seen a (non-IDN) hostname other than: ALPHA DIGIT . - _\n URI.invalid_hostname_characters = /[^a-zA-Z0-9\\.\\-:_]/;\n // map DOM Elements to their URI attribute\n URI.domAttributes = {\n 'a': 'href',\n 'blockquote': 'cite',\n 'link': 'href',\n 'base': 'href',\n 'script': 'src',\n 'form': 'action',\n 'img': 'src',\n 'area': 'href',\n 'iframe': 'src',\n 'embed': 'src',\n 'source': 'src',\n 'track': 'src',\n 'input': 'src', // but only if type=\"image\"\n 'audio': 'src',\n 'video': 'src'\n };\n URI.getDomAttribute = function(node) {\n if (!node || !node.nodeName) {\n return undefined;\n }\n\n var nodeName = node.nodeName.toLowerCase();\n // should only expose src for type=\"image\"\n if (nodeName === 'input' && node.type !== 'image') {\n return undefined;\n }\n\n return URI.domAttributes[nodeName];\n };\n\n function escapeForDumbFirefox36(value) {\n // https://github.com/medialize/URI.js/issues/91\n return escape(value);\n }\n\n // encoding / decoding according to RFC3986\n function strictEncodeURIComponent(string) {\n // see https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/encodeURIComponent\n return encodeURIComponent(string)\n .replace(/[!'()*]/g, escapeForDumbFirefox36)\n .replace(/\\*/g, '%2A');\n }\n URI.encode = strictEncodeURIComponent;\n URI.decode = decodeURIComponent;\n URI.iso8859 = function() {\n URI.encode = escape;\n URI.decode = unescape;\n };\n URI.unicode = function() {\n URI.encode = strictEncodeURIComponent;\n URI.decode = decodeURIComponent;\n };\n URI.characters = {\n pathname: {\n encode: {\n // RFC3986 2.1: For consistency, URI producers and normalizers should\n // use uppercase hexadecimal digits for all percent-encodings.\n expression: /%(24|26|2B|2C|3B|3D|3A|40)/ig,\n map: {\n // -._~!'()*\n '%24': '$',\n '%26': '&',\n '%2B': '+',\n '%2C': ',',\n '%3B': ';',\n '%3D': '=',\n '%3A': ':',\n '%40': '@'\n }\n },\n decode: {\n expression: /[\\/\\?#]/g,\n map: {\n '/': '%2F',\n '?': '%3F',\n '#': '%23'\n }\n }\n },\n reserved: {\n encode: {\n // RFC3986 2.1: For consistency, URI producers and normalizers should\n // use uppercase hexadecimal digits for all percent-encodings.\n expression: /%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/ig,\n map: {\n // gen-delims\n '%3A': ':',\n '%2F': '/',\n '%3F': '?',\n '%23': '#',\n '%5B': '[',\n '%5D': ']',\n '%40': '@',\n // sub-delims\n '%21': '!',\n '%24': '$',\n '%26': '&',\n '%27': '\\'',\n '%28': '(',\n '%29': ')',\n '%2A': '*',\n '%2B': '+',\n '%2C': ',',\n '%3B': ';',\n '%3D': '='\n }\n }\n },\n urnpath: {\n // The characters under `encode` are the characters called out by RFC 2141 as being acceptable\n // for usage in a URN. RFC2141 also calls out \"-\", \".\", and \"_\" as acceptable characters, but\n // these aren't encoded by encodeURIComponent, so we don't have to call them out here. Also\n // note that the colon character is not featured in the encoding map; this is because URI.js\n // gives the colons in URNs semantic meaning as the delimiters of path segements, and so it\n // should not appear unencoded in a segment itself.\n // See also the note above about RFC3986 and capitalalized hex digits.\n encode: {\n expression: /%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/ig,\n map: {\n '%21': '!',\n '%24': '$',\n '%27': '\\'',\n '%28': '(',\n '%29': ')',\n '%2A': '*',\n '%2B': '+',\n '%2C': ',',\n '%3B': ';',\n '%3D': '=',\n '%40': '@'\n }\n },\n // These characters are the characters called out by RFC2141 as \"reserved\" characters that\n // should never appear in a URN, plus the colon character (see note above).\n decode: {\n expression: /[\\/\\?#:]/g,\n map: {\n '/': '%2F',\n '?': '%3F',\n '#': '%23',\n ':': '%3A'\n }\n }\n }\n };\n URI.encodeQuery = function(string, escapeQuerySpace) {\n var escaped = URI.encode(string + '');\n if (escapeQuerySpace === undefined) {\n escapeQuerySpace = URI.escapeQuerySpace;\n }\n\n return escapeQuerySpace ? escaped.replace(/%20/g, '+') : escaped;\n };\n URI.decodeQuery = function(string, escapeQuerySpace) {\n string += '';\n if (escapeQuerySpace === undefined) {\n escapeQuerySpace = URI.escapeQuerySpace;\n }\n\n try {\n return URI.decode(escapeQuerySpace ? string.replace(/\\+/g, '%20') : string);\n } catch(e) {\n // we're not going to mess with weird encodings,\n // give up and return the undecoded original string\n // see https://github.com/medialize/URI.js/issues/87\n // see https://github.com/medialize/URI.js/issues/92\n return string;\n }\n };\n // generate encode/decode path functions\n var _parts = {'encode':'encode', 'decode':'decode'};\n var _part;\n var generateAccessor = function(_group, _part) {\n return function(string) {\n try {\n return URI[_part](string + '').replace(URI.characters[_group][_part].expression, function(c) {\n return URI.characters[_group][_part].map[c];\n });\n } catch (e) {\n // we're not going to mess with weird encodings,\n // give up and return the undecoded original string\n // see https://github.com/medialize/URI.js/issues/87\n // see https://github.com/medialize/URI.js/issues/92\n return string;\n }\n };\n };\n\n for (_part in _parts) {\n URI[_part + 'PathSegment'] = generateAccessor('pathname', _parts[_part]);\n URI[_part + 'UrnPathSegment'] = generateAccessor('urnpath', _parts[_part]);\n }\n\n var generateSegmentedPathFunction = function(_sep, _codingFuncName, _innerCodingFuncName) {\n return function(string) {\n // Why pass in names of functions, rather than the function objects themselves? The\n // definitions of some functions (but in particular, URI.decode) will occasionally change due\n // to URI.js having ISO8859 and Unicode modes. Passing in the name and getting it will ensure\n // that the functions we use here are \"fresh\".\n var actualCodingFunc;\n if (!_innerCodingFuncName) {\n actualCodingFunc = URI[_codingFuncName];\n } else {\n actualCodingFunc = function(string) {\n return URI[_codingFuncName](URI[_innerCodingFuncName](string));\n };\n }\n\n var segments = (string + '').split(_sep);\n\n for (var i = 0, length = segments.length; i < length; i++) {\n segments[i] = actualCodingFunc(segments[i]);\n }\n\n return segments.join(_sep);\n };\n };\n\n // This takes place outside the above loop because we don't want, e.g., encodeUrnPath functions.\n URI.decodePath = generateSegmentedPathFunction('/', 'decodePathSegment');\n URI.decodeUrnPath = generateSegmentedPathFunction(':', 'decodeUrnPathSegment');\n URI.recodePath = generateSegmentedPathFunction('/', 'encodePathSegment', 'decode');\n URI.recodeUrnPath = generateSegmentedPathFunction(':', 'encodeUrnPathSegment', 'decode');\n\n URI.encodeReserved = generateAccessor('reserved', 'encode');\n\n URI.parse = function(string, parts) {\n var pos;\n if (!parts) {\n parts = {\n preventInvalidHostname: URI.preventInvalidHostname\n };\n }\n\n string = string.replace(URI.leading_whitespace_expression, '')\n // https://infra.spec.whatwg.org/#ascii-tab-or-newline\n string = string.replace(URI.ascii_tab_whitespace, '')\n\n // [protocol\"://\"[username[\":\"password]\"@\"]hostname[\":\"port]\"/\"?][path][\"?\"querystring][\"#\"fragment]\n\n // extract fragment\n pos = string.indexOf('#');\n if (pos > -1) {\n // escaping?\n parts.fragment = string.substring(pos + 1) || null;\n string = string.substring(0, pos);\n }\n\n // extract query\n pos = string.indexOf('?');\n if (pos > -1) {\n // escaping?\n parts.query = string.substring(pos + 1) || null;\n string = string.substring(0, pos);\n }\n\n // slashes and backslashes have lost all meaning for the web protocols (https, http, wss, ws)\n string = string.replace(/^(https?|ftp|wss?)?:+[/\\\\]*/i, '$1://');\n // slashes and backslashes have lost all meaning for scheme relative URLs\n string = string.replace(/^[/\\\\]{2,}/i, '//');\n\n // extract protocol\n if (string.substring(0, 2) === '//') {\n // relative-scheme\n parts.protocol = null;\n string = string.substring(2);\n // extract \"user:pass@host:port\"\n string = URI.parseAuthority(string, parts);\n } else {\n pos = string.indexOf(':');\n if (pos > -1) {\n parts.protocol = string.substring(0, pos) || null;\n if (parts.protocol && !parts.protocol.match(URI.protocol_expression)) {\n // : may be within the path\n parts.protocol = undefined;\n } else if (string.substring(pos + 1, pos + 3).replace(/\\\\/g, '/') === '//') {\n string = string.substring(pos + 3);\n\n // extract \"user:pass@host:port\"\n string = URI.parseAuthority(string, parts);\n } else {\n string = string.substring(pos + 1);\n parts.urn = true;\n }\n }\n }\n\n // what's left must be the path\n parts.path = string;\n\n // and we're done\n return parts;\n };\n URI.parseHost = function(string, parts) {\n if (!string) {\n string = '';\n }\n\n // Copy chrome, IE, opera backslash-handling behavior.\n // Back slashes before the query string get converted to forward slashes\n // See: https://github.com/joyent/node/blob/386fd24f49b0e9d1a8a076592a404168faeecc34/lib/url.js#L115-L124\n // See: https://code.google.com/p/chromium/issues/detail?id=25916\n // https://github.com/medialize/URI.js/pull/233\n string = string.replace(/\\\\/g, '/');\n\n // extract host:port\n var pos = string.indexOf('/');\n var bracketPos;\n var t;\n\n if (pos === -1) {\n pos = string.length;\n }\n\n if (string.charAt(0) === '[') {\n // IPv6 host - http://tools.ietf.org/html/draft-ietf-6man-text-addr-representation-04#section-6\n // I claim most client software breaks on IPv6 anyways. To simplify things, URI only accepts\n // IPv6+port in the format [2001:db8::1]:80 (for the time being)\n bracketPos = string.indexOf(']');\n parts.hostname = string.substring(1, bracketPos) || null;\n parts.port = string.substring(bracketPos + 2, pos) || null;\n if (parts.port === '/') {\n parts.port = null;\n }\n } else {\n var firstColon = string.indexOf(':');\n var firstSlash = string.indexOf('/');\n var nextColon = string.indexOf(':', firstColon + 1);\n if (nextColon !== -1 && (firstSlash === -1 || nextColon < firstSlash)) {\n // IPv6 host contains multiple colons - but no port\n // this notation is actually not allowed by RFC 3986, but we're a liberal parser\n parts.hostname = string.substring(0, pos) || null;\n parts.port = null;\n } else {\n t = string.substring(0, pos).split(':');\n parts.hostname = t[0] || null;\n parts.port = t[1] || null;\n }\n }\n\n if (parts.hostname && string.substring(pos).charAt(0) !== '/') {\n pos++;\n string = '/' + string;\n }\n\n if (parts.preventInvalidHostname) {\n URI.ensureValidHostname(parts.hostname, parts.protocol);\n }\n\n if (parts.port) {\n URI.ensureValidPort(parts.port);\n }\n\n return string.substring(pos) || '/';\n };\n URI.parseAuthority = function(string, parts) {\n string = URI.parseUserinfo(string, parts);\n return URI.parseHost(string, parts);\n };\n URI.parseUserinfo = function(string, parts) {\n // extract username:password\n var _string = string\n var firstBackSlash = string.indexOf('\\\\');\n if (firstBackSlash !== -1) {\n string = string.replace(/\\\\/g, '/')\n }\n var firstSlash = string.indexOf('/');\n var pos = string.lastIndexOf('@', firstSlash > -1 ? firstSlash : string.length - 1);\n var t;\n\n // authority@ must come before /path or \\path\n if (pos > -1 && (firstSlash === -1 || pos < firstSlash)) {\n t = string.substring(0, pos).split(':');\n parts.username = t[0] ? URI.decode(t[0]) : null;\n t.shift();\n parts.password = t[0] ? URI.decode(t.join(':')) : null;\n string = _string.substring(pos + 1);\n } else {\n parts.username = null;\n parts.password = null;\n }\n\n return string;\n };\n URI.parseQuery = function(string, escapeQuerySpace) {\n if (!string) {\n return {};\n }\n\n // throw out the funky business - \"?\"[name\"=\"value\"&\"]+\n string = string.replace(/&+/g, '&').replace(/^\\?*&*|&+$/g, '');\n\n if (!string) {\n return {};\n }\n\n var items = {};\n var splits = string.split('&');\n var length = splits.length;\n var v, name, value;\n\n for (var i = 0; i < length; i++) {\n v = splits[i].split('=');\n name = URI.decodeQuery(v.shift(), escapeQuerySpace);\n // no \"=\" is null according to http://dvcs.w3.org/hg/url/raw-file/tip/Overview.html#collect-url-parameters\n value = v.length ? URI.decodeQuery(v.join('='), escapeQuerySpace) : null;\n\n if (name === '__proto__') {\n // ignore attempt at exploiting JavaScript internals\n continue;\n } else if (hasOwn.call(items, name)) {\n if (typeof items[name] === 'string' || items[name] === null) {\n items[name] = [items[name]];\n }\n\n items[name].push(value);\n } else {\n items[name] = value;\n }\n }\n\n return items;\n };\n\n URI.build = function(parts) {\n var t = '';\n var requireAbsolutePath = false\n\n if (parts.protocol) {\n t += parts.protocol + ':';\n }\n\n if (!parts.urn && (t || parts.hostname)) {\n t += '//';\n requireAbsolutePath = true\n }\n\n t += (URI.buildAuthority(parts) || '');\n\n if (typeof parts.path === 'string') {\n if (parts.path.charAt(0) !== '/' && requireAbsolutePath) {\n t += '/';\n }\n\n t += parts.path;\n }\n\n if (typeof parts.query === 'string' && parts.query) {\n t += '?' + parts.query;\n }\n\n if (typeof parts.fragment === 'string' && parts.fragment) {\n t += '#' + parts.fragment;\n }\n return t;\n };\n URI.buildHost = function(parts) {\n var t = '';\n\n if (!parts.hostname) {\n return '';\n } else if (URI.ip6_expression.test(parts.hostname)) {\n t += '[' + parts.hostname + ']';\n } else {\n t += parts.hostname;\n }\n\n if (parts.port) {\n t += ':' + parts.port;\n }\n\n return t;\n };\n URI.buildAuthority = function(parts) {\n return URI.buildUserinfo(parts) + URI.buildHost(parts);\n };\n URI.buildUserinfo = function(parts) {\n var t = '';\n\n if (parts.username) {\n t += URI.encode(parts.username);\n }\n\n if (parts.password) {\n t += ':' + URI.encode(parts.password);\n }\n\n if (t) {\n t += '@';\n }\n\n return t;\n };\n URI.buildQuery = function(data, duplicateQueryParameters, escapeQuerySpace) {\n // according to http://tools.ietf.org/html/rfc3986 or http://labs.apache.org/webarch/uri/rfc/rfc3986.html\n // being »-._~!$&'()*+,;=:@/?« %HEX and alnum are allowed\n // the RFC explicitly states ?/foo being a valid use case, no mention of parameter syntax!\n // URI.js treats the query string as being application/x-www-form-urlencoded\n // see http://www.w3.org/TR/REC-html40/interact/forms.html#form-content-type\n\n var t = '';\n var unique, key, i, length;\n for (key in data) {\n if (key === '__proto__') {\n // ignore attempt at exploiting JavaScript internals\n continue;\n } else if (hasOwn.call(data, key)) {\n if (isArray(data[key])) {\n unique = {};\n for (i = 0, length = data[key].length; i < length; i++) {\n if (data[key][i] !== undefined && unique[data[key][i] + ''] === undefined) {\n t += '&' + URI.buildQueryParameter(key, data[key][i], escapeQuerySpace);\n if (duplicateQueryParameters !== true) {\n unique[data[key][i] + ''] = true;\n }\n }\n }\n } else if (data[key] !== undefined) {\n t += '&' + URI.buildQueryParameter(key, data[key], escapeQuerySpace);\n }\n }\n }\n\n return t.substring(1);\n };\n URI.buildQueryParameter = function(name, value, escapeQuerySpace) {\n // http://www.w3.org/TR/REC-html40/interact/forms.html#form-content-type -- application/x-www-form-urlencoded\n // don't append \"=\" for null values, according to http://dvcs.w3.org/hg/url/raw-file/tip/Overview.html#url-parameter-serialization\n return URI.encodeQuery(name, escapeQuerySpace) + (value !== null ? '=' + URI.encodeQuery(value, escapeQuerySpace) : '');\n };\n\n URI.addQuery = function(data, name, value) {\n if (typeof name === 'object') {\n for (var key in name) {\n if (hasOwn.call(name, key)) {\n URI.addQuery(data, key, name[key]);\n }\n }\n } else if (typeof name === 'string') {\n if (data[name] === undefined) {\n data[name] = value;\n return;\n } else if (typeof data[name] === 'string') {\n data[name] = [data[name]];\n }\n\n if (!isArray(value)) {\n value = [value];\n }\n\n data[name] = (data[name] || []).concat(value);\n } else {\n throw new TypeError('URI.addQuery() accepts an object, string as the name parameter');\n }\n };\n\n URI.setQuery = function(data, name, value) {\n if (typeof name === 'object') {\n for (var key in name) {\n if (hasOwn.call(name, key)) {\n URI.setQuery(data, key, name[key]);\n }\n }\n } else if (typeof name === 'string') {\n data[name] = value === undefined ? null : value;\n } else {\n throw new TypeError('URI.setQuery() accepts an object, string as the name parameter');\n }\n };\n\n URI.removeQuery = function(data, name, value) {\n var i, length, key;\n\n if (isArray(name)) {\n for (i = 0, length = name.length; i < length; i++) {\n data[name[i]] = undefined;\n }\n } else if (getType(name) === 'RegExp') {\n for (key in data) {\n if (name.test(key)) {\n data[key] = undefined;\n }\n }\n } else if (typeof name === 'object') {\n for (key in name) {\n if (hasOwn.call(name, key)) {\n URI.removeQuery(data, key, name[key]);\n }\n }\n } else if (typeof name === 'string') {\n if (value !== undefined) {\n if (getType(value) === 'RegExp') {\n if (!isArray(data[name]) && value.test(data[name])) {\n data[name] = undefined;\n } else {\n data[name] = filterArrayValues(data[name], value);\n }\n } else if (data[name] === String(value) && (!isArray(value) || value.length === 1)) {\n data[name] = undefined;\n } else if (isArray(data[name])) {\n data[name] = filterArrayValues(data[name], value);\n }\n } else {\n data[name] = undefined;\n }\n } else {\n throw new TypeError('URI.removeQuery() accepts an object, string, RegExp as the first parameter');\n }\n };\n URI.hasQuery = function(data, name, value, withinArray) {\n switch (getType(name)) {\n case 'String':\n // Nothing to do here\n break;\n\n case 'RegExp':\n for (var key in data) {\n if (hasOwn.call(data, key)) {\n if (name.test(key) && (value === undefined || URI.hasQuery(data, key, value))) {\n return true;\n }\n }\n }\n\n return false;\n\n case 'Object':\n for (var _key in name) {\n if (hasOwn.call(name, _key)) {\n if (!URI.hasQuery(data, _key, name[_key])) {\n return false;\n }\n }\n }\n\n return true;\n\n default:\n throw new TypeError('URI.hasQuery() accepts a string, regular expression or object as the name parameter');\n }\n\n switch (getType(value)) {\n case 'Undefined':\n // true if exists (but may be empty)\n return name in data; // data[name] !== undefined;\n\n case 'Boolean':\n // true if exists and non-empty\n var _booly = Boolean(isArray(data[name]) ? data[name].length : data[name]);\n return value === _booly;\n\n case 'Function':\n // allow complex comparison\n return !!value(data[name], name, data);\n\n case 'Array':\n if (!isArray(data[name])) {\n return false;\n }\n\n var op = withinArray ? arrayContains : arraysEqual;\n return op(data[name], value);\n\n case 'RegExp':\n if (!isArray(data[name])) {\n return Boolean(data[name] && data[name].match(value));\n }\n\n if (!withinArray) {\n return false;\n }\n\n return arrayContains(data[name], value);\n\n case 'Number':\n value = String(value);\n /* falls through */\n case 'String':\n if (!isArray(data[name])) {\n return data[name] === value;\n }\n\n if (!withinArray) {\n return false;\n }\n\n return arrayContains(data[name], value);\n\n default:\n throw new TypeError('URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter');\n }\n };\n\n\n URI.joinPaths = function() {\n var input = [];\n var segments = [];\n var nonEmptySegments = 0;\n\n for (var i = 0; i < arguments.length; i++) {\n var url = new URI(arguments[i]);\n input.push(url);\n var _segments = url.segment();\n for (var s = 0; s < _segments.length; s++) {\n if (typeof _segments[s] === 'string') {\n segments.push(_segments[s]);\n }\n\n if (_segments[s]) {\n nonEmptySegments++;\n }\n }\n }\n\n if (!segments.length || !nonEmptySegments) {\n return new URI('');\n }\n\n var uri = new URI('').segment(segments);\n\n if (input[0].path() === '' || input[0].path().slice(0, 1) === '/') {\n uri.path('/' + uri.path());\n }\n\n return uri.normalize();\n };\n\n URI.commonPath = function(one, two) {\n var length = Math.min(one.length, two.length);\n var pos;\n\n // find first non-matching character\n for (pos = 0; pos < length; pos++) {\n if (one.charAt(pos) !== two.charAt(pos)) {\n pos--;\n break;\n }\n }\n\n if (pos < 1) {\n return one.charAt(0) === two.charAt(0) && one.charAt(0) === '/' ? '/' : '';\n }\n\n // revert to last /\n if (one.charAt(pos) !== '/' || two.charAt(pos) !== '/') {\n pos = one.substring(0, pos).lastIndexOf('/');\n }\n\n return one.substring(0, pos + 1);\n };\n\n URI.withinString = function(string, callback, options) {\n options || (options = {});\n var _start = options.start || URI.findUri.start;\n var _end = options.end || URI.findUri.end;\n var _trim = options.trim || URI.findUri.trim;\n var _parens = options.parens || URI.findUri.parens;\n var _attributeOpen = /[a-z0-9-]=[\"']?$/i;\n\n _start.lastIndex = 0;\n while (true) {\n var match = _start.exec(string);\n if (!match) {\n break;\n }\n\n var start = match.index;\n if (options.ignoreHtml) {\n // attribut(e=[\"']?$)\n var attributeOpen = string.slice(Math.max(start - 3, 0), start);\n if (attributeOpen && _attributeOpen.test(attributeOpen)) {\n continue;\n }\n }\n\n var end = start + string.slice(start).search(_end);\n var slice = string.slice(start, end);\n // make sure we include well balanced parens\n var parensEnd = -1;\n while (true) {\n var parensMatch = _parens.exec(slice);\n if (!parensMatch) {\n break;\n }\n\n var parensMatchEnd = parensMatch.index + parensMatch[0].length;\n parensEnd = Math.max(parensEnd, parensMatchEnd);\n }\n\n if (parensEnd > -1) {\n slice = slice.slice(0, parensEnd) + slice.slice(parensEnd).replace(_trim, '');\n } else {\n slice = slice.replace(_trim, '');\n }\n\n if (slice.length <= match[0].length) {\n // the extract only contains the starting marker of a URI,\n // e.g. \"www\" or \"http://\"\n continue;\n }\n\n if (options.ignore && options.ignore.test(slice)) {\n continue;\n }\n\n end = start + slice.length;\n var result = callback(slice, start, end, string);\n if (result === undefined) {\n _start.lastIndex = end;\n continue;\n }\n\n result = String(result);\n string = string.slice(0, start) + result + string.slice(end);\n _start.lastIndex = start + result.length;\n }\n\n _start.lastIndex = 0;\n return string;\n };\n\n URI.ensureValidHostname = function(v, protocol) {\n // Theoretically URIs allow percent-encoding in Hostnames (according to RFC 3986)\n // they are not part of DNS and therefore ignored by URI.js\n\n var hasHostname = !!v; // not null and not an empty string\n var hasProtocol = !!protocol;\n var rejectEmptyHostname = false;\n\n if (hasProtocol) {\n rejectEmptyHostname = arrayContains(URI.hostProtocols, protocol);\n }\n\n if (rejectEmptyHostname && !hasHostname) {\n throw new TypeError('Hostname cannot be empty, if protocol is ' + protocol);\n } else if (v && v.match(URI.invalid_hostname_characters)) {\n // test punycode\n if (!punycode) {\n throw new TypeError('Hostname \"' + v + '\" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');\n }\n if (punycode.toASCII(v).match(URI.invalid_hostname_characters)) {\n throw new TypeError('Hostname \"' + v + '\" contains characters other than [A-Z0-9.-:_]');\n }\n }\n };\n\n URI.ensureValidPort = function (v) {\n if (!v) {\n return;\n }\n\n var port = Number(v);\n if (isInteger(port) && (port > 0) && (port < 65536)) {\n return;\n }\n\n throw new TypeError('Port \"' + v + '\" is not a valid port');\n };\n\n // noConflict\n URI.noConflict = function(removeAll) {\n if (removeAll) {\n var unconflicted = {\n URI: this.noConflict()\n };\n\n if (root.URITemplate && typeof root.URITemplate.noConflict === 'function') {\n unconflicted.URITemplate = root.URITemplate.noConflict();\n }\n\n if (root.IPv6 && typeof root.IPv6.noConflict === 'function') {\n unconflicted.IPv6 = root.IPv6.noConflict();\n }\n\n if (root.SecondLevelDomains && typeof root.SecondLevelDomains.noConflict === 'function') {\n unconflicted.SecondLevelDomains = root.SecondLevelDomains.noConflict();\n }\n\n return unconflicted;\n } else if (root.URI === this) {\n root.URI = _URI;\n }\n\n return this;\n };\n\n p.build = function(deferBuild) {\n if (deferBuild === true) {\n this._deferred_build = true;\n } else if (deferBuild === undefined || this._deferred_build) {\n this._string = URI.build(this._parts);\n this._deferred_build = false;\n }\n\n return this;\n };\n\n p.clone = function() {\n return new URI(this);\n };\n\n p.valueOf = p.toString = function() {\n return this.build(false)._string;\n };\n\n\n function generateSimpleAccessor(_part){\n return function(v, build) {\n if (v === undefined) {\n return this._parts[_part] || '';\n } else {\n this._parts[_part] = v || null;\n this.build(!build);\n return this;\n }\n };\n }\n\n function generatePrefixAccessor(_part, _key){\n return function(v, build) {\n if (v === undefined) {\n return this._parts[_part] || '';\n } else {\n if (v !== null) {\n v = v + '';\n if (v.charAt(0) === _key) {\n v = v.substring(1);\n }\n }\n\n this._parts[_part] = v;\n this.build(!build);\n return this;\n }\n };\n }\n\n p.protocol = generateSimpleAccessor('protocol');\n p.username = generateSimpleAccessor('username');\n p.password = generateSimpleAccessor('password');\n p.hostname = generateSimpleAccessor('hostname');\n p.port = generateSimpleAccessor('port');\n p.query = generatePrefixAccessor('query', '?');\n p.fragment = generatePrefixAccessor('fragment', '#');\n\n p.search = function(v, build) {\n var t = this.query(v, build);\n return typeof t === 'string' && t.length ? ('?' + t) : t;\n };\n p.hash = function(v, build) {\n var t = this.fragment(v, build);\n return typeof t === 'string' && t.length ? ('#' + t) : t;\n };\n\n p.pathname = function(v, build) {\n if (v === undefined || v === true) {\n var res = this._parts.path || (this._parts.hostname ? '/' : '');\n return v ? (this._parts.urn ? URI.decodeUrnPath : URI.decodePath)(res) : res;\n } else {\n if (this._parts.urn) {\n this._parts.path = v ? URI.recodeUrnPath(v) : '';\n } else {\n this._parts.path = v ? URI.recodePath(v) : '/';\n }\n this.build(!build);\n return this;\n }\n };\n p.path = p.pathname;\n p.href = function(href, build) {\n var key;\n\n if (href === undefined) {\n return this.toString();\n }\n\n this._string = '';\n this._parts = URI._parts();\n\n var _URI = href instanceof URI;\n var _object = typeof href === 'object' && (href.hostname || href.path || href.pathname);\n if (href.nodeName) {\n var attribute = URI.getDomAttribute(href);\n href = href[attribute] || '';\n _object = false;\n }\n\n // window.location is reported to be an object, but it's not the sort\n // of object we're looking for:\n // * location.protocol ends with a colon\n // * location.query != object.search\n // * location.hash != object.fragment\n // simply serializing the unknown object should do the trick\n // (for location, not for everything...)\n if (!_URI && _object && href.pathname !== undefined) {\n href = href.toString();\n }\n\n if (typeof href === 'string' || href instanceof String) {\n this._parts = URI.parse(String(href), this._parts);\n } else if (_URI || _object) {\n var src = _URI ? href._parts : href;\n for (key in src) {\n if (key === 'query') { continue; }\n if (hasOwn.call(this._parts, key)) {\n this._parts[key] = src[key];\n }\n }\n if (src.query) {\n this.query(src.query, false);\n }\n } else {\n throw new TypeError('invalid input');\n }\n\n this.build(!build);\n return this;\n };\n\n // identification accessors\n p.is = function(what) {\n var ip = false;\n var ip4 = false;\n var ip6 = false;\n var name = false;\n var sld = false;\n var idn = false;\n var punycode = false;\n var relative = !this._parts.urn;\n\n if (this._parts.hostname) {\n relative = false;\n ip4 = URI.ip4_expression.test(this._parts.hostname);\n ip6 = URI.ip6_expression.test(this._parts.hostname);\n ip = ip4 || ip6;\n name = !ip;\n sld = name && SLD && SLD.has(this._parts.hostname);\n idn = name && URI.idn_expression.test(this._parts.hostname);\n punycode = name && URI.punycode_expression.test(this._parts.hostname);\n }\n\n switch (what.toLowerCase()) {\n case 'relative':\n return relative;\n\n case 'absolute':\n return !relative;\n\n // hostname identification\n case 'domain':\n case 'name':\n return name;\n\n case 'sld':\n return sld;\n\n case 'ip':\n return ip;\n\n case 'ip4':\n case 'ipv4':\n case 'inet4':\n return ip4;\n\n case 'ip6':\n case 'ipv6':\n case 'inet6':\n return ip6;\n\n case 'idn':\n return idn;\n\n case 'url':\n return !this._parts.urn;\n\n case 'urn':\n return !!this._parts.urn;\n\n case 'punycode':\n return punycode;\n }\n\n return null;\n };\n\n // component specific input validation\n var _protocol = p.protocol;\n var _port = p.port;\n var _hostname = p.hostname;\n\n p.protocol = function(v, build) {\n if (v) {\n // accept trailing ://\n v = v.replace(/:(\\/\\/)?$/, '');\n\n if (!v.match(URI.protocol_expression)) {\n throw new TypeError('Protocol \"' + v + '\" contains characters other than [A-Z0-9.+-] or doesn\\'t start with [A-Z]');\n }\n }\n\n return _protocol.call(this, v, build);\n };\n p.scheme = p.protocol;\n p.port = function(v, build) {\n if (this._parts.urn) {\n return v === undefined ? '' : this;\n }\n\n if (v !== undefined) {\n if (v === 0) {\n v = null;\n }\n\n if (v) {\n v += '';\n if (v.charAt(0) === ':') {\n v = v.substring(1);\n }\n\n URI.ensureValidPort(v);\n }\n }\n return _port.call(this, v, build);\n };\n p.hostname = function(v, build) {\n if (this._parts.urn) {\n return v === undefined ? '' : this;\n }\n\n if (v !== undefined) {\n var x = { preventInvalidHostname: this._parts.preventInvalidHostname };\n var res = URI.parseHost(v, x);\n if (res !== '/') {\n throw new TypeError('Hostname \"' + v + '\" contains characters other than [A-Z0-9.-]');\n }\n\n v = x.hostname;\n if (this._parts.preventInvalidHostname) {\n URI.ensureValidHostname(v, this._parts.protocol);\n }\n }\n\n return _hostname.call(this, v, build);\n };\n\n // compound accessors\n p.origin = function(v, build) {\n if (this._parts.urn) {\n return v === undefined ? '' : this;\n }\n\n if (v === undefined) {\n var protocol = this.protocol();\n var authority = this.authority();\n if (!authority) {\n return '';\n }\n\n return (protocol ? protocol + '://' : '') + this.authority();\n } else {\n var origin = URI(v);\n this\n .protocol(origin.protocol())\n .authority(origin.authority())\n .build(!build);\n return this;\n }\n };\n p.host = function(v, build) {\n if (this._parts.urn) {\n return v === undefined ? '' : this;\n }\n\n if (v === undefined) {\n return this._parts.hostname ? URI.buildHost(this._parts) : '';\n } else {\n var res = URI.parseHost(v, this._parts);\n if (res !== '/') {\n throw new TypeError('Hostname \"' + v + '\" contains characters other than [A-Z0-9.-]');\n }\n\n this.build(!build);\n return this;\n }\n };\n p.authority = function(v, build) {\n if (this._parts.urn) {\n return v === undefined ? '' : this;\n }\n\n if (v === undefined) {\n return this._parts.hostname ? URI.buildAuthority(this._parts) : '';\n } else {\n var res = URI.parseAuthority(v, this._parts);\n if (res !== '/') {\n throw new TypeError('Hostname \"' + v + '\" contains characters other than [A-Z0-9.-]');\n }\n\n this.build(!build);\n return this;\n }\n };\n p.userinfo = function(v, build) {\n if (this._parts.urn) {\n return v === undefined ? '' : this;\n }\n\n if (v === undefined) {\n var t = URI.buildUserinfo(this._parts);\n return t ? t.substring(0, t.length -1) : t;\n } else {\n if (v[v.length-1] !== '@') {\n v += '@';\n }\n\n URI.parseUserinfo(v, this._parts);\n this.build(!build);\n return this;\n }\n };\n p.resource = function(v, build) {\n var parts;\n\n if (v === undefined) {\n return this.path() + this.search() + this.hash();\n }\n\n parts = URI.parse(v);\n this._parts.path = parts.path;\n this._parts.query = parts.query;\n this._parts.fragment = parts.fragment;\n this.build(!build);\n return this;\n };\n\n // fraction accessors\n p.subdomain = function(v, build) {\n if (this._parts.urn) {\n return v === undefined ? '' : this;\n }\n\n // convenience, return \"www\" from \"www.example.org\"\n if (v === undefined) {\n if (!this._parts.hostname || this.is('IP')) {\n return '';\n }\n\n // grab domain and add another segment\n var end = this._parts.hostname.length - this.domain().length - 1;\n return this._parts.hostname.substring(0, end) || '';\n } else {\n var e = this._parts.hostname.length - this.domain().length;\n var sub = this._parts.hostname.substring(0, e);\n var replace = new RegExp('^' + escapeRegEx(sub));\n\n if (v && v.charAt(v.length - 1) !== '.') {\n v += '.';\n }\n\n if (v.indexOf(':') !== -1) {\n throw new TypeError('Domains cannot contain colons');\n }\n\n if (v) {\n URI.ensureValidHostname(v, this._parts.protocol);\n }\n\n this._parts.hostname = this._parts.hostname.replace(replace, v);\n this.build(!build);\n return this;\n }\n };\n p.domain = function(v, build) {\n if (this._parts.urn) {\n return v === undefined ? '' : this;\n }\n\n if (typeof v === 'boolean') {\n build = v;\n v = undefined;\n }\n\n // convenience, return \"example.org\" from \"www.example.org\"\n if (v === undefined) {\n if (!this._parts.hostname || this.is('IP')) {\n return '';\n }\n\n // if hostname consists of 1 or 2 segments, it must be the domain\n var t = this._parts.hostname.match(/\\./g);\n if (t && t.length < 2) {\n return this._parts.hostname;\n }\n\n // grab tld and add another segment\n var end = this._parts.hostname.length - this.tld(build).length - 1;\n end = this._parts.hostname.lastIndexOf('.', end -1) + 1;\n return this._parts.hostname.substring(end) || '';\n } else {\n if (!v) {\n throw new TypeError('cannot set domain empty');\n }\n\n if (v.indexOf(':') !== -1) {\n throw new TypeError('Domains cannot contain colons');\n }\n\n URI.ensureValidHostname(v, this._parts.protocol);\n\n if (!this._parts.hostname || this.is('IP')) {\n this._parts.hostname = v;\n } else {\n var replace = new RegExp(escapeRegEx(this.domain()) + '$');\n this._parts.hostname = this._parts.hostname.replace(replace, v);\n }\n\n this.build(!build);\n return this;\n }\n };\n p.tld = function(v, build) {\n if (this._parts.urn) {\n return v === undefined ? '' : this;\n }\n\n if (typeof v === 'boolean') {\n build = v;\n v = undefined;\n }\n\n // return \"org\" from \"www.example.org\"\n if (v === undefined) {\n if (!this._parts.hostname || this.is('IP')) {\n return '';\n }\n\n var pos = this._parts.hostname.lastIndexOf('.');\n var tld = this._parts.hostname.substring(pos + 1);\n\n if (build !== true && SLD && SLD.list[tld.toLowerCase()]) {\n return SLD.get(this._parts.hostname) || tld;\n }\n\n return tld;\n } else {\n var replace;\n\n if (!v) {\n throw new TypeError('cannot set TLD empty');\n } else if (v.match(/[^a-zA-Z0-9-]/)) {\n if (SLD && SLD.is(v)) {\n replace = new RegExp(escapeRegEx(this.tld()) + '$');\n this._parts.hostname = this._parts.hostname.replace(replace, v);\n } else {\n throw new TypeError('TLD \"' + v + '\" contains characters other than [A-Z0-9]');\n }\n } else if (!this._parts.hostname || this.is('IP')) {\n throw new ReferenceError('cannot set TLD on non-domain host');\n } else {\n replace = new RegExp(escapeRegEx(this.tld()) + '$');\n this._parts.hostname = this._parts.hostname.replace(replace, v);\n }\n\n this.build(!build);\n return this;\n }\n };\n p.directory = function(v, build) {\n if (this._parts.urn) {\n return v === undefined ? '' : this;\n }\n\n if (v === undefined || v === true) {\n if (!this._parts.path && !this._parts.hostname) {\n return '';\n }\n\n if (this._parts.path === '/') {\n return '/';\n }\n\n var end = this._parts.path.length - this.filename().length - 1;\n var res = this._parts.path.substring(0, end) || (this._parts.hostname ? '/' : '');\n\n return v ? URI.decodePath(res) : res;\n\n } else {\n var e = this._parts.path.length - this.filename().length;\n var directory = this._parts.path.substring(0, e);\n var replace = new RegExp('^' + escapeRegEx(directory));\n\n // fully qualifier directories begin with a slash\n if (!this.is('relative')) {\n if (!v) {\n v = '/';\n }\n\n if (v.charAt(0) !== '/') {\n v = '/' + v;\n }\n }\n\n // directories always end with a slash\n if (v && v.charAt(v.length - 1) !== '/') {\n v += '/';\n }\n\n v = URI.recodePath(v);\n this._parts.path = this._parts.path.replace(replace, v);\n this.build(!build);\n return this;\n }\n };\n p.filename = function(v, build) {\n if (this._parts.urn) {\n return v === undefined ? '' : this;\n }\n\n if (typeof v !== 'string') {\n if (!this._parts.path || this._parts.path === '/') {\n return '';\n }\n\n var pos = this._parts.path.lastIndexOf('/');\n var res = this._parts.path.substring(pos+1);\n\n return v ? URI.decodePathSegment(res) : res;\n } else {\n var mutatedDirectory = false;\n\n if (v.charAt(0) === '/') {\n v = v.substring(1);\n }\n\n if (v.match(/\\.?\\//)) {\n mutatedDirectory = true;\n }\n\n var replace = new RegExp(escapeRegEx(this.filename()) + '$');\n v = URI.recodePath(v);\n this._parts.path = this._parts.path.replace(replace, v);\n\n if (mutatedDirectory) {\n this.normalizePath(build);\n } else {\n this.build(!build);\n }\n\n return this;\n }\n };\n p.suffix = function(v, build) {\n if (this._parts.urn) {\n return v === undefined ? '' : this;\n }\n\n if (v === undefined || v === true) {\n if (!this._parts.path || this._parts.path === '/') {\n return '';\n }\n\n var filename = this.filename();\n var pos = filename.lastIndexOf('.');\n var s, res;\n\n if (pos === -1) {\n return '';\n }\n\n // suffix may only contain alnum characters (yup, I made this up.)\n s = filename.substring(pos+1);\n res = (/^[a-z0-9%]+$/i).test(s) ? s : '';\n return v ? URI.decodePathSegment(res) : res;\n } else {\n if (v.charAt(0) === '.') {\n v = v.substring(1);\n }\n\n var suffix = this.suffix();\n var replace;\n\n if (!suffix) {\n if (!v) {\n return this;\n }\n\n this._parts.path += '.' + URI.recodePath(v);\n } else if (!v) {\n replace = new RegExp(escapeRegEx('.' + suffix) + '$');\n } else {\n replace = new RegExp(escapeRegEx(suffix) + '$');\n }\n\n if (replace) {\n v = URI.recodePath(v);\n this._parts.path = this._parts.path.replace(replace, v);\n }\n\n this.build(!build);\n return this;\n }\n };\n p.segment = function(segment, v, build) {\n var separator = this._parts.urn ? ':' : '/';\n var path = this.path();\n var absolute = path.substring(0, 1) === '/';\n var segments = path.split(separator);\n\n if (segment !== undefined && typeof segment !== 'number') {\n build = v;\n v = segment;\n segment = undefined;\n }\n\n if (segment !== undefined && typeof segment !== 'number') {\n throw new Error('Bad segment \"' + segment + '\", must be 0-based integer');\n }\n\n if (absolute) {\n segments.shift();\n }\n\n if (segment < 0) {\n // allow negative indexes to address from the end\n segment = Math.max(segments.length + segment, 0);\n }\n\n if (v === undefined) {\n /*jshint laxbreak: true */\n return segment === undefined\n ? segments\n : segments[segment];\n /*jshint laxbreak: false */\n } else if (segment === null || segments[segment] === undefined) {\n if (isArray(v)) {\n segments = [];\n // collapse empty elements within array\n for (var i=0, l=v.length; i < l; i++) {\n if (!v[i].length && (!segments.length || !segments[segments.length -1].length)) {\n continue;\n }\n\n if (segments.length && !segments[segments.length -1].length) {\n segments.pop();\n }\n\n segments.push(trimSlashes(v[i]));\n }\n } else if (v || typeof v === 'string') {\n v = trimSlashes(v);\n if (segments[segments.length -1] === '') {\n // empty trailing elements have to be overwritten\n // to prevent results such as /foo//bar\n segments[segments.length -1] = v;\n } else {\n segments.push(v);\n }\n }\n } else {\n if (v) {\n segments[segment] = trimSlashes(v);\n } else {\n segments.splice(segment, 1);\n }\n }\n\n if (absolute) {\n segments.unshift('');\n }\n\n return this.path(segments.join(separator), build);\n };\n p.segmentCoded = function(segment, v, build) {\n var segments, i, l;\n\n if (typeof segment !== 'number') {\n build = v;\n v = segment;\n segment = undefined;\n }\n\n if (v === undefined) {\n segments = this.segment(segment, v, build);\n if (!isArray(segments)) {\n segments = segments !== undefined ? URI.decode(segments) : undefined;\n } else {\n for (i = 0, l = segments.length; i < l; i++) {\n segments[i] = URI.decode(segments[i]);\n }\n }\n\n return segments;\n }\n\n if (!isArray(v)) {\n v = (typeof v === 'string' || v instanceof String) ? URI.encode(v) : v;\n } else {\n for (i = 0, l = v.length; i < l; i++) {\n v[i] = URI.encode(v[i]);\n }\n }\n\n return this.segment(segment, v, build);\n };\n\n // mutating query string\n var q = p.query;\n p.query = function(v, build) {\n if (v === true) {\n return URI.parseQuery(this._parts.query, this._parts.escapeQuerySpace);\n } else if (typeof v === 'function') {\n var data = URI.parseQuery(this._parts.query, this._parts.escapeQuerySpace);\n var result = v.call(this, data);\n this._parts.query = URI.buildQuery(result || data, this._parts.duplicateQueryParameters, this._parts.escapeQuerySpace);\n this.build(!build);\n return this;\n } else if (v !== undefined && typeof v !== 'string') {\n this._parts.query = URI.buildQuery(v, this._parts.duplicateQueryParameters, this._parts.escapeQuerySpace);\n this.build(!build);\n return this;\n } else {\n return q.call(this, v, build);\n }\n };\n p.setQuery = function(name, value, build) {\n var data = URI.parseQuery(this._parts.query, this._parts.escapeQuerySpace);\n\n if (typeof name === 'string' || name instanceof String) {\n data[name] = value !== undefined ? value : null;\n } else if (typeof name === 'object') {\n for (var key in name) {\n if (hasOwn.call(name, key)) {\n data[key] = name[key];\n }\n }\n } else {\n throw new TypeError('URI.addQuery() accepts an object, string as the name parameter');\n }\n\n this._parts.query = URI.buildQuery(data, this._parts.duplicateQueryParameters, this._parts.escapeQuerySpace);\n if (typeof name !== 'string') {\n build = value;\n }\n\n this.build(!build);\n return this;\n };\n p.addQuery = function(name, value, build) {\n var data = URI.parseQuery(this._parts.query, this._parts.escapeQuerySpace);\n URI.addQuery(data, name, value === undefined ? null : value);\n this._parts.query = URI.buildQuery(data, this._parts.duplicateQueryParameters, this._parts.escapeQuerySpace);\n if (typeof name !== 'string') {\n build = value;\n }\n\n this.build(!build);\n return this;\n };\n p.removeQuery = function(name, value, build) {\n var data = URI.parseQuery(this._parts.query, this._parts.escapeQuerySpace);\n URI.removeQuery(data, name, value);\n this._parts.query = URI.buildQuery(data, this._parts.duplicateQueryParameters, this._parts.escapeQuerySpace);\n if (typeof name !== 'string') {\n build = value;\n }\n\n this.build(!build);\n return this;\n };\n p.hasQuery = function(name, value, withinArray) {\n var data = URI.parseQuery(this._parts.query, this._parts.escapeQuerySpace);\n return URI.hasQuery(data, name, value, withinArray);\n };\n p.setSearch = p.setQuery;\n p.addSearch = p.addQuery;\n p.removeSearch = p.removeQuery;\n p.hasSearch = p.hasQuery;\n\n // sanitizing URLs\n p.normalize = function() {\n if (this._parts.urn) {\n return this\n .normalizeProtocol(false)\n .normalizePath(false)\n .normalizeQuery(false)\n .normalizeFragment(false)\n .build();\n }\n\n return this\n .normalizeProtocol(false)\n .normalizeHostname(false)\n .normalizePort(false)\n .normalizePath(false)\n .normalizeQuery(false)\n .normalizeFragment(false)\n .build();\n };\n p.normalizeProtocol = function(build) {\n if (typeof this._parts.protocol === 'string') {\n this._parts.protocol = this._parts.protocol.toLowerCase();\n this.build(!build);\n }\n\n return this;\n };\n p.normalizeHostname = function(build) {\n if (this._parts.hostname) {\n if (this.is('IDN') && punycode) {\n this._parts.hostname = punycode.toASCII(this._parts.hostname);\n } else if (this.is('IPv6') && IPv6) {\n this._parts.hostname = IPv6.best(this._parts.hostname);\n }\n\n this._parts.hostname = this._parts.hostname.toLowerCase();\n this.build(!build);\n }\n\n return this;\n };\n p.normalizePort = function(build) {\n // remove port of it's the protocol's default\n if (typeof this._parts.protocol === 'string' && this._parts.port === URI.defaultPorts[this._parts.protocol]) {\n this._parts.port = null;\n this.build(!build);\n }\n\n return this;\n };\n p.normalizePath = function(build) {\n var _path = this._parts.path;\n if (!_path) {\n return this;\n }\n\n if (this._parts.urn) {\n this._parts.path = URI.recodeUrnPath(this._parts.path);\n this.build(!build);\n return this;\n }\n\n if (this._parts.path === '/') {\n return this;\n }\n\n _path = URI.recodePath(_path);\n\n var _was_relative;\n var _leadingParents = '';\n var _parent, _pos;\n\n // handle relative paths\n if (_path.charAt(0) !== '/') {\n _was_relative = true;\n _path = '/' + _path;\n }\n\n // handle relative files (as opposed to directories)\n if (_path.slice(-3) === '/..' || _path.slice(-2) === '/.') {\n _path += '/';\n }\n\n // resolve simples\n _path = _path\n .replace(/(\\/(\\.\\/)+)|(\\/\\.$)/g, '/')\n .replace(/\\/{2,}/g, '/');\n\n // remember leading parents\n if (_was_relative) {\n _leadingParents = _path.substring(1).match(/^(\\.\\.\\/)+/) || '';\n if (_leadingParents) {\n _leadingParents = _leadingParents[0];\n }\n }\n\n // resolve parents\n while (true) {\n _parent = _path.search(/\\/\\.\\.(\\/|$)/);\n if (_parent === -1) {\n // no more ../ to resolve\n break;\n } else if (_parent === 0) {\n // top level cannot be relative, skip it\n _path = _path.substring(3);\n continue;\n }\n\n _pos = _path.substring(0, _parent).lastIndexOf('/');\n if (_pos === -1) {\n _pos = _parent;\n }\n _path = _path.substring(0, _pos) + _path.substring(_parent + 3);\n }\n\n // revert to relative\n if (_was_relative && this.is('relative')) {\n _path = _leadingParents + _path.substring(1);\n }\n\n this._parts.path = _path;\n this.build(!build);\n return this;\n };\n p.normalizePathname = p.normalizePath;\n p.normalizeQuery = function(build) {\n if (typeof this._parts.query === 'string') {\n if (!this._parts.query.length) {\n this._parts.query = null;\n } else {\n this.query(URI.parseQuery(this._parts.query, this._parts.escapeQuerySpace));\n }\n\n this.build(!build);\n }\n\n return this;\n };\n p.normalizeFragment = function(build) {\n if (!this._parts.fragment) {\n this._parts.fragment = null;\n this.build(!build);\n }\n\n return this;\n };\n p.normalizeSearch = p.normalizeQuery;\n p.normalizeHash = p.normalizeFragment;\n\n p.iso8859 = function() {\n // expect unicode input, iso8859 output\n var e = URI.encode;\n var d = URI.decode;\n\n URI.encode = escape;\n URI.decode = decodeURIComponent;\n try {\n this.normalize();\n } finally {\n URI.encode = e;\n URI.decode = d;\n }\n return this;\n };\n\n p.unicode = function() {\n // expect iso8859 input, unicode output\n var e = URI.encode;\n var d = URI.decode;\n\n URI.encode = strictEncodeURIComponent;\n URI.decode = unescape;\n try {\n this.normalize();\n } finally {\n URI.encode = e;\n URI.decode = d;\n }\n return this;\n };\n\n p.readable = function() {\n var uri = this.clone();\n // removing username, password, because they shouldn't be displayed according to RFC 3986\n uri.username('').password('').normalize();\n var t = '';\n if (uri._parts.protocol) {\n t += uri._parts.protocol + '://';\n }\n\n if (uri._parts.hostname) {\n if (uri.is('punycode') && punycode) {\n t += punycode.toUnicode(uri._parts.hostname);\n if (uri._parts.port) {\n t += ':' + uri._parts.port;\n }\n } else {\n t += uri.host();\n }\n }\n\n if (uri._parts.hostname && uri._parts.path && uri._parts.path.charAt(0) !== '/') {\n t += '/';\n }\n\n t += uri.path(true);\n if (uri._parts.query) {\n var q = '';\n for (var i = 0, qp = uri._parts.query.split('&'), l = qp.length; i < l; i++) {\n var kv = (qp[i] || '').split('=');\n q += '&' + URI.decodeQuery(kv[0], this._parts.escapeQuerySpace)\n .replace(/&/g, '%26');\n\n if (kv[1] !== undefined) {\n q += '=' + URI.decodeQuery(kv[1], this._parts.escapeQuerySpace)\n .replace(/&/g, '%26');\n }\n }\n t += '?' + q.substring(1);\n }\n\n t += URI.decodeQuery(uri.hash(), true);\n return t;\n };\n\n // resolving relative and absolute URLs\n p.absoluteTo = function(base) {\n var resolved = this.clone();\n var properties = ['protocol', 'username', 'password', 'hostname', 'port'];\n var basedir, i, p;\n\n if (this._parts.urn) {\n throw new Error('URNs do not have any generally defined hierarchical components');\n }\n\n if (!(base instanceof URI)) {\n base = new URI(base);\n }\n\n if (resolved._parts.protocol) {\n // Directly returns even if this._parts.hostname is empty.\n return resolved;\n } else {\n resolved._parts.protocol = base._parts.protocol;\n }\n\n if (this._parts.hostname) {\n return resolved;\n }\n\n for (i = 0; (p = properties[i]); i++) {\n resolved._parts[p] = base._parts[p];\n }\n\n if (!resolved._parts.path) {\n resolved._parts.path = base._parts.path;\n if (!resolved._parts.query) {\n resolved._parts.query = base._parts.query;\n }\n } else {\n if (resolved._parts.path.substring(-2) === '..') {\n resolved._parts.path += '/';\n }\n\n if (resolved.path().charAt(0) !== '/') {\n basedir = base.directory();\n basedir = basedir ? basedir : base.path().indexOf('/') === 0 ? '/' : '';\n resolved._parts.path = (basedir ? (basedir + '/') : '') + resolved._parts.path;\n resolved.normalizePath();\n }\n }\n\n resolved.build();\n return resolved;\n };\n p.relativeTo = function(base) {\n var relative = this.clone().normalize();\n var relativeParts, baseParts, common, relativePath, basePath;\n\n if (relative._parts.urn) {\n throw new Error('URNs do not have any generally defined hierarchical components');\n }\n\n base = new URI(base).normalize();\n relativeParts = relative._parts;\n baseParts = base._parts;\n relativePath = relative.path();\n basePath = base.path();\n\n if (relativePath.charAt(0) !== '/') {\n throw new Error('URI is already relative');\n }\n\n if (basePath.charAt(0) !== '/') {\n throw new Error('Cannot calculate a URI relative to another relative URI');\n }\n\n if (relativeParts.protocol === baseParts.protocol) {\n relativeParts.protocol = null;\n }\n\n if (relativeParts.username !== baseParts.username || relativeParts.password !== baseParts.password) {\n return relative.build();\n }\n\n if (relativeParts.protocol !== null || relativeParts.username !== null || relativeParts.password !== null) {\n return relative.build();\n }\n\n if (relativeParts.hostname === baseParts.hostname && relativeParts.port === baseParts.port) {\n relativeParts.hostname = null;\n relativeParts.port = null;\n } else {\n return relative.build();\n }\n\n if (relativePath === basePath) {\n relativeParts.path = '';\n return relative.build();\n }\n\n // determine common sub path\n common = URI.commonPath(relativePath, basePath);\n\n // If the paths have nothing in common, return a relative URL with the absolute path.\n if (!common) {\n return relative.build();\n }\n\n var parents = baseParts.path\n .substring(common.length)\n .replace(/[^\\/]*$/, '')\n .replace(/.*?\\//g, '../');\n\n relativeParts.path = (parents + relativeParts.path.substring(common.length)) || './';\n\n return relative.build();\n };\n\n // comparing URIs\n p.equals = function(uri) {\n var one = this.clone();\n var two = new URI(uri);\n var one_map = {};\n var two_map = {};\n var checked = {};\n var one_query, two_query, key;\n\n one.normalize();\n two.normalize();\n\n // exact match\n if (one.toString() === two.toString()) {\n return true;\n }\n\n // extract query string\n one_query = one.query();\n two_query = two.query();\n one.query('');\n two.query('');\n\n // definitely not equal if not even non-query parts match\n if (one.toString() !== two.toString()) {\n return false;\n }\n\n // query parameters have the same length, even if they're permuted\n if (one_query.length !== two_query.length) {\n return false;\n }\n\n one_map = URI.parseQuery(one_query, this._parts.escapeQuerySpace);\n two_map = URI.parseQuery(two_query, this._parts.escapeQuerySpace);\n\n for (key in one_map) {\n if (hasOwn.call(one_map, key)) {\n if (!isArray(one_map[key])) {\n if (one_map[key] !== two_map[key]) {\n return false;\n }\n } else if (!arraysEqual(one_map[key], two_map[key])) {\n return false;\n }\n\n checked[key] = true;\n }\n }\n\n for (key in two_map) {\n if (hasOwn.call(two_map, key)) {\n if (!checked[key]) {\n // two contains a parameter not present in one\n return false;\n }\n }\n }\n\n return true;\n };\n\n // state\n p.preventInvalidHostname = function(v) {\n this._parts.preventInvalidHostname = !!v;\n return this;\n };\n\n p.duplicateQueryParameters = function(v) {\n this._parts.duplicateQueryParameters = !!v;\n return this;\n };\n\n p.escapeQuerySpace = function(v) {\n this._parts.escapeQuerySpace = !!v;\n return this;\n };\n\n return URI;\n}));\n","/**\n * @private\n */\nfunction appendForwardSlash(url) {\n if (url.length === 0 || url[url.length - 1] !== \"/\") {\n url = `${url}/`;\n }\n return url;\n}\nexport default appendForwardSlash;\n","import defaultValue from \"./defaultValue.js\";\n\n/**\n * Clones an object, returning a new object containing the same properties.\n *\n * @function\n *\n * @param {object} object The object to clone.\n * @param {boolean} [deep=false] If true, all properties will be deep cloned recursively.\n * @returns {object} The cloned object.\n */\nfunction clone(object, deep) {\n if (object === null || typeof object !== \"object\") {\n return object;\n }\n\n deep = defaultValue(deep, false);\n\n const result = new object.constructor();\n for (const propertyName in object) {\n if (object.hasOwnProperty(propertyName)) {\n let value = object[propertyName];\n if (deep) {\n value = clone(value, deep);\n }\n result[propertyName] = value;\n }\n }\n\n return result;\n}\nexport default clone;\n","import defaultValue from \"./defaultValue.js\";\nimport defined from \"./defined.js\";\n\n/**\n * Merges two objects, copying their properties onto a new combined object. When two objects have the same\n * property, the value of the property on the first object is used. If either object is undefined,\n * it will be treated as an empty object.\n *\n * @example\n * const object1 = {\n * propOne : 1,\n * propTwo : {\n * value1 : 10\n * }\n * }\n * const object2 = {\n * propTwo : 2\n * }\n * const final = Cesium.combine(object1, object2);\n *\n * // final === {\n * // propOne : 1,\n * // propTwo : {\n * // value1 : 10\n * // }\n * // }\n *\n * @param {object} [object1] The first object to merge.\n * @param {object} [object2] The second object to merge.\n * @param {boolean} [deep=false] Perform a recursive merge.\n * @returns {object} The combined object containing all properties from both objects.\n *\n * @function\n */\nfunction combine(object1, object2, deep) {\n deep = defaultValue(deep, false);\n\n const result = {};\n\n const object1Defined = defined(object1);\n const object2Defined = defined(object2);\n let property;\n let object1Value;\n let object2Value;\n if (object1Defined) {\n for (property in object1) {\n if (object1.hasOwnProperty(property)) {\n object1Value = object1[property];\n if (\n object2Defined &&\n deep &&\n typeof object1Value === \"object\" &&\n object2.hasOwnProperty(property)\n ) {\n object2Value = object2[property];\n if (typeof object2Value === \"object\") {\n result[property] = combine(object1Value, object2Value, deep);\n } else {\n result[property] = object1Value;\n }\n } else {\n result[property] = object1Value;\n }\n }\n }\n }\n if (object2Defined) {\n for (property in object2) {\n if (\n object2.hasOwnProperty(property) &&\n !result.hasOwnProperty(property)\n ) {\n object2Value = object2[property];\n result[property] = object2Value;\n }\n }\n }\n return result;\n}\nexport default combine;\n","/**\n * A function used to resolve a promise upon completion .\n * @callback defer.resolve\n *\n * @param {*} value The resulting value.\n */\n\n/**\n * A function used to reject a promise upon failure.\n * @callback defer.reject\n *\n * @param {*} error The error.\n */\n\n/**\n * An object which contains a promise object, and functions to resolve or reject the promise.\n *\n * @typedef {object} defer.deferred\n * @property {defer.resolve} resolve Resolves the promise when called.\n * @property {defer.reject} reject Rejects the promise when called.\n * @property {Promise} promise Promise object.\n */\n\n/**\n * Creates a deferred object, containing a promise object, and functions to resolve or reject the promise.\n * @returns {defer.deferred}\n * @private\n */\nfunction defer() {\n let resolve;\n let reject;\n const promise = new Promise(function (res, rej) {\n resolve = res;\n reject = rej;\n });\n\n return {\n resolve: resolve,\n reject: reject,\n promise: promise,\n };\n}\n\nexport default defer;\n","import Uri from \"urijs\";\nimport defaultValue from \"./defaultValue.js\";\nimport defined from \"./defined.js\";\nimport DeveloperError from \"./DeveloperError.js\";\n\n/**\n * Given a relative Uri and a base Uri, returns the absolute Uri of the relative Uri.\n * @function\n *\n * @param {string} relative The relative Uri.\n * @param {string} [base] The base Uri.\n * @returns {string} The absolute Uri of the given relative Uri.\n *\n * @example\n * //absolute Uri will be \"https://test.com/awesome.png\";\n * const absoluteUri = Cesium.getAbsoluteUri('awesome.png', 'https://test.com');\n */\nfunction getAbsoluteUri(relative, base) {\n let documentObject;\n if (typeof document !== \"undefined\") {\n documentObject = document;\n }\n\n return getAbsoluteUri._implementation(relative, base, documentObject);\n}\n\ngetAbsoluteUri._implementation = function (relative, base, documentObject) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(relative)) {\n throw new DeveloperError(\"relative uri is required.\");\n }\n //>>includeEnd('debug');\n\n if (!defined(base)) {\n if (typeof documentObject === \"undefined\") {\n return relative;\n }\n base = defaultValue(documentObject.baseURI, documentObject.location.href);\n }\n\n const relativeUri = new Uri(relative);\n if (relativeUri.scheme() !== \"\") {\n return relativeUri.toString();\n }\n return relativeUri.absoluteTo(base).toString();\n};\nexport default getAbsoluteUri;\n","import Uri from \"urijs\";\nimport defined from \"./defined.js\";\nimport DeveloperError from \"./DeveloperError.js\";\n\n/**\n * Given a URI, returns the base path of the URI.\n * @function\n *\n * @param {string} uri The Uri.\n * @param {boolean} [includeQuery = false] Whether or not to include the query string and fragment form the uri\n * @returns {string} The base path of the Uri.\n *\n * @example\n * // basePath will be \"/Gallery/\";\n * const basePath = Cesium.getBaseUri('/Gallery/simple.czml?value=true&example=false');\n *\n * // basePath will be \"/Gallery/?value=true&example=false\";\n * const basePath = Cesium.getBaseUri('/Gallery/simple.czml?value=true&example=false', true);\n */\nfunction getBaseUri(uri, includeQuery) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(uri)) {\n throw new DeveloperError(\"uri is required.\");\n }\n //>>includeEnd('debug');\n\n let basePath = \"\";\n const i = uri.lastIndexOf(\"/\");\n if (i !== -1) {\n basePath = uri.substring(0, i + 1);\n }\n\n if (!includeQuery) {\n return basePath;\n }\n\n uri = new Uri(uri);\n if (uri.query().length !== 0) {\n basePath += `?${uri.query()}`;\n }\n if (uri.fragment().length !== 0) {\n basePath += `#${uri.fragment()}`;\n }\n\n return basePath;\n}\nexport default getBaseUri;\n","import Uri from \"urijs\";\nimport defined from \"./defined.js\";\nimport DeveloperError from \"./DeveloperError.js\";\n\n/**\n * Given a URI, returns the extension of the URI.\n * @function getExtensionFromUri\n *\n * @param {string} uri The Uri.\n * @returns {string} The extension of the Uri.\n *\n * @example\n * //extension will be \"czml\";\n * const extension = Cesium.getExtensionFromUri('/Gallery/simple.czml?value=true&example=false');\n */\nfunction getExtensionFromUri(uri) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(uri)) {\n throw new DeveloperError(\"uri is required.\");\n }\n //>>includeEnd('debug');\n\n const uriObject = new Uri(uri);\n uriObject.normalize();\n let path = uriObject.path();\n let index = path.lastIndexOf(\"/\");\n if (index !== -1) {\n path = path.substr(index + 1);\n }\n index = path.lastIndexOf(\".\");\n if (index === -1) {\n path = \"\";\n } else {\n path = path.substr(index + 1);\n }\n return path;\n}\nexport default getExtensionFromUri;\n","import defined from \"./defined.js\";\n\nconst context2DsByWidthAndHeight = {};\n\n/**\n * Extract a pixel array from a loaded image. Draws the image\n * into a canvas so it can read the pixels back.\n *\n * @function getImagePixels\n *\n * @param {HTMLImageElement|ImageBitmap} image The image to extract pixels from.\n * @param {number} width The width of the image. If not defined, then image.width is assigned.\n * @param {number} height The height of the image. If not defined, then image.height is assigned.\n * @returns {ImageData} The pixels of the image.\n */\nfunction getImagePixels(image, width, height) {\n if (!defined(width)) {\n width = image.width;\n }\n if (!defined(height)) {\n height = image.height;\n }\n\n let context2DsByHeight = context2DsByWidthAndHeight[width];\n if (!defined(context2DsByHeight)) {\n context2DsByHeight = {};\n context2DsByWidthAndHeight[width] = context2DsByHeight;\n }\n\n let context2d = context2DsByHeight[height];\n if (!defined(context2d)) {\n const canvas = document.createElement(\"canvas\");\n canvas.width = width;\n canvas.height = height;\n // Since we re-use contexts, use the willReadFrequently option – See https://html.spec.whatwg.org/multipage/canvas.html#concept-canvas-will-read-frequently\n context2d = canvas.getContext(\"2d\", { willReadFrequently: true });\n context2d.globalCompositeOperation = \"copy\";\n context2DsByHeight[height] = context2d;\n }\n\n context2d.drawImage(image, 0, 0, width, height);\n return context2d.getImageData(0, 0, width, height).data;\n}\nexport default getImagePixels;\n","import Check from \"./Check.js\";\n\nconst blobUriRegex = /^blob:/i;\n\n/**\n * Determines if the specified uri is a blob uri.\n *\n * @function isBlobUri\n *\n * @param {string} uri The uri to test.\n * @returns {boolean} true when the uri is a blob uri; otherwise, false.\n *\n * @private\n */\nfunction isBlobUri(uri) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.string(\"uri\", uri);\n //>>includeEnd('debug');\n\n return blobUriRegex.test(uri);\n}\nexport default isBlobUri;\n","import defined from \"./defined.js\";\n\nlet a;\n\n/**\n * Given a URL, determine whether that URL is considered cross-origin to the current page.\n *\n * @private\n */\nfunction isCrossOriginUrl(url) {\n if (!defined(a)) {\n a = document.createElement(\"a\");\n }\n\n // copy window location into the anchor to get consistent results\n // when the port is default for the protocol (e.g. 80 for HTTP)\n a.href = window.location.href;\n\n // host includes both hostname and port if the port is not standard\n const host = a.host;\n const protocol = a.protocol;\n\n a.href = url;\n // IE only absolutizes href on get, not set\n // eslint-disable-next-line no-self-assign\n a.href = a.href;\n\n return protocol !== a.protocol || host !== a.host;\n}\nexport default isCrossOriginUrl;\n","import Check from \"./Check.js\";\n\nconst dataUriRegex = /^data:/i;\n\n/**\n * Determines if the specified uri is a data uri.\n *\n * @function isDataUri\n *\n * @param {string} uri The uri to test.\n * @returns {boolean} true when the uri is a data uri; otherwise, false.\n *\n * @private\n */\nfunction isDataUri(uri) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.string(\"uri\", uri);\n //>>includeEnd('debug');\n\n return dataUriRegex.test(uri);\n}\nexport default isDataUri;\n","/**\n * @private\n */\nfunction loadAndExecuteScript(url) {\n const script = document.createElement(\"script\");\n script.async = true;\n script.src = url;\n\n return new Promise((resolve, reject) => {\n if (window.crossOriginIsolated) {\n script.setAttribute(\"crossorigin\", \"anonymous\");\n }\n\n const head = document.getElementsByTagName(\"head\")[0];\n script.onload = function () {\n script.onload = undefined;\n head.removeChild(script);\n resolve();\n };\n script.onerror = function (e) {\n reject(e);\n };\n\n head.appendChild(script);\n });\n}\nexport default loadAndExecuteScript;\n","import defined from \"./defined.js\";\nimport DeveloperError from \"./DeveloperError.js\";\n\n/**\n * Converts an object representing a set of name/value pairs into a query string,\n * with names and values encoded properly for use in a URL. Values that are arrays\n * will produce multiple values with the same name.\n * @function objectToQuery\n *\n * @param {object} obj The object containing data to encode.\n * @returns {string} An encoded query string.\n *\n *\n * @example\n * const str = Cesium.objectToQuery({\n * key1 : 'some value',\n * key2 : 'a/b',\n * key3 : ['x', 'y']\n * });\n *\n * @see queryToObject\n * // str will be:\n * // 'key1=some%20value&key2=a%2Fb&key3=x&key3=y'\n */\nfunction objectToQuery(obj) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(obj)) {\n throw new DeveloperError(\"obj is required.\");\n }\n //>>includeEnd('debug');\n\n let result = \"\";\n for (const propName in obj) {\n if (obj.hasOwnProperty(propName)) {\n const value = obj[propName];\n\n const part = `${encodeURIComponent(propName)}=`;\n if (Array.isArray(value)) {\n for (let i = 0, len = value.length; i < len; ++i) {\n result += `${part + encodeURIComponent(value[i])}&`;\n }\n } else {\n result += `${part + encodeURIComponent(value)}&`;\n }\n }\n }\n\n // trim last &\n result = result.slice(0, -1);\n\n // This function used to replace %20 with + which is more compact and readable.\n // However, some servers didn't properly handle + as a space.\n // https://github.com/CesiumGS/cesium/issues/2192\n\n return result;\n}\nexport default objectToQuery;\n","import defined from \"./defined.js\";\nimport DeveloperError from \"./DeveloperError.js\";\n\n/**\n * Parses a query string into an object, where the keys and values of the object are the\n * name/value pairs from the query string, decoded. If a name appears multiple times,\n * the value in the object will be an array of values.\n * @function queryToObject\n *\n * @param {string} queryString The query string.\n * @returns {object} An object containing the parameters parsed from the query string.\n *\n *\n * @example\n * const obj = Cesium.queryToObject('key1=some%20value&key2=a%2Fb&key3=x&key3=y');\n * // obj will be:\n * // {\n * // key1 : 'some value',\n * // key2 : 'a/b',\n * // key3 : ['x', 'y']\n * // }\n *\n * @see objectToQuery\n */\nfunction queryToObject(queryString) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(queryString)) {\n throw new DeveloperError(\"queryString is required.\");\n }\n //>>includeEnd('debug');\n\n const result = {};\n if (queryString === \"\") {\n return result;\n }\n const parts = queryString.replace(/\\+/g, \"%20\").split(/[&;]/);\n for (let i = 0, len = parts.length; i < len; ++i) {\n const subparts = parts[i].split(\"=\");\n\n const name = decodeURIComponent(subparts[0]);\n let value = subparts[1];\n if (defined(value)) {\n value = decodeURIComponent(value);\n } else {\n value = \"\";\n }\n\n const resultValue = result[name];\n if (typeof resultValue === \"string\") {\n // expand the single value to an array\n result[name] = [resultValue, value];\n } else if (Array.isArray(resultValue)) {\n resultValue.push(value);\n } else {\n result[name] = value;\n }\n }\n return result;\n}\nexport default queryToObject;\n","import defaultValue from \"./defaultValue.js\";\nimport defined from \"./defined.js\";\nimport RequestState from \"./RequestState.js\";\nimport RequestType from \"./RequestType.js\";\n\n/**\n * Stores information for making a request. In general this does not need to be constructed directly.\n *\n * @alias Request\n * @constructor\n\n * @param {object} [options] An object with the following properties:\n * @param {string} [options.url] The url to request.\n * @param {Request.RequestCallback} [options.requestFunction] The function that makes the actual data request.\n * @param {Request.CancelCallback} [options.cancelFunction] The function that is called when the request is cancelled.\n * @param {Request.PriorityCallback} [options.priorityFunction] The function that is called to update the request's priority, which occurs once per frame.\n * @param {number} [options.priority=0.0] The initial priority of the request.\n * @param {boolean} [options.throttle=false] Whether to throttle and prioritize the request. If false, the request will be sent immediately. If true, the request will be throttled and sent based on priority.\n * @param {boolean} [options.throttleByServer=false] Whether to throttle the request by server.\n * @param {RequestType} [options.type=RequestType.OTHER] The type of request.\n * @param {string} [options.serverKey] A key used to identify the server that a request is going to.\n */\nfunction Request(options) {\n options = defaultValue(options, defaultValue.EMPTY_OBJECT);\n\n const throttleByServer = defaultValue(options.throttleByServer, false);\n const throttle = defaultValue(options.throttle, false);\n\n /**\n * The URL to request.\n *\n * @type {string}\n */\n this.url = options.url;\n\n /**\n * The function that makes the actual data request.\n *\n * @type {Request.RequestCallback}\n */\n this.requestFunction = options.requestFunction;\n\n /**\n * The function that is called when the request is cancelled.\n *\n * @type {Request.CancelCallback}\n */\n this.cancelFunction = options.cancelFunction;\n\n /**\n * The function that is called to update the request's priority, which occurs once per frame.\n *\n * @type {Request.PriorityCallback}\n */\n this.priorityFunction = options.priorityFunction;\n\n /**\n * Priority is a unit-less value where lower values represent higher priority.\n * For world-based objects, this is usually the distance from the camera.\n * A request that does not have a priority function defaults to a priority of 0.\n *\n * If priorityFunction is defined, this value is updated every frame with the result of that call.\n *\n * @type {number}\n * @default 0.0\n */\n this.priority = defaultValue(options.priority, 0.0);\n\n /**\n * Whether to throttle and prioritize the request. If false, the request will be sent immediately. If true, the\n * request will be throttled and sent based on priority.\n *\n * @type {boolean}\n * @readonly\n *\n * @default false\n */\n this.throttle = throttle;\n\n /**\n * Whether to throttle the request by server. Browsers typically support about 6-8 parallel connections\n * for HTTP/1 servers, and an unlimited amount of connections for HTTP/2 servers. Setting this value\n * to true is preferable for requests going through HTTP/1 servers.\n *\n * @type {boolean}\n * @readonly\n *\n * @default false\n */\n this.throttleByServer = throttleByServer;\n\n /**\n * Type of request.\n *\n * @type {RequestType}\n * @readonly\n *\n * @default RequestType.OTHER\n */\n this.type = defaultValue(options.type, RequestType.OTHER);\n\n /**\n * A key used to identify the server that a request is going to. It is derived from the url's authority and scheme.\n *\n * @type {string}\n *\n * @private\n */\n this.serverKey = options.serverKey;\n\n /**\n * The current state of the request.\n *\n * @type {RequestState}\n * @readonly\n */\n this.state = RequestState.UNISSUED;\n\n /**\n * The requests's deferred promise.\n *\n * @type {object}\n *\n * @private\n */\n this.deferred = undefined;\n\n /**\n * Whether the request was explicitly cancelled.\n *\n * @type {boolean}\n *\n * @private\n */\n this.cancelled = false;\n}\n\n/**\n * Mark the request as cancelled.\n *\n * @private\n */\nRequest.prototype.cancel = function () {\n this.cancelled = true;\n};\n\n/**\n * Duplicates a Request instance.\n *\n * @param {Request} [result] The object onto which to store the result.\n *\n * @returns {Request} The modified result parameter or a new Resource instance if one was not provided.\n */\nRequest.prototype.clone = function (result) {\n if (!defined(result)) {\n return new Request(this);\n }\n\n result.url = this.url;\n result.requestFunction = this.requestFunction;\n result.cancelFunction = this.cancelFunction;\n result.priorityFunction = this.priorityFunction;\n result.priority = this.priority;\n result.throttle = this.throttle;\n result.throttleByServer = this.throttleByServer;\n result.type = this.type;\n result.serverKey = this.serverKey;\n\n // These get defaulted because the cloned request hasn't been issued\n result.state = RequestState.UNISSUED;\n result.deferred = undefined;\n result.cancelled = false;\n\n return result;\n};\n\n/**\n * The function that makes the actual data request.\n * @callback Request.RequestCallback\n * @returns {Promise} A promise for the requested data.\n */\n\n/**\n * The function that is called when the request is cancelled.\n * @callback Request.CancelCallback\n */\n\n/**\n * The function that is called to update the request's priority, which occurs once per frame.\n * @callback Request.PriorityCallback\n * @returns {number} The updated priority value.\n */\nexport default Request;\n","/**\n * State of the request.\n *\n * @enum {number}\n */\nconst RequestState = {\n /**\n * Initial unissued state.\n *\n * @type {number}\n * @constant\n */\n UNISSUED: 0,\n\n /**\n * Issued but not yet active. Will become active when open slots are available.\n *\n * @type {number}\n * @constant\n */\n ISSUED: 1,\n\n /**\n * Actual http request has been sent.\n *\n * @type {number}\n * @constant\n */\n ACTIVE: 2,\n\n /**\n * Request completed successfully.\n *\n * @type {number}\n * @constant\n */\n RECEIVED: 3,\n\n /**\n * Request was cancelled, either explicitly or automatically because of low priority.\n *\n * @type {number}\n * @constant\n */\n CANCELLED: 4,\n\n /**\n * Request failed.\n *\n * @type {number}\n * @constant\n */\n FAILED: 5,\n};\nexport default Object.freeze(RequestState);\n","/**\n * An enum identifying the type of request. Used for finer grained logging and priority sorting.\n *\n * @enum {number}\n */\nconst RequestType = {\n /**\n * Terrain request.\n *\n * @type {number}\n * @constant\n */\n TERRAIN: 0,\n\n /**\n * Imagery request.\n *\n * @type {number}\n * @constant\n */\n IMAGERY: 1,\n\n /**\n * 3D Tiles request.\n *\n * @type {number}\n * @constant\n */\n TILES3D: 2,\n\n /**\n * Other request.\n *\n * @type {number}\n * @constant\n */\n OTHER: 3,\n};\nexport default Object.freeze(RequestType);\n","import defined from \"./defined.js\";\nimport parseResponseHeaders from \"./parseResponseHeaders.js\";\n\n/**\n * An event that is raised when a request encounters an error.\n *\n * @constructor\n * @alias RequestErrorEvent\n *\n * @param {number} [statusCode] The HTTP error status code, such as 404.\n * @param {object} [response] The response included along with the error.\n * @param {string|object} [responseHeaders] The response headers, represented either as an object literal or as a\n * string in the format returned by XMLHttpRequest's getAllResponseHeaders() function.\n */\nfunction RequestErrorEvent(statusCode, response, responseHeaders) {\n /**\n * The HTTP error status code, such as 404. If the error does not have a particular\n * HTTP code, this property will be undefined.\n *\n * @type {number}\n */\n this.statusCode = statusCode;\n\n /**\n * The response included along with the error. If the error does not include a response,\n * this property will be undefined.\n *\n * @type {object}\n */\n this.response = response;\n\n /**\n * The headers included in the response, represented as an object literal of key/value pairs.\n * If the error does not include any headers, this property will be undefined.\n *\n * @type {object}\n */\n this.responseHeaders = responseHeaders;\n\n if (typeof this.responseHeaders === \"string\") {\n this.responseHeaders = parseResponseHeaders(this.responseHeaders);\n }\n}\n\n/**\n * Creates a string representing this RequestErrorEvent.\n * @memberof RequestErrorEvent\n *\n * @returns {string} A string representing the provided RequestErrorEvent.\n */\nRequestErrorEvent.prototype.toString = function () {\n let str = \"Request has failed.\";\n if (defined(this.statusCode)) {\n str += ` Status Code: ${this.statusCode}`;\n }\n return str;\n};\nexport default RequestErrorEvent;\n","/**\n * Parses the result of XMLHttpRequest's getAllResponseHeaders() method into\n * a dictionary.\n *\n * @function parseResponseHeaders\n *\n * @param {string} headerString The header string returned by getAllResponseHeaders(). The format is\n * described here: http://www.w3.org/TR/XMLHttpRequest/#the-getallresponseheaders()-method\n * @returns {object} A dictionary of key/value pairs, where each key is the name of a header and the corresponding value\n * is that header's value.\n *\n * @private\n */\nfunction parseResponseHeaders(headerString) {\n const headers = {};\n\n if (!headerString) {\n return headers;\n }\n\n const headerPairs = headerString.split(\"\\u000d\\u000a\");\n\n for (let i = 0; i < headerPairs.length; ++i) {\n const headerPair = headerPairs[i];\n // Can't use split() here because it does the wrong thing\n // if the header value has the string \": \" in it.\n const index = headerPair.indexOf(\"\\u003a\\u0020\");\n if (index > 0) {\n const key = headerPair.substring(0, index);\n const val = headerPair.substring(index + 2);\n headers[key] = val;\n }\n }\n\n return headers;\n}\nexport default parseResponseHeaders;\n","import Uri from \"urijs\";\nimport Check from \"./Check.js\";\nimport defaultValue from \"./defaultValue.js\";\nimport defer from \"./defer.js\";\nimport defined from \"./defined.js\";\nimport Event from \"./Event.js\";\nimport Heap from \"./Heap.js\";\nimport isBlobUri from \"./isBlobUri.js\";\nimport isDataUri from \"./isDataUri.js\";\nimport RequestState from \"./RequestState.js\";\n\nfunction sortRequests(a, b) {\n return a.priority - b.priority;\n}\n\nconst statistics = {\n numberOfAttemptedRequests: 0,\n numberOfActiveRequests: 0,\n numberOfCancelledRequests: 0,\n numberOfCancelledActiveRequests: 0,\n numberOfFailedRequests: 0,\n numberOfActiveRequestsEver: 0,\n lastNumberOfActiveRequests: 0,\n};\n\nlet priorityHeapLength = 20;\nconst requestHeap = new Heap({\n comparator: sortRequests,\n});\nrequestHeap.maximumLength = priorityHeapLength;\nrequestHeap.reserve(priorityHeapLength);\n\nconst activeRequests = [];\nlet numberOfActiveRequestsByServer = {};\n\nconst pageUri =\n typeof document !== \"undefined\" ? new Uri(document.location.href) : new Uri();\n\nconst requestCompletedEvent = new Event();\n\n/**\n * The request scheduler is used to track and constrain the number of active requests in order to prioritize incoming requests. The ability\n * to retain control over the number of requests in CesiumJS is important because due to events such as changes in the camera position,\n * a lot of new requests may be generated and a lot of in-flight requests may become redundant. The request scheduler manually constrains the\n * number of requests so that newer requests wait in a shorter queue and don't have to compete for bandwidth with requests that have expired.\n *\n * @namespace RequestScheduler\n *\n */\nfunction RequestScheduler() {}\n\n/**\n * The maximum number of simultaneous active requests. Un-throttled requests do not observe this limit.\n * @type {number}\n * @default 50\n */\nRequestScheduler.maximumRequests = 50;\n\n/**\n * The maximum number of simultaneous active requests per server. Un-throttled requests or servers specifically\n * listed in {@link requestsByServer} do not observe this limit.\n * @type {number}\n * @default 18\n */\nRequestScheduler.maximumRequestsPerServer = 18;\n\n/**\n * A per server key list of overrides to use for throttling instead of maximumRequestsPerServer.\n * Useful when streaming data from a known HTTP/2 or HTTP/3 server.\n * @type {object}\n *\n * @example\n * RequestScheduler.requestsByServer[\"myserver.com:443\"] = 18;\n *\n * @example\n * RequestScheduler.requestsByServer = {\n * \"api.cesium.com:443\": 18,\n * \"assets.cesium.com:443\": 18,\n * };\n */\nRequestScheduler.requestsByServer = {};\n\n/**\n * Specifies if the request scheduler should throttle incoming requests, or let the browser queue requests under its control.\n * @type {boolean}\n * @default true\n */\nRequestScheduler.throttleRequests = true;\n\n/**\n * When true, log statistics to the console every frame\n * @type {boolean}\n * @default false\n * @private\n */\nRequestScheduler.debugShowStatistics = false;\n\n/**\n * An event that's raised when a request is completed. Event handlers are passed\n * the error object if the request fails.\n *\n * @type {Event}\n * @default Event()\n * @private\n */\nRequestScheduler.requestCompletedEvent = requestCompletedEvent;\n\nObject.defineProperties(RequestScheduler, {\n /**\n * Returns the statistics used by the request scheduler.\n *\n * @memberof RequestScheduler\n *\n * @type {object}\n * @readonly\n * @private\n */\n statistics: {\n get: function () {\n return statistics;\n },\n },\n\n /**\n * The maximum size of the priority heap. This limits the number of requests that are sorted by priority. Only applies to requests that are not yet active.\n *\n * @memberof RequestScheduler\n *\n * @type {number}\n * @default 20\n * @private\n */\n priorityHeapLength: {\n get: function () {\n return priorityHeapLength;\n },\n set: function (value) {\n // If the new length shrinks the heap, need to cancel some of the requests.\n // Since this value is not intended to be tweaked regularly it is fine to just cancel the high priority requests.\n if (value < priorityHeapLength) {\n while (requestHeap.length > value) {\n const request = requestHeap.pop();\n cancelRequest(request);\n }\n }\n priorityHeapLength = value;\n requestHeap.maximumLength = value;\n requestHeap.reserve(value);\n },\n },\n});\n\nfunction updatePriority(request) {\n if (defined(request.priorityFunction)) {\n request.priority = request.priorityFunction();\n }\n}\n\n/**\n * Check if there are open slots for a particular server key. If desiredRequests is greater than 1, this checks if the queue has room for scheduling multiple requests.\n * @param {string} serverKey The server key returned by {@link RequestScheduler.getServerKey}.\n * @param {number} [desiredRequests=1] How many requests the caller plans to request\n * @return {boolean} True if there are enough open slots for desiredRequests more requests.\n * @private\n */\nRequestScheduler.serverHasOpenSlots = function (serverKey, desiredRequests) {\n desiredRequests = defaultValue(desiredRequests, 1);\n\n const maxRequests = defaultValue(\n RequestScheduler.requestsByServer[serverKey],\n RequestScheduler.maximumRequestsPerServer,\n );\n const hasOpenSlotsServer =\n numberOfActiveRequestsByServer[serverKey] + desiredRequests <= maxRequests;\n\n return hasOpenSlotsServer;\n};\n\n/**\n * Check if the priority heap has open slots, regardless of which server they\n * are from. This is used in {@link Multiple3DTileContent} for determining when\n * all requests can be scheduled\n * @param {number} desiredRequests The number of requests the caller intends to make\n * @return {boolean} true if the heap has enough available slots to meet the desiredRequests. false otherwise.\n *\n * @private\n */\nRequestScheduler.heapHasOpenSlots = function (desiredRequests) {\n const hasOpenSlotsHeap =\n requestHeap.length + desiredRequests <= priorityHeapLength;\n return hasOpenSlotsHeap;\n};\n\nfunction issueRequest(request) {\n if (request.state === RequestState.UNISSUED) {\n request.state = RequestState.ISSUED;\n request.deferred = defer();\n }\n return request.deferred.promise;\n}\n\nfunction getRequestReceivedFunction(request) {\n return function (results) {\n if (request.state === RequestState.CANCELLED) {\n // If the data request comes back but the request is cancelled, ignore it.\n return;\n }\n // explicitly set to undefined to ensure GC of request response data. See #8843\n const deferred = request.deferred;\n\n --statistics.numberOfActiveRequests;\n --numberOfActiveRequestsByServer[request.serverKey];\n requestCompletedEvent.raiseEvent();\n request.state = RequestState.RECEIVED;\n request.deferred = undefined;\n\n deferred.resolve(results);\n };\n}\n\nfunction getRequestFailedFunction(request) {\n return function (error) {\n if (request.state === RequestState.CANCELLED) {\n // If the data request comes back but the request is cancelled, ignore it.\n return;\n }\n ++statistics.numberOfFailedRequests;\n --statistics.numberOfActiveRequests;\n --numberOfActiveRequestsByServer[request.serverKey];\n requestCompletedEvent.raiseEvent(error);\n request.state = RequestState.FAILED;\n request.deferred.reject(error);\n };\n}\n\nfunction startRequest(request) {\n const promise = issueRequest(request);\n request.state = RequestState.ACTIVE;\n activeRequests.push(request);\n ++statistics.numberOfActiveRequests;\n ++statistics.numberOfActiveRequestsEver;\n ++numberOfActiveRequestsByServer[request.serverKey];\n request\n .requestFunction()\n .then(getRequestReceivedFunction(request))\n .catch(getRequestFailedFunction(request));\n return promise;\n}\n\nfunction cancelRequest(request) {\n const active = request.state === RequestState.ACTIVE;\n request.state = RequestState.CANCELLED;\n ++statistics.numberOfCancelledRequests;\n // check that deferred has not been cleared since cancelRequest can be called\n // on a finished request, e.g. by clearForSpecs during tests\n if (defined(request.deferred)) {\n const deferred = request.deferred;\n request.deferred = undefined;\n deferred.reject();\n }\n\n if (active) {\n --statistics.numberOfActiveRequests;\n --numberOfActiveRequestsByServer[request.serverKey];\n ++statistics.numberOfCancelledActiveRequests;\n }\n\n if (defined(request.cancelFunction)) {\n request.cancelFunction();\n }\n}\n\n/**\n * Sort requests by priority and start requests.\n * @private\n */\nRequestScheduler.update = function () {\n let i;\n let request;\n\n // Loop over all active requests. Cancelled, failed, or received requests are removed from the array to make room for new requests.\n let removeCount = 0;\n const activeLength = activeRequests.length;\n for (i = 0; i < activeLength; ++i) {\n request = activeRequests[i];\n if (request.cancelled) {\n // Request was explicitly cancelled\n cancelRequest(request);\n }\n if (request.state !== RequestState.ACTIVE) {\n // Request is no longer active, remove from array\n ++removeCount;\n continue;\n }\n if (removeCount > 0) {\n // Shift back to fill in vacated slots from completed requests\n activeRequests[i - removeCount] = request;\n }\n }\n activeRequests.length -= removeCount;\n\n // Update priority of issued requests and resort the heap\n const issuedRequests = requestHeap.internalArray;\n const issuedLength = requestHeap.length;\n for (i = 0; i < issuedLength; ++i) {\n updatePriority(issuedRequests[i]);\n }\n requestHeap.resort();\n\n // Get the number of open slots and fill with the highest priority requests.\n // Un-throttled requests are automatically added to activeRequests, so activeRequests.length may exceed maximumRequests\n const openSlots = Math.max(\n RequestScheduler.maximumRequests - activeRequests.length,\n 0,\n );\n let filledSlots = 0;\n while (filledSlots < openSlots && requestHeap.length > 0) {\n // Loop until all open slots are filled or the heap becomes empty\n request = requestHeap.pop();\n if (request.cancelled) {\n // Request was explicitly cancelled\n cancelRequest(request);\n continue;\n }\n\n if (\n request.throttleByServer &&\n !RequestScheduler.serverHasOpenSlots(request.serverKey)\n ) {\n // Open slots are available, but the request is throttled by its server. Cancel and try again later.\n cancelRequest(request);\n continue;\n }\n\n startRequest(request);\n ++filledSlots;\n }\n\n updateStatistics();\n};\n\n/**\n * Get the server key from a given url.\n *\n * @param {string} url The url.\n * @returns {string} The server key.\n * @private\n */\nRequestScheduler.getServerKey = function (url) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.string(\"url\", url);\n //>>includeEnd('debug');\n\n let uri = new Uri(url);\n if (uri.scheme() === \"\") {\n uri = uri.absoluteTo(pageUri);\n uri.normalize();\n }\n\n let serverKey = uri.authority();\n if (!/:/.test(serverKey)) {\n // If the authority does not contain a port number, add port 443 for https or port 80 for http\n serverKey = `${serverKey}:${uri.scheme() === \"https\" ? \"443\" : \"80\"}`;\n }\n\n const length = numberOfActiveRequestsByServer[serverKey];\n if (!defined(length)) {\n numberOfActiveRequestsByServer[serverKey] = 0;\n }\n\n return serverKey;\n};\n\n/**\n * Issue a request. If request.throttle is false, the request is sent immediately. Otherwise the request will be\n * queued and sorted by priority before being sent.\n *\n * @param {Request} request The request object.\n *\n * @returns {Promise|undefined} A Promise for the requested data, or undefined if this request does not have high enough priority to be issued.\n *\n * @private\n */\nRequestScheduler.request = function (request) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"request\", request);\n Check.typeOf.string(\"request.url\", request.url);\n Check.typeOf.func(\"request.requestFunction\", request.requestFunction);\n //>>includeEnd('debug');\n\n if (isDataUri(request.url) || isBlobUri(request.url)) {\n requestCompletedEvent.raiseEvent();\n request.state = RequestState.RECEIVED;\n return request.requestFunction();\n }\n\n ++statistics.numberOfAttemptedRequests;\n\n if (!defined(request.serverKey)) {\n request.serverKey = RequestScheduler.getServerKey(request.url);\n }\n\n if (\n RequestScheduler.throttleRequests &&\n request.throttleByServer &&\n !RequestScheduler.serverHasOpenSlots(request.serverKey)\n ) {\n // Server is saturated. Try again later.\n return undefined;\n }\n\n if (!RequestScheduler.throttleRequests || !request.throttle) {\n return startRequest(request);\n }\n\n if (activeRequests.length >= RequestScheduler.maximumRequests) {\n // Active requests are saturated. Try again later.\n return undefined;\n }\n\n // Insert into the priority heap and see if a request was bumped off. If this request is the lowest\n // priority it will be returned.\n updatePriority(request);\n const removedRequest = requestHeap.insert(request);\n\n if (defined(removedRequest)) {\n if (removedRequest === request) {\n // Request does not have high enough priority to be issued\n return undefined;\n }\n // A previously issued request has been bumped off the priority heap, so cancel it\n cancelRequest(removedRequest);\n }\n\n return issueRequest(request);\n};\n\nfunction updateStatistics() {\n if (!RequestScheduler.debugShowStatistics) {\n return;\n }\n\n if (\n statistics.numberOfActiveRequests === 0 &&\n statistics.lastNumberOfActiveRequests > 0\n ) {\n if (statistics.numberOfAttemptedRequests > 0) {\n console.log(\n `Number of attempted requests: ${statistics.numberOfAttemptedRequests}`,\n );\n statistics.numberOfAttemptedRequests = 0;\n }\n\n if (statistics.numberOfCancelledRequests > 0) {\n console.log(\n `Number of cancelled requests: ${statistics.numberOfCancelledRequests}`,\n );\n statistics.numberOfCancelledRequests = 0;\n }\n\n if (statistics.numberOfCancelledActiveRequests > 0) {\n console.log(\n `Number of cancelled active requests: ${statistics.numberOfCancelledActiveRequests}`,\n );\n statistics.numberOfCancelledActiveRequests = 0;\n }\n\n if (statistics.numberOfFailedRequests > 0) {\n console.log(\n `Number of failed requests: ${statistics.numberOfFailedRequests}`,\n );\n statistics.numberOfFailedRequests = 0;\n }\n }\n\n statistics.lastNumberOfActiveRequests = statistics.numberOfActiveRequests;\n}\n\n/**\n * For testing only. Clears any requests that may not have completed from previous tests.\n *\n * @private\n */\nRequestScheduler.clearForSpecs = function () {\n while (requestHeap.length > 0) {\n const request = requestHeap.pop();\n cancelRequest(request);\n }\n const length = activeRequests.length;\n for (let i = 0; i < length; ++i) {\n cancelRequest(activeRequests[i]);\n }\n activeRequests.length = 0;\n numberOfActiveRequestsByServer = {};\n\n // Clear stats\n statistics.numberOfAttemptedRequests = 0;\n statistics.numberOfActiveRequests = 0;\n statistics.numberOfCancelledRequests = 0;\n statistics.numberOfCancelledActiveRequests = 0;\n statistics.numberOfFailedRequests = 0;\n statistics.numberOfActiveRequestsEver = 0;\n statistics.lastNumberOfActiveRequests = 0;\n};\n\n/**\n * For testing only.\n *\n * @private\n */\nRequestScheduler.numberOfActiveRequestsByServer = function (serverKey) {\n return numberOfActiveRequestsByServer[serverKey];\n};\n\n/**\n * For testing only.\n *\n * @private\n */\nRequestScheduler.requestHeap = requestHeap;\nexport default RequestScheduler;\n","import Check from \"./Check.js\";\nimport defined from \"./defined.js\";\n\n/**\n * A generic utility class for managing subscribers for a particular event.\n * This class is usually instantiated inside of a container class and\n * exposed as a property for others to subscribe to.\n *\n * @alias Event\n * @template Listener extends (...args: any[]) => void = (...args: any[]) => void\n * @constructor\n * @example\n * MyObject.prototype.myListener = function(arg1, arg2) {\n * this.myArg1Copy = arg1;\n * this.myArg2Copy = arg2;\n * }\n *\n * const myObjectInstance = new MyObject();\n * const evt = new Cesium.Event();\n * evt.addEventListener(MyObject.prototype.myListener, myObjectInstance);\n * evt.raiseEvent('1', '2');\n * evt.removeEventListener(MyObject.prototype.myListener);\n */\nfunction Event() {\n this._listeners = [];\n this._scopes = [];\n this._toRemove = [];\n this._insideRaiseEvent = false;\n}\n\nObject.defineProperties(Event.prototype, {\n /**\n * The number of listeners currently subscribed to the event.\n * @memberof Event.prototype\n * @type {number}\n * @readonly\n */\n numberOfListeners: {\n get: function () {\n return this._listeners.length - this._toRemove.length;\n },\n },\n});\n\n/**\n * Registers a callback function to be executed whenever the event is raised.\n * An optional scope can be provided to serve as the this pointer\n * in which the function will execute.\n *\n * @param {Listener} listener The function to be executed when the event is raised.\n * @param {object} [scope] An optional object scope to serve as the this\n * pointer in which the listener function will execute.\n * @returns {Event.RemoveCallback} A function that will remove this event listener when invoked.\n *\n * @see Event#raiseEvent\n * @see Event#removeEventListener\n */\nEvent.prototype.addEventListener = function (listener, scope) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.func(\"listener\", listener);\n //>>includeEnd('debug');\n\n this._listeners.push(listener);\n this._scopes.push(scope);\n\n const event = this;\n return function () {\n event.removeEventListener(listener, scope);\n };\n};\n\n/**\n * Unregisters a previously registered callback.\n *\n * @param {Listener} listener The function to be unregistered.\n * @param {object} [scope] The scope that was originally passed to addEventListener.\n * @returns {boolean} true if the listener was removed; false if the listener and scope are not registered with the event.\n *\n * @see Event#addEventListener\n * @see Event#raiseEvent\n */\nEvent.prototype.removeEventListener = function (listener, scope) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.func(\"listener\", listener);\n //>>includeEnd('debug');\n\n const listeners = this._listeners;\n const scopes = this._scopes;\n\n let index = -1;\n for (let i = 0; i < listeners.length; i++) {\n if (listeners[i] === listener && scopes[i] === scope) {\n index = i;\n break;\n }\n }\n\n if (index !== -1) {\n if (this._insideRaiseEvent) {\n //In order to allow removing an event subscription from within\n //a callback, we don't actually remove the items here. Instead\n //remember the index they are at and undefined their value.\n this._toRemove.push(index);\n listeners[index] = undefined;\n scopes[index] = undefined;\n } else {\n listeners.splice(index, 1);\n scopes.splice(index, 1);\n }\n return true;\n }\n\n return false;\n};\n\nfunction compareNumber(a, b) {\n return b - a;\n}\n\n/**\n * Raises the event by calling each registered listener with all supplied arguments.\n *\n * @param {...Parameters} arguments This method takes any number of parameters and passes them through to the listener functions.\n *\n * @see Event#addEventListener\n * @see Event#removeEventListener\n */\nEvent.prototype.raiseEvent = function () {\n this._insideRaiseEvent = true;\n\n let i;\n const listeners = this._listeners;\n const scopes = this._scopes;\n let length = listeners.length;\n\n for (i = 0; i < length; i++) {\n const listener = listeners[i];\n if (defined(listener)) {\n listeners[i].apply(scopes[i], arguments);\n }\n }\n\n //Actually remove items removed in removeEventListener.\n const toRemove = this._toRemove;\n length = toRemove.length;\n if (length > 0) {\n toRemove.sort(compareNumber);\n for (i = 0; i < length; i++) {\n const index = toRemove[i];\n listeners.splice(index, 1);\n scopes.splice(index, 1);\n }\n toRemove.length = 0;\n }\n\n this._insideRaiseEvent = false;\n};\n\n/**\n * A function that removes a listener.\n * @callback Event.RemoveCallback\n */\n\nexport default Event;\n","import Check from \"./Check.js\";\nimport defaultValue from \"./defaultValue.js\";\nimport defined from \"./defined.js\";\n\n/**\n * Array implementation of a heap.\n *\n * @alias Heap\n * @constructor\n * @private\n *\n * @param {object} options Object with the following properties:\n * @param {Heap.ComparatorCallback} options.comparator The comparator to use for the heap. If comparator(a, b) is less than 0, sort a to a lower index than b, otherwise sort to a higher index.\n */\nfunction Heap(options) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"options\", options);\n Check.defined(\"options.comparator\", options.comparator);\n //>>includeEnd('debug');\n\n this._comparator = options.comparator;\n this._array = [];\n this._length = 0;\n this._maximumLength = undefined;\n}\n\nObject.defineProperties(Heap.prototype, {\n /**\n * Gets the length of the heap.\n *\n * @memberof Heap.prototype\n *\n * @type {number}\n * @readonly\n */\n length: {\n get: function () {\n return this._length;\n },\n },\n\n /**\n * Gets the internal array.\n *\n * @memberof Heap.prototype\n *\n * @type {Array}\n * @readonly\n */\n internalArray: {\n get: function () {\n return this._array;\n },\n },\n\n /**\n * Gets and sets the maximum length of the heap.\n *\n * @memberof Heap.prototype\n *\n * @type {number}\n */\n maximumLength: {\n get: function () {\n return this._maximumLength;\n },\n set: function (value) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.number.greaterThanOrEquals(\"maximumLength\", value, 0);\n //>>includeEnd('debug');\n const originalLength = this._length;\n if (value < originalLength) {\n const array = this._array;\n // Remove trailing references\n for (let i = value; i < originalLength; ++i) {\n array[i] = undefined;\n }\n this._length = value;\n array.length = value;\n }\n this._maximumLength = value;\n },\n },\n\n /**\n * The comparator to use for the heap. If comparator(a, b) is less than 0, sort a to a lower index than b, otherwise sort to a higher index.\n *\n * @memberof Heap.prototype\n *\n * @type {Heap.ComparatorCallback}\n */\n comparator: {\n get: function () {\n return this._comparator;\n },\n },\n});\n\nfunction swap(array, a, b) {\n const temp = array[a];\n array[a] = array[b];\n array[b] = temp;\n}\n\n/**\n * Resizes the internal array of the heap.\n *\n * @param {number} [length] The length to resize internal array to. Defaults to the current length of the heap.\n */\nHeap.prototype.reserve = function (length) {\n length = defaultValue(length, this._length);\n this._array.length = length;\n};\n\n/**\n * Update the heap so that index and all descendants satisfy the heap property.\n *\n * @param {number} [index=0] The starting index to heapify from.\n */\nHeap.prototype.heapify = function (index) {\n index = defaultValue(index, 0);\n const length = this._length;\n const comparator = this._comparator;\n const array = this._array;\n let candidate = -1;\n let inserting = true;\n\n while (inserting) {\n const right = 2 * (index + 1);\n const left = right - 1;\n\n if (left < length && comparator(array[left], array[index]) < 0) {\n candidate = left;\n } else {\n candidate = index;\n }\n\n if (right < length && comparator(array[right], array[candidate]) < 0) {\n candidate = right;\n }\n if (candidate !== index) {\n swap(array, candidate, index);\n index = candidate;\n } else {\n inserting = false;\n }\n }\n};\n\n/**\n * Resort the heap.\n */\nHeap.prototype.resort = function () {\n const length = this._length;\n for (let i = Math.ceil(length / 2); i >= 0; --i) {\n this.heapify(i);\n }\n};\n\n/**\n * Insert an element into the heap. If the length would grow greater than maximumLength\n * of the heap, extra elements are removed.\n *\n * @param {*} element The element to insert\n *\n * @return {*} The element that was removed from the heap if the heap is at full capacity.\n */\nHeap.prototype.insert = function (element) {\n //>>includeStart('debug', pragmas.debug);\n Check.defined(\"element\", element);\n //>>includeEnd('debug');\n\n const array = this._array;\n const comparator = this._comparator;\n const maximumLength = this._maximumLength;\n\n let index = this._length++;\n if (index < array.length) {\n array[index] = element;\n } else {\n array.push(element);\n }\n\n while (index !== 0) {\n const parent = Math.floor((index - 1) / 2);\n if (comparator(array[index], array[parent]) < 0) {\n swap(array, index, parent);\n index = parent;\n } else {\n break;\n }\n }\n\n let removedElement;\n\n if (defined(maximumLength) && this._length > maximumLength) {\n removedElement = array[maximumLength];\n this._length = maximumLength;\n }\n\n return removedElement;\n};\n\n/**\n * Remove the element specified by index from the heap and return it.\n *\n * @param {number} [index=0] The index to remove.\n * @returns {*} The specified element of the heap.\n */\nHeap.prototype.pop = function (index) {\n index = defaultValue(index, 0);\n if (this._length === 0) {\n return undefined;\n }\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.number.lessThan(\"index\", index, this._length);\n //>>includeEnd('debug');\n\n const array = this._array;\n const root = array[index];\n swap(array, index, --this._length);\n this.heapify(index);\n array[this._length] = undefined; // Remove trailing reference\n return root;\n};\n\n/**\n * The comparator to use for the heap.\n * @callback Heap.ComparatorCallback\n * @param {*} a An element in the heap.\n * @param {*} b An element in the heap.\n * @returns {number} If the result of the comparison is less than 0, sort a to a lower index than b, otherwise sort to a higher index.\n */\nexport default Heap;\n","import Uri from \"urijs\";\nimport defined from \"./defined.js\";\nimport DeveloperError from \"./DeveloperError.js\";\n\n/**\n * A singleton that contains all of the servers that are trusted. Credentials will be sent with\n * any requests to these servers.\n *\n * @namespace TrustedServers\n *\n * @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}\n */\nconst TrustedServers = {};\nlet _servers = {};\n\n/**\n * Adds a trusted server to the registry\n *\n * @param {string} host The host to be added.\n * @param {number} port The port used to access the host.\n *\n * @example\n * // Add a trusted server\n * TrustedServers.add('my.server.com', 80);\n */\nTrustedServers.add = function (host, port) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(host)) {\n throw new DeveloperError(\"host is required.\");\n }\n if (!defined(port) || port <= 0) {\n throw new DeveloperError(\"port is required to be greater than 0.\");\n }\n //>>includeEnd('debug');\n\n const authority = `${host.toLowerCase()}:${port}`;\n if (!defined(_servers[authority])) {\n _servers[authority] = true;\n }\n};\n\n/**\n * Removes a trusted server from the registry\n *\n * @param {string} host The host to be removed.\n * @param {number} port The port used to access the host.\n *\n * @example\n * // Remove a trusted server\n * TrustedServers.remove('my.server.com', 80);\n */\nTrustedServers.remove = function (host, port) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(host)) {\n throw new DeveloperError(\"host is required.\");\n }\n if (!defined(port) || port <= 0) {\n throw new DeveloperError(\"port is required to be greater than 0.\");\n }\n //>>includeEnd('debug');\n\n const authority = `${host.toLowerCase()}:${port}`;\n if (defined(_servers[authority])) {\n delete _servers[authority];\n }\n};\n\nfunction getAuthority(url) {\n const uri = new Uri(url);\n uri.normalize();\n\n // Removes username:password@ so we just have host[:port]\n let authority = uri.authority();\n if (authority.length === 0) {\n return undefined; // Relative URL\n }\n uri.authority(authority);\n\n if (authority.indexOf(\"@\") !== -1) {\n const parts = authority.split(\"@\");\n authority = parts[1];\n }\n\n // If the port is missing add one based on the scheme\n if (authority.indexOf(\":\") === -1) {\n let scheme = uri.scheme();\n if (scheme.length === 0) {\n scheme = window.location.protocol;\n scheme = scheme.substring(0, scheme.length - 1);\n }\n if (scheme === \"http\") {\n authority += \":80\";\n } else if (scheme === \"https\") {\n authority += \":443\";\n } else {\n return undefined;\n }\n }\n\n return authority;\n}\n\n/**\n * Tests whether a server is trusted or not. The server must have been added with the port if it is included in the url.\n *\n * @param {string} url The url to be tested against the trusted list\n *\n * @returns {boolean} Returns true if url is trusted, false otherwise.\n *\n * @example\n * // Add server\n * TrustedServers.add('my.server.com', 81);\n *\n * // Check if server is trusted\n * if (TrustedServers.contains('https://my.server.com:81/path/to/file.png')) {\n * // my.server.com:81 is trusted\n * }\n * if (TrustedServers.contains('https://my.server.com/path/to/file.png')) {\n * // my.server.com isn't trusted\n * }\n */\nTrustedServers.contains = function (url) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(url)) {\n throw new DeveloperError(\"url is required.\");\n }\n //>>includeEnd('debug');\n const authority = getAuthority(url);\n if (defined(authority) && defined(_servers[authority])) {\n return true;\n }\n\n return false;\n};\n\n/**\n * Clears the registry\n *\n * @example\n * // Remove a trusted server\n * TrustedServers.clear();\n */\nTrustedServers.clear = function () {\n _servers = {};\n};\nexport default TrustedServers;\n","import defaultValue from \"./defaultValue.js\";\nimport defined from \"./defined.js\";\nimport DeveloperError from \"./DeveloperError.js\";\nimport CesiumMath from \"./Math.js\";\n\n/**\n * A rotation expressed as a heading, pitch, and roll. Heading is the rotation about the\n * negative z axis. Pitch is the rotation about the negative y axis. Roll is the rotation about\n * the positive x axis.\n * @alias HeadingPitchRoll\n * @constructor\n *\n * @param {number} [heading=0.0] The heading component in radians.\n * @param {number} [pitch=0.0] The pitch component in radians.\n * @param {number} [roll=0.0] The roll component in radians.\n */\nfunction HeadingPitchRoll(heading, pitch, roll) {\n /**\n * Gets or sets the heading.\n * @type {number}\n * @default 0.0\n */\n this.heading = defaultValue(heading, 0.0);\n /**\n * Gets or sets the pitch.\n * @type {number}\n * @default 0.0\n */\n this.pitch = defaultValue(pitch, 0.0);\n /**\n * Gets or sets the roll.\n * @type {number}\n * @default 0.0\n */\n this.roll = defaultValue(roll, 0.0);\n}\n\n/**\n * Computes the heading, pitch and roll from a quaternion (see http://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles )\n *\n * @param {Quaternion} quaternion The quaternion from which to retrieve heading, pitch, and roll, all expressed in radians.\n * @param {HeadingPitchRoll} [result] The object in which to store the result. If not provided, a new instance is created and returned.\n * @returns {HeadingPitchRoll} The modified result parameter or a new HeadingPitchRoll instance if one was not provided.\n */\nHeadingPitchRoll.fromQuaternion = function (quaternion, result) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(quaternion)) {\n throw new DeveloperError(\"quaternion is required\");\n }\n //>>includeEnd('debug');\n if (!defined(result)) {\n result = new HeadingPitchRoll();\n }\n const test = 2 * (quaternion.w * quaternion.y - quaternion.z * quaternion.x);\n const denominatorRoll =\n 1 - 2 * (quaternion.x * quaternion.x + quaternion.y * quaternion.y);\n const numeratorRoll =\n 2 * (quaternion.w * quaternion.x + quaternion.y * quaternion.z);\n const denominatorHeading =\n 1 - 2 * (quaternion.y * quaternion.y + quaternion.z * quaternion.z);\n const numeratorHeading =\n 2 * (quaternion.w * quaternion.z + quaternion.x * quaternion.y);\n result.heading = -Math.atan2(numeratorHeading, denominatorHeading);\n result.roll = Math.atan2(numeratorRoll, denominatorRoll);\n result.pitch = -CesiumMath.asinClamped(test);\n return result;\n};\n\n/**\n * Returns a new HeadingPitchRoll instance from angles given in degrees.\n *\n * @param {number} heading the heading in degrees\n * @param {number} pitch the pitch in degrees\n * @param {number} roll the heading in degrees\n * @param {HeadingPitchRoll} [result] The object in which to store the result. If not provided, a new instance is created and returned.\n * @returns {HeadingPitchRoll} A new HeadingPitchRoll instance\n */\nHeadingPitchRoll.fromDegrees = function (heading, pitch, roll, result) {\n //>>includeStart('debug', pragmas.debug);\n if (!defined(heading)) {\n throw new DeveloperError(\"heading is required\");\n }\n if (!defined(pitch)) {\n throw new DeveloperError(\"pitch is required\");\n }\n if (!defined(roll)) {\n throw new DeveloperError(\"roll is required\");\n }\n //>>includeEnd('debug');\n if (!defined(result)) {\n result = new HeadingPitchRoll();\n }\n result.heading = heading * CesiumMath.RADIANS_PER_DEGREE;\n result.pitch = pitch * CesiumMath.RADIANS_PER_DEGREE;\n result.roll = roll * CesiumMath.RADIANS_PER_DEGREE;\n return result;\n};\n\n/**\n * Duplicates a HeadingPitchRoll instance.\n *\n * @param {HeadingPitchRoll} headingPitchRoll The HeadingPitchRoll to duplicate.\n * @param {HeadingPitchRoll} [result] The object onto which to store the result.\n * @returns {HeadingPitchRoll} The modified result parameter or a new HeadingPitchRoll instance if one was not provided. (Returns undefined if headingPitchRoll is undefined)\n */\nHeadingPitchRoll.clone = function (headingPitchRoll, result) {\n if (!defined(headingPitchRoll)) {\n return undefined;\n }\n if (!defined(result)) {\n return new HeadingPitchRoll(\n headingPitchRoll.heading,\n headingPitchRoll.pitch,\n headingPitchRoll.roll,\n );\n }\n result.heading = headingPitchRoll.heading;\n result.pitch = headingPitchRoll.pitch;\n result.roll = headingPitchRoll.roll;\n return result;\n};\n\n/**\n * Compares the provided HeadingPitchRolls componentwise and returns\n * true if they are equal, false otherwise.\n *\n * @param {HeadingPitchRoll} [left] The first HeadingPitchRoll.\n * @param {HeadingPitchRoll} [right] The second HeadingPitchRoll.\n * @returns {boolean} true if left and right are equal, false otherwise.\n */\nHeadingPitchRoll.equals = function (left, right) {\n return (\n left === right ||\n (defined(left) &&\n defined(right) &&\n left.heading === right.heading &&\n left.pitch === right.pitch &&\n left.roll === right.roll)\n );\n};\n\n/**\n * Compares the provided HeadingPitchRolls componentwise and returns\n * true if they pass an absolute or relative tolerance test,\n * false otherwise.\n *\n * @param {HeadingPitchRoll} [left] The first HeadingPitchRoll.\n * @param {HeadingPitchRoll} [right] The second HeadingPitchRoll.\n * @param {number} [relativeEpsilon=0] The relative epsilon tolerance to use for equality testing.\n * @param {number} [absoluteEpsilon=relativeEpsilon] The absolute epsilon tolerance to use for equality testing.\n * @returns {boolean} true if left and right are within the provided epsilon, false otherwise.\n */\nHeadingPitchRoll.equalsEpsilon = function (\n left,\n right,\n relativeEpsilon,\n absoluteEpsilon,\n) {\n return (\n left === right ||\n (defined(left) &&\n defined(right) &&\n CesiumMath.equalsEpsilon(\n left.heading,\n right.heading,\n relativeEpsilon,\n absoluteEpsilon,\n ) &&\n CesiumMath.equalsEpsilon(\n left.pitch,\n right.pitch,\n relativeEpsilon,\n absoluteEpsilon,\n ) &&\n CesiumMath.equalsEpsilon(\n left.roll,\n right.roll,\n relativeEpsilon,\n absoluteEpsilon,\n ))\n );\n};\n\n/**\n * Duplicates this HeadingPitchRoll instance.\n *\n * @param {HeadingPitchRoll} [result] The object onto which to store the result.\n * @returns {HeadingPitchRoll} The modified result parameter or a new HeadingPitchRoll instance if one was not provided.\n */\nHeadingPitchRoll.prototype.clone = function (result) {\n return HeadingPitchRoll.clone(this, result);\n};\n\n/**\n * Compares this HeadingPitchRoll against the provided HeadingPitchRoll componentwise and returns\n * true if they are equal, false otherwise.\n *\n * @param {HeadingPitchRoll} [right] The right hand side HeadingPitchRoll.\n * @returns {boolean} true if they are equal, false otherwise.\n */\nHeadingPitchRoll.prototype.equals = function (right) {\n return HeadingPitchRoll.equals(this, right);\n};\n\n/**\n * Compares this HeadingPitchRoll against the provided HeadingPitchRoll componentwise and returns\n * true if they pass an absolute or relative tolerance test,\n * false otherwise.\n *\n * @param {HeadingPitchRoll} [right] The right hand side HeadingPitchRoll.\n * @param {number} [relativeEpsilon=0] The relative epsilon tolerance to use for equality testing.\n * @param {number} [absoluteEpsilon=relativeEpsilon] The absolute epsilon tolerance to use for equality testing.\n * @returns {boolean} true if they are within the provided epsilon, false otherwise.\n */\nHeadingPitchRoll.prototype.equalsEpsilon = function (\n right,\n relativeEpsilon,\n absoluteEpsilon,\n) {\n return HeadingPitchRoll.equalsEpsilon(\n this,\n right,\n relativeEpsilon,\n absoluteEpsilon,\n );\n};\n\n/**\n * Creates a string representing this HeadingPitchRoll in the format '(heading, pitch, roll)' in radians.\n *\n * @returns {string} A string representing the provided HeadingPitchRoll in the format '(heading, pitch, roll)'.\n */\nHeadingPitchRoll.prototype.toString = function () {\n return `(${this.heading}, ${this.pitch}, ${this.roll})`;\n};\nexport default HeadingPitchRoll;\n","import buildModuleUrl from \"./buildModuleUrl.js\";\nimport defaultValue from \"./defaultValue.js\";\nimport defined from \"./defined.js\";\nimport Iau2006XysSample from \"./Iau2006XysSample.js\";\nimport JulianDate from \"./JulianDate.js\";\nimport Resource from \"./Resource.js\";\nimport TimeStandard from \"./TimeStandard.js\";\n\n/**\n * A set of IAU2006 XYS data that is used to evaluate the transformation between the International\n * Celestial Reference Frame (ICRF) and the International Terrestrial Reference Frame (ITRF).\n *\n * @alias Iau2006XysData\n * @constructor\n *\n * @param {object} [options] Object with the following properties:\n * @param {Resource|string} [options.xysFileUrlTemplate='Assets/IAU2006_XYS/IAU2006_XYS_{0}.json'] A template URL for obtaining the XYS data. In the template,\n * `{0}` will be replaced with the file index.\n * @param {number} [options.interpolationOrder=9] The order of interpolation to perform on the XYS data.\n * @param {number} [options.sampleZeroJulianEphemerisDate=2442396.5] The Julian ephemeris date (JED) of the\n * first XYS sample.\n * @param {number} [options.stepSizeDays=1.0] The step size, in days, between successive XYS samples.\n * @param {number} [options.samplesPerXysFile=1000] The number of samples in each XYS file.\n * @param {number} [options.totalSamples=27426] The total number of samples in all XYS files.\n *\n * @private\n */\nfunction Iau2006XysData(options) {\n options = defaultValue(options, defaultValue.EMPTY_OBJECT);\n\n this._xysFileUrlTemplate = Resource.createIfNeeded(\n options.xysFileUrlTemplate,\n );\n this._interpolationOrder = defaultValue(options.interpolationOrder, 9);\n this._sampleZeroJulianEphemerisDate = defaultValue(\n options.sampleZeroJulianEphemerisDate,\n 2442396.5,\n );\n this._sampleZeroDateTT = new JulianDate(\n this._sampleZeroJulianEphemerisDate,\n 0.0,\n TimeStandard.TAI,\n );\n this._stepSizeDays = defaultValue(options.stepSizeDays, 1.0);\n this._samplesPerXysFile = defaultValue(options.samplesPerXysFile, 1000);\n this._totalSamples = defaultValue(options.totalSamples, 27426);\n this._samples = new Array(this._totalSamples * 3);\n this._chunkDownloadsInProgress = [];\n\n const order = this._interpolationOrder;\n\n // Compute denominators and X values for interpolation.\n const denom = (this._denominators = new Array(order + 1));\n const xTable = (this._xTable = new Array(order + 1));\n\n const stepN = Math.pow(this._stepSizeDays, order);\n\n for (let i = 0; i <= order; ++i) {\n denom[i] = stepN;\n xTable[i] = i * this._stepSizeDays;\n\n for (let j = 0; j <= order; ++j) {\n if (j !== i) {\n denom[i] *= i - j;\n }\n }\n\n denom[i] = 1.0 / denom[i];\n }\n\n // Allocate scratch arrays for interpolation.\n this._work = new Array(order + 1);\n this._coef = new Array(order + 1);\n}\n\nconst julianDateScratch = new JulianDate(0, 0.0, TimeStandard.TAI);\n\nfunction getDaysSinceEpoch(xys, dayTT, secondTT) {\n const dateTT = julianDateScratch;\n dateTT.dayNumber = dayTT;\n dateTT.secondsOfDay = secondTT;\n return JulianDate.daysDifference(dateTT, xys._sampleZeroDateTT);\n}\n\n/**\n * Preloads XYS data for a specified date range.\n *\n * @param {number} startDayTT The Julian day number of the beginning of the interval to preload, expressed in\n * the Terrestrial Time (TT) time standard.\n * @param {number} startSecondTT The seconds past noon of the beginning of the interval to preload, expressed in\n * the Terrestrial Time (TT) time standard.\n * @param {number} stopDayTT The Julian day number of the end of the interval to preload, expressed in\n * the Terrestrial Time (TT) time standard.\n * @param {number} stopSecondTT The seconds past noon of the end of the interval to preload, expressed in\n * the Terrestrial Time (TT) time standard.\n * @returns {Promise} A promise that, when resolved, indicates that the requested interval has been\n * preloaded.\n */\nIau2006XysData.prototype.preload = function (\n startDayTT,\n startSecondTT,\n stopDayTT,\n stopSecondTT,\n) {\n const startDaysSinceEpoch = getDaysSinceEpoch(\n this,\n startDayTT,\n startSecondTT,\n );\n const stopDaysSinceEpoch = getDaysSinceEpoch(this, stopDayTT, stopSecondTT);\n\n let startIndex =\n (startDaysSinceEpoch / this._stepSizeDays - this._interpolationOrder / 2) |\n 0;\n if (startIndex < 0) {\n startIndex = 0;\n }\n\n let stopIndex =\n (stopDaysSinceEpoch / this._stepSizeDays - this._interpolationOrder / 2) |\n (0 + this._interpolationOrder);\n if (stopIndex >= this._totalSamples) {\n stopIndex = this._totalSamples - 1;\n }\n\n const startChunk = (startIndex / this._samplesPerXysFile) | 0;\n const stopChunk = (stopIndex / this._samplesPerXysFile) | 0;\n\n const promises = [];\n for (let i = startChunk; i <= stopChunk; ++i) {\n promises.push(requestXysChunk(this, i));\n }\n\n return Promise.all(promises);\n};\n\n/**\n * Computes the XYS values for a given date by interpolating. If the required data is not yet downloaded,\n * this method will return undefined.\n *\n * @param {number} dayTT The Julian day number for which to compute the XYS value, expressed in\n * the Terrestrial Time (TT) time standard.\n * @param {number} secondTT The seconds past noon of the date for which to compute the XYS value, expressed in\n * the Terrestrial Time (TT) time standard.\n * @param {Iau2006XysSample} [result] The instance to which to copy the interpolated result. If this parameter\n * is undefined, a new instance is allocated and returned.\n * @returns {Iau2006XysSample} The interpolated XYS values, or undefined if the required data for this\n * computation has not yet been downloaded.\n *\n * @see Iau2006XysData#preload\n */\nIau2006XysData.prototype.computeXysRadians = function (\n dayTT,\n secondTT,\n result,\n) {\n const daysSinceEpoch = getDaysSinceEpoch(this, dayTT, secondTT);\n if (daysSinceEpoch < 0.0) {\n // Can't evaluate prior to the epoch of the data.\n return undefined;\n }\n\n const centerIndex = (daysSinceEpoch / this._stepSizeDays) | 0;\n if (centerIndex >= this._totalSamples) {\n // Can't evaluate after the last sample in the data.\n return undefined;\n }\n\n const degree = this._interpolationOrder;\n\n let firstIndex = centerIndex - ((degree / 2) | 0);\n if (firstIndex < 0) {\n firstIndex = 0;\n }\n let lastIndex = firstIndex + degree;\n if (lastIndex >= this._totalSamples) {\n lastIndex = this._totalSamples - 1;\n firstIndex = lastIndex - degree;\n if (firstIndex < 0) {\n firstIndex = 0;\n }\n }\n\n // Are all the samples we need present?\n // We can assume so if the first and last are present\n let isDataMissing = false;\n const samples = this._samples;\n if (!defined(samples[firstIndex * 3])) {\n requestXysChunk(this, (firstIndex / this._samplesPerXysFile) | 0);\n isDataMissing = true;\n }\n\n if (!defined(samples[lastIndex * 3])) {\n requestXysChunk(this, (lastIndex / this._samplesPerXysFile) | 0);\n isDataMissing = true;\n }\n\n if (isDataMissing) {\n return undefined;\n }\n\n if (!defined(result)) {\n result = new Iau2006XysSample(0.0, 0.0, 0.0);\n } else {\n result.x = 0.0;\n result.y = 0.0;\n result.s = 0.0;\n }\n\n const x = daysSinceEpoch - firstIndex * this._stepSizeDays;\n\n const work = this._work;\n const denom = this._denominators;\n const coef = this._coef;\n const xTable = this._xTable;\n\n let i, j;\n for (i = 0; i <= degree; ++i) {\n work[i] = x - xTable[i];\n }\n\n for (i = 0; i <= degree; ++i) {\n coef[i] = 1.0;\n\n for (j = 0; j <= degree; ++j) {\n if (j !== i) {\n coef[i] *= work[j];\n }\n }\n\n coef[i] *= denom[i];\n\n let sampleIndex = (firstIndex + i) * 3;\n result.x += coef[i] * samples[sampleIndex++];\n result.y += coef[i] * samples[sampleIndex++];\n result.s += coef[i] * samples[sampleIndex];\n }\n\n return result;\n};\n\nfunction requestXysChunk(xysData, chunkIndex) {\n if (xysData._chunkDownloadsInProgress[chunkIndex]) {\n // Chunk has already been requested.\n return xysData._chunkDownloadsInProgress[chunkIndex];\n }\n\n let chunkUrl;\n const xysFileUrlTemplate = xysData._xysFileUrlTemplate;\n if (defined(xysFileUrlTemplate)) {\n chunkUrl = xysFileUrlTemplate.getDerivedResource({\n templateValues: {\n 0: chunkIndex,\n },\n });\n } else {\n chunkUrl = new Resource({\n url: buildModuleUrl(`Assets/IAU2006_XYS/IAU2006_XYS_${chunkIndex}.json`),\n });\n }\n\n const promise = chunkUrl.fetchJson().then(function (chunk) {\n xysData._chunkDownloadsInProgress[chunkIndex] = false;\n\n const samples = xysData._samples;\n const newSamples = chunk.samples;\n const startIndex = chunkIndex * xysData._samplesPerXysFile * 3;\n\n for (let i = 0, len = newSamples.length; i < len; ++i) {\n samples[startIndex + i] = newSamples[i];\n }\n });\n xysData._chunkDownloadsInProgress[chunkIndex] = promise;\n\n return promise;\n}\nexport default Iau2006XysData;\n","import defined from \"./defined.js\";\nimport DeveloperError from \"./DeveloperError.js\";\nimport getAbsoluteUri from \"./getAbsoluteUri.js\";\nimport Resource from \"./Resource.js\";\n\n/*global CESIUM_BASE_URL,define,require*/\n\nconst cesiumScriptRegex = /((?:.*\\/)|^)Cesium\\.js(?:\\?|\\#|$)/;\nfunction getBaseUrlFromCesiumScript() {\n const scripts = document.getElementsByTagName(\"script\");\n for (let i = 0, len = scripts.length; i < len; ++i) {\n const src = scripts[i].getAttribute(\"src\");\n const result = cesiumScriptRegex.exec(src);\n if (result !== null) {\n return result[1];\n }\n }\n return undefined;\n}\n\nlet a;\nfunction tryMakeAbsolute(url) {\n if (typeof document === \"undefined\") {\n // Node.js and Web Workers. In both cases, the URL will already be absolute.\n return url;\n }\n\n if (!defined(a)) {\n a = document.createElement(\"a\");\n }\n a.href = url;\n return a.href;\n}\n\nlet baseResource;\nfunction getCesiumBaseUrl() {\n if (defined(baseResource)) {\n return baseResource;\n }\n\n let baseUrlString;\n if (typeof CESIUM_BASE_URL !== \"undefined\") {\n baseUrlString = CESIUM_BASE_URL;\n } else if (defined(import.meta?.url)) {\n // ESM\n baseUrlString = getAbsoluteUri(\".\", import.meta.url);\n } else if (\n typeof define === \"object\" &&\n defined(define.amd) &&\n !define.amd.toUrlUndefined &&\n defined(require.toUrl)\n ) {\n // RequireJS\n baseUrlString = getAbsoluteUri(\n \"..\",\n buildModuleUrl(\"Core/buildModuleUrl.js\"),\n );\n } else {\n // IIFE\n baseUrlString = getBaseUrlFromCesiumScript();\n }\n\n //>>includeStart('debug', pragmas.debug);\n if (!defined(baseUrlString)) {\n throw new DeveloperError(\n \"Unable to determine Cesium base URL automatically, try defining a global variable called CESIUM_BASE_URL.\",\n );\n }\n //>>includeEnd('debug');\n\n baseResource = new Resource({\n url: tryMakeAbsolute(baseUrlString),\n });\n baseResource.appendForwardSlash();\n\n return baseResource;\n}\n\nfunction buildModuleUrlFromRequireToUrl(moduleID) {\n //moduleID will be non-relative, so require it relative to this module, in Core.\n return tryMakeAbsolute(require.toUrl(`../${moduleID}`));\n}\n\nfunction buildModuleUrlFromBaseUrl(moduleID) {\n const resource = getCesiumBaseUrl().getDerivedResource({\n url: moduleID,\n });\n return resource.url;\n}\n\nlet implementation;\n\n/**\n * Given a relative URL under the Cesium base URL, returns an absolute URL.\n * @function\n *\n * @param {string} relativeUrl The relative path.\n * @returns {string} The absolutely URL representation of the provided path.\n *\n * @example\n * const viewer = new Cesium.Viewer(\"cesiumContainer\", {\n * baseLayer: Cesium.ImageryLayer.fromProviderAsync(\n * Cesium.TileMapServiceImageryProvider.fromUrl(\n * Cesium.buildModuleUrl(\"Assets/Textures/NaturalEarthII\"),\n * )),\n * baseLayerPicker: false,\n * });\n */\nfunction buildModuleUrl(relativeUrl) {\n if (!defined(implementation)) {\n //select implementation\n if (\n typeof define === \"object\" &&\n defined(define.amd) &&\n !define.amd.toUrlUndefined &&\n defined(require.toUrl)\n ) {\n implementation = buildModuleUrlFromRequireToUrl;\n } else {\n implementation = buildModuleUrlFromBaseUrl;\n }\n }\n\n const url = implementation(relativeUrl);\n return url;\n}\n\n// exposed for testing\nbuildModuleUrl._cesiumScriptRegex = cesiumScriptRegex;\nbuildModuleUrl._buildModuleUrlFromBaseUrl = buildModuleUrlFromBaseUrl;\nbuildModuleUrl._clearBaseResource = function () {\n baseResource = undefined;\n};\n\n/**\n * Sets the base URL for resolving modules.\n * @param {string} value The new base URL.\n */\nbuildModuleUrl.setBaseUrl = function (value) {\n baseResource = Resource.DEFAULT.getDerivedResource({\n url: value,\n });\n};\n\n/**\n * Gets the base URL for resolving modules.\n *\n * @function\n * @returns {string} The configured base URL\n */\nbuildModuleUrl.getCesiumBaseUrl = getCesiumBaseUrl;\n\nexport default buildModuleUrl;\n","/**\n * An IAU 2006 XYS value sampled at a particular time.\n *\n * @alias Iau2006XysSample\n * @constructor\n *\n * @param {number} x The X value.\n * @param {number} y The Y value.\n * @param {number} s The S value.\n *\n * @private\n */\nfunction Iau2006XysSample(x, y, s) {\n /**\n * The X value.\n * @type {number}\n */\n this.x = x;\n\n /**\n * The Y value.\n * @type {number}\n */\n this.y = y;\n\n /**\n * The S value.\n * @type {number}\n */\n this.s = s;\n}\nexport default Iau2006XysSample;\n","import Cartesian3 from \"./Cartesian3.js\";\nimport Check from \"./Check.js\";\nimport defaultValue from \"./defaultValue.js\";\nimport defined from \"./defined.js\";\nimport FeatureDetection from \"./FeatureDetection.js\";\nimport CesiumMath from \"./Math.js\";\nimport Matrix3 from \"./Matrix3.js\";\n\n/**\n * A set of 4-dimensional coordinates used to represent rotation in 3-dimensional space.\n * @alias Quaternion\n * @constructor\n *\n * @param {number} [x=0.0] The X component.\n * @param {number} [y=0.0] The Y component.\n * @param {number} [z=0.0] The Z component.\n * @param {number} [w=0.0] The W component.\n *\n * @see PackableForInterpolation\n */\nfunction Quaternion(x, y, z, w) {\n /**\n * The X component.\n * @type {number}\n * @default 0.0\n */\n this.x = defaultValue(x, 0.0);\n\n /**\n * The Y component.\n * @type {number}\n * @default 0.0\n */\n this.y = defaultValue(y, 0.0);\n\n /**\n * The Z component.\n * @type {number}\n * @default 0.0\n */\n this.z = defaultValue(z, 0.0);\n\n /**\n * The W component.\n * @type {number}\n * @default 0.0\n */\n this.w = defaultValue(w, 0.0);\n}\n\nlet fromAxisAngleScratch = new Cartesian3();\n\n/**\n * Computes a quaternion representing a rotation around an axis.\n *\n * @param {Cartesian3} axis The axis of rotation.\n * @param {number} angle The angle in radians to rotate around the axis.\n * @param {Quaternion} [result] The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter or a new Quaternion instance if one was not provided.\n */\nQuaternion.fromAxisAngle = function (axis, angle, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"axis\", axis);\n Check.typeOf.number(\"angle\", angle);\n //>>includeEnd('debug');\n\n const halfAngle = angle / 2.0;\n const s = Math.sin(halfAngle);\n fromAxisAngleScratch = Cartesian3.normalize(axis, fromAxisAngleScratch);\n\n const x = fromAxisAngleScratch.x * s;\n const y = fromAxisAngleScratch.y * s;\n const z = fromAxisAngleScratch.z * s;\n const w = Math.cos(halfAngle);\n if (!defined(result)) {\n return new Quaternion(x, y, z, w);\n }\n result.x = x;\n result.y = y;\n result.z = z;\n result.w = w;\n return result;\n};\n\nconst fromRotationMatrixNext = [1, 2, 0];\nconst fromRotationMatrixQuat = new Array(3);\n/**\n * Computes a Quaternion from the provided Matrix3 instance.\n *\n * @param {Matrix3} matrix The rotation matrix.\n * @param {Quaternion} [result] The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter or a new Quaternion instance if one was not provided.\n *\n * @see Matrix3.fromQuaternion\n */\nQuaternion.fromRotationMatrix = function (matrix, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"matrix\", matrix);\n //>>includeEnd('debug');\n\n let root;\n let x;\n let y;\n let z;\n let w;\n\n const m00 = matrix[Matrix3.COLUMN0ROW0];\n const m11 = matrix[Matrix3.COLUMN1ROW1];\n const m22 = matrix[Matrix3.COLUMN2ROW2];\n const trace = m00 + m11 + m22;\n\n if (trace > 0.0) {\n // |w| > 1/2, may as well choose w > 1/2\n root = Math.sqrt(trace + 1.0); // 2w\n w = 0.5 * root;\n root = 0.5 / root; // 1/(4w)\n\n x = (matrix[Matrix3.COLUMN1ROW2] - matrix[Matrix3.COLUMN2ROW1]) * root;\n y = (matrix[Matrix3.COLUMN2ROW0] - matrix[Matrix3.COLUMN0ROW2]) * root;\n z = (matrix[Matrix3.COLUMN0ROW1] - matrix[Matrix3.COLUMN1ROW0]) * root;\n } else {\n // |w| <= 1/2\n const next = fromRotationMatrixNext;\n\n let i = 0;\n if (m11 > m00) {\n i = 1;\n }\n if (m22 > m00 && m22 > m11) {\n i = 2;\n }\n const j = next[i];\n const k = next[j];\n\n root = Math.sqrt(\n matrix[Matrix3.getElementIndex(i, i)] -\n matrix[Matrix3.getElementIndex(j, j)] -\n matrix[Matrix3.getElementIndex(k, k)] +\n 1.0,\n );\n\n const quat = fromRotationMatrixQuat;\n quat[i] = 0.5 * root;\n root = 0.5 / root;\n w =\n (matrix[Matrix3.getElementIndex(k, j)] -\n matrix[Matrix3.getElementIndex(j, k)]) *\n root;\n quat[j] =\n (matrix[Matrix3.getElementIndex(j, i)] +\n matrix[Matrix3.getElementIndex(i, j)]) *\n root;\n quat[k] =\n (matrix[Matrix3.getElementIndex(k, i)] +\n matrix[Matrix3.getElementIndex(i, k)]) *\n root;\n\n x = -quat[0];\n y = -quat[1];\n z = -quat[2];\n }\n\n if (!defined(result)) {\n return new Quaternion(x, y, z, w);\n }\n result.x = x;\n result.y = y;\n result.z = z;\n result.w = w;\n return result;\n};\n\nconst scratchHPRQuaternion = new Quaternion();\nlet scratchHeadingQuaternion = new Quaternion();\nlet scratchPitchQuaternion = new Quaternion();\nlet scratchRollQuaternion = new Quaternion();\n\n/**\n * Computes a rotation from the given heading, pitch and roll angles. Heading is the rotation about the\n * negative z axis. Pitch is the rotation about the negative y axis. Roll is the rotation about\n * the positive x axis.\n *\n * @param {HeadingPitchRoll} headingPitchRoll The rotation expressed as a heading, pitch and roll.\n * @param {Quaternion} [result] The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter or a new Quaternion instance if none was provided.\n */\nQuaternion.fromHeadingPitchRoll = function (headingPitchRoll, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"headingPitchRoll\", headingPitchRoll);\n //>>includeEnd('debug');\n\n scratchRollQuaternion = Quaternion.fromAxisAngle(\n Cartesian3.UNIT_X,\n headingPitchRoll.roll,\n scratchHPRQuaternion,\n );\n scratchPitchQuaternion = Quaternion.fromAxisAngle(\n Cartesian3.UNIT_Y,\n -headingPitchRoll.pitch,\n result,\n );\n result = Quaternion.multiply(\n scratchPitchQuaternion,\n scratchRollQuaternion,\n scratchPitchQuaternion,\n );\n scratchHeadingQuaternion = Quaternion.fromAxisAngle(\n Cartesian3.UNIT_Z,\n -headingPitchRoll.heading,\n scratchHPRQuaternion,\n );\n return Quaternion.multiply(scratchHeadingQuaternion, result, result);\n};\n\nconst sampledQuaternionAxis = new Cartesian3();\nconst sampledQuaternionRotation = new Cartesian3();\nconst sampledQuaternionTempQuaternion = new Quaternion();\nconst sampledQuaternionQuaternion0 = new Quaternion();\nconst sampledQuaternionQuaternion0Conjugate = new Quaternion();\n\n/**\n * The number of elements used to pack the object into an array.\n * @type {number}\n */\nQuaternion.packedLength = 4;\n\n/**\n * Stores the provided instance into the provided array.\n *\n * @param {Quaternion} value The value to pack.\n * @param {number[]} array The array to pack into.\n * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.\n *\n * @returns {number[]} The array that was packed into\n */\nQuaternion.pack = function (value, array, startingIndex) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"value\", value);\n Check.defined(\"array\", array);\n //>>includeEnd('debug');\n\n startingIndex = defaultValue(startingIndex, 0);\n\n array[startingIndex++] = value.x;\n array[startingIndex++] = value.y;\n array[startingIndex++] = value.z;\n array[startingIndex] = value.w;\n\n return array;\n};\n\n/**\n * Retrieves an instance from a packed array.\n *\n * @param {number[]} array The packed array.\n * @param {number} [startingIndex=0] The starting index of the element to be unpacked.\n * @param {Quaternion} [result] The object into which to store the result.\n * @returns {Quaternion} The modified result parameter or a new Quaternion instance if one was not provided.\n */\nQuaternion.unpack = function (array, startingIndex, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.defined(\"array\", array);\n //>>includeEnd('debug');\n\n startingIndex = defaultValue(startingIndex, 0);\n\n if (!defined(result)) {\n result = new Quaternion();\n }\n result.x = array[startingIndex];\n result.y = array[startingIndex + 1];\n result.z = array[startingIndex + 2];\n result.w = array[startingIndex + 3];\n return result;\n};\n\n/**\n * The number of elements used to store the object into an array in its interpolatable form.\n * @type {number}\n */\nQuaternion.packedInterpolationLength = 3;\n\n/**\n * Converts a packed array into a form suitable for interpolation.\n *\n * @param {number[]} packedArray The packed array.\n * @param {number} [startingIndex=0] The index of the first element to be converted.\n * @param {number} [lastIndex=packedArray.length] The index of the last element to be converted.\n * @param {number[]} [result] The object into which to store the result.\n */\nQuaternion.convertPackedArrayForInterpolation = function (\n packedArray,\n startingIndex,\n lastIndex,\n result,\n) {\n Quaternion.unpack(\n packedArray,\n lastIndex * 4,\n sampledQuaternionQuaternion0Conjugate,\n );\n Quaternion.conjugate(\n sampledQuaternionQuaternion0Conjugate,\n sampledQuaternionQuaternion0Conjugate,\n );\n\n for (let i = 0, len = lastIndex - startingIndex + 1; i < len; i++) {\n const offset = i * 3;\n Quaternion.unpack(\n packedArray,\n (startingIndex + i) * 4,\n sampledQuaternionTempQuaternion,\n );\n\n Quaternion.multiply(\n sampledQuaternionTempQuaternion,\n sampledQuaternionQuaternion0Conjugate,\n sampledQuaternionTempQuaternion,\n );\n\n if (sampledQuaternionTempQuaternion.w < 0) {\n Quaternion.negate(\n sampledQuaternionTempQuaternion,\n sampledQuaternionTempQuaternion,\n );\n }\n\n Quaternion.computeAxis(\n sampledQuaternionTempQuaternion,\n sampledQuaternionAxis,\n );\n const angle = Quaternion.computeAngle(sampledQuaternionTempQuaternion);\n if (!defined(result)) {\n result = [];\n }\n result[offset] = sampledQuaternionAxis.x * angle;\n result[offset + 1] = sampledQuaternionAxis.y * angle;\n result[offset + 2] = sampledQuaternionAxis.z * angle;\n }\n};\n\n/**\n * Retrieves an instance from a packed array converted with {@link convertPackedArrayForInterpolation}.\n *\n * @param {number[]} array The array previously packed for interpolation.\n * @param {number[]} sourceArray The original packed array.\n * @param {number} [firstIndex=0] The firstIndex used to convert the array.\n * @param {number} [lastIndex=packedArray.length] The lastIndex used to convert the array.\n * @param {Quaternion} [result] The object into which to store the result.\n * @returns {Quaternion} The modified result parameter or a new Quaternion instance if one was not provided.\n */\nQuaternion.unpackInterpolationResult = function (\n array,\n sourceArray,\n firstIndex,\n lastIndex,\n result,\n) {\n if (!defined(result)) {\n result = new Quaternion();\n }\n Cartesian3.fromArray(array, 0, sampledQuaternionRotation);\n const magnitude = Cartesian3.magnitude(sampledQuaternionRotation);\n\n Quaternion.unpack(sourceArray, lastIndex * 4, sampledQuaternionQuaternion0);\n\n if (magnitude === 0) {\n Quaternion.clone(Quaternion.IDENTITY, sampledQuaternionTempQuaternion);\n } else {\n Quaternion.fromAxisAngle(\n sampledQuaternionRotation,\n magnitude,\n sampledQuaternionTempQuaternion,\n );\n }\n\n return Quaternion.multiply(\n sampledQuaternionTempQuaternion,\n sampledQuaternionQuaternion0,\n result,\n );\n};\n\n/**\n * Duplicates a Quaternion instance.\n *\n * @param {Quaternion} quaternion The quaternion to duplicate.\n * @param {Quaternion} [result] The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter or a new Quaternion instance if one was not provided. (Returns undefined if quaternion is undefined)\n */\nQuaternion.clone = function (quaternion, result) {\n if (!defined(quaternion)) {\n return undefined;\n }\n\n if (!defined(result)) {\n return new Quaternion(\n quaternion.x,\n quaternion.y,\n quaternion.z,\n quaternion.w,\n );\n }\n\n result.x = quaternion.x;\n result.y = quaternion.y;\n result.z = quaternion.z;\n result.w = quaternion.w;\n return result;\n};\n\n/**\n * Computes the conjugate of the provided quaternion.\n *\n * @param {Quaternion} quaternion The quaternion to conjugate.\n * @param {Quaternion} result The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter.\n */\nQuaternion.conjugate = function (quaternion, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"quaternion\", quaternion);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result.x = -quaternion.x;\n result.y = -quaternion.y;\n result.z = -quaternion.z;\n result.w = quaternion.w;\n return result;\n};\n\n/**\n * Computes magnitude squared for the provided quaternion.\n *\n * @param {Quaternion} quaternion The quaternion to conjugate.\n * @returns {number} The magnitude squared.\n */\nQuaternion.magnitudeSquared = function (quaternion) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"quaternion\", quaternion);\n //>>includeEnd('debug');\n\n return (\n quaternion.x * quaternion.x +\n quaternion.y * quaternion.y +\n quaternion.z * quaternion.z +\n quaternion.w * quaternion.w\n );\n};\n\n/**\n * Computes magnitude for the provided quaternion.\n *\n * @param {Quaternion} quaternion The quaternion to conjugate.\n * @returns {number} The magnitude.\n */\nQuaternion.magnitude = function (quaternion) {\n return Math.sqrt(Quaternion.magnitudeSquared(quaternion));\n};\n\n/**\n * Computes the normalized form of the provided quaternion.\n *\n * @param {Quaternion} quaternion The quaternion to normalize.\n * @param {Quaternion} result The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter.\n */\nQuaternion.normalize = function (quaternion, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const inverseMagnitude = 1.0 / Quaternion.magnitude(quaternion);\n const x = quaternion.x * inverseMagnitude;\n const y = quaternion.y * inverseMagnitude;\n const z = quaternion.z * inverseMagnitude;\n const w = quaternion.w * inverseMagnitude;\n\n result.x = x;\n result.y = y;\n result.z = z;\n result.w = w;\n return result;\n};\n\n/**\n * Computes the inverse of the provided quaternion.\n *\n * @param {Quaternion} quaternion The quaternion to normalize.\n * @param {Quaternion} result The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter.\n */\nQuaternion.inverse = function (quaternion, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const magnitudeSquared = Quaternion.magnitudeSquared(quaternion);\n result = Quaternion.conjugate(quaternion, result);\n return Quaternion.multiplyByScalar(result, 1.0 / magnitudeSquared, result);\n};\n\n/**\n * Computes the componentwise sum of two quaternions.\n *\n * @param {Quaternion} left The first quaternion.\n * @param {Quaternion} right The second quaternion.\n * @param {Quaternion} result The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter.\n */\nQuaternion.add = function (left, right, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"left\", left);\n Check.typeOf.object(\"right\", right);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result.x = left.x + right.x;\n result.y = left.y + right.y;\n result.z = left.z + right.z;\n result.w = left.w + right.w;\n return result;\n};\n\n/**\n * Computes the componentwise difference of two quaternions.\n *\n * @param {Quaternion} left The first quaternion.\n * @param {Quaternion} right The second quaternion.\n * @param {Quaternion} result The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter.\n */\nQuaternion.subtract = function (left, right, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"left\", left);\n Check.typeOf.object(\"right\", right);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result.x = left.x - right.x;\n result.y = left.y - right.y;\n result.z = left.z - right.z;\n result.w = left.w - right.w;\n return result;\n};\n\n/**\n * Negates the provided quaternion.\n *\n * @param {Quaternion} quaternion The quaternion to be negated.\n * @param {Quaternion} result The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter.\n */\nQuaternion.negate = function (quaternion, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"quaternion\", quaternion);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result.x = -quaternion.x;\n result.y = -quaternion.y;\n result.z = -quaternion.z;\n result.w = -quaternion.w;\n return result;\n};\n\n/**\n * Computes the dot (scalar) product of two quaternions.\n *\n * @param {Quaternion} left The first quaternion.\n * @param {Quaternion} right The second quaternion.\n * @returns {number} The dot product.\n */\nQuaternion.dot = function (left, right) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"left\", left);\n Check.typeOf.object(\"right\", right);\n //>>includeEnd('debug');\n\n return (\n left.x * right.x + left.y * right.y + left.z * right.z + left.w * right.w\n );\n};\n\n/**\n * Computes the product of two quaternions.\n *\n * @param {Quaternion} left The first quaternion.\n * @param {Quaternion} right The second quaternion.\n * @param {Quaternion} result The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter.\n */\nQuaternion.multiply = function (left, right, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"left\", left);\n Check.typeOf.object(\"right\", right);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const leftX = left.x;\n const leftY = left.y;\n const leftZ = left.z;\n const leftW = left.w;\n\n const rightX = right.x;\n const rightY = right.y;\n const rightZ = right.z;\n const rightW = right.w;\n\n const x = leftW * rightX + leftX * rightW + leftY * rightZ - leftZ * rightY;\n const y = leftW * rightY - leftX * rightZ + leftY * rightW + leftZ * rightX;\n const z = leftW * rightZ + leftX * rightY - leftY * rightX + leftZ * rightW;\n const w = leftW * rightW - leftX * rightX - leftY * rightY - leftZ * rightZ;\n\n result.x = x;\n result.y = y;\n result.z = z;\n result.w = w;\n return result;\n};\n\n/**\n * Multiplies the provided quaternion componentwise by the provided scalar.\n *\n * @param {Quaternion} quaternion The quaternion to be scaled.\n * @param {number} scalar The scalar to multiply with.\n * @param {Quaternion} result The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter.\n */\nQuaternion.multiplyByScalar = function (quaternion, scalar, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"quaternion\", quaternion);\n Check.typeOf.number(\"scalar\", scalar);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result.x = quaternion.x * scalar;\n result.y = quaternion.y * scalar;\n result.z = quaternion.z * scalar;\n result.w = quaternion.w * scalar;\n return result;\n};\n\n/**\n * Divides the provided quaternion componentwise by the provided scalar.\n *\n * @param {Quaternion} quaternion The quaternion to be divided.\n * @param {number} scalar The scalar to divide by.\n * @param {Quaternion} result The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter.\n */\nQuaternion.divideByScalar = function (quaternion, scalar, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"quaternion\", quaternion);\n Check.typeOf.number(\"scalar\", scalar);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n result.x = quaternion.x / scalar;\n result.y = quaternion.y / scalar;\n result.z = quaternion.z / scalar;\n result.w = quaternion.w / scalar;\n return result;\n};\n\n/**\n * Computes the axis of rotation of the provided quaternion.\n *\n * @param {Quaternion} quaternion The quaternion to use.\n * @param {Cartesian3} result The object onto which to store the result.\n * @returns {Cartesian3} The modified result parameter.\n */\nQuaternion.computeAxis = function (quaternion, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"quaternion\", quaternion);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const w = quaternion.w;\n if (\n Math.abs(w - 1.0) < CesiumMath.EPSILON6 ||\n Math.abs(w + 1.0) < CesiumMath.EPSILON6\n ) {\n result.x = 1;\n result.y = result.z = 0;\n return result;\n }\n\n const scalar = 1.0 / Math.sqrt(1.0 - w * w);\n\n result.x = quaternion.x * scalar;\n result.y = quaternion.y * scalar;\n result.z = quaternion.z * scalar;\n return result;\n};\n\n/**\n * Computes the angle of rotation of the provided quaternion.\n *\n * @param {Quaternion} quaternion The quaternion to use.\n * @returns {number} The angle of rotation.\n */\nQuaternion.computeAngle = function (quaternion) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"quaternion\", quaternion);\n //>>includeEnd('debug');\n\n if (Math.abs(quaternion.w - 1.0) < CesiumMath.EPSILON6) {\n return 0.0;\n }\n return 2.0 * Math.acos(quaternion.w);\n};\n\nlet lerpScratch = new Quaternion();\n/**\n * Computes the linear interpolation or extrapolation at t using the provided quaternions.\n *\n * @param {Quaternion} start The value corresponding to t at 0.0.\n * @param {Quaternion} end The value corresponding to t at 1.0.\n * @param {number} t The point along t at which to interpolate.\n * @param {Quaternion} result The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter.\n */\nQuaternion.lerp = function (start, end, t, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"start\", start);\n Check.typeOf.object(\"end\", end);\n Check.typeOf.number(\"t\", t);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n lerpScratch = Quaternion.multiplyByScalar(end, t, lerpScratch);\n result = Quaternion.multiplyByScalar(start, 1.0 - t, result);\n return Quaternion.add(lerpScratch, result, result);\n};\n\nlet slerpEndNegated = new Quaternion();\nlet slerpScaledP = new Quaternion();\nlet slerpScaledR = new Quaternion();\n/**\n * Computes the spherical linear interpolation or extrapolation at t using the provided quaternions.\n *\n * @param {Quaternion} start The value corresponding to t at 0.0.\n * @param {Quaternion} end The value corresponding to t at 1.0.\n * @param {number} t The point along t at which to interpolate.\n * @param {Quaternion} result The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter.\n *\n * @see Quaternion#fastSlerp\n */\nQuaternion.slerp = function (start, end, t, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"start\", start);\n Check.typeOf.object(\"end\", end);\n Check.typeOf.number(\"t\", t);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n let dot = Quaternion.dot(start, end);\n\n // The angle between start must be acute. Since q and -q represent\n // the same rotation, negate q to get the acute angle.\n let r = end;\n if (dot < 0.0) {\n dot = -dot;\n r = slerpEndNegated = Quaternion.negate(end, slerpEndNegated);\n }\n\n // dot > 0, as the dot product approaches 1, the angle between the\n // quaternions vanishes. use linear interpolation.\n if (1.0 - dot < CesiumMath.EPSILON6) {\n return Quaternion.lerp(start, r, t, result);\n }\n\n const theta = Math.acos(dot);\n slerpScaledP = Quaternion.multiplyByScalar(\n start,\n Math.sin((1 - t) * theta),\n slerpScaledP,\n );\n slerpScaledR = Quaternion.multiplyByScalar(\n r,\n Math.sin(t * theta),\n slerpScaledR,\n );\n result = Quaternion.add(slerpScaledP, slerpScaledR, result);\n return Quaternion.multiplyByScalar(result, 1.0 / Math.sin(theta), result);\n};\n\n/**\n * The logarithmic quaternion function.\n *\n * @param {Quaternion} quaternion The unit quaternion.\n * @param {Cartesian3} result The object onto which to store the result.\n * @returns {Cartesian3} The modified result parameter.\n */\nQuaternion.log = function (quaternion, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"quaternion\", quaternion);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const theta = CesiumMath.acosClamped(quaternion.w);\n let thetaOverSinTheta = 0.0;\n\n if (theta !== 0.0) {\n thetaOverSinTheta = theta / Math.sin(theta);\n }\n\n return Cartesian3.multiplyByScalar(quaternion, thetaOverSinTheta, result);\n};\n\n/**\n * The exponential quaternion function.\n *\n * @param {Cartesian3} cartesian The cartesian.\n * @param {Quaternion} result The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter.\n */\nQuaternion.exp = function (cartesian, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"cartesian\", cartesian);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const theta = Cartesian3.magnitude(cartesian);\n let sinThetaOverTheta = 0.0;\n\n if (theta !== 0.0) {\n sinThetaOverTheta = Math.sin(theta) / theta;\n }\n\n result.x = cartesian.x * sinThetaOverTheta;\n result.y = cartesian.y * sinThetaOverTheta;\n result.z = cartesian.z * sinThetaOverTheta;\n result.w = Math.cos(theta);\n\n return result;\n};\n\nconst squadScratchCartesian0 = new Cartesian3();\nconst squadScratchCartesian1 = new Cartesian3();\nconst squadScratchQuaternion0 = new Quaternion();\nconst squadScratchQuaternion1 = new Quaternion();\n\n/**\n * Computes an inner quadrangle point.\n *

This will compute quaternions that ensure a squad curve is C1.

\n *\n * @param {Quaternion} q0 The first quaternion.\n * @param {Quaternion} q1 The second quaternion.\n * @param {Quaternion} q2 The third quaternion.\n * @param {Quaternion} result The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter.\n *\n * @see Quaternion#squad\n */\nQuaternion.computeInnerQuadrangle = function (q0, q1, q2, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"q0\", q0);\n Check.typeOf.object(\"q1\", q1);\n Check.typeOf.object(\"q2\", q2);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const qInv = Quaternion.conjugate(q1, squadScratchQuaternion0);\n Quaternion.multiply(qInv, q2, squadScratchQuaternion1);\n const cart0 = Quaternion.log(squadScratchQuaternion1, squadScratchCartesian0);\n\n Quaternion.multiply(qInv, q0, squadScratchQuaternion1);\n const cart1 = Quaternion.log(squadScratchQuaternion1, squadScratchCartesian1);\n\n Cartesian3.add(cart0, cart1, cart0);\n Cartesian3.multiplyByScalar(cart0, 0.25, cart0);\n Cartesian3.negate(cart0, cart0);\n Quaternion.exp(cart0, squadScratchQuaternion0);\n\n return Quaternion.multiply(q1, squadScratchQuaternion0, result);\n};\n\n/**\n * Computes the spherical quadrangle interpolation between quaternions.\n *\n * @param {Quaternion} q0 The first quaternion.\n * @param {Quaternion} q1 The second quaternion.\n * @param {Quaternion} s0 The first inner quadrangle.\n * @param {Quaternion} s1 The second inner quadrangle.\n * @param {number} t The time in [0,1] used to interpolate.\n * @param {Quaternion} result The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter.\n *\n *\n * @example\n * // 1. compute the squad interpolation between two quaternions on a curve\n * const s0 = Cesium.Quaternion.computeInnerQuadrangle(quaternions[i - 1], quaternions[i], quaternions[i + 1], new Cesium.Quaternion());\n * const s1 = Cesium.Quaternion.computeInnerQuadrangle(quaternions[i], quaternions[i + 1], quaternions[i + 2], new Cesium.Quaternion());\n * const q = Cesium.Quaternion.squad(quaternions[i], quaternions[i + 1], s0, s1, t, new Cesium.Quaternion());\n *\n * // 2. compute the squad interpolation as above but where the first quaternion is a end point.\n * const s1 = Cesium.Quaternion.computeInnerQuadrangle(quaternions[0], quaternions[1], quaternions[2], new Cesium.Quaternion());\n * const q = Cesium.Quaternion.squad(quaternions[0], quaternions[1], quaternions[0], s1, t, new Cesium.Quaternion());\n *\n * @see Quaternion#computeInnerQuadrangle\n */\nQuaternion.squad = function (q0, q1, s0, s1, t, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"q0\", q0);\n Check.typeOf.object(\"q1\", q1);\n Check.typeOf.object(\"s0\", s0);\n Check.typeOf.object(\"s1\", s1);\n Check.typeOf.number(\"t\", t);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const slerp0 = Quaternion.slerp(q0, q1, t, squadScratchQuaternion0);\n const slerp1 = Quaternion.slerp(s0, s1, t, squadScratchQuaternion1);\n return Quaternion.slerp(slerp0, slerp1, 2.0 * t * (1.0 - t), result);\n};\n\nconst fastSlerpScratchQuaternion = new Quaternion();\n// eslint-disable-next-line no-loss-of-precision\nconst opmu = 1.90110745351730037;\nconst u = FeatureDetection.supportsTypedArrays() ? new Float32Array(8) : [];\nconst v = FeatureDetection.supportsTypedArrays() ? new Float32Array(8) : [];\nconst bT = FeatureDetection.supportsTypedArrays() ? new Float32Array(8) : [];\nconst bD = FeatureDetection.supportsTypedArrays() ? new Float32Array(8) : [];\n\nfor (let i = 0; i < 7; ++i) {\n const s = i + 1.0;\n const t = 2.0 * s + 1.0;\n u[i] = 1.0 / (s * t);\n v[i] = s / t;\n}\n\nu[7] = opmu / (8.0 * 17.0);\nv[7] = (opmu * 8.0) / 17.0;\n\n/**\n * Computes the spherical linear interpolation or extrapolation at t using the provided quaternions.\n * This implementation is faster than {@link Quaternion#slerp}, but is only accurate up to 10-6.\n *\n * @param {Quaternion} start The value corresponding to t at 0.0.\n * @param {Quaternion} end The value corresponding to t at 1.0.\n * @param {number} t The point along t at which to interpolate.\n * @param {Quaternion} result The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter.\n *\n * @see Quaternion#slerp\n */\nQuaternion.fastSlerp = function (start, end, t, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"start\", start);\n Check.typeOf.object(\"end\", end);\n Check.typeOf.number(\"t\", t);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n let x = Quaternion.dot(start, end);\n\n let sign;\n if (x >= 0) {\n sign = 1.0;\n } else {\n sign = -1.0;\n x = -x;\n }\n\n const xm1 = x - 1.0;\n const d = 1.0 - t;\n const sqrT = t * t;\n const sqrD = d * d;\n\n for (let i = 7; i >= 0; --i) {\n bT[i] = (u[i] * sqrT - v[i]) * xm1;\n bD[i] = (u[i] * sqrD - v[i]) * xm1;\n }\n\n const cT =\n sign *\n t *\n (1.0 +\n bT[0] *\n (1.0 +\n bT[1] *\n (1.0 +\n bT[2] *\n (1.0 +\n bT[3] *\n (1.0 +\n bT[4] *\n (1.0 + bT[5] * (1.0 + bT[6] * (1.0 + bT[7]))))))));\n const cD =\n d *\n (1.0 +\n bD[0] *\n (1.0 +\n bD[1] *\n (1.0 +\n bD[2] *\n (1.0 +\n bD[3] *\n (1.0 +\n bD[4] *\n (1.0 + bD[5] * (1.0 + bD[6] * (1.0 + bD[7]))))))));\n\n const temp = Quaternion.multiplyByScalar(\n start,\n cD,\n fastSlerpScratchQuaternion,\n );\n Quaternion.multiplyByScalar(end, cT, result);\n return Quaternion.add(temp, result, result);\n};\n\n/**\n * Computes the spherical quadrangle interpolation between quaternions.\n * An implementation that is faster than {@link Quaternion#squad}, but less accurate.\n *\n * @param {Quaternion} q0 The first quaternion.\n * @param {Quaternion} q1 The second quaternion.\n * @param {Quaternion} s0 The first inner quadrangle.\n * @param {Quaternion} s1 The second inner quadrangle.\n * @param {number} t The time in [0,1] used to interpolate.\n * @param {Quaternion} result The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter or a new instance if none was provided.\n *\n * @see Quaternion#squad\n */\nQuaternion.fastSquad = function (q0, q1, s0, s1, t, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"q0\", q0);\n Check.typeOf.object(\"q1\", q1);\n Check.typeOf.object(\"s0\", s0);\n Check.typeOf.object(\"s1\", s1);\n Check.typeOf.number(\"t\", t);\n Check.typeOf.object(\"result\", result);\n //>>includeEnd('debug');\n\n const slerp0 = Quaternion.fastSlerp(q0, q1, t, squadScratchQuaternion0);\n const slerp1 = Quaternion.fastSlerp(s0, s1, t, squadScratchQuaternion1);\n return Quaternion.fastSlerp(slerp0, slerp1, 2.0 * t * (1.0 - t), result);\n};\n\n/**\n * Compares the provided quaternions componentwise and returns\n * true if they are equal, false otherwise.\n *\n * @param {Quaternion} [left] The first quaternion.\n * @param {Quaternion} [right] The second quaternion.\n * @returns {boolean} true if left and right are equal, false otherwise.\n */\nQuaternion.equals = function (left, right) {\n return (\n left === right ||\n (defined(left) &&\n defined(right) &&\n left.x === right.x &&\n left.y === right.y &&\n left.z === right.z &&\n left.w === right.w)\n );\n};\n\n/**\n * Compares the provided quaternions componentwise and returns\n * true if they are within the provided epsilon,\n * false otherwise.\n *\n * @param {Quaternion} [left] The first quaternion.\n * @param {Quaternion} [right] The second quaternion.\n * @param {number} [epsilon=0] The epsilon to use for equality testing.\n * @returns {boolean} true if left and right are within the provided epsilon, false otherwise.\n */\nQuaternion.equalsEpsilon = function (left, right, epsilon) {\n epsilon = defaultValue(epsilon, 0);\n\n return (\n left === right ||\n (defined(left) &&\n defined(right) &&\n Math.abs(left.x - right.x) <= epsilon &&\n Math.abs(left.y - right.y) <= epsilon &&\n Math.abs(left.z - right.z) <= epsilon &&\n Math.abs(left.w - right.w) <= epsilon)\n );\n};\n\n/**\n * An immutable Quaternion instance initialized to (0.0, 0.0, 0.0, 0.0).\n *\n * @type {Quaternion}\n * @constant\n */\nQuaternion.ZERO = Object.freeze(new Quaternion(0.0, 0.0, 0.0, 0.0));\n\n/**\n * An immutable Quaternion instance initialized to (0.0, 0.0, 0.0, 1.0).\n *\n * @type {Quaternion}\n * @constant\n */\nQuaternion.IDENTITY = Object.freeze(new Quaternion(0.0, 0.0, 0.0, 1.0));\n\n/**\n * Duplicates this Quaternion instance.\n *\n * @param {Quaternion} [result] The object onto which to store the result.\n * @returns {Quaternion} The modified result parameter or a new Quaternion instance if one was not provided.\n */\nQuaternion.prototype.clone = function (result) {\n return Quaternion.clone(this, result);\n};\n\n/**\n * Compares this and the provided quaternion componentwise and returns\n * true if they are equal, false otherwise.\n *\n * @param {Quaternion} [right] The right hand side quaternion.\n * @returns {boolean} true if left and right are equal, false otherwise.\n */\nQuaternion.prototype.equals = function (right) {\n return Quaternion.equals(this, right);\n};\n\n/**\n * Compares this and the provided quaternion componentwise and returns\n * true if they are within the provided epsilon,\n * false otherwise.\n *\n * @param {Quaternion} [right] The right hand side quaternion.\n * @param {number} [epsilon=0] The epsilon to use for equality testing.\n * @returns {boolean} true if left and right are within the provided epsilon, false otherwise.\n */\nQuaternion.prototype.equalsEpsilon = function (right, epsilon) {\n return Quaternion.equalsEpsilon(this, right, epsilon);\n};\n\n/**\n * Returns a string representing this quaternion in the format (x, y, z, w).\n *\n * @returns {string} A string representing this Quaternion.\n */\nQuaternion.prototype.toString = function () {\n return `(${this.x}, ${this.y}, ${this.z}, ${this.w})`;\n};\nexport default Quaternion;\n","import Check from \"./Check.js\";\nimport defaultValue from \"./defaultValue.js\";\nimport defined from \"./defined.js\";\nimport DeveloperError from \"./DeveloperError.js\";\nimport Fullscreen from \"./Fullscreen.js\";\n\nlet theNavigator;\nif (typeof navigator !== \"undefined\") {\n theNavigator = navigator;\n} else {\n theNavigator = {};\n}\n\nfunction extractVersion(versionString) {\n const parts = versionString.split(\".\");\n for (let i = 0, len = parts.length; i < len; ++i) {\n parts[i] = parseInt(parts[i], 10);\n }\n return parts;\n}\n\nlet isChromeResult;\nlet chromeVersionResult;\nfunction isChrome() {\n if (!defined(isChromeResult)) {\n isChromeResult = false;\n // Edge contains Chrome in the user agent too\n if (!isEdge()) {\n const fields = / Chrome\\/([\\.0-9]+)/.exec(theNavigator.userAgent);\n if (fields !== null) {\n isChromeResult = true;\n chromeVersionResult = extractVersion(fields[1]);\n }\n }\n }\n\n return isChromeResult;\n}\n\nfunction chromeVersion() {\n return isChrome() && chromeVersionResult;\n}\n\nlet isSafariResult;\nlet safariVersionResult;\nfunction isSafari() {\n if (!defined(isSafariResult)) {\n isSafariResult = false;\n\n // Chrome and Edge contain Safari in the user agent too\n if (\n !isChrome() &&\n !isEdge() &&\n / Safari\\/[\\.0-9]+/.test(theNavigator.userAgent)\n ) {\n const fields = / Version\\/([\\.0-9]+)/.exec(theNavigator.userAgent);\n if (fields !== null) {\n isSafariResult = true;\n safariVersionResult = extractVersion(fields[1]);\n }\n }\n }\n\n return isSafariResult;\n}\n\nfunction safariVersion() {\n return isSafari() && safariVersionResult;\n}\n\nlet isWebkitResult;\nlet webkitVersionResult;\nfunction isWebkit() {\n if (!defined(isWebkitResult)) {\n isWebkitResult = false;\n\n const fields = / AppleWebKit\\/([\\.0-9]+)(\\+?)/.exec(theNavigator.userAgent);\n if (fields !== null) {\n isWebkitResult = true;\n webkitVersionResult = extractVersion(fields[1]);\n webkitVersionResult.isNightly = !!fields[2];\n }\n }\n\n return isWebkitResult;\n}\n\nfunction webkitVersion() {\n return isWebkit() && webkitVersionResult;\n}\n\nlet isInternetExplorerResult;\nlet internetExplorerVersionResult;\nfunction isInternetExplorer() {\n if (!defined(isInternetExplorerResult)) {\n isInternetExplorerResult = false;\n\n let fields;\n if (theNavigator.appName === \"Microsoft Internet Explorer\") {\n fields = /MSIE ([0-9]{1,}[\\.0-9]{0,})/.exec(theNavigator.userAgent);\n if (fields !== null) {\n isInternetExplorerResult = true;\n internetExplorerVersionResult = extractVersion(fields[1]);\n }\n } else if (theNavigator.appName === \"Netscape\") {\n fields = /Trident\\/.*rv:([0-9]{1,}[\\.0-9]{0,})/.exec(\n theNavigator.userAgent,\n );\n if (fields !== null) {\n isInternetExplorerResult = true;\n internetExplorerVersionResult = extractVersion(fields[1]);\n }\n }\n }\n return isInternetExplorerResult;\n}\n\nfunction internetExplorerVersion() {\n return isInternetExplorer() && internetExplorerVersionResult;\n}\n\nlet isEdgeResult;\nlet edgeVersionResult;\nfunction isEdge() {\n if (!defined(isEdgeResult)) {\n isEdgeResult = false;\n const fields = / Edg\\/([\\.0-9]+)/.exec(theNavigator.userAgent);\n if (fields !== null) {\n isEdgeResult = true;\n edgeVersionResult = extractVersion(fields[1]);\n }\n }\n return isEdgeResult;\n}\n\nfunction edgeVersion() {\n return isEdge() && edgeVersionResult;\n}\n\nlet isFirefoxResult;\nlet firefoxVersionResult;\nfunction isFirefox() {\n if (!defined(isFirefoxResult)) {\n isFirefoxResult = false;\n\n const fields = /Firefox\\/([\\.0-9]+)/.exec(theNavigator.userAgent);\n if (fields !== null) {\n isFirefoxResult = true;\n firefoxVersionResult = extractVersion(fields[1]);\n }\n }\n return isFirefoxResult;\n}\n\nlet isWindowsResult;\nfunction isWindows() {\n if (!defined(isWindowsResult)) {\n isWindowsResult = /Windows/i.test(theNavigator.appVersion);\n }\n return isWindowsResult;\n}\n\nlet isIPadOrIOSResult;\nfunction isIPadOrIOS() {\n if (!defined(isIPadOrIOSResult)) {\n isIPadOrIOSResult =\n navigator.platform === \"iPhone\" ||\n navigator.platform === \"iPod\" ||\n navigator.platform === \"iPad\";\n }\n\n return isIPadOrIOSResult;\n}\n\nfunction firefoxVersion() {\n return isFirefox() && firefoxVersionResult;\n}\n\nlet hasPointerEvents;\nfunction supportsPointerEvents() {\n if (!defined(hasPointerEvents)) {\n //While navigator.pointerEnabled is deprecated in the W3C specification\n //we still need to use it if it exists in order to support browsers\n //that rely on it, such as the Windows WebBrowser control which defines\n //PointerEvent but sets navigator.pointerEnabled to false.\n\n //Firefox disabled because of https://github.com/CesiumGS/cesium/issues/6372\n hasPointerEvents =\n !isFirefox() &&\n typeof PointerEvent !== \"undefined\" &&\n (!defined(theNavigator.pointerEnabled) || theNavigator.pointerEnabled);\n }\n return hasPointerEvents;\n}\n\nlet imageRenderingValueResult;\nlet supportsImageRenderingPixelatedResult;\nfunction supportsImageRenderingPixelated() {\n if (!defined(supportsImageRenderingPixelatedResult)) {\n const canvas = document.createElement(\"canvas\");\n canvas.setAttribute(\n \"style\",\n \"image-rendering: -moz-crisp-edges;\" + \"image-rendering: pixelated;\",\n );\n //canvas.style.imageRendering will be undefined, null or an empty string on unsupported browsers.\n const tmp = canvas.style.imageRendering;\n supportsImageRenderingPixelatedResult = defined(tmp) && tmp !== \"\";\n if (supportsImageRenderingPixelatedResult) {\n imageRenderingValueResult = tmp;\n }\n }\n return supportsImageRenderingPixelatedResult;\n}\n\nfunction imageRenderingValue() {\n return supportsImageRenderingPixelated()\n ? imageRenderingValueResult\n : undefined;\n}\n\nfunction supportsWebP() {\n //>>includeStart('debug', pragmas.debug);\n if (!supportsWebP.initialized) {\n throw new DeveloperError(\n \"You must call FeatureDetection.supportsWebP.initialize and wait for the promise to resolve before calling FeatureDetection.supportsWebP\",\n );\n }\n //>>includeEnd('debug');\n return supportsWebP._result;\n}\nsupportsWebP._promise = undefined;\nsupportsWebP._result = undefined;\nsupportsWebP.initialize = function () {\n // From https://developers.google.com/speed/webp/faq#how_can_i_detect_browser_support_for_webp\n if (defined(supportsWebP._promise)) {\n return supportsWebP._promise;\n }\n\n supportsWebP._promise = new Promise((resolve) => {\n const image = new Image();\n image.onload = function () {\n supportsWebP._result = image.width > 0 && image.height > 0;\n resolve(supportsWebP._result);\n };\n\n image.onerror = function () {\n supportsWebP._result = false;\n resolve(supportsWebP._result);\n };\n image.src =\n \"data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA\";\n });\n\n return supportsWebP._promise;\n};\nObject.defineProperties(supportsWebP, {\n initialized: {\n get: function () {\n return defined(supportsWebP._result);\n },\n },\n});\n\nconst typedArrayTypes = [];\nif (typeof ArrayBuffer !== \"undefined\") {\n typedArrayTypes.push(\n Int8Array,\n Uint8Array,\n Int16Array,\n Uint16Array,\n Int32Array,\n Uint32Array,\n Float32Array,\n Float64Array,\n );\n\n if (typeof Uint8ClampedArray !== \"undefined\") {\n typedArrayTypes.push(Uint8ClampedArray);\n }\n\n if (typeof Uint8ClampedArray !== \"undefined\") {\n typedArrayTypes.push(Uint8ClampedArray);\n }\n\n if (typeof BigInt64Array !== \"undefined\") {\n // eslint-disable-next-line no-undef\n typedArrayTypes.push(BigInt64Array);\n }\n\n if (typeof BigUint64Array !== \"undefined\") {\n // eslint-disable-next-line no-undef\n typedArrayTypes.push(BigUint64Array);\n }\n}\n\n/**\n * A set of functions to detect whether the current browser supports\n * various features.\n *\n * @namespace FeatureDetection\n */\nconst FeatureDetection = {\n isChrome: isChrome,\n chromeVersion: chromeVersion,\n isSafari: isSafari,\n safariVersion: safariVersion,\n isWebkit: isWebkit,\n webkitVersion: webkitVersion,\n isInternetExplorer: isInternetExplorer,\n internetExplorerVersion: internetExplorerVersion,\n isEdge: isEdge,\n edgeVersion: edgeVersion,\n isFirefox: isFirefox,\n firefoxVersion: firefoxVersion,\n isWindows: isWindows,\n isIPadOrIOS: isIPadOrIOS,\n hardwareConcurrency: defaultValue(theNavigator.hardwareConcurrency, 3),\n supportsPointerEvents: supportsPointerEvents,\n supportsImageRenderingPixelated: supportsImageRenderingPixelated,\n supportsWebP: supportsWebP,\n imageRenderingValue: imageRenderingValue,\n typedArrayTypes: typedArrayTypes,\n};\n\n/**\n * Detects whether the current browser supports Basis Universal textures and the web assembly modules needed to transcode them.\n *\n * @param {Scene} scene\n * @returns {boolean} true if the browser supports web assembly modules and the scene supports Basis Universal textures, false if not.\n */\nFeatureDetection.supportsBasis = function (scene) {\n return FeatureDetection.supportsWebAssembly() && scene.context.supportsBasis;\n};\n\n/**\n * Detects whether the current browser supports the full screen standard.\n *\n * @returns {boolean} true if the browser supports the full screen standard, false if not.\n *\n * @see Fullscreen\n * @see {@link http://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html|W3C Fullscreen Living Specification}\n */\nFeatureDetection.supportsFullscreen = function () {\n return Fullscreen.supportsFullscreen();\n};\n\n/**\n * Detects whether the current browser supports typed arrays.\n *\n * @returns {boolean} true if the browser supports typed arrays, false if not.\n *\n * @see {@link https://tc39.es/ecma262/#sec-typedarray-objects|Typed Array Specification}\n */\nFeatureDetection.supportsTypedArrays = function () {\n return typeof ArrayBuffer !== \"undefined\";\n};\n\n/**\n * Detects whether the current browser supports BigInt64Array typed arrays.\n *\n * @returns {boolean} true if the browser supports BigInt64Array typed arrays, false if not.\n *\n * @see {@link https://tc39.es/ecma262/#sec-typedarray-objects|Typed Array Specification}\n */\nFeatureDetection.supportsBigInt64Array = function () {\n return typeof BigInt64Array !== \"undefined\";\n};\n\n/**\n * Detects whether the current browser supports BigUint64Array typed arrays.\n *\n * @returns {boolean} true if the browser supports BigUint64Array typed arrays, false if not.\n *\n * @see {@link https://tc39.es/ecma262/#sec-typedarray-objects|Typed Array Specification}\n */\nFeatureDetection.supportsBigUint64Array = function () {\n return typeof BigUint64Array !== \"undefined\";\n};\n\n/**\n * Detects whether the current browser supports BigInt.\n *\n * @returns {boolean} true if the browser supports BigInt, false if not.\n *\n * @see {@link https://tc39.es/ecma262/#sec-bigint-objects|BigInt Specification}\n */\nFeatureDetection.supportsBigInt = function () {\n return typeof BigInt !== \"undefined\";\n};\n\n/**\n * Detects whether the current browser supports Web Workers.\n *\n * @returns {boolean} true if the browsers supports Web Workers, false if not.\n *\n * @see {@link http://www.w3.org/TR/workers/}\n */\nFeatureDetection.supportsWebWorkers = function () {\n return typeof Worker !== \"undefined\";\n};\n\n/**\n * Detects whether the current browser supports Web Assembly.\n *\n * @returns {boolean} true if the browsers supports Web Assembly, false if not.\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/WebAssembly}\n */\nFeatureDetection.supportsWebAssembly = function () {\n return typeof WebAssembly !== \"undefined\";\n};\n\n/**\n * Detects whether the current browser supports a WebGL2 rendering context for the specified scene.\n *\n * @param {Scene} scene the Cesium scene specifying the rendering context\n * @returns {boolean} true if the browser supports a WebGL2 rendering context, false if not.\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/WebGL2RenderingContext|WebGL2RenderingContext}\n */\nFeatureDetection.supportsWebgl2 = function (scene) {\n //>>includeStart('debug', pragmas.debug);\n Check.defined(\"scene\", scene);\n //>>includeEnd('debug');\n\n return scene.context.webgl2;\n};\n\n/**\n * Detects whether the current browser supports ECMAScript modules in web workers.\n * @returns {boolean} true if the browser supports ECMAScript modules in web workers.\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Worker|Worker}\n */\nFeatureDetection.supportsEsmWebWorkers = function () {\n return !isFirefox() || parseInt(firefoxVersionResult) >= 114;\n};\n\nexport default FeatureDetection;\n","import defined from \"./defined.js\";\n\nlet _supportsFullscreen;\nconst _names = {\n requestFullscreen: undefined,\n exitFullscreen: undefined,\n fullscreenEnabled: undefined,\n fullscreenElement: undefined,\n fullscreenchange: undefined,\n fullscreenerror: undefined,\n};\n\n/**\n * Browser-independent functions for working with the standard fullscreen API.\n *\n * @namespace Fullscreen\n *\n * @see {@link http://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html|W3C Fullscreen Living Specification}\n */\nconst Fullscreen = {};\n\nObject.defineProperties(Fullscreen, {\n /**\n * The element that is currently fullscreen, if any. To simply check if the\n * browser is in fullscreen mode or not, use {@link Fullscreen#fullscreen}.\n * @memberof Fullscreen\n * @type {object}\n * @readonly\n */\n element: {\n get: function () {\n if (!Fullscreen.supportsFullscreen()) {\n return undefined;\n }\n\n return document[_names.fullscreenElement];\n },\n },\n\n /**\n * The name of the event on the document that is fired when fullscreen is\n * entered or exited. This event name is intended for use with addEventListener.\n * In your event handler, to determine if the browser is in fullscreen mode or not,\n * use {@link Fullscreen#fullscreen}.\n * @memberof Fullscreen\n * @type {string}\n * @readonly\n */\n changeEventName: {\n get: function () {\n if (!Fullscreen.supportsFullscreen()) {\n return undefined;\n }\n\n return _names.fullscreenchange;\n },\n },\n\n /**\n * The name of the event that is fired when a fullscreen error\n * occurs. This event name is intended for use with addEventListener.\n * @memberof Fullscreen\n * @type {string}\n * @readonly\n */\n errorEventName: {\n get: function () {\n if (!Fullscreen.supportsFullscreen()) {\n return undefined;\n }\n\n return _names.fullscreenerror;\n },\n },\n\n /**\n * Determine whether the browser will allow an element to be made fullscreen, or not.\n * For example, by default, iframes cannot go fullscreen unless the containing page\n * adds an \"allowfullscreen\" attribute (or prefixed equivalent).\n * @memberof Fullscreen\n * @type {boolean}\n * @readonly\n */\n enabled: {\n get: function () {\n if (!Fullscreen.supportsFullscreen()) {\n return undefined;\n }\n\n return document[_names.fullscreenEnabled];\n },\n },\n\n /**\n * Determines if the browser is currently in fullscreen mode.\n * @memberof Fullscreen\n * @type {boolean}\n * @readonly\n */\n fullscreen: {\n get: function () {\n if (!Fullscreen.supportsFullscreen()) {\n return undefined;\n }\n\n return Fullscreen.element !== null;\n },\n },\n});\n\n/**\n * Detects whether the browser supports the standard fullscreen API.\n *\n * @returns {boolean} true if the browser supports the standard fullscreen API,\n * false otherwise.\n */\nFullscreen.supportsFullscreen = function () {\n if (defined(_supportsFullscreen)) {\n return _supportsFullscreen;\n }\n\n _supportsFullscreen = false;\n\n const body = document.body;\n if (typeof body.requestFullscreen === \"function\") {\n // go with the unprefixed, standard set of names\n _names.requestFullscreen = \"requestFullscreen\";\n _names.exitFullscreen = \"exitFullscreen\";\n _names.fullscreenEnabled = \"fullscreenEnabled\";\n _names.fullscreenElement = \"fullscreenElement\";\n _names.fullscreenchange = \"fullscreenchange\";\n _names.fullscreenerror = \"fullscreenerror\";\n _supportsFullscreen = true;\n return _supportsFullscreen;\n }\n\n //check for the correct combination of prefix plus the various names that browsers use\n const prefixes = [\"webkit\", \"moz\", \"o\", \"ms\", \"khtml\"];\n let name;\n for (let i = 0, len = prefixes.length; i < len; ++i) {\n const prefix = prefixes[i];\n\n // casing of Fullscreen differs across browsers\n name = `${prefix}RequestFullscreen`;\n if (typeof body[name] === \"function\") {\n _names.requestFullscreen = name;\n _supportsFullscreen = true;\n } else {\n name = `${prefix}RequestFullScreen`;\n if (typeof body[name] === \"function\") {\n _names.requestFullscreen = name;\n _supportsFullscreen = true;\n }\n }\n\n // disagreement about whether it's \"exit\" as per spec, or \"cancel\"\n name = `${prefix}ExitFullscreen`;\n if (typeof document[name] === \"function\") {\n _names.exitFullscreen = name;\n } else {\n name = `${prefix}CancelFullScreen`;\n if (typeof document[name] === \"function\") {\n _names.exitFullscreen = name;\n }\n }\n\n // casing of Fullscreen differs across browsers\n name = `${prefix}FullscreenEnabled`;\n if (document[name] !== undefined) {\n _names.fullscreenEnabled = name;\n } else {\n name = `${prefix}FullScreenEnabled`;\n if (document[name] !== undefined) {\n _names.fullscreenEnabled = name;\n }\n }\n\n // casing of Fullscreen differs across browsers\n name = `${prefix}FullscreenElement`;\n if (document[name] !== undefined) {\n _names.fullscreenElement = name;\n } else {\n name = `${prefix}FullScreenElement`;\n if (document[name] !== undefined) {\n _names.fullscreenElement = name;\n }\n }\n\n // thankfully, event names are all lowercase per spec\n name = `${prefix}fullscreenchange`;\n // event names do not have 'on' in the front, but the property on the document does\n if (document[`on${name}`] !== undefined) {\n //except on IE\n if (prefix === \"ms\") {\n name = \"MSFullscreenChange\";\n }\n _names.fullscreenchange = name;\n }\n\n name = `${prefix}fullscreenerror`;\n if (document[`on${name}`] !== undefined) {\n //except on IE\n if (prefix === \"ms\") {\n name = \"MSFullscreenError\";\n }\n _names.fullscreenerror = name;\n }\n }\n\n return _supportsFullscreen;\n};\n\n/**\n * Asynchronously requests the browser to enter fullscreen mode on the given element.\n * If fullscreen mode is not supported by the browser, does nothing.\n *\n * @param {object} element The HTML element which will be placed into fullscreen mode.\n * @param {object} [vrDevice] The HMDVRDevice device.\n *\n * @example\n * // Put the entire page into fullscreen.\n * Cesium.Fullscreen.requestFullscreen(document.body)\n *\n * // Place only the Cesium canvas into fullscreen.\n * Cesium.Fullscreen.requestFullscreen(scene.canvas)\n */\nFullscreen.requestFullscreen = function (element, vrDevice) {\n if (!Fullscreen.supportsFullscreen()) {\n return;\n }\n\n element[_names.requestFullscreen]({ vrDisplay: vrDevice });\n};\n\n/**\n * Asynchronously exits fullscreen mode. If the browser is not currently\n * in fullscreen, or if fullscreen mode is not supported by the browser, does nothing.\n */\nFullscreen.exitFullscreen = function () {\n if (!Fullscreen.supportsFullscreen()) {\n return;\n }\n\n document[_names.exitFullscreen]();\n};\n\n//For unit tests\nFullscreen._names = _names;\nexport default Fullscreen;\n"],"names":["$6fb706f4a1c1ff12$var$a","$b1dcbeb8d31d71ff$var$supportsImageBitmapOptionsPromise","$b73be531cd978718$var$a","$b73be531cd978718$var$baseResource","$b73be531cd978718$var$implementation","$19a47bf34378ad7c$var$_supportsFullscreen","$da149e13e9eaa5f6$var$theNavigator","$da149e13e9eaa5f6$var$isChromeResult","$da149e13e9eaa5f6$var$chromeVersionResult","$da149e13e9eaa5f6$var$isSafariResult","$da149e13e9eaa5f6$var$safariVersionResult","$da149e13e9eaa5f6$var$isWebkitResult","$da149e13e9eaa5f6$var$webkitVersionResult","$da149e13e9eaa5f6$var$isInternetExplorerResult","$da149e13e9eaa5f6$var$internetExplorerVersionResult","$da149e13e9eaa5f6$var$isEdgeResult","$da149e13e9eaa5f6$var$edgeVersionResult","$da149e13e9eaa5f6$var$isFirefoxResult","$da149e13e9eaa5f6$var$firefoxVersionResult","$da149e13e9eaa5f6$var$isWindowsResult","$da149e13e9eaa5f6$var$isIPadOrIOSResult","$da149e13e9eaa5f6$var$hasPointerEvents","$da149e13e9eaa5f6$var$imageRenderingValueResult","$da149e13e9eaa5f6$var$supportsImageRenderingPixelatedResult","t","root","factory","$parcel$global","globalThis","$parcel$interopDefault","a","__esModule","default","$parcel$modules","$parcel$inits","parcelRequire","id","exports","init","module","call","err","Error","code","register","parcelRegister","freeExports","nodeType","freeModule","freeGlobal","global","window","self","punycode","key","regexPunycode","regexNonASCII","regexSeparators","errors","floor","Math","stringFromCharCode","String","fromCharCode","error","type","RangeError","map","array","fn","length","result","mapDomain","string","parts","split","replace","join","ucs2decode","value","extra","output","counter","charCodeAt","push","ucs2encode","digitToBasic","digit","flag","adapt","delta","numPoints","firstTime","k","baseMinusTMin","base","decode","input","codePoint","out","basic","j","index","oldi","w","baseMinusT","inputLength","i","n","bias","lastIndexOf","maxInt","splice","encode","handledCPCount","basicLength","m","q","currentValue","handledCPCountPlusOne","qMinusT","test","slice","toLowerCase","define","amd","hasOwnProperty","_IPv6","IPv6","best","address","pos","_segments","segments","_address","total","shift","pop","indexOf","_best","_current","current","inzeroes","noConflict","_SecondLevelDomains","SecondLevelDomains","SLD","list","has","domain","tldOffset","sldOffset","sldList","is","get","$800sp","$jJTNo","$3baabda811939da5$export$befdefbdce210f91","constructor","_$AU","_$AM","_$AT","e","_$AS","update","render","$74d80410d825d70d$var$ee","$74d80410d825d70d$var$ie","$74d80410d825d70d$export$1e5b4ce2fa884e6a","name","strings","Object","keys","reduce","r","s","includes","style","element","ft","Set","delete","removeProperty","add","endsWith","setProperty","noChange","_$litDirective$","values","$kWQjc","$bXwZF","$3pzcG","$8w8ZH","$jQJji","$AXvpI","$1vHsR","$667f84b0348f3801$var$scaleToGeodeticSurfaceIntersection","$667f84b0348f3801$var$scaleToGeodeticSurfaceGradient","$667f84b0348f3801$export$2e2bcd8739ae039","cartesian","oneOverRadii","oneOverRadiiSquared","centerToleranceSquared","func","xMultiplier","yMultiplier","zMultiplier","xMultiplier2","yMultiplier2","zMultiplier2","xMultiplier3","yMultiplier3","zMultiplier3","positionX","x","positionY","y","positionZ","z","oneOverRadiiX","oneOverRadiiY","oneOverRadiiZ","x2","y2","z2","squaredNorm","ratio","sqrt","intersection","multiplyByScalar","isFinite","clone","undefined","oneOverRadiiSquaredX","oneOverRadiiSquaredY","oneOverRadiiSquaredZ","gradient","lambda","magnitude","correction","abs","EPSILON12","$69f9194a3ef67d4b$var$Cartographic","longitude","latitude","height","fromRadians","typeOf","number","fromDegrees","toRadians","$69f9194a3ef67d4b$var$cartesianToCartographicN","$69f9194a3ef67d4b$var$cartesianToCartographicP","$69f9194a3ef67d4b$var$cartesianToCartographicH","_ellipsoidOneOverRadii","_ellipsoidOneOverRadiiSquared","_ellipsoidCenterToleranceSquared","EPSILON1","fromCartesian","ellipsoid","p","_centerToleranceSquared","multiplyComponents","normalize","h","subtract","atan2","asin","sign","dot","toCartesian","cartographic","defined","equals","left","right","equalsEpsilon","epsilon","ZERO","freeze","prototype","toString","$5237444a2d786ec9$var$initialize","greaterThanOrEquals","_radii","_radiiSquared","_radiiToTheFourth","_oneOverRadii","_oneOverRadiiSquared","_minimumRadius","min","_maximumRadius","max","_squaredXOverSquaredZ","$5237444a2d786ec9$var$Ellipsoid","defineProperties","radii","radiiSquared","radiiToTheFourth","minimumRadius","maximumRadius","fromCartesian3","WGS84","UNIT_SPHERE","MOON","LUNAR_RADIUS","_default","set","object","_ellipsoidRadiiSquared","packedLength","pack","startingIndex","unpack","geocentricSurfaceNormal","geodeticSurfaceNormalCartographic","cosLatitude","cos","sin","geodeticSurfaceNormal","isNaN","EPSILON14","$5237444a2d786ec9$var$cartographicToCartesianNormal","$5237444a2d786ec9$var$cartographicToCartesianK","cartographicToCartesian","gamma","divideByScalar","cartographicArrayToCartesianArray","cartographics","Array","$5237444a2d786ec9$var$cartesianToCartographicN","$5237444a2d786ec9$var$cartesianToCartographicP","$5237444a2d786ec9$var$cartesianToCartographicH","cartesianToCartographic","scaleToGeodeticSurface","cartesianArrayToCartographicArray","cartesians","scaleToGeocentricSurface","beta","transformPositionToScaledSpace","position","transformPositionFromScaledSpace","getSurfaceNormalIntersectionWithZAxis","buffer","EPSILON15","greaterThan","squaredXOverSquaredZ","$5237444a2d786ec9$var$scratchEndpoint","getLocalCurvature","surfacePosition","primeVerticalEndpoint","primeVerticalRadius","distance","radiusRatio","fromElements","$5237444a2d786ec9$var$abscissas","$5237444a2d786ec9$var$weights","$5237444a2d786ec9$var$gaussLegendreQuadrature","b","xMean","xRange","sum","dx","surfaceArea","rectangle","minLongitude","west","maxLongitude","east","minLatitude","south","maxLatitude","north","TWO_PI","a2","b2","c2","a2b2","lat","sinPhi","cosPhi","lon","cosTheta","sinTheta","$dba8420c01d8a224$var$Cartesian4","fromColor","color","red","green","blue","alpha","packArray","resultLength","isArray","unpackArray","fromArray","maximumComponent","minimumComponent","minimumByComponent","first","second","maximumByComponent","clamp","magnitudeSquared","$dba8420c01d8a224$var$distanceScratch","distanceSquared","divideComponents","scalar","negate","$dba8420c01d8a224$var$lerpScratch","lerp","start","end","$dba8420c01d8a224$var$mostOrthogonalAxisScratch","mostOrthogonalAxis","f","UNIT_X","UNIT_W","UNIT_Z","UNIT_Y","equalsArray","offset","relativeEpsilon","absoluteEpsilon","ONE","$dba8420c01d8a224$var$scratchF32Array","Float32Array","$dba8420c01d8a224$var$scratchU8Array","Uint8Array","$dba8420c01d8a224$var$littleEndian","$dba8420c01d8a224$var$testU8","$dba8420c01d8a224$var$testU32","Uint32Array","packFloat","unpackFloat","packedFloat","$490279d1ff27cf6c$var$Matrix3","column0Row0","column1Row0","column2Row0","column0Row1","column1Row1","column2Row1","column0Row2","column1Row2","column2Row2","matrix","fromColumnMajorArray","fromRowMajorArray","fromQuaternion","quaternion","xy","xz","xw","yz","yw","zw","w2","m00","m01","m02","m10","m11","m12","m20","m21","m22","fromHeadingPitchRoll","headingPitchRoll","pitch","cosPsi","heading","roll","sinPsi","fromScale","scale","fromUniformScale","fromCrossProduct","vector","fromRotationX","angle","cosAngle","sinAngle","fromRotationY","fromRotationZ","toArray","getElementIndex","column","row","lessThanOrEquals","getColumn","startIndex","setColumn","getRow","setRow","$490279d1ff27cf6c$var$scaleScratch1","setScale","existingScale","getScale","scaleRatioX","scaleRatioY","scaleRatioZ","$490279d1ff27cf6c$var$scaleScratch2","setUniformScale","$490279d1ff27cf6c$var$scratchColumn","$490279d1ff27cf6c$var$scaleScratch3","getMaximumScale","$490279d1ff27cf6c$var$scaleScratch4","setRotation","rotation","$490279d1ff27cf6c$var$scaleScratch5","getRotation","multiply","multiplyByVector","vX","vY","vZ","multiplyByScale","multiplyByUniformScale","transpose","$490279d1ff27cf6c$var$rowVal","$490279d1ff27cf6c$var$colVal","$490279d1ff27cf6c$var$jMatrix","$490279d1ff27cf6c$var$jMatrixTranspose","computeEigenDecomposition","tolerance","EPSILON20","count","sweep","unitaryMatrix","unitary","IDENTITY","diagMatrix","diagonal","$490279d1ff27cf6c$var$computeFrobeniusNorm","norm","temp","$490279d1ff27cf6c$var$offDiagonalFrobeniusNorm","$490279d1ff27cf6c$var$shurDecomposition","maxDiagonal","rotAxis","c","tau","qq","determinant","m31","m32","m13","m23","m33","inverse","$490279d1ff27cf6c$var$scratchTransposeMatrix","inverseTranspose","COLUMN0ROW0","COLUMN0ROW1","COLUMN0ROW2","COLUMN1ROW0","COLUMN1ROW1","COLUMN1ROW2","COLUMN2ROW0","COLUMN2ROW1","COLUMN2ROW2","$60086b06bf5db23f$var$RuntimeError","message","stack","$7ec6ab76c28fee32$var$Matrix4","column3Row0","column3Row1","column3Row2","column0Row3","column1Row3","column2Row3","column3Row3","create","str","fromRotationTranslation","translation","fromTranslationQuaternionRotationScale","scaleX","scaleY","scaleZ","fromTranslationRotationScale","translationRotationScale","fromTranslation","fromRotation","$7ec6ab76c28fee32$var$fromCameraF","$7ec6ab76c28fee32$var$fromCameraR","$7ec6ab76c28fee32$var$fromCameraU","fromCamera","camera","direction","up","cross","sX","sY","sZ","fX","fY","fZ","uX","uY","uZ","t0","t1","t2","computePerspectiveFieldOfView","fovY","aspectRatio","near","far","lessThan","PI","tan","computeOrthographicOffCenter","bottom","top","tx","ty","tz","computePerspectiveOffCenter","computeInfinitePerspectiveOffCenter","computeViewportTransformation","viewport","nearDepthRange","farDepthRange","EMPTY_OBJECT","width","halfWidth","halfHeight","halfDepth","computeView","setTranslation","$7ec6ab76c28fee32$var$scaleScratch1","$7ec6ab76c28fee32$var$scaleScratch2","$7ec6ab76c28fee32$var$scratchColumn","$7ec6ab76c28fee32$var$scaleScratch3","$7ec6ab76c28fee32$var$scaleScratch4","$7ec6ab76c28fee32$var$scaleScratch5","left0","left1","left2","left3","left4","left5","left6","left7","left8","left9","left10","left11","left12","left13","left14","left15","right0","right1","right2","right3","right4","right5","right6","right7","right8","right9","right10","right11","right12","right13","right14","right15","multiplyTransformation","multiplyByMatrix3","multiplyByTranslation","vW","multiplyByPointAsVector","multiplyByPoint","matrix1","matrix2","matrix3","matrix6","matrix7","matrix11","getTranslation","getMatrix3","$7ec6ab76c28fee32$var$scratchInverseRotation","$7ec6ab76c28fee32$var$scratchMatrix3Zero","$7ec6ab76c28fee32$var$scratchBottomRow","$7ec6ab76c28fee32$var$scratchExpectedBottomRow","src0","src1","src2","src3","src4","src5","src6","src7","src8","src9","src10","src11","src12","src13","src14","src15","tmp0","tmp1","tmp2","tmp3","tmp4","tmp5","tmp6","tmp7","tmp8","tmp9","tmp10","tmp11","dst0","dst1","dst2","dst3","dst4","dst5","dst6","dst7","dst8","dst9","dst10","dst11","dst12","dst13","dst14","dst15","det","EPSILON21","EPSILON7","inverseTransformation","matrix0","matrix4","matrix5","matrix8","matrix9","matrix10","$7ec6ab76c28fee32$var$scratchTransposeMatrix","COLUMN0ROW3","COLUMN1ROW3","COLUMN2ROW3","COLUMN3ROW0","COLUMN3ROW1","COLUMN3ROW2","COLUMN3ROW3","$9btZb","$52c19b09ece4c63f$export$2e2bcd8739ae039","itemToFind","comparator","comparison","low","high","$733293b70aae4cad$export$2e2bcd8739ae039","xPoleWander","yPoleWander","xPoleOffset","yPoleOffset","ut1MinusUtc","$86dc94fb6bcfc713$export$2e2bcd8739ae039","year","$33ab1ce7e2935ae4$var$daysInYear","$33ab1ce7e2935ae4$export$2e2bcd8739ae039","month","day","hour","minute","millisecond","isLeapSecond","bool","maximumSecond","validateDate","daysInMonth","$97869fccaa735547$export$2e2bcd8739ae039","date","julianDate","$e3d50c782acbaff1$export$2e2bcd8739ae039","SECONDS_PER_MILLISECOND","SECONDS_PER_MINUTE","MINUTES_PER_HOUR","HOURS_PER_DAY","SECONDS_PER_HOUR","MINUTES_PER_DAY","SECONDS_PER_DAY","DAYS_PER_JULIAN_CENTURY","PICOSECOND","MODIFIED_JULIAN_DATE_DIFFERENCE","$134462e760c5c083$export$2e2bcd8739ae039","UTC","TAI","$73b9691e04761700$var$gregorianDateScratch","$73b9691e04761700$var$daysInMonth","$73b9691e04761700$var$compareLeapSecondDates","leapSecond","dateToFind","$73b9691e04761700$var$JulianDate","compare","$73b9691e04761700$var$binarySearchScratchLeapSecond","$73b9691e04761700$var$convertUtcToTai","leapSeconds","difference","secondsDifference","addSeconds","$73b9691e04761700$var$convertTaiToUtc","$73b9691e04761700$var$setComponents","wholeDays","secondsOfDay","extraDays","dayNumber","$73b9691e04761700$var$computeJulianDateComponents","$73b9691e04761700$var$matchCalendarYear","$73b9691e04761700$var$matchCalendarMonth","$73b9691e04761700$var$matchOrdinalDate","$73b9691e04761700$var$matchWeekDate","$73b9691e04761700$var$matchCalendarDate","$73b9691e04761700$var$utcOffset","$73b9691e04761700$var$matchHours","source","$73b9691e04761700$var$matchHoursMinutes","$73b9691e04761700$var$matchHoursMinutesSeconds","$73b9691e04761700$var$iso8601ErrorMessage","julianDayNumber","timeStandard","fromGregorianDate","components","fromDate","Date","getTime","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","getUTCMilliseconds","fromIso8601","iso8601String","tmp","inLeapYear","dashCount","offsetIndex","tokens","time","match","dayOfYear","weekNumber","dayOfWeek","january4","getUTCDay","setUTCDate","offsetHours","offsetMinutes","getTimezoneOffset","now","$73b9691e04761700$var$toGregorianDateScratch","toGregorianDate","thisUtc","L","N","I","J","remainingSeconds","toDate","gDate","toIso8601","precision","millisecondStr","toFixed","padStart","julianDayNumberDifference","totalDays","dayDifference","daysDifference","computeTaiMinusUtc","seconds","addMinutes","minutes","newSecondsOfDay","addHours","hours","addDays","days","$f3b7c43a7f0c8e85$exports","_part","_URI","URI","url","_urlSupplied","arguments","_baseSupplied","TypeError","location","href","absoluteTo","version","hasOwn","escapeRegEx","getType","obj","filterArrayValues","data","lookup","arrayContains","_type","arraysEqual","one","two","sort","l","trimSlashes","text","escapeForDumbFirefox36","escape","strictEncodeURIComponent","encodeURIComponent","_parts","protocol","username","password","hostname","urn","port","path","query","fragment","preventInvalidHostname","duplicateQueryParameters","escapeQuerySpace","protocol_expression","idn_expression","punycode_expression","ip4_expression","ip6_expression","find_uri_expression","findUri","trim","parens","leading_whitespace_expression","ascii_tab_whitespace","defaultPorts","http","https","ftp","gopher","ws","wss","hostProtocols","invalid_hostname_characters","domAttributes","getDomAttribute","node","nodeName","decodeURIComponent","iso8859","unescape","unicode","characters","pathname","expression","reserved","urnpath","encodeQuery","escaped","decodeQuery","generateAccessor","_group","generateSegmentedPathFunction","_sep","_codingFuncName","_innerCodingFuncName","actualCodingFunc","generateSimpleAccessor","v","build","generatePrefixAccessor","_key","charAt","substring","decodePath","decodeUrnPath","recodePath","recodeUrnPath","encodeReserved","parse","parseAuthority","parseHost","bracketPos","firstColon","firstSlash","nextColon","ensureValidHostname","ensureValidPort","parseUserinfo","_string","parseQuery","items","splits","requireAbsolutePath","buildAuthority","buildHost","buildUserinfo","buildQuery","unique","buildQueryParameter","addQuery","concat","setQuery","removeQuery","hasQuery","withinArray","Boolean","op","joinPaths","nonEmptySegments","segment","uri","commonPath","withinString","callback","options","_start","_end","_trim","_parens","_attributeOpen","lastIndex","exec","ignoreHtml","attributeOpen","search","parensEnd","parensMatch","ignore","hasHostname","rejectEmptyHostname","toASCII","Number","isInteger","removeAll","unconflicted","URITemplate","deferBuild","_deferred_build","valueOf","hash","res","_object","attribute","src","what","ip","ip4","ip6","sld","idn","relative","_protocol","_port","_hostname","scheme","origin","authority","host","userinfo","resource","subdomain","RegExp","tld","ReferenceError","directory","filename","decodePathSegment","mutatedDirectory","normalizePath","suffix","separator","absolute","unshift","segmentCoded","setSearch","addSearch","removeSearch","hasSearch","normalizeProtocol","normalizeQuery","normalizeFragment","normalizeHostname","normalizePort","_was_relative","_parent","_pos","_path","_leadingParents","normalizePathname","normalizeSearch","normalizeHash","d","readable","toUnicode","qp","kv","basedir","resolved","properties","relativeTo","relativeParts","baseParts","common","relativePath","basePath","parents","one_query","two_query","one_map","two_map","checked","$3f52ff37d0636f55$export$2e2bcd8739ae039","$3f52ff37d0636f55$var$clone","deep","propertyName","$8e522a73a8dfbfe2$export$2e2bcd8739ae039","$8e522a73a8dfbfe2$var$combine","object1","object2","property","object1Value","object2Value","object1Defined","object2Defined","$6e11a2ab1ac0872e$export$2e2bcd8739ae039","resolve","reject","promise","Promise","rej","$5d7f3681ccbe43e2$var$getAbsoluteUri","documentObject","document","_implementation","baseURI","relativeUri","$d4cdc3514a25210c$export$2e2bcd8739ae039","includeQuery","$dce14f3284a3bc25$export$2e2bcd8739ae039","uriObject","substr","$5db98adec2cfcc7b$var$context2DsByWidthAndHeight","$5db98adec2cfcc7b$export$2e2bcd8739ae039","image","context2DsByHeight","context2d","canvas","createElement","getContext","willReadFrequently","globalCompositeOperation","drawImage","getImageData","$9f0272ac2370f543$var$blobUriRegex","$9f0272ac2370f543$export$2e2bcd8739ae039","$6fb706f4a1c1ff12$export$2e2bcd8739ae039","$9cb2c183cad552bd$var$dataUriRegex","$9cb2c183cad552bd$export$2e2bcd8739ae039","$e3fa9c82e19e3667$export$2e2bcd8739ae039","script","async","crossOriginIsolated","setAttribute","head","getElementsByTagName","onload","removeChild","onerror","appendChild","$cdf3d7de0c82329e$export$2e2bcd8739ae039","propName","part","len","$cec685f2ea286a8a$export$2e2bcd8739ae039","queryString","subparts","resultValue","$3f5372c4ce85d94e$export$2e2bcd8739ae039","UNISSUED","ISSUED","ACTIVE","RECEIVED","CANCELLED","FAILED","$a60081784b299462$export$2e2bcd8739ae039","TERRAIN","IMAGERY","TILES3D","OTHER","$b1445a5361079efc$var$Request","throttleByServer","throttle","requestFunction","cancelFunction","priorityFunction","priority","serverKey","state","deferred","cancelled","cancel","$caa58768bf1ed120$export$2e2bcd8739ae039","headerString","headers","headerPairs","headerPair","val","$91769fedd238ef04$var$RequestErrorEvent","statusCode","response","responseHeaders","$280a3f96dcc2704b$var$Event","_listeners","_scopes","_toRemove","_insideRaiseEvent","$280a3f96dcc2704b$var$compareNumber","numberOfListeners","addEventListener","listener","scope","event","removeEventListener","listeners","scopes","raiseEvent","apply","toRemove","$3fa9322de64db78e$var$Heap","_comparator","_array","_length","_maximumLength","$3fa9322de64db78e$var$swap","internalArray","maximumLength","originalLength","reserve","heapify","candidate","inserting","resort","ceil","insert","removedElement","parent","$22996820477a6820$var$statistics","numberOfAttemptedRequests","numberOfActiveRequests","numberOfCancelledRequests","numberOfCancelledActiveRequests","numberOfFailedRequests","numberOfActiveRequestsEver","lastNumberOfActiveRequests","$22996820477a6820$var$priorityHeapLength","$22996820477a6820$var$requestHeap","$22996820477a6820$var$activeRequests","$22996820477a6820$var$numberOfActiveRequestsByServer","$22996820477a6820$var$pageUri","$22996820477a6820$var$requestCompletedEvent","$22996820477a6820$var$RequestScheduler","$22996820477a6820$var$updatePriority","request","$22996820477a6820$var$issueRequest","$22996820477a6820$var$startRequest","then","results","catch","$22996820477a6820$var$cancelRequest","active","maximumRequests","maximumRequestsPerServer","requestsByServer","throttleRequests","debugShowStatistics","requestCompletedEvent","statistics","priorityHeapLength","serverHasOpenSlots","desiredRequests","maxRequests","heapHasOpenSlots","removeCount","activeLength","issuedRequests","issuedLength","openSlots","filledSlots","console","log","getServerKey","removedRequest","clearForSpecs","numberOfActiveRequestsByServer","requestHeap","$501f833019c34c9b$var$TrustedServers","$501f833019c34c9b$var$_servers","remove","contains","$501f833019c34c9b$var$getAuthority","clear","$b1dcbeb8d31d71ff$var$xhrBlobSupported","xhr","XMLHttpRequest","open","responseType","$b1dcbeb8d31d71ff$var$Resource","_url","_templateValues","$b1dcbeb8d31d71ff$var$defaultClone","templateValues","_queryParameters","queryParameters","proxy","retryCallback","retryAttempts","_retryCount","parseUrl","_credits","credits","defaultValue","$b1dcbeb8d31d71ff$var$combineQueryParameters","q1","q2","preserveQueryParameters","param","q2Value","$b1dcbeb8d31d71ff$var$fetchImage","flipY","skipColorSpaceConversion","preferImageBitmap","crossOrigin","isDataUri","isBlobUri","isCrossOriginUrl","_Implementations","createImage","retryOnError","retry","$b1dcbeb8d31d71ff$var$checkAndResetRequest","createIfNeeded","getDerivedResource","supportsImageBitmapOptions","createImageBitmap","fetchBlob","blob","all","imageOrientation","premultiplyAlpha","colorSpaceConversion","imageBitmaps","colorWithOptions","colorWithDefaults","isBlobSupported","getUrlComponent","extension","hasHeaders","merge","preserveQuery","baseUrl","$b1dcbeb8d31d71ff$var$stringifyQuery","queryObject","replacement","getURL","setQueryParameters","params","useAsDefault","appendQueryParameters","setTemplateValues","template","that","getBaseUri","appendForwardSlash","fetchArrayBuffer","fetch","fetchImage","useImageBitmap","generatedBlobResource","generatedBlob","preferBlob","blobPromise","supportsImageBitmap","createImageBitmapFromBlob","URL","createObjectURL","revokeObjectURL","fetchText","fetchJson","Accept","JSON","fetchXML","overrideMimeType","fetchJsonp","callbackParameterName","functionName","nextRandomNumber","$b1dcbeb8d31d71ff$var$fetchJsonp","callbackQuery","loadAndExecuteScript","_makeRequest","method","loadWithXhr","abort","$b1dcbeb8d31d71ff$var$dataUriRegex","$b1dcbeb8d31d71ff$var$decodeDataUriText","isBase64","atob","$b1dcbeb8d31d71ff$var$decodeDataUriArrayBuffer","byteString","ArrayBuffer","view","post","put","patch","loadImageElement","Image","naturalWidth","naturalHeight","xhrDeferred","$b1dcbeb8d31d71ff$var$noXMLHttpRequest","$c1eef27c4238262a$var$EarthOrientationParameters","_dates","_samples","_dateColumn","_xPoleWanderRadiansColumn","_yPoleWanderRadiansColumn","_ut1MinusUtcSecondsColumn","_xCelestialPoleOffsetRadiansColumn","_yCelestialPoleOffsetRadiansColumn","_taiMinusUtcSecondsColumn","_columnCount","_lastIndex","_addNewLeapSeconds","addNewLeapSeconds","$c1eef27c4238262a$var$onDataReady","columnNames","samples","$c1eef27c4238262a$var$compareLeapSecondDates","eop","eopData","lastTaiMinusUtc","dateColumn","xPoleWanderRadiansColumn","yPoleWanderRadiansColumn","ut1MinusUtcSecondsColumn","xCelestialPoleOffsetRadiansColumn","yCelestialPoleOffsetRadiansColumn","taiMinusUtcSecondsColumn","dates","mjd","taiMinusUtc","leapSecondIndex","$c1eef27c4238262a$var$fillResultFromIndex","columnCount","$c1eef27c4238262a$var$interpolate","before","after","y1","beforeDate","afterDate","factor","startBefore","startAfter","beforeUt1MinusUtc","afterUt1MinusUtc","offsetDifference","beforeTaiMinusUtc","afterTaiMinusUtc","dataUriRegexResult","$b1dcbeb8d31d71ff$var$decodeDataUri","mimeType","Blob","parser","DOMParser","parseFromString","$b1dcbeb8d31d71ff$var$loadWithHttpRequest","ok","forEach","status","json","arrayBuffer","withCredentials","setRequestHeader","localFile","getAllResponseHeaders","browserResponseType","splitHeaders","responseHeaderString","line","responseXML","hasChildNodes","responseText","send","_DefaultImplementations","DEFAULT","fromUrl","NONE","compute","previousIndexDate","nextIndexDate","isAfterPrevious","isAfterLastSample","isBeforeNext","$79e069d5452f6556$var$HeadingPitchRoll","denominatorRoll","numeratorRoll","denominatorHeading","numeratorHeading","asinClamped","RADIANS_PER_DEGREE","$b73be531cd978718$import_meta","assign","$b73be531cd978718$var$cesiumScriptRegex","$b73be531cd978718$var$tryMakeAbsolute","$b73be531cd978718$var$getCesiumBaseUrl","baseUrlString","CESIUM_BASE_URL","toUrlUndefined","$b73be531cd978718$var$buildModuleUrl","$b73be531cd978718$var$getBaseUrlFromCesiumScript","scripts","getAttribute","$b73be531cd978718$var$buildModuleUrlFromRequireToUrl","moduleID","$b73be531cd978718$var$buildModuleUrlFromBaseUrl","relativeUrl","_cesiumScriptRegex","_buildModuleUrlFromBaseUrl","_clearBaseResource","setBaseUrl","getCesiumBaseUrl","$c9c1200a42974c2d$export$2e2bcd8739ae039","$7212c54286490aec$var$Iau2006XysData","_xysFileUrlTemplate","xysFileUrlTemplate","_interpolationOrder","interpolationOrder","_sampleZeroJulianEphemerisDate","sampleZeroJulianEphemerisDate","_sampleZeroDateTT","_stepSizeDays","stepSizeDays","_samplesPerXysFile","samplesPerXysFile","_totalSamples","totalSamples","_chunkDownloadsInProgress","order","denom","_denominators","xTable","_xTable","stepN","pow","_work","_coef","$7212c54286490aec$var$julianDateScratch","$7212c54286490aec$var$getDaysSinceEpoch","xys","dayTT","secondTT","dateTT","$7212c54286490aec$var$requestXysChunk","xysData","chunkIndex","chunkUrl","chunk","newSamples","preload","startDayTT","startSecondTT","stopDayTT","stopSecondTT","startDaysSinceEpoch","stopDaysSinceEpoch","stopIndex","startChunk","stopChunk","promises","computeXysRadians","daysSinceEpoch","centerIndex","degree","firstIndex","isDataMissing","work","coef","sampleIndex","$19a47bf34378ad7c$var$_names","requestFullscreen","exitFullscreen","fullscreenEnabled","fullscreenElement","fullscreenchange","fullscreenerror","$19a47bf34378ad7c$var$Fullscreen","$da149e13e9eaa5f6$var$extractVersion","versionString","parseInt","$da149e13e9eaa5f6$var$isChrome","$da149e13e9eaa5f6$var$isEdge","fields","userAgent","$da149e13e9eaa5f6$var$isSafari","$da149e13e9eaa5f6$var$isWebkit","isNightly","$da149e13e9eaa5f6$var$isInternetExplorer","appName","$da149e13e9eaa5f6$var$isFirefox","$da149e13e9eaa5f6$var$supportsImageRenderingPixelated","imageRendering","$da149e13e9eaa5f6$var$supportsWebP","initialized","_result","supportsFullscreen","changeEventName","errorEventName","enabled","fullscreen","body","prefixes","prefix","vrDevice","vrDisplay","_names","navigator","_promise","initialize","$da149e13e9eaa5f6$var$typedArrayTypes","Int8Array","Int16Array","Uint16Array","Int32Array","Float64Array","Uint8ClampedArray","BigInt64Array","BigUint64Array","$da149e13e9eaa5f6$var$FeatureDetection","isChrome","chromeVersion","isSafari","safariVersion","isWebkit","webkitVersion","isInternetExplorer","internetExplorerVersion","isEdge","edgeVersion","isFirefox","firefoxVersion","isWindows","appVersion","isIPadOrIOS","platform","hardwareConcurrency","supportsPointerEvents","PointerEvent","pointerEnabled","supportsImageRenderingPixelated","supportsWebP","imageRenderingValue","typedArrayTypes","supportsBasis","scene","supportsWebAssembly","context","supportsTypedArrays","supportsBigInt64Array","supportsBigUint64Array","supportsBigInt","BigInt","supportsWebWorkers","Worker","WebAssembly","supportsWebgl2","webgl2","supportsEsmWebWorkers","$cd53d4b312c9644c$var$Quaternion","$cd53d4b312c9644c$var$fromAxisAngleScratch","fromAxisAngle","axis","halfAngle","$cd53d4b312c9644c$var$fromRotationMatrixNext","$cd53d4b312c9644c$var$fromRotationMatrixQuat","fromRotationMatrix","trace","next","quat","$cd53d4b312c9644c$var$scratchHPRQuaternion","$cd53d4b312c9644c$var$scratchHeadingQuaternion","$cd53d4b312c9644c$var$scratchPitchQuaternion","$cd53d4b312c9644c$var$scratchRollQuaternion","$cd53d4b312c9644c$var$sampledQuaternionAxis","$cd53d4b312c9644c$var$sampledQuaternionRotation","$cd53d4b312c9644c$var$sampledQuaternionTempQuaternion","$cd53d4b312c9644c$var$sampledQuaternionQuaternion0","$cd53d4b312c9644c$var$sampledQuaternionQuaternion0Conjugate","packedInterpolationLength","convertPackedArrayForInterpolation","packedArray","conjugate","computeAxis","computeAngle","unpackInterpolationResult","sourceArray","inverseMagnitude","leftX","leftY","leftZ","leftW","rightX","rightY","rightZ","rightW","EPSILON6","acos","$cd53d4b312c9644c$var$lerpScratch","$cd53d4b312c9644c$var$slerpEndNegated","$cd53d4b312c9644c$var$slerpScaledP","$cd53d4b312c9644c$var$slerpScaledR","slerp","theta","acosClamped","thetaOverSinTheta","exp","sinThetaOverTheta","$cd53d4b312c9644c$var$squadScratchCartesian0","$cd53d4b312c9644c$var$squadScratchCartesian1","$cd53d4b312c9644c$var$squadScratchQuaternion0","$cd53d4b312c9644c$var$squadScratchQuaternion1","computeInnerQuadrangle","q0","qInv","cart0","cart1","squad","s0","s1","slerp0","slerp1","$cd53d4b312c9644c$var$fastSlerpScratchQuaternion","$cd53d4b312c9644c$var$u","$cd53d4b312c9644c$var$v","$cd53d4b312c9644c$var$bT","$cd53d4b312c9644c$var$bD","$cd53d4b312c9644c$var$opmu","fastSlerp","xm1","sqrT","sqrD","cT","cD","fastSquad","$128fc127c88fc802$var$Transforms","$128fc127c88fc802$var$vectorProductLocalFrame","down","$128fc127c88fc802$var$degeneratePositionLocalFrame","$128fc127c88fc802$var$localFrameToFixedFrameCache","$128fc127c88fc802$var$scratchCalculateCartesian","$128fc127c88fc802$var$scratchFirstCartesian","$128fc127c88fc802$var$scratchSecondCartesian","$128fc127c88fc802$var$scratchThirdCartesian","localFrameToFixedFrameGenerator","firstAxis","secondAxis","resultat","thirdAxis","hashAxis","eastNorthUpToFixedFrame","northEastDownToFixedFrame","northUpEastToFixedFrame","northWestUpToFixedFrame","$128fc127c88fc802$var$scratchHPRQuaternion","$128fc127c88fc802$var$scratchScale","$128fc127c88fc802$var$scratchHPRMatrix4","headingPitchRollToFixedFrame","fixedFrameTransform","hprQuaternion","hprMatrix","$128fc127c88fc802$var$scratchENUMatrix4","$128fc127c88fc802$var$scratchHPRMatrix3","headingPitchRollQuaternion","transform","$128fc127c88fc802$var$noScale","$128fc127c88fc802$var$hprCenterScratch","$128fc127c88fc802$var$ffScratch","$128fc127c88fc802$var$hprTransformScratch","$128fc127c88fc802$var$hprRotationScratch","$128fc127c88fc802$var$hprQuaternionScratch","fixedFrameToHeadingPitchRoll","center","toFixedFrame","transformCopy","quaternionRotation","$128fc127c88fc802$var$twoPiOverSecondsInDay","$128fc127c88fc802$var$dateInUtc","computeIcrfToCentralBodyFixedMatrix","transformMatrix","computeIcrfToFixedMatrix","computeTemeToPseudoFixedMatrix","utcDayNumber","utcSecondsIntoDay","diffDays","gha","$128fc127c88fc802$var$gmstConstant0","$128fc127c88fc802$var$gmstConstant1","$128fc127c88fc802$var$gmstConstant2","$128fc127c88fc802$var$wgs84WRPrecessing","$128fc127c88fc802$var$rateCoef","cosGha","sinGha","iau2006XysData","earthOrientationParameters","preloadIcrfFixed","timeInterval","stop","fixedToIcrfMtx","computeFixedToIcrfMatrix","$128fc127c88fc802$var$scratchHpr","$128fc127c88fc802$var$scratchRotationMatrix","$128fc127c88fc802$var$dateScratch","computeMoonFixedToIcrfMatrix","secondsTT","e1","e2","e3","e4","e5","computeIcrfToMoonFixedMatrix","$128fc127c88fc802$var$xysScratch","$128fc127c88fc802$var$eopScratch","$128fc127c88fc802$var$rotation1Scratch","$128fc127c88fc802$var$rotation2Scratch","rotation1","rotation2","matrixQ","dateUt1day","fractionOfDay","dateUt1sec","era","daysSinceJ2000","earthRotation","pfToIcrf","cosxp","cosyp","sinxp","sinyp","ttt","sp","cossp","sinsp","fToPfMtx","$128fc127c88fc802$var$pointToWindowCoordinatesTemp","pointToWindowCoordinates","modelViewProjectionMatrix","viewportTransformation","point","pointToGLWindowCoordinates","fromCartesian4","$128fc127c88fc802$var$normalScratch","$128fc127c88fc802$var$rightScratch","$128fc127c88fc802$var$upScratch","rotationMatrixFromPositionVelocity","velocity","normal","$128fc127c88fc802$var$swizzleMatrix","$128fc127c88fc802$var$scratchCartographic","$128fc127c88fc802$var$scratchCartesian3Projection","$128fc127c88fc802$var$scratchCenter","$128fc127c88fc802$var$scratchRotation","$128fc127c88fc802$var$scratchFromENU","$128fc127c88fc802$var$scratchToENU","basisTo2D","projection","projectedPosition","rtcCenter","project","fromENU","toENU","local","ellipsoidTo2DModelMatrix","$0ad68ca5cf1aea2c$var$vectorScratch","$0ad68ca5cf1aea2c$var$windowPositionScratch","$0ad68ca5cf1aea2c$var$clickLocationScratch","$0ad68ca5cf1aea2c$var$centerScratch","$0ad68ca5cf1aea2c$var$oldTransformScratch","$0ad68ca5cf1aea2c$var$newTransformScratch","$0ad68ca5cf1aea2c$var$pickRayScratch","$0ad68ca5cf1aea2c$var$outerRingSvg","svg","$0ad68ca5cf1aea2c$var$innerRingSvg","$0ad68ca5cf1aea2c$var$rotationMarkerSvg","$0ad68ca5cf1aea2c$var$CesiumCompass","LitElement","clock","ready","orbitCursorAngle","orbitCursorOpacity","resetSpeed","styles","css","rotateClick","unlistenFromPostRender","unlistenFromClockTick","handleRotatePointerMoveFunction","handleRotatePointerMove","bind","handleRotatePointerUpFunction","handleRotatePointerUp","handleOrbitPointerMoveFunction","handleOrbitPointerMove","handleOrbitPointerUpFunction","handleOrbitPointerUp","handleOrbitTickFunction","handleOrbitTick","updated","postRender","outerRingStyle","rotationMarkerStyle","opacity","disconnectedCallback","handlePointerDown","compassElement","currentTarget","compassRectangle","getBoundingClientRect","compassCenter","clientX","clientY","distanceFromCenter","clientWidth","clientHeight","ray","getPickRay","viewCenter","globe","pick","frame","positionWC","distanceFraction","$0ad68ca5cf1aea2c$var$nominalGyroRadius","orbit","rotate","stopPropagation","preventDefault","cursorVector","rotateInitialCursorAngle","oldTransform","lookAtTransform","rotateInitialCameraAngle","moveUpIfTooCloseToTerrain","angleDifference","newCameraAngle","zeroToTwoPi","currentCameraAngle","rotateRight","resetToNorth","negativePiToPi","PI_OVER_TWO","duration","prevProgress","performance","step","elapsed","progress","rotateLeft","requestAnimationFrame","orbitIsLook","orbitLastTimestamp","onTick","updateAngleAndOpacity","timestamp","deltaT","look","rotateUp","distanceToTerrain","getHeight","positionCartographic","controller","screenSpaceCameraController","enableCollisionDetection","distanceDiff","minimumZoomDistance","moveUp","compassWidth","html","customElements","important","importantFlag","styleMap","directive","Directive","partInfo","super","PartType","ATTRIBUTE","styleInfo","prop","this","_previousStyleProperties","isImportant","CHILD","PROPERTY","BOOLEAN_ATTRIBUTE","EVENT","ELEMENT","_partInfo","_$isConnected","_$parent","_$initialize","attributeIndex","__part","__attributeIndex","_$resolve","props"],"version":3,"file":"cesium-compass.f610fb3a.js.map"} \ No newline at end of file diff --git a/cesium-compass.html b/cesium-compass.html index 3d96470..84583bd 100644 --- a/cesium-compass.html +++ b/cesium-compass.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/cesium-view-cube.html b/cesium-view-cube.html index 47eb13b..3018dce 100644 --- a/cesium-view-cube.html +++ b/cesium-view-cube.html @@ -1,4 +1,8 @@