{"version":3,"file":"index.mjs","sources":["../../../../../../packages/components/providers/vr-theworld/index.ts"],"sourcesContent":["/*\n * @Author: zouyaoji@https://github.com/zouyaoji\n * @Date: 2021-09-16 09:28:13\n * @LastEditTime: 2022-04-08 14:32:04\n * @LastEditors: zouyaoji\n * @Description:\n * @FilePath: \\vue-cesium@next\\packages\\components\\providers\\vr-theworld\\index.ts\n */\nimport type { PropType } from 'vue'\nimport { createCommentVNode, defineComponent, getCurrentInstance } from 'vue'\nimport type { VcComponentInternalInstance, VcComponentPublicInstance, VcReadyObject } from 'casc-cesium-utils/types'\nimport { useProviders } from 'casc-cesium-composables'\nimport { ellipsoid, credit } from 'casc-cesium-utils/cesium-props'\nimport { kebabCase } from 'casc-cesium-utils/util'\nimport { providerEmits } from 'casc-cesium-utils/emits'\n\nexport const vrTheworldImageryProviderProps = {\n  url: {\n    type: [String, Object] as PropType<string | Promise<string> | Promise<Cesium.Resource> | Cesium.Resource>,\n    default: 'https://www.vr-theworld.com/vr-theworld/tiles1.0.0/73/'\n  },\n  ...ellipsoid,\n  ...credit\n}\nexport default defineComponent({\n  name: 'VcTerrainProviderVrTheworld',\n  props: vrTheworldImageryProviderProps,\n  emits: providerEmits,\n  setup(props, ctx) {\n    // state\n    const instance = getCurrentInstance() as VcComponentInternalInstance\n    instance.cesiumClass = 'VRTheWorldTerrainProvider'\n    useProviders(props, ctx, instance)\n    return () => createCommentVNode(kebabCase(instance.proxy?.$options.name || ''))\n  }\n})\n\nexport type VcTerrainProviderVrTheworldProps = {\n  /**\n   * The URL of the VR-TheWorld TileMap.\n   */\n  url: string\n  /**\n   * The ellipsoid. If not specified, the WGS84 ellipsoid is used.\n   */\n  ellipsoid?: Cesium.Ellipsoid\n  /**\n   * A credit for the data source, which is displayed on the canvas.\n   */\n  credit?: string\n  /**\n   * Triggers before the VcTerrainProviderVrTheworld is loaded.\n   */\n  onBeforeLoad?: (instance: VcComponentInternalInstance) => void\n  /**\n   * Triggers when the VcTerrainProviderVrTheworld is successfully loaded.\n   */\n  onReady?: (readyObject: VcReadyObject) => void\n  /**\n   * Triggers when the component load failed.\n   */\n  onUnready?: (e: any) => void\n  /**\n   * Triggers when the VcTerrainProviderVrTheworld is destroyed.\n   */\n  onDestroyed?: (instance: VcComponentInternalInstance) => void\n  /**\n   * Triggers when the terrain provider encounters an asynchronous error.\n   */\n  onErrorEvent?: (evt: Cesium.TileProviderError) => void\n  /**\n   * Triggers when the provider is ready for use.\n   */\n  onReadyPromise?: (evt: boolean, viewer: Cesium.Viewer, instance: VcComponentPublicInstance) => void\n}\n\nexport type VcTerrainProviderVrTheworldRef = VcComponentPublicInstance<VcTerrainProviderVrTheworldProps>\n"],"names":[],"mappings":";;;;;;;AAKY,MAAC,8BAA8B,GAAG;AAC9C,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,wDAAwD;AACrE,GAAG;AACH,EAAE,GAAG,SAAS;AACd,EAAE,GAAG,MAAM;AACX,EAAE;AACF,gCAAe,eAAe,CAAC;AAC/B,EAAE,IAAI,EAAE,6BAA6B;AACrC,EAAE,KAAK,EAAE,8BAA8B;AACvC,EAAE,KAAK,EAAE,aAAa;AACtB,EAAE,KAAK,CAAC,KAAK,EAAE,GAAG,EAAE;AACpB,IAAI,MAAM,QAAQ,GAAG,kBAAkB,EAAE,CAAC;AAC1C,IAAI,QAAQ,CAAC,WAAW,GAAG,2BAA2B,CAAC;AACvD,IAAI,YAAY,CAAC,KAAK,EAAE,GAAG,EAAE,QAAQ,CAAC,CAAC;AACvC,IAAI,OAAO,MAAM;AACjB,MAAM,IAAI,EAAE,CAAC;AACb,MAAM,OAAO,kBAAkB,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,GAAG,QAAQ,CAAC,KAAK,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC;AAC9G,KAAK,CAAC;AACN,GAAG;AACH,CAAC,CAAC;;;;"}