diff --git a/src/Masa.Blazor.JS/src/proxies/baseProxy.ts b/src/Masa.Blazor.JS/src/proxies/baseProxy.ts deleted file mode 100644 index f74542c0ef..0000000000 --- a/src/Masa.Blazor.JS/src/proxies/baseProxy.ts +++ /dev/null @@ -1,13 +0,0 @@ -export class BaseProxy { - protected target: T; - - constructor(target: T) { - this.target = target; - } - - invokeVoid(prop: string, ...args: any[]) { - if (this.target[prop] && typeof this.target[prop] === "function") { - this.target[prop](...args); - } - } -} diff --git a/src/Masa.Blazor.JS/src/proxies/swiper/index.ts b/src/Masa.Blazor.JS/src/proxies/swiper/index.ts index b66a64a782..5620efe748 100644 --- a/src/Masa.Blazor.JS/src/proxies/swiper/index.ts +++ b/src/Masa.Blazor.JS/src/proxies/swiper/index.ts @@ -1,12 +1,11 @@ import SwiperClass from "swiper"; import { SwiperOptions } from "swiper/types/swiper-options"; -import { BaseProxy } from "../baseProxy"; - declare const Swiper: SwiperClass; -class SwiperProxy extends BaseProxy { +class SwiperProxy { handle: DotNet.DotNetObject; + swiper: SwiperClass; constructor( el: HTMLElement, @@ -35,34 +34,39 @@ class SwiperProxy extends BaseProxy { } const swiper = new (Swiper as any)(el, swiperOptions); - super(swiper); - + this.swiper = swiper; this.handle = handle; - this.target.on("realIndexChange", (e) => this.onRealIndexChange(e, this)); + this.swiper.on("realIndexChange", (e) => this.onRealIndexChange(e, this)); el._swiper = { - instance: this.target, + instance: this.swiper, handle: handle, }; } slideTo(index: number, speed?: number, runCallbacks?: boolean) { - this.target.slideToLoop(index, speed, runCallbacks); + this.swiper.slideToLoop(index, speed, runCallbacks); } slideNext(speed?: number) { - this.target.slideNext(speed); + this.swiper.slideNext(speed); } slidePrev(speed?: number) { - this.target.slidePrev(speed); + this.swiper.slidePrev(speed); } dispose() { - this.target && this.target.destroy(true); + this.swiper && this.swiper.destroy(true); this.handle.dispose(); } + invokeVoid(prop: string, ...args: any[]) { + if (this.swiper[prop] && typeof this.swiper[prop] === "function") { + this.swiper[prop](...args); + } + } + async onRealIndexChange(e: SwiperClass, that: SwiperProxy) { if (that.handle) { await that.handle.invokeMethodAsync("OnIndexChanged", e.realIndex); diff --git a/src/Masa.Blazor/wwwroot/js/proxies/swiper-proxy.js b/src/Masa.Blazor/wwwroot/js/proxies/swiper-proxy.js index 07124050a5..b19fa802f7 100644 --- a/src/Masa.Blazor/wwwroot/js/proxies/swiper-proxy.js +++ b/src/Masa.Blazor/wwwroot/js/proxies/swiper-proxy.js @@ -1,2 +1,2 @@ -function e(e,t,n,i){return new(n||(n=Promise))((function(s,r){function a(e){try{d(i.next(e))}catch(e){r(e)}}function o(e){try{d(i.throw(e))}catch(e){r(e)}}function d(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}d((i=i.apply(e,t||[])).next())}))}class t{constructor(e){this.target=e}invokeVoid(e,...t){this.target[e]&&"function"==typeof this.target[e]&&this.target[e](...t)}}class n extends t{constructor(e,t,n){if(!n)throw new Error("the handle from .NET cannot be null");if(!e)return void n.dispose();e._swiper&&(e._swiper.instance.destroy(!0),delete e._swiper),null!=t||(t={}),t.pagination&&(t.pagination.type=t.pagination.type.toLowerCase());super(new Swiper(e,t)),this.handle=n,this.target.on("realIndexChange",(e=>this.onRealIndexChange(e,this))),e._swiper={instance:this.target,handle:n}}slideTo(e,t,n){this.target.slideToLoop(e,t,n)}slideNext(e){this.target.slideNext(e)}slidePrev(e){this.target.slidePrev(e)}dispose(){this.target&&this.target.destroy(!0),this.handle.dispose()}updateSlides(){this.target.updateSlides()}onRealIndexChange(t,n){return e(this,void 0,void 0,(function*(){n.handle&&(yield n.handle.invokeMethodAsync("OnIndexChanged",t.realIndex))}))}}function i(e,t,i){return new n(e,t,i)}export{i as init}; +function e(e,n,i,t){return new(i||(i=Promise))((function(s,o){function r(e){try{a(t.next(e))}catch(e){o(e)}}function h(e){try{a(t.throw(e))}catch(e){o(e)}}function a(e){var n;e.done?s(e.value):(n=e.value,n instanceof i?n:new i((function(e){e(n)}))).then(r,h)}a((t=t.apply(e,n||[])).next())}))}class n{constructor(e,n,i){if(!i)throw new Error("the handle from .NET cannot be null");if(!e)return void i.dispose();e._swiper&&(e._swiper.instance.destroy(!0),delete e._swiper),null!=n||(n={}),n.pagination&&(n.pagination.type=n.pagination.type.toLowerCase());const t=new Swiper(e,n);this.swiper=t,this.handle=i,this.swiper.on("realIndexChange",(e=>this.onRealIndexChange(e,this))),e._swiper={instance:this.swiper,handle:i}}slideTo(e,n,i){this.swiper.slideToLoop(e,n,i)}slideNext(e){this.swiper.slideNext(e)}slidePrev(e){this.swiper.slidePrev(e)}dispose(){this.swiper&&this.swiper.destroy(!0),this.handle.dispose()}invokeVoid(e,...n){this.swiper[e]&&"function"==typeof this.swiper[e]&&this.swiper[e](...n)}onRealIndexChange(n,i){return e(this,void 0,void 0,(function*(){i.handle&&(yield i.handle.invokeMethodAsync("OnIndexChanged",n.realIndex))}))}}function i(e,i,t){return new n(e,i,t)}export{i as init}; //# sourceMappingURL=swiper-proxy.js.map diff --git a/src/Masa.Blazor/wwwroot/js/proxies/swiper-proxy.js.map b/src/Masa.Blazor/wwwroot/js/proxies/swiper-proxy.js.map index 629e509373..d48dcb48f7 100644 --- a/src/Masa.Blazor/wwwroot/js/proxies/swiper-proxy.js.map +++ b/src/Masa.Blazor/wwwroot/js/proxies/swiper-proxy.js.map @@ -1 +1 @@ -{"version":3,"file":"swiper-proxy.js","sources":["../../../../Masa.Blazor.JS/node_modules/tslib/tslib.es6.js","../../../../Masa.Blazor.JS/src/proxies/baseProxy.ts","../../../../Masa.Blazor.JS/src/proxies/swiper/index.ts"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.push(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.push(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n","export class BaseProxy {\n protected target: T;\n\n constructor(target: T) {\n this.target = target;\n }\n\n invokeVoid(prop: string, ...args: any[]) {\n if (this.target[prop] && typeof this.target[prop] === \"function\") {\n this.target[prop](...args);\n }\n }\n}\n","import SwiperClass from \"swiper\";\r\nimport { SwiperOptions } from \"swiper/types/swiper-options\";\r\n\r\nimport { BaseProxy } from \"../baseProxy\";\r\n\r\ndeclare const Swiper: SwiperClass;\r\n\r\nclass SwiperProxy extends BaseProxy {\r\n handle: DotNet.DotNetObject;\r\n\r\n constructor(\r\n el: HTMLElement,\r\n swiperOptions: SwiperOptions,\r\n handle: DotNet.DotNetObject\r\n ) {\r\n if (!handle) {\r\n throw new Error(\"the handle from .NET cannot be null\");\r\n }\r\n\r\n if (!el) {\r\n handle.dispose();\r\n return;\r\n }\r\n\r\n if (el._swiper) {\r\n el._swiper.instance.destroy(true);\r\n delete el._swiper;\r\n }\r\n\r\n swiperOptions ??= {};\r\n\r\n if (swiperOptions.pagination) {\r\n swiperOptions.pagination[\"type\"] =\r\n swiperOptions.pagination[\"type\"].toLowerCase();\r\n }\r\n\r\n const swiper = new (Swiper as any)(el, swiperOptions);\r\n super(swiper);\r\n\r\n this.handle = handle;\r\n this.target.on(\"realIndexChange\", (e) => this.onRealIndexChange(e, this));\r\n\r\n el._swiper = {\r\n instance: this.target,\r\n handle: handle,\r\n };\r\n }\r\n\r\n slideTo(index: number, speed?: number, runCallbacks?: boolean) {\r\n this.target.slideToLoop(index, speed, runCallbacks);\r\n }\r\n\r\n slideNext(speed?: number) {\r\n this.target.slideNext(speed);\r\n }\r\n\r\n slidePrev(speed?: number) {\r\n this.target.slidePrev(speed);\r\n }\r\n\r\n dispose() {\r\n this.target && this.target.destroy(true);\r\n this.handle.dispose();\r\n }\r\n\r\n updateSlides() {\r\n this.target.updateSlides();\r\n }\r\n\r\n async onRealIndexChange(e: SwiperClass, that: SwiperProxy) {\r\n if (that.handle) {\r\n await that.handle.invokeMethodAsync(\"OnIndexChanged\", e.realIndex);\r\n }\r\n }\r\n}\r\n\r\nfunction init(\r\n el: HTMLElement,\r\n swiperOptions: SwiperOptions,\r\n dotnetHelper: DotNet.DotNetObject\r\n) {\r\n return new SwiperProxy(el, swiperOptions, dotnetHelper);\r\n}\r\n\r\nexport { init };\r\n"],"names":["__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","value","step","next","e","rejected","result","done","then","apply","BaseProxy","constructor","target","this","invokeVoid","prop","args","SwiperProxy","el","swiperOptions","handle","Error","dispose","_swiper","instance","destroy","pagination","toLowerCase","super","Swiper","on","onRealIndexChange","slideTo","index","speed","runCallbacks","slideToLoop","slideNext","slidePrev","updateSlides","that","invokeMethodAsync","realIndex","init","dotnetHelper"],"mappings":"AAkHO,SAASA,EAAUC,EAASC,EAAYC,EAAGC,GAE9C,OAAO,IAAKD,IAAMA,EAAIE,WAAU,SAAUC,EAASC,GAC/C,SAASC,EAAUC,GAAS,IAAMC,EAAKN,EAAUO,KAAKF,GAAQ,CAAG,MAAOG,GAAKL,EAAOK,GAAO,CAC3F,SAASC,EAASJ,GAAS,IAAMC,EAAKN,EAAiB,MAAEK,GAAU,CAAC,MAAOG,GAAKL,EAAOK,GAAO,CAC9F,SAASF,EAAKI,GAJlB,IAAeL,EAIaK,EAAOC,KAAOT,EAAQQ,EAAOL,QAJ1CA,EAIyDK,EAAOL,MAJhDA,aAAiBN,EAAIM,EAAQ,IAAIN,GAAE,SAAUG,GAAWA,EAAQG,EAAO,KAIhBO,KAAKR,EAAWK,EAAY,CAC9GH,GAAMN,EAAYA,EAAUa,MAAMhB,EAASC,GAAc,KAAKS,OACtE,GACA,OC1HaO,EAGXC,YAAYC,GACVC,KAAKD,OAASA,CACf,CAEDE,WAAWC,KAAiBC,GACtBH,KAAKD,OAAOG,IAAsC,mBAAtBF,KAAKD,OAAOG,IAC1CF,KAAKD,OAAOG,MAASC,EAExB,ECJH,MAAMC,UAAoBP,EAGxBC,YACEO,EACAC,EACAC,GAEA,IAAKA,EACH,MAAM,IAAIC,MAAM,uCAGlB,IAAKH,EAEH,YADAE,EAAOE,UAILJ,EAAGK,UACLL,EAAGK,QAAQC,SAASC,SAAQ,UACrBP,EAAGK,SAGZJ,UAAAA,EAAkB,CAAA,GAEdA,EAAcO,aAChBP,EAAcO,WAAiB,KAC7BP,EAAcO,WAAiB,KAAEC,eAIrCC,MADe,IAAKC,OAAeX,EAAIC,IAGvCN,KAAKO,OAASA,EACdP,KAAKD,OAAOkB,GAAG,mBAAoB1B,GAAMS,KAAKkB,kBAAkB3B,EAAGS,QAEnEK,EAAGK,QAAU,CACXC,SAAUX,KAAKD,OACfQ,OAAQA,EAEX,CAEDY,QAAQC,EAAeC,EAAgBC,GACrCtB,KAAKD,OAAOwB,YAAYH,EAAOC,EAAOC,EACvC,CAEDE,UAAUH,GACRrB,KAAKD,OAAOyB,UAAUH,EACvB,CAEDI,UAAUJ,GACRrB,KAAKD,OAAO0B,UAAUJ,EACvB,CAEDZ,UACET,KAAKD,QAAUC,KAAKD,OAAOa,SAAQ,GACnCZ,KAAKO,OAAOE,SACb,CAEDiB,eACE1B,KAAKD,OAAO2B,cACb,CAEKR,kBAAkB3B,EAAgBoC,4CAClCA,EAAKpB,eACDoB,EAAKpB,OAAOqB,kBAAkB,iBAAkBrC,EAAEsC,cAE3D,EAGH,SAASC,EACPzB,EACAC,EACAyB,GAEA,OAAO,IAAI3B,EAAYC,EAAIC,EAAeyB,EAC5C"} \ No newline at end of file +{"version":3,"file":"swiper-proxy.js","sources":["../../../../Masa.Blazor.JS/node_modules/tslib/tslib.es6.js","../../../../Masa.Blazor.JS/src/proxies/swiper/index.ts"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.push(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.push(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n","import SwiperClass from \"swiper\";\r\nimport { SwiperOptions } from \"swiper/types/swiper-options\";\r\n\r\ndeclare const Swiper: SwiperClass;\r\n\r\nclass SwiperProxy {\r\n handle: DotNet.DotNetObject;\r\n swiper: SwiperClass;\r\n\r\n constructor(\r\n el: HTMLElement,\r\n swiperOptions: SwiperOptions,\r\n handle: DotNet.DotNetObject\r\n ) {\r\n if (!handle) {\r\n throw new Error(\"the handle from .NET cannot be null\");\r\n }\r\n\r\n if (!el) {\r\n handle.dispose();\r\n return;\r\n }\r\n\r\n if (el._swiper) {\r\n el._swiper.instance.destroy(true);\r\n delete el._swiper;\r\n }\r\n\r\n swiperOptions ??= {};\r\n\r\n if (swiperOptions.pagination) {\r\n swiperOptions.pagination[\"type\"] =\r\n swiperOptions.pagination[\"type\"].toLowerCase();\r\n }\r\n\r\n const swiper = new (Swiper as any)(el, swiperOptions);\r\n this.swiper = swiper;\r\n this.handle = handle;\r\n this.swiper.on(\"realIndexChange\", (e) => this.onRealIndexChange(e, this));\r\n\r\n el._swiper = {\r\n instance: this.swiper,\r\n handle: handle,\r\n };\r\n }\r\n\r\n slideTo(index: number, speed?: number, runCallbacks?: boolean) {\r\n this.swiper.slideToLoop(index, speed, runCallbacks);\r\n }\r\n\r\n slideNext(speed?: number) {\r\n this.swiper.slideNext(speed);\r\n }\r\n\r\n slidePrev(speed?: number) {\r\n this.swiper.slidePrev(speed);\r\n }\r\n\r\n dispose() {\r\n this.swiper && this.swiper.destroy(true);\r\n this.handle.dispose();\r\n }\r\n\r\n invokeVoid(prop: string, ...args: any[]) {\r\n if (this.swiper[prop] && typeof this.swiper[prop] === \"function\") {\r\n this.swiper[prop](...args);\r\n }\r\n }\r\n\r\n async onRealIndexChange(e: SwiperClass, that: SwiperProxy) {\r\n if (that.handle) {\r\n await that.handle.invokeMethodAsync(\"OnIndexChanged\", e.realIndex);\r\n }\r\n }\r\n}\r\n\r\nfunction init(\r\n el: HTMLElement,\r\n swiperOptions: SwiperOptions,\r\n dotnetHelper: DotNet.DotNetObject\r\n) {\r\n return new SwiperProxy(el, swiperOptions, dotnetHelper);\r\n}\r\n\r\nexport { init };\r\n"],"names":["__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","value","step","next","e","rejected","result","done","then","apply","SwiperProxy","constructor","el","swiperOptions","handle","Error","dispose","_swiper","instance","destroy","pagination","toLowerCase","swiper","Swiper","this","on","onRealIndexChange","slideTo","index","speed","runCallbacks","slideToLoop","slideNext","slidePrev","invokeVoid","prop","args","that","invokeMethodAsync","realIndex","init","dotnetHelper"],"mappings":"AAkHO,SAASA,EAAUC,EAASC,EAAYC,EAAGC,GAE9C,OAAO,IAAKD,IAAMA,EAAIE,WAAU,SAAUC,EAASC,GAC/C,SAASC,EAAUC,GAAS,IAAMC,EAAKN,EAAUO,KAAKF,GAAQ,CAAG,MAAOG,GAAKL,EAAOK,GAAO,CAC3F,SAASC,EAASJ,GAAS,IAAMC,EAAKN,EAAiB,MAAEK,GAAU,CAAC,MAAOG,GAAKL,EAAOK,GAAO,CAC9F,SAASF,EAAKI,GAJlB,IAAeL,EAIaK,EAAOC,KAAOT,EAAQQ,EAAOL,QAJ1CA,EAIyDK,EAAOL,MAJhDA,aAAiBN,EAAIM,EAAQ,IAAIN,GAAE,SAAUG,GAAWA,EAAQG,EAAO,KAIhBO,KAAKR,EAAWK,EAAY,CAC9GH,GAAMN,EAAYA,EAAUa,MAAMhB,EAASC,GAAc,KAAKS,OACtE,GACA,CCrHA,MAAMO,EAIJC,YACEC,EACAC,EACAC,GAEA,IAAKA,EACH,MAAM,IAAIC,MAAM,uCAGlB,IAAKH,EAEH,YADAE,EAAOE,UAILJ,EAAGK,UACLL,EAAGK,QAAQC,SAASC,SAAQ,UACrBP,EAAGK,SAGZJ,UAAAA,EAAkB,CAAA,GAEdA,EAAcO,aAChBP,EAAcO,WAAiB,KAC7BP,EAAcO,WAAiB,KAAEC,eAGrC,MAAMC,EAAS,IAAKC,OAAeX,EAAIC,GACvCW,KAAKF,OAASA,EACdE,KAAKV,OAASA,EACdU,KAAKF,OAAOG,GAAG,mBAAoBrB,GAAMoB,KAAKE,kBAAkBtB,EAAGoB,QAEnEZ,EAAGK,QAAU,CACXC,SAAUM,KAAKF,OACfR,OAAQA,EAEX,CAEDa,QAAQC,EAAeC,EAAgBC,GACrCN,KAAKF,OAAOS,YAAYH,EAAOC,EAAOC,EACvC,CAEDE,UAAUH,GACRL,KAAKF,OAAOU,UAAUH,EACvB,CAEDI,UAAUJ,GACRL,KAAKF,OAAOW,UAAUJ,EACvB,CAEDb,UACEQ,KAAKF,QAAUE,KAAKF,OAAOH,SAAQ,GACnCK,KAAKV,OAAOE,SACb,CAEDkB,WAAWC,KAAiBC,GACtBZ,KAAKF,OAAOa,IAAsC,mBAAtBX,KAAKF,OAAOa,IAC1CX,KAAKF,OAAOa,MAASC,EAExB,CAEKV,kBAAkBtB,EAAgBiC,4CAClCA,EAAKvB,eACDuB,EAAKvB,OAAOwB,kBAAkB,iBAAkBlC,EAAEmC,cAE3D,EAGH,SAASC,EACP5B,EACAC,EACA4B,GAEA,OAAO,IAAI/B,EAAYE,EAAIC,EAAe4B,EAC5C"} \ No newline at end of file