ucsd-cse112/team13

View on GitHub
dist/core-link.js

Summary

Maintainability
A
0 mins
Test Coverage
!function(t,e,n,r,o,i){if("customElements"in t)i();else{if(t.WC_ENV)return void t.WC_ENV.then(i);var a=function(t,n){var r=e.createElement("script");r.type="text/javascript",r.readyState?r.onreadystatechange=function(){"loaded"!=r.readyState&&"complete"!=r.readyState||(r.onreadystatechange=null,n())}:r.onload=function(){n()},r.src=t,e.getElementsByTagName("head")[0].appendChild(r)},u=t.WC_ENV=(p=function(t){try{t()}catch(t){console.error(t)}},(s=[]).isDone=!1,s.exec=function(){s.splice(0).forEach(p)},s.then=function(t){return s.isDone?t():s.push(t),s},s);u.then(i);var c=t.WC_POLYFILL||"//cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/2.0.2/webcomponents-bundle.js",l=0,f=function(){--l||(u.isDone=!0,u.exec())};"Reflect"in t||t.SKIP_ES_POLYFILL?(l++,a(c,f)):(l++,a(t.ES_POLYFILL||"//cdnjs.cloudflare.com/ajax/libs/core-js/2.5.3/core.min.js",function(){a(c,f)}),function(){try{new Function("function* test() {}")()}catch(t){return!1}return!0}()||t.regeneratorRuntime||(l++,a(window.GE_POLYFILL||r,f)))}var s,p}(window,document,0,"//unpkg.com/regenerator-runtime@0.12.1/runtime.js",0,function(){!function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=15)}([function(t,e,n){"use strict";function r(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{mode:"open"},r=t.attachShadow(n);return e&&r.appendChild(e.content.cloneNode(!0)),r}var o=Symbol("stopPropagateUpdate"),i=Symbol("ATTRIBUTE_SIDE"),a=Symbol("PROPERTY_SIDE");function u(t,e){switch(t||String){case Object:return JSON.parse(e);case Boolean:return null!==e||void 0!==e;default:return"function"==typeof t?t(e):e}}function c(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(n.type!==Boolean){var o=function(t,e){switch(t||String){case Object:return JSON.stringify(e);default:return e}}(n.type,r);t.setAttribute(e,o)}else r?t.setAttribute(e,""):t.removeAttribute(e)}function l(t,e,n,r,u,l){t[o]||(t[o]=!0,l===i?t[e]=u:l===a&&t.isConnected&&n.reflect&&c(t,n.attribute,n,u),"function"==typeof t.propertyChangedCallback&&t.propertyChangedCallback(e,r,u),t[o]=!1)}function f(t,e){var n="__".concat(t);return{get:function(){var t;return t=e.attributeOnly?function(t,e,n){var r=n.type;return r===Boolean?t.hasAttribute(e):u(r,t.getAttribute(e))}(this,e.attribute,e):this[n],e.get&&(t=e.get.call(this,t)),t},set:function(r){var o=this[t];e.set&&(r=e.set.call(this,r,o)),o!==r&&(e.attributeOnly?c(this,e.attribute,e,r):this[n]=r,l(this,t,e,o,r,a))},configurable:!0,enumerable:!0}}function s(t,e,n){var r=f(e,n);if(t.hasOwnProperty(e)){var o=t[e];delete t[e],r.set.call(t,o)}var i=Object.getOwnPropertyDescriptor(t,e);if(i){if("function"==typeof i.get)throw new Error("Found conflicting getter for instance.");if("function"==typeof i.set)throw new Error("Found conflicting setter for instance.")}Object.defineProperty(t,e,r)}function p(t){return(p="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)}function y(t){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function b(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function d(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function h(t,e,n){return e&&d(t.prototype,e),n&&d(t,n),t}function v(t,e){return(v=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function m(){return Reflect.construct(HTMLElement,[],this.__proto__.constructor)}function g(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}Object.setPrototypeOf(m.prototype,HTMLElement.prototype),Object.setPrototypeOf(m,HTMLElement);var w=Symbol("classProperties");function O(t){return t.hasOwnProperty(w)}function S(t,e,n){void 0===n.attribute&&(n.attribute=function(t){return t.replace(/([A-Z])/g,"-$1").toLowerCase()}(e));var r=t[w];r.options.set(e,n),n.attribute&&r.attributes.set(n.attribute,e)}function j(t){if(!O(t)&&(function(t){var e,n,r=Object.getPrototypeOf(t);if("function"==typeof r.buildProperties&&r.buildProperties(),r&&O(r)){var o=r[w];e=new Map(o.options),n=new Map(o.attributes)}else e=new Map,n=new Map;t[w]={options:e,attributes:n}}(t),t.hasOwnProperty("properties"))){var e=!0,n=!1,r=void 0;try{for(var o,i=Object.getOwnPropertyNames(t.properties)[Symbol.iterator]();!(e=(o=i.next()).done);e=!0){var a=o.value;S(t,a,t.properties[a])}}catch(t){n=!0,r=t}finally{try{e||null==i.return||i.return()}finally{if(n)throw r}}}}var _=function(t){function e(){var t,n,o,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),n=this,t=!(o=y(e).call(this))||"object"!==p(o)&&"function"!=typeof o?b(n):o,r(b(t),i),function(t){var e=t.constructor[w],n=!0,r=!1,o=void 0;try{for(var i,a=e.options.entries()[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var u=g(i.value,2);s(t,u[0],u[1])}}catch(t){r=!0,o=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}}(b(t)),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&v(t,e)}(e,m),h(e,null,[{key:"buildProperties",value:function(){j(this)}},{key:"observedAttributes",get:function(){return this.buildProperties(),Array.from(this[w].attributes.keys())}}]),h(e,[{key:"attributeChangedCallback",value:function(t,e,n){!function(t,e,n,r){if(n!==r){var o=t.constructor[w];if(o.attributes.has(e)){var a=o.attributes.get(e),c=o.options.get(a);l(t,a,c,c.attributeOnly?u(c.type,n):t[a],u(c.type,r),i)}}}(this,t,e,n)}},{key:"connectedCallback",value:function(){}},{key:"disconnectedCallback",value:function(){}},{key:"adoptedCallback",value:function(){}},{key:"propertyChangedCallback",value:function(){}}]),e}();_.templateNode=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n="<template><style>".concat(e.toString(),"</style>").concat(t,"</template>"),r=document.createRange().createContextualFragment(n),o=r.firstElementChild;return document.head.appendChild(r),o},_.customTag=function(t,e){window.customElements.get(t)||window.customElements.define(t,e)},_.shadowRoot=r;e.a=_},function(t,e,n){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n=function(t,e){var n=t[1]||"",r=t[3];if(!r)return n;if(e&&"function"==typeof btoa){var o=(a=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),i=r.sources.map(function(t){return"/*# sourceURL="+r.sourceRoot+t+" */"});return[n].concat(i).concat([o]).join("\n")}var a;return[n].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n}).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},o=0;o<this.length;o++){var i=this[o][0];null!=i&&(r[i]=!0)}for(o=0;o<t.length;o++){var a=t[o];null!=a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),e.push(a))}},e}},,,,,,,,function(t,e){t.exports="<a id=link> <slot id=link-content></slot> </a>"},function(t,e,n){(t.exports=n(1)(!1)).push([t.i,"a {\n  text-decoration: none;\n}\n\na:hover {\n    filter: brightness(1.2);\n}\n\na:visited {\n    filter: brightness(0.5);\n}\n\n:host([underline]) a {\n  text-decoration: underline;\n}\n\n:host([type=primary]) a {\n    color: var(--primary, blue);\n}\n\n:host([type=success]) a {\n    color: var(--success, lime);\n}\n\n:host([type=warning]) a {\n    color: var(--warning, orange);\n}\n\n:host([type=danger]) a {\n    color: var(--danger, tomato);\n}\n\n:host([type=info]) a {\n    color: var(--info, slategray);\n}",""])},,,,,function(t,e,n){"use strict";n.r(e);var r=n(0),o=n(9),i=n.n(o),a=n(10),u=n.n(a);function c(t){return(c="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)}function l(t,e){return!e||"object"!==c(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function p(t,e,n){return e&&s(t.prototype,e),n&&s(t,n),t}function y(t,e){return(y=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var b=r.a.templateNode(i.a,u.a),d=function(t){function e(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=l(this,f(e).call(this,b))).linkElement=t.shadowRoot.querySelector("#link"),t.linkSlot=t.shadowRoot.querySelector("#link-content"),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&y(t,e)}(e,r["a"]),p(e,null,[{key:"properties",get:function(){return{href:{type:String},type:{type:String},disabled:{type:Boolean},underline:{type:Boolean}}}}]),p(e,[{key:"propertyChangedCallback",value:function(t,e,n){switch(t){case"href":this.linkElement.href=n;break;case"disabled":this.linkElement.disabled=n}}}]),e}();r.a.customTag("core-link",d),e.default=d}])});