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AAC,AAC/C,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC,AACf,IAAK,IAAI,CAAC,CAAC,IAAI,CAAC,MAAM,CAAE,CAAC,EAAE,GAAI,CAC9B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CACvE,AAED,IAAI,EAAE,CAAG,IAAI,CAAC,qBAAqB,CAAC,AACpC,GAAI,EAAE,CAAE,CACP,IAAI,CAAC,qBAAqB,GAAG,EAAE,CAAC,AAChC,IAAK,IAAI,CAAC,CAAC,CAAC,CAAE,CAAC,GAAC,EAAE,CAAC,MAAM,CAAE,CAAC,EAAE,GAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAA,CACxC,AAED,OAAO,GAAG,CAAC,CACX,QA3DI,SAAS,YA9DK,SAAS,UA6HpB,SAAS,iCAAE,MAAM,WA7HjB,MAAM,SA6Ha,WAAW,GAAX,WAAW,SAAE,aAAa,GAAb,aAAa,SAAE,WAAW,GAAX,WAAW,SAAE,SAAS,GAAT,SAAS,sBAC/D,CAAE,SAAS,sBAAA,CAAE,MAAM,SA9HzB,MAAM,AA8HmB,CAAE,WAAW,CAAX,WAAW,CAAE,aAAa,CAAb,aAAa,CAAE,WAAW,CAAX,WAAW,CAAE,SAAS,CAAT,SAAS,CAAE","file":"preact-compat.js","sourcesContent":["import PropTypes from 'proptypes';\nimport { render, h, Component as PreactComponent, hooks } from 'preact';\n\n\nconst DEV = !process || !process.env || process.env.NODE_ENV!=='production';\n\n\nlet createElement = (...args) => {\n\tlet vnode = h(...args);\n\tapplyClassName(vnode);\n\treturn vnode;\n};\n\n\nlet applyClassName = ({ attributes }) => {\n\tif (!attributes) return;\n\tlet cl = attributes.className || attributes.class;\n\tif (cl) attributes.className = cl;\n};\n\n\nlet extend = (base, ...objs) => {\n\tfor (let i=0; i component.base || component;\n\n\nfunction F(){}\n\nlet createClass = obj => {\n\tlet cl = function() {\n\t\tComponent.call(this);\n\t\textend(this, obj);\n\t\tbindAll(this);\n\t};\n\tF.prototype = Component.prototype;\n\tcl.prototype = new F();\n\tcl.prototype.constructor = cl;\n\treturn cl;\n};\n\nlet bindAll = ctx => {\n\tfor (let i in ctx) {\n\t\tlet v = ctx[i];\n\t\tif (typeof v==='function' && !v.__bound) {\n\t\t\t(ctx[i] = v.bind(ctx)).__bound = true;\n\t\t}\n\t}\n};\n\n\nclass Component extends PreactComponent {\n\tconstructor(...args) {\n\t\tsuper(...args);\n\t\tthis._stateUpdateCallbacks = [];\n\t}\n\n\tgetDOMNode() {\n\t\treturn this.base;\n\t}\n\n\tsetState(state, callback) {\n\t\tsuper.setState(state);\n\t\tif (typeof callback==='function') {\n\t\t\tthis._stateUpdateCallbacks.push(callback);\n\t\t\tcallback();\n\t\t}\n\t}\n\n\tcomponentWillReceiveProps(props) {\n\t\tlet defaultProps = this.defaultProps || this.constructor.defaultProps;\n\t\tif (defaultProps) {\n\t\t\tprops = extend({}, defaultProps, props);\n\t\t}\n\n\t\t// add proptype checking\n\t\tif (DEV) {\n\t\t\tlet propTypes = this.propTypes || this.constructor.propTypes;\n\t\t\tif (propTypes) {\n\t\t\t\tfor (let prop in propTypes) {\n\t\t\t\t\tif (propTypes.hasOwnProperty(prop)) {\n\t\t\t\t\t\tlet err = propTypes[prop](props, prop, this.constructor.name, 'prop');\n\t\t\t\t\t\tif (err) throw err;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t_render(...args) {\n\t\tlet ret = super._render(...args);\n\n\t\tif (this.props.ref && this.base.getAttribute('ref')!==this.props.ref) {\n\t\t\tthis.base.setAttribute('ref', this.props.ref);\n\t\t}\n\n\t\t// add refs\n\t\tlet refs = this.base.querySelectorAll('[ref]');\n\t\tthis.refs = {};\n\t\tfor (let i=refs.length; i--; ) {\n\t\t\tthis.refs[refs[i].getAttribute('ref')] = refs[i]._component || refs[i];\n\t\t}\n\n\t\tlet cb = this._stateUpdateCallbacks;\n\t\tif (cb) {\n\t\t\tthis._stateUpdateCallbacks = [];\n\t\t\tfor (let i=0; i