super 0.0.0 → 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +165 -0
- data/README.md +102 -8
- data/app/assets/config/super_manifest.js +1 -0
- data/app/assets/javascripts/super/application.js +3483 -0
- data/app/assets/stylesheets/super/application.css +35265 -0
- data/app/controllers/super/application_controller.rb +84 -0
- data/app/views/layouts/super/application.html.erb +39 -0
- data/app/views/super/application/_form.html.erb +13 -0
- data/app/views/super/application/_form_field.html.erb +7 -0
- data/app/views/super/application/_form_generic_select.html.erb +19 -0
- data/app/views/super/application/_form_generic_text.html.erb +7 -0
- data/app/views/super/application/_index.html.erb +58 -0
- data/app/views/super/application/edit.html.erb +7 -0
- data/app/views/super/application/index.html.erb +1 -0
- data/app/views/super/application/new.html.erb +7 -0
- data/app/views/super/application/show.html.erb +10 -0
- data/app/views/super/feather/README.md +32 -0
- data/app/views/super/feather/_chevron_down.svg +1 -0
- data/frontend/super-frontend/build.js +34 -0
- data/frontend/super-frontend/dist/application.css +35265 -0
- data/frontend/super-frontend/dist/application.js +3483 -0
- data/frontend/super-frontend/package.json +14 -0
- data/frontend/super-frontend/postcss.config.js +6 -0
- data/frontend/super-frontend/src/javascripts/super/application.js +11 -0
- data/frontend/super-frontend/src/stylesheets/super/application.css +14 -0
- data/frontend/super-frontend/tailwind.config.js +7 -0
- data/frontend/super-frontend/yarn.lock +5355 -0
- data/lib/generators/super/install/USAGE +32 -0
- data/lib/generators/super/install/install_generator.rb +47 -0
- data/lib/generators/super/install/templates/base_controller.rb.tt +2 -0
- data/lib/generators/super/install/templates/initializer.rb.tt +5 -0
- data/lib/generators/super/resource/USAGE +9 -0
- data/lib/generators/super/resource/resource_generator.rb +54 -0
- data/lib/generators/super/resource/templates/resource_dashboard.rb.tt +65 -0
- data/lib/generators/super/resource/templates/resources_controller.rb.tt +9 -0
- data/lib/generators/super/webpacker/USAGE +14 -0
- data/lib/generators/super/webpacker/templates/pack_super_application.js.erb.tt +2 -0
- data/lib/generators/super/webpacker/webpacker_generator.rb +17 -0
- data/lib/super.rb +17 -4
- data/lib/super/assets.rb +62 -0
- data/lib/super/configuration.rb +88 -0
- data/lib/super/controls.rb +25 -0
- data/lib/super/display.rb +9 -0
- data/lib/super/display/schema_types.rb +41 -0
- data/lib/super/engine.rb +5 -0
- data/lib/super/error.rb +8 -0
- data/lib/super/form/schema_types.rb +47 -0
- data/lib/super/inline_callback.rb +82 -0
- data/lib/super/navigation/automatic.rb +69 -0
- data/lib/super/pagination.rb +59 -0
- data/lib/super/plugin.rb +89 -0
- data/lib/super/schema.rb +24 -0
- data/lib/super/test_support/fixtures/members.yml +336 -0
- data/lib/super/test_support/fixtures/ships.yml +10 -0
- data/lib/super/test_support/setup.rb +79 -0
- data/lib/super/test_support/starfleet_seeder.rb +49 -0
- data/lib/super/test_support/templates/20190216224956_create_members.rb +11 -0
- data/lib/super/test_support/templates/20190803143320_create_ships.rb +11 -0
- data/lib/super/test_support/templates/20190806014121_add_ship_to_members.rb +5 -0
- data/lib/super/test_support/templates/admin/members_controller.rb +9 -0
- data/lib/super/test_support/templates/admin/ships_controller.rb +9 -0
- data/lib/super/test_support/templates/admin_controller.rb +2 -0
- data/lib/super/test_support/templates/member.rb +16 -0
- data/lib/super/test_support/templates/member_dashboard.rb +90 -0
- data/lib/super/test_support/templates/routes.rb +10 -0
- data/lib/super/test_support/templates/seeds.rb +2 -0
- data/lib/super/test_support/templates/ship.rb +3 -0
- data/lib/super/test_support/templates/ship_dashboard.rb +79 -0
- data/lib/super/version.rb +1 -1
- data/lib/super/view.rb +25 -0
- metadata +131 -12
- data/LICENSE.txt +0 -40
@@ -0,0 +1,3483 @@
|
|
1
|
+
// modules are defined as an array
|
2
|
+
// [ module function, map of requires ]
|
3
|
+
//
|
4
|
+
// map of requires is short require name -> numeric require
|
5
|
+
//
|
6
|
+
// anything defined in a previous bundle is accessed via the
|
7
|
+
// orig method which is the require for previous bundles
|
8
|
+
parcelRequire = (function (modules, cache, entry, globalName) {
|
9
|
+
// Save the require from previous bundle to this closure if any
|
10
|
+
var previousRequire = typeof parcelRequire === 'function' && parcelRequire;
|
11
|
+
var nodeRequire = typeof require === 'function' && require;
|
12
|
+
|
13
|
+
function newRequire(name, jumped) {
|
14
|
+
if (!cache[name]) {
|
15
|
+
if (!modules[name]) {
|
16
|
+
// if we cannot find the module within our internal map or
|
17
|
+
// cache jump to the current global require ie. the last bundle
|
18
|
+
// that was added to the page.
|
19
|
+
var currentRequire = typeof parcelRequire === 'function' && parcelRequire;
|
20
|
+
if (!jumped && currentRequire) {
|
21
|
+
return currentRequire(name, true);
|
22
|
+
}
|
23
|
+
|
24
|
+
// If there are other bundles on this page the require from the
|
25
|
+
// previous one is saved to 'previousRequire'. Repeat this as
|
26
|
+
// many times as there are bundles until the module is found or
|
27
|
+
// we exhaust the require chain.
|
28
|
+
if (previousRequire) {
|
29
|
+
return previousRequire(name, true);
|
30
|
+
}
|
31
|
+
|
32
|
+
// Try the node require function if it exists.
|
33
|
+
if (nodeRequire && typeof name === 'string') {
|
34
|
+
return nodeRequire(name);
|
35
|
+
}
|
36
|
+
|
37
|
+
var err = new Error('Cannot find module \'' + name + '\'');
|
38
|
+
err.code = 'MODULE_NOT_FOUND';
|
39
|
+
throw err;
|
40
|
+
}
|
41
|
+
|
42
|
+
localRequire.resolve = resolve;
|
43
|
+
localRequire.cache = {};
|
44
|
+
|
45
|
+
var module = cache[name] = new newRequire.Module(name);
|
46
|
+
|
47
|
+
modules[name][0].call(module.exports, localRequire, module, module.exports, this);
|
48
|
+
}
|
49
|
+
|
50
|
+
return cache[name].exports;
|
51
|
+
|
52
|
+
function localRequire(x){
|
53
|
+
return newRequire(localRequire.resolve(x));
|
54
|
+
}
|
55
|
+
|
56
|
+
function resolve(x){
|
57
|
+
return modules[name][1][x] || x;
|
58
|
+
}
|
59
|
+
}
|
60
|
+
|
61
|
+
function Module(moduleName) {
|
62
|
+
this.id = moduleName;
|
63
|
+
this.bundle = newRequire;
|
64
|
+
this.exports = {};
|
65
|
+
}
|
66
|
+
|
67
|
+
newRequire.isParcelRequire = true;
|
68
|
+
newRequire.Module = Module;
|
69
|
+
newRequire.modules = modules;
|
70
|
+
newRequire.cache = cache;
|
71
|
+
newRequire.parent = previousRequire;
|
72
|
+
newRequire.register = function (id, exports) {
|
73
|
+
modules[id] = [function (require, module) {
|
74
|
+
module.exports = exports;
|
75
|
+
}, {}];
|
76
|
+
};
|
77
|
+
|
78
|
+
var error;
|
79
|
+
for (var i = 0; i < entry.length; i++) {
|
80
|
+
try {
|
81
|
+
newRequire(entry[i]);
|
82
|
+
} catch (e) {
|
83
|
+
// Save first error but execute all entries
|
84
|
+
if (!error) {
|
85
|
+
error = e;
|
86
|
+
}
|
87
|
+
}
|
88
|
+
}
|
89
|
+
|
90
|
+
if (entry.length) {
|
91
|
+
// Expose entry point to Node, AMD or browser globals
|
92
|
+
// Based on https://github.com/ForbesLindesay/umd/blob/master/template.js
|
93
|
+
var mainExports = newRequire(entry[entry.length - 1]);
|
94
|
+
|
95
|
+
// CommonJS
|
96
|
+
if (typeof exports === "object" && typeof module !== "undefined") {
|
97
|
+
module.exports = mainExports;
|
98
|
+
|
99
|
+
// RequireJS
|
100
|
+
} else if (typeof define === "function" && define.amd) {
|
101
|
+
define(function () {
|
102
|
+
return mainExports;
|
103
|
+
});
|
104
|
+
|
105
|
+
// <script>
|
106
|
+
} else if (globalName) {
|
107
|
+
this[globalName] = mainExports;
|
108
|
+
}
|
109
|
+
}
|
110
|
+
|
111
|
+
// Override the current require with this new one
|
112
|
+
parcelRequire = newRequire;
|
113
|
+
|
114
|
+
if (error) {
|
115
|
+
// throw error from earlier, _after updating parcelRequire_
|
116
|
+
throw error;
|
117
|
+
}
|
118
|
+
|
119
|
+
return newRequire;
|
120
|
+
})({"../node_modules/rails-ujs/lib/assets/compiled/rails-ujs.js":[function(require,module,exports) {
|
121
|
+
var define;
|
122
|
+
/*
|
123
|
+
Unobtrusive JavaScript
|
124
|
+
https://github.com/rails/rails/blob/master/actionview/app/assets/javascripts
|
125
|
+
Released under the MIT license
|
126
|
+
*/
|
127
|
+
|
128
|
+
(function() {
|
129
|
+
var context = this;
|
130
|
+
|
131
|
+
(function() {
|
132
|
+
(function() {
|
133
|
+
this.Rails = {
|
134
|
+
linkClickSelector: 'a[data-confirm], a[data-method], a[data-remote]:not([disabled]), a[data-disable-with], a[data-disable]',
|
135
|
+
buttonClickSelector: {
|
136
|
+
selector: 'button[data-remote]:not([form]), button[data-confirm]:not([form])',
|
137
|
+
exclude: 'form button'
|
138
|
+
},
|
139
|
+
inputChangeSelector: 'select[data-remote], input[data-remote], textarea[data-remote]',
|
140
|
+
formSubmitSelector: 'form',
|
141
|
+
formInputClickSelector: 'form input[type=submit], form input[type=image], form button[type=submit], form button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])',
|
142
|
+
formDisableSelector: 'input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled',
|
143
|
+
formEnableSelector: 'input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled',
|
144
|
+
fileInputSelector: 'input[name][type=file]:not([disabled])',
|
145
|
+
linkDisableSelector: 'a[data-disable-with], a[data-disable]',
|
146
|
+
buttonDisableSelector: 'button[data-remote][data-disable-with], button[data-remote][data-disable]'
|
147
|
+
};
|
148
|
+
|
149
|
+
}).call(this);
|
150
|
+
}).call(context);
|
151
|
+
|
152
|
+
var Rails = context.Rails;
|
153
|
+
|
154
|
+
(function() {
|
155
|
+
(function() {
|
156
|
+
var nonce;
|
157
|
+
|
158
|
+
nonce = null;
|
159
|
+
|
160
|
+
Rails.loadCSPNonce = function() {
|
161
|
+
var ref;
|
162
|
+
return nonce = (ref = document.querySelector("meta[name=csp-nonce]")) != null ? ref.content : void 0;
|
163
|
+
};
|
164
|
+
|
165
|
+
Rails.cspNonce = function() {
|
166
|
+
return nonce != null ? nonce : Rails.loadCSPNonce();
|
167
|
+
};
|
168
|
+
|
169
|
+
}).call(this);
|
170
|
+
(function() {
|
171
|
+
var expando, m;
|
172
|
+
|
173
|
+
m = Element.prototype.matches || Element.prototype.matchesSelector || Element.prototype.mozMatchesSelector || Element.prototype.msMatchesSelector || Element.prototype.oMatchesSelector || Element.prototype.webkitMatchesSelector;
|
174
|
+
|
175
|
+
Rails.matches = function(element, selector) {
|
176
|
+
if (selector.exclude != null) {
|
177
|
+
return m.call(element, selector.selector) && !m.call(element, selector.exclude);
|
178
|
+
} else {
|
179
|
+
return m.call(element, selector);
|
180
|
+
}
|
181
|
+
};
|
182
|
+
|
183
|
+
expando = '_ujsData';
|
184
|
+
|
185
|
+
Rails.getData = function(element, key) {
|
186
|
+
var ref;
|
187
|
+
return (ref = element[expando]) != null ? ref[key] : void 0;
|
188
|
+
};
|
189
|
+
|
190
|
+
Rails.setData = function(element, key, value) {
|
191
|
+
if (element[expando] == null) {
|
192
|
+
element[expando] = {};
|
193
|
+
}
|
194
|
+
return element[expando][key] = value;
|
195
|
+
};
|
196
|
+
|
197
|
+
Rails.$ = function(selector) {
|
198
|
+
return Array.prototype.slice.call(document.querySelectorAll(selector));
|
199
|
+
};
|
200
|
+
|
201
|
+
}).call(this);
|
202
|
+
(function() {
|
203
|
+
var $, csrfParam, csrfToken;
|
204
|
+
|
205
|
+
$ = Rails.$;
|
206
|
+
|
207
|
+
csrfToken = Rails.csrfToken = function() {
|
208
|
+
var meta;
|
209
|
+
meta = document.querySelector('meta[name=csrf-token]');
|
210
|
+
return meta && meta.content;
|
211
|
+
};
|
212
|
+
|
213
|
+
csrfParam = Rails.csrfParam = function() {
|
214
|
+
var meta;
|
215
|
+
meta = document.querySelector('meta[name=csrf-param]');
|
216
|
+
return meta && meta.content;
|
217
|
+
};
|
218
|
+
|
219
|
+
Rails.CSRFProtection = function(xhr) {
|
220
|
+
var token;
|
221
|
+
token = csrfToken();
|
222
|
+
if (token != null) {
|
223
|
+
return xhr.setRequestHeader('X-CSRF-Token', token);
|
224
|
+
}
|
225
|
+
};
|
226
|
+
|
227
|
+
Rails.refreshCSRFTokens = function() {
|
228
|
+
var param, token;
|
229
|
+
token = csrfToken();
|
230
|
+
param = csrfParam();
|
231
|
+
if ((token != null) && (param != null)) {
|
232
|
+
return $('form input[name="' + param + '"]').forEach(function(input) {
|
233
|
+
return input.value = token;
|
234
|
+
});
|
235
|
+
}
|
236
|
+
};
|
237
|
+
|
238
|
+
}).call(this);
|
239
|
+
(function() {
|
240
|
+
var CustomEvent, fire, matches, preventDefault;
|
241
|
+
|
242
|
+
matches = Rails.matches;
|
243
|
+
|
244
|
+
CustomEvent = window.CustomEvent;
|
245
|
+
|
246
|
+
if (typeof CustomEvent !== 'function') {
|
247
|
+
CustomEvent = function(event, params) {
|
248
|
+
var evt;
|
249
|
+
evt = document.createEvent('CustomEvent');
|
250
|
+
evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
|
251
|
+
return evt;
|
252
|
+
};
|
253
|
+
CustomEvent.prototype = window.Event.prototype;
|
254
|
+
preventDefault = CustomEvent.prototype.preventDefault;
|
255
|
+
CustomEvent.prototype.preventDefault = function() {
|
256
|
+
var result;
|
257
|
+
result = preventDefault.call(this);
|
258
|
+
if (this.cancelable && !this.defaultPrevented) {
|
259
|
+
Object.defineProperty(this, 'defaultPrevented', {
|
260
|
+
get: function() {
|
261
|
+
return true;
|
262
|
+
}
|
263
|
+
});
|
264
|
+
}
|
265
|
+
return result;
|
266
|
+
};
|
267
|
+
}
|
268
|
+
|
269
|
+
fire = Rails.fire = function(obj, name, data) {
|
270
|
+
var event;
|
271
|
+
event = new CustomEvent(name, {
|
272
|
+
bubbles: true,
|
273
|
+
cancelable: true,
|
274
|
+
detail: data
|
275
|
+
});
|
276
|
+
obj.dispatchEvent(event);
|
277
|
+
return !event.defaultPrevented;
|
278
|
+
};
|
279
|
+
|
280
|
+
Rails.stopEverything = function(e) {
|
281
|
+
fire(e.target, 'ujs:everythingStopped');
|
282
|
+
e.preventDefault();
|
283
|
+
e.stopPropagation();
|
284
|
+
return e.stopImmediatePropagation();
|
285
|
+
};
|
286
|
+
|
287
|
+
Rails.delegate = function(element, selector, eventType, handler) {
|
288
|
+
return element.addEventListener(eventType, function(e) {
|
289
|
+
var target;
|
290
|
+
target = e.target;
|
291
|
+
while (!(!(target instanceof Element) || matches(target, selector))) {
|
292
|
+
target = target.parentNode;
|
293
|
+
}
|
294
|
+
if (target instanceof Element && handler.call(target, e) === false) {
|
295
|
+
e.preventDefault();
|
296
|
+
return e.stopPropagation();
|
297
|
+
}
|
298
|
+
});
|
299
|
+
};
|
300
|
+
|
301
|
+
}).call(this);
|
302
|
+
(function() {
|
303
|
+
var AcceptHeaders, CSRFProtection, createXHR, cspNonce, fire, prepareOptions, processResponse;
|
304
|
+
|
305
|
+
cspNonce = Rails.cspNonce, CSRFProtection = Rails.CSRFProtection, fire = Rails.fire;
|
306
|
+
|
307
|
+
AcceptHeaders = {
|
308
|
+
'*': '*/*',
|
309
|
+
text: 'text/plain',
|
310
|
+
html: 'text/html',
|
311
|
+
xml: 'application/xml, text/xml',
|
312
|
+
json: 'application/json, text/javascript',
|
313
|
+
script: 'text/javascript, application/javascript, application/ecmascript, application/x-ecmascript'
|
314
|
+
};
|
315
|
+
|
316
|
+
Rails.ajax = function(options) {
|
317
|
+
var xhr;
|
318
|
+
options = prepareOptions(options);
|
319
|
+
xhr = createXHR(options, function() {
|
320
|
+
var ref, response;
|
321
|
+
response = processResponse((ref = xhr.response) != null ? ref : xhr.responseText, xhr.getResponseHeader('Content-Type'));
|
322
|
+
if (Math.floor(xhr.status / 100) === 2) {
|
323
|
+
if (typeof options.success === "function") {
|
324
|
+
options.success(response, xhr.statusText, xhr);
|
325
|
+
}
|
326
|
+
} else {
|
327
|
+
if (typeof options.error === "function") {
|
328
|
+
options.error(response, xhr.statusText, xhr);
|
329
|
+
}
|
330
|
+
}
|
331
|
+
return typeof options.complete === "function" ? options.complete(xhr, xhr.statusText) : void 0;
|
332
|
+
});
|
333
|
+
if ((options.beforeSend != null) && !options.beforeSend(xhr, options)) {
|
334
|
+
return false;
|
335
|
+
}
|
336
|
+
if (xhr.readyState === XMLHttpRequest.OPENED) {
|
337
|
+
return xhr.send(options.data);
|
338
|
+
}
|
339
|
+
};
|
340
|
+
|
341
|
+
prepareOptions = function(options) {
|
342
|
+
options.url = options.url || location.href;
|
343
|
+
options.type = options.type.toUpperCase();
|
344
|
+
if (options.type === 'GET' && options.data) {
|
345
|
+
if (options.url.indexOf('?') < 0) {
|
346
|
+
options.url += '?' + options.data;
|
347
|
+
} else {
|
348
|
+
options.url += '&' + options.data;
|
349
|
+
}
|
350
|
+
}
|
351
|
+
if (AcceptHeaders[options.dataType] == null) {
|
352
|
+
options.dataType = '*';
|
353
|
+
}
|
354
|
+
options.accept = AcceptHeaders[options.dataType];
|
355
|
+
if (options.dataType !== '*') {
|
356
|
+
options.accept += ', */*; q=0.01';
|
357
|
+
}
|
358
|
+
return options;
|
359
|
+
};
|
360
|
+
|
361
|
+
createXHR = function(options, done) {
|
362
|
+
var xhr;
|
363
|
+
xhr = new XMLHttpRequest();
|
364
|
+
xhr.open(options.type, options.url, true);
|
365
|
+
xhr.setRequestHeader('Accept', options.accept);
|
366
|
+
if (typeof options.data === 'string') {
|
367
|
+
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
|
368
|
+
}
|
369
|
+
if (!options.crossDomain) {
|
370
|
+
xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
|
371
|
+
}
|
372
|
+
CSRFProtection(xhr);
|
373
|
+
xhr.withCredentials = !!options.withCredentials;
|
374
|
+
xhr.onreadystatechange = function() {
|
375
|
+
if (xhr.readyState === XMLHttpRequest.DONE) {
|
376
|
+
return done(xhr);
|
377
|
+
}
|
378
|
+
};
|
379
|
+
return xhr;
|
380
|
+
};
|
381
|
+
|
382
|
+
processResponse = function(response, type) {
|
383
|
+
var parser, script;
|
384
|
+
if (typeof response === 'string' && typeof type === 'string') {
|
385
|
+
if (type.match(/\bjson\b/)) {
|
386
|
+
try {
|
387
|
+
response = JSON.parse(response);
|
388
|
+
} catch (error) {}
|
389
|
+
} else if (type.match(/\b(?:java|ecma)script\b/)) {
|
390
|
+
script = document.createElement('script');
|
391
|
+
script.setAttribute('nonce', cspNonce());
|
392
|
+
script.text = response;
|
393
|
+
document.head.appendChild(script).parentNode.removeChild(script);
|
394
|
+
} else if (type.match(/\b(xml|html|svg)\b/)) {
|
395
|
+
parser = new DOMParser();
|
396
|
+
type = type.replace(/;.+/, '');
|
397
|
+
try {
|
398
|
+
response = parser.parseFromString(response, type);
|
399
|
+
} catch (error) {}
|
400
|
+
}
|
401
|
+
}
|
402
|
+
return response;
|
403
|
+
};
|
404
|
+
|
405
|
+
Rails.href = function(element) {
|
406
|
+
return element.href;
|
407
|
+
};
|
408
|
+
|
409
|
+
Rails.isCrossDomain = function(url) {
|
410
|
+
var e, originAnchor, urlAnchor;
|
411
|
+
originAnchor = document.createElement('a');
|
412
|
+
originAnchor.href = location.href;
|
413
|
+
urlAnchor = document.createElement('a');
|
414
|
+
try {
|
415
|
+
urlAnchor.href = url;
|
416
|
+
return !(((!urlAnchor.protocol || urlAnchor.protocol === ':') && !urlAnchor.host) || (originAnchor.protocol + '//' + originAnchor.host === urlAnchor.protocol + '//' + urlAnchor.host));
|
417
|
+
} catch (error) {
|
418
|
+
e = error;
|
419
|
+
return true;
|
420
|
+
}
|
421
|
+
};
|
422
|
+
|
423
|
+
}).call(this);
|
424
|
+
(function() {
|
425
|
+
var matches, toArray;
|
426
|
+
|
427
|
+
matches = Rails.matches;
|
428
|
+
|
429
|
+
toArray = function(e) {
|
430
|
+
return Array.prototype.slice.call(e);
|
431
|
+
};
|
432
|
+
|
433
|
+
Rails.serializeElement = function(element, additionalParam) {
|
434
|
+
var inputs, params;
|
435
|
+
inputs = [element];
|
436
|
+
if (matches(element, 'form')) {
|
437
|
+
inputs = toArray(element.elements);
|
438
|
+
}
|
439
|
+
params = [];
|
440
|
+
inputs.forEach(function(input) {
|
441
|
+
if (!input.name || input.disabled) {
|
442
|
+
return;
|
443
|
+
}
|
444
|
+
if (matches(input, 'select')) {
|
445
|
+
return toArray(input.options).forEach(function(option) {
|
446
|
+
if (option.selected) {
|
447
|
+
return params.push({
|
448
|
+
name: input.name,
|
449
|
+
value: option.value
|
450
|
+
});
|
451
|
+
}
|
452
|
+
});
|
453
|
+
} else if (input.checked || ['radio', 'checkbox', 'submit'].indexOf(input.type) === -1) {
|
454
|
+
return params.push({
|
455
|
+
name: input.name,
|
456
|
+
value: input.value
|
457
|
+
});
|
458
|
+
}
|
459
|
+
});
|
460
|
+
if (additionalParam) {
|
461
|
+
params.push(additionalParam);
|
462
|
+
}
|
463
|
+
return params.map(function(param) {
|
464
|
+
if (param.name != null) {
|
465
|
+
return (encodeURIComponent(param.name)) + "=" + (encodeURIComponent(param.value));
|
466
|
+
} else {
|
467
|
+
return param;
|
468
|
+
}
|
469
|
+
}).join('&');
|
470
|
+
};
|
471
|
+
|
472
|
+
Rails.formElements = function(form, selector) {
|
473
|
+
if (matches(form, 'form')) {
|
474
|
+
return toArray(form.elements).filter(function(el) {
|
475
|
+
return matches(el, selector);
|
476
|
+
});
|
477
|
+
} else {
|
478
|
+
return toArray(form.querySelectorAll(selector));
|
479
|
+
}
|
480
|
+
};
|
481
|
+
|
482
|
+
}).call(this);
|
483
|
+
(function() {
|
484
|
+
var allowAction, fire, stopEverything;
|
485
|
+
|
486
|
+
fire = Rails.fire, stopEverything = Rails.stopEverything;
|
487
|
+
|
488
|
+
Rails.handleConfirm = function(e) {
|
489
|
+
if (!allowAction(this)) {
|
490
|
+
return stopEverything(e);
|
491
|
+
}
|
492
|
+
};
|
493
|
+
|
494
|
+
allowAction = function(element) {
|
495
|
+
var answer, callback, message;
|
496
|
+
message = element.getAttribute('data-confirm');
|
497
|
+
if (!message) {
|
498
|
+
return true;
|
499
|
+
}
|
500
|
+
answer = false;
|
501
|
+
if (fire(element, 'confirm')) {
|
502
|
+
try {
|
503
|
+
answer = confirm(message);
|
504
|
+
} catch (error) {}
|
505
|
+
callback = fire(element, 'confirm:complete', [answer]);
|
506
|
+
}
|
507
|
+
return answer && callback;
|
508
|
+
};
|
509
|
+
|
510
|
+
}).call(this);
|
511
|
+
(function() {
|
512
|
+
var disableFormElement, disableFormElements, disableLinkElement, enableFormElement, enableFormElements, enableLinkElement, formElements, getData, matches, setData, stopEverything;
|
513
|
+
|
514
|
+
matches = Rails.matches, getData = Rails.getData, setData = Rails.setData, stopEverything = Rails.stopEverything, formElements = Rails.formElements;
|
515
|
+
|
516
|
+
Rails.handleDisabledElement = function(e) {
|
517
|
+
var element;
|
518
|
+
element = this;
|
519
|
+
if (element.disabled) {
|
520
|
+
return stopEverything(e);
|
521
|
+
}
|
522
|
+
};
|
523
|
+
|
524
|
+
Rails.enableElement = function(e) {
|
525
|
+
var element;
|
526
|
+
element = e instanceof Event ? e.target : e;
|
527
|
+
if (matches(element, Rails.linkDisableSelector)) {
|
528
|
+
return enableLinkElement(element);
|
529
|
+
} else if (matches(element, Rails.buttonDisableSelector) || matches(element, Rails.formEnableSelector)) {
|
530
|
+
return enableFormElement(element);
|
531
|
+
} else if (matches(element, Rails.formSubmitSelector)) {
|
532
|
+
return enableFormElements(element);
|
533
|
+
}
|
534
|
+
};
|
535
|
+
|
536
|
+
Rails.disableElement = function(e) {
|
537
|
+
var element;
|
538
|
+
element = e instanceof Event ? e.target : e;
|
539
|
+
if (matches(element, Rails.linkDisableSelector)) {
|
540
|
+
return disableLinkElement(element);
|
541
|
+
} else if (matches(element, Rails.buttonDisableSelector) || matches(element, Rails.formDisableSelector)) {
|
542
|
+
return disableFormElement(element);
|
543
|
+
} else if (matches(element, Rails.formSubmitSelector)) {
|
544
|
+
return disableFormElements(element);
|
545
|
+
}
|
546
|
+
};
|
547
|
+
|
548
|
+
disableLinkElement = function(element) {
|
549
|
+
var replacement;
|
550
|
+
replacement = element.getAttribute('data-disable-with');
|
551
|
+
if (replacement != null) {
|
552
|
+
setData(element, 'ujs:enable-with', element.innerHTML);
|
553
|
+
element.innerHTML = replacement;
|
554
|
+
}
|
555
|
+
element.addEventListener('click', stopEverything);
|
556
|
+
return setData(element, 'ujs:disabled', true);
|
557
|
+
};
|
558
|
+
|
559
|
+
enableLinkElement = function(element) {
|
560
|
+
var originalText;
|
561
|
+
originalText = getData(element, 'ujs:enable-with');
|
562
|
+
if (originalText != null) {
|
563
|
+
element.innerHTML = originalText;
|
564
|
+
setData(element, 'ujs:enable-with', null);
|
565
|
+
}
|
566
|
+
element.removeEventListener('click', stopEverything);
|
567
|
+
return setData(element, 'ujs:disabled', null);
|
568
|
+
};
|
569
|
+
|
570
|
+
disableFormElements = function(form) {
|
571
|
+
return formElements(form, Rails.formDisableSelector).forEach(disableFormElement);
|
572
|
+
};
|
573
|
+
|
574
|
+
disableFormElement = function(element) {
|
575
|
+
var replacement;
|
576
|
+
replacement = element.getAttribute('data-disable-with');
|
577
|
+
if (replacement != null) {
|
578
|
+
if (matches(element, 'button')) {
|
579
|
+
setData(element, 'ujs:enable-with', element.innerHTML);
|
580
|
+
element.innerHTML = replacement;
|
581
|
+
} else {
|
582
|
+
setData(element, 'ujs:enable-with', element.value);
|
583
|
+
element.value = replacement;
|
584
|
+
}
|
585
|
+
}
|
586
|
+
element.disabled = true;
|
587
|
+
return setData(element, 'ujs:disabled', true);
|
588
|
+
};
|
589
|
+
|
590
|
+
enableFormElements = function(form) {
|
591
|
+
return formElements(form, Rails.formEnableSelector).forEach(enableFormElement);
|
592
|
+
};
|
593
|
+
|
594
|
+
enableFormElement = function(element) {
|
595
|
+
var originalText;
|
596
|
+
originalText = getData(element, 'ujs:enable-with');
|
597
|
+
if (originalText != null) {
|
598
|
+
if (matches(element, 'button')) {
|
599
|
+
element.innerHTML = originalText;
|
600
|
+
} else {
|
601
|
+
element.value = originalText;
|
602
|
+
}
|
603
|
+
setData(element, 'ujs:enable-with', null);
|
604
|
+
}
|
605
|
+
element.disabled = false;
|
606
|
+
return setData(element, 'ujs:disabled', null);
|
607
|
+
};
|
608
|
+
|
609
|
+
}).call(this);
|
610
|
+
(function() {
|
611
|
+
var stopEverything;
|
612
|
+
|
613
|
+
stopEverything = Rails.stopEverything;
|
614
|
+
|
615
|
+
Rails.handleMethod = function(e) {
|
616
|
+
var csrfParam, csrfToken, form, formContent, href, link, method;
|
617
|
+
link = this;
|
618
|
+
method = link.getAttribute('data-method');
|
619
|
+
if (!method) {
|
620
|
+
return;
|
621
|
+
}
|
622
|
+
href = Rails.href(link);
|
623
|
+
csrfToken = Rails.csrfToken();
|
624
|
+
csrfParam = Rails.csrfParam();
|
625
|
+
form = document.createElement('form');
|
626
|
+
formContent = "<input name='_method' value='" + method + "' type='hidden' />";
|
627
|
+
if ((csrfParam != null) && (csrfToken != null) && !Rails.isCrossDomain(href)) {
|
628
|
+
formContent += "<input name='" + csrfParam + "' value='" + csrfToken + "' type='hidden' />";
|
629
|
+
}
|
630
|
+
formContent += '<input type="submit" />';
|
631
|
+
form.method = 'post';
|
632
|
+
form.action = href;
|
633
|
+
form.target = link.target;
|
634
|
+
form.innerHTML = formContent;
|
635
|
+
form.style.display = 'none';
|
636
|
+
document.body.appendChild(form);
|
637
|
+
form.querySelector('[type="submit"]').click();
|
638
|
+
return stopEverything(e);
|
639
|
+
};
|
640
|
+
|
641
|
+
}).call(this);
|
642
|
+
(function() {
|
643
|
+
var ajax, fire, getData, isCrossDomain, isRemote, matches, serializeElement, setData, stopEverything,
|
644
|
+
slice = [].slice;
|
645
|
+
|
646
|
+
matches = Rails.matches, getData = Rails.getData, setData = Rails.setData, fire = Rails.fire, stopEverything = Rails.stopEverything, ajax = Rails.ajax, isCrossDomain = Rails.isCrossDomain, serializeElement = Rails.serializeElement;
|
647
|
+
|
648
|
+
isRemote = function(element) {
|
649
|
+
var value;
|
650
|
+
value = element.getAttribute('data-remote');
|
651
|
+
return (value != null) && value !== 'false';
|
652
|
+
};
|
653
|
+
|
654
|
+
Rails.handleRemote = function(e) {
|
655
|
+
var button, data, dataType, element, method, url, withCredentials;
|
656
|
+
element = this;
|
657
|
+
if (!isRemote(element)) {
|
658
|
+
return true;
|
659
|
+
}
|
660
|
+
if (!fire(element, 'ajax:before')) {
|
661
|
+
fire(element, 'ajax:stopped');
|
662
|
+
return false;
|
663
|
+
}
|
664
|
+
withCredentials = element.getAttribute('data-with-credentials');
|
665
|
+
dataType = element.getAttribute('data-type') || 'script';
|
666
|
+
if (matches(element, Rails.formSubmitSelector)) {
|
667
|
+
button = getData(element, 'ujs:submit-button');
|
668
|
+
method = getData(element, 'ujs:submit-button-formmethod') || element.method;
|
669
|
+
url = getData(element, 'ujs:submit-button-formaction') || element.getAttribute('action') || location.href;
|
670
|
+
if (method.toUpperCase() === 'GET') {
|
671
|
+
url = url.replace(/\?.*$/, '');
|
672
|
+
}
|
673
|
+
if (element.enctype === 'multipart/form-data') {
|
674
|
+
data = new FormData(element);
|
675
|
+
if (button != null) {
|
676
|
+
data.append(button.name, button.value);
|
677
|
+
}
|
678
|
+
} else {
|
679
|
+
data = serializeElement(element, button);
|
680
|
+
}
|
681
|
+
setData(element, 'ujs:submit-button', null);
|
682
|
+
setData(element, 'ujs:submit-button-formmethod', null);
|
683
|
+
setData(element, 'ujs:submit-button-formaction', null);
|
684
|
+
} else if (matches(element, Rails.buttonClickSelector) || matches(element, Rails.inputChangeSelector)) {
|
685
|
+
method = element.getAttribute('data-method');
|
686
|
+
url = element.getAttribute('data-url');
|
687
|
+
data = serializeElement(element, element.getAttribute('data-params'));
|
688
|
+
} else {
|
689
|
+
method = element.getAttribute('data-method');
|
690
|
+
url = Rails.href(element);
|
691
|
+
data = element.getAttribute('data-params');
|
692
|
+
}
|
693
|
+
ajax({
|
694
|
+
type: method || 'GET',
|
695
|
+
url: url,
|
696
|
+
data: data,
|
697
|
+
dataType: dataType,
|
698
|
+
beforeSend: function(xhr, options) {
|
699
|
+
if (fire(element, 'ajax:beforeSend', [xhr, options])) {
|
700
|
+
return fire(element, 'ajax:send', [xhr]);
|
701
|
+
} else {
|
702
|
+
fire(element, 'ajax:stopped');
|
703
|
+
return false;
|
704
|
+
}
|
705
|
+
},
|
706
|
+
success: function() {
|
707
|
+
var args;
|
708
|
+
args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
709
|
+
return fire(element, 'ajax:success', args);
|
710
|
+
},
|
711
|
+
error: function() {
|
712
|
+
var args;
|
713
|
+
args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
714
|
+
return fire(element, 'ajax:error', args);
|
715
|
+
},
|
716
|
+
complete: function() {
|
717
|
+
var args;
|
718
|
+
args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
719
|
+
return fire(element, 'ajax:complete', args);
|
720
|
+
},
|
721
|
+
crossDomain: isCrossDomain(url),
|
722
|
+
withCredentials: (withCredentials != null) && withCredentials !== 'false'
|
723
|
+
});
|
724
|
+
return stopEverything(e);
|
725
|
+
};
|
726
|
+
|
727
|
+
Rails.formSubmitButtonClick = function(e) {
|
728
|
+
var button, form;
|
729
|
+
button = this;
|
730
|
+
form = button.form;
|
731
|
+
if (!form) {
|
732
|
+
return;
|
733
|
+
}
|
734
|
+
if (button.name) {
|
735
|
+
setData(form, 'ujs:submit-button', {
|
736
|
+
name: button.name,
|
737
|
+
value: button.value
|
738
|
+
});
|
739
|
+
}
|
740
|
+
setData(form, 'ujs:formnovalidate-button', button.formNoValidate);
|
741
|
+
setData(form, 'ujs:submit-button-formaction', button.getAttribute('formaction'));
|
742
|
+
return setData(form, 'ujs:submit-button-formmethod', button.getAttribute('formmethod'));
|
743
|
+
};
|
744
|
+
|
745
|
+
Rails.preventInsignificantClick = function(e) {
|
746
|
+
var data, insignificantMetaClick, link, metaClick, method, primaryMouseKey;
|
747
|
+
link = this;
|
748
|
+
method = (link.getAttribute('data-method') || 'GET').toUpperCase();
|
749
|
+
data = link.getAttribute('data-params');
|
750
|
+
metaClick = e.metaKey || e.ctrlKey;
|
751
|
+
insignificantMetaClick = metaClick && method === 'GET' && !data;
|
752
|
+
primaryMouseKey = e.button === 0;
|
753
|
+
if (!primaryMouseKey || insignificantMetaClick) {
|
754
|
+
return e.stopImmediatePropagation();
|
755
|
+
}
|
756
|
+
};
|
757
|
+
|
758
|
+
}).call(this);
|
759
|
+
(function() {
|
760
|
+
var $, CSRFProtection, delegate, disableElement, enableElement, fire, formSubmitButtonClick, getData, handleConfirm, handleDisabledElement, handleMethod, handleRemote, loadCSPNonce, preventInsignificantClick, refreshCSRFTokens;
|
761
|
+
|
762
|
+
fire = Rails.fire, delegate = Rails.delegate, getData = Rails.getData, $ = Rails.$, refreshCSRFTokens = Rails.refreshCSRFTokens, CSRFProtection = Rails.CSRFProtection, loadCSPNonce = Rails.loadCSPNonce, enableElement = Rails.enableElement, disableElement = Rails.disableElement, handleDisabledElement = Rails.handleDisabledElement, handleConfirm = Rails.handleConfirm, preventInsignificantClick = Rails.preventInsignificantClick, handleRemote = Rails.handleRemote, formSubmitButtonClick = Rails.formSubmitButtonClick, handleMethod = Rails.handleMethod;
|
763
|
+
|
764
|
+
if ((typeof jQuery !== "undefined" && jQuery !== null) && (jQuery.ajax != null)) {
|
765
|
+
if (jQuery.rails) {
|
766
|
+
throw new Error('If you load both jquery_ujs and rails-ujs, use rails-ujs only.');
|
767
|
+
}
|
768
|
+
jQuery.rails = Rails;
|
769
|
+
jQuery.ajaxPrefilter(function(options, originalOptions, xhr) {
|
770
|
+
if (!options.crossDomain) {
|
771
|
+
return CSRFProtection(xhr);
|
772
|
+
}
|
773
|
+
});
|
774
|
+
}
|
775
|
+
|
776
|
+
Rails.start = function() {
|
777
|
+
if (window._rails_loaded) {
|
778
|
+
throw new Error('rails-ujs has already been loaded!');
|
779
|
+
}
|
780
|
+
window.addEventListener('pageshow', function() {
|
781
|
+
$(Rails.formEnableSelector).forEach(function(el) {
|
782
|
+
if (getData(el, 'ujs:disabled')) {
|
783
|
+
return enableElement(el);
|
784
|
+
}
|
785
|
+
});
|
786
|
+
return $(Rails.linkDisableSelector).forEach(function(el) {
|
787
|
+
if (getData(el, 'ujs:disabled')) {
|
788
|
+
return enableElement(el);
|
789
|
+
}
|
790
|
+
});
|
791
|
+
});
|
792
|
+
delegate(document, Rails.linkDisableSelector, 'ajax:complete', enableElement);
|
793
|
+
delegate(document, Rails.linkDisableSelector, 'ajax:stopped', enableElement);
|
794
|
+
delegate(document, Rails.buttonDisableSelector, 'ajax:complete', enableElement);
|
795
|
+
delegate(document, Rails.buttonDisableSelector, 'ajax:stopped', enableElement);
|
796
|
+
delegate(document, Rails.linkClickSelector, 'click', preventInsignificantClick);
|
797
|
+
delegate(document, Rails.linkClickSelector, 'click', handleDisabledElement);
|
798
|
+
delegate(document, Rails.linkClickSelector, 'click', handleConfirm);
|
799
|
+
delegate(document, Rails.linkClickSelector, 'click', disableElement);
|
800
|
+
delegate(document, Rails.linkClickSelector, 'click', handleRemote);
|
801
|
+
delegate(document, Rails.linkClickSelector, 'click', handleMethod);
|
802
|
+
delegate(document, Rails.buttonClickSelector, 'click', preventInsignificantClick);
|
803
|
+
delegate(document, Rails.buttonClickSelector, 'click', handleDisabledElement);
|
804
|
+
delegate(document, Rails.buttonClickSelector, 'click', handleConfirm);
|
805
|
+
delegate(document, Rails.buttonClickSelector, 'click', disableElement);
|
806
|
+
delegate(document, Rails.buttonClickSelector, 'click', handleRemote);
|
807
|
+
delegate(document, Rails.inputChangeSelector, 'change', handleDisabledElement);
|
808
|
+
delegate(document, Rails.inputChangeSelector, 'change', handleConfirm);
|
809
|
+
delegate(document, Rails.inputChangeSelector, 'change', handleRemote);
|
810
|
+
delegate(document, Rails.formSubmitSelector, 'submit', handleDisabledElement);
|
811
|
+
delegate(document, Rails.formSubmitSelector, 'submit', handleConfirm);
|
812
|
+
delegate(document, Rails.formSubmitSelector, 'submit', handleRemote);
|
813
|
+
delegate(document, Rails.formSubmitSelector, 'submit', function(e) {
|
814
|
+
return setTimeout((function() {
|
815
|
+
return disableElement(e);
|
816
|
+
}), 13);
|
817
|
+
});
|
818
|
+
delegate(document, Rails.formSubmitSelector, 'ajax:send', disableElement);
|
819
|
+
delegate(document, Rails.formSubmitSelector, 'ajax:complete', enableElement);
|
820
|
+
delegate(document, Rails.formInputClickSelector, 'click', preventInsignificantClick);
|
821
|
+
delegate(document, Rails.formInputClickSelector, 'click', handleDisabledElement);
|
822
|
+
delegate(document, Rails.formInputClickSelector, 'click', handleConfirm);
|
823
|
+
delegate(document, Rails.formInputClickSelector, 'click', formSubmitButtonClick);
|
824
|
+
document.addEventListener('DOMContentLoaded', refreshCSRFTokens);
|
825
|
+
document.addEventListener('DOMContentLoaded', loadCSPNonce);
|
826
|
+
return window._rails_loaded = true;
|
827
|
+
};
|
828
|
+
|
829
|
+
if (window.Rails === Rails && fire(document, 'rails:attachBindings')) {
|
830
|
+
Rails.start();
|
831
|
+
}
|
832
|
+
|
833
|
+
}).call(this);
|
834
|
+
}).call(this);
|
835
|
+
|
836
|
+
if (typeof module === "object" && module.exports) {
|
837
|
+
module.exports = Rails;
|
838
|
+
} else if (typeof define === "function" && define.amd) {
|
839
|
+
define(Rails);
|
840
|
+
}
|
841
|
+
}).call(this);
|
842
|
+
|
843
|
+
},{}],"../node_modules/@stimulus/core/dist/src/event_listener.js":[function(require,module,exports) {
|
844
|
+
"use strict";
|
845
|
+
|
846
|
+
Object.defineProperty(exports, "__esModule", {
|
847
|
+
value: true
|
848
|
+
});
|
849
|
+
exports.EventListener = void 0;
|
850
|
+
|
851
|
+
var EventListener =
|
852
|
+
/** @class */
|
853
|
+
function () {
|
854
|
+
function EventListener(eventTarget, eventName) {
|
855
|
+
this.eventTarget = eventTarget;
|
856
|
+
this.eventName = eventName;
|
857
|
+
this.unorderedBindings = new Set();
|
858
|
+
}
|
859
|
+
|
860
|
+
EventListener.prototype.connect = function () {
|
861
|
+
this.eventTarget.addEventListener(this.eventName, this, false);
|
862
|
+
};
|
863
|
+
|
864
|
+
EventListener.prototype.disconnect = function () {
|
865
|
+
this.eventTarget.removeEventListener(this.eventName, this, false);
|
866
|
+
}; // Binding observer delegate
|
867
|
+
|
868
|
+
/** @hidden */
|
869
|
+
|
870
|
+
|
871
|
+
EventListener.prototype.bindingConnected = function (binding) {
|
872
|
+
this.unorderedBindings.add(binding);
|
873
|
+
};
|
874
|
+
/** @hidden */
|
875
|
+
|
876
|
+
|
877
|
+
EventListener.prototype.bindingDisconnected = function (binding) {
|
878
|
+
this.unorderedBindings.delete(binding);
|
879
|
+
};
|
880
|
+
|
881
|
+
EventListener.prototype.handleEvent = function (event) {
|
882
|
+
var extendedEvent = extendEvent(event);
|
883
|
+
|
884
|
+
for (var _i = 0, _a = this.bindings; _i < _a.length; _i++) {
|
885
|
+
var binding = _a[_i];
|
886
|
+
|
887
|
+
if (extendedEvent.immediatePropagationStopped) {
|
888
|
+
break;
|
889
|
+
} else {
|
890
|
+
binding.handleEvent(extendedEvent);
|
891
|
+
}
|
892
|
+
}
|
893
|
+
};
|
894
|
+
|
895
|
+
Object.defineProperty(EventListener.prototype, "bindings", {
|
896
|
+
get: function () {
|
897
|
+
return Array.from(this.unorderedBindings).sort(function (left, right) {
|
898
|
+
var leftIndex = left.index,
|
899
|
+
rightIndex = right.index;
|
900
|
+
return leftIndex < rightIndex ? -1 : leftIndex > rightIndex ? 1 : 0;
|
901
|
+
});
|
902
|
+
},
|
903
|
+
enumerable: true,
|
904
|
+
configurable: true
|
905
|
+
});
|
906
|
+
return EventListener;
|
907
|
+
}();
|
908
|
+
|
909
|
+
exports.EventListener = EventListener;
|
910
|
+
|
911
|
+
function extendEvent(event) {
|
912
|
+
if ("immediatePropagationStopped" in event) {
|
913
|
+
return event;
|
914
|
+
} else {
|
915
|
+
var stopImmediatePropagation_1 = event.stopImmediatePropagation;
|
916
|
+
return Object.assign(event, {
|
917
|
+
immediatePropagationStopped: false,
|
918
|
+
stopImmediatePropagation: function () {
|
919
|
+
this.immediatePropagationStopped = true;
|
920
|
+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BQyxLQUFLLEVBQUU7WUFDMUIsMkJBQTJCLEVBQUUsS0FBSztZQUNsQyx3QkFBd0I7Z0JBQ3RCLElBQUksQ0FBQywyQkFBMkIsR0FBRyxJQUFJLENBQUE7Z0JBQ3ZDLDBCQUF3QixDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsQ0FBQTtZQUNyQyxDQUFDO1NBQ0YsQ0FBQyxDQUFBO0tBQ0g7QUFDSCxDQUFDIn0=
|
925
|
+
},{}],"../node_modules/@stimulus/core/dist/src/dispatcher.js":[function(require,module,exports) {
|
926
|
+
"use strict";
|
927
|
+
|
928
|
+
Object.defineProperty(exports, "__esModule", {
|
929
|
+
value: true
|
930
|
+
});
|
931
|
+
exports.Dispatcher = void 0;
|
932
|
+
|
933
|
+
var _event_listener = require("./event_listener");
|
934
|
+
|
935
|
+
var Dispatcher =
|
936
|
+
/** @class */
|
937
|
+
function () {
|
938
|
+
function Dispatcher(application) {
|
939
|
+
this.application = application;
|
940
|
+
this.eventListenerMaps = new Map();
|
941
|
+
this.started = false;
|
942
|
+
}
|
943
|
+
|
944
|
+
Dispatcher.prototype.start = function () {
|
945
|
+
if (!this.started) {
|
946
|
+
this.started = true;
|
947
|
+
this.eventListeners.forEach(function (eventListener) {
|
948
|
+
return eventListener.connect();
|
949
|
+
});
|
950
|
+
}
|
951
|
+
};
|
952
|
+
|
953
|
+
Dispatcher.prototype.stop = function () {
|
954
|
+
if (this.started) {
|
955
|
+
this.started = false;
|
956
|
+
this.eventListeners.forEach(function (eventListener) {
|
957
|
+
return eventListener.disconnect();
|
958
|
+
});
|
959
|
+
}
|
960
|
+
};
|
961
|
+
|
962
|
+
Object.defineProperty(Dispatcher.prototype, "eventListeners", {
|
963
|
+
get: function () {
|
964
|
+
return Array.from(this.eventListenerMaps.values()).reduce(function (listeners, map) {
|
965
|
+
return listeners.concat(Array.from(map.values()));
|
966
|
+
}, []);
|
967
|
+
},
|
968
|
+
enumerable: true,
|
969
|
+
configurable: true
|
970
|
+
}); // Binding observer delegate
|
971
|
+
|
972
|
+
/** @hidden */
|
973
|
+
|
974
|
+
Dispatcher.prototype.bindingConnected = function (binding) {
|
975
|
+
this.fetchEventListenerForBinding(binding).bindingConnected(binding);
|
976
|
+
};
|
977
|
+
/** @hidden */
|
978
|
+
|
979
|
+
|
980
|
+
Dispatcher.prototype.bindingDisconnected = function (binding) {
|
981
|
+
this.fetchEventListenerForBinding(binding).bindingDisconnected(binding);
|
982
|
+
}; // Error handling
|
983
|
+
|
984
|
+
|
985
|
+
Dispatcher.prototype.handleError = function (error, message, detail) {
|
986
|
+
if (detail === void 0) {
|
987
|
+
detail = {};
|
988
|
+
}
|
989
|
+
|
990
|
+
this.application.handleError(error, "Error " + message, detail);
|
991
|
+
};
|
992
|
+
|
993
|
+
Dispatcher.prototype.fetchEventListenerForBinding = function (binding) {
|
994
|
+
var eventTarget = binding.eventTarget,
|
995
|
+
eventName = binding.eventName;
|
996
|
+
return this.fetchEventListener(eventTarget, eventName);
|
997
|
+
};
|
998
|
+
|
999
|
+
Dispatcher.prototype.fetchEventListener = function (eventTarget, eventName) {
|
1000
|
+
var eventListenerMap = this.fetchEventListenerMapForEventTarget(eventTarget);
|
1001
|
+
var eventListener = eventListenerMap.get(eventName);
|
1002
|
+
|
1003
|
+
if (!eventListener) {
|
1004
|
+
eventListener = this.createEventListener(eventTarget, eventName);
|
1005
|
+
eventListenerMap.set(eventName, eventListener);
|
1006
|
+
}
|
1007
|
+
|
1008
|
+
return eventListener;
|
1009
|
+
};
|
1010
|
+
|
1011
|
+
Dispatcher.prototype.createEventListener = function (eventTarget, eventName) {
|
1012
|
+
var eventListener = new _event_listener.EventListener(eventTarget, eventName);
|
1013
|
+
|
1014
|
+
if (this.started) {
|
1015
|
+
eventListener.connect();
|
1016
|
+
}
|
1017
|
+
|
1018
|
+
return eventListener;
|
1019
|
+
};
|
1020
|
+
|
1021
|
+
Dispatcher.prototype.fetchEventListenerMapForEventTarget = function (eventTarget) {
|
1022
|
+
var eventListenerMap = this.eventListenerMaps.get(eventTarget);
|
1023
|
+
|
1024
|
+
if (!eventListenerMap) {
|
1025
|
+
eventListenerMap = new Map();
|
1026
|
+
this.eventListenerMaps.set(eventTarget, eventListenerMap);
|
1027
|
+
}
|
1028
|
+
|
1029
|
+
return eventListenerMap;
|
1030
|
+
};
|
1031
|
+
|
1032
|
+
return Dispatcher;
|
1033
|
+
}(); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlzcGF0Y2hlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kaXNwYXRjaGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUdBLE9BQU8sRUFBRSxhQUFhLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQTtBQUVoRDtJQUtFLG9CQUFZLFdBQXdCO1FBQ2xDLElBQUksQ0FBQyxXQUFXLEdBQUcsV0FBVyxDQUFBO1FBQzlCLElBQUksQ0FBQyxpQkFBaUIsR0FBRyxJQUFJLEdBQUcsQ0FBQTtRQUNoQyxJQUFJLENBQUMsT0FBTyxHQUFHLEtBQUssQ0FBQTtJQUN0QixDQUFDO0lBRUQsMEJBQUssR0FBTDtRQUNFLElBQUksQ0FBQyxJQUFJLENBQUMsT0FBTyxFQUFFO1lBQ2pCLElBQUksQ0FBQyxPQUFPLEdBQUcsSUFBSSxDQUFBO1lBQ25CLElBQUksQ0FBQyxjQUFjLENBQUMsT0FBTyxDQUFDLFVBQUEsYUFBYSxJQUFJLE9BQUEsYUFBYSxDQUFDLE9BQU8sRUFBRSxFQUF2QixDQUF1QixDQUFDLENBQUE7U0FDdEU7SUFDSCxDQUFDO0lBRUQseUJBQUksR0FBSjtRQUNFLElBQUksSUFBSSxDQUFDLE9BQU8sRUFBRTtZQUNoQixJQUFJLENBQUMsT0FBTyxHQUFHLEtBQUssQ0FBQTtZQUNwQixJQUFJLENBQUMsY0FBYyxDQUFD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0FBQyxnQkFBZ0IsRUFBRTtZQUNyQixnQkFBZ0IsR0FBRyxJQUFJLEdBQUcsQ0FBQTtZQUMxQixJQUFJLENBQUMsaUJBQWlCLENBQUMsR0FBRyxDQUFDLFdBQVcsRUFBRSxnQkFBZ0IsQ0FBQyxDQUFBO1NBQzFEO1FBQ0QsT0FBTyxnQkFBZ0IsQ0FBQTtJQUN6QixDQUFDO0lBQ0gsaUJBQUM7QUFBRCxDQUFDLEFBL0VELElBK0VDIn0=
|
1034
|
+
|
1035
|
+
|
1036
|
+
exports.Dispatcher = Dispatcher;
|
1037
|
+
},{"./event_listener":"../node_modules/@stimulus/core/dist/src/event_listener.js"}],"../node_modules/@stimulus/core/dist/src/action_descriptor.js":[function(require,module,exports) {
|
1038
|
+
"use strict";
|
1039
|
+
|
1040
|
+
Object.defineProperty(exports, "__esModule", {
|
1041
|
+
value: true
|
1042
|
+
});
|
1043
|
+
exports.parseDescriptorString = parseDescriptorString;
|
1044
|
+
exports.stringifyEventTarget = stringifyEventTarget;
|
1045
|
+
// capture nos.: 12 23 4 43 1 5 56 7 76
|
1046
|
+
var descriptorPattern = /^((.+?)(@(window|document))?->)?(.+?)(#(.+))?$/;
|
1047
|
+
|
1048
|
+
function parseDescriptorString(descriptorString) {
|
1049
|
+
var source = descriptorString.trim();
|
1050
|
+
var matches = source.match(descriptorPattern) || [];
|
1051
|
+
return {
|
1052
|
+
eventTarget: parseEventTarget(matches[4]),
|
1053
|
+
eventName: matches[2],
|
1054
|
+
identifier: matches[5],
|
1055
|
+
methodName: matches[7]
|
1056
|
+
};
|
1057
|
+
}
|
1058
|
+
|
1059
|
+
function parseEventTarget(eventTargetName) {
|
1060
|
+
if (eventTargetName == "window") {
|
1061
|
+
return window;
|
1062
|
+
} else if (eventTargetName == "document") {
|
1063
|
+
return document;
|
1064
|
+
}
|
1065
|
+
}
|
1066
|
+
|
1067
|
+
function stringifyEventTarget(eventTarget) {
|
1068
|
+
if (eventTarget == window) {
|
1069
|
+
return "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DQUFBO0tBQ2hCO1NBQU0sSUFBSSxXQUFXLElBQUksUUFBUSxFQUFFO1FBQ2xDLE9BQU8sVUFBVSxDQUFBO0tBQ2xCO0FBQ0gsQ0FBQyJ9
|
1074
|
+
},{}],"../node_modules/@stimulus/core/dist/src/action.js":[function(require,module,exports) {
|
1075
|
+
"use strict";
|
1076
|
+
|
1077
|
+
Object.defineProperty(exports, "__esModule", {
|
1078
|
+
value: true
|
1079
|
+
});
|
1080
|
+
exports.getDefaultEventNameForElement = getDefaultEventNameForElement;
|
1081
|
+
exports.Action = void 0;
|
1082
|
+
|
1083
|
+
var _action_descriptor = require("./action_descriptor");
|
1084
|
+
|
1085
|
+
var Action =
|
1086
|
+
/** @class */
|
1087
|
+
function () {
|
1088
|
+
function Action(element, index, descriptor) {
|
1089
|
+
this.element = element;
|
1090
|
+
this.index = index;
|
1091
|
+
this.eventTarget = descriptor.eventTarget || element;
|
1092
|
+
this.eventName = descriptor.eventName || getDefaultEventNameForElement(element) || error("missing event name");
|
1093
|
+
this.identifier = descriptor.identifier || error("missing identifier");
|
1094
|
+
this.methodName = descriptor.methodName || error("missing method name");
|
1095
|
+
}
|
1096
|
+
|
1097
|
+
Action.forToken = function (token) {
|
1098
|
+
return new this(token.element, token.index, (0, _action_descriptor.parseDescriptorString)(token.content));
|
1099
|
+
};
|
1100
|
+
|
1101
|
+
Action.prototype.toString = function () {
|
1102
|
+
var eventNameSuffix = this.eventTargetName ? "@" + this.eventTargetName : "";
|
1103
|
+
return "" + this.eventName + eventNameSuffix + "->" + this.identifier + "#" + this.methodName;
|
1104
|
+
};
|
1105
|
+
|
1106
|
+
Object.defineProperty(Action.prototype, "eventTargetName", {
|
1107
|
+
get: function () {
|
1108
|
+
return (0, _action_descriptor.stringifyEventTarget)(this.eventTarget);
|
1109
|
+
},
|
1110
|
+
enumerable: true,
|
1111
|
+
configurable: true
|
1112
|
+
});
|
1113
|
+
return Action;
|
1114
|
+
}();
|
1115
|
+
|
1116
|
+
exports.Action = Action;
|
1117
|
+
var defaultEventNames = {
|
1118
|
+
"a": function (e) {
|
1119
|
+
return "click";
|
1120
|
+
},
|
1121
|
+
"button": function (e) {
|
1122
|
+
return "click";
|
1123
|
+
},
|
1124
|
+
"form": function (e) {
|
1125
|
+
return "submit";
|
1126
|
+
},
|
1127
|
+
"input": function (e) {
|
1128
|
+
return e.getAttribute("type") == "submit" ? "click" : "change";
|
1129
|
+
},
|
1130
|
+
"select": function (e) {
|
1131
|
+
return "change";
|
1132
|
+
},
|
1133
|
+
"textarea": function (e) {
|
1134
|
+
return "change";
|
1135
|
+
}
|
1136
|
+
};
|
1137
|
+
|
1138
|
+
function getDefaultEventNameForElement(element) {
|
1139
|
+
var tagName = element.tagName.toLowerCase();
|
1140
|
+
|
1141
|
+
if (tagName in defaultEventNames) {
|
1142
|
+
return defaultEventNames[tagName](element);
|
1143
|
+
}
|
1144
|
+
}
|
1145
|
+
|
1146
|
+
function error(message) {
|
1147
|
+
throw new Error(message);
|
1148
|
+
} //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWN0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2FjdGlvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQW9CLHFCQUFxQixFQUFFLG9CQUFvQixFQUFFLE1BQU0scUJBQXFCLENBQUE7QUFHbkc7SUFZRSxnQkFBWSxPQUFnQixFQUFFLEtBQWEsRUFBRSxVQUFxQztRQUNoRixJQUFJLENBQUMsT0FBTyxHQUFPLE9BQU8sQ0FBQTtRQUMxQixJQUFJLENBQUMsS0FBSyxHQUFTLEtBQUssQ0FBQTtRQUN4QixJQUFJLENBQUMsV0FBVyxHQUFHLFVBQVUsQ0FBQyxXQUFXLElBQUksT0FBTyxDQUFBO1FBQ3BELElBQUksQ0FBQyxTQUFTLEdBQUssVUFBVSxDQUFDLFNBQVMsSUFBSSw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0FBQyxJQUFJLE9BQUEsT0FBTyxFQUFQLENBQU87SUFDeEIsTUFBTSxFQUFNLFVBQUEsQ0FBQyxJQUFJLE9BQUEsUUFBUSxFQUFSLENBQVE7SUFDekIsT0FBTyxFQUFLLFVBQUEsQ0FBQyxJQUFJLE9BQUEsQ0FBQyxDQUFDLFlBQVksQ0FBQyxNQUFNLENBQUMsSUFBSSxRQUFRLENBQUMsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxDQUFDLENBQUMsUUFBUSxFQUF2RCxDQUF1RDtJQUN4RSxRQUFRLEVBQUksVUFBQSxDQUFDLElBQUksT0FBQSxRQUFRLEVBQVIsQ0FBUTtJQUN6QixVQUFVLEVBQUUsVUFBQSxDQUFDLElBQUksT0FBQSxRQUFRLEVBQVIsQ0FBUTtDQUMxQixDQUFBO0FBRUQsTUFBTSx3Q0FBd0MsT0FBZ0I7SUFDNUQsSUFBTSxPQUFPLEdBQUcsT0FBTyxDQUFDLE9BQU8sQ0FBQyxXQUFXLEVBQUUsQ0FBQTtJQUM3QyxJQUFJLE9BQU8sSUFBSSxpQkFBaUIsRUFBRTtRQUNoQyxPQUFPLGlCQUFpQixDQUFDLE9BQU8sQ0FBQyxDQUFDLE9BQU8sQ0FBQyxDQUFBO0tBQzNDO0FBQ0gsQ0FBQztBQUVELGVBQWUsT0FBZTtJQUM1QixNQUFNLElBQUksS0FBSyxDQUFDLE9BQU8sQ0FBQyxDQUFBO0FBQzFCLENBQUMifQ==
|
1149
|
+
},{"./action_descriptor":"../node_modules/@stimulus/core/dist/src/action_descriptor.js"}],"../node_modules/@stimulus/core/dist/src/binding.js":[function(require,module,exports) {
|
1150
|
+
"use strict";
|
1151
|
+
|
1152
|
+
Object.defineProperty(exports, "__esModule", {
|
1153
|
+
value: true
|
1154
|
+
});
|
1155
|
+
exports.Binding = void 0;
|
1156
|
+
|
1157
|
+
var Binding =
|
1158
|
+
/** @class */
|
1159
|
+
function () {
|
1160
|
+
function Binding(context, action) {
|
1161
|
+
this.context = context;
|
1162
|
+
this.action = action;
|
1163
|
+
}
|
1164
|
+
|
1165
|
+
Object.defineProperty(Binding.prototype, "index", {
|
1166
|
+
get: function () {
|
1167
|
+
return this.action.index;
|
1168
|
+
},
|
1169
|
+
enumerable: true,
|
1170
|
+
configurable: true
|
1171
|
+
});
|
1172
|
+
Object.defineProperty(Binding.prototype, "eventTarget", {
|
1173
|
+
get: function () {
|
1174
|
+
return this.action.eventTarget;
|
1175
|
+
},
|
1176
|
+
enumerable: true,
|
1177
|
+
configurable: true
|
1178
|
+
});
|
1179
|
+
Object.defineProperty(Binding.prototype, "identifier", {
|
1180
|
+
get: function () {
|
1181
|
+
return this.context.identifier;
|
1182
|
+
},
|
1183
|
+
enumerable: true,
|
1184
|
+
configurable: true
|
1185
|
+
});
|
1186
|
+
|
1187
|
+
Binding.prototype.handleEvent = function (event) {
|
1188
|
+
if (this.willBeInvokedByEvent(event)) {
|
1189
|
+
this.invokeWithEvent(event);
|
1190
|
+
}
|
1191
|
+
};
|
1192
|
+
|
1193
|
+
Object.defineProperty(Binding.prototype, "eventName", {
|
1194
|
+
get: function () {
|
1195
|
+
return this.action.eventName;
|
1196
|
+
},
|
1197
|
+
enumerable: true,
|
1198
|
+
configurable: true
|
1199
|
+
});
|
1200
|
+
Object.defineProperty(Binding.prototype, "method", {
|
1201
|
+
get: function () {
|
1202
|
+
var method = this.controller[this.methodName];
|
1203
|
+
|
1204
|
+
if (typeof method == "function") {
|
1205
|
+
return method;
|
1206
|
+
}
|
1207
|
+
|
1208
|
+
throw new Error("Action \"" + this.action + "\" references undefined method \"" + this.methodName + "\"");
|
1209
|
+
},
|
1210
|
+
enumerable: true,
|
1211
|
+
configurable: true
|
1212
|
+
});
|
1213
|
+
|
1214
|
+
Binding.prototype.invokeWithEvent = function (event) {
|
1215
|
+
try {
|
1216
|
+
this.method.call(this.controller, event);
|
1217
|
+
} catch (error) {
|
1218
|
+
var _a = this,
|
1219
|
+
identifier = _a.identifier,
|
1220
|
+
controller = _a.controller,
|
1221
|
+
element = _a.element,
|
1222
|
+
index = _a.index;
|
1223
|
+
|
1224
|
+
var detail = {
|
1225
|
+
identifier: identifier,
|
1226
|
+
controller: controller,
|
1227
|
+
element: element,
|
1228
|
+
index: index,
|
1229
|
+
event: event
|
1230
|
+
};
|
1231
|
+
this.context.handleError(error, "invoking action \"" + this.action + "\"", detail);
|
1232
|
+
}
|
1233
|
+
};
|
1234
|
+
|
1235
|
+
Binding.prototype.willBeInvokedByEvent = function (event) {
|
1236
|
+
var eventTarget = event.target;
|
1237
|
+
|
1238
|
+
if (this.element === eventTarget) {
|
1239
|
+
return true;
|
1240
|
+
} else if (eventTarget instanceof Element && this.element.contains(eventTarget)) {
|
1241
|
+
return this.scope.containsElement(eventTarget);
|
1242
|
+
} else {
|
1243
|
+
return true;
|
1244
|
+
}
|
1245
|
+
};
|
1246
|
+
|
1247
|
+
Object.defineProperty(Binding.prototype, "controller", {
|
1248
|
+
get: function () {
|
1249
|
+
return this.context.controller;
|
1250
|
+
},
|
1251
|
+
enumerable: true,
|
1252
|
+
configurable: true
|
1253
|
+
});
|
1254
|
+
Object.defineProperty(Binding.prototype, "methodName", {
|
1255
|
+
get: function () {
|
1256
|
+
return this.action.methodName;
|
1257
|
+
},
|
1258
|
+
enumerable: true,
|
1259
|
+
configurable: true
|
1260
|
+
});
|
1261
|
+
Object.defineProperty(Binding.prototype, "element", {
|
1262
|
+
get: function () {
|
1263
|
+
return this.scope.element;
|
1264
|
+
},
|
1265
|
+
enumerable: true,
|
1266
|
+
configurable: true
|
1267
|
+
});
|
1268
|
+
Object.defineProperty(Binding.prototype, "scope", {
|
1269
|
+
get: function () {
|
1270
|
+
return this.context.scope;
|
1271
|
+
},
|
1272
|
+
enumerable: true,
|
1273
|
+
configurable: true
|
1274
|
+
});
|
1275
|
+
return Binding;
|
1276
|
+
}(); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmluZGluZy5qcyIsInNvdXJ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E7U0FDL0M7YUFBTTtZQUNMLE9BQU8sSUFBSSxDQUFBO1NBQ1o7SUFDSCxDQUFDO0lBRUQsc0JBQVksK0JBQVU7YUFBdEI7WUFDRSxPQUFPLElBQUksQ0FBQyxPQUFPLENBQUMsVUFBVSxDQUFBO1FBQ2hDLENBQUM7OztPQUFBO0lBRUQsc0JBQVksK0JBQVU7YUFBdEI7WUFDRSxPQUFPLElBQUksQ0FBQyxNQUFNLENBQUMsVUFBVSxDQUFBO1FBQy9CLENBQUM7OztPQUFBO0lBRUQsc0JBQVksNEJBQU87YUFBbkI7WUFDRSxPQUFPLElBQUksQ0FBQyxLQUFLLENBQUMsT0FBTyxDQUFBO1FBQzNCLENBQUM7OztPQUFBO0lBRUQsc0JBQVksMEJBQUs7YUFBakI7WUFDRSxPQUFPLElBQUksQ0FBQyxPQUFPLENBQUMsS0FBSyxDQUFBO1FBQzNCLENBQUM7OztPQUFBO0lBQ0gsY0FBQztBQUFELENBQUMsQUEzRUQsSUEyRUMifQ==
|
1277
|
+
|
1278
|
+
|
1279
|
+
exports.Binding = Binding;
|
1280
|
+
},{}],"../node_modules/@stimulus/mutation-observers/dist/src/element_observer.js":[function(require,module,exports) {
|
1281
|
+
"use strict";
|
1282
|
+
|
1283
|
+
Object.defineProperty(exports, "__esModule", {
|
1284
|
+
value: true
|
1285
|
+
});
|
1286
|
+
exports.ElementObserver = void 0;
|
1287
|
+
|
1288
|
+
var ElementObserver =
|
1289
|
+
/** @class */
|
1290
|
+
function () {
|
1291
|
+
function ElementObserver(element, delegate) {
|
1292
|
+
var _this = this;
|
1293
|
+
|
1294
|
+
this.element = element;
|
1295
|
+
this.started = false;
|
1296
|
+
this.delegate = delegate;
|
1297
|
+
this.elements = new Set();
|
1298
|
+
this.mutationObserver = new MutationObserver(function (mutations) {
|
1299
|
+
return _this.processMutations(mutations);
|
1300
|
+
});
|
1301
|
+
}
|
1302
|
+
|
1303
|
+
ElementObserver.prototype.start = function () {
|
1304
|
+
if (!this.started) {
|
1305
|
+
this.started = true;
|
1306
|
+
this.mutationObserver.observe(this.element, {
|
1307
|
+
attributes: true,
|
1308
|
+
childList: true,
|
1309
|
+
subtree: true
|
1310
|
+
});
|
1311
|
+
this.refresh();
|
1312
|
+
}
|
1313
|
+
};
|
1314
|
+
|
1315
|
+
ElementObserver.prototype.stop = function () {
|
1316
|
+
if (this.started) {
|
1317
|
+
this.mutationObserver.takeRecords();
|
1318
|
+
this.mutationObserver.disconnect();
|
1319
|
+
this.started = false;
|
1320
|
+
}
|
1321
|
+
};
|
1322
|
+
|
1323
|
+
ElementObserver.prototype.refresh = function () {
|
1324
|
+
if (this.started) {
|
1325
|
+
var matches = new Set(this.matchElementsInTree());
|
1326
|
+
|
1327
|
+
for (var _i = 0, _a = Array.from(this.elements); _i < _a.length; _i++) {
|
1328
|
+
var element = _a[_i];
|
1329
|
+
|
1330
|
+
if (!matches.has(element)) {
|
1331
|
+
this.removeElement(element);
|
1332
|
+
}
|
1333
|
+
}
|
1334
|
+
|
1335
|
+
for (var _b = 0, _c = Array.from(matches); _b < _c.length; _b++) {
|
1336
|
+
var element = _c[_b];
|
1337
|
+
this.addElement(element);
|
1338
|
+
}
|
1339
|
+
}
|
1340
|
+
}; // Mutation record processing
|
1341
|
+
|
1342
|
+
|
1343
|
+
ElementObserver.prototype.processMutations = function (mutations) {
|
1344
|
+
if (this.started) {
|
1345
|
+
for (var _i = 0, mutations_1 = mutations; _i < mutations_1.length; _i++) {
|
1346
|
+
var mutation = mutations_1[_i];
|
1347
|
+
this.processMutation(mutation);
|
1348
|
+
}
|
1349
|
+
}
|
1350
|
+
};
|
1351
|
+
|
1352
|
+
ElementObserver.prototype.processMutation = function (mutation) {
|
1353
|
+
if (mutation.type == "attributes") {
|
1354
|
+
this.processAttributeChange(mutation.target, mutation.attributeName);
|
1355
|
+
} else if (mutation.type == "childList") {
|
1356
|
+
this.processRemovedNodes(mutation.removedNodes);
|
1357
|
+
this.processAddedNodes(mutation.addedNodes);
|
1358
|
+
}
|
1359
|
+
};
|
1360
|
+
|
1361
|
+
ElementObserver.prototype.processAttributeChange = function (node, attributeName) {
|
1362
|
+
var element = node;
|
1363
|
+
|
1364
|
+
if (this.elements.has(element)) {
|
1365
|
+
if (this.delegate.elementAttributeChanged && this.matchElement(element)) {
|
1366
|
+
this.delegate.elementAttributeChanged(element, attributeName);
|
1367
|
+
} else {
|
1368
|
+
this.removeElement(element);
|
1369
|
+
}
|
1370
|
+
} else if (this.matchElement(element)) {
|
1371
|
+
this.addElement(element);
|
1372
|
+
}
|
1373
|
+
};
|
1374
|
+
|
1375
|
+
ElementObserver.prototype.processRemovedNodes = function (nodes) {
|
1376
|
+
for (var _i = 0, _a = Array.from(nodes); _i < _a.length; _i++) {
|
1377
|
+
var node = _a[_i];
|
1378
|
+
var element = this.elementFromNode(node);
|
1379
|
+
|
1380
|
+
if (element) {
|
1381
|
+
this.processTree(element, this.removeElement);
|
1382
|
+
}
|
1383
|
+
}
|
1384
|
+
};
|
1385
|
+
|
1386
|
+
ElementObserver.prototype.processAddedNodes = function (nodes) {
|
1387
|
+
for (var _i = 0, _a = Array.from(nodes); _i < _a.length; _i++) {
|
1388
|
+
var node = _a[_i];
|
1389
|
+
var element = this.elementFromNode(node);
|
1390
|
+
|
1391
|
+
if (element && this.elementIsActive(element)) {
|
1392
|
+
this.processTree(element, this.addElement);
|
1393
|
+
}
|
1394
|
+
}
|
1395
|
+
}; // Element matching
|
1396
|
+
|
1397
|
+
|
1398
|
+
ElementObserver.prototype.matchElement = function (element) {
|
1399
|
+
return this.delegate.matchElement(element);
|
1400
|
+
};
|
1401
|
+
|
1402
|
+
ElementObserver.prototype.matchElementsInTree = function (tree) {
|
1403
|
+
if (tree === void 0) {
|
1404
|
+
tree = this.element;
|
1405
|
+
}
|
1406
|
+
|
1407
|
+
return this.delegate.matchElementsInTree(tree);
|
1408
|
+
};
|
1409
|
+
|
1410
|
+
ElementObserver.prototype.processTree = function (tree, processor) {
|
1411
|
+
for (var _i = 0, _a = this.matchElementsInTree(tree); _i < _a.length; _i++) {
|
1412
|
+
var element = _a[_i];
|
1413
|
+
processor.call(this, element);
|
1414
|
+
}
|
1415
|
+
};
|
1416
|
+
|
1417
|
+
ElementObserver.prototype.elementFromNode = function (node) {
|
1418
|
+
if (node.nodeType == Node.ELEMENT_NODE) {
|
1419
|
+
return node;
|
1420
|
+
}
|
1421
|
+
};
|
1422
|
+
|
1423
|
+
ElementObserver.prototype.elementIsActive = function (element) {
|
1424
|
+
if (element.isConnected != this.element.isConnected) {
|
1425
|
+
return false;
|
1426
|
+
} else {
|
1427
|
+
return this.element.contains(element);
|
1428
|
+
}
|
1429
|
+
}; // Element tracking
|
1430
|
+
|
1431
|
+
|
1432
|
+
ElementObserver.prototype.addElement = function (element) {
|
1433
|
+
if (!this.elements.has(element)) {
|
1434
|
+
if (this.elementIsActive(element)) {
|
1435
|
+
this.elements.add(element);
|
1436
|
+
|
1437
|
+
if (this.delegate.elementMatched) {
|
1438
|
+
this.delegate.elementMatched(element);
|
1439
|
+
}
|
1440
|
+
}
|
1441
|
+
}
|
1442
|
+
};
|
1443
|
+
|
1444
|
+
ElementObserver.prototype.removeElement = function (element) {
|
1445
|
+
if (this.elements.has(element)) {
|
1446
|
+
this.elements.delete(element);
|
1447
|
+
|
1448
|
+
if (this.delegate.elementUnmatched) {
|
1449
|
+
this.delegate.elementUnmatched(element);
|
1450
|
+
}
|
1451
|
+
}
|
1452
|
+
};
|
1453
|
+
|
1454
|
+
return ElementObserver;
|
1455
|
+
}(); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZWxlbWVudF9vYnNlcnZlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9lbGVtZW50X29ic2VydmVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQVNBO0lBUUUseUJBQVksT0FBZ0IsRUFBRSxRQUFpQztRQUEvRCxpQkFPQztRQU5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HQUFyQixVQUFzQixPQUFnQjtRQUNwQyxJQUFJLElBQUksQ0FBQyxRQUFRLENBQUMsR0FBRyxDQUFDLE9BQU8sQ0FBQyxFQUFFO1lBQzlCLElBQUksQ0FBQyxRQUFRLENBQUMsTUFBTSxDQUFDLE9BQU8sQ0FBQyxDQUFBO1lBQzdCLElBQUksSUFBSSxDQUFDLFFBQVEsQ0FBQyxnQkFBZ0IsRUFBRTtnQkFDbEMsSUFBSSxDQUFDLFFBQVEsQ0FBQyxnQkFBZ0IsQ0FBQyxPQUFPLENBQUMsQ0FBQTthQUN4QztTQUNGO0lBQ0gsQ0FBQztJQUNILHNCQUFDO0FBQUQsQ0FBQyxBQXRKRCxJQXNKQyJ9
|
1456
|
+
|
1457
|
+
|
1458
|
+
exports.ElementObserver = ElementObserver;
|
1459
|
+
},{}],"../node_modules/@stimulus/mutation-observers/dist/src/attribute_observer.js":[function(require,module,exports) {
|
1460
|
+
"use strict";
|
1461
|
+
|
1462
|
+
Object.defineProperty(exports, "__esModule", {
|
1463
|
+
value: true
|
1464
|
+
});
|
1465
|
+
exports.AttributeObserver = void 0;
|
1466
|
+
|
1467
|
+
var _element_observer = require("./element_observer");
|
1468
|
+
|
1469
|
+
var AttributeObserver =
|
1470
|
+
/** @class */
|
1471
|
+
function () {
|
1472
|
+
function AttributeObserver(element, attributeName, delegate) {
|
1473
|
+
this.attributeName = attributeName;
|
1474
|
+
this.delegate = delegate;
|
1475
|
+
this.elementObserver = new _element_observer.ElementObserver(element, this);
|
1476
|
+
}
|
1477
|
+
|
1478
|
+
Object.defineProperty(AttributeObserver.prototype, "element", {
|
1479
|
+
get: function () {
|
1480
|
+
return this.elementObserver.element;
|
1481
|
+
},
|
1482
|
+
enumerable: true,
|
1483
|
+
configurable: true
|
1484
|
+
});
|
1485
|
+
Object.defineProperty(AttributeObserver.prototype, "selector", {
|
1486
|
+
get: function () {
|
1487
|
+
return "[" + this.attributeName + "]";
|
1488
|
+
},
|
1489
|
+
enumerable: true,
|
1490
|
+
configurable: true
|
1491
|
+
});
|
1492
|
+
|
1493
|
+
AttributeObserver.prototype.start = function () {
|
1494
|
+
this.elementObserver.start();
|
1495
|
+
};
|
1496
|
+
|
1497
|
+
AttributeObserver.prototype.stop = function () {
|
1498
|
+
this.elementObserver.stop();
|
1499
|
+
};
|
1500
|
+
|
1501
|
+
AttributeObserver.prototype.refresh = function () {
|
1502
|
+
this.elementObserver.refresh();
|
1503
|
+
};
|
1504
|
+
|
1505
|
+
Object.defineProperty(AttributeObserver.prototype, "started", {
|
1506
|
+
get: function () {
|
1507
|
+
return this.elementObserver.started;
|
1508
|
+
},
|
1509
|
+
enumerable: true,
|
1510
|
+
configurable: true
|
1511
|
+
}); // Element observer delegate
|
1512
|
+
|
1513
|
+
AttributeObserver.prototype.matchElement = function (element) {
|
1514
|
+
return element.hasAttribute(this.attributeName);
|
1515
|
+
};
|
1516
|
+
|
1517
|
+
AttributeObserver.prototype.matchElementsInTree = function (tree) {
|
1518
|
+
var match = this.matchElement(tree) ? [tree] : [];
|
1519
|
+
var matches = Array.from(tree.querySelectorAll(this.selector));
|
1520
|
+
return match.concat(matches);
|
1521
|
+
};
|
1522
|
+
|
1523
|
+
AttributeObserver.prototype.elementMatched = function (element) {
|
1524
|
+
if (this.delegate.elementMatchedAttribute) {
|
1525
|
+
this.delegate.elementMatchedAttribute(element, this.attributeName);
|
1526
|
+
}
|
1527
|
+
};
|
1528
|
+
|
1529
|
+
AttributeObserver.prototype.elementUnmatched = function (element) {
|
1530
|
+
if (this.delegate.elementUnmatchedAttribute) {
|
1531
|
+
this.delegate.elementUnmatchedAttribute(element, this.attributeName);
|
1532
|
+
}
|
1533
|
+
};
|
1534
|
+
|
1535
|
+
AttributeObserver.prototype.elementAttributeChanged = function (element, attributeName) {
|
1536
|
+
if (this.delegate.elementAttributeValueChanged && this.attributeName == attributeName) {
|
1537
|
+
this.delegate.elementAttributeValueChanged(element, attributeName);
|
1538
|
+
}
|
1539
|
+
};
|
1540
|
+
|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UF2QixVQUF3QixPQUFnQixFQUFFLGFBQXFCO1FBQzdELElBQUksSUFBSSxDQUFDLFFBQVEsQ0FBQyw0QkFBNEIsSUFBSSxJQUFJLENBQUMsYUFBYSxJQUFJLGFBQWEsRUFBRTtZQUNyRixJQUFJLENBQUMsUUFBUSxDQUFDLDRCQUE0QixDQUFDLE9BQU8sRUFBRSxhQUFhLENBQUMsQ0FBQTtTQUNuRTtJQUNILENBQUM7SUFDSCx3QkFBQztBQUFELENBQUMsQUFsRUQsSUFrRUMifQ==
|
1543
|
+
|
1544
|
+
|
1545
|
+
exports.AttributeObserver = AttributeObserver;
|
1546
|
+
},{"./element_observer":"../node_modules/@stimulus/mutation-observers/dist/src/element_observer.js"}],"../node_modules/@stimulus/multimap/dist/src/set_operations.js":[function(require,module,exports) {
|
1547
|
+
"use strict";
|
1548
|
+
|
1549
|
+
Object.defineProperty(exports, "__esModule", {
|
1550
|
+
value: true
|
1551
|
+
});
|
1552
|
+
exports.add = add;
|
1553
|
+
exports.del = del;
|
1554
|
+
exports.fetch = fetch;
|
1555
|
+
exports.prune = prune;
|
1556
|
+
|
1557
|
+
function add(map, key, value) {
|
1558
|
+
fetch(map, key).add(value);
|
1559
|
+
}
|
1560
|
+
|
1561
|
+
function del(map, key, value) {
|
1562
|
+
fetch(map, key).delete(value);
|
1563
|
+
prune(map, key);
|
1564
|
+
}
|
1565
|
+
|
1566
|
+
function fetch(map, key) {
|
1567
|
+
var values = map.get(key);
|
1568
|
+
|
1569
|
+
if (!values) {
|
1570
|
+
values = new Set();
|
1571
|
+
map.set(key, values);
|
1572
|
+
}
|
1573
|
+
|
1574
|
+
return values;
|
1575
|
+
}
|
1576
|
+
|
1577
|
+
function prune(map, key) {
|
1578
|
+
var values = map.get(key);
|
1579
|
+
|
1580
|
+
if (values != null && values.size == 0) {
|
1581
|
+
map.delete(key);
|
1582
|
+
}
|
1583
|
+
} //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic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LENBQUMsR0FBRyxDQUFDLENBQUE7S0FDaEI7QUFDSCxDQUFDIn0=
|
1584
|
+
},{}],"../node_modules/@stimulus/multimap/dist/src/multimap.js":[function(require,module,exports) {
|
1585
|
+
"use strict";
|
1586
|
+
|
1587
|
+
Object.defineProperty(exports, "__esModule", {
|
1588
|
+
value: true
|
1589
|
+
});
|
1590
|
+
exports.Multimap = void 0;
|
1591
|
+
|
1592
|
+
var _set_operations = require("./set_operations");
|
1593
|
+
|
1594
|
+
var Multimap =
|
1595
|
+
/** @class */
|
1596
|
+
function () {
|
1597
|
+
function Multimap() {
|
1598
|
+
this.valuesByKey = new Map();
|
1599
|
+
}
|
1600
|
+
|
1601
|
+
Object.defineProperty(Multimap.prototype, "values", {
|
1602
|
+
get: function () {
|
1603
|
+
var sets = Array.from(this.valuesByKey.values());
|
1604
|
+
return sets.reduce(function (values, set) {
|
1605
|
+
return values.concat(Array.from(set));
|
1606
|
+
}, []);
|
1607
|
+
},
|
1608
|
+
enumerable: true,
|
1609
|
+
configurable: true
|
1610
|
+
});
|
1611
|
+
Object.defineProperty(Multimap.prototype, "size", {
|
1612
|
+
get: function () {
|
1613
|
+
var sets = Array.from(this.valuesByKey.values());
|
1614
|
+
return sets.reduce(function (size, set) {
|
1615
|
+
return size + set.size;
|
1616
|
+
}, 0);
|
1617
|
+
},
|
1618
|
+
enumerable: true,
|
1619
|
+
configurable: true
|
1620
|
+
});
|
1621
|
+
|
1622
|
+
Multimap.prototype.add = function (key, value) {
|
1623
|
+
(0, _set_operations.add)(this.valuesByKey, key, value);
|
1624
|
+
};
|
1625
|
+
|
1626
|
+
Multimap.prototype.delete = function (key, value) {
|
1627
|
+
(0, _set_operations.del)(this.valuesByKey, key, value);
|
1628
|
+
};
|
1629
|
+
|
1630
|
+
Multimap.prototype.has = function (key, value) {
|
1631
|
+
var values = this.valuesByKey.get(key);
|
1632
|
+
return values != null && values.has(value);
|
1633
|
+
};
|
1634
|
+
|
1635
|
+
Multimap.prototype.hasKey = function (key) {
|
1636
|
+
return this.valuesByKey.has(key);
|
1637
|
+
};
|
1638
|
+
|
1639
|
+
Multimap.prototype.hasValue = function (value) {
|
1640
|
+
var sets = Array.from(this.valuesByKey.values());
|
1641
|
+
return sets.some(function (set) {
|
1642
|
+
return set.has(value);
|
1643
|
+
});
|
1644
|
+
};
|
1645
|
+
|
1646
|
+
Multimap.prototype.getValuesForKey = function (key) {
|
1647
|
+
var values = this.valuesByKey.get(key);
|
1648
|
+
return values ? Array.from(values) : [];
|
1649
|
+
};
|
1650
|
+
|
1651
|
+
Multimap.prototype.getKeysForValue = function (value) {
|
1652
|
+
return Array.from(this.valuesByKey).filter(function (_a) {
|
1653
|
+
var key = _a[0],
|
1654
|
+
values = _a[1];
|
1655
|
+
return values.has(value);
|
1656
|
+
}).map(function (_a) {
|
1657
|
+
var key = _a[0],
|
1658
|
+
values = _a[1];
|
1659
|
+
return key;
|
1660
|
+
});
|
1661
|
+
};
|
1662
|
+
|
1663
|
+
return Multimap;
|
1664
|
+
}(); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibXVsdGltYXAuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvbXVsdGltYXAudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLEdBQUcsRUFBRSxHQUFHLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQTtBQUUzQztJQUdFO1FBQ0UsSUFBSSxDQUFDLFdBQVcsR0FBRyxJQUFJLEdBQUcsRUFBYSxDQUFBO0lBQ3pDLENBQUM7SUFFRCxzQkFBSSw0QkFBTTthQUFWO1lBQ0UsSUFBTSxJQUFJLEdBQUcsS0FBSyxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsV0FBVyxDQUFDLE1BQU0sRUFBRSxDQUFDLENBQUE7WUFDbEQsT0FBTyxJQUFJLENBQUMsTUFBTSxDQUFDLFVBQUMsTUFB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1665
|
+
|
1666
|
+
|
1667
|
+
exports.Multimap = Multimap;
|
1668
|
+
},{"./set_operations":"../node_modules/@stimulus/multimap/dist/src/set_operations.js"}],"../node_modules/@stimulus/multimap/dist/src/indexed_multimap.js":[function(require,module,exports) {
|
1669
|
+
"use strict";
|
1670
|
+
|
1671
|
+
Object.defineProperty(exports, "__esModule", {
|
1672
|
+
value: true
|
1673
|
+
});
|
1674
|
+
exports.IndexedMultimap = void 0;
|
1675
|
+
|
1676
|
+
var _multimap = require("./multimap");
|
1677
|
+
|
1678
|
+
var _set_operations = require("./set_operations");
|
1679
|
+
|
1680
|
+
var __extends = void 0 && (void 0).__extends || function () {
|
1681
|
+
var extendStatics = Object.setPrototypeOf || {
|
1682
|
+
__proto__: []
|
1683
|
+
} instanceof Array && function (d, b) {
|
1684
|
+
d.__proto__ = b;
|
1685
|
+
} || function (d, b) {
|
1686
|
+
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
1687
|
+
};
|
1688
|
+
|
1689
|
+
return function (d, b) {
|
1690
|
+
extendStatics(d, b);
|
1691
|
+
|
1692
|
+
function __() {
|
1693
|
+
this.constructor = d;
|
1694
|
+
}
|
1695
|
+
|
1696
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
1697
|
+
};
|
1698
|
+
}();
|
1699
|
+
|
1700
|
+
var IndexedMultimap =
|
1701
|
+
/** @class */
|
1702
|
+
function (_super) {
|
1703
|
+
__extends(IndexedMultimap, _super);
|
1704
|
+
|
1705
|
+
function IndexedMultimap() {
|
1706
|
+
var _this = _super.call(this) || this;
|
1707
|
+
|
1708
|
+
_this.keysByValue = new Map();
|
1709
|
+
return _this;
|
1710
|
+
}
|
1711
|
+
|
1712
|
+
Object.defineProperty(IndexedMultimap.prototype, "values", {
|
1713
|
+
get: function () {
|
1714
|
+
return Array.from(this.keysByValue.keys());
|
1715
|
+
},
|
1716
|
+
enumerable: true,
|
1717
|
+
configurable: true
|
1718
|
+
});
|
1719
|
+
|
1720
|
+
IndexedMultimap.prototype.add = function (key, value) {
|
1721
|
+
_super.prototype.add.call(this, key, value);
|
1722
|
+
|
1723
|
+
(0, _set_operations.add)(this.keysByValue, value, key);
|
1724
|
+
};
|
1725
|
+
|
1726
|
+
IndexedMultimap.prototype.delete = function (key, value) {
|
1727
|
+
_super.prototype.delete.call(this, key, value);
|
1728
|
+
|
1729
|
+
(0, _set_operations.del)(this.keysByValue, value, key);
|
1730
|
+
};
|
1731
|
+
|
1732
|
+
IndexedMultimap.prototype.hasValue = function (value) {
|
1733
|
+
return this.keysByValue.has(value);
|
1734
|
+
};
|
1735
|
+
|
1736
|
+
IndexedMultimap.prototype.getKeysForValue = function (value) {
|
1737
|
+
var set = this.keysByValue.get(value);
|
1738
|
+
return set ? Array.from(set) : [];
|
1739
|
+
};
|
1740
|
+
|
1741
|
+
return IndexedMultimap;
|
1742
|
+
}(_multimap.Multimap); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXhlZF9tdWx0aW1hcC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9pbmRleGVkX211bHRpbWFwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7QUFBQSxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0sWUFBWSxDQUFBO0FBQ3JDLE9BQU8sRUFBRSxHQUFHLEVBQUUsR0FBRyxFQUFFLE1BQU0sa0JBQWtCLENBQUE7QUFFM0M7SUFBMkMsbUNBQWM7SUFHdkQ7UUFBQSxZQUNFLGlCQUFPLFNBRVI7UUFEQyxLQUFJLENBQUMsV0FBVyxHQUFHLElBQUksR0FBRyxDQUFBOztJQUM1QixDQUFDO0lBRUQsc0JBQUksbUNBQU07YUFBVjtZQUNFLE9BQU8sS0FBSyxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsV0FBVyxDQUFDLElBQUksRUFBRSxDQUFDLENBQUE7UUFDNUMsQ0FBQzs7O09BQUE7SUFFRCw2QkFBRyxHQUFILFVBQUksR0FBTSxFQUFFLEtBQVE7UUFDbEIsaUJBQU0sR0FBRyxZQUFDLEdBQUcsRUFBRSxLQUFLLENBQUMsQ0FBQTtRQUNyQixHQUFHLENBQUMsSUFBSSxDQUFDLFdBQVcsRUFBRSxLQUFLLEVBQUUsR0FBRyxDQUFDLENBQUE7SUFDbkMsQ0FBQztJQUVELGdDQUFNLEdBQU4sVUFBTyxHQUFNLEVBQUUsS0FBUTtRQUNyQixpQkFBTSxNQUFNLFlBQUMsR0FBRyxFQUFFLEtBQUssQ0FBQyxDQUFBO1FBQ3hCLEdBQUcsQ0FBQyxJQUFJLENBQUMsV0FBVyxFQUFFLEtBQUssRUFBRSxHQUFHLENBQUMsQ0FBQTtJQUNuQyxDQUFDO0lBRUQsa0NBQVEsR0FBUixVQUFTLEtBQVE7UUFDZixPQUFPLElBQUksQ0FBQyxXQUFXLENBQUMsR0FBRyxDQUFDLEtBQUssQ0FBQyxDQUFBO0lBQ3BDLENBQUM7SUFFRCx5Q0FBZSxHQUFmLFVBQWdCLEtBQVE7UUFDdEIsSUFBTSxHQUFHLEdBQUcsSUFBSSxDQUFDLFdBQVcsQ0FBQyxHQUFHLENBQUMsS0FBSyxDQUFDLENBQUE7UUFDdkMsT0FBTyxHQUFHLENBQUMsQ0FBQyxDQUFDLEtBQUssQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQyxDQUFDLEVBQUUsQ0FBQTtJQUNuQyxDQUFDO0lBQ0gsc0JBQUM7QUFBRCxDQUFDLEFBOUJELENBQTJDLFFBQVEsR0E4QmxEIn0=
|
1743
|
+
|
1744
|
+
|
1745
|
+
exports.IndexedMultimap = IndexedMultimap;
|
1746
|
+
},{"./multimap":"../node_modules/@stimulus/multimap/dist/src/multimap.js","./set_operations":"../node_modules/@stimulus/multimap/dist/src/set_operations.js"}],"../node_modules/@stimulus/multimap/dist/index.js":[function(require,module,exports) {
|
1747
|
+
"use strict";
|
1748
|
+
|
1749
|
+
Object.defineProperty(exports, "__esModule", {
|
1750
|
+
value: true
|
1751
|
+
});
|
1752
|
+
|
1753
|
+
var _multimap = require("./src/multimap");
|
1754
|
+
|
1755
|
+
Object.keys(_multimap).forEach(function (key) {
|
1756
|
+
if (key === "default" || key === "__esModule") return;
|
1757
|
+
Object.defineProperty(exports, key, {
|
1758
|
+
enumerable: true,
|
1759
|
+
get: function () {
|
1760
|
+
return _multimap[key];
|
1761
|
+
}
|
1762
|
+
});
|
1763
|
+
});
|
1764
|
+
|
1765
|
+
var _indexed_multimap = require("./src/indexed_multimap");
|
1766
|
+
|
1767
|
+
Object.keys(_indexed_multimap).forEach(function (key) {
|
1768
|
+
if (key === "default" || key === "__esModule") return;
|
1769
|
+
Object.defineProperty(exports, key, {
|
1770
|
+
enumerable: true,
|
1771
|
+
get: function () {
|
1772
|
+
return _indexed_multimap[key];
|
1773
|
+
}
|
1774
|
+
});
|
1775
|
+
});
|
1776
|
+
},{"./src/multimap":"../node_modules/@stimulus/multimap/dist/src/multimap.js","./src/indexed_multimap":"../node_modules/@stimulus/multimap/dist/src/indexed_multimap.js"}],"../node_modules/@stimulus/mutation-observers/dist/src/token_list_observer.js":[function(require,module,exports) {
|
1777
|
+
"use strict";
|
1778
|
+
|
1779
|
+
Object.defineProperty(exports, "__esModule", {
|
1780
|
+
value: true
|
1781
|
+
});
|
1782
|
+
exports.TokenListObserver = void 0;
|
1783
|
+
|
1784
|
+
var _attribute_observer = require("./attribute_observer");
|
1785
|
+
|
1786
|
+
var _multimap = require("@stimulus/multimap");
|
1787
|
+
|
1788
|
+
var TokenListObserver =
|
1789
|
+
/** @class */
|
1790
|
+
function () {
|
1791
|
+
function TokenListObserver(element, attributeName, delegate) {
|
1792
|
+
this.attributeObserver = new _attribute_observer.AttributeObserver(element, attributeName, this);
|
1793
|
+
this.delegate = delegate;
|
1794
|
+
this.tokensByElement = new _multimap.Multimap();
|
1795
|
+
}
|
1796
|
+
|
1797
|
+
Object.defineProperty(TokenListObserver.prototype, "started", {
|
1798
|
+
get: function () {
|
1799
|
+
return this.attributeObserver.started;
|
1800
|
+
},
|
1801
|
+
enumerable: true,
|
1802
|
+
configurable: true
|
1803
|
+
});
|
1804
|
+
|
1805
|
+
TokenListObserver.prototype.start = function () {
|
1806
|
+
this.attributeObserver.start();
|
1807
|
+
};
|
1808
|
+
|
1809
|
+
TokenListObserver.prototype.stop = function () {
|
1810
|
+
this.attributeObserver.stop();
|
1811
|
+
};
|
1812
|
+
|
1813
|
+
TokenListObserver.prototype.refresh = function () {
|
1814
|
+
this.attributeObserver.refresh();
|
1815
|
+
};
|
1816
|
+
|
1817
|
+
Object.defineProperty(TokenListObserver.prototype, "element", {
|
1818
|
+
get: function () {
|
1819
|
+
return this.attributeObserver.element;
|
1820
|
+
},
|
1821
|
+
enumerable: true,
|
1822
|
+
configurable: true
|
1823
|
+
});
|
1824
|
+
Object.defineProperty(TokenListObserver.prototype, "attributeName", {
|
1825
|
+
get: function () {
|
1826
|
+
return this.attributeObserver.attributeName;
|
1827
|
+
},
|
1828
|
+
enumerable: true,
|
1829
|
+
configurable: true
|
1830
|
+
}); // Attribute observer delegate
|
1831
|
+
|
1832
|
+
TokenListObserver.prototype.elementMatchedAttribute = function (element) {
|
1833
|
+
this.tokensMatched(this.readTokensForElement(element));
|
1834
|
+
};
|
1835
|
+
|
1836
|
+
TokenListObserver.prototype.elementAttributeValueChanged = function (element) {
|
1837
|
+
var _a = this.refreshTokensForElement(element),
|
1838
|
+
unmatchedTokens = _a[0],
|
1839
|
+
matchedTokens = _a[1];
|
1840
|
+
|
1841
|
+
this.tokensUnmatched(unmatchedTokens);
|
1842
|
+
this.tokensMatched(matchedTokens);
|
1843
|
+
};
|
1844
|
+
|
1845
|
+
TokenListObserver.prototype.elementUnmatchedAttribute = function (element) {
|
1846
|
+
this.tokensUnmatched(this.tokensByElement.getValuesForKey(element));
|
1847
|
+
};
|
1848
|
+
|
1849
|
+
TokenListObserver.prototype.tokensMatched = function (tokens) {
|
1850
|
+
var _this = this;
|
1851
|
+
|
1852
|
+
tokens.forEach(function (token) {
|
1853
|
+
return _this.tokenMatched(token);
|
1854
|
+
});
|
1855
|
+
};
|
1856
|
+
|
1857
|
+
TokenListObserver.prototype.tokensUnmatched = function (tokens) {
|
1858
|
+
var _this = this;
|
1859
|
+
|
1860
|
+
tokens.forEach(function (token) {
|
1861
|
+
return _this.tokenUnmatched(token);
|
1862
|
+
});
|
1863
|
+
};
|
1864
|
+
|
1865
|
+
TokenListObserver.prototype.tokenMatched = function (token) {
|
1866
|
+
this.delegate.tokenMatched(token);
|
1867
|
+
this.tokensByElement.add(token.element, token);
|
1868
|
+
};
|
1869
|
+
|
1870
|
+
TokenListObserver.prototype.tokenUnmatched = function (token) {
|
1871
|
+
this.delegate.tokenUnmatched(token);
|
1872
|
+
this.tokensByElement.delete(token.element, token);
|
1873
|
+
};
|
1874
|
+
|
1875
|
+
TokenListObserver.prototype.refreshTokensForElement = function (element) {
|
1876
|
+
var previousTokens = this.tokensByElement.getValuesForKey(element);
|
1877
|
+
var currentTokens = this.readTokensForElement(element);
|
1878
|
+
var firstDifferingIndex = zip(previousTokens, currentTokens).findIndex(function (_a) {
|
1879
|
+
var previousToken = _a[0],
|
1880
|
+
currentToken = _a[1];
|
1881
|
+
return !tokensAreEqual(previousToken, currentToken);
|
1882
|
+
});
|
1883
|
+
|
1884
|
+
if (firstDifferingIndex == -1) {
|
1885
|
+
return [[], []];
|
1886
|
+
} else {
|
1887
|
+
return [previousTokens.slice(firstDifferingIndex), currentTokens.slice(firstDifferingIndex)];
|
1888
|
+
}
|
1889
|
+
};
|
1890
|
+
|
1891
|
+
TokenListObserver.prototype.readTokensForElement = function (element) {
|
1892
|
+
var attributeName = this.attributeName;
|
1893
|
+
var tokenString = element.getAttribute(attributeName) || "";
|
1894
|
+
return parseTokenString(tokenString, element, attributeName);
|
1895
|
+
};
|
1896
|
+
|
1897
|
+
return TokenListObserver;
|
1898
|
+
}();
|
1899
|
+
|
1900
|
+
exports.TokenListObserver = TokenListObserver;
|
1901
|
+
|
1902
|
+
function parseTokenString(tokenString, element, attributeName) {
|
1903
|
+
return tokenString.trim().split(/\s+/).filter(function (content) {
|
1904
|
+
return content.length;
|
1905
|
+
}).map(function (content, index) {
|
1906
|
+
return {
|
1907
|
+
element: element,
|
1908
|
+
attributeName: attributeName,
|
1909
|
+
content: content,
|
1910
|
+
index: index
|
1911
|
+
};
|
1912
|
+
});
|
1913
|
+
}
|
1914
|
+
|
1915
|
+
function zip(left, right) {
|
1916
|
+
var length = Math.max(left.length, right.length);
|
1917
|
+
return Array.from({
|
1918
|
+
length: length
|
1919
|
+
}, function (_, index) {
|
1920
|
+
return [left[index], right[index]];
|
1921
|
+
});
|
1922
|
+
}
|
1923
|
+
|
1924
|
+
function tokensAreEqual(left, right) {
|
1925
|
+
return left && right && left.index == right.index && left.content == right.content;
|
1926
|
+
} //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidG9rZW5fbGlzdF9vYnNlcnZlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy90b2tlbl9saXN0X29ic2VydmVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxpQkFBaUIsRUFBNkIsTUFBTSxzQkFBc0IsQ0FBQTtBQUNuRixPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0sb0JBQW9CLENBQUE7QUFjN0M7SUFLRSwyQkFBWSxPQUFnQixFQUFFLGFBQXFCLEVBQUUsUUFBbUM7UUFDdEYsSUFBSSxDQUFDLGlCQUFpQixHQUFHLElBQUksaUJBQWlCLENBQUMsT0FBTyxFQUFFLGFBQWEsRUFBRSxJQUFJLENBQUMsQ0FBQTtRQUM1RSxJQUFJLENBQUMsUUFBUSxHQUFHLFFBQVEsQ0FBQTtRQU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sSUFBSSxFQUFFLENBQUMsS0FBSyxDQUFDLEtBQUssQ0FBQyxDQUFDLE1BQU0sQ0FBQyxVQUFBLE9BQU8sSUFBSSxPQUFBLE9BQU8sQ0FBQyxNQUFNLEVBQWQsQ0FBYyxDQUFDO1NBQ3JFLEdBQUcsQ0FBQyxVQUFDLE9BQU8sRUFBRSxLQUFLLElBQUssT0FBQSxDQUFDLEVBQUUsT0FBTyxTQUFBLEVBQUUsYUFBYSxlQUFBLEVBQUUsT0FBTyxTQUFBLEVBQUUsS0FBSyxPQUFBLEVBQUUsQ0FBQyxFQUE1QyxDQUE0QyxDQUFDLENBQUE7QUFDMUUsQ0FBQztBQUVELGFBQW1CLElBQVMsRUFBRSxLQUFVO0lBQ3RDLElBQU0sTUFBTSxHQUFHLElBQUksQ0FBQyxHQUFHLENBQUMsSUFBSSxDQUFDLE1BQU0sRUFBRSxLQUFLLENBQUMsTUFBTSxDQUFDLENBQUE7SUFDbEQsT0FBTyxLQUFLLENBQUMsSUFBSSxDQUFDLEVBQUUsTUFBTSxRQUFBLEVBQUUsRUFBRSxVQUFDLENBQUMsRUFBRSxLQUFLLElBQUssT0FBQSxDQUFDLElBQUksQ0FBQyxLQUFLLENBQUMsRUFBRSxLQUFLLENBQUMsS0FBSyxDQUFDLENBQVcsRUFBckMsQ0FBcUMsQ0FBQyxDQUFBO0FBQ3BGLENBQUM7QUFFRCx3QkFBd0IsSUFBWSxFQUFFLEtBQWE7SUFDakQsT0FBTyxJQUFJLElBQUksS0FBSyxJQUFJLElBQUksQ0FBQyxLQUFLLElBQUksS0FBSyxDQUFDLEtBQUssSUFBSSxJQUFJLENBQUMsT0FBTyxJQUFJLEtBQUssQ0FBQyxPQUFPLENBQUE7QUFDcEYsQ0FBQyJ9
|
1927
|
+
},{"./attribute_observer":"../node_modules/@stimulus/mutation-observers/dist/src/attribute_observer.js","@stimulus/multimap":"../node_modules/@stimulus/multimap/dist/index.js"}],"../node_modules/@stimulus/mutation-observers/dist/src/value_list_observer.js":[function(require,module,exports) {
|
1928
|
+
"use strict";
|
1929
|
+
|
1930
|
+
Object.defineProperty(exports, "__esModule", {
|
1931
|
+
value: true
|
1932
|
+
});
|
1933
|
+
exports.ValueListObserver = void 0;
|
1934
|
+
|
1935
|
+
var _token_list_observer = require("./token_list_observer");
|
1936
|
+
|
1937
|
+
var ValueListObserver =
|
1938
|
+
/** @class */
|
1939
|
+
function () {
|
1940
|
+
function ValueListObserver(element, attributeName, delegate) {
|
1941
|
+
this.tokenListObserver = new _token_list_observer.TokenListObserver(element, attributeName, this);
|
1942
|
+
this.delegate = delegate;
|
1943
|
+
this.parseResultsByToken = new WeakMap();
|
1944
|
+
this.valuesByTokenByElement = new WeakMap();
|
1945
|
+
}
|
1946
|
+
|
1947
|
+
Object.defineProperty(ValueListObserver.prototype, "started", {
|
1948
|
+
get: function () {
|
1949
|
+
return this.tokenListObserver.started;
|
1950
|
+
},
|
1951
|
+
enumerable: true,
|
1952
|
+
configurable: true
|
1953
|
+
});
|
1954
|
+
|
1955
|
+
ValueListObserver.prototype.start = function () {
|
1956
|
+
this.tokenListObserver.start();
|
1957
|
+
};
|
1958
|
+
|
1959
|
+
ValueListObserver.prototype.stop = function () {
|
1960
|
+
this.tokenListObserver.stop();
|
1961
|
+
};
|
1962
|
+
|
1963
|
+
ValueListObserver.prototype.refresh = function () {
|
1964
|
+
this.tokenListObserver.refresh();
|
1965
|
+
};
|
1966
|
+
|
1967
|
+
Object.defineProperty(ValueListObserver.prototype, "element", {
|
1968
|
+
get: function () {
|
1969
|
+
return this.tokenListObserver.element;
|
1970
|
+
},
|
1971
|
+
enumerable: true,
|
1972
|
+
configurable: true
|
1973
|
+
});
|
1974
|
+
Object.defineProperty(ValueListObserver.prototype, "attributeName", {
|
1975
|
+
get: function () {
|
1976
|
+
return this.tokenListObserver.attributeName;
|
1977
|
+
},
|
1978
|
+
enumerable: true,
|
1979
|
+
configurable: true
|
1980
|
+
});
|
1981
|
+
|
1982
|
+
ValueListObserver.prototype.tokenMatched = function (token) {
|
1983
|
+
var element = token.element;
|
1984
|
+
var value = this.fetchParseResultForToken(token).value;
|
1985
|
+
|
1986
|
+
if (value) {
|
1987
|
+
this.fetchValuesByTokenForElement(element).set(token, value);
|
1988
|
+
this.delegate.elementMatchedValue(element, value);
|
1989
|
+
}
|
1990
|
+
};
|
1991
|
+
|
1992
|
+
ValueListObserver.prototype.tokenUnmatched = function (token) {
|
1993
|
+
var element = token.element;
|
1994
|
+
var value = this.fetchParseResultForToken(token).value;
|
1995
|
+
|
1996
|
+
if (value) {
|
1997
|
+
this.fetchValuesByTokenForElement(element).delete(token);
|
1998
|
+
this.delegate.elementUnmatchedValue(element, value);
|
1999
|
+
}
|
2000
|
+
};
|
2001
|
+
|
2002
|
+
ValueListObserver.prototype.fetchParseResultForToken = function (token) {
|
2003
|
+
var parseResult = this.parseResultsByToken.get(token);
|
2004
|
+
|
2005
|
+
if (!parseResult) {
|
2006
|
+
parseResult = this.parseToken(token);
|
2007
|
+
this.parseResultsByToken.set(token, parseResult);
|
2008
|
+
}
|
2009
|
+
|
2010
|
+
return parseResult;
|
2011
|
+
};
|
2012
|
+
|
2013
|
+
ValueListObserver.prototype.fetchValuesByTokenForElement = function (element) {
|
2014
|
+
var valuesByToken = this.valuesByTokenByElement.get(element);
|
2015
|
+
|
2016
|
+
if (!valuesByToken) {
|
2017
|
+
valuesByToken = new Map();
|
2018
|
+
this.valuesByTokenByElement.set(element, valuesByToken);
|
2019
|
+
}
|
2020
|
+
|
2021
|
+
return valuesByToken;
|
2022
|
+
};
|
2023
|
+
|
2024
|
+
ValueListObserver.prototype.parseToken = function (token) {
|
2025
|
+
try {
|
2026
|
+
var value = this.delegate.parseValueForToken(token);
|
2027
|
+
return {
|
2028
|
+
value: value
|
2029
|
+
};
|
2030
|
+
} catch (error) {
|
2031
|
+
return {
|
2032
|
+
error: error
|
2033
|
+
};
|
2034
|
+
}
|
2035
|
+
};
|
2036
|
+
|
2037
|
+
return ValueListObserver;
|
2038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QUMsQ0FBQTtZQUNwQyxJQUFJLENBQUMsbUJBQW1CLENBQUMsR0FBRyxDQUFDLEtBQUssRUFBRSxXQUFXLENBQUMsQ0FBQTtTQUNqRDtRQUNELE9BQU8sV0FBVyxDQUFBO0lBQ3BCLENBQUM7SUFFTyx3REFBNEIsR0FBcEMsVUFBcUMsT0FBZ0I7UUFDbkQsSUFBSSxhQUFhLEdBQUcsSUFBSSxDQUFDLHNCQUFzQixDQUFDLEdBQUcsQ0FBQyxPQUFPLENBQUMsQ0FBQTtRQUM1RCxJQUFJLENBQUMsYUFBYSxFQUFFO1lBQ2xCLGFBQWEsR0FBRyxJQUFJLEdBQUcsQ0FBQTtZQUN2QixJQUFJLENBQUMsc0JBQXNCLENBQUMsR0FBRyxDQUFDLE9BQU8sRUFBRSxhQUFhLENBQUMsQ0FBQTtTQUN4RDtRQUNELE9BQU8sYUFBYSxDQUFBO0lBQ3RCLENBQUM7SUFFTyxzQ0FBVSxHQUFsQixVQUFtQixLQUFZO1FBQzdCLElBQUk7WUFDRixJQUFNLEtBQUssR0FBRyxJQUFJLENBQUMsUUFBUSxDQUFDLGtCQUFrQixDQUFDLEtBQUssQ0FBQyxDQUFBO1lBQ3JELE9BQU8sRUFBRSxLQUFLLE9BQUEsRUFBRSxDQUFBO1NBQ2pCO1FBQUMsT0FBTyxLQUFLLEVBQUU7WUFDZCxPQUFPLEVBQUUsS0FBSyxPQUFBLEVBQUUsQ0FBQTtTQUNqQjtJQUNILENBQUM7SUFDSCx3QkFBQztBQUFELENBQUMsQUFqRkQsSUFpRkMifQ==
|
2039
|
+
|
2040
|
+
|
2041
|
+
exports.ValueListObserver = ValueListObserver;
|
2042
|
+
},{"./token_list_observer":"../node_modules/@stimulus/mutation-observers/dist/src/token_list_observer.js"}],"../node_modules/@stimulus/mutation-observers/dist/index.js":[function(require,module,exports) {
|
2043
|
+
"use strict";
|
2044
|
+
|
2045
|
+
Object.defineProperty(exports, "__esModule", {
|
2046
|
+
value: true
|
2047
|
+
});
|
2048
|
+
|
2049
|
+
var _attribute_observer = require("./src/attribute_observer");
|
2050
|
+
|
2051
|
+
Object.keys(_attribute_observer).forEach(function (key) {
|
2052
|
+
if (key === "default" || key === "__esModule") return;
|
2053
|
+
Object.defineProperty(exports, key, {
|
2054
|
+
enumerable: true,
|
2055
|
+
get: function () {
|
2056
|
+
return _attribute_observer[key];
|
2057
|
+
}
|
2058
|
+
});
|
2059
|
+
});
|
2060
|
+
|
2061
|
+
var _element_observer = require("./src/element_observer");
|
2062
|
+
|
2063
|
+
Object.keys(_element_observer).forEach(function (key) {
|
2064
|
+
if (key === "default" || key === "__esModule") return;
|
2065
|
+
Object.defineProperty(exports, key, {
|
2066
|
+
enumerable: true,
|
2067
|
+
get: function () {
|
2068
|
+
return _element_observer[key];
|
2069
|
+
}
|
2070
|
+
});
|
2071
|
+
});
|
2072
|
+
|
2073
|
+
var _token_list_observer = require("./src/token_list_observer");
|
2074
|
+
|
2075
|
+
Object.keys(_token_list_observer).forEach(function (key) {
|
2076
|
+
if (key === "default" || key === "__esModule") return;
|
2077
|
+
Object.defineProperty(exports, key, {
|
2078
|
+
enumerable: true,
|
2079
|
+
get: function () {
|
2080
|
+
return _token_list_observer[key];
|
2081
|
+
}
|
2082
|
+
});
|
2083
|
+
});
|
2084
|
+
|
2085
|
+
var _value_list_observer = require("./src/value_list_observer");
|
2086
|
+
|
2087
|
+
Object.keys(_value_list_observer).forEach(function (key) {
|
2088
|
+
if (key === "default" || key === "__esModule") return;
|
2089
|
+
Object.defineProperty(exports, key, {
|
2090
|
+
enumerable: true,
|
2091
|
+
get: function () {
|
2092
|
+
return _value_list_observer[key];
|
2093
|
+
}
|
2094
|
+
});
|
2095
|
+
});
|
2096
|
+
},{"./src/attribute_observer":"../node_modules/@stimulus/mutation-observers/dist/src/attribute_observer.js","./src/element_observer":"../node_modules/@stimulus/mutation-observers/dist/src/element_observer.js","./src/token_list_observer":"../node_modules/@stimulus/mutation-observers/dist/src/token_list_observer.js","./src/value_list_observer":"../node_modules/@stimulus/mutation-observers/dist/src/value_list_observer.js"}],"../node_modules/@stimulus/core/dist/src/binding_observer.js":[function(require,module,exports) {
|
2097
|
+
"use strict";
|
2098
|
+
|
2099
|
+
Object.defineProperty(exports, "__esModule", {
|
2100
|
+
value: true
|
2101
|
+
});
|
2102
|
+
exports.BindingObserver = void 0;
|
2103
|
+
|
2104
|
+
var _action = require("./action");
|
2105
|
+
|
2106
|
+
var _binding = require("./binding");
|
2107
|
+
|
2108
|
+
var _mutationObservers = require("@stimulus/mutation-observers");
|
2109
|
+
|
2110
|
+
var BindingObserver =
|
2111
|
+
/** @class */
|
2112
|
+
function () {
|
2113
|
+
function BindingObserver(context, delegate) {
|
2114
|
+
this.context = context;
|
2115
|
+
this.delegate = delegate;
|
2116
|
+
this.bindingsByAction = new Map();
|
2117
|
+
}
|
2118
|
+
|
2119
|
+
BindingObserver.prototype.start = function () {
|
2120
|
+
if (!this.valueListObserver) {
|
2121
|
+
this.valueListObserver = new _mutationObservers.ValueListObserver(this.element, this.actionAttribute, this);
|
2122
|
+
this.valueListObserver.start();
|
2123
|
+
}
|
2124
|
+
};
|
2125
|
+
|
2126
|
+
BindingObserver.prototype.stop = function () {
|
2127
|
+
if (this.valueListObserver) {
|
2128
|
+
this.valueListObserver.stop();
|
2129
|
+
delete this.valueListObserver;
|
2130
|
+
this.disconnectAllActions();
|
2131
|
+
}
|
2132
|
+
};
|
2133
|
+
|
2134
|
+
Object.defineProperty(BindingObserver.prototype, "element", {
|
2135
|
+
get: function () {
|
2136
|
+
return this.context.element;
|
2137
|
+
},
|
2138
|
+
enumerable: true,
|
2139
|
+
configurable: true
|
2140
|
+
});
|
2141
|
+
Object.defineProperty(BindingObserver.prototype, "identifier", {
|
2142
|
+
get: function () {
|
2143
|
+
return this.context.identifier;
|
2144
|
+
},
|
2145
|
+
enumerable: true,
|
2146
|
+
configurable: true
|
2147
|
+
});
|
2148
|
+
Object.defineProperty(BindingObserver.prototype, "actionAttribute", {
|
2149
|
+
get: function () {
|
2150
|
+
return this.schema.actionAttribute;
|
2151
|
+
},
|
2152
|
+
enumerable: true,
|
2153
|
+
configurable: true
|
2154
|
+
});
|
2155
|
+
Object.defineProperty(BindingObserver.prototype, "schema", {
|
2156
|
+
get: function () {
|
2157
|
+
return this.context.schema;
|
2158
|
+
},
|
2159
|
+
enumerable: true,
|
2160
|
+
configurable: true
|
2161
|
+
});
|
2162
|
+
Object.defineProperty(BindingObserver.prototype, "bindings", {
|
2163
|
+
get: function () {
|
2164
|
+
return Array.from(this.bindingsByAction.values());
|
2165
|
+
},
|
2166
|
+
enumerable: true,
|
2167
|
+
configurable: true
|
2168
|
+
});
|
2169
|
+
|
2170
|
+
BindingObserver.prototype.connectAction = function (action) {
|
2171
|
+
var binding = new _binding.Binding(this.context, action);
|
2172
|
+
this.bindingsByAction.set(action, binding);
|
2173
|
+
this.delegate.bindingConnected(binding);
|
2174
|
+
};
|
2175
|
+
|
2176
|
+
BindingObserver.prototype.disconnectAction = function (action) {
|
2177
|
+
var binding = this.bindingsByAction.get(action);
|
2178
|
+
|
2179
|
+
if (binding) {
|
2180
|
+
this.bindingsByAction.delete(action);
|
2181
|
+
this.delegate.bindingDisconnected(binding);
|
2182
|
+
}
|
2183
|
+
};
|
2184
|
+
|
2185
|
+
BindingObserver.prototype.disconnectAllActions = function () {
|
2186
|
+
var _this = this;
|
2187
|
+
|
2188
|
+
this.bindings.forEach(function (binding) {
|
2189
|
+
return _this.delegate.bindingDisconnected(binding);
|
2190
|
+
});
|
2191
|
+
this.bindingsByAction.clear();
|
2192
|
+
}; // Value observer delegate
|
2193
|
+
|
2194
|
+
|
2195
|
+
BindingObserver.prototype.parseValueForToken = function (token) {
|
2196
|
+
var action = _action.Action.forToken(token);
|
2197
|
+
|
2198
|
+
if (action.identifier == this.identifier) {
|
2199
|
+
return action;
|
2200
|
+
}
|
2201
|
+
};
|
2202
|
+
|
2203
|
+
BindingObserver.prototype.elementMatchedValue = function (element, action) {
|
2204
|
+
this.connectAction(action);
|
2205
|
+
};
|
2206
|
+
|
2207
|
+
BindingObserver.prototype.elementUnmatchedValue = function (element, action) {
|
2208
|
+
this.disconnectAction(action);
|
2209
|
+
};
|
2210
|
+
|
2211
|
+
return BindingObserver;
|
2212
|
+
}(); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmluZGluZ19vYnNlcnZlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9iaW5kaW5nX29ic2VydmVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxVQUFVLENBQUE7QUFDakMsT0FBTyxFQUFFLE9BQU8sRUFBRSxNQUFNLFdBQVcsQ0FBQTtBQUluQyxPQUFPLEVBQVMsaUJBQWlCLEVBQTZCLE1BQU0sOEJBQThCLENBQUE7QUFPbEc7SUFNRSx5QkFBWSxPQUFnQixFQUFFLFFBQWlDO1FBQzdELElBQUksQ0FBQyxPQUFPLEdBQUcsT0FBTyxDQUFBO1FBQ3RCLElBQUksQ0FBQyxRQUFRLEdBQUcsUUFBUSxDQUFBO1FBQ3hCLElBQUksQ0FBQyxnQkFBZ0IsR0FBRyxJQUFJLEdBQUcsQ0FBQTtJQUNqQyxDQUFDO0lBRUQsK0JBQUssR0FBTDtRQUNFLElBQUksQ0FBQyxJQUFJLENBQUMsaUJBQWlCLEVBQUU7WUFDM0IsSUFBSSxDQUFDLGlCQUFpQixHQUFHLElBQUksaUJBQWlCLENBQUMsSUFBSSxDQUFDLE9BQU8sRUFBRSxJQUFJLENBQUMsZUFBZSxFQUFFLElBQUksQ0FBQyxDQUFBO1lBQ3hGLElBQUksQ0FBQyxpQkFBaUIsQ0FBQyxLQUFLLEVBQUUsQ0FBQTtTQUMvQjtJQUNILENBQUM7SUFFRCw4QkFBSSxHQUFKO1FBQ0UsSUFBSSxJQUFJLENBQUMsa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xDQUFDLGdCQUFnQixDQUFDLE1BQU0sQ0FBQyxDQUFBO0lBQy9CLENBQUM7SUFDSCxzQkFBQztBQUFELENBQUMsQUFsRkQsSUFrRkMifQ==
|
2213
|
+
|
2214
|
+
|
2215
|
+
exports.BindingObserver = BindingObserver;
|
2216
|
+
},{"./action":"../node_modules/@stimulus/core/dist/src/action.js","./binding":"../node_modules/@stimulus/core/dist/src/binding.js","@stimulus/mutation-observers":"../node_modules/@stimulus/mutation-observers/dist/index.js"}],"../node_modules/@stimulus/core/dist/src/context.js":[function(require,module,exports) {
|
2217
|
+
"use strict";
|
2218
|
+
|
2219
|
+
Object.defineProperty(exports, "__esModule", {
|
2220
|
+
value: true
|
2221
|
+
});
|
2222
|
+
exports.Context = void 0;
|
2223
|
+
|
2224
|
+
var _binding_observer = require("./binding_observer");
|
2225
|
+
|
2226
|
+
var Context =
|
2227
|
+
/** @class */
|
2228
|
+
function () {
|
2229
|
+
function Context(module, scope) {
|
2230
|
+
this.module = module;
|
2231
|
+
this.scope = scope;
|
2232
|
+
this.controller = new module.controllerConstructor(this);
|
2233
|
+
this.bindingObserver = new _binding_observer.BindingObserver(this, this.dispatcher);
|
2234
|
+
|
2235
|
+
try {
|
2236
|
+
this.controller.initialize();
|
2237
|
+
} catch (error) {
|
2238
|
+
this.handleError(error, "initializing controller");
|
2239
|
+
}
|
2240
|
+
}
|
2241
|
+
|
2242
|
+
Context.prototype.connect = function () {
|
2243
|
+
this.bindingObserver.start();
|
2244
|
+
|
2245
|
+
try {
|
2246
|
+
this.controller.connect();
|
2247
|
+
} catch (error) {
|
2248
|
+
this.handleError(error, "connecting controller");
|
2249
|
+
}
|
2250
|
+
};
|
2251
|
+
|
2252
|
+
Context.prototype.disconnect = function () {
|
2253
|
+
try {
|
2254
|
+
this.controller.disconnect();
|
2255
|
+
} catch (error) {
|
2256
|
+
this.handleError(error, "disconnecting controller");
|
2257
|
+
}
|
2258
|
+
|
2259
|
+
this.bindingObserver.stop();
|
2260
|
+
};
|
2261
|
+
|
2262
|
+
Object.defineProperty(Context.prototype, "application", {
|
2263
|
+
get: function () {
|
2264
|
+
return this.module.application;
|
2265
|
+
},
|
2266
|
+
enumerable: true,
|
2267
|
+
configurable: true
|
2268
|
+
});
|
2269
|
+
Object.defineProperty(Context.prototype, "identifier", {
|
2270
|
+
get: function () {
|
2271
|
+
return this.module.identifier;
|
2272
|
+
},
|
2273
|
+
enumerable: true,
|
2274
|
+
configurable: true
|
2275
|
+
});
|
2276
|
+
Object.defineProperty(Context.prototype, "schema", {
|
2277
|
+
get: function () {
|
2278
|
+
return this.application.schema;
|
2279
|
+
},
|
2280
|
+
enumerable: true,
|
2281
|
+
configurable: true
|
2282
|
+
});
|
2283
|
+
Object.defineProperty(Context.prototype, "dispatcher", {
|
2284
|
+
get: function () {
|
2285
|
+
return this.application.dispatcher;
|
2286
|
+
},
|
2287
|
+
enumerable: true,
|
2288
|
+
configurable: true
|
2289
|
+
});
|
2290
|
+
Object.defineProperty(Context.prototype, "element", {
|
2291
|
+
get: function () {
|
2292
|
+
return this.scope.element;
|
2293
|
+
},
|
2294
|
+
enumerable: true,
|
2295
|
+
configurable: true
|
2296
|
+
});
|
2297
|
+
Object.defineProperty(Context.prototype, "parentElement", {
|
2298
|
+
get: function () {
|
2299
|
+
return this.element.parentElement;
|
2300
|
+
},
|
2301
|
+
enumerable: true,
|
2302
|
+
configurable: true
|
2303
|
+
}); // Error handling
|
2304
|
+
|
2305
|
+
Context.prototype.handleError = function (error, message, detail) {
|
2306
|
+
if (detail === void 0) {
|
2307
|
+
detail = {};
|
2308
|
+
}
|
2309
|
+
|
2310
|
+
var _a = this,
|
2311
|
+
identifier = _a.identifier,
|
2312
|
+
controller = _a.controller,
|
2313
|
+
element = _a.element;
|
2314
|
+
|
2315
|
+
detail = Object.assign({
|
2316
|
+
identifier: identifier,
|
2317
|
+
controller: controller,
|
2318
|
+
element: element
|
2319
|
+
}, detail);
|
2320
|
+
this.application.handleError(error, "Error " + message, detail);
|
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tRQUN0RCxJQUFBLFNBQTBDLEVBQXhDLDBCQUFVLEVBQUUsMEJBQVUsRUFBRSxvQkFBTyxDQUFTO1FBQ2hELE1BQU0sR0FBRyxNQUFNLENBQUMsTUFBTSxDQUFDLEVBQUUsVUFBVSxZQUFBLEVBQUUsVUFBVSxZQUFBLEVBQUUsT0FBTyxTQUFBLEVBQUUsRUFBRSxNQUFNLENBQUMsQ0FBQTtRQUNuRSxJQUFJLENBQUMsV0FBVyxDQUFDLFdBQVcsQ0FBQyxLQUFLLEVBQUUsV0FBUyxPQUFTLEVBQUUsTUFBTSxDQUFDLENBQUE7SUFDakUsQ0FBQztJQUNILGNBQUM7QUFBRCxDQUFDLEFBdEVELElBc0VDIn0=
|
2325
|
+
|
2326
|
+
|
2327
|
+
exports.Context = Context;
|
2328
|
+
},{"./binding_observer":"../node_modules/@stimulus/core/dist/src/binding_observer.js"}],"../node_modules/@stimulus/core/dist/src/definition.js":[function(require,module,exports) {
|
2329
|
+
"use strict";
|
2330
|
+
|
2331
|
+
Object.defineProperty(exports, "__esModule", {
|
2332
|
+
value: true
|
2333
|
+
});
|
2334
|
+
exports.blessDefinition = blessDefinition;
|
2335
|
+
|
2336
|
+
var __extends = void 0 && (void 0).__extends || function () {
|
2337
|
+
var extendStatics = Object.setPrototypeOf || {
|
2338
|
+
__proto__: []
|
2339
|
+
} instanceof Array && function (d, b) {
|
2340
|
+
d.__proto__ = b;
|
2341
|
+
} || function (d, b) {
|
2342
|
+
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
2343
|
+
};
|
2344
|
+
|
2345
|
+
return function (d, b) {
|
2346
|
+
extendStatics(d, b);
|
2347
|
+
|
2348
|
+
function __() {
|
2349
|
+
this.constructor = d;
|
2350
|
+
}
|
2351
|
+
|
2352
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
2353
|
+
};
|
2354
|
+
}();
|
2355
|
+
/** @hidden */
|
2356
|
+
|
2357
|
+
|
2358
|
+
function blessDefinition(definition) {
|
2359
|
+
return {
|
2360
|
+
identifier: definition.identifier,
|
2361
|
+
controllerConstructor: blessControllerConstructor(definition.controllerConstructor)
|
2362
|
+
};
|
2363
|
+
}
|
2364
|
+
|
2365
|
+
function blessControllerConstructor(controllerConstructor) {
|
2366
|
+
var constructor = extend(controllerConstructor);
|
2367
|
+
constructor.bless();
|
2368
|
+
return constructor;
|
2369
|
+
}
|
2370
|
+
|
2371
|
+
var extend = function () {
|
2372
|
+
function extendWithReflect(constructor) {
|
2373
|
+
function Controller() {
|
2374
|
+
var _newTarget = this && this instanceof Controller ? this.constructor : void 0;
|
2375
|
+
|
2376
|
+
return Reflect.construct(constructor, arguments, _newTarget);
|
2377
|
+
}
|
2378
|
+
|
2379
|
+
Controller.prototype = Object.create(constructor.prototype, {
|
2380
|
+
constructor: {
|
2381
|
+
value: Controller
|
2382
|
+
}
|
2383
|
+
});
|
2384
|
+
Reflect.setPrototypeOf(Controller, constructor);
|
2385
|
+
return Controller;
|
2386
|
+
}
|
2387
|
+
|
2388
|
+
function testReflectExtension() {
|
2389
|
+
var a = function () {
|
2390
|
+
this.a.call(this);
|
2391
|
+
};
|
2392
|
+
|
2393
|
+
var b = extendWithReflect(a);
|
2394
|
+
|
2395
|
+
b.prototype.a = function () {};
|
2396
|
+
|
2397
|
+
return new b();
|
2398
|
+
}
|
2399
|
+
|
2400
|
+
try {
|
2401
|
+
testReflectExtension();
|
2402
|
+
return extendWithReflect;
|
2403
|
+
} catch (error) {
|
2404
|
+
return function (constructor) {
|
2405
|
+
return (
|
2406
|
+
/** @class */
|
2407
|
+
function (_super) {
|
2408
|
+
__extends(Controller, _super);
|
2409
|
+
|
2410
|
+
function Controller() {
|
2411
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
2412
|
+
}
|
2413
|
+
|
2414
|
+
return Controller;
|
2415
|
+
}(constructor)
|
2416
|
+
);
|
2417
|
+
};
|
2418
|
+
}
|
2419
|
+
}(); //# sourceMappingURL=data:application/json;base64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UFBSSxDQUFDLElBQUksQ0FBQyxDQUFBLENBQUMsQ0FBUSxDQUFBO1FBQzFELElBQU0sQ0FBQyxHQUFHLGlCQUFpQixDQUFDLENBQUMsQ0FBQyxDQUFBO1FBQzlCLENBQUMsQ0FBQyxTQUFTLENBQUMsQ0FBQyxHQUFHLGNBQVksQ0FBQyxDQUFBO1FBQzdCLE9BQU8sSUFBSSxDQUFDLENBQUE7SUFDZCxDQUFDO0lBRUQsSUFBSTtRQUNGLG9CQUFvQixFQUFFLENBQUE7UUFDdEIsT0FBTyxpQkFBaUIsQ0FBQTtLQUN6QjtJQUFDLE9BQU8sS0FBSyxFQUFFO1FBQ2QsT0FBTyxVQUE0QixXQUFjLElBQUs7WUFBeUIsOEJBQVc7WUFBcEM7O1lBQXNDLENBQUM7WUFBRCxpQkFBQztRQUFELENBQUMsQUFBdkMsQ0FBeUIsV0FBVyxJQUFwQyxDQUF1QyxDQUFBO0tBQzlGO0FBQ0gsQ0FBQyxDQUFDLEVBQUUsQ0FBQSJ9
|
2420
|
+
},{}],"../node_modules/@stimulus/core/dist/src/module.js":[function(require,module,exports) {
|
2421
|
+
"use strict";
|
2422
|
+
|
2423
|
+
Object.defineProperty(exports, "__esModule", {
|
2424
|
+
value: true
|
2425
|
+
});
|
2426
|
+
exports.Module = void 0;
|
2427
|
+
|
2428
|
+
var _context = require("./context");
|
2429
|
+
|
2430
|
+
var _definition = require("./definition");
|
2431
|
+
|
2432
|
+
var Module =
|
2433
|
+
/** @class */
|
2434
|
+
function () {
|
2435
|
+
function Module(application, definition) {
|
2436
|
+
this.application = application;
|
2437
|
+
this.definition = (0, _definition.blessDefinition)(definition);
|
2438
|
+
this.contextsByScope = new WeakMap();
|
2439
|
+
this.connectedContexts = new Set();
|
2440
|
+
}
|
2441
|
+
|
2442
|
+
Object.defineProperty(Module.prototype, "identifier", {
|
2443
|
+
get: function () {
|
2444
|
+
return this.definition.identifier;
|
2445
|
+
},
|
2446
|
+
enumerable: true,
|
2447
|
+
configurable: true
|
2448
|
+
});
|
2449
|
+
Object.defineProperty(Module.prototype, "controllerConstructor", {
|
2450
|
+
get: function () {
|
2451
|
+
return this.definition.controllerConstructor;
|
2452
|
+
},
|
2453
|
+
enumerable: true,
|
2454
|
+
configurable: true
|
2455
|
+
});
|
2456
|
+
Object.defineProperty(Module.prototype, "contexts", {
|
2457
|
+
get: function () {
|
2458
|
+
return Array.from(this.connectedContexts);
|
2459
|
+
},
|
2460
|
+
enumerable: true,
|
2461
|
+
configurable: true
|
2462
|
+
});
|
2463
|
+
|
2464
|
+
Module.prototype.connectContextForScope = function (scope) {
|
2465
|
+
var context = this.fetchContextForScope(scope);
|
2466
|
+
this.connectedContexts.add(context);
|
2467
|
+
context.connect();
|
2468
|
+
};
|
2469
|
+
|
2470
|
+
Module.prototype.disconnectContextForScope = function (scope) {
|
2471
|
+
var context = this.contextsByScope.get(scope);
|
2472
|
+
|
2473
|
+
if (context) {
|
2474
|
+
this.connectedContexts.delete(context);
|
2475
|
+
context.disconnect();
|
2476
|
+
}
|
2477
|
+
};
|
2478
|
+
|
2479
|
+
Module.prototype.fetchContextForScope = function (scope) {
|
2480
|
+
var context = this.contextsByScope.get(scope);
|
2481
|
+
|
2482
|
+
if (!context) {
|
2483
|
+
context = new _context.Context(this, scope);
|
2484
|
+
this.contextsByScope.set(scope, context);
|
2485
|
+
}
|
2486
|
+
|
2487
|
+
return context;
|
2488
|
+
};
|
2489
|
+
|
2490
|
+
return Module;
|
2491
|
+
}(); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kdWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL21vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxPQUFPLEVBQUUsT0FBTyxFQUFFLE1BQU0sV0FBVyxDQUFBO0FBRW5DLE9BQU8sRUFBYyxlQUFlLEVBQUUsTUFBTSxjQUFjLENBQU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SSxDQUFDLGlCQUFpQixDQUFDLE1BQU0sQ0FBQyxPQUFPLENBQUMsQ0FBQTtZQUN0QyxPQUFPLENBQUMsVUFBVSxFQUFFLENBQUE7U0FDckI7SUFDSCxDQUFDO0lBRU8scUNBQW9CLEdBQTVCLFVBQTZCLEtBQVk7UUFDdkMsSUFBSSxPQUFPLEdBQUcsSUFBSSxDQUFDLGVBQWUsQ0FBQyxHQUFHLENBQUMsS0FBSyxDQUFDLENBQUE7UUFDN0MsSUFBSSxDQUFDLE9BQU8sRUFBRTtZQUNaLE9BQU8sR0FBRyxJQUFJLE9BQU8sQ0FBQyxJQUFJLEVBQUUsS0FBSyxDQUFDLENBQUE7WUFDbEMsSUFBSSxDQUFDLGVBQWUsQ0FBQyxHQUFHLENBQUMsS0FBSyxFQUFFLE9BQU8sQ0FBQyxDQUFBO1NBQ3pDO1FBQ0QsT0FBTyxPQUFPLENBQUE7SUFDaEIsQ0FBQztJQUNILGFBQUM7QUFBRCxDQUFDLEFBL0NELElBK0NDIn0=
|
2492
|
+
|
2493
|
+
|
2494
|
+
exports.Module = Module;
|
2495
|
+
},{"./context":"../node_modules/@stimulus/core/dist/src/context.js","./definition":"../node_modules/@stimulus/core/dist/src/definition.js"}],"../node_modules/@stimulus/core/dist/src/data_map.js":[function(require,module,exports) {
|
2496
|
+
"use strict";
|
2497
|
+
|
2498
|
+
Object.defineProperty(exports, "__esModule", {
|
2499
|
+
value: true
|
2500
|
+
});
|
2501
|
+
exports.DataMap = void 0;
|
2502
|
+
|
2503
|
+
var DataMap =
|
2504
|
+
/** @class */
|
2505
|
+
function () {
|
2506
|
+
function DataMap(scope) {
|
2507
|
+
this.scope = scope;
|
2508
|
+
}
|
2509
|
+
|
2510
|
+
Object.defineProperty(DataMap.prototype, "element", {
|
2511
|
+
get: function () {
|
2512
|
+
return this.scope.element;
|
2513
|
+
},
|
2514
|
+
enumerable: true,
|
2515
|
+
configurable: true
|
2516
|
+
});
|
2517
|
+
Object.defineProperty(DataMap.prototype, "identifier", {
|
2518
|
+
get: function () {
|
2519
|
+
return this.scope.identifier;
|
2520
|
+
},
|
2521
|
+
enumerable: true,
|
2522
|
+
configurable: true
|
2523
|
+
});
|
2524
|
+
|
2525
|
+
DataMap.prototype.get = function (key) {
|
2526
|
+
key = this.getFormattedKey(key);
|
2527
|
+
return this.element.getAttribute(key);
|
2528
|
+
};
|
2529
|
+
|
2530
|
+
DataMap.prototype.set = function (key, value) {
|
2531
|
+
key = this.getFormattedKey(key);
|
2532
|
+
this.element.setAttribute(key, value);
|
2533
|
+
return this.get(key);
|
2534
|
+
};
|
2535
|
+
|
2536
|
+
DataMap.prototype.has = function (key) {
|
2537
|
+
key = this.getFormattedKey(key);
|
2538
|
+
return this.element.hasAttribute(key);
|
2539
|
+
};
|
2540
|
+
|
2541
|
+
DataMap.prototype.delete = function (key) {
|
2542
|
+
if (this.has(key)) {
|
2543
|
+
key = this.getFormattedKey(key);
|
2544
|
+
this.element.removeAttribute(key);
|
2545
|
+
return true;
|
2546
|
+
} else {
|
2547
|
+
return false;
|
2548
|
+
}
|
2549
|
+
};
|
2550
|
+
|
2551
|
+
DataMap.prototype.getFormattedKey = function (key) {
|
2552
|
+
return "data-" + this.identifier + "-" + dasherize(key);
|
2553
|
+
};
|
2554
|
+
|
2555
|
+
return DataMap;
|
2556
|
+
}();
|
2557
|
+
|
2558
|
+
exports.DataMap = DataMap;
|
2559
|
+
|
2560
|
+
function dasherize(value) {
|
2561
|
+
return value.replace(/([A-Z])/g, function (_, char) {
|
2562
|
+
return "-" + char.toLowerCase();
|
2563
|
+
});
|
2564
|
+
} //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0YV9tYXAuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvZGF0YV9tYXAudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRUE7SUFHRSxpQkFBWSxLQUFZO1FBQ3RCLElBQUksQ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BQyxlQUFlLENBQUMsR0FBRyxDQUFDLENBQUE7WUFDL0IsSUFBSSxDQUFDLE9BQU8sQ0FBQyxlQUFlLENBQUMsR0FBRyxDQUFDLENBQUE7WUFDakMsT0FBTyxJQUFJLENBQUE7U0FDWjthQUFNO1lBQ0wsT0FBTyxLQUFLLENBQUE7U0FDYjtJQUNILENBQUM7SUFFTyxpQ0FBZSxHQUF2QixVQUF3QixHQUFXO1FBQ2pDLE9BQU8sVUFBUSxJQUFJLENBQUMsVUFBVSxTQUFJLFNBQVMsQ0FBQyxHQUFHLENBQUcsQ0FBQTtJQUNwRCxDQUFDO0lBQ0gsY0FBQztBQUFELENBQUMsQUE1Q0QsSUE0Q0M7O0FBRUQsbUJBQW1CLEtBQWE7SUFDOUIsT0FBTyxLQUFLLENBQUMsT0FBTyxDQUFDLFVBQVUsRUFBRSxVQUFDLENBQUMsRUFBRSxJQUFJLElBQUssT0FBQSxNQUFJLElBQUksQ0FBQyxXQUFXLEVBQUksRUFBeEIsQ0FBd0IsQ0FBQyxDQUFBO0FBQ3pFLENBQUMifQ==
|
2565
|
+
},{}],"../node_modules/@stimulus/core/dist/src/selectors.js":[function(require,module,exports) {
|
2566
|
+
"use strict";
|
2567
|
+
|
2568
|
+
Object.defineProperty(exports, "__esModule", {
|
2569
|
+
value: true
|
2570
|
+
});
|
2571
|
+
exports.attributeValueContainsToken = attributeValueContainsToken;
|
2572
|
+
|
2573
|
+
/** @hidden */
|
2574
|
+
function attributeValueContainsToken(attributeName, token) {
|
2575
|
+
return "[" + attributeName + "~=\"" + token + "\"]";
|
2576
|
+
} //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VsZWN0b3JzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3NlbGVjdG9ycy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjO0FBQ2QsTUFBTSxzQ0FBc0MsYUFBcUIsRUFBRSxLQUFhO0lBQzlFLE9BQU8sTUFBSSxhQUFhLFlBQU0sS0FBSyxRQUFJLENBQUE7QUFDekMsQ0FBQyJ9
|
2577
|
+
},{}],"../node_modules/@stimulus/core/dist/src/target_set.js":[function(require,module,exports) {
|
2578
|
+
"use strict";
|
2579
|
+
|
2580
|
+
Object.defineProperty(exports, "__esModule", {
|
2581
|
+
value: true
|
2582
|
+
});
|
2583
|
+
exports.TargetSet = void 0;
|
2584
|
+
|
2585
|
+
var _selectors = require("./selectors");
|
2586
|
+
|
2587
|
+
var TargetSet =
|
2588
|
+
/** @class */
|
2589
|
+
function () {
|
2590
|
+
function TargetSet(scope) {
|
2591
|
+
this.scope = scope;
|
2592
|
+
}
|
2593
|
+
|
2594
|
+
Object.defineProperty(TargetSet.prototype, "element", {
|
2595
|
+
get: function () {
|
2596
|
+
return this.scope.element;
|
2597
|
+
},
|
2598
|
+
enumerable: true,
|
2599
|
+
configurable: true
|
2600
|
+
});
|
2601
|
+
Object.defineProperty(TargetSet.prototype, "identifier", {
|
2602
|
+
get: function () {
|
2603
|
+
return this.scope.identifier;
|
2604
|
+
},
|
2605
|
+
enumerable: true,
|
2606
|
+
configurable: true
|
2607
|
+
});
|
2608
|
+
Object.defineProperty(TargetSet.prototype, "schema", {
|
2609
|
+
get: function () {
|
2610
|
+
return this.scope.schema;
|
2611
|
+
},
|
2612
|
+
enumerable: true,
|
2613
|
+
configurable: true
|
2614
|
+
});
|
2615
|
+
|
2616
|
+
TargetSet.prototype.has = function (targetName) {
|
2617
|
+
return this.find(targetName) != null;
|
2618
|
+
};
|
2619
|
+
|
2620
|
+
TargetSet.prototype.find = function () {
|
2621
|
+
var targetNames = [];
|
2622
|
+
|
2623
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
2624
|
+
targetNames[_i] = arguments[_i];
|
2625
|
+
}
|
2626
|
+
|
2627
|
+
var selector = this.getSelectorForTargetNames(targetNames);
|
2628
|
+
return this.scope.findElement(selector);
|
2629
|
+
};
|
2630
|
+
|
2631
|
+
TargetSet.prototype.findAll = function () {
|
2632
|
+
var targetNames = [];
|
2633
|
+
|
2634
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
2635
|
+
targetNames[_i] = arguments[_i];
|
2636
|
+
}
|
2637
|
+
|
2638
|
+
var selector = this.getSelectorForTargetNames(targetNames);
|
2639
|
+
return this.scope.findAllElements(selector);
|
2640
|
+
};
|
2641
|
+
|
2642
|
+
TargetSet.prototype.getSelectorForTargetNames = function (targetNames) {
|
2643
|
+
var _this = this;
|
2644
|
+
|
2645
|
+
return targetNames.map(function (targetName) {
|
2646
|
+
return _this.getSelectorForTargetName(targetName);
|
2647
|
+
}).join(", ");
|
2648
|
+
};
|
2649
|
+
|
2650
|
+
TargetSet.prototype.getSelectorForTargetName = function (targetName) {
|
2651
|
+
var targetDescriptor = this.identifier + "." + targetName;
|
2652
|
+
return (0, _selectors.attributeValueContainsToken)(this.schema.targetAttribute, targetDescriptor);
|
2653
|
+
};
|
2654
|
+
|
2655
|
+
return TargetSet;
|
2656
|
+
}(); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFyZ2V0X3NldC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy90YXJnZXRfc2V0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBLE9BQU8sRUFBRSwyQkFBMkIsRUFBRSxNQUFNLGFBQWEsQ0FBQTtBQUV6RDtJQUdFLG1CQUFZLEtBQVk7UUFDdEIsSUFBSSxDQUFDLEtBQUssR0FBRyxLQUFLLENBQUE7SUFDcEIsQ0FBQztJQUVELHNCQUFJLDhCQUFPO2FBQVg7WUFDRSxPQUFPLElBQUksQ0FBQyxLQUFLLENBQUMsT0FBTyxDQUFBO1FBQzNCLENBQUM7OztPQUFBO0lBRUQsc0JBQUksaUNBQVU7YUFBZDtZQUNFLE9BQU8sSUFBSSxDQUFDLEt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UE7SUFDNUYsQ0FBQztJQUVPLDRDQUF3QixHQUFoQyxVQUFpQyxVQUFrQjtRQUNqRCxJQUFNLGdCQUFnQixHQUFNLElBQUksQ0FBQyxVQUFVLFNBQUksVUFBWSxDQUFBO1FBQzNELE9BQU8sMkJBQTJCLENBQUMsSUFBSSxDQUFDLE1BQU0sQ0FBQyxlQUFlLEVBQUUsZ0JBQWdCLENBQUMsQ0FBQTtJQUNuRixDQUFDO0lBQ0gsZ0JBQUM7QUFBRCxDQUFDLEFBekNELElBeUNDIn0=
|
2657
|
+
|
2658
|
+
|
2659
|
+
exports.TargetSet = TargetSet;
|
2660
|
+
},{"./selectors":"../node_modules/@stimulus/core/dist/src/selectors.js"}],"../node_modules/@stimulus/core/dist/src/scope.js":[function(require,module,exports) {
|
2661
|
+
"use strict";
|
2662
|
+
|
2663
|
+
Object.defineProperty(exports, "__esModule", {
|
2664
|
+
value: true
|
2665
|
+
});
|
2666
|
+
exports.Scope = void 0;
|
2667
|
+
|
2668
|
+
var _data_map = require("./data_map");
|
2669
|
+
|
2670
|
+
var _target_set = require("./target_set");
|
2671
|
+
|
2672
|
+
var _selectors = require("./selectors");
|
2673
|
+
|
2674
|
+
var Scope =
|
2675
|
+
/** @class */
|
2676
|
+
function () {
|
2677
|
+
function Scope(schema, identifier, element) {
|
2678
|
+
this.schema = schema;
|
2679
|
+
this.identifier = identifier;
|
2680
|
+
this.element = element;
|
2681
|
+
this.targets = new _target_set.TargetSet(this);
|
2682
|
+
this.data = new _data_map.DataMap(this);
|
2683
|
+
}
|
2684
|
+
|
2685
|
+
Scope.prototype.findElement = function (selector) {
|
2686
|
+
return this.findAllElements(selector)[0];
|
2687
|
+
};
|
2688
|
+
|
2689
|
+
Scope.prototype.findAllElements = function (selector) {
|
2690
|
+
var head = this.element.matches(selector) ? [this.element] : [];
|
2691
|
+
var tail = this.filterElements(Array.from(this.element.querySelectorAll(selector)));
|
2692
|
+
return head.concat(tail);
|
2693
|
+
};
|
2694
|
+
|
2695
|
+
Scope.prototype.filterElements = function (elements) {
|
2696
|
+
var _this = this;
|
2697
|
+
|
2698
|
+
return elements.filter(function (element) {
|
2699
|
+
return _this.containsElement(element);
|
2700
|
+
});
|
2701
|
+
};
|
2702
|
+
|
2703
|
+
Scope.prototype.containsElement = function (element) {
|
2704
|
+
return element.closest(this.controllerSelector) === this.element;
|
2705
|
+
};
|
2706
|
+
|
2707
|
+
Object.defineProperty(Scope.prototype, "controllerSelector", {
|
2708
|
+
get: function () {
|
2709
|
+
return (0, _selectors.attributeValueContainsToken)(this.schema.controllerAttribute, this.identifier);
|
2710
|
+
},
|
2711
|
+
enumerable: true,
|
2712
|
+
configurable: true
|
2713
|
+
});
|
2714
|
+
return Scope;
|
2715
|
+
}(); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2NvcGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvc2NvcGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLE9BQU8sRUFBRSxNQUFNLFlBQVksQ0FBQTtBQUVwQyxPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sY0FBYyxDQUFBO0FBQ3hDLE9BQU8sRUFBRSwyQkFBMkIsRUFBRSxNQUFNLGFBQWEsQ0FBQTtBQUV6RDtJQU9FLGVBQVksTUFBYyxFQUFFLFVBQWtCLEVBQUUsT0FBZ0I7UUFDOUQsSUFBSSxDQUFDLE1BQU0sR0FBRyxNQUFNLENBQUE7UUFDcEIsSUFBSSxDQUFDLFVBQVUsR0FBRyxVQUFVLENBQUE7UUFDNUIsSUFBSSxDQUFDLE9BQU8sR0FBRyxPQUFPLENBQUE7UUFDdEIsSUFBSSxDQUFDLE9BQU8sR0FBRyxJQUFJLFNBQVMsQ0FBQyxJQUFJLENBQUMsQ0FBQTtRQUNsQyxJQUFJLENBQUMsSUFBSSxHQUFHLElBQUksT0FBTyxDQUF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DQUFDLG1CQUFtQixFQUFFLElBQUksQ0FBQyxVQUFVLENBQUMsQ0FBQTtRQUN0RixDQUFDOzs7T0FBQTtJQUNILFlBQUM7QUFBRCxDQUFDLEFBcENELElBb0NDIn0=
|
2716
|
+
|
2717
|
+
|
2718
|
+
exports.Scope = Scope;
|
2719
|
+
},{"./data_map":"../node_modules/@stimulus/core/dist/src/data_map.js","./target_set":"../node_modules/@stimulus/core/dist/src/target_set.js","./selectors":"../node_modules/@stimulus/core/dist/src/selectors.js"}],"../node_modules/@stimulus/core/dist/src/scope_observer.js":[function(require,module,exports) {
|
2720
|
+
"use strict";
|
2721
|
+
|
2722
|
+
Object.defineProperty(exports, "__esModule", {
|
2723
|
+
value: true
|
2724
|
+
});
|
2725
|
+
exports.ScopeObserver = void 0;
|
2726
|
+
|
2727
|
+
var _scope = require("./scope");
|
2728
|
+
|
2729
|
+
var _mutationObservers = require("@stimulus/mutation-observers");
|
2730
|
+
|
2731
|
+
var ScopeObserver =
|
2732
|
+
/** @class */
|
2733
|
+
function () {
|
2734
|
+
function ScopeObserver(element, schema, delegate) {
|
2735
|
+
this.element = element;
|
2736
|
+
this.schema = schema;
|
2737
|
+
this.delegate = delegate;
|
2738
|
+
this.valueListObserver = new _mutationObservers.ValueListObserver(this.element, this.controllerAttribute, this);
|
2739
|
+
this.scopesByIdentifierByElement = new WeakMap();
|
2740
|
+
this.scopeReferenceCounts = new WeakMap();
|
2741
|
+
}
|
2742
|
+
|
2743
|
+
ScopeObserver.prototype.start = function () {
|
2744
|
+
this.valueListObserver.start();
|
2745
|
+
};
|
2746
|
+
|
2747
|
+
ScopeObserver.prototype.stop = function () {
|
2748
|
+
this.valueListObserver.stop();
|
2749
|
+
};
|
2750
|
+
|
2751
|
+
Object.defineProperty(ScopeObserver.prototype, "controllerAttribute", {
|
2752
|
+
get: function () {
|
2753
|
+
return this.schema.controllerAttribute;
|
2754
|
+
},
|
2755
|
+
enumerable: true,
|
2756
|
+
configurable: true
|
2757
|
+
}); // Value observer delegate
|
2758
|
+
|
2759
|
+
/** @hidden */
|
2760
|
+
|
2761
|
+
ScopeObserver.prototype.parseValueForToken = function (token) {
|
2762
|
+
var element = token.element,
|
2763
|
+
identifier = token.content;
|
2764
|
+
var scopesByIdentifier = this.fetchScopesByIdentifierForElement(element);
|
2765
|
+
var scope = scopesByIdentifier.get(identifier);
|
2766
|
+
|
2767
|
+
if (!scope) {
|
2768
|
+
scope = new _scope.Scope(this.schema, identifier, element);
|
2769
|
+
scopesByIdentifier.set(identifier, scope);
|
2770
|
+
}
|
2771
|
+
|
2772
|
+
return scope;
|
2773
|
+
};
|
2774
|
+
/** @hidden */
|
2775
|
+
|
2776
|
+
|
2777
|
+
ScopeObserver.prototype.elementMatchedValue = function (element, value) {
|
2778
|
+
var referenceCount = (this.scopeReferenceCounts.get(value) || 0) + 1;
|
2779
|
+
this.scopeReferenceCounts.set(value, referenceCount);
|
2780
|
+
|
2781
|
+
if (referenceCount == 1) {
|
2782
|
+
this.delegate.scopeConnected(value);
|
2783
|
+
}
|
2784
|
+
};
|
2785
|
+
/** @hidden */
|
2786
|
+
|
2787
|
+
|
2788
|
+
ScopeObserver.prototype.elementUnmatchedValue = function (element, value) {
|
2789
|
+
var referenceCount = this.scopeReferenceCounts.get(value);
|
2790
|
+
|
2791
|
+
if (referenceCount) {
|
2792
|
+
this.scopeReferenceCounts.set(value, referenceCount - 1);
|
2793
|
+
|
2794
|
+
if (referenceCount == 1) {
|
2795
|
+
this.delegate.scopeDisconnected(value);
|
2796
|
+
}
|
2797
|
+
}
|
2798
|
+
};
|
2799
|
+
|
2800
|
+
ScopeObserver.prototype.fetchScopesByIdentifierForElement = function (element) {
|
2801
|
+
var scopesByIdentifier = this.scopesByIdentifierByElement.get(element);
|
2802
|
+
|
2803
|
+
if (!scopesByIdentifier) {
|
2804
|
+
scopesByIdentifier = new Map();
|
2805
|
+
this.scopesByIdentifierByElement.set(element, scopesByIdentifier);
|
2806
|
+
}
|
2807
|
+
|
2808
|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FyQixVQUFzQixPQUFnQixFQUFFLEtBQVk7UUFDbEQsSUFBTSxjQUFjLEdBQUcsSUFBSSxDQUFDLG9CQUFvQixDQUFDLEdBQUcsQ0FBQyxLQUFLLENBQUMsQ0FBQTtRQUMzRCxJQUFJLGNBQWMsRUFBRTtZQUNsQixJQUFJLENBQUMsb0JBQW9CLENBQUMsR0FBRyxDQUFDLEtBQUssRUFBRSxjQUFjLEdBQUcsQ0FBQyxDQUFDLENBQUE7WUFDeEQsSUFBSSxjQUFjLElBQUksQ0FBQyxFQUFFO2dCQUN2QixJQUFJLENBQUMsUUFBUSxDQUFDLGlCQUFpQixDQUFDLEtBQUssQ0FBQyxDQUFBO2FBQ3ZDO1NBQ0Y7SUFDSCxDQUFDO0lBRU8seURBQWlDLEdBQXpDLFVBQTBDLE9BQWdCO1FBQ3hELElBQUksa0JBQWtCLEdBQUcsSUFBSSxDQUFDLDJCQUEyQixDQUFDLEdBQUcsQ0FBQyxPQUFPLENBQUMsQ0FBQTtRQUN0RSxJQUFJLENBQUMsa0JBQWtCLEVBQUU7WUFDdkIsa0JBQWtCLEdBQUcsSUFBSSxHQUFHLENBQUE7WUFDNUIsSUFBSSxDQUFDLDJCQUEyQixDQUFDLEdBQUcsQ0FBQyxPQUFPLEVBQUUsa0JBQWtCLENBQUMsQ0FBQTtTQUNsRTtRQUNELE9BQU8sa0JBQWtCLENBQUE7SUFDM0IsQ0FBQztJQUNILG9CQUFDO0FBQUQsQ0FBQyxBQXpFRCxJQXlFQyJ9
|
2813
|
+
|
2814
|
+
|
2815
|
+
exports.ScopeObserver = ScopeObserver;
|
2816
|
+
},{"./scope":"../node_modules/@stimulus/core/dist/src/scope.js","@stimulus/mutation-observers":"../node_modules/@stimulus/mutation-observers/dist/index.js"}],"../node_modules/@stimulus/core/dist/src/router.js":[function(require,module,exports) {
|
2817
|
+
"use strict";
|
2818
|
+
|
2819
|
+
Object.defineProperty(exports, "__esModule", {
|
2820
|
+
value: true
|
2821
|
+
});
|
2822
|
+
exports.Router = void 0;
|
2823
|
+
|
2824
|
+
var _module = require("./module");
|
2825
|
+
|
2826
|
+
var _multimap = require("@stimulus/multimap");
|
2827
|
+
|
2828
|
+
var _scope_observer = require("./scope_observer");
|
2829
|
+
|
2830
|
+
var Router =
|
2831
|
+
/** @class */
|
2832
|
+
function () {
|
2833
|
+
function Router(application) {
|
2834
|
+
this.application = application;
|
2835
|
+
this.scopeObserver = new _scope_observer.ScopeObserver(this.element, this.schema, this);
|
2836
|
+
this.scopesByIdentifier = new _multimap.Multimap();
|
2837
|
+
this.modulesByIdentifier = new Map();
|
2838
|
+
}
|
2839
|
+
|
2840
|
+
Object.defineProperty(Router.prototype, "element", {
|
2841
|
+
get: function () {
|
2842
|
+
return this.application.element;
|
2843
|
+
},
|
2844
|
+
enumerable: true,
|
2845
|
+
configurable: true
|
2846
|
+
});
|
2847
|
+
Object.defineProperty(Router.prototype, "schema", {
|
2848
|
+
get: function () {
|
2849
|
+
return this.application.schema;
|
2850
|
+
},
|
2851
|
+
enumerable: true,
|
2852
|
+
configurable: true
|
2853
|
+
});
|
2854
|
+
Object.defineProperty(Router.prototype, "controllerAttribute", {
|
2855
|
+
get: function () {
|
2856
|
+
return this.schema.controllerAttribute;
|
2857
|
+
},
|
2858
|
+
enumerable: true,
|
2859
|
+
configurable: true
|
2860
|
+
});
|
2861
|
+
Object.defineProperty(Router.prototype, "modules", {
|
2862
|
+
get: function () {
|
2863
|
+
return Array.from(this.modulesByIdentifier.values());
|
2864
|
+
},
|
2865
|
+
enumerable: true,
|
2866
|
+
configurable: true
|
2867
|
+
});
|
2868
|
+
Object.defineProperty(Router.prototype, "contexts", {
|
2869
|
+
get: function () {
|
2870
|
+
return this.modules.reduce(function (contexts, module) {
|
2871
|
+
return contexts.concat(module.contexts);
|
2872
|
+
}, []);
|
2873
|
+
},
|
2874
|
+
enumerable: true,
|
2875
|
+
configurable: true
|
2876
|
+
});
|
2877
|
+
|
2878
|
+
Router.prototype.start = function () {
|
2879
|
+
this.scopeObserver.start();
|
2880
|
+
};
|
2881
|
+
|
2882
|
+
Router.prototype.stop = function () {
|
2883
|
+
this.scopeObserver.stop();
|
2884
|
+
};
|
2885
|
+
|
2886
|
+
Router.prototype.loadDefinition = function (definition) {
|
2887
|
+
this.unloadIdentifier(definition.identifier);
|
2888
|
+
var module = new _module.Module(this.application, definition);
|
2889
|
+
this.connectModule(module);
|
2890
|
+
};
|
2891
|
+
|
2892
|
+
Router.prototype.unloadIdentifier = function (identifier) {
|
2893
|
+
var module = this.modulesByIdentifier.get(identifier);
|
2894
|
+
|
2895
|
+
if (module) {
|
2896
|
+
this.disconnectModule(module);
|
2897
|
+
}
|
2898
|
+
};
|
2899
|
+
|
2900
|
+
Router.prototype.getContextForElementAndIdentifier = function (element, identifier) {
|
2901
|
+
var module = this.modulesByIdentifier.get(identifier);
|
2902
|
+
|
2903
|
+
if (module) {
|
2904
|
+
return module.contexts.find(function (context) {
|
2905
|
+
return context.element == element;
|
2906
|
+
});
|
2907
|
+
}
|
2908
|
+
}; // Error handler delegate
|
2909
|
+
|
2910
|
+
/** @hidden */
|
2911
|
+
|
2912
|
+
|
2913
|
+
Router.prototype.handleError = function (error, message, detail) {
|
2914
|
+
this.application.handleError(error, message, detail);
|
2915
|
+
}; // Scope observer delegate
|
2916
|
+
|
2917
|
+
/** @hidden */
|
2918
|
+
|
2919
|
+
|
2920
|
+
Router.prototype.scopeConnected = function (scope) {
|
2921
|
+
this.scopesByIdentifier.add(scope.identifier, scope);
|
2922
|
+
var module = this.modulesByIdentifier.get(scope.identifier);
|
2923
|
+
|
2924
|
+
if (module) {
|
2925
|
+
module.connectContextForScope(scope);
|
2926
|
+
}
|
2927
|
+
};
|
2928
|
+
/** @hidden */
|
2929
|
+
|
2930
|
+
|
2931
|
+
Router.prototype.scopeDisconnected = function (scope) {
|
2932
|
+
this.scopesByIdentifier.delete(scope.identifier, scope);
|
2933
|
+
var module = this.modulesByIdentifier.get(scope.identifier);
|
2934
|
+
|
2935
|
+
if (module) {
|
2936
|
+
module.disconnectContextForScope(scope);
|
2937
|
+
}
|
2938
|
+
}; // Modules
|
2939
|
+
|
2940
|
+
|
2941
|
+
Router.prototype.connectModule = function (module) {
|
2942
|
+
this.modulesByIdentifier.set(module.identifier, module);
|
2943
|
+
var scopes = this.scopesByIdentifier.getValuesForKey(module.identifier);
|
2944
|
+
scopes.forEach(function (scope) {
|
2945
|
+
return module.connectContextForScope(scope);
|
2946
|
+
});
|
2947
|
+
};
|
2948
|
+
|
2949
|
+
Router.prototype.disconnectModule = function (module) {
|
2950
|
+
this.modulesByIdentifier.delete(module.identifier);
|
2951
|
+
var scopes = this.scopesByIdentifier.getValuesForKey(module.identifier);
|
2952
|
+
scopes.forEach(function (scope) {
|
2953
|
+
return module.disconnectContextForScope(scope);
|
2954
|
+
});
|
2955
|
+
};
|
2956
|
+
|
2957
|
+
return Router;
|
2958
|
+
}(); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm91dGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3JvdXRlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFHQSxPQUFPLEVBQUUsTUFBTSxFQUFFLE1BQU0sVUFBVSxDQUFBO0FBQ2pDLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxvQkFBb0IsQ0FBQTtBQUc3QyxPQUFPLEVBQUUsYUFBYSxFQUF5QixNQUFNLGtCQUFrQixDQUFBO0FBRXZFO0lBTUUsZ0JBQVksV0FBd0I7UUFDbEMsSUFBSSxDQUFDLFdBQVcsR0FBRyxXQUFXLENBQUE7UUFDOUIsSUFBSSxDQUFDLGFBQWEsR0FBRyxJQUFJLGFBQWEsQ0FBQyxJQUFJLENBQUMsT0FBTyxFQUFFLElBQUksQ0FBQyxNQUFNLEVBQUUsSUFBSSxDQUFDLENBQUE7UUFDdkUsSUFBSSxDQUFDLGtCQUFrQixHQ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FDLEVBQXBDLENBQW9DLENBQUMsQ0FBQTtJQUMvRCxDQUFDO0lBRU8saUNBQWdCLEdBQXhCLFVBQXlCLE1BQWM7UUFDckMsSUFBSSxDQUFDLG1CQUFtQixDQUFDLE1BQU0sQ0FBQyxNQUFNLENBQUMsVUFBVSxDQUFDLENBQUE7UUFDbEQsSUFBTSxNQUFNLEdBQUcsSUFBSSxDQUFDLGtCQUFrQixDQUFDLGVBQWUsQ0FBQyxNQUFNLENBQUMsVUFBVSxDQUFDLENBQUE7UUFDekUsTUFBTSxDQUFDLE9BQU8sQ0FBQyxVQUFBLEtBQUssSUFBSSxPQUFBLE1BQU0sQ0FBQyx5QkFBeUIsQ0FBQyxLQUFLLENBQUMsRUFBdkMsQ0FBdUMsQ0FBQyxDQUFBO0lBQ2xFLENBQUM7SUFDSCxhQUFDO0FBQUQsQ0FBQyxBQXJHRCxJQXFHQyJ9
|
2959
|
+
|
2960
|
+
|
2961
|
+
exports.Router = Router;
|
2962
|
+
},{"./module":"../node_modules/@stimulus/core/dist/src/module.js","@stimulus/multimap":"../node_modules/@stimulus/multimap/dist/index.js","./scope_observer":"../node_modules/@stimulus/core/dist/src/scope_observer.js"}],"../node_modules/@stimulus/core/dist/src/schema.js":[function(require,module,exports) {
|
2963
|
+
"use strict";
|
2964
|
+
|
2965
|
+
Object.defineProperty(exports, "__esModule", {
|
2966
|
+
value: true
|
2967
|
+
});
|
2968
|
+
exports.defaultSchema = void 0;
|
2969
|
+
var defaultSchema = {
|
2970
|
+
controllerAttribute: "data-controller",
|
2971
|
+
actionAttribute: "data-action",
|
2972
|
+
targetAttribute: "data-target"
|
2973
|
+
}; //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2NoZW1hLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3NjaGVtYS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFNQSxNQUFNLENBQUMsSUFBTSxhQUFhLEdBQVc7SUFDbkMsbUJBQW1CLEVBQUUsaUJBQWlCO0lBQ3RDLGVBQWUsRUFBRSxhQUFhO0lBQzlCLGVBQWUsRUFBRSxhQUFhO0NBQy9CLENBQUEifQ==
|
2974
|
+
|
2975
|
+
exports.defaultSchema = defaultSchema;
|
2976
|
+
},{}],"../node_modules/@stimulus/core/dist/src/application.js":[function(require,module,exports) {
|
2977
|
+
"use strict";
|
2978
|
+
|
2979
|
+
Object.defineProperty(exports, "__esModule", {
|
2980
|
+
value: true
|
2981
|
+
});
|
2982
|
+
exports.Application = void 0;
|
2983
|
+
|
2984
|
+
var _dispatcher = require("./dispatcher");
|
2985
|
+
|
2986
|
+
var _router = require("./router");
|
2987
|
+
|
2988
|
+
var _schema = require("./schema");
|
2989
|
+
|
2990
|
+
var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
|
2991
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
2992
|
+
function fulfilled(value) {
|
2993
|
+
try {
|
2994
|
+
step(generator.next(value));
|
2995
|
+
} catch (e) {
|
2996
|
+
reject(e);
|
2997
|
+
}
|
2998
|
+
}
|
2999
|
+
|
3000
|
+
function rejected(value) {
|
3001
|
+
try {
|
3002
|
+
step(generator["throw"](value));
|
3003
|
+
} catch (e) {
|
3004
|
+
reject(e);
|
3005
|
+
}
|
3006
|
+
}
|
3007
|
+
|
3008
|
+
function step(result) {
|
3009
|
+
result.done ? resolve(result.value) : new P(function (resolve) {
|
3010
|
+
resolve(result.value);
|
3011
|
+
}).then(fulfilled, rejected);
|
3012
|
+
}
|
3013
|
+
|
3014
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
3015
|
+
});
|
3016
|
+
};
|
3017
|
+
|
3018
|
+
var __generator = void 0 && (void 0).__generator || function (thisArg, body) {
|
3019
|
+
var _ = {
|
3020
|
+
label: 0,
|
3021
|
+
sent: function () {
|
3022
|
+
if (t[0] & 1) throw t[1];
|
3023
|
+
return t[1];
|
3024
|
+
},
|
3025
|
+
trys: [],
|
3026
|
+
ops: []
|
3027
|
+
},
|
3028
|
+
f,
|
3029
|
+
y,
|
3030
|
+
t,
|
3031
|
+
g;
|
3032
|
+
return g = {
|
3033
|
+
next: verb(0),
|
3034
|
+
"throw": verb(1),
|
3035
|
+
"return": verb(2)
|
3036
|
+
}, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
|
3037
|
+
return this;
|
3038
|
+
}), g;
|
3039
|
+
|
3040
|
+
function verb(n) {
|
3041
|
+
return function (v) {
|
3042
|
+
return step([n, v]);
|
3043
|
+
};
|
3044
|
+
}
|
3045
|
+
|
3046
|
+
function step(op) {
|
3047
|
+
if (f) throw new TypeError("Generator is already executing.");
|
3048
|
+
|
3049
|
+
while (_) try {
|
3050
|
+
if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
|
3051
|
+
if (y = 0, t) op = [0, t.value];
|
3052
|
+
|
3053
|
+
switch (op[0]) {
|
3054
|
+
case 0:
|
3055
|
+
case 1:
|
3056
|
+
t = op;
|
3057
|
+
break;
|
3058
|
+
|
3059
|
+
case 4:
|
3060
|
+
_.label++;
|
3061
|
+
return {
|
3062
|
+
value: op[1],
|
3063
|
+
done: false
|
3064
|
+
};
|
3065
|
+
|
3066
|
+
case 5:
|
3067
|
+
_.label++;
|
3068
|
+
y = op[1];
|
3069
|
+
op = [0];
|
3070
|
+
continue;
|
3071
|
+
|
3072
|
+
case 7:
|
3073
|
+
op = _.ops.pop();
|
3074
|
+
|
3075
|
+
_.trys.pop();
|
3076
|
+
|
3077
|
+
continue;
|
3078
|
+
|
3079
|
+
default:
|
3080
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
3081
|
+
_ = 0;
|
3082
|
+
continue;
|
3083
|
+
}
|
3084
|
+
|
3085
|
+
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
3086
|
+
_.label = op[1];
|
3087
|
+
break;
|
3088
|
+
}
|
3089
|
+
|
3090
|
+
if (op[0] === 6 && _.label < t[1]) {
|
3091
|
+
_.label = t[1];
|
3092
|
+
t = op;
|
3093
|
+
break;
|
3094
|
+
}
|
3095
|
+
|
3096
|
+
if (t && _.label < t[2]) {
|
3097
|
+
_.label = t[2];
|
3098
|
+
|
3099
|
+
_.ops.push(op);
|
3100
|
+
|
3101
|
+
break;
|
3102
|
+
}
|
3103
|
+
|
3104
|
+
if (t[2]) _.ops.pop();
|
3105
|
+
|
3106
|
+
_.trys.pop();
|
3107
|
+
|
3108
|
+
continue;
|
3109
|
+
}
|
3110
|
+
|
3111
|
+
op = body.call(thisArg, _);
|
3112
|
+
} catch (e) {
|
3113
|
+
op = [6, e];
|
3114
|
+
y = 0;
|
3115
|
+
} finally {
|
3116
|
+
f = t = 0;
|
3117
|
+
}
|
3118
|
+
|
3119
|
+
if (op[0] & 5) throw op[1];
|
3120
|
+
return {
|
3121
|
+
value: op[0] ? op[1] : void 0,
|
3122
|
+
done: true
|
3123
|
+
};
|
3124
|
+
}
|
3125
|
+
};
|
3126
|
+
|
3127
|
+
var Application =
|
3128
|
+
/** @class */
|
3129
|
+
function () {
|
3130
|
+
function Application(element, schema) {
|
3131
|
+
if (element === void 0) {
|
3132
|
+
element = document.documentElement;
|
3133
|
+
}
|
3134
|
+
|
3135
|
+
if (schema === void 0) {
|
3136
|
+
schema = _schema.defaultSchema;
|
3137
|
+
}
|
3138
|
+
|
3139
|
+
this.element = element;
|
3140
|
+
this.schema = schema;
|
3141
|
+
this.dispatcher = new _dispatcher.Dispatcher(this);
|
3142
|
+
this.router = new _router.Router(this);
|
3143
|
+
}
|
3144
|
+
|
3145
|
+
Application.start = function (element, schema) {
|
3146
|
+
var application = new Application(element, schema);
|
3147
|
+
application.start();
|
3148
|
+
return application;
|
3149
|
+
};
|
3150
|
+
|
3151
|
+
Application.prototype.start = function () {
|
3152
|
+
return __awaiter(this, void 0, void 0, function () {
|
3153
|
+
return __generator(this, function (_a) {
|
3154
|
+
switch (_a.label) {
|
3155
|
+
case 0:
|
3156
|
+
return [4
|
3157
|
+
/*yield*/
|
3158
|
+
, domReady()];
|
3159
|
+
|
3160
|
+
case 1:
|
3161
|
+
_a.sent();
|
3162
|
+
|
3163
|
+
this.router.start();
|
3164
|
+
this.dispatcher.start();
|
3165
|
+
return [2
|
3166
|
+
/*return*/
|
3167
|
+
];
|
3168
|
+
}
|
3169
|
+
});
|
3170
|
+
});
|
3171
|
+
};
|
3172
|
+
|
3173
|
+
Application.prototype.stop = function () {
|
3174
|
+
this.router.stop();
|
3175
|
+
this.dispatcher.stop();
|
3176
|
+
};
|
3177
|
+
|
3178
|
+
Application.prototype.register = function (identifier, controllerConstructor) {
|
3179
|
+
this.load({
|
3180
|
+
identifier: identifier,
|
3181
|
+
controllerConstructor: controllerConstructor
|
3182
|
+
});
|
3183
|
+
};
|
3184
|
+
|
3185
|
+
Application.prototype.load = function (head) {
|
3186
|
+
var _this = this;
|
3187
|
+
|
3188
|
+
var rest = [];
|
3189
|
+
|
3190
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
3191
|
+
rest[_i - 1] = arguments[_i];
|
3192
|
+
}
|
3193
|
+
|
3194
|
+
var definitions = Array.isArray(head) ? head : [head].concat(rest);
|
3195
|
+
definitions.forEach(function (definition) {
|
3196
|
+
return _this.router.loadDefinition(definition);
|
3197
|
+
});
|
3198
|
+
};
|
3199
|
+
|
3200
|
+
Application.prototype.unload = function (head) {
|
3201
|
+
var _this = this;
|
3202
|
+
|
3203
|
+
var rest = [];
|
3204
|
+
|
3205
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
3206
|
+
rest[_i - 1] = arguments[_i];
|
3207
|
+
}
|
3208
|
+
|
3209
|
+
var identifiers = Array.isArray(head) ? head : [head].concat(rest);
|
3210
|
+
identifiers.forEach(function (identifier) {
|
3211
|
+
return _this.router.unloadIdentifier(identifier);
|
3212
|
+
});
|
3213
|
+
};
|
3214
|
+
|
3215
|
+
Object.defineProperty(Application.prototype, "controllers", {
|
3216
|
+
// Controllers
|
3217
|
+
get: function () {
|
3218
|
+
return this.router.contexts.map(function (context) {
|
3219
|
+
return context.controller;
|
3220
|
+
});
|
3221
|
+
},
|
3222
|
+
enumerable: true,
|
3223
|
+
configurable: true
|
3224
|
+
});
|
3225
|
+
|
3226
|
+
Application.prototype.getControllerForElementAndIdentifier = function (element, identifier) {
|
3227
|
+
var context = this.router.getContextForElementAndIdentifier(element, identifier);
|
3228
|
+
return context ? context.controller : null;
|
3229
|
+
}; // Error handling
|
3230
|
+
|
3231
|
+
|
3232
|
+
Application.prototype.handleError = function (error, message, detail) {
|
3233
|
+
console.error("%s\n\n%o\n\n%o", message, error, detail);
|
3234
|
+
};
|
3235
|
+
|
3236
|
+
return Application;
|
3237
|
+
}();
|
3238
|
+
|
3239
|
+
exports.Application = Application;
|
3240
|
+
|
3241
|
+
function domReady() {
|
3242
|
+
return new Promise(function (resolve) {
|
3243
|
+
if (document.readyState == "loading") {
|
3244
|
+
document.addEventListener("DOMContentLoaded", resolve);
|
3245
|
+
} else {
|
3246
|
+
resolve();
|
3247
|
+
}
|
3248
|
+
});
|
3249
|
+
} //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBwbGljYXRpb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvYXBwbGljYXRpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFFQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sY0FBYyxDQUFBO0FBRXpDLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxVQUFVLENBQUE7QUFDakMsT0FBTyxFQUFVLGFBQWEsRUFBRSxNQUFNLFVBQVUsQ0FBQTtBQUVoRDtJ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FNLENBQUMsUUFBUSxDQUFDLEdBQUcsQ0FBQyxVQUFBLE9BQU8sSUFBSSxPQUFBLE9BQU8sQ0FBQyxVQUFVLEVBQWxCLENBQWtCLENBQUMsQ0FBQTtRQUNoRSxDQUFDOzs7T0FBQTtJQUVELDBEQUFvQyxHQUFwQyxVQUFxQyxPQUFnQixFQUFFLFVBQWtCO1FBQ3ZFLElBQU0sT0FBTyxHQUFHLElBQUksQ0FBQyxNQUFNLENBQUMsaUNBQWlDLENBQUMsT0FBTyxFQUFFLFVBQVUsQ0FBQyxDQUFBO1FBQ2xGLE9BQU8sT0FBTyxDQUFDLENBQUMsQ0FBQyxPQUFPLENBQUMsVUFBVSxDQUFDLENBQUMsQ0FBQyxJQUFJLENBQUE7SUFDNUMsQ0FBQztJQUVELGlCQUFpQjtJQUVqQixpQ0FBVyxHQUFYLFVBQVksS0FBWSxFQUFFLE9BQWUsRUFBRSxNQUFjO1FBQ3ZELE9BQU8sQ0FBQyxLQUFLLENBQUMsZ0JBQWdCLEVBQUUsT0FBTyxFQUFFLEtBQUssRUFBRSxNQUFNLENBQUMsQ0FBQTtJQUN6RCxDQUFDO0lBQ0gsa0JBQUM7QUFBRCxDQUFDLEFBaEVELElBZ0VDOztBQUVEO0lBQ0UsT0FBTyxJQUFJLE9BQU8sQ0FBQyxVQUFBLE9BQU87UUFDeEIsSUFBSSxRQUFRLENBQUMsVUFBVSxJQUFJLFNBQVMsRUFBRTtZQUNwQyxRQUFRLENBQUMsZ0JBQWdCLENBQUMsa0JBQWtCLEVBQUUsT0FBTyxDQUFDLENBQUE7U0FDdkQ7YUFBTTtZQUNMLE9BQU8sRUFBRSxDQUFBO1NBQ1Y7SUFDSCxDQUFDLENBQUMsQ0FBQTtBQUNKLENBQUMifQ==
|
3250
|
+
},{"./dispatcher":"../node_modules/@stimulus/core/dist/src/dispatcher.js","./router":"../node_modules/@stimulus/core/dist/src/router.js","./schema":"../node_modules/@stimulus/core/dist/src/schema.js"}],"../node_modules/@stimulus/core/dist/src/target_properties.js":[function(require,module,exports) {
|
3251
|
+
"use strict";
|
3252
|
+
|
3253
|
+
Object.defineProperty(exports, "__esModule", {
|
3254
|
+
value: true
|
3255
|
+
});
|
3256
|
+
exports.defineTargetProperties = defineTargetProperties;
|
3257
|
+
|
3258
|
+
/** @hidden */
|
3259
|
+
function defineTargetProperties(constructor) {
|
3260
|
+
var prototype = constructor.prototype;
|
3261
|
+
var targetNames = getTargetNamesForConstructor(constructor);
|
3262
|
+
targetNames.forEach(function (name) {
|
3263
|
+
var _a;
|
3264
|
+
|
3265
|
+
return defineLinkedProperties(prototype, (_a = {}, _a[name + "Target"] = {
|
3266
|
+
get: function () {
|
3267
|
+
var target = this.targets.find(name);
|
3268
|
+
|
3269
|
+
if (target) {
|
3270
|
+
return target;
|
3271
|
+
} else {
|
3272
|
+
throw new Error("Missing target element \"" + this.identifier + "." + name + "\"");
|
3273
|
+
}
|
3274
|
+
}
|
3275
|
+
}, _a[name + "Targets"] = {
|
3276
|
+
get: function () {
|
3277
|
+
return this.targets.findAll(name);
|
3278
|
+
}
|
3279
|
+
}, _a["has" + capitalize(name) + "Target"] = {
|
3280
|
+
get: function () {
|
3281
|
+
return this.targets.has(name);
|
3282
|
+
}
|
3283
|
+
}, _a));
|
3284
|
+
});
|
3285
|
+
}
|
3286
|
+
|
3287
|
+
function getTargetNamesForConstructor(constructor) {
|
3288
|
+
var ancestors = getAncestorsForConstructor(constructor);
|
3289
|
+
return Array.from(ancestors.reduce(function (targetNames, constructor) {
|
3290
|
+
getOwnTargetNamesForConstructor(constructor).forEach(function (name) {
|
3291
|
+
return targetNames.add(name);
|
3292
|
+
});
|
3293
|
+
return targetNames;
|
3294
|
+
}, new Set()));
|
3295
|
+
}
|
3296
|
+
|
3297
|
+
function getAncestorsForConstructor(constructor) {
|
3298
|
+
var ancestors = [];
|
3299
|
+
|
3300
|
+
while (constructor) {
|
3301
|
+
ancestors.push(constructor);
|
3302
|
+
constructor = Object.getPrototypeOf(constructor);
|
3303
|
+
}
|
3304
|
+
|
3305
|
+
return ancestors;
|
3306
|
+
}
|
3307
|
+
|
3308
|
+
function getOwnTargetNamesForConstructor(constructor) {
|
3309
|
+
var definition = constructor["targets"];
|
3310
|
+
return Array.isArray(definition) ? definition : [];
|
3311
|
+
}
|
3312
|
+
|
3313
|
+
function defineLinkedProperties(object, properties) {
|
3314
|
+
Object.keys(properties).forEach(function (name) {
|
3315
|
+
if (!(name in object)) {
|
3316
|
+
var descriptor = properties[name];
|
3317
|
+
Object.defineProperty(object, name, descriptor);
|
3318
|
+
}
|
3319
|
+
});
|
3320
|
+
}
|
3321
|
+
|
3322
|
+
function capitalize(name) {
|
3323
|
+
return name.charAt(0).toUpperCase() + name.slice(1);
|
3324
|
+
} //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFyZ2V0X3Byb3BlcnRpZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvdGFyZ2V0X3Byb3BlcnRpZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRUEsY0FBYztBQUNkLE1BQU0saUNBQWlDLFdBQXFCO0lBQzFELElBQU0sU0FBUyxHQUFHLFdBQVcsQ0FBQyxTQUFTLENBQUE7SUFDdkMsSUFBTSxXQUFXLEdBQUcsNEJBQTRCLENBQUMsV0FBVyxDQUFDLENBQUE7SUFDN0QsV0FBVyxDQUFDLE9BQU8sQ0FBQyxVQUFBLElBQUk7O1FBQUksT0FBQSxzQkFBc0IsQ0FBQyxTQUFTO1lBQzFELEdBQUksSUFBSSxXQUFRLElBQUc7Z0JBQ2pCLEdBQUc7b0JBQ0QsSUFBTSxNQUFNLEdBQUcsSUFBSSxDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUE7b0JBQ3RDLElBQUksTUFBTSxFQUFFO3dCQUNWLE9BQU8sTUFBTSxDQUFBO3FCQUNkO3lCQUFNO3d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QixTQUFTLENBQUMsSUFBSSxDQUFDLFdBQVcsQ0FBQyxDQUFBO1FBQzNCLFdBQVcsR0FBRyxNQUFNLENBQUMsY0FBYyxDQUFDLFdBQVcsQ0FBQyxDQUFBO0tBQ2pEO0lBQ0QsT0FBTyxTQUFTLENBQUE7QUFDbEIsQ0FBQztBQUVELHlDQUF5QyxXQUFxQjtJQUM1RCxJQUFNLFVBQVUsR0FBSSxXQUFtQixDQUFDLFNBQVMsQ0FBQyxDQUFBO0lBQ2xELE9BQU8sS0FBSyxDQUFDLE9BQU8sQ0FBQyxVQUFVLENBQUMsQ0FBQyxDQUFDLENBQUMsVUFBVSxDQUFDLENBQUMsQ0FBQyxFQUFFLENBQUE7QUFDcEQsQ0FBQztBQUVELGdDQUFnQyxNQUFXLEVBQUUsVUFBaUM7SUFDNUUsTUFBTSxDQUFDLElBQUksQ0FBQyxVQUFVLENBQUMsQ0FBQyxPQUFPLENBQUMsVUFBQyxJQUFJO1FBQ25DLElBQUksQ0FBQyxDQUFDLElBQUksSUFBSSxNQUFNLENBQUMsRUFBRTtZQUNyQixJQUFNLFVBQVUsR0FBRyxVQUFVLENBQUMsSUFBSSxDQUFDLENBQUE7WUFDbkMsTUFBTSxDQUFDLGNBQWMsQ0FBQyxNQUFNLEVBQUUsSUFBSSxFQUFFLFVBQVUsQ0FBQyxDQUFBO1NBQ2hEO0lBQ0gsQ0FBQyxDQUFDLENBQUE7QUFDSixDQUFDO0FBRUQsb0JBQW9CLElBQVk7SUFDOUIsT0FBTyxJQUFJLENBQUMsTUFBTSxDQUFDLENBQUMsQ0FBQyxDQUFDLFdBQVcsRUFBRSxHQUFHLElBQUksQ0FBQyxLQUFLLENBQUMsQ0FBQyxDQUFDLENBQUE7QUFDckQsQ0FBQyJ9
|
3325
|
+
},{}],"../node_modules/@stimulus/core/dist/src/controller.js":[function(require,module,exports) {
|
3326
|
+
"use strict";
|
3327
|
+
|
3328
|
+
Object.defineProperty(exports, "__esModule", {
|
3329
|
+
value: true
|
3330
|
+
});
|
3331
|
+
exports.Controller = void 0;
|
3332
|
+
|
3333
|
+
var _target_properties = require("./target_properties");
|
3334
|
+
|
3335
|
+
var Controller =
|
3336
|
+
/** @class */
|
3337
|
+
function () {
|
3338
|
+
function Controller(context) {
|
3339
|
+
this.context = context;
|
3340
|
+
}
|
3341
|
+
|
3342
|
+
Controller.bless = function () {
|
3343
|
+
(0, _target_properties.defineTargetProperties)(this);
|
3344
|
+
};
|
3345
|
+
|
3346
|
+
Object.defineProperty(Controller.prototype, "application", {
|
3347
|
+
get: function () {
|
3348
|
+
return this.context.application;
|
3349
|
+
},
|
3350
|
+
enumerable: true,
|
3351
|
+
configurable: true
|
3352
|
+
});
|
3353
|
+
Object.defineProperty(Controller.prototype, "scope", {
|
3354
|
+
get: function () {
|
3355
|
+
return this.context.scope;
|
3356
|
+
},
|
3357
|
+
enumerable: true,
|
3358
|
+
configurable: true
|
3359
|
+
});
|
3360
|
+
Object.defineProperty(Controller.prototype, "element", {
|
3361
|
+
get: function () {
|
3362
|
+
return this.scope.element;
|
3363
|
+
},
|
3364
|
+
enumerable: true,
|
3365
|
+
configurable: true
|
3366
|
+
});
|
3367
|
+
Object.defineProperty(Controller.prototype, "identifier", {
|
3368
|
+
get: function () {
|
3369
|
+
return this.scope.identifier;
|
3370
|
+
},
|
3371
|
+
enumerable: true,
|
3372
|
+
configurable: true
|
3373
|
+
});
|
3374
|
+
Object.defineProperty(Controller.prototype, "targets", {
|
3375
|
+
get: function () {
|
3376
|
+
return this.scope.targets;
|
3377
|
+
},
|
3378
|
+
enumerable: true,
|
3379
|
+
configurable: true
|
3380
|
+
});
|
3381
|
+
Object.defineProperty(Controller.prototype, "data", {
|
3382
|
+
get: function () {
|
3383
|
+
return this.scope.data;
|
3384
|
+
},
|
3385
|
+
enumerable: true,
|
3386
|
+
configurable: true
|
3387
|
+
});
|
3388
|
+
|
3389
|
+
Controller.prototype.initialize = function () {// Override in your subclass to set up initial controller state
|
3390
|
+
};
|
3391
|
+
|
3392
|
+
Controller.prototype.connect = function () {// Override in your subclass to respond when the controller is connected to the DOM
|
3393
|
+
};
|
3394
|
+
|
3395
|
+
Controller.prototype.disconnect = function () {// Override in your subclass to respond when the controller is disconnected from the DOM
|
3396
|
+
};
|
3397
|
+
|
3398
|
+
Controller.targets = [];
|
3399
|
+
return Controller;
|
3400
|
+
}(); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udHJvbGxlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb250cm9sbGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUtBLE9BQU8sRUFBRSxzQkFBc0IsRUFBRSxNQUFNLHFCQUFxQixDQUFBO0FBTzVEO0lBU0Usb0JBQVksT0FBZ0I7UUFDMUIsSUFBSSxDQUFDLE9BQU8sR0FBRyxPQUFPLENBQUE7SUFDeEIsQ0FBQztJQU5NLGdCQUFLLEdBQVo7UUFDRSxzQkFBc0IsQ0FBQyxJQUFJLENBQUMsQ0FBQTtJQUM5QixDQUFDO0lBTUQsc0JBQUksbUNBQVc7YUFBZjtZQUNFLE9BQU8sSUFBSSxDQUFDLE9BQU8sQ0FBQyxXQUFXLENBQUE7UUFDakMsQ0FBQzs7O09BQUE7SUFFRCxzQkFBSSw2QkFBSzthQUFUO1lBQ0UsT0FBTyxJQUFJLENBQUMsT0FBTyxDQUFDLEtBQUssQ0FBQTtRQUMzQixDQUFDOzs7T0FBQTtJQUVELHNCQUFJLCtCQUFPO2FBQVg7WUFDRSxPQUFPLElBQUksQ0FBQyxLQUFLLENBQUMsT0FBTyxDQUFBO1FBQzNCLENBQUM7OztPQUFBO0lBRUQsc0JBQUksa0NBQVU7YUFBZDtZQUNFLE9BQU8sSUFBSSxDQUFDLEtBQUssQ0FBQyxVQUFVLENBQUE7UUFDOUIsQ0FBQzs7O09BQUE7SUFFRCxzQkFBSSwrQkFBTzthQUFYO1lBQ0UsT0FBTyxJQUFJLENBQUMsS0FBSyxDQUFDLE9BQU8sQ0FBQTtRQUMzQixDQUFDOzs7T0FBQTtJQUVELHNCQUFJLDRCQUFJO2FBQVI7WUFDRSxPQUFPLElBQUksQ0FBQyxLQUFLLENBQUMsSUFBSSxDQUFBO1FBQ3hCLENBQUM7OztPQUFBO0lBRUQsK0JBQVUsR0FBVjtRQUNFLCtEQUErRDtJQUNqRSxDQUFDO0lBRUQsNEJBQU8sR0FBUDtRQUNFLG1GQUFtRjtJQUNyRixDQUFDO0lBRUQsK0JBQVUsR0FBVjtRQUNFLHdGQUF3RjtJQUMxRixDQUFDO0lBOUNNLGtCQUFPLEdBQWEsRUFBRSxDQUFBO0lBK0MvQixpQkFBQztDQUFBLEFBaERELElBZ0RDO1NBaERZLFVBQVUifQ==
|
3401
|
+
|
3402
|
+
|
3403
|
+
exports.Controller = Controller;
|
3404
|
+
},{"./target_properties":"../node_modules/@stimulus/core/dist/src/target_properties.js"}],"../node_modules/@stimulus/core/dist/index.js":[function(require,module,exports) {
|
3405
|
+
"use strict";
|
3406
|
+
|
3407
|
+
Object.defineProperty(exports, "__esModule", {
|
3408
|
+
value: true
|
3409
|
+
});
|
3410
|
+
Object.defineProperty(exports, "Application", {
|
3411
|
+
enumerable: true,
|
3412
|
+
get: function () {
|
3413
|
+
return _application.Application;
|
3414
|
+
}
|
3415
|
+
});
|
3416
|
+
Object.defineProperty(exports, "Context", {
|
3417
|
+
enumerable: true,
|
3418
|
+
get: function () {
|
3419
|
+
return _context.Context;
|
3420
|
+
}
|
3421
|
+
});
|
3422
|
+
Object.defineProperty(exports, "Controller", {
|
3423
|
+
enumerable: true,
|
3424
|
+
get: function () {
|
3425
|
+
return _controller.Controller;
|
3426
|
+
}
|
3427
|
+
});
|
3428
|
+
Object.defineProperty(exports, "defaultSchema", {
|
3429
|
+
enumerable: true,
|
3430
|
+
get: function () {
|
3431
|
+
return _schema.defaultSchema;
|
3432
|
+
}
|
3433
|
+
});
|
3434
|
+
|
3435
|
+
var _application = require("./src/application");
|
3436
|
+
|
3437
|
+
var _context = require("./src/context");
|
3438
|
+
|
3439
|
+
var _controller = require("./src/controller");
|
3440
|
+
|
3441
|
+
var _schema = require("./src/schema");
|
3442
|
+
},{"./src/application":"../node_modules/@stimulus/core/dist/src/application.js","./src/context":"../node_modules/@stimulus/core/dist/src/context.js","./src/controller":"../node_modules/@stimulus/core/dist/src/controller.js","./src/schema":"../node_modules/@stimulus/core/dist/src/schema.js"}],"../node_modules/stimulus/index.js":[function(require,module,exports) {
|
3443
|
+
"use strict";
|
3444
|
+
|
3445
|
+
Object.defineProperty(exports, "__esModule", {
|
3446
|
+
value: true
|
3447
|
+
});
|
3448
|
+
|
3449
|
+
var _core = require("@stimulus/core");
|
3450
|
+
|
3451
|
+
Object.keys(_core).forEach(function (key) {
|
3452
|
+
if (key === "default" || key === "__esModule") return;
|
3453
|
+
Object.defineProperty(exports, key, {
|
3454
|
+
enumerable: true,
|
3455
|
+
get: function () {
|
3456
|
+
return _core[key];
|
3457
|
+
}
|
3458
|
+
});
|
3459
|
+
});
|
3460
|
+
},{"@stimulus/core":"../node_modules/@stimulus/core/dist/index.js"}],"javascripts/super/application.js":[function(require,module,exports) {
|
3461
|
+
"use strict";
|
3462
|
+
|
3463
|
+
Object.defineProperty(exports, "__esModule", {
|
3464
|
+
value: true
|
3465
|
+
});
|
3466
|
+
exports.default = void 0;
|
3467
|
+
|
3468
|
+
var _railsUjs = _interopRequireDefault(require("rails-ujs"));
|
3469
|
+
|
3470
|
+
var _stimulus = require("stimulus");
|
3471
|
+
|
3472
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
3473
|
+
|
3474
|
+
_railsUjs.default.start();
|
3475
|
+
|
3476
|
+
var application = _stimulus.Application.start();
|
3477
|
+
|
3478
|
+
var _default = {
|
3479
|
+
StimulusApplication: application,
|
3480
|
+
StimulusController: _stimulus.Controller
|
3481
|
+
};
|
3482
|
+
exports.default = _default;
|
3483
|
+
},{"rails-ujs":"../node_modules/rails-ujs/lib/assets/compiled/rails-ujs.js","stimulus":"../node_modules/stimulus/index.js"}]},{},["javascripts/super/application.js"], "Super")
|