UNPKG

storybook-prebuilt

Version:

A prebuilt storybook version for web components

3 lines (2 loc) 14.7 kB
function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}import{c as createCommonjsModule,u as unwrapExports}from"./storybook-prebuilt-3ba63d3f.js";import{r as require$$25}from"./storybook-prebuilt-c5081207.js";import{i as isObject}from"./storybook-prebuilt-6918c481.js";import{r as require$$0,i as isRegex}from"./storybook-prebuilt-4e5e6cbb.js";import{l as get}from"./storybook-prebuilt-8f2fc776.js";var runtime_1=createCommonjsModule((function(t){var e=function(t){var e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function u(t,e,r,n){var o=e&&e.prototype instanceof l?e:l,i=Object.create(o.prototype),a=new O(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return j()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=g(a,r);if(u){if(u===s)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=c(t,e,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===s)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(t,r,a),i}function c(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var s={};function l(){}function f(){}function p(){}var y={};y[o]=function(){return this};var v=Object.getPrototypeOf,h=v&&v(v(x([])));h&&h!==e&&r.call(h,o)&&(y=h);var d=p.prototype=l.prototype=Object.create(y);function _(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function m(t){var e;this._invoke=function(n,o){function i(){return new Promise((function(e,i){!function e(n,o,i,a){var u=c(t[n],t,o);if("throw"!==u.type){var s=u.arg,l=s.value;return l&&"object"===_typeof(l)&&r.call(l,"__await")?Promise.resolve(l.__await).then((function(t){e("next",t,i,a)}),(function(t){e("throw",t,i,a)})):Promise.resolve(l).then((function(t){s.value=t,i(s)}),(function(t){return e("throw",t,i,a)}))}a(u.arg)}(n,o,e,i)}))}return e=e?e.then(i,i):i()}}function g(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,g(t,e),"throw"===e.method))return s;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var n=c(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,s;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,s):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,s)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function x(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:j}}function j(){return{value:void 0,done:!0}}return f.prototype=d.constructor=p,p.constructor=f,p[a]=f.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a in t||(t[a]="GeneratorFunction")),t.prototype=Object.create(d),t},t.awrap=function(t){return{__await:t}},_(m.prototype),m.prototype[i]=function(){return this},t.AsyncIterator=m,t.async=function(e,r,n,o){var i=new m(u(e,r,n,o));return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},_(d),d[a]="Generator",d[o]=function(){return this},d.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=x,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,s):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),s},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),w(r),s}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;w(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:x(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),s}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}})),isFunction_1=isFunction,toString=Object.prototype.toString;function isFunction(t){var e=toString.call(t);return"[object Function]"===e||"function"==typeof t&&"[object RegExp]"!==e||"undefined"!=typeof window&&(t===window.setTimeout||t===window.alert||t===window.confirm||t===window.prompt)}var isSymbol=createCommonjsModule((function(t){var e=Object.prototype.toString;if(require$$0()){var r=Symbol.prototype.toString,n=/^Symbol\(.*\)$/;t.exports=function(t){if("symbol"===_typeof(t))return!0;if("[object Symbol]"!==e.call(t))return!1;try{return function(t){return"symbol"===_typeof(t.valueOf())&&n.test(r.call(t))}(t)}catch(t){return!1}}}else t.exports=function(t){return!1}})),dist=createCommonjsModule((function(module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.parse=exports.stringify=exports.isJSON=exports.reviver=exports.replacer=void 0;var _isRegex=_interopRequireDefault(isRegex),_isFunction=_interopRequireDefault(isFunction_1),_isSymbol=_interopRequireDefault(isSymbol),_isobject=_interopRequireDefault(isObject),_get=_interopRequireDefault(get),_memoizerific=_interopRequireDefault(require$$25);function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function ownKeys(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(r),!0).forEach((function(e){_defineProperty(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function _defineProperty(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function _slicedToArray(t,e){return _arrayWithHoles(t)||_iterableToArrayLimit(t,e)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function _iterableToArrayLimit(t,e){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t)){var r=[],n=!0,o=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(n=(a=u.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}return r}}function _arrayWithHoles(t){if(Array.isArray(t))return t}var isObject$1=_isobject.default,removeCodeComments=function(t){var e=null,r=!1,n=!1,o=!1,i="";if(t.indexOf("//")>=0||t.indexOf("/*")>=0)for(var a=0;a<t.length;a+=1)e||r||n||o?(e&&(t[a]===e&&"\\"!==t[a-1]||"\n"===t[a]&&"`"!==e)&&(e=null),o&&("/"===t[a]&&"\\"!==t[a-1]||"\n"===t[a])&&(o=!1),r&&"/"===t[a-1]&&"*"===t[a-2]&&(r=!1),n&&"\n"===t[a]&&(n=!1)):'"'===t[a]||"'"===t[a]||"`"===t[a]?e=t[a]:"/"===t[a]&&"*"===t[a+1]?r=!0:"/"===t[a]&&"/"===t[a+1]?n=!0:"/"===t[a]&&"/"!==t[a+1]&&(o=!0),r||n||(i+=t[a]);else i=t;return i},cleanCode=(0,_memoizerific.default)(1e4)((function(t){return removeCodeComments(t).replace(/\n\s*/g,"").trim()})),convertShorthandMethods=function(t,e){var r=e.slice(0,e.indexOf("{")),n=e.slice(e.indexOf("{"));if(r.includes("=>"))return e;if(r.includes("function"))return e;var o=r;return(o=o.replace(t,"function"))+n},dateFormat=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{3})?Z$/,replacer=function(t){var e,r,n;return function(o,i){try{if(""===o)return n=["root"],e=[{keys:"root",value:i}],r=[],i;for(;r.length&&this!==r[0];)r.shift(),n.pop();if((0,_isRegex.default)(i)){if(!t.allowRegExp)return;return"_regexp_".concat(i.flags,"|").concat(i.source)}if((0,_isFunction.default)(i)){if(!t.allowFunction)return;var a=i.name,u=i.toString();return u.match(/(\[native code\]|WEBPACK_IMPORTED_MODULE|__webpack_exports__|__webpack_require__)/)?"_function_".concat(a,"|").concat(function(){}.toString()):"_function_".concat(a,"|").concat(cleanCode(convertShorthandMethods(o,u)))}if((0,_isSymbol.default)(i)){if(!t.allowSymbol)return;return"_symbol_".concat(i.toString().slice(7,-1))}if("string"==typeof i&&dateFormat.test(i)){if(!t.allowDate)return;return"_date_".concat(i)}if(void 0===i){if(!t.allowUndefined)return;return"_undefined_"}if("number"==typeof i)return i===-1/0?"_-Infinity_":i===1/0?"_Infinity_":Number.isNaN(i)?"_NaN_":i;if("string"==typeof i)return i;if("boolean"==typeof i)return i;if(r.length>=t.maxDepth)return Array.isArray(i)?"[Array(".concat(i.length,")]"):"[Object]";var c=e.find((function(t){return t.value===i}));if(!c){if(i&&isObject$1(i)&&i.constructor&&i.constructor.name&&"Object"!==i.constructor.name){if(!t.allowClass)return;try{Object.assign(i,{"_constructor-name_":i.constructor.name})}catch(t){}}return n.push(o),r.unshift(i),e.push({keys:n.join("."),value:i}),i}return"_duplicate_".concat(c.keys)}catch(t){return}}};exports.replacer=replacer;var reviver=function reviver(options){var refs=[],root;return function revive(key,value){if(""===key&&(root=value,refs.forEach((function(t){var e=t.target,r=t.container,n=t.replacement;r[e]="root"===n?root:(0,_get.default)(root,n.replace("root.",""))}))),"_constructor-name_"===key)return value;if(isObject$1(value)&&value["_constructor-name_"]){var name=value["_constructor-name_"];if("Object"!==name){var Fn=new Function("return function ".concat(name,"(){}"))();Object.setPrototypeOf(value,new Fn)}return delete value["_constructor-name_"],value}if("string"==typeof value&&value.startsWith("_function_")){var _ref2=value.match(/_function_([^|]*)\|(.*)/)||[],_ref3=_slicedToArray(_ref2,3),_name=_ref3[1],source=_ref3[2];if(!options.lazyEval)return eval("(".concat(source,")"));var result=function result(){var f=eval("(".concat(source,")"));return f.apply(void 0,arguments)};return Object.defineProperty(result,"toString",{value:function(){return source}}),Object.defineProperty(result,"name",{value:_name}),result}if("string"==typeof value&&value.startsWith("_regexp_")){var _ref4=value.match(/_regexp_([^|]*)\|(.*)/)||[],_ref5=_slicedToArray(_ref4,3),flags=_ref5[1],_source=_ref5[2];return new RegExp(_source,flags)}return"string"==typeof value&&value.startsWith("_date_")?new Date(value.replace("_date_","")):"string"==typeof value&&value.startsWith("_duplicate_")?(refs.push({target:key,container:this,replacement:value.replace("_duplicate_","")}),null):"string"==typeof value&&value.startsWith("_symbol_")?Symbol(value.replace("_symbol_","")):"string"==typeof value&&"_-Infinity_"===value?-1/0:"string"==typeof value&&"_Infinity_"===value?1/0:"string"==typeof value&&"_NaN_"===value?NaN:value}};exports.reviver=reviver;var isJSON=function(t){return t.match(/^[\[\{\"\}].*[\]\}\"]$/)};exports.isJSON=isJSON;var defaultOptions={maxDepth:10,space:void 0,allowFunction:!0,allowRegExp:!0,allowDate:!0,allowClass:!0,allowUndefined:!0,allowSymbol:!0,lazyEval:!0},stringify=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=_objectSpread({},defaultOptions,{},e);return JSON.stringify(t,replacer(r),e.space)};exports.stringify=stringify;var mutator=function(){var t=[];return function e(r){isObject$1(r)&&Object.entries(r).forEach((function(n){var o=_slicedToArray(n,2),i=o[0],a=o[1];"_undefined_"===a?r[i]=void 0:t.includes(a)||(t.push(a),e(a))})),Array.isArray(r)&&r.forEach((function(r){t.push(r),e(r)}))}},parse=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=_objectSpread({},defaultOptions,{},e),n=JSON.parse(t,reviver(r));return mutator()(n),n};exports.parse=parse}));unwrapExports(dist);var dist_1=dist.parse,dist_2=dist.stringify,dist_3=dist.isJSON,dist_4=dist.reviver,dist_5=dist.replacer;export{dist as _}; //# sourceMappingURL=storybook-prebuilt-da3f7036.js.map