1 line
74 KiB
Plaintext
1 line
74 KiB
Plaintext
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./node_modules/preact/dist/preact.esm.js","webpack:///./calendar-preact.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","options","stack","EMPTY_CHILDREN","h","nodeName","attributes","lastSimple","child","simple","children","arguments","length","push","pop","undefined","String","vnode","extend","obj","props","defer","Promise","resolve","then","setTimeout","cloneElement","slice","IS_NON_DIMENSIONAL","items","enqueueRender","component","_dirty","debounceRendering","rerender","list","renderComponent","isSameNodeType","node","hydrating","splitText","_componentConstructor","isNamedNode","normalizedNodeName","toLowerCase","getNodeProps","defaultProps","removeNode","parentNode","removeChild","setAccessor","old","isSvg","style","cssText","_typeof","test","innerHTML","__html","useCapture","replace","substring","addEventListener","eventProxy","removeEventListener","_listeners","e","setProperty","removeAttribute","removeAttributeNS","setAttributeNS","setAttribute","className","this","type","event","mounts","diffLevel","isSvgMode","flushMounts","afterMount","componentDidMount","diff","dom","context","mountAll","parent","componentRoot","ownerSVGElement","ret","idiff","appendChild","out","prevSvgMode","_component","nodeValue","document","createTextNode","replaceChild","recollectNodeTree","vnodeName","originalComponent","oldDom","isDirectOwner","isOwner","_parentComponent","constructor","setComponentProps","base","unmountComponent","createComponent","nextBase","buildComponentFromVNode","createElementNS","createElement","createNode","firstChild","fc","vchildren","a","nextSibling","isHydrating","j","f","vchild","originalChildren","childNodes","keyed","keyedLen","min","len","childrenLen","vlen","_child","__key","trim","insertBefore","innerDiffNode","dangerouslySetInnerHTML","attrs","diffAttributes","unmountOnly","ref","removeChildren","lastChild","next","previousSibling","components","Ctor","inst","render","Component","doRender","splice","state","opts","_disable","__ref","componentWillMount","componentWillReceiveProps","prevContext","prevProps","syncComponentUpdates","isChild","rendered","cbase","previousProps","previousState","prevState","previousContext","isUpdate","initialBase","initialChildComponent","skip","shouldComponentUpdate","componentWillUpdate","getChildContext","toUnmount","childComponent","childProps","baseParent","componentRef","unshift","componentDidUpdate","afterUpdate","_renderCallbacks","beforeUnmount","componentWillUnmount","inner","collectComponent","merge","setState","callback","forceUpdate","preact","Calendar","_preact2","default","class","display","renderMonths","renderYears","renderDays","onclick","hideCalendar","close_label","input","div","box","xy","elem","getBoundingClientRect","body","docElem","documentElement","scrollTop","window","pageYOffset","scrollLeft","pageXOffset","clientTop","clientLeft","top","left","Math","round","getOffsetRect","parseInt","offsetTop","offsetLeft","offsetParent","getOffsetSum","getOffset","height","clientHeight","offsetHeight","year","month","day","split","Number","Date","format","evt","createEvent","initEvent","dispatchEvent","fireEvent","onChangeProps","_this2","cur_y","today","getFullYear","cur_m","getMonth","sel_m","selected","colspan","href","showMonths","title","showYears","map","g","showDays","month_names","_this3","_ref","beg","sel_y","class_name","max","_this4","selectboxes","sunday","next_month","next_month_year","previous_month","previous_month_year","current_year","start_day","getDay","days_in_this_month","yea","all_diff","sel_day","getDate","onchange","target","_yearOptions","years","weekdays","weekdayIds","selectDate","date_in_input","selected_date","date_parts","isNaN","start","init","input_or_id","getElementById","ev","showCalendar","stopPropagation","cancelBubble","getElementsByTagName","addedListener"],"mappings":"aACA,IAAAA,KAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,IACAG,EAAAH,EACAI,GAAA,EACAH,YAUA,OANAI,EAAAL,GAAAM,KAAAJ,EAAAD,QAAAC,IAAAD,QAAAF,GAGAG,EAAAE,GAAA,EAGAF,EAAAD,QAKAF,EAAAQ,EAAAF,EAGAN,EAAAS,EAAAV,EAGAC,EAAAU,EAAA,SAAAR,EAAAS,EAAAC,GACAZ,EAAAa,EAAAX,EAAAS,IACAG,OAAAC,eAAAb,EAAAS,GAA0CK,YAAA,EAAAC,IAAAL,KAK1CZ,EAAAkB,EAAA,SAA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,IAElCA,GAILA,EAAY9O,iBAAiB,QAAS,SAASgP,GAE9C3G,EAAS4G,aAAaH,EAAa3S,oCAQpC,IAAKkM,EAASa,MAAQb,EAASa,IAAIhK,WACnC,CACC,IAAI+J,EAAM/G,SAASkB,cAAc,OAC5BiF,EAASa,MACbb,EAASa,IAAMD,GAChBA,EAAIvI,UAAY,eAChBuI,EAAIjJ,iBAAiB,YAAa,SAASgP,GAO1C,OALAA,EAAKA,GAAMtF,OAAO7I,OACXqO,gBACNF,EAAGE,kBAEHF,EAAGG,cAAe,GACZ,IAERjN,SAASkN,qBAAqB,QAAQ,GAAG1K,aAAauE,EAAK/G,SAASkN,qBAAqB,QAAQ,GAAG9L,YAC/F+E,EAASgH,gBAEbnN,SAASlC,iBAAiB,YAAa,WAAaqI,EAASS,iBAC7DT,EAASgH,eAAgB,aAjWhBhH,EAGLrJ,cACN2N,aAAc,SAAS,UAAU,OAAO,SAAS,MAAM,OAAO,OAAO,SAAS,WAAW,UAAU,SAAS,WAC5G5D,YAAa,UACbsF,UAAW,KAAK,KAAK,KAAK,KAAK,KAAK,KAAK,MACzCC,YAAa,MAAM,MAAM,MAAM,MAAM,MAAM,MAAM,OACjDlB,OAAQ,EACRD,aAAa,EACbiB,OAASjK,KAAM,GAAI8I,IAAK,IACxB7B,OAAQ,QAERS,MAAO,IAAIV,KACXyD,MAAO,QAyVTlF,OAAOrB,SAAWA","file":"./calendar-preact.min.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 2);\n","/** Virtual DOM Node */\nfunction VNode() {}\n\n/** Global options\n *\t@public\n *\t@namespace options {Object}\n */\nvar options = {\n\n\t/** If `true`, `prop` changes trigger synchronous component updates.\n *\t@name syncComponentUpdates\n *\t@type Boolean\n *\t@default true\n */\n\t//syncComponentUpdates: true,\n\n\t/** Processes all created VNodes.\n *\t@param {VNode} vnode\tA newly-created VNode to normalize/process\n */\n\t//vnode(vnode) { }\n\n\t/** Hook invoked after a component is mounted. */\n\t// afterMount(component) { }\n\n\t/** Hook invoked after the DOM is updated with a component's latest render. */\n\t// afterUpdate(component) { }\n\n\t/** Hook invoked immediately before a component is unmounted. */\n\t// beforeUnmount(component) { }\n};\n\nvar stack = [];\n\nvar EMPTY_CHILDREN = [];\n\n/**\n * JSX/hyperscript reviver.\n * @see http://jasonformat.com/wtf-is-jsx\n * Benchmarks: https://esbench.com/bench/57ee8f8e330ab09900a1a1a0\n *\n * Note: this is exported as both `h()` and `createElement()` for compatibility reasons.\n *\n * Creates a VNode (virtual DOM element). A tree of VNodes can be used as a lightweight representation\n * of the structure of a DOM tree. This structure can be realized by recursively comparing it against\n * the current _actual_ DOM structure, and applying only the differences.\n *\n * `h()`/`createElement()` accepts an element name, a list of attributes/props,\n * and optionally children to append to the element.\n *\n * @example The following DOM tree\n *\n * `<div id=\"foo\" name=\"bar\">Hello!</div>`\n *\n * can be constructed using this function as:\n *\n * `h('div', { id: 'foo', name : 'bar' }, 'Hello!');`\n *\n * @param {string} nodeName\tAn element name. Ex: `div`, `a`, `span`, etc.\n * @param {Object} attributes\tAny attributes/props to set on the created element.\n * @param rest\t\t\tAdditional arguments are taken to be children to append. Can be infinitely nested Arrays.\n *\n * @public\n */\nfunction h(nodeName, attributes) {\n\tvar children = EMPTY_CHILDREN,\n\t lastSimple,\n\t child,\n\t simple,\n\t i;\n\tfor (i = arguments.length; i-- > 2;) {\n\t\tstack.push(arguments[i]);\n\t}\n\tif (attributes && attributes.children != null) {\n\t\tif (!stack.length) stack.push(attributes.children);\n\t\tdelete attributes.children;\n\t}\n\twhile (stack.length) {\n\t\tif ((child = stack.pop()) && child.pop !== undefined) {\n\t\t\tfor (i = child.length; i--;) {\n\t\t\t\tstack.push(child[i]);\n\t\t\t}\n\t\t} else {\n\t\t\tif (typeof child === 'boolean') child = null;\n\n\t\t\tif (simple = typeof nodeName !== 'function') {\n\t\t\t\tif (child == null) child = '';else if (typeof child === 'number') child = String(child);else if (typeof child !== 'string') simple = false;\n\t\t\t}\n\n\t\t\tif (simple && lastSimple) {\n\t\t\t\tchildren[children.length - 1] += child;\n\t\t\t} else if (children === EMPTY_CHILDREN) {\n\t\t\t\tchildren = [child];\n\t\t\t} else {\n\t\t\t\tchildren.push(child);\n\t\t\t}\n\n\t\t\tlastSimple = simple;\n\t\t}\n\t}\n\n\tvar p = new VNode();\n\tp.nodeName = nodeName;\n\tp.children = children;\n\tp.attributes = attributes == null ? undefined : attributes;\n\tp.key = attributes == null ? undefined : attributes.key;\n\n\t// if a \"vnode hook\" is defined, pass every created VNode to it\n\tif (options.vnode !== undefined) options.vnode(p);\n\n\treturn p;\n}\n\n/**\n * Copy all properties from `props` onto `obj`.\n * @param {Object} obj\t\tObject onto which properties should be copied.\n * @param {Object} props\tObject from which to copy properties.\n * @returns obj\n * @private\n */\nfunction extend(obj, props) {\n for (var i in props) {\n obj[i] = props[i];\n }return obj;\n}\n\n/**\n * Call a function asynchronously, as soon as possible. Makes\n * use of HTML Promise to schedule the callback if available,\n * otherwise falling back to `setTimeout` (mainly for IE<11).\n *\n * @param {Function} callback\n */\nvar defer = typeof Promise == 'function' ? Promise.resolve().then.bind(Promise.resolve()) : setTimeout;\n\n/**\n * Clones the given VNode, optionally adding attributes/props and replacing its children.\n * @param {VNode} vnode\t\tThe virtual DOM element to clone\n * @param {Object} props\tAttributes/props to add when cloning\n * @param {VNode} rest\t\tAny additional arguments will be used as replacement children.\n */\nfunction cloneElement(vnode, props) {\n return h(vnode.nodeName, extend(extend({}, vnode.attributes), props), arguments.length > 2 ? [].slice.call(arguments, 2) : vnode.children);\n}\n\n// DOM properties that should NOT have \"px\" added when numeric\nvar IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i;\n\n/** Managed queue of dirty components to be re-rendered */\n\nvar items = [];\n\nfunction enqueueRender(component) {\n\tif (!component._dirty && (component._dirty = true) && items.push(component) == 1) {\n\t\t(options.debounceRendering || defer)(rerender);\n\t}\n}\n\nfunction rerender() {\n\tvar p,\n\t list = items;\n\titems = [];\n\twhile (p = list.pop()) {\n\t\tif (p._dirty) renderComponent(p);\n\t}\n}\n\n/**\n * Check if two nodes are equivalent.\n *\n * @param {Node} node\t\t\tDOM Node to compare\n * @param {VNode} vnode\t\t\tVirtual DOM node to compare\n * @param {boolean} [hydrating=false]\tIf true, ignores component constructors when comparing.\n * @private\n */\nfunction isSameNodeType(node, vnode, hydrating) {\n if (typeof vnode === 'string' || typeof vnode === 'number') {\n return node.splitText !== undefined;\n }\n if (typeof vnode.nodeName === 'string') {\n return !node._componentConstructor && isNamedNode(node, vnode.nodeName);\n }\n return hydrating || node._componentConstructor === vnode.nodeName;\n}\n\n/**\n * Check if an Element has a given nodeName, case-insensitively.\n *\n * @param {Element} node\tA DOM Element to inspect the name of.\n * @param {String} nodeName\tUnnormalized name to compare against.\n */\nfunction isNamedNode(node, nodeName) {\n return node.normalizedNodeName === nodeName || node.nodeName.toLowerCase() === nodeName.toLowerCase();\n}\n\n/**\n * Reconstruct Component-style `props` from a VNode.\n * Ensures default/fallback values from `defaultProps`:\n * Own-properties of `defaultProps` not present in `vnode.attributes` are added.\n *\n * @param {VNode} vnode\n * @returns {Object} props\n */\nfunction getNodeProps(vnode) {\n var props = extend({}, vnode.attributes);\n props.children = vnode.children;\n\n var defaultProps = vnode.nodeName.defaultProps;\n if (defaultProps !== undefined) {\n for (var i in defaultProps) {\n if (props[i] === undefined) {\n props[i] = defaultProps[i];\n }\n }\n }\n\n return props;\n}\n\n/** Create an element with the given nodeName.\n *\t@param {String} nodeName\n *\t@param {Boolean} [isSvg=false]\tIf `true`, creates an element within the SVG namespace.\n *\t@returns {Element} node\n */\nfunction createNode(nodeName, isSvg) {\n\tvar node = isSvg ? document.createElementNS('http://www.w3.org/2000/svg', nodeName) : document.createElement(nodeName);\n\tnode.normalizedNodeName = nodeName;\n\treturn node;\n}\n\n/** Remove a child node from its parent if attached.\n *\t@param {Element} node\t\tThe node to remove\n */\nfunction removeNode(node) {\n\tvar parentNode = node.parentNode;\n\tif (parentNode) parentNode.removeChild(node);\n}\n\n/** Set a named attribute on the given Node, with special behavior for some names and event handlers.\n *\tIf `value` is `null`, the attribute/handler will be removed.\n *\t@param {Element} node\tAn element to mutate\n *\t@param {string} name\tThe name/key to set, such as an event or attribute name\n *\t@param {any} old\tThe last value that was set for this name/node pair\n *\t@param {any} value\tAn attribute value, such as a function to be used as an event handler\n *\t@param {Boolean} isSvg\tAre we currently diffing inside an svg?\n *\t@private\n */\nfunction setAccessor(node, name, old, value, isSvg) {\n\tif (name === 'className') name = 'class';\n\n\tif (name === 'key') {\n\t\t// ignore\n\t} else if (name === 'ref') {\n\t\tif (old) old(null);\n\t\tif (value) value(node);\n\t} else if (name === 'class' && !isSvg) {\n\t\tnode.className = value || '';\n\t} else if (name === 'style') {\n\t\tif (!value || typeof value === 'string' || typeof old === 'string') {\n\t\t\tnode.style.cssText = value || '';\n\t\t}\n\t\tif (value && typeof value === 'object') {\n\t\t\tif (typeof old !== 'string') {\n\t\t\t\tfor (var i in old) {\n\t\t\t\t\tif (!(i in value)) node.style[i] = '';\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (var i in value) {\n\t\t\t\tnode.style[i] = typeof value[i] === 'number' && IS_NON_DIMENSIONAL.test(i) === false ? value[i] + 'px' : value[i];\n\t\t\t}\n\t\t}\n\t} else if (name === 'dangerouslySetInnerHTML') {\n\t\tif (value) node.innerHTML = value.__html || '';\n\t} else if (name[0] == 'o' && name[1] == 'n') {\n\t\tvar useCapture = name !== (name = name.replace(/Capture$/, ''));\n\t\tname = name.toLowerCase().substring(2);\n\t\tif (value) {\n\t\t\tif (!old) node.addEventListener(name, eventProxy, useCapture);\n\t\t} else {\n\t\t\tnode.removeEventListener(name, eventProxy, useCapture);\n\t\t}\n\t\t(node._listeners || (node._listeners = {}))[name] = value;\n\t} else if (name !== 'list' && name !== 'type' && !isSvg && name in node) {\n\t\tsetProperty(node, name, value == null ? '' : value);\n\t\tif (value == null || value === false) node.removeAttribute(name);\n\t} else {\n\t\tvar ns = isSvg && name !== (name = name.replace(/^xlink:?/, ''));\n\t\tif (value == null || value === false) {\n\t\t\tif (ns) node.removeAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase());else node.removeAttribute(name);\n\t\t} else if (typeof value !== 'function') {\n\t\t\tif (ns) node.setAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase(), value);else node.setAttribute(name, value);\n\t\t}\n\t}\n}\n\n/** Attempt to set a DOM property to the given value.\n *\tIE & FF throw for certain property-value combinations.\n */\nfunction setProperty(node, name, value) {\n\ttry {\n\t\tnode[name] = value;\n\t} catch (e) {}\n}\n\n/** Proxy an event to hooked event handlers\n *\t@private\n */\nfunction eventProxy(e) {\n\treturn this._listeners[e.type](options.event && options.event(e) || e);\n}\n\n/** Queue of components that have been mounted and are awaiting componentDidMount */\nvar mounts = [];\n\n/** Diff recursion count, used to track the end of the diff cycle. */\nvar diffLevel = 0;\n\n/** Global flag indicating if the diff is currently within an SVG */\nvar isSvgMode = false;\n\n/** Global flag indicating if the diff is performing hydration */\nvar hydrating = false;\n\n/** Invoke queued componentDidMount lifecycle methods */\nfunction flushMounts() {\n\tvar c;\n\twhile (c = mounts.pop()) {\n\t\tif (options.afterMount) options.afterMount(c);\n\t\tif (c.componentDidMount) c.componentDidMount();\n\t}\n}\n\n/** Apply differences in a given vnode (and it's deep children) to a real DOM Node.\n *\t@param {Element} [dom=null]\t\tA DOM node to mutate into the shape of the `vnode`\n *\t@param {VNode} vnode\t\t\tA VNode (with descendants forming a tree) representing the desired DOM structure\n *\t@returns {Element} dom\t\t\tThe created/mutated element\n *\t@private\n */\nfunction diff(dom, vnode, context, mountAll, parent, componentRoot) {\n\t// diffLevel having been 0 here indicates initial entry into the diff (not a subdiff)\n\tif (!diffLevel++) {\n\t\t// when first starting the diff, check if we're diffing an SVG or within an SVG\n\t\tisSvgMode = parent != null && parent.ownerSVGElement !== undefined;\n\n\t\t// hydration is indicated by the existing element to be diffed not having a prop cache\n\t\thydrating = dom != null && !('__preactattr_' in dom);\n\t}\n\n\tvar ret = idiff(dom, vnode, context, mountAll, componentRoot);\n\n\t// append the element if its a new parent\n\tif (parent && ret.parentNode !== parent) parent.appendChild(ret);\n\n\t// diffLevel being reduced to 0 means we're exiting the diff\n\tif (! --diffLevel) {\n\t\thydrating = false;\n\t\t// invoke queued componentDidMount lifecycle methods\n\t\tif (!componentRoot) flushMounts();\n\t}\n\n\treturn ret;\n}\n\n/** Internals of `diff()`, separated to allow bypassing diffLevel / mount flushing. */\nfunction idiff(dom, vnode, context, mountAll, componentRoot) {\n\tvar out = dom,\n\t prevSvgMode = isSvgMode;\n\n\t// empty values (null, undefined, booleans) render as empty Text nodes\n\tif (vnode == null || typeof vnode === 'boolean') vnode = '';\n\n\t// Fast case: Strings & Numbers create/update Text nodes.\n\tif (typeof vnode === 'string' || typeof vnode === 'number') {\n\n\t\t// update if it's already a Text node:\n\t\tif (dom && dom.splitText !== undefined && dom.parentNode && (!dom._component || componentRoot)) {\n\t\t\t/* istanbul ignore if */ /* Browser quirk that can't be covered: https://github.com/developit/preact/commit/fd4f21f5c45dfd75151bd27b4c217d8003aa5eb9 */\n\t\t\tif (dom.nodeValue != vnode) {\n\t\t\t\tdom.nodeValue = vnode;\n\t\t\t}\n\t\t} else {\n\t\t\t// it wasn't a Text node: replace it with one and recycle the old Element\n\t\t\tout = document.createTextNode(vnode);\n\t\t\tif (dom) {\n\t\t\t\tif (dom.parentNode) dom.parentNode.replaceChild(out, dom);\n\t\t\t\trecollectNodeTree(dom, true);\n\t\t\t}\n\t\t}\n\n\t\tout['__preactattr_'] = true;\n\n\t\treturn out;\n\t}\n\n\t// If the VNode represents a Component, perform a component diff:\n\tvar vnodeName = vnode.nodeName;\n\tif (typeof vnodeName === 'function') {\n\t\treturn buildComponentFromVNode(dom, vnode, context, mountAll);\n\t}\n\n\t// Tracks entering and exiting SVG namespace when descending through the tree.\n\tisSvgMode = vnodeName === 'svg' ? true : vnodeName === 'foreignObject' ? false : isSvgMode;\n\n\t// If there's no existing element or it's the wrong type, create a new one:\n\tvnodeName = String(vnodeName);\n\tif (!dom || !isNamedNode(dom, vnodeName)) {\n\t\tout = createNode(vnodeName, isSvgMode);\n\n\t\tif (dom) {\n\t\t\t// move children into the replacement node\n\t\t\twhile (dom.firstChild) {\n\t\t\t\tout.appendChild(dom.firstChild);\n\t\t\t} // if the previous Element was mounted into the DOM, replace it inline\n\t\t\tif (dom.parentNode) dom.parentNode.replaceChild(out, dom);\n\n\t\t\t// recycle the old element (skips non-Element node types)\n\t\t\trecollectNodeTree(dom, true);\n\t\t}\n\t}\n\n\tvar fc = out.firstChild,\n\t props = out['__preactattr_'],\n\t vchildren = vnode.children;\n\n\tif (props == null) {\n\t\tprops = out['__preactattr_'] = {};\n\t\tfor (var a = out.attributes, i = a.length; i--;) {\n\t\t\tprops[a[i].name] = a[i].value;\n\t\t}\n\t}\n\n\t// Optimization: fast-path for elements containing a single TextNode:\n\tif (!hydrating && vchildren && vchildren.length === 1 && typeof vchildren[0] === 'string' && fc != null && fc.splitText !== undefined && fc.nextSibling == null) {\n\t\tif (fc.nodeValue != vchildren[0]) {\n\t\t\tfc.nodeValue = vchildren[0];\n\t\t}\n\t}\n\t// otherwise, if there are existing or new children, diff them:\n\telse if (vchildren && vchildren.length || fc != null) {\n\t\t\tinnerDiffNode(out, vchildren, context, mountAll, hydrating || props.dangerouslySetInnerHTML != null);\n\t\t}\n\n\t// Apply attributes/props from VNode to the DOM Element:\n\tdiffAttributes(out, vnode.attributes, props);\n\n\t// restore previous SVG mode: (in case we're exiting an SVG namespace)\n\tisSvgMode = prevSvgMode;\n\n\treturn out;\n}\n\n/** Apply child and attribute changes between a VNode and a DOM Node to the DOM.\n *\t@param {Element} dom\t\t\tElement whose children should be compared & mutated\n *\t@param {Array} vchildren\t\tArray of VNodes to compare to `dom.childNodes`\n *\t@param {Object} context\t\t\tImplicitly descendant context object (from most recent `getChildContext()`)\n *\t@param {Boolean} mountAll\n *\t@param {Boolean} isHydrating\tIf `true`, consumes externally created elements similar to hydration\n */\nfunction innerDiffNode(dom, vchildren, context, mountAll, isHydrating) {\n\tvar originalChildren = dom.childNodes,\n\t children = [],\n\t keyed = {},\n\t keyedLen = 0,\n\t min = 0,\n\t len = originalChildren.length,\n\t childrenLen = 0,\n\t vlen = vchildren ? vchildren.length : 0,\n\t j,\n\t c,\n\t f,\n\t vchild,\n\t child;\n\n\t// Build up a map of keyed children and an Array of unkeyed children:\n\tif (len !== 0) {\n\t\tfor (var i = 0; i < len; i++) {\n\t\t\tvar _child = originalChildren[i],\n\t\t\t props = _child['__preactattr_'],\n\t\t\t key = vlen && props ? _child._component ? _child._component.__key : props.key : null;\n\t\t\tif (key != null) {\n\t\t\t\tkeyedLen++;\n\t\t\t\tkeyed[key] = _child;\n\t\t\t} else if (props || (_child.splitText !== undefined ? isHydrating ? _child.nodeValue.trim() : true : isHydrating)) {\n\t\t\t\tchildren[childrenLen++] = _child;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (vlen !== 0) {\n\t\tfor (var i = 0; i < vlen; i++) {\n\t\t\tvchild = vchildren[i];\n\t\t\tchild = null;\n\n\t\t\t// attempt to find a node based on key matching\n\t\t\tvar key = vchild.key;\n\t\t\tif (key != null) {\n\t\t\t\tif (keyedLen && keyed[key] !== undefined) {\n\t\t\t\t\tchild = keyed[key];\n\t\t\t\t\tkeyed[key] = undefined;\n\t\t\t\t\tkeyedLen--;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// attempt to pluck a node of the same type from the existing children\n\t\t\telse if (!child && min < childrenLen) {\n\t\t\t\t\tfor (j = min; j < childrenLen; j++) {\n\t\t\t\t\t\tif (children[j] !== undefined && isSameNodeType(c = children[j], vchild, isHydrating)) {\n\t\t\t\t\t\t\tchild = c;\n\t\t\t\t\t\t\tchildren[j] = undefined;\n\t\t\t\t\t\t\tif (j === childrenLen - 1) childrenLen--;\n\t\t\t\t\t\t\tif (j === min) min++;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// morph the matched/found/created DOM child to match vchild (deep)\n\t\t\tchild = idiff(child, vchild, context, mountAll);\n\n\t\t\tf = originalChildren[i];\n\t\t\tif (child && child !== dom && child !== f) {\n\t\t\t\tif (f == null) {\n\t\t\t\t\tdom.appendChild(child);\n\t\t\t\t} else if (child === f.nextSibling) {\n\t\t\t\t\tremoveNode(f);\n\t\t\t\t} else {\n\t\t\t\t\tdom.insertBefore(child, f);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// remove unused keyed children:\n\tif (keyedLen) {\n\t\tfor (var i in keyed) {\n\t\t\tif (keyed[i] !== undefined) recollectNodeTree(keyed[i], false);\n\t\t}\n\t}\n\n\t// remove orphaned unkeyed children:\n\twhile (min <= childrenLen) {\n\t\tif ((child = children[childrenLen--]) !== undefined) recollectNodeTree(child, false);\n\t}\n}\n\n/** Recursively recycle (or just unmount) a node and its descendants.\n *\t@param {Node} node\t\t\t\t\t\tDOM node to start unmount/removal from\n *\t@param {Boolean} [unmountOnly=false]\tIf `true`, only triggers unmount lifecycle, skips removal\n */\nfunction recollectNodeTree(node, unmountOnly) {\n\tvar component = node._component;\n\tif (component) {\n\t\t// if node is owned by a Component, unmount that component (ends up recursing back here)\n\t\tunmountComponent(component);\n\t} else {\n\t\t// If the node's VNode had a ref function, invoke it with null here.\n\t\t// (this is part of the React spec, and smart for unsetting references)\n\t\tif (node['__preactattr_'] != null && node['__preactattr_'].ref) node['__preactattr_'].ref(null);\n\n\t\tif (unmountOnly === false || node['__preactattr_'] == null) {\n\t\t\tremoveNode(node);\n\t\t}\n\n\t\tremoveChildren(node);\n\t}\n}\n\n/** Recollect/unmount all children.\n *\t- we use .lastChild here because it causes less reflow than .firstChild\n *\t- it's also cheaper than accessing the .childNodes Live NodeList\n */\nfunction removeChildren(node) {\n\tnode = node.lastChild;\n\twhile (node) {\n\t\tvar next = node.previousSibling;\n\t\trecollectNodeTree(node, true);\n\t\tnode = next;\n\t}\n}\n\n/** Apply differences in attributes from a VNode to the given DOM Element.\n *\t@param {Element} dom\t\tElement with attributes to diff `attrs` against\n *\t@param {Object} attrs\t\tThe desired end-state key-value attribute pairs\n *\t@param {Object} old\t\t\tCurrent/previous attributes (from previous VNode or element's prop cache)\n */\nfunction diffAttributes(dom, attrs, old) {\n\tvar name;\n\n\t// remove attributes no longer present on the vnode by setting them to undefined\n\tfor (name in old) {\n\t\tif (!(attrs && attrs[name] != null) && old[name] != null) {\n\t\t\tsetAccessor(dom, name, old[name], old[name] = undefined, isSvgMode);\n\t\t}\n\t}\n\n\t// add new & update changed attributes\n\tfor (name in attrs) {\n\t\tif (name !== 'children' && name !== 'innerHTML' && (!(name in old) || attrs[name] !== (name === 'value' || name === 'checked' ? dom[name] : old[name]))) {\n\t\t\tsetAccessor(dom, name, old[name], old[name] = attrs[name], isSvgMode);\n\t\t}\n\t}\n}\n\n/** Retains a pool of Components for re-use, keyed on component name.\n *\tNote: since component names are not unique or even necessarily available, these are primarily a form of sharding.\n *\t@private\n */\nvar components = {};\n\n/** Reclaim a component for later re-use by the recycler. */\nfunction collectComponent(component) {\n\tvar name = component.constructor.name;\n\t(components[name] || (components[name] = [])).push(component);\n}\n\n/** Create a component. Normalizes differences between PFC's and classful Components. */\nfunction createComponent(Ctor, props, context) {\n\tvar list = components[Ctor.name],\n\t inst;\n\n\tif (Ctor.prototype && Ctor.prototype.render) {\n\t\tinst = new Ctor(props, context);\n\t\tComponent.call(inst, props, context);\n\t} else {\n\t\tinst = new Component(props, context);\n\t\tinst.constructor = Ctor;\n\t\tinst.render = doRender;\n\t}\n\n\tif (list) {\n\t\tfor (var i = list.length; i--;) {\n\t\t\tif (list[i].constructor === Ctor) {\n\t\t\t\tinst.nextBase = list[i].nextBase;\n\t\t\t\tlist.splice(i, 1);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\treturn inst;\n}\n\n/** The `.render()` method for a PFC backing instance. */\nfunction doRender(props, state, context) {\n\treturn this.constructor(props, context);\n}\n\n/** Set a component's `props` (generally derived from JSX attributes).\n *\t@param {Object} props\n *\t@param {Object} [opts]\n *\t@param {boolean} [opts.renderSync=false]\tIf `true` and {@link options.syncComponentUpdates} is `true`, triggers synchronous rendering.\n *\t@param {boolean} [opts.render=true]\t\t\tIf `false`, no render will be triggered.\n */\nfunction setComponentProps(component, props, opts, context, mountAll) {\n\tif (component._disable) return;\n\tcomponent._disable = true;\n\n\tif (component.__ref = props.ref) delete props.ref;\n\tif (component.__key = props.key) delete props.key;\n\n\tif (!component.base || mountAll) {\n\t\tif (component.componentWillMount) component.componentWillMount();\n\t} else if (component.componentWillReceiveProps) {\n\t\tcomponent.componentWillReceiveProps(props, context);\n\t}\n\n\tif (context && context !== component.context) {\n\t\tif (!component.prevContext) component.prevContext = component.context;\n\t\tcomponent.context = context;\n\t}\n\n\tif (!component.prevProps) component.prevProps = component.props;\n\tcomponent.props = props;\n\n\tcomponent._disable = false;\n\n\tif (opts !== 0) {\n\t\tif (opts === 1 || options.syncComponentUpdates !== false || !component.base) {\n\t\t\trenderComponent(component, 1, mountAll);\n\t\t} else {\n\t\t\tenqueueRender(component);\n\t\t}\n\t}\n\n\tif (component.__ref) component.__ref(component);\n}\n\n/** Render a Component, triggering necessary lifecycle events and taking High-Order Components into account.\n *\t@param {Component} component\n *\t@param {Object} [opts]\n *\t@param {boolean} [opts.build=false]\t\tIf `true`, component will build and store a DOM node if not already associated with one.\n *\t@private\n */\nfunction renderComponent(component, opts, mountAll, isChild) {\n\tif (component._disable) return;\n\n\tvar props = component.props,\n\t state = component.state,\n\t context = component.context,\n\t previousProps = component.prevProps || props,\n\t previousState = component.prevState || state,\n\t previousContext = component.prevContext || context,\n\t isUpdate = component.base,\n\t nextBase = component.nextBase,\n\t initialBase = isUpdate || nextBase,\n\t initialChildComponent = component._component,\n\t skip = false,\n\t rendered,\n\t inst,\n\t cbase;\n\n\t// if updating\n\tif (isUpdate) {\n\t\tcomponent.props = previousProps;\n\t\tcomponent.state = previousState;\n\t\tcomponent.context = previousContext;\n\t\tif (opts !== 2 && component.shouldComponentUpdate && component.shouldComponentUpdate(props, state, context) === false) {\n\t\t\tskip = true;\n\t\t} else if (component.componentWillUpdate) {\n\t\t\tcomponent.componentWillUpdate(props, state, context);\n\t\t}\n\t\tcomponent.props = props;\n\t\tcomponent.state = state;\n\t\tcomponent.context = context;\n\t}\n\n\tcomponent.prevProps = component.prevState = component.prevContext = component.nextBase = null;\n\tcomponent._dirty = false;\n\n\tif (!skip) {\n\t\trendered = component.render(props, state, context);\n\n\t\t// context to pass to the child, can be updated via (grand-)parent component\n\t\tif (component.getChildContext) {\n\t\t\tcontext = extend(extend({}, context), component.getChildContext());\n\t\t}\n\n\t\tvar childComponent = rendered && rendered.nodeName,\n\t\t toUnmount,\n\t\t base;\n\n\t\tif (typeof childComponent === 'function') {\n\t\t\t// set up high order component link\n\n\t\t\tvar childProps = getNodeProps(rendered);\n\t\t\tinst = initialChildComponent;\n\n\t\t\tif (inst && inst.constructor === childComponent && childProps.key == inst.__key) {\n\t\t\t\tsetComponentProps(inst, childProps, 1, context, false);\n\t\t\t} else {\n\t\t\t\ttoUnmount = inst;\n\n\t\t\t\tcomponent._component = inst = createComponent(childComponent, childProps, context);\n\t\t\t\tinst.nextBase = inst.nextBase || nextBase;\n\t\t\t\tinst._parentComponent = component;\n\t\t\t\tsetComponentProps(inst, childProps, 0, context, false);\n\t\t\t\trenderComponent(inst, 1, mountAll, true);\n\t\t\t}\n\n\t\t\tbase = inst.base;\n\t\t} else {\n\t\t\tcbase = initialBase;\n\n\t\t\t// destroy high order component link\n\t\t\ttoUnmount = initialChildComponent;\n\t\t\tif (toUnmount) {\n\t\t\t\tcbase = component._component = null;\n\t\t\t}\n\n\t\t\tif (initialBase || opts === 1) {\n\t\t\t\tif (cbase) cbase._component = null;\n\t\t\t\tbase = diff(cbase, rendered, context, mountAll || !isUpdate, initialBase && initialBase.parentNode, true);\n\t\t\t}\n\t\t}\n\n\t\tif (initialBase && base !== initialBase && inst !== initialChildComponent) {\n\t\t\tvar baseParent = initialBase.parentNode;\n\t\t\tif (baseParent && base !== baseParent) {\n\t\t\t\tbaseParent.replaceChild(base, initialBase);\n\n\t\t\t\tif (!toUnmount) {\n\t\t\t\t\tinitialBase._component = null;\n\t\t\t\t\trecollectNodeTree(initialBase, false);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (toUnmount) {\n\t\t\tunmountComponent(toUnmount);\n\t\t}\n\n\t\tcomponent.base = base;\n\t\tif (base && !isChild) {\n\t\t\tvar componentRef = component,\n\t\t\t t = component;\n\t\t\twhile (t = t._parentComponent) {\n\t\t\t\t(componentRef = t).base = base;\n\t\t\t}\n\t\t\tbase._component = componentRef;\n\t\t\tbase._componentConstructor = componentRef.constructor;\n\t\t}\n\t}\n\n\tif (!isUpdate || mountAll) {\n\t\tmounts.unshift(component);\n\t} else if (!skip) {\n\t\t// Ensure that pending componentDidMount() hooks of child components\n\t\t// are called before the componentDidUpdate() hook in the parent.\n\t\t// Note: disabled as it causes duplicate hooks, see https://github.com/developit/preact/issues/750\n\t\t// flushMounts();\n\n\t\tif (component.componentDidUpdate) {\n\t\t\tcomponent.componentDidUpdate(previousProps, previousState, previousContext);\n\t\t}\n\t\tif (options.afterUpdate) options.afterUpdate(component);\n\t}\n\n\tif (component._renderCallbacks != null) {\n\t\twhile (component._renderCallbacks.length) {\n\t\t\tcomponent._renderCallbacks.pop().call(component);\n\t\t}\n\t}\n\n\tif (!diffLevel && !isChild) flushMounts();\n}\n\n/** Apply the Component referenced by a VNode to the DOM.\n *\t@param {Element} dom\tThe DOM node to mutate\n *\t@param {VNode} vnode\tA Component-referencing VNode\n *\t@returns {Element} dom\tThe created/mutated element\n *\t@private\n */\nfunction buildComponentFromVNode(dom, vnode, context, mountAll) {\n\tvar c = dom && dom._component,\n\t originalComponent = c,\n\t oldDom = dom,\n\t isDirectOwner = c && dom._componentConstructor === vnode.nodeName,\n\t isOwner = isDirectOwner,\n\t props = getNodeProps(vnode);\n\twhile (c && !isOwner && (c = c._parentComponent)) {\n\t\tisOwner = c.constructor === vnode.nodeName;\n\t}\n\n\tif (c && isOwner && (!mountAll || c._component)) {\n\t\tsetComponentProps(c, props, 3, context, mountAll);\n\t\tdom = c.base;\n\t} else {\n\t\tif (originalComponent && !isDirectOwner) {\n\t\t\tunmountComponent(originalComponent);\n\t\t\tdom = oldDom = null;\n\t\t}\n\n\t\tc = createComponent(vnode.nodeName, props, context);\n\t\tif (dom && !c.nextBase) {\n\t\t\tc.nextBase = dom;\n\t\t\t// passing dom/oldDom as nextBase will recycle it if unused, so bypass recycling on L229:\n\t\t\toldDom = null;\n\t\t}\n\t\tsetComponentProps(c, props, 1, context, mountAll);\n\t\tdom = c.base;\n\n\t\tif (oldDom && dom !== oldDom) {\n\t\t\toldDom._component = null;\n\t\t\trecollectNodeTree(oldDom, false);\n\t\t}\n\t}\n\n\treturn dom;\n}\n\n/** Remove a component from the DOM and recycle it.\n *\t@param {Component} component\tThe Component instance to unmount\n *\t@private\n */\nfunction unmountComponent(component) {\n\tif (options.beforeUnmount) options.beforeUnmount(component);\n\n\tvar base = component.base;\n\n\tcomponent._disable = true;\n\n\tif (component.componentWillUnmount) component.componentWillUnmount();\n\n\tcomponent.base = null;\n\n\t// recursively tear down & recollect high-order component children:\n\tvar inner = component._component;\n\tif (inner) {\n\t\tunmountComponent(inner);\n\t} else if (base) {\n\t\tif (base['__preactattr_'] && base['__preactattr_'].ref) base['__preactattr_'].ref(null);\n\n\t\tcomponent.nextBase = base;\n\n\t\tremoveNode(base);\n\t\tcollectComponent(component);\n\n\t\tremoveChildren(base);\n\t}\n\n\tif (component.__ref) component.__ref(null);\n}\n\n/** Base Component class.\n *\tProvides `setState()` and `forceUpdate()`, which trigger rendering.\n *\t@public\n *\n *\t@example\n *\tclass MyFoo extends Component {\n *\t\trender(props, state) {\n *\t\t\treturn <div />;\n *\t\t}\n *\t}\n */\nfunction Component(props, context) {\n\tthis._dirty = true;\n\n\t/** @public\n *\t@type {object}\n */\n\tthis.context = context;\n\n\t/** @public\n *\t@type {object}\n */\n\tthis.props = props;\n\n\t/** @public\n *\t@type {object}\n */\n\tthis.state = this.state || {};\n}\n\nextend(Component.prototype, {\n\n\t/** Returns a `boolean` indicating if the component should re-render when receiving the given `props` and `state`.\n *\t@param {object} nextProps\n *\t@param {object} nextState\n *\t@param {object} nextContext\n *\t@returns {Boolean} should the component re-render\n *\t@name shouldComponentUpdate\n *\t@function\n */\n\n\t/** Update component state by copying properties from `state` to `this.state`.\n *\t@param {object} state\t\tA hash of state properties to update with new values\n *\t@param {function} callback\tA function to be called once component state is updated\n */\n\tsetState: function setState(state, callback) {\n\t\tvar s = this.state;\n\t\tif (!this.prevState) this.prevState = extend({}, s);\n\t\textend(s, typeof state === 'function' ? state(s, this.props) : state);\n\t\tif (callback) (this._renderCallbacks = this._renderCallbacks || []).push(callback);\n\t\tenqueueRender(this);\n\t},\n\n\n\t/** Immediately perform a synchronous re-render of the component.\n *\t@param {function} callback\t\tA function to be called after component is re-rendered.\n *\t@private\n */\n\tforceUpdate: function forceUpdate(callback) {\n\t\tif (callback) (this._renderCallbacks = this._renderCallbacks || []).push(callback);\n\t\trenderComponent(this, 2);\n\t},\n\n\n\t/** Accepts `props` and `state`, and returns a new Virtual DOM tree to build.\n *\tVirtual DOM is generally constructed via [JSX](http://jasonformat.com/wtf-is-jsx).\n *\t@param {object} props\t\tProps (eg: JSX attributes) received from parent element/component\n *\t@param {object} state\t\tThe component's current state\n *\t@param {object} context\t\tContext object (if a parent component has provided context)\n *\t@returns VNode\n */\n\trender: function render() {}\n});\n\n/** Render JSX into a `parent` Element.\n *\t@param {VNode} vnode\t\tA (JSX) VNode to render\n *\t@param {Element} parent\t\tDOM element to render into\n *\t@param {Element} [merge]\tAttempt to re-use an existing DOM tree rooted at `merge`\n *\t@public\n *\n *\t@example\n *\t// render a div into <body>:\n *\trender(<div id=\"hello\">hello!</div>, document.body);\n *\n *\t@example\n *\t// render a \"Thing\" component into #foo:\n *\tconst Thing = ({ name }) => <span>{ name }</span>;\n *\trender(<Thing name=\"one\" />, document.querySelector('#foo'));\n */\nfunction render(vnode, parent, merge) {\n return diff(merge, vnode, {}, false, parent, false);\n}\n\nvar preact = {\n\th: h,\n\tcreateElement: h,\n\tcloneElement: cloneElement,\n\tComponent: Component,\n\trender: render,\n\trerender: rerender,\n\toptions: options\n};\n\nexport default preact;\nexport { h, h as createElement, cloneElement, Component, render, rerender, options };\n//# sourceMappingURL=preact.esm.js.map\n","/**\n * Calendar Script\n * Creates a calendar widget which can be used to select the date more easily than using just a text box\n *\n * Modified: http://yourcmc.ru/git/vitalif-js/calendar\n * Version: 2018-10-09\n * License: MIT-like, http://www.openjs.com/license.php\n *\n * Example:\n * <input type=\"text\" name=\"date\" id=\"date\" />\n * <script type=\"text/javascript\">\n * Calendar.set(\"date\");\n * </script>\n */\n\nimport preact from 'preact';\n/** @jsx preact.h */\n\nexport class Calendar extends preact.Component\n{\n\t// Configuration\n\tstatic defaultProps = {\n\t\tmonth_names: [\"Январь\",\"Февраль\",\"Март\",\"Апрель\",\"Май\",\"Июнь\",\"Июль\",\"Август\",\"Сентябрь\",\"Октябрь\",\"Ноябрь\",\"Декабрь\"],\n\t\tclose_label: 'Закрыть',\n\t\tweekdays: [\"Пн\",\"Вт\",\"Ср\",\"Чт\",\"Пт\",\"Сб\",\"Вс\"],\n\t\tweekdayIds: ['Mon','Tue','Wed','Thu','Fri','Sat','Sun'],\n\t\tsunday: 6,\n\t\tselectboxes: false, // true: use selectboxes for year and month, false: show months and years in table\n\t\tyears: { min: -70, max: 10 }, // range of displayed years if selectboxes==true\n\t\tformat: 'd.m.Y', // either d.m.Y or Y-m-d, other formats are not supported\n\t\t// Today's date\n\t\ttoday: new Date(),\n\t\tstart: 'days',\n\t}\n\n\trender(props, state)\n\t{\n\t\treturn (<div class=\"calendar-box\" style={{display: \"block\"}}>\n\t\t\t{props.mode == 'months' ? this.renderMonths(props) : null}\n\t\t\t{props.mode == 'years' ? this.renderYears(props) : null}\n\t\t\t{props.mode == 'days' ? this.renderDays(props) : null}\n\t\t\t<a class=\"calendar-cancel\" onclick={() => Calendar.hideCalendar()}>{props.close_label}</a>\n\t\t</div>);\n\t}\n\n\tcomponentDidMount()\n\t{\n\t\tthis.componentDidUpdate();\n\t}\n\n\tcomponentDidUpdate()\n\t{\n\t\t// Position the div in the correct location...\n\t\tvar input = this.props.input;\n\t\tvar div = Calendar.box;\n\t\tvar xy = getOffset(input);\n\t\tvar height = input.clientHeight||input.offsetHeight;\n\t\tdiv.style.left = (xy.left-1)+\"px\";\n\t\tif (div.offsetHeight + xy.top+height-1 >= (document.body.clientHeight||document.documentElement.clientHeight) &&\n\t\t\txy.top-div.offsetHeight >= 0)\n\t\t\tdiv.style.top = (xy.top-div.offsetHeight)+'px';\n\t\telse\n\t\t\tdiv.style.top = (xy.top+height-1)+\"px\";\n\t}\n\n\t/// Called when the user clicks on a date in the calendar.\n\tselectDate(year, month, day)\n\t{\n\t\tvar i = this.props.input;\n\t\tvar t = i.value.split(/\\s+/, 2)[1]||'';\n\t\tif (t)\n\t\t\tt = ' '+t;\n\t\tmonth = Number(month)+1;\n\t\tif (month < 10)\n\t\t\tmonth = '0'+month;\n\t\tif (day < 10)\n\t\t\tday = '0'+day;\n\t\tif (this.props.callback)\n\t\t{\n\t\t\tvar c = this.props.callback;\n\t\t\tt = year + '-' + month + '-' + day + t;\n\t\t\tc(new Date(t));\n\t\t}\n\t\telse\n\t\t{\n\t\t\tt = (this.format == 'Y-m-d' ? year + '-' + month + '-' + day : day + '.' + month + '.' + year) + t;\n\t\t\ti.value = t;\n\t\t\tif (\"Event\" in window)\n\t\t\t{\n\t\t\t\tvar evt = document.createEvent('Event');\n\t\t\t\tevt.initEvent('change', true, true);\n\t\t\t\ti.dispatchEvent(evt);\n\t\t\t}\n\t\t\telse\n\t\t\t\ti.fireEvent(\"onchange\");\n\t\t}\n\t\tCalendar.hideCalendar();\n\t}\n\n\tshowMonths(year)\n\t{\n\t\tthis.props.onChangeProps({ year, mode: 'months' });\n\t}\n\n\tshowYears(year)\n\t{\n\t\tthis.props.onChangeProps({ year, mode: 'years' });\n\t}\n\n\tshowDays(year, month)\n\t{\n\t\tthis.props.onChangeProps({ year, month, mode: 'days' });\n\t}\n\n\trenderMonths(props)\n\t{\n\t\tvar year = props.year;\n\t\tvar cur_y = props.today.getFullYear();\n\t\tvar cur_m = props.today.getMonth();\n\t\tvar sel_m = props.selected.getFullYear() == year ? props.selected.getMonth() : -1;\n\t\tvar months = [ [ 0, 1, 2 ], [ 3, 4, 5 ], [ 6, 7, 8 ], [ 9, 10, 11 ] ];\n\t\treturn (<table>\n\t\t\t<tr><th colspan='4' class='calendar-title'>\n\t\t\t\t<a href='javascript:void(0)' onclick={() => this.showMonths(year-1)} title={(year-1)} class='prev'></a>\n\t\t\t\t<a href='javascript:void(0)' onclick={() => this.showYears(year)}>{year}</a>\n\t\t\t\t<a href='javascript:void(0)' onclick={() => this.showMonths(year+1)} title={(year+1)} class='next'></a>\n\t\t\t</th></tr>\n\t\t\t{months.map(g => (<tr>\n\t\t\t\t{g.map(i => (\n\t\t\t\t\t<td class={'months '+\n\t\t\t\t\t\t(year < cur_y || year == cur_y && i < cur_m ? 'past' :\n\t\t\t\t\t\t(year > cur_y || year == cur_y && i > cur_m ? 'future' : 'today'))\n\t\t\t\t\t\t+ (i == sel_m ? ' selected' : '')}>\n\t\t\t\t\t\t<a href='javascript:void(0)' onclick={() => this.showDays(year, i)}>\n\t\t\t\t\t\t\t{props.month_names[i]}\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</td>\n\t\t\t\t))}\n\t\t\t</tr>))}\n\t\t</table>);\n\t}\n\n\trenderYears({ selected, today, year })\n\t{\n\t\tvar beg = year & ~15;\n\t\tvar cur_y = today.getFullYear();\n\t\tvar sel_y = selected.getFullYear();\n\t\treturn (<table>\n\t\t\t<tr><th colspan='4' class='calendar-title'>\n\t\t\t\t<a href='javascript:void(0)' onclick={() => this.showYears(year-16)} title={(beg-16)+\" - \"+(beg-1)} class='prev'></a>\n\t\t\t\t<b>{beg+' - '+(beg+15)}</b>\n\t\t\t\t<a href='javascript:void(0)' onclick={() => this.showYears(year+16)} title={(beg+16)+\" - \"+(beg+31)} class='next'></a>\n\t\t\t</th></tr>\n\t\t\t{[0, 1, 2, 3].map(r => (\n\t\t\t\t<tr>\n\t\t\t\t{[0, 1, 2, 3].map(j => {\n\t\t\t\t\tvar i = beg + j + r*4;\n\t\t\t\t\tvar class_name = (i < cur_y ? 'past' : (i > cur_y ? 'future' : 'today'))\n\t\t\t\t\t\t+ (i == sel_y ? ' selected' : '');\n\t\t\t\t\treturn (<td class={'years '+class_name}>\n\t\t\t\t\t\t<a href='javascript:void(0)' onclick={() => this.showMonths(i)}>{i}</a>\n\t\t\t\t\t</td>);\n\t\t\t\t})}\n\t\t\t\t</tr>\n\t\t\t))}\n\t\t</table>);\n\t}\n\n\t_yearOptions(min, max, year)\n\t{\n\t\tvar r = [];\n\t\tfor (var i = min; i < max; i++)\n\t\t\tr.push(<option value={i} selected={i == year}>{i}</option>);\n\t\treturn r;\n\t}\n\n\t/// Creates a calendar with the date given in the argument as the selected date.\n\trenderDays(props)\n\t{\n\t\tvar { year, month, selected, selectboxes, sunday, today, month_names } = props;\n\n\t\t// Display the table\n\t\tvar next_month = month+1;\n\t\tvar next_month_year = year;\n\t\tif (next_month >= 12)\n\t\t{\n\t\t\tnext_month = 0;\n\t\t\tnext_month_year++;\n\t\t}\n\n\t\tvar previous_month = month-1;\n\t\tvar previous_month_year = year;\n\t\tif (previous_month < 0)\n\t\t{\n\t\t\tprevious_month = 11;\n\t\t\tprevious_month_year--;\n\t\t}\n\n\t\tvar current_year = today.getFullYear();\n\n\t\t// Get the first day of this month\n\t\tvar first_day = new Date(year, month, 1);\n\t\tvar start_day = (first_day.getDay()+sunday)%7;\n\n\t\tvar d = 1;\n\t\tvar flag = 0;\n\n\t\t// Leap year support\n\t\tvar days_in_this_month = (month == 2\n\t\t\t? (!(year % 4) && ((year % 100) || !(year % 400)) ? 29 : 28)\n\t\t\t: ((month < 7) == !(month & 1) ? 31 : 30));\n\n\t\tvar yea = today.getFullYear();\n\t\tvar all_diff = (year - yea) || (month - today.getMonth());\n\t\tvar sel_day = selected && year == selected.getFullYear() && month == selected.getMonth() ? selected.getDate() : -1;\n\n\t\treturn (<table>\n\t\t\t<tr><th colspan='7' class='calendar-title'>\n\t\t\t\t<a href='javascript:void(0)'\n\t\t\t\t\tonclick={() => this.showDays(previous_month_year, previous_month)}\n\t\t\t\t\ttitle={month_names[previous_month]+\" \"+previous_month_year} class='prev'></a>\n\t\t\t\t{!selectboxes ?\n\t\t\t\t\t[\n\t\t\t\t\t\t<a href='javascript:void(0)' onclick={() => this.showMonths(year, month)}>{month_names[month]}</a>,\n\t\t\t\t\t\t<a href='javascript:void(0)' onclick={() => this.showYears(year)}>{year}</a>\n\t\t\t\t\t] : [\n\t\t\t\t\t\t<select name='calendar-month' class='calendar-month' onchange={(e) => this.showDays(year, e.target.value)}>\n\t\t\t\t\t\t\t{month_names.map((name, i) => (\n\t\t\t\t\t\t\t\t<option value={i} selected={(i == month)}>{name}</option>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</select>,\n\t\t\t\t\t\t<select name='calendar-year' class='calendar-year' onchange={(e) => this.showDays(e.target.value, month)}>\n\t\t\t\t\t\t\t{this._yearOptions(current_year+props.years.min, current_year+props.years.max, year)}\n\t\t\t\t\t\t</select>\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t\t<a href='javascript:void(0)'\n\t\t\t\t\tonclick={() => this.showDays(next_month_year,next_month)}\n\t\t\t\t\ttitle={props.month_names[next_month]+\" \"+next_month_year} class='next'></a>\n\t\t\t</th></tr>\n\t\t\t<tr class='header'>\n\t\t\t\t{props.weekdays.map(name => (<td>{name}</td>))}\n\t\t\t</tr>\n\t\t\t{[0, 1, 2, 3, 4].map(i => (\n\t\t\t\t(i*7 < days_in_this_month+start_day ? <tr>\n\t\t\t\t\t{[0, 1, 2, 3, 4, 5, 6].map(j =>\n\t\t\t\t\t{\n\t\t\t\t\t\tvar d = i*7+j+1-start_day;\n\t\t\t\t\t\tvar visible = (i > 0 || j >= start_day) && (d <= days_in_this_month);\n\t\t\t\t\t\tif (visible)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvar class_name = 'days';\n\t\t\t\t\t\t\tvar diff = all_diff || (d - today.getDate());\n\t\t\t\t\t\t\tif (diff < 0)\n\t\t\t\t\t\t\t\tclass_name += ' past';\n\t\t\t\t\t\t\telse if (!diff)\n\t\t\t\t\t\t\t\tclass_name += ' today';\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tclass_name += ' future';\n\t\t\t\t\t\t\tif (d == sel_day)\n\t\t\t\t\t\t\t\tclass_name += ' selected';\n\t\t\t\t\t\t\tclass_name += ' ' + props.weekdayIds[j].toLowerCase();\n\t\t\t\t\t\t\treturn (<td class={class_name}>\n\t\t\t\t\t\t\t\t<a href=\"javascript:void(0)\" onclick={() => this.selectDate(year, month, d)}>{d}</a>\n\t\t\t\t\t\t\t</td>);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\treturn (<td class='days'> </td>);\n\t\t\t\t\t})}\n\t\t\t\t</tr> : null)\n\t\t\t))}\n\t\t</table>);\n\t}\n\n\t/// Display the calendar - if a date exists in the input box, that will be selected in the calendar.\n\tstatic showCalendar(input, options)\n\t{\n\t\t// Show the calendar with the date in the input as the selected date\n\t\tvar props = { ...Calendar.defaultProps, ...options };\n\t\tprops.selected = new Date();\n\t\tvar date_in_input = input.value.replace(/\\s+.*$/, ''); // Remove time\n\t\tif (date_in_input)\n\t\t{\n\t\t\t// date format is HARDCODE\n\t\t\tvar selected_date = false;\n\t\t\tvar date_parts = date_in_input.split(\"-\");\n\t\t\tif (date_parts.length == 3)\n\t\t\t{\n\t\t\t\t// Y-m-d\n\t\t\t\tdate_parts[1]--; // Month starts with 0\n\t\t\t\tselected_date = new Date(date_parts[0], date_parts[1], date_parts[2]);\n\t\t\t}\n\t\t\telse if (date_parts.length == 1)\n\t\t\t{\n\t\t\t\tdate_parts = date_in_input.split('.');\n\t\t\t\tif (date_parts.length == 3)\n\t\t\t\t{\n\t\t\t\t\t// d.m.Y\n\t\t\t\t\tdate_parts[1]--; // Month starts with 0\n\t\t\t\t\tselected_date = new Date(date_parts[2], date_parts[1], date_parts[0]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (selected_date && !isNaN(selected_date.getFullYear()))\n\t\t\t{\n\t\t\t\t// Valid date.\n\t\t\t\tprops.selected = selected_date;\n\t\t\t}\n\t\t}\n\t\tprops.today = new Date();\n\t\tprops.year = props.selected.getFullYear();\n\t\tprops.month = props.selected.getMonth();\n\t\tprops.mode = props.start;\n\t\tprops.input = input;\n\t\tprops.onChangeProps = (h) =>\n\t\t{\n\t\t\tprops = { ...props, ...h };\n\t\t\tpreact.render(<Calendar {...props} />, Calendar.box.parentNode, Calendar.box);\n\t\t};\n\t\tCalendar.init();\n\t\tCalendar.box.style.display = \"block\";\n\t\tpreact.render(<Calendar {...props} />, Calendar.box.parentNode, Calendar.box);\n\t}\n\n\t/// Hides the currently show calendar.\n\tstatic hideCalendar()\n\t{\n\t\tif (!Calendar.box)\n\t\t\treturn;\n\t\tCalendar.box.style.display = \"none\";\n\t}\n\n\t/// Setup a text input box to be a calendar box.\n\tstatic set(input_or_id, options)\n\t{\n\t\tif (typeof input_or_id == 'string')\n\t\t{\n\t\t\tinput_or_id = document.getElementById(input_or_id);\n\t\t}\n\t\tif (!input_or_id)\n\t\t{\n\t\t\treturn; // If the input field is not there, exit.\n\t\t}\n\t\tinput_or_id.addEventListener('focus', function(ev)\n\t\t{\n\t\t\tCalendar.showCalendar(input_or_id, options);\n\t\t});\n\t\t// FIXME: Add change listener to enable interactive date selection in calendar while typing\n\t}\n\n\t// Will be called once when the first input is set.\n\tstatic init()\n\t{\n\t\tif (!Calendar.box || !Calendar.box.parentNode)\n\t\t{\n\t\t\tvar div = document.createElement('div');\n\t\t\tif (!Calendar.box)\n\t\t\t\tCalendar.box = div;\n\t\t\tdiv.className = \"calendar-box\";\n\t\t\tdiv.addEventListener(\"mousedown\", function(ev)\n\t\t\t{\n\t\t\t\tev = ev || window.event;\n\t\t\t\tif (ev.stopPropagation)\n\t\t\t\t\tev.stopPropagation();\n\t\t\t\telse\n\t\t\t\t\tev.cancelBubble = true;\n\t\t\t\treturn true;\n\t\t\t});\n\t\t\tdocument.getElementsByTagName(\"body\")[0].insertBefore(div, document.getElementsByTagName(\"body\")[0].firstChild);\n\t\t\tif (!Calendar.addedListener)\n\t\t\t{\n\t\t\t\tdocument.addEventListener(\"mousedown\", function() { Calendar.hideCalendar(); });\n\t\t\t\tCalendar.addedListener = true;\n\t\t\t}\n\t\t}\n\t}\n}\n\nwindow.Calendar = Calendar;\n\nfunction getOffsetRect(elem)\n{\n\tvar box = elem.getBoundingClientRect();\n\n\tvar body = document.body;\n\tvar docElem = document.documentElement;\n\n\tvar scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;\n\tvar scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;\n\tvar clientTop = docElem.clientTop || body.clientTop || 0;\n\tvar clientLeft = docElem.clientLeft || body.clientLeft || 0;\n\tvar top = box.top + scrollTop - clientTop;\n\tvar left = box.left + scrollLeft - clientLeft;\n\n\treturn { top: Math.round(top), left: Math.round(left) };\n}\n\nfunction getOffsetSum(elem)\n{\n\tvar top = 0, left = 0;\n\twhile(elem)\n\t{\n\t\ttop = top + parseInt(elem.offsetTop);\n\t\tleft = left + parseInt(elem.offsetLeft);\n\t\telem = elem.offsetParent;\n\t}\n\treturn { top: top, left: left };\n}\n\nfunction getOffset(elem)\n{\n\tif (elem.getBoundingClientRect)\n\t\treturn getOffsetRect(elem);\n\telse\n\t\treturn getOffsetSum(elem);\n}\n"],"sourceRoot":""} |