Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@candulabs/core

Package Overview
Dependencies
Maintainers
5
Versions
156
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@candulabs/core - npm Package Compare versions

Comparing version 0.5.2 to 0.5.4

16

CHANGELOG.md

@@ -6,2 +6,18 @@ # Change Log

## [0.5.4](https://github.com/candulabs/candu-sdk/tree/master/packages/candu-core/compare/v0.5.3...v0.5.4) (2020-10-11)
**Note:** Version bump only for package @candulabs/core
## [0.5.3](https://github.com/candulabs/candu-sdk/tree/master/packages/candu-core/compare/v0.5.2...v0.5.3) (2020-10-11)
**Note:** Version bump only for package @candulabs/core
## [0.5.2](https://github.com/candulabs/candu-sdk/tree/master/packages/candu-core/compare/v0.5.1...v0.5.2) (2020-10-09)

@@ -8,0 +24,0 @@

17

dist/index.cjs.js

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

"use strict";function _interopDefault(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var util=require("util"),crypto=_interopDefault(require("crypto")),commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function createCommonjsModule(e,t){return e(t={exports:{}},t.exports),t.exports}var freeGlobal="object"==typeof commonjsGlobal&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,_freeGlobal=freeGlobal,freeSelf="object"==typeof self&&self&&self.Object===Object&&self,root=_freeGlobal||freeSelf||Function("return this")(),_root=root,Symbol=_root.Symbol,_Symbol=Symbol,objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty,nativeObjectToString=objectProto.toString,symToStringTag=_Symbol?_Symbol.toStringTag:void 0;function getRawTag(e){var t=hasOwnProperty.call(e,symToStringTag),r=e[symToStringTag];try{e[symToStringTag]=void 0;var a=!0}catch(e){}var o=nativeObjectToString.call(e);return a&&(t?e[symToStringTag]=r:delete e[symToStringTag]),o}var _getRawTag=getRawTag,objectProto$1=Object.prototype,nativeObjectToString$1=objectProto$1.toString;function objectToString(e){return nativeObjectToString$1.call(e)}var _objectToString=objectToString,nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag$1=_Symbol?_Symbol.toStringTag:void 0;function baseGetTag(e){return null==e?void 0===e?undefinedTag:nullTag:symToStringTag$1&&symToStringTag$1 in Object(e)?_getRawTag(e):_objectToString(e)}var _baseGetTag=baseGetTag;function isObject(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var isObject_1=isObject,asyncTag="[object AsyncFunction]",funcTag="[object Function]",genTag="[object GeneratorFunction]",proxyTag="[object Proxy]";function isFunction(e){if(!isObject_1(e))return!1;var t=_baseGetTag(e);return t==funcTag||t==genTag||t==asyncTag||t==proxyTag}var isFunction_1=isFunction,coreJsData=_root["__core-js_shared__"],_coreJsData=coreJsData,maskSrcKey=function(){var e=/[^.]+$/.exec(_coreJsData&&_coreJsData.keys&&_coreJsData.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function isMasked(e){return!!maskSrcKey&&maskSrcKey in e}var _isMasked=isMasked,funcProto=Function.prototype,funcToString=funcProto.toString;function toSource(e){if(null!=e){try{return funcToString.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var _toSource=toSource,reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reIsHostCtor=/^\[object .+?Constructor\]$/,funcProto$1=Function.prototype,objectProto$2=Object.prototype,funcToString$1=funcProto$1.toString,hasOwnProperty$1=objectProto$2.hasOwnProperty,reIsNative=RegExp("^"+funcToString$1.call(hasOwnProperty$1).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function baseIsNative(e){return!(!isObject_1(e)||_isMasked(e))&&(isFunction_1(e)?reIsNative:reIsHostCtor).test(_toSource(e))}var _baseIsNative=baseIsNative;function getValue(e,t){return null==e?void 0:e[t]}var _getValue=getValue;function getNative(e,t){var r=_getValue(e,t);return _baseIsNative(r)?r:void 0}var _getNative=getNative,defineProperty=function(){try{var e=_getNative(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),_defineProperty=defineProperty;function baseAssignValue(e,t,r){"__proto__"==t&&_defineProperty?_defineProperty(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var _baseAssignValue=baseAssignValue;function createBaseFor(e){return function(t,r,a){for(var o=-1,n=Object(t),i=a(t),s=i.length;s--;){var c=i[e?s:++o];if(!1===r(n[c],c,n))break}return t}}var _createBaseFor=createBaseFor,baseFor=_createBaseFor(),_baseFor=baseFor;function baseTimes(e,t){for(var r=-1,a=Array(e);++r<e;)a[r]=t(r);return a}var _baseTimes=baseTimes;function isObjectLike(e){return null!=e&&"object"==typeof e}var isObjectLike_1=isObjectLike,argsTag="[object Arguments]";function baseIsArguments(e){return isObjectLike_1(e)&&_baseGetTag(e)==argsTag}var _baseIsArguments=baseIsArguments,objectProto$3=Object.prototype,hasOwnProperty$2=objectProto$3.hasOwnProperty,propertyIsEnumerable=objectProto$3.propertyIsEnumerable,isArguments=_baseIsArguments(function(){return arguments}())?_baseIsArguments:function(e){return isObjectLike_1(e)&&hasOwnProperty$2.call(e,"callee")&&!propertyIsEnumerable.call(e,"callee")},isArguments_1=isArguments,isArray=Array.isArray,isArray_1=isArray;function stubFalse(){return!1}var stubFalse_1=stubFalse,isBuffer_1=createCommonjsModule((function(e,t){var r=t&&!t.nodeType&&t,a=r&&e&&!e.nodeType&&e,o=a&&a.exports===r?_root.Buffer:void 0,n=(o?o.isBuffer:void 0)||stubFalse_1;e.exports=n})),MAX_SAFE_INTEGER=9007199254740991,reIsUint=/^(?:0|[1-9]\d*)$/;function isIndex(e,t){var r=typeof e;return!!(t=null==t?MAX_SAFE_INTEGER:t)&&("number"==r||"symbol"!=r&&reIsUint.test(e))&&e>-1&&e%1==0&&e<t}var _isIndex=isIndex,MAX_SAFE_INTEGER$1=9007199254740991;function isLength(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=MAX_SAFE_INTEGER$1}var isLength_1=isLength,argsTag$1="[object Arguments]",arrayTag="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag$1="[object Function]",mapTag="[object Map]",numberTag="[object Number]",objectTag="[object Object]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",weakMapTag="[object WeakMap]",arrayBufferTag="[object ArrayBuffer]",dataViewTag="[object DataView]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]",typedArrayTags={};function baseIsTypedArray(e){return isObjectLike_1(e)&&isLength_1(e.length)&&!!typedArrayTags[_baseGetTag(e)]}typedArrayTags[float32Tag]=typedArrayTags[float64Tag]=typedArrayTags[int8Tag]=typedArrayTags[int16Tag]=typedArrayTags[int32Tag]=typedArrayTags[uint8Tag]=typedArrayTags[uint8ClampedTag]=typedArrayTags[uint16Tag]=typedArrayTags[uint32Tag]=!0,typedArrayTags[argsTag$1]=typedArrayTags[arrayTag]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dataViewTag]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag$1]=typedArrayTags[mapTag]=typedArrayTags[numberTag]=typedArrayTags[objectTag]=typedArrayTags[regexpTag]=typedArrayTags[setTag]=typedArrayTags[stringTag]=typedArrayTags[weakMapTag]=!1;var _baseIsTypedArray=baseIsTypedArray;function baseUnary(e){return function(t){return e(t)}}var _baseUnary=baseUnary,_nodeUtil=createCommonjsModule((function(e,t){var r=t&&!t.nodeType&&t,a=r&&e&&!e.nodeType&&e,o=a&&a.exports===r&&_freeGlobal.process,n=function(){try{var e=a&&a.require&&a.require("util").types;return e||o&&o.binding&&o.binding("util")}catch(e){}}();e.exports=n})),nodeIsTypedArray=_nodeUtil&&_nodeUtil.isTypedArray,isTypedArray=nodeIsTypedArray?_baseUnary(nodeIsTypedArray):_baseIsTypedArray,isTypedArray_1=isTypedArray,objectProto$4=Object.prototype,hasOwnProperty$3=objectProto$4.hasOwnProperty;function arrayLikeKeys(e,t){var r=isArray_1(e),a=!r&&isArguments_1(e),o=!r&&!a&&isBuffer_1(e),n=!r&&!a&&!o&&isTypedArray_1(e),i=r||a||o||n,s=i?_baseTimes(e.length,String):[],c=s.length;for(var _ in e)!t&&!hasOwnProperty$3.call(e,_)||i&&("length"==_||o&&("offset"==_||"parent"==_)||n&&("buffer"==_||"byteLength"==_||"byteOffset"==_)||_isIndex(_,c))||s.push(_);return s}var _arrayLikeKeys=arrayLikeKeys,objectProto$5=Object.prototype;function isPrototype(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||objectProto$5)}var _isPrototype=isPrototype;function overArg(e,t){return function(r){return e(t(r))}}var _overArg=overArg,nativeKeys=_overArg(Object.keys,Object),_nativeKeys=nativeKeys,objectProto$6=Object.prototype,hasOwnProperty$4=objectProto$6.hasOwnProperty;function baseKeys(e){if(!_isPrototype(e))return _nativeKeys(e);var t=[];for(var r in Object(e))hasOwnProperty$4.call(e,r)&&"constructor"!=r&&t.push(r);return t}var _baseKeys=baseKeys;function isArrayLike(e){return null!=e&&isLength_1(e.length)&&!isFunction_1(e)}var isArrayLike_1=isArrayLike;function keys(e){return isArrayLike_1(e)?_arrayLikeKeys(e):_baseKeys(e)}var keys_1=keys;function baseForOwn(e,t){return e&&_baseFor(e,t,keys_1)}var _baseForOwn=baseForOwn;function listCacheClear(){this.__data__=[],this.size=0}var _listCacheClear=listCacheClear;function eq(e,t){return e===t||e!=e&&t!=t}var eq_1=eq;function assocIndexOf(e,t){for(var r=e.length;r--;)if(eq_1(e[r][0],t))return r;return-1}var _assocIndexOf=assocIndexOf,arrayProto=Array.prototype,splice=arrayProto.splice;function listCacheDelete(e){var t=this.__data__,r=_assocIndexOf(t,e);return!(r<0)&&(r==t.length-1?t.pop():splice.call(t,r,1),--this.size,!0)}var _listCacheDelete=listCacheDelete;function listCacheGet(e){var t=this.__data__,r=_assocIndexOf(t,e);return r<0?void 0:t[r][1]}var _listCacheGet=listCacheGet;function listCacheHas(e){return _assocIndexOf(this.__data__,e)>-1}var _listCacheHas=listCacheHas;function listCacheSet(e,t){var r=this.__data__,a=_assocIndexOf(r,e);return a<0?(++this.size,r.push([e,t])):r[a][1]=t,this}var _listCacheSet=listCacheSet;function ListCache(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var a=e[t];this.set(a[0],a[1])}}ListCache.prototype.clear=_listCacheClear,ListCache.prototype.delete=_listCacheDelete,ListCache.prototype.get=_listCacheGet,ListCache.prototype.has=_listCacheHas,ListCache.prototype.set=_listCacheSet;var _ListCache=ListCache;function stackClear(){this.__data__=new _ListCache,this.size=0}var _stackClear=stackClear;function stackDelete(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var _stackDelete=stackDelete;function stackGet(e){return this.__data__.get(e)}var _stackGet=stackGet;function stackHas(e){return this.__data__.has(e)}var _stackHas=stackHas,Map=_getNative(_root,"Map"),_Map=Map,nativeCreate=_getNative(Object,"create"),_nativeCreate=nativeCreate;function hashClear(){this.__data__=_nativeCreate?_nativeCreate(null):{},this.size=0}var _hashClear=hashClear;function hashDelete(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var _hashDelete=hashDelete,HASH_UNDEFINED="__lodash_hash_undefined__",objectProto$7=Object.prototype,hasOwnProperty$5=objectProto$7.hasOwnProperty;function hashGet(e){var t=this.__data__;if(_nativeCreate){var r=t[e];return r===HASH_UNDEFINED?void 0:r}return hasOwnProperty$5.call(t,e)?t[e]:void 0}var _hashGet=hashGet,objectProto$8=Object.prototype,hasOwnProperty$6=objectProto$8.hasOwnProperty;function hashHas(e){var t=this.__data__;return _nativeCreate?void 0!==t[e]:hasOwnProperty$6.call(t,e)}var _hashHas=hashHas,HASH_UNDEFINED$1="__lodash_hash_undefined__";function hashSet(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=_nativeCreate&&void 0===t?HASH_UNDEFINED$1:t,this}var _hashSet=hashSet;function Hash(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var a=e[t];this.set(a[0],a[1])}}Hash.prototype.clear=_hashClear,Hash.prototype.delete=_hashDelete,Hash.prototype.get=_hashGet,Hash.prototype.has=_hashHas,Hash.prototype.set=_hashSet;var _Hash=Hash;function mapCacheClear(){this.size=0,this.__data__={hash:new _Hash,map:new(_Map||_ListCache),string:new _Hash}}var _mapCacheClear=mapCacheClear;function isKeyable(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}var _isKeyable=isKeyable;function getMapData(e,t){var r=e.__data__;return _isKeyable(t)?r["string"==typeof t?"string":"hash"]:r.map}var _getMapData=getMapData;function mapCacheDelete(e){var t=_getMapData(this,e).delete(e);return this.size-=t?1:0,t}var _mapCacheDelete=mapCacheDelete;function mapCacheGet(e){return _getMapData(this,e).get(e)}var _mapCacheGet=mapCacheGet;function mapCacheHas(e){return _getMapData(this,e).has(e)}var _mapCacheHas=mapCacheHas;function mapCacheSet(e,t){var r=_getMapData(this,e),a=r.size;return r.set(e,t),this.size+=r.size==a?0:1,this}var _mapCacheSet=mapCacheSet;function MapCache(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var a=e[t];this.set(a[0],a[1])}}MapCache.prototype.clear=_mapCacheClear,MapCache.prototype.delete=_mapCacheDelete,MapCache.prototype.get=_mapCacheGet,MapCache.prototype.has=_mapCacheHas,MapCache.prototype.set=_mapCacheSet;var _MapCache=MapCache,LARGE_ARRAY_SIZE=200;function stackSet(e,t){var r=this.__data__;if(r instanceof _ListCache){var a=r.__data__;if(!_Map||a.length<LARGE_ARRAY_SIZE-1)return a.push([e,t]),this.size=++r.size,this;r=this.__data__=new _MapCache(a)}return r.set(e,t),this.size=r.size,this}var _stackSet=stackSet;function Stack(e){var t=this.__data__=new _ListCache(e);this.size=t.size}Stack.prototype.clear=_stackClear,Stack.prototype.delete=_stackDelete,Stack.prototype.get=_stackGet,Stack.prototype.has=_stackHas,Stack.prototype.set=_stackSet;var _Stack=Stack,HASH_UNDEFINED$2="__lodash_hash_undefined__";function setCacheAdd(e){return this.__data__.set(e,HASH_UNDEFINED$2),this}var _setCacheAdd=setCacheAdd;function setCacheHas(e){return this.__data__.has(e)}var _setCacheHas=setCacheHas;function SetCache(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new _MapCache;++t<r;)this.add(e[t])}SetCache.prototype.add=SetCache.prototype.push=_setCacheAdd,SetCache.prototype.has=_setCacheHas;var _SetCache=SetCache;function arraySome(e,t){for(var r=-1,a=null==e?0:e.length;++r<a;)if(t(e[r],r,e))return!0;return!1}var _arraySome=arraySome;function cacheHas(e,t){return e.has(t)}var _cacheHas=cacheHas,COMPARE_PARTIAL_FLAG=1,COMPARE_UNORDERED_FLAG=2;function equalArrays(e,t,r,a,o,n){var i=r&COMPARE_PARTIAL_FLAG,s=e.length,c=t.length;if(s!=c&&!(i&&c>s))return!1;var _=n.get(e);if(_&&n.get(t))return _==t;var u=-1,l=!0,g=r&COMPARE_UNORDERED_FLAG?new _SetCache:void 0;for(n.set(e,t),n.set(t,e);++u<s;){var y=e[u],p=t[u];if(a)var d=i?a(p,y,u,t,e,n):a(y,p,u,e,t,n);if(void 0!==d){if(d)continue;l=!1;break}if(g){if(!_arraySome(t,(function(e,t){if(!_cacheHas(g,t)&&(y===e||o(y,e,r,a,n)))return g.push(t)}))){l=!1;break}}else if(y!==p&&!o(y,p,r,a,n)){l=!1;break}}return n.delete(e),n.delete(t),l}var _equalArrays=equalArrays,Uint8Array=_root.Uint8Array,_Uint8Array=Uint8Array;function mapToArray(e){var t=-1,r=Array(e.size);return e.forEach((function(e,a){r[++t]=[a,e]})),r}var _mapToArray=mapToArray;function setToArray(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}var _setToArray=setToArray,COMPARE_PARTIAL_FLAG$1=1,COMPARE_UNORDERED_FLAG$1=2,boolTag$1="[object Boolean]",dateTag$1="[object Date]",errorTag$1="[object Error]",mapTag$1="[object Map]",numberTag$1="[object Number]",regexpTag$1="[object RegExp]",setTag$1="[object Set]",stringTag$1="[object String]",symbolTag="[object Symbol]",arrayBufferTag$1="[object ArrayBuffer]",dataViewTag$1="[object DataView]",symbolProto=_Symbol?_Symbol.prototype:void 0,symbolValueOf=symbolProto?symbolProto.valueOf:void 0;function equalByTag(e,t,r,a,o,n,i){switch(r){case dataViewTag$1:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case arrayBufferTag$1:return!(e.byteLength!=t.byteLength||!n(new _Uint8Array(e),new _Uint8Array(t)));case boolTag$1:case dateTag$1:case numberTag$1:return eq_1(+e,+t);case errorTag$1:return e.name==t.name&&e.message==t.message;case regexpTag$1:case stringTag$1:return e==t+"";case mapTag$1:var s=_mapToArray;case setTag$1:var c=a&COMPARE_PARTIAL_FLAG$1;if(s||(s=_setToArray),e.size!=t.size&&!c)return!1;var _=i.get(e);if(_)return _==t;a|=COMPARE_UNORDERED_FLAG$1,i.set(e,t);var u=_equalArrays(s(e),s(t),a,o,n,i);return i.delete(e),u;case symbolTag:if(symbolValueOf)return symbolValueOf.call(e)==symbolValueOf.call(t)}return!1}var _equalByTag=equalByTag;function arrayPush(e,t){for(var r=-1,a=t.length,o=e.length;++r<a;)e[o+r]=t[r];return e}var _arrayPush=arrayPush;function baseGetAllKeys(e,t,r){var a=t(e);return isArray_1(e)?a:_arrayPush(a,r(e))}var _baseGetAllKeys=baseGetAllKeys;function arrayFilter(e,t){for(var r=-1,a=null==e?0:e.length,o=0,n=[];++r<a;){var i=e[r];t(i,r,e)&&(n[o++]=i)}return n}var _arrayFilter=arrayFilter;function stubArray(){return[]}var stubArray_1=stubArray,objectProto$9=Object.prototype,propertyIsEnumerable$1=objectProto$9.propertyIsEnumerable,nativeGetSymbols=Object.getOwnPropertySymbols,getSymbols=nativeGetSymbols?function(e){return null==e?[]:(e=Object(e),_arrayFilter(nativeGetSymbols(e),(function(t){return propertyIsEnumerable$1.call(e,t)})))}:stubArray_1,_getSymbols=getSymbols;function getAllKeys(e){return _baseGetAllKeys(e,keys_1,_getSymbols)}var _getAllKeys=getAllKeys,COMPARE_PARTIAL_FLAG$2=1,objectProto$a=Object.prototype,hasOwnProperty$7=objectProto$a.hasOwnProperty;function equalObjects(e,t,r,a,o,n){var i=r&COMPARE_PARTIAL_FLAG$2,s=_getAllKeys(e),c=s.length;if(c!=_getAllKeys(t).length&&!i)return!1;for(var _=c;_--;){var u=s[_];if(!(i?u in t:hasOwnProperty$7.call(t,u)))return!1}var l=n.get(e);if(l&&n.get(t))return l==t;var g=!0;n.set(e,t),n.set(t,e);for(var y=i;++_<c;){var p=e[u=s[_]],d=t[u];if(a)var T=i?a(d,p,u,t,e,n):a(p,d,u,e,t,n);if(!(void 0===T?p===d||o(p,d,r,a,n):T)){g=!1;break}y||(y="constructor"==u)}if(g&&!y){var E=e.constructor,b=t.constructor;E!=b&&"constructor"in e&&"constructor"in t&&!("function"==typeof E&&E instanceof E&&"function"==typeof b&&b instanceof b)&&(g=!1)}return n.delete(e),n.delete(t),g}var _equalObjects=equalObjects,DataView=_getNative(_root,"DataView"),_DataView=DataView,Promise$1=_getNative(_root,"Promise"),_Promise=Promise$1,Set=_getNative(_root,"Set"),_Set=Set,WeakMap=_getNative(_root,"WeakMap"),_WeakMap=WeakMap,mapTag$2="[object Map]",objectTag$1="[object Object]",promiseTag="[object Promise]",setTag$2="[object Set]",weakMapTag$1="[object WeakMap]",dataViewTag$2="[object DataView]",dataViewCtorString=_toSource(_DataView),mapCtorString=_toSource(_Map),promiseCtorString=_toSource(_Promise),setCtorString=_toSource(_Set),weakMapCtorString=_toSource(_WeakMap),getTag=_baseGetTag;(_DataView&&getTag(new _DataView(new ArrayBuffer(1)))!=dataViewTag$2||_Map&&getTag(new _Map)!=mapTag$2||_Promise&&getTag(_Promise.resolve())!=promiseTag||_Set&&getTag(new _Set)!=setTag$2||_WeakMap&&getTag(new _WeakMap)!=weakMapTag$1)&&(getTag=function(e){var t=_baseGetTag(e),r=t==objectTag$1?e.constructor:void 0,a=r?_toSource(r):"";if(a)switch(a){case dataViewCtorString:return dataViewTag$2;case mapCtorString:return mapTag$2;case promiseCtorString:return promiseTag;case setCtorString:return setTag$2;case weakMapCtorString:return weakMapTag$1}return t});var _getTag=getTag,COMPARE_PARTIAL_FLAG$3=1,argsTag$2="[object Arguments]",arrayTag$1="[object Array]",objectTag$2="[object Object]",objectProto$b=Object.prototype,hasOwnProperty$8=objectProto$b.hasOwnProperty;function baseIsEqualDeep(e,t,r,a,o,n){var i=isArray_1(e),s=isArray_1(t),c=i?arrayTag$1:_getTag(e),_=s?arrayTag$1:_getTag(t),u=(c=c==argsTag$2?objectTag$2:c)==objectTag$2,l=(_=_==argsTag$2?objectTag$2:_)==objectTag$2,g=c==_;if(g&&isBuffer_1(e)){if(!isBuffer_1(t))return!1;i=!0,u=!1}if(g&&!u)return n||(n=new _Stack),i||isTypedArray_1(e)?_equalArrays(e,t,r,a,o,n):_equalByTag(e,t,c,r,a,o,n);if(!(r&COMPARE_PARTIAL_FLAG$3)){var y=u&&hasOwnProperty$8.call(e,"__wrapped__"),p=l&&hasOwnProperty$8.call(t,"__wrapped__");if(y||p){var d=y?e.value():e,T=p?t.value():t;return n||(n=new _Stack),o(d,T,r,a,n)}}return!!g&&(n||(n=new _Stack),_equalObjects(e,t,r,a,o,n))}var _baseIsEqualDeep=baseIsEqualDeep;function baseIsEqual(e,t,r,a,o){return e===t||(null==e||null==t||!isObjectLike_1(e)&&!isObjectLike_1(t)?e!=e&&t!=t:_baseIsEqualDeep(e,t,r,a,baseIsEqual,o))}var _baseIsEqual=baseIsEqual,COMPARE_PARTIAL_FLAG$4=1,COMPARE_UNORDERED_FLAG$2=2;function baseIsMatch(e,t,r,a){var o=r.length,n=o,i=!a;if(null==e)return!n;for(e=Object(e);o--;){var s=r[o];if(i&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<n;){var c=(s=r[o])[0],_=e[c],u=s[1];if(i&&s[2]){if(void 0===_&&!(c in e))return!1}else{var l=new _Stack;if(a)var g=a(_,u,c,e,t,l);if(!(void 0===g?_baseIsEqual(u,_,COMPARE_PARTIAL_FLAG$4|COMPARE_UNORDERED_FLAG$2,a,l):g))return!1}}return!0}var _baseIsMatch=baseIsMatch;function isStrictComparable(e){return e==e&&!isObject_1(e)}var _isStrictComparable=isStrictComparable;function getMatchData(e){for(var t=keys_1(e),r=t.length;r--;){var a=t[r],o=e[a];t[r]=[a,o,_isStrictComparable(o)]}return t}var _getMatchData=getMatchData;function matchesStrictComparable(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}var _matchesStrictComparable=matchesStrictComparable;function baseMatches(e){var t=_getMatchData(e);return 1==t.length&&t[0][2]?_matchesStrictComparable(t[0][0],t[0][1]):function(r){return r===e||_baseIsMatch(r,e,t)}}var _baseMatches=baseMatches,symbolTag$1="[object Symbol]";function isSymbol(e){return"symbol"==typeof e||isObjectLike_1(e)&&_baseGetTag(e)==symbolTag$1}var isSymbol_1=isSymbol,reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/;function isKey(e,t){if(isArray_1(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!isSymbol_1(e))||(reIsPlainProp.test(e)||!reIsDeepProp.test(e)||null!=t&&e in Object(t))}var _isKey=isKey,FUNC_ERROR_TEXT="Expected a function";function memoize(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(FUNC_ERROR_TEXT);var r=function(){var a=arguments,o=t?t.apply(this,a):a[0],n=r.cache;if(n.has(o))return n.get(o);var i=e.apply(this,a);return r.cache=n.set(o,i)||n,i};return r.cache=new(memoize.Cache||_MapCache),r}memoize.Cache=_MapCache;var memoize_1=memoize,MAX_MEMOIZE_SIZE=500;function memoizeCapped(e){var t=memoize_1(e,(function(e){return r.size===MAX_MEMOIZE_SIZE&&r.clear(),e})),r=t.cache;return t}var _memoizeCapped=memoizeCapped,rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reEscapeChar=/\\(\\)?/g,stringToPath=_memoizeCapped((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(rePropName,(function(e,r,a,o){t.push(a?o.replace(reEscapeChar,"$1"):r||e)})),t})),_stringToPath=stringToPath;function arrayMap(e,t){for(var r=-1,a=null==e?0:e.length,o=Array(a);++r<a;)o[r]=t(e[r],r,e);return o}var _arrayMap=arrayMap,INFINITY=1/0,symbolProto$1=_Symbol?_Symbol.prototype:void 0,symbolToString=symbolProto$1?symbolProto$1.toString:void 0;function baseToString(e){if("string"==typeof e)return e;if(isArray_1(e))return _arrayMap(e,baseToString)+"";if(isSymbol_1(e))return symbolToString?symbolToString.call(e):"";var t=e+"";return"0"==t&&1/e==-INFINITY?"-0":t}var _baseToString=baseToString;function toString(e){return null==e?"":_baseToString(e)}var toString_1=toString;function castPath(e,t){return isArray_1(e)?e:_isKey(e,t)?[e]:_stringToPath(toString_1(e))}var _castPath=castPath,INFINITY$1=1/0;function toKey(e){if("string"==typeof e||isSymbol_1(e))return e;var t=e+"";return"0"==t&&1/e==-INFINITY$1?"-0":t}var _toKey=toKey;function baseGet(e,t){for(var r=0,a=(t=_castPath(t,e)).length;null!=e&&r<a;)e=e[_toKey(t[r++])];return r&&r==a?e:void 0}var _baseGet=baseGet;function get(e,t,r){var a=null==e?void 0:_baseGet(e,t);return void 0===a?r:a}var get_1=get;function baseHasIn(e,t){return null!=e&&t in Object(e)}var _baseHasIn=baseHasIn;function hasPath(e,t,r){for(var a=-1,o=(t=_castPath(t,e)).length,n=!1;++a<o;){var i=_toKey(t[a]);if(!(n=null!=e&&r(e,i)))break;e=e[i]}return n||++a!=o?n:!!(o=null==e?0:e.length)&&isLength_1(o)&&_isIndex(i,o)&&(isArray_1(e)||isArguments_1(e))}var _hasPath=hasPath;function hasIn(e,t){return null!=e&&_hasPath(e,t,_baseHasIn)}var hasIn_1=hasIn,COMPARE_PARTIAL_FLAG$5=1,COMPARE_UNORDERED_FLAG$3=2;function baseMatchesProperty(e,t){return _isKey(e)&&_isStrictComparable(t)?_matchesStrictComparable(_toKey(e),t):function(r){var a=get_1(r,e);return void 0===a&&a===t?hasIn_1(r,e):_baseIsEqual(t,a,COMPARE_PARTIAL_FLAG$5|COMPARE_UNORDERED_FLAG$3)}}var _baseMatchesProperty=baseMatchesProperty;function identity(e){return e}var identity_1=identity;function baseProperty(e){return function(t){return null==t?void 0:t[e]}}var _baseProperty=baseProperty;function basePropertyDeep(e){return function(t){return _baseGet(t,e)}}var _basePropertyDeep=basePropertyDeep;function property(e){return _isKey(e)?_baseProperty(_toKey(e)):_basePropertyDeep(e)}var property_1=property;function baseIteratee(e){return"function"==typeof e?e:null==e?identity_1:"object"==typeof e?isArray_1(e)?_baseMatchesProperty(e[0],e[1]):_baseMatches(e):property_1(e)}var _baseIteratee=baseIteratee;function mapValues(e,t){var r={};return t=_baseIteratee(t),_baseForOwn(e,(function(e,a,o){_baseAssignValue(r,a,t(e,a,o))})),r}var mapValues_1=mapValues,isUnitlessNumber={boxFlex:!0,boxFlexGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,strokeDashoffset:!0,strokeOpacity:!0,strokeWidth:!0};function prefixKey(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}var prefixes=["Webkit","ms","Moz","O"];Object.keys(isUnitlessNumber).forEach((function(e){prefixes.forEach((function(t){isUnitlessNumber[prefixKey(t,e)]=isUnitlessNumber[e]}))}));var shorthandPropertyExpansions={background:{backgroundImage:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundColor:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0}},CSSProperty={isUnitlessNumber:isUnitlessNumber,shorthandPropertyExpansions:shorthandPropertyExpansions},CSSProperty_1=CSSProperty;const unpackShorthandStyles=e=>{const{padding:t,margin:r,...a}=e.css;let o={};return t&&(o={paddingRight:t,paddingLeft:t,paddingBottom:t,paddingTop:t}),r&&(o={...o,marginRight:r,marginLeft:r,marginBottom:r,marginTop:r}),{...e,css:{...o,...a}}},convertStyleNumberValues=e=>{const t=e.css,r={};return Object.entries(t).forEach(([e,t])=>{if(util.isNumber(t))return CSSProperty_1.isUnitlessNumber[e]?void(r[e]=`${t}`):void(r[e]=`${t}px`);r[e]=t}),{...e,css:r}},typographyNode=e=>{const t=get_1(e,"data.custom.variant","P");return{...e,type:t}},normalizeFlexBasis=e=>{const{flexBasis:t}=e.css;return"0"===t||"0px"===t?{...e,css:{...e.css,flexBasis:"0%"}}:e},adaptCustomNodes=e=>mapValues_1(e,e=>{let t=e;return"Typography"===t.type&&(t=typographyNode(t)),t.css&&isObject_1(t.css)&&t.css.flexBasis&&(t=normalizeFlexBasis(t)),t.css&&(t=unpackShorthandStyles(t),t=convertStyleNumberValues(t)),t}),eventPrefix=e=>`candu.sdk.${e}`,errorPrefix=e=>eventPrefix(`error.${e}`),ERROR_SLUGS={UNKOWN_NODE_TYPE:"unknown_node_type",UNKOWN_BLOCK_NODE_TYPE:"unkown_block_node_type",UNKOWN_INLINE_NODE_TYPE:"unkown_inline_node_type",UNKOWN_NODE_OBJECT_TYPE:"unkown_node_object_type",TUTORIAL_ERROR:"tutorial_error_boundary",PORTAL_ERROR:"portal_error_boundary",STYLEGUIDE_MAP_ERROR:"styleguide_map",RENDER_NODE_ERROR:"render_node"},EVENT_NAMES={HEARTBEAT:eventPrefix("heartbeat"),PREVIEW_OPEN:eventPrefix("preview.open"),PORTAL:eventPrefix("portal"),TUTORIAL:eventPrefix("tutorial"),TUTORIAL_INTERACTION:eventPrefix("tutorial.interaction"),PORTAL_ASSET_NOT_FOUND:errorPrefix("portal_asset_not_found"),PORTAL_NO_SEGMENT_IDS:errorPrefix("portal_no_segment_ids"),NO_MATCHING_TUTORIALS:errorPrefix("no_matching_tutorials"),NO_VALID_TUTORIAL_IDENTIFIER:errorPrefix("no_valid_tutorial_identifier"),COMMIT_API_LOADING_ERROR:errorPrefix("commit_api"),TUTORIAL_LOADING_ERROR:errorPrefix("tutorial"),UNKOWN_NODE_TYPE:errorPrefix(ERROR_SLUGS.UNKOWN_NODE_TYPE),UNKOWN_INLINE_NODE_TYPE:errorPrefix(ERROR_SLUGS.UNKOWN_INLINE_NODE_TYPE),UNKOWN_NODE_OBJECT_TYPE:errorPrefix(ERROR_SLUGS.UNKOWN_NODE_OBJECT_TYPE),TUTORIAL_ERROR:errorPrefix(ERROR_SLUGS.TUTORIAL_ERROR),PORTAL_ERROR:errorPrefix(ERROR_SLUGS.PORTAL_ERROR),STYLEGUIDE_MAP_ERROR:errorPrefix(ERROR_SLUGS.TUTORIAL_ERROR),RENDER_NODE_ERROR:errorPrefix(ERROR_SLUGS.TUTORIAL_ERROR),CIRCULAR_DEPENDENCY_EMBED_PORTAL:errorPrefix("circular_dependecy_embed_portal"),CIRCULAR_DEPENDENCY_EMBED_TUTORIAL:errorPrefix("circular_dependecy_embed_tutorial")},PORTAL_ASSET_NOT_FOUND="Could not find the requested Portal. This could happen because:\n1. The Portal does not exist or it was deleted.\n2. The Portal has not been made avaliable to be rendered.\n3. CORS Authenticaton failed.\nSee http://udn.ac/portal-not-found for more information.\n",unknownMessage=e=>`An error has occured while trying to parse your Tutorial.\nUpgrade the SDK to the latest version to get rid of this error.\nErrorCode: ${e}.`,EVENTING_NOT_INITIALIZED="You tried to send an event, but you haven't initialized eventing.\nThis is happening because you called eventing outside the scope of the CanduProvider. It can be fixed by:\n1. Adding CanduProvider to the root of the application.\n2. Initializing a new Eventing object outside of Candu.\nRead here for more context: http://udn.ac/tracking-not-init.\n",PORTAL_NO_SEGMENT_IDS="You have tried to render a Portal that doesn't contain any content.\nAdd content to your Portal: https://udn.ac/update-portals.\n",NO_MATCHING_TUTORIALS="The Tutorial will not be rendered because there are no matching segments for the given user.",ERROR_MESSAGES={EVENTING_NOT_INITIALIZED:EVENTING_NOT_INITIALIZED,[EVENT_NAMES.PORTAL_ASSET_NOT_FOUND]:PORTAL_ASSET_NOT_FOUND,[EVENT_NAMES.PORTAL_NO_SEGMENT_IDS]:PORTAL_NO_SEGMENT_IDS,[EVENT_NAMES.NO_MATCHING_TUTORIALS]:NO_MATCHING_TUTORIALS,[EVENT_NAMES.NO_VALID_TUTORIAL_IDENTIFIER]:"(Candu/Tutorial) You must define one of tutorialId, slug, commitId or contentHashId.",[EVENT_NAMES.TUTORIAL_LOADING_ERROR]:"An error has occurred while trying to load the Tutorial",[EVENT_NAMES.UNKOWN_INLINE_NODE_TYPE]:unknownMessage(ERROR_SLUGS.UNKOWN_INLINE_NODE_TYPE),[EVENT_NAMES.UNKOWN_NODE_TYPE]:unknownMessage(ERROR_SLUGS.UNKOWN_NODE_TYPE),[EVENT_NAMES.CIRCULAR_DEPENDENCY_EMBED_PORTAL]:"Circular dependency found on Embeded Portal. Please take a look at the Portal Content.",[EVENT_NAMES.CIRCULAR_DEPENDENCY_EMBED_TUTORIAL]:"Circular dependency found on Embeded Tutorial. Please take a look at the Tutorial Content.",[EVENT_NAMES.PORTAL_ERROR]:"An error has occured within Portal",[EVENT_NAMES.TUTORIAL_ERROR]:"An error has occured within Tutorial",[EVENT_NAMES.RENDER_NODE_ERROR]:"An error has occured while rendering tutorial node",[EVENT_NAMES.STYLEGUIDE_MAP_ERROR]:"An error has occured while mapping node to styleguide"},defaultStyleguide={Alert:!0,B:!0,Badge:!0,Button:!0,Card:!0,Code:!0,Document:!0,Em:!0,EmbedPortal:!0,EmbedTutorial:!0,Flex:!0,FlexItem:!0,H1:!0,H2:!0,H3:!0,H4:!0,H5:!0,H6:!0,Image:!0,InlineCode:!0,Link:!0,List:!0,ListItem:!0,P:!0,RichText:!0,Spacing:!0,Text:!0,U:!0,View:!0,Player:!0},trackStyleguideProperties=e=>{const t={};return Object.keys(e).forEach(r=>{defaultStyleguide[r]&&(t[`styleguide.${r}`]=e[r].displayName||!0)}),t},LOGGER={error:console.error,warning:console.warn},internalEventing=({identify:e,track:t})=>({provider:({userId:r,traits:a,styleguide:o})=>{e(r,a),t(EVENT_NAMES.HEARTBEAT,trackStyleguideProperties(o))},tutorialDocumentLoadingError:({tutorialId:e,slug:r,contentHashId:a})=>{LOGGER.error(ERROR_MESSAGES[EVENT_NAMES.TUTORIAL_LOADING_ERROR]),t(EVENT_NAMES.TUTORIAL_LOADING_ERROR,{tutorialId:e,slug:r,contentHashId:a})}});for(var rng=function(){return crypto.randomBytes(16)},byteToHex=[],i=0;i<256;++i)byteToHex[i]=(i+256).toString(16).substr(1);function bytesToUuid(e,t){var r=t||0,a=byteToHex;return[a[e[r++]],a[e[r++]],a[e[r++]],a[e[r++]],"-",a[e[r++]],a[e[r++]],"-",a[e[r++]],a[e[r++]],"-",a[e[r++]],a[e[r++]],"-",a[e[r++]],a[e[r++]],a[e[r++]],a[e[r++]],a[e[r++]],a[e[r++]]].join("")}var bytesToUuid_1=bytesToUuid;function v4(e,t,r){var a=t&&r||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var o=(e=e||{}).random||(e.rng||rng)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t)for(var n=0;n<16;++n)t[a+n]=o[n];return t||bytesToUuid_1(o)}var Source,EventType,v4_1=v4;!function(e){e.UserGenerated="UserGenerated",e.SDK="SDK"}(Source||(Source={})),function(e){e.Identify="Identify",e.Group="Group",e.Track="Track",e.Page="Page",e.Screen="Screen"}(EventType||(EventType={}));const ANONYMOUS_ID_STORAGE_KEY="candu:anonymous_id",hasStorage=()=>"undefined"!=typeof window&&window.localStorage,get$1=e=>()=>{if(hasStorage()){const t=window.localStorage.getItem(e);if(t)try{return JSON.parse(t)}catch(e){return null}}},getOrCreate=(e,t)=>()=>get$1(e)()||t(),set=e=>t=>{hasStorage()&&null!=t&&window.localStorage.setItem(e,JSON.stringify(t))};var storage={anonymousId:{getOrCreate:getOrCreate("candu:anonymous_id",()=>{const e=v4_1();return set("candu:anonymous_id")(e),e}),set:set("candu:anonymous_id")}};const getAnonymousId=storage.anonymousId.getOrCreate;var commonjsGlobal$1="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},freeGlobal$1="object"==typeof commonjsGlobal$1&&commonjsGlobal$1&&commonjsGlobal$1.Object===Object&&commonjsGlobal$1,_freeGlobal$1=freeGlobal$1,freeSelf$1="object"==typeof self&&self&&self.Object===Object&&self,root$1=_freeGlobal$1||freeSelf$1||Function("return this")(),_root$1=root$1,Symbol$1=_root$1.Symbol,_Symbol$1=Symbol$1,objectProto$c=Object.prototype,hasOwnProperty$9=objectProto$c.hasOwnProperty,nativeObjectToString$2=objectProto$c.toString,symToStringTag$2=_Symbol$1?_Symbol$1.toStringTag:void 0;function getRawTag$1(e){var t=hasOwnProperty$9.call(e,symToStringTag$2),r=e[symToStringTag$2];try{e[symToStringTag$2]=void 0;var a=!0}catch(e){}var o=nativeObjectToString$2.call(e);return a&&(t?e[symToStringTag$2]=r:delete e[symToStringTag$2]),o}var _getRawTag$1=getRawTag$1,objectProto$1$1=Object.prototype,nativeObjectToString$1$1=objectProto$1$1.toString;function objectToString$1(e){return nativeObjectToString$1$1.call(e)}var _objectToString$1=objectToString$1,nullTag$1="[object Null]",undefinedTag$1="[object Undefined]",symToStringTag$1$1=_Symbol$1?_Symbol$1.toStringTag:void 0;function baseGetTag$1(e){return null==e?void 0===e?undefinedTag$1:nullTag$1:symToStringTag$1$1&&symToStringTag$1$1 in Object(e)?_getRawTag$1(e):_objectToString$1(e)}var _baseGetTag$1=baseGetTag$1,isArray$1=Array.isArray,isArray_1$1=isArray$1;function isObjectLike$1(e){return null!=e&&"object"==typeof e}var isObjectLike_1$1=isObjectLike$1,stringTag$2="[object String]";function isString(e){return"string"==typeof e||!isArray_1$1(e)&&isObjectLike_1$1(e)&&_baseGetTag$1(e)==stringTag$2}var isString_1=isString,numberTag$2="[object Number]";function isNumber(e){return"number"==typeof e||isObjectLike_1$1(e)&&_baseGetTag$1(e)==numberTag$2}var isNumber_1=isNumber;const identifierRegex=/^([a-zA-Z0-9]|_|-)+$/,isIdentifier=e=>isString_1(e)&&e.length>=3&&e.length<100&&identifierRegex.test(e),IsNumericId=e=>isNumber_1(e)&&e>=0,isClientToken=e=>isString_1(e)&&!!e.match(/^[0-9a-zA-Z]*$/)&&e.length>=10,isUserId=e=>IsNumericId(e)||isString_1(e)&&e.trim().length>0;var ACTORS,MESSAGES,TRIGGERS,CATEGORIES,HANDLER_TYPES,COLORS;!function(e){e.SDK="SDK",e.PREVIEW="PREVIEW"}(ACTORS||(ACTORS={})),function(e){e.BOOTSTRAP="Bootstrap",e.CHANGE_POSITION="ChangePosition",e.CLOSE_PREVIEW="ClosePreview",e.PREVIEW_LOADED="PreviewLoaded",e.SET_AVALIABLE_PORTALS="SetAvaliablePortals",e.SET_CONTENT="SetContent",e.SET_SELECTED_ELEMENT="SetSelectedElement",e.SET_VIEW_MODE="SetViewMode",e.ADD_ELEMENT="AddElement",e.REMOVE_ELEMENT="RemoveElement",e.UPDATE_ELEMENT="UpdateElement",e.SET_ELEMENT="SetElement"}(MESSAGES||(MESSAGES={})),function(e){e.ON_CLICK="OnClick"}(TRIGGERS||(TRIGGERS={})),function(e){e.NATIVE="Native",e.PENDO="Pendo"}(CATEGORIES||(CATEGORIES={})),function(e){e.NAVIGATE="Navigate",e.CHANGE_TUTORIAL="ChangeTutorial",e.OPEN_GUIDE="OpenGuide"}(HANDLER_TYPES||(HANDLER_TYPES={})),function(e){e.PRIMARY="primary",e.SECONDARY="primary",e.WARNING="warning",e.DANGER="danger",e.NEUTRAL="neutral",e.ACTIVE="active",e.INFO="info"}(COLORS||(COLORS={}));const DEFAULT_COLOR=COLORS.PRIMARY;var Mark;!function(e){e.U="U",e.B="B",e.Em="Em",e.InlineCode="InlineCode"}(Mark||(Mark={}));const isContentHashId=e=>isString_1(e)&&!!e.match(/^[0-9a-zA-Z]{40}$/),isTutorialId=e=>IsNumericId(e),isTutorialSlug=e=>isIdentifier(e);var FRAME_SIZES,PREVIEW_MODES,StyleguideScope,CSSNodeTypes;!function(e){e.COLLAPSED="Collapsed",e.EXPANDED="Expanded",e.MINIMIZED="Minimized"}(FRAME_SIZES||(FRAME_SIZES={})),function(e){e.TUTORIAL="Tutorial",e.PORTAL="Portal"}(PREVIEW_MODES||(PREVIEW_MODES={})),function(e){e.Global="Global",e.Organization="Organization"}(StyleguideScope||(StyleguideScope={})),function(e){e.Root="root",e.Rule="rule",e.Atrule="atrule",e.Decl="decl",e.Any="any"}(CSSNodeTypes||(CSSNodeTypes={}));var invariant=function(e,t,r,a,o,n,i,s){if(!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var _=[r,a,o,n,i,s],u=0;(c=new Error(t.replace(/%s/g,(function(){return _[u++]})))).name="Invariant Violation"}throw c.framesToPop=1,c}},invariant_1=invariant;const isValidStyleguideProps=e=>invariant_1(!e||isObject_1(e),"(Candu) styleguide must be undefined or an object"),providerValidation=({clientToken:e,userId:t,traits:r,options:a,styleguide:o,...n})=>(invariant_1(isClientToken(e),"(Candu) you must provide a valid clientToken"),invariant_1(!t||isUserId(t),"(Candu) you must provide a valid userId"),isValidStyleguideProps(o),invariant_1(!r||isObject_1(r),"(Candu) traits must be undefined or an object"),invariant_1(!a||isObject_1(a),"(Candu) options must be undefined or an object"),{...n,clientToken:e,traits:r||{},options:a||{},styleguide:o||{},userId:t||getAnonymousId()}),tutorialValidation=({slug:e,styleguide:t,contentHashId:r,tutorialId:a,tutorialDocument:o,...n})=>(isValidStyleguideProps(t),{...n,slug:e,styleguide:t||{},contentHashId:r,tutorialId:a,tutorialDocument:o}),portalValidation=({slug:e,styleguide:t})=>(isValidStyleguideProps(t),{slug:e,styleguide:t||{}}),API_BASE_URL="https://api.candu.ai",CDN_BASE_URL="https://cdn.candu.ai",VERSION="0.5.2";var injections=Object.freeze({__proto__:null,API_BASE_URL:API_BASE_URL,CDN_BASE_URL:CDN_BASE_URL,VERSION:"0.5.2"});const{API_BASE_URL:API_BASE_URL$1}=injections,{CDN_BASE_URL:CDN_BASE_URL$1}=injections,ENDPOINTS={segmentMembership:"/api/segmentMemberships",tutorialDocuments:"/api/tutorialDocumentsEditor"},fetchURL=async e=>(await fetch(e)).json(),fetchFromApi=e=>fetchURL(`${API_BASE_URL$1}${e}`),fetchFromCdn=e=>fetchURL(`${CDN_BASE_URL$1}${e}`),getTutorialDocument=e=>({byId:t=>fetchFromApi(`${ENDPOINTS.tutorialDocuments}/${t}?token=${e}`),bySlug:t=>fetchFromCdn(`/tutorials/${e}/${t}.json`),byContentHash:t=>fetchFromCdn(`/tutorials/${e}/${t}.json`)}),RESOURCES={tutorialDocumentLatestPublished:async(e,t)=>fetchFromApi(`${ENDPOINTS.tutorialDocuments}?token=${e}&finder=latestPublished&tutorialId=${t}`),portalAsset:async(e,t)=>fetchFromCdn(`/portals/${e}/${t}/head.json`),segmentMembership:async(e,t)=>fetchFromApi(`${ENDPOINTS.segmentMembership}/${t}?token=${e}`),tutorialDocument:(e,t,r)=>{const{contentHashId:a,tutorialId:o,tutorialDocument:n,slug:i}=e,s=getTutorialDocument(t);return isTutorialId(o)?s.byId(o):isTutorialSlug(i)?s.bySlug(i):isContentHashId(a)?s.byContentHash(a):isObject_1(n)?Promise.resolve(n):(LOGGER.error(ERROR_MESSAGES[EVENT_NAMES.NO_VALID_TUTORIAL_IDENTIFIER]),r.track(EVENT_NAMES.NO_VALID_TUTORIAL_IDENTIFIER,{slug:e.slug}),null)}},logError=(...e)=>console.error(...e),logWarning=(...e)=>console.warn(...e),logger={error:logError,warning:logWarning},getEventHandler=e=>{switch(e.trigger){case TRIGGERS.ON_CLICK:default:return"onClick"}},getActionHandler=(e,t)=>{switch(e.handler.type){case HANDLER_TYPES.NAVIGATE:return{[getEventHandler(e)]:()=>{const{href:r,target:a}=e.handler;t(e),"Blank"===a?window.open(r,"_blank"):r&&r.includes("mailto:")?window.location=r:document.location.href=r}};case HANDLER_TYPES.CHANGE_TUTORIAL:return{[getEventHandler(e)]:()=>{const{tutorialId:t}=e.handler;logError("TODO -> change tutorial",t)}};case HANDLER_TYPES.OPEN_GUIDE:return{[getEventHandler(e)]:()=>{const{guideId:t}=e.handler;logError("TODO -> open guide",t)}};default:return{}}},getActionHandlers=({data:e},t)=>{if(!e||!e.actions)return{};const r=e=>{t.provider.eventing.track(EVENT_NAMES.TUTORIAL_INTERACTION,{...e,...t.trackingIdentifiers||{}})};return e.actions.map(e=>getActionHandler(e,r)).reduce((e,t)=>({...e,...t}),{})},mapNodeToStyleguide=(e,t)=>{try{const{provider:r,document:a,trackingIdentifiers:o}=t,n=a.nodes[e];if(!n)return logger.error("Document is corrupted. Refusing to move further."),null;const i=e=>mapNodeToStyleguide(e,t),{type:s,props:c,css:_}=n,u={...c||{},style:_||{},children:(c||{}).children||n.nodes&&n.nodes.map(i),...getActionHandlers(n,{trackingIdentifiers:o,provider:r})},l={nodeId:e,node:n,document:a,render:{node:i,styleguide:(e,r={})=>t.renderNode(e,{api:l,attributes:r}),tutorial:e=>t.renderTutorial(e),portal:e=>t.renderPortal(e)},trackingIdentifiers:o},g=l.render.styleguide(s,u);return g||(logger.error(ERROR_MESSAGES[EVENT_NAMES.UNKOWN_NODE_TYPE],{type:s}),r.eventing.track(EVENT_NAMES.UNKOWN_NODE_TYPE,{type:s}),null)}catch(e){return logger.error(ERROR_MESSAGES[EVENT_NAMES.STYLEGUIDE_MAP_ERROR],e),null}},mergeStyleguidesFromContext=memoize_1((e,t)=>{const{provider:r,portal:a,tutorial:o}=e,n=r.styleguide;let i,s;return o&&(s=o.styleguide),a&&(i=a.styleguide),{...n||{},...i||{},...s||{},...t||{}}}),DEFAULT_ALT="",DEFAULT_ALERT_COLOR="#EDEDED",DEFAULT_TAB_HEADER_COLOR="#333745",DEFAULT_TAB_ITEM_COLOR="#838792",DEFAULT_TAB_ACTIVE_COLOR="#FEFEFE",DEFAULT_TAB_COLOR="#FEFEFE",STYLEGUIDE_COLORS={primary:"#6310E5",secondary:"#59C3C3",tertiary:"#4D515D",warning:"#FCAD0D",danger:"#EE4266"},attachStylesheet=e=>{const t=document.createElement("link");t.setAttribute("rel","stylesheet"),t.setAttribute("href",`${CDN_BASE_URL$1}/styleguides/applications/${e}/default/main.css`),document.head.appendChild(t)};exports.DEFAULT_ALERT_COLOR="#EDEDED",exports.DEFAULT_ALT="",exports.DEFAULT_TAB_ACTIVE_COLOR="#FEFEFE",exports.DEFAULT_TAB_COLOR="#FEFEFE",exports.DEFAULT_TAB_HEADER_COLOR="#333745",exports.DEFAULT_TAB_ITEM_COLOR="#838792",exports.ERROR_MESSAGES=ERROR_MESSAGES,exports.ERROR_SLUGS=ERROR_SLUGS,exports.EVENT_NAMES=EVENT_NAMES,exports.LOGGER=LOGGER,exports.RESOURCES=RESOURCES,exports.STYLEGUIDE_COLORS=STYLEGUIDE_COLORS,exports.adaptCustomNodes=adaptCustomNodes,exports.attachStylesheet=attachStylesheet,exports.convertStyleNumberValues=convertStyleNumberValues,exports.defaultStyleguide=defaultStyleguide,exports.internalEventing=internalEventing,exports.logError=logError,exports.logWarning=logWarning,exports.logger=logger,exports.mapNodeToStyleguide=mapNodeToStyleguide,exports.mergeStyleguidesFromContext=mergeStyleguidesFromContext,exports.portalValidation=portalValidation,exports.providerValidation=providerValidation,exports.tutorialValidation=tutorialValidation,exports.unpackShorthandStyles=unpackShorthandStyles;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
var __assign=function(){return(__assign=Object.assign||function(e){for(var t,r=1,a=arguments.length;r<a;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)};function __rest(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(a=Object.getOwnPropertySymbols(e);n<a.length;n++)t.indexOf(a[n])<0&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]])}return r}function __awaiter(e,t,r,a){return new(r||(r=Promise))((function(n,o){function i(e){try{u(a.next(e))}catch(e){o(e)}}function s(e){try{u(a.throw(e))}catch(e){o(e)}}function u(e){e.done?n(e.value):new r((function(t){t(e.value)})).then(i,s)}u((a=a.apply(e,t||[])).next())}))}function __generator(e,t){var r,a,n,o,i={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,a&&(n=2&o[0]?a.return:o[0]?a.throw||((n=a.return)&&n.call(a),0):a.next)&&!(n=n.call(a,o[1])).done)return n;switch(a=0,n&&(o=[2&o[0],n.value]),o[0]){case 0:case 1:n=o;break;case 4:return i.label++,{value:o[1],done:!1};case 5:i.label++,a=o[1],o=[0];continue;case 7:o=i.ops.pop(),i.trys.pop();continue;default:if(!(n=(n=i.trys).length>0&&n[n.length-1])&&(6===o[0]||2===o[0])){i=0;continue}if(3===o[0]&&(!n||o[1]>n[0]&&o[1]<n[3])){i.label=o[1];break}if(6===o[0]&&i.label<n[1]){i.label=n[1],n=o;break}if(n&&i.label<n[2]){i.label=n[2],i.ops.push(o);break}n[2]&&i.ops.pop(),i.trys.pop();continue}o=t.call(e,i)}catch(e){o=[6,e],a=0}finally{r=n=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function createCommonjsModule(e,t){return e(t={exports:{}},t.exports),t.exports}var freeGlobal="object"==typeof commonjsGlobal&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,_freeGlobal=freeGlobal,freeSelf="object"==typeof self&&self&&self.Object===Object&&self,root=_freeGlobal||freeSelf||Function("return this")(),_root=root,Symbol$1=_root.Symbol,_Symbol=Symbol$1,objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty,nativeObjectToString=objectProto.toString,symToStringTag=_Symbol?_Symbol.toStringTag:void 0;function getRawTag(e){var t=hasOwnProperty.call(e,symToStringTag),r=e[symToStringTag];try{e[symToStringTag]=void 0;var a=!0}catch(e){}var n=nativeObjectToString.call(e);return a&&(t?e[symToStringTag]=r:delete e[symToStringTag]),n}var _getRawTag=getRawTag,objectProto$1=Object.prototype,nativeObjectToString$1=objectProto$1.toString;function objectToString(e){return nativeObjectToString$1.call(e)}var _objectToString=objectToString,nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag$1=_Symbol?_Symbol.toStringTag:void 0;function baseGetTag(e){return null==e?void 0===e?undefinedTag:nullTag:symToStringTag$1&&symToStringTag$1 in Object(e)?_getRawTag(e):_objectToString(e)}var _baseGetTag=baseGetTag;function isObject(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var isObject_1=isObject,asyncTag="[object AsyncFunction]",funcTag="[object Function]",genTag="[object GeneratorFunction]",proxyTag="[object Proxy]";function isFunction(e){if(!isObject_1(e))return!1;var t=_baseGetTag(e);return t==funcTag||t==genTag||t==asyncTag||t==proxyTag}var isFunction_1=isFunction,coreJsData=_root["__core-js_shared__"],_coreJsData=coreJsData,maskSrcKey=function(){var e=/[^.]+$/.exec(_coreJsData&&_coreJsData.keys&&_coreJsData.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function isMasked(e){return!!maskSrcKey&&maskSrcKey in e}var _isMasked=isMasked,funcProto=Function.prototype,funcToString=funcProto.toString;function toSource(e){if(null!=e){try{return funcToString.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var _toSource=toSource,reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reIsHostCtor=/^\[object .+?Constructor\]$/,funcProto$1=Function.prototype,objectProto$2=Object.prototype,funcToString$1=funcProto$1.toString,hasOwnProperty$1=objectProto$2.hasOwnProperty,reIsNative=RegExp("^"+funcToString$1.call(hasOwnProperty$1).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function baseIsNative(e){return!(!isObject_1(e)||_isMasked(e))&&(isFunction_1(e)?reIsNative:reIsHostCtor).test(_toSource(e))}var _baseIsNative=baseIsNative;function getValue(e,t){return null==e?void 0:e[t]}var _getValue=getValue;function getNative(e,t){var r=_getValue(e,t);return _baseIsNative(r)?r:void 0}var _getNative=getNative,defineProperty=function(){try{var e=_getNative(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),_defineProperty=defineProperty;function baseAssignValue(e,t,r){"__proto__"==t&&_defineProperty?_defineProperty(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var _baseAssignValue=baseAssignValue;function createBaseFor(e){return function(t,r,a){for(var n=-1,o=Object(t),i=a(t),s=i.length;s--;){var u=i[e?s:++n];if(!1===r(o[u],u,o))break}return t}}var _createBaseFor=createBaseFor,baseFor=_createBaseFor(),_baseFor=baseFor;function baseTimes(e,t){for(var r=-1,a=Array(e);++r<e;)a[r]=t(r);return a}var _baseTimes=baseTimes;function isObjectLike(e){return null!=e&&"object"==typeof e}var isObjectLike_1=isObjectLike,argsTag="[object Arguments]";function baseIsArguments(e){return isObjectLike_1(e)&&_baseGetTag(e)==argsTag}var _baseIsArguments=baseIsArguments,objectProto$3=Object.prototype,hasOwnProperty$2=objectProto$3.hasOwnProperty,propertyIsEnumerable=objectProto$3.propertyIsEnumerable,isArguments=_baseIsArguments(function(){return arguments}())?_baseIsArguments:function(e){return isObjectLike_1(e)&&hasOwnProperty$2.call(e,"callee")&&!propertyIsEnumerable.call(e,"callee")},isArguments_1=isArguments,isArray=Array.isArray,isArray_1=isArray;function stubFalse(){return!1}var stubFalse_1=stubFalse,isBuffer_1=createCommonjsModule((function(e,t){var r=t&&!t.nodeType&&t,a=r&&e&&!e.nodeType&&e,n=a&&a.exports===r?_root.Buffer:void 0,o=(n?n.isBuffer:void 0)||stubFalse_1;e.exports=o})),MAX_SAFE_INTEGER=9007199254740991,reIsUint=/^(?:0|[1-9]\d*)$/;function isIndex(e,t){var r=typeof e;return!!(t=null==t?MAX_SAFE_INTEGER:t)&&("number"==r||"symbol"!=r&&reIsUint.test(e))&&e>-1&&e%1==0&&e<t}var _isIndex=isIndex,MAX_SAFE_INTEGER$1=9007199254740991;function isLength(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=MAX_SAFE_INTEGER$1}var isLength_1=isLength,argsTag$1="[object Arguments]",arrayTag="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag$1="[object Function]",mapTag="[object Map]",numberTag="[object Number]",objectTag="[object Object]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",weakMapTag="[object WeakMap]",arrayBufferTag="[object ArrayBuffer]",dataViewTag="[object DataView]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]",typedArrayTags={};function baseIsTypedArray(e){return isObjectLike_1(e)&&isLength_1(e.length)&&!!typedArrayTags[_baseGetTag(e)]}typedArrayTags[float32Tag]=typedArrayTags[float64Tag]=typedArrayTags[int8Tag]=typedArrayTags[int16Tag]=typedArrayTags[int32Tag]=typedArrayTags[uint8Tag]=typedArrayTags[uint8ClampedTag]=typedArrayTags[uint16Tag]=typedArrayTags[uint32Tag]=!0,typedArrayTags[argsTag$1]=typedArrayTags[arrayTag]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dataViewTag]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag$1]=typedArrayTags[mapTag]=typedArrayTags[numberTag]=typedArrayTags[objectTag]=typedArrayTags[regexpTag]=typedArrayTags[setTag]=typedArrayTags[stringTag]=typedArrayTags[weakMapTag]=!1;var _baseIsTypedArray=baseIsTypedArray;function baseUnary(e){return function(t){return e(t)}}var _baseUnary=baseUnary,_nodeUtil=createCommonjsModule((function(e,t){var r=t&&!t.nodeType&&t,a=r&&e&&!e.nodeType&&e,n=a&&a.exports===r&&_freeGlobal.process,o=function(){try{var e=a&&a.require&&a.require("util").types;return e||n&&n.binding&&n.binding("util")}catch(e){}}();e.exports=o})),nodeIsTypedArray=_nodeUtil&&_nodeUtil.isTypedArray,isTypedArray=nodeIsTypedArray?_baseUnary(nodeIsTypedArray):_baseIsTypedArray,isTypedArray_1=isTypedArray,objectProto$4=Object.prototype,hasOwnProperty$3=objectProto$4.hasOwnProperty;function arrayLikeKeys(e,t){var r=isArray_1(e),a=!r&&isArguments_1(e),n=!r&&!a&&isBuffer_1(e),o=!r&&!a&&!n&&isTypedArray_1(e),i=r||a||n||o,s=i?_baseTimes(e.length,String):[],u=s.length;for(var c in e)!t&&!hasOwnProperty$3.call(e,c)||i&&("length"==c||n&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||_isIndex(c,u))||s.push(c);return s}var _arrayLikeKeys=arrayLikeKeys,objectProto$5=Object.prototype;function isPrototype(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||objectProto$5)}var _isPrototype=isPrototype;function overArg(e,t){return function(r){return e(t(r))}}var _overArg=overArg,nativeKeys=_overArg(Object.keys,Object),_nativeKeys=nativeKeys,objectProto$6=Object.prototype,hasOwnProperty$4=objectProto$6.hasOwnProperty;function baseKeys(e){if(!_isPrototype(e))return _nativeKeys(e);var t=[];for(var r in Object(e))hasOwnProperty$4.call(e,r)&&"constructor"!=r&&t.push(r);return t}var _baseKeys=baseKeys;function isArrayLike(e){return null!=e&&isLength_1(e.length)&&!isFunction_1(e)}var isArrayLike_1=isArrayLike;function keys(e){return isArrayLike_1(e)?_arrayLikeKeys(e):_baseKeys(e)}var keys_1=keys;function baseForOwn(e,t){return e&&_baseFor(e,t,keys_1)}var _baseForOwn=baseForOwn;function listCacheClear(){this.__data__=[],this.size=0}var _listCacheClear=listCacheClear;function eq(e,t){return e===t||e!=e&&t!=t}var eq_1=eq;function assocIndexOf(e,t){for(var r=e.length;r--;)if(eq_1(e[r][0],t))return r;return-1}var _assocIndexOf=assocIndexOf,arrayProto=Array.prototype,splice=arrayProto.splice;function listCacheDelete(e){var t=this.__data__,r=_assocIndexOf(t,e);return!(r<0)&&(r==t.length-1?t.pop():splice.call(t,r,1),--this.size,!0)}var _listCacheDelete=listCacheDelete;function listCacheGet(e){var t=this.__data__,r=_assocIndexOf(t,e);return r<0?void 0:t[r][1]}var _listCacheGet=listCacheGet;function listCacheHas(e){return _assocIndexOf(this.__data__,e)>-1}var _listCacheHas=listCacheHas;function listCacheSet(e,t){var r=this.__data__,a=_assocIndexOf(r,e);return a<0?(++this.size,r.push([e,t])):r[a][1]=t,this}var _listCacheSet=listCacheSet;function ListCache(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var a=e[t];this.set(a[0],a[1])}}ListCache.prototype.clear=_listCacheClear,ListCache.prototype.delete=_listCacheDelete,ListCache.prototype.get=_listCacheGet,ListCache.prototype.has=_listCacheHas,ListCache.prototype.set=_listCacheSet;var _ListCache=ListCache;function stackClear(){this.__data__=new _ListCache,this.size=0}var _stackClear=stackClear;function stackDelete(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var _stackDelete=stackDelete;function stackGet(e){return this.__data__.get(e)}var _stackGet=stackGet;function stackHas(e){return this.__data__.has(e)}var _stackHas=stackHas,Map=_getNative(_root,"Map"),_Map=Map,nativeCreate=_getNative(Object,"create"),_nativeCreate=nativeCreate;function hashClear(){this.__data__=_nativeCreate?_nativeCreate(null):{},this.size=0}var _hashClear=hashClear;function hashDelete(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var _hashDelete=hashDelete,HASH_UNDEFINED="__lodash_hash_undefined__",objectProto$7=Object.prototype,hasOwnProperty$5=objectProto$7.hasOwnProperty;function hashGet(e){var t=this.__data__;if(_nativeCreate){var r=t[e];return r===HASH_UNDEFINED?void 0:r}return hasOwnProperty$5.call(t,e)?t[e]:void 0}var _hashGet=hashGet,objectProto$8=Object.prototype,hasOwnProperty$6=objectProto$8.hasOwnProperty;function hashHas(e){var t=this.__data__;return _nativeCreate?void 0!==t[e]:hasOwnProperty$6.call(t,e)}var _hashHas=hashHas,HASH_UNDEFINED$1="__lodash_hash_undefined__";function hashSet(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=_nativeCreate&&void 0===t?HASH_UNDEFINED$1:t,this}var _hashSet=hashSet;function Hash(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var a=e[t];this.set(a[0],a[1])}}Hash.prototype.clear=_hashClear,Hash.prototype.delete=_hashDelete,Hash.prototype.get=_hashGet,Hash.prototype.has=_hashHas,Hash.prototype.set=_hashSet;var _Hash=Hash;function mapCacheClear(){this.size=0,this.__data__={hash:new _Hash,map:new(_Map||_ListCache),string:new _Hash}}var _mapCacheClear=mapCacheClear;function isKeyable(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}var _isKeyable=isKeyable;function getMapData(e,t){var r=e.__data__;return _isKeyable(t)?r["string"==typeof t?"string":"hash"]:r.map}var _getMapData=getMapData;function mapCacheDelete(e){var t=_getMapData(this,e).delete(e);return this.size-=t?1:0,t}var _mapCacheDelete=mapCacheDelete;function mapCacheGet(e){return _getMapData(this,e).get(e)}var _mapCacheGet=mapCacheGet;function mapCacheHas(e){return _getMapData(this,e).has(e)}var _mapCacheHas=mapCacheHas;function mapCacheSet(e,t){var r=_getMapData(this,e),a=r.size;return r.set(e,t),this.size+=r.size==a?0:1,this}var _mapCacheSet=mapCacheSet;function MapCache(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var a=e[t];this.set(a[0],a[1])}}MapCache.prototype.clear=_mapCacheClear,MapCache.prototype.delete=_mapCacheDelete,MapCache.prototype.get=_mapCacheGet,MapCache.prototype.has=_mapCacheHas,MapCache.prototype.set=_mapCacheSet;var _MapCache=MapCache,LARGE_ARRAY_SIZE=200;function stackSet(e,t){var r=this.__data__;if(r instanceof _ListCache){var a=r.__data__;if(!_Map||a.length<LARGE_ARRAY_SIZE-1)return a.push([e,t]),this.size=++r.size,this;r=this.__data__=new _MapCache(a)}return r.set(e,t),this.size=r.size,this}var _stackSet=stackSet;function Stack(e){var t=this.__data__=new _ListCache(e);this.size=t.size}Stack.prototype.clear=_stackClear,Stack.prototype.delete=_stackDelete,Stack.prototype.get=_stackGet,Stack.prototype.has=_stackHas,Stack.prototype.set=_stackSet;var _Stack=Stack,HASH_UNDEFINED$2="__lodash_hash_undefined__";function setCacheAdd(e){return this.__data__.set(e,HASH_UNDEFINED$2),this}var _setCacheAdd=setCacheAdd;function setCacheHas(e){return this.__data__.has(e)}var _setCacheHas=setCacheHas;function SetCache(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new _MapCache;++t<r;)this.add(e[t])}SetCache.prototype.add=SetCache.prototype.push=_setCacheAdd,SetCache.prototype.has=_setCacheHas;var _SetCache=SetCache;function arraySome(e,t){for(var r=-1,a=null==e?0:e.length;++r<a;)if(t(e[r],r,e))return!0;return!1}var _arraySome=arraySome;function cacheHas(e,t){return e.has(t)}var _cacheHas=cacheHas,COMPARE_PARTIAL_FLAG=1,COMPARE_UNORDERED_FLAG=2;function equalArrays(e,t,r,a,n,o){var i=r&COMPARE_PARTIAL_FLAG,s=e.length,u=t.length;if(s!=u&&!(i&&u>s))return!1;var c=o.get(e);if(c&&o.get(t))return c==t;var _=-1,l=!0,g=r&COMPARE_UNORDERED_FLAG?new _SetCache:void 0;for(o.set(e,t),o.set(t,e);++_<s;){var p=e[_],y=t[_];if(a)var d=i?a(y,p,_,t,e,o):a(p,y,_,e,t,o);if(void 0!==d){if(d)continue;l=!1;break}if(g){if(!_arraySome(t,(function(e,t){if(!_cacheHas(g,t)&&(p===e||n(p,e,r,a,o)))return g.push(t)}))){l=!1;break}}else if(p!==y&&!n(p,y,r,a,o)){l=!1;break}}return o.delete(e),o.delete(t),l}var _equalArrays=equalArrays,Uint8Array=_root.Uint8Array,_Uint8Array=Uint8Array;function mapToArray(e){var t=-1,r=Array(e.size);return e.forEach((function(e,a){r[++t]=[a,e]})),r}var _mapToArray=mapToArray;function setToArray(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}var _setToArray=setToArray,COMPARE_PARTIAL_FLAG$1=1,COMPARE_UNORDERED_FLAG$1=2,boolTag$1="[object Boolean]",dateTag$1="[object Date]",errorTag$1="[object Error]",mapTag$1="[object Map]",numberTag$1="[object Number]",regexpTag$1="[object RegExp]",setTag$1="[object Set]",stringTag$1="[object String]",symbolTag="[object Symbol]",arrayBufferTag$1="[object ArrayBuffer]",dataViewTag$1="[object DataView]",symbolProto=_Symbol?_Symbol.prototype:void 0,symbolValueOf=symbolProto?symbolProto.valueOf:void 0;function equalByTag(e,t,r,a,n,o,i){switch(r){case dataViewTag$1:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case arrayBufferTag$1:return!(e.byteLength!=t.byteLength||!o(new _Uint8Array(e),new _Uint8Array(t)));case boolTag$1:case dateTag$1:case numberTag$1:return eq_1(+e,+t);case errorTag$1:return e.name==t.name&&e.message==t.message;case regexpTag$1:case stringTag$1:return e==t+"";case mapTag$1:var s=_mapToArray;case setTag$1:var u=a&COMPARE_PARTIAL_FLAG$1;if(s||(s=_setToArray),e.size!=t.size&&!u)return!1;var c=i.get(e);if(c)return c==t;a|=COMPARE_UNORDERED_FLAG$1,i.set(e,t);var _=_equalArrays(s(e),s(t),a,n,o,i);return i.delete(e),_;case symbolTag:if(symbolValueOf)return symbolValueOf.call(e)==symbolValueOf.call(t)}return!1}var _equalByTag=equalByTag;function arrayPush(e,t){for(var r=-1,a=t.length,n=e.length;++r<a;)e[n+r]=t[r];return e}var _arrayPush=arrayPush;function baseGetAllKeys(e,t,r){var a=t(e);return isArray_1(e)?a:_arrayPush(a,r(e))}var _baseGetAllKeys=baseGetAllKeys;function arrayFilter(e,t){for(var r=-1,a=null==e?0:e.length,n=0,o=[];++r<a;){var i=e[r];t(i,r,e)&&(o[n++]=i)}return o}var _arrayFilter=arrayFilter;function stubArray(){return[]}var stubArray_1=stubArray,objectProto$9=Object.prototype,propertyIsEnumerable$1=objectProto$9.propertyIsEnumerable,nativeGetSymbols=Object.getOwnPropertySymbols,getSymbols=nativeGetSymbols?function(e){return null==e?[]:(e=Object(e),_arrayFilter(nativeGetSymbols(e),(function(t){return propertyIsEnumerable$1.call(e,t)})))}:stubArray_1,_getSymbols=getSymbols;function getAllKeys(e){return _baseGetAllKeys(e,keys_1,_getSymbols)}var _getAllKeys=getAllKeys,COMPARE_PARTIAL_FLAG$2=1,objectProto$a=Object.prototype,hasOwnProperty$7=objectProto$a.hasOwnProperty;function equalObjects(e,t,r,a,n,o){var i=r&COMPARE_PARTIAL_FLAG$2,s=_getAllKeys(e),u=s.length;if(u!=_getAllKeys(t).length&&!i)return!1;for(var c=u;c--;){var _=s[c];if(!(i?_ in t:hasOwnProperty$7.call(t,_)))return!1}var l=o.get(e);if(l&&o.get(t))return l==t;var g=!0;o.set(e,t),o.set(t,e);for(var p=i;++c<u;){var y=e[_=s[c]],d=t[_];if(a)var f=i?a(d,y,_,t,e,o):a(y,d,_,e,t,o);if(!(void 0===f?y===d||n(y,d,r,a,o):f)){g=!1;break}p||(p="constructor"==_)}if(g&&!p){var h=e.constructor,T=t.constructor;h!=T&&"constructor"in e&&"constructor"in t&&!("function"==typeof h&&h instanceof h&&"function"==typeof T&&T instanceof T)&&(g=!1)}return o.delete(e),o.delete(t),g}var _equalObjects=equalObjects,DataView=_getNative(_root,"DataView"),_DataView=DataView,Promise$1=_getNative(_root,"Promise"),_Promise=Promise$1,Set=_getNative(_root,"Set"),_Set=Set,WeakMap=_getNative(_root,"WeakMap"),_WeakMap=WeakMap,mapTag$2="[object Map]",objectTag$1="[object Object]",promiseTag="[object Promise]",setTag$2="[object Set]",weakMapTag$1="[object WeakMap]",dataViewTag$2="[object DataView]",dataViewCtorString=_toSource(_DataView),mapCtorString=_toSource(_Map),promiseCtorString=_toSource(_Promise),setCtorString=_toSource(_Set),weakMapCtorString=_toSource(_WeakMap),getTag=_baseGetTag;(_DataView&&getTag(new _DataView(new ArrayBuffer(1)))!=dataViewTag$2||_Map&&getTag(new _Map)!=mapTag$2||_Promise&&getTag(_Promise.resolve())!=promiseTag||_Set&&getTag(new _Set)!=setTag$2||_WeakMap&&getTag(new _WeakMap)!=weakMapTag$1)&&(getTag=function(e){var t=_baseGetTag(e),r=t==objectTag$1?e.constructor:void 0,a=r?_toSource(r):"";if(a)switch(a){case dataViewCtorString:return dataViewTag$2;case mapCtorString:return mapTag$2;case promiseCtorString:return promiseTag;case setCtorString:return setTag$2;case weakMapCtorString:return weakMapTag$1}return t});var _getTag=getTag,COMPARE_PARTIAL_FLAG$3=1,argsTag$2="[object Arguments]",arrayTag$1="[object Array]",objectTag$2="[object Object]",objectProto$b=Object.prototype,hasOwnProperty$8=objectProto$b.hasOwnProperty;function baseIsEqualDeep(e,t,r,a,n,o){var i=isArray_1(e),s=isArray_1(t),u=i?arrayTag$1:_getTag(e),c=s?arrayTag$1:_getTag(t),_=(u=u==argsTag$2?objectTag$2:u)==objectTag$2,l=(c=c==argsTag$2?objectTag$2:c)==objectTag$2,g=u==c;if(g&&isBuffer_1(e)){if(!isBuffer_1(t))return!1;i=!0,_=!1}if(g&&!_)return o||(o=new _Stack),i||isTypedArray_1(e)?_equalArrays(e,t,r,a,n,o):_equalByTag(e,t,u,r,a,n,o);if(!(r&COMPARE_PARTIAL_FLAG$3)){var p=_&&hasOwnProperty$8.call(e,"__wrapped__"),y=l&&hasOwnProperty$8.call(t,"__wrapped__");if(p||y){var d=p?e.value():e,f=y?t.value():t;return o||(o=new _Stack),n(d,f,r,a,o)}}return!!g&&(o||(o=new _Stack),_equalObjects(e,t,r,a,n,o))}var _baseIsEqualDeep=baseIsEqualDeep;function baseIsEqual(e,t,r,a,n){return e===t||(null==e||null==t||!isObjectLike_1(e)&&!isObjectLike_1(t)?e!=e&&t!=t:_baseIsEqualDeep(e,t,r,a,baseIsEqual,n))}var _baseIsEqual=baseIsEqual,COMPARE_PARTIAL_FLAG$4=1,COMPARE_UNORDERED_FLAG$2=2;function baseIsMatch(e,t,r,a){var n=r.length,o=n,i=!a;if(null==e)return!o;for(e=Object(e);n--;){var s=r[n];if(i&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++n<o;){var u=(s=r[n])[0],c=e[u],_=s[1];if(i&&s[2]){if(void 0===c&&!(u in e))return!1}else{var l=new _Stack;if(a)var g=a(c,_,u,e,t,l);if(!(void 0===g?_baseIsEqual(_,c,COMPARE_PARTIAL_FLAG$4|COMPARE_UNORDERED_FLAG$2,a,l):g))return!1}}return!0}var _baseIsMatch=baseIsMatch;function isStrictComparable(e){return e==e&&!isObject_1(e)}var _isStrictComparable=isStrictComparable;function getMatchData(e){for(var t=keys_1(e),r=t.length;r--;){var a=t[r],n=e[a];t[r]=[a,n,_isStrictComparable(n)]}return t}var _getMatchData=getMatchData;function matchesStrictComparable(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}var _matchesStrictComparable=matchesStrictComparable;function baseMatches(e){var t=_getMatchData(e);return 1==t.length&&t[0][2]?_matchesStrictComparable(t[0][0],t[0][1]):function(r){return r===e||_baseIsMatch(r,e,t)}}var _baseMatches=baseMatches,symbolTag$1="[object Symbol]";function isSymbol(e){return"symbol"==typeof e||isObjectLike_1(e)&&_baseGetTag(e)==symbolTag$1}var isSymbol_1=isSymbol,reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/;function isKey(e,t){if(isArray_1(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!isSymbol_1(e))||(reIsPlainProp.test(e)||!reIsDeepProp.test(e)||null!=t&&e in Object(t))}var _isKey=isKey,FUNC_ERROR_TEXT="Expected a function";function memoize(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(FUNC_ERROR_TEXT);var r=function(){var a=arguments,n=t?t.apply(this,a):a[0],o=r.cache;if(o.has(n))return o.get(n);var i=e.apply(this,a);return r.cache=o.set(n,i)||o,i};return r.cache=new(memoize.Cache||_MapCache),r}memoize.Cache=_MapCache;var memoize_1=memoize,MAX_MEMOIZE_SIZE=500;function memoizeCapped(e){var t=memoize_1(e,(function(e){return r.size===MAX_MEMOIZE_SIZE&&r.clear(),e})),r=t.cache;return t}var _memoizeCapped=memoizeCapped,rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reEscapeChar=/\\(\\)?/g,stringToPath=_memoizeCapped((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(rePropName,(function(e,r,a,n){t.push(a?n.replace(reEscapeChar,"$1"):r||e)})),t})),_stringToPath=stringToPath;function arrayMap(e,t){for(var r=-1,a=null==e?0:e.length,n=Array(a);++r<a;)n[r]=t(e[r],r,e);return n}var _arrayMap=arrayMap,INFINITY=1/0,symbolProto$1=_Symbol?_Symbol.prototype:void 0,symbolToString=symbolProto$1?symbolProto$1.toString:void 0;function baseToString(e){if("string"==typeof e)return e;if(isArray_1(e))return _arrayMap(e,baseToString)+"";if(isSymbol_1(e))return symbolToString?symbolToString.call(e):"";var t=e+"";return"0"==t&&1/e==-INFINITY?"-0":t}var _baseToString=baseToString;function toString(e){return null==e?"":_baseToString(e)}var toString_1=toString;function castPath(e,t){return isArray_1(e)?e:_isKey(e,t)?[e]:_stringToPath(toString_1(e))}var _castPath=castPath,INFINITY$1=1/0;function toKey(e){if("string"==typeof e||isSymbol_1(e))return e;var t=e+"";return"0"==t&&1/e==-INFINITY$1?"-0":t}var _toKey=toKey;function baseGet(e,t){for(var r=0,a=(t=_castPath(t,e)).length;null!=e&&r<a;)e=e[_toKey(t[r++])];return r&&r==a?e:void 0}var _baseGet=baseGet;function get(e,t,r){var a=null==e?void 0:_baseGet(e,t);return void 0===a?r:a}var get_1=get;function baseHasIn(e,t){return null!=e&&t in Object(e)}var _baseHasIn=baseHasIn;function hasPath(e,t,r){for(var a=-1,n=(t=_castPath(t,e)).length,o=!1;++a<n;){var i=_toKey(t[a]);if(!(o=null!=e&&r(e,i)))break;e=e[i]}return o||++a!=n?o:!!(n=null==e?0:e.length)&&isLength_1(n)&&_isIndex(i,n)&&(isArray_1(e)||isArguments_1(e))}var _hasPath=hasPath;function hasIn(e,t){return null!=e&&_hasPath(e,t,_baseHasIn)}var hasIn_1=hasIn,COMPARE_PARTIAL_FLAG$5=1,COMPARE_UNORDERED_FLAG$3=2;function baseMatchesProperty(e,t){return _isKey(e)&&_isStrictComparable(t)?_matchesStrictComparable(_toKey(e),t):function(r){var a=get_1(r,e);return void 0===a&&a===t?hasIn_1(r,e):_baseIsEqual(t,a,COMPARE_PARTIAL_FLAG$5|COMPARE_UNORDERED_FLAG$3)}}var _baseMatchesProperty=baseMatchesProperty;function identity(e){return e}var identity_1=identity;function baseProperty(e){return function(t){return null==t?void 0:t[e]}}var _baseProperty=baseProperty;function basePropertyDeep(e){return function(t){return _baseGet(t,e)}}var _basePropertyDeep=basePropertyDeep;function property(e){return _isKey(e)?_baseProperty(_toKey(e)):_basePropertyDeep(e)}var property_1=property;function baseIteratee(e){return"function"==typeof e?e:null==e?identity_1:"object"==typeof e?isArray_1(e)?_baseMatchesProperty(e[0],e[1]):_baseMatches(e):property_1(e)}var _baseIteratee=baseIteratee;function mapValues(e,t){var r={};return t=_baseIteratee(t),_baseForOwn(e,(function(e,a,n){_baseAssignValue(r,a,t(e,a,n))})),r}var mapValues_1=mapValues,isUnitlessNumber={boxFlex:!0,boxFlexGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,strokeDashoffset:!0,strokeOpacity:!0,strokeWidth:!0};function prefixKey(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}var prefixes=["Webkit","ms","Moz","O"];Object.keys(isUnitlessNumber).forEach((function(e){prefixes.forEach((function(t){isUnitlessNumber[prefixKey(t,e)]=isUnitlessNumber[e]}))}));var shorthandPropertyExpansions={background:{backgroundImage:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundColor:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0}},CSSProperty={isUnitlessNumber:isUnitlessNumber,shorthandPropertyExpansions:shorthandPropertyExpansions},CSSProperty_1=CSSProperty;function isNumber(e){return"number"==typeof e}for(var _a,unpackShorthandStyles=function(e){var t=e.css,r=t.padding,a=t.margin,n=__rest(t,["padding","margin"]),o={};return r&&(o={paddingRight:r,paddingLeft:r,paddingBottom:r,paddingTop:r}),a&&(o=__assign(__assign({},o),{marginRight:a,marginLeft:a,marginBottom:a,marginTop:a})),__assign(__assign({},e),{css:__assign(__assign({},o),n)})},convertStyleNumberValues=function(e){var t=e.css,r={};return Object.entries(t).forEach((function(e){var t=e[0],a=e[1];if(isNumber(a))return CSSProperty_1.isUnitlessNumber[t]?void(r[t]=""+a):void(r[t]=a+"px");r[t]=a})),__assign(__assign({},e),{css:r})},typographyNode=function(e){var t=get_1(e,"data.custom.variant","P");return __assign(__assign({},e),{type:t})},normalizeFlexBasis=function(e){var t=e.css.flexBasis;return"0"===t||"0px"===t?__assign(__assign({},e),{css:__assign(__assign({},e.css),{flexBasis:"0%"})}):e},adaptCustomNodes=function(e){return mapValues_1(e,(function(e){var t=e;return"Typography"===t.type&&(t=typographyNode(t)),t.css&&isObject_1(t.css)&&t.css.flexBasis&&(t=normalizeFlexBasis(t)),t.css&&(t=unpackShorthandStyles(t),t=convertStyleNumberValues(t)),t}))},eventPrefix=function(e){return"candu.sdk."+e},errorPrefix=function(e){return eventPrefix("error."+e)},ERROR_SLUGS={UNKOWN_NODE_TYPE:"unknown_node_type",UNKOWN_BLOCK_NODE_TYPE:"unkown_block_node_type",UNKOWN_INLINE_NODE_TYPE:"unkown_inline_node_type",UNKOWN_NODE_OBJECT_TYPE:"unkown_node_object_type",TUTORIAL_ERROR:"tutorial_error_boundary",PORTAL_ERROR:"portal_error_boundary",STYLEGUIDE_MAP_ERROR:"styleguide_map",RENDER_NODE_ERROR:"render_node"},EVENT_NAMES={HEARTBEAT:eventPrefix("heartbeat"),PREVIEW_OPEN:eventPrefix("preview.open"),PORTAL:eventPrefix("portal"),TUTORIAL:eventPrefix("tutorial"),TUTORIAL_INTERACTION:eventPrefix("tutorial.interaction"),PORTAL_ASSET_NOT_FOUND:errorPrefix("portal_asset_not_found"),PORTAL_NO_SEGMENT_IDS:errorPrefix("portal_no_segment_ids"),NO_MATCHING_TUTORIALS:errorPrefix("no_matching_tutorials"),NO_VALID_TUTORIAL_IDENTIFIER:errorPrefix("no_valid_tutorial_identifier"),COMMIT_API_LOADING_ERROR:errorPrefix("commit_api"),TUTORIAL_LOADING_ERROR:errorPrefix("tutorial"),UNKOWN_NODE_TYPE:errorPrefix(ERROR_SLUGS.UNKOWN_NODE_TYPE),UNKOWN_INLINE_NODE_TYPE:errorPrefix(ERROR_SLUGS.UNKOWN_INLINE_NODE_TYPE),UNKOWN_NODE_OBJECT_TYPE:errorPrefix(ERROR_SLUGS.UNKOWN_NODE_OBJECT_TYPE),TUTORIAL_ERROR:errorPrefix(ERROR_SLUGS.TUTORIAL_ERROR),PORTAL_ERROR:errorPrefix(ERROR_SLUGS.PORTAL_ERROR),STYLEGUIDE_MAP_ERROR:errorPrefix(ERROR_SLUGS.TUTORIAL_ERROR),RENDER_NODE_ERROR:errorPrefix(ERROR_SLUGS.TUTORIAL_ERROR),CIRCULAR_DEPENDENCY_EMBED_PORTAL:errorPrefix("circular_dependecy_embed_portal"),CIRCULAR_DEPENDENCY_EMBED_TUTORIAL:errorPrefix("circular_dependecy_embed_tutorial")},PORTAL_ASSET_NOT_FOUND="Could not find the requested Portal. This could happen because:\n1. The Portal does not exist or it was deleted.\n2. The Portal has not been made avaliable to be rendered.\n3. CORS Authenticaton failed.\nSee http://udn.ac/portal-not-found for more information.\n",unknownMessage=function(e){return"An error has occured while trying to parse your Tutorial.\nUpgrade the SDK to the latest version to get rid of this error.\nErrorCode: "+e+"."},EVENTING_NOT_INITIALIZED="You tried to send an event, but you haven't initialized eventing.\nThis is happening because you called eventing outside the scope of the CanduProvider. It can be fixed by:\n1. Adding CanduProvider to the root of the application.\n2. Initializing a new Eventing object outside of Candu.\nRead here for more context: http://udn.ac/tracking-not-init.\n",PORTAL_NO_SEGMENT_IDS="You have tried to render a Portal that doesn't contain any content.\nAdd content to your Portal: https://udn.ac/update-portals.\n",NO_MATCHING_TUTORIALS="The Tutorial will not be rendered because there are no matching segments for the given user.",ERROR_MESSAGES=((_a={EVENTING_NOT_INITIALIZED:EVENTING_NOT_INITIALIZED})[EVENT_NAMES.PORTAL_ASSET_NOT_FOUND]=PORTAL_ASSET_NOT_FOUND,_a[EVENT_NAMES.PORTAL_NO_SEGMENT_IDS]=PORTAL_NO_SEGMENT_IDS,_a[EVENT_NAMES.NO_MATCHING_TUTORIALS]=NO_MATCHING_TUTORIALS,_a[EVENT_NAMES.NO_VALID_TUTORIAL_IDENTIFIER]="(Candu/Tutorial) You must define one of tutorialId, slug, commitId or contentHashId.",_a[EVENT_NAMES.TUTORIAL_LOADING_ERROR]="An error has occurred while trying to load the Tutorial",_a[EVENT_NAMES.UNKOWN_INLINE_NODE_TYPE]=unknownMessage(ERROR_SLUGS.UNKOWN_INLINE_NODE_TYPE),_a[EVENT_NAMES.UNKOWN_NODE_TYPE]=unknownMessage(ERROR_SLUGS.UNKOWN_NODE_TYPE),_a[EVENT_NAMES.CIRCULAR_DEPENDENCY_EMBED_PORTAL]="Circular dependency found on Embeded Portal. Please take a look at the Portal Content.",_a[EVENT_NAMES.CIRCULAR_DEPENDENCY_EMBED_TUTORIAL]="Circular dependency found on Embeded Tutorial. Please take a look at the Tutorial Content.",_a[EVENT_NAMES.PORTAL_ERROR]="An error has occured within Portal",_a[EVENT_NAMES.TUTORIAL_ERROR]="An error has occured within Tutorial",_a[EVENT_NAMES.RENDER_NODE_ERROR]="An error has occured while rendering tutorial node",_a[EVENT_NAMES.STYLEGUIDE_MAP_ERROR]="An error has occured while mapping node to styleguide",_a),defaultStyleguide={Alert:!0,B:!0,Badge:!0,Button:!0,Card:!0,Code:!0,Document:!0,Em:!0,EmbedPortal:!0,EmbedTutorial:!0,Flex:!0,FlexItem:!0,H1:!0,H2:!0,H3:!0,H4:!0,H5:!0,H6:!0,Image:!0,InlineCode:!0,Link:!0,List:!0,ListItem:!0,P:!0,RichText:!0,Spacing:!0,Text:!0,U:!0,View:!0,Player:!0},trackStyleguideProperties=function(e){var t={};return Object.keys(e).forEach((function(r){defaultStyleguide[r]&&(t["styleguide."+r]=e[r].displayName||!0)})),t},LOGGER={error:console.error,warning:console.warn},internalEventing=function(e){var t=e.identify,r=e.track;return{provider:function(e){var a=e.userId,n=e.traits,o=e.styleguide;t(a,n),r(EVENT_NAMES.HEARTBEAT,trackStyleguideProperties(o))},tutorialDocumentLoadingError:function(e){var t=e.tutorialId,a=e.slug,n=e.contentHashId;LOGGER.error(ERROR_MESSAGES[EVENT_NAMES.TUTORIAL_LOADING_ERROR]),r(EVENT_NAMES.TUTORIAL_LOADING_ERROR,{tutorialId:t,slug:a,contentHashId:n})}}},e={},n=function(){return e.randomBytes(16)},t=[],r=0;r<256;++r)t[r]=(r+256).toString(16).substr(1);var i,u,o=function(e,r){var a=r||0,n=t;return[n[e[a++]],n[e[a++]],n[e[a++]],n[e[a++]],"-",n[e[a++]],n[e[a++]],"-",n[e[a++]],n[e[a++]],"-",n[e[a++]],n[e[a++]],"-",n[e[a++]],n[e[a++]],n[e[a++]],n[e[a++]],n[e[a++]],n[e[a++]]].join("")},a=function(e,t,r){var a=t&&r||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var i=(e=e||{}).random||(e.rng||n)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t)for(var s=0;s<16;++s)t[a+s]=i[s];return t||o(i)};!function(e){e.UserGenerated="UserGenerated",e.SDK="SDK"}(i||(i={})),function(e){e.Identify="Identify",e.Group="Group",e.Track="Track",e.Page="Page",e.Screen="Screen"}(u||(u={}));var c,s,N,L,C,D,w$1,M,l=function(){return"undefined"!=typeof window&&window.localStorage},p=function(e){return function(t){l()&&null!=t&&window.localStorage.setItem(e,JSON.stringify(t))}},m={anonymousId:{getOrCreate:(c="candu:anonymous_id",s=function(){var e=a();return p("candu:anonymous_id")(e),e},function(){return function(e){return function(){if(l()){var t=window.localStorage.getItem(e);if(t)try{return JSON.parse(t)}catch(e){return null}}}}(c)()||s()}),set:p("candu:anonymous_id")}},w=m.anonymousId.getOrCreate,e$1="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t$1="object"==typeof e$1&&e$1&&e$1.Object===Object&&e$1,r$1="object"==typeof self&&self&&self.Object===Object&&self,o$1=(t$1||r$1||Function("return this")()).Symbol,i$1=Object.prototype,u$1=i$1.hasOwnProperty,a$1=i$1.toString,c$1=o$1?o$1.toStringTag:void 0,l$1=function(e){var t=u$1.call(e,c$1),r=e[c$1];try{e[c$1]=void 0;var a=!0}catch(e){}var n=a$1.call(e);return a&&(t?e[c$1]=r:delete e[c$1]),n},E=Object.prototype.toString,f=function(e){return E.call(e)},s$1="[object Null]",d="[object Undefined]",v=o$1?o$1.toStringTag:void 0,p$1=function(e){return null==e?void 0===e?d:s$1:v&&v in Object(e)?l$1(e):f(e)},T=Array.isArray,O=function(e){return null!=e&&"object"==typeof e},A="[object String]",g=function(e){return"string"==typeof e||!T(e)&&O(e)&&p$1(e)==A},m$1="[object Number]",S=function(e){return"number"==typeof e||O(e)&&p$1(e)==m$1},_=/^([a-zA-Z0-9]|_|-)+$/,y=function(e){return g(e)&&e.length>=3&&e.length<100&&_.test(e)},P=function(e){return S(e)&&e>=0},b=function(e){return g(e)&&!!e.match(/^[0-9a-zA-Z]*$/)&&e.length>=10},I=function(e){return P(e)||g(e)&&e.trim().length>0};!function(e){e.SDK="SDK",e.PREVIEW="PREVIEW"}(N||(N={})),function(e){e.BOOTSTRAP="Bootstrap",e.CHANGE_POSITION="ChangePosition",e.CLOSE_PREVIEW="ClosePreview",e.PREVIEW_LOADED="PreviewLoaded",e.SET_AVALIABLE_PORTALS="SetAvaliablePortals",e.SET_CONTENT="SetContent",e.SET_SELECTED_ELEMENT="SetSelectedElement",e.SET_VIEW_MODE="SetViewMode",e.ADD_ELEMENT="AddElement",e.REMOVE_ELEMENT="RemoveElement",e.UPDATE_ELEMENT="UpdateElement",e.SET_ELEMENT="SetElement"}(L||(L={})),(C||(C={})).ON_CLICK="OnClick",function(e){e.NATIVE="Native",e.PENDO="Pendo"}(D||(D={})),function(e){e.NAVIGATE="Navigate",e.CHANGE_TUTORIAL="ChangeTutorial",e.OPEN_GUIDE="OpenGuide"}(w$1||(w$1={})),function(e){e.PRIMARY="primary",e.SECONDARY="primary",e.WARNING="warning",e.DANGER="danger",e.NEUTRAL="neutral",e.ACTIVE="active",e.INFO="info"}(M||(M={}));var G,B=M.PRIMARY;!function(e){e.U="U",e.B="B",e.Em="Em",e.InlineCode="InlineCode"}(G||(G={}));var x,F,Q,nn,z=function(e){return g(e)&&!!e.match(/^[0-9a-zA-Z]{40}$/)},H=function(e){return P(e)},K=function(e){return y(e)};!function(e){e.COLLAPSED="Collapsed",e.EXPANDED="Expanded",e.MINIMIZED="Minimized"}(x||(x={})),function(e){e.TUTORIAL="Tutorial",e.PORTAL="Portal"}(F||(F={})),function(e){e.Global="Global",e.Organization="Organization"}(Q||(Q={})),function(e){e.Root="root",e.Rule="rule",e.Atrule="atrule",e.Decl="decl",e.Any="any"}(nn||(nn={}));var invariant=function(e,t,r,a,n,o,i,s){if(!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[r,a,n,o,i,s],_=0;(u=new Error(t.replace(/%s/g,(function(){return c[_++]})))).name="Invariant Violation"}throw u.framesToPop=1,u}},invariant_1=invariant,isValidStyleguideProps=function(e){return invariant_1(!e||isObject_1(e),"(Candu) styleguide must be undefined or an object")},providerValidation=function(e){var t=e.clientToken,r=e.userId,a=e.traits,n=e.options,o=e.styleguide,i=__rest(e,["clientToken","userId","traits","options","styleguide"]);return invariant_1(b(t),"(Candu) you must provide a valid clientToken"),invariant_1(!r||I(r),"(Candu) you must provide a valid userId"),isValidStyleguideProps(o),invariant_1(!a||isObject_1(a),"(Candu) traits must be undefined or an object"),invariant_1(!n||isObject_1(n),"(Candu) options must be undefined or an object"),__assign(__assign({},i),{clientToken:t,traits:a||{},options:n||{},styleguide:o||{},userId:r||w()})},tutorialValidation=function(e){var t=e.slug,r=e.styleguide,a=e.contentHashId,n=e.tutorialId,o=e.tutorialDocument,i=__rest(e,["slug","styleguide","contentHashId","tutorialId","tutorialDocument"]);return isValidStyleguideProps(r),__assign(__assign({},i),{slug:t,styleguide:r||{},contentHashId:a,tutorialId:n,tutorialDocument:o})},portalValidation=function(e){var t=e.slug,r=e.styleguide;return isValidStyleguideProps(r),{slug:t,styleguide:r||{}}};const API_BASE_URL="https://api.candu.ai",CDN_BASE_URL="https://cdn.candu.ai";var API_BASE_URL$1=API_BASE_URL,CDN_BASE_URL$1=CDN_BASE_URL,ENDPOINTS={segmentMembership:"/api/segmentMemberships",tutorialDocuments:"/api/tutorialDocumentsEditor"},fetchURL=function(e){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,fetch(e)];case 1:return[2,t.sent().json()]}}))}))},fetchFromApi=function(e){return fetchURL(""+API_BASE_URL$1+e)},fetchFromCdn=function(e){return fetchURL(""+CDN_BASE_URL$1+e)},getTutorialDocument=function(e){return{byId:function(t){return fetchFromApi(ENDPOINTS.tutorialDocuments+"/"+t+"?token="+e)},bySlug:function(t){return fetchFromCdn("/tutorials/"+e+"/"+t+".json")},byContentHash:function(t){return fetchFromCdn("/tutorials/"+e+"/"+t+".json")}}},RESOURCES={tutorialDocumentLatestPublished:function(e,t){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(r){return[2,fetchFromApi(ENDPOINTS.tutorialDocuments+"?token="+e+"&finder=latestPublished&tutorialId="+t)]}))}))},portalAsset:function(e,t){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(r){return[2,fetchFromCdn("/portals/"+e+"/"+t+"/head.json")]}))}))},segmentMembership:function(e,t){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(r){return[2,fetchFromApi(ENDPOINTS.segmentMembership+"/"+t+"?token="+e)]}))}))},tutorialDocument:function(e,t,r){var a=e.contentHashId,n=e.tutorialId,o=e.tutorialDocument,i=e.slug,s=getTutorialDocument(t);return H(n)?s.byId(n):K(i)?s.bySlug(i):z(a)?s.byContentHash(a):isObject_1(o)?Promise.resolve(o):(LOGGER.error(ERROR_MESSAGES[EVENT_NAMES.NO_VALID_TUTORIAL_IDENTIFIER]),r.track(EVENT_NAMES.NO_VALID_TUTORIAL_IDENTIFIER,{slug:e.slug}),null)}},logError=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return console.error.apply(console,e)},logWarning=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return console.warn.apply(console,e)},logger={error:logError,warning:logWarning},getEventHandler=function(e){switch(e.trigger){case C.ON_CLICK:default:return"onClick"}},getActionHandler=function(e,t){var r,a,n;switch(e.handler.type){case w$1.NAVIGATE:return(r={})[getEventHandler(e)]=function(){var r=e.handler,a=r.href,n=r.target;t(e),"Blank"===n?window.open(a,"_blank"):a&&a.includes("mailto:")?window.location=a:document.location.href=a},r;case w$1.CHANGE_TUTORIAL:return(a={})[getEventHandler(e)]=function(){var t=e.handler.tutorialId;logError("TODO -> change tutorial",t)},a;case w$1.OPEN_GUIDE:return(n={})[getEventHandler(e)]=function(){var t=e.handler.guideId;logError("TODO -> open guide",t)},n;default:return{}}},getActionHandlers=function(e,t){var r=e.data;if(!r||!r.actions)return{};var a=function(e){t.provider.eventing.track(EVENT_NAMES.TUTORIAL_INTERACTION,__assign(__assign({},e),t.trackingIdentifiers||{}))};return r.actions.map((function(e){return getActionHandler(e,a)})).reduce((function(e,t){return __assign(__assign({},e),t)}),{})},mapNodeToStyleguide=function(e,t){try{var r=t.provider,a=t.document,n=t.trackingIdentifiers,o=a.nodes[e];if(!o)return logger.error("Document is corrupted. Refusing to move further."),null;var i=function(e){return mapNodeToStyleguide(e,t)},s=o.type,u=o.props,c=o.css,_=__assign(__assign(__assign({},u||{}),{style:c||{},children:(u||{}).children||o.nodes&&o.nodes.map(i)}),getActionHandlers(o,{trackingIdentifiers:n,provider:r})),l={nodeId:e,node:o,document:a,render:{node:i,styleguide:function(e,r){return void 0===r&&(r={}),t.renderNode(e,{api:l,attributes:r})},tutorial:function(e){return t.renderTutorial(e)},portal:function(e){return t.renderPortal(e)}},trackingIdentifiers:n},g=l.render.styleguide(s,_);return g||(logger.error(ERROR_MESSAGES[EVENT_NAMES.UNKOWN_NODE_TYPE],{type:s}),r.eventing.track(EVENT_NAMES.UNKOWN_NODE_TYPE,{type:s}),null)}catch(e){return logger.error(ERROR_MESSAGES[EVENT_NAMES.STYLEGUIDE_MAP_ERROR],e),null}},mergeStyleguidesFromContext=memoize_1((function(e,t){var r,a,n=e.provider,o=e.portal,i=e.tutorial,s=n.styleguide;return i&&(a=i.styleguide),o&&(r=o.styleguide),__assign(__assign(__assign(__assign({},s||{}),r||{}),a||{}),t||{})})),DEFAULT_ALT="",DEFAULT_ALERT_COLOR="#EDEDED",DEFAULT_TAB_HEADER_COLOR="#333745",DEFAULT_TAB_ITEM_COLOR="#838792",DEFAULT_TAB_ACTIVE_COLOR="#FEFEFE",DEFAULT_TAB_COLOR="#FEFEFE",STYLEGUIDE_COLORS={primary:"#6310E5",secondary:"#59C3C3",tertiary:"#4D515D",warning:"#FCAD0D",danger:"#EE4266"},attachStylesheet=function(e){var t=document.createElement("link");t.setAttribute("rel","stylesheet"),t.setAttribute("href",CDN_BASE_URL$1+"/styleguides/applications/"+e+"/default/main.css"),document.head.appendChild(t)};exports.DEFAULT_ALERT_COLOR=DEFAULT_ALERT_COLOR,exports.DEFAULT_ALT=DEFAULT_ALT,exports.DEFAULT_TAB_ACTIVE_COLOR=DEFAULT_TAB_ACTIVE_COLOR,exports.DEFAULT_TAB_COLOR=DEFAULT_TAB_COLOR,exports.DEFAULT_TAB_HEADER_COLOR=DEFAULT_TAB_HEADER_COLOR,exports.DEFAULT_TAB_ITEM_COLOR=DEFAULT_TAB_ITEM_COLOR,exports.ERROR_MESSAGES=ERROR_MESSAGES,exports.ERROR_SLUGS=ERROR_SLUGS,exports.EVENT_NAMES=EVENT_NAMES,exports.LOGGER=LOGGER,exports.RESOURCES=RESOURCES,exports.STYLEGUIDE_COLORS=STYLEGUIDE_COLORS,exports.adaptCustomNodes=adaptCustomNodes,exports.attachStylesheet=attachStylesheet,exports.convertStyleNumberValues=convertStyleNumberValues,exports.defaultStyleguide=defaultStyleguide,exports.internalEventing=internalEventing,exports.logError=logError,exports.logWarning=logWarning,exports.logger=logger,exports.mapNodeToStyleguide=mapNodeToStyleguide,exports.mergeStyleguidesFromContext=mergeStyleguidesFromContext,exports.portalValidation=portalValidation,exports.providerValidation=providerValidation,exports.tutorialValidation=tutorialValidation,exports.unpackShorthandStyles=unpackShorthandStyles;
//# sourceMappingURL=index.cjs.js.map

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

import{isNumber as t}from"util";import e from"crypto";var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(t,e){return t(e={exports:{}},e.exports),e.exports}var o="object"==typeof r&&r&&r.Object===Object&&r,a="object"==typeof self&&self&&self.Object===Object&&self,i=o||a||Function("return this")(),u=i.Symbol,c=Object.prototype,s=c.hasOwnProperty,l=c.toString,d=u?u.toStringTag:void 0;var f=function(t){var e=s.call(t,d),r=t[d];try{t[d]=void 0;var n=!0}catch(t){}var o=l.call(t);return n&&(e?t[d]=r:delete t[d]),o},_=Object.prototype.toString;var p=function(t){return _.call(t)},v="[object Null]",h="[object Undefined]",y=u?u.toStringTag:void 0;var b=function(t){return null==t?void 0===t?h:v:y&&y in Object(t)?f(t):p(t)};var E=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},g="[object AsyncFunction]",O="[object Function]",T="[object GeneratorFunction]",R="[object Proxy]";var I,N=function(t){if(!E(t))return!1;var e=b(t);return e==O||e==T||e==g||e==R},A=i["__core-js_shared__"],m=(I=/[^.]+$/.exec(A&&A.keys&&A.keys.IE_PROTO||""))?"Symbol(src)_1."+I:"";var j=function(t){return!!m&&m in t},D=Function.prototype.toString;var P=function(t){if(null!=t){try{return D.call(t)}catch(t){}try{return t+""}catch(t){}}return""},w=/^\[object .+?Constructor\]$/,L=Function.prototype,S=Object.prototype,C=L.toString,U=S.hasOwnProperty,k=RegExp("^"+C.call(U).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var B=function(t){return!(!E(t)||j(t))&&(N(t)?k:w).test(P(t))};var M=function(t,e){return null==t?void 0:t[e]};var $=function(t,e){var r=M(t,e);return B(r)?r:void 0},x=function(){try{var t=$(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();var z=function(t,e,r){"__proto__"==e&&x?x(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r};var W=function(t){return function(e,r,n){for(var o=-1,a=Object(e),i=n(e),u=i.length;u--;){var c=i[t?u:++o];if(!1===r(a[c],c,a))break}return e}}();var G=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n};var Y=function(t){return null!=t&&"object"==typeof t},F="[object Arguments]";var V=function(t){return Y(t)&&b(t)==F},K=Object.prototype,H=K.hasOwnProperty,J=K.propertyIsEnumerable,Z=V(function(){return arguments}())?V:function(t){return Y(t)&&H.call(t,"callee")&&!J.call(t,"callee")},q=Array.isArray;var X=function(){return!1},Q=n((function(t,e){var r=e&&!e.nodeType&&e,n=r&&t&&!t.nodeType&&t,o=n&&n.exports===r?i.Buffer:void 0,a=(o?o.isBuffer:void 0)||X;t.exports=a})),tt=9007199254740991,et=/^(?:0|[1-9]\d*)$/;var rt=function(t,e){var r=typeof t;return!!(e=null==e?tt:e)&&("number"==r||"symbol"!=r&&et.test(t))&&t>-1&&t%1==0&&t<e},nt=9007199254740991;var ot=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=nt},at={};at["[object Float32Array]"]=at["[object Float64Array]"]=at["[object Int8Array]"]=at["[object Int16Array]"]=at["[object Int32Array]"]=at["[object Uint8Array]"]=at["[object Uint8ClampedArray]"]=at["[object Uint16Array]"]=at["[object Uint32Array]"]=!0,at["[object Arguments]"]=at["[object Array]"]=at["[object ArrayBuffer]"]=at["[object Boolean]"]=at["[object DataView]"]=at["[object Date]"]=at["[object Error]"]=at["[object Function]"]=at["[object Map]"]=at["[object Number]"]=at["[object Object]"]=at["[object RegExp]"]=at["[object Set]"]=at["[object String]"]=at["[object WeakMap]"]=!1;var it=function(t){return Y(t)&&ot(t.length)&&!!at[b(t)]};var ut=function(t){return function(e){return t(e)}},ct=n((function(t,e){var r=e&&!e.nodeType&&e,n=r&&t&&!t.nodeType&&t,a=n&&n.exports===r&&o.process,i=function(){try{var t=n&&n.require&&n.require("util").types;return t||a&&a.binding&&a.binding("util")}catch(t){}}();t.exports=i})),st=ct&&ct.isTypedArray,lt=st?ut(st):it,dt=Object.prototype.hasOwnProperty;var ft=function(t,e){var r=q(t),n=!r&&Z(t),o=!r&&!n&&Q(t),a=!r&&!n&&!o&&lt(t),i=r||n||o||a,u=i?G(t.length,String):[],c=u.length;for(var s in t)!e&&!dt.call(t,s)||i&&("length"==s||o&&("offset"==s||"parent"==s)||a&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||rt(s,c))||u.push(s);return u},_t=Object.prototype;var pt=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||_t)};var vt=function(t,e){return function(r){return t(e(r))}}(Object.keys,Object),ht=Object.prototype.hasOwnProperty;var yt=function(t){if(!pt(t))return vt(t);var e=[];for(var r in Object(t))ht.call(t,r)&&"constructor"!=r&&e.push(r);return e};var bt=function(t){return null!=t&&ot(t.length)&&!N(t)};var Et=function(t){return bt(t)?ft(t):yt(t)};var gt=function(t,e){return t&&W(t,e,Et)};var Ot=function(){this.__data__=[],this.size=0};var Tt=function(t,e){return t===e||t!=t&&e!=e};var Rt=function(t,e){for(var r=t.length;r--;)if(Tt(t[r][0],e))return r;return-1},It=Array.prototype.splice;var Nt=function(t){var e=this.__data__,r=Rt(e,t);return!(r<0)&&(r==e.length-1?e.pop():It.call(e,r,1),--this.size,!0)};var At=function(t){var e=this.__data__,r=Rt(e,t);return r<0?void 0:e[r][1]};var mt=function(t){return Rt(this.__data__,t)>-1};var jt=function(t,e){var r=this.__data__,n=Rt(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};function Dt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Dt.prototype.clear=Ot,Dt.prototype.delete=Nt,Dt.prototype.get=At,Dt.prototype.has=mt,Dt.prototype.set=jt;var Pt=Dt;var wt=function(){this.__data__=new Pt,this.size=0};var Lt=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r};var St=function(t){return this.__data__.get(t)};var Ct=function(t){return this.__data__.has(t)},Ut=$(i,"Map"),kt=$(Object,"create");var Bt=function(){this.__data__=kt?kt(null):{},this.size=0};var Mt=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},$t="__lodash_hash_undefined__",xt=Object.prototype.hasOwnProperty;var zt=function(t){var e=this.__data__;if(kt){var r=e[t];return r===$t?void 0:r}return xt.call(e,t)?e[t]:void 0},Wt=Object.prototype.hasOwnProperty;var Gt=function(t){var e=this.__data__;return kt?void 0!==e[t]:Wt.call(e,t)},Yt="__lodash_hash_undefined__";var Ft=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=kt&&void 0===e?Yt:e,this};function Vt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Vt.prototype.clear=Bt,Vt.prototype.delete=Mt,Vt.prototype.get=zt,Vt.prototype.has=Gt,Vt.prototype.set=Ft;var Kt=Vt;var Ht=function(){this.size=0,this.__data__={hash:new Kt,map:new(Ut||Pt),string:new Kt}};var Jt=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var Zt=function(t,e){var r=t.__data__;return Jt(e)?r["string"==typeof e?"string":"hash"]:r.map};var qt=function(t){var e=Zt(this,t).delete(t);return this.size-=e?1:0,e};var Xt=function(t){return Zt(this,t).get(t)};var Qt=function(t){return Zt(this,t).has(t)};var te=function(t,e){var r=Zt(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};function ee(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}ee.prototype.clear=Ht,ee.prototype.delete=qt,ee.prototype.get=Xt,ee.prototype.has=Qt,ee.prototype.set=te;var re=ee,ne=200;var oe=function(t,e){var r=this.__data__;if(r instanceof Pt){var n=r.__data__;if(!Ut||n.length<ne-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new re(n)}return r.set(t,e),this.size=r.size,this};function ae(t){var e=this.__data__=new Pt(t);this.size=e.size}ae.prototype.clear=wt,ae.prototype.delete=Lt,ae.prototype.get=St,ae.prototype.has=Ct,ae.prototype.set=oe;var ie=ae,ue="__lodash_hash_undefined__";var ce=function(t){return this.__data__.set(t,ue),this};var se=function(t){return this.__data__.has(t)};function le(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new re;++e<r;)this.add(t[e])}le.prototype.add=le.prototype.push=ce,le.prototype.has=se;var de=le;var fe=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1};var _e=function(t,e){return t.has(e)},pe=1,ve=2;var he=function(t,e,r,n,o,a){var i=r&pe,u=t.length,c=e.length;if(u!=c&&!(i&&c>u))return!1;var s=a.get(t);if(s&&a.get(e))return s==e;var l=-1,d=!0,f=r&ve?new de:void 0;for(a.set(t,e),a.set(e,t);++l<u;){var _=t[l],p=e[l];if(n)var v=i?n(p,_,l,e,t,a):n(_,p,l,t,e,a);if(void 0!==v){if(v)continue;d=!1;break}if(f){if(!fe(e,(function(t,e){if(!_e(f,e)&&(_===t||o(_,t,r,n,a)))return f.push(e)}))){d=!1;break}}else if(_!==p&&!o(_,p,r,n,a)){d=!1;break}}return a.delete(t),a.delete(e),d},ye=i.Uint8Array;var be=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r};var Ee=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r},ge=1,Oe=2,Te="[object Boolean]",Re="[object Date]",Ie="[object Error]",Ne="[object Map]",Ae="[object Number]",me="[object RegExp]",je="[object Set]",De="[object String]",Pe="[object Symbol]",we="[object ArrayBuffer]",Le="[object DataView]",Se=u?u.prototype:void 0,Ce=Se?Se.valueOf:void 0;var Ue=function(t,e,r,n,o,a,i){switch(r){case Le:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case we:return!(t.byteLength!=e.byteLength||!a(new ye(t),new ye(e)));case Te:case Re:case Ae:return Tt(+t,+e);case Ie:return t.name==e.name&&t.message==e.message;case me:case De:return t==e+"";case Ne:var u=be;case je:var c=n&ge;if(u||(u=Ee),t.size!=e.size&&!c)return!1;var s=i.get(t);if(s)return s==e;n|=Oe,i.set(t,e);var l=he(u(t),u(e),n,o,a,i);return i.delete(t),l;case Pe:if(Ce)return Ce.call(t)==Ce.call(e)}return!1};var ke=function(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t};var Be=function(t,e,r){var n=e(t);return q(t)?n:ke(n,r(t))};var Me=function(t,e){for(var r=-1,n=null==t?0:t.length,o=0,a=[];++r<n;){var i=t[r];e(i,r,t)&&(a[o++]=i)}return a};var $e=function(){return[]},xe=Object.prototype.propertyIsEnumerable,ze=Object.getOwnPropertySymbols,We=ze?function(t){return null==t?[]:(t=Object(t),Me(ze(t),(function(e){return xe.call(t,e)})))}:$e;var Ge=function(t){return Be(t,Et,We)},Ye=1,Fe=Object.prototype.hasOwnProperty;var Ve=function(t,e,r,n,o,a){var i=r&Ye,u=Ge(t),c=u.length;if(c!=Ge(e).length&&!i)return!1;for(var s=c;s--;){var l=u[s];if(!(i?l in e:Fe.call(e,l)))return!1}var d=a.get(t);if(d&&a.get(e))return d==e;var f=!0;a.set(t,e),a.set(e,t);for(var _=i;++s<c;){var p=t[l=u[s]],v=e[l];if(n)var h=i?n(v,p,l,e,t,a):n(p,v,l,t,e,a);if(!(void 0===h?p===v||o(p,v,r,n,a):h)){f=!1;break}_||(_="constructor"==l)}if(f&&!_){var y=t.constructor,b=e.constructor;y!=b&&"constructor"in t&&"constructor"in e&&!("function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b)&&(f=!1)}return a.delete(t),a.delete(e),f},Ke=$(i,"DataView"),He=$(i,"Promise"),Je=$(i,"Set"),Ze=$(i,"WeakMap"),qe=P(Ke),Xe=P(Ut),Qe=P(He),tr=P(Je),er=P(Ze),rr=b;(Ke&&"[object DataView]"!=rr(new Ke(new ArrayBuffer(1)))||Ut&&"[object Map]"!=rr(new Ut)||He&&"[object Promise]"!=rr(He.resolve())||Je&&"[object Set]"!=rr(new Je)||Ze&&"[object WeakMap]"!=rr(new Ze))&&(rr=function(t){var e=b(t),r="[object Object]"==e?t.constructor:void 0,n=r?P(r):"";if(n)switch(n){case qe:return"[object DataView]";case Xe:return"[object Map]";case Qe:return"[object Promise]";case tr:return"[object Set]";case er:return"[object WeakMap]"}return e});var nr=rr,or=1,ar="[object Arguments]",ir="[object Array]",ur="[object Object]",cr=Object.prototype.hasOwnProperty;var sr=function(t,e,r,n,o,a){var i=q(t),u=q(e),c=i?ir:nr(t),s=u?ir:nr(e),l=(c=c==ar?ur:c)==ur,d=(s=s==ar?ur:s)==ur,f=c==s;if(f&&Q(t)){if(!Q(e))return!1;i=!0,l=!1}if(f&&!l)return a||(a=new ie),i||lt(t)?he(t,e,r,n,o,a):Ue(t,e,c,r,n,o,a);if(!(r&or)){var _=l&&cr.call(t,"__wrapped__"),p=d&&cr.call(e,"__wrapped__");if(_||p){var v=_?t.value():t,h=p?e.value():e;return a||(a=new ie),o(v,h,r,n,a)}}return!!f&&(a||(a=new ie),Ve(t,e,r,n,o,a))};var lr=function t(e,r,n,o,a){return e===r||(null==e||null==r||!Y(e)&&!Y(r)?e!=e&&r!=r:sr(e,r,n,o,t,a))},dr=1,fr=2;var _r=function(t,e,r,n){var o=r.length,a=o,i=!n;if(null==t)return!a;for(t=Object(t);o--;){var u=r[o];if(i&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++o<a;){var c=(u=r[o])[0],s=t[c],l=u[1];if(i&&u[2]){if(void 0===s&&!(c in t))return!1}else{var d=new ie;if(n)var f=n(s,l,c,t,e,d);if(!(void 0===f?lr(l,s,dr|fr,n,d):f))return!1}}return!0};var pr=function(t){return t==t&&!E(t)};var vr=function(t){for(var e=Et(t),r=e.length;r--;){var n=e[r],o=t[n];e[r]=[n,o,pr(o)]}return e};var hr=function(t,e){return function(r){return null!=r&&(r[t]===e&&(void 0!==e||t in Object(r)))}};var yr=function(t){var e=vr(t);return 1==e.length&&e[0][2]?hr(e[0][0],e[0][1]):function(r){return r===t||_r(r,t,e)}},br="[object Symbol]";var Er=function(t){return"symbol"==typeof t||Y(t)&&b(t)==br},gr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Or=/^\w*$/;var Tr=function(t,e){if(q(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!Er(t))||(Or.test(t)||!gr.test(t)||null!=e&&t in Object(e))},Rr="Expected a function";function Ir(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError(Rr);var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var i=t.apply(this,n);return r.cache=a.set(o,i)||a,i};return r.cache=new(Ir.Cache||re),r}Ir.Cache=re;var Nr=Ir,Ar=500;var mr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,jr=/\\(\\)?/g,Dr=function(t){var e=Nr(t,(function(t){return r.size===Ar&&r.clear(),t})),r=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(mr,(function(t,r,n,o){e.push(n?o.replace(jr,"$1"):r||t)})),e}));var Pr=function(t,e){for(var r=-1,n=null==t?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o},wr=1/0,Lr=u?u.prototype:void 0,Sr=Lr?Lr.toString:void 0;var Cr=function t(e){if("string"==typeof e)return e;if(q(e))return Pr(e,t)+"";if(Er(e))return Sr?Sr.call(e):"";var r=e+"";return"0"==r&&1/e==-wr?"-0":r};var Ur=function(t){return null==t?"":Cr(t)};var kr=function(t,e){return q(t)?t:Tr(t,e)?[t]:Dr(Ur(t))},Br=1/0;var Mr=function(t){if("string"==typeof t||Er(t))return t;var e=t+"";return"0"==e&&1/t==-Br?"-0":e};var $r=function(t,e){for(var r=0,n=(e=kr(e,t)).length;null!=t&&r<n;)t=t[Mr(e[r++])];return r&&r==n?t:void 0};var xr=function(t,e,r){var n=null==t?void 0:$r(t,e);return void 0===n?r:n};var zr=function(t,e){return null!=t&&e in Object(t)};var Wr=function(t,e,r){for(var n=-1,o=(e=kr(e,t)).length,a=!1;++n<o;){var i=Mr(e[n]);if(!(a=null!=t&&r(t,i)))break;t=t[i]}return a||++n!=o?a:!!(o=null==t?0:t.length)&&ot(o)&&rt(i,o)&&(q(t)||Z(t))};var Gr=function(t,e){return null!=t&&Wr(t,e,zr)},Yr=1,Fr=2;var Vr=function(t,e){return Tr(t)&&pr(e)?hr(Mr(t),e):function(r){var n=xr(r,t);return void 0===n&&n===e?Gr(r,t):lr(e,n,Yr|Fr)}};var Kr=function(t){return t};var Hr=function(t){return function(e){return null==e?void 0:e[t]}};var Jr=function(t){return function(e){return $r(e,t)}};var Zr=function(t){return Tr(t)?Hr(Mr(t)):Jr(t)};var qr=function(t){return"function"==typeof t?t:null==t?Kr:"object"==typeof t?q(t)?Vr(t[0],t[1]):yr(t):Zr(t)};var Xr=function(t,e){var r={};return e=qr(e),gt(t,(function(t,n,o){z(r,n,e(t,n,o))})),r},Qr={boxFlex:!0,boxFlexGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,strokeDashoffset:!0,strokeOpacity:!0,strokeWidth:!0};var tn=["Webkit","ms","Moz","O"];Object.keys(Qr).forEach((function(t){tn.forEach((function(e){Qr[function(t,e){return t+e.charAt(0).toUpperCase()+e.substring(1)}(e,t)]=Qr[t]}))}));var en={isUnitlessNumber:Qr,shorthandPropertyExpansions:{background:{backgroundImage:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundColor:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0}}};const rn=t=>{const{padding:e,margin:r,...n}=t.css;let o={};return e&&(o={paddingRight:e,paddingLeft:e,paddingBottom:e,paddingTop:e}),r&&(o={...o,marginRight:r,marginLeft:r,marginBottom:r,marginTop:r}),{...t,css:{...o,...n}}},nn=e=>{const r=e.css,n={};return Object.entries(r).forEach(([e,r])=>{if(t(r))return en.isUnitlessNumber[e]?void(n[e]=`${r}`):void(n[e]=`${r}px`);n[e]=r}),{...e,css:n}},on=t=>Xr(t,t=>{let e=t;return"Typography"===e.type&&(e=(t=>{const e=xr(t,"data.custom.variant","P");return{...t,type:e}})(e)),e.css&&E(e.css)&&e.css.flexBasis&&(e=(t=>{const{flexBasis:e}=t.css;return"0"===e||"0px"===e?{...t,css:{...t.css,flexBasis:"0%"}}:t})(e)),e.css&&(e=rn(e),e=nn(e)),e}),an=t=>`candu.sdk.${t}`,un=t=>an(`error.${t}`),cn={UNKOWN_NODE_TYPE:"unknown_node_type",UNKOWN_BLOCK_NODE_TYPE:"unkown_block_node_type",UNKOWN_INLINE_NODE_TYPE:"unkown_inline_node_type",UNKOWN_NODE_OBJECT_TYPE:"unkown_node_object_type",TUTORIAL_ERROR:"tutorial_error_boundary",PORTAL_ERROR:"portal_error_boundary",STYLEGUIDE_MAP_ERROR:"styleguide_map",RENDER_NODE_ERROR:"render_node"},sn={HEARTBEAT:an("heartbeat"),PREVIEW_OPEN:an("preview.open"),PORTAL:an("portal"),TUTORIAL:an("tutorial"),TUTORIAL_INTERACTION:an("tutorial.interaction"),PORTAL_ASSET_NOT_FOUND:un("portal_asset_not_found"),PORTAL_NO_SEGMENT_IDS:un("portal_no_segment_ids"),NO_MATCHING_TUTORIALS:un("no_matching_tutorials"),NO_VALID_TUTORIAL_IDENTIFIER:un("no_valid_tutorial_identifier"),COMMIT_API_LOADING_ERROR:un("commit_api"),TUTORIAL_LOADING_ERROR:un("tutorial"),UNKOWN_NODE_TYPE:un(cn.UNKOWN_NODE_TYPE),UNKOWN_INLINE_NODE_TYPE:un(cn.UNKOWN_INLINE_NODE_TYPE),UNKOWN_NODE_OBJECT_TYPE:un(cn.UNKOWN_NODE_OBJECT_TYPE),TUTORIAL_ERROR:un(cn.TUTORIAL_ERROR),PORTAL_ERROR:un(cn.PORTAL_ERROR),STYLEGUIDE_MAP_ERROR:un(cn.TUTORIAL_ERROR),RENDER_NODE_ERROR:un(cn.TUTORIAL_ERROR),CIRCULAR_DEPENDENCY_EMBED_PORTAL:un("circular_dependecy_embed_portal"),CIRCULAR_DEPENDENCY_EMBED_TUTORIAL:un("circular_dependecy_embed_tutorial")},ln=t=>`An error has occured while trying to parse your Tutorial.\nUpgrade the SDK to the latest version to get rid of this error.\nErrorCode: ${t}.`,dn={EVENTING_NOT_INITIALIZED:"You tried to send an event, but you haven't initialized eventing.\nThis is happening because you called eventing outside the scope of the CanduProvider. It can be fixed by:\n1. Adding CanduProvider to the root of the application.\n2. Initializing a new Eventing object outside of Candu.\nRead here for more context: http://udn.ac/tracking-not-init.\n",[sn.PORTAL_ASSET_NOT_FOUND]:"Could not find the requested Portal. This could happen because:\n1. The Portal does not exist or it was deleted.\n2. The Portal has not been made avaliable to be rendered.\n3. CORS Authenticaton failed.\nSee http://udn.ac/portal-not-found for more information.\n",[sn.PORTAL_NO_SEGMENT_IDS]:"You have tried to render a Portal that doesn't contain any content.\nAdd content to your Portal: https://udn.ac/update-portals.\n",[sn.NO_MATCHING_TUTORIALS]:"The Tutorial will not be rendered because there are no matching segments for the given user.",[sn.NO_VALID_TUTORIAL_IDENTIFIER]:"(Candu/Tutorial) You must define one of tutorialId, slug, commitId or contentHashId.",[sn.TUTORIAL_LOADING_ERROR]:"An error has occurred while trying to load the Tutorial",[sn.UNKOWN_INLINE_NODE_TYPE]:ln(cn.UNKOWN_INLINE_NODE_TYPE),[sn.UNKOWN_NODE_TYPE]:ln(cn.UNKOWN_NODE_TYPE),[sn.CIRCULAR_DEPENDENCY_EMBED_PORTAL]:"Circular dependency found on Embeded Portal. Please take a look at the Portal Content.",[sn.CIRCULAR_DEPENDENCY_EMBED_TUTORIAL]:"Circular dependency found on Embeded Tutorial. Please take a look at the Tutorial Content.",[sn.PORTAL_ERROR]:"An error has occured within Portal",[sn.TUTORIAL_ERROR]:"An error has occured within Tutorial",[sn.RENDER_NODE_ERROR]:"An error has occured while rendering tutorial node",[sn.STYLEGUIDE_MAP_ERROR]:"An error has occured while mapping node to styleguide"},fn={Alert:!0,B:!0,Badge:!0,Button:!0,Card:!0,Code:!0,Document:!0,Em:!0,EmbedPortal:!0,EmbedTutorial:!0,Flex:!0,FlexItem:!0,H1:!0,H2:!0,H3:!0,H4:!0,H5:!0,H6:!0,Image:!0,InlineCode:!0,Link:!0,List:!0,ListItem:!0,P:!0,RichText:!0,Spacing:!0,Text:!0,U:!0,View:!0,Player:!0},_n={error:console.error,warning:console.warn},pn=({identify:t,track:e})=>({provider:({userId:r,traits:n,styleguide:o})=>{t(r,n),e(sn.HEARTBEAT,(t=>{const e={};return Object.keys(t).forEach(r=>{fn[r]&&(e[`styleguide.${r}`]=t[r].displayName||!0)}),e})(o))},tutorialDocumentLoadingError:({tutorialId:t,slug:r,contentHashId:n})=>{_n.error(dn[sn.TUTORIAL_LOADING_ERROR]),e(sn.TUTORIAL_LOADING_ERROR,{tutorialId:t,slug:r,contentHashId:n})}});for(var vn=function(){return e.randomBytes(16)},hn=[],yn=0;yn<256;++yn)hn[yn]=(yn+256).toString(16).substr(1);var bn=function(t,e){var r=e||0,n=hn;return[n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]]].join("")};var En,gn,On=function(t,e,r){var n=e&&r||0;"string"==typeof t&&(e="binary"===t?new Array(16):null,t=null);var o=(t=t||{}).random||(t.rng||vn)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,e)for(var a=0;a<16;++a)e[n+a]=o[a];return e||bn(o)};!function(t){t.UserGenerated="UserGenerated",t.SDK="SDK"}(En||(En={})),function(t){t.Identify="Identify",t.Group="Group",t.Track="Track",t.Page="Page",t.Screen="Screen"}(gn||(gn={}));const Tn=()=>"undefined"!=typeof window&&window.localStorage,Rn=t=>e=>{Tn()&&null!=e&&window.localStorage.setItem(t,JSON.stringify(e))};const In={anonymousId:{getOrCreate:((t,e)=>()=>(t=>()=>{if(Tn()){const e=window.localStorage.getItem(t);if(e)try{return JSON.parse(e)}catch(t){return null}}})(t)()||e())("candu:anonymous_id",()=>{const t=On();return Rn("candu:anonymous_id")(t),t}),set:Rn("candu:anonymous_id")}}.anonymousId.getOrCreate;var Nn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},An="object"==typeof Nn&&Nn&&Nn.Object===Object&&Nn,mn="object"==typeof self&&self&&self.Object===Object&&self,jn=(An||mn||Function("return this")()).Symbol,Dn=Object.prototype,Pn=Dn.hasOwnProperty,wn=Dn.toString,Ln=jn?jn.toStringTag:void 0;var Sn=function(t){var e=Pn.call(t,Ln),r=t[Ln];try{t[Ln]=void 0;var n=!0}catch(t){}var o=wn.call(t);return n&&(e?t[Ln]=r:delete t[Ln]),o},Cn=Object.prototype.toString;var Un=function(t){return Cn.call(t)},kn="[object Null]",Bn="[object Undefined]",Mn=jn?jn.toStringTag:void 0;var $n=function(t){return null==t?void 0===t?Bn:kn:Mn&&Mn in Object(t)?Sn(t):Un(t)},xn=Array.isArray;var zn=function(t){return null!=t&&"object"==typeof t},Wn="[object String]";var Gn=function(t){return"string"==typeof t||!xn(t)&&zn(t)&&$n(t)==Wn},Yn="[object Number]";var Fn=function(t){return"number"==typeof t||zn(t)&&$n(t)==Yn};const Vn=/^([a-zA-Z0-9]|_|-)+$/,Kn=t=>Fn(t)&&t>=0;var Hn,Jn,Zn,qn,Xn,Qn;!function(t){t.SDK="SDK",t.PREVIEW="PREVIEW"}(Hn||(Hn={})),function(t){t.BOOTSTRAP="Bootstrap",t.CHANGE_POSITION="ChangePosition",t.CLOSE_PREVIEW="ClosePreview",t.PREVIEW_LOADED="PreviewLoaded",t.SET_AVALIABLE_PORTALS="SetAvaliablePortals",t.SET_CONTENT="SetContent",t.SET_SELECTED_ELEMENT="SetSelectedElement",t.SET_VIEW_MODE="SetViewMode",t.ADD_ELEMENT="AddElement",t.REMOVE_ELEMENT="RemoveElement",t.UPDATE_ELEMENT="UpdateElement",t.SET_ELEMENT="SetElement"}(Jn||(Jn={})),function(t){t.ON_CLICK="OnClick"}(Zn||(Zn={})),function(t){t.NATIVE="Native",t.PENDO="Pendo"}(qn||(qn={})),function(t){t.NAVIGATE="Navigate",t.CHANGE_TUTORIAL="ChangeTutorial",t.OPEN_GUIDE="OpenGuide"}(Xn||(Xn={})),function(t){t.PRIMARY="primary",t.SECONDARY="primary",t.WARNING="warning",t.DANGER="danger",t.NEUTRAL="neutral",t.ACTIVE="active",t.INFO="info"}(Qn||(Qn={}));Qn.PRIMARY;var to;!function(t){t.U="U",t.B="B",t.Em="Em",t.InlineCode="InlineCode"}(to||(to={}));const eo=t=>(t=>Gn(t)&&t.length>=3&&t.length<100&&Vn.test(t))(t);var ro,no,oo,ao;!function(t){t.COLLAPSED="Collapsed",t.EXPANDED="Expanded",t.MINIMIZED="Minimized"}(ro||(ro={})),function(t){t.TUTORIAL="Tutorial",t.PORTAL="Portal"}(no||(no={})),function(t){t.Global="Global",t.Organization="Organization"}(oo||(oo={})),function(t){t.Root="root",t.Rule="rule",t.Atrule="atrule",t.Decl="decl",t.Any="any"}(ao||(ao={}));var io=function(t,e,r,n,o,a,i,u){if(!t){var c;if(void 0===e)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[r,n,o,a,i,u],l=0;(c=new Error(e.replace(/%s/g,(function(){return s[l++]})))).name="Invariant Violation"}throw c.framesToPop=1,c}};const uo=t=>io(!t||E(t),"(Candu) styleguide must be undefined or an object"),co=({clientToken:t,userId:e,traits:r,options:n,styleguide:o,...a})=>(io((t=>Gn(t)&&!!t.match(/^[0-9a-zA-Z]*$/)&&t.length>=10)(t),"(Candu) you must provide a valid clientToken"),io(!e||(t=>Kn(t)||Gn(t)&&t.trim().length>0)(e),"(Candu) you must provide a valid userId"),uo(o),io(!r||E(r),"(Candu) traits must be undefined or an object"),io(!n||E(n),"(Candu) options must be undefined or an object"),{...a,clientToken:t,traits:r||{},options:n||{},styleguide:o||{},userId:e||In()}),so=({slug:t,styleguide:e,contentHashId:r,tutorialId:n,tutorialDocument:o,...a})=>(uo(e),{...a,slug:t,styleguide:e||{},contentHashId:r,tutorialId:n,tutorialDocument:o}),lo=({slug:t,styleguide:e})=>(uo(e),{slug:t,styleguide:e||{}});var fo=Object.freeze({__proto__:null,API_BASE_URL:"https://api.candu.ai",CDN_BASE_URL:"https://cdn.candu.ai",VERSION:"0.5.2"});const{API_BASE_URL:_o}=fo,{CDN_BASE_URL:po}=fo,vo="/api/segmentMemberships",ho="/api/tutorialDocumentsEditor",yo=async t=>(await fetch(t)).json(),bo=t=>yo(`${_o}${t}`),Eo=t=>yo(`${po}${t}`),go={tutorialDocumentLatestPublished:async(t,e)=>bo(`${ho}?token=${t}&finder=latestPublished&tutorialId=${e}`),portalAsset:async(t,e)=>Eo(`/portals/${t}/${e}/head.json`),segmentMembership:async(t,e)=>bo(`${vo}/${e}?token=${t}`),tutorialDocument:(t,e,r)=>{const{contentHashId:n,tutorialId:o,tutorialDocument:a,slug:i}=t,u=(t=>({byId:e=>bo(`${ho}/${e}?token=${t}`),bySlug:e=>Eo(`/tutorials/${t}/${e}.json`),byContentHash:e=>Eo(`/tutorials/${t}/${e}.json`)}))(e);return(t=>Kn(t))(o)?u.byId(o):eo(i)?u.bySlug(i):(t=>Gn(t)&&!!t.match(/^[0-9a-zA-Z]{40}$/))(n)?u.byContentHash(n):E(a)?Promise.resolve(a):(_n.error(dn[sn.NO_VALID_TUTORIAL_IDENTIFIER]),r.track(sn.NO_VALID_TUTORIAL_IDENTIFIER,{slug:t.slug}),null)}},Oo=(...t)=>console.error(...t),To=(...t)=>console.warn(...t),Ro={error:Oo,warning:To},Io=t=>{switch(t.trigger){case Zn.ON_CLICK:default:return"onClick"}},No=({data:t},e)=>{if(!t||!t.actions)return{};const r=t=>{e.provider.eventing.track(sn.TUTORIAL_INTERACTION,{...t,...e.trackingIdentifiers||{}})};return t.actions.map(t=>((t,e)=>{switch(t.handler.type){case Xn.NAVIGATE:return{[Io(t)]:()=>{const{href:r,target:n}=t.handler;e(t),"Blank"===n?window.open(r,"_blank"):r&&r.includes("mailto:")?window.location=r:document.location.href=r}};case Xn.CHANGE_TUTORIAL:return{[Io(t)]:()=>{const{tutorialId:e}=t.handler;Oo("TODO -> change tutorial",e)}};case Xn.OPEN_GUIDE:return{[Io(t)]:()=>{const{guideId:e}=t.handler;Oo("TODO -> open guide",e)}};default:return{}}})(t,r)).reduce((t,e)=>({...t,...e}),{})},Ao=(t,e)=>{try{const{provider:r,document:n,trackingIdentifiers:o}=e,a=n.nodes[t];if(!a)return Ro.error("Document is corrupted. Refusing to move further."),null;const i=t=>Ao(t,e),{type:u,props:c,css:s}=a,l={...c||{},style:s||{},children:(c||{}).children||a.nodes&&a.nodes.map(i),...No(a,{trackingIdentifiers:o,provider:r})},d={nodeId:t,node:a,document:n,render:{node:i,styleguide:(t,r={})=>e.renderNode(t,{api:d,attributes:r}),tutorial:t=>e.renderTutorial(t),portal:t=>e.renderPortal(t)},trackingIdentifiers:o},f=d.render.styleguide(u,l);return f||(Ro.error(dn[sn.UNKOWN_NODE_TYPE],{type:u}),r.eventing.track(sn.UNKOWN_NODE_TYPE,{type:u}),null)}catch(t){return Ro.error(dn[sn.STYLEGUIDE_MAP_ERROR],t),null}},mo=Nr((t,e)=>{const{provider:r,portal:n,tutorial:o}=t,a=r.styleguide;let i,u;return o&&(u=o.styleguide),n&&(i=n.styleguide),{...a||{},...i||{},...u||{},...e||{}}}),jo="",Do="#EDEDED",Po="#333745",wo="#838792",Lo="#FEFEFE",So="#FEFEFE",Co={primary:"#6310E5",secondary:"#59C3C3",tertiary:"#4D515D",warning:"#FCAD0D",danger:"#EE4266"},Uo=t=>{const e=document.createElement("link");e.setAttribute("rel","stylesheet"),e.setAttribute("href",`${po}/styleguides/applications/${t}/default/main.css`),document.head.appendChild(e)};export{Do as DEFAULT_ALERT_COLOR,jo as DEFAULT_ALT,Lo as DEFAULT_TAB_ACTIVE_COLOR,So as DEFAULT_TAB_COLOR,Po as DEFAULT_TAB_HEADER_COLOR,wo as DEFAULT_TAB_ITEM_COLOR,dn as ERROR_MESSAGES,cn as ERROR_SLUGS,sn as EVENT_NAMES,_n as LOGGER,go as RESOURCES,Co as STYLEGUIDE_COLORS,on as adaptCustomNodes,Uo as attachStylesheet,nn as convertStyleNumberValues,fn as defaultStyleguide,pn as internalEventing,Oo as logError,To as logWarning,Ro as logger,Ao as mapNodeToStyleguide,mo as mergeStyleguidesFromContext,lo as portalValidation,co as providerValidation,so as tutorialValidation,rn as unpackShorthandStyles};
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
var t=function(){return(t=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function e(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r}function r(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function u(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){t.done?o(t.value):new r((function(e){e(t.value)})).then(a,u)}c((n=n.apply(t,e||[])).next())}))}function n(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(t,e){return t(e={exports:{}},e.exports),e.exports}var a="object"==typeof o&&o&&o.Object===Object&&o,u="object"==typeof self&&self&&self.Object===Object&&self,c=a||u||Function("return this")(),l=c.Symbol,s=Object.prototype,f=s.hasOwnProperty,d=s.toString,p=l?l.toStringTag:void 0;var v=function(t){var e=f.call(t,p),r=t[p];try{t[p]=void 0;var n=!0}catch(t){}var o=d.call(t);return n&&(e?t[p]=r:delete t[p]),o},_=Object.prototype.toString;var h=function(t){return _.call(t)},y="[object Null]",b="[object Undefined]",g=l?l.toStringTag:void 0;var E=function(t){return null==t?void 0===t?b:y:g&&g in Object(t)?v(t):h(t)};var O=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},T="[object AsyncFunction]",R="[object Function]",I="[object GeneratorFunction]",m="[object Proxy]";var N,A=function(t){if(!O(t))return!1;var e=E(t);return e==R||e==I||e==T||e==m},j=c["__core-js_shared__"],w=(N=/[^.]+$/.exec(j&&j.keys&&j.keys.IE_PROTO||""))?"Symbol(src)_1."+N:"";var P=function(t){return!!w&&w in t},D=Function.prototype.toString;var L=function(t){if(null!=t){try{return D.call(t)}catch(t){}try{return t+""}catch(t){}}return""},S=/^\[object .+?Constructor\]$/,C=Function.prototype,U=Object.prototype,k=C.toString,x=U.hasOwnProperty,M=RegExp("^"+k.call(x).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var z=function(t){return!(!O(t)||P(t))&&(A(t)?M:S).test(L(t))};var B=function(t,e){return null==t?void 0:t[e]};var W=function(t,e){var r=B(t,e);return z(r)?r:void 0},G=function(){try{var t=W(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();var Y=function(t,e,r){"__proto__"==e&&G?G(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r};var F=function(t){return function(e,r,n){for(var o=-1,i=Object(e),a=n(e),u=a.length;u--;){var c=a[t?u:++o];if(!1===r(i[c],c,i))break}return e}}();var V=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n};var H=function(t){return null!=t&&"object"==typeof t},K="[object Arguments]";var $=function(t){return H(t)&&E(t)==K},J=Object.prototype,Z=J.hasOwnProperty,q=J.propertyIsEnumerable,X=$(function(){return arguments}())?$:function(t){return H(t)&&Z.call(t,"callee")&&!q.call(t,"callee")},Q=Array.isArray;var tt=function(){return!1},et=i((function(t,e){var r=e&&!e.nodeType&&e,n=r&&t&&!t.nodeType&&t,o=n&&n.exports===r?c.Buffer:void 0,i=(o?o.isBuffer:void 0)||tt;t.exports=i})),rt=9007199254740991,nt=/^(?:0|[1-9]\d*)$/;var ot=function(t,e){var r=typeof t;return!!(e=null==e?rt:e)&&("number"==r||"symbol"!=r&&nt.test(t))&&t>-1&&t%1==0&&t<e},it=9007199254740991;var at=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=it},ut={};ut["[object Float32Array]"]=ut["[object Float64Array]"]=ut["[object Int8Array]"]=ut["[object Int16Array]"]=ut["[object Int32Array]"]=ut["[object Uint8Array]"]=ut["[object Uint8ClampedArray]"]=ut["[object Uint16Array]"]=ut["[object Uint32Array]"]=!0,ut["[object Arguments]"]=ut["[object Array]"]=ut["[object ArrayBuffer]"]=ut["[object Boolean]"]=ut["[object DataView]"]=ut["[object Date]"]=ut["[object Error]"]=ut["[object Function]"]=ut["[object Map]"]=ut["[object Number]"]=ut["[object Object]"]=ut["[object RegExp]"]=ut["[object Set]"]=ut["[object String]"]=ut["[object WeakMap]"]=!1;var ct=function(t){return H(t)&&at(t.length)&&!!ut[E(t)]};var lt=function(t){return function(e){return t(e)}},st=i((function(t,e){var r=e&&!e.nodeType&&e,n=r&&t&&!t.nodeType&&t,o=n&&n.exports===r&&a.process,i=function(){try{var t=n&&n.require&&n.require("util").types;return t||o&&o.binding&&o.binding("util")}catch(t){}}();t.exports=i})),ft=st&&st.isTypedArray,dt=ft?lt(ft):ct,pt=Object.prototype.hasOwnProperty;var vt=function(t,e){var r=Q(t),n=!r&&X(t),o=!r&&!n&&et(t),i=!r&&!n&&!o&&dt(t),a=r||n||o||i,u=a?V(t.length,String):[],c=u.length;for(var l in t)!e&&!pt.call(t,l)||a&&("length"==l||o&&("offset"==l||"parent"==l)||i&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||ot(l,c))||u.push(l);return u},_t=Object.prototype;var ht=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||_t)};var yt=function(t,e){return function(r){return t(e(r))}}(Object.keys,Object),bt=Object.prototype.hasOwnProperty;var gt=function(t){if(!ht(t))return yt(t);var e=[];for(var r in Object(t))bt.call(t,r)&&"constructor"!=r&&e.push(r);return e};var Et=function(t){return null!=t&&at(t.length)&&!A(t)};var Ot=function(t){return Et(t)?vt(t):gt(t)};var Tt=function(t,e){return t&&F(t,e,Ot)};var Rt=function(){this.__data__=[],this.size=0};var It=function(t,e){return t===e||t!=t&&e!=e};var mt=function(t,e){for(var r=t.length;r--;)if(It(t[r][0],e))return r;return-1},Nt=Array.prototype.splice;var At=function(t){var e=this.__data__,r=mt(e,t);return!(r<0)&&(r==e.length-1?e.pop():Nt.call(e,r,1),--this.size,!0)};var jt=function(t){var e=this.__data__,r=mt(e,t);return r<0?void 0:e[r][1]};var wt=function(t){return mt(this.__data__,t)>-1};var Pt=function(t,e){var r=this.__data__,n=mt(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};function Dt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Dt.prototype.clear=Rt,Dt.prototype.delete=At,Dt.prototype.get=jt,Dt.prototype.has=wt,Dt.prototype.set=Pt;var Lt=Dt;var St=function(){this.__data__=new Lt,this.size=0};var Ct=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r};var Ut=function(t){return this.__data__.get(t)};var kt=function(t){return this.__data__.has(t)},xt=W(c,"Map"),Mt=W(Object,"create");var zt=function(){this.__data__=Mt?Mt(null):{},this.size=0};var Bt=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Wt="__lodash_hash_undefined__",Gt=Object.prototype.hasOwnProperty;var Yt=function(t){var e=this.__data__;if(Mt){var r=e[t];return r===Wt?void 0:r}return Gt.call(e,t)?e[t]:void 0},Ft=Object.prototype.hasOwnProperty;var Vt=function(t){var e=this.__data__;return Mt?void 0!==e[t]:Ft.call(e,t)},Ht="__lodash_hash_undefined__";var Kt=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Mt&&void 0===e?Ht:e,this};function $t(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}$t.prototype.clear=zt,$t.prototype.delete=Bt,$t.prototype.get=Yt,$t.prototype.has=Vt,$t.prototype.set=Kt;var Jt=$t;var Zt=function(){this.size=0,this.__data__={hash:new Jt,map:new(xt||Lt),string:new Jt}};var qt=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var Xt=function(t,e){var r=t.__data__;return qt(e)?r["string"==typeof e?"string":"hash"]:r.map};var Qt=function(t){var e=Xt(this,t).delete(t);return this.size-=e?1:0,e};var te=function(t){return Xt(this,t).get(t)};var ee=function(t){return Xt(this,t).has(t)};var re=function(t,e){var r=Xt(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};function ne(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}ne.prototype.clear=Zt,ne.prototype.delete=Qt,ne.prototype.get=te,ne.prototype.has=ee,ne.prototype.set=re;var oe=ne,ie=200;var ae=function(t,e){var r=this.__data__;if(r instanceof Lt){var n=r.__data__;if(!xt||n.length<ie-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new oe(n)}return r.set(t,e),this.size=r.size,this};function ue(t){var e=this.__data__=new Lt(t);this.size=e.size}ue.prototype.clear=St,ue.prototype.delete=Ct,ue.prototype.get=Ut,ue.prototype.has=kt,ue.prototype.set=ae;var ce=ue,le="__lodash_hash_undefined__";var se=function(t){return this.__data__.set(t,le),this};var fe=function(t){return this.__data__.has(t)};function de(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new oe;++e<r;)this.add(t[e])}de.prototype.add=de.prototype.push=se,de.prototype.has=fe;var pe=de;var ve=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1};var _e=function(t,e){return t.has(e)},he=1,ye=2;var be=function(t,e,r,n,o,i){var a=r&he,u=t.length,c=e.length;if(u!=c&&!(a&&c>u))return!1;var l=i.get(t);if(l&&i.get(e))return l==e;var s=-1,f=!0,d=r&ye?new pe:void 0;for(i.set(t,e),i.set(e,t);++s<u;){var p=t[s],v=e[s];if(n)var _=a?n(v,p,s,e,t,i):n(p,v,s,t,e,i);if(void 0!==_){if(_)continue;f=!1;break}if(d){if(!ve(e,(function(t,e){if(!_e(d,e)&&(p===t||o(p,t,r,n,i)))return d.push(e)}))){f=!1;break}}else if(p!==v&&!o(p,v,r,n,i)){f=!1;break}}return i.delete(t),i.delete(e),f},ge=c.Uint8Array;var Ee=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r};var Oe=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r},Te=1,Re=2,Ie="[object Boolean]",me="[object Date]",Ne="[object Error]",Ae="[object Map]",je="[object Number]",we="[object RegExp]",Pe="[object Set]",De="[object String]",Le="[object Symbol]",Se="[object ArrayBuffer]",Ce="[object DataView]",Ue=l?l.prototype:void 0,ke=Ue?Ue.valueOf:void 0;var xe=function(t,e,r,n,o,i,a){switch(r){case Ce:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Se:return!(t.byteLength!=e.byteLength||!i(new ge(t),new ge(e)));case Ie:case me:case je:return It(+t,+e);case Ne:return t.name==e.name&&t.message==e.message;case we:case De:return t==e+"";case Ae:var u=Ee;case Pe:var c=n&Te;if(u||(u=Oe),t.size!=e.size&&!c)return!1;var l=a.get(t);if(l)return l==e;n|=Re,a.set(t,e);var s=be(u(t),u(e),n,o,i,a);return a.delete(t),s;case Le:if(ke)return ke.call(t)==ke.call(e)}return!1};var Me=function(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t};var ze=function(t,e,r){var n=e(t);return Q(t)?n:Me(n,r(t))};var Be=function(t,e){for(var r=-1,n=null==t?0:t.length,o=0,i=[];++r<n;){var a=t[r];e(a,r,t)&&(i[o++]=a)}return i};var We=function(){return[]},Ge=Object.prototype.propertyIsEnumerable,Ye=Object.getOwnPropertySymbols,Fe=Ye?function(t){return null==t?[]:(t=Object(t),Be(Ye(t),(function(e){return Ge.call(t,e)})))}:We;var Ve=function(t){return ze(t,Ot,Fe)},He=1,Ke=Object.prototype.hasOwnProperty;var $e=function(t,e,r,n,o,i){var a=r&He,u=Ve(t),c=u.length;if(c!=Ve(e).length&&!a)return!1;for(var l=c;l--;){var s=u[l];if(!(a?s in e:Ke.call(e,s)))return!1}var f=i.get(t);if(f&&i.get(e))return f==e;var d=!0;i.set(t,e),i.set(e,t);for(var p=a;++l<c;){var v=t[s=u[l]],_=e[s];if(n)var h=a?n(_,v,s,e,t,i):n(v,_,s,t,e,i);if(!(void 0===h?v===_||o(v,_,r,n,i):h)){d=!1;break}p||(p="constructor"==s)}if(d&&!p){var y=t.constructor,b=e.constructor;y!=b&&"constructor"in t&&"constructor"in e&&!("function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b)&&(d=!1)}return i.delete(t),i.delete(e),d},Je=W(c,"DataView"),Ze=W(c,"Promise"),qe=W(c,"Set"),Xe=W(c,"WeakMap"),Qe=L(Je),tr=L(xt),er=L(Ze),rr=L(qe),nr=L(Xe),or=E;(Je&&"[object DataView]"!=or(new Je(new ArrayBuffer(1)))||xt&&"[object Map]"!=or(new xt)||Ze&&"[object Promise]"!=or(Ze.resolve())||qe&&"[object Set]"!=or(new qe)||Xe&&"[object WeakMap]"!=or(new Xe))&&(or=function(t){var e=E(t),r="[object Object]"==e?t.constructor:void 0,n=r?L(r):"";if(n)switch(n){case Qe:return"[object DataView]";case tr:return"[object Map]";case er:return"[object Promise]";case rr:return"[object Set]";case nr:return"[object WeakMap]"}return e});var ir=or,ar=1,ur="[object Arguments]",cr="[object Array]",lr="[object Object]",sr=Object.prototype.hasOwnProperty;var fr=function(t,e,r,n,o,i){var a=Q(t),u=Q(e),c=a?cr:ir(t),l=u?cr:ir(e),s=(c=c==ur?lr:c)==lr,f=(l=l==ur?lr:l)==lr,d=c==l;if(d&&et(t)){if(!et(e))return!1;a=!0,s=!1}if(d&&!s)return i||(i=new ce),a||dt(t)?be(t,e,r,n,o,i):xe(t,e,c,r,n,o,i);if(!(r&ar)){var p=s&&sr.call(t,"__wrapped__"),v=f&&sr.call(e,"__wrapped__");if(p||v){var _=p?t.value():t,h=v?e.value():e;return i||(i=new ce),o(_,h,r,n,i)}}return!!d&&(i||(i=new ce),$e(t,e,r,n,o,i))};var dr=function t(e,r,n,o,i){return e===r||(null==e||null==r||!H(e)&&!H(r)?e!=e&&r!=r:fr(e,r,n,o,t,i))},pr=1,vr=2;var _r=function(t,e,r,n){var o=r.length,i=o,a=!n;if(null==t)return!i;for(t=Object(t);o--;){var u=r[o];if(a&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++o<i;){var c=(u=r[o])[0],l=t[c],s=u[1];if(a&&u[2]){if(void 0===l&&!(c in t))return!1}else{var f=new ce;if(n)var d=n(l,s,c,t,e,f);if(!(void 0===d?dr(s,l,pr|vr,n,f):d))return!1}}return!0};var hr=function(t){return t==t&&!O(t)};var yr=function(t){for(var e=Ot(t),r=e.length;r--;){var n=e[r],o=t[n];e[r]=[n,o,hr(o)]}return e};var br=function(t,e){return function(r){return null!=r&&(r[t]===e&&(void 0!==e||t in Object(r)))}};var gr=function(t){var e=yr(t);return 1==e.length&&e[0][2]?br(e[0][0],e[0][1]):function(r){return r===t||_r(r,t,e)}},Er="[object Symbol]";var Or=function(t){return"symbol"==typeof t||H(t)&&E(t)==Er},Tr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Rr=/^\w*$/;var Ir=function(t,e){if(Q(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!Or(t))||(Rr.test(t)||!Tr.test(t)||null!=e&&t in Object(e))},mr="Expected a function";function Nr(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError(mr);var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=t.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(Nr.Cache||oe),r}Nr.Cache=oe;var Ar=Nr,jr=500;var wr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Pr=/\\(\\)?/g,Dr=function(t){var e=Ar(t,(function(t){return r.size===jr&&r.clear(),t})),r=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(wr,(function(t,r,n,o){e.push(n?o.replace(Pr,"$1"):r||t)})),e}));var Lr=function(t,e){for(var r=-1,n=null==t?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o},Sr=1/0,Cr=l?l.prototype:void 0,Ur=Cr?Cr.toString:void 0;var kr=function t(e){if("string"==typeof e)return e;if(Q(e))return Lr(e,t)+"";if(Or(e))return Ur?Ur.call(e):"";var r=e+"";return"0"==r&&1/e==-Sr?"-0":r};var xr=function(t){return null==t?"":kr(t)};var Mr=function(t,e){return Q(t)?t:Ir(t,e)?[t]:Dr(xr(t))},zr=1/0;var Br=function(t){if("string"==typeof t||Or(t))return t;var e=t+"";return"0"==e&&1/t==-zr?"-0":e};var Wr=function(t,e){for(var r=0,n=(e=Mr(e,t)).length;null!=t&&r<n;)t=t[Br(e[r++])];return r&&r==n?t:void 0};var Gr=function(t,e,r){var n=null==t?void 0:Wr(t,e);return void 0===n?r:n};var Yr=function(t,e){return null!=t&&e in Object(t)};var Fr=function(t,e,r){for(var n=-1,o=(e=Mr(e,t)).length,i=!1;++n<o;){var a=Br(e[n]);if(!(i=null!=t&&r(t,a)))break;t=t[a]}return i||++n!=o?i:!!(o=null==t?0:t.length)&&at(o)&&ot(a,o)&&(Q(t)||X(t))};var Vr=function(t,e){return null!=t&&Fr(t,e,Yr)},Hr=1,Kr=2;var $r=function(t,e){return Ir(t)&&hr(e)?br(Br(t),e):function(r){var n=Gr(r,t);return void 0===n&&n===e?Vr(r,t):dr(e,n,Hr|Kr)}};var Jr=function(t){return t};var Zr=function(t){return function(e){return null==e?void 0:e[t]}};var qr=function(t){return function(e){return Wr(e,t)}};var Xr=function(t){return Ir(t)?Zr(Br(t)):qr(t)};var Qr=function(t){return"function"==typeof t?t:null==t?Jr:"object"==typeof t?Q(t)?$r(t[0],t[1]):gr(t):Xr(t)};var tn=function(t,e){var r={};return e=Qr(e),Tt(t,(function(t,n,o){Y(r,n,e(t,n,o))})),r},en={boxFlex:!0,boxFlexGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,strokeDashoffset:!0,strokeOpacity:!0,strokeWidth:!0};var rn=["Webkit","ms","Moz","O"];Object.keys(en).forEach((function(t){rn.forEach((function(e){en[function(t,e){return t+e.charAt(0).toUpperCase()+e.substring(1)}(e,t)]=en[t]}))}));var nn={isUnitlessNumber:en,shorthandPropertyExpansions:{background:{backgroundImage:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundColor:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0}}};for(var on,an=function(r){var n=r.css,o=n.padding,i=n.margin,a=e(n,["padding","margin"]),u={};return o&&(u={paddingRight:o,paddingLeft:o,paddingBottom:o,paddingTop:o}),i&&(u=t(t({},u),{marginRight:i,marginLeft:i,marginBottom:i,marginTop:i})),t(t({},r),{css:t(t({},u),a)})},un=function(e){var r=e.css,n={};return Object.entries(r).forEach((function(t){var e=t[0],r=t[1];if("number"==typeof r)return nn.isUnitlessNumber[e]?void(n[e]=""+r):void(n[e]=r+"px");n[e]=r})),t(t({},e),{css:n})},cn=function(e){return tn(e,(function(e){var r=e;return"Typography"===r.type&&(r=function(e){var r=Gr(e,"data.custom.variant","P");return t(t({},e),{type:r})}(r)),r.css&&O(r.css)&&r.css.flexBasis&&(r=function(e){var r=e.css.flexBasis;return"0"===r||"0px"===r?t(t({},e),{css:t(t({},e.css),{flexBasis:"0%"})}):e}(r)),r.css&&(r=an(r),r=un(r)),r}))},ln=function(t){return"candu.sdk."+t},sn=function(t){return ln("error."+t)},fn={UNKOWN_NODE_TYPE:"unknown_node_type",UNKOWN_BLOCK_NODE_TYPE:"unkown_block_node_type",UNKOWN_INLINE_NODE_TYPE:"unkown_inline_node_type",UNKOWN_NODE_OBJECT_TYPE:"unkown_node_object_type",TUTORIAL_ERROR:"tutorial_error_boundary",PORTAL_ERROR:"portal_error_boundary",STYLEGUIDE_MAP_ERROR:"styleguide_map",RENDER_NODE_ERROR:"render_node"},dn={HEARTBEAT:ln("heartbeat"),PREVIEW_OPEN:ln("preview.open"),PORTAL:ln("portal"),TUTORIAL:ln("tutorial"),TUTORIAL_INTERACTION:ln("tutorial.interaction"),PORTAL_ASSET_NOT_FOUND:sn("portal_asset_not_found"),PORTAL_NO_SEGMENT_IDS:sn("portal_no_segment_ids"),NO_MATCHING_TUTORIALS:sn("no_matching_tutorials"),NO_VALID_TUTORIAL_IDENTIFIER:sn("no_valid_tutorial_identifier"),COMMIT_API_LOADING_ERROR:sn("commit_api"),TUTORIAL_LOADING_ERROR:sn("tutorial"),UNKOWN_NODE_TYPE:sn(fn.UNKOWN_NODE_TYPE),UNKOWN_INLINE_NODE_TYPE:sn(fn.UNKOWN_INLINE_NODE_TYPE),UNKOWN_NODE_OBJECT_TYPE:sn(fn.UNKOWN_NODE_OBJECT_TYPE),TUTORIAL_ERROR:sn(fn.TUTORIAL_ERROR),PORTAL_ERROR:sn(fn.PORTAL_ERROR),STYLEGUIDE_MAP_ERROR:sn(fn.TUTORIAL_ERROR),RENDER_NODE_ERROR:sn(fn.TUTORIAL_ERROR),CIRCULAR_DEPENDENCY_EMBED_PORTAL:sn("circular_dependecy_embed_portal"),CIRCULAR_DEPENDENCY_EMBED_TUTORIAL:sn("circular_dependecy_embed_tutorial")},pn=function(t){return"An error has occured while trying to parse your Tutorial.\nUpgrade the SDK to the latest version to get rid of this error.\nErrorCode: "+t+"."},vn=((on={EVENTING_NOT_INITIALIZED:"You tried to send an event, but you haven't initialized eventing.\nThis is happening because you called eventing outside the scope of the CanduProvider. It can be fixed by:\n1. Adding CanduProvider to the root of the application.\n2. Initializing a new Eventing object outside of Candu.\nRead here for more context: http://udn.ac/tracking-not-init.\n"})[dn.PORTAL_ASSET_NOT_FOUND]="Could not find the requested Portal. This could happen because:\n1. The Portal does not exist or it was deleted.\n2. The Portal has not been made avaliable to be rendered.\n3. CORS Authenticaton failed.\nSee http://udn.ac/portal-not-found for more information.\n",on[dn.PORTAL_NO_SEGMENT_IDS]="You have tried to render a Portal that doesn't contain any content.\nAdd content to your Portal: https://udn.ac/update-portals.\n",on[dn.NO_MATCHING_TUTORIALS]="The Tutorial will not be rendered because there are no matching segments for the given user.",on[dn.NO_VALID_TUTORIAL_IDENTIFIER]="(Candu/Tutorial) You must define one of tutorialId, slug, commitId or contentHashId.",on[dn.TUTORIAL_LOADING_ERROR]="An error has occurred while trying to load the Tutorial",on[dn.UNKOWN_INLINE_NODE_TYPE]=pn(fn.UNKOWN_INLINE_NODE_TYPE),on[dn.UNKOWN_NODE_TYPE]=pn(fn.UNKOWN_NODE_TYPE),on[dn.CIRCULAR_DEPENDENCY_EMBED_PORTAL]="Circular dependency found on Embeded Portal. Please take a look at the Portal Content.",on[dn.CIRCULAR_DEPENDENCY_EMBED_TUTORIAL]="Circular dependency found on Embeded Tutorial. Please take a look at the Tutorial Content.",on[dn.PORTAL_ERROR]="An error has occured within Portal",on[dn.TUTORIAL_ERROR]="An error has occured within Tutorial",on[dn.RENDER_NODE_ERROR]="An error has occured while rendering tutorial node",on[dn.STYLEGUIDE_MAP_ERROR]="An error has occured while mapping node to styleguide",on),_n={Alert:!0,B:!0,Badge:!0,Button:!0,Card:!0,Code:!0,Document:!0,Em:!0,EmbedPortal:!0,EmbedTutorial:!0,Flex:!0,FlexItem:!0,H1:!0,H2:!0,H3:!0,H4:!0,H5:!0,H6:!0,Image:!0,InlineCode:!0,Link:!0,List:!0,ListItem:!0,P:!0,RichText:!0,Spacing:!0,Text:!0,U:!0,View:!0,Player:!0},hn={error:console.error,warning:console.warn},yn=function(t){var e=t.identify,r=t.track;return{provider:function(t){var n=t.userId,o=t.traits,i=t.styleguide;e(n,o),r(dn.HEARTBEAT,function(t){var e={};return Object.keys(t).forEach((function(r){_n[r]&&(e["styleguide."+r]=t[r].displayName||!0)})),e}(i))},tutorialDocumentLoadingError:function(t){var e=t.tutorialId,n=t.slug,o=t.contentHashId;hn.error(vn[dn.TUTORIAL_LOADING_ERROR]),r(dn.TUTORIAL_LOADING_ERROR,{tutorialId:e,slug:n,contentHashId:o})}}},bn={},gn=function(){return bn.randomBytes(16)},En=[],On=0;On<256;++On)En[On]=(On+256).toString(16).substr(1);var Tn,Rn,In=function(t,e){var r=e||0,n=En;return[n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]]].join("")};!function(t){t.UserGenerated="UserGenerated",t.SDK="SDK"}(Tn||(Tn={})),function(t){t.Identify="Identify",t.Group="Group",t.Track="Track",t.Page="Page",t.Screen="Screen"}(Rn||(Rn={}));var mn,Nn,An,jn,wn,Pn,Dn,Ln=function(){return"undefined"!=typeof window&&window.localStorage},Sn=function(t){return function(e){Ln()&&null!=e&&window.localStorage.setItem(t,JSON.stringify(e))}},Cn={anonymousId:{getOrCreate:("candu:anonymous_id",mn=function(){var t=function(t,e,r){var n=e&&r||0;"string"==typeof t&&(e="binary"===t?new Array(16):null,t=null);var o=(t=t||{}).random||(t.rng||gn)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,e)for(var i=0;i<16;++i)e[n+i]=o[i];return e||In(o)}();return Sn("candu:anonymous_id")(t),t},function(){return function(){if(Ln()){var t=window.localStorage.getItem("candu:anonymous_id");if(t)try{return JSON.parse(t)}catch(t){return null}}}()||mn()}),set:Sn("candu:anonymous_id")}}.anonymousId.getOrCreate,Un="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},kn="object"==typeof Un&&Un&&Un.Object===Object&&Un,xn="object"==typeof self&&self&&self.Object===Object&&self,Mn=(kn||xn||Function("return this")()).Symbol,zn=Object.prototype,Bn=zn.hasOwnProperty,Wn=zn.toString,Gn=Mn?Mn.toStringTag:void 0,Yn=Object.prototype.toString,Fn=Mn?Mn.toStringTag:void 0,Vn=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Fn&&Fn in Object(t)?function(t){var e=Bn.call(t,Gn),r=t[Gn];try{t[Gn]=void 0;var n=!0}catch(t){}var o=Wn.call(t);return n&&(e?t[Gn]=r:delete t[Gn]),o}(t):function(t){return Yn.call(t)}(t)},Hn=Array.isArray,Kn=function(t){return null!=t&&"object"==typeof t},$n=function(t){return"string"==typeof t||!Hn(t)&&Kn(t)&&"[object String]"==Vn(t)},Jn=/^([a-zA-Z0-9]|_|-)+$/,Zn=function(t){return function(t){return"number"==typeof t||Kn(t)&&"[object Number]"==Vn(t)}(t)&&t>=0};!function(t){t.SDK="SDK",t.PREVIEW="PREVIEW"}(Nn||(Nn={})),function(t){t.BOOTSTRAP="Bootstrap",t.CHANGE_POSITION="ChangePosition",t.CLOSE_PREVIEW="ClosePreview",t.PREVIEW_LOADED="PreviewLoaded",t.SET_AVALIABLE_PORTALS="SetAvaliablePortals",t.SET_CONTENT="SetContent",t.SET_SELECTED_ELEMENT="SetSelectedElement",t.SET_VIEW_MODE="SetViewMode",t.ADD_ELEMENT="AddElement",t.REMOVE_ELEMENT="RemoveElement",t.UPDATE_ELEMENT="UpdateElement",t.SET_ELEMENT="SetElement"}(An||(An={})),(jn||(jn={})).ON_CLICK="OnClick",function(t){t.NATIVE="Native",t.PENDO="Pendo"}(wn||(wn={})),function(t){t.NAVIGATE="Navigate",t.CHANGE_TUTORIAL="ChangeTutorial",t.OPEN_GUIDE="OpenGuide"}(Pn||(Pn={})),function(t){t.PRIMARY="primary",t.SECONDARY="primary",t.WARNING="warning",t.DANGER="danger",t.NEUTRAL="neutral",t.ACTIVE="active",t.INFO="info"}(Dn||(Dn={}));var qn;Dn.PRIMARY;!function(t){t.U="U",t.B="B",t.Em="Em",t.InlineCode="InlineCode"}(qn||(qn={}));var Xn,Qn,to,eo,ro=function(t){return function(t){return $n(t)&&t.length>=3&&t.length<100&&Jn.test(t)}(t)};!function(t){t.COLLAPSED="Collapsed",t.EXPANDED="Expanded",t.MINIMIZED="Minimized"}(Xn||(Xn={})),function(t){t.TUTORIAL="Tutorial",t.PORTAL="Portal"}(Qn||(Qn={})),function(t){t.Global="Global",t.Organization="Organization"}(to||(to={})),function(t){t.Root="root",t.Rule="rule",t.Atrule="atrule",t.Decl="decl",t.Any="any"}(eo||(eo={}));var no=function(t,e,r,n,o,i,a,u){if(!t){var c;if(void 0===e)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[r,n,o,i,a,u],s=0;(c=new Error(e.replace(/%s/g,(function(){return l[s++]})))).name="Invariant Violation"}throw c.framesToPop=1,c}},oo=function(t){return no(!t||O(t),"(Candu) styleguide must be undefined or an object")},io=function(r){var n=r.clientToken,o=r.userId,i=r.traits,a=r.options,u=r.styleguide,c=e(r,["clientToken","userId","traits","options","styleguide"]);return no(function(t){return $n(t)&&!!t.match(/^[0-9a-zA-Z]*$/)&&t.length>=10}(n),"(Candu) you must provide a valid clientToken"),no(!o||function(t){return Zn(t)||$n(t)&&t.trim().length>0}(o),"(Candu) you must provide a valid userId"),oo(u),no(!i||O(i),"(Candu) traits must be undefined or an object"),no(!a||O(a),"(Candu) options must be undefined or an object"),t(t({},c),{clientToken:n,traits:i||{},options:a||{},styleguide:u||{},userId:o||Cn()})},ao=function(r){var n=r.slug,o=r.styleguide,i=r.contentHashId,a=r.tutorialId,u=r.tutorialDocument,c=e(r,["slug","styleguide","contentHashId","tutorialId","tutorialDocument"]);return oo(o),t(t({},c),{slug:n,styleguide:o||{},contentHashId:i,tutorialId:a,tutorialDocument:u})},uo=function(t){var e=t.slug,r=t.styleguide;return oo(r),{slug:e,styleguide:r||{}}};var co="/api/segmentMemberships",lo="/api/tutorialDocumentsEditor",so=function(t){return r(void 0,void 0,void 0,(function(){return n(this,(function(e){switch(e.label){case 0:return[4,fetch(t)];case 1:return[2,e.sent().json()]}}))}))},fo=function(t){return so("https://api.candu.ai"+t)},po=function(t){return so("https://cdn.candu.ai"+t)},vo={tutorialDocumentLatestPublished:function(t,e){return r(void 0,void 0,void 0,(function(){return n(this,(function(r){return[2,fo(lo+"?token="+t+"&finder=latestPublished&tutorialId="+e)]}))}))},portalAsset:function(t,e){return r(void 0,void 0,void 0,(function(){return n(this,(function(r){return[2,po("/portals/"+t+"/"+e+"/head.json")]}))}))},segmentMembership:function(t,e){return r(void 0,void 0,void 0,(function(){return n(this,(function(r){return[2,fo(co+"/"+e+"?token="+t)]}))}))},tutorialDocument:function(t,e,r){var n=t.contentHashId,o=t.tutorialId,i=t.tutorialDocument,a=t.slug,u=function(t){return{byId:function(e){return fo(lo+"/"+e+"?token="+t)},bySlug:function(e){return po("/tutorials/"+t+"/"+e+".json")},byContentHash:function(e){return po("/tutorials/"+t+"/"+e+".json")}}}(e);return function(t){return Zn(t)}(o)?u.byId(o):ro(a)?u.bySlug(a):function(t){return $n(t)&&!!t.match(/^[0-9a-zA-Z]{40}$/)}(n)?u.byContentHash(n):O(i)?Promise.resolve(i):(hn.error(vn[dn.NO_VALID_TUTORIAL_IDENTIFIER]),r.track(dn.NO_VALID_TUTORIAL_IDENTIFIER,{slug:t.slug}),null)}},_o=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return console.error.apply(console,t)},ho=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return console.warn.apply(console,t)},yo={error:_o,warning:ho},bo=function(t){switch(t.trigger){case jn.ON_CLICK:default:return"onClick"}},go=function(e,r){var n=e.data;if(!n||!n.actions)return{};var o=function(e){r.provider.eventing.track(dn.TUTORIAL_INTERACTION,t(t({},e),r.trackingIdentifiers||{}))};return n.actions.map((function(t){return function(t,e){var r,n,o;switch(t.handler.type){case Pn.NAVIGATE:return(r={})[bo(t)]=function(){var r=t.handler,n=r.href,o=r.target;e(t),"Blank"===o?window.open(n,"_blank"):n&&n.includes("mailto:")?window.location=n:document.location.href=n},r;case Pn.CHANGE_TUTORIAL:return(n={})[bo(t)]=function(){var e=t.handler.tutorialId;_o("TODO -> change tutorial",e)},n;case Pn.OPEN_GUIDE:return(o={})[bo(t)]=function(){var e=t.handler.guideId;_o("TODO -> open guide",e)},o;default:return{}}}(t,o)})).reduce((function(e,r){return t(t({},e),r)}),{})},Eo=function(e,r){try{var n=r.provider,o=r.document,i=r.trackingIdentifiers,a=o.nodes[e];if(!a)return yo.error("Document is corrupted. Refusing to move further."),null;var u=function(t){return Eo(t,r)},c=a.type,l=a.props,s=a.css,f=t(t(t({},l||{}),{style:s||{},children:(l||{}).children||a.nodes&&a.nodes.map(u)}),go(a,{trackingIdentifiers:i,provider:n})),d={nodeId:e,node:a,document:o,render:{node:u,styleguide:function(t,e){return void 0===e&&(e={}),r.renderNode(t,{api:d,attributes:e})},tutorial:function(t){return r.renderTutorial(t)},portal:function(t){return r.renderPortal(t)}},trackingIdentifiers:i},p=d.render.styleguide(c,f);return p||(yo.error(vn[dn.UNKOWN_NODE_TYPE],{type:c}),n.eventing.track(dn.UNKOWN_NODE_TYPE,{type:c}),null)}catch(t){return yo.error(vn[dn.STYLEGUIDE_MAP_ERROR],t),null}},Oo=Ar((function(e,r){var n,o,i=e.provider,a=e.portal,u=e.tutorial,c=i.styleguide;return u&&(o=u.styleguide),a&&(n=a.styleguide),t(t(t(t({},c||{}),n||{}),o||{}),r||{})})),To="",Ro="#EDEDED",Io="#333745",mo="#838792",No="#FEFEFE",Ao="#FEFEFE",jo={primary:"#6310E5",secondary:"#59C3C3",tertiary:"#4D515D",warning:"#FCAD0D",danger:"#EE4266"},wo=function(t){var e=document.createElement("link");e.setAttribute("rel","stylesheet"),e.setAttribute("href","https://cdn.candu.ai/styleguides/applications/"+t+"/default/main.css"),document.head.appendChild(e)};export{Ro as DEFAULT_ALERT_COLOR,To as DEFAULT_ALT,No as DEFAULT_TAB_ACTIVE_COLOR,Ao as DEFAULT_TAB_COLOR,Io as DEFAULT_TAB_HEADER_COLOR,mo as DEFAULT_TAB_ITEM_COLOR,vn as ERROR_MESSAGES,fn as ERROR_SLUGS,dn as EVENT_NAMES,hn as LOGGER,vo as RESOURCES,jo as STYLEGUIDE_COLORS,cn as adaptCustomNodes,wo as attachStylesheet,un as convertStyleNumberValues,_n as defaultStyleguide,yn as internalEventing,_o as logError,ho as logWarning,yo as logger,Eo as mapNodeToStyleguide,Oo as mergeStyleguidesFromContext,uo as portalValidation,io as providerValidation,ao as tutorialValidation,an as unpackShorthandStyles};
//# sourceMappingURL=index.es.js.map

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

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("util"),require("crypto")):"function"==typeof define&&define.amd?define(["exports","util","crypto"],e):e((t=t||self)["@candulabs/core"]={},t.util,t.crypto)}(this,(function(t,e,r){"use strict";r=r&&r.hasOwnProperty("default")?r.default:r;var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(t,e){return t(e={exports:{}},e.exports),e.exports}var a="object"==typeof n&&n&&n.Object===Object&&n,i="object"==typeof self&&self&&self.Object===Object&&self,u=a||i||Function("return this")(),c=u.Symbol,l=Object.prototype,s=l.hasOwnProperty,d=l.toString,f=c?c.toStringTag:void 0;var _=function(t){var e=s.call(t,f),r=t[f];try{t[f]=void 0;var n=!0}catch(t){}var o=d.call(t);return n&&(e?t[f]=r:delete t[f]),o},p=Object.prototype.toString;var v=function(t){return p.call(t)},h="[object Null]",E="[object Undefined]",y=c?c.toStringTag:void 0;var b=function(t){return null==t?void 0===t?E:h:y&&y in Object(t)?_(t):v(t)};var O=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},g="[object AsyncFunction]",T="[object Function]",R="[object GeneratorFunction]",A="[object Proxy]";var I,N=function(t){if(!O(t))return!1;var e=b(t);return e==T||e==R||e==g||e==A},m=u["__core-js_shared__"],j=(I=/[^.]+$/.exec(m&&m.keys&&m.keys.IE_PROTO||""))?"Symbol(src)_1."+I:"";var D=function(t){return!!j&&j in t},L=Function.prototype.toString;var P=function(t){if(null!=t){try{return L.call(t)}catch(t){}try{return t+""}catch(t){}}return""},S=/^\[object .+?Constructor\]$/,w=Function.prototype,C=Object.prototype,U=w.toString,k=C.hasOwnProperty,B=RegExp("^"+U.call(k).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var M=function(t){return!(!O(t)||D(t))&&(N(t)?B:S).test(P(t))};var x=function(t,e){return null==t?void 0:t[e]};var $=function(t,e){var r=x(t,e);return M(r)?r:void 0},z=function(){try{var t=$(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();var G=function(t,e,r){"__proto__"==e&&z?z(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r};var W=function(t){return function(e,r,n){for(var o=-1,a=Object(e),i=n(e),u=i.length;u--;){var c=i[t?u:++o];if(!1===r(a[c],c,a))break}return e}}();var F=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n};var V=function(t){return null!=t&&"object"==typeof t},Y="[object Arguments]";var H=function(t){return V(t)&&b(t)==Y},K=Object.prototype,q=K.hasOwnProperty,J=K.propertyIsEnumerable,Z=H(function(){return arguments}())?H:function(t){return V(t)&&q.call(t,"callee")&&!J.call(t,"callee")},X=Array.isArray;var Q=function(){return!1},tt=o((function(t,e){var r=e&&!e.nodeType&&e,n=r&&t&&!t.nodeType&&t,o=n&&n.exports===r?u.Buffer:void 0,a=(o?o.isBuffer:void 0)||Q;t.exports=a})),et=9007199254740991,rt=/^(?:0|[1-9]\d*)$/;var nt=function(t,e){var r=typeof t;return!!(e=null==e?et:e)&&("number"==r||"symbol"!=r&&rt.test(t))&&t>-1&&t%1==0&&t<e},ot=9007199254740991;var at=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=ot},it={};it["[object Float32Array]"]=it["[object Float64Array]"]=it["[object Int8Array]"]=it["[object Int16Array]"]=it["[object Int32Array]"]=it["[object Uint8Array]"]=it["[object Uint8ClampedArray]"]=it["[object Uint16Array]"]=it["[object Uint32Array]"]=!0,it["[object Arguments]"]=it["[object Array]"]=it["[object ArrayBuffer]"]=it["[object Boolean]"]=it["[object DataView]"]=it["[object Date]"]=it["[object Error]"]=it["[object Function]"]=it["[object Map]"]=it["[object Number]"]=it["[object Object]"]=it["[object RegExp]"]=it["[object Set]"]=it["[object String]"]=it["[object WeakMap]"]=!1;var ut=function(t){return V(t)&&at(t.length)&&!!it[b(t)]};var ct=function(t){return function(e){return t(e)}},lt=o((function(t,e){var r=e&&!e.nodeType&&e,n=r&&t&&!t.nodeType&&t,o=n&&n.exports===r&&a.process,i=function(){try{var t=n&&n.require&&n.require("util").types;return t||o&&o.binding&&o.binding("util")}catch(t){}}();t.exports=i})),st=lt&&lt.isTypedArray,dt=st?ct(st):ut,ft=Object.prototype.hasOwnProperty;var _t=function(t,e){var r=X(t),n=!r&&Z(t),o=!r&&!n&&tt(t),a=!r&&!n&&!o&&dt(t),i=r||n||o||a,u=i?F(t.length,String):[],c=u.length;for(var l in t)!e&&!ft.call(t,l)||i&&("length"==l||o&&("offset"==l||"parent"==l)||a&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||nt(l,c))||u.push(l);return u},pt=Object.prototype;var vt=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||pt)};var ht=function(t,e){return function(r){return t(e(r))}}(Object.keys,Object),Et=Object.prototype.hasOwnProperty;var yt=function(t){if(!vt(t))return ht(t);var e=[];for(var r in Object(t))Et.call(t,r)&&"constructor"!=r&&e.push(r);return e};var bt=function(t){return null!=t&&at(t.length)&&!N(t)};var Ot=function(t){return bt(t)?_t(t):yt(t)};var gt=function(t,e){return t&&W(t,e,Ot)};var Tt=function(){this.__data__=[],this.size=0};var Rt=function(t,e){return t===e||t!=t&&e!=e};var At=function(t,e){for(var r=t.length;r--;)if(Rt(t[r][0],e))return r;return-1},It=Array.prototype.splice;var Nt=function(t){var e=this.__data__,r=At(e,t);return!(r<0)&&(r==e.length-1?e.pop():It.call(e,r,1),--this.size,!0)};var mt=function(t){var e=this.__data__,r=At(e,t);return r<0?void 0:e[r][1]};var jt=function(t){return At(this.__data__,t)>-1};var Dt=function(t,e){var r=this.__data__,n=At(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};function Lt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Lt.prototype.clear=Tt,Lt.prototype.delete=Nt,Lt.prototype.get=mt,Lt.prototype.has=jt,Lt.prototype.set=Dt;var Pt=Lt;var St=function(){this.__data__=new Pt,this.size=0};var wt=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r};var Ct=function(t){return this.__data__.get(t)};var Ut=function(t){return this.__data__.has(t)},kt=$(u,"Map"),Bt=$(Object,"create");var Mt=function(){this.__data__=Bt?Bt(null):{},this.size=0};var xt=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},$t="__lodash_hash_undefined__",zt=Object.prototype.hasOwnProperty;var Gt=function(t){var e=this.__data__;if(Bt){var r=e[t];return r===$t?void 0:r}return zt.call(e,t)?e[t]:void 0},Wt=Object.prototype.hasOwnProperty;var Ft=function(t){var e=this.__data__;return Bt?void 0!==e[t]:Wt.call(e,t)},Vt="__lodash_hash_undefined__";var Yt=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Bt&&void 0===e?Vt:e,this};function Ht(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Ht.prototype.clear=Mt,Ht.prototype.delete=xt,Ht.prototype.get=Gt,Ht.prototype.has=Ft,Ht.prototype.set=Yt;var Kt=Ht;var qt=function(){this.size=0,this.__data__={hash:new Kt,map:new(kt||Pt),string:new Kt}};var Jt=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var Zt=function(t,e){var r=t.__data__;return Jt(e)?r["string"==typeof e?"string":"hash"]:r.map};var Xt=function(t){var e=Zt(this,t).delete(t);return this.size-=e?1:0,e};var Qt=function(t){return Zt(this,t).get(t)};var te=function(t){return Zt(this,t).has(t)};var ee=function(t,e){var r=Zt(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};function re(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}re.prototype.clear=qt,re.prototype.delete=Xt,re.prototype.get=Qt,re.prototype.has=te,re.prototype.set=ee;var ne=re,oe=200;var ae=function(t,e){var r=this.__data__;if(r instanceof Pt){var n=r.__data__;if(!kt||n.length<oe-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new ne(n)}return r.set(t,e),this.size=r.size,this};function ie(t){var e=this.__data__=new Pt(t);this.size=e.size}ie.prototype.clear=St,ie.prototype.delete=wt,ie.prototype.get=Ct,ie.prototype.has=Ut,ie.prototype.set=ae;var ue=ie,ce="__lodash_hash_undefined__";var le=function(t){return this.__data__.set(t,ce),this};var se=function(t){return this.__data__.has(t)};function de(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new ne;++e<r;)this.add(t[e])}de.prototype.add=de.prototype.push=le,de.prototype.has=se;var fe=de;var _e=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1};var pe=function(t,e){return t.has(e)},ve=1,he=2;var Ee=function(t,e,r,n,o,a){var i=r&ve,u=t.length,c=e.length;if(u!=c&&!(i&&c>u))return!1;var l=a.get(t);if(l&&a.get(e))return l==e;var s=-1,d=!0,f=r&he?new fe:void 0;for(a.set(t,e),a.set(e,t);++s<u;){var _=t[s],p=e[s];if(n)var v=i?n(p,_,s,e,t,a):n(_,p,s,t,e,a);if(void 0!==v){if(v)continue;d=!1;break}if(f){if(!_e(e,(function(t,e){if(!pe(f,e)&&(_===t||o(_,t,r,n,a)))return f.push(e)}))){d=!1;break}}else if(_!==p&&!o(_,p,r,n,a)){d=!1;break}}return a.delete(t),a.delete(e),d},ye=u.Uint8Array;var be=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r};var Oe=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r},ge=1,Te=2,Re="[object Boolean]",Ae="[object Date]",Ie="[object Error]",Ne="[object Map]",me="[object Number]",je="[object RegExp]",De="[object Set]",Le="[object String]",Pe="[object Symbol]",Se="[object ArrayBuffer]",we="[object DataView]",Ce=c?c.prototype:void 0,Ue=Ce?Ce.valueOf:void 0;var ke=function(t,e,r,n,o,a,i){switch(r){case we:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Se:return!(t.byteLength!=e.byteLength||!a(new ye(t),new ye(e)));case Re:case Ae:case me:return Rt(+t,+e);case Ie:return t.name==e.name&&t.message==e.message;case je:case Le:return t==e+"";case Ne:var u=be;case De:var c=n&ge;if(u||(u=Oe),t.size!=e.size&&!c)return!1;var l=i.get(t);if(l)return l==e;n|=Te,i.set(t,e);var s=Ee(u(t),u(e),n,o,a,i);return i.delete(t),s;case Pe:if(Ue)return Ue.call(t)==Ue.call(e)}return!1};var Be=function(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t};var Me=function(t,e,r){var n=e(t);return X(t)?n:Be(n,r(t))};var xe=function(t,e){for(var r=-1,n=null==t?0:t.length,o=0,a=[];++r<n;){var i=t[r];e(i,r,t)&&(a[o++]=i)}return a};var $e=function(){return[]},ze=Object.prototype.propertyIsEnumerable,Ge=Object.getOwnPropertySymbols,We=Ge?function(t){return null==t?[]:(t=Object(t),xe(Ge(t),(function(e){return ze.call(t,e)})))}:$e;var Fe=function(t){return Me(t,Ot,We)},Ve=1,Ye=Object.prototype.hasOwnProperty;var He=function(t,e,r,n,o,a){var i=r&Ve,u=Fe(t),c=u.length;if(c!=Fe(e).length&&!i)return!1;for(var l=c;l--;){var s=u[l];if(!(i?s in e:Ye.call(e,s)))return!1}var d=a.get(t);if(d&&a.get(e))return d==e;var f=!0;a.set(t,e),a.set(e,t);for(var _=i;++l<c;){var p=t[s=u[l]],v=e[s];if(n)var h=i?n(v,p,s,e,t,a):n(p,v,s,t,e,a);if(!(void 0===h?p===v||o(p,v,r,n,a):h)){f=!1;break}_||(_="constructor"==s)}if(f&&!_){var E=t.constructor,y=e.constructor;E!=y&&"constructor"in t&&"constructor"in e&&!("function"==typeof E&&E instanceof E&&"function"==typeof y&&y instanceof y)&&(f=!1)}return a.delete(t),a.delete(e),f},Ke=$(u,"DataView"),qe=$(u,"Promise"),Je=$(u,"Set"),Ze=$(u,"WeakMap"),Xe=P(Ke),Qe=P(kt),tr=P(qe),er=P(Je),rr=P(Ze),nr=b;(Ke&&"[object DataView]"!=nr(new Ke(new ArrayBuffer(1)))||kt&&"[object Map]"!=nr(new kt)||qe&&"[object Promise]"!=nr(qe.resolve())||Je&&"[object Set]"!=nr(new Je)||Ze&&"[object WeakMap]"!=nr(new Ze))&&(nr=function(t){var e=b(t),r="[object Object]"==e?t.constructor:void 0,n=r?P(r):"";if(n)switch(n){case Xe:return"[object DataView]";case Qe:return"[object Map]";case tr:return"[object Promise]";case er:return"[object Set]";case rr:return"[object WeakMap]"}return e});var or=nr,ar=1,ir="[object Arguments]",ur="[object Array]",cr="[object Object]",lr=Object.prototype.hasOwnProperty;var sr=function(t,e,r,n,o,a){var i=X(t),u=X(e),c=i?ur:or(t),l=u?ur:or(e),s=(c=c==ir?cr:c)==cr,d=(l=l==ir?cr:l)==cr,f=c==l;if(f&&tt(t)){if(!tt(e))return!1;i=!0,s=!1}if(f&&!s)return a||(a=new ue),i||dt(t)?Ee(t,e,r,n,o,a):ke(t,e,c,r,n,o,a);if(!(r&ar)){var _=s&&lr.call(t,"__wrapped__"),p=d&&lr.call(e,"__wrapped__");if(_||p){var v=_?t.value():t,h=p?e.value():e;return a||(a=new ue),o(v,h,r,n,a)}}return!!f&&(a||(a=new ue),He(t,e,r,n,o,a))};var dr=function t(e,r,n,o,a){return e===r||(null==e||null==r||!V(e)&&!V(r)?e!=e&&r!=r:sr(e,r,n,o,t,a))},fr=1,_r=2;var pr=function(t,e,r,n){var o=r.length,a=o,i=!n;if(null==t)return!a;for(t=Object(t);o--;){var u=r[o];if(i&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++o<a;){var c=(u=r[o])[0],l=t[c],s=u[1];if(i&&u[2]){if(void 0===l&&!(c in t))return!1}else{var d=new ue;if(n)var f=n(l,s,c,t,e,d);if(!(void 0===f?dr(s,l,fr|_r,n,d):f))return!1}}return!0};var vr=function(t){return t==t&&!O(t)};var hr=function(t){for(var e=Ot(t),r=e.length;r--;){var n=e[r],o=t[n];e[r]=[n,o,vr(o)]}return e};var Er=function(t,e){return function(r){return null!=r&&(r[t]===e&&(void 0!==e||t in Object(r)))}};var yr=function(t){var e=hr(t);return 1==e.length&&e[0][2]?Er(e[0][0],e[0][1]):function(r){return r===t||pr(r,t,e)}},br="[object Symbol]";var Or=function(t){return"symbol"==typeof t||V(t)&&b(t)==br},gr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Tr=/^\w*$/;var Rr=function(t,e){if(X(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!Or(t))||(Tr.test(t)||!gr.test(t)||null!=e&&t in Object(e))},Ar="Expected a function";function Ir(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError(Ar);var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var i=t.apply(this,n);return r.cache=a.set(o,i)||a,i};return r.cache=new(Ir.Cache||ne),r}Ir.Cache=ne;var Nr=Ir,mr=500;var jr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Dr=/\\(\\)?/g,Lr=function(t){var e=Nr(t,(function(t){return r.size===mr&&r.clear(),t})),r=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(jr,(function(t,r,n,o){e.push(n?o.replace(Dr,"$1"):r||t)})),e}));var Pr=function(t,e){for(var r=-1,n=null==t?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o},Sr=1/0,wr=c?c.prototype:void 0,Cr=wr?wr.toString:void 0;var Ur=function t(e){if("string"==typeof e)return e;if(X(e))return Pr(e,t)+"";if(Or(e))return Cr?Cr.call(e):"";var r=e+"";return"0"==r&&1/e==-Sr?"-0":r};var kr=function(t){return null==t?"":Ur(t)};var Br=function(t,e){return X(t)?t:Rr(t,e)?[t]:Lr(kr(t))},Mr=1/0;var xr=function(t){if("string"==typeof t||Or(t))return t;var e=t+"";return"0"==e&&1/t==-Mr?"-0":e};var $r=function(t,e){for(var r=0,n=(e=Br(e,t)).length;null!=t&&r<n;)t=t[xr(e[r++])];return r&&r==n?t:void 0};var zr=function(t,e,r){var n=null==t?void 0:$r(t,e);return void 0===n?r:n};var Gr=function(t,e){return null!=t&&e in Object(t)};var Wr=function(t,e,r){for(var n=-1,o=(e=Br(e,t)).length,a=!1;++n<o;){var i=xr(e[n]);if(!(a=null!=t&&r(t,i)))break;t=t[i]}return a||++n!=o?a:!!(o=null==t?0:t.length)&&at(o)&&nt(i,o)&&(X(t)||Z(t))};var Fr=function(t,e){return null!=t&&Wr(t,e,Gr)},Vr=1,Yr=2;var Hr=function(t,e){return Rr(t)&&vr(e)?Er(xr(t),e):function(r){var n=zr(r,t);return void 0===n&&n===e?Fr(r,t):dr(e,n,Vr|Yr)}};var Kr=function(t){return t};var qr=function(t){return function(e){return null==e?void 0:e[t]}};var Jr=function(t){return function(e){return $r(e,t)}};var Zr=function(t){return Rr(t)?qr(xr(t)):Jr(t)};var Xr=function(t){return"function"==typeof t?t:null==t?Kr:"object"==typeof t?X(t)?Hr(t[0],t[1]):yr(t):Zr(t)};var Qr=function(t,e){var r={};return e=Xr(e),gt(t,(function(t,n,o){G(r,n,e(t,n,o))})),r},tn={boxFlex:!0,boxFlexGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,strokeDashoffset:!0,strokeOpacity:!0,strokeWidth:!0};var en=["Webkit","ms","Moz","O"];Object.keys(tn).forEach((function(t){en.forEach((function(e){tn[function(t,e){return t+e.charAt(0).toUpperCase()+e.substring(1)}(e,t)]=tn[t]}))}));var rn={isUnitlessNumber:tn,shorthandPropertyExpansions:{background:{backgroundImage:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundColor:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0}}};const nn=t=>{const{padding:e,margin:r,...n}=t.css;let o={};return e&&(o={paddingRight:e,paddingLeft:e,paddingBottom:e,paddingTop:e}),r&&(o={...o,marginRight:r,marginLeft:r,marginBottom:r,marginTop:r}),{...t,css:{...o,...n}}},on=t=>{const r=t.css,n={};return Object.entries(r).forEach(([t,r])=>{if(e.isNumber(r))return rn.isUnitlessNumber[t]?void(n[t]=`${r}`):void(n[t]=`${r}px`);n[t]=r}),{...t,css:n}},an=t=>`candu.sdk.${t}`,un=t=>an(`error.${t}`),cn={UNKOWN_NODE_TYPE:"unknown_node_type",UNKOWN_BLOCK_NODE_TYPE:"unkown_block_node_type",UNKOWN_INLINE_NODE_TYPE:"unkown_inline_node_type",UNKOWN_NODE_OBJECT_TYPE:"unkown_node_object_type",TUTORIAL_ERROR:"tutorial_error_boundary",PORTAL_ERROR:"portal_error_boundary",STYLEGUIDE_MAP_ERROR:"styleguide_map",RENDER_NODE_ERROR:"render_node"},ln={HEARTBEAT:an("heartbeat"),PREVIEW_OPEN:an("preview.open"),PORTAL:an("portal"),TUTORIAL:an("tutorial"),TUTORIAL_INTERACTION:an("tutorial.interaction"),PORTAL_ASSET_NOT_FOUND:un("portal_asset_not_found"),PORTAL_NO_SEGMENT_IDS:un("portal_no_segment_ids"),NO_MATCHING_TUTORIALS:un("no_matching_tutorials"),NO_VALID_TUTORIAL_IDENTIFIER:un("no_valid_tutorial_identifier"),COMMIT_API_LOADING_ERROR:un("commit_api"),TUTORIAL_LOADING_ERROR:un("tutorial"),UNKOWN_NODE_TYPE:un(cn.UNKOWN_NODE_TYPE),UNKOWN_INLINE_NODE_TYPE:un(cn.UNKOWN_INLINE_NODE_TYPE),UNKOWN_NODE_OBJECT_TYPE:un(cn.UNKOWN_NODE_OBJECT_TYPE),TUTORIAL_ERROR:un(cn.TUTORIAL_ERROR),PORTAL_ERROR:un(cn.PORTAL_ERROR),STYLEGUIDE_MAP_ERROR:un(cn.TUTORIAL_ERROR),RENDER_NODE_ERROR:un(cn.TUTORIAL_ERROR),CIRCULAR_DEPENDENCY_EMBED_PORTAL:un("circular_dependecy_embed_portal"),CIRCULAR_DEPENDENCY_EMBED_TUTORIAL:un("circular_dependecy_embed_tutorial")},sn=t=>`An error has occured while trying to parse your Tutorial.\nUpgrade the SDK to the latest version to get rid of this error.\nErrorCode: ${t}.`,dn={EVENTING_NOT_INITIALIZED:"You tried to send an event, but you haven't initialized eventing.\nThis is happening because you called eventing outside the scope of the CanduProvider. It can be fixed by:\n1. Adding CanduProvider to the root of the application.\n2. Initializing a new Eventing object outside of Candu.\nRead here for more context: http://udn.ac/tracking-not-init.\n",[ln.PORTAL_ASSET_NOT_FOUND]:"Could not find the requested Portal. This could happen because:\n1. The Portal does not exist or it was deleted.\n2. The Portal has not been made avaliable to be rendered.\n3. CORS Authenticaton failed.\nSee http://udn.ac/portal-not-found for more information.\n",[ln.PORTAL_NO_SEGMENT_IDS]:"You have tried to render a Portal that doesn't contain any content.\nAdd content to your Portal: https://udn.ac/update-portals.\n",[ln.NO_MATCHING_TUTORIALS]:"The Tutorial will not be rendered because there are no matching segments for the given user.",[ln.NO_VALID_TUTORIAL_IDENTIFIER]:"(Candu/Tutorial) You must define one of tutorialId, slug, commitId or contentHashId.",[ln.TUTORIAL_LOADING_ERROR]:"An error has occurred while trying to load the Tutorial",[ln.UNKOWN_INLINE_NODE_TYPE]:sn(cn.UNKOWN_INLINE_NODE_TYPE),[ln.UNKOWN_NODE_TYPE]:sn(cn.UNKOWN_NODE_TYPE),[ln.CIRCULAR_DEPENDENCY_EMBED_PORTAL]:"Circular dependency found on Embeded Portal. Please take a look at the Portal Content.",[ln.CIRCULAR_DEPENDENCY_EMBED_TUTORIAL]:"Circular dependency found on Embeded Tutorial. Please take a look at the Tutorial Content.",[ln.PORTAL_ERROR]:"An error has occured within Portal",[ln.TUTORIAL_ERROR]:"An error has occured within Tutorial",[ln.RENDER_NODE_ERROR]:"An error has occured while rendering tutorial node",[ln.STYLEGUIDE_MAP_ERROR]:"An error has occured while mapping node to styleguide"},fn={Alert:!0,B:!0,Badge:!0,Button:!0,Card:!0,Code:!0,Document:!0,Em:!0,EmbedPortal:!0,EmbedTutorial:!0,Flex:!0,FlexItem:!0,H1:!0,H2:!0,H3:!0,H4:!0,H5:!0,H6:!0,Image:!0,InlineCode:!0,Link:!0,List:!0,ListItem:!0,P:!0,RichText:!0,Spacing:!0,Text:!0,U:!0,View:!0,Player:!0},_n={error:console.error,warning:console.warn};for(var pn=function(){return r.randomBytes(16)},vn=[],hn=0;hn<256;++hn)vn[hn]=(hn+256).toString(16).substr(1);var En=function(t,e){var r=e||0,n=vn;return[n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]]].join("")};var yn,bn,On=function(t,e,r){var n=e&&r||0;"string"==typeof t&&(e="binary"===t?new Array(16):null,t=null);var o=(t=t||{}).random||(t.rng||pn)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,e)for(var a=0;a<16;++a)e[n+a]=o[a];return e||En(o)};!function(t){t.UserGenerated="UserGenerated",t.SDK="SDK"}(yn||(yn={})),function(t){t.Identify="Identify",t.Group="Group",t.Track="Track",t.Page="Page",t.Screen="Screen"}(bn||(bn={}));const gn=()=>"undefined"!=typeof window&&window.localStorage,Tn=t=>e=>{gn()&&null!=e&&window.localStorage.setItem(t,JSON.stringify(e))};const Rn={anonymousId:{getOrCreate:((t,e)=>()=>(t=>()=>{if(gn()){const e=window.localStorage.getItem(t);if(e)try{return JSON.parse(e)}catch(t){return null}}})(t)()||e())("candu:anonymous_id",()=>{const t=On();return Tn("candu:anonymous_id")(t),t}),set:Tn("candu:anonymous_id")}}.anonymousId.getOrCreate;var An="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},In="object"==typeof An&&An&&An.Object===Object&&An,Nn="object"==typeof self&&self&&self.Object===Object&&self,mn=(In||Nn||Function("return this")()).Symbol,jn=Object.prototype,Dn=jn.hasOwnProperty,Ln=jn.toString,Pn=mn?mn.toStringTag:void 0;var Sn=function(t){var e=Dn.call(t,Pn),r=t[Pn];try{t[Pn]=void 0;var n=!0}catch(t){}var o=Ln.call(t);return n&&(e?t[Pn]=r:delete t[Pn]),o},wn=Object.prototype.toString;var Cn=function(t){return wn.call(t)},Un="[object Null]",kn="[object Undefined]",Bn=mn?mn.toStringTag:void 0;var Mn=function(t){return null==t?void 0===t?kn:Un:Bn&&Bn in Object(t)?Sn(t):Cn(t)},xn=Array.isArray;var $n=function(t){return null!=t&&"object"==typeof t},zn="[object String]";var Gn=function(t){return"string"==typeof t||!xn(t)&&$n(t)&&Mn(t)==zn},Wn="[object Number]";var Fn=function(t){return"number"==typeof t||$n(t)&&Mn(t)==Wn};const Vn=/^([a-zA-Z0-9]|_|-)+$/,Yn=t=>Fn(t)&&t>=0;var Hn,Kn,qn,Jn,Zn,Xn;!function(t){t.SDK="SDK",t.PREVIEW="PREVIEW"}(Hn||(Hn={})),function(t){t.BOOTSTRAP="Bootstrap",t.CHANGE_POSITION="ChangePosition",t.CLOSE_PREVIEW="ClosePreview",t.PREVIEW_LOADED="PreviewLoaded",t.SET_AVALIABLE_PORTALS="SetAvaliablePortals",t.SET_CONTENT="SetContent",t.SET_SELECTED_ELEMENT="SetSelectedElement",t.SET_VIEW_MODE="SetViewMode",t.ADD_ELEMENT="AddElement",t.REMOVE_ELEMENT="RemoveElement",t.UPDATE_ELEMENT="UpdateElement",t.SET_ELEMENT="SetElement"}(Kn||(Kn={})),function(t){t.ON_CLICK="OnClick"}(qn||(qn={})),function(t){t.NATIVE="Native",t.PENDO="Pendo"}(Jn||(Jn={})),function(t){t.NAVIGATE="Navigate",t.CHANGE_TUTORIAL="ChangeTutorial",t.OPEN_GUIDE="OpenGuide"}(Zn||(Zn={})),function(t){t.PRIMARY="primary",t.SECONDARY="primary",t.WARNING="warning",t.DANGER="danger",t.NEUTRAL="neutral",t.ACTIVE="active",t.INFO="info"}(Xn||(Xn={}));Xn.PRIMARY;var Qn;!function(t){t.U="U",t.B="B",t.Em="Em",t.InlineCode="InlineCode"}(Qn||(Qn={}));const to=t=>(t=>Gn(t)&&t.length>=3&&t.length<100&&Vn.test(t))(t);var eo,ro,no,oo;!function(t){t.COLLAPSED="Collapsed",t.EXPANDED="Expanded",t.MINIMIZED="Minimized"}(eo||(eo={})),function(t){t.TUTORIAL="Tutorial",t.PORTAL="Portal"}(ro||(ro={})),function(t){t.Global="Global",t.Organization="Organization"}(no||(no={})),function(t){t.Root="root",t.Rule="rule",t.Atrule="atrule",t.Decl="decl",t.Any="any"}(oo||(oo={}));var ao=function(t,e,r,n,o,a,i,u){if(!t){var c;if(void 0===e)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[r,n,o,a,i,u],s=0;(c=new Error(e.replace(/%s/g,(function(){return l[s++]})))).name="Invariant Violation"}throw c.framesToPop=1,c}};const io=t=>ao(!t||O(t),"(Candu) styleguide must be undefined or an object");var uo=Object.freeze({__proto__:null,API_BASE_URL:"https://api.candu.ai",CDN_BASE_URL:"https://cdn.candu.ai",VERSION:"0.5.2"});const{API_BASE_URL:co}=uo,{CDN_BASE_URL:lo}=uo,so="/api/segmentMemberships",fo="/api/tutorialDocumentsEditor",_o=async t=>(await fetch(t)).json(),po=t=>_o(`${co}${t}`),vo=t=>_o(`${lo}${t}`),ho={tutorialDocumentLatestPublished:async(t,e)=>po(`${fo}?token=${t}&finder=latestPublished&tutorialId=${e}`),portalAsset:async(t,e)=>vo(`/portals/${t}/${e}/head.json`),segmentMembership:async(t,e)=>po(`${so}/${e}?token=${t}`),tutorialDocument:(t,e,r)=>{const{contentHashId:n,tutorialId:o,tutorialDocument:a,slug:i}=t,u=(t=>({byId:e=>po(`${fo}/${e}?token=${t}`),bySlug:e=>vo(`/tutorials/${t}/${e}.json`),byContentHash:e=>vo(`/tutorials/${t}/${e}.json`)}))(e);return(t=>Yn(t))(o)?u.byId(o):to(i)?u.bySlug(i):(t=>Gn(t)&&!!t.match(/^[0-9a-zA-Z]{40}$/))(n)?u.byContentHash(n):O(a)?Promise.resolve(a):(_n.error(dn[ln.NO_VALID_TUTORIAL_IDENTIFIER]),r.track(ln.NO_VALID_TUTORIAL_IDENTIFIER,{slug:t.slug}),null)}},Eo=(...t)=>console.error(...t),yo=(...t)=>console.warn(...t),bo={error:Eo,warning:yo},Oo=t=>{switch(t.trigger){case qn.ON_CLICK:default:return"onClick"}},go=({data:t},e)=>{if(!t||!t.actions)return{};const r=t=>{e.provider.eventing.track(ln.TUTORIAL_INTERACTION,{...t,...e.trackingIdentifiers||{}})};return t.actions.map(t=>((t,e)=>{switch(t.handler.type){case Zn.NAVIGATE:return{[Oo(t)]:()=>{const{href:r,target:n}=t.handler;e(t),"Blank"===n?window.open(r,"_blank"):r&&r.includes("mailto:")?window.location=r:document.location.href=r}};case Zn.CHANGE_TUTORIAL:return{[Oo(t)]:()=>{const{tutorialId:e}=t.handler;Eo("TODO -> change tutorial",e)}};case Zn.OPEN_GUIDE:return{[Oo(t)]:()=>{const{guideId:e}=t.handler;Eo("TODO -> open guide",e)}};default:return{}}})(t,r)).reduce((t,e)=>({...t,...e}),{})},To=(t,e)=>{try{const{provider:r,document:n,trackingIdentifiers:o}=e,a=n.nodes[t];if(!a)return bo.error("Document is corrupted. Refusing to move further."),null;const i=t=>To(t,e),{type:u,props:c,css:l}=a,s={...c||{},style:l||{},children:(c||{}).children||a.nodes&&a.nodes.map(i),...go(a,{trackingIdentifiers:o,provider:r})},d={nodeId:t,node:a,document:n,render:{node:i,styleguide:(t,r={})=>e.renderNode(t,{api:d,attributes:r}),tutorial:t=>e.renderTutorial(t),portal:t=>e.renderPortal(t)},trackingIdentifiers:o},f=d.render.styleguide(u,s);return f||(bo.error(dn[ln.UNKOWN_NODE_TYPE],{type:u}),r.eventing.track(ln.UNKOWN_NODE_TYPE,{type:u}),null)}catch(t){return bo.error(dn[ln.STYLEGUIDE_MAP_ERROR],t),null}},Ro=Nr((t,e)=>{const{provider:r,portal:n,tutorial:o}=t,a=r.styleguide;let i,u;return o&&(u=o.styleguide),n&&(i=n.styleguide),{...a||{},...i||{},...u||{},...e||{}}});t.DEFAULT_ALERT_COLOR="#EDEDED",t.DEFAULT_ALT="",t.DEFAULT_TAB_ACTIVE_COLOR="#FEFEFE",t.DEFAULT_TAB_COLOR="#FEFEFE",t.DEFAULT_TAB_HEADER_COLOR="#333745",t.DEFAULT_TAB_ITEM_COLOR="#838792",t.ERROR_MESSAGES=dn,t.ERROR_SLUGS=cn,t.EVENT_NAMES=ln,t.LOGGER=_n,t.RESOURCES=ho,t.STYLEGUIDE_COLORS={primary:"#6310E5",secondary:"#59C3C3",tertiary:"#4D515D",warning:"#FCAD0D",danger:"#EE4266"},t.adaptCustomNodes=t=>Qr(t,t=>{let e=t;return"Typography"===e.type&&(e=(t=>{const e=zr(t,"data.custom.variant","P");return{...t,type:e}})(e)),e.css&&O(e.css)&&e.css.flexBasis&&(e=(t=>{const{flexBasis:e}=t.css;return"0"===e||"0px"===e?{...t,css:{...t.css,flexBasis:"0%"}}:t})(e)),e.css&&(e=nn(e),e=on(e)),e}),t.attachStylesheet=t=>{const e=document.createElement("link");e.setAttribute("rel","stylesheet"),e.setAttribute("href",`${lo}/styleguides/applications/${t}/default/main.css`),document.head.appendChild(e)},t.convertStyleNumberValues=on,t.defaultStyleguide=fn,t.internalEventing=({identify:t,track:e})=>({provider:({userId:r,traits:n,styleguide:o})=>{t(r,n),e(ln.HEARTBEAT,(t=>{const e={};return Object.keys(t).forEach(r=>{fn[r]&&(e[`styleguide.${r}`]=t[r].displayName||!0)}),e})(o))},tutorialDocumentLoadingError:({tutorialId:t,slug:r,contentHashId:n})=>{_n.error(dn[ln.TUTORIAL_LOADING_ERROR]),e(ln.TUTORIAL_LOADING_ERROR,{tutorialId:t,slug:r,contentHashId:n})}}),t.logError=Eo,t.logWarning=yo,t.logger=bo,t.mapNodeToStyleguide=To,t.mergeStyleguidesFromContext=Ro,t.portalValidation=({slug:t,styleguide:e})=>(io(e),{slug:t,styleguide:e||{}}),t.providerValidation=({clientToken:t,userId:e,traits:r,options:n,styleguide:o,...a})=>(ao((t=>Gn(t)&&!!t.match(/^[0-9a-zA-Z]*$/)&&t.length>=10)(t),"(Candu) you must provide a valid clientToken"),ao(!e||(t=>Yn(t)||Gn(t)&&t.trim().length>0)(e),"(Candu) you must provide a valid userId"),io(o),ao(!r||O(r),"(Candu) traits must be undefined or an object"),ao(!n||O(n),"(Candu) options must be undefined or an object"),{...a,clientToken:t,traits:r||{},options:n||{},styleguide:o||{},userId:e||Rn()}),t.tutorialValidation=({slug:t,styleguide:e,contentHashId:r,tutorialId:n,tutorialDocument:o,...a})=>(io(e),{...a,slug:t,styleguide:e||{},contentHashId:r,tutorialId:n,tutorialDocument:o}),t.unpackShorthandStyles=nn,Object.defineProperty(t,"__esModule",{value:!0})}));
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self)["@candulabs/core"]={})}(this,(function(t){"use strict";
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */var e=function(){return(e=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function r(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r}function n(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function u(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){t.done?o(t.value):new r((function(e){e(t.value)})).then(a,u)}c((n=n.apply(t,e||[])).next())}))}function o(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function a(t,e){return t(e={exports:{}},e.exports),e.exports}var u="object"==typeof i&&i&&i.Object===Object&&i,c="object"==typeof self&&self&&self.Object===Object&&self,l=u||c||Function("return this")(),s=l.Symbol,f=Object.prototype,d=f.hasOwnProperty,p=f.toString,v=s?s.toStringTag:void 0;var _=function(t){var e=d.call(t,v),r=t[v];try{t[v]=void 0;var n=!0}catch(t){}var o=p.call(t);return n&&(e?t[v]=r:delete t[v]),o},h=Object.prototype.toString;var y=function(t){return h.call(t)},b="[object Null]",E="[object Undefined]",g=s?s.toStringTag:void 0;var O=function(t){return null==t?void 0===t?E:b:g&&g in Object(t)?_(t):y(t)};var T=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},R="[object AsyncFunction]",A="[object Function]",I="[object GeneratorFunction]",m="[object Proxy]";var N,j=function(t){if(!T(t))return!1;var e=O(t);return e==A||e==I||e==R||e==m},w=l["__core-js_shared__"],D=(N=/[^.]+$/.exec(w&&w.keys&&w.keys.IE_PROTO||""))?"Symbol(src)_1."+N:"";var L=function(t){return!!D&&D in t},P=Function.prototype.toString;var S=function(t){if(null!=t){try{return P.call(t)}catch(t){}try{return t+""}catch(t){}}return""},C=/^\[object .+?Constructor\]$/,U=Function.prototype,k=Object.prototype,x=U.toString,M=k.hasOwnProperty,B=RegExp("^"+x.call(M).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var G=function(t){return!(!T(t)||L(t))&&(j(t)?B:C).test(S(t))};var z=function(t,e){return null==t?void 0:t[e]};var W=function(t,e){var r=z(t,e);return G(r)?r:void 0},F=function(){try{var t=W(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();var V=function(t,e,r){"__proto__"==e&&F?F(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r};var Y=function(t){return function(e,r,n){for(var o=-1,i=Object(e),a=n(e),u=a.length;u--;){var c=a[t?u:++o];if(!1===r(i[c],c,i))break}return e}}();var H=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n};var K=function(t){return null!=t&&"object"==typeof t},$="[object Arguments]";var J=function(t){return K(t)&&O(t)==$},Z=Object.prototype,q=Z.hasOwnProperty,X=Z.propertyIsEnumerable,Q=J(function(){return arguments}())?J:function(t){return K(t)&&q.call(t,"callee")&&!X.call(t,"callee")},tt=Array.isArray;var et=function(){return!1},rt=a((function(t,e){var r=e&&!e.nodeType&&e,n=r&&t&&!t.nodeType&&t,o=n&&n.exports===r?l.Buffer:void 0,i=(o?o.isBuffer:void 0)||et;t.exports=i})),nt=9007199254740991,ot=/^(?:0|[1-9]\d*)$/;var it=function(t,e){var r=typeof t;return!!(e=null==e?nt:e)&&("number"==r||"symbol"!=r&&ot.test(t))&&t>-1&&t%1==0&&t<e},at=9007199254740991;var ut=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=at},ct={};ct["[object Float32Array]"]=ct["[object Float64Array]"]=ct["[object Int8Array]"]=ct["[object Int16Array]"]=ct["[object Int32Array]"]=ct["[object Uint8Array]"]=ct["[object Uint8ClampedArray]"]=ct["[object Uint16Array]"]=ct["[object Uint32Array]"]=!0,ct["[object Arguments]"]=ct["[object Array]"]=ct["[object ArrayBuffer]"]=ct["[object Boolean]"]=ct["[object DataView]"]=ct["[object Date]"]=ct["[object Error]"]=ct["[object Function]"]=ct["[object Map]"]=ct["[object Number]"]=ct["[object Object]"]=ct["[object RegExp]"]=ct["[object Set]"]=ct["[object String]"]=ct["[object WeakMap]"]=!1;var lt=function(t){return K(t)&&ut(t.length)&&!!ct[O(t)]};var st=function(t){return function(e){return t(e)}},ft=a((function(t,e){var r=e&&!e.nodeType&&e,n=r&&t&&!t.nodeType&&t,o=n&&n.exports===r&&u.process,i=function(){try{var t=n&&n.require&&n.require("util").types;return t||o&&o.binding&&o.binding("util")}catch(t){}}();t.exports=i})),dt=ft&&ft.isTypedArray,pt=dt?st(dt):lt,vt=Object.prototype.hasOwnProperty;var _t=function(t,e){var r=tt(t),n=!r&&Q(t),o=!r&&!n&&rt(t),i=!r&&!n&&!o&&pt(t),a=r||n||o||i,u=a?H(t.length,String):[],c=u.length;for(var l in t)!e&&!vt.call(t,l)||a&&("length"==l||o&&("offset"==l||"parent"==l)||i&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||it(l,c))||u.push(l);return u},ht=Object.prototype;var yt=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||ht)};var bt=function(t,e){return function(r){return t(e(r))}}(Object.keys,Object),Et=Object.prototype.hasOwnProperty;var gt=function(t){if(!yt(t))return bt(t);var e=[];for(var r in Object(t))Et.call(t,r)&&"constructor"!=r&&e.push(r);return e};var Ot=function(t){return null!=t&&ut(t.length)&&!j(t)};var Tt=function(t){return Ot(t)?_t(t):gt(t)};var Rt=function(t,e){return t&&Y(t,e,Tt)};var At=function(){this.__data__=[],this.size=0};var It=function(t,e){return t===e||t!=t&&e!=e};var mt=function(t,e){for(var r=t.length;r--;)if(It(t[r][0],e))return r;return-1},Nt=Array.prototype.splice;var jt=function(t){var e=this.__data__,r=mt(e,t);return!(r<0)&&(r==e.length-1?e.pop():Nt.call(e,r,1),--this.size,!0)};var wt=function(t){var e=this.__data__,r=mt(e,t);return r<0?void 0:e[r][1]};var Dt=function(t){return mt(this.__data__,t)>-1};var Lt=function(t,e){var r=this.__data__,n=mt(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};function Pt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Pt.prototype.clear=At,Pt.prototype.delete=jt,Pt.prototype.get=wt,Pt.prototype.has=Dt,Pt.prototype.set=Lt;var St=Pt;var Ct=function(){this.__data__=new St,this.size=0};var Ut=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r};var kt=function(t){return this.__data__.get(t)};var xt=function(t){return this.__data__.has(t)},Mt=W(l,"Map"),Bt=W(Object,"create");var Gt=function(){this.__data__=Bt?Bt(null):{},this.size=0};var zt=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Wt="__lodash_hash_undefined__",Ft=Object.prototype.hasOwnProperty;var Vt=function(t){var e=this.__data__;if(Bt){var r=e[t];return r===Wt?void 0:r}return Ft.call(e,t)?e[t]:void 0},Yt=Object.prototype.hasOwnProperty;var Ht=function(t){var e=this.__data__;return Bt?void 0!==e[t]:Yt.call(e,t)},Kt="__lodash_hash_undefined__";var $t=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Bt&&void 0===e?Kt:e,this};function Jt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Jt.prototype.clear=Gt,Jt.prototype.delete=zt,Jt.prototype.get=Vt,Jt.prototype.has=Ht,Jt.prototype.set=$t;var Zt=Jt;var qt=function(){this.size=0,this.__data__={hash:new Zt,map:new(Mt||St),string:new Zt}};var Xt=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var Qt=function(t,e){var r=t.__data__;return Xt(e)?r["string"==typeof e?"string":"hash"]:r.map};var te=function(t){var e=Qt(this,t).delete(t);return this.size-=e?1:0,e};var ee=function(t){return Qt(this,t).get(t)};var re=function(t){return Qt(this,t).has(t)};var ne=function(t,e){var r=Qt(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};function oe(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}oe.prototype.clear=qt,oe.prototype.delete=te,oe.prototype.get=ee,oe.prototype.has=re,oe.prototype.set=ne;var ie=oe,ae=200;var ue=function(t,e){var r=this.__data__;if(r instanceof St){var n=r.__data__;if(!Mt||n.length<ae-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new ie(n)}return r.set(t,e),this.size=r.size,this};function ce(t){var e=this.__data__=new St(t);this.size=e.size}ce.prototype.clear=Ct,ce.prototype.delete=Ut,ce.prototype.get=kt,ce.prototype.has=xt,ce.prototype.set=ue;var le=ce,se="__lodash_hash_undefined__";var fe=function(t){return this.__data__.set(t,se),this};var de=function(t){return this.__data__.has(t)};function pe(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new ie;++e<r;)this.add(t[e])}pe.prototype.add=pe.prototype.push=fe,pe.prototype.has=de;var ve=pe;var _e=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1};var he=function(t,e){return t.has(e)},ye=1,be=2;var Ee=function(t,e,r,n,o,i){var a=r&ye,u=t.length,c=e.length;if(u!=c&&!(a&&c>u))return!1;var l=i.get(t);if(l&&i.get(e))return l==e;var s=-1,f=!0,d=r&be?new ve:void 0;for(i.set(t,e),i.set(e,t);++s<u;){var p=t[s],v=e[s];if(n)var _=a?n(v,p,s,e,t,i):n(p,v,s,t,e,i);if(void 0!==_){if(_)continue;f=!1;break}if(d){if(!_e(e,(function(t,e){if(!he(d,e)&&(p===t||o(p,t,r,n,i)))return d.push(e)}))){f=!1;break}}else if(p!==v&&!o(p,v,r,n,i)){f=!1;break}}return i.delete(t),i.delete(e),f},ge=l.Uint8Array;var Oe=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r};var Te=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r},Re=1,Ae=2,Ie="[object Boolean]",me="[object Date]",Ne="[object Error]",je="[object Map]",we="[object Number]",De="[object RegExp]",Le="[object Set]",Pe="[object String]",Se="[object Symbol]",Ce="[object ArrayBuffer]",Ue="[object DataView]",ke=s?s.prototype:void 0,xe=ke?ke.valueOf:void 0;var Me=function(t,e,r,n,o,i,a){switch(r){case Ue:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Ce:return!(t.byteLength!=e.byteLength||!i(new ge(t),new ge(e)));case Ie:case me:case we:return It(+t,+e);case Ne:return t.name==e.name&&t.message==e.message;case De:case Pe:return t==e+"";case je:var u=Oe;case Le:var c=n&Re;if(u||(u=Te),t.size!=e.size&&!c)return!1;var l=a.get(t);if(l)return l==e;n|=Ae,a.set(t,e);var s=Ee(u(t),u(e),n,o,i,a);return a.delete(t),s;case Se:if(xe)return xe.call(t)==xe.call(e)}return!1};var Be=function(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t};var Ge=function(t,e,r){var n=e(t);return tt(t)?n:Be(n,r(t))};var ze=function(t,e){for(var r=-1,n=null==t?0:t.length,o=0,i=[];++r<n;){var a=t[r];e(a,r,t)&&(i[o++]=a)}return i};var We=function(){return[]},Fe=Object.prototype.propertyIsEnumerable,Ve=Object.getOwnPropertySymbols,Ye=Ve?function(t){return null==t?[]:(t=Object(t),ze(Ve(t),(function(e){return Fe.call(t,e)})))}:We;var He=function(t){return Ge(t,Tt,Ye)},Ke=1,$e=Object.prototype.hasOwnProperty;var Je=function(t,e,r,n,o,i){var a=r&Ke,u=He(t),c=u.length;if(c!=He(e).length&&!a)return!1;for(var l=c;l--;){var s=u[l];if(!(a?s in e:$e.call(e,s)))return!1}var f=i.get(t);if(f&&i.get(e))return f==e;var d=!0;i.set(t,e),i.set(e,t);for(var p=a;++l<c;){var v=t[s=u[l]],_=e[s];if(n)var h=a?n(_,v,s,e,t,i):n(v,_,s,t,e,i);if(!(void 0===h?v===_||o(v,_,r,n,i):h)){d=!1;break}p||(p="constructor"==s)}if(d&&!p){var y=t.constructor,b=e.constructor;y!=b&&"constructor"in t&&"constructor"in e&&!("function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b)&&(d=!1)}return i.delete(t),i.delete(e),d},Ze=W(l,"DataView"),qe=W(l,"Promise"),Xe=W(l,"Set"),Qe=W(l,"WeakMap"),tr=S(Ze),er=S(Mt),rr=S(qe),nr=S(Xe),or=S(Qe),ir=O;(Ze&&"[object DataView]"!=ir(new Ze(new ArrayBuffer(1)))||Mt&&"[object Map]"!=ir(new Mt)||qe&&"[object Promise]"!=ir(qe.resolve())||Xe&&"[object Set]"!=ir(new Xe)||Qe&&"[object WeakMap]"!=ir(new Qe))&&(ir=function(t){var e=O(t),r="[object Object]"==e?t.constructor:void 0,n=r?S(r):"";if(n)switch(n){case tr:return"[object DataView]";case er:return"[object Map]";case rr:return"[object Promise]";case nr:return"[object Set]";case or:return"[object WeakMap]"}return e});var ar=ir,ur=1,cr="[object Arguments]",lr="[object Array]",sr="[object Object]",fr=Object.prototype.hasOwnProperty;var dr=function(t,e,r,n,o,i){var a=tt(t),u=tt(e),c=a?lr:ar(t),l=u?lr:ar(e),s=(c=c==cr?sr:c)==sr,f=(l=l==cr?sr:l)==sr,d=c==l;if(d&&rt(t)){if(!rt(e))return!1;a=!0,s=!1}if(d&&!s)return i||(i=new le),a||pt(t)?Ee(t,e,r,n,o,i):Me(t,e,c,r,n,o,i);if(!(r&ur)){var p=s&&fr.call(t,"__wrapped__"),v=f&&fr.call(e,"__wrapped__");if(p||v){var _=p?t.value():t,h=v?e.value():e;return i||(i=new le),o(_,h,r,n,i)}}return!!d&&(i||(i=new le),Je(t,e,r,n,o,i))};var pr=function t(e,r,n,o,i){return e===r||(null==e||null==r||!K(e)&&!K(r)?e!=e&&r!=r:dr(e,r,n,o,t,i))},vr=1,_r=2;var hr=function(t,e,r,n){var o=r.length,i=o,a=!n;if(null==t)return!i;for(t=Object(t);o--;){var u=r[o];if(a&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++o<i;){var c=(u=r[o])[0],l=t[c],s=u[1];if(a&&u[2]){if(void 0===l&&!(c in t))return!1}else{var f=new le;if(n)var d=n(l,s,c,t,e,f);if(!(void 0===d?pr(s,l,vr|_r,n,f):d))return!1}}return!0};var yr=function(t){return t==t&&!T(t)};var br=function(t){for(var e=Tt(t),r=e.length;r--;){var n=e[r],o=t[n];e[r]=[n,o,yr(o)]}return e};var Er=function(t,e){return function(r){return null!=r&&(r[t]===e&&(void 0!==e||t in Object(r)))}};var gr=function(t){var e=br(t);return 1==e.length&&e[0][2]?Er(e[0][0],e[0][1]):function(r){return r===t||hr(r,t,e)}},Or="[object Symbol]";var Tr=function(t){return"symbol"==typeof t||K(t)&&O(t)==Or},Rr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ar=/^\w*$/;var Ir=function(t,e){if(tt(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!Tr(t))||(Ar.test(t)||!Rr.test(t)||null!=e&&t in Object(e))},mr="Expected a function";function Nr(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError(mr);var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=t.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(Nr.Cache||ie),r}Nr.Cache=ie;var jr=Nr,wr=500;var Dr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Lr=/\\(\\)?/g,Pr=function(t){var e=jr(t,(function(t){return r.size===wr&&r.clear(),t})),r=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Dr,(function(t,r,n,o){e.push(n?o.replace(Lr,"$1"):r||t)})),e}));var Sr=function(t,e){for(var r=-1,n=null==t?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o},Cr=1/0,Ur=s?s.prototype:void 0,kr=Ur?Ur.toString:void 0;var xr=function t(e){if("string"==typeof e)return e;if(tt(e))return Sr(e,t)+"";if(Tr(e))return kr?kr.call(e):"";var r=e+"";return"0"==r&&1/e==-Cr?"-0":r};var Mr=function(t){return null==t?"":xr(t)};var Br=function(t,e){return tt(t)?t:Ir(t,e)?[t]:Pr(Mr(t))},Gr=1/0;var zr=function(t){if("string"==typeof t||Tr(t))return t;var e=t+"";return"0"==e&&1/t==-Gr?"-0":e};var Wr=function(t,e){for(var r=0,n=(e=Br(e,t)).length;null!=t&&r<n;)t=t[zr(e[r++])];return r&&r==n?t:void 0};var Fr=function(t,e,r){var n=null==t?void 0:Wr(t,e);return void 0===n?r:n};var Vr=function(t,e){return null!=t&&e in Object(t)};var Yr=function(t,e,r){for(var n=-1,o=(e=Br(e,t)).length,i=!1;++n<o;){var a=zr(e[n]);if(!(i=null!=t&&r(t,a)))break;t=t[a]}return i||++n!=o?i:!!(o=null==t?0:t.length)&&ut(o)&&it(a,o)&&(tt(t)||Q(t))};var Hr=function(t,e){return null!=t&&Yr(t,e,Vr)},Kr=1,$r=2;var Jr=function(t,e){return Ir(t)&&yr(e)?Er(zr(t),e):function(r){var n=Fr(r,t);return void 0===n&&n===e?Hr(r,t):pr(e,n,Kr|$r)}};var Zr=function(t){return t};var qr=function(t){return function(e){return null==e?void 0:e[t]}};var Xr=function(t){return function(e){return Wr(e,t)}};var Qr=function(t){return Ir(t)?qr(zr(t)):Xr(t)};var tn=function(t){return"function"==typeof t?t:null==t?Zr:"object"==typeof t?tt(t)?Jr(t[0],t[1]):gr(t):Qr(t)};var en=function(t,e){var r={};return e=tn(e),Rt(t,(function(t,n,o){V(r,n,e(t,n,o))})),r},rn={boxFlex:!0,boxFlexGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,strokeDashoffset:!0,strokeOpacity:!0,strokeWidth:!0};var nn=["Webkit","ms","Moz","O"];Object.keys(rn).forEach((function(t){nn.forEach((function(e){rn[function(t,e){return t+e.charAt(0).toUpperCase()+e.substring(1)}(e,t)]=rn[t]}))}));var on={isUnitlessNumber:rn,shorthandPropertyExpansions:{background:{backgroundImage:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundColor:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0}}};for(var an,un=function(t){var n=t.css,o=n.padding,i=n.margin,a=r(n,["padding","margin"]),u={};return o&&(u={paddingRight:o,paddingLeft:o,paddingBottom:o,paddingTop:o}),i&&(u=e(e({},u),{marginRight:i,marginLeft:i,marginBottom:i,marginTop:i})),e(e({},t),{css:e(e({},u),a)})},cn=function(t){var r=t.css,n={};return Object.entries(r).forEach((function(t){var e=t[0],r=t[1];if("number"==typeof r)return on.isUnitlessNumber[e]?void(n[e]=""+r):void(n[e]=r+"px");n[e]=r})),e(e({},t),{css:n})},ln=function(t){return"candu.sdk."+t},sn=function(t){return ln("error."+t)},fn={UNKOWN_NODE_TYPE:"unknown_node_type",UNKOWN_BLOCK_NODE_TYPE:"unkown_block_node_type",UNKOWN_INLINE_NODE_TYPE:"unkown_inline_node_type",UNKOWN_NODE_OBJECT_TYPE:"unkown_node_object_type",TUTORIAL_ERROR:"tutorial_error_boundary",PORTAL_ERROR:"portal_error_boundary",STYLEGUIDE_MAP_ERROR:"styleguide_map",RENDER_NODE_ERROR:"render_node"},dn={HEARTBEAT:ln("heartbeat"),PREVIEW_OPEN:ln("preview.open"),PORTAL:ln("portal"),TUTORIAL:ln("tutorial"),TUTORIAL_INTERACTION:ln("tutorial.interaction"),PORTAL_ASSET_NOT_FOUND:sn("portal_asset_not_found"),PORTAL_NO_SEGMENT_IDS:sn("portal_no_segment_ids"),NO_MATCHING_TUTORIALS:sn("no_matching_tutorials"),NO_VALID_TUTORIAL_IDENTIFIER:sn("no_valid_tutorial_identifier"),COMMIT_API_LOADING_ERROR:sn("commit_api"),TUTORIAL_LOADING_ERROR:sn("tutorial"),UNKOWN_NODE_TYPE:sn(fn.UNKOWN_NODE_TYPE),UNKOWN_INLINE_NODE_TYPE:sn(fn.UNKOWN_INLINE_NODE_TYPE),UNKOWN_NODE_OBJECT_TYPE:sn(fn.UNKOWN_NODE_OBJECT_TYPE),TUTORIAL_ERROR:sn(fn.TUTORIAL_ERROR),PORTAL_ERROR:sn(fn.PORTAL_ERROR),STYLEGUIDE_MAP_ERROR:sn(fn.TUTORIAL_ERROR),RENDER_NODE_ERROR:sn(fn.TUTORIAL_ERROR),CIRCULAR_DEPENDENCY_EMBED_PORTAL:sn("circular_dependecy_embed_portal"),CIRCULAR_DEPENDENCY_EMBED_TUTORIAL:sn("circular_dependecy_embed_tutorial")},pn=function(t){return"An error has occured while trying to parse your Tutorial.\nUpgrade the SDK to the latest version to get rid of this error.\nErrorCode: "+t+"."},vn=((an={EVENTING_NOT_INITIALIZED:"You tried to send an event, but you haven't initialized eventing.\nThis is happening because you called eventing outside the scope of the CanduProvider. It can be fixed by:\n1. Adding CanduProvider to the root of the application.\n2. Initializing a new Eventing object outside of Candu.\nRead here for more context: http://udn.ac/tracking-not-init.\n"})[dn.PORTAL_ASSET_NOT_FOUND]="Could not find the requested Portal. This could happen because:\n1. The Portal does not exist or it was deleted.\n2. The Portal has not been made avaliable to be rendered.\n3. CORS Authenticaton failed.\nSee http://udn.ac/portal-not-found for more information.\n",an[dn.PORTAL_NO_SEGMENT_IDS]="You have tried to render a Portal that doesn't contain any content.\nAdd content to your Portal: https://udn.ac/update-portals.\n",an[dn.NO_MATCHING_TUTORIALS]="The Tutorial will not be rendered because there are no matching segments for the given user.",an[dn.NO_VALID_TUTORIAL_IDENTIFIER]="(Candu/Tutorial) You must define one of tutorialId, slug, commitId or contentHashId.",an[dn.TUTORIAL_LOADING_ERROR]="An error has occurred while trying to load the Tutorial",an[dn.UNKOWN_INLINE_NODE_TYPE]=pn(fn.UNKOWN_INLINE_NODE_TYPE),an[dn.UNKOWN_NODE_TYPE]=pn(fn.UNKOWN_NODE_TYPE),an[dn.CIRCULAR_DEPENDENCY_EMBED_PORTAL]="Circular dependency found on Embeded Portal. Please take a look at the Portal Content.",an[dn.CIRCULAR_DEPENDENCY_EMBED_TUTORIAL]="Circular dependency found on Embeded Tutorial. Please take a look at the Tutorial Content.",an[dn.PORTAL_ERROR]="An error has occured within Portal",an[dn.TUTORIAL_ERROR]="An error has occured within Tutorial",an[dn.RENDER_NODE_ERROR]="An error has occured while rendering tutorial node",an[dn.STYLEGUIDE_MAP_ERROR]="An error has occured while mapping node to styleguide",an),_n={Alert:!0,B:!0,Badge:!0,Button:!0,Card:!0,Code:!0,Document:!0,Em:!0,EmbedPortal:!0,EmbedTutorial:!0,Flex:!0,FlexItem:!0,H1:!0,H2:!0,H3:!0,H4:!0,H5:!0,H6:!0,Image:!0,InlineCode:!0,Link:!0,List:!0,ListItem:!0,P:!0,RichText:!0,Spacing:!0,Text:!0,U:!0,View:!0,Player:!0},hn={error:console.error,warning:console.warn},yn={},bn=function(){return yn.randomBytes(16)},En=[],gn=0;gn<256;++gn)En[gn]=(gn+256).toString(16).substr(1);var On,Tn,Rn=function(t,e){var r=e||0,n=En;return[n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]]].join("")};!function(t){t.UserGenerated="UserGenerated",t.SDK="SDK"}(On||(On={})),function(t){t.Identify="Identify",t.Group="Group",t.Track="Track",t.Page="Page",t.Screen="Screen"}(Tn||(Tn={}));var An,In,mn,Nn,jn,wn,Dn,Ln=function(){return"undefined"!=typeof window&&window.localStorage},Pn=function(t){return function(e){Ln()&&null!=e&&window.localStorage.setItem(t,JSON.stringify(e))}},Sn={anonymousId:{getOrCreate:("candu:anonymous_id",An=function(){var t=function(t,e,r){var n=e&&r||0;"string"==typeof t&&(e="binary"===t?new Array(16):null,t=null);var o=(t=t||{}).random||(t.rng||bn)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,e)for(var i=0;i<16;++i)e[n+i]=o[i];return e||Rn(o)}();return Pn("candu:anonymous_id")(t),t},function(){return function(){if(Ln()){var t=window.localStorage.getItem("candu:anonymous_id");if(t)try{return JSON.parse(t)}catch(t){return null}}}()||An()}),set:Pn("candu:anonymous_id")}}.anonymousId.getOrCreate,Cn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Un="object"==typeof Cn&&Cn&&Cn.Object===Object&&Cn,kn="object"==typeof self&&self&&self.Object===Object&&self,xn=(Un||kn||Function("return this")()).Symbol,Mn=Object.prototype,Bn=Mn.hasOwnProperty,Gn=Mn.toString,zn=xn?xn.toStringTag:void 0,Wn=Object.prototype.toString,Fn=xn?xn.toStringTag:void 0,Vn=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Fn&&Fn in Object(t)?function(t){var e=Bn.call(t,zn),r=t[zn];try{t[zn]=void 0;var n=!0}catch(t){}var o=Gn.call(t);return n&&(e?t[zn]=r:delete t[zn]),o}(t):function(t){return Wn.call(t)}(t)},Yn=Array.isArray,Hn=function(t){return null!=t&&"object"==typeof t},Kn=function(t){return"string"==typeof t||!Yn(t)&&Hn(t)&&"[object String]"==Vn(t)},$n=/^([a-zA-Z0-9]|_|-)+$/,Jn=function(t){return function(t){return"number"==typeof t||Hn(t)&&"[object Number]"==Vn(t)}(t)&&t>=0};!function(t){t.SDK="SDK",t.PREVIEW="PREVIEW"}(In||(In={})),function(t){t.BOOTSTRAP="Bootstrap",t.CHANGE_POSITION="ChangePosition",t.CLOSE_PREVIEW="ClosePreview",t.PREVIEW_LOADED="PreviewLoaded",t.SET_AVALIABLE_PORTALS="SetAvaliablePortals",t.SET_CONTENT="SetContent",t.SET_SELECTED_ELEMENT="SetSelectedElement",t.SET_VIEW_MODE="SetViewMode",t.ADD_ELEMENT="AddElement",t.REMOVE_ELEMENT="RemoveElement",t.UPDATE_ELEMENT="UpdateElement",t.SET_ELEMENT="SetElement"}(mn||(mn={})),function(t){t.ON_CLICK="OnClick"}(Nn||(Nn={})),function(t){t.NATIVE="Native",t.PENDO="Pendo"}(jn||(jn={})),function(t){t.NAVIGATE="Navigate",t.CHANGE_TUTORIAL="ChangeTutorial",t.OPEN_GUIDE="OpenGuide"}(wn||(wn={})),function(t){t.PRIMARY="primary",t.SECONDARY="primary",t.WARNING="warning",t.DANGER="danger",t.NEUTRAL="neutral",t.ACTIVE="active",t.INFO="info"}(Dn||(Dn={}));var Zn;Dn.PRIMARY;!function(t){t.U="U",t.B="B",t.Em="Em",t.InlineCode="InlineCode"}(Zn||(Zn={}));var qn,Xn,Qn,to,eo=function(t){return function(t){return Kn(t)&&t.length>=3&&t.length<100&&$n.test(t)}(t)};!function(t){t.COLLAPSED="Collapsed",t.EXPANDED="Expanded",t.MINIMIZED="Minimized"}(qn||(qn={})),function(t){t.TUTORIAL="Tutorial",t.PORTAL="Portal"}(Xn||(Xn={})),function(t){t.Global="Global",t.Organization="Organization"}(Qn||(Qn={})),function(t){t.Root="root",t.Rule="rule",t.Atrule="atrule",t.Decl="decl",t.Any="any"}(to||(to={}));var ro=function(t,e,r,n,o,i,a,u){if(!t){var c;if(void 0===e)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[r,n,o,i,a,u],s=0;(c=new Error(e.replace(/%s/g,(function(){return l[s++]})))).name="Invariant Violation"}throw c.framesToPop=1,c}},no=function(t){return ro(!t||T(t),"(Candu) styleguide must be undefined or an object")};var oo="/api/segmentMemberships",io="/api/tutorialDocumentsEditor",ao=function(t){return n(void 0,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,fetch(t)];case 1:return[2,e.sent().json()]}}))}))},uo=function(t){return ao("https://api.candu.ai"+t)},co=function(t){return ao("https://cdn.candu.ai"+t)},lo={tutorialDocumentLatestPublished:function(t,e){return n(void 0,void 0,void 0,(function(){return o(this,(function(r){return[2,uo(io+"?token="+t+"&finder=latestPublished&tutorialId="+e)]}))}))},portalAsset:function(t,e){return n(void 0,void 0,void 0,(function(){return o(this,(function(r){return[2,co("/portals/"+t+"/"+e+"/head.json")]}))}))},segmentMembership:function(t,e){return n(void 0,void 0,void 0,(function(){return o(this,(function(r){return[2,uo(oo+"/"+e+"?token="+t)]}))}))},tutorialDocument:function(t,e,r){var n=t.contentHashId,o=t.tutorialId,i=t.tutorialDocument,a=t.slug,u=function(t){return{byId:function(e){return uo(io+"/"+e+"?token="+t)},bySlug:function(e){return co("/tutorials/"+t+"/"+e+".json")},byContentHash:function(e){return co("/tutorials/"+t+"/"+e+".json")}}}(e);return function(t){return Jn(t)}(o)?u.byId(o):eo(a)?u.bySlug(a):function(t){return Kn(t)&&!!t.match(/^[0-9a-zA-Z]{40}$/)}(n)?u.byContentHash(n):T(i)?Promise.resolve(i):(hn.error(vn[dn.NO_VALID_TUTORIAL_IDENTIFIER]),r.track(dn.NO_VALID_TUTORIAL_IDENTIFIER,{slug:t.slug}),null)}},so=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return console.error.apply(console,t)},fo=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return console.warn.apply(console,t)},po={error:so,warning:fo},vo=function(t){switch(t.trigger){case Nn.ON_CLICK:default:return"onClick"}},_o=function(t,r){var n=t.data;if(!n||!n.actions)return{};var o=function(t){r.provider.eventing.track(dn.TUTORIAL_INTERACTION,e(e({},t),r.trackingIdentifiers||{}))};return n.actions.map((function(t){return function(t,e){var r,n,o;switch(t.handler.type){case wn.NAVIGATE:return(r={})[vo(t)]=function(){var r=t.handler,n=r.href,o=r.target;e(t),"Blank"===o?window.open(n,"_blank"):n&&n.includes("mailto:")?window.location=n:document.location.href=n},r;case wn.CHANGE_TUTORIAL:return(n={})[vo(t)]=function(){var e=t.handler.tutorialId;so("TODO -> change tutorial",e)},n;case wn.OPEN_GUIDE:return(o={})[vo(t)]=function(){var e=t.handler.guideId;so("TODO -> open guide",e)},o;default:return{}}}(t,o)})).reduce((function(t,r){return e(e({},t),r)}),{})},ho=function(t,r){try{var n=r.provider,o=r.document,i=r.trackingIdentifiers,a=o.nodes[t];if(!a)return po.error("Document is corrupted. Refusing to move further."),null;var u=function(t){return ho(t,r)},c=a.type,l=a.props,s=a.css,f=e(e(e({},l||{}),{style:s||{},children:(l||{}).children||a.nodes&&a.nodes.map(u)}),_o(a,{trackingIdentifiers:i,provider:n})),d={nodeId:t,node:a,document:o,render:{node:u,styleguide:function(t,e){return void 0===e&&(e={}),r.renderNode(t,{api:d,attributes:e})},tutorial:function(t){return r.renderTutorial(t)},portal:function(t){return r.renderPortal(t)}},trackingIdentifiers:i},p=d.render.styleguide(c,f);return p||(po.error(vn[dn.UNKOWN_NODE_TYPE],{type:c}),n.eventing.track(dn.UNKOWN_NODE_TYPE,{type:c}),null)}catch(t){return po.error(vn[dn.STYLEGUIDE_MAP_ERROR],t),null}},yo=jr((function(t,r){var n,o,i=t.provider,a=t.portal,u=t.tutorial,c=i.styleguide;return u&&(o=u.styleguide),a&&(n=a.styleguide),e(e(e(e({},c||{}),n||{}),o||{}),r||{})}));t.DEFAULT_ALERT_COLOR="#EDEDED",t.DEFAULT_ALT="",t.DEFAULT_TAB_ACTIVE_COLOR="#FEFEFE",t.DEFAULT_TAB_COLOR="#FEFEFE",t.DEFAULT_TAB_HEADER_COLOR="#333745",t.DEFAULT_TAB_ITEM_COLOR="#838792",t.ERROR_MESSAGES=vn,t.ERROR_SLUGS=fn,t.EVENT_NAMES=dn,t.LOGGER=hn,t.RESOURCES=lo,t.STYLEGUIDE_COLORS={primary:"#6310E5",secondary:"#59C3C3",tertiary:"#4D515D",warning:"#FCAD0D",danger:"#EE4266"},t.adaptCustomNodes=function(t){return en(t,(function(t){var r=t;return"Typography"===r.type&&(r=function(t){var r=Fr(t,"data.custom.variant","P");return e(e({},t),{type:r})}(r)),r.css&&T(r.css)&&r.css.flexBasis&&(r=function(t){var r=t.css.flexBasis;return"0"===r||"0px"===r?e(e({},t),{css:e(e({},t.css),{flexBasis:"0%"})}):t}(r)),r.css&&(r=un(r),r=cn(r)),r}))},t.attachStylesheet=function(t){var e=document.createElement("link");e.setAttribute("rel","stylesheet"),e.setAttribute("href","https://cdn.candu.ai/styleguides/applications/"+t+"/default/main.css"),document.head.appendChild(e)},t.convertStyleNumberValues=cn,t.defaultStyleguide=_n,t.internalEventing=function(t){var e=t.identify,r=t.track;return{provider:function(t){var n=t.userId,o=t.traits,i=t.styleguide;e(n,o),r(dn.HEARTBEAT,function(t){var e={};return Object.keys(t).forEach((function(r){_n[r]&&(e["styleguide."+r]=t[r].displayName||!0)})),e}(i))},tutorialDocumentLoadingError:function(t){var e=t.tutorialId,n=t.slug,o=t.contentHashId;hn.error(vn[dn.TUTORIAL_LOADING_ERROR]),r(dn.TUTORIAL_LOADING_ERROR,{tutorialId:e,slug:n,contentHashId:o})}}},t.logError=so,t.logWarning=fo,t.logger=po,t.mapNodeToStyleguide=ho,t.mergeStyleguidesFromContext=yo,t.portalValidation=function(t){var e=t.slug,r=t.styleguide;return no(r),{slug:e,styleguide:r||{}}},t.providerValidation=function(t){var n=t.clientToken,o=t.userId,i=t.traits,a=t.options,u=t.styleguide,c=r(t,["clientToken","userId","traits","options","styleguide"]);return ro(function(t){return Kn(t)&&!!t.match(/^[0-9a-zA-Z]*$/)&&t.length>=10}(n),"(Candu) you must provide a valid clientToken"),ro(!o||function(t){return Jn(t)||Kn(t)&&t.trim().length>0}(o),"(Candu) you must provide a valid userId"),no(u),ro(!i||T(i),"(Candu) traits must be undefined or an object"),ro(!a||T(a),"(Candu) options must be undefined or an object"),e(e({},c),{clientToken:n,traits:i||{},options:a||{},styleguide:u||{},userId:o||Sn()})},t.tutorialValidation=function(t){var n=t.slug,o=t.styleguide,i=t.contentHashId,a=t.tutorialId,u=t.tutorialDocument,c=r(t,["slug","styleguide","contentHashId","tutorialId","tutorialDocument"]);return no(o),e(e({},c),{slug:n,styleguide:o||{},contentHashId:i,tutorialId:a,tutorialDocument:u})},t.unpackShorthandStyles=un,Object.defineProperty(t,"__esModule",{value:!0})}));
//# sourceMappingURL=index.js.map

8

package.json

@@ -12,3 +12,3 @@ {

},
"version": "0.5.2",
"version": "0.5.4",
"main": "dist/index.js",

@@ -27,7 +27,7 @@ "module": "dist/index.es.js",

"dependencies": {
"@candulabs/eventing": "^0.5.0",
"@candulabs/models": "^0.5.0",
"@candulabs/eventing": "^0.5.4",
"@candulabs/models": "^0.5.4",
"react-style-object-to-css": "^1.1.2"
},
"gitHead": "989ecba50869dcd7463acd1379ca666615d9b2cb"
"gitHead": "ad295f30fdd39563463f5fa300c1dbce279dba4f"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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