Skip to content

Commit bb3c911

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents 7d42f70 + 8fe2a9e commit bb3c911

File tree

3 files changed

+58
-35
lines changed

3 files changed

+58
-35
lines changed

css.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
//# allFunctionsCalledOnLoad
22
//console.time('css.js');
3-
//@dev self.css =
3+
//$dev self.css =
44
(function CSSSetup(inModule, sym, defer, D, O, id, y, /*rAF,*/ ads) {
5-
//@dev'use strict'
5+
//$dev'use strict'
66
var newish = !!ads
77
if (y.propertyIsEnumerable(sym) && newish ? ads.find(function (o) { return o[id] }) : D.getElementById(id) instanceof HTMLStyleElement) {
88
var out = y[sym]
99
inModule && (inModule = out.onerror) && (removeEventListener('error', inModule), out.onerror = null)
1010
return out
1111
}
1212
try { var S = sessionStorage } // it just throws on read if storage is denied
13-
catch (e) { //@devconsole.warn(e)
13+
catch (e) { //$devconsole.warn(e)
1414
}
1515
if (!inModule) {
1616
var onerror = function (e) { if (e.filename.endsWith('.js')) { [].forEach.call(D.querySelectorAll('script[nomodule]'), function (s) { D.head.appendChild(D.createElement('script')).src = s.src }); removeEventListener('error', onerror) } }
@@ -44,7 +44,7 @@
4444
}
4545
catch (e) {
4646
// cross origin frame so we can't use window.top
47-
//@devconsole.warn(e)
47+
//$devconsole.warn(e)
4848
if (!S) {
4949
sn = String // we can't cache
5050
break dance
@@ -79,7 +79,7 @@
7979
function cv(prop, val) { return toCaps(dv(prop, val)) }
8080
function badCSS(data, _) {
8181
if (alr.has(data) || _) return
82-
//@devconsole.warn(data)
82+
//$devconsole.warn(data)
8383
alr.add(data)
8484
}
8585
function vs(selector, type) {
@@ -235,12 +235,12 @@
235235
'motion-path': 'var(--offset-path)'
236236
}
237237
function lowPriority() {
238-
//@dev console.time('low priority')
238+
//$dev console.time('low priority')
239239
g("locale", "auto", false, "*")("user-modify", "auto", true, "*")("line-grid", "auto", false, "*")("line-snap", "auto", false, "*")("nbsp-mode", "auto", false, "*")("text-zoom", "auto", true, "*")("line-align", "auto", false, "*")("text-decorations-in-effect", "auto", true, "*")("force-broken-image-icon", "0", true, "<integer>")("float-edge", "content-box", true, "*")("image-region", "auto", false, "*")("box-orient", "inline-axis", true, "*")("box-align", "stretch", true, "*")("box-direction", "normal", true, "*")("box-flex", "0", true, "*")("box-flex-group", "0", true, "*")("box-lines", "single", true, "*")("box-ordinal-group", "1", true, "*")("box-decoration-break", "slice", true, "*")("box-pack", "start", true, "*")("line-clamp", "none", true, "*")("font-smoothing", "auto", false, "*")("mask-position-x", "0%", true, "<length-percentage>")("mask-position-y", "0%", true, "<length-percentage>")("window-dragging", "auto", true, "*")("stack-sizing", "stretch-to-fit", false, "*")("mask-composite", "source-over", true, "*")("window-shadow", "auto", true, "*")("outline-radius", "0 0 0 0", true, "*")("binding", "none", true, "*")("text-blink", "none", true, "*")("image-rect", "auto", false, "*")("context-properties", "none", false, "*")("text-kashida-space", "0%", false, "<percentage>")("flow-from", "none", true, "*")("flow-into", "none", true, "*")("high-contrast-adjust", "auto", false, "*")("ime-mode", "auto", true, "*")("wrap-through", "wrap", true, "*")("print-color-adjust", "economy", false, "*")("pay-button-style", "white", true, "*")("color-filter", "none", false, "*")("pay-button-type", "plain", true, "*")("visual-effect", "none", false, "*")("text-spacing-trim", "normal", false, "*")("text-group-align", "none", true, "*")("text-autospace", "normal", false, "*")("orient", "inline", true, "*")("ruby-overhang", "auto", false, "*")("max-lines", "none", true, "*")("line-fit-edge", "leading", false, "*")("overflow-scrolling", "auto", true, "*")("column-progression", "auto", true, "*")("dashboard-region", "none", true, "*")("column-axis", "auto", true, "*")("text-size-adjust", "auto", false, "*")("border-vertical-spacing", "auto", true, "*")("buffered-rendering", "auto", true, "*")
240-
//@dev console.timeEnd('low priority')
240+
//$dev console.timeEnd('low priority')
241241
}
242242
function properties() {
243-
//@dev console.time('properties')
243+
//$dev console.time('properties')
244244
g("user-select", "auto", false, '*') // Most important one
245245
("zoom", "auto", false, '*')
246246
('user-drag', "auto", true, '*')
@@ -271,7 +271,7 @@
271271
('min-logical-width', 'none', false, '*')
272272
('color-rendering', 'auto', false, '*')
273273
('word-wrap', 'normal', false, '*')
274-
//@dev console.timeEnd('properties')
274+
//$dev console.timeEnd('properties')
275275
}
276276
var diffName =
277277
[
@@ -380,13 +380,13 @@
380380
else if (!CSS.registerProperty) doRegister()
381381
for (var x in o) newName += x + "{" + toCSS(o[x]) + "}"
382382
newName = "._needsjs{display:none !important}._webcomponent{display:none}@supports selector (:defined){._webcomponent{display:revert}}html{margin:auto}p{text-wrap:pretty}h1,h2,h3,h4,h5,h6,:where(p){text-wrap:balance;overflow-wrap:break-word}body{line-height:1.5;--font-smoothing:antialiased}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto !important}}@media(prefers-reduced-motion:no-preference){:root{interpolate-size: allow-keywords}}@media(prefers-reduced-transparency:reduce){*{opacity:1 !important;}}:-moz-loading{cursor:wait}:-moz-broken{border-radius:0}@supports not (content-visibility:auto){*{visibility:var(--content-visibility)}}@supports not (scrollbar-width:thin){::-webkit-scrollbar{width:var(--scrollbar-width);height:var(--scrollbar-width);background-color:var(--scrollbar-color)}::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb-color)}}" + newName
383-
//@dev console.debug(newName.replace(/:where\(([\S\s]*?)\)/g,'$1'))
383+
//$dev console.debug(newName.replace(/:where\(([\S\s]*?)\)/g,'$1'))
384384
}
385385
var str = name
386386
// Selecting all pseudo elements has a massive performance hit, as expected
387387
str || sn(str = id + '*' + "{" + toCSS(uv, true) + "}" + newName)
388388
newish ? as.replaceSync(str) : (t.textContent = str, insertRule = function(n,i) {t.sheet.insertRule(n,i)})
389-
var css = //@devObject.seal
389+
var css = //$devObject.seal
390390
({
391391
getDefaultStyleSheet: Sheet,
392392
// registerCSSRaw: registerCSSRaw,

h.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@dev var h =
1+
//$dev var h =
22
(function handle(globalThis) {
33
'use strict'
44
var MODULE = Symbol.for("[[HModule]]")
@@ -11,7 +11,7 @@
1111
ownKeys = Reflect.ownKeys,
1212
isArray = Array.isArray,
1313
allEvents = h.allEvents = new WeakMap
14-
//@devvar queueMicrotask=globalThis.queueMicrotask||globalThis.setImmediate||setTimeout,logger={__proto__:null};!function(){var _='%c@handle.js +color:pink;'.split('+'),c=_[0],z=_[1];function r(){var v=[].slice.call(arguments);v.unshift(1,c,z);queueMicrotask(this.bind.apply(this,v))}function m(){var v=[].slice.call(arguments);v.unshift(1,c,z);setTimeout(this.bind.apply(this,v))}for(var i in console){var o=console[i];typeof o === 'function'&&(o=o.bind(console),logger[i]=r.bind(o),logger[i+"Late"]=m.bind(o))}}();var source=Function.toString.call.bind(Function.prototype.toString),warn=logger.warn,groupCollapsed=logger.groupCollapsed,groupEnd=logger.groupEnd;globalThis.allEvents=allEvents
14+
//$devvar queueMicrotask=globalThis.queueMicrotask||globalThis.setImmediate||setTimeout,logger={__proto__:null};!function(){var _='%c@handle.js +color:pink;'.split('+'),c=_[0],z=_[1];function r(){var v=[].slice.call(arguments);v.unshift(1,c,z);queueMicrotask(this.bind.apply(this,v))}function m(){var v=[].slice.call(arguments);v.unshift(1,c,z);setTimeout(this.bind.apply(this,v))}for(var i in console){var o=console[i];typeof o === 'function'&&(o=o.bind(console),logger[i]=r.bind(o),logger[i+"Late"]=m.bind(o))}}();var source=Function.toString.call.bind(Function.prototype.toString),warn=logger.warn,groupCollapsed=logger.groupCollapsed,groupEnd=logger.groupEnd;globalThis.allEvents=allEvents
1515
function isValidET(target) {
1616
return target === Object(target) && 'addEventListener' in target && 'removeEventListener' in target && 'dispatchEvent' in target
1717
}
@@ -95,7 +95,7 @@
9595
}
9696
if (IE && v === 'gesture') return getIEGestureEvent(name)
9797
if (name === 'inertiastart') return 'MSInertiaStart'
98-
//@dev logger.warnLate("'"+original+"' events might not be available on the following EventTarget:", target)
98+
//$dev logger.warnLate("'"+original+"' events might not be available on the following EventTarget:", target)
9999
}
100100
return original
101101
}
@@ -206,7 +206,7 @@
206206
if (hi) out.name = 'orientationchange'
207207
}
208208
}
209-
//@dev logger.warn("'"+eventName+"' was changed to '"+out.name+"' on "+getLabel(out.target))
209+
//$dev logger.warn("'"+eventName+"' was changed to '"+out.name+"' on "+getLabel(out.target))
210210
return out
211211
}
212212
}
@@ -241,7 +241,7 @@
241241
var names = ownKeys(events)
242242
if (!names.length) return target
243243
var label = getLabel(target)
244-
/*@devtry{groupCollapsed("on("+label+")");logger.dirxml(target)*/
244+
/*$devtry{groupCollapsed("on("+label+")");logger.dirxml(target)*/
245245
var myEvents = getEventNames(target)
246246
if (typeof events === 'function') !function () {
247247
var a = {}
@@ -308,7 +308,7 @@
308308
if (autoabort && getLabel(controller) !== 'AbortController') throw TypeError("AbortController required if #autoabort flag is present")
309309
newTarget.addEventListener(eventName, listener, SUPPORTS_OPTIONS_PARAM ? options : options.capture/*, typeof scrollMaxX === 'number' && wantsUntrusted*/)
310310
if (controller) {
311-
//@dev logger.info("📡 '"+eventName+"' event added", controller)
311+
//$dev logger.info("📡 '"+eventName+"' event added", controller)
312312
}
313313
else {
314314
allEvents.has(newTarget) || allEvents.set(newTarget, new Map)
@@ -320,10 +320,10 @@
320320
listener: listener,
321321
})
322322
myEvents.add(eventName)
323-
//@dev logger.info("🔔 '"+eventName+"' event added")
323+
//$dev logger.info("🔔 '"+eventName+"' event added")
324324
}
325325
}
326-
/*@dev}finally{groupEnd()}*/
326+
/*$dev}finally{groupEnd()}*/
327327
return target
328328
}
329329
h.on = on
@@ -418,7 +418,7 @@
418418
if (!isValidET(target)) throw invalid()
419419
if (!eventNames.length || !allEvents.has(target)) return null
420420
var label = getLabel(target)
421-
/*@devtry{groupCollapsed("off("+label+")");logger.dirxml(target)*/
421+
/*$devtry{groupCollapsed("off("+label+")");logger.dirxml(target)*/
422422
var map = allEvents.get(target),
423423
mySet = target[sym]
424424
for (var i = eventNames.length; i--;) {
@@ -438,11 +438,11 @@
438438
var capture = !!(settings.flags & FLAG_CAPTURE)
439439
newTarget.removeEventListener(name, listener, SUPPORTS_OPTIONS_PARAM ? { capture: capture } : capture)
440440
map.delete(name)
441-
//@dev && logger.info("🔕 '"+name+"' event removed")
441+
//$dev && logger.info("🔕 '"+name+"' event removed")
442442
mySet.delete(name)
443443
map.size || allEvents.delete(newTarget)
444444
}
445-
/*@dev}finally{groupEnd()}*/
445+
/*$dev}finally{groupEnd()}*/
446446
}
447447
h.off = off
448448
function filterResult(event, filter) {
@@ -580,5 +580,5 @@
580580
}
581581
h.debounce = debounce
582582
return constructor.prototype[MODULE] = h
583-
}(typeof globalThis === 'undefined' ? window : globalThis //@dev,!this
584-
))//@dev;h
583+
}(typeof globalThis === 'undefined' ? window : globalThis //$dev,!this
584+
))//$dev;h

legacy.js

Lines changed: 34 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,38 @@
11
'use strict'
2-
/*@cc_onfunction _(){var e=new ActiveXObject("Scripting.Dictionary");return{set:function(n,t){e.Add(n,t)},get:function(n){return e.Item(n)},add:function(n){e.Add(n,"")},has:function(n){return e.Exists(n)},delete:function(n){e.Remove(n)}}}window.Map=window.Map||_;window.WeakMap=window.WeakMap||_;window.Set=window.Set|| _@*/var globalThis=globalThis||window,reportError=reportError||function reportError(t){try{try{var e=new ErrorEvent('error',{message:t.message,error:t})}catch(_){e=document.createEvent('ErrorEvent')
2+
/*@cc_on function _(){var e=new ActiveXObject("Scripting.Dictionary");return{set:function(n,t){e.Add(n,t)},get:function(n){return e.Item(n)},add:function(n){e.Add(n,"")},has:function(n){return e.Exists(n)},delete:function(n){e.Exists(n)&&e.Remove(n)}}}window.Map=window.Map||_;window.WeakMap=window.WeakMap||_;window.Set=window.Set|| _;@*/var globalThis=globalThis||window,reportError=reportError||function reportError(t){try{try{var e=new ErrorEvent('error',{message:t.message,error:t})}catch(_){e=document.createEvent('ErrorEvent')
33
e.initEvent('error',!0,!0)}window.dispatchEvent(e)
44
e.defaultPrevented||console.error('[reportError]',String(t))}catch(o){console.warn(String(o))}}
55
Object.hasOwn=Object.hasOwn||hasOwnProperty.call.bind(hasOwnProperty)
6-
var CSS=CSS||function(){var D=document,p=D.head||D.body||D.documentElement||((p=D.currentScript)&&(p.parentNode||p))||D.querySelector('*')||D,s=p.appendChild(D.createElement('style')),computed=getComputedStyle(s);return{supports:supports};function supports(p,v){var k=p.substring(0,8)==='selector';if(k&&v==null){s.textContent=p.slice(9,-1)+'{width:auto}';return((s=s.sheet).rules||s.cssRules).length===1}return p in computed}}()
7-
''.startsWith||Object.defineProperty(String.prototype,'startsWith',{value:function(s,p){return this.slice(p=p|0,(s+='').length+p)===s}});[].find||Object.defineProperty(Array.prototype,'find',{value:function(c,t,m,z){for(var i=0,l=(m=this).length;i<l;++i){z=m[i];if(c.call(t,z))return z}}});''.includes||(String.prototype.includes=function(a,b){return!!~this.indexOf(a,b)})
8-
''.endsWith||Object.defineProperty(String.prototype,'endsWith',{
9-
value:function(s,p){s+='';var len=p===void 0?this.length:p|0;return this.slice(len-s.length,len)===s;}});[].findIndex||(Object.defineProperty(Array.prototype,'findIndex',{value:function findIndex(f,t){for(var i=0,m=this,l=m.length;i<l;++i)if(f.call(t,m[i],i,m))return i;return-1}}))
10-
var Symbol=Symbol||function(){function a(b){return String(Math.random()+String(b)+performance.now()+String(Date.now()))}a.for=''.concat.bind('@@');return a}(),Reflect=Reflect||{apply:function(n,t,a){return n.apply(t,a)},getPrototypeOf:Object.getPrototypeOf||function(t){return t.__proto__},setPrototypeOf:Object.setPrototypeOf,defineProperty:Object.defineProperty,ownKeys:Object.getOwnPropertyNames,has:function(t,p){return t in p},set:function(t,p,v){t[p]=v},get:function(t,p){return t[p]},deleteProperty:function(t,p){return delete t[p]},construct:function(l,a,v){if(typeof l!=='function'||typeof v!=='function')throw TypeError('Constructor required');var out=new((v||l).bind.apply((v||l),[this].concat(a)));v&&Object.setPrototypeOf(out,l.prototype);return out},preventExtensions: Object.preventExtensions,isExtensible: Object.isExtensible,getOwnPropertyDescriptor: Object.getOwnPropertyDescriptor}
11-
Object.fromEntries=Object.fromEntries||function(l,o){o={};l.forEach(function(e,p){p=e[0];o[p]=e[1]});return o}
12-
Object.entries=Object.entries||function(o,i){var x=[];for(i in o)x.push([i,o[i]]);return x}
13-
''.at||Object.defineProperty(Array.prototype,'at',{value:String.prototype.at=function(i){i|=0;if(i<0)i+=this.length;var a=this[i];return typeof this==='string'?(a===void 0?'':a):a}})
14-
Element.prototype.toggleAttribute||Object.defineProperty(Element.prototype,'toggleAttribute',{value:function(a,f){typeof f==='boolean'?(f?this.setAttribute(a,''):this.removeAttribute(a)):this.toggleAttribute(a,!this.hasAttribute(a));return this.hasAttribute(a)}})
15-
Element.prototype.remove||function(v,n){for(var i=n.length;i--;)Object.defineProperty(n[i],'remove',{value:v})}(function(){var p=this.parentNode;p&&p.removeChild(this)},[DocumentType,Element,CharacterData])
6+
var CSS=CSS||function(){var D=document,p=D.head||D.body||D.documentElement||((p=D.currentScript)&&(p.parentNode||p))||D.querySelector('*')||D,s=p.appendChild(D.createElement('style')),computed=getComputedStyle(s)
7+
return{supports:supports}
8+
function supports(p,v){var k=p.substring(0,8)==='selector'
9+
if(k&&v==null){s.textContent=p.slice(9,-1)+'{width:auto}'
10+
var d=s.sheet
11+
return(d.rules||d.cssRules).length===1}return p in computed}}()
12+
''.startsWith||Object.defineProperty(String.prototype,'startsWith',{value:function(s,p){return this.slice(p=p|0,(s+='').length+p)===s}});[].find||Object.defineProperty(Array.prototype,'find',{value:function(c,t,m,z){for(var i=0,l=(m=this).length;i<l;++i){z=m[i]
13+
if(c.call(t,z))return z}}})
14+
''.includes||(String.prototype.includes=function(a,b){return!!~this.indexOf(a,b)})
15+
''.endsWith||Object.defineProperty(String.prototype,'endsWith',{value:function(s,p){s+=''
16+
var len=p===void 0?this.length:p|0
17+
return this.slice(len-s.length,len)===s}});[].findIndex||(Object.defineProperty(Array.prototype,'findIndex',{value:function findIndex(f,t){for(var i=0,m=this,l=m.length;i<l;++i)if(f.call(t,m[i],i,m))return i
18+
return-1}}))
19+
var Symbol=Symbol||function(){function a(b){return String(Math.random()+String(b)+performance.now()+String(Date.now()))}a.for=''.concat.bind('@@')
20+
return a}(),Reflect=Reflect||{apply:function(n,t,a){return n.apply(t,a)},getPrototypeOf:Object.getPrototypeOf||function(t){return t.__proto__},setPrototypeOf:Object.setPrototypeOf,defineProperty:Object.defineProperty,ownKeys:Object.getOwnPropertyNames,has:function(t,p){return t in p},set:function(t,p,v){t[p]=v},get:function(t,p){return t[p]},deleteProperty:function(t,p){return delete t[p]},construct:function(l,a,v){if(typeof l!=='function'||typeof v!=='function')throw TypeError('Constructor required')
21+
var out=new((v||l).bind.apply((v||l),[this].concat(a)))
22+
v&&Object.setPrototypeOf(out,l.prototype)
23+
return out},preventExtensions: Object.preventExtensions,isExtensible: Object.isExtensible,getOwnPropertyDescriptor: Object.getOwnPropertyDescriptor}
24+
Object.fromEntries=Object.fromEntries||function(l,o){o={}
25+
l.forEach(function(e,p){p=e[0]
26+
o[p]=e[1]})
27+
return o}
28+
Object.entries=Object.entries||function(o,i){var x=[]
29+
for(i in o)x.push([i,o[i]])
30+
return x}
31+
''.at||Object.defineProperty(Array.prototype,'at',{value:String.prototype.at=function(i){i|=0
32+
if(i<0)i+=this.length
33+
var a=this[i]
34+
return typeof this==='string'?(a===void 0?'':a):a}})
35+
Element.prototype.toggleAttribute||Object.defineProperty(Element.prototype,'toggleAttribute',{value:function(a,f){typeof f==='boolean'?(f?this.setAttribute(a,''):this.removeAttribute(a)):this.toggleAttribute(a,!this.hasAttribute(a))
36+
return this.hasAttribute(a)}})
37+
Element.prototype.remove||function(v,n){for(var i=n.length,p;i--;)(p=n[i]).remove||Object.defineProperty(p,'remove',{value:v})}(function(){var p=this.parentNode
38+
p&&p.removeChild(this)},[DocumentType,Element,CharacterData])

0 commit comments

Comments
 (0)