UNPKG

animate-height

Version:

Animate the height of an element to 'auto' or '0px'.

2 lines (1 loc) 30.7 kB
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var toString={}.toString,classofRaw=function(e){return toString.call(e).slice(8,-1)},isArray=Array.isArray||function(e){return"Array"==classofRaw(e)},isObject=function(e){return"object"==typeof e?null!==e:"function"==typeof e},requireObjectCoercible=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},toObject=function(e){return Object(requireObjectCoercible(e))},ceil=Math.ceil,floor=Math.floor,toInteger=function(e){return isNaN(e=+e)?0:(e>0?floor:ceil)(e)},min=Math.min,toLength=function(e){return e>0?min(toInteger(e),9007199254740991):0},toPrimitive=function(e,t){if(!isObject(e))return e;var r,n;if(t&&"function"==typeof(r=e.toString)&&!isObject(n=r.call(e)))return n;if("function"==typeof(r=e.valueOf)&&!isObject(n=r.call(e)))return n;if(!t&&"function"==typeof(r=e.toString)&&!isObject(n=r.call(e)))return n;throw TypeError("Can't convert object to primitive value")},fails=function(e){try{return!!e()}catch(e){return!0}},descriptors=!fails(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),global="object"==typeof window&&window&&window.Math==Math?window:"object"==typeof self&&self&&self.Math==Math?self:Function("return this")(),document$1=global.document,exist=isObject(document$1)&&isObject(document$1.createElement),documentCreateElement=function(e){return exist?document$1.createElement(e):{}},ie8DomDefine=!descriptors&&!fails(function(){return 7!=Object.defineProperty(documentCreateElement("div"),"a",{get:function(){return 7}}).a}),anObject=function(e){if(!isObject(e))throw TypeError(String(e)+" is not an object");return e},nativeDefineProperty=Object.defineProperty,f=descriptors?nativeDefineProperty:function(e,t,r){if(anObject(e),t=toPrimitive(t,!0),anObject(r),ie8DomDefine)try{return nativeDefineProperty(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(e[t]=r.value),e},objectDefineProperty={f:f},createPropertyDescriptor=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},createProperty=function(e,t,r){var n=toPrimitive(t);n in e?objectDefineProperty.f(e,n,createPropertyDescriptor(0,r)):e[n]=r};function createCommonjsModule(e,t){return e(t={exports:{}},t.exports),t.exports}var set,get,has$1,hide=descriptors?function(e,t,r){return objectDefineProperty.f(e,t,createPropertyDescriptor(1,r))}:function(e,t,r){return e[t]=r,e},setGlobal=function(e,t){try{hide(global,e,t)}catch(r){global[e]=t}return t},isPure=!1,shared=createCommonjsModule(function(e){var t=global["__core-js_shared__"]||setGlobal("__core-js_shared__",{});(e.exports=function(e,r){return t[e]||(t[e]=void 0!==r?r:{})})("versions",[]).push({version:"3.0.0",mode:"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})}),id=0,postfix=Math.random(),uid=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++id+postfix).toString(36))},nativeSymbol=!fails(function(){}),store=shared("wks"),Symbol=global.Symbol,wellKnownSymbol=function(e){return store[e]||(store[e]=nativeSymbol&&Symbol[e]||(nativeSymbol?Symbol:uid)("Symbol."+e))},SPECIES=wellKnownSymbol("species"),arraySpeciesCreate=function(e,t){var r;return isArray(e)&&("function"!=typeof(r=e.constructor)||r!==Array&&!isArray(r.prototype)?isObject(r)&&null===(r=r[SPECIES])&&(r=void 0):r=void 0),new(void 0===r?Array:r)(0===t?0:t)},SPECIES$1=wellKnownSymbol("species"),arrayMethodHasSpeciesSupport=function(e){return!fails(function(){var t=[];return(t.constructor={})[SPECIES$1]=function(){return{foo:1}},1!==t[e](Boolean).foo})},nativePropertyIsEnumerable={}.propertyIsEnumerable,nativeGetOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,NASHORN_BUG=nativeGetOwnPropertyDescriptor&&!nativePropertyIsEnumerable.call({1:2},1),f$1=NASHORN_BUG?function(e){var t=nativeGetOwnPropertyDescriptor(this,e);return!!t&&t.enumerable}:nativePropertyIsEnumerable,objectPropertyIsEnumerable={f:f$1},split="".split,indexedObject=fails(function(){return!Object("z").propertyIsEnumerable(0)})?function(e){return"String"==classofRaw(e)?split.call(e,""):Object(e)}:Object,toIndexedObject=function(e){return indexedObject(requireObjectCoercible(e))},hasOwnProperty={}.hasOwnProperty,has=function(e,t){return hasOwnProperty.call(e,t)},nativeGetOwnPropertyDescriptor$1=Object.getOwnPropertyDescriptor,f$2=descriptors?nativeGetOwnPropertyDescriptor$1:function(e,t){if(e=toIndexedObject(e),t=toPrimitive(t,!0),ie8DomDefine)try{return nativeGetOwnPropertyDescriptor$1(e,t)}catch(e){}if(has(e,t))return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(e,t),e[t])},objectGetOwnPropertyDescriptor={f:f$2},functionToString=shared("native-function-to-string",Function.toString),WeakMap=global.WeakMap,nativeWeakMap="function"==typeof WeakMap&&/native code/.test(functionToString.call(WeakMap)),shared$1=shared("keys"),sharedKey=function(e){return shared$1[e]||(shared$1[e]=uid(e))},hiddenKeys={},WeakMap$1=global.WeakMap,enforce=function(e){return has$1(e)?get(e):set(e,{})},getterFor=function(e){return function(t){var r;if(!isObject(t)||(r=get(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return r}};if(nativeWeakMap){var store$1=new WeakMap$1,wmget=store$1.get,wmhas=store$1.has,wmset=store$1.set;set=function(e,t){return wmset.call(store$1,e,t),t},get=function(e){return wmget.call(store$1,e)||{}},has$1=function(e){return wmhas.call(store$1,e)}}else{var STATE=sharedKey("state");hiddenKeys[STATE]=!0,set=function(e,t){return hide(e,STATE,t),t},get=function(e){return has(e,STATE)?e[STATE]:{}},has$1=function(e){return has(e,STATE)}}var internalState={set:set,get:get,has:has$1,enforce:enforce,getterFor:getterFor},redefine=createCommonjsModule(function(e){var t=internalState.get,r=internalState.enforce,n=String(functionToString).split("toString");shared("inspectSource",function(e){return functionToString.call(e)}),(e.exports=function(e,t,o,i){var a=!!i&&!!i.unsafe,c=!!i&&!!i.enumerable,s=!!i&&!!i.noTargetGet;"function"==typeof o&&("string"!=typeof t||has(o,"name")||hide(o,"name",t),r(o).source=n.join("string"==typeof t?t:"")),e!==global?(a?!s&&e[t]&&(c=!0):delete e[t],c?e[t]=o:hide(e,t,o)):c?e[t]=o:setGlobal(t,o)})(Function.prototype,"toString",function(){return"function"==typeof this&&t(this).source||functionToString.call(this)})}),max=Math.max,min$1=Math.min,toAbsoluteIndex=function(e,t){var r=toInteger(e);return r<0?max(r+t,0):min$1(r,t)},arrayIncludes=function(e){return function(t,r,n){var o,i=toIndexedObject(t),a=toLength(i.length),c=toAbsoluteIndex(n,a);if(e&&r!=r){for(;a>c;)if((o=i[c++])!=o)return!0}else for(;a>c;c++)if((e||c in i)&&i[c]===r)return e||c||0;return!e&&-1}},arrayIndexOf=arrayIncludes(!1),objectKeysInternal=function(e,t){var r,n=toIndexedObject(e),o=0,i=[];for(r in n)!has(hiddenKeys,r)&&has(n,r)&&i.push(r);for(;t.length>o;)has(n,r=t[o++])&&(~arrayIndexOf(i,r)||i.push(r));return i},enumBugKeys=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],hiddenKeys$1=enumBugKeys.concat("length","prototype"),f$3=Object.getOwnPropertyNames||function(e){return objectKeysInternal(e,hiddenKeys$1)},objectGetOwnPropertyNames={f:f$3},f$4=Object.getOwnPropertySymbols,objectGetOwnPropertySymbols={f:f$4},Reflect=global.Reflect,ownKeys=Reflect&&Reflect.ownKeys||function(e){var t=objectGetOwnPropertyNames.f(anObject(e)),r=objectGetOwnPropertySymbols.f;return r?t.concat(r(e)):t},copyConstructorProperties=function(e,t){for(var r=ownKeys(t),n=objectDefineProperty.f,o=objectGetOwnPropertyDescriptor.f,i=0;i<r.length;i++){var a=r[i];has(e,a)||n(e,a,o(t,a))}},replacement=/#|\.prototype\./,isForced=function(e,t){var r=data[normalize(e)];return r==POLYFILL||r!=NATIVE&&("function"==typeof t?fails(t):!!t)},normalize=isForced.normalize=function(e){return String(e).replace(replacement,".").toLowerCase()},data=isForced.data={},NATIVE=isForced.NATIVE="N",POLYFILL=isForced.POLYFILL="P",isForced_1=isForced,getOwnPropertyDescriptor=objectGetOwnPropertyDescriptor.f,_export=function(e,t){var r,n,o,i,a,c=e.target,s=e.global,l=e.stat;if(r=s?global:l?global[c]||setGlobal(c,{}):(global[c]||{}).prototype)for(n in t){if(i=t[n],o=e.noTargetGet?(a=getOwnPropertyDescriptor(r,n))&&a.value:r[n],!isForced_1(s?n:c+(l?".":"#")+n,e.forced)&&void 0!==o){if(typeof i==typeof o)continue;copyConstructorProperties(i,o)}(e.sham||o&&o.sham)&&hide(i,"sham",!0),redefine(r,n,i,e)}},IS_CONCAT_SPREADABLE=wellKnownSymbol("isConcatSpreadable"),MAX_SAFE_INTEGER=9007199254740991,MAXIMUM_ALLOWED_INDEX_EXCEEDED="Maximum allowed index exceeded",IS_CONCAT_SPREADABLE_SUPPORT=!fails(function(){var e=[];return e[IS_CONCAT_SPREADABLE]=!1,e.concat()[0]!==e}),SPECIES_SUPPORT=arrayMethodHasSpeciesSupport("concat"),isConcatSpreadable=function(e){if(!isObject(e))return!1;var t=e[IS_CONCAT_SPREADABLE];return void 0!==t?!!t:isArray(e)},FORCED=!IS_CONCAT_SPREADABLE_SUPPORT||!SPECIES_SUPPORT;_export({target:"Array",proto:!0,forced:FORCED},{concat:function(e){var t,r,n,o,i,a=toObject(this),c=arraySpeciesCreate(a,0),s=0;for(t=-1,n=arguments.length;t<n;t++)if(i=-1===t?a:arguments[t],isConcatSpreadable(i)){if(s+(o=toLength(i.length))>MAX_SAFE_INTEGER)throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);for(r=0;r<o;r++,s++)r in i&&createProperty(c,s,i[r])}else{if(s>=MAX_SAFE_INTEGER)throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);createProperty(c,s++,i)}return c.length=s,c}});var aFunction=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e},bindContext=function(e,t,r){if(aFunction(e),void 0===t)return e;switch(r){case 0:return function(){return e.call(t)};case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,o){return e.call(t,r,n,o)}}return function(){return e.apply(t,arguments)}},arrayMethods=function(e,t){var r=1==e,n=2==e,o=3==e,i=4==e,a=6==e,c=5==e||a,s=t||arraySpeciesCreate;return function(t,l,u){for(var f,p,d=toObject(t),h=indexedObject(d),g=bindContext(l,u,3),v=toLength(h.length),y=0,E=r?s(t,v):n?s(t,0):void 0;v>y;y++)if((c||y in h)&&(p=g(f=h[y],y,d),e))if(r)E[y]=p;else if(p)switch(e){case 3:return!0;case 5:return f;case 6:return y;case 2:E.push(f)}else if(i)return!1;return a?-1:o||i?i:E}},internalFilter=arrayMethods(2),SPECIES_SUPPORT$1=arrayMethodHasSpeciesSupport("filter");_export({target:"Array",proto:!0,forced:!SPECIES_SUPPORT$1},{filter:function(e){return internalFilter(this,e,arguments[1])}});var sloppyArrayMethod=function(e,t){var r=[][e];return!r||!fails(function(){r.call(null,t||function(){throw Error()},1)})},nativeJoin=[].join,ES3_STRINGS=indexedObject!=Object,SLOPPY_METHOD=sloppyArrayMethod("join",",");_export({target:"Array",proto:!0,forced:ES3_STRINGS||SLOPPY_METHOD},{join:function(e){return nativeJoin.call(toIndexedObject(this),void 0===e?",":e)}});var TO_STRING_TAG=wellKnownSymbol("toStringTag"),CORRECT_ARGUMENTS="Arguments"==classofRaw(function(){return arguments}()),tryGet=function(e,t){try{return e[t]}catch(e){}},classof=function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=tryGet(t=Object(e),TO_STRING_TAG))?r:CORRECT_ARGUMENTS?classofRaw(t):"Object"==(n=classofRaw(t))&&"function"==typeof t.callee?"Arguments":n},TO_STRING_TAG$1=wellKnownSymbol("toStringTag"),test={};test[TO_STRING_TAG$1]="z";var objectToString="[object z]"!==String(test)?function(){return"[object "+classof(this)+"]"}:test.toString,ObjectPrototype=Object.prototype;objectToString!==ObjectPrototype.toString&&redefine(ObjectPrototype,"toString",objectToString,{unsafe:!0});var whitespaces="\t\n\v\f\r                 \u2028\u2029\ufeff",whitespace="["+whitespaces+"]",ltrim=RegExp("^"+whitespace+whitespace+"*"),rtrim=RegExp(whitespace+whitespace+"*$"),stringTrim=function(e,t){return e=String(requireObjectCoercible(e)),1&t&&(e=e.replace(ltrim,"")),2&t&&(e=e.replace(rtrim,"")),e},nativeParseInt=global.parseInt,hex=/^[-+]?0[xX]/,FORCED$1=8!==nativeParseInt(whitespaces+"08")||22!==nativeParseInt(whitespaces+"0x16"),_parseInt=FORCED$1?function(e,t){var r=stringTrim(String(e),3);return nativeParseInt(r,t>>>0||(hex.test(r)?16:10))}:nativeParseInt;_export({global:!0,forced:parseInt!=_parseInt},{parseInt:_parseInt});var anInstance=function(e,t,r){if(!(e instanceof t))throw TypeError("Incorrect "+(r?r+" ":"")+"invocation");return e},iterators={},ITERATOR=wellKnownSymbol("iterator"),ArrayPrototype=Array.prototype,isArrayIteratorMethod=function(e){return void 0!==e&&(iterators.Array===e||ArrayPrototype[ITERATOR]===e)},ITERATOR$1=wellKnownSymbol("iterator"),getIteratorMethod=function(e){if(null!=e)return e[ITERATOR$1]||e["@@iterator"]||iterators[classof(e)]},callWithSafeIterationClosing=function(e,t,r,n){try{return n?t(anObject(r)[0],r[1]):t(r)}catch(t){var o=e.return;throw void 0!==o&&anObject(o.call(e)),t}},iterate=createCommonjsModule(function(e){var t={};(e.exports=function(e,r,n,o,i){var a,c,s,l,u,f=bindContext(r,n,o?2:1);if(i)a=e;else{if("function"!=typeof(c=getIteratorMethod(e)))throw TypeError("Target is not iterable");if(isArrayIteratorMethod(c)){for(s=0,l=toLength(e.length);l>s;s++)if((o?f(anObject(u=e[s])[0],u[1]):f(e[s]))===t)return t;return}a=c.call(e)}for(;!(u=a.next()).done;)if(callWithSafeIterationClosing(a,f,u.value,o)===t)return t}).BREAK=t}),ITERATOR$2=wellKnownSymbol("iterator"),SAFE_CLOSING=!1;try{var called=0,iteratorWithReturn={next:function(){return{done:!!called++}},return:function(){SAFE_CLOSING=!0}};iteratorWithReturn[ITERATOR$2]=function(){return this}}catch(e){}var defer,channel,port,checkCorrectnessOfIteration=function(e,t){if(!t&&!SAFE_CLOSING)return!1;var r=!1;try{var n={};n[ITERATOR$2]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r},SPECIES$2=wellKnownSymbol("species"),speciesConstructor=function(e,t){var r,n=anObject(e).constructor;return void 0===n||null==(r=anObject(n)[SPECIES$2])?t:aFunction(r)},document$2=global.document,html=document$2&&document$2.documentElement,set$1=global.setImmediate,clear=global.clearImmediate,process=global.process,MessageChannel=global.MessageChannel,Dispatch=global.Dispatch,counter=0,queue={},ONREADYSTATECHANGE="onreadystatechange",run=function(){var e=+this;if(queue.hasOwnProperty(e)){var t=queue[e];delete queue[e],t()}},listener=function(e){run.call(e.data)};set$1&&clear||(set$1=function(e){for(var t=[],r=1;arguments.length>r;)t.push(arguments[r++]);return queue[++counter]=function(){("function"==typeof e?e:Function(e)).apply(void 0,t)},defer(counter),counter},clear=function(e){delete queue[e]},"process"==classofRaw(process)?defer=function(e){process.nextTick(bindContext(run,e,1))}:Dispatch&&Dispatch.now?defer=function(e){Dispatch.now(bindContext(run,e,1))}:MessageChannel?(port=(channel=new MessageChannel).port2,channel.port1.onmessage=listener,defer=bindContext(port.postMessage,port,1)):global.addEventListener&&"function"==typeof postMessage&&!global.importScripts?(defer=function(e){global.postMessage(e+"","*")},global.addEventListener("message",listener,!1)):defer=ONREADYSTATECHANGE in documentCreateElement("script")?function(e){html.appendChild(documentCreateElement("script"))[ONREADYSTATECHANGE]=function(){html.removeChild(this),run.call(e)}}:function(e){setTimeout(bindContext(run,e,1),0)});var flush,head,last,notify,toggle,node,promise,task={set:set$1,clear:clear},navigator=global.navigator,userAgent=navigator&&navigator.userAgent||"",getOwnPropertyDescriptor$1=objectGetOwnPropertyDescriptor.f,macrotask=task.set,MutationObserver=global.MutationObserver||global.WebKitMutationObserver,process$1=global.process,Promise$1=global.Promise,IS_NODE="process"==classofRaw(process$1),queueMicrotaskDescriptor=getOwnPropertyDescriptor$1(global,"queueMicrotask"),queueMicrotask=queueMicrotaskDescriptor&&queueMicrotaskDescriptor.value;queueMicrotask||(flush=function(){var e,t;for(IS_NODE&&(e=process$1.domain)&&e.exit();head;){t=head.fn,head=head.next;try{t()}catch(e){throw head?notify():last=void 0,e}}last=void 0,e&&e.enter()},IS_NODE?notify=function(){process$1.nextTick(flush)}:MutationObserver&&!/(iPhone|iPod|iPad).*AppleWebKit/i.test(userAgent)?(toggle=!0,node=document.createTextNode(""),new MutationObserver(flush).observe(node,{characterData:!0}),notify=function(){node.data=toggle=!toggle}):Promise$1&&Promise$1.resolve?(promise=Promise$1.resolve(void 0),notify=function(){promise.then(flush)}):notify=function(){macrotask.call(global,flush)});var Internal,OwnPromiseCapability,PromiseWrapper,microtask=queueMicrotask||function(e){var t={fn:e,next:void 0};last&&(last.next=t),head||(head=t,notify()),last=t},PromiseCapability=function(e){var t,r;this.promise=new e(function(e,n){if(void 0!==t||void 0!==r)throw TypeError("Bad Promise constructor");t=e,r=n}),this.resolve=aFunction(t),this.reject=aFunction(r)},f$5=function(e){return new PromiseCapability(e)},newPromiseCapability={f:f$5},promiseResolve=function(e,t){if(anObject(e),isObject(t)&&t.constructor===e)return t;var r=newPromiseCapability.f(e);return(0,r.resolve)(t),r.promise},hostReportErrors=function(e,t){var r=global.console;r&&r.error&&(1===arguments.length?r.error(e):r.error(e,t))},perform=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}},redefineAll=function(e,t,r){for(var n in t)redefine(e,n,t[n],r);return e},defineProperty=objectDefineProperty.f,TO_STRING_TAG$2=wellKnownSymbol("toStringTag"),setToStringTag=function(e,t,r){e&&!has(e=r?e:e.prototype,TO_STRING_TAG$2)&&defineProperty(e,TO_STRING_TAG$2,{configurable:!0,value:t})},path=global,aFunction$1=function(e){return"function"==typeof e?e:void 0},getBuiltIn=function(e,t){return arguments.length<2?aFunction$1(path[e])||aFunction$1(global[e]):path[e]&&path[e][t]||global[e]&&global[e][t]},SPECIES$3=wellKnownSymbol("species"),setSpecies=function(e){var t=getBuiltIn(e),r=objectDefineProperty.f;descriptors&&t&&!t[SPECIES$3]&&r(t,SPECIES$3,{configurable:!0,get:function(){return this}})},PROMISE="Promise",task$1=task.set,SPECIES$4=wellKnownSymbol("species"),getInternalState=internalState.get,setInternalState=internalState.set,getInternalPromiseState=internalState.getterFor(PROMISE),PromiseConstructor=global[PROMISE],TypeError$1=global.TypeError,document$3=global.document,process$2=global.process,$fetch=global.fetch,versions=process$2&&process$2.versions,v8=versions&&versions.v8||"",newPromiseCapability$1=newPromiseCapability.f,newGenericPromiseCapability=newPromiseCapability$1,IS_NODE$1="process"==classofRaw(process$2),DISPATCH_EVENT=!!(document$3&&document$3.createEvent&&global.dispatchEvent),UNHANDLED_REJECTION="unhandledrejection",REJECTION_HANDLED="rejectionhandled",PENDING=0,FULFILLED=1,REJECTED=2,HANDLED=1,UNHANDLED=2,FORCED$2=isForced_1(PROMISE,function(){var e=PromiseConstructor.resolve(1),t=function(){},r=(e.constructor={})[SPECIES$4]=function(e){e(t,t)};return!((IS_NODE$1||"function"==typeof PromiseRejectionEvent)&&(!isPure||e.finally)&&e.then(t)instanceof r&&0!==v8.indexOf("6.6")&&-1===userAgent.indexOf("Chrome/66"))}),INCORRECT_ITERATION=FORCED$2||!checkCorrectnessOfIteration(function(e){PromiseConstructor.all(e).catch(function(){})}),isThenable=function(e){var t;return!(!isObject(e)||"function"!=typeof(t=e.then))&&t},notify$1=function(e,t,r){if(!t.notified){t.notified=!0;var n=t.reactions;microtask(function(){for(var o=t.value,i=t.state==FULFILLED,a=0,c=function(r){var n,a,c,s=i?r.ok:r.fail,l=r.resolve,u=r.reject,f=r.domain;try{s?(i||(t.rejection===UNHANDLED&&onHandleUnhandled(e,t),t.rejection=HANDLED),!0===s?n=o:(f&&f.enter(),n=s(o),f&&(f.exit(),c=!0)),n===r.promise?u(TypeError$1("Promise-chain cycle")):(a=isThenable(n))?a.call(n,l,u):l(n)):u(o)}catch(e){f&&!c&&f.exit(),u(e)}};n.length>a;)c(n[a++]);t.reactions=[],t.notified=!1,r&&!t.rejection&&onUnhandled(e,t)})}},dispatchEvent=function(e,t,r){var n,o;DISPATCH_EVENT?((n=document$3.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),global.dispatchEvent(n)):n={promise:t,reason:r},(o=global["on"+e])?o(n):e===UNHANDLED_REJECTION&&hostReportErrors("Unhandled promise rejection",r)},onUnhandled=function(e,t){task$1.call(global,function(){var r,n=t.value,o=isUnhandled(t);if(o&&(r=perform(function(){IS_NODE$1?process$2.emit("unhandledRejection",n,e):dispatchEvent(UNHANDLED_REJECTION,e,n)}),t.rejection=IS_NODE$1||isUnhandled(t)?UNHANDLED:HANDLED),o&&r.e)throw r.v})},isUnhandled=function(e){return e.rejection!==HANDLED&&!e.parent},onHandleUnhandled=function(e,t){task$1.call(global,function(){IS_NODE$1?process$2.emit("rejectionHandled",e):dispatchEvent(REJECTION_HANDLED,e,t.value)})},bind=function(e,t,r,n){return function(o){e(t,r,o,n)}},internalReject=function(e,t,r,n){t.done||(t.done=!0,n&&(t=n),t.value=r,t.state=REJECTED,notify$1(e,t,!0))},internalResolve=function(e,t,r,n){if(!t.done){t.done=!0,n&&(t=n);try{if(e===r)throw TypeError$1("Promise can't be resolved itself");var o=isThenable(r);o?microtask(function(){var n={done:!1};try{o.call(r,bind(internalResolve,e,n,t),bind(internalReject,e,n,t))}catch(r){internalReject(e,n,r,t)}}):(t.value=r,t.state=FULFILLED,notify$1(e,t,!1))}catch(r){internalReject(e,{done:!1},r,t)}}};FORCED$2&&(PromiseConstructor=function(e){anInstance(this,PromiseConstructor,PROMISE),aFunction(e),Internal.call(this);var t=getInternalState(this);try{e(bind(internalResolve,this,t),bind(internalReject,this,t))}catch(e){internalReject(this,t,e)}},(Internal=function(e){setInternalState(this,{type:PROMISE,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:PENDING,value:void 0})}).prototype=redefineAll(PromiseConstructor.prototype,{then:function(e,t){var r=getInternalPromiseState(this),n=newPromiseCapability$1(speciesConstructor(this,PromiseConstructor));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=IS_NODE$1?process$2.domain:void 0,r.parent=!0,r.reactions.push(n),r.state!=PENDING&&notify$1(this,r,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),OwnPromiseCapability=function(){var e=new Internal,t=getInternalState(e);this.promise=e,this.resolve=bind(internalResolve,e,t),this.reject=bind(internalReject,e,t)},newPromiseCapability.f=newPromiseCapability$1=function(e){return e===PromiseConstructor||e===PromiseWrapper?new OwnPromiseCapability(e):newGenericPromiseCapability(e)},"function"==typeof $fetch&&_export({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return promiseResolve(PromiseConstructor,$fetch.apply(global,arguments))}})),_export({global:!0,wrap:!0,forced:FORCED$2},{Promise:PromiseConstructor}),setToStringTag(PromiseConstructor,PROMISE,!1,!0),setSpecies(PROMISE),PromiseWrapper=path[PROMISE],_export({target:PROMISE,stat:!0,forced:FORCED$2},{reject:function(e){var t=newPromiseCapability$1(this);return t.reject.call(void 0,e),t.promise}}),_export({target:PROMISE,stat:!0,forced:FORCED$2},{resolve:function(e){return promiseResolve(this,e)}}),_export({target:PROMISE,stat:!0,forced:INCORRECT_ITERATION},{all:function(e){var t=this,r=newPromiseCapability$1(t),n=r.resolve,o=r.reject,i=perform(function(){var r=[],i=0,a=1;iterate(e,function(e){var c=i++,s=!1;r.push(void 0),a++,t.resolve(e).then(function(e){s||(s=!0,r[c]=e,--a||n(r))},o)}),--a||n(r)});return i.e&&o(i.v),r.promise},race:function(e){var t=this,r=newPromiseCapability$1(t),n=r.reject,o=perform(function(){iterate(e,function(e){t.resolve(e).then(r.resolve,n)})});return o.e&&n(o.v),r.promise}});var stringAt=function(e,t,r){var n,o,i=String(requireObjectCoercible(e)),a=toInteger(t),c=i.length;return a<0||a>=c?r?"":void 0:(n=i.charCodeAt(a))<55296||n>56319||a+1===c||(o=i.charCodeAt(a+1))<56320||o>57343?r?i.charAt(a):n:r?i.slice(a,a+2):o-56320+(n-55296<<10)+65536},advanceStringIndex=function(e,t,r){return t+(r?stringAt(e,t,!0).length:1)},regexpFlags=function(){var e=anObject(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},nativeExec=RegExp.prototype.exec,nativeReplace=String.prototype.replace,patchedExec=nativeExec,UPDATES_LAST_INDEX_WRONG=function(){var e=/a/,t=/b*/g;return nativeExec.call(e,"a"),nativeExec.call(t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),NPCG_INCLUDED=void 0!==/()??/.exec("")[1],PATCH=UPDATES_LAST_INDEX_WRONG||NPCG_INCLUDED;PATCH&&(patchedExec=function(e){var t,r,n,o,i=this;return NPCG_INCLUDED&&(r=new RegExp("^"+i.source+"$(?!\\s)",regexpFlags.call(i))),UPDATES_LAST_INDEX_WRONG&&(t=i.lastIndex),n=nativeExec.call(i,e),UPDATES_LAST_INDEX_WRONG&&n&&(i.lastIndex=i.global?n.index+n[0].length:t),NPCG_INCLUDED&&n&&n.length>1&&nativeReplace.call(n[0],r,function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(n[o]=void 0)}),n});var regexpExec=patchedExec,regexpExecAbstract=function(e,t){var r=e.exec;if("function"==typeof r){var n=r.call(e,t);if("object"!=typeof n)throw TypeError("RegExp exec method returned something other than an Object or null");return n}if("RegExp"!==classofRaw(e))throw TypeError("RegExp#exec called on incompatible receiver");return regexpExec.call(e,t)},SPECIES$5=wellKnownSymbol("species"),REPLACE_SUPPORTS_NAMED_GROUPS=!fails(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}),SPLIT_WORKS_WITH_OVERWRITTEN_EXEC=!fails(function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var r="ab".split(e);return 2!==r.length||"a"!==r[0]||"b"!==r[1]}),fixRegexpWellKnownSymbolLogic=function(e,t,r,n){var o=wellKnownSymbol(e),i=!fails(function(){var t={};return t[o]=function(){return 7},7!=""[e](t)}),a=i&&!fails(function(){var t=!1,r=/a/;return r.exec=function(){return t=!0,null},"split"===e&&(r.constructor={},r.constructor[SPECIES$5]=function(){return r}),r[o](""),!t});if(!i||!a||"replace"===e&&!REPLACE_SUPPORTS_NAMED_GROUPS||"split"===e&&!SPLIT_WORKS_WITH_OVERWRITTEN_EXEC){var c=/./[o],s=r(o,""[e],function(e,t,r,n,o){return t.exec===regexpExec?i&&!o?{done:!0,value:c.call(t,r,n)}:{done:!0,value:e.call(r,t,n)}:{done:!1}}),l=s[0],u=s[1];redefine(String.prototype,e,l),redefine(RegExp.prototype,o,2==t?function(e,t){return u.call(e,this,t)}:function(e){return u.call(e,this)}),n&&hide(RegExp.prototype[o],"sham",!0)}},max$1=Math.max,min$2=Math.min,floor$1=Math.floor,SUBSTITUTION_SYMBOLS=/\$([$&`']|\d\d?|<[^>]*>)/g,SUBSTITUTION_SYMBOLS_NO_NAMED=/\$([$&`']|\d\d?)/g,maybeToString=function(e){return void 0===e?e:String(e)};fixRegexpWellKnownSymbolLogic("replace",2,function(e,t,r){return[function(r,n){var o=requireObjectCoercible(this),i=null==r?void 0:r[e];return void 0!==i?i.call(r,o,n):t.call(String(o),r,n)},function(e,o){var i=r(t,e,this,o);if(i.done)return i.value;var a=anObject(e),c=String(this),s="function"==typeof o;s||(o=String(o));var l=a.global;if(l){var u=a.unicode;a.lastIndex=0}for(var f=[];;){var p=regexpExecAbstract(a,c);if(null===p)break;if(f.push(p),!l)break;""===String(p[0])&&(a.lastIndex=advanceStringIndex(c,toLength(a.lastIndex),u))}for(var d="",h=0,g=0;g<f.length;g++){p=f[g];for(var v=String(p[0]),y=max$1(min$2(toInteger(p.index),c.length),0),E=[],m=1;m<p.length;m++)E.push(maybeToString(p[m]));var b=p.groups;if(s){var S=[v].concat(E,y,c);void 0!==b&&S.push(b);var O=String(o.apply(void 0,S))}else O=n(v,c,y,E,b,o);y>=h&&(d+=c.slice(h,y)+O,h=y+v.length)}return d+c.slice(h)}];function n(e,r,n,o,i,a){var c=n+e.length,s=o.length,l=SUBSTITUTION_SYMBOLS_NO_NAMED;return void 0!==i&&(i=toObject(i),l=SUBSTITUTION_SYMBOLS),t.call(a,l,function(t,a){var l;switch(a.charAt(0)){case"$":return"$";case"&":return e;case"`":return r.slice(0,n);case"'":return r.slice(c);case"<":l=i[a.slice(1,-1)];break;default:var u=+a;if(0===u)return t;if(u>s){var f=floor$1(u/10);return 0===f?t:f<=s?void 0===o[f-1]?a.charAt(1):o[f-1]+a.charAt(1):t}l=o[u-1]}return void 0===l?"":l})}});var AnimationState,non="​…᠎",forcedStringTrimMethod=function(e){return fails(function(){return!!whitespaces[e]()||non[e]()!=non||whitespaces[e].name!==e})},FORCED$3=forcedStringTrimMethod("trim");function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}_export({target:"String",proto:!0,forced:FORCED$3},{trim:function(){return stringTrim(this,3)}}),function(e){e[e.None=0]="None",e[e.Auto=1]="Auto",e[e.Zero=2]="Zero"}(AnimationState||(AnimationState={}));var defaultOptions={duration:300,timing:"ease"},Animator=function(){function e(t){_classCallCheck(this,e),this.state=AnimationState.None,this.orgTransition="",this.el=t,this.el.addEventListener("transitionend",this)}return _createClass(e,[{key:"autoHeight",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:defaultOptions,r=t.duration,n=t.timing;return new Promise(function(t){var o=e.el,i=getComputedStyle(o);r=r||defaultOptions.duration,e.orgTransition=i.transition;var a=[e.orgTransition,"height ".concat(r,"ms ").concat(n||defaultOptions.timing).trim()].filter(function(e){return e}).join(", ");e.state=AnimationState.Auto,o.style.transition=a,o.style.height=i.height;var c="".concat(o.scrollHeight,"px");requestAnimationFrame(function(){return o.style.height=c});var s=performance.now();requestAnimationFrame(function e(){var n=getComputedStyle(o).height;performance.now()-s<r&&n!==c?requestAnimationFrame(e):t(n?parseInt(n.replace(/px/,""),10):0)})})}},{key:"zeroHeight",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:defaultOptions,r=t.duration,n=t.timing;return new Promise(function(t){var o=e.el,i=getComputedStyle(o);e.orgTransition=i.transition;var a=[e.orgTransition,"height ".concat(r||defaultOptions.duration,"ms ").concat(n||defaultOptions.timing).trim()].filter(function(e){return e}).join(", ");e.state=AnimationState.Zero,o.style.transition=a,o.style.height=i.height,requestAnimationFrame(function(){return o.style.height="0"}),requestAnimationFrame(function e(){var r=getComputedStyle(o).height;(r=r?parseInt(r.replace(/px/,""),10):0)>0?requestAnimationFrame(e):t()})})}},{key:"handleEvent",value:function(e){switch(e.type){case"transitionend":this.onTransitionEnded()}}},{key:"onTransitionEnded",value:function(){this.state===AnimationState.Auto&&(this.el.style.height="auto"),this.el.style.transition=this.orgTransition,this.orgTransition="",this.state=AnimationState.None}}]),e}(),autoHeight=function(e,t){return new Animator(e).autoHeight(t)},zeroHeight=function(e,t){return new Animator(e).zeroHeight(t)};exports.HeightAnimator=Animator,exports.autoHeight=autoHeight,exports.zeroHeight=zeroHeight;