marketplacepos 2.4.8 → 2.5.0
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/Marketplace/162.380fb02c77fa6ec0.js +1 -0
- package/Marketplace/174.d9e54ac6a8d68fed.js +1 -0
- package/Marketplace/180.bfed0f08b5cdbbde.js +1 -0
- package/Marketplace/25.5e00713dbd080b64.js +1 -0
- package/Marketplace/32.9c83cc1dfc19e37d.js +1 -0
- package/Marketplace/360.4fa1f449dc516500.js +1 -0
- package/Marketplace/369.9e98af5ff042d408.js +1 -0
- package/Marketplace/397.017f0dd05d9d37c5.js +1 -0
- package/Marketplace/3rdpartylicenses.txt +568 -0
- package/Marketplace/455.fc7663306b753727.js +1 -0
- package/Marketplace/463.7140b32660c473a4.js +1 -0
- package/Marketplace/512.96a1a3c8c51a8727.js +1 -0
- package/Marketplace/516.f335756d88de781a.js +1 -0
- package/Marketplace/585.9e916b668a91cc94.js +1 -0
- package/Marketplace/6.fc79ecc0c0a33462.js +1 -0
- package/Marketplace/616.fb179a9605c3e98c.js +1 -0
- package/Marketplace/716.65e3e9a36c3e8be6.js +1 -0
- package/Marketplace/717.ea775a267d795788.js +1 -0
- package/Marketplace/739.82b92600f9519019.js +1 -0
- package/Marketplace/785.e0040d021febffb1.js +1 -0
- package/Marketplace/796.d34bd45b5a924fca.js +1 -0
- package/Marketplace/832.6082371d3ebb95a0.js +1 -0
- package/Marketplace/874.472e0cd7c75127ca.js +1 -0
- package/Marketplace/common.3f5874655db24424.js +1 -0
- package/Marketplace/index.html +22 -23
- package/Marketplace/main.5d7fbf88ea2e3736.js +1 -0
- package/Marketplace/polyfills.8d85b0533e3f867a.js +1 -0
- package/Marketplace/runtime.7fbde9d6c7315628.js +1 -0
- package/Marketplace/scripts.09af772bfa77d50d.js +1 -0
- package/Marketplace/styles.dff58ae3c0783953.css +20 -0
- package/package.json +1 -1
- package/Marketplace/common.js +0 -238
- package/Marketplace/common.js.map +0 -1
- package/Marketplace/default-node_modules_angular_forms_fesm2020_forms_mjs.js +0 -9551
- package/Marketplace/default-node_modules_angular_forms_fesm2020_forms_mjs.js.map +0 -1
- package/Marketplace/default-node_modules_angular_material_fesm2020_paginator_mjs.js +0 -797
- package/Marketplace/default-node_modules_angular_material_fesm2020_paginator_mjs.js.map +0 -1
- package/Marketplace/default-node_modules_angular_material_fesm2020_slide-toggle_mjs.js +0 -669
- package/Marketplace/default-node_modules_angular_material_fesm2020_slide-toggle_mjs.js.map +0 -1
- package/Marketplace/default-node_modules_ng-select_ng-select_fesm2020_ng-select-ng-select_mjs.js +0 -4632
- package/Marketplace/default-node_modules_ng-select_ng-select_fesm2020_ng-select-ng-select_mjs.js.map +0 -1
- package/Marketplace/default-src_app_menu_nav-tab_nav-tab_component_ts-node_modules_angular_material_fesm2020_date-e7a231.js +0 -6841
- package/Marketplace/default-src_app_menu_nav-tab_nav-tab_component_ts-node_modules_angular_material_fesm2020_date-e7a231.js.map +0 -1
- package/Marketplace/default-src_app_menu_nav-tab_nav-tab_component_ts-src_app_services_biggerPicture_service_ts-s-b16afe.js +0 -3316
- package/Marketplace/default-src_app_menu_nav-tab_nav-tab_component_ts-src_app_services_biggerPicture_service_ts-s-b16afe.js.map +0 -1
- package/Marketplace/default-src_app_model_enums_FilterType_enum_ts-src_app_sharing-module_table_table_component_ts.js +0 -6219
- package/Marketplace/default-src_app_model_enums_FilterType_enum_ts-src_app_sharing-module_table_table_component_ts.js.map +0 -1
- package/Marketplace/default-src_app_sharing-module_datepicker_datepicker_component_ts.js +0 -19965
- package/Marketplace/default-src_app_sharing-module_datepicker_datepicker_component_ts.js.map +0 -1
- package/Marketplace/main.js +0 -622
- package/Marketplace/main.js.map +0 -1
- package/Marketplace/polyfills.js +0 -3398
- package/Marketplace/polyfills.js.map +0 -1
- package/Marketplace/runtime.js +0 -346
- package/Marketplace/runtime.js.map +0 -1
- package/Marketplace/scripts.js +0 -9
- package/Marketplace/scripts.js.map +0 -1
- package/Marketplace/src_app_login_login_module_ts.js +0 -651
- package/Marketplace/src_app_login_login_module_ts.js.map +0 -1
- package/Marketplace/src_app_menu_ReportOrder_order_order_module_ts.js +0 -872
- package/Marketplace/src_app_menu_ReportOrder_order_order_module_ts.js.map +0 -1
- package/Marketplace/src_app_menu_ReportOrder_product-statistic_product-statistic_module_ts.js +0 -422
- package/Marketplace/src_app_menu_ReportOrder_product-statistic_product-statistic_module_ts.js.map +0 -1
- package/Marketplace/src_app_menu_ReportOrder_report_module_ts.js +0 -283
- package/Marketplace/src_app_menu_ReportOrder_report_module_ts.js.map +0 -1
- package/Marketplace/src_app_menu_channels_channels_module_ts.js +0 -9605
- package/Marketplace/src_app_menu_channels_channels_module_ts.js.map +0 -1
- package/Marketplace/src_app_menu_inventory_inventory_module_ts.js +0 -1547
- package/Marketplace/src_app_menu_inventory_inventory_module_ts.js.map +0 -1
- package/Marketplace/src_app_menu_logistic_logistic_module_ts.js +0 -245
- package/Marketplace/src_app_menu_logistic_logistic_module_ts.js.map +0 -1
- package/Marketplace/src_app_menu_menu_module_ts.js +0 -40326
- package/Marketplace/src_app_menu_menu_module_ts.js.map +0 -1
- package/Marketplace/src_app_menu_notification_notification_module_ts.js +0 -285
- package/Marketplace/src_app_menu_notification_notification_module_ts.js.map +0 -1
- package/Marketplace/src_app_menu_object-log_logs_module_ts.js +0 -1817
- package/Marketplace/src_app_menu_object-log_logs_module_ts.js.map +0 -1
- package/Marketplace/src_app_menu_orders_orders_module_ts.js +0 -4867
- package/Marketplace/src_app_menu_orders_orders_module_ts.js.map +0 -1
- package/Marketplace/src_app_menu_price_price_module_ts.js +0 -1885
- package/Marketplace/src_app_menu_price_price_module_ts.js.map +0 -1
- package/Marketplace/src_app_menu_products_product_module_ts.js +0 -2692
- package/Marketplace/src_app_menu_products_product_module_ts.js.map +0 -1
- package/Marketplace/styles.css +0 -16565
- package/Marketplace/styles.css.map +0 -1
- package/Marketplace/vendor.js +0 -71624
- package/Marketplace/vendor.js.map +0 -1
|
@@ -1,3316 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
(self["webpackChunkpos_marketplace"] = self["webpackChunkpos_marketplace"] || []).push([["default-src_app_menu_nav-tab_nav-tab_component_ts-src_app_services_biggerPicture_service_ts-s-b16afe"],{
|
|
3
|
-
|
|
4
|
-
/***/ 7398:
|
|
5
|
-
/*!***************************************************!*\
|
|
6
|
-
!*** ./src/app/menu/nav-tab/nav-tab.component.ts ***!
|
|
7
|
-
\***************************************************/
|
|
8
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
9
|
-
|
|
10
|
-
__webpack_require__.r(__webpack_exports__);
|
|
11
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
12
|
-
/* harmony export */ "NavTabComponent": () => (/* binding */ NavTabComponent),
|
|
13
|
-
/* harmony export */ "NavTabModule": () => (/* binding */ NavTabModule)
|
|
14
|
-
/* harmony export */ });
|
|
15
|
-
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/common */ 4666);
|
|
16
|
-
/* harmony import */ var _angular_material_tooltip__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/material/tooltip */ 6896);
|
|
17
|
-
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/router */ 124);
|
|
18
|
-
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ 2560);
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
function NavTabComponent_li_1_Template(rf, ctx) { if (rf & 1) {
|
|
26
|
-
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "li", 2)(1, "a", 3);
|
|
27
|
-
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](2);
|
|
28
|
-
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]()();
|
|
29
|
-
} if (rf & 2) {
|
|
30
|
-
const tabMenu_r1 = ctx.$implicit;
|
|
31
|
-
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1);
|
|
32
|
-
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpropertyInterpolate"]("routerLink", tabMenu_r1.Url);
|
|
33
|
-
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("title", tabMenu_r1.Description ? tabMenu_r1.Description : "");
|
|
34
|
-
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1);
|
|
35
|
-
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtextInterpolate1"](" ", tabMenu_r1.Title, " ");
|
|
36
|
-
} }
|
|
37
|
-
class NavTabComponent {
|
|
38
|
-
}
|
|
39
|
-
NavTabComponent.ɵfac = function NavTabComponent_Factory(t) { return new (t || NavTabComponent)(); };
|
|
40
|
-
NavTabComponent.ɵcmp = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineComponent"]({ type: NavTabComponent, selectors: [["nav-tab"]], inputs: { Tabs: "Tabs" }, decls: 2, vars: 1, consts: [[1, "nav", "navbar-nav", "navbar-left", "nav-tab-arrow"], ["routerLinkActive", "active", "class", "nav-item me-6", 4, "ngFor", "ngForOf"], ["routerLinkActive", "active", 1, "nav-item", "me-6"], [1, "nav-link", "nav-link-arrow", "mb-0", 3, "routerLink", "title"]], template: function NavTabComponent_Template(rf, ctx) { if (rf & 1) {
|
|
41
|
-
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "ul", 0);
|
|
42
|
-
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](1, NavTabComponent_li_1_Template, 3, 3, "li", 1);
|
|
43
|
-
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
|
|
44
|
-
} if (rf & 2) {
|
|
45
|
-
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1);
|
|
46
|
-
_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngForOf", ctx.Tabs);
|
|
47
|
-
} }, dependencies: [_angular_common__WEBPACK_IMPORTED_MODULE_1__.NgForOf, _angular_router__WEBPACK_IMPORTED_MODULE_2__.RouterLinkWithHref, _angular_router__WEBPACK_IMPORTED_MODULE_2__.RouterLinkActive], styles: ["\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJuYXYtdGFiLmNvbXBvbmVudC5zY3NzIn0= */"] });
|
|
48
|
-
class NavTabModule {
|
|
49
|
-
}
|
|
50
|
-
NavTabModule.ɵfac = function NavTabModule_Factory(t) { return new (t || NavTabModule)(); };
|
|
51
|
-
NavTabModule.ɵmod = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineNgModule"]({ type: NavTabModule });
|
|
52
|
-
NavTabModule.ɵinj = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjector"]({ imports: [_angular_common__WEBPACK_IMPORTED_MODULE_1__.CommonModule,
|
|
53
|
-
_angular_router__WEBPACK_IMPORTED_MODULE_2__.RouterModule,
|
|
54
|
-
_angular_material_tooltip__WEBPACK_IMPORTED_MODULE_3__.MatTooltipModule] });
|
|
55
|
-
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵsetNgModuleScope"](NavTabModule, { declarations: [NavTabComponent], imports: [_angular_common__WEBPACK_IMPORTED_MODULE_1__.CommonModule,
|
|
56
|
-
_angular_router__WEBPACK_IMPORTED_MODULE_2__.RouterModule,
|
|
57
|
-
_angular_material_tooltip__WEBPACK_IMPORTED_MODULE_3__.MatTooltipModule], exports: [NavTabComponent] }); })();
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
/***/ }),
|
|
61
|
-
|
|
62
|
-
/***/ 886:
|
|
63
|
-
/*!***************************************************!*\
|
|
64
|
-
!*** ./src/app/services/biggerPicture.service.ts ***!
|
|
65
|
-
\***************************************************/
|
|
66
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
67
|
-
|
|
68
|
-
__webpack_require__.r(__webpack_exports__);
|
|
69
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
70
|
-
/* harmony export */ "BiggerPictureService": () => (/* binding */ BiggerPictureService)
|
|
71
|
-
/* harmony export */ });
|
|
72
|
-
/* harmony import */ var D_Projects_Gitlab_marketplace_Marketplace_WEB_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ 1670);
|
|
73
|
-
/* harmony import */ var bigger_picture__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! bigger-picture */ 8926);
|
|
74
|
-
/* harmony import */ var _model_Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../model/Constants */ 1889);
|
|
75
|
-
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/core */ 2560);
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
const bp = (0,bigger_picture__WEBPACK_IMPORTED_MODULE_1__["default"])({
|
|
81
|
-
target: document.body
|
|
82
|
-
});
|
|
83
|
-
class BiggerPictureService {
|
|
84
|
-
constructor() {}
|
|
85
|
-
|
|
86
|
-
openBiggerPicture(ev, imageUrl) {
|
|
87
|
-
return (0,D_Projects_Gitlab_marketplace_Marketplace_WEB_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
|
|
88
|
-
ev.preventDefault();
|
|
89
|
-
|
|
90
|
-
try {
|
|
91
|
-
const imgObj = yield _model_Constants__WEBPACK_IMPORTED_MODULE_2__.Constants.getImageInfo(imageUrl);
|
|
92
|
-
bp.open({
|
|
93
|
-
items: [imgObj],
|
|
94
|
-
intro: "fadeup"
|
|
95
|
-
});
|
|
96
|
-
} catch (error) {
|
|
97
|
-
alert(error);
|
|
98
|
-
}
|
|
99
|
-
})();
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
BiggerPictureService.ɵfac = function BiggerPictureService_Factory(t) {
|
|
105
|
-
return new (t || BiggerPictureService)();
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
BiggerPictureService.ɵprov = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdefineInjectable"]({
|
|
109
|
-
token: BiggerPictureService,
|
|
110
|
-
factory: BiggerPictureService.ɵfac,
|
|
111
|
-
providedIn: "root"
|
|
112
|
-
});
|
|
113
|
-
|
|
114
|
-
/***/ }),
|
|
115
|
-
|
|
116
|
-
/***/ 4660:
|
|
117
|
-
/*!*****************************************************************************!*\
|
|
118
|
-
!*** ./src/app/services/infinite-pagination/infinite-pagination.service.ts ***!
|
|
119
|
-
\*****************************************************************************/
|
|
120
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
121
|
-
|
|
122
|
-
__webpack_require__.r(__webpack_exports__);
|
|
123
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
124
|
-
/* harmony export */ "InfinitePaginationService": () => (/* binding */ InfinitePaginationService)
|
|
125
|
-
/* harmony export */ });
|
|
126
|
-
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rxjs */ 6317);
|
|
127
|
-
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs */ 228);
|
|
128
|
-
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rxjs */ 8951);
|
|
129
|
-
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rxjs */ 116);
|
|
130
|
-
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rxjs */ 3853);
|
|
131
|
-
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rxjs */ 635);
|
|
132
|
-
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! rxjs */ 538);
|
|
133
|
-
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! rxjs */ 4503);
|
|
134
|
-
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! rxjs */ 9337);
|
|
135
|
-
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! rxjs */ 9196);
|
|
136
|
-
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @angular/core */ 2560);
|
|
137
|
-
/* harmony import */ var _http_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../http.service */ 6858);
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
class InfinitePaginationService {
|
|
142
|
-
constructor(http) {
|
|
143
|
-
this.http = http;
|
|
144
|
-
/** Notify to fetch data with loader*/
|
|
145
|
-
this.pagination$ = new rxjs__WEBPACK_IMPORTED_MODULE_1__.BehaviorSubject(null);
|
|
146
|
-
this.destroy$ = new rxjs__WEBPACK_IMPORTED_MODULE_2__.Subject();
|
|
147
|
-
this.data$ = this.paginationFunction();
|
|
148
|
-
}
|
|
149
|
-
onNextPage(pagination) {
|
|
150
|
-
pagination.PageNumber += 1;
|
|
151
|
-
this.pagination$.next(pagination);
|
|
152
|
-
}
|
|
153
|
-
setPageNumberFooter(pagination) {
|
|
154
|
-
this.footerPageNumber = pagination.PageNumber;
|
|
155
|
-
}
|
|
156
|
-
setPaginationButtonState(pagination, dataLength) {
|
|
157
|
-
if (dataLength == 0) {
|
|
158
|
-
this.disableNextButton = true;
|
|
159
|
-
}
|
|
160
|
-
else {
|
|
161
|
-
this.disableNextButton = (dataLength < (pagination.RowCount * pagination.PageNumber)) ? false : true;
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
resetToFirstPage(pagination) {
|
|
165
|
-
pagination.PageNumber = 1;
|
|
166
|
-
this.pagination$.next(pagination);
|
|
167
|
-
this.hideCount = true;
|
|
168
|
-
this.goToLastPage = false;
|
|
169
|
-
}
|
|
170
|
-
getAllData(pagination, totalDataLength) {
|
|
171
|
-
pagination.RowCount = totalDataLength;
|
|
172
|
-
this.pagination$.next(pagination);
|
|
173
|
-
this.goToLastPage = true;
|
|
174
|
-
}
|
|
175
|
-
destroy() {
|
|
176
|
-
this.destroy$.next(true);
|
|
177
|
-
this.destroy$.complete();
|
|
178
|
-
this.pagination$ = null;
|
|
179
|
-
this.pagination$ = new rxjs__WEBPACK_IMPORTED_MODULE_1__.BehaviorSubject(null);
|
|
180
|
-
this.data$ = this.paginationFunction();
|
|
181
|
-
}
|
|
182
|
-
paginationFunction() {
|
|
183
|
-
return this.pagination$.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_3__.takeUntil)(this.destroy$), (0,rxjs__WEBPACK_IMPORTED_MODULE_4__.filter)((pagination) => pagination != null), (0,rxjs__WEBPACK_IMPORTED_MODULE_5__.concatMap)((pagination) => {
|
|
184
|
-
return this.http.post(`/API/${this.fetchDataEndpoint}`, JSON.stringify(pagination))
|
|
185
|
-
.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_6__.map)((response) => response.Data));
|
|
186
|
-
}), (0,rxjs__WEBPACK_IMPORTED_MODULE_7__.withLatestFrom)(this.pagination$), (0,rxjs__WEBPACK_IMPORTED_MODULE_8__.scan)((acc, value) => {
|
|
187
|
-
const [previousData, pagination] = acc;
|
|
188
|
-
const [nextData] = value;
|
|
189
|
-
return pagination.PageNumber == 1 ? [nextData, pagination] : [previousData.concat(nextData), pagination];
|
|
190
|
-
}), (0,rxjs__WEBPACK_IMPORTED_MODULE_9__.tap)(([data, pagination]) => {
|
|
191
|
-
this.setPageNumberFooter(pagination);
|
|
192
|
-
this.setPaginationButtonState(pagination, (data).length);
|
|
193
|
-
}), (0,rxjs__WEBPACK_IMPORTED_MODULE_6__.map)(([data]) => data), (0,rxjs__WEBPACK_IMPORTED_MODULE_10__.shareReplay)());
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
InfinitePaginationService.ɵfac = function InfinitePaginationService_Factory(t) { return new (t || InfinitePaginationService)(_angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵinject"](_http_service__WEBPACK_IMPORTED_MODULE_0__.HttpService)); };
|
|
197
|
-
InfinitePaginationService.ɵprov = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵdefineInjectable"]({ token: InfinitePaginationService, factory: InfinitePaginationService.ɵfac, providedIn: 'root' });
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
/***/ }),
|
|
201
|
-
|
|
202
|
-
/***/ 538:
|
|
203
|
-
/*!*************************************************************************!*\
|
|
204
|
-
!*** ./node_modules/rxjs/dist/esm/internal/operators/withLatestFrom.js ***!
|
|
205
|
-
\*************************************************************************/
|
|
206
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
207
|
-
|
|
208
|
-
__webpack_require__.r(__webpack_exports__);
|
|
209
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
210
|
-
/* harmony export */ "withLatestFrom": () => (/* binding */ withLatestFrom)
|
|
211
|
-
/* harmony export */ });
|
|
212
|
-
/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/lift */ 1944);
|
|
213
|
-
/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./OperatorSubscriber */ 3945);
|
|
214
|
-
/* harmony import */ var _observable_innerFrom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../observable/innerFrom */ 4987);
|
|
215
|
-
/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/identity */ 9173);
|
|
216
|
-
/* harmony import */ var _util_noop__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util/noop */ 9635);
|
|
217
|
-
/* harmony import */ var _util_args__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/args */ 420);
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
function withLatestFrom(...inputs) {
|
|
225
|
-
const project = (0,_util_args__WEBPACK_IMPORTED_MODULE_0__.popResultSelector)(inputs);
|
|
226
|
-
return (0,_util_lift__WEBPACK_IMPORTED_MODULE_1__.operate)((source, subscriber) => {
|
|
227
|
-
const len = inputs.length;
|
|
228
|
-
const otherValues = new Array(len);
|
|
229
|
-
let hasValue = inputs.map(() => false);
|
|
230
|
-
let ready = false;
|
|
231
|
-
|
|
232
|
-
for (let i = 0; i < len; i++) {
|
|
233
|
-
(0,_observable_innerFrom__WEBPACK_IMPORTED_MODULE_2__.innerFrom)(inputs[i]).subscribe((0,_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_3__.createOperatorSubscriber)(subscriber, value => {
|
|
234
|
-
otherValues[i] = value;
|
|
235
|
-
|
|
236
|
-
if (!ready && !hasValue[i]) {
|
|
237
|
-
hasValue[i] = true;
|
|
238
|
-
(ready = hasValue.every(_util_identity__WEBPACK_IMPORTED_MODULE_4__.identity)) && (hasValue = null);
|
|
239
|
-
}
|
|
240
|
-
}, _util_noop__WEBPACK_IMPORTED_MODULE_5__.noop));
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
source.subscribe((0,_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_3__.createOperatorSubscriber)(subscriber, value => {
|
|
244
|
-
if (ready) {
|
|
245
|
-
const values = [value, ...otherValues];
|
|
246
|
-
subscriber.next(project ? project(...values) : values);
|
|
247
|
-
}
|
|
248
|
-
}));
|
|
249
|
-
});
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
/***/ }),
|
|
253
|
-
|
|
254
|
-
/***/ 8926:
|
|
255
|
-
/*!*************************************************************!*\
|
|
256
|
-
!*** ./node_modules/bigger-picture/dist/bigger-picture.mjs ***!
|
|
257
|
-
\*************************************************************/
|
|
258
|
-
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
259
|
-
|
|
260
|
-
__webpack_require__.r(__webpack_exports__);
|
|
261
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
262
|
-
/* harmony export */ "default": () => (/* binding */ biggerPicture)
|
|
263
|
-
/* harmony export */ });
|
|
264
|
-
function noop() {}
|
|
265
|
-
|
|
266
|
-
const identity = x => x;
|
|
267
|
-
|
|
268
|
-
function assign(tar, src) {
|
|
269
|
-
// @ts-ignore
|
|
270
|
-
for (const k in src) tar[k] = src[k];
|
|
271
|
-
|
|
272
|
-
return tar;
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
function run(fn) {
|
|
276
|
-
return fn();
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
function run_all(fns) {
|
|
280
|
-
fns.forEach(run);
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
function is_function(thing) {
|
|
284
|
-
return typeof thing === 'function';
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
function not_equal(a, b) {
|
|
288
|
-
return a != a ? b == b : a !== b;
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
function is_empty(obj) {
|
|
292
|
-
return Object.keys(obj).length === 0;
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
function subscribe(store, ...callbacks) {
|
|
296
|
-
if (store == null) {
|
|
297
|
-
return noop;
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
const unsub = store.subscribe(...callbacks);
|
|
301
|
-
return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
function component_subscribe(component, store, callback) {
|
|
305
|
-
component.$$.on_destroy.push(subscribe(store, callback));
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
function action_destroyer(action_result) {
|
|
309
|
-
return action_result && is_function(action_result.destroy) ? action_result.destroy : noop;
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
let now = () => globalThis.performance.now();
|
|
313
|
-
|
|
314
|
-
let raf = cb => requestAnimationFrame(cb);
|
|
315
|
-
|
|
316
|
-
const tasks = new Set();
|
|
317
|
-
|
|
318
|
-
function run_tasks(now) {
|
|
319
|
-
tasks.forEach(task => {
|
|
320
|
-
if (!task.c(now)) {
|
|
321
|
-
tasks.delete(task);
|
|
322
|
-
task.f();
|
|
323
|
-
}
|
|
324
|
-
});
|
|
325
|
-
if (tasks.size !== 0) raf(run_tasks);
|
|
326
|
-
}
|
|
327
|
-
/**
|
|
328
|
-
* Creates a new task that runs on each raf frame
|
|
329
|
-
* until it returns a falsy value or is aborted
|
|
330
|
-
*/
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
function loop(callback) {
|
|
334
|
-
let task;
|
|
335
|
-
if (tasks.size === 0) raf(run_tasks);
|
|
336
|
-
return {
|
|
337
|
-
promise: new Promise(fulfill => {
|
|
338
|
-
tasks.add(task = {
|
|
339
|
-
c: callback,
|
|
340
|
-
f: fulfill
|
|
341
|
-
});
|
|
342
|
-
}),
|
|
343
|
-
|
|
344
|
-
abort() {
|
|
345
|
-
tasks.delete(task);
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
};
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
function append(target, node) {
|
|
352
|
-
target.appendChild(node);
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
function insert(target, node, anchor) {
|
|
356
|
-
target.insertBefore(node, anchor || null);
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
function detach(node) {
|
|
360
|
-
node.parentNode.removeChild(node);
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
function element(name) {
|
|
364
|
-
return document.createElement(name);
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
function text(data) {
|
|
368
|
-
return document.createTextNode(data);
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
function empty() {
|
|
372
|
-
return text('');
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
function listen(node, event, handler, options) {
|
|
376
|
-
node.addEventListener(event, handler, options);
|
|
377
|
-
return () => node.removeEventListener(event, handler, options);
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
function attr(node, attribute, value) {
|
|
381
|
-
if (value == null) node.removeAttribute(attribute);else if (node.getAttribute(attribute) !== value) node.setAttribute(attribute, value);
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
function set_style(node, key, value, important) {
|
|
385
|
-
if (value === null) {
|
|
386
|
-
node.style.removeProperty(key);
|
|
387
|
-
} else {
|
|
388
|
-
node.style.setProperty(key, value);
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
function toggle_class(element, name, toggle) {
|
|
393
|
-
element.classList[toggle ? 'add' : 'remove'](name);
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
function custom_event(type, detail, bubbles = false) {
|
|
397
|
-
const e = document.createEvent('CustomEvent');
|
|
398
|
-
e.initCustomEvent(type, bubbles, false, detail);
|
|
399
|
-
return e;
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
let stylesheet;
|
|
403
|
-
let active = 0;
|
|
404
|
-
let current_rules = {}; // https://github.com/darkskyapp/string-hash/blob/master/index.js
|
|
405
|
-
// function hash(str) {
|
|
406
|
-
// let hash = 5381;
|
|
407
|
-
// let i = str.length;
|
|
408
|
-
// while (i--)
|
|
409
|
-
// hash = ((hash << 5) - hash) ^ str.charCodeAt(i);
|
|
410
|
-
// return hash >>> 0;
|
|
411
|
-
// }
|
|
412
|
-
|
|
413
|
-
function create_rule(node, a, b, duration, delay, ease, fn, uid = 0) {
|
|
414
|
-
const step = 16.666 / duration;
|
|
415
|
-
let keyframes = '{\n';
|
|
416
|
-
|
|
417
|
-
for (let p = 0; p <= 1; p += step) {
|
|
418
|
-
const t = a + (b - a) * ease(p);
|
|
419
|
-
keyframes += p * 100 + `%{${fn(t, 1 - t)}}\n`;
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
const rule = keyframes + `100% {${fn(b, 1 - b)}}\n}`;
|
|
423
|
-
const name = `_bp_${Math.round(Math.random() * 1e9)}_${uid}`;
|
|
424
|
-
|
|
425
|
-
if (!current_rules[name]) {
|
|
426
|
-
if (!stylesheet) {
|
|
427
|
-
const style = element('style');
|
|
428
|
-
document.head.appendChild(style);
|
|
429
|
-
stylesheet = style.sheet;
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
current_rules[name] = true;
|
|
433
|
-
stylesheet.insertRule(`@keyframes ${name} ${rule}`, stylesheet.cssRules.length);
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
const animation = node.style.animation || '';
|
|
437
|
-
node.style.animation = `${animation ? `${animation}, ` : ``}${name} ${duration}ms linear ${delay}ms 1 both`;
|
|
438
|
-
active += 1;
|
|
439
|
-
return name;
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
function delete_rule(node, name) {
|
|
443
|
-
node.style.animation = (node.style.animation || '').split(', ').filter(name ? anim => anim.indexOf(name) < 0 // remove specific animation
|
|
444
|
-
: anim => anim.indexOf('_bp') === -1 // remove all Svelte animations
|
|
445
|
-
).join(', ');
|
|
446
|
-
if (name && ! --active) clear_rules();
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
function clear_rules() {
|
|
450
|
-
raf(() => {
|
|
451
|
-
if (active) return;
|
|
452
|
-
let i = stylesheet.cssRules.length;
|
|
453
|
-
|
|
454
|
-
while (i--) stylesheet.deleteRule(i);
|
|
455
|
-
|
|
456
|
-
current_rules = {};
|
|
457
|
-
});
|
|
458
|
-
}
|
|
459
|
-
|
|
460
|
-
let current_component;
|
|
461
|
-
|
|
462
|
-
function set_current_component(component) {
|
|
463
|
-
current_component = component;
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
const dirty_components = [];
|
|
467
|
-
const binding_callbacks = [];
|
|
468
|
-
const render_callbacks = [];
|
|
469
|
-
const flush_callbacks = [];
|
|
470
|
-
const resolved_promise = Promise.resolve();
|
|
471
|
-
let update_scheduled = false;
|
|
472
|
-
|
|
473
|
-
function schedule_update() {
|
|
474
|
-
if (!update_scheduled) {
|
|
475
|
-
update_scheduled = true;
|
|
476
|
-
resolved_promise.then(flush);
|
|
477
|
-
}
|
|
478
|
-
}
|
|
479
|
-
|
|
480
|
-
function add_render_callback(fn) {
|
|
481
|
-
render_callbacks.push(fn);
|
|
482
|
-
} // flush() calls callbacks in this order:
|
|
483
|
-
// 1. All beforeUpdate callbacks, in order: parents before children
|
|
484
|
-
// 2. All bind:this callbacks, in reverse order: children before parents.
|
|
485
|
-
// 3. All afterUpdate callbacks, in order: parents before children. EXCEPT
|
|
486
|
-
// for afterUpdates called during the initial onMount, which are called in
|
|
487
|
-
// reverse order: children before parents.
|
|
488
|
-
// Since callbacks might update component values, which could trigger another
|
|
489
|
-
// call to flush(), the following steps guard against this:
|
|
490
|
-
// 1. During beforeUpdate, any updated components will be added to the
|
|
491
|
-
// dirty_components array and will cause a reentrant call to flush(). Because
|
|
492
|
-
// the flush index is kept outside the function, the reentrant call will pick
|
|
493
|
-
// up where the earlier call left off and go through all dirty components. The
|
|
494
|
-
// current_component value is saved and restored so that the reentrant call will
|
|
495
|
-
// not interfere with the "parent" flush() call.
|
|
496
|
-
// 2. bind:this callbacks cannot trigger new flush() calls.
|
|
497
|
-
// 3. During afterUpdate, any updated components will NOT have their afterUpdate
|
|
498
|
-
// callback called a second time; the seen_callbacks set, outside the flush()
|
|
499
|
-
// function, guarantees this behavior.
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
const seen_callbacks = new Set();
|
|
503
|
-
let flushidx = 0; // Do *not* move this inside the flush() function
|
|
504
|
-
|
|
505
|
-
function flush() {
|
|
506
|
-
const saved_component = current_component;
|
|
507
|
-
|
|
508
|
-
do {
|
|
509
|
-
// first, call beforeUpdate functions
|
|
510
|
-
// and update components
|
|
511
|
-
while (flushidx < dirty_components.length) {
|
|
512
|
-
const component = dirty_components[flushidx];
|
|
513
|
-
flushidx++;
|
|
514
|
-
set_current_component(component);
|
|
515
|
-
update(component.$$);
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
set_current_component(null);
|
|
519
|
-
dirty_components.length = 0;
|
|
520
|
-
flushidx = 0;
|
|
521
|
-
|
|
522
|
-
while (binding_callbacks.length) binding_callbacks.pop()(); // then, once components are updated, call
|
|
523
|
-
// afterUpdate functions. This may cause
|
|
524
|
-
// subsequent updates...
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
for (let i = 0; i < render_callbacks.length; i += 1) {
|
|
528
|
-
const callback = render_callbacks[i];
|
|
529
|
-
|
|
530
|
-
if (!seen_callbacks.has(callback)) {
|
|
531
|
-
// ...so guard against infinite loops
|
|
532
|
-
seen_callbacks.add(callback);
|
|
533
|
-
callback();
|
|
534
|
-
}
|
|
535
|
-
}
|
|
536
|
-
|
|
537
|
-
render_callbacks.length = 0;
|
|
538
|
-
} while (dirty_components.length);
|
|
539
|
-
|
|
540
|
-
while (flush_callbacks.length) {
|
|
541
|
-
flush_callbacks.pop()();
|
|
542
|
-
}
|
|
543
|
-
|
|
544
|
-
update_scheduled = false;
|
|
545
|
-
seen_callbacks.clear();
|
|
546
|
-
set_current_component(saved_component);
|
|
547
|
-
}
|
|
548
|
-
|
|
549
|
-
function update($$) {
|
|
550
|
-
if ($$.fragment !== null) {
|
|
551
|
-
$$.update();
|
|
552
|
-
run_all($$.before_update);
|
|
553
|
-
const dirty = $$.dirty;
|
|
554
|
-
$$.dirty = [-1];
|
|
555
|
-
$$.fragment && $$.fragment.p($$.ctx, dirty);
|
|
556
|
-
$$.after_update.forEach(add_render_callback);
|
|
557
|
-
}
|
|
558
|
-
}
|
|
559
|
-
|
|
560
|
-
let promise;
|
|
561
|
-
|
|
562
|
-
function wait() {
|
|
563
|
-
if (!promise) {
|
|
564
|
-
promise = Promise.resolve();
|
|
565
|
-
promise.then(() => {
|
|
566
|
-
promise = null;
|
|
567
|
-
});
|
|
568
|
-
}
|
|
569
|
-
|
|
570
|
-
return promise;
|
|
571
|
-
}
|
|
572
|
-
|
|
573
|
-
function dispatch(node, direction, kind) {
|
|
574
|
-
node.dispatchEvent(custom_event(`${direction ? 'intro' : 'outro'}${kind}`));
|
|
575
|
-
}
|
|
576
|
-
|
|
577
|
-
const outroing = new Set();
|
|
578
|
-
let outros;
|
|
579
|
-
|
|
580
|
-
function group_outros() {
|
|
581
|
-
outros = {
|
|
582
|
-
r: 0,
|
|
583
|
-
c: [],
|
|
584
|
-
p: outros // parent group
|
|
585
|
-
|
|
586
|
-
};
|
|
587
|
-
}
|
|
588
|
-
|
|
589
|
-
function check_outros() {
|
|
590
|
-
if (!outros.r) {
|
|
591
|
-
run_all(outros.c);
|
|
592
|
-
}
|
|
593
|
-
|
|
594
|
-
outros = outros.p;
|
|
595
|
-
}
|
|
596
|
-
|
|
597
|
-
function transition_in(block, local) {
|
|
598
|
-
if (block && block.i) {
|
|
599
|
-
outroing.delete(block);
|
|
600
|
-
block.i(local);
|
|
601
|
-
}
|
|
602
|
-
}
|
|
603
|
-
|
|
604
|
-
function transition_out(block, local, detach, callback) {
|
|
605
|
-
if (block && block.o) {
|
|
606
|
-
if (outroing.has(block)) return;
|
|
607
|
-
outroing.add(block);
|
|
608
|
-
outros.c.push(() => {
|
|
609
|
-
outroing.delete(block);
|
|
610
|
-
|
|
611
|
-
if (callback) {
|
|
612
|
-
if (detach) block.d(1);
|
|
613
|
-
callback();
|
|
614
|
-
}
|
|
615
|
-
});
|
|
616
|
-
block.o(local);
|
|
617
|
-
}
|
|
618
|
-
}
|
|
619
|
-
|
|
620
|
-
const null_transition = {
|
|
621
|
-
duration: 0
|
|
622
|
-
};
|
|
623
|
-
|
|
624
|
-
function create_in_transition(node, fn, params) {
|
|
625
|
-
let config = fn(node, params);
|
|
626
|
-
let running = false;
|
|
627
|
-
let animation_name;
|
|
628
|
-
let task;
|
|
629
|
-
let uid = 0;
|
|
630
|
-
|
|
631
|
-
function cleanup() {
|
|
632
|
-
if (animation_name) delete_rule(node, animation_name);
|
|
633
|
-
}
|
|
634
|
-
|
|
635
|
-
function go() {
|
|
636
|
-
const {
|
|
637
|
-
delay = 0,
|
|
638
|
-
duration = 300,
|
|
639
|
-
easing = identity,
|
|
640
|
-
tick = noop,
|
|
641
|
-
css
|
|
642
|
-
} = config || null_transition;
|
|
643
|
-
if (css) animation_name = create_rule(node, 0, 1, duration, delay, easing, css, uid++);
|
|
644
|
-
tick(0, 1);
|
|
645
|
-
const start_time = now() + delay;
|
|
646
|
-
const end_time = start_time + duration;
|
|
647
|
-
if (task) task.abort();
|
|
648
|
-
running = true;
|
|
649
|
-
add_render_callback(() => dispatch(node, true, 'start'));
|
|
650
|
-
task = loop(now => {
|
|
651
|
-
if (running) {
|
|
652
|
-
if (now >= end_time) {
|
|
653
|
-
tick(1, 0);
|
|
654
|
-
dispatch(node, true, 'end');
|
|
655
|
-
cleanup();
|
|
656
|
-
return running = false;
|
|
657
|
-
}
|
|
658
|
-
|
|
659
|
-
if (now >= start_time) {
|
|
660
|
-
const t = easing((now - start_time) / duration);
|
|
661
|
-
tick(t, 1 - t);
|
|
662
|
-
}
|
|
663
|
-
}
|
|
664
|
-
|
|
665
|
-
return running;
|
|
666
|
-
});
|
|
667
|
-
}
|
|
668
|
-
|
|
669
|
-
let started = false;
|
|
670
|
-
return {
|
|
671
|
-
start() {
|
|
672
|
-
if (started) return;
|
|
673
|
-
started = true;
|
|
674
|
-
delete_rule(node);
|
|
675
|
-
|
|
676
|
-
if (is_function(config)) {
|
|
677
|
-
config = config();
|
|
678
|
-
wait().then(go);
|
|
679
|
-
} else {
|
|
680
|
-
go();
|
|
681
|
-
}
|
|
682
|
-
},
|
|
683
|
-
|
|
684
|
-
invalidate() {
|
|
685
|
-
started = false;
|
|
686
|
-
},
|
|
687
|
-
|
|
688
|
-
end() {
|
|
689
|
-
if (running) {
|
|
690
|
-
cleanup();
|
|
691
|
-
running = false;
|
|
692
|
-
}
|
|
693
|
-
}
|
|
694
|
-
|
|
695
|
-
};
|
|
696
|
-
}
|
|
697
|
-
|
|
698
|
-
function create_out_transition(node, fn, params) {
|
|
699
|
-
let config = fn(node, params);
|
|
700
|
-
let running = true;
|
|
701
|
-
let animation_name;
|
|
702
|
-
const group = outros;
|
|
703
|
-
group.r += 1;
|
|
704
|
-
|
|
705
|
-
function go() {
|
|
706
|
-
const {
|
|
707
|
-
delay = 0,
|
|
708
|
-
duration = 300,
|
|
709
|
-
easing = identity,
|
|
710
|
-
tick = noop,
|
|
711
|
-
css
|
|
712
|
-
} = config || null_transition;
|
|
713
|
-
if (css) animation_name = create_rule(node, 1, 0, duration, delay, easing, css);
|
|
714
|
-
const start_time = now() + delay;
|
|
715
|
-
const end_time = start_time + duration;
|
|
716
|
-
add_render_callback(() => dispatch(node, false, 'start'));
|
|
717
|
-
loop(now => {
|
|
718
|
-
if (running) {
|
|
719
|
-
if (now >= end_time) {
|
|
720
|
-
tick(0, 1);
|
|
721
|
-
dispatch(node, false, 'end');
|
|
722
|
-
|
|
723
|
-
if (! --group.r) {
|
|
724
|
-
// this will result in `end()` being called,
|
|
725
|
-
// so we don't need to clean up here
|
|
726
|
-
run_all(group.c);
|
|
727
|
-
}
|
|
728
|
-
|
|
729
|
-
return false;
|
|
730
|
-
}
|
|
731
|
-
|
|
732
|
-
if (now >= start_time) {
|
|
733
|
-
const t = easing((now - start_time) / duration);
|
|
734
|
-
tick(1 - t, t);
|
|
735
|
-
}
|
|
736
|
-
}
|
|
737
|
-
|
|
738
|
-
return running;
|
|
739
|
-
});
|
|
740
|
-
}
|
|
741
|
-
|
|
742
|
-
if (is_function(config)) {
|
|
743
|
-
wait().then(() => {
|
|
744
|
-
// @ts-ignore
|
|
745
|
-
config = config();
|
|
746
|
-
go();
|
|
747
|
-
});
|
|
748
|
-
} else {
|
|
749
|
-
go();
|
|
750
|
-
}
|
|
751
|
-
|
|
752
|
-
return {
|
|
753
|
-
end(reset) {
|
|
754
|
-
if (reset && config.tick) {
|
|
755
|
-
config.tick(1, 0);
|
|
756
|
-
}
|
|
757
|
-
|
|
758
|
-
if (running) {
|
|
759
|
-
if (animation_name) delete_rule(node, animation_name);
|
|
760
|
-
running = false;
|
|
761
|
-
}
|
|
762
|
-
}
|
|
763
|
-
|
|
764
|
-
};
|
|
765
|
-
}
|
|
766
|
-
|
|
767
|
-
function create_component(block) {
|
|
768
|
-
block && block.c();
|
|
769
|
-
}
|
|
770
|
-
|
|
771
|
-
function mount_component(component, target, anchor, customElement) {
|
|
772
|
-
const {
|
|
773
|
-
fragment,
|
|
774
|
-
on_mount,
|
|
775
|
-
on_destroy,
|
|
776
|
-
after_update
|
|
777
|
-
} = component.$$;
|
|
778
|
-
fragment && fragment.m(target, anchor);
|
|
779
|
-
|
|
780
|
-
if (!customElement) {
|
|
781
|
-
// onMount happens before the initial afterUpdate
|
|
782
|
-
add_render_callback(() => {
|
|
783
|
-
const new_on_destroy = on_mount.map(run).filter(is_function);
|
|
784
|
-
|
|
785
|
-
if (on_destroy) {
|
|
786
|
-
on_destroy.push(...new_on_destroy);
|
|
787
|
-
} else {
|
|
788
|
-
// Edge case - component was destroyed immediately,
|
|
789
|
-
// most likely as a result of a binding initialising
|
|
790
|
-
run_all(new_on_destroy);
|
|
791
|
-
}
|
|
792
|
-
|
|
793
|
-
component.$$.on_mount = [];
|
|
794
|
-
});
|
|
795
|
-
}
|
|
796
|
-
|
|
797
|
-
after_update.forEach(add_render_callback);
|
|
798
|
-
}
|
|
799
|
-
|
|
800
|
-
function destroy_component(component, detaching) {
|
|
801
|
-
const $$ = component.$$;
|
|
802
|
-
|
|
803
|
-
if ($$.fragment !== null) {
|
|
804
|
-
run_all($$.on_destroy);
|
|
805
|
-
$$.fragment && $$.fragment.d(detaching); // TODO null out other refs, including component.$$ (but need to
|
|
806
|
-
// preserve final state?)
|
|
807
|
-
|
|
808
|
-
$$.on_destroy = $$.fragment = null;
|
|
809
|
-
$$.ctx = [];
|
|
810
|
-
}
|
|
811
|
-
}
|
|
812
|
-
|
|
813
|
-
function make_dirty(component, i) {
|
|
814
|
-
if (component.$$.dirty[0] === -1) {
|
|
815
|
-
dirty_components.push(component);
|
|
816
|
-
schedule_update();
|
|
817
|
-
component.$$.dirty.fill(0);
|
|
818
|
-
}
|
|
819
|
-
|
|
820
|
-
component.$$.dirty[i / 31 | 0] |= 1 << i % 31;
|
|
821
|
-
}
|
|
822
|
-
|
|
823
|
-
function init(component, options, instance, create_fragment, not_equal, props, append_styles, dirty = [-1]) {
|
|
824
|
-
const parent_component = current_component;
|
|
825
|
-
set_current_component(component);
|
|
826
|
-
const $$ = component.$$ = {
|
|
827
|
-
fragment: null,
|
|
828
|
-
ctx: null,
|
|
829
|
-
// state
|
|
830
|
-
props,
|
|
831
|
-
update: noop,
|
|
832
|
-
not_equal,
|
|
833
|
-
bound: {},
|
|
834
|
-
// lifecycle
|
|
835
|
-
on_mount: [],
|
|
836
|
-
on_destroy: [],
|
|
837
|
-
on_disconnect: [],
|
|
838
|
-
before_update: [],
|
|
839
|
-
after_update: [],
|
|
840
|
-
context: new Map(options.context || (parent_component ? parent_component.$$.context : [])),
|
|
841
|
-
// everything else
|
|
842
|
-
callbacks: {},
|
|
843
|
-
dirty,
|
|
844
|
-
skip_bound: false,
|
|
845
|
-
root: options.target || parent_component.$$.root
|
|
846
|
-
};
|
|
847
|
-
append_styles && append_styles($$.root);
|
|
848
|
-
let ready = false;
|
|
849
|
-
$$.ctx = instance ? instance(component, options.props || {}, (i, ret, ...rest) => {
|
|
850
|
-
const value = rest.length ? rest[0] : ret;
|
|
851
|
-
|
|
852
|
-
if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {
|
|
853
|
-
if (!$$.skip_bound && $$.bound[i]) $$.bound[i](value);
|
|
854
|
-
if (ready) make_dirty(component, i);
|
|
855
|
-
}
|
|
856
|
-
|
|
857
|
-
return ret;
|
|
858
|
-
}) : [];
|
|
859
|
-
$$.update();
|
|
860
|
-
ready = true;
|
|
861
|
-
run_all($$.before_update); // `false` as a special case of no DOM component
|
|
862
|
-
|
|
863
|
-
$$.fragment = create_fragment ? create_fragment($$.ctx) : false;
|
|
864
|
-
|
|
865
|
-
if (options.target) {
|
|
866
|
-
{
|
|
867
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
868
|
-
$$.fragment && $$.fragment.c();
|
|
869
|
-
}
|
|
870
|
-
mount_component(component, options.target, options.anchor, options.customElement);
|
|
871
|
-
flush();
|
|
872
|
-
}
|
|
873
|
-
|
|
874
|
-
set_current_component(parent_component);
|
|
875
|
-
}
|
|
876
|
-
/**
|
|
877
|
-
* Base class for Svelte components. Used when dev=false.
|
|
878
|
-
*/
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
class SvelteComponent {
|
|
882
|
-
$destroy() {
|
|
883
|
-
destroy_component(this, 1);
|
|
884
|
-
this.$destroy = noop;
|
|
885
|
-
}
|
|
886
|
-
|
|
887
|
-
$on(type, callback) {
|
|
888
|
-
const callbacks = this.$$.callbacks[type] || (this.$$.callbacks[type] = []);
|
|
889
|
-
callbacks.push(callback);
|
|
890
|
-
return () => {
|
|
891
|
-
const index = callbacks.indexOf(callback);
|
|
892
|
-
if (index !== -1) callbacks.splice(index, 1);
|
|
893
|
-
};
|
|
894
|
-
}
|
|
895
|
-
|
|
896
|
-
$set($$props) {
|
|
897
|
-
if (this.$$set && !is_empty($$props)) {
|
|
898
|
-
this.$$.skip_bound = true;
|
|
899
|
-
this.$$set($$props);
|
|
900
|
-
this.$$.skip_bound = false;
|
|
901
|
-
}
|
|
902
|
-
}
|
|
903
|
-
|
|
904
|
-
}
|
|
905
|
-
|
|
906
|
-
function cubicOut(t) {
|
|
907
|
-
const f = t - 1.0;
|
|
908
|
-
return f * f * f + 1.0;
|
|
909
|
-
}
|
|
910
|
-
|
|
911
|
-
function fly(node, {
|
|
912
|
-
delay = 0,
|
|
913
|
-
duration = 400,
|
|
914
|
-
easing = cubicOut,
|
|
915
|
-
x = 0,
|
|
916
|
-
y = 0,
|
|
917
|
-
opacity = 0
|
|
918
|
-
} = {}) {
|
|
919
|
-
const style = getComputedStyle(node);
|
|
920
|
-
const target_opacity = +style.opacity;
|
|
921
|
-
const transform = style.transform === 'none' ? '' : style.transform;
|
|
922
|
-
const od = target_opacity * (1 - opacity);
|
|
923
|
-
return {
|
|
924
|
-
delay,
|
|
925
|
-
duration,
|
|
926
|
-
easing,
|
|
927
|
-
css: (t, u) => `
|
|
928
|
-
transform: ${transform} translate(${(1 - t) * x}px, ${(1 - t) * y}px);
|
|
929
|
-
opacity: ${target_opacity - od * u}`
|
|
930
|
-
};
|
|
931
|
-
}
|
|
932
|
-
|
|
933
|
-
const subscriber_queue = [];
|
|
934
|
-
/**
|
|
935
|
-
* Create a `Writable` store that allows both updating and reading by subscription.
|
|
936
|
-
* @param {*=}value initial value
|
|
937
|
-
* @param {StartStopNotifier=}start start and stop notifications for subscriptions
|
|
938
|
-
*/
|
|
939
|
-
|
|
940
|
-
function writable(value, start = noop) {
|
|
941
|
-
let stop;
|
|
942
|
-
const subscribers = new Set();
|
|
943
|
-
|
|
944
|
-
function set(new_value) {
|
|
945
|
-
if (not_equal(value, new_value)) {
|
|
946
|
-
value = new_value;
|
|
947
|
-
|
|
948
|
-
if (stop) {
|
|
949
|
-
// store is ready
|
|
950
|
-
const run_queue = !subscriber_queue.length;
|
|
951
|
-
|
|
952
|
-
for (const subscriber of subscribers) {
|
|
953
|
-
subscriber[1]();
|
|
954
|
-
subscriber_queue.push(subscriber, value);
|
|
955
|
-
}
|
|
956
|
-
|
|
957
|
-
if (run_queue) {
|
|
958
|
-
for (let i = 0; i < subscriber_queue.length; i += 2) {
|
|
959
|
-
subscriber_queue[i][0](subscriber_queue[i + 1]);
|
|
960
|
-
}
|
|
961
|
-
|
|
962
|
-
subscriber_queue.length = 0;
|
|
963
|
-
}
|
|
964
|
-
}
|
|
965
|
-
}
|
|
966
|
-
}
|
|
967
|
-
|
|
968
|
-
function update(fn) {
|
|
969
|
-
set(fn(value));
|
|
970
|
-
}
|
|
971
|
-
|
|
972
|
-
function subscribe(run, invalidate = noop) {
|
|
973
|
-
const subscriber = [run, invalidate];
|
|
974
|
-
subscribers.add(subscriber);
|
|
975
|
-
|
|
976
|
-
if (subscribers.size === 1) {
|
|
977
|
-
stop = start(set) || noop;
|
|
978
|
-
}
|
|
979
|
-
|
|
980
|
-
run(value);
|
|
981
|
-
return () => {
|
|
982
|
-
subscribers.delete(subscriber);
|
|
983
|
-
|
|
984
|
-
if (subscribers.size === 0) {
|
|
985
|
-
stop();
|
|
986
|
-
stop = null;
|
|
987
|
-
}
|
|
988
|
-
};
|
|
989
|
-
}
|
|
990
|
-
|
|
991
|
-
return {
|
|
992
|
-
set,
|
|
993
|
-
update,
|
|
994
|
-
subscribe
|
|
995
|
-
};
|
|
996
|
-
}
|
|
997
|
-
|
|
998
|
-
function get_interpolator(a, b) {
|
|
999
|
-
if (a === b || a !== a) return () => a;
|
|
1000
|
-
const type = typeof a;
|
|
1001
|
-
|
|
1002
|
-
if (Array.isArray(a)) {
|
|
1003
|
-
const arr = b.map((bi, i) => {
|
|
1004
|
-
return get_interpolator(a[i], bi);
|
|
1005
|
-
});
|
|
1006
|
-
return t => arr.map(fn => fn(t));
|
|
1007
|
-
}
|
|
1008
|
-
|
|
1009
|
-
if (type === 'number') {
|
|
1010
|
-
const delta = b - a;
|
|
1011
|
-
return t => a + t * delta;
|
|
1012
|
-
}
|
|
1013
|
-
}
|
|
1014
|
-
|
|
1015
|
-
function tweened(value, defaults = {}) {
|
|
1016
|
-
const store = writable(value);
|
|
1017
|
-
let task;
|
|
1018
|
-
let target_value = value;
|
|
1019
|
-
|
|
1020
|
-
function set(new_value, opts) {
|
|
1021
|
-
if (value == null) {
|
|
1022
|
-
store.set(value = new_value);
|
|
1023
|
-
return Promise.resolve();
|
|
1024
|
-
}
|
|
1025
|
-
|
|
1026
|
-
target_value = new_value;
|
|
1027
|
-
let previous_task = task;
|
|
1028
|
-
let started = false;
|
|
1029
|
-
let {
|
|
1030
|
-
delay = 0,
|
|
1031
|
-
duration = 400,
|
|
1032
|
-
easing = identity,
|
|
1033
|
-
interpolate = get_interpolator
|
|
1034
|
-
} = assign(assign({}, defaults), opts);
|
|
1035
|
-
|
|
1036
|
-
if (duration === 0) {
|
|
1037
|
-
if (previous_task) {
|
|
1038
|
-
previous_task.abort();
|
|
1039
|
-
previous_task = null;
|
|
1040
|
-
}
|
|
1041
|
-
|
|
1042
|
-
store.set(value = target_value);
|
|
1043
|
-
return Promise.resolve();
|
|
1044
|
-
}
|
|
1045
|
-
|
|
1046
|
-
const start = now() + delay;
|
|
1047
|
-
let fn;
|
|
1048
|
-
task = loop(now => {
|
|
1049
|
-
if (now < start) return true;
|
|
1050
|
-
|
|
1051
|
-
if (!started) {
|
|
1052
|
-
fn = interpolate(value, new_value);
|
|
1053
|
-
if (typeof duration === 'function') duration = duration(value, new_value);
|
|
1054
|
-
started = true;
|
|
1055
|
-
}
|
|
1056
|
-
|
|
1057
|
-
if (previous_task) {
|
|
1058
|
-
previous_task.abort();
|
|
1059
|
-
previous_task = null;
|
|
1060
|
-
}
|
|
1061
|
-
|
|
1062
|
-
const elapsed = now - start;
|
|
1063
|
-
|
|
1064
|
-
if (elapsed > duration) {
|
|
1065
|
-
store.set(value = new_value);
|
|
1066
|
-
return false;
|
|
1067
|
-
} // @ts-ignore
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
store.set(value = fn(easing(elapsed / duration)));
|
|
1071
|
-
return true;
|
|
1072
|
-
});
|
|
1073
|
-
return task.promise;
|
|
1074
|
-
}
|
|
1075
|
-
|
|
1076
|
-
return {
|
|
1077
|
-
set,
|
|
1078
|
-
update: (fn, opts) => set(fn(target_value, value), opts),
|
|
1079
|
-
subscribe: store.subscribe
|
|
1080
|
-
};
|
|
1081
|
-
}
|
|
1082
|
-
/** true if gallery is in the process of closing */
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
const closing = writable(0);
|
|
1086
|
-
/** store if user prefers reduced motion */
|
|
1087
|
-
|
|
1088
|
-
const prefersReducedMotion = globalThis.matchMedia?.('(prefers-reduced-motion: reduce)').matches;
|
|
1089
|
-
/** default options for tweens / transitions */
|
|
1090
|
-
|
|
1091
|
-
const defaultTweenOptions = duration => ({
|
|
1092
|
-
easing: cubicOut,
|
|
1093
|
-
duration: prefersReducedMotion ? 0 : duration
|
|
1094
|
-
});
|
|
1095
|
-
/* src/components/loading.svelte generated by Svelte v3.47.0 */
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
function create_if_block$2(ctx) {
|
|
1099
|
-
let div;
|
|
1100
|
-
let div_intro;
|
|
1101
|
-
let div_outro;
|
|
1102
|
-
let current;
|
|
1103
|
-
let if_block = !
|
|
1104
|
-
/*$closing*/
|
|
1105
|
-
ctx[2] && create_if_block_1$2();
|
|
1106
|
-
return {
|
|
1107
|
-
c() {
|
|
1108
|
-
div = element("div");
|
|
1109
|
-
if (if_block) if_block.c();
|
|
1110
|
-
attr(div, "class", "bp-load");
|
|
1111
|
-
set_style(div, "background-image", "url(" +
|
|
1112
|
-
/*thumb*/
|
|
1113
|
-
ctx[0] + ")");
|
|
1114
|
-
},
|
|
1115
|
-
|
|
1116
|
-
m(target, anchor) {
|
|
1117
|
-
insert(target, div, anchor);
|
|
1118
|
-
if (if_block) if_block.m(div, null);
|
|
1119
|
-
current = true;
|
|
1120
|
-
},
|
|
1121
|
-
|
|
1122
|
-
p(new_ctx, dirty) {
|
|
1123
|
-
ctx = new_ctx;
|
|
1124
|
-
|
|
1125
|
-
if (!
|
|
1126
|
-
/*$closing*/
|
|
1127
|
-
ctx[2]) {
|
|
1128
|
-
if (if_block) ;else {
|
|
1129
|
-
if_block = create_if_block_1$2();
|
|
1130
|
-
if_block.c();
|
|
1131
|
-
if_block.m(div, null);
|
|
1132
|
-
}
|
|
1133
|
-
} else if (if_block) {
|
|
1134
|
-
if_block.d(1);
|
|
1135
|
-
if_block = null;
|
|
1136
|
-
}
|
|
1137
|
-
|
|
1138
|
-
if (!current || dirty &
|
|
1139
|
-
/*thumb*/
|
|
1140
|
-
1) {
|
|
1141
|
-
set_style(div, "background-image", "url(" +
|
|
1142
|
-
/*thumb*/
|
|
1143
|
-
ctx[0] + ")");
|
|
1144
|
-
}
|
|
1145
|
-
},
|
|
1146
|
-
|
|
1147
|
-
i(local) {
|
|
1148
|
-
if (current) return;
|
|
1149
|
-
add_render_callback(() => {
|
|
1150
|
-
if (div_outro) div_outro.end(1);
|
|
1151
|
-
div_intro = create_in_transition(div, fly, {
|
|
1152
|
-
duration:
|
|
1153
|
-
/*loaded*/
|
|
1154
|
-
ctx[1] ? 400 : 0
|
|
1155
|
-
});
|
|
1156
|
-
div_intro.start();
|
|
1157
|
-
});
|
|
1158
|
-
current = true;
|
|
1159
|
-
},
|
|
1160
|
-
|
|
1161
|
-
o(local) {
|
|
1162
|
-
if (div_intro) div_intro.invalidate();
|
|
1163
|
-
|
|
1164
|
-
if (local) {
|
|
1165
|
-
div_outro = create_out_transition(div, fly, {
|
|
1166
|
-
duration: 480
|
|
1167
|
-
});
|
|
1168
|
-
}
|
|
1169
|
-
|
|
1170
|
-
current = false;
|
|
1171
|
-
},
|
|
1172
|
-
|
|
1173
|
-
d(detaching) {
|
|
1174
|
-
if (detaching) detach(div);
|
|
1175
|
-
if (if_block) if_block.d();
|
|
1176
|
-
if (detaching && div_outro) div_outro.end();
|
|
1177
|
-
}
|
|
1178
|
-
|
|
1179
|
-
};
|
|
1180
|
-
} // (12:2) {#if !$closing}
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
function create_if_block_1$2(ctx) {
|
|
1184
|
-
let span0;
|
|
1185
|
-
let span1;
|
|
1186
|
-
return {
|
|
1187
|
-
c() {
|
|
1188
|
-
span0 = element("span");
|
|
1189
|
-
span1 = element("span");
|
|
1190
|
-
attr(span0, "class", "bp-bar");
|
|
1191
|
-
attr(span1, "class", "bp-o");
|
|
1192
|
-
},
|
|
1193
|
-
|
|
1194
|
-
m(target, anchor) {
|
|
1195
|
-
insert(target, span0, anchor);
|
|
1196
|
-
insert(target, span1, anchor);
|
|
1197
|
-
},
|
|
1198
|
-
|
|
1199
|
-
d(detaching) {
|
|
1200
|
-
if (detaching) detach(span0);
|
|
1201
|
-
if (detaching) detach(span1);
|
|
1202
|
-
}
|
|
1203
|
-
|
|
1204
|
-
};
|
|
1205
|
-
}
|
|
1206
|
-
|
|
1207
|
-
function create_fragment$4(ctx) {
|
|
1208
|
-
let if_block_anchor;
|
|
1209
|
-
let if_block = (!
|
|
1210
|
-
/*loaded*/
|
|
1211
|
-
ctx[1] ||
|
|
1212
|
-
/*$closing*/
|
|
1213
|
-
ctx[2]) && create_if_block$2(ctx);
|
|
1214
|
-
return {
|
|
1215
|
-
c() {
|
|
1216
|
-
if (if_block) if_block.c();
|
|
1217
|
-
if_block_anchor = empty();
|
|
1218
|
-
},
|
|
1219
|
-
|
|
1220
|
-
m(target, anchor) {
|
|
1221
|
-
if (if_block) if_block.m(target, anchor);
|
|
1222
|
-
insert(target, if_block_anchor, anchor);
|
|
1223
|
-
},
|
|
1224
|
-
|
|
1225
|
-
p(ctx, [dirty]) {
|
|
1226
|
-
if (!
|
|
1227
|
-
/*loaded*/
|
|
1228
|
-
ctx[1] ||
|
|
1229
|
-
/*$closing*/
|
|
1230
|
-
ctx[2]) {
|
|
1231
|
-
if (if_block) {
|
|
1232
|
-
if_block.p(ctx, dirty);
|
|
1233
|
-
|
|
1234
|
-
if (dirty &
|
|
1235
|
-
/*loaded, $closing*/
|
|
1236
|
-
6) {
|
|
1237
|
-
transition_in(if_block, 1);
|
|
1238
|
-
}
|
|
1239
|
-
} else {
|
|
1240
|
-
if_block = create_if_block$2(ctx);
|
|
1241
|
-
if_block.c();
|
|
1242
|
-
transition_in(if_block, 1);
|
|
1243
|
-
if_block.m(if_block_anchor.parentNode, if_block_anchor);
|
|
1244
|
-
}
|
|
1245
|
-
} else if (if_block) {
|
|
1246
|
-
group_outros();
|
|
1247
|
-
transition_out(if_block, 1, 1, () => {
|
|
1248
|
-
if_block = null;
|
|
1249
|
-
});
|
|
1250
|
-
check_outros();
|
|
1251
|
-
}
|
|
1252
|
-
},
|
|
1253
|
-
|
|
1254
|
-
i(local) {
|
|
1255
|
-
transition_in(if_block);
|
|
1256
|
-
},
|
|
1257
|
-
|
|
1258
|
-
o(local) {
|
|
1259
|
-
transition_out(if_block);
|
|
1260
|
-
},
|
|
1261
|
-
|
|
1262
|
-
d(detaching) {
|
|
1263
|
-
if (if_block) if_block.d(detaching);
|
|
1264
|
-
if (detaching) detach(if_block_anchor);
|
|
1265
|
-
}
|
|
1266
|
-
|
|
1267
|
-
};
|
|
1268
|
-
}
|
|
1269
|
-
|
|
1270
|
-
function instance$4($$self, $$props, $$invalidate) {
|
|
1271
|
-
let $closing;
|
|
1272
|
-
component_subscribe($$self, closing, $$value => $$invalidate(2, $closing = $$value));
|
|
1273
|
-
let {
|
|
1274
|
-
thumb
|
|
1275
|
-
} = $$props;
|
|
1276
|
-
let {
|
|
1277
|
-
loaded
|
|
1278
|
-
} = $$props;
|
|
1279
|
-
|
|
1280
|
-
$$self.$$set = $$props => {
|
|
1281
|
-
if ('thumb' in $$props) $$invalidate(0, thumb = $$props.thumb);
|
|
1282
|
-
if ('loaded' in $$props) $$invalidate(1, loaded = $$props.loaded);
|
|
1283
|
-
};
|
|
1284
|
-
|
|
1285
|
-
return [thumb, loaded, $closing];
|
|
1286
|
-
}
|
|
1287
|
-
|
|
1288
|
-
class Loading extends SvelteComponent {
|
|
1289
|
-
constructor(options) {
|
|
1290
|
-
super();
|
|
1291
|
-
init(this, options, instance$4, create_fragment$4, not_equal, {
|
|
1292
|
-
thumb: 0,
|
|
1293
|
-
loaded: 1
|
|
1294
|
-
});
|
|
1295
|
-
}
|
|
1296
|
-
|
|
1297
|
-
}
|
|
1298
|
-
/* src/components/image.svelte generated by Svelte v3.47.0 */
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
function create_if_block_1$1(ctx) {
|
|
1302
|
-
let img;
|
|
1303
|
-
let img_srcset_value;
|
|
1304
|
-
let img_sizes_value;
|
|
1305
|
-
let img_alt_value;
|
|
1306
|
-
let img_outro;
|
|
1307
|
-
let current;
|
|
1308
|
-
return {
|
|
1309
|
-
c() {
|
|
1310
|
-
img = element("img");
|
|
1311
|
-
attr(img, "srcset", img_srcset_value =
|
|
1312
|
-
/*activeItem*/
|
|
1313
|
-
ctx[7].img);
|
|
1314
|
-
attr(img, "sizes", img_sizes_value =
|
|
1315
|
-
/*opts*/
|
|
1316
|
-
ctx[8].sizes || `${
|
|
1317
|
-
/*sizes*/
|
|
1318
|
-
ctx[1]}px`);
|
|
1319
|
-
attr(img, "alt", img_alt_value =
|
|
1320
|
-
/*activeItem*/
|
|
1321
|
-
ctx[7].alt);
|
|
1322
|
-
},
|
|
1323
|
-
|
|
1324
|
-
m(target, anchor) {
|
|
1325
|
-
insert(target, img, anchor);
|
|
1326
|
-
current = true;
|
|
1327
|
-
},
|
|
1328
|
-
|
|
1329
|
-
p(ctx, dirty) {
|
|
1330
|
-
if (!current || dirty[0] &
|
|
1331
|
-
/*sizes*/
|
|
1332
|
-
2 && img_sizes_value !== (img_sizes_value =
|
|
1333
|
-
/*opts*/
|
|
1334
|
-
ctx[8].sizes || `${
|
|
1335
|
-
/*sizes*/
|
|
1336
|
-
ctx[1]}px`)) {
|
|
1337
|
-
attr(img, "sizes", img_sizes_value);
|
|
1338
|
-
}
|
|
1339
|
-
},
|
|
1340
|
-
|
|
1341
|
-
i(local) {
|
|
1342
|
-
if (current) return;
|
|
1343
|
-
if (img_outro) img_outro.end(1);
|
|
1344
|
-
current = true;
|
|
1345
|
-
},
|
|
1346
|
-
|
|
1347
|
-
o(local) {
|
|
1348
|
-
img_outro = create_out_transition(img, fly, {});
|
|
1349
|
-
current = false;
|
|
1350
|
-
},
|
|
1351
|
-
|
|
1352
|
-
d(detaching) {
|
|
1353
|
-
if (detaching) detach(img);
|
|
1354
|
-
if (detaching && img_outro) img_outro.end();
|
|
1355
|
-
}
|
|
1356
|
-
|
|
1357
|
-
};
|
|
1358
|
-
} // (367:10) {#if showLoader}
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
function create_if_block$1(ctx) {
|
|
1362
|
-
let loading;
|
|
1363
|
-
let current;
|
|
1364
|
-
loading = new Loading({
|
|
1365
|
-
props: {
|
|
1366
|
-
thumb:
|
|
1367
|
-
/*activeItem*/
|
|
1368
|
-
ctx[7].thumb,
|
|
1369
|
-
loaded:
|
|
1370
|
-
/*loaded*/
|
|
1371
|
-
ctx[2]
|
|
1372
|
-
}
|
|
1373
|
-
});
|
|
1374
|
-
return {
|
|
1375
|
-
c() {
|
|
1376
|
-
create_component(loading.$$.fragment);
|
|
1377
|
-
},
|
|
1378
|
-
|
|
1379
|
-
m(target, anchor) {
|
|
1380
|
-
mount_component(loading, target, anchor);
|
|
1381
|
-
current = true;
|
|
1382
|
-
},
|
|
1383
|
-
|
|
1384
|
-
p(ctx, dirty) {
|
|
1385
|
-
const loading_changes = {};
|
|
1386
|
-
if (dirty[0] &
|
|
1387
|
-
/*loaded*/
|
|
1388
|
-
4) loading_changes.loaded =
|
|
1389
|
-
/*loaded*/
|
|
1390
|
-
ctx[2];
|
|
1391
|
-
loading.$set(loading_changes);
|
|
1392
|
-
},
|
|
1393
|
-
|
|
1394
|
-
i(local) {
|
|
1395
|
-
if (current) return;
|
|
1396
|
-
transition_in(loading.$$.fragment, local);
|
|
1397
|
-
current = true;
|
|
1398
|
-
},
|
|
1399
|
-
|
|
1400
|
-
o(local) {
|
|
1401
|
-
transition_out(loading.$$.fragment, local);
|
|
1402
|
-
current = false;
|
|
1403
|
-
},
|
|
1404
|
-
|
|
1405
|
-
d(detaching) {
|
|
1406
|
-
destroy_component(loading, detaching);
|
|
1407
|
-
}
|
|
1408
|
-
|
|
1409
|
-
};
|
|
1410
|
-
}
|
|
1411
|
-
|
|
1412
|
-
function create_fragment$3(ctx) {
|
|
1413
|
-
let div1;
|
|
1414
|
-
let div0;
|
|
1415
|
-
let if_block0_anchor;
|
|
1416
|
-
let current;
|
|
1417
|
-
let mounted;
|
|
1418
|
-
let dispose;
|
|
1419
|
-
let if_block0 =
|
|
1420
|
-
/*loaded*/
|
|
1421
|
-
ctx[2] && create_if_block_1$1(ctx);
|
|
1422
|
-
let if_block1 =
|
|
1423
|
-
/*showLoader*/
|
|
1424
|
-
ctx[3] && create_if_block$1(ctx);
|
|
1425
|
-
return {
|
|
1426
|
-
c() {
|
|
1427
|
-
div1 = element("div");
|
|
1428
|
-
div0 = element("div");
|
|
1429
|
-
if (if_block0) if_block0.c();
|
|
1430
|
-
if_block0_anchor = empty();
|
|
1431
|
-
if (if_block1) if_block1.c();
|
|
1432
|
-
attr(div0, "class", "bp-img");
|
|
1433
|
-
set_style(div0, "background-image", "url(" +
|
|
1434
|
-
/*activeItem*/
|
|
1435
|
-
ctx[7].thumb + ")");
|
|
1436
|
-
set_style(div0, "width",
|
|
1437
|
-
/*$imageDimensions*/
|
|
1438
|
-
ctx[0][0] + "px");
|
|
1439
|
-
set_style(div0, "height",
|
|
1440
|
-
/*$imageDimensions*/
|
|
1441
|
-
ctx[0][1] + "px");
|
|
1442
|
-
set_style(div0, "transform", "translate3d(" + (
|
|
1443
|
-
/*$imageDimensions*/
|
|
1444
|
-
ctx[0][0] / -2 +
|
|
1445
|
-
/*$zoomDragTranslate*/
|
|
1446
|
-
ctx[6][0]) + "px, " + (
|
|
1447
|
-
/*$imageDimensions*/
|
|
1448
|
-
ctx[0][1] / -2 +
|
|
1449
|
-
/*$zoomDragTranslate*/
|
|
1450
|
-
ctx[6][1]) + "px, 0)");
|
|
1451
|
-
attr(div1, "class", "bp-img-wrap");
|
|
1452
|
-
toggle_class(div1, "bp-drag",
|
|
1453
|
-
/*pointerDown*/
|
|
1454
|
-
ctx[4]);
|
|
1455
|
-
toggle_class(div1, "bp-close",
|
|
1456
|
-
/*closingWhileZoomed*/
|
|
1457
|
-
ctx[5]);
|
|
1458
|
-
},
|
|
1459
|
-
|
|
1460
|
-
m(target, anchor) {
|
|
1461
|
-
insert(target, div1, anchor);
|
|
1462
|
-
append(div1, div0);
|
|
1463
|
-
if (if_block0) if_block0.m(div0, null);
|
|
1464
|
-
append(div0, if_block0_anchor);
|
|
1465
|
-
if (if_block1) if_block1.m(div0, null);
|
|
1466
|
-
current = true;
|
|
1467
|
-
|
|
1468
|
-
if (!mounted) {
|
|
1469
|
-
dispose = [action_destroyer(
|
|
1470
|
-
/*onMount*/
|
|
1471
|
-
ctx[17].call(null, div0)), listen(div1, "wheel",
|
|
1472
|
-
/*onWheel*/
|
|
1473
|
-
ctx[12]), listen(div1, "pointerdown",
|
|
1474
|
-
/*onPointerDown*/
|
|
1475
|
-
ctx[13]), listen(div1, "pointermove",
|
|
1476
|
-
/*onPointerMove*/
|
|
1477
|
-
ctx[14]), listen(div1, "pointerup",
|
|
1478
|
-
/*onPointerUp*/
|
|
1479
|
-
ctx[16]), listen(div1, "pointercancel",
|
|
1480
|
-
/*removeEventFromCache*/
|
|
1481
|
-
ctx[15])];
|
|
1482
|
-
mounted = true;
|
|
1483
|
-
}
|
|
1484
|
-
},
|
|
1485
|
-
|
|
1486
|
-
p(ctx, dirty) {
|
|
1487
|
-
if (
|
|
1488
|
-
/*loaded*/
|
|
1489
|
-
ctx[2]) {
|
|
1490
|
-
if (if_block0) {
|
|
1491
|
-
if_block0.p(ctx, dirty);
|
|
1492
|
-
|
|
1493
|
-
if (dirty[0] &
|
|
1494
|
-
/*loaded*/
|
|
1495
|
-
4) {
|
|
1496
|
-
transition_in(if_block0, 1);
|
|
1497
|
-
}
|
|
1498
|
-
} else {
|
|
1499
|
-
if_block0 = create_if_block_1$1(ctx);
|
|
1500
|
-
if_block0.c();
|
|
1501
|
-
transition_in(if_block0, 1);
|
|
1502
|
-
if_block0.m(div0, if_block0_anchor);
|
|
1503
|
-
}
|
|
1504
|
-
} else if (if_block0) {
|
|
1505
|
-
group_outros();
|
|
1506
|
-
transition_out(if_block0, 1, 1, () => {
|
|
1507
|
-
if_block0 = null;
|
|
1508
|
-
});
|
|
1509
|
-
check_outros();
|
|
1510
|
-
}
|
|
1511
|
-
|
|
1512
|
-
if (
|
|
1513
|
-
/*showLoader*/
|
|
1514
|
-
ctx[3]) {
|
|
1515
|
-
if (if_block1) {
|
|
1516
|
-
if_block1.p(ctx, dirty);
|
|
1517
|
-
|
|
1518
|
-
if (dirty[0] &
|
|
1519
|
-
/*showLoader*/
|
|
1520
|
-
8) {
|
|
1521
|
-
transition_in(if_block1, 1);
|
|
1522
|
-
}
|
|
1523
|
-
} else {
|
|
1524
|
-
if_block1 = create_if_block$1(ctx);
|
|
1525
|
-
if_block1.c();
|
|
1526
|
-
transition_in(if_block1, 1);
|
|
1527
|
-
if_block1.m(div0, null);
|
|
1528
|
-
}
|
|
1529
|
-
} else if (if_block1) {
|
|
1530
|
-
group_outros();
|
|
1531
|
-
transition_out(if_block1, 1, 1, () => {
|
|
1532
|
-
if_block1 = null;
|
|
1533
|
-
});
|
|
1534
|
-
check_outros();
|
|
1535
|
-
}
|
|
1536
|
-
|
|
1537
|
-
if (!current || dirty[0] &
|
|
1538
|
-
/*$imageDimensions*/
|
|
1539
|
-
1) {
|
|
1540
|
-
set_style(div0, "width",
|
|
1541
|
-
/*$imageDimensions*/
|
|
1542
|
-
ctx[0][0] + "px");
|
|
1543
|
-
}
|
|
1544
|
-
|
|
1545
|
-
if (!current || dirty[0] &
|
|
1546
|
-
/*$imageDimensions*/
|
|
1547
|
-
1) {
|
|
1548
|
-
set_style(div0, "height",
|
|
1549
|
-
/*$imageDimensions*/
|
|
1550
|
-
ctx[0][1] + "px");
|
|
1551
|
-
}
|
|
1552
|
-
|
|
1553
|
-
if (!current || dirty[0] &
|
|
1554
|
-
/*$imageDimensions, $zoomDragTranslate*/
|
|
1555
|
-
65) {
|
|
1556
|
-
set_style(div0, "transform", "translate3d(" + (
|
|
1557
|
-
/*$imageDimensions*/
|
|
1558
|
-
ctx[0][0] / -2 +
|
|
1559
|
-
/*$zoomDragTranslate*/
|
|
1560
|
-
ctx[6][0]) + "px, " + (
|
|
1561
|
-
/*$imageDimensions*/
|
|
1562
|
-
ctx[0][1] / -2 +
|
|
1563
|
-
/*$zoomDragTranslate*/
|
|
1564
|
-
ctx[6][1]) + "px, 0)");
|
|
1565
|
-
}
|
|
1566
|
-
|
|
1567
|
-
if (dirty[0] &
|
|
1568
|
-
/*pointerDown*/
|
|
1569
|
-
16) {
|
|
1570
|
-
toggle_class(div1, "bp-drag",
|
|
1571
|
-
/*pointerDown*/
|
|
1572
|
-
ctx[4]);
|
|
1573
|
-
}
|
|
1574
|
-
|
|
1575
|
-
if (dirty[0] &
|
|
1576
|
-
/*closingWhileZoomed*/
|
|
1577
|
-
32) {
|
|
1578
|
-
toggle_class(div1, "bp-close",
|
|
1579
|
-
/*closingWhileZoomed*/
|
|
1580
|
-
ctx[5]);
|
|
1581
|
-
}
|
|
1582
|
-
},
|
|
1583
|
-
|
|
1584
|
-
i(local) {
|
|
1585
|
-
if (current) return;
|
|
1586
|
-
transition_in(if_block0);
|
|
1587
|
-
transition_in(if_block1);
|
|
1588
|
-
current = true;
|
|
1589
|
-
},
|
|
1590
|
-
|
|
1591
|
-
o(local) {
|
|
1592
|
-
transition_out(if_block0);
|
|
1593
|
-
transition_out(if_block1);
|
|
1594
|
-
current = false;
|
|
1595
|
-
},
|
|
1596
|
-
|
|
1597
|
-
d(detaching) {
|
|
1598
|
-
if (detaching) detach(div1);
|
|
1599
|
-
if (if_block0) if_block0.d();
|
|
1600
|
-
if (if_block1) if_block1.d();
|
|
1601
|
-
mounted = false;
|
|
1602
|
-
run_all(dispose);
|
|
1603
|
-
}
|
|
1604
|
-
|
|
1605
|
-
};
|
|
1606
|
-
}
|
|
1607
|
-
|
|
1608
|
-
function instance$3($$self, $$props, $$invalidate) {
|
|
1609
|
-
let $zoomed;
|
|
1610
|
-
let $zoomDragTranslate;
|
|
1611
|
-
let $closing;
|
|
1612
|
-
let $imageDimensions;
|
|
1613
|
-
component_subscribe($$self, closing, $$value => $$invalidate(22, $closing = $$value));
|
|
1614
|
-
let {
|
|
1615
|
-
props
|
|
1616
|
-
} = $$props;
|
|
1617
|
-
let {
|
|
1618
|
-
smallScreen
|
|
1619
|
-
} = $$props;
|
|
1620
|
-
let {
|
|
1621
|
-
activeItem,
|
|
1622
|
-
opts,
|
|
1623
|
-
prev,
|
|
1624
|
-
next,
|
|
1625
|
-
zoomed,
|
|
1626
|
-
container
|
|
1627
|
-
} = props;
|
|
1628
|
-
component_subscribe($$self, zoomed, value => $$invalidate(21, $zoomed = value));
|
|
1629
|
-
let maxZoom = activeItem.maxZoom || opts.maxZoom || 10;
|
|
1630
|
-
let calculatedDimensions = props.calculateDimensions(activeItem);
|
|
1631
|
-
/** value of sizes attribute */
|
|
1632
|
-
|
|
1633
|
-
let sizes = calculatedDimensions[0];
|
|
1634
|
-
/** tracks load state of image */
|
|
1635
|
-
|
|
1636
|
-
let loaded, showLoader;
|
|
1637
|
-
/** stores pinch info if multiple touch events active */
|
|
1638
|
-
|
|
1639
|
-
let pinchDetails;
|
|
1640
|
-
/** image html element (.bp-img) */
|
|
1641
|
-
|
|
1642
|
-
let bpImg;
|
|
1643
|
-
/** track distance for pinch events */
|
|
1644
|
-
|
|
1645
|
-
let prevDiff = 0;
|
|
1646
|
-
let pointerDown, hasDragged;
|
|
1647
|
-
let dragStartX, dragStartY;
|
|
1648
|
-
/** zoomDragTranslate values on start of drag */
|
|
1649
|
-
|
|
1650
|
-
let dragStartTranslateX, dragStartTranslateY;
|
|
1651
|
-
/** if true, adds class to .bp-wrap to avoid image cropping */
|
|
1652
|
-
|
|
1653
|
-
let closingWhileZoomed;
|
|
1654
|
-
const naturalWidth = +activeItem.width;
|
|
1655
|
-
/** store positions for drag inertia */
|
|
1656
|
-
|
|
1657
|
-
const dragPositions = [];
|
|
1658
|
-
/** cache pointer events to handle pinch */
|
|
1659
|
-
|
|
1660
|
-
const pointerCache = new Map();
|
|
1661
|
-
/** tween to control image size */
|
|
1662
|
-
|
|
1663
|
-
const imageDimensions = tweened(calculatedDimensions, defaultTweenOptions(400));
|
|
1664
|
-
component_subscribe($$self, imageDimensions, value => $$invalidate(0, $imageDimensions = value));
|
|
1665
|
-
/** translate transform for pointerDown */
|
|
1666
|
-
|
|
1667
|
-
const zoomDragTranslate = tweened([0, 0], defaultTweenOptions(400));
|
|
1668
|
-
component_subscribe($$self, zoomDragTranslate, value => $$invalidate(6, $zoomDragTranslate = value));
|
|
1669
|
-
/** calculate translate position with bounds */
|
|
1670
|
-
|
|
1671
|
-
const boundTranslateValues = ([x, y], newDimensions = $imageDimensions) => {
|
|
1672
|
-
// image drag translate bounds
|
|
1673
|
-
const maxTranslateX = (newDimensions[0] - container.w) / 2;
|
|
1674
|
-
const maxTranslateY = (newDimensions[1] - container.h) / 2; // x max drag
|
|
1675
|
-
|
|
1676
|
-
if (maxTranslateX < 0) {
|
|
1677
|
-
x = 0;
|
|
1678
|
-
} else if (x > maxTranslateX) {
|
|
1679
|
-
if (smallScreen) {
|
|
1680
|
-
// bound to left side (allow slight over drag)
|
|
1681
|
-
x = pointerDown ? maxTranslateX + (x - maxTranslateX) / 10 : maxTranslateX; // previous item if dragged past threshold
|
|
1682
|
-
|
|
1683
|
-
if (x > maxTranslateX + 20) {
|
|
1684
|
-
// pointerdown = undefined to stop pointermove from running again
|
|
1685
|
-
$$invalidate(4, pointerDown = prev());
|
|
1686
|
-
}
|
|
1687
|
-
} else {
|
|
1688
|
-
x = maxTranslateX;
|
|
1689
|
-
}
|
|
1690
|
-
} else if (x < -maxTranslateX) {
|
|
1691
|
-
// bound to right side (allow slight over drag)
|
|
1692
|
-
if (smallScreen) {
|
|
1693
|
-
x = pointerDown ? -maxTranslateX - (-maxTranslateX - x) / 10 : -maxTranslateX; // next item if dragged past threshold
|
|
1694
|
-
|
|
1695
|
-
if (x < -maxTranslateX - 20) {
|
|
1696
|
-
// pointerdown = undefined to stop pointermove from running again
|
|
1697
|
-
$$invalidate(4, pointerDown = next());
|
|
1698
|
-
}
|
|
1699
|
-
} else {
|
|
1700
|
-
x = -maxTranslateX;
|
|
1701
|
-
}
|
|
1702
|
-
} // y max drag
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
if (maxTranslateY < 0) {
|
|
1706
|
-
y = 0;
|
|
1707
|
-
} else if (y > maxTranslateY) {
|
|
1708
|
-
y = maxTranslateY;
|
|
1709
|
-
} else if (y < -maxTranslateY) {
|
|
1710
|
-
y = -maxTranslateY;
|
|
1711
|
-
}
|
|
1712
|
-
|
|
1713
|
-
return [x, y];
|
|
1714
|
-
};
|
|
1715
|
-
/** updates zoom level in or out based on amt value */
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
const changeZoom = (e, amt = maxZoom) => {
|
|
1719
|
-
if ($closing) {
|
|
1720
|
-
return;
|
|
1721
|
-
}
|
|
1722
|
-
|
|
1723
|
-
const maxWidth = calculatedDimensions[0] * maxZoom;
|
|
1724
|
-
const [currentImageWidth, currentImageHeight] = $imageDimensions;
|
|
1725
|
-
let newWidth = currentImageWidth + currentImageWidth * amt;
|
|
1726
|
-
let newHeight = currentImageHeight + currentImageHeight * amt;
|
|
1727
|
-
|
|
1728
|
-
if (amt > 0) {
|
|
1729
|
-
if (newWidth > maxWidth) {
|
|
1730
|
-
// requesting size large than max zoom
|
|
1731
|
-
newWidth = maxWidth;
|
|
1732
|
-
newHeight = calculatedDimensions[1] * maxZoom;
|
|
1733
|
-
}
|
|
1734
|
-
|
|
1735
|
-
if (newWidth > naturalWidth) {
|
|
1736
|
-
// if requesting zoom larger than natural size
|
|
1737
|
-
newWidth = naturalWidth;
|
|
1738
|
-
newHeight = +activeItem.height;
|
|
1739
|
-
}
|
|
1740
|
-
} else if (newWidth < calculatedDimensions[0]) {
|
|
1741
|
-
// if requesting image smaller than starting size
|
|
1742
|
-
imageDimensions.set(calculatedDimensions);
|
|
1743
|
-
return zoomDragTranslate.set([0, 0]);
|
|
1744
|
-
}
|
|
1745
|
-
|
|
1746
|
-
let {
|
|
1747
|
-
x,
|
|
1748
|
-
y,
|
|
1749
|
-
width,
|
|
1750
|
-
height
|
|
1751
|
-
} = bpImg.getBoundingClientRect(); // distance clicked from center of image
|
|
1752
|
-
|
|
1753
|
-
const offsetX = e.clientX - x - width / 2;
|
|
1754
|
-
const offsetY = e.clientY - y - height / 2;
|
|
1755
|
-
x = -offsetX * (newWidth / width) + offsetX;
|
|
1756
|
-
y = -offsetY * (newHeight / height) + offsetY;
|
|
1757
|
-
const newDimensions = [newWidth, newHeight]; // set new dimensions and update sizes property
|
|
1758
|
-
|
|
1759
|
-
imageDimensions.set(newDimensions).then(() => {
|
|
1760
|
-
$$invalidate(1, sizes = Math.round(Math.max(sizes, newWidth)));
|
|
1761
|
-
}); // update translate value
|
|
1762
|
-
|
|
1763
|
-
zoomDragTranslate.set(boundTranslateValues([$zoomDragTranslate[0] + x, $zoomDragTranslate[1] + y], newDimensions));
|
|
1764
|
-
};
|
|
1765
|
-
|
|
1766
|
-
const onWheel = e => {
|
|
1767
|
-
// return if scrolling past inline gallery w/ wheel
|
|
1768
|
-
if (opts.inline && !$zoomed) {
|
|
1769
|
-
return;
|
|
1770
|
-
} // preventDefault to stop scrolling on zoomed inline image
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
e.preventDefault(); // change zoom on wheel
|
|
1774
|
-
|
|
1775
|
-
changeZoom(e, e.deltaY / -300);
|
|
1776
|
-
};
|
|
1777
|
-
/** on drag start, store initial position and image translate values */
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
const onPointerDown = e => {
|
|
1781
|
-
// don't run if right click
|
|
1782
|
-
if (e.button !== 2) {
|
|
1783
|
-
e.preventDefault();
|
|
1784
|
-
$$invalidate(4, pointerDown = true);
|
|
1785
|
-
pointerCache.set(e.pointerId, e);
|
|
1786
|
-
dragStartX = e.clientX;
|
|
1787
|
-
dragStartY = e.clientY;
|
|
1788
|
-
dragStartTranslateX = $zoomDragTranslate[0];
|
|
1789
|
-
dragStartTranslateY = $zoomDragTranslate[1];
|
|
1790
|
-
}
|
|
1791
|
-
};
|
|
1792
|
-
/** on drag, update image translate val */
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
const onPointerMove = e => {
|
|
1796
|
-
if (pointerCache.size > 1) {
|
|
1797
|
-
// if multiple pointer events, pass to handlePinch function
|
|
1798
|
-
$$invalidate(4, pointerDown = false);
|
|
1799
|
-
return opts.noPinch?.(container.el) || handlePinch(e);
|
|
1800
|
-
}
|
|
1801
|
-
|
|
1802
|
-
if (!pointerDown) {
|
|
1803
|
-
return;
|
|
1804
|
-
}
|
|
1805
|
-
|
|
1806
|
-
let x = e.clientX;
|
|
1807
|
-
let y = e.clientY; // store positions in dragPositions for inertia
|
|
1808
|
-
// set hasDragged if > 2 pointer move events
|
|
1809
|
-
|
|
1810
|
-
hasDragged = dragPositions.push({
|
|
1811
|
-
x,
|
|
1812
|
-
y
|
|
1813
|
-
}) > 2; // overall drag diff from start location
|
|
1814
|
-
|
|
1815
|
-
x = x - dragStartX;
|
|
1816
|
-
y = y - dragStartY; // handle unzoomed left / right / up swipes
|
|
1817
|
-
|
|
1818
|
-
if (!$zoomed) {
|
|
1819
|
-
// close if swipe up
|
|
1820
|
-
if (y < -90) {
|
|
1821
|
-
$$invalidate(4, pointerDown = !opts.noClose && props.close());
|
|
1822
|
-
} // only handle left / right if not swiping vertically
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
if (Math.abs(y) < 30) {
|
|
1826
|
-
// previous if swipe left
|
|
1827
|
-
if (x > 40) {
|
|
1828
|
-
// pointerdown = undefined to stop pointermove from running again
|
|
1829
|
-
$$invalidate(4, pointerDown = prev());
|
|
1830
|
-
} // next if swipe right
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
if (x < -40) {
|
|
1834
|
-
// pointerdown = undefined to stop pointermove from running again
|
|
1835
|
-
$$invalidate(4, pointerDown = next());
|
|
1836
|
-
}
|
|
1837
|
-
}
|
|
1838
|
-
} // image drag when zoomed
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
if ($zoomed && hasDragged && !$closing) {
|
|
1842
|
-
zoomDragTranslate.set(boundTranslateValues([dragStartTranslateX + x, dragStartTranslateY + y]), {
|
|
1843
|
-
duration: 0
|
|
1844
|
-
});
|
|
1845
|
-
}
|
|
1846
|
-
};
|
|
1847
|
-
|
|
1848
|
-
const handlePinch = e => {
|
|
1849
|
-
// update event in cache and get values
|
|
1850
|
-
const [p1, p2] = pointerCache.set(e.pointerId, e).values(); // Calculate the distance between the two pointers
|
|
1851
|
-
|
|
1852
|
-
const dx = p1.clientX - p2.clientX;
|
|
1853
|
-
const dy = p1.clientY - p2.clientY;
|
|
1854
|
-
const curDiff = Math.hypot(dx, dy); // cache the original pinch center
|
|
1855
|
-
|
|
1856
|
-
pinchDetails = pinchDetails || {
|
|
1857
|
-
clientX: (p1.clientX + p2.clientX) / 2,
|
|
1858
|
-
clientY: (p1.clientY + p2.clientY) / 2
|
|
1859
|
-
}; // scale image
|
|
1860
|
-
|
|
1861
|
-
changeZoom(pinchDetails, ((prevDiff || curDiff) - curDiff) / -35); // Cache the distance for the next move event
|
|
1862
|
-
|
|
1863
|
-
prevDiff = curDiff;
|
|
1864
|
-
};
|
|
1865
|
-
/** remove event from pointer event cache */
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
const removeEventFromCache = e => pointerCache.delete(e.pointerId);
|
|
1869
|
-
|
|
1870
|
-
function onPointerUp(e) {
|
|
1871
|
-
removeEventFromCache(e);
|
|
1872
|
-
|
|
1873
|
-
if (pinchDetails) {
|
|
1874
|
-
// reset prevDiff and clear pointerDown to trigger return below
|
|
1875
|
-
$$invalidate(4, pointerDown = prevDiff = 0); // set pinchDetails to null after last finger lifts
|
|
1876
|
-
|
|
1877
|
-
pinchDetails = pointerCache.size ? pinchDetails : null;
|
|
1878
|
-
} // make sure pointer events don't carry over to next image
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
if (!pointerDown) {
|
|
1882
|
-
return;
|
|
1883
|
-
}
|
|
1884
|
-
|
|
1885
|
-
$$invalidate(4, pointerDown = false); // close if overlay is clicked
|
|
1886
|
-
|
|
1887
|
-
if (e.target === this && !opts.noClose) {
|
|
1888
|
-
return props.close();
|
|
1889
|
-
} // add drag inertia / snap back to bounds
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
if (hasDragged) {
|
|
1893
|
-
const [posOne, posTwo, posThree] = dragPositions.slice(-3);
|
|
1894
|
-
const xDiff = posTwo.x - posThree.x;
|
|
1895
|
-
const yDiff = posTwo.y - posThree.y;
|
|
1896
|
-
|
|
1897
|
-
if (Math.hypot(xDiff, yDiff) > 5) {
|
|
1898
|
-
zoomDragTranslate.set(boundTranslateValues([$zoomDragTranslate[0] - (posOne.x - posThree.x) * 5, $zoomDragTranslate[1] - (posOne.y - posThree.y) * 5]));
|
|
1899
|
-
}
|
|
1900
|
-
} else if (!opts.onImageClick?.(container.el, activeItem)) {
|
|
1901
|
-
changeZoom(e, $zoomed ? -maxZoom : maxZoom);
|
|
1902
|
-
} // reset pointer states
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
hasDragged = false; // reset dragPositions
|
|
1906
|
-
|
|
1907
|
-
dragPositions.length = 0;
|
|
1908
|
-
}
|
|
1909
|
-
|
|
1910
|
-
const onMount = node => {
|
|
1911
|
-
bpImg = node; // handle globalThis resize
|
|
1912
|
-
|
|
1913
|
-
props.setResizeFunc(() => {
|
|
1914
|
-
$$invalidate(20, calculatedDimensions = props.calculateDimensions(activeItem)); // adjust image size / zoom on resize, but not on mobile because
|
|
1915
|
-
// some browsers (ios safari 15) constantly resize screen on drag
|
|
1916
|
-
|
|
1917
|
-
if (opts.inline || !smallScreen) {
|
|
1918
|
-
imageDimensions.set(calculatedDimensions);
|
|
1919
|
-
zoomDragTranslate.set([0, 0]);
|
|
1920
|
-
}
|
|
1921
|
-
}); // decode initial image before rendering
|
|
1922
|
-
|
|
1923
|
-
props.loadImage(activeItem).then(() => {
|
|
1924
|
-
$$invalidate(2, loaded = true);
|
|
1925
|
-
props.preloadNext();
|
|
1926
|
-
}); // show loading indicator if needed
|
|
1927
|
-
|
|
1928
|
-
setTimeout(() => {
|
|
1929
|
-
$$invalidate(3, showLoader = !loaded);
|
|
1930
|
-
}, 250);
|
|
1931
|
-
};
|
|
1932
|
-
|
|
1933
|
-
$$self.$$set = $$props => {
|
|
1934
|
-
if ('smallScreen' in $$props) $$invalidate(19, smallScreen = $$props.smallScreen);
|
|
1935
|
-
};
|
|
1936
|
-
|
|
1937
|
-
$$self.$$.update = () => {
|
|
1938
|
-
if ($$self.$$.dirty[0] &
|
|
1939
|
-
/*$imageDimensions, calculatedDimensions*/
|
|
1940
|
-
1048577) {
|
|
1941
|
-
zoomed.set($imageDimensions[0] - 10 > calculatedDimensions[0]);
|
|
1942
|
-
}
|
|
1943
|
-
|
|
1944
|
-
if ($$self.$$.dirty[0] &
|
|
1945
|
-
/*$closing, $zoomed, calculatedDimensions*/
|
|
1946
|
-
7340032) {
|
|
1947
|
-
// if zoomed while closing, zoom out image and add class
|
|
1948
|
-
// to change contain value on .bp-wrap to avoid cropping
|
|
1949
|
-
if ($closing && $zoomed && !opts.intro) {
|
|
1950
|
-
const closeTweenOpts = defaultTweenOptions(480);
|
|
1951
|
-
zoomDragTranslate.set([0, 0], closeTweenOpts);
|
|
1952
|
-
imageDimensions.set(calculatedDimensions, closeTweenOpts);
|
|
1953
|
-
$$invalidate(5, closingWhileZoomed = true);
|
|
1954
|
-
}
|
|
1955
|
-
}
|
|
1956
|
-
};
|
|
1957
|
-
|
|
1958
|
-
return [$imageDimensions, sizes, loaded, showLoader, pointerDown, closingWhileZoomed, $zoomDragTranslate, activeItem, opts, zoomed, imageDimensions, zoomDragTranslate, onWheel, onPointerDown, onPointerMove, removeEventFromCache, onPointerUp, onMount, props, smallScreen, calculatedDimensions, $zoomed, $closing];
|
|
1959
|
-
}
|
|
1960
|
-
|
|
1961
|
-
class Image extends SvelteComponent {
|
|
1962
|
-
constructor(options) {
|
|
1963
|
-
super();
|
|
1964
|
-
init(this, options, instance$3, create_fragment$3, not_equal, {
|
|
1965
|
-
props: 18,
|
|
1966
|
-
smallScreen: 19
|
|
1967
|
-
}, null, [-1, -1]);
|
|
1968
|
-
}
|
|
1969
|
-
|
|
1970
|
-
}
|
|
1971
|
-
/* src/components/iframe.svelte generated by Svelte v3.47.0 */
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
function create_fragment$2(ctx) {
|
|
1975
|
-
let div;
|
|
1976
|
-
let iframe;
|
|
1977
|
-
let loading;
|
|
1978
|
-
let current;
|
|
1979
|
-
let mounted;
|
|
1980
|
-
let dispose;
|
|
1981
|
-
loading = new Loading({
|
|
1982
|
-
props: {
|
|
1983
|
-
thumb:
|
|
1984
|
-
/*activeItem*/
|
|
1985
|
-
ctx[2].thumb,
|
|
1986
|
-
loaded:
|
|
1987
|
-
/*loaded*/
|
|
1988
|
-
ctx[0]
|
|
1989
|
-
}
|
|
1990
|
-
});
|
|
1991
|
-
return {
|
|
1992
|
-
c() {
|
|
1993
|
-
div = element("div");
|
|
1994
|
-
iframe = element("iframe");
|
|
1995
|
-
create_component(loading.$$.fragment);
|
|
1996
|
-
attr(iframe, "allow", "autoplay; fullscreen");
|
|
1997
|
-
attr(iframe, "title",
|
|
1998
|
-
/*activeItem*/
|
|
1999
|
-
ctx[2].title);
|
|
2000
|
-
attr(div, "class", "bp-if");
|
|
2001
|
-
set_style(div, "width",
|
|
2002
|
-
/*dimensions*/
|
|
2003
|
-
ctx[1][0] + "px");
|
|
2004
|
-
set_style(div, "height",
|
|
2005
|
-
/*dimensions*/
|
|
2006
|
-
ctx[1][1] + "px");
|
|
2007
|
-
},
|
|
2008
|
-
|
|
2009
|
-
m(target, anchor) {
|
|
2010
|
-
insert(target, div, anchor);
|
|
2011
|
-
append(div, iframe);
|
|
2012
|
-
mount_component(loading, div, null);
|
|
2013
|
-
current = true;
|
|
2014
|
-
|
|
2015
|
-
if (!mounted) {
|
|
2016
|
-
dispose = [action_destroyer(
|
|
2017
|
-
/*addSrc*/
|
|
2018
|
-
ctx[3].call(null, iframe)), listen(iframe, "load",
|
|
2019
|
-
/*load_handler*/
|
|
2020
|
-
ctx[5])];
|
|
2021
|
-
mounted = true;
|
|
2022
|
-
}
|
|
2023
|
-
},
|
|
2024
|
-
|
|
2025
|
-
p(ctx, [dirty]) {
|
|
2026
|
-
const loading_changes = {};
|
|
2027
|
-
if (dirty &
|
|
2028
|
-
/*loaded*/
|
|
2029
|
-
1) loading_changes.loaded =
|
|
2030
|
-
/*loaded*/
|
|
2031
|
-
ctx[0];
|
|
2032
|
-
loading.$set(loading_changes);
|
|
2033
|
-
|
|
2034
|
-
if (!current || dirty &
|
|
2035
|
-
/*dimensions*/
|
|
2036
|
-
2) {
|
|
2037
|
-
set_style(div, "width",
|
|
2038
|
-
/*dimensions*/
|
|
2039
|
-
ctx[1][0] + "px");
|
|
2040
|
-
}
|
|
2041
|
-
|
|
2042
|
-
if (!current || dirty &
|
|
2043
|
-
/*dimensions*/
|
|
2044
|
-
2) {
|
|
2045
|
-
set_style(div, "height",
|
|
2046
|
-
/*dimensions*/
|
|
2047
|
-
ctx[1][1] + "px");
|
|
2048
|
-
}
|
|
2049
|
-
},
|
|
2050
|
-
|
|
2051
|
-
i(local) {
|
|
2052
|
-
if (current) return;
|
|
2053
|
-
transition_in(loading.$$.fragment, local);
|
|
2054
|
-
current = true;
|
|
2055
|
-
},
|
|
2056
|
-
|
|
2057
|
-
o(local) {
|
|
2058
|
-
transition_out(loading.$$.fragment, local);
|
|
2059
|
-
current = false;
|
|
2060
|
-
},
|
|
2061
|
-
|
|
2062
|
-
d(detaching) {
|
|
2063
|
-
if (detaching) detach(div);
|
|
2064
|
-
destroy_component(loading);
|
|
2065
|
-
mounted = false;
|
|
2066
|
-
run_all(dispose);
|
|
2067
|
-
}
|
|
2068
|
-
|
|
2069
|
-
};
|
|
2070
|
-
}
|
|
2071
|
-
|
|
2072
|
-
function instance$2($$self, $$props, $$invalidate) {
|
|
2073
|
-
let {
|
|
2074
|
-
props
|
|
2075
|
-
} = $$props;
|
|
2076
|
-
let loaded, dimensions;
|
|
2077
|
-
const {
|
|
2078
|
-
activeItem
|
|
2079
|
-
} = props;
|
|
2080
|
-
|
|
2081
|
-
const setDimensions = () => $$invalidate(1, dimensions = props.calculateDimensions(activeItem));
|
|
2082
|
-
|
|
2083
|
-
setDimensions();
|
|
2084
|
-
props.setResizeFunc(setDimensions); // add src ourselves to avoid src_url_equal call (svelte stuff)
|
|
2085
|
-
|
|
2086
|
-
const addSrc = node => node.src = activeItem.iframe;
|
|
2087
|
-
|
|
2088
|
-
const load_handler = () => $$invalidate(0, loaded = true);
|
|
2089
|
-
|
|
2090
|
-
return [loaded, dimensions, activeItem, addSrc, props, load_handler];
|
|
2091
|
-
}
|
|
2092
|
-
|
|
2093
|
-
class Iframe extends SvelteComponent {
|
|
2094
|
-
constructor(options) {
|
|
2095
|
-
super();
|
|
2096
|
-
init(this, options, instance$2, create_fragment$2, not_equal, {
|
|
2097
|
-
props: 4
|
|
2098
|
-
});
|
|
2099
|
-
}
|
|
2100
|
-
|
|
2101
|
-
}
|
|
2102
|
-
/* src/components/video.svelte generated by Svelte v3.47.0 */
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
function create_fragment$1(ctx) {
|
|
2106
|
-
let div;
|
|
2107
|
-
let loading;
|
|
2108
|
-
let current;
|
|
2109
|
-
let mounted;
|
|
2110
|
-
let dispose;
|
|
2111
|
-
loading = new Loading({
|
|
2112
|
-
props: {
|
|
2113
|
-
thumb:
|
|
2114
|
-
/*activeItem*/
|
|
2115
|
-
ctx[2].thumb,
|
|
2116
|
-
loaded:
|
|
2117
|
-
/*loaded*/
|
|
2118
|
-
ctx[0]
|
|
2119
|
-
}
|
|
2120
|
-
});
|
|
2121
|
-
return {
|
|
2122
|
-
c() {
|
|
2123
|
-
div = element("div");
|
|
2124
|
-
create_component(loading.$$.fragment);
|
|
2125
|
-
attr(div, "class", "bp-vid");
|
|
2126
|
-
set_style(div, "width",
|
|
2127
|
-
/*dimensions*/
|
|
2128
|
-
ctx[1][0] + "px");
|
|
2129
|
-
set_style(div, "height",
|
|
2130
|
-
/*dimensions*/
|
|
2131
|
-
ctx[1][1] + "px");
|
|
2132
|
-
set_style(div, "background-image", "url(" +
|
|
2133
|
-
/*activeItem*/
|
|
2134
|
-
ctx[2].thumb + ")");
|
|
2135
|
-
},
|
|
2136
|
-
|
|
2137
|
-
m(target, anchor) {
|
|
2138
|
-
insert(target, div, anchor);
|
|
2139
|
-
mount_component(loading, div, null);
|
|
2140
|
-
current = true;
|
|
2141
|
-
|
|
2142
|
-
if (!mounted) {
|
|
2143
|
-
dispose = action_destroyer(
|
|
2144
|
-
/*onMount*/
|
|
2145
|
-
ctx[3].call(null, div));
|
|
2146
|
-
mounted = true;
|
|
2147
|
-
}
|
|
2148
|
-
},
|
|
2149
|
-
|
|
2150
|
-
p(ctx, [dirty]) {
|
|
2151
|
-
const loading_changes = {};
|
|
2152
|
-
if (dirty &
|
|
2153
|
-
/*loaded*/
|
|
2154
|
-
1) loading_changes.loaded =
|
|
2155
|
-
/*loaded*/
|
|
2156
|
-
ctx[0];
|
|
2157
|
-
loading.$set(loading_changes);
|
|
2158
|
-
|
|
2159
|
-
if (!current || dirty &
|
|
2160
|
-
/*dimensions*/
|
|
2161
|
-
2) {
|
|
2162
|
-
set_style(div, "width",
|
|
2163
|
-
/*dimensions*/
|
|
2164
|
-
ctx[1][0] + "px");
|
|
2165
|
-
}
|
|
2166
|
-
|
|
2167
|
-
if (!current || dirty &
|
|
2168
|
-
/*dimensions*/
|
|
2169
|
-
2) {
|
|
2170
|
-
set_style(div, "height",
|
|
2171
|
-
/*dimensions*/
|
|
2172
|
-
ctx[1][1] + "px");
|
|
2173
|
-
}
|
|
2174
|
-
},
|
|
2175
|
-
|
|
2176
|
-
i(local) {
|
|
2177
|
-
if (current) return;
|
|
2178
|
-
transition_in(loading.$$.fragment, local);
|
|
2179
|
-
current = true;
|
|
2180
|
-
},
|
|
2181
|
-
|
|
2182
|
-
o(local) {
|
|
2183
|
-
transition_out(loading.$$.fragment, local);
|
|
2184
|
-
current = false;
|
|
2185
|
-
},
|
|
2186
|
-
|
|
2187
|
-
d(detaching) {
|
|
2188
|
-
if (detaching) detach(div);
|
|
2189
|
-
destroy_component(loading);
|
|
2190
|
-
mounted = false;
|
|
2191
|
-
dispose();
|
|
2192
|
-
}
|
|
2193
|
-
|
|
2194
|
-
};
|
|
2195
|
-
}
|
|
2196
|
-
|
|
2197
|
-
function instance$1($$self, $$props, $$invalidate) {
|
|
2198
|
-
let {
|
|
2199
|
-
props
|
|
2200
|
-
} = $$props;
|
|
2201
|
-
let loaded, dimensions;
|
|
2202
|
-
const {
|
|
2203
|
-
activeItem
|
|
2204
|
-
} = props;
|
|
2205
|
-
|
|
2206
|
-
const setDimensions = () => $$invalidate(1, dimensions = props.calculateDimensions(activeItem));
|
|
2207
|
-
|
|
2208
|
-
setDimensions();
|
|
2209
|
-
props.setResizeFunc(setDimensions);
|
|
2210
|
-
/** adds attributes to a node */
|
|
2211
|
-
|
|
2212
|
-
const addAttributes = (node, obj) => {
|
|
2213
|
-
for (const key in obj) {
|
|
2214
|
-
attr(node, key, obj[key]);
|
|
2215
|
-
}
|
|
2216
|
-
};
|
|
2217
|
-
/** create audo / video element */
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
const onMount = node => {
|
|
2221
|
-
let mediaElement;
|
|
2222
|
-
/** takes supplied object and creates elements in video */
|
|
2223
|
-
|
|
2224
|
-
const appendToVideo = (tag, arr) => {
|
|
2225
|
-
if (!Array.isArray(arr)) {
|
|
2226
|
-
arr = JSON.parse(arr);
|
|
2227
|
-
}
|
|
2228
|
-
|
|
2229
|
-
for (const obj of arr) {
|
|
2230
|
-
// create media element if it doesn't exist
|
|
2231
|
-
if (!mediaElement) {
|
|
2232
|
-
mediaElement = element(obj.type?.includes('audio') ? 'audio' : 'video');
|
|
2233
|
-
addAttributes(mediaElement, {
|
|
2234
|
-
controls: true,
|
|
2235
|
-
autoplay: true,
|
|
2236
|
-
playsinline: true,
|
|
2237
|
-
tabindex: '0'
|
|
2238
|
-
});
|
|
2239
|
-
} // add sources / tracks to media element
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
const el = element(tag);
|
|
2243
|
-
addAttributes(el, obj);
|
|
2244
|
-
append(mediaElement, el);
|
|
2245
|
-
}
|
|
2246
|
-
};
|
|
2247
|
-
|
|
2248
|
-
appendToVideo('source', activeItem.sources);
|
|
2249
|
-
appendToVideo('track', activeItem.tracks || []);
|
|
2250
|
-
listen(mediaElement, 'canplay', () => $$invalidate(0, loaded = true));
|
|
2251
|
-
append(node, mediaElement);
|
|
2252
|
-
};
|
|
2253
|
-
|
|
2254
|
-
return [loaded, dimensions, activeItem, onMount, props];
|
|
2255
|
-
}
|
|
2256
|
-
|
|
2257
|
-
class Video extends SvelteComponent {
|
|
2258
|
-
constructor(options) {
|
|
2259
|
-
super();
|
|
2260
|
-
init(this, options, instance$1, create_fragment$1, not_equal, {
|
|
2261
|
-
props: 4
|
|
2262
|
-
});
|
|
2263
|
-
}
|
|
2264
|
-
|
|
2265
|
-
}
|
|
2266
|
-
/* src/bigger-picture.svelte generated by Svelte v3.47.0 */
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
function create_if_block(ctx) {
|
|
2270
|
-
let div2;
|
|
2271
|
-
let div0;
|
|
2272
|
-
let div0_outro;
|
|
2273
|
-
let previous_key =
|
|
2274
|
-
/*activeItem*/
|
|
2275
|
-
ctx[6].i;
|
|
2276
|
-
let div1;
|
|
2277
|
-
let button;
|
|
2278
|
-
let div1_outro;
|
|
2279
|
-
let containerActions_action;
|
|
2280
|
-
let current;
|
|
2281
|
-
let mounted;
|
|
2282
|
-
let dispose;
|
|
2283
|
-
let key_block = create_key_block(ctx);
|
|
2284
|
-
let if_block =
|
|
2285
|
-
/*items*/
|
|
2286
|
-
ctx[0].length > 1 && create_if_block_1(ctx);
|
|
2287
|
-
return {
|
|
2288
|
-
c() {
|
|
2289
|
-
div2 = element("div");
|
|
2290
|
-
div0 = element("div");
|
|
2291
|
-
key_block.c();
|
|
2292
|
-
div1 = element("div");
|
|
2293
|
-
button = element("button");
|
|
2294
|
-
if (if_block) if_block.c();
|
|
2295
|
-
attr(button, "class", "bp-x");
|
|
2296
|
-
attr(button, "title", "Close");
|
|
2297
|
-
attr(button, "aria-label", "Close");
|
|
2298
|
-
attr(div1, "class", "bp-controls");
|
|
2299
|
-
attr(div2, "class", "bp-wrap");
|
|
2300
|
-
toggle_class(div2, "bp-zoomed",
|
|
2301
|
-
/*$zoomed*/
|
|
2302
|
-
ctx[10]);
|
|
2303
|
-
toggle_class(div2, "bp-inline",
|
|
2304
|
-
/*inline*/
|
|
2305
|
-
ctx[8]);
|
|
2306
|
-
toggle_class(div2, "bp-small",
|
|
2307
|
-
/*smallScreen*/
|
|
2308
|
-
ctx[7]);
|
|
2309
|
-
toggle_class(div2, "bp-noclose",
|
|
2310
|
-
/*opts*/
|
|
2311
|
-
ctx[5].noClose);
|
|
2312
|
-
},
|
|
2313
|
-
|
|
2314
|
-
m(target, anchor) {
|
|
2315
|
-
insert(target, div2, anchor);
|
|
2316
|
-
append(div2, div0);
|
|
2317
|
-
key_block.m(div2, null);
|
|
2318
|
-
append(div2, div1);
|
|
2319
|
-
append(div1, button);
|
|
2320
|
-
if (if_block) if_block.m(div1, null);
|
|
2321
|
-
current = true;
|
|
2322
|
-
|
|
2323
|
-
if (!mounted) {
|
|
2324
|
-
dispose = [listen(button, "click",
|
|
2325
|
-
/*close*/
|
|
2326
|
-
ctx[1]), action_destroyer(containerActions_action =
|
|
2327
|
-
/*containerActions*/
|
|
2328
|
-
ctx[14].call(null, div2))];
|
|
2329
|
-
mounted = true;
|
|
2330
|
-
}
|
|
2331
|
-
},
|
|
2332
|
-
|
|
2333
|
-
p(ctx, dirty) {
|
|
2334
|
-
if (dirty[0] &
|
|
2335
|
-
/*activeItem*/
|
|
2336
|
-
64 && not_equal(previous_key, previous_key =
|
|
2337
|
-
/*activeItem*/
|
|
2338
|
-
ctx[6].i)) {
|
|
2339
|
-
group_outros();
|
|
2340
|
-
transition_out(key_block, 1, 1, noop);
|
|
2341
|
-
check_outros();
|
|
2342
|
-
key_block = create_key_block(ctx);
|
|
2343
|
-
key_block.c();
|
|
2344
|
-
transition_in(key_block);
|
|
2345
|
-
key_block.m(div2, div1);
|
|
2346
|
-
} else {
|
|
2347
|
-
key_block.p(ctx, dirty);
|
|
2348
|
-
}
|
|
2349
|
-
|
|
2350
|
-
if (
|
|
2351
|
-
/*items*/
|
|
2352
|
-
ctx[0].length > 1) {
|
|
2353
|
-
if (if_block) {
|
|
2354
|
-
if_block.p(ctx, dirty);
|
|
2355
|
-
} else {
|
|
2356
|
-
if_block = create_if_block_1(ctx);
|
|
2357
|
-
if_block.c();
|
|
2358
|
-
if_block.m(div1, null);
|
|
2359
|
-
}
|
|
2360
|
-
} else if (if_block) {
|
|
2361
|
-
if_block.d(1);
|
|
2362
|
-
if_block = null;
|
|
2363
|
-
}
|
|
2364
|
-
|
|
2365
|
-
if (dirty[0] &
|
|
2366
|
-
/*$zoomed*/
|
|
2367
|
-
1024) {
|
|
2368
|
-
toggle_class(div2, "bp-zoomed",
|
|
2369
|
-
/*$zoomed*/
|
|
2370
|
-
ctx[10]);
|
|
2371
|
-
}
|
|
2372
|
-
|
|
2373
|
-
if (dirty[0] &
|
|
2374
|
-
/*inline*/
|
|
2375
|
-
256) {
|
|
2376
|
-
toggle_class(div2, "bp-inline",
|
|
2377
|
-
/*inline*/
|
|
2378
|
-
ctx[8]);
|
|
2379
|
-
}
|
|
2380
|
-
|
|
2381
|
-
if (dirty[0] &
|
|
2382
|
-
/*smallScreen*/
|
|
2383
|
-
128) {
|
|
2384
|
-
toggle_class(div2, "bp-small",
|
|
2385
|
-
/*smallScreen*/
|
|
2386
|
-
ctx[7]);
|
|
2387
|
-
}
|
|
2388
|
-
|
|
2389
|
-
if (dirty[0] &
|
|
2390
|
-
/*opts*/
|
|
2391
|
-
32) {
|
|
2392
|
-
toggle_class(div2, "bp-noclose",
|
|
2393
|
-
/*opts*/
|
|
2394
|
-
ctx[5].noClose);
|
|
2395
|
-
}
|
|
2396
|
-
},
|
|
2397
|
-
|
|
2398
|
-
i(local) {
|
|
2399
|
-
if (current) return;
|
|
2400
|
-
if (div0_outro) div0_outro.end(1);
|
|
2401
|
-
transition_in(key_block);
|
|
2402
|
-
if (div1_outro) div1_outro.end(1);
|
|
2403
|
-
current = true;
|
|
2404
|
-
},
|
|
2405
|
-
|
|
2406
|
-
o(local) {
|
|
2407
|
-
div0_outro = create_out_transition(div0, fly, {
|
|
2408
|
-
duration: 480
|
|
2409
|
-
});
|
|
2410
|
-
transition_out(key_block);
|
|
2411
|
-
div1_outro = create_out_transition(div1, fly, {});
|
|
2412
|
-
current = false;
|
|
2413
|
-
},
|
|
2414
|
-
|
|
2415
|
-
d(detaching) {
|
|
2416
|
-
if (detaching) detach(div2);
|
|
2417
|
-
if (detaching && div0_outro) div0_outro.end();
|
|
2418
|
-
key_block.d(detaching);
|
|
2419
|
-
if (if_block) if_block.d();
|
|
2420
|
-
if (detaching && div1_outro) div1_outro.end();
|
|
2421
|
-
mounted = false;
|
|
2422
|
-
run_all(dispose);
|
|
2423
|
-
}
|
|
2424
|
-
|
|
2425
|
-
};
|
|
2426
|
-
} // (319:199) {:else}
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
function create_else_block(ctx) {
|
|
2430
|
-
let div;
|
|
2431
|
-
let raw_value =
|
|
2432
|
-
/*activeItem*/
|
|
2433
|
-
ctx[6].html + "";
|
|
2434
|
-
return {
|
|
2435
|
-
c() {
|
|
2436
|
-
div = element("div");
|
|
2437
|
-
attr(div, "class", "bp-html");
|
|
2438
|
-
},
|
|
2439
|
-
|
|
2440
|
-
m(target, anchor) {
|
|
2441
|
-
insert(target, div, anchor);
|
|
2442
|
-
div.innerHTML = raw_value;
|
|
2443
|
-
},
|
|
2444
|
-
|
|
2445
|
-
p(ctx, dirty) {
|
|
2446
|
-
if (dirty[0] &
|
|
2447
|
-
/*activeItem*/
|
|
2448
|
-
64 && raw_value !== (raw_value =
|
|
2449
|
-
/*activeItem*/
|
|
2450
|
-
ctx[6].html + "")) div.innerHTML = raw_value;
|
|
2451
|
-
},
|
|
2452
|
-
|
|
2453
|
-
i: noop,
|
|
2454
|
-
o: noop,
|
|
2455
|
-
|
|
2456
|
-
d(detaching) {
|
|
2457
|
-
if (detaching) detach(div);
|
|
2458
|
-
}
|
|
2459
|
-
|
|
2460
|
-
};
|
|
2461
|
-
} // (319:165)
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
function create_if_block_5(ctx) {
|
|
2465
|
-
let iframe;
|
|
2466
|
-
let current;
|
|
2467
|
-
iframe = new Iframe({
|
|
2468
|
-
props: {
|
|
2469
|
-
props:
|
|
2470
|
-
/*getChildProps*/
|
|
2471
|
-
ctx[13]()
|
|
2472
|
-
}
|
|
2473
|
-
});
|
|
2474
|
-
return {
|
|
2475
|
-
c() {
|
|
2476
|
-
create_component(iframe.$$.fragment);
|
|
2477
|
-
},
|
|
2478
|
-
|
|
2479
|
-
m(target, anchor) {
|
|
2480
|
-
mount_component(iframe, target, anchor);
|
|
2481
|
-
current = true;
|
|
2482
|
-
},
|
|
2483
|
-
|
|
2484
|
-
p: noop,
|
|
2485
|
-
|
|
2486
|
-
i(local) {
|
|
2487
|
-
if (current) return;
|
|
2488
|
-
transition_in(iframe.$$.fragment, local);
|
|
2489
|
-
current = true;
|
|
2490
|
-
},
|
|
2491
|
-
|
|
2492
|
-
o(local) {
|
|
2493
|
-
transition_out(iframe.$$.fragment, local);
|
|
2494
|
-
current = false;
|
|
2495
|
-
},
|
|
2496
|
-
|
|
2497
|
-
d(detaching) {
|
|
2498
|
-
destroy_component(iframe, detaching);
|
|
2499
|
-
}
|
|
2500
|
-
|
|
2501
|
-
};
|
|
2502
|
-
} // (319:104)
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
function create_if_block_4(ctx) {
|
|
2506
|
-
let video;
|
|
2507
|
-
let current;
|
|
2508
|
-
video = new Video({
|
|
2509
|
-
props: {
|
|
2510
|
-
props:
|
|
2511
|
-
/*getChildProps*/
|
|
2512
|
-
ctx[13]()
|
|
2513
|
-
}
|
|
2514
|
-
});
|
|
2515
|
-
return {
|
|
2516
|
-
c() {
|
|
2517
|
-
create_component(video.$$.fragment);
|
|
2518
|
-
},
|
|
2519
|
-
|
|
2520
|
-
m(target, anchor) {
|
|
2521
|
-
mount_component(video, target, anchor);
|
|
2522
|
-
current = true;
|
|
2523
|
-
},
|
|
2524
|
-
|
|
2525
|
-
p: noop,
|
|
2526
|
-
|
|
2527
|
-
i(local) {
|
|
2528
|
-
if (current) return;
|
|
2529
|
-
transition_in(video.$$.fragment, local);
|
|
2530
|
-
current = true;
|
|
2531
|
-
},
|
|
2532
|
-
|
|
2533
|
-
o(local) {
|
|
2534
|
-
transition_out(video.$$.fragment, local);
|
|
2535
|
-
current = false;
|
|
2536
|
-
},
|
|
2537
|
-
|
|
2538
|
-
d(detaching) {
|
|
2539
|
-
destroy_component(video, detaching);
|
|
2540
|
-
}
|
|
2541
|
-
|
|
2542
|
-
};
|
|
2543
|
-
} // (319:4) {#if activeItem.img}
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
function create_if_block_3(ctx) {
|
|
2547
|
-
let imageitem;
|
|
2548
|
-
let current;
|
|
2549
|
-
imageitem = new Image({
|
|
2550
|
-
props: {
|
|
2551
|
-
props:
|
|
2552
|
-
/*getChildProps*/
|
|
2553
|
-
ctx[13](),
|
|
2554
|
-
smallScreen:
|
|
2555
|
-
/*smallScreen*/
|
|
2556
|
-
ctx[7]
|
|
2557
|
-
}
|
|
2558
|
-
});
|
|
2559
|
-
return {
|
|
2560
|
-
c() {
|
|
2561
|
-
create_component(imageitem.$$.fragment);
|
|
2562
|
-
},
|
|
2563
|
-
|
|
2564
|
-
m(target, anchor) {
|
|
2565
|
-
mount_component(imageitem, target, anchor);
|
|
2566
|
-
current = true;
|
|
2567
|
-
},
|
|
2568
|
-
|
|
2569
|
-
p(ctx, dirty) {
|
|
2570
|
-
const imageitem_changes = {};
|
|
2571
|
-
if (dirty[0] &
|
|
2572
|
-
/*smallScreen*/
|
|
2573
|
-
128) imageitem_changes.smallScreen =
|
|
2574
|
-
/*smallScreen*/
|
|
2575
|
-
ctx[7];
|
|
2576
|
-
imageitem.$set(imageitem_changes);
|
|
2577
|
-
},
|
|
2578
|
-
|
|
2579
|
-
i(local) {
|
|
2580
|
-
if (current) return;
|
|
2581
|
-
transition_in(imageitem.$$.fragment, local);
|
|
2582
|
-
current = true;
|
|
2583
|
-
},
|
|
2584
|
-
|
|
2585
|
-
o(local) {
|
|
2586
|
-
transition_out(imageitem.$$.fragment, local);
|
|
2587
|
-
current = false;
|
|
2588
|
-
},
|
|
2589
|
-
|
|
2590
|
-
d(detaching) {
|
|
2591
|
-
destroy_component(imageitem, detaching);
|
|
2592
|
-
}
|
|
2593
|
-
|
|
2594
|
-
};
|
|
2595
|
-
} // (319:267) {#if activeItem.caption}
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
function create_if_block_2(ctx) {
|
|
2599
|
-
let div;
|
|
2600
|
-
let raw_value =
|
|
2601
|
-
/*activeItem*/
|
|
2602
|
-
ctx[6].caption + "";
|
|
2603
|
-
let div_outro;
|
|
2604
|
-
let current;
|
|
2605
|
-
return {
|
|
2606
|
-
c() {
|
|
2607
|
-
div = element("div");
|
|
2608
|
-
attr(div, "class", "bp-cap");
|
|
2609
|
-
attr(div, "tabindex", "0");
|
|
2610
|
-
},
|
|
2611
|
-
|
|
2612
|
-
m(target, anchor) {
|
|
2613
|
-
insert(target, div, anchor);
|
|
2614
|
-
div.innerHTML = raw_value;
|
|
2615
|
-
current = true;
|
|
2616
|
-
},
|
|
2617
|
-
|
|
2618
|
-
p(ctx, dirty) {
|
|
2619
|
-
if ((!current || dirty[0] &
|
|
2620
|
-
/*activeItem*/
|
|
2621
|
-
64) && raw_value !== (raw_value =
|
|
2622
|
-
/*activeItem*/
|
|
2623
|
-
ctx[6].caption + "")) div.innerHTML = raw_value;
|
|
2624
|
-
},
|
|
2625
|
-
|
|
2626
|
-
i(local) {
|
|
2627
|
-
if (current) return;
|
|
2628
|
-
if (div_outro) div_outro.end(1);
|
|
2629
|
-
current = true;
|
|
2630
|
-
},
|
|
2631
|
-
|
|
2632
|
-
o(local) {
|
|
2633
|
-
div_outro = create_out_transition(div, fly, {
|
|
2634
|
-
duration: 200
|
|
2635
|
-
});
|
|
2636
|
-
current = false;
|
|
2637
|
-
},
|
|
2638
|
-
|
|
2639
|
-
d(detaching) {
|
|
2640
|
-
if (detaching) detach(div);
|
|
2641
|
-
if (detaching && div_outro) div_outro.end();
|
|
2642
|
-
}
|
|
2643
|
-
|
|
2644
|
-
};
|
|
2645
|
-
} // (308:37) {#key activeItem.i}
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
function create_key_block(ctx) {
|
|
2649
|
-
let div;
|
|
2650
|
-
let current_block_type_index;
|
|
2651
|
-
let if_block0;
|
|
2652
|
-
let div_intro;
|
|
2653
|
-
let div_outro;
|
|
2654
|
-
let if_block1_anchor;
|
|
2655
|
-
let current;
|
|
2656
|
-
let mounted;
|
|
2657
|
-
let dispose;
|
|
2658
|
-
const if_block_creators = [create_if_block_3, create_if_block_4, create_if_block_5, create_else_block];
|
|
2659
|
-
const if_blocks = [];
|
|
2660
|
-
|
|
2661
|
-
function select_block_type(ctx, dirty) {
|
|
2662
|
-
if (
|
|
2663
|
-
/*activeItem*/
|
|
2664
|
-
ctx[6].img) return 0;
|
|
2665
|
-
if (
|
|
2666
|
-
/*activeItem*/
|
|
2667
|
-
ctx[6].sources) return 1;
|
|
2668
|
-
if (
|
|
2669
|
-
/*activeItem*/
|
|
2670
|
-
ctx[6].iframe) return 2;
|
|
2671
|
-
return 3;
|
|
2672
|
-
}
|
|
2673
|
-
|
|
2674
|
-
current_block_type_index = select_block_type(ctx);
|
|
2675
|
-
if_block0 = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
|
|
2676
|
-
let if_block1 =
|
|
2677
|
-
/*activeItem*/
|
|
2678
|
-
ctx[6].caption && create_if_block_2(ctx);
|
|
2679
|
-
return {
|
|
2680
|
-
c() {
|
|
2681
|
-
div = element("div");
|
|
2682
|
-
if_block0.c();
|
|
2683
|
-
if (if_block1) if_block1.c();
|
|
2684
|
-
if_block1_anchor = empty();
|
|
2685
|
-
attr(div, "class", "bp-inner");
|
|
2686
|
-
},
|
|
2687
|
-
|
|
2688
|
-
m(target, anchor) {
|
|
2689
|
-
insert(target, div, anchor);
|
|
2690
|
-
if_blocks[current_block_type_index].m(div, null);
|
|
2691
|
-
if (if_block1) if_block1.m(target, anchor);
|
|
2692
|
-
insert(target, if_block1_anchor, anchor);
|
|
2693
|
-
current = true;
|
|
2694
|
-
|
|
2695
|
-
if (!mounted) {
|
|
2696
|
-
dispose = [listen(div, "pointerdown",
|
|
2697
|
-
/*pointerdown_handler*/
|
|
2698
|
-
ctx[21]), listen(div, "pointerup",
|
|
2699
|
-
/*pointerup_handler*/
|
|
2700
|
-
ctx[22])];
|
|
2701
|
-
mounted = true;
|
|
2702
|
-
}
|
|
2703
|
-
},
|
|
2704
|
-
|
|
2705
|
-
p(ctx, dirty) {
|
|
2706
|
-
let previous_block_index = current_block_type_index;
|
|
2707
|
-
current_block_type_index = select_block_type(ctx);
|
|
2708
|
-
|
|
2709
|
-
if (current_block_type_index === previous_block_index) {
|
|
2710
|
-
if_blocks[current_block_type_index].p(ctx, dirty);
|
|
2711
|
-
} else {
|
|
2712
|
-
group_outros();
|
|
2713
|
-
transition_out(if_blocks[previous_block_index], 1, 1, () => {
|
|
2714
|
-
if_blocks[previous_block_index] = null;
|
|
2715
|
-
});
|
|
2716
|
-
check_outros();
|
|
2717
|
-
if_block0 = if_blocks[current_block_type_index];
|
|
2718
|
-
|
|
2719
|
-
if (!if_block0) {
|
|
2720
|
-
if_block0 = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
|
|
2721
|
-
if_block0.c();
|
|
2722
|
-
} else {
|
|
2723
|
-
if_block0.p(ctx, dirty);
|
|
2724
|
-
}
|
|
2725
|
-
|
|
2726
|
-
transition_in(if_block0, 1);
|
|
2727
|
-
if_block0.m(div, null);
|
|
2728
|
-
}
|
|
2729
|
-
|
|
2730
|
-
if (
|
|
2731
|
-
/*activeItem*/
|
|
2732
|
-
ctx[6].caption) {
|
|
2733
|
-
if (if_block1) {
|
|
2734
|
-
if_block1.p(ctx, dirty);
|
|
2735
|
-
|
|
2736
|
-
if (dirty[0] &
|
|
2737
|
-
/*activeItem*/
|
|
2738
|
-
64) {
|
|
2739
|
-
transition_in(if_block1, 1);
|
|
2740
|
-
}
|
|
2741
|
-
} else {
|
|
2742
|
-
if_block1 = create_if_block_2(ctx);
|
|
2743
|
-
if_block1.c();
|
|
2744
|
-
transition_in(if_block1, 1);
|
|
2745
|
-
if_block1.m(if_block1_anchor.parentNode, if_block1_anchor);
|
|
2746
|
-
}
|
|
2747
|
-
} else if (if_block1) {
|
|
2748
|
-
group_outros();
|
|
2749
|
-
transition_out(if_block1, 1, 1, () => {
|
|
2750
|
-
if_block1 = null;
|
|
2751
|
-
});
|
|
2752
|
-
check_outros();
|
|
2753
|
-
}
|
|
2754
|
-
},
|
|
2755
|
-
|
|
2756
|
-
i(local) {
|
|
2757
|
-
if (current) return;
|
|
2758
|
-
transition_in(if_block0);
|
|
2759
|
-
add_render_callback(() => {
|
|
2760
|
-
if (div_outro) div_outro.end(1);
|
|
2761
|
-
div_intro = create_in_transition(div,
|
|
2762
|
-
/*mediaTransition*/
|
|
2763
|
-
ctx[12], true);
|
|
2764
|
-
div_intro.start();
|
|
2765
|
-
});
|
|
2766
|
-
transition_in(if_block1);
|
|
2767
|
-
current = true;
|
|
2768
|
-
},
|
|
2769
|
-
|
|
2770
|
-
o(local) {
|
|
2771
|
-
transition_out(if_block0);
|
|
2772
|
-
if (div_intro) div_intro.invalidate();
|
|
2773
|
-
div_outro = create_out_transition(div,
|
|
2774
|
-
/*mediaTransition*/
|
|
2775
|
-
ctx[12], false);
|
|
2776
|
-
transition_out(if_block1);
|
|
2777
|
-
current = false;
|
|
2778
|
-
},
|
|
2779
|
-
|
|
2780
|
-
d(detaching) {
|
|
2781
|
-
if (detaching) detach(div);
|
|
2782
|
-
if_blocks[current_block_type_index].d();
|
|
2783
|
-
if (detaching && div_outro) div_outro.end();
|
|
2784
|
-
if (if_block1) if_block1.d(detaching);
|
|
2785
|
-
if (detaching) detach(if_block1_anchor);
|
|
2786
|
-
mounted = false;
|
|
2787
|
-
run_all(dispose);
|
|
2788
|
-
}
|
|
2789
|
-
|
|
2790
|
-
};
|
|
2791
|
-
} // (319:522) {#if items.length > 1}
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
function create_if_block_1(ctx) {
|
|
2795
|
-
let div;
|
|
2796
|
-
let raw_value = `${
|
|
2797
|
-
/*position*/
|
|
2798
|
-
ctx[4] + 1} / ${
|
|
2799
|
-
/*items*/
|
|
2800
|
-
ctx[0].length}` + "";
|
|
2801
|
-
let button0;
|
|
2802
|
-
let button1;
|
|
2803
|
-
let mounted;
|
|
2804
|
-
let dispose;
|
|
2805
|
-
return {
|
|
2806
|
-
c() {
|
|
2807
|
-
div = element("div");
|
|
2808
|
-
button0 = element("button");
|
|
2809
|
-
button1 = element("button");
|
|
2810
|
-
attr(div, "class", "bp-count");
|
|
2811
|
-
attr(button0, "class", "bp-prev");
|
|
2812
|
-
attr(button0, "title", "Previous");
|
|
2813
|
-
attr(button0, "aria-label", "Previous");
|
|
2814
|
-
attr(button1, "class", "bp-next");
|
|
2815
|
-
attr(button1, "title", "Next");
|
|
2816
|
-
attr(button1, "aria-label", "Next");
|
|
2817
|
-
},
|
|
2818
|
-
|
|
2819
|
-
m(target, anchor) {
|
|
2820
|
-
insert(target, div, anchor);
|
|
2821
|
-
div.innerHTML = raw_value;
|
|
2822
|
-
insert(target, button0, anchor);
|
|
2823
|
-
insert(target, button1, anchor);
|
|
2824
|
-
|
|
2825
|
-
if (!mounted) {
|
|
2826
|
-
dispose = [listen(button0, "click",
|
|
2827
|
-
/*prev*/
|
|
2828
|
-
ctx[2]), listen(button1, "click",
|
|
2829
|
-
/*next*/
|
|
2830
|
-
ctx[3])];
|
|
2831
|
-
mounted = true;
|
|
2832
|
-
}
|
|
2833
|
-
},
|
|
2834
|
-
|
|
2835
|
-
p(ctx, dirty) {
|
|
2836
|
-
if (dirty[0] &
|
|
2837
|
-
/*position, items*/
|
|
2838
|
-
17 && raw_value !== (raw_value = `${
|
|
2839
|
-
/*position*/
|
|
2840
|
-
ctx[4] + 1} / ${
|
|
2841
|
-
/*items*/
|
|
2842
|
-
ctx[0].length}` + "")) div.innerHTML = raw_value;
|
|
2843
|
-
},
|
|
2844
|
-
|
|
2845
|
-
d(detaching) {
|
|
2846
|
-
if (detaching) detach(div);
|
|
2847
|
-
if (detaching) detach(button0);
|
|
2848
|
-
if (detaching) detach(button1);
|
|
2849
|
-
mounted = false;
|
|
2850
|
-
run_all(dispose);
|
|
2851
|
-
}
|
|
2852
|
-
|
|
2853
|
-
};
|
|
2854
|
-
}
|
|
2855
|
-
|
|
2856
|
-
function create_fragment(ctx) {
|
|
2857
|
-
let if_block_anchor;
|
|
2858
|
-
let current;
|
|
2859
|
-
let if_block =
|
|
2860
|
-
/*items*/
|
|
2861
|
-
ctx[0] && create_if_block(ctx);
|
|
2862
|
-
return {
|
|
2863
|
-
c() {
|
|
2864
|
-
if (if_block) if_block.c();
|
|
2865
|
-
if_block_anchor = empty();
|
|
2866
|
-
},
|
|
2867
|
-
|
|
2868
|
-
m(target, anchor) {
|
|
2869
|
-
if (if_block) if_block.m(target, anchor);
|
|
2870
|
-
insert(target, if_block_anchor, anchor);
|
|
2871
|
-
current = true;
|
|
2872
|
-
},
|
|
2873
|
-
|
|
2874
|
-
p(ctx, dirty) {
|
|
2875
|
-
if (
|
|
2876
|
-
/*items*/
|
|
2877
|
-
ctx[0]) {
|
|
2878
|
-
if (if_block) {
|
|
2879
|
-
if_block.p(ctx, dirty);
|
|
2880
|
-
|
|
2881
|
-
if (dirty[0] &
|
|
2882
|
-
/*items*/
|
|
2883
|
-
1) {
|
|
2884
|
-
transition_in(if_block, 1);
|
|
2885
|
-
}
|
|
2886
|
-
} else {
|
|
2887
|
-
if_block = create_if_block(ctx);
|
|
2888
|
-
if_block.c();
|
|
2889
|
-
transition_in(if_block, 1);
|
|
2890
|
-
if_block.m(if_block_anchor.parentNode, if_block_anchor);
|
|
2891
|
-
}
|
|
2892
|
-
} else if (if_block) {
|
|
2893
|
-
group_outros();
|
|
2894
|
-
transition_out(if_block, 1, 1, () => {
|
|
2895
|
-
if_block = null;
|
|
2896
|
-
});
|
|
2897
|
-
check_outros();
|
|
2898
|
-
}
|
|
2899
|
-
},
|
|
2900
|
-
|
|
2901
|
-
i(local) {
|
|
2902
|
-
if (current) return;
|
|
2903
|
-
transition_in(if_block);
|
|
2904
|
-
current = true;
|
|
2905
|
-
},
|
|
2906
|
-
|
|
2907
|
-
o(local) {
|
|
2908
|
-
transition_out(if_block);
|
|
2909
|
-
current = false;
|
|
2910
|
-
},
|
|
2911
|
-
|
|
2912
|
-
d(detaching) {
|
|
2913
|
-
if (if_block) if_block.d(detaching);
|
|
2914
|
-
if (detaching) detach(if_block_anchor);
|
|
2915
|
-
}
|
|
2916
|
-
|
|
2917
|
-
};
|
|
2918
|
-
}
|
|
2919
|
-
|
|
2920
|
-
function instance($$self, $$props, $$invalidate) {
|
|
2921
|
-
let $zoomed;
|
|
2922
|
-
let {
|
|
2923
|
-
items = undefined
|
|
2924
|
-
} = $$props;
|
|
2925
|
-
let {
|
|
2926
|
-
target = undefined
|
|
2927
|
-
} = $$props;
|
|
2928
|
-
const html = document.documentElement;
|
|
2929
|
-
/** index of current active item */
|
|
2930
|
-
|
|
2931
|
-
let position;
|
|
2932
|
-
/** options passed via open method */
|
|
2933
|
-
|
|
2934
|
-
let opts;
|
|
2935
|
-
/** bool tracks open state */
|
|
2936
|
-
|
|
2937
|
-
let isOpen;
|
|
2938
|
-
/** dom element to restore focus to on close */
|
|
2939
|
-
|
|
2940
|
-
let focusTrigger;
|
|
2941
|
-
/** bool true if container width < 769 */
|
|
2942
|
-
|
|
2943
|
-
let smallScreen;
|
|
2944
|
-
/** bool value of inline option passed in open method */
|
|
2945
|
-
|
|
2946
|
-
let inline;
|
|
2947
|
-
/** when position is set */
|
|
2948
|
-
|
|
2949
|
-
let movement;
|
|
2950
|
-
/** stores target on pointerdown (ref for overlay close) */
|
|
2951
|
-
|
|
2952
|
-
let clickedEl;
|
|
2953
|
-
/** active item object */
|
|
2954
|
-
|
|
2955
|
-
let activeItem;
|
|
2956
|
-
/** true if activeItem is html */
|
|
2957
|
-
|
|
2958
|
-
let activeItemIsHtml;
|
|
2959
|
-
/** function set by child component to run when container resized */
|
|
2960
|
-
|
|
2961
|
-
let resizeFunc;
|
|
2962
|
-
/** used by child components to set resize function */
|
|
2963
|
-
|
|
2964
|
-
const setResizeFunc = fn => resizeFunc = fn;
|
|
2965
|
-
/** container element (el) / width (w) / height (h) */
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
const container = {}; // /** true if image is currently zoomed past starting size */
|
|
2969
|
-
|
|
2970
|
-
const zoomed = writable(0);
|
|
2971
|
-
component_subscribe($$self, zoomed, value => $$invalidate(10, $zoomed = value));
|
|
2972
|
-
|
|
2973
|
-
const open = options => {
|
|
2974
|
-
$$invalidate(5, opts = options);
|
|
2975
|
-
$$invalidate(8, inline = opts.inline);
|
|
2976
|
-
const openItems = opts.items; // add class to hide scroll if not inline gallery
|
|
2977
|
-
|
|
2978
|
-
if (!inline && html.scrollHeight > html.clientHeight) {
|
|
2979
|
-
html.classList.add('bp-lock');
|
|
2980
|
-
} // update trigger element to restore focus
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
focusTrigger = document.activeElement;
|
|
2984
|
-
$$invalidate(20, container.w = target.offsetWidth, container);
|
|
2985
|
-
$$invalidate(20, container.h = target === document.body ? globalThis.innerHeight : target.clientHeight, container);
|
|
2986
|
-
$$invalidate(7, smallScreen = container.w < 769);
|
|
2987
|
-
$$invalidate(4, position = opts.position || 0); // make array w/ dataset to work with
|
|
2988
|
-
|
|
2989
|
-
if (Array.isArray(openItems)) {
|
|
2990
|
-
// array was passed
|
|
2991
|
-
$$invalidate(0, items = openItems.map((item, i) => {
|
|
2992
|
-
// override gallery position if needed
|
|
2993
|
-
if (opts.el && opts.el === item.element) {
|
|
2994
|
-
$$invalidate(4, position = i);
|
|
2995
|
-
}
|
|
2996
|
-
|
|
2997
|
-
return {
|
|
2998
|
-
i,
|
|
2999
|
-
...item
|
|
3000
|
-
};
|
|
3001
|
-
}));
|
|
3002
|
-
} else {
|
|
3003
|
-
// nodelist / node was passed
|
|
3004
|
-
$$invalidate(0, items = (openItems.length ? [...openItems] : [openItems]).map((element, i) => {
|
|
3005
|
-
// override gallery position if needed
|
|
3006
|
-
if (opts.el === element) {
|
|
3007
|
-
$$invalidate(4, position = i);
|
|
3008
|
-
}
|
|
3009
|
-
|
|
3010
|
-
return {
|
|
3011
|
-
element,
|
|
3012
|
-
i,
|
|
3013
|
-
...element.dataset
|
|
3014
|
-
};
|
|
3015
|
-
}));
|
|
3016
|
-
}
|
|
3017
|
-
};
|
|
3018
|
-
|
|
3019
|
-
const close = () => {
|
|
3020
|
-
opts.onClose?.(container.el, activeItem);
|
|
3021
|
-
closing.set(true);
|
|
3022
|
-
$$invalidate(0, items = null); // restore focus to trigger element
|
|
3023
|
-
|
|
3024
|
-
focusTrigger?.focus({
|
|
3025
|
-
preventScroll: true
|
|
3026
|
-
});
|
|
3027
|
-
};
|
|
3028
|
-
|
|
3029
|
-
const prev = () => setPosition(position - 1);
|
|
3030
|
-
|
|
3031
|
-
const next = () => setPosition(position + 1);
|
|
3032
|
-
|
|
3033
|
-
const setPosition = index => {
|
|
3034
|
-
movement = index - position;
|
|
3035
|
-
$$invalidate(4, position = getNextPosition(index));
|
|
3036
|
-
};
|
|
3037
|
-
/**
|
|
3038
|
-
* returns next gallery position (looped if neccessary)
|
|
3039
|
-
* @param {number} index
|
|
3040
|
-
*/
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
const getNextPosition = index => (index + items.length) % items.length;
|
|
3044
|
-
|
|
3045
|
-
const onKeydown = e => {
|
|
3046
|
-
const {
|
|
3047
|
-
key,
|
|
3048
|
-
shiftKey
|
|
3049
|
-
} = e;
|
|
3050
|
-
|
|
3051
|
-
if (key === 'Escape') {
|
|
3052
|
-
!opts.noClose && close();
|
|
3053
|
-
} else if (key === 'ArrowRight') {
|
|
3054
|
-
next();
|
|
3055
|
-
} else if (key === 'ArrowLeft') {
|
|
3056
|
-
prev();
|
|
3057
|
-
} else if (key === 'Tab') {
|
|
3058
|
-
// trap focus on tab press
|
|
3059
|
-
const {
|
|
3060
|
-
activeElement
|
|
3061
|
-
} = document; // allow browser to handle tab into video controls only
|
|
3062
|
-
|
|
3063
|
-
if (shiftKey || !activeElement.controls) {
|
|
3064
|
-
e.preventDefault();
|
|
3065
|
-
const {
|
|
3066
|
-
focusWrap = container.el
|
|
3067
|
-
} = opts;
|
|
3068
|
-
const tabbable = [...focusWrap.querySelectorAll('*')].filter(node => node.tabIndex >= 0);
|
|
3069
|
-
let index = tabbable.indexOf(activeElement);
|
|
3070
|
-
index += tabbable.length + (shiftKey ? -1 : 1);
|
|
3071
|
-
tabbable[index % tabbable.length].focus();
|
|
3072
|
-
}
|
|
3073
|
-
}
|
|
3074
|
-
};
|
|
3075
|
-
/**
|
|
3076
|
-
* calculate dimensions of height / width resized to fit within container
|
|
3077
|
-
* @param {object} item object with height / width properties
|
|
3078
|
-
* @returns {Array} [width: number, height: number]
|
|
3079
|
-
*/
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
const calculateDimensions = ({
|
|
3083
|
-
width = 1920,
|
|
3084
|
-
height = 1080
|
|
3085
|
-
}) => {
|
|
3086
|
-
const {
|
|
3087
|
-
scale = 0.99
|
|
3088
|
-
} = opts;
|
|
3089
|
-
const ratio = Math.min(1, container.w / width * scale, container.h / height * scale); // round number so we don't use a float as the sizes attribute
|
|
3090
|
-
|
|
3091
|
-
return [Math.round(width * ratio), Math.round(height * ratio)];
|
|
3092
|
-
};
|
|
3093
|
-
/** preloads images for previous and next items in gallery */
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
const preloadNext = () => {
|
|
3097
|
-
if (items) {
|
|
3098
|
-
const nextItem = items[getNextPosition(position + 1)];
|
|
3099
|
-
const prevItem = items[getNextPosition(position - 1)];
|
|
3100
|
-
!nextItem.preload && loadImage(nextItem);
|
|
3101
|
-
!prevItem.preload && loadImage(prevItem);
|
|
3102
|
-
}
|
|
3103
|
-
};
|
|
3104
|
-
/** loads / decodes image for item */
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
const loadImage = item => {
|
|
3108
|
-
if (item.img) {
|
|
3109
|
-
const image = element('img');
|
|
3110
|
-
image.sizes = opts.sizes || `${calculateDimensions(item)[0]}px`;
|
|
3111
|
-
image.srcset = item.img;
|
|
3112
|
-
item.preload = true;
|
|
3113
|
-
return image.decode();
|
|
3114
|
-
}
|
|
3115
|
-
};
|
|
3116
|
-
/** svelte transition to control opening / changing */
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
const mediaTransition = (node, isEntering) => {
|
|
3120
|
-
if (!isOpen || !items) {
|
|
3121
|
-
// entrance / exit transition
|
|
3122
|
-
$$invalidate(18, isOpen = isEntering);
|
|
3123
|
-
return opts.intro ? fly(node, {
|
|
3124
|
-
y: isEntering ? 10 : -10
|
|
3125
|
-
}) : scaleIn(node);
|
|
3126
|
-
} // forward / backward transition
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
return fly(node, {
|
|
3130
|
-
x: (movement > 0 ? 20 : -20) * (isEntering ? 1 : -1),
|
|
3131
|
-
duration: 250
|
|
3132
|
-
});
|
|
3133
|
-
};
|
|
3134
|
-
/** custom svelte transition for entrance zoom */
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
const scaleIn = node => {
|
|
3138
|
-
let dimensions;
|
|
3139
|
-
|
|
3140
|
-
if (activeItemIsHtml) {
|
|
3141
|
-
const bpItem = node.firstChild.firstChild;
|
|
3142
|
-
dimensions = [bpItem.clientWidth, bpItem.clientHeight];
|
|
3143
|
-
} else {
|
|
3144
|
-
dimensions = calculateDimensions(activeItem);
|
|
3145
|
-
} // rect is bounding rect of trigger element
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
const rect = (activeItem.element || focusTrigger).getBoundingClientRect();
|
|
3149
|
-
const leftOffset = rect.left - (container.w - rect.width) / 2;
|
|
3150
|
-
const centerTop = rect.top - (container.h - rect.height) / 2;
|
|
3151
|
-
const scaleWidth = rect.width / dimensions[0];
|
|
3152
|
-
const scaleHeight = rect.height / dimensions[1];
|
|
3153
|
-
return {
|
|
3154
|
-
duration: 480,
|
|
3155
|
-
easing: cubicOut,
|
|
3156
|
-
css: (t, u) => {
|
|
3157
|
-
return `transform:translate3d(${leftOffset * u}px, ${centerTop * u}px, 0) scale3d(${scaleWidth + t * (1 - scaleWidth)}, ${scaleHeight + t * (1 - scaleHeight)}, 1)`;
|
|
3158
|
-
}
|
|
3159
|
-
};
|
|
3160
|
-
};
|
|
3161
|
-
/** provides object w/ needed funcs / data to child components */
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
const getChildProps = () => ({
|
|
3165
|
-
activeItem,
|
|
3166
|
-
calculateDimensions,
|
|
3167
|
-
loadImage,
|
|
3168
|
-
preloadNext,
|
|
3169
|
-
opts,
|
|
3170
|
-
prev,
|
|
3171
|
-
next,
|
|
3172
|
-
close,
|
|
3173
|
-
setResizeFunc,
|
|
3174
|
-
zoomed,
|
|
3175
|
-
container
|
|
3176
|
-
});
|
|
3177
|
-
/** code to run on mount / destroy */
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
const containerActions = node => {
|
|
3181
|
-
$$invalidate(20, container.el = node, container);
|
|
3182
|
-
let removeKeydownListener;
|
|
3183
|
-
let roActive;
|
|
3184
|
-
opts.onOpen?.(container.el, activeItem); // don't use keyboard events for inline galleries
|
|
3185
|
-
|
|
3186
|
-
if (!inline) {
|
|
3187
|
-
removeKeydownListener = listen(globalThis, 'keydown', onKeydown);
|
|
3188
|
-
} // set up resize observer
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
const ro = new ResizeObserver(entries => {
|
|
3192
|
-
// use roActive to avoid running on initial open
|
|
3193
|
-
if (roActive) {
|
|
3194
|
-
$$invalidate(20, container.w = entries[0].contentRect.width, container);
|
|
3195
|
-
$$invalidate(20, container.h = entries[0].contentRect.height, container);
|
|
3196
|
-
$$invalidate(7, smallScreen = container.w < 769); // run child component resize function
|
|
3197
|
-
|
|
3198
|
-
resizeFunc?.(); // run user defined onResize function
|
|
3199
|
-
|
|
3200
|
-
opts.onResize?.(container.el, activeItem);
|
|
3201
|
-
}
|
|
3202
|
-
|
|
3203
|
-
roActive = true;
|
|
3204
|
-
});
|
|
3205
|
-
ro.observe(node);
|
|
3206
|
-
return {
|
|
3207
|
-
destroy() {
|
|
3208
|
-
ro.disconnect();
|
|
3209
|
-
removeKeydownListener?.();
|
|
3210
|
-
closing.set(false); // remove class hiding scroll
|
|
3211
|
-
|
|
3212
|
-
html.classList.remove('bp-lock');
|
|
3213
|
-
opts.onClosed?.();
|
|
3214
|
-
}
|
|
3215
|
-
|
|
3216
|
-
};
|
|
3217
|
-
};
|
|
3218
|
-
|
|
3219
|
-
const pointerdown_handler = e => $$invalidate(9, clickedEl = e.target);
|
|
3220
|
-
|
|
3221
|
-
const pointerup_handler = function (e) {
|
|
3222
|
-
// only close if left click on self and not dragged
|
|
3223
|
-
if (e.button !== 2 && e.target === this && clickedEl === this) {
|
|
3224
|
-
!opts.noClose && close();
|
|
3225
|
-
}
|
|
3226
|
-
};
|
|
3227
|
-
|
|
3228
|
-
$$self.$$set = $$props => {
|
|
3229
|
-
if ('items' in $$props) $$invalidate(0, items = $$props.items);
|
|
3230
|
-
if ('target' in $$props) $$invalidate(15, target = $$props.target);
|
|
3231
|
-
};
|
|
3232
|
-
|
|
3233
|
-
$$self.$$.update = () => {
|
|
3234
|
-
if ($$self.$$.dirty[0] &
|
|
3235
|
-
/*items, position, activeItem, isOpen, activeItemIsHtml, opts, container*/
|
|
3236
|
-
1835121) {
|
|
3237
|
-
if (items) {
|
|
3238
|
-
// update active item when position changes
|
|
3239
|
-
$$invalidate(6, activeItem = items[position]);
|
|
3240
|
-
$$invalidate(19, activeItemIsHtml = activeItem.hasOwnProperty('html'));
|
|
3241
|
-
|
|
3242
|
-
if (isOpen) {
|
|
3243
|
-
// clear child resize function if html
|
|
3244
|
-
activeItemIsHtml && setResizeFunc(null); // run onUpdate when items updated
|
|
3245
|
-
|
|
3246
|
-
opts.onUpdate?.(container.el, activeItem);
|
|
3247
|
-
}
|
|
3248
|
-
}
|
|
3249
|
-
}
|
|
3250
|
-
};
|
|
3251
|
-
|
|
3252
|
-
return [items, close, prev, next, position, opts, activeItem, smallScreen, inline, clickedEl, $zoomed, zoomed, mediaTransition, getChildProps, containerActions, target, open, setPosition, isOpen, activeItemIsHtml, container, pointerdown_handler, pointerup_handler];
|
|
3253
|
-
}
|
|
3254
|
-
|
|
3255
|
-
class Bigger_picture extends SvelteComponent {
|
|
3256
|
-
constructor(options) {
|
|
3257
|
-
super();
|
|
3258
|
-
init(this, options, instance, create_fragment, not_equal, {
|
|
3259
|
-
items: 0,
|
|
3260
|
-
target: 15,
|
|
3261
|
-
open: 16,
|
|
3262
|
-
close: 1,
|
|
3263
|
-
prev: 2,
|
|
3264
|
-
next: 3,
|
|
3265
|
-
setPosition: 17
|
|
3266
|
-
}, null, [-1, -1]);
|
|
3267
|
-
}
|
|
3268
|
-
|
|
3269
|
-
get items() {
|
|
3270
|
-
return this.$$.ctx[0];
|
|
3271
|
-
}
|
|
3272
|
-
|
|
3273
|
-
get target() {
|
|
3274
|
-
return this.$$.ctx[15];
|
|
3275
|
-
}
|
|
3276
|
-
|
|
3277
|
-
get open() {
|
|
3278
|
-
return this.$$.ctx[16];
|
|
3279
|
-
}
|
|
3280
|
-
|
|
3281
|
-
get close() {
|
|
3282
|
-
return this.$$.ctx[1];
|
|
3283
|
-
}
|
|
3284
|
-
|
|
3285
|
-
get prev() {
|
|
3286
|
-
return this.$$.ctx[2];
|
|
3287
|
-
}
|
|
3288
|
-
|
|
3289
|
-
get next() {
|
|
3290
|
-
return this.$$.ctx[3];
|
|
3291
|
-
}
|
|
3292
|
-
|
|
3293
|
-
get setPosition() {
|
|
3294
|
-
return this.$$.ctx[17];
|
|
3295
|
-
}
|
|
3296
|
-
|
|
3297
|
-
}
|
|
3298
|
-
/**
|
|
3299
|
-
* Initializes BiggerPicture
|
|
3300
|
-
* @param {{target: HTMLElement}} options
|
|
3301
|
-
* @returns BiggerPicture instance
|
|
3302
|
-
*/
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
function biggerPicture(options) {
|
|
3306
|
-
return new Bigger_picture({ ...options,
|
|
3307
|
-
props: options
|
|
3308
|
-
});
|
|
3309
|
-
}
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
/***/ })
|
|
3314
|
-
|
|
3315
|
-
}]);
|
|
3316
|
-
//# sourceMappingURL=default-src_app_menu_nav-tab_nav-tab_component_ts-src_app_services_biggerPicture_service_ts-s-b16afe.js.map
|