text: !function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("lit-element/lit-element.js"),require("lit-html/directives/unsafe-html.js"),require("@polymer/paper-input/paper-input.js")):"function"==typeof define&&define.amd?define(["exports","lit-element/lit-element.js","lit-html/directives/unsafe-html.js","@polymer/paper-input/paper-input.js"],n):n((t=t||self).PunnettSquare={},t.litElement_js,t.unsafeHtml_js)}(this,function(t,n,e){"use strict";function r(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,n,e){return n&&r(t.prototype,n),e&&r(t,e),t}function u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function i(t,n){return(i=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function o(t,n){return!n||"object"!=typeof n&&"function"!=typeof n?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):n}function l(t){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var e,r=u(t);if(n){var a=u(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return o(this,e)}}function c(t,n){return n||(n=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(n)}}))}function f(t){return function(t){if(Array.isArray(t))return s(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||p(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(t,n){if(t){if("string"==typeof t)return s(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?s(t,n):void 0}}function s(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}function d(){var t=c([" "," "]);return d=function(){return t},t}function v(){var t=c([" "," "]);return v=function(){return t},t}function y(){var t=c(["\n                            <td>\n                              ","\n                            </td>\n                          "]);return y=function(){return t},t}function h(){var t=c(["\n                  <tr>\n                    <th>","</th>\n                    ","\n                  </tr>\n                "]);return h=function(){return t},t}function b(){var t=c([" <th>","</th> "]);return b=function(){return t},t}function m(){var t=c([" "," "]);return m=function(){return t},t}function g(){var t=c([" "," "]);return g=function(){return t},t}function q(){var t=c(['\n                <paper-input\n                  value="','"\n                  @value-changed=',"\n                ></paper-input>\n              "]);return q=function(){return t},t}function _(){var t=c([" "," "]);return _=function(){return t},t}function j(){var t=c(['\n                <paper-input\n                  value="','"\n                  @value-changed=',"\n                ></paper-input>\n              "]);return j=function(){return t},t}function w(){var t=c(['\n      <style>\n        :host {\n          display: block;\n          --punnett-square-table-border: 1px solid black;\n          --punnett-square-table-padding: 1em;\n          --punnett-square-input-font-size: 2em;\n          --punnett-square-input-text-align: center;\n        }\n\n        table {\n          border-collapse: var(--punnett-square-table-border-collapse, collapse);\n          width: var(--punnett-square-table-width, 100%);\n          border: var(--punnett-square-table-border);\n        }\n\n        th {\n          border: var(--punnett-square-th-border, var(--punnett-square-table-border));\n          padding: var(--punnett-square-th-padding, var(--punnett-square-table-padding));\n        }\n\n        td {\n          border: var(--punnett-square-td-border, var(--punnett-square-table-border));\n          text-align: var(--punnett-square-table-text-align, center);\n          padding: var(--punnett-square-td-padding, var(--punnett-square-table-padding));\n        }\n\n        #inputs {\n          display: var(--punnett-square-inputs-display, flex);\n          align-items: var(--punnett-square-inputs-align-items, center);\n        }\n\n        .input {\n          font-size: var(--punnett-square-input-font-size);\n          text-align: var(--punnett-square-input-text-align);\n        }\n\n        paper-input {\n          --paper-input-container-input: {\n            font-size: var(--punnett-square-paper-input-font-size, --punnett-square-input-font-size);\n            text-align: var(--punnett-square-paper-input-text-align, --punnett-square-input-text-align);\n          }\n        }\n      </style>\n      <div id="inputs">\n        Variant1: <div class="input">','</div>\n        Variant2: <div class="input">',"</div>\n      </div>\n\n      <table>\n        <thead>\n          <tr>\n            <th></th>\n            ","\n          </tr>\n        <tbody>\n          ","\n        </tbody>\n        </thead>\n      </table>\n    "]);return w=function(){return t},t}var O=function(t){!function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&i(t,n)}(u,n.LitElement);var r=l(u);function u(){var t;!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,u),(t=r.call(this)).variant1="",t.variant2="",t.editable=!1;var n,e=[],a=function(t,n){var e;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(e=p(t))||n&&t&&"number"==typeof t.length){e&&(t=e);var r=0,a=function(){};return{s:a,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,i=!0,o=!1;return{s:function(){e=t[Symbol.iterator]()},n:function(){var t=e.next();return i=t.done,t},e:function(t){o=!0,u=t},f:function(){try{i||null==e.return||e.return()}finally{if(o)throw u}}}}(t.querySelectorAll("[data-variant]"));try{for(a.s();!(n=a.n()).done;){var i=n.value,o=i.getAttribute("data-variant"),l={variant:o=t.__sortVariant(o),ref:i};e=[].concat(f(e),[l])}}catch(t){a.e(t)}finally{a.f()}return t.__results=e,t}return a(u,null,[{key:"tag",get:function(){return"punnett-square"}},{key:"properties",get:function(){return{variant1:{type:String},variant2:{type:String},editable:{type:Boolean},__results:{type:Array}}}}]),a(u,[{key:"__sortVariant",value:function(t){return t.split("").sort().join("")}},{key:"__ensureArray",value:function(t){return("string"==typeof t?t.split(",").map(function(t){return t.trim()}):[]).map(function(t){return"string"==typeof t?t.split("").map(function(t){return t.trim()}):[]})}},{key:"render",value:function(){var t=this,e=this.__ensureArray(this.variant1),r=this.__ensureArray(this.variant2),a=e[0].length<1&&r[0].length<1;return console.log("asdf:",a),n.html(w(),this.editable?n.html(j(),this.variant1,function(n){return t.variant1=n.detail.value}):n.html(_(),this.variant1),this.editable?n.html(q(),this.variant2,function(n){return t.variant2=n.detail.value}):n.html(g(),this.variant2),e.map(function(t){return n.html(m(),t.map(function(t){return n.html(b(),t)}))}),r.map(function(r,a){return r.map(function(r){return n.html(h(),r,e.map(function(e){return e.map(function(e){return n.html(y(),t.renderVariant("".concat(e).concat(r)))})}))})}))}},{key:"renderVariant",value:function(t){var r=this.__sortVariant(t),a=this.__results.find(function(t){return t.variant===r});return a?n.html(v(),e.unsafeHTML(a.ref.outerHTML)):n.html(d(),r)}}]),u}();customElements.define(O.tag,O),t.PunnettSquare=O,Object.defineProperty(t,"__esModule",{value:!0})});
  