{"version":3,"file":"symbol.mjs","sources":["../../../components/video/symbol.ts"],"sourcesContent":["import type { InjectionKey } from 'vue'\n\nexport type VideoPresetControl =\n  | 'play'\n  | 'play-prev'\n  | 'play-next'\n  | 'refresh'\n  | 'timer'\n  | 'playback-rate'\n  | 'flip'\n  | 'volume'\n  | 'pip'\n  | 'full-window'\n  | 'full-browser'\nexport type VideoShortcutOptions = Partial<Record<VideoPresetControl, string>>\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport type VideoControlName = VideoPresetControl | (string & {})\nexport type VideoControlConfig = VideoControlName | [VideoControlName, any]\n\nexport interface VideoControlLayout {\n  left?: VideoControlConfig[],\n  center?: VideoControlConfig[],\n  right?: VideoControlConfig[]\n}\n\nexport interface VideoPlaybackRate {\n  label?: string,\n  value: number\n}\n\nexport type VideoControlType = 'button' | 'select' | 'panel'\n\nexport interface VideoControlOption {\n  value: string | number,\n  label?: string,\n  selectedLabel?: string,\n  disabled?: boolean,\n  divided?: boolean,\n  title?: string\n}\n\nexport interface VideoSegment {\n  time: number,\n  title?: string\n}\n\n// export interface VideoKernel {\n//   play: () => void,\n//   pause: () => void,\n//   mute: () => void,\n//   unmute: () => void,\n//   prev: () => void,\n//   next: () => void,\n//   refresh: () => void | boolean\n// }\n\nexport interface VideoState {\n  placeId?: string,\n  iconScale: number,\n  addShortcut: (key: string, cb: () => void) => () => void\n}\n\nexport interface VideoSlots {\n  poster?: () => any\n}\n\nconst defaultLayout: Required<VideoControlLayout> = {\n  left: ['play-prev', 'play', 'play-next', 'refresh', 'timer'],\n  center: [],\n  right: ['playback-rate', 'volume', 'flip', 'pip', 'full-window', 'full-browser']\n}\n\nfor (const key of Object.keys(defaultLayout) as (keyof VideoControlLayout)[]) {\n  defaultLayout[key] = Object.freeze(defaultLayout[key]) as any\n}\n\nexport const videoDefaultControlLayout = Object.freeze(defaultLayout)\n\nexport const videoDefaultShortcuts = Object.freeze({\n  play: 'Space',\n  'play-prev': 'PageUp',\n  'play-next': 'PageDown',\n  refresh: 'R',\n  flip: 'C',\n  volume: 'M',\n  pip: 'P',\n  'full-window': 'G',\n  'full-browser': 'F'\n})\n\nexport const VIDEO_STATE = '__VXP_VIDEO_STATE' as unknown as InjectionKey<VideoState>\n"],"names":["defaultLayout","key","videoDefaultControlLayout","videoDefaultShortcuts","VIDEO_STATE"],"mappings":"AAkEA,MAAMA,IAA8C;AAAA,EAClD,MAAM,CAAC,aAAa,QAAQ,aAAa,WAAW,OAAO;AAAA,EAC3D,QAAQ,CAAC;AAAA,EACT,OAAO,CAAC,iBAAiB,UAAU,QAAQ,OAAO,eAAe,cAAc;AACjF;AAEA,WAAWC,KAAO,OAAO,KAAKD,CAAa;AACzC,EAAAA,EAAcC,CAAG,IAAI,OAAO,OAAOD,EAAcC,CAAG,CAAC;AAG1C,MAAAC,IAA4B,OAAO,OAAOF,CAAa,GAEvDG,IAAwB,OAAO,OAAO;AAAA,EACjD,MAAM;AAAA,EACN,aAAa;AAAA,EACb,aAAa;AAAA,EACb,SAAS;AAAA,EACT,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,KAAK;AAAA,EACL,eAAe;AAAA,EACf,gBAAgB;AAClB,CAAC,GAEYC,IAAc;"}