UNPKG

weiyun-ui

Version:

UI library For Vue

2 lines 34.9 kB
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("vue")):"function"==typeof define&&define.amd?define("wy-image-viewer",["vue"],e):"object"==typeof exports?exports["wy-image-viewer"]=e(require("vue")):t["wy-image-viewer"]=e(t.Vue)}(window,(function(t){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n(n.s=339)}([,function(t,e,n){var r=n(25)("wks"),o=n(18),i=n(2).Symbol,c="function"==typeof i;(t.exports=function(t){return r[t]||(r[t]=c&&i[t]||(c?i:o)("Symbol."+t))}).store=r},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){var r=n(2),o=n(13),i=n(11),c=n(9),s=n(15),a=function(t,e,n){var u,l,f,p,d=t&a.F,h=t&a.G,v=t&a.S,y=t&a.P,m=t&a.B,g=h?r:v?r[e]||(r[e]={}):(r[e]||{}).prototype,b=h?o:o[e]||(o[e]={}),x=b.prototype||(b.prototype={});for(u in h&&(n=e),n)f=((l=!d&&g&&void 0!==g[u])?g:n)[u],p=m&&l?s(f,r):y&&"function"==typeof f?s(Function.call,f):f,g&&c(g,u,f,t&a.U),b[u]!=f&&i(b,u,p),y&&x[u]!=f&&(x[u]=f)};r.core=o,a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,a.U=64,a.R=128,t.exports=a},function(t,e,n){t.exports=!n(8)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,e,n){var r=n(6);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var r=n(5),o=n(41),i=n(24),c=Object.defineProperty;e.f=n(4)?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return c(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var r=n(2),o=n(11),i=n(10),c=n(18)("src"),s=n(68),a=(""+s).split("toString");n(13).inspectSource=function(t){return s.call(t)},(t.exports=function(t,e,n,s){var u="function"==typeof n;u&&(i(n,"name")||o(n,"name",e)),t[e]!==n&&(u&&(i(n,c)||o(n,c,t[e]?""+t[e]:a.join(String(e)))),t===r?t[e]=n:s?t[e]?t[e]=n:o(t,e,n):(delete t[e],o(t,e,n)))})(Function.prototype,"toString",(function(){return"function"==typeof this&&this[c]||s.call(this)}))},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(7),o=n(22);t.exports=n(4)?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(45),o=n(19);t.exports=function(t){return r(o(t))}},function(t,e){var n=t.exports={version:"2.6.12"};"number"==typeof __e&&(__e=n)},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var r=n(29);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){var r=n(26),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e,n){var r=n(19);t.exports=function(t){return Object(r(t))}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(47),o=n(35);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e){t.exports=!1},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){t.exports={}},function(t,e,n){var r=n(6);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){var r=n(13),o=n(2),i=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(21)?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){"use strict";function r(t,e,n,r,o,i,c,s){var a,u="function"==typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),r&&(u.functional=!0),i&&(u._scopeId="data-v-"+i),c?(a=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(c)},u._ssrRegister=a):o&&(a=s?function(){o.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:o),a)if(u.functional){u._injectStyles=a;var l=u.render;u.render=function(t,e){return a.call(e),l(t,e)}}else{var f=u.beforeCreate;u.beforeCreate=f?[].concat(f,a):[a]}return{exports:t,options:u}}n.d(e,"a",(function(){return r}))},function(t,e,n){var r=n(7).f,o=n(10),i=n(1)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var r=n(34),o=n(22),i=n(12),c=n(24),s=n(10),a=n(41),u=Object.getOwnPropertyDescriptor;e.f=n(4)?u:function(t,e){if(t=i(t),e=c(e,!0),a)try{return u(t,e)}catch(t){}if(s(t,e))return o(!r.f.call(t,e),t[e])}},function(t,e,n){var r=n(7).f,o=Function.prototype,i=/^\s*function ([^ (]*)/;"name"in o||n(4)&&r(o,"name",{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(t){return""}}})},function(t,e,n){var r=n(5),o=n(57),i=n(35),c=n(37)("IE_PROTO"),s=function(){},a=function(){var t,e=n(33)("iframe"),r=i.length;for(e.style.display="none",n(42).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),a=t.F;r--;)delete a.prototype[i[r]];return a()};t.exports=Object.create||function(t,e){var n;return null!==t?(s.prototype=r(t),n=new s,s.prototype=null,n[c]=t):n=a(),void 0===e?n:o(n,e)}},function(t,e,n){var r=n(6),o=n(2).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var r=n(47),o=n(35).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},function(t,e,n){var r=n(25)("keys"),o=n(18);t.exports=function(t){return r[t]||(r[t]=o(t))}},function(t,e,n){var r=n(14),o=n(1)("toStringTag"),i="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,c;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),o))?n:i?r(e):"Object"==(c=r(e))&&"function"==typeof e.callee?"Arguments":c}},function(t,e,n){var r=n(15),o=n(45),i=n(17),c=n(16),s=n(74);t.exports=function(t,e){var n=1==t,a=2==t,u=3==t,l=4==t,f=6==t,p=5==t||f,d=e||s;return function(e,s,h){for(var v,y,m=i(e),g=o(m),b=r(s,h,3),x=c(g.length),_=0,S=n?d(e,x):a?d(e,0):void 0;x>_;_++)if((p||_ in g)&&(y=b(v=g[_],_,m),t))if(n)S[_]=y;else if(y)switch(t){case 3:return!0;case 5:return v;case 6:return _;case 2:S.push(v)}else if(l)return!1;return f?-1:u||l?l:S}}},function(t,e,n){"use strict";var r=n(8);t.exports=function(t,e){return!!t&&r((function(){e?t.call(null,(function(){}),1):t.call(null)}))}},function(t,e,n){t.exports=!n(4)&&!n(8)((function(){return 7!=Object.defineProperty(n(33)("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){var r=n(2).document;t.exports=r&&r.documentElement},function(t,e,n){"use strict";var r=n(50),o=n(71),i=n(23),c=n(12);t.exports=n(51)(Array,"Array",(function(t,e){this._t=c(t),this._i=0,this._k=e}),(function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])}),"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var r=n(14);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(e,n){e.exports=t},function(t,e,n){var r=n(10),o=n(12),i=n(52)(!1),c=n(37)("IE_PROTO");t.exports=function(t,e){var n,s=o(t),a=0,u=[];for(n in s)n!=c&&r(s,n)&&u.push(n);for(;e.length>a;)r(s,n=e[a++])&&(~i(u,n)||u.push(n));return u}},function(t,e,n){var r=n(14);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){var r=n(26),o=Math.max,i=Math.min;t.exports=function(t,e){return(t=r(t))<0?o(t+e,0):i(t,e)}},function(t,e,n){var r=n(1)("unscopables"),o=Array.prototype;null==o[r]&&n(11)(o,r,{}),t.exports=function(t){o[r][t]=!0}},function(t,e,n){"use strict";var r=n(21),o=n(3),i=n(9),c=n(11),s=n(23),a=n(77),u=n(28),l=n(54),f=n(1)("iterator"),p=!([].keys&&"next"in[].keys()),d=function(){return this};t.exports=function(t,e,n,h,v,y,m){a(n,e,h);var g,b,x,_=function(t){if(!p&&t in j)return j[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},S=e+" Iterator",w="values"==v,O=!1,j=t.prototype,k=j[f]||j["@@iterator"]||v&&j[v],I=k||_(v),E=v?w?_("entries"):I:void 0,C="Array"==e&&j.entries||k;if(C&&(x=l(C.call(new t)))!==Object.prototype&&x.next&&(u(x,S,!0),r||"function"==typeof x[f]||c(x,f,d)),w&&k&&"values"!==k.name&&(O=!0,I=function(){return k.call(this)}),r&&!m||!p&&!O&&j[f]||c(j,f,I),s[e]=I,s[S]=d,v)if(g={values:w?I:_("values"),keys:y?I:_("keys"),entries:E},m)for(b in g)b in j||i(j,b,g[b]);else o(o.P+o.F*(p||O),e,g);return g}},function(t,e,n){var r=n(12),o=n(16),i=n(49);t.exports=function(t){return function(e,n,c){var s,a=r(e),u=o(a.length),l=i(c,u);if(t&&n!=n){for(;u>l;)if((s=a[l++])!=s)return!0}else for(;u>l;l++)if((t||l in a)&&a[l]===n)return t||l||0;return!t&&-1}}},function(t,e,n){e.f=n(1)},function(t,e,n){var r=n(10),o=n(17),i=n(37)("IE_PROTO"),c=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?c:null}},function(t,e,n){var r=n(3),o=n(13),i=n(8);t.exports=function(t,e){var n=(o.Object||{})[t]||Object[t],c={};c[t]=e(n),r(r.S+r.F*i((function(){n(1)})),"Object",c)}},function(t,e,n){var r=n(2),o=n(13),i=n(21),c=n(53),s=n(7).f;t.exports=function(t){var e=o.Symbol||(o.Symbol=i?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||s(e,t,{value:c.f(t)})}},function(t,e,n){var r=n(7),o=n(5),i=n(20);t.exports=n(4)?Object.defineProperties:function(t,e){o(t);for(var n,c=i(e),s=c.length,a=0;s>a;)r.f(t,n=c[a++],e[n]);return t}},function(t,e,n){var r=n(6),o=n(5),i=function(t,e){if(o(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{(r=n(15)(Function.call,n(30).f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return i(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:i}},function(t,e,n){"use strict";var r=n(38),o={};o[n(1)("toStringTag")]="z",o+""!="[object z]"&&n(9)(Object.prototype,"toString",(function(){return"[object "+r(this)+"]"}),!0)},function(t,e,n){"use strict";var r=n(3),o=n(39)(0),i=n(40)([].forEach,!0);r(r.P+r.F*!i,"Array",{forEach:function(t){return o(this,t,arguments[1])}})},function(t,e,n){var r=n(26),o=n(19);t.exports=function(t){return function(e,n){var i,c,s=String(o(e)),a=r(n),u=s.length;return a<0||a>=u?t?"":void 0:(i=s.charCodeAt(a))<55296||i>56319||a+1===u||(c=s.charCodeAt(a+1))<56320||c>57343?t?s.charAt(a):i:t?s.slice(a,a+2):c-56320+(i-55296<<10)+65536}}},function(t,e,n){"use strict";var r=n(2),o=n(10),i=n(4),c=n(3),s=n(9),a=n(70).KEY,u=n(8),l=n(25),f=n(28),p=n(18),d=n(1),h=n(53),v=n(56),y=n(81),m=n(48),g=n(5),b=n(6),x=n(17),_=n(12),S=n(24),w=n(22),O=n(32),j=n(82),k=n(30),I=n(44),E=n(7),C=n(20),L=k.f,P=E.f,N=j.f,T=r.Symbol,A=r.JSON,F=A&&A.stringify,M=d("_hidden"),D=d("toPrimitive"),z={}.propertyIsEnumerable,$=l("symbol-registry"),R=l("symbols"),X=l("op-symbols"),Y=Object.prototype,H="function"==typeof T&&!!I.f,B=r.QObject,V=!B||!B.prototype||!B.prototype.findChild,G=i&&u((function(){return 7!=O(P({},"a",{get:function(){return P(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=L(Y,e);r&&delete Y[e],P(t,e,n),r&&t!==Y&&P(Y,e,r)}:P,U=function(t){var e=R[t]=O(T.prototype);return e._k=t,e},W=H&&"symbol"==typeof T.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof T},Z=function(t,e,n){return t===Y&&Z(X,e,n),g(t),e=S(e,!0),g(n),o(R,e)?(n.enumerable?(o(t,M)&&t[M][e]&&(t[M][e]=!1),n=O(n,{enumerable:w(0,!1)})):(o(t,M)||P(t,M,w(1,{})),t[M][e]=!0),G(t,e,n)):P(t,e,n)},q=function(t,e){g(t);for(var n,r=y(e=_(e)),o=0,i=r.length;i>o;)Z(t,n=r[o++],e[n]);return t},J=function(t){var e=z.call(this,t=S(t,!0));return!(this===Y&&o(R,t)&&!o(X,t))&&(!(e||!o(this,t)||!o(R,t)||o(this,M)&&this[M][t])||e)},K=function(t,e){if(t=_(t),e=S(e,!0),t!==Y||!o(R,e)||o(X,e)){var n=L(t,e);return!n||!o(R,e)||o(t,M)&&t[M][e]||(n.enumerable=!0),n}},Q=function(t){for(var e,n=N(_(t)),r=[],i=0;n.length>i;)o(R,e=n[i++])||e==M||e==a||r.push(e);return r},tt=function(t){for(var e,n=t===Y,r=N(n?X:_(t)),i=[],c=0;r.length>c;)!o(R,e=r[c++])||n&&!o(Y,e)||i.push(R[e]);return i};H||(s((T=function(){if(this instanceof T)throw TypeError("Symbol is not a constructor!");var t=p(arguments.length>0?arguments[0]:void 0),e=function(n){this===Y&&e.call(X,n),o(this,M)&&o(this[M],t)&&(this[M][t]=!1),G(this,t,w(1,n))};return i&&V&&G(Y,t,{configurable:!0,set:e}),U(t)}).prototype,"toString",(function(){return this._k})),k.f=K,E.f=Z,n(36).f=j.f=Q,n(34).f=J,I.f=tt,i&&!n(21)&&s(Y,"propertyIsEnumerable",J,!0),h.f=function(t){return U(d(t))}),c(c.G+c.W+c.F*!H,{Symbol:T});for(var et="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),nt=0;et.length>nt;)d(et[nt++]);for(var rt=C(d.store),ot=0;rt.length>ot;)v(rt[ot++]);c(c.S+c.F*!H,"Symbol",{for:function(t){return o($,t+="")?$[t]:$[t]=T(t)},keyFor:function(t){if(!W(t))throw TypeError(t+" is not a symbol!");for(var e in $)if($[e]===t)return e},useSetter:function(){V=!0},useSimple:function(){V=!1}}),c(c.S+c.F*!H,"Object",{create:function(t,e){return void 0===e?O(t):q(O(t),e)},defineProperty:Z,defineProperties:q,getOwnPropertyDescriptor:K,getOwnPropertyNames:Q,getOwnPropertySymbols:tt});var it=u((function(){I.f(1)}));c(c.S+c.F*it,"Object",{getOwnPropertySymbols:function(t){return I.f(x(t))}}),A&&c(c.S+c.F*(!H||u((function(){var t=T();return"[null]"!=F([t])||"{}"!=F({a:t})||"{}"!=F(Object(t))}))),"JSON",{stringify:function(t){for(var e,n,r=[t],o=1;arguments.length>o;)r.push(arguments[o++]);if(n=e=r[1],(b(e)||void 0!==t)&&!W(t))return m(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!W(e))return e}),r[1]=e,F.apply(A,r)}}),T.prototype[D]||n(11)(T.prototype,D,T.prototype.valueOf),f(T,"Symbol"),f(Math,"Math",!0),f(r.JSON,"JSON",!0)},function(t,e,n){"use strict";var r=n(61)(!0);n(51)(String,"String",(function(t){this._t=String(t),this._i=0}),(function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})}))},function(t,e,n){for(var r=n(43),o=n(20),i=n(9),c=n(2),s=n(11),a=n(23),u=n(1),l=u("iterator"),f=u("toStringTag"),p=a.Array,d={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},h=o(d),v=0;v<h.length;v++){var y,m=h[v],g=d[m],b=c[m],x=b&&b.prototype;if(x&&(x[l]||s(x,l,p),x[f]||s(x,f,m),a[m]=p,g))for(y in r)x[y]||i(x,y,r[y],!0)}},,,function(t,e,n){var r=n(3);r(r.S+r.F*!n(4),"Object",{defineProperty:n(7).f})},function(t,e,n){t.exports=n(25)("native-function-to-string",Function.toString)},,function(t,e,n){var r=n(18)("meta"),o=n(6),i=n(10),c=n(7).f,s=0,a=Object.isExtensible||function(){return!0},u=!n(8)((function(){return a(Object.preventExtensions({}))})),l=function(t){c(t,r,{value:{i:"O"+ ++s,w:{}}})},f=t.exports={KEY:r,NEED:!1,fastKey:function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,r)){if(!a(t))return"F";if(!e)return"E";l(t)}return t[r].i},getWeak:function(t,e){if(!i(t,r)){if(!a(t))return!0;if(!e)return!1;l(t)}return t[r].w},onFreeze:function(t){return u&&f.NEED&&a(t)&&!i(t,r)&&l(t),t}}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},,function(t,e,n){"use strict";var r=n(2),o=n(10),i=n(14),c=n(101),s=n(24),a=n(8),u=n(36).f,l=n(30).f,f=n(7).f,p=n(102).trim,d=r.Number,h=d,v=d.prototype,y="Number"==i(n(32)(v)),m="trim"in String.prototype,g=function(t){var e=s(t,!1);if("string"==typeof e&&e.length>2){var n,r,o,i=(e=m?e.trim():p(e,3)).charCodeAt(0);if(43===i||45===i){if(88===(n=e.charCodeAt(2))||120===n)return NaN}else if(48===i){switch(e.charCodeAt(1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+e}for(var c,a=e.slice(2),u=0,l=a.length;u<l;u++)if((c=a.charCodeAt(u))<48||c>o)return NaN;return parseInt(a,r)}}return+e};if(!d(" 0o1")||!d("0b1")||d("+0x1")){d=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof d&&(y?a((function(){v.valueOf.call(n)})):"Number"!=i(n))?c(new h(g(e)),n,d):g(e)};for(var b,x=n(4)?u(h):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),_=0;x.length>_;_++)o(h,b=x[_])&&!o(d,b)&&f(d,b,l(h,b));d.prototype=v,v.constructor=d,n(9)(r,"Number",d)}},function(t,e,n){var r=n(75);t.exports=function(t,e){return new(r(t))(e)}},function(t,e,n){var r=n(6),o=n(48),i=n(1)("species");t.exports=function(t){var e;return o(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!o(e.prototype)||(e=void 0),r(e)&&null===(e=e[i])&&(e=void 0)),void 0===e?Array:e}},,function(t,e,n){"use strict";var r=n(32),o=n(22),i=n(28),c={};n(11)(c,n(1)("iterator"),(function(){return this})),t.exports=function(t,e,n){t.prototype=r(c,{next:o(1,n)}),i(t,e+" Iterator")}},function(t,e,n){"use strict";var r=n(3),o=n(39)(2);r(r.P+r.F*!n(40)([].filter,!0),"Array",{filter:function(t){return o(this,t,arguments[1])}})},,,function(t,e,n){var r=n(20),o=n(44),i=n(34);t.exports=function(t){var e=r(t),n=o.f;if(n)for(var c,s=n(t),a=i.f,u=0;s.length>u;)a.call(t,c=s[u++])&&e.push(c);return e}},function(t,e,n){var r=n(12),o=n(36).f,i={}.toString,c="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return c&&"[object Window]"==i.call(t)?function(t){try{return o(t)}catch(t){return c.slice()}}(t):o(r(t))}},,,,,,,,,,,,,function(t,e,n){var r=n(17),o=n(20);n(55)("keys",(function(){return function(t){return o(r(t))}}))},,,,,,function(t,e,n){var r=n(6),o=n(58).set;t.exports=function(t,e,n){var i,c=e.constructor;return c!==n&&"function"==typeof c&&(i=c.prototype)!==n.prototype&&r(i)&&o&&o(t,i),t}},function(t,e,n){var r=n(3),o=n(19),i=n(8),c=n(105),s="["+c+"]",a=RegExp("^"+s+s+"*"),u=RegExp(s+s+"*$"),l=function(t,e,n){var o={},s=i((function(){return!!c[t]()||"​…"!="​…"[t]()})),a=o[t]=s?e(f):c[t];n&&(o[n]=a),r(r.P+r.F*s,"String",o)},f=l.trim=function(t,e){return t=String(o(t)),1&e&&(t=t.replace(a,"")),2&e&&(t=t.replace(u,"")),t};t.exports=l},,,function(t,e){t.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"},,function(t,e,n){var r=n(3);r(r.S+r.F*!n(4),"Object",{defineProperties:n(57)})},,,function(t,e,n){var r=n(12),o=n(30).f;n(55)("getOwnPropertyDescriptor",(function(){return function(t,e){return o(r(t),e)}}))},function(t,e,n){var r=n(3),o=n(122),i=n(12),c=n(30),s=n(113);r(r.S,"Object",{getOwnPropertyDescriptors:function(t){for(var e,n,r=i(t),a=c.f,u=o(r),l={},f=0;u.length>f;)void 0!==(n=a(r,e=u[f++]))&&s(l,e,n);return l}})},,function(t,e,n){"use strict";var r=n(7),o=n(22);t.exports=function(t,e,n){e in t?r.f(t,e,o(0,n)):t[e]=n}},,,,,function(t,e,n){"use strict";var r=n(3),o=n(52)(!1),i=[].indexOf,c=!!i&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(c||!n(40)(i)),"Array",{indexOf:function(t){return c?i.apply(this,arguments)||0:o(this,t,arguments[1])}})},,,,function(t,e,n){var r=n(36),o=n(44),i=n(5),c=n(2).Reflect;t.exports=c&&c.ownKeys||function(t){var e=r.f(i(t)),n=o.f;return n?e.concat(n(t)):e}},,,,,,,,,,,,,function(t,e,n){var r=n(3),o=n(140)(!1);r(r.S,"Object",{values:function(t){return o(t)}})},,,,,function(t,e,n){var r=n(4),o=n(20),i=n(12),c=n(34).f;t.exports=function(t){return function(e){for(var n,s=i(e),a=o(s),u=a.length,l=0,f=[];u>l;)n=a[l++],r&&!c.call(s,n)||f.push(t?[n,s[n]]:s[n]);return f}}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";n.r(e);n(31);var r=function(){var t=this,e=t._self._c;return e("transition",{attrs:{name:"viewer-fade"}},[e("div",{ref:"el-image-viewer__wrapper",staticClass:"el-image-viewer__wrapper",style:{"z-index":t.viewerZIndex},attrs:{tabindex:"-1"}},[e("div",{staticClass:"el-image-viewer__mask",on:{click:function(e){return e.target!==e.currentTarget?null:t.handleMaskClick.apply(null,arguments)}}}),e("span",{staticClass:"el-image-viewer__btn el-image-viewer__close",on:{click:t.hide}},[e("i",{staticClass:"el-icon-close"})]),t.isSingle?t._e():[e("span",{staticClass:"el-image-viewer__btn el-image-viewer__prev",class:{"is-disabled":!t.infinite&&t.isFirst},on:{click:t.prev}},[e("i",{staticClass:"el-icon-arrow-left"})]),e("span",{staticClass:"el-image-viewer__btn el-image-viewer__next",class:{"is-disabled":!t.infinite&&t.isLast},on:{click:t.next}},[e("i",{staticClass:"el-icon-arrow-right"})])],e("div",{staticClass:"el-image-viewer__btn el-image-viewer__actions"},[e("div",{staticClass:"el-image-viewer__actions__inner"},[e("i",{staticClass:"el-icon-zoom-out",on:{click:function(e){return t.handleActions("zoomOut")}}}),e("i",{staticClass:"el-icon-zoom-in",on:{click:function(e){return t.handleActions("zoomIn")}}}),e("i",{staticClass:"el-image-viewer__actions__divider"}),e("i",{class:t.mode.icon,on:{click:t.toggleMode}}),e("i",{staticClass:"el-image-viewer__actions__divider"}),e("i",{staticClass:"el-icon-refresh-left",on:{click:function(e){return t.handleActions("anticlocelise")}}}),e("i",{staticClass:"el-icon-refresh-right",on:{click:function(e){return t.handleActions("clocelise")}}})])]),e("div",{staticClass:"el-image-viewer__canvas"},t._l(t.urlList,(function(n,r){return r===t.index?e("img",{key:r,ref:"img",refInFor:!0,staticClass:"el-image-viewer__img",style:t.imgStyle,attrs:{src:t.currentImg,referrerpolicy:"no-referrer"},on:{load:t.handleImgLoad,error:t.handleImgError,mousedown:t.handleMouseDown}}):t._e()})),0)],2)])};r._withStripped=!0;n(73),n(95),n(135),n(118),n(62),n(63),n(59),n(43),n(64),n(67),n(78),n(110),n(60),n(111),n(107);var o=n(46),i=n.n(o);const c=i.a.prototype.$isServer,s=/([\:\-\_]+(.))/g,a=/^moz([A-Z])/,u=c?0:Number(document.documentMode),l=function(t){return t.replace(s,(function(t,e,n,r){return r?n.toUpperCase():n})).replace(a,"Moz$1")},f=!c&&document.addEventListener?function(t,e,n){t&&e&&n&&t.addEventListener(e,n,!1)}:function(t,e,n){t&&e&&n&&t.attachEvent("on"+e,n)},p=!c&&document.removeEventListener?function(t,e,n){t&&e&&t.removeEventListener(e,n,!1)}:function(t,e,n){t&&e&&t.detachEvent("on"+e,n)};function d(t,e){if(!t||!e)return!1;if(-1!==e.indexOf(" "))throw new Error("className should not contain space.");return t.classList?t.classList.contains(e):(" "+t.className+" ").indexOf(" "+e+" ")>-1}function h(t,e){if(t){for(var n=t.className,r=(e||"").split(" "),o=0,i=r.length;o<i;o++){var c=r[o];c&&(t.classList?t.classList.add(c):d(t,c)||(n+=" "+c))}t.classList||t.setAttribute("class",n)}}function v(t,e){if(t&&e){for(var n=e.split(" "),r=" "+t.className+" ",o=0,i=n.length;o<i;o++){var c=n[o];c&&(t.classList?t.classList.remove(c):d(t,c)&&(r=r.replace(" "+c+" "," ")))}t.classList||t.setAttribute("class",(r||"").replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g,""))}}const y=u<9?function(t,e){if(!c){if(!t||!e)return null;"float"===(e=l(e))&&(e="styleFloat");try{switch(e){case"opacity":try{return t.filters.item("alpha").opacity/100}catch(t){return 1}default:return t.style[e]||t.currentStyle?t.currentStyle[e]:null}}catch(n){return t.style[e]}}}:function(t,e){if(!c){if(!t||!e)return null;"float"===(e=l(e))&&(e="cssFloat");try{var n=document.defaultView.getComputedStyle(t,"");return t.style[e]||n?n[e]:null}catch(n){return t.style[e]}}};let m=t=>t&&"[object Function]"==={}.toString.call(t);"object"==typeof Int8Array||!i.a.prototype.$isServer&&document.childNodes;Object.prototype.hasOwnProperty;function g(t){let e=!1;return function(...n){e||(e=!0,window.requestAnimationFrame(r=>{t.apply(this,n),e=!1}))}}let b,x=!1,_=!1;const S=function(){if(i.a.prototype.$isServer)return;let t=O.modalDom;return t?x=!0:(x=!1,t=document.createElement("div"),O.modalDom=t,t.addEventListener("touchmove",(function(t){t.preventDefault(),t.stopPropagation()})),t.addEventListener("click",(function(){O.doOnModalClick&&O.doOnModalClick()}))),t},w={},O={modalFade:!0,getInstance:function(t){return w[t]},register:function(t,e){t&&e&&(w[t]=e)},deregister:function(t){t&&(w[t]=null,delete w[t])},nextZIndex:function(){return O.zIndex++},modalStack:[],doOnModalClick:function(){const t=O.modalStack[O.modalStack.length-1];if(!t)return;const e=O.getInstance(t.id);e&&e.closeOnClickModal&&e.close()},openModal:function(t,e,n,r,o){if(i.a.prototype.$isServer)return;if(!t||void 0===e)return;this.modalFade=o;const c=this.modalStack;for(let e=0,n=c.length;e<n;e++){if(c[e].id===t)return}const s=S();if(h(s,"v-modal"),this.modalFade&&!x&&h(s,"v-modal-enter"),r){r.trim().split(/\s+/).forEach(t=>h(s,t))}setTimeout(()=>{v(s,"v-modal-enter")},200),n&&n.parentNode&&11!==n.parentNode.nodeType?n.parentNode.appendChild(s):document.body.appendChild(s),e&&(s.style.zIndex=e),s.tabIndex=0,s.style.display="",this.modalStack.push({id:t,zIndex:e,modalClass:r})},closeModal:function(t){const e=this.modalStack,n=S();if(e.length>0){const r=e[e.length-1];if(r.id===t){if(r.modalClass){r.modalClass.trim().split(/\s+/).forEach(t=>v(n,t))}e.pop(),e.length>0&&(n.style.zIndex=e[e.length-1].zIndex)}else for(let n=e.length-1;n>=0;n--)if(e[n].id===t){e.splice(n,1);break}}0===e.length&&(this.modalFade&&h(n,"v-modal-leave"),setTimeout(()=>{0===e.length&&(n.parentNode&&n.parentNode.removeChild(n),n.style.display="none",O.modalDom=void 0),v(n,"v-modal-leave")},200))}};Object.defineProperty(O,"zIndex",{configurable:!0,get:()=>(_||(b=b||(i.a.prototype.$ELEMENT||{}).zIndex||2e3,_=!0),b),set(t){b=t}});i.a.prototype.$isServer||window.addEventListener("keydown",(function(t){if(27===t.keyCode){const t=function(){if(!i.a.prototype.$isServer&&O.modalStack.length>0){const t=O.modalStack[O.modalStack.length-1];if(!t)return;return O.getInstance(t.id)}}();t&&t.closeOnPressEscape&&(t.handleClose?t.handleClose():t.handleAction?t.handleAction("cancel"):t.close())}}));var j=O;let k;let I,E=1;Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;function C(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function L(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?C(Object(n),!0).forEach((function(e){P(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function P(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=N(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=N(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==N(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function N(t){return(N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var T={CONTAIN:{name:"contain",icon:"el-icon-full-screen"},ORIGINAL:{name:"original",icon:"el-icon-c-scale-to-original"}},A=!i.a.prototype.$isServer&&window.navigator.userAgent.match(/firefox/i)?"DOMMouseScroll":"mousewheel",F={name:"wy-image-viewer",props:{urlList:{type:Array,default:function(){return[]}},zIndex:{type:Number,default:2e4},onSwitch:{type:Function,default:function(){}},onClose:{type:Function,default:function(){}},initialIndex:{type:Number,default:0},appendToBody:{type:Boolean,default:!0},maskClosable:{type:Boolean,default:!0}},data:function(){return{index:this.initialIndex,isShow:!1,infinite:!0,loading:!1,mode:T.CONTAIN,transform:{scale:1,scaleX:1,scaleY:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}}},computed:{isSingle:function(){return this.urlList.length<=1},isFirst:function(){return 0===this.index},isLast:function(){return this.index===this.urlList.length-1},currentImg:function(){return this.reset(),console.log("currentImg","object"===N(this.urlList[this.index]),this.urlList[this.index].url,this.urlList[this.index]),"object"===N(this.urlList[this.index])?this.urlList[this.index].url:this.urlList[this.index]},imgStyle:function(){var t=this.transform,e=t.scale,n=t.scaleX,r=t.scaleY,o=t.deg,i=t.offsetX,c=t.offsetY,s=t.enableTransition,a={transform:" scaleX(".concat(n,") scaleY(").concat(r,") scale(").concat(e,") rotate(").concat(o,"deg)"),transition:s?"transform .3s":"","margin-left":"".concat(i,"px"),"margin-top":"".concat(c,"px")};return this.mode===T.CONTAIN&&(a.maxWidth=a.maxHeight="100%"),a},viewerZIndex:function(){var t=j.nextZIndex();return this.zIndex>t?this.zIndex:t},imageIndex:function(){var t=0,e=this.initialIndex;return e>=0?t=e:t}},watch:{index:{handler:function(t){console.log("handler index"),this.reset(),this.onSwitch(t)}},currentImg:function(t){var e=this;console.log("watch currentImg val",t),this.$nextTick((function(t){e.$refs.img[0].complete||(e.loading=!0)}))}},methods:{hide:function(){this.deviceSupportUninstall(),this.onClose()},deviceSupportInstall:function(){var t=this;this._keyDownHandler=function(e){switch(e.stopPropagation(),e.keyCode){case 27:t.hide();break;case 32:t.toggleMode();break;case 37:t.prev();break;case 38:t.handleActions("zoomIn");break;case 39:t.next();break;case 40:t.handleActions("zoomOut")}},this._mouseWheelHandler=g((function(e){(e.wheelDelta?e.wheelDelta:-e.detail)>0?t.handleActions("zoomIn",{zoomRate:.015,enableTransition:!1}):t.handleActions("zoomOut",{zoomRate:.015,enableTransition:!1})})),f(document,"keydown",this._keyDownHandler),f(document,A,this._mouseWheelHandler)},deviceSupportUninstall:function(){p(document,"keydown",this._keyDownHandler),p(document,A,this._mouseWheelHandler),this._keyDownHandler=null,this._mouseWheelHandler=null},handleImgLoad:function(t){this.loading=!1},handleImgError:function(t){this.loading=!1,t.target.alt="加载失败"},handleMouseDown:function(t){var e=this;if(console.log("handleMouseDown",t),!this.loading&&0===t.button){var n=this.transform,r=n.offsetX,o=n.offsetY,i=t.pageX,c=t.pageY;this._dragHandler=g((function(t){e.transform.offsetX=r+t.pageX-i,e.transform.offsetY=o+t.pageY-c})),f(document,"mousemove",this._dragHandler),f(document,"mouseup",(function(t){p(document,"mousemove",e._dragHandler)})),t.preventDefault()}},handleMaskClick:function(){this.maskClosable&&this.hide()},reset:function(){"object"===N(this.urlList[this.index])?this.transform={scale:1,scaleX:this.urlList[this.index].h||1,scaleY:this.urlList[this.index].v||1,deg:this.urlList[this.index].deg?90*this.urlList[this.index].deg:0,offsetX:0,offsetY:0,enableTransition:!1}:this.transform={scale:1,scaleX:1,scaleY:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}},toggleMode:function(){if(console.log("toggleMode"),!this.loading){var t=Object.keys(T),e=(Object.values(T).indexOf(this.mode)+1)%t.length;this.mode=T[t[e]],this.reset()}},prev:function(){if(!this.isFirst||this.infinite){var t=this.urlList.length;this.index=(this.index-1+t)%t}},next:function(){if(!this.isLast||this.infinite){var t=this.urlList.length;this.index=(this.index+1)%t}},handleActions:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(console.log("handleActions",t),!this.loading){var n=L({zoomRate:.2,rotateDeg:90,enableTransition:!0},e),r=n.zoomRate,o=n.rotateDeg,i=n.enableTransition,c=this.transform;switch(t){case"zoomOut":c.scale>.2&&(c.scale=parseFloat((c.scale-r).toFixed(3)));break;case"zoomIn":c.scale=parseFloat((c.scale+r).toFixed(3));break;case"clocelise":c.deg+=o;break;case"anticlocelise":c.deg-=o}c.enableTransition=i}}},mounted:function(){this.deviceSupportInstall(),this.appendToBody&&document.body.appendChild(this.$el),this.$refs["el-image-viewer__wrapper"].focus()},destroyed:function(){this.appendToBody&&this.$el&&this.$el.parentNode&&this.$el.parentNode.removeChild(this.$el)}},M=n(27),D=Object(M.a)(F,r,[],!1,null,null,null).exports;D.install=function(t){t.component(D.name,D)};e.default=D}]).default})); //# sourceMappingURL=index.js.map