unpoly-rails 3.2.2.1 → 3.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,7 +5,7 @@
5
5
  /***/ (() => {
6
6
 
7
7
  window.up = {
8
- version: '3.2.2'
8
+ version: '3.3.0'
9
9
  };
10
10
 
11
11
 
@@ -1833,8 +1833,8 @@ up.Change.Addition = class Addition extends up.Change {
1833
1833
  this.layer.dismiss(this.dismissLayer, this.responseOption());
1834
1834
  }
1835
1835
  }
1836
- abortWhenLayerClosed() {
1837
- if (this.layer.isClosed()) {
1836
+ abortWhenLayerClosed(layer = this.layer) {
1837
+ if (layer.isClosed()) {
1838
1838
  throw new up.Aborted('Layer was closed');
1839
1839
  }
1840
1840
  }
@@ -2072,22 +2072,22 @@ up.Change.OpenLayer = class OpenLayer extends up.Change.Addition {
2072
2072
  up.hello(this.layer.element, { ...this.options, layer: this.layer });
2073
2073
  this.handleLayerChangeRequests();
2074
2074
  this.handleScroll();
2075
- let renderResult = new up.RenderResult({
2075
+ this.renderResult = new up.RenderResult({
2076
2076
  layer: this.layer,
2077
2077
  fragments: [this.content],
2078
2078
  target: this.target,
2079
2079
  });
2080
- renderResult.finished = this.finish(renderResult);
2080
+ this.renderResult.finished = this.finish();
2081
2081
  this.layer.opening = false;
2082
2082
  this.emitOpenedEvent();
2083
2083
  this.abortWhenLayerClosed();
2084
- return renderResult;
2084
+ return this.renderResult;
2085
2085
  }
2086
- async finish(renderResult) {
2086
+ async finish() {
2087
2087
  await this.layer.startOpenAnimation();
2088
2088
  this.abortWhenLayerClosed();
2089
2089
  this.handleFocus();
2090
- return renderResult;
2090
+ return this.renderResult;
2091
2091
  }
2092
2092
  buildLayer() {
2093
2093
  const buildOptions = { ...this.options, opening: true };
@@ -2138,6 +2138,13 @@ up.Change.OpenLayer = class OpenLayer extends up.Change.Addition {
2138
2138
  log: `Opened new ${this.layer}`
2139
2139
  });
2140
2140
  }
2141
+ getHungrySteps() {
2142
+ return up.radio.hungrySteps({
2143
+ layer: null,
2144
+ history: (this.layer && this.layer.isHistoryVisible()),
2145
+ origin: this.options.origin,
2146
+ });
2147
+ }
2141
2148
  };
2142
2149
 
2143
2150
 
@@ -2147,7 +2154,6 @@ up.Change.OpenLayer = class OpenLayer extends up.Change.Addition {
2147
2154
 
2148
2155
  var _a;
2149
2156
  const u = up.util;
2150
- const e = up.element;
2151
2157
  up.Change.UpdateLayer = (_a = class UpdateLayer extends up.Change.Addition {
2152
2158
  constructor(options) {
2153
2159
  options = up.RenderOptions.finalize(options);
@@ -2171,7 +2177,7 @@ up.Change.UpdateLayer = (_a = class UpdateLayer extends up.Change.Addition {
2171
2177
  }
2172
2178
  bestPreflightSelector() {
2173
2179
  this.matchPreflight();
2174
- return u.map(this.steps, 'selector').join(', ') || ':none';
2180
+ return up.fragment.targetForSteps(this.steps);
2175
2181
  }
2176
2182
  getFragments() {
2177
2183
  this.matchPreflight();
@@ -2206,163 +2212,14 @@ up.Change.UpdateLayer = (_a = class UpdateLayer extends up.Change.Addition {
2206
2212
  this.layer.updateHistory(this.options);
2207
2213
  }
2208
2214
  this.handleLayerChangeRequests();
2209
- this.renderResult = new up.RenderResult({
2210
- layer: this.layer,
2211
- target: this.target,
2212
- });
2213
- this.steps.reverse();
2214
- const motionEndPromises = this.steps.map(step => this.executeStep(step));
2215
- this.renderResult.finished = this.finish(motionEndPromises);
2216
- if (!this.steps.length) {
2217
- this.handleFocus(null, this.options);
2218
- this.handleScroll(null, this.options);
2219
- }
2220
- return this.renderResult;
2221
- }
2222
- async finish(motionEndPromises) {
2223
- await Promise.all(motionEndPromises);
2224
- this.abortWhenLayerClosed();
2225
- return this.renderResult;
2226
- }
2227
- addToResult(fragment) {
2228
- let newFragments = fragment.matches('up-wrapper') ? fragment.children : [fragment];
2229
- this.renderResult.fragments.unshift(...newFragments);
2230
- }
2231
- executeStep(step) {
2232
- this.setReloadAttrs(step);
2233
- switch (step.placement) {
2234
- case 'swap': {
2235
- let keepPlan = this.findKeepPlan(step);
2236
- if (keepPlan) {
2237
- this.handleFocus(step.oldElement, step);
2238
- this.handleScroll(step.oldElement, step);
2239
- return Promise.resolve();
2240
- }
2241
- else {
2242
- this.preserveKeepables(step);
2243
- const parent = step.oldElement.parentNode;
2244
- const morphOptions = {
2245
- ...step,
2246
- beforeStart() {
2247
- up.fragment.markAsDestroying(step.oldElement);
2248
- },
2249
- afterInsert: () => {
2250
- this.responseDoc.finalizeElement(step.newElement);
2251
- this.restoreKeepables(step);
2252
- up.hello(step.newElement, step);
2253
- this.addToResult(step.newElement);
2254
- },
2255
- beforeDetach: () => {
2256
- up.syntax.clean(step.oldElement, { layer: this.layer });
2257
- },
2258
- afterDetach() {
2259
- up.element.cleanJQuery();
2260
- up.fragment.emitDestroyed(step.oldElement, { parent, log: false });
2261
- },
2262
- scrollNew: () => {
2263
- this.handleFocus(step.newElement, step);
2264
- this.handleScroll(step.newElement, step);
2265
- }
2266
- };
2267
- return up.morph(step.oldElement, step.newElement, step.transition, morphOptions);
2268
- }
2269
- }
2270
- case 'content': {
2271
- let oldWrapper = e.wrapChildren(step.oldElement);
2272
- let newWrapper = e.wrapChildren(step.newElement);
2273
- let wrapperStep = {
2274
- ...step,
2275
- placement: 'swap',
2276
- oldElement: oldWrapper,
2277
- newElement: newWrapper,
2278
- focus: false
2279
- };
2280
- return this.executeStep(wrapperStep).then(() => {
2281
- e.unwrap(newWrapper);
2282
- this.handleFocus(step.oldElement, step);
2283
- });
2284
- }
2285
- case 'before':
2286
- case 'after': {
2287
- let wrapper = e.wrapChildren(step.newElement);
2288
- let position = step.placement === 'before' ? 'afterbegin' : 'beforeend';
2289
- step.oldElement.insertAdjacentElement(position, wrapper);
2290
- this.responseDoc.finalizeElement(wrapper);
2291
- up.hello(wrapper, step);
2292
- this.addToResult(wrapper);
2293
- this.handleFocus(wrapper, step);
2294
- this.handleScroll(wrapper, step);
2295
- return up.animate(wrapper, step.transition, step).then(() => e.unwrap(wrapper));
2296
- }
2297
- default: {
2298
- up.fail('Unknown placement: %o', step.placement);
2299
- }
2300
- }
2301
- }
2302
- findKeepPlan(options) {
2303
- if (!this.useKeep) {
2304
- return;
2305
- }
2306
- const { oldElement, newElement } = options;
2307
- let doKeep = e.booleanAttr(oldElement, 'up-keep');
2308
- if (!doKeep) {
2309
- return;
2310
- }
2311
- let partner;
2312
- let partnerSelector = up.fragment.toTarget(oldElement);
2313
- const lookupOpts = { layer: this.layer };
2314
- if (options.descendantsOnly) {
2315
- partner = up.fragment.get(newElement, partnerSelector, lookupOpts);
2316
- }
2317
- else {
2318
- partner = up.fragment.subtree(newElement, partnerSelector, lookupOpts)[0];
2319
- }
2320
- if (partner && e.booleanAttr(partner, 'up-keep')) {
2321
- const plan = {
2322
- oldElement,
2323
- newElement: partner,
2324
- newData: up.syntax.data(partner)
2325
- };
2326
- if (!up.fragment.emitKeep(plan).defaultPrevented) {
2327
- return plan;
2328
- }
2329
- }
2330
- }
2331
- preserveKeepables(step) {
2332
- const keepPlans = [];
2333
- if (this.useKeep) {
2334
- for (let keepable of step.oldElement.querySelectorAll('[up-keep]')) {
2335
- let keepPlan = this.findKeepPlan({ ...step, oldElement: keepable, descendantsOnly: true });
2336
- if (keepPlan) {
2337
- const keepableClone = keepable.cloneNode(true);
2338
- keepable.insertAdjacentElement('beforebegin', keepableClone);
2339
- let viewports = up.viewport.subtree(keepPlan.oldElement);
2340
- keepPlan.revivers = viewports.map(function (viewport) {
2341
- let cursorProps = up.viewport.copyCursorProps(viewport);
2342
- return () => up.viewport.copyCursorProps(cursorProps, viewport);
2343
- });
2344
- if (this.willChangeElement(document.body)) {
2345
- keepPlan.newElement.replaceWith(keepable);
2346
- }
2347
- else {
2348
- document.body.append(keepable);
2349
- }
2350
- keepPlans.push(keepPlan);
2351
- }
2352
- }
2353
- }
2354
- step.keepPlans = keepPlans;
2355
- }
2356
- restoreKeepables(step) {
2357
- for (let keepPlan of step.keepPlans) {
2358
- keepPlan.newElement.replaceWith(keepPlan.oldElement);
2359
- for (let reviver of keepPlan.revivers) {
2360
- reviver();
2361
- }
2362
- }
2215
+ let renderResult = new up.Change.UpdateSteps({
2216
+ steps: this.steps,
2217
+ noneOptions: this.options,
2218
+ }).execute(responseDoc);
2219
+ return renderResult;
2363
2220
  }
2364
2221
  matchPreflight() {
2365
- this.filterSteps((step) => {
2222
+ this.steps = this.steps.filter((step) => {
2366
2223
  const finder = new up.FragmentFinder(step);
2367
2224
  step.oldElement || (step.oldElement = finder.find());
2368
2225
  if (step.oldElement) {
@@ -2372,59 +2229,23 @@ up.Change.UpdateLayer = (_a = class UpdateLayer extends up.Change.Addition {
2372
2229
  throw new up.CannotMatch();
2373
2230
  }
2374
2231
  });
2375
- this.resolveOldNesting();
2232
+ this.steps = up.fragment.compressNestedSteps(this.steps);
2376
2233
  }
2377
2234
  matchPostflight() {
2378
2235
  this.matchPreflight();
2379
- if (this.options.useHungry) {
2380
- this.addHungrySteps();
2381
- }
2382
- this.filterSteps((step) => {
2383
- step.newElement = this.responseDoc.select(step.selector);
2384
- if (step.newElement) {
2385
- return true;
2386
- }
2387
- else if (!step.maybe) {
2388
- throw new up.CannotMatch();
2389
- }
2390
- });
2391
- this.resolveOldNesting();
2236
+ this.steps = this.responseDoc.selectSteps(this.steps);
2392
2237
  }
2393
- filterSteps(condition) {
2394
- this.steps = u.filter(this.steps, condition);
2395
- }
2396
- addHungrySteps() {
2397
- const hungrySolutions = up.radio.hungrySolutions({
2238
+ getHungrySteps() {
2239
+ return up.radio.hungrySteps({
2398
2240
  layer: this.layer,
2399
2241
  history: this.hasHistory(),
2400
2242
  origin: this.options.origin
2401
2243
  });
2402
- for (let { element: oldElement, target: selector } of hungrySolutions) {
2403
- const transition = e.booleanOrStringAttr(oldElement, 'transition');
2404
- const step = {
2405
- selector,
2406
- oldElement,
2407
- transition,
2408
- placement: 'swap',
2409
- maybe: true
2410
- };
2411
- this.steps.push(step);
2412
- }
2413
- }
2414
- containedByRivalStep(steps, candidateStep) {
2415
- return u.some(steps, function (rivalStep) {
2416
- return (rivalStep !== candidateStep) &&
2417
- ((rivalStep.placement === 'swap') || (rivalStep.placement === 'content')) &&
2418
- rivalStep.oldElement.contains(candidateStep.oldElement);
2419
- });
2420
- }
2421
- resolveOldNesting() {
2422
- let compressed = u.uniqBy(this.steps, 'oldElement');
2423
- compressed = u.reject(compressed, step => this.containedByRivalStep(compressed, step));
2424
- this.steps = compressed;
2425
2244
  }
2426
2245
  setScrollAndFocusOptions() {
2246
+ let focusCapsule = up.FocusCapsule.preserve(this.layer);
2427
2247
  this.steps.forEach((step, i) => {
2248
+ step.focusCapsule = focusCapsule;
2428
2249
  if (i > 0) {
2429
2250
  step.scroll = false;
2430
2251
  step.focus = false;
@@ -2433,26 +2254,6 @@ up.Change.UpdateLayer = (_a = class UpdateLayer extends up.Change.Addition {
2433
2254
  step.scrollBehavior = 'instant';
2434
2255
  }
2435
2256
  });
2436
- this.focusCapsule = up.FocusCapsule.preserve(this.layer);
2437
- }
2438
- handleFocus(fragment, options) {
2439
- const fragmentFocus = new up.FragmentFocus({
2440
- ...options,
2441
- fragment,
2442
- layer: this.layer,
2443
- focusCapsule: this.focusCapsule,
2444
- autoMeans: up.fragment.config.autoFocus,
2445
- });
2446
- return fragmentFocus.process(options.focus);
2447
- }
2448
- handleScroll(fragment, options) {
2449
- const scrolling = new up.FragmentScrolling({
2450
- ...options,
2451
- fragment,
2452
- layer: this.layer,
2453
- autoMeans: up.fragment.config.autoScroll
2454
- });
2455
- return scrolling.process(options.scroll);
2456
2257
  }
2457
2258
  hasHistory() {
2458
2259
  return u.evalAutoOption(this.options.history, this.hasAutoHistory.bind(this));
@@ -2461,9 +2262,6 @@ up.Change.UpdateLayer = (_a = class UpdateLayer extends up.Change.Addition {
2461
2262
  const oldFragments = u.map(this.steps, 'oldElement');
2462
2263
  return u.some(oldFragments, up.fragment.hasAutoHistory);
2463
2264
  }
2464
- willChangeElement(element) {
2465
- return u.some(this.steps, (step) => step.oldElement.contains(element));
2466
- }
2467
2265
  },
2468
2266
  (() => {
2469
2267
  u.memoizeMethod(_a.prototype, [
@@ -2479,6 +2277,204 @@ up.Change.UpdateLayer = (_a = class UpdateLayer extends up.Change.Addition {
2479
2277
  /* 30 */
2480
2278
  /***/ (() => {
2481
2279
 
2280
+ const u = up.util;
2281
+ const e = up.element;
2282
+ up.Change.UpdateSteps = class UpdateSteps extends up.Change.Addition {
2283
+ constructor(options) {
2284
+ super(options);
2285
+ this.noneOptions = options.noneOptions || {};
2286
+ this.steps = u.copy(options.steps);
2287
+ }
2288
+ execute(responseDoc) {
2289
+ this.responseDoc = responseDoc;
2290
+ this.steps = responseDoc.selectSteps(this.steps);
2291
+ if (!this.steps.length) {
2292
+ return this.executeNone();
2293
+ }
2294
+ this.renderResult = new up.RenderResult({
2295
+ layer: this.steps[0]?.layer,
2296
+ target: up.fragment.targetForSteps(this.steps),
2297
+ });
2298
+ this.steps.reverse();
2299
+ const motionEndPromises = this.steps.map(step => this.executeStep(step));
2300
+ this.renderResult.finished = this.finish(motionEndPromises);
2301
+ return this.renderResult;
2302
+ }
2303
+ executeNone() {
2304
+ this.handleFocus(null, this.noneOptions);
2305
+ this.handleScroll(null, this.noneOptions);
2306
+ return up.RenderResult.buildNone();
2307
+ }
2308
+ async finish(motionEndPromises) {
2309
+ await Promise.all(motionEndPromises);
2310
+ for (let step of this.steps) {
2311
+ this.abortWhenLayerClosed(step.layer);
2312
+ }
2313
+ return this.renderResult;
2314
+ }
2315
+ addToResult(fragment) {
2316
+ let newFragments = fragment.matches('up-wrapper') ? fragment.children : [fragment];
2317
+ this.renderResult.fragments.unshift(...newFragments);
2318
+ }
2319
+ executeStep(step) {
2320
+ this.setReloadAttrs(step);
2321
+ switch (step.placement) {
2322
+ case 'swap': {
2323
+ let keepPlan = this.findKeepPlan(step);
2324
+ if (keepPlan) {
2325
+ this.handleFocus(step.oldElement, step);
2326
+ this.handleScroll(step.oldElement, step);
2327
+ return Promise.resolve();
2328
+ }
2329
+ else {
2330
+ this.preserveKeepables(step);
2331
+ const parent = step.oldElement.parentNode;
2332
+ const morphOptions = {
2333
+ ...step,
2334
+ beforeStart() {
2335
+ up.fragment.markAsDestroying(step.oldElement);
2336
+ },
2337
+ afterInsert: () => {
2338
+ this.responseDoc.finalizeElement(step.newElement);
2339
+ this.restoreKeepables(step);
2340
+ up.hello(step.newElement, step);
2341
+ this.addToResult(step.newElement);
2342
+ },
2343
+ beforeDetach: () => {
2344
+ up.syntax.clean(step.oldElement, { layer: step.layer });
2345
+ },
2346
+ afterDetach() {
2347
+ up.element.cleanJQuery();
2348
+ up.fragment.emitDestroyed(step.oldElement, { parent, log: false });
2349
+ },
2350
+ scrollNew: () => {
2351
+ this.handleFocus(step.newElement, step);
2352
+ this.handleScroll(step.newElement, step);
2353
+ }
2354
+ };
2355
+ return up.morph(step.oldElement, step.newElement, step.transition, morphOptions);
2356
+ }
2357
+ }
2358
+ case 'content': {
2359
+ let oldWrapper = e.wrapChildren(step.oldElement);
2360
+ let newWrapper = e.wrapChildren(step.newElement);
2361
+ let wrapperStep = {
2362
+ ...step,
2363
+ placement: 'swap',
2364
+ oldElement: oldWrapper,
2365
+ newElement: newWrapper,
2366
+ focus: false
2367
+ };
2368
+ return this.executeStep(wrapperStep).then(() => {
2369
+ e.unwrap(newWrapper);
2370
+ this.handleFocus(step.oldElement, step);
2371
+ });
2372
+ }
2373
+ case 'before':
2374
+ case 'after': {
2375
+ let wrapper = e.wrapChildren(step.newElement);
2376
+ let position = step.placement === 'before' ? 'afterbegin' : 'beforeend';
2377
+ step.oldElement.insertAdjacentElement(position, wrapper);
2378
+ this.responseDoc.finalizeElement(wrapper);
2379
+ up.hello(wrapper, step);
2380
+ this.addToResult(wrapper);
2381
+ this.handleFocus(wrapper, step);
2382
+ this.handleScroll(wrapper, step);
2383
+ return up.animate(wrapper, step.transition, step).then(() => e.unwrap(wrapper));
2384
+ }
2385
+ default: {
2386
+ up.fail('Unknown placement: %o', step.placement);
2387
+ }
2388
+ }
2389
+ }
2390
+ findKeepPlan(options) {
2391
+ if (!options.useKeep) {
2392
+ return;
2393
+ }
2394
+ const { oldElement, newElement } = options;
2395
+ let doKeep = e.booleanAttr(oldElement, 'up-keep');
2396
+ if (!doKeep) {
2397
+ return;
2398
+ }
2399
+ let partner;
2400
+ let partnerSelector = up.fragment.toTarget(oldElement);
2401
+ const lookupOpts = { layer: options.layer };
2402
+ if (options.descendantsOnly) {
2403
+ partner = up.fragment.get(newElement, partnerSelector, lookupOpts);
2404
+ }
2405
+ else {
2406
+ partner = up.fragment.subtree(newElement, partnerSelector, lookupOpts)[0];
2407
+ }
2408
+ if (partner && e.booleanAttr(partner, 'up-keep')) {
2409
+ const plan = {
2410
+ oldElement,
2411
+ newElement: partner,
2412
+ newData: up.syntax.data(partner)
2413
+ };
2414
+ if (!up.fragment.emitKeep(plan).defaultPrevented) {
2415
+ return plan;
2416
+ }
2417
+ }
2418
+ }
2419
+ preserveKeepables(step) {
2420
+ const keepPlans = [];
2421
+ if (step.useKeep) {
2422
+ for (let keepable of step.oldElement.querySelectorAll('[up-keep]')) {
2423
+ let keepPlan = this.findKeepPlan({ ...step, oldElement: keepable, descendantsOnly: true });
2424
+ if (keepPlan) {
2425
+ const keepableClone = keepable.cloneNode(true);
2426
+ keepable.insertAdjacentElement('beforebegin', keepableClone);
2427
+ let viewports = up.viewport.subtree(keepPlan.oldElement);
2428
+ keepPlan.revivers = viewports.map(function (viewport) {
2429
+ let cursorProps = up.viewport.copyCursorProps(viewport);
2430
+ return () => up.viewport.copyCursorProps(cursorProps, viewport);
2431
+ });
2432
+ if (this.willChangeElement(document.body)) {
2433
+ keepPlan.newElement.replaceWith(keepable);
2434
+ }
2435
+ else {
2436
+ document.body.append(keepable);
2437
+ }
2438
+ keepPlans.push(keepPlan);
2439
+ }
2440
+ }
2441
+ }
2442
+ step.keepPlans = keepPlans;
2443
+ }
2444
+ restoreKeepables(step) {
2445
+ for (let keepPlan of step.keepPlans) {
2446
+ keepPlan.newElement.replaceWith(keepPlan.oldElement);
2447
+ for (let reviver of keepPlan.revivers) {
2448
+ reviver();
2449
+ }
2450
+ }
2451
+ }
2452
+ willChangeElement(element) {
2453
+ return u.some(this.steps, (step) => step.oldElement.contains(element));
2454
+ }
2455
+ handleFocus(fragment, options) {
2456
+ const fragmentFocus = new up.FragmentFocus({
2457
+ ...options,
2458
+ fragment,
2459
+ autoMeans: up.fragment.config.autoFocus,
2460
+ });
2461
+ return fragmentFocus.process(options.focus);
2462
+ }
2463
+ handleScroll(fragment, options) {
2464
+ const scrolling = new up.FragmentScrolling({
2465
+ ...options,
2466
+ fragment,
2467
+ autoMeans: up.fragment.config.autoScroll
2468
+ });
2469
+ return scrolling.process(options.scroll);
2470
+ }
2471
+ };
2472
+
2473
+
2474
+ /***/ }),
2475
+ /* 31 */
2476
+ /***/ (() => {
2477
+
2482
2478
  const u = up.util;
2483
2479
  up.Change.CloseLayer = class CloseLayer extends up.Change.Removal {
2484
2480
  constructor(options) {
@@ -2547,7 +2543,7 @@ up.Change.CloseLayer = class CloseLayer extends up.Change.Removal {
2547
2543
 
2548
2544
 
2549
2545
  /***/ }),
2550
- /* 31 */
2546
+ /* 32 */
2551
2547
  /***/ (() => {
2552
2548
 
2553
2549
  var _a;
@@ -2630,7 +2626,7 @@ up.Change.FromURL = (_a = class FromURL extends up.Change {
2630
2626
 
2631
2627
 
2632
2628
  /***/ }),
2633
- /* 32 */
2629
+ /* 33 */
2634
2630
  /***/ (() => {
2635
2631
 
2636
2632
  var _a;
@@ -2767,7 +2763,7 @@ up.Change.FromResponse = (_a = class FromResponse extends up.Change {
2767
2763
 
2768
2764
 
2769
2765
  /***/ }),
2770
- /* 33 */
2766
+ /* 34 */
2771
2767
  /***/ (() => {
2772
2768
 
2773
2769
  var _a;
@@ -2815,9 +2811,31 @@ up.Change.FromContent = (_a = class FromContent extends up.Change {
2815
2811
  return this.seekPlan(this.executePlan.bind(this)) || this.cannotMatchPostflightTarget();
2816
2812
  }
2817
2813
  executePlan(matchedPlan) {
2818
- let result = matchedPlan.execute(this.getResponseDoc(), this.onPlanApplicable.bind(this, matchedPlan));
2819
- result.options = this.options;
2820
- return result;
2814
+ let result;
2815
+ try {
2816
+ result = matchedPlan.execute(this.getResponseDoc(), this.onPlanApplicable.bind(this, matchedPlan));
2817
+ result.options = this.options;
2818
+ this.executeHungry(matchedPlan, result);
2819
+ return result;
2820
+ }
2821
+ catch (error) {
2822
+ if (this.isApplicablePlanError(error)) {
2823
+ this.executeHungry(matchedPlan, result);
2824
+ }
2825
+ throw error;
2826
+ }
2827
+ }
2828
+ isApplicablePlanError(error) {
2829
+ return !(error instanceof up.CannotMatch);
2830
+ }
2831
+ executeHungry(plan, originalResult) {
2832
+ if (!this.options.useHungry)
2833
+ return;
2834
+ let hungrySteps = plan.getHungrySteps();
2835
+ let hungryResult = new up.Change.UpdateSteps({ steps: hungrySteps }).execute(this.getResponseDoc());
2836
+ if (originalResult) {
2837
+ originalResult.fragments.push(...hungryResult.fragments);
2838
+ }
2821
2839
  }
2822
2840
  onPlanApplicable(plan) {
2823
2841
  let primaryPlan = this.getPlans()[0];
@@ -2887,7 +2905,7 @@ up.Change.FromContent = (_a = class FromContent extends up.Change {
2887
2905
  return fn(plan);
2888
2906
  }
2889
2907
  catch (error) {
2890
- if (!(error instanceof up.CannotMatch)) {
2908
+ if (this.isApplicablePlanError(error)) {
2891
2909
  throw error;
2892
2910
  }
2893
2911
  }
@@ -2905,7 +2923,7 @@ up.Change.FromContent = (_a = class FromContent extends up.Change {
2905
2923
 
2906
2924
 
2907
2925
  /***/ }),
2908
- /* 34 */
2926
+ /* 35 */
2909
2927
  /***/ (() => {
2910
2928
 
2911
2929
  const u = up.util;
@@ -3015,7 +3033,7 @@ up.CompilerPass = class CompilerPass {
3015
3033
 
3016
3034
 
3017
3035
  /***/ }),
3018
- /* 35 */
3036
+ /* 36 */
3019
3037
  /***/ (() => {
3020
3038
 
3021
3039
  const u = up.util;
@@ -3126,7 +3144,7 @@ up.CSSTransition = class CSSTransition {
3126
3144
 
3127
3145
 
3128
3146
  /***/ }),
3129
- /* 36 */
3147
+ /* 37 */
3130
3148
  /***/ (() => {
3131
3149
 
3132
3150
  const u = up.util;
@@ -3167,7 +3185,7 @@ up.DestructorPass = class DestructorPass {
3167
3185
 
3168
3186
 
3169
3187
  /***/ }),
3170
- /* 37 */
3188
+ /* 38 */
3171
3189
  /***/ (() => {
3172
3190
 
3173
3191
  const u = up.util;
@@ -3266,7 +3284,7 @@ up.EventEmitter = class EventEmitter extends up.Record {
3266
3284
 
3267
3285
 
3268
3286
  /***/ }),
3269
- /* 38 */
3287
+ /* 39 */
3270
3288
  /***/ (() => {
3271
3289
 
3272
3290
  const u = up.util;
@@ -3371,7 +3389,7 @@ up.EventListener = class EventListener extends up.Record {
3371
3389
 
3372
3390
 
3373
3391
  /***/ }),
3374
- /* 39 */
3392
+ /* 40 */
3375
3393
  /***/ (() => {
3376
3394
 
3377
3395
  const u = up.util;
@@ -3443,7 +3461,7 @@ up.EventListenerGroup = class EventListenerGroup extends up.Record {
3443
3461
 
3444
3462
 
3445
3463
  /***/ }),
3446
- /* 40 */
3464
+ /* 41 */
3447
3465
  /***/ (() => {
3448
3466
 
3449
3467
  const u = up.util;
@@ -3559,7 +3577,7 @@ up.FieldWatcher = class FieldWatcher {
3559
3577
 
3560
3578
 
3561
3579
  /***/ }),
3562
- /* 41 */
3580
+ /* 42 */
3563
3581
  /***/ (() => {
3564
3582
 
3565
3583
  const u = up.util;
@@ -3733,7 +3751,7 @@ up.FormValidator = class FormValidator {
3733
3751
 
3734
3752
 
3735
3753
  /***/ }),
3736
- /* 42 */
3754
+ /* 43 */
3737
3755
  /***/ (() => {
3738
3756
 
3739
3757
  up.FocusCapsule = class FocusCapsule {
@@ -3763,7 +3781,7 @@ up.FocusCapsule = class FocusCapsule {
3763
3781
 
3764
3782
 
3765
3783
  /***/ }),
3766
- /* 43 */
3784
+ /* 44 */
3767
3785
  /***/ (() => {
3768
3786
 
3769
3787
  const u = up.util;
@@ -3827,7 +3845,7 @@ up.FragmentProcessor = class FragmentProcessor extends up.Record {
3827
3845
 
3828
3846
 
3829
3847
  /***/ }),
3830
- /* 44 */
3848
+ /* 45 */
3831
3849
  /***/ (() => {
3832
3850
 
3833
3851
  const DESCENDANT_SELECTOR = /^([^ >+(]+) (.+)$/;
@@ -3870,7 +3888,7 @@ up.FragmentFinder = class FragmentFinder {
3870
3888
 
3871
3889
 
3872
3890
  /***/ }),
3873
- /* 45 */
3891
+ /* 46 */
3874
3892
  /***/ (() => {
3875
3893
 
3876
3894
  const u = up.util;
@@ -3954,7 +3972,7 @@ up.FragmentFocus = class FragmentFocus extends up.FragmentProcessor {
3954
3972
 
3955
3973
 
3956
3974
  /***/ }),
3957
- /* 46 */
3975
+ /* 47 */
3958
3976
  /***/ (() => {
3959
3977
 
3960
3978
  const e = up.element;
@@ -4059,7 +4077,7 @@ up.FragmentPolling = class FragmentPolling {
4059
4077
 
4060
4078
 
4061
4079
  /***/ }),
4062
- /* 47 */
4080
+ /* 48 */
4063
4081
  /***/ (() => {
4064
4082
 
4065
4083
  const u = up.util;
@@ -4123,7 +4141,7 @@ up.FragmentScrolling = class FragmentScrolling extends up.FragmentProcessor {
4123
4141
 
4124
4142
 
4125
4143
  /***/ }),
4126
- /* 48 */
4144
+ /* 49 */
4127
4145
  /***/ (() => {
4128
4146
 
4129
4147
  const e = up.element;
@@ -4346,7 +4364,7 @@ up.Layer = class Layer extends up.Record {
4346
4364
 
4347
4365
 
4348
4366
  /***/ }),
4349
- /* 49 */
4367
+ /* 50 */
4350
4368
  /***/ (() => {
4351
4369
 
4352
4370
  const e = up.element;
@@ -4621,7 +4639,7 @@ up.Layer.Overlay = class Overlay extends up.Layer {
4621
4639
 
4622
4640
 
4623
4641
  /***/ }),
4624
- /* 50 */
4642
+ /* 51 */
4625
4643
  /***/ (() => {
4626
4644
 
4627
4645
  up.Layer.OverlayWithTether = class OverlayWithTether extends up.Layer.Overlay {
@@ -4658,7 +4676,7 @@ up.Layer.OverlayWithTether = class OverlayWithTether extends up.Layer.Overlay {
4658
4676
 
4659
4677
 
4660
4678
  /***/ }),
4661
- /* 51 */
4679
+ /* 52 */
4662
4680
  /***/ (() => {
4663
4681
 
4664
4682
  var _a;
@@ -4696,7 +4714,7 @@ up.Layer.OverlayWithViewport = (_a = class OverlayWithViewport extends up.Layer.
4696
4714
 
4697
4715
 
4698
4716
  /***/ }),
4699
- /* 52 */
4717
+ /* 53 */
4700
4718
  /***/ (() => {
4701
4719
 
4702
4720
  var _a;
@@ -4742,7 +4760,7 @@ up.Layer.Root = (_a = class Root extends up.Layer {
4742
4760
 
4743
4761
 
4744
4762
  /***/ }),
4745
- /* 53 */
4763
+ /* 54 */
4746
4764
  /***/ (() => {
4747
4765
 
4748
4766
  var _a;
@@ -4753,7 +4771,7 @@ up.Layer.Modal = (_a = class Modal extends up.Layer.OverlayWithViewport {
4753
4771
 
4754
4772
 
4755
4773
  /***/ }),
4756
- /* 54 */
4774
+ /* 55 */
4757
4775
  /***/ (() => {
4758
4776
 
4759
4777
  var _a;
@@ -4764,7 +4782,7 @@ up.Layer.Popup = (_a = class Popup extends up.Layer.OverlayWithTether {
4764
4782
 
4765
4783
 
4766
4784
  /***/ }),
4767
- /* 55 */
4785
+ /* 56 */
4768
4786
  /***/ (() => {
4769
4787
 
4770
4788
  var _a;
@@ -4775,7 +4793,7 @@ up.Layer.Drawer = (_a = class Drawer extends up.Layer.OverlayWithViewport {
4775
4793
 
4776
4794
 
4777
4795
  /***/ }),
4778
- /* 56 */
4796
+ /* 57 */
4779
4797
  /***/ (() => {
4780
4798
 
4781
4799
  var _a;
@@ -4786,7 +4804,7 @@ up.Layer.Cover = (_a = class Cover extends up.Layer.OverlayWithViewport {
4786
4804
 
4787
4805
 
4788
4806
  /***/ }),
4789
- /* 57 */
4807
+ /* 58 */
4790
4808
  /***/ (() => {
4791
4809
 
4792
4810
  const u = up.util;
@@ -4876,7 +4894,7 @@ up.LayerLookup = class LayerLookup {
4876
4894
 
4877
4895
 
4878
4896
  /***/ }),
4879
- /* 58 */
4897
+ /* 59 */
4880
4898
  /***/ (() => {
4881
4899
 
4882
4900
  const u = up.util;
@@ -4989,7 +5007,7 @@ up.LayerStack = class LayerStack extends Array {
4989
5007
 
4990
5008
 
4991
5009
  /***/ }),
4992
- /* 59 */
5010
+ /* 60 */
4993
5011
  /***/ (() => {
4994
5012
 
4995
5013
  up.LinkFeedbackURLs = class LinkFeedbackURLs {
@@ -5020,7 +5038,7 @@ up.LinkFeedbackURLs = class LinkFeedbackURLs {
5020
5038
 
5021
5039
 
5022
5040
  /***/ }),
5023
- /* 60 */
5041
+ /* 61 */
5024
5042
  /***/ (() => {
5025
5043
 
5026
5044
  const u = up.util;
@@ -5088,7 +5106,7 @@ up.LinkPreloader = class LinkPreloader {
5088
5106
 
5089
5107
 
5090
5108
  /***/ }),
5091
- /* 61 */
5109
+ /* 62 */
5092
5110
  /***/ (() => {
5093
5111
 
5094
5112
  const u = up.util;
@@ -5184,7 +5202,7 @@ up.MotionController = class MotionController {
5184
5202
 
5185
5203
 
5186
5204
  /***/ }),
5187
- /* 62 */
5205
+ /* 63 */
5188
5206
  /***/ (() => {
5189
5207
 
5190
5208
  const u = up.util;
@@ -5276,7 +5294,7 @@ up.NonceableCallback = class NonceableCallback {
5276
5294
 
5277
5295
 
5278
5296
  /***/ }),
5279
- /* 63 */
5297
+ /* 64 */
5280
5298
  /***/ (() => {
5281
5299
 
5282
5300
  const u = up.util;
@@ -5353,7 +5371,7 @@ up.OptionsParser = class OptionsParser {
5353
5371
 
5354
5372
 
5355
5373
  /***/ }),
5356
- /* 64 */
5374
+ /* 65 */
5357
5375
  /***/ (() => {
5358
5376
 
5359
5377
  const e = up.element;
@@ -5421,7 +5439,7 @@ up.OverlayFocus = class OverlayFocus {
5421
5439
 
5422
5440
 
5423
5441
  /***/ }),
5424
- /* 65 */
5442
+ /* 66 */
5425
5443
  /***/ (() => {
5426
5444
 
5427
5445
  const u = up.util;
@@ -5652,7 +5670,7 @@ up.Params = class Params {
5652
5670
 
5653
5671
 
5654
5672
  /***/ }),
5655
- /* 66 */
5673
+ /* 67 */
5656
5674
  /***/ (() => {
5657
5675
 
5658
5676
  const e = up.element;
@@ -5702,7 +5720,7 @@ up.ProgressBar = class ProgressBar {
5702
5720
 
5703
5721
 
5704
5722
  /***/ }),
5705
- /* 67 */
5723
+ /* 68 */
5706
5724
  /***/ (() => {
5707
5725
 
5708
5726
  const u = up.util;
@@ -5826,7 +5844,7 @@ up.RenderOptions = (function () {
5826
5844
 
5827
5845
 
5828
5846
  /***/ }),
5829
- /* 68 */
5847
+ /* 69 */
5830
5848
  /***/ (() => {
5831
5849
 
5832
5850
  up.RenderResult = class RenderResult extends up.Record {
@@ -5850,11 +5868,17 @@ up.RenderResult = class RenderResult extends up.Record {
5850
5868
  get fragment() {
5851
5869
  return this.fragments[0];
5852
5870
  }
5871
+ static buildNone() {
5872
+ return new this({
5873
+ target: ':none',
5874
+ finished: Promise.resolve(),
5875
+ });
5876
+ }
5853
5877
  };
5854
5878
 
5855
5879
 
5856
5880
  /***/ }),
5857
- /* 69 */
5881
+ /* 70 */
5858
5882
  /***/ (() => {
5859
5883
 
5860
5884
  var _a;
@@ -6191,7 +6215,7 @@ up.Request = (_a = class Request extends up.Record {
6191
6215
 
6192
6216
 
6193
6217
  /***/ }),
6194
- /* 70 */
6218
+ /* 71 */
6195
6219
  /***/ (() => {
6196
6220
 
6197
6221
  const u = up.util;
@@ -6331,7 +6355,7 @@ up.Request.Cache = class Cache {
6331
6355
 
6332
6356
 
6333
6357
  /***/ }),
6334
- /* 71 */
6358
+ /* 72 */
6335
6359
  /***/ (() => {
6336
6360
 
6337
6361
  const u = up.util;
@@ -6439,7 +6463,7 @@ up.Request.Queue = class Queue {
6439
6463
 
6440
6464
 
6441
6465
  /***/ }),
6442
- /* 72 */
6466
+ /* 73 */
6443
6467
  /***/ (() => {
6444
6468
 
6445
6469
  const u = up.util;
@@ -6478,7 +6502,7 @@ up.Request.FormRenderer = class FormRenderer {
6478
6502
 
6479
6503
 
6480
6504
  /***/ }),
6481
- /* 73 */
6505
+ /* 74 */
6482
6506
  /***/ (() => {
6483
6507
 
6484
6508
  var _a;
@@ -6550,7 +6574,7 @@ up.Request.XHRRenderer = (_a = class XHRRenderer {
6550
6574
 
6551
6575
 
6552
6576
  /***/ }),
6553
- /* 74 */
6577
+ /* 75 */
6554
6578
  /***/ (() => {
6555
6579
 
6556
6580
  const u = up.util;
@@ -6631,7 +6655,7 @@ up.Response = class Response extends up.Record {
6631
6655
 
6632
6656
 
6633
6657
  /***/ }),
6634
- /* 75 */
6658
+ /* 76 */
6635
6659
  /***/ (() => {
6636
6660
 
6637
6661
  var _a;
@@ -6697,6 +6721,17 @@ up.ResponseDoc = (_a = class ResponseDoc {
6697
6721
  });
6698
6722
  return finder.find();
6699
6723
  }
6724
+ selectSteps(steps) {
6725
+ return steps.filter((step) => {
6726
+ step.newElement || (step.newElement = this.select(step.selector));
6727
+ if (step.newElement) {
6728
+ return true;
6729
+ }
6730
+ else if (!step.maybe) {
6731
+ throw new up.CannotMatch();
6732
+ }
6733
+ });
6734
+ }
6700
6735
  finalizeElement(element) {
6701
6736
  up.NonceableCallback.adoptNonces(element, this.cspNonces);
6702
6737
  if (this.scriptishNeedFix) {
@@ -6711,7 +6746,7 @@ up.ResponseDoc = (_a = class ResponseDoc {
6711
6746
 
6712
6747
 
6713
6748
  /***/ }),
6714
- /* 76 */
6749
+ /* 77 */
6715
6750
  /***/ (() => {
6716
6751
 
6717
6752
  const e = up.element;
@@ -6805,7 +6840,7 @@ up.RevealMotion = class RevealMotion {
6805
6840
 
6806
6841
 
6807
6842
  /***/ }),
6808
- /* 77 */
6843
+ /* 78 */
6809
6844
  /***/ (() => {
6810
6845
 
6811
6846
  const u = up.util;
@@ -6846,7 +6881,7 @@ up.Selector = class Selector {
6846
6881
 
6847
6882
 
6848
6883
  /***/ }),
6849
- /* 78 */
6884
+ /* 79 */
6850
6885
  /***/ (() => {
6851
6886
 
6852
6887
  const u = up.util;
@@ -6966,7 +7001,7 @@ up.Tether = class Tether {
6966
7001
 
6967
7002
 
6968
7003
  /***/ }),
6969
- /* 79 */
7004
+ /* 80 */
6970
7005
  /***/ (() => {
6971
7006
 
6972
7007
  const u = up.util;
@@ -7046,7 +7081,7 @@ up.URLPattern = class URLPattern {
7046
7081
 
7047
7082
 
7048
7083
  /***/ }),
7049
- /* 80 */
7084
+ /* 81 */
7050
7085
  /***/ (() => {
7051
7086
 
7052
7087
  up.framework = (function () {
@@ -7130,7 +7165,7 @@ up.boot = up.framework.boot;
7130
7165
 
7131
7166
 
7132
7167
  /***/ }),
7133
- /* 81 */
7168
+ /* 82 */
7134
7169
  /***/ (() => {
7135
7170
 
7136
7171
  up.event = (function () {
@@ -7233,7 +7268,7 @@ up.emit = up.event.emit;
7233
7268
 
7234
7269
 
7235
7270
  /***/ }),
7236
- /* 82 */
7271
+ /* 83 */
7237
7272
  /***/ (() => {
7238
7273
 
7239
7274
  up.protocol = (function () {
@@ -7374,7 +7409,7 @@ up.protocol = (function () {
7374
7409
 
7375
7410
 
7376
7411
  /***/ }),
7377
- /* 83 */
7412
+ /* 84 */
7378
7413
  /***/ (() => {
7379
7414
 
7380
7415
  up.log = (function () {
@@ -7459,7 +7494,7 @@ up.warn = up.log.warn;
7459
7494
 
7460
7495
 
7461
7496
  /***/ }),
7462
- /* 84 */
7497
+ /* 85 */
7463
7498
  /***/ (() => {
7464
7499
 
7465
7500
  up.syntax = (function () {
@@ -7609,7 +7644,7 @@ up.hello = up.syntax.hello;
7609
7644
 
7610
7645
 
7611
7646
  /***/ }),
7612
- /* 85 */
7647
+ /* 86 */
7613
7648
  /***/ (() => {
7614
7649
 
7615
7650
  up.history = (function () {
@@ -7746,10 +7781,10 @@ up.history = (function () {
7746
7781
 
7747
7782
 
7748
7783
  /***/ }),
7749
- /* 86 */
7784
+ /* 87 */
7750
7785
  /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
7751
7786
 
7752
- __webpack_require__(87);
7787
+ __webpack_require__(88);
7753
7788
  const u = up.util;
7754
7789
  const e = up.element;
7755
7790
  up.fragment = (function () {
@@ -8196,6 +8231,21 @@ up.fragment = (function () {
8196
8231
  function shouldRevalidate(request, response, options = {}) {
8197
8232
  return request.fromCache && u.evalAutoOption(options.revalidate, config.autoRevalidate, response);
8198
8233
  }
8234
+ function targetForSteps(steps) {
8235
+ return u.map(steps, 'selector').join(', ') || ':none';
8236
+ }
8237
+ function isContainedByRivalStep(steps, candidateStep) {
8238
+ return u.some(steps, function (rivalStep) {
8239
+ return (rivalStep !== candidateStep) &&
8240
+ ((rivalStep.placement === 'swap') || (rivalStep.placement === 'content')) &&
8241
+ rivalStep.oldElement.contains(candidateStep.oldElement);
8242
+ });
8243
+ }
8244
+ function compressNestedSteps(steps) {
8245
+ let compressed = u.uniqBy(steps, 'oldElement');
8246
+ compressed = u.reject(compressed, step => isContainedByRivalStep(compressed, step));
8247
+ return compressed;
8248
+ }
8199
8249
  function abort(...args) {
8200
8250
  let options = parseTargetAndOptions(args);
8201
8251
  let testFn;
@@ -8270,6 +8320,8 @@ up.fragment = (function () {
8270
8320
  splitTarget,
8271
8321
  parseTargetSteps,
8272
8322
  isAlive,
8323
+ targetForSteps,
8324
+ compressNestedSteps,
8273
8325
  };
8274
8326
  })();
8275
8327
  up.reload = up.fragment.reload;
@@ -8281,7 +8333,7 @@ u.delegate(up, ['context'], () => up.layer.current);
8281
8333
 
8282
8334
 
8283
8335
  /***/ }),
8284
- /* 87 */
8336
+ /* 88 */
8285
8337
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
8286
8338
 
8287
8339
  "use strict";
@@ -8290,10 +8342,10 @@ __webpack_require__.r(__webpack_exports__);
8290
8342
 
8291
8343
 
8292
8344
  /***/ }),
8293
- /* 88 */
8345
+ /* 89 */
8294
8346
  /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
8295
8347
 
8296
- __webpack_require__(89);
8348
+ __webpack_require__(90);
8297
8349
  up.viewport = (function () {
8298
8350
  const u = up.util;
8299
8351
  const e = up.element;
@@ -8605,7 +8657,7 @@ up.viewport = (function () {
8605
8657
  tryFocus,
8606
8658
  newStateCache,
8607
8659
  focusedElementWithin,
8608
- copyCursorProps
8660
+ copyCursorProps,
8609
8661
  };
8610
8662
  })();
8611
8663
  up.focus = up.viewport.focus;
@@ -8613,7 +8665,7 @@ up.reveal = up.viewport.reveal;
8613
8665
 
8614
8666
 
8615
8667
  /***/ }),
8616
- /* 89 */
8668
+ /* 90 */
8617
8669
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
8618
8670
 
8619
8671
  "use strict";
@@ -8622,7 +8674,7 @@ __webpack_require__.r(__webpack_exports__);
8622
8674
 
8623
8675
 
8624
8676
  /***/ }),
8625
- /* 90 */
8677
+ /* 91 */
8626
8678
  /***/ (() => {
8627
8679
 
8628
8680
  up.motion = (function () {
@@ -8880,10 +8932,10 @@ up.animate = up.motion.animate;
8880
8932
 
8881
8933
 
8882
8934
  /***/ }),
8883
- /* 91 */
8935
+ /* 92 */
8884
8936
  /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
8885
8937
 
8886
- __webpack_require__(92);
8938
+ __webpack_require__(93);
8887
8939
  const u = up.util;
8888
8940
  up.network = (function () {
8889
8941
  const config = new up.Config(() => ({
@@ -9026,7 +9078,7 @@ up.cache = up.network.cache;
9026
9078
 
9027
9079
 
9028
9080
  /***/ }),
9029
- /* 92 */
9081
+ /* 93 */
9030
9082
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
9031
9083
 
9032
9084
  "use strict";
@@ -9035,10 +9087,10 @@ __webpack_require__.r(__webpack_exports__);
9035
9087
 
9036
9088
 
9037
9089
  /***/ }),
9038
- /* 93 */
9090
+ /* 94 */
9039
9091
  /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
9040
9092
 
9041
- __webpack_require__(94);
9093
+ __webpack_require__(95);
9042
9094
  const u = up.util;
9043
9095
  const e = up.element;
9044
9096
  up.layer = (function () {
@@ -9279,7 +9331,7 @@ up.layer = (function () {
9279
9331
 
9280
9332
 
9281
9333
  /***/ }),
9282
- /* 94 */
9334
+ /* 95 */
9283
9335
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
9284
9336
 
9285
9337
  "use strict";
@@ -9288,10 +9340,10 @@ __webpack_require__.r(__webpack_exports__);
9288
9340
 
9289
9341
 
9290
9342
  /***/ }),
9291
- /* 95 */
9343
+ /* 96 */
9292
9344
  /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
9293
9345
 
9294
- __webpack_require__(96);
9346
+ __webpack_require__(97);
9295
9347
  up.link = (function () {
9296
9348
  const u = up.util;
9297
9349
  const e = up.element;
@@ -9586,7 +9638,7 @@ up.follow = up.link.follow;
9586
9638
 
9587
9639
 
9588
9640
  /***/ }),
9589
- /* 96 */
9641
+ /* 97 */
9590
9642
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
9591
9643
 
9592
9644
  "use strict";
@@ -9595,7 +9647,7 @@ __webpack_require__.r(__webpack_exports__);
9595
9647
 
9596
9648
 
9597
9649
  /***/ }),
9598
- /* 97 */
9650
+ /* 98 */
9599
9651
  /***/ (() => {
9600
9652
 
9601
9653
  up.form = (function () {
@@ -9989,7 +10041,7 @@ up.validate = up.form.validate;
9989
10041
 
9990
10042
 
9991
10043
  /***/ }),
9992
- /* 98 */
10044
+ /* 99 */
9993
10045
  /***/ (() => {
9994
10046
 
9995
10047
  up.feedback = (function () {
@@ -10106,7 +10158,7 @@ up.feedback = (function () {
10106
10158
 
10107
10159
 
10108
10160
  /***/ }),
10109
- /* 99 */
10161
+ /* 100 */
10110
10162
  /***/ (() => {
10111
10163
 
10112
10164
  up.radio = (function () {
@@ -10121,7 +10173,7 @@ up.radio = (function () {
10121
10173
  function reset() {
10122
10174
  config.reset();
10123
10175
  }
10124
- function hungrySolutions({ layer, history, origin }) {
10176
+ function hungrySteps({ layer, history, origin }) {
10125
10177
  let hungrySelector = config.hungrySelectors.join(', ');
10126
10178
  let hungries = up.fragment.all(hungrySelector, { layer: 'any' });
10127
10179
  return u.filterMap(hungries, (element) => {
@@ -10135,10 +10187,21 @@ up.radio = (function () {
10135
10187
  return;
10136
10188
  }
10137
10189
  let ifLayer = e.attr(element, 'up-if-layer');
10138
- if (ifLayer !== 'any' && layer !== up.layer.get(element)) {
10190
+ let elementLayer = up.layer.get(element);
10191
+ if (ifLayer !== 'any' && layer !== elementLayer) {
10139
10192
  return;
10140
10193
  }
10141
- return { target, element };
10194
+ let transition = e.booleanOrStringAttr(element, 'up-transition');
10195
+ return {
10196
+ selector: target,
10197
+ oldElement: element,
10198
+ layer: elementLayer,
10199
+ origin,
10200
+ transition,
10201
+ placement: 'swap',
10202
+ useKeep: true,
10203
+ maybe: true,
10204
+ };
10142
10205
  });
10143
10206
  }
10144
10207
  function startPolling(fragment, options = {}) {
@@ -10174,7 +10237,7 @@ up.radio = (function () {
10174
10237
  up.on('up:framework:reset', reset);
10175
10238
  return {
10176
10239
  config,
10177
- hungrySolutions,
10240
+ hungrySteps,
10178
10241
  startPolling,
10179
10242
  stopPolling,
10180
10243
  pollIssue,
@@ -10183,7 +10246,7 @@ up.radio = (function () {
10183
10246
 
10184
10247
 
10185
10248
  /***/ }),
10186
- /* 100 */
10249
+ /* 101 */
10187
10250
  /***/ (() => {
10188
10251
 
10189
10252
  (function () {
@@ -10333,15 +10396,16 @@ __webpack_require__(83);
10333
10396
  __webpack_require__(84);
10334
10397
  __webpack_require__(85);
10335
10398
  __webpack_require__(86);
10336
- __webpack_require__(88);
10337
- __webpack_require__(90);
10399
+ __webpack_require__(87);
10400
+ __webpack_require__(89);
10338
10401
  __webpack_require__(91);
10339
- __webpack_require__(93);
10340
- __webpack_require__(95);
10341
- __webpack_require__(97);
10402
+ __webpack_require__(92);
10403
+ __webpack_require__(94);
10404
+ __webpack_require__(96);
10342
10405
  __webpack_require__(98);
10343
10406
  __webpack_require__(99);
10344
10407
  __webpack_require__(100);
10408
+ __webpack_require__(101);
10345
10409
  up.framework.onEvaled();
10346
10410
 
10347
10411
  })();