@gx-design-vue/image 0.2.0-beta.20 → 0.2.0-beta.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/Image.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { CSSProperties, ExtractPropTypes, SlotsType } from 'vue';
2
- import { gImagePorps } from './props';
3
- export type GImageProps = Partial<ExtractPropTypes<typeof gImagePorps>>;
2
+ import { imagePorps } from './props';
3
+ export type GImageProps = Partial<ExtractPropTypes<typeof imagePorps>>;
4
4
  declare const GImage: import("vue").DefineComponent<ExtractPropTypes<{
5
5
  previewTeleported: {
6
6
  type: import("vue").PropType<boolean>;
package/dist/image.js CHANGED
@@ -3,8 +3,8 @@ import { createVNode as f, defineComponent as Ve, shallowRef as Te, ref as C, re
3
3
  import { ExpandOutlined as Ke, OneToOneOutlined as et, CloseOutlined as tt, ZoomInOutlined as nt, ZoomOutOutlined as at, RotateRightOutlined as it, RotateLeftOutlined as rt, LeftOutlined as ot, RightOutlined as st } from "@ant-design/icons-vue";
4
4
  import { isServer as q, getPrefixCls as Ge, isInContainer as lt, getSlotVNode as Le, isString as ut, getScrollContainer as ct, isNumber as ft } from "@gx-design-vue/pro-utils";
5
5
  import { useState as Ne, onMountedOrActivated as dt } from "@gx-design-vue/pro-hooks";
6
- import { Keyframe as fe, useStyle as ht, mergeToken as gt, getTransitionProps as $e, useProStyle as vt } from "@gx-design-vue/pro-provider";
7
- import { useThrottleFn as mt, useEventListener as Ee } from "@vueuse/core";
6
+ import { Keyframe as fe, useStyle as ht, mergeToken as gt, getTransitionProps as Ee, useProStyle as vt } from "@gx-design-vue/pro-provider";
7
+ import { useThrottleFn as mt, useEventListener as $e } from "@vueuse/core";
8
8
  const R = Ze({
9
9
  func: void 0,
10
10
  bool: void 0,
@@ -210,8 +210,8 @@ function De(e, t, n) {
210
210
  }
211
211
  function xt(e, t, n) {
212
212
  e = v(e, 360) * 6, t = v(t, 100), n = v(n, 100);
213
- var a = Math.floor(e), i = e - a, r = n * (1 - t), o = n * (1 - i * t), l = n * (1 - (1 - i) * t), c = a % 6, S = [n, o, r, r, l, n][c], p = [l, n, n, o, r, r][c], $ = [r, r, l, n, n, o][c];
214
- return { r: S * 255, g: p * 255, b: $ * 255 };
213
+ var a = Math.floor(e), i = e - a, r = n * (1 - t), o = n * (1 - i * t), l = n * (1 - (1 - i) * t), c = a % 6, S = [n, o, r, r, l, n][c], p = [l, n, n, o, r, r][c], E = [r, r, l, n, n, o][c];
214
+ return { r: S * 255, g: p * 255, b: E * 255 };
215
215
  }
216
216
  function He(e, t, n, a) {
217
217
  var i = [
@@ -655,7 +655,7 @@ const Ot = new fe("viewFadeIn", {
655
655
  transform: "scale(1)",
656
656
  opacity: 1
657
657
  }
658
- }), $t = new fe("viewZoomBadgeOut", {
658
+ }), Et = new fe("viewZoomBadgeOut", {
659
659
  "0%": {
660
660
  transform: "scale(1)"
661
661
  },
@@ -676,7 +676,7 @@ function Se(e) {
676
676
  insetInlineStart: 0
677
677
  };
678
678
  }
679
- const Et = (e) => ({
679
+ const $t = (e) => ({
680
680
  boxSizing: "border-box",
681
681
  margin: 0,
682
682
  padding: 0,
@@ -689,7 +689,7 @@ const Et = (e) => ({
689
689
  const { componentCls: t, modalMaskBg: n, paddingSM: a, previewOperationColorDisabled: i, motionDurationSlow: r } = e, o = new Q(n).setAlpha(0.1), l = o.clone().setAlpha(0.2);
690
690
  return {
691
691
  [`${t}-operations`]: {
692
- ...Et(e),
692
+ ...$t(e),
693
693
  display: "flex",
694
694
  flexDirection: "row-reverse",
695
695
  alignItems: "center",
@@ -846,7 +846,7 @@ const Et = (e) => ({
846
846
  animationPlayState: "running"
847
847
  },
848
848
  "&-zoom-leave": {
849
- animationName: $t,
849
+ animationName: Et,
850
850
  animationDuration: e.motionDurationSlow,
851
851
  animationTimingFunction: e.motionEaseOutBack,
852
852
  animationFillMode: "both"
@@ -928,14 +928,14 @@ const jt = /* @__PURE__ */ Ve({
928
928
  emit: t,
929
929
  expose: n
930
930
  }) => {
931
- var ie, re, E, Z, Ce;
931
+ var ie, re, $, Z, Ce;
932
932
  let a = null, i = null, r = null;
933
933
  const o = Ge({
934
934
  suffixCls: "image-viewer"
935
935
  }), {
936
936
  wrapSSR: l,
937
937
  hashId: c
938
- } = Pt(o), S = Te(!1), [p, $] = Ne(!1), [k, x] = Ne(!1), z = C(!0), h = C(e.initialIndex), P = C(null), F = C(null), W = C(X.CONTAIN), m = Xe({
938
+ } = Pt(o), S = Te(!1), [p, E] = Ne(!1), [k, x] = Ne(!1), z = C(!0), h = C(e.initialIndex), P = C(null), F = C(null), W = C(X.CONTAIN), m = Xe({
939
939
  transform: {
940
940
  scale: 1,
941
941
  deg: 0,
@@ -1082,7 +1082,7 @@ const jt = /* @__PURE__ */ Ve({
1082
1082
  },
1083
1083
  type: "zoomIn"
1084
1084
  }, {
1085
- icon: ((E = e.icons) == null ? void 0 : E.zoomOut) || f(at, null, null),
1085
+ icon: (($ = e.icons) == null ? void 0 : $.zoomOut) || f(at, null, null),
1086
1086
  onClick: (s) => {
1087
1087
  s.stopPropagation(), g("zoomOut");
1088
1088
  },
@@ -1112,9 +1112,9 @@ const jt = /* @__PURE__ */ Ve({
1112
1112
  var d, y;
1113
1113
  s && I && (B(), (y = (d = P.value) == null ? void 0 : d.focus) == null || y.call(d));
1114
1114
  }), n({
1115
- setOpen: $
1115
+ setOpen: E
1116
1116
  }), () => {
1117
- const s = $e(`${o}-fade`), I = $e(`${o}-zoom`);
1117
+ const s = Ee(`${o}-fade`), I = Ee(`${o}-zoom`);
1118
1118
  return l(f(_e, {
1119
1119
  to: e.getContainer || "body",
1120
1120
  disabled: !e.teleported
@@ -1232,7 +1232,7 @@ const ce = /* @__PURE__ */ Ve({
1232
1232
  }), {
1233
1233
  wrapSSR: r,
1234
1234
  hashId: o
1235
- } = vt("Image", [Bt], i), l = C(), c = C(""), S = C(!1), p = C(!0), $ = C(!1), k = C(null), x = C();
1235
+ } = vt("Image", [Bt], i), l = C(), c = C(""), S = C(!1), p = C(!0), E = C(!1), k = C(null), x = C();
1236
1236
  let z, h;
1237
1237
  const P = L(() => !q && e.fit ? {
1238
1238
  "object-fit": e.fit
@@ -1276,7 +1276,7 @@ const ce = /* @__PURE__ */ Ve({
1276
1276
  const {
1277
1277
  scrollContainer: u
1278
1278
  } = e;
1279
- Vt(u) ? x.value = u : ut(u) && u !== "" ? x.value = document.querySelector(u) ?? void 0 : k.value && (x.value = ct(k.value)), x.value && (z = Ee(x, "scroll", K), setTimeout(() => te(), 200));
1279
+ Vt(u) ? x.value = u : ut(u) && u !== "" ? x.value = document.querySelector(u) ?? void 0 : k.value && (x.value = ct(k.value)), x.value && (z = $e(x, "scroll", K), setTimeout(() => te(), 200));
1280
1280
  }, de = (u) => {
1281
1281
  if (u.ctrlKey) {
1282
1282
  if (u.deltaY < 0)
@@ -1285,11 +1285,11 @@ const ce = /* @__PURE__ */ Ve({
1285
1285
  return u.preventDefault(), !1;
1286
1286
  }
1287
1287
  }, he = () => {
1288
- !F.value || e.disablePreview || (h = Ee("wheel", de, {
1288
+ !F.value || e.disablePreview || (h = $e("wheel", de, {
1289
1289
  passive: !1
1290
- }), Be = document.body.style.overflow, document.body.style.overflow = "hidden", $.value = !0);
1290
+ }), Be = document.body.style.overflow, document.body.style.overflow = "hidden", E.value = !0);
1291
1291
  }, ae = () => {
1292
- h == null || h(), document.body.style.overflow = Be, $.value = !1;
1292
+ h == null || h(), document.body.style.overflow = Be, E.value = !1;
1293
1293
  };
1294
1294
  _(() => e.src, () => {
1295
1295
  e.lazy ? (p.value = !0, S.value = !1, ee(), ne()) : G();
@@ -1320,15 +1320,15 @@ const ce = /* @__PURE__ */ Ve({
1320
1320
  }
1321
1321
  }, ie = Le(t, e, "fallback"), re = Le(t, e, "placeholder");
1322
1322
  return Qe(() => {
1323
- var E, Z;
1324
- F.value && $.value ? (E = l.value) == null || E.setOpen(!0) : (Z = l.value) == null || Z.setOpen(!1);
1323
+ var $, Z;
1324
+ F.value && E.value ? ($ = l.value) == null || $.setOpen(!0) : (Z = l.value) == null || Z.setOpen(!1);
1325
1325
  }), r(f("div", {
1326
1326
  class: {
1327
1327
  [`${o.value}`]: !0,
1328
1328
  [`${i}`]: !0,
1329
1329
  [`${U}`]: !!U
1330
1330
  },
1331
- ref: (E) => k.value = E,
1331
+ ref: ($) => k.value = $,
1332
1332
  style: {
1333
1333
  width: e.width ? j(e.width) : void 0,
1334
1334
  height: e.height ? j(e.height) : void 0,
@@ -1371,6 +1371,6 @@ export {
1371
1371
  ce as GImage,
1372
1372
  jt as ImageViewer,
1373
1373
  ce as default,
1374
- ue as gImagePorps,
1375
- pt as gImageViewProps
1374
+ ue as imagePorps,
1375
+ pt as imageViewProps
1376
1376
  };
@@ -1 +1 @@
1
- (function(h,_){typeof exports=="object"&&typeof module<"u"?_(exports,require("vue-types"),require("vue"),require("@ant-design/icons-vue"),require("@gx-design-vue/pro-utils"),require("@gx-design-vue/pro-hooks"),require("@gx-design-vue/pro-provider"),require("@vueuse/core")):typeof define=="function"&&define.amd?define(["exports","vue-types","vue","@ant-design/icons-vue","@gx-design-vue/pro-utils","@gx-design-vue/pro-hooks","@gx-design-vue/pro-provider","@vueuse/core"],_):(h=typeof globalThis<"u"?globalThis:h||self,_(h.GImage={},h.vueTypes,h.vue,h.iconsVue,h.proUtils,h.proHooks,h.proProvider,h.core))})(this,function(h,_,i,k,w,de,O,he){"use strict";const $=_.createTypes({func:void 0,bool:void 0,string:void 0,number:void 0,array:void 0,object:void 0,integer:void 0});$.extend([{name:"looseBool",getter:!0,type:Boolean,default:void 0},{name:"style",getter:!0,type:[String,Object],default:void 0},{name:"VueNode",getter:!0,type:null}]);const D={infinite:{type:Boolean,default:!0},zIndex:{type:Number,default:2e3},initialIndex:{type:Number,default:0},getContainer:{type:String}},Z={previewTeleported:{type:Boolean,default:!0},hideOnClickModal:{type:Boolean,default:!0},src:{type:String,default:""},alt:{type:String,default:""},fit:{type:String,default:"contain"},lazy:$.bool,scrollContainer:{type:[String,Object]},placeholder:{type:[Function,Object],default:()=>{}},fallback:{type:[Function,Object],default:()=>{}},onLoad:{type:Function},onError:{type:Function},onClick:{type:Function},disablePreview:$.bool,previewSrcList:{type:Array,default:()=>[]},imageClassName:$.string,imageStyle:$.style,width:$.number,height:$.number,zIndex:D.zIndex,infinite:D.infinite,getContainer:D.getContainer,initialIndex:{...D.initialIndex,default:()=>{}}},Te={urlList:{type:Array,default:()=>[]},teleported:Z.previewTeleported,zIndex:D.zIndex,initialIndex:D.initialIndex,infinite:D.infinite,getContainer:Z.getContainer,onHideOnClickModal:Z.hideOnClickModal,icons:{type:Object,default:()=>({})}};function g(e,t){Pe(e)&&(e="100%");var n=je(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function te(e){return Math.min(1,Math.max(0,e))}function Pe(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function je(e){return typeof e=="string"&&e.indexOf("%")!==-1}function ke(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function ne(e){return e<=1?"".concat(Number(e)*100,"%"):e}function H(e){return e.length===1?"0"+e:String(e)}function Ve(e,t,n){return{r:g(e,255)*255,g:g(t,255)*255,b:g(n,255)*255}}function Oe(e,t,n){e=g(e,255),t=g(t,255),n=g(n,255);var a=Math.max(e,t,n),r=Math.min(e,t,n),o=0,s=0,c=(a+r)/2;if(a===r)s=0,o=0;else{var u=a-r;switch(s=c>.5?u/(2-a-r):u/(a+r),a){case e:o=(t-n)/u+(t<n?6:0);break;case t:o=(n-e)/u+2;break;case n:o=(e-t)/u+4;break}o/=6}return{h:o,s,l:c}}function ge(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Be(e,t,n){var a,r,o;if(e=g(e,360),t=g(t,100),n=g(n,100),t===0)r=n,o=n,a=n;else{var s=n<.5?n*(1+t):n+t-n*t,c=2*n-s;a=ge(c,s,e+1/3),r=ge(c,s,e),o=ge(c,s,e-1/3)}return{r:a*255,g:r*255,b:o*255}}function ze(e,t,n){e=g(e,255),t=g(t,255),n=g(n,255);var a=Math.max(e,t,n),r=Math.min(e,t,n),o=0,s=a,c=a-r,u=a===0?0:c/a;if(a===r)o=0;else{switch(a){case e:o=(t-n)/c+(t<n?6:0);break;case t:o=(n-e)/c+2;break;case n:o=(e-t)/c+4;break}o/=6}return{h:o,s:u,v:s}}function Ye(e,t,n){e=g(e,360)*6,t=g(t,100),n=g(n,100);var a=Math.floor(e),r=e-a,o=n*(1-t),s=n*(1-r*t),c=n*(1-(1-r)*t),u=a%6,I=[n,s,o,o,c,n][u],b=[c,n,n,s,o,o][u],F=[o,o,c,n,n,s][u];return{r:I*255,g:b*255,b:F*255}}function Le(e,t,n,a){var r=[H(Math.round(e).toString(16)),H(Math.round(t).toString(16)),H(Math.round(n).toString(16))];return a&&r[0].startsWith(r[0].charAt(1))&&r[1].startsWith(r[1].charAt(1))&&r[2].startsWith(r[2].charAt(1))?r[0].charAt(0)+r[1].charAt(0)+r[2].charAt(0):r.join("")}function Ge(e,t,n,a,r){var o=[H(Math.round(e).toString(16)),H(Math.round(t).toString(16)),H(Math.round(n).toString(16)),H(We(a))];return r&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))&&o[3].startsWith(o[3].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function We(e){return Math.round(parseFloat(e)*255).toString(16)}function Ee(e){return S(e)/255}function S(e){return parseInt(e,16)}function qe(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var me={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function _e(e){var t={r:0,g:0,b:0},n=1,a=null,r=null,o=null,s=!1,c=!1;return typeof e=="string"&&(e=Qe(e)),typeof e=="object"&&(z(e.r)&&z(e.g)&&z(e.b)?(t=Ve(e.r,e.g,e.b),s=!0,c=String(e.r).substr(-1)==="%"?"prgb":"rgb"):z(e.h)&&z(e.s)&&z(e.v)?(a=ne(e.s),r=ne(e.v),t=Ye(e.h,a,r),s=!0,c="hsv"):z(e.h)&&z(e.s)&&z(e.l)&&(a=ne(e.s),o=ne(e.l),t=Be(e.h,a,o),s=!0,c="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=ke(n),{ok:s,format:e.format||c,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var Ze="[-\\+]?\\d+%?",Xe="[-\\+]?\\d*\\.\\d+%?",R="(?:".concat(Xe,")|(?:").concat(Ze,")"),ve="[\\s|\\(]+(".concat(R,")[,|\\s]+(").concat(R,")[,|\\s]+(").concat(R,")\\s*\\)?"),pe="[\\s|\\(]+(".concat(R,")[,|\\s]+(").concat(R,")[,|\\s]+(").concat(R,")[,|\\s]+(").concat(R,")\\s*\\)?"),T={CSS_UNIT:new RegExp(R),rgb:new RegExp("rgb"+ve),rgba:new RegExp("rgba"+pe),hsl:new RegExp("hsl"+ve),hsla:new RegExp("hsla"+pe),hsv:new RegExp("hsv"+ve),hsva:new RegExp("hsva"+pe),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function Qe(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(me[e])e=me[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=T.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=T.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=T.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=T.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=T.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=T.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=T.hex8.exec(e),n?{r:S(n[1]),g:S(n[2]),b:S(n[3]),a:Ee(n[4]),format:t?"name":"hex8"}:(n=T.hex6.exec(e),n?{r:S(n[1]),g:S(n[2]),b:S(n[3]),format:t?"name":"hex"}:(n=T.hex4.exec(e),n?{r:S(n[1]+n[1]),g:S(n[2]+n[2]),b:S(n[3]+n[3]),a:Ee(n[4]+n[4]),format:t?"name":"hex8"}:(n=T.hex3.exec(e),n?{r:S(n[1]+n[1]),g:S(n[2]+n[2]),b:S(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function z(e){return!!T.CSS_UNIT.exec(String(e))}var X=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var a;if(t instanceof e)return t;typeof t=="number"&&(t=qe(t)),this.originalInput=t;var r=_e(t);this.originalInput=t,this.r=r.r,this.g=r.g,this.b=r.b,this.a=r.a,this.roundA=Math.round(100*this.a)/100,this.format=(a=n.format)!==null&&a!==void 0?a:r.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=r.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,a,r,o=t.r/255,s=t.g/255,c=t.b/255;return o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),s<=.03928?a=s/12.92:a=Math.pow((s+.055)/1.055,2.4),c<=.03928?r=c/12.92:r=Math.pow((c+.055)/1.055,2.4),.2126*n+.7152*a+.0722*r},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=ke(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var t=this.toHsl().s;return t===0},e.prototype.toHsv=function(){var t=ze(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=ze(this.r,this.g,this.b),n=Math.round(t.h*360),a=Math.round(t.s*100),r=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(a,"%, ").concat(r,"%)"):"hsva(".concat(n,", ").concat(a,"%, ").concat(r,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=Oe(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=Oe(this.r,this.g,this.b),n=Math.round(t.h*360),a=Math.round(t.s*100),r=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(a,"%, ").concat(r,"%)"):"hsla(".concat(n,", ").concat(a,"%, ").concat(r,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),Le(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),Ge(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toHexShortString=function(t){return t===void 0&&(t=!1),this.a===1?this.toHexString(t):this.toHex8String(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),a=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(a,")"):"rgba(".concat(t,", ").concat(n,", ").concat(a,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(g(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(g(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+Le(this.r,this.g,this.b,!1),n=0,a=Object.entries(me);n<a.length;n++){var r=a[n],o=r[0],s=r[1];if(t===s)return o}return!1},e.prototype.toString=function(t){var n=!!t;t=t??this.format;var a=!1,r=this.a<1&&this.a>=0,o=!n&&r&&(t.startsWith("hex")||t==="name");return o?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(a=this.toRgbString()),t==="prgb"&&(a=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(a=this.toHexString()),t==="hex3"&&(a=this.toHexString(!0)),t==="hex4"&&(a=this.toHex8String(!0)),t==="hex8"&&(a=this.toHex8String()),t==="name"&&(a=this.toName()),t==="hsl"&&(a=this.toHslString()),t==="hsv"&&(a=this.toHsvString()),a||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=te(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=te(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=te(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=te(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),a=(n.h+t)%360;return n.h=a<0?360+a:a,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var a=this.toRgb(),r=new e(t).toRgb(),o=n/100,s={r:(r.r-a.r)*o+a.r,g:(r.g-a.g)*o+a.g,b:(r.b-a.b)*o+a.b,a:(r.a-a.a)*o+a.a};return new e(s)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var a=this.toHsl(),r=360/n,o=[this];for(a.h=(a.h-(r*t>>1)+720)%360;--t;)a.h=(a.h+r)%360,o.push(new e(a));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),a=n.h,r=n.s,o=n.v,s=[],c=1/t;t--;)s.push(new e({h:a,s:r,v:o})),o=(o+c)%1;return s},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),a=new e(t).toRgb(),r=n.a+a.a*(1-n.a);return new e({r:(n.r*n.a+a.r*a.a*(1-n.a))/r,g:(n.g*n.a+a.g*a.a*(1-n.a))/r,b:(n.b*n.a+a.b*a.a*(1-n.a))/r,a:r})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),a=n.h,r=[this],o=360/t,s=1;s<t;s++)r.push(new e({h:(a+s*o)%360,s:n.s,l:n.l}));return r},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}();const Ke=new O.Keyframe("viewFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),Je=new O.Keyframe("viewFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),Ue=new O.Keyframe("viewZoomBadgeIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),et=new O.Keyframe("viewZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),Re=e=>({position:e||"absolute",inset:0});function be(e){return{position:e,top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0}}const tt=e=>({boxSizing:"border-box",margin:0,padding:0,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,listStyle:"none",fontFamily:e.fontFamily}),nt=e=>{const{componentCls:t,modalMaskBg:n,paddingSM:a,previewOperationColorDisabled:r,motionDurationSlow:o}=e,s=new X(n).setAlpha(.1),c=s.clone().setAlpha(.2);return{[`${t}-operations`]:{...tt(e),display:"flex",flexDirection:"row-reverse",alignItems:"center",color:e.previewOperationColor,listStyle:"none",background:s.toRgbString(),pointerEvents:"auto","&-operation":{marginInlineStart:a,padding:a,cursor:"pointer",transition:`all ${o}`,userSelect:"none","&:hover":{background:c.toRgbString()},"&-disabled":{color:r,pointerEvents:"none"},"&:last-of-type":{marginInlineStart:0}},"&-progress":{position:"absolute",left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%)"},"&-icon":{fontSize:e.previewOperationSize}}}},at=e=>{const{modalMaskBg:t,previewOperationColorDisabled:n,zIndexPopup:a,motionDurationSlow:r}=e,o=new X(t).setAlpha(.1),s=o.clone().setAlpha(.2);return{[`${e.componentCls}-switch-left, ${e.componentCls}-switch-right`]:{position:"fixed",insetBlockStart:"50%",zIndex:a+1,display:"flex",alignItems:"center",justifyContent:"center",width:e.imagePreviewSwitchSize,height:e.imagePreviewSwitchSize,marginTop:-e.imagePreviewSwitchSize/2,color:e.previewOperationColor,background:o.toRgbString(),borderRadius:"50%",transform:"translateY(-50%)",cursor:"pointer",transition:`all ${r}`,pointerEvents:"auto",userSelect:"none","&:hover":{background:s.toRgbString()},"&-disabled":{"&, &:hover":{color:n,background:"transparent",cursor:"not-allowed",[`> ${e.iconCls}`]:{cursor:"not-allowed"}}},[`> ${e.iconCls}`]:{fontSize:e.previewOperationSize}},[`${e.componentCls}-switch-left`]:{insetInlineStart:e.marginSM},[`${e.componentCls}-switch-right`]:{insetInlineEnd:e.marginSM}}},rt=e=>({[e.componentCls]:{"&-root":{...be("fixed"),zIndex:e.zIndexPopup,overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"},"&-wrapper":{...be("fixed"),zIndex:e.zIndexPopup,overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"},"&-mask":{...be("fixed"),zIndex:e.zIndexPopupBase,height:"100%",backgroundColor:e.colorBgMask},"&-block":{height:"100%",textAlign:"center",pointerEvents:"none"},"&-body":{...Re(),overflow:"hidden"},"&-canvas":{...Re(),display:"flex",justifyContent:"center",alignItems:"center","&::before":{display:"inline-block",width:1,height:"50%",marginInlineEnd:-1,content:'""'}},"&-img":{maxWidth:"100%",maxHeight:"100%",verticalAlign:"middle",transform:"scale3d(1, 1, 1)",cursor:"grab",transition:`transform ${e.motionDurationSlow} ${e.motionEaseOut} 0s`,userSelect:"none",pointerEvents:"auto"},"&-fade-appear, &-fade-enter":{animationName:Ke,animationDuration:e.motionDurationSlow,animationTimingFunction:"linear"},"&-fade-leave":{animationName:Je,animationDuration:e.motionDurationSlow,animationTimingFunction:"linear"},"&-zoom-appear, &-zoom-enter":{animationName:Ue,opacity:0,animationTimingFunction:e.motionEaseOutCirc,animationFillMode:"both",transform:"none",animationDuration:e.motionDurationSlow,userSelect:"none"},"&-zoom-enter-active":{animationPlayState:"running"},"&-zoom-leave":{animationName:et,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"}},[`${e.componentCls}-root`]:{[`${e.componentCls}-wrapper`]:{zIndex:e.zIndexPopup}},[`${e.componentCls}-operations-wrapper`]:{position:"fixed",insetBlockStart:0,insetInlineEnd:0,zIndex:e.zIndexPopup+1,width:"100%"},"&":[nt(e),at(e)]});function it(e){return O.useStyle("ImageView",t=>{const n=O.mergeToken(t,{zIndexPopup:t.zIndexPopupBase+80,previewOperationColorDisabled:new X(t.colorTextLightSolid).setAlpha(.25).toRgbString(),modalMaskBg:new X("#000").setAlpha(.45).toRgbString(),previewOperationColor:new X(t.colorTextLightSolid).toRgbString(),previewOperationSize:t.fontSizeIcon*1.5,imagePreviewSwitchSize:t.controlHeightLG,iconCls:"anticon"});return[rt(n)]},e)}const j={tab:"Tab",enter:"Enter",space:"Space",left:"ArrowLeft",up:"ArrowUp",right:"ArrowRight",down:"ArrowDown",esc:"Escape",delete:"Delete",backspace:"Backspace"},ae=function(e,t,n,a=!1){e&&t&&n&&e.addEventListener(t,n,a)},ye=function(e,t,n,a=!1){e&&t&&n&&e.removeEventListener(t,n,a)},Q={CONTAIN:{name:"contain",icon:i.createVNode(k.ExpandOutlined,null,null)},ORIGINAL:{name:"original",icon:i.createVNode(k.OneToOneOutlined,null,null)}},$e=function(){return!w.isServer&&!!window.navigator.userAgent.match(/firefox/i)}()?"DOMMouseScroll":"mousewheel";function we(e){let t=!1;return function(...n){t||(t=!0,window.requestAnimationFrame(()=>{e.apply(this,n),t=!1}))}}const De=i.defineComponent({props:Te,emits:["close","switch"],setup:(e,{emit:t,expose:n})=>{var fe,ue,P,ee,Fe;let a=null,r=null,o=null;const s=w.getPrefixCls({suffixCls:"image-viewer"}),{wrapSSR:c,hashId:u}=it(s),I=i.shallowRef(!1),[b,F]=de.useState(!1),[L,M]=de.useState(!1),E=i.ref(!0),m=i.ref(e.initialIndex),B=i.ref(null),Y=i.ref(null),K=i.ref(Q.CONTAIN),p=i.reactive({transform:{scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}}),re=i.computed(()=>e.urlList.length>1),J=i.computed(()=>m.value===0),ie=i.computed(()=>m.value===e.urlList.length-1),oe=i.computed(()=>e.urlList[m.value]),se=i.computed(()=>{const{scale:l,deg:N,offsetX:d,offsetY:x,enableTransition:y}=p.transform,C={transform:`scale(${l}) rotate(${N}deg)`,transition:y?"transform .3s":"",marginLeft:`${d}px`,marginTop:`${x}px`};return K.value.name===Q.CONTAIN.name&&(C.maxWidth=C.maxHeight="100%"),C}),le=()=>{ye(document,"keydown",a),ye(document,$e,r),a=null,r=null},xe=()=>{le(),t("close"),p.transform={scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}},Ie=l=>{I.value?I.value=!1:B.value===(l==null?void 0:l.target)&&(M(!1),m.value=e.initialIndex)},ce=()=>{p.transform={scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}},G=()=>{if(J.value&&!e.infinite)return;const l=e.urlList.length;m.value=(m.value-1+l)%l},f=()=>{if(ie.value&&!e.infinite)return;const l=e.urlList.length;m.value=(m.value+1)%l},A=()=>{if(E.value)return;const l=Object.keys(Q),N=Object.values(Q),d=K.value.name,y=(N.findIndex(C=>C.name===d)+1)%l.length;K.value=Q[l[y]],ce()},v=(l,N={})=>{if(E.value)return;const{zoomRate:d,rotateDeg:x,enableTransition:y}={zoomRate:.2,rotateDeg:90,enableTransition:!0,...N};switch(l){case"zoomOut":p.transform.scale>.2&&(p.transform.scale=Number.parseFloat((p.transform.scale-d).toFixed(3)));break;case"zoomIn":p.transform.scale=Number.parseFloat((p.transform.scale+d).toFixed(3));break;case"clocelise":p.transform.deg+=x;break;case"anticlocelise":p.transform.deg-=x;break}p.transform.enableTransition=y},W=()=>{a=we(l=>{switch(l.code){case j.esc:M(!1);break;case j.space:A();break;case j.left:G();break;case j.up:v("zoomIn");break;case j.right:f();break;case j.down:v("zoomOut");break}}),r=we(l=>{(l.wheelDelta?l.wheelDelta:-l.detail)>0?v("zoomIn",{zoomRate:.015,enableTransition:!1}):v("zoomOut",{zoomRate:.015,enableTransition:!1})}),ae(document,"keydown",a),ae(document,$e,r)},q=()=>{E.value=!1},Me=l=>{E.value=!1,l.target.alt="加载失败"},U=i.shallowRef(),Ae=l=>{if(E.value||l.button!==0)return;l.preventDefault(),l.stopPropagation(),clearTimeout(U.value),I.value=!0;const{offsetX:N,offsetY:d}=p.transform,x=l.pageX,y=l.pageY;o=we(C=>{p.transform={...p.transform,offsetX:N+C.pageX-x,offsetY:d+C.pageY-y}}),ae(document,"mousemove",o),ae(document,"mouseup",()=>{ye(document,"mousemove",o),b.value&&L.value&&(U.value=setTimeout(()=>{I.value=!1}))})},Ne=[{icon:((fe=e.icons)==null?void 0:fe.close)||i.createVNode(k.CloseOutlined,null,null),onClick:l=>{l.stopPropagation(),M(!1)},type:"close"},{icon:((ue=e.icons)==null?void 0:ue.zoomIn)||i.createVNode(k.ZoomInOutlined,null,null),onClick:l=>{l.stopPropagation(),v("zoomIn")},type:"zoomIn"},{icon:((P=e.icons)==null?void 0:P.zoomOut)||i.createVNode(k.ZoomOutOutlined,null,null),onClick:l=>{l.stopPropagation(),v("zoomOut")},type:"zoomOut"},{icon:((ee=e.icons)==null?void 0:ee.rotateRight)||i.createVNode(k.RotateRightOutlined,null,null),onClick:l=>{l.stopPropagation(),v("anticlocelise")},type:"rotateRight"},{icon:((Fe=e.icons)==null?void 0:Fe.rotateLeft)||i.createVNode(k.RotateLeftOutlined,null,null),onClick:l=>{l.stopPropagation(),v("clocelise")},type:"rotateLeft"}];return i.watch(oe,()=>{i.nextTick(()=>{Y.value.complete||(E.value=!0)})}),i.watch(m,l=>{ce(),t("switch",l)}),i.watch(b,l=>{l&&(L.value=l)}),i.watch([()=>b.value,()=>B.value],([l,N])=>{var d,x;l&&N&&(W(),(x=(d=B.value)==null?void 0:d.focus)==null||x.call(d))}),n({setOpen:F}),()=>{const l=O.getTransitionProps(`${s}-fade`),N=O.getTransitionProps(`${s}-zoom`);return c(i.createVNode(i.Teleport,{to:e.getContainer||"body",disabled:!e.teleported},{default:()=>[b.value&&i.createVNode("div",{class:`${s}-root ${u.value}`},[i.createVNode(i.Transition,l,{default:()=>[i.withDirectives(i.createVNode("div",{class:`${s}-mask ${u.value}`},null),[[i.vShow,b.value&&L.value]])]}),i.createVNode("div",{ref:B,tabindex:-1,class:[`${s}-wrapper`,`${u.value}`],onClick:d=>e.onHideOnClickModal&&Ie(d)},[i.createVNode(i.Transition,i.mergeProps(N,{onAfterLeave:()=>xe()}),{default:()=>{var d,x;return[i.withDirectives(i.createVNode("div",{class:`${s}-block ${u.value}`},[i.createVNode("div",{class:`${s}-content ${u.value}`},[i.createVNode("div",{class:`${s}-body ${u.value}`},[i.createVNode("div",{class:`${s}-operations-wrapper ${u.value}`,onClick:y=>y.stopPropagation()},[i.createVNode("ul",{class:`${s}-operations ${u.value}`},[Ne.map(({icon:y,onClick:C,type:Ce})=>i.createVNode("li",{class:`${s}-operations-operation ${u.value}`,onClick:C,key:Ce},[i.cloneVNode(y,{class:`${s}-operations-icon ${u.value}`})]))])]),i.createVNode("div",{class:`${s}-canvas ${u.value}`},[e.urlList.map((y,C)=>i.createVNode("img",{ref:Y,class:`${s}-img ${u.value}`,style:{...se.value,display:C===m.value?"block":"none"},key:y,src:y,onLoad:()=>q(),onError:Ce=>Me(Ce),onMousedown:Ae},null))]),re.value&&i.createVNode("div",{class:[`${s}-switch-left`,m.value===0&&!e.infinite?`${s}-switch-left-disabled`:"",`${u.value}`],onClick:()=>G()},[((d=e.icons)==null?void 0:d.left)||i.createVNode(k.LeftOutlined,null,null)]),re.value&&i.createVNode("div",{class:[`${s}-switch-right`,m.value===e.urlList.length-1&&!e.infinite?`${s}-switch-right-disabled`:"",`${u.value}`],onClick:()=>f()},[((x=e.icons)==null?void 0:x.right)||i.createVNode(k.RightOutlined,null,null)])])])]),[[i.vShow,b.value&&L.value]])]}})])])]}))}}}),Se={width:"100%",height:"100%"},ot=e=>({[e.componentCls]:{display:"inline-block",position:"relative",overflow:"hidden","&-inner":{...Se,verticalAlign:"top",opacity:1},"&-placeholder":{...Se,backgroundColor:e.colorBgContainerDisabled,backgroundImage:"url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTQuNSAyLjVoLTEzQS41LjUgMCAwIDAgMSAzdjEwYS41LjUgMCAwIDAgLjUuNWgxM2EuNS41IDAgMCAwIC41LS41VjNhLjUuNSAwIDAgMC0uNS0uNXpNNS4yODEgNC43NWExIDEgMCAwIDEgMCAyIDEgMSAwIDAgMSAwLTJ6bTguMDMgNi44M2EuMTI3LjEyNyAwIDAgMS0uMDgxLjAzSDIuNzY5YS4xMjUuMTI1IDAgMCAxLS4wOTYtLjIwN2wyLjY2MS0zLjE1NmEuMTI2LjEyNiAwIDAgMSAuMTc3LS4wMTZsLjAxNi4wMTZMNy4wOCAxMC4wOWwyLjQ3LTIuOTNhLjEyNi4xMjYgMCAwIDEgLjE3Ny0uMDE2bC4wMTUuMDE2IDMuNTg4IDQuMjQ0YS4xMjcuMTI3IDAgMCAxLS4wMi4xNzV6IiBmaWxsPSIjOEM4QzhDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=')",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundSize:"30%"},"&-error":{...Se,display:"flex",alignItems:"center",justifyContent:"center",color:e.colorText,backgroundColor:e.colorBgContainerDisabled},"&-preview":{cursor:"pointer"}}}),st=e=>e&&e.nodeType===Node.ELEMENT_NODE;let He="";const V=i.defineComponent({props:Z,name:"GImage",emits:["error","click","load"],slots:Object,setup(e,{slots:t,emit:n,attrs:a}){const r=w.getPrefixCls({suffixCls:"image"}),{wrapSSR:o,hashId:s}=O.useProStyle("Image",[ot],r),c=i.ref(),u=i.ref(""),I=i.ref(!1),b=i.ref(!0),F=i.ref(!1),L=i.ref(null),M=i.ref();let E,m;const B=i.computed(()=>!w.isServer&&e.fit?{"object-fit":e.fit}:{}),Y=i.computed(()=>{const{previewSrcList:f}=e;return Array.isArray(f)&&f.length>0}),K=i.computed(()=>{const{src:f,previewSrcList:A,initialIndex:v}=e;if(v||v===0)return A.length>=v?v:0;let W=0;const q=A.indexOf(f);return q>=0&&(W=q),W}),p=f=>{u.value=e.src,b.value=!1,I.value=!1,n("load",f)},re=f=>{b.value=!1,I.value=!0,n("error",f)},J=()=>{if(w.isServer)return;b.value=!0,I.value=!1;const f=new Image;f.onload=A=>p(A),f.onerror=re,Object.keys(a||{}).forEach(A=>{if(A.toLowerCase()==="onload")return;const v=(a||{})[A];f.setAttribute(A,v)}),f.src=e.src},ie=he.useThrottleFn(se,200),oe=()=>{w.isServer||!M.value||!ie||(E(),M.value=void 0)};function se(){w.isInContainer(L.value,M.value)&&(J(),oe())}const le=async()=>{if(w.isServer)return;await i.nextTick();const{scrollContainer:f}=e;st(f)?M.value=f:w.isString(f)&&f!==""?M.value=document.querySelector(f)??void 0:L.value&&(M.value=w.getScrollContainer(L.value)),M.value&&(E=he.useEventListener(M,"scroll",ie),setTimeout(()=>se(),200))},xe=f=>{if(f.ctrlKey){if(f.deltaY<0)return f.preventDefault(),!1;if(f.deltaY>0)return f.preventDefault(),!1}},Ie=()=>{!Y.value||e.disablePreview||(m=he.useEventListener("wheel",xe,{passive:!1}),He=document.body.style.overflow,document.body.style.overflow="hidden",F.value=!0)},ce=()=>{m==null||m(),document.body.style.overflow=He,F.value=!1};i.watch(()=>e.src,()=>{e.lazy?(b.value=!0,I.value=!1,oe(),le()):J()});const G=f=>w.isNumber(f)?f+"px":f;return de.onMountedOrActivated(()=>{e.lazy?le():J()}),()=>{const{crossorigin:f,decoding:A,alt:v,sizes:W,srcset:q,usemap:Me,class:U,style:Ae={}}=a,Ne={crossorigin:f,decoding:A,alt:v,sizes:W,srcset:q,usemap:Me,style:{...B.value,height:e.height?G(e.height):void 0}},fe=w.getSlotVNode(t,e,"fallback"),ue=w.getSlotVNode(t,e,"placeholder");return i.watchEffect(()=>{var P,ee;Y.value&&F.value?(P=c.value)==null||P.setOpen(!0):(ee=c.value)==null||ee.setOpen(!1)}),o(i.createVNode("div",{class:{[`${s.value}`]:!0,[`${r}`]:!0,[`${U}`]:!!U},ref:P=>L.value=P,style:{width:e.width?G(e.width):void 0,height:e.height?G(e.height):void 0,display:e.lazy?"block":void 0,...Ae},onClick:()=>{n("click")}},[b.value?ue||i.createVNode("div",{class:`${r}-placeholder ${s.value}`},null):I.value?fe||i.createVNode("div",{class:`${r}-error ${s.value}`},[i.createTextVNode("加载失败")]):u.value&&i.createVNode("img",i.mergeProps(Ne,{class:{[`${s.value}`]:!0,[`${e.imageClassName}`]:!!e.imageClassName,[`${r}-inner`]:!0,[`${r}-preview`]:Y.value},alt:e.alt,src:u.value,onClick:()=>Ie()}),null),i.createVNode(De,{ref:c,zIndex:e.zIndex,infinite:e.infinite,initialIndex:K.value,urlList:e.previewSrcList,getContainer:e.getContainer,onHideOnClickModal:e.hideOnClickModal,onClose:()=>ce()},null)]))}}});V.isGImage=!0,V.install=e=>(e.component(V.name,V),e),h.GImage=V,h.ImageViewer=De,h.default=V,h.gImagePorps=Z,h.gImageViewProps=Te,Object.defineProperties(h,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1
+ (function(h,_){typeof exports=="object"&&typeof module<"u"?_(exports,require("vue-types"),require("vue"),require("@ant-design/icons-vue"),require("@gx-design-vue/pro-utils"),require("@gx-design-vue/pro-hooks"),require("@gx-design-vue/pro-provider"),require("@vueuse/core")):typeof define=="function"&&define.amd?define(["exports","vue-types","vue","@ant-design/icons-vue","@gx-design-vue/pro-utils","@gx-design-vue/pro-hooks","@gx-design-vue/pro-provider","@vueuse/core"],_):(h=typeof globalThis<"u"?globalThis:h||self,_(h.GImage={},h.vueTypes,h.vue,h.iconsVue,h.proUtils,h.proHooks,h.proProvider,h.core))})(this,function(h,_,i,k,w,de,O,he){"use strict";const $=_.createTypes({func:void 0,bool:void 0,string:void 0,number:void 0,array:void 0,object:void 0,integer:void 0});$.extend([{name:"looseBool",getter:!0,type:Boolean,default:void 0},{name:"style",getter:!0,type:[String,Object],default:void 0},{name:"VueNode",getter:!0,type:null}]);const D={infinite:{type:Boolean,default:!0},zIndex:{type:Number,default:2e3},initialIndex:{type:Number,default:0},getContainer:{type:String}},Z={previewTeleported:{type:Boolean,default:!0},hideOnClickModal:{type:Boolean,default:!0},src:{type:String,default:""},alt:{type:String,default:""},fit:{type:String,default:"contain"},lazy:$.bool,scrollContainer:{type:[String,Object]},placeholder:{type:[Function,Object],default:()=>{}},fallback:{type:[Function,Object],default:()=>{}},onLoad:{type:Function},onError:{type:Function},onClick:{type:Function},disablePreview:$.bool,previewSrcList:{type:Array,default:()=>[]},imageClassName:$.string,imageStyle:$.style,width:$.number,height:$.number,zIndex:D.zIndex,infinite:D.infinite,getContainer:D.getContainer,initialIndex:{...D.initialIndex,default:()=>{}}},Te={urlList:{type:Array,default:()=>[]},teleported:Z.previewTeleported,zIndex:D.zIndex,initialIndex:D.initialIndex,infinite:D.infinite,getContainer:Z.getContainer,onHideOnClickModal:Z.hideOnClickModal,icons:{type:Object,default:()=>({})}};function g(e,t){Pe(e)&&(e="100%");var n=je(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function te(e){return Math.min(1,Math.max(0,e))}function Pe(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function je(e){return typeof e=="string"&&e.indexOf("%")!==-1}function ke(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function ne(e){return e<=1?"".concat(Number(e)*100,"%"):e}function H(e){return e.length===1?"0"+e:String(e)}function Ve(e,t,n){return{r:g(e,255)*255,g:g(t,255)*255,b:g(n,255)*255}}function Oe(e,t,n){e=g(e,255),t=g(t,255),n=g(n,255);var a=Math.max(e,t,n),r=Math.min(e,t,n),o=0,s=0,c=(a+r)/2;if(a===r)s=0,o=0;else{var u=a-r;switch(s=c>.5?u/(2-a-r):u/(a+r),a){case e:o=(t-n)/u+(t<n?6:0);break;case t:o=(n-e)/u+2;break;case n:o=(e-t)/u+4;break}o/=6}return{h:o,s,l:c}}function ge(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Be(e,t,n){var a,r,o;if(e=g(e,360),t=g(t,100),n=g(n,100),t===0)r=n,o=n,a=n;else{var s=n<.5?n*(1+t):n+t-n*t,c=2*n-s;a=ge(c,s,e+1/3),r=ge(c,s,e),o=ge(c,s,e-1/3)}return{r:a*255,g:r*255,b:o*255}}function ze(e,t,n){e=g(e,255),t=g(t,255),n=g(n,255);var a=Math.max(e,t,n),r=Math.min(e,t,n),o=0,s=a,c=a-r,u=a===0?0:c/a;if(a===r)o=0;else{switch(a){case e:o=(t-n)/c+(t<n?6:0);break;case t:o=(n-e)/c+2;break;case n:o=(e-t)/c+4;break}o/=6}return{h:o,s:u,v:s}}function Ye(e,t,n){e=g(e,360)*6,t=g(t,100),n=g(n,100);var a=Math.floor(e),r=e-a,o=n*(1-t),s=n*(1-r*t),c=n*(1-(1-r)*t),u=a%6,M=[n,s,o,o,c,n][u],b=[c,n,n,s,o,o][u],F=[o,o,c,n,n,s][u];return{r:M*255,g:b*255,b:F*255}}function Le(e,t,n,a){var r=[H(Math.round(e).toString(16)),H(Math.round(t).toString(16)),H(Math.round(n).toString(16))];return a&&r[0].startsWith(r[0].charAt(1))&&r[1].startsWith(r[1].charAt(1))&&r[2].startsWith(r[2].charAt(1))?r[0].charAt(0)+r[1].charAt(0)+r[2].charAt(0):r.join("")}function Ge(e,t,n,a,r){var o=[H(Math.round(e).toString(16)),H(Math.round(t).toString(16)),H(Math.round(n).toString(16)),H(We(a))];return r&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))&&o[3].startsWith(o[3].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function We(e){return Math.round(parseFloat(e)*255).toString(16)}function Ee(e){return S(e)/255}function S(e){return parseInt(e,16)}function qe(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var me={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function _e(e){var t={r:0,g:0,b:0},n=1,a=null,r=null,o=null,s=!1,c=!1;return typeof e=="string"&&(e=Qe(e)),typeof e=="object"&&(z(e.r)&&z(e.g)&&z(e.b)?(t=Ve(e.r,e.g,e.b),s=!0,c=String(e.r).substr(-1)==="%"?"prgb":"rgb"):z(e.h)&&z(e.s)&&z(e.v)?(a=ne(e.s),r=ne(e.v),t=Ye(e.h,a,r),s=!0,c="hsv"):z(e.h)&&z(e.s)&&z(e.l)&&(a=ne(e.s),o=ne(e.l),t=Be(e.h,a,o),s=!0,c="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=ke(n),{ok:s,format:e.format||c,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var Ze="[-\\+]?\\d+%?",Xe="[-\\+]?\\d*\\.\\d+%?",R="(?:".concat(Xe,")|(?:").concat(Ze,")"),ve="[\\s|\\(]+(".concat(R,")[,|\\s]+(").concat(R,")[,|\\s]+(").concat(R,")\\s*\\)?"),pe="[\\s|\\(]+(".concat(R,")[,|\\s]+(").concat(R,")[,|\\s]+(").concat(R,")[,|\\s]+(").concat(R,")\\s*\\)?"),T={CSS_UNIT:new RegExp(R),rgb:new RegExp("rgb"+ve),rgba:new RegExp("rgba"+pe),hsl:new RegExp("hsl"+ve),hsla:new RegExp("hsla"+pe),hsv:new RegExp("hsv"+ve),hsva:new RegExp("hsva"+pe),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function Qe(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(me[e])e=me[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=T.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=T.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=T.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=T.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=T.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=T.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=T.hex8.exec(e),n?{r:S(n[1]),g:S(n[2]),b:S(n[3]),a:Ee(n[4]),format:t?"name":"hex8"}:(n=T.hex6.exec(e),n?{r:S(n[1]),g:S(n[2]),b:S(n[3]),format:t?"name":"hex"}:(n=T.hex4.exec(e),n?{r:S(n[1]+n[1]),g:S(n[2]+n[2]),b:S(n[3]+n[3]),a:Ee(n[4]+n[4]),format:t?"name":"hex8"}:(n=T.hex3.exec(e),n?{r:S(n[1]+n[1]),g:S(n[2]+n[2]),b:S(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function z(e){return!!T.CSS_UNIT.exec(String(e))}var X=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var a;if(t instanceof e)return t;typeof t=="number"&&(t=qe(t)),this.originalInput=t;var r=_e(t);this.originalInput=t,this.r=r.r,this.g=r.g,this.b=r.b,this.a=r.a,this.roundA=Math.round(100*this.a)/100,this.format=(a=n.format)!==null&&a!==void 0?a:r.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=r.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,a,r,o=t.r/255,s=t.g/255,c=t.b/255;return o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),s<=.03928?a=s/12.92:a=Math.pow((s+.055)/1.055,2.4),c<=.03928?r=c/12.92:r=Math.pow((c+.055)/1.055,2.4),.2126*n+.7152*a+.0722*r},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=ke(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var t=this.toHsl().s;return t===0},e.prototype.toHsv=function(){var t=ze(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=ze(this.r,this.g,this.b),n=Math.round(t.h*360),a=Math.round(t.s*100),r=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(a,"%, ").concat(r,"%)"):"hsva(".concat(n,", ").concat(a,"%, ").concat(r,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=Oe(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=Oe(this.r,this.g,this.b),n=Math.round(t.h*360),a=Math.round(t.s*100),r=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(a,"%, ").concat(r,"%)"):"hsla(".concat(n,", ").concat(a,"%, ").concat(r,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),Le(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),Ge(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toHexShortString=function(t){return t===void 0&&(t=!1),this.a===1?this.toHexString(t):this.toHex8String(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),a=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(a,")"):"rgba(".concat(t,", ").concat(n,", ").concat(a,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(g(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(g(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+Le(this.r,this.g,this.b,!1),n=0,a=Object.entries(me);n<a.length;n++){var r=a[n],o=r[0],s=r[1];if(t===s)return o}return!1},e.prototype.toString=function(t){var n=!!t;t=t??this.format;var a=!1,r=this.a<1&&this.a>=0,o=!n&&r&&(t.startsWith("hex")||t==="name");return o?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(a=this.toRgbString()),t==="prgb"&&(a=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(a=this.toHexString()),t==="hex3"&&(a=this.toHexString(!0)),t==="hex4"&&(a=this.toHex8String(!0)),t==="hex8"&&(a=this.toHex8String()),t==="name"&&(a=this.toName()),t==="hsl"&&(a=this.toHslString()),t==="hsv"&&(a=this.toHsvString()),a||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=te(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=te(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=te(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=te(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),a=(n.h+t)%360;return n.h=a<0?360+a:a,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var a=this.toRgb(),r=new e(t).toRgb(),o=n/100,s={r:(r.r-a.r)*o+a.r,g:(r.g-a.g)*o+a.g,b:(r.b-a.b)*o+a.b,a:(r.a-a.a)*o+a.a};return new e(s)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var a=this.toHsl(),r=360/n,o=[this];for(a.h=(a.h-(r*t>>1)+720)%360;--t;)a.h=(a.h+r)%360,o.push(new e(a));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),a=n.h,r=n.s,o=n.v,s=[],c=1/t;t--;)s.push(new e({h:a,s:r,v:o})),o=(o+c)%1;return s},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),a=new e(t).toRgb(),r=n.a+a.a*(1-n.a);return new e({r:(n.r*n.a+a.r*a.a*(1-n.a))/r,g:(n.g*n.a+a.g*a.a*(1-n.a))/r,b:(n.b*n.a+a.b*a.a*(1-n.a))/r,a:r})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),a=n.h,r=[this],o=360/t,s=1;s<t;s++)r.push(new e({h:(a+s*o)%360,s:n.s,l:n.l}));return r},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}();const Ke=new O.Keyframe("viewFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),Je=new O.Keyframe("viewFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),Ue=new O.Keyframe("viewZoomBadgeIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),et=new O.Keyframe("viewZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),Re=e=>({position:e||"absolute",inset:0});function be(e){return{position:e,top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0}}const tt=e=>({boxSizing:"border-box",margin:0,padding:0,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,listStyle:"none",fontFamily:e.fontFamily}),nt=e=>{const{componentCls:t,modalMaskBg:n,paddingSM:a,previewOperationColorDisabled:r,motionDurationSlow:o}=e,s=new X(n).setAlpha(.1),c=s.clone().setAlpha(.2);return{[`${t}-operations`]:{...tt(e),display:"flex",flexDirection:"row-reverse",alignItems:"center",color:e.previewOperationColor,listStyle:"none",background:s.toRgbString(),pointerEvents:"auto","&-operation":{marginInlineStart:a,padding:a,cursor:"pointer",transition:`all ${o}`,userSelect:"none","&:hover":{background:c.toRgbString()},"&-disabled":{color:r,pointerEvents:"none"},"&:last-of-type":{marginInlineStart:0}},"&-progress":{position:"absolute",left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%)"},"&-icon":{fontSize:e.previewOperationSize}}}},at=e=>{const{modalMaskBg:t,previewOperationColorDisabled:n,zIndexPopup:a,motionDurationSlow:r}=e,o=new X(t).setAlpha(.1),s=o.clone().setAlpha(.2);return{[`${e.componentCls}-switch-left, ${e.componentCls}-switch-right`]:{position:"fixed",insetBlockStart:"50%",zIndex:a+1,display:"flex",alignItems:"center",justifyContent:"center",width:e.imagePreviewSwitchSize,height:e.imagePreviewSwitchSize,marginTop:-e.imagePreviewSwitchSize/2,color:e.previewOperationColor,background:o.toRgbString(),borderRadius:"50%",transform:"translateY(-50%)",cursor:"pointer",transition:`all ${r}`,pointerEvents:"auto",userSelect:"none","&:hover":{background:s.toRgbString()},"&-disabled":{"&, &:hover":{color:n,background:"transparent",cursor:"not-allowed",[`> ${e.iconCls}`]:{cursor:"not-allowed"}}},[`> ${e.iconCls}`]:{fontSize:e.previewOperationSize}},[`${e.componentCls}-switch-left`]:{insetInlineStart:e.marginSM},[`${e.componentCls}-switch-right`]:{insetInlineEnd:e.marginSM}}},rt=e=>({[e.componentCls]:{"&-root":{...be("fixed"),zIndex:e.zIndexPopup,overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"},"&-wrapper":{...be("fixed"),zIndex:e.zIndexPopup,overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"},"&-mask":{...be("fixed"),zIndex:e.zIndexPopupBase,height:"100%",backgroundColor:e.colorBgMask},"&-block":{height:"100%",textAlign:"center",pointerEvents:"none"},"&-body":{...Re(),overflow:"hidden"},"&-canvas":{...Re(),display:"flex",justifyContent:"center",alignItems:"center","&::before":{display:"inline-block",width:1,height:"50%",marginInlineEnd:-1,content:'""'}},"&-img":{maxWidth:"100%",maxHeight:"100%",verticalAlign:"middle",transform:"scale3d(1, 1, 1)",cursor:"grab",transition:`transform ${e.motionDurationSlow} ${e.motionEaseOut} 0s`,userSelect:"none",pointerEvents:"auto"},"&-fade-appear, &-fade-enter":{animationName:Ke,animationDuration:e.motionDurationSlow,animationTimingFunction:"linear"},"&-fade-leave":{animationName:Je,animationDuration:e.motionDurationSlow,animationTimingFunction:"linear"},"&-zoom-appear, &-zoom-enter":{animationName:Ue,opacity:0,animationTimingFunction:e.motionEaseOutCirc,animationFillMode:"both",transform:"none",animationDuration:e.motionDurationSlow,userSelect:"none"},"&-zoom-enter-active":{animationPlayState:"running"},"&-zoom-leave":{animationName:et,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"}},[`${e.componentCls}-root`]:{[`${e.componentCls}-wrapper`]:{zIndex:e.zIndexPopup}},[`${e.componentCls}-operations-wrapper`]:{position:"fixed",insetBlockStart:0,insetInlineEnd:0,zIndex:e.zIndexPopup+1,width:"100%"},"&":[nt(e),at(e)]});function it(e){return O.useStyle("ImageView",t=>{const n=O.mergeToken(t,{zIndexPopup:t.zIndexPopupBase+80,previewOperationColorDisabled:new X(t.colorTextLightSolid).setAlpha(.25).toRgbString(),modalMaskBg:new X("#000").setAlpha(.45).toRgbString(),previewOperationColor:new X(t.colorTextLightSolid).toRgbString(),previewOperationSize:t.fontSizeIcon*1.5,imagePreviewSwitchSize:t.controlHeightLG,iconCls:"anticon"});return[rt(n)]},e)}const j={tab:"Tab",enter:"Enter",space:"Space",left:"ArrowLeft",up:"ArrowUp",right:"ArrowRight",down:"ArrowDown",esc:"Escape",delete:"Delete",backspace:"Backspace"},ae=function(e,t,n,a=!1){e&&t&&n&&e.addEventListener(t,n,a)},ye=function(e,t,n,a=!1){e&&t&&n&&e.removeEventListener(t,n,a)},Q={CONTAIN:{name:"contain",icon:i.createVNode(k.ExpandOutlined,null,null)},ORIGINAL:{name:"original",icon:i.createVNode(k.OneToOneOutlined,null,null)}},$e=function(){return!w.isServer&&!!window.navigator.userAgent.match(/firefox/i)}()?"DOMMouseScroll":"mousewheel";function we(e){let t=!1;return function(...n){t||(t=!0,window.requestAnimationFrame(()=>{e.apply(this,n),t=!1}))}}const De=i.defineComponent({props:Te,emits:["close","switch"],setup:(e,{emit:t,expose:n})=>{var fe,ue,P,ee,Fe;let a=null,r=null,o=null;const s=w.getPrefixCls({suffixCls:"image-viewer"}),{wrapSSR:c,hashId:u}=it(s),M=i.shallowRef(!1),[b,F]=de.useState(!1),[L,I]=de.useState(!1),E=i.ref(!0),m=i.ref(e.initialIndex),B=i.ref(null),Y=i.ref(null),K=i.ref(Q.CONTAIN),p=i.reactive({transform:{scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}}),re=i.computed(()=>e.urlList.length>1),J=i.computed(()=>m.value===0),ie=i.computed(()=>m.value===e.urlList.length-1),oe=i.computed(()=>e.urlList[m.value]),se=i.computed(()=>{const{scale:l,deg:N,offsetX:d,offsetY:x,enableTransition:y}=p.transform,C={transform:`scale(${l}) rotate(${N}deg)`,transition:y?"transform .3s":"",marginLeft:`${d}px`,marginTop:`${x}px`};return K.value.name===Q.CONTAIN.name&&(C.maxWidth=C.maxHeight="100%"),C}),le=()=>{ye(document,"keydown",a),ye(document,$e,r),a=null,r=null},xe=()=>{le(),t("close"),p.transform={scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}},Me=l=>{M.value?M.value=!1:B.value===(l==null?void 0:l.target)&&(I(!1),m.value=e.initialIndex)},ce=()=>{p.transform={scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}},G=()=>{if(J.value&&!e.infinite)return;const l=e.urlList.length;m.value=(m.value-1+l)%l},f=()=>{if(ie.value&&!e.infinite)return;const l=e.urlList.length;m.value=(m.value+1)%l},A=()=>{if(E.value)return;const l=Object.keys(Q),N=Object.values(Q),d=K.value.name,y=(N.findIndex(C=>C.name===d)+1)%l.length;K.value=Q[l[y]],ce()},v=(l,N={})=>{if(E.value)return;const{zoomRate:d,rotateDeg:x,enableTransition:y}={zoomRate:.2,rotateDeg:90,enableTransition:!0,...N};switch(l){case"zoomOut":p.transform.scale>.2&&(p.transform.scale=Number.parseFloat((p.transform.scale-d).toFixed(3)));break;case"zoomIn":p.transform.scale=Number.parseFloat((p.transform.scale+d).toFixed(3));break;case"clocelise":p.transform.deg+=x;break;case"anticlocelise":p.transform.deg-=x;break}p.transform.enableTransition=y},W=()=>{a=we(l=>{switch(l.code){case j.esc:I(!1);break;case j.space:A();break;case j.left:G();break;case j.up:v("zoomIn");break;case j.right:f();break;case j.down:v("zoomOut");break}}),r=we(l=>{(l.wheelDelta?l.wheelDelta:-l.detail)>0?v("zoomIn",{zoomRate:.015,enableTransition:!1}):v("zoomOut",{zoomRate:.015,enableTransition:!1})}),ae(document,"keydown",a),ae(document,$e,r)},q=()=>{E.value=!1},Ie=l=>{E.value=!1,l.target.alt="加载失败"},U=i.shallowRef(),Ae=l=>{if(E.value||l.button!==0)return;l.preventDefault(),l.stopPropagation(),clearTimeout(U.value),M.value=!0;const{offsetX:N,offsetY:d}=p.transform,x=l.pageX,y=l.pageY;o=we(C=>{p.transform={...p.transform,offsetX:N+C.pageX-x,offsetY:d+C.pageY-y}}),ae(document,"mousemove",o),ae(document,"mouseup",()=>{ye(document,"mousemove",o),b.value&&L.value&&(U.value=setTimeout(()=>{M.value=!1}))})},Ne=[{icon:((fe=e.icons)==null?void 0:fe.close)||i.createVNode(k.CloseOutlined,null,null),onClick:l=>{l.stopPropagation(),I(!1)},type:"close"},{icon:((ue=e.icons)==null?void 0:ue.zoomIn)||i.createVNode(k.ZoomInOutlined,null,null),onClick:l=>{l.stopPropagation(),v("zoomIn")},type:"zoomIn"},{icon:((P=e.icons)==null?void 0:P.zoomOut)||i.createVNode(k.ZoomOutOutlined,null,null),onClick:l=>{l.stopPropagation(),v("zoomOut")},type:"zoomOut"},{icon:((ee=e.icons)==null?void 0:ee.rotateRight)||i.createVNode(k.RotateRightOutlined,null,null),onClick:l=>{l.stopPropagation(),v("anticlocelise")},type:"rotateRight"},{icon:((Fe=e.icons)==null?void 0:Fe.rotateLeft)||i.createVNode(k.RotateLeftOutlined,null,null),onClick:l=>{l.stopPropagation(),v("clocelise")},type:"rotateLeft"}];return i.watch(oe,()=>{i.nextTick(()=>{Y.value.complete||(E.value=!0)})}),i.watch(m,l=>{ce(),t("switch",l)}),i.watch(b,l=>{l&&(L.value=l)}),i.watch([()=>b.value,()=>B.value],([l,N])=>{var d,x;l&&N&&(W(),(x=(d=B.value)==null?void 0:d.focus)==null||x.call(d))}),n({setOpen:F}),()=>{const l=O.getTransitionProps(`${s}-fade`),N=O.getTransitionProps(`${s}-zoom`);return c(i.createVNode(i.Teleport,{to:e.getContainer||"body",disabled:!e.teleported},{default:()=>[b.value&&i.createVNode("div",{class:`${s}-root ${u.value}`},[i.createVNode(i.Transition,l,{default:()=>[i.withDirectives(i.createVNode("div",{class:`${s}-mask ${u.value}`},null),[[i.vShow,b.value&&L.value]])]}),i.createVNode("div",{ref:B,tabindex:-1,class:[`${s}-wrapper`,`${u.value}`],onClick:d=>e.onHideOnClickModal&&Me(d)},[i.createVNode(i.Transition,i.mergeProps(N,{onAfterLeave:()=>xe()}),{default:()=>{var d,x;return[i.withDirectives(i.createVNode("div",{class:`${s}-block ${u.value}`},[i.createVNode("div",{class:`${s}-content ${u.value}`},[i.createVNode("div",{class:`${s}-body ${u.value}`},[i.createVNode("div",{class:`${s}-operations-wrapper ${u.value}`,onClick:y=>y.stopPropagation()},[i.createVNode("ul",{class:`${s}-operations ${u.value}`},[Ne.map(({icon:y,onClick:C,type:Ce})=>i.createVNode("li",{class:`${s}-operations-operation ${u.value}`,onClick:C,key:Ce},[i.cloneVNode(y,{class:`${s}-operations-icon ${u.value}`})]))])]),i.createVNode("div",{class:`${s}-canvas ${u.value}`},[e.urlList.map((y,C)=>i.createVNode("img",{ref:Y,class:`${s}-img ${u.value}`,style:{...se.value,display:C===m.value?"block":"none"},key:y,src:y,onLoad:()=>q(),onError:Ce=>Ie(Ce),onMousedown:Ae},null))]),re.value&&i.createVNode("div",{class:[`${s}-switch-left`,m.value===0&&!e.infinite?`${s}-switch-left-disabled`:"",`${u.value}`],onClick:()=>G()},[((d=e.icons)==null?void 0:d.left)||i.createVNode(k.LeftOutlined,null,null)]),re.value&&i.createVNode("div",{class:[`${s}-switch-right`,m.value===e.urlList.length-1&&!e.infinite?`${s}-switch-right-disabled`:"",`${u.value}`],onClick:()=>f()},[((x=e.icons)==null?void 0:x.right)||i.createVNode(k.RightOutlined,null,null)])])])]),[[i.vShow,b.value&&L.value]])]}})])])]}))}}}),Se={width:"100%",height:"100%"},ot=e=>({[e.componentCls]:{display:"inline-block",position:"relative",overflow:"hidden","&-inner":{...Se,verticalAlign:"top",opacity:1},"&-placeholder":{...Se,backgroundColor:e.colorBgContainerDisabled,backgroundImage:"url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTQuNSAyLjVoLTEzQS41LjUgMCAwIDAgMSAzdjEwYS41LjUgMCAwIDAgLjUuNWgxM2EuNS41IDAgMCAwIC41LS41VjNhLjUuNSAwIDAgMC0uNS0uNXpNNS4yODEgNC43NWExIDEgMCAwIDEgMCAyIDEgMSAwIDAgMSAwLTJ6bTguMDMgNi44M2EuMTI3LjEyNyAwIDAgMS0uMDgxLjAzSDIuNzY5YS4xMjUuMTI1IDAgMCAxLS4wOTYtLjIwN2wyLjY2MS0zLjE1NmEuMTI2LjEyNiAwIDAgMSAuMTc3LS4wMTZsLjAxNi4wMTZMNy4wOCAxMC4wOWwyLjQ3LTIuOTNhLjEyNi4xMjYgMCAwIDEgLjE3Ny0uMDE2bC4wMTUuMDE2IDMuNTg4IDQuMjQ0YS4xMjcuMTI3IDAgMCAxLS4wMi4xNzV6IiBmaWxsPSIjOEM4QzhDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=')",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundSize:"30%"},"&-error":{...Se,display:"flex",alignItems:"center",justifyContent:"center",color:e.colorText,backgroundColor:e.colorBgContainerDisabled},"&-preview":{cursor:"pointer"}}}),st=e=>e&&e.nodeType===Node.ELEMENT_NODE;let He="";const V=i.defineComponent({props:Z,name:"GImage",emits:["error","click","load"],slots:Object,setup(e,{slots:t,emit:n,attrs:a}){const r=w.getPrefixCls({suffixCls:"image"}),{wrapSSR:o,hashId:s}=O.useProStyle("Image",[ot],r),c=i.ref(),u=i.ref(""),M=i.ref(!1),b=i.ref(!0),F=i.ref(!1),L=i.ref(null),I=i.ref();let E,m;const B=i.computed(()=>!w.isServer&&e.fit?{"object-fit":e.fit}:{}),Y=i.computed(()=>{const{previewSrcList:f}=e;return Array.isArray(f)&&f.length>0}),K=i.computed(()=>{const{src:f,previewSrcList:A,initialIndex:v}=e;if(v||v===0)return A.length>=v?v:0;let W=0;const q=A.indexOf(f);return q>=0&&(W=q),W}),p=f=>{u.value=e.src,b.value=!1,M.value=!1,n("load",f)},re=f=>{b.value=!1,M.value=!0,n("error",f)},J=()=>{if(w.isServer)return;b.value=!0,M.value=!1;const f=new Image;f.onload=A=>p(A),f.onerror=re,Object.keys(a||{}).forEach(A=>{if(A.toLowerCase()==="onload")return;const v=(a||{})[A];f.setAttribute(A,v)}),f.src=e.src},ie=he.useThrottleFn(se,200),oe=()=>{w.isServer||!I.value||!ie||(E(),I.value=void 0)};function se(){w.isInContainer(L.value,I.value)&&(J(),oe())}const le=async()=>{if(w.isServer)return;await i.nextTick();const{scrollContainer:f}=e;st(f)?I.value=f:w.isString(f)&&f!==""?I.value=document.querySelector(f)??void 0:L.value&&(I.value=w.getScrollContainer(L.value)),I.value&&(E=he.useEventListener(I,"scroll",ie),setTimeout(()=>se(),200))},xe=f=>{if(f.ctrlKey){if(f.deltaY<0)return f.preventDefault(),!1;if(f.deltaY>0)return f.preventDefault(),!1}},Me=()=>{!Y.value||e.disablePreview||(m=he.useEventListener("wheel",xe,{passive:!1}),He=document.body.style.overflow,document.body.style.overflow="hidden",F.value=!0)},ce=()=>{m==null||m(),document.body.style.overflow=He,F.value=!1};i.watch(()=>e.src,()=>{e.lazy?(b.value=!0,M.value=!1,oe(),le()):J()});const G=f=>w.isNumber(f)?f+"px":f;return de.onMountedOrActivated(()=>{e.lazy?le():J()}),()=>{const{crossorigin:f,decoding:A,alt:v,sizes:W,srcset:q,usemap:Ie,class:U,style:Ae={}}=a,Ne={crossorigin:f,decoding:A,alt:v,sizes:W,srcset:q,usemap:Ie,style:{...B.value,height:e.height?G(e.height):void 0}},fe=w.getSlotVNode(t,e,"fallback"),ue=w.getSlotVNode(t,e,"placeholder");return i.watchEffect(()=>{var P,ee;Y.value&&F.value?(P=c.value)==null||P.setOpen(!0):(ee=c.value)==null||ee.setOpen(!1)}),o(i.createVNode("div",{class:{[`${s.value}`]:!0,[`${r}`]:!0,[`${U}`]:!!U},ref:P=>L.value=P,style:{width:e.width?G(e.width):void 0,height:e.height?G(e.height):void 0,display:e.lazy?"block":void 0,...Ae},onClick:()=>{n("click")}},[b.value?ue||i.createVNode("div",{class:`${r}-placeholder ${s.value}`},null):M.value?fe||i.createVNode("div",{class:`${r}-error ${s.value}`},[i.createTextVNode("加载失败")]):u.value&&i.createVNode("img",i.mergeProps(Ne,{class:{[`${s.value}`]:!0,[`${e.imageClassName}`]:!!e.imageClassName,[`${r}-inner`]:!0,[`${r}-preview`]:Y.value},alt:e.alt,src:u.value,onClick:()=>Me()}),null),i.createVNode(De,{ref:c,zIndex:e.zIndex,infinite:e.infinite,initialIndex:K.value,urlList:e.previewSrcList,getContainer:e.getContainer,onHideOnClickModal:e.hideOnClickModal,onClose:()=>ce()},null)]))}}});V.isGImage=!0,V.install=e=>(e.component(V.name,V),e),h.GImage=V,h.ImageViewer=De,h.default=V,h.imagePorps=Z,h.imageViewProps=Te,Object.defineProperties(h,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/dist/index.d.ts CHANGED
@@ -1,6 +1,5 @@
1
- import { gImagePorps, gImageViewProps } from './props';
2
- export { default as ImageViewer } from './components/ImageViewer';
1
+ export * from './props';
3
2
  export type { GImageProps } from './Image';
3
+ export { default as ImageViewer } from './components/ImageViewer';
4
4
  export { default } from './Image';
5
5
  export { default as GImage } from './Image';
6
- export { gImagePorps, gImageViewProps };
package/dist/props.d.ts CHANGED
@@ -9,7 +9,7 @@ type PreviewPropsIons = {
9
9
  left?: VNode;
10
10
  right?: VNode;
11
11
  };
12
- export declare const gImagePorps: {
12
+ export declare const imagePorps: {
13
13
  previewTeleported: {
14
14
  type: PropType<boolean>;
15
15
  default: boolean;
@@ -86,7 +86,7 @@ export declare const gImagePorps: {
86
86
  type: PropType<number>;
87
87
  };
88
88
  };
89
- export declare const gImageViewProps: {
89
+ export declare const imageViewProps: {
90
90
  urlList: {
91
91
  type: PropType<string[]>;
92
92
  default: () => never[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gx-design-vue/image",
3
- "version": "0.2.0-beta.20",
3
+ "version": "0.2.0-beta.21",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "vite build",
@@ -25,8 +25,8 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "@vueuse/core": "^9.10.0",
28
- "@gx-design-vue/pro-utils": "^0.2.0-beta.41",
29
- "@gx-design-vue/pro-hooks": "^0.2.0-beta.30",
28
+ "@gx-design-vue/pro-utils": "^0.2.0-beta.42",
29
+ "@gx-design-vue/pro-hooks": "^0.2.0-beta.31",
30
30
  "@gx-design-vue/pro-provider": "^0.1.0-beta.85"
31
31
  },
32
32
  "devDependencies": {