UNPKG

carbon-components-angular

Version:
1 lines 21.8 kB
"use strict";(self.webpackChunkcarbon_components_angular=self.webpackChunkcarbon_components_angular||[]).push([[1250],{"./node_modules/@carbon/utils-position/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{var _a,PLACEMENTS;__webpack_require__.d(__webpack_exports__,{FK:()=>position,ZP:()=>__WEBPACK_DEFAULT_EXPORT__}),function(PLACEMENTS){PLACEMENTS.LEFT="left",PLACEMENTS.RIGHT="right",PLACEMENTS.TOP="top",PLACEMENTS.BOTTOM="bottom"}(PLACEMENTS||(PLACEMENTS={}));var defaultPositions=((_a={})[PLACEMENTS.LEFT]=function(referenceOffset,target,referenceRect){return{top:referenceOffset.top-Math.round(target.offsetHeight/2)+Math.round(referenceRect.height/2),left:Math.round(referenceOffset.left-target.offsetWidth)}},_a[PLACEMENTS.RIGHT]=function(referenceOffset,target,referenceRect){return{top:referenceOffset.top-Math.round(target.offsetHeight/2)+Math.round(referenceRect.height/2),left:Math.round(referenceOffset.left+referenceRect.width)}},_a[PLACEMENTS.TOP]=function(referenceOffset,target,referenceRect){return{top:Math.round(referenceOffset.top-target.offsetHeight),left:referenceOffset.left-Math.round(target.offsetWidth/2)+Math.round(referenceRect.width/2)}},_a[PLACEMENTS.BOTTOM]=function(referenceOffset,target,referenceRect){return{top:Math.round(referenceOffset.top+referenceRect.height),left:referenceOffset.left-Math.round(target.offsetWidth/2)+Math.round(referenceRect.width/2)}},_a),windowRef="undefined"!=typeof window?window:{innerHeight:0,scrollY:0,innerWidth:0,scrollX:0},Position=function(){function Position(positions){void 0===positions&&(positions={}),this.positions=defaultPositions,this.positions=Object.assign({},defaultPositions,positions)}return Position.prototype.getRelativeOffset=function(target){for(var offsets={left:target.offsetLeft,top:target.offsetTop};target.offsetParent&&"static"===getComputedStyle(target.offsetParent).position;)offsets.left+=target.offsetLeft,offsets.top+=target.offsetTop,target=target.offsetParent;return offsets},Position.prototype.getAbsoluteOffset=function(target){for(var currentNode=target,margins={top:0,left:0};currentNode.offsetParent;){var computed=getComputedStyle(currentNode.offsetParent);"static"===computed.position&&computed.marginLeft&&computed.marginTop&&(parseInt(computed.marginTop,10)&&(margins.top+=parseInt(computed.marginTop,10)),parseInt(computed.marginLeft,10)&&(margins.left+=parseInt(computed.marginLeft,10))),currentNode=currentNode.offsetParent}var targetRect=target.getBoundingClientRect(),relativeRect=document.body.getBoundingClientRect();return{top:targetRect.top-relativeRect.top+margins.top,left:targetRect.left-relativeRect.left+margins.left}},Position.prototype.findRelative=function(reference,target,placement){var referenceOffset=this.getRelativeOffset(reference),referenceRect=reference.getBoundingClientRect();return this.calculatePosition(referenceOffset,referenceRect,target,placement)},Position.prototype.findAbsolute=function(reference,target,placement){var referenceOffset=this.getAbsoluteOffset(reference),referenceRect=reference.getBoundingClientRect();return this.calculatePosition(referenceOffset,referenceRect,target,placement)},Position.prototype.findPosition=function(reference,target,placement,offsetFunction){void 0===offsetFunction&&(offsetFunction=this.getAbsoluteOffset.bind(this));var referenceOffset=offsetFunction(reference),referenceRect=reference.getBoundingClientRect();return this.calculatePosition(referenceOffset,referenceRect,target,placement)},Position.prototype.findPositionAt=function(offset,target,placement){return this.calculatePosition(offset,{top:0,left:0,height:0,width:0},target,placement)},Position.prototype.getPlacementBox=function(target,position){var targetBottom=target.offsetHeight+position.top,targetRight=target.offsetWidth+position.left;return{top:position.top,bottom:targetBottom,left:position.left,right:targetRight}},Position.prototype.addOffset=function(position,top,left){return void 0===top&&(top=0),void 0===left&&(left=0),Object.assign({},position,{top:position.top+top,left:position.left+left})},Position.prototype.setElement=function(element,position){element.style.top=position.top+"px",element.style.left=position.left+"px"},Position.prototype.findBestPlacement=function(reference,target,placements,containerFunction,positionFunction){var _this=this;void 0===containerFunction&&(containerFunction=this.defaultContainerFunction.bind(this)),void 0===positionFunction&&(positionFunction=this.findPosition.bind(this));var weightedPlacements=placements.map((function(placement){var pos=positionFunction(reference,target,placement),box=_this.getPlacementBox(target,pos),hiddenHeight=0,hiddenWidth=0,container=containerFunction();box.top<container.top?hiddenHeight=container.top-box.top:box.bottom>container.height&&(hiddenHeight=box.bottom-container.height),box.left<container.left?hiddenWidth=container.left-box.left:box.right>container.width&&(hiddenWidth=box.right-container.width),hiddenHeight&&!hiddenWidth?hiddenWidth=1:hiddenWidth&&!hiddenHeight&&(hiddenHeight=1);var area=target.offsetHeight*target.offsetWidth;return{placement,weight:(area-hiddenHeight*hiddenWidth)/area}}));return weightedPlacements.sort((function(a,b){return b.weight-a.weight})),weightedPlacements[0].placement},Position.prototype.findBestPlacementAt=function(offset,target,placements,containerFunction){var _this=this;void 0===containerFunction&&(containerFunction=this.defaultContainerFunction.bind(this));return this.findBestPlacement(null,target,placements,containerFunction,(function(_,target,placement){return _this.findPositionAt(offset,target,placement)}))},Position.prototype.defaultContainerFunction=function(){return{top:0,left:0,height:windowRef.innerHeight,width:windowRef.innerWidth}},Position.prototype.calculatePosition=function(referenceOffset,referenceRect,target,placement){return this.positions[placement]?this.positions[placement](referenceOffset,target,referenceRect):(console.error("No function found for placement, defaulting to 0,0"),{left:0,top:0})},Position}(),position=new Position;const __WEBPACK_DEFAULT_EXPORT__=Position},"./node_modules/lodash-es/isEqual.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Z:()=>lodash_es_isEqual});const _listCacheClear=function listCacheClear(){this.__data__=[],this.size=0};const lodash_es_eq=function eq(value,other){return value===other||value!=value&&other!=other};const _assocIndexOf=function assocIndexOf(array,key){for(var length=array.length;length--;)if(lodash_es_eq(array[length][0],key))return length;return-1};var splice=Array.prototype.splice;const _listCacheDelete=function listCacheDelete(key){var data=this.__data__,index=_assocIndexOf(data,key);return!(index<0)&&(index==data.length-1?data.pop():splice.call(data,index,1),--this.size,!0)};const _listCacheGet=function listCacheGet(key){var data=this.__data__,index=_assocIndexOf(data,key);return index<0?void 0:data[index][1]};const _listCacheHas=function listCacheHas(key){return _assocIndexOf(this.__data__,key)>-1};const _listCacheSet=function listCacheSet(key,value){var data=this.__data__,index=_assocIndexOf(data,key);return index<0?(++this.size,data.push([key,value])):data[index][1]=value,this};function ListCache(entries){var index=-1,length=null==entries?0:entries.length;for(this.clear();++index<length;){var entry=entries[index];this.set(entry[0],entry[1])}}ListCache.prototype.clear=_listCacheClear,ListCache.prototype.delete=_listCacheDelete,ListCache.prototype.get=_listCacheGet,ListCache.prototype.has=_listCacheHas,ListCache.prototype.set=_listCacheSet;const _ListCache=ListCache;const _stackClear=function stackClear(){this.__data__=new _ListCache,this.size=0};const _stackDelete=function stackDelete(key){var data=this.__data__,result=data.delete(key);return this.size=data.size,result};const _stackGet=function stackGet(key){return this.__data__.get(key)};const _stackHas=function stackHas(key){return this.__data__.has(key)};var isFunction=__webpack_require__("./node_modules/lodash-es/isFunction.js"),_root=__webpack_require__("./node_modules/lodash-es/_root.js");const _coreJsData=_root.Z["__core-js_shared__"];var uid,maskSrcKey=(uid=/[^.]+$/.exec(_coreJsData&&_coreJsData.keys&&_coreJsData.keys.IE_PROTO||""))?"Symbol(src)_1."+uid:"";const _isMasked=function isMasked(func){return!!maskSrcKey&&maskSrcKey in func};var isObject=__webpack_require__("./node_modules/lodash-es/isObject.js"),funcToString=Function.prototype.toString;const _toSource=function toSource(func){if(null!=func){try{return funcToString.call(func)}catch(e){}try{return func+""}catch(e){}}return""};var reIsHostCtor=/^\[object .+?Constructor\]$/,_baseIsNative_funcProto=Function.prototype,objectProto=Object.prototype,_baseIsNative_funcToString=_baseIsNative_funcProto.toString,_baseIsNative_hasOwnProperty=objectProto.hasOwnProperty,reIsNative=RegExp("^"+_baseIsNative_funcToString.call(_baseIsNative_hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const _baseIsNative=function baseIsNative(value){return!(!(0,isObject.Z)(value)||_isMasked(value))&&((0,isFunction.Z)(value)?reIsNative:reIsHostCtor).test(_toSource(value))};const _getValue=function getValue(object,key){return null==object?void 0:object[key]};const _getNative=function getNative(object,key){var value=_getValue(object,key);return _baseIsNative(value)?value:void 0};const _Map=_getNative(_root.Z,"Map");const _nativeCreate=_getNative(Object,"create");const _hashClear=function hashClear(){this.__data__=_nativeCreate?_nativeCreate(null):{},this.size=0};const _hashDelete=function hashDelete(key){var result=this.has(key)&&delete this.__data__[key];return this.size-=result?1:0,result};var _hashGet_hasOwnProperty=Object.prototype.hasOwnProperty;const _hashGet=function hashGet(key){var data=this.__data__;if(_nativeCreate){var result=data[key];return"__lodash_hash_undefined__"===result?void 0:result}return _hashGet_hasOwnProperty.call(data,key)?data[key]:void 0};var _hashHas_hasOwnProperty=Object.prototype.hasOwnProperty;const _hashHas=function hashHas(key){var data=this.__data__;return _nativeCreate?void 0!==data[key]:_hashHas_hasOwnProperty.call(data,key)};const _hashSet=function hashSet(key,value){var data=this.__data__;return this.size+=this.has(key)?0:1,data[key]=_nativeCreate&&void 0===value?"__lodash_hash_undefined__":value,this};function Hash(entries){var index=-1,length=null==entries?0:entries.length;for(this.clear();++index<length;){var entry=entries[index];this.set(entry[0],entry[1])}}Hash.prototype.clear=_hashClear,Hash.prototype.delete=_hashDelete,Hash.prototype.get=_hashGet,Hash.prototype.has=_hashHas,Hash.prototype.set=_hashSet;const _Hash=Hash;const _mapCacheClear=function mapCacheClear(){this.size=0,this.__data__={hash:new _Hash,map:new(_Map||_ListCache),string:new _Hash}};const _isKeyable=function isKeyable(value){var type=typeof value;return"string"==type||"number"==type||"symbol"==type||"boolean"==type?"__proto__"!==value:null===value};const _getMapData=function getMapData(map,key){var data=map.__data__;return _isKeyable(key)?data["string"==typeof key?"string":"hash"]:data.map};const _mapCacheDelete=function mapCacheDelete(key){var result=_getMapData(this,key).delete(key);return this.size-=result?1:0,result};const _mapCacheGet=function mapCacheGet(key){return _getMapData(this,key).get(key)};const _mapCacheHas=function mapCacheHas(key){return _getMapData(this,key).has(key)};const _mapCacheSet=function mapCacheSet(key,value){var data=_getMapData(this,key),size=data.size;return data.set(key,value),this.size+=data.size==size?0:1,this};function MapCache(entries){var index=-1,length=null==entries?0:entries.length;for(this.clear();++index<length;){var entry=entries[index];this.set(entry[0],entry[1])}}MapCache.prototype.clear=_mapCacheClear,MapCache.prototype.delete=_mapCacheDelete,MapCache.prototype.get=_mapCacheGet,MapCache.prototype.has=_mapCacheHas,MapCache.prototype.set=_mapCacheSet;const _MapCache=MapCache;const _stackSet=function stackSet(key,value){var data=this.__data__;if(data instanceof _ListCache){var pairs=data.__data__;if(!_Map||pairs.length<199)return pairs.push([key,value]),this.size=++data.size,this;data=this.__data__=new _MapCache(pairs)}return data.set(key,value),this.size=data.size,this};function Stack(entries){var data=this.__data__=new _ListCache(entries);this.size=data.size}Stack.prototype.clear=_stackClear,Stack.prototype.delete=_stackDelete,Stack.prototype.get=_stackGet,Stack.prototype.has=_stackHas,Stack.prototype.set=_stackSet;const _Stack=Stack;const _setCacheAdd=function setCacheAdd(value){return this.__data__.set(value,"__lodash_hash_undefined__"),this};const _setCacheHas=function setCacheHas(value){return this.__data__.has(value)};function SetCache(values){var index=-1,length=null==values?0:values.length;for(this.__data__=new _MapCache;++index<length;)this.add(values[index])}SetCache.prototype.add=SetCache.prototype.push=_setCacheAdd,SetCache.prototype.has=_setCacheHas;const _SetCache=SetCache;const _arraySome=function arraySome(array,predicate){for(var index=-1,length=null==array?0:array.length;++index<length;)if(predicate(array[index],index,array))return!0;return!1};const _cacheHas=function cacheHas(cache,key){return cache.has(key)};const _equalArrays=function equalArrays(array,other,bitmask,customizer,equalFunc,stack){var isPartial=1&bitmask,arrLength=array.length,othLength=other.length;if(arrLength!=othLength&&!(isPartial&&othLength>arrLength))return!1;var arrStacked=stack.get(array),othStacked=stack.get(other);if(arrStacked&&othStacked)return arrStacked==other&&othStacked==array;var index=-1,result=!0,seen=2&bitmask?new _SetCache:void 0;for(stack.set(array,other),stack.set(other,array);++index<arrLength;){var arrValue=array[index],othValue=other[index];if(customizer)var compared=isPartial?customizer(othValue,arrValue,index,other,array,stack):customizer(arrValue,othValue,index,array,other,stack);if(void 0!==compared){if(compared)continue;result=!1;break}if(seen){if(!_arraySome(other,(function(othValue,othIndex){if(!_cacheHas(seen,othIndex)&&(arrValue===othValue||equalFunc(arrValue,othValue,bitmask,customizer,stack)))return seen.push(othIndex)}))){result=!1;break}}else if(arrValue!==othValue&&!equalFunc(arrValue,othValue,bitmask,customizer,stack)){result=!1;break}}return stack.delete(array),stack.delete(other),result};var _Symbol=__webpack_require__("./node_modules/lodash-es/_Symbol.js");const _Uint8Array=_root.Z.Uint8Array;const _mapToArray=function mapToArray(map){var index=-1,result=Array(map.size);return map.forEach((function(value,key){result[++index]=[key,value]})),result};const _setToArray=function setToArray(set){var index=-1,result=Array(set.size);return set.forEach((function(value){result[++index]=value})),result};var symbolProto=_Symbol.Z?_Symbol.Z.prototype:void 0,symbolValueOf=symbolProto?symbolProto.valueOf:void 0;const _equalByTag=function equalByTag(object,other,tag,bitmask,customizer,equalFunc,stack){switch(tag){case"[object DataView]":if(object.byteLength!=other.byteLength||object.byteOffset!=other.byteOffset)return!1;object=object.buffer,other=other.buffer;case"[object ArrayBuffer]":return!(object.byteLength!=other.byteLength||!equalFunc(new _Uint8Array(object),new _Uint8Array(other)));case"[object Boolean]":case"[object Date]":case"[object Number]":return lodash_es_eq(+object,+other);case"[object Error]":return object.name==other.name&&object.message==other.message;case"[object RegExp]":case"[object String]":return object==other+"";case"[object Map]":var convert=_mapToArray;case"[object Set]":var isPartial=1&bitmask;if(convert||(convert=_setToArray),object.size!=other.size&&!isPartial)return!1;var stacked=stack.get(object);if(stacked)return stacked==other;bitmask|=2,stack.set(object,other);var result=_equalArrays(convert(object),convert(other),bitmask,customizer,equalFunc,stack);return stack.delete(object),result;case"[object Symbol]":if(symbolValueOf)return symbolValueOf.call(object)==symbolValueOf.call(other)}return!1};const _arrayPush=function arrayPush(array,values){for(var index=-1,length=values.length,offset=array.length;++index<length;)array[offset+index]=values[index];return array};var isArray=__webpack_require__("./node_modules/lodash-es/isArray.js");const _baseGetAllKeys=function baseGetAllKeys(object,keysFunc,symbolsFunc){var result=keysFunc(object);return(0,isArray.Z)(object)?result:_arrayPush(result,symbolsFunc(object))};const _arrayFilter=function arrayFilter(array,predicate){for(var index=-1,length=null==array?0:array.length,resIndex=0,result=[];++index<length;){var value=array[index];predicate(value,index,array)&&(result[resIndex++]=value)}return result};const lodash_es_stubArray=function stubArray(){return[]};var propertyIsEnumerable=Object.prototype.propertyIsEnumerable,nativeGetSymbols=Object.getOwnPropertySymbols;const _getSymbols=nativeGetSymbols?function(object){return null==object?[]:(object=Object(object),_arrayFilter(nativeGetSymbols(object),(function(symbol){return propertyIsEnumerable.call(object,symbol)})))}:lodash_es_stubArray;var keys=__webpack_require__("./node_modules/lodash-es/keys.js");const _getAllKeys=function getAllKeys(object){return _baseGetAllKeys(object,keys.Z,_getSymbols)};var _equalObjects_hasOwnProperty=Object.prototype.hasOwnProperty;const _equalObjects=function equalObjects(object,other,bitmask,customizer,equalFunc,stack){var isPartial=1&bitmask,objProps=_getAllKeys(object),objLength=objProps.length;if(objLength!=_getAllKeys(other).length&&!isPartial)return!1;for(var index=objLength;index--;){var key=objProps[index];if(!(isPartial?key in other:_equalObjects_hasOwnProperty.call(other,key)))return!1}var objStacked=stack.get(object),othStacked=stack.get(other);if(objStacked&&othStacked)return objStacked==other&&othStacked==object;var result=!0;stack.set(object,other),stack.set(other,object);for(var skipCtor=isPartial;++index<objLength;){var objValue=object[key=objProps[index]],othValue=other[key];if(customizer)var compared=isPartial?customizer(othValue,objValue,key,other,object,stack):customizer(objValue,othValue,key,object,other,stack);if(!(void 0===compared?objValue===othValue||equalFunc(objValue,othValue,bitmask,customizer,stack):compared)){result=!1;break}skipCtor||(skipCtor="constructor"==key)}if(result&&!skipCtor){var objCtor=object.constructor,othCtor=other.constructor;objCtor==othCtor||!("constructor"in object)||!("constructor"in other)||"function"==typeof objCtor&&objCtor instanceof objCtor&&"function"==typeof othCtor&&othCtor instanceof othCtor||(result=!1)}return stack.delete(object),stack.delete(other),result};const _DataView=_getNative(_root.Z,"DataView");const _Promise=_getNative(_root.Z,"Promise");const _Set=_getNative(_root.Z,"Set");const _WeakMap=_getNative(_root.Z,"WeakMap");var _baseGetTag=__webpack_require__("./node_modules/lodash-es/_baseGetTag.js"),dataViewCtorString=_toSource(_DataView),mapCtorString=_toSource(_Map),promiseCtorString=_toSource(_Promise),setCtorString=_toSource(_Set),weakMapCtorString=_toSource(_WeakMap),getTag=_baseGetTag.Z;(_DataView&&"[object DataView]"!=getTag(new _DataView(new ArrayBuffer(1)))||_Map&&"[object Map]"!=getTag(new _Map)||_Promise&&"[object Promise]"!=getTag(_Promise.resolve())||_Set&&"[object Set]"!=getTag(new _Set)||_WeakMap&&"[object WeakMap]"!=getTag(new _WeakMap))&&(getTag=function(value){var result=(0,_baseGetTag.Z)(value),Ctor="[object Object]"==result?value.constructor:void 0,ctorString=Ctor?_toSource(Ctor):"";if(ctorString)switch(ctorString){case dataViewCtorString:return"[object DataView]";case mapCtorString:return"[object Map]";case promiseCtorString:return"[object Promise]";case setCtorString:return"[object Set]";case weakMapCtorString:return"[object WeakMap]"}return result});const _getTag=getTag;var isBuffer=__webpack_require__("./node_modules/lodash-es/isBuffer.js"),isTypedArray=__webpack_require__("./node_modules/lodash-es/isTypedArray.js"),_baseIsEqualDeep_hasOwnProperty=Object.prototype.hasOwnProperty;const _baseIsEqualDeep=function baseIsEqualDeep(object,other,bitmask,customizer,equalFunc,stack){var objIsArr=(0,isArray.Z)(object),othIsArr=(0,isArray.Z)(other),objTag=objIsArr?"[object Array]":_getTag(object),othTag=othIsArr?"[object Array]":_getTag(other),objIsObj="[object Object]"==(objTag="[object Arguments]"==objTag?"[object Object]":objTag),othIsObj="[object Object]"==(othTag="[object Arguments]"==othTag?"[object Object]":othTag),isSameTag=objTag==othTag;if(isSameTag&&(0,isBuffer.Z)(object)){if(!(0,isBuffer.Z)(other))return!1;objIsArr=!0,objIsObj=!1}if(isSameTag&&!objIsObj)return stack||(stack=new _Stack),objIsArr||(0,isTypedArray.Z)(object)?_equalArrays(object,other,bitmask,customizer,equalFunc,stack):_equalByTag(object,other,objTag,bitmask,customizer,equalFunc,stack);if(!(1&bitmask)){var objIsWrapped=objIsObj&&_baseIsEqualDeep_hasOwnProperty.call(object,"__wrapped__"),othIsWrapped=othIsObj&&_baseIsEqualDeep_hasOwnProperty.call(other,"__wrapped__");if(objIsWrapped||othIsWrapped){var objUnwrapped=objIsWrapped?object.value():object,othUnwrapped=othIsWrapped?other.value():other;return stack||(stack=new _Stack),equalFunc(objUnwrapped,othUnwrapped,bitmask,customizer,stack)}}return!!isSameTag&&(stack||(stack=new _Stack),_equalObjects(object,other,bitmask,customizer,equalFunc,stack))};var isObjectLike=__webpack_require__("./node_modules/lodash-es/isObjectLike.js");const _baseIsEqual=function baseIsEqual(value,other,bitmask,customizer,stack){return value===other||(null==value||null==other||!(0,isObjectLike.Z)(value)&&!(0,isObjectLike.Z)(other)?value!=value&&other!=other:_baseIsEqualDeep(value,other,bitmask,customizer,baseIsEqual,stack))};const lodash_es_isEqual=function isEqual(value,other){return _baseIsEqual(value,other)}}}]);