unpoly-rails 2.7.2.2 → 3.0.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +96 -52
- data/assets/unpoly/unpoly-bootstrap3.js +10 -8
- data/assets/unpoly/unpoly-bootstrap3.min.js +1 -1
- data/assets/unpoly/unpoly-bootstrap4.js +10 -8
- data/assets/unpoly/unpoly-bootstrap4.min.js +1 -1
- data/assets/unpoly/unpoly-bootstrap5.js +9 -7
- data/assets/unpoly/unpoly-bootstrap5.min.js +1 -1
- data/assets/unpoly/unpoly-migrate.js +448 -350
- data/assets/unpoly/unpoly-migrate.min.js +1 -1
- data/assets/unpoly/unpoly.es6.js +223 -337
- data/assets/unpoly/unpoly.es6.min.js +1 -1
- data/assets/unpoly/unpoly.js +3105 -2282
- data/assets/unpoly/unpoly.min.js +1 -1
- data/lib/unpoly/rails/change/cache.rb +14 -2
- data/lib/unpoly/rails/change/field.rb +52 -14
- data/lib/unpoly/rails/change/field_definition.rb +42 -4
- data/lib/unpoly/rails/change/layer.rb +3 -3
- data/lib/unpoly/rails/change.rb +106 -58
- data/lib/unpoly/rails/controller.rb +6 -4
- data/lib/unpoly/rails/engine.rb +1 -1
- data/lib/unpoly/rails/request_echo_headers.rb +2 -6
- data/lib/unpoly/rails/version.rb +1 -1
- data/lib/unpoly-rails.rb +0 -1
- metadata +4 -7
- data/assets/unpoly/unpoly.es5.js +0 -11181
- data/assets/unpoly/unpoly.es5.min.js +0 -1
- data/lib/unpoly/rails/util.rb +0 -25
@@ -1 +1 @@
|
|
1
|
-
!function(){var e={294:function(){up.browser.loadPage=function(){for(var e,r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return up.migrate.deprecated("up.browser.loadPage","up.network.loadPage"),(e=up.network).loadPage.apply(e,r)},up.browser.isSupported=function(){for(var e,r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return up.migrate.deprecated("up.browser.isSupported","up.framework.isSupported"),(e=up.framework).isSupported.apply(e,r)}},700:function(){up.element.first=function(){for(var e,r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return up.migrate.deprecated("up.element.first()","up.element.get()"),(e=up.element).get.apply(e,r)},up.element.createFromHtml=function(){for(var e,r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return up.migrate.deprecated("up.element.createFromHtml","up.element.createFromHTML"),(e=up.element).createFromHTML.apply(e,r)}},394:function(){up.migrate.renamedPackage("bus","event"),up.event.nobodyPrevents=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];up.migrate.deprecated("up.event.nobodyPrevents(type)","!up.emit(type).defaultPrevented");var t=up.emit.apply(up,e);return!t.defaultPrevented}},729:function(){up.migrate.renamedPackage("navigation","feedback"),up.migrate.renamedProperty(up.feedback.config,"navs","navSelectors")},305:function(){up.migrate.renamedProperty(up.form.config,"fields","fieldSelectors"),up.migrate.renamedProperty(up.form.config,"submitButtons","submitButtonSelectors")},354:function(){var e=this&&this.__assign||function(){return e=Object.assign||function(e){for(var r,t=1,a=arguments.length;t<a;t++)for(var n in r=arguments[t])Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);return e},e.apply(this,arguments)},r=up.util;up.migrate.renamedPackage("flow","fragment"),up.migrate.renamedPackage("dom","fragment"),up.migrate.renamedProperty(up.fragment.config,"fallbacks","mainTargets"),up.migrate.handleResponseDocOptions=function(e){return up.migrate.fixKey(e,"html","document")},up.replace=function(r,t,a){return up.migrate.deprecated("up.replace(target, url)","up.navigate(target, { url })"),up.navigate(e(e({},a),{target:r,url:t}))},up.extract=function(r,t,a){return up.migrate.deprecated("up.extract(target, document)","up.navigate(target, { document })"),up.navigate(e(e({},a),{target:r,document:t}))},up.fragment.first=function(){for(var e,r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return up.migrate.deprecated("up.fragment.first()","up.fragment.get()"),(e=up.fragment).get.apply(e,r)},up.first=up.fragment.first,up.migrate.handleScrollOptions=function(e){r.isUndefined(e.scroll)&&(r.isString(e.reveal)?(up.migrate.deprecated("Option { reveal: '".concat(e.reveal,"' }"),"{ scroll: '".concat(e.reveal,"' }")),e.scroll=e.reveal):!0===e.reveal?(up.migrate.deprecated("Option { reveal: true }","{ scroll: 'target' }"),e.scroll="target"):!1===e.reveal&&(up.migrate.deprecated("Option { reveal: false }","{ scroll: false }"),e.scroll=!1),r.isDefined(e.resetScroll)&&(up.migrate.deprecated("Option { resetScroll: true }","{ scroll: 'reset' }"),e.scroll="teset"),r.isDefined(e.restoreScroll)&&(up.migrate.deprecated("Option { restoreScroll: true }","{ scroll: 'restore' }"),e.scroll="restore"))},up.migrate.handleHistoryOption=function(e){r.isString(e.history)&&"auto"!==e.history&&(up.migrate.warn("Passing a URL as { history } option is deprecated. Pass it as { location } instead."),e.location=e.history,e.history="auto")},up.migrate.preprocessRenderOptions=function(e){up.migrate.handleHistoryOption(e);for(var t=0,a=["target","origin"];t<a.length;t++){var n=a[t];r.isJQuery(e[n])&&(up.migrate.warn("Passing a jQuery collection as { %s } is deprecated. Pass it as a native element instead.",n),e[n]=up.element.get(e[n]))}}},869:function(){up.migrate.renamedProperty(up.history.config,"popTargets","restoreTargets"),up.history.url=function(){return up.migrate.deprecated("up.history.url()","up.history.location"),up.history.location},up.migrate.renamedEvent("up:history:push","up:location:changed"),up.migrate.renamedEvent("up:history:pushed","up:location:changed"),up.migrate.renamedEvent("up:history:restore","up:location:changed"),up.migrate.renamedEvent("up:history:restored","up:location:changed"),up.migrate.renamedEvent("up:history:replaced","up:location:changed")},905:function(){up.migrate.handleLayerOptions=function(e){up.migrate.fixKey(e,"flavor","mode"),up.migrate.fixKey(e,"closable","dismissable"),up.migrate.fixKey(e,"closeLabel","dismissLabel");for(var r=0,t=["width","maxWidth","height"];r<t.length;r++){var a=t[r];e[a]&&up.migrate.warn("Layer option { ".concat(a," } has been removed. Use { size } or { class } instead."))}e.sticky&&up.migrate.warn("Layer option { sticky } has been removed. Give links an [up-peel=false] attribute to prevent layer dismissal on click."),e.template&&up.migrate.warn("Layer option { template } has been removed. Use { class } or modify the layer HTML on up:layer:open."),"page"===e.layer&&(up.migrate.warn("Option { layer: 'page' } has been renamed to { layer: 'root' }."),e.layer="root"),"modal"!==e.layer&&"popup"!==e.layer||(up.migrate.warn("Option { layer: '".concat(e.layer,"' } has been removed. Did you mean { layer: 'overlay' }?")),e.layer="overlay")},up.migrate.handleTetherOptions=function(e){var r=e.position.split("-"),t=r[0],a=r[1];a&&(up.migrate.warn("The position value %o is deprecated. Use %o instead.",e.position,{position:t,align:a}),e.position=t,e.align=a)},up.migrate.registerLayerCloser=function(e){return e.registerClickCloser("up-close",(function(r,t){up.migrate.deprecated("[up-close]","[up-dismiss]"),e.dismiss(r,t)}))},up.migrate.handleLayerConfig=function(e){return up.migrate.fixKey(e,"historyVisible","history")},up.util.getter(up.Layer.prototype,"historyVisible",(function(){return up.migrate.deprecated("up.Layer#historyVisible","up.Layer#history"),this.history}))},969:function(){up.migrate.parseFollowOptions=function(e){e.string("flavor"),e.string("width"),e.string("height"),e.boolean("closable"),e.booleanOrString("reveal"),e.boolean("resetScroll"),e.boolean("restoreScroll"),e.booleanOrString("historyVisible")},up.migrate.targetMacro("up-dash",{"up-preload":"","up-instant":""},(function(){return up.migrate.deprecated("a[up-dash]","up.link.config.instantSelectors or up.link.config.preloadSelectors")}))},992:function(){var e=this&&this.__spreadArray||function(e,r,t){if(t||2===arguments.length)for(var a,n=0,p=r.length;n<p;n++)!a&&n in r||(a||(a=Array.prototype.slice.call(r,0,n)),a[n]=r[n]);return e.concat(a||Array.prototype.slice.call(r))},r=up.util;up.migrate=function(){var t=new up.Config((function(){return{logLevel:"warn"}})),a={};function n(e){var r=a[e];return r?(u("Event ".concat(e," has been renamed to ").concat(r)),r):e}var p={};function u(a){for(var n,u=[],o=1;o<arguments.length;o++)u[o-1]=arguments[o];var i=r.sprintf.apply(r,e([a],u,!1));p[i]||(p[i]=!0,(n=up.log)[t.logLevel].apply(n,e(["unpoly-migrate",a],u,!1)))}return up.on("up:framework:reset",(function(){t.reset()})),{deprecated:function(e,r){u("".concat(e," has been deprecated. Use ").concat(r," instead."))},renamedPackage:function(e,r){Object.defineProperty(up,e,{get:function(){return u("up.".concat(e," has been renamed to up.").concat(r)),up[r]}})},renamedProperty:function(e,r,t){var a=function(){return u("Property { %s } has been renamed to { %s } (found in %o)",r,t,e)};return Object.defineProperty(e,r,{get:function(){return a(),this[t]},set:function(e){a(),this[t]=e}})},formerlyAsync:function(e){var r=Promise.resolve(),t=r.then;return r.then=function(){return u("".concat(e," is now a sync function")),t.apply(this,arguments)},r},renamedEvent:function(e,r){a[e]=r},fixEventTypes:function(e){return r.uniq(r.map(e,n))},fixKey:function(e,t,a){r.isDefined(e[t])&&(u("Property { %s } has been renamed to { %s } (found in %o)",t,a,e),r.renameKey(e,t,a))},warn:u,loaded:!0,config:t}}()},413:function(){var e=this&&this.__assign||function(){return e=Object.assign||function(e){for(var r,t=1,a=arguments.length;t<a;t++)for(var n in r=arguments[t])Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);return e},e.apply(this,arguments)},r=new Error("up.modal.flavors has been removed without direct replacement. You may give new layers a { class } or modify layer elements on up:layer:open.");up.modal={visit:function(r,t){return void 0===t&&(t={}),up.migrate.deprecated("up.modal.visit(url)",'up.layer.open({ url, mode: "modal" })'),up.layer.open(e(e({},t),{url:r,mode:"modal"}))},follow:function(r,t){return void 0===t&&(t={}),up.migrate.deprecated("up.modal.follow(link)",'up.follow(link, { layer: "modal" })'),up.follow(r,e(e({},t),{layer:"modal"}))},extract:function(r,t,a){return void 0===a&&(a={}),up.migrate.deprecated("up.modal.extract(target, document)",'up.layer.open({ document, mode: "modal" })'),up.layer.open(e(e({},a),{target:r,html:t,layer:"modal"}))},close:function(e){return void 0===e&&(e={}),up.migrate.deprecated("up.modal.close()","up.layer.dismiss()"),up.layer.dismiss(null,e),up.migrate.formerlyAsync("up.layer.dismiss()")},url:function(){return up.migrate.deprecated("up.modal.url()","up.layer.location"),up.layer.location},coveredUrl:function(){var e;return up.migrate.deprecated("up.modal.coveredUrl()","up.layer.parent.location"),null===(e=up.layer.parent)||void 0===e?void 0:e.location},get config(){return up.migrate.deprecated("up.modal.config","up.layer.config.modal"),up.layer.config.modal},contains:function(e){return up.migrate.deprecated("up.modal.contains()","up.layer.contains()"),up.layer.contains(e)},isOpen:function(){return up.migrate.deprecated("up.modal.isOpen()","up.layer.isOverlay()"),up.layer.isOverlay()},get flavors(){throw r},flavor:function(){throw r}},up.migrate.renamedEvent("up:modal:open","up:layer:open"),up.migrate.renamedEvent("up:modal:opened","up:layer:opened"),up.migrate.renamedEvent("up:modal:close","up:layer:dismiss"),up.migrate.renamedEvent("up:modal:closed","up:layer:dismissed"),up.migrate.targetMacro("up-modal",{"up-layer":"new modal"},(function(){return up.migrate.deprecated("a[up-modal]",'a[up-layer="new modal"]')})),up.migrate.targetMacro("up-drawer",{"up-layer":"new drawer"},(function(){return up.migrate.deprecated("a[up-drawer]",'a[up-layer="new drawer"]')}))},885:function(){var e=up.util;up.migrate.renamedPackage("proxy","network"),up.migrate.renamedEvent("up:proxy:load","up:request:load"),up.migrate.renamedEvent("up:proxy:received","up:request:loaded"),up.migrate.renamedEvent("up:proxy:loaded","up:request:loaded"),up.migrate.renamedEvent("up:proxy:fatal","up:request:fatal"),up.migrate.renamedEvent("up:proxy:aborted","up:request:aborted"),up.migrate.renamedEvent("up:proxy:slow","up:request:late"),up.migrate.renamedEvent("up:proxy:recover","up:request:recover");var r=function(){return up.migrate.deprecated("up.proxy.config.preloadDelay","up.link.config.preloadDelay")};Object.defineProperty(up.network.config,"preloadDelay",{get:function(){return r(),up.link.config.preloadDelay},set:function(e){r(),up.link.config.preloadDelay=e}}),up.migrate.renamedProperty(up.network.config,"maxRequests","concurrency"),up.migrate.renamedProperty(up.network.config,"slowDelay","badResponseTime"),up.migrate.handleRequestOptions=function(e){return up.migrate.fixKey(e,"data","params")},up.ajax=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];up.migrate.deprecated("up.ajax()","up.request()");var t=function(e){return e.text};return up.request.apply(up,e).then(t)},up.network.clear=function(){up.migrate.deprecated("up.proxy.clear()","up.cache.clear()"),up.cache.clear()},up.network.preload=function(){for(var e,r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return up.migrate.deprecated("up.proxy.preload(link)","up.link.preload(link)"),(e=up.link).preload.apply(e,r)},up.Request.prototype.navigate=function(){up.migrate.deprecated("up.Request#navigate()","up.Request#loadPage()"),this.loadPage()},up.Response.prototype.isSuccess=function(){return up.migrate.deprecated("up.Response#isSuccess()","up.Response#ok"),this.ok},up.Response.prototype.isError=function(){return up.migrate.deprecated("up.Response#isError()","!up.Response#ok"),!this.ok};var t=up.network.config.progressBar;function a(){up.network.config.progressBar=function(){return r=up.EventListener.allNonDefault(document),e.find(r,(function(e){return"up:request:late"===e.eventType}))?(up.migrate.warn("Disabled the default progress bar as may have built a custom loading indicator with your up:request:late listener. Please set up.network.config.progressBar to true or false."),!1):t;var r}}a(),up.on("up:framework:reset",a)},69:function(){var e=this&&this.__assign||function(){return e=Object.assign||function(e){for(var r,t=1,a=arguments.length;t<a;t++)for(var n in r=arguments[t])Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);return e},e.apply(this,arguments)};up.popup={attach:function(r,t){return void 0===t&&(t={}),r=up.fragment.get(r),up.migrate.deprecated("up.popup.attach(origin)","up.layer.open({ origin, layer: 'popup' })"),up.layer.open(e(e({},t),{origin:r,layer:"popup"}))},close:function(e){return void 0===e&&(e={}),up.migrate.deprecated("up.popup.close()","up.layer.dismiss()"),up.layer.dismiss(null,e),up.migrate.formerlyAsync("up.layer.dismiss()")},url:function(){return up.migrate.deprecated("up.popup.url()","up.layer.location"),up.layer.location},coveredUrl:function(){var e;return up.migrate.deprecated("up.popup.coveredUrl()","up.layer.parent.location"),null===(e=up.layer.parent)||void 0===e?void 0:e.location},get config(){return up.migrate.deprecated("up.popup.config","up.layer.config.popup"),up.layer.config.popup},contains:function(e){return up.migrate.deprecated("up.popup.contains()","up.layer.contains()"),up.layer.contains(e)},isOpen:function(){return up.migrate.deprecated("up.popup.isOpen()","up.layer.isOverlay()"),up.layer.isOverlay()},sync:function(){return up.migrate.deprecated("up.popup.sync()","up.layer.sync()"),up.layer.sync()}},up.migrate.renamedEvent("up:popup:open","up:layer:open"),up.migrate.renamedEvent("up:popup:opened","up:layer:opened"),up.migrate.renamedEvent("up:popup:close","up:layer:dismiss"),up.migrate.renamedEvent("up:popup:closed","up:layer:dismissed"),up.migrate.targetMacro("up-popup",{"up-layer":"new popup"},(function(){return up.migrate.deprecated("[up-popup]",'[up-layer="new popup"]')}))},228:function(){up.migrate.renamedProperty(up.radio.config,"hungry","hungrySelectors")},629:function(){var e=up.util,r=up.element;up.migrate.postCompile=function(r,t){var a;if(a=t.keep){up.migrate.warn("The { keep: true } option for up.compiler() has been removed. Have the compiler set [up-keep] attribute instead.");for(var n=e.isString(a)?a:"",p=0,u=r;p<u.length;p++)u[p].setAttribute("up-keep",n)}},up.migrate.targetMacro=function(t,a,n){up.macro("[".concat(t,"]"),(function(p){var u,o=e.copy(a);(u=p.getAttribute(t))?o["up-target"]=u:o["up-follow"]="",r.setMissingAttrs(p,o),p.removeAttribute(t),null==n||n()}))}},197:function(){up.macro("[up-tooltip]",(function(e){up.migrate.warn("[up-tooltip] has been deprecated. A [title] was set instead."),up.element.setMissingAttr(e,"title",e.getAttribute("up-tooltip"))}))},480:function(){up.util.only=function(e){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];return up.migrate.deprecated("up.util.only(object, ...keys)","up.util.pick(object, keys)"),up.util.pick(e,r)},up.util.except=function(e){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];return up.migrate.deprecated("up.util.except(object, ...keys)","up.util.omit(object, keys)"),up.util.omit(e,r)},up.util.parseUrl=function(){for(var e,r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return up.migrate.warn("up.util.parseUrl() has been renamed to up.util.parseURL()"),(e=up.util).parseURL.apply(e,r)},up.util.any=function(){for(var e,r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return up.migrate.warn("up.util.any() has been renamed to up.util.some()"),(e=up.util).some.apply(e,r)},up.util.all=function(){for(var e,r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return up.migrate.warn("up.util.all() has been renamed to up.util.every()"),(e=up.util).every.apply(e,r)},up.util.detect=function(){for(var e,r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return up.migrate.warn("up.util.detect() has been renamed to up.util.find()"),(e=up.util).find.apply(e,r)},up.util.select=function(){for(var e,r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return up.migrate.warn("up.util.select() has been renamed to up.util.filter()"),(e=up.util).filter.apply(e,r)},up.util.setTimer=function(){for(var e,r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return up.migrate.warn("up.util.setTimer() has been renamed to up.util.timer()"),(e=up.util).timer.apply(e,r)},up.util.escapeHtml=function(){for(var e,r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return up.migrate.deprecated("up.util.escapeHtml","up.util.escapeHTML"),(e=up.util).escapeHTML.apply(e,r)},up.util.selectorForElement=function(){for(var e,r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return up.migrate.warn("up.util.selectorForElement() has been renamed to up.fragment.toTarget()"),(e=up.fragment).toTarget.apply(e,r)},up.util.nextFrame=function(){for(var e,r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return up.migrate.warn("up.util.nextFrame() has been renamed to up.util.task()"),(e=up.util).task.apply(e,r)},up.util.times=function(e,r){for(var t=0;t<e;t++)r()}},338:function(){up.migrate.renamedPackage("layout","viewport"),up.migrate.renamedProperty(up.viewport.config,"viewports","viewportSelectors"),up.migrate.renamedProperty(up.viewport.config,"snap","revealSnap"),up.viewport.closest=function(){for(var e,r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return up.migrate.deprecated("up.viewport.closest()","up.viewport.get()"),(e=up.viewport).get.apply(e,r)}}},r={};function t(a){var n=r[a];if(void 0!==n)return n.exports;var p=r[a]={exports:{}};return e[a].call(p.exports,p,p.exports,t),p.exports}up.framework.startExtension(),t(992),t(480),t(294),t(700),t(394),t(629),t(305),t(354),t(869),t(729),t(969),t(905),t(413),t(69),t(197),t(885),t(228),t(338),up.framework.stopExtension()}();
|
1
|
+
(()=>{var e={294:()=>{up.browser.loadPage=function(...e){return up.migrate.deprecated("up.browser.loadPage()","up.network.loadPage()"),up.network.loadPage(...e)},up.browser.isSupported=function(...e){return up.migrate.deprecated("up.browser.isSupported()","up.framework.isSupported()"),up.framework.isSupported(...e)}},700:()=>{up.element.first=function(...e){return up.migrate.deprecated("up.element.first()","up.element.get()"),up.element.get(...e)},up.element.createFromHtml=function(...e){return up.migrate.deprecated("up.element.createFromHtml()","up.element.createFromHTML()"),up.element.createFromHTML(...e)},up.element.remove=function(e){return up.migrate.deprecated("up.element.remove()","Element#remove()"),e.remove()},up.element.matches=function(e,t){return up.migrate.deprecated("up.element.matches()","Element#matches()"),e.matches(t)},up.element.closest=function(e,t){return up.migrate.deprecated("up.element.closest()","Element#closest()"),e.closest(t)},up.element.replace=function(e,t){return up.migrate.deprecated("up.element.replace()","Element#replaceWith()"),e.replaceWith(t)},up.element.all=function(...e){up.migrate.deprecated("up.element.all()","Document#querySelectorAll() or Element#querySelectorAll()");const t=e.pop();return(e[0]||document).querySelectorAll(t)},up.element.toggleClass=function(e,t,r){const a=e.classList;return null==r&&(r=!a.contains(t)),r?a.add(t):a.remove(t)},up.element.toSelector=function(...e){return up.migrate.deprecated("up.element.toSelector()","up.fragment.toTarget()"),up.fragment.toTarget(...e)},up.element.isAttached=function(e){return up.migrate.deprecated("up.element.isAttached()","element.isConnected"),e.isConnected},up.element.isDetached=function(e){return up.migrate.deprecated("up.element.isDetached()","!element.isConnected"),!e.isConnected}},394:()=>{up.migrate.renamedPackage("bus","event"),up.event.nobodyPrevents=function(...e){return up.migrate.deprecated("up.event.nobodyPrevents(type)","!up.emit(type).defaultPrevented"),!up.emit(...e).defaultPrevented}},729:()=>{up.migrate.renamedPackage("navigation","feedback"),up.migrate.renamedProperty(up.feedback.config,"navs","navSelectors")},305:()=>{up.migrate.renamedProperty(up.form.config,"fields","fieldSelectors"),up.migrate.renamedProperty(up.form.config,"submitButtons","submitButtonSelectors"),up.migrate.renamedProperty(up.form.config,"validateTargets","groupSelectors"),up.migrate.renamedProperty(up.form.config,"observeDelay","watchInputDelay"),up.migrate.migratedFormGroupSelectors=function(){return up.form.config.groupSelectors.map((e=>{let t=e.replace(/:has\(:origin\)$/,"");return e!==t&&up.migrate.warn('Selectors in up.form.config.groupSelectors must not contain ":has(:origin)". The suffix is added automatically where required. Found in "%s".',e),t}))},up.migrate.renamedAttribute("up-observe","up-watch"),up.migrate.renamedAttribute("up-fieldset","up-form-group"),up.migrate.renamedAttribute("up-delay","up-watch-delay",{scope:"[up-autosubmit]"}),up.migrate.renamedAttribute("up-delay","up-watch-delay",{scope:"[up-watch]"}),up.migrate.renamedAttribute("up-restore-scroll","up-scroll",{mapValue:e=>"true"===e?"restore":"reset"}),up.observe=function(...e){if(up.migrate.deprecated("up.observe()","up.watch()"),up.util.isList(e[0])&&e[0].length>1){let t=e.shift();up.migrate.warn("Calling up.observe() with a list of multiple elements is no longer supported by up.watch()");let r=up.util.map(t,(t=>up.watch(t,...e)));return up.util.sequence(r)}return up.watch(...e)}},354:()=>{const e=up.util;up.migrate.renamedPackage("flow","fragment"),up.migrate.renamedPackage("dom","fragment"),up.migrate.renamedProperty(up.fragment.config,"fallbacks","mainTargets"),up.migrate.handleResponseDocOptions=e=>up.migrate.fixKey(e,"html","document"),up.replace=function(e,t,r){return up.migrate.deprecated("up.replace(target, url)","up.navigate(target, { url })"),up.navigate(Object.assign(Object.assign({},r),{target:e,url:t}))},up.extract=function(e,t,r){return up.migrate.deprecated("up.extract(target, document)","up.navigate(target, { document })"),up.navigate(Object.assign(Object.assign({},r),{target:e,document:t}))},up.fragment.first=function(...e){return up.migrate.deprecated("up.fragment.first()","up.fragment.get()"),up.fragment.get(...e)},up.first=up.fragment.first,up.migrate.preprocessRenderOptions=function(t){e.isString(t.history)&&"auto"!==t.history&&(up.migrate.warn("Passing a URL as { history } option is deprecated. Pass it as { location } instead."),t.location=t.history,t.history="auto");for(let r of["target","origin"])e.isJQuery(t[r])&&(up.migrate.warn("Passing a jQuery collection as { %s } is deprecated. Pass it as a native element instead.",r),t[r]=up.element.get(t[r]));"auto"===t.fail&&(up.migrate.warn("The option { fail: 'auto' } is deprecated. Omit the option instead."),delete t.fail);let r=e.pluckKey(t,"solo");e.isString(r)?(up.migrate.warn("The up.render() option { solo } has been replaced by { abort } and { abort } no longer accepts a URL pattern. Check if you can use { abort: 'target'} or use up.network.abort(pattern) instead."),t.abort=e=>up.network.abort(r,e)):e.isFunction(r)?(up.migrate.warn("The up.render() option { solo } has been replaced by { abort } and { abort } no longer accepts a Function(up.Request): boolean. Check if you can use { abort: 'target'} or use up.network.abort(fn) instead."),t.abort=e=>{up.network.abort(r,e)}):!0===r?(up.migrate.warn("Option { solo: true }","{ abort: 'all' }"),t.abort="all"):!1===r&&(up.migrate.warn("Option { solo: false }","{ abort: false }"),t.abort=!1),up.migrate.fixKey(t,"keep","useKeep"),up.migrate.fixKey(t,"hungry","useHungry"),up.migrate.fixKey(t,"failOnFinished","onFailFinished"),e.isString(t.reveal)?(up.migrate.deprecated(`Option { reveal: '${t.reveal}' }`,`{ scroll: '${t.reveal}' }`),t.scroll=t.reveal):!0===t.reveal?(up.migrate.deprecated("Option { reveal: true }","{ scroll: 'target' }"),t.scroll="target"):!1===t.reveal&&(up.migrate.deprecated("Option { reveal: false }","{ scroll: false }"),t.scroll=!1),e.isDefined(t.resetScroll)&&(up.migrate.deprecated("Option { resetScroll: true }","{ scroll: 'reset' }"),t.scroll="teset"),e.isDefined(t.restoreScroll)&&(up.migrate.deprecated("Option { restoreScroll: true }","{ scroll: 'restore' }"),t.scroll="restore")},up.migrate.postprocessReloadOptions=function(e){var t;let r,a=null===(t=e.headers)||void 0===t?void 0:t["If-Modified-Since"];r=a?Math.floor(.001*new Date(a)).toString():"0",e.headers[up.protocol.headerize("reloadFromTime")]=r};const t=/\[([\w-]+)(?:([~|^$*]?=)(["'])?([^\3\]]*?)\3)?]/g;up.migrate.resolveOrigin=function(e,{origin:r}={}){let a=new RegExp(t.source+"|&|:origin\\b","g");return e.replace(a,(function(t){return":origin"!==t&&"&"!==t?t:("&"===t&&up.migrate.deprecated("Origin shorthand '&'",":origin"),r?up.fragment.toTarget(r):void up.fail('Missing { origin } element to resolve "%s" reference (found in %s)',t,e))}))},up.migrate.removedEvent("up:fragment:kept","up:fragment:keep");let r=up.fragment.config.runScripts,a=!1;Object.defineProperty(up.fragment.config,"runScripts",{get:()=>r,set(e){r=e,a=!0}}),up.on("up:framework:boot",(function(){a||up.migrate.warn("Scripts within fragments are now executed. Configure up.fragment.config.runScripts to remove this warning.")})),up.compiler("[up-keep]",(function(t){let r=up.element.booleanOrStringAttr(t,"up-keep");e.isString(r)&&(up.migrate.warn('The [up-keep] attribute no longer supports a selector value. Elements will be matched by their derived target. You may prevent keeping with [up-on-keep="if(condition) event.preventDefault()"]. '),up.element.setMissingAttr(t,"up-on-keep",`if (!newFragment.matches(${JSON.stringify(r)})) event.preventDefault()`),t.setAttribute("up-keep",""))}))},869:()=>{up.migrate.renamedProperty(up.history.config,"popTargets","restoreTargets"),up.history.url=function(){return up.migrate.deprecated("up.history.url()","up.history.location"),up.history.location},up.migrate.renamedEvent("up:history:push","up:location:changed"),up.migrate.renamedEvent("up:history:pushed","up:location:changed"),up.migrate.renamedEvent("up:history:restore","up:location:changed"),up.migrate.renamedEvent("up:history:restored","up:location:changed"),up.migrate.renamedEvent("up:history:replaced","up:location:changed")},905:()=>{up.migrate.handleLayerOptions=function(e){up.migrate.fixKey(e,"flavor","mode"),up.migrate.fixKey(e,"closable","dismissable"),up.migrate.fixKey(e,"closeLabel","dismissLabel");for(let t of["width","maxWidth","height"])e[t]&&up.migrate.warn(`Layer option { ${t} } has been removed. Use { size } or { class } instead.`);e.sticky&&up.migrate.warn("Layer option { sticky } has been removed. Give links an [up-peel=false] attribute to prevent layer dismissal on click."),e.template&&up.migrate.warn("Layer option { template } has been removed. Use { class } or modify the layer HTML on up:layer:open."),"page"===e.layer&&(up.migrate.warn("Option { layer: 'page' } has been renamed to { layer: 'root' }."),e.layer="root"),"modal"!==e.layer&&"popup"!==e.layer||(up.migrate.warn(`Option { layer: '${e.layer}' } has been removed. Did you mean { layer: 'overlay' }?`),e.layer="overlay")},up.migrate.handleTetherOptions=function(e){const[t,r]=e.position.split("-");r&&(up.migrate.warn("The position value %o is deprecated. Use %o instead.",e.position,{position:t,align:r}),e.position=t,e.align=r)},up.migrate.registerLayerCloser=e=>e.registerClickCloser("up-close",((t,r)=>{up.migrate.deprecated("[up-close]","[up-dismiss]"),e.dismiss(t,r)})),up.migrate.handleLayerConfig=e=>up.migrate.fixKey(e,"historyVisible","history"),up.util.getter(up.Layer.prototype,"historyVisible",(function(){return up.migrate.deprecated("up.Layer#historyVisible","up.Layer#history"),this.history}))},969:()=>{up.migrate.parseFollowOptions=function(e){e.string("flavor"),e.string("width"),e.string("height"),e.boolean("closable"),e.booleanOrString("solo"),e.booleanOrString("reveal"),e.boolean("resetScroll"),e.boolean("restoreScroll"),e.booleanOrString("historyVisible"),e.booleanOrString("clearCache")},up.migrate.targetMacro("up-dash",{"up-preload":"","up-instant":""},(()=>up.migrate.deprecated("a[up-dash]","up.link.config.instantSelectors and up.link.config.preloadSelectors"))),up.migrate.renamedAttribute("up-delay","up-preload-delay",{scope:up.link.preloadSelector})},992:()=>{const e=up.util;up.migrate=function(){const t=new up.Config((()=>({logLevel:"warn"}))),r={},a={};function p(e){let t=r[e];if(t)return n(`Event ${e} has been renamed to ${t}`),t;if(e in a){let t=`Event ${e} has been removed`,r=a[e];return r&&(t+=`. Use ${r} instead.`),n(t),e}return e}const u={};function n(r,...a){const p=e.sprintf(r,...a);u[p]||(u[p]=!0,up.log[t.logLevel]("unpoly-migrate",r,...a))}return up.on("up:framework:reset",(function(){t.reset()})),{deprecated:function(e,t){n(`${e} has been deprecated. Use ${t} instead.`)},renamedPackage:function(e,t){Object.defineProperty(up,e,{get:()=>(n(`up.${e} has been renamed to up.${t}`),up[t])})},renamedProperty:function(e,t,r){const a=()=>n("Property { %s } has been renamed to { %s } (found in %o)",t,r,e);Object.defineProperty(e,t,{get(){return a(),this[r]},set(e){a(),this[r]=e}})},removedProperty:function(e,t){const r=()=>n("Property { %s } has been removed without replacement (found in %o)",t,e);Object.defineProperty(e,t,{get(){return r(),this[t]},set(e){r(),this[t]=e}})},renamedAttribute:function(e,t,{scope:r,mapValue:a}={}){let p=r||`[${e}]`;up.macro(p,{priority:-1e3},(function(r){if(r.hasAttribute(e)){n("Attribute [%s] has been renamed to [%s] (found in %o)",e,t,r);let p=r.getAttribute(e);a&&(p=a(p)),r.setAttribute(t,p),r.removeAttribute(e)}}))},formerlyAsync:function(e){const t=Promise.resolve(),r=t.then;return t.then=function(){return n(`${e} no longer returns a promise`),r.apply(this,arguments)},t},renamedEvent:function(e,t){r[e]=t},removedEvent:function(e,t=null){a[e]=t},fixEventTypes:function(t){return e.uniq(e.map(t,p))},fixKey:function(t,r,a){e.isDefined(t[r])&&(n("Property { %s } has been renamed to { %s } (found in %o)",r,a,t),e.renameKey(t,r,a))},warn:n,loaded:!0,config:t}}()},413:()=>{const e=new Error("up.modal.flavors has been removed without direct replacement. You may give new layers a { class } or modify layer elements on up:layer:open.");up.modal={visit:(e,t={})=>(up.migrate.deprecated("up.modal.visit(url)",'up.layer.open({ url, mode: "modal" })'),up.layer.open(Object.assign(Object.assign({},t),{url:e,mode:"modal"}))),follow:(e,t={})=>(up.migrate.deprecated("up.modal.follow(link)",'up.follow(link, { layer: "modal" })'),up.follow(e,Object.assign(Object.assign({},t),{layer:"modal"}))),extract:(e,t,r={})=>(up.migrate.deprecated("up.modal.extract(target, document)",'up.layer.open({ document, mode: "modal" })'),up.layer.open(Object.assign(Object.assign({},r),{target:e,html:t,layer:"modal"}))),close:(e={})=>(up.migrate.deprecated("up.modal.close()","up.layer.dismiss()"),up.layer.dismiss(null,e),up.migrate.formerlyAsync("up.layer.dismiss()")),url:()=>(up.migrate.deprecated("up.modal.url()","up.layer.location"),up.layer.location),coveredUrl(){var e;return up.migrate.deprecated("up.modal.coveredUrl()","up.layer.parent.location"),null===(e=up.layer.parent)||void 0===e?void 0:e.location},get config(){return up.migrate.deprecated("up.modal.config","up.layer.config.modal"),up.layer.config.modal},contains:e=>(up.migrate.deprecated("up.modal.contains()","up.layer.contains()"),up.layer.contains(e)),isOpen:()=>(up.migrate.deprecated("up.modal.isOpen()","up.layer.isOverlay()"),up.layer.isOverlay()),get flavors(){throw e},flavor(){throw e}},up.migrate.renamedEvent("up:modal:open","up:layer:open"),up.migrate.renamedEvent("up:modal:opened","up:layer:opened"),up.migrate.renamedEvent("up:modal:close","up:layer:dismiss"),up.migrate.renamedEvent("up:modal:closed","up:layer:dismissed"),up.migrate.targetMacro("up-modal",{"up-layer":"new modal"},(()=>up.migrate.deprecated("a[up-modal]",'a[up-layer="new modal"]'))),up.migrate.targetMacro("up-drawer",{"up-layer":"new drawer"},(()=>up.migrate.deprecated("a[up-drawer]",'a[up-layer="new drawer"]')))},885:()=>{const e=up.util;up.migrate.renamedPackage("proxy","network"),up.migrate.renamedEvent("up:proxy:load","up:request:load"),up.migrate.renamedEvent("up:proxy:received","up:request:loaded"),up.migrate.renamedEvent("up:proxy:loaded","up:request:loaded"),up.migrate.renamedEvent("up:proxy:fatal","up:request:offline"),up.migrate.renamedEvent("up:request:fatal","up:request:offline"),up.migrate.renamedEvent("up:proxy:aborted","up:request:aborted"),up.migrate.renamedEvent("up:proxy:slow","up:network:late"),up.migrate.renamedEvent("up:proxy:recover","up:network:recover"),up.migrate.renamedEvent("up:request:late","up:network:late"),up.migrate.renamedEvent("up:request:recover","up:network:recover");const t=()=>up.migrate.deprecated("up.proxy.config.preloadDelay","up.link.config.preloadDelay");Object.defineProperty(up.network.config,"preloadDelay",{get:()=>(t(),up.link.config.preloadDelay),set(e){t(),up.link.config.preloadDelay=e}}),up.migrate.renamedProperty(up.network.config,"maxRequests","concurrency"),up.migrate.renamedProperty(up.network.config,"slowDelay","badResponseTime"),up.migrate.renamedProperty(up.network.config,"cacheExpiry","cacheExpireAge"),up.migrate.renamedProperty(up.network.config,"clearCache","expireCache"),up.migrate.handleRequestOptions=function(e){up.migrate.fixKey(e,"clearCache","expireCache"),e.solo&&up.migrate.warn("The option up.request({ solo }) has been removed. Use up.network.abort() or up.fragment.abort() instead.")},up.ajax=function(...e){return up.migrate.deprecated("up.ajax()","up.request()"),up.request(...e).then((e=>e.text))},up.network.clear=function(){up.migrate.deprecated("up.proxy.clear()","up.cache.expire()"),up.cache.expire()},up.Request.Cache.prototype.clear=function(...e){up.migrate.deprecated("up.cache.clear()","up.cache.expire()"),this.expire(...e)},up.network.preload=function(...e){return up.migrate.deprecated("up.proxy.preload(link)","up.link.preload(link)"),up.link.preload(...e)},up.migrate.preprocessAbortArgs=function(t){2===t.length&&e.isString(t[1])&&(up.migrate.warn("up.network.abort() no longer takes a reason as a second argument. Pass it as { reason } option instead."),t[1]={reason:t[1]})},up.network.isIdle=function(){return up.migrate.deprecated("up.network.isIdle()","!up.network.isBusy()"),!up.network.isBusy()},up.Request.prototype.navigate=function(){up.migrate.deprecated("up.Request#navigate()","up.Request#loadPage()"),this.loadPage()},up.Response.prototype.isSuccess=function(){return up.migrate.deprecated("up.Response#isSuccess()","up.Response#ok"),this.ok},up.Response.prototype.isError=function(){return up.migrate.deprecated("up.Response#isError()","!up.Response#ok"),!this.ok};const r=up.network.config.progressBar;function a(){up.network.config.progressBar=function(){return function(){const t=up.EventListener.allNonDefault(document);return e.find(t,(e=>"up:network:late"===e.eventType))}()?(up.migrate.warn("Disabled the default progress bar as may have built a custom loading indicator with your up:network:late listener. Please set up.network.config.progressBar to true or false."),!1):r}}a(),up.on("up:framework:reset",a)},69:()=>{up.popup={attach:(e,t={})=>(e=up.fragment.get(e),up.migrate.deprecated("up.popup.attach(origin)","up.layer.open({ origin, layer: 'popup' })"),up.layer.open(Object.assign(Object.assign({},t),{origin:e,layer:"popup"}))),close:(e={})=>(up.migrate.deprecated("up.popup.close()","up.layer.dismiss()"),up.layer.dismiss(null,e),up.migrate.formerlyAsync("up.layer.dismiss()")),url:()=>(up.migrate.deprecated("up.popup.url()","up.layer.location"),up.layer.location),coveredUrl(){var e;return up.migrate.deprecated("up.popup.coveredUrl()","up.layer.parent.location"),null===(e=up.layer.parent)||void 0===e?void 0:e.location},get config(){return up.migrate.deprecated("up.popup.config","up.layer.config.popup"),up.layer.config.popup},contains:e=>(up.migrate.deprecated("up.popup.contains()","up.layer.contains()"),up.layer.contains(e)),isOpen:()=>(up.migrate.deprecated("up.popup.isOpen()","up.layer.isOverlay()"),up.layer.isOverlay()),sync:()=>(up.migrate.deprecated("up.popup.sync()","up.layer.sync()"),up.layer.sync())},up.migrate.renamedEvent("up:popup:open","up:layer:open"),up.migrate.renamedEvent("up:popup:opened","up:layer:opened"),up.migrate.renamedEvent("up:popup:close","up:layer:dismiss"),up.migrate.renamedEvent("up:popup:closed","up:layer:dismissed"),up.migrate.targetMacro("up-popup",{"up-layer":"new popup"},(()=>up.migrate.deprecated("[up-popup]",'[up-layer="new popup"]')))},677:()=>{up.migrate.clearCacheFromXHR=function(e){let t=e.getResponseHeader("X-Up-Clear-Cache");if(t)return up.migrate.deprecated("X-Up-Clear-Cache","X-Up-Expire-Cache"),"false"!==t&&t}},228:()=>{up.migrate.renamedProperty(up.radio.config,"hungry","hungrySelectors")},629:()=>{const e=up.util,t=up.element;up.migrate.postCompile=function(t,r){let a;if(a=r.keep){up.migrate.warn("The { keep: true } option for up.compiler() has been removed. Have the compiler set [up-keep] attribute instead.");const r=e.isString(a)?a:"";for(let e of t)e.setAttribute("up-keep",r)}},up.migrate.targetMacro=function(r,a,p){up.macro(`[${r}]`,(function(u){let n;const o=e.copy(a);(n=u.getAttribute(r))?o["up-target"]=n:o["up-follow"]="",t.setMissingAttrs(u,o),u.removeAttribute(r),null==p||p()}))}},197:()=>{up.macro("[up-tooltip]",(function(e){up.migrate.warn("[up-tooltip] has been deprecated. A [title] was set instead."),up.element.setMissingAttr(e,"title",e.getAttribute("up-tooltip"))}))},480:()=>{up.util.only=function(e,...t){return up.migrate.deprecated("up.util.only(object, ...keys)","up.util.pick(object, keys)"),up.util.pick(e,t)},up.util.except=function(e,...t){return up.migrate.deprecated("up.util.except(object, ...keys)","up.util.omit(object, keys)"),up.util.omit(e,t)},up.util.parseUrl=function(...e){return up.migrate.deprecated("up.util.parseUrl()","up.util.parseURL()"),up.util.parseURL(...e)},up.util.any=function(...e){return up.migrate.deprecated("up.util.any()","up.util.some()"),up.util.some(...e)},up.util.all=function(...e){return up.migrate.deprecated("up.util.all()","up.util.every()"),up.util.every(...e)},up.util.detect=function(...e){return up.migrate.deprecated("up.util.detect()","up.util.find()"),up.util.find(...e)},up.util.select=function(...e){return up.migrate.deprecated("up.util.select()","up.util.filter()"),up.util.filter(...e)},up.util.setTimer=function(...e){return up.migrate.deprecated("up.util.setTimer()","up.util.timer()"),up.util.timer(...e)},up.util.escapeHtml=function(...e){return up.migrate.deprecated("up.util.escapeHtml()","up.util.escapeHTML()"),up.util.escapeHTML(...e)},up.util.selectorForElement=function(...e){return up.migrate.deprecated("up.util.selectorForElement()","up.fragment.toTarget()"),up.fragment.toTarget(...e)},up.util.nextFrame=function(...e){return up.migrate.deprecated("up.util.nextFrame()","up.util.task()"),up.util.task(...e)},up.util.times=function(e,t){up.migrate.deprecated("up.util.times()","a `for` loop");for(let r=0;r<e;r++)t()},up.util.assign=function(...e){return up.migrate.deprecated("up.util.assign()","Object.assign()"),Object.assign(...e)},up.util.values=function(...e){return up.migrate.deprecated("up.util.values()","Object.values()"),Object.values(...e)}},338:()=>{up.migrate.renamedPackage("layout","viewport"),up.migrate.renamedProperty(up.viewport.config,"viewports","viewportSelectors"),up.migrate.renamedProperty(up.viewport.config,"snap","revealSnap"),up.migrate.removedProperty(up.viewport.config,"scrollSpeed"),up.viewport.closest=function(...e){return up.migrate.deprecated("up.viewport.closest()","up.viewport.get()"),up.viewport.get(...e)},up.viewport.scroll=function(e,t,r={}){return(e=up.fragment.get(e,r)).scrollTo(Object.assign(Object.assign({},r),{top:t})),up.migrate.formerlyAsync("up.scroll()")},up.scroll=up.viewport.scroll}},t={};function r(a){var p=t[a];if(void 0!==p)return p.exports;var u=t[a]={exports:{}};return e[a](u,u.exports,r),u.exports}up.framework.startExtension(),r(992),r(480),r(294),r(700),r(394),r(629),r(305),r(354),r(869),r(729),r(969),r(905),r(413),r(69),r(197),r(677),r(885),r(228),r(338),up.framework.stopExtension()})();
|