tao_popover 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/dist/tao.js +449 -347
- data/dist/tao_popover.js +18 -29
- data/lib/assets/javascripts/tao_popover/element.coffee +4 -10
- data/lib/assets/javascripts/tao_popover/trigger.coffee +10 -12
- data/lib/tao_popover/rails/version.rb +1 -1
- data/tao_popover.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 11910f354c5a3281102d2c6793bdc6aa995b5ce2
|
4
|
+
data.tar.gz: 502d748e06c6f3e97dd2c139b9003487800a429c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b4c1c238f6bc82b6926054ebb0bf9618b522bb31cce132c3775d821e7e13f1c1eb1db68529644cbddc593c7d85619992d00c13398378afb922c8c04de28d1452
|
7
|
+
data.tar.gz: 185b7c3e8e969e045e4a255abb770d860603646cafdcdf235c17f62f214789ee4b1e98054d49bff5091516a95e0bfd239fe7ba010980756609523cf6c70f7abc
|
data/dist/tao.js
CHANGED
@@ -5,9 +5,8 @@ Copyright © 2016 Basecamp, LLC
|
|
5
5
|
|
6
6
|
(function(){(function(){(function(){this.Turbolinks={supported:function(){return null!=window.history.pushState&&null!=window.requestAnimationFrame}(),visit:function(e,r){return t.controller.visit(e,r)},clearCache:function(){return t.controller.clearCache()}}}).call(this)}).call(this);var t=this.Turbolinks;(function(){(function(){var e,r;t.copyObject=function(t){var e,r,n;r={};for(e in t)n=t[e],r[e]=n;return r},t.closest=function(t,r){return e.call(t,r)},e=function(){var t,e;return t=document.documentElement,null!=(e=t.closest)?e:function(t){var e;for(e=this;e;){if(e.nodeType===Node.ELEMENT_NODE&&r.call(e,t))return e;e=e.parentNode}}}(),t.defer=function(t){return setTimeout(t,1)},t.dispatch=function(t,e){var r,n,o,i,s;return i=null!=e?e:{},s=i.target,r=i.cancelable,n=i.data,o=document.createEvent("Events"),o.initEvent(t,!0,r===!0),o.data=null!=n?n:{},(null!=s?s:document).dispatchEvent(o),o},t.match=function(t,e){return r.call(t,e)},r=function(){var t,e,r,n;return t=document.documentElement,null!=(e=null!=(r=null!=(n=t.matchesSelector)?n:t.webkitMatchesSelector)?r:t.msMatchesSelector)?e:t.mozMatchesSelector}(),t.uuid=function(){var t,e,r;for(r="",t=e=1;36>=e;t=++e)r+=9===t||14===t||19===t||24===t?"-":15===t?"4":20===t?(Math.floor(4*Math.random())+8).toString(16):Math.floor(15*Math.random()).toString(16);return r}}).call(this),function(){t.Location=function(){function t(t){var e,r;null==t&&(t=""),r=document.createElement("a"),r.href=t.toString(),this.absoluteURL=r.href,e=r.hash.length,2>e?this.requestURL=this.absoluteURL:(this.requestURL=this.absoluteURL.slice(0,-e),this.anchor=r.hash.slice(1))}var e,r,n,o;return t.wrap=function(t){return t instanceof this?t:new this(t)},t.prototype.getOrigin=function(){return this.absoluteURL.split("/",3).join("/")},t.prototype.getPath=function(){var t,e;return null!=(t=null!=(e=this.absoluteURL.match(/\/\/[^\/]*(\/[^?;]*)/))?e[1]:void 0)?t:"/"},t.prototype.getPathComponents=function(){return this.getPath().split("/").slice(1)},t.prototype.getLastPathComponent=function(){return this.getPathComponents().slice(-1)[0]},t.prototype.getExtension=function(){var t,e;return null!=(t=null!=(e=this.getLastPathComponent().match(/\.[^.]*$/))?e[0]:void 0)?t:""},t.prototype.isHTML=function(){return this.getExtension().match(/^(?:|\.(?:htm|html|xhtml))$/)},t.prototype.isPrefixedBy=function(t){var e;return e=r(t),this.isEqualTo(t)||o(this.absoluteURL,e)},t.prototype.isEqualTo=function(t){return this.absoluteURL===(null!=t?t.absoluteURL:void 0)},t.prototype.toCacheKey=function(){return this.requestURL},t.prototype.toJSON=function(){return this.absoluteURL},t.prototype.toString=function(){return this.absoluteURL},t.prototype.valueOf=function(){return this.absoluteURL},r=function(t){return e(t.getOrigin()+t.getPath())},e=function(t){return n(t,"/")?t:t+"/"},o=function(t,e){return t.slice(0,e.length)===e},n=function(t,e){return t.slice(-e.length)===e},t}()}.call(this),function(){var e=function(t,e){return function(){return t.apply(e,arguments)}};t.HttpRequest=function(){function r(r,n,o){this.delegate=r,this.requestCanceled=e(this.requestCanceled,this),this.requestTimedOut=e(this.requestTimedOut,this),this.requestFailed=e(this.requestFailed,this),this.requestLoaded=e(this.requestLoaded,this),this.requestProgressed=e(this.requestProgressed,this),this.url=t.Location.wrap(n).requestURL,this.referrer=t.Location.wrap(o).absoluteURL,this.createXHR()}return r.NETWORK_FAILURE=0,r.TIMEOUT_FAILURE=-1,r.timeout=60,r.prototype.send=function(){var t;return this.xhr&&!this.sent?(this.notifyApplicationBeforeRequestStart(),this.setProgress(0),this.xhr.send(),this.sent=!0,"function"==typeof(t=this.delegate).requestStarted?t.requestStarted():void 0):void 0},r.prototype.cancel=function(){return this.xhr&&this.sent?this.xhr.abort():void 0},r.prototype.requestProgressed=function(t){return t.lengthComputable?this.setProgress(t.loaded/t.total):void 0},r.prototype.requestLoaded=function(){return this.endRequest(function(t){return function(){var e;return 200<=(e=t.xhr.status)&&300>e?t.delegate.requestCompletedWithResponse(t.xhr.responseText,t.xhr.getResponseHeader("Turbolinks-Location")):(t.failed=!0,t.delegate.requestFailedWithStatusCode(t.xhr.status,t.xhr.responseText))}}(this))},r.prototype.requestFailed=function(){return this.endRequest(function(t){return function(){return t.failed=!0,t.delegate.requestFailedWithStatusCode(t.constructor.NETWORK_FAILURE)}}(this))},r.prototype.requestTimedOut=function(){return this.endRequest(function(t){return function(){return t.failed=!0,t.delegate.requestFailedWithStatusCode(t.constructor.TIMEOUT_FAILURE)}}(this))},r.prototype.requestCanceled=function(){return this.endRequest()},r.prototype.notifyApplicationBeforeRequestStart=function(){return t.dispatch("turbolinks:request-start",{data:{url:this.url,xhr:this.xhr}})},r.prototype.notifyApplicationAfterRequestEnd=function(){return t.dispatch("turbolinks:request-end",{data:{url:this.url,xhr:this.xhr}})},r.prototype.createXHR=function(){return this.xhr=new XMLHttpRequest,this.xhr.open("GET",this.url,!0),this.xhr.timeout=1e3*this.constructor.timeout,this.xhr.setRequestHeader("Accept","text/html, application/xhtml+xml"),this.xhr.setRequestHeader("Turbolinks-Referrer",this.referrer),this.xhr.onprogress=this.requestProgressed,this.xhr.onload=this.requestLoaded,this.xhr.onerror=this.requestFailed,this.xhr.ontimeout=this.requestTimedOut,this.xhr.onabort=this.requestCanceled},r.prototype.endRequest=function(t){return this.xhr?(this.notifyApplicationAfterRequestEnd(),null!=t&&t.call(this),this.destroy()):void 0},r.prototype.setProgress=function(t){var e;return this.progress=t,"function"==typeof(e=this.delegate).requestProgressed?e.requestProgressed(this.progress):void 0},r.prototype.destroy=function(){var t;return this.setProgress(1),"function"==typeof(t=this.delegate).requestFinished&&t.requestFinished(),this.delegate=null,this.xhr=null},r}()}.call(this),function(){var e=function(t,e){return function(){return t.apply(e,arguments)}};t.ProgressBar=function(){function t(){this.trickle=e(this.trickle,this),this.stylesheetElement=this.createStylesheetElement(),this.progressElement=this.createProgressElement()}var r;return r=300,t.defaultCSS=".turbolinks-progress-bar {\n position: fixed;\n display: block;\n top: 0;\n left: 0;\n height: 3px;\n background: #0076ff;\n z-index: 9999;\n transition: width "+r+"ms ease-out, opacity "+r/2+"ms "+r/2+"ms ease-in;\n transform: translate3d(0, 0, 0);\n}",t.prototype.show=function(){return this.visible?void 0:(this.visible=!0,this.installStylesheetElement(),this.installProgressElement(),this.startTrickling())},t.prototype.hide=function(){return this.visible&&!this.hiding?(this.hiding=!0,this.fadeProgressElement(function(t){return function(){return t.uninstallProgressElement(),t.stopTrickling(),t.visible=!1,t.hiding=!1}}(this))):void 0},t.prototype.setValue=function(t){return this.value=t,this.refresh()},t.prototype.installStylesheetElement=function(){return document.head.insertBefore(this.stylesheetElement,document.head.firstChild)},t.prototype.installProgressElement=function(){return this.progressElement.style.width=0,this.progressElement.style.opacity=1,document.documentElement.insertBefore(this.progressElement,document.body),this.refresh()},t.prototype.fadeProgressElement=function(t){return this.progressElement.style.opacity=0,setTimeout(t,1.5*r)},t.prototype.uninstallProgressElement=function(){return this.progressElement.parentNode?document.documentElement.removeChild(this.progressElement):void 0},t.prototype.startTrickling=function(){return null!=this.trickleInterval?this.trickleInterval:this.trickleInterval=setInterval(this.trickle,r)},t.prototype.stopTrickling=function(){return clearInterval(this.trickleInterval),this.trickleInterval=null},t.prototype.trickle=function(){return this.setValue(this.value+Math.random()/100)},t.prototype.refresh=function(){return requestAnimationFrame(function(t){return function(){return t.progressElement.style.width=10+90*t.value+"%"}}(this))},t.prototype.createStylesheetElement=function(){var t;return t=document.createElement("style"),t.type="text/css",t.textContent=this.constructor.defaultCSS,t},t.prototype.createProgressElement=function(){var t;return t=document.createElement("div"),t.className="turbolinks-progress-bar",t},t}()}.call(this),function(){var e=function(t,e){return function(){return t.apply(e,arguments)}};t.BrowserAdapter=function(){function r(r){this.controller=r,this.showProgressBar=e(this.showProgressBar,this),this.progressBar=new t.ProgressBar}var n,o,i,s;return s=t.HttpRequest,n=s.NETWORK_FAILURE,i=s.TIMEOUT_FAILURE,o=500,r.prototype.visitProposedToLocationWithAction=function(t,e){return this.controller.startVisitToLocationWithAction(t,e)},r.prototype.visitStarted=function(t){return t.issueRequest(),t.changeHistory(),t.loadCachedSnapshot()},r.prototype.visitRequestStarted=function(t){return this.progressBar.setValue(0),t.hasCachedSnapshot()||"restore"!==t.action?this.showProgressBarAfterDelay():this.showProgressBar()},r.prototype.visitRequestProgressed=function(t){return this.progressBar.setValue(t.progress)},r.prototype.visitRequestCompleted=function(t){return t.loadResponse()},r.prototype.visitRequestFailedWithStatusCode=function(t,e){switch(e){case n:case i:return this.reload();default:return t.loadResponse()}},r.prototype.visitRequestFinished=function(t){return this.hideProgressBar()},r.prototype.visitCompleted=function(t){return t.followRedirect()},r.prototype.pageInvalidated=function(){return this.reload()},r.prototype.showProgressBarAfterDelay=function(){return this.progressBarTimeout=setTimeout(this.showProgressBar,o)},r.prototype.showProgressBar=function(){return this.progressBar.show()},r.prototype.hideProgressBar=function(){return this.progressBar.hide(),clearTimeout(this.progressBarTimeout)},r.prototype.reload=function(){return window.location.reload()},r}()}.call(this),function(){var e,r=function(t,e){return function(){return t.apply(e,arguments)}};e=!1,addEventListener("load",function(){return t.defer(function(){return e=!0})},!1),t.History=function(){function n(t){this.delegate=t,this.onPopState=r(this.onPopState,this)}return n.prototype.start=function(){return this.started?void 0:(addEventListener("popstate",this.onPopState,!1),this.started=!0)},n.prototype.stop=function(){return this.started?(removeEventListener("popstate",this.onPopState,!1),this.started=!1):void 0},n.prototype.push=function(e,r){return e=t.Location.wrap(e),this.update("push",e,r)},n.prototype.replace=function(e,r){return e=t.Location.wrap(e),this.update("replace",e,r)},n.prototype.onPopState=function(e){var r,n,o,i;return this.shouldHandlePopState()&&(i=null!=(n=e.state)?n.turbolinks:void 0)?(r=t.Location.wrap(window.location),o=i.restorationIdentifier,this.delegate.historyPoppedToLocationWithRestorationIdentifier(r,o)):void 0},n.prototype.shouldHandlePopState=function(){return e===!0},n.prototype.update=function(t,e,r){var n;return n={turbolinks:{restorationIdentifier:r}},history[t+"State"](n,null,e)},n}()}.call(this),function(){t.Snapshot=function(){function e(t){var e,r;r=t.head,e=t.body,this.head=null!=r?r:document.createElement("head"),this.body=null!=e?e:document.createElement("body")}return e.wrap=function(t){return t instanceof this?t:this.fromHTML(t)},e.fromHTML=function(t){var e;return e=document.createElement("html"),e.innerHTML=t,this.fromElement(e)},e.fromElement=function(t){return new this({head:t.querySelector("head"),body:t.querySelector("body")})},e.prototype.clone=function(){return new e({head:this.head.cloneNode(!0),body:this.body.cloneNode(!0)})},e.prototype.getRootLocation=function(){var e,r;return r=null!=(e=this.getSetting("root"))?e:"/",new t.Location(r)},e.prototype.getCacheControlValue=function(){return this.getSetting("cache-control")},e.prototype.hasAnchor=function(t){try{return null!=this.body.querySelector("[id='"+t+"']")}catch(e){}},e.prototype.isPreviewable=function(){return"no-preview"!==this.getCacheControlValue()},e.prototype.isCacheable=function(){return"no-cache"!==this.getCacheControlValue()},e.prototype.getSetting=function(t){var e,r;return r=this.head.querySelectorAll("meta[name='turbolinks-"+t+"']"),e=r[r.length-1],null!=e?e.getAttribute("content"):void 0},e}()}.call(this),function(){var e=[].slice;t.Renderer=function(){function t(){}var r;return t.render=function(){var t,r,n,o;return n=arguments[0],r=arguments[1],t=3<=arguments.length?e.call(arguments,2):[],o=function(t,e,r){r.prototype=t.prototype;var n=new r,o=t.apply(n,e);return Object(o)===o?o:n}(this,t,function(){}),o.delegate=n,o.render(r),o},t.prototype.renderView=function(t){return this.delegate.viewWillRender(this.newBody),t(),this.delegate.viewRendered(this.newBody)},t.prototype.invalidateView=function(){return this.delegate.viewInvalidated()},t.prototype.createScriptElement=function(t){var e;return"false"===t.getAttribute("data-turbolinks-eval")?t:(e=document.createElement("script"),e.textContent=t.textContent,r(e,t),e)},r=function(t,e){var r,n,o,i,s,a,u;for(i=e.attributes,a=[],r=0,n=i.length;n>r;r++)s=i[r],o=s.name,u=s.value,a.push(t.setAttribute(o,u));return a},t}()}.call(this),function(){t.HeadDetails=function(){function t(t){var e,r,i,s,a,u,c;for(this.element=t,this.elements={},c=this.element.childNodes,s=0,u=c.length;u>s;s++)i=c[s],i.nodeType===Node.ELEMENT_NODE&&(a=i.outerHTML,r=null!=(e=this.elements)[a]?e[a]:e[a]={type:o(i),tracked:n(i),elements:[]},r.elements.push(i))}var e,r,n,o;return t.prototype.hasElementWithKey=function(t){return t in this.elements},t.prototype.getTrackedElementSignature=function(){var t,e;return function(){var r,n;r=this.elements,n=[];for(t in r)e=r[t].tracked,e&&n.push(t);return n}.call(this).join("")},t.prototype.getScriptElementsNotInDetails=function(t){return this.getElementsMatchingTypeNotInDetails("script",t)},t.prototype.getStylesheetElementsNotInDetails=function(t){return this.getElementsMatchingTypeNotInDetails("stylesheet",t)},t.prototype.getElementsMatchingTypeNotInDetails=function(t,e){var r,n,o,i,s,a;o=this.elements,s=[];for(n in o)i=o[n],a=i.type,r=i.elements,a!==t||e.hasElementWithKey(n)||s.push(r[0]);return s},t.prototype.getProvisionalElements=function(){var t,e,r,n,o,i,s;r=[],n=this.elements;for(e in n)o=n[e],s=o.type,i=o.tracked,t=o.elements,null!=s||i?t.length>1&&r.push.apply(r,t.slice(1)):r.push.apply(r,t);return r},o=function(t){return e(t)?"script":r(t)?"stylesheet":void 0},n=function(t){return"reload"===t.getAttribute("data-turbolinks-track")},e=function(t){var e;return e=t.tagName.toLowerCase(),"script"===e},r=function(t){var e;return e=t.tagName.toLowerCase(),"style"===e||"link"===e&&"stylesheet"===t.getAttribute("rel")},t}()}.call(this),function(){var e=function(t,e){function n(){this.constructor=t}for(var o in e)r.call(e,o)&&(t[o]=e[o]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},r={}.hasOwnProperty;t.SnapshotRenderer=function(r){function n(e,r){this.currentSnapshot=e,this.newSnapshot=r,this.currentHeadDetails=new t.HeadDetails(this.currentSnapshot.head),this.newHeadDetails=new t.HeadDetails(this.newSnapshot.head),this.newBody=this.newSnapshot.body}return e(n,r),n.prototype.render=function(t){return this.trackedElementsAreIdentical()?(this.mergeHead(),this.renderView(function(e){return function(){return e.replaceBody(),e.focusFirstAutofocusableElement(),t()}}(this))):this.invalidateView()},n.prototype.mergeHead=function(){return this.copyNewHeadStylesheetElements(),this.copyNewHeadScriptElements(),this.removeCurrentHeadProvisionalElements(),this.copyNewHeadProvisionalElements()},n.prototype.replaceBody=function(){return this.activateBodyScriptElements(),this.importBodyPermanentElements(),this.assignNewBody()},n.prototype.trackedElementsAreIdentical=function(){return this.currentHeadDetails.getTrackedElementSignature()===this.newHeadDetails.getTrackedElementSignature()},n.prototype.copyNewHeadStylesheetElements=function(){var t,e,r,n,o;for(n=this.getNewHeadStylesheetElements(),o=[],e=0,r=n.length;r>e;e++)t=n[e],o.push(document.head.appendChild(t));return o},n.prototype.copyNewHeadScriptElements=function(){var t,e,r,n,o;for(n=this.getNewHeadScriptElements(),o=[],e=0,r=n.length;r>e;e++)t=n[e],o.push(document.head.appendChild(this.createScriptElement(t)));return o},n.prototype.removeCurrentHeadProvisionalElements=function(){var t,e,r,n,o;for(n=this.getCurrentHeadProvisionalElements(),o=[],e=0,r=n.length;r>e;e++)t=n[e],o.push(document.head.removeChild(t));return o},n.prototype.copyNewHeadProvisionalElements=function(){var t,e,r,n,o;for(n=this.getNewHeadProvisionalElements(),o=[],e=0,r=n.length;r>e;e++)t=n[e],o.push(document.head.appendChild(t));return o},n.prototype.importBodyPermanentElements=function(){var t,e,r,n,o,i;for(n=this.getNewBodyPermanentElements(),i=[],e=0,r=n.length;r>e;e++)o=n[e],(t=this.findCurrentBodyPermanentElement(o))?i.push(o.parentNode.replaceChild(t,o)):i.push(void 0);return i},n.prototype.activateBodyScriptElements=function(){var t,e,r,n,o,i;for(n=this.getNewBodyScriptElements(),i=[],e=0,r=n.length;r>e;e++)o=n[e],t=this.createScriptElement(o),i.push(o.parentNode.replaceChild(t,o));return i},n.prototype.assignNewBody=function(){return document.body=this.newBody},n.prototype.focusFirstAutofocusableElement=function(){var t;return null!=(t=this.findFirstAutofocusableElement())?t.focus():void 0},n.prototype.getNewHeadStylesheetElements=function(){return this.newHeadDetails.getStylesheetElementsNotInDetails(this.currentHeadDetails)},n.prototype.getNewHeadScriptElements=function(){return this.newHeadDetails.getScriptElementsNotInDetails(this.currentHeadDetails)},n.prototype.getCurrentHeadProvisionalElements=function(){return this.currentHeadDetails.getProvisionalElements()},n.prototype.getNewHeadProvisionalElements=function(){return this.newHeadDetails.getProvisionalElements()},n.prototype.getNewBodyPermanentElements=function(){return this.newBody.querySelectorAll("[id][data-turbolinks-permanent]")},n.prototype.findCurrentBodyPermanentElement=function(t){return document.body.querySelector("#"+t.id+"[data-turbolinks-permanent]")},n.prototype.getNewBodyScriptElements=function(){return this.newBody.querySelectorAll("script")},n.prototype.findFirstAutofocusableElement=function(){return document.body.querySelector("[autofocus]")},n}(t.Renderer)}.call(this),function(){var e=function(t,e){function n(){this.constructor=t}for(var o in e)r.call(e,o)&&(t[o]=e[o]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},r={}.hasOwnProperty;t.ErrorRenderer=function(t){function r(t){this.html=t}return e(r,t),r.prototype.render=function(t){return this.renderView(function(e){return function(){return e.replaceDocumentHTML(),e.activateBodyScriptElements(),t()}}(this))},r.prototype.replaceDocumentHTML=function(){return document.documentElement.innerHTML=this.html},r.prototype.activateBodyScriptElements=function(){var t,e,r,n,o,i;for(n=this.getScriptElements(),i=[],e=0,r=n.length;r>e;e++)o=n[e],t=this.createScriptElement(o),i.push(o.parentNode.replaceChild(t,o));return i},r.prototype.getScriptElements=function(){return document.documentElement.querySelectorAll("script")},r}(t.Renderer)}.call(this),function(){t.View=function(){function e(t){this.delegate=t,this.element=document.documentElement}return e.prototype.getRootLocation=function(){return this.getSnapshot().getRootLocation()},e.prototype.getSnapshot=function(){return t.Snapshot.fromElement(this.element)},e.prototype.render=function(t,e){var r,n,o;return o=t.snapshot,r=t.error,n=t.isPreview,this.markAsPreview(n),null!=o?this.renderSnapshot(o,e):this.renderError(r,e)},e.prototype.markAsPreview=function(t){return t?this.element.setAttribute("data-turbolinks-preview",""):this.element.removeAttribute("data-turbolinks-preview")},e.prototype.renderSnapshot=function(e,r){return t.SnapshotRenderer.render(this.delegate,r,this.getSnapshot(),t.Snapshot.wrap(e))},e.prototype.renderError=function(e,r){return t.ErrorRenderer.render(this.delegate,r,e)},e}()}.call(this),function(){var e=function(t,e){return function(){return t.apply(e,arguments)}};t.ScrollManager=function(){function t(t){this.delegate=t,this.onScroll=e(this.onScroll,this)}return t.prototype.start=function(){return this.started?void 0:(addEventListener("scroll",this.onScroll,!1),this.onScroll(),this.started=!0)},t.prototype.stop=function(){return this.started?(removeEventListener("scroll",this.onScroll,!1),this.started=!1):void 0},t.prototype.scrollToElement=function(t){return t.scrollIntoView()},t.prototype.scrollToPosition=function(t){var e,r;return e=t.x,r=t.y,window.scrollTo(e,r)},t.prototype.onScroll=function(t){return this.updatePosition({x:window.pageXOffset,y:window.pageYOffset})},t.prototype.updatePosition=function(t){var e;return this.position=t,null!=(e=this.delegate)?e.scrollPositionChanged(this.position):void 0},t}()}.call(this),function(){t.SnapshotCache=function(){function e(t){this.size=t,this.keys=[],this.snapshots={}}var r;return e.prototype.has=function(t){var e;return e=r(t),e in this.snapshots},e.prototype.get=function(t){var e;if(this.has(t))return e=this.read(t),this.touch(t),e},e.prototype.put=function(t,e){return this.write(t,e),this.touch(t),e},e.prototype.read=function(t){var e;return e=r(t),this.snapshots[e]},e.prototype.write=function(t,e){var n;return n=r(t),this.snapshots[n]=e},e.prototype.touch=function(t){var e,n;return n=r(t),e=this.keys.indexOf(n),e>-1&&this.keys.splice(e,1),this.keys.unshift(n),this.trim()},e.prototype.trim=function(){var t,e,r,n,o;for(n=this.keys.splice(this.size),o=[],t=0,r=n.length;r>t;t++)e=n[t],o.push(delete this.snapshots[e]);return o},r=function(e){return t.Location.wrap(e).toCacheKey()},e}()}.call(this),function(){var e=function(t,e){return function(){return t.apply(e,arguments)}};t.Visit=function(){function r(r,n,o){this.controller=r,this.action=o,this.performScroll=e(this.performScroll,this),this.identifier=t.uuid(),this.location=t.Location.wrap(n),this.adapter=this.controller.adapter,this.state="initialized",this.timingMetrics={}}var n;return r.prototype.start=function(){return"initialized"===this.state?(this.recordTimingMetric("visitStart"),this.state="started",this.adapter.visitStarted(this)):void 0},r.prototype.cancel=function(){var t;return"started"===this.state?(null!=(t=this.request)&&t.cancel(),this.cancelRender(),this.state="canceled"):void 0},r.prototype.complete=function(){var t;return"started"===this.state?(this.recordTimingMetric("visitEnd"),this.state="completed","function"==typeof(t=this.adapter).visitCompleted&&t.visitCompleted(this),this.controller.visitCompleted(this)):void 0},r.prototype.fail=function(){var t;return"started"===this.state?(this.state="failed","function"==typeof(t=this.adapter).visitFailed?t.visitFailed(this):void 0):void 0},r.prototype.changeHistory=function(){var t,e;return this.historyChanged?void 0:(t=this.location.isEqualTo(this.referrer)?"replace":this.action,e=n(t),this.controller[e](this.location,this.restorationIdentifier),this.historyChanged=!0)},r.prototype.issueRequest=function(){return this.shouldIssueRequest()&&null==this.request?(this.progress=0,this.request=new t.HttpRequest(this,this.location,this.referrer),this.request.send()):void 0},r.prototype.getCachedSnapshot=function(){var t;return!(t=this.controller.getCachedSnapshotForLocation(this.location))||null!=this.location.anchor&&!t.hasAnchor(this.location.anchor)||"restore"!==this.action&&!t.isPreviewable()?void 0:t},r.prototype.hasCachedSnapshot=function(){return null!=this.getCachedSnapshot()},r.prototype.loadCachedSnapshot=function(){var t,e;return(e=this.getCachedSnapshot())?(t=this.shouldIssueRequest(),this.render(function(){var r;return this.cacheSnapshot(),this.controller.render({snapshot:e,isPreview:t},this.performScroll),"function"==typeof(r=this.adapter).visitRendered&&r.visitRendered(this),t?void 0:this.complete()})):void 0},r.prototype.loadResponse=function(){return null!=this.response?this.render(function(){var t,e;return this.cacheSnapshot(),this.request.failed?(this.controller.render({error:this.response},this.performScroll),"function"==typeof(t=this.adapter).visitRendered&&t.visitRendered(this),this.fail()):(this.controller.render({snapshot:this.response},this.performScroll),"function"==typeof(e=this.adapter).visitRendered&&e.visitRendered(this),this.complete())}):void 0},r.prototype.followRedirect=function(){return this.redirectedToLocation&&!this.followedRedirect?(this.location=this.redirectedToLocation,this.controller.replaceHistoryWithLocationAndRestorationIdentifier(this.redirectedToLocation,this.restorationIdentifier),this.followedRedirect=!0):void 0},r.prototype.requestStarted=function(){var t;return this.recordTimingMetric("requestStart"),"function"==typeof(t=this.adapter).visitRequestStarted?t.visitRequestStarted(this):void 0},r.prototype.requestProgressed=function(t){var e;return this.progress=t,"function"==typeof(e=this.adapter).visitRequestProgressed?e.visitRequestProgressed(this):void 0},r.prototype.requestCompletedWithResponse=function(e,r){return this.response=e,null!=r&&(this.redirectedToLocation=t.Location.wrap(r)),this.adapter.visitRequestCompleted(this)},r.prototype.requestFailedWithStatusCode=function(t,e){return this.response=e,this.adapter.visitRequestFailedWithStatusCode(this,t)},r.prototype.requestFinished=function(){var t;return this.recordTimingMetric("requestEnd"),"function"==typeof(t=this.adapter).visitRequestFinished?t.visitRequestFinished(this):void 0},r.prototype.performScroll=function(){return this.scrolled?void 0:("restore"===this.action?this.scrollToRestoredPosition()||this.scrollToTop():this.scrollToAnchor()||this.scrollToTop(),this.scrolled=!0)},r.prototype.scrollToRestoredPosition=function(){var t,e;return t=null!=(e=this.restorationData)?e.scrollPosition:void 0,null!=t?(this.controller.scrollToPosition(t),!0):void 0},r.prototype.scrollToAnchor=function(){return null!=this.location.anchor?(this.controller.scrollToAnchor(this.location.anchor),!0):void 0},r.prototype.scrollToTop=function(){return this.controller.scrollToPosition({x:0,y:0})},r.prototype.recordTimingMetric=function(t){var e;return null!=(e=this.timingMetrics)[t]?e[t]:e[t]=(new Date).getTime()},r.prototype.getTimingMetrics=function(){return t.copyObject(this.timingMetrics)},n=function(t){switch(t){case"replace":return"replaceHistoryWithLocationAndRestorationIdentifier";case"advance":case"restore":return"pushHistoryWithLocationAndRestorationIdentifier"}},r.prototype.shouldIssueRequest=function(){return"restore"===this.action?!this.hasCachedSnapshot():!0},r.prototype.cacheSnapshot=function(){return this.snapshotCached?void 0:(this.controller.cacheSnapshot(),this.snapshotCached=!0)},r.prototype.render=function(t){return this.cancelRender(),this.frame=requestAnimationFrame(function(e){return function(){return e.frame=null,t.call(e)}}(this))},r.prototype.cancelRender=function(){return this.frame?cancelAnimationFrame(this.frame):void 0},r}()}.call(this),function(){var e=function(t,e){return function(){return t.apply(e,arguments)}};t.Controller=function(){function r(){this.clickBubbled=e(this.clickBubbled,this),this.clickCaptured=e(this.clickCaptured,this),this.pageLoaded=e(this.pageLoaded,this),this.history=new t.History(this),this.view=new t.View(this),this.scrollManager=new t.ScrollManager(this),this.restorationData={},this.clearCache()}return r.prototype.start=function(){return t.supported&&!this.started?(addEventListener("click",this.clickCaptured,!0),addEventListener("DOMContentLoaded",this.pageLoaded,!1),this.scrollManager.start(),this.startHistory(),this.started=!0,this.enabled=!0):void 0},r.prototype.disable=function(){return this.enabled=!1},r.prototype.stop=function(){return this.started?(removeEventListener("click",this.clickCaptured,!0),removeEventListener("DOMContentLoaded",this.pageLoaded,!1),this.scrollManager.stop(),this.stopHistory(),this.started=!1):void 0},r.prototype.clearCache=function(){return this.cache=new t.SnapshotCache(10)},r.prototype.visit=function(e,r){var n,o;return null==r&&(r={}),e=t.Location.wrap(e),this.applicationAllowsVisitingLocation(e)?this.locationIsVisitable(e)?(n=null!=(o=r.action)?o:"advance",this.adapter.visitProposedToLocationWithAction(e,n)):window.location=e:void 0},r.prototype.startVisitToLocationWithAction=function(e,r,n){var o;return t.supported?(o=this.getRestorationDataForIdentifier(n),this.startVisit(e,r,{restorationData:o})):window.location=e},r.prototype.startHistory=function(){return this.location=t.Location.wrap(window.location),this.restorationIdentifier=t.uuid(),this.history.start(),this.history.replace(this.location,this.restorationIdentifier)},r.prototype.stopHistory=function(){return this.history.stop()},r.prototype.pushHistoryWithLocationAndRestorationIdentifier=function(e,r){return this.restorationIdentifier=r,this.location=t.Location.wrap(e),this.history.push(this.location,this.restorationIdentifier)},r.prototype.replaceHistoryWithLocationAndRestorationIdentifier=function(e,r){return this.restorationIdentifier=r,this.location=t.Location.wrap(e),this.history.replace(this.location,this.restorationIdentifier)},r.prototype.historyPoppedToLocationWithRestorationIdentifier=function(e,r){var n;return this.restorationIdentifier=r,this.enabled?(n=this.getRestorationDataForIdentifier(this.restorationIdentifier),this.startVisit(e,"restore",{restorationIdentifier:this.restorationIdentifier,restorationData:n,historyChanged:!0}),this.location=t.Location.wrap(e)):this.adapter.pageInvalidated()},r.prototype.getCachedSnapshotForLocation=function(t){var e;return e=this.cache.get(t),e?e.clone():void 0},r.prototype.shouldCacheSnapshot=function(){return this.view.getSnapshot().isCacheable()},r.prototype.cacheSnapshot=function(){var t;return this.shouldCacheSnapshot()?(this.notifyApplicationBeforeCachingSnapshot(),t=this.view.getSnapshot(),this.cache.put(this.lastRenderedLocation,t.clone())):void 0},r.prototype.scrollToAnchor=function(t){var e;return(e=document.getElementById(t))?this.scrollToElement(e):this.scrollToPosition({x:0,y:0})},r.prototype.scrollToElement=function(t){return this.scrollManager.scrollToElement(t)},r.prototype.scrollToPosition=function(t){return this.scrollManager.scrollToPosition(t)},r.prototype.scrollPositionChanged=function(t){var e;return e=this.getCurrentRestorationData(),e.scrollPosition=t},r.prototype.render=function(t,e){return this.view.render(t,e)},r.prototype.viewInvalidated=function(){return this.adapter.pageInvalidated()},r.prototype.viewWillRender=function(t){return this.notifyApplicationBeforeRender(t)},r.prototype.viewRendered=function(){return this.lastRenderedLocation=this.currentVisit.location,this.notifyApplicationAfterRender()},r.prototype.pageLoaded=function(){return this.lastRenderedLocation=this.location,this.notifyApplicationAfterPageLoad()},r.prototype.clickCaptured=function(){return removeEventListener("click",this.clickBubbled,!1),addEventListener("click",this.clickBubbled,!1)},r.prototype.clickBubbled=function(t){var e,r,n;return this.enabled&&this.clickEventIsSignificant(t)&&(r=this.getVisitableLinkForNode(t.target))&&(n=this.getVisitableLocationForLink(r))&&this.applicationAllowsFollowingLinkToLocation(r,n)?(t.preventDefault(),e=this.getActionForLink(r),this.visit(n,{action:e})):void 0},r.prototype.applicationAllowsFollowingLinkToLocation=function(t,e){var r;return r=this.notifyApplicationAfterClickingLinkToLocation(t,e),!r.defaultPrevented},r.prototype.applicationAllowsVisitingLocation=function(t){var e;return e=this.notifyApplicationBeforeVisitingLocation(t),!e.defaultPrevented},r.prototype.notifyApplicationAfterClickingLinkToLocation=function(e,r){return t.dispatch("turbolinks:click",{target:e,data:{url:r.absoluteURL},cancelable:!0})},r.prototype.notifyApplicationBeforeVisitingLocation=function(e){return t.dispatch("turbolinks:before-visit",{data:{url:e.absoluteURL},cancelable:!0})},r.prototype.notifyApplicationAfterVisitingLocation=function(e){return t.dispatch("turbolinks:visit",{data:{url:e.absoluteURL}})},r.prototype.notifyApplicationBeforeCachingSnapshot=function(){return t.dispatch("turbolinks:before-cache")},r.prototype.notifyApplicationBeforeRender=function(e){return t.dispatch("turbolinks:before-render",{data:{newBody:e}})},r.prototype.notifyApplicationAfterRender=function(){return t.dispatch("turbolinks:render")},r.prototype.notifyApplicationAfterPageLoad=function(e){return null==e&&(e={}),t.dispatch("turbolinks:load",{data:{url:this.location.absoluteURL,timing:e}})},r.prototype.startVisit=function(t,e,r){var n;return null!=(n=this.currentVisit)&&n.cancel(),this.currentVisit=this.createVisit(t,e,r),this.currentVisit.start(),this.notifyApplicationAfterVisitingLocation(t)},r.prototype.createVisit=function(e,r,n){
|
7
7
|
var o,i,s,a,u;return i=null!=n?n:{},a=i.restorationIdentifier,s=i.restorationData,o=i.historyChanged,u=new t.Visit(this,e,r),u.restorationIdentifier=null!=a?a:t.uuid(),u.restorationData=t.copyObject(s),u.historyChanged=o,u.referrer=this.location,u},r.prototype.visitCompleted=function(t){return this.notifyApplicationAfterPageLoad(t.getTimingMetrics())},r.prototype.clickEventIsSignificant=function(t){return!(t.defaultPrevented||t.target.isContentEditable||t.which>1||t.altKey||t.ctrlKey||t.metaKey||t.shiftKey)},r.prototype.getVisitableLinkForNode=function(e){return this.nodeIsVisitable(e)?t.closest(e,"a[href]:not([target])"):void 0},r.prototype.getVisitableLocationForLink=function(e){var r;return r=new t.Location(e.getAttribute("href")),this.locationIsVisitable(r)?r:void 0},r.prototype.getActionForLink=function(t){var e;return null!=(e=t.getAttribute("data-turbolinks-action"))?e:"advance"},r.prototype.nodeIsVisitable=function(e){var r;return(r=t.closest(e,"[data-turbolinks]"))?"false"!==r.getAttribute("data-turbolinks"):!0},r.prototype.locationIsVisitable=function(t){return t.isPrefixedBy(this.view.getRootLocation())&&t.isHTML()},r.prototype.getCurrentRestorationData=function(){return this.getRestorationDataForIdentifier(this.restorationIdentifier)},r.prototype.getRestorationDataForIdentifier=function(t){var e;return null!=(e=this.restorationData)[t]?e[t]:e[t]={}},r}()}.call(this),function(){var e,r,n;t.start=function(){return r()?(null==t.controller&&(t.controller=e()),t.controller.start()):void 0},r=function(){return null==window.Turbolinks&&(window.Turbolinks=t),n()},e=function(){var e;return e=new t.Controller,e.adapter=new t.BrowserAdapter(e),e},n=function(){return window.Turbolinks===t},n()&&t.start()}.call(this)}).call(this),"object"==typeof module&&module.exports?module.exports=t:"function"==typeof define&&define.amd&&define(t)}).call(this);
|
8
|
-
/*eslint-disable no-unused-vars*/
|
9
8
|
/*!
|
10
|
-
* jQuery JavaScript Library v3.1.
|
9
|
+
* jQuery JavaScript Library v3.1.1
|
11
10
|
* https://jquery.com/
|
12
11
|
*
|
13
12
|
* Includes Sizzle.js
|
@@ -17,7 +16,7 @@ var o,i,s,a,u;return i=null!=n?n:{},a=i.restorationIdentifier,s=i.restorationDat
|
|
17
16
|
* Released under the MIT license
|
18
17
|
* https://jquery.org/license
|
19
18
|
*
|
20
|
-
* Date: 2016-
|
19
|
+
* Date: 2016-09-22T22:30Z
|
21
20
|
*/
|
22
21
|
|
23
22
|
( function( global, factory ) {
|
@@ -91,13 +90,13 @@ var support = {};
|
|
91
90
|
doc.head.appendChild( script ).parentNode.removeChild( script );
|
92
91
|
}
|
93
92
|
/* global Symbol */
|
94
|
-
// Defining this global in .eslintrc would create a danger of using the global
|
93
|
+
// Defining this global in .eslintrc.json would create a danger of using the global
|
95
94
|
// unguarded in another place, it seems safer to define global only for this module
|
96
95
|
|
97
96
|
|
98
97
|
|
99
98
|
var
|
100
|
-
version = "3.1.
|
99
|
+
version = "3.1.1",
|
101
100
|
|
102
101
|
// Define a local copy of jQuery
|
103
102
|
jQuery = function( selector, context ) {
|
@@ -137,13 +136,14 @@ jQuery.fn = jQuery.prototype = {
|
|
137
136
|
// Get the Nth element in the matched element set OR
|
138
137
|
// Get the whole matched element set as a clean array
|
139
138
|
get: function( num ) {
|
140
|
-
return num != null ?
|
141
139
|
|
142
|
-
|
143
|
-
|
140
|
+
// Return all the elements in a clean array
|
141
|
+
if ( num == null ) {
|
142
|
+
return slice.call( this );
|
143
|
+
}
|
144
144
|
|
145
|
-
|
146
|
-
|
145
|
+
// Return just the one element from the set
|
146
|
+
return num < 0 ? this[ num + this.length ] : this[ num ];
|
147
147
|
},
|
148
148
|
|
149
149
|
// Take an array of elements and push it onto the stack
|
@@ -551,14 +551,14 @@ function isArrayLike( obj ) {
|
|
551
551
|
}
|
552
552
|
var Sizzle =
|
553
553
|
/*!
|
554
|
-
* Sizzle CSS Selector Engine v2.3.
|
554
|
+
* Sizzle CSS Selector Engine v2.3.3
|
555
555
|
* https://sizzlejs.com/
|
556
556
|
*
|
557
557
|
* Copyright jQuery Foundation and other contributors
|
558
558
|
* Released under the MIT license
|
559
559
|
* http://jquery.org/license
|
560
560
|
*
|
561
|
-
* Date: 2016-
|
561
|
+
* Date: 2016-08-08
|
562
562
|
*/
|
563
563
|
(function( window ) {
|
564
564
|
|
@@ -704,7 +704,7 @@ var i,
|
|
704
704
|
|
705
705
|
// CSS string/identifier serialization
|
706
706
|
// https://drafts.csswg.org/cssom/#common-serializing-idioms
|
707
|
-
rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\
|
707
|
+
rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,
|
708
708
|
fcssescape = function( ch, asCodePoint ) {
|
709
709
|
if ( asCodePoint ) {
|
710
710
|
|
@@ -731,7 +731,7 @@ var i,
|
|
731
731
|
|
732
732
|
disabledAncestor = addCombinator(
|
733
733
|
function( elem ) {
|
734
|
-
return elem.disabled === true;
|
734
|
+
return elem.disabled === true && ("form" in elem || "label" in elem);
|
735
735
|
},
|
736
736
|
{ dir: "parentNode", next: "legend" }
|
737
737
|
);
|
@@ -1017,26 +1017,54 @@ function createButtonPseudo( type ) {
|
|
1017
1017
|
* @param {Boolean} disabled true for :disabled; false for :enabled
|
1018
1018
|
*/
|
1019
1019
|
function createDisabledPseudo( disabled ) {
|
1020
|
-
|
1021
|
-
//
|
1022
|
-
// not IE: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable
|
1020
|
+
|
1021
|
+
// Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable
|
1023
1022
|
return function( elem ) {
|
1024
1023
|
|
1025
|
-
//
|
1026
|
-
|
1027
|
-
|
1024
|
+
// Only certain elements can match :enabled or :disabled
|
1025
|
+
// https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled
|
1026
|
+
// https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled
|
1027
|
+
if ( "form" in elem ) {
|
1028
|
+
|
1029
|
+
// Check for inherited disabledness on relevant non-disabled elements:
|
1030
|
+
// * listed form-associated elements in a disabled fieldset
|
1031
|
+
// https://html.spec.whatwg.org/multipage/forms.html#category-listed
|
1032
|
+
// https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled
|
1033
|
+
// * option elements in a disabled optgroup
|
1034
|
+
// https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled
|
1035
|
+
// All such elements have a "form" property.
|
1036
|
+
if ( elem.parentNode && elem.disabled === false ) {
|
1037
|
+
|
1038
|
+
// Option elements defer to a parent optgroup if present
|
1039
|
+
if ( "label" in elem ) {
|
1040
|
+
if ( "label" in elem.parentNode ) {
|
1041
|
+
return elem.parentNode.disabled === disabled;
|
1042
|
+
} else {
|
1043
|
+
return elem.disabled === disabled;
|
1044
|
+
}
|
1045
|
+
}
|
1028
1046
|
|
1029
|
-
|
1030
|
-
|
1031
|
-
|
1032
|
-
// Ancestry is covered for us
|
1033
|
-
elem.isDisabled === disabled ||
|
1047
|
+
// Support: IE 6 - 11
|
1048
|
+
// Use the isDisabled shortcut property to check for disabled fieldset ancestors
|
1049
|
+
return elem.isDisabled === disabled ||
|
1034
1050
|
|
1035
|
-
|
1036
|
-
|
1037
|
-
|
1038
|
-
|
1039
|
-
|
1051
|
+
// Where there is no isDisabled, check manually
|
1052
|
+
/* jshint -W018 */
|
1053
|
+
elem.isDisabled !== !disabled &&
|
1054
|
+
disabledAncestor( elem ) === disabled;
|
1055
|
+
}
|
1056
|
+
|
1057
|
+
return elem.disabled === disabled;
|
1058
|
+
|
1059
|
+
// Try to winnow out elements that can't be disabled before trusting the disabled property.
|
1060
|
+
// Some victims get caught in our net (label, legend, menu, track), but it shouldn't
|
1061
|
+
// even exist on them, let alone have a boolean value.
|
1062
|
+
} else if ( "label" in elem ) {
|
1063
|
+
return elem.disabled === disabled;
|
1064
|
+
}
|
1065
|
+
|
1066
|
+
// Remaining elements are neither :enabled nor :disabled
|
1067
|
+
return false;
|
1040
1068
|
};
|
1041
1069
|
}
|
1042
1070
|
|
@@ -1152,25 +1180,21 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|
1152
1180
|
return !document.getElementsByName || !document.getElementsByName( expando ).length;
|
1153
1181
|
});
|
1154
1182
|
|
1155
|
-
// ID
|
1183
|
+
// ID filter and find
|
1156
1184
|
if ( support.getById ) {
|
1157
|
-
Expr.find["ID"] = function( id, context ) {
|
1158
|
-
if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
|
1159
|
-
var m = context.getElementById( id );
|
1160
|
-
return m ? [ m ] : [];
|
1161
|
-
}
|
1162
|
-
};
|
1163
1185
|
Expr.filter["ID"] = function( id ) {
|
1164
1186
|
var attrId = id.replace( runescape, funescape );
|
1165
1187
|
return function( elem ) {
|
1166
1188
|
return elem.getAttribute("id") === attrId;
|
1167
1189
|
};
|
1168
1190
|
};
|
1191
|
+
Expr.find["ID"] = function( id, context ) {
|
1192
|
+
if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
|
1193
|
+
var elem = context.getElementById( id );
|
1194
|
+
return elem ? [ elem ] : [];
|
1195
|
+
}
|
1196
|
+
};
|
1169
1197
|
} else {
|
1170
|
-
// Support: IE6/7
|
1171
|
-
// getElementById is not reliable as a find shortcut
|
1172
|
-
delete Expr.find["ID"];
|
1173
|
-
|
1174
1198
|
Expr.filter["ID"] = function( id ) {
|
1175
1199
|
var attrId = id.replace( runescape, funescape );
|
1176
1200
|
return function( elem ) {
|
@@ -1179,6 +1203,36 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|
1179
1203
|
return node && node.value === attrId;
|
1180
1204
|
};
|
1181
1205
|
};
|
1206
|
+
|
1207
|
+
// Support: IE 6 - 7 only
|
1208
|
+
// getElementById is not reliable as a find shortcut
|
1209
|
+
Expr.find["ID"] = function( id, context ) {
|
1210
|
+
if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
|
1211
|
+
var node, i, elems,
|
1212
|
+
elem = context.getElementById( id );
|
1213
|
+
|
1214
|
+
if ( elem ) {
|
1215
|
+
|
1216
|
+
// Verify the id attribute
|
1217
|
+
node = elem.getAttributeNode("id");
|
1218
|
+
if ( node && node.value === id ) {
|
1219
|
+
return [ elem ];
|
1220
|
+
}
|
1221
|
+
|
1222
|
+
// Fall back on getElementsByName
|
1223
|
+
elems = context.getElementsByName( id );
|
1224
|
+
i = 0;
|
1225
|
+
while ( (elem = elems[i++]) ) {
|
1226
|
+
node = elem.getAttributeNode("id");
|
1227
|
+
if ( node && node.value === id ) {
|
1228
|
+
return [ elem ];
|
1229
|
+
}
|
1230
|
+
}
|
1231
|
+
}
|
1232
|
+
|
1233
|
+
return [];
|
1234
|
+
}
|
1235
|
+
};
|
1182
1236
|
}
|
1183
1237
|
|
1184
1238
|
// Tag
|
@@ -2219,6 +2273,7 @@ function addCombinator( matcher, combinator, base ) {
|
|
2219
2273
|
return matcher( elem, context, xml );
|
2220
2274
|
}
|
2221
2275
|
}
|
2276
|
+
return false;
|
2222
2277
|
} :
|
2223
2278
|
|
2224
2279
|
// Check against all ancestor/preceding elements
|
@@ -2263,6 +2318,7 @@ function addCombinator( matcher, combinator, base ) {
|
|
2263
2318
|
}
|
2264
2319
|
}
|
2265
2320
|
}
|
2321
|
+
return false;
|
2266
2322
|
};
|
2267
2323
|
}
|
2268
2324
|
|
@@ -2625,8 +2681,7 @@ select = Sizzle.select = function( selector, context, results, seed ) {
|
|
2625
2681
|
// Reduce context if the leading compound selector is an ID
|
2626
2682
|
tokens = match[0] = match[0].slice( 0 );
|
2627
2683
|
if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
|
2628
|
-
|
2629
|
-
Expr.relative[ tokens[1].type ] ) {
|
2684
|
+
context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[1].type ] ) {
|
2630
2685
|
|
2631
2686
|
context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
|
2632
2687
|
if ( !context ) {
|
@@ -2808,24 +2863,29 @@ function winnow( elements, qualifier, not ) {
|
|
2808
2863
|
return jQuery.grep( elements, function( elem, i ) {
|
2809
2864
|
return !!qualifier.call( elem, i, elem ) !== not;
|
2810
2865
|
} );
|
2811
|
-
|
2812
2866
|
}
|
2813
2867
|
|
2868
|
+
// Single element
|
2814
2869
|
if ( qualifier.nodeType ) {
|
2815
2870
|
return jQuery.grep( elements, function( elem ) {
|
2816
2871
|
return ( elem === qualifier ) !== not;
|
2817
2872
|
} );
|
2818
|
-
|
2819
2873
|
}
|
2820
2874
|
|
2821
|
-
|
2822
|
-
|
2823
|
-
|
2824
|
-
|
2875
|
+
// Arraylike of elements (jQuery, arguments, Array)
|
2876
|
+
if ( typeof qualifier !== "string" ) {
|
2877
|
+
return jQuery.grep( elements, function( elem ) {
|
2878
|
+
return ( indexOf.call( qualifier, elem ) > -1 ) !== not;
|
2879
|
+
} );
|
2880
|
+
}
|
2825
2881
|
|
2826
|
-
|
2882
|
+
// Simple selector that can be filtered directly, removing non-Elements
|
2883
|
+
if ( risSimple.test( qualifier ) ) {
|
2884
|
+
return jQuery.filter( qualifier, elements, not );
|
2827
2885
|
}
|
2828
2886
|
|
2887
|
+
// Complex selector, compare the two sets, removing non-Elements
|
2888
|
+
qualifier = jQuery.filter( qualifier, elements );
|
2829
2889
|
return jQuery.grep( elements, function( elem ) {
|
2830
2890
|
return ( indexOf.call( qualifier, elem ) > -1 ) !== not && elem.nodeType === 1;
|
2831
2891
|
} );
|
@@ -2838,11 +2898,13 @@ jQuery.filter = function( expr, elems, not ) {
|
|
2838
2898
|
expr = ":not(" + expr + ")";
|
2839
2899
|
}
|
2840
2900
|
|
2841
|
-
|
2842
|
-
jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : []
|
2843
|
-
|
2844
|
-
|
2845
|
-
|
2901
|
+
if ( elems.length === 1 && elem.nodeType === 1 ) {
|
2902
|
+
return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [];
|
2903
|
+
}
|
2904
|
+
|
2905
|
+
return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
|
2906
|
+
return elem.nodeType === 1;
|
2907
|
+
} ) );
|
2846
2908
|
};
|
2847
2909
|
|
2848
2910
|
jQuery.fn.extend( {
|
@@ -3170,14 +3232,14 @@ jQuery.each( {
|
|
3170
3232
|
return this.pushStack( matched );
|
3171
3233
|
};
|
3172
3234
|
} );
|
3173
|
-
var
|
3235
|
+
var rnothtmlwhite = ( /[^\x20\t\r\n\f]+/g );
|
3174
3236
|
|
3175
3237
|
|
3176
3238
|
|
3177
3239
|
// Convert String-formatted options into Object-formatted ones
|
3178
3240
|
function createOptions( options ) {
|
3179
3241
|
var object = {};
|
3180
|
-
jQuery.each( options.match(
|
3242
|
+
jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {
|
3181
3243
|
object[ flag ] = true;
|
3182
3244
|
} );
|
3183
3245
|
return object;
|
@@ -3942,13 +4004,16 @@ var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
|
|
3942
4004
|
}
|
3943
4005
|
}
|
3944
4006
|
|
3945
|
-
|
3946
|
-
elems
|
4007
|
+
if ( chainable ) {
|
4008
|
+
return elems;
|
4009
|
+
}
|
4010
|
+
|
4011
|
+
// Gets
|
4012
|
+
if ( bulk ) {
|
4013
|
+
return fn.call( elems );
|
4014
|
+
}
|
3947
4015
|
|
3948
|
-
|
3949
|
-
bulk ?
|
3950
|
-
fn.call( elems ) :
|
3951
|
-
len ? fn( elems[ 0 ], key ) : emptyGet;
|
4016
|
+
return len ? fn( elems[ 0 ], key ) : emptyGet;
|
3952
4017
|
};
|
3953
4018
|
var acceptData = function( owner ) {
|
3954
4019
|
|
@@ -4085,7 +4150,7 @@ Data.prototype = {
|
|
4085
4150
|
// Otherwise, create an array by matching non-whitespace
|
4086
4151
|
key = key in cache ?
|
4087
4152
|
[ key ] :
|
4088
|
-
( key.match(
|
4153
|
+
( key.match( rnothtmlwhite ) || [] );
|
4089
4154
|
}
|
4090
4155
|
|
4091
4156
|
i = key.length;
|
@@ -4133,6 +4198,31 @@ var dataUser = new Data();
|
|
4133
4198
|
var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
|
4134
4199
|
rmultiDash = /[A-Z]/g;
|
4135
4200
|
|
4201
|
+
function getData( data ) {
|
4202
|
+
if ( data === "true" ) {
|
4203
|
+
return true;
|
4204
|
+
}
|
4205
|
+
|
4206
|
+
if ( data === "false" ) {
|
4207
|
+
return false;
|
4208
|
+
}
|
4209
|
+
|
4210
|
+
if ( data === "null" ) {
|
4211
|
+
return null;
|
4212
|
+
}
|
4213
|
+
|
4214
|
+
// Only convert to a number if it doesn't change the string
|
4215
|
+
if ( data === +data + "" ) {
|
4216
|
+
return +data;
|
4217
|
+
}
|
4218
|
+
|
4219
|
+
if ( rbrace.test( data ) ) {
|
4220
|
+
return JSON.parse( data );
|
4221
|
+
}
|
4222
|
+
|
4223
|
+
return data;
|
4224
|
+
}
|
4225
|
+
|
4136
4226
|
function dataAttr( elem, key, data ) {
|
4137
4227
|
var name;
|
4138
4228
|
|
@@ -4144,14 +4234,7 @@ function dataAttr( elem, key, data ) {
|
|
4144
4234
|
|
4145
4235
|
if ( typeof data === "string" ) {
|
4146
4236
|
try {
|
4147
|
-
data = data
|
4148
|
-
data === "false" ? false :
|
4149
|
-
data === "null" ? null :
|
4150
|
-
|
4151
|
-
// Only convert to a number if it doesn't change the string
|
4152
|
-
+data + "" === data ? +data :
|
4153
|
-
rbrace.test( data ) ? JSON.parse( data ) :
|
4154
|
-
data;
|
4237
|
+
data = getData( data );
|
4155
4238
|
} catch ( e ) {}
|
4156
4239
|
|
4157
4240
|
// Make sure we set the data so it isn't changed later
|
@@ -4528,7 +4611,7 @@ function getDefaultDisplay( elem ) {
|
|
4528
4611
|
return display;
|
4529
4612
|
}
|
4530
4613
|
|
4531
|
-
temp = doc.body.appendChild( doc.createElement( nodeName ) )
|
4614
|
+
temp = doc.body.appendChild( doc.createElement( nodeName ) );
|
4532
4615
|
display = jQuery.css( temp, "display" );
|
4533
4616
|
|
4534
4617
|
temp.parentNode.removeChild( temp );
|
@@ -4646,15 +4729,23 @@ function getAll( context, tag ) {
|
|
4646
4729
|
|
4647
4730
|
// Support: IE <=9 - 11 only
|
4648
4731
|
// Use typeof to avoid zero-argument method invocation on host objects (#15151)
|
4649
|
-
var ret
|
4650
|
-
|
4651
|
-
|
4652
|
-
|
4653
|
-
|
4654
|
-
|
4655
|
-
|
4656
|
-
|
4657
|
-
|
4732
|
+
var ret;
|
4733
|
+
|
4734
|
+
if ( typeof context.getElementsByTagName !== "undefined" ) {
|
4735
|
+
ret = context.getElementsByTagName( tag || "*" );
|
4736
|
+
|
4737
|
+
} else if ( typeof context.querySelectorAll !== "undefined" ) {
|
4738
|
+
ret = context.querySelectorAll( tag || "*" );
|
4739
|
+
|
4740
|
+
} else {
|
4741
|
+
ret = [];
|
4742
|
+
}
|
4743
|
+
|
4744
|
+
if ( tag === undefined || tag && jQuery.nodeName( context, tag ) ) {
|
4745
|
+
return jQuery.merge( [ context ], ret );
|
4746
|
+
}
|
4747
|
+
|
4748
|
+
return ret;
|
4658
4749
|
}
|
4659
4750
|
|
4660
4751
|
|
@@ -4928,7 +5019,7 @@ jQuery.event = {
|
|
4928
5019
|
}
|
4929
5020
|
|
4930
5021
|
// Handle multiple events separated by a space
|
4931
|
-
types = ( types || "" ).match(
|
5022
|
+
types = ( types || "" ).match( rnothtmlwhite ) || [ "" ];
|
4932
5023
|
t = types.length;
|
4933
5024
|
while ( t-- ) {
|
4934
5025
|
tmp = rtypenamespace.exec( types[ t ] ) || [];
|
@@ -5010,7 +5101,7 @@ jQuery.event = {
|
|
5010
5101
|
}
|
5011
5102
|
|
5012
5103
|
// Once for each type.namespace in types; type may be omitted
|
5013
|
-
types = ( types || "" ).match(
|
5104
|
+
types = ( types || "" ).match( rnothtmlwhite ) || [ "" ];
|
5014
5105
|
t = types.length;
|
5015
5106
|
while ( t-- ) {
|
5016
5107
|
tmp = rtypenamespace.exec( types[ t ] ) || [];
|
@@ -5136,51 +5227,58 @@ jQuery.event = {
|
|
5136
5227
|
},
|
5137
5228
|
|
5138
5229
|
handlers: function( event, handlers ) {
|
5139
|
-
var i,
|
5230
|
+
var i, handleObj, sel, matchedHandlers, matchedSelectors,
|
5140
5231
|
handlerQueue = [],
|
5141
5232
|
delegateCount = handlers.delegateCount,
|
5142
5233
|
cur = event.target;
|
5143
5234
|
|
5144
|
-
// Support: IE <=9
|
5145
5235
|
// Find delegate handlers
|
5146
|
-
|
5147
|
-
|
5148
|
-
|
5149
|
-
|
5150
|
-
|
5151
|
-
|
5236
|
+
if ( delegateCount &&
|
5237
|
+
|
5238
|
+
// Support: IE <=9
|
5239
|
+
// Black-hole SVG <use> instance trees (trac-13180)
|
5240
|
+
cur.nodeType &&
|
5241
|
+
|
5242
|
+
// Support: Firefox <=42
|
5243
|
+
// Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861)
|
5244
|
+
// https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click
|
5245
|
+
// Support: IE 11 only
|
5246
|
+
// ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343)
|
5247
|
+
!( event.type === "click" && event.button >= 1 ) ) {
|
5152
5248
|
|
5153
5249
|
for ( ; cur !== this; cur = cur.parentNode || this ) {
|
5154
5250
|
|
5155
5251
|
// Don't check non-elements (#13208)
|
5156
5252
|
// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
|
5157
|
-
if ( cur.nodeType === 1 && (
|
5158
|
-
|
5253
|
+
if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) {
|
5254
|
+
matchedHandlers = [];
|
5255
|
+
matchedSelectors = {};
|
5159
5256
|
for ( i = 0; i < delegateCount; i++ ) {
|
5160
5257
|
handleObj = handlers[ i ];
|
5161
5258
|
|
5162
5259
|
// Don't conflict with Object.prototype properties (#13203)
|
5163
5260
|
sel = handleObj.selector + " ";
|
5164
5261
|
|
5165
|
-
if (
|
5166
|
-
|
5262
|
+
if ( matchedSelectors[ sel ] === undefined ) {
|
5263
|
+
matchedSelectors[ sel ] = handleObj.needsContext ?
|
5167
5264
|
jQuery( sel, this ).index( cur ) > -1 :
|
5168
5265
|
jQuery.find( sel, this, null, [ cur ] ).length;
|
5169
5266
|
}
|
5170
|
-
if (
|
5171
|
-
|
5267
|
+
if ( matchedSelectors[ sel ] ) {
|
5268
|
+
matchedHandlers.push( handleObj );
|
5172
5269
|
}
|
5173
5270
|
}
|
5174
|
-
if (
|
5175
|
-
handlerQueue.push( { elem: cur, handlers:
|
5271
|
+
if ( matchedHandlers.length ) {
|
5272
|
+
handlerQueue.push( { elem: cur, handlers: matchedHandlers } );
|
5176
5273
|
}
|
5177
5274
|
}
|
5178
5275
|
}
|
5179
5276
|
}
|
5180
5277
|
|
5181
5278
|
// Add the remaining (directly-bound) handlers
|
5279
|
+
cur = this;
|
5182
5280
|
if ( delegateCount < handlers.length ) {
|
5183
|
-
handlerQueue.push( { elem:
|
5281
|
+
handlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } );
|
5184
5282
|
}
|
5185
5283
|
|
5186
5284
|
return handlerQueue;
|
@@ -5414,7 +5512,19 @@ jQuery.each( {
|
|
5414
5512
|
|
5415
5513
|
// Add which for click: 1 === left; 2 === middle; 3 === right
|
5416
5514
|
if ( !event.which && button !== undefined && rmouseEvent.test( event.type ) ) {
|
5417
|
-
|
5515
|
+
if ( button & 1 ) {
|
5516
|
+
return 1;
|
5517
|
+
}
|
5518
|
+
|
5519
|
+
if ( button & 2 ) {
|
5520
|
+
return 3;
|
5521
|
+
}
|
5522
|
+
|
5523
|
+
if ( button & 4 ) {
|
5524
|
+
return 2;
|
5525
|
+
}
|
5526
|
+
|
5527
|
+
return 0;
|
5418
5528
|
}
|
5419
5529
|
|
5420
5530
|
return event.which;
|
@@ -6170,15 +6280,17 @@ function setPositiveNumber( elem, value, subtract ) {
|
|
6170
6280
|
}
|
6171
6281
|
|
6172
6282
|
function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
|
6173
|
-
var i
|
6174
|
-
|
6175
|
-
// If we already have the right measurement, avoid augmentation
|
6176
|
-
4 :
|
6283
|
+
var i,
|
6284
|
+
val = 0;
|
6177
6285
|
|
6178
|
-
|
6179
|
-
|
6286
|
+
// If we already have the right measurement, avoid augmentation
|
6287
|
+
if ( extra === ( isBorderBox ? "border" : "content" ) ) {
|
6288
|
+
i = 4;
|
6180
6289
|
|
6181
|
-
|
6290
|
+
// Otherwise initialize for horizontal or vertical properties
|
6291
|
+
} else {
|
6292
|
+
i = name === "width" ? 1 : 0;
|
6293
|
+
}
|
6182
6294
|
|
6183
6295
|
for ( ; i < 4; i += 2 ) {
|
6184
6296
|
|
@@ -7032,7 +7144,7 @@ jQuery.Animation = jQuery.extend( Animation, {
|
|
7032
7144
|
callback = props;
|
7033
7145
|
props = [ "*" ];
|
7034
7146
|
} else {
|
7035
|
-
props = props.match(
|
7147
|
+
props = props.match( rnothtmlwhite );
|
7036
7148
|
}
|
7037
7149
|
|
7038
7150
|
var prop,
|
@@ -7070,9 +7182,14 @@ jQuery.speed = function( speed, easing, fn ) {
|
|
7070
7182
|
opt.duration = 0;
|
7071
7183
|
|
7072
7184
|
} else {
|
7073
|
-
|
7074
|
-
|
7075
|
-
jQuery.fx.speeds[ opt.duration ]
|
7185
|
+
if ( typeof opt.duration !== "number" ) {
|
7186
|
+
if ( opt.duration in jQuery.fx.speeds ) {
|
7187
|
+
opt.duration = jQuery.fx.speeds[ opt.duration ];
|
7188
|
+
|
7189
|
+
} else {
|
7190
|
+
opt.duration = jQuery.fx.speeds._default;
|
7191
|
+
}
|
7192
|
+
}
|
7076
7193
|
}
|
7077
7194
|
|
7078
7195
|
// Normalize opt.queue - true/undefined/null -> "fx"
|
@@ -7422,7 +7539,10 @@ jQuery.extend( {
|
|
7422
7539
|
removeAttr: function( elem, value ) {
|
7423
7540
|
var name,
|
7424
7541
|
i = 0,
|
7425
|
-
|
7542
|
+
|
7543
|
+
// Attribute names can contain non-HTML whitespace characters
|
7544
|
+
// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2
|
7545
|
+
attrNames = value && value.match( rnothtmlwhite );
|
7426
7546
|
|
7427
7547
|
if ( attrNames && elem.nodeType === 1 ) {
|
7428
7548
|
while ( ( name = attrNames[ i++ ] ) ) {
|
@@ -7529,12 +7649,19 @@ jQuery.extend( {
|
|
7529
7649
|
// Use proper attribute retrieval(#12072)
|
7530
7650
|
var tabindex = jQuery.find.attr( elem, "tabindex" );
|
7531
7651
|
|
7532
|
-
|
7533
|
-
parseInt( tabindex, 10 )
|
7652
|
+
if ( tabindex ) {
|
7653
|
+
return parseInt( tabindex, 10 );
|
7654
|
+
}
|
7655
|
+
|
7656
|
+
if (
|
7534
7657
|
rfocusable.test( elem.nodeName ) ||
|
7535
|
-
|
7536
|
-
|
7537
|
-
|
7658
|
+
rclickable.test( elem.nodeName ) &&
|
7659
|
+
elem.href
|
7660
|
+
) {
|
7661
|
+
return 0;
|
7662
|
+
}
|
7663
|
+
|
7664
|
+
return -1;
|
7538
7665
|
}
|
7539
7666
|
}
|
7540
7667
|
},
|
@@ -7551,9 +7678,14 @@ jQuery.extend( {
|
|
7551
7678
|
// on the option
|
7552
7679
|
// The getter ensures a default option is selected
|
7553
7680
|
// when in an optgroup
|
7681
|
+
// eslint rule "no-unused-expressions" is disabled for this code
|
7682
|
+
// since it considers such accessions noop
|
7554
7683
|
if ( !support.optSelected ) {
|
7555
7684
|
jQuery.propHooks.selected = {
|
7556
7685
|
get: function( elem ) {
|
7686
|
+
|
7687
|
+
/* eslint no-unused-expressions: "off" */
|
7688
|
+
|
7557
7689
|
var parent = elem.parentNode;
|
7558
7690
|
if ( parent && parent.parentNode ) {
|
7559
7691
|
parent.parentNode.selectedIndex;
|
@@ -7561,6 +7693,9 @@ if ( !support.optSelected ) {
|
|
7561
7693
|
return null;
|
7562
7694
|
},
|
7563
7695
|
set: function( elem ) {
|
7696
|
+
|
7697
|
+
/* eslint no-unused-expressions: "off" */
|
7698
|
+
|
7564
7699
|
var parent = elem.parentNode;
|
7565
7700
|
if ( parent ) {
|
7566
7701
|
parent.selectedIndex;
|
@@ -7591,7 +7726,13 @@ jQuery.each( [
|
|
7591
7726
|
|
7592
7727
|
|
7593
7728
|
|
7594
|
-
|
7729
|
+
// Strip and collapse whitespace according to HTML spec
|
7730
|
+
// https://html.spec.whatwg.org/multipage/infrastructure.html#strip-and-collapse-whitespace
|
7731
|
+
function stripAndCollapse( value ) {
|
7732
|
+
var tokens = value.match( rnothtmlwhite ) || [];
|
7733
|
+
return tokens.join( " " );
|
7734
|
+
}
|
7735
|
+
|
7595
7736
|
|
7596
7737
|
function getClass( elem ) {
|
7597
7738
|
return elem.getAttribute && elem.getAttribute( "class" ) || "";
|
@@ -7609,12 +7750,11 @@ jQuery.fn.extend( {
|
|
7609
7750
|
}
|
7610
7751
|
|
7611
7752
|
if ( typeof value === "string" && value ) {
|
7612
|
-
classes = value.match(
|
7753
|
+
classes = value.match( rnothtmlwhite ) || [];
|
7613
7754
|
|
7614
7755
|
while ( ( elem = this[ i++ ] ) ) {
|
7615
7756
|
curValue = getClass( elem );
|
7616
|
-
cur = elem.nodeType === 1 &&
|
7617
|
-
( " " + curValue + " " ).replace( rclass, " " );
|
7757
|
+
cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " );
|
7618
7758
|
|
7619
7759
|
if ( cur ) {
|
7620
7760
|
j = 0;
|
@@ -7625,7 +7765,7 @@ jQuery.fn.extend( {
|
|
7625
7765
|
}
|
7626
7766
|
|
7627
7767
|
// Only assign if different to avoid unneeded rendering.
|
7628
|
-
finalValue =
|
7768
|
+
finalValue = stripAndCollapse( cur );
|
7629
7769
|
if ( curValue !== finalValue ) {
|
7630
7770
|
elem.setAttribute( "class", finalValue );
|
7631
7771
|
}
|
@@ -7651,14 +7791,13 @@ jQuery.fn.extend( {
|
|
7651
7791
|
}
|
7652
7792
|
|
7653
7793
|
if ( typeof value === "string" && value ) {
|
7654
|
-
classes = value.match(
|
7794
|
+
classes = value.match( rnothtmlwhite ) || [];
|
7655
7795
|
|
7656
7796
|
while ( ( elem = this[ i++ ] ) ) {
|
7657
7797
|
curValue = getClass( elem );
|
7658
7798
|
|
7659
7799
|
// This expression is here for better compressibility (see addClass)
|
7660
|
-
cur = elem.nodeType === 1 &&
|
7661
|
-
( " " + curValue + " " ).replace( rclass, " " );
|
7800
|
+
cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " );
|
7662
7801
|
|
7663
7802
|
if ( cur ) {
|
7664
7803
|
j = 0;
|
@@ -7671,7 +7810,7 @@ jQuery.fn.extend( {
|
|
7671
7810
|
}
|
7672
7811
|
|
7673
7812
|
// Only assign if different to avoid unneeded rendering.
|
7674
|
-
finalValue =
|
7813
|
+
finalValue = stripAndCollapse( cur );
|
7675
7814
|
if ( curValue !== finalValue ) {
|
7676
7815
|
elem.setAttribute( "class", finalValue );
|
7677
7816
|
}
|
@@ -7706,7 +7845,7 @@ jQuery.fn.extend( {
|
|
7706
7845
|
// Toggle individual class names
|
7707
7846
|
i = 0;
|
7708
7847
|
self = jQuery( this );
|
7709
|
-
classNames = value.match(
|
7848
|
+
classNames = value.match( rnothtmlwhite ) || [];
|
7710
7849
|
|
7711
7850
|
while ( ( className = classNames[ i++ ] ) ) {
|
7712
7851
|
|
@@ -7749,10 +7888,8 @@ jQuery.fn.extend( {
|
|
7749
7888
|
className = " " + selector + " ";
|
7750
7889
|
while ( ( elem = this[ i++ ] ) ) {
|
7751
7890
|
if ( elem.nodeType === 1 &&
|
7752
|
-
( " " + getClass( elem ) + " " ).
|
7753
|
-
|
7754
|
-
) {
|
7755
|
-
return true;
|
7891
|
+
( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) {
|
7892
|
+
return true;
|
7756
7893
|
}
|
7757
7894
|
}
|
7758
7895
|
|
@@ -7763,8 +7900,7 @@ jQuery.fn.extend( {
|
|
7763
7900
|
|
7764
7901
|
|
7765
7902
|
|
7766
|
-
var rreturn = /\r/g
|
7767
|
-
rspaces = /[\x20\t\r\n\f]+/g;
|
7903
|
+
var rreturn = /\r/g;
|
7768
7904
|
|
7769
7905
|
jQuery.fn.extend( {
|
7770
7906
|
val: function( value ) {
|
@@ -7785,13 +7921,13 @@ jQuery.fn.extend( {
|
|
7785
7921
|
|
7786
7922
|
ret = elem.value;
|
7787
7923
|
|
7788
|
-
|
7789
|
-
|
7790
|
-
|
7791
|
-
|
7924
|
+
// Handle most common string cases
|
7925
|
+
if ( typeof ret === "string" ) {
|
7926
|
+
return ret.replace( rreturn, "" );
|
7927
|
+
}
|
7792
7928
|
|
7793
|
-
|
7794
|
-
|
7929
|
+
// Handle cases where value is null/undef or number
|
7930
|
+
return ret == null ? "" : ret;
|
7795
7931
|
}
|
7796
7932
|
|
7797
7933
|
return;
|
@@ -7848,20 +7984,24 @@ jQuery.extend( {
|
|
7848
7984
|
// option.text throws exceptions (#14686, #14858)
|
7849
7985
|
// Strip and collapse whitespace
|
7850
7986
|
// https://html.spec.whatwg.org/#strip-and-collapse-whitespace
|
7851
|
-
|
7987
|
+
stripAndCollapse( jQuery.text( elem ) );
|
7852
7988
|
}
|
7853
7989
|
},
|
7854
7990
|
select: {
|
7855
7991
|
get: function( elem ) {
|
7856
|
-
var value, option,
|
7992
|
+
var value, option, i,
|
7857
7993
|
options = elem.options,
|
7858
7994
|
index = elem.selectedIndex,
|
7859
7995
|
one = elem.type === "select-one",
|
7860
7996
|
values = one ? null : [],
|
7861
|
-
max = one ? index + 1 : options.length
|
7862
|
-
|
7863
|
-
|
7864
|
-
|
7997
|
+
max = one ? index + 1 : options.length;
|
7998
|
+
|
7999
|
+
if ( index < 0 ) {
|
8000
|
+
i = max;
|
8001
|
+
|
8002
|
+
} else {
|
8003
|
+
i = one ? index : 0;
|
8004
|
+
}
|
7865
8005
|
|
7866
8006
|
// Loop through all the selected options
|
7867
8007
|
for ( ; i < max; i++ ) {
|
@@ -8315,13 +8455,17 @@ jQuery.fn.extend( {
|
|
8315
8455
|
.map( function( i, elem ) {
|
8316
8456
|
var val = jQuery( this ).val();
|
8317
8457
|
|
8318
|
-
|
8319
|
-
null
|
8320
|
-
|
8321
|
-
|
8322
|
-
|
8323
|
-
|
8324
|
-
{ name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
|
8458
|
+
if ( val == null ) {
|
8459
|
+
return null;
|
8460
|
+
}
|
8461
|
+
|
8462
|
+
if ( jQuery.isArray( val ) ) {
|
8463
|
+
return jQuery.map( val, function( val ) {
|
8464
|
+
return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
|
8465
|
+
} );
|
8466
|
+
}
|
8467
|
+
|
8468
|
+
return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
|
8325
8469
|
} ).get();
|
8326
8470
|
}
|
8327
8471
|
} );
|
@@ -8330,7 +8474,7 @@ jQuery.fn.extend( {
|
|
8330
8474
|
var
|
8331
8475
|
r20 = /%20/g,
|
8332
8476
|
rhash = /#.*$/,
|
8333
|
-
|
8477
|
+
rantiCache = /([?&])_=[^&]*/,
|
8334
8478
|
rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg,
|
8335
8479
|
|
8336
8480
|
// #7653, #8125, #8152: local protocol detection
|
@@ -8376,7 +8520,7 @@ function addToPrefiltersOrTransports( structure ) {
|
|
8376
8520
|
|
8377
8521
|
var dataType,
|
8378
8522
|
i = 0,
|
8379
|
-
dataTypes = dataTypeExpression.toLowerCase().match(
|
8523
|
+
dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || [];
|
8380
8524
|
|
8381
8525
|
if ( jQuery.isFunction( func ) ) {
|
8382
8526
|
|
@@ -8844,7 +8988,7 @@ jQuery.extend( {
|
|
8844
8988
|
s.type = options.method || options.type || s.method || s.type;
|
8845
8989
|
|
8846
8990
|
// Extract dataTypes list
|
8847
|
-
s.dataTypes = ( s.dataType || "*" ).toLowerCase().match(
|
8991
|
+
s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ];
|
8848
8992
|
|
8849
8993
|
// A cross-domain request is in order when the origin doesn't match the current origin.
|
8850
8994
|
if ( s.crossDomain == null ) {
|
@@ -8916,9 +9060,9 @@ jQuery.extend( {
|
|
8916
9060
|
delete s.data;
|
8917
9061
|
}
|
8918
9062
|
|
8919
|
-
// Add anti-cache
|
9063
|
+
// Add or update anti-cache param if needed
|
8920
9064
|
if ( s.cache === false ) {
|
8921
|
-
cacheURL = cacheURL.replace(
|
9065
|
+
cacheURL = cacheURL.replace( rantiCache, "$1" );
|
8922
9066
|
uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce++ ) + uncached;
|
8923
9067
|
}
|
8924
9068
|
|
@@ -9657,7 +9801,7 @@ jQuery.fn.load = function( url, params, callback ) {
|
|
9657
9801
|
off = url.indexOf( " " );
|
9658
9802
|
|
9659
9803
|
if ( off > -1 ) {
|
9660
|
-
selector =
|
9804
|
+
selector = stripAndCollapse( url.slice( off ) );
|
9661
9805
|
url = url.slice( 0, off );
|
9662
9806
|
}
|
9663
9807
|
|
@@ -10049,7 +10193,6 @@ if ( typeof define === "function" && define.amd ) {
|
|
10049
10193
|
|
10050
10194
|
|
10051
10195
|
|
10052
|
-
|
10053
10196
|
var
|
10054
10197
|
|
10055
10198
|
// Map over jQuery in case of overwrite
|
@@ -10078,6 +10221,9 @@ if ( !noGlobal ) {
|
|
10078
10221
|
}
|
10079
10222
|
|
10080
10223
|
|
10224
|
+
|
10225
|
+
|
10226
|
+
|
10081
10227
|
return jQuery;
|
10082
10228
|
} );
|
10083
10229
|
(function($, undefined) {
|
@@ -27712,6 +27858,10 @@ return jQuery;
|
|
27712
27858
|
slice = [].slice;
|
27713
27859
|
|
27714
27860
|
TaoModule = (function() {
|
27861
|
+
var id;
|
27862
|
+
|
27863
|
+
id = 0;
|
27864
|
+
|
27715
27865
|
TaoModule.extend = function(obj) {
|
27716
27866
|
var key, ref, val;
|
27717
27867
|
if (!(obj && typeof obj === 'object')) {
|
@@ -27793,6 +27943,7 @@ return jQuery;
|
|
27793
27943
|
if (options == null) {
|
27794
27944
|
options = {};
|
27795
27945
|
}
|
27946
|
+
this.id = ++id;
|
27796
27947
|
this._attributes = {};
|
27797
27948
|
if (typeof options === 'object') {
|
27798
27949
|
for (key in options) {
|
@@ -27856,6 +28007,9 @@ return jQuery;
|
|
27856
28007
|
};
|
27857
28008
|
|
27858
28009
|
TaoApplication.prototype._initGon = function() {
|
28010
|
+
if (!window.gon) {
|
28011
|
+
return;
|
28012
|
+
}
|
27859
28013
|
$.extend(this, window.gon);
|
27860
28014
|
return window.gon = null;
|
27861
28015
|
};
|
@@ -27874,7 +28028,7 @@ return jQuery;
|
|
27874
28028
|
};
|
27875
28029
|
|
27876
28030
|
TaoApplication.prototype._initI18n = function() {
|
27877
|
-
if (I18n && this.locale) {
|
28031
|
+
if (window.I18n && this.locale) {
|
27878
28032
|
return I18n.locale = this.locale;
|
27879
28033
|
}
|
27880
28034
|
};
|
@@ -27894,12 +28048,12 @@ return jQuery;
|
|
27894
28048
|
TaoApplication.prototype._initTurbolinks = function() {
|
27895
28049
|
return $(document).on('turbolinks:before-visit', (function(_this) {
|
27896
28050
|
return function(e) {
|
27897
|
-
var ref;
|
27898
|
-
if (_this.currentPage.trigger('before-leave') === false) {
|
28051
|
+
var ref, ref1;
|
28052
|
+
if (((ref = _this.currentPage) != null ? ref.trigger('before-leave') : void 0) === false) {
|
27899
28053
|
e.preventDefault();
|
27900
28054
|
return;
|
27901
28055
|
}
|
27902
|
-
return _this.trigger('before-page-visit', [(
|
28056
|
+
return _this.trigger('before-page-visit', [(ref1 = e.originalEvent) != null ? ref1.data.url : void 0]);
|
27903
28057
|
};
|
27904
28058
|
})(this)).on('turbolinks:request-start', (function(_this) {
|
27905
28059
|
return function(e) {
|
@@ -27913,10 +28067,12 @@ return jQuery;
|
|
27913
28067
|
};
|
27914
28068
|
})(this)).on('turbolinks:before-cache', (function(_this) {
|
27915
28069
|
return function(e) {
|
27916
|
-
var
|
28070
|
+
var ref;
|
27917
28071
|
_this.trigger('before-page-cache', [_this.currentPage]);
|
27918
|
-
if (
|
27919
|
-
|
28072
|
+
if ((ref = _this.currentPage) != null) {
|
28073
|
+
if (typeof ref.beforeCache === "function") {
|
28074
|
+
ref.beforeCache();
|
28075
|
+
}
|
27920
28076
|
}
|
27921
28077
|
return window.currentPage = _this.currentPage = null;
|
27922
28078
|
};
|
@@ -27941,6 +28097,7 @@ return jQuery;
|
|
27941
28097
|
if (!($page.length > 0)) {
|
27942
28098
|
return;
|
27943
28099
|
}
|
28100
|
+
_this._initGon();
|
27944
28101
|
_this._initIcons($page);
|
27945
28102
|
_this._initPage($page);
|
27946
28103
|
return _this.trigger('page-load', [_this.currentPage]);
|
@@ -29963,17 +30120,15 @@ var Deferred = void 0;
|
|
29963
30120
|
(function () {
|
29964
30121
|
'use strict';
|
29965
30122
|
|
29966
|
-
var doc = document;
|
29967
|
-
var win = window;
|
29968
|
-
|
29969
30123
|
/**
|
29970
30124
|
* Gets 'customElement' from window so that it could be modified after
|
29971
30125
|
* the polyfill loads.
|
29972
30126
|
* @function
|
29973
30127
|
* @return {CustomElementRegistry}
|
29974
30128
|
*/
|
30129
|
+
|
29975
30130
|
var _customElements = function _customElements() {
|
29976
|
-
return
|
30131
|
+
return window['customElements'];
|
29977
30132
|
};
|
29978
30133
|
|
29979
30134
|
var _observerProp = '__$CE_observer';
|
@@ -30014,7 +30169,7 @@ var Deferred = void 0;
|
|
30014
30169
|
// IE 11 requires the third and fourth arguments be present. If the third
|
30015
30170
|
// arg is null, it applies the default behaviour. However IE also requires
|
30016
30171
|
// the fourth argument be present even though the other browsers ignore it.
|
30017
|
-
return
|
30172
|
+
return document.createTreeWalker(root, NodeFilter.SHOW_ELEMENT, null, false);
|
30018
30173
|
}
|
30019
30174
|
|
30020
30175
|
/**
|
@@ -30292,9 +30447,9 @@ var Deferred = void 0;
|
|
30292
30447
|
var onReady = function onReady() {
|
30293
30448
|
_this2._upgradeScheduled = false;
|
30294
30449
|
if (!_this2._mainDocumentObserver) {
|
30295
|
-
_this2._mainDocumentObserver = _this2._observeRoot(
|
30450
|
+
_this2._mainDocumentObserver = _this2._observeRoot(document);
|
30296
30451
|
}
|
30297
|
-
_this2._addNodes(
|
30452
|
+
_this2._addNodes(document.childNodes);
|
30298
30453
|
};
|
30299
30454
|
if (window['HTMLImports']) {
|
30300
30455
|
window['HTMLImports']['whenReady'](onReady);
|
@@ -30630,7 +30785,7 @@ var Deferred = void 0;
|
|
30630
30785
|
// patch window.HTMLElement
|
30631
30786
|
|
30632
30787
|
/** @const */
|
30633
|
-
var origHTMLElement =
|
30788
|
+
var origHTMLElement = window.HTMLElement;
|
30634
30789
|
CustomElementRegistry.prototype['nativeHTMLElement'] = origHTMLElement;
|
30635
30790
|
/**
|
30636
30791
|
* @type {function(new: HTMLElement)}
|
@@ -30647,21 +30802,24 @@ var Deferred = void 0;
|
|
30647
30802
|
if (this.constructor) {
|
30648
30803
|
// Find the tagname of the constructor and create a new element with it
|
30649
30804
|
var tagName = customElements._constructors.get(this.constructor);
|
30650
|
-
return _createElement(
|
30805
|
+
return _createElement(document, tagName, undefined, false);
|
30651
30806
|
}
|
30652
30807
|
throw new Error('Unknown constructor. Did you call customElements.define()?');
|
30653
30808
|
};
|
30654
|
-
|
30655
|
-
|
30656
|
-
|
30657
|
-
|
30809
|
+
window.HTMLElement = newHTMLElement;
|
30810
|
+
// By setting the patched HTMLElement's prototype property to the native
|
30811
|
+
// HTMLElement's prototype we make sure that:
|
30812
|
+
// document.createElement('a') instanceof HTMLElement
|
30813
|
+
// works because instanceof uses HTMLElement.prototype, which is on the
|
30814
|
+
// ptototype chain of built-in elements.
|
30815
|
+
window.HTMLElement.prototype = origHTMLElement.prototype;
|
30658
30816
|
|
30659
30817
|
// patch doc.createElement
|
30660
30818
|
// TODO(justinfagnani): why is the cast neccessary?
|
30661
30819
|
// Can we fix the Closure DOM externs?
|
30662
|
-
var
|
30820
|
+
var _nativeCreateElement =
|
30663
30821
|
/** @type {function(this:Document, string, (Object|undefined)=): !HTMLElement}}*/
|
30664
|
-
|
30822
|
+
document.createElement;
|
30665
30823
|
|
30666
30824
|
/**
|
30667
30825
|
* Creates a new element and upgrades it if it's a custom element.
|
@@ -30675,7 +30833,7 @@ var Deferred = void 0;
|
|
30675
30833
|
*/
|
30676
30834
|
function _createElement(doc, tagName, options, callConstructor) {
|
30677
30835
|
var customElements = _customElements();
|
30678
|
-
var element = options ?
|
30836
|
+
var element = options ? _nativeCreateElement.call(doc, tagName, options) : _nativeCreateElement.call(doc, tagName);
|
30679
30837
|
var definition = customElements._definitions.get(tagName.toLowerCase());
|
30680
30838
|
if (definition) {
|
30681
30839
|
customElements._upgradeElement(element, definition, callConstructor);
|
@@ -30683,35 +30841,35 @@ var Deferred = void 0;
|
|
30683
30841
|
customElements._observeRoot(element);
|
30684
30842
|
return element;
|
30685
30843
|
};
|
30686
|
-
|
30687
|
-
return _createElement(
|
30844
|
+
document.createElement = function (tagName, options) {
|
30845
|
+
return _createElement(document, tagName, options, true);
|
30688
30846
|
};
|
30689
30847
|
|
30690
|
-
// patch
|
30848
|
+
// patch document.createElementNS
|
30691
30849
|
|
30692
30850
|
var HTMLNS = 'http://www.w3.org/1999/xhtml';
|
30693
30851
|
|
30694
30852
|
/** @type {function(this:Document,string,string):Element} */
|
30695
|
-
var
|
30696
|
-
|
30853
|
+
var _nativeCreateElementNS = document.createElementNS;
|
30854
|
+
document.createElementNS =
|
30697
30855
|
/** @type {function(this:Document,(string|null),string):!Element} */
|
30698
30856
|
function (namespaceURI, qualifiedName) {
|
30699
|
-
if (namespaceURI ===
|
30700
|
-
return
|
30857
|
+
if (namespaceURI === HTMLNS) {
|
30858
|
+
return document.createElement(qualifiedName);
|
30701
30859
|
} else {
|
30702
|
-
return
|
30860
|
+
return _nativeCreateElementNS.call(document, namespaceURI, qualifiedName);
|
30703
30861
|
}
|
30704
30862
|
};
|
30705
30863
|
|
30706
30864
|
// patch Element.attachShadow
|
30707
30865
|
|
30708
30866
|
/** @type {function({closed: boolean})} */
|
30709
|
-
var
|
30710
|
-
if (
|
30867
|
+
var _nativeAttachShadow = Element.prototype['attachShadow'];
|
30868
|
+
if (_nativeAttachShadow) {
|
30711
30869
|
Object.defineProperty(Element.prototype, 'attachShadow', {
|
30712
30870
|
value: function value(options) {
|
30713
30871
|
/** @type {!Node} */
|
30714
|
-
var root =
|
30872
|
+
var root = _nativeAttachShadow.call(this, options);
|
30715
30873
|
/** @type {CustomElementRegistry} */
|
30716
30874
|
var customElements = _customElements();
|
30717
30875
|
customElements._observeRoot(root);
|
@@ -30720,11 +30878,11 @@ var Deferred = void 0;
|
|
30720
30878
|
});
|
30721
30879
|
}
|
30722
30880
|
|
30723
|
-
// patch
|
30881
|
+
// patch document.importNode
|
30724
30882
|
|
30725
|
-
var
|
30726
|
-
|
30727
|
-
var clone = /** @type{!Node} */
|
30883
|
+
var _nativeImportNode = document.importNode;
|
30884
|
+
document.importNode = function (node, deep) {
|
30885
|
+
var clone = /** @type{!Node} */_nativeImportNode.call(document, node, deep);
|
30728
30886
|
var customElements = _customElements();
|
30729
30887
|
var nodes = isElement(clone) ? [clone] : clone.childNodes;
|
30730
30888
|
/** @type {CustomElementRegistry} */_customElements()._addNodes(nodes);
|
@@ -30733,13 +30891,13 @@ var Deferred = void 0;
|
|
30733
30891
|
|
30734
30892
|
// patch Element.setAttribute & removeAttribute
|
30735
30893
|
|
30736
|
-
var
|
30894
|
+
var _nativeSetAttribute = Element.prototype.setAttribute;
|
30737
30895
|
Element.prototype['setAttribute'] = function (name, value) {
|
30738
|
-
changeAttribute(this, name, value,
|
30896
|
+
changeAttribute(this, name, value, _nativeSetAttribute);
|
30739
30897
|
};
|
30740
|
-
var
|
30898
|
+
var _nativeRemoveAttribute = Element.prototype.removeAttribute;
|
30741
30899
|
Element.prototype['removeAttribute'] = function (name) {
|
30742
|
-
changeAttribute(this, name, null,
|
30900
|
+
changeAttribute(this, name, null, _nativeRemoveAttribute);
|
30743
30901
|
};
|
30744
30902
|
|
30745
30903
|
function changeAttribute(element, name, value, operation) {
|
@@ -30776,129 +30934,51 @@ var Deferred = void 0;
|
|
30776
30934
|
})();
|
30777
30935
|
(function() {
|
30778
30936
|
if (window.customElements && !customElements.polyfilled) {
|
30779
|
-
eval('(() => {\n \'use strict\';\n\n const NativeHTMLElement = window.HTMLElement;\n const nativeDefine = window.customElements.define;\n const nativeGet = window.customElements.get;\n\n /**\n * Map of user-provided constructors to tag names.\n *\n * @type {Map<Function, string>}\n */\n const tagnameByConstructor = new Map();\n\n /**\n * Map of tag
|
30937
|
+
eval('(() => {\n \'use strict\';\n\n const NativeHTMLElement = window.HTMLElement;\n const nativeDefine = window.customElements.define;\n const nativeGet = window.customElements.get;\n\n /**\n * Map of user-provided constructors to tag names.\n *\n * @type {Map<Function, string>}\n */\n const tagnameByConstructor = new Map();\n\n /**\n * Map of tag names to user-provided constructors.\n *\n * @type {Map<string, Function>}\n */\n const constructorByTagname = new Map();\n\n\n /**\n * Whether the constructors are being called by a browser process, ie parsing\n * or createElement.\n */\n let browserConstruction = false;\n\n /**\n * Whether the constructors are being called by a user-space process, ie\n * calling an element constructor.\n */\n let userConstruction = false;\n\n window.HTMLElement = function() {\n if (!browserConstruction) {\n const tagname = tagnameByConstructor.get(this.constructor);\n const fakeClass = nativeGet.call(window.customElements, tagname);\n\n // Make sure that the fake constructor doesn\'t call back to this constructor\n userConstruction = true;\n const instance = new (fakeClass)();\n return instance;\n }\n // Else do nothing. This will be reached by ES5-style classes doing\n // HTMLElement.call() during initialization\n browserConstruction = false;\n };\n // By setting the patched HTMLElement\'s prototype property to the native\n // HTMLElement\'s prototype we make sure that:\n // document.createElement(\'a\') instanceof HTMLElement\n // works because instanceof uses HTMLElement.prototype, which is on the\n // ptototype chain of built-in elements.\n window.HTMLElement.prototype = NativeHTMLElement.prototype;\n\n window.customElements.define = (tagname, elementClass) => {\n const elementProto = elementClass.prototype;\n const StandInElement = class extends NativeHTMLElement {\n constructor() {\n // Call the native HTMLElement constructor, this gives us the\n // under-construction instance as `this`:\n super();\n\n // The prototype will be wrong up because the browser used our fake\n // class, so fix it:\n Object.setPrototypeOf(this, elementProto);\n\n if (!userConstruction) {\n // Make sure that user-defined constructor bottom\'s out to a do-nothing\n // HTMLElement() call\n browserConstruction = true;\n // Call the user-defined constructor on our instance:\n elementClass.call(this);\n }\n userConstruction = false;\n }\n };\n const standInProto = StandInElement.prototype;\n StandInElement.observedAttributes = elementClass.observedAttributes;\n standInProto.connectedCallback = elementProto.connectedCallback;\n standInProto.disconnectedCallback = elementProto.disconnectedCallback;\n standInProto.attributeChangedCallback = elementProto.attributeChangedCallback;\n standInProto.adoptedCallback = elementProto.adoptedCallback;\n\n tagnameByConstructor.set(elementClass, tagname);\n constructorByTagname.set(tagname, elementClass);\n nativeDefine.call(window.customElements, tagname, StandInElement);\n };\n\n window.customElements.get = (tagname) => constructorByTagname.get(tagname);\n\n})();');
|
30780
30938
|
}
|
30781
30939
|
|
30782
30940
|
}).call(this);
|
30783
|
-
/**
|
30784
|
-
* @license
|
30785
|
-
* Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
|
30786
|
-
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
30787
|
-
* The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
30788
|
-
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
30789
|
-
* Code distributed by Google as part of the polymer project is also
|
30790
|
-
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
30791
|
-
*/
|
30792
|
-
|
30793
|
-
(function() {
|
30794
|
-
'use strict';
|
30795
|
-
|
30796
|
-
// patch all built-in subclasses of HTMLElement to inherit from the new HTMLElement
|
30797
|
-
// See https://html.spec.whatwg.org/multipage/indices.html#element-interfaces
|
30798
|
-
|
30799
|
-
/** @const */
|
30800
|
-
var htmlElementSubclasses = [
|
30801
|
-
'Button',
|
30802
|
-
'Canvas',
|
30803
|
-
'Data',
|
30804
|
-
'Head',
|
30805
|
-
'Mod',
|
30806
|
-
'TableCell',
|
30807
|
-
'TableCol',
|
30808
|
-
'Anchor',
|
30809
|
-
'Area',
|
30810
|
-
'Base',
|
30811
|
-
'Body',
|
30812
|
-
'BR',
|
30813
|
-
'DataList',
|
30814
|
-
'Details',
|
30815
|
-
'Dialog',
|
30816
|
-
'Div',
|
30817
|
-
'DList',
|
30818
|
-
'Embed',
|
30819
|
-
'FieldSet',
|
30820
|
-
'Form',
|
30821
|
-
'Heading',
|
30822
|
-
'HR',
|
30823
|
-
'Html',
|
30824
|
-
'IFrame',
|
30825
|
-
'Image',
|
30826
|
-
'Input',
|
30827
|
-
'Keygen',
|
30828
|
-
'Label',
|
30829
|
-
'Legend',
|
30830
|
-
'LI',
|
30831
|
-
'Link',
|
30832
|
-
'Map',
|
30833
|
-
'Media',
|
30834
|
-
'Menu',
|
30835
|
-
'MenuItem',
|
30836
|
-
'Meta',
|
30837
|
-
'Meter',
|
30838
|
-
'Object',
|
30839
|
-
'OList',
|
30840
|
-
'OptGroup',
|
30841
|
-
'Option',
|
30842
|
-
'Output',
|
30843
|
-
'Paragraph',
|
30844
|
-
'Param',
|
30845
|
-
'Picture',
|
30846
|
-
'Pre',
|
30847
|
-
'Progress',
|
30848
|
-
'Quote',
|
30849
|
-
'Script',
|
30850
|
-
'Select',
|
30851
|
-
'Slot',
|
30852
|
-
'Source',
|
30853
|
-
'Span',
|
30854
|
-
'Style',
|
30855
|
-
'TableCaption',
|
30856
|
-
'Table',
|
30857
|
-
'TableRow',
|
30858
|
-
'TableSection',
|
30859
|
-
'Template',
|
30860
|
-
'TextArea',
|
30861
|
-
'Time',
|
30862
|
-
'Title',
|
30863
|
-
'Track',
|
30864
|
-
'UList',
|
30865
|
-
'Unknown',
|
30866
|
-
];
|
30867
|
-
|
30868
|
-
for (var i = 0; i < htmlElementSubclasses.length; i++) {
|
30869
|
-
var ctor = window['HTML' + htmlElementSubclasses[i] + 'Element'];
|
30870
|
-
if (ctor) {
|
30871
|
-
ctor.prototype.__proto__ = window.HTMLElement.prototype;
|
30872
|
-
}
|
30873
|
-
}
|
30874
|
-
})();
|
30875
30941
|
(function() {
|
30876
30942
|
|
30877
30943
|
|
30878
30944
|
}).call(this);
|
30879
30945
|
(function() {
|
30880
30946
|
var TaoComponentBasedOn, components,
|
30881
|
-
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
30882
|
-
hasProp = {}.hasOwnProperty,
|
30883
30947
|
slice = [].slice;
|
30884
30948
|
|
30885
30949
|
components = {};
|
30886
30950
|
|
30887
|
-
TaoComponentBasedOn = function(
|
30888
|
-
|
30889
|
-
|
30951
|
+
TaoComponentBasedOn = function(superClassName) {
|
30952
|
+
var ComponentClass;
|
30953
|
+
if (superClassName == null) {
|
30954
|
+
superClassName = 'HTMLElement';
|
30890
30955
|
}
|
30891
|
-
if (components[
|
30892
|
-
return components[
|
30956
|
+
if (components[superClassName]) {
|
30957
|
+
return components[superClassName];
|
30893
30958
|
}
|
30894
|
-
|
30895
|
-
|
30959
|
+
ComponentClass = (function() {
|
30960
|
+
var count, superClass;
|
30961
|
+
|
30962
|
+
superClass = window[superClassName];
|
30963
|
+
|
30964
|
+
ComponentClass.prototype = Object.create(superClass.prototype, {
|
30965
|
+
constructor: {
|
30966
|
+
value: ComponentClass,
|
30967
|
+
enumerable: false,
|
30968
|
+
writable: true,
|
30969
|
+
configurable: true
|
30970
|
+
}
|
30971
|
+
});
|
30896
30972
|
|
30897
|
-
|
30898
|
-
|
30973
|
+
if (Object.setPrototypeOf != null) {
|
30974
|
+
Object.setPrototypeOf(ComponentClass, superClass);
|
30975
|
+
} else {
|
30976
|
+
ComponentClass.__proto__ = superClass;
|
30899
30977
|
}
|
30900
30978
|
|
30901
|
-
|
30979
|
+
count = 0;
|
30980
|
+
|
30981
|
+
ComponentClass.extend = function(obj) {
|
30902
30982
|
var key, ref, val;
|
30903
30983
|
if (!(obj && typeof obj === 'object')) {
|
30904
30984
|
throw new Error('TaoComponent.extend: param should be an object');
|
@@ -30915,7 +30995,7 @@ var Deferred = void 0;
|
|
30915
30995
|
return this;
|
30916
30996
|
};
|
30917
30997
|
|
30918
|
-
|
30998
|
+
ComponentClass.include = function(obj) {
|
30919
30999
|
var key, ref, val;
|
30920
31000
|
if (!(obj && typeof obj === 'object')) {
|
30921
31001
|
throw new Error('TaoComponent.include: param should be an object');
|
@@ -30932,21 +31012,21 @@ var Deferred = void 0;
|
|
30932
31012
|
return this;
|
30933
31013
|
};
|
30934
31014
|
|
30935
|
-
|
31015
|
+
ComponentClass.get = function(attributeName, getMethod) {
|
30936
31016
|
return Object.defineProperty(this.prototype, attributeName, {
|
30937
31017
|
get: getMethod,
|
30938
31018
|
configurable: true
|
30939
31019
|
});
|
30940
31020
|
};
|
30941
31021
|
|
30942
|
-
|
31022
|
+
ComponentClass.set = function(attributeName, setMethod) {
|
30943
31023
|
return Object.defineProperty(this.prototype, attributeName, {
|
30944
31024
|
set: setMethod,
|
30945
31025
|
configurable: true
|
30946
31026
|
});
|
30947
31027
|
};
|
30948
31028
|
|
30949
|
-
|
31029
|
+
ComponentClass.attribute = function() {
|
30950
31030
|
var i, names, options;
|
30951
31031
|
names = 2 <= arguments.length ? slice.call(arguments, 0, i = arguments.length - 1) : (i = 0, []), options = arguments[i++];
|
30952
31032
|
if (options == null) {
|
@@ -30993,76 +31073,98 @@ var Deferred = void 0;
|
|
30993
31073
|
})(this));
|
30994
31074
|
};
|
30995
31075
|
|
30996
|
-
|
31076
|
+
ComponentClass.tag = '';
|
30997
31077
|
|
30998
|
-
|
31078
|
+
ComponentClass.register = function(componentClass) {
|
30999
31079
|
if (!componentClass.tag) {
|
31000
31080
|
return;
|
31001
31081
|
}
|
31002
31082
|
return customElements.define(componentClass.tag, componentClass);
|
31003
31083
|
};
|
31004
31084
|
|
31005
|
-
|
31085
|
+
ComponentClass.observedAttributes = [];
|
31006
31086
|
|
31007
|
-
|
31087
|
+
ComponentClass.get('jq', function() {
|
31008
31088
|
return $(this);
|
31009
31089
|
});
|
31010
31090
|
|
31011
|
-
|
31012
|
-
|
31013
|
-
|
31014
|
-
|
31015
|
-
|
31016
|
-
|
31017
|
-
|
31018
|
-
|
31091
|
+
ComponentClass.attribute('taoId');
|
31092
|
+
|
31093
|
+
function ComponentClass() {
|
31094
|
+
superClass.apply(this, arguments);
|
31095
|
+
this._created();
|
31096
|
+
}
|
31097
|
+
|
31098
|
+
ComponentClass.prototype.connectedCallback = function() {
|
31099
|
+
return $((function(_this) {
|
31100
|
+
return function() {
|
31101
|
+
if (!_this.initialized) {
|
31102
|
+
_this.taoId = ++count;
|
31103
|
+
_this._init();
|
31104
|
+
_this.initialized = true;
|
31105
|
+
}
|
31106
|
+
_this.connected = true;
|
31107
|
+
return _this._connected();
|
31108
|
+
};
|
31109
|
+
})(this));
|
31019
31110
|
};
|
31020
31111
|
|
31021
|
-
|
31022
|
-
|
31023
|
-
|
31112
|
+
ComponentClass.prototype.disconnectedCallback = function() {
|
31113
|
+
return $((function(_this) {
|
31114
|
+
return function() {
|
31115
|
+
_this.connected = false;
|
31116
|
+
return _this._disconnected();
|
31117
|
+
};
|
31118
|
+
})(this));
|
31024
31119
|
};
|
31025
31120
|
|
31026
|
-
|
31121
|
+
ComponentClass.prototype.attributeChangedCallback = function(name) {
|
31122
|
+
return this._attributeChanged(name);
|
31123
|
+
};
|
31124
|
+
|
31125
|
+
ComponentClass.prototype._created = function() {};
|
31126
|
+
|
31127
|
+
ComponentClass.prototype._init = function() {};
|
31128
|
+
|
31129
|
+
ComponentClass.prototype._connected = function() {};
|
31130
|
+
|
31131
|
+
ComponentClass.prototype._disconnected = function() {};
|
31132
|
+
|
31133
|
+
ComponentClass.prototype._attributeChanged = function(name) {
|
31027
31134
|
var name1;
|
31028
|
-
return typeof this[name1 = "_" + (_.camelCase(
|
31135
|
+
return typeof this[name1 = "_" + (_.camelCase(name)) + "Changed"] === "function" ? this[name1]() : void 0;
|
31029
31136
|
};
|
31030
31137
|
|
31031
|
-
|
31138
|
+
ComponentClass.prototype.beforeCache = function() {};
|
31139
|
+
|
31140
|
+
ComponentClass.prototype.on = function() {
|
31032
31141
|
var args, ref;
|
31033
31142
|
args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
31034
31143
|
return (ref = this.jq).on.apply(ref, args);
|
31035
31144
|
};
|
31036
31145
|
|
31037
|
-
|
31146
|
+
ComponentClass.prototype.off = function() {
|
31038
31147
|
var args, ref;
|
31039
31148
|
args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
31040
31149
|
return (ref = this.jq).off.apply(ref, args);
|
31041
31150
|
};
|
31042
31151
|
|
31043
|
-
|
31152
|
+
ComponentClass.prototype.trigger = function() {
|
31044
31153
|
var args, ref;
|
31045
31154
|
args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
31046
31155
|
return (ref = this.jq).triggerHandler.apply(ref, args);
|
31047
31156
|
};
|
31048
31157
|
|
31049
|
-
|
31158
|
+
ComponentClass.prototype.one = function() {
|
31050
31159
|
var args, ref;
|
31051
31160
|
args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
31052
31161
|
return (ref = this.jq).one.apply(ref, args);
|
31053
31162
|
};
|
31054
31163
|
|
31055
|
-
|
31056
|
-
|
31057
|
-
_Class.prototype._connect = function() {};
|
31058
|
-
|
31059
|
-
_Class.prototype._disconnect = function() {};
|
31060
|
-
|
31061
|
-
_Class.prototype.prepareCache = function() {};
|
31062
|
-
|
31063
|
-
return _Class;
|
31164
|
+
return ComponentClass;
|
31064
31165
|
|
31065
|
-
})(
|
31166
|
+
})();
|
31167
|
+
return components[superClassName] = ComponentClass;
|
31066
31168
|
};
|
31067
31169
|
|
31068
31170
|
window.TaoComponentBasedOn = TaoComponentBasedOn;
|
@@ -31084,11 +31186,11 @@ var Deferred = void 0;
|
|
31084
31186
|
|
31085
31187
|
TaoPage.attribute('layout');
|
31086
31188
|
|
31087
|
-
TaoPage.prototype.
|
31088
|
-
return
|
31189
|
+
TaoPage.prototype.beforeCache = function() {
|
31190
|
+
return this.jp.find('[tao-id]').each((function(_this) {
|
31089
31191
|
return function(i, el) {
|
31090
|
-
if (typeof el.
|
31091
|
-
el.
|
31192
|
+
if (typeof el.beforeCache === "function") {
|
31193
|
+
el.beforeCache();
|
31092
31194
|
}
|
31093
31195
|
return null;
|
31094
31196
|
};
|