import{__exports as r}from"../../../_virtual/es.promise.finally.mjs";import{__require as e}from"../internals/export.mjs";import{__require as i}from"../internals/is-pure.mjs";import{__require as t}from"../internals/promise-native-constructor.mjs";import{__require as n}from"../internals/fails.mjs";import{__require as o}from"../internals/get-built-in.mjs";import{__require as s}from"../internals/is-callable.mjs";import{__require as a}from"../internals/species-constructor.mjs";import{__require as m}from"../internals/promise-resolve.mjs";import{__require as l}from"../internals/define-built-in.mjs";var u;function f(){if(u)return r;u=1;var f=e(),p=i(),_=t(),c=n(),j=o(),q=s(),y=a(),h=m(),v=l(),b=_&&_.prototype;if(f({target:"Promise",proto:!0,real:!0,forced:!!_&&c(function(){b.finally.call({then:function(){}},function(){})})},{finally:function(r){var e=y(this,j("Promise")),i=q(r);return this.then(i?function(i){return h(e,r()).then(function(){return i})}:r,i?function(i){return h(e,r()).then(function(){throw i})}:r)}}),!p&&q(_)){var x=j("Promise").prototype.finally;b.finally!==x&&v(b,"finally",x,{unsafe:!0})}return r}export{f as __require};