{"version":3,"file":"index.mjs","sources":["../../../../../../packages/components/providers/single-tile/index.ts"],"sourcesContent":["/*\n * @Author: zouyaoji@https://github.com/zouyaoji\n * @Date: 2021-09-16 09:28:13\n * @LastEditTime: 2023-07-25 10:30:37\n * @LastEditors: zouyaoji 370681295@qq.com\n * @Description:\n * @FilePath: \\vue-cesium@next\\packages\\components\\providers\\single-tile\\index.ts\n */\nimport { createCommentVNode, defineComponent, getCurrentInstance } from 'vue'\nimport type { VcComponentInternalInstance, VcComponentPublicInstance, VcReadyObject, VcRectangle } from '@vue-cesium/utils/types'\nimport { useProviders } from '@vue-cesium/composables'\nimport { url, rectangle, credit, ellipsoid, tileWidth, tileHeight } from '@vue-cesium/utils/cesium-props'\nimport { kebabCase } from '@vue-cesium/utils/util'\nimport { providerEmits } from '@vue-cesium/utils/emits'\n\nexport const singletileImageryProviderProps = {\n  ...url,\n  ...rectangle,\n  ...credit,\n  ...ellipsoid,\n  ...tileWidth,\n  ...tileHeight\n}\nexport default defineComponent({\n  name: 'VcImageryProviderSingletile',\n  props: singletileImageryProviderProps,\n  emits: providerEmits,\n  setup(props, ctx) {\n    // state\n    const instance = getCurrentInstance() as VcComponentInternalInstance\n    instance.cesiumClass = 'SingleTileImageryProvider'\n    useProviders(props, ctx, instance)\n    return () => createCommentVNode(kebabCase(instance.proxy?.$options.name || ''))\n  }\n})\n\nexport type VcImageryProviderSingletileProps = {\n  /**\n   * The url for the tile\n   */\n  url: string | Cesium.Resource\n  /**\n   * The rectangle, in radians, covered by the image.\n   */\n  rectangle?: VcRectangle\n  /**\n   * A credit for the data source, which is displayed on the canvas.\n   */\n  credit?: string | Cesium.Credit\n  /**\n   * The ellipsoid. If not specified, the WGS84 ellipsoid is used.\n   */\n  ellipsoid?: Cesium.Ellipsoid\n  /**\n   * The width of the tile, in pixels.\n   */\n  tileWidth?: number\n  /**\n   * The height of the tile, in pixels.\n   */\n  tileHeight?: number\n  /**\n   * Triggers before the VcImageryProviderSingletile is loaded.\n   */\n  onBeforeLoad?: (instance: VcComponentInternalInstance) => void\n  /**\n   * Triggers when the VcImageryProviderSingletile 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 VcImageryProviderSingletile is destroyed.\n   */\n  onDestroyed?: (instance: VcComponentInternalInstance) => void\n  /**\n   * Triggers when the imagery 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 VcImageryProviderSingletileRef = VcComponentPublicInstance<VcImageryProviderSingletileProps>\n"],"names":[],"mappings":";;;;;;;;AAeO,MAAM,8BAAiC,GAAA;AAAA,EAC5C,GAAG,GAAA;AAAA,EACH,GAAG,SAAA;AAAA,EACH,GAAG,MAAA;AAAA,EACH,GAAG,SAAA;AAAA,EACH,GAAG,SAAA;AAAA,EACH,GAAG,UAAA;AACL,EAAA;AACA,gCAAe,eAAgB,CAAA;AAAA,EAC7B,IAAM,EAAA,6BAAA;AAAA,EACN,KAAO,EAAA,8BAAA;AAAA,EACP,KAAO,EAAA,aAAA;AAAA,EACP,KAAA,CAAM,OAAO,GAAK,EAAA;AAEhB,IAAA,MAAM,WAAW,kBAAmB,EAAA,CAAA;AACpC,IAAA,QAAA,CAAS,WAAc,GAAA,2BAAA,CAAA;AACvB,IAAa,YAAA,CAAA,KAAA,EAAO,KAAK,QAAQ,CAAA,CAAA;AACjC,IAAA,OAAO,MAAG;AAhCd,MAAA,IAAA,EAAA,CAAA;AAgCiB,MAAA,OAAA,kBAAA,CAAmB,YAAU,EAAS,GAAA,QAAA,CAAA,KAAA,KAAT,mBAAgB,QAAS,CAAA,IAAA,KAAQ,EAAE,CAAC,CAAA,CAAA;AAAA,KAAA,CAAA;AAAA,GAChF;AACF,CAAC,CAAA;;;;"}