Socket
Socket
Sign inDemoInstall

shorter-js

Package Overview
Dependencies
Maintainers
1
Versions
82
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shorter-js - npm Package Compare versions

Comparing version 0.3.0-alpha24 to 0.3.0-alpha25

src/get/getUID.js

4

dist/shorter-js.esm.min.js

@@ -1,2 +0,2 @@

// shorter-js v0.3.0alpha24 | dnp_theme © 2022 | MIT-License
const e={DOMContentLoaded:"DOMContentLoaded",DOMMouseScroll:"DOMMouseScroll",abort:"abort",beforeunload:"beforeunload",blur:"blur",change:"change",click:"click",contextmenu:"contextmenu",dblclick:"dblclick",error:"error",focus:"focus",focusin:"focusin",focusout:"focusout",gesturechange:"gesturechange",gestureend:"gestureend",gesturestart:"gesturestart",hover:"hover",keydown:"keydown",keypress:"keypress",keyup:"keyup",load:"load",mousedown:"mousedown",mousemove:"mousemove",mousein:"mousein",mouseout:"mouseout",mouseenter:"mouseenter",mouseleave:"mouseleave",mouseover:"mouseover",mouseup:"mouseup",mousewheel:"mousewheel",move:"move",orientationchange:"orientationchange",pointercancel:"pointercancel",pointerdown:"pointerdown",pointerleave:"pointerleave",pointermove:"pointermove",pointerup:"pointerup",readystatechange:"readystatechange",reset:"reset",resize:"resize",scroll:"scroll",select:"select",selectend:"selectend",selectstart:"selectstart",submit:"submit",touchcancel:"touchcancel",touchend:"touchend",touchmove:"touchmove",touchstart:"touchstart",unload:"unload"},t="onmouseleave"in document?["mouseenter","mouseleave"]:["mouseover","mouseout"],{head:n}=document,o="webkitAnimation"in n.style?"webkitAnimationDuration":"animationDuration",i="webkitAnimation"in n.style?"webkitAnimationDelay":"animationDelay",a="webkitAnimation"in n.style?"webkitAnimationName":"animationName",s="webkitAnimation"in n.style?"webkitAnimationEnd":"animationend",r="webkitTransition"in n.style?"webkitTransitionDuration":"transitionDuration",c="webkitTransition"in n.style?"webkitTransitionDelay":"transitionDelay",u="webkitTransition"in n.style?"webkitTransitionEnd":"transitionend",l="webkitTransition"in n.style?"webkitTransitionProperty":"transitionProperty",{userAgentData:m}=navigator,d=m,{userAgent:g}=navigator,f=g,p=/iPhone|iPad|iPod|Android/i;let E=!1;E=d?d.brands.some(e=>p.test(e.brand)):p.test(f);const v=E,b=/(iPhone|iPod|iPad)/,y=d?d.brands.some(e=>b.test(e.brand)):b.test(f),h=!!f&&f.includes("Firefox"),w="webkitPerspective"in n.style||"perspective"in n.style;function A(e,t,n,o){const i=o||!1;e.addEventListener(t,n,i)}function k(e,t,n,o){const i=o||!1;e.removeEventListener(t,n,i)}function L(e,t,n,o){const i=a=>{a.target===e&&(n.apply(e,[a]),k(e,t,i,o))};A(e,t,i,o)}const D=(()=>{let e=!1;try{const t=Object.defineProperty({},"passive",{get:()=>(e=!0,e)});L(document,"DOMContentLoaded",()=>{},t)}catch(e){throw Error("Passive events are not supported")}return e})(),N="webkitTransform"in n.style||"transform"in n.style,T="ontouchstart"in window||"msMaxTouchPoints"in navigator,M="webkitAnimation"in n.style||"animation"in n.style,S="webkitTransition"in n.style||"transition"in n.style,C=(e,t)=>e.getAttribute(t);function O(e){return e instanceof HTMLElement?e.ownerDocument:e instanceof Window?e.document:window.document}const z=[Document,Element,HTMLElement],H=[Element,HTMLElement];function I(e,t){const n=z.some(e=>t instanceof e)?t:O();return H.some(t=>e instanceof t)?e:n.querySelector(e)}const P=new Map,x={set:(e,t,n)=>{const o=I(e);if(!o)return;P.has(t)||P.set(t,new Map);P.get(t).set(o,n)},getAllFor:e=>P.get(e)||null,get:(e,t)=>{const n=I(e),o=x.getAllFor(t);return n&&o&&o.get(n)||null},remove:(e,t)=>{const n=I(e),o=P.get(t);o&&n&&(o.delete(n),0===o.size&&P.delete(t))}};function F(e,t){const n=getComputedStyle(e);return t in n?n[t]:""}function B(e){const t=F(e,"animationName"),n=F(e,"animationDelay"),o=n.includes("ms")?1:1e3,i=t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function R(e){const t=F(e,"animationName"),n=F(e,"animationDuration"),o=n.includes("ms")?1:1e3,i=t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function W(e){const t=F(e,a),n=F(e,i),o=n.includes("ms")?1:1e3,s=M&&t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(s)?0:s}function Q(e){const t=F(e,a),n=F(e,o),i=n.includes("ms")?1:1e3,s=M&&t&&"none"!==t?parseFloat(n)*i:0;return Number.isNaN(s)?0:s}function V(e){const t=F(e,"transitionProperty"),n=F(e,"transitionDelay"),o=n.includes("ms")?1:1e3,i=t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function j(e){const t=F(e,"transitionProperty"),n=F(e,"transitionDuration"),o=n.includes("ms")?1:1e3,i=t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function U(e){const t=F(e,l),n=F(e,c),o=n.includes("ms")?1:1e3,i=S&&t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function q(e){const t=F(e,l),n=F(e,r),o=n.includes("ms")?1:1e3,i=S&&t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}let G=1;const K=new Map;function X(e){return"true"===e||"false"!==e&&(Number.isNaN(+e)?""===e||"null"===e?null:e:+e)}const $=e=>Object.keys(e),Y=e=>e.toLowerCase();const Z=(e,t)=>Object.assign(e,t);const J=!!D&&{passive:!0},_=new Map,ee={set:(e,t,n,o)=>{const i=I(e);if(i)if(o&&o.length){_.has(i)||_.set(i,new Map);_.get(i).set(o,setTimeout(t,n))}else _.set(i,setTimeout(t,n))},get:(e,t)=>{const n=I(e);if(!n)return null;const o=_.get(n);return t&&t.length&&o&&o.get?o.get(t)||null:o||null},clear:(e,t)=>{const n=I(e);if(n)if(t&&t.length){const e=_.get(n);e&&e.get&&(clearTimeout(e.get(t)),e.delete(t),0===e.size&&_.delete(n))}else clearTimeout(_.get(n)),_.delete(n)}};function te(e,t){const{width:n,height:o,top:i,right:a,bottom:s,left:r}=e.getBoundingClientRect();let c=1,u=1;if(t&&e instanceof HTMLElement){const{offsetWidth:t,offsetHeight:i}=e;c=t>0&&Math.round(n)/t||1,u=i>0&&Math.round(o)/i||1}return{width:n/c,height:o/u,top:i/u,right:a/c,bottom:s/u,left:r/c,x:r/c,y:i/u}}function ne(e){return O(e).documentElement}function oe(e){if(null==e)return window;if(!(e instanceof Window)){const{ownerDocument:t}=e;return t&&t.defaultView||window}return e}const ie=e=>e instanceof oe(e).ShadowRoot||e instanceof ShadowRoot;function ae(e){const{width:t,height:n}=te(e),{offsetWidth:o,offsetHeight:i}=e;return Math.round(t)!==o||Math.round(n)!==i}const se=e=>e&&!!e.shadowRoot;function re(e,t){return(t&&z.some(e=>t instanceof e)?t:O()).getElementsByTagName(e)}const ce=re("*");const ue=Element.prototype,le=ue.matches||ue.matchesSelector||ue.webkitMatchesSelector||ue.mozMatchesSelector||ue.msMatchesSelector||ue.oMatchesSelector||function(){return!1};const me={ariaChecked:"aria-checked",ariaDescribedBy:"aria-describedby",ariaExpanded:"aria-expanded",ariaHidden:"aria-hidden",ariaLabel:"aria-label",ariaLabelledBy:"aria-labelledby",ariaModal:"aria-modal",ariaPressed:"aria-pressed",ariaSelected:"aria-selected",nativeEvents:e,abortEvent:"abort",blurEvent:"blur",moveEvent:"move",changeEvent:"change",errorEvent:"error",resetEvent:"reset",resizeEvent:"resize",scrollEvent:"scroll",submitEvent:"submit",loadEvent:"load",loadstartEvent:"loadstart",unloadEvent:"unload",readystatechangeEvent:"readystatechange",beforeunloadEvent:"beforeunload",orientationchangeEvent:"orientationchange",contextmenuEvent:"contextmenu",DOMContentLoadedEvent:"DOMContentLoaded",DOMMouseScrollEvent:"DOMMouseScroll",selectEvent:"select",selectendEvent:"selectend",selectstartEvent:"selectstart",mouseClickEvents:{down:"mousedown",up:"mouseup"},mouseclickEvent:"click",mousedblclickEvent:"dblclick",mousedownEvent:"mousedown",mouseupEvent:"mouseup",mousehoverEvent:"hover",mouseHoverEvents:t,mouseenterEvent:"mouseenter",mouseleaveEvent:"mouseleave",mouseinEvent:"mousein",mouseoutEvent:"mouseout",mouseoverEvent:"mouseover",mousemoveEvent:"mousemove",mousewheelEvent:"mousewheel",mouseSwipeEvents:{start:"mousedown",end:"mouseup",move:"mousemove",cancel:"mouseleave"},touchEvents:{start:"touchstart",end:"touchend",move:"touchmove",cancel:"touchcancel"},touchstartEvent:"touchstart",touchmoveEvent:"touchmove",touchcancelEvent:"touchcancel",touchendEvent:"touchend",pointercancelEvent:"pointercancel",pointerdownEvent:"pointerdown",pointerleaveEvent:"pointerleave",pointermoveEvent:"pointermove",pointerupEvent:"pointerup",focusEvents:{in:"focusin",out:"focusout"},focusEvent:"focus",focusinEvent:"focusin",focusoutEvent:"focusout",gesturechangeEvent:"gesturechange",gestureendEvent:"gestureend",gesturestartEvent:"gesturestart",bezierEasings:{linear:"linear",easingSinusoidalIn:"cubic-bezier(0.47,0,0.745,0.715)",easingSinusoidalOut:"cubic-bezier(0.39,0.575,0.565,1)",easingSinusoidalInOut:"cubic-bezier(0.445,0.05,0.55,0.95)",easingQuadraticIn:"cubic-bezier(0.550,0.085,0.680,0.530)",easingQuadraticOut:"cubic-bezier(0.250,0.460,0.450,0.940)",easingQuadraticInOut:"cubic-bezier(0.455,0.030,0.515,0.955)",easingCubicIn:"cubic-bezier(0.55,0.055,0.675,0.19)",easingCubicOut:"cubic-bezier(0.215,0.61,0.355,1)",easingCubicInOut:"cubic-bezier(0.645,0.045,0.355,1)",easingQuarticIn:"cubic-bezier(0.895,0.03,0.685,0.22)",easingQuarticOut:"cubic-bezier(0.165,0.84,0.44,1)",easingQuarticInOut:"cubic-bezier(0.77,0,0.175,1)",easingQuinticIn:"cubic-bezier(0.755,0.05,0.855,0.06)",easingQuinticOut:"cubic-bezier(0.23,1,0.32,1)",easingQuinticInOut:"cubic-bezier(0.86,0,0.07,1)",easingExponentialIn:"cubic-bezier(0.95,0.05,0.795,0.035)",easingExponentialOut:"cubic-bezier(0.19,1,0.22,1)",easingExponentialInOut:"cubic-bezier(1,0,0,1)",easingCircularIn:"cubic-bezier(0.6,0.04,0.98,0.335)",easingCircularOut:"cubic-bezier(0.075,0.82,0.165,1)",easingCircularInOut:"cubic-bezier(0.785,0.135,0.15,0.86)",easingBackIn:"cubic-bezier(0.6,-0.28,0.735,0.045)",easingBackOut:"cubic-bezier(0.175,0.885,0.32,1.275)",easingBackInOut:"cubic-bezier(0.68,-0.55,0.265,1.55)"},animationDuration:"animationDuration",animationDurationLegacy:o,animationDelay:"animationDelay",animationDelayLegacy:i,animationName:"animationName",animationNameLegacy:a,animationEndEvent:"animationend",animationEndEventLegacy:s,transitionDuration:"transitionDuration",transitionDurationLegacy:r,transitionDelay:"transitionDelay",transitionDelayLegacy:c,transitionEndEvent:"transitionend",transitionEndEventLegacy:u,transitionProperty:"transitionProperty",transitionPropertyLegacy:l,isMobile:v,isApple:y,isFirefox:h,support3DTransform:w,supportPassive:D,supportTransform:N,supportTouch:T,supportAnimation:M,supportTransition:S,addEventListener:"addEventListener",removeEventListener:"removeEventListener",keyboardEventKeys:{Backspace:"Backspace",Tab:"Tab",Enter:"Enter",Shift:"Shift",Control:"Control",Alt:"Alt",Pause:"Pause",CapsLock:"CapsLock",Escape:"Escape",Scape:"Space",ArrowLeft:"ArrowLeft",ArrowUp:"ArrowUp",ArrowRight:"ArrowRight",ArrowDown:"ArrowDown",Insert:"Insert",Delete:"Delete",Meta:"Meta",ContextMenu:"ContextMenu",ScrollLock:"ScrollLock"},keydownEvent:"keydown",keypressEvent:"keypress",keyupEvent:"keyup",keyAlt:"Alt",keyArrowDown:"ArrowDown",keyArrowLeft:"ArrowLeft",keyArrowRight:"ArrowRight",keyArrowUp:"ArrowUp",keyBackspace:"Backspace",keyCapsLock:"CapsLock",keyControl:"Control",keyDelete:"Delete",keyEnter:"Enter",keyEscape:"Escape",keyInsert:"Insert",keyMeta:"Meta",keyPause:"Pause",keyScrollLock:"ScrollLock",keyShift:"Shift",keySpace:"Space",keyTab:"Tab",offsetHeight:"offsetHeight",offsetWidth:"offsetWidth",scrollHeight:"scrollHeight",scrollWidth:"scrollWidth",userAgentData:d,userAgent:f,addClass:function(e,t){e.classList.add(t)},removeClass:function(e,t){e.classList.remove(t)},hasClass:function(e,t){return e.classList.contains(t)},on:A,off:k,one:L,dispatchEvent:(e,t)=>e.dispatchEvent(t),distinct:(e,t,n)=>n.indexOf(e)===t,Data:x,toUpperCase:e=>e.toUpperCase(),toLowerCase:Y,Timer:ee,getInstance:(e,t)=>x.get(e,t),emulateAnimationEnd:function(e,t){let n=0;const o=new Event("animationend"),i=R(e),a=B(e);if(i){const s=o=>{o.target===e&&(t.apply(e,[o]),e.removeEventListener("animationend",s),n=1)};e.addEventListener("animationend",s),setTimeout(()=>{n||e.dispatchEvent(o)},i+a+17)}else t.apply(e,[o])},emulateAnimationEndLegacy:function(e,t){let n=0;const o=new Event(s),i=Q(e),a=W(e);if(M&&i){const r=o=>{o.target===e&&(t.apply(e,[o]),e.removeEventListener(s,r),n=1)};e.addEventListener(s,r),setTimeout(()=>{n||e.dispatchEvent(o)},i+a+17)}else t.apply(e,[o])},emulateTransitionEnd:function(e,t){let n=0;const o=new Event("transitionend"),i=j(e),a=V(e);if(i){const s=o=>{o.target===e&&(t.apply(e,[o]),e.removeEventListener("transitionend",s),n=1)};e.addEventListener("transitionend",s),setTimeout(()=>{n||e.dispatchEvent(o)},i+a+17)}else t.apply(e,[o])},emulateTransitionEndLegacy:function(e,t){let n=0;const o=new Event(u),i=q(e),a=U(e);if(S&&i){const s=o=>{o.target===e&&(t.apply(e,[o]),e.removeEventListener(u,s),n=1)};e.addEventListener(u,s),setTimeout(()=>{n||e.dispatchEvent(o)},i+a+17)}else t.apply(e,[o])},isElementInScrollRange:e=>{const{top:t,bottom:n}=te(e),{clientHeight:o}=ne(e);return t<=o&&n>=0},isElementInViewport:e=>{const{top:t,left:n,bottom:o,right:i}=te(e,!0),{clientWidth:a,clientHeight:s}=ne(e);return t>=0&&n>=0&&o<=s&&i<=a},passiveHandler:{passive:!0},passiveHandlerLegacy:J,getElementAnimationDuration:R,getElementAnimationDurationLegacy:Q,getElementAnimationDelay:B,getElementAnimationDelayLegacy:W,getElementTransitionDuration:j,getElementTransitionDurationLegacy:q,getElementTransitionDelay:V,getElementTransitionDelayLegacy:U,getNodeScroll:function(e){const t="scrollX"in e;return{x:t?e.scrollX:e.scrollLeft,y:t?e.scrollY:e.scrollTop}},getParentNode:function(e){return"HTML"===e.nodeName?e:e.assignedSlot||e.parentNode||(ie(e)?e.host:null)||ne(e)},getRectRelativeToOffsetParent:function(e,t,n){const o=t instanceof HTMLElement,i=te(e,o&&ae(t)),a={x:0,y:0};if(o){const e=te(t,!0);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}return{x:i.left+n.x-a.x,y:i.top+n.y-a.y,width:i.width,height:i.height}},getWindow:oe,isArray:e=>Array.isArray(e),isString:e=>"string"==typeof e,isCustomElement:se,isElement:e=>e instanceof Element,isNode:e=>e instanceof Node,isHTMLElement:e=>e instanceof HTMLElement,isHTMLImageElement:e=>e instanceof HTMLImageElement,isSVGElement:e=>e instanceof SVGElement,isNodeList:e=>e instanceof NodeList,isHTMLCollection:e=>e instanceof HTMLCollection,isScaledElement:ae,isTableElement:e=>["TABLE","TD","TH"].includes(e.tagName),isShadowRoot:ie,isDocument:e=>e instanceof Document,isElementsArray:e=>Array.isArray(e)&&e.every(e=>[HTMLElement,Element].some(t=>e instanceof t)),isWindow:function(e){return e instanceof Window},isMedia:e=>e&&[SVGElement,HTMLImageElement,HTMLVideoElement].some(t=>e instanceof t),isRTL:e=>"rtl"===ne(e).dir,elementNodes:H,parentNodes:z,closest:function e(t,n){return t?t.closest(n)||e(t.getRootNode().host,n):null},documentAll:ce,querySelector:I,getCustomElements:function(e){return[...e&&z.some(t=>e instanceof t)?re("*",e):ce].filter(se)},querySelectorAll:function(e,t){return(t&&z.some(e=>t instanceof e)?t:O()).querySelectorAll(e)},getElementsByClassName:function(e,t){return(t&&z.some(e=>t instanceof e)?t:O()).getElementsByClassName(e)},getElementsByTagName:re,matches:function(e,t){return e.matches(t)},matchesLegacy:function(e,t){return le.call(e,t)},normalizeValue:X,normalizeOptions:function(e,t,n,o){const i={...e.dataset},a={},s={};return $(i).forEach(e=>{const t=o&&e.includes(o)?e.replace(o,"").replace(/[A-Z]/,e=>Y(e)):e;s[t]=X(i[e])}),$(n).forEach(e=>{n[e]=X(n[e])}),$(t).forEach(o=>{a[o]=o in n?n[o]:o in s?s[o]:"title"===o?C(e,"title"):t[o]}),a},tryWrapper:function(e,t){try{e()}catch(e){throw TypeError(`${t} ${e}`)}},reflow:e=>e.offsetHeight,noop:()=>{},focus:e=>e.focus(),getUID:function(e,t){G+=1;let n=K.get(e),o=G;if(t&&t.length)if(n){const e=n.get(t);Number.isNaN(e)?n.set(t,o):o=e}else K.set(e,new Map),n=K.get(e),n.set(t,o);else Number.isNaN(n)?K.set(e,o):o=n;return o},ArrayFrom:e=>Array.from(e),Float32ArrayFrom:e=>Float32Array.from(Array.from(e)),Float64ArrayFrom:e=>Float64Array.from(Array.from(e)),ObjectAssign:Z,ObjectKeys:$,ObjectValues:e=>Object.values(e),OriginalEvent:function(e,t){const n=new CustomEvent(e,{cancelable:!0,bubbles:!0});return t instanceof Object&&Z(n,t),n},getBoundingClientRect:te,getDocument:O,getDocumentBody:function(e){return O(e).body},getDocumentElement:ne,getDocumentHead:function(e){return O(e).head},getElementStyle:F,setElementStyle:(e,t)=>{Z(e.style,t)},hasAttribute:(e,t)=>e.hasAttribute(t),hasAttributeNS:(e,t,n)=>e.hasAttributeNS(n||null,t),getAttribute:C,getAttributeNS:(e,t,n)=>e.getAttributeNS(n||null,t),setAttribute:(e,t,n)=>e.setAttribute(t,n),setAttributeNS:(e,t,n,o)=>e.setAttributeNS(o||null,t,n),removeAttribute:(e,t)=>e.removeAttribute(t),removeAttributeNS:(e,t,n)=>e.removeAttributeNS(n||null,t),Version:"0.3.0alpha24"};export{me as default};
// shorter-js v0.3.0alpha25 | dnp_theme © 2022 | MIT-License
const e={DOMContentLoaded:"DOMContentLoaded",DOMMouseScroll:"DOMMouseScroll",abort:"abort",beforeunload:"beforeunload",blur:"blur",change:"change",click:"click",contextmenu:"contextmenu",dblclick:"dblclick",error:"error",focus:"focus",focusin:"focusin",focusout:"focusout",gesturechange:"gesturechange",gestureend:"gestureend",gesturestart:"gesturestart",hover:"hover",keydown:"keydown",keypress:"keypress",keyup:"keyup",load:"load",mousedown:"mousedown",mousemove:"mousemove",mousein:"mousein",mouseout:"mouseout",mouseenter:"mouseenter",mouseleave:"mouseleave",mouseover:"mouseover",mouseup:"mouseup",mousewheel:"mousewheel",move:"move",orientationchange:"orientationchange",pointercancel:"pointercancel",pointerdown:"pointerdown",pointerleave:"pointerleave",pointermove:"pointermove",pointerup:"pointerup",readystatechange:"readystatechange",reset:"reset",resize:"resize",scroll:"scroll",select:"select",selectend:"selectend",selectstart:"selectstart",submit:"submit",touchcancel:"touchcancel",touchend:"touchend",touchmove:"touchmove",touchstart:"touchstart",unload:"unload"},t="onmouseleave"in document?["mouseenter","mouseleave"]:["mouseover","mouseout"],{head:n}=document,o="webkitAnimation"in n.style?"webkitAnimationDuration":"animationDuration",i="webkitAnimation"in n.style?"webkitAnimationDelay":"animationDelay",a="webkitAnimation"in n.style?"webkitAnimationName":"animationName",r="webkitAnimation"in n.style?"webkitAnimationEnd":"animationend",s="webkitTransition"in n.style?"webkitTransitionDuration":"transitionDuration",c="webkitTransition"in n.style?"webkitTransitionDelay":"transitionDelay",u="webkitTransition"in n.style?"webkitTransitionEnd":"transitionend",l="webkitTransition"in n.style?"webkitTransitionProperty":"transitionProperty",{userAgentData:m}=navigator,d=m,{userAgent:g}=navigator,f=g,E=/iPhone|iPad|iPod|Android/i;let p=!1;p=d?d.brands.some(e=>E.test(e.brand)):E.test(f);const v=p,b=/(iPhone|iPod|iPad)/,y=d?d.brands.some(e=>b.test(e.brand)):b.test(f),h=!!f&&f.includes("Firefox"),w="webkitPerspective"in n.style||"perspective"in n.style;function A(e,t,n,o){const i=o||!1;e.addEventListener(t,n,i)}function k(e,t,n,o){const i=o||!1;e.removeEventListener(t,n,i)}function L(e,t,n,o){const i=a=>{a.target===e&&(n.apply(e,[a]),k(e,t,i,o))};A(e,t,i,o)}const N=(()=>{let e=!1;try{const t=Object.defineProperty({},"passive",{get:()=>(e=!0,e)});L(document,"DOMContentLoaded",()=>{},t)}catch(e){throw Error("Passive events are not supported")}return e})(),D="webkitTransform"in n.style||"transform"in n.style,T="ontouchstart"in window||"msMaxTouchPoints"in navigator,S="webkitAnimation"in n.style||"animation"in n.style,M="webkitTransition"in n.style||"transition"in n.style,C=(e,t)=>e.getAttribute(t);function O(e){return e instanceof HTMLElement?e.ownerDocument:e instanceof Window?e.document:window.document}const z=[Document,Element,HTMLElement],H=[Element,HTMLElement];function I(e,t){const n=z.some(e=>t instanceof e)?t:O();return H.some(t=>e instanceof t)?e:n.querySelector(e)}const P=new Map,x={set:(e,t,n)=>{const o=I(e);if(!o)return;P.has(t)||P.set(t,new Map);P.get(t).set(o,n)},getAllFor:e=>P.get(e)||null,get:(e,t)=>{const n=I(e),o=x.getAllFor(t);return n&&o&&o.get(n)||null},remove:(e,t)=>{const n=I(e),o=P.get(t);o&&n&&(o.delete(n),0===o.size&&P.delete(t))}},B=(e,t)=>Object.assign(e,t);function F(e,t){const n=getComputedStyle(e);return t in n?n[t]:""}function R(e){const t=F(e,"animationName"),n=F(e,"animationDelay"),o=n.includes("ms")?1:1e3,i=t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function W(e){const t=F(e,"animationName"),n=F(e,"animationDuration"),o=n.includes("ms")?1:1e3,i=t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function Q(e){const t=F(e,a),n=F(e,i),o=n.includes("ms")?1:1e3,r=S&&t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(r)?0:r}function V(e){const t=F(e,a),n=F(e,o),i=n.includes("ms")?1:1e3,r=S&&t&&"none"!==t?parseFloat(n)*i:0;return Number.isNaN(r)?0:r}function j(e){const t=F(e,"transitionProperty"),n=F(e,"transitionDelay"),o=n.includes("ms")?1:1e3,i=t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function U(e){const t=F(e,"transitionProperty"),n=F(e,"transitionDuration"),o=n.includes("ms")?1:1e3,i=t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function q(e){const t=F(e,l),n=F(e,c),o=n.includes("ms")?1:1e3,i=M&&t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function G(e){const t=F(e,l),n=F(e,s),o=n.includes("ms")?1:1e3,i=M&&t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function K(e){return"true"===e||"false"!==e&&(Number.isNaN(+e)?""===e||"null"===e?null:e:+e)}const X=e=>Object.keys(e),$=e=>e.toLowerCase();const Y=!!N&&{passive:!0},Z=new Map,J={set:(e,t,n,o)=>{const i=I(e);if(i)if(o&&o.length){Z.has(i)||Z.set(i,new Map);Z.get(i).set(o,setTimeout(t,n))}else Z.set(i,setTimeout(t,n))},get:(e,t)=>{const n=I(e);if(!n)return null;const o=Z.get(n);return t&&t.length&&o&&o.get?o.get(t)||null:o||null},clear:(e,t)=>{const n=I(e);if(n)if(t&&t.length){const e=Z.get(n);e&&e.get&&(clearTimeout(e.get(t)),e.delete(t),0===e.size&&Z.delete(n))}else clearTimeout(Z.get(n)),Z.delete(n)}};function _(e,t){const{width:n,height:o,top:i,right:a,bottom:r,left:s}=e.getBoundingClientRect();let c=1,u=1;if(t&&e instanceof HTMLElement){const{offsetWidth:t,offsetHeight:i}=e;c=t>0&&Math.round(n)/t||1,u=i>0&&Math.round(o)/i||1}return{width:n/c,height:o/u,top:i/u,right:a/c,bottom:r/u,left:s/c,x:s/c,y:i/u}}function ee(e){return O(e).documentElement}function te(e){if(null==e)return window;if(!(e instanceof Window)){const{ownerDocument:t}=e;return t&&t.defaultView||window}return e}const ne=e=>e instanceof te(e).ShadowRoot||e instanceof ShadowRoot;function oe(e){const{width:t,height:n}=_(e),{offsetWidth:o,offsetHeight:i}=e;return Math.round(t)!==o||Math.round(n)!==i}let ie=1;const ae=new Map;const re=e=>e&&!!e.shadowRoot;function se(e,t){return(t&&z.some(e=>t instanceof e)?t:O()).getElementsByTagName(e)}const ce=se("*");const ue=Element.prototype,le=ue.matches||ue.matchesSelector||ue.webkitMatchesSelector||ue.mozMatchesSelector||ue.msMatchesSelector||ue.oMatchesSelector||function(){return!1};const me={ariaChecked:"aria-checked",ariaDescribedBy:"aria-describedby",ariaExpanded:"aria-expanded",ariaHidden:"aria-hidden",ariaLabel:"aria-label",ariaLabelledBy:"aria-labelledby",ariaModal:"aria-modal",ariaPressed:"aria-pressed",ariaSelected:"aria-selected",nativeEvents:e,abortEvent:"abort",blurEvent:"blur",moveEvent:"move",changeEvent:"change",errorEvent:"error",resetEvent:"reset",resizeEvent:"resize",scrollEvent:"scroll",submitEvent:"submit",loadEvent:"load",loadstartEvent:"loadstart",unloadEvent:"unload",readystatechangeEvent:"readystatechange",beforeunloadEvent:"beforeunload",orientationchangeEvent:"orientationchange",contextmenuEvent:"contextmenu",DOMContentLoadedEvent:"DOMContentLoaded",DOMMouseScrollEvent:"DOMMouseScroll",selectEvent:"select",selectendEvent:"selectend",selectstartEvent:"selectstart",mouseClickEvents:{down:"mousedown",up:"mouseup"},mouseclickEvent:"click",mousedblclickEvent:"dblclick",mousedownEvent:"mousedown",mouseupEvent:"mouseup",mousehoverEvent:"hover",mouseHoverEvents:t,mouseenterEvent:"mouseenter",mouseleaveEvent:"mouseleave",mouseinEvent:"mousein",mouseoutEvent:"mouseout",mouseoverEvent:"mouseover",mousemoveEvent:"mousemove",mousewheelEvent:"mousewheel",mouseSwipeEvents:{start:"mousedown",end:"mouseup",move:"mousemove",cancel:"mouseleave"},touchEvents:{start:"touchstart",end:"touchend",move:"touchmove",cancel:"touchcancel"},touchstartEvent:"touchstart",touchmoveEvent:"touchmove",touchcancelEvent:"touchcancel",touchendEvent:"touchend",pointercancelEvent:"pointercancel",pointerdownEvent:"pointerdown",pointerleaveEvent:"pointerleave",pointermoveEvent:"pointermove",pointerupEvent:"pointerup",focusEvents:{in:"focusin",out:"focusout"},focusEvent:"focus",focusinEvent:"focusin",focusoutEvent:"focusout",gesturechangeEvent:"gesturechange",gestureendEvent:"gestureend",gesturestartEvent:"gesturestart",bezierEasings:{linear:"linear",easingSinusoidalIn:"cubic-bezier(0.47,0,0.745,0.715)",easingSinusoidalOut:"cubic-bezier(0.39,0.575,0.565,1)",easingSinusoidalInOut:"cubic-bezier(0.445,0.05,0.55,0.95)",easingQuadraticIn:"cubic-bezier(0.550,0.085,0.680,0.530)",easingQuadraticOut:"cubic-bezier(0.250,0.460,0.450,0.940)",easingQuadraticInOut:"cubic-bezier(0.455,0.030,0.515,0.955)",easingCubicIn:"cubic-bezier(0.55,0.055,0.675,0.19)",easingCubicOut:"cubic-bezier(0.215,0.61,0.355,1)",easingCubicInOut:"cubic-bezier(0.645,0.045,0.355,1)",easingQuarticIn:"cubic-bezier(0.895,0.03,0.685,0.22)",easingQuarticOut:"cubic-bezier(0.165,0.84,0.44,1)",easingQuarticInOut:"cubic-bezier(0.77,0,0.175,1)",easingQuinticIn:"cubic-bezier(0.755,0.05,0.855,0.06)",easingQuinticOut:"cubic-bezier(0.23,1,0.32,1)",easingQuinticInOut:"cubic-bezier(0.86,0,0.07,1)",easingExponentialIn:"cubic-bezier(0.95,0.05,0.795,0.035)",easingExponentialOut:"cubic-bezier(0.19,1,0.22,1)",easingExponentialInOut:"cubic-bezier(1,0,0,1)",easingCircularIn:"cubic-bezier(0.6,0.04,0.98,0.335)",easingCircularOut:"cubic-bezier(0.075,0.82,0.165,1)",easingCircularInOut:"cubic-bezier(0.785,0.135,0.15,0.86)",easingBackIn:"cubic-bezier(0.6,-0.28,0.735,0.045)",easingBackOut:"cubic-bezier(0.175,0.885,0.32,1.275)",easingBackInOut:"cubic-bezier(0.68,-0.55,0.265,1.55)"},animationDuration:"animationDuration",animationDurationLegacy:o,animationDelay:"animationDelay",animationDelayLegacy:i,animationName:"animationName",animationNameLegacy:a,animationEndEvent:"animationend",animationEndEventLegacy:r,transitionDuration:"transitionDuration",transitionDurationLegacy:s,transitionDelay:"transitionDelay",transitionDelayLegacy:c,transitionEndEvent:"transitionend",transitionEndEventLegacy:u,transitionProperty:"transitionProperty",transitionPropertyLegacy:l,isMobile:v,isApple:y,isFirefox:h,support3DTransform:w,supportPassive:N,supportTransform:D,supportTouch:T,supportAnimation:S,supportTransition:M,addEventListener:"addEventListener",removeEventListener:"removeEventListener",keyboardEventKeys:{Backspace:"Backspace",Tab:"Tab",Enter:"Enter",Shift:"Shift",Control:"Control",Alt:"Alt",Pause:"Pause",CapsLock:"CapsLock",Escape:"Escape",Scape:"Space",ArrowLeft:"ArrowLeft",ArrowUp:"ArrowUp",ArrowRight:"ArrowRight",ArrowDown:"ArrowDown",Insert:"Insert",Delete:"Delete",Meta:"Meta",ContextMenu:"ContextMenu",ScrollLock:"ScrollLock"},keydownEvent:"keydown",keypressEvent:"keypress",keyupEvent:"keyup",keyAlt:"Alt",keyArrowDown:"ArrowDown",keyArrowLeft:"ArrowLeft",keyArrowRight:"ArrowRight",keyArrowUp:"ArrowUp",keyBackspace:"Backspace",keyCapsLock:"CapsLock",keyControl:"Control",keyDelete:"Delete",keyEnter:"Enter",keyEscape:"Escape",keyInsert:"Insert",keyMeta:"Meta",keyPause:"Pause",keyScrollLock:"ScrollLock",keyShift:"Shift",keySpace:"Space",keyTab:"Tab",offsetHeight:"offsetHeight",offsetWidth:"offsetWidth",scrollHeight:"scrollHeight",scrollWidth:"scrollWidth",userAgentData:d,userAgent:f,addClass:function(e,t){e.classList.add(t)},removeClass:function(e,t){e.classList.remove(t)},hasClass:function(e,t){return e.classList.contains(t)},on:A,off:k,one:L,dispatchEvent:(e,t)=>e.dispatchEvent(t),distinct:(e,t,n)=>n.indexOf(e)===t,Data:x,getInstance:(e,t)=>x.get(e,t),createElement:function e(t){if("string"==typeof t)return O().createElement(t);const{tagName:n}=t,o={...t},i=e(n);return delete o.tagName,B(i,o),i},createElementNS:function e(t,n){if("string"==typeof n)return O().createElementNS(t,n);const{tagName:o}=n,i={...n},a=e(t,o);return delete i.tagName,B(a,i),a},toUpperCase:e=>e.toUpperCase(),toLowerCase:$,Timer:J,emulateAnimationEnd:function(e,t){let n=0;const o=new Event("animationend"),i=W(e),a=R(e);if(i){const r=o=>{o.target===e&&(t.apply(e,[o]),e.removeEventListener("animationend",r),n=1)};e.addEventListener("animationend",r),setTimeout(()=>{n||e.dispatchEvent(o)},i+a+17)}else t.apply(e,[o])},emulateAnimationEndLegacy:function(e,t){let n=0;const o=new Event(r),i=V(e),a=Q(e);if(S&&i){const s=o=>{o.target===e&&(t.apply(e,[o]),e.removeEventListener(r,s),n=1)};e.addEventListener(r,s),setTimeout(()=>{n||e.dispatchEvent(o)},i+a+17)}else t.apply(e,[o])},emulateTransitionEnd:function(e,t){let n=0;const o=new Event("transitionend"),i=U(e),a=j(e);if(i){const r=o=>{o.target===e&&(t.apply(e,[o]),e.removeEventListener("transitionend",r),n=1)};e.addEventListener("transitionend",r),setTimeout(()=>{n||e.dispatchEvent(o)},i+a+17)}else t.apply(e,[o])},emulateTransitionEndLegacy:function(e,t){let n=0;const o=new Event(u),i=G(e),a=q(e);if(M&&i){const r=o=>{o.target===e&&(t.apply(e,[o]),e.removeEventListener(u,r),n=1)};e.addEventListener(u,r),setTimeout(()=>{n||e.dispatchEvent(o)},i+a+17)}else t.apply(e,[o])},isElementInScrollRange:e=>{const{top:t,bottom:n}=_(e),{clientHeight:o}=ee(e);return t<=o&&n>=0},isElementInViewport:e=>{const{top:t,left:n,bottom:o,right:i}=_(e,!0),{clientWidth:a,clientHeight:r}=ee(e);return t>=0&&n>=0&&o<=r&&i<=a},passiveHandler:{passive:!0},passiveHandlerLegacy:Y,getElementAnimationDuration:W,getElementAnimationDurationLegacy:V,getElementAnimationDelay:R,getElementAnimationDelayLegacy:Q,getElementTransitionDuration:U,getElementTransitionDurationLegacy:G,getElementTransitionDelay:j,getElementTransitionDelayLegacy:q,getNodeScroll:function(e){const t="scrollX"in e;return{x:t?e.scrollX:e.scrollLeft,y:t?e.scrollY:e.scrollTop}},getParentNode:function(e){return"HTML"===e.nodeName?e:e.assignedSlot||e.parentNode||(ne(e)?e.host:null)||ee(e)},getRectRelativeToOffsetParent:function(e,t,n){const o=t instanceof HTMLElement,i=_(e,o&&oe(t)),a={x:0,y:0};if(o){const e=_(t,!0);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}return{x:i.left+n.x-a.x,y:i.top+n.y-a.y,width:i.width,height:i.height}},getWindow:te,isArray:e=>Array.isArray(e),isString:e=>"string"==typeof e,isCustomElement:re,isElement:e=>e instanceof Element,isNode:e=>e instanceof Node,isHTMLElement:e=>e instanceof HTMLElement,isHTMLImageElement:e=>e instanceof HTMLImageElement,isSVGElement:e=>e instanceof SVGElement,isNodeList:e=>e instanceof NodeList,isHTMLCollection:e=>e instanceof HTMLCollection,isScaledElement:oe,isTableElement:e=>["TABLE","TD","TH"].includes(e.tagName),isShadowRoot:ne,isDocument:e=>e instanceof Document,isElementsArray:e=>Array.isArray(e)&&e.every(e=>[HTMLElement,Element].some(t=>e instanceof t)),isWindow:function(e){return e instanceof Window},isMedia:e=>e&&[SVGElement,HTMLImageElement,HTMLVideoElement].some(t=>e instanceof t),isRTL:e=>"rtl"===ee(e).dir,elementNodes:H,parentNodes:z,closest:function e(t,n){return t?t.closest(n)||e(t.getRootNode().host,n):null},documentAll:ce,querySelector:I,getCustomElements:function(e){return[...e&&z.some(t=>e instanceof t)?se("*",e):ce].filter(re)},getElementById:function(e){return O().getElementById(e)},querySelectorAll:function(e,t){return(t&&z.some(e=>t instanceof e)?t:O()).querySelectorAll(e)},getElementsByClassName:function(e,t){return(t&&z.some(e=>t instanceof e)?t:O()).getElementsByClassName(e)},getElementsByTagName:se,matches:function(e,t){return e.matches(t)},matchesLegacy:function(e,t){return le.call(e,t)},normalizeValue:K,normalizeOptions:function(e,t,n,o){const i={...e.dataset},a={},r={};return X(i).forEach(e=>{const t=o&&e.includes(o)?e.replace(o,"").replace(/[A-Z]/,e=>$(e)):e;r[t]=K(i[e])}),X(n).forEach(e=>{n[e]=K(n[e])}),X(t).forEach(o=>{a[o]=o in n?n[o]:o in r?r[o]:"title"===o?C(e,"title"):t[o]}),a},tryWrapper:function(e,t){try{e()}catch(e){throw TypeError(`${t} ${e}`)}},reflow:e=>e.offsetHeight,noop:()=>{},focus:e=>e.focus(),getUID:function(e,t){ie+=1;let n=ae.get(e),o=ie;if(t&&t.length)if(n){const e=n.get(t);Number.isNaN(e)?n.set(t,o):o=e}else ae.set(e,new Map),n=ae.get(e),n.set(t,o);else Number.isNaN(n)?ae.set(e,o):o=n;return o},ArrayFrom:e=>Array.from(e),Float32ArrayFrom:e=>Float32Array.from(Array.from(e)),Float64ArrayFrom:e=>Float64Array.from(Array.from(e)),ObjectAssign:B,ObjectKeys:X,ObjectValues:e=>Object.values(e),OriginalEvent:function(e,t){const n=new CustomEvent(e,{cancelable:!0,bubbles:!0});return t instanceof Object&&B(n,t),n},getBoundingClientRect:_,getDocument:O,getDocumentBody:function(e){return O(e).body},getDocumentElement:ee,getDocumentHead:function(e){return O(e).head},getElementStyle:F,setElementStyle:(e,t)=>{B(e.style,t)},hasAttribute:(e,t)=>e.hasAttribute(t),hasAttributeNS:(e,t,n)=>t.hasAttributeNS(e,n),getAttribute:C,getAttributeNS:(e,t,n)=>t.getAttributeNS(e,n),setAttribute:(e,t,n)=>e.setAttribute(t,n),setAttributeNS:(e,t,n,o)=>t.setAttributeNS(e,n,o),removeAttribute:(e,t)=>e.removeAttribute(t),removeAttributeNS:(e,t,n)=>t.removeAttributeNS(e,n),Version:"0.3.0alpha25"};export{me as default};

@@ -1,2 +0,2 @@

// shorter-js v0.3.0alpha24 | dnp_theme © 2022 | MIT-License
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).SHORTER=t()}(this,(function(){"use strict";var e={DOMContentLoaded:"DOMContentLoaded",DOMMouseScroll:"DOMMouseScroll",abort:"abort",beforeunload:"beforeunload",blur:"blur",change:"change",click:"click",contextmenu:"contextmenu",dblclick:"dblclick",error:"error",focus:"focus",focusin:"focusin",focusout:"focusout",gesturechange:"gesturechange",gestureend:"gestureend",gesturestart:"gesturestart",hover:"hover",keydown:"keydown",keypress:"keypress",keyup:"keyup",load:"load",mousedown:"mousedown",mousemove:"mousemove",mousein:"mousein",mouseout:"mouseout",mouseenter:"mouseenter",mouseleave:"mouseleave",mouseover:"mouseover",mouseup:"mouseup",mousewheel:"mousewheel",move:"move",orientationchange:"orientationchange",pointercancel:"pointercancel",pointerdown:"pointerdown",pointerleave:"pointerleave",pointermove:"pointermove",pointerup:"pointerup",readystatechange:"readystatechange",reset:"reset",resize:"resize",scroll:"scroll",select:"select",selectend:"selectend",selectstart:"selectstart",submit:"submit",touchcancel:"touchcancel",touchend:"touchend",touchmove:"touchmove",touchstart:"touchstart",unload:"unload"},t="onmouseleave"in document?["mouseenter","mouseleave"]:["mouseover","mouseout"],n=document.head,o="webkitAnimation"in n.style?"webkitAnimationDuration":"animationDuration",i="webkitAnimation"in n.style?"webkitAnimationDelay":"animationDelay",r="webkitAnimation"in n.style?"webkitAnimationName":"animationName",a="webkitAnimation"in n.style?"webkitAnimationEnd":"animationend",u="webkitTransition"in n.style?"webkitTransitionDuration":"transitionDuration",s="webkitTransition"in n.style?"webkitTransitionDelay":"transitionDelay",c="webkitTransition"in n.style?"webkitTransitionEnd":"transitionend",l="webkitTransition"in n.style?"webkitTransitionProperty":"transitionProperty",m=navigator.userAgentData,f=navigator.userAgent,d=/iPhone|iPad|iPod|Android/i,v=m?m.brands.some((function(e){return d.test(e.brand)})):d.test(f),g=/(iPhone|iPod|iPad)/,p=m?m.brands.some((function(e){return g.test(e.brand)})):g.test(f),E=!!f&&f.includes("Firefox"),b="webkitPerspective"in n.style||"perspective"in n.style;function y(e,t,n,o){var i=o||!1;e.addEventListener(t,n,i)}function h(e,t,n,o){var i=o||!1;e.removeEventListener(t,n,i)}function w(e,t,n,o){var i=function(r){r.target===e&&(n.apply(e,[r]),h(e,t,i,o))};y(e,t,i,o)}var A=function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){return e=!0}});w(document,"DOMContentLoaded",(function(){}),t)}catch(e){throw Error("Passive events are not supported")}return e}(),k="webkitTransform"in n.style||"transform"in n.style,L="ontouchstart"in window||"msMaxTouchPoints"in navigator,D="webkitAnimation"in n.style||"animation"in n.style,N="webkitTransition"in n.style||"transition"in n.style,T=function(e,t){return e.getAttribute(t)};function S(e){return e instanceof HTMLElement?e.ownerDocument:e instanceof Window?e.document:window.document}var M=[Document,Element,HTMLElement],C=[Element,HTMLElement];function O(e,t){var n=M.some((function(e){return t instanceof e}))?t:S();return C.some((function(t){return e instanceof t}))?e:n.querySelector(e)}var z=new Map,H={set:function(e,t,n){var o=O(e);o&&(z.has(t)||z.set(t,new Map),z.get(t).set(o,n))},getAllFor:function(e){return z.get(e)||null},get:function(e,t){var n=O(e),o=H.getAllFor(t);return n&&o&&o.get(n)||null},remove:function(e,t){var n=O(e),o=z.get(t);o&&n&&(o.delete(n),0===o.size&&z.delete(t))}};function I(e,t){var n=getComputedStyle(e);return t in n?n[t]:""}function x(e){var t=I(e,"animationName"),n=I(e,"animationDelay"),o=n.includes("ms")?1:1e3,i=t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function P(e){var t=I(e,"animationName"),n=I(e,"animationDuration"),o=n.includes("ms")?1:1e3,i=t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function F(e){var t=I(e,r),n=I(e,i),o=n.includes("ms")?1:1e3,a=D&&t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(a)?0:a}function B(e){var t=I(e,r),n=I(e,o),i=n.includes("ms")?1:1e3,a=D&&t&&"none"!==t?parseFloat(n)*i:0;return Number.isNaN(a)?0:a}function R(e){var t=I(e,"transitionProperty"),n=I(e,"transitionDelay"),o=n.includes("ms")?1:1e3,i=t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function W(e){var t=I(e,"transitionProperty"),n=I(e,"transitionDuration"),o=n.includes("ms")?1:1e3,i=t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function j(e){var t=I(e,l),n=I(e,s),o=n.includes("ms")?1:1e3,i=N&&t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function Q(e){var t=I(e,l),n=I(e,u),o=n.includes("ms")?1:1e3,i=N&&t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}var V=1,U=new Map;function q(e){return"true"===e||"false"!==e&&(Number.isNaN(+e)?""===e||"null"===e?null:e:+e)}var G=function(e){return Object.keys(e)},K=function(e){return e.toLowerCase()};var X=function(e,t){return Object.assign(e,t)};var Y=!!A&&{passive:!0},Z=new Map,J={set:function(e,t,n,o){var i=O(e);i&&(o&&o.length?(Z.has(i)||Z.set(i,new Map),Z.get(i).set(o,setTimeout(t,n))):Z.set(i,setTimeout(t,n)))},get:function(e,t){var n=O(e);if(!n)return null;var o=Z.get(n);return t&&t.length&&o&&o.get?o.get(t)||null:o||null},clear:function(e,t){var n=O(e);if(n)if(t&&t.length){var o=Z.get(n);o&&o.get&&(clearTimeout(o.get(t)),o.delete(t),0===o.size&&Z.delete(n))}else clearTimeout(Z.get(n)),Z.delete(n)}};function $(e,t){var n=e.getBoundingClientRect(),o=n.width,i=n.height,r=n.top,a=n.right,u=n.bottom,s=n.left,c=1,l=1;if(t&&e instanceof HTMLElement){var m=e.offsetWidth,f=e.offsetHeight;c=m>0&&Math.round(o)/m||1,l=f>0&&Math.round(i)/f||1}return{width:o/c,height:i/l,top:r/l,right:a/c,bottom:u/l,left:s/c,x:s/c,y:r/l}}function _(e){return S(e).documentElement}function ee(e){if(null==e)return window;if(!(e instanceof Window)){var t=e.ownerDocument;return t&&t.defaultView||window}return e}var te=function(e){return e instanceof ee(e).ShadowRoot||e instanceof ShadowRoot};function ne(e){var t=$(e),n=t.width,o=t.height,i=e.offsetWidth,r=e.offsetHeight;return Math.round(n)!==i||Math.round(o)!==r}var oe=function(e){return e&&!!e.shadowRoot};function ie(e,t){return(t&&M.some((function(e){return t instanceof e}))?t:S()).getElementsByTagName(e)}var re=ie("*");var ae=Element.prototype,ue=ae.matches||ae.matchesSelector||ae.webkitMatchesSelector||ae.mozMatchesSelector||ae.msMatchesSelector||ae.oMatchesSelector||function(){return!1};return{ariaChecked:"aria-checked",ariaDescribedBy:"aria-describedby",ariaExpanded:"aria-expanded",ariaHidden:"aria-hidden",ariaLabel:"aria-label",ariaLabelledBy:"aria-labelledby",ariaModal:"aria-modal",ariaPressed:"aria-pressed",ariaSelected:"aria-selected",nativeEvents:e,abortEvent:"abort",blurEvent:"blur",moveEvent:"move",changeEvent:"change",errorEvent:"error",resetEvent:"reset",resizeEvent:"resize",scrollEvent:"scroll",submitEvent:"submit",loadEvent:"load",loadstartEvent:"loadstart",unloadEvent:"unload",readystatechangeEvent:"readystatechange",beforeunloadEvent:"beforeunload",orientationchangeEvent:"orientationchange",contextmenuEvent:"contextmenu",DOMContentLoadedEvent:"DOMContentLoaded",DOMMouseScrollEvent:"DOMMouseScroll",selectEvent:"select",selectendEvent:"selectend",selectstartEvent:"selectstart",mouseClickEvents:{down:"mousedown",up:"mouseup"},mouseclickEvent:"click",mousedblclickEvent:"dblclick",mousedownEvent:"mousedown",mouseupEvent:"mouseup",mousehoverEvent:"hover",mouseHoverEvents:t,mouseenterEvent:"mouseenter",mouseleaveEvent:"mouseleave",mouseinEvent:"mousein",mouseoutEvent:"mouseout",mouseoverEvent:"mouseover",mousemoveEvent:"mousemove",mousewheelEvent:"mousewheel",mouseSwipeEvents:{start:"mousedown",end:"mouseup",move:"mousemove",cancel:"mouseleave"},touchEvents:{start:"touchstart",end:"touchend",move:"touchmove",cancel:"touchcancel"},touchstartEvent:"touchstart",touchmoveEvent:"touchmove",touchcancelEvent:"touchcancel",touchendEvent:"touchend",pointercancelEvent:"pointercancel",pointerdownEvent:"pointerdown",pointerleaveEvent:"pointerleave",pointermoveEvent:"pointermove",pointerupEvent:"pointerup",focusEvents:{in:"focusin",out:"focusout"},focusEvent:"focus",focusinEvent:"focusin",focusoutEvent:"focusout",gesturechangeEvent:"gesturechange",gestureendEvent:"gestureend",gesturestartEvent:"gesturestart",bezierEasings:{linear:"linear",easingSinusoidalIn:"cubic-bezier(0.47,0,0.745,0.715)",easingSinusoidalOut:"cubic-bezier(0.39,0.575,0.565,1)",easingSinusoidalInOut:"cubic-bezier(0.445,0.05,0.55,0.95)",easingQuadraticIn:"cubic-bezier(0.550,0.085,0.680,0.530)",easingQuadraticOut:"cubic-bezier(0.250,0.460,0.450,0.940)",easingQuadraticInOut:"cubic-bezier(0.455,0.030,0.515,0.955)",easingCubicIn:"cubic-bezier(0.55,0.055,0.675,0.19)",easingCubicOut:"cubic-bezier(0.215,0.61,0.355,1)",easingCubicInOut:"cubic-bezier(0.645,0.045,0.355,1)",easingQuarticIn:"cubic-bezier(0.895,0.03,0.685,0.22)",easingQuarticOut:"cubic-bezier(0.165,0.84,0.44,1)",easingQuarticInOut:"cubic-bezier(0.77,0,0.175,1)",easingQuinticIn:"cubic-bezier(0.755,0.05,0.855,0.06)",easingQuinticOut:"cubic-bezier(0.23,1,0.32,1)",easingQuinticInOut:"cubic-bezier(0.86,0,0.07,1)",easingExponentialIn:"cubic-bezier(0.95,0.05,0.795,0.035)",easingExponentialOut:"cubic-bezier(0.19,1,0.22,1)",easingExponentialInOut:"cubic-bezier(1,0,0,1)",easingCircularIn:"cubic-bezier(0.6,0.04,0.98,0.335)",easingCircularOut:"cubic-bezier(0.075,0.82,0.165,1)",easingCircularInOut:"cubic-bezier(0.785,0.135,0.15,0.86)",easingBackIn:"cubic-bezier(0.6,-0.28,0.735,0.045)",easingBackOut:"cubic-bezier(0.175,0.885,0.32,1.275)",easingBackInOut:"cubic-bezier(0.68,-0.55,0.265,1.55)"},animationDuration:"animationDuration",animationDurationLegacy:o,animationDelay:"animationDelay",animationDelayLegacy:i,animationName:"animationName",animationNameLegacy:r,animationEndEvent:"animationend",animationEndEventLegacy:a,transitionDuration:"transitionDuration",transitionDurationLegacy:u,transitionDelay:"transitionDelay",transitionDelayLegacy:s,transitionEndEvent:"transitionend",transitionEndEventLegacy:c,transitionProperty:"transitionProperty",transitionPropertyLegacy:l,isMobile:v,isApple:p,isFirefox:E,support3DTransform:b,supportPassive:A,supportTransform:k,supportTouch:L,supportAnimation:D,supportTransition:N,addEventListener:"addEventListener",removeEventListener:"removeEventListener",keyboardEventKeys:{Backspace:"Backspace",Tab:"Tab",Enter:"Enter",Shift:"Shift",Control:"Control",Alt:"Alt",Pause:"Pause",CapsLock:"CapsLock",Escape:"Escape",Scape:"Space",ArrowLeft:"ArrowLeft",ArrowUp:"ArrowUp",ArrowRight:"ArrowRight",ArrowDown:"ArrowDown",Insert:"Insert",Delete:"Delete",Meta:"Meta",ContextMenu:"ContextMenu",ScrollLock:"ScrollLock"},keydownEvent:"keydown",keypressEvent:"keypress",keyupEvent:"keyup",keyAlt:"Alt",keyArrowDown:"ArrowDown",keyArrowLeft:"ArrowLeft",keyArrowRight:"ArrowRight",keyArrowUp:"ArrowUp",keyBackspace:"Backspace",keyCapsLock:"CapsLock",keyControl:"Control",keyDelete:"Delete",keyEnter:"Enter",keyEscape:"Escape",keyInsert:"Insert",keyMeta:"Meta",keyPause:"Pause",keyScrollLock:"ScrollLock",keyShift:"Shift",keySpace:"Space",keyTab:"Tab",offsetHeight:"offsetHeight",offsetWidth:"offsetWidth",scrollHeight:"scrollHeight",scrollWidth:"scrollWidth",userAgentData:m,userAgent:f,addClass:function(e,t){e.classList.add(t)},removeClass:function(e,t){e.classList.remove(t)},hasClass:function(e,t){return e.classList.contains(t)},on:y,off:h,one:w,dispatchEvent:function(e,t){return e.dispatchEvent(t)},distinct:function(e,t,n){return n.indexOf(e)===t},Data:H,toUpperCase:function(e){return e.toUpperCase()},toLowerCase:K,Timer:J,getInstance:function(e,t){return H.get(e,t)},emulateAnimationEnd:function(e,t){var n=0,o=new Event("animationend"),i=P(e),r=x(e);if(i){var a=function(o){o.target===e&&(t.apply(e,[o]),e.removeEventListener("animationend",a),n=1)};e.addEventListener("animationend",a),setTimeout((function(){n||e.dispatchEvent(o)}),i+r+17)}else t.apply(e,[o])},emulateAnimationEndLegacy:function(e,t){var n=0,o=new Event(a),i=B(e),r=F(e);if(D&&i){var u=function(o){o.target===e&&(t.apply(e,[o]),e.removeEventListener(a,u),n=1)};e.addEventListener(a,u),setTimeout((function(){n||e.dispatchEvent(o)}),i+r+17)}else t.apply(e,[o])},emulateTransitionEnd:function(e,t){var n=0,o=new Event("transitionend"),i=W(e),r=R(e);if(i){var a=function(o){o.target===e&&(t.apply(e,[o]),e.removeEventListener("transitionend",a),n=1)};e.addEventListener("transitionend",a),setTimeout((function(){n||e.dispatchEvent(o)}),i+r+17)}else t.apply(e,[o])},emulateTransitionEndLegacy:function(e,t){var n=0,o=new Event(c),i=Q(e),r=j(e);if(N&&i){var a=function(o){o.target===e&&(t.apply(e,[o]),e.removeEventListener(c,a),n=1)};e.addEventListener(c,a),setTimeout((function(){n||e.dispatchEvent(o)}),i+r+17)}else t.apply(e,[o])},isElementInScrollRange:function(e){var t=$(e),n=t.top,o=t.bottom;return n<=_(e).clientHeight&&o>=0},isElementInViewport:function(e){var t=$(e,!0),n=t.top,o=t.left,i=t.bottom,r=t.right,a=_(e),u=a.clientWidth,s=a.clientHeight;return n>=0&&o>=0&&i<=s&&r<=u},passiveHandler:{passive:!0},passiveHandlerLegacy:Y,getElementAnimationDuration:P,getElementAnimationDurationLegacy:B,getElementAnimationDelay:x,getElementAnimationDelayLegacy:F,getElementTransitionDuration:W,getElementTransitionDurationLegacy:Q,getElementTransitionDelay:R,getElementTransitionDelayLegacy:j,getNodeScroll:function(e){var t="scrollX"in e;return{x:t?e.scrollX:e.scrollLeft,y:t?e.scrollY:e.scrollTop}},getParentNode:function(e){return"HTML"===e.nodeName?e:e.assignedSlot||e.parentNode||(te(e)?e.host:null)||_(e)},getRectRelativeToOffsetParent:function(e,t,n){var o=t instanceof HTMLElement,i=$(e,o&&ne(t)),r={x:0,y:0};if(o){var a=$(t,!0);r.x=a.x+t.clientLeft,r.y=a.y+t.clientTop}return{x:i.left+n.x-r.x,y:i.top+n.y-r.y,width:i.width,height:i.height}},getWindow:ee,isArray:function(e){return Array.isArray(e)},isString:function(e){return"string"==typeof e},isCustomElement:oe,isElement:function(e){return e instanceof Element},isNode:function(e){return e instanceof Node},isHTMLElement:function(e){return e instanceof HTMLElement},isHTMLImageElement:function(e){return e instanceof HTMLImageElement},isSVGElement:function(e){return e instanceof SVGElement},isNodeList:function(e){return e instanceof NodeList},isHTMLCollection:function(e){return e instanceof HTMLCollection},isScaledElement:ne,isTableElement:function(e){return["TABLE","TD","TH"].includes(e.tagName)},isShadowRoot:te,isDocument:function(e){return e instanceof Document},isElementsArray:function(e){return Array.isArray(e)&&e.every((function(e){return[HTMLElement,Element].some((function(t){return e instanceof t}))}))},isWindow:function(e){return e instanceof Window},isMedia:function(e){return e&&[SVGElement,HTMLImageElement,HTMLVideoElement].some((function(t){return e instanceof t}))},isRTL:function(e){return"rtl"===_(e).dir},elementNodes:C,parentNodes:M,closest:function e(t,n){return t?t.closest(n)||e(t.getRootNode().host,n):null},documentAll:re,querySelector:O,getCustomElements:function(e){var t=e&&M.some((function(t){return e instanceof t}))?ie("*",e):re;return[].concat(t).filter(oe)},querySelectorAll:function(e,t){return(t&&M.some((function(e){return t instanceof e}))?t:S()).querySelectorAll(e)},getElementsByClassName:function(e,t){return(t&&M.some((function(e){return t instanceof e}))?t:S()).getElementsByClassName(e)},getElementsByTagName:ie,matches:function(e,t){return e.matches(t)},matchesLegacy:function(e,t){return ue.call(e,t)},normalizeValue:q,normalizeOptions:function(e,t,n,o){var i=Object.assign({},e.dataset),r={},a={};return G(i).forEach((function(e){var t=o&&e.includes(o)?e.replace(o,"").replace(/[A-Z]/,(function(e){return K(e)})):e;a[t]=q(i[e])})),G(n).forEach((function(e){n[e]=q(n[e])})),G(t).forEach((function(o){r[o]=o in n?n[o]:o in a?a[o]:"title"===o?T(e,"title"):t[o]})),r},tryWrapper:function(e,t){try{e()}catch(e){throw TypeError(t+" "+e)}},reflow:function(e){return e.offsetHeight},noop:function(){},focus:function(e){return e.focus()},getUID:function(e,t){V+=1;var n=U.get(e),o=V;if(t&&t.length)if(n){var i=n.get(t);Number.isNaN(i)?n.set(t,o):o=i}else U.set(e,new Map),(n=U.get(e)).set(t,o);else Number.isNaN(n)?U.set(e,o):o=n;return o},ArrayFrom:function(e){return Array.from(e)},Float32ArrayFrom:function(e){return Float32Array.from(Array.from(e))},Float64ArrayFrom:function(e){return Float64Array.from(Array.from(e))},ObjectAssign:X,ObjectKeys:G,ObjectValues:function(e){return Object.values(e)},OriginalEvent:function(e,t){var n=new CustomEvent(e,{cancelable:!0,bubbles:!0});return t instanceof Object&&X(n,t),n},getBoundingClientRect:$,getDocument:S,getDocumentBody:function(e){return S(e).body},getDocumentElement:_,getDocumentHead:function(e){return S(e).head},getElementStyle:I,setElementStyle:function(e,t){X(e.style,t)},hasAttribute:function(e,t){return e.hasAttribute(t)},hasAttributeNS:function(e,t,n){return e.hasAttributeNS(n||null,t)},getAttribute:T,getAttributeNS:function(e,t,n){return e.getAttributeNS(n||null,t)},setAttribute:function(e,t,n){return e.setAttribute(t,n)},setAttributeNS:function(e,t,n,o){return e.setAttributeNS(o||null,t,n)},removeAttribute:function(e,t){return e.removeAttribute(t)},removeAttributeNS:function(e,t,n){return e.removeAttributeNS(n||null,t)},Version:"0.3.0alpha24"}}));
// shorter-js v0.3.0alpha25 | dnp_theme © 2022 | MIT-License
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).SHORTER=t()}(this,(function(){"use strict";var e={DOMContentLoaded:"DOMContentLoaded",DOMMouseScroll:"DOMMouseScroll",abort:"abort",beforeunload:"beforeunload",blur:"blur",change:"change",click:"click",contextmenu:"contextmenu",dblclick:"dblclick",error:"error",focus:"focus",focusin:"focusin",focusout:"focusout",gesturechange:"gesturechange",gestureend:"gestureend",gesturestart:"gesturestart",hover:"hover",keydown:"keydown",keypress:"keypress",keyup:"keyup",load:"load",mousedown:"mousedown",mousemove:"mousemove",mousein:"mousein",mouseout:"mouseout",mouseenter:"mouseenter",mouseleave:"mouseleave",mouseover:"mouseover",mouseup:"mouseup",mousewheel:"mousewheel",move:"move",orientationchange:"orientationchange",pointercancel:"pointercancel",pointerdown:"pointerdown",pointerleave:"pointerleave",pointermove:"pointermove",pointerup:"pointerup",readystatechange:"readystatechange",reset:"reset",resize:"resize",scroll:"scroll",select:"select",selectend:"selectend",selectstart:"selectstart",submit:"submit",touchcancel:"touchcancel",touchend:"touchend",touchmove:"touchmove",touchstart:"touchstart",unload:"unload"},t="onmouseleave"in document?["mouseenter","mouseleave"]:["mouseover","mouseout"],n=document.head,i="webkitAnimation"in n.style?"webkitAnimationDuration":"animationDuration",o="webkitAnimation"in n.style?"webkitAnimationDelay":"animationDelay",r="webkitAnimation"in n.style?"webkitAnimationName":"animationName",a="webkitAnimation"in n.style?"webkitAnimationEnd":"animationend",u="webkitTransition"in n.style?"webkitTransitionDuration":"transitionDuration",s="webkitTransition"in n.style?"webkitTransitionDelay":"transitionDelay",c="webkitTransition"in n.style?"webkitTransitionEnd":"transitionend",l="webkitTransition"in n.style?"webkitTransitionProperty":"transitionProperty",m=navigator.userAgentData,f=navigator.userAgent,d=/iPhone|iPad|iPod|Android/i,v=m?m.brands.some((function(e){return d.test(e.brand)})):d.test(f),g=/(iPhone|iPod|iPad)/,p=m?m.brands.some((function(e){return g.test(e.brand)})):g.test(f),E=!!f&&f.includes("Firefox"),b="webkitPerspective"in n.style||"perspective"in n.style;function y(e,t,n,i){var o=i||!1;e.addEventListener(t,n,o)}function h(e,t,n,i){var o=i||!1;e.removeEventListener(t,n,o)}function w(e,t,n,i){var o=function(r){r.target===e&&(n.apply(e,[r]),h(e,t,o,i))};y(e,t,o,i)}var A=function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){return e=!0}});w(document,"DOMContentLoaded",(function(){}),t)}catch(e){throw Error("Passive events are not supported")}return e}(),k="webkitTransform"in n.style||"transform"in n.style,L="ontouchstart"in window||"msMaxTouchPoints"in navigator,N="webkitAnimation"in n.style||"animation"in n.style,D="webkitTransition"in n.style||"transition"in n.style,T=function(e,t){return e.getAttribute(t)};function S(e){return e instanceof HTMLElement?e.ownerDocument:e instanceof Window?e.document:window.document}var M=[Document,Element,HTMLElement],O=[Element,HTMLElement];function C(e,t){var n=M.some((function(e){return t instanceof e}))?t:S();return O.some((function(t){return e instanceof t}))?e:n.querySelector(e)}var z=new Map,H={set:function(e,t,n){var i=C(e);i&&(z.has(t)||z.set(t,new Map),z.get(t).set(i,n))},getAllFor:function(e){return z.get(e)||null},get:function(e,t){var n=C(e),i=H.getAllFor(t);return n&&i&&i.get(n)||null},remove:function(e,t){var n=C(e),i=z.get(t);i&&n&&(i.delete(n),0===i.size&&z.delete(t))}},I=function(e,t){return Object.assign(e,t)};function x(e,t){var n=getComputedStyle(e);return t in n?n[t]:""}function P(e){var t=x(e,"animationName"),n=x(e,"animationDelay"),i=n.includes("ms")?1:1e3,o=t&&"none"!==t?parseFloat(n)*i:0;return Number.isNaN(o)?0:o}function B(e){var t=x(e,"animationName"),n=x(e,"animationDuration"),i=n.includes("ms")?1:1e3,o=t&&"none"!==t?parseFloat(n)*i:0;return Number.isNaN(o)?0:o}function F(e){var t=x(e,r),n=x(e,o),i=n.includes("ms")?1:1e3,a=N&&t&&"none"!==t?parseFloat(n)*i:0;return Number.isNaN(a)?0:a}function R(e){var t=x(e,r),n=x(e,i),o=n.includes("ms")?1:1e3,a=N&&t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(a)?0:a}function W(e){var t=x(e,"transitionProperty"),n=x(e,"transitionDelay"),i=n.includes("ms")?1:1e3,o=t&&"none"!==t?parseFloat(n)*i:0;return Number.isNaN(o)?0:o}function j(e){var t=x(e,"transitionProperty"),n=x(e,"transitionDuration"),i=n.includes("ms")?1:1e3,o=t&&"none"!==t?parseFloat(n)*i:0;return Number.isNaN(o)?0:o}function Q(e){var t=x(e,l),n=x(e,s),i=n.includes("ms")?1:1e3,o=D&&t&&"none"!==t?parseFloat(n)*i:0;return Number.isNaN(o)?0:o}function V(e){var t=x(e,l),n=x(e,u),i=n.includes("ms")?1:1e3,o=D&&t&&"none"!==t?parseFloat(n)*i:0;return Number.isNaN(o)?0:o}function U(e){return"true"===e||"false"!==e&&(Number.isNaN(+e)?""===e||"null"===e?null:e:+e)}var q=function(e){return Object.keys(e)},G=function(e){return e.toLowerCase()};var K=!!A&&{passive:!0},X=new Map,Y={set:function(e,t,n,i){var o=C(e);o&&(i&&i.length?(X.has(o)||X.set(o,new Map),X.get(o).set(i,setTimeout(t,n))):X.set(o,setTimeout(t,n)))},get:function(e,t){var n=C(e);if(!n)return null;var i=X.get(n);return t&&t.length&&i&&i.get?i.get(t)||null:i||null},clear:function(e,t){var n=C(e);if(n)if(t&&t.length){var i=X.get(n);i&&i.get&&(clearTimeout(i.get(t)),i.delete(t),0===i.size&&X.delete(n))}else clearTimeout(X.get(n)),X.delete(n)}};function Z(e,t){var n=e.getBoundingClientRect(),i=n.width,o=n.height,r=n.top,a=n.right,u=n.bottom,s=n.left,c=1,l=1;if(t&&e instanceof HTMLElement){var m=e.offsetWidth,f=e.offsetHeight;c=m>0&&Math.round(i)/m||1,l=f>0&&Math.round(o)/f||1}return{width:i/c,height:o/l,top:r/l,right:a/c,bottom:u/l,left:s/c,x:s/c,y:r/l}}function J(e){return S(e).documentElement}function $(e){if(null==e)return window;if(!(e instanceof Window)){var t=e.ownerDocument;return t&&t.defaultView||window}return e}var _=function(e){return e instanceof $(e).ShadowRoot||e instanceof ShadowRoot};function ee(e){var t=Z(e),n=t.width,i=t.height,o=e.offsetWidth,r=e.offsetHeight;return Math.round(n)!==o||Math.round(i)!==r}var te=1,ne=new Map;var ie=function(e){return e&&!!e.shadowRoot};function oe(e,t){return(t&&M.some((function(e){return t instanceof e}))?t:S()).getElementsByTagName(e)}var re=oe("*");var ae=Element.prototype,ue=ae.matches||ae.matchesSelector||ae.webkitMatchesSelector||ae.mozMatchesSelector||ae.msMatchesSelector||ae.oMatchesSelector||function(){return!1};return{ariaChecked:"aria-checked",ariaDescribedBy:"aria-describedby",ariaExpanded:"aria-expanded",ariaHidden:"aria-hidden",ariaLabel:"aria-label",ariaLabelledBy:"aria-labelledby",ariaModal:"aria-modal",ariaPressed:"aria-pressed",ariaSelected:"aria-selected",nativeEvents:e,abortEvent:"abort",blurEvent:"blur",moveEvent:"move",changeEvent:"change",errorEvent:"error",resetEvent:"reset",resizeEvent:"resize",scrollEvent:"scroll",submitEvent:"submit",loadEvent:"load",loadstartEvent:"loadstart",unloadEvent:"unload",readystatechangeEvent:"readystatechange",beforeunloadEvent:"beforeunload",orientationchangeEvent:"orientationchange",contextmenuEvent:"contextmenu",DOMContentLoadedEvent:"DOMContentLoaded",DOMMouseScrollEvent:"DOMMouseScroll",selectEvent:"select",selectendEvent:"selectend",selectstartEvent:"selectstart",mouseClickEvents:{down:"mousedown",up:"mouseup"},mouseclickEvent:"click",mousedblclickEvent:"dblclick",mousedownEvent:"mousedown",mouseupEvent:"mouseup",mousehoverEvent:"hover",mouseHoverEvents:t,mouseenterEvent:"mouseenter",mouseleaveEvent:"mouseleave",mouseinEvent:"mousein",mouseoutEvent:"mouseout",mouseoverEvent:"mouseover",mousemoveEvent:"mousemove",mousewheelEvent:"mousewheel",mouseSwipeEvents:{start:"mousedown",end:"mouseup",move:"mousemove",cancel:"mouseleave"},touchEvents:{start:"touchstart",end:"touchend",move:"touchmove",cancel:"touchcancel"},touchstartEvent:"touchstart",touchmoveEvent:"touchmove",touchcancelEvent:"touchcancel",touchendEvent:"touchend",pointercancelEvent:"pointercancel",pointerdownEvent:"pointerdown",pointerleaveEvent:"pointerleave",pointermoveEvent:"pointermove",pointerupEvent:"pointerup",focusEvents:{in:"focusin",out:"focusout"},focusEvent:"focus",focusinEvent:"focusin",focusoutEvent:"focusout",gesturechangeEvent:"gesturechange",gestureendEvent:"gestureend",gesturestartEvent:"gesturestart",bezierEasings:{linear:"linear",easingSinusoidalIn:"cubic-bezier(0.47,0,0.745,0.715)",easingSinusoidalOut:"cubic-bezier(0.39,0.575,0.565,1)",easingSinusoidalInOut:"cubic-bezier(0.445,0.05,0.55,0.95)",easingQuadraticIn:"cubic-bezier(0.550,0.085,0.680,0.530)",easingQuadraticOut:"cubic-bezier(0.250,0.460,0.450,0.940)",easingQuadraticInOut:"cubic-bezier(0.455,0.030,0.515,0.955)",easingCubicIn:"cubic-bezier(0.55,0.055,0.675,0.19)",easingCubicOut:"cubic-bezier(0.215,0.61,0.355,1)",easingCubicInOut:"cubic-bezier(0.645,0.045,0.355,1)",easingQuarticIn:"cubic-bezier(0.895,0.03,0.685,0.22)",easingQuarticOut:"cubic-bezier(0.165,0.84,0.44,1)",easingQuarticInOut:"cubic-bezier(0.77,0,0.175,1)",easingQuinticIn:"cubic-bezier(0.755,0.05,0.855,0.06)",easingQuinticOut:"cubic-bezier(0.23,1,0.32,1)",easingQuinticInOut:"cubic-bezier(0.86,0,0.07,1)",easingExponentialIn:"cubic-bezier(0.95,0.05,0.795,0.035)",easingExponentialOut:"cubic-bezier(0.19,1,0.22,1)",easingExponentialInOut:"cubic-bezier(1,0,0,1)",easingCircularIn:"cubic-bezier(0.6,0.04,0.98,0.335)",easingCircularOut:"cubic-bezier(0.075,0.82,0.165,1)",easingCircularInOut:"cubic-bezier(0.785,0.135,0.15,0.86)",easingBackIn:"cubic-bezier(0.6,-0.28,0.735,0.045)",easingBackOut:"cubic-bezier(0.175,0.885,0.32,1.275)",easingBackInOut:"cubic-bezier(0.68,-0.55,0.265,1.55)"},animationDuration:"animationDuration",animationDurationLegacy:i,animationDelay:"animationDelay",animationDelayLegacy:o,animationName:"animationName",animationNameLegacy:r,animationEndEvent:"animationend",animationEndEventLegacy:a,transitionDuration:"transitionDuration",transitionDurationLegacy:u,transitionDelay:"transitionDelay",transitionDelayLegacy:s,transitionEndEvent:"transitionend",transitionEndEventLegacy:c,transitionProperty:"transitionProperty",transitionPropertyLegacy:l,isMobile:v,isApple:p,isFirefox:E,support3DTransform:b,supportPassive:A,supportTransform:k,supportTouch:L,supportAnimation:N,supportTransition:D,addEventListener:"addEventListener",removeEventListener:"removeEventListener",keyboardEventKeys:{Backspace:"Backspace",Tab:"Tab",Enter:"Enter",Shift:"Shift",Control:"Control",Alt:"Alt",Pause:"Pause",CapsLock:"CapsLock",Escape:"Escape",Scape:"Space",ArrowLeft:"ArrowLeft",ArrowUp:"ArrowUp",ArrowRight:"ArrowRight",ArrowDown:"ArrowDown",Insert:"Insert",Delete:"Delete",Meta:"Meta",ContextMenu:"ContextMenu",ScrollLock:"ScrollLock"},keydownEvent:"keydown",keypressEvent:"keypress",keyupEvent:"keyup",keyAlt:"Alt",keyArrowDown:"ArrowDown",keyArrowLeft:"ArrowLeft",keyArrowRight:"ArrowRight",keyArrowUp:"ArrowUp",keyBackspace:"Backspace",keyCapsLock:"CapsLock",keyControl:"Control",keyDelete:"Delete",keyEnter:"Enter",keyEscape:"Escape",keyInsert:"Insert",keyMeta:"Meta",keyPause:"Pause",keyScrollLock:"ScrollLock",keyShift:"Shift",keySpace:"Space",keyTab:"Tab",offsetHeight:"offsetHeight",offsetWidth:"offsetWidth",scrollHeight:"scrollHeight",scrollWidth:"scrollWidth",userAgentData:m,userAgent:f,addClass:function(e,t){e.classList.add(t)},removeClass:function(e,t){e.classList.remove(t)},hasClass:function(e,t){return e.classList.contains(t)},on:y,off:h,one:w,dispatchEvent:function(e,t){return e.dispatchEvent(t)},distinct:function(e,t,n){return n.indexOf(e)===t},Data:H,getInstance:function(e,t){return H.get(e,t)},createElement:function e(t){if("string"==typeof t)return S().createElement(t);var n=t.tagName,i=Object.assign({},t),o=e(n);return delete i.tagName,I(o,i),o},createElementNS:function e(t,n){if("string"==typeof n)return S().createElementNS(t,n);var i=n.tagName,o=Object.assign({},n),r=e(t,i);return delete o.tagName,I(r,o),r},toUpperCase:function(e){return e.toUpperCase()},toLowerCase:G,Timer:Y,emulateAnimationEnd:function(e,t){var n=0,i=new Event("animationend"),o=B(e),r=P(e);if(o){var a=function(i){i.target===e&&(t.apply(e,[i]),e.removeEventListener("animationend",a),n=1)};e.addEventListener("animationend",a),setTimeout((function(){n||e.dispatchEvent(i)}),o+r+17)}else t.apply(e,[i])},emulateAnimationEndLegacy:function(e,t){var n=0,i=new Event(a),o=R(e),r=F(e);if(N&&o){var u=function(i){i.target===e&&(t.apply(e,[i]),e.removeEventListener(a,u),n=1)};e.addEventListener(a,u),setTimeout((function(){n||e.dispatchEvent(i)}),o+r+17)}else t.apply(e,[i])},emulateTransitionEnd:function(e,t){var n=0,i=new Event("transitionend"),o=j(e),r=W(e);if(o){var a=function(i){i.target===e&&(t.apply(e,[i]),e.removeEventListener("transitionend",a),n=1)};e.addEventListener("transitionend",a),setTimeout((function(){n||e.dispatchEvent(i)}),o+r+17)}else t.apply(e,[i])},emulateTransitionEndLegacy:function(e,t){var n=0,i=new Event(c),o=V(e),r=Q(e);if(D&&o){var a=function(i){i.target===e&&(t.apply(e,[i]),e.removeEventListener(c,a),n=1)};e.addEventListener(c,a),setTimeout((function(){n||e.dispatchEvent(i)}),o+r+17)}else t.apply(e,[i])},isElementInScrollRange:function(e){var t=Z(e),n=t.top,i=t.bottom;return n<=J(e).clientHeight&&i>=0},isElementInViewport:function(e){var t=Z(e,!0),n=t.top,i=t.left,o=t.bottom,r=t.right,a=J(e),u=a.clientWidth,s=a.clientHeight;return n>=0&&i>=0&&o<=s&&r<=u},passiveHandler:{passive:!0},passiveHandlerLegacy:K,getElementAnimationDuration:B,getElementAnimationDurationLegacy:R,getElementAnimationDelay:P,getElementAnimationDelayLegacy:F,getElementTransitionDuration:j,getElementTransitionDurationLegacy:V,getElementTransitionDelay:W,getElementTransitionDelayLegacy:Q,getNodeScroll:function(e){var t="scrollX"in e;return{x:t?e.scrollX:e.scrollLeft,y:t?e.scrollY:e.scrollTop}},getParentNode:function(e){return"HTML"===e.nodeName?e:e.assignedSlot||e.parentNode||(_(e)?e.host:null)||J(e)},getRectRelativeToOffsetParent:function(e,t,n){var i=t instanceof HTMLElement,o=Z(e,i&&ee(t)),r={x:0,y:0};if(i){var a=Z(t,!0);r.x=a.x+t.clientLeft,r.y=a.y+t.clientTop}return{x:o.left+n.x-r.x,y:o.top+n.y-r.y,width:o.width,height:o.height}},getWindow:$,isArray:function(e){return Array.isArray(e)},isString:function(e){return"string"==typeof e},isCustomElement:ie,isElement:function(e){return e instanceof Element},isNode:function(e){return e instanceof Node},isHTMLElement:function(e){return e instanceof HTMLElement},isHTMLImageElement:function(e){return e instanceof HTMLImageElement},isSVGElement:function(e){return e instanceof SVGElement},isNodeList:function(e){return e instanceof NodeList},isHTMLCollection:function(e){return e instanceof HTMLCollection},isScaledElement:ee,isTableElement:function(e){return["TABLE","TD","TH"].includes(e.tagName)},isShadowRoot:_,isDocument:function(e){return e instanceof Document},isElementsArray:function(e){return Array.isArray(e)&&e.every((function(e){return[HTMLElement,Element].some((function(t){return e instanceof t}))}))},isWindow:function(e){return e instanceof Window},isMedia:function(e){return e&&[SVGElement,HTMLImageElement,HTMLVideoElement].some((function(t){return e instanceof t}))},isRTL:function(e){return"rtl"===J(e).dir},elementNodes:O,parentNodes:M,closest:function e(t,n){return t?t.closest(n)||e(t.getRootNode().host,n):null},documentAll:re,querySelector:C,getCustomElements:function(e){var t=e&&M.some((function(t){return e instanceof t}))?oe("*",e):re;return[].concat(t).filter(ie)},getElementById:function(e){return S().getElementById(e)},querySelectorAll:function(e,t){return(t&&M.some((function(e){return t instanceof e}))?t:S()).querySelectorAll(e)},getElementsByClassName:function(e,t){return(t&&M.some((function(e){return t instanceof e}))?t:S()).getElementsByClassName(e)},getElementsByTagName:oe,matches:function(e,t){return e.matches(t)},matchesLegacy:function(e,t){return ue.call(e,t)},normalizeValue:U,normalizeOptions:function(e,t,n,i){var o=Object.assign({},e.dataset),r={},a={};return q(o).forEach((function(e){var t=i&&e.includes(i)?e.replace(i,"").replace(/[A-Z]/,(function(e){return G(e)})):e;a[t]=U(o[e])})),q(n).forEach((function(e){n[e]=U(n[e])})),q(t).forEach((function(i){r[i]=i in n?n[i]:i in a?a[i]:"title"===i?T(e,"title"):t[i]})),r},tryWrapper:function(e,t){try{e()}catch(e){throw TypeError(t+" "+e)}},reflow:function(e){return e.offsetHeight},noop:function(){},focus:function(e){return e.focus()},getUID:function(e,t){te+=1;var n=ne.get(e),i=te;if(t&&t.length)if(n){var o=n.get(t);Number.isNaN(o)?n.set(t,i):i=o}else ne.set(e,new Map),(n=ne.get(e)).set(t,i);else Number.isNaN(n)?ne.set(e,i):i=n;return i},ArrayFrom:function(e){return Array.from(e)},Float32ArrayFrom:function(e){return Float32Array.from(Array.from(e))},Float64ArrayFrom:function(e){return Float64Array.from(Array.from(e))},ObjectAssign:I,ObjectKeys:q,ObjectValues:function(e){return Object.values(e)},OriginalEvent:function(e,t){var n=new CustomEvent(e,{cancelable:!0,bubbles:!0});return t instanceof Object&&I(n,t),n},getBoundingClientRect:Z,getDocument:S,getDocumentBody:function(e){return S(e).body},getDocumentElement:J,getDocumentHead:function(e){return S(e).head},getElementStyle:x,setElementStyle:function(e,t){I(e.style,t)},hasAttribute:function(e,t){return e.hasAttribute(t)},hasAttributeNS:function(e,t,n){return t.hasAttributeNS(e,n)},getAttribute:T,getAttributeNS:function(e,t,n){return t.getAttributeNS(e,n)},setAttribute:function(e,t,n){return e.setAttribute(t,n)},setAttributeNS:function(e,t,n,i){return t.setAttributeNS(e,n,i)},removeAttribute:function(e,t){return e.removeAttribute(t)},removeAttributeNS:function(e,t,n){return t.removeAttributeNS(e,n)},Version:"0.3.0alpha25"}}));
{
"name": "shorter-js",
"version": "0.3.0alpha24",
"description": "A small ES6+ library with various JavaScript tools useful for creating light libraries.",
"version": "0.3.0alpha25",
"description": "JavaScript shorties for the modern web.",
"main": "dist/shorter-js.min.js",

@@ -46,3 +46,2 @@ "module": "dist/shorter-js.esm.js",

"@rollup/plugin-typescript": "^8.3.0",
"npm-run-all": "^4.1.5",
"eslint": "^7.22.0",

@@ -52,2 +51,3 @@ "eslint-config-airbnb-base": "^14.2.1",

"eslint-plugin-vue": "^7.7.0",
"npm-run-all": "^4.1.5",
"rollup": "^2.38.5",

@@ -54,0 +54,0 @@ "rollup-plugin-terser": "^5.3.1",

# shorter-js
A small ES6+ library with various JavaScript tools, all ESLint valid, useful for creating light libraries.
Featured in [KUTE.js](https://github.com/thednp/kute.js), [BSN](https://github.com/thednp/bootstrap.native), [Navbar.js](https://github.com/thednp/navbar.js) and other libraries.
A small ES6+ library with various JavaScript tools, all ESLint valid and with TypeScript definitions, everything useful for creating light libraries or web components.
* The purpose if the library is to speed up the development workflow, minimize the size of larger libraries by providing a shorter syntax for most used JavaScript API methods, most used strings or other helpful utilities.
* While the library comes with a working build in the `dist` folder, that is mainly for build consistency testing.
[![NPM Version](https://img.shields.io/npm/v/shorter-js.svg?style=flat-square)](https://www.npmjs.com/package/shorter-js)
[![NPM Downloads](https://img.shields.io/npm/dm/shorter-js.svg?style=flat-square)](http://npm-stat.com/charts.html?package=shorter-js)
[![jsDeliver](https://data.jsdelivr.com/v1/package/npm/shorter-js/badge)](https://www.jsdelivr.com/package/npm/shorter-js)
***shorter-js*** is featured in [KUTE.js](https://github.com/thednp/kute.js), [BSN](https://github.com/thednp/bootstrap.native), [Navbar.js](https://github.com/thednp/navbar.js) and other libraries.
* The purpose of the library is to speed up the development workflow, minimize the size of larger libraries by providing a shorter syntax for most used JavaScript API methods, most used strings or other helpful utilities.
* While the library comes with a working build in the `dist` folder, that is mainly for build consistency testing. You can make use of "tree shaking" to import one or anything your code needs.
* On that note, all shorties are organized in folders inside the `src` root folder, the structure is key to understanding the purpose of each type of shortie, whether we have `boolean` for various basic browser detection or browser feature support, `attr` for all things *Element* attributes or `strings` for most common and most used *Element.prototype* methods.
# npm

@@ -16,26 +22,57 @@ ```

// import the tool you need
import {supportTransform} from 'shorter-js'
import { supportTransform } from 'shorter-js';
// use the tool in your ES6/ES7 sources
if (supportTransform) {
doSomeAction()
// have modern browsers do something about that
}
```
# attr
* ***getAttribute*** - returns the value of a specified *Element* attribute;
* ***getAttributeNS*** - returns the value of a specified namespaced *Element* attribute (eg: namespaced SVG attributes);
* ***hasAttribute*** - check if element has a specified attribute;
* ***hasAttributeNS*** - check if element has a specified namespaced attribute;
* ***removeAttribute*** - removes a specified attribute from an element;
* ***removeAttributeNS*** - removes a specified namespaced attribute from an element;
* ***setAttribute*** - set a new attribute value for a given element;
* ***setAttributeNS*** - set a new namespaced attribute value for a given element;
```js
// EXAMPLES
import { getAttribute, hasAttribute, setAttribute } from 'shorter-js';
// check target has certain attribute
if (!hasAttribute(myTarget, 'attribute-name')) {
setAttribute(myTarget, 'attribute-name', 'new-value');
}
// get attribute value
const currentAttrValue = getAttribute(myTarget, 'attribute-name');
```
# blocks
* ***documentBody*** - a shortie for `document.body`;
* ***documentElement*** - a shortie for `document.documentElement`;
* ***documentHead*** - a shortie for `document.head`;
# boolean
* ***isMobile*** - checks and preserves the client browser is a on Mobile device
* ***support3DTransform*** - checks and preserves the client browser capability for webKit `perspective`
* ***supportTouch*** - checks and preserves the client browser capability for `touch` events
* ***supportPassive*** - checks and preserves the client browser capability for `passive` event option
* ***supportTransform*** - checks and preserves the client browser capability for webKit `transform`
* ***supportAnimation*** - checks and preserves the client browser capability for webKit keyframe `animation`
* ***supportTransition*** - checks and preserves the client browser capability for webKit `transition`
* ***isApple*** - checks and preserves a `boolean` value for the client browser is either Apple **Safari** browser or not;
* ***isFirefox*** - checks and preserves a `boolean` value for the client browser is either **Firefox** or not;
* ***isMobile*** - checks and preserves a `boolean` value for the client browser is either a Mobile device or not;
* ***support3DTransform*** - checks and preserves a `boolean` value for the client browser capability for webKit `perspective`;
* ***supportTouch*** - checks and preserves a `boolean` value for the client browser capability for `touch` events;
* ***supportPassive*** - checks and preserves a `boolean` value for the client browser capability for `passive` event option;
* ***supportTransform*** - checks and preserves a `boolean` value for the client browser capability for webKit `transform`;
* ***supportAnimation*** - checks and preserves a `boolean` value for the client browser capability for webKit keyframe `animation`;
* ***supportTransition*** - checks and preserves a `boolean` value for the client browser capability for webKit `transition`;
```js
// EXAMPLES
import {support3DTransform} from 'shorter-js'
import { support3DTransform } from 'shorter-js';
// filter myAction to supported browsers
if (support3DTransform) {
myAction()
// do something with modern browsers
}

@@ -54,8 +91,10 @@ ```

// add a class
addClass(targetElement,'className')
addClass(targetElement, 'className');
// remove a class
removeClass(targetElement,'className')
removeClass(targetElement, 'className');
// check for a class
if (hasClass(targetElement,'className')) {
myAction()
if (hasClass(targetElement, 'className')) {
// do something about that
}

@@ -65,100 +104,242 @@ ```

# event
* ***on*** - attach an event handler to a specific target *Element*
* ***off*** - detach an event handler from a specific target *Element*
* ***one*** - attach an event handler to a specific target *Element*, and detach when complete
* ***on*** - attach an event listener to a specific target *Element*;
* ***off*** - detach an event listener from a specific target *Element*;
* ***one*** - attach an event listener to a specific target *Element*, and detach when complete;
```js
// EXAMPLES
import {on,off,one,passiveHandler} from 'shorter-js'
import { on, off, one, passiveHandler } from 'shorter-js';
// attach a passive mousedown eventHandler
on(targetElement,'click',eventHandler,passiveHandler)
on(targetElement,'click',eventHandler,passiveHandler);
// detach a passive mouseup eventHandler
off(targetElement,'mouseup',eventHandler,passiveHandler)
off(targetElement,'mouseup',eventHandler,passiveHandler);
// attach a single instance passive touchstart eventHandler
one(targetElement,'touchstart',eventHandler,passiveHandler)
one(targetElement,'touchstart',eventHandler,passiveHandler);
```
For a more advanced method to handle event listeners, I recommend using the [event-listener.js](github.com/thednp/event-listener.js).
# get
* ***getBoundingClientRect*** - returns the bounding client rectangle of a given *Element*;
* ***getDocument*** - returns the containing `#Document` for a given *Element* or just any *Document*, useful when working with *iframe*s;
* ***getDocumentBody*** - returns the containing `<body>` for a given *Element* or just any;
* ***getDocumentElement*** - returns the containing `<html>` for a given *Element* or just any;
* ***getDocumentHead*** - returns the containing `<head>` for a given *Element* or just any;
* ***getElementAnimationDelay*** - returns the `animationDelay` property of an `animation` property;
* ***getElementAnimationDelayLegacy*** - for legacy browsers;
* ***getElementAnimationDuration*** - returns the `animationDuration` property of a `animation` property;
* ***getElementAnimationDurationLegacy*** - for legacy browsers;
* ***getElementTransitionDelay*** - returns the `transitionDelay` property of a `transition` property;
* ***getElementTransitionDelayLegacy*** - for legacy browsers;
* ***getElementTransitionDuration*** - returns the `transitionDuration` property of a `transition` property;
* ***getElementTransitionDurationLegacy*** - for legacy browsers;
* ***getElementStyle*** - returns the *Element* computed style for a given property;
* ***getNodeScroll*** - returns the *Element* / *Window* current `{ x, y }` scroll position;
* ***getParentNode*** - returns parent of a given *Element*;
* ***getRectRelativeToOffsetParent*** - returns the bounding client rectangle of a given *Element* relative to a given `offsetParent`;
* ***getUID*** - a nice utility that creates a unique ID for a given *Element* and returns it;
* ***getWindow*** - returns the containing `Window` for a given *Element* or just any *Window*;
```js
// EXAMPLES
import {
getElementAnimationDuration,
getElementAnimationDurationLegacy,
} from 'shorter-js'
// store the transition duration for target element on a modern browser
const duration = getElementAnimationDuration(target);
// or do the same with legacy browser fallback
const duration = getElementAnimationDurationLegacy(target);
```
# is
* ***isArray*** - check if a given value is an `Array`;
* ***isCustomElement*** - check if a given value is a `CustomElement` instance;
* ***isDocument*** - check if a given value is a `Document` instance;
* ***isElement*** - check if a given value is an `Element` instance;
* ***isElementInScrollRange*** - check if a given `Element` is partially visible in the viewport;
* ***isElementInViewport*** - check if a given `Element` is fully visible in the viewport;
* ***isElementsArray*** - check if a given value is an `Array` with `Element` instances;
* ***isFunction*** - check if a given value is a `Function` instance;
* ***isHTMLCollection*** - check if a given value is an `HTMLCollection` instance;
* ***isHTMLElement*** - check if a given value is an `HTMLElement` instance;
* ***isHTMLImageElement*** - check if a given value is an `HTMLImageElement` instance;
* ***isMedia*** - check if a given value is an `SVGElement`, `HTMLImageElement` or `HTMLVideoElement` instance;
* ***isNode*** - check if a given value is a `Node` instance;
* ***isNodeList*** - check if a given value is a `NodeList` instance;
* ***isRTL*** - check if a given node is contained in a `<html dir="rtl">`;
* ***isScaledElement*** - check if a given *Element* is affected by scale;
* ***isShadowRoot*** - check if a given *Node* is a `ShadowRoot` instance;
* ***isString*** - check if a given value is string;
* ***isSVGElement*** - check if a given value is `SVGElement` instance;
* ***isTableElement*** - check if a given value is `<table>`, `<td>` or `<th>` *Element*;
* ***isWindow*** - check if a given value is a `Window` instance;
```js
// EXAMPLES
import { isArray, isHTMLElement, isElementsArray } from 'shorter-js';
// check if a value is an `Array` of `Element` instances
if (isArray(myValue) && myValue.every(isHTMLElement)) {
// do something with these instances
}
// or use the dedicated shortie of the above
if (isElementsArray(myValue)) {
// do something with these instances
}
```
# misc
* ***emulateAnimationEnd*** - utility to execute a callback function when `animationend` event is triggered, or execute the callback right after for legacy browsers
* ***emulateTransitionEnd*** - utility to execute a callback function when `transitionend` event is triggered, or execute the callback right after for legacy browsers
* ***getElementAnimationDuration*** - returns the `animationDuration` property of a `animation` property
* ***getElementAnimationDelay*** - returns the `animationDelay` property of an `animation` property
* ***getElementTransitionDuration*** - returns the `transitionDuration` property of a `transition` property
* ***getElementTransitionDelay*** - returns the `transitionDelay` property of a `transition` property
* ***isElementInScrollRange*** - a quick utility that checks if a target *Element* surface is scrolled within the visible area of the window
* ***isElementInViewport*** - a quick utility that checks if a target *Element* is scrolled fully into visible window area, might not be useful for elements larger in size than the window itself, the above might be more useful
* ***passiveHandler*** - a constant that preserves a standard handler `options` with `passive: true event` option used
* ***queryElement*** - a simple utility to check if a certain item is an *Element* or a selector string, and if a selector string find the FIRST *Element* and return it
* ***ArrayFrom*** - a shortie for `Array.from()` method;
* ***Data*** - a small utility to store web components data that makes use of the native `Map`;
* ***dispatchEvent*** - a shortie for `Element.dispatchEvent()` method;
* ***distinct*** - a shortie you can use to filter duplicate values in an `Array`;
* ***emulateAnimationEnd*** - utility to execute a callback function when `animationend` event is triggered, or execute the callback right after for legacy browsers;
* ***emulateAnimationEndLegacy*** - for legacy browsers;
* ***emulateTransitionEnd*** - utility to execute a callback function when `transitionend` event is triggered, or execute the callback right after for legacy browsers;
* ***emulateTransitionEndLegacy*** - for legacy browsers;
* ***Float32ArrayFrom*** - a shortie for `Float32Array.from()` method;
* ***Float64ArrayFrom*** - a shortie for `Float64Array.from()` method;
* ***focus*** - a shortie for `Element.focus()` method;
* ***noop*** - is your regular `() => {}` NOOP;
* ***normalizeOptions*** - a cool utility to normalize and crosscheck JavaScript options and their DATA API counterparts for various web components; supports namespaced options like `data-NAMESPACE-option="value"`; priority: JavaScript options > DATA API options > default options
* ***tryWrapper*** - a simple `try()` and `catch()` wrapper for functions, with option to preffix the error logs, poiting out the source of the errors
* ***reflow*** - because `element.offsetHeight;` won't validate on ESLint.
* ***ObjectAssign*** - a shortie for `Object.assign()` method;
* ***ObjectKeys*** - a shortie for `Object.keys()` method;
* ***ObjectValues*** - a shortie for `Object.values()` method;
* ***OriginalEvent*** - a small utility that returns a synthetic `CustomEvent` with the added `relatedTarget` and other properties;
* ***passiveHandler*** - a constant that preserves a standard listener `options` with `passive: true` event option used;
* ***passiveHandlerLegacy*** - for legacy browsers;
* ***reflow*** - a small utility that force repaint of a given *Element* by "checking" its `offsetHeight` value, also because using just `element.offsetHeight;` won't validate on ESLint;
* ***setElementStyle*** - a small utility that allows you to set multiple CSS properties at once for a given *Element* target;
* ***Timer*** - a small but powerful utility that makes `setTimeout` have a meaning;
* ***toLowerCase*** - a shortie for `String.toLowerCase()` method;
* ***toUpperCase*** - a shortie for `String.toUpperCase()` method;
* ***tryWrapper*** - a simple `try()` and `catch()` wrapper for functions, with option to preffix the error logs, pointing out the context of the errors;
The ***Data*** and ***Timer*** utilities have their own specifics, you might want to check the [wiki](https://github.com/thednp/shorter-js/wiki).
```js
// EXAMPLES
import {queryElement,emulateTransitionEnd,normalizeOptions} from 'shorter-js'
import {
emulateTransitionEnd,
distinct,
} from 'shorter-js';
// get some target
let targetElement = queryElement('.mySelectorClass');
// execute a callback when transitionend is triggered for the target
emulateTransitionEnd(targetElement, callback);
// emulateTransitionEnd for the above
emulateTransitionEnd(targetElement,callback)
// define some arrays of numbers
const array1 = [0, 1, 3, 5, 7, 9];
const array2 = [0, 2, 4, 6, 8, 10];
// check if element is in scroll range
// emulateTransitionEnd for the above
if (isElementInScrollRange(targetElement)){
doSomeAction()
}
// merge them and filter them to make sure we have distinct values
const array3 = [...array1, ...array2].filter(distinct);
// [0, 1, 3, 5, 7, 9, 2, 4, 6, 8, 10]
```
// set component options
const options = normalizeOptions( element, defaultOptions, inputOptions, nameSpace )
// element - the component target, the owned of the DATA API attributes
// defaultOptions - the component default options
// inputOptions - the component JavaScript options
// namaSpace - the DATA API namespace
// ..required to get the value of `data-NAMESPACE-option="value"`
# selectors
* ***closest*** - a shortie for `Element.closest()` method;
* ***documentAll*** - a quick bit equivalent of the deprecated `document.all` collection;
* ***getCustomElements*** - returns an `Array` with all registered `CustomElement`;
* ***getElementById*** - a shortie for `document.getElementById()` method;
* ***getElementsByClassName*** - a shortie for `Element.getElementsByClassName()` method;
* ***getElementsByTagName*** - a shortie for `Element.getElementsByTagName()` method;
* ***matches*** - a shortie for `Element.matches()` method;
* ***matchesLegacy*** - for legacy browsers;
* ***querySelector*** - a simple utility to check if a given value is an *Element* or a selector string, and if a selector string find the FIRST *Element* and return it;
* ***querySelectorAll*** - a simple utility to check if a certain item is an *Element* or a selector string, and if a selector string find the FIRST *Element* and return it;
```js
// EXAMPLES
import { querySelector, querySelectorAll, documentAll, matches } from 'shorter-js';
// get first element that matches a certain selector
const element = querySelector('.my-class-name');
// get all elements that matches same selector
const elements = querySelectorAll('.my-class-name');
// now do the same as the above, but differently
const elements = [...documentAll].filter((x) => matches(x, '.my-class-name'));
```
# strings
* ***bezierEasing*** - an *Object* comprised or a set of valid CSS `transition-timing-function` based on Cubic Bezier; EG: `cubic-bezier(0.215,0.61,0.355,1)` for `bezierEasing.easingCubicOut`
* ***mouseSwipeEvents*** - preserves the pointer events from mouse actions: start: `mousedown`, end: `mouseup`, move: `mousemove`, cancel: `mouseout`
* ***mouseClickEvents*** - preserves the pointer events from mouse actions: down: `mousedown`, up: `mouseup`
* ***mouseHoverEvents*** - preserve browser specific mouse hover events: `mouseenter` and `mouseleave` OR `mouseover` and `mouseout`
* ***touchEvents*** - preserves the pointer events from touch actions: start: `touchstart`, end: `touchend`, move: `touchmove`, cancel: `touchcancel`
* ***animationDuration*** - preserves the `animationDuration` property name supported by the client browser
* ***animationDelay*** - preserves the `animationDelay` property name supported by the client browser
* ***animationEndEvent*** - preserves the `animationEndEvent` event name supported by the client browser
* ***animationName*** - preserves the `animationName` property name supported by the client browser
* ***transitionDuration*** - preserves the `transitionDuration` property name supported by the client browser
* ***transitionDelay*** - preserves the `transitionDelay` property name supported by the client browser
* ***transitionEndEvent*** - preserves the `transitionend` event name supported by the client browser
* ***transitionProperty*** - preserves the `transitionProperty` property name supported by the client browser
* ***addEventListener*** - preserves the `addEventListener` method name
* ***removeEventListener*** - preserves the `removeEventListener` method name
* ***bezierEasings*** - an *Object* comprised or a set of valid CSS `transition-timing-function` based on Cubic Bezier; EG: `cubic-bezier(0.215,0.61,0.355,1)` for `bezierEasings.easingCubicOut`;
* ***mouseSwipeEvents*** - preserves the pointer events from mouse actions: start: `mousedown`, end: `mouseup`, move: `mousemove`, cancel: `mouseout`;
* ***mouseClickEvents*** - preserves the pointer events from mouse actions: down: `mousedown`, up: `mouseup`;
* ***mouseHoverEvents*** - preserve browser specific mouse hover events: `mouseenter` and `mouseleave` OR `mouseover` and `mouseout`;
* ***touchEvents*** - preserves the pointer events from touch actions: start: `touchstart`, end: `touchend`, move: `touchmove`, cancel: `touchcancel`;
* ***animationDuration*** - preserves the `animationDuration` property for modern browsers;
* ***animationDurationLegacy*** - for legacy browsers fallback;
* ***animationDelay*** - preserves the `animationDelay` property for modern browsers;
* ***animationDelayLegacy*** - for legacy browsers fallback;
* ***animationEndEvent*** - preserves the `animationEndEvent` event for modern browsers;
* ***animationEndEventLegacy*** - for legacy browsers fallback;
* ***animationName*** - preserves the `animationName` property name for modern browsers;
* ***animationNameLegacy*** - for legacy browsers fallback;
* ***transitionDuration*** - preserves the `transitionDuration` property name for modern browsers;
* ***transitionDurationLegacy*** - for legacy browsers fallback;
* ***transitionDelay*** - preserves the `transitionDelay` property name for modern browsers;
* ***transitionDelayLegacy*** - for legacy browsers fallback;
* ***transitionEndEvent*** - preserves the `transitionend` event name for modern browsers;
* ***transitionEndEventLegacy*** - for legacy browsers fallback;
* ***transitionProperty*** - preserves the `transitionProperty` property name for modern browsers;
* ***transitionPropertyLegacy*** - for legacy browsers fallback;
* ***addEventListener*** - preserves the `addEventListener` method name;
* ***removeEventListener*** - preserves the `removeEventListener` method name;
There are lots more string constants available which include native event names, browser strings, keyboard key codes or ARIA specific attribute names. Be sure to check the `src/strings` folder for a complete list.
```js
// EXAMPLES
import {on,off,one,mouseClickEvents,touchEvents,passiveHandler} from 'shorter-js'
import {on, off, one, mouseClickEvents, touchEvents, passiveHandler} from 'shorter-js';
// attach a passive mousedown eventHandler
on(targetElement,mouseClickEvents.down,eventHandler,passiveHandler)
on(targetElement, mouseClickEvents.down, eventHandler, passiveHandler);
// detach a passive mousedown eventHandler
off(targetElement,mouseClickEvents.down,eventHandler,passiveHandler)
off(targetElement, mouseClickEvents.down, eventHandler, passiveHandler);
// attach a single instance passive touchstart eventHandler
one(targetElement,touchEvents.start,eventHandler,passiveHandler)
one(targetElement, touchEvents.start, eventHandler, passiveHandler);
```
# Advanced Use
To avoid adding un-necessary shorties into your code, you might want to import them directly from their location.
Here's a simple example to showcase the benefit of using ***shorter-js***.
```js
// This is your typical day to day scripting
const target = document.getElementById('my-element');
target.addEventListener('click', function(e) {
target.classList.add('my-className');
})
```
Now make it all shorter.
```js
// Example
import on from 'shorter-js/src/event/on.js'
import addClass from 'shorter-js/src/class/addClass.js'
import on from 'shorter-js/src/event/on';
import addClass from 'shorter-js/src/class/addClass';
import getElementById from 'shorter-js/src/selectors/getElementById';
import mouseclickEvent from 'shorter-js/src/strings/mouseclickEvent';
on(document.getElementById('my-elem'),'eventName',function(e){
addClass(document.getElementById('my-elem'),'my-className')
const target = getElementById('my-element');
on(target, mouseclickEvent, function(e) {
addClass(target, 'my-className')
})
```
Now this all shortened code may not be very useful to understand the purpose of using ***shorter-js***, check out real examples with [KUTE.js](https://github.com/thednp/kute.js), [BSN](https://github.com/thednp/bootstrap.native), [Navbar.js](https://github.com/thednp/navbar.js) and other libraries coming soon.
To avoid adding un-necessary shorties into your code, you might want to import them directly from their location. Tree shake it!
# License
*shorter-js* is released under the [MIT License](https://github.com/thednp/shorter-js/blob/master/LICENSE)
***shorter-js*** is released under the [MIT License](https://github.com/thednp/shorter-js/blob/master/LICENSE)
/**
* Shortcut for `HTMLElement.getAttribute()` method.
* @param {HTMLElement | Element} element target element
* @param {string} attribute attribute name
* @param {HTMLElement | Element} element target element
* @param {string} attribute attribute name
* @returns {string?} attribute value
*/

@@ -6,0 +7,0 @@ const getAttribute = (element, attribute) => element.getAttribute(attribute);

/**
* Shortcut for `SVGElement.getAttributeNS()` method.
* @param {HTMLElement | Element} element target element
* @param {string} attribute attribute name
* @param {string=} ns attribute namespace
* Shortcut for `HTMLElement.getAttributeNS()` method.
* @param {string} ns attribute namespace
* @param {HTMLElement | Element} element target element
* @param {string} attribute attribute name
* @returns {string?} attribute value
*/
const getAttributeNS = (element, attribute, ns) => element.getAttributeNS(ns || null, attribute);
const getAttributeNS = (ns, element, attribute) => element.getAttributeNS(ns, attribute);
export default getAttributeNS;

@@ -5,2 +5,3 @@ /**

* @param {string} attribute attribute name
* @returns {boolean} the query result
*/

@@ -7,0 +8,0 @@ const hasAttribute = (element, attribute) => element.hasAttribute(attribute);

/**
* Shortcut for `SVGElement.hasAttributeNS()` method.
* Shortcut for `HTMLElement.hasAttributeNS()` method.
* @param {string} ns attribute namespace
* @param {HTMLElement | Element} element target element
* @param {string} att attribute name
* @param {string=} ns attribute namespace
* @returns {boolean} the query result
*/
const hasAttributeNS = (element, att, ns) => element.hasAttributeNS(ns || null, att);
const hasAttributeNS = (ns, element, att) => element.hasAttributeNS(ns, att);
export default hasAttributeNS;

@@ -5,2 +5,3 @@ /**

* @param {string} attribute attribute name
* @returns {void}
*/

@@ -7,0 +8,0 @@ const removeAttribute = (element, attribute) => element.removeAttribute(attribute);

/**
* Shortcut for `HTMLElement.removeAttributeNS()` method.
* @param {string} ns attribute namespace
* @param {HTMLElement | Element} element target element
* @param {string} att attribute name
* @param {string=} ns attribute namespace
* @returns {void}
*/
const removeAttributeNS = (element, att, ns) => element.removeAttributeNS(ns || null, att);
const removeAttributeNS = (ns, element, att) => element.removeAttributeNS(ns, att);
export default removeAttributeNS;

@@ -6,2 +6,3 @@ /**

* @param {string} value attribute value
* @returns {void}
*/

@@ -8,0 +9,0 @@ const setAttribute = (element, attribute, value) => element.setAttribute(attribute, value);

/**
* Shortcut for `SVGElement.setAttributeNS()` method.
* @param {string} ns attribute namespace
* @param {HTMLElement | Element} element target element
* @param {string} att attribute name
* @param {string} value attribute value
* @param {string=} ns attribute namespace
* @returns {void}
*/
const setAttributeNS = (element, att, value, ns) => element.setAttributeNS(ns || null, att, value);
const setAttributeNS = (ns, element, att, value) => element.setAttributeNS(ns, att, value);
export default setAttributeNS;

@@ -6,4 +6,5 @@ import userAgent from '../strings/userAgent';

* Gecko was not supporting `userAgentData`.
* @type {boolean}
*/
const isFirefox = userAgent ? userAgent.includes('Firefox') : false;
export default isFirefox;

@@ -6,2 +6,3 @@ /**

* @param {string} classNAME to add
* @returns {void}
*/

@@ -8,0 +9,0 @@ export default function addClass(element, classNAME) {

@@ -6,3 +6,3 @@ /**

* @param {string} classNAME to check
* @return {boolean}
* @returns {boolean}
*/

@@ -9,0 +9,0 @@ export default function hasClass(element, classNAME) {

@@ -6,2 +6,3 @@ /**

* @param {string} classNAME to remove
* @returns {void}
*/

@@ -8,0 +9,0 @@ export default function removeClass(element, classNAME) {

@@ -6,8 +6,9 @@ /**

* @param {string} eventName event.type
* @param {EventListenerObject['handleEvent']} handler callback
* @param {EventListener} listener callback
* @param {(EventListenerOptions | boolean)=} options other event options
* @returns {void}
*/
export default function off(element, eventName, handler, options) {
export default function off(element, eventName, listener, options) {
const ops = options || false;
element.removeEventListener(eventName, handler, ops);
element.removeEventListener(eventName, listener, ops);
}

@@ -6,8 +6,9 @@ /**

* @param {string} eventName event.type
* @param {EventListenerObject['handleEvent']} handler callback
* @param {EventListener} listener callback
* @param {(EventListenerOptions | boolean)=} options other event options
* @returns {void}
*/
export default function on(element, eventName, handler, options) {
export default function on(element, eventName, listener, options) {
const ops = options || false;
element.addEventListener(eventName, handler, ops);
element.addEventListener(eventName, listener, ops);
}

@@ -10,13 +10,14 @@ import on from './on';

* @param {string} eventName event.type
* @param {EventListenerObject['handleEvent']} handler callback
* @param {EventListener} listener callback
* @param {(EventListenerOptions | boolean)=} options other event options
* @returns {void}
*/
export default function one(element, eventName, handler, options) {
export default function one(element, eventName, listener, options) {
/**
* Wrap the handler for easy on -> off
* @type {EventListenerObject['handleEvent']}
* Wrap the listener for easy on -> off
* @type {EventListener}
*/
const handlerWrapper = (e) => {
if (e.target === element) {
handler.apply(element, [e]);
listener.apply(element, [e]);
off(element, eventName, handlerWrapper, options);

@@ -23,0 +24,0 @@ }

@@ -160,2 +160,4 @@ // strings

import Data, { getInstance } from './misc/data';
import createElement from './misc/createElement';
import createElementNS from './misc/createElementNS';
import dispatchEvent from './misc/dispatchEvent';

@@ -170,3 +172,2 @@ import distinct from './misc/distinct';

import focus from './misc/focus';
import getUID from './misc/getUID';
import noop from './misc/noop';

@@ -206,2 +207,3 @@ import normalizeOptions from './misc/normalizeOptions';

import getRectRelativeToOffsetParent from './get/getRectRelativeToOffsetParent';
import getUID from './get/getUID';
import getWindow from './get/getWindow';

@@ -238,2 +240,3 @@

import getCustomElements from './selectors/getCustomElements';
import getElementById from './selectors/getElementById';
import querySelectorAll from './selectors/querySelectorAll';

@@ -376,6 +379,8 @@ import getElementsByTagName from './selectors/getElementsByTagName';

Data,
getInstance,
createElement,
createElementNS,
toUpperCase,
toLowerCase,
Timer,
getInstance,
emulateAnimationEnd,

@@ -425,2 +430,3 @@ emulateAnimationEndLegacy,

getCustomElements,
getElementById,
querySelectorAll,

@@ -427,0 +433,0 @@ getElementsByClassName,

@@ -21,3 +21,3 @@ import animationEndEvent from '../strings/animationEndEvent';

* Wrap the handler in on -> off callback
* @type {EventListenerObject['handleEvent']}
* @type {EventListener}
*/

@@ -24,0 +24,0 @@ const animationEndWrapper = (e) => {

@@ -21,3 +21,3 @@ import transitionEndEvent from '../strings/transitionEndEvent';

* Wrap the handler in on -> off callback
* @type {EventListenerObject['handleEvent']} e Event object
* @type {EventListener} e Event object
*/

@@ -24,0 +24,0 @@ const transitionEndWrapper = (e) => {

@@ -15,3 +15,3 @@ import querySelector from '../selectors/querySelector';

* @param {number} delay the execution delay
* @param {string=} key a unique
* @param {string=} key a unique key
*/

@@ -18,0 +18,0 @@ set: (target, callback, delay, key) => {

@@ -12,3 +12,3 @@ import documentAll from './documentAll';

* @param {(HTMLElement | Element | Node | Document)=} parent parent to look into
* @returns {(HTMLElement | Element)[]} the query result
* @returns {Array<(HTMLElement | Element)>} the query result
*/

@@ -15,0 +15,0 @@ export default function getCustomElements(parent) {

/**
* A global namespace for:
* * `transitionProperty` string for Firefox,
* * `transition` property for all other browsers.
* A global namespace for `transitionProperty` string for modern browsers.
*

@@ -6,0 +4,0 @@ * @type {string}

@@ -5,5 +5,5 @@ import documentHead from '../blocks/documentHead';

* A global namespace for:
* * `transitionProperty` string for Firefox,
* * `webkitTransition` for older Chrome / Safari browsers,
* * `transition` property for all other browsers.
* * `transitionProperty` string for modern brosers,
* * `webkitTransition` for legacy Chrome / Safari browsers
*
* @type {string}

@@ -10,0 +10,0 @@ */

@@ -150,2 +150,3 @@ export as namespace SHORTER;

export { default as getRectRelativeToOffsetParent } from 'shorter-js/src/get/getRectRelativeToOffsetParent';
export { default as getUID } from 'shorter-js/src/get/getUID';
export { default as getWindow } from 'shorter-js/src/get/getWindow';

@@ -161,2 +162,4 @@ export { default as addClass } from 'shorter-js/src/class/addClass';

export { default as distinct } from 'shorter-js/src/misc/distinct';
export { default as createElement } from 'shorter-js/src/misc/createElement';
export { default as createElementNS } from 'shorter-js/src/misc/createElementNS';
export { default as Timer } from 'shorter-js/src/misc/timer';

@@ -173,3 +176,2 @@ export { default as emulateAnimationEnd } from 'shorter-js/src/misc/emulateAnimationEnd';

export { default as reflow } from 'shorter-js/src/misc/reflow';
export { default as getUID } from 'shorter-js/src/misc/getUID';
export { default as focus } from 'shorter-js/src/misc/focus';

@@ -212,2 +214,3 @@ export { default as noop } from 'shorter-js/src/misc/noop';

export { default as getCustomElements } from 'shorter-js/src/selectors/getCustomElements';
export { default as getElementById } from 'shorter-js/src/selectors/getElementById';
export { default as querySelector } from 'shorter-js/src/selectors/querySelector';

@@ -214,0 +217,0 @@ export { default as querySelectorAll } from 'shorter-js/src/selectors/querySelectorAll';

@@ -159,2 +159,3 @@ // strings

export { default as getRectRelativeToOffsetParent } from '../../src/get/getRectRelativeToOffsetParent';
export { default as getUID } from '../../src/get/getUID';
export { default as getWindow } from '../../src/get/getWindow';

@@ -175,2 +176,4 @@

export { default as Timer } from '../../src/misc/timer';
export { default as createElement } from '../../src/misc/createElement';
export { default as createElementNS } from '../../src/misc/createElementNS';
export { default as dispatchEvent } from '../../src/misc/dispatchEvent';

@@ -192,3 +195,2 @@ export { default as distinct } from '../../src/misc/distinct';

export { default as focus } from '../../src/misc/focus';
export { default as getUID } from '../../src/misc/getUID';
export { default as noop } from '../../src/misc/noop';

@@ -236,2 +238,3 @@

export { default as getCustomElements } from '../../src/selectors/getCustomElements';
export { default as getElementById } from '../../src/selectors/getElementById';
export { default as querySelector } from '../../src/selectors/querySelector';

@@ -238,0 +241,0 @@ export { default as querySelectorAll } from '../../src/selectors/querySelectorAll';

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc