@tryghost/helpers 1.1.94 → 1.1.95
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/helpers.js +6 -9
- package/es/helpers.js.map +1 -1
- package/package.json +3 -3
- package/umd/helpers.min.js +1 -1
- package/umd/helpers.min.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tryghost/helpers",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.95",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/TryGhost/SDK.git",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"access": "public"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@babel/core": "7.27.
|
|
38
|
+
"@babel/core": "7.27.4",
|
|
39
39
|
"@babel/polyfill": "7.12.1",
|
|
40
40
|
"c8": "10.1.3",
|
|
41
41
|
"istanbul": "0.4.5",
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"lodash-es": "^4.17.11"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "8821bdbfa95a672795a2e241c582a668f7252601"
|
|
55
55
|
}
|
package/umd/helpers.min.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(t,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((t="undefined"!=typeof globalThis?globalThis:t||self).GhostHelpers={})}(this,(function(t){"use strict";function r(t){return t!=t}function e(t,e,n){return e==e?function(t,r,e){for(var n=e-1,u=t.length;++n<u;)if(t[n]===r)return n;return-1}(t,e,n):function(t,r,e,n){for(var u=t.length,o=e+(n?1:-1);n?o--:++o<u;)if(r(t[o],o,t))return o;return-1}(t,r,n)}var n="object"==typeof global&&global&&global.Object===Object&&global,u="object"==typeof self&&self&&self.Object===Object&&self,o=n||u||Function("return this")(),i=o.Symbol,a=Object.prototype,f=a.hasOwnProperty,c=a.toString,l=i?i.toStringTag:void 0;var s=Object.prototype.toString;var v=i?i.toStringTag:void 0;function p(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":v&&v in Object(t)?function(t){var r=f.call(t,l),e=t[l];try{t[l]=void 0;var n=!0}catch(t){}var u=c.call(t);return n&&(r?t[l]=e:delete t[l]),u}(t):function(t){return s.call(t)}(t)}function h(t){var r=typeof t;return null!=t&&("object"==r||"function"==r)}function d(t){if(!h(t))return!1;var r=p(t);return"[object Function]"==r||"[object GeneratorFunction]"==r||"[object AsyncFunction]"==r||"[object Proxy]"==r}function b(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function y(t){return null!=t&&b(t.length)&&!d(t)}var g=Array.isArray;function _(t){return null!=t&&"object"==typeof t}function j(t){return"string"==typeof t||!g(t)&&_(t)&&"[object String]"==p(t)}var m=/\s/;var O=/^\s+/;function w(t){return t?t.slice(0,function(t){for(var r=t.length;r--&&m.test(t.charAt(r)););return r}(t)+1).replace(O,""):t}function A(t){return"symbol"==typeof t||_(t)&&"[object Symbol]"==p(t)}var z=/^[-+]0x[0-9a-f]+$/i,x=/^0b[01]+$/i,S=/^0o[0-7]+$/i,P=parseInt;var k=1/0;function E(t){return t?(t=function(t){if("number"==typeof t)return t;if(A(t))return NaN;if(h(t)){var r="function"==typeof t.valueOf?t.valueOf():t;t=h(r)?r+"":r}if("string"!=typeof t)return 0===t?t:+t;t=w(t);var e=x.test(t);return e||S.test(t)?P(t.slice(2),e?2:8):z.test(t)?NaN:+t}(t))===k||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function M(t){var r=E(t),e=r%1;return r==r?e?r-e:r:0}function F(t,r){for(var e=-1,n=null==t?0:t.length,u=Array(n);++e<n;)u[e]=r(t[e],e,t);return u}function $(t,r){for(var e=-1,n=Array(t);++e<t;)n[e]=r(e);return n}function I(t){return _(t)&&"[object Arguments]"==p(t)}var T=Object.prototype,C=T.hasOwnProperty,B=T.propertyIsEnumerable,D=I(function(){return arguments}())?I:function(t){return _(t)&&C.call(t,"callee")&&!B.call(t,"callee")},N=D;var R="object"==typeof t&&t&&!t.nodeType&&t,U=R&&"object"==typeof module&&module&&!module.nodeType&&module,L=U&&U.exports===R?o.Buffer:void 0,V=(L?L.isBuffer:void 0)||function(){return!1},W=/^(?:0|[1-9]\d*)$/;function q(t,r){var e=typeof t;return!!(r=null==r?9007199254740991:r)&&("number"==e||"symbol"!=e&&W.test(t))&&t>-1&&t%1==0&&t<r}var G={};G["[object Float32Array]"]=G["[object Float64Array]"]=G["[object Int8Array]"]=G["[object Int16Array]"]=G["[object Int32Array]"]=G["[object Uint8Array]"]=G["[object Uint8ClampedArray]"]=G["[object Uint16Array]"]=G["[object Uint32Array]"]=!0,G["[object Arguments]"]=G["[object Array]"]=G["[object ArrayBuffer]"]=G["[object Boolean]"]=G["[object DataView]"]=G["[object Date]"]=G["[object Error]"]=G["[object Function]"]=G["[object Map]"]=G["[object Number]"]=G["[object Object]"]=G["[object RegExp]"]=G["[object Set]"]=G["[object String]"]=G["[object WeakMap]"]=!1;var H,Z="object"==typeof t&&t&&!t.nodeType&&t,J=Z&&"object"==typeof module&&module&&!module.nodeType&&module,K=J&&J.exports===Z&&n.process,Q=function(){try{var t=J&&J.require&&J.require("util").types;return t||K&&K.binding&&K.binding("util")}catch(t){}}(),X=Q&&Q.isTypedArray,Y=X?(H=X,function(t){return H(t)}):function(t){return _(t)&&b(t.length)&&!!G[p(t)]},tt=Object.prototype.hasOwnProperty;var rt=Object.prototype;var et=function(t,r){return function(e){return t(r(e))}}(Object.keys,Object),nt=et,ut=Object.prototype.hasOwnProperty;function ot(t){if(e=(r=t)&&r.constructor,r!==("function"==typeof e&&e.prototype||rt))return nt(t);var r,e,n=[];for(var u in Object(t))ut.call(t,u)&&"constructor"!=u&&n.push(u);return n}function it(t){return y(t)?function(t,r){var e=g(t),n=!e&&N(t),u=!e&&!n&&V(t),o=!e&&!n&&!u&&Y(t),i=e||n||u||o,a=i?$(t.length,String):[],f=a.length;for(var c in t)!r&&!tt.call(t,c)||i&&("length"==c||u&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||q(c,f))||a.push(c);return a}(t):ot(t)}function at(t){return null==t?[]:function(t,r){return F(r,(function(r){return t[r]}))}(t,it(t))}var ft=Math.max;function ct(t,r,n,u){t=y(t)?t:at(t),n=n&&!u?M(n):0;var o=t.length;return n<0&&(n=ft(o+n,0)),j(t)?n<=o&&t.indexOf(r,n)>-1:!!o&&e(t,r,n)>-1}function lt(t,r){return t===r||t!=t&&r!=r}function st(t,r){for(var e=t.length;e--;)if(lt(t[e][0],r))return e;return-1}var vt=Array.prototype.splice;function pt(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}pt.prototype.clear=function(){this.__data__=[],this.size=0},pt.prototype.delete=function(t){var r=this.__data__,e=st(r,t);return!(e<0)&&(e==r.length-1?r.pop():vt.call(r,e,1),--this.size,!0)},pt.prototype.get=function(t){var r=this.__data__,e=st(r,t);return e<0?void 0:r[e][1]},pt.prototype.has=function(t){return st(this.__data__,t)>-1},pt.prototype.set=function(t,r){var e=this.__data__,n=st(e,t);return n<0?(++this.size,e.push([t,r])):e[n][1]=r,this};var ht,dt=o["__core-js_shared__"],bt=(ht=/[^.]+$/.exec(dt&&dt.keys&&dt.keys.IE_PROTO||""))?"Symbol(src)_1."+ht:"";var yt=Function.prototype.toString;function gt(t){if(null!=t){try{return yt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var _t=/^\[object .+?Constructor\]$/,jt=Function.prototype,mt=Object.prototype,Ot=jt.toString,wt=mt.hasOwnProperty,At=RegExp("^"+Ot.call(wt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function zt(t){return!(!h(t)||function(t){return!!bt&&bt in t}(t))&&(d(t)?At:_t).test(gt(t))}function xt(t,r){var e=function(t,r){return null==t?void 0:t[r]}(t,r);return zt(e)?e:void 0}var St=xt(o,"Map"),Pt=xt(Object,"create");var kt=Object.prototype.hasOwnProperty;var Et=Object.prototype.hasOwnProperty;function Mt(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}function Ft(t,r){var e,n,u=t.__data__;return("string"==(n=typeof(e=r))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==e:null===e)?u["string"==typeof r?"string":"hash"]:u.map}function $t(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}Mt.prototype.clear=function(){this.__data__=Pt?Pt(null):{},this.size=0},Mt.prototype.delete=function(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r},Mt.prototype.get=function(t){var r=this.__data__;if(Pt){var e=r[t];return"__lodash_hash_undefined__"===e?void 0:e}return kt.call(r,t)?r[t]:void 0},Mt.prototype.has=function(t){var r=this.__data__;return Pt?void 0!==r[t]:Et.call(r,t)},Mt.prototype.set=function(t,r){var e=this.__data__;return this.size+=this.has(t)?0:1,e[t]=Pt&&void 0===r?"__lodash_hash_undefined__":r,this},$t.prototype.clear=function(){this.size=0,this.__data__={hash:new Mt,map:new(St||pt),string:new Mt}},$t.prototype.delete=function(t){var r=Ft(this,t).delete(t);return this.size-=r?1:0,r},$t.prototype.get=function(t){return Ft(this,t).get(t)},$t.prototype.has=function(t){return Ft(this,t).has(t)},$t.prototype.set=function(t,r){var e=Ft(this,t),n=e.size;return e.set(t,r),this.size+=e.size==n?0:1,this};function It(t){var r=this.__data__=new pt(t);this.size=r.size}It.prototype.clear=function(){this.__data__=new pt,this.size=0},It.prototype.delete=function(t){var r=this.__data__,e=r.delete(t);return this.size=r.size,e},It.prototype.get=function(t){return this.__data__.get(t)},It.prototype.has=function(t){return this.__data__.has(t)},It.prototype.set=function(t,r){var e=this.__data__;if(e instanceof pt){var n=e.__data__;if(!St||n.length<199)return n.push([t,r]),this.size=++e.size,this;e=this.__data__=new $t(n)}return e.set(t,r),this.size=e.size,this};function Tt(t){var r=-1,e=null==t?0:t.length;for(this.__data__=new $t;++r<e;)this.add(t[r])}function Ct(t,r){for(var e=-1,n=null==t?0:t.length;++e<n;)if(r(t[e],e,t))return!0;return!1}Tt.prototype.add=Tt.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Tt.prototype.has=function(t){return this.__data__.has(t)};function Bt(t,r,e,n,u,o){var i=1&e,a=t.length,f=r.length;if(a!=f&&!(i&&f>a))return!1;var c=o.get(t),l=o.get(r);if(c&&l)return c==r&&l==t;var s=-1,v=!0,p=2&e?new Tt:void 0;for(o.set(t,r),o.set(r,t);++s<a;){var h=t[s],d=r[s];if(n)var b=i?n(d,h,s,r,t,o):n(h,d,s,t,r,o);if(void 0!==b){if(b)continue;v=!1;break}if(p){if(!Ct(r,(function(t,r){if(i=r,!p.has(i)&&(h===t||u(h,t,e,n,o)))return p.push(r);var i}))){v=!1;break}}else if(h!==d&&!u(h,d,e,n,o)){v=!1;break}}return o.delete(t),o.delete(r),v}var Dt=o.Uint8Array;function Nt(t){var r=-1,e=Array(t.size);return t.forEach((function(t,n){e[++r]=[n,t]})),e}function Rt(t){var r=-1,e=Array(t.size);return t.forEach((function(t){e[++r]=t})),e}var Ut=i?i.prototype:void 0,Lt=Ut?Ut.valueOf:void 0;function Vt(t,r){for(var e=-1,n=r.length,u=t.length;++e<n;)t[u+e]=r[e];return t}function Wt(t,r){for(var e=-1,n=null==t?0:t.length,u=0,o=[];++e<n;){var i=t[e];r(i,e,t)&&(o[u++]=i)}return o}var qt=Object.prototype.propertyIsEnumerable,Gt=Object.getOwnPropertySymbols,Ht=Gt?function(t){return null==t?[]:(t=Object(t),Wt(Gt(t),(function(r){return qt.call(t,r)})))}:function(){return[]};function Zt(t){return function(t,r,e){var n=r(t);return g(t)?n:Vt(n,e(t))}(t,it,Ht)}var Jt=Object.prototype.hasOwnProperty;var Kt=xt(o,"DataView"),Qt=xt(o,"Promise"),Xt=xt(o,"Set"),Yt=xt(o,"WeakMap"),tr="[object Map]",rr="[object Promise]",er="[object Set]",nr="[object WeakMap]",ur="[object DataView]",or=gt(Kt),ir=gt(St),ar=gt(Qt),fr=gt(Xt),cr=gt(Yt),lr=p;(Kt&&lr(new Kt(new ArrayBuffer(1)))!=ur||St&&lr(new St)!=tr||Qt&&lr(Qt.resolve())!=rr||Xt&&lr(new Xt)!=er||Yt&&lr(new Yt)!=nr)&&(lr=function(t){var r=p(t),e="[object Object]"==r?t.constructor:void 0,n=e?gt(e):"";if(n)switch(n){case or:return ur;case ir:return tr;case ar:return rr;case fr:return er;case cr:return nr}return r});var sr=lr,vr="[object Arguments]",pr="[object Array]",hr="[object Object]",dr=Object.prototype.hasOwnProperty;function br(t,r,e,n,u,o){var i=g(t),a=g(r),f=i?pr:sr(t),c=a?pr:sr(r),l=(f=f==vr?hr:f)==hr,s=(c=c==vr?hr:c)==hr,v=f==c;if(v&&V(t)){if(!V(r))return!1;i=!0,l=!1}if(v&&!l)return o||(o=new It),i||Y(t)?Bt(t,r,e,n,u,o):function(t,r,e,n,u,o,i){switch(e){case"[object DataView]":if(t.byteLength!=r.byteLength||t.byteOffset!=r.byteOffset)return!1;t=t.buffer,r=r.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=r.byteLength||!o(new Dt(t),new Dt(r)));case"[object Boolean]":case"[object Date]":case"[object Number]":return lt(+t,+r);case"[object Error]":return t.name==r.name&&t.message==r.message;case"[object RegExp]":case"[object String]":return t==r+"";case"[object Map]":var a=Nt;case"[object Set]":var f=1&n;if(a||(a=Rt),t.size!=r.size&&!f)return!1;var c=i.get(t);if(c)return c==r;n|=2,i.set(t,r);var l=Bt(a(t),a(r),n,u,o,i);return i.delete(t),l;case"[object Symbol]":if(Lt)return Lt.call(t)==Lt.call(r)}return!1}(t,r,f,e,n,u,o);if(!(1&e)){var p=l&&dr.call(t,"__wrapped__"),h=s&&dr.call(r,"__wrapped__");if(p||h){var d=p?t.value():t,b=h?r.value():r;return o||(o=new It),u(d,b,e,n,o)}}return!!v&&(o||(o=new It),function(t,r,e,n,u,o){var i=1&e,a=Zt(t),f=a.length;if(f!=Zt(r).length&&!i)return!1;for(var c=f;c--;){var l=a[c];if(!(i?l in r:Jt.call(r,l)))return!1}var s=o.get(t),v=o.get(r);if(s&&v)return s==r&&v==t;var p=!0;o.set(t,r),o.set(r,t);for(var h=i;++c<f;){var d=t[l=a[c]],b=r[l];if(n)var y=i?n(b,d,l,r,t,o):n(d,b,l,t,r,o);if(!(void 0===y?d===b||u(d,b,e,n,o):y)){p=!1;break}h||(h="constructor"==l)}if(p&&!h){var g=t.constructor,_=r.constructor;g==_||!("constructor"in t)||!("constructor"in r)||"function"==typeof g&&g instanceof g&&"function"==typeof _&&_ instanceof _||(p=!1)}return o.delete(t),o.delete(r),p}(t,r,e,n,u,o))}function yr(t,r,e,n,u){return t===r||(null==t||null==r||!_(t)&&!_(r)?t!=t&&r!=r:br(t,r,e,n,yr,u))}function gr(t){return t==t&&!h(t)}function _r(t,r){return function(e){return null!=e&&(e[t]===r&&(void 0!==r||t in Object(e)))}}function jr(t){var r=function(t){for(var r=it(t),e=r.length;e--;){var n=r[e],u=t[n];r[e]=[n,u,gr(u)]}return r}(t);return 1==r.length&&r[0][2]?_r(r[0][0],r[0][1]):function(e){return e===t||function(t,r,e,n){var u=e.length,o=u,i=!n;if(null==t)return!o;for(t=Object(t);u--;){var a=e[u];if(i&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++u<o;){var f=(a=e[u])[0],c=t[f],l=a[1];if(i&&a[2]){if(void 0===c&&!(f in t))return!1}else{var s=new It;if(n)var v=n(c,l,f,t,r,s);if(!(void 0===v?yr(l,c,3,n,s):v))return!1}}return!0}(e,t,r)}}var mr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Or=/^\w*$/;function wr(t,r){if(g(t))return!1;var e=typeof t;return!("number"!=e&&"symbol"!=e&&"boolean"!=e&&null!=t&&!A(t))||(Or.test(t)||!mr.test(t)||null!=r&&t in Object(r))}function Ar(t,r){if("function"!=typeof t||null!=r&&"function"!=typeof r)throw new TypeError("Expected a function");var e=function(){var n=arguments,u=r?r.apply(this,n):n[0],o=e.cache;if(o.has(u))return o.get(u);var i=t.apply(this,n);return e.cache=o.set(u,i)||o,i};return e.cache=new(Ar.Cache||$t),e}Ar.Cache=$t;var zr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,xr=/\\(\\)?/g,Sr=function(t){var r=Ar(t,(function(t){return 500===e.size&&e.clear(),t})),e=r.cache;return r}((function(t){var r=[];return 46===t.charCodeAt(0)&&r.push(""),t.replace(zr,(function(t,e,n,u){r.push(n?u.replace(xr,"$1"):e||t)})),r})),Pr=Sr,kr=i?i.prototype:void 0,Er=kr?kr.toString:void 0;function Mr(t){if("string"==typeof t)return t;if(g(t))return F(t,Mr)+"";if(A(t))return Er?Er.call(t):"";var r=t+"";return"0"==r&&1/t==-1/0?"-0":r}function Fr(t){return null==t?"":Mr(t)}function $r(t,r){return g(t)?t:wr(t,r)?[t]:Pr(Fr(t))}function Ir(t){if("string"==typeof t||A(t))return t;var r=t+"";return"0"==r&&1/t==-1/0?"-0":r}function Tr(t,r){for(var e=0,n=(r=$r(r,t)).length;null!=t&&e<n;)t=t[Ir(r[e++])];return e&&e==n?t:void 0}function Cr(t,r){return null!=t&&r in Object(t)}function Br(t,r){return null!=t&&function(t,r,e){for(var n=-1,u=(r=$r(r,t)).length,o=!1;++n<u;){var i=Ir(r[n]);if(!(o=null!=t&&e(t,i)))break;t=t[i]}return o||++n!=u?o:!!(u=null==t?0:t.length)&&b(u)&&q(i,u)&&(g(t)||N(t))}(t,r,Cr)}function Dr(t,r){return wr(t)&&gr(r)?_r(Ir(t),r):function(e){var n=function(t,r,e){var n=null==t?void 0:Tr(t,r);return void 0===n?e:n}(e,t);return void 0===n&&n===r?Br(e,t):yr(r,n,3)}}function Nr(t){return t}function Rr(t){return function(r){return null==r?void 0:r[t]}}function Ur(t){return wr(t)?Rr(Ir(t)):function(t){return function(r){return Tr(r,t)}}(t)}function Lr(t){return"function"==typeof t?t:null==t?Nr:"object"==typeof t?g(t)?Dr(t[0],t[1]):jr(t):Ur(t)}var Vr,Wr=function(t,r,e){for(var n=-1,u=Object(t),o=e(t),i=o.length;i--;){var a=o[Vr?i:++n];if(!1===r(u[a],a,u))break}return t};var qr=function(t,r){return function(e,n){if(null==e)return e;if(!y(e))return t(e,n);for(var u=e.length,o=r?u:-1,i=Object(e);(r?o--:++o<u)&&!1!==n(i[o],o,i););return e}}((function(t,r){return t&&Wr(t,r,it)})),Gr=qr;function Hr(t,r){var e=-1,n=y(t)?Array(t.length):[];return Gr(t,(function(t,u,o){n[++e]=r(t,u,o)})),n}function Zr(t,r,e,n){var u=-1,o=null==t?0:t.length;for(n&&o&&(e=t[++u]);++u<o;)e=r(e,t[u],u,t);return e}function Jr(t,r,e,n,u){return u(t,(function(t,u,o){e=n?(n=!1,t):r(e,t,u,o)})),e}function Kr(t,r,e){var n=t.length;return e=void 0===e?n:e,!r&&e>=n?t:function(t,r,e){var n=-1,u=t.length;r<0&&(r=-r>u?0:u+r),(e=e>u?u:e)<0&&(e+=u),u=r>e?0:e-r>>>0,r>>>=0;for(var o=Array(u);++n<u;)o[n]=t[n+r];return o}(t,r,e)}var Qr=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function Xr(t){return Qr.test(t)}var Yr="\\ud800-\\udfff",te="["+Yr+"]",re="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",ee="\\ud83c[\\udffb-\\udfff]",ne="[^"+Yr+"]",ue="(?:\\ud83c[\\udde6-\\uddff]){2}",oe="[\\ud800-\\udbff][\\udc00-\\udfff]",ie="(?:"+re+"|"+ee+")"+"?",ae="[\\ufe0e\\ufe0f]?",fe=ae+ie+("(?:\\u200d(?:"+[ne,ue,oe].join("|")+")"+ae+ie+")*"),ce="(?:"+[ne+re+"?",re,ue,oe,te].join("|")+")",le=RegExp(ee+"(?="+ee+")|"+ce+fe,"g");function se(t){return Xr(t)?function(t){return t.match(le)||[]}(t):function(t){return t.split("")}(t)}function ve(t,r,n){if((t=Fr(t))&&(n||void 0===r))return w(t);if(!t||!(r=Mr(r)))return t;var u=se(t),o=se(r),i=function(t,r){for(var n=-1,u=t.length;++n<u&&e(r,t[n],0)>-1;);return n}(u,o),a=function(t,r){for(var n=t.length;n--&&e(r,t[n],0)>-1;);return n}(u,o)+1;return Kr(u,i,a).join("")}const pe=t=>{return t?(r=t.split(","),e=ve,(g(r)?F:Hr)(r,Lr(e))):["public"];var r,e},he=(t,r,e)=>{d(r)&&(e=r,r=null);const n=g(t)?[]:{},u=g(r)?r:pe(r),o=ct(u,"public");return function(t,r,e){var n=g(t)?Zr:Jr,u=arguments.length<3;return n(t,Lr(r),e,u,Gr)}(t,(function(r,n,i){if(ct(u,"all")||n.visibility&&ct(u,n.visibility)||!n.visibility&&o){const u=e?e(n):n;g(t)?r.push(u):r[i]=u}return r}),n)};var de=Object.freeze({__proto__:null,parse:pe,filter:he});function be(t){if(!t)return 0;Object.prototype.hasOwnProperty.call(t,"string")&&(t=t.string);const r=(t=t.replace(/<("[^"]*"|'[^']*'|[^'">])+\/?>/g," ")).match(/[a-zA-ZÀ-ÿ0-9_\u0392-\u03c9\u0410-\u04F9]+|[\u4E00-\u9FFF\u3400-\u4dbf\uf900-\ufaff\u3040-\u309f\uac00-\ud7af]+/g)||t.match(/([\u0600-\u06ff]+|[\u0591-\u05F4]+)/g);let e=0;if(null===r)return e;for(var n=0;n<r.length;n+=1)r[n].charCodeAt(0)>=19968?e+=r[n].length:e+=1;return e}function ye(t){return t?(Object.prototype.hasOwnProperty.call(t,"string")&&(t=t.string),(t.match(/<img("[^"]*"|'[^']*'|[^'">])+\/?>/g)||[]).length):0}function ge(t,r){if(!t)return"";let e=ye(t);return r&&(e+=r),function(t){let{wordCount:r,imageCount:e}=t,n=r/(275/60);for(var u=12;u>12-e;u-=1)n+=Math.max(u,3);return Math.round(n/60)}({wordCount:be(t),imageCount:e})}var _e=i?i.isConcatSpreadable:void 0;function je(t){return g(t)||N(t)||!!(_e&&t&&t[_e])}function me(t,r,e,n,u){var o=-1,i=t.length;for(e||(e=je),u||(u=[]);++o<i;){var a=t[o];r>0&&e(a)?r>1?me(a,r-1,e,n,u):Vt(u,a):n||(u[u.length]=a)}return u}function Oe(){var t=arguments.length;if(!t)return[];for(var r=Array(t-1),e=arguments[0],n=t;n--;)r[n-1]=arguments[n];return Vt(g(e)?function(t,r){var e=-1,n=t.length;for(r||(r=Array(n));++e<n;)r[e]=t[e];return r}(e):[e],me(r,1))}function we(t,r,e,n){var u=t.length;for((e=M(e))<0&&(e=-e>u?0:u+e),(n=void 0===n||n>u?u:M(n))<0&&(n+=u),n=e>n?0:function(t){return t?(r=M(t),e=0,n=4294967295,r==r&&(void 0!==n&&(r=r<=n?r:n),void 0!==e&&(r=r>=e?r:e)),r):0;var r,e,n}(n);e<n;)t[e++]=r;return t}function Ae(t,r,e,n){var u=null==t?0:t.length;return u?(e&&"number"!=typeof e&&function(t,r,e){if(!h(e))return!1;var n=typeof r;return!!("number"==n?y(e)&&q(r,e.length):"string"==n&&r in e)&<(e[r],t)}(t,r,e)&&(e=0,n=u),we(t,r,e,n)):[]}var ze=Rr("length"),xe="\\ud800-\\udfff",Se="["+xe+"]",Pe="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",ke="\\ud83c[\\udffb-\\udfff]",Ee="[^"+xe+"]",Me="(?:\\ud83c[\\udde6-\\uddff]){2}",Fe="[\\ud800-\\udbff][\\udc00-\\udfff]",$e="(?:"+Pe+"|"+ke+")"+"?",Ie="[\\ufe0e\\ufe0f]?",Te=Ie+$e+("(?:\\u200d(?:"+[Ee,Me,Fe].join("|")+")"+Ie+$e+")*"),Ce="(?:"+[Ee+Pe+"?",Pe,Me,Fe,Se].join("|")+")",Be=RegExp(ke+"(?="+ke+")|"+Ce+Te,"g");function De(t){return Xr(t)?function(t){for(var r=Be.lastIndex=0;Be.test(t);)++r;return r}(t):ze(t)}function Ne(t){if(null==t)return 0;if(y(t))return j(t)?De(t):t.length;var r=sr(t);return"[object Map]"==r||"[object Set]"==r?t.size:ot(t).length}var Re=Math.max;var Ue=function(){try{var t=xt(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),Le=Ue,Ve=Le?function(t,r){return Le(t,"toString",{configurable:!0,enumerable:!1,value:(e=r,function(){return e}),writable:!0});var e}:Nr,We=Ve,qe=Date.now;var Ge=function(t){var r=0,e=0;return function(){var n=qe(),u=16-(n-e);if(e=n,u>0){if(++r>=800)return arguments[0]}else r=0;return t.apply(void 0,arguments)}}(We),He=Ge;var Ze=Math.max;var Je=function(t,r){return He(function(t,r,e){return r=Re(void 0===r?t.length-1:r,0),function(){for(var n=arguments,u=-1,o=Re(n.length-r,0),i=Array(o);++u<o;)i[u]=n[r+u];u=-1;for(var a=Array(r+1);++u<r;)a[u]=n[u];return a[r]=e(i),function(t,r,e){switch(e.length){case 0:return t.call(r);case 1:return t.call(r,e[0]);case 2:return t.call(r,e[0],e[1]);case 3:return t.call(r,e[0],e[1],e[2])}return t.apply(r,e)}(t,this,a)}}(t,r,Nr),t+"")}((function(t){if(!t||!t.length)return[];var r=0;return t=Wt(t,(function(t){if(_(e=t)&&y(e))return r=Ze(t.length,r),!0;var e})),$(r,(function(r){return F(t,Rr(r))}))})),Ke=Je;const Qe={countImages:ye,countWords:be,visibility:de,readingMinutes:ge};t.readingTime=function(t){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const e="string"==typeof r.minute?r.minute:"1 min read",n="string"==typeof r.minutes?r.minutes:"% min read";if(!t.html&&!t.reading_time)return"";let u=0;t.feature_image&&(u+=1);const o=t.reading_time||ge(t.html,u);let i="";return i=o<=1?e:n.replace("%",o),i},t.tags=function(t){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e="",n=r.separator?r.separator:"",u=r.prefix?r.prefix:"",o=r.suffix?r.suffix:"",i=r.limit?parseInt(r.limit,10):void 0,a=r.from?parseInt(r.from,10):1,f=r.to?parseInt(r.to,10):void 0,c=pe(r.visibility),l=r.fallback?g(r.fallback)?r.fallback:[r.fallback]:void 0,s=r.fn?r.fn:t=>t.name;var v;return t.tags&&t.tags.length&&(e=he(t.tags,c,s),0===Ne(e)&&l&&(e=he(l,c,s)),a-=1,f=f||i+a||e.length,e=e.slice(a,f)),Ne(e)>0&&(j(e[0])?(n=n||", ",e=u+e.join(n)+o):(n&&(e=Ke(e,Ae(Array(e.length),n)),e=(v=e,null!=v&&v.length?me(v,1):[]).slice(0,-1)),e=Oe(u,e,o),e=function(t){for(var r=-1,e=null==t?0:t.length,n=0,u=[];++r<e;){var o=t[r];o&&(u[n++]=o)}return u}(e))),e},t.utils=Qe,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
1
|
+
!function(t,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((t="undefined"!=typeof globalThis?globalThis:t||self).GhostHelpers={})}(this,(function(t){"use strict";function r(t){return t!=t}function e(t,e,n){return e==e?function(t,r,e){for(var n=e-1,u=t.length;++n<u;)if(t[n]===r)return n;return-1}(t,e,n):function(t,r,e,n){for(var u=t.length,o=e+(n?1:-1);n?o--:++o<u;)if(r(t[o],o,t))return o;return-1}(t,r,n)}var n="object"==typeof global&&global&&global.Object===Object&&global,u="object"==typeof self&&self&&self.Object===Object&&self,o=n||u||Function("return this")(),i=o.Symbol,a=Object.prototype,f=a.hasOwnProperty,c=a.toString,l=i?i.toStringTag:void 0;var s=Object.prototype.toString;var v=i?i.toStringTag:void 0;function p(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":v&&v in Object(t)?function(t){var r=f.call(t,l),e=t[l];try{t[l]=void 0;var n=!0}catch(t){}var u=c.call(t);return n&&(r?t[l]=e:delete t[l]),u}(t):function(t){return s.call(t)}(t)}function h(t){var r=typeof t;return null!=t&&("object"==r||"function"==r)}function d(t){if(!h(t))return!1;var r=p(t);return"[object Function]"==r||"[object GeneratorFunction]"==r||"[object AsyncFunction]"==r||"[object Proxy]"==r}function b(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function y(t){return null!=t&&b(t.length)&&!d(t)}var g=Array.isArray;function _(t){return null!=t&&"object"==typeof t}function j(t){return"string"==typeof t||!g(t)&&_(t)&&"[object String]"==p(t)}var m=/\s/;var O=/^\s+/;function w(t){return t?t.slice(0,function(t){for(var r=t.length;r--&&m.test(t.charAt(r)););return r}(t)+1).replace(O,""):t}function A(t){return"symbol"==typeof t||_(t)&&"[object Symbol]"==p(t)}var z=/^[-+]0x[0-9a-f]+$/i,x=/^0b[01]+$/i,S=/^0o[0-7]+$/i,P=parseInt;var k=1/0;function E(t){return t?(t=function(t){if("number"==typeof t)return t;if(A(t))return NaN;if(h(t)){var r="function"==typeof t.valueOf?t.valueOf():t;t=h(r)?r+"":r}if("string"!=typeof t)return 0===t?t:+t;t=w(t);var e=x.test(t);return e||S.test(t)?P(t.slice(2),e?2:8):z.test(t)?NaN:+t}(t))===k||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function M(t){var r=E(t),e=r%1;return r==r?e?r-e:r:0}function F(t,r){for(var e=-1,n=null==t?0:t.length,u=Array(n);++e<n;)u[e]=r(t[e],e,t);return u}function $(t,r){for(var e=-1,n=Array(t);++e<t;)n[e]=r(e);return n}function I(t){return _(t)&&"[object Arguments]"==p(t)}var T=Object.prototype,C=T.hasOwnProperty,B=T.propertyIsEnumerable,D=I(function(){return arguments}())?I:function(t){return _(t)&&C.call(t,"callee")&&!B.call(t,"callee")},N=D;var R="object"==typeof t&&t&&!t.nodeType&&t,U=R&&"object"==typeof module&&module&&!module.nodeType&&module,L=U&&U.exports===R?o.Buffer:void 0,V=(L?L.isBuffer:void 0)||function(){return!1},W=/^(?:0|[1-9]\d*)$/;function q(t,r){var e=typeof t;return!!(r=null==r?9007199254740991:r)&&("number"==e||"symbol"!=e&&W.test(t))&&t>-1&&t%1==0&&t<r}var G={};G["[object Float32Array]"]=G["[object Float64Array]"]=G["[object Int8Array]"]=G["[object Int16Array]"]=G["[object Int32Array]"]=G["[object Uint8Array]"]=G["[object Uint8ClampedArray]"]=G["[object Uint16Array]"]=G["[object Uint32Array]"]=!0,G["[object Arguments]"]=G["[object Array]"]=G["[object ArrayBuffer]"]=G["[object Boolean]"]=G["[object DataView]"]=G["[object Date]"]=G["[object Error]"]=G["[object Function]"]=G["[object Map]"]=G["[object Number]"]=G["[object Object]"]=G["[object RegExp]"]=G["[object Set]"]=G["[object String]"]=G["[object WeakMap]"]=!1;var H,Z="object"==typeof t&&t&&!t.nodeType&&t,J=Z&&"object"==typeof module&&module&&!module.nodeType&&module,K=J&&J.exports===Z&&n.process,Q=function(){try{var t=J&&J.require&&J.require("util").types;return t||K&&K.binding&&K.binding("util")}catch(t){}}(),X=Q&&Q.isTypedArray,Y=X?(H=X,function(t){return H(t)}):function(t){return _(t)&&b(t.length)&&!!G[p(t)]},tt=Object.prototype.hasOwnProperty;var rt=Object.prototype;var et=function(t,r){return function(e){return t(r(e))}}(Object.keys,Object),nt=et,ut=Object.prototype.hasOwnProperty;function ot(t){if(e=(r=t)&&r.constructor,r!==("function"==typeof e&&e.prototype||rt))return nt(t);var r,e,n=[];for(var u in Object(t))ut.call(t,u)&&"constructor"!=u&&n.push(u);return n}function it(t){return y(t)?function(t,r){var e=g(t),n=!e&&N(t),u=!e&&!n&&V(t),o=!e&&!n&&!u&&Y(t),i=e||n||u||o,a=i?$(t.length,String):[],f=a.length;for(var c in t)!r&&!tt.call(t,c)||i&&("length"==c||u&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||q(c,f))||a.push(c);return a}(t):ot(t)}function at(t){return null==t?[]:function(t,r){return F(r,(function(r){return t[r]}))}(t,it(t))}var ft=Math.max;function ct(t,r,n,u){t=y(t)?t:at(t),n=n&&!u?M(n):0;var o=t.length;return n<0&&(n=ft(o+n,0)),j(t)?n<=o&&t.indexOf(r,n)>-1:!!o&&e(t,r,n)>-1}function lt(t,r){return t===r||t!=t&&r!=r}function st(t,r){for(var e=t.length;e--;)if(lt(t[e][0],r))return e;return-1}var vt=Array.prototype.splice;function pt(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}pt.prototype.clear=function(){this.__data__=[],this.size=0},pt.prototype.delete=function(t){var r=this.__data__,e=st(r,t);return!(e<0)&&(e==r.length-1?r.pop():vt.call(r,e,1),--this.size,!0)},pt.prototype.get=function(t){var r=this.__data__,e=st(r,t);return e<0?void 0:r[e][1]},pt.prototype.has=function(t){return st(this.__data__,t)>-1},pt.prototype.set=function(t,r){var e=this.__data__,n=st(e,t);return n<0?(++this.size,e.push([t,r])):e[n][1]=r,this};var ht,dt=o["__core-js_shared__"],bt=(ht=/[^.]+$/.exec(dt&&dt.keys&&dt.keys.IE_PROTO||""))?"Symbol(src)_1."+ht:"";var yt=Function.prototype.toString;function gt(t){if(null!=t){try{return yt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var _t=/^\[object .+?Constructor\]$/,jt=Function.prototype,mt=Object.prototype,Ot=jt.toString,wt=mt.hasOwnProperty,At=RegExp("^"+Ot.call(wt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function zt(t){return!(!h(t)||function(t){return!!bt&&bt in t}(t))&&(d(t)?At:_t).test(gt(t))}function xt(t,r){var e=function(t,r){return null==t?void 0:t[r]}(t,r);return zt(e)?e:void 0}var St=xt(o,"Map"),Pt=xt(Object,"create");var kt=Object.prototype.hasOwnProperty;var Et=Object.prototype.hasOwnProperty;function Mt(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}function Ft(t,r){var e,n,u=t.__data__;return("string"==(n=typeof(e=r))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==e:null===e)?u["string"==typeof r?"string":"hash"]:u.map}function $t(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}Mt.prototype.clear=function(){this.__data__=Pt?Pt(null):{},this.size=0},Mt.prototype.delete=function(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r},Mt.prototype.get=function(t){var r=this.__data__;if(Pt){var e=r[t];return"__lodash_hash_undefined__"===e?void 0:e}return kt.call(r,t)?r[t]:void 0},Mt.prototype.has=function(t){var r=this.__data__;return Pt?void 0!==r[t]:Et.call(r,t)},Mt.prototype.set=function(t,r){var e=this.__data__;return this.size+=this.has(t)?0:1,e[t]=Pt&&void 0===r?"__lodash_hash_undefined__":r,this},$t.prototype.clear=function(){this.size=0,this.__data__={hash:new Mt,map:new(St||pt),string:new Mt}},$t.prototype.delete=function(t){var r=Ft(this,t).delete(t);return this.size-=r?1:0,r},$t.prototype.get=function(t){return Ft(this,t).get(t)},$t.prototype.has=function(t){return Ft(this,t).has(t)},$t.prototype.set=function(t,r){var e=Ft(this,t),n=e.size;return e.set(t,r),this.size+=e.size==n?0:1,this};function It(t){var r=this.__data__=new pt(t);this.size=r.size}It.prototype.clear=function(){this.__data__=new pt,this.size=0},It.prototype.delete=function(t){var r=this.__data__,e=r.delete(t);return this.size=r.size,e},It.prototype.get=function(t){return this.__data__.get(t)},It.prototype.has=function(t){return this.__data__.has(t)},It.prototype.set=function(t,r){var e=this.__data__;if(e instanceof pt){var n=e.__data__;if(!St||n.length<199)return n.push([t,r]),this.size=++e.size,this;e=this.__data__=new $t(n)}return e.set(t,r),this.size=e.size,this};function Tt(t){var r=-1,e=null==t?0:t.length;for(this.__data__=new $t;++r<e;)this.add(t[r])}function Ct(t,r){for(var e=-1,n=null==t?0:t.length;++e<n;)if(r(t[e],e,t))return!0;return!1}Tt.prototype.add=Tt.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Tt.prototype.has=function(t){return this.__data__.has(t)};function Bt(t,r,e,n,u,o){var i=1&e,a=t.length,f=r.length;if(a!=f&&!(i&&f>a))return!1;var c=o.get(t),l=o.get(r);if(c&&l)return c==r&&l==t;var s=-1,v=!0,p=2&e?new Tt:void 0;for(o.set(t,r),o.set(r,t);++s<a;){var h=t[s],d=r[s];if(n)var b=i?n(d,h,s,r,t,o):n(h,d,s,t,r,o);if(void 0!==b){if(b)continue;v=!1;break}if(p){if(!Ct(r,(function(t,r){if(i=r,!p.has(i)&&(h===t||u(h,t,e,n,o)))return p.push(r);var i}))){v=!1;break}}else if(h!==d&&!u(h,d,e,n,o)){v=!1;break}}return o.delete(t),o.delete(r),v}var Dt=o.Uint8Array;function Nt(t){var r=-1,e=Array(t.size);return t.forEach((function(t,n){e[++r]=[n,t]})),e}function Rt(t){var r=-1,e=Array(t.size);return t.forEach((function(t){e[++r]=t})),e}var Ut=i?i.prototype:void 0,Lt=Ut?Ut.valueOf:void 0;function Vt(t,r){for(var e=-1,n=r.length,u=t.length;++e<n;)t[u+e]=r[e];return t}function Wt(t,r){for(var e=-1,n=null==t?0:t.length,u=0,o=[];++e<n;){var i=t[e];r(i,e,t)&&(o[u++]=i)}return o}var qt=Object.prototype.propertyIsEnumerable,Gt=Object.getOwnPropertySymbols,Ht=Gt?function(t){return null==t?[]:(t=Object(t),Wt(Gt(t),(function(r){return qt.call(t,r)})))}:function(){return[]};function Zt(t){return function(t,r,e){var n=r(t);return g(t)?n:Vt(n,e(t))}(t,it,Ht)}var Jt=Object.prototype.hasOwnProperty;var Kt=xt(o,"DataView"),Qt=xt(o,"Promise"),Xt=xt(o,"Set"),Yt=xt(o,"WeakMap"),tr="[object Map]",rr="[object Promise]",er="[object Set]",nr="[object WeakMap]",ur="[object DataView]",or=gt(Kt),ir=gt(St),ar=gt(Qt),fr=gt(Xt),cr=gt(Yt),lr=p;(Kt&&lr(new Kt(new ArrayBuffer(1)))!=ur||St&&lr(new St)!=tr||Qt&&lr(Qt.resolve())!=rr||Xt&&lr(new Xt)!=er||Yt&&lr(new Yt)!=nr)&&(lr=function(t){var r=p(t),e="[object Object]"==r?t.constructor:void 0,n=e?gt(e):"";if(n)switch(n){case or:return ur;case ir:return tr;case ar:return rr;case fr:return er;case cr:return nr}return r});var sr=lr,vr="[object Arguments]",pr="[object Array]",hr="[object Object]",dr=Object.prototype.hasOwnProperty;function br(t,r,e,n,u,o){var i=g(t),a=g(r),f=i?pr:sr(t),c=a?pr:sr(r),l=(f=f==vr?hr:f)==hr,s=(c=c==vr?hr:c)==hr,v=f==c;if(v&&V(t)){if(!V(r))return!1;i=!0,l=!1}if(v&&!l)return o||(o=new It),i||Y(t)?Bt(t,r,e,n,u,o):function(t,r,e,n,u,o,i){switch(e){case"[object DataView]":if(t.byteLength!=r.byteLength||t.byteOffset!=r.byteOffset)return!1;t=t.buffer,r=r.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=r.byteLength||!o(new Dt(t),new Dt(r)));case"[object Boolean]":case"[object Date]":case"[object Number]":return lt(+t,+r);case"[object Error]":return t.name==r.name&&t.message==r.message;case"[object RegExp]":case"[object String]":return t==r+"";case"[object Map]":var a=Nt;case"[object Set]":var f=1&n;if(a||(a=Rt),t.size!=r.size&&!f)return!1;var c=i.get(t);if(c)return c==r;n|=2,i.set(t,r);var l=Bt(a(t),a(r),n,u,o,i);return i.delete(t),l;case"[object Symbol]":if(Lt)return Lt.call(t)==Lt.call(r)}return!1}(t,r,f,e,n,u,o);if(!(1&e)){var p=l&&dr.call(t,"__wrapped__"),h=s&&dr.call(r,"__wrapped__");if(p||h){var d=p?t.value():t,b=h?r.value():r;return o||(o=new It),u(d,b,e,n,o)}}return!!v&&(o||(o=new It),function(t,r,e,n,u,o){var i=1&e,a=Zt(t),f=a.length;if(f!=Zt(r).length&&!i)return!1;for(var c=f;c--;){var l=a[c];if(!(i?l in r:Jt.call(r,l)))return!1}var s=o.get(t),v=o.get(r);if(s&&v)return s==r&&v==t;var p=!0;o.set(t,r),o.set(r,t);for(var h=i;++c<f;){var d=t[l=a[c]],b=r[l];if(n)var y=i?n(b,d,l,r,t,o):n(d,b,l,t,r,o);if(!(void 0===y?d===b||u(d,b,e,n,o):y)){p=!1;break}h||(h="constructor"==l)}if(p&&!h){var g=t.constructor,_=r.constructor;g==_||!("constructor"in t)||!("constructor"in r)||"function"==typeof g&&g instanceof g&&"function"==typeof _&&_ instanceof _||(p=!1)}return o.delete(t),o.delete(r),p}(t,r,e,n,u,o))}function yr(t,r,e,n,u){return t===r||(null==t||null==r||!_(t)&&!_(r)?t!=t&&r!=r:br(t,r,e,n,yr,u))}function gr(t){return t==t&&!h(t)}function _r(t,r){return function(e){return null!=e&&(e[t]===r&&(void 0!==r||t in Object(e)))}}function jr(t){var r=function(t){for(var r=it(t),e=r.length;e--;){var n=r[e],u=t[n];r[e]=[n,u,gr(u)]}return r}(t);return 1==r.length&&r[0][2]?_r(r[0][0],r[0][1]):function(e){return e===t||function(t,r,e,n){var u=e.length,o=u,i=!n;if(null==t)return!o;for(t=Object(t);u--;){var a=e[u];if(i&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++u<o;){var f=(a=e[u])[0],c=t[f],l=a[1];if(i&&a[2]){if(void 0===c&&!(f in t))return!1}else{var s=new It;if(n)var v=n(c,l,f,t,r,s);if(!(void 0===v?yr(l,c,3,n,s):v))return!1}}return!0}(e,t,r)}}var mr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Or=/^\w*$/;function wr(t,r){if(g(t))return!1;var e=typeof t;return!("number"!=e&&"symbol"!=e&&"boolean"!=e&&null!=t&&!A(t))||(Or.test(t)||!mr.test(t)||null!=r&&t in Object(r))}function Ar(t,r){if("function"!=typeof t||null!=r&&"function"!=typeof r)throw new TypeError("Expected a function");var e=function(){var n=arguments,u=r?r.apply(this,n):n[0],o=e.cache;if(o.has(u))return o.get(u);var i=t.apply(this,n);return e.cache=o.set(u,i)||o,i};return e.cache=new(Ar.Cache||$t),e}Ar.Cache=$t;var zr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,xr=/\\(\\)?/g,Sr=function(t){var r=Ar(t,(function(t){return 500===e.size&&e.clear(),t})),e=r.cache;return r}((function(t){var r=[];return 46===t.charCodeAt(0)&&r.push(""),t.replace(zr,(function(t,e,n,u){r.push(n?u.replace(xr,"$1"):e||t)})),r})),Pr=Sr,kr=i?i.prototype:void 0,Er=kr?kr.toString:void 0;function Mr(t){if("string"==typeof t)return t;if(g(t))return F(t,Mr)+"";if(A(t))return Er?Er.call(t):"";var r=t+"";return"0"==r&&1/t==-1/0?"-0":r}function Fr(t){return null==t?"":Mr(t)}function $r(t,r){return g(t)?t:wr(t,r)?[t]:Pr(Fr(t))}function Ir(t){if("string"==typeof t||A(t))return t;var r=t+"";return"0"==r&&1/t==-1/0?"-0":r}function Tr(t,r){for(var e=0,n=(r=$r(r,t)).length;null!=t&&e<n;)t=t[Ir(r[e++])];return e&&e==n?t:void 0}function Cr(t,r){return null!=t&&r in Object(t)}function Br(t,r){return null!=t&&function(t,r,e){for(var n=-1,u=(r=$r(r,t)).length,o=!1;++n<u;){var i=Ir(r[n]);if(!(o=null!=t&&e(t,i)))break;t=t[i]}return o||++n!=u?o:!!(u=null==t?0:t.length)&&b(u)&&q(i,u)&&(g(t)||N(t))}(t,r,Cr)}function Dr(t,r){return wr(t)&&gr(r)?_r(Ir(t),r):function(e){var n=function(t,r,e){var n=null==t?void 0:Tr(t,r);return void 0===n?e:n}(e,t);return void 0===n&&n===r?Br(e,t):yr(r,n,3)}}function Nr(t){return t}function Rr(t){return function(r){return null==r?void 0:r[t]}}function Ur(t){return wr(t)?Rr(Ir(t)):function(t){return function(r){return Tr(r,t)}}(t)}function Lr(t){return"function"==typeof t?t:null==t?Nr:"object"==typeof t?g(t)?Dr(t[0],t[1]):jr(t):Ur(t)}var Vr,Wr=function(t,r,e){for(var n=-1,u=Object(t),o=e(t),i=o.length;i--;){var a=o[Vr?i:++n];if(!1===r(u[a],a,u))break}return t};var qr=function(t,r){return function(e,n){if(null==e)return e;if(!y(e))return t(e,n);for(var u=e.length,o=r?u:-1,i=Object(e);(r?o--:++o<u)&&!1!==n(i[o],o,i););return e}}((function(t,r){return t&&Wr(t,r,it)})),Gr=qr;function Hr(t,r){var e=-1,n=y(t)?Array(t.length):[];return Gr(t,(function(t,u,o){n[++e]=r(t,u,o)})),n}function Zr(t,r,e,n){var u=-1,o=null==t?0:t.length;for(n&&o&&(e=t[++u]);++u<o;)e=r(e,t[u],u,t);return e}function Jr(t,r,e,n,u){return u(t,(function(t,u,o){e=n?(n=!1,t):r(e,t,u,o)})),e}function Kr(t,r,e){var n=t.length;return e=void 0===e?n:e,!r&&e>=n?t:function(t,r,e){var n=-1,u=t.length;r<0&&(r=-r>u?0:u+r),(e=e>u?u:e)<0&&(e+=u),u=r>e?0:e-r>>>0,r>>>=0;for(var o=Array(u);++n<u;)o[n]=t[n+r];return o}(t,r,e)}var Qr=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function Xr(t){return Qr.test(t)}var Yr="\\ud800-\\udfff",te="["+Yr+"]",re="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",ee="\\ud83c[\\udffb-\\udfff]",ne="[^"+Yr+"]",ue="(?:\\ud83c[\\udde6-\\uddff]){2}",oe="[\\ud800-\\udbff][\\udc00-\\udfff]",ie="(?:"+re+"|"+ee+")"+"?",ae="[\\ufe0e\\ufe0f]?",fe=ae+ie+("(?:\\u200d(?:"+[ne,ue,oe].join("|")+")"+ae+ie+")*"),ce="(?:"+[ne+re+"?",re,ue,oe,te].join("|")+")",le=RegExp(ee+"(?="+ee+")|"+ce+fe,"g");function se(t){return Xr(t)?function(t){return t.match(le)||[]}(t):function(t){return t.split("")}(t)}function ve(t,r,n){if((t=Fr(t))&&(n||void 0===r))return w(t);if(!t||!(r=Mr(r)))return t;var u=se(t),o=se(r),i=function(t,r){for(var n=-1,u=t.length;++n<u&&e(r,t[n],0)>-1;);return n}(u,o),a=function(t,r){for(var n=t.length;n--&&e(r,t[n],0)>-1;);return n}(u,o)+1;return Kr(u,i,a).join("")}const pe=t=>{return t?(r=t.split(","),e=ve,(g(r)?F:Hr)(r,Lr(e))):["public"];var r,e},he=(t,r,e)=>{d(r)&&(e=r,r=null);const n=g(t)?[]:{},u=g(r)?r:pe(r),o=ct(u,"public");return function(t,r,e){var n=g(t)?Zr:Jr,u=arguments.length<3;return n(t,Lr(r),e,u,Gr)}(t,(function(r,n,i){if(ct(u,"all")||n.visibility&&ct(u,n.visibility)||!n.visibility&&o){const u=e?e(n):n;g(t)?r.push(u):r[i]=u}return r}),n)};var de=Object.freeze({__proto__:null,parse:pe,filter:he});function be(t){if(!t)return 0;Object.prototype.hasOwnProperty.call(t,"string")&&(t=t.string);const r=(t=t.replace(/<("[^"]*"|'[^']*'|[^'">])+\/?>/g," ")).match(/[a-zA-ZÀ-ÿ0-9_\u0392-\u03c9\u0410-\u04F9]+|[\u4E00-\u9FFF\u3400-\u4dbf\uf900-\ufaff\u3040-\u309f\uac00-\ud7af]+/g)||t.match(/([\u0600-\u06ff]+|[\u0591-\u05F4]+)/g);let e=0;if(null===r)return e;for(var n=0;n<r.length;n+=1)r[n].charCodeAt(0)>=19968?e+=r[n].length:e+=1;return e}function ye(t){return t?(Object.prototype.hasOwnProperty.call(t,"string")&&(t=t.string),(t.match(/<img("[^"]*"|'[^']*'|[^'">])+\/?>/g)||[]).length):0}function ge(t,r){if(!t)return"";let e=ye(t);return r&&(e+=r),function({wordCount:t,imageCount:r}){let e=t/(275/60);for(var n=12;n>12-r;n-=1)e+=Math.max(n,3);return Math.round(e/60)}({wordCount:be(t),imageCount:e})}var _e=i?i.isConcatSpreadable:void 0;function je(t){return g(t)||N(t)||!!(_e&&t&&t[_e])}function me(t,r,e,n,u){var o=-1,i=t.length;for(e||(e=je),u||(u=[]);++o<i;){var a=t[o];r>0&&e(a)?r>1?me(a,r-1,e,n,u):Vt(u,a):n||(u[u.length]=a)}return u}function Oe(){var t=arguments.length;if(!t)return[];for(var r=Array(t-1),e=arguments[0],n=t;n--;)r[n-1]=arguments[n];return Vt(g(e)?function(t,r){var e=-1,n=t.length;for(r||(r=Array(n));++e<n;)r[e]=t[e];return r}(e):[e],me(r,1))}function we(t,r,e,n){var u=t.length;for((e=M(e))<0&&(e=-e>u?0:u+e),(n=void 0===n||n>u?u:M(n))<0&&(n+=u),n=e>n?0:function(t){return t?(r=M(t),e=0,n=4294967295,r==r&&(void 0!==n&&(r=r<=n?r:n),void 0!==e&&(r=r>=e?r:e)),r):0;var r,e,n}(n);e<n;)t[e++]=r;return t}function Ae(t,r,e,n){var u=null==t?0:t.length;return u?(e&&"number"!=typeof e&&function(t,r,e){if(!h(e))return!1;var n=typeof r;return!!("number"==n?y(e)&&q(r,e.length):"string"==n&&r in e)&<(e[r],t)}(t,r,e)&&(e=0,n=u),we(t,r,e,n)):[]}var ze=Rr("length"),xe="\\ud800-\\udfff",Se="["+xe+"]",Pe="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",ke="\\ud83c[\\udffb-\\udfff]",Ee="[^"+xe+"]",Me="(?:\\ud83c[\\udde6-\\uddff]){2}",Fe="[\\ud800-\\udbff][\\udc00-\\udfff]",$e="(?:"+Pe+"|"+ke+")"+"?",Ie="[\\ufe0e\\ufe0f]?",Te=Ie+$e+("(?:\\u200d(?:"+[Ee,Me,Fe].join("|")+")"+Ie+$e+")*"),Ce="(?:"+[Ee+Pe+"?",Pe,Me,Fe,Se].join("|")+")",Be=RegExp(ke+"(?="+ke+")|"+Ce+Te,"g");function De(t){return Xr(t)?function(t){for(var r=Be.lastIndex=0;Be.test(t);)++r;return r}(t):ze(t)}function Ne(t){if(null==t)return 0;if(y(t))return j(t)?De(t):t.length;var r=sr(t);return"[object Map]"==r||"[object Set]"==r?t.size:ot(t).length}var Re=Math.max;var Ue=function(){try{var t=xt(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),Le=Ue,Ve=Le?function(t,r){return Le(t,"toString",{configurable:!0,enumerable:!1,value:(e=r,function(){return e}),writable:!0});var e}:Nr,We=Ve,qe=Date.now;var Ge=function(t){var r=0,e=0;return function(){var n=qe(),u=16-(n-e);if(e=n,u>0){if(++r>=800)return arguments[0]}else r=0;return t.apply(void 0,arguments)}}(We),He=Ge;var Ze=Math.max;var Je=function(t,r){return He(function(t,r,e){return r=Re(void 0===r?t.length-1:r,0),function(){for(var n=arguments,u=-1,o=Re(n.length-r,0),i=Array(o);++u<o;)i[u]=n[r+u];u=-1;for(var a=Array(r+1);++u<r;)a[u]=n[u];return a[r]=e(i),function(t,r,e){switch(e.length){case 0:return t.call(r);case 1:return t.call(r,e[0]);case 2:return t.call(r,e[0],e[1]);case 3:return t.call(r,e[0],e[1],e[2])}return t.apply(r,e)}(t,this,a)}}(t,r,Nr),t+"")}((function(t){if(!t||!t.length)return[];var r=0;return t=Wt(t,(function(t){if(_(e=t)&&y(e))return r=Ze(t.length,r),!0;var e})),$(r,(function(r){return F(t,Rr(r))}))})),Ke=Je;const Qe={countImages:ye,countWords:be,visibility:de,readingMinutes:ge};t.readingTime=function(t,r={}){const e="string"==typeof r.minute?r.minute:"1 min read",n="string"==typeof r.minutes?r.minutes:"% min read";if(!t.html&&!t.reading_time)return"";let u=0;t.feature_image&&(u+=1);const o=t.reading_time||ge(t.html,u);let i="";return i=o<=1?e:n.replace("%",o),i},t.tags=function(t,r={}){let e="",n=r.separator?r.separator:"",u=r.prefix?r.prefix:"",o=r.suffix?r.suffix:"",i=r.limit?parseInt(r.limit,10):void 0,a=r.from?parseInt(r.from,10):1,f=r.to?parseInt(r.to,10):void 0,c=pe(r.visibility),l=r.fallback?g(r.fallback)?r.fallback:[r.fallback]:void 0,s=r.fn?r.fn:t=>t.name;var v;return t.tags&&t.tags.length&&(e=he(t.tags,c,s),0===Ne(e)&&l&&(e=he(l,c,s)),a-=1,f=f||i+a||e.length,e=e.slice(a,f)),Ne(e)>0&&(j(e[0])?(n=n||", ",e=u+e.join(n)+o):(n&&(e=Ke(e,Ae(Array(e.length),n)),e=(v=e,null!=v&&v.length?me(v,1):[]).slice(0,-1)),e=Oe(u,e,o),e=function(t){for(var r=-1,e=null==t?0:t.length,n=0,u=[];++r<e;){var o=t[r];o&&(u[n++]=o)}return u}(e))),e},t.utils=Qe,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
2
2
|
//# sourceMappingURL=helpers.min.js.map
|