generated from VLADIMIR/template_frontend
1 line
1.6 KiB
JavaScript
1 line
1.6 KiB
JavaScript
import{D as e,d as t}from"./light-BDe84dgP.js";import{G as n,U as r}from"./index-BlhddSFj.js";var i=/^(\d|\.)+$/,a=/(\d|\.)+/;function o(e,{c:t=1,offset:n=0,attachPx:r=!0}={}){if(typeof e==`number`){let r=(e+n)*t;return r===0?`0`:`${r}px`}else if(typeof e==`string`)if(i.test(e)){let i=(Number(e)+n)*t;return r?i===0?`0`:`${i}px`:`${i}`}else{let r=a.exec(e);return r?e.replace(a,String((Number(r[0])+n)*t)):e}return e}var s=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,c=/^\w*$/;function l(t,r){if(e(t))return!1;var i=typeof t;return i==`number`||i==`symbol`||i==`boolean`||t==null||n(t)?!0:c.test(t)||!s.test(t)||r!=null&&t in Object(r)}var u=`Expected a function`;function d(e,n){if(typeof e!=`function`||n!=null&&typeof n!=`function`)throw TypeError(u);var r=function(){var t=arguments,i=n?n.apply(this,t):t[0],a=r.cache;if(a.has(i))return a.get(i);var o=e.apply(this,t);return r.cache=a.set(i,o)||a,o};return r.cache=new(d.Cache||t),r}d.Cache=t;var f=500;function p(e){var t=d(e,function(e){return n.size===f&&n.clear(),e}),n=t.cache;return t}var m=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,h=/\\(\\)?/g,g=p(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(m,function(e,n,r,i){t.push(r?i.replace(h,`$1`):n||e)}),t});function _(t,n){return e(t)?t:l(t,n)?[t]:g(r(t))}var v=1/0;function y(e){if(typeof e==`string`||n(e))return e;var t=e+``;return t==`0`&&1/e==-v?`-0`:t}function b(e,t){t=_(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[y(t[n++])];return n&&n==r?e:void 0}function x(e,t,n){var r=e==null?void 0:b(e,t);return r===void 0?n:r}export{l as a,_ as i,b as n,o,y as r,x as t}; |