{"version":3,"file":"video-viewer2.mjs","sources":["../../../../../../packages/components/video-viewer/src/video-viewer.ts"],"sourcesContent":["import {\n  buildProps,\n  definePropType,\n  isNumber,\n  mutable,\n} from '@element-plus/utils/element-plus'\n\nimport type { Component, ExtractPropTypes } from 'vue'\nimport type { VideoProps } from '@element-plus/components/video'\n\nexport type VideoViewerAction =\n  | 'zoomIn'\n  | 'zoomOut'\n  | 'clockwise'\n  | 'anticlockwise'\n\nexport const videoViewerProps = buildProps({\n  /**\n   * @description preview link list.\n   */\n  urlList: {\n    type: definePropType<string[] | VideoProps[]>(Array),\n    default: () => mutable([] as const),\n  },\n  /**\n   * @description preview backdrop z-index.\n   */\n  zIndex: {\n    type: Number,\n  },\n  /**\n   * @description the initial preview image index, less than or equal to the length of `url-list`.\n   */\n  initialIndex: {\n    type: Number,\n    default: 0,\n  },\n  /**\n   * @description whether preview is infinite.\n   */\n  infinite: {\n    type: Boolean,\n    default: true,\n  },\n  /**\n   * @description whether user can emit close event when clicking backdrop.\n   */\n  hideOnClickModal: Boolean,\n  /**\n   * @description whether to append image itself to body. A nested parent element attribute transform should have this attribute set to `true`.\n   */\n  teleported: Boolean,\n  /**\n   * @description whether the image-viewer can be closed by pressing ESC.\n   */\n  closeOnPressEscape: {\n    type: Boolean,\n    default: true,\n  },\n  /**\n   * @description the zoom rate of the image viewer zoom event.\n   */\n  zoomRate: {\n    type: Number,\n    default: 1.2,\n  },\n  /**\n   * @description the min scale of the image viewer zoom event.\n   */\n  minScale: {\n    type: Number,\n    default: 0.2,\n  },\n  /**\n   * @description the max scale of the image viewer zoom event.\n   */\n  maxScale: {\n    type: Number,\n    default: 7,\n  },\n} as const)\nexport type VideoViewerProps = ExtractPropTypes<typeof videoViewerProps>\n\nexport const videoViewerEmits = {\n  close: () => true,\n  switch: (index: number) => isNumber(index),\n  rotate: (deg: number) => isNumber(deg),\n}\nexport type VideoViewerEmits = typeof videoViewerEmits\n\nexport interface VideoViewerMode {\n  name: string\n  icon: Component\n}\n"],"names":[],"mappings":";;AAgBO,MAAM,mBAAmB,UAAW,CAAA;AAAA,EAIzC,OAAS,EAAA;AAAA,IACP,IAAA,EAAM,eAAwC,KAAK,CAAA;AAAA,IACnD,OAAS,EAAA,MAAM,OAAQ,CAAA,EAAW,CAAA;AAAA,GACpC;AAAA,EAIA,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,MAAA;AAAA,GACR;AAAA,EAIA,YAAc,EAAA;AAAA,IACZ,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,CAAA;AAAA,GACX;AAAA,EAIA,QAAU,EAAA;AAAA,IACR,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,IAAA;AAAA,GACX;AAAA,EAIA,gBAAkB,EAAA,OAAA;AAAA,EAIlB,UAAY,EAAA,OAAA;AAAA,EAIZ,kBAAoB,EAAA;AAAA,IAClB,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,IAAA;AAAA,GACX;AAAA,EAIA,QAAU,EAAA;AAAA,IACR,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,GAAA;AAAA,GACX;AAAA,EAIA,QAAU,EAAA;AAAA,IACR,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,GAAA;AAAA,GACX;AAAA,EAIA,QAAU,EAAA;AAAA,IACR,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,CAAA;AAAA,GACX;AACF,CAAU,EAAA;AAGH,MAAM,gBAAmB,GAAA;AAAA,EAC9B,OAAO,MAAM,IAAA;AAAA,EACb,MAAQ,EAAA,CAAC,KAAkB,KAAA,QAAA,CAAS,KAAK,CAAA;AAAA,EACzC,MAAQ,EAAA,CAAC,GAAgB,KAAA,QAAA,CAAS,GAAG,CAAA;AACvC;;;;"}