New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@thednp/shorty

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@thednp/shorty - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

src/is/isNumber.js

4

dist/shorty.esm.min.js

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

// Shorty v1.0.1 | 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,p=g,f=/iPhone|iPad|iPod|Android/i;let v=!1;v=d?d.brands.some(e=>f.test(e.brand)):f.test(p);const E=v,y=/(iPhone|iPod|iPad)/,b=d?d.brands.some(e=>y.test(e.brand)):y.test(p),h=!!p&&p.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,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}function z(e,t){if("string"==typeof e){return("object"!=typeof t?O():t).querySelector(e)}return e}const H=new Map,I={set:(e,t,n)=>{const o=z(e);if(!o)return;H.has(t)||H.set(t,new Map);H.get(t).set(o,n)},getAllFor:e=>H.get(e)||null,get:(e,t)=>{const n=z(e),o=I.getAllFor(t);return n&&o&&o.get(n)||null},remove:(e,t)=>{const n=z(e),o=H.get(t);o&&n&&(o.delete(n),0===o.size&&H.delete(t))}},x=(e,t)=>Object.assign(e,t);function P(e,t){const n=getComputedStyle(e);return t in n?n[t]:""}function B(e){const t=P(e,"animationName"),n=P(e,"animationDelay"),o=n.includes("ms")?1:1e3,i=t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function F(e){const t=P(e,"animationName"),n=P(e,"animationDuration"),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=P(e,a),n=P(e,i),o=n.includes("ms")?1:1e3,r=S&&t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(r)?0:r}function j(e){const t=P(e,a),n=P(e,o),i=n.includes("ms")?1:1e3,r=S&&t&&"none"!==t?parseFloat(n)*i:0;return Number.isNaN(r)?0:r}function V(e){const t=P(e,"transitionProperty"),n=P(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){const t=P(e,"transitionProperty"),n=P(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=P(e,l),n=P(e,c),o=n.includes("ms")?1:1e3,i=M&&t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function U(e){const t=P(e,l),n=P(e,s),o=n.includes("ms")?1:1e3,i=M&&t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function q(e){return"true"===e||"false"!==e&&(Number.isNaN(+e)?""===e||"null"===e?null:e:+e)}const G=e=>Object.keys(e),K=e=>e.toLowerCase();const X=!!D&&{passive:!0},$=new Map,Y={set:(e,t,n,o)=>{const i=z(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=z(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=z(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 Z(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 J(e){return O(e).documentElement}function _(e){if(null==e)return window;if(!(e instanceof Window)){const{ownerDocument:t}=e;return t&&t.defaultView||window}return e}const ee=e=>e instanceof _(e).ShadowRoot||e instanceof ShadowRoot;function te(e){const{width:t,height:n}=Z(e),{offsetWidth:o,offsetHeight:i}=e;return Math.round(t)!==o||Math.round(n)!==i}let ne=0,oe=0;const ie=new Map;const ae=e=>e&&!!e.shadowRoot;function re(e,t){return("object"!=typeof t?O():t).getElementsByTagName(e)}const se=re("*");const ce=Element.prototype,ue=ce.matches||ce.matchesSelector||ce.webkitMatchesSelector||ce.mozMatchesSelector||ce.msMatchesSelector||ce.oMatchesSelector||function(){return!1};const le={ariaChecked:"aria-checked",ariaDescription:"aria-description",ariaDescribedBy:"aria-describedby",ariaExpanded:"aria-expanded",ariaHidden:"aria-hidden",ariaHasPopup:"aria-haspopup",ariaLabel:"aria-label",ariaLabelledBy:"aria-labelledby",ariaModal:"aria-modal",ariaPressed:"aria-pressed",ariaSelected:"aria-selected",ariaValueMin:"aria-valuemin",ariaValueMax:"aria-valuemax",ariaValueNow:"aria-valuenow",ariaValueText:"aria-valuetext",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:E,isApple:b,isFirefox:h,support3DTransform:w,supportPassive:D,supportTransform:N,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:p,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:I,getInstance:(e,t)=>I.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,x(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,x(a,i),a},toUpperCase:e=>e.toUpperCase(),toLowerCase:K,Timer:Y,emulateAnimationEnd:function(e,t){let n=0;const o=new Event("animationend"),i=F(e),a=B(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=j(e),a=R(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=W(e),a=V(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=U(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}=Z(e),{clientHeight:o}=J(e);return t<=o&&n>=0},isElementInViewport:e=>{const{top:t,left:n,bottom:o,right:i}=Z(e,!0),{clientWidth:a,clientHeight:r}=J(e);return t>=0&&n>=0&&o<=r&&i<=a},passiveHandler:{passive:!0},passiveHandlerLegacy:X,getElementAnimationDuration:F,getElementAnimationDurationLegacy:j,getElementAnimationDelay:B,getElementAnimationDelayLegacy:R,getElementTransitionDuration:W,getElementTransitionDurationLegacy:U,getElementTransitionDelay:V,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||(ee(e)?e.host:null)||J(e)},getRectRelativeToOffsetParent:function(e,t,n){const o=t instanceof HTMLElement,i=Z(e,o&&te(t)),a={x:0,y:0};if(o){const e=Z(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:_,isArray:e=>Array.isArray(e),isString:e=>"string"==typeof e,isCustomElement:ae,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:te,isTableElement:e=>["TABLE","TD","TH"].includes(e.tagName),isShadowRoot:ee,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"===J(e).dir,closest:function e(t,n){return t?t.closest(n)||e(t.getRootNode().host,n):null},documentAll:se,querySelector:z,getCustomElements:function(e){return[...e&&"object"==typeof e?re("*",e):se].filter(ae)},getElementById:function(e){return O().getElementById(e)},querySelectorAll:function(e,t){return("object"!=typeof t?O():t).querySelectorAll(e)},getElementsByClassName:function(e,t){return("object"!=typeof t?O():t).getElementsByClassName(e)},getElementsByTagName:re,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){const i={...e.dataset},a={},r={};return G(i).forEach(e=>{const t=o&&e.includes(o)?e.replace(o,"").replace(/[A-Z]/,e=>K(e)):e;r[t]=q(i[e])}),G(n).forEach(e=>{n[e]=q(n[e])}),G(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,n){let o=n?ne:oe;if(n){const i=e(t),a=ie.get(i)||new Map;ie.has(i)||ie.set(i,a),a.has(n)?o=a.get(n):(a.set(n,o),ne+=1)}else{const e=t.id||t;ie.has(e)?o=ie.get(e):(ie.set(e,o),oe+=1)}return o},ArrayFrom:e=>Array.from(e),Float32ArrayFrom:e=>Float32Array.from(Array.from(e)),Float64ArrayFrom:e=>Float64Array.from(Array.from(e)),ObjectAssign:x,ObjectKeys:G,ObjectValues:e=>Object.values(e),OriginalEvent:function(e,t){const n=new CustomEvent(e,{cancelable:!0,bubbles:!0});return t instanceof Object&&x(n,t),n},getBoundingClientRect:Z,getDocument:O,getDocumentBody:function(e){return O(e).body},getDocumentElement:J,getDocumentHead:function(e){return O(e).head},getElementStyle:P,setElementStyle:(e,t)=>{x(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:"1.0.1"};export{le as default};
// Shorty v1.0.2 | 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",r="webkitAnimation"in n.style?"webkitAnimationName":"animationName",a="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,p=g,y=/iPhone|iPad|iPod|Android/i;let b=!1;b=d?d.brands.some(e=>y.test(e.brand)):y.test(p);const v=b,f=/(iPhone|iPod|iPad)/,E=d?d.brands.some(e=>f.test(e.brand)):f.test(p),h=!!p&&p.includes("Firefox"),w="webkitPerspective"in n.style||"perspective"in n.style;function k(e,t,n,o){const i=o||!1;e.addEventListener(t,n,i)}function A(e,t,n,o){const i=o||!1;e.removeEventListener(t,n,i)}function L(e,t,n,o){const i=r=>{r.target===e&&(n.apply(e,[r]),A(e,t,i,o))};k(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){}return e})(),N="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),O=(e,t,n)=>e.setAttribute(t,n);const z=e=>e&&1===e.nodeType||!1,I=new Map,x={set:(e,t,n)=>{if(!z(e))return;I.has(t)||I.set(t,new Map);I.get(t).set(e,n)},getAllFor:e=>I.get(e)||null,get:(e,t)=>{if(!z(e)||!t)return null;const n=x.getAllFor(t);return e&&n&&n.get(e)||null},remove:(e,t)=>{const n=I.get(t);n&&z(e)&&(n.delete(e),0===n.size&&I.delete(t))}},P=e=>e&&9===e.nodeType||!1,F=e=>e&&[1,2,3,4,5,6,7,8,9,10,11].some(t=>+e.nodeType===t)||!1,H=e=>e&&"Window"===e.constructor.name||!1;function B(e){return P(e)?e:F(e)?e.ownerDocument:H(e)?e.document:window.document}const V=(e,t)=>Object.assign(e,t);const R=e=>Object.entries(e);const j=(e,t)=>e.dispatchEvent(t);function W(e,t){const n=getComputedStyle(e);return t.includes("--")?n.getPropertyValue(t):n[t]}function Q(e){const t=W(e,"animationName"),n=W(e,"animationDelay"),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=W(e,"animationName"),n=W(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=W(e,r),n=W(e,i),o=n.includes("ms")?1:1e3,a=S&&t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(a)?0:a}function G(e){const t=W(e,r),n=W(e,o),i=n.includes("ms")?1:1e3,a=S&&t&&"none"!==t?parseFloat(n)*i:0;return Number.isNaN(a)?0:a}function K(e){const t=W(e,"transitionProperty"),n=W(e,"transitionDelay"),o=n.includes("ms")?1:1e3,i=t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function X(e){const t=W(e,"transitionProperty"),n=W(e,"transitionDuration"),o=n.includes("ms")?1:1e3,i=t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function Y(e){const t=W(e,l),n=W(e,c),o=n.includes("ms")?1:1e3,i=M&&t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function Z(e){const t=W(e,l),n=W(e,s),o=n.includes("ms")?1:1e3,i=M&&t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function J(e){return!!["true",!0].includes(e)||!["false",!1].includes(e)&&(""===e||"null"===e?null:""===e||Number.isNaN(+e)?e:+e)}const $=e=>Object.keys(e),_=e=>e.toLowerCase();const ee=!!D&&{passive:!0},te=new Map,ne={set:(e,t,n,o)=>{if(z(e))if(o&&o.length){te.has(e)||te.set(e,new Map);te.get(e).set(o,setTimeout(t,n))}else te.set(e,setTimeout(t,n))},get:(e,t)=>{if(!z(e))return null;const n=te.get(e);return t&&t.length&&n&&n.get?n.get(t)||null:n||null},clear:(e,t)=>{if(z(e))if(t&&t.length){const n=te.get(e);n&&n.get&&(clearTimeout(n.get(t)),n.delete(t),0===n.size&&te.delete(e))}else clearTimeout(te.get(e)),te.delete(e)}};function oe(e,t){const{width:n,height:o,top:i,right:r,bottom:a,left:s}=e.getBoundingClientRect();let c=1,u=1;if(t&&z(e)){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:r/c,bottom:a/u,left:s/c,x:s/c,y:i/u}}function ie(e){return B(e).documentElement}const re=e=>e&&"ShadowRoot"===e.constructor.name||!1;function ae(e){if(!e||!z(e))return!1;const{width:t,height:n}=oe(e),{offsetWidth:o,offsetHeight:i}=e;return Math.round(t)!==o||Math.round(n)!==i}let se=0,ce=0;const ue=new Map;function le(e){return e?P(e)?e.defaultView:F(e)?e.ownerDocument.defaultView:e:window}const me=e=>e&&!!e.shadowRoot||!1;function de(e,t){return(F(t)?t:B()).getElementsByTagName(e)}const ge=Element.prototype,pe=ge.matches||ge.matchesSelector||ge.webkitMatchesSelector||ge.mozMatchesSelector||ge.msMatchesSelector||ge.oMatchesSelector||function(){return!1};const ye={ariaChecked:"aria-checked",ariaDescription:"aria-description",ariaDescribedBy:"aria-describedby",ariaExpanded:"aria-expanded",ariaHidden:"aria-hidden",ariaHasPopup:"aria-haspopup",ariaLabel:"aria-label",ariaLabelledBy:"aria-labelledby",ariaModal:"aria-modal",ariaPressed:"aria-pressed",ariaSelected:"aria-selected",ariaValueMin:"aria-valuemin",ariaValueMax:"aria-valuemax",ariaValueNow:"aria-valuenow",ariaValueText:"aria-valuetext",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:s,transitionDelay:"transitionDelay",transitionDelayLegacy:c,transitionEndEvent:"transitionend",transitionEndEventLegacy:u,transitionProperty:"transitionProperty",transitionPropertyLegacy:l,isMobile:v,isApple:E,isFirefox:h,support3DTransform:w,supportPassive:D,supportTransform:N,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:p,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:k,off:A,one:L,dispatchEvent:j,distinct:(e,t,n)=>n.indexOf(e)===t,Data:x,getInstance:(e,t)=>x.get(e,t),createElement:function e(t){if(!t)return null;if("string"==typeof t)return B().createElement(t);const{tagName:n}=t,o={...t},i=e(n);return delete o.tagName,V(i,o),i},createElementNS:function e(t,n){if(!t&&!n)return null;if("string"==typeof n)return B().createElementNS(t,n);const{tagName:o}=n,i={...n},r=e(t,o);return delete i.tagName,R(i).forEach(([e,t])=>{O(r,e,t)}),r},toUpperCase:e=>e.toUpperCase(),toLowerCase:_,Timer:ne,emulateAnimationEnd:function(e,t){let n=0;const o=new Event("animationend"),i=U(e),r=Q(e);if(i){const a=o=>{o.target===e&&(t.apply(e,[o]),e.removeEventListener("animationend",a),n=1)};e.addEventListener("animationend",a),setTimeout(()=>{n||j(e,o)},i+r+17)}else t.apply(e,[o])},emulateAnimationEndLegacy:function(e,t){let n=0;const o=new Event(a),i=G(e),r=q(e);if(S&&i){const s=o=>{o.target===e&&(t.apply(e,[o]),e.removeEventListener(a,s),n=1)};e.addEventListener(a,s),setTimeout(()=>{n||j(e,o)},i+r+17)}else t.apply(e,[o])},emulateTransitionEnd:function(e,t){let n=0;const o=new Event("transitionend"),i=X(e),r=K(e);if(i){const a=o=>{o.target===e&&(t.apply(e,[o]),e.removeEventListener("transitionend",a),n=1)};e.addEventListener("transitionend",a),setTimeout(()=>{n||j(e,o)},i+r+17)}else t.apply(e,[o])},emulateTransitionEndLegacy:function(e,t){let n=0;const o=new Event(u),i=Z(e),r=Y(e);if(M&&i){const a=o=>{o.target===e&&(t.apply(e,[o]),e.removeEventListener(u,a),n=1)};e.addEventListener(u,a),setTimeout(()=>{n||j(e,o)},i+r+17)}else t.apply(e,[o])},isElementInScrollRange:e=>{if(!e||!F(e))return!1;const{top:t,bottom:n}=oe(e),{clientHeight:o}=ie(e);return t<=o&&n>=0},isElementInViewport:e=>{if(!e||!F(e))return!1;const{clientWidth:t,clientHeight:n}=ie(e),{top:o,left:i,bottom:r,right:a}=oe(e,!0);return o>=0&&i>=0&&r<=n&&a<=t},passiveHandler:{passive:!0},passiveHandlerLegacy:ee,getElementAnimationDuration:U,getElementAnimationDurationLegacy:G,getElementAnimationDelay:Q,getElementAnimationDelayLegacy:q,getElementTransitionDuration:X,getElementTransitionDurationLegacy:Z,getElementTransitionDelay:K,getElementTransitionDelayLegacy:Y,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||re(e)&&e.host||ie(e)},getRectRelativeToOffsetParent:function(e,t,n){const o=z(t),i=oe(e,o&&ae(t)),r={x:0,y:0};if(o){const e=oe(t,!0);r.x=e.x+t.clientLeft,r.y=e.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:le,isArray:e=>Array.isArray(e),isString:e=>"string"==typeof e,isCustomElement:me,isElement:e=>e&&[1,2,3,4,5,6,7,8].some(t=>e.nodeType===t)||!1,isNode:F,isNumber:e=>"number"==typeof e,isHTMLElement:z,isHTMLImageElement:e=>e&&"IMG"===e.tagName||!1,isSVGElement:e=>e&&e instanceof le(e).SVGElement||!1,isNodeList:e=>e&&"NodeList"===e.constructor.name||!1,isHTMLCollection:e=>e&&"HTMLCollection"===e.constructor.name||!1,isScaledElement:ae,isTableElement:e=>e&&["TABLE","TD","TH"].includes(e.tagName)||!1,isShadowRoot:re,isDocument:P,isElementsArray:e=>Array.isArray(e)&&e.every(z),isFunction:e=>e&&"Function"===e.constructor.name||!1,isWindow:H,isMedia:e=>e&&1===e.nodeType&&["SVG","Image","Video"].some(t=>e.constructor.name.includes(t))||!1,isRTL:e=>"rtl"===ie(e).dir,closest:function e(t,n){return t?t.closest(n)||e(t.getRootNode().host,n):null},querySelector:function(e,t){return F(e)?e:(F(t)?t:B()).querySelector(e)},getCustomElements:function(e){return[...de("*",e)].filter(me)},getElementById:function(e,t){return B(t).getElementById(e)},querySelectorAll:function(e,t){return(F(t)?t:B()).querySelectorAll(e)},getElementsByClassName:function(e,t){return(F(t)?t:B()).getElementsByClassName(e)},getElementsByTagName:de,matches:function(e,t){return e.matches(t)},matchesLegacy:function(e,t){return pe.call(e,t)},normalizeValue:J,normalizeOptions:function(e,t,n,o){const i={...e.dataset},r={},a={};return $(i).forEach(e=>{const t=o&&e.includes(o)?e.replace(o,"").replace(/[A-Z]/,e=>_(e)):e;a[t]=J(i[e])}),$(n).forEach(e=>{n[e]=J(n[e])}),$(t).forEach(o=>{r[o]=o in n?n[o]:o in a?a[o]:"title"===o?C(e,"title"):t[o]}),r},reflow:e=>e.offsetHeight,noop:()=>{},focus:e=>e.focus(),getUID:function e(t,n){let o=n?se:ce;if(n){const i=e(t),r=ue.get(i)||new Map;ue.has(i)||ue.set(i,r),r.has(n)?o=r.get(n):(r.set(n,o),se+=1)}else{const e=t.id||t;ue.has(e)?o=ue.get(e):(ue.set(e,o),ce+=1)}return o},ArrayFrom:e=>Array.from(e),Float32ArrayFrom:e=>Float32Array.from(Array.from(e)),Float64ArrayFrom:e=>Float64Array.from(Array.from(e)),ObjectAssign:V,ObjectEntries:R,ObjectKeys:$,ObjectValues:e=>Object.values(e),OriginalEvent:function(e,t){const n=new CustomEvent(e,{cancelable:!0,bubbles:!0});return t instanceof Object&&V(n,t),n},getBoundingClientRect:oe,getDocument:B,getDocumentBody:function(e){return B(e).body},getDocumentElement:ie,getDocumentHead:function(e){return B(e).head},getElementStyle:W,setElementStyle:(e,t)=>{R(t).forEach(([t,n])=>{if(t.includes("--"))e.style.setProperty(t,n);else{const o={};o[t]=n,V(e.style,o)}})},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:O,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:"1.0.2"};export{ye as default};

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

// Shorty v1.0.1 | 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).SHORTY=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),b=!!f&&f.includes("Firefox"),y="webkitPerspective"in n.style||"perspective"in n.style;function E(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))};E(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,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}function M(e,t){return"string"==typeof e?("object"!=typeof t?S():t).querySelector(e):e}var O=new Map,C={set:function(e,t,n){var i=M(e);i&&(O.has(t)||O.set(t,new Map),O.get(t).set(i,n))},getAllFor:function(e){return O.get(e)||null},get:function(e,t){var n=M(e),i=C.getAllFor(t);return n&&i&&i.get(n)||null},remove:function(e,t){var n=M(e),i=O.get(t);i&&n&&(i.delete(n),0===i.size&&O.delete(t))}},z=function(e,t){return Object.assign(e,t)};function H(e,t){var n=getComputedStyle(e);return t in n?n[t]:""}function x(e){var t=H(e,"animationName"),n=H(e,"animationDelay"),i=n.includes("ms")?1:1e3,o=t&&"none"!==t?parseFloat(n)*i:0;return Number.isNaN(o)?0:o}function I(e){var t=H(e,"animationName"),n=H(e,"animationDuration"),i=n.includes("ms")?1:1e3,o=t&&"none"!==t?parseFloat(n)*i:0;return Number.isNaN(o)?0:o}function P(e){var t=H(e,r),n=H(e,o),i=n.includes("ms")?1:1e3,a=D&&t&&"none"!==t?parseFloat(n)*i:0;return Number.isNaN(a)?0:a}function B(e){var t=H(e,r),n=H(e,i),o=n.includes("ms")?1:1e3,a=D&&t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(a)?0:a}function F(e){var t=H(e,"transitionProperty"),n=H(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=H(e,"transitionProperty"),n=H(e,"transitionDuration"),i=n.includes("ms")?1:1e3,o=t&&"none"!==t?parseFloat(n)*i:0;return Number.isNaN(o)?0:o}function R(e){var t=H(e,l),n=H(e,s),i=n.includes("ms")?1:1e3,o=N&&t&&"none"!==t?parseFloat(n)*i:0;return Number.isNaN(o)?0:o}function V(e){var t=H(e,l),n=H(e,u),i=n.includes("ms")?1:1e3,o=N&&t&&"none"!==t?parseFloat(n)*i:0;return Number.isNaN(o)?0:o}function W(e){return"true"===e||"false"!==e&&(Number.isNaN(+e)?""===e||"null"===e?null:e:+e)}var Q=function(e){return Object.keys(e)},U=function(e){return e.toLowerCase()};var q=!!A&&{passive:!0},G=new Map,K={set:function(e,t,n,i){var o=M(e);o&&(i&&i.length?(G.has(o)||G.set(o,new Map),G.get(o).set(i,setTimeout(t,n))):G.set(o,setTimeout(t,n)))},get:function(e,t){var n=M(e);if(!n)return null;var i=G.get(n);return t&&t.length&&i&&i.get?i.get(t)||null:i||null},clear:function(e,t){var n=M(e);if(n)if(t&&t.length){var i=G.get(n);i&&i.get&&(clearTimeout(i.get(t)),i.delete(t),0===i.size&&G.delete(n))}else clearTimeout(G.get(n)),G.delete(n)}};function X(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 Y(e){return S(e).documentElement}function Z(e){if(null==e)return window;if(!(e instanceof Window)){var t=e.ownerDocument;return t&&t.defaultView||window}return e}var J=function(e){return e instanceof Z(e).ShadowRoot||e instanceof ShadowRoot};function $(e){var t=X(e),n=t.width,i=t.height,o=e.offsetWidth,r=e.offsetHeight;return Math.round(n)!==o||Math.round(i)!==r}var _=0,ee=0,te=new Map;var ne=function(e){return e&&!!e.shadowRoot};function ie(e,t){return("object"!=typeof t?S():t).getElementsByTagName(e)}var oe=ie("*");var re=Element.prototype,ae=re.matches||re.matchesSelector||re.webkitMatchesSelector||re.mozMatchesSelector||re.msMatchesSelector||re.oMatchesSelector||function(){return!1};return{ariaChecked:"aria-checked",ariaDescription:"aria-description",ariaDescribedBy:"aria-describedby",ariaExpanded:"aria-expanded",ariaHidden:"aria-hidden",ariaHasPopup:"aria-haspopup",ariaLabel:"aria-label",ariaLabelledBy:"aria-labelledby",ariaModal:"aria-modal",ariaPressed:"aria-pressed",ariaSelected:"aria-selected",ariaValueMin:"aria-valuemin",ariaValueMax:"aria-valuemax",ariaValueNow:"aria-valuenow",ariaValueText:"aria-valuetext",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:b,support3DTransform:y,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:E,off:h,one:w,dispatchEvent:function(e,t){return e.dispatchEvent(t)},distinct:function(e,t,n){return n.indexOf(e)===t},Data:C,getInstance:function(e,t){return C.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,z(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,z(r,o),r},toUpperCase:function(e){return e.toUpperCase()},toLowerCase:U,Timer:K,emulateAnimationEnd:function(e,t){var n=0,i=new Event("animationend"),o=I(e),r=x(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=B(e),r=P(e);if(D&&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=F(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=R(e);if(N&&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=X(e),n=t.top,i=t.bottom;return n<=Y(e).clientHeight&&i>=0},isElementInViewport:function(e){var t=X(e,!0),n=t.top,i=t.left,o=t.bottom,r=t.right,a=Y(e),u=a.clientWidth,s=a.clientHeight;return n>=0&&i>=0&&o<=s&&r<=u},passiveHandler:{passive:!0},passiveHandlerLegacy:q,getElementAnimationDuration:I,getElementAnimationDurationLegacy:B,getElementAnimationDelay:x,getElementAnimationDelayLegacy:P,getElementTransitionDuration:j,getElementTransitionDurationLegacy:V,getElementTransitionDelay:F,getElementTransitionDelayLegacy:R,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||(J(e)?e.host:null)||Y(e)},getRectRelativeToOffsetParent:function(e,t,n){var i=t instanceof HTMLElement,o=X(e,i&&$(t)),r={x:0,y:0};if(i){var a=X(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:Z,isArray:function(e){return Array.isArray(e)},isString:function(e){return"string"==typeof e},isCustomElement:ne,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:$,isTableElement:function(e){return["TABLE","TD","TH"].includes(e.tagName)},isShadowRoot:J,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"===Y(e).dir},closest:function e(t,n){return t?t.closest(n)||e(t.getRootNode().host,n):null},documentAll:oe,querySelector:M,getCustomElements:function(e){var t=e&&"object"==typeof e?ie("*",e):oe;return[].concat(t).filter(ne)},getElementById:function(e){return S().getElementById(e)},querySelectorAll:function(e,t){return("object"!=typeof t?S():t).querySelectorAll(e)},getElementsByClassName:function(e,t){return("object"!=typeof t?S():t).getElementsByClassName(e)},getElementsByTagName:ie,matches:function(e,t){return e.matches(t)},matchesLegacy:function(e,t){return ae.call(e,t)},normalizeValue:W,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 U(e)})):e;a[t]=W(o[e])})),Q(n).forEach((function(e){n[e]=W(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,n){var i=n?_:ee;if(n){var o=e(t),r=te.get(o)||new Map;te.has(o)||te.set(o,r),r.has(n)?i=r.get(n):(r.set(n,i),_+=1)}else{var a=t.id||t;te.has(a)?i=te.get(a):(te.set(a,i),ee+=1)}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:z,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&&z(n,t),n},getBoundingClientRect:X,getDocument:S,getDocumentBody:function(e){return S(e).body},getDocumentElement:Y,getDocumentHead:function(e){return S(e).head},getElementStyle:H,setElementStyle:function(e,t){z(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:"1.0.1"}}));
// Shorty v1.0.2 | 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).SHORTY=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,r="webkitAnimation"in n.style?"webkitAnimationDuration":"animationDuration",i="webkitAnimation"in n.style?"webkitAnimationDelay":"animationDelay",o="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,d=navigator.userAgent,f=/iPhone|iPad|iPod|Android/i,v=m?m.brands.some((function(e){return f.test(e.brand)})):f.test(d),g=/(iPhone|iPod|iPad)/,p=m?m.brands.some((function(e){return g.test(e.brand)})):g.test(d),b=!!d&&d.includes("Firefox"),y="webkitPerspective"in n.style||"perspective"in n.style;function E(e,t,n,r){var i=r||!1;e.addEventListener(t,n,i)}function h(e,t,n,r){var i=r||!1;e.removeEventListener(t,n,i)}function w(e,t,n,r){var i=function(o){o.target===e&&(n.apply(e,[o]),h(e,t,i,r))};E(e,t,i,r)}var k=function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){return e=!0}});w(document,"DOMContentLoaded",(function(){}),t)}catch(e){}return e}(),A="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)},S=function(e,t,n){return e.setAttribute(t,n)};var M=function(e){return e&&1===e.nodeType||!1},O=new Map,C={set:function(e,t,n){M(e)&&(O.has(t)||O.set(t,new Map),O.get(t).set(e,n))},getAllFor:function(e){return O.get(e)||null},get:function(e,t){if(!M(e)||!t)return null;var n=C.getAllFor(t);return e&&n&&n.get(e)||null},remove:function(e,t){var n=O.get(t);n&&M(e)&&(n.delete(e),0===n.size&&O.delete(t))}},z=function(e){return e&&9===e.nodeType||!1},x=function(e){return e&&[1,2,3,4,5,6,7,8,9,10,11].some((function(t){return+e.nodeType===t}))||!1},I=function(e){return e&&"Window"===e.constructor.name||!1};function P(e){return z(e)?e:x(e)?e.ownerDocument:I(e)?e.document:window.document}var H=function(e,t){return Object.assign(e,t)};var F=function(e){return Object.entries(e)};var B=function(e,t){return e.dispatchEvent(t)};function R(e,t){var n=getComputedStyle(e);return t.includes("--")?n.getPropertyValue(t):n[t]}function V(e){var t=R(e,"animationName"),n=R(e,"animationDelay"),r=n.includes("ms")?1:1e3,i=t&&"none"!==t?parseFloat(n)*r:0;return Number.isNaN(i)?0:i}function j(e){var t=R(e,"animationName"),n=R(e,"animationDuration"),r=n.includes("ms")?1:1e3,i=t&&"none"!==t?parseFloat(n)*r:0;return Number.isNaN(i)?0:i}function W(e){var t=R(e,o),n=R(e,i),r=n.includes("ms")?1:1e3,a=D&&t&&"none"!==t?parseFloat(n)*r:0;return Number.isNaN(a)?0:a}function Q(e){var t=R(e,o),n=R(e,r),i=n.includes("ms")?1:1e3,a=D&&t&&"none"!==t?parseFloat(n)*i:0;return Number.isNaN(a)?0:a}function U(e){var t=R(e,"transitionProperty"),n=R(e,"transitionDelay"),r=n.includes("ms")?1:1e3,i=t&&"none"!==t?parseFloat(n)*r:0;return Number.isNaN(i)?0:i}function q(e){var t=R(e,"transitionProperty"),n=R(e,"transitionDuration"),r=n.includes("ms")?1:1e3,i=t&&"none"!==t?parseFloat(n)*r:0;return Number.isNaN(i)?0:i}function G(e){var t=R(e,l),n=R(e,s),r=n.includes("ms")?1:1e3,i=N&&t&&"none"!==t?parseFloat(n)*r:0;return Number.isNaN(i)?0:i}function K(e){var t=R(e,l),n=R(e,u),r=n.includes("ms")?1:1e3,i=N&&t&&"none"!==t?parseFloat(n)*r:0;return Number.isNaN(i)?0:i}function X(e){return!!["true",!0].includes(e)||!["false",!1].includes(e)&&(""===e||"null"===e?null:""===e||Number.isNaN(+e)?e:+e)}var Y=function(e){return Object.keys(e)},Z=function(e){return e.toLowerCase()};var J=!!k&&{passive:!0},$=new Map,_={set:function(e,t,n,r){M(e)&&(r&&r.length?($.has(e)||$.set(e,new Map),$.get(e).set(r,setTimeout(t,n))):$.set(e,setTimeout(t,n)))},get:function(e,t){if(!M(e))return null;var n=$.get(e);return t&&t.length&&n&&n.get?n.get(t)||null:n||null},clear:function(e,t){if(M(e))if(t&&t.length){var n=$.get(e);n&&n.get&&(clearTimeout(n.get(t)),n.delete(t),0===n.size&&$.delete(e))}else clearTimeout($.get(e)),$.delete(e)}};function ee(e,t){var n=e.getBoundingClientRect(),r=n.width,i=n.height,o=n.top,a=n.right,u=n.bottom,s=n.left,c=1,l=1;if(t&&M(e)){var m=e.offsetWidth,d=e.offsetHeight;c=m>0?Math.round(r)/m:1,l=d>0?Math.round(i)/d:1}return{width:r/c,height:i/l,top:o/l,right:a/c,bottom:u/l,left:s/c,x:s/c,y:o/l}}function te(e){return P(e).documentElement}var ne=function(e){return e&&"ShadowRoot"===e.constructor.name||!1};function re(e){if(!e||!M(e))return!1;var t=ee(e),n=t.width,r=t.height,i=e.offsetWidth,o=e.offsetHeight;return Math.round(n)!==i||Math.round(r)!==o}var ie=0,oe=0,ae=new Map;function ue(e){return e?z(e)?e.defaultView:x(e)?e.ownerDocument.defaultView:e:window}var se=function(e){return e&&!!e.shadowRoot||!1};function ce(e,t){return(x(t)?t:P()).getElementsByTagName(e)}var le=Element.prototype,me=le.matches||le.matchesSelector||le.webkitMatchesSelector||le.mozMatchesSelector||le.msMatchesSelector||le.oMatchesSelector||function(){return!1};return{ariaChecked:"aria-checked",ariaDescription:"aria-description",ariaDescribedBy:"aria-describedby",ariaExpanded:"aria-expanded",ariaHidden:"aria-hidden",ariaHasPopup:"aria-haspopup",ariaLabel:"aria-label",ariaLabelledBy:"aria-labelledby",ariaModal:"aria-modal",ariaPressed:"aria-pressed",ariaSelected:"aria-selected",ariaValueMin:"aria-valuemin",ariaValueMax:"aria-valuemax",ariaValueNow:"aria-valuenow",ariaValueText:"aria-valuetext",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:r,animationDelay:"animationDelay",animationDelayLegacy:i,animationName:"animationName",animationNameLegacy:o,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:b,support3DTransform:y,supportPassive:k,supportTransform:A,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:d,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:E,off:h,one:w,dispatchEvent:B,distinct:function(e,t,n){return n.indexOf(e)===t},Data:C,getInstance:function(e,t){return C.get(e,t)},createElement:function e(t){if(!t)return null;if("string"==typeof t)return P().createElement(t);var n=t.tagName,r=Object.assign({},t),i=e(n);return delete r.tagName,H(i,r),i},createElementNS:function e(t,n){if(!t&&!n)return null;if("string"==typeof n)return P().createElementNS(t,n);var r=n.tagName,i=Object.assign({},n),o=e(t,r);return delete i.tagName,F(i).forEach((function(e){var t=e[0],n=e[1];S(o,t,n)})),o},toUpperCase:function(e){return e.toUpperCase()},toLowerCase:Z,Timer:_,emulateAnimationEnd:function(e,t){var n=0,r=new Event("animationend"),i=j(e),o=V(e);if(i){var a=function(r){r.target===e&&(t.apply(e,[r]),e.removeEventListener("animationend",a),n=1)};e.addEventListener("animationend",a),setTimeout((function(){n||B(e,r)}),i+o+17)}else t.apply(e,[r])},emulateAnimationEndLegacy:function(e,t){var n=0,r=new Event(a),i=Q(e),o=W(e);if(D&&i){var u=function(r){r.target===e&&(t.apply(e,[r]),e.removeEventListener(a,u),n=1)};e.addEventListener(a,u),setTimeout((function(){n||B(e,r)}),i+o+17)}else t.apply(e,[r])},emulateTransitionEnd:function(e,t){var n=0,r=new Event("transitionend"),i=q(e),o=U(e);if(i){var a=function(r){r.target===e&&(t.apply(e,[r]),e.removeEventListener("transitionend",a),n=1)};e.addEventListener("transitionend",a),setTimeout((function(){n||B(e,r)}),i+o+17)}else t.apply(e,[r])},emulateTransitionEndLegacy:function(e,t){var n=0,r=new Event(c),i=K(e),o=G(e);if(N&&i){var a=function(r){r.target===e&&(t.apply(e,[r]),e.removeEventListener(c,a),n=1)};e.addEventListener(c,a),setTimeout((function(){n||B(e,r)}),i+o+17)}else t.apply(e,[r])},isElementInScrollRange:function(e){if(!e||!x(e))return!1;var t=ee(e),n=t.top,r=t.bottom;return n<=te(e).clientHeight&&r>=0},isElementInViewport:function(e){if(!e||!x(e))return!1;var t=te(e),n=t.clientWidth,r=t.clientHeight,i=ee(e,!0),o=i.top,a=i.left,u=i.bottom,s=i.right;return o>=0&&a>=0&&u<=r&&s<=n},passiveHandler:{passive:!0},passiveHandlerLegacy:J,getElementAnimationDuration:j,getElementAnimationDurationLegacy:Q,getElementAnimationDelay:V,getElementAnimationDelayLegacy:W,getElementTransitionDuration:q,getElementTransitionDurationLegacy:K,getElementTransitionDelay:U,getElementTransitionDelayLegacy:G,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||ne(e)&&e.host||te(e)},getRectRelativeToOffsetParent:function(e,t,n){var r=M(t),i=ee(e,r&&re(t)),o={x:0,y:0};if(r){var a=ee(t,!0);o.x=a.x+t.clientLeft,o.y=a.y+t.clientTop}return{x:i.left+n.x-o.x,y:i.top+n.y-o.y,width:i.width,height:i.height}},getWindow:ue,isArray:function(e){return Array.isArray(e)},isString:function(e){return"string"==typeof e},isCustomElement:se,isElement:function(e){return e&&[1,2,3,4,5,6,7,8].some((function(t){return e.nodeType===t}))||!1},isNode:x,isNumber:function(e){return"number"==typeof e},isHTMLElement:M,isHTMLImageElement:function(e){return e&&"IMG"===e.tagName||!1},isSVGElement:function(e){return e&&e instanceof ue(e).SVGElement||!1},isNodeList:function(e){return e&&"NodeList"===e.constructor.name||!1},isHTMLCollection:function(e){return e&&"HTMLCollection"===e.constructor.name||!1},isScaledElement:re,isTableElement:function(e){return e&&["TABLE","TD","TH"].includes(e.tagName)||!1},isShadowRoot:ne,isDocument:z,isElementsArray:function(e){return Array.isArray(e)&&e.every(M)},isFunction:function(e){return e&&"Function"===e.constructor.name||!1},isWindow:I,isMedia:function(e){return e&&1===e.nodeType&&["SVG","Image","Video"].some((function(t){return e.constructor.name.includes(t)}))||!1},isRTL:function(e){return"rtl"===te(e).dir},closest:function e(t,n){return t?t.closest(n)||e(t.getRootNode().host,n):null},querySelector:function(e,t){return x(e)?e:(x(t)?t:P()).querySelector(e)},getCustomElements:function(e){var t=ce("*",e);return[].concat(t).filter(se)},getElementById:function(e,t){return P(t).getElementById(e)},querySelectorAll:function(e,t){return(x(t)?t:P()).querySelectorAll(e)},getElementsByClassName:function(e,t){return(x(t)?t:P()).getElementsByClassName(e)},getElementsByTagName:ce,matches:function(e,t){return e.matches(t)},matchesLegacy:function(e,t){return me.call(e,t)},normalizeValue:X,normalizeOptions:function(e,t,n,r){var i=Object.assign({},e.dataset),o={},a={};return Y(i).forEach((function(e){var t=r&&e.includes(r)?e.replace(r,"").replace(/[A-Z]/,(function(e){return Z(e)})):e;a[t]=X(i[e])})),Y(n).forEach((function(e){n[e]=X(n[e])})),Y(t).forEach((function(r){o[r]=r in n?n[r]:r in a?a[r]:"title"===r?T(e,"title"):t[r]})),o},reflow:function(e){return e.offsetHeight},noop:function(){},focus:function(e){return e.focus()},getUID:function e(t,n){var r=n?ie:oe;if(n){var i=e(t),o=ae.get(i)||new Map;ae.has(i)||ae.set(i,o),o.has(n)?r=o.get(n):(o.set(n,r),ie+=1)}else{var a=t.id||t;ae.has(a)?r=ae.get(a):(ae.set(a,r),oe+=1)}return r},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:H,ObjectEntries:F,ObjectKeys:Y,ObjectValues:function(e){return Object.values(e)},OriginalEvent:function(e,t){var n=new CustomEvent(e,{cancelable:!0,bubbles:!0});return t instanceof Object&&H(n,t),n},getBoundingClientRect:ee,getDocument:P,getDocumentBody:function(e){return P(e).body},getDocumentElement:te,getDocumentHead:function(e){return P(e).head},getElementStyle:R,setElementStyle:function(e,t){F(t).forEach((function(t){var n=t[0],r=t[1];if(n.includes("--"))e.style.setProperty(n,r);else{var i={};i[n]=r,H(e.style,i)}}))},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:S,setAttributeNS:function(e,t,n,r){return t.setAttributeNS(e,n,r)},removeAttribute:function(e,t){return e.removeAttribute(t)},removeAttributeNS:function(e,t,n){return t.removeAttributeNS(e,n)},Version:"1.0.2"}}));
{
"name": "@thednp/shorty",
"version": "1.0.1",
"version": "1.0.2",
"description": "ES6 JavaScript shorties",

@@ -15,3 +15,5 @@ "main": "dist/shorty.min.js",

"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"test": "npx cypress run",
"cypress": "npx cypress open",
"coverage:report": "nyc report --reporter=lcov --reporter=json --reporter=text --reporter=json-summary",
"fix:js": "eslint src/ --config .eslintrc --fix",

@@ -47,2 +49,4 @@ "lint:js": "eslint src/ --config .eslintrc",

"devDependencies": {
"@bahmutov/cypress-esbuild-preprocessor": "^2.1.3",
"@cypress/code-coverage": "^3.9.12",
"@rollup/plugin-buble": "^0.21.3",

@@ -52,2 +56,4 @@ "@rollup/plugin-json": "^4.1.0",

"@rollup/plugin-typescript": "^8.3.0",
"cypress": "^9.7.0",
"esbuild": "^0.14.30",
"eslint": "^7.22.0",

@@ -57,2 +63,5 @@ "eslint-config-airbnb-base": "^14.2.1",

"eslint-plugin-vue": "^7.7.0",
"istanbul-lib-coverage": "^3.2.0",
"istanbul-lib-instrument": "^5.2.0",
"nyc": "^15.1.0",
"npm-run-all": "^4.1.5",

@@ -59,0 +68,0 @@ "rollup": "^2.38.5",

@@ -1,12 +0,17 @@

# shorty ![typescript version](https://img.shields.io/badge/typescript-4.5.2-brightgreen) [![ci](https://github.com/thednp/shorty/actions/workflows/ci.yml/badge.svg)](https://github.com/thednp/shorty/actions/workflows/ci.yml)
# shorty
[![Coverage Status](https://coveralls.io/repos/github/thednp/shorty/badge.svg)](https://coveralls.io/github/thednp/shorty)
[![ci](https://github.com/thednp/shorty/actions/workflows/ci.yml/badge.svg)](https://github.com/thednp/shorty/actions/workflows/ci.yml)
[![NPM Version](https://img.shields.io/npm/v/@thednp/shorty.svg)](https://www.npmjs.com/package/shorty)
[![NPM Downloads](https://img.shields.io/npm/dm/@thednp/shorty.svg)](http://npm-stat.com/charts.html?package=shorty)
![jsDelivr hits (npm)](https://img.shields.io/jsdelivr/npm/hw/@thednp/shorty)
![cypress version](https://img.shields.io/badge/cypress-9.6.1-brightgreen)
![typescript version](https://img.shields.io/badge/typescript-4.5.2-brightgreen)
A small ES6+ library with various JavaScript tools, all ESLint valid and with TypeScript definitions, everything useful for creating light libraries or web components. If there is anything that is consistently repeating itself, **shorty** can help you save up to 50% of the code required, with little to no performance cost.
[![NPM Version](https://img.shields.io/npm/v/@thednp/shorty.svg?style=flat-square)](https://www.npmjs.com/package/shorty)
[![NPM Downloads](https://img.shields.io/npm/dm/@thednp/shorty.svg?style=flat-square)](http://npm-stat.com/charts.html?package=shorty)
[![jsDeliver](https://data.jsdelivr.com/v1/package/npm/@thednp/shorty/badge)](https://www.jsdelivr.com/package/npm/shorty)
**shorty** 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.
**shorty** is featured in [ColorPicker](https://github.com/thednp/color-picker), [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.
* Another excellent use for the library is for its selectors in a testing environment where you need to check the `instanceof` for various objects.
* 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.

@@ -174,2 +179,3 @@ * 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.

* ***isNodeList*** - check if a given value is a `NodeList` instance;
* ***isNumber*** - check if a given value is string;
* ***isRTL*** - check if a given node is contained in a `<html dir="rtl">`;

@@ -213,2 +219,3 @@ * ***isScaledElement*** - check if a given *Element* is affected by scale;

* ***ObjectAssign*** - a shortie for `Object.assign()` method;
* ***ObjectEntries*** - a shortie for `Object.entries()` method;
* ***ObjectKeys*** - a shortie for `Object.keys()` method;

@@ -224,3 +231,2 @@ * ***ObjectValues*** - a shortie for `Object.values()` 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;

@@ -250,3 +256,2 @@ The ***Data*** and ***Timer*** utilities have their own specifics, you might want to check the [wiki](https://github.com/thednp/shorty/wiki).

* ***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`;

@@ -253,0 +258,0 @@ * ***getElementById*** - a shortie for `document.getElementById()` method;

/**
* Shortcut for `HTMLElement.getAttribute()` method.
* @param {HTMLElement | Element} element target element
* @param {HTMLElement} element target element
* @param {string} attribute attribute name

@@ -5,0 +5,0 @@ * @returns {string?} attribute value

/**
* Shortcut for `HTMLElement.getAttributeNS()` method.
* @param {string} ns attribute namespace
* @param {HTMLElement | Element} element target element
* @param {HTMLElement} element target element
* @param {string} attribute attribute name

@@ -6,0 +6,0 @@ * @returns {string?} attribute value

/**
* Shortcut for `HTMLElement.hasAttribute()` method.
* @param {HTMLElement | Element} element target element
* @param {HTMLElement} element target element
* @param {string} attribute attribute name

@@ -5,0 +5,0 @@ * @returns {boolean} the query result

/**
* Shortcut for `HTMLElement.hasAttributeNS()` method.
* @param {string} ns attribute namespace
* @param {HTMLElement | Element} element target element
* @param {HTMLElement} element target element
* @param {string} att attribute name

@@ -6,0 +6,0 @@ * @returns {boolean} the query result

/**
* Shortcut for `HTMLElement.removeAttribute()` method.
* @param {HTMLElement | Element} element target element
* @param {HTMLElement} element target element
* @param {string} attribute attribute name

@@ -5,0 +5,0 @@ * @returns {void}

/**
* Shortcut for `HTMLElement.removeAttributeNS()` method.
* @param {string} ns attribute namespace
* @param {HTMLElement | Element} element target element
* @param {HTMLElement} element target element
* @param {string} att attribute name

@@ -6,0 +6,0 @@ * @returns {void}

/**
* Shortcut for `HTMLElement.setAttribute()` method.
* @param {HTMLElement | Element} element target element
* @param {HTMLElement} element target element
* @param {string} attribute attribute name

@@ -5,0 +5,0 @@ * @param {string} value attribute value

/**
* Shortcut for `SVGElement.setAttributeNS()` method.
* @param {string} ns attribute namespace
* @param {HTMLElement | Element} element target element
* @param {HTMLElement} element target element
* @param {string} att attribute name

@@ -6,0 +6,0 @@ * @param {string} value attribute value

@@ -10,5 +10,5 @@ import userAgentData from '../strings/userAgentData';

*/
const isApple = !userAgentData ? appleBrands.test(userAgent)
: userAgentData.brands.some((/** @type {Record<string, any>} */x) => appleBrands.test(x.brand));
const isApple = userAgentData ? userAgentData.brands.some((x) => appleBrands.test(x.brand))
: /* istanbul ignore next */appleBrands.test(userAgent);
export default isApple;

@@ -8,3 +8,4 @@ import userAgent from '../strings/userAgent';

*/
const isFirefox = userAgent ? userAgent.includes('Firefox') : false;
const isFirefox = userAgent ? userAgent.includes('Firefox')
: /* istanbul ignore next */false;
export default isFirefox;

@@ -7,5 +7,5 @@ import userAgentData from '../strings/userAgentData';

/* istanbul ignore else */
if (userAgentData) {
isMobileCheck = userAgentData.brands
.some((/** @type {Record<String, any>} */x) => mobileBrands.test(x.brand));
isMobileCheck = userAgentData.brands.some((x) => mobileBrands.test(x.brand));
} else {

@@ -12,0 +12,0 @@ isMobileCheck = mobileBrands.test(userAgent);

@@ -7,3 +7,4 @@ import documentHead from '../blocks/documentHead';

*/
const support3DTransform = 'webkitPerspective' in documentHead.style || 'perspective' in documentHead.style;
const support3DTransform = 'webkitPerspective' in documentHead.style
|| /* istanbul ignore next */'perspective' in documentHead.style;
export default support3DTransform;

@@ -7,3 +7,4 @@ import documentHead from '../blocks/documentHead';

*/
const supportAnimation = 'webkitAnimation' in documentHead.style || 'animation' in documentHead.style;
const supportAnimation = 'webkitAnimation' in documentHead.style
|| /* istanbul ignore next */'animation' in documentHead.style;
export default supportAnimation;

@@ -22,3 +22,3 @@ import DOMContentLoadedEvent from '../strings/DOMContentLoadedEvent';

} catch (e) {
throw Error('Passive events are not supported');
// throw Error('Passive events are not supported');
}

@@ -25,0 +25,0 @@

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

*/
const supportTouch = 'ontouchstart' in window || 'msMaxTouchPoints' in navigator;
const supportTouch = 'ontouchstart' in window
|| /* istanbul ignore next */'msMaxTouchPoints' in navigator;
export default supportTouch;

@@ -7,3 +7,4 @@ import documentHead from '../blocks/documentHead';

*/
const supportTransform = 'webkitTransform' in documentHead.style || 'transform' in documentHead.style;
const supportTransform = 'webkitTransform' in documentHead.style
|| /* istanbul ignore next */'transform' in documentHead.style;
export default supportTransform;

@@ -7,3 +7,4 @@ import documentHead from '../blocks/documentHead';

*/
const supportTransition = 'webkitTransition' in documentHead.style || 'transition' in documentHead.style;
const supportTransition = 'webkitTransition' in documentHead.style
|| /* istanbul ignore next */'transition' in documentHead.style;
export default supportTransition;
/**
* Add class to `HTMLElement.classList`.
*
* @param {HTMLElement | Element} element target
* @param {HTMLElement} element target
* @param {string} classNAME to add

@@ -6,0 +6,0 @@ * @returns {void}

/**
* Check class in `HTMLElement.classList`.
*
* @param {HTMLElement | Element} element target
* @param {HTMLElement} element target
* @param {string} classNAME to check

@@ -6,0 +6,0 @@ * @returns {boolean}

/**
* Remove class from `HTMLElement.classList`.
*
* @param {HTMLElement | Element} element target
* @param {HTMLElement} element target
* @param {string} classNAME to remove

@@ -6,0 +6,0 @@ * @returns {void}

/**
* Remove eventListener from an `Element` | `HTMLElement` | `Document` | `Window` target.
* Remove eventListener from an `HTMLElement` | `Document` | `Window` target.
*
* @param {HTMLElement | Element | Document | Window} element event.target
* @param {string} eventName event.type
* @param {EventListener} listener callback
* @param {(EventListenerOptions | boolean)=} options other event options
* @returns {void}
* @type {SHORTY.OnOff<EventTarget>}
*/

@@ -10,0 +6,0 @@ export default function off(element, eventName, listener, options) {

/**
* Add eventListener to an `Element` | `HTMLElement` | `Document` target.
* Add eventListener to an `HTMLElement` | `Document` target.
*
* @param {HTMLElement | Element | Document | Window} element event.target
* @param {string} eventName event.type
* @param {EventListener} listener callback
* @param {(EventListenerOptions | boolean)=} options other event options
* @returns {void}
* @type {SHORTY.OnOff<EventTarget>}
*/

@@ -10,0 +6,0 @@ export default function on(element, eventName, listener, options) {

@@ -5,10 +5,6 @@ import on from './on';

/**
* Add an `eventListener` to an `Element` | `HTMLElement` | `Document` | `Window`
* Add an `eventListener` to an `HTMLElement` | `Document` | `Window`
* target and remove it once callback is called.
*
* @param {HTMLElement | Element | Document | Window} element event.target
* @param {string} eventName event.type
* @param {EventListener} listener callback
* @param {(EventListenerOptions | boolean)=} options other event options
* @returns {void}
* @type {SHORTY.OnOff<EventTarget>}
*/

@@ -21,2 +17,3 @@ export default function one(element, eventName, listener, options) {

const handlerWrapper = (e) => {
/* istanbul ignore else */
if (e.target === element) {

@@ -23,0 +20,0 @@ listener.apply(element, [e]);

@@ -0,1 +1,3 @@

import isHTMLElement from '../is/isHTMLElement';
/**

@@ -6,5 +8,5 @@ * Returns the bounding client rect of a target `HTMLElement`.

*
* @param {HTMLElement | Element} element event.target
* @param {HTMLElement} element event.target
* @param {boolean=} includeScale when *true*, the target scale is also computed
* @returns {SHORTER.BoundingClientRect} the bounding client rect object
* @returns {SHORTY.BoundingClientRect} the bounding client rect object
*/

@@ -18,6 +20,8 @@ export default function getBoundingClientRect(element, includeScale) {

if (includeScale && element instanceof HTMLElement) {
if (includeScale && isHTMLElement(element)) {
const { offsetWidth, offsetHeight } = element;
scaleX = offsetWidth > 0 ? Math.round(width) / offsetWidth || 1 : 1;
scaleY = offsetHeight > 0 ? Math.round(height) / offsetHeight || 1 : 1;
scaleX = offsetWidth > 0 ? Math.round(width) / offsetWidth
: /* istanbul ignore next */1;
scaleY = offsetHeight > 0 ? Math.round(height) / offsetHeight
: /* istanbul ignore next */1;
}

@@ -24,0 +28,0 @@

@@ -0,11 +1,16 @@

import isDocument from '../is/isDocument';
import isNode from '../is/isNode';
import isWindow from '../is/isWindow';
/**
* Returns the `document` or the `#document` element.
* @see https://github.com/floating-ui/floating-ui
* @param {(Node | HTMLElement | Element | globalThis)=} node
* @param {(ParentNode | Window)=} node
* @returns {Document}
*/
export default function getDocument(node) {
if (node instanceof HTMLElement) return node.ownerDocument;
if (node instanceof Window) return node.document;
if (isDocument(node)) return node;
if (isNode(node)) return node.ownerDocument;
if (isWindow(node)) return node.document;
return window.document;
}

@@ -5,4 +5,4 @@ import getDocument from './getDocument';

*
* @param {(Node | HTMLElement | Element | globalThis)=} node
* @returns {HTMLElement | HTMLBodyElement}
* @param {(ParentNode | Window)=} node
* @returns {HTMLBodyElement}
*/

@@ -9,0 +9,0 @@ export default function getDocumentBody(node) {

@@ -6,4 +6,4 @@ import getDocument from './getDocument';

*
* @param {(Node | HTMLElement | Element | globalThis)=} node
* @returns {HTMLElement | HTMLHtmlElement}
* @param {(ParentNode | Window)=} node
* @returns {HTMLHtmlElement}
*/

@@ -10,0 +10,0 @@ export default function getDocumentElement(node) {

@@ -5,4 +5,4 @@ import getDocument from './getDocument';

*
* @param {(Node | HTMLElement | Element | globalThis)=} node
* @returns {HTMLElement | HTMLHeadElement}
* @param {(ParentNode | Window)=} node
* @returns {HTMLHeadElement}
*/

@@ -9,0 +9,0 @@ export default function getDocumentHead(node) {

@@ -9,3 +9,3 @@ import animationDelay from '../strings/animationDelay';

*
* @param {HTMLElement | Element} element target
* @param {HTMLElement} element target
* @return {number} the value in miliseconds

@@ -16,8 +16,8 @@ */

const durationValue = getElementStyle(element, animationDelay);
const durationScale = durationValue.includes('ms') ? 1 : 1000;
const durationScale = durationValue.includes('ms') ? /* istanbul ignore next */1 : 1000;
const duration = propertyValue && propertyValue !== 'none'
? parseFloat(durationValue) * durationScale : 0;
/* istanbul ignore next */
return !Number.isNaN(duration) ? duration : 0;
}

@@ -10,3 +10,3 @@ import supportAnimation from '../boolean/supportAnimation';

*
* @param {HTMLElement | Element} element target
* @param {HTMLElement} element target
* @return {number} the value in miliseconds

@@ -17,7 +17,7 @@ */

const durationValue = getElementStyle(element, animationDelay);
const durationScale = durationValue.includes('ms') ? 1 : 1000;
const durationScale = durationValue.includes('ms') ? /* istanbul ignore next */1 : 1000;
const duration = supportAnimation && propertyValue && propertyValue !== 'none'
? parseFloat(durationValue) * durationScale : 0;
return !Number.isNaN(duration) ? duration : 0;
return !Number.isNaN(duration) ? duration : /* istanbul ignore next */0;
}

@@ -9,3 +9,3 @@ import animationDuration from '../strings/animationDuration';

*
* @param {HTMLElement | Element} element target
* @param {HTMLElement} element target
* @return {number} the value in miliseconds

@@ -16,7 +16,7 @@ */

const durationValue = getElementStyle(element, animationDuration);
const durationScale = durationValue.includes('ms') ? 1 : 1000;
const durationScale = durationValue.includes('ms') ? /* istanbul ignore next */1 : 1000;
const duration = propertyValue && propertyValue !== 'none'
? parseFloat(durationValue) * durationScale : 0;
return !Number.isNaN(duration) ? duration : 0;
return !Number.isNaN(duration) ? duration : /* istanbul ignore next */0;
}

@@ -10,3 +10,3 @@ import supportAnimation from '../boolean/supportAnimation';

*
* @param {HTMLElement | Element} element target
* @param {HTMLElement} element target
* @return {number} the value in miliseconds

@@ -17,7 +17,7 @@ */

const durationValue = getElementStyle(element, animationDuration);
const durationScale = durationValue.includes('ms') ? 1 : 1000;
const durationScale = durationValue.includes('ms') ? /* istanbul ignore next */1 : 1000;
const duration = supportAnimation && propertyValue && propertyValue !== 'none'
? parseFloat(durationValue) * durationScale : 0;
return !Number.isNaN(duration) ? duration : 0;
return !Number.isNaN(duration) ? duration : /* istanbul ignore next */0;
}

@@ -8,3 +8,3 @@ /**

*
* @param {HTMLElement | Element} element target
* @param {HTMLElement} element target
* @param {string} property the css property

@@ -16,5 +16,7 @@ * @return {string} the css property value

// @ts-ignore -- must use camelcase strings,
// must use camelcase strings,
// or non-camelcase strings with `getPropertyValue`
return property in computedStyle ? computedStyle[property] : '';
return property.includes('--')
? computedStyle.getPropertyValue(property)
: computedStyle[property];
}

@@ -9,3 +9,3 @@ import transitionDelay from '../strings/transitionDelay';

*
* @param {HTMLElement | Element} element target
* @param {HTMLElement} element target
* @return {number} the value in miliseconds

@@ -16,8 +16,7 @@ */

const delayValue = getElementStyle(element, transitionDelay);
const delayScale = delayValue.includes('ms') ? 1 : 1000;
const delayScale = delayValue.includes('ms') ? /* istanbul ignore next */1 : 1000;
const duration = propertyValue && propertyValue !== 'none'
? parseFloat(delayValue) * delayScale : 0;
return !Number.isNaN(duration) ? duration : 0;
return !Number.isNaN(duration) ? duration : /* istanbul ignore next */0;
}

@@ -10,3 +10,3 @@ import supportTransition from '../boolean/supportTransition';

*
* @param {HTMLElement | Element} element target
* @param {HTMLElement} element target
* @return {number} the value in miliseconds

@@ -17,7 +17,7 @@ */

const delayValue = getElementStyle(element, transitionDelay);
const delayScale = delayValue.includes('ms') ? 1 : 1000;
const delayScale = delayValue.includes('ms') ? /* istanbul ignore next */1 : 1000;
const duration = supportTransition && propertyValue && propertyValue !== 'none'
? parseFloat(delayValue) * delayScale : 0;
return !Number.isNaN(duration) ? duration : 0;
return !Number.isNaN(duration) ? duration : /* istanbul ignore next */0;
}

@@ -9,3 +9,3 @@ import transitionDuration from '../strings/transitionDuration';

*
* @param {HTMLElement | Element} element target
* @param {HTMLElement} element target
* @return {number} the value in miliseconds

@@ -16,7 +16,7 @@ */

const durationValue = getElementStyle(element, transitionDuration);
const durationScale = durationValue.includes('ms') ? 1 : 1000;
const durationScale = durationValue.includes('ms') ? /* istanbul ignore next */1 : 1000;
const duration = propertyValue && propertyValue !== 'none'
? parseFloat(durationValue) * durationScale : 0;
return !Number.isNaN(duration) ? duration : 0;
return !Number.isNaN(duration) ? duration : /* istanbul ignore next */0;
}

@@ -10,3 +10,3 @@ import supportTransition from '../boolean/supportTransition';

*
* @param {HTMLElement | Element} element target
* @param {HTMLElement} element target
* @return {number} the value in miliseconds

@@ -17,7 +17,7 @@ */

const durationValue = getElementStyle(element, transitionDuration);
const durationScale = durationValue.includes('ms') ? 1 : 1000;
const durationScale = durationValue.includes('ms') ? /* istanbul ignore next */1 : 1000;
const duration = supportTransition && propertyValue && propertyValue !== 'none'
? parseFloat(durationValue) * durationScale : 0;
return !Number.isNaN(duration) ? duration : 0;
return !Number.isNaN(duration) ? duration : /* istanbul ignore next */0;
}

@@ -7,3 +7,3 @@ /**

*
* @param {HTMLElement | Element | Window} element target node / element
* @param {HTMLElement | Window} element target node / element
* @returns {{x: number, y: number}} the scroll tuple

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

@@ -8,4 +8,4 @@ import getDocumentElement from './getDocumentElement';

*
* @param {Node | HTMLElement | Element} node the target node
* @returns {Node | HTMLElement | Element} the apropriate parent node
* @param {Node} node the target node
* @returns {Node} the apropriate parent node
*/

@@ -19,8 +19,7 @@ export default function getParentNode(node) {

return (
// @ts-ignore
node.assignedSlot // step into the shadow DOM of the parent of a slotted node
|| node.parentNode // @ts-ignore DOM Element detected
|| (isShadowRoot(node) ? node.host : null) // ShadowRoot detected
|| node.parentNode // DOM Element detected
|| (isShadowRoot(node) && node.host) // ShadowRoot detected
|| getDocumentElement(node) // fallback
);
}
import isScaledElement from '../is/isScaledElement';
import isHTMLElement from '../is/isHTMLElement';
import getBoundingClientRect from './getBoundingClientRect';

@@ -8,12 +9,13 @@

*
* @param {HTMLElement | Element} element target
* @param {HTMLElement | Element | Window} offsetParent the container / offset parent
* @param {{x: number, y: number}} scroll
* @returns {SHORTER.OffsetRect}
* @param {HTMLElement} element target
* @param {ParentNode | Window} offsetParent the container / offset parent
* @param {{x: number, y: number}} scroll the offsetParent scroll position
* @returns {SHORTY.OffsetRect}
*/
export default function getRectRelativeToOffsetParent(element, offsetParent, scroll) {
const isParentAnElement = offsetParent instanceof HTMLElement;
const isParentAnElement = isHTMLElement(offsetParent);
const rect = getBoundingClientRect(element, isParentAnElement && isScaledElement(offsetParent));
const offsets = { x: 0, y: 0 };
/* istanbul ignore next */
if (isParentAnElement) {

@@ -20,0 +22,0 @@ const offsetRect = getBoundingClientRect(offsetParent, true);

@@ -8,3 +8,3 @@ let elementUID = 0;

*
* @param {HTMLElement | Element} element target element
* @param {HTMLElement} element target element
* @param {string=} key predefined key

@@ -11,0 +11,0 @@ * @returns {number} an existing or new unique ID

@@ -0,1 +1,4 @@

import isDocument from '../is/isDocument';
import isNode from '../is/isNode';
/**

@@ -5,17 +8,23 @@ * Returns the `Window` object of a target node.

*
* @param {(Node | HTMLElement | Element | Window)=} node target node
* @returns {globalThis}
* @param {(Node | Window)=} node target node
* @returns {Window} the `Window` object
*/
export default function getWindow(node) {
if (node == null) {
// node is undefined | NULL
if (!node) {
return window;
}
if (!(node instanceof Window)) {
const { ownerDocument } = node;
return ownerDocument ? ownerDocument.defaultView || window : window;
// node instanceof Document
if (isDocument(node)) {
return node.defaultView;
}
// @ts-ignore
// node instanceof Node
if (isNode(node)) {
return node.ownerDocument.defaultView;
}
// node is instanceof Window
return node;
}

@@ -0,1 +1,3 @@

/** @typedef {import('../types/index')} */
// strings

@@ -181,2 +183,3 @@ import ariaChecked from './strings/ariaChecked';

import ObjectAssign from './misc/ObjectAssign';
import ObjectEntries from './misc/ObjectEntries';
import ObjectKeys from './misc/ObjectKeys';

@@ -192,3 +195,2 @@ import ObjectValues from './misc/ObjectValues';

import toUpperCase from './misc/toUpperCase';
import tryWrapper from './misc/tryWrapper';

@@ -224,2 +226,3 @@ // get

import isElementsArray from './is/isElementsArray';
import isFunction from './is/isFunction';
import isHTMLCollection from './is/isHTMLCollection';

@@ -231,2 +234,3 @@ import isHTMLElement from './is/isHTMLElement';

import isNodeList from './is/isNodeList';
import isNumber from './is/isNumber';
import isRTL from './is/isRTL';

@@ -242,3 +246,2 @@ import isScaledElement from './is/isScaledElement';

import closest from './selectors/closest';
import documentAll from './selectors/documentAll';
import querySelector from './selectors/querySelector';

@@ -255,3 +258,3 @@ import getCustomElements from './selectors/getCustomElements';

const SHORTER = {
const SHORTY = {
ariaChecked,

@@ -422,2 +425,3 @@ ariaDescription,

isNode,
isNumber,
isHTMLElement,

@@ -433,2 +437,3 @@ isHTMLImageElement,

isElementsArray,
isFunction,
isWindow,

@@ -438,3 +443,2 @@ isMedia,

closest,
documentAll,
querySelector,

@@ -450,3 +454,2 @@ getCustomElements,

normalizeOptions,
tryWrapper,
reflow,

@@ -460,2 +463,3 @@ noop,

ObjectAssign,
ObjectEntries,
ObjectKeys,

@@ -482,2 +486,2 @@ ObjectValues,

export default SHORTER;
export default SHORTY;

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

const isArray = (arr) => Array.isArray(arr);
export default isArray;

@@ -7,3 +7,3 @@ /**

*/
const isCustomElement = (element) => element && !!element.shadowRoot;
const isCustomElement = (element) => (element && !!element.shadowRoot) || false;
export default isCustomElement;
/**
* Checks if an object is a `Document`.
* @see https://dom.spec.whatwg.org/#node
*
* @param {any} element the target object
* @param {any} object the target object
* @returns {boolean} the query result
*/
const isDocument = (element) => element instanceof Document;
const isDocument = (object) => (object && object.nodeType === 9) || false;
export default isDocument;
/**
* Checks if an object is an `Element`.
* @see https://dom.spec.whatwg.org/#node
* ELEMENT_NODE = 1;
* ATTRIBUTE_NODE = 2;
* TEXT_NODE = 3;
* CDATA_SECTION_NODE = 4;
* ENTITY_REFERENCE_NODE = 5; // legacy
* ENTITY_NODE = 6; // legacy
* PROCESSING_INSTRUCTION_NODE = 7;
* COMMENT_NODE = 8;
* DOCUMENT_NODE = 9;
* DOCUMENT_TYPE_NODE = 10;
* DOCUMENT_FRAGMENT_NODE = 11;
*

@@ -7,4 +19,5 @@ * @param {any} element the target object

*/
const isElement = (element) => element instanceof Element;
const isElement = (element) => (element && [1, 2, 3, 4, 5, 6, 7, 8]
.some((x) => element.nodeType === x)) || false;
export default isElement;
import getBoundingClientRect from '../get/getBoundingClientRect';
import getDocumentElement from '../get/getDocumentElement';
import isNode from './isNode';

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

*
* @param {HTMLElement | Element} element target
* @param {HTMLElement} element target
* @return {boolean} the query result
*/
const isElementInScrollRange = (element) => {
if (!element || !isNode(element)) return false;
const { top, bottom } = getBoundingClientRect(element);
const { clientHeight } = getDocumentElement(element);
// checks bottom && top
return top <= clientHeight && bottom >= 0;

@@ -17,0 +19,0 @@ };

import getBoundingClientRect from '../get/getBoundingClientRect';
import getDocumentElement from '../get/getDocumentElement';
import isNode from './isNode';

@@ -8,10 +9,13 @@ /**

*
* @param {HTMLElement | Element} element target
* @param {HTMLElement} element target
* @return {boolean} the query result
*/
const isElementInViewport = (element) => {
if (!element || !isNode(element)) return false;
const { clientWidth, clientHeight } = getDocumentElement(element);
const {
top, left, bottom, right,
} = getBoundingClientRect(element, true);
const { clientWidth, clientHeight } = getDocumentElement(element);
return (

@@ -18,0 +22,0 @@ top >= 0 && left >= 0

@@ -0,1 +1,3 @@

import isHTMLElement from './isHTMLElement';
/**

@@ -8,4 +10,4 @@ * Checks if an object is an `Array` in which all items are `Element`.

const isElementsArray = (object) => Array.isArray(object)
&& object.every((el) => [HTMLElement, Element].some((x) => el instanceof x));
&& object.every(isHTMLElement);
export default isElementsArray;
/**
* Checks if an object is a `Function`.
*
* @param {any} element the target object
* @param {any} fn the target object
* @returns {boolean} the query result
*/
const isFunction = (element) => element instanceof Function;
const isFunction = (fn) => (fn && fn.constructor.name === 'Function') || false;
export default isFunction;

@@ -7,3 +7,3 @@ /**

*/
const isHTMLCollection = (object) => object instanceof HTMLCollection;
const isHTMLCollection = (object) => (object && object.constructor.name === 'HTMLCollection') || false;
export default isHTMLCollection;
/**
* Checks if an element is an `HTMLElement`.
* @see https://dom.spec.whatwg.org/#node
*

@@ -7,3 +8,3 @@ * @param {any} element the target object

*/
const isHTMLElement = (element) => element instanceof HTMLElement;
const isHTMLElement = (element) => (element && element.nodeType === 1) || false;
export default isHTMLElement;

@@ -6,4 +6,4 @@ /**

*/
const isHTMLImageElement = (element) => element instanceof HTMLImageElement;
const isHTMLImageElement = (element) => (element && element.tagName === 'IMG') || false;
export default isHTMLImageElement;

@@ -9,5 +9,7 @@ /**

*/
const isMedia = (element) => element
&& [SVGElement, HTMLImageElement, HTMLVideoElement]
.some((mediaType) => element instanceof mediaType);
const isMedia = (element) => (
element
&& element.nodeType === 1
&& ['SVG', 'Image', 'Video'].some((s) => element.constructor.name.includes(s))) || false;
export default isMedia;

@@ -7,3 +7,4 @@ /**

*/
const isNode = (node) => node instanceof Node;
const isNode = (element) => (element && [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
.some((x) => +element.nodeType === x)) || false;
export default isNode;
/**
* Checks if an object is a `NodeList`.
* => equivalent to `object instanceof NodeList`
*

@@ -7,3 +8,3 @@ * @param {any} object the target object

*/
const isNodeList = (object) => object instanceof NodeList;
const isNodeList = (object) => (object && object.constructor.name === 'NodeList') || false;
export default isNodeList;

@@ -5,3 +5,3 @@ import getDocumentElement from '../get/getDocumentElement';

* Checks if a page is Right To Left.
* @param {(HTMLElement | Element)=} node the target
* @param {HTMLElement=} node the target
* @returns {boolean} the query result

@@ -8,0 +8,0 @@ */

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

import isHTMLElement from './isHTMLElement';
import getBoundingClientRect from '../get/getBoundingClientRect';

@@ -11,2 +12,3 @@

export default function isScaledElement(element) {
if (!element || !isHTMLElement(element)) return false;
const { width, height } = getBoundingClientRect(element);

@@ -13,0 +15,0 @@ const { offsetWidth, offsetHeight } = element;

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

import getWindow from '../get/getWindow';
/**

@@ -8,6 +7,4 @@ * Check if target is a `ShadowRoot`.

*/
const isShadowRoot = (element) => {
const OwnElement = getWindow(element).ShadowRoot;
return element instanceof OwnElement || element instanceof ShadowRoot;
};
const isShadowRoot = (element) => (element && element.constructor.name === 'ShadowRoot')
|| false;
export default isShadowRoot;
/**
* Shortcut for `typeof SOMETHING === string` static method.
* Shortcut for `typeof SOMETHING === "string"`.
*
* @param {any} str array-like iterable object
* @param {any} str input value
* @returns {boolean} the query result

@@ -6,0 +6,0 @@ */

@@ -0,1 +1,3 @@

import getWindow from '../get/getWindow';
/**

@@ -6,4 +8,5 @@ * Check if an element is an `<svg>` or any other SVG element.

*/
const isSVGElement = (element) => element instanceof SVGElement;
const isSVGElement = (element) => (element && element instanceof getWindow(element).SVGElement)
|| false;
export default isSVGElement;
/**
* Check if a target element is a `<table>`, `<td>` or `<th>`.
* This specific check is important for determining
* the `offsetParent` of a given element.
*
* @param {any} element the target element
* @returns {boolean} the query result
*/
const isTableElement = (element) => ['TABLE', 'TD', 'TH'].includes(element.tagName);
const isTableElement = (element) => (element && ['TABLE', 'TD', 'TH'].includes(element.tagName))
|| false;
export default isTableElement;
/**
* Check if a target node is `window`.
* Check if a target object is `Window`.
* => equivalent to `object instanceof Window`
*
* @param {any} node the target node
* @param {any} object the target object
* @returns {boolean} the query result
*/
export default function isWindow(node) {
return node instanceof Window;
}
const isWindow = (object) => (object && object.constructor.name === 'Window') || false;
export default isWindow;

@@ -12,5 +12,7 @@ import getDocument from '../get/getDocument';

* @param {Record<string, string> | string} param `tagName` or object
* @return {HTMLElement | Element} a new `HTMLElement` or `Element`
* @return {HTMLElement} a new `HTMLElement` or `Element`
*/
export default function createElement(param) {
if (!param) return null;
if (typeof param === 'string') {

@@ -17,0 +19,0 @@ return getDocument().createElement(param);

import getDocument from '../get/getDocument';
import ObjectAssign from './ObjectAssign';
import ObjectEntries from './ObjectEntries';
import setAttribute from '../attr/setAttribute';

@@ -13,5 +14,6 @@ /**

* @param {Record<string, string> | string} param `tagName` or object
* @return {HTMLElement | Element} a new `HTMLElement` or `Element`
* @return {HTMLElement} a new `HTMLElement` or `Element`
*/
export default function createElementNS(namespace, param) {
if (!namespace && !param) return null;
if (typeof param === 'string') {

@@ -25,4 +27,6 @@ return getDocument().createElementNS(namespace, param);

delete attr.tagName;
ObjectAssign(newElement, attr);
ObjectEntries(attr).forEach(([key, value]) => {
setAttribute(newElement, key, value);
});
return newElement;
}

@@ -1,4 +0,4 @@

import querySelector from '../selectors/querySelector';
import isHTMLElement from '../is/isHTMLElement';
/** @type {Map<string, Map<HTMLElement | Element, Record<string, any>>>} */
/** @type {Map<string, Map<HTMLElement, Record<string, any>>>} */
const componentData = new Map();

@@ -12,10 +12,10 @@ /**

* Sets web components data.
* @param {HTMLElement | Element | string} target target element
* @param {HTMLElement} element target element
* @param {string} component the component's name or a unique key
* @param {Record<string, any>} instance the component instance
*/
set: (target, component, instance) => {
const element = querySelector(target);
if (!element) return;
set: (element, component, instance) => {
if (!isHTMLElement(element)) return;
/* istanbul ignore else */
if (!componentData.has(component)) {

@@ -26,3 +26,3 @@ componentData.set(component, new Map());

const instanceMap = componentData.get(component);
// @ts-ignore - not undefined, but defined right above
// not undefined, but defined right above
instanceMap.set(element, instance);

@@ -34,3 +34,3 @@ },

* @param {string} component the component's name or a unique key
* @returns {Map<HTMLElement | Element, Record<string, any>>?} all the component instances
* @returns {Map<HTMLElement, Record<string, any>>?} all the component instances
*/

@@ -45,8 +45,8 @@ getAllFor: (component) => {

* Returns the instance associated with the target.
* @param {HTMLElement | Element | string} target target element
* @param {HTMLElement} element target element
* @param {string} component the component's name or a unique key
* @returns {Record<string, any>?} the instance
*/
get: (target, component) => {
const element = querySelector(target);
get: (element, component) => {
if (!isHTMLElement(element) || !component) return null;
const allForC = Data.getAllFor(component);

@@ -60,12 +60,12 @@ const instance = element && allForC && allForC.get(element);

* Removes web components data.
* @param {HTMLElement | Element | string} target target element
* @param {HTMLElement} element target element
* @param {string} component the component's name or a unique key
*/
remove: (target, component) => {
const element = querySelector(target);
remove: (element, component) => {
const instanceMap = componentData.get(component);
if (!instanceMap || !element) return;
if (!instanceMap || !isHTMLElement(element)) return;
instanceMap.delete(element);
/* istanbul ignore else */
if (instanceMap.size === 0) {

@@ -79,3 +79,3 @@ componentData.delete(component);

* An alias for `Data.get()`.
* @type {SHORTER.getInstance<any>}
* @type {SHORTY.getInstance<any>}
*/

@@ -82,0 +82,0 @@ export const getInstance = (target, component) => Data.get(target, component);

/**
* Shortcut for the `Element.dispatchEvent(Event)` method.
*
* @param {HTMLElement | Element} element is the target
* @param {HTMLElement} element is the target
* @param {Event} event is the `Event` object

@@ -6,0 +6,0 @@ */

import animationEndEvent from '../strings/animationEndEvent';
import getElementAnimationDelay from '../get/getElementAnimationDelay';
import getElementAnimationDuration from '../get/getElementAnimationDuration';
import dispatchEvent from './dispatchEvent';

@@ -9,3 +10,3 @@ /**

*
* @param {HTMLElement | Element} element target
* @param {HTMLElement} element target
* @param {EventListener} handler `animationend` callback

@@ -25,2 +26,3 @@ */

const animationEndWrapper = (e) => {
/* istanbul ignore else */
if (e.target === element) {

@@ -34,3 +36,4 @@ handler.apply(element, [e]);

setTimeout(() => {
if (!called) element.dispatchEvent(endEvent);
/* istanbul ignore next */
if (!called) dispatchEvent(element, endEvent);
}, duration + delay + 17);

@@ -37,0 +40,0 @@ } else {

import supportAnimation from '../boolean/supportAnimation';
import animationEndEvent from '../strings/animationEndEventLegacy';
import animationEndEventLegacy from '../strings/animationEndEventLegacy';
import getElementAnimationDelay from '../get/getElementAnimationDelayLegacy';
import getElementAnimationDuration from '../get/getElementAnimationDurationLegacy';
import dispatchEvent from './dispatchEvent';

@@ -10,3 +11,3 @@ /**

*
* @param {HTMLElement | Element} element target
* @param {HTMLElement} element target
* @param {EventListener} handler `animationend` callback

@@ -16,3 +17,3 @@ */

let called = 0;
const endEvent = new Event(animationEndEvent);
const endEvent = new Event(animationEndEventLegacy);
const duration = getElementAnimationDuration(element);

@@ -27,11 +28,13 @@ const delay = getElementAnimationDelay(element);

const animationEndWrapper = (e) => {
/* istanbul ignore else */
if (e.target === element) {
handler.apply(element, [e]);
element.removeEventListener(animationEndEvent, animationEndWrapper);
element.removeEventListener(animationEndEventLegacy, animationEndWrapper);
called = 1;
}
};
element.addEventListener(animationEndEvent, animationEndWrapper);
element.addEventListener(animationEndEventLegacy, animationEndWrapper);
setTimeout(() => {
if (!called) element.dispatchEvent(endEvent);
/* istanbul ignore next */
if (!called) dispatchEvent(element, endEvent);
}, duration + delay + 17);

@@ -38,0 +41,0 @@ } else {

import transitionEndEvent from '../strings/transitionEndEvent';
import getElementTransitionDelay from '../get/getElementTransitionDelay';
import getElementTransitionDuration from '../get/getElementTransitionDuration';
import dispatchEvent from './dispatchEvent';

@@ -9,3 +10,3 @@ /**

*
* @param {HTMLElement | Element} element target
* @param {HTMLElement} element target
* @param {EventListener} handler `transitionend` callback

@@ -25,2 +26,3 @@ */

const transitionEndWrapper = (e) => {
/* istanbul ignore else */
if (e.target === element) {

@@ -34,3 +36,4 @@ handler.apply(element, [e]);

setTimeout(() => {
if (!called) element.dispatchEvent(endEvent);
/* istanbul ignore next */
if (!called) dispatchEvent(element, endEvent);
}, duration + delay + 17);

@@ -37,0 +40,0 @@ } else {

import supportTransition from '../boolean/supportTransition';
import transitionEndEvent from '../strings/transitionEndEventLegacy';
import transitionEndEventLegacy from '../strings/transitionEndEventLegacy';
import getElementTransitionDelay from '../get/getElementTransitionDelayLegacy';
import getElementTransitionDuration from '../get/getElementTransitionDurationLegacy';
import dispatchEvent from './dispatchEvent';

@@ -10,3 +11,3 @@ /**

*
* @param {HTMLElement | Element} element target
* @param {HTMLElement} element target
* @param {EventListener} handler `transitionend` callback

@@ -16,3 +17,3 @@ */

let called = 0;
const endEvent = new Event(transitionEndEvent);
const endEvent = new Event(transitionEndEventLegacy);
const duration = getElementTransitionDuration(element);

@@ -27,11 +28,13 @@ const delay = getElementTransitionDelay(element);

const transitionEndWrapper = (e) => {
/* istanbul ignore else */
if (e.target === element) {
handler.apply(element, [e]);
element.removeEventListener(transitionEndEvent, transitionEndWrapper);
element.removeEventListener(transitionEndEventLegacy, transitionEndWrapper);
called = 1;
}
};
element.addEventListener(transitionEndEvent, transitionEndWrapper);
element.addEventListener(transitionEndEventLegacy, transitionEndWrapper);
setTimeout(() => {
if (!called) element.dispatchEvent(endEvent);
/* istanbul ignore next */
if (!called) dispatchEvent(element, endEvent);
}, duration + delay + 17);

@@ -38,0 +41,0 @@ } else {

/**
* Utility to focus an `HTMLElement` target.
*
* @param {HTMLElement | Element} element is the target
* @param {HTMLElement} element is the target
*/
// @ts-ignore -- `Element`s resulted from querySelector can focus too
const focus = (element) => element.focus();
export default focus;

@@ -9,3 +9,3 @@ import getAttribute from '../attr/getAttribute';

*
* @param {HTMLElement | Element} element target
* @param {HTMLElement} element target
* @param {Record<string, any>} defaultOps component default options

@@ -17,3 +17,2 @@ * @param {Record<string, any>} inputOps component instance options

export default function normalizeOptions(element, defaultOps, inputOps, ns) {
// @ts-ignore -- our targets are always `HTMLElement`
const data = { ...element.dataset };

@@ -39,2 +38,3 @@ /** @type {Record<string, any>} */

ObjectKeys(defaultOps).forEach((k) => {
/* istanbul ignore else */
if (k in inputOps) {

@@ -41,0 +41,0 @@ normalOps[k] = inputOps[k];

@@ -14,14 +14,12 @@ /**

export default function normalizeValue(value) {
if (value === 'true') { // boolean
if (['true', true].includes(value)) { // boolean
// if ('true' === value) { // boolean
return true;
}
if (value === 'false') { // boolean
if (['false', false].includes(value)) { // boolean
// if ('false' === value) { // boolean
return false;
}
if (!Number.isNaN(+value)) { // number
return +value;
}
if (value === '' || value === 'null') { // null

@@ -31,4 +29,8 @@ return null;

if (value !== '' && !Number.isNaN(+value)) { // number
return +value;
}
// string / function / HTMLElement / object
return value;
}

@@ -7,3 +7,3 @@ import ObjectAssign from './ObjectAssign';

* @param {Record<string, any>=} config Event.options | Event.properties
* @returns {SHORTER.OriginalEvent} a new namespaced event
* @returns {SHORTY.OriginalEvent} a new namespaced event
*/

@@ -15,2 +15,3 @@ export default function OriginalEvent(EventType, config) {

/* istanbul ignore else */
if (config instanceof Object) {

@@ -17,0 +18,0 @@ ObjectAssign(OriginalCustomEvent, config);

@@ -7,4 +7,5 @@ import supportPassive from '../boolean/supportPassive';

*/
const passiveHandler = supportPassive ? { passive: true } : false;
const passiveHandler = supportPassive ? { passive: true }
: /* istanbul ignore next */false;
export default passiveHandler;
/**
* Utility to force re-paint of an `HTMLElement` target.
*
* @param {HTMLElement | Element} element is the target
* @param {HTMLElement} element is the target
* @return {number} the `Element.offsetHeight` value
*/
// @ts-ignore
const reflow = (element) => element.offsetHeight;
export default reflow;
import ObjectAssign from './ObjectAssign';
import ObjectEntries from './ObjectEntries';
/**
* Shortcut for multiple uses of `HTMLElement.style.propertyName` method.
* @param {HTMLElement | Element} element target element
* @param {HTMLElement} element target element
* @param {Partial<CSSStyleDeclaration>} styles attribute value
*/
// @ts-ignore
const setElementStyle = (element, styles) => { ObjectAssign(element.style, styles); };
const setElementStyle = (element, styles) => {
ObjectEntries(styles).forEach(([key, value]) => {
if (key.includes('--')) {
element.style.setProperty(key, value);
} else {
const propObject = {}; propObject[key] = value;
ObjectAssign(element.style, propObject);
}
});
};
export default setElementStyle;

@@ -1,4 +0,4 @@

import querySelector from '../selectors/querySelector';
import isHTMLElement from '../is/isHTMLElement';
/** @type {Map<HTMLElement | Element, any>} */
/** @type {Map<HTMLElement, any>} */
const TimeCache = new Map();

@@ -12,3 +12,3 @@ /**

* Sets a new timeout timer for an element, or element -> key association.
* @param {HTMLElement | Element | string} target target element
* @param {HTMLElement} element target element
* @param {ReturnType<TimerHandler>} callback the callback

@@ -18,8 +18,8 @@ * @param {number} delay the execution delay

*/
set: (target, callback, delay, key) => {
const element = querySelector(target);
set: (element, callback, delay, key) => {
if (!isHTMLElement(element)) return;
if (!element) return;
/* istanbul ignore else */
if (key && key.length) {
/* istanbul ignore else */
if (!TimeCache.has(element)) {

@@ -37,14 +37,12 @@ TimeCache.set(element, new Map());

* Returns the timer associated with the target.
* @param {HTMLElement | Element | string} target target element
* @param {HTMLElement} element target element
* @param {string=} key a unique
* @returns {number?} the timer
*/
get: (target, key) => {
const element = querySelector(target);
if (!element) return null;
get: (element, key) => {
if (!isHTMLElement(element)) return null;
const keyTimers = TimeCache.get(element);
if (key && key.length && keyTimers && keyTimers.get) {
return keyTimers.get(key) || null;
return keyTimers.get(key) || /* istanbul ignore next */null;
}

@@ -56,16 +54,15 @@ return keyTimers || null;

* Clears the element's timer.
* @param {HTMLElement | Element | string} target target element
* @param {HTMLElement} element target element
* @param {string=} key a unique key
*/
clear: (target, key) => {
const element = querySelector(target);
clear: (element, key) => {
if (!isHTMLElement(element)) return;
if (!element) return;
if (key && key.length) {
const keyTimers = TimeCache.get(element);
/* istanbul ignore else */
if (keyTimers && keyTimers.get) {
clearTimeout(keyTimers.get(key));
keyTimers.delete(key);
/* istanbul ignore else */
if (keyTimers.size === 0) {

@@ -72,0 +69,0 @@ TimeCache.delete(element);

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

// @ts-ignore
import { version } from '../../package.json';

@@ -3,0 +2,0 @@

@@ -8,10 +8,10 @@ /**

*
* @param {HTMLElement | Element} element Element to look into
* @param {HTMLElement} element Element to look into
* @param {string} selector the selector name
* @return {(HTMLElement | Element)?} the query result
* @return {HTMLElement?} the query result
*/
export default function closest(element, selector) {
return element ? (element.closest(selector)
// @ts-ignore -- break out of `ShadowRoot`
// break out of `ShadowRoot`
|| closest(element.getRootNode().host, selector)) : null;
}

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

import documentAll from './documentAll';
import isCustomElement from '../is/isCustomElement';

@@ -10,9 +9,9 @@ import getElementsByTagName from './getElementsByTagName';

*
* @param {(HTMLElement | Element | Node | Document)=} parent parent to look into
* @returns {Array<HTMLElement | Element>} the query result
* @param {ParentNode=} parent parent to look into
* @returns {Array<HTMLElement>} the query result
*/
export default function getCustomElements(parent) {
const collection = parent && typeof parent === 'object'
? getElementsByTagName('*', parent) : documentAll;
const collection = getElementsByTagName('*', parent);
return [...collection].filter(isCustomElement);
}

@@ -5,8 +5,11 @@ import getDocument from '../get/getDocument';

* Returns an `Element` that matches the id in the document.
* Within multiple <iframe> elements, a `parent` parameter
* would decisively locate the correct element.
*
* @param {string} id
* @returns {(HTMLElement | Element)?}
* @param {ParentNode=} context
* @returns {HTMLElement?}
*/
export default function getElementById(id) {
return getDocument().getElementById(id);
export default function getElementById(id, context) {
return getDocument(context).getElementById(id);
}
import getDocument from '../get/getDocument';
import isNode from '../is/isNode';

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

* @param {string} selector the class name
* @param {(HTMLElement | Element | Document)=} parent optional Element to look into
* @return {HTMLCollectionOf<HTMLElement | Element>} the 'HTMLCollection'
* @param {ParentNode=} parent optional Element to look into
* @return {HTMLCollectionOf<HTMLElement>} the 'HTMLCollection'
*/
export default function getElementsByClassName(selector, parent) {
const lookUp = typeof parent !== 'object' ? getDocument() : parent;
const lookUp = isNode(parent) ? parent : getDocument();
return lookUp.getElementsByClassName(selector);
}
import getDocument from '../get/getDocument';
import isNode from '../is/isNode';

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

* @param {string} selector the tag name
* @param {(HTMLElement | Element | Document)=} parent optional Element to look into
* @return {HTMLCollectionOf<HTMLElement | Element>} the 'HTMLCollection'
* @param {ParentNode=} parent optional Element to look into
* @return {HTMLCollectionOf<HTMLElement>} the 'HTMLCollection'
*/
export default function getElementsByTagName(selector, parent) {
const lookUp = typeof parent !== 'object' ? getDocument() : parent;
const lookUp = isNode(parent) ? parent : getDocument();
return lookUp.getElementsByTagName(selector);
}
/**
* Check if element matches a CSS selector.
*
* @param {HTMLElement | Element} target
* @param {HTMLElement} target
* @param {string} selector

@@ -6,0 +6,0 @@ * @returns {boolean}

@@ -1,10 +0,10 @@

// @ts-nocheck
const ElementProto = Element.prototype;
const matchesFn = ElementProto.matches
|| ElementProto.matchesSelector
|| ElementProto.webkitMatchesSelector
|| ElementProto.mozMatchesSelector
|| ElementProto.msMatchesSelector
|| ElementProto.oMatchesSelector
|| function matchesNotSupported() {
|| /* istanbul ignore next */ ElementProto.matchesSelector
|| /* istanbul ignore next */ ElementProto.webkitMatchesSelector
|| /* istanbul ignore next */ ElementProto.mozMatchesSelector
|| /* istanbul ignore next */ ElementProto.msMatchesSelector
|| /* istanbul ignore next */ ElementProto.oMatchesSelector
|| /* istanbul ignore next */ function matchesNotSupported() {
return false;

@@ -17,3 +17,3 @@ };

*
* @param {HTMLElement | Element} target
* @param {HTMLElement} target
* @param {string} selector

@@ -20,0 +20,0 @@ * @returns {boolean}

import getDocument from '../get/getDocument';
import isNode from '../is/isNode';

@@ -7,12 +8,13 @@ /**

*
* @param {Node | HTMLElement | Element | string} selector the input selector or target element
* @param {(Node | HTMLElement | Element | Document)=} parent optional node to look into
* @return {(HTMLElement | Element)?} the `HTMLElement` or `querySelector` result
* @param {Node | string} selector the input selector or target element
* @param {ParentNode=} parent optional node to look into
* @return {HTMLElement?} the `HTMLElement` or `querySelector` result
*/
export default function querySelector(selector, parent) {
if (typeof selector === 'string') {
const lookUp = typeof parent !== 'object' ? getDocument() : parent;
return lookUp.querySelector(selector);
if (isNode(selector)) {
return selector;
}
return selector;
const lookUp = isNode(parent) ? parent : getDocument();
return lookUp.querySelector(selector);
}
import getDocument from '../get/getDocument';
import isNode from '../is/isNode';

@@ -7,8 +8,8 @@ /**

* @param {string} selector the input selector
* @param {(HTMLElement | Element | Document | Node)=} parent optional node to look into
* @return {NodeListOf<HTMLElement | Element>} the query result
* @param {ParentNode=} parent optional node to look into
* @return {NodeListOf<HTMLElement>} the query result
*/
export default function querySelectorAll(selector, parent) {
const lookUp = typeof parent !== 'object' ? getDocument() : parent;
const lookUp = isNode(parent) ? parent : getDocument();
return lookUp.querySelectorAll(selector);
}

@@ -7,3 +7,4 @@ import documentHead from '../blocks/documentHead';

*/
const animationDelay = 'webkitAnimation' in documentHead.style ? 'webkitAnimationDelay' : 'animationDelay';
const animationDelay = 'webkitAnimation' in documentHead.style ? 'webkitAnimationDelay'
: /* istanbul ignore next */'animationDelay';
export default animationDelay;

@@ -7,3 +7,4 @@ import documentHead from '../blocks/documentHead';

*/
const animationDuration = 'webkitAnimation' in documentHead.style ? 'webkitAnimationDuration' : 'animationDuration';
const animationDuration = 'webkitAnimation' in documentHead.style ? 'webkitAnimationDuration'
: /* istanbul ignore next */'animationDuration';
export default animationDuration;

@@ -7,3 +7,4 @@ import documentHead from '../blocks/documentHead';

*/
const animationEndEvent = 'webkitAnimation' in documentHead.style ? 'webkitAnimationEnd' : 'animationend';
const animationEndEvent = 'webkitAnimation' in documentHead.style ? 'webkitAnimationEnd'
: /* istanbul ignore next */'animationend';
export default animationEndEvent;

@@ -7,3 +7,4 @@ import documentHead from '../blocks/documentHead';

*/
const animationName = 'webkitAnimation' in documentHead.style ? 'webkitAnimationName' : 'animationName';
const animationName = 'webkitAnimation' in documentHead.style ? 'webkitAnimationName'
: /* istanbul ignore next */'animationName';
export default animationName;

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

*/
const mouseHoverEvents = ('onmouseleave' in document) ? ['mouseenter', 'mouseleave'] : ['mouseover', 'mouseout'];
const mouseHoverEvents = ('onmouseleave' in document) ? ['mouseenter', 'mouseleave']
: /* istanbul ignore next */['mouseover', 'mouseout'];
export default mouseHoverEvents;

@@ -7,3 +7,4 @@ import documentHead from '../blocks/documentHead';

*/
const transitionDelay = 'webkitTransition' in documentHead.style ? 'webkitTransitionDelay' : 'transitionDelay';
const transitionDelay = 'webkitTransition' in documentHead.style ? 'webkitTransitionDelay'
: /* istanbul ignore next */'transitionDelay';
export default transitionDelay;

@@ -7,3 +7,4 @@ import documentHead from '../blocks/documentHead';

*/
const transitionDuration = 'webkitTransition' in documentHead.style ? 'webkitTransitionDuration' : 'transitionDuration';
const transitionDuration = 'webkitTransition' in documentHead.style ? 'webkitTransitionDuration'
: /* istanbul ignore next */'transitionDuration';
export default transitionDuration;

@@ -7,3 +7,4 @@ import documentHead from '../blocks/documentHead';

*/
const transitionEndEvent = 'webkitTransition' in documentHead.style ? 'webkitTransitionEnd' : 'transitionend';
const transitionEndEvent = 'webkitTransition' in documentHead.style ? 'webkitTransitionEnd'
: /* istanbul ignore next */'transitionend';
export default transitionEndEvent;

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

*/
const transitionProperty = 'webkitTransition' in documentHead.style ? 'webkitTransitionProperty' : 'transitionProperty';
const transitionProperty = 'webkitTransition' in documentHead.style ? 'webkitTransitionProperty'
: /* istanbul ignore next */'transitionProperty';
export default transitionProperty;

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

// @ts-ignore
const { userAgentData: uaDATA } = navigator;

@@ -3,0 +2,0 @@

@@ -177,3 +177,2 @@ export as namespace SHORTY;

export { default as normalizeOptions } from 'shorty/src/misc/normalizeOptions';
export { default as tryWrapper } from 'shorty/src/misc/tryWrapper';
export { default as reflow } from 'shorty/src/misc/reflow';

@@ -185,2 +184,3 @@ export { default as focus } from 'shorty/src/misc/focus';

export { default as Float64ArrayFrom } from 'shorty/src/misc/Float64ArrayFrom';
export { default as ObjectEntries } from 'shorty/src/misc/ObjectEntries';
export { default as ObjectKeys } from 'shorty/src/misc/ObjectKeys';

@@ -214,3 +214,2 @@ export { default as ObjectValues } from 'shorty/src/misc/ObjectValues';

export { default as closest } from 'shorty/src/selectors/closest';
export { default as documentAll } from 'shorty/src/selectors/documentAll';
export { default as getCustomElements } from 'shorty/src/selectors/getCustomElements';

@@ -240,4 +239,11 @@ export { default as getElementById } from 'shorty/src/selectors/getElementById';

export type OnOff<T> = (
element: T,
eventType: string,
listener: EventListenerObject['handleEvent'],
options?: AddEventListenerOptions
) => void;
export interface OriginalEvent extends CustomEvent {
relatedTarget?: HTMLElement | Element | null;
relatedTarget: EventTarget | null;
}

@@ -244,0 +250,0 @@

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

export { default as normalizeOptions } from '../../src/misc/normalizeOptions';
export { default as tryWrapper } from '../../src/misc/tryWrapper';
export { default as reflow } from '../../src/misc/reflow';

@@ -208,2 +207,3 @@ export { default as focus } from '../../src/misc/focus';

export { default as Float64ArrayFrom } from '../../src/misc/Float64ArrayFrom';
export { default as ObjectEntries } from '../../src/misc/ObjectEntries';
export { default as ObjectKeys } from '../../src/misc/ObjectKeys';

@@ -233,2 +233,3 @@ export { default as ObjectValues } from '../../src/misc/ObjectValues';

export { default as isString } from '../../src/is/isString';
export { default as isNumber } from '../../src/is/isNumber';
export { default as isSVGElement } from '../../src/is/isSVGElement';

@@ -240,3 +241,2 @@ export { default as isTableElement } from '../../src/is/isTableElement';

export { default as closest } from '../../src/selectors/closest';
export { default as documentAll } from '../../src/selectors/documentAll';
export { default as getCustomElements } from '../../src/selectors/getCustomElements';

@@ -243,0 +243,0 @@ export { default as getElementById } from '../../src/selectors/getElementById';

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