From c4c99f891589d1434b7d50b39fde7d633dbe8a71 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Sun, 11 Dec 2022 17:55:49 +0100 Subject: [PATCH] Formatting --- .../{bundle.c0285e69.min.js => bundle.e1167f37.min.js} | 4 ++-- ....c0285e69.min.js.map => bundle.e1167f37.min.js.map} | 4 ++-- material/assets/stylesheets/extra.73715943.min.css | 1 - material/assets/stylesheets/extra.73715943.min.css.map | 1 - material/assets/stylesheets/extra.c507a49a.min.css | 1 + material/assets/stylesheets/extra.c507a49a.min.css.map | 1 + material/base.html | 4 ++-- src/assets/javascripts/components/palette/index.ts | 10 ++++------ 8 files changed, 12 insertions(+), 14 deletions(-) rename material/assets/javascripts/{bundle.c0285e69.min.js => bundle.e1167f37.min.js} (83%) rename material/assets/javascripts/{bundle.c0285e69.min.js.map => bundle.e1167f37.min.js.map} (89%) delete mode 100644 material/assets/stylesheets/extra.73715943.min.css delete mode 100644 material/assets/stylesheets/extra.73715943.min.css.map create mode 100644 material/assets/stylesheets/extra.c507a49a.min.css create mode 100644 material/assets/stylesheets/extra.c507a49a.min.css.map diff --git a/material/assets/javascripts/bundle.c0285e69.min.js b/material/assets/javascripts/bundle.e1167f37.min.js similarity index 83% rename from material/assets/javascripts/bundle.c0285e69.min.js rename to material/assets/javascripts/bundle.e1167f37.min.js index 48ed38ab3..65ce0e395 100644 --- a/material/assets/javascripts/bundle.c0285e69.min.js +++ b/material/assets/javascripts/bundle.e1167f37.min.js @@ -24,6 +24,6 @@ PERFORMANCE OF THIS SOFTWARE. * MIT Licensed */var Rs=/["'&<>]/;Si.exports=ks;function ks(e){var t=""+e,r=Rs.exec(t);if(!r)return t;var n,o="",i=0,a=0;for(i=r.index;i0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(r){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,r)},t.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},t.prototype._innerSubscribe=function(r){var n=this,o=this,i=o.hasError,a=o.isStopped,s=o.observers;return i||a?Ar:(this.currentObservers=null,s.push(r),new Ie(function(){n.currentObservers=null,We(s,r)}))},t.prototype._checkFinalizedStatuses=function(r){var n=this,o=n.hasError,i=n.thrownError,a=n.isStopped;o?r.error(i):a&&r.complete()},t.prototype.asObservable=function(){var r=new F;return r.source=this,r},t.create=function(r,n){return new Yn(r,n)},t}(F);var Yn=function(e){ne(t,e);function t(r,n){var o=e.call(this)||this;return o.destination=r,o.source=n,o}return t.prototype.next=function(r){var n,o;(o=(n=this.destination)===null||n===void 0?void 0:n.next)===null||o===void 0||o.call(n,r)},t.prototype.error=function(r){var n,o;(o=(n=this.destination)===null||n===void 0?void 0:n.error)===null||o===void 0||o.call(n,r)},t.prototype.complete=function(){var r,n;(n=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||n===void 0||n.call(r)},t.prototype._subscribe=function(r){var n,o;return(o=(n=this.source)===null||n===void 0?void 0:n.subscribe(r))!==null&&o!==void 0?o:Ar},t}(E);var Et={now:function(){return(Et.delegate||Date).now()},delegate:void 0};var wt=function(e){ne(t,e);function t(r,n,o){r===void 0&&(r=1/0),n===void 0&&(n=1/0),o===void 0&&(o=Et);var i=e.call(this)||this;return i._bufferSize=r,i._windowTime=n,i._timestampProvider=o,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=n===1/0,i._bufferSize=Math.max(1,r),i._windowTime=Math.max(1,n),i}return t.prototype.next=function(r){var n=this,o=n.isStopped,i=n._buffer,a=n._infiniteTimeWindow,s=n._timestampProvider,c=n._windowTime;o||(i.push(r),!a&&i.push(s.now()+c)),this._trimBuffer(),e.prototype.next.call(this,r)},t.prototype._subscribe=function(r){this._throwIfClosed(),this._trimBuffer();for(var n=this._innerSubscribe(r),o=this,i=o._infiniteTimeWindow,a=o._buffer,s=a.slice(),c=0;c0?e.prototype.requestAsyncId.call(this,r,n,o):(r.actions.push(this),r._scheduled||(r._scheduled=ut.requestAnimationFrame(function(){return r.flush(void 0)})))},t.prototype.recycleAsyncId=function(r,n,o){var i;if(o===void 0&&(o=0),o!=null?o>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,r,n,o);var a=r.actions;n!=null&&((i=a[a.length-1])===null||i===void 0?void 0:i.id)!==n&&(ut.cancelAnimationFrame(n),r._scheduled=void 0)},t}(Vt);var Jn=function(e){ne(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.flush=function(r){this._active=!0;var n=this._scheduled;this._scheduled=void 0;var o=this.actions,i;r=r||o.shift();do if(i=r.execute(r.state,r.delay))break;while((r=o[0])&&r.id===n&&o.shift());if(this._active=!1,i){for(;(r=o[0])&&r.id===n&&o.shift();)r.unsubscribe();throw i}},t}(zt);var Ee=new Jn(Bn);var R=new F(function(e){return e.complete()});function Nt(e){return e&&A(e.schedule)}function Ir(e){return e[e.length-1]}function qe(e){return A(Ir(e))?e.pop():void 0}function Se(e){return Nt(Ir(e))?e.pop():void 0}function qt(e,t){return typeof Ir(e)=="number"?e.pop():t}var pt=function(e){return e&&typeof e.length=="number"&&typeof e!="function"};function Kt(e){return A(e==null?void 0:e.then)}function Qt(e){return A(e[ft])}function Yt(e){return Symbol.asyncIterator&&A(e==null?void 0:e[Symbol.asyncIterator])}function Gt(e){return new TypeError("You provided "+(e!==null&&typeof e=="object"?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function ga(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Bt=ga();function Jt(e){return A(e==null?void 0:e[Bt])}function Xt(e){return Fn(this,arguments,function(){var r,n,o,i;return It(this,function(a){switch(a.label){case 0:r=e.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,jt(r.read())];case 3:return n=a.sent(),o=n.value,i=n.done,i?[4,jt(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,jt(o)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return r.releaseLock(),[7];case 10:return[2]}})})}function Zt(e){return A(e==null?void 0:e.getReader)}function V(e){if(e instanceof F)return e;if(e!=null){if(Qt(e))return ya(e);if(pt(e))return xa(e);if(Kt(e))return Ea(e);if(Yt(e))return Xn(e);if(Jt(e))return wa(e);if(Zt(e))return Sa(e)}throw Gt(e)}function ya(e){return new F(function(t){var r=e[ft]();if(A(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function xa(e){return new F(function(t){for(var r=0;r=2;return function(n){return n.pipe(e?M(function(o,i){return e(o,i,n)}):me,ge(1),r?He(t):bo(function(){return new tr}))}}function vo(){for(var e=[],t=0;t=2,!0))}function fe(e){e===void 0&&(e={});var t=e.connector,r=t===void 0?function(){return new E}:t,n=e.resetOnError,o=n===void 0?!0:n,i=e.resetOnComplete,a=i===void 0?!0:i,s=e.resetOnRefCountZero,c=s===void 0?!0:s;return function(f){var u,p,m,d=0,h=!1,b=!1,z=function(){p==null||p.unsubscribe(),p=void 0},Z=function(){z(),u=m=void 0,h=b=!1},W=function(){var O=u;Z(),O==null||O.unsubscribe()};return g(function(O,Ne){d++,!b&&!h&&z();var Ue=m=m!=null?m:r();Ne.add(function(){d--,d===0&&!b&&!h&&(p=Vr(W,c))}),Ue.subscribe(Ne),!u&&d>0&&(u=new Ze({next:function($e){return Ue.next($e)},error:function($e){b=!0,z(),p=Vr(Z,o,$e),Ue.error($e)},complete:function(){h=!0,z(),p=Vr(Z,a),Ue.complete()}}),V(O).subscribe(u))})(f)}}function Vr(e,t){for(var r=[],n=2;ne.next(document)),e}function Q(e,t=document){return Array.from(t.querySelectorAll(e))}function K(e,t=document){let r=se(e,t);if(typeof r=="undefined")throw new ReferenceError(`Missing element: expected "${e}" to be present`);return r}function se(e,t=document){return t.querySelector(e)||void 0}function je(){return document.activeElement instanceof HTMLElement&&document.activeElement||void 0}function or(e){return L(v(document.body,"focusin"),v(document.body,"focusout")).pipe(ke(1),l(()=>{let t=je();return typeof t!="undefined"?e.contains(t):!1}),N(e===je()),G())}function Ye(e){return{x:e.offsetLeft,y:e.offsetTop}}function Eo(e){return L(v(window,"load"),v(window,"resize")).pipe(Ce(0,Ee),l(()=>Ye(e)),N(Ye(e)))}function ir(e){return{x:e.scrollLeft,y:e.scrollTop}}function dt(e){return L(v(e,"scroll"),v(window,"resize")).pipe(Ce(0,Ee),l(()=>ir(e)),N(ir(e)))}var So=function(){if(typeof Map!="undefined")return Map;function e(t,r){var n=-1;return t.some(function(o,i){return o[0]===r?(n=i,!0):!1}),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(r){var n=e(this.__entries__,r),o=this.__entries__[n];return o&&o[1]},t.prototype.set=function(r,n){var o=e(this.__entries__,r);~o?this.__entries__[o][1]=n:this.__entries__.push([r,n])},t.prototype.delete=function(r){var n=this.__entries__,o=e(n,r);~o&&n.splice(o,1)},t.prototype.has=function(r){return!!~e(this.__entries__,r)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(r,n){n===void 0&&(n=null);for(var o=0,i=this.__entries__;o0},e.prototype.connect_=function(){!Qr||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Ka?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!Qr||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(t){var r=t.propertyName,n=r===void 0?"":r,o=qa.some(function(i){return!!~n.indexOf(i)});o&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),Oo=function(e,t){for(var r=0,n=Object.keys(t);r0},e}(),_o=typeof WeakMap!="undefined"?new WeakMap:new So,Mo=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=Qa.getInstance(),n=new ns(t,r,this);_o.set(this,n)}return e}();["observe","unobserve","disconnect"].forEach(function(e){Mo.prototype[e]=function(){var t;return(t=_o.get(this))[e].apply(t,arguments)}});var os=function(){return typeof ar.ResizeObserver!="undefined"?ar.ResizeObserver:Mo}(),Lo=os;var Ao=new E,is=$(()=>H(new Lo(e=>{for(let t of e)Ao.next(t)}))).pipe(x(e=>L(Oe,H(e)).pipe(C(()=>e.disconnect()))),J(1));function de(e){return{width:e.offsetWidth,height:e.offsetHeight}}function ye(e){return is.pipe(S(t=>t.observe(e)),x(t=>Ao.pipe(M(({target:r})=>r===e),C(()=>t.unobserve(e)),l(()=>de(e)))),N(de(e)))}function bt(e){return{width:e.scrollWidth,height:e.scrollHeight}}function fr(e){let t=e.parentElement;for(;t&&(e.scrollWidth<=t.scrollWidth&&e.scrollHeight<=t.scrollHeight);)t=(e=t).parentElement;return t?e:void 0}var Co=new E,as=$(()=>H(new IntersectionObserver(e=>{for(let t of e)Co.next(t)},{threshold:0}))).pipe(x(e=>L(Oe,H(e)).pipe(C(()=>e.disconnect()))),J(1));function ur(e){return as.pipe(S(t=>t.observe(e)),x(t=>Co.pipe(M(({target:r})=>r===e),C(()=>t.unobserve(e)),l(({isIntersecting:r})=>r))))}function Ro(e,t=16){return dt(e).pipe(l(({y:r})=>{let n=de(e),o=bt(e);return r>=o.height-n.height-t}),G())}var pr={drawer:K("[data-md-toggle=drawer]"),search:K("[data-md-toggle=search]")};function ko(e){return pr[e].checked}function Ge(e,t){pr[e].checked!==t&&pr[e].click()}function Be(e){let t=pr[e];return v(t,"change").pipe(l(()=>t.checked),N(t.checked))}function ss(e,t){switch(e.constructor){case HTMLInputElement:return e.type==="radio"?/^Arrow/.test(t):!0;case HTMLSelectElement:case HTMLTextAreaElement:return!0;default:return e.isContentEditable}}function cs(){return L(v(window,"compositionstart").pipe(l(()=>!0)),v(window,"compositionend").pipe(l(()=>!1))).pipe(N(!1))}function Ho(){let e=v(window,"keydown").pipe(M(t=>!(t.metaKey||t.ctrlKey)),l(t=>({mode:ko("search")?"search":"global",type:t.key,claim(){t.preventDefault(),t.stopPropagation()}})),M(({mode:t,type:r})=>{if(t==="global"){let n=je();if(typeof n!="undefined")return!ss(n,r)}return!0}),fe());return cs().pipe(x(t=>t?R:e))}function Te(){return new URL(location.href)}function lr(e){location.href=e.href}function Po(){return new E}function $o(e,t){if(typeof t=="string"||typeof t=="number")e.innerHTML+=t.toString();else if(t instanceof Node)e.appendChild(t);else if(Array.isArray(t))for(let r of t)$o(e,r)}function _(e,t,...r){let n=document.createElement(e);if(t)for(let o of Object.keys(t))typeof t[o]!="undefined"&&(typeof t[o]!="boolean"?n.setAttribute(o,t[o]):n.setAttribute(o,""));for(let o of r)$o(n,o);return n}function mr(e){if(e>999){let t=+((e-950)%1e3>99);return`${((e+1e-6)/1e3).toFixed(t)}k`}else return e.toString()}function Io(){return location.hash.substring(1)}function jo(e){let t=_("a",{href:e});t.addEventListener("click",r=>r.stopPropagation()),t.click()}function fs(){return v(window,"hashchange").pipe(l(Io),N(Io()),M(e=>e.length>0),J(1))}function Fo(){return fs().pipe(l(e=>se(`[id="${e}"]`)),M(e=>typeof e!="undefined"))}function Yr(e){let t=matchMedia(e);return rr(r=>t.addListener(()=>r(t.matches))).pipe(N(t.matches))}function Uo(){let e=matchMedia("print");return L(v(window,"beforeprint").pipe(l(()=>!0)),v(window,"afterprint").pipe(l(()=>!1))).pipe(N(e.matches))}function Gr(e,t){return e.pipe(x(r=>r?t():R))}function dr(e,t={credentials:"same-origin"}){return ve(fetch(`${e}`,t)).pipe(ce(()=>R),x(r=>r.status!==200?Ot(()=>new Error(r.statusText)):H(r)))}function Fe(e,t){return dr(e,t).pipe(x(r=>r.json()),J(1))}function Wo(e,t){let r=new DOMParser;return dr(e,t).pipe(x(n=>n.text()),l(n=>r.parseFromString(n,"text/xml")),J(1))}function hr(e){let t=_("script",{src:e});return $(()=>(document.head.appendChild(t),L(v(t,"load"),v(t,"error").pipe(x(()=>Ot(()=>new ReferenceError(`Invalid script: ${e}`))))).pipe(l(()=>{}),C(()=>document.head.removeChild(t)),ge(1))))}function Do(){return{x:Math.max(0,scrollX),y:Math.max(0,scrollY)}}function Vo(){return L(v(window,"scroll",{passive:!0}),v(window,"resize",{passive:!0})).pipe(l(Do),N(Do()))}function zo(){return{width:innerWidth,height:innerHeight}}function No(){return v(window,"resize",{passive:!0}).pipe(l(zo),N(zo()))}function qo(){return Y([Vo(),No()]).pipe(l(([e,t])=>({offset:e,size:t})),J(1))}function br(e,{viewport$:t,header$:r}){let n=t.pipe(X("size")),o=Y([n,r]).pipe(l(()=>Ye(e)));return Y([r,t,o]).pipe(l(([{height:i},{offset:a,size:s},{x:c,y:f}])=>({offset:{x:a.x-c,y:a.y-f+i},size:s})))}(()=>{function e(o,i){parent.postMessage(o,i||"*")}function t(...o){return o.reduce((i,a)=>i.then(()=>new Promise(s=>{let c=document.createElement("script");c.src=a,c.addEventListener("load",()=>s()),document.body.appendChild(c)})),Promise.resolve())}function r(){let o=document.createElement("iframe");return o.width=o.height=o.frameBorder="0",o}var n=class{constructor(o,i){if(this.url=o,this.onerror=null,this.onmessage=null,this.onmessageerror=null,this.handleMessage=s=>{s.source===this.worker&&(s.stopImmediatePropagation(),this.dispatchEvent(new MessageEvent("message",{data:s.data})),this.onmessage&&this.onmessage(s))},this.handleError=(s,c,f,u,p)=>{if(c===this.url.toString()){let m=new ErrorEvent("error",{message:s,filename:c,lineno:f,colno:u,error:p});this.dispatchEvent(m),this.onerror&&this.onerror(m)}},typeof i!="undefined")throw new TypeError("Options are not supported for iframe workers");let a=new EventTarget;this.addEventListener=a.addEventListener.bind(a),this.removeEventListener=a.removeEventListener.bind(a),this.dispatchEvent=a.dispatchEvent.bind(a),document.body.appendChild(this.iframe=r()),this.worker.document.open(),this.worker.document.write(` {% endblock %} {% block scripts %} - + {% for path in config.extra_javascript %} {% endfor %} {% endblock %} {% if page.meta and page.meta.ᴴₒᴴₒᴴₒ %} - + {% endif %} diff --git a/src/assets/javascripts/components/palette/index.ts b/src/assets/javascripts/components/palette/index.ts index 0c8e93700..16c021cf8 100644 --- a/src/assets/javascripts/components/palette/index.ts +++ b/src/assets/javascripts/components/palette/index.ts @@ -148,14 +148,12 @@ export function mountPalette( const { backgroundColor } = window.getComputedStyle(header) /* Return color in hexadecimal format */ - return `#${ - backgroundColor.match(/\d+/g)! - .map(value => (+value).toString(16).padStart(2, "0")) - .join("") - }` + return backgroundColor.match(/\d+/g)! + .map(value => (+value).toString(16).padStart(2, "0")) + .join("") }) ) - .subscribe(color => meta.content = color) + .subscribe(color => meta.content = `#${color}`) /* Revert transition durations after color switch */ push$.pipe(observeOn(asyncScheduler))