object-flatten-referencing 7.0.6 → 7.0.7

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.
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * @name object-flatten-referencing
3
3
  * @fileoverview Flatten complex nested objects according to a reference objects
4
- * @version 7.0.6
4
+ * @version 7.0.7
5
5
  * @author Roy Revelt, Codsen Ltd
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/object-flatten-referencing/}
8
8
  */
9
9
 
10
- import D from"lodash.clonedeep";import{strIndexesOfPlus as A}from"str-indexes-of-plus";import{isMatch as C}from"matcher";import{isPlainObject as w}from"codsen-utils";import $ from"lodash.clonedeep";import{isPlainObject as I}from"codsen-utils";var j={wrapHeadsWith:"%%_",wrapTailsWith:"_%%",dontWrapKeys:[],dontWrapPaths:[],xhtml:!0,preventDoubleWrapping:!0,preventWrappingIfContains:[],objectKeyAndValueJoinChar:".",wrapGlobalFlipSwitch:!0,ignore:[],whatToDoWhenReferenceIsMissing:0,mergeArraysWithLineBreaks:!0,mergeWithoutTrailingBrIfLineContainsBr:!0,enforceStrictKeyset:!0};function v(f){return typeof f=="string"}function O(f,m){let p={...j,...m};if(arguments.length===0||Object.keys(f).length===0)return[];let i=$(f),r=[];return I(i)&&Object.keys(i).forEach(s=>{I(i[s])&&(i[s]=O(i[s],p)),Array.isArray(i[s])&&(r=r.concat(i[s].map(h=>`${s}${p.objectKeyAndValueJoinChar}${h}`))),v(i[s])&&r.push(`${s}${p.objectKeyAndValueJoinChar}${i[s]}`)}),r}function y(f,m,p=!1,i=!1){let r={...j,...m};if(arguments.length===0||f.length===0)return"";let s=$(f),h="";if(s.length)if(i){for(let e=0,a=s.length;e<a;e++)if(v(s[e])){let l;l="",r.mergeArraysWithLineBreaks&&e>0&&(!r.mergeWithoutTrailingBrIfLineContainsBr||typeof s[e-1]!="string"||r.mergeWithoutTrailingBrIfLineContainsBr&&s[e-1]!==void 0&&!s[e-1].toLowerCase().includes("<br"))&&(l=`<br${r.xhtml?" /":""}>`),h+=`${l}${p?r.wrapHeadsWith:""}${s[e]}${p?r.wrapTailsWith:""}`}else if(Array.isArray(s[e])&&s[e].length&&s[e].every(v)){let l="";r.mergeArraysWithLineBreaks&&h.length&&(l=`<br${r.xhtml?" /":""}>`),h=s[e].reduce((d,t,o,n)=>{let c="";return o!==n.length-1&&(c=" "),d+(o===0?l:"")+(p?r.wrapHeadsWith:"")+t+(p?r.wrapTailsWith:"")+c},h)}}else h=s.reduce((e,a,l,d)=>{let t="";r.mergeArraysWithLineBreaks&&l>0&&(t=`<br${r.xhtml?" /":""}>`);let o="";return l!==d.length-1&&(o=" "),`${e}${l===0?t:""}${p?r.wrapHeadsWith:""}${a}${p?r.wrapTailsWith:""}${o}`},h);return h}function b(f){return v(f)?f.length?[f]:[]:f}var x="7.0.6";var J=x;function W(f){return f!=null}function g(f){return typeof f=="string"}function q(f,m,p){if(arguments.length===0)throw new Error("object-flatten-referencing/ofr(): [THROW_ID_01] all inputs missing!");if(arguments.length===1)throw new Error("object-flatten-referencing/ofr(): [THROW_ID_02] resolvedReference object missing!");if(W(p)&&!w(p))throw new Error(`object-flatten-referencing/ofr(): [THROW_ID_03] third resolvedInput, options object must be a plain object. Currently it's: ${typeof p}`);let i={...j,...p};i.dontWrapKeys=b(i.dontWrapKeys),i.preventWrappingIfContains=b(i.preventWrappingIfContains),i.dontWrapPaths=b(i.dontWrapPaths),i.ignore=b(i.ignore),typeof i.whatToDoWhenReferenceIsMissing!="number"&&(i.whatToDoWhenReferenceIsMissing=+i.whatToDoWhenReferenceIsMissing||0);function r(s,h,e,a=!0,l=!0,d=""){let t=D(s),o=D(h);return e.wrapGlobalFlipSwitch||(a=!1),w(t)?Object.keys(t).forEach(n=>{let c=d+(d.length===0?n:`.${n}`);if(e.ignore.length===0||!e.ignore.includes(n)){if(e.wrapGlobalFlipSwitch&&(a=!0,e.dontWrapKeys.length&&(a=a&&!e.dontWrapKeys.some(u=>C(n,u,{caseSensitive:!0}))),e.dontWrapPaths.length&&(a=a&&!e.dontWrapPaths.some(u=>u===c)),e.preventWrappingIfContains.length&&typeof t[n]=="string"&&(a=a&&!e.preventWrappingIfContains.some(u=>t[n].includes(u)))),W(o[n])||!W(o[n])&&e.whatToDoWhenReferenceIsMissing===2)if(Array.isArray(t[n]))if(e.whatToDoWhenReferenceIsMissing===2||g(o[n]))t[n]=y(t[n],e,a,l);else{if(t[n].every(u=>typeof u=="string"||Array.isArray(u))){let u=!0;t[n].forEach(T=>{Array.isArray(T)&&!T.every(g)&&(u=!1)}),u&&(l=!1)}t[n]=r(t[n],o[n],e,a,l,c)}else w(t[n])?e.whatToDoWhenReferenceIsMissing===2||g(o[n])?t[n]=y(O(t[n],e),e,a,l):a?t[n]=r(t[n],o[n],e,a,l,c):t[n]=r(t[n],o[n],{...e,wrapGlobalFlipSwitch:!1},a,l,c):g(t[n])&&(t[n]=r(t[n],o[n],e,a,l,c));else if(typeof t[n]!=typeof o[n]&&e.whatToDoWhenReferenceIsMissing===1)throw new Error(`object-flatten-referencing/ofr(): [THROW_ID_06] resolvedReference object does not have the key ${n} and we need it. TIP: Turn off throwing via opts2.whatToDoWhenReferenceIsMissing.`)}}):Array.isArray(t)?Array.isArray(o)?t.forEach((n,c)=>{W(t[c])&&W(o[c])?t[c]=r(t[c],o[c],e,a,l,`${d}[${c}]`):t[c]=r(t[c],o[0],e,a,l,`${d}[${c}]`)}):g(o)&&(t=y(t,e,a,l)):g(t)&&t.length&&(e.wrapHeadsWith||e.wrapTailsWith)&&(!e.preventDoubleWrapping||(e.wrapHeadsWith===""||!A(t,e.wrapHeadsWith.trim()).length)&&(e.wrapTailsWith===""||!A(t,e.wrapTailsWith.trim()).length))&&(t=`${a?e.wrapHeadsWith:""}${t}${a?e.wrapTailsWith:""}`),t}return r(f,m,i)}export{b as arrayiffyString,j as defaults,y as flattenArr,O as flattenObject,q as flattenReferencing,J as version};
10
+ import D from"lodash.clonedeep";import{strIndexesOfPlus as A}from"str-indexes-of-plus";import{isMatch as C}from"matcher";import{isPlainObject as w}from"codsen-utils";import $ from"lodash.clonedeep";import{isPlainObject as I}from"codsen-utils";var j={wrapHeadsWith:"%%_",wrapTailsWith:"_%%",dontWrapKeys:[],dontWrapPaths:[],xhtml:!0,preventDoubleWrapping:!0,preventWrappingIfContains:[],objectKeyAndValueJoinChar:".",wrapGlobalFlipSwitch:!0,ignore:[],whatToDoWhenReferenceIsMissing:0,mergeArraysWithLineBreaks:!0,mergeWithoutTrailingBrIfLineContainsBr:!0,enforceStrictKeyset:!0};function v(f){return typeof f=="string"}function O(f,m){let p={...j,...m};if(arguments.length===0||Object.keys(f).length===0)return[];let i=$(f),r=[];return I(i)&&Object.keys(i).forEach(s=>{I(i[s])&&(i[s]=O(i[s],p)),Array.isArray(i[s])&&(r=r.concat(i[s].map(h=>`${s}${p.objectKeyAndValueJoinChar}${h}`))),v(i[s])&&r.push(`${s}${p.objectKeyAndValueJoinChar}${i[s]}`)}),r}function y(f,m,p=!1,i=!1){let r={...j,...m};if(arguments.length===0||f.length===0)return"";let s=$(f),h="";if(s.length)if(i){for(let e=0,a=s.length;e<a;e++)if(v(s[e])){let l;l="",r.mergeArraysWithLineBreaks&&e>0&&(!r.mergeWithoutTrailingBrIfLineContainsBr||typeof s[e-1]!="string"||r.mergeWithoutTrailingBrIfLineContainsBr&&s[e-1]!==void 0&&!s[e-1].toLowerCase().includes("<br"))&&(l=`<br${r.xhtml?" /":""}>`),h+=`${l}${p?r.wrapHeadsWith:""}${s[e]}${p?r.wrapTailsWith:""}`}else if(Array.isArray(s[e])&&s[e].length&&s[e].every(v)){let l="";r.mergeArraysWithLineBreaks&&h.length&&(l=`<br${r.xhtml?" /":""}>`),h=s[e].reduce((d,t,o,n)=>{let c="";return o!==n.length-1&&(c=" "),d+(o===0?l:"")+(p?r.wrapHeadsWith:"")+t+(p?r.wrapTailsWith:"")+c},h)}}else h=s.reduce((e,a,l,d)=>{let t="";r.mergeArraysWithLineBreaks&&l>0&&(t=`<br${r.xhtml?" /":""}>`);let o="";return l!==d.length-1&&(o=" "),`${e}${l===0?t:""}${p?r.wrapHeadsWith:""}${a}${p?r.wrapTailsWith:""}${o}`},h);return h}function b(f){return v(f)?f.length?[f]:[]:f}var x="7.0.7";var J=x;function W(f){return f!=null}function g(f){return typeof f=="string"}function q(f,m,p){if(arguments.length===0)throw new Error("object-flatten-referencing/ofr(): [THROW_ID_01] all inputs missing!");if(arguments.length===1)throw new Error("object-flatten-referencing/ofr(): [THROW_ID_02] resolvedReference object missing!");if(W(p)&&!w(p))throw new Error(`object-flatten-referencing/ofr(): [THROW_ID_03] third resolvedInput, options object must be a plain object. Currently it's: ${typeof p}`);let i={...j,...p};i.dontWrapKeys=b(i.dontWrapKeys),i.preventWrappingIfContains=b(i.preventWrappingIfContains),i.dontWrapPaths=b(i.dontWrapPaths),i.ignore=b(i.ignore),typeof i.whatToDoWhenReferenceIsMissing!="number"&&(i.whatToDoWhenReferenceIsMissing=+i.whatToDoWhenReferenceIsMissing||0);function r(s,h,e,a=!0,l=!0,d=""){let t=D(s),o=D(h);return e.wrapGlobalFlipSwitch||(a=!1),w(t)?Object.keys(t).forEach(n=>{let c=d+(d.length===0?n:`.${n}`);if(e.ignore.length===0||!e.ignore.includes(n)){if(e.wrapGlobalFlipSwitch&&(a=!0,e.dontWrapKeys.length&&(a=a&&!e.dontWrapKeys.some(u=>C(n,u,{caseSensitive:!0}))),e.dontWrapPaths.length&&(a=a&&!e.dontWrapPaths.some(u=>u===c)),e.preventWrappingIfContains.length&&typeof t[n]=="string"&&(a=a&&!e.preventWrappingIfContains.some(u=>t[n].includes(u)))),W(o[n])||!W(o[n])&&e.whatToDoWhenReferenceIsMissing===2)if(Array.isArray(t[n]))if(e.whatToDoWhenReferenceIsMissing===2||g(o[n]))t[n]=y(t[n],e,a,l);else{if(t[n].every(u=>typeof u=="string"||Array.isArray(u))){let u=!0;t[n].forEach(T=>{Array.isArray(T)&&!T.every(g)&&(u=!1)}),u&&(l=!1)}t[n]=r(t[n],o[n],e,a,l,c)}else w(t[n])?e.whatToDoWhenReferenceIsMissing===2||g(o[n])?t[n]=y(O(t[n],e),e,a,l):a?t[n]=r(t[n],o[n],e,a,l,c):t[n]=r(t[n],o[n],{...e,wrapGlobalFlipSwitch:!1},a,l,c):g(t[n])&&(t[n]=r(t[n],o[n],e,a,l,c));else if(typeof t[n]!=typeof o[n]&&e.whatToDoWhenReferenceIsMissing===1)throw new Error(`object-flatten-referencing/ofr(): [THROW_ID_06] resolvedReference object does not have the key ${n} and we need it. TIP: Turn off throwing via opts2.whatToDoWhenReferenceIsMissing.`)}}):Array.isArray(t)?Array.isArray(o)?t.forEach((n,c)=>{W(t[c])&&W(o[c])?t[c]=r(t[c],o[c],e,a,l,`${d}[${c}]`):t[c]=r(t[c],o[0],e,a,l,`${d}[${c}]`)}):g(o)&&(t=y(t,e,a,l)):g(t)&&t.length&&(e.wrapHeadsWith||e.wrapTailsWith)&&(!e.preventDoubleWrapping||(e.wrapHeadsWith===""||!A(t,e.wrapHeadsWith.trim()).length)&&(e.wrapTailsWith===""||!A(t,e.wrapTailsWith.trim()).length))&&(t=`${a?e.wrapHeadsWith:""}${t}${a?e.wrapTailsWith:""}`),t}return r(f,m,i)}export{b as arrayiffyString,j as defaults,y as flattenArr,O as flattenObject,q as flattenReferencing,J as version};
@@ -1,13 +1,13 @@
1
1
  /**
2
2
  * @name object-flatten-referencing
3
3
  * @fileoverview Flatten complex nested objects according to a reference objects
4
- * @version 7.0.6
4
+ * @version 7.0.7
5
5
  * @author Roy Revelt, Codsen Ltd
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/object-flatten-referencing/}
8
8
  */
9
9
 
10
- "use strict";var objectFlattenReferencing=(()=>{var lt=Object.create;var I=Object.defineProperty,pt=Object.defineProperties,ht=Object.getOwnPropertyDescriptor,gt=Object.getOwnPropertyDescriptors,dt=Object.getOwnPropertyNames,de=Object.getOwnPropertySymbols,bt=Object.getPrototypeOf,ye=Object.prototype.hasOwnProperty,yt=Object.prototype.propertyIsEnumerable;var be=(e,t,r)=>t in e?I(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,y=(e,t)=>{for(var r in t||(t={}))ye.call(t,r)&&be(e,r,t[r]);if(de)for(var r of de(t))yt.call(t,r)&&be(e,r,t[r]);return e},me=(e,t)=>pt(e,gt(t));var mt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),_t=(e,t)=>{for(var r in t)I(e,r,{get:t[r],enumerable:!0})},_e=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of dt(t))!ye.call(e,a)&&a!==r&&I(e,a,{get:()=>t[a],enumerable:!(n=ht(t,a))||n.enumerable});return e};var we=(e,t,r)=>(r=e!=null?lt(bt(e)):{},_e(t||!e||!e.__esModule?I(r,"default",{value:e,enumerable:!0}):r,e)),wt=e=>_e(I({},"__esModule",{value:!0}),e);var ce=mt((E,C)=>{var vt=200,Ee="__lodash_hash_undefined__",De=9007199254740991,te="[object Arguments]",xt="[object Array]",Pe="[object Boolean]",Re="[object Date]",At="[object Error]",re="[object Function]",Me="[object GeneratorFunction]",L="[object Map]",Be="[object Number]",ne="[object Object]",ve="[object Promise]",Le="[object RegExp]",F="[object Set]",Fe="[object String]",He="[object Symbol]",q="[object WeakMap]",Ke="[object ArrayBuffer]",H="[object DataView]",Ge="[object Float32Array]",Ne="[object Float64Array]",Ve="[object Int8Array]",Je="[object Int16Array]",Qe="[object Int32Array]",Ue="[object Uint8Array]",Ze="[object Uint8ClampedArray]",qe="[object Uint16Array]",Xe="[object Uint32Array]",Tt=/[\\^$.*+?()[\]{}|]/g,Ct=/\w*$/,Ot=/^\[object .+?Constructor\]$/,jt=/^(?:0|[1-9]\d*)$/,p={};p[te]=p[xt]=p[Ke]=p[H]=p[Pe]=p[Re]=p[Ge]=p[Ne]=p[Ve]=p[Je]=p[Qe]=p[L]=p[Be]=p[ne]=p[Le]=p[F]=p[Fe]=p[He]=p[Ue]=p[Ze]=p[qe]=p[Xe]=!0;p[At]=p[re]=p[q]=!1;var St=typeof global=="object"&&global&&global.Object===Object&&global,Wt=typeof self=="object"&&self&&self.Object===Object&&self,m=St||Wt||Function("return this")(),Ye=typeof E=="object"&&E&&!E.nodeType&&E,xe=Ye&&typeof C=="object"&&C&&!C.nodeType&&C,$t=xe&&xe.exports===Ye;function It(e,t){return e.set(t[0],t[1]),e}function Et(e,t){return e.add(t),e}function Dt(e,t){for(var r=-1,n=e?e.length:0;++r<n&&t(e[r],r,e)!==!1;);return e}function Pt(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}function ze(e,t,r,n){var a=-1,s=e?e.length:0;for(n&&s&&(r=e[++a]);++a<s;)r=t(r,e[a],a,e);return r}function Rt(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function Mt(e,t){return e==null?void 0:e[t]}function ke(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch(r){}return t}function Ae(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}function ie(e,t){return function(r){return e(t(r))}}function Te(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Bt=Array.prototype,Lt=Function.prototype,K=Object.prototype,Z=m["__core-js_shared__"],Ce=function(){var e=/[^.]+$/.exec(Z&&Z.keys&&Z.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),et=Lt.toString,w=K.hasOwnProperty,G=K.toString,Ft=RegExp("^"+et.call(w).replace(Tt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Oe=$t?m.Buffer:void 0,je=m.Symbol,Se=m.Uint8Array,Ht=ie(Object.getPrototypeOf,Object),Kt=Object.create,Gt=K.propertyIsEnumerable,Nt=Bt.splice,We=Object.getOwnPropertySymbols,Vt=Oe?Oe.isBuffer:void 0,Jt=ie(Object.keys,Object),X=S(m,"DataView"),D=S(m,"Map"),Y=S(m,"Promise"),z=S(m,"Set"),k=S(m,"WeakMap"),P=S(Object,"create"),Qt=A(X),Ut=A(D),Zt=A(Y),qt=A(z),Xt=A(k),$e=je?je.prototype:void 0,Ie=$e?$e.valueOf:void 0;function x(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Yt(){this.__data__=P?P(null):{}}function zt(e){return this.has(e)&&delete this.__data__[e]}function kt(e){var t=this.__data__;if(P){var r=t[e];return r===Ee?void 0:r}return w.call(t,e)?t[e]:void 0}function er(e){var t=this.__data__;return P?t[e]!==void 0:w.call(t,e)}function tr(e,t){var r=this.__data__;return r[e]=P&&t===void 0?Ee:t,this}x.prototype.clear=Yt;x.prototype.delete=zt;x.prototype.get=kt;x.prototype.has=er;x.prototype.set=tr;function _(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function rr(){this.__data__=[]}function nr(e){var t=this.__data__,r=N(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Nt.call(t,r,1),!0}function ir(e){var t=this.__data__,r=N(t,e);return r<0?void 0:t[r][1]}function ar(e){return N(this.__data__,e)>-1}function sr(e,t){var r=this.__data__,n=N(r,e);return n<0?r.push([e,t]):r[n][1]=t,this}_.prototype.clear=rr;_.prototype.delete=nr;_.prototype.get=ir;_.prototype.has=ar;_.prototype.set=sr;function O(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function or(){this.__data__={hash:new x,map:new(D||_),string:new x}}function cr(e){return V(this,e).delete(e)}function fr(e){return V(this,e).get(e)}function ur(e){return V(this,e).has(e)}function lr(e,t){return V(this,e).set(e,t),this}O.prototype.clear=or;O.prototype.delete=cr;O.prototype.get=fr;O.prototype.has=ur;O.prototype.set=lr;function j(e){this.__data__=new _(e)}function pr(){this.__data__=new _}function hr(e){return this.__data__.delete(e)}function gr(e){return this.__data__.get(e)}function dr(e){return this.__data__.has(e)}function br(e,t){var r=this.__data__;if(r instanceof _){var n=r.__data__;if(!D||n.length<vt-1)return n.push([e,t]),this;r=this.__data__=new O(n)}return r.set(e,t),this}j.prototype.clear=pr;j.prototype.delete=hr;j.prototype.get=gr;j.prototype.has=dr;j.prototype.set=br;function yr(e,t){var r=se(e)||Kr(e)?Rt(e.length,String):[],n=r.length,a=!!n;for(var s in e)(t||w.call(e,s))&&!(a&&(s=="length"||Br(s,n)))&&r.push(s);return r}function tt(e,t,r){var n=e[t];(!(w.call(e,t)&&at(n,r))||r===void 0&&!(t in e))&&(e[t]=r)}function N(e,t){for(var r=e.length;r--;)if(at(e[r][0],t))return r;return-1}function mr(e,t){return e&&rt(t,oe(t),e)}function ee(e,t,r,n,a,s,l){var i;if(n&&(i=s?n(e,a,s,l):n(e)),i!==void 0)return i;if(!J(e))return e;var f=se(e);if(f){if(i=Pr(e),!t)return Ir(e,i)}else{var u=v(e),d=u==re||u==Me;if(Nr(e))return Tr(e,t);if(u==ne||u==te||d&&!s){if(ke(e))return s?e:{};if(i=Rr(d?{}:e),!t)return Er(e,mr(i,e))}else{if(!p[u])return s?e:{};i=Mr(e,u,ee,t)}}l||(l=new j);var o=l.get(e);if(o)return o;if(l.set(e,i),!f)var h=r?Dr(e):oe(e);return Dt(h||e,function(c,g){h&&(g=c,c=e[g]),tt(i,g,ee(c,t,r,n,g,e,l))}),i}function _r(e){return J(e)?Kt(e):{}}function wr(e,t,r){var n=t(e);return se(e)?n:Pt(n,r(e))}function vr(e){return G.call(e)}function xr(e){if(!J(e)||Fr(e))return!1;var t=ot(e)||ke(e)?Ft:Ot;return t.test(A(e))}function Ar(e){if(!it(e))return Jt(e);var t=[];for(var r in Object(e))w.call(e,r)&&r!="constructor"&&t.push(r);return t}function Tr(e,t){if(t)return e.slice();var r=new e.constructor(e.length);return e.copy(r),r}function ae(e){var t=new e.constructor(e.byteLength);return new Se(t).set(new Se(e)),t}function Cr(e,t){var r=t?ae(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}function Or(e,t,r){var n=t?r(Ae(e),!0):Ae(e);return ze(n,It,new e.constructor)}function jr(e){var t=new e.constructor(e.source,Ct.exec(e));return t.lastIndex=e.lastIndex,t}function Sr(e,t,r){var n=t?r(Te(e),!0):Te(e);return ze(n,Et,new e.constructor)}function Wr(e){return Ie?Object(Ie.call(e)):{}}function $r(e,t){var r=t?ae(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Ir(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}function rt(e,t,r,n){r||(r={});for(var a=-1,s=t.length;++a<s;){var l=t[a],i=n?n(r[l],e[l],l,r,e):void 0;tt(r,l,i===void 0?e[l]:i)}return r}function Er(e,t){return rt(e,nt(e),t)}function Dr(e){return wr(e,oe,nt)}function V(e,t){var r=e.__data__;return Lr(t)?r[typeof t=="string"?"string":"hash"]:r.map}function S(e,t){var r=Mt(e,t);return xr(r)?r:void 0}var nt=We?ie(We,Object):Qr,v=vr;(X&&v(new X(new ArrayBuffer(1)))!=H||D&&v(new D)!=L||Y&&v(Y.resolve())!=ve||z&&v(new z)!=F||k&&v(new k)!=q)&&(v=function(e){var t=G.call(e),r=t==ne?e.constructor:void 0,n=r?A(r):void 0;if(n)switch(n){case Qt:return H;case Ut:return L;case Zt:return ve;case qt:return F;case Xt:return q}return t});function Pr(e){var t=e.length,r=e.constructor(t);return t&&typeof e[0]=="string"&&w.call(e,"index")&&(r.index=e.index,r.input=e.input),r}function Rr(e){return typeof e.constructor=="function"&&!it(e)?_r(Ht(e)):{}}function Mr(e,t,r,n){var a=e.constructor;switch(t){case Ke:return ae(e);case Pe:case Re:return new a(+e);case H:return Cr(e,n);case Ge:case Ne:case Ve:case Je:case Qe:case Ue:case Ze:case qe:case Xe:return $r(e,n);case L:return Or(e,n,r);case Be:case Fe:return new a(e);case Le:return jr(e);case F:return Sr(e,n,r);case He:return Wr(e)}}function Br(e,t){return t=t==null?De:t,!!t&&(typeof e=="number"||jt.test(e))&&e>-1&&e%1==0&&e<t}function Lr(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Fr(e){return!!Ce&&Ce in e}function it(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||K;return e===r}function A(e){if(e!=null){try{return et.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function Hr(e){return ee(e,!0,!0)}function at(e,t){return e===t||e!==e&&t!==t}function Kr(e){return Gr(e)&&w.call(e,"callee")&&(!Gt.call(e,"callee")||G.call(e)==te)}var se=Array.isArray;function st(e){return e!=null&&Vr(e.length)&&!ot(e)}function Gr(e){return Jr(e)&&st(e)}var Nr=Vt||Ur;function ot(e){var t=J(e)?G.call(e):"";return t==re||t==Me}function Vr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=De}function J(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function Jr(e){return!!e&&typeof e=="object"}function oe(e){return st(e)?yr(e):Ar(e)}function Qr(){return[]}function Ur(){return!1}C.exports=Hr});var kr={};_t(kr,{arrayiffyString:()=>W,defaults:()=>R,flattenArr:()=>M,flattenObject:()=>U,flattenReferencing:()=>zr,version:()=>Yr});var he=we(ce(),1);function fe(e,t,r=0){if(typeof e!="string")throw new TypeError(`str-indexes-of-plus/strIndexesOfPlus(): first input argument must be a string! Currently it's: ${typeof e}`);if(typeof t!="string")throw new TypeError(`str-indexes-of-plus/strIndexesOfPlus(): second input argument must be a string! Currently it's: ${typeof t}`);if(isNaN(+r)||typeof r=="string"&&!/^\d*$/.test(r))throw new TypeError(`str-indexes-of-plus/strIndexesOfPlus(): third input argument must be a natural number! Currently it's: ${r}`);let n=Array.from(e),a=Array.from(t);if(n.length===0||a.length===0||r!=null&&+r>=n.length)return[];r||(r=0);let s=[],l=!1,i;for(let f=r,u=n.length;f<u;f++)l&&(n[f]===a[f-+i]?f-+i+1===a.length&&s.push(+i):(i=null,l=!1)),l||n[f]===a[0]&&(a.length===1?s.push(f):(l=!0,i=f));return s}function ue(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var le=new Map,ct=(e,t)=>{if(!Array.isArray(e))switch(typeof e){case"string":e=[e];break;case"undefined":e=[];break;default:throw new TypeError(`Expected '${t}' to be a string or an array, but got a type of '${typeof e}'`)}return e.filter(r=>{if(typeof r!="string"){if(typeof r>"u")return!1;throw new TypeError(`Expected '${t}' to be an array of strings, but found a type of '${typeof r}' in the array`)}return!0})},Zr=(e,t)=>{t=y({caseSensitive:!1},t);let r=e+JSON.stringify(t);if(le.has(r))return le.get(r);let n=e[0]==="!";n&&(e=e.slice(1)),e=ue(e).replace(/\\\*/g,"[\\s\\S]*");let a=new RegExp(`^${e}$`,t.caseSensitive?"":"i");return a.negated=n,le.set(r,a),a},qr=(e,t,r,n)=>{if(e=ct(e,"inputs"),t=ct(t,"patterns"),t.length===0)return[];t=t.map(l=>Zr(l,r));let{allPatterns:a}=r||{},s=[];for(let l of e){let i,f=[...t].fill(!1);for(let[u,d]of t.entries())if(d.test(l)&&(f[u]=!0,i=!d.negated,!i))break;if(!(i===!1||i===void 0&&t.some(u=>!u.negated)||a&&f.some((u,d)=>!u&&!t[d].negated))&&(s.push(l),n))break}return s};function ft(e,t,r){return qr(e,t,r,!0).length>0}function T(e){if(e==null||typeof e!="object")return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null?!1:!(Symbol.iterator in e)&&!(Symbol.toStringTag in e)}var pe=we(ce(),1);var R={wrapHeadsWith:"%%_",wrapTailsWith:"_%%",dontWrapKeys:[],dontWrapPaths:[],xhtml:!0,preventDoubleWrapping:!0,preventWrappingIfContains:[],objectKeyAndValueJoinChar:".",wrapGlobalFlipSwitch:!0,ignore:[],whatToDoWhenReferenceIsMissing:0,mergeArraysWithLineBreaks:!0,mergeWithoutTrailingBrIfLineContainsBr:!0,enforceStrictKeyset:!0};function Q(e){return typeof e=="string"}function U(e,t){let r=y(y({},R),t);if(arguments.length===0||Object.keys(e).length===0)return[];let n=(0,pe.default)(e),a=[];return T(n)&&Object.keys(n).forEach(s=>{T(n[s])&&(n[s]=U(n[s],r)),Array.isArray(n[s])&&(a=a.concat(n[s].map(l=>`${s}${r.objectKeyAndValueJoinChar}${l}`))),Q(n[s])&&a.push(`${s}${r.objectKeyAndValueJoinChar}${n[s]}`)}),a}function M(e,t,r=!1,n=!1){let a=y(y({},R),t);if(arguments.length===0||e.length===0)return"";let s=(0,pe.default)(e),l="";if(s.length)if(n){for(let i=0,f=s.length;i<f;i++)if(Q(s[i])){let u;u="",a.mergeArraysWithLineBreaks&&i>0&&(!a.mergeWithoutTrailingBrIfLineContainsBr||typeof s[i-1]!="string"||a.mergeWithoutTrailingBrIfLineContainsBr&&s[i-1]!==void 0&&!s[i-1].toLowerCase().includes("<br"))&&(u=`<br${a.xhtml?" /":""}>`),l+=`${u}${r?a.wrapHeadsWith:""}${s[i]}${r?a.wrapTailsWith:""}`}else if(Array.isArray(s[i])&&s[i].length&&s[i].every(Q)){let u="";a.mergeArraysWithLineBreaks&&l.length&&(u=`<br${a.xhtml?" /":""}>`),l=s[i].reduce((d,o,h,c)=>{let g="";return h!==c.length-1&&(g=" "),d+(h===0?u:"")+(r?a.wrapHeadsWith:"")+o+(r?a.wrapTailsWith:"")+g},l)}}else l=s.reduce((i,f,u,d)=>{let o="";a.mergeArraysWithLineBreaks&&u>0&&(o=`<br${a.xhtml?" /":""}>`);let h="";return u!==d.length-1&&(h=" "),`${i}${u===0?o:""}${r?a.wrapHeadsWith:""}${f}${r?a.wrapTailsWith:""}${h}`},l);return l}function W(e){return Q(e)?e.length?[e]:[]:e}var ut="7.0.6";var Yr=ut;function B(e){return e!=null}function $(e){return typeof e=="string"}function zr(e,t,r){if(arguments.length===0)throw new Error("object-flatten-referencing/ofr(): [THROW_ID_01] all inputs missing!");if(arguments.length===1)throw new Error("object-flatten-referencing/ofr(): [THROW_ID_02] resolvedReference object missing!");if(B(r)&&!T(r))throw new Error(`object-flatten-referencing/ofr(): [THROW_ID_03] third resolvedInput, options object must be a plain object. Currently it's: ${typeof r}`);let n=y(y({},R),r);n.dontWrapKeys=W(n.dontWrapKeys),n.preventWrappingIfContains=W(n.preventWrappingIfContains),n.dontWrapPaths=W(n.dontWrapPaths),n.ignore=W(n.ignore),typeof n.whatToDoWhenReferenceIsMissing!="number"&&(n.whatToDoWhenReferenceIsMissing=+n.whatToDoWhenReferenceIsMissing||0);function a(s,l,i,f=!0,u=!0,d=""){let o=(0,he.default)(s),h=(0,he.default)(l);return i.wrapGlobalFlipSwitch||(f=!1),T(o)?Object.keys(o).forEach(c=>{let g=d+(d.length===0?c:`.${c}`);if(i.ignore.length===0||!i.ignore.includes(c)){if(i.wrapGlobalFlipSwitch&&(f=!0,i.dontWrapKeys.length&&(f=f&&!i.dontWrapKeys.some(b=>ft(c,b,{caseSensitive:!0}))),i.dontWrapPaths.length&&(f=f&&!i.dontWrapPaths.some(b=>b===g)),i.preventWrappingIfContains.length&&typeof o[c]=="string"&&(f=f&&!i.preventWrappingIfContains.some(b=>o[c].includes(b)))),B(h[c])||!B(h[c])&&i.whatToDoWhenReferenceIsMissing===2)if(Array.isArray(o[c]))if(i.whatToDoWhenReferenceIsMissing===2||$(h[c]))o[c]=M(o[c],i,f,u);else{if(o[c].every(b=>typeof b=="string"||Array.isArray(b))){let b=!0;o[c].forEach(ge=>{Array.isArray(ge)&&!ge.every($)&&(b=!1)}),b&&(u=!1)}o[c]=a(o[c],h[c],i,f,u,g)}else T(o[c])?i.whatToDoWhenReferenceIsMissing===2||$(h[c])?o[c]=M(U(o[c],i),i,f,u):f?o[c]=a(o[c],h[c],i,f,u,g):o[c]=a(o[c],h[c],me(y({},i),{wrapGlobalFlipSwitch:!1}),f,u,g):$(o[c])&&(o[c]=a(o[c],h[c],i,f,u,g));else if(typeof o[c]!=typeof h[c]&&i.whatToDoWhenReferenceIsMissing===1)throw new Error(`object-flatten-referencing/ofr(): [THROW_ID_06] resolvedReference object does not have the key ${c} and we need it. TIP: Turn off throwing via opts2.whatToDoWhenReferenceIsMissing.`)}}):Array.isArray(o)?Array.isArray(h)?o.forEach((c,g)=>{B(o[g])&&B(h[g])?o[g]=a(o[g],h[g],i,f,u,`${d}[${g}]`):o[g]=a(o[g],h[0],i,f,u,`${d}[${g}]`)}):$(h)&&(o=M(o,i,f,u)):$(o)&&o.length&&(i.wrapHeadsWith||i.wrapTailsWith)&&(!i.preventDoubleWrapping||(i.wrapHeadsWith===""||!fe(o,i.wrapHeadsWith.trim()).length)&&(i.wrapTailsWith===""||!fe(o,i.wrapTailsWith.trim()).length))&&(o=`${f?i.wrapHeadsWith:""}${o}${f?i.wrapTailsWith:""}`),o}return a(e,t,n)}return wt(kr);})();
10
+ "use strict";var objectFlattenReferencing=(()=>{var lt=Object.create;var I=Object.defineProperty,pt=Object.defineProperties,ht=Object.getOwnPropertyDescriptor,gt=Object.getOwnPropertyDescriptors,dt=Object.getOwnPropertyNames,de=Object.getOwnPropertySymbols,bt=Object.getPrototypeOf,ye=Object.prototype.hasOwnProperty,yt=Object.prototype.propertyIsEnumerable;var be=(e,t,r)=>t in e?I(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,y=(e,t)=>{for(var r in t||(t={}))ye.call(t,r)&&be(e,r,t[r]);if(de)for(var r of de(t))yt.call(t,r)&&be(e,r,t[r]);return e},me=(e,t)=>pt(e,gt(t));var mt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),_t=(e,t)=>{for(var r in t)I(e,r,{get:t[r],enumerable:!0})},_e=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of dt(t))!ye.call(e,a)&&a!==r&&I(e,a,{get:()=>t[a],enumerable:!(n=ht(t,a))||n.enumerable});return e};var we=(e,t,r)=>(r=e!=null?lt(bt(e)):{},_e(t||!e||!e.__esModule?I(r,"default",{value:e,enumerable:!0}):r,e)),wt=e=>_e(I({},"__esModule",{value:!0}),e);var ce=mt((E,C)=>{var vt=200,Ee="__lodash_hash_undefined__",De=9007199254740991,te="[object Arguments]",xt="[object Array]",Pe="[object Boolean]",Re="[object Date]",At="[object Error]",re="[object Function]",Me="[object GeneratorFunction]",L="[object Map]",Be="[object Number]",ne="[object Object]",ve="[object Promise]",Le="[object RegExp]",F="[object Set]",Fe="[object String]",He="[object Symbol]",q="[object WeakMap]",Ke="[object ArrayBuffer]",H="[object DataView]",Ge="[object Float32Array]",Ne="[object Float64Array]",Ve="[object Int8Array]",Je="[object Int16Array]",Qe="[object Int32Array]",Ue="[object Uint8Array]",Ze="[object Uint8ClampedArray]",qe="[object Uint16Array]",Xe="[object Uint32Array]",Tt=/[\\^$.*+?()[\]{}|]/g,Ct=/\w*$/,Ot=/^\[object .+?Constructor\]$/,jt=/^(?:0|[1-9]\d*)$/,p={};p[te]=p[xt]=p[Ke]=p[H]=p[Pe]=p[Re]=p[Ge]=p[Ne]=p[Ve]=p[Je]=p[Qe]=p[L]=p[Be]=p[ne]=p[Le]=p[F]=p[Fe]=p[He]=p[Ue]=p[Ze]=p[qe]=p[Xe]=!0;p[At]=p[re]=p[q]=!1;var St=typeof global=="object"&&global&&global.Object===Object&&global,Wt=typeof self=="object"&&self&&self.Object===Object&&self,m=St||Wt||Function("return this")(),Ye=typeof E=="object"&&E&&!E.nodeType&&E,xe=Ye&&typeof C=="object"&&C&&!C.nodeType&&C,$t=xe&&xe.exports===Ye;function It(e,t){return e.set(t[0],t[1]),e}function Et(e,t){return e.add(t),e}function Dt(e,t){for(var r=-1,n=e?e.length:0;++r<n&&t(e[r],r,e)!==!1;);return e}function Pt(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}function ze(e,t,r,n){var a=-1,s=e?e.length:0;for(n&&s&&(r=e[++a]);++a<s;)r=t(r,e[a],a,e);return r}function Rt(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function Mt(e,t){return e==null?void 0:e[t]}function ke(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch(r){}return t}function Ae(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}function ie(e,t){return function(r){return e(t(r))}}function Te(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Bt=Array.prototype,Lt=Function.prototype,K=Object.prototype,Z=m["__core-js_shared__"],Ce=function(){var e=/[^.]+$/.exec(Z&&Z.keys&&Z.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),et=Lt.toString,w=K.hasOwnProperty,G=K.toString,Ft=RegExp("^"+et.call(w).replace(Tt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Oe=$t?m.Buffer:void 0,je=m.Symbol,Se=m.Uint8Array,Ht=ie(Object.getPrototypeOf,Object),Kt=Object.create,Gt=K.propertyIsEnumerable,Nt=Bt.splice,We=Object.getOwnPropertySymbols,Vt=Oe?Oe.isBuffer:void 0,Jt=ie(Object.keys,Object),X=S(m,"DataView"),D=S(m,"Map"),Y=S(m,"Promise"),z=S(m,"Set"),k=S(m,"WeakMap"),P=S(Object,"create"),Qt=A(X),Ut=A(D),Zt=A(Y),qt=A(z),Xt=A(k),$e=je?je.prototype:void 0,Ie=$e?$e.valueOf:void 0;function x(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Yt(){this.__data__=P?P(null):{}}function zt(e){return this.has(e)&&delete this.__data__[e]}function kt(e){var t=this.__data__;if(P){var r=t[e];return r===Ee?void 0:r}return w.call(t,e)?t[e]:void 0}function er(e){var t=this.__data__;return P?t[e]!==void 0:w.call(t,e)}function tr(e,t){var r=this.__data__;return r[e]=P&&t===void 0?Ee:t,this}x.prototype.clear=Yt;x.prototype.delete=zt;x.prototype.get=kt;x.prototype.has=er;x.prototype.set=tr;function _(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function rr(){this.__data__=[]}function nr(e){var t=this.__data__,r=N(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Nt.call(t,r,1),!0}function ir(e){var t=this.__data__,r=N(t,e);return r<0?void 0:t[r][1]}function ar(e){return N(this.__data__,e)>-1}function sr(e,t){var r=this.__data__,n=N(r,e);return n<0?r.push([e,t]):r[n][1]=t,this}_.prototype.clear=rr;_.prototype.delete=nr;_.prototype.get=ir;_.prototype.has=ar;_.prototype.set=sr;function O(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function or(){this.__data__={hash:new x,map:new(D||_),string:new x}}function cr(e){return V(this,e).delete(e)}function fr(e){return V(this,e).get(e)}function ur(e){return V(this,e).has(e)}function lr(e,t){return V(this,e).set(e,t),this}O.prototype.clear=or;O.prototype.delete=cr;O.prototype.get=fr;O.prototype.has=ur;O.prototype.set=lr;function j(e){this.__data__=new _(e)}function pr(){this.__data__=new _}function hr(e){return this.__data__.delete(e)}function gr(e){return this.__data__.get(e)}function dr(e){return this.__data__.has(e)}function br(e,t){var r=this.__data__;if(r instanceof _){var n=r.__data__;if(!D||n.length<vt-1)return n.push([e,t]),this;r=this.__data__=new O(n)}return r.set(e,t),this}j.prototype.clear=pr;j.prototype.delete=hr;j.prototype.get=gr;j.prototype.has=dr;j.prototype.set=br;function yr(e,t){var r=se(e)||Kr(e)?Rt(e.length,String):[],n=r.length,a=!!n;for(var s in e)(t||w.call(e,s))&&!(a&&(s=="length"||Br(s,n)))&&r.push(s);return r}function tt(e,t,r){var n=e[t];(!(w.call(e,t)&&at(n,r))||r===void 0&&!(t in e))&&(e[t]=r)}function N(e,t){for(var r=e.length;r--;)if(at(e[r][0],t))return r;return-1}function mr(e,t){return e&&rt(t,oe(t),e)}function ee(e,t,r,n,a,s,l){var i;if(n&&(i=s?n(e,a,s,l):n(e)),i!==void 0)return i;if(!J(e))return e;var f=se(e);if(f){if(i=Pr(e),!t)return Ir(e,i)}else{var u=v(e),d=u==re||u==Me;if(Nr(e))return Tr(e,t);if(u==ne||u==te||d&&!s){if(ke(e))return s?e:{};if(i=Rr(d?{}:e),!t)return Er(e,mr(i,e))}else{if(!p[u])return s?e:{};i=Mr(e,u,ee,t)}}l||(l=new j);var o=l.get(e);if(o)return o;if(l.set(e,i),!f)var h=r?Dr(e):oe(e);return Dt(h||e,function(c,g){h&&(g=c,c=e[g]),tt(i,g,ee(c,t,r,n,g,e,l))}),i}function _r(e){return J(e)?Kt(e):{}}function wr(e,t,r){var n=t(e);return se(e)?n:Pt(n,r(e))}function vr(e){return G.call(e)}function xr(e){if(!J(e)||Fr(e))return!1;var t=ot(e)||ke(e)?Ft:Ot;return t.test(A(e))}function Ar(e){if(!it(e))return Jt(e);var t=[];for(var r in Object(e))w.call(e,r)&&r!="constructor"&&t.push(r);return t}function Tr(e,t){if(t)return e.slice();var r=new e.constructor(e.length);return e.copy(r),r}function ae(e){var t=new e.constructor(e.byteLength);return new Se(t).set(new Se(e)),t}function Cr(e,t){var r=t?ae(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}function Or(e,t,r){var n=t?r(Ae(e),!0):Ae(e);return ze(n,It,new e.constructor)}function jr(e){var t=new e.constructor(e.source,Ct.exec(e));return t.lastIndex=e.lastIndex,t}function Sr(e,t,r){var n=t?r(Te(e),!0):Te(e);return ze(n,Et,new e.constructor)}function Wr(e){return Ie?Object(Ie.call(e)):{}}function $r(e,t){var r=t?ae(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Ir(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}function rt(e,t,r,n){r||(r={});for(var a=-1,s=t.length;++a<s;){var l=t[a],i=n?n(r[l],e[l],l,r,e):void 0;tt(r,l,i===void 0?e[l]:i)}return r}function Er(e,t){return rt(e,nt(e),t)}function Dr(e){return wr(e,oe,nt)}function V(e,t){var r=e.__data__;return Lr(t)?r[typeof t=="string"?"string":"hash"]:r.map}function S(e,t){var r=Mt(e,t);return xr(r)?r:void 0}var nt=We?ie(We,Object):Qr,v=vr;(X&&v(new X(new ArrayBuffer(1)))!=H||D&&v(new D)!=L||Y&&v(Y.resolve())!=ve||z&&v(new z)!=F||k&&v(new k)!=q)&&(v=function(e){var t=G.call(e),r=t==ne?e.constructor:void 0,n=r?A(r):void 0;if(n)switch(n){case Qt:return H;case Ut:return L;case Zt:return ve;case qt:return F;case Xt:return q}return t});function Pr(e){var t=e.length,r=e.constructor(t);return t&&typeof e[0]=="string"&&w.call(e,"index")&&(r.index=e.index,r.input=e.input),r}function Rr(e){return typeof e.constructor=="function"&&!it(e)?_r(Ht(e)):{}}function Mr(e,t,r,n){var a=e.constructor;switch(t){case Ke:return ae(e);case Pe:case Re:return new a(+e);case H:return Cr(e,n);case Ge:case Ne:case Ve:case Je:case Qe:case Ue:case Ze:case qe:case Xe:return $r(e,n);case L:return Or(e,n,r);case Be:case Fe:return new a(e);case Le:return jr(e);case F:return Sr(e,n,r);case He:return Wr(e)}}function Br(e,t){return t=t==null?De:t,!!t&&(typeof e=="number"||jt.test(e))&&e>-1&&e%1==0&&e<t}function Lr(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Fr(e){return!!Ce&&Ce in e}function it(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||K;return e===r}function A(e){if(e!=null){try{return et.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function Hr(e){return ee(e,!0,!0)}function at(e,t){return e===t||e!==e&&t!==t}function Kr(e){return Gr(e)&&w.call(e,"callee")&&(!Gt.call(e,"callee")||G.call(e)==te)}var se=Array.isArray;function st(e){return e!=null&&Vr(e.length)&&!ot(e)}function Gr(e){return Jr(e)&&st(e)}var Nr=Vt||Ur;function ot(e){var t=J(e)?G.call(e):"";return t==re||t==Me}function Vr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=De}function J(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function Jr(e){return!!e&&typeof e=="object"}function oe(e){return st(e)?yr(e):Ar(e)}function Qr(){return[]}function Ur(){return!1}C.exports=Hr});var kr={};_t(kr,{arrayiffyString:()=>W,defaults:()=>R,flattenArr:()=>M,flattenObject:()=>U,flattenReferencing:()=>zr,version:()=>Yr});var he=we(ce(),1);function fe(e,t,r=0){if(typeof e!="string")throw new TypeError(`str-indexes-of-plus/strIndexesOfPlus(): first input argument must be a string! Currently it's: ${typeof e}`);if(typeof t!="string")throw new TypeError(`str-indexes-of-plus/strIndexesOfPlus(): second input argument must be a string! Currently it's: ${typeof t}`);if(isNaN(+r)||typeof r=="string"&&!/^\d*$/.test(r))throw new TypeError(`str-indexes-of-plus/strIndexesOfPlus(): third input argument must be a natural number! Currently it's: ${r}`);let n=Array.from(e),a=Array.from(t);if(n.length===0||a.length===0||r!=null&&+r>=n.length)return[];r||(r=0);let s=[],l=!1,i;for(let f=r,u=n.length;f<u;f++)l&&(n[f]===a[f-+i]?f-+i+1===a.length&&s.push(+i):(i=null,l=!1)),l||n[f]===a[0]&&(a.length===1?s.push(f):(l=!0,i=f));return s}function ue(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var le=new Map,ct=(e,t)=>{if(!Array.isArray(e))switch(typeof e){case"string":e=[e];break;case"undefined":e=[];break;default:throw new TypeError(`Expected '${t}' to be a string or an array, but got a type of '${typeof e}'`)}return e.filter(r=>{if(typeof r!="string"){if(typeof r>"u")return!1;throw new TypeError(`Expected '${t}' to be an array of strings, but found a type of '${typeof r}' in the array`)}return!0})},Zr=(e,t)=>{t=y({caseSensitive:!1},t);let r=e+JSON.stringify(t);if(le.has(r))return le.get(r);let n=e[0]==="!";n&&(e=e.slice(1)),e=ue(e).replace(/\\\*/g,"[\\s\\S]*");let a=new RegExp(`^${e}$`,t.caseSensitive?"":"i");return a.negated=n,le.set(r,a),a},qr=(e,t,r,n)=>{if(e=ct(e,"inputs"),t=ct(t,"patterns"),t.length===0)return[];t=t.map(l=>Zr(l,r));let{allPatterns:a}=r||{},s=[];for(let l of e){let i,f=[...t].fill(!1);for(let[u,d]of t.entries())if(d.test(l)&&(f[u]=!0,i=!d.negated,!i))break;if(!(i===!1||i===void 0&&t.some(u=>!u.negated)||a&&f.some((u,d)=>!u&&!t[d].negated))&&(s.push(l),n))break}return s};function ft(e,t,r){return qr(e,t,r,!0).length>0}function T(e){if(e==null||typeof e!="object")return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null?!1:!(Symbol.iterator in e)&&!(Symbol.toStringTag in e)}var pe=we(ce(),1);var R={wrapHeadsWith:"%%_",wrapTailsWith:"_%%",dontWrapKeys:[],dontWrapPaths:[],xhtml:!0,preventDoubleWrapping:!0,preventWrappingIfContains:[],objectKeyAndValueJoinChar:".",wrapGlobalFlipSwitch:!0,ignore:[],whatToDoWhenReferenceIsMissing:0,mergeArraysWithLineBreaks:!0,mergeWithoutTrailingBrIfLineContainsBr:!0,enforceStrictKeyset:!0};function Q(e){return typeof e=="string"}function U(e,t){let r=y(y({},R),t);if(arguments.length===0||Object.keys(e).length===0)return[];let n=(0,pe.default)(e),a=[];return T(n)&&Object.keys(n).forEach(s=>{T(n[s])&&(n[s]=U(n[s],r)),Array.isArray(n[s])&&(a=a.concat(n[s].map(l=>`${s}${r.objectKeyAndValueJoinChar}${l}`))),Q(n[s])&&a.push(`${s}${r.objectKeyAndValueJoinChar}${n[s]}`)}),a}function M(e,t,r=!1,n=!1){let a=y(y({},R),t);if(arguments.length===0||e.length===0)return"";let s=(0,pe.default)(e),l="";if(s.length)if(n){for(let i=0,f=s.length;i<f;i++)if(Q(s[i])){let u;u="",a.mergeArraysWithLineBreaks&&i>0&&(!a.mergeWithoutTrailingBrIfLineContainsBr||typeof s[i-1]!="string"||a.mergeWithoutTrailingBrIfLineContainsBr&&s[i-1]!==void 0&&!s[i-1].toLowerCase().includes("<br"))&&(u=`<br${a.xhtml?" /":""}>`),l+=`${u}${r?a.wrapHeadsWith:""}${s[i]}${r?a.wrapTailsWith:""}`}else if(Array.isArray(s[i])&&s[i].length&&s[i].every(Q)){let u="";a.mergeArraysWithLineBreaks&&l.length&&(u=`<br${a.xhtml?" /":""}>`),l=s[i].reduce((d,o,h,c)=>{let g="";return h!==c.length-1&&(g=" "),d+(h===0?u:"")+(r?a.wrapHeadsWith:"")+o+(r?a.wrapTailsWith:"")+g},l)}}else l=s.reduce((i,f,u,d)=>{let o="";a.mergeArraysWithLineBreaks&&u>0&&(o=`<br${a.xhtml?" /":""}>`);let h="";return u!==d.length-1&&(h=" "),`${i}${u===0?o:""}${r?a.wrapHeadsWith:""}${f}${r?a.wrapTailsWith:""}${h}`},l);return l}function W(e){return Q(e)?e.length?[e]:[]:e}var ut="7.0.7";var Yr=ut;function B(e){return e!=null}function $(e){return typeof e=="string"}function zr(e,t,r){if(arguments.length===0)throw new Error("object-flatten-referencing/ofr(): [THROW_ID_01] all inputs missing!");if(arguments.length===1)throw new Error("object-flatten-referencing/ofr(): [THROW_ID_02] resolvedReference object missing!");if(B(r)&&!T(r))throw new Error(`object-flatten-referencing/ofr(): [THROW_ID_03] third resolvedInput, options object must be a plain object. Currently it's: ${typeof r}`);let n=y(y({},R),r);n.dontWrapKeys=W(n.dontWrapKeys),n.preventWrappingIfContains=W(n.preventWrappingIfContains),n.dontWrapPaths=W(n.dontWrapPaths),n.ignore=W(n.ignore),typeof n.whatToDoWhenReferenceIsMissing!="number"&&(n.whatToDoWhenReferenceIsMissing=+n.whatToDoWhenReferenceIsMissing||0);function a(s,l,i,f=!0,u=!0,d=""){let o=(0,he.default)(s),h=(0,he.default)(l);return i.wrapGlobalFlipSwitch||(f=!1),T(o)?Object.keys(o).forEach(c=>{let g=d+(d.length===0?c:`.${c}`);if(i.ignore.length===0||!i.ignore.includes(c)){if(i.wrapGlobalFlipSwitch&&(f=!0,i.dontWrapKeys.length&&(f=f&&!i.dontWrapKeys.some(b=>ft(c,b,{caseSensitive:!0}))),i.dontWrapPaths.length&&(f=f&&!i.dontWrapPaths.some(b=>b===g)),i.preventWrappingIfContains.length&&typeof o[c]=="string"&&(f=f&&!i.preventWrappingIfContains.some(b=>o[c].includes(b)))),B(h[c])||!B(h[c])&&i.whatToDoWhenReferenceIsMissing===2)if(Array.isArray(o[c]))if(i.whatToDoWhenReferenceIsMissing===2||$(h[c]))o[c]=M(o[c],i,f,u);else{if(o[c].every(b=>typeof b=="string"||Array.isArray(b))){let b=!0;o[c].forEach(ge=>{Array.isArray(ge)&&!ge.every($)&&(b=!1)}),b&&(u=!1)}o[c]=a(o[c],h[c],i,f,u,g)}else T(o[c])?i.whatToDoWhenReferenceIsMissing===2||$(h[c])?o[c]=M(U(o[c],i),i,f,u):f?o[c]=a(o[c],h[c],i,f,u,g):o[c]=a(o[c],h[c],me(y({},i),{wrapGlobalFlipSwitch:!1}),f,u,g):$(o[c])&&(o[c]=a(o[c],h[c],i,f,u,g));else if(typeof o[c]!=typeof h[c]&&i.whatToDoWhenReferenceIsMissing===1)throw new Error(`object-flatten-referencing/ofr(): [THROW_ID_06] resolvedReference object does not have the key ${c} and we need it. TIP: Turn off throwing via opts2.whatToDoWhenReferenceIsMissing.`)}}):Array.isArray(o)?Array.isArray(h)?o.forEach((c,g)=>{B(o[g])&&B(h[g])?o[g]=a(o[g],h[g],i,f,u,`${d}[${g}]`):o[g]=a(o[g],h[0],i,f,u,`${d}[${g}]`)}):$(h)&&(o=M(o,i,f,u)):$(o)&&o.length&&(i.wrapHeadsWith||i.wrapTailsWith)&&(!i.preventDoubleWrapping||(i.wrapHeadsWith===""||!fe(o,i.wrapHeadsWith.trim()).length)&&(i.wrapTailsWith===""||!fe(o,i.wrapTailsWith.trim()).length))&&(o=`${f?i.wrapHeadsWith:""}${o}${f?i.wrapTailsWith:""}`),o}return a(e,t,n)}return wt(kr);})();
11
11
  /**
12
12
  * @name str-indexes-of-plus
13
13
  * @fileoverview Like indexOf but returns array and counts per-grapheme
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "object-flatten-referencing",
3
- "version": "7.0.6",
3
+ "version": "7.0.7",
4
4
  "description": "Flatten complex nested objects according to a reference objects",
5
5
  "keywords": [
6
6
  "advanced",