[
  {
    "path": ".gitattributes",
    "content": "public/* linguist-documentation\n"
  },
  {
    "path": ".gitignore",
    "content": "# for Eclipse\n.classpath\n.project\n.settings\n\n# for IDEA\n*.iml\n*.ipr\n*.iws\n.idea/\n\n# for build\ntarget\nbuild\n\n# for  mac\n.DS_Store\n\n/bin/\n\n/node_modules/\n"
  },
  {
    "path": ".npmignore",
    "content": "src\ntest\npublic\ngulpfile.js\nnode_modules\n.DS_Store\n.idea/\n"
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2017 Tom Misawa\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "# Overview\n[![npm version](https://badge.fury.io/js/jsframe.js.svg)](https://badge.fury.io/js/jsframe.js)\n[![](https://data.jsdelivr.com/v1/package/npm/jsframe.js/badge)](https://www.jsdelivr.com/package/npm/jsframe.js)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n###  What is '**JsFrame.js**' like?\nIt is an independent and lightweight multi-window library for javascript.\n\n- You can create various floating windows (called **frame**) and popup windows.\n- You can create [multi-window](https://riversun.github.io/jsframe/examples/v150/preset_win10.html) apps.\n- You can create a [modal window](https://riversun.github.io/jsframe/examples/v150/modal.html).\n- You can create a [toast](https://riversun.github.io/jsframe/examples/v150/toast.html).\n\nIt is licensed under [MIT](https://opensource.org/licenses/MIT) license.\n\n# Resources\n\n- [Examples](https://riversun.github.io/JSFrame.js/public/)\n\n# Installing\n\n## using npm\n\n```shell\nnpm install jsframe.js --save\n```\n\n\n### Import JSFrame on Node.js based environment.\n\n#### ES6\n\n```javascript\nimport { JSFrame } from 'jsframe.js';\n```\n\n#### common-js\n\n```javascript\nconst { JSFrame } = require('jsframe.js');\n```\n\n## using with script tag\n\n```html\n<script src=\"https://cdn.jsdelivr.net/npm/jsframe.js/lib/jsframe.min.js\"></script>\n```\n\n# Quick Start\n\n## Create window\n\nHere's is basic example of JSFrame.js to show a simple window.\n\n- Call the ```JSFrame.create``` method with initialization parameter to show a window\n- Set html as a content of the window.Content could simply be some text or html.\n- ```frame.show``` to show the window\n\n```js\nconst jsFrame = new JSFrame();\n//Create window\nconst frame = jsFrame.create({\n    title: 'Window',\n    left: 20, top: 20, width: 320, height: 220,\n    movable: true,//Enable to be moved by mouse\n    resizable: true,//Enable to be resized by mouse\n    html: '<div id=\"my_element\" style=\"padding:10px;font-size:12px;color:darkgray;\">Contents of window</div>'\n});\n```\n\n**DEMO**  \nhttps://riversun.github.io/jsframe/examples/v150/simple.html\n\n[![ex00](https://riversun.github.io/jsframe/capture/ex00.png)](https://riversun.github.io/jsframe/examples/v150/simple.html)\n\n**Tips**\n- Get DOM element from contents:\n\n```\nframe.$([selector])\n```\n\n- Get the element which id is 'my_element' \n\n```\nconst ele = frame.$('#my_element')\n```\n\n- Set window position\n\n```\nframe.setPosition(x,y,[anchor]);\n```\n\nIf you specify an anchor, the location of the anchor will be the specified x,y coordinate.\n\nAnchor values\n'LEFT_TOP','CENTER_TOP','RIGHT_TOP','LEFT_CENTER','CENTER_CENTER','RIGHT_CENTER','LEFT_BOTTOM','CENTER_BOTTOM','RIGHT_BOTTOM'\n\n- Set window content \n\n```\nframe.setHTML(`<div>Your content</div>`);\n```\n\n- Want to specify individual windows\nYou can give the window a unique window name.\n\n```javascript\nconst windowName='my-example-window';\nframe.setName(windowName);\n```\n\nand you can get the window by windowName\n\n```javascript\nconst windowName='my-example-window';\nconst frame=jsFrame.getWindowByName(windowName);\n```\n\n- Want to check if a window already exists\n\nYou can use it in the following cases.\nShow window if it exists, create new window if window is closed\n\n```javascript\nconst windowName='my-example-window';\nconst windowExists=jsFrame.containsWindowName(windowName);\n```\n\n## Show specified URL as content of window\n\n- Set ```url``` to the initialization parameter.\n- The window contents will be shown as iframe.\n- Set callback function which is called after loading a page as ```urlLoaded```\n\n```js\nconst frame01 = jsFrame.create({\n    title: 'Window1',\n    left: 20, top: 20, width: 320, height: 160,\n    url: 'iframe_content01.html',//URL to display in iframe\n    //urlLoaded:Callback function called after loading iframe\n    urlLoaded: (frame) => {\n      //Called when the url finishes loading\n    }\n});\nframe01.show();\n```\n\n**DEMO**  \nhttps://riversun.github.io/jsframe/examples/v150/iframe.html\n\n[![ifrmae](https://riversun.github.io/jsframe/capture/img_03_iframe.png)](https://riversun.github.io/jsframe/examples/v150/iframe.html)\n\n**Tips**\n- You can also get DOM element in the page shown as window's content area specified by url(iframe) ,You can call like ```frame.$('#my_element')```.\n\n\n## Show window as a modal window\n\n- Call ```frame.showModal``` to show the window as a modal window.\n- By specifying like ```showModal(callbackFunc)``` you can receive a callback when the modal window is closed.\n\n```js\nconst modalFrame = jsFrame.create({\n      title: 'modal window',\n      left: 0, top: 0, width: 320, height: 220,\n      html: 'something'\n  });\n  //Show as a modal window\n  modalFrame.showModal(_frame => {\n  //Callback when modal window is closed.\n  });\n```\n\n**DEMO**  \nhttps://riversun.github.io/jsframe/examples/v150/modal.html\n\n[![ifrmae](https://riversun.github.io/jsframe/capture/img_04_modal.png)](https://riversun.github.io/jsframe/examples/v150/modal.html)\n\n## Styling\n\n- JSFrame.js has the option where you can design the window appearance or apply style to certain elements and then apply styles to them as you want.\n- You can specify style from preset or design it yourself.\n- Set ```appearanceName``` to initialization parameter to select the window design called ```appearance```.\n- Or if you want to design appearance from scratch, you can set ```appearance``` to initialization parameter.\n\n**Style from preset**\n\n```javascript\nconst frame01 = jsFrame.create({\n    title: 'Yosemite style',\n    left: 20, top: 20, width: 320, height: 220,\n    appearanceName: 'yosemite',//Now preset is selectable from  'yosemite','redstone','popup'\n    style: {\n        backgroundColor: 'rgba(255,255,255,0.9)',\n    },\n    html: '<div style=\"padding:10px;\">Preset is selected by preset name</div>'\n}).show();\n```\n\n**DEMO**  \nhttps://riversun.github.io/jsframe/examples/v150/styling.html\n\n[![styling](https://riversun.github.io/jsframe/capture/img_05_styling.gif)](https://riversun.github.io/jsframe/examples/v150/styling.html)\n\n\n## Event handling\n- You can set an event handler (callback function) for the DOM element in the content specified by html or url.\n- You can also set an event handler for buttons on the title bar.\n- Call like ```frame.on(selector,'click',(_frame,event)=>{});``` to set click event handler functions.\n\n```javascript\n//Set click handler for DOM element specified as html or url in the initialization parameters.\nframe.on('#bt_cancel', 'click', (_frame, evt) => {\n});\n\n//Event handler for buttons on the title bar.\nframe.on('minimizeButton', 'click', (_frame, evt) => {\n});\n\n```  \n\n**DEMO**  \nhttps://riversun.github.io/jsframe/examples/v150/event_handling.html\n\n[![styling](https://riversun.github.io/jsframe/capture/img_05_event.png)](https://riversun.github.io/jsframe/examples/v150/event_handling.html\n)\n\n## Show toast messages.\n\n- A toast provides simple message about an operation in a small popup. Toasts automatically disappear after the time specified by ```duration```.\n- Call ```JSFrame.showToast``` to show a toast.\n- You can customize the appearance and something.\n\n**Simple toast**\n\n```js\nconst jsFrame = new JSFrame();\n  jsFrame.showToast({\n      html: 'Default toast'\n  });\n```\n\n[![toast](https://riversun.github.io/jsframe/capture/toastd.gif)](https://riversun.github.io/jsframe/examples/v150/toast.html)\n\n**Specify the position**\n\n```js\njsFrame.showToast({\n    align: 'center', html: 'Toast displayed in the center'\n});\n```\n\nYou can specify the position with ```align``` like below.\n\n**align:'top'** =>Toast displayed at the top  \n**align:'center'** =>Toast displayed in the center  \n**align:'bottom'** =>Toast displayed at the bottom(default)  \n\n**Customize toast**\n\n```js\njsFrame.showToast(\n    {\n        width: 260,\n        height: 100,\n        duration: 2000,//Duration(millis)\n        align: 'center',// alignment from 'top'/'center'/'bottom'(default)\n        style: {\n            borderRadius: '2px',\n            backgroundColor: 'rgba(0,124,255,0.8)',\n        },\n        html: '<span style=\"color:white;\">Custom toast</span>',\n        closeButton: true,//Show close button\n        closeButtonColor: 'white'//Color of close button\n    });\n\n```\n\n**DEMO**  \nhttps://riversun.github.io/jsframe/examples/v150/toast.html\n\n[![toast](https://riversun.github.io/jsframe/capture/toastc.gif)](https://riversun.github.io/jsframe/examples/v150/toast.html)\n\n\n## Settings for preset 'material'\n\nYou can use [font-awesome](https://fontawesome.com/icons?d=gallery&m=free) for titlebar icons.\n\n[![toast](https://riversun.github.io/jsframe/capture/img_06_material.png)](https://riversun.github.io/jsframe/examples/v150/preset_material.html)\n\nFor material, describe the settings using **appearanceParam** as below.\n\n```js\n{\nname: `Win2`,\ntitle: `Material style`,\nleft: 360, top: 40, width: 320, height: 220, minWidth: 200, minHeight: 110,\nappearanceName: 'material',\nappearanceParam: {\n    border: {\n        shadow: '2px 2px 10px  rgba(0, 0, 0, 0.5)',\n        width: 0,\n        radius: 6,\n    },\n    titleBar: {\n        color: 'white',\n        background: '#4784d4',\n        leftMargin: 40,\n        height: 30,\n        fontSize: 14,\n        buttonWidth: 36,\n        buttonHeight: 16,\n        buttonColor: 'white',\n        buttons: [ // buttons on the right\n            {\n\t\t//Set font-awesome fonts(https://fontawesome.com/icons?d=gallery&m=free)\n                fa: 'fas fa-times',//code of font-awesome\n                name: 'closeButton',\n                visible: true // visibility when window is created.\n            },\n            {\n                fa: 'fas fa-expand-arrows-alt',\n                name: 'maximizeButton',\n                visible: true\n            },\n            {\n                fa: 'fas fa-compress-arrows-alt',\n                name: 'minimizedButton',\n                visible: false\n            },\n        ],\n        buttonsOnLeft: [ //buttons on the left\n            {\n                //Set font-awesome fonts(https://fontawesome.com/icons?d=gallery&m=free)\n                fa: 'fas fa-bars',\n                name: 'menu',\n                visible: true,\n                //html to show when this button is clicked.\n                childMenuHTML: '<div class=\"list-group\">' +\n                    '  <div name=\"menu1\" class=\"list-group-item list-group-item-action py-2\">Menu Item 01</div>' +\n                    '  <div name=\"menu2\" class=\"list-group-item list-group-item-action py-2\">Menu Item 02</div>' +\n                    '  <div name=\"menu3\" class=\"list-group-item list-group-item-action py-2\">Menu Item 03</div>' +\n                    '</div>',\n                childMenuWidth: 300\n            },\n        ],\n    },\n},\nstyle: {\n    backgroundColor: 'rgba(0,0,0,0.8)',\n    overflow: 'hidden',\n    width: '100%',\n},\n\nhtml: 'something'\n}\n```\n\n\n## Window operation\n\n**Close window**\n\n```js\nframe.closeFrame();\n```\n\n**Hide Window**\n\n```js\nframe.hide();\n```\n\n**Focus window (and pull up to the front)**\n\n```js\nframe.requestFocus();\n```\n\n**Get window by name**\n\n```js\nvar frame = jsFrame.getWindowByName('my-window');\n```\n\n\n\n## Window operation helper\n\nSetting frame#setControl enables the mode to automatically change the window size when the button on the title bar is pressed.\n\n```js\nframe.setControl({\n        maximizeButton: 'maximizeButton',//Name of the button on framecomponent to maximize when pressed.\n        demaximizeButton: 'restoreButton',//Name of the button on framecomponent to de-maximize when pressed.\n        maximizeWithoutTitleBar: true,//If true,hide the title bar and maximize the content part.\n        restoreKey: 'Escape',//If maximizeWithoutTitleBar is true,de-maximize the window when the key specified here is pushed.\n        minimizeButton: 'minimizeButton',//Name of the button on framecomponent to minimize when pressed.\n        deminimizeButton: 'deminimizeButton',//Name of the button on framecomponent to de-minimize when pressed.\n        hideButton: 'closeButton',//Name of the button on framecomponent to hide when pressed.\n        animation: true,//If true,execute animation during window size changing\n        animationDuration: 150,//Duration of animation\n    });\n```\n\n**DEMO**\nhttps://riversun.github.io/jsframe/examples/v150/window_control.html\n\n\n### Handling events for window operation events.\n\n```js\nframe.control.on('maximized', (frame, info) => {\n           jsFrame.showToast({\n               text: 'Press \"ESC\" to minimize.', align: 'center'\n           });\n       });\n```\n\n<table>\n<tr><td>EventType</td><td>Description</td></tr>\n<tr><td>maximized</td><td>Called when maximazation is finished.</td></tr>\n<tr><td>demaximized</td><td>Called when de-maximazation is finished.</td></tr>\n<tr><td>minimized</td><td>Called when minimization is finished.</td></tr>\n<tr><td>deminimized</td><td>Called when de-minimization is finished.</td></tr>\n<tr><td>hid</td><td>Called when hiding is finished.</td></tr>\n<tr><td>dehided</td><td>Called when de-hiding is finished.</td></tr>\n</table>       \n\n### Do sizing operation manually\nYou can write window size operation manually like below\n\n```js\n\n        frame.on('maximizeButton', 'click', (_frame, evt) => {\n\n            _frame.control.doMaximize({\n                hideTitleBar: false,\n                duration: 200,\n                restoreKey: 'Escape',\n                restoreDuration: 100,\n                callback: (frame, info) => {\n                    frame.requestFocus();\n                },\n                restoreCallback: (frame, info) => {\n                    jsFrame.showToast({\n                        text: frame.getName() + ' ' + info.eventType\n                    });\n                },\n            });\n        });\n```        \n\n\n## JSFrame initialization parameters\n\n```js\nthis.jsFrame = new JSFrame({\n    fixed:true,//(Default)If true, it will be fixed to the screen even if the contents (background) scrolls.\n    parentElement:document.body,//Set element to attach jsFrame.\n    horizontalAlign: 'right',// If 'right' is set, the anchor is set at the right edge.If you specify the position of frame with 'left' in this mode, Make the value negative.Default is 'left'\n    verticalAlign: 'bottom',//If 'bottom' is set, the anchor is set at the bottom edge.Default is 'bottom'\n});\n\n```\n\n## Frame creation initialization parameters\n\n```js\nconst frame = jsFrame.create(\n    {\n        name: 'my-window-name',//Window name.Unique name is required.\n        title: 'Window0',//Window title\n        left: 20,//x coordinate of the upper left corner of the window\n        top: 20,//y coordinate of the upper left corner of the window\n        width: 320,//width of the window\n        height: 220,//height of the window\n        minWidth: 160,//The minimum width of the window\n        minHeight: 100,//The minimum height of the window\n        movable: true,//true:You can move the window with mouse\n        resizable: true,//true:You can resize the window with mouse\n        appearance: appearanceObj,//Appearance object\n        appearanceName: 'yosemite',//Preset name of appearance(Not with 'appearance')\n        style: {//Style of the content.Can be specified just like inline style attribute.\n            backgroundColor: 'rgba(220,220,220,0.8)',//Ex.Background color of content(Opacity can be specified)\n            overflow: 'auto',//Ex.What to do when the drawing extends beyond the content area\n        },\n        html: 'Contents',//HTML shown in the content(Not with 'url')\n        url: 'content01.html',//The URL for contents.To be shown in iframe.\n        urlLoaded: (frame) = {}//Callback function when url is finished loading.\n\n    });\n```    \n\n# using npm module with webpack\n\nAfter install **jsframe.js** , you can use it like below.\n\n```js\nimport {JSFrame} from 'jsframe';\n```\n\nYou can add an alias in your webpack config like this:\n\n```js\nmodule.exports = {\n    ...\n    resolve: {\n        alias: {\n            'jsframe': 'jsframe.js/dist/jsframe.min.js',\n        }\n    },\n    ...\n};\n\n```\n\n# Examples\nAll examples are included in the project. You can modify,customize example after cloning the project\n\n```\ngit clone https://github.com/riversun/JSFrame.js.git\n```\n\n# Classese and Methods/Members\n### org.riversun.JSFrame class\n#### JSFrame is a frame builder and management class.\n\n|Methods|Details|\n|---|---|\n|**CIfFrame** createFrame(left, top, width, height, **CFrameAppearance**)|create **CIFFrame** instance.CIfFrame is a kind of 'window' called frame.|\n|**CFrameAppearance** createFrameAppearance()|create **CFrameAppearance** instance.<br>**CFrameAppearance** is a class for frame appearance.You can modify frame's looking as you like.|\n\n<hr>\n\n### CIfFrame class\n#### CIfFrame is like a window.It's draggable and movable.You can design it.\n\n|Methods|Details|\n|---|---|\n|CIfFrame setTitle(str)|Set caption in the title bar|  \n|CIfFrame setResizable(boolean)|Set whether the window can be resized|  \n|CIfFrame setMovable(boolean)|Set whether the window can be moved|\n|CIfFrame setTitleBarClassName(classNameForDefault, classNameForFocused)|Set title bar style class name|\n|Object getFrameView()|Get window content element.<br>It's just a 'div' element.So you can handle it as a 'div' element.<br>ex)<br>**frame.getFrameView().innerHTML='xxxx';**|\n|Promise setUrl(url)|Open a page specified as *url* in the IFrame mode.<br>It returns Promise.If you want to execute something at the timing of opening url,use 'then' .<br>ex)<br>**frame.setUrl('http://something').then(function(){frame.show();});**|\n|CIfFrame show()|Show frame|\n|CIfFrame requestFocus()|Requests that this frame gets the focus.<br>Focus and the window comes to the forefront|\n|CIfFrame setSize(width,height)|set size of frame|\n|CIfFrame setPosition(x,y,anchor)|anchor is optional.<br>Default anchor is 'LEFT_TOP'<br>You can set followings for anchor.<br>'LEFT_TOP',<br>'CENTER_TOP',<br>'RIGHT_TOP',<br>'LEFT_CENTER',<br>'CENTER_CENTER',<br>'RIGHT_CENTER',<br>'LEFT_BOTTOM',<br>'CENTER_BOTTOM',<br>'RIGHT_BOTTOM'|\n\n<hr>\n\n\n### CFrameAppearance class\n#### CFrameAppearance is a class for frame appearance.You can modify frame's looking as you like.\n\n|Methods|Details|\n|---|---|\n|CFrameAppearance setUseIFrame(boolean)|If 'true' ,You can set CIfFrame 'IFrame mode' and you can use CIfFrame#setUrl method for opening specified url.|\n|void onInitialize()|Since this callback method is called at frame initialization,Initialization processing such as adding frameComponent should be written here.|\n\n|Members|Details|\n|---|---|\n|showTitleBar|true or false|\n|showCloseButton|true or false<br>|\n|titleBarCaptionFontSize|ex)'12px'|\n|titleBarCaptionFontWeight|ex)'bold'|\n|titleBarHeight|ex)'24px'|\n|titleBarCaptionLeftMargin|ex)'10px'|\n|titleBarColorDefault|Color for not focused state.<br>ex)'#dddddd'|\n|titleBarColorFocused|Color for focused state.<br>ex)'white'|\n|titleBarCaptionColorDefault|Color for not focused state.<br>ex)'black'|\n|titleBarCaptionColorFocused|Color for focused state.<br>ex)'red'|\n|titleBarBorderBottomDefault|Style for bottom of the title bar.<br>ex)'1px solid rgba(0,0,0,0.2)'|\n|titleBarBorderBottomFocused|If null,'titleBarBorderBottomDefault' will be applied.|\n|frameBorderRadius|Corner radius of the window.<br>ex)'6px'|\n|frameBorderWidthDefault|Width of border line in the not focused state.<br>ex)'1px'|\n|frameBorderWidthFocused|Width of border line in the focused state.<br>ex)'1px'|\n|frameBorderColorDefault|Color of border line in the not focused state.<br>ex)'rgba(1, 1, 1, 0.2)'|\n|frameBorderColorFocused|Color of border line in the focused state.<br>ex)'rgba(1, 1, 1, 0.2)'|\n|frameBorderStyle|Border line style<br>ex)solid|\n|frameBoxShadow|Shadow style of the frame<br>ex) '5px 5px 10px  rgba(0, 0, 0, 0.3)'|\n|frameBackgroundColor|Background color of the frame<br>ex)'white'|\n\n<hr>\n\n### V1.00 Examples (available for latest version)\n\n\n## Example:Basic\n**DEMO**  \nhttps://riversun.github.io/jsframe/examples/ex01/index.html  \n\n[![ex00](https://riversun.github.io/jsframe/capture/ex01.png)](https://riversun.github.io/jsframe/examples/ex01/index.html)\n\n## Example:Window with Iframe contents\n**DEMO**  \nhttps://riversun.github.io/jsframe/examples/ex02/index.html  \n\n[![ex00](https://riversun.github.io/jsframe/capture/ex02.png)](https://riversun.github.io/jsframe/examples/ex02/index.html)\n\n## Example:OS X style\n\n**DEMO**  \nhttps://riversun.github.io/jsframe/examples/ex03/index.html  \n\n[![ex00](https://riversun.github.io/jsframe/capture/ex03.png)](https://riversun.github.io/jsframe/examples/ex03/index.html)\n\n## Example:Win style\n\n**DEMO**  \nhttps://riversun.github.io/jsframe/examples/ex04/index.html  \n\n[![ex00](https://riversun.github.io/jsframe/capture/ex04.png)](https://riversun.github.io/jsframe/examples/ex04/index.html)\n\n\n## Example:Various styles\n**DEMO**  \nhttps://riversun.github.io/jsframe/examples/ex05/index.html  \n\n[![ex00](https://riversun.github.io/jsframe/capture/ex05.png)](https://riversun.github.io/jsframe/examples/ex05/index.html)\n\n\n## Example:Animations #1\n**DEMO**  \nhttps://riversun.github.io/jsframe/examples/ex06/index.html  \n\n[![ex00](https://riversun.github.io/jsframe/capture/ex06.png)](https://riversun.github.io/jsframe/examples/ex06/index.html)\n\n### All assets moved from mysvn\n"
  },
  {
    "path": "lib/jsframe.min.js.LICENSE.txt",
    "content": "/*! event-emitter(https://github.com/riversun/event-emitter) v1.5.2 Copyright (c) 2020 riversun.org@gmail.com */\n\n/*! event-listener-helper(https://github.com/riversun/event-listener-helper) v1.1.3 Copyright (c) 2020 riversun.org@gmail.com */\n\n/*! jsframe v1.6.8 Copyright (c) 2007-2020 Tom Misawa */\n\n/*! merge-deeply v2.1.1 Copyright (c) 2019-2020 riversun.org@gmail.com */\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"jsframe.js\",\n  \"version\": \"1.6.8\",\n  \"description\": \"It is an independent lightweight multi-window library for javascript.\\r - Create various popup windows.\\r - Styling the appearance flexibly.\",\n  \"main\": \"lib/jsframe.min.js\",\n  \"scripts\": {\n    \"start\": \"webpack-dev-server\",\n    \"build\": \"webpack --config webpack.config.js --mode development\",\n    \"release\": \"cross-env NODE_ENV=test webpack --config webpack.config.js --mode production\",\n    \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/riversun/JSFrame.js.git\"\n  },\n  \"author\": \"Tom Misawa <riversun.org@gmail.com> (https://github.com/riversun)\",\n  \"license\": \"MIT\",\n  \"bugs\": {\n    \"url\": \"https://github.com/riversun/JSFrame.js/issues\"\n  },\n  \"keywords\": [\n    \"floating\",\n    \"popup\",\n    \"window\",\n    \"toast\",\n    \"js\",\n    \"ui\"\n  ],\n  \"homepage\": \"https://github.com/riversun/JSFrame.js#readme\",\n  \"devDependencies\": {\n    \"@babel/core\": \"^7.19.6\",\n    \"@babel/preset-env\": \"^7.19.4\",\n    \"babel-loader\": \"^8.2.5\",\n    \"cross-env\": \"^7.0.3\",\n    \"css-loader\": \"^5.2.7\",\n    \"style-loader\": \"^2.0.0\",\n    \"webpack\": \"^5.74.0\",\n    \"webpack-cli\": \"^4.9.2\",\n    \"webpack-dev-server\": \"^4.8.1\"\n  },\n  \"dependencies\": {\n    \"@riversun/event-emitter\": \"^1.5.2\",\n    \"event-listener-helper\": \"^1.1.3\",\n    \"merge-deeply\": \"^2.1.1\"\n  }\n}\n"
  },
  {
    "path": "public/examples/jaq/chatbot_ui.html",
    "content": "<!DOCTYPE html>\n<!--\n    Example of chatbot UI\n-->\n<html>\n<head>\n    <title>JsFrame.js ChatBot UI Example</title>\n    <meta charset=\"utf-8\">\n    <meta name=\"description\" content=\"JSFrame  chatbot UI example\">\n    <link rel=\"stylesheet\" href=\"https://use.fontawesome.com/releases/v5.6.3/css/all.css\"\n          integrity=\"sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/\" crossorigin=\"anonymous\">\n    <style type=\"text/css\">\n        body {\n            font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Noto Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\";\n        }\n\n        .btn-chat {\n            box-shadow: 2px 3px 16px rgba(0, 0, 0, .6);\n            border-radius: 50%;\n            text-align: center;\n            vertical-align: middle;\n            position: fixed;\n            color: #fff;\n            background-color: #007bff;\n            border-color: #007bff;\n            transition: transform 0.2s linear, opacity 0.5s;\n            transform: scale(0.9);\n            opacity: 0;\n        }\n\n        .btn-on {\n            opacity: 1;\n        }\n\n        .btn-chat:hover {\n            color: #fff;\n            background-color: #0069d9;\n            border-color: #0062cc;\n            transform: scale(1.0);\n\n        }\n\n    </style>\n</head>\n<body style=\"overflow: hidden;background: url('https://upload.wikimedia.org/wikipedia/commons/thumb/c/cb/Tokyo_Tower_Afterglow_3.JPG/1280px-Tokyo_Tower_Afterglow_3.JPG') 50% no-repeat fixed; background-size: cover;\">\n\n\n<div style=\"color:#f5f5f5;text-shadow: 2px 2px 1px #333333;\"><a\n        href=\"https://github.com/riversun/JSFrame.js\">JSFrame.js</a> ChatBot UI Frame\n</div>\n\n<script src=\"../../jsframe.js\"></script>\n<script>\n\n    class ChatUI {\n\n        constructor() {\n\n            this.jsFrame = new JSFrame({\n                horizontalAlign: 'right',\n                verticalAlign: 'bottom',\n            });\n\n            this.initParam = {\n                btnRight: 20,\n                btnBottom: 20,\n                btnSize: 60,\n                btnFontSize: 25,\n                frmWidth: 300,\n                frmHeight: 500,\n                frmHeightMin: 300,\n                frmWidthMin: 200,\n                frmTitleHeight: 40,\n            };\n\n            this.frameName = 'chat_window';\n            this.buttonId = 'chat_wakeup';\n\n        }\n\n        /**\n         * Build chat start button\n         */\n        buildChatButton() {\n\n            const p = this.initParam;\n            const btnRight = p.btnRight;\n            const btnBottom = p.btnBottom;\n            const btnSize = p.btnSize;\n            const btnFontSize = p.btnFontSize;\n\n            const showChatBtn = document.createElement('div')\n            showChatBtn.id = this.buttonId;\n            showChatBtn.className = 'btn-chat';\n            showChatBtn.innerHTML = '<i class=\"fas fa-comment-alt\"></i>';\n            showChatBtn.onclick = this.showChatWindow.bind(this);\n\n            const style = showChatBtn.style;\n            style.right = btnRight + 'px';\n            style.bottom = btnBottom + 'px';\n            style.width = btnSize + 'px';\n            style.height = style.width;\n            style.lineHeight = style.width;\n            style.fontSize = btnFontSize + 'px';\n\n            document.body.appendChild(showChatBtn);\n        }\n\n        /**\n         * Makes the chat button visible or invisible.\n         * @param isVisible\n         */\n        setChatButtonVisible(isVisible) {\n            const chatButton = document.querySelector(`#${this.buttonId}`);\n            if (isVisible) {\n                //chatButton.style.display = 'inline';\n                chatButton.classList.add('btn-on');\n            } else {\n                //chatButton.style.display = 'none';\n                chatButton.classList.remove('btn-on');\n\n            }\n        }\n\n        /*\n        *  Create chat window\n        */\n        buildChatWindow() {\n\n            const p = this.initParam;\n            const frmWidth = p.frmWidth;\n            const frmHeight = p.frmHeight;\n            const frmHeightMin = p.frmHeightMin;\n            const frmWidthMin = p.frmWidthMin;\n            const frmTitleHeight = p.frmTitleHeight;\n            const frmLeft = -(p.btnRight + frmWidth);\n            const frmTop = -(p.btnBottom + p.btnSize + frmHeight);\n\n            /**\n             * Coordinate(left,top) where the window is minimzied\n             * @type {{x: number, y: number}}\n             */\n            const vanishingPoint = {\n                x: frmLeft + frmWidth,\n                y: frmTop + frmHeight - frmTitleHeight\n            };\n\n            //Create chat window\n            this.frame = this.jsFrame.create({\n                name: this.frameName,\n                title: `JSFrame Chat`,\n                left: frmLeft,\n                top: frmTop,\n                width: frmWidth,\n                height: frmHeight,\n                minWidth: frmWidthMin,\n                minHeight: frmHeightMin,\n                appearanceName: 'material',\n                appearanceParam: {\n                    border: {\n                        shadow: '2px 2px 10px  rgba(0, 0, 0, 0.5)',\n                        width: 0,\n                        radius: 6,\n                    },\n                    titleBar: {\n                        color: 'white',\n                        background: '#4784d4',\n                        leftMargin: 40,\n                        height: frmTitleHeight,\n                        fontSize: 14,\n                        buttonWidth: 36,\n                        buttonHeight: 16,\n                        buttonColor: 'white',\n                        buttons: [\n                            {\n                                fa: 'fas fa-times',\n                                name: 'hideButton',\n                                visible: true\n                            },\n                        ],\n                        buttonsOnLeft: [\n                            {\n                                fa: 'fas fa-comment-alt',\n                                name: 'icon',\n                                visible: true\n                            },\n                        ],\n                    },\n                },\n                style: {\n                    backgroundColor: 'rgba(255,255,255,0.8)',\n                    overflow: 'auto'\n                },\n                html: 'Chat UI Here',\n                //url: // Chat URL here\n            });\n\n            //Enable helper to act on window's common operations(maximization/minimization and something)\n            this.frame.setControl({\n                animation: true,\n                animationDuration: 200,\n            });\n\n            //Set click event when the close button is clicked\n            this.frame.on('hideButton', 'click', (_frame, evt) => {\n                _frame.control.doHide({\n                    offset: vanishingPoint,\n                    align: 'ABSOLUTE',\n                    callback: (frame, info) => {\n                        this.setChatButtonVisible(true);\n                    }\n                })\n            });\n\n            //Minimize the window first to memory the  initial window position and size.\n            this.frame.control.doHide({\n                silent: true,//means invisible action\n                duration: 0,\n                align: 'ABSOLUTE',//need to set the offset point where window is minimized\n                offset: vanishingPoint,\n            });\n\n        }\n\n        showChatWindow() {\n            const frame = this.jsFrame.getWindowByName(this.frameName);\n\n            //Open minimized window\n            frame.control.doDehide({\n                callback: (frame, info) => {\n                    this.setChatButtonVisible(false);\n                }\n            });\n        }\n\n        build() {\n            this.buildChatButton();\n            this.buildChatWindow();\n            this.setChatButtonVisible(true);\n        }\n\n\n    }\n\n    new ChatUI().build();\n\n\n</script>\n\n</body>\n</html>"
  },
  {
    "path": "public/examples/jaq/event_handling.html",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n    <title>JsFrame.js preset style 'yosemite'</title>\n    <meta charset=\"utf-8\">\n    <link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css\">\n</head>\n<body style=\"background: url('http://upload.wikimedia.org/wikipedia/commons/d/d6/Half_Dome_from_Glacier_Point%2C_Yosemite_NP_-_Diliff.jpg') 50% no-repeat fixed; background-size: cover;\">\n<script src=\"https://riversun.github.io/jsframe/jsframe.js\"></script>\n\n<script>\n    function start() {\n\n        const jsFrame = new JSFrame();\n        const frames = [];\n\n        const innerHTML = '<div class=\"container\">' +\n            '<div class=\"py-5 text-center\">\\n' +\n            '<h2>My contents</h2>\\n' +\n            '<p class=\"lead\">コンテンツを記述します.</p>\\n' +\n            '<div class=\"col-12 text-center\">\\n' +\n            '<button id=\"my_button_01\" type=\"button\" class=\"btn btn-primary\">ボタン1</button>\\n' +\n            '<button id=\"my_button_02\" type=\"button\" class=\"btn btn-secondary\">ボタン2</button>\\n' +\n            '<button id=\"my_button_03\" type=\"button\" class=\"btn btn-success\">ボタン3</button>\\n' +\n            '</div></div></div>'\n\n\n        for (let i = 0; i < 2; i++) {\n\n            const frame = jsFrame.create({\n                name: `MyWindow${i}`,\n                title: `Window${i}`,\n                left: 20 + 420 * i, top: 40, width: 400, height: 260,\n                minWidth: 160, minHeight: 100,\n                appearanceName: 'yosemite',\n                style: {\n                    backgroundColor: 'rgba(255,255,255,0.9)',\n                    overflow: 'auto'\n                },\n                html: innerHTML\n            });\n            //プリセットアピアランスのボタンを取得する\n            frame.on('minimizeButton', 'click', (_frame, evt) => {\n                const size = _frame.getSize();\n                _frame.setSize(size.width - 20, size.height - 20);\n            });\n\n            frame.on('zoomButton', 'click', (_frame, evt) => {\n                const size = _frame.getSize();\n                _frame.setSize(size.width + 20, size.height + 20);\n            });\n            frame.on('closeButton', 'click', (_frame, evt) => {\n                _frame.closeFrame();\n            });\n\n            const htmlButtonListener = (_frame, evt) => {\n                const jsFrame = new JSFrame();\n                jsFrame.showToast({\n                    html: `${_frame.getName()}の${evt.target.id}がクリックされた`,\n                    align:'top'\n                });\n            };\n\n            //HTML内の要素を取得する場合はセレクタ表記で\n            frame.on('#my_button_01', 'click', htmlButtonListener);\n            frame.on('#my_button_02', 'click', htmlButtonListener);\n            frame.on('#my_button_03', 'click', htmlButtonListener);\n            frame.show();\n            frames.push(frame);\n        }\n        frames[0].requestFocus();\n    }\n\n    start();\n</script>\n\n</body>\n</html>"
  },
  {
    "path": "public/examples/jaq/iframe.html",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n    <title>JsFrame.js example - Use IFrame</title>\n    <meta charset=\"utf-8\">\n    <meta name=\"description\" content=\"A javascript popup/floating window library.\">\n</head>\n<body>\n<script src=\"https://riversun.github.io/jsframe/jsframe.js\"></script>\n<script>\n    const jsFrame = new JSFrame();\n\n    function start() {\n\n        const frame01 = jsFrame.create({\n            title: 'ウィンドウ1',\n            name: 'window01',\n            left: 20, top: 20, width: 320, height: 160,\n            url: 'iframe_content01.html',//iframe内に表示するURL\n            //urlLoaded:iframe読み込み終了後に呼び出されるコールバック\n            urlLoaded: (frame) => {\n                frame.on('#my_button_01', 'click', (_frame, evt) => {\n                    showToast(`${_frame.getName()}の${evt.target.id}がクリックされた`);\n                });\n                frame.on('#my_button_02', 'click', (_frame, evt) => {\n                    _frame.closeFrame();\n                });\n            }\n        });\n        frame01.show();\n\n        const frame02 = jsFrame.create({\n            title: 'ウィンドウ2',\n            name: 'window02',\n            left: 360, top: 20, width: 320, height: 160,\n        });\n        //#setUrlメソッドを使ってiframe内に表示するURLを指定することも可能\n        //#setUrlはPromiseを返す、iframeのロードが終了するとコールバックされる\n        frame02.setUrl('iframe_content02.html').then((frame, evt) => {\n            frame.on('#my_button_04', 'click', (_frame, evt) => {\n                showToast(`${_frame.getName()}の${evt.target.id}がクリックされた`);\n            });\n            frame.show();\n        });\n    }\n\n    function showToast(str) {\n        jsFrame.showToast({\n            html: str, align: 'top'\n        });\n    }\n\n    start();\n</script>\n\n</body>\n</html>\n"
  },
  {
    "path": "public/examples/jaq/iframe_content01.html",
    "content": "<html>\n<head>\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n    <link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css\">\n</head>\n<body style=\"background:white\">\n\n<div class=\"col-12 text-center\">\n    <br>\n    <h5>This is iframe content01</h5>\n    <button id=\"my_button_01\" type=\"button\" class=\"btn btn-primary\">ボタン1</button>\n    <button id=\"my_button_02\" type=\"button\" class=\"btn btn-secondary\">ボタン2</button>\n    <button id=\"my_button_03\" type=\"button\" class=\"btn btn-success\">ボタン3</button>\n</div>\n\n</body>\n</html>\n"
  },
  {
    "path": "public/examples/jaq/iframe_content02.html",
    "content": "<html>\n<head>\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n    <link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css\">\n</head>\n<body style=\"background:white\">\n\n<div class=\"col-12 text-center\">\n    <br>\n    <h5>This is iframe content02</h5>\n    <button id=\"my_button_04\" type=\"button\" class=\"btn btn-danger\">ボタン4</button>\n</div>\n\n</body>\n</html>\n"
  },
  {
    "path": "public/examples/jaq/iframe_content03.html",
    "content": "<html>\n<head>\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n    \n</head>\n<body style=\"color:#555555;background:rgba(255,255,255,0.9)\">\n\n<h5>Click maximize button or minimize button</h5>\n<pre>\nACT I\nSCENE I. Elsinore. A platform before the castle.\nFRANCISCO at his post. Enter to him BERNARDO\nBERNARDO\nWho's there?\nFRANCISCO\nNay, answer me: stand, and unfold yourself.\nBERNARDO\nLong live the king!\nFRANCISCO\nBernardo?\nBERNARDO\nHe.\nFRANCISCO\nYou come most carefully upon your hour.\nBERNARDO\n'Tis now struck twelve; get thee to bed, Francisco.\nFRANCISCO\nFor this relief much thanks: 'tis bitter cold,\nAnd I am sick at heart.\nBERNARDO\nHave you had quiet guard?\nFRANCISCO\nNot a mouse stirring.\nBERNARDO\nWell, good night.\nIf you do meet Horatio and Marcellus,\nThe rivals of my watch, bid them make haste.\nFRANCISCO\nI think I hear them. Stand, ho! Who's there?\nEnter HORATIO and MARCELLUS\n\nHORATIO\nFriends to this ground.\nMARCELLUS\nAnd liegemen to the Dane.\nFRANCISCO\nGive you good night.\nMARCELLUS\nO, farewell, honest soldier:\nWho hath relieved you?\nFRANCISCO\nBernardo has my place.\nGive you good night.\nExit\n\nMARCELLUS\nHolla! Bernardo!\nBERNARDO\nSay,\nWhat, is Horatio there?\nHORATIO\nA piece of him.\nBERNARDO\nWelcome, Horatio: welcome, good Marcellus.\nMARCELLUS\nWhat, has this thing appear'd again to-night?\nBERNARDO\nI have seen nothing.\nMARCELLUS\nHoratio says 'tis but our fantasy,\nAnd will not let belief take hold of him\nTouching this dreaded sight, twice seen of us:\nTherefore I have entreated him along\nWith us to watch the minutes of this night;\nThat if again this apparition come,\nHe may approve our eyes and speak to it.\nHORATIO\nTush, tush, 'twill not appear.\nBERNARDO\nSit down awhile;\nAnd let us once again assail your ears,\nThat are so fortified against our story\nWhat we have two nights seen.\nHORATIO\nWell, sit we down,\nAnd let us hear Bernardo speak of this.\nBERNARDO\nLast night of all,\nWhen yond same star that's westward from the pole\nHad made his course to illume that part of heaven\nWhere now it burns, Marcellus and myself,\nThe bell then beating one,--\nEnter Ghost\n\nMARCELLUS\nPeace, break thee off; look, where it comes again!\nBERNARDO\nIn the same figure, like the king that's dead.\nMARCELLUS\nThou art a scholar; speak to it, Horatio.\nBERNARDO\nLooks it not like the king? mark it, Horatio.\nHORATIO\nMost like: it harrows me with fear and wonder.\nBERNARDO\nIt would be spoke to.\nMARCELLUS\nQuestion it, Horatio.\nHORATIO\nWhat art thou that usurp'st this time of night,\nTogether with that fair and warlike form\nIn which the majesty of buried Denmark\nDid sometimes march? by heaven I charge thee, speak!\nMARCELLUS\nIt is offended.\nBERNARDO\nSee, it stalks away!\nHORATIO\nStay! speak, speak! I charge thee, speak!\nExit Ghost\n\nMARCELLUS\n'Tis gone, and will not answer.\nBERNARDO\nHow now, Horatio! you tremble and look pale:\nIs not this something more than fantasy?\nWhat think you on't?\nHORATIO\nBefore my God, I might not this believe\nWithout the sensible and true avouch\nOf mine own eyes.\nMARCELLUS\nIs it not like the king?\nHORATIO\nAs thou art to thyself:\nSuch was the very armour he had on\nWhen he the ambitious Norway combated;\nSo frown'd he once, when, in an angry parle,\nHe smote the sledded Polacks on the ice.\n'Tis strange.\nMARCELLUS\nThus twice before, and jump at this dead hour,\nWith martial stalk hath he gone by our watch.\nHORATIO\nIn what particular thought to work I know not;\nBut in the gross and scope of my opinion,\nThis bodes some strange eruption to our state.\nMARCELLUS\nGood now, sit down, and tell me, he that knows,\nWhy this same strict and most observant watch\nSo nightly toils the subject of the land,\nAnd why such daily cast of brazen cannon,\nAnd foreign mart for implements of war;\nWhy such impress of shipwrights, whose sore task\nDoes not divide the Sunday from the week;\nWhat might be toward, that this sweaty haste\nDoth make the night joint-labourer with the day:\nWho is't that can inform me?\nHORATIO\nThat can I;\nAt least, the whisper goes so. Our last king,\nWhose image even but now appear'd to us,\nWas, as you know, by Fortinbras of Norway,\nThereto prick'd on by a most emulate pride,\nDared to the combat; in which our valiant Hamlet--\nFor so this side of our known world esteem'd him--\nDid slay this Fortinbras; who by a seal'd compact,\nWell ratified by law and heraldry,\nDid forfeit, with his life, all those his lands\nWhich he stood seized of, to the conqueror:\nAgainst the which, a moiety competent\nWas gaged by our king; which had return'd\nTo the inheritance of Fortinbras,\nHad he been vanquisher; as, by the same covenant,\nAnd carriage of the article design'd,\nHis fell to Hamlet. Now, sir, young Fortinbras,\nOf unimproved mettle hot and full,\nHath in the skirts of Norway here and there\nShark'd up a list of lawless resolutes,\nFor food and diet, to some enterprise\nThat hath a stomach in't; which is no other--\nAs it doth well appear unto our state--\nBut to recover of us, by strong hand\nAnd terms compulsatory, those foresaid lands\nSo by his father lost: and this, I take it,\nIs the main motive of our preparations,\nThe source of this our watch and the chief head\nOf this post-haste and romage in the land.\nBERNARDO\nI think it be no other but e'en so:\nWell may it sort that this portentous figure\nComes armed through our watch; so like the king\nThat was and is the question of these wars.\nHORATIO\nA mote it is to trouble the mind's eye.\nIn the most high and palmy state of Rome,\nA little ere the mightiest Julius fell,\nThe graves stood tenantless and the sheeted dead\nDid squeak and gibber in the Roman streets:\nAs stars with trains of fire and dews of blood,\nDisasters in the sun; and the moist star\nUpon whose influence Neptune's empire stands\nWas sick almost to doomsday with eclipse:\nAnd even the like precurse of fierce events,\nAs harbingers preceding still the fates\nAnd prologue to the omen coming on,\nHave heaven and earth together demonstrated\nUnto our climatures and countrymen.--\nBut soft, behold! lo, where it comes again!\nRe-enter Ghost\n\nI'll cross it, though it blast me. Stay, illusion!\nIf thou hast any sound, or use of voice,\nSpeak to me:\nIf there be any good thing to be done,\nThat may to thee do ease and grace to me,\nSpeak to me:\nCock crows\n\nIf thou art privy to thy country's fate,\nWhich, happily, foreknowing may avoid, O, speak!\nOr if thou hast uphoarded in thy life\nExtorted treasure in the womb of earth,\nFor which, they say, you spirits oft walk in death,\nSpeak of it: stay, and speak! Stop it, Marcellus.\nMARCELLUS\nShall I strike at it with my partisan?\nHORATIO\nDo, if it will not stand.\nBERNARDO\n'Tis here!\nHORATIO\n'Tis here!\nMARCELLUS\n'Tis gone!\nExit Ghost\n\nWe do it wrong, being so majestical,\nTo offer it the show of violence;\nFor it is, as the air, invulnerable,\nAnd our vain blows malicious mockery.\nBERNARDO\nIt was about to speak, when the cock crew.\nHORATIO\nAnd then it started like a guilty thing\nUpon a fearful summons. I have heard,\nThe cock, that is the trumpet to the morn,\nDoth with his lofty and shrill-sounding throat\nAwake the god of day; and, at his warning,\nWhether in sea or fire, in earth or air,\nThe extravagant and erring spirit hies\nTo his confine: and of the truth herein\nThis present object made probation.\nMARCELLUS\nIt faded on the crowing of the cock.\nSome say that ever 'gainst that season comes\nWherein our Saviour's birth is celebrated,\nThe bird of dawning singeth all night long:\nAnd then, they say, no spirit dares stir abroad;\nThe nights are wholesome; then no planets strike,\nNo fairy takes, nor witch hath power to charm,\nSo hallow'd and so gracious is the time.\nHORATIO\nSo have I heard and do in part believe it.\nBut, look, the morn, in russet mantle clad,\nWalks o'er the dew of yon high eastward hill:\nBreak we our watch up; and by my advice,\nLet us impart what we have seen to-night\nUnto young Hamlet; for, upon my life,\nThis spirit, dumb to us, will speak to him.\nDo you consent we shall acquaint him with it,\nAs needful in our loves, fitting our duty?\nMARCELLUS\nLet's do't, I pray; and I this morning know\nWhere we shall find him most conveniently.\nExeunt\n\nSCENE II. A room of state in the castle.\nEnter KING CLAUDIUS, QUEEN GERTRUDE, HAMLET, POLONIUS, LAERTES, VOLTIMAND, CORNELIUS, Lords, and Attendants\nKING CLAUDIUS\nThough yet of Hamlet our dear brother's death\nThe memory be green, and that it us befitted\nTo bear our hearts in grief and our whole kingdom\nTo be contracted in one brow of woe,\nYet so far hath discretion fought with nature\nThat we with wisest sorrow think on him,\nTogether with remembrance of ourselves.\nTherefore our sometime sister, now our queen,\nThe imperial jointress to this warlike state,\nHave we, as 'twere with a defeated joy,--\nWith an auspicious and a dropping eye,\nWith mirth in funeral and with dirge in marriage,\nIn equal scale weighing delight and dole,--\nTaken to wife: nor have we herein barr'd\nYour better wisdoms, which have freely gone\nWith this affair along. For all, our thanks.\nNow follows, that you know, young Fortinbras,\nHolding a weak supposal of our worth,\nOr thinking by our late dear brother's death\nOur state to be disjoint and out of frame,\nColleagued with the dream of his advantage,\nHe hath not fail'd to pester us with message,\nImporting the surrender of those lands\nLost by his father, with all bonds of law,\nTo our most valiant brother. So much for him.\nNow for ourself and for this time of meeting:\nThus much the business is: we have here writ\nTo Norway, uncle of young Fortinbras,--\nWho, impotent and bed-rid, scarcely hears\nOf this his nephew's purpose,--to suppress\nHis further gait herein; in that the levies,\nThe lists and full proportions, are all made\nOut of his subject: and we here dispatch\nYou, good Cornelius, and you, Voltimand,\nFor bearers of this greeting to old Norway;\nGiving to you no further personal power\nTo business with the king, more than the scope\nOf these delated articles allow.\nFarewell, and let your haste commend your duty.\nCORNELIUS VOLTIMAND\nIn that and all things will we show our duty.\nKING CLAUDIUS\nWe doubt it nothing: heartily farewell.\nExeunt VOLTIMAND and CORNELIUS\n\nAnd now, Laertes, what's the news with you?\nYou told us of some suit; what is't, Laertes?\nYou cannot speak of reason to the Dane,\nAnd loose your voice: what wouldst thou beg, Laertes,\nThat shall not be my offer, not thy asking?\nThe head is not more native to the heart,\nThe hand more instrumental to the mouth,\nThan is the throne of Denmark to thy father.\nWhat wouldst thou have, Laertes?\nLAERTES\nMy dread lord,\nYour leave and favour to return to France;\nFrom whence though willingly I came to Denmark,\nTo show my duty in your coronation,\nYet now, I must confess, that duty done,\nMy thoughts and wishes bend again toward France\nAnd bow them to your gracious leave and pardon.\nKING CLAUDIUS\nHave you your father's leave? What says Polonius?\nLORD POLONIUS\nHe hath, my lord, wrung from me my slow leave\nBy laboursome petition, and at last\nUpon his will I seal'd my hard consent:\nI do beseech you, give him leave to go.\nKING CLAUDIUS\nTake thy fair hour, Laertes; time be thine,\nAnd thy best graces spend it at thy will!\nBut now, my cousin Hamlet, and my son,--\nHAMLET\n[Aside] A little more than kin, and less than kind.\nKING CLAUDIUS\nHow is it that the clouds still hang on you?\nHAMLET\nNot so, my lord; I am too much i' the sun.\nQUEEN GERTRUDE\nGood Hamlet, cast thy nighted colour off,\nAnd let thine eye look like a friend on Denmark.\nDo not for ever with thy vailed lids\nSeek for thy noble father in the dust:\nThou know'st 'tis common; all that lives must die,\nPassing through nature to eternity.\nHAMLET\nAy, madam, it is common.\nQUEEN GERTRUDE\nIf it be,\nWhy seems it so particular with thee?\nHAMLET\nSeems, madam! nay it is; I know not 'seems.'\n'Tis not alone my inky cloak, good mother,\nNor customary suits of solemn black,\nNor windy suspiration of forced breath,\nNo, nor the fruitful river in the eye,\nNor the dejected 'havior of the visage,\nTogether with all forms, moods, shapes of grief,\nThat can denote me truly: these indeed seem,\nFor they are actions that a man might play:\nBut I have that within which passeth show;\nThese but the trappings and the suits of woe.\nKING CLAUDIUS\n'Tis sweet and commendable in your nature, Hamlet,\nTo give these mourning duties to your father:\nBut, you must know, your father lost a father;\nThat father lost, lost his, and the survivor bound\nIn filial obligation for some term\nTo do obsequious sorrow: but to persever\nIn obstinate condolement is a course\nOf impious stubbornness; 'tis unmanly grief;\nIt shows a will most incorrect to heaven,\nA heart unfortified, a mind impatient,\nAn understanding simple and unschool'd:\nFor what we know must be and is as common\nAs any the most vulgar thing to sense,\nWhy should we in our peevish opposition\nTake it to heart? Fie! 'tis a fault to heaven,\nA fault against the dead, a fault to nature,\nTo reason most absurd: whose common theme\nIs death of fathers, and who still hath cried,\nFrom the first corse till he that died to-day,\n'This must be so.' We pray you, throw to earth\nThis unprevailing woe, and think of us\nAs of a father: for let the world take note,\nYou are the most immediate to our throne;\nAnd with no less nobility of love\nThan that which dearest father bears his son,\nDo I impart toward you. For your intent\nIn going back to school in Wittenberg,\nIt is most retrograde to our desire:\nAnd we beseech you, bend you to remain\nHere, in the cheer and comfort of our eye,\nOur chiefest courtier, cousin, and our son.\n</pre>\n\n\n</body>\n</html>\n"
  },
  {
    "path": "public/examples/jaq/index.html",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n    <title>JsFrame.js example</title>\n    <meta charset=\"utf-8\">\n</head>\n<body>\n<script src=\"https://riversun.github.io/jsframe/jsframe.js\"></script>\n<script>\n    function start() {\n        const jsFrame = new JSFrame();\n        const frame = jsFrame.create({\n            title: 'ウィンドウ',\n            left: 20, top: 20, width: 320, height: 220,\n            movable: true,//マウスで移動可能\n            resizable: true,//マウスでリサイズ可能\n            html: '<div id=\"my_element\" style=\"padding:10px;font-size:12px;color:darkgray;\">Contents of window</div>'\n        });\n        //ウィンドウを表示する\n        frame.show();\n        setTimeout(() => {\n            //1秒後に中身を変更する\n            //$セレクタでフレーム内のコンテンツにアクセス可能\n            frame.$('#my_element').innerHTML = '<span style=\"color:red\">Hello world</span>';\n        }, 1000);\n    }\n\n    start();\n</script>\n</body>\n</html>"
  },
  {
    "path": "public/examples/jaq/modal.html",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n    <title>JsFrame.js modal window</title>\n    <meta charset=\"utf-8\">\n    <meta name=\"description\" content=\"A javascript popup/floating window library.\">\n    <link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css\">\n</head>\n<body>\n<div>\n    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna\n    aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\n</div>\n<br>\n<button id=\"bt_open\" type=\"button\" onclick=\"openModalWindow()\" class=\"btn btn-primary\">モーダルウィンドウを開く</button>\n<script src=\"https://riversun.github.io/jsframe/jsframe.js\"></script>\n<script>\n\n    function openModalWindow() {\n        const jsFrame = new JSFrame();\n        const innerHTML = '<div class=\"modal-header\">' +\n            '<h6 class=\"modal-title\">変更を保存してよいですか？</h6>' +\n            '</div>' +\n            ' <div class=\"modal-body\">' +\n            '保存する場合はOKを押してください。保存しない場合はCancelを押してください。' +\n            '</div>' +\n            '<div class=\"modal-footer\">' +\n            '<button id=\"bt_submit\" type=\"button\" class=\"btn btn-outline-primary\">OK</button>' +\n            '<button id=\"bt_cancel\" type=\"button\" class=\"btn btn-outline-secondary\">Cancel</button>' +\n            '</div>';\n\n        const modalFrame = jsFrame.create({\n            name: 'my-modal-window',\n            title: 'モーダルウィンドウ',\n            left: 0, top: 0, width: 320, height: 220,\n            movable: true,\n            resizable: true,\n            html: innerHTML\n        });\n        //画面の中心に配置する\n        modalFrame.setPosition(window.innerWidth / 2, window.innerHeight / 2, 'CENTER_BOTTOM');\n\n        //ボタンのクリックイベント処理\n        modalFrame.on('#bt_submit', 'click', (_frame, e) => {\n            _frame.extra = {\n                result: 'submitted'\n            }\n            _frame.closeFrame();\n        });\n        modalFrame.on('#bt_cancel', 'click', (frame, e) => {\n            //jsFrameオブジェクトからウィンドウを取得することも可能\n            var _frame = jsFrame.getWindowByName('my-modal-window');\n\n            _frame.extra = {\n                result: 'canceled'\n            }\n            _frame.closeFrame();\n        });\n\n        //モーダルウィンドウとして開く\n        modalFrame.showModal(_frame => {\n            //モーダルウィンドウが閉じられたときのコールバック\n            jsFrame.showToast({\n                html: `${_frame.getName()}が閉じられました.結果は${_frame.extra.result}`, align: 'center',duration:2000\n            });\n        });\n    }\n</script>\n</body>\n</html>"
  },
  {
    "path": "public/examples/jaq/position.html",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n    <title>JsFrame.js example Position</title>\n    <meta charset=\"utf-8\">\n    <meta name=\"description\" content=\"A javascript popup/floating window library.\">\n</head>\n<body>\n<script src=\"https://riversun.github.io/jsframe/jsframe.js\"></script>\n<script>\n    function start() {\n        const jsFrame = new JSFrame();\n        const frame01 = jsFrame.createFrame().setTitle(\"My window\");\n        //サイズを指定する\n        frame01.setSize(320, 240);\n        \n        //位置を指定する\n        const align = 'CENTER_CENTER';//アンカー\n        //(x,y)座標として画面の中央を指定、基準点（アンカー）をウィンドウの水平垂直の中心(CENTER_CENTER)にセット\n        const x = window.innerWidth / 2;\n        const y = window.innerHeight / 2;\n        frame01.setPosition(x, y, align);\n        frame01.setHTML('hello');\n        frame01.show();\n    }\n    start();\n</script>\n</body>\n</html>"
  },
  {
    "path": "public/examples/jaq/preset_material.html",
    "content": "<!DOCTYPE html>\n<!--\nプリセット 'material'の利用方法\n・タイトルバーアイコンを FontAwesomeにする方法(fontawesomeを活用)\n・タイトルバーアイコンにメニューをつける方法(bootstrap.cssを活用)\n-->\n<html>\n<head>\n    <title>JsFrame.js material</title>\n    <meta charset=\"utf-8\">\n    <meta name=\"description\" content=\"A javascript popup/floating window library.\">\n    <link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css\">\n    <link rel=\"stylesheet\" href=\"https://use.fontawesome.com/releases/v5.6.3/css/all.css\"\n          integrity=\"sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/\" crossorigin=\"anonymous\">\n</head>\n<body style=\"overflow: hidden;background: url('https://upload.wikimedia.org/wikipedia/commons/thumb/e/e0/Chidori_Canal.jpg/1920px-Chidori_Canal.jpg') 50% no-repeat fixed; background-size: cover;\">\n\n<div style=\"color:#f5f5f5;text-shadow: 2px 2px 1px #333333;\"><a\n        href=\"https://github.com/riversun/JSFrame.js\">JSFrame.js</a> Example : Preset style material\n</div>\n\n\n<div\n        style=\"font-size: 12px; color: white; position: fixed; right: 10px; bottom: 10px\">\n    Photo by Takuro1202 License: CC 3.0\n</div>\n<script src=\"../../jsframe.js\"></script>\n<script>\n\n    window.alert = function (msg) {\n        jsFrame.showToast({\n            text: msg, align: 'center'\n        });\n    };\n\n    const jsFrame = new JSFrame({\n        //ウィンドウ生成の水平方向のアンカーを指定(left/right)\n        //'right'の場合は右端に固定される(右端のx座標が0で、左端にむかったマイナス方向で座標指定する)\n        horizontalAlign: 'left',\n        //ウィンドウ生成の垂直方向のアンカーを指定(top/bottom)\n        //'bottom'の場合は下端に固定される(下端のy座標が0で上端にむかったマイナス方向で座標指定する)\n        verticalAlign: 'top',\n    });\n\n\n    function createFrame01() {\n\n        const frame = jsFrame.create({\n            name: `Win`,\n            title: `Material style`,\n            left: 20, top: 40, width: 320, height: 220, minWidth: 200, minHeight: 110,\n            appearanceName: 'material',\n            appearanceParam: {\n                titleBar: {\n                    color: 'white',\n                    background: '#333333',\n                }\n            },\n            style: {\n                backgroundColor: 'rgba(255,255,255,0.8)',\n                overflow: 'auto'\n            },\n\n            url: 'iframe_content03.html',\n        }).show();\n\n\n        //#setControlメソッドを使うと、frame.control以下のメソッドが利用可能となる\n        //frame.controlはウィンドウの最大化、最小化などの操作を実施する\n        frame.setControl({\n            //最大化ボタンのFrameComponent名を指定する\n            maximizeButton: 'maximizeButton',\n            //最大化からの復帰ボタンのFrameComponent名を指定する\n            demaximizeButton: 'restoreButton',\n            //最小化ボタンのFrameComponent名を指定する\n            minimizeButton: 'minimizeButton',\n            //最小化からの復帰ボタンのFrameComponent名を指定する\n            deminimizeButton: 'deminimizeButton',\n            //非表示ボタンのFrameComponent名を指定する\n            //（非表示なのでcloseとは異なる)\n            hideButton: 'closeButton',\n            //ウィンドウ開閉時のアニメーション有効\n            animation: true,\n            //1アニメーションあたりの長さのデフォルト値(ミリ秒)\n            animationDuration: 150,\n\n        });\n        frame.control.on('hid', (frame, info) => {\n            frame.closeFrame();\n        });\n\n        //最大化した後に呼び出されるコールバック\n        frame.control.on('maximized', (frame, info) => {\n            jsFrame.showToast({\n                text: '最大化しました'\n            });\n        });\n        frame.control.on('demaximized', (frame, info) => {\n        });\n        frame.control.on('minimized', (frame, info) => {\n        });\n        frame.control.on('dminimized', (frame, info) => {\n        });\n\n\n    }\n\n    function createFrame02() {\n\n        const frame = jsFrame.create({\n            name: `Win2`,\n            title: `Material style`,\n            left: 360, top: 40, width: 320, height: 220, minWidth: 200, minHeight: 110,\n            appearanceName: 'material',\n            appearanceParam: {\n                border: {\n                    shadow: '2px 2px 10px  rgba(0, 0, 0, 0.5)',\n                    width: 0,\n                    radius: 6,\n                },\n                titleBar: {\n                    color: 'white',\n                    background: '#4784d4',\n                    leftMargin: 40,\n                    height: 30,\n                    fontSize: 14,\n                    buttonWidth: 36,\n                    buttonHeight: 16,\n                    buttonColor: 'white',\n                    buttons: [\n                        {\n                            //Set font-awesome fonts(https://fontawesome.com/icons?d=gallery&m=free)\n                            //Preset materialはFontAwesomeを使うことが可能\n                            fa: 'fas fa-times',\n                            name: 'closeButton',\n                            visible: true\n                        },\n                        {\n                            fa: 'fas fa-expand-arrows-alt',\n                            name: 'maximizeButton',\n                            visible: true\n                        },\n                        {\n                            fa: 'fas fa-compress-arrows-alt',\n                            name: 'minimizedButton',\n                            visible: false\n                        },\n                    ],\n                    //左側からボタンを並べる場合は以下のとおり設定する\n                    buttonsOnLeft: [\n                        {\n                            //Set font-awesome fonts(https://fontawesome.com/icons?d=gallery&m=free)\n                            fa: 'fas fa-bars',\n                            name: 'menu',\n                            visible: true,\n                            //ボタンを押下したときに表示するサブメニュー\n                            childMenuHTML: '<div class=\"list-group\">' +\n                                '  <div name=\"menu1\" class=\"list-group-item list-group-item-action py-2\">Menu Item 01</div>' +\n                                '  <div name=\"menu2\" class=\"list-group-item list-group-item-action py-2\">Menu Item 02</div>' +\n                                '  <div name=\"menu3\" class=\"list-group-item list-group-item-action py-2\">Menu Item 03</div>' +\n                                '</div>',\n                            childMenuWidth: 300\n                        },\n                    ],\n                },\n            },\n            style: {\n                backgroundColor: 'rgba(255,255,255,0.8)',\n                overflow: 'auto'\n            },\n            url: 'iframe_content03.html',\n        }).show();\n\n\n        //#setControlメソッドを使うと、frame.control以下のメソッドが利用可能となる\n        //frame.controlはウィンドウの最大化、最小化などの操作を実施する\n        frame.setControl({\n            //最大化ボタンのFrameComponent名を指定する\n            maximizeButton: 'maximizeButton',\n            //最大化からの復帰ボタンのFrameComponent名を指定する\n            demaximizeButton: 'restoreButton',\n            //最小化ボタンのFrameComponent名を指定する\n            minimizeButton: 'minimizeButton',\n            //最小化からの復帰ボタンのFrameComponent名を指定する\n            deminimizeButton: 'deminimizeButton',\n            //非表示ボタンのFrameComponent名を指定する\n            //（非表示なのでcloseとは異なる)\n            hideButton: 'closeButton',\n            //ウィンドウ開閉時のアニメーション有効\n            animation: true,\n            //1アニメーションあたりの長さのデフォルト値(ミリ秒)\n            animationDuration: 150,\n            //最大化したときにタイトルバーを消す\n            maximizeWithoutTitleBar: true,\n            //最大化から復帰するときに ESCキーを押下する\n            restoreKey: 'Escape',\n\n        });\n        frame.control.on('hid', (frame, info) => {\n            frame.closeFrame();\n        });\n\n        //最大化した後に呼び出されるコールバック\n        frame.control.on('maximized', (frame, info) => {\n            jsFrame.showToast({\n                text: 'Press \"ESC\" to minimize.', align: 'center'\n            });\n        });\n        frame.control.on('demaximized', (frame, info) => {\n\n        });\n\n        frame.on('menu', 'click', (_frame, evt, info) => {\n\n            const name = evt.target.getAttribute('name');\n\n            if (name && name.startsWith('menu')) {\n                alert(name + ' clicked');\n            }\n        });\n\n\n    }\n\n    createFrame01();\n    createFrame02();\n</script>\n\n</body>\n</html>"
  },
  {
    "path": "public/examples/jaq/preset_win10.html",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n    <title>JsFrame.js yosemite</title>\n    <meta charset=\"utf-8\">\n    <meta name=\"description\" content=\"A javascript popup/floating window library.\">\n</head>\n<body style=\"overflow: hidden;background: url('https://upload.wikimedia.org/wikipedia/commons/c/c5/Kurumayama_K%C5%8Dgen_Snow_Resort_2.jpg') 50% no-repeat fixed; background-size: cover;\">\n\n<script src=\"https://riversun.github.io/jsframe/jsframe.js\"></script>\n\n<script>\n    function start() {\n\n        const jsFrame = new JSFrame();\n\n        const frames = [];\n        for (let i = 0; i < 2; i++) {\n            const frame = jsFrame.create({\n                name: `Win${i}`,\n                title: `Win${i} - Win10 style`,\n                left: 20 + (320 + 20) * i, top: 50, width: 320, height: 220, minWidth: 200, minHeight: 110,\n                appearanceName: 'redstone',\n                style: {\n                    backgroundColor: 'rgba(255,255,255,0.95)',\n                    overflow: 'hidden'\n                },\n                html: '<div style=\"padding:10px;\">Your contents here.</div>'\n            }).show();\n\n            frame.on('minimizeButton', 'click', (_frame, evt) => {\n\n                frame.hideFrameComponent('minimizeButton');\n                frame.showFrameComponent('deminimizeButton');\n\n                const force = true;\n\n                _frame.extra.__restore_info = {\n                    org_left: _frame.getLeft(),\n                    org_top: _frame.getTop(),\n                    org_width: _frame.getWidth(),\n                    org_height: _frame.getHeight()\n                };\n\n                _frame.setSize(_frame.getWidth(), 30, force);\n                _frame.setResizable(false);\n\n\n            });\n            frame.on('deminimizeButton', 'click', (_frame, evt) => {\n\n                _frame.showFrameComponent('minimizeButton');\n                _frame.hideFrameComponent('deminimizeButton');\n\n                const force = true;\n                _frame.setSize(_frame.extra.__restore_info.org_width, _frame.extra.__restore_info.org_height, force);\n\n            });\n\n            frame.on('maximizeButton', 'click', (_frame, evt) => {\n\n                _frame.extra.__restore_info = {\n                    org_left: _frame.getLeft(),\n                    org_top: _frame.getTop(),\n                    org_width: _frame.getWidth(),\n                    org_height: _frame.getHeight()\n                };\n\n                frame.hideFrameComponent('maximizeButton');\n                frame.showFrameComponent('restoreButton');\n\n                frame.setPosition(0, 0);\n                frame.setSize(window.innerWidth - 2, window.innerHeight - 2, true);\n\n                frame.setMovable(false);\n                frame.setResizable(false);\n\n\n            });\n\n            frame.on('restoreButton', 'click', (_frame, evt) => {\n\n                frame.setMovable(true);\n                frame.setResizable(true);\n\n                _frame.setPosition(_frame.extra.__restore_info.org_left, _frame.extra.__restore_info.org_top);\n\n                const force = true;\n                _frame.setSize(_frame.extra.__restore_info.org_width, _frame.extra.__restore_info.org_height, force);\n\n                _frame.showFrameComponent('maximizeButton');\n                _frame.hideFrameComponent('restoreButton');\n\n\n            });\n            frame.on('closeButton', 'click', (_frame, evt) => {\n                _frame.closeFrame();\n            });\n            frames.push(frame);\n        }\n        frames[0].requestFocus();\n    }\n\n    start();\n</script>\n<div style=\"color:white\"><a href=\"https://github.com/riversun/JSFrame.js\">JSFrame.js</a> Example : Preset style redstone\n</div>\n<div\n        style=\"font-size: 12px; color: white; position: fixed; right: 10px; bottom: 10px\">\n    Photo by Ski Mania License: CC-BY-SA 4.0\n</div>\n</body>\n</html>"
  },
  {
    "path": "public/examples/jaq/preset_yosemite.html",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n    <title>JsFrame.js yosemite</title>\n    <meta charset=\"utf-8\">\n    <meta name=\"description\" content=\"A javascript popup/floating window library.\">\n</head>\n<body style=\"background: url('http://upload.wikimedia.org/wikipedia/commons/d/d6/Half_Dome_from_Glacier_Point%2C_Yosemite_NP_-_Diliff.jpg') 50% no-repeat fixed; background-size: cover;\">\n<script src=\"https://riversun.github.io/jsframe/jsframe.js\"></script>\n<script>\n    function start() {\n\n        const jsFrame = new JSFrame();\n\n        const frames = [];\n        for (let i = 0; i < 3; i++) {\n            const frame = jsFrame.create({\n                name: `Win${i}`,\n                title: `Win${i} - Yosemite style`,\n                left: 20 + (320 + 20) * i, top: 50, width: 320, height: 220, minWidth: 200, minHeight: 110,\n                appearanceName: 'yosemite',\n                style: {\n                    backgroundColor: 'rgba(255,255,255,0.8)',\n                  \n                },\n\n                html: '<div style=\"padding:10px;\">Your contents here.</div>'\n            }).show();\n\n            //プリセットアピアランスのボタンを取得する\n            frame.on('minimizeButton', 'click', (_frame, evt) => {\n                const size = _frame.getSize();\n                _frame.setSize(size.width - 20, size.height - 20);\n                jsFrame.showToast({\n                    align: 'top', html: `<span style=\"color:red\">${_frame.getName()}</span>を小さくしました`\n                });\n\n            });\n            frame.on('zoomButton', 'click', (_frame, evt) => {\n                const size = _frame.getSize();\n                _frame.setSize(size.width + 20, size.height + 20);\n                jsFrame.showToast({\n                    align: 'top', html: `<span style=\"color:red\">${_frame.getName()}</span>を大きくしました`\n                });\n            });\n            frame.on('closeButton', 'click', (_frame, evt) => {\n                _frame.closeFrame();\n                jsFrame.showToast({\n                    align: 'top', html: `<span style=\"color:red\">${_frame.getName()}</span>を閉じました`\n                });\n\n            });\n            frames.push(frame);\n        }\n        frames[0].requestFocus();\n    }\n\n    start();\n</script>\n<div style=\"color:#666666\"><a href=\"https://github.com/riversun/JSFrame.js\">JSFrame.js</a> Example : Preset style\n    yosemite\n</div>\n<div style=\"font-size: 12px; color: white; position: fixed; right: 10px; bottom: 10px\">\n    Photo by Tiago Fioreze License: CC-BY-SA 3.0\n</div>\n</body>\n</html>"
  },
  {
    "path": "public/examples/jaq/preset_yosemite_auto.html",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n    <title>JsFrame.js yosemite</title>\n    <meta charset=\"utf-8\">\n    <meta name=\"description\" content=\"A javascript popup/floating window library.\">\n</head>\n<body style=\"background: url('http://upload.wikimedia.org/wikipedia/commons/d/d6/Half_Dome_from_Glacier_Point%2C_Yosemite_NP_-_Diliff.jpg') 50% no-repeat fixed; background-size: cover;\">\n<script src=\"../../jsframe.js\"></script>\n<script>\n    function start() {\n\n        const jsFrame = new JSFrame();\n\n        const frames = [];\n        for (let i = 0; i < 3; i++) {\n            const frame = jsFrame.create({\n                name: `Win${i}`,\n                title: `Win${i} - Yosemite style`,\n                left: 20 + (320 + 20) * i, top: 50, width: 320, height: 220, minWidth: 200, minHeight: 110,\n                appearanceName: 'yosemite',\n                style: {\n                    backgroundColor: 'rgba(255,255,255,0.8)',\n                    overflow:'auto'\n\n                },\n\n                html: '<div style=\"padding:10px;\">Your contents here.</div>'\n            }).show();\n\n\n            frame.setControl({\n                styleDisplay:'inline',\n                maximizeButton: 'zoomButton',\n                demaximizeButton: 'dezoomButton',\n                minimizeButton: 'minimizeButton',\n                deminimizeButton: 'deminimizeButton',\n                hideButton: 'closeButton',\n                animation: true,\n                animationDuration: 150,\n\n            });\n\n            frame.control.on('hid', (frame, info) => {\n                frame.closeFrame();\n            });\n\n\n\n\n            frames.push(frame);\n        }\n        frames[0].requestFocus();\n    }\n\n    start();\n</script>\n<div style=\"color:#666666\"><a href=\"https://github.com/riversun/JSFrame.js\">JSFrame.js</a> Example : Preset style\n    yosemite\n</div>\n<div style=\"font-size: 12px; color: white; position: fixed; right: 10px; bottom: 10px\">\n    Photo by Tiago Fioreze License: CC-BY-SA 3.0\n</div>\n</body>\n</html>"
  },
  {
    "path": "public/examples/jaq/styling.html",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n    <title>JsFrame.js example</title>\n    <meta charset=\"utf-8\">\n    <meta name=\"description\" content=\"A javascript popup/floating window library.\">\n</head>\n<body style=\"background: url('https://upload.wikimedia.org/wikipedia/commons/e/e0/Clouds_over_the_Atlantic_Ocean.jpg') 50% no-repeat fixed; background-size: cover;\">\n\n<script src=\"https://riversun.github.io/jsframe/jsframe.js\"></script>\n\n<script>\n    function start() {\n\n        const jsFrame = new JSFrame();\n\n        //プリセットアピアランスをプリセット名で指定する\n        const frame01 = jsFrame.create({\n            title: 'Yosemite style',\n            left: 20, top: 20, width: 320, height: 220,\n            appearanceName: 'yosemite',//プリセット名は 'yosemite','redstone','popup'\n            style: {\n                backgroundColor: 'rgba(255,255,255,0.9)',\n            },\n            html: '<div style=\"padding:10px;\">プリセット名で指定する</div>'\n        }).show();\n\n        const frame02 = jsFrame.create({\n            title: 'Yosemite style',\n            left: 360, top: 20, width: 320, height: 220,\n            appearanceName: 'yosemite',\n            style: {\n                backgroundColor: 'rgba(255,255,255,0.9)',\n                overflow: 'hidden'\n            },\n            html: '<div style=\"padding:10px;\">指定したボタン(左上エリア)を非表示にする</div>'\n        }).show();\n\n        //指定したボタンを非表示にする\n        frame02.hideFrameComponent('minimizeButton');\n        frame02.hideFrameComponent('zoomButton');\n\n        const appearance4frame03 = jsFrame.createPresetStyle('redstone');\n        jsFrame.create({\n            title: 'Win10 style',\n            left: 20, top: 260, width: 320, height: 220,\n            style: {\n                backgroundColor: 'rgba(255,255,255,0.9)',\n                overflow: 'hidden'\n            },\n            appearance: appearance4frame03,\n            html: '<div style=\"padding:10px;\">アピアランスオブジェクトから生成する</div>'\n        }).show();\n\n        //アピアランス（ウィンドウの見た目）オブジェクトを生成する\n        const appearance = jsFrame.createFrameAppearance();\n        jsFrame.create({\n            title: 'Popup style',\n            left: 360, top: 260, width: 320, height: 220,\n            style: {\n                backgroundColor: 'rgba(255,255,255,0.9)',\n                overflow: 'hidden'\n            },\n            appearance: populateOriginalStyle(appearance),\n            html: '<div style=\"padding:10px;height:100%\">ゼロからアピアランスを自作する</div>'\n        }).show();\n\n        frame01.requestFocus();\n    }\n\n    /**\n     * オリジナルのアピアランスをセットする\n     * @param apr\n     * @returns {*}\n     */\n    function populateOriginalStyle(apr) {\n\n        apr.titleBarCaptionFontSize = '12px';\n        apr.titleBarCaptionFontWeight = 'normal';\n        apr.titleBarCaptionLeftMargin = '10px';\n        apr.titleBarCaptionColorDefault = '#4d494d';\n        apr.titleBarCaptionColorFocused = '#4d494d';\n        apr.titleBarHeight = '0px';\n        apr.titleBarColorDefault = 'white';\n        apr.titleBarColorFocused = 'white';\n        apr.titleBarBorderBottomDefault = null;\n        apr.titleBarBorderBottomFocused = null;\n        apr.frameBorderRadius = '6px';\n        apr.frameBorderWidthDefault = '4px';\n        apr.frameBorderWidthFocused = '4px';\n        apr.frameBorderColorDefault = '#ffffff';\n        apr.frameBorderColorFocused = '#1883d7';\n        apr.frameBorderStyle = 'solid';\n        apr.frameBoxShadow = '0px 0px 20px rgba(0, 0, 0, 0.3)';\n        apr.frameBorderStyle = 'solid';\n        apr.frameBackgroundColor = 'white';\n        apr.frameComponents = [];\n        apr.frameHeightAdjust = 1;\n\n        apr.onInitialize = function () {\n            var partsBuilder = apr.getPartsBuilder();\n            var btApr = partsBuilder.buildTextButtonAppearance();\n            btApr.width = 20;\n            btApr.height = 20;\n            btApr.borderRadius = 10;\n            btApr.borderWidth = 1;\n            btApr.borderColorDefault = '#cccccc';\n            btApr.borderColorFocused = '#cccccc';\n            btApr.borderColorHovered = '#dddddd';\n            btApr.borderColorPressed = '#eeeeee';\n            btApr.borderStyleDefault = 'solid';\n            btApr.borderStyleFocused = btApr.borderStyleDefault;\n            btApr.borderStyleHovered = btApr.borderStyleDefault;\n            btApr.borderStylePressed = btApr.borderStyleDefault;\n            btApr.backgroundColorDefault = 'white';\n            btApr.backgroundColorFocused = 'white';\n            btApr.backgroundColorHovered = '#eeeeee';\n            btApr.backgroundColorPressed = '#dddddd';\n            btApr.backgroundBoxShadow = '2px 2px 5px  rgba(0, 0, 0, 0.5)';\n            btApr.caption = '\\u2716';\n            btApr.captionColorDefault = 'black';\n            btApr.captionColorFocused = 'black';\n            btApr.captionColorHovered = 'white';\n            btApr.captionColorPressed = 'white';\n            btApr.captionShiftYpx = 1;\n            btApr.captionFontRatio = 0.6;\n\n            var btEle = partsBuilder.buildTextButton(btApr);\n            var eleLeft = 10;\n            var eleTop = -12 - parseInt(apr.titleBarHeight);\n            var eleAlign = 'RIGHT_TOP';\n            // 'closeButton' is a special name\n            apr.addFrameComponent('closeButton', btEle, eleLeft, eleTop, eleAlign);\n        };\n        return apr;\n    }\n\n    start();\n</script>\n<div style=\"font-size: 12px; color: white; position: fixed; right: 10px; bottom: 10px\">\n    Photo by Tiago Fioreze License: CC-BY-SA 3.0\n</div>\n</body>\n</html>"
  },
  {
    "path": "public/examples/jaq/toast.html",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n    <title>JsFrame.js modal window</title>\n    <meta charset=\"utf-8\">\n    <meta name=\"description\" content=\"A javascript popup/floating window library.\">\n    <link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css\">\n</head>\n<body style=\"background: url('https://upload.wikimedia.org/wikipedia/commons/e/e0/Clouds_over_the_Atlantic_Ocean.jpg') 50% no-repeat fixed; background-size: cover;\">\n<br>\n<div class=\"container-fluid\">\n    <button type=\"button\" onclick=\"showToast01()\" class=\"m-1 btn btn-primary btn-sm\">トースト(標準＝下部)を表示</button>\n    <button type=\"button\" onclick=\"showToast02()\" class=\"m-1 btn btn-primary btn-sm\">トースト(中央)を表示</button>\n    <button type=\"button\" onclick=\"showToast03()\" class=\"m-1 btn btn-primary btn-sm\">トースト(上部)を表示</button>\n    <br>\n    <button type=\"button\" onclick=\"showToast04()\" class=\"m-1 btn btn-primary btn-sm\">トースト(カスタム)を表示</button>\n</div>\n<script src=\"https://riversun.github.io/jsframe/jsframe.js\"></script>\n<script>\n\n    const jsFrame = new JSFrame();\n\n    function showToast01() {\n\n        jsFrame.showToast({\n            html: '標準トーストです',\n        });\n    }\n\n    function showToast02() {\n\n        jsFrame.showToast({\n            align: 'center', html: '中央トーストです'\n        });\n    }\n\n    function showToast03() {\n\n        jsFrame.showToast({\n            align: 'top', html: '上部トーストです',\n        });\n    }\n\n    function showToast04() {\n\n        jsFrame.showToast({\n            width: 260,\n            height: 100,\n            duration: 2000,//表示時間(millis)\n            align: 'center',// 表示位置 'top'/'center'/'bottom'(default)\n            style: {\n                borderRadius: '2px',\n                backgroundColor: 'rgba(0,124,255,0.8)',\n            },\n            html: '<span style=\"color:white;\">カスタムトーストです</span>',\n            closeButton: true,//閉じるボタンを表示\n            closeButtonColor: 'white'//閉じるボタンの色\n        });\n    }\n</script>\n</body>\n</html>"
  },
  {
    "path": "public/examples/jaq/toast_simple.html",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n    <title>JsFrame.js JavaScript Toast</title>\n    <meta charset=\"utf-8\">\n</head>\n<body>\n<script src=\"https://riversun.github.io/jsframe/jsframe.js\"></script>\n<script>\n    const jsFrame = new JSFrame();\n    jsFrame.showToast({\n        html: 'This is a simple toast', align: 'top', duration: 2000\n    });\n</script>\n</body>\n</html>"
  },
  {
    "path": "public/examples/jaq/window_control.html",
    "content": "<!DOCTYPE html>\n<!--\nウィンドウのコントロール（最大化、最小化）を詳細にマニュアル設定するデモ\n-->\n<html>\n<head>\n    <title>JsFrame.js yosemite</title>\n    <meta charset=\"utf-8\">\n    <meta name=\"description\" content=\"A javascript popup/floating window library.\">\n    <link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css\">\n    <link rel=\"stylesheet\" href=\"https://use.fontawesome.com/releases/v5.6.3/css/all.css\"\n          integrity=\"sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/\" crossorigin=\"anonymous\">\n</head>\n<body style=\"overflow: hidden;background: url('https://upload.wikimedia.org/wikipedia/commons/4/40/Mont_Blanc_depuis_Chamonix.JPG') 50% no-repeat fixed; background-size: cover;\">\n\n<div style=\"color:#f5f5f5;text-shadow: 2px 2px 1px #333333;\"><a\n        href=\"https://github.com/riversun/JSFrame.js\">JSFrame.js</a> Example : Preset style redstone\n</div>\n\n\n<div\n        style=\"font-size: 12px; color: white; position: fixed; right: 10px; bottom: 10px\">\n    Photo by Aiguille License: CC0\n</div>\n<script src=\"../../jsframe.js\"></script>\n<script>\n\n    const jsFrame = new JSFrame({\n        //ウィンドウ生成の水平方向のアンカーを指定(left/right)\n        //'right'の場合は右端に固定される(右端のx座標が0で、左端にむかったマイナス方向で座標指定する)\n        horizontalAlign: 'left',\n        //ウィンドウ生成の垂直方向のアンカーを指定(top/bottom)\n        //'bottom'の場合は下端に固定される(下端のy座標が0で上端にむかったマイナス方向で座標指定する)\n        verticalAlign: 'top',\n    });\n\n    function rest() {\n        var frame = jsFrame.getWindowByName('Win0');\n        frame.control.doDehide();\n    }\n\n    function start() {\n\n        const frame = jsFrame.create({\n            name: `Win`,\n            title: `Win - Win10 style`,\n            left: 20, top: 40, width: 320, height: 220, minWidth: 200, minHeight: 110,\n            appearanceName: 'material',\n            style: {\n                backgroundColor: 'rgba(255,255,255,0.8)',\n                overflow: 'auto'\n            },\n\n            url: 'iframe_content03.html',\n        }).show();\n\n\n        //#setControlメソッドを使うと、frame.control以下のメソッドが利用可能となる\n        //frame.controlはウィンドウの最大化、最小化などの操作を実施する\n        frame.setControl({\n            //最大化ボタンのFrameComponent名を指定する\n            maximizeButton: 'maximizeButton',\n            //最大化からの復帰ボタンのFrameComponent名を指定する\n            demaximizeButton: 'restoreButton',\n            //最小化ボタンのFrameComponent名を指定する\n            minimizeButton: 'minimizeButton',\n            //最小化からの復帰ボタンのFrameComponent名を指定する\n            deminimizeButton: 'deminimizeButton',\n            //ウィンドウ開閉時のアニメーション有効\n            animation: true,\n            //1アニメーションあたりの長さのデフォルト値(ミリ秒)\n            animationDuration: 200,\n\n        });\n\n        //maximizedイベントを直接ハンドリングしたい場合\n        frame.control.on('maximized', (frame, info) => {  //最大化した後に呼び出されるコールバック\n\n        });\n\n\n        //イベントはオーバーライドされる\n        frame.on('maximizeButton', 'click', (_frame, evt) => {\n            //ウィンドウを最大化する\n            _frame.control.doMaximize({\n                //true:最大化したときにタイトルバーを隠す\n                hideTitleBar: false,\n                //最大化するときのアニメーション時間\n                duration: 200,\n                //タイトルバーを隠すときはボタンで復帰できないので変わりにキー入力を使いたい場合はキーを指定できる\n                restoreKey: 'Escape',\n                //最大化から復帰するまでのアニメーション時間（タイトルバーを隠すときはここで指定可能)\n                restoreDuration: 100,\n                //ウィンドウを最大化終了を受け取るコールバック関数\n                callback: (frame, info) => {\n                    // jsFrame.showToast({\n                    //     text: 'ESCキーを押すと復帰します', align: 'top', duration: 2000\n                    // });\n                    frame.requestFocus();\n                },\n                //最大化から戻ったときに呼び出されるコールバック(タイトルバーが無い場合)\n                restoreCallback: (frame, info) => {\n                    jsFrame.showToast({\n                        text: frame.getName() + ' ' + info.eventType\n                    });\n                },\n            });\n        });\n\n        frame.on('restoreButton', 'click', (_frame, evt) => {\n            //ウィンドウを最大化状態から復帰する\n            _frame.control.doDemaximize(\n                {\n                    //最大化から復帰するまでのアニメーション時間\n                    duration: 200,\n                    //ウィンドウを最大化から復帰した後のコールバックを受け取る関数\n                    callback: (frame, info) => {\n                        jsFrame.showToast({\n                            text: frame.getName() + ' ' + info.eventType\n                        });\n                    }\n                });\n        });\n\n        frame.on('minimizeButton', 'click', (_frame, evt) => {\n\n            //'minimizeButton'が押されたときに、最小化したい場合\n            _frame.control.doMinimize({\n                duration: 200,\n                callback: (frame, info) => {\n                    jsFrame.showToast({\n                        text: frame.getName() + ' ' + info.eventType\n                    });\n                }\n            });\n\n        });\n        frame.on('deminimizeButton', 'click', (_frame, evt) => {\n            _frame.control.doDeminimize({\n                duration: 200,//最小化状態から戻るときのアニメーション時間(ms)\n                //最小化状態から復帰を受け取るコールバック関数\n                callback: (frame, info) => {\n                    jsFrame.showToast({\n                        text: frame.getName() + ' ' + info.eventType\n                    });\n                }\n            });\n        });\n\n\n        frame.on('closeButton', 'click', (_frame, evt) => {\n            //\n\n            //ウィンドウを非表示状態に遷移する\n            _frame.control.doHide({\n                duration: 100,\n                //非表示にするときのアニメーションの終点\n                align: 'CENTER_BOTTOM',\n                //非表示処理が終了したときのコールバックを受け取る関数\n                callback: (frame, info) => {\n                    jsFrame.showToast({\n                        text: frame.getName() + ' ' + info.eventType\n                    });\n\n                    //非表示にした後、ウィンドウを閉じる（削除する）\n                    _frame.closeFrame();\n                }\n            })\n        });\n\n\n    }\n\n    start();\n</script>\n</body>\n</html>"
  },
  {
    "path": "public/examples/v100/ex00/iframe.html",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n    <!--\n      JSFrame Examples\n\n      Copyright 2007-2019 Tom Misawa, riversun.org@gmail.com\n     -->\n    <title>JsFrame.js example - Use IFrame</title>\n    <meta charset=\"utf-8\">\n    <meta name=\"description\" content=\"A javascript popup/floating window library.\">\n\n</head>\n<body>\n<div style=\"color:#666666\">\n    <a href=\"https://github.com/riversun/JSFrame.js\">JSFrame.js</a> Example : Quick start\n</div>\n<link href=\"ex02.css\" rel=\"stylesheet\" type=\"text/css\"/>\n\n<!-- for Internet explorer [begin] -->\n<script src=\"https://www.promisejs.org/polyfills/promise-6.1.0.min.js\"></script>\n<!-- for Internet explorer [end] -->\n\n<script src=\"../../jsframe.js\"></script>\n\n<script>\n    function start() {\n\n        const jsFrame = new JSFrame();\n\n        var frame01Style = jsFrame.createFrameAppearance().setUseIFrame(true);//useIframe as content view;\n\n        const frame01 = jsFrame.createFrame(20, 40, 320, 220, frame01Style)\n            .setTitle(\"Window1\")\n            .setResizable(true)\n            .setMovable(true);\n\n        var frame02Style = jsFrame.createFrameAppearance().setUseIFrame(true);//useIframe as content view;\n        const frame02 = jsFrame.createFrame(360, 40, 320, 220, frame01Style)\n            .setTitle(\"Window2\")\n            .setResizable(true)\n            .setMovable(true);\n\n\n        var urls = [\n            frame01.setUrl('iframe_content01.html'),\n            frame02.setUrl('iframe_content02.html'),\n        ];\n\n        //Load urls.Wait until the content of iframe is loaded.\n        Promise.all(urls)\n            .then(function () {\n                //When All iframe pages loaded,show frame\n                frame01.show();\n                frame02.show();\n\n                //focus on frame01\n                frame01.requestFocus();\n            });\n\n\n    }\n\n    start();\n</script>\n\n</body>\n</html>\n"
  },
  {
    "path": "public/examples/v100/ex00/iframe_content01.html",
    "content": "<html>\n<head>\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n</head>\n<body style=\"background:white\">\n<div style=\"color:darkgray\">Iframe contents for window1</div>\n\n</body>\n</html>\n"
  },
  {
    "path": "public/examples/v100/ex00/iframe_content02.html",
    "content": "<html>\n<head>\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n</head>\n<body style=\"background:white\">\n<div style=\"color:darkgray\">Iframe contents for window2</div>\n\n</body>\n</html>\n"
  },
  {
    "path": "public/examples/v100/ex00/index.html",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n    <!--\n      JSFrame Examples\n      Copyright 2007-2019 Tom Misawa, riversun.org@gmail.com\n     -->\n    <title>JsFrame.js example</title>\n\n    <meta charset=\"utf-8\">\n    <meta name=\"description\" content=\"A javascript popup/floating window library.\">\n\n\n</head>\n<body>\n<div style=\"color:#666666\">\n    <a href=\"https://github.com/riversun/JSFrame.js\">JSFrame.js</a> Example : Quick start\n</div>\n<script src=\"../../jsframe.js\"></script>\n\n<script>\n    function start() {\n\n        const jsFrame = new JSFrame();\n\n        const frame01 = jsFrame.createFrame(20, 40, 320, 220)//create frame (left,top,width,height)\n            .setTitle(\"Window1\")//window title\n            .setResizable(true)//if true,you can resize the window\n            .setMovable(true);//if true,you can drag and move the window\n\n        const innerHTML = '<div id=\"my_element\" style=\"padding:10px;font-size:12px;color:darkgray;\">Contents of window01</div>';\n\n        //set content\n        frame01.setHTML(innerHTML);\n\n        //show window\n        frame01.show();\n    }\n\n    start();\n</script>\n\n</body>\n</html>"
  },
  {
    "path": "public/examples/v100/ex00/modal.html",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n    <!--\n      JSFrame Examples\n      Copyright 2007-2019 Tom Misawa, riversun.org@gmail.com\n     -->\n    <title>JsFrame.js example</title>\n\n    <meta charset=\"utf-8\">\n    <meta name=\"description\" content=\"A javascript popup/floating window library.\">\n\n\n</head>\n<body>\n<div style=\"color:#666666\">\n    <a href=\"https://github.com/riversun/JSFrame.js\">JSFrame.js</a> Example : Quick start\n</div>\n<br>\n<div>\n    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\n</div>\n<script src=\"../../jsframe.js\"></script>\n\n<script>\n    function start() {\n\n        const jsFrame = new JSFrame();\n\n        const frame01 = jsFrame.createFrame(20, 40, 320, 220)//create frame (left,top,width,height)\n            .setTitle(\"Window1\")//window title\n            .setResizable(true)//if true,you can resize the window\n            .setMovable(true);//if true,you can drag and move the window\n\n        const innerHTML = '<div id=\"my_element\" style=\"padding:10px;font-size:12px;color:darkgray;\">Contents of window01</div>';\n\n        //set content\n        frame01.setHTML(innerHTML);\n\n        //show window\n        frame01.showModal();\n    }\n\n    start();\n</script>\n\n</body>\n</html>"
  },
  {
    "path": "public/examples/v100/ex00/modify_content.html",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n    <!--\n      JSFrame Examples\n      Copyright 2007-2019 Tom Misawa, riversun.org@gmail.com\n     -->\n    <title>JsFrame.js example</title>\n\n    <meta charset=\"utf-8\">\n    <meta name=\"description\" content=\"A javascript popup/floating window library.\">\n\n\n</head>\n<body>\n<div style=\"color:#666666\">\n    <a href=\"https://github.com/riversun/JSFrame.js\">JSFrame.js</a> Example : Quick start\n</div>\n<script src=\"../../jsframe.js\"></script>\n\n<script>\n    function start() {\n\n        const jsFrame = new JSFrame();\n\n        const frame01 = jsFrame.createFrame(20, 40, 320, 220)\n            .setTitle(\"Window1\")\n            .setResizable(true)\n            .setMovable(true);\n        const innerHTML = '<div id=\"my_element\" style=\"padding:10px;font-size:12px;color:darkgray;\">Contents of window01</div>';\n\n        frame01.setHTML(innerHTML);\n        frame01.show();\n\n        //get inner element by queryselector and change it.\n        frame01.$(\"#my_element\").innerHTML = 'Hello World!';\n    }\n\n    start();\n</script>\n\n</body>\n</html>"
  },
  {
    "path": "public/examples/v100/ex00/multi_window.html",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n    <!--\n      JSFrame Examples\n      Copyright 2007-2019 Tom Misawa, riversun.org@gmail.com\n     -->\n    <title>JsFrame.js example</title>\n\n    <meta charset=\"utf-8\">\n    <meta name=\"description\" content=\"A javascript popup/floating window library.\">\n\n\n</head>\n<body>\n<div style=\"color:#666666\">\n    <a href=\"https://github.com/riversun/JSFrame.js\">JSFrame.js</a> Example : Quick start\n</div>\n<script src=\"../../jsframe.js\"></script>\n\n<script>\n    function start() {\n        const jsFrame = new JSFrame();\n\n        for (let i = 0; i < 3; i++) {\n            const frame = jsFrame.createFrame(20 + 260 * i, 40, 240, 220)//create frame (left,top,width,height)\n                .setTitle(`Window${i}`)\n                .setResizable(true)\n                .setMovable(true);\n            const innerHTML = `<div id=\"my_element\" style=\"padding:10px;font-size:12px;color:darkgray;\">Contents of window${i}</div>`;\n            frame.setHTML(innerHTML);\n            //show window\n            frame.show();\n        }\n    }\n\n    start();\n</script>\n\n</body>\n</html>"
  },
  {
    "path": "public/examples/v100/ex00/preset_style.html",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n    <!--\n      JSFrame Examples\n      Copyright 2007-2019 Tom Misawa, riversun.org@gmail.com\n     -->\n    <title>JsFrame.js example</title>\n\n    <meta charset=\"utf-8\">\n    <meta name=\"description\" content=\"A javascript popup/floating window library.\">\n\n\n</head>\n<body>\n<div style=\"color:#666666\">\n    <a href=\"https://github.com/riversun/JSFrame.js\">JSFrame.js</a> Example : Quick start\n</div>\n<script src=\"../../jsframe.js\"></script>\n\n<script>\n    function start() {\n\n        const jsFrame = new JSFrame();\n\n        const frame01Style = jsFrame.createPresetStyle('yosemite');\n        const frame01 = jsFrame.createFrame(20, 40, 320, 220, frame01Style)//create frame (left,top,width,height)\n            .setTitle(\"Window1\")\n            .setResizable(true)\n            .setMovable(true);\n        frame01.setHTML(`<div id=\"my_element\" style=\"padding:10px;font-size:12px;color:darkgray;\">Contents of window01</div>`);\n        frame01.show();\n        {\n            const frame02Style = jsFrame.createPresetStyle('redstone');\n            const frame02 = jsFrame.createFrame(20 + (340 * 1), 40, 320, 220, frame02Style)//create frame (left,top,width,height)\n                .setTitle(\"Window2\")\n                .setResizable(true)\n                .setMovable(true);\n            frame02.setHTML(`<div id=\"my_element\" style=\"padding:10px;font-size:12px;color:darkgray;\">Contents of window02</div>`);\n            frame02.show();\n        }\n\n        {\n            const frame03Style = jsFrame.createPresetStyle('popup');\n            const frame03 = jsFrame.createFrame(20 + (340 * 0), 40+(240*1), 320, 220, frame03Style)//create frame (left,top,width,height)\n                .setTitle(\"Window3\")\n                .setResizable(true)\n                .setMovable(true);\n            frame03.setHTML(`<div id=\"my_element\" style=\"padding:10px;font-size:12px;color:darkgray;\">Contents of window03</div>`);\n            frame03.show();\n        }\n\n        frame01.requestFocus();\n    }\n\n    start();\n</script>\n\n</body>\n</html>"
  },
  {
    "path": "public/examples/v100/ex00/preset_yosemite.html",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n    <!--\n      JSFrame Examples\n      Copyright 2007-2019 Tom Misawa, riversun.org@gmail.com\n     -->\n    <title>JsFrame.js example</title>\n\n    <meta charset=\"utf-8\">\n    <meta name=\"description\" content=\"A javascript popup/floating window library.\">\n\n</head>\n<body style=\"background: url('http://upload.wikimedia.org/wikipedia/commons/d/d6/Half_Dome_from_Glacier_Point%2C_Yosemite_NP_-_Diliff.jpg') 50% no-repeat fixed; background-size: cover;\">\n\n<div style=\"color:#666666\">\n    <a href=\"https://github.com/riversun/JSFrame.js\">JSFrame.js</a> Example:preset style 'yosemite'\n</div>\n<script src=\"../../jsframe.js\"></script>\n\n<script>\n    function start() {\n\n        const jsFrame = new JSFrame();\n\n        const frames = [];\n        for (let i = 0; i < 3; i++) {\n            const yosemiteStyle = jsFrame.createPresetStyle('yosemite');\n            const frame = jsFrame.createFrame(20 + 320 * i, 40, 300, 200, yosemiteStyle).setTitle(`Window${i}`)\n            const innerHTML = `<div id=\"my_element\" style=\"padding:10px;font-size:12px;color:darkgray;\">Contents of window${i}</div>`;\n            frame.setHTML(innerHTML);\n            frame.setMinFrameSize(160, 100);\n            frame.getFrameView().style.backgroundColor = \"rgba(255,255,255,0.9)\";\n\n            frame.on('minimizeButton', 'click', (frm) => {\n                console.log(frm)\n                const size = frm.getSize();\n                frm.setSize(size.width - 20, size.height - 20);\n            });\n\n            frame.on('zoomButton', 'click', (frm) => {\n                console.log(frm)\n                const size = frm.getSize();\n                frm.setSize(size.width + 20, size.height + 20);\n            });\n\n\n            frame.show();\n            frames.push(frame);\n\n        }\n\n        frames[0].requestFocus();\n    }\n\n    start();\n</script>\n\n</body>\n</html>"
  },
  {
    "path": "public/examples/v100/ex01/ex01.css",
    "content": "/**\n * JSFrame Examples\n *\n * Copyright 2007-2017 Tom Misawa, riversun.org@gmail.com\n * Copyright 2007-2017 web2driver.com*/\n\n/* CSS class name for JSFrame */\n\n/* style for default(frame not focused) */\n.jsFrame\\.titlebar {\n    background: -moz-linear-gradient(top, #333333, #999999 50%, #aaaaaa 50%, #eeeeee);\n    background: -webkit-gradient(linear, left top, left bottom, from(#aaaaaa), color-stop(0.5, #999999), color-stop(0.5, #666666), to(#333333));\n    color: white;\n    font-size: 12px;\n}\n\n/* style for focused */\n.jsFrame\\.titlebar\\.focused {\n    background: -moz-linear-gradient(top, #BFD9E5, #63B0CF 50%, #0080B3 50%, #09C);\n    background: -webkit-gradient(linear, left top, left bottom, from(#BFD9E5), color-stop(0.5, #63B0CF), color-stop(0.5, #0080B3), to(#09C));\n    color: white;\n    font-size: 12px;\n}\n"
  },
  {
    "path": "public/examples/v100/ex01/ex01.js",
    "content": "/**\n * JSFrame Examples\n *\n * Copyright 2007- Tom Misawa, riversun.org@gmail.com\n * Copyright 2007- web2driver.com\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in the\n * Software without restriction, including without limitation the rights to use,\n * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\n * Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\n *  INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\n * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR\n * IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n *\n */\nvar jsFrame = new JSFrame();\n\n//frame1\n\n//create appearance(kind of frame design)\nvar frmStyle1 = jsFrame.createFrameAppearance();\n\n//create frame (left,top,width,height)\nvar frame01 = jsFrame.createFrame(20, 40, 320, 220, frmStyle1)\n    .setTitle(\"My Window1\")\n    //if true,you can resize the window\n    .setResizable(true)\n    //if true,you can drag and move the window\n    .setMovable(true);\n\nvar viewOfFrm01 = frame01.getFrameView();\n\nviewOfFrm01.innerHTML = '<div style=\"padding:10px;font-size:12px;color:darkgray\">Contents of window01</div>';\n\n//show window\nframe01.show();\n\n\n//frame2\nvar frmStyle2 = jsFrame.createFrameAppearance();\n\n\nvar frame02 = jsFrame.createFrame(360, 40, 320, 220, frmStyle2)\n    .setTitle(\"My Window2\")\n    .setResizable(true)\n    .setMovable(true);\n\nframe02.getFrameView().innerHTML =\n    '<div style=\"padding:10px;font-size:12px;color:darkgray\">Contents of window02</div>';\nframe02.show();\n\n\n\n\n\n\n\n\n\n"
  },
  {
    "path": "public/examples/v100/ex01/index.html",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n    <!--\n      JSFrame Examples\n\n      Copyright 2007-2019 Tom Misawa, riversun.org@gmail.com\n     -->\n    <title>JsFrame.js example - Basic Frames</title>\n    <meta charset=\"utf-8\">\n    <meta name=\"description\" content=\"A javascript popup/floating window library.\">\n\n</head>\n<body>\n<link href=\"ex01.css\" rel=\"stylesheet\" type=\"text/css\"/>\n\n<!-- for Internet explorer [begin] -->\n<script src=\"https://www.promisejs.org/polyfills/promise-6.1.0.min.js\"></script>\n<!-- for Internet explorer [end] -->\n\n<script src=\"../../jsframe.js\"></script>\n\n<script src=\"ex01.js\"></script>\n<div style=\"color:#666666\">\n    <a href=\"https://github.com/riversun/JSFrame.js\">JSFrame.js</a> Example : Basic Frames. <b>Move by dragging and\n    resize\n    frames.</b></div>\n</body>\n</html>\n"
  },
  {
    "path": "public/examples/v100/ex02/ex02.css",
    "content": "/**\n * JSFrame Examples\n *\n * Copyright 2007-2017 Tom Misawa, riversun.org@gmail.com\n * Copyright 2007-2017 web2driver.com*/\n\n/* original style for default state */\n.ex02title {\n    /* by http://www.colorzilla.com/gradient-editor/ */\n    background: -moz-linear-gradient(top, #ffffff 0%, #f1f1f1 50%, #e1e1e1 51%, #f6f6f6 100%); /* FF3.6-15 */\n    background: -webkit-linear-gradient(top, #ffffff 0%, #f1f1f1 50%, #e1e1e1 51%, #f6f6f6 100%); /* Chrome10-25,Safari5.1-6 */\n    background: linear-gradient(to bottom, #ffffff 0%, #f1f1f1 50%, #e1e1e1 51%, #f6f6f6 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */\n    color: black;\n    font-size: 12px;\n}\n\n/* original style for focused state */\n.ex02title_focused {\n    /* by http://www.colorzilla.com/gradient-editor/ */\n    background: -moz-linear-gradient(top, #feccb1 0%, #f17432 50%, #ea5507 51%, #fb955e 100%); /* FF3.6-15 */\n    background: -webkit-linear-gradient(top, #feccb1 0%, #f17432 50%, #ea5507 51%, #fb955e 100%); /* Chrome10-25,Safari5.1-6 */\n    background: linear-gradient(to bottom, #feccb1 0%, #f17432 50%, #ea5507 51%, #fb955e 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */\n    color: white;\n    font-size: 12px;\n}"
  },
  {
    "path": "public/examples/v100/ex02/ex02.js",
    "content": "/**\n * JSFrame Examples\n *\n * Copyright 2007- Tom Misawa, riversun.org@gmail.com\n * Copyright 2007- web2driver.com\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in the\n * Software without restriction, including without limitation the rights to use,\n * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\n * Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\n *  INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\n * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR\n * IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n *\n */\nvar jsFrame = new JSFrame();\n\n//frame 1\nvar frmStyle1 = jsFrame.createFrameAppearance().setUseIFrame(true);//useIframe as content view;\n\n//apply(override frame appearance) original style\nfrmStyle1 = getOriginalStyle01(frmStyle1);\n\nvar frame01 = jsFrame.createFrame(20, 40, 240, 150, frmStyle1);\n\n//set title bar style specific class name of CSS([className for default],[className for focused])\nframe01.setTitleBarClassName('ex02title', 'ex02title_focused');\nframe01.setTitle(\"My Window1\");\n\n\n//frame 2\nvar frmStyle2 = jsFrame.createFrameAppearance().setUseIFrame(true);//useIframe as content view;\nfrmStyle2 = getOriginalStyle01(frmStyle2);\n\nvar frame02 = jsFrame.createFrame(300, 40, 240, 150, frmStyle2);\n\nframe02.setTitleBarClassName('ex02title', 'ex02title_focused');\nframe02.setTitle(\"My Window2\");\n\n\n//frame 3\nvar frmStyle3 = jsFrame.createFrameAppearance().setUseIFrame(true);//useIframe as content view;\nfrmStyle3 = getOriginalStyle01(frmStyle3);\n\nvar frame03 = jsFrame.createFrame(20, 230, 240, 150, frmStyle3);\n\nframe03.setTitleBarClassName('ex02title', 'ex02title_focused');\nframe03.setTitle(\"My Window3\");\n\n//frame 4\nvar frmStyle4 = jsFrame.createFrameAppearance().setUseIFrame(true);//useIframe as content view;\nfrmStyle4 = getOriginalStyle01(frmStyle4);\n\nvar frame04 = jsFrame.createFrame(300, 230, 240, 150, frmStyle4);\n\nframe04.setTitleBarClassName('ex02title', 'ex02title_focused');\nframe04.setTitle(\"My Window4\");\n\n\nvar urls = [\n    frame01.setUrl('ex02_inner01.html'),\n    frame02.setUrl('ex02_inner02.html'),\n    frame03.setUrl('ex02_inner03.html'),\n    frame04.setUrl('ex02_inner04.html')\n];\n\n//Load urls.Wait until the content of iframe is loaded.\nPromise.all(urls)\n    .then(function () {\n        //When All iframe pages loaded,show frame\n        frame01.show();\n        frame02.show();\n        frame03.show();\n        frame04.show();\n\n        //focus on frame01\n        frame01.requestFocus();\n    });\n\n\n\n\n"
  },
  {
    "path": "public/examples/v100/ex02/ex02_inner01.html",
    "content": "<html>\n<head>\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n</head>\n<body>\n<div style=\"color:darkgray\">Iframe contents for window1</div>\n\n</body>\n</html>\n"
  },
  {
    "path": "public/examples/v100/ex02/ex02_inner02.html",
    "content": "<html>\n<head>\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n</head>\n<body>\n<div style=\"color:darkgray\">Iframe contents for window2</div>\n\n</body>\n</html>\n"
  },
  {
    "path": "public/examples/v100/ex02/ex02_inner03.html",
    "content": "<html>\n<head>\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n</head>\n<body>\n<div style=\"color:darkgray\">Iframe contents for window3</div>\n\n</body>\n</html>\n"
  },
  {
    "path": "public/examples/v100/ex02/ex02_inner04.html",
    "content": "<html>\n<head>\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n</head>\n<body>\n<div style=\"color:darkgray\">Iframe contents for window4</div>\n\n</body>\n</html>\n"
  },
  {
    "path": "public/examples/v100/ex02/ex02_style.js",
    "content": "/**\n * JSFrame Examples\n *\n * Copyright 2007- Tom Misawa, riversun.org@gmail.com\n * Copyright 2007- web2driver.com\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in the\n * Software without restriction, including without limitation the rights to use,\n * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\n * Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\n *  INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\n * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR\n * IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n *\n */\nfunction getOriginalStyle01(frameAppearance) {\n\n    /**\n     * Whether to display the title bar in the header or not\n     */\n    frameAppearance.showTitleBar = true;\n\n    /**\n     * Whether or not to display the default close button\n     */\n    frameAppearance.showCloseButton = true;\n\n    /**\n     * Font size for caption of title bar\n     * ex) '14px'\n     */\n    frameAppearance.titleBarCaptionFontSize = '';\n\n    /**\n     * Font weight for caption of title bar\n     * (Possible values) 'normal' 'bold' 'lighter' 'bolder' '100' '400' '700'...\n     */\n    frameAppearance.titleBarCaptionFontWeight = 'bold';\n\n    /**\n     * Height of title bar\n     */\n    frameAppearance.titleBarHeight = '24px';\n\n    /**\n     * The position from the left side of the caption.\n     * If this value is null, caption will be centered.\n     */\n    frameAppearance.titleBarCaptionLeftMargin = '5px';\n\n    /**\n     * Caption color for default state\n     * ('default' means 'NOT focused')\n     *\n     * If empty,JsFrame will apply style in the CSS.\n     */\n    frameAppearance.titleBarCaptionColorDefault = '';\n\n    /**\n     *  Caption color for focused state\n     *  If empty,JsFrame will apply style in the CSS.\n     */\n    frameAppearance.titleBarCaptionColorFocused = '';\n\n    /**\n     * Title bar background color for default state.\n     * If empty,JsFrame will apply style in the CSS.\n     */\n    frameAppearance.titleBarColorDefault = '';\n\n    /**\n     * Title bar background color for focused state\n     */\n    frameAppearance.titleBarColorFocused = '';\n\n    /**\n     * Bottom style of title bar\n     */\n    frameAppearance.titleBarBorderBottomDefault = '1px solid rgba(0,0,0,0.2)';\n\n    /**\n     * Frame's corner radius\n     */\n    frameAppearance.frameBorderRadius = '5px';\n\n    /**\n     * Border width for default state\n     */\n    frameAppearance.frameBorderWidthDefault = '2px';\n\n    /**\n     * Border width for focused state\n     */\n    frameAppearance.frameBorderWidthFocused = '2px';\n\n\n    /**\n     * Border color for default state\n     */\n    frameAppearance.frameBorderColorDefault = 'rgba(1, 1, 1, 0.2)';\n\n    /**\n     * Border color for focused state\n     */\n    frameAppearance.frameBorderColorFocused = '#feccb1';\n\n    /**\n     * Border style\n     */\n    frameAppearance.frameBorderStyle = 'solid';\n\n    /**\n     * Box shadow style of frame\n     */\n    frameAppearance.frameBoxShadow = '5px 5px 10px  rgba(0, 0, 0, 0.3)';\n\n    /**\n     * Back ground color of frame\n     */\n    frameAppearance.frameBackgroundColor = 'white';\n\n\n    /**\n     * Array for frameComponents\n     * frameComponents are custom parts on the frame\n     */\n    frameAppearance.frameComponents = new Array();\n\n\n    /**\n     * Since this callback method is called at frame initialization,\n     * Initialization processing such as adding frameComponent should be written here.\n     */\n    frameAppearance.onInitialize = function () {\n\n\n        /**\n          *A child element of Frame named FrameComponent can be added to Frame.\n         * FrameComponent is attached to Frame and it moves with Frame.\n         * The close button is also one of FrameComponent.\n         * FrameComponent is created using DOM elements,\n         * but using partsBuilder makes it easy to create a FrameComponent\n         * that we often use such as close button.\n         */\n        var partsBuilder = frameAppearance.getPartsBuilder();\n\n        /**\n         * Here we use partsBuilder to create a TextButton to be a close button\n         * that is a DOM element and will be added to frame as FrameComponent.\n         *\n         * First,\n         * Get appearance model for TextButton to specify styles.\n         */\n        var btnAppearance = partsBuilder.buildTextButtonAppearance();\n\n        /**\n         * Width(Height) for text button\n         */\n        btnAppearance.size = 13;\n\n        /**\n         * Corner radius\n         */\n        btnAppearance.borderRadius = 2;\n\n        /**\n         * Border width\n         */\n        btnAppearance.borderWidth = 1;\n\n        /**\n         * Border color for default state\n         */\n        btnAppearance.borderColorDefault = 'darkgray';\n\n        /**\n         * Border color for focused state\n         */\n        btnAppearance.borderColorFocused = 'white';\n\n        /**\n         * Border color for pressed state\n         */\n        btnAppearance.borderColorPressed = 'tomato';\n\n        /**\n         * Border style for default state\n         *\n         * (Possible values)\n         * 'none'  'hidden'  'solid'  'double'  'groove'  'ridge'  'inset'  'outset'  'dashed'  'dotted'\n         *\n         */\n        btnAppearance.borderStyleDefault = 'solid';\n\n        /**\n         * Border style for focused state\n         */\n        btnAppearance.borderStyleFocused = 'solid';\n\n        /**\n         * Border style for pressed state\n         */\n        btnAppearance.borderStylePressed = 'solid';\n\n        /**\n         * Background color for default state\n         */\n        btnAppearance.backgroundColorDefault = 'transparent';\n\n        /**\n         * Background color for focused state\n         */\n        btnAppearance.backgroundColorFocused = 'transparent';\n\n        /**\n         * Background color for pressed state\n         */\n        btnAppearance.backgroundColorPressed = 'transparent';\n\n\n        /**\n         * Caption text example for 'x' cross mark.\n         */\n        const crossMark0 = '\\u274c';\n        const crossMark1 = '\\u2716';\n        const crossMark2 = '\\u274e';\n        const CROSS_MARK = '\\u2573';\n        /**\n         * Caption text for text button\n         */\n        btnAppearance.caption = CROSS_MARK;\n\n        /**\n         * Caption color for default state\n         */\n        btnAppearance.captionColorDefault = 'darkgray';\n\n        /**\n         * Caption color for focused state\n         */\n        btnAppearance.captionColorFocused = 'white';\n\n        /**\n         * Caption color for pressed state\n         */\n        btnAppearance.captionColorPressed = 'tomato';\n\n        /**\n         *  There are cases where the text does not come to the vertical center position within the element,\n         *  adjust with this value\n         */\n        btnAppearance.captionShiftYpx = 1;\n\n        /**\n         *  Factor value of font size to 'btnAppearance.size'\n         */\n        btnAppearance.captionFontRatio = 0.6;\n\n        /**\n         * Create textButton DOM element.\n         */\n        var closeBtnEle = partsBuilder.buildTextButton(btnAppearance);\n\n\n        /**\n         *  Specify where frameComponent is aligned in frame.\n         *  In this example, the close button is placed on the upper right.\n         *\n         *  (Possible values)\n         *  'LEFT_TOP' 'CENTER_TOP' 'RIGHT_TOP' 'LEFT_CENTER' 'CENTER_CENTER' 'RIGHT_CENTER' 'LEFT_BOTTOM' 'CENTER_BOTTOM' 'RIGHT_BOTTOM'\n         */\n        var eleAlign = 'RIGHT_TOP';\n\n        /**\n         * Relative x,y positions from the snap position specified by alignment\n         */\n        var x = -10;\n        var y = -20;\n\n        // 'closeButton' is a special name\n        frameAppearance.addFrameComponent('closeButton', closeBtnEle, x, y, eleAlign);\n\n    };\n    //\n\n    return frameAppearance;\n}"
  },
  {
    "path": "public/examples/v100/ex02/index.html",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n    <!--\n      JSFrame Examples\n\n      Copyright 2007-2019 Tom Misawa, riversun.org@gmail.com\n     -->\n    <title>JsFrame.js example - Use IFrame</title>\n    <meta charset=\"utf-8\">\n    <meta name=\"description\" content=\"A javascript popup/floating window library.\">\n\n</head>\n<body>\n<link href=\"ex02.css\" rel=\"stylesheet\" type=\"text/css\"/>\n\n<!-- for Internet explorer [begin] -->\n<script src=\"https://www.promisejs.org/polyfills/promise-6.1.0.min.js\"></script>\n<!-- for Internet explorer [end] -->\n\n<script src=\"../../jsframe.js\"></script>\n\n<script src=\"ex02_style.js\"></script>\n<script src=\"ex02.js\"></script>\n<div style=\"color:#666666\"><a href=\"https://github.com/riversun/JSFrame.js\">JSFrame.js</a> Example : Use IFrame for\n    contents and Customize frame design with script and CSS.\n</div>\n\n</body>\n</html>\n"
  },
  {
    "path": "public/examples/v100/ex03/ex03.css",
    "content": "/**\n * JSFrame Examples\n *\n * Copyright 2007-2017 Tom Misawa, riversun.org@gmail.com\n * Copyright 2007-2017 web2driver.com*/\n\n.ex03title_yosemite_style_default {\n    background: -webkit-gradient(linear, left top, left bottom, color-stop(0.0, #f5f5f5, color-stop(1.0, #f8f7f2)));\n    background: -webkit-linear-gradient(top, #f5f5f5, #f8f7f2);\n    background: -moz-linear-gradient(top, #f5f5f5, #f8f7f2);\n    background: linear-gradient(top, #f5f5f5, #f8f7f2);\n    border-top-left-radius: 6px;\n    border-top-right-radius: 6px;\n}\n\n.ex03title_yosemite_style_focused {\n    /* (c)2015 Johannes Jakob\n       Made with <3 in Germany */\n    background: -webkit-gradient(linear, left top, left bottom, color-stop(0.0, #ebebeb, color-stop(1.0, #d5d5d5)));\n    background: -webkit-linear-gradient(top, #ebebeb, #d5d5d5);\n    background: -moz-linear-gradient(top, #ebebeb, #d5d5d5);\n    background: linear-gradient(top, #ebebeb, #d5d5d5);\n    border-top-left-radius: 6px;\n    border-top-right-radius: 6px;\n}\n"
  },
  {
    "path": "public/examples/v100/ex03/ex03.js",
    "content": "/**\n * JSFrame Examples\n *\n * Copyright 2007- Tom Misawa, riversun.org@gmail.com\n * Copyright 2007- web2driver.com\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in the\n * Software without restriction, including without limitation the rights to use,\n * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\n * Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\n *  INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\n * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR\n * IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n *\n */\n\nvar jsFrame = new JSFrame();\n\nvar frame01 = jsFrame.createFrame(20, 40, 240, 150, getOriginalStyle_ex03_yosemite_style(jsFrame.createFrameAppearance()));\n\n//(classNameForDefault, classNameForFocused)\nframe01.setTitleBarClassName('ex03title_yosemite_style_default', 'ex03title_yosemite_style_focused');\nframe01.setTitle('My Window 1');\nframe01.getFrameView().style.backgroundColor = \"rgba(255,255,255,0.9)\";\nframe01.getFrameView().innerHTML = '<div style=\"padding:10px;font-size:16px;color:dimgray;\">Yosemite Style</div>';\n\nframe01.show();\n\n//Set callback for frameComponent\nframe01.getFrameComponentElement('minimizeButton').onclick = function (e) {\n    //[TIPS]\n    //You know the object 'frame01' and 'this.parentObject' point the same object.\n    //But using 'this.parentObject' like below is strongly recommended instead of using 'frame01'\n    var frame = this.parentObject;\n    frame.setSize(200, 125);\n};\nframe01.getFrameComponentElement('zoomButton').onclick = function (e) {\n    var frame = this.parentObject;\n    frame.setSize(240, 150);\n};\n\nif (true) {\n    var frame02 = jsFrame.createFrame(300, 40, 240, 150, getOriginalStyle_ex03_yosemite_style(jsFrame.createFrameAppearance()));\n\n//(classNameForDefault, classNameForFocused)\n    frame02.setTitleBarClassName('ex03title_yosemite_style_default', 'ex03title_yosemite_style_focused');\n    frame02.setTitle('My Window 2');\n    frame02.getFrameView().style.backgroundColor = \"rgba(255,255,255,0.9)\";\n    frame02.getFrameView().innerHTML = '<div style=\"padding:10px;font-size:16px;color:dimgray;\">Yosemite Style</div>';\n    frame02.show();\n\n//Set callback for frameComponent\n    frame02.getFrameComponentElement('minimizeButton').onclick = function (e) {\n        var frame = this.parentObject;\n        frame.setSize(200, 125);\n    };\n    frame02.getFrameComponentElement('zoomButton').onclick = function (e) {\n        var frame = this.parentObject;\n        frame.setSize(240, 150);\n    };\n\n\n    var frame03 = jsFrame.createFrame(20, 220, 520, 200, getOriginalStyle_ex03_yosemite_style(jsFrame.createFrameAppearance()));\n\n//(classNameForDefault, classNameForFocused)\n    frame03.setTitleBarClassName('ex03title_yosemite_style_default', 'ex03title_yosemite_style_focused');\n    frame03.setTitle('My Window 3');\n    frame03.getFrameView().style.backgroundColor = \"rgba(255,255,255,0.9)\";\n    frame03.getFrameView().innerHTML = '<div style=\"padding:10px;font-size:16px;color:dimgray;\">Yosemite Style</div>';\n    frame03.show();\n\n//Set callback for frameComponent\n    frame03.getFrameComponentElement('minimizeButton').onclick = function (e) {\n        var frame = this.parentObject;\n        frame.setSize(200, 125);\n    };\n    frame03.getFrameComponentElement('zoomButton').onclick = function (e) {\n        var frame = this.parentObject;\n        frame.setSize(520, 200);\n    };\n}\n//focus on frame01\nframe01.requestFocus();\n"
  },
  {
    "path": "public/examples/v100/ex03/ex03_style.js",
    "content": "/**\n * JSFrame Examples\n *\n * Copyright 2007- Tom Misawa, riversun.org@gmail.com\n * Copyright 2007- web2driver.com\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in the\n * Software without restriction, including without limitation the rights to use,\n * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\n * Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\n *  INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\n * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR\n * IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n *\n */\nfunction getOriginalStyle_ex03_yosemite_style(fApr) {\n\n    fApr.showTitleBar = true;\n    fApr.showCloseButton = true;\n\n    fApr.titleBarCaptionFontSize = '11px';\n    fApr.titleBarCaptionFontWeight = 'normal';\n    fApr.titleBarCaptionLeftMargin = null;\n    fApr.titleBarCaptionColorDefault = '#4d494d';\n    fApr.titleBarCaptionColorFocused = '#4d494d';\n\n    fApr.titleBarHeight = '26px';\n\n    fApr.titleBarColorDefault = '#f4f4f4';\n    fApr.titleBarColorFocused = '#f4f4f4';\n\n    fApr.titleBarBorderBottomDefault = '1px solid #b1aeb1';\n    fApr.titleBarBorderBottomFocused = fApr.titleBarBorderBottomDefault;\n\n    fApr.frameBorderRadius = '6px';\n\n    //border width\n    fApr.frameBorderWidthDefault = '1px';\n    fApr.frameBorderWidthFocused = '1px';\n\n\n    //border color\n    fApr.frameBorderColorDefault = '#acacac';\n    fApr.frameBorderColorFocused = '#acacac';\n\n    fApr.frameBorderStyle = 'solid';\n\n    //window shadow\n    fApr.frameBoxShadow = '0px 0px 20px rgba(0, 0, 0, 0.3)';\n\n    fApr.frameBackgroundColor = 'transparent';\n\n\n    fApr.frameComponents = new Array();\n\n\n    fApr.onInitialize = function () {\n\n        var partsBuilder = fApr.getPartsBuilder();\n\n        var img_data_close_hovered = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAFdJREFUeNpi/P//PwNeAFKgLCF6AIjnwMRAbJAYSI4FKnYHiJOBgjA1yUA8F24Ckq7/UDwHJsfEQACwwHSjGIuwLgXmBhWQ5N0Xr1OgGmBiDIyEvAkQYAB60iRIRtfWzQAAAABJRU5ErkJggg==';\n        var img_data_maximize_hovered = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADxJREFUeNpiYEACyhKiU0AYWYyJARX4QDFOBRiAEWokTJc0lH4KpbcQNIEBzZEPQJgkN7Cg8begKwAIMAC1EQhm4CX95QAAAABJRU5ErkJggg==';\n        var img_data_minimize_hovered = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAChJREFUeNpi/P//PwM+wMRAABBUwKIiKTYFSPvgkN9C0ARG2jsSIMAAWWAH8lrycVkAAAAASUVORK5CYII=';\n        var img_data_1dot_transparent = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABBJREFUeNpi+P//PwNAgAEACPwC/tuiTRYAAAAASUVORK5CYII=';\n        var img_style = 'margin:0px;padding:0px;width:6px;height:6px';\n\n        var imageMaximize = document.createElement('img');\n        imageMaximize.src = img_data_maximize_hovered;\n        imageMaximize.setAttribute('style', img_style);\n\n        var imageMinimize = document.createElement('img');\n        imageMinimize.src = img_data_minimize_hovered;\n        imageMinimize.setAttribute('style', img_style);\n\n        var imageClose = document.createElement('img');\n        imageClose.src = img_data_close_hovered;\n        imageClose.setAttribute('style', img_style);\n\n\n        var imgTransparent = document.createElement('img');\n        imgTransparent.src = img_data_1dot_transparent;\n        imgTransparent.setAttribute('style', 'margin:0px;padding:0px;width:6px;height:6px');\n\n        {\n            //configure close button appearance[begin]//////////////\n\n\n            var cbApr = partsBuilder.buildTextButtonAppearance();\n\n            cbApr.size = 8;\n\n            cbApr.borderRadius = 4;\n            cbApr.borderWidth = 1;\n\n            cbApr.borderColorDefault = '#c6c6c6';\n            cbApr.borderColorFocused = '#fc615c';\n            cbApr.borderColorHovered = cbApr.borderColorFocused;\n            cbApr.borderColorPressed = '#e64842';\n\n            cbApr.borderStyleDefault = 'solid';\n            cbApr.borderStyleFocused = cbApr.borderStyleDefault;\n            cbApr.borderStyleHovered = cbApr.borderStyleDefault;\n            cbApr.borderStylePressed = cbApr.borderStyleDefault;\n\n            //background\n            cbApr.backgroundColorDefault = '#d0d0d0';\n            cbApr.backgroundColorFocused = '#fc615c';\n            cbApr.backgroundColorHovered = cbApr.backgroundColorFocused;\n            cbApr.backgroundColorPressed = cbApr.backgroundColorDefault;\n\n            cbApr.imageDefault = imgTransparent;\n            cbApr.imageHovered = imageClose;\n            cbApr.imagePressed = imageClose;\n            cbApr.imageFocused = imgTransparent;\n\n            var closeBtnEle = partsBuilder.buildButton(cbApr);\n            var eleLeft = 8;\n            var eleTop = -18;\n            var eleAlign = 'LEFT_TOP';\n\n            // 'closeButton' is a special name\n            fApr.addFrameComponent('closeButton', closeBtnEle, eleLeft, eleTop, eleAlign);\n\n            //configure close button appearance[end]//////////////\n        }\n\n        {\n            //configure minimize button appearance[begin]//////////////\n            const HYPHEN = '\\u2013';\n\n            var mbApr = partsBuilder.buildTextButtonAppearance();\n\n\n            mbApr.size = 8;\n\n            mbApr.borderRadius = 4;\n            mbApr.borderWidth = 1;\n\n            mbApr.borderColorDefault = '#c6c6c6';\n            mbApr.borderColorFocused = '#fdbe40';\n            mbApr.borderColorHovered = mbApr.borderColorFocused;\n            mbApr.borderColorPressed = '#e1a12d';\n\n            mbApr.borderStyleDefault = 'solid';\n            mbApr.borderStyleFocused = mbApr.borderStyleDefault;\n            mbApr.borderStyleHovered = mbApr.borderStyleDefault;\n            mbApr.borderStylePressed = mbApr.borderStyleDefault;\n\n            //background\n            mbApr.backgroundColorDefault = '#d0d0d0';\n            mbApr.backgroundColorFocused = '#fdbe40';\n            mbApr.backgroundColorHovered = mbApr.backgroundColorFocused;\n            mbApr.backgroundColorPressed = mbApr.backgroundColorDefault;\n\n            mbApr.imageDefault = imgTransparent;\n            mbApr.imageHovered = imageMinimize;\n            mbApr.imagePressed = imageMinimize;\n            mbApr.imageFocused = imgTransparent;\n\n            var minimizeBtnEle = partsBuilder.buildButton(mbApr);\n            var eleLeft = 24;\n            var eleTop = -18;\n            var eleAlign = 'LEFT_TOP';\n\n\n            fApr.addFrameComponent('minimizeButton', minimizeBtnEle, eleLeft, eleTop, eleAlign);\n\n            //configure minimize button appearance[end]//////////////\n        }\n\n        {\n            //configure zoom button appearance[begin]//////////////\n            var zbApr = partsBuilder.buildTextButtonAppearance();\n\n            zbApr.size = 8;\n\n            zbApr.borderRadius = 4;\n            zbApr.borderWidth = 1;\n\n            zbApr.borderColorDefault = '#c6c6c6';\n            zbApr.borderColorFocused = '#34ca49';\n            zbApr.borderColorHovered = zbApr.borderColorFocused;\n            zbApr.borderColorPressed = '#00af38';\n\n            zbApr.borderStyleDefault = 'solid';\n            zbApr.borderStyleFocused = zbApr.borderStyleDefault;\n            zbApr.borderStyleHovered = zbApr.borderStyleDefault;\n            zbApr.borderStylePressed = zbApr.borderStyleDefault;\n\n            //background\n            zbApr.backgroundColorDefault = '#d0d0d0';\n            zbApr.backgroundColorFocused = '#34ca49';\n            zbApr.backgroundColorHovered = zbApr.backgroundColorFocused;\n            zbApr.backgroundColorPressed = zbApr.backgroundColorDefault;\n\n            //caption\n            zbApr.caption = null;\n\n            zbApr.imageDefault = imgTransparent;\n            zbApr.imageHovered = imageMaximize;\n            zbApr.imagePressed = imageMaximize;\n            zbApr.imageFocused = imgTransparent;\n\n            var zoomBtnEle = partsBuilder.buildButton(zbApr);\n            var eleLeft = 40;\n            var eleTop = -18;\n            var eleAlign = 'LEFT_TOP';\n\n\n            fApr.addFrameComponent('zoomButton', zoomBtnEle, eleLeft, eleTop, eleAlign);\n\n            //configure zoom button appearance[end]//////////////\n        }\n    };\n    //\n\n    return fApr;\n}"
  },
  {
    "path": "public/examples/v100/ex03/index.html",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n    <!--\n      JSFrame Examples\n\n      Copyright 2007-2019 Tom Misawa, riversun.org@gmail.com\n     -->\n    <title>JsFrame.js example - Yosemite Style</title>\n    <meta charset=\"utf-8\">\n    <meta name=\"description\" content=\"A javascript popup/floating window library.\">\n\n\n</head>\n<body style=\"background: url('http://upload.wikimedia.org/wikipedia/commons/d/d6/Half_Dome_from_Glacier_Point%2C_Yosemite_NP_-_Diliff.jpg') 50% no-repeat fixed; background-size: cover;\">\n\n<link href=\"ex03.css\" rel=\"stylesheet\" type=\"text/css\"/>\n\n<!-- for Internet explorer [begin] -->\n<script src=\"https://www.promisejs.org/polyfills/promise-6.1.0.min.js\"></script>\n<!-- for Internet explorer [end] -->\n\n<script src=\"../../jsframe.js\"></script>\n<script src=\"ex03_style.js\"></script>\n<script src=\"ex03.js\"></script>\n<div style=\"color:#666666\"><a href=\"https://github.com/riversun/JSFrame.js\">JSFrame</a> Example : Yosemite Style. <b>Click\n    multiple buttons on the upper left.</b></div>\n<div\n        style=\"font-size: 12px; color: white; position: fixed; right: 10px; bottom: 10px\">\n    Photo by DAVID ILIFF. License: CC-BY-SA 3.0\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "public/examples/v100/ex04/ex04.css",
    "content": ".ex04title_default {\n    background: white;\n    border-top-left-radius: 0px;\n    border-top-right-radius: 0px;\n}\n\n.ex04title_focused {\n    background: white;\n    border-top-left-radius: 0px;\n    border-top-right-radius: 0px;\n}\n"
  },
  {
    "path": "public/examples/v100/ex04/ex04.js",
    "content": "/**\n * JSFrame Examples\n *\n * Copyright 2007- Tom Misawa, riversun.org@gmail.com\n * Copyright 2007- web2driver.com\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in the\n * Software without restriction, including without limitation the rights to use,\n * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\n * Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\n *  INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\n * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR\n * IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n *\n */\nvar jsFrame = new JSFrame();\n\n\nfunction handleMaximizeWindow(e) {\n\n    var frame = this.parentObject;\n    var maximizeButtonEle = this;\n\n    frame._window_restoreInfo = {};\n    frame._window_restoreInfo.left = frame.getLeft();\n    frame._window_restoreInfo.top = frame.getTop();\n    frame._window_restoreInfo.width = frame.getWidth();\n    frame._window_restoreInfo.height = frame.getHeight();\n\n    maximizeButtonEle.style.visibility = 'hidden';\n\n    var restoreButtonEle = frame.getFrameComponentElement('restoreButton');\n    restoreButtonEle.style.visibility = 'visible';\n\n\n    frame.setPosition(0, 0);\n    frame.setSize(window.innerWidth, window.innerHeight);\n\n    frame.setMovable(false);\n    frame.setResizable(false);\n\n}\n\nfunction handleRestoreWindow(e) {\n\n    var frame = this.parentObject;\n    var restoreButtonEle = this;\n\n    restoreButtonEle.style.visibility = 'hidden';\n\n    var maximizeButton = frame.getFrameComponentElement('maximizeButton');\n    maximizeButton.style.visibility = 'visible';\n\n    frame.setMovable(true);\n    frame.setResizable(true);\n\n    frame.setPosition(frame._window_restoreInfo.left, frame._window_restoreInfo.top);\n    frame.setSize(frame._window_restoreInfo.width, frame._window_restoreInfo.height);\n\n\n}\n\nvar frame01 = jsFrame.createFrame(20, 40, 320, 240, getOriginalStyle_ex04_win10_style(jsFrame.createFrameAppearance()));\n\nframe01.setTitle(\"My Window 1\").getFrameView().innerHTML =\n    '<div style=\"padding:5px;font-size:10px;color:dimgray;\">Win64 Style<br/>Click Maximize button to maximize me.</div>';\nframe01.setTitleBarClassName('ex04title_default','ex04title_focused');\nframe01.show();\n\nframe01.getFrameComponentElement('maximizeButton').onclick = handleMaximizeWindow;\nframe01.getFrameComponentElement('restoreButton').onclick = handleRestoreWindow;\n\nvar frame02 = jsFrame.createFrame(360, 40, 320, 240, getOriginalStyle_ex04_win10_style(jsFrame.createFrameAppearance()));\n\nframe02.setTitle(\"My Window 2\").getFrameView().innerHTML =\n    '<div style=\"padding:5px;font-size:10px;color:dimgray;\">Win64 Style<br/>Click Maximize button to maximize me.</div>';\nframe02.setTitleBarClassName('ex04title_default','ex04title_focused');\nframe02.show();\n\nframe02.getFrameComponentElement('maximizeButton').onclick = handleMaximizeWindow;\nframe02.getFrameComponentElement('restoreButton').onclick = handleRestoreWindow;\n\nframe01.requestFocus();\n"
  },
  {
    "path": "public/examples/v100/ex04/ex04_style.js",
    "content": "/**\n * JSFrame Examples\n *\n * Copyright 2007- Tom Misawa, riversun.org@gmail.com\n * Copyright 2007- web2driver.com\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in the\n * Software without restriction, including without limitation the rights to use,\n * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\n * Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\n *  INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\n * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR\n * IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n *\n */\nfunction getOriginalStyle_ex04_win10_style(fApr) {\n\n    fApr.showTitleBar = true;\n    fApr.showCloseButton = true;\n\n    fApr.titleBarCaptionFontSize = '12px';\n    fApr.titleBarCaptionFontWeight = 'normal';\n    fApr.titleBarCaptionLeftMargin = '10px';\n    fApr.titleBarCaptionColorDefault = '#9b9a9b';\n    fApr.titleBarCaptionColorFocused = '#4d494d';\n\n    fApr.titleBarHeight = '30px';\n\n    fApr.titleBarColorDefault = 'white';\n    fApr.titleBarColorFocused = 'white';\n\n    fApr.titleBarBorderBottomDefault = 'solid 1px #aaaaaa';\n    fApr.titleBarBorderBottomFocused = 'solid 1px #1883d7';\n\n    fApr.frameBorderRadius = '0px';\n\n    //border width\n    fApr.frameBorderWidthDefault = '1px';\n    fApr.frameBorderWidthFocused = '1px';\n\n\n    //border color\n    fApr.frameBorderColorDefault = '#aaaaaa';\n    fApr.frameBorderColorFocused = '#1883d7';\n\n    fApr.frameBorderStyle = 'solid';\n\n    //window shadow\n    fApr.frameBoxShadow = null;\n\n    fApr.frameBackgroundColor = 'white';\n\n\n    fApr.frameComponents = new Array();\n\n    //adjustment value\n    fApr.frameHeightAdjust = 0;//default is 1\n\n    fApr.onInitialize = function () {\n\n\n        var partsBuilder = fApr.getPartsBuilder();\n\n\n        {\n            //configure close button appearance[begin]//////////////\n\n            const CROSS_MARK = '\\u2573';\n\n            var cbApr = partsBuilder.buildTextButtonAppearance();\n\n            cbApr.width = 45;\n            cbApr.height = 28;\n\n\n            cbApr.borderRadius = 0;\n            cbApr.borderWidth = 0;\n\n            cbApr.borderColorDefault = '#c6c6c6';\n            cbApr.borderColorFocused = '#fc615c';\n            cbApr.borderColorHovered = cbApr.borderColorFocused;\n            cbApr.borderColorPressed = '#e64842';\n\n            cbApr.borderStyleDefault = 'solid';\n            cbApr.borderStyleFocused = cbApr.borderStyleDefault;\n            cbApr.borderStyleHovered = cbApr.borderStyleDefault;\n            cbApr.borderStylePressed = cbApr.borderStyleDefault;\n\n            //background\n            cbApr.backgroundColorDefault = 'white';\n            cbApr.backgroundColorFocused = 'white';\n            cbApr.backgroundColorHovered = '#e81123';\n            cbApr.backgroundColorPressed = '#f1707a';\n\n            //caption\n            cbApr.caption = CROSS_MARK;\n\n            cbApr.captionColorDefault = '#9b9a9b';\n            cbApr.captionColorFocused = 'black';\n            cbApr.captionColorHovered = 'white';\n            cbApr.captionColorPressed = 'white';\n\n            cbApr.captionShiftYpx = 1;\n            cbApr.captionFontRatio = 0.6;\n\n            var closeBtnEle = partsBuilder.buildTextButton(cbApr);\n            var eleLeft = 0;\n            var eleTop = -parseInt(fApr.titleBarHeight);\n            var eleAlign = 'RIGHT_TOP';\n\n            // 'closeButton' is a special name\n            fApr.addFrameComponent('closeButton', closeBtnEle, eleLeft, eleTop, eleAlign);\n\n            //configure close button appearance[end]//////////////\n        }\n\n        {\n            //configure close button appearance[begin]//////////////\n\n            const MAXIMIZE_MARK = '\\u2610';\n\n            var maxApr = partsBuilder.buildTextButtonAppearance();\n\n            maxApr.width = 45;\n            maxApr.height = 28;\n\n\n            maxApr.borderRadius = 0;\n            maxApr.borderWidth = 0;\n\n            maxApr.borderColorDefault = '#c6c6c6';\n            maxApr.borderColorFocused = '#fc615c';\n            maxApr.borderColorHovered = maxApr.borderColorFocused;\n            maxApr.borderColorPressed = '#e64842';\n\n            maxApr.borderStyleDefault = 'solid';\n            maxApr.borderStyleFocused = maxApr.borderStyleDefault;\n            maxApr.borderStyleHovered = maxApr.borderStyleDefault;\n            maxApr.borderStylePressed = maxApr.borderStyleDefault;\n\n            //background\n            maxApr.backgroundColorDefault = 'white';\n            maxApr.backgroundColorFocused = 'white';\n            maxApr.backgroundColorHovered = '#e5e5e5';\n            maxApr.backgroundColorPressed = '#cccccc';\n\n            //caption\n            maxApr.caption = MAXIMIZE_MARK;\n\n            maxApr.captionColorDefault = '#9b9a9b';\n            maxApr.captionColorFocused = 'black';\n            maxApr.captionColorHovered = 'black';\n            maxApr.captionColorPressed = 'black';\n\n            maxApr.captionShiftYpx = 1;\n            maxApr.captionFontRatio = 0.55;\n\n            var maxBtnEle = partsBuilder.buildTextButton(maxApr);\n            var eleLeft = -46;\n            var eleTop = -parseInt(fApr.titleBarHeight);\n            var eleAlign = 'RIGHT_TOP';\n\n            // 'closeButton' is a special name\n            fApr.addFrameComponent('maximizeButton', maxBtnEle, eleLeft, eleTop, eleAlign);\n\n            //configure close button appearance[end]//////////////\n        }\n\n        {\n            //configure close button appearance[begin]//////////////\n\n            const MINIMIZE_MARK = '\\uff3f';\n\n            var minApr = partsBuilder.buildTextButtonAppearance();\n\n            minApr.width = 45;\n            minApr.height = 28;\n\n\n            minApr.borderRadius = 0;\n            minApr.borderWidth = 0;\n\n            minApr.borderColorDefault = '#c6c6c6';\n            minApr.borderColorFocused = '#fc615c';\n            minApr.borderColorHovered = minApr.borderColorFocused;\n            minApr.borderColorPressed = '#e64842';\n\n            minApr.borderStyleDefault = 'solid';\n            minApr.borderStyleFocused = minApr.borderStyleDefault;\n            minApr.borderStyleHovered = minApr.borderStyleDefault;\n            minApr.borderStylePressed = minApr.borderStyleDefault;\n\n            //background\n            minApr.backgroundColorDefault = 'white';\n            minApr.backgroundColorFocused = 'white';\n            minApr.backgroundColorHovered = '#e5e5e5';\n            minApr.backgroundColorPressed = '#cccccc';\n\n            //caption\n            minApr.caption = MINIMIZE_MARK;\n\n            minApr.captionColorDefault = '#9b9a9b';\n            minApr.captionColorFocused = 'black';\n            minApr.captionColorHovered = 'black';\n            minApr.captionColorPressed = 'black';\n\n            minApr.captionShiftYpx = -2;\n            minApr.captionFontRatio = 0.3;\n\n            var minBtnEle = partsBuilder.buildTextButton(minApr);\n            var eleLeft = -92;\n            var eleTop = -parseInt(fApr.titleBarHeight);\n            var eleAlign = 'RIGHT_TOP';\n\n            // 'closeButton' is a special name\n            fApr.addFrameComponent('minimizeButton', minBtnEle, eleLeft, eleTop, eleAlign);\n\n            //configure close button appearance[end]//////////////\n        }\n\n        {\n            //configure close button appearance[begin]//////////////\n\n            const RESTORE_MARK = '\\u274F';\n\n            var rbApr = partsBuilder.buildTextButtonAppearance();\n\n            rbApr.width = 45;\n            rbApr.height = 28;\n\n\n            rbApr.borderRadius = 0;\n            rbApr.borderWidth = 0;\n\n            rbApr.borderColorDefault = '#c6c6c6';\n            rbApr.borderColorFocused = '#fc615c';\n            rbApr.borderColorHovered = rbApr.borderColorFocused;\n            rbApr.borderColorPressed = '#e64842';\n\n            rbApr.borderStyleDefault = 'solid';\n            rbApr.borderStyleFocused = rbApr.borderStyleDefault;\n            rbApr.borderStyleHovered = rbApr.borderStyleDefault;\n            rbApr.borderStylePressed = rbApr.borderStyleDefault;\n\n            //background\n            rbApr.backgroundColorDefault = 'white';\n            rbApr.backgroundColorFocused = 'white';\n            rbApr.backgroundColorHovered = '#e5e5e5';\n            rbApr.backgroundColorPressed = '#cccccc';\n\n            //caption\n            rbApr.caption = RESTORE_MARK;\n\n            rbApr.captionColorDefault = '#9b9a9b';\n            rbApr.captionColorFocused = 'black';\n            rbApr.captionColorHovered = 'black';\n            rbApr.captionColorPressed = 'black';\n\n            rbApr.captionShiftYpx = 1;\n            rbApr.captionFontRatio = 0.55;\n\n            var restoreBtnEle = partsBuilder.buildTextButton(rbApr);\n            var eleLeft = -46;\n            var eleTop = -parseInt(fApr.titleBarHeight);\n            var eleAlign = 'RIGHT_TOP';\n\n            restoreBtnEle.style.visibility = 'hidden';\n\n            // 'closeButton' is a special name\n            fApr.addFrameComponent('restoreButton', restoreBtnEle, eleLeft, eleTop, eleAlign);\n\n            //configure close button appearance[end]//////////////\n        }\n\n\n    };\n    //\n\n    return fApr;\n}"
  },
  {
    "path": "public/examples/v100/ex04/index.html",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n    <!--\n      JSFrame Examples\n\n      Copyright 2007-2019 Tom Misawa, riversun.org@gmail.com\n     -->\n    <title>JsFrame.js example - Win style</title>\n    <meta charset=\"utf-8\">\n    <meta name=\"description\" content=\"A javascript popup/floating window library.\">\n\n\n</head>\n\n<!-- hidden means hide scroll bar -->\n<body style=\"overflow: hidden;background: url('https://upload.wikimedia.org/wikipedia/commons/c/c5/Kurumayama_K%C5%8Dgen_Snow_Resort_2.jpg') 50% no-repeat fixed; background-size: cover;\">\n\n<link href=\"ex04.css\" rel=\"stylesheet\" type=\"text/css\"/>\n\n<!-- for Internet explorer [begin] -->\n<script src=\"https://www.promisejs.org/polyfills/promise-6.1.0.min.js\"></script>\n<!-- for Internet explorer [end] -->\n\n<script src=\"../../jsframe.js\"></script>\n<script src=\"ex04_style.js\"></script>\n<script src=\"ex04.js\"></script>\n<div style=\"color:#f5f5f5;text-shadow: 2px 2px 1px #333333;\">Example : Win64 Style</div>\n<div\n        style=\"font-size: 12px; color: white; position: fixed; right: 10px; bottom: 10px\">\n    Photo by Ski Mania License: CC-BY-SA 4.0\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "public/examples/v100/ex05/ex05.css",
    "content": ".ex05title_default {\n    background: white;\n    border-top-left-radius: 0px;\n    border-top-right-radius: 0px;\n}\n\n.ex05title_focused {\n    background: white;\n    border-top-left-radius: 0px;\n    border-top-right-radius: 0px;\n}\n"
  },
  {
    "path": "public/examples/v100/ex05/ex05.js",
    "content": "/**\n * JSFrame Examples\n *\n * Copyright 2007- Tom Misawa, riversun.org@gmail.com\n * Copyright 2007- web2driver.com\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in the\n * Software without restriction, including without limitation the rights to use,\n * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\n * Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\n *  INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\n * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR\n * IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n *\n */\nvar jsFrame = new JSFrame();\n\n\nvar frame01 = jsFrame.createFrame(20, 40, 320, 100, getOriginalStyle_ex05_01(jsFrame.createFrameAppearance()));\nframe01.setTitleBarClassName('ex05title_default','ex05title_focused');\n\nframe01.setTitle(\"\").getFrameView().innerHTML =\n    '<div style=\"overflow:hidden;padding:15px;color:gray;font-size: 10px;top: 40%; margin-top: -1em;\">' +\n    'Welcome to JsFrame.This is an example of JsFrame library.<br/>' +\n    'It consists of a thin title bar and a closing button on the edge.<br/>' +\n    '<a href=\"#\" onclick=\"closeFrame01();return false;\" style=\"color:#0077c9\">Click to close</a></div>';\n\nframe01.show();\n\n//example for iframe\nvar frame02 = jsFrame.createFrame(360, 40, 320, 100, getOriginalStyle_ex05_02(jsFrame.createFrameAppearance().setUseIFrame(true)));\nframe02.setTitle(\"\");\nframe02.setUrl('ex05_inner.html');\nframe02.show();\n\n\nframe01.requestFocus();\n\nfunction closeFrame01() {\n    frame01.closeFrame();\n}\n\nfunction closeFrame02() {\n    frame02.closeFrame();\n}\n"
  },
  {
    "path": "public/examples/v100/ex05/ex05_inner.html",
    "content": "<html>\n<head>\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n</head>\n<body style=\"background-color: rgba(255,255,255,0.9)\">\n<div style=\"color:gray;font-size: 10px; position: absolute;top: 40%; margin-top: -1em;\">\n    Welcome\n    to JsFrame.This is an example of JsFrame library.<br/>It consists of a\n    thin title bar and a closing button on the edge.<br/>\n    <!-- call parent's function -->\n    <a href=\"#\" onclick=\"window.parent.closeFrame02();return false;\" style=\"color:#0077c9\">Click to close</a>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "public/examples/v100/ex05/ex05_style01.js",
    "content": "/**\n * JSFrame Examples\n *\n * Copyright 2007- Tom Misawa, riversun.org@gmail.com\n * Copyright 2007- web2driver.com\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in the\n * Software without restriction, including without limitation the rights to use,\n * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\n * Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\n *  INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\n * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR\n * IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n *\n */\n\nfunction getOriginalStyle_ex05_01(fApr) {\n\n    fApr.showTitleBar = true;\n    fApr.showCloseButton = true;\n\n\n    fApr.titleBarCaptionFontSize = '12px';\n    fApr.titleBarCaptionFontWeight = 'normal';\n    fApr.titleBarCaptionLeftMargin = '10px';\n    fApr.titleBarCaptionColorDefault = '#4d494d';\n    fApr.titleBarCaptionColorFocused = '#4d494d';\n\n    fApr.titleBarHeight = '5px';\n\n    fApr.titleBarColorDefault = 'white';\n    fApr.titleBarColorFocused = 'white';\n\n    fApr.titleBarBorderBottomDefault = null;\n    fApr.titleBarBorderBottomFocused = null;\n\n    fApr.frameBorderRadius = '6px';\n\n    //border width\n    fApr.frameBorderWidthDefault = '1px';\n    fApr.frameBorderWidthFocused = '1px';\n\n\n    //border color\n    fApr.frameBorderColorDefault = '#aaaaaa';\n    fApr.frameBorderColorFocused = '#aaaaaa';\n\n    fApr.frameBorderStyle = 'solid';\n\n    //window shadow\n    fApr.frameBoxShadow = '2px 2px 5px  rgba(0, 0, 0, 0.5)';\n\n    fApr.frameBackgroundColor = 'white';\n\n\n    fApr.frameComponents = new Array();\n\n    //adjustment value\n    fApr.frameHeightAdjust = 2;//default is 1\n\n    fApr.onInitialize = function () {\n\n\n        var partsBuilder = fApr.getPartsBuilder();\n\n\n        //configure close button appearance[begin]//////////////\n\n        const crossMark0 = '\\u274c';\n        const crossMark1 = '\\u2716';\n        const crossMark2 = '\\u274e';\n        const CROSS_MARK = crossMark1;\n\n\n        var cbApr = partsBuilder.buildTextButtonAppearance();\n\n        cbApr.width = 20;\n        cbApr.height = 20;\n\n\n        cbApr.borderRadius = 10;\n        cbApr.borderWidth = 1;\n\n        cbApr.borderColorDefault = '#cccccc';\n        cbApr.borderColorFocused = '#cccccc';\n        cbApr.borderColorHovered = '#dddddd';\n        cbApr.borderColorPressed = '#eeeeee';\n\n        cbApr.borderStyleDefault = 'solid';\n        cbApr.borderStyleFocused = cbApr.borderStyleDefault;\n        cbApr.borderStyleHovered = cbApr.borderStyleDefault;\n        cbApr.borderStylePressed = cbApr.borderStyleDefault;\n\n        //background\n        cbApr.backgroundColorDefault = 'white';\n        cbApr.backgroundColorFocused = 'white';\n        cbApr.backgroundColorHovered = '#eeeeee';\n        cbApr.backgroundColorPressed = '#dddddd';\n\n        cbApr.backgroundBoxShadow = '2px 2px 5px  rgba(0, 0, 0, 0.5)';\n\n        //caption\n        cbApr.caption = CROSS_MARK;\n\n        cbApr.captionColorDefault = '#black';\n        cbApr.captionColorFocused = 'black';\n        cbApr.captionColorHovered = 'white';\n        cbApr.captionColorPressed = 'white';\n\n        cbApr.captionShiftYpx = 1;\n        cbApr.captionFontRatio = 0.6;\n\n        var closeBtnEle = partsBuilder.buildTextButton(cbApr);\n        var eleLeft = 4;\n        var eleTop = -10 - parseInt(fApr.titleBarHeight);\n        var eleAlign = 'RIGHT_TOP';\n\n        // 'closeButton' is a special name\n        fApr.addFrameComponent('closeButton', closeBtnEle, eleLeft, eleTop, eleAlign);\n\n        //configure close button appearance[end]//////////////\n\n\n    };\n    //\n\n    return fApr;\n}"
  },
  {
    "path": "public/examples/v100/ex05/ex05_style02.js",
    "content": "/**\n * JSFrame Examples\n *\n * Copyright 2007- Tom Misawa, riversun.org@gmail.com\n * Copyright 2007- web2driver.com\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in the\n * Software without restriction, including without limitation the rights to use,\n * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\n * Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\n *  INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\n * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR\n * IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n *\n */\nfunction getOriginalStyle_ex05_02(fApr) {\n\n    fApr.showTitleBar = false;\n    fApr.showCloseButton = false;\n\n\n    fApr.titleBarCaptionFontSize = '12px';\n    fApr.titleBarCaptionFontWeight = 'normal';\n    fApr.titleBarCaptionLeftMargin = '10px';\n    fApr.titleBarCaptionColorDefault = '#4d494d';\n    fApr.titleBarCaptionColorFocused = '#4d494d';\n\n    fApr.titleBarHeight = '5px';\n\n    fApr.titleBarColorDefault = 'white';\n    fApr.titleBarColorFocused = 'white';\n\n    fApr.titleBarBorderBottomDefault = null;\n    fApr.titleBarBorderBottomFocused = null;\n\n    fApr.frameBorderRadius = '6px';\n\n    //border width\n    fApr.frameBorderWidthDefault = '1px';\n    fApr.frameBorderWidthFocused = '1px';\n\n\n    //border color\n    fApr.frameBorderColorDefault = '#aaaaaa';\n    fApr.frameBorderColorFocused = '#aaaaaa';\n\n    fApr.frameBorderStyle = 'solid';\n\n    //window shadow\n    fApr.frameBoxShadow = '2px 2px 5px  rgba(0, 0, 0, 0.5)';\n\n    fApr.frameBackgroundColor = 'white';\n\n\n    fApr.frameComponents = new Array();\n\n\n    return fApr;\n}"
  },
  {
    "path": "public/examples/v100/ex05/index.html",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n    <!--\n      JSFrame Examples\n\n      Copyright 2007-2019 Tom Misawa, riversun.org@gmail.com\n     -->\n    <title>JsFrame.js example - various window styles</title>\n    <meta charset=\"utf-8\">\n    <meta name=\"description\" content=\"A javascript popup/floating window library.\">\n\n\n</head>\n\n<body>\n<link href=\"ex05.css\" rel=\"stylesheet\" type=\"text/css\"/>\n\n<!-- for Internet explorer [begin] -->\n<script src=\"https://www.promisejs.org/polyfills/promise-6.1.0.min.js\"></script>\n<!-- for Internet explorer [end] -->\n\n<script src=\"../../jsframe.js\"></script>\n<script src=\"ex05_style01.js\"></script>\n<script src=\"ex05_style02.js\"></script>\n<script src=\"ex05.js\"></script>\n<div style=\"color:#333333;\">Example : Various Styles</div>\n</body>\n</html>\n"
  },
  {
    "path": "public/examples/v100/ex06/ex06.js",
    "content": "var jsFrame = new JSFrame();\n\nfunction createFrame01() {\n    var frame = jsFrame.createFrame(0, 0, 0, 0, getOriginalStyle_ex06_01(jsFrame.createFrameAppearance()));\n    return frame;\n}\n\nvar frmWidth = 200;\nvar frmHeight = 100;\nvar marginWidth = 20;\nvar marginHeight = 20;\nvar offsetX = 20;\nvar offsetY = 50;\n\n\n//Frame resizing animation\n\n//placed (0,0)\nvar frame = createFrame01();\nvar animator = jsFrame.createAnimator();\n\nanimator.set(frame)\n    .setDuration(300)//set animation duration by millis.Default is 200millis.\n    .fromPosition(frmWidth / 2 + (0 * (frmWidth + marginWidth)) + offsetX, frmHeight / 2 + (0 * (frmHeight + marginHeight) + offsetY), 'CENTER_CENTER')//set starting position.\n    .fromWidth(0)//set starting width.If omitted, the original frame width is adopted.\n    .fromHeight(0)//set starting height.If omitted, the original frame height is adopted.\n    .toWidth(frmWidth)//set ending width.\n    .toHeight(frmHeight)//set ending height.\n    .start()//start animation.If target frame is not shown,show frame.\n    .then(function (animatorObj) {\n\n        var _frame = animatorObj.get();//get frame set to animator\n\n        _frame.getFrameView().innerHTML = \"<b>Animation:<br>Expanding from the (center,center)</b>\"\n    });\n\n\n//placed (1,0)\njsFrame.createAnimator().set(createFrame01())\n    .fromPosition(0 + (1 * (frmWidth + marginWidth)) + offsetX, 0 + (0 * (frmHeight + marginHeight) + offsetY), 'LEFT_TOP')\n    .fromWidth(0)//set starting width.If omitted, the original frame width is adopted.\n    .fromHeight(0)//set starting height.If omitted, the original frame height is adopted.\n    .toWidth(frmWidth)\n    .toHeight(frmHeight)\n    .start(1 * 350) //start after 350millis later\n    .then(function (animatorObj) {\n        animatorObj.get().getFrameView().innerHTML = \"<b>Animation:<br>Expanding from the (left,top) of the frame.</b>\"\n    });\n\n//placed (2,0)\njsFrame.createAnimator().set(createFrame01())\n    .fromPosition(frmWidth / 2 + (2 * (frmWidth + marginWidth)) + offsetX, frmHeight + (0 * (frmHeight + marginHeight) + offsetY), 'CENTER_BOTTOM')\n    .fromWidth(frmWidth)\n    .fromHeight(0)\n    .toWidth(frmWidth)\n    .toHeight(frmHeight)\n    .start(2 * 350)   //start after waiting\n    .then(function (animatorObj) {\n        animatorObj.get().getFrameView().innerHTML = \"<b>Animation:<br>Expanding from the (center,bottom) of the frame.</b>\"\n    });\n\n//placed (3,0)\njsFrame.createAnimator().set(createFrame01())\n    .fromPosition(frmWidth + (3 * (frmWidth + marginWidth)) + offsetX, frmHeight / 2 + (0 * (frmHeight + marginHeight) + offsetY), 'RIGHT_CENTER')\n    .fromWidth(0)\n    .fromHeight(frmHeight)\n    .toWidth(frmWidth)\n    .toHeight(frmHeight)\n    .start(3 * 350) //start after waiting\n    .then(function (animatorObj) {\n        animatorObj.get().getFrameView().innerHTML = \"<b>Animation:<br>Expanding from the (right,center) of the frame.</b>\"\n    });\n\n//placed (0,1)\njsFrame.createAnimator().set(createFrame01())\n    .fromPosition(frmWidth / 2 + (0 * (frmWidth + marginWidth)) + offsetX, frmHeight / 2 + (1 * (frmHeight + marginHeight) + offsetY), 'CENTER_CENTER')\n    .fromWidth(0)\n    .fromHeight(0)\n    .toWidth(frmWidth)\n    .toHeight(0)\n    .start(4 * 350)  //start after waiting\n    .then(function (animatorObj) {\n        return animatorObj.toHeight(frmHeight).start();\n    })\n    .then(function (animatorObj) {\n        animatorObj.get().getFrameView().innerHTML = \"<b>2-step Animation:<br>Expanding from the (center,center) of the frame.</b>\"\n    });\n\n//placed (1,1)\njsFrame.createAnimator().set(createFrame01())\n    .fromPosition(frmWidth / 2 + (1 * (frmWidth + marginWidth)) + offsetX, 0 + (1 * (frmHeight + marginHeight) + offsetY), 'CENTER_TOP')\n    .toWidth(frmWidth)\n    .toHeight(0)\n    .start(4 * 350 + 1 * 500) //start after waiting\n    .then(function (animatorObj) {\n        return animatorObj.toHeight(frmHeight).start();\n    })\n    .then(function (animatorObj) {\n        animatorObj.get().getFrameView().innerHTML = \"<b>2-step animation:<br>Expanding from the (center,top) of the frame.</b>\"\n    });\n\n//placed(2, 1)\njsFrame.createAnimator().set(createFrame01())\n    .fromPosition(0 + (2 * (frmWidth + marginWidth)) + offsetX, frmHeight + (1 * (frmHeight + marginHeight) + offsetY), 'LEFT_BOTTOM')\n    .toWidth(0)\n    .toHeight(frmHeight)\n    .start(4 * 350 + 2 * 500) //start after waiting\n    .then(function (animatorObj) {\n        return animatorObj.toWidth(frmWidth).start();\n    })\n    .then(function (animatorObj) {\n        animatorObj.get().getFrameView().innerHTML = \"<b>2-step animation:<br>Expanding from the (left,bottom) of the frame.</b>\"\n    });\n\n//placed(3, 1)\njsFrame.createAnimator().set(createFrame01())\n    .fromPosition(frmWidth / 2 + (3 * (frmWidth + marginWidth)) + offsetX, frmHeight + (1 * (frmHeight + marginHeight) + offsetY), 'CENTER_BOTTOM')\n    .toWidth(0)\n    .toHeight(frmHeight)\n    .start(4 * 350 + 3 * 500) //start after waiting\n    .then(function (animatorObj) {\n        return animatorObj.toWidth(frmWidth).start();\n    })\n    .then(function (animatorObj) {\n        animatorObj.get().getFrameView().innerHTML = \"<b>2-step animation:<br>Expanding from the (center,bottom) of the frame.</b>\"\n    });\n\n\n//To be placed (3,2)\njsFrame.createAnimator().set(createFrame01())\n    .fromPosition(frmWidth / 2 + (0 * (frmWidth + marginWidth)) + offsetX, frmHeight / 2 + (2 * (frmHeight + marginHeight) + offsetY), 'CENTER_CENTER')\n    .fromWidth(0)\n    .fromHeight(0)\n    .toWidth(frmWidth)\n    .toHeight(0)\n    .start(4 * 350 + 4 * 500)  //start after waiting\n    .then(function (animatorObj) {\n        return animatorObj.toHeight(frmHeight).start();\n    })\n    .then(function (animatorObj) {\n        animatorObj.get().getFrameView().innerHTML = \"<b>Move after resizing:<br>Expanding from the (center,center) of the frame.</b>\";\n        return animatorObj\n            .setDuration(500)\n            .toX(frmWidth / 2 + (3 * (frmWidth + marginWidth)) + offsetX).start();\n    });\n\n\n//To be placed (2,2)\njsFrame.createAnimator().set(createFrame01())\n    .fromPosition(frmWidth / 2 + (0 * (frmWidth + marginWidth)) + offsetX, frmHeight / 2 + (2 * (frmHeight + marginHeight) + offsetY), 'CENTER_CENTER')\n    .fromWidth(0)\n    .fromHeight(0)\n    .toWidth(frmWidth)\n    .toHeight(0)\n    .start(4 * 350 + 4 * 500 + 1 * 1000)  //start after waiting\n    .then(function (animatorObj) {\n        return animatorObj.toHeight(frmHeight).start();\n    })\n    .then(function (animatorObj) {\n        animatorObj.get().getFrameView().innerHTML = \"<b>Move after resizing:<br>Expanding from the (center,center) of the frame.</b>\";\n        return animatorObj\n            .setDuration(400)\n            .toX(frmWidth / 2 + (2 * (frmWidth + marginWidth)) + offsetX).start();\n    });\n\n//To be placed (1,2)\njsFrame.createAnimator().set(createFrame01())\n    .fromPosition(frmWidth / 2 + (0 * (frmWidth + marginWidth)) + offsetX, frmHeight / 2 + (2 * (frmHeight + marginHeight) + offsetY), 'CENTER_CENTER')\n    .fromWidth(0)\n    .fromHeight(0)\n    .toWidth(frmWidth)\n    .toHeight(0)\n    .start(4 * 350 + 4 * 500 + 2 * 1000)  //start after waiting\n    .then(function (animatorObj) {\n        return animatorObj.toHeight(frmHeight).start();\n    })\n    .then(function (animatorObj) {\n        animatorObj.get().getFrameView().innerHTML = \"<b>Move after resizing:<br>Expanding from the (center,center) of the frame.</b>\";\n        return animatorObj\n            .setDuration(300)\n            .toX(frmWidth / 2 + (1 * (frmWidth + marginWidth)) + offsetX).start();\n    });\n\n//placed (0,2)\njsFrame.createAnimator().set(createFrame01())\n    .fromPosition(frmWidth / 2 + (0 * (frmWidth + marginWidth)) + offsetX, frmHeight / 2 + (2 * (frmHeight + marginHeight) + offsetY), 'CENTER_CENTER')\n    .fromWidth(0)\n    .fromHeight(0)\n    .toWidth(frmWidth)\n    .toHeight(0)\n    .start(4 * 350 + 4 * 500 + 3 * 1000)  //start after waiting\n    .then(function (animatorObj) {\n        return animatorObj.toHeight(frmHeight).start();\n    })\n    .then(function (animatorObj) {\n        animatorObj.get().getFrameView().innerHTML = \"<b>Final:<br>Expanding from the (center,center) of the frame.</b>\"\n    });"
  },
  {
    "path": "public/examples/v100/ex06/ex06_style.js",
    "content": "function getOriginalStyle_ex06_01(fApr) {\n\n    fApr.showTitleBar = false;\n    fApr.showCloseButton = false;\n\n\n    fApr.titleBarCaptionFontSize = '12px';\n    fApr.titleBarCaptionFontWeight = 'normal';\n    fApr.titleBarCaptionLeftMargin = '10px';\n    fApr.titleBarCaptionColorDefault = '#4d494d';\n    fApr.titleBarCaptionColorFocused = '#4d494d';\n\n    fApr.titleBarHeight = '5px';\n\n    fApr.titleBarColorDefault = 'white';\n    fApr.titleBarColorFocused = 'white';\n\n    fApr.titleBarBorderBottomDefault = null;\n    fApr.titleBarBorderBottomFocused = null;\n\n    fApr.frameBorderRadius = '6px';\n\n    //border width\n    fApr.frameBorderWidthDefault = '1px';\n    fApr.frameBorderWidthFocused = '1px';\n\n\n    //border color\n    fApr.frameBorderColorDefault = '#aaaaaa';\n    fApr.frameBorderColorFocused = '#aaaaaa';\n\n    fApr.frameBorderStyle = 'solid';\n\n    //window shadow\n    fApr.frameBoxShadow = '2px 2px 5px  rgba(0, 0, 0, 0.5)';\n\n    fApr.frameBackgroundColor = 'white';\n\n\n    fApr.frameComponents = new Array();\n\n    //adjustment value\n    fApr.frameHeightAdjust =0;//10;// 2;//default is 1\n\n\n\n    return fApr;\n}"
  },
  {
    "path": "public/examples/v100/ex06/index.html",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n    <!--\n      JSFrame Examples\n\n      Copyright 2007-2019 Tom Misawa, riversun.org@gmail.com\n     -->\n    <title>JsFrame.js example - animations</title>\n    <meta charset=\"utf-8\">\n    <meta name=\"description\" content=\"A javascript popup/floating window library.\">\n</head>\n\n<body style=\"overflow: hidden\">\n\n<script src=\"../../../jsframe.js\"></script>\n\n<script src=\"ex06_style.js\"></script>\n<script src=\"ex06.js\"></script>\n<div style=\"color:#333333;\">Example : Animations #1</div>\n</body>\n</html>\n"
  },
  {
    "path": "public/examples/v150/chatbot_ui.html",
    "content": "<!DOCTYPE html>\n<!--\n    Example of chatbot UI\n-->\n<html>\n<head>\n    <title>JsFrame.js ChatBot UI Example</title>\n    <meta charset=\"utf-8\">\n    <meta name=\"description\" content=\"JSFrame  chatbot UI example\">\n    <link rel=\"stylesheet\" href=\"https://use.fontawesome.com/releases/v5.6.3/css/all.css\"\n          integrity=\"sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/\" crossorigin=\"anonymous\">\n    <style type=\"text/css\">\n        body {\n            font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Noto Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\";\n        }\n\n        .btn-chat {\n            box-shadow: 2px 3px 16px rgba(0, 0, 0, .6);\n            border-radius: 50%;\n            text-align: center;\n            vertical-align: middle;\n            position: fixed;\n            color: #fff;\n            background-color: #007bff;\n            border-color: #007bff;\n            transition: transform 0.2s linear, opacity 0.5s;\n            transform: scale(0.9);\n            opacity: 0;\n        }\n\n        .btn-on {\n            opacity: 1;\n        }\n\n        .btn-chat:hover {\n            color: #fff;\n            background-color: #0069d9;\n            border-color: #0062cc;\n            transform: scale(1.0);\n\n        }\n\n    </style>\n</head>\n<body style=\"overflow: hidden;background: url('https://upload.wikimedia.org/wikipedia/commons/thumb/c/cb/Tokyo_Tower_Afterglow_3.JPG/1280px-Tokyo_Tower_Afterglow_3.JPG') 50% no-repeat fixed; background-size: cover;\">\n\n\n<div style=\"color:#f5f5f5;text-shadow: 2px 2px 1px #333333;\"><a\n        href=\"https://github.com/riversun/JSFrame.js\">JSFrame.js</a> ChatBot UI Frame\n</div>\n\n<script src=\"../../jsframe.js\"></script>\n<script>\n\n    class ChatUI {\n\n        constructor() {\n\n            this.jsFrame = new JSFrame({\n                horizontalAlign: 'right',\n                verticalAlign: 'bottom',\n            });\n\n            this.initParam = {\n                btnRight: 20,\n                btnBottom: 20,\n                btnSize: 60,\n                btnFontSize: 25,\n                frmWidth: 300,\n                frmHeight: 500,\n                frmHeightMin: 300,\n                frmWidthMin: 200,\n                frmTitleHeight: 40,\n            };\n\n            this.frameName = 'chat_window';\n            this.buttonId = 'chat_wakeup';\n\n        }\n\n        /**\n         * Build chat start button\n         */\n        buildChatButton() {\n\n            const p = this.initParam;\n            const btnRight = p.btnRight;\n            const btnBottom = p.btnBottom;\n            const btnSize = p.btnSize;\n            const btnFontSize = p.btnFontSize;\n\n            const showChatBtn = document.createElement('div')\n            showChatBtn.id = this.buttonId;\n            showChatBtn.className = 'btn-chat';\n            showChatBtn.innerHTML = '<i class=\"fas fa-comment-alt\"></i>';\n            showChatBtn.onclick = this.showChatWindow.bind(this);\n\n            const style = showChatBtn.style;\n            style.right = btnRight + 'px';\n            style.bottom = btnBottom + 'px';\n            style.width = btnSize + 'px';\n            style.height = style.width;\n            style.lineHeight = style.width;\n            style.fontSize = btnFontSize + 'px';\n\n            document.body.appendChild(showChatBtn);\n        }\n\n        /**\n         * Makes the chat button visible or invisible.\n         * @param isVisible\n         */\n        setChatButtonVisible(isVisible) {\n            const chatButton = document.querySelector(`#${this.buttonId}`);\n            if (isVisible) {\n                //chatButton.style.display = 'inline';\n                chatButton.classList.add('btn-on');\n            } else {\n                //chatButton.style.display = 'none';\n                chatButton.classList.remove('btn-on');\n\n            }\n        }\n\n        /*\n        *  Create chat window\n        */\n        buildChatWindow() {\n\n            const p = this.initParam;\n            const frmWidth = p.frmWidth;\n            const frmHeight = p.frmHeight;\n            const frmHeightMin = p.frmHeightMin;\n            const frmWidthMin = p.frmWidthMin;\n            const frmTitleHeight = p.frmTitleHeight;\n            const frmLeft = -(p.btnRight + frmWidth);\n            const frmTop = -(p.btnBottom + p.btnSize + frmHeight);\n\n            /**\n             * Coordinate(left,top) where the window is minimzied\n             * @type {{x: number, y: number}}\n             */\n            const vanishingPoint = {\n                x: frmLeft + frmWidth,\n                y: frmTop + frmHeight - frmTitleHeight\n            };\n\n            //Create chat window\n            this.frame = this.jsFrame.create({\n                name: this.frameName,\n                title: `JSFrame Chat`,\n                left: frmLeft,\n                top: frmTop,\n                width: frmWidth,\n                height: frmHeight,\n                minWidth: frmWidthMin,\n                minHeight: frmHeightMin,\n                appearanceName: 'material',\n                appearanceParam: {\n                    border: {\n                        shadow: '2px 2px 10px  rgba(0, 0, 0, 0.5)',\n                        width: 0,\n                        radius: 6,\n                    },\n                    titleBar: {\n                        color: 'white',\n                        background: '#4784d4',\n                        leftMargin: 40,\n                        height: frmTitleHeight,\n                        fontSize: 14,\n                        buttonWidth: 36,\n                        buttonHeight: 16,\n                        buttonColor: 'white',\n                        buttons: [\n                            {\n                                fa: 'fas fa-times',\n                                name: 'hideButton',\n                                visible: true\n                            },\n                        ],\n                        buttonsOnLeft: [\n                            {\n                                fa: 'fas fa-comment-alt',\n                                name: 'icon',\n                                visible: true\n                            },\n                        ],\n                    },\n                },\n                style: {\n                    backgroundColor: 'rgba(255,255,255,0.8)',\n                    overflow: 'auto'\n                },\n                html: 'Chat UI Here',\n                //url: // Chat URL here\n            });\n\n            //Enable helper to act on window's common operations(maximization/minimization and something)\n            this.frame.setControl({\n                animation: true,\n                animationDuration: 200,\n            });\n\n            //Set click event when the close button is clicked\n            this.frame.on('hideButton', 'click', (_frame, evt) => {\n                _frame.control.doHide({\n                    offset: vanishingPoint,\n                    align: 'ABSOLUTE',\n                    callback: (frame, info) => {\n                        this.setChatButtonVisible(true);\n                    }\n                })\n            });\n\n            //Minimize the window first to memory the  initial window position and size.\n            this.frame.control.doHide({\n                silent: true,//means invisible action\n                duration: 0,\n                align: 'ABSOLUTE',//need to set the offset point where window is minimized\n                offset: vanishingPoint,\n            });\n\n        }\n\n        showChatWindow() {\n            const frame = this.jsFrame.getWindowByName(this.frameName);\n\n            //Open minimized window\n            frame.control.doDehide({\n                callback: (frame, info) => {\n                    this.setChatButtonVisible(false);\n                }\n            });\n        }\n\n        build() {\n            this.buildChatButton();\n            this.buildChatWindow();\n            this.setChatButtonVisible(true);\n        }\n\n\n    }\n\n    new ChatUI().build();\n\n\n</script>\n\n</body>\n</html>"
  },
  {
    "path": "public/examples/v150/event_handling.html",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n    <title>JsFrame.js event handling</title>\n    <meta charset=\"utf-8\">\n    <link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css\">\n</head>\n<body style=\"background: url('http://upload.wikimedia.org/wikipedia/commons/d/d6/Half_Dome_from_Glacier_Point%2C_Yosemite_NP_-_Diliff.jpg') 50% no-repeat fixed; background-size: cover;\">\n<script src=\"../../jsframe.js\"></script>\n\n<script>\n    function start() {\n\n        const jsFrame = new JSFrame();\n        const frames = [];\n\n        const innerHTML = '<div class=\"container\">' +\n            '<div class=\"py-5 text-center\">\\n' +\n            '<h2>My contents</h2>\\n' +\n            '<p class=\"lead\">Your contents here</p>\\n' +\n            '<div class=\"col-12 text-center\">\\n' +\n            '<button id=\"my_button_01\" type=\"button\" class=\"btn btn-primary\">Button 1</button>\\n' +\n            '<button id=\"my_button_02\" type=\"button\" class=\"btn btn-secondary\">Button 2</button>\\n' +\n            '<button id=\"my_button_03\" type=\"button\" class=\"btn btn-success\">Button 3</button>\\n' +\n            '</div></div></div>'\n\n\n        for (let i = 0; i < 2; i++) {\n\n            const frame = jsFrame.create({\n                name: `MyWindow${i}`,\n                title: `Window${i}`,\n                left: 20 + 420 * i, top: 40, width: 400, height: 260,\n                minWidth: 160, minHeight: 100,\n                appearanceName: 'yosemite',\n                style: {\n                    backgroundColor: 'rgba(255,255,255,0.9)',\n                    overflow: 'auto'\n                },\n                html: innerHTML\n            });\n            //set event listener\n            frame.on('minimizeButton', 'click', (_frame, evt) => {\n                const size = _frame.getSize();\n                _frame.setSize(size.width - 20, size.height - 20);\n            });\n\n            frame.on('zoomButton', 'click', (_frame, evt) => {\n                const size = _frame.getSize();\n                _frame.setSize(size.width + 20, size.height + 20);\n            });\n            frame.on('closeButton', 'click', (_frame, evt) => {\n                _frame.closeFrame();\n            });\n\n            const htmlButtonListener = (_frame, evt) => {\n                const jsFrame = new JSFrame();\n                jsFrame.showToast({\n                    html: `Clicked ${_frame.getName()}'s ${evt.target.id}`,\n                    align: 'top'\n                });\n            };\n\n            //You can get DOM element in the HTML by selector format\n            frame.on('#my_button_01', 'click', htmlButtonListener);\n            frame.on('#my_button_02', 'click', htmlButtonListener);\n            frame.on('#my_button_03', 'click', htmlButtonListener);\n            frame.show();\n            frames.push(frame);\n        }\n        frames[0].requestFocus();\n    }\n\n    start();\n</script>\n\n</body>\n</html>"
  },
  {
    "path": "public/examples/v150/iframe.html",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n    <title>JsFrame.js example - Use IFrame</title>\n    <meta charset=\"utf-8\">\n    <meta name=\"description\" content=\"A javascript popup/floating window library.\">\n</head>\n<body>\n<script src=\"../../jsframe.js\"></script>\n<script>\n    const jsFrame = new JSFrame();\n\n    function start() {\n\n        const frame01 = jsFrame.create({\n            title: 'Window1',\n            name: 'window01',\n            left: 20, top: 20, width: 320, height: 160,\n            url: 'iframe_content01.html',//URL to display in iframe\n            //urlLoaded:Callback function called after loading iframe\n            urlLoaded: (frame) => {\n                frame.on('#my_button_01', 'click', (_frame, evt) => {\n                    showToast(`Clicked ${_frame.getName()}'s ${evt.target.id}`);\n                });\n                frame.on('#my_button_02', 'click', (_frame, evt) => {\n                    _frame.closeFrame();\n                });\n            }\n        });\n        frame01.show();\n\n        const frame02 = jsFrame.create({\n            title: 'Window2',\n            name: 'window02',\n            left: 360, top: 20, width: 320, height: 160,\n        });\n        //You can also call #setUrl to show page specified by 'url' in iframe.\n        //#setUrl returns Promise.Promise will be resolved(you'll get callback) after loading iframe.\n        frame02.setUrl('iframe_content02.html').then((frame, evt) => {\n            frame.on('#my_button_04', 'click', (_frame, evt) => {\n                showToast(`Clicked ${_frame.getName()}'s ${evt.target.id}`);\n            });\n            frame.show();\n        });\n\n        const frame03 = jsFrame.create({\n            title: 'Window2',\n            name: 'window02',\n            left: 20, top: 200, width: 320, height: 160,\n            //When this option is enabled,\n            // transparent screens are displayed to realize smooth scrolling,\n            // so if there are buttons or the like, it may stop responding unless you click twice\n            smoothResizeOnIframe:true,\n        });\n        //You can also call #setUrl to show page specified by 'url' in iframe.\n        //#setUrl returns Promise.Promise will be resolved(you'll get callback) after loading iframe.\n        frame03.setUrl('iframe_content03.html').then((frame, evt) => {\n            frame.show();\n        });\n    }\n\n    function showToast(str) {\n        jsFrame.showToast({\n            html: str, align: 'top'\n        });\n    }\n\n    start();\n</script>\n\n</body>\n</html>\n"
  },
  {
    "path": "public/examples/v150/iframe_content01.html",
    "content": "<html>\n<head>\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n    <link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css\">\n</head>\n<body style=\"background:white\">\n\n<div class=\"col-12 text-center\">\n    <br>\n    <h5>This is iframe content01</h5>\n    <button id=\"my_button_01\" type=\"button\" class=\"btn btn-primary\">Button 1</button>\n    <button id=\"my_button_02\" type=\"button\" class=\"btn btn-secondary\">Button 2</button>\n    <button id=\"my_button_03\" type=\"button\" class=\"btn btn-success\">Button 3</button>\n</div>\n\n</body>\n</html>\n"
  },
  {
    "path": "public/examples/v150/iframe_content02.html",
    "content": "<html>\n<head>\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n    <link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css\">\n</head>\n<body style=\"background:white\">\n\n<div class=\"col-12 text-center\">\n    <br>\n    <h5>This is iframe content02</h5>\n    <button id=\"my_button_04\" type=\"button\" class=\"btn btn-danger\">Button 4</button>\n</div>\n\n</body>\n</html>\n"
  },
  {
    "path": "public/examples/v150/iframe_content03.html",
    "content": "<html>\n<head>\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n    \n</head>\n<body style=\"color:#555555;background:rgba(255,255,255,0.9)\">\n\n<h5>Click maximize button or minimize button</h5>\n<pre>\nACT I\nSCENE I. Elsinore. A platform before the castle.\nFRANCISCO at his post. Enter to him BERNARDO\nBERNARDO\nWho's there?\nFRANCISCO\nNay, answer me: stand, and unfold yourself.\nBERNARDO\nLong live the king!\nFRANCISCO\nBernardo?\nBERNARDO\nHe.\nFRANCISCO\nYou come most carefully upon your hour.\nBERNARDO\n'Tis now struck twelve; get thee to bed, Francisco.\nFRANCISCO\nFor this relief much thanks: 'tis bitter cold,\nAnd I am sick at heart.\nBERNARDO\nHave you had quiet guard?\nFRANCISCO\nNot a mouse stirring.\nBERNARDO\nWell, good night.\nIf you do meet Horatio and Marcellus,\nThe rivals of my watch, bid them make haste.\nFRANCISCO\nI think I hear them. Stand, ho! Who's there?\nEnter HORATIO and MARCELLUS\n\nHORATIO\nFriends to this ground.\nMARCELLUS\nAnd liegemen to the Dane.\nFRANCISCO\nGive you good night.\nMARCELLUS\nO, farewell, honest soldier:\nWho hath relieved you?\nFRANCISCO\nBernardo has my place.\nGive you good night.\nExit\n\nMARCELLUS\nHolla! Bernardo!\nBERNARDO\nSay,\nWhat, is Horatio there?\nHORATIO\nA piece of him.\nBERNARDO\nWelcome, Horatio: welcome, good Marcellus.\nMARCELLUS\nWhat, has this thing appear'd again to-night?\nBERNARDO\nI have seen nothing.\nMARCELLUS\nHoratio says 'tis but our fantasy,\nAnd will not let belief take hold of him\nTouching this dreaded sight, twice seen of us:\nTherefore I have entreated him along\nWith us to watch the minutes of this night;\nThat if again this apparition come,\nHe may approve our eyes and speak to it.\nHORATIO\nTush, tush, 'twill not appear.\nBERNARDO\nSit down awhile;\nAnd let us once again assail your ears,\nThat are so fortified against our story\nWhat we have two nights seen.\nHORATIO\nWell, sit we down,\nAnd let us hear Bernardo speak of this.\nBERNARDO\nLast night of all,\nWhen yond same star that's westward from the pole\nHad made his course to illume that part of heaven\nWhere now it burns, Marcellus and myself,\nThe bell then beating one,--\nEnter Ghost\n\nMARCELLUS\nPeace, break thee off; look, where it comes again!\nBERNARDO\nIn the same figure, like the king that's dead.\nMARCELLUS\nThou art a scholar; speak to it, Horatio.\nBERNARDO\nLooks it not like the king? mark it, Horatio.\nHORATIO\nMost like: it harrows me with fear and wonder.\nBERNARDO\nIt would be spoke to.\nMARCELLUS\nQuestion it, Horatio.\nHORATIO\nWhat art thou that usurp'st this time of night,\nTogether with that fair and warlike form\nIn which the majesty of buried Denmark\nDid sometimes march? by heaven I charge thee, speak!\nMARCELLUS\nIt is offended.\nBERNARDO\nSee, it stalks away!\nHORATIO\nStay! speak, speak! I charge thee, speak!\nExit Ghost\n\nMARCELLUS\n'Tis gone, and will not answer.\nBERNARDO\nHow now, Horatio! you tremble and look pale:\nIs not this something more than fantasy?\nWhat think you on't?\nHORATIO\nBefore my God, I might not this believe\nWithout the sensible and true avouch\nOf mine own eyes.\nMARCELLUS\nIs it not like the king?\nHORATIO\nAs thou art to thyself:\nSuch was the very armour he had on\nWhen he the ambitious Norway combated;\nSo frown'd he once, when, in an angry parle,\nHe smote the sledded Polacks on the ice.\n'Tis strange.\nMARCELLUS\nThus twice before, and jump at this dead hour,\nWith martial stalk hath he gone by our watch.\nHORATIO\nIn what particular thought to work I know not;\nBut in the gross and scope of my opinion,\nThis bodes some strange eruption to our state.\nMARCELLUS\nGood now, sit down, and tell me, he that knows,\nWhy this same strict and most observant watch\nSo nightly toils the subject of the land,\nAnd why such daily cast of brazen cannon,\nAnd foreign mart for implements of war;\nWhy such impress of shipwrights, whose sore task\nDoes not divide the Sunday from the week;\nWhat might be toward, that this sweaty haste\nDoth make the night joint-labourer with the day:\nWho is't that can inform me?\nHORATIO\nThat can I;\nAt least, the whisper goes so. Our last king,\nWhose image even but now appear'd to us,\nWas, as you know, by Fortinbras of Norway,\nThereto prick'd on by a most emulate pride,\nDared to the combat; in which our valiant Hamlet--\nFor so this side of our known world esteem'd him--\nDid slay this Fortinbras; who by a seal'd compact,\nWell ratified by law and heraldry,\nDid forfeit, with his life, all those his lands\nWhich he stood seized of, to the conqueror:\nAgainst the which, a moiety competent\nWas gaged by our king; which had return'd\nTo the inheritance of Fortinbras,\nHad he been vanquisher; as, by the same covenant,\nAnd carriage of the article design'd,\nHis fell to Hamlet. Now, sir, young Fortinbras,\nOf unimproved mettle hot and full,\nHath in the skirts of Norway here and there\nShark'd up a list of lawless resolutes,\nFor food and diet, to some enterprise\nThat hath a stomach in't; which is no other--\nAs it doth well appear unto our state--\nBut to recover of us, by strong hand\nAnd terms compulsatory, those foresaid lands\nSo by his father lost: and this, I take it,\nIs the main motive of our preparations,\nThe source of this our watch and the chief head\nOf this post-haste and romage in the land.\nBERNARDO\nI think it be no other but e'en so:\nWell may it sort that this portentous figure\nComes armed through our watch; so like the king\nThat was and is the question of these wars.\nHORATIO\nA mote it is to trouble the mind's eye.\nIn the most high and palmy state of Rome,\nA little ere the mightiest Julius fell,\nThe graves stood tenantless and the sheeted dead\nDid squeak and gibber in the Roman streets:\nAs stars with trains of fire and dews of blood,\nDisasters in the sun; and the moist star\nUpon whose influence Neptune's empire stands\nWas sick almost to doomsday with eclipse:\nAnd even the like precurse of fierce events,\nAs harbingers preceding still the fates\nAnd prologue to the omen coming on,\nHave heaven and earth together demonstrated\nUnto our climatures and countrymen.--\nBut soft, behold! lo, where it comes again!\nRe-enter Ghost\n\nI'll cross it, though it blast me. Stay, illusion!\nIf thou hast any sound, or use of voice,\nSpeak to me:\nIf there be any good thing to be done,\nThat may to thee do ease and grace to me,\nSpeak to me:\nCock crows\n\nIf thou art privy to thy country's fate,\nWhich, happily, foreknowing may avoid, O, speak!\nOr if thou hast uphoarded in thy life\nExtorted treasure in the womb of earth,\nFor which, they say, you spirits oft walk in death,\nSpeak of it: stay, and speak! Stop it, Marcellus.\nMARCELLUS\nShall I strike at it with my partisan?\nHORATIO\nDo, if it will not stand.\nBERNARDO\n'Tis here!\nHORATIO\n'Tis here!\nMARCELLUS\n'Tis gone!\nExit Ghost\n\nWe do it wrong, being so majestical,\nTo offer it the show of violence;\nFor it is, as the air, invulnerable,\nAnd our vain blows malicious mockery.\nBERNARDO\nIt was about to speak, when the cock crew.\nHORATIO\nAnd then it started like a guilty thing\nUpon a fearful summons. I have heard,\nThe cock, that is the trumpet to the morn,\nDoth with his lofty and shrill-sounding throat\nAwake the god of day; and, at his warning,\nWhether in sea or fire, in earth or air,\nThe extravagant and erring spirit hies\nTo his confine: and of the truth herein\nThis present object made probation.\nMARCELLUS\nIt faded on the crowing of the cock.\nSome say that ever 'gainst that season comes\nWherein our Saviour's birth is celebrated,\nThe bird of dawning singeth all night long:\nAnd then, they say, no spirit dares stir abroad;\nThe nights are wholesome; then no planets strike,\nNo fairy takes, nor witch hath power to charm,\nSo hallow'd and so gracious is the time.\nHORATIO\nSo have I heard and do in part believe it.\nBut, look, the morn, in russet mantle clad,\nWalks o'er the dew of yon high eastward hill:\nBreak we our watch up; and by my advice,\nLet us impart what we have seen to-night\nUnto young Hamlet; for, upon my life,\nThis spirit, dumb to us, will speak to him.\nDo you consent we shall acquaint him with it,\nAs needful in our loves, fitting our duty?\nMARCELLUS\nLet's do't, I pray; and I this morning know\nWhere we shall find him most conveniently.\nExeunt\n\nSCENE II. A room of state in the castle.\nEnter KING CLAUDIUS, QUEEN GERTRUDE, HAMLET, POLONIUS, LAERTES, VOLTIMAND, CORNELIUS, Lords, and Attendants\nKING CLAUDIUS\nThough yet of Hamlet our dear brother's death\nThe memory be green, and that it us befitted\nTo bear our hearts in grief and our whole kingdom\nTo be contracted in one brow of woe,\nYet so far hath discretion fought with nature\nThat we with wisest sorrow think on him,\nTogether with remembrance of ourselves.\nTherefore our sometime sister, now our queen,\nThe imperial jointress to this warlike state,\nHave we, as 'twere with a defeated joy,--\nWith an auspicious and a dropping eye,\nWith mirth in funeral and with dirge in marriage,\nIn equal scale weighing delight and dole,--\nTaken to wife: nor have we herein barr'd\nYour better wisdoms, which have freely gone\nWith this affair along. For all, our thanks.\nNow follows, that you know, young Fortinbras,\nHolding a weak supposal of our worth,\nOr thinking by our late dear brother's death\nOur state to be disjoint and out of frame,\nColleagued with the dream of his advantage,\nHe hath not fail'd to pester us with message,\nImporting the surrender of those lands\nLost by his father, with all bonds of law,\nTo our most valiant brother. So much for him.\nNow for ourself and for this time of meeting:\nThus much the business is: we have here writ\nTo Norway, uncle of young Fortinbras,--\nWho, impotent and bed-rid, scarcely hears\nOf this his nephew's purpose,--to suppress\nHis further gait herein; in that the levies,\nThe lists and full proportions, are all made\nOut of his subject: and we here dispatch\nYou, good Cornelius, and you, Voltimand,\nFor bearers of this greeting to old Norway;\nGiving to you no further personal power\nTo business with the king, more than the scope\nOf these delated articles allow.\nFarewell, and let your haste commend your duty.\nCORNELIUS VOLTIMAND\nIn that and all things will we show our duty.\nKING CLAUDIUS\nWe doubt it nothing: heartily farewell.\nExeunt VOLTIMAND and CORNELIUS\n\nAnd now, Laertes, what's the news with you?\nYou told us of some suit; what is't, Laertes?\nYou cannot speak of reason to the Dane,\nAnd loose your voice: what wouldst thou beg, Laertes,\nThat shall not be my offer, not thy asking?\nThe head is not more native to the heart,\nThe hand more instrumental to the mouth,\nThan is the throne of Denmark to thy father.\nWhat wouldst thou have, Laertes?\nLAERTES\nMy dread lord,\nYour leave and favour to return to France;\nFrom whence though willingly I came to Denmark,\nTo show my duty in your coronation,\nYet now, I must confess, that duty done,\nMy thoughts and wishes bend again toward France\nAnd bow them to your gracious leave and pardon.\nKING CLAUDIUS\nHave you your father's leave? What says Polonius?\nLORD POLONIUS\nHe hath, my lord, wrung from me my slow leave\nBy laboursome petition, and at last\nUpon his will I seal'd my hard consent:\nI do beseech you, give him leave to go.\nKING CLAUDIUS\nTake thy fair hour, Laertes; time be thine,\nAnd thy best graces spend it at thy will!\nBut now, my cousin Hamlet, and my son,--\nHAMLET\n[Aside] A little more than kin, and less than kind.\nKING CLAUDIUS\nHow is it that the clouds still hang on you?\nHAMLET\nNot so, my lord; I am too much i' the sun.\nQUEEN GERTRUDE\nGood Hamlet, cast thy nighted colour off,\nAnd let thine eye look like a friend on Denmark.\nDo not for ever with thy vailed lids\nSeek for thy noble father in the dust:\nThou know'st 'tis common; all that lives must die,\nPassing through nature to eternity.\nHAMLET\nAy, madam, it is common.\nQUEEN GERTRUDE\nIf it be,\nWhy seems it so particular with thee?\nHAMLET\nSeems, madam! nay it is; I know not 'seems.'\n'Tis not alone my inky cloak, good mother,\nNor customary suits of solemn black,\nNor windy suspiration of forced breath,\nNo, nor the fruitful river in the eye,\nNor the dejected 'havior of the visage,\nTogether with all forms, moods, shapes of grief,\nThat can denote me truly: these indeed seem,\nFor they are actions that a man might play:\nBut I have that within which passeth show;\nThese but the trappings and the suits of woe.\nKING CLAUDIUS\n'Tis sweet and commendable in your nature, Hamlet,\nTo give these mourning duties to your father:\nBut, you must know, your father lost a father;\nThat father lost, lost his, and the survivor bound\nIn filial obligation for some term\nTo do obsequious sorrow: but to persever\nIn obstinate condolement is a course\nOf impious stubbornness; 'tis unmanly grief;\nIt shows a will most incorrect to heaven,\nA heart unfortified, a mind impatient,\nAn understanding simple and unschool'd:\nFor what we know must be and is as common\nAs any the most vulgar thing to sense,\nWhy should we in our peevish opposition\nTake it to heart? Fie! 'tis a fault to heaven,\nA fault against the dead, a fault to nature,\nTo reason most absurd: whose common theme\nIs death of fathers, and who still hath cried,\nFrom the first corse till he that died to-day,\n'This must be so.' We pray you, throw to earth\nThis unprevailing woe, and think of us\nAs of a father: for let the world take note,\nYou are the most immediate to our throne;\nAnd with no less nobility of love\nThan that which dearest father bears his son,\nDo I impart toward you. For your intent\nIn going back to school in Wittenberg,\nIt is most retrograde to our desire:\nAnd we beseech you, bend you to remain\nHere, in the cheer and comfort of our eye,\nOur chiefest courtier, cousin, and our son.\n</pre>\n\n\n</body>\n</html>\n"
  },
  {
    "path": "public/examples/v150/modal.html",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n    <title>JsFrame.js modal window</title>\n    <meta charset=\"utf-8\">\n    <meta name=\"description\" content=\"A javascript popup/floating window library.\">\n    <link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css\">\n</head>\n<body>\n<div>\n    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna\n    aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\n</div>\n<br>\n<button id=\"bt_open\" type=\"button\" onclick=\"openModalWindow()\" class=\"btn btn-primary\">Open as a modal window</button>\n<script src=\"../../jsframe.js\"></script>\n\n<script>\n\n    function openModalWindow() {\n        const jsFrame = new JSFrame();\n        const innerHTML = '<div class=\"modal-header\">' +\n            '<h6 class=\"modal-title\">Do want to save ?</h6>' +\n            '</div>' +\n            '<div class=\"modal-footer\">' +\n            '<button id=\"bt_submit\" type=\"button\" class=\"btn btn-outline-primary\">OK</button>' +\n            '<button id=\"bt_cancel\" type=\"button\" class=\"btn btn-outline-secondary\">Cancel</button>' +\n            '</div>';\n\n        const modalFrame = jsFrame.create({\n            name: 'my-modal-window',\n            title: 'Confirmation',\n            left: 0, top: 0, width: 320, height: 150,\n            movable: true,\n            resizable: true,\n            html: innerHTML\n        });\n        //Place window in the center\n        modalFrame.setPosition(window.innerWidth / 2, window.innerHeight / 2, 'CENTER_BOTTOM');\n\n\n        //Handling the button's click event\n        modalFrame.on('#bt_submit', 'click', (_frame, e) => {\n            _frame.extra = {\n                result: 'submitted'\n            }\n            _frame.closeFrame();\n        });\n        modalFrame.on('#bt_cancel', 'click', (frame, e) => {\n            //You can also get frame object from JSFrame object.\n            var _frame = jsFrame.getWindowByName('my-modal-window');\n            _frame.extra = {\n                result: 'canceled'\n            }\n            _frame.closeFrame();\n        });\n\n        //Open as modal window\n        modalFrame.showModal(_frame => {\n            //You can get callback when closing the modal window\n            jsFrame.showToast({\n                html: `${_frame.getName()} is closed.The result is ${_frame.extra.result}`,\n                align: 'center',\n                duration: 2000\n            });\n        });\n\n\n    }\n\n\n</script>\n</body>\n</html>"
  },
  {
    "path": "public/examples/v150/position.html",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n    <title>JsFrame.js example Position</title>\n    <meta charset=\"utf-8\">\n    <meta name=\"description\" content=\"A javascript popup/floating window library.\">\n</head>\n<body>\n<script src=\"../../jsframe.js\"></script>\n<script>\n    function start() {\n        const jsFrame = new JSFrame();\n        const frame01 = jsFrame.createFrame().setTitle(\"My window\");\n        //Set size with setSize method\n        frame01.setSize(320, 240);\n\n        //Set position with method\n        const align = 'CENTER_CENTER';//alignment\n        const x = window.innerWidth / 2;\n        const y = window.innerHeight / 2;\n        frame01.setPosition(x, y, align);\n        frame01.setHTML('hello');\n        frame01.show();\n    }\n\n    start();\n</script>\n</body>\n</html>"
  },
  {
    "path": "public/examples/v150/preset_material.html",
    "content": "<!DOCTYPE html>\n<!--\n\nUsage for 'material' preset\n- title bar icon with font-awesome\n- menu on title bar icon with bootstrap\n-->\n<html>\n<head>\n    <title>JsFrame.js material</title>\n    <meta charset=\"utf-8\">\n    <meta name=\"description\" content=\"A javascript popup/floating window library.\">\n    <link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css\">\n    <link rel=\"stylesheet\" href=\"https://use.fontawesome.com/releases/v5.6.3/css/all.css\"\n          integrity=\"sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/\" crossorigin=\"anonymous\">\n</head>\n<body style=\"overflow: hidden;background: url('https://upload.wikimedia.org/wikipedia/commons/thumb/e/e0/Chidori_Canal.jpg/1920px-Chidori_Canal.jpg') 50% no-repeat fixed; background-size: cover;\">\n\n<div style=\"color:#f5f5f5;text-shadow: 2px 2px 1px #333333;\"><a\n        href=\"https://github.com/riversun/JSFrame.js\">JSFrame.js</a> Example : Preset style material\n</div>\n\n\n<div\n        style=\"font-size: 12px; color: white; position: fixed; right: 10px; bottom: 10px\">\n    Photo by Takuro1202 License: CC 3.0\n</div>\n<script src=\"../../jsframe.js\"></script>\n<script>\n\n    window.alert = function (msg) {\n        jsFrame.showToast({\n            text: msg, align: 'center'\n        });\n    };\n\n    const jsFrame = new JSFrame({\n        //Specify horizontal anchor (left / right) of window\n        //In the case of 'right' , it is fixed to the right end\n        // (coordinate is specified in the minus direction toward the left end with the x coordinate of the right end being 0)\n        horizontalAlign: 'left',\n        verticalAlign: 'top',\n    });\n\n\n    function createFrame01() {\n\n        const frame = jsFrame.create({\n            name: `Win`,\n            title: `Material style`,\n            left: 20, top: 40, width: 320, height: 220, minWidth: 200, minHeight: 110,\n            appearanceName: 'material',\n            appearanceParam: {\n                titleBar: {\n                    color: 'white',\n                    background: '#333333',\n                }\n            },\n            style: {\n                backgroundColor: 'rgba(255,255,255,0.8)',\n                overflow: 'auto'\n            },\n\n            url: 'iframe_content03.html',\n        }).show();\n\n\n        frame.setControl({\n            maximizeButton: 'maximizeButton',\n            demaximizeButton: 'restoreButton',\n            minimizeButton: 'minimizeButton',\n            deminimizeButton: 'deminimizeButton',\n            hideButton: 'closeButton',\n            animation: true,\n            animationDuration: 150,\n\n        });\n        frame.control.on('hid', (frame, info) => {\n            frame.closeFrame();\n        });\n\n        //Callback when calling after mazimization\n        frame.control.on('maximized', (frame, info) => {\n            jsFrame.showToast({\n                text: 'Maximized'\n            });\n        });\n        frame.control.on('demaximized', (frame, info) => {\n        });\n        frame.control.on('minimized', (frame, info) => {\n        });\n        frame.control.on('dminimized', (frame, info) => {\n        });\n\n\n    }\n\n    function createFrame02() {\n\n        const frame = jsFrame.create({\n            name: `Win2`,\n            title: `Material style`,\n            left: 360, top: 40, width: 320, height: 220, minWidth: 200, minHeight: 110,\n            appearanceName: 'material',\n            appearanceParam: {\n                border: {\n                    shadow: '2px 2px 10px  rgba(0, 0, 0, 0.5)',\n                    width: 0,\n                    radius: 6,\n                },\n                titleBar: {\n                    color: 'white',\n                    background: '#4784d4',\n                    leftMargin: 40,\n                    height: 30,\n                    fontSize: 14,\n                    buttonWidth: 36,\n                    buttonHeight: 16,\n                    buttonColor: 'white',\n                    buttons: [\n                        {\n                            fa: 'fas fa-times',\n                            name: 'closeButton',\n                            visible: true\n                        },\n                        {\n                            fa: 'fas fa-expand-arrows-alt',\n                            name: 'maximizeButton',\n                            visible: true\n                        },\n                        {\n                            fa: 'fas fa-compress-arrows-alt',\n                            name: 'minimizedButton',\n                            visible: false\n                        },\n                    ],\n                    buttonsOnLeft: [\n                        {\n                            //Set font-awesome fonts(https://fontawesome.com/icons?d=gallery&m=free)\n                            fa: 'fas fa-bars',\n                            name: 'menu',\n                            visible: true,\n                            childMenuHTML: '<div class=\"list-group\">' +\n                                '  <div name=\"menu1\" class=\"list-group-item list-group-item-action py-2\">Menu Item 01</div>' +\n                                '  <div name=\"menu2\" class=\"list-group-item list-group-item-action py-2\">Menu Item 02</div>' +\n                                '  <div name=\"menu3\" class=\"list-group-item list-group-item-action py-2\">Menu Item 03</div>' +\n                                '</div>',\n                            childMenuWidth: 300\n                        },\n                    ],\n                },\n            },\n            style: {\n                backgroundColor: 'rgba(0,0,0,0.8)',\n                overflow: 'hidden',\n                width: '100%',\n            },\n\n            html: '<img style=\"margin: auto;position: absolute;top: 0;left: 0;right: 0;bottom: 0;width:100%;height:auto\" src=\"https://upload.wikimedia.org/wikipedia/commons/c/c2/I-40W-Sunflowers.jpg\">'\n        }).show();\n\n\n        frame.setControl({\n            maximizeButton: 'maximizeButton',\n            demaximizeButton: 'restoreButton',\n            minimizeButton: 'minimizeButton',\n            deminimizeButton: 'deminimizeButton',\n            hideButton: 'closeButton',\n            animation: true,\n            animationDuration: 150,\n            maximizeWithoutTitleBar: true,\n            restoreKey: 'Escape',\n\n        });\n        frame.control.on('hid', (frame, info) => {\n            frame.closeFrame();\n        });\n\n        frame.control.on('maximized', (frame, info) => {\n            jsFrame.showToast({\n                text: 'Press \"ESC\" to minimize.', align: 'center'\n            });\n        });\n        frame.control.on('demaximized', (frame, info) => {\n\n        });\n\n        frame.on('menu', 'click', (_frame, evt, info) => {\n            const name = evt.target.getAttribute('name');\n\n            if (name && name.startsWith('menu')) {\n                alert(name + ' clicked');\n            }\n        });\n    }\n\n    createFrame01();\n    createFrame02();\n</script>\n\n</body>\n</html>"
  },
  {
    "path": "public/examples/v150/preset_win10.html",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n    <title>JsFrame.js yosemite</title>\n    <meta charset=\"utf-8\">\n    <meta name=\"description\" content=\"A javascript popup/floating window library.\">\n</head>\n<body style=\"overflow: hidden;background: url('https://upload.wikimedia.org/wikipedia/commons/c/c5/Kurumayama_K%C5%8Dgen_Snow_Resort_2.jpg') 50% no-repeat fixed; background-size: cover;\">\n\n<script src=\"../../jsframe.js\"></script>\n\n<script>\n    function start() {\n\n        const jsFrame = new JSFrame();\n\n        const frames = [];\n        for (let i = 0; i < 2; i++) {\n            const frame = jsFrame.create({\n                name: `Win${i}`,\n                title: `Win${i} - Win10 style`,\n                left: 20 + (320 + 20) * i, top: 50, width: 320, height: 220, minWidth: 200, minHeight: 110,\n                appearanceName: 'redstone',\n                style: {\n                    backgroundColor: 'rgba(255,255,255,0.50)',\n                    overflow: 'hidden'\n                },\n                html: '<div style=\"padding:10px;\">Your contents here.</div>'\n            }).show();\n\n            frame.on('minimizeButton', 'click', (_frame, evt) => {\n\n                frame.hideFrameComponent('minimizeButton');\n                frame.showFrameComponent('deminimizeButton');\n\n                const force = true;\n\n                _frame.extra.__restore_info = {\n                    org_left: _frame.getLeft(),\n                    org_top: _frame.getTop(),\n                    org_width: _frame.getWidth(),\n                    org_height: _frame.getHeight()\n                };\n\n                _frame.setSize(_frame.getWidth(), 30, force);\n                _frame.setResizable(false);\n\n\n            });\n            frame.on('deminimizeButton', 'click', (_frame, evt) => {\n\n                _frame.showFrameComponent('minimizeButton');\n                _frame.hideFrameComponent('deminimizeButton');\n\n                const force = true;\n                _frame.setSize(_frame.extra.__restore_info.org_width, _frame.extra.__restore_info.org_height, force);\n\n            });\n\n            frame.on('maximizeButton', 'click', (_frame, evt) => {\n\n                _frame.extra.__restore_info = {\n                    org_left: _frame.getLeft(),\n                    org_top: _frame.getTop(),\n                    org_width: _frame.getWidth(),\n                    org_height: _frame.getHeight()\n                };\n\n                frame.hideFrameComponent('maximizeButton');\n                frame.showFrameComponent('restoreButton');\n\n                frame.setPosition(0, 0);\n                frame.setSize(window.innerWidth - 2, window.innerHeight - 2, true);\n\n                frame.setMovable(false);\n                frame.setResizable(false);\n\n\n            });\n\n            frame.on('restoreButton', 'click', (_frame, evt) => {\n\n                frame.setMovable(true);\n                frame.setResizable(true);\n\n                _frame.setPosition(_frame.extra.__restore_info.org_left, _frame.extra.__restore_info.org_top);\n\n                const force = true;\n                _frame.setSize(_frame.extra.__restore_info.org_width, _frame.extra.__restore_info.org_height, force);\n\n                _frame.showFrameComponent('maximizeButton');\n                _frame.hideFrameComponent('restoreButton');\n\n\n            });\n            frame.on('closeButton', 'click', (_frame, evt) => {\n                _frame.closeFrame();\n            });\n            frames.push(frame);\n        }\n        frames[0].requestFocus();\n    }\n\n    start();\n</script>\n<div style=\"color:white\"><a href=\"https://github.com/riversun/JSFrame.js\">JSFrame.js</a> Example : Preset style redstone\n</div>\n<div\n        style=\"font-size: 12px; color: white; position: fixed; right: 10px; bottom: 10px\">\n    Photo by Ski Mania License: CC-BY-SA 4.0\n</div>\n</body>\n</html>"
  },
  {
    "path": "public/examples/v150/preset_yosemite.html",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n    <title>JsFrame.js yosemite</title>\n    <meta charset=\"utf-8\">\n    <meta name=\"description\" content=\"A javascript popup/floating window library.\">\n</head>\n<body style=\"background: url('http://upload.wikimedia.org/wikipedia/commons/d/d6/Half_Dome_from_Glacier_Point%2C_Yosemite_NP_-_Diliff.jpg') 50% no-repeat fixed; background-size: cover;\">\n<script src=\"../../jsframe.js\"></script>\n<script>\n    function start() {\n\n        const jsFrame = new JSFrame();\n\n        const frames = [];\n        for (let i = 0; i < 3; i++) {\n            const frame = jsFrame.create({\n                name: `Win${i}`,\n                title: `Win${i} - Yosemite style`,\n                left: 20 + (320 + 20) * i, top: 50, width: 320, height: 220, minWidth: 200, minHeight: 110,\n                appearanceName: 'yosemite',\n                style: {\n                    backgroundColor: 'rgba(255,255,255,0.8)',\n\n                },\n\n                html: '<div style=\"padding:10px;\">Your contents here.</div>'\n            }).show();\n\n            frame.on('minimizeButton', 'click', (_frame, evt) => {\n                const size = _frame.getSize();\n                _frame.setSize(size.width - 20, size.height - 20);\n                jsFrame.showToast({\n                    align: 'top', html: `Minimized <span style=\"color:red\">${_frame.getName()}</span>`\n                });\n            });\n            frame.on('zoomButton', 'click', (_frame, evt) => {\n                const size = _frame.getSize();\n                _frame.setSize(size.width + 20, size.height + 20);\n                jsFrame.showToast({\n                    align: 'top', html: `Zoomed <span style=\"color:red\">${_frame.getName()}</span>`\n                });\n            });\n            frame.on('closeButton', 'click', (_frame, evt) => {\n                _frame.closeFrame();\n                jsFrame.showToast({\n                    align: 'top', html: `Closed <span style=\"color:red\">${_frame.getName()}</span>`\n                });\n\n            });\n            frames.push(frame);\n        }\n        frames[0].requestFocus();\n    }\n\n    start();\n</script>\n<div style=\"color:#666666\"><a href=\"https://github.com/riversun/JSFrame.js\">JSFrame.js</a> Example : Preset style\n    yosemite\n</div>\n<div style=\"font-size: 12px; color: white; position: fixed; right: 10px; bottom: 10px\">\n    Photo by Tiago Fioreze License: CC-BY-SA 3.0\n</div>\n</body>\n</html>"
  },
  {
    "path": "public/examples/v150/preset_yosemite_auto.html",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n    <title>JsFrame.js yosemite</title>\n    <meta charset=\"utf-8\">\n    <meta name=\"description\" content=\"A javascript popup/floating window library.\">\n</head>\n<body style=\"background: url('http://upload.wikimedia.org/wikipedia/commons/d/d6/Half_Dome_from_Glacier_Point%2C_Yosemite_NP_-_Diliff.jpg') 50% no-repeat fixed; background-size: cover;\">\n<script src=\"../../jsframe.js\"></script>\n<script>\n    function start() {\n\n        const jsFrame = new JSFrame();\n\n        const frames = [];\n        for (let i = 0; i < 3; i++) {\n            const frame = jsFrame.create({\n                name: `Win${i}`,\n                title: `Win${i} - Yosemite style`,\n                left: 20 + (320 + 20) * i, top: 50, width: 320, height: 220, minWidth: 200, minHeight: 110,\n                appearanceName: 'yosemite',\n                style: {\n                    backgroundColor: 'rgba(255,255,255,0.8)',\n                    overflow:'auto'\n\n                },\n\n                html: '<div style=\"padding:10px;\">Your contents here.</div>'\n            }).show();\n\n\n            frame.setControl({\n                styleDisplay:'inline',\n                maximizeButton: 'zoomButton',\n                demaximizeButton: 'dezoomButton',\n                minimizeButton: 'minimizeButton',\n                deminimizeButton: 'deminimizeButton',\n                hideButton: 'closeButton',\n                animation: true,\n                animationDuration: 150,\n\n            });\n\n            frame.control.on('hid', (frame, info) => {\n                frame.closeFrame();\n            });\n\n\n\n\n            frames.push(frame);\n        }\n        frames[0].requestFocus();\n    }\n\n    start();\n</script>\n<div style=\"color:#666666\"><a href=\"https://github.com/riversun/JSFrame.js\">JSFrame.js</a> Example : Preset style\n    yosemite\n</div>\n<div style=\"font-size: 12px; color: white; position: fixed; right: 10px; bottom: 10px\">\n    Photo by Tiago Fioreze License: CC-BY-SA 3.0\n</div>\n</body>\n</html>"
  },
  {
    "path": "public/examples/v150/simple.html",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n    <title>JsFrame.js example</title>\n    <meta charset=\"utf-8\">\n</head>\n<body>\n<script src=\"../../jsframe.js\"></script>\n<script>\n    function start() {\n        const jsFrame = new JSFrame();\n        //Create window\n        const frame = jsFrame.create({\n            title: 'Window',\n            left: 20, top: 20, width: 320, height: 220,\n            movable: true,//Enable to be moved  by mouse\n            resizable: true,//Enable to be resized by mouse\n            html: '<div id=\"my_element\" style=\"padding:10px;font-size:12px;color:darkgray;\">Contents of window</div>'\n        });\n        //Show window\n        frame.show();\n        setTimeout(() => {\n            //Change contents after 1 second\n            //Use $ selector to access to content of frame\n            frame.$('#my_element').innerHTML = '<span style=\"color:red\">Hello world</span>';\n        }, 1000);\n    }\n\n    start();\n</script>\n</body>\n</html>"
  },
  {
    "path": "public/examples/v150/styling.html",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n    <title>JsFrame.js example</title>\n    <meta charset=\"utf-8\">\n    <meta name=\"description\" content=\"A javascript popup/floating window library.\">\n</head>\n<body style=\"background: url('https://upload.wikimedia.org/wikipedia/commons/e/e0/Clouds_over_the_Atlantic_Ocean.jpg') 50% no-repeat fixed; background-size: cover;\">\n\n<script src=\"../../jsframe.js\"></script>\n\n<script>\n    function start() {\n\n        const jsFrame = new JSFrame();\n\n        //Set preset style(called appearance) with presetName\n        const frame01 = jsFrame.create({\n            title: 'Yosemite style',\n            left: 20, top: 20, width: 320, height: 220,\n            appearanceName: 'yosemite',//Now preset is selectable from  'yosemite','redstone','popup'\n            style: {\n                backgroundColor: 'rgba(255,255,255,0.9)',\n            },\n            html: '<div style=\"padding:10px;\">Preset is selected by preset name</div>'\n        }).show();\n\n        const frame02 = jsFrame.create({\n            title: 'Yosemite style',\n            left: 360, top: 20, width: 320, height: 220,\n            appearanceName: 'yosemite',\n            style: {\n                backgroundColor: 'rgba(255,255,255,0.9)',\n                overflow: 'hidden'\n            },\n            html: '<div style=\"padding:10px;\">Hide the specified button (See top-left area)</div>'\n        }).show();\n\n        //Hide specified button by button's id\n        frame02.hideFrameComponent('minimizeButton');\n        frame02.hideFrameComponent('zoomButton');\n\n        const appearance4frame03 = jsFrame.createPresetStyle('redstone');\n        jsFrame.create({\n            title: 'Win10 style',\n            left: 20, top: 260, width: 320, height: 220,\n            style: {\n                backgroundColor: 'rgba(255,255,255,0.9)',\n                overflow: 'hidden'\n            },\n            appearance: appearance4frame03,\n            html: '<div style=\"padding:10px;\">Create from appearance object</div>'\n        }).show();\n\n        //Create appearacne(style,look and feel) object\n        const appearance = jsFrame.createFrameAppearance();\n        jsFrame.create({\n            title: 'Popup style',\n            left: 360, top: 260, width: 320, height: 220,\n            style: {\n                backgroundColor: 'rgba(255,255,255,0.9)',\n                overflow: 'hidden'\n            },\n            appearance: populateOriginalStyle(appearance),\n            html: '<div style=\"padding:10px;height:100%\">Createa appearance object from scratch</div>'\n        }).show();\n\n        frame01.requestFocus();\n    }\n\n    /**\n     * Create an original appearance\n     * @param apr\n     * @returns {*}\n     */\n    function populateOriginalStyle(apr) {\n\n        apr.titleBarCaptionFontSize = '12px';\n        apr.titleBarCaptionFontWeight = 'normal';\n        apr.titleBarCaptionLeftMargin = '10px';\n        apr.titleBarCaptionColorDefault = '#4d494d';\n        apr.titleBarCaptionColorFocused = '#4d494d';\n        apr.titleBarHeight = '0px';\n        apr.titleBarColorDefault = 'white';\n        apr.titleBarColorFocused = 'white';\n        apr.titleBarBorderBottomDefault = null;\n        apr.titleBarBorderBottomFocused = null;\n        apr.frameBorderRadius = '6px';\n        apr.frameBorderWidthDefault = '4px';\n        apr.frameBorderWidthFocused = '4px';\n        apr.frameBorderColorDefault = '#ffffff';\n        apr.frameBorderColorFocused = '#1883d7';\n        apr.frameBorderStyle = 'solid';\n        apr.frameBoxShadow = '0px 0px 20px rgba(0, 0, 0, 0.3)';\n        apr.frameBorderStyle = 'solid';\n        apr.frameBackgroundColor = 'white';\n        apr.frameComponents = [];\n        apr.frameHeightAdjust = 1;\n\n        apr.onInitialize = function () {\n            var partsBuilder = apr.getPartsBuilder();\n            var btApr = partsBuilder.buildTextButtonAppearance();\n            btApr.width = 20;\n            btApr.height = 20;\n            btApr.borderRadius = 10;\n            btApr.borderWidth = 1;\n            btApr.borderColorDefault = '#cccccc';\n            btApr.borderColorFocused = '#cccccc';\n            btApr.borderColorHovered = '#dddddd';\n            btApr.borderColorPressed = '#eeeeee';\n            btApr.borderStyleDefault = 'solid';\n            btApr.borderStyleFocused = btApr.borderStyleDefault;\n            btApr.borderStyleHovered = btApr.borderStyleDefault;\n            btApr.borderStylePressed = btApr.borderStyleDefault;\n            btApr.backgroundColorDefault = 'white';\n            btApr.backgroundColorFocused = 'white';\n            btApr.backgroundColorHovered = '#eeeeee';\n            btApr.backgroundColorPressed = '#dddddd';\n            btApr.backgroundBoxShadow = '2px 2px 5px  rgba(0, 0, 0, 0.5)';\n            btApr.caption = '\\u2716';\n            btApr.captionColorDefault = 'black';\n            btApr.captionColorFocused = 'black';\n            btApr.captionColorHovered = 'white';\n            btApr.captionColorPressed = 'white';\n            btApr.captionShiftYpx = 1;\n            btApr.captionFontRatio = 0.6;\n\n            var btEle = partsBuilder.buildTextButton(btApr);\n            var eleLeft = 10;\n            var eleTop = -12 - parseInt(apr.titleBarHeight);\n            var eleAlign = 'RIGHT_TOP';\n            // 'closeButton' is a special name\n            apr.addFrameComponent('closeButton', btEle, eleLeft, eleTop, eleAlign);\n        };\n        return apr;\n    }\n\n    start();\n</script>\n<div style=\"font-size: 12px; color: white; position: fixed; right: 10px; bottom: 10px\">\n    Photo by Tiago Fioreze License: CC-BY-SA 3.0\n</div>\n</body>\n</html>"
  },
  {
    "path": "public/examples/v150/toast.html",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n    <title>JsFrame.js toast</title>\n    <meta charset=\"utf-8\">\n    <meta name=\"description\" content=\"A javascript popup/floating window library.\">\n    <link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css\">\n</head>\n<body style=\"background: url('https://upload.wikimedia.org/wikipedia/commons/e/e0/Clouds_over_the_Atlantic_Ocean.jpg') 50% no-repeat fixed; background-size: cover;\">\n<br>\n<div class=\"container-fluid\">\n    <button type=\"button\" onclick=\"showToast01()\" class=\"m-1 btn btn-primary btn-sm\">Show toast(default)</button>\n    <button type=\"button\" onclick=\"showToast02()\" class=\"m-1 btn btn-primary btn-sm\">Show toast(center)</button>\n    <button type=\"button\" onclick=\"showToast03()\" class=\"m-1 btn btn-primary btn-sm\">Show toast(top)</button>\n    <button type=\"button\" onclick=\"showToast04()\" class=\"m-1 btn btn-primary btn-sm\">Show toast(customized)</button>\n</div>\n<script src=\"../../jsframe.js\"></script>\n<script>\n\n    const jsFrame = new JSFrame();\n    \n    function showToast01() {\n\n        jsFrame.showToast({\n            html: 'Default toast',\n        });\n    }\n\n    function showToast02() {\n\n        jsFrame.showToast({\n            align: 'center', html: 'Toast displayed in the center'\n        });\n    }\n\n    function showToast03() {\n\n        jsFrame.showToast({\n            align: 'top', html: 'Toast displayed at the top',\n        });\n    }\n\n    function showToast04() {\n\n        jsFrame.showToast({\n            width: 260,\n            height: 100,\n            duration: 2000,//Duration(millis)\n            align: 'center',// alignment from 'top'/'center'/'bottom'(default)\n            style: {\n                borderRadius: '2px',\n                backgroundColor: 'rgba(0,124,255,0.8)',\n            },\n            html: '<span style=\"color:white;\">Custom toast</span>',\n            closeButton: true,//Show close button\n            closeButtonColor: 'white'//Color of close button\n        });\n    }\n</script>\n</body>\n</html>"
  },
  {
    "path": "public/examples/v150/toast_simple.html",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n    <title>JsFrame.js JavaScript Toast</title>\n    <meta charset=\"utf-8\">\n</head>\n<body>\n<script src=\"../../jsframe.js\"></script>\n<script>\n    const jsFrame = new JSFrame();\n    jsFrame.showToast({\n        html: 'This is a simple toast', align: 'top', duration: 2000\n    });\n</script>\n</body>\n</html>"
  },
  {
    "path": "public/examples/v150/window_control.html",
    "content": "<!DOCTYPE html>\n<!--\n\n-->\n<html>\n<head>\n    <title>JsFrame.js window control</title>\n    <meta charset=\"utf-8\">\n    <meta name=\"description\" content=\"A javascript popup/floating window library.\">\n    <link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css\">\n    <link rel=\"stylesheet\" href=\"https://use.fontawesome.com/releases/v5.6.3/css/all.css\"\n          integrity=\"sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/\" crossorigin=\"anonymous\">\n</head>\n<body style=\"overflow: hidden;background: url('https://upload.wikimedia.org/wikipedia/commons/4/40/Mont_Blanc_depuis_Chamonix.JPG') 50% no-repeat fixed; background-size: cover;\">\n\n<div style=\"color:#f5f5f5;text-shadow: 2px 2px 1px #333333;\"><a\n        href=\"https://github.com/riversun/JSFrame.js\">JSFrame.js</a> Example : Preset style redstone\n</div>\n\n\n<div\n        style=\"font-size: 12px; color: white; position: fixed; right: 10px; bottom: 10px\">\n    Photo by Aiguille License: CC0\n</div>\n<script src=\"../../jsframe.js\"></script>\n<script>\n\n    const jsFrame = new JSFrame({\n        horizontalAlign: 'left',\n        verticalAlign: 'top',\n    });\n\n    function rest() {\n        var frame = jsFrame.getWindowByName('Win0');\n        frame.control.doDehide();\n    }\n\n    function start() {\n\n        const frame = jsFrame.create({\n            name: `Win`,\n            title: `Win - Win10 style`,\n            left: 20, top: 40, width: 320, height: 220, minWidth: 200, minHeight: 110,\n            appearanceName: 'material',\n            style: {\n                backgroundColor: 'rgba(255,255,255,0.8)',\n                overflow: 'auto'\n            },\n\n            url: 'iframe_content03.html',\n        }).show();\n\n\n        frame.setControl({\n            maximizeButton: 'maximizeButton',\n            demaximizeButton: 'restoreButton',\n            minimizeButton: 'minimizeButton',\n            deminimizeButton: 'deminimizeButton',\n            animation: true,\n            animationDuration: 200,\n\n        });\n\n\n        frame.on('maximizeButton', 'click', (_frame, evt) => {\n            _frame.control.doMaximize({\n                hideTitleBar: false,\n                duration: 200,\n                restoreKey: 'Escape',\n                restoreDuration: 100,\n                callback: (frame, info) => {\n                    frame.requestFocus();\n                },\n                restoreCallback: (frame, info) => {\n                    jsFrame.showToast({\n                        text: frame.getName() + ' ' + info.eventType\n                    });\n                },\n            });\n        });\n\n        frame.on('restoreButton', 'click', (_frame, evt) => {\n            _frame.control.doDemaximize(\n                {\n                    duration: 200,\n                    callback: (frame, info) => {\n                        jsFrame.showToast({\n                            text: frame.getName() + ' ' + info.eventType\n                        });\n                    }\n                });\n        });\n\n        frame.on('minimizeButton', 'click', (_frame, evt) => {\n\n            _frame.control.doMinimize({\n                duration: 200,\n                callback: (frame, info) => {\n                    jsFrame.showToast({\n                        text: frame.getName() + ' ' + info.eventType\n                    });\n                }\n            });\n\n        });\n        frame.on('deminimizeButton', 'click', (_frame, evt) => {\n            _frame.control.doDeminimize({\n                duration: 200,\n                callback: (frame, info) => {\n                    jsFrame.showToast({\n                        text: frame.getName() + ' ' + info.eventType\n                    });\n                }\n            });\n        });\n\n        frame.on('closeButton', 'click', (_frame, evt) => {\n            _frame.control.doHide({\n                duration: 100,\n                align: 'CENTER_BOTTOM',\n                callback: (frame, info) => {\n                    jsFrame.showToast({\n                        text: frame.getName() + ' ' + info.eventType\n                    });\n                    _frame.closeFrame();\n                }\n            });\n        });\n    }\n\n    start();\n</script>\n</body>\n</html>"
  },
  {
    "path": "public/examples/v160/alignment/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <title>JsFrame.js example - Anchor of the window position</title>\n    <link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet'>\n    <link rel=\"stylesheet\" href=\"../../../index.css\">\n    <style>\n        .window-content {\n            font-size: 16px;\n            padding: 10px;\n            color: #666666;\n            user-select: none;\n        }\n    </style>\n</head>\n<body>\n\n<h2><a href=\"../../../index.html\">JSFrame.js examples</a><span>Anchor of the window position</span></h2>\n<span>Try resizing BROWSER to make sure window is anchored in the bottom-right corner\n</span>\n\n<div style=\"font-size: 16px; color: white; position: fixed; right: 20px; bottom: 10px\">\n    <a href=\"https://github.com/riversun/JSFrame.js/tree/master/public/examples/v160/alignment\"\n       title=\"View source for this page on GitHub\" target=\"_blank\">View source on GitHub</a>\n</div>\n<script src=\"../../../jsframe.js\"></script>\n<script>\n  const jsFrame = new JSFrame(\n    {\n      horizontalAlign: 'right',//You can specify 'left' and 'right' for horizontalAlign.\n      verticalAlign: 'bottom',//You can also specify 'top' and 'bottom' for the verticalAlign\n    });\n\n  const width = 400;\n  const height = 320;\n  const margin = 10;\n\n\n  jsFrame.create({\n    name: `Win0`,\n    title: `Anchor is right-bottom`,\n    // Note:\n    // If you specify anchor as right or bottom,\n    // the window position will still be specified by (left,top)\n    left: -width - margin,\n    top: -height - margin,\n    width, height,\n    appearanceName: 'yosemite',\n    html: `<div class=\"window-content\">If you specify like this\n <br><code>new JSFrame({ horizontalAlign: 'right', verticalAlign: 'bottom', });</code><br>\n  The anchor of the window is in the lower right corner.\nSo if you pull the bottom right corner of the browser to resize it, the window will stick to the bottom right</div>`,\n  }).show();\n</script>\n</body>\n</html>\n"
  },
  {
    "path": "public/examples/v160/alignment-not-fixed/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <title>JsFrame.js example - Fixed and Not-fixed window</title>\n    <link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet'>\n    <link rel=\"stylesheet\" href=\"../../../index.css\">\n    <style>\n        .window-content {\n            line-height: 200%;\n        }\n    </style>\n</head>\n<body>\n\n<h2><a href=\"../../../index.html\">JSFrame.js examples</a><span>Fixed and Not-fixed window</span></h2>\n<span>Try scrolling the screen:The JsFrame initialization options <code>{fixed:true}</code> or <code>{fixed:false}</code> allow you to set the window to be fixed or unfixed\n</span>\n\n<div id=\"lipsum\" style=\"padding:20px;color:#eeeeee\"></div>\n<div style=\"font-size: 16px; color: white; position: fixed; right: 20px; bottom: 10px\">\n    <a href=\"https://github.com/riversun/JSFrame.js/tree/master/public/examples/v160/alignment-not-fixed\"\n       title=\"View source for this page on GitHub\" target=\"_blank\">View source on GitHub</a>\n</div>\n<script src=\"../../../jsframe.js\"></script>\n<script>\n  fetch('./lipsum.txt')\n    .then(function(response) {\n      return response.text();\n    })\n    .then(function(text) {\n      document.querySelector('#lipsum').innerHTML = text;\n    });\n</script>\n<script>\n  const jsFrameNotFixed = new JSFrame({ fixed: false });\n  jsFrameNotFixed.create({\n    name: `Win0`,\n    title: `Not fixed window`,\n    left: 20, top: 120, width: 400, height: 320,\n    appearanceName: 'yosemite',\n    html: `<div class=\"window-content\">\nIf the jsFrame initialization parameter is set to <code>new JSFrame(<b>{fixed:false}</b>)</code>, then\nThe window will be affected by scrolling.Default is <code><b>fixed:true</b></code></div>`,\n  }).show();\n\n  const jsFrameFixed = new JSFrame({ fixed: true });\n  jsFrameFixed.create({\n    name: `Win0`,\n    title: `Fixed window`,\n    left: 500, top: 120, width: 400, height: 320,\n    appearanceName: 'yosemite',\n    html: `<div class=\"window-content\">\n<code><b>{fixed:true}</b></code> can be used to create a \"floating\" window that stays in the same position regardless of scrolling.\n</div>`,\n  }).show();\n\n\n</script>\n</body>\n</html>\n"
  },
  {
    "path": "public/examples/v160/alignment-not-fixed/lipsum.txt",
    "content": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus ultricies, justo non luctus feugiat, turpis sapien suscipit nulla, sit amet hendrerit nibh quam ut metus. Nulla nisl nulla, efficitur in purus non, dictum sagittis sem. Mauris varius pretium ex, quis sodales nibh malesuada eu. Nunc tempor sagittis felis ut ultricies. Mauris blandit risus dolor, in ullamcorper nulla vestibulum vel. Sed at lorem rutrum, vestibulum diam sed, aliquam massa. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Nulla id augue arcu. Aenean et tellus eget purus eleifend porttitor. Aenean elementum, ipsum vel feugiat lobortis, elit justo ultricies odio, vel commodo mauris eros et ipsum. Curabitur eu bibendum leo. Aliquam rhoncus ac tellus at mollis. Interdum et malesuada fames ac ante ipsum primis in faucibus. Cras lobortis lacus libero, vitae commodo nulla cursus eget.\n\nMorbi neque enim, finibus sed sapien ac, fermentum ultricies massa. Sed eget gravida justo. Praesent velit lorem, maximus at dui quis, iaculis sollicitudin metus. Etiam non maximus erat, ut tempus dui. Donec leo dui, pellentesque in nisl id, ultricies dapibus mauris. Nullam luctus molestie commodo. Sed accumsan leo vitae urna malesuada sodales in vel leo. Curabitur tincidunt fringilla magna, eget pharetra arcu convallis eget. Pellentesque et venenatis sapien. Cras bibendum tempus eleifend. Nam rhoncus vel massa vel efficitur. Sed vestibulum pretium risus, et gravida elit euismod id. Mauris dignissim metus in justo consectetur ullamcorper.\n\nDonec hendrerit blandit purus sed pulvinar. Donec finibus laoreet ex ut vestibulum. Aliquam ut sagittis mi. Curabitur imperdiet justo ac ornare euismod. Nunc sed convallis sapien, quis bibendum purus. Suspendisse tincidunt pulvinar tortor, sed volutpat orci faucibus sagittis. Aenean ac mollis magna. Nullam viverra tortor ac iaculis facilisis. Vivamus sodales massa nisi, suscipit molestie ipsum lobortis rhoncus. Fusce vel fringilla ipsum, ac bibendum nisi. Sed tempus neque in ante egestas, vel eleifend justo ultrices. Praesent consequat massa at ex porttitor, et interdum ligula suscipit. Nam nec turpis ut arcu porttitor sodales efficitur eu augue. Praesent eget aliquet leo, in rutrum odio. Pellentesque sagittis est id risus efficitur placerat.\n\nQuisque finibus, lacus et bibendum vestibulum, neque sapien euismod tortor, nec sollicitudin tellus orci id leo. Nulla nunc neque, faucibus id placerat sed, sagittis vel nisl. Nam sollicitudin gravida nisl, at mollis augue elementum ac. Nam laoreet pellentesque ex, varius lobortis nisi pretium sed. Duis consectetur gravida mauris aliquet condimentum. Cras ultricies eros sit amet mi consectetur lacinia. Nam turpis tellus, rhoncus sed porttitor ut, rutrum eget enim. Nulla facilisi.\n\nIn maximus, quam ac tempus euismod, nunc quam sagittis dui, et mattis risus ante a ante. Aliquam ornare odio arcu, in tempus nulla suscipit ut. In laoreet convallis pretium. Etiam ac tortor id lectus dictum pharetra. Morbi imperdiet quam eu enim dignissim blandit. Morbi sed sollicitudin lorem, quis iaculis nulla. Mauris auctor, mauris suscipit bibendum semper, mi ligula commodo enim, a imperdiet erat mi in erat. Aenean vel elit mollis, ornare sem nec, vulputate lorem. Duis leo nulla, ornare ut enim eget, feugiat sagittis tortor.\n\nUt lobortis ligula interdum imperdiet lobortis. Maecenas vehicula rutrum magna, sit amet pretium quam malesuada id. Pellentesque id pharetra ipsum. Duis sit amet feugiat erat, et mollis ipsum. In vitae tempus nibh. Aliquam fringilla ligula neque. Suspendisse fringilla velit blandit rhoncus pulvinar. Cras scelerisque fermentum risus nec venenatis.\n\nQuisque dignissim lobortis dapibus. Vivamus at pretium dolor, non tempor leo. Nam dui mauris, commodo et fermentum et, vestibulum quis nibh. Sed nec luctus turpis. Integer dictum aliquet ex a semper. Integer eget erat sapien. Vestibulum et magna rhoncus, pharetra ante in, maximus erat. Maecenas nec orci mollis, ultrices est at, sodales sapien. Morbi malesuada eros sed lacus mattis varius. Mauris ipsum nisl, hendrerit sit amet arcu non, ultrices interdum mauris. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent non ex eu mauris vehicula aliquet et et purus. Curabitur tristique, neque quis vehicula tempus, elit elit imperdiet velit, in pretium quam nibh non diam.\n\nUt nec mi vitae sapien sagittis iaculis. Ut varius orci neque, nec pretium lacus vestibulum non. Nunc viverra diam sed est semper tristique. Vivamus nec aliquam urna. In sagittis tristique lectus, in posuere augue pellentesque in. Nulla cursus, tortor ut malesuada suscipit, elit justo laoreet dolor, vel dapibus neque lorem at purus. Vivamus quis consectetur dolor. Nunc vel ligula eros. Quisque vehicula sit amet enim nec tempus. Etiam at turpis non ligula dictum dictum. Nunc non mauris fermentum, varius massa id, facilisis tortor. Aenean pulvinar eu turpis quis pharetra. Morbi aliquam nisl at porttitor consequat. Nunc eu mauris malesuada, vulputate sapien et, ullamcorper tortor. Cras vulputate a urna quis imperdiet.\n\nSed eu magna at elit iaculis efficitur et ut felis. Maecenas id ultrices lacus. Curabitur rutrum pulvinar ipsum, vitae maximus eros laoreet ut. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Suspendisse id dui leo. Pellentesque posuere at ex at tincidunt. Proin lectus odio, luctus at mattis sit amet, iaculis sit amet nisi. Donec eleifend consectetur ligula at facilisis. Proin vitae neque diam. Aenean sollicitudin quis ipsum vitae facilisis. Donec id mauris elementum, cursus dui quis, rutrum ante. Sed nec laoreet lectus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Cras vestibulum, augue et hendrerit efficitur, ipsum est rhoncus neque, sit amet viverra diam elit id arcu.\n\nSed lacus leo, tristique tristique dui at, vestibulum congue urna. Suspendisse et ante risus. Curabitur condimentum congue lectus, eget tincidunt nisl consequat consequat. Phasellus ligula nibh, eleifend vel sapien nec, rhoncus fermentum orci. Donec auctor diam sed metus lobortis, eget ullamcorper ante maximus. Nullam nec elit vitae lorem hendrerit dapibus. Integer eleifend cursus est sit amet pellentesque. Aliquam neque felis, auctor id finibus non, dapibus a nisi. Etiam viverra, lorem ac varius molestie, tellus mi lobortis ipsum, in tristique dui sapien ac justo. Quisque dictum, augue non bibendum sagittis, elit ligula sodales ante, sed finibus urna sapien at odio. Aenean pretium augue velit. Sed interdum turpis non metus sollicitudin, ac egestas odio interdum.\n\nFusce vestibulum iaculis ornare. Maecenas at ante eu metus consectetur luctus pellentesque vitae justo. Proin sagittis nec magna non placerat. Sed est nisi, ullamcorper eu rutrum at, venenatis ac nisl. Ut placerat, massa vel accumsan pellentesque, nunc ex suscipit nibh, non finibus purus augue eget massa. Quisque vel posuere dui. In mollis euismod dapibus.\n\nCurabitur luctus convallis orci sed porta. Sed ornare nunc et congue aliquet. Etiam quis mattis justo. Donec enim mauris, blandit nec porttitor non, tincidunt a arcu. Donec sed tortor rhoncus, molestie felis venenatis, sagittis justo. In posuere imperdiet dapibus. Mauris sollicitudin, mi nec fermentum imperdiet, lacus ligula venenatis nunc, eget ullamcorper magna dolor condimentum libero. Sed odio mi, scelerisque eget placerat in, molestie non risus. Nam ac metus enim.\n\nCurabitur posuere libero tortor, a laoreet dui molestie vel. Vivamus ullamcorper accumsan ante, a varius purus bibendum id. Donec vel dolor nec turpis pretium auctor. Nunc quis volutpat sapien. Curabitur quam velit, gravida eget justo vitae, euismod imperdiet urna. Praesent ullamcorper dignissim feugiat. Praesent turpis enim, vulputate nec facilisis vitae, dignissim a dui.\n\nAenean ullamcorper nisi at pellentesque commodo. Nunc ullamcorper ultrices dui in hendrerit. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nulla est leo, mollis vitae imperdiet vitae, interdum id justo. Nullam placerat nisl sagittis gravida dignissim. Aenean felis lorem, feugiat ut nisi ullamcorper, tincidunt facilisis augue. Aenean convallis varius varius. Donec a risus vehicula, vulputate dui a, mattis sem. Phasellus vehicula feugiat augue. Sed tristique, ipsum nec mollis venenatis, est risus semper nisi, ac egestas ligula erat et lacus.\n\nPhasellus augue elit, pharetra eu pulvinar sed, gravida ut dui. Nam bibendum, turpis nec dapibus congue, magna orci luctus diam, a consequat justo sapien ut tortor. Quisque quis facilisis dui. Integer ullamcorper congue nulla ut scelerisque. Cras ac semper erat. Morbi cursus eros metus, in egestas quam ornare in. Nullam convallis scelerisque nisl, quis mollis arcu maximus non. Cras metus nibh, vulputate in turpis in, elementum dignissim urna. Etiam magna mauris, venenatis quis euismod in, mattis in nibh. Mauris justo lectus, vestibulum ac commodo vitae, interdum a quam. Nam feugiat luctus molestie. Etiam ligula est, tempor eu lacus vitae, convallis elementum tellus. Praesent faucibus tellus quis porttitor fringilla. Etiam pulvinar quam posuere, volutpat odio id, feugiat erat. Duis id magna libero.\n\nPraesent semper auctor bibendum. Suspendisse tincidunt bibendum nisi, a rhoncus dui. Integer blandit blandit nisl quis congue. Pellentesque eget erat id orci dapibus dignissim. Morbi iaculis eros felis, non pretium magna elementum vitae. Duis mattis elit et enim fringilla auctor. Nunc sed blandit justo, eu auctor dolor. Etiam sed suscipit ex.\n\nCurabitur suscipit vulputate sem, id hendrerit felis dictum tempus. Pellentesque ultrices sem felis. Integer imperdiet arcu nec cursus aliquam. Curabitur suscipit, nisl gravida condimentum fermentum, tellus nibh condimentum magna, in pretium sem ligula a ipsum. Mauris scelerisque sit amet dui eu lacinia. Curabitur quis aliquet arcu. Donec ut dolor felis. Aliquam erat volutpat. Maecenas accumsan sem non lorem efficitur venenatis. Duis eu ante eget sapien feugiat tincidunt. Mauris congue varius massa quis molestie. Vivamus pharetra dolor non pharetra tempus. Vestibulum quis auctor dui, vitae tristique libero.\n\nAenean dui nisl, lacinia sit amet massa id, fringilla convallis sapien. Curabitur neque ex, pulvinar et vestibulum ac, blandit sed ligula. Duis commodo eleifend massa. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vivamus vel diam quis augue maximus varius. Proin tristique ante eget pulvinar sollicitudin. Donec gravida congue hendrerit. Nam molestie varius dolor sit amet semper. Cras varius eleifend dignissim. Quisque et purus quis erat vulputate elementum eu ut dui. Curabitur at semper nulla. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Praesent ultrices molestie porta. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Praesent at orci tortor.\n\nProin fermentum, augue id gravida lobortis, massa orci vulputate augue, ut vestibulum nulla nunc vitae quam. Aliquam nulla neque, ornare vel quam a, scelerisque pulvinar magna. Sed mollis turpis ut magna congue semper. Aenean diam purus, dignissim sit amet lacus sed, malesuada fringilla ligula. Etiam sagittis non odio non finibus. Nunc rhoncus fermentum ligula, non varius purus tincidunt quis. Pellentesque cursus ipsum nunc, in semper nunc tempus sed. Maecenas et sapien ornare, viverra sem vel, posuere est. Nullam ultrices leo quis elit congue consequat.\n\nNulla facilisi. Aliquam erat volutpat. Suspendisse sed odio vehicula, dignissim magna eget, ullamcorper metus. Nam mauris lacus, tincidunt sed ex ut, fringilla pellentesque lectus. Nam posuere, elit nec commodo malesuada, dolor nisl maximus eros, et maximus nibh ligula ac tortor. Maecenas mattis bibendum tortor, in eleifend nulla imperdiet vel. Pellentesque viverra, dolor non mollis placerat, erat arcu interdum ipsum, nec euismod diam quam aliquet velit. Donec varius elementum velit, ac pharetra quam lacinia ut. Aenean porta ultrices arcu, at fringilla quam feugiat sit amet. Morbi porta, ante vitae sagittis ultrices, diam urna sodales magna, ut fermentum nisi nisl ut lorem. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.\n\nCurabitur rhoncus magna in egestas maximus. Nulla facilisi. Cras lobortis, orci id varius dignissim, nunc urna mattis turpis, nec ultrices purus massa ut augue. Proin eros justo, placerat at leo et, placerat sodales felis. Pellentesque cursus nibh at magna elementum laoreet. Nullam ut neque in ex bibendum consectetur. Maecenas at eros quis odio vulputate fringilla et a tellus. Vivamus ac dapibus lectus. Vestibulum fermentum elit lacus, a dictum velit placerat vitae. Maecenas enim ante, vestibulum vel venenatis non, efficitur in mauris.\n\nCras aliquam mattis interdum. Duis nec mauris ac est sollicitudin porttitor. Nam posuere faucibus ultrices. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Suspendisse in bibendum diam. Nullam eget neque vel nunc volutpat pharetra. Suspendisse ultricies quam eget orci ullamcorper bibendum. Vestibulum congue ex nec lorem vestibulum finibus. Nullam libero risus, sagittis ac dolor eget, imperdiet convallis libero. Aliquam id nulla quis urna aliquam dapibus vitae ac erat. Aenean a ligula ut lorem mollis placerat. Nullam mi felis, rhoncus in turpis consectetur, sagittis iaculis quam.\n\nNulla id vestibulum lectus, ac convallis tellus. Ut lorem justo, molestie a nibh non, pulvinar vehicula lectus. Quisque tempor quis neque eu sollicitudin. Duis commodo sapien et turpis scelerisque venenatis. Suspendisse sollicitudin ex ut turpis tincidunt, eu tempor libero vestibulum. Vivamus pellentesque sem et augue pulvinar tincidunt. Maecenas sit amet sapien elit. Integer ac feugiat lacus. Etiam feugiat felis sed tortor auctor, quis auctor nisl maximus. Ut tincidunt vulputate nulla at blandit. Interdum et malesuada fames ac ante ipsum primis in faucibus.\n\nIn hac habitasse platea dictumst. Fusce sit amet consequat nibh. Donec consequat tortor quis erat malesuada convallis. Ut sed volutpat nulla. Suspendisse blandit, quam vel semper imperdiet, neque leo aliquet orci, sit amet fermentum enim orci in neque. Suspendisse dignissim sem quis est rutrum molestie. Morbi nibh ipsum, convallis et quam sit amet, laoreet hendrerit nibh. Sed imperdiet, sapien eu tincidunt fermentum, nibh lorem vestibulum ex, ac porttitor nulla turpis sit amet diam. Curabitur vitae volutpat metus, et semper ante. Cras blandit, lorem vel sagittis mollis, tortor dui congue nunc, sed semper neque turpis a urna. Donec facilisis nisl quis nibh viverra iaculis aliquet at lacus. Vivamus tincidunt tristique urna, vel pulvinar elit. Donec vel libero ornare, auctor nisl sed, lacinia lorem. Aliquam erat volutpat.\n\nFusce et lectus sodales nibh tempus auctor sed a enim. Donec ac nisi tortor. Maecenas imperdiet elit finibus cursus egestas. Sed maximus, sem quis suscipit eleifend, felis quam rhoncus ligula, et fringilla mauris dui in est. Nulla venenatis libero sit amet varius porttitor. Nullam ut leo porta, bibendum dolor id, tincidunt lorem. Praesent sed massa dapibus, pellentesque eros vel, consequat lacus. Mauris nec molestie justo. Duis accumsan justo sed leo convallis iaculis. Ut consequat nunc sit amet egestas consectetur. Nunc pretium quam in nisl sodales, nec feugiat diam convallis. Sed a convallis felis. Vivamus fermentum convallis elit, non cursus ex vulputate non. Aliquam rutrum justo erat, eu semper lorem hendrerit non.\n\nFusce bibendum molestie imperdiet. Aliquam aliquam, nunc non fermentum gravida, erat dolor ullamcorper odio, sit amet tincidunt augue tellus ut eros. In porta orci felis, non condimentum mi pulvinar at. Cras volutpat sed purus sed pretium. Sed fringilla neque augue. Nulla orci neque, porta vel pretium eget, malesuada in tellus. Ut euismod nunc vel condimentum vulputate. Maecenas ullamcorper eget dui et maximus.\n\nIn eu elit nulla. Sed id cursus elit. Sed aliquet congue euismod. Etiam a pellentesque purus. Integer ornare lacus sit amet interdum iaculis. Phasellus et ante vitae nunc porta elementum ac nec lacus. Etiam sit amet metus sollicitudin, laoreet libero eget, tincidunt metus. Nulla facilisi. Nam auctor in nisi sed posuere. Curabitur at sapien maximus, lacinia nisl at, sodales nulla. Phasellus cursus sed quam in sollicitudin. Duis ac neque ac nisl luctus suscipit in a sem.\n\nPhasellus consequat lectus ut enim tempus, at maximus felis suscipit. Nunc sit amet accumsan massa. Donec hendrerit mauris id tincidunt ornare. Nulla facilisi. Maecenas odio elit, egestas sodales nisl vitae, congue tempus nulla. Suspendisse tempus volutpat diam, sit amet consectetur ex semper in. Quisque in erat nec nulla auctor tristique. Etiam facilisis tempus sapien, ullamcorper laoreet diam porta luctus. Praesent iaculis libero nisl, quis efficitur felis placerat eget. Vestibulum fermentum mattis convallis. Nunc rhoncus magna a ullamcorper condimentum.\n\nNullam pharetra, nisi egestas sagittis euismod, tellus nibh gravida tortor, nec laoreet sem purus eu ex. Nam consectetur placerat vulputate. Mauris non mauris faucibus, euismod metus lacinia, gravida augue. Nullam vulputate lectus sit amet diam aliquam laoreet. Nullam aliquet nisl enim, efficitur viverra lectus semper vel. Nullam dapibus est justo. Morbi id arcu nisi. Suspendisse purus mi, fermentum non ex ac, congue semper ligula. In hac habitasse platea dictumst. Donec auctor sollicitudin neque a condimentum. Praesent velit mi, sagittis sit amet orci vel, viverra tempor quam. Donec eget leo quam. Nunc at tincidunt quam. Phasellus ac dignissim ipsum.\n\nPraesent tincidunt nulla nec nulla imperdiet, eget pulvinar lacus venenatis. Sed placerat volutpat nibh non rutrum. Integer ac varius nulla. Vestibulum volutpat placerat finibus. Cras felis mauris, aliquet at lobortis nec, varius quis ligula. Nam pharetra diam et massa blandit, quis ornare quam venenatis. Aenean nec erat varius, dignissim orci ac, finibus erat. Mauris lacinia auctor sapien a egestas. Fusce vitae facilisis metus, sit amet malesuada nisl. Praesent ac molestie elit. Fusce euismod quis sem non finibus. Maecenas dolor erat, faucibus eu leo et, semper egestas libero. Maecenas urna ligula, pretium et aliquam at, gravida sit amet purus.\n\nMorbi eu nisi lorem. Cras malesuada, felis sed maximus eleifend, lacus sapien sodales nisl, quis vestibulum tellus enim sit amet urna. Curabitur purus tortor, efficitur ut feugiat at, malesuada at sem. Donec tincidunt ullamcorper elit. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Integer malesuada libero et efficitur pharetra. Aenean tincidunt, dolor eu commodo posuere, massa quam egestas mi, ac cursus ante risus quis nulla. Praesent vitae nibh ex. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Phasellus pharetra diam leo, non euismod nisl dictum a.\n\nMauris euismod, urna quis aliquam gravida, risus orci dictum velit, sed suscipit ex magna vel tellus. Pellentesque ex risus, eleifend scelerisque dui ut, facilisis dapibus nunc. Nam vitae tellus malesuada elit consequat faucibus quis quis mi. Nullam nec vulputate sapien. Quisque rhoncus fringilla molestie. Donec vehicula justo nec dui aliquam, vel mollis nunc feugiat. Nullam quis quam nec purus auctor sodales.\n\nAliquam risus nibh, porttitor at magna id, eleifend gravida elit. In venenatis turpis id ante viverra hendrerit. Etiam et nulla vitae nisl condimentum pellentesque. Phasellus rutrum finibus lorem. Aenean dui lorem, commodo a magna id, aliquet feugiat odio. Sed vel volutpat arcu. Pellentesque at neque quis eros posuere maximus. Suspendisse tincidunt nibh volutpat, ornare felis et, viverra ipsum. Curabitur non congue dolor, consequat maximus risus. Sed rhoncus, eros at ultricies dictum, magna tortor gravida tellus, non tincidunt felis velit sed urna. In hac habitasse platea dictumst. Fusce ut sem id enim aliquam congue. Nulla facilisi. Aenean rhoncus erat ut dolor efficitur, sit amet consequat felis bibendum. Vivamus mattis nisi felis, in ultrices enim accumsan vitae.\n\nMorbi lobortis consectetur vulputate. Donec vel rhoncus tortor. Suspendisse sed tincidunt metus. In metus odio, aliquam laoreet ultrices sit amet, mattis eget eros. Fusce sit amet porta dolor. Maecenas aliquam pharetra nunc vitae mollis. Praesent quis ligula id nisi posuere pellentesque a nec arcu. Nulla at iaculis velit. In mi odio, mattis sit amet consequat et, bibendum eget risus. Duis aliquam dui volutpat orci viverra, quis volutpat nibh sagittis. Quisque suscipit, est eu pulvinar tempor, nulla risus lacinia justo, ac aliquet libero orci vel urna. Etiam ac erat at odio viverra suscipit. Nam lobortis maximus elementum. Proin finibus sed purus sed ullamcorper. Suspendisse sed nunc gravida, sollicitudin sapien at, tincidunt arcu.\n\nCurabitur ultrices lectus est, a aliquet elit gravida nec. Donec eleifend eget orci nec accumsan. Vestibulum eu volutpat lectus, eget placerat nisl. Fusce feugiat varius sodales. Mauris erat urna, vestibulum vel congue at, volutpat a nisi. Nulla congue mi vitae orci elementum dictum. Aliquam nec iaculis ex. Praesent urna magna, consectetur a imperdiet sit amet, pulvinar non ipsum. Suspendisse ut felis sapien. Maecenas in est volutpat urna ornare tincidunt. Pellentesque sodales neque a est varius mollis. Vivamus a lectus eu enim rutrum tristique. Integer consectetur ligula eget rhoncus ullamcorper. Fusce quis elementum lorem.\n\nCurabitur ac molestie odio. Suspendisse potenti. Fusce at est a arcu accumsan vestibulum. Sed eu justo nisl. Duis tincidunt lorem eu luctus aliquet. Donec euismod ipsum sit amet leo iaculis, quis varius sem tincidunt. Nulla at sagittis enim. Etiam lobortis lectus non dui luctus varius. Nam in tempus sapien. Suspendisse consequat arcu tellus, vehicula semper nisi blandit sed. Cras tincidunt diam a eros convallis cursus. Donec massa nulla, congue ut urna eu, consectetur euismod ligula.\n\nEtiam at posuere purus, a dignissim est. Aliquam non velit et arcu ornare vulputate et vitae enim. Cras ultricies dictum semper. Aenean id magna aliquam, sagittis nisi sed, efficitur sem. Integer sodales mi et erat scelerisque, vel lobortis ante dapibus. In ut libero ac nisi finibus accumsan. Donec eu felis eget arcu faucibus imperdiet ac id ex. Vivamus ac rutrum mauris. Praesent sit amet lorem vestibulum tellus fringilla mollis.\n\nCurabitur blandit, erat id congue pellentesque, lacus metus vehicula diam, a ullamcorper dui leo laoreet sem. Integer at lobortis urna. Nullam interdum ultricies arcu, semper maximus metus aliquet non. Aenean dignissim sagittis convallis. Nulla elit nisl, ultricies in fringilla et, lacinia quis felis. Ut ac rutrum odio, ac mollis nisi. Suspendisse non ligula eu nisi molestie porttitor. Sed vel ornare neque. Vestibulum quis sem vehicula magna hendrerit dictum. Donec facilisis tellus enim, non varius justo malesuada rutrum. Sed at egestas nunc, dapibus fringilla ligula. Donec ac libero enim. Duis quis scelerisque massa. Nullam a diam at sapien porttitor accumsan quis quis nisl. In non vehicula turpis, convallis aliquet ligula. Aliquam velit elit, laoreet eu lectus eget, tincidunt laoreet dui.\n\nInteger sed consectetur nulla, mollis sollicitudin velit. Etiam tincidunt aliquam augue ut faucibus. Sed a dapibus elit, at dictum risus. Quisque scelerisque molestie sagittis. Suspendisse in orci ac nisl malesuada finibus. Mauris id arcu vitae leo ultrices eleifend. Interdum et malesuada fames ac ante ipsum primis in faucibus. Phasellus ac auctor lacus, eget aliquet dui. Proin blandit diam a ipsum vulputate, quis tincidunt purus pharetra. Phasellus sed risus tincidunt leo porta feugiat. Proin feugiat lectus eros, at convallis ipsum mattis in. Vivamus ac est eget lacus vulputate blandit id sed elit. Etiam consequat, tortor sit amet auctor facilisis, ex lacus dapibus leo, et elementum mauris nunc sodales lectus. Aliquam elit lorem, scelerisque scelerisque lorem sit amet, elementum laoreet lacus. Aliquam vel bibendum ligula, accumsan eleifend velit. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.\n\nInteger at ullamcorper lectus, quis luctus arcu. Phasellus bibendum ultricies odio pellentesque tempor. Sed lacinia a ante ut eleifend. Suspendisse tincidunt lacinia lorem quis scelerisque. Vivamus semper, ligula vel tincidunt ultricies, ligula urna bibendum dui, sit amet bibendum arcu nisl non metus. Aenean sed neque a mi interdum egestas in eu augue. Etiam nec quam accumsan, euismod elit vel, fermentum nisl. Proin massa massa, vehicula sed lacus semper, hendrerit egestas orci. Maecenas rutrum egestas purus, id pretium massa. Maecenas dictum gravida nisl, a pellentesque lectus rutrum quis. Aenean sodales rutrum ante, at suscipit risus tristique consequat. Vestibulum euismod sem mauris, ac scelerisque nisi posuere vel. Vestibulum bibendum augue ac purus posuere cursus. Nullam et diam at diam placerat accumsan. Nulla libero est, porta vel consequat id, volutpat et velit. Phasellus varius dui ac sem convallis eleifend.\n\nAenean euismod, sapien nec ultrices consequat, tellus dolor varius risus, vel ultrices lacus urna quis nisi. Sed accumsan porttitor pulvinar. Quisque pulvinar quis metus quis bibendum. Vestibulum varius augue sit amet tincidunt porttitor. Etiam egestas sodales ex, at fringilla mi maximus nec. Duis finibus vestibulum lorem, et cursus purus aliquam eu. Pellentesque sed dictum nibh. Curabitur tempor rutrum arcu, vitae sollicitudin elit rutrum ut. Donec non neque sit amet nisi efficitur sodales sit amet et justo. Maecenas sed bibendum ex. Suspendisse nec gravida nulla.\n\nNullam hendrerit pretium nunc tincidunt tempus. Proin scelerisque orci et ex ultrices, id ultricies eros consectetur. Mauris vel leo vel magna euismod vestibulum a et diam. Etiam est ipsum, varius eu elementum at, lacinia non ante. Donec imperdiet convallis enim, ac venenatis lorem ullamcorper sed. Integer a nisl eget lorem laoreet venenatis sed at ipsum. Mauris non consectetur arcu.\n\nSuspendisse ut nibh mi. Praesent tortor purus, condimentum eu malesuada pretium, finibus a orci. Suspendisse potenti. Morbi dapibus nibh sed elit aliquet, sit amet aliquet eros accumsan. Praesent gravida a velit ut volutpat. Nullam nec tincidunt metus. Vestibulum sodales ante pharetra efficitur pretium. Aliquam quis mauris accumsan purus sagittis venenatis. Cras blandit varius arcu, in ultrices odio volutpat quis. Curabitur a enim hendrerit, facilisis velit eu, semper nunc. Praesent eget commodo augue. Nunc nec hendrerit ante, id maximus leo. Integer euismod nunc sit amet urna faucibus vulputate. Morbi aliquam ex in tortor imperdiet tincidunt.\n\nSed tempor vehicula pharetra. Aliquam iaculis volutpat tincidunt. Pellentesque libero nisl, condimentum id ipsum vitae, sagittis aliquet ligula. Nunc in lacus blandit, convallis tortor non, mollis est. Duis lorem quam, pulvinar ac augue eget, suscipit efficitur dui. Mauris ut magna ac lorem venenatis pretium sit amet a tellus. Cras posuere mattis faucibus. Quisque ultrices aliquam dignissim. Sed euismod vulputate quam, in dapibus ante dictum vel. Sed consequat arcu orci, a dapibus nisi consectetur eget. Nunc pretium quis dolor vel viverra.\n\nNunc in est quam. Vestibulum ultrices vehicula sagittis. Nam iaculis erat sed quam ullamcorper semper. Suspendisse sed rhoncus nibh, a egestas quam. Vestibulum mauris orci, sagittis quis nibh eu, mollis vulputate mauris. Integer sit amet tincidunt lacus. Pellentesque faucibus urna quis justo vestibulum, a gravida lacus sollicitudin. Duis placerat nulla sem, ut cursus odio suscipit vitae.\n\nAenean dictum nunc vel tellus consequat finibus. Aenean ut mattis turpis, id sodales odio. Aenean vel magna vitae quam rutrum porta et eget ex. Quisque iaculis fermentum tortor, nec porttitor arcu gravida et. Phasellus est dolor, blandit consectetur tincidunt in, laoreet quis ligula. Ut vitae sem tortor. Nunc sed magna eleifend, suscipit dui eget, bibendum lacus. Aliquam sed ipsum molestie, lobortis augue ut, commodo nibh. Nulla augue diam, dictum ut ornare ac, lobortis in dui. Vestibulum hendrerit sem felis, quis aliquet tellus tristique a. Fusce sed ligula sed lectus bibendum dictum. Nunc elit magna, tempor nec augue porttitor, lacinia convallis augue. Nulla sem tortor, maximus a elit id, scelerisque lacinia urna. Maecenas accumsan nisl vel nisl auctor elementum. Nulla risus turpis, porttitor nec dui eu, tempus imperdiet ligula. Aenean non sem augue.\n\nNam tristique purus sapien, et mollis neque molestie vel. Suspendisse placerat nunc eu nunc venenatis congue. Donec sit amet blandit dolor, eget iaculis nunc. Sed luctus orci sed est congue, nec vehicula arcu tempus. Proin in tempor metus. Proin ornare lectus interdum gravida aliquet. Pellentesque auctor sem erat, vitae pretium lacus gravida at. Duis ornare, urna sit amet gravida sollicitudin, lacus nibh volutpat dui, sit amet sagittis eros felis ut lacus. Cras a ipsum quis sem porttitor porttitor.\n\nIn accumsan metus ut metus faucibus, ac ullamcorper quam imperdiet. Morbi vitae gravida turpis. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Etiam eu justo id dui imperdiet tristique. Ut arcu ante, gravida non rutrum facilisis, porta at mauris. Maecenas hendrerit consequat massa, at scelerisque elit bibendum eu. Donec molestie velit a volutpat convallis. Morbi posuere justo quis porttitor porttitor.\n\nDuis non viverra libero. Sed nec lobortis nunc. Ut eget orci sollicitudin, tempor est nec, feugiat ante. Praesent elementum nulla purus, at mollis nulla tincidunt vel. Ut sollicitudin quis ante et dictum. Sed et suscipit eros, sit amet scelerisque est. Fusce tincidunt auctor elementum. Aenean non sagittis felis. Donec eleifend eu mauris euismod pellentesque. Donec sed tellus commodo, laoreet metus sit amet, feugiat lectus. Nulla facilisi. Sed scelerisque, nisi ut consectetur efficitur, turpis ante fringilla ante, a aliquam nibh enim eget nunc.\n\nMaecenas posuere feugiat aliquam. Aenean iaculis quis tellus quis porttitor. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Aenean dignissim eleifend ligula, at pulvinar nulla aliquet sed. Cras quis massa in magna ultrices tristique ac ut ligula. Vivamus id blandit justo, non sagittis sapien. Mauris eget blandit dui, tristique fringilla diam. Donec eu orci leo.\n\nNam lobortis, purus ut consequat pellentesque, libero nibh pulvinar sem, in fringilla nulla turpis sit amet metus. Proin ac porttitor ligula. Aenean mollis finibus efficitur. Phasellus tellus quam, scelerisque at urna in, porttitor feugiat quam. Aliquam erat volutpat. Integer porta, risus ut porttitor faucibus, risus nunc sodales lectus, ac auctor sem justo eu mi. Integer id est elit. Etiam nisi tortor, ornare a justo at, facilisis feugiat augue. Etiam in nunc ultrices, faucibus massa a, porta purus. Nullam ut ornare turpis. Fusce molestie a eros ac consectetur. Suspendisse nec nulla velit. Proin cursus dui lorem, id auctor sem laoreet at. Aliquam erat volutpat. Donec posuere lacus commodo diam placerat iaculis. Mauris quis vehicula eros.\n\nMorbi ac lacus neque. Duis ut justo et eros laoreet elementum tempor eu urna. Cras volutpat ex tellus, id viverra nisl finibus eu. Fusce eget ligula sit amet dui hendrerit suscipit id lacinia lorem. Maecenas id metus quis metus dapibus tempor. In sit amet scelerisque ex, et viverra dolor. Phasellus suscipit non justo eu dapibus. Pellentesque sit amet gravida turpis. Sed mollis ligula eget pretium pretium. Duis faucibus dolor id convallis suscipit. Donec congue at ex vitae posuere. Nam vehicula ex eget neque mollis elementum. Ut semper accumsan mi sit amet mollis. Ut id odio vitae erat cursus imperdiet id eu eros. Fusce tellus risus, tempus eu fermentum vel, fringilla quis leo. Nulla ac quam leo.\n\nNunc vitae tortor sit amet nisi semper fringilla. Aliquam mattis enim vel elit ultrices ornare. Vivamus feugiat leo ullamcorper ullamcorper sollicitudin. Curabitur non nisi commodo, imperdiet lectus ac, consectetur urna. Suspendisse consectetur viverra dignissim. Aenean at sem dictum, varius tellus et, luctus libero. Morbi ante odio, euismod a velit ornare, consequat tristique tortor. Integer sit amet ullamcorper tortor. Praesent nulla augue, fermentum id eros ut, fermentum tincidunt nunc. Proin vel consectetur risus. Proin aliquet, ligula aliquam faucibus dictum, velit ipsum accumsan lacus, tincidunt luctus massa felis ornare lectus. Vestibulum eget massa felis. In hac habitasse platea dictumst.\n\nDonec quis luctus lacus. Etiam volutpat aliquet nunc, sit amet sodales dui. Ut blandit dapibus metus, et eleifend tellus vehicula vehicula. Aenean cursus augue id ante vulputate aliquet. Vestibulum vitae felis neque. Vivamus ut elementum dui, vel convallis diam. Sed quam dolor, porta ac eros eget, semper placerat odio. Morbi vehicula aliquam dignissim. Quisque pellentesque nibh erat, eu pulvinar nibh lobortis vel. Nulla vitae ligula dignissim, efficitur quam ut, mollis leo. Nullam sed cursus mi.\n\nIn egestas nisi lectus, eu faucibus lacus mollis ut. Quisque quis libero metus. Nam lobortis vitae magna iaculis scelerisque. Vivamus ultricies odio vel ligula luctus accumsan. Etiam vulputate justo et gravida elementum. Ut interdum lectus leo, sed dapibus dolor sagittis non. Curabitur ante dui, tempus nec massa non, luctus mattis metus. Etiam bibendum, ligula id pretium finibus, nunc nunc rhoncus dolor, a dignissim augue purus et lectus. Vivamus placerat risus eget tortor commodo tincidunt. Maecenas a dignissim lacus. Sed fringilla nunc vel neque consectetur, sit amet facilisis dui vestibulum. Aliquam erat volutpat. Cras dapibus cursus quam in lobortis. Duis sit amet ultricies arcu. Maecenas at ligula ullamcorper odio auctor ullamcorper. Sed ut erat nisi.\n\nNulla facilisi. Aenean nec magna accumsan, vulputate sapien a, condimentum dolor. Praesent convallis nunc a venenatis euismod. In id lectus in ipsum laoreet faucibus. Duis semper libero est, et volutpat erat cursus at. Proin rutrum accumsan varius. Integer scelerisque mauris et dolor venenatis, ac porta lectus volutpat. Fusce at sem ac risus suscipit aliquet sed sed sem. Etiam quis pretium mi. Proin et convallis lorem, vel dictum nibh. Aliquam erat volutpat. Donec dictum libero et eleifend ullamcorper.\n\nPhasellus massa est, aliquet vitae mollis ac, bibendum id felis. Quisque ipsum sapien, posuere sed elementum nec, ornare sit amet augue. Etiam magna risus, pellentesque ac ullamcorper eget, condimentum vitae ante. Sed placerat, lacus eu fringilla consequat, orci ligula egestas neque, quis laoreet nisl orci sed diam. Sed iaculis pulvinar nunc, viverra ultricies sem vehicula auctor. Fusce egestas sem sed ornare ullamcorper. Ut viverra purus metus, in convallis massa feugiat sed. Fusce ut massa pretium purus dapibus lobortis. Pellentesque accumsan libero a posuere iaculis. Pellentesque pharetra purus magna, in sagittis neque eleifend sit amet. Duis mollis nunc ac ante tincidunt, non egestas est blandit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec eget felis nunc.\n\nEtiam elit quam, fringilla vel viverra sit amet, semper at sapien. Nunc lacus nunc, cursus quis vulputate eget, sodales ac diam. Sed tincidunt mauris ut sapien tincidunt, in consequat orci gravida. Vestibulum arcu diam, convallis nec ipsum ornare, scelerisque porttitor nibh. Duis vel nulla tempor, ultrices sapien et, pulvinar odio. Vivamus pretium interdum libero, vitae lacinia ex elementum ac. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam sollicitudin elementum nisl, imperdiet scelerisque tortor pretium at. Curabitur mattis turpis in leo sagittis, at ultricies tortor auctor. Cras vel ornare ex, sed suscipit ligula. Sed nec elit ex. Suspendisse potenti. Aenean eget tortor accumsan, efficitur lorem ut, facilisis tellus.\n\nSed feugiat ipsum libero, in cursus nibh efficitur sed. Nulla eu augue ac metus dictum mollis. Morbi nec mi quam. Etiam hendrerit eget lacus ut gravida. Integer ultrices urna quis libero laoreet, ac blandit lorem facilisis. Aenean vehicula tempus mauris. Fusce facilisis odio in ex ultricies malesuada. Suspendisse eget feugiat mauris, sit amet semper dolor. Cras tortor nunc, efficitur eget tincidunt sodales, blandit et arcu. Maecenas pretium fringilla est, et ultricies risus. Mauris ac tristique elit. Donec pretium felis eu libero sagittis, volutpat fringilla ipsum mattis. Morbi urna justo, auctor et suscipit non, facilisis vitae justo. Fusce eget tincidunt purus.\n\nCras at pretium mi. Sed eu enim tincidunt, mollis diam sit amet, egestas justo. Ut maximus nunc non eleifend elementum. Ut gravida eget lorem et porta. Curabitur gravida placerat odio, non molestie massa faucibus sit amet. Quisque ac ante ut nisl sodales scelerisque. Donec at nibh vitae quam tincidunt sollicitudin sed id dui. Vivamus lacus odio, tincidunt vitae interdum non, vehicula et risus. Nullam porttitor sit amet nisi tempor dictum. Aliquam rutrum, lorem a rutrum viverra, sapien elit rhoncus purus, at facilisis velit nisl ac dolor. Maecenas id sapien magna. Phasellus eu ultricies metus, id sodales mi. Nam laoreet, nisi sed luctus auctor, metus nibh vulputate risus, ut auctor nisl metus vel ligula. Integer justo nisi, euismod id pharetra eget, consequat in risus. Maecenas a urna eget elit finibus suscipit. Donec a gravida enim, eget molestie metus.\n\nNulla hendrerit non ex vel lobortis. Pellentesque bibendum lectus quam, in finibus erat euismod eu. Sed accumsan posuere lectus et maximus. Pellentesque sodales luctus commodo. Aenean efficitur condimentum mi ac blandit. Phasellus malesuada, lorem vitae faucibus mattis, enim magna lacinia elit, sit amet vulputate nulla odio nec lacus. Mauris eget nunc convallis, viverra mauris vitae, sagittis dolor. Donec ante augue, molestie ac metus vitae, laoreet lacinia nisi. In vestibulum erat sit amet laoreet sagittis. Donec scelerisque condimentum imperdiet. Cras congue dolor ac volutpat vulputate. Donec id egestas lorem. Donec ultrices vitae eros placerat luctus. Nullam facilisis eget mauris in dignissim.\n\nAliquam erat volutpat. Aenean blandit fermentum sem a pellentesque. Vestibulum porta elementum accumsan. Phasellus ut sagittis justo, eu dictum purus. Nam venenatis lorem eu ipsum auctor vehicula nec at justo. Morbi venenatis sed metus eget egestas. Aliquam sed justo ultricies, facilisis tortor lacinia, facilisis sem.\n\nSed auctor iaculis urna. Mauris ut tellus finibus tortor vestibulum lobortis. In hac habitasse platea dictumst. Curabitur pulvinar augue sit amet eros semper, ut suscipit nisl viverra. Ut fringilla sit amet metus at mattis. Phasellus ultricies velit nec odio imperdiet tincidunt finibus id ipsum. Integer porttitor sem quis neque sollicitudin, a dictum dolor finibus. Curabitur et laoreet risus, non pulvinar nisi. Cras massa turpis, consectetur non enim sit amet, pulvinar placerat purus. Interdum et malesuada fames ac ante ipsum primis in faucibus. Mauris a pellentesque enim. Duis ullamcorper ut tortor sed tempor. Etiam scelerisque accumsan laoreet. Vestibulum vehicula, nisi quis blandit efficitur, lacus magna venenatis orci, in iaculis dui nunc nec velit. Maecenas nec lacus et ante tincidunt finibus et a erat.\n\nSuspendisse eros diam, euismod vitae sagittis sit amet, malesuada non sapien. Phasellus ultrices ullamcorper lacus, vitae sodales mauris semper eu. Phasellus laoreet nibh ante, eget consectetur diam vestibulum ac. Quisque et mattis nibh. Duis turpis arcu, euismod dictum efficitur nec, viverra vitae orci. Sed pulvinar lacinia nunc, id pulvinar diam interdum a. Pellentesque egestas hendrerit justo, vehicula vulputate leo aliquet eget. Praesent sit amet tincidunt ex. Integer blandit nibh id neque efficitur elementum.\n\nAliquam pharetra hendrerit lectus, at euismod tortor sagittis vel. Mauris tristique hendrerit felis, quis maximus mauris aliquet nec. Nullam mattis cursus bibendum. Nullam sagittis varius ex. In hac habitasse platea dictumst. Pellentesque faucibus tellus ac felis consectetur blandit. Praesent interdum, nisi eget vehicula accumsan, velit neque convallis neque, eget volutpat nisl risus id ex. Ut sed imperdiet justo. Donec tempor mattis volutpat. Quisque vel dui at dolor tincidunt bibendum. Donec suscipit, tortor et mattis venenatis, nisi nibh rhoncus nunc, semper consequat quam lectus ut eros. Vivamus sagittis augue sodales interdum viverra. Nunc tellus magna, vestibulum nec quam at, venenatis sagittis erat. Etiam vel ante leo. Cras quis arcu in lorem pharetra accumsan vitae vel enim. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.\n\nAliquam erat volutpat. Donec porta felis ipsum, eleifend consequat tellus maximus vel. Vestibulum iaculis lacus nec viverra finibus. Nunc efficitur nisi tortor, non efficitur mauris porta et. Sed ac sagittis urna, in interdum ante. Interdum et malesuada fames ac ante ipsum primis in faucibus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Morbi rutrum tempus consequat. Aenean tempus molestie vestibulum. Mauris non nisl massa. Vestibulum sollicitudin volutpat nunc, sit amet interdum eros tempus et. Aenean vel ante pellentesque, tincidunt risus nec, fringilla arcu. In sed purus eget magna tempus egestas.\n\nCras a commodo odio, a pharetra purus. Duis euismod, felis vitae tincidunt rhoncus, lacus arcu ornare est, sed hendrerit ligula nibh eu quam. Aliquam ornare imperdiet libero cursus suscipit. Sed cursus felis in efficitur molestie. Praesent finibus, ipsum vitae volutpat commodo, libero dui suscipit nisi, eu rutrum dui justo nec quam. Phasellus convallis fringilla neque, et interdum dolor finibus eget. Phasellus et elit eget lacus congue ultrices. Quisque ut arcu vitae risus molestie porttitor sit amet eget justo. Praesent eleifend leo ac lectus vestibulum, non feugiat orci ullamcorper. Sed sit amet accumsan lorem, ut laoreet ex. Nulla ac dapibus justo, at commodo dui. Proin sollicitudin, diam ac aliquam sollicitudin, tellus sem rhoncus dui, non suscipit justo leo vel arcu. Aliquam vehicula, neque eget finibus ultrices, odio dolor placerat orci, in tempor dui justo nec dolor. Quisque non mollis quam. Donec maximus ligula risus, semper fermentum ligula tincidunt quis. Integer ante dui, mollis non dictum et, aliquet efficitur erat.\n\nMorbi consectetur, urna non varius pharetra, augue sapien blandit urna, lobortis congue turpis orci non velit. Suspendisse rhoncus tortor ac purus placerat venenatis. Integer vehicula metus diam, sed porttitor est bibendum nec. Nam tristique orci risus, eu pharetra justo ornare sit amet. Nunc congue tristique neque. Suspendisse non velit luctus, bibendum mi sed, eleifend arcu. Mauris id interdum dui. Mauris viverra neque felis, sit amet hendrerit nunc fermentum in. Sed iaculis rhoncus porttitor. Sed imperdiet volutpat convallis. Vestibulum id ipsum tellus.\n\nMaecenas faucibus leo non sapien dapibus, vel congue elit porta. Cras egestas id dolor sed pulvinar. Curabitur tincidunt velit viverra tellus molestie, ac tincidunt nisi laoreet. Nam eget molestie libero. Etiam cursus suscipit mauris. Nullam vehicula justo at purus posuere aliquet. Duis in mauris maximus, hendrerit purus eget, eleifend nisi. Phasellus ut justo tempus, gravida sem sit amet, facilisis tellus. Pellentesque dolor neque, ornare nec felis non, tincidunt varius sem. Cras consectetur nunc eu risus ultricies, at bibendum libero consectetur. Ut eu fermentum nunc, et tempus augue. Praesent in lorem eu libero lobortis pulvinar id ac magna.\n\nPraesent egestas auctor mauris, in posuere ante cursus nec. Etiam turpis metus, porttitor eget ex vel, dignissim interdum arcu. Donec nec nisi quam. Nunc ac mollis justo, ut commodo lectus. Nunc pharetra gravida lectus. Maecenas consectetur condimentum nunc, in maximus ipsum vehicula id. In nec libero tortor. Duis viverra eros nunc, vitae faucibus augue faucibus a. Cras ornare aliquam mauris, non dignissim felis posuere ut. Mauris tempor vehicula rhoncus. Etiam eleifend euismod risus, non porttitor sapien viverra nec. Nunc a gravida tellus.\n\nDonec tempus rhoncus ipsum, et ullamcorper dui cursus id. Sed sed quam feugiat, sollicitudin eros eget, convallis eros. Aenean tincidunt rhoncus massa at mattis. Suspendisse a rutrum ante. Aliquam erat volutpat. Maecenas dictum rhoncus turpis, ac posuere arcu faucibus sit amet. Curabitur cursus euismod odio in hendrerit. Aenean blandit dignissim malesuada. Vivamus massa turpis, vehicula faucibus bibendum eu, porta non velit. Fusce sit amet metus vulputate, congue odio ac, blandit odio. Fusce sodales pharetra ipsum, vel commodo augue mollis in. Fusce ut ante maximus, blandit lectus sed, auctor erat. Donec eget nibh dui.\n\nDonec tempor placerat nisl et maximus. Mauris sit amet dolor cursus enim eleifend pellentesque. Cras finibus nulla in lectus ornare laoreet. In at nisi semper, rhoncus arcu vitae, maximus urna. Donec lectus erat, lobortis rutrum justo id, fermentum pellentesque ipsum. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Quisque condimentum fermentum metus ac sagittis. Nam faucibus venenatis augue, euismod rutrum augue sagittis ac. Duis eget est sit amet lacus consequat pharetra sollicitudin vel elit. Aliquam erat volutpat. Interdum et malesuada fames ac ante ipsum primis in faucibus.\n\nCras fringilla tellus sed augue dictum, a elementum dui vestibulum. Pellentesque sed eleifend erat. Nam sed maximus nunc. Phasellus lacus justo, maximus vitae eleifend at, lacinia et nibh. Suspendisse eros quam, scelerisque faucibus nulla eget, tincidunt posuere tellus. Mauris ullamcorper erat sapien, sit amet maximus neque aliquet tincidunt. Pellentesque cursus augue a ligula hendrerit rhoncus. In auctor nec metus quis suscipit. Cras dapibus elit ac lacus imperdiet pretium. Integer libero metus, vulputate in iaculis eget, viverra eu purus. Nullam ornare vehicula dui in faucibus. Etiam dapibus nisi urna, eget elementum nulla eleifend eget.\n\nProin tristique egestas tempus. Nulla feugiat felis at pretium efficitur. Quisque at massa sapien. Fusce vel dolor cursus, finibus tellus quis, dignissim ante. Curabitur quis orci eget quam tempus ultrices eu non sapien. Sed eu rutrum ligula, ac dictum arcu. Nam a quam massa. Quisque venenatis urna et metus ornare tempor in ornare massa.\n\nDonec congue ac neque quis dictum. Proin eget mauris finibus arcu euismod blandit eu a elit. Donec sed tempus ligula, non vehicula quam. Donec eu ipsum quis diam ultricies condimentum sed sit amet sem. Phasellus eleifend laoreet lorem et egestas. Mauris pharetra mi velit, sed bibendum erat luctus in. Nunc non vulputate turpis. Nulla facilisis dolor velit, id lobortis lectus hendrerit eget. Cras at dolor et enim vulputate tristique a sed urna. Duis sit amet nunc dapibus, sagittis dui non, rutrum ante. Morbi sed tincidunt eros. Duis at elementum sem.\n\nUt quis mollis orci. Fusce vulputate magna vitae dolor mattis pellentesque. Fusce volutpat erat at sapien congue, nec scelerisque massa vehicula. Maecenas lacinia ultricies massa. Maecenas in magna massa. Etiam rhoncus at dui quis malesuada. Nullam in magna ullamcorper, volutpat ex ut, ultrices arcu. Donec ac nisl nisi. Etiam tempor libero nec massa rutrum malesuada. Aliquam dictum erat sed ligula laoreet, vitae interdum elit sagittis. In hac habitasse platea dictumst. Donec sagittis dictum dui vitae vestibulum. Integer aliquet euismod ligula, in laoreet erat egestas eu. Vivamus dapibus dui nec purus bibendum sollicitudin.\n\nEtiam dictum tempor est. Sed ut mattis ipsum. Aliquam vitae justo non velit vestibulum vulputate. Duis posuere consequat augue a ultrices. Nam posuere, dolor non ultrices pellentesque, purus lacus gravida nulla, venenatis tincidunt lorem metus in enim. Suspendisse sit amet lacus sit amet odio sagittis interdum et ut arcu. Quisque non nulla urna. Ut dignissim leo id lorem hendrerit eleifend vel sagittis massa. Donec fringilla aliquam tellus, vitae mollis nibh ornare nec. Integer id faucibus ex. Praesent lacinia aliquet quam.\n\nDonec placerat lectus sit amet libero dictum dictum. Mauris tristique sem at lorem dapibus, a varius odio sodales. Cras gravida posuere elit id feugiat. Duis porttitor neque at tellus accumsan ornare. Nulla tincidunt vestibulum tellus, vel dignissim eros ultricies vitae. Vestibulum libero sapien, maximus id enim ac, blandit tincidunt lectus. Praesent ac luctus odio. Curabitur et nunc a velit facilisis posuere. Vestibulum suscipit iaculis libero, vel lobortis odio iaculis sit amet. Pellentesque nibh libero, placerat id tempor id, viverra a dolor. Fusce ornare ante eros. Proin ut blandit velit, eu porta nunc. Morbi tincidunt elit porttitor ex elementum imperdiet. Nullam at ligula mi. Proin dolor urna, volutpat vel urna vel, fringilla elementum mauris. Etiam ac tortor massa.\n\nInteger gravida scelerisque porttitor. Fusce elementum, lacus eget commodo semper, erat quam pharetra ipsum, iaculis tincidunt erat sem ut leo. Vestibulum sodales velit in sapien ultricies fringilla. Aenean rhoncus justo sed nibh fermentum pretium. Nunc fringilla, tellus a bibendum suscipit, nulla nunc condimentum lacus, eu pulvinar arcu tellus vel ligula. Quisque malesuada interdum lorem, vitae finibus nunc auctor eu. Quisque non volutpat tellus, vel pharetra sem. Fusce sed tempor urna. Nunc a justo vehicula, porta mauris euismod, mollis neque. Phasellus a ligula tellus. Mauris rhoncus, lacus sit amet commodo ullamcorper, ligula elit lacinia magna, sed interdum neque lacus eu eros. Suspendisse convallis gravida nunc, ut faucibus massa faucibus eu. Mauris ornare nisi et mi consectetur mattis. Vestibulum blandit, orci ut consectetur lacinia, magna velit molestie dui, nec ultricies mauris velit non orci.\n\nIn pharetra id metus non tempor. Sed interdum nunc et dignissim vehicula. Etiam ut eros erat. Fusce sit amet nibh nec arcu mattis iaculis. Vivamus lacinia mi ut enim laoreet pulvinar. Etiam fringilla ipsum ut elit condimentum, id tempus leo bibendum. Aliquam porta quis felis ac imperdiet. Ut vitae viverra eros, ac sagittis est. Curabitur nec augue libero. Vivamus feugiat, odio et lacinia tempor, metus orci ornare sapien, in faucibus quam nisl sit amet nunc. Donec dapibus interdum ex.\n\nUt feugiat facilisis mauris nec iaculis. Maecenas eu orci ac purus tincidunt auctor a eget diam. Nullam et leo urna. Mauris ut facilisis nisl. Nam lacinia imperdiet diam vitae dignissim. Ut placerat efficitur massa, ut tempus urna vulputate a. Nullam hendrerit libero viverra quam pharetra, bibendum molestie justo condimentum.\n\nAliquam non luctus sapien, ultrices placerat nunc. Nullam bibendum porta efficitur. Nulla gravida et mauris id vehicula. Nunc turpis diam, viverra a orci eget, porta aliquam enim. Curabitur mattis ultricies ante volutpat suscipit. Quisque sodales non urna id dignissim. Sed sit amet volutpat nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Cras in aliquet augue. Cras consectetur erat ante, in viverra arcu imperdiet sed.\n\nIn auctor sapien at laoreet porttitor. Curabitur nec nisl finibus, congue velit et, rutrum nibh. Morbi maximus purus semper scelerisque scelerisque. Vivamus est neque, fringilla eget justo ac, condimentum posuere arcu. Vivamus a placerat erat, vel eleifend odio. Duis ante elit, posuere ac nibh et, hendrerit posuere eros. In hac habitasse platea dictumst. Nam vehicula eu arcu non sagittis. Nulla libero mi, egestas sed nisl id, mollis aliquam felis.\n\nMauris sed lobortis tellus. Sed eu orci enim. Proin quis erat at libero scelerisque blandit a ac ante. Cras risus libero, rutrum quis dignissim ut, facilisis vitae massa. In quis blandit tortor. Vestibulum diam mi, fermentum eget convallis quis, venenatis vitae arcu. Maecenas placerat erat at hendrerit tempus. Pellentesque commodo convallis accumsan. Cras nisi orci, iaculis at malesuada vel, volutpat eget justo. Aliquam in sodales est. Nulla non justo eu mauris tristique malesuada. Aenean ac finibus eros. Nam tempus libero a dapibus efficitur. Sed hendrerit sapien accumsan augue dignissim, eu euismod ex convallis. Praesent tempor tortor nisi, ac ultricies ipsum imperdiet vel.\n\nMaecenas sit amet orci ante. Aenean porttitor ultricies enim. Curabitur finibus fringilla lacus. Fusce porttitor, turpis eget condimentum mattis, mauris diam faucibus ligula, sed porta ligula nulla a quam. Fusce massa elit, porttitor vel enim id, venenatis vehicula orci. Aliquam sagittis eros eu placerat vestibulum. Donec aliquet dui dapibus neque mattis, vel malesuada lacus vulputate. Morbi vel metus eu ante imperdiet faucibus ut ac felis. Sed eu nisl non sapien gravida fringilla. Nunc maximus hendrerit risus, a tincidunt sapien. Ut aliquam, ipsum gravida ullamcorper dictum, urna dolor fringilla velit, id gravida ligula dolor vitae nisl. Mauris posuere metus eros, eu condimentum velit malesuada nec. Vestibulum facilisis ligula a bibendum venenatis.\n\nEtiam est orci, rutrum quis orci eget, tincidunt ultricies eros. Interdum et malesuada fames ac ante ipsum primis in faucibus. Etiam suscipit arcu at euismod imperdiet. Ut sem nibh, feugiat non consectetur eget, elementum condimentum velit. Mauris sed sapien id tortor mattis pretium. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; In vel felis quis eros consequat porta eget id eros. Nam laoreet nisi tortor, vel euismod magna varius eu.\n\nEtiam semper, nibh nec malesuada pellentesque, neque ante mollis enim, sed faucibus velit felis id nisi. Fusce ac urna vitae lorem semper molestie sed eget est. In varius commodo tellus, a porttitor magna ornare vel. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean vel volutpat arcu. Aliquam sit amet varius mi, nec imperdiet velit. Cras efficitur ipsum sit amet tellus venenatis, in maximus lacus pulvinar.\n\nAenean venenatis malesuada lacus. Maecenas pulvinar dapibus est, sed elementum massa. Nullam tristique urna vel eros luctus suscipit vitae et turpis. Nam ornare aliquam lorem vel semper. Integer commodo sollicitudin consectetur. Donec id orci mattis, condimentum tortor et, ultricies sapien. Suspendisse pulvinar, est eget pulvinar sodales, lacus eros tristique nisl, vitae dapibus dolor magna id neque. Pellentesque viverra urna lectus, sed dapibus ex posuere at. Vivamus luctus neque eget fringilla condimentum. Nullam ut tortor quis ante vestibulum sollicitudin. Curabitur vitae nibh laoreet sem porttitor porttitor vitae quis justo.\n\nCurabitur non lacus suscipit, volutpat nibh id, tempus purus. Suspendisse sit amet semper ex. Sed aliquam felis et tristique suscipit. Ut lacus eros, tristique in vulputate sit amet, pulvinar in purus. Donec sodales semper metus et posuere. Integer volutpat, lorem ut sagittis eleifend, purus elit molestie justo, eu luctus velit odio eget eros. Nulla elementum in augue non porta. Fusce condimentum egestas tellus, ut eleifend tortor porta eget. In hendrerit mattis turpis id posuere.\n\nNunc auctor at risus at dapibus. Proin venenatis massa nec ultricies sagittis. Proin quis rhoncus tortor, sed molestie tellus. Nullam posuere ornare nisi in pharetra. Aenean accumsan venenatis porta. In hac habitasse platea dictumst. Curabitur felis dolor, aliquet eget ipsum laoreet, eleifend tristique nibh. Etiam vitae consectetur sapien, ut gravida libero. Sed lobortis purus sit amet velit pulvinar, et iaculis lectus ullamcorper.\n\nNullam eu lectus mattis, tempus nunc eget, volutpat orci. Cras gravida blandit nisl, a fringilla libero scelerisque ut. Phasellus ut velit non sapien rhoncus tempus at id ligula. Proin id lacus eu arcu pulvinar scelerisque eget eget enim. Donec tristique ac diam at consectetur. Maecenas condimentum orci sed iaculis viverra. Aliquam consequat consectetur neque, ac egestas nisi. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed pellentesque posuere volutpat. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Praesent pulvinar at risus et euismod. Nulla pretium iaculis semper.\n\nNullam posuere tempus lectus ut pretium. Sed tempor lorem vel lacus maximus, eu vulputate sem pretium. Phasellus quis aliquet nunc, sed rutrum arcu. Aliquam in velit pretium, egestas mi consequat, venenatis erat. Vestibulum enim lorem, molestie convallis nisi quis, tincidunt tempor orci. Aliquam ornare placerat convallis. Integer blandit sollicitudin libero non imperdiet. Suspendisse fringilla diam ut nulla maximus rhoncus. Praesent consequat lectus a ornare pharetra. Ut et magna id ipsum semper suscipit et eu nunc. Donec venenatis quam nec dui volutpat aliquam. Nulla ut tincidunt neque.\n\nSed at risus fringilla, molestie tellus non, congue erat. Nunc nibh metus, suscipit vel magna sit amet, auctor dignissim elit. Proin nisi sem, tincidunt non lacus eget, dignissim porta lorem. Nunc non dui ultrices, tempus nulla ac, dictum erat. Sed condimentum, neque sit amet fringilla efficitur, velit nulla sagittis erat, quis dapibus sem purus in ipsum. Fusce semper ligula lacus, sed molestie lectus porttitor id. Quisque varius eget risus ut malesuada. Ut eu tincidunt nunc, non venenatis arcu. Duis elementum, diam sit amet lacinia commodo, risus purus euismod massa, non lacinia elit augue in erat. Donec ac condimentum eros. Phasellus et diam mi. Vivamus et tortor luctus, accumsan arcu id, molestie massa. Donec lacinia dolor quis nunc hendrerit aliquet. Nunc ultricies porta felis vel mattis. Phasellus eu hendrerit ligula, et fringilla orci. Nunc sed pulvinar metus, eget bibendum quam.\n\nProin purus arcu, viverra vel porttitor quis, pellentesque at augue. Nulla et eros elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse interdum leo eu dolor viverra, eu aliquet metus auctor. Sed libero eros, egestas ut justo eget, blandit sodales magna. Nulla et eleifend nulla. Mauris massa ligula, varius faucibus efficitur ut, laoreet et orci. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris non egestas magna. Donec massa leo, maximus eget pharetra et, consequat nec dolor. Etiam aliquam, ligula non dictum sollicitudin, enim arcu rutrum orci, tincidunt maximus velit erat et massa.\n\nSed tincidunt ante sit amet enim accumsan, eu euismod lectus facilisis. Morbi et neque eleifend, malesuada ante eget, pellentesque nulla. Sed placerat, sem sed lobortis consequat, elit felis rutrum ex, in venenatis leo sapien in ex. Pellentesque at consectetur risus, id sodales neque. Etiam eget velit lacus. Suspendisse ut urna non odio sagittis faucibus non id eros. Aenean nec mollis lacus. Proin mauris orci, dictum sit amet tristique sit amet, condimentum consectetur arcu. Vestibulum vehicula mi turpis, eu molestie metus viverra malesuada. Aenean vel tortor orci.\n\nVivamus at eros vitae nulla sollicitudin laoreet quis sit amet mi. Suspendisse ut hendrerit massa. Fusce mi enim, sagittis a hendrerit eu, malesuada sed erat. Praesent finibus vestibulum sem, maximus rutrum ipsum tincidunt eu. Suspendisse nec mi diam. Quisque fermentum quam iaculis, ornare eros in, pellentesque lectus. Vivamus vitae justo porttitor, vulputate erat quis, dapibus est. Vivamus accumsan eros massa, eu auctor dui scelerisque eu.\n\nInteger in risus eu dui molestie posuere. Aenean fermentum sollicitudin varius. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Mauris ac elementum nulla. Nunc non suscipit libero, quis tristique enim. Mauris auctor, ante quis viverra molestie, velit eros hendrerit arcu, sit amet finibus purus mi at augue. Vestibulum feugiat turpis sit amet arcu eleifend sollicitudin. Aenean sed sapien ac ante imperdiet iaculis viverra vitae tellus.\n\nNam volutpat, odio et mattis consequat, est leo mollis erat, tincidunt ultricies ex odio in sapien. Aenean vulputate efficitur dolor, vitae gravida est suscipit non. Curabitur et lobortis libero. In hac habitasse platea dictumst. Vestibulum eget mollis tortor, a volutpat nisl. Duis et arcu massa. Nunc porttitor congue pharetra. Praesent lobortis sapien a tellus rhoncus lobortis. Etiam at libero congue, egestas lectus accumsan, aliquam justo. Quisque euismod lacinia est sed consequat. Phasellus eget quam ornare, eleifend sem nec, molestie magna. In hac habitasse platea dictumst. Quisque porttitor, nisl at finibus scelerisque, dolor enim volutpat ex, ac vestibulum quam felis id libero.\n\nAenean mattis cursus massa, ut pretium felis consectetur at. Donec velit ipsum, tristique ac lacus et, pellentesque imperdiet ex. Cras a mauris risus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Praesent facilisis arcu arcu, ac egestas nisi pellentesque vitae. In at pretium sem. Mauris ligula dui, lacinia vitae ligula vel, rutrum fringilla elit. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.\n\nDonec blandit sodales pharetra. Cras diam nisl, volutpat in faucibus nec, aliquam eget mauris. Nullam vel diam dictum, faucibus nulla vitae, egestas metus. Morbi quis quam ipsum. Quisque a lectus vitae enim vulputate placerat. Proin tincidunt condimentum vestibulum. Vivamus mattis tellus quis nulla laoreet, vel rhoncus lacus luctus. Suspendisse vitae hendrerit justo. Quisque consequat tempor ipsum, vel cursus massa feugiat id. Vivamus ac viverra purus. Curabitur consectetur ultricies mi sed pulvinar. Sed a imperdiet arcu.\n"
  },
  {
    "path": "public/examples/v160/event-handling-like-click/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <title>JsFrame.js example - Handling of content click events, etc.</title>\n    <link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet'>\n    <link rel=\"stylesheet\" href=\"../../../index.css\">\n\n</head>\n<body>\n<h2><a href=\"../../../index.html\">JSFrame.js examples</a><span>Handling of content click events, etc.</span>\n</h2>\n<div style=\"font-size: 16px; color: white; position: fixed; right: 20px; bottom: 10px\">\n    <a href=\"https://github.com/riversun/JSFrame.js/tree/master/public/examples/v160/event-handling-like-click\"\n       title=\"View source for this page on GitHub\" target=\"_blank\">View source on GitHub</a>\n</div>\n<script src=\"../../../jsframe.js\"></script>\n\n<script>\n  function start() {\n\n    const jsFrame = new JSFrame();\n    const frames = [];\n\n    const innerHTML = `<div style=\"padding:10px;font-size:20px;\"><h3>My contents</h3>\n    <p>This is my contents</p>\n    <button id=\"my_button_01\" type=\"button\" class=\"btn-primary\">Button 1</button>\n    <button id=\"my_button_02\" type=\"button\" class=\"btn-secondary\">Button 2</button>\n    <button id=\"my_button_03\" type=\"button\" class=\"btn-success\">Button 3</button></div>`;\n\n\n    for (let i = 0; i < 2; i++) {\n\n      const frame = jsFrame.create({\n        appearanceName: 'yosemite',\n        name: `MyWindow${i}`,\n        title: `Window${i}`,\n        left: 20 + 440 * i, top: 80, width: 400, height: 300,\n        minWidth: 160, minHeight: 100,\n        style: {\n          backgroundColor: 'rgba(255,255,255,0.9)',\n          overflow: 'auto'\n        },\n        html: innerHTML\n      });\n\n      //set event listener\n      frame.on('minimizeButton', 'click', (_frame, evt) => {\n        const size = _frame.getSize();\n        _frame.setSize(size.width - 20, size.height - 20);\n        jsFrame.showToast({\n          html: `Minimize button clicked`,\n          align: 'top'\n        });\n      });\n\n      frame.on('zoomButton', 'click', (_frame, evt) => {\n        const size = _frame.getSize();\n        _frame.setSize(size.width + 20, size.height + 20);\n        jsFrame.showToast({\n          html: `Zoom button clicked`,\n          align: 'top'\n        });\n      });\n\n      frame.on('closeButton', 'click', (_frame, evt) => {\n        _frame.closeFrame();\n        jsFrame.showToast({\n          html: `Close button clicked`,\n          align: 'top'\n        });\n      });\n\n      const htmlButtonListener = (_frame, evt) => {\n        const jsFrame = new JSFrame();\n        jsFrame.showToast({\n          html: `Clicked ${_frame.getName()}'s ${evt.target.id}`,\n          align: 'top'\n        });\n      };\n\n      //You can get DOM element in the HTML by selector format\n      frame.on('#my_button_01', 'click', htmlButtonListener);\n      frame.on('#my_button_02', 'click', htmlButtonListener);\n      frame.on('#my_button_03', 'click', htmlButtonListener);\n      frame.show();\n      frames.push(frame);\n    }\n\n    frames[0].requestFocus();\n  }\n\n  start();\n</script>\n</body>\n</html>\n"
  },
  {
    "path": "public/examples/v160/event-handling-pos-size/index.html",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n    <title>JsFrame.js example - Handling move and resize events</title>\n    <meta charset=\"utf-8\">\n    <link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet'>\n    <link rel=\"stylesheet\" href=\"../../../index.css\">\n</head>\n<body>\n<h2><a href=\"../../../index.html\">JSFrame.js examples</a><span>Handling move and resize events</span>\n</h2>\n<div id=\"message\"\n     style=\"z-index: 1000;pointer-events: none;font-size:16px;color:#666666;position: fixed; left: 10px; top: 60px;width:700px;padding:10px;border: 1px solid #666666;border-radius:10px\">\n    Please move and resize window.\n</div>\n<div style=\"font-size: 16px; color: white; position: fixed; right: 20px; bottom: 10px;\">\n\n    <a href=\"https://github.com/riversun/JSFrame.js/tree/master/public/examples/v160/event-handling-pos-size\" title=\"View source for this page on GitHub\" target=\"_blank\">View source on GitHub</a>\n</div>\n<script src=\"../../../jsframe.js\"></script>\n<script>\n  function start() {\n    const jsFrame = new JSFrame();\n    // Create window\n    const frame = jsFrame.create({\n      title: 'Window',\n      name: 'Window-01',\n      left: 10, top: 120, width: 320, height: 220,\n      movable: true,// Enable to be moved  by mouse\n      resizable: true,// Enable to be resized by mouse\n      html: '<div id=\"message\" style=\"padding:10px;font-size:20px;color:darkgray;\">Please move me!<br>Resize me!</div>'\n    });\n\n    const eventListener = (data) => {\n      const box = document.querySelector('#message');\n\n      const frame = data.target;\n      const eventType = data.eventType;\n      const size = data.size;\n      const position = data.pos;\n      const windowName = frame.getName();\n\n      box.innerHTML = `\nwindowName:<b>${windowName}</b>\neventType:<b>${eventType}</b>\nanchor:<b>${position.anchor}</b>\nposition:<b>(${position.x},${position.y})</b>\nsize=<b>(${size.width}x${size.height})</b>`;\n    };\n\n    // register resize event\n    frame.on('frame', 'resize', eventListener);\n\n    // register move event\n    frame.on('frame', 'move', eventListener);\n\n    // Multiple listeners can be registered for a single eventType\n    frame.on('frame', 'move', (data) => {\n      console.log(`pos=${JSON.stringify(data.pos)} size=${JSON.stringify(data.size)}`)\n    });\n\n    frame.show();\n  }\n\n  start();\n</script>\n</body>\n</html>\n"
  },
  {
    "path": "public/examples/v160/fine-tune-resize-area/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <title>JsFrame.js example - Changing the resize area to adjust sensitivity by mouse or touch</title>\n    <link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet'>\n    <link rel=\"stylesheet\" href=\"../../../index.css\">\n</head>\n<body>\n<h2><a href=\"../../../index.html\">JSFrame.js examples</a><span>Changing the resize area to adjust sensitivity by mouse or touch</span>\n</h2>\n<div style=\"font-size: 16px; color: white; position: fixed; right: 20px; bottom: 10px\">\n    <a href=\"https://github.com/riversun/JSFrame.js/tree/master/public/examples/v160/fine-tune-resize-area\" title=\"View source for this page on GitHub\" target=\"_blank\">View source on GitHub</a>\n</div>\n<script src=\"../../../jsframe.js\"></script>\n<script>\n  function start() {\n    const jsFrame = new JSFrame();\n\n    {\n      //You can adjust the sensitivity when resizing with the mouse or touch.\n      const appearance1 = jsFrame.createFrameAppearance();\n\n      //Make the resize area visible for fine tuning\n      appearance1.resizeAreaVisible = true;\n\n      //The offset distance between the resize area and the window border.\n      appearance1.resizeAreaOffset = -10;// default is -10\n\n      //Thickness of the horizontal resizing area\n      appearance1.resizeAreaWidth = 20;// default is 20\n\n      //Thickness of the vertical resize area\n      appearance1.resizeAreaHeight = 20;// default is 20\n\n      const frame1 = jsFrame.create({\n        title: 'Window1',\n        name: 'Window-01',\n        left: 20, top: 60, width: 320, height: 220,\n        movable: true,\n        resizable: true,\n        html: '<div id=\"message\" style=\"padding:10px;font-size:16px;color:darkgray;\">You can adjust the sensitivity (fine-tune the size of the resizing area) when resizing with the mouse or touch.</div>',\n        appearance: appearance1\n      }).show();\n    }\n\n    {\n      const appearance2 = jsFrame.createFrameAppearance();\n      appearance2.resizeAreaVisible = true;\n      appearance2.resizeAreaOffset = 0;\n      appearance2.resizeAreaWidth = 20;\n      appearance2.resizeAreaHeight = 20;\n      const frame2 = jsFrame.create({\n        title: 'Window2',\n        name: 'Window-02',\n        left: 420, top: 60, width: 320, height: 220,\n        movable: true,\n        resizable: true,\n        html: '<div id=\"message\" style=\"padding:10px;font-size:20px;color:darkgray;\">You can adjust the sensitivity (fine-tune the size of the resizing area) when resizing with the mouse or touch.</div>',\n        appearance: appearance2\n      }).show();\n    }\n\n    {\n      const appearance3 = jsFrame.createFrameAppearance();\n      appearance3.resizeAreaVisible = true;\n      appearance3.resizeAreaOffset = 10;\n      appearance3.resizeAreaWidth = 40;\n      appearance3.resizeAreaHeight = 40;\n      const frame3 = jsFrame.create({\n        title: 'Window3',\n        name: 'Window-04',\n        left: 20, top: 320, width: 320, height: 220,\n        movable: true,\n        resizable: true,\n        html: '<div id=\"message\" style=\"padding:10px;font-size:20px;color:darkgray;\">You can adjust the sensitivity (fine-tune the size of the resizing area) when resizing with the mouse or touch.</div>',\n        appearance: appearance3\n      }).show();\n    }\n\n    {\n      const appearance4 = jsFrame.createFrameAppearance();\n      appearance4.resizeAreaVisible = false;\n      appearance4.resizeAreaOffset = -20;\n      appearance4.resizeAreaWidth = 40;\n      appearance4.resizeAreaHeight = 40;\n      const frame2 = jsFrame.create({\n        title: 'Window4',\n        name: 'Window-04',\n        left: 420, top: 320, width: 320, height: 220,\n        movable: true,\n        resizable: true,\n        html: '<div id=\"message\" style=\"padding:10px;font-size:20px;color:darkgray;\">You can adjust the sensitivity (fine-tune the size of the resizing area) when resizing with the mouse or touch.</div>',\n        appearance: appearance4\n      }).show();\n    }\n  }\n\n  start();\n</script>\n</body>\n</html>\n"
  },
  {
    "path": "public/examples/v160/focus/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <title>JsFrame.js example - Focus and blur(lost focus) event handling</title>\n    <meta charset=\"utf-8\">\n    <link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet'>\n    <link rel=\"stylesheet\" href=\"../../../index.css\">\n</head>\n<body>\n<h2><a href=\"../../../index.html\">JSFrame.js examples</a><span>Focus and blur(lost focus) event handling</span>\n</h2>\n<div id=\"message\"\n     style=\"z-index: 1000;pointer-events: none;font-size:16px;color:#666666;position: fixed; left: 10px; top: 60px;width:640px;padding:10px;border: 1px solid #666666;border-radius:10px\">\n    Click buttons below to focus on window.\n</div>\n\n<div style=\"margin-top:60px\">\n    <button id=\"btnFocusW0\" class=\"btn-primary\">Focus on Window-0</button>\n    <button id=\"btnFocusW1\" class=\"btn-primary\">Focus on Window-1</button>\n    <button id=\"btnFocusW2\" class=\"btn-primary\">Focus on Window-2</button>\n</div>\n<div style=\"font-size: 16px; color: white; position: fixed; right: 20px; bottom: 10px\">\n    <a href=\"https://github.com/riversun/JSFrame.js/tree/master/public/examples/v160/focus\"\n       title=\"View source for this page on GitHub\" target=\"_blank\">View source on GitHub</a>\n</div>\n<script src=\"../../../jsframe.js\"></script>\n<script>\n  function start() {\n    const jsFrame = new JSFrame();\n\n    for (let idx = 0; idx < 3; idx += 1) {\n      const frame = jsFrame.create({\n        appearanceName: 'yosemite',\n        title: `Window-${idx}`,\n        name: `window${idx}`,\n        left: 20 + idx * 280, top: 200, width: 260, height: 160,\n        movable: true,\n        resizable: true,\n        html: `<div id=\"my_element\" style=\"padding:10px;font-size:20px;color:darkgray;\">Contents ${idx}</div>`\n      });\n\n      // Register 'focus'(focus in) event\n      frame.on('frame', 'focus', (data) => {\n        const frame = data.target;\n        const eventType = data.eventType;\n        const windowName = frame.getName();\n        const box = document.querySelector('#message');\n        box.innerHTML = `windowName:<b>${windowName}</b> eventType:<b>${eventType}</b>`;\n      });\n\n      frame.on('frame', 'focus', (data) => {\n        const frame = data.target;\n        frame.setHTML(`<div id=\"my_element\" style=\"padding:10px;font-size:20px;color:dodgerblue;\">Focused!</div>`);\n        console.log(`${frame.getName()} got focused.`);\n      });\n\n      // Register 'blur'(focus out) event\n      frame.on('frame', 'blur', (data) => {\n        const frame = data.target;\n        frame.setHTML(`<div id=\"my_element\" style=\"padding:10px;font-size:20px;color:palevioletred;\">Not focused!</div>`);\n        console.log(`${frame.getName()} lost focused.`);\n      });\n\n\n      document.querySelector(`#btnFocusW${idx}`).addEventListener('click', () => {\n        const windowName = `window${idx}`;\n\n        // Find window by windowName\n        const frame = jsFrame.getWindowByName(windowName);\n\n        // Request focus on this window\n        frame.requestFocus();\n      });\n\n      frame.show();\n    }\n  }\n\n  start();\n</script>\n</body>\n</html>\n"
  },
  {
    "path": "public/examples/v160/iframe/iframe_content01.html",
    "content": "<html>\n<head>\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n    <link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet'>\n    <link rel=\"stylesheet\" href=\"../../../index.css\">\n</head>\n<body>\n<h4>This content is presented in an iframe</h4>\n<button id=\"my_button_01\" type=\"button\" class=\"btn-primary\">Button 1</button>\n<button id=\"my_button_02\" type=\"button\" class=\"btn-secondary\">Button 2</button>\n<button id=\"my_button_03\" type=\"button\" class=\"btn-success\">Button 3</button>\n</body>\n</html>\n"
  },
  {
    "path": "public/examples/v160/iframe/iframe_content02.html",
    "content": "<html>\n<head>\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n    <link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet'>\n    <link rel=\"stylesheet\" href=\"../../../index.css\">\n</head>\n<body>\n    <h4>This content is presented in an iframe</h4>\n    <button id=\"my_button_04\" type=\"button\" class=\"btn-primary\">Button 4</button>\n\n</body>\n</html>\n"
  },
  {
    "path": "public/examples/v160/iframe/iframe_content03.html",
    "content": "<html>\n<head>\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n    <link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet'>\n    <link rel=\"stylesheet\" href=\"../../../index.css\">\n\n</head>\n<body style=\"background:rgba(255,255,255,0.9)\">\n<h4>This content is presented in an iframe</h4>\n<pre>\n<h3>Hamlet</h3>\nACT I\nSCENE I. Elsinore. A platform before the castle.\nFRANCISCO at his post. Enter to him BERNARDO\nBERNARDO\nWho's there?\nFRANCISCO\nNay, answer me: stand, and unfold yourself.\nBERNARDO\nLong live the king!\nFRANCISCO\nBernardo?\nBERNARDO\nHe.\nFRANCISCO\nYou come most carefully upon your hour.\nBERNARDO\n'Tis now struck twelve; get thee to bed, Francisco.\nFRANCISCO\nFor this relief much thanks: 'tis bitter cold,\nAnd I am sick at heart.\nBERNARDO\nHave you had quiet guard?\nFRANCISCO\nNot a mouse stirring.\nBERNARDO\nWell, good night.\nIf you do meet Horatio and Marcellus,\nThe rivals of my watch, bid them make haste.\nFRANCISCO\nI think I hear them. Stand, ho! Who's there?\nEnter HORATIO and MARCELLUS\n\nHORATIO\nFriends to this ground.\nMARCELLUS\nAnd liegemen to the Dane.\nFRANCISCO\nGive you good night.\nMARCELLUS\nO, farewell, honest soldier:\nWho hath relieved you?\nFRANCISCO\nBernardo has my place.\nGive you good night.\nExit\n\nMARCELLUS\nHolla! Bernardo!\nBERNARDO\nSay,\nWhat, is Horatio there?\nHORATIO\nA piece of him.\nBERNARDO\nWelcome, Horatio: welcome, good Marcellus.\nMARCELLUS\nWhat, has this thing appear'd again to-night?\nBERNARDO\nI have seen nothing.\nMARCELLUS\nHoratio says 'tis but our fantasy,\nAnd will not let belief take hold of him\nTouching this dreaded sight, twice seen of us:\nTherefore I have entreated him along\nWith us to watch the minutes of this night;\nThat if again this apparition come,\nHe may approve our eyes and speak to it.\nHORATIO\nTush, tush, 'twill not appear.\nBERNARDO\nSit down awhile;\nAnd let us once again assail your ears,\nThat are so fortified against our story\nWhat we have two nights seen.\nHORATIO\nWell, sit we down,\nAnd let us hear Bernardo speak of this.\nBERNARDO\nLast night of all,\nWhen yond same star that's westward from the pole\nHad made his course to illume that part of heaven\nWhere now it burns, Marcellus and myself,\nThe bell then beating one,--\nEnter Ghost\n\nMARCELLUS\nPeace, break thee off; look, where it comes again!\nBERNARDO\nIn the same figure, like the king that's dead.\nMARCELLUS\nThou art a scholar; speak to it, Horatio.\nBERNARDO\nLooks it not like the king? mark it, Horatio.\nHORATIO\nMost like: it harrows me with fear and wonder.\nBERNARDO\nIt would be spoke to.\nMARCELLUS\nQuestion it, Horatio.\nHORATIO\nWhat art thou that usurp'st this time of night,\nTogether with that fair and warlike form\nIn which the majesty of buried Denmark\nDid sometimes march? by heaven I charge thee, speak!\nMARCELLUS\nIt is offended.\nBERNARDO\nSee, it stalks away!\nHORATIO\nStay! speak, speak! I charge thee, speak!\nExit Ghost\n\nMARCELLUS\n'Tis gone, and will not answer.\nBERNARDO\nHow now, Horatio! you tremble and look pale:\nIs not this something more than fantasy?\nWhat think you on't?\nHORATIO\nBefore my God, I might not this believe\nWithout the sensible and true avouch\nOf mine own eyes.\nMARCELLUS\nIs it not like the king?\nHORATIO\nAs thou art to thyself:\nSuch was the very armour he had on\nWhen he the ambitious Norway combated;\nSo frown'd he once, when, in an angry parle,\nHe smote the sledded Polacks on the ice.\n'Tis strange.\nMARCELLUS\nThus twice before, and jump at this dead hour,\nWith martial stalk hath he gone by our watch.\nHORATIO\nIn what particular thought to work I know not;\nBut in the gross and scope of my opinion,\nThis bodes some strange eruption to our state.\nMARCELLUS\nGood now, sit down, and tell me, he that knows,\nWhy this same strict and most observant watch\nSo nightly toils the subject of the land,\nAnd why such daily cast of brazen cannon,\nAnd foreign mart for implements of war;\nWhy such impress of shipwrights, whose sore task\nDoes not divide the Sunday from the week;\nWhat might be toward, that this sweaty haste\nDoth make the night joint-labourer with the day:\nWho is't that can inform me?\nHORATIO\nThat can I;\nAt least, the whisper goes so. Our last king,\nWhose image even but now appear'd to us,\nWas, as you know, by Fortinbras of Norway,\nThereto prick'd on by a most emulate pride,\nDared to the combat; in which our valiant Hamlet--\nFor so this side of our known world esteem'd him--\nDid slay this Fortinbras; who by a seal'd compact,\nWell ratified by law and heraldry,\nDid forfeit, with his life, all those his lands\nWhich he stood seized of, to the conqueror:\nAgainst the which, a moiety competent\nWas gaged by our king; which had return'd\nTo the inheritance of Fortinbras,\nHad he been vanquisher; as, by the same covenant,\nAnd carriage of the article design'd,\nHis fell to Hamlet. Now, sir, young Fortinbras,\nOf unimproved mettle hot and full,\nHath in the skirts of Norway here and there\nShark'd up a list of lawless resolutes,\nFor food and diet, to some enterprise\nThat hath a stomach in't; which is no other--\nAs it doth well appear unto our state--\nBut to recover of us, by strong hand\nAnd terms compulsatory, those foresaid lands\nSo by his father lost: and this, I take it,\nIs the main motive of our preparations,\nThe source of this our watch and the chief head\nOf this post-haste and romage in the land.\nBERNARDO\nI think it be no other but e'en so:\nWell may it sort that this portentous figure\nComes armed through our watch; so like the king\nThat was and is the question of these wars.\nHORATIO\nA mote it is to trouble the mind's eye.\nIn the most high and palmy state of Rome,\nA little ere the mightiest Julius fell,\nThe graves stood tenantless and the sheeted dead\nDid squeak and gibber in the Roman streets:\nAs stars with trains of fire and dews of blood,\nDisasters in the sun; and the moist star\nUpon whose influence Neptune's empire stands\nWas sick almost to doomsday with eclipse:\nAnd even the like precurse of fierce events,\nAs harbingers preceding still the fates\nAnd prologue to the omen coming on,\nHave heaven and earth together demonstrated\nUnto our climatures and countrymen.--\nBut soft, behold! lo, where it comes again!\nRe-enter Ghost\n\nI'll cross it, though it blast me. Stay, illusion!\nIf thou hast any sound, or use of voice,\nSpeak to me:\nIf there be any good thing to be done,\nThat may to thee do ease and grace to me,\nSpeak to me:\nCock crows\n\nIf thou art privy to thy country's fate,\nWhich, happily, foreknowing may avoid, O, speak!\nOr if thou hast uphoarded in thy life\nExtorted treasure in the womb of earth,\nFor which, they say, you spirits oft walk in death,\nSpeak of it: stay, and speak! Stop it, Marcellus.\nMARCELLUS\nShall I strike at it with my partisan?\nHORATIO\nDo, if it will not stand.\nBERNARDO\n'Tis here!\nHORATIO\n'Tis here!\nMARCELLUS\n'Tis gone!\nExit Ghost\n\nWe do it wrong, being so majestical,\nTo offer it the show of violence;\nFor it is, as the air, invulnerable,\nAnd our vain blows malicious mockery.\nBERNARDO\nIt was about to speak, when the cock crew.\nHORATIO\nAnd then it started like a guilty thing\nUpon a fearful summons. I have heard,\nThe cock, that is the trumpet to the morn,\nDoth with his lofty and shrill-sounding throat\nAwake the god of day; and, at his warning,\nWhether in sea or fire, in earth or air,\nThe extravagant and erring spirit hies\nTo his confine: and of the truth herein\nThis present object made probation.\nMARCELLUS\nIt faded on the crowing of the cock.\nSome say that ever 'gainst that season comes\nWherein our Saviour's birth is celebrated,\nThe bird of dawning singeth all night long:\nAnd then, they say, no spirit dares stir abroad;\nThe nights are wholesome; then no planets strike,\nNo fairy takes, nor witch hath power to charm,\nSo hallow'd and so gracious is the time.\nHORATIO\nSo have I heard and do in part believe it.\nBut, look, the morn, in russet mantle clad,\nWalks o'er the dew of yon high eastward hill:\nBreak we our watch up; and by my advice,\nLet us impart what we have seen to-night\nUnto young Hamlet; for, upon my life,\nThis spirit, dumb to us, will speak to him.\nDo you consent we shall acquaint him with it,\nAs needful in our loves, fitting our duty?\nMARCELLUS\nLet's do't, I pray; and I this morning know\nWhere we shall find him most conveniently.\nExeunt\n\nSCENE II. A room of state in the castle.\nEnter KING CLAUDIUS, QUEEN GERTRUDE, HAMLET, POLONIUS, LAERTES, VOLTIMAND, CORNELIUS, Lords, and Attendants\nKING CLAUDIUS\nThough yet of Hamlet our dear brother's death\nThe memory be green, and that it us befitted\nTo bear our hearts in grief and our whole kingdom\nTo be contracted in one brow of woe,\nYet so far hath discretion fought with nature\nThat we with wisest sorrow think on him,\nTogether with remembrance of ourselves.\nTherefore our sometime sister, now our queen,\nThe imperial jointress to this warlike state,\nHave we, as 'twere with a defeated joy,--\nWith an auspicious and a dropping eye,\nWith mirth in funeral and with dirge in marriage,\nIn equal scale weighing delight and dole,--\nTaken to wife: nor have we herein barr'd\nYour better wisdoms, which have freely gone\nWith this affair along. For all, our thanks.\nNow follows, that you know, young Fortinbras,\nHolding a weak supposal of our worth,\nOr thinking by our late dear brother's death\nOur state to be disjoint and out of frame,\nColleagued with the dream of his advantage,\nHe hath not fail'd to pester us with message,\nImporting the surrender of those lands\nLost by his father, with all bonds of law,\nTo our most valiant brother. So much for him.\nNow for ourself and for this time of meeting:\nThus much the business is: we have here writ\nTo Norway, uncle of young Fortinbras,--\nWho, impotent and bed-rid, scarcely hears\nOf this his nephew's purpose,--to suppress\nHis further gait herein; in that the levies,\nThe lists and full proportions, are all made\nOut of his subject: and we here dispatch\nYou, good Cornelius, and you, Voltimand,\nFor bearers of this greeting to old Norway;\nGiving to you no further personal power\nTo business with the king, more than the scope\nOf these delated articles allow.\nFarewell, and let your haste commend your duty.\nCORNELIUS VOLTIMAND\nIn that and all things will we show our duty.\nKING CLAUDIUS\nWe doubt it nothing: heartily farewell.\nExeunt VOLTIMAND and CORNELIUS\n\nAnd now, Laertes, what's the news with you?\nYou told us of some suit; what is't, Laertes?\nYou cannot speak of reason to the Dane,\nAnd loose your voice: what wouldst thou beg, Laertes,\nThat shall not be my offer, not thy asking?\nThe head is not more native to the heart,\nThe hand more instrumental to the mouth,\nThan is the throne of Denmark to thy father.\nWhat wouldst thou have, Laertes?\nLAERTES\nMy dread lord,\nYour leave and favour to return to France;\nFrom whence though willingly I came to Denmark,\nTo show my duty in your coronation,\nYet now, I must confess, that duty done,\nMy thoughts and wishes bend again toward France\nAnd bow them to your gracious leave and pardon.\nKING CLAUDIUS\nHave you your father's leave? What says Polonius?\nLORD POLONIUS\nHe hath, my lord, wrung from me my slow leave\nBy laboursome petition, and at last\nUpon his will I seal'd my hard consent:\nI do beseech you, give him leave to go.\nKING CLAUDIUS\nTake thy fair hour, Laertes; time be thine,\nAnd thy best graces spend it at thy will!\nBut now, my cousin Hamlet, and my son,--\nHAMLET\n[Aside] A little more than kin, and less than kind.\nKING CLAUDIUS\nHow is it that the clouds still hang on you?\nHAMLET\nNot so, my lord; I am too much i' the sun.\nQUEEN GERTRUDE\nGood Hamlet, cast thy nighted colour off,\nAnd let thine eye look like a friend on Denmark.\nDo not for ever with thy vailed lids\nSeek for thy noble father in the dust:\nThou know'st 'tis common; all that lives must die,\nPassing through nature to eternity.\nHAMLET\nAy, madam, it is common.\nQUEEN GERTRUDE\nIf it be,\nWhy seems it so particular with thee?\nHAMLET\nSeems, madam! nay it is; I know not 'seems.'\n'Tis not alone my inky cloak, good mother,\nNor customary suits of solemn black,\nNor windy suspiration of forced breath,\nNo, nor the fruitful river in the eye,\nNor the dejected 'havior of the visage,\nTogether with all forms, moods, shapes of grief,\nThat can denote me truly: these indeed seem,\nFor they are actions that a man might play:\nBut I have that within which passeth show;\nThese but the trappings and the suits of woe.\nKING CLAUDIUS\n'Tis sweet and commendable in your nature, Hamlet,\nTo give these mourning duties to your father:\nBut, you must know, your father lost a father;\nThat father lost, lost his, and the survivor bound\nIn filial obligation for some term\nTo do obsequious sorrow: but to persever\nIn obstinate condolement is a course\nOf impious stubbornness; 'tis unmanly grief;\nIt shows a will most incorrect to heaven,\nA heart unfortified, a mind impatient,\nAn understanding simple and unschool'd:\nFor what we know must be and is as common\nAs any the most vulgar thing to sense,\nWhy should we in our peevish opposition\nTake it to heart? Fie! 'tis a fault to heaven,\nA fault against the dead, a fault to nature,\nTo reason most absurd: whose common theme\nIs death of fathers, and who still hath cried,\nFrom the first corse till he that died to-day,\n'This must be so.' We pray you, throw to earth\nThis unprevailing woe, and think of us\nAs of a father: for let the world take note,\nYou are the most immediate to our throne;\nAnd with no less nobility of love\nThan that which dearest father bears his son,\nDo I impart toward you. For your intent\nIn going back to school in Wittenberg,\nIt is most retrograde to our desire:\nAnd we beseech you, bend you to remain\nHere, in the cheer and comfort of our eye,\nOur chiefest courtier, cousin, and our son.\n</pre>\n\n\n</body>\n</html>\n"
  },
  {
    "path": "public/examples/v160/iframe/index.html",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n    <title>JsFrame.js example - Using an iframe for window content</title>\n    <meta charset=\"utf-8\">\n    <meta name=\"description\" content=\"A javascript popup/floating window library.\">\n    <link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet'>\n    <link rel=\"stylesheet\" href=\"../../../index.css\">\n</head>\n<body>\n\n<h2><a href=\"../../../index.html\">JSFrame.js examples</a><span>Using an iframe for window content</span>\n</h2>\n<div style=\"font-size: 16px; color: white; position: fixed; right: 20px; bottom: 10px\">\n    <a href=\"https://github.com/riversun/JSFrame.js/tree/master/public/examples/v160/iframe\"\n       title=\"View source for this page on GitHub\" target=\"_blank\">View source on GitHub</a>\n</div>\n<script src=\"../../../jsframe.js\"></script>\n<script>\n  const jsFrame = new JSFrame();\n\n  function start() {\n\n    const frame01 = jsFrame.create({\n      title: 'Window1',\n      name: 'window01',\n      left: 20, top: 60, width: 320, height: 160,\n      //URL to display in iframe\n      url: 'iframe_content01.html',\n\n      // If you specify \"urlLoaded\",\n      // you can specify a callback when the iframe content is finished loading\n      urlLoaded: (frame) => {\n        // You can use the on method to register an event listener for an element in an iframe\n        frame.on('#my_button_01', 'click', (_frame, evt) => {\n          // In this case, frame and _frame refer to the same object.\n          showToast(`Clicked ${_frame.getName()}'s ${evt.target.id}`);\n        });\n\n        frame.on('#my_button_02', 'click', (_frame, evt) => {\n          _frame.closeFrame();\n          showToast(`${_frame.getName()} closed by clicking ${evt.target.id}`);\n        });\n\n        frame.on('#my_button_03', 'click', (_frame, evt) => {\n          showToast(`Clicked ${_frame.getName()}'s ${evt.target.id}`);\n        });\n      }\n    });\n    frame01.show();\n\n    const frame02 = jsFrame.create({\n      title: 'Window2',\n      name: 'window02',\n      left: 380, top: 60, width: 320, height: 160,\n    });\n\n    // You can also call #setUrl to show page specified by 'url' in iframe.\n    // #setUrl returns Promise.Promise will be resolved(you'll get callback) after loading iframe.\n    frame02.setUrl('iframe_content02.html')\n      .then((frame, evt) => {\n        frame.on('#my_button_04', 'click', (_frame, evt) => {\n          showToast(`Clicked ${_frame.getName()}'s ${evt.target.id}`);\n        });\n        frame.show();\n      });\n\n    const frame03 = jsFrame.create({\n      title: 'Window3',\n      name: 'window03',\n      left: 20, top: 240, width: 320, height: 320,\n      // When this option is enabled,\n      // transparent screens are displayed to realize smooth scrolling,\n      // so if there are buttons or the like, it may stop responding unless you click twice\n      smoothResizeOnIframe: true,\n    });\n    //You can also call #setUrl to show page specified by 'url' in iframe.\n    //#setUrl returns Promise.Promise will be resolved(you'll get callback) after loading iframe.\n    frame03.setUrl('iframe_content03.html')\n      .then((frame, evt) => {\n        frame.show();\n      });\n  }\n\n  function showToast(str) {\n    jsFrame.showToast({\n      html: str, align: 'top'\n    });\n  }\n\n  start();\n\n</script>\n\n</body>\n</html>\n"
  },
  {
    "path": "public/examples/v160/live-inside-element/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <title>JsFrame.js example - Make the window live inside a specific element</title>\n    <link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet'>\n    <link rel=\"stylesheet\" href=\"../../../index.css\">\n    <style>\n        .parent-element {\n            color: gray;\n            padding: 5px;\n            position: relative;\n            left: 20px;\n            top: 20px;\n            width: 320px;\n            height: 240px;\n            background: #dddddd;\n            overflow: hidden;\n        }\n\n        .window-content {\n            line-height: 200%;\n        }\n    </style>\n</head>\n<body>\n\n<h2><a href=\"../../../index.html\">JSFrame.js examples</a><span> Make the window live inside a specific element</span>\n</h2>\n<span>By specifying parentElement, the window becomes a child of that element.<br>You can also use this when you want to specify a window's movement range.</span>\n\n<div id=\"my-parent\" class=\"parent-element\">Parent Element</div>\n\n<div style=\"font-size: 16px; color: white; position: fixed; right: 20px; bottom: 10px\">\n    <a href=\"https://github.com/riversun/JSFrame.js/tree/master/public/examples/v160/live-inside-element\"\n       title=\"View source for this page on GitHub\" target=\"_blank\">View source on GitHub</a>\n</div>\n<script src=\"../../../jsframe.js\"></script>\n<script>\n\n  // You can specify your own parent element to create a window with {parentElement:[specific element]}.\n  // To make a window \"live\" inside an element,\n  // you can set the parent element's style to 'overflow:hidden'.\n  const jsFrame = new JSFrame({ parentElement: document.querySelector('#my-parent') });\n\n  jsFrame.create({\n    name: `Win0`,\n    title: `I live in parentElement.`,\n    left: 100,\n    top: 30,\n    width: 320,\n    height: 240,\n    style: {\n      backgroundColor: 'rgba(255,255,255,0.9)',\n      overflow: 'hidden'\n    },\n    appearanceName: 'yosemite',\n    html: `<div class=\"window-content\">You can specify your own parent element to create a window.\n <br><code>new JSFrame({ parentElement: document.querySelector('#my-parent') });</code><br>\n  To make a window \"live\" inside an element,you can set the parent element's style to <code>\"overflow:hidden\"</code>.</div>`,\n  }).show();\n</script>\n</body>\n</html>\n"
  },
  {
    "path": "public/examples/v160/live-inside-element-with-contorl/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <title>JsFrame.js example - Make maximized window size same as a specific parentElement</title>\n    <link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet'>\n    <link rel=\"stylesheet\" href=\"../../../index.css\">\n    <style>\n        .parent-element {\n            color: gray;\n            padding: 5px;\n            position: relative;\n            left: 20px;\n            top: 20px;\n            width: 640px;\n            height: 480px;\n            background: #dddddd;\n            overflow: hidden;\n        }\n\n        .window-content {\n            line-height: 200%;\n        }\n    </style>\n</head>\n<body>\n\n<h2><a href=\"../../../index.html\">JSFrame.js examples</a><span> Make maximized window size same as parentElement</span>\n</h2>\n<span>Set <code>matchParent:true</code>, create a window as a child of a particular <code>parentElement</code>, <br>\n    and make it the same size as <code>parentElement</code> when the window is maximized</span>\n\n<div id=\"my-parent\" class=\"parent-element\">Parent Element</div>\n\n<div style=\"font-size: 16px; color: white; position: fixed; right: 20px; bottom: 10px\">\n    <a href=\"https://github.com/riversun/JSFrame.js/tree/master/public/examples/v160/live-inside-element-with-contorl\"\n       title=\"View source for this page on GitHub\" target=\"_blank\">View source on GitHub</a>\n</div>\n<script src=\"../../../jsframe.js\"></script>\n<script>\n\n  // You can specify your own parent element to create a window with {parentElement:[specific element]}.\n  // To make a window \"live\" inside an element,\n  // you can set the parent element's style to 'overflow:hidden'.\n  const jsFrame = new JSFrame({ parentElement: document.querySelector('#my-parent') });\n\n  //  const HTML=`<div class=\"window-content\">You can specify your own parent element to create a window.\n  // <br><code>new JSFrame({ parentElement: document.querySelector('#my-parent') });</code><br>\n  //  To make a window \"live\" inside an element,you can set the parent element's style to <code>\"overflow:hidden\"</code>.</div>`;\n\n  const HTML = '<img id=\"my-image\" style=\"margin: auto;position: absolute;top: 0;left: 0;right: 0;bottom: 0;width:100%;height:auto\" ' +\n    'src=\"https://upload.wikimedia.org/wikipedia/commons/3/3f/Rainbow_colored_Rainbow_Bridge_at_night.jpg\">';\n\n  const frame = jsFrame.create({\n    name: `Win0`,\n    title: `I live in parentElement.`,\n    left: 100,\n    top: 30,\n    width: 320,\n    //height:240,// Height including title bar height\n    clientHeight: 240,// Height without title bar height\n    style: {\n      backgroundColor: 'rgba(255,255,255,0.9)',\n      overflow: 'hidden'\n    },\n    appearanceName: 'yosemite',\n    html: HTML,\n  });\n\n  //You can automatically set the actions that are typically expected\n  // when you press a button like maximize or minimize or something on title bar\n  frame.setControl({\n    maximizeButton: 'zoomButton',\n    maximizeParam: {\n      fullScreen: true,// true:maximized without title bar,false:maximized with title bar\n      restoreKey: 'Escape',//Set key code from https://www.w3.org/TR/uievents-code/#keyboard-key-codes\n      // If matchParent is specified\n      // When maximizing, use the size of parentElement specified at initialization\n      matchParent: true\n    },\n    demaximizeButton: 'dezoomButton',\n    deminimizeButton: 'deminimizeButton',\n    hideButton: 'minimizeButton',\n    hideParam: {\n      align: 'ABSOLUTE',//ABSOLUTE:If you want the window to disappear after transitioning to the position you specified\n      offset: {\n        x: 100, y: 500,// specify window vanishing point\n      },\n      duration: 300\n    },\n    dehideParam: {\n      duration: 300\n    },\n    styleDisplay: 'inline',\n    animation: true,\n    animationDuration: 100,//The whole animation duration(millisec)\n  });\n  frame.control.on('maximized', (frame, info) => {\n    console.log(\"'maximized' event fired.The window was maximized.\");\n    frame.on('#my-image', 'dblclick', function(_frame, e) {\n      _frame.control.doCommand('restore');\n    });\n\n  });\n  frame.control.on('demaximized', (frame, info) => {\n    console.log(\"'demaximized' event fired.The window is now back to its original size from its maximized state.\");\n  });\n  frame.show();\n\n</script>\n</body>\n</html>\n"
  },
  {
    "path": "public/examples/v160/position/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <title>JsFrame.js example - Set window position and size</title>\n    <link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet'>\n    <link rel=\"stylesheet\" href=\"../../../index.css\">\n</head>\n<body>\n<h2><a href=\"../../../index.html\">JSFrame.js examples</a><span>Set window position and size</span>\n</h2>\n<div style=\"font-size: 16px; color: white; position: fixed; right: 20px; bottom: 10px\">\n    <a href=\"https://github.com/riversun/JSFrame.js/tree/master/public/examples/v160/position\" title=\"View source for this page on GitHub\" target=\"_blank\">View source on GitHub</a>\n</div>\n<script src=\"../../../jsframe.js\"></script>\n<script>\n  function start() {\n    const jsFrame = new JSFrame();\n    const frame01 = jsFrame.createFrame().setTitle(\"My window\");\n\n    //Set size with #setSize method\n    frame01.setSize(320, 240);\n\n    //Set position with #setPosition method\n    const x = window.innerWidth / 2;\n    const y = window.innerHeight / 2;\n    const anchor = 'CENTER_CENTER';\n\n    // Anchor means the position of the window with respect to which the position is specified.\n    // The following values can be specified for the anchor\n    // LEFT_TOP\n    // CENTER_TOP\n    // RIGHT_TOP\n    // LEFT_CENTER\n    // CENTER_CENTER\n    // RIGHT_CENTER\n    // LEFT_BOTTOM\n    // CENTER_BOTTOM\n    // RIGHT_BOTTOM\n    frame01.setPosition(x, y, anchor);\n    frame01.setHTML(`\n<div style=\"padding:10px;font-size:20px;color:darkgray;\">\n    You can specify the position and size of the window using:<br>\n    <ul>\n        <li>#setPosition</li>\n        <li>#setSize</li>\n    </ul>\n</div>\n`);\n    frame01.show();\n  }\n\n  start();\n</script>\n</body>\n</html>\n"
  },
  {
    "path": "public/examples/v160/preset-apr-yosemite/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <title>JsFrame.js example - Appearance Preset 'Yosemite' </title>\n    <link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet'>\n    <link rel=\"stylesheet\" href=\"../../../index.css\">\n    <style>\n        #bg {\n            color: red;\n            padding: 10px;\n            width: 100%;\n            height: 100%;\n            user-select: none;\n        }\n\n        .btn-primary {\n            width: 180px;\n            font-weight:bolder;\n        }\n    </style>\n</head>\n<body>\n<h2><a href=\"../../../index.html\">JSFrame.js examples</a><span>Appearance Preset 'Yosemite'</span></h2>\n<span><b>Apearance Preset</b> is a predefined window appearance.</span>\n<div style=\"font-size: 16px; color: white; position: fixed; right: 20px; bottom: 10px\">\n    <a href=\"https://github.com/riversun/JSFrame.js/tree/master/public/examples/v160/preset-apr-yosemite\"\n       title=\"View source for this page on GitHub\" target=\"_blank\">View source on GitHub</a>\n</div>\n<script src=\"../../../jsframe.js\"></script>\n<script>\n  const jsFrame = new JSFrame();\n\n\n  const frame = jsFrame.create({\n    name: `Win0`,\n    title: `Win0 - Yosemite style`,\n    left: 20, top: 100, width: 400, height: 320, minWidth: 200, minHeight: 110,\n    appearanceName: 'yosemite',\n    appearanceParam: {\n      titleBar: {\n        greenButton: 'fullscreen',//'maximize' icon or 'fullscreen' icon\n      }\n    },\n    style: {\n      backgroundColor: 'rgba(255,255,255,1.0)',\n      overflow: 'hidden'\n    },\n  }).show();\n\n\n  //You can automatically set the actions that are typically expected\n  // when you press a button like maximize or minimize or something on title bar\n  frame.setControl({\n    maximizeButton: 'zoomButton',\n    maximizeParam: {\n      fullScreen: true,// true:maximized without title bar,false:maximized with title bar\n      restoreKey: 'Escape',//Set key code from https://www.w3.org/TR/uievents-code/#keyboard-key-codes\n    },\n    demaximizeButton: 'dezoomButton',\n    deminimizeButton: 'deminimizeButton',\n    hideButton: 'minimizeButton',\n    hideParam: {\n      align: 'ABSOLUTE',//ABSOLUTE:If you want the window to disappear after transitioning to the position you specified\n      offset: {\n        x: 100, y: 500,// specify window vanishing point\n      },\n      duration: 300\n    },\n    dehideParam: {\n      duration: 300\n    },\n    styleDisplay: 'inline',\n    animation: true,\n    animationDuration: 100,//The whole animation duration(millisec)\n  });\n  frame.control.on('maximized', (frame, info) => {\n    console.log(\"'maximized' event fired.The window was maximized.\");\n    const HTML = '<div id=\"bg\" style=\"\">Double click here or press \"Escape\" to restore.</div>';\n    frame.setHTML(HTML);\n    frame.on('#bg', 'dblclick', function(_frame, e) {\n      _frame.control.doCommand('restore');\n    });\n\n  });\n  frame.control.on('demaximized', (frame, info) => {\n    console.log(\"'demaximized' event fired.The window is now back to its original size from its maximized state.\");\n    frame.setHTML(null);\n  });\n  frame.control.on('hid', (frame, info) => {\n    console.log(\"'hid' event fired.The window was hidden.\");\n  });\n  frame.control.on('dehided', (frame, info) => {\n    console.log(\"'dehided' event fired.A hidden window has appeared.\");\n  });\n\n\n</script>\n</body>\n</html>\n"
  },
  {
    "path": "public/examples/v160/preset-window-control-cmd/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <title>JsFrame.js example - Window Control Command </title>\n    <link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet'>\n    <link rel=\"stylesheet\" href=\"../../../index.css\">\n    <style>\n        #bg {\n            color: red;\n            padding: 10px;\n            width: 100%;\n            height: 100%;\n            user-select: none;\n        }\n\n        .btn-primary {\n            width: 180px;\n            font-weight:bolder;\n        }\n    </style>\n</head>\n<body>\n<h2><a href=\"../../../index.html\">JSFrame.js examples</a><span>Window Control Command </span></h2>\n\n<!--Window Control panel-->\n<!--The window can be controlled from the code as well as from the buttons on the title bar-->\n<button id=\"btn0\" class=\"btn-primary\">Fullscreen</button>\n<button id=\"btn1\" class=\"btn-primary\">Restore from fullscreen</button>\n<button id=\"btn2\" class=\"btn-primary\">Hide</button>\n<button id=\"btn3\" class=\"btn-primary\">Restore from hid</button>\n\n<!-- /Window Control panel-->\n<div style=\"font-size: 16px; color: white; position: fixed; right: 20px; bottom: 10px\">\n    <a href=\"https://github.com/riversun/JSFrame.js/tree/master/public/examples/v160/preset-apr-yosemite\"\n       title=\"View source for this page on GitHub\" target=\"_blank\">View source on GitHub</a>\n</div>\n<script src=\"../../../jsframe.js\"></script>\n<script>\n  const jsFrame = new JSFrame();\n\n\n  const frame = jsFrame.create({\n    name: `Win0`,\n    title: `Win0 - Yosemite style`,\n    left: 20, top: 140, width: 400, height: 320, minWidth: 200, minHeight: 110,\n    appearanceName: 'yosemite',\n    appearanceParam: {\n      titleBar: {\n        greenButton: 'fullscreen',//'maximize' icon or 'fullscreen' icon\n      }\n    },\n    style: {\n      backgroundColor: 'rgba(255,255,255,1.0)',\n      overflow: 'hidden'\n    },\n  }).show();\n\n\n  document.querySelector('#btn0').addEventListener('click', (e) => {\n    frame.control.doCommand('maximize');\n  });\n  document.querySelector('#btn1').addEventListener('click', (e) => {\n    frame.control.doCommand('restore');\n  });\n  document.querySelector('#btn2').addEventListener('click', (e) => {\n    frame.control.doCommand('hide');\n  });\n  document.querySelector('#btn3').addEventListener('click', (e) => {\n    frame.control.doCommand('dehide');\n  });\n\n  //You can automatically set the actions that are typically expected\n  // when you press a button like maximize or minimize or something on title bar\n  frame.setControl({\n    maximizeButton: 'zoomButton',\n    maximizeParam: {\n      fullScreen: true,// true:maximized without title bar,false:maximized with title bar\n      restoreKey: 'Escape',//Set key code from https://www.w3.org/TR/uievents-code/#keyboard-key-codes\n    },\n    demaximizeButton: 'dezoomButton',\n    deminimizeButton: 'deminimizeButton',\n    hideButton: 'minimizeButton',\n    hideParam: {\n      align: 'ABSOLUTE',//ABSOLUTE:If you want the window to disappear after transitioning to the position you specified\n      offset: {\n        x: 100, y: 500,// specify window vanishing point\n      },\n      duration: 300\n    },\n    dehideParam: {\n      duration: 300\n    },\n    styleDisplay: 'inline',\n    animation: true,\n    animationDuration: 100,//The whole animation duration(millisec)\n  });\n  frame.control.on('maximized', (frame, info) => {\n    console.log(\"'maximized' event fired.The window was maximized.\");\n    const HTML = '<div id=\"bg\" style=\"\">Double click here or press \"Escape\" to restore.</div>';\n    frame.setHTML(HTML);\n    frame.on('#bg', 'dblclick', function(_frame, e) {\n      _frame.control.doCommand('restore');\n    });\n\n  });\n  frame.control.on('demaximized', (frame, info) => {\n    console.log(\"'demaximized' event fired.The window is now back to its original size from its maximized state.\");\n    frame.setHTML(null);\n  });\n  frame.control.on('hid', (frame, info) => {\n    console.log(\"'hid' event fired.The window was hidden.\");\n  });\n  frame.control.on('dehided', (frame, info) => {\n    console.log(\"'dehided' event fired.A hidden window has appeared.\");\n  });\n\n\n</script>\n</body>\n</html>\n"
  },
  {
    "path": "public/examples/v160/preset-window-yosemite/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <title>JsFrame.js example - \"Window Preset\" performs typical window-system behavior</title>\n    <link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet'>\n    <link rel=\"stylesheet\" href=\"../../../index.css\">\n</head>\n<body>\n<h2><a href=\"../../../index.html\">JSFrame.js\n    examples</a><span>\"Window Preset\" performs typical window-system behavior</span>\n</h2>\n<span><b>Window Preset</b> is a preset that implements the typical behavior as well as the look.<br>Tap to minimize at the position of the icon</span>\n<div style=\"position:relative;\">\n    <img src=\"icon_riversun_64.png\" id=\"icon1\">\n</div>\n\n<div style=\"font-size: 16px; color: white; position: fixed; right: 20px; bottom: 10px\">\n    <a href=\"https://github.com/riversun/JSFrame.js/tree/master/public/examples/v160/preset-window-yosemite\"\n       title=\"View source for this page on GitHub\" target=\"_blank\">View source on GitHub</a>\n</div>\n<script src=\"../../../jsframe.js\"></script>\n<script>\n  const jsFrame = new JSFrame();\n\n  const frame = jsFrame.create({\n    name: `Win0`,\n    title: `Win0 - Yosemite style`,\n    left: 100, top: 200, width: 400, height: 320, minWidth: 200, minHeight: 110,\n\n    // Whereas the presets of \"appearance\" mainly show the \"look and feel\" presets.\n    //  The \"preset\" are a collection of \"look and feel\" + \"standard behavior\" presets,\n    //  allowing you to achieve common window behavior with less coding.\n    preset: 'yosemite',\n    presetParam: {\n      // Set the window control command to be executed when the maximize button is pressed\n      maximizeButtonBehavior: 'fullscreen',// Possible commands are 'fullscreen' or 'maximize'\n      // Set the window control command to be executed when the maximize button is pressed\n      minimizeButtonBehavior: 'hide',// Possible commands are 'minimize' or 'hide'\n      // If you want to intercept the close button,\n      // specify your own name for the closeButton and set an event listener for that name.\n      closeButtonName: 'my-custom-close-button',\n      control: {\n        // Parameters to use when 'minimize' command is executed\n        minimizeParam: {\n          toWidth: 250,\n          duration: 200\n        },\n        // Parameters to use when the 'hide' command is executed\n        hideParam: {\n          //ABSOLUTE:If you want the window to disappear after transitioning to the position you specified\n          align: 'ABSOLUTE',\n          //A DOM Element can be used to specify the point at which the window disappears when it is hidden\n          toElement: document.querySelector('#icon1'),\n          //Time to hide(milliseconds)\n          duration: 200\n        },\n      }\n    },\n    style: {\n      backgroundColor: 'rgba(255,255,255,1.0)',\n      overflow: 'hidden'\n    },\n    html: '<div id=\"window_content\" style=\"padding:10px;width:100%;height:100%;user-select:none;font-size:16px\"></div>',\n  }).show();\n\n  // You can double-click it back to its original size as below.\n  frame.$('#window_content').innerText = 'Double click here or click \"maximize\" button to fullscreen.';\n  frame.on('#window_content', 'dblclick', (_frame, e) => {\n    // You can use frame.control#doCommand to execute the window control command directly.\n    _frame.control.doCommand('maximize');\n  });\n\n  frame.on('my-custom-close-button', 'click', (_frame, e) => {\n    // If you want to intercept the close button,\n    // specify your own name for the closeButton and set an event listener for that name.\n    _frame.closeFrame();\n  });\n\n  // receive events\n  document.querySelector('#icon1').addEventListener('click', (e) => {\n    frame.control.doCommand('dehide');\n  });\n\n  frame.control.on('hid', (frame, info) => {\n    console.log(\"'hid' event fired.The window was hidden.\");\n  });\n\n  frame.control.on('dehided', (frame, info) => {\n    console.log(\"'dehided' event fired.A hidden window has appeared.\");\n  });\n\n  frame.control.on('maximized', (frame, info) => {\n    frame.$('#window_content').innerText = 'Double click here or press Escape to restore.';\n    frame.on('#window_content', 'dblclick', (_frame, e) => {\n      _frame.control.doCommand('restore');\n    });\n  });\n\n  frame.control.on('demaximized', (frame, info) => {\n    frame.$('#window_content').innerText = 'Double click here or click \"maximize\" button to fullscreen.';\n    frame.on('#window_content', 'dblclick', (_frame, e) => {\n      _frame.control.doCommand('maximize');\n    });\n  });\n\n\n</script>\n</body>\n</html>\n"
  },
  {
    "path": "public/examples/v160/preset-window-yosemite-desktop/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <title>JsFrame.js example - Desktop on the web with 'yosemite' preset</title>\n    <link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet'>\n    <link rel=\"stylesheet\" href=\"../../../index.css\">\n    <link rel=\"stylesheet\" href=\"yosemite-desktop.css\"/>\n</head>\n<body>\n<h2><a href=\"../../../index.html\">JSFrame.js examples</a><span>Desktop on the web with 'yosemite' preset</span></h2>\n<div id=\"task-bar\" class=\"task-bar\">\n</div>\n<div class=\"git-link\">\n    <a href=\"https://github.com/riversun/JSFrame.js/tree/master/public/examples/v160/preset-window-yosemite-desktop\"\n       target=\"_blank\">View source on GitHub</a>\n</div>\n<div class=\"license-link\">\n    Icons from http://flat-icon-design.com , Photo by Tiago Fioreze License: CC-BY-SA 3.0\n</div>\n\n<script src=\"../../../jsframe.js\"></script>\n<script>\n  const jsFrame = new JSFrame();\n\n  let initialWindowLeft = 20;\n  let initialWindowTop = 60;\n\n  const createWindow = ({ iconId, iconUrl }, visible) => {\n\n    const frame = jsFrame.create({\n      name: iconId,\n      title: `${iconId} - Yosemite style`,\n      left: initialWindowLeft, top: initialWindowTop, width: 400, height: 320, minWidth: 200, minHeight: 110,\n\n      //  The \"preset\" are a collection of \"look and feel\" + \"standard behavior\" presets,\n      //  allowing you to achieve common window behavior with less coding.\n      preset: 'yosemite',\n      presetParam: {\n        // Set the window control command to be executed when the maximize button is pressed\n        maximizeButtonBehavior: 'fullscreen',// Possible commands are 'fullscreen' or 'maximize'\n        // Set the window control command to be executed when the maximize button is pressed\n        minimizeButtonBehavior: 'hide',// Possible commands are 'minimize' or 'hide'\n        closeButtonBehavior: 'hide',\n        control: {\n\n          // Parameters to use when the 'hide' command is executed\n          hideParam: {\n            //ABSOLUTE:If you want the window to disappear after transitioning to the position you specified\n            align: 'ABSOLUTE',\n            //A DOM Element can be used to specify the point at which the window disappears when it is hidden\n            toElement: document.querySelector(`#${iconId}`),\n            //Time to hide(milliseconds)\n            duration: 200\n          },\n        }\n      },\n      style: {\n        backgroundColor: 'rgba(255,255,255,0.9)',\n        overflow: 'hidden'\n      },\n      html: `<div id=\"window_content\" class=\"window-content\"/>`,\n    });\n\n\n    const iconImageTag = `<img src=\"${iconUrl}\" class=\"icon\">`;\n\n    // You can double-click it back to its original size as below.\n    frame.$('#window_content').innerHTML = `${iconImageTag}<br>Double click here or click \"maximize\" button to fullscreen.`;\n    frame.on('#window_content', 'dblclick', (_frame) => {\n      // When window double-clicked, do 'maximize'\n      // You can use frame.control#doCommand to execute the window control command directly.\n      _frame.control.doCommand('maximize');\n    });\n    frame.control.on('maximized', (frame) => {\n      frame.$('#window_content').innerHTML = `${iconImageTag}<br>Double click here or press Escape to restore.`;\n      frame.on('#window_content', 'dblclick', (_frame, e) => {\n        _frame.control.doCommand('restore');\n      });\n    });\n\n    frame.control.on('demaximized', (frame) => {\n      frame.$('#window_content').innerHTML = `${iconImageTag}<br>Double click here or click \"maximize\" button to fullscreen.`;\n      frame.on('#window_content', 'dblclick', (_frame) => {\n        _frame.control.doCommand('maximize');\n      });\n    });\n\n    // set event handler\n    document.querySelector(`#${iconId}`).addEventListener('click', () => {\n      if (jsFrame.containsWindowName(iconId)) {\n        const windowMode = frame.control.getWindowMode();\n        if (windowMode === 'hid') {\n          frame.control.doCommand('dehide');\n        } else if (windowMode === 'default') {\n          frame.control.doCommand('hide');\n        }\n      } else {\n        // Note:This situation doesn't occur in this example.\n        createWindow(iconId, true);\n      }\n    });\n\n    if (visible) {\n      frame.show();\n    } else {\n      frame.control.doHide({\n        silent: true,//true means invisible action\n        duration: 0,\n        align: 'ABSOLUTE',//need to set the offset point where window is minimized\n        toElement: document.querySelector(`#${iconId}`),\n      });\n    }\n\n    initialWindowLeft += 20;\n    initialWindowTop += 20;\n  }\n\n  const NUM_OF_ICONS = 16;// Max=16\n  const taskBar = document.querySelector('#task-bar');\n  const iconModels = [];\n\n  const zeroPadding = (n) => {\n    const numStr = '0' + n;\n    return numStr.substring(numStr.length - 2, numStr.length)\n  };\n\n  for (let iconIdx = 0; iconIdx < NUM_OF_ICONS; iconIdx += 1) {\n    const strIndex = zeroPadding(iconIdx + 1);\n    const iconId = `Window-${strIndex}`;\n    const iconUrl = `https://riversun.github.io/img/icons/${strIndex}.png`;\n    const iconTag = `<img src=\"${iconUrl}\" class=\"icon\" id=\"${iconId}\">`;\n    taskBar.innerHTML += iconTag;\n    iconModels.push({ iconId, iconUrl });\n  }\n\n  for (let winIdx = 0; winIdx < iconModels.length; winIdx += 1) {\n    createWindow(iconModels[winIdx], winIdx === 0);\n  }\n\n</script>\n</body>\n</html>\n"
  },
  {
    "path": "public/examples/v160/preset-window-yosemite-desktop/yosemite-desktop.css",
    "content": "body {\n    background: url('https://riversun.github.io/img/yosemite.jpg?') 100% repeat fixed;\n    background-size: cover;\n}\n\n.icon {\n    width: 72px;\n    height: 72px;\n}\n\nimg.icon:hover {\n    opacity: 0.8;\n    cursor: pointer;\n}\n\nimg.icon:active {\n    position: relative;\n    top: 1px;\n    left: 2px;\n}\n\n.window-content {\n    padding: 10px;\n    width: 100%;\n    height: 100%;\n    user-select: none;\n    color: #666666;\n    font-size: 16px\n}\n\n.git-link {\n    position: fixed;\n    font-size: 16px;\n    color: white;\n    right: 40px;\n    bottom: 110px\n}\n\n.license-link {\n    position: fixed;\n    font-size: 12px;\n    color: white;\n    right: 40px;\n    bottom: 90px\n}\n\n.task-bar {\n    position: absolute;\n    display: flex;\n    justify-content: space-between;\n    left: 0px;\n    bottom: 0px;\n    margin-left: 40px;\n    margin-right: 40px;\n    box-sizing: border-box;\n    width: calc(100vw - 80px);\n    min-width: 1152px; /* calc(1152px-40px);*/\n    height: 80px;\n    z-index: 0;\n    background: rgba(0, 0, 0, 0.5);\n}\n"
  },
  {
    "path": "public/examples/v160/simple/index.html",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n    <title>JsFrame.js example - Create a window with content written in HTML</title>\n    <meta charset=\"utf-8\">\n    <link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet'>\n    <link rel=\"stylesheet\" href=\"../../../index.css\">\n</head>\n<body>\n<h2><a href=\"../../../index.html\">JSFrame.js examples</a><span>Create a window with content written in HTML</span>\n</h2>\n<div style=\"font-size: 16px; color: white; position: fixed; right: 20px; bottom: 10px\">\n    <a href=\"https://github.com/riversun/JSFrame.js/tree/master/public/examples/v160/simple\"\n       title=\"View source for this page on GitHub\" target=\"_blank\">View source on GitHub</a>\n</div>\n<script src=\"../../../jsframe.js\"></script>\n<script>\n  function start() {\n    const jsFrame = new JSFrame();\n    // Create window\n    const frame = jsFrame.create({\n      title: 'Window',\n      left: 20, top: 60, width: 320, height: 220,\n      movable: true,// Enable to be moved  by mouse\n      resizable: true,// Enable to be resized by mouse\n      html: '<div id=\"my_element\" style=\"padding:10px;font-size:20px;color:darkgray;\">Contents will change in 5s</div>'\n    });\n\n    // Show window\n    frame.show();\n\n    setTimeout(() => {\n      // Change contents after 1 second\n      // Use $ selector to access to content of frame\n      // frame.$('#my_element') represents an element inside the window.\n\n      // set HTML with innerHTML\n      frame.$('#my_element').innerHTML = '<span style=\"color:palevioletred\">Contents changed!</span><br>';\n\n      // append HTML with insertAdjacentHTML\n      frame.$('#my_element').insertAdjacentHTML('beforeend', '<span style=\"color:dodgerblue\">You can move and resize me!</span>');\n\n    }, 5000);\n  }\n\n  start();\n</script>\n</body>\n</html>\n"
  },
  {
    "path": "public/examples/v160/styling/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <title>JsFrame.js example - Rounded button on the corner with no title\n        bar</title>\n    <link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet'>\n    <link rel=\"stylesheet\" href=\"../../../index.css\">\n</head>\n<body>\n<h2><a href=\"../../../index.html\">JSFrame.js examples</a><span>Rounded button on the corner with no title\n                bar</span>\n</h2>\n<div style=\"font-size: 16px; color: white; position: fixed; right: 20px; bottom: 10px\">\n    <a href=\"https://github.com/riversun/JSFrame.js/tree/master/public/examples/v160/styling\"\n       title=\"View source for this page on GitHub\" target=\"_blank\">View source on GitHub</a>\n</div>\n<script src=\"../../../jsframe.js\"></script>\n<script>\n  function start() {\n\n    const jsFrame = new JSFrame();\n\n    // A frame appearance is a container in which parameters for the appearance of a window are defined.\n    // To change the appearance of the window, you can specify the Frame Appearance parameter.\n    const appearance = jsFrame.createFrameAppearance();\n    jsFrame.create({\n      title: 'Popup style',\n      left: 20, top: 80, width: 320, height: 220,\n      style: {\n        backgroundColor: 'rgba(255,255,255,0.9)',\n        overflow: 'hidden'\n      },\n      appearance: getOriginalStyle(appearance),\n      html: '<div id=\"my_element\" style=\"padding:10px;font-size:20px;color:darkgray;\">Popup style window</div>'\n    }).show();\n\n  }\n\n  /**\n   * Generate(populate values to object) the original look\n   * @param frameAppearance\n   * @returns {*}\n   */\n  function getOriginalStyle(frameAppearance) {\n\n    // Specifies parameters for the appearance of the window,\n    // such as the title bar and border.\n    frameAppearance.titleBarHeight = '0px';// no title bar\n    // frameAppearance.titleBarCaptionFontSize = '12px';\n    // frameAppearance.titleBarCaptionFontWeight = 'normal';\n    // frameAppearance.titleBarCaptionLeftMargin = '10px';\n    // frameAppearance.titleBarCaptionColorDefault = '#4d494d';\n    // frameAppearance.titleBarCaptionColorFocused = '#4d494d';\n    // frameAppearance.titleBarColorDefault = 'yellow';\n    // frameAppearance.titleBarColorFocused = 'yellow';\n    // frameAppearance.titleBarBorderBottomDefault = null;\n    // frameAppearance.titleBarBorderBottomFocused = null;\n    frameAppearance.frameBorderRadius = '6px';\n    frameAppearance.frameBorderWidthDefault = '1px';\n    frameAppearance.frameBorderWidthFocused = '1px';\n    frameAppearance.frameBorderColorDefault = '#ffffff';\n    frameAppearance.frameBorderColorFocused = '#666666';\n    frameAppearance.frameBorderStyle = 'solid';\n    frameAppearance.frameBoxShadow = '10px 10px 10px rgba(0, 0, 0, 0.2)';\n    frameAppearance.frameBorderStyle = 'solid';\n    frameAppearance.frameComponents = [];\n    frameAppearance.frameHeightAdjust = 1;\n\n    frameAppearance.onInitialize = function() {\n\n      // Create an original \"close button\".\n      // Decide which part of the window the close button should be placed in, and\n      // To create an original button, we declare a class called Text Button,\n      // which we get using the helper class called Parts Builder\n      var partsBuilder = frameAppearance.getPartsBuilder();\n      var buttonAppearance = partsBuilder.buildTextButtonAppearance();\n      buttonAppearance.width = 20;\n      buttonAppearance.height = 20;\n      buttonAppearance.borderRadius = 10;\n      buttonAppearance.borderWidth = 1;\n      buttonAppearance.borderColorDefault = '#cccccc';\n      buttonAppearance.borderColorFocused = '#cccccc';\n      buttonAppearance.borderColorHovered = '#dddddd';\n      buttonAppearance.borderColorPressed = '#eeeeee';\n      buttonAppearance.borderStyleDefault = 'solid';\n      buttonAppearance.borderStyleFocused = buttonAppearance.borderStyleDefault;\n      buttonAppearance.borderStyleHovered = buttonAppearance.borderStyleDefault;\n      buttonAppearance.borderStylePressed = buttonAppearance.borderStyleDefault;\n      buttonAppearance.backgroundColorDefault = 'white';\n      buttonAppearance.backgroundColorFocused = 'white';\n      buttonAppearance.backgroundColorHovered = '#eeeeee';\n      buttonAppearance.backgroundColorPressed = '#dddddd';\n      buttonAppearance.backgroundBoxShadow = '5px 5px 5px  rgba(0, 0, 0, 0.2)';\n      buttonAppearance.caption = '\\u2716';// Using text to represent the close mark\n      buttonAppearance.captionColorDefault = 'black';\n      buttonAppearance.captionColorFocused = 'black';\n      buttonAppearance.captionColorHovered = 'red';\n      buttonAppearance.captionColorPressed = 'red';\n      //If you use captionShiftYpx, you can fine-tune the y-direction according to the drawing situation of the font.\n      buttonAppearance.captionShiftYpx = 1;\n      buttonAppearance.captionFontRatio = 0.6;\n\n      // Specify the button appearance\n      // when the close button is created using the Part Builder.\n      var closeButtonEle = partsBuilder.buildTextButton(buttonAppearance);\n      var anchor = 'RIGHT_TOP';\n      var x = 10;\n      var y = -12 - parseInt(frameAppearance.titleBarHeight);\n\n      // Give it a reserved name \"closeButton\" to indicate that this is a \"close button\".\n      frameAppearance.addFrameComponent('closeButton', closeButtonEle, x, y, anchor);\n    };\n    return frameAppearance;\n  }\n\n  start();\n</script>\n</body>\n</html>\n"
  },
  {
    "path": "public/examples/v160/styling-button-child-menu/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <title>JsFrame.js example - style: Child menu for buttons on title bar</title>\n    <link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet'>\n    <link rel=\"stylesheet\" href=\"../../../index.css\">\n    <style>\n        .menu-caption {\n            font-size: 16px;\n        }\n\n        .list-group-item {\n            position: relative;\n            display: block;\n            padding: 10px 15px;\n            margin-bottom: -1px;\n            background-color: #fff;\n            border: 1px solid #ddd;\n            color: black;\n        }\n\n        .list-group-item:hover {\n            color: #555;\n            text-decoration: none;\n            background-color: #dddddd;\n        }\n    </style>\n    <link rel=\"stylesheet\" href=\"https://use.fontawesome.com/releases/v5.6.3/css/all.css\"\n          integrity=\"sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/\" crossorigin=\"anonymous\">\n</head>\n<body>\n\n<h2><a href=\"../../../index.html\">JSFrame.js examples</a><span>style: Child menu for buttons on title bar</span>\n</h2>\n<div style=\"font-size: 16px; color: white; position: fixed; right: 20px; bottom: 10px\">\n    <a href=\"https://github.com/riversun/JSFrame.js/tree/master/public/examples/v160/styling-button-child-menu\"\n       title=\"View source for this page on GitHub\" target=\"_blank\">View source on GitHub</a>\n</div>\n<script src=\"../../../jsframe.js\"></script>\n<script>\n  function start() {\n\n    const jsFrame = new JSFrame();\n\n    const originalAppearance = getOriginalStyle(jsFrame.createFrameAppearance());\n    const originalAppearance2 = getOriginalStyle(jsFrame.createFrameAppearance());\n    originalAppearance2.titleBarColorDefault = '#f88901';\n    originalAppearance2.titleBarColorFocused = '#f88901';\n\n    const frame1 = jsFrame.create({\n      title: 'Window1',\n      left: 20, top: 80, width: 450, height: 300,\n      style: {\n        backgroundColor: 'white',\n        overflow: 'hidden'\n      },\n      appearance: originalAppearance,\n      html: `<div style=\"height:40px;background:#00cccd;padding:10px;font-size:20px;\"></div>\n<div style=\"padding:10px;font-size:20px;color:black;\">\n</div>`\n    }).show();\n\n    const frame2 = jsFrame.create({\n      title: 'Window2',\n      left: 500, top: 80, width: 450, height: 300,\n      style: {\n        backgroundColor: 'white',\n        overflow: 'hidden'\n      },\n      appearance: originalAppearance2,\n      html: `<div style=\"height:40px;background:#ffa301;padding:10px;font-size:20px;\"></div>\n<div style=\"padding:10px;font-size:20px;color:black;\">\n</div>`\n    }).show();\n    const fnShowToast = (_frame, evt) => {\n      jsFrame.showToast({\n        html: `${_frame.title} ${evt.target.id} clicked`,\n        align: 'top'\n      });\n    };\n\n    frame1.on('#my-menu1', 'click', fnShowToast);\n    frame1.on('#my-menu2', 'click', fnShowToast);\n    frame1.on('#my-menu3', 'click', fnShowToast);\n    frame1.on('#my-setting1', 'click', fnShowToast);\n    frame1.on('#my-setting2', 'click', fnShowToast);\n    frame1.on('#my-setting3', 'click', fnShowToast);\n    frame1.on('#my-app-menu1', 'click', (_frame, evt) => {\n      _frame.closeFrame();\n    });\n\n    frame1.setOnExternalAreaClickedListener(() => {\n      // If the outside of this window is clicked, it will make the childMenu disappear.\n      frame1.hideFrameComponentChildMenus();\n    });\n\n    frame2.on('#my-menu1', 'click', fnShowToast);\n    frame2.on('#my-menu2', 'click', fnShowToast);\n    frame2.on('#my-menu3', 'click', fnShowToast);\n    frame2.on('#my-setting1', 'click', fnShowToast);\n    frame2.on('#my-setting2', 'click', fnShowToast);\n    frame2.on('#my-setting3', 'click', fnShowToast);\n    frame2.on('#my-app-menu1', 'click', (_frame, evt) => {\n      _frame.closeFrame();\n    });\n\n    frame2.setOnExternalAreaClickedListener(() => {\n      // If the outside of this window is clicked, it will make the childMenu disappear.\n      frame2.hideFrameComponentChildMenus();\n    });\n\n  }\n\n  /**\n   * Generate(populate values to object) the original look\n   * @param frameAppearance\n   * @returns {*}\n   */\n  function getOriginalStyle(frameAppearance) {\n\n    // [whole title bar]\n    frameAppearance.titleBarHeight = '36px';\n    // Disable default title bar class\n    frameAppearance.titleBarClassNameDefault = ' ';\n    frameAppearance.titleBarClassNameFocused = ' ';\n    frameAppearance.titleBarColorDefault = '#009998';\n    frameAppearance.titleBarColorFocused = '#009998';\n\n    // [title bar caption]\n    frameAppearance.titleBarCaptionFontSize = '14px';\n    frameAppearance.titleBarCaptionFontWeight = 'bold';\n\n    //To place the icon on the left, the title caption is also moved to the right\n    frameAppearance.titleBarCaptionLeftMargin = '40px';\n\n    frameAppearance.titleBarCaptionColorDefault = 'white';\n    frameAppearance.titleBarCaptionColorFocused = 'white';\n    frameAppearance.titleBarCaptionTextShadow = null;\n    frameAppearance.titleBarBorderBottomDefault = null;\n    frameAppearance.titleBarBorderBottomFocused = null;\n    frameAppearance.titleBarCaptionTextShadow = null;\n\n    // [frame border]\n    frameAppearance.frameBorderRadius = '0px';\n    frameAppearance.frameBorderWidthDefault = '0px';\n    frameAppearance.frameBorderWidthFocused = '0px';\n    frameAppearance.frameBorderColorDefault = null;\n    frameAppearance.frameBorderColorFocused = null;\n    frameAppearance.frameBorderStyle = 'solid';\n    frameAppearance.frameBoxShadow = '0px 4px 4px rgba(0, 0, 0, 0.5)';\n\n    frameAppearance.onInitialize = function() {\n\n      const partsBuilder = frameAppearance.getPartsBuilder();\n\n      const componentWidth = 16;\n      const componentHeight = 16;\n\n      // prepare [menu button]\n      const faMenuApr = partsBuilder.buildTextButtonAppearance();\n      faMenuApr.fa = 'fas fa-bars';\n      faMenuApr.width = componentWidth;\n      faMenuApr.height = componentHeight;\n      faMenuApr.borderRadius = 0;\n      faMenuApr.borderWidth = 0;\n      faMenuApr.captionColorDefault = 'white';\n      faMenuApr.captionColorFocused = 'white';\n      faMenuApr.captionColorHovered = 'white';\n      faMenuApr.captionColorPressed = 'gray';\n\n      // prepare [menu button's child menu]\n      const childMenuApr = partsBuilder.buildChildMenuAppearance();\n\n      // Set the width of the childMenu\n      childMenuApr.childMenuWidth = 200;\n\n      //Specify the alignment of childMenu to the parent\n      // frame component (button on the title bar) from \"LEFT\", \"CENTER\", and \"RIGHT\".\n      childMenuApr.childMenuAlign = 'RIGHT';\n\n      // You can adjust the childmenu display position in pixel units by xOffset,yOffset.\n      childMenuApr.xOffset = 0;\n      childMenuApr.yOffset = 0;\n\n      childMenuApr.childMenuHTML = '<div>' +\n        '  <div id=\"my-menu1\" class=\"list-group-item\">Menu Item 01</div>' +\n        '  <div id=\"my-menu2\" class=\"list-group-item\">Menu Item 02</div>' +\n        '  <div id=\"my-menu3\" class=\"list-group-item\">Menu Item 03</div>' +\n        '</div>';\n\n      const faCloseAnchor = 'RIGHT_TOP';\n      const faCloseX = -10;\n      const faCloseY = -componentWidth / 2 - parseInt(frameAppearance.titleBarHeight) / 2;\n      const faMenuEle = partsBuilder.buildTextButton(faMenuApr);\n      partsBuilder.appendChildMenuTo(childMenuApr, faMenuEle);\n\n      frameAppearance.addFrameComponent('menuButton', faMenuEle, faCloseX, faCloseY, faCloseAnchor);\n\n      // prepare [settings button]\n      const faSettingApr = partsBuilder.buildTextButtonAppearance();\n      faSettingApr.fa = 'fas fa-cog';\n      faSettingApr.width = componentWidth;\n      faSettingApr.height = componentHeight;\n      faSettingApr.borderRadius = 0;\n      faSettingApr.borderWidth = 0;\n      faSettingApr.captionColorDefault = 'white';\n      faSettingApr.captionColorFocused = 'white';\n      faSettingApr.captionColorHovered = 'white';\n      faSettingApr.captionColorPressed = 'gray';\n\n      // prepare [settings button's child menu]\n      const settingChildMenuApr = partsBuilder.buildChildMenuAppearance();\n      settingChildMenuApr.childMenuWidth = 200;\n      settingChildMenuApr.childMenuAlign = 'CENTER';\n      settingChildMenuApr.xOffset = 0;\n      settingChildMenuApr.yOffset = 0;\n      settingChildMenuApr.childMenuHTML = '<div class=\"list-group menu-caption\" >' +\n        '  <div id=\"my-setting1\" class=\"list-group-item\">Setting Item 01</div>' +\n        '  <div id=\"my-setting2\" class=\"list-group-item\">Setting Item 02</div>' +\n        '  <div id=\"my-setting3\" class=\"list-group-item\">Setting Item 03</div>' +\n        '</div>';\n\n      // create and place DOM element\n      const faSettingAnchor = 'RIGHT_TOP';\n      const faSettingX = -40;\n      const faSettingY = -componentWidth / 2 - parseInt(frameAppearance.titleBarHeight) / 2;\n      const faSettingEle = partsBuilder.buildTextButton(faSettingApr);\n      partsBuilder.appendChildMenuTo(settingChildMenuApr, faSettingEle);\n      frameAppearance.addFrameComponent('settingButton', faSettingEle, faSettingX, faSettingY, faSettingAnchor);\n\n\n      //  prepare [app icon]\n      const appIconApr = partsBuilder.buildImageButtonAppearance();\n      appIconApr.width = 20;\n      appIconApr.height = 20;\n      appIconApr.borderRadius = 0;\n      appIconApr.borderWidth = 0;\n      appIconApr.backgroundBoxShadow = '';\n      appIconApr.setSrc({\n        default: './icon_riversun_20.png',\n        focused: './icon_riversun_20.png',\n        hovered: './icon_riversun_20.png',\n        pressed: './icon_riversun_20.png',\n      });\n\n      // prepare [app icon's child menu]\n      const appIconChildMenuApr = partsBuilder.buildChildMenuAppearance();\n      appIconChildMenuApr.childMenuWidth = 200;\n      appIconChildMenuApr.childMenuAlign = 'LEFT';\n      appIconChildMenuApr.xOffset = 0;\n      appIconChildMenuApr.yOffset = 0;\n      appIconChildMenuApr.childMenuHTML = '<div class=\"list-group menu-caption\">' +\n        '  <div id=\"my-app-menu1\" class=\"list-group-item\">Close window</div>' +\n        '</div>';\n\n      // create and place DOM element\n      const appIconAnchor = 'LEFT_TOP';\n      const appIconX = 10;\n      const appIconY = -20 / 2 - parseInt(frameAppearance.titleBarHeight) / 2;\n      const appIconEle = partsBuilder.buildButton(appIconApr);\n      partsBuilder.appendChildMenuTo(appIconChildMenuApr, appIconEle);\n      frameAppearance.addFrameComponent('appIcon', appIconEle, appIconX, appIconY, appIconAnchor);\n\n\n    };\n    return frameAppearance;\n  }\n\n  start();\n</script>\n</body>\n</html>\n"
  },
  {
    "path": "public/examples/v160/styling-font-awesome-button/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <title>JsFrame.js example - styling: Font Awesome buttons</title>\n    <link rel=\"stylesheet\" href=\"https://use.fontawesome.com/releases/v5.6.3/css/all.css\"\n          integrity=\"sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/\" crossorigin=\"anonymous\">\n    <link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet'>\n    <link rel=\"stylesheet\" href=\"../../../index.css\">\n</head>\n<body>\n\n<h2><a href=\"../../../index.html\">JSFrame.js examples</a><span>styling: Font Awesome buttons</span>\n</h2>\n<div style=\"font-size: 16px; color: white; position: fixed; right: 20px; bottom: 10px\">\n    <a href=\"https://github.com/riversun/JSFrame.js/tree/master/public/examples/v160/styling-font-awesome-button\"\n       title=\"View source for this page on GitHub\" target=\"_blank\">View source on GitHub</a>\n</div>\n<script src=\"../../../jsframe.js\"></script>\n<script>\n  function start() {\n\n    const jsFrame = new JSFrame();\n\n    const originalStyleForWindow1 = getOriginalStyle(jsFrame.createFrameAppearance());\n    const originalStyleForWindow2 = getOriginalStyle(jsFrame.createFrameAppearance());\n    originalStyleForWindow2.titleBarColorDefault = '#009999';\n    originalStyleForWindow2.titleBarColorFocused = '#009999';\n\n    const frame2 = jsFrame.create({\n      title: 'Window2',\n      left: 500, top: 80, width: 450, height: 300,\n      style: {\n        backgroundColor: 'white',\n        overflow: 'hidden'\n      },\n      appearance: originalStyleForWindow2,\n      html: `<div style=\"height:40px;background:#00cccc;padding:10px;font-size:20px;color:white;line-height:40px;\">Application 2</div>\n<div style=\"padding:10px;font-size:20px;color:black;\">Font Awesome example</div>`\n    }).show();\n\n    const frame1 = jsFrame.create({\n      title: 'Window1',\n      left: 20, top: 80, width: 450, height: 300,\n      style: {\n        backgroundColor: 'white',\n        overflow: 'hidden'\n      },\n      appearance: originalStyleForWindow1,\n      html: `<div style=\"height:40px;background:#5f7a85;padding:10px;font-size:20px;color:white;line-height:40px;\">Application 1</div>\n<div style=\"padding:10px;font-size:20px;color:black;\">Font Awesome example</div>`\n    }).show();\n\n\n  }\n\n  /**\n   * Generate(populate values to object) the original look\n   * @param frameAppearance\n   * @returns {*}\n   */\n  function getOriginalStyle(frameAppearance) {\n\n    // [whole title bar]\n    frameAppearance.titleBarHeight = '36px';\n    // Disable default title bar class\n    frameAppearance.titleBarClassNameDefault = ' ';\n    frameAppearance.titleBarClassNameFocused = ' ';\n    frameAppearance.titleBarColorDefault = '#4e646f';\n    frameAppearance.titleBarColorFocused = '#4e646f';\n    // [title bar caption]\n    frameAppearance.titleBarCaptionFontSize = '14px';\n    frameAppearance.titleBarCaptionFontWeight = 'bold';\n\n    //To place the icon on the left, the title caption is also moved to the right\n    frameAppearance.titleBarCaptionLeftMargin = '10px';\n\n    frameAppearance.titleBarCaptionColorDefault = 'white';\n    frameAppearance.titleBarCaptionColorFocused = 'white';\n    frameAppearance.titleBarCaptionTextShadow = null;\n    frameAppearance.titleBarBorderBottomDefault = null;\n    frameAppearance.titleBarBorderBottomFocused = null;\n    frameAppearance.titleBarCaptionTextShadow = null;\n\n    // [frame border]\n    frameAppearance.frameBorderRadius = '0px';\n    frameAppearance.frameBorderWidthDefault = '0px';\n    frameAppearance.frameBorderWidthFocused = '0px';\n    frameAppearance.frameBorderColorDefault = null;\n    frameAppearance.frameBorderColorFocused = null;\n    frameAppearance.frameBorderStyle = 'solid';\n    frameAppearance.frameBoxShadow = '0px 4px 4px rgba(0, 0, 0, 0.5)';\n\n    frameAppearance.onInitialize = function() {\n\n      const partsBuilder = frameAppearance.getPartsBuilder();\n\n      const faIconWidth = 16;\n      const faIconHeight = 16;\n\n      //[close button]\n      const faCloseApr = partsBuilder.buildTextButtonAppearance();\n\n      // Set \"fa\" property to specify Font Awesome class\n      faCloseApr.fa = 'fas fa-times';\n\n      faCloseApr.width = faIconWidth;\n      faCloseApr.height = faIconHeight;\n      faCloseApr.borderRadius = 0;\n      faCloseApr.borderWidth = 0;\n      faCloseApr.captionColorDefault = 'white';\n      faCloseApr.captionColorFocused = 'white';\n      faCloseApr.captionColorHovered = 'darkgray';\n      faCloseApr.captionColorPressed = 'gray';\n\n      const faCloseEle = partsBuilder.buildTextButton(faCloseApr);\n      const faCloseAnchor = 'RIGHT_TOP';\n      const faCloseX = -10;\n      const faCloseY = -faIconWidth / 2 - parseInt(frameAppearance.titleBarHeight) / 2;\n      frameAppearance.addFrameComponent('closeButton', faCloseEle, faCloseX, faCloseY, faCloseAnchor);\n\n      // [maximize button]\n      const faMaximizeApr = partsBuilder.buildTextButtonAppearance(faCloseApr);\n      faMaximizeApr.fa = 'far fa-window-maximize';\n      const faMaximizeEle = partsBuilder.buildTextButton(faMaximizeApr);\n      const faMaximizeAnchor = 'RIGHT_TOP';\n      const faMaximizeX = -40;\n      const faMaximizeY = -faIconWidth / 2 - parseInt(frameAppearance.titleBarHeight) / 2;\n      frameAppearance.addFrameComponent('maxButton', faMaximizeEle, faMaximizeX, faMaximizeY, faMaximizeAnchor);\n\n      // [minimize button]\n      const faMinimizeApr = partsBuilder.buildTextButtonAppearance(faCloseApr);\n      faMinimizeApr.fa = 'far fa-window-minimize';\n      const faMinimizeEle = partsBuilder.buildTextButton(faMinimizeApr);\n      const faMinimizeAnchor = 'RIGHT_TOP';\n      const faMinimizeX = -70;\n      const faMinimizeY = -faIconWidth / 2 - parseInt(frameAppearance.titleBarHeight) / 2;\n      frameAppearance.addFrameComponent('minButton', faMinimizeEle, faMinimizeX, faMinimizeY, faMinimizeAnchor);\n\n\n    };\n    return frameAppearance;\n  }\n\n  start();\n</script>\n</body>\n</html>\n"
  },
  {
    "path": "public/examples/v160/styling-image-button/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <title>JsFrame.js example - styling: Image buttons</title>\n    <meta charset=\"utf-8\">\n    <link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet'>\n    <link rel=\"stylesheet\" href=\"../../../index.css\">\n    <style>\n        .jsframe-win-classic-style-default {\n            background: -webkit-linear-gradient(left, #808080, #c0c0c0);\n            background: -moz-linear-gradient(left, #808080, #c0c0c0);\n            background: linear-gradient(left, #808080, #c0c0c0);\n            border-top-left-radius: 0px;\n            border-top-right-radius: 0px;\n        }\n\n        .jsframe-win-classic-style-focused {\n            background: -webkit-linear-gradient(left, #0a246a, #a6caf0);\n            background: -moz-linear-gradient(left, #0a246a, #a6caf0);\n            background: linear-gradient(left, #0a246a, #a6caf0);\n            border-top-left-radius: 0px;\n            border-top-right-radius: 0px;\n        }\n\n    </style>\n</head>\n<body>\n\n<h2><a href=\"../../../index.html\">JSFrame.js examples</a><span>styling: Image buttons</span>\n</h2>\n<div style=\"font-size: 16px; color: white; position: fixed; right: 20px; bottom: 10px\">\n    <a href=\"https://github.com/riversun/JSFrame.js/tree/master/public/examples/v160/styling-image-button\" title=\"View source for this page on GitHub\" target=\"_blank\">View source on GitHub</a>\n</div>\n<script src=\"../../../jsframe.js\"></script>\n<script>\n  function start() {\n\n    const jsFrame = new JSFrame();\n\n    const frame2 = jsFrame.create({\n      title: 'Window2',\n      left: 360, top: 80, width: 320, height: 220,\n      style: {\n        backgroundColor: '#cccccc',\n        overflow: 'hidden'\n      },\n      appearance: getOriginalStyle(jsFrame.createFrameAppearance()),\n      html: '<div id=\"my_element\" style=\"padding:10px;font-size:20px;color:black;\">Window contents here</div>'\n    }).show();\n\n    const frame1 = jsFrame.create({\n      title: 'Window1',\n      left: 20, top: 80, width: 320, height: 220,\n      style: {\n        backgroundColor: '#cccccc',\n        overflow: 'hidden'\n      },\n      appearance: getOriginalStyle(jsFrame.createFrameAppearance()),\n      html: '<div id=\"my_element\" style=\"padding:10px;font-size:20px;color:black;\">Window contents here</div>'\n    }).show();\n\n    frame1.on('minButton', 'click', (_frame, evt) => {\n      jsFrame.showToast({\n        html: `minimize button clicked`,\n        align: 'top'\n      });\n    });\n    frame1.on('maxButton', 'click', (_frame, evt) => {\n      jsFrame.showToast({\n        html: `maximize button clicked`,\n        align: 'top'\n      });\n    });\n\n  }\n\n  /**\n   * Generate(populate values to object) the original look\n   * @param frameAppearance\n   * @returns {*}\n   */\n  function getOriginalStyle(frameAppearance) {\n\n    // [whole title bar]\n    frameAppearance.titleBarHeight = '30px';\n    frameAppearance.titleBarClassNameDefault = 'jsframe-win-classic-style-default';\n    frameAppearance.titleBarClassNameFocused = 'jsframe-win-classic-style-focused';\n\n    // [title bar caption]\n    frameAppearance.titleBarCaptionFontSize = '14px';\n    frameAppearance.titleBarCaptionFontWeight = 'bold';\n\n    //To place the icon on the left, the title caption is also moved to the right\n    frameAppearance.titleBarCaptionLeftMargin = '32px';\n\n    frameAppearance.titleBarCaptionColorDefault = '#cccccc';\n    frameAppearance.titleBarCaptionColorFocused = 'white';\n    frameAppearance.titleBarBorderBottomDefault = null;\n    frameAppearance.titleBarBorderBottomFocused = null;\n    frameAppearance.titleBarCaptionTextShadow = null;\n\n    // [frame border]\n    frameAppearance.frameBorderRadius = '0px';\n    frameAppearance.frameBorderWidthDefault = '2px';\n    frameAppearance.frameBorderWidthFocused = '2px';\n    frameAppearance.frameBorderColorDefault = '#cecece';\n    frameAppearance.frameBorderColorFocused = '#cecece';\n    frameAppearance.frameBorderStyle = 'outset';\n    frameAppearance.frameBoxShadow = '2px 2px 2px rgba(0, 0, 0, 0.2)';\n\n    frameAppearance.onInitialize = function() {\n\n      const partsBuilder = frameAppearance.getPartsBuilder();\n\n      const imgWidth = 20;\n      const imgHeight = 20;\n\n\n      // [Create close button with image src]\n      const closeButtonApr = partsBuilder.buildImageButtonAppearance();\n      closeButtonApr.width = imgWidth;\n      closeButtonApr.height = imgHeight;\n      closeButtonApr.borderRadius = 0;\n      closeButtonApr.borderWidth = 0;\n      closeButtonApr.backgroundBoxShadow = '';\n      closeButtonApr.setSrc({\n        default: './icon_wc_close_default.png',\n        focused: './icon_wc_close_default.png',\n        hovered: './icon_wc_close_default.png',\n        pressed: './icon_wc_close_pressed.png',\n      });\n\n      // Creates an actual DOM element from the specified appearance\n      const closeButtonEle = partsBuilder.buildTextButton(closeButtonApr);\n\n      // Specifies an offset anchor for positioning a button element from the (right,top) of the window.\n      const closeButtonAnchor = 'RIGHT_TOP';\n      const closeButtonX = -5;\n      const closeButtonY = -imgWidth / 2 - parseInt(frameAppearance.titleBarHeight) / 2;\n      // Give it a reserved name \"closeButton\" to indicate that this is a \"close button\".\n      frameAppearance.addFrameComponent('closeButton', closeButtonEle, closeButtonX, closeButtonY, closeButtonAnchor);\n\n\n      // [Create maximize button with image src]\n\n      // If you specify an appearance as an argument, the property in appearance will be cloned,\n      // so you can skip setting the same value again with the clone effect if the property value is the same.\n      const maximizeButtonApr = partsBuilder.buildImageButtonAppearance(closeButtonApr);\n\n      maximizeButtonApr.setSrc({\n        default: './icon_wc_maximize_default.png',\n        focused: './icon_wc_maximize_default.png',\n        hovered: './icon_wc_maximize_default.png',\n        pressed: './icon_wc_maximize_pressed.png',\n      });\n      const maximizeButtonEle = partsBuilder.buildButton(maximizeButtonApr);\n      const maximizeButtonAnchor = 'RIGHT_TOP';\n      const maximizeButtonX = -28;\n      const maximizeButtonY = -imgWidth / 2 - parseInt(frameAppearance.titleBarHeight) / 2;\n      frameAppearance.addFrameComponent('maxButton', maximizeButtonEle, maximizeButtonX, maximizeButtonY, maximizeButtonAnchor);\n\n\n      // [Create minimize button with image src]\n      const minimizeButtonApr = partsBuilder.buildImageButtonAppearance(closeButtonApr);\n      minimizeButtonApr.setSrc({\n        default: './icon_wc_minimize_default.png',\n        focused: './icon_wc_minimize_default.png',\n        hovered: './icon_wc_minimize_default.png',\n        pressed: './icon_wc_minimize_pressed.png',\n      });\n      const minimizeButtonEle = partsBuilder.buildButton(minimizeButtonApr);\n      const minimizeButtonAnchor = 'RIGHT_TOP';\n      const minimizeButtonX = -48;\n      const minimizeButtonY = -imgWidth / 2 - parseInt(frameAppearance.titleBarHeight) / 2;\n      frameAppearance.addFrameComponent('minButton', minimizeButtonEle, minimizeButtonX, minimizeButtonY, minimizeButtonAnchor);\n\n      // [Create app icon with image src]\n      const appIconApr = partsBuilder.buildTextButtonAppearance(closeButtonApr);\n      appIconApr.cursor = 'default';\n      appIconApr.setSrc({\n        default: './icon_riversun_20.png',\n        focused: './icon_riversun_20.png',\n        hovered: './icon_riversun_20.png',\n        pressed: './icon_riversun_20.png',\n      });\n      const appIconEle = partsBuilder.buildButton(appIconApr);\n      const appIconAnchor = 'LEFT_TOP';\n      const appIconX = 5;\n      const appIconY = -imgWidth / 2 - parseInt(frameAppearance.titleBarHeight) / 2;\n      frameAppearance.addFrameComponent('appIcon', appIconEle, appIconX, appIconY, appIconAnchor);\n\n\n    };\n    return frameAppearance;\n  }\n\n  start();\n</script>\n</body>\n</html>\n"
  },
  {
    "path": "public/examples/v160/styling-popup/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <title>JsFrame.js example - styling: popup style window</title>\n    <link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet'>\n    <link rel=\"stylesheet\" href=\"../../../index.css\">\n</head>\n<body>\n<h2><a href=\"../../../index.html\">JSFrame.js examples</a><span>styling: popup style window</span>\n</h2>\n<div style=\"font-size: 16px; color: white; position: fixed; right: 20px; bottom: 10px\">\n    <a href=\"https://github.com/riversun/JSFrame.js/tree/master/public/examples/v160/styling-popup\"\n       title=\"View source for this page on GitHub\" target=\"_blank\">View source on GitHub</a>\n</div>\n<script src=\"../../../jsframe.js\"></script>\n<script>\n  function start() {\n\n    const jsFrame = new JSFrame();\n\n    // A frame appearance is a container in which parameters for the appearance of a window are defined.\n    // To change the appearance of the window, you can specify the Frame Appearance parameter.\n    const appearance = jsFrame.createFrameAppearance();\n    jsFrame.create({\n      title: 'Popup style',\n      left: 20, top: 80, width: 320, height: 220,\n      style: {\n        backgroundColor: 'rgba(255,255,255,0.9)',\n        overflow: 'hidden'\n      },\n      appearance: getOriginalStyle(appearance),\n      html: '<div id=\"my_element\" style=\"padding:10px;font-size:20px;color:darkgray;\">Popup style window</div>'\n    }).show();\n\n  }\n\n  /**\n   * Generate(populate values to object) the original look\n   * @param frameAppearance\n   * @returns {*}\n   */\n  function getOriginalStyle(frameAppearance) {\n\n    // Specifies parameters for the appearance of the window,\n    // such as the title bar and border.\n    frameAppearance.titleBarHeight = '0px';// no title bar\n    frameAppearance.frameBorderRadius = '6px';\n    frameAppearance.frameBorderWidthDefault = '1px';\n    frameAppearance.frameBorderWidthFocused = '1px';\n    frameAppearance.frameBorderColorDefault = '#ffffff';\n    frameAppearance.frameBorderColorFocused = '#666666';\n    frameAppearance.frameBorderStyle = 'solid';\n    frameAppearance.frameBoxShadow = '10px 10px 10px rgba(0, 0, 0, 0.2)';\n    frameAppearance.frameBorderStyle = 'solid';\n    frameAppearance.frameComponents = [];\n    frameAppearance.frameHeightAdjust = 1;\n\n    frameAppearance.onInitialize = function() {\n\n      // Create an original \"close button\".\n      // Decide which part of the window the close button should be placed in, and\n      // To create an original button, we declare a class called Text Button,\n      // which we get using the helper class called Parts Builder\n      const partsBuilder = frameAppearance.getPartsBuilder();\n      const closeButtonApr = partsBuilder.buildTextButtonAppearance();\n      closeButtonApr.width = 20;\n      closeButtonApr.height = 20;\n      closeButtonApr.borderRadius = 10;\n      closeButtonApr.borderWidth = 1;\n      closeButtonApr.borderColorDefault = '#cccccc';\n      closeButtonApr.borderColorFocused = '#cccccc';\n      closeButtonApr.borderColorHovered = '#dddddd';\n      closeButtonApr.borderColorPressed = '#eeeeee';\n      closeButtonApr.borderStyleDefault = 'solid';\n      closeButtonApr.borderStyleFocused = closeButtonApr.borderStyleDefault;\n      closeButtonApr.borderStyleHovered = closeButtonApr.borderStyleDefault;\n      closeButtonApr.borderStylePressed = closeButtonApr.borderStyleDefault;\n      closeButtonApr.backgroundColorDefault = 'white';\n      closeButtonApr.backgroundColorFocused = 'white';\n      closeButtonApr.backgroundColorHovered = '#eeeeee';\n      closeButtonApr.backgroundColorPressed = '#dddddd';\n      closeButtonApr.backgroundBoxShadow = '5px 5px 5px  rgba(0, 0, 0, 0.2)';\n      closeButtonApr.caption = '\\u2716';// Using text to represent the close mark\n      closeButtonApr.captionColorDefault = 'black';\n      closeButtonApr.captionColorFocused = 'black';\n      closeButtonApr.captionColorHovered = 'red';\n      closeButtonApr.captionColorPressed = 'red';\n      //If you use captionShiftYpx, you can fine-tune the y-direction according to the drawing situation of the font.\n      closeButtonApr.captionShiftYpx = 1;\n      closeButtonApr.captionFontRatio = 0.6;\n\n      // Specify the button appearance\n      // when the close button is created using the Part Builder.\n      const closeButtonEle = partsBuilder.buildTextButton(closeButtonApr);\n      const closeButtonAnchor = 'RIGHT_TOP';\n      const x = 10;\n      const y = -12 - parseInt(frameAppearance.titleBarHeight);\n\n      // Give it a reserved name \"closeButton\" to indicate that this is a \"close button\".\n      frameAppearance.addFrameComponent('closeButton', closeButtonEle, x, y, closeButtonAnchor);\n    };\n    return frameAppearance;\n  }\n\n  start();\n</script>\n</body>\n</html>\n"
  },
  {
    "path": "public/examples/v160/styling-show-hide-buttons/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <title>JsFrame.js example - style: Show and hide buttons on title bar</title>\n    <meta charset=\"utf-8\">\n    <link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet'>\n    <link rel=\"stylesheet\" href=\"../../../index.css\">\n    <link rel=\"stylesheet\" href=\"https://use.fontawesome.com/releases/v5.6.3/css/all.css\"\n          integrity=\"sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/\" crossorigin=\"anonymous\">\n    <style>\n        .window-content {\n            height: 40px;\n            background: #00cccc;\n            padding: 10px;\n            font-size: 20px;\n        }\n    </style>\n</head>\n<body>\n\n<h2><a href=\"../../../index.html\">JSFrame.js examples</a><span>style: Show and hide buttons on title bar</span>\n</h2>\n<div style=\"font-size: 16px; color: white; position: fixed; right: 20px; bottom: 10px\">\n    <a href=\"https://github.com/riversun/JSFrame.js/tree/master/public/examples/v160/styling-show-hide-buttons\"\n       title=\"View source for this page on GitHub\" target=\"_blank\">View source on GitHub</a>\n</div>\n<script src=\"../../../jsframe.js\"></script>\n<script>\n  function start() {\n\n    const jsFrame = new JSFrame();\n    const originalStyleForWindow2 = getOriginalStyle(jsFrame.createFrameAppearance());\n\n    const frame = jsFrame.create({\n      title: 'Window',\n      left: 20, top: 80, width: 450, height: 300,\n      style: {\n        backgroundColor: 'white',\n        overflow: 'hidden'\n      },\n      appearance: originalStyleForWindow2,\n      html: `<div class=\"window-content\"></div>\n<button id=\"btn0\" class=\"btn-secondary m-1 w-100\">Hide close button</button>\n<button id=\"btn2\" class=\"btn-secondary m-1 w-100\">Hide maximize button</button>\n<br>\n<button id=\"btn1\" class=\"btn-primary m-1 w-100\">Show close button</button>\n<button id=\"btn3\" class=\"btn-primary m-1 w-100\">Show maximize button</button>\n`\n    }).show();\n\n    frame.on('#btn0', 'click', (_frame, evt) => {\n      _frame.hideFrameComponent('closeButton');\n    });\n\n    frame.on('#btn1', 'click', (_frame, evt) => {\n      _frame.showFrameComponent('closeButton');\n    });\n    frame.on('#btn2', 'click', (_frame, evt) => {\n      _frame.hideFrameComponent('maxButton');\n    });\n\n    frame.on('#btn3', 'click', (_frame, evt) => {\n      _frame.showFrameComponent('maxButton');\n    });\n  }\n\n  /**\n   * Generate(populate values to object) the original look\n   * @param frameAppearance\n   * @returns {*}\n   */\n  function getOriginalStyle(frameAppearance) {\n\n    // [whole title bar]\n    frameAppearance.titleBarHeight = '36px';\n    // Disable default title bar class\n    frameAppearance.titleBarClassNameDefault = ' ';\n    frameAppearance.titleBarClassNameFocused = ' ';\n    frameAppearance.titleBarColorDefault = '#009999';\n    frameAppearance.titleBarColorFocused = '#009999';\n\n    // [title bar caption]\n    frameAppearance.titleBarCaptionFontSize = '14px';\n    frameAppearance.titleBarCaptionFontWeight = 'bold';\n\n    //To place the icon on the left, the title caption is also moved to the right\n    frameAppearance.titleBarCaptionLeftMargin = '10px';\n\n    frameAppearance.titleBarCaptionColorDefault = 'white';\n    frameAppearance.titleBarCaptionColorFocused = 'white';\n    frameAppearance.titleBarCaptionTextShadow = null;\n    frameAppearance.titleBarBorderBottomDefault = null;\n    frameAppearance.titleBarBorderBottomFocused = null;\n    frameAppearance.titleBarCaptionTextShadow = null;\n\n    // [frame border]\n    frameAppearance.frameBorderRadius = '0px';\n    frameAppearance.frameBorderWidthDefault = '0px';\n    frameAppearance.frameBorderWidthFocused = '0px';\n    frameAppearance.frameBorderColorDefault = null;\n    frameAppearance.frameBorderColorFocused = null;\n    frameAppearance.frameBorderStyle = 'solid';\n    frameAppearance.frameBoxShadow = '0px 4px 4px rgba(0, 0, 0, 0.5)';\n\n    frameAppearance.onInitialize = function() {\n\n      const partsBuilder = frameAppearance.getPartsBuilder();\n\n      const faIconWidth = 16;\n      const faIconHeight = 16;\n\n      //[close button]\n      const faCloseApr = partsBuilder.buildTextButtonAppearance();\n\n      // Specify Font Awesome class\n      faCloseApr.fa = 'fas fa-times';\n\n      faCloseApr.width = faIconWidth;\n      faCloseApr.height = faIconHeight;\n      faCloseApr.borderRadius = 0;\n      faCloseApr.borderWidth = 0;\n      faCloseApr.captionColorDefault = 'white';\n      faCloseApr.captionColorFocused = 'white';\n      faCloseApr.captionColorHovered = 'darkgray';\n      faCloseApr.captionColorPressed = 'gray';\n\n      const faCloseEle = partsBuilder.buildTextButton(faCloseApr);\n      const faCloseAnchor = 'RIGHT_TOP';\n      const faCloseX = -10;\n      const faCloseY = -faIconWidth / 2 - parseInt(frameAppearance.titleBarHeight) / 2;\n      frameAppearance.addFrameComponent('closeButton', faCloseEle, faCloseX, faCloseY, faCloseAnchor);\n\n      // [maximize button]\n      const faMaximizeApr = partsBuilder.buildTextButtonAppearance(faCloseApr);\n      faMaximizeApr.fa = 'far fa-window-maximize';\n      const faMaximizeEle = partsBuilder.buildTextButton(faMaximizeApr);\n      const faMaximizeAnchor = 'RIGHT_TOP';\n      const faMaximizeX = -40;\n      const faMaximizeY = -faIconWidth / 2 - parseInt(frameAppearance.titleBarHeight) / 2;\n      frameAppearance.addFrameComponent('maxButton', faMaximizeEle, faMaximizeX, faMaximizeY, faMaximizeAnchor);\n\n\n    };\n    return frameAppearance;\n  }\n\n  start();\n</script>\n</body>\n</html>\n"
  },
  {
    "path": "public/examples/v160/styling-thick-title-bar/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <title>JsFrame.js example - styling: thick title bar</title>\n    <link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet'>\n    <link rel=\"stylesheet\" href=\"../../../index.css\">\n</head>\n<body>\n<h2><a href=\"../../../index.html\">JSFrame.js examples</a><span>styling: thick title bar</span>\n</h2>\n<div style=\"font-size: 16px; color: white; position: fixed; right: 20px; bottom: 10px\">\n    <a href=\"https://github.com/riversun/JSFrame.js/tree/master/public/examples/v160/styling-thick-title-bar\"\n       title=\"View source for this page on GitHub\" target=\"_blank\">View source on GitHub</a>\n</div>\n<script src=\"../../../jsframe.js\"></script>\n<script>\n  function start() {\n\n    var jsFrame = new JSFrame();\n\n    // A frame appearance is a container in which parameters for the appearance of a window are defined.\n    // To change the appearance of the window, you can specify the Frame Appearance parameter.\n\n    jsFrame.create({\n      title: 'Rectangle window1',\n      left: 20, top: 80, width: 320, height: 220,\n      style: {\n        backgroundColor: 'rgba(255,255,255,0.9)',\n        overflow: 'hidden'\n      },\n      appearance: getOriginalStyle(jsFrame.createFrameAppearance()),\n      html: '<div id=\"my_element\" style=\"padding:10px;font-size:20px;color:darkgray;\">Custom styled window</div>'\n    }).show();\n\n    jsFrame.create({\n      title: 'Rectangle window2',\n      left: 360, top: 80, width: 320, height: 220,\n      style: {\n        backgroundColor: 'rgba(255,255,255,0.9)',\n        overflow: 'hidden'\n      },\n      appearance: getOriginalStyle(jsFrame.createFrameAppearance()),\n      html: '<div id=\"my_element\" style=\"padding:10px;font-size:20px;color:darkgray;\">Custom styled window</div>'\n    }).show();\n\n  }\n\n  /**\n   * Generate(populate values to object) the original look\n   * @param frameAppearance\n   * @returns {*}\n   */\n  function getOriginalStyle(frameAppearance) {\n\n    // Specifies parameters for the appearance of the window,\n    // such as the title bar and border.\n    frameAppearance.titleBarHeight = '60px';\n    frameAppearance.titleBarCaptionFontSize = '22px';\n    frameAppearance.titleBarCaptionFontWeight = 'bold';\n    frameAppearance.titleBarCaptionLeftMargin = '10px';\n    frameAppearance.titleBarCaptionColorDefault = 'gray';\n    frameAppearance.titleBarCaptionColorFocused = 'white';\n    frameAppearance.titleBarCaptionTextShadow = null;//'0 1px 0 rgba(255,255,255,.7)';\n    frameAppearance.titleBarColorDefault = 'black';\n    frameAppearance.titleBarColorFocused = 'black';\n    frameAppearance.titleBarBorderBottomDefault = null;\n    frameAppearance.titleBarBorderBottomFocused = null;\n    frameAppearance.frameBorderRadius = '0px';\n    frameAppearance.frameBorderWidthDefault = '1px';\n    frameAppearance.frameBorderWidthFocused = '1px';\n    frameAppearance.frameBorderColorDefault = 'black';\n    frameAppearance.frameBorderColorFocused = 'red';\n\n    // Disable default title bar class\n    frameAppearance.titleBarClassNameDefault = ' ';\n    frameAppearance.titleBarClassNameFocused = ' ';\n\n    frameAppearance.onInitialize = function() {\n\n      // Create an original \"close button\".\n      // Decide which part of the window the close button should be placed in, and\n      // To create an original button, we declare a class called Text Button,\n      // which we get using the helper class called Parts Builder\n      var partsBuilder = frameAppearance.getPartsBuilder();\n      var closeButtonApr = partsBuilder.buildTextButtonAppearance();\n      closeButtonApr.width = 40;\n      closeButtonApr.height = 40;\n      closeButtonApr.borderRadius = 0;\n      closeButtonApr.borderWidth = 0;\n      closeButtonApr.borderColorDefault = 'transparent';\n      closeButtonApr.borderColorFocused = 'transparent';\n      closeButtonApr.borderColorHovered = 'transparent';\n      closeButtonApr.borderColorPressed = 'transparent';\n      closeButtonApr.borderStyleDefault = '';\n      closeButtonApr.borderStyleFocused = closeButtonApr.borderStyleDefault;\n      closeButtonApr.borderStyleHovered = closeButtonApr.borderStyleDefault;\n      closeButtonApr.borderStylePressed = closeButtonApr.borderStyleDefault;\n      closeButtonApr.backgroundColorDefault = 'transparent';\n      closeButtonApr.backgroundColorFocused = 'transparent';\n      closeButtonApr.backgroundColorHovered = 'rgba(255, 0, 0, 0.2)';\n      closeButtonApr.backgroundColorPressed = 'rgba(255, 0, 0, 0.2)';\n      closeButtonApr.backgroundBoxShadow = null;\n      closeButtonApr.caption = '\\u2716';// Using text to represent the close mark\n      closeButtonApr.captionColorDefault = 'gray';\n      closeButtonApr.captionColorFocused = 'white';\n      closeButtonApr.captionColorHovered = 'white';\n      closeButtonApr.captionColorPressed = 'white';\n      closeButtonApr.captionShiftYpx = 1;\n      closeButtonApr.captionFontRatio = 0.6;\n\n      // Specify the button appearance\n      // when the close button is created using the Part Builder.\n      var closeButtonEle = partsBuilder.buildTextButton(closeButtonApr);\n      var closeButtonAnchor = 'RIGHT_TOP';\n      var closeButtonX = -10;\n      var closeButtonY = -closeButtonApr.height / 2 - parseInt(frameAppearance.titleBarHeight) / 2;\n\n      // Give it a reserved name \"closeButton\" to indicate that this is a \"close button\".\n      frameAppearance.addFrameComponent('closeButton', closeButtonEle, closeButtonX, closeButtonY, closeButtonAnchor);\n    };\n    return frameAppearance;\n  }\n\n  start();\n</script>\n</body>\n</html>\n"
  },
  {
    "path": "public/examples/v160/window-in-window/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <title>JsFrame.js example - Create a window inside a window</title>\n    <link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet'>\n    <link rel=\"stylesheet\" href=\"../../../index.css\">\n\n</head>\n<body>\n\n<h2><a href=\"../../../index.html\">JSFrame.js examples</a><span> Create a window inside a window</span>\n</h2>\n<span>If you want to nest frames like window-in-window, call setFrameInFrame(true) on the parent frame</span>\n<div style=\"font-size: 16px; color: white; position: fixed; right: 20px; bottom: 10px\">\n    <a href=\"https://github.com/riversun/JSFrame.js/tree/master/public/examples/v160/window-in-window\"\n       title=\"View source for this page on GitHub\" target=\"_blank\">View source on GitHub</a>\n</div>\n<script src=\"../../../jsframe.js\"></script>\n<script>\n\n  const parentJsFrame = new JSFrame();\n\n  const HTML = '<img style=\"margin: auto;position: absolute;top: 0;left: 0;right: 0;bottom: 0;width:100%;height:auto;user-select: none\" ' +\n    'src=\"https://upload.wikimedia.org/wikipedia/commons/e/ec/Golden_Gate_Bridge_1.jpg\">';\n\n  const parentFrame = parentJsFrame.create({\n    name: `Win0`,\n    title: `I'm a parent.`,\n    left: 20,\n    top: 100,\n    width: 640,\n    clientHeight: 480,\n    style: {\n      backgroundColor: 'rgba(0,0,0,1.0)',\n      overflow: 'hidden'\n    },\n    appearanceName: 'yosemite',\n    html: `<div id=\"parent-window-content\" style=\"width:100%;height:100%;\">${HTML}</div>`,\n  });\n\n  parentFrame.setControl({\n    maximizeButton: 'zoomButton',\n    maximizeParam: {\n      fullScreen: true,\n      restoreKey: 'Escape',\n    },\n    demaximizeButton: 'dezoomButton',\n    deminimizeButton: 'deminimizeButton',\n    hideButton: 'minimizeButton',\n    hideParam: {\n      align: 'ABSOLUTE',\n      offset: {\n        x: 0, y: 0,\n      },\n      duration: 300\n    },\n    dehideParam: {\n      duration: 300\n    },\n    styleDisplay: 'inline',\n    animation: true,\n    animationDuration: 100,//The whole animation duration(millisec)\n  });\n\n  // If you want to nest frames like window-in-window, call setFrameInFrame(true) on the parent frame.\n  parentFrame.setFrameInFrame(true);\n\n  parentFrame.control.on('maximized', (frame, info) => {\n    parentJsFrame.showToast({\n      html: `Double click ParentWindow to restore`,\n      align: 'top',\n      duration: 2000,\n    });\n    frame.on('#parent-window-content', 'dblclick', function(_frame, e) {\n      _frame.control.doCommand('restore');\n    });\n\n  });\n\n  parentFrame.show();\n\n  const childJsFrame = new JSFrame({ parentElement: document.querySelector('#parent-window-content') });\n  const CHILD_HTML = `<div id=\"child-window-content\" style=\"width:100%;height:100%;\">\n<img id=\"child-image\" style=\"margin: auto;position: absolute;top: 0;left: 0;right: 0;bottom: 0;width:100%;height:auto;user-select: none\" src=\"https://upload.wikimedia.org/wikipedia/commons/3/3f/Rainbow_colored_Rainbow_Bridge_at_night.jpg\">\n</div>`;\n  const childFrame = childJsFrame.create({\n    name: `Win0-0`,\n    title: `I'm a child`,\n    left: 20,\n    top: 20,\n    width: 400,\n    clientHeight: 300,\n    style: {\n      backgroundColor: 'rgba(0,0,0,1.0)',\n      overflow: 'hidden'\n    },\n    appearanceName: 'yosemite',\n    html: CHILD_HTML,\n  });\n  childFrame.setFrameInFrame(true);\n  childFrame.setControl({\n    maximizeButton: 'zoomButton',\n    maximizeParam: {\n      fullScreen: true,\n      restoreKey: 'Escape',\n      matchParent: true\n    },\n    demaximizeButton: 'dezoomButton',\n    deminimizeButton: 'deminimizeButton',\n    hideButton: 'minimizeButton',\n    hideParam: {\n      align: 'ABSOLUTE',\n      offset: {\n        x: 0, y: 0,\n      },\n      duration: 300\n    },\n    dehideParam: {\n      duration: 300\n    },\n    styleDisplay: 'inline',\n    animation: true,\n    animationDuration: 100,//The whole animation duration(millisec)\n  });\n\n  childFrame.control.on('maximized', (frame, info) => {\n    parentJsFrame.showToast({\n      html: `Double click ChildWindow to restore`,\n      align: 'top',\n      duration: 2000,\n    });\n    frame.on('#child-image', 'dblclick', function(_frame, e) {\n      e.stopPropagation();\n      _frame.control.doCommand('restore');\n    });\n\n  });\n  childFrame.show();\n\n\n  const grandchildJsFrame = new JSFrame({ parentElement: document.querySelector('#child-window-content') });\n  const GRAND_CHILD_HTML = '<img id=\"grandchild-image\" style=\"margin: auto;position: absolute;top: 0;left: 0;right: 0;bottom: 0;width:100%;height:auto;user-select: none\" ' +\n    'src=\"https://upload.wikimedia.org/wikipedia/commons/thumb/0/00/Yokohama_bay_bridge.jpg/640px-Yokohama_bay_bridge.jpg\">';\n  const grandchildFrame = grandchildJsFrame.create({\n    name: `Win0-0-0`,\n    title: `I'm a grandchild`,\n    left: 20,\n    top: 20,\n    width: 240,\n    clientHeight: 180,\n    style: {\n      backgroundColor: 'rgba(0,0,0,1.0)',\n      overflow: 'hidden'\n    },\n    appearanceName: 'yosemite',\n    html: GRAND_CHILD_HTML,\n  });\n  grandchildFrame.setFrameInFrame(true);\n  grandchildFrame.setControl({\n    maximizeButton: 'zoomButton',\n    maximizeParam: {\n      fullScreen: true,\n      restoreKey: 'Escape',\n      matchParent: true\n    },\n    demaximizeButton: 'dezoomButton',\n    deminimizeButton: 'deminimizeButton',\n    hideButton: 'minimizeButton',\n    hideParam: {\n      align: 'ABSOLUTE',\n      offset: {\n        x: 0, y: 0,\n      },\n      duration: 300\n    },\n    dehideParam: {\n      duration: 300\n    },\n    styleDisplay: 'inline',\n    animation: true,\n    animationDuration: 100,//The whole animation duration(millisec)\n  });\n\n  grandchildFrame.control.on('maximized', (frame, info) => {\n    parentJsFrame.showToast({\n      html: `Double click ChildWindow to restore`,\n      align: 'top',\n      duration: 2000,\n    });\n    frame.on('#grandchild-image', 'dblclick', function(_frame, e) {\n      e.stopPropagation();\n      _frame.control.doCommand('restore');\n    });\n\n  });\n  grandchildFrame.show();\n</script>\n</body>\n</html>\n"
  },
  {
    "path": "public/examples/v160/window-order/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <title>JsFrame.js example - Window display order</title>\n    <link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet'>\n    <link rel=\"stylesheet\" href=\"../../../index.css\">\n    <style>\n        .bar {\n            position: relative;\n            left: 30px;\n            width: 360px;\n            height: 30px;\n            background: deepskyblue;\n        }\n    </style>\n</head>\n<body>\n\n<h2><a href=\"../../../index.html\">JSFrame.js examples</a><span> Window display order</span>\n</h2>\n<span>To adjust the order of the window and other elements, specify <code>parentElement</code> in the initialization.\n    The idea is to specify the z-index of <code>parentElement</code>.<br>\n    (The order in which the window's <code>parentElement</code> and other elements are displayed follows\n    <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Positioning/Understanding_z_index/The_stacking_context\">\n        stack context</a> rendering order.)\n</span>\n<br><br>\n\n\n<div id=\"my-parent\" style=\"position:relative;z-index:1\"></div>\n<div class=\"bar\" style=\"z-index:2; top: 60px;\"></div>\n<div class=\"bar\" style=\"z-index:0; top: 90px;\"></div>\n<div class=\"bar\" style=\"z-index:2; top: 120px;\"></div>\n<div class=\"bar\" style=\"z-index:0; top: 150px;\"></div>\n<div class=\"bar\" style=\"z-index:2; top: 180px;\"></div>\n<div class=\"bar\" style=\"z-index:0; top: 210px;\"></div>\n\n\n<div style=\"font-size: 16px; color: white; position: fixed; right: 20px; bottom: 10px\">\n    <a href=\"https://github.com/riversun/JSFrame.js/tree/master/public/examples/v160/window-order\"\n       title=\"View source for this page on GitHub\" target=\"_blank\">View source on GitHub</a>\n</div>\n<script src=\"../../../jsframe.js\"></script>\n<script>\n  const jsFrame = new JSFrame({ parentElement: document.querySelector('#my-parent') });\n  jsFrame.create({\n    name: `Win0`,\n    title: `I live in parentElement.`,\n    left: 60,\n    top: 0,\n    width: 300,\n    height: 450,\n    appearanceName: 'yosemite',\n    html: `<div class=\"window-content\"></div>`,\n  }).show();\n</script>\n</body>\n</html>\n"
  },
  {
    "path": "public/index.css",
    "content": "\nbody {\n    margin: 8px;\n    display: block;\n\n    font-family: 'Roboto';\n    font-weight: lighter;\n    font-size: 16px;\n    color: #666666;\n}\n\nh2 {\n    display: block;\n    font-size: 1.5em;\n    -webkit-margin-before: 0.83em;\n    -webkit-margin-after: 0.83em;\n    -webkit-margin-start: 0;\n    -webkit-margin-end: 0;\n    font-weight: normal;\n    border-bottom: 1px solid #bbb;\n}\n\nh2 span {\n    color: #666666;\n    white-space: nowrap;\n}\n\nli {\n    padding-bottom: 5px;\n}\n\na {\n    color: #6aa0d0;\n    text-decoration: none;\n}\n\ncode {\n    background: #dddddd;\n    margin: 5px;\n}\n\na:hover {\n    text-decoration: underline;\n}\n\nh2 a {\n    font-weight: 300;\n    margin: 0 10px 0 0;\n    white-space: nowrap;\n}\n\n\n.btn-primary {\n    display: inline-block;\n    line-height: 30px;\n    color: #FFF;\n    text-decoration: none;\n    text-align: center;\n    background-color: #428bca;\n    border-color: #357ebd;\n    border-radius: 5px;\n    border-width: 0px;\n    margin: 5px;\n    -webkit-transition: all 0.5s;\n    transition: all 0.5s;\n}\n\n.btn-primary:hover {\n    background-color: #3276b1;\n    border-color: #285e8e;\n}\n\n.btn-primary:focus {\n    outline: none;\n}\n\n.btn-secondary {\n    display: inline-block;\n    line-height: 30px;\n    color: #FFF;\n    text-decoration: none;\n    text-align: center;\n    background-color: #6c757d;\n    border-radius: 5px;\n    border-width: 0px;\n    border-color: transparent;\n    margin: 5px;\n    -webkit-transition: all 0.5s;\n    transition: all 0.5s;\n}\n\n.btn-secondary:hover {\n    background-color: #5b636a;\n}\n\n.btn-secondary:focus {\n    outline: none;\n}\n\n.btn-success {\n    display: inline-block;\n    line-height: 30px;\n    color: #FFF;\n    text-decoration: none;\n    text-align: center;\n    background-color: #28a745;\n    border-radius: 5px;\n    border-width: 0px;\n    margin: 5px;\n    -webkit-transition: all 0.5s;\n    transition: all 0.5s;\n}\n\n.btn-success:hover {\n    background-color: #218d3a;\n}\n\n.btn-success:focus {\n    outline: none;\n}\n\n\n.window-content {\n    font-size: 14px;\n    padding: 10px;\n    color: #666666;\n    user-select: none;\n}\n\n"
  },
  {
    "path": "public/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <title>Examples of JSFrame.js</title>\n    <link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet'>\n    <link rel=\"stylesheet\" href=\"index.css\">\n</head>\n<body>\n\n<div id=\"container\">\n\n    <h1>JSFrame examples</h1>\n\n    <section>\n        <p>\n            This is a small sample code collection using <a href=\"https://github.com/riversun/JSFrame.js\"\n                                                            target=\"_blank\">JSFrame</a>.\n            All of the code presented here can be found on <a href=\"https://github.com/riversun/JSFrame.js\">GitHub</a>.\n        </p>\n    </section>\n\n    <section>\n\n        <h2>Window creation:</a>\n        </h2>\n        <p>Create a window and the basic use of windows</p>\n        <ul>\n            <li><a href=\"examples/v160/simple/index.html\" target=\"_blank\"><b>Create a window</b> with content written in\n                HTML</a><br>\n            </li>\n            <li><a href=\"examples/v160/iframe/index.html\" target=\"_blank\">Using <b>iframe</b> for window content</a><br>\n            </li>\n            <li><a href=\"examples/v160/position/index.html\" target=\"_blank\">Set window <b>position</b> and\n                <b>size</b></a><br></li>\n        </ul>\n        <h2>Event handling:</h2>\n        <p>How to handle window events and the events of the content in the window</p>\n        <ul>\n            <li><a href=\"examples/v160/event-handling-pos-size/index.html\" target=\"_blank\">Handling <b>move</b> and <b>resize</b>\n                events.</a><br></li>\n            <li><a href=\"examples/v160/fine-tune-resize-area/index.html\" target=\"_blank\">Changing the <b>resize area</b>\n                to adjust <b>sensitivity</b>\n                by mouse or touch</b></a><br></li>\n            <li><a href=\"examples/v160/event-handling-like-click/index.html\" target=\"_blank\">Handling of content <b>click\n                events,\n                etc.</b></a><br></li>\n            <li><a href=\"examples/v160/focus/index.html\" target=\"_blank\">Focusing a window and <b>focus</b>(get\n                focus),<b>blur</b>(lost\n                focus) handling</b></a><br></li>\n        </ul>\n        <h2>Styling and look:</h2>\n        <p>Customize the look of your windows</p>\n        <ul>\n            <li><a href=\"examples/v160/styling/index.html\" target=\"_blank\">custom style: Rounded button on the corner\n                with <b>no title\n                    bar</b></a>\n            </li>\n            <li><a href=\"examples/v160/styling-image-button/index.html\" target=\"_blank\">custom style:Using <b>Image\n                buttons and\n                icons</b> on title bar</a></li>\n            <li><a href=\"examples/v160/styling-font-awesome-button/index.html\" target=\"_blank\">custom style: Using <b>Font\n                Awesome\n                buttons and icons</b> on title bar</a></li>\n            <li><a href=\"examples/v160/styling-show-hide-buttons/index.html\" target=\"_blank\">custom style: <b>Show</b>\n                and <b>hide</b>\n                buttons on title bar</a></li>\n            <li><a href=\"examples/v160/styling-button-child-menu/index.html\" target=\"_blank\">custom style: <b>Child\n                menu</b> for buttons\n                on title bar</a></li>\n            <li><a href=\"examples/v160/styling-popup/index.html\" target=\"_blank\">custom style: <b>Popup</b> style window</a>\n            </li>\n            <li><a href=\"examples/v160/styling-thick-title-bar/index.html\" target=\"_blank\">custom style: <b>Thick title\n                bar</b></a></li>\n            <li><a href=\"examples/v160/preset-apr-yosemite/index.html\" target=\"_blank\">preset style: <b>Yosemite</b></a>\n            </li>\n            <li><a href=\"examples/v160/preset-window-yosemite/index.html\" target=\"_blank\">preset window: <b>Yosemite</b></a>\n            </li>\n            <li><a href=\"examples/v150/preset_yosemite.html\" target=\"_blank\">(*)preset_yosemite.html - Preset style demo\n                'yosemite'</a>\n                <small style=\"color:gray\">* This example code is for v1.5 or later and will be updated in the future\n                </small>\n            </li>\n            <li><a href=\"examples/v150/preset_win10.html\" target=\"_blank\">(*)preset_win10.html - Preset style demo\n                'redstone' like\n                win10</a>\n                <small style=\"color:gray\">* This example code is for v1.5 or later and will be updated in the future\n                </small>\n            </li>\n            <li><a href=\"examples/v150/preset_material.html\" target=\"_blank\">(*)preset_material.html- Preset style demo\n                'material'</a>\n                <small style=\"color:gray\">* This example code is for v1.5 or later and will be updated in the future\n                </small>\n            </li>\n        </ul>\n\n        <h2>Alignment, Order and Where the window is created:</h2>\n        <p>Set the offset position of the entire window of jsFrame, and set the display order (z-index).</p>\n        <ul>\n\n            <li><a href=\"examples/v160/window-order/index.html\" target=\"_blank\">Adjust <b>Window display order</b> with\n                parentElement</a></li>\n            <li><a href=\"examples/v160/alignment/index.html\" target=\"_blank\"><b>Anchor</b> of the window position</a>\n            </li>\n            <li><a href=\"examples/v160/alignment-not-fixed/index.html\" target=\"_blank\"><b>Fixed</b>(scroll-independent)\n                and\n                <b>Not-fixed</b> window</a></li>\n            <li><a href=\"examples/v160/live-inside-element/index.html\" target=\"_blank\">Make the window <b>live inside</b> a\n                specific\n                element using <b>parentElement</b></a></li>\n            <li><a href=\"examples/v160/live-inside-element-with-contorl/index.html\" target=\"_blank\">Make maximized window size <b>same as a specific parentElement</b></a></li>\n            <li><a href=\"examples/v160/window-in-window/index.html\" target=\"_blank\">Create <b>a window inside a window</b>, nested windows</a></li>\n        </ul>\n        <h2>Maximize/Minimize operation:</h2>\n        <p>Controls make it easier to implement things like maximizing and minimizing windows</p>\n        <ul>\n            <li><a href=\"examples/v160/preset-window-control-cmd/index.html\" target=\"_blank\">Window <b>control commands</b></a></li>\n            <li><a href=\"examples/v150/window_control.html\" target=\"_blank\">(*)window_control.html - Window size control\n                manually</a>\n                <small style=\"color:gray\">* This example code is for v1.5 or later and will be updated in the future\n                </small>\n            </li>\n            <li><a href=\"examples/v150/preset_yosemite_auto.html\" target=\"_blank\">(*)preset_yosemite_auto.html - Preset\n                style demo\n                'yosemite'</a>\n                <small style=\"color:gray\">* This example code is for v1.5 or later and will be updated in the future\n                </small></li>\n        </ul>\n        <h2>Utilities:</h2>\n        <p></p>\n        <ul>\n            <li><a href=\"examples/v150/toast.html\" target=\"_blank\">(*)toast.html - Show toast</a>\n                <small style=\"color:gray\">* This example code is for v1.5 or later and will be updated in the future\n                </small></li>\n            <li><a href=\"examples/v150/toast_simple.html\" target=\"_blank\">(*)toast_simple.html - Show simple toast</a>\n                <small style=\"color:gray\">* This example code is for v1.5 or later and will be updated in the future\n                </small></li>\n        </ul>\n        <h2>Advanced:</h2>\n        <p></p>\n        <ul>\n            <li><a href=\"examples/v160/preset-window-yosemite-desktop\" target=\"_blank\"><b>Desktop OS</b> on the web with\n                'Yosemite'</a>\n            </li>\n            <li><a href=\"examples/v150/modal.html\" target=\"_blank\">(*)modal.html - Show modal windows</a>\n                <small style=\"color:gray\">* This example code is for v1.5 or later and will be updated in the future\n                </small></li>\n            <li><a href=\"examples/v150/chatbot_ui.html\" target=\"_blank\">(*)chatbot_ui.html - Using frame as a chat\n                container</a>\n                <small style=\"color:gray\">* This example code is for v1.5 or later and will be updated in the future\n                </small></li>\n            <li><a href=\"examples/v100/ex06/index.html\" target=\"_blank\">(*)Animation</a>\n                <small style=\"color:gray\">* This example code is for v1.0 or later and will be updated in the future\n                </small></li>\n\n        </ul>\n    </section>\n</div>\n\n\n</body>\n</html>\n"
  },
  {
    "path": "public/jsframe.js",
    "content": "/*! jsframe v1.6.2 Copyright (c) 2007-2020 Tom Misawa */\n!function(e,t){if(\"object\"==typeof exports&&\"object\"==typeof module)module.exports=t();else if(\"function\"==typeof define&&define.amd)define([],t);else{var r=t();for(var n in r)(\"object\"==typeof exports?exports:e)[n]=r[n]}}(window,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&\"object\"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,\"default\",{enumerable:!0,value:e}),2&t&&\"string\"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,\"a\",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p=\"\",r(r.s=10)}([function(e,t,r){\"use strict\";var n,o=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},a=function(){var e={};return function(t){if(void 0===e[t]){var r=document.querySelector(t);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}e[t]=r}return e[t]}}(),i=[];function l(e){for(var t=-1,r=0;r<i.length;r++)if(i[r].identifier===e){t=r;break}return t}function s(e,t){for(var r={},n=[],o=0;o<e.length;o++){var a=e[o],s=t.base?a[0]+t.base:a[0],d=r[s]||0,u=\"\".concat(s,\" \").concat(d);r[s]=d+1;var c=l(u),m={css:a[1],media:a[2],sourceMap:a[3]};-1!==c?(i[c].references++,i[c].updater(m)):i.push({identifier:u,updater:y(m,t),references:1}),n.push(u)}return n}function d(e){var t=document.createElement(\"style\"),n=e.attributes||{};if(void 0===n.nonce){var o=r.nc;o&&(n.nonce=o)}if(Object.keys(n).forEach((function(e){t.setAttribute(e,n[e])})),\"function\"==typeof e.insert)e.insert(t);else{var i=a(e.insert||\"head\");if(!i)throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");i.appendChild(t)}return t}var u,c=(u=[],function(e,t){return u[e]=t,u.filter(Boolean).join(\"\\n\")});function m(e,t,r,n){var o=r?\"\":n.media?\"@media \".concat(n.media,\" {\").concat(n.css,\"}\"):n.css;if(e.styleSheet)e.styleSheet.cssText=c(t,o);else{var a=document.createTextNode(o),i=e.childNodes;i[t]&&e.removeChild(i[t]),i.length?e.insertBefore(a,i[t]):e.appendChild(a)}}function p(e,t,r){var n=r.css,o=r.media,a=r.sourceMap;if(o?e.setAttribute(\"media\",o):e.removeAttribute(\"media\"),a&&btoa&&(n+=\"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a)))),\" */\")),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var h=null,f=0;function y(e,t){var r,n,o;if(t.singleton){var a=f++;r=h||(h=d(t)),n=m.bind(null,r,a,!1),o=m.bind(null,r,a,!0)}else r=d(t),n=p.bind(null,r,t),o=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(r)};return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else o()}}e.exports=function(e,t){(t=t||{}).singleton||\"boolean\"==typeof t.singleton||(t.singleton=o());var r=s(e=e||[],t);return function(e){if(e=e||[],\"[object Array]\"===Object.prototype.toString.call(e)){for(var n=0;n<r.length;n++){var o=l(r[n]);i[o].references--}for(var a=s(e,t),d=0;d<r.length;d++){var u=l(r[d]);0===i[u].references&&(i[u].updater(),i.splice(u,1))}r=a}}}},function(e,t,r){\"use strict\";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r=function(e,t){var r=e[1]||\"\",n=e[3];if(!n)return r;if(t&&\"function\"==typeof btoa){var o=(i=n,l=btoa(unescape(encodeURIComponent(JSON.stringify(i)))),s=\"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(l),\"/*# \".concat(s,\" */\")),a=n.sources.map((function(e){return\"/*# sourceURL=\".concat(n.sourceRoot||\"\").concat(e,\" */\")}));return[r].concat(a).concat([o]).join(\"\\n\")}var i,l,s;return[r].join(\"\\n\")}(t,e);return t[2]?\"@media \".concat(t[2],\" {\").concat(r,\"}\"):r})).join(\"\")},t.i=function(e,r,n){\"string\"==typeof e&&(e=[[null,e,\"\"]]);var o={};if(n)for(var a=0;a<this.length;a++){var i=this[a][0];null!=i&&(o[i]=!0)}for(var l=0;l<e.length;l++){var s=[].concat(e[l]);n&&o[s[0]]||(r&&(s[2]?s[2]=\"\".concat(r,\" and \").concat(s[2]):s[2]=r),t.push(s))}},t}},function(e,t,r){\n/*! merge-deeply v2.1.0 Copyright (c) 2019-2020 riversun.org@gmail.com */\ne.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&\"object\"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,\"default\",{enumerable:!0,value:e}),2&t&&\"string\"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,\"a\",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p=\"/\",r(r.s=0)}([function(e,t,r){e.exports=r(1)},function(e,t,r){\"use strict\";function n(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if(\"undefined\"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||a(e)||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 o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(\"undefined\"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,o=!1,a=void 0;try{for(var i,l=e[Symbol.iterator]();!(n=(i=l.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,a=e}finally{try{n||null==l.return||l.return()}finally{if(o)throw a}}return r}}(e,t)||a(e,t)||function(){throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()}function a(e,t){if(e){if(\"string\"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return\"Object\"===r&&e.constructor&&(r=e.constructor.name),\"Map\"===r||\"Set\"===r?Array.from(e):\"Arguments\"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function l(e){return(l=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e})(e)}function s(e,t,r){var a=function(e){return e&&\"object\"===l(e)&&!Array.isArray(e)},i=r&&r.concatArray,d={};r&&r.assignToObject&&(d=r.assignToObject,r.assignToObject=null);var u,c,m,p=null;if(p=d===e?e:Object.assign(d,e),a(e)&&a(t))for(var h=0,f=Object.entries(t);h<f.length;h++){var y=o(f[h],2),b=y[0],g=y[1],v=e[b];i&&Array.isArray(g)&&Array.isArray(v)&&t!==e?p[b]=v.concat.apply(v,n(g)):a(g)&&Object.prototype.hasOwnProperty.call(e,b)?p[b]=s(v,g,r):Object.assign(p,(m=g,(c=b)in(u={})?Object.defineProperty(u,c,{value:m,enumerable:!0,configurable:!0,writable:!0}):u[c]=m,u))}return p}function d(e){var t=null,r=null,n=e.op;if(!n)throw Error('The initialization property \"op\" cannot be omitted. \"merge\",\"overwrite-merge\",\"clone\" can be specified.');var o=\"merge\"===n,a=\"clone\"===n,i=\"overwrite-merge\"===n;if(o){if(t=e.object1,r=e.object2,!t||!r)throw Error(\"object1 or object2 is not specified.\")}else if(i){if(t=e.object1,r=e.object2,!t||!r)throw Error(\"object1 or object2 is not specified.\");if(0===Object.keys(r).length)return null}else{if(!a)throw Error('An invalid \"op\" property value \"'.concat(n,'\" has been specified.'));t=e.object1,r={}}var l,d=Object.create(Object.getPrototypeOf(t)),u=null,c=(l=t,Object.getPrototypeOf(l)!==Object.prototype);return o&&c||a?(s(t,t,{assignToObject:d,concatArray:e&&e.concatArray}),u=d):u={},s(a?u:t,r,{assignToObject:i?t:u,concatArray:e&&e.concatArray}),u}r.r(t),r.d(t,\"default\",(function(){return d}))}]).default},function(e,t){CALIGN={},CALIGN.LEFT_TOP=\"LEFT_TOP\",CALIGN.HCENTER_TOP=\"CENTER_TOP\",CALIGN.RIGHT_TOP=\"RIGHT_TOP\",CALIGN.LEFT_VCENTER=\"LEFT_CENTER\",CALIGN.HCENTER_VCENTER=\"CENTER_CENTER\",CALIGN.CENTER=CALIGN.HCENTER_VCENTER,CALIGN.RIGHT_VCENTER=\"RIGHT_CENTER\",CALIGN.LEFT_BOTTOM=\"LEFT_BOTTOM\",CALIGN.HCENTER_BOTTOM=\"CENTER_BOTTOM\",CALIGN.RIGHT_BOTTOM=\"RIGHT_BOTTOM\",e.exports=CALIGN},function(e,t,r){var n=r(16);function o(){this.fps=30,this.durationMillis=200,this.targetFrame=null,this._crrAlpha=1,this._toAlpha=1,this._crrWidth=0,this._crrHeight=0,this._toWidth=0,this._toHeight=0,this._toX=0,this._toY=0,this.pinnedAnimationEnabled=!1,this._pinX=0,this._pinY=0,this._pinAnchor=null}o.prototype.set=function(e){var t=this;t.targetFrame=e,t.fromWidth(e.getWidth()),t.fromHeight(e.getHeight()),t.toWidth(e.getWidth()),t.toHeight(e.getHeight());var r=e.getPosition();return t.fromPosition(r.x,r.y,r.anchor),t},o.prototype.get=function(){return this.targetFrame},o.prototype.setDuration=function(e){return this.durationMillis=e,this},o.prototype.setFPS=function(e){return this.fps=e,this},o.prototype.fromPosition=function(e,t,r){var n=this;return n.pinnedAnimationEnabled=!0,n._pinX=e,n._pinY=t,n.toPosition(e,t),r&&(n._pinAnchor=r),n},o.prototype.fromWidth=function(e){return this._crrWidth=e,this},o.prototype.fromHeight=function(e){return this._crrHeight=e,this},o.prototype.toWidth=function(e){return this._toWidth=e,this},o.prototype.toHeight=function(e){return this._toHeight=e,this},o.prototype.fromAlpha=function(e){return this._crrAlpha=e,this},o.prototype.toAlpha=function(e){return this._toAlpha=e,this},o.prototype.ease=function(e){return this._ease=e,this},o.prototype.toPosition=function(e,t){return this._toX=e,this._toY=t,this},o.prototype.toX=function(e){return this._toX=e,this},o.prototype.toY=function(e){return this._toY=e,this},o.prototype.start=function(e,t){var r=this,o=r._crrWidth,a=r._crrHeight,i=r._pinX,l=r._pinY,s=r._crrAlpha;return new Promise((function(d,u){var c=parseInt(r.fps*(r.durationMillis/1e3));0==c&&(c=1);var m=(r._toWidth-o)/c,p=(r._toHeight-a)/c,h=(r._toX-i)/c,f=(r._toY-l)/c,y=(r._toAlpha-s)/c;r._ease&&(y/=1.24);var b=r.durationMillis/c,g=0;function v(){var e=new n;e.setIntervalMillis(b),e.setCallback((function(e){if(g==c){var n=r._toWidth,u=r._toHeight,b=i+h*g,v=l+f*g,C=r._toAlpha;r.pinnedAnimationEnabled&&r.targetFrame._setPositionInternally(b,v,r._pinAnchor,n,u),r.targetFrame.htmlElement.style&&(r.targetFrame.htmlElement.style.opacity=C),r.targetFrame.setSize(n,u,!0),r._crrWidth=n,r._crrHeight=u,r._pinX=b,r._pinY=v}if(g==c+1)return e.stopTimer(),r.targetFrame.htmlElement.style&&(r.targetFrame.htmlElement.style.opacity=r._toAlpha),void d(r);n=o+m*g,u=a+p*g,b=i+h*g,v=l+f*g,C=s+y*g;if(r.pinnedAnimationEnabled&&r.targetFrame._setPositionInternally(b,v,r._pinAnchor,n,u),r.targetFrame.htmlElement.style&&(r.targetFrame.htmlElement.style.opacity=C),r.targetFrame.setSize(n,u,!0),0==g){var B=r.targetFrame.parentCanvas;if(B)B.getWindow(r.targetFrame.id)&&r.targetFrame.show({requestFocus:t})}g++})),e.startTimer()}if(e){var C=new n;C.setIntervalMillis(e),C.setCallback((function(e){e.stopTimer(),v()})),C.startTimer()}else v()}))},e.exports=o},function(e,t,r){\n/*! event-listener-helper(https://github.com/riversun/event-listener-helper) v1.0.2 Copyright (c) 2020 riversun.org@gmail.com */\ne.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&\"object\"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,\"default\",{enumerable:!0,value:e}),2&t&&\"string\"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,\"a\",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p=\"/\",r(r.s=0)}([function(e,t,r){e.exports=r(1)},function(e,t,r){\"use strict\";function n(e){return(n=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e})(e)}function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(\"undefined\"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,o=!1,a=void 0;try{for(var i,l=e[Symbol.iterator]();!(n=(i=l.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,a=e}finally{try{n||null==l.return||l.return()}finally{if(o)throw a}}return r}}(e,t)||i(e,t)||function(){throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()}function a(e){if(\"undefined\"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=i(e))){var t=0,r=function(){};return{s:r,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:r}}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 n,o,a=!0,l=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw o}}}}function i(e,t){if(e){if(\"string\"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return\"Object\"===r&&e.constructor&&(r=e.constructor.name),\"Map\"===r||\"Set\"===r?Array.from(r):\"Arguments\"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,\"value\"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}r.r(t),r.d(t,\"default\",(function(){return d}));var d=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}(this,e),this.evTargetListenersMap=new Map,this.listenerNum=0}var t,r;return t=e,(r=[{key:\"addEventListener\",value:function(e,t,r,n){var o=this,a=null;if(n&&(a=this._cloneJson(n)),arguments.length>4)throw Error(\"Too many arguments. Number of arguments can be specified 4.\");this._checkTypeOfOptions(a);var i=null;a&&a.listenerName&&(i=a.listenerName);var l=null;a&&a.once&&(delete a.once,a.callbackOnce=!0,l=function(n){r(n),o.removeEventListener(e,t,null,a)});var s={listenerName:null,success:!0};l?e.addEventListener(t,l,a):e.addEventListener(t,r,a);var d=this.evTargetListenersMap.get(e);d||(d=new Map,this.evTargetListenersMap.set(e,d));var u=d.get(t);if(u||(u=new Map,d.set(t,u)),null!==i){if(u.has(i))throw Error('The listenerName \"'.concat(i,'\" is already used for the specified event type ').concat(t));u.set(i,{listener:r,onceListener:l,options:a}),s.listenerName=i}else{var c=\"listener-\".concat(this.listenerNum);a||(a={}),a.listenerName=c,u.set(c,{listener:r,onceListener:l,options:a}),s.listenerName=c,this.listenerNum+=1}return s}},{key:\"removeEventListener\",value:function(e,t,r,n){if(arguments.length<3)throw Error(\"Three or four arguments are required.\");this._checkTypeOfOptions(n);var o=null;n&&n.listenerName&&(o=n.listenerName);var a={success:!1,message:\"unknown error\"},i=this.evTargetListenersMap.get(e);if(!i)return a.message=\"DOM element \".concat(e,\"(id=\").concat(e.id,\") doesn't have any listeners.\"),a;var l=i.get(t);if(!l)return a.message=\"DOM element \".concat(e,\"(id=\").concat(e.id,\") doesn't have \\\"\").concat(t,'\" listeners.'),a;if(o){var s=l.get(o);if(!s)return a.message=\"DOM element \".concat(e,\"(id=\").concat(e.id,\") doesn't have \\\"\").concat(t,'\" listener \"').concat(o,'\"'),a;l.delete(o),s.options&&s.options.callbackOnce?e.removeEventListener(t,s.onceListener,s.options):e.removeEventListener(t,s.listener,s.options),a.success=!0}else if(!o){if(!r)return a.message=\"options.listenerName is not found\",a;var d=\"listener\",u=r,c=this._searchKeyInValueContent(l,d,u);if(c){var m=l.get(c),p=m.onceListener,h=m.options;l.delete(c),p?e.removeEventListener(t,p,h):e.removeEventListener(t,r,h),a.success=!0}else a.success=!1,a.message=\"Specified listener could not be deleted from DOM element \".concat(e,\"(id=\").concat(e.id,\").\\n        Since the specified listener is not registered as an event listener,\\n        it may have been registered outside of event-listener-helper.\")}return a}},{key:\"getEventListeners\",value:function(e,t){return e?t?this._getEventListenersWith2Args(e,t):this._getEventListenersWith1Arg(e):[]}},{key:\"_getEventListenersWith1Arg\",value:function(e){var t=[],r=this.evTargetListenersMap.get(e);if(!r)return t;var n,i=a(r);try{for(i.s();!(n=i.n()).done;){var l,s=o(n.value,2),d=s[0],u=s[1],c=[],m=a(u.values());try{for(m.s();!(l=m.n()).done;){var p=l.value;c.push(this._getFrozenListenerDef(p))}}catch(e){m.e(e)}finally{m.f()}c.length>0&&t.push({eventType:d,listeners:c})}}catch(e){i.e(e)}finally{i.f()}return t}},{key:\"_getEventListenersWith2Args\",value:function(e,t){if(2!==arguments.length)throw Error(\"Only two arguments can be specified\");var r=[],n=this.evTargetListenersMap.get(e);if(!n)return r;var o=n.get(t);if(!o)return r;var i,l=a(o.values());try{for(l.s();!(i=l.n()).done;){var s=i.value,d=this._getFrozenListenerDef(s);r.push(d)}}catch(e){l.e(e)}finally{l.f()}return r}},{key:\"getEventListener\",value:function(e,t,r){if(3!==arguments.length)throw Error(\"Only 3 arguments can be specified\");var n=this.evTargetListenersMap.get(e);if(!n)return null;var o=n.get(t);if(!o)return null;var a=o.get(r),i=this._getFrozenListenerDef(a);return i}},{key:\"hasEventListeners\",value:function(e,t){if(2!==arguments.length)throw Error(\"Only two arguments can be specified\");var r=this.evTargetListenersMap.get(e);if(!r)return!1;var n=r.get(t);return!(!n||0===n.size)}},{key:\"hasEventListener\",value:function(e,t,r){if(3!==arguments.length)throw Error(\"Only 3 arguments can be specified\");var n=this.evTargetListenersMap.get(e);if(!n)return!1;var o=n.get(t);if(!o)return!1;var a=o.get(r);return!!a}},{key:\"_getFrozenListenerDef\",value:function(e){if(!e)return null;var t={},r=null,n=e.options;return n&&(r={},t.options=r,n.capture&&(r.capture=n.capture),n.callbackOnce&&(r.once=n.callbackOnce),n.listenerName&&(r.listenerName=n.listenerName)),t.listener=e.listener,Object.freeze(r),Object.freeze(t),t}},{key:\"clearAllEventListeners\",value:function(){var e,t=a(this.getAllEventTargets());try{for(t.s();!(e=t.n()).done;){var r=e.value;this.clearEventListeners(r)}}catch(e){t.e(e)}finally{t.f()}}},{key:\"clearEventListeners\",value:function(e,t){if(!e)throw Error(\"At least the EventTarget must be specified as an argument\");var r=this.getEventListeners(e,t);if(t){if(t){var n,o=a(r);try{for(o.s();!(n=o.n()).done;){var i=n.value;this.removeEventListener(e,t,null,i.options)}}catch(e){o.e(e)}finally{o.f()}}}else{var l,s=a(r);try{for(s.s();!(l=s.n()).done;){var d,u=l.value,c=u.eventType,m=a(u.listeners);try{for(m.s();!(d=m.n()).done;){var p=d.value.options;this.removeEventListener(e,c,null,p)}}catch(e){m.e(e)}finally{m.f()}}}catch(e){s.e(e)}finally{s.f()}}}},{key:\"clearEventListener\",value:function(e,t,r){var n=this.getEventListener(e,t,r);n&&n.options&&this.removeEventListener(e,t,null,n.options)}},{key:\"getAllEventTargets\",value:function(){return Array.from(this.evTargetListenersMap.keys())}},{key:\"searchEventListenersByName\",value:function(e){var t,r=[],n=a(this.getAllEventTargets());try{for(n.s();!(t=n.n()).done;){var o,i=t.value,l=this.evTargetListenersMap.get(i),s=a(l.keys());try{for(s.s();!(o=s.n()).done;){var d=o.value,u=l.get(d),c=this._getFrozenListenerDef(u.get(e));c&&r.push(c)}}catch(e){s.e(e)}finally{s.f()}}}catch(e){n.e(e)}finally{n.f()}return r}},{key:\"_searchKeyInValueContent\",value:function(e,t,r){var n,i=a(e);try{for(i.s();!(n=i.n()).done;){var l=o(n.value,2),s=l[0];if(l[1][t]===r)return s}}catch(e){i.e(e)}finally{i.f()}return null}},{key:\"_checkTypeOfOptions\",value:function(e){if(\"object\"!==n(e)&&void 0!==e)throw\"boolean\"==typeof e?new Error(\"Type of boolean is not accepted as the fourth argument you specify.\\n      If you want to enable useCapture, specify {capture: true} as the fourth parameter instead.\"):new Error(\"Type of \".concat(n(e),\" is not accepted as the fourth argument you specify.\\n      If you want to specify options, specify an object like {capture: true, listenerName:'my-listener-01'}.\"))}},{key:\"_cloneJson\",value:function(e){return JSON.parse(JSON.stringify(e))}}])&&s(t.prototype,r),e}()}]).default},function(e,t){e.exports=function(e,t){function r(){}r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e,e.superConstructor=t,e.superClass=t.prototype}},function(e,t,r){var n=r(2),o=r(8),a=r(18),i=r(19);function l(){}function s(e,t){var r=t.querySelectorAll(\"img\");t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e);for(var n=0;n<r.length;n++){var o=r[n];e!==o&&t.removeChild(o)}}l.prototype.buildChildMenuAppearance=function(e){return new i(e)},l.prototype.buildTextButtonAppearance=function(e){return e?n({op:\"clone\",object1:e,concatArray:!0}):new o},l.prototype.buildImageButtonAppearance=function(e){return e?n({op:\"clone\",object1:e}):new a},l.prototype.buildButton=function(e){return this.buildTextButton(e)},l.prototype.appendChildMenuTo=function(e,t){var r=document.createElement(\"div\");r.classList.add(\"jsframe-child-menu\"),r.innerHTML=e.childMenuHTML,r.style.position=\"absolute\",r.style.pointerEvents=\"none\",r.style.width=e.childMenuWidth+\"px\",r.style.display=\"none\";var n=e.xOffset,o=parseInt(t.style.height,10)+e.yOffset+2;\"LEFT\"===e.childMenuAlign?r.style.left=n+\"px\":\"RIGHT\"===e.childMenuAlign?r.style.right=n+\"px\":\"CENTER\"===e.childMenuAlign&&(n=-e.childMenuWidth/2+parseInt(t.style.height,10)/2,r.style.left=n+\"px\"),r.style.top=o+\"px\",r.firstChild.style.pointerEvents=\"auto\",t.appendChild(r)},l.prototype.buildTextButton=function(e){var t=e.size,r=t,n=t;null!=e.width&&(r=e.width),null!=e.height&&(n=e.height);var o=document.createElement(\"div\"),a=e.borderWidth,i=e.borderRadius,l=e.borderColorDefault,d=e.borderColorFocused,u=e.borderColorHovered,c=e.borderColorPressed,m=e.borderStyleDefault,p=e.borderStyleFocused,h=e.borderStyleHovered,f=e.borderStylePressed,y=e.backgroundColorDefault,b=e.backgroundColorFocused,g=e.backgroundColorHovered,v=e.backgroundColorPressed,C=e.backgroundBoxShadow,B=e.fa,E=e.caption,w=e.imageDefault,x=e.imageFocused,A=e.imageHovered,F=e.imagePressed;w&&(w.style.pointerEvents=\"none\"),x&&(x.style.pointerEvents=\"none\"),A&&(A.style.pointerEvents=\"none\"),F&&(F.style.pointerEvents=\"none\");var T=e.captionColorDefault,I=e.captionColorFocused,_=e.captionColorHovered,S=e.captionColorPressed,D=e.captionShiftYpx,M=e.captionFontRatio;o._hasFrameFocus=!1,o._isMouseDown=!1,o.style.position=\"absolute\",o.style.top=\"0px\",o.style.left=\"0px\",o.style.width=r+\"px\",o.style.height=n+\"px\",e.cursor?o.style.cursor=e.cursor:o.style.cursor=\"pointer\",o.style.margin=\"0px\",o.style.padding=\"0px\",o.style.boxSizing=\"content-box\",o.style.fontFamily=\"sans-serif\",o.onmousedown=function(e){o._isMouseDown=!0,o._handleFocusDrawing(\"onmousedown\")},o.onmouseout=function(e){o._isMouseDown=!1,o._handleFocusDrawing(\"onmouseout\")},o.onmouseover=function(e){o._handleHoverDrawing()},o.onmouseup=function(e){o._isMouseDown=!1,o._handleFocusDrawing(\"onmouseup\")},o._onTakeFocus=function(){o._hasFrameFocus=!0,o._handleFocusDrawing(\"_onTakeFocus\")},o._onReleaseFocus=function(){o._hasFrameFocus=!1,o._handleFocusDrawing(\"_onReleaseFocus\")},o._handleFocusDrawing=function(e){o._hasFrameFocus?o._isMouseDown?(o.style.borderColor=c,o.style.borderStyle=f,o.style.backgroundColor=v,o.style.color=S,F&&s(F,o)):(o.style.borderColor=d,o.style.borderStyle=p,o.style.backgroundColor=b,o.style.color=I,x&&s(x,o)):o._isMouseDown?(o.style.borderColor=c,o.style.borderStyle=f,o.style.backgroundColor=v,o.style.color=S,F&&s(F,o)):(o.style.borderColor=l,o.style.borderStyle=m,o.style.backgroundColor=y,o.style.color=T,w&&s(w,o))},o._handleHoverDrawing=function(){o._hasFrameFocus,u&&(o.style.borderColor=u),h&&(o.style.borderStyle=h),g&&(o.style.backgroundColor=g),_&&(o.style.color=_),A&&s(A,o)},o.style.padding=\"0px\",o.style.textAlign=\"center\",o.style.fontSize=n*M+\"px\",o.style.lineHeight=n+\"px\",o.style.borderWidth=\"1px\",null!=a&&(o.style.borderWidth=a+\"px\"),null!=C&&(o.style.boxShadow=C),o.style.borderRadius=i+parseInt(o.style.borderWidth)+\"px\";if(w)s(w,o);else if(E){(k=document.createElement(\"span\")).style.width=\"100%\",k.style.marginTop=D+\"px\",k.style.display=\"inline-block\",k.style.textAlign=\"center\",k.style.fontFamily=\"sans-serif\",k.appendChild(document.createTextNode(E)),o.appendChild(k)}else if(B){var k;(k=document.createElement(\"span\")).style.pointerEvents=\"none\",k.style.width=\"100%\",k.style.marginTop=D+\"px\",k.style.display=\"inline-block\",k.style.textAlign=\"center\",k.style.fontFamily=\"sans-serif\",k.innerHTML='<i class=\"'+B+'\"></i>',o.appendChild(k)}else 0;return o._handleFocusDrawing(),o},e.exports=l},function(e,t){e.exports=function(){this.size=14,this.width=null,this.height=null,this.borderRadius=2,this.borderWidth=0,this.borderColorDefault=\"#aaaaaa\",this.borderColorFocused=this.borderColorDefault,this.borderColorHovered=null,this.borderColorPressed=this.borderColorDefault,this.borderStyleDefault=\"solid\",this.borderStyleFocused=this.borderStyleDefault,this.borderStyleHovered=null,this.borderStylePressed=this.borderStyleDefault,this.backgroundBoxShadow=null,this.backgroundColorDefault=\"transparent\",this.backgroundColorFocused=this.backgroundColorDefault,this.backgroundColorHovered=null,this.backgroundColorPressed=this.backgroundColorDefault,this.caption=null,this.captionColorDefault=\"white\",this.captionColorFocused=this.captionColorDefault,this.captionColorHovered=null,this.captionColorPressed=this.captionColorDefault,this.captionShiftYpx=0,this.captionFontRatio=1}},function(e,t){var r=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e};function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e){return e&&\"object\"===(void 0===e?\"undefined\":r(e))&&!Array.isArray(e)}e.exports.objectAssign=function e(t){for(var r=arguments.length,a=Array(r>1?r-1:0),i=1;i<r;i++)a[i-1]=arguments[i];if(!a.length)return t;var l=a.shift();if(o(t)&&o(l))for(var s in l)o(l[s])?(t[s]||Object.assign(t,n({},s,{})),e(t[s],l[s])):Object.assign(t,n({},s,l[s]));return e.apply(void 0,[t].concat(a))}},function(e,t,r){e.exports={JSFrame:r(11)}},function(e,t,r){\"use strict\";r(12);var n=r(14),o=r(3),a=r(15),i=r(6),l=r(17),s=r(7),d=r(4),u=r(5),c={yosemite:r(21),redstone:r(24),popup:r(27),toast:r(30),material:r(31)},m={yosemite:r(34)},p={};function h(e,t,r,n,o,a,i,l){var s=this;if(s.movable=!0,s.id=e,s.property={},s.extra={},s.parentCanvas=null,s.htmlElement=null,s.pullUpDisabled=!1,l&&(s.pullUpDisabled=l.pullUpDisabled),s.htmlElement=document.createElement(p.CBEAN.HTML_ELEMENT),s.htmlElement.id=p.CBEAN.HTML_ELEMENT_ID_PREFIX+e,s.htmlElement.style.position=\"absolute\",s.htmlElement.style.left=parseInt(t,10)+\"px\",s.htmlElement.style.top=parseInt(r,10)+\"px\",s.htmlElement.style.width=parseInt(n,10)+\"px\",s.htmlElement.style.height=parseInt(o,10)+\"px\",null!==a&&(s.htmlElement.style.zIndex=a),s.htmlElement.style.borderColor=\"#000000\",s.htmlElement.style.fontSize=\"1px\",s.htmlElement.parent=s,s.htmlElement.onmousedown=s.onmouseDown,\"ontouchstart\"in window){s.htmlElement.ontouchstart=function(e){s.onmouseDown.bind(this)(e)}}s.htmlElement.typeName=p.CBEAN.TYPE_NAME,s.htmlElement.usage=\"nothing\",s.htmlElement.isRangeLimited=!1,s.htmlElement.argX=1,s.htmlElement.argY=1,s.externalAreaClickedListener=null,s.onMoveListener=null}function f(e,t,r,n,o,a){var i=this;i.enablePullUp=!0,i.currentObject=null,i.onTopObject=null,i.offsetX=0,i.offsetY=0,i.mouseDownSource=null,i.id=t,i.canvasElement=null,i.parentElement=e,i.beanList=new Array,i.beanIdName={},i.beanNameId={},i.eventData=new function(){this.x=0,this.y=0,this.screenX=0,this.screenY=0,this.deltaX=0,this.deltaY=0,this.isMoved=!1,this.targetTypeName=null,this.targetUsage=null,this.targetObject=null},i.baseZIndex=0,i.setBaseZIndex=function(e){i.baseZIndex=e},i.getBaseZIndex=function(){return i.baseZIndex},i.canvasElement=document.createElement(p.CANVAS.HTML_ELEMENT),i.canvasElement.style.zIndex=2e3,i.canvasElement.id=i.id,i.canvasElement.style.boxSizing=\"border-box\",i.canvasElement.style.position=\"absolute\",i.canvasElement.style.left=parseInt(r)+\"px\",i.canvasElement.style.top=parseInt(n)+\"px\",i.canvasElement.style.width=parseInt(o)+p.CANVAS.WIDTH_ADJUST_20180722+\"px\",i.canvasElement.style.height=parseInt(a)+p.CANVAS.HEIGHT_ADJUST_20180722+\"px\",i.canvasElement.style.backgroundColor=\"transparent\",i.canvasElement.style.borderStyle=\"none\",i.canvasElement.style.margin=\"0px\",i.canvasElement.style.borderWidth=\"0px\",i.canvasElement.style.borderColor=\"transparent\",i.parentElement.appendChild(i.canvasElement)}function y(e,t,r,n,a,i,l,s){var d=this;y.superConstructor.call(this,e,t,r,n,a,i,l,s),d.anchor=o.LEFT_TOP,d.showTitleBar=s.showTitleBar,d.canvasNetHeight=null,d.canvasNetWidth=null,d.frameHeightAdjust=s.frameHeightAdjust,d.frameComponentMap={},d.canvas=null,d.myCanvasId=null,d.floatingButton=null,d.titleBarClassNameDefault=\"jsframe-titlebar-default\",d.titleBarClassNameFocused=\"jsframe-titlebar-focused\",d.titleBarHeight=s.titleBarHeight,d.titleBarCaption=s.titleBarCaption,d.titleBarCaptionLeftMargin=s.titleBarCaptionLeftMargin,d.titleBarCaptionFontSize=s.titleBarCaptionFontSize,d.titleBarCaptionFontWeight=s.titleBarCaptionFontWeight,d.titleBarBorderBottomDefault=s.titleBarBorderBottomDefault,d.titleBarBorderBottomFocused=s.titleBarBorderBottomFocused,d.titleBarCaptionTextShadow=s.titleBarCaptionTextShadow,d.titleBarCaptionTextAlign=s.titleBarCaptionTextAlign,d.titleAdjustWidth=2,d.windowId=e,d.exBorderWidth=0,d.myCanvasId=e+\"_canvas\";var u=document.createElement(\"img\");if(u.src=\"\",u.style.position=\"absolute\",u.style.left=\"2px\",u.style.top=\"2px\",u.style.width=\"16px\",u.style.height=\"16px\",u.style.visibility=\"hidden\",d.titleBar=document.createElement(\"div\"),d.titleBar.className=\"jsframetitlebar\",d.showTitleBar){if(d.titleBar.id=e+\"_title\",d.titleBar.style.position=\"absolute\",d.titleBar.style.boxSizing=\"border-box\",d.titleBar.style.top=\"0px\",d.titleBar.style.left=\"0px\",d.titleBar.style.width=n-d.titleAdjustWidth+p.CANVAS.WIDTH_ADJUST_20180722+\"px\",d.titleBar.style.userSelect=\"none\",d.titleBarHeight){var c=0;d.titleBarBorderBottomDefault&&(c=0),d.titleBar.style.height=parseInt(d.titleBarHeight,10)+0+\"px\"}d.titleBarColorDefault&&(d.titleBar.style.background=d.titleBarColorDefault),d.titleBar.style.zIndex=0,d.titleBar.style.color=d.titleBarCaptionColorDefault,d.titleBar.style.fontSize=d.titleBarCaptionFontSize,d.titleBar.style.fontWeight=d.titleBarCaptionFontWeight,d.titleBar.style.textShadow=d.titleBarCaptionTextShadow,d.titleBar.style.textAlign=d.titleBarCaptionTextAlign,d.titleBar.style.lineHeight=d.titleBar.style.height,d.titleBar.style.borderBottom=d.titleBarBorderBottomDefault,d.titleBar.style.overflow=\"hidden\";var m=document.createTextNode(\"\"),h=document.createElement(\"span\");h.id=d.id+\"_titleBarText\",null!=d.titleBarCaptionLeftMargin?(h.style.position=\"absolute\",h.style.left=parseInt(d.titleBarCaptionLeftMargin,10)+\"px\"):(h.style.position=\"absolute\",h.style.left=\"0px\",h.style.right=\"0px\"),h.style.top=\"0px\",h.appendChild(m),d.titleBar.appendChild(h)}d.htmlElement.appendChild(d.titleBar);var b=parseInt(d.titleBarHeight,10)-c,g=parseInt(d.titleAdjustWidth,10);if(d.showTitleBar||(b=0,g=0,c=0),d.canvasNetWidth=n-g,d.canvasNetHeight=a-b-g-1-c+d.frameHeightAdjust,d.htmlElement.style.cursor=\"move\",d.canvas=new f(d.htmlElement,d.myCanvasId,0,b,n-g,a-b-g),d.canvas.enablePullUp=!1,d.canvas.canvasElement.style.backgroundColor=p.CFRAME.CANVAS_ELEMENT_BGCOLOR,d.canvas.canvasElement.style.cursor=\"default\",d.canvas.canvasElement.onmousedown=d.canvasMouseDown,\"ontouchstart\"in window){d.canvas.canvasElement.ontouchstart=function(e){var t=e.changedTouches[0];d.canvasMouseDown.bind(this)(t)}}d.canvas.canvasElement.parentCFrame=d;var C,B,E,w=parseInt(d.canvas.canvasElement.style.width,10),x=parseInt(d.canvas.canvasElement.style.height,10),A=s.resizeAreaWidth,F=s.resizeAreaHeight,T=s.resizeAreaOffset;s.resizeAreaVisible&&(C=\"rgba(255, 0, 0, 0.5)\",B=\"rgba(0, 0, 255, 0.5)\",E=\"rgba(0, 255, 0, 0.5)\");var I=new v(d.myCanvasId+\"_RD\",w+T,x+T,A,F,0,\"RD\",C);I.htmlElement.style.cursor=\"se-resize\",I.htmlElement.argX=0,I.htmlElement.argY=0;var _=new v(d.myCanvasId+\"_DD\",0,x+T,w+T,F,0,\"DD\",B);_.htmlElement.style.cursor=\"n-resize\",_.htmlElement.argX=0,_.htmlElement.argY=0;var S=new v(d.myCanvasId+\"_RR\",w+T,0,A,x+T,0,\"RR\",E);for(var D in S.htmlElement.style.cursor=\"w-resize\",S.htmlElement.argY=0,S.htmlElement.argX=0,d.canvas.addBean(I),d.canvas.addBean(_),d.canvas.addBean(S),d.removeMarkers=function(){d.canvas.removeBean(I.id),d.canvas.removeBean(_.id),d.canvas.removeBean(S.id),d.htmlElement.style.cursor=\"default\"},d.removeMarkers2=function(){d.canvas.removeBean(I.id),d.canvas.removeBean(_.id),d.canvas.removeBean(S.id)},d.enableMarkers=function(e){e?(I.htmlElement.style.display=\"flex\",_.htmlElement.style.display=\"flex\",S.htmlElement.style.display=\"flex\",I.htmlElement.style.cursor=\"se-resize\",_.htmlElement.style.cursor=\"n-resize\",S.htmlElement.style.cursor=\"w-resize\"):(I.htmlElement.style.display=\"none\",_.htmlElement.style.display=\"none\",S.htmlElement.style.display=\"none\")},s.frameComponents){var M=s.frameComponents[D];M.setFrame(d),\"closeButton\"==M.id&&(M.htmlElement.onclick=d.close),M.htmlElement.querySelector(\".jsframe-child-menu\")&&d.eventListenerHelper.addEventListener(M.htmlElement,\"click\",(function(e){var t=e.target.getAttribute(\"component-id\");if(d.hideFrameComponentChildMenus({exceptFrameComponentId:t}),t){var r=d.getFrameComponentElement(t).querySelector(\".jsframe-child-menu\");r&&(\"table\"==r.style.display?r.style.display=\"none\":r.style.display=\"table\")}}),{listenerName:\"frame-component_child-menu-listener\"}),d.addFrameComponent(M)}d.htmlElement.style.backgroundColor=\"transparent\",d.htmlElement.oncontextmenu=this.contextMenu;d.caribValue=0,d.exBorderWidth&&(d.htmlElement.style.borderWidth=d.exBorderWidth+\"px\"),d.htmlElement.style.width=parseInt(d.htmlElement.style.width,10)-0+\"px\",d.htmlElement.style.height=parseInt(d.htmlElement.style.height,10)-0+1+\"px\",d.htmlElement.typeName=\"cwindow\",d.htmlElement.overflow=\"auto\",d.htmlElement.style.boxSizing=\"content-box\",s.frameBorderStyle&&(d.htmlElement.style.borderStyle=s.frameBorderStyle),s.frameBoxShadow&&(d.htmlElement.style.boxShadow=s.frameBoxShadow),parseInt(s.frameBorderWidthDefault,10)>=0&&(d.htmlElement.style.borderWidth=s.frameBorderWidthDefault,d.htmlElement.style.borderColor=s.frameBorderColorDefault),parseInt(s.frameBorderRadius,10)>=0&&(d.htmlElement.style.borderRadius=s.frameBorderRadius),d.onCloseFrameListener=null}function b(e,t,r,o,a,i){var l=t,s=r,d=o,c=a,m=i.zindex,p=this;this.jsFrame=null,this.control=null,this.minFrameWidth=128,this.minWindowHeight=32,this.eventListenerHelper=new u,this.overrayTransparentScreenEnabled=!1,this.overrayTransparentScreenOnResize=!0,this.titleBarColorFocused=i.titleBarColorFocused,this.titleBarColorDefault=i.titleBarColorDefault,this.titleBarCaptionColorDefault=i.titleBarCaptionColorDefault,this.titleBarCaptionColorFocused=i.titleBarCaptionColorFocused,b.superConstructor.call(p,e,l,s,d,c,m,null,i),p.frameBorderColorDefault=i.frameBorderColorDefault,p.frameBorderColorFocused=i.frameBorderColorFocused,p.frameBorderWidthDefault=i.frameBorderWidthDefault,p.frameBorderWidthFocused=i.frameBorderWidthFocused,p.iframe=null,p.ifDelta=0,p.resizable=!0,p.onMouseMoveOnIframe=null,p.onMouseUpOnIframe=null,p._hasFocus=!1,p._hasFocusTime=0,p.htmlElement.typeName=\"cifwindow\";var h=\"riversun_\"+e;p.dframe=document.createElement(\"div\"),p.iframe=document.createElement(\"iframe\"),p.iframe.name=h,p.iframe.id=h,p.iframe.frameBorder=\"0\",p.iframe.zIndex=-1,p.iframe.allowTransparency=\"true\",p.iframe.width=p.canvasNetWidth-p.ifDelta+0,p.iframe.height=p.canvasNetHeight-p.ifDelta+0,p.showTitleBar=i.showTitleBar,p.getFrameInnerBorderRadius=i.getFrameInnerBorderRadius,p.frameBorderRadius=i.frameBorderRadius,p.adjustFrameBorderRadius(),p.useIframe=!1,p.canvas.canvasElement.appendChild(p.iframe),p.canvas.canvasElement.appendChild(p.dframe),this.setUseIframe=function(e){p.useIframe=e,p.iframe.style.visibility=\"hidden\",p.iframe.style.position=\"absolute\",p.iframe.style.left=\"0px\",p.iframe.style.top=\"0px\",p.iframe.style.width=\"100%\",p.iframe.style.height=\"100%\",p.dframe.style.visibility=\"hidden\",p.dframe.style.position=\"absolute\",p.dframe.style.left=\"0px\",p.dframe.style.boxSizing=\"content-box\",p.dframe.style.top=\"0px\",p.dframe.style.width=\"100%\",p.dframe.style.height=\"100%\",p.dframe.style.backgroundColor=\"white\",e?(p.iframe.style.visibility=\"visible\",p.dframe.style.visibility=\"hidden\"):(p.iframe.style.visibility=\"hidden\",p.dframe.style.visibility=\"visible\")},p.setUseIframe(i.useIframe),(p.overrayTransparentScreenEnabled||p.overrayTransparentScreenOnResize)&&(p.transparence=document.createElement(\"span\"),p.transparence.style.position=\"absolute\",p.transparence.style.left=\"0px\",p.transparence.style.top=\"0px\",p.transparence.style.width=\"0px\",p.transparence.style.height=\"0px\",p.transparence.style.zIndex=4,p.transparence.style.borderWidth=\"0px\",p.transparence.style.borderColor=\"#ff00ee\",p.transparence.style.borderStyle=\"none\",p.transparence.style.cursor=\"default\",p.transparence.style.pointerEvents=\"none\",p.canvas.canvasElement.style.backgroundColor=i.frameBackgroundColor,p.canvas.canvasElement.appendChild(p.transparence)),p.eventEmitter=new n,p.appearance=i}function g(e,t,r,n,o,a){g.superConstructor.call(this,e,t,r,n,o,a);var i=this;document.addEventListener(\"click\",(function(e){for(var t in i.beanList){i.beanList[t].onBodyClicked(e)}}))}function v(e,t,r,n,o,a,i,l){var s=this;v.superConstructor.call(this,e,t,r,n,o,a,i),s.htmlElement.typeName=\"cmarkerwindow\",s.htmlElement.usage=i,s.htmlElement.isRangeLimited=!1,s.htmlElement.style.borderStyle=\"none\",s.htmlElement.style.zIndex=1,l&&(s.htmlElement.style.background=l),s.getWindowType=function(){return\"CMarkerWindow\"}}function C(e){var t,r=this,n=null;(r.isWindowManagerFixed=!0,e&&0==e.fixed&&(r.isWindowManagerFixed=!1),e&&e.parentElement&&(n=e.parentElement),r.hAlign=\"left\",r.vAlign=\"top\",e&&e.horizontalAlign&&(r.hAlign=e.horizontalAlign),e&&e.verticalAlign&&(r.vAlign=e.verticalAlign),r.pullToRefresh=!1,e&&\"boolean\"==typeof e.pullToRefresh&&(r.pullToRefresh=e.pullToRefresh),r.touchActionManipulation=!0,e&&\"boolean\"==typeof e.touchActionManipulation&&(r.touchActionManipulation=e.touchActionManipulation),n)?r.isWindowManagerFixed?((t=document.createElement(\"div\")).id=\"jsFrame_fixed_\"+r.generateUUID(),t.setAttribute(\"style\",\"position:fixed;\"+r.hAlign+\":0px;\"+r.vAlign+\":0px;margin:0px;padding:0px;\"),n.appendChild(t)):((t=document.createElement(\"div\")).id=\"jsFrame_absolute_\"+r.generateUUID(),t.setAttribute(\"style\",\"position:absolute;\"+r.hAlign+\":0px;\"+r.vAlign+\":0px;margin:0px;padding:0px;\"),n.appendChild(t)):r.isWindowManagerFixed?((t=document.createElement(\"div\")).id=\"jsFrame_fixed_\"+r.generateUUID(),t.setAttribute(\"style\",\"position:fixed;\"+r.hAlign+\":0px;\"+r.vAlign+\":0px;margin:0px;padding:0px;\"),document.body.appendChild(t),n=t):((t=document.createElement(\"div\")).id=\"jsFrame_absolute_\"+r.generateUUID(),t.setAttribute(\"style\",\"position:absolute;\"+r.hAlign+\":0px;\"+r.vAlign+\":0px;margin:0px;padding:0px;\"),document.body.appendChild(t),n=t);if(document.addEventListener(\"mouseup\",o),document.addEventListener(\"mousemove\",a),\"ontouchend\"in window){document.addEventListener(\"touchend\",(function(e){o.bind(this)(e)}))}if(\"ontouchmove\"in window){r.touchActionManipulation&&r.doEnableTouchActionManipulation(),r.pullToRefresh||r.doDisablePullToRefresh();document.addEventListener(\"touchmove\",(function(e){e.preventDefault(),a.bind(this)(e)}))}function o(e){r.windowManager.windowMouseUp(e)}function a(e){r.windowManager.windowMouseMove(e)}r.windowManager=new g(n,\"windowManager_\"+r.generateUUID(),0,0,0,0),r.domPartsBuilder=null}p.CBEAN={},p.CBEAN.HTML_ELEMENT=\"span\",p.CBEAN.HTML_ELEMENT_ID_PREFIX=\"htmlElement_\",p.CBEAN.TYPE_NAME=\"bean\",h.prototype.getWindowType=function(){return\"CBeanFrame\"},h.prototype.setOnMoveListener=function(e){this.onMoveListener=e},h.prototype._onMove=function(e){this.onMoveListener&&this.onMoveListener(e)},h.prototype.setMovable=function(e){var t=this;return e?(t.htmlElement.argX=1,t.htmlElement.argY=1):(t.htmlElement.argX=0,t.htmlElement.argY=0),t.movable=e,t},h.prototype.setParentCanvas=function(e){return this.parentCanvas=e,this.htmlElement.parentCanvas=this.parentCanvas,this},h.prototype.setOnExternalAreaClickedListener=function(e){return this.externalAreaClickedListener=e,this},h.prototype.onBodyClicked=function(e){var t=this,r=e.pageX,n=e.pageY,o=parseInt(t.htmlElement.style.left),a=parseInt(t.htmlElement.style.top),i=parseInt(t.htmlElement.style.width),l=parseInt(t.htmlElement.style.height);o<r&&r<o+i&&a<n&&n<a+l||t.externalAreaClickedListener&&t.externalAreaClickedListener()},h.prototype.onmouseDown=function(e){var t=e;if(\"touchstart\"===e.type){var r=e.changedTouches;if(1!==e.touches.length)return!0;t=r[0]}var n=this.parent;if(0==t.button||\"touchstart\"===e.type){if(n.pullUpDisabled)return!1;this.parentCanvas.currentObject=this,this.parentCanvas.pullUp(n.id)}else if(2==t.button)return!1;return this.parentCanvas.currentObject&&(this.parentCanvas.offsetX=t.pageX-parseInt(this.parentCanvas.currentObject.style.left,10),this.parentCanvas.offsetY=t.pageY-parseInt(this.parentCanvas.currentObject.style.top,10)),!1},p.CANVAS={},p.CANVAS.HTML_ELEMENT=\"div\",p.CANVAS.WIDTH_ADJUST_20180722=2,p.CANVAS.HEIGHT_ADJUST_20180722=3,f.prototype.mouseMove=function(e){var t=this,r=e;if(\"touchmove\"===e.type){var n=e.changedTouches;if(1!==e.touches.length)return!0;r=n[0]}if(t.currentObject){t.eventData.targetTypeName=t.currentObject.typeName,t.eventData.targetUsage=t.currentObject.usage,t.eventData.targetObject=t.currentObject;var o=r.pageX-t.offsetX,a=r.pageY-t.offsetY,i=(r.pageX,r.pageY,t.currentObject.style.left),l=t.currentObject.style.top,s=parseInt(o,10),d=parseInt(a,10),u=s+parseInt(t.currentObject.style.width,10),c=d+parseInt(t.currentObject.style.height,10),m=parseInt(t.canvasElement.style.width,10),p=parseInt(t.canvasElement.style.height,10),h=0,f=0;if(1==t.currentObject.isRangeLimited&&(s<=0||u>m||d<=0||c>p))h=0,f=0;else{h=parseInt(o,10)-parseInt(i,10),f=parseInt(a,10)-parseInt(l,10),t.currentObject.style.left=parseInt(t.currentObject.style.left)+h*t.currentObject.argX+\"px\",t.currentObject.style.top=parseInt(t.currentObject.style.top)+f*t.currentObject.argY+\"px\";var y=t.currentObject.parent;y&&y._onMove&&y._onMove()}return t.eventData.deltaX=h,t.eventData.deltaY=f,t.eventData}return null},f.prototype.mouseUp=function(e){this.currentObject=null,this.mouseDownSource=null},f.prototype.pullUp=function(e){var t=this,r=[],n=t.beanList;for(var o in n)r.push(n[o]);var a=n[e];t.enablePullUp&&t.pullUpSort(a,r,t.baseZIndex),t.onTopObject=a},f.prototype.pullUpSort=function(e,t,r){for(var n in e.htmlElement.style.zIndex=t.length+r,t.sort((function(e,t){return-parseInt(e.htmlElement.style.zIndex,10)+parseInt(t.htmlElement.style.zIndex,10)})),t)t[n].htmlElement.style.zIndex=t.length-1-n+r},f.prototype.removeBean=function(e){var t=this.beanList,r=t[e];this.canvasElement.removeChild(r.htmlElement),delete t[e]},f.prototype.addBean=function(e){var t=this,r=t.beanList,n=t.beanIdName,o=t.beanNameId;r[e.id]=e,e.property.name&&(o[e.property.name]=e.id,n[e.id]=e.property.name);var a=0;for(var i in r)a++;e.htmlElement.style.zIndex=a+t.baseZIndex,e.setParentCanvas(t),this.canvasElement.appendChild(e.htmlElement)},f.prototype.getParentElement=function(){return this.parentElement},p.CFRAME={},p.CFRAME.CANVAS_ELEMENT_BGCOLOR=\"transparent\",p.CFRAME.MODAL_BACKGROUND_FRAME_ID_PREFIX=\"window__modal_window_background_\",i(y,h),y.prototype.setTitleBarClassName=function(e,t){return e&&(this.titleBarClassNameDefault=e,this.titleBarClassNameFocused=e),t&&(this.titleBarClassNameFocused=t),this},y.prototype.addFrameComponent=function(e){return this.frameComponentMap[e.id]=e,this.canvas.canvasElement.appendChild(e.htmlElement),this},y.prototype.getFrameComponentElement=function(e){return this.frameComponentMap[e]?this.frameComponentMap[e].htmlElement:null},y.prototype.removeFrameComponentById=function(e){var t=this.frameComponentMap[e];this.canvas.canvasElement.removeChild(t.htmlElement),delete this.frameComponentMap[e]},y.prototype.showFrameComponent=function(e,t){var r=this.getFrameComponentElement(e);return r&&(r.style.display=t||\"flex\"),this},y.prototype.hideFrameComponent=function(e){var t=this.getFrameComponentElement(e);return t&&(t.style.display=\"none\"),this},y.prototype.hideAllVisibleFrameComponents=function(){var e=this.frameComponentMap;for(var t in e)if(e.hasOwnProperty(t)){var r=e[t].htmlElement;\"none\"===r.style.display&&(r._alreadyNone=!0),r.style.display=\"none\"}},y.prototype.showAllVisibleFrameComponents=function(){var e=this.frameComponentMap;for(var t in e)if(e.hasOwnProperty(t)){var r=e[t].htmlElement;r._alreadyNone?r._alreadyNone=null:r.style.display=\"flex\"}},y.prototype.hideFrameComponentChildMenus=function(e){var t=this.frameComponentMap;for(var r in t)if(t.hasOwnProperty(r)){if(e&&e.exceptFrameComponentId&&r===e.exceptFrameComponentId)continue;var n=t[r];n.childMenu&&(n.childMenu.style.display=\"none\")}},y.prototype.setTitle=function(e){var t=this;if(t.title=e,t.showTitleBar){var r=document.createTextNode(e);t.titleBar.firstChild.replaceChild(r,t.titleBar.firstChild.firstChild)}return t},y.prototype.resize=function(e,t,r,n){var o=this,a=parseInt(o.htmlElement.style.left,10),i=parseInt(o.htmlElement.style.top,10),l=parseInt(o.htmlElement.style.width,10),s=parseInt(o.htmlElement.style.height,10);o.htmlElement.style.left=parseInt(a+e,10)+\"px\",o.htmlElement.style.top=parseInt(i+t,10)+\"px\",o.htmlElement.style.width=parseInt(l+r,10)+\"px\",o.htmlElement.style.height=parseInt(s+n,10)+\"px\";var d=parseInt(o.canvas.canvasElement.style.width,10),u=parseInt(o.canvas.canvasElement.style.height,10);for(var c in o.canvas.canvasElement.style.width=d+r+\"px\",o.canvas.canvasElement.style.height=u+n+\"px\",o.showTitleBar&&(o.titleBar.style.width=d+r+\"px\"),o.canvas.beanList){var m=o.canvas.beanList[c];\"cmarkerwindow\"==m.htmlElement.typeName&&(\"RD\"==m.htmlElement.usage?(m.htmlElement.style.left=parseInt(m.htmlElement.style.left,10)+r+\"px\",m.htmlElement.style.top=parseInt(m.htmlElement.style.top,10)+n+\"px\"):\"DD\"==m.htmlElement.usage?(m.htmlElement.style.width=parseInt(m.htmlElement.style.width,10)+r+\"px\",m.htmlElement.style.top=parseInt(m.htmlElement.style.top,10)+n+\"px\"):\"RR\"==m.htmlElement.usage&&(m.htmlElement.style.left=parseInt(m.htmlElement.style.left,10)+r+\"px\",m.htmlElement.style.height=parseInt(m.htmlElement.style.height,10)+n+\"px\"))}},y.prototype.canvasMouseDown=function(e){null==this.parentCFrame.parentCanvas.mouseDownSource&&(this.parentCFrame.parentCanvas.mouseDownSource=\"childcanvas\")},y.prototype.mouseUp=function(e){this.canvas.mouseUp(e)},y.prototype.close=function(e){var t=this.parentObject.parentCanvas,r=this.parentObject,n=r.id;r.closeInternally(e,t,n)},y.prototype.closeFrame=function(e){var t=this.parentCanvas;this.closeInternally(e,t,this.windowId)},y.prototype.closeInternally=function(e,t,r){var n=this;t&&(t.removeBean(r),n.modalBackgroundWindowId&&(t.removeBean(n.modalBackgroundWindowId),n.modalBackgroundWindowId=null),n.onCloseFrameListener&&n.onCloseFrameListener(n))},y.prototype.setOnCloseFrameListener=function(e){this.onCloseFrameListener=e},y.prototype.contextMenu=function(){return!1},y.prototype.setTitleBarTextColor=function(e){this.titleBar.style.color=e},y.prototype.setPosition=function(e,t,r){var n=this.getWidth(),o=this.getHeight();return this._setPositionInternally(e,t,r,n,o),this},y.prototype._setPositionInternally=function(e,t,r,n,a){var i=this;r&&(i.anchor=r),r&&o.LEFT_TOP!=r?o.HCENTER_TOP==r?(i.htmlElement.style.left=-n/2+e+\"px\",i.htmlElement.style.top=t+\"px\"):o.RIGHT_TOP==r?(i.htmlElement.style.left=-n+e+\"px\",i.htmlElement.style.top=t+\"px\"):o.LEFT_VCENTER==r?(i.htmlElement.style.left=e+\"px\",i.htmlElement.style.top=-a/2+t+\"px\"):o.HCENTER_VCENTER==r?(i.htmlElement.style.left=-n/2+e+\"px\",i.htmlElement.style.top=-a/2+t+\"px\"):o.RIGHT_VCENTER==r?(i.htmlElement.style.left=-n+e+\"px\",i.htmlElement.style.top=-a/2+t+\"px\"):o.LEFT_BOTTOM==r?(i.htmlElement.style.left=e+\"px\",i.htmlElement.style.top=-a+t+\"px\"):o.HCENTER_BOTTOM==r?(i.htmlElement.style.left=-n/2+e+\"px\",i.htmlElement.style.top=-a+t+\"px\"):o.RIGHT_BOTTOM==r&&(i.htmlElement.style.left=-n+e+\"px\",i.htmlElement.style.top=-a+t+\"px\"):(i.htmlElement.style.left=e+\"px\",i.htmlElement.style.top=t+\"px\")},y.prototype.getPosition=function(){var e,t,r=this,n=r.getWidth(),a=r.getHeight(),i=r.anchor;return i&&o.LEFT_TOP!=i?o.HCENTER_TOP==i?(e=parseInt(r.htmlElement.style.left,10)+n/2,t=parseInt(r.htmlElement.style.top,10)):o.RIGHT_TOP==i?(e=parseInt(r.htmlElement.style.left,10)+n,t=parseInt(r.htmlElement.style.top,10)):o.LEFT_VCENTER==i?(e=parseInt(r.htmlElement.style.left,10),t=parseInt(r.htmlElement.style.top,10)+a/2):o.HCENTER_VCENTER==i?(e=parseInt(r.htmlElement.style.left,10)+n/2,t=parseInt(r.htmlElement.style.top,10)+a/2):o.RIGHT_VCENTER==i?(e=parseInt(r.htmlElement.style.left,10)+n,t=parseInt(r.htmlElement.style.top,10)+a/2):o.LEFT_BOTTOM==i?(e=parseInt(r.htmlElement.style.left,10),t=parseInt(r.htmlElement.style.top,10)+a):o.HCENTER_BOTTOM==i?(e=parseInt(r.htmlElement.style.left,10)+n/2,t=parseInt(r.htmlElement.style.top,10)+a):o.RIGHT_BOTTOM==i&&(e=parseInt(r.htmlElement.style.left,10)+n,t=parseInt(r.htmlElement.style.top,10)+a):(e=parseInt(r.htmlElement.style.left,10),t=parseInt(r.htmlElement.style.top,10)),{x:e,y:t,anchor:i}},y.prototype.getLeft=function(){return parseInt(this.htmlElement.style.left,10)},y.prototype.getTop=function(){return parseInt(this.htmlElement.style.top,10)},y.prototype.getWidth=function(){return parseInt(this.htmlElement.style.width,10)},y.prototype.getHeight=function(){return parseInt(this.htmlElement.style.height,10)},y.prototype.getSize=function(){return{width:this.getWidth(),height:this.getHeight()}},y.prototype.setSize=function(e,t,r){var n=!0;return r&&(n=!1),this.resize(0,0,e-this.getWidth(),t-this.getHeight(),n),this},y.prototype.getWindowId=function(){return this.windowId},y.prototype.getName=function(){return this.property.name},y.prototype.setName=function(e){this.property.name=e},i(b,y),b.prototype.getFrameView=function(){return this.dframe},b.prototype.getFrameAppearance=function(){return this.appearance},b.prototype.setHTML=function(e){this.dframe.innerHTML=e},b.prototype.setFrameInFrame=function(e){var t=this.dframe?this.dframe.firstChild:null;t&&(Date.now||(Date.now=function(){return(new Date).getTime()}),e?this.eventEmitter.only(\"resize\",\"fif-listener\",(function(){t.setAttribute(a.MATCH_PARENT_CHANGE_MARKER_ATTR,Date.now())})):(t.removeAttribute(a.MATCH_PARENT_CHANGE_MARKER_ATTR),this.eventEmitter.only(\"resize\",\"fif-listener\",(function(){}))))},b.prototype.$=function(e){return this.useIframe?this.iframe.contentWindow.document.querySelector(e):this.dframe.querySelector(e)},b.prototype.on=function(e,t,r){var n=this,o=n.getFrameComponentElement(e);o&&n.eventListenerHelper.addEventListener(o,t,(function(o){r(n,o,{type:\"frameComponent\",id:e,eventType:t})}),{listenerName:\"frame-component-listener\"}),\"frame\"!==e&&\"window\"!==e||(\"move\"!==t||n.eventEmitter.hasListenerFuncs(\"move\")||n.setOnMoveListener((function(e){n.eventEmitter.emit(\"move\",n._getCurrentSizePos())})),n.eventEmitter.on(t,r));var a=n.$(e);if(a&&(n.eventListenerHelper.hasEventListener(a,t,\"frame-dom-listener\")&&n.eventListenerHelper.removeEventListener(a,t,null,{listenerName:\"frame-dom-listener\"}),n.eventListenerHelper.addEventListener(a,t,(function(o){r(n,o,{type:\"dom\",id:e,eventType:t})}),{listenerName:\"frame-dom-listener\"})),!a){var i=n.canvas.canvasElement.querySelector(e);i&&i.addEventListener(t,(function(o){r(n,o,{type:\"dom\",id:e,eventType:t})}))}},b.prototype.adjustFrameBorderRadius=function(){var e=this;if(parseInt(e.frameBorderRadius,10)>0){var t=e.getFrameInnerBorderRadius(e,e._hasFocus),r=t.frameAppearance,n=t.innerBorderRadius,o=parseInt(r.titleBarHeight,10);e.showTitleBar?(e.canvas.canvasElement.style.borderBottomRightRadius=n,e.canvas.canvasElement.style.borderBottomLeftRadius=n,e.iframe.style.borderBottomRightRadius=n,e.iframe.style.borderBottomLeftRadius=n,e.titleBar.style.borderTopLeftRadius=n,e.titleBar.style.borderTopRightRadius=n):(e.canvas.canvasElement.style.borderRadius=n,e.iframe.style.borderRadius=n),e.dframe&&(0===o&&(e.dframe.style.borderTopRightRadius||(e.dframe.style.borderTopRightRadius=n),e.dframe.style.borderTopLeftRadius||(e.dframe.style.borderTopLeftRadius=n)),e.dframe.style.borderBottomRightRadius=n,e.dframe.style.borderBottomLeftRadius=n)}},b.prototype.handleReleasingFocus=function(e){var t=this,r=t._hasFocus;for(var n in t._hasFocus=!1,t.titleBar.className=t.titleBarClassNameDefault,t.titleBarColorDefault&&(t.titleBar.style.background=t.titleBarColorDefault),t.titleBar.style.color=t.titleBarCaptionColorDefault,t.frameBorderColorDefault&&(t.htmlElement.style.borderColor=t.frameBorderColorDefault),t.frameBorderWidthDefault&&(t.htmlElement.style.borderWidth=t.frameBorderWidthDefault,t.adjustFrameBorderRadius()),\"cifwindow\"==t.htmlElement.typeName&&t.overrayTransparentScreenEnabled&&(t.transparence.style.width=parseInt(t.iframe.width,10)+\"px\",t.transparence.style.height=parseInt(t.iframe.height,10)+\"px\"),t.frameComponentMap){t.frameComponentMap[n].handleReleasingFocus()}return t.titleBarBorderBottomDefault&&(t.titleBar.style.borderBottom=t.titleBarBorderBottomDefault),r&&t.eventEmitter.emit(\"blur\",{target:t}),t},b.prototype.handleTakingFocus=function(e){var t=this,r=t._hasFocus;for(var n in t._hasFocus=!0,t._hasFocus=Date.now(),t.overrayTransparentScreenEnabled&&(t.transparence.style.width=\"0px\",t.transparence.style.height=\"0px\"),t.titleBar.className=t.titleBarClassNameFocused,t.titleBarColorFocused&&(t.titleBar.style.background=t.titleBarColorFocused),t.titleBar.style.color=t.titleBarCaptionColorFocused,t.frameBorderColorFocused&&(t.htmlElement.style.borderColor=t.frameBorderColorFocused),t.frameBorderWidthFocused&&(t.htmlElement.style.borderWidth=t.frameBorderWidthFocused,t.adjustFrameBorderRadius()),t.titleBarBorderBottomFocused&&(t.titleBar.style.borderBottom=t.titleBarBorderBottomFocused),t.frameComponentMap){t.frameComponentMap[n].handleTakingFocus()}return r||t.eventEmitter.emit(\"focus\",{target:t}),t},y.prototype.show=function(e){return this.htmlElement.style.display=\"flex\",e&&0==e.requestFocus||this.requestFocus(),this},y.prototype.showModal=function(e){var t=this,r=new l;r.showTitleBar=!0,r.showCloseButton=!1,r.frameBorderRadius=\"0px\",r.frameBorderStyle=\"none\",r.frameBorderWidthDefault=\"0px\",r.frameBorderWidthFocused=\"0px\",r.frameBoxShadow=null,r.frameBackgroundColor=\"transparent\",r.frameComponents=[],r.frameHeightAdjust=0,r.titleBarHeight=\"0px\",r.titleBarBorderBottomFocused=null,r.titleBarCaptionLeftMargin=\"0px\",r.onInitialize=function(){},r.pullUpDisabled=!0;var n=t.parentCanvas,o=p.CFRAME.MODAL_BACKGROUND_FRAME_ID_PREFIX+t.id,a=new b(o,0,0,1,1,r);a.setSize(window.innerWidth,window.innerHeight,!0),a.setResizable(!1),window.addEventListener(\"resize\",(function(){a.setSize(window.innerWidth,window.innerHeight,!0)})),t.modalBackgroundWindowId=o,a.hide(),n.addWindow(a),a.setTitle(\"\").getFrameView().innerHTML='<div class=\"jsframe-modal-window-background\"></div>',a.getFrameView().style.backgroundColor=\"rgba(0,0,0,0.0)\",a.show(),t.show(),e&&t.setOnCloseFrameListener(e)},y.prototype.getWindowManager=function(){return this.parentCanvas},b.prototype.hide=function(){return this.htmlElement.style.display=\"none\",this},b.prototype.onmouseDown=function(e){document.body.ondrag=function(){return!1},this.decorator=y.prototype.onmouseDown,this.decorator(e);var t=this.parent,r=this.parentCanvas;for(var n in r.beanList){var o=r.beanList[n];n==t.getWindowId()||o.handleReleasingFocus()}t.handleTakingFocus()},b.prototype.mouseUp=function(e){(this.overrayTransparentScreenEnabled||this.overrayTransparentScreenOnResize)&&(this.parentCanvas.onTopObject==this?(this.transparence.style.width=\"0px\",this.transparence.style.height=\"0px\"):this.overrayTransparentScreenEnabled&&(this.transparence.style.width=parseInt(this.iframe.width)+\"px\",this.transparence.style.height=parseInt(this.iframe.height)+\"px\")),this.decorator=y.prototype.mouseUp,this.decorator(e),document.body.ondrag=null,document.body.onselectstart=null,this.transparence.style.pointerEvents=\"none\"},b.prototype.setMinFrameSize=function(e,t){this.minFrameWidth=e,this.minWindowHeight=t},b.prototype.resize=function(e,t,r,n,o){if(!this.resizable&&o)return null;var a=this.getSize(),i=parseInt(this.htmlElement.style.left,10),l=parseInt(this.htmlElement.style.top,10),s=parseInt(this.htmlElement.style.width,10),d=parseInt(this.htmlElement.style.height,10);o&&s+r<this.minFrameWidth&r<0&&(this.htmlElement.style.width=s+\"px\",r=0),o&&d+n<this.minWindowHeight&n<0&&(this.htmlElement.style.height=d+\"px\",n=0),this.htmlElement.style.left=i+e+\"px\",this.htmlElement.style.top=l+t+\"px\",this.htmlElement.style.width=s+r+\"px\",this.htmlElement.style.height=d+n+\"px\";var u=parseInt(this.canvas.canvasElement.style.width,10),c=parseInt(this.canvas.canvasElement.style.height,10);for(var m in this.canvas.canvasElement.style.width=u+r+\"px\",this.canvas.canvasElement.style.height=c+n+\"px\",this.titleBar.style.width=u-this.ifDelta+r+0+\"px\",this.iframe.width=u-this.ifDelta+r+0+\"px\",this.iframe.height=c-this.ifDelta+n+this.frameHeightAdjust+\"px\",(this.overrayTransparentScreenEnabled||this.overrayTransparentScreenOnResize)&&(this.transparence.style.width=parseInt(this.iframe.width)+\"px\",this.transparence.style.height=parseInt(this.iframe.height)+\"px\"),this.frameComponentMap){this.frameComponentMap[m].updateAlign()}for(var p in this.canvas.beanList){var h=this.canvas.beanList[p];\"cmarkerwindow\"==h.htmlElement.typeName&&(\"RD\"==h.htmlElement.usage?(h.htmlElement.style.left=parseInt(h.htmlElement.style.left)+r+\"px\",h.htmlElement.style.top=parseInt(h.htmlElement.style.top)+n+\"px\"):\"DD\"==h.htmlElement.usage?(h.htmlElement.style.width=parseInt(h.htmlElement.style.width)+r+\"px\",h.htmlElement.style.top=parseInt(h.htmlElement.style.top)+n+\"px\"):\"RR\"==h.htmlElement.usage&&(h.htmlElement.style.left=parseInt(h.htmlElement.style.left)+r+\"px\",h.htmlElement.style.height=parseInt(h.htmlElement.style.height)+n+\"px\"))}var f=this.getSize();a.width===f.width&&a.height===f.height||this.eventEmitter.emit(\"resize\",this._getCurrentSizePos())},b.prototype._getCurrentSizePos=function(){var e=this.getSize();return{target:this,pos:this.getPosition(),size:e}},b.prototype.resizeDirect=function(e,t,r){if(!this.resizable&&r)return null;this.htmlElement.style.width=e+\"px\",this.htmlElement.style.height=t+\"px\";parseInt(this.canvas.canvasElement.style.width),parseInt(this.canvas.canvasElement.style.height);for(var n in this.canvas.canvasElement.style.width=e+\"px\",this.canvas.canvasElement.style.height=t-this.titleBar.style.height+\"px\",this.titleBar.style.width=e-this.ifDelta+\"px\",this.iframe.width=e-this.ifDelta+\"px\",this.iframe.height=t-this.ifDelta+this.frameHeightAdjust+\"px\",(this.overrayTransparentScreenEnabled||this.overrayTransparentScreenOnResize)&&(this.transparence.style.width=parseInt(this.iframe.width)+\"px\",this.transparence.style.height=parseInt(this.iframe.height)+\"px\"),this.frameComponentMap){this.frameComponentMap[n].updateAlign()}for(var o in this.canvas.beanList){var a=this.canvas.beanList[o];\"cmarkerwindow\"==a.htmlElement.typeName&&(\"RD\"==a.htmlElement.usage?(a.htmlElement.style.left=e+\"px\",a.htmlElement.style.top=t+\"px\"):\"DD\"==a.htmlElement.usage?(a.htmlElement.style.width=e+\"px\",a.htmlElement.style.top=t+\"px\"):\"RR\"==a.htmlElement.usage&&(a.htmlElement.style.left=e+\"px\",a.htmlElement.style.height=t+\"px\"))}},b.prototype.requestFocus=function(){var e=this.parentCanvas.beanList;for(var t in e){var r=e[t];t==this.getWindowId()?r.handleTakingFocus():r.handleReleasingFocus()}this.parentCanvas.pullUp(this.id)},b.prototype.setUrl=function(e){var t=this;return new Promise((function(r,n){e?t.setUseIframe(!0):(t.setUseIframe(!1),r()),t.iframe.src=e,t.iframe.onload=function(){var e=function(e){var r=e.pageX,n=e.pageY;if(\"touchmove\"===e.type){var o=e.changedTouches;if(1!==e.touches.length)return!0;r=o[0].pageX,n=o[0].pageY}var a=t.getLeft(),i=t.getTop(),l=document.createEvent(\"MouseEvents\");l.initMouseEvent(\"mousemove\",!0,!1,window,e.detail,e.screenX,e.screenY,r+a,n+i,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,null),t.parentCanvas.windowMouseMove(l),t.onMouseMoveOnIframe&&t.onMouseMoveOnIframe(l)};t.iframe.contentWindow.document.onmousemove=e,t.iframe.contentWindow.document.ontouchmove=e;var n=function(e){var r=e.pageX,n=e.pageY;if(\"touchend\"===e.type){var o=e.changedTouches;r=o[0].pageX,n=o[0].pageY}var a=t.getLeft(),i=t.getTop(),l=document.createEvent(\"MouseEvents\");l.initMouseEvent(\"mouseup\",!0,!1,window,e.detail,e.screenX,e.screenY,r+a,n+i,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,null),t.parentCanvas.windowMouseUp(l),t.onMouseUpOnIframe&&t.onMouseUpOnIframe(l)};t.iframe.contentWindow.document.onmouseup=n,t.iframe.contentWindow.document.ontouchend=n,r(t,t.iframe.contentWindow.document)}}))},b.prototype.getIfDocument=function(){return this.iframe.contentWindow.document},b.prototype.setScrolling=function(e){this.iframe.scrolling=e},b.prototype.getScrolling=function(e){return this.iframe.scrolling},b.prototype.setResizable=function(e){return this.resizable=e,this.enableMarkers(e),this},b.prototype.setControl=function(e){e&&(e.frame=this,this.control=this.jsFrame.createWindowEventHelper(e),this.control.setupDefaultEvents())},i(g,f),g.prototype.getWindow=function(e){return this.beanList[e]},g.prototype.addWindow=function(e){var t=e.getWindowId(),r=e.getName();this.beanIdName[t]=r,this.beanNameId[r]=t,this.addBean(e)},g.prototype.containsWindowName=function(e){return!!this.beanNameId[e]},g.prototype.getWindowByName=function(e){var t=this.beanNameId[e];return t?this.getWindow(t):null},g.prototype.windowMouseMove=function(e){if(null==this.currentObject)return null;var t=!1,r=this.beanList;for(var n in r){var o=r[n],a=o.canvas.mouseMove(e);if(t|=null!=a,null!=a&&\"cmarkerwindow\"==a.targetTypeName){var i=a.targetObject;o.transparence.style.pointerEvents=\"auto\",\"RD\"==i.usage?o.resize(0,0,a.deltaX,a.deltaY,!0):\"DD\"==i.usage?o.resize(0,0,0,a.deltaY,!0):\"RR\"==i.usage&&o.resize(0,0,a.deltaX,0,!0)}}t||\"childcanvas\"==this.mouseDownSource||this.mouseMove(e)},g.prototype.windowMouseUp=function(e){this.mouseUp(e);var t=this.beanList;for(var r in t){t[r].mouseUp(e)}},g.prototype.removeBean=function(e){var t=this,r=t.beanList,n=r[e];if(null!=n){var o=n._hasFocus;t.canvasElement.removeChild(n.htmlElement),delete r[e];var a=t.beanIdName[e];a&&(delete t.beanIdName[e],delete t.beanNameId[a]);var i=0,l=null;if(o){for(var e in r){var s=r[e];i<=s._hasFocusTime&&!s.pullUpDisabled&&(i=s._hasFocusTime,l=s)}l&&l.requestFocus()}n.parentCanvas=null}},i(v,h),C.prototype.doEnableTouchActionManipulation=function(){var e=document.documentElement.getAttribute(\"style\");e?e.endsWith(\";\")||(e+=\";\"):e=\"\",-1===e.indexOf(\"touch-action\")&&(e+=\"-ms-touch-action: manipulation;touch-action: manipulation;\",document.documentElement.setAttribute(\"style\",e))},C.prototype.doDisablePullToRefresh=function(){var e=document.body.getAttribute(\"style\");e?e.endsWith(\";\")||(e+=\";\"):e=\"\",-1===e.indexOf(\"overscroll-behavior-y\")&&(e+=\"overscroll-behavior-y: contain;\",document.body.setAttribute(\"style\",e))},C.prototype.getDomPartsBuilder=function(){return this.domPartsBuilder||(this.domPartsBuilder=new s),this.domPartsBuilder},C.prototype.create=function(e){var t={};t.name=e.name;var r,n=e.title,o=e.left,a=e.top,i=e.width,l=e.height,s=e.appearance,d=e.preset,u=(e.presetParam,e.appearanceName),c=e.appearanceParam,m=e.style,p=e.minWidth,h=e.minHeight,f=e.html,y=e.resizable,b=e.movable,g=e.url,v=e.urlLoaded,C=e.presetParam;d?(r=this.getPresetWindow(d).getPresetWindow(C),s=this.createPresetStyle(r.appearanceName,{appearanceParam:r.appearanceParam})):u&&(s=this.createPresetStyle(u,{appearanceParam:c}));if(e.clientHeight){var B=parseInt(s.titleBarHeight||0)-s.frameHeightAdjust;l=e.clientHeight+B}var E=this.createFrame(o,a,i,l,s,t);if(n&&E.setTitle(n),f&&E.setHTML(f),g){var w=E.setUrl(g);v&&w.then(v)}if(0==y&&E.setResizable(!1),0==b&&E.setMovable(!1),p&&h&&(E.minFrameWidth=p),h&&(E.minWindowHeight=h,e.clientHeight&&(E.minWindowHeight=h+B)),m){var x=E.getFrameView();for(var A in m)m.hasOwnProperty(A)&&(x.style[A]=m[A])}return r&&r.setupPresetWindow(E),E},C.prototype.createFrame=function(e,t,r,n,o,a){o||(o=this.createFrameAppearance()),o.initialize(),e||(e=0),t||(t=0),r||(r=128),n||(n=128);var i=new b(\"window_\"+this.generateUUID(),e,t,r,n,o);if(i.jsFrame=this,a&&a.name&&i.setName(a.name),i.hide(),this.windowManager.addWindow(i),o.getTitleBarStyle){var l=o.getTitleBarStyle();l&&i.setTitleBarClassName(l.titleBarClassNameDefault,l.titleBarClassNameFocused)}else o.titleBarClassNameDefault&&o.titleBarClassNameFocused?i.setTitleBarClassName(o.titleBarClassNameDefault,o.titleBarClassNameFocused):o.titleBarClassNameDefault&&i.setTitleBarClassName(o.titleBarClassNameDefault,o.titleBarClassNameDefault);return i},C.prototype.containsWindowName=function(e){return this.windowManager.containsWindowName(e)},C.prototype.getWindowByName=function(e){return this.windowManager.getWindowByName(e)},C.prototype.generateUUID=function(){var e=Date.now();return\"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/g,(function(t){var r=(e+16*Math.random())%16|0;return e=Math.floor(e/16),(\"x\"==t?r:3&r|8).toString(16)}))},C.prototype.createFrameAppearance=function(){return new l},C.prototype.createAnimator=function(){return new d},C.prototype.createWindowEventHelper=function(e){return e||(e={}),e.verticalAlign=this.vAlign,e.horizontalAlign=this.hAlign,new a(e)},C.prototype.getPresetWindow=function(e,t){return m[e]?m[e]:null},C.prototype.createPresetStyle=function(e,t){var r=this.createFrameAppearance();if(t&&t.focusedFrameOnly&&(r.focusedFrameOnly=t.focusedFrameOnly),c[e]){var n=c[e],o=null;return t&&t.appearanceParam&&(o=t.appearanceParam),n.getStyle(r,o)}return r},C.prototype.showToast=function(e){if(e){var t=this,r=60,n=260,o=1e3,a=window.innerHeight-10-r/2,i=window.innerHeight-20-r/2,l=\"\",s=!1,d={borderRadius:\"10px\",background:\"rgba(0,0,0,0.8)\"};e.style&&(d=e.style),e.height&&(r=e.height),e.width&&(n=e.width),e.duration&&(o=e.duration),e.align&&(\"top\"==e.align?(a=10+r/2,i=20+r/2):\"center\"==e.align&&(a=window.innerHeight/2,i=window.innerHeight/2)),e.html&&(l=e.html),e.text&&(l=e.text),s=1==e.closeButton;var u=t.createPresetStyle(\"toast\");d.borderRadius&&(u.frameBorderRadius=d.borderRadius),e.closeButtonColor&&(u.captionClor=e.closeButtonColor);var c=t.create({name:\"toast_\"+t.generateUUID(),width:n,height:r,movable:!1,resizable:!1,appearance:u,style:d,html:'<div id=\"my_element\" style=\"box-sizing:border-box;display: flex;justify-content: center;align-items: center;padding:10px;font-size:16px;color:darkgray;height:'+r+'px\">'+l+\"</div>\"});s||c.hideFrameComponent(\"closeButton\");var m=window.innerWidth/2;\"right\"==t.hAlign&&(m=-m),\"bottom\"==t.vAlign&&(a-=window.innerHeight,i-=window.innerHeight),t.createAnimator().set(c).setDuration(300).fromPosition(m,a,\"CENTER_CENTER\").toPosition(m,i,\"CENTER_CENTER\").toAlpha(1).fromAlpha(0).start(0,!1).then((function(e){return e.setDuration(300).fromPosition(m,i,\"CENTER_CENTER\").toPosition(m,a,\"CENTER_CENTER\").fromAlpha(1).toAlpha(.5).start(o,!1)})).then((function(e){e.get().closeFrame()}))}},Object.freeze(p),e.exports=C},function(e,t,r){var n=r(0),o=r(13);\"string\"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,\"\"]]);var a={insert:\"head\",singleton:!1};n(o,a);e.exports=o.locals||{}},function(e,t,r){(t=r(1)(!1)).push([e.i,\".jsframe-titlebar-default {\\n    background: -webkit-gradient(linear, left top, left bottom, color-stop(0.0, #f5f5f5, color-stop(1.0, #f8f7f2)));\\n    background: -webkit-linear-gradient(top, #f5f5f5, #f8f7f2);\\n    background: -moz-linear-gradient(top, #f5f5f5, #f8f7f2);\\n    background: linear-gradient(top, #f5f5f5, #f8f7f2);\\n    border-top-left-radius: 6px;\\n    border-top-right-radius: 6px;\\n}\\n\\n.jsframe-titlebar-focused {\\n    /* (c)2015 Johannes Jakob\\n       Made with <3 in Germany */\\n    background: -webkit-gradient(linear, left top, left bottom, color-stop(0.0, #ebebeb, color-stop(1.0, #d5d5d5)));\\n    background: -webkit-linear-gradient(top, #ebebeb, #d5d5d5);\\n    background: -moz-linear-gradient(top, #ebebeb, #d5d5d5);\\n    background: linear-gradient(top, #ebebeb, #d5d5d5);\\n    border-top-left-radius: 6px;\\n    border-top-right-radius: 6px;\\n}\\n\\n.jsframe-modal-window-background {\\n    background: rgba(0, 0, 0, 0.6);\\n    height: 100%;\\n    widdth: 100%\\n}\",\"\"]),e.exports=t},function(e,t,r){\n/*! event-emitter(https://github.com/riversun/event-emitter) v1.2.1 Copyright (c) 2020 riversun.org@gmail.com */\ne.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&\"object\"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,\"default\",{enumerable:!0,value:e}),2&t&&\"string\"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,\"a\",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p=\"/\",r(r.s=0)}([function(e,t,r){e.exports=r(1)},function(e,t,r){\"use strict\";function n(e){if(\"undefined\"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=function(e,t){if(e){if(\"string\"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return\"Object\"===r&&e.constructor&&(r=e.constructor.name),\"Map\"===r||\"Set\"===r?Array.from(r):\"Arguments\"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e))){var t=0,r=function(){};return{s:r,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:r}}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 n,a,i=!0,l=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw a}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function a(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,\"value\"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function l(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}r.r(t),r.d(t,\"default\",(function(){return s})),r.d(t,\"EventListenerList\",(function(){return d})),r.d(t,\"EventListenerMap\",(function(){return u}));var s=function(){function e(t){if(a(this,e),this.onListeners=new Map,this.onlyListeners=new Map,t){var r,o=n(t);try{for(o.s();!(r=o.n()).done;){var i=r.value,l=new d;this.onListeners.set(i,l)}}catch(e){o.e(e)}finally{o.f()}}this.childEventEmitters=[]}return l(e,[{key:\"on\",value:function(e,t){var r=this.onListeners.get(e);r||(r=new d,this.onListeners.set(e,r)),r.addListenerFunc(t)}},{key:\"only\",value:function(e,t,r){var n=this.onlyListeners.get(e);n||(n=new u,this.onlyListeners.set(e,n)),n.putListenerFunc(t,r)}},{key:\"pipe\",value:function(e){this.childEventEmitters.push(e)}},{key:\"emit\",value:function(e,t){var r=this.onListeners.get(e);r&&(t.eventType=e,r.callListenerFunc(t));var o=this.onlyListeners.get(e);o&&o.callListenerFunc(t);var a,i=n(this.childEventEmitters);try{for(i.s();!(a=i.n()).done;)a.value.emit(e,t)}catch(e){i.e(e)}finally{i.f()}}},{key:\"hasListenerFuncs\",value:function(e){if(this.onListeners.has(e)){var t=this.onListeners.get(e);if(t&&t.hasListenerFunc())return!0}var r,o=n(this.childEventEmitters);try{for(o.s();!(r=o.n()).done;)if(r.value.hasListenerFuncs(e))return!0}catch(e){o.e(e)}finally{o.f()}return!1}},{key:\"clearAll\",value:function(){var e,t=n(this.onListeners.values());try{for(t.s();!(e=t.n()).done;)e.value.clearAll()}catch(e){t.e(e)}finally{t.f()}this.onListeners.clear();var r,o=n(this.onlyListeners.values());try{for(o.s();!(r=o.n()).done;)r.value.clearAll()}catch(e){o.e(e)}finally{o.f()}this.onlyListeners.clear(),this.childEventEmitters=[]}}]),e}(),d=function(){function e(){a(this,e),this.listenerFuncs=[]}return l(e,[{key:\"clearAll\",value:function(){this.listenerFuncs=[]}},{key:\"hasListenerFunc\",value:function(){return this.listenerFuncs.length>0}},{key:\"addListenerFunc\",value:function(e){this.listenerFuncs.push(e)}},{key:\"callListenerFunc\",value:function(e){var t,r=n(this.listenerFuncs);try{for(r.s();!(t=r.n()).done;)(0,t.value)(e)}catch(e){r.e(e)}finally{r.f()}}}]),e}(),u=function(){function e(){a(this,e),this.listenerFuncMap=new Map}return l(e,[{key:\"clearAll\",value:function(){this.listenerFuncMap.clear()}},{key:\"hasListenerFunc\",value:function(e){return this.listenerFuncMap.has(e)}},{key:\"putListenerFunc\",value:function(e,t){this.listenerFuncMap.set(e,t)}},{key:\"callListenerFunc\",value:function(e){var t,r=n(this.listenerFuncMap.values());try{for(r.s();!(t=r.n()).done;)(0,t.value)(e)}catch(e){r.e(e)}finally{r.f()}}}]),e}()}]).default},function(e,t,r){\"use strict\";var n=r(4),o=r(3),a=r(2),i=r(5);function l(e){this.eventListenerHelper=new i,this.windowMode=\"default\",this.styleDisplay=\"flex\",this.horizontalAlign=\"left\",this.verticalAlign=\"top\",this.keyListener=null,this.minimizeButton=null,this.maximizeButton=null,this.demaximizeButton=null,this.deminimizeButton=null,this.opts=e,this.isWindowManagerFixed=e.frame.jsFrame.isWindowManagerFixed,e.styleDisplay&&(this.styleDisplay=e.styleDisplay),e.minimizeButton&&(this.minimizeButton=e.minimizeButton),e.deminimizeButton&&(this.deminimizeButton=e.deminimizeButton),e.maximizeButton&&(this.maximizeButton=e.maximizeButton),e.demaximizeButton&&(this.demaximizeButton=e.demaximizeButton),e.hideButton&&(this.hideButton=e.hideButton),e.hideButtons&&(this.hideButtons=e.hideButtons),this.maximizeParam=e.maximizeParam,this.demaximizeParam=e.demaximizeParam,this.minimizeParam=e.minimizeParam,this.deminimizeParam=e.deminimizeParam,this.hideParam=e.hideParam,this.dehideParam=e.dehideParam,e.horizontalAlign&&(this.horizontalAlign=e.horizontalAlign),e.verticalAlign&&(this.verticalAlign=e.verticalAlign),this.animationEnabled=!1,this.animationDuration=100,this.frame=e.frame,this.hideFrameBorder=!0,this.hideTitleBar=!0,this.restoreKey=null,this.restoreDuration=null,this.restoreCallback=null,this.statsStore={},e.animation&&(this.animationEnabled=e.animation),e.animationDuration&&(this.animationDuration=e.animationDuration),this.eventListeners={},this.resizeListener=this.handleOnResize.bind(this),this.maximizeParam&&this.maximizeParam.matchParent&&(this.resizeListener=this.handleOnVirtualResize.bind(this))}l.MATCH_PARENT_CHANGE_MARKER_ATTR=\"__jsframe-mp-marker\",l.prototype.on=function(e,t){this.eventListeners[e]=t},l.prototype.doMaximize=function(e){var t=this;if(\"hid\"===t.windowMode)throw Error(\"[JSrame] It is not possible to change directly from the hid state to the maximized state\");if(\"maximized\"!==t.windowMode&&\"maximizing\"!==t.windowMode){t.windowMode=\"maximizing\";var r=t.frame;if(e&&e.matchParent){var n=r.getWindowManager().getParentElement();if(!t.matchParentResizeObserver){var o=new MutationObserver((function(){t.resizeListener()}));o.observe(n,{attributeFilter:[l.MATCH_PARENT_CHANGE_MARKER_ATTR],attributes:!0}),t.matchParentResizeObserver=o}}else t.eventListenerHelper.hasEventListener(window,\"resize\",\"window-resize-listener\")||t.eventListenerHelper.addEventListener(window,\"resize\",t.resizeListener,{listenerName:\"window-resize-listener\"});t.saveCurrentWindowStats(\"maximize_mode\"),t.hideTitleBar=!!e&&e.fullScreen,t.hideTitleBar?r.hideAllVisibleFrameComponents():(t.maximizeButton&&r.hideFrameComponent(t.maximizeButton),t.demaximizeButton&&r.showFrameComponent(t.demaximizeButton,t.styleDisplay)),r.setMovable(!1),r.setResizable(!1),e&&e.restoreKey&&(t.restoreKey=e.restoreKey),e&&e.restoreDuration&&(t.restoreDuration=e.restoreDuration),e&&e.restoreCallback&&(t.restoreCallback=e.restoreCallback),t.renderMaximizedMode({animation:t.animationEnabled,callback:e&&e.callback?e.callback:null,duration:e&&e.duration?e.duration:null,matchParent:!(!e||!e.matchParent)&&e.matchParent})}},l.prototype.renderMaximizedMode=function(e){var t=this,r=t.frame,n=t.loadWindowStats(\"maximize_mode\"),o=0,a=0,i=0,l=0;t.hideTitleBar&&(o=0,a=-n.titleBarHeight);var s=window.innerWidth,d=window.innerHeight;if(e.matchParent){var u=r.getWindowManager().getParentElement();s=u.clientWidth,d=u.clientHeight}t.hideFrameBorder?(i=s,l=d+(t.hideTitleBar?n.titleBarHeight:0)):(i=s-2*n.frameBorderWidthDefault,l=d-2*n.frameBorderWidthDefault+(t.hideTitleBar?n.titleBarHeight:0)),\"right\"==t.horizontalAlign&&(o=-i),\"bottom\"==t.verticalAlign&&(a=-l);var c=function(n){var s=n&&n.disableCallback;r.setPosition(o,a),t.hideFrameBorder&&(r.frameBorderWidthDefault=0,r.frameBorderWidthFocused=0,r.htmlElement.style.borderWidth=\"0px\"),r.setSize(i,l,!0),s||(t.hideTitleBar&&(t.restoreKey&&(t.keyListener=function(e){e.code===t.restoreKey&&t.doCommand(\"restore\")}),window.addEventListener(\"keydown\",t.keyListener),r.iframe&&r.iframe.contentWindow.addEventListener(\"keydown\",t.keyListener)),t.windowMode=\"maximized\",e&&e.callback&&e.callback(t.frame,{eventType:\"maximized\"}),t.eventListeners.maximized&&t.eventListeners.maximized(t.frame,{eventType:\"maximized\"}))};e&&e.animation?t.animateFrame({frame:r,from:n,to:{left:o,top:a,width:i,height:l},duration:e.duration?e.duration:t.animationDuration,callback:c}):e&&\"handleOnResize\"===e.caller?c({disableCallback:!0}):c()},l.prototype.getWindowMode=function(){return this.windowMode},l.prototype.doDemaximize=function(e){var t=this,r=t.frame;if(\"hid\"===t.windowMode)throw Error(\"[JSFrame] demaximize(=recovery from maximized) cannot be performed in hid state.\");t.hasWindowStats(\"maximize_mode\")&&(t.hideTitleBar||(t.maximizeButton&&r.showFrameComponent(t.maximizeButton,t.styleDisplay),t.demaximizeButton&&r.hideFrameComponent(t.demaximizeButton)),t.restoreWindow({restorePosition:!0,restoreMode:\"maximize_mode\",animation:t.animationEnabled,callback:e&&e.callback?e.callback:null,forceShowFrameComponents:t.animationEnabled&&t.hideTitleBar,duration:e&&e.duration?e.duration:null,eventType:\"demaximized\"}))},l.prototype.handleOnResize=function(){this.renderMaximizedMode({caller:\"handleOnResize\"})},l.prototype.handleOnVirtualResize=function(){this.renderMaximizedMode({caller:\"handleOnResize\",matchParent:!0})},l.prototype.doMinimize=function(e){var t=this;if(\"minimized\"!==t.windowMode&&\"minimizing\"!==t.windowMode){t.windowMode=\"minimizing\";var r=t.frame;t.saveCurrentWindowStats(\"minimize_mode\"),r.setResizable(!1),t.renderMinimizedMode({animation:t.animationEnabled,callback:e&&e.callback?e.callback:null,duration:e&&e.duration?e.duration:null,toWidth:e&&e.toWidth?e.toWidth:null})}},l.prototype.renderMinimizedMode=function(e){var t=this,r=t.frame,n=t.loadWindowStats(\"minimize_mode\"),o=t.getCurrentWindowStats(),a=t.getCurrentWindowStats();a.height=n.titleBarHeight,e&&e.toWidth&&(a.width=e.toWidth);var i=function(){r.setSize(a.width,a.height,!0),t.windowMode=\"minimized\",t.minimizeButton&&r.hideFrameComponent(t.minimizeButton),t.deminimizeButton&&r.showFrameComponent(t.deminimizeButton,t.styleDisplay),e.callback&&e.callback(t.frame,{eventType:\"minimized\"}),t.eventListeners.minimized&&t.eventListeners.minimized(t.frame,{eventType:\"minimized\"})};e&&e.animation?t.animateFrame({toAlpha:1,duration:e.duration?e.duration:t.animationDuration,frame:r,from:o,to:a,callback:i}):i()},l.prototype.doDeminimize=function(e){var t=this,r=t.frame;t.hasWindowStats(\"minimize_mode\")&&(t.minimizeButton&&r.showFrameComponent(t.minimizeButton,t.styleDisplay),t.deminimizeButton&&r.hideFrameComponent(t.deminimizeButton),t.restoreWindow({restorePosition:!1,restoreMode:\"minimize_mode\",animation:t.animationEnabled,duration:e&&e.duration?e.duration:null,callback:e&&e.callback?e.callback:null,eventType:\"deminimized\"}))},l.prototype.doHide=function(e){var t=this;if(\"hid\"!==t.windowMode&&\"hiding\"!==t.windowMode){t.windowMode=\"hiding\";var r=t.frame;t.saveCurrentWindowStats(\"hide_mode\"),r.setResizable(!1);var n={animation:t.animationEnabled};e&&a({op:\"overwrite-merge\",object1:n,object2:e}),t.renderHideMode(n)}},l.prototype.renderHideMode=function(e){var t=this,r=t.frame,n=t.loadWindowStats(\"hide_mode\"),a=t.getCurrentWindowStats(),i={x:0,y:0},l=e.toElement;e.offset&&(i=e.offset);var s=0,d=0,u=e&&e.align?e.align:\"LEFT_TOP\";if(u&&o.LEFT_TOP!=u){if(o.HCENTER_TOP==u)s=a.left+a.width/2,d=a.top;else if(o.RIGHT_TOP==u)s=a.left+a.width,d=a.top;else if(o.LEFT_VCENTER==u)s=a.left,d=a.top+a.height/2;else if(o.HCENTER_VCENTER==u)s=a.left+a.width/2,d=a.top+a.height/2;else if(o.RIGHT_VCENTER==u)s=a.left+a.width,d=a.top+a.height/2;else if(o.LEFT_BOTTOM==u)s=a.left,d=a.top+a.height;else if(o.HCENTER_BOTTOM==u)s=a.left+a.width/2,d=a.top+a.height;else if(o.RIGHT_BOTTOM==u)s=a.left+a.width,d=a.top+a.height;else if(\"ABSOLUTE\"==u)if(l){var c=l.getBoundingClientRect();t.isWindowManagerFixed?(s=c.left,d=c.top):(s=c.left+window.pageXOffset,d=c.top+window.pageYOffset)}else s=i.x,d=i.y}else s=a.left,d=a.top;var m={left:s,top:d,width:0,height:n.titleBarHeight},p=function(){r.setSize(m.width,m.height,!0),t.windowMode=\"hid\",e&&e.callback&&e.callback(t.frame,{eventType:\"hid\"}),t.eventListeners.hid&&t.eventListeners.hid(t.frame,{eventType:\"hid\"})};r.hideAllVisibleFrameComponents(),e&&e.animation?t.animateFrame({fromAlpha:e.silent?0:1,toAlpha:0,ease:!0,duration:e.duration?e.duration:t.animationDuration,frame:r,from:a,to:m,callback:p}):p()},l.prototype.doDehide=function(e){this.frame;this.hasWindowStats(\"hide_mode\")&&this.restoreWindow({duration:e&&e.duration?e.duration:null,restorePosition:!0,restoreMode:\"hide_mode\",animation:this.animationEnabled,forceShowFrameComponents:!0,callback:e&&e.callback?e.callback:null,eventType:\"dehided\"})},l.prototype.loadWindowStats=function(e){return this.statsStore[e]},l.prototype.saveCurrentWindowStats=function(e){var t=this,r=t.getCurrentWindowStats();if(t.hasWindowStats(e)){var n=t.loadWindowStats(e),o=!t.windowStatsEquals(r,n);return o&&(t.statsStore[e]=r),o}return t.statsStore[e]=r,!0},l.prototype.windowStatsEquals=function(e,t){return!(!e||!t)&&JSON.stringify(e)===JSON.stringify(t)},l.prototype.clearWindowStats=function(e){this.statsStore[e]=null},l.prototype.hasWindowStats=function(e){return this.statsStore[e]},l.prototype.getCurrentWindowStats=function(){var e=this.frame,t=parseInt(e.titleBar.style.height,10),r=e.frameBorderWidthDefault,n=e.frameBorderWidthFocused;return{left:e.getLeft(),top:e.getTop(),width:e.getWidth(),height:e.getHeight(),titleBarHeight:t,frameBorderWidthDefault:r,frameBorderWidthFocused:n,resizable:e.resizable,movable:e.movable}},l.prototype.restoreWindow=function(e){var t=this,r=t.frame,n=t.loadWindowStats(e.restoreMode),o=t.getCurrentWindowStats();r.frameBorderWidthDefault=n.frameBorderWidthDefault,r.frameBorderWidthFocused=n.frameBorderWidthFocused,r.htmlElement.style.borderWidth=r.frameBorderWidthFocused;var a=function(){e&&0==e.restorePosition&&(n.left=o.left,n.top=o.top),r.setPosition(n.left,n.top);r.setSize(n.width,n.height,!0),r.setResizable(n.resizable),r.setMovable(n.movable),t.clearWindowStats(e.restoreMode),t.keyListener&&(window.removeEventListener(\"keydown\",t.keyListener),r.iframe&&r.iframe.contentWindow.removeEventListener(\"keydown\",t.keyListener),t.keyListener=null),t.windowMode=\"default\",e&&e.forceShowFrameComponents&&r.showAllVisibleFrameComponents(),r.show();var a=\"restored\";e&&e.eventType&&(a=e.eventType),e&&e.callback&&e.callback(t.frame,{eventType:a}),t.eventListeners[a]&&t.eventListeners[a](t.frame,{eventType:a})};e&&e.animation?t.animateFrame({duration:e.duration?e.duration:t.animationDuration,frame:r,fromAlpha:0,toAlpha:1,from:o,to:n,callback:a}):a(),t.eventListenerHelper.removeEventListener(window,\"resize\",t.resizeListener),t.matchParentResizeObserver&&(t.matchParentResizeObserver.disconnect(),t.matchParentResizeObserver=null)},l.prototype.animateFrame=function(e){var t=isNaN(e.fromAlpha)?1:e.fromAlpha,r=e.from,o=e.to;(new n).set(e.frame).setDuration(e.duration?e.duration:this.animationDuration).fromPosition(r.left,r.top,\"LEFT_TOP\").toPosition(o.left,o.top,\"LEFT_TOP\").fromWidth(r.width).fromHeight(r.height).toWidth(o.width).toHeight(o.height).fromAlpha(t).toAlpha(0==e.toAlpha?0:1).ease(e.ease).start(0,!1).then((function(t){e.callback()}))},l.prototype.doCommand=function(e,t){var r=this;\"maximize\"===e&&r._defaultFunctionMaximize(r.frame),\"demaximize\"===e&&r._defaultFunctionDemaximize(r.frame),\"restore\"===e&&r._defaultFunctionRestoreFromFullscreen(r.frame),\"minimize\"===e&&r._defaultFunctionMinimize(r.frame),\"deminimize\"===e&&r._defaultFunctionDeminimize(r.frame),\"hide\"===e&&r._defaultFunctionHide(r.frame),\"dehide\"===e&&r._defaultFunctionDehide(r.frame)},l.prototype._defaultFunctionMaximize=function(e,t){var r=this.opts,n={fullScreen:!0===r.maximizeWithoutTitleBar,restoreKey:r.restoreKey?r.restoreKey:\"Escape\",restoreDuration:r.restoreDuration};this.maximizeParam&&a({op:\"overwrite-merge\",object1:n,object2:this.maximizeParam}),e.control.doMaximize(n)},l.prototype._defaultFunctionDemaximize=function(e,t){e.control.doDemaximize({})},l.prototype._defaultFunctionRestoreFromFullscreen=function(e,t){e.control.doDemaximize({duration:this.restoreDuration?this.restoreDuration:null,callback:this.restoreCallback?this.restoreCallback:null})},l.prototype._defaultFunctionMinimize=function(e,t){e.control.doMinimize(this.minimizeParam)},l.prototype._defaultFunctionDeminimize=function(e,t){e.control.doDeminimize(this.deminimizeParam)},l.prototype._defaultFunctionHide=function(e,t){var r={align:\"CENTER_BOTTOM\"};this.hideParam&&(r=this.hideParam),e.control.doHide(r)},l.prototype._defaultFunctionDehide=function(e,t){e.control.doDehide(this.dehideParam)},l.prototype.setupDefaultEvents=function(){var e=this;if(e.maximizeButton&&e.frame.on(e.maximizeButton,\"click\",e._defaultFunctionMaximize.bind(e)),e.demaximizeButton&&e.frame.on(e.demaximizeButton,\"click\",e._defaultFunctionDemaximize.bind(e)),e.minimizeButton&&e.frame.on(e.minimizeButton,\"click\",e._defaultFunctionMinimize.bind(e)),e.deminimizeButton&&e.frame.on(e.deminimizeButton,\"click\",e._defaultFunctionDeminimize.bind(e)),e.hideButton&&e.frame.on(e.hideButton,\"click\",e._defaultFunctionHide.bind(e)),e.hideButtons)for(var t in e.hideButtons){var r=e.hideButtons[t];r&&e.frame.on(r,\"click\",e._defaultFunctionHide.bind(e))}},e.exports=l},function(e,t){var r=function(){function e(){var e=this;e._timerId=null,e._isRunning=!1,e._timerInterval=0,e._internalCallback=function(){e._timerMethod&&e._timerMethod(e);e._isRunning&&(clearTimeout(e._timerId),e._timerId=setTimeout(e._internalCallback,e._timerInterval))},e._timerMethod=null}return e.prototype.setCallback=function(e){return this._timerMethod=e,this},e.prototype.setIntervalMillis=function(e){return this._timerInterval=e,this},e.prototype.stopTimer=function(){return this._isRunning=!1,this},e.prototype.startTimer=function(){var e=this;return e._timerInterval>0&&(e._timerId=setTimeout(e._internalCallback,e._timerInterval),e._isRunning=!0),e},e}();e.exports=r},function(e,t,r){var n=r(7),o=r(20);function a(){var e=this;this.showTitleBar=!0,this.showCloseButton=!0,this.titleBarCaption=\"\",this.titleBarCaptionFontSize=\"12px\",this.titleBarCaptionFontWeight=\"bold\",this.titleBarHeight=\"24px\",this.useIframe=!1,this.useFrame=!0,this.titleBarClassNameDefault=null,this.titleBarClassNameFocused=null,this.setUseIFrame=function(t){return e.useIframe=t,e.useFrame=!t,e},this.titleBarCaptionLeftMargin=\"5px\",this.titleBarColorDefault=null,this.titleBarColorFocused=null,this.titleBarCaptionColorDefault=\"\",this.titleBarCaptionColorFocused=\"\",this.titleBarCaptionTextShadow=\"0 1px 0 rgba(255,255,255,.7)\",this.titleBarCaptionTextAlign=\"center\",this.titleBarBorderBottomDefault=\"1px solid rgba(0,0,0,0.2)\",this.titleBarBorderBottomFocused=null,this.frameBorderRadius=\"6px\",this.frameBorderWidthDefault=\"1px\",this.frameBorderWidthFocused=this.frameBorderWidthDefault,this.frameBorderColorDefault=\"rgba(1, 1, 1, 0.2)\",this.frameBorderColorFocused=this.frameBorderColorDefault,this.frameBorderStyle=\"solid\",this.frameBoxShadow=\"2px 3px 16px rgba(0,0,0,.6)\",this.frameBackgroundColor=\"transparent\",this._partsBuilder=null,this.frameComponents=[],this.frameHeightAdjust=1,this.resizeAreaWidth=20,this.resizeAreaHeight=20,this.resizeAreaOffset=0,this.resizeAreaVisible=!1,this.getFrameInnerBorderRadius=function(t,r){return t?r?{frameAppearance:e,innerBorderRadius:parseInt(t.frameBorderRadius,10)-parseInt(t.frameBorderWidthFocused,10)+\"px\"}:{frameAppearance:e,innerBorderRadius:parseInt(t.frameBorderRadius,10)-parseInt(t.frameBorderWidthDefault,10)+\"px\"}:null},this.onInitialize=function(){if(e.showCloseButton){var t=e.getPartsBuilder(),r=t.buildTextButtonAppearance();r.size=14,r.captionShiftYpx=0,r.captionFontRatio=1,r.borderRadius=2,r.backgroundColorPressed=\"transparent\",r.backgroundColorDefault=\"transparent\",r.caption=\"✖\",r.captionColorDefault=\"gray\",r.captionColorFocused=\"gray\",r.captionColorHovered=\"silver\",r.captionColorPressed=\"black\",r.borderWidth=0,r.borderColorDefault=\"#aaaaaa\",r.borderStyle=\"solid\";var n=t.buildTextButton(r);e.addFrameComponent(\"closeButton\",n,-10,-18,\"RIGHT_TOP\")}},this.onTitleBarStyleInitialize=function(){}}a.prototype.getPartsBuilder=function(){return null===this._partsBuilder&&(this._partsBuilder=new n),this._partsBuilder},a.prototype.initialize=function(){this.onInitialize()},a.prototype.addFrameComponent=function(e,t,r,n,a,i){var l=new o(e,t,r,n,a,i);return t._onTakeFocus&&t._onReleaseFocus&&l.setFocusCallback(t._onTakeFocus,t._onReleaseFocus),this.frameComponents.push(l),l},e.exports=a},function(e,t,r){function n(){this.imageDefault=null,this.imageHovered=null,this.imagePressed=null,this.imageFocused=null,this.imageStore={}}r(6)(n,r(8)),n.prototype._setImage=function(e,t,r){var n=this.imageStore[e];if(n)return n;var o=document.createElement(\"img\");if(o.src=e,t&&r){var a=\"margin:0px;padding:0px;width:\"+t+\"px;height:\"+r+\"px\";o.setAttribute(\"style\",a)}return this.imageStore[e]=o,o},n.prototype.setSrc=function(e){var t=this;e.default&&(t.imageDefault=t._setImage(e.default,e.width,e.height)),e.hovered&&(t.imageHovered=t._setImage(e.hovered,e.width,e.height)),e.pressed&&(t.imagePressed=t._setImage(e.pressed,e.width,e.height)),e.focused&&(t.imageFocused=t._setImage(e.focused,e.width,e.height))},e.exports=n},function(e,t){e.exports=function(e){this.childMenuHTML=\"\",this.childMenuWidth=0,this.childMenuAlign=\"LEFT\",this.yOffset=0,this.xOffset=0}},function(e,t){function r(e,t,r,n,o,a){var i=this;i.id=e,i.x=r,i.y=n,i.frame=null,i._focusTakingCallabck=null,i._focusReleasingCallabck=null,i.frameComponentAlign=o||CALIGN.LEFT_TOP,i.htmlElement=t,i.htmlElement.style.zIndex=50,i.htmlElement.setAttribute(\"component-id\",e),a&&a.childMenu?i.childMenu=a.childMenu:t.querySelector(\".jsframe-child-menu\")&&(i.childMenu=t.querySelector(\".jsframe-child-menu\"))}r.prototype.setFocusCallback=function(e,t){this._focusTakingCallabck=e,this._focusReleasingCallabck=t},r.prototype.setFrame=function(e){this.frame=e,this.htmlElement.parentObject=e,this.updateAlign()},r.prototype.updateAlign=function(){var e=this,t=e.frameComponentAlign,r=e.frame,n=e.htmlElement.style;n.userSelect=\"none\";var o=e.x,a=e.y,i=r.getWidth(),l=r.getHeight(),s=n.width,d=n.height;CALIGN.LEFT_TOP==t?(n.left=o+\"px\",n.top=a+\"px\"):CALIGN.HCENTER_TOP==t?(n.left=parseInt(i)/2-parseInt(s)/2+o+\"px\",n.top=a+\"px\"):CALIGN.RIGHT_TOP==t?(n.left=parseInt(i)-parseInt(s)+o+\"px\",n.top=a+\"px\"):CALIGN.LEFT_VCENTER==t?(n.left=o+\"px\",n.top=parseInt(l)/2-parseInt(d)/2+a+\"px\"):CALIGN.HCENTER_VCENTER==t?(n.left=parseInt(i)/2-parseInt(s)/2+o+\"px\",n.top=parseInt(l)/2-parseInt(d)/2+a+\"px\"):CALIGN.RIGHT_VCENTER==t?(n.left=parseInt(i)-parseInt(s)+o+\"px\",n.top=parseInt(l)/2-parseInt(d)/2+a+\"px\"):CALIGN.LEFT_BOTTOM==t?(n.left=o+\"px\",n.top=parseInt(l)-parseInt(d)+a+\"px\"):CALIGN.HCENTER_BOTTOM==t?(n.left=parseInt(i)/2-parseInt(s)/2+o+\"px\",n.top=parseInt(l)-parseInt(d)+a+\"px\"):CALIGN.RIGHT_BOTTOM==t&&(n.left=parseInt(i)-parseInt(s)+o+\"px\",n.top=parseInt(l)-parseInt(d)+a+\"px\")},r.prototype.handleTakingFocus=function(){this._focusTakingCallabck&&this._focusTakingCallabck()},r.prototype.handleReleasingFocus=function(){this._focusReleasingCallabck&&this._focusReleasingCallabck()},e.exports=r},function(e,t,r){r(22);var n=r(9);e.exports.getStyle=function(e,t){var r={titleBar:{greenButton:\"maximize\"}},o=r;return t&&n.objectAssign(r,t),e.showTitleBar=!0,e.showCloseButton=!0,e.titleBarCaptionFontSize=\"11px\",e.titleBarCaptionFontWeight=\"normal\",e.titleBarCaptionLeftMargin=null,e.titleBarCaptionColorDefault=\"#4d494d\",e.titleBarCaptionColorFocused=\"#4d494d\",e.titleBarHeight=\"26px\",e.titleBarColorDefault=null,e.titleBarColorFocused=null,e.titleBarBorderBottomDefault=\"1px solid #b1aeb1\",e.titleBarBorderBottomFocused=e.titleBarBorderBottomDefault,e.frameBorderRadius=\"6px\",e.frameBorderWidthDefault=\"1px\",e.frameBorderWidthFocused=\"1px\",e.frameBorderColorDefault=\"#acacac\",e.frameBorderColorFocused=\"#acacac\",e.frameBorderStyle=\"solid\",e.frameBoxShadow=\"0px 0px 20px rgba(0, 0, 0, 0.3)\",e.frameBackgroundColor=\"transparent\",e.frameComponents=new Array,e.getTitleBarStyle=function(){return e.focusedFrameOnly?{titleBarClassNameDefault:\"jsframe-preset-style-yosemite-focused\",titleBarClassNameFocused:\"jsframe-preset-style-yosemite-focused\"}:{titleBarClassNameDefault:\"jsframe-preset-style-yosemite-default\",titleBarClassNameFocused:\"jsframe-preset-style-yosemite-focused\"}},e.onInitialize=function(){var t=e.getPartsBuilder(),r=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAWElEQVQoU2NkIBIwEqmOAa6wgZWlH6Sp4fefQjCNxkdRyMjAUPCf4f8CkEJGBsaE/wwME2AaUaxuYGWeD1IAUgjS0PD7byLMaaQrBLmJKKuJ9gyhYCI6HAGlFDALf9s7eQAAAABJRU5ErkJggg==\",n=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAVElEQVQoU2NkIBIwoqvjixFoAIl9WvIBTMMAhkLeGP79IMnPSz46kq8QZN1/hv/2IBMYGRgMQPR/BoYLED7jQZAzwFYTrRDZLdRxI7KJRAcPrvAHAATYKgvLH0fAAAAAAElFTkSuQmCC\";\"fullscreen\"===o.titleBar.greenButton&&(n=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAZElEQVQoU2NkIBIwEqmOAUWhQIKAwL8///czMDAYwAz4tOQjWA1cIUjRhwUfPqArxlDIF8N/nomF0RFdMTaF/xkYGC6gK/605KMhitV8MfwghSCAohhkAy6FKIphniIvePCFKQDzGzsLS+7n2AAAAABJRU5ErkJggg==\");var a=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABBJREFUeNpi+P//PwNAgAEACPwC/tuiTRYAAAAASUVORK5CYII=\",i=\"margin:0px;padding:0px;width:10px;height:10px\",l=document.createElement(\"img\");l.src=n,l.setAttribute(\"style\",i);var s=document.createElement(\"img\");s.src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAiUlEQVQoU2NkwAIEogQMPiz7cAFZihGbQt4Y/v0MjIwLPy/+sAAmj1MhIwODw39GxkSYYrwKQabBFGNVyBfL1///P6MBzFrmf4yFjCCH/2X63w93C+P/C58WfypEdzvYRN5YgQTG///ng61iYDjweclHR6wKkRUTVAhTzPD/fzxeE2FWYQtskBwAKwQ7tVjAL4MAAAAASUVORK5CYII=\",s.setAttribute(\"style\",i);var d=document.createElement(\"img\");d.src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAMUlEQVQoU2NkIBIwEqmOgUYKa7w4Ghj+M9hjdQYjw8GWbT8awFYTrZAYD9HIM8RYDQBsEAwLkq4IAgAAAABJRU5ErkJggg==\",d.setAttribute(\"style\",i);var u=document.createElement(\"img\");u.src=r,u.setAttribute(\"style\",i);var c=document.createElement(\"img\");c.src=a,c.setAttribute(\"style\",\"margin:0px;padding:0px;width:6px;height:6px\");var m=t.buildImageButtonAppearance();m.imageDefault=c,m.imageHovered=u,m.imagePressed=u,m.imageFocused=c,m.size=10,m.borderRadius=5,m.borderWidth=1,m.borderColorDefault=\"#c6c6c6\",m.borderColorFocused=\"#d3524e\",m.borderColorHovered=m.borderColorFocused,m.borderColorPressed=\"#e64842\",m.borderStyleDefault=\"solid\",m.borderStyleFocused=m.borderStyleDefault,m.borderStyleHovered=m.borderStyleDefault,m.borderStylePressed=m.borderStyleDefault,m.backgroundColorDefault=\"#d0d0d0\",m.backgroundColorFocused=\"#fc615c\",m.backgroundColorHovered=m.backgroundColorFocused,m.backgroundColorPressed=m.backgroundColorDefault,m.setSrc({default:a,focused:a,hovered:r,pressed:r});var p=t.buildButton(m),h=8,f=-19,y=\"LEFT_TOP\";e.addFrameComponent(o.closeButtonName||\"closeButton\",p,h,f,y);var b=t.buildImageButtonAppearance(m);b.borderColorDefault=\"#c6c6c6\",b.borderColorFocused=\"#e6b347\",b.borderColorHovered=b.borderColorFocused,b.borderColorPressed=\"#e1a12d\",b.backgroundColorDefault=\"#d0d0d0\",b.backgroundColorFocused=\"#fdbe40\",b.backgroundColorHovered=b.backgroundColorFocused,b.backgroundColorPressed=b.backgroundColorDefault,b.imageDefault=c,b.imageHovered=d,b.imagePressed=d,b.imageFocused=c;var g=t.buildButton(b),v=t.buildButton(b);v.style.display=\"none\";h=28,f=-19,y=\"LEFT_TOP\";e.addFrameComponent(\"minimizeButton\",g,h,f,y),e.addFrameComponent(\"deminimizeButton\",v,h,f,y);var C=t.buildImageButtonAppearance(m);C.borderColorDefault=\"#c6c6c6\",C.borderColorFocused=\"#67b657\",C.borderColorHovered=C.borderColorFocused,C.borderColorPressed=\"#00af38\",C.backgroundColorDefault=\"#d0d0d0\",C.backgroundColorFocused=\"#34ca49\",C.backgroundColorHovered=C.backgroundColorFocused,C.backgroundColorPressed=C.backgroundColorDefault,C.imageDefault=c,C.imageHovered=l,C.imagePressed=l,C.imageFocused=c;var B=t.buildButton(C),E=t.buildImageButtonAppearance(m);E.borderColorDefault=\"#c6c6c6\",E.borderColorFocused=\"#67b657\",E.borderColorHovered=E.borderColorFocused,E.borderColorPressed=\"#00af38\",E.backgroundColorDefault=\"#d0d0d0\",E.backgroundColorFocused=\"#34ca49\",E.backgroundColorHovered=E.backgroundColorFocused,E.backgroundColorPressed=E.backgroundColorDefault,E.imageDefault=c,E.imageHovered=s,E.imagePressed=s,E.imageFocused=c;var w=t.buildButton(E);w.style.display=\"none\";h=48,f=-19,y=\"LEFT_TOP\";e.addFrameComponent(\"dezoomButton\",w,h,f,y),e.addFrameComponent(\"zoomButton\",B,h,f,y)},e}},function(e,t,r){var n=r(0),o=r(23);\"string\"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,\"\"]]);var a={insert:\"head\",singleton:!1};n(o,a);e.exports=o.locals||{}},function(e,t,r){(t=r(1)(!1)).push([e.i,\".jsframe-preset-style-yosemite-default {\\n    background: -webkit-gradient(linear, left top, left bottom, color-stop(0.0, #f5f5f5, color-stop(1.0, #f8f7f2)));\\n    background: -webkit-linear-gradient(top, #f5f5f5, #f8f7f2);\\n    background: -moz-linear-gradient(top, #f5f5f5, #f8f7f2);\\n    background: linear-gradient(top, #f5f5f5, #f8f7f2);\\n    border-top-left-radius: 6px;\\n    border-top-right-radius: 6px;\\n}\\n\\n.jsframe-preset-style-yosemite-focused {\\n    /* (c)2015 Johannes Jakob\\n       Made with <3 in Germany */\\n    background: -webkit-gradient(linear, left top, left bottom, color-stop(0.0, #ebebeb, color-stop(1.0, #d5d5d5)));\\n    background: -webkit-linear-gradient(top, #ebebeb, #d5d5d5);\\n    background: -moz-linear-gradient(top, #ebebeb, #d5d5d5);\\n    background: linear-gradient(top, #ebebeb, #d5d5d5);\\n    border-top-left-radius: 6px;\\n    border-top-right-radius: 6px;\\n}\\n\",\"\"]),e.exports=t},function(e,t,r){r(25),e.exports.getStyle=function(e){return e.showTitleBar=!0,e.showCloseButton=!0,e.titleBarCaptionFontSize=\"12px\",e.titleBarCaptionFontWeight=\"normal\",e.titleBarCaptionLeftMargin=\"10px\",e.titleBarCaptionColorDefault=\"#9b9a9b\",e.titleBarCaptionColorFocused=\"#4d494d\",e.titleBarHeight=\"30px\",e.titleBarColorDefault=null,e.titleBarColorFocused=null,e.titleBarBorderBottomDefault=\"solid 1px #aaaaaa\",e.titleBarBorderBottomFocused=\"solid 1px #1883d7\",e.frameBorderRadius=\"0px\",e.frameBorderWidthDefault=\"1px\",e.frameBorderWidthFocused=\"1px\",e.frameBorderColorDefault=\"#aaaaaa\",e.frameBorderColorFocused=\"#1883d7\",e.frameBorderStyle=\"solid\",e.frameBoxShadow=null,e.frameBackgroundColor=\"transparent\",e.frameComponents=new Array,e.frameHeightAdjust=0,e.getTitleBarStyle=function(){return e.focusedFrameOnly?{titleBarClassNameDefault:\"jsframe-preset-style-redstone-focused\",titleBarClassNameFocused:\"jsframe-preset-style-redstone-focused\"}:{titleBarClassNameDefault:\"jsframe-preset-style-redstone-default\",titleBarClassNameFocused:\"jsframe-preset-style-redstone-focused\"}},e.onInitialize=function(){var t=e.getPartsBuilder(),r=t.buildTextButtonAppearance();r.width=45,r.height=28,r.borderRadius=0,r.borderWidth=0,r.borderColorDefault=\"#c6c6c6\",r.borderColorFocused=\"#fc615c\",r.borderColorHovered=r.borderColorFocused,r.borderColorPressed=\"#e64842\",r.borderStyleDefault=\"solid\",r.borderStyleFocused=r.borderStyleDefault,r.borderStyleHovered=r.borderStyleDefault,r.borderStylePressed=r.borderStyleDefault,r.backgroundColorDefault=\"white\",r.backgroundColorFocused=\"white\",r.backgroundColorHovered=\"#e81123\",r.backgroundColorPressed=\"#f1707a\",r.caption=\"╳\",r.captionColorDefault=\"#9b9a9b\",r.captionColorFocused=\"black\",r.captionColorHovered=\"white\",r.captionColorPressed=\"white\",r.captionShiftYpx=1,r.captionFontRatio=.6;var n=t.buildTextButton(r),o=0,a=-parseInt(e.titleBarHeight),i=\"RIGHT_TOP\";e.addFrameComponent(\"closeButton\",n,o,a,i);var l=t.buildTextButtonAppearance();l.width=45,l.height=28,l.borderRadius=0,l.borderWidth=0,l.borderColorDefault=\"#c6c6c6\",l.borderColorFocused=\"#fc615c\",l.borderColorHovered=l.borderColorFocused,l.borderColorPressed=\"#e64842\",l.borderStyleDefault=\"solid\",l.borderStyleFocused=l.borderStyleDefault,l.borderStyleHovered=l.borderStyleDefault,l.borderStylePressed=l.borderStyleDefault,l.backgroundColorDefault=\"white\",l.backgroundColorFocused=\"white\",l.backgroundColorHovered=\"#e5e5e5\",l.backgroundColorPressed=\"#cccccc\",l.caption=\"☐\",l.captionColorDefault=\"#9b9a9b\",l.captionColorFocused=\"black\",l.captionColorHovered=\"black\",l.captionColorPressed=\"black\",l.captionShiftYpx=1,l.captionFontRatio=.55;var s=t.buildTextButton(l);o=-46,a=-parseInt(e.titleBarHeight),i=\"RIGHT_TOP\";e.addFrameComponent(\"maximizeButton\",s,o,a,i);var d=t.buildTextButtonAppearance();d.width=45,d.height=28,d.borderRadius=0,d.borderWidth=0,d.borderColorDefault=\"#c6c6c6\",d.borderColorFocused=\"#fc615c\",d.borderColorHovered=d.borderColorFocused,d.borderColorPressed=\"#e64842\",d.borderStyleDefault=\"solid\",d.borderStyleFocused=d.borderStyleDefault,d.borderStyleHovered=d.borderStyleDefault,d.borderStylePressed=d.borderStyleDefault,d.backgroundColorDefault=\"white\",d.backgroundColorFocused=\"white\",d.backgroundColorHovered=\"#e5e5e5\",d.backgroundColorPressed=\"#cccccc\",d.caption=\"＿\",d.captionColorDefault=\"#9b9a9b\",d.captionColorFocused=\"black\",d.captionColorHovered=\"black\",d.captionColorPressed=\"black\",d.captionShiftYpx=-2,d.captionFontRatio=.3;var u=t.buildTextButton(d);o=-92,a=-parseInt(e.titleBarHeight),i=\"RIGHT_TOP\";e.addFrameComponent(\"minimizeButton\",u,o,a,i);var c=t.buildTextButtonAppearance();c.width=45,c.height=28,c.borderRadius=0,c.borderWidth=0,c.borderColorDefault=\"#c6c6c6\",c.borderColorFocused=\"#fc615c\",c.borderColorHovered=c.borderColorFocused,c.borderColorPressed=\"#e64842\",c.borderStyleDefault=\"solid\",c.borderStyleFocused=c.borderStyleDefault,c.borderStyleHovered=c.borderStyleDefault,c.borderStylePressed=c.borderStyleDefault,c.backgroundColorDefault=\"white\",c.backgroundColorFocused=\"white\",c.backgroundColorHovered=\"#e5e5e5\",c.backgroundColorPressed=\"#cccccc\",c.caption=\"▣\",c.captionColorDefault=\"#9b9a9b\",c.captionColorFocused=\"black\",c.captionColorHovered=\"black\",c.captionColorPressed=\"black\",c.captionShiftYpx=1,c.captionFontRatio=.6;var m=t.buildTextButton(c);o=-92,a=-parseInt(e.titleBarHeight),i=\"RIGHT_TOP\";m.style.display=\"none\",e.addFrameComponent(\"deminimizeButton\",m,o,a,i);var p=t.buildTextButtonAppearance();p.width=45,p.height=28,p.borderRadius=0,p.borderWidth=0,p.borderColorDefault=\"#c6c6c6\",p.borderColorFocused=\"#fc615c\",p.borderColorHovered=p.borderColorFocused,p.borderColorPressed=\"#e64842\",p.borderStyleDefault=\"solid\",p.borderStyleFocused=p.borderStyleDefault,p.borderStyleHovered=p.borderStyleDefault,p.borderStylePressed=p.borderStyleDefault,p.backgroundColorDefault=\"white\",p.backgroundColorFocused=\"white\",p.backgroundColorHovered=\"#e5e5e5\",p.backgroundColorPressed=\"#cccccc\",p.caption=\"❏\",p.captionColorDefault=\"#9b9a9b\",p.captionColorFocused=\"black\",p.captionColorHovered=\"black\",p.captionColorPressed=\"black\",p.captionShiftYpx=1,p.captionFontRatio=.55;var h=t.buildTextButton(p);o=-46,a=-parseInt(e.titleBarHeight),i=\"RIGHT_TOP\";h.style.display=\"none\",e.addFrameComponent(\"restoreButton\",h,o,a,i)},e}},function(e,t,r){var n=r(0),o=r(26);\"string\"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,\"\"]]);var a={insert:\"head\",singleton:!1};n(o,a);e.exports=o.locals||{}},function(e,t,r){(t=r(1)(!1)).push([e.i,\".jsframe-preset-style-redstone-default {\\n    background: white;\\n    border-top-left-radius: 0px;\\n    border-top-right-radius: 0px;\\n}\\n\\n.jsframe-preset-style-redstone-focused {\\n    background: white;\\n    border-top-left-radius: 0px;\\n    border-top-right-radius: 0px;\\n}\\n\",\"\"]),e.exports=t},function(e,t,r){r(28),e.exports.getStyle=function(e){return e.showTitleBar=!1,e.showCloseButton=!0,e.titleBarCaptionFontSize=\"12px\",e.titleBarCaptionFontWeight=\"normal\",e.titleBarCaptionLeftMargin=\"10px\",e.titleBarCaptionColorDefault=\"#4d494d\",e.titleBarCaptionColorFocused=\"#4d494d\",e.titleBarHeight=\"5px\",e.titleBarColorDefault=\"white\",e.titleBarColorFocused=\"white\",e.titleBarBorderBottomDefault=null,e.titleBarBorderBottomFocused=null,e.frameBorderRadius=\"6px\",e.frameBorderWidthDefault=\"1px\",e.frameBorderWidthFocused=\"1px\",e.frameBorderColorDefault=\"#aaaaaa\",e.frameBorderColorFocused=\"#aaaaaa\",e.frameBorderStyle=\"solid\",e.frameBoxShadow=\"2px 2px 5px  rgba(0, 0, 0, 0.5)\",e.frameBackgroundColor=\"white\",e.frameComponents=new Array,e.frameHeightAdjust=2,e.getTitleBarStyle=function(){return e.focusedFrameOnly?{titleBarClassNameDefault:\"jsframe-preset-style-popup-focused\",titleBarClassNameFocused:\"jsframe-preset-style-popup-focused\"}:{titleBarClassNameDefault:\"jsframe-preset-style-popup-default\",titleBarClassNameFocused:\"jsframe-preset-style-popup-focused\"}},e.onInitialize=function(){var t=e.getPartsBuilder(),r=t.buildTextButtonAppearance();r.width=20,r.height=20,r.borderRadius=10,r.borderWidth=1,r.borderColorDefault=\"#cccccc\",r.borderColorFocused=\"#cccccc\",r.borderColorHovered=\"#dddddd\",r.borderColorPressed=\"#eeeeee\",r.borderStyleDefault=\"solid\",r.borderStyleFocused=r.borderStyleDefault,r.borderStyleHovered=r.borderStyleDefault,r.borderStylePressed=r.borderStyleDefault,r.backgroundColorDefault=\"white\",r.backgroundColorFocused=\"white\",r.backgroundColorHovered=\"#eeeeee\",r.backgroundColorPressed=\"#dddddd\",r.backgroundBoxShadow=\"2px 2px 5px  rgba(0, 0, 0, 0.5)\",r.caption=\"✖\",r.captionColorDefault=\"black\",r.captionColorFocused=\"black\",r.captionColorHovered=\"white\",r.captionColorPressed=\"white\",r.captionShiftYpx=1,r.captionFontRatio=.6;var n=t.buildTextButton(r),o=-6-parseInt(e.titleBarHeight);e.addFrameComponent(\"closeButton\",n,10,o,\"RIGHT_TOP\")},e}},function(e,t,r){var n=r(0),o=r(29);\"string\"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,\"\"]]);var a={insert:\"head\",singleton:!1};n(o,a);e.exports=o.locals||{}},function(e,t,r){(t=r(1)(!1)).push([e.i,\".jsframe-preset-style-popup-default {\\n    background: white;\\n    border-top-left-radius: 0px;\\n    border-top-right-radius: 0px;\\n}\\n\\n.jsframe-preset-style-popup-focused {\\n    background: white;\\n    border-top-left-radius: 0px;\\n    border-top-right-radius: 0px;\\n}\\n\",\"\"]),e.exports=t},function(e,t){e.exports.getStyle=function(e){return e.showTitleBar=!1,e.showCloseButton=!0,e.titleBarCaptionFontSize=\"0px\",e.titleBarCaptionFontWeight=\"normal\",e.titleBarCaptionLeftMargin=\"0px\",e.titleBarCaptionColorDefault=\"transparent\",e.titleBarCaptionColorFocused=\"transparent\",e.titleBarHeight=\"0px\",e.titleBarColorDefault=\"transparent\",e.titleBarColorFocused=\"transparent\",e.titleBarBorderBottomDefault=null,e.titleBarBorderBottomFocused=null,e.frameBorderRadius=\"10px\",e.frameBorderWidthDefault=\"0px\",e.frameBorderWidthFocused=\"0px\",e.frameBorderColorDefault=\"transparent\",e.frameBorderColorFocused=\"transparent\",e.frameBorderStyle=\"solid\",e.frameBoxShadow=\"2px 2px 15px  rgba(0, 0, 0, 0.5)\",e.frameBackgroundColor=\"transparent\",e.frameComponents=[],e.frameHeightAdjust=1,e.captionClor=\"darkgray\",e.pullUpDisabled=!1,e.getTitleBarStyle=function(){return e.focusedFrameOnly,{titleBarClassNameDefault:\" \",titleBarClassNameFocused:\" \"}},e.onInitialize=function(){var t=e.getPartsBuilder(),r=t.buildTextButtonAppearance();r.width=20,r.height=20,r.borderRadius=10,r.borderWidth=0,r.borderColorDefault=\"#cccccc\",r.borderColorFocused=\"#cccccc\",r.borderColorHovered=\"#dddddd\",r.borderColorPressed=\"#eeeeee\",r.borderStyleDefault=\"solid\",r.borderStyleFocused=r.borderStyleDefault,r.borderStyleHovered=r.borderStyleDefault,r.borderStylePressed=r.borderStyleDefault,r.backgroundColorDefault=\"transparent\",r.backgroundColorFocused=\"transparent\",r.backgroundColorHovered=\"transparent\",r.backgroundColorPressed=\"transparent\",r.backgroundBoxShadow=null,r.caption=\"✖\",r.captionColorDefault=e.captionClor,r.captionColorFocused=e.captionClor,r.captionColorHovered=e.captionClor,r.captionColorPressed=e.captionClor,r.captionShiftYpx=1,r.captionFontRatio=.6;var n=t.buildTextButton(r);e.addFrameComponent(\"closeButton\",n,-6,3,\"RIGHT_TOP\")},e}},function(e,t,r){r(32);var n=r(9);function o(e,t,r){var n,o=e.getPartsBuilder(),i=0;for(var l in n=r?t.titleBar.buttonsOnLeft:t.titleBar.buttons){var s=n[l],d=o.buildTextButtonAppearance();d.fa=s.fa,d.width=t.titleBar.buttonWidth,d.height=t.titleBar.buttonHeight,d.borderRadius=0,d.borderWidth=0,d.borderColorDefault=\"#c6c6c6\",d.borderColorFocused=\"#fc615c\",d.borderColorHovered=d.borderColorFocused,d.borderColorPressed=\"#e64842\",d.borderStyleDefault=\"solid\",d.borderStyleFocused=d.borderStyleDefault,d.borderStyleHovered=d.borderStyleDefault,d.borderStylePressed=d.borderStyleDefault,d.backgroundColorDefault=\"transparent\",d.backgroundColorFocused=\"transparent\",d.backgroundColorHovered=\"transparent\",d.backgroundColorPressed=\"transparent\";var u=a(t.titleBar.buttonColor);d.captionColorDefault=t.titleBar.buttonColor,d.captionColorFocused=t.titleBar.buttonColor,d.captionColorHovered=u.hovered,d.captionColorPressed=u.pressed,d.captionShiftYpx=0,d.captionFontRatio=1;var c=o.buildTextButton(d);s.visible?c.style.display=\"flex\":(r?i-=t.titleBar.buttonWidth:i+=t.titleBar.buttonWidth,c.style.display=\"none\");var m,p,h=parseInt(e.titleBarHeight),f=i,y=-h+(h-d.height)/2;m=r?\"LEFT_TOP\":\"RIGHT_TOP\",s.childMenuHTML&&((p=document.createElement(\"div\")).id=s.name+\"_child_menu\",p.innerHTML=s.childMenuHTML,p.style.position=\"absolute\",p.style.width=(s.childMenuWidth?s.childMenuWidth:200)+\"px\",p.style.top=parseInt(c.style.top,10)+parseInt(c.style.height,10)/2+h/2+\"px\",p.style.left=c.style.left,p.style.display=\"none\",c.appendChild(p)),e.addFrameComponent(s.name,c,f,y,m,{childMenu:p}),i+=r?t.titleBar.buttonWidth:-t.titleBar.buttonWidth}}function a(e){var t=document.createElement(\"canvas\");t.height=1,t.width=1;var r=t.getContext(\"2d\");r.fillStyle=e,r.fillRect(0,0,1,1);var n=r.getImageData(0,0,1,1).data,o=n[0],a=n[1],i=n[2],l=n[3]/255,s=.85*l;return{src:\"rgb(\"+o+\",\"+a+\",\"+i+\",\"+s+\")\",hovered:\"rgb(\"+o+\",\"+a+\",\"+i+\",\"+s+\")\",pressed:\"rgb(\"+o+\",\"+a+\",\"+i+\",\"+.75*l+\")\"}}e.exports.getStyle=function(e,t){var r={border:{color:\"transparent\",width:0,radius:6},control:{maximizeWithoutTitleBar:!1,restoreKey:\"Escape\"},titleBar:{color:\"white\",background:\"black\",leftMargin:20,height:30,fontSize:12,buttonWidth:36,buttonHeight:16,buttonColor:\"white\",buttons:[{fa:\"fas fa-times\",name:\"closeButton\",visible:!0},{fa:\"far fa-window-maximize\",name:\"maximizeButton\",visible:!0},{fa:\"far fa-window-restore\",name:\"restoreButton\",visible:!1},{fa:\"far fa-window-minimize\",name:\"minimizeButton\",visible:!0},{fa:\"fas fa-caret-up\",name:\"deminimizeButton\",visible:!1}],buttonsOnLeft:[]}},a=r;return t&&n.objectAssign(r,t),e.showTitleBar=!0,e.showCloseButton=!0,e.titleBarCaptionFontSize=a.titleBar.fontSize+\"px\",e.titleBarCaptionFontWeight=\"normal\",e.titleBarCaptionLeftMargin=a.titleBar.leftMargin+\"px\",e.titleBarCaptionColorDefault=a.titleBar.color,e.titleBarCaptionColorFocused=a.titleBar.color,e.titleBarCaptionTextShadow=null,e.titleBarCaptionTextAlign=\"left\",e.titleBarHeight=a.titleBar.height+\"px\",e.titleBarColorDefault=a.titleBar.background,e.titleBarColorFocused=a.titleBar.background,e.titleBarBorderBottomDefault=\"solid 0px #aaaaaa\",e.titleBarBorderBottomFocused=\"solid 0px #1883d7\",e.frameBorderRadius=a.border.radius+\"px\",e.frameBorderWidthDefault=a.border.width+\"px\",e.frameBorderWidthFocused=a.border.width+\"px\",e.frameBorderColorDefault=a.border.color,e.frameBorderColorFocused=a.border.color,e.frameBorderStyle=\"solid\",e.frameBoxShadow=a.border.shadow,e.frameBackgroundColor=\"transparent\",e.frameComponents=new Array,e.frameHeightAdjust=0,e.getTitleBarStyle=function(){return e.focusedFrameOnly,{titleBarClassNameDefault:\" \",titleBarClassNameFocused:\" \"}},e.onInitialize=function(){o(e,a,!1),o(e,a,!0)},e}},function(e,t,r){var n=r(0),o=r(33);\"string\"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,\"\"]]);var a={insert:\"head\",singleton:!1};n(o,a);e.exports=o.locals||{}},function(e,t,r){(t=r(1)(!1)).push([e.i,\".jsframe-preset-style-material-default {\\n    background: black;\\n    border-top-left-radius: 6px;\\n    border-top-right-radius: 6px;\\n}\\n\\n.jsframe-preset-style-material-focused {\\n    background: black;\\n    border-top-left-radius: 36px;\\n    border-top-right-radius: 36px;\\n}\\n\",\"\"]),e.exports=t},function(e,t,r){var n=r(2);e.exports.getPresetWindow=function(e){var t={appearanceName:\"yosemite\",appearanceParam:{}},r={};e&&(r=e);var o=\"fullscreen\"===r.maximizeButtonBehavior,a=\"minimize\"===r.minimizeButtonBehavior?\"minimizeButton\":null,i=\"hide\"===r.minimizeButtonBehavior?\"minimizeButton\":null,l=\"hide\"===r.closeButtonBehavior?\"custom-close-button\":null,s=r.control,d=l,u=r.closeButtonName;return o&&(t.appearanceParam.titleBar={greenButton:\"fullscreen\"}),t.appearanceParam.closeButtonName=d||u||\"closeButton\",t.setupPresetWindow=function(e){var t={maximizeButton:\"zoomButton\",maximizeParam:{fullScreen:o,restoreKey:\"Escape\"},demaximizeButton:\"dezoomButton\",deminimizeButton:\"deminimizeButton\",minimizeButton:a,hideButtons:[i,l],hideParam:{align:\"CENTER_CENTER\",duration:300},dehideParam:{duration:300},styleDisplay:\"inline\",animation:!0,animationDuration:100};s&&n({op:\"overwrite-merge\",object1:t,object2:s}),e.setControl(t)},t}}])}));"
  },
  {
    "path": "src/CCommon.js",
    "content": "var CALIGN = {};\n\nCALIGN.LEFT_TOP = 'LEFT_TOP';\nCALIGN.HCENTER_TOP = 'CENTER_TOP';\nCALIGN.RIGHT_TOP = 'RIGHT_TOP';\nCALIGN.LEFT_VCENTER = 'LEFT_CENTER';\nCALIGN.HCENTER_VCENTER = 'CENTER_CENTER';\nCALIGN.CENTER = CALIGN.HCENTER_VCENTER;\nCALIGN.RIGHT_VCENTER = 'RIGHT_CENTER';\nCALIGN.LEFT_BOTTOM = 'LEFT_BOTTOM';\nCALIGN.HCENTER_BOTTOM = 'CENTER_BOTTOM';\nCALIGN.RIGHT_BOTTOM = 'RIGHT_BOTTOM';\n\nmodule.exports = CALIGN;\n"
  },
  {
    "path": "src/JSFrame.css",
    "content": ".jsframe-titlebar-default {\n    background: -webkit-gradient(linear, left top, left bottom, color-stop(0.0, #f5f5f5, color-stop(1.0, #f8f7f2)));\n    background: -webkit-linear-gradient(top, #f5f5f5, #f8f7f2);\n    background: -moz-linear-gradient(top, #f5f5f5, #f8f7f2);\n    background: linear-gradient(top, #f5f5f5, #f8f7f2);\n    border-top-left-radius: 6px;\n    border-top-right-radius: 6px;\n}\n\n.jsframe-titlebar-focused {\n    /* (c)2015 Johannes Jakob\n       Made with <3 in Germany */\n    background: -webkit-gradient(linear, left top, left bottom, color-stop(0.0, #ebebeb, color-stop(1.0, #d5d5d5)));\n    background: -webkit-linear-gradient(top, #ebebeb, #d5d5d5);\n    background: -moz-linear-gradient(top, #ebebeb, #d5d5d5);\n    background: linear-gradient(top, #ebebeb, #d5d5d5);\n    border-top-left-radius: 6px;\n    border-top-right-radius: 6px;\n}\n\n.jsframe-modal-window-background {\n    background: rgba(0, 0, 0, 0.6);\n    height: 100%;\n    widdth: 100%\n}"
  },
  {
    "path": "src/JSFrame.js",
    "content": "'use strict';\n\nrequire('./JSFrame.css');\nvar EventEmitter = require('@riversun/event-emitter');\nvar CALIGN = require('./CCommon.js');\nvar WindowEventHelper = require('./utils/WindowEventHelper.js');\nvar inherit = require('./utils/Inherit.js');\nvar CFrameAppearance = require('./appearance/CFrameAppearance.js');\nvar CDomPartsBuilder = require('./appearance/CDomPartsBuilder.js');\nvar CSimpleLayoutAnimator = require('./utils/CSimpleLayoutAnimator.js');\nvar EventListenerHelper = require('event-listener-helper');\n\n//If you don't want to bundle preset styles in JsFrame.js ,comment out below.\nvar presetStyles = {\n  'yosemite': require('./presets/appearance/PresetStyleYosemite.js'),\n  'redstone': require('./presets/appearance/PresetStyleRedstone.js'),\n  'popup': require('./presets/appearance/PresetStylePopup.js'),\n  'toast': require('./presets/appearance/PresetStyleToast.js'),\n  'material': require('./presets/appearance/PresetStyleMaterial.js'),\n};\n\nvar presetWindows = {\n  'yosemite': require('./presets/window/PresetWindowYosemite.js'),\n};\n\nvar DEF = {};\n\nvar touchEnabled = 'ontouchstart' in window || window.DocumentTouch && document instanceof DocumentTouch;\n\n// true:Support mouse on mouse-enabled devices\nvar MOUSE_ENABLED = !touchEnabled;\n\n// true:Support touch on touch-enabled devices\nvar TOUCH_ENABLED = touchEnabled;\n\n//true:Allow the window to be moved only in the case of one finger\n// (the window cannot be moved in the case of two or more fingers)\nvar TOUCH_MOVE_ONLY_WITH_ONE_FINGER = true;\n\n\n/**\n * DEFINITIONS\n */\nDEF.CBEAN = {};\nDEF.CBEAN.HTML_ELEMENT = 'span';\nDEF.CBEAN.HTML_ELEMENT_ID_PREFIX = 'htmlElement_';\nDEF.CBEAN.TYPE_NAME = 'bean';\n\n\n//+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-\n\n\n/**\n * CBeanFrame Class<p>\n * The smallest window. It is responsible for basic processing only.\n *\n * @param beanId id of this small window\n * @param left\n * @param top\n * @param width\n * @param height\n * @param zindex\n * @constructor\n */\nfunction CBeanFrame(beanId, left, top, width, height, zindex, w_border_width, appearance) {\n\n  var me = this;\n\n  me.movable = true;\n\n\n  //fields\n  me.id = beanId;\n  me.property = {};\n\n  me.extra = {};\n\n  me.parentCanvas = null;\n  me.htmlElement = null;\n\n  me.pullUpDisabled = false;\n  if (appearance) {\n    me.pullUpDisabled = appearance.pullUpDisabled;\n  }\n\n\n  //initialize\n  me.htmlElement = document.createElement(DEF.CBEAN.HTML_ELEMENT);\n  me.htmlElement.id = DEF.CBEAN.HTML_ELEMENT_ID_PREFIX + beanId;\n  me.htmlElement.style.position = 'absolute';\n  me.htmlElement.style.left = parseInt(left, 10) + 'px';\n  me.htmlElement.style.top = parseInt(top, 10) + 'px';\n  me.htmlElement.style.width = parseInt(width, 10) + 'px';\n  me.htmlElement.style.height = parseInt(height, 10) + 'px';\n\n\n  //Zindex may become 'undefined' in some cases.\n  if (zindex !== null) {\n    me.htmlElement.style.zIndex = zindex;\n  }\n  me.htmlElement.style.borderColor = '#000000';\n\n  //If I set a larger font size, width and height of window will be affected....\n  me.htmlElement.style.fontSize = '1px';\n\n  //Refer parents to each other.(sougo-sansho)\n  me.htmlElement.parent = me;\n\n  if (MOUSE_ENABLED) {\n    //Note that 'mouseDown' is mapped to 'onmousedown' of htmlElement,\n    //so when 'onmouseDown' fires ,the 'this' will indicate 'htmlElement'\n    me.htmlElement.onmousedown = me.onmouseDown;\n  }\n\n  if (TOUCH_ENABLED) {\n    if ('ontouchstart' in window) {\n      var funcOnTouchStart = function(evt) {\n        // The \"mousedown\" event happens right after \"touchstart\" event,\n        // but I don't call #preventdefault because #preventdefault prevents \"onclick\".\n        // So, perform #preventdefault only for \"touchmove\"\n        // evt.preventDefault();\n        me.onmouseDown.bind(this)(evt);\n      };\n      me.htmlElement.ontouchstart = funcOnTouchStart;\n    }\n  }\n\n  //Type name of this class\n  me.htmlElement.typeName = DEF.CBEAN.TYPE_NAME;\n\n  //Special field indicating usage of this class\n  me.htmlElement.usage = 'nothing';\n\n  //Whether it can move outside the frame(waku).\n  me.htmlElement.isRangeLimited = false;\n\n  //Movement magnification in the X direction\n  //(If it is 0, it can not move in the X direction.)\n  me.htmlElement.argX = 1;\n\n  //Movement magnification in Y direction\n  // (If it is 0, it can not move in Y direction)\n  me.htmlElement.argY = 1;\n  me.externalAreaClickedListener = null;\n\n  me.onMoveListener = null;\n}\n\nCBeanFrame.prototype.getWindowType = function() {\n  return 'CBeanFrame';\n};\n\nCBeanFrame.prototype.setOnMoveListener = function(listener) {\n  var me = this;\n  me.onMoveListener = listener;\n};\nCBeanFrame.prototype._onMove = function(e) {\n  var me = this;\n  if (me.onMoveListener) {\n    me.onMoveListener(e);\n  }\n};\n\n/**\n * Set whether the frame can be moved while dragging with the mouse\n * @param enabled\n */\nCBeanFrame.prototype.setMovable = function(enabled) {\n  var me = this;\n\n  if (enabled) {\n    me.htmlElement.argX = 1;\n    me.htmlElement.argY = 1;\n  } else {\n    me.htmlElement.argX = 0;\n    me.htmlElement.argY = 0;\n  }\n\n  me.movable = enabled;\n\n  return me;\n};\n\n\nCBeanFrame.prototype.setParentCanvas = function(parentCanvas) {\n  var me = this;\n  me.parentCanvas = parentCanvas;\n  me.htmlElement.parentCanvas = me.parentCanvas;\n  return me;\n};\nCBeanFrame.prototype.setOnExternalAreaClickedListener = function(listener) {\n  var me = this;\n  me.externalAreaClickedListener = listener;\n  return me;\n};\nCBeanFrame.prototype.onBodyClicked = function(e) {\n\n  var me = this;\n\n  var clickX = e.pageX;\n  var clickY = e.pageY;\n\n  var left = parseInt(me.htmlElement.style.left);\n  var top = parseInt(me.htmlElement.style.top);\n  var width = parseInt(me.htmlElement.style.width);\n  var height = parseInt(me.htmlElement.style.height);\n\n  if (left < clickX && clickX < (left + width) && top < clickY && (clickY < top + height)) {\n    //- clicked internal area of this frame\n  } else {\n\n    //- clicked external area of this frame\n    if (me.externalAreaClickedListener) {\n      me.externalAreaClickedListener();\n    }\n\n  }\n\n\n};\nCBeanFrame.prototype.onmouseDown = function(evt) {\n\n  // Typically, if you mouse down on the title portion, the onmousedown fires to move the window.\n  // Mousing down the bottom of the window, the left side of the window,\n  // or the bottom of the window will fire the onmouseDown of the window itself (CBeanFrame)\n  // as well as the onmouseDown of the CMarkerWindow for resizing.\n  // Each mousedown element is set to a currentObject as being selected,\n  // whether it's a window or a marker.\n\n  // this means htmlElement of CBeanFrame object\n  var refHtmlElement = this;\n\n  var e = evt;\n\n  if (TOUCH_ENABLED) {\n    if (evt.type === 'touchstart') {\n      var changedTouches = evt.changedTouches;\n      if (TOUCH_MOVE_ONLY_WITH_ONE_FINGER) {\n        var touches = evt.touches;\n        if (touches.length === 1) {\n          e = changedTouches[0];\n        } else {\n          return true;\n        }\n      } else {\n        e = changedTouches[0];\n      }\n    }\n  }\n\n  //Retrieve CBeanFrame object itself\n  var refCBeanFrame = refHtmlElement.parent;\n\n  if (e.button == 0 || evt.type === 'touchstart') {\n    // for modal background window\n    if (refCBeanFrame.pullUpDisabled) {\n      return false;\n    } else {\n\n      // Set the current CBeanFrame to be selected(=currentObject) among other CBeanFrames in the parent canvas.\n      refHtmlElement.parentCanvas.currentObject = refHtmlElement;\n\n      // Bring the current bean to the top\n      refHtmlElement.parentCanvas.pullUp(refCBeanFrame.id);\n    }\n\n  } else if (e.button == 2) {\n    return false;\n  }\n\n  if (refHtmlElement.parentCanvas.currentObject) {\n\n    refHtmlElement.parentCanvas.offsetX = e.pageX - parseInt(refHtmlElement.parentCanvas.currentObject.style.left, 10);\n    refHtmlElement.parentCanvas.offsetY = e.pageY - parseInt(refHtmlElement.parentCanvas.currentObject.style.top, 10);\n  }\n\n\n  return false;\n};\n/**\n * End of CBeanFrame Class <p>\n */\n\n//+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-\n\n\nDEF.CANVAS = {};\nDEF.CANVAS.HTML_ELEMENT = 'div';\nDEF.CANVAS.WIDTH_ADJUST_20180722 = 2;\nDEF.CANVAS.HEIGHT_ADJUST_20180722 = 3;\n\n/**\n * CCanvas class\n * A canvas is a place where windows are arranged, where you can drag and move freely.\n *\n * @param parentElement\n * @param canvasId\n * @param left\n * @param top\n * @param width\n * @param height\n * @constructor\n */\nfunction CCanvas(parentElement, canvasId, left, top, width, height) {\n\n  //Event data to be transmitted\n  function EventData() {\n    this.x = 0;\n    this.y = 0;\n    this.screenX = 0;\n    this.screenY = 0;\n    this.deltaX = 0;\n    this.deltaY = 0;\n    this.isMoved = false;\n    this.targetTypeName = null;\n    this.targetUsage = null;\n    this.targetObject = null;\n  }\n\n  var me = this;\n\n\n  me.enablePullUp = true;// true:Pull-up sorting to bring the window to the forefront by clicking to get focus.\n  me.currentObject = null;\n  me.onTopObject = null;\n  me.offsetX = 0;\n  me.offsetY = 0;\n\n\n  //Object which generated 'mouseDown' event at the very beginning(ichiban-saisho)\n  me.mouseDownSource = null;\n\n  me.id = canvasId;\n  me.canvasElement = null;\n  me.parentElement = parentElement;\n  me.beanList = new Array();\n\n  me.beanIdName = {};//key:beanId value:beanName\n  me.beanNameId = {};//key:beanName value:beanId\n\n  me.eventData = new EventData();\n\n\n  me.baseZIndex = 0;\n  me.setBaseZIndex = function(baseZIndex) {\n    me.baseZIndex = baseZIndex;\n  };\n  me.getBaseZIndex = function() {\n    return me.baseZIndex;\n  };\n\n\n  me.canvasElement = document.createElement(DEF.CANVAS.HTML_ELEMENT);\n\n  me.canvasElement.style.zIndex = 2000;\n  me.canvasElement.id = me.id;\n  me.canvasElement.style.boxSizing = 'border-box';\n  me.canvasElement.style.position = 'absolute';\n  me.canvasElement.style.left = parseInt(left) + 'px';\n  me.canvasElement.style.top = parseInt(top) + 'px';\n  //Added an adjustment value.Because transparent part appears at the bottom of the screen,\n  me.canvasElement.style.width = (parseInt(width) + DEF.CANVAS.WIDTH_ADJUST_20180722) + 'px';\n  me.canvasElement.style.height = (parseInt(height) + DEF.CANVAS.HEIGHT_ADJUST_20180722) + 'px';\n  me.canvasElement.style.backgroundColor = 'transparent';\n  me.canvasElement.style.borderStyle = 'none';\n  me.canvasElement.style.margin = '0px';\n  me.canvasElement.style.borderWidth = '0px';\n  me.canvasElement.style.borderColor = 'transparent';\n\n  //Add the Canvas's html element into the canvas's parent html element\n  me.parentElement.appendChild(me.canvasElement);\n\n}\n\n\nCCanvas.prototype.mouseMove = function(evt) {\n\n  var me = this;\n  var e = evt;\n  if (TOUCH_ENABLED) {\n    if (evt.type === 'touchmove') {\n      var changedTouches = evt.changedTouches;\n      if (TOUCH_MOVE_ONLY_WITH_ONE_FINGER) {\n        var touches = evt.touches;\n        if (touches.length === 1) {\n          e = changedTouches[0];\n        } else {\n          return true;\n        }\n      } else {\n        e = changedTouches[0];\n      }\n    }\n  }\n  if (me.currentObject) {\n\n    //eventData.isMoved=true;The presence of event data means that it has moved.\n    me.eventData.targetTypeName = me.currentObject.typeName;\n    me.eventData.targetUsage = me.currentObject.usage;\n    me.eventData.targetObject = me.currentObject;\n\n    //Even when obj is not being dragged, mouse coordinates are used here because they are needed.\n    var newObjLeftPx = e.pageX - me.offsetX;\n    var newObjTopPx = e.pageY - me.offsetY;\n\n    var absoluteMouseX = e.pageX;\n    var absoluteMouseY = e.pageY;\n\n    //Take the snapshot before updating the location.\n    var oldObjLeftPx = me.currentObject.style.left;\n    var oldObjTopPx = me.currentObject.style.top;\n\n    //When the mouse cursor goes out of range,\n    //the addition in the X direction and Y direction (delta X, delta Y) is set to zero.\n    //this.left=Cavas's left side edge, this.top=Canvas's top side edge.\n    var tmpLeft = parseInt(newObjLeftPx, 10);\n    var tmpTop = parseInt(newObjTopPx, 10);\n\n    var tmpRight = tmpLeft + parseInt(me.currentObject.style.width, 10);\n    var tmpBottom = tmpTop + parseInt(me.currentObject.style.height, 10);\n\n    var styleWidth = parseInt(me.canvasElement.style.width, 10);\n    var styleHeight = parseInt(me.canvasElement.style.height, 10);\n\n    var deltaX = 0;\n    var deltaY = 0;\n\n    if (me.currentObject.isRangeLimited == true &&\n      (tmpLeft <= 0 || tmpRight > styleWidth || tmpTop <= 0 || tmpBottom > styleHeight)\n    ) {\n      deltaX = 0;\n      deltaY = 0;\n    } else {\n      deltaX = (parseInt(newObjLeftPx, 10) - parseInt(oldObjLeftPx, 10));\n      deltaY = (parseInt(newObjTopPx, 10) - parseInt(oldObjTopPx, 10));\n      me.currentObject.style.left = (parseInt(me.currentObject.style.left) + deltaX * me.currentObject.argX) + 'px';\n      me.currentObject.style.top = (parseInt(me.currentObject.style.top) + deltaY * me.currentObject.argY) + 'px';\n\n      var parentObject = me.currentObject.parent;\n      if (parentObject && parentObject._onMove) {\n        parentObject._onMove();\n      }\n\n    }\n    me.eventData.deltaX = deltaX;\n    me.eventData.deltaY = deltaY;\n\n    return me.eventData;\n\n  }\n  //Returns null if none of the objects are clicked and the only mouse just moves.\n  return null;\n};\n\n\nCCanvas.prototype.mouseUp = function(e) {\n  var me = this;\n  me.currentObject = null;\n  me.mouseDownSource = null;\n};\n\n\n//Bring the object in front\nCCanvas.prototype.pullUp = function(targetBeanId) {\n\n  var me = this;\n\n  var tmpBeanArray = [];\n\n  var beanList = me.beanList;\n\n  for (var i in beanList) {\n    tmpBeanArray.push(beanList[i]);\n  }\n\n  //Bring the target object in front and set zindex to 1.\n  var targetBean = beanList[targetBeanId];\n\n  if (me.enablePullUp) {\n    me.pullUpSort(targetBean, tmpBeanArray, me.baseZIndex);\n  }\n\n\n  //Remember the top object\n  me.onTopObject = targetBean;\n\n\n};\n\n//Calculate the front / back information of the window accurately.\nCCanvas.prototype.pullUpSort = function(pullupObject, objectArray, baseIndex) {\n  var me = this;\n\n  //Increase the index number of the target object\n  pullupObject.htmlElement.style.zIndex = objectArray.length + baseIndex;\n\n  //sort by index\n  objectArray.sort(function(b, a) {\n    return -parseInt(b.htmlElement.style.zIndex, 10) + parseInt(a.htmlElement.style.zIndex, 10);\n  });\n\n  //Redefine number of the index\n  for (var i in objectArray) {\n    objectArray[i].htmlElement.style.zIndex = (objectArray.length - 1) - i + baseIndex;\n  }\n\n};\n\n\n/**\n * remove the bean object\n * @param beanId\n */\nCCanvas.prototype.removeBean = function(beanId) {\n\n  var me = this;\n\n  //Retrieve the target beanFrame\n  var beanList = me.beanList;\n  var targetBean = beanList[beanId];\n\n  //Remove bean's htmlElement from canvasElement\n  me.canvasElement.removeChild(targetBean.htmlElement);\n\n  //Delete the bean object in the associative array.\n  delete beanList[beanId];\n\n\n};\n\n\n/**\n * Add bean into this canvas\n * @param bean\n */\nCCanvas.prototype.addBean = function(bean) {\n\n  var me = this;\n\n  var beanList = me.beanList;\n\n  var beanIdName = me.beanIdName;//key:beanId value:beanName\n  var beanNameId = me.beanNameId; //key:beanName value:beanId\n\n\n  beanList[bean.id] = bean;\n\n  if (bean.property.name) {\n    beanNameId[bean.property.name] = bean.id;\n    beanIdName[bean.id] = bean.property.name;\n  }\n\n  //In this usage case the 'length' property is invalid ..\n  var num = 0;\n\n  for (var j in beanList) {\n    num++;\n  }\n\n  //Set zIndex so that what you add later will come up.\n  bean.htmlElement.style.zIndex = num + me.baseZIndex;\n\n  //On the bean side, specify the parent of the bean to me.\n  bean.setParentCanvas(me);\n\n\n  this.canvasElement.appendChild(bean.htmlElement);\n};\n\nCCanvas.prototype.getParentElement = function() {\n  var me = this;\n  return me.parentElement;\n};\n\n/**\n * End of canvas class\n */\n\n//+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-\n\n\nDEF.CFRAME = {};\nDEF.CFRAME.CANVAS_ELEMENT_BGCOLOR = 'transparent';\nDEF.CFRAME.MODAL_BACKGROUND_FRAME_ID_PREFIX = 'window__modal_window_background_';\n\n\ninherit(CFrame, CBeanFrame);\n\n\n/**\n * CFrame class\n * <p>\n * This class represents a window whose size can be changed ,\n * can move freely on the screen,\n * can have a title bar,\n *\n * @param windowId\n * @param w_left\n * @param w_top\n * @param w_width\n * @param w_height\n * @param zindex\n * @param w_border_width\n * @param appearance\n * @constructor\n */\nfunction CFrame(windowId, w_left, w_top, w_width, w_height, zindex, w_border_width, appearance) {\n\n  var me = this;\n\n  //call constructor of superclass\n  CFrame.superConstructor.call(this, windowId, w_left, w_top, w_width, w_height, zindex, w_border_width, appearance);\n\n  me.anchor = CALIGN.LEFT_TOP;\n\n  me.showTitleBar = appearance.showTitleBar;\n\n  me.canvasNetHeight = null;\n  me.canvasNetWidth = null;\n  me.frameHeightAdjust = appearance.frameHeightAdjust;\n\n  me.frameComponentMap = {};\n\n\n  //initialize the field\n  me.canvas = null;\n\n  //canvas id\n  me.myCanvasId = null;\n\n  //Buttons to be placed on the screen (positioning same as the close button)\n  me.floatingButton = null;\n\n  me.titleBarClassNameDefault = 'jsframe-titlebar-default';// DEF.CFRAME.TITLE_BAR_CLASS_DEFAULT;\n  me.titleBarClassNameFocused = 'jsframe-titlebar-focused';//DEF.CFRAME.TITLE_BAR_CLASS_FOCUSED;\n\n\n  //height of titlebar\n  me.titleBarHeight = appearance.titleBarHeight;\n\n  me.titleBarCaption = appearance.titleBarCaption;\n  me.titleBarCaptionLeftMargin = appearance.titleBarCaptionLeftMargin;\n  me.titleBarCaptionFontSize = appearance.titleBarCaptionFontSize;\n  me.titleBarCaptionFontWeight = appearance.titleBarCaptionFontWeight;\n  me.titleBarBorderBottomDefault = appearance.titleBarBorderBottomDefault;\n  me.titleBarBorderBottomFocused = appearance.titleBarBorderBottomFocused;\n  me.titleBarCaptionTextShadow = appearance.titleBarCaptionTextShadow;\n  me.titleBarCaptionTextAlign = appearance.titleBarCaptionTextAlign;\n\n  //Title bar width adjustment value\n  me.titleAdjustWidth = 2;\n\n  me.windowId = windowId;\n\n  me.exBorderWidth = 0;\n\n\n  me.myCanvasId = windowId + '_canvas';\n\n\n  //img element for icon placed on the left-top\n  var appIcon = document.createElement('img');\n  //\t\tappIcon.src='img/ico_app_file16.gif';\n\n  //url of icon image\n  appIcon.src = '';\n  appIcon.style.position = 'absolute';\n  appIcon.style.left = '2px';\n  appIcon.style.top = '2px';\n  appIcon.style.width = '16px';\n  appIcon.style.height = '16px';\n  appIcon.style.visibility = 'hidden';\n\n\n  //The title bar must be on the front of the canvas.\n  me.titleBar = document.createElement('div');\n\n  me.titleBar.className = 'jsframetitlebar';\n\n  if (me.showTitleBar) {\n\n    me.titleBar.id = windowId + '_title';\n    me.titleBar.style.position = 'absolute';\n    me.titleBar.style.boxSizing = 'border-box';\n    me.titleBar.style.top = '0px';\n    me.titleBar.style.left = '0px';\n    me.titleBar.style.width = (w_width - me.titleAdjustWidth + DEF.CANVAS.WIDTH_ADJUST_20180722) + 'px';\n    me.titleBar.style.userSelect = 'none';\n\n\n    if (me.titleBarHeight) {\n\n      var titleBarAdjust = 0;\n\n      if (me.titleBarBorderBottomDefault) {\n        titleBarAdjust = 0;\n      }\n\n\n      me.titleBar.style.height = (parseInt(me.titleBarHeight, 10) + 0) + 'px';\n    }\n\n    if (me.titleBarColorDefault) {\n      me.titleBar.style.background = me.titleBarColorDefault;\n    }\n    me.titleBar.style.zIndex = 0;\n\n    me.titleBar.style.color = me.titleBarCaptionColorDefault;\n    me.titleBar.style.fontSize = me.titleBarCaptionFontSize;\n    me.titleBar.style.fontWeight = me.titleBarCaptionFontWeight;\n    me.titleBar.style.textShadow = me.titleBarCaptionTextShadow;\n    me.titleBar.style.textAlign = me.titleBarCaptionTextAlign;\n    // me.titleBar.style.textShadow = \"0 1px 0 rgba(255,255,255,.7)\";\n    // me.titleBar.style.textAlign = 'center';\n\n    me.titleBar.style.lineHeight = me.titleBar.style.height;\n\n\n    me.titleBar.style.borderBottom = me.titleBarBorderBottomDefault;\n    //me.titleBar.style.boxShadow = '0 1px 0 rgba(255,255,255,0.5)';\n\n\n    //Set not to display overflow character string\n    me.titleBar.style.overflow = 'hidden';\n\n\n    var titleBarText = document.createTextNode('');\n\n    //'span' to store text\n    var titleBarTextSpan = document.createElement('span');\n\n    titleBarTextSpan.id = me.id + '_titleBarText';\n    if (me.titleBarCaptionLeftMargin != null) {\n      titleBarTextSpan.style.position = 'absolute';\n      titleBarTextSpan.style.left = parseInt(me.titleBarCaptionLeftMargin, 10) + 'px';\n    } else {\n      titleBarTextSpan.style.position = 'absolute';\n      titleBarTextSpan.style.left = '0px';\n      titleBarTextSpan.style.right = '0px';\n    }\n    titleBarTextSpan.style.top = '0px';\n    titleBarTextSpan.appendChild(titleBarText);\n    me.titleBar.appendChild(titleBarTextSpan);\n\n    //Discontinue appicon(20061011)\n    //me.titleBar.appendChild(appIcon);\n  }\n\n  me.htmlElement.appendChild(me.titleBar);\n\n\n  //Set Canvas throughout the window\n\n  //parseInt(me.titleBar.style.height);//me.titleBarHeight);\n  var canvasMoreHeight = parseInt(me.titleBarHeight, 10) - titleBarAdjust;\n  var canvasMoreSpacing = parseInt(me.titleAdjustWidth, 10);\n\n  if (me.showTitleBar) {\n\n\n  } else {\n    canvasMoreHeight = 0;\n    canvasMoreSpacing = 0;\n    titleBarAdjust = 0;\n  }\n\n\n  me.canvasNetWidth = w_width - canvasMoreSpacing;\n  me.canvasNetHeight = w_height - canvasMoreHeight - canvasMoreSpacing - 1 - titleBarAdjust + me.frameHeightAdjust;\n\n\n  //Change the style of htmlElement of CFrame (CBean).\n  me.htmlElement.style.cursor = 'move';\n\n\n  //Create a canvas\n  me.canvas = new CCanvas(me.htmlElement, me.myCanvasId, 0, canvasMoreHeight, w_width - canvasMoreSpacing, w_height - canvasMoreHeight - canvasMoreSpacing);\n\n  me.canvas.enablePullUp = false;\n  me.canvas.canvasElement.style.backgroundColor = DEF.CFRAME.CANVAS_ELEMENT_BGCOLOR;\n  me.canvas.canvasElement.style.cursor = 'default';\n\n  if (MOUSE_ENABLED) {\n    //Handling the omousedown event that occurred in Canvas which is a child element of CFrame\n    me.canvas.canvasElement.onmousedown = me.canvasMouseDown;\n  }\n\n  if (TOUCH_ENABLED) {\n    if ('ontouchstart' in window) {\n      var funcOnTouchStart = function(evt) {\n        // The \"mousedown\" event happens right after \"touchstart\" event,\n        // but I don't call #preventdefault because #preventdefault prevents \"onclick\" (like button on titlebar).\n        // So, perform #preventdefault only for \"touchmove\"\n        // evt.preventDefault();\n        var touchStartEvent = evt.changedTouches[0];\n        me.canvasMouseDown.bind(this)(touchStartEvent);\n      };\n      me.canvas.canvasElement.ontouchstart = funcOnTouchStart;\n    }\n  }\n\n  //Set the canvas as a reference to the parent of the canvas html element canvasElement.\n  me.canvas.canvasElement.parentCFrame = me;\n\n\n  var tmpCanvasWidth = parseInt(me.canvas.canvasElement.style.width, 10);\n  var tmpCanvasHeight = parseInt(me.canvas.canvasElement.style.height, 10);\n\n  var markerWidth = appearance.resizeAreaWidth;\n  var markerHeight = appearance.resizeAreaHeight;\n\n  //Offset from marker edge\n  var edgeMargin = appearance.resizeAreaOffset;\n  var markerZIndex = 0;\n\n  var colorRD, colorDD, colorRR;\n\n  if (appearance.resizeAreaVisible) {\n    colorRD = 'rgba(255, 0, 0, 0.5)';\n    colorDD = 'rgba(0, 0, 255, 0.5)';\n    colorRR = 'rgba(0, 255, 0, 0.5)';\n  }\n\n  //Lower right(R-D)\n  var markerRD = new CMarkerWindow(\n    me.myCanvasId + '_RD',\n    tmpCanvasWidth + edgeMargin,\n    tmpCanvasHeight + edgeMargin,\n    markerWidth,\n    markerHeight,\n    markerZIndex,\n    'RD', colorRD);\n\n  markerRD.htmlElement.style.cursor = 'se-resize';//nw-resize';\n\n  //Since only the deltaX and deltaY are acquired and the movement of the marker itself is\n  // performed by CFrame_resize, the movement coefficient of the marker itself is set to 0.\n  markerRD.htmlElement.argX = 0;\n  markerRD.htmlElement.argY = 0;\n\n\n  //Bottom(D-D)\n  var markerDD = new CMarkerWindow(\n    me.myCanvasId + '_DD',\n    0,\n    tmpCanvasHeight + edgeMargin,\n    tmpCanvasWidth + edgeMargin,\n    markerHeight,\n    markerZIndex,\n    'DD', colorDD);\n\n  markerDD.htmlElement.style.cursor = 'n-resize';\n\n  //Since only the deltaX and deltaY are acquired and the movement of the marker itself is\n  // performed by CFrame_resize, the movement coefficient of the marker itself is set to 0.\n  markerDD.htmlElement.argX = 0;\n  markerDD.htmlElement.argY = 0;\n\n  //Right(R-R)\n  var markerRR = new CMarkerWindow(\n    me.myCanvasId + '_RR',\n    tmpCanvasWidth + edgeMargin,\n    0,\n    markerWidth,\n    tmpCanvasHeight + edgeMargin,\n    markerZIndex,\n    'RR', colorRR);\n\n  markerRR.htmlElement.style.cursor = 'w-resize';\n\n  //Since only the deltaX and deltaY are acquired and the movement of the marker itself is\n  // performed by CFrame_resize, the movement coefficient of the marker itself is set to 0.\n  markerRR.htmlElement.argY = 0;\n  markerRR.htmlElement.argX = 0;\n\n  //Add size change marker to canvas.\n  me.canvas.addBean(markerRD);\n  me.canvas.addBean(markerDD);\n  me.canvas.addBean(markerRR);\n\n  //Method to remove size change marker (can not resize)\n  me.removeMarkers = function() {\n    me.canvas.removeBean(markerRD.id);\n    me.canvas.removeBean(markerDD.id);\n    me.canvas.removeBean(markerRR.id);\n    me.htmlElement.style.cursor = 'default';\n  };\n\n\n  me.removeMarkers2 = function() {\n    me.canvas.removeBean(markerRD.id);\n    me.canvas.removeBean(markerDD.id);\n    me.canvas.removeBean(markerRR.id);\n  };\n  me.enableMarkers = function(enabled) {\n    if (enabled) {\n\n      markerRD.htmlElement.style.display = 'flex';\n      markerDD.htmlElement.style.display = 'flex';\n      markerRR.htmlElement.style.display = 'flex';\n      markerRD.htmlElement.style.cursor = 'se-resize';\n      markerDD.htmlElement.style.cursor = 'n-resize';\n      markerRR.htmlElement.style.cursor = 'w-resize';\n    } else {\n      markerRD.htmlElement.style.display = 'none';\n      markerDD.htmlElement.style.display = 'none';\n      markerRR.htmlElement.style.display = 'none';\n    }\n    // me.canvas.removeBean(markerRD.id);\n    // me.canvas.removeBean(markerDD.id);\n    // me.canvas.removeBean(markerRR.id);\n  };\n\n  for (var idx in appearance.frameComponents) {\n\n    var frameComponent = appearance.frameComponents[idx];\n    frameComponent.setFrame(me);\n\n    //if frameComponent has special name 'closeButton', it will act as a close button.\n    if ('closeButton' == frameComponent.id) {\n      frameComponent.htmlElement.onclick = me.close;\n    }\n\n    // Handle child menu open/close\n    var frameComponentHasChildMenu = frameComponent.htmlElement.querySelector('.jsframe-child-menu');\n    if (frameComponentHasChildMenu) {\n      me.eventListenerHelper.addEventListener(frameComponent.htmlElement, 'click', function(e) {\n\n          var frameComponentId = e.target.getAttribute('component-id');\n\n          // Close all frame component's childmenu once because other frame component's childmenu may be open.\n          // If {exceptFrameComponentId:[frameComponentId]} is specified for the argument,\n          // the child menu will not be closed.\n          me.hideFrameComponentChildMenus({ exceptFrameComponentId: frameComponentId });\n\n          if (frameComponentId) {\n            var frameComponentHtmlElement = me.getFrameComponentElement(frameComponentId);\n            var frameComponentChildMenu = frameComponentHtmlElement.querySelector('.jsframe-child-menu');\n            if (frameComponentChildMenu) {\n              // By making the display a table,\n              // the width of the childMenu can be accurately reflected.\n              // (flex does not set the width correctly.)\n              if (frameComponentChildMenu.style.display == 'table') {\n                frameComponentChildMenu.style.display = 'none';\n              } else {\n                frameComponentChildMenu.style.display = 'table';\n              }\n            } else {\n              console.error('frameComponent child menu isnt found. frameComponentId=' + frameComponentId);\n            }\n          }\n        },\n        { listenerName: 'frame-component_child-menu-listener' });\n    }\n\n    me.addFrameComponent(frameComponent);\n  }  // /add frameComponents[end]\n\n  //override the field\n  me.htmlElement.style.backgroundColor = 'transparent';\n\n  me.htmlElement.oncontextmenu = this.contextMenu;\n\n\n  //The policy of Border drawing seems to be different between IE and FF.\n  var caribVal = 0;\n\n\n  me.caribValue = caribVal;\n\n  if (me.exBorderWidth) {\n    me.htmlElement.style.borderWidth = me.exBorderWidth + 'px';\n  }\n  me.htmlElement.style.width = (parseInt(me.htmlElement.style.width, 10) - caribVal) + 'px';\n  me.htmlElement.style.height = (parseInt(me.htmlElement.style.height, 10) - caribVal + 1) + 'px';\n  me.htmlElement.typeName = 'cwindow';\n  me.htmlElement.overflow = 'auto';\n  me.htmlElement.style.boxSizing = 'content-box';\n\n\n  if (appearance.frameBorderStyle) {\n    me.htmlElement.style.borderStyle = appearance.frameBorderStyle;\n  }\n\n  if (appearance.frameBoxShadow) {\n    me.htmlElement.style.boxShadow = appearance.frameBoxShadow;\n  }\n\n  //TODO deprecation(because CIfFrame is extended this operation)\n  if (parseInt(appearance.frameBorderWidthDefault, 10) >= 0) {\n    me.htmlElement.style.borderWidth = appearance.frameBorderWidthDefault;\n    me.htmlElement.style.borderColor = appearance.frameBorderColorDefault;\n\n  }\n  if (parseInt(appearance.frameBorderRadius, 10) >= 0) {\n    me.htmlElement.style.borderRadius = appearance.frameBorderRadius;\n  }\n\n  me.onCloseFrameListener = null;\n\n}\n\n\nCFrame.prototype.setTitleBarClassName = function(classNameForDefault, classNameForFocused) {\n  var me = this;\n  if (classNameForDefault) {\n    me.titleBarClassNameDefault = classNameForDefault;\n    me.titleBarClassNameFocused = classNameForDefault;\n  }\n  if (classNameForFocused) {\n    me.titleBarClassNameFocused = classNameForFocused;\n  }\n  return me;\n};\n/**\n * Add frameComponent(Wrapped DOM element like 'div' to display above the frame) to frame\n * @param frameComponent\n */\nCFrame.prototype.addFrameComponent = function(frameComponent) {\n  var me = this;\n\n  me.frameComponentMap[frameComponent.id] = frameComponent;\n  me.canvas.canvasElement.appendChild(frameComponent.htmlElement);\n  return me;\n};\n\n/**\n * Get stored frame component by id\n * @param frameComponent\n */\nCFrame.prototype.getFrameComponentElement = function(id) {\n  var me = this;\n  if (me.frameComponentMap[id]) {\n    return me.frameComponentMap[id].htmlElement;\n  } else {\n    return null;\n  }\n};\n\n\nCFrame.prototype.removeFrameComponentById = function(frameComponentId) {\n  var me = this;\n\n  var frameComponent = me.frameComponentMap[frameComponentId];\n\n  me.canvas.canvasElement.removeChild(frameComponent.htmlElement);\n  delete me.frameComponentMap[frameComponentId];\n};\n\nCFrame.prototype.showFrameComponent = function(frameComponentId, display) {\n  var me = this;\n  var comp = me.getFrameComponentElement(frameComponentId);\n  if (comp) {\n    if (display) {\n      comp.style.display = display;\n    } else {\n      comp.style.display = 'flex';\n    }\n  }\n  return me;\n};\n\nCFrame.prototype.hideFrameComponent = function(frameComponentId) {\n  var me = this;\n  var comp = me.getFrameComponentElement(frameComponentId);\n  if (comp) {\n    comp.style.display = 'none';\n  }\n  return me;\n};\n\nCFrame.prototype.hideAllVisibleFrameComponents = function() {\n  var me = this;\n\n  var compMap = me.frameComponentMap;\n  for (var key in compMap) {\n    if (compMap.hasOwnProperty(key)) {\n      var comp = compMap[key].htmlElement;\n      if (comp.style.display === 'none') {\n        comp._alreadyNone = true;\n      }\n      comp.style.display = 'none';\n    }\n  }\n};\nCFrame.prototype.showAllVisibleFrameComponents = function() {\n  var me = this;\n  var compMap = me.frameComponentMap;\n  for (var key in compMap) {\n    if (compMap.hasOwnProperty(key)) {\n      var comp = compMap[key].htmlElement;\n      if (comp._alreadyNone) {\n        comp._alreadyNone = null;\n      } else {\n        comp.style.display = 'flex';\n      }\n    }\n  }\n};\n\n/**\n * Close all childMenu\n If {exceptFrameComponentId:[frameComponentId]} is specified for the argument,\n the child menu will not be closed.\n\n * @param opt\n */\nCFrame.prototype.hideFrameComponentChildMenus = function(opt) {\n  var me = this;\n\n  var compMap = me.frameComponentMap;\n  for (var frameComponentId in compMap) {\n    if (compMap.hasOwnProperty(frameComponentId)) {\n      if (opt && opt.exceptFrameComponentId) {\n        if (frameComponentId === opt.exceptFrameComponentId) {\n          continue;\n        }\n      }\n      var comp = compMap[frameComponentId];\n      if (comp.childMenu) {\n        comp.childMenu.style.display = 'none';\n      }\n    }\n  }\n};\n\n\nCFrame.prototype.setTitle = function(str) {\n  var me = this;\n  me.title = str;\n  if (me.showTitleBar) {\n\n    var textNode = document.createTextNode(str);\n    //firstChildのfirstChildがspan\n    me.titleBar.firstChild.replaceChild(textNode, me.titleBar.firstChild.firstChild);\n  }\n  return me;\n};\n\nCFrame.prototype.resize = function(deltaLeft, deltaTop, deltaWidth, deltaHeight) {\n\n  var me = this;\n\n  var tmpLeft = parseInt(me.htmlElement.style.left, 10);\n  var tmpTop = parseInt(me.htmlElement.style.top, 10);\n  var tmpWidth = parseInt(me.htmlElement.style.width, 10);\n  var tmpHeight = parseInt(me.htmlElement.style.height, 10);\n\n  me.htmlElement.style.left = parseInt(tmpLeft + deltaLeft, 10) + 'px';\n  me.htmlElement.style.top = parseInt(tmpTop + deltaTop, 10) + 'px';\n\n  me.htmlElement.style.width = parseInt(tmpWidth + deltaWidth, 10) + 'px';\n  me.htmlElement.style.height = parseInt(tmpHeight + deltaHeight, 10) + 'px';\n\n\n  var tmpCanvasWidth = parseInt(me.canvas.canvasElement.style.width, 10);\n  var tmpCanvasHeight = parseInt(me.canvas.canvasElement.style.height, 10);\n\n  //Since canvasElement is a (0, 0) relative coordinate with respect to the parent element,\n  // so it is not necessary to change left and top.\n  me.canvas.canvasElement.style.width = (tmpCanvasWidth + deltaWidth) + 'px';\n  me.canvas.canvasElement.style.height = (tmpCanvasHeight + deltaHeight) + 'px';\n\n\n  if (me.showTitleBar) {\n\n    //Change the size of the title bar. TitleAdjustWidth etc.\n    //The reason why you do not have to use titleAdjustWidth is because\n    // these scaling are done with differences (deltaX, deltaY).\n    //Therefore, if you adjust with the titleAdjustWidth as\n    // the initial value, the other will stretch relative.\n    //You do not think you can use ifDelta\n    me.titleBar.style.width = (tmpCanvasWidth + deltaWidth) + 'px';\n\n  } else {\n\n\n  }\n\n\n  for (var beanName in me.canvas.beanList) {\n    var tmpBean = me.canvas.beanList[beanName];\n\n    if (tmpBean.htmlElement.typeName == 'cmarkerwindow') {\n      if (tmpBean.htmlElement.usage == 'RD') {\n        //Move the size change lower right(RD) marker according to the amount of movement.\n        tmpBean.htmlElement.style.left = (parseInt(tmpBean.htmlElement.style.left, 10) + deltaWidth) + 'px';\n        tmpBean.htmlElement.style.top = (parseInt(tmpBean.htmlElement.style.top, 10) + deltaHeight) + 'px';\n      } else if (tmpBean.htmlElement.usage == 'DD') {\n        //Move the size change lower marker according to the movement amount.\n        // Do not move left.Only the width wil increase or decrease.\n        tmpBean.htmlElement.style.width = (parseInt(tmpBean.htmlElement.style.width, 10) + deltaWidth) + 'px';\n        tmpBean.htmlElement.style.top = (parseInt(tmpBean.htmlElement.style.top, 10) + deltaHeight) + 'px';\n      } else if (tmpBean.htmlElement.usage == 'RR') {\n        //Move the size change right marker according to the movement amount\n        //Do not move top,Only the height will increase or decrease.\n        tmpBean.htmlElement.style.left = (parseInt(tmpBean.htmlElement.style.left, 10) + deltaWidth) + 'px';\n        tmpBean.htmlElement.style.height = (parseInt(tmpBean.htmlElement.style.height, 10) + deltaHeight) + 'px';\n      }\n\n    }\n  }\n};\n\n\nCFrame.prototype.canvasMouseDown = function(e) {\n  var me = this;\n\n  //Mousedown processing of CFrame.canvas\n\n  //'This' in this method indicates 'Cwindow.canvas.canvasElement'.\n  if (this.parentCFrame.parentCanvas.mouseDownSource == null) {\n    this.parentCFrame.parentCanvas.mouseDownSource = 'childcanvas';\n  }\n\n\n};\nCFrame.prototype.mouseUp = function(e) {\n  this.canvas.mouseUp(e);\n};\n\nCFrame.prototype.close = function(e) {\n\n  var me = this;\n  //Close processing of CFrame from CloseButton\n\n\n  var parentCanvas = this.parentObject.parentCanvas;\n  var cframeObj = this.parentObject;\n\n  console.log('CFrame#close \"' + cframeObj.title + '(@' + cframeObj.getName() + ')' + '\" @' + cframeObj.windowId);\n\n  var windowId = cframeObj.id;\n  cframeObj.closeInternally(e, parentCanvas, windowId);\n\n\n};\n\nCFrame.prototype.closeFrame = function(e) {\n\n\n  //Close processing of CFrame\n  var me = this;\n\n  console.log('CFrame#closeFrame \"' + me.title + '(' + me.getName() + ')' + '\" @' + me.windowId);\n\n  var parentCanvas = this.parentCanvas;\n  me.closeInternally(e, parentCanvas, me.windowId);\n\n\n};\n\nCFrame.prototype.closeInternally = function(e, parentCanvas, windowId) {\n  var me = this;\n\n  if (!parentCanvas) {\n    console.error('Window(' + windowId + ') may have been closed');\n    return;\n  }\n  parentCanvas.removeBean(windowId);\n\n\n  //added for modal window\n  if (me.modalBackgroundWindowId) {\n    parentCanvas.removeBean(me.modalBackgroundWindowId);\n    me.modalBackgroundWindowId = null;\n  }\n\n  if (me.onCloseFrameListener) {\n    me.onCloseFrameListener(me);\n  }\n};\n\nCFrame.prototype.setOnCloseFrameListener = function(listener) {\n  var me = this;\n  me.onCloseFrameListener = listener;\n\n};\n\nCFrame.prototype.contextMenu = function() {\n  //If you issue the right-click menu in the window, set the source to CFrame.\n  var contextMenuSource = 'CFrame';\n  return false;\n};\n\n\nCFrame.prototype.setTitleBarTextColor = function(str) {\n  var me = this;\n  me.titleBar.style.color = str;\n};\n\n/**\n * Set window position with anchor\n * @param {number} x\n * @param {number} y\n * @param {string} anchor anchor means the position of the window with respect to which the position is specified.<br>\n *   The following values can be specified for the anchor\n LEFT_TOP\n CENTER_TOP\n RIGHT_TOP\n LEFT_CENTER\n CENTER_CENTER\n RIGHT_CENTER\n LEFT_BOTTOM\n CENTER_BOTTOM\n RIGHT_BOTTOM\n * @returns {CFrame}\n */\nCFrame.prototype.setPosition = function(x, y, anchor) {\n  var me = this;\n\n  var frameWidth = me.getWidth();\n  var frameHeight = me.getHeight();\n\n  me._setPositionInternally(x, y, anchor, frameWidth, frameHeight);\n\n  return me;\n};\nCFrame.prototype._setPositionInternally = function(x, y, anchor, frameWidth, frameHeight) {\n  var me = this;\n\n  if (anchor) {\n    me.anchor = anchor;\n  }\n\n  if (!anchor || CALIGN.LEFT_TOP == anchor) {\n    me.htmlElement.style.left = x + 'px';\n    me.htmlElement.style.top = y + 'px';\n  } else if (CALIGN.HCENTER_TOP == anchor) {\n    me.htmlElement.style.left = (-frameWidth / 2 + x) + 'px';\n    me.htmlElement.style.top = y + 'px';\n  } else if (CALIGN.RIGHT_TOP == anchor) {\n    me.htmlElement.style.left = (-frameWidth + x) + 'px';\n    me.htmlElement.style.top = y + 'px';\n  } else if (CALIGN.LEFT_VCENTER == anchor) {\n    me.htmlElement.style.left = x + 'px';\n    me.htmlElement.style.top = (-frameHeight / 2 + y) + 'px';\n  } else if (CALIGN.HCENTER_VCENTER == anchor) {\n    me.htmlElement.style.left = (-frameWidth / 2 + x) + 'px';\n    me.htmlElement.style.top = (-frameHeight / 2 + y) + 'px';\n  } else if (CALIGN.RIGHT_VCENTER == anchor) {\n    me.htmlElement.style.left = (-frameWidth + x) + 'px';\n    me.htmlElement.style.top = (-frameHeight / 2 + y) + 'px';\n  } else if (CALIGN.LEFT_BOTTOM == anchor) {\n    me.htmlElement.style.left = x + 'px';\n    me.htmlElement.style.top = (-frameHeight + y) + 'px';\n  } else if (CALIGN.HCENTER_BOTTOM == anchor) {\n    me.htmlElement.style.left = (-frameWidth / 2 + x) + 'px';\n    me.htmlElement.style.top = (-frameHeight + y) + 'px';\n  } else if (CALIGN.RIGHT_BOTTOM == anchor) {\n    me.htmlElement.style.left = (-frameWidth + x) + 'px';\n    me.htmlElement.style.top = (-frameHeight + y) + 'px';\n  }\n};\n\n/**\n * Returns relative position with anchor\n * @returns {{x: *, y: *, anchor: *}}\n */\nCFrame.prototype.getPosition = function() {\n  var me = this;\n  var frameWidth = me.getWidth();\n  var frameHeight = me.getHeight();\n  var x;\n  var y;\n  var anchor = me.anchor;\n  if (!anchor || CALIGN.LEFT_TOP == anchor) {\n    x = parseInt(me.htmlElement.style.left, 10);\n    y = parseInt(me.htmlElement.style.top, 10);\n  } else if (CALIGN.HCENTER_TOP == anchor) {\n    x = parseInt(me.htmlElement.style.left, 10) + frameWidth / 2;\n    y = parseInt(me.htmlElement.style.top, 10);\n  } else if (CALIGN.RIGHT_TOP == anchor) {\n    x = parseInt(me.htmlElement.style.left, 10) + frameWidth;\n    y = parseInt(me.htmlElement.style.top, 10);\n  } else if (CALIGN.LEFT_VCENTER == anchor) {\n    x = parseInt(me.htmlElement.style.left, 10);\n    y = parseInt(me.htmlElement.style.top, 10) + frameHeight / 2;\n  } else if (CALIGN.HCENTER_VCENTER == anchor) {\n    x = parseInt(me.htmlElement.style.left, 10) + frameWidth / 2;\n    y = parseInt(me.htmlElement.style.top, 10) + frameHeight / 2;\n  } else if (CALIGN.RIGHT_VCENTER == anchor) {\n    x = parseInt(me.htmlElement.style.left, 10) + frameWidth;\n    y = parseInt(me.htmlElement.style.top, 10) + frameHeight / 2;\n  } else if (CALIGN.LEFT_BOTTOM == anchor) {\n    x = parseInt(me.htmlElement.style.left, 10);\n    y = parseInt(me.htmlElement.style.top, 10) + frameHeight;\n  } else if (CALIGN.HCENTER_BOTTOM == anchor) {\n    x = parseInt(me.htmlElement.style.left, 10) + frameWidth / 2;\n    y = parseInt(me.htmlElement.style.top, 10) + frameHeight;\n  } else if (CALIGN.RIGHT_BOTTOM == anchor) {\n    x = parseInt(me.htmlElement.style.left, 10) + frameWidth;\n    y = parseInt(me.htmlElement.style.top, 10) + frameHeight;\n  }\n  return { x: x, y: y, anchor: anchor };\n};\n\nCFrame.prototype.getLeft = function() {\n  var me = this;\n  return parseInt(me.htmlElement.style.left, 10);\n};\n\n\nCFrame.prototype.getTop = function() {\n  var me = this;\n  return parseInt(me.htmlElement.style.top, 10);\n};\nCFrame.prototype.getWidth = function() {\n  var me = this;\n  return parseInt(me.htmlElement.style.width, 10);\n};\nCFrame.prototype.getHeight = function() {\n  var me = this;\n  return parseInt(me.htmlElement.style.height, 10);\n};\n\nCFrame.prototype.getSize = function() {\n  var me = this;\n  return { width: me.getWidth(), height: me.getHeight() };\n};\n\nCFrame.prototype.setSize = function(width, height, force) {\n  var me = this;\n\n  var byUser = true;\n\n  if (force) {\n    byUser = false;\n  }\n\n\n  //call CIFrame#resize instead of CFrame#resize\n  me.resize(0, 0, width - me.getWidth(), height - me.getHeight(), byUser);\n  return me;\n};\n\nCFrame.prototype.getWindowId = function() {\n  var me = this;\n  return me.windowId;\n};\n\nCFrame.prototype.getName = function() {\n  var me = this;\n  return me.property.name;\n};\n\nCFrame.prototype.setName = function(name) {\n  var me = this;\n  me.property.name = name;\n};\n/**\n * end of CFrame class\n */\n\n//+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-\n\n\ninherit(CIfFrame, CFrame);\n\n/**\n * CIfFrame class\n * Extension class with contents frame of CFrame as iframe\n * @param windowId\n * @param appearance\n * @constructor\n */\nfunction CIfFrame(windowId, left, top, width, height, appearance) {\n\n\n  var wleft = left;\n  var wtop = top;\n  var wwidth = width;\n  var wheight = height;\n  var zindex = appearance.zindex;\n  var wborderwidth = null;\n\n\n  var me = this;\n\n  this.jsFrame = null;\n  this.control = null;\n\n  this.minFrameWidth = 128;\n  this.minWindowHeight = 32;\n\n  this.eventListenerHelper = new EventListenerHelper();\n\n  /**\n   * If this value is true, the focus will move when tapping the iframe area,\n   * but if the window do not have the focus, you can not click on the element in the iframe.\n   */\n  this.overrayTransparentScreenEnabled = false;\n\n  /**\n   *  Only in the case of resizing a transparent screen can be displayed on the iframe\n   *  and the size can be adjusted smoothly.\n   *  true is recommended.\n   */\n  //Change history\n  //20181226\n  //Changed to false.\n  // So it becomes necessary to click twice to react when you call the #setSize,I changed the value to false.\n  //20181231\n  //I found the way that iframe will be changed the size smoothly.so the final answer is true.\n  this.overrayTransparentScreenOnResize = true;\n\n  this.titleBarColorFocused = appearance.titleBarColorFocused;\n\n  this.titleBarColorDefault = appearance.titleBarColorDefault;\n\n  this.titleBarCaptionColorDefault = appearance.titleBarCaptionColorDefault;\n  this.titleBarCaptionColorFocused = appearance.titleBarCaptionColorFocused;\n\n  //call super constructor\n  CIfFrame.superConstructor.call(me, windowId, wleft, wtop, wwidth, wheight, zindex, wborderwidth, appearance);\n\n  //border color\n  me.frameBorderColorDefault = appearance.frameBorderColorDefault;\n  me.frameBorderColorFocused = appearance.frameBorderColorFocused;\n\n  //border width\n  me.frameBorderWidthDefault = appearance.frameBorderWidthDefault;\n  me.frameBorderWidthFocused = appearance.frameBorderWidthFocused;\n\n  me.iframe = null;\n\n\n  //Offset value for width adjustment of iframe\n  me.ifDelta = 0;\n\n  me.resizable = true;\n\n\n  me.onMouseMoveOnIframe = null;\n  me.onMouseUpOnIframe = null;\n\n  me._hasFocus = false;\n\n  me._hasFocusTime = 0;\n\n\n  me.htmlElement.typeName = 'cifwindow';\n\n  //name of iframe\n  var exIframeName = 'riversun_' + windowId;\n\n\n  me.dframe = document.createElement('div');\n\n\n  me.iframe = document.createElement('iframe');\n\n\n  me.iframe.name = exIframeName;\n\n  me.iframe.id = exIframeName;\n\n  me.iframe.frameBorder = '0';\n  //me.iframe.scrolling = 'no';\n\n  me.iframe.zIndex = -1;\n\n  //Allow transparent of iframe background.\n  me.iframe.allowTransparency = 'true';\n  me.iframe.width = me.canvasNetWidth - me.ifDelta + 0;\n  me.iframe.height = me.canvasNetHeight - me.ifDelta + 0;\n\n  me.showTitleBar = appearance.showTitleBar;\n\n  me.getFrameInnerBorderRadius = appearance.getFrameInnerBorderRadius;\n\n  me.frameBorderRadius = appearance.frameBorderRadius;\n\n\n  me.adjustFrameBorderRadius();\n\n  me.useIframe = false;\n\n\n  me.canvas.canvasElement.appendChild(me.iframe);\n\n  me.canvas.canvasElement.appendChild(me.dframe);\n\n\n  this.setUseIframe = function(useIframe) {\n    me.useIframe = useIframe;\n    me.iframe.style.visibility = 'hidden';\n    me.iframe.style.position = 'absolute';\n    me.iframe.style.left = '0px';\n    me.iframe.style.top = '0px';\n    me.iframe.style.width = '100%';\n    me.iframe.style.height = '100%';\n\n    me.dframe.style.visibility = 'hidden';\n    me.dframe.style.position = 'absolute';\n    me.dframe.style.left = '0px';\n    me.dframe.style.boxSizing = 'content-box';\n\n    me.dframe.style.top = '0px';\n    me.dframe.style.width = '100%';\n    me.dframe.style.height = '100%';\n    //me.dframe.style.borderStyle=\"solid\";\n    me.dframe.style.backgroundColor = 'white';\n\n    if (useIframe) {\n      me.iframe.style.visibility = 'visible';\n      me.dframe.style.visibility = 'hidden';\n    } else {\n      me.iframe.style.visibility = 'hidden';\n      me.dframe.style.visibility = 'visible';\n    }\n  };\n\n  me.setUseIframe(appearance.useIframe);\n\n  // If it is IE, set the canvasElement of the canvas which is the parent of the iframe to transparent.\n\n  if (me.overrayTransparentScreenEnabled || me.overrayTransparentScreenOnResize) {\n    //Create a transparent screen.\n    me.transparence = document.createElement('span');\n    // me.transparence.style.backgroundImage = 'url(img/img_baron_tp.gif)';\n\n    me.transparence.style.position = 'absolute';\n    me.transparence.style.left = '0px';\n    me.transparence.style.top = '0px';\n\n    //Transparent screen is 0px when creating window\n    me.transparence.style.width = '0px';\n    me.transparence.style.height = '0px';\n\n    me.transparence.style.zIndex = 4;\n    me.transparence.style.borderWidth = '0px';\n    me.transparence.style.borderColor = '#ff00ee';\n    me.transparence.style.borderStyle = 'none';\n    me.transparence.style.cursor = 'default';\n\n    me.transparence.style.pointerEvents = 'none';\n    me.canvas.canvasElement.style.backgroundColor = appearance.frameBackgroundColor;\n\n\n    me.canvas.canvasElement.appendChild(me.transparence);\n  }\n\n  me.eventEmitter = new EventEmitter();\n\n  me.appearance = appearance;\n\n}\n\n\nCIfFrame.prototype.getFrameView = function() {\n  var me = this;\n  return me.dframe;\n};\n\nCIfFrame.prototype.getFrameAppearance = function() {\n  var me = this;\n  return me.appearance;\n};\n\nCIfFrame.prototype.setHTML = function(html) {\n  var me = this;\n  me.dframe.innerHTML = html;\n};\nCIfFrame.prototype.setFrameInFrame = function(enabled) {\n\n  // Why i had to (bother to:) ) make a setFrameInFrame\n  // The element specified at the top of the content of the parent window (for example, div element)\n  // may NOT be able to get the resize event using addEventListener.\n  // Therefore, when the resize event issued by jsFrame in the parent window occurs,\n  // its custom attribute (WindowEventHelper.MATCH_PARENT_CHANGE_MARKER_ATTR) is attached\n  // to the element at the top of the parent window content\n  // and it is captured by the mutationObserver on the child window side.\n\n  var me = this;\n\n  var contentsEle = me.dframe ? me.dframe.firstChild : null;\n\n  if (contentsEle) {\n    // polyfill for #now\n    if (!Date.now) {\n      Date.now = function now() {\n        return new Date().getTime();\n      };\n    }\n    if (enabled) {\n      me.eventEmitter.only('resize', 'fif-listener', function() {\n        contentsEle.setAttribute(WindowEventHelper.MATCH_PARENT_CHANGE_MARKER_ATTR, Date.now());\n      });\n    } else {\n      contentsEle.removeAttribute(WindowEventHelper.MATCH_PARENT_CHANGE_MARKER_ATTR);\n      me.eventEmitter.only('resize', 'fif-listener', function() {\n        // do nothing\n      });\n    }\n  }\n};\n/**\n * Find DOM Element in the frame by querySelector<br>\n *  Examples<br>\n *      frame.$(\"#my_id_name\");\n *      frame.$(\".my_class_name\");\n *      frame.$(\"div>img\");\n *      frame.$(\"input[type='submit]\");\n * @param {string} q selector query\n * @returns {Node}\n */\nCIfFrame.prototype.$ = function(q) {\n  var me = this;\n\n  if (me.useIframe) {\n\n    var docInIframe = me.iframe.contentWindow.document;\n    return docInIframe.querySelector(q);\n\n  } else {\n    return me.dframe.querySelector(q);\n  }\n};\n\n/**\n * Sets an event listener for the window itself or elements in the contents of the window.\n It is possible to register multiple listeners to the same event type.\n\n * @param {string} id\n If the \"id\" is prefixed with \"#\",\n an event listener can be set to a DOM element (eventTarget) identified by the id in the content.<br>\n This is the same behavior as the usual eventTarget#addEventListener.<br>\n <br>\n In addition to the DOM element in the content, the following special names are reserved for the \"id\"<br>\n \"closeButton\" ... close button.<br>\n \"minimizeButton\" ... Minimize Button<br>\n \"zoomButton\"...zoom button.<br>\n \"restoreButton\" ... the button that restores the window size.<br>\n \"deminimizeButton\" ... the button to return from the minimized state.<br>\n <br>\n You can also receive events such as window resizing, moving, and focusing.\n In this case, specify the following as \"id\"<br>\n \"frame\" or \"window\".<br>\n <br>\n You can specify a frameComponent name that is uniquely defined by addFrameComponent.\n (Generic buttons such as closeButton are one of the frame components.\n * @param {string} eventType The element in the content (HTML) of a window whose \"id\" starts with \"#\"\n * can be the same as the eventType(https://developer.mozilla.org/en-US/docs/Web/API/Event/type) used by the normal addEventListener.<br>\n <br>\n If the \"id\" is a frame or a window, the following can be used<br>\n \"move\"... When a window is moved, it fires.<br>\n \"resize\"... Fires when the window is resized.<br>\n \"focus\"... \"focus\" means got focus. It fires when the window is in focus.<br>\n \"blur\"... \"blur\" means lost focus.It fires when the window loses focus.<br>\n <br>\n * @param {function} callbackFunc\n */\nCIfFrame.prototype.on = function(id, eventType, callbackFunc) {\n  var me = this;\n  var component = me.getFrameComponentElement(id);\n\n  // if id indicates frame component like CTextButton,CImageButton\n  if (component) {\n\n    //Since we want to specify only one handler for frame components at the same time,\n    // use eventListenerHelper instead of an event listener\n    me.eventListenerHelper.addEventListener(component, eventType, function(e) {\n      callbackFunc(me, e,\n        {\n          type: 'frameComponent',\n          id: id,\n          eventType: eventType,\n          //child: childMenuEle\n        });\n    }, { listenerName: 'frame-component-listener' });\n  }\n\n  if (id === 'frame' || id === 'window') {\n\n    if (eventType === 'move' && !me.eventEmitter.hasListenerFuncs('move')) {\n      me.setOnMoveListener(function(e) {\n        //refCIfFrame.eventEmitter.emit('resize',);\n        me.eventEmitter.emit('move', me._getCurrentSizePos());\n      });\n    }\n\n\n    me.eventEmitter.on(eventType, callbackFunc);\n  }\n\n  // DOM element in iframe or DOM element on dframe\n  var domElement = me.$(id);\n\n  if (domElement) {\n    if (me.eventListenerHelper.hasEventListener(domElement, eventType, 'frame-dom-listener')) {\n      me.eventListenerHelper.removeEventListener(domElement, eventType, null, { listenerName: 'frame-dom-listener' });\n    }\n    me.eventListenerHelper.addEventListener(domElement, eventType, function(e) {\n      callbackFunc(me, e, {\n        type: 'dom',\n        id: id,\n        eventType: eventType\n      });\n    }, { listenerName: 'frame-dom-listener' });\n  }\n\n  // Search DOM element on frameComponent\n  if (!domElement) {\n\n    var domElementOnCanvasElement = me.canvas.canvasElement.querySelector(id);\n    if (domElementOnCanvasElement) {\n      domElementOnCanvasElement.addEventListener(eventType, function(e) {\n        callbackFunc(me, e, {\n          type: 'dom',\n          id: id,\n          eventType: eventType\n        });\n      });\n    }\n  }\n};\n\n\nCIfFrame.prototype.adjustFrameBorderRadius = function() {\n  var me = this;\n\n  if (parseInt(me.frameBorderRadius, 10) > 0) {\n\n    var borderData = me.getFrameInnerBorderRadius(me, me._hasFocus);\n    var frameAppearance = borderData.frameAppearance;\n    var innerBorderRadius = borderData.innerBorderRadius;\n    var titleBarHeight = parseInt(frameAppearance.titleBarHeight, 10);\n\n    if (me.showTitleBar) {\n\n      //title bar exists\n      me.canvas.canvasElement.style.borderBottomRightRadius = innerBorderRadius;\n      me.canvas.canvasElement.style.borderBottomLeftRadius = innerBorderRadius;\n      me.iframe.style.borderBottomRightRadius = innerBorderRadius;\n      me.iframe.style.borderBottomLeftRadius = innerBorderRadius;\n\n      me.titleBar.style.borderTopLeftRadius = innerBorderRadius;\n      me.titleBar.style.borderTopRightRadius = innerBorderRadius;\n\n\n    } else {\n\n      //title bar not exits\n      me.canvas.canvasElement.style.borderRadius = innerBorderRadius;\n      me.iframe.style.borderRadius = innerBorderRadius;\n\n    }\n\n    if (me.dframe) {\n      if (titleBarHeight === 0) {\n        if (!me.dframe.style.borderTopRightRadius) {\n          me.dframe.style.borderTopRightRadius = innerBorderRadius;\n        }\n        if (!me.dframe.style.borderTopLeftRadius) {\n          me.dframe.style.borderTopLeftRadius = innerBorderRadius;\n        }\n      }\n      me.dframe.style.borderBottomRightRadius = innerBorderRadius;\n      me.dframe.style.borderBottomLeftRadius = innerBorderRadius;\n    }\n\n\n  }\n};\n\nCIfFrame.prototype.handleReleasingFocus = function(e) {\n  var me = this;\n\n  var focused = me._hasFocus;\n\n  me._hasFocus = false;\n\n  //update style class\n  me.titleBar.className = me.titleBarClassNameDefault;\n\n  if (me.titleBarColorDefault) {\n    me.titleBar.style.background = me.titleBarColorDefault;\n  }\n  me.titleBar.style.color = me.titleBarCaptionColorDefault;\n\n  //border color\n  if (me.frameBorderColorDefault) {\n    me.htmlElement.style.borderColor = me.frameBorderColorDefault;\n  }\n\n  //border width\n  if (me.frameBorderWidthDefault) {\n    me.htmlElement.style.borderWidth = me.frameBorderWidthDefault;\n    me.adjustFrameBorderRadius();\n  }\n\n  if (me.htmlElement.typeName == 'cifwindow') {\n    if (me.overrayTransparentScreenEnabled) {\n      me.transparence.style.width = parseInt(me.iframe.width, 10) + 'px';\n      me.transparence.style.height = parseInt(me.iframe.height, 10) + 'px';\n    }\n  }\n\n  //handling for child frameComponents\n  for (var frameComponentId in me.frameComponentMap) {\n    var frameComponent = me.frameComponentMap[frameComponentId];\n    frameComponent.handleReleasingFocus();\n  }\n\n  //border bottom\n  if (me.titleBarBorderBottomDefault) {\n    me.titleBar.style.borderBottom = me.titleBarBorderBottomDefault;\n  }\n\n  if (focused) {\n    me.eventEmitter.emit('blur', { target: me });\n  }\n\n\n  return me;\n};\n\nCIfFrame.prototype.handleTakingFocus = function(e) {\n  var me = this;\n  var focused = me._hasFocus;\n  me._hasFocus = true;\n  me._hasFocus = Date.now();\n\n  if (me.overrayTransparentScreenEnabled) {\n\n    //close transparence screen\n    me.transparence.style.width = '0px';\n    me.transparence.style.height = '0px';\n\n  }\n\n  //update style class\n  me.titleBar.className = me.titleBarClassNameFocused;\n\n  if (me.titleBarColorFocused) {\n    me.titleBar.style.background = me.titleBarColorFocused;\n  }\n  me.titleBar.style.color = me.titleBarCaptionColorFocused;\n\n\n  //border color\n  if (me.frameBorderColorFocused) {\n    me.htmlElement.style.borderColor = me.frameBorderColorFocused;\n  }\n\n  //border width\n  if (me.frameBorderWidthFocused) {\n    me.htmlElement.style.borderWidth = me.frameBorderWidthFocused;\n    me.adjustFrameBorderRadius();\n  }\n\n  //border bottom\n  if (me.titleBarBorderBottomFocused) {\n    me.titleBar.style.borderBottom = me.titleBarBorderBottomFocused;\n  }\n\n  //handling for child frameComponents\n  for (var frameComponentId in me.frameComponentMap) {\n    var frameComponent = me.frameComponentMap[frameComponentId];\n    frameComponent.handleTakingFocus();\n  }\n\n\n  if (!focused) {\n    me.eventEmitter.emit('focus', { target: me });\n  }\n\n  return me;\n};\n\n\nCFrame.prototype.show = function(model) {\n  var me = this;\n  //me.htmlElement.style.visibility = 'visible';\n  me.htmlElement.style.display = 'flex';//hidden';\n\n  if (model && model.requestFocus == false) {\n\n  } else {\n    me.requestFocus();\n  }\n  return me;\n};\n\n\nCFrame.prototype.showModal = function(onCloseListener) {\n  var me = this;\n\n  var appearance = new CFrameAppearance();\n  appearance.showTitleBar = true;\n  appearance.showCloseButton = false;\n  appearance.frameBorderRadius = '0px';\n  appearance.frameBorderStyle = 'none';\n  appearance.frameBorderWidthDefault = '0px';\n  appearance.frameBorderWidthFocused = '0px';\n  appearance.frameBoxShadow = null;\n  appearance.frameBackgroundColor = 'transparent';\n  appearance.frameComponents = [];\n  appearance.frameHeightAdjust = 0;\n  appearance.titleBarHeight = '0px';\n  appearance.titleBarBorderBottomFocused = null;\n  appearance.titleBarCaptionLeftMargin = '0px';\n\n\n  appearance.onInitialize = function() {\n  };\n\n  //added for modal window\n  appearance.pullUpDisabled = true;\n\n  var windowManager = me.parentCanvas;\n\n  var modalBackgroundWindowId = DEF.CFRAME.MODAL_BACKGROUND_FRAME_ID_PREFIX + me.id;\n\n  //create background window for preventing click background\n  var modalBackgroundFrame = new CIfFrame(modalBackgroundWindowId, 0, 0, 1, 1, appearance);\n  modalBackgroundFrame.setSize(window.innerWidth, window.innerHeight, true);\n  modalBackgroundFrame.setResizable(false);\n\n  window.addEventListener('resize', function() {\n    modalBackgroundFrame.setSize(window.innerWidth, window.innerHeight, true);\n  });\n\n\n  //remember id of modal background frame\n  me.modalBackgroundWindowId = modalBackgroundWindowId;\n\n  // if (properties && properties.windowName) {\n  //     frame.setName(properties.windowName);\n  // }\n\n  modalBackgroundFrame.hide();\n  windowManager.addWindow(modalBackgroundFrame);\n\n\n  modalBackgroundFrame.setTitle('').getFrameView().innerHTML = '<div class=\"jsframe-modal-window-background\"></div>';\n  modalBackgroundFrame.getFrameView().style.backgroundColor = 'rgba(0,0,0,0.0)';\n  modalBackgroundFrame.show();\n\n  me.show();\n\n  if (onCloseListener) {\n    me.setOnCloseFrameListener(onCloseListener);\n  }\n};\nCFrame.prototype.getWindowManager = function() {\n  var me = this;\n  return me.parentCanvas;\n}\n\n\nCIfFrame.prototype.hide = function() {\n  var me = this;\n  //  me.htmlElement.style.visibility = 'hidden';\n  me.htmlElement.style.display = 'none';//hidden';\n  return me;\n};\n\n//Overriding CBeanFrame.prototype.onmouseDown\nCIfFrame.prototype.onmouseDown = function(e) {\n\n  var refHtmlElement = this;\n\n  //Do not select it when dragging by the mouse.\n  document.body.ondrag = function() {\n    return false;\n  };\n  // document.body.onselectstart = function () {\n  //     return false;\n  // };\n\n\n  //Override decorator with onmouseDown of parent class\n  refHtmlElement.decorator = CFrame.prototype.onmouseDown;\n  refHtmlElement.decorator(e);\n\n  //Deploy a transparent screen.\n  // Since mouseDown is pointed to this.htmlElement.onmousedown in the CBean class,\n  // this 'this' will indicate this.htmlElement.\n  //In other words,\n  //if you want to refer 'CIfFrame',you need to specify 'this.parent.'\n  //See CBeanFrame class, you can find 'this.htmlElement.parent = this'\n  var refCIfFrame = refHtmlElement.parent;\n\n\n  var refCWindowManager = refHtmlElement.parentCanvas;\n\n  //When somewhere window(CFrame,CIfFrame) fires 'mouseDown',\n  // Close all transparency screens so that the mouse cursor can pass over any iFrame\n  for (var windowId in refCWindowManager.beanList) {\n    var objCIfFrame = refCWindowManager.beanList[windowId];\n    if (windowId == refCIfFrame.getWindowId()) {\n      //skip\n    } else {\n      objCIfFrame.handleReleasingFocus();\n    }\n  }\n\n  refCIfFrame.handleTakingFocus();\n\n};\n\nCIfFrame.prototype.mouseUp = function(e) {\n  var refCIfFrame = this;\n\n\n  if (refCIfFrame.overrayTransparentScreenEnabled || refCIfFrame.overrayTransparentScreenOnResize) {\n    if (refCIfFrame.parentCanvas.onTopObject == refCIfFrame) {\n      //Minimize the window at the front.\n      refCIfFrame.transparence.style.width = '0px';\n      refCIfFrame.transparence.style.height = '0px';\n    } else {\n      //The window which is not the at the front expands the screen so that it can respond to clicks.\n\n      if (refCIfFrame.overrayTransparentScreenEnabled) {\n        refCIfFrame.transparence.style.width = parseInt(refCIfFrame.iframe.width) + 'px';\n        refCIfFrame.transparence.style.height = parseInt(refCIfFrame.iframe.height) + 'px';\n      }\n    }\n  }\n\n  refCIfFrame.decorator = CFrame.prototype.mouseUp;\n  refCIfFrame.decorator(e);\n\n\n  //Cancel selecting \"Do not select when dragging mouse while releasing button\" is canceled\n  document.body.ondrag = null;\n  document.body.onselectstart = null;\n\n  //Disable when stopping moving.(Enable transparent window only when moving.)\n  //This will work smoothly even with iframe content\n  refCIfFrame.transparence.style.pointerEvents = 'none';\n};\n\nCIfFrame.prototype.setMinFrameSize = function(width, height) {\n  var me = this;\n  me.minFrameWidth = width;\n  me.minWindowHeight = height;\n};\n\nCIfFrame.prototype.resize = function(deltaLeft, deltaTop, deltaWidth, deltaHeight, byUser) {\n\n\n  var refCIfFrame = this;\n\n  if (!refCIfFrame.resizable && byUser) {\n    return null;\n  }\n\n  var prevSize = refCIfFrame.getSize();\n\n\n  //Resize processing should be overridden directly rather than adopting a decorator pattern because it has better performance.\n  var tmpLeft = parseInt(refCIfFrame.htmlElement.style.left, 10);\n  var tmpTop = parseInt(refCIfFrame.htmlElement.style.top, 10);\n  var tmpWidth = parseInt(refCIfFrame.htmlElement.style.width, 10);\n  var tmpHeight = parseInt(refCIfFrame.htmlElement.style.height, 10);\n\n  //Important logic to handle the minimum of Window well\n  if (byUser && (tmpWidth + deltaWidth < refCIfFrame.minFrameWidth & deltaWidth < 0)) {\n    //Minimum adjustment of width\n    refCIfFrame.htmlElement.style.width = tmpWidth + 'px';\n    deltaWidth = 0;\n  }\n\n  if (byUser && (tmpHeight + deltaHeight < refCIfFrame.minWindowHeight & deltaHeight < 0)) {\n    //Minimum adjustment of height\n    refCIfFrame.htmlElement.style.height = tmpHeight + 'px';\n    deltaHeight = 0;\n  }\n  refCIfFrame.htmlElement.style.left = (tmpLeft + deltaLeft) + 'px';\n  refCIfFrame.htmlElement.style.top = (tmpTop + deltaTop) + 'px';\n  refCIfFrame.htmlElement.style.width = (tmpWidth + deltaWidth) + 'px';\n  refCIfFrame.htmlElement.style.height = (tmpHeight + deltaHeight) + 'px';\n\n\n  var tmpCanvasWidth = parseInt(refCIfFrame.canvas.canvasElement.style.width, 10);\n  var tmpCanvasHeight = parseInt(refCIfFrame.canvas.canvasElement.style.height, 10);\n\n  //Since canvasElement is a (0, 0) relative coordinate with respect\n  // to the parent element, it is not necessary to change left and top.\n  refCIfFrame.canvas.canvasElement.style.width = (tmpCanvasWidth + deltaWidth) + 'px';\n  refCIfFrame.canvas.canvasElement.style.height = (tmpCanvasHeight + deltaHeight) + 'px';\n\n  //Change the size of the title bar. TitleAdjustWidth etc.\n  // The reason why you do not have to use titleAdjustWidth is\n  // because these scaling are done with differences (deltaX, deltaY).\n  //Therefore, if you adjust with the titleAdjustWidth\n  // as the initial value, the other will stretch relative.\n  refCIfFrame.titleBar.style.width = (tmpCanvasWidth - refCIfFrame.ifDelta + deltaWidth + 0) + 'px';\n\n  //Image resizing for iframe that is the child element of canvas\n  refCIfFrame.iframe.width = (tmpCanvasWidth - refCIfFrame.ifDelta + deltaWidth + 0) + 'px';\n  refCIfFrame.iframe.height = (tmpCanvasHeight - refCIfFrame.ifDelta + deltaHeight + refCIfFrame.frameHeightAdjust) + 'px';\n\n  if (refCIfFrame.overrayTransparentScreenEnabled || refCIfFrame.overrayTransparentScreenOnResize) {\n    //Deploy a transparent screen.\n    refCIfFrame.transparence.style.width = parseInt(refCIfFrame.iframe.width) + 'px';\n    refCIfFrame.transparence.style.height = parseInt(refCIfFrame.iframe.height) + 'px';\n  }\n\n  //move frameComponent(like closeButton) corresponding to moving window edge for resize\n  for (var frameComponentId in refCIfFrame.frameComponentMap) {\n    var frameComponent = refCIfFrame.frameComponentMap[frameComponentId];\n    //update alignment of frameComponent corresponding to moving window edge for resize\n    frameComponent.updateAlign();\n  }\n\n\n  for (var beanName in refCIfFrame.canvas.beanList) {\n    var tmpBean = refCIfFrame.canvas.beanList[beanName];\n\n    if (tmpBean.htmlElement.typeName == 'cmarkerwindow') {\n\n      if (tmpBean.htmlElement.usage == 'RD') {\n        tmpBean.htmlElement.style.left = (parseInt(tmpBean.htmlElement.style.left) + deltaWidth) + 'px';\n        tmpBean.htmlElement.style.top = (parseInt(tmpBean.htmlElement.style.top) + deltaHeight) + 'px';\n      } else if (tmpBean.htmlElement.usage == 'DD') {\n        tmpBean.htmlElement.style.width = (parseInt(tmpBean.htmlElement.style.width) + deltaWidth) + 'px';\n        tmpBean.htmlElement.style.top = (parseInt(tmpBean.htmlElement.style.top) + deltaHeight) + 'px';\n      } else if (tmpBean.htmlElement.usage == 'RR') {\n        tmpBean.htmlElement.style.left = (parseInt(tmpBean.htmlElement.style.left) + deltaWidth) + 'px';\n        tmpBean.htmlElement.style.height = (parseInt(tmpBean.htmlElement.style.height) + deltaHeight) + 'px';\n      }\n    }\n  }\n\n  var crrSize = refCIfFrame.getSize();\n  if (prevSize.width !== crrSize.width || prevSize.height !== crrSize.height) {\n    refCIfFrame.eventEmitter.emit('resize', refCIfFrame._getCurrentSizePos());\n  }\n\n\n};//resize\n\nCIfFrame.prototype._getCurrentSizePos = function() {\n  var me = this;\n  var crrSize = me.getSize();\n  var crrPos = me.getPosition();\n  return { target: me, pos: crrPos, size: crrSize };\n};\n\nCIfFrame.prototype.resizeDirect = function(width, height, byUser) {\n\n  var refCIfFrame = this;\n\n\n  if (!refCIfFrame.resizable && byUser) {\n    return null;\n  }\n\n  refCIfFrame.htmlElement.style.width = width + 'px';\n  refCIfFrame.htmlElement.style.height = height + 'px';\n\n\n  var tmpCanvasWidth = parseInt(refCIfFrame.canvas.canvasElement.style.width);\n  var tmpCanvasHeight = parseInt(refCIfFrame.canvas.canvasElement.style.height);\n\n  //Since canvasElement is a (0, 0) relative coordinate with respect\n  // to the parent element, it is not necessary to change left and top.\n  refCIfFrame.canvas.canvasElement.style.width = width + 'px';\n  refCIfFrame.canvas.canvasElement.style.height = (height - refCIfFrame.titleBar.style.height) + 'px';\n\n  //Change the size of the title bar. TitleAdjustWidth etc.\n  // The reason why you do not have to use titleAdjustWidth is\n  // because these scaling are done with differences (deltaX, deltaY).\n  //Therefore, if you adjust with the titleAdjustWidth\n  // as the initial value, the other will stretch relative.\n  refCIfFrame.titleBar.style.width = (width - refCIfFrame.ifDelta) + 'px';\n\n  //Image resizing for iframe that is the child element of canvas\n  refCIfFrame.iframe.width = width - refCIfFrame.ifDelta + 'px';\n  refCIfFrame.iframe.height = height - refCIfFrame.ifDelta + refCIfFrame.frameHeightAdjust + 'px';\n\n\n  if (refCIfFrame.overrayTransparentScreenEnabled || refCIfFrame.overrayTransparentScreenOnResize) {\n    //Deploy a transparent screen.\n    refCIfFrame.transparence.style.width = parseInt(refCIfFrame.iframe.width) + 'px';\n    refCIfFrame.transparence.style.height = parseInt(refCIfFrame.iframe.height) + 'px';\n  }\n\n  //move frameComponent(like closeButton) corresponding to moving window edge for resize\n  for (var frameComponentId in refCIfFrame.frameComponentMap) {\n    var frameComponent = refCIfFrame.frameComponentMap[frameComponentId];\n    //update alignment of frameComponent corresponding to moving window edge for resize\n    frameComponent.updateAlign();\n  }\n\n\n  for (var beanName in refCIfFrame.canvas.beanList) {\n    var tmpBean = refCIfFrame.canvas.beanList[beanName];\n\n    if (tmpBean.htmlElement.typeName == 'cmarkerwindow') {\n\n      if (tmpBean.htmlElement.usage == 'RD') {\n        tmpBean.htmlElement.style.left = width + 'px';// parseInt(tmpBean.htmlElement.style.left) + deltaWidth + 'px';\n        tmpBean.htmlElement.style.top = height + 'px';//parseInt(tmpBean.htmlElement.style.top) + deltaHeight + 'px';\n      } else if (tmpBean.htmlElement.usage == 'DD') {\n        tmpBean.htmlElement.style.width = width + 'px';\n        tmpBean.htmlElement.style.top = height + 'px';//heightparseInt(tmpBean.htmlElement.style.top) + deltaHeight + 'px';\n      } else if (tmpBean.htmlElement.usage == 'RR') {\n        tmpBean.htmlElement.style.left = width + 'px';//+parseInt(tmpBean.htmlElement.style.left) + deltaWidth + 'px';\n        tmpBean.htmlElement.style.height = height + 'px';\n      }\n    }\n  }\n};//resize\n\n/**\n * Focus on this frame\n */\nCIfFrame.prototype.requestFocus = function() {\n\n\n  var me = this;\n\n  var beanList = me.parentCanvas.beanList;\n\n  for (var windowId in beanList) {\n\n    var tmpIfWindow = beanList[windowId];\n\n    //If it's my own window, minimize the transparent screen and change the color of the title bar.\n    if (windowId == me.getWindowId()) {\n\n      //if this frame is a target frame\n      tmpIfWindow.handleTakingFocus();\n    } else {\n\n      //if this frame is NOT a target frame\n      tmpIfWindow.handleReleasingFocus();\n    }\n  }\n\n  me.parentCanvas.pullUp(me.id);\n\n};\n\n/**\n * URL for iframe\n * @param url\n */\nCIfFrame.prototype.setUrl = function(url) {\n\n  var me = this;\n\n  return new Promise(function(resolve, reject) {\n\n\n    if (url) {\n      me.setUseIframe(true);\n    } else {\n      me.setUseIframe(false);\n      resolve();\n    }\n\n\n    me.iframe.src = url;\n\n    me.iframe.onload = function() {\n      var funcOnMouseMove = function(e) {\n\n        var clientX = e.pageX;\n        var clientY = e.pageY;\n\n        if (TOUCH_ENABLED) {\n          if (e.type === 'touchmove') {\n            var changedTouches = e.changedTouches;\n            if (TOUCH_MOVE_ONLY_WITH_ONE_FINGER) {\n              var touches = e.touches;\n              if (touches.length === 1) {\n                clientX = changedTouches[0].pageX;\n                clientY = changedTouches[0].pageY;\n              } else {\n                return true;\n              }\n            } else {\n              clientX = changedTouches[0].pageX;\n              clientY = changedTouches[0].pageY;\n            }\n          }\n        }\n        var frameLeft = me.getLeft();\n        var frameTop = me.getTop();\n        var eventFromIframe = document.createEvent('MouseEvents');\n        // Processing to make it look like mouse move even if you are moving by touch\n        eventFromIframe.initMouseEvent('mousemove', true, false, window, e.detail, e.screenX, e.screenY, (clientX + frameLeft), (clientY + frameTop),\n          e.ctrlKey, e.altKey, e.shiftKey, e.metaKey, e.button, null);\n\n        //smooth dragging during iframe mode\n        me.parentCanvas.windowMouseMove(eventFromIframe);\n\n        if (me.onMouseMoveOnIframe) {\n          me.onMouseMoveOnIframe(eventFromIframe);\n        }\n      };\n      me.iframe.contentWindow.document.onmousemove = funcOnMouseMove;\n      me.iframe.contentWindow.document.ontouchmove = funcOnMouseMove;\n\n\n      //mouse up\n      var funcOnMouseUp = function(e) {\n\n        var clientX = e.pageX;\n        var clientY = e.pageY;\n\n        if (TOUCH_ENABLED) {\n          if (e.type === 'touchend') {\n            var changedTouches = e.changedTouches;\n            clientX = changedTouches[0].pageX;\n            clientY = changedTouches[0].pageY;\n          }\n        }\n        var frameLeft = me.getLeft();\n        var frameTop = me.getTop();\n        var eventFromIframe = document.createEvent('MouseEvents');\n        // Processing to make it look like mouse up even if you mouseup by touch\n        eventFromIframe.initMouseEvent('mouseup', true, false, window, e.detail, e.screenX, e.screenY, (clientX + frameLeft), (clientY + frameTop),\n          e.ctrlKey, e.altKey, e.shiftKey, e.metaKey, e.button, null);\n\n        //smooth dragging during iframe mode\n        me.parentCanvas.windowMouseUp(eventFromIframe);\n\n        if (me.onMouseUpOnIframe) {\n          me.onMouseUpOnIframe(eventFromIframe);\n        }\n      };\n      me.iframe.contentWindow.document.onmouseup = funcOnMouseUp;\n      me.iframe.contentWindow.document.ontouchend = funcOnMouseUp;\n\n      resolve(me, me.iframe.contentWindow.document);\n    };\n  });\n};\n\n\n/**\n * Returns DOM-document of iframe\n * @returns {*|HTMLDocument}\n */\nCIfFrame.prototype.getIfDocument = function() {\n  var me = this;\n  return me.iframe.contentWindow.document;\n};\n\n\nCIfFrame.prototype.setScrolling = function(str) {\n  var me = this;\n  me.iframe.scrolling = str;\n};\n\nCIfFrame.prototype.getScrolling = function(str) {\n  var me = this;\n  return me.iframe.scrolling;\n};\n\n\nCIfFrame.prototype.setResizable = function(enabled) {\n  var me = this;\n  me.resizable = enabled;\n  me.enableMarkers(enabled);\n  return me;\n};\n\n\nCIfFrame.prototype.setControl = function(model) {\n  var me = this;\n\n  if (model) {\n    model.frame = me;\n    me.control = me.jsFrame.createWindowEventHelper(model);\n    me.control.setupDefaultEvents();\n  }\n\n};\n\n/**\n * end of CIFrame class\n */\n\n//+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-\n\n\ninherit(CWindowManager, CCanvas);\n\n/**\n * CWindowManager class\n * <p>\n * A canvas class that displays multiple frames. Handle events on the window to coordinate multiple windows<br>\n *\n * @param parentElement\n * @param canvasId\n * @param left\n * @param top\n * @param width\n * @param height\n * @constructor\n */\nfunction CWindowManager(parentElement, canvasId, left, top, width, height) {\n  CWindowManager.superConstructor.call(this, parentElement, canvasId, left, top, width, height);\n  var me = this;\n  // document.body.addEventListener('click', function(evt) {\n  document.addEventListener('click', function(evt) {\n    for (var windowId in me.beanList) {\n      var beanFrame = me.beanList[windowId];\n      beanFrame.onBodyClicked(evt);\n    }\n  });\n\n}\n\nCWindowManager.prototype.getWindow = function(windowId) {\n  var me = this;\n  return me.beanList[windowId];\n};\n\n//Wrapping the 'addBean' of the parent class\nCWindowManager.prototype.addWindow = function(window) {\n  var me = this;\n\n  var windowId = window.getWindowId();\n  var name = window.getName();\n  me.beanIdName[windowId] = name;\n  me.beanNameId[name] = windowId;\n\n  me.addBean(window);\n};\n\n//if contains window named specified name\nCWindowManager.prototype.containsWindowName = function(name) {\n  var me = this;\n\n\n  var windowId = me.beanNameId[name];\n\n  if (windowId) {\n    return true;\n  }\n  return false;\n};\n\nCWindowManager.prototype.getWindowByName = function(name) {\n  var me = this;\n  var windowId = me.beanNameId[name];\n\n  if (windowId) {\n    return me.getWindow(windowId);\n  } else {\n    return null;\n  }\n};\n\n//Wrapping the 'mouseMove' method of the parent class\nCWindowManager.prototype.windowMouseMove = function(e) {\n\n  var me = this;\n  if (me.currentObject == null) {\n    return null;\n  }\n\n  var childWindowMoved = false;\n\n  //Loop processing of each CWindow held by CWindowManager\n  var beanList = me.beanList;\n\n  for (var windowId in beanList) {\n\n    var targetWindow = beanList[windowId];\n\n\n    //Since this 'mouseMove' is canvas of CWindow's 'mouseMove',so do move CBeanFrames in the canvas.\n    var eventData = targetWindow.canvas.mouseMove(e);\n\n    //Whether any one of the beans in the Canvas has moved or not.\n    //Yes.(When it moves), eventData is set.\n    //NO. If it does not move it is set to null.\n    childWindowMoved = childWindowMoved | (eventData != null);\n    if (eventData != null) {\n\n      //If it is the marker for resizing\n      if (eventData.targetTypeName == 'cmarkerwindow') {\n\n        var targetObject = eventData.targetObject;\n\n        //Enable transparent window only when moving.\n        //This will work smoothly even with iframe content\n        targetWindow.transparence.style.pointerEvents = 'auto';\n\n        if (targetObject.usage == 'RD') {\n          targetWindow.resize(0, 0, eventData.deltaX, eventData.deltaY, true);\n        } else if (targetObject.usage == 'DD') {\n          targetWindow.resize(0, 0, 0, eventData.deltaY, true);\n        } else if (targetObject.usage == 'RR') {\n          targetWindow.resize(0, 0, eventData.deltaX, 0, true);\n        }\n\n      }\n    }\n  }\n\n  //If any one of the beans in the Canvas has moved.Do not do 'Cwindow's mouseMove'\n  if (!childWindowMoved && this.mouseDownSource != 'childcanvas') {\n\n    //Moving logic for CWindow which is holded by CWindowManager as a child window.\n    me.mouseMove(e);\n  }\n\n};\n\n//Wrapping the method 'mouseUp' of the parent class\nCWindowManager.prototype.windowMouseUp = function(e) {\n  var me = this;\n\n  //run 'mouseUp' of parent class\n  me.mouseUp(e);\n\n  var beanList = me.beanList;\n\n  for (var windowId in beanList) {\n\n    var objWindow = beanList[windowId];\n\n    //run CWindow's 'mouseUp'(it's child window).\n    objWindow.mouseUp(e);\n  }\n\n};\n\n/**\n * (override CCanvas.removeBean)\n * @param windowId\n */\nCWindowManager.prototype.removeBean = function(windowId) {\n\n\n  var me = this;\n\n  //Retrieve the target beanFrame\n  var beanList = me.beanList;\n  var targetBean = beanList[windowId];\n\n  if (targetBean == null) {\n    return;\n  }\n\n  var removeTargetBeanHasFocus = targetBean._hasFocus;\n\n\n  //Remove bean's htmlElement from canvasElement\n  me.canvasElement.removeChild(targetBean.htmlElement);\n\n  //Delete the bean object in the associative array.\n  delete beanList[windowId];\n\n\n  var beanName = me.beanIdName[windowId];\n  if (beanName) {\n    //-if bean name exist\n    delete me.beanIdName[windowId];\n    delete me.beanNameId[beanName];\n  }\n\n\n  //focus on last focused window after removing\n  var maxFocusTime = 0;\n  var lastFocusedFrame = null;\n\n  if (removeTargetBeanHasFocus) {\n    for (var windowId in beanList) {\n      var frame = beanList[windowId];\n\n      //pullUpDisabled=true means that the frame is modal background window\n      if (maxFocusTime <= frame._hasFocusTime && !frame.pullUpDisabled) {\n\n        maxFocusTime = frame._hasFocusTime;\n\n        lastFocusedFrame = frame;\n\n      }\n    }\n    if (lastFocusedFrame) {\n      lastFocusedFrame.requestFocus();\n    }\n  }\n\n  targetBean.parentCanvas = null;\n\n};\n/**\n * end of CWindowManager class\n */\n\n//+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-\n\ninherit(CMarkerWindow, CBeanFrame);\n\n/**\n * CMarkerWindow class\n * @param windowId\n * @param left\n * @param top\n * @param width\n * @param height\n * @param zindex\n * @param usage\n * @constructor\n */\nfunction CMarkerWindow(windowId, left, top, width, height, zindex, usage, color) {\n\n  var me = this;\n\n  CMarkerWindow.superConstructor.call(this, windowId, left, top, width, height, zindex, usage);\n\n  me.htmlElement.typeName = 'cmarkerwindow';\n  me.htmlElement.usage = usage;\n  me.htmlElement.isRangeLimited = false;\n  me.htmlElement.style.borderStyle = 'none';\n  me.htmlElement.style.zIndex = 1;\n  if (color) {\n    me.htmlElement.style.background = color;\n  }\n  //me.pullUpDisabled = true;\n\n  me.getWindowType = function() {\n    return 'CMarkerWindow';\n  };\n}\n\n/**\n * End of CMarkerWindow class\n * @constructor\n */\n\n//+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-\n\n/**\n * FrameManager class\n * @constructor\n */\nfunction JSFrame(model) {\n\n  var me = this;\n\n  var parentElement = null;\n\n  // Frames will be fixed(Frames keep staying in the same place) even if the user scrolls the browser.\n  me.isWindowManagerFixed = true;//default is true.\n\n  //Initialization parameter check\n\n  if (model && model.fixed == false) {\n    me.isWindowManagerFixed = false;\n  }\n\n  if (model && model.parentElement) {\n    parentElement = model.parentElement;\n  }\n\n  me.hAlign = 'left';\n  me.vAlign = 'top';\n\n  if (model && model.horizontalAlign) {\n    me.hAlign = model.horizontalAlign;\n  }\n\n  if (model && model.verticalAlign) {\n    me.vAlign = model.verticalAlign;\n  }\n\n  me.pullToRefresh = false;\n  if (model && typeof model.pullToRefresh === 'boolean') {\n    me.pullToRefresh = model.pullToRefresh;\n  }\n\n  me.touchActionManipulation = true;\n  if (model && typeof model.touchActionManipulation === 'boolean') {\n    me.touchActionManipulation = model.touchActionManipulation;\n  }\n\n  if (!parentElement) {\n    if (me.isWindowManagerFixed) {\n      var topParentDiv = document.createElement('div');\n      topParentDiv.id = 'jsFrame_fixed_' + me.generateUUID();\n      topParentDiv.setAttribute('style',\n        'position:fixed;' + me.hAlign + ':0px;' + me.vAlign + ':0px;margin:0px;padding:0px;'\n      );\n      document.body.appendChild(topParentDiv);\n      parentElement = topParentDiv;\n    } else {\n      var topParentDiv = document.createElement('div');\n      topParentDiv.id = 'jsFrame_absolute_' + me.generateUUID();\n      topParentDiv.setAttribute('style',\n        'position:absolute;' + me.hAlign + ':0px;' + me.vAlign + ':0px;margin:0px;padding:0px;'\n      );\n      document.body.appendChild(topParentDiv);\n      parentElement = topParentDiv;\n    }\n  } else {\n    if (me.isWindowManagerFixed) {\n      //parentElement set\n      var topParentDiv = document.createElement('div');\n      topParentDiv.id = 'jsFrame_fixed_' + me.generateUUID();\n      topParentDiv.setAttribute('style',\n        'position:fixed;' + me.hAlign + ':0px;' + me.vAlign + ':0px;margin:0px;padding:0px;'\n      );\n      parentElement.appendChild(topParentDiv);\n    } else {\n\n      var topParentDiv = document.createElement('div');\n      topParentDiv.id = 'jsFrame_absolute_' + me.generateUUID();\n      topParentDiv.setAttribute('style',\n        'position:absolute;' + me.hAlign + ':0px;' + me.vAlign + ':0px;margin:0px;padding:0px;'\n      );\n      parentElement.appendChild(topParentDiv);\n\n    }\n  }\n\n  if (MOUSE_ENABLED) {\n    document.addEventListener('mouseup', mouseUp);\n    document.addEventListener('mousemove', mouseMove);\n  }\n\n  if (TOUCH_ENABLED) {\n    if ('ontouchend' in window) {\n      var funcOnTouchEnd = function(evt) {\n        // The \"mouseup\" event happens right after \"touchend\" event,\n        // but I don't call #preventdefault because #preventdefault prevents \"onclick\".\n        // So, perform #preventdefault only for \"touchmove\"\n        // evt.preventDefault();\n        mouseUp.bind(this)(evt);\n      };\n      document.addEventListener('touchend', funcOnTouchEnd);\n    }\n\n    if ('ontouchmove' in window) {\n\n      // To remove the 300ms tap delay between touchend and click,\n      // To disable double-tap to zoom\n      if (me.touchActionManipulation) {\n        me.doEnableTouchActionManipulation();\n      }\n\n      if (!me.pullToRefresh) {\n        // The Android version of Chrome has a feature that refreshes the page by sliding downward\n        // while touching on the screen, but when this feature is enabled, the downward movement of the window is inhibited,\n        // so this feature can be explicitly turned off.\n        me.doDisablePullToRefresh();\n      }\n\n      var funcOnTouchMove = function(evt) {\n        // Call #preventDefault to prevent simultaneous ignition of mousemove\n        evt.preventDefault();\n        mouseMove.bind(this)(evt);\n      };\n      document.addEventListener('touchmove', funcOnTouchMove);\n    }\n  }\n\n\n  me.windowManager = new CWindowManager(parentElement, 'windowManager_' + me.generateUUID(), 0, 0, 0, 0);\n  //me.windowManager = new CWindowManager(document.body, 'windowManager_' + me.generateUUID(), 0, 0, 0, 0);\n  me.domPartsBuilder = null;\n\n  function mouseUp(e) {\n    me.windowManager.windowMouseUp(e);\n  }\n\n  function mouseMove(e) {\n    me.windowManager.windowMouseMove(e);\n  }\n}\n\nJSFrame.prototype.doEnableTouchActionManipulation = function() {\n  var bodyStyle = document.documentElement.getAttribute('style');\n  if (!bodyStyle) {\n    bodyStyle = '';\n  } else {\n    if (!bodyStyle.endsWith(';')) {\n      bodyStyle += ';';\n    }\n  }\n  if (bodyStyle.indexOf('touch-action') === -1) {\n    bodyStyle += '-ms-touch-action: manipulation;touch-action: manipulation;';\n    document.documentElement.setAttribute('style', bodyStyle);\n  }\n};\n\nJSFrame.prototype.doDisablePullToRefresh = function() {\n  var bodyStyle = document.body.getAttribute('style');\n  if (!bodyStyle) {\n    bodyStyle = '';\n  } else {\n    if (!bodyStyle.endsWith(';')) {\n      bodyStyle += ';';\n    }\n  }\n  if (bodyStyle.indexOf('overscroll-behavior-y') === -1) {\n    bodyStyle += 'overscroll-behavior-y: contain;';\n    document.body.setAttribute('style', bodyStyle);\n  }\n};\nJSFrame.prototype.getDomPartsBuilder = function() {\n  var me = this;\n\n  if (!me.domPartsBuilder) {\n    me.domPartsBuilder = new CDomPartsBuilder();\n  }\n  return me.domPartsBuilder;\n};\n\nJSFrame.prototype.create = function(model) {\n  var me = this;\n\n  var properties = {};\n  properties.name = model.name;\n  var title = model.title;\n  var left = model.left;\n  var top = model.top;\n  var width = model.width;\n  var height = model.height;\n  var appearance = model.appearance;\n  var presetWindowName = model.preset;\n  var presetWindowParam = model.presetParam;\n  var appearanceName = model.appearanceName;\n  var appearanceParam = model.appearanceParam;\n  var style = model.style;\n\n  var minWidth = model.minWidth;\n  var minHeight = model.minHeight;\n\n\n  var html = model.html;\n  var resizable = model.resizable;\n  var movable = model.movable;\n  var url = model.url;\n  var urlLoaded = model.urlLoaded;\n\n  var presetParam = model.presetParam;\n  var presetWindow;\n\n  if (presetWindowName) {\n\n    var presetWindowObj = this.getPresetWindow(presetWindowName);\n    presetWindow = presetWindowObj.getPresetWindow(presetParam);\n    appearance = this.createPresetStyle(presetWindow.appearanceName,\n      { appearanceParam: presetWindow.appearanceParam });\n\n  } else if (appearanceName) {\n    appearance = this.createPresetStyle(appearanceName,\n      { appearanceParam: appearanceParam });\n  }\n\n  if (model.clientHeight) {\n    var windowTitleBarHeight = parseInt(appearance.titleBarHeight || 0) - appearance.frameHeightAdjust;\n    height = model.clientHeight + windowTitleBarHeight;\n  }\n\n\n  var frame = this.createFrame(left, top, width, height, appearance, properties);\n\n  if (title) {\n    frame.setTitle(title);\n  }\n\n  if (html) {\n    frame.setHTML(html);\n  }\n  if (url) {\n    var urlPromise = frame.setUrl(url);\n    if (urlLoaded) {\n      urlPromise.then(urlLoaded);\n    }\n  }\n  if (resizable == false) {\n    frame.setResizable(false);\n  }\n  if (movable == false) {\n    frame.setMovable(false);\n  }\n\n  if (minWidth && minHeight) {\n    frame.minFrameWidth = minWidth;\n  }\n  if (minHeight) {\n    frame.minWindowHeight = minHeight;\n\n    if (model.clientHeight) {\n      frame.minWindowHeight = minHeight + windowTitleBarHeight;\n    }\n  }\n\n  if (style) {\n    var frameView = frame.getFrameView();\n\n    for (var name in style) {\n      if (style.hasOwnProperty(name)) {\n        frameView.style[name] = style[name];\n      }\n    }\n  }\n\n  if (presetWindow) {\n    presetWindow.setupPresetWindow(frame);\n  }\n\n  return frame;\n};\n\n/**\n * Create a new window\n *\n * @returns {CIfFrame}\n */\nJSFrame.prototype.createFrame = function(left, top, width, height, appearance, properties) {\n  var me = this;\n\n  if (!appearance) {\n    appearance = me.createFrameAppearance();\n  }\n\n\n  appearance.initialize();\n\n  var windowId = 'window_' + me.generateUUID();\n\n  if (!left) {\n    left = 0;\n  }\n  if (!top) {\n    top = 0;\n  }\n  if (!width) {\n    width = 128;\n  }\n  if (!height) {\n    height = 128;\n  }\n\n\n  var frame = new CIfFrame(windowId, left, top, width, height, appearance);\n\n  //experimental\n  frame.jsFrame = me;\n\n  if (properties && properties.name) {\n    frame.setName(properties.name);\n  }\n  frame.hide();\n\n  me.windowManager.addWindow(frame);\n\n\n  // getTitleBarStyle is deprecated\n  if (appearance.getTitleBarStyle) {\n\n    var titleBarStyle = appearance.getTitleBarStyle();\n    if (titleBarStyle) {\n      frame.setTitleBarClassName(titleBarStyle.titleBarClassNameDefault, titleBarStyle.titleBarClassNameFocused);\n    }\n  } else if (appearance.titleBarClassNameDefault && appearance.titleBarClassNameFocused) {\n    frame.setTitleBarClassName(appearance.titleBarClassNameDefault, appearance.titleBarClassNameFocused);\n  } else if (appearance.titleBarClassNameDefault) {\n    frame.setTitleBarClassName(appearance.titleBarClassNameDefault, appearance.titleBarClassNameDefault);\n  }\n\n  return frame;\n\n};\n\n\nJSFrame.prototype.containsWindowName = function(windowName) {\n  var me = this;\n  return me.windowManager.containsWindowName(windowName);\n};\n\nJSFrame.prototype.getWindowByName = function(windowName) {\n  var me = this;\n  return me.windowManager.getWindowByName(windowName);\n};\n\nJSFrame.prototype.generateUUID = function() {\n\n  var unixTime = Date.now();\n\n  var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n    var r = (unixTime + Math.random() * 16) % 16 | 0;\n    unixTime = Math.floor(unixTime / 16);\n    return (c == 'x' ? r : (r & 0x3 | 0x8)).toString(16);\n  });\n  return uuid;\n\n};\n\nJSFrame.prototype.createFrameAppearance = function() {\n  return new CFrameAppearance();\n};\n\nJSFrame.prototype.createAnimator = function() {\n\n  return new CSimpleLayoutAnimator();\n};\n\n/**\n * Helper class for maximizing and minimizing windows(frames) and handling animations accordingly\n */\nJSFrame.prototype.createWindowEventHelper = function(model) {\n\n  var me = this;\n\n  if (!model) {\n    model = {};\n  }\n\n  model.verticalAlign = me.vAlign;\n  model.horizontalAlign = me.hAlign;\n\n  var wndEventHelper = new WindowEventHelper(model);\n  return wndEventHelper;\n};\n\nJSFrame.prototype.getPresetWindow = function(presetName, param) {\n\n  if (presetWindows[presetName]) {\n    var presetObj = presetWindows[presetName];\n    return presetObj;\n  } else {\n    return null;\n  }\n}\nJSFrame.prototype.createPresetStyle = function(presetName, param) {\n\n  var me = this;\n  var apr = me.createFrameAppearance();\n  if (param && param.focusedFrameOnly) {\n    apr.focusedFrameOnly = param.focusedFrameOnly;\n  }\n\n  if (presetStyles[presetName]) {\n    var styleObj = presetStyles[presetName];\n    var appearanceParam = null;\n\n    if (param && param.appearanceParam) {\n      appearanceParam = param.appearanceParam;\n    }\n\n    return styleObj.getStyle(apr, appearanceParam);\n  }\n\n  console.error('[JSFrame] Preset appearance \"' + presetName + '\" not found.');\n  return apr;\n};\n\nJSFrame.prototype.showToast = function(model) {\n  if (!model) {\n    return;\n  }\n\n  var me = this;\n  var toastHeight = 60;\n  var toastWidth = 260;\n  var openCloseDurationMs = 300;\n  var stayDurationMs = 1000;\n  var startY = window.innerHeight - 10 - toastHeight / 2;\n  var endY = window.innerHeight - 20 - toastHeight / 2;\n  var myHtml = '';\n  var showButton = false;\n  var style = {\n    borderRadius: '10px',\n    background: 'rgba(0,0,0,0.8)',\n  };\n\n  if (model.style) {\n    style = model.style;\n  }\n  if (model.height) {\n    toastHeight = model.height;\n  }\n  if (model.width) {\n    toastWidth = model.width;\n  }\n  if (model.duration) {\n    stayDurationMs = model.duration;\n  }\n  if (model.align) {\n\n    if (model.align == 'top') {\n      startY = 10 + toastHeight / 2;\n      endY = 20 + toastHeight / 2;\n    } else if (model.align == 'center') {\n      startY = window.innerHeight / 2;\n      endY = window.innerHeight / 2;\n    } else {\n      //bottom\n    }\n  }\n  if (model.html) {\n    myHtml = model.html;\n  }\n  if (model.text) {\n    myHtml = model.text;\n  }\n  if (model.closeButton == true) {\n    showButton = true;\n  } else {\n    showButton = false;\n  }\n\n\n  var apr = me.createPresetStyle('toast');\n\n  if (style.borderRadius) {\n    apr.frameBorderRadius = style.borderRadius;\n  }\n\n  if (model.closeButtonColor) {\n    apr.captionClor = model.closeButtonColor;\n\n  }\n\n\n  var frame = me.create({\n    name: 'toast_' + me.generateUUID(),\n    width: toastWidth, height: toastHeight,\n    movable: false,\n    resizable: false,\n    appearance: apr,\n    style: style,\n    html: '<div id=\"my_element\" style=\"box-sizing:border-box;display: flex;justify-content: center;align-items: center;padding:10px;font-size:16px;color:darkgray;height:' + (toastHeight) + 'px\">' +\n      myHtml +\n      '</div>'\n  });\n\n\n  if (showButton) {\n  } else {\n    frame.hideFrameComponent('closeButton');\n  }\n\n  var requestFocusAfterAnimation = false;\n\n  var startX = window.innerWidth / 2;\n\n  if (me.hAlign == 'right') {\n    startX = -startX;// -500;\n  }\n\n  if (me.vAlign == 'bottom') {\n    startY = startY - window.innerHeight;\n    endY = endY - window.innerHeight;\n  }\n\n\n  var animator = me.createAnimator();\n  animator.set(frame)\n    .setDuration(openCloseDurationMs)\n    .fromPosition(startX, startY, 'CENTER_CENTER')\n    .toPosition(startX, endY, 'CENTER_CENTER')\n    .toAlpha(1.0)\n    .fromAlpha(0.0)\n    .start(0, requestFocusAfterAnimation)\n    .then(function(animatorObj) {\n      return animatorObj\n        .setDuration(openCloseDurationMs)\n        .fromPosition(startX, endY, 'CENTER_CENTER')\n        .toPosition(startX, startY, 'CENTER_CENTER')\n        .fromAlpha(1.0)\n        .toAlpha(0.5)\n        .start(stayDurationMs, requestFocusAfterAnimation);\n    })\n    .then(function(animatorObj) {\n      var _frame = animatorObj.get();\n      _frame.closeFrame();\n    });\n\n};\n\n/**\n * end of FrameManager class\n */\n\n\nObject.freeze(DEF);\n\nmodule.exports = JSFrame;\n"
  },
  {
    "path": "src/appearance/CButtonAppearance.js",
    "content": "function CTextButtonAppearance() {\n\n  var crossMark0 = '\\u274c';\n\n  this.size = 14;\n  this.width = null;\n  this.height = null;\n\n  //border\n  this.borderRadius = 2;\n  this.borderWidth = 0;\n  this.borderColorDefault = '#aaaaaa';\n  this.borderColorFocused = this.borderColorDefault;\n  this.borderColorHovered = null;\n  this.borderColorPressed = this.borderColorDefault;\n\n  this.borderStyleDefault = 'solid';\n  this.borderStyleFocused = this.borderStyleDefault;\n  this.borderStyleHovered = null;\n  this.borderStylePressed = this.borderStyleDefault;\n\n  this.backgroundBoxShadow = null;\n\n\n  //background\n  this.backgroundColorDefault = 'transparent';\n  this.backgroundColorFocused = this.backgroundColorDefault;\n  this.backgroundColorHovered = null;\n  this.backgroundColorPressed = this.backgroundColorDefault;\n\n  //caption\n  this.caption = null;\n  this.captionColorDefault = 'white';\n  this.captionColorFocused = this.captionColorDefault;\n  this.captionColorHovered = null;\n  this.captionColorPressed = this.captionColorDefault;\n  this.captionShiftYpx = 0;\n  this.captionFontRatio = 1.0;\n\n\n}\nmodule.exports = CTextButtonAppearance;"
  },
  {
    "path": "src/appearance/CChildMenuAppearance.js",
    "content": "function CChildMenuAppearance(model) {\n  this.childMenuHTML = '';\n  this.childMenuWidth = 0;\n  this.childMenuAlign = 'LEFT';// off set position from parent frameComponent \"LEFT\" \"RIGHT\" \"CENTER\"\n  this.yOffset = 0;\n  this.xOffset = 0;\n}\n\nmodule.exports = CChildMenuAppearance;"
  },
  {
    "path": "src/appearance/CDomPartsBuilder.js",
    "content": "var mergeDeeply = require('merge-deeply');\nvar CTextButtonAppearance = require('./CButtonAppearance.js');\nvar CImageButtonAppearance = require('./CImageButtonAppearance.js');\nvar CChildMenuAppearance = require('./CChildMenuAppearance.js');\n\n/**\n * CDomPartsBuilder class\n * Easy to build a beautiful or typical dom parts(htmlElement)\n * @constructor\n */\nfunction CDomPartsBuilder() {\n}\n\nCDomPartsBuilder.prototype.buildChildMenuAppearance = function(frameAppearance) {\n  return new CChildMenuAppearance(frameAppearance);\n};\nCDomPartsBuilder.prototype.buildTextButtonAppearance = function(src) {\n  if (src) {\n    var result = mergeDeeply({ op: 'clone', object1: src, concatArray: true });\n    return result;\n  } else {\n    return new CTextButtonAppearance();\n  }\n};\nCDomPartsBuilder.prototype.buildImageButtonAppearance = function(src) {\n  if (src) {\n    var clonedImageButtonAppearance = mergeDeeply({ op: 'clone', object1: src });\n    return clonedImageButtonAppearance;\n  } else {\n    return new CImageButtonAppearance();\n  }\n};\n\nCDomPartsBuilder.prototype.buildButton = function(btnAppearance) {\n  var me = this;\n  return me.buildTextButton(btnAppearance);\n};\n\nCDomPartsBuilder.prototype.appendChildMenuTo = function(childMenuAppearance, parentEle) {\n  var me = this;\n  var ndiv = document.createElement('div');\n  ndiv.classList.add('jsframe-child-menu');\n  ndiv.innerHTML = childMenuAppearance.childMenuHTML;\n  ndiv.style.position = 'absolute';\n  ndiv.style.pointerEvents = 'none';\n  ndiv.style.width = childMenuAppearance.childMenuWidth + 'px';\n  // ndiv.style.top = childMenuAppearance.childMenuTop + 'px';\n  // ndiv.style.left = childMenuAppearance.childMenuLeft + 'px';\n  ndiv.style.display = 'none';\n\n  var posX = childMenuAppearance.xOffset;\n  var posY = parseInt(parentEle.style.height, 10) + childMenuAppearance.yOffset + 2;\n\n  if (childMenuAppearance.childMenuAlign === 'LEFT') {\n    ndiv.style.left = posX + 'px';\n  } else if (childMenuAppearance.childMenuAlign === 'RIGHT') {\n    ndiv.style.right = posX + 'px';\n  } else if (childMenuAppearance.childMenuAlign === 'CENTER') {\n    posX = -childMenuAppearance.childMenuWidth / 2 + parseInt(parentEle.style.height, 10) / 2;\n    ndiv.style.left = posX + 'px';\n  }\n  ndiv.style.top = posY + 'px';\n\n  // ndiv.style.pointerEvents is none to avoid referring clicks to extra areas.\n  // But we want its children to be responsive, so we set pointerEvents to auto\n  ndiv.firstChild.style.pointerEvents = 'auto';\n\n  parentEle.appendChild(ndiv);\n  //return ndiv;\n};\n\n\n/**\n * Creates an actual DOM element from the specified appearance\n * @param btnAppearance\n * @returns {HTMLDivElement}\n */\nCDomPartsBuilder.prototype.buildTextButton = function(btnAppearance) {\n\n  var size = btnAppearance.size;\n  var width = size;\n  var height = size;\n\n  if (btnAppearance.width != null) {\n    width = btnAppearance.width;\n  }\n\n  if (btnAppearance.height != null) {\n    height = btnAppearance.height;\n  }\n\n\n  var divElement = document.createElement('div');\n\n  //border\n  var borderWidth = btnAppearance.borderWidth;\n  var borderRadius = btnAppearance.borderRadius;\n\n  var borderColorDefault = btnAppearance.borderColorDefault;\n  var borderColorFocused = btnAppearance.borderColorFocused;\n  var borderColorHovered = btnAppearance.borderColorHovered;\n  var borderColorPressed = btnAppearance.borderColorPressed;\n\n  var borderStyleDefault = btnAppearance.borderStyleDefault;\n  var borderStyleFocused = btnAppearance.borderStyleFocused;\n  var borderStyleHovered = btnAppearance.borderStyleHovered;\n  var borderStylePressed = btnAppearance.borderStylePressed;\n\n  //background\n  var backgroundColorDefault = btnAppearance.backgroundColorDefault;\n  var backgroundColorFocused = btnAppearance.backgroundColorFocused;\n  var backgroundColorHovered = btnAppearance.backgroundColorHovered;\n  var backgroundColorPressed = btnAppearance.backgroundColorPressed;\n\n  var backgroundBoxShadow = btnAppearance.backgroundBoxShadow;\n\n  var fa = btnAppearance.fa;\n\n  //caption\n  var caption = btnAppearance.caption;\n  var btnImageDefault = btnAppearance.imageDefault;\n  var btnImageFocused = btnAppearance.imageFocused;\n  var btnImageHovered = btnAppearance.imageHovered;\n  var btnImagePressed = btnAppearance.imagePressed;\n\n  //prevent to catch mouse events\n  if (btnImageDefault) {\n    btnImageDefault.style.pointerEvents = 'none';\n  }\n  if (btnImageFocused) {\n    btnImageFocused.style.pointerEvents = 'none';\n  }\n  if (btnImageHovered) {\n    btnImageHovered.style.pointerEvents = 'none';\n  }\n  if (btnImagePressed) {\n    btnImagePressed.style.pointerEvents = 'none';\n  }\n\n  var _captionColorDefault = btnAppearance.captionColorDefault;\n  var captionColorFocused = btnAppearance.captionColorFocused;\n  var captionColorHovered = btnAppearance.captionColorHovered;\n  var captionColorPressed = btnAppearance.captionColorPressed;\n\n  var captionShiftYpx = btnAppearance.captionShiftYpx;\n  var captionFontRatio = btnAppearance.captionFontRatio;\n\n  //Set whether parent frame has focus or not internally\n  divElement._hasFrameFocus = false;\n\n  //Set whether mouse is pressing or not internally.\n  divElement._isMouseDown = false;\n\n  divElement.style.position = 'absolute';\n\n  divElement.style.top = '0px';\n  divElement.style.left = '0px';\n  divElement.style.width = (width) + 'px';\n  divElement.style.height = (height) + 'px';\n\n  if (btnAppearance.cursor) {\n    divElement.style.cursor = btnAppearance.cursor;\n  } else {\n    divElement.style.cursor = 'pointer';\n  }\n  divElement.style.margin = '0px';\n  divElement.style.padding = '0px';\n  //added for preventing bootstrap.css pollution\n  divElement.style.boxSizing = 'content-box';\n  divElement.style.fontFamily = 'sans-serif';\n\n  divElement.onmousedown = function(e) {\n    divElement._isMouseDown = true;\n    divElement._handleFocusDrawing('onmousedown');\n  };\n\n  divElement.onmouseout = function(e) {\n    divElement._isMouseDown = false;\n    divElement._handleFocusDrawing('onmouseout');\n  };\n\n  divElement.onmouseover = function(e) {\n    divElement._handleHoverDrawing();\n  };\n\n  divElement.onmouseup = function(e) {\n    divElement._isMouseDown = false;\n    divElement._handleFocusDrawing('onmouseup');\n  };\n\n\n  /**\n   * The parent notifies that the parent's frame got focus\n   */\n  divElement._onTakeFocus = function() {\n    divElement._hasFrameFocus = true;\n    divElement._handleFocusDrawing('_onTakeFocus');\n  };\n\n  /**\n   * The parent notifies that the parent's frame has lost focus\n   */\n  divElement._onReleaseFocus = function() {\n\n    divElement._hasFrameFocus = false;\n    divElement._handleFocusDrawing('_onReleaseFocus');\n  };\n\n  /**\n   *  To handle 2x2 matrix.\n   *  (_hasFrameFocus true/false x _isMouseDown true/false)\n   */\n  divElement._handleFocusDrawing = function(evtName) {\n    if (divElement._hasFrameFocus) {\n      //When this element has focus\n\n      if (divElement._isMouseDown) {\n        //border\n        divElement.style.borderColor = borderColorPressed;\n        divElement.style.borderStyle = borderStylePressed;\n\n        //background\n        divElement.style.backgroundColor = backgroundColorPressed;\n\n        //caption\n        divElement.style.color = captionColorPressed;\n\n        if (btnImagePressed) {\n          // divElement.innerHTML = '';\n          // divElement.appendChild(btnImagePressed);\n          updateImage(btnImagePressed, divElement);\n        }\n      } else {\n        //border\n        divElement.style.borderColor = borderColorFocused;\n        divElement.style.borderStyle = borderStyleFocused;\n\n        //background\n        divElement.style.backgroundColor = backgroundColorFocused;\n\n        //caption\n        divElement.style.color = captionColorFocused;\n\n        if (btnImageFocused) {\n          // divElement.innerHTML = '';\n          // divElement.appendChild(btnImageFocused);\n          updateImage(btnImageFocused, divElement);\n        }\n      }\n\n    } else {\n      //When this element doesn't have focus\n      if (divElement._isMouseDown) {\n        //border\n        divElement.style.borderColor = borderColorPressed;\n        divElement.style.borderStyle = borderStylePressed;\n\n        //background\n        divElement.style.backgroundColor = backgroundColorPressed;\n\n        //caption\n        divElement.style.color = captionColorPressed;\n\n        if (btnImagePressed) {\n          // divElement.innerHTML = '';\n          // divElement.appendChild(btnImagePressed);\n          updateImage(btnImagePressed, divElement);\n        }\n\n      } else {\n\n        //border\n        divElement.style.borderColor = borderColorDefault;\n        divElement.style.borderStyle = borderStyleDefault;\n\n        //background\n        divElement.style.backgroundColor = backgroundColorDefault;\n\n        //caption\n        divElement.style.color = _captionColorDefault;\n\n        if (btnImageDefault) {\n          // divElement.innerHTML = '';\n          // divElement.appendChild(btnImageDefault);\n          updateImage(btnImageDefault, divElement);\n        }\n      }\n    }\n  };\n\n  divElement._handleHoverDrawing = function() {\n\n    if (divElement._hasFrameFocus) {\n      //When this element has focus\n    } else {\n      //When this element doesn't have focus\n    }\n    //border\n    if (borderColorHovered) {\n      divElement.style.borderColor = borderColorHovered;\n    }\n    if (borderStyleHovered) {\n      divElement.style.borderStyle = borderStyleHovered;\n    }\n\n    //background\n    if (backgroundColorHovered) {\n      divElement.style.backgroundColor = backgroundColorHovered;\n    }\n\n    if (captionColorHovered) {\n      //caption\n      divElement.style.color = captionColorHovered;\n    }\n    if (btnImageHovered) {\n      // divElement.innerHTML = '';\n      // divElement.appendChild(btnImageHovered);\n      updateImage(btnImageHovered, divElement);\n    }\n  };\n  divElement.style.padding = '0px';\n\n  divElement.style.textAlign = 'center';\n  divElement.style.fontSize = (height * captionFontRatio) + 'px';\n\n  divElement.style.lineHeight = (height) + 'px';\n\n  divElement.style.borderWidth = '1px';\n\n  if (borderWidth != null) {\n    divElement.style.borderWidth = borderWidth + 'px';\n  }\n\n  if (backgroundBoxShadow != null) {\n    divElement.style.boxShadow = backgroundBoxShadow;\n  }\n\n  divElement.style.borderRadius = (borderRadius + parseInt(divElement.style.borderWidth)) + 'px';\n\n  var childMode = true;\n\n  if (childMode && btnImageDefault) {\n    // divElement.innerHTML = '';\n    // divElement.appendChild(btnImageDefault);\n    updateImage(btnImageDefault, divElement);\n  } else if (childMode && caption) {\n\n    var span = document.createElement('span');\n    //span.style.position='absolute';\n    span.style.width = '100%';\n    span.style.marginTop = captionShiftYpx + 'px';\n    span.style.display = 'inline-block';\n    span.style.textAlign = 'center';\n    span.style.fontFamily = 'sans-serif';\n    span.appendChild(document.createTextNode(caption));\n    divElement.appendChild(span);\n\n  } else if (childMode && fa) {\n\n    var span = document.createElement('span');\n    span.style.pointerEvents = 'none';\n    span.style.width = '100%';\n    span.style.marginTop = captionShiftYpx + 'px';\n    span.style.display = 'inline-block';\n    span.style.textAlign = 'center';\n    span.style.fontFamily = 'sans-serif';\n    span.innerHTML = '<i class=\"' + fa + '\"></i>';\n    divElement.appendChild(span);\n  } else if (!childMode && caption) {\n    divElement.style.paddingTop = captionShiftYpx + 'px';\n    divElement.appendChild(document.createTextNode(caption));\n  }\n\n  divElement._handleFocusDrawing();\n  return divElement;\n\n};\n\n// Don't use innerHTML='' because there may be a child below this 'img' element.\n// A child that may be a child is a childMenu.\nfunction updateImage(image, parentElement) {\n  var imgs = parentElement.querySelectorAll('img');\n  if (parentElement.firstChild) {\n    parentElement.insertBefore(image, parentElement.firstChild);\n  } else {\n    parentElement.appendChild(image);\n  }\n  for (var i = 0; i < imgs.length; i++) {\n    var img = imgs[i];\n    if (image !== img) {\n      parentElement.removeChild(img);\n    }\n  }\n}\n\n//+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-\n\n\n/**\n * end of CDomPartsBuilder class\n */\nmodule.exports = CDomPartsBuilder;\n"
  },
  {
    "path": "src/appearance/CFrameAppearance.js",
    "content": "var CDomPartsBuilder = require('./CDomPartsBuilder.js');\nvar CFrameComponent = require('./CFrameComponent.js');\n\n/**\n * CFrameAppearance class<br>\n * Appearance Model Class for Frame\n *\n */\nfunction CFrameAppearance() {\n\n  var me = this;\n\n  this.showTitleBar = true;\n  this.showCloseButton = true;\n  this.titleBarCaption = '';\n  this.titleBarCaptionFontSize = '12px';\n  this.titleBarCaptionFontWeight = 'bold';\n  this.titleBarHeight = '24px';\n  this.useIframe = false;\n  this.useFrame = true;\n\n  this.titleBarClassNameDefault=null;\n  this.titleBarClassNameFocused=null;\n\n  this.setUseIFrame = function(value) {\n    me.useIframe = value;\n    me.useFrame = !value;\n    return me;\n  };\n\n\n  /**\n   * The position from the left side of the caption. If this value is null, caption will be centered.\n   */\n  this.titleBarCaptionLeftMargin = '5px';\n\n  this.titleBarColorDefault = null;\n  this.titleBarColorFocused = null;\n  this.titleBarCaptionColorDefault = '';\n  this.titleBarCaptionColorFocused = '';\n  this.titleBarCaptionTextShadow = '0 1px 0 rgba(255,255,255,.7)';\n  this.titleBarCaptionTextAlign = 'center';\n\n  this.titleBarBorderBottomDefault = '1px solid rgba(0,0,0,0.2)';\n  this.titleBarBorderBottomFocused = null;\n\n  this.frameBorderRadius = '6px';\n\n  this.frameBorderWidthDefault = '1px';\n  this.frameBorderWidthFocused = this.frameBorderWidthDefault;\n\n  this.frameBorderColorDefault = 'rgba(1, 1, 1, 0.2)';\n  this.frameBorderColorFocused = this.frameBorderColorDefault;\n\n  this.frameBorderStyle = 'solid';\n  this.frameBoxShadow = '2px 3px 16px rgba(0,0,0,.6)';\n  this.frameBackgroundColor = 'transparent';\n\n  this._partsBuilder = null;\n\n  this.frameComponents = [];\n\n  this.frameHeightAdjust = 1;\n\n  this.resizeAreaWidth = 20;\n  this.resizeAreaHeight = 20;\n  this.resizeAreaOffset = 0;\n  this.resizeAreaVisible = false;\n\n  this.getFrameInnerBorderRadius = function(ref, hasFocus) {\n\n    if (!ref) {\n      return null;\n    }\n    if (hasFocus) {\n      return {\n        frameAppearance: me,\n        innerBorderRadius: (parseInt(ref.frameBorderRadius, 10) - parseInt(ref.frameBorderWidthFocused, 10)) + 'px'\n      };\n    }\n    return {\n      frameAppearance: me,\n      innerBorderRadius: (parseInt(ref.frameBorderRadius, 10) - parseInt(ref.frameBorderWidthDefault, 10)) + 'px'\n    };\n  };\n\n\n  this.onInitialize = function() {\n\n    //Add close button if needed\n    if (me.showCloseButton) {\n      var partsBuilder = me.getPartsBuilder(),\n        crossMark0 = '\\u274c',\n        crossMark1 = '\\u2716',\n        crossMark2 = '\\u274e';\n\n\n      var btnAppearance = partsBuilder.buildTextButtonAppearance();\n\n      btnAppearance.size = 14;\n      btnAppearance.captionShiftYpx = 0;\n      btnAppearance.captionFontRatio = 1.0;\n      btnAppearance.borderRadius = 2;\n      btnAppearance.backgroundColorPressed = 'transparent';\n      btnAppearance.backgroundColorDefault = 'transparent';\n      btnAppearance.caption = crossMark1;\n\n      btnAppearance.captionColorDefault = 'gray';\n      btnAppearance.captionColorFocused = 'gray';\n      btnAppearance.captionColorHovered = 'silver';\n      btnAppearance.captionColorPressed = 'black';\n\n      btnAppearance.borderWidth = 0;\n      btnAppearance.borderColorDefault = '#aaaaaa';\n      btnAppearance.borderStyle = 'solid';\n\n      var closeBtnEle = partsBuilder.buildTextButton(btnAppearance);\n      var eleLeft = -10;\n      var eleTop = -18;\n      var eleAlign = 'RIGHT_TOP';\n\n      //closeButton is a special name\n      var frameComponent = me.addFrameComponent('closeButton', closeBtnEle, eleLeft, eleTop, eleAlign);\n    }\n  };\n\n  this.onTitleBarStyleInitialize = function() {\n\n  };\n\n}\n\n\nCFrameAppearance.prototype.getPartsBuilder = function() {\n  var me = this;\n  if (me._partsBuilder === null) {\n    me._partsBuilder = new CDomPartsBuilder();\n  }\n  return me._partsBuilder;\n};\nCFrameAppearance.prototype.initialize = function() {\n  var me = this;\n  me.onInitialize();\n};\n\n/**\n *  Add FrameComponent into frame\n *  FrameComponent is attached to Frame and it moves with Frame.\n *\n * @param id\n * @param myDomElement DOM element.\n * @param x  Relative x coodinate from the snap position specified by alignment\n * @param y  Relative y coodinate from the snap position specified by alignment\n * @param align 'LEFT_TOP' 'CENTER_TOP' 'RIGHT_TOP' 'LEFT_CENTER' 'CENTER_CENTER' 'RIGHT_CENTER' 'LEFT_BOTTOM' 'CENTER_BOTTOM' 'RIGHT_BOTTOM'\n * @returns {CFrameComponent}\n *\n */\nCFrameAppearance.prototype.addFrameComponent = function(id, myDomElement, x, y, align, extra) {\n\n  //(id, frame, htmlElement, x, y, align)\n  var frameComponent = new CFrameComponent(id, myDomElement, x, y, align, extra);\n\n  if (myDomElement._onTakeFocus && myDomElement._onReleaseFocus) {\n    //if this DOM element has special method for focus\n    //set focus callback\n    frameComponent.setFocusCallback(myDomElement._onTakeFocus, myDomElement._onReleaseFocus);\n  }\n\n  this.frameComponents.push(frameComponent);\n\n  return frameComponent;\n};\n\n\n//+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-\n\n/**\n *  End of CFrameAppearance class\n */\nmodule.exports = CFrameAppearance;\n"
  },
  {
    "path": "src/appearance/CFrameComponent.js",
    "content": "var CALIGN = require('../CCommon.js');\n/**\n * CFrameComponent class\n * <p>\n * Wrapped DOM element like 'div' to display above the frame<br>\n *\n * ex.An object such as closeButton\n *\n * @param id\n * @param frame\n * @param htmlElement DOM-element\n * @param x relative x-position in the frame respect to align\n * @param y relative y-position in the frame respect to align\n * @param align relative alignment in the frame\n * @constructor\n */\nfunction CFrameComponent(id, htmlElement, x, y, align, extra) {\n  var me = this;\n\n  me.id = id;\n  me.x = x;\n  me.y = y;\n  me.frame = null;\n\n  me._focusTakingCallabck = null;\n  me._focusReleasingCallabck = null;\n\n  if (align) {\n    me.frameComponentAlign = align;\n  } else {\n    me.frameComponentAlign = CALIGN.LEFT_TOP;\n  }\n  me.htmlElement = htmlElement;\n  me.htmlElement.style.zIndex = 50;\n  me.htmlElement.setAttribute('component-id', id);\n\n  if (extra && extra.childMenu) {\n    me.childMenu = extra.childMenu;\n  } else if (htmlElement.querySelector('.jsframe-child-menu')) {\n    me.childMenu = htmlElement.querySelector('.jsframe-child-menu');\n  }\n\n}\n\nCFrameComponent.prototype.setFocusCallback = function(focusTakingCallback, focusReleasingCallback) {\n  var me = this;\n  me._focusTakingCallabck = focusTakingCallback;\n  me._focusReleasingCallabck = focusReleasingCallback;\n};\n\n/**\n * Set parent frame of this frameComponent\n * @param frame\n */\nCFrameComponent.prototype.setFrame = function(frame) {\n  var me = this;\n\n  me.frame = frame;\n  me.htmlElement.parentObject = frame;\n  me.updateAlign();\n};\n\n/**\n * Place the FrameComponent relative to the parent's frame.\n * Relocate relative to parent frame when window resize event occurs\n */\nCFrameComponent.prototype.updateAlign = function() {\n\n  var me = this;\n\n  var frameComponentAlign = me.frameComponentAlign;\n\n  var frame = me.frame;\n  var eleStyle = me.htmlElement.style;\n  eleStyle.userSelect = 'none';\n\n  var x = me.x;\n  var y = me.y;\n\n  var frameWidth = frame.getWidth();\n  var frameHeight = frame.getHeight();\n  var eleStyleWidth = eleStyle.width;\n  var eleStyleHeight = eleStyle.height;\n\n  if (CALIGN.LEFT_TOP == frameComponentAlign) {\n    eleStyle.left = x + 'px';\n    eleStyle.top = y + 'px';\n  } else if (CALIGN.HCENTER_TOP == frameComponentAlign) {\n    eleStyle.left = (parseInt(frameWidth) / 2 - parseInt(eleStyleWidth) / 2 + x) + 'px';\n    eleStyle.top = y + 'px';\n  } else if (CALIGN.RIGHT_TOP == frameComponentAlign) {\n    eleStyle.left = (parseInt(frameWidth) - parseInt(eleStyleWidth) + x) + 'px';\n    eleStyle.top = y + 'px';\n  } else if (CALIGN.LEFT_VCENTER == frameComponentAlign) {\n    eleStyle.left = x + 'px';\n    eleStyle.top = (parseInt(frameHeight) / 2 - parseInt(eleStyleHeight) / 2 + y) + 'px';\n  } else if (CALIGN.HCENTER_VCENTER == frameComponentAlign) {\n    eleStyle.left = (parseInt(frameWidth) / 2 - parseInt(eleStyleWidth) / 2 + x) + 'px';\n    eleStyle.top = (parseInt(frameHeight) / 2 - parseInt(eleStyleHeight) / 2 + y) + 'px';\n  } else if (CALIGN.RIGHT_VCENTER == frameComponentAlign) {\n    eleStyle.left = (parseInt(frameWidth) - parseInt(eleStyleWidth) + x) + 'px';\n    eleStyle.top = (parseInt(frameHeight) / 2 - parseInt(eleStyleHeight) / 2 + y) + 'px';\n  } else if (CALIGN.LEFT_BOTTOM == frameComponentAlign) {\n    eleStyle.left = x + 'px';\n    eleStyle.top = (parseInt(frameHeight) - parseInt(eleStyleHeight) + y) + 'px';\n  } else if (CALIGN.HCENTER_BOTTOM == frameComponentAlign) {\n    eleStyle.left = (parseInt(frameWidth) / 2 - parseInt(eleStyleWidth) / 2 + x) + 'px';\n    eleStyle.top = (parseInt(frameHeight) - parseInt(eleStyleHeight) + y) + 'px';\n  } else if (CALIGN.RIGHT_BOTTOM == frameComponentAlign) {\n    eleStyle.left = (parseInt(frameWidth) - parseInt(eleStyleWidth) + x) + 'px';\n    eleStyle.top = (parseInt(frameHeight) - parseInt(eleStyleHeight) + y) + 'px';\n  }\n};\n\nCFrameComponent.prototype.handleTakingFocus = function() {\n  var me = this;\n  if (me._focusTakingCallabck) {\n    me._focusTakingCallabck();\n  }\n};\n\nCFrameComponent.prototype.handleReleasingFocus = function() {\n  var me = this;\n  if (me._focusReleasingCallabck) {\n    me._focusReleasingCallabck();\n  }\n};\n\n/**\n * end of CFrameComponent class\n */\n\nmodule.exports = CFrameComponent;\n"
  },
  {
    "path": "src/appearance/CImageButtonAppearance.js",
    "content": "var inherit = require('../utils/Inherit.js')\nvar CTextButtonAppearance = require('./CButtonAppearance.js');\n\ninherit(CImageButtonAppearance, CTextButtonAppearance);\n\nfunction CImageButtonAppearance() {\n\n\n  this.imageDefault = null;\n  this.imageHovered = null;\n  this.imagePressed = null;\n  this.imageFocused = null;\n\n  this.imageStore = {};\n}\n\nCImageButtonAppearance.prototype._setImage = function(src, width, height) {\n  var me = this;\n\n  var storedImgEle = me.imageStore[src];\n\n  if (storedImgEle) {\n    return storedImgEle;\n  } else {\n    var imgEle = document.createElement('img');\n    imgEle.src = src;\n    if (width && height) {\n      var imgWidth = width;\n      var imgHeight = height;\n      var imgStyle = 'margin:0px;padding:0px;width:' + imgWidth + 'px;height:' + imgHeight + 'px';\n      imgEle.setAttribute('style', imgStyle);\n    }\n    me.imageStore[src] = imgEle;\n\n    return imgEle;\n  }\n}\nCImageButtonAppearance.prototype.setSrc = function(model) {\n  var me = this;\n  if (model.default) {\n    me.imageDefault = me._setImage(model.default, model.width, model.height);\n  }\n  if (model.hovered) {\n    me.imageHovered = me._setImage(model.hovered, model.width, model.height);\n  }\n  if (model.pressed) {\n    me.imagePressed = me._setImage(model.pressed, model.width, model.height);\n  }\n  if (model.focused) {\n    me.imageFocused = me._setImage(model.focused, model.width, model.height);\n  }\n}\n\nmodule.exports = CImageButtonAppearance;"
  },
  {
    "path": "src/index.js",
    "content": "//export { default as JSFrame } from './JSFrame.js';\nmodule.exports = {\n  JSFrame: require('./JSFrame')\n}\n\n"
  },
  {
    "path": "src/presets/appearance/PresetStyleMaterial.css",
    "content": ".jsframe-preset-style-material-default {\n    background: black;\n    border-top-left-radius: 6px;\n    border-top-right-radius: 6px;\n}\n\n.jsframe-preset-style-material-focused {\n    background: black;\n    border-top-left-radius: 36px;\n    border-top-right-radius: 36px;\n}\n"
  },
  {
    "path": "src/presets/appearance/PresetStyleMaterial.js",
    "content": "require('./PresetStyleMaterial.css');\nvar ObjectAssigner = require('../../utils/ObjectAssigner.js');\n\n\nfunction getStyle(fApr, userParam) {\n\n    var srcParam = {\n        border: {\n            color: 'transparent',\n            width: 0,\n            radius: 6,\n\n        },\n        control: {\n            maximizeWithoutTitleBar: false,\n            restoreKey: 'Escape',\n        },\n        titleBar: {\n            color: 'white',\n            background: 'black',\n            leftMargin: 20,\n            height: 30,\n            fontSize: 12,\n            buttonWidth: 36,\n            buttonHeight: 16,\n            buttonColor: 'white',\n            buttons: [\n                {\n                    fa: 'fas fa-times',\n                    name: 'closeButton',\n                    visible: true\n                },\n                {\n                    fa: 'far fa-window-maximize',\n                    name: 'maximizeButton',\n                    visible: true\n                },\n                {\n                    fa: 'far fa-window-restore',\n                    name: 'restoreButton',\n                    visible: false\n                },\n                {\n                    fa: 'far fa-window-minimize',\n                    name: 'minimizeButton',\n                    visible: true\n                },\n                {\n                    fa: 'fas fa-caret-up',\n                    name: 'deminimizeButton',\n                    visible: false\n                }\n\n            ],\n            buttonsOnLeft: [],\n        },\n\n\n    };\n\n    var param = srcParam;\n\n    if (userParam) {\n        //param=Object.assign({},srcParam, userParam);\n        ObjectAssigner.objectAssign(srcParam, userParam);\n\n    }\n\n\n    fApr.showTitleBar = true;\n    fApr.showCloseButton = true;\n\n    fApr.titleBarCaptionFontSize = param.titleBar.fontSize + 'px';//'12px';\n    fApr.titleBarCaptionFontWeight = 'normal';\n    fApr.titleBarCaptionLeftMargin = param.titleBar.leftMargin + 'px';\n    fApr.titleBarCaptionColorDefault = param.titleBar.color;\n    fApr.titleBarCaptionColorFocused = param.titleBar.color;\n    fApr.titleBarCaptionTextShadow = null;\n    fApr.titleBarCaptionTextAlign = 'left';\n\n    fApr.titleBarHeight = param.titleBar.height + 'px';// '50px';\n\n    fApr.titleBarColorDefault = param.titleBar.background;\n    fApr.titleBarColorFocused = param.titleBar.background;\n\n    fApr.titleBarBorderBottomDefault = 'solid 0px #aaaaaa';\n    fApr.titleBarBorderBottomFocused = 'solid 0px #1883d7';\n\n    fApr.frameBorderRadius = param.border.radius + 'px';// '6px';\n\n    //border width\n    fApr.frameBorderWidthDefault = param.border.width + 'px';\n    fApr.frameBorderWidthFocused = param.border.width + 'px';\n\n\n    //border color\n    fApr.frameBorderColorDefault = param.border.color;\n    fApr.frameBorderColorFocused = param.border.color;\n\n    fApr.frameBorderStyle = 'solid';\n\n    //window shadow\n    fApr.frameBoxShadow = param.border.shadow;//'2px 2px 10px  rgba(0, 0, 0, 0.5)';\n\n    fApr.frameBackgroundColor = 'transparent';\n\n    fApr.frameComponents = new Array();\n\n    fApr.frameHeightAdjust = 0;//default is 1\n\n    fApr.getTitleBarStyle = function () {\n\n        if (fApr.focusedFrameOnly) {\n            return {\n                titleBarClassNameDefault: ' ',\n                titleBarClassNameFocused: ' '\n            };\n        } else {\n            return {\n                titleBarClassNameDefault: ' ',\n                titleBarClassNameFocused: ' '\n            };\n        }\n    };\n\n    fApr.onInitialize = function () {\n\n        alignButtons(fApr, param, false);\n        alignButtons(fApr, param, true);\n\n    };\n\n    //\n\n    return fApr;\n}\n\nfunction alignButtons(fApr, param, fromLeft) {\n    var partsBuilder = fApr.getPartsBuilder();\n    var rbtX = 0;\n    var buttons;\n\n    if (fromLeft) {\n        buttons = param.titleBar.buttonsOnLeft;\n\n    } else {\n        buttons = param.titleBar.buttons;\n    }\n\n    for (var rbtIdx in buttons) {\n\n        var rbtSrc = buttons[rbtIdx];\n\n        var rbt = partsBuilder.buildTextButtonAppearance();\n\n        //caption\n        rbt.fa = rbtSrc.fa;\n\n        rbt.width = param.titleBar.buttonWidth;\n        rbt.height = param.titleBar.buttonHeight;\n\n        rbt.borderRadius = 0;\n        rbt.borderWidth = 0;\n\n        rbt.borderColorDefault = '#c6c6c6';\n        rbt.borderColorFocused = '#fc615c';\n        rbt.borderColorHovered = rbt.borderColorFocused;\n        rbt.borderColorPressed = '#e64842';\n\n        rbt.borderStyleDefault = 'solid';\n        rbt.borderStyleFocused = rbt.borderStyleDefault;\n        rbt.borderStyleHovered = rbt.borderStyleDefault;\n        rbt.borderStylePressed = rbt.borderStyleDefault;\n\n        //background\n        rbt.backgroundColorDefault = 'transparent';\n        rbt.backgroundColorFocused = 'transparent';\n        rbt.backgroundColorHovered = 'transparent';\n        rbt.backgroundColorPressed = 'transparent';\n\n        var colors = getSubColor(param.titleBar.buttonColor);\n\n        rbt.captionColorDefault = param.titleBar.buttonColor;\n        rbt.captionColorFocused = param.titleBar.buttonColor;\n        rbt.captionColorHovered = colors.hovered;\n        rbt.captionColorPressed = colors.pressed;\n\n        rbt.captionShiftYpx = 0;\n        rbt.captionFontRatio = 1;\n\n        var rbtEle = partsBuilder.buildTextButton(rbt);\n\n        if (rbtSrc.visible) {\n            rbtEle.style.display = 'flex';\n        } else {\n            if (fromLeft) {\n                rbtX -= param.titleBar.buttonWidth;\n            } else {\n                rbtX += param.titleBar.buttonWidth;\n            }\n            rbtEle.style.display = 'none';\n        }\n\n        var titleBarHeight = parseInt(fApr.titleBarHeight);\n\n        var rbtEleLeft = rbtX;\n\n        //compute vertical center\n\n        var rbtEleTop = -titleBarHeight + (titleBarHeight - rbt.height) / 2;\n\n        var rbtEleAlign;\n        if (fromLeft) {\n            rbtEleAlign = 'LEFT_TOP';\n        } else {\n            rbtEleAlign = 'RIGHT_TOP';\n        }\n\n        var ndiv;\n        if (rbtSrc.childMenuHTML) {\n\n            ndiv = document.createElement('div');\n            ndiv.id = rbtSrc.name + '_child_menu';\n\n            ndiv.innerHTML = rbtSrc.childMenuHTML;\n            ndiv.style.position = 'absolute';\n            ndiv.style.width = (rbtSrc.childMenuWidth ? rbtSrc.childMenuWidth : 200) + 'px';\n            ndiv.style.top = (parseInt(rbtEle.style.top, 10) + parseInt(rbtEle.style.height, 10) / 2 + titleBarHeight / 2) + 'px';\n            ndiv.style.left = rbtEle.style.left;\n            ndiv.style.display = 'none';\n\n            rbtEle.appendChild(ndiv);\n        }\n\n\n        fApr.addFrameComponent(rbtSrc.name, rbtEle, rbtEleLeft, rbtEleTop, rbtEleAlign, {childMenu: ndiv});\n\n        if (fromLeft) {\n            rbtX += param.titleBar.buttonWidth;\n        } else {\n            rbtX += -param.titleBar.buttonWidth;\n        }\n\n    }\n}\n\n\nfunction getSubColor(color) {\n\n    var canvas = document.createElement('canvas');\n    canvas.height = 1;\n    canvas.width = 1;\n\n    try {\n        var ctx = canvas.getContext('2d');\n        if (ctx) {\n            ctx.fillStyle = color;\n            ctx.fillRect(0, 0, 1, 1);\n            var colorData = ctx.getImageData(0, 0, 1, 1).data;\n\n            var r = colorData[0];\n            var g = colorData[1];\n            var b = colorData[2];\n            var alpha = colorData[3] / 255;\n            var alpha2 = alpha * 0.85;\n            var alpha3 = alpha * 0.75;\n\n            var ret = 'rgb(' + r + ',' + g + ',' + b + ',' + alpha2 + ')';\n            var ret2 = 'rgb(' + r + ',' + g + ',' + b + ',' + alpha2 + ')';\n            var ret3 = 'rgb(' + r + ',' + g + ',' + b + ',' + alpha3 + ')';\n            return {src: ret, hovered: ret2, pressed: ret3};\n        } else {\n            return {src: 'rgb(255,255,255,0.85)', hovered: 'rgb(255,255,255,0.85)', pressed: 'rgb(255,255,255,0.75)'};\n        }\n    } catch (e) {\n        return {src: 'rgb(255,255,255,0.85)', hovered: 'rgb(255,255,255,0.85)', pressed: 'rgb(255,255,255,0.75)'};\n    }\n}\n\n\nmodule.exports.getStyle = getStyle;\n"
  },
  {
    "path": "src/presets/appearance/PresetStylePopup.css",
    "content": ".jsframe-preset-style-popup-default {\n    background: white;\n    border-top-left-radius: 0px;\n    border-top-right-radius: 0px;\n}\n\n.jsframe-preset-style-popup-focused {\n    background: white;\n    border-top-left-radius: 0px;\n    border-top-right-radius: 0px;\n}\n"
  },
  {
    "path": "src/presets/appearance/PresetStylePopup.js",
    "content": "require('./PresetStylePopup.css');\n\nfunction getStyle(fApr) {\n\n\n  fApr.showTitleBar = false;\n  fApr.showCloseButton = true;\n\n\n  fApr.titleBarCaptionFontSize = '12px';\n  fApr.titleBarCaptionFontWeight = 'normal';\n  fApr.titleBarCaptionLeftMargin = '10px';\n  fApr.titleBarCaptionColorDefault = '#4d494d';\n  fApr.titleBarCaptionColorFocused = '#4d494d';\n\n  fApr.titleBarHeight = '5px';\n\n  fApr.titleBarColorDefault = 'white';\n  fApr.titleBarColorFocused = 'white';\n\n  fApr.titleBarBorderBottomDefault = null;\n  fApr.titleBarBorderBottomFocused = null;\n\n  fApr.frameBorderRadius = '6px';\n\n  //border width\n  fApr.frameBorderWidthDefault = '1px';\n  fApr.frameBorderWidthFocused = '1px';\n\n\n  //border color\n  fApr.frameBorderColorDefault = '#aaaaaa';\n  fApr.frameBorderColorFocused = '#aaaaaa';\n\n  fApr.frameBorderStyle = 'solid';\n\n  //window shadow\n  fApr.frameBoxShadow = '2px 2px 5px  rgba(0, 0, 0, 0.5)';\n\n  fApr.frameBackgroundColor = 'white';\n\n\n  fApr.frameComponents = new Array();\n\n  //adjustment value\n  fApr.frameHeightAdjust = 2;//default is 1\n  fApr.getTitleBarStyle = function() {\n\n    if (fApr.focusedFrameOnly) {\n      return {\n        titleBarClassNameDefault: 'jsframe-preset-style-popup-focused',\n        titleBarClassNameFocused: 'jsframe-preset-style-popup-focused'\n      };\n    } else {\n      return {\n        titleBarClassNameDefault: 'jsframe-preset-style-popup-default',\n        titleBarClassNameFocused: 'jsframe-preset-style-popup-focused'\n      };\n    }\n  };\n  fApr.onInitialize = function() {\n\n\n    var partsBuilder = fApr.getPartsBuilder();\n\n\n    //configure close button appearance[begin]//////////////\n\n    var crossMark0 = '\\u274c';\n    var crossMark1 = '\\u2716';\n    var crossMark2 = '\\u274e';\n    var CROSS_MARK = crossMark1;\n\n\n    var cbApr = partsBuilder.buildTextButtonAppearance();\n\n    cbApr.width = 20;\n    cbApr.height = 20;\n\n\n    cbApr.borderRadius = 10;\n    cbApr.borderWidth = 1;\n\n    cbApr.borderColorDefault = '#cccccc';\n    cbApr.borderColorFocused = '#cccccc';\n    cbApr.borderColorHovered = '#dddddd';\n    cbApr.borderColorPressed = '#eeeeee';\n\n    cbApr.borderStyleDefault = 'solid';\n    cbApr.borderStyleFocused = cbApr.borderStyleDefault;\n    cbApr.borderStyleHovered = cbApr.borderStyleDefault;\n    cbApr.borderStylePressed = cbApr.borderStyleDefault;\n\n    //background\n    cbApr.backgroundColorDefault = 'white';\n    cbApr.backgroundColorFocused = 'white';\n    cbApr.backgroundColorHovered = '#eeeeee';\n    cbApr.backgroundColorPressed = '#dddddd';\n\n    cbApr.backgroundBoxShadow = '2px 2px 5px  rgba(0, 0, 0, 0.5)';\n\n    //caption\n    cbApr.caption = CROSS_MARK;\n\n    cbApr.captionColorDefault = 'black';\n    cbApr.captionColorFocused = 'black';\n    cbApr.captionColorHovered = 'white';\n    cbApr.captionColorPressed = 'white';\n\n    cbApr.captionShiftYpx = 1;\n    cbApr.captionFontRatio = 0.6;\n\n    var closeBtnEle = partsBuilder.buildTextButton(cbApr);\n    var eleLeft = 10;\n    var eleTop = -6 - parseInt(fApr.titleBarHeight);\n    var eleAlign = 'RIGHT_TOP';\n\n    // 'closeButton' is a special name\n    fApr.addFrameComponent('closeButton', closeBtnEle, eleLeft, eleTop, eleAlign);\n\n    //configure close button appearance[end]//////////////\n\n\n  };\n  //\n\n  return fApr;\n\n\n}\n\n\nmodule.exports.getStyle = getStyle;\n"
  },
  {
    "path": "src/presets/appearance/PresetStyleRedstone.css",
    "content": ".jsframe-preset-style-redstone-default {\n    background: white;\n    border-top-left-radius: 0px;\n    border-top-right-radius: 0px;\n}\n\n.jsframe-preset-style-redstone-focused {\n    background: white;\n    border-top-left-radius: 0px;\n    border-top-right-radius: 0px;\n}\n"
  },
  {
    "path": "src/presets/appearance/PresetStyleRedstone.js",
    "content": "require('./PresetStyleRedstone.css');\n\nfunction getStyle(fApr) {\n\n  fApr.showTitleBar = true;\n  fApr.showCloseButton = true;\n\n  fApr.titleBarCaptionFontSize = '12px';\n  fApr.titleBarCaptionFontWeight = 'normal';\n  fApr.titleBarCaptionLeftMargin = '10px';\n  fApr.titleBarCaptionColorDefault = '#9b9a9b';\n  fApr.titleBarCaptionColorFocused = '#4d494d';\n\n  fApr.titleBarHeight = '30px';\n\n  fApr.titleBarColorDefault = null;\n  fApr.titleBarColorFocused = null;\n\n  fApr.titleBarBorderBottomDefault = 'solid 1px #aaaaaa';\n  fApr.titleBarBorderBottomFocused = 'solid 1px #1883d7';\n\n  fApr.frameBorderRadius = '0px';\n\n  //border width\n  fApr.frameBorderWidthDefault = '1px';\n  fApr.frameBorderWidthFocused = '1px';\n\n\n  //border color\n  fApr.frameBorderColorDefault = '#aaaaaa';\n  fApr.frameBorderColorFocused = '#1883d7';\n\n  fApr.frameBorderStyle = 'solid';\n\n  //window shadow\n  fApr.frameBoxShadow = null;\n\n  fApr.frameBackgroundColor = 'transparent';\n\n\n  fApr.frameComponents = new Array();\n\n  //adjustment value\n  fApr.frameHeightAdjust = 0;//default is 1\n\n  fApr.getTitleBarStyle = function() {\n\n    if (fApr.focusedFrameOnly) {\n      return {\n        titleBarClassNameDefault: 'jsframe-preset-style-redstone-focused',\n        titleBarClassNameFocused: 'jsframe-preset-style-redstone-focused'\n      };\n    } else {\n      return {\n        titleBarClassNameDefault: 'jsframe-preset-style-redstone-default',\n        titleBarClassNameFocused: 'jsframe-preset-style-redstone-focused'\n      };\n    }\n  };\n\n  fApr.onInitialize = function() {\n\n\n    var partsBuilder = fApr.getPartsBuilder();\n\n\n    {\n      //configure close button appearance[begin]//////////////\n\n      var CROSS_MARK = '\\u2573';\n\n      var cbApr = partsBuilder.buildTextButtonAppearance();\n\n      cbApr.width = 45;\n      cbApr.height = 28;\n\n\n      cbApr.borderRadius = 0;\n      cbApr.borderWidth = 0;\n\n      cbApr.borderColorDefault = '#c6c6c6';\n      cbApr.borderColorFocused = '#fc615c';\n      cbApr.borderColorHovered = cbApr.borderColorFocused;\n      cbApr.borderColorPressed = '#e64842';\n\n      cbApr.borderStyleDefault = 'solid';\n      cbApr.borderStyleFocused = cbApr.borderStyleDefault;\n      cbApr.borderStyleHovered = cbApr.borderStyleDefault;\n      cbApr.borderStylePressed = cbApr.borderStyleDefault;\n\n      //background\n      cbApr.backgroundColorDefault = 'white';\n      cbApr.backgroundColorFocused = 'white';\n      cbApr.backgroundColorHovered = '#e81123';\n      cbApr.backgroundColorPressed = '#f1707a';\n\n      //caption\n      cbApr.caption = CROSS_MARK;\n\n      cbApr.captionColorDefault = '#9b9a9b';\n      cbApr.captionColorFocused = 'black';\n      cbApr.captionColorHovered = 'white';\n      cbApr.captionColorPressed = 'white';\n\n      cbApr.captionShiftYpx = 1;\n      cbApr.captionFontRatio = 0.6;\n\n      var closeBtnEle = partsBuilder.buildTextButton(cbApr);\n      var eleLeft = 0;\n      var eleTop = -parseInt(fApr.titleBarHeight);\n      var eleAlign = 'RIGHT_TOP';\n\n      // 'closeButton' is a special name\n      fApr.addFrameComponent('closeButton', closeBtnEle, eleLeft, eleTop, eleAlign);\n\n      //configure close button appearance[end]//////////////\n    }\n\n    {\n      //configure close button appearance[begin]//////////////\n\n      var MAXIMIZE_MARK = '\\u2610';\n\n      var maxApr = partsBuilder.buildTextButtonAppearance();\n\n      maxApr.width = 45;\n      maxApr.height = 28;\n\n\n      maxApr.borderRadius = 0;\n      maxApr.borderWidth = 0;\n\n      maxApr.borderColorDefault = '#c6c6c6';\n      maxApr.borderColorFocused = '#fc615c';\n      maxApr.borderColorHovered = maxApr.borderColorFocused;\n      maxApr.borderColorPressed = '#e64842';\n\n      maxApr.borderStyleDefault = 'solid';\n      maxApr.borderStyleFocused = maxApr.borderStyleDefault;\n      maxApr.borderStyleHovered = maxApr.borderStyleDefault;\n      maxApr.borderStylePressed = maxApr.borderStyleDefault;\n\n      //background\n      maxApr.backgroundColorDefault = 'white';\n      maxApr.backgroundColorFocused = 'white';\n      maxApr.backgroundColorHovered = '#e5e5e5';\n      maxApr.backgroundColorPressed = '#cccccc';\n\n      //caption\n      maxApr.caption = MAXIMIZE_MARK;\n\n      maxApr.captionColorDefault = '#9b9a9b';\n      maxApr.captionColorFocused = 'black';\n      maxApr.captionColorHovered = 'black';\n      maxApr.captionColorPressed = 'black';\n\n      maxApr.captionShiftYpx = 1;\n      maxApr.captionFontRatio = 0.55;\n\n      var maxBtnEle = partsBuilder.buildTextButton(maxApr);\n      var eleLeft = -46;\n      var eleTop = -parseInt(fApr.titleBarHeight);\n      var eleAlign = 'RIGHT_TOP';\n\n      // 'closeButton' is a special name\n      fApr.addFrameComponent('maximizeButton', maxBtnEle, eleLeft, eleTop, eleAlign);\n\n      //configure close button appearance[end]//////////////\n    }\n\n    {\n      //configure close button appearance[begin]//////////////\n\n      var MINIMIZE_MARK = '\\uff3f';\n\n      var minApr = partsBuilder.buildTextButtonAppearance();\n\n      minApr.width = 45;\n      minApr.height = 28;\n\n\n      minApr.borderRadius = 0;\n      minApr.borderWidth = 0;\n\n      minApr.borderColorDefault = '#c6c6c6';\n      minApr.borderColorFocused = '#fc615c';\n      minApr.borderColorHovered = minApr.borderColorFocused;\n      minApr.borderColorPressed = '#e64842';\n\n      minApr.borderStyleDefault = 'solid';\n      minApr.borderStyleFocused = minApr.borderStyleDefault;\n      minApr.borderStyleHovered = minApr.borderStyleDefault;\n      minApr.borderStylePressed = minApr.borderStyleDefault;\n\n      //background\n      minApr.backgroundColorDefault = 'white';\n      minApr.backgroundColorFocused = 'white';\n      minApr.backgroundColorHovered = '#e5e5e5';\n      minApr.backgroundColorPressed = '#cccccc';\n\n      //caption\n      minApr.caption = MINIMIZE_MARK;\n\n      minApr.captionColorDefault = '#9b9a9b';\n      minApr.captionColorFocused = 'black';\n      minApr.captionColorHovered = 'black';\n      minApr.captionColorPressed = 'black';\n\n      minApr.captionShiftYpx = -2;\n      minApr.captionFontRatio = 0.3;\n\n      var minBtnEle = partsBuilder.buildTextButton(minApr);\n      var eleLeft = -92;\n      var eleTop = -parseInt(fApr.titleBarHeight);\n      var eleAlign = 'RIGHT_TOP';\n\n      // 'closeButton' is a special name\n      fApr.addFrameComponent('minimizeButton', minBtnEle, eleLeft, eleTop, eleAlign);\n\n      //configure close button appearance[end]//////////////\n    }\n    {\n      //configure close button appearance[begin]//////////////\n\n\n      var deminApr = partsBuilder.buildTextButtonAppearance();\n\n      deminApr.width = 45;\n      deminApr.height = 28;\n\n\n      deminApr.borderRadius = 0;\n      deminApr.borderWidth = 0;\n\n      deminApr.borderColorDefault = '#c6c6c6';\n      deminApr.borderColorFocused = '#fc615c';\n      deminApr.borderColorHovered = deminApr.borderColorFocused;\n      deminApr.borderColorPressed = '#e64842';\n\n      deminApr.borderStyleDefault = 'solid';\n      deminApr.borderStyleFocused = deminApr.borderStyleDefault;\n      deminApr.borderStyleHovered = deminApr.borderStyleDefault;\n      deminApr.borderStylePressed = deminApr.borderStyleDefault;\n\n      //background\n      deminApr.backgroundColorDefault = 'white';\n      deminApr.backgroundColorFocused = 'white';\n      deminApr.backgroundColorHovered = '#e5e5e5';\n      deminApr.backgroundColorPressed = '#cccccc';\n\n      //caption\n      deminApr.caption = '\\u25A3';\n\n      deminApr.captionColorDefault = '#9b9a9b';\n      deminApr.captionColorFocused = 'black';\n      deminApr.captionColorHovered = 'black';\n      deminApr.captionColorPressed = 'black';\n\n      deminApr.captionShiftYpx = 1;\n      deminApr.captionFontRatio = 0.6;\n\n      var deminBtnEle = partsBuilder.buildTextButton(deminApr);\n      var eleLeft = -92;\n      var eleTop = -parseInt(fApr.titleBarHeight);\n      var eleAlign = 'RIGHT_TOP';\n\n      deminBtnEle.style.display = 'none';\n\n      // 'closeButton' is a special name\n      fApr.addFrameComponent('deminimizeButton', deminBtnEle, eleLeft, eleTop, eleAlign);\n\n      //configure close button appearance[end]//////////////\n    }\n    {\n      //configure close button appearance[begin]//////////////\n\n      var RESTORE_MARK = '\\u274F';\n\n      var rbApr = partsBuilder.buildTextButtonAppearance();\n\n      rbApr.width = 45;\n      rbApr.height = 28;\n\n\n      rbApr.borderRadius = 0;\n      rbApr.borderWidth = 0;\n\n      rbApr.borderColorDefault = '#c6c6c6';\n      rbApr.borderColorFocused = '#fc615c';\n      rbApr.borderColorHovered = rbApr.borderColorFocused;\n      rbApr.borderColorPressed = '#e64842';\n\n      rbApr.borderStyleDefault = 'solid';\n      rbApr.borderStyleFocused = rbApr.borderStyleDefault;\n      rbApr.borderStyleHovered = rbApr.borderStyleDefault;\n      rbApr.borderStylePressed = rbApr.borderStyleDefault;\n\n      //background\n      rbApr.backgroundColorDefault = 'white';\n      rbApr.backgroundColorFocused = 'white';\n      rbApr.backgroundColorHovered = '#e5e5e5';\n      rbApr.backgroundColorPressed = '#cccccc';\n\n      //caption\n      rbApr.caption = RESTORE_MARK;\n\n      rbApr.captionColorDefault = '#9b9a9b';\n      rbApr.captionColorFocused = 'black';\n      rbApr.captionColorHovered = 'black';\n      rbApr.captionColorPressed = 'black';\n\n      rbApr.captionShiftYpx = 1;\n      rbApr.captionFontRatio = 0.55;\n\n      var restoreBtnEle = partsBuilder.buildTextButton(rbApr);\n      var eleLeft = -46;\n      var eleTop = -parseInt(fApr.titleBarHeight);\n      var eleAlign = 'RIGHT_TOP';\n\n      restoreBtnEle.style.display = 'none';\n\n      // 'closeButton' is a special name\n      fApr.addFrameComponent('restoreButton', restoreBtnEle, eleLeft, eleTop, eleAlign);\n\n      //configure close button appearance[end]//////////////\n    }\n\n\n  };\n  //\n\n  return fApr;\n}\n\n\nmodule.exports.getStyle = getStyle;\n"
  },
  {
    "path": "src/presets/appearance/PresetStyleToast.js",
    "content": "function getStyle(fApr) {\n\n\n  fApr.showTitleBar = false;\n  fApr.showCloseButton = true;\n\n\n  fApr.titleBarCaptionFontSize = '0px';\n  fApr.titleBarCaptionFontWeight = 'normal';\n  fApr.titleBarCaptionLeftMargin = '0px';\n  fApr.titleBarCaptionColorDefault = 'transparent';\n  fApr.titleBarCaptionColorFocused = 'transparent';\n\n  fApr.titleBarHeight = '0px';\n\n  fApr.titleBarColorDefault = 'transparent';\n  fApr.titleBarColorFocused = 'transparent';\n\n  fApr.titleBarBorderBottomDefault = null;\n  fApr.titleBarBorderBottomFocused = null;\n\n  fApr.frameBorderRadius = '10px';\n\n  //border width\n  fApr.frameBorderWidthDefault = '0px';\n  fApr.frameBorderWidthFocused = '0px';\n\n  //border color\n  fApr.frameBorderColorDefault = 'transparent';\n  fApr.frameBorderColorFocused = 'transparent';\n  fApr.frameBorderStyle = 'solid';\n  fApr.frameBoxShadow = '2px 2px 15px  rgba(0, 0, 0, 0.5)';\n  fApr.frameBackgroundColor = 'transparent';\n\n\n  fApr.frameComponents = [];\n  fApr.frameHeightAdjust = 1;//default is 1\n\n  fApr.captionClor = 'darkgray';\n\n  fApr.pullUpDisabled = false;\n\n  fApr.getTitleBarStyle = function() {\n\n    if (fApr.focusedFrameOnly) {\n      return {\n        titleBarClassNameDefault: ' ',\n        titleBarClassNameFocused: ' '\n      };\n    } else {\n      return {\n        titleBarClassNameDefault: ' ',\n        titleBarClassNameFocused: ' '\n      };\n    }\n  };\n\n\n  fApr.onInitialize = function() {\n\n\n    var partsBuilder = fApr.getPartsBuilder();\n\n\n    //configure close button appearance[begin]//////////////\n\n    var crossMark0 = '\\u274c';\n    var crossMark1 = '\\u2716';\n    var crossMark2 = '\\u274e';\n    var CROSS_MARK = crossMark1;\n\n\n    var cbApr = partsBuilder.buildTextButtonAppearance();\n\n    cbApr.width = 20;\n    cbApr.height = 20;\n\n\n    cbApr.borderRadius = 10;\n    cbApr.borderWidth = 0;\n\n    cbApr.borderColorDefault = '#cccccc';\n    cbApr.borderColorFocused = '#cccccc';\n    cbApr.borderColorHovered = '#dddddd';\n    cbApr.borderColorPressed = '#eeeeee';\n\n    cbApr.borderStyleDefault = 'solid';\n    cbApr.borderStyleFocused = cbApr.borderStyleDefault;\n    cbApr.borderStyleHovered = cbApr.borderStyleDefault;\n    cbApr.borderStylePressed = cbApr.borderStyleDefault;\n\n    //background\n    cbApr.backgroundColorDefault = 'transparent';\n    cbApr.backgroundColorFocused = 'transparent';\n    cbApr.backgroundColorHovered = 'transparent';\n    cbApr.backgroundColorPressed = 'transparent';\n\n    cbApr.backgroundBoxShadow = null;// '2px 2px 5px  rgba(0, 0, 0, 0.5)';\n\n    //caption\n    cbApr.caption = CROSS_MARK;\n\n    cbApr.captionColorDefault = fApr.captionClor;\n    cbApr.captionColorFocused = fApr.captionClor;\n    cbApr.captionColorHovered = fApr.captionClor;\n    cbApr.captionColorPressed = fApr.captionClor;\n\n    cbApr.captionShiftYpx = 1;\n    cbApr.captionFontRatio = 0.6;\n\n    var closeBtnEle = partsBuilder.buildTextButton(cbApr);\n    var eleLeft = -6;\n    var eleTop = 3;\n    var eleAlign = 'RIGHT_TOP';\n\n    // 'closeButton' is a special name\n    fApr.addFrameComponent('closeButton', closeBtnEle, eleLeft, eleTop, eleAlign);\n\n    //configure close button appearance[end]//////////////\n\n\n  };\n  //\n\n\n  return fApr;\n}\n\n\nmodule.exports.getStyle = getStyle;\n"
  },
  {
    "path": "src/presets/appearance/PresetStyleYosemite.css",
    "content": ".jsframe-preset-style-yosemite-default {\n    background: -webkit-gradient(linear, left top, left bottom, color-stop(0.0, #f5f5f5, color-stop(1.0, #f8f7f2)));\n    background: -webkit-linear-gradient(top, #f5f5f5, #f8f7f2);\n    background: -moz-linear-gradient(top, #f5f5f5, #f8f7f2);\n    background: linear-gradient(top, #f5f5f5, #f8f7f2);\n    border-top-left-radius: 6px;\n    border-top-right-radius: 6px;\n}\n\n.jsframe-preset-style-yosemite-focused {\n    /* (c)2015 Johannes Jakob\n       Made with <3 in Germany */\n    background: -webkit-gradient(linear, left top, left bottom, color-stop(0.0, #ebebeb, color-stop(1.0, #d5d5d5)));\n    background: -webkit-linear-gradient(top, #ebebeb, #d5d5d5);\n    background: -moz-linear-gradient(top, #ebebeb, #d5d5d5);\n    background: linear-gradient(top, #ebebeb, #d5d5d5);\n    border-top-left-radius: 6px;\n    border-top-right-radius: 6px;\n}\n"
  },
  {
    "path": "src/presets/appearance/PresetStyleYosemite.js",
    "content": "require('./PresetStyleYosemite.css');\nvar ObjectAssigner = require('../../utils/ObjectAssigner.js');\n\nfunction getStyle(fApr, userParam) {\n\n  var srcParam = {\n    titleBar: {\n      greenButton: 'maximize',//'maximize' or 'fullscreen'\n    }\n  };\n\n  var param = srcParam;\n\n  if (userParam) {\n    //param=Object.assign({},srcParam, userParam);\n    ObjectAssigner.objectAssign(srcParam, userParam);\n\n  }\n\n  fApr.showTitleBar = true;\n  fApr.showCloseButton = true;\n\n  fApr.titleBarCaptionFontSize = '11px';\n  fApr.titleBarCaptionFontWeight = 'normal';\n  fApr.titleBarCaptionLeftMargin = null;\n  fApr.titleBarCaptionColorDefault = '#4d494d';\n  fApr.titleBarCaptionColorFocused = '#4d494d';\n\n  fApr.titleBarHeight = '26px';\n\n  fApr.titleBarColorDefault = null;\n  fApr.titleBarColorFocused = null;\n\n  fApr.titleBarBorderBottomDefault = '1px solid #b1aeb1';\n  fApr.titleBarBorderBottomFocused = fApr.titleBarBorderBottomDefault;\n\n  fApr.frameBorderRadius = '6px';\n\n  //border width\n  fApr.frameBorderWidthDefault = '1px';\n  fApr.frameBorderWidthFocused = '1px';\n\n\n  //border color\n  fApr.frameBorderColorDefault = '#acacac';\n  fApr.frameBorderColorFocused = '#acacac';\n\n  fApr.frameBorderStyle = 'solid';\n\n  //window shadow\n  fApr.frameBoxShadow = '0px 0px 20px rgba(0, 0, 0, 0.3)';\n\n  fApr.frameBackgroundColor = 'transparent';\n\n\n  fApr.frameComponents = new Array();\n\n  fApr.getTitleBarStyle = function() {\n\n    if (fApr.focusedFrameOnly) {\n      return {\n        titleBarClassNameDefault: 'jsframe-preset-style-yosemite-focused',\n        titleBarClassNameFocused: 'jsframe-preset-style-yosemite-focused'\n      };\n    } else {\n      return {\n        titleBarClassNameDefault: 'jsframe-preset-style-yosemite-default',\n        titleBarClassNameFocused: 'jsframe-preset-style-yosemite-focused'\n      };\n    }\n  };\n\n  fApr.onInitialize = function() {\n\n    var partsBuilder = fApr.getPartsBuilder();\n\n    var img_data_close_hovered = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAWElEQVQoU2NkIBIwEqmOAa6wgZWlH6Sp4fefQjCNxkdRyMjAUPCf4f8CkEJGBsaE/wwME2AaUaxuYGWeD1IAUgjS0PD7byLMaaQrBLmJKKuJ9gyhYCI6HAGlFDALf9s7eQAAAABJRU5ErkJggg==';\n    var img_data_maximize_hovered = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAVElEQVQoU2NkIBIwoqvjixFoAIl9WvIBTMMAhkLeGP79IMnPSz46kq8QZN1/hv/2IBMYGRgMQPR/BoYLED7jQZAzwFYTrRDZLdRxI7KJRAcPrvAHAATYKgvLH0fAAAAAAElFTkSuQmCC';\n    if (param.titleBar.greenButton === 'fullscreen') {\n      img_data_maximize_hovered = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAZElEQVQoU2NkIBIwEqmOAUWhQIKAwL8///czMDAYwAz4tOQjWA1cIUjRhwUfPqArxlDIF8N/nomF0RFdMTaF/xkYGC6gK/605KMhitV8MfwghSCAohhkAy6FKIphniIvePCFKQDzGzsLS+7n2AAAAABJRU5ErkJggg==';\n    }\n    var img_data_demaximize_hovered = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAiUlEQVQoU2NkwAIEogQMPiz7cAFZihGbQt4Y/v0MjIwLPy/+sAAmj1MhIwODw39GxkSYYrwKQabBFGNVyBfL1///P6MBzFrmf4yFjCCH/2X63w93C+P/C58WfypEdzvYRN5YgQTG///ng61iYDjweclHR6wKkRUTVAhTzPD/fzxeE2FWYQtskBwAKwQ7tVjAL4MAAAAASUVORK5CYII=';\n    var img_data_minimize_hovered = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAMUlEQVQoU2NkIBIwEqmOgUYKa7w4Ghj+M9hjdQYjw8GWbT8awFYTrZAYD9HIM8RYDQBsEAwLkq4IAgAAAABJRU5ErkJggg==';\n    var img_data_1dot_transparent = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABBJREFUeNpi+P//PwNAgAEACPwC/tuiTRYAAAAASUVORK5CYII=';\n    var img_width = 10;\n    var img_height = 10;\n    var img_style = 'margin:0px;padding:0px;width:' + img_width + 'px;height:' + img_height + 'px';\n\n    var imageMaximize = document.createElement('img');\n    imageMaximize.src = img_data_maximize_hovered;\n    imageMaximize.setAttribute('style', img_style);\n\n    var imageDemaximize = document.createElement('img');\n    imageDemaximize.src = img_data_demaximize_hovered;\n    imageDemaximize.setAttribute('style', img_style);\n\n    // var imageFullScreen = document.createElement('img');\n    // imageFullScreen.src = img_data_maximize_hovered;\n    // imageFullScreen.setAttribute('style', img_style);\n\n    var imageMinimize = document.createElement('img');\n    imageMinimize.src = img_data_minimize_hovered;\n    imageMinimize.setAttribute('style', img_style);\n\n    var imageClose = document.createElement('img');\n    imageClose.src = img_data_close_hovered;\n    imageClose.setAttribute('style', img_style);\n\n\n    var imgTransparent = document.createElement('img');\n    imgTransparent.src = img_data_1dot_transparent;\n    imgTransparent.setAttribute('style', 'margin:0px;padding:0px;width:6px;height:6px');\n\n    {\n      //configure close button appearance[begin]//////////////\n\n\n      var cbApr = partsBuilder.buildImageButtonAppearance();\n      cbApr.imageDefault = imgTransparent;\n      cbApr.imageHovered = imageClose;\n      cbApr.imagePressed = imageClose;\n      cbApr.imageFocused = imgTransparent;\n      cbApr.size = 10;\n\n      cbApr.borderRadius = 5;\n      cbApr.borderWidth = 1;\n\n      cbApr.borderColorDefault = '#c6c6c6';\n      cbApr.borderColorFocused = '#d3524e';\n      cbApr.borderColorHovered = cbApr.borderColorFocused;\n      cbApr.borderColorPressed = '#e64842';\n\n      cbApr.borderStyleDefault = 'solid';\n      cbApr.borderStyleFocused = cbApr.borderStyleDefault;\n      cbApr.borderStyleHovered = cbApr.borderStyleDefault;\n      cbApr.borderStylePressed = cbApr.borderStyleDefault;\n\n      //background\n      cbApr.backgroundColorDefault = '#d0d0d0';\n      cbApr.backgroundColorFocused = '#fc615c';\n      cbApr.backgroundColorHovered = cbApr.backgroundColorFocused;\n      cbApr.backgroundColorPressed = cbApr.backgroundColorDefault;\n      cbApr.setSrc({\n        default: img_data_1dot_transparent,\n        focused: img_data_1dot_transparent,\n        hovered: img_data_close_hovered,\n        pressed: img_data_close_hovered,\n      });\n\n      var closeBtnEle = partsBuilder.buildButton(cbApr);\n      var eleLeft = 8;\n      var eleTop = -19;\n      var eleAlign = 'LEFT_TOP';\n\n      // 'closeButton' is a special name\n      fApr.addFrameComponent(param.closeButtonName || 'closeButton', closeBtnEle, eleLeft, eleTop, eleAlign);\n\n      //prepare [minimize button]\n      var minBtnApr = partsBuilder.buildImageButtonAppearance(cbApr);\n      minBtnApr.borderColorDefault = '#c6c6c6';\n      minBtnApr.borderColorFocused = '#e6b347';\n      minBtnApr.borderColorHovered = minBtnApr.borderColorFocused;\n      minBtnApr.borderColorPressed = '#e1a12d';\n      minBtnApr.backgroundColorDefault = '#d0d0d0';\n      minBtnApr.backgroundColorFocused = '#fdbe40';\n      minBtnApr.backgroundColorHovered = minBtnApr.backgroundColorFocused;\n      minBtnApr.backgroundColorPressed = minBtnApr.backgroundColorDefault;\n      minBtnApr.imageDefault = imgTransparent;\n      minBtnApr.imageHovered = imageMinimize;\n      minBtnApr.imagePressed = imageMinimize;\n      minBtnApr.imageFocused = imgTransparent;\n\n      var minBtnEle = partsBuilder.buildButton(minBtnApr);\n      var deminimizeBtnEle = partsBuilder.buildButton(minBtnApr);\n      deminimizeBtnEle.style.display = 'none';\n      var eleLeft = 28;\n      var eleTop = -19;\n      var eleAlign = 'LEFT_TOP';\n      fApr.addFrameComponent('minimizeButton', minBtnEle, eleLeft, eleTop, eleAlign);\n      fApr.addFrameComponent('deminimizeButton', deminimizeBtnEle, eleLeft, eleTop, eleAlign);\n\n\n      // prepare [maximize button]\n      //configure zoom button appearance[begin]//////////////\n      var maxBtnApr = partsBuilder.buildImageButtonAppearance(cbApr);\n      maxBtnApr.borderColorDefault = '#c6c6c6';\n      maxBtnApr.borderColorFocused = '#67b657';\n      maxBtnApr.borderColorHovered = maxBtnApr.borderColorFocused;\n      maxBtnApr.borderColorPressed = '#00af38';\n      maxBtnApr.backgroundColorDefault = '#d0d0d0';\n      maxBtnApr.backgroundColorFocused = '#34ca49';\n      maxBtnApr.backgroundColorHovered = maxBtnApr.backgroundColorFocused;\n      maxBtnApr.backgroundColorPressed = maxBtnApr.backgroundColorDefault;\n      maxBtnApr.imageDefault = imgTransparent;\n      maxBtnApr.imageHovered = imageMaximize;\n      maxBtnApr.imagePressed = imageMaximize;\n      maxBtnApr.imageFocused = imgTransparent;\n\n      var zoomBtnEle = partsBuilder.buildButton(maxBtnApr);\n\n\n      var demaxBtnApr = partsBuilder.buildImageButtonAppearance(cbApr);\n      demaxBtnApr.borderColorDefault = '#c6c6c6';\n      demaxBtnApr.borderColorFocused = '#67b657';\n      demaxBtnApr.borderColorHovered = demaxBtnApr.borderColorFocused;\n      demaxBtnApr.borderColorPressed = '#00af38';\n      demaxBtnApr.backgroundColorDefault = '#d0d0d0';\n      demaxBtnApr.backgroundColorFocused = '#34ca49';\n      demaxBtnApr.backgroundColorHovered = demaxBtnApr.backgroundColorFocused;\n      demaxBtnApr.backgroundColorPressed = demaxBtnApr.backgroundColorDefault;\n      demaxBtnApr.imageDefault = imgTransparent;\n      demaxBtnApr.imageHovered = imageDemaximize;\n      demaxBtnApr.imagePressed = imageDemaximize;\n      demaxBtnApr.imageFocused = imgTransparent;\n      var demaxBtnEle = partsBuilder.buildButton(demaxBtnApr);\n      demaxBtnEle.style.display = 'none';\n\n      var eleLeft = 48;\n      var eleTop = -19;\n      var eleAlign = 'LEFT_TOP';\n\n\n      fApr.addFrameComponent('dezoomButton', demaxBtnEle, eleLeft, eleTop, eleAlign);\n      fApr.addFrameComponent('zoomButton', zoomBtnEle, eleLeft, eleTop, eleAlign);\n\n      //configure zoom button appearance[end]//////////////\n    }\n    //\n\n  };\n  //\n\n  return fApr;\n}\n\nmodule.exports.getStyle = getStyle;\n"
  },
  {
    "path": "src/presets/window/PresetWindowYosemite.js",
    "content": "var mergeDeeply = require('merge-deeply');\n\nfunction getPreset(param) {\n\n  var result = {};\n  result.appearanceName = 'yosemite';\n  result.appearanceParam = {};\n\n  var presetParam = {};\n\n  if (param) {\n    presetParam = param;\n  }\n\n  var isFullScreen = presetParam.maximizeButtonBehavior === 'fullscreen';\n  var minimizeButton = presetParam.minimizeButtonBehavior === 'minimize' ? 'minimizeButton' : null;\n  var hideButton1 = presetParam.minimizeButtonBehavior === 'hide' ? 'minimizeButton' : null;\n  var hideButton2 = presetParam.closeButtonBehavior === 'hide' ? 'custom-close-button' : null;\n  var windowControlParam = presetParam.control;\n\n  var closeButtonNameByCloseButtonBehavior = hideButton2;\n  var closeButtonName = presetParam.closeButtonName;\n\n  if (isFullScreen) {\n    result.appearanceParam.titleBar = {\n      greenButton: 'fullscreen',//'maximize' icon or 'fullscreen' icon\n    };\n  }\n  // Set this to 'closeButton' to automatically close when clicking\n  result.appearanceParam.closeButtonName = closeButtonNameByCloseButtonBehavior || closeButtonName || 'closeButton';\n\n  result.setupPresetWindow = function(frame) {\n    var defaultWindowControlParam = {\n      maximizeButton: 'zoomButton',\n      maximizeParam: {\n        fullScreen: isFullScreen,// true:maximized without title bar,false:maximized with title bar\n        restoreKey: 'Escape',//Set key code from https://www.w3.org/TR/uievents-code/#keyboard-key-codes\n      },\n\n      demaximizeButton: 'dezoomButton',\n      deminimizeButton: 'deminimizeButton',\n      minimizeButton: minimizeButton,\n      hideButtons: [hideButton1, hideButton2],\n      hideParam: {\n        align: 'CENTER_CENTER',//ABSOLUTE:If you want the window to disappear after transitioning to the position you specified\n\n        duration: 300\n      },\n      dehideParam: {\n        duration: 300\n      },\n      styleDisplay: 'inline',\n      animation: true,\n      animationDuration: 100,//The whole animation duration(millisec)\n    };\n\n    if (windowControlParam) {\n      mergeDeeply({ op: 'overwrite-merge', object1: defaultWindowControlParam, object2: windowControlParam });\n    }\n\n    frame.setControl(defaultWindowControlParam);\n  };\n  return result;\n}\n\n\nmodule.exports.getPresetWindow = getPreset;\n"
  },
  {
    "path": "src/utils/CSimpleLayoutAnimator.js",
    "content": "var CTimer = require('./CTimer.js');\n\n/**\n * CSimpleLayoutAnimator class\n * Class for moving animation · scaling animation of frame.\n * <p>\n * @constructor\n */\nfunction CSimpleLayoutAnimator() {\n\n  this.fps = 30;\n  this.durationMillis = 200;\n  this.targetFrame = null;\n\n  this._crrAlpha = 1.0;\n  this._toAlpha = 1.0;\n\n  //current width/height\n  this._crrWidth = 0;\n  this._crrHeight = 0;\n  this._toWidth = 0;\n  this._toHeight = 0;\n\n  //current position(x,y)\n  //this._crrX = 0;\n  //this._crrY = 0;\n  this._toX = 0;\n  this._toY = 0;\n\n\n  this.pinnedAnimationEnabled = false;\n  this._pinX = 0;\n  this._pinY = 0;\n  this._pinAnchor = null;\n\n}\n\n/**\n * Set CIFrame object to be resized\n * @param ciframe\n * @returns {*}\n */\nCSimpleLayoutAnimator.prototype.set = function(ciframe) {\n  var me = this;\n  me.targetFrame = ciframe;\n\n\n  me.fromWidth(ciframe.getWidth());\n  me.fromHeight(ciframe.getHeight());\n\n  me.toWidth(ciframe.getWidth());\n  me.toHeight(ciframe.getHeight());\n\n  var crrPos = ciframe.getPosition();\n\n  me.fromPosition(crrPos.x, crrPos.y, crrPos.anchor);\n\n\n  return me;\n\n};\n\n/**\n * Get CIFrame object\n * @returns {*}\n */\nCSimpleLayoutAnimator.prototype.get = function() {\n  var me = this;\n  return me.targetFrame;\n};\n\n/**\n * Set animation duration time millis\n * @param durationMillis\n * @returns {*}\n */\nCSimpleLayoutAnimator.prototype.setDuration = function(durationMillis) {\n  var me = this;\n\n  me.durationMillis = durationMillis;\n  return me;\n};\n\n/**\n * Set expected FPS\n * @param fps\n * @returns {*}\n */\nCSimpleLayoutAnimator.prototype.setFPS = function(fps) {\n  var me = this;\n  me.fps = fps;\n  return me;\n};\n\n/**\n * Set PIN position\n * @param x\n * @param y\n * @param anchor Position where animation starts from.Expected parameters as follows.\n 'LEFT_TOP':Default.Specify the position starting from the upper left.\n 'CENTER_TOP'\n 'RIGHT_TOP'\n 'LEFT_CENTER'\n 'CENTER_CENTER'\n 'RIGHT_CENTER'\n 'LEFT_BOTTOM'\n 'CENTER_BOTTOM'\n 'RIGHT_BOTTOM'\n * @returns {*}\n */\nCSimpleLayoutAnimator.prototype.fromPosition = function(x, y, anchor) {\n  var me = this;\n  me.pinnedAnimationEnabled = true;\n\n  me._pinX = x;\n  me._pinY = y;\n\n  me.toPosition(x, y);\n\n  if (anchor) {\n    me._pinAnchor = anchor;\n  }\n  return me;\n};\n/**\n * Set resizeFrom width\n * @param fromWidth\n * @returns {*}\n */\nCSimpleLayoutAnimator.prototype.fromWidth = function(fromWidth) {\n  var me = this;\n  me._crrWidth = fromWidth;\n\n  return me;\n};\n\n/**\n * Set resizeFrom height\n * @param fromHeight\n * @returns {*}\n */\nCSimpleLayoutAnimator.prototype.fromHeight = function(fromHeight) {\n  var me = this;\n  me._crrHeight = fromHeight;\n\n  return me;\n};\n\n/**\n * Set resizeTo width\n * @param toWidth\n * @returns {*}\n */\nCSimpleLayoutAnimator.prototype.toWidth = function(toWidth) {\n  var me = this;\n  me._toWidth = toWidth;\n\n  return me;\n};\n\n/**\n * Set resizeTo height\n * @param toHeight\n * @returns {*}\n */\nCSimpleLayoutAnimator.prototype.toHeight = function(toHeight) {\n  var me = this;\n  me._toHeight = toHeight;\n  return me;\n};\n\n/**\n * Set from alpha\n * @param fromAlpha\n * @returns {*}\n */\nCSimpleLayoutAnimator.prototype.fromAlpha = function(fromAlpha) {\n  var me = this;\n  me._crrAlpha = fromAlpha;\n\n  return me;\n};\n\n/**\n * Set to alpha\n * @param toAlpha\n * @returns {*}\n */\nCSimpleLayoutAnimator.prototype.toAlpha = function(toAlpha) {\n  var me = this;\n  me._toAlpha = toAlpha;\n\n  return me;\n};\n\n/**\n * Get CIFrame object\n * @returns {*}\n */\nCSimpleLayoutAnimator.prototype.ease = function(ease) {\n  var me = this;\n  me._ease=ease;\n  return me;\n};\n\n/**\n * Set move to position\n * @param x\n * @param y\n * @returns {*}\n */\nCSimpleLayoutAnimator.prototype.toPosition = function(x, y) {\n  var me = this;\n  me._toX = x;\n  me._toY = y;\n  return me;\n};\n\n/**\n * Set move to x\n * @param x\n * @returns {*}\n */\nCSimpleLayoutAnimator.prototype.toX = function(x) {\n  var me = this;\n  me._toX = x;\n  return me;\n};\n\n/**\n * Set move to y\n * @param t\n * @returns {*}\n */\nCSimpleLayoutAnimator.prototype.toY = function(t) {\n  var me = this;\n  me._toY = t;\n  return me;\n};\n\n\nCSimpleLayoutAnimator.prototype.start = function(waitMillis, requestFocusEnabled) {\n\n\n  var me = this;\n\n  var fromWidth = me._crrWidth;\n  var fromHeight = me._crrHeight;\n\n  var fromX = me._pinX;\n  var fromY = me._pinY;\n\n  var fromAlpha = me._crrAlpha;\n\n\n  return new Promise(function(resolve, reject) {\n\n\n    var numOfSteps = parseInt(me.fps * (me.durationMillis / 1000));\n    if (numOfSteps == 0) {\n      numOfSteps = 1;\n    }\n\n    var deltaWidth = (me._toWidth - fromWidth) / numOfSteps;\n    var deltaHeight = (me._toHeight - fromHeight) / numOfSteps;\n\n    var deltaX = (me._toX - fromX) / numOfSteps;\n    var deltaY = (me._toY - fromY) / numOfSteps;\n\n    var deltaAlpha = (me._toAlpha - fromAlpha) / numOfSteps;\n    if(me._ease){\n      deltaAlpha=deltaAlpha/1.24;\n    }\n\n    var unitMillis = me.durationMillis / numOfSteps;\n\n    var idx = 0;\n\n\n    function loop() {\n      var timer = new CTimer();\n\n      timer.setIntervalMillis(unitMillis);\n\n      timer.setCallback(function(timer) {\n\n        if (idx == numOfSteps) {\n\n          var _width = me._toWidth;\n          var _height = me._toHeight;\n\n          var _x = fromX + deltaX * idx;\n          var _y = fromY + deltaY * idx;\n\n          var _alpha = me._toAlpha;\n\n          if (me.pinnedAnimationEnabled) {\n            //me.targetFrame._setPositionInternally(me._pinX, me._pinY, me._pinAnchor, _width, _height);\n\n            me.targetFrame._setPositionInternally(_x, _y, me._pinAnchor, _width, _height);\n          }\n\n\n          if (me.targetFrame.htmlElement.style) {\n            me.targetFrame.htmlElement.style.opacity = _alpha;\n          }\n\n          //me.targetFrame.resizeDirect(_width, _height,false);\n          me.targetFrame.setSize(_width, _height, true);\n\n          me._crrWidth = _width;\n          me._crrHeight = _height;\n\n          me._pinX = _x;\n          me._pinY = _y;\n        }\n\n        if (idx == (numOfSteps + 1)) {\n          //Stop timer after last draw update.\n          timer.stopTimer();\n\n          if (me.targetFrame.htmlElement.style) {\n            me.targetFrame.htmlElement.style.opacity = me._toAlpha;\n          }\n          resolve(me);\n          return;\n        }\n\n\n        var _width = fromWidth + deltaWidth * idx;\n        var _height = fromHeight + deltaHeight * idx;\n\n        var _x = fromX + deltaX * idx;\n        var _y = fromY + deltaY * idx;\n\n        var _alpha = fromAlpha + deltaAlpha * idx;\n\n        if (me.pinnedAnimationEnabled) {\n          //me.targetFrame._setPositionInternally(me._pinX, me._pinY, me._pinAnchor, _width, _height);\n          me.targetFrame._setPositionInternally(_x, _y, me._pinAnchor, _width, _height);\n        }\n\n        if (me.targetFrame.htmlElement.style) {\n          me.targetFrame.htmlElement.style.opacity = _alpha;\n        }\n\n        //me.targetFrame.resizeDirect(_width, _height,false);\n        me.targetFrame.setSize(_width, _height, true);\n\n        if (idx == 0) {\n\n          //check window existence\n          var wmgr = me.targetFrame.parentCanvas;\n          if (wmgr) {\n            var _targetFrame = wmgr.getWindow(me.targetFrame.id);\n            if (_targetFrame) {\n              me.targetFrame.show({ requestFocus: requestFocusEnabled });\n            } else {\n              //the target window must be deleted.\n            }\n          }\n        }\n\n        idx++;\n      });\n\n\n      timer.startTimer();\n    }\n\n    if (waitMillis) {\n\n      var waiter = new CTimer();\n      waiter.setIntervalMillis(waitMillis);\n      waiter.setCallback(function(_timer) {\n        _timer.stopTimer();\n\n        loop();\n      });\n      waiter.startTimer();\n    } else {\n      loop();\n    }\n\n\n  });\n\n};//start\n\n/**\n * end of CSimpleLayoutAnimator class\n */\n//+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-\n\n\nmodule.exports = CSimpleLayoutAnimator;\n"
  },
  {
    "path": "src/utils/CTimer.js",
    "content": "/**\n * CTimer class<br>\n *\n * How to use:\n *  var timer = new CTimer();\n *    var value = 0;\n *\n *    timer.setCallback(function (timerObj) {\n *        value++;\n *        console.log(value);\n *        if (value == 100) {\n *            timerObj.stopTimer();\n *        }\n *    });\n *    timer.setIntervalMillis(100);\n *    timer.startTimer();\n *\n * @author Tom Misawa (riversun.org@gmail.com)\n */\nvar CTimer =\n  (function() {\n    function CTimer() {\n      var me = this;\n\n      me._timerId = null;\n      me._isRunning = false;\n      me._timerInterval = 0;\n\n      me._internalCallback = _internalCallback;\n      me._timerMethod = null;\n\n\n      function _internalCallback() {\n        if (me._timerMethod) {\n          me._timerMethod(me);\n        }\n        if (me._isRunning) {\n          clearTimeout(me._timerId);\n          me._timerId = setTimeout(me._internalCallback, me._timerInterval);\n        }\n      }\n    }\n\n    CTimer.prototype.setCallback = function(callback_func) {\n      var me = this;\n      me._timerMethod = callback_func;\n      return me;\n    };\n\n    CTimer.prototype.setIntervalMillis = function(interval) {\n      var me = this;\n      me._timerInterval = interval;\n      return me;\n    };\n\n    CTimer.prototype.stopTimer = function() {\n      var me = this;\n      me._isRunning = false;\n      return me;\n    };\n\n    CTimer.prototype.startTimer = function() {\n      var me = this;\n      if (me._timerInterval > 0) {\n        me._timerId = setTimeout(me._internalCallback, me._timerInterval);\n        me._isRunning = true;\n\n      }\n      return me;\n    };\n\n\n    return CTimer;\n  })();\n/**\n * end of CTimer class\n */\n//+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-\nmodule.exports = CTimer;\n"
  },
  {
    "path": "src/utils/Inherit.js",
    "content": "/**\n * Inheritance function\n *\n * @param subClass\n * @param baseClass\n */\nfunction inherit(subClass, baseClass) {\n\n  function clazz() {\n  }\n\n  clazz.prototype = baseClass.prototype;\n  subClass.prototype = new clazz();\n\n  subClass.prototype.constructor = subClass;\n  subClass.superConstructor = baseClass;\n  subClass.superClass = baseClass.prototype;\n\n}\n\n/**\n * End of inheritance function\n */\n\n//+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-\n\nmodule.exports = inherit;"
  },
  {
    "path": "src/utils/ObjectAssigner.js",
    "content": "var _typeof =\n    typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\"\n        ? function (obj) {\n            return typeof obj;\n        }\n        : function (obj) {\n            return obj &&\n            typeof Symbol === \"function\" &&\n            obj.constructor === Symbol &&\n            obj !== Symbol.prototype\n                ? \"symbol\"\n                : typeof obj;\n        };\n\nfunction _defineProperty(obj, key, value) {\n    if (key in obj) {\n        Object.defineProperty(obj, key, {\n            value: value,\n            enumerable: true,\n            configurable: true,\n            writable: true\n        });\n    } else {\n        obj[key] = value;\n    }\n    return obj;\n}\n\nfunction isObject(item) {\n    return (\n        item &&\n        (typeof item === \"undefined\" ? \"undefined\" : _typeof(item)) === \"object\" &&\n        !Array.isArray(item)\n    );\n}\n\nfunction objectAssign(target) {\n    for (\n        var _len = arguments.length,\n            sources = Array(_len > 1 ? _len - 1 : 0),\n            _key = 1;\n        _key < _len;\n        _key++\n    ) {\n        sources[_key - 1] = arguments[_key];\n    }\n\n    if (!sources.length) return target;\n    var source = sources.shift();\n\n    if (isObject(target) && isObject(source)) {\n        for (var key in source) {\n            if (isObject(source[key])) {\n                if (!target[key]) Object.assign(target, _defineProperty({}, key, {}));\n                objectAssign(target[key], source[key]);\n            } else {\n                Object.assign(target, _defineProperty({}, key, source[key]));\n            }\n        }\n    }\n    return objectAssign.apply(undefined, [target].concat(sources));\n}\n\n\n\nmodule.exports.objectAssign = objectAssign;\n"
  },
  {
    "path": "src/utils/WindowEventHelper.js",
    "content": "'use strict';\n\nvar CSimpleLayoutAnimator = require('./CSimpleLayoutAnimator.js');\nvar CALIGN = require('../CCommon.js');\nvar mergeDeeply = require('merge-deeply');\nvar EventListenerHelper = require('event-listener-helper');\n\nfunction WindowEventHelper(model) {\n\n  this.eventListenerHelper = new EventListenerHelper();\n  this.windowMode = 'default';\n  this.styleDisplay = 'flex';\n  this.horizontalAlign = 'left';\n  this.verticalAlign = 'top';\n\n  this.keyListener = null;\n\n  this.minimizeButton = null;\n  this.maximizeButton = null;\n  this.demaximizeButton = null;\n  this.deminimizeButton = null;\n\n  this.opts = model;\n\n  this.isWindowManagerFixed = model.frame.jsFrame.isWindowManagerFixed;\n\n  if (model.styleDisplay) {\n    this.styleDisplay = model.styleDisplay;\n  }\n  if (model.minimizeButton) {\n    this.minimizeButton = model.minimizeButton;\n  }\n  if (model.deminimizeButton) {\n    this.deminimizeButton = model.deminimizeButton;\n  }\n  if (model.maximizeButton) {\n    this.maximizeButton = model.maximizeButton;\n  }\n  if (model.demaximizeButton) {\n    this.demaximizeButton = model.demaximizeButton;\n  }\n\n  if (model.hideButton) {\n    this.hideButton = model.hideButton;\n  }\n  if (model.hideButtons) {\n    this.hideButtons = model.hideButtons;\n  }\n\n  this.maximizeParam = model.maximizeParam;\n  this.demaximizeParam = model.demaximizeParam;\n  this.minimizeParam = model.minimizeParam;\n  this.deminimizeParam = model.deminimizeParam;\n  this.hideParam = model.hideParam;\n  this.dehideParam = model.dehideParam;\n\n\n  if (model.horizontalAlign) {\n    this.horizontalAlign = model.horizontalAlign;\n  }\n  if (model.verticalAlign) {\n    this.verticalAlign = model.verticalAlign;\n  }\n\n\n  this.animationEnabled = false;\n  this.animationDuration = 100;\n  this.frame = model.frame;\n  this.hideFrameBorder = true;\n  this.hideTitleBar = true;\n\n  this.restoreKey = null;\n  this.restoreDuration = null;\n  this.restoreCallback = null;\n\n  this.statsStore = {};\n\n  if (model.animation) {\n    this.animationEnabled = model.animation;\n  }\n  if (model.animationDuration) {\n    this.animationDuration = model.animationDuration;\n  }\n  this.eventListeners = {};\n\n\n  //If the user changes the window size when the window is maximized state,\n  // adjust the size so that window looks maximized.\n  this.resizeListener = this.handleOnResize.bind(this);\n\n  if (this.maximizeParam && this.maximizeParam.matchParent) {\n    this.resizeListener = this.handleOnVirtualResize.bind(this);\n  }\n\n\n}\n\nWindowEventHelper.MATCH_PARENT_CHANGE_MARKER_ATTR = '__jsframe-mp-marker';\n\nWindowEventHelper.prototype.on = function(eventType, callback) {\n  var me = this;\n  me.eventListeners[eventType] = callback;\n};\n\n//---------------------------------------------------------------------------------------------------------------------\nWindowEventHelper.prototype.doMaximize = function(model) {\n  var me = this;\n\n  if (me.windowMode === 'hid') {\n    throw Error('[JSrame] It is not possible to change directly from the hid state to the maximized state');\n    return;\n  }\n\n\n  if (me.windowMode === 'maximized' || me.windowMode === 'maximizing') {\n    // If it's already 'maximized' status, it doesn't do anything.\n    return;\n  }\n\n  me.windowMode = 'maximizing';\n\n\n  var frame = me.frame;\n\n  if (model && model.matchParent) {\n    // The div element does not issue the resize event. Furthermore,\n    // div is specified as 100%, so style.width is always 100%.\n    // So I want to get the clientWidth but I can't get it with mutationObserver.\n    // Therefore, we adopt a mechanism to catch the parent window\n    // resize event and change the attribute of the parent window content\n    // by differentiation to catch it.\n    var windowManager = frame.getWindowManager();\n    var parentElement = windowManager.getParentElement();\n\n    if (!me.matchParentResizeObserver) {\n      var matchParentResizeObserver = new MutationObserver(function() {\n        // console.log(\"on virtual resize\");\n        me.resizeListener();\n      });\n      matchParentResizeObserver.observe(parentElement, {\n        attributeFilter: [WindowEventHelper.MATCH_PARENT_CHANGE_MARKER_ATTR],\n        attributes: true\n      });\n      me.matchParentResizeObserver = matchParentResizeObserver;\n    }\n  }\n    //set onresize listener\n  //window.addEventListener('resize', me.resizeListener);\n  else if (!me.eventListenerHelper.hasEventListener(window, 'resize', 'window-resize-listener')) {\n    me.eventListenerHelper.addEventListener(window, 'resize', me.resizeListener,\n      { listenerName: 'window-resize-listener' });\n  }\n\n  //Remember the status of the window before maximizing the window size\n  me.saveCurrentWindowStats('maximize_mode');\n\n  me.hideTitleBar = model ? model.fullScreen : false;\n\n  if (me.hideTitleBar) {\n\n    //Hide only the currently visible FrameComponent\n    //ウィンドウのモードを変更する前の今の状態で可視状態にあるフレームコンポーネント（閉じるボタン類）を不可視にする\n    //(タイトルバー非表示の場合には最大化するときのアニメーションでフレームコンポーネントを見せないようにする)\n    frame.hideAllVisibleFrameComponents();\n\n    //またhideAllVisibleFrameComponentを実施するときに、個別のhideFrameComponentやshowFrameComponentを実行すると\n    //管理ステートが破綻するため、タイトルバー非表示の場合はどうせ操作できないということもあり\n    //hideFrameComponent や showFrameComponentは実行しない\n\n  } else {\n\n    //Process required for maximization\n    if (me.maximizeButton) {\n      frame.hideFrameComponent(me.maximizeButton);\n    }\n    if (me.demaximizeButton) {\n      frame.showFrameComponent(me.demaximizeButton, me.styleDisplay);\n    }\n  }\n\n\n  frame.setMovable(false);\n  frame.setResizable(false);\n\n\n  if (model && model.restoreKey) {\n    me.restoreKey = model.restoreKey;\n  }\n  if (model && model.restoreDuration) {\n    me.restoreDuration = model.restoreDuration;\n  }\n  if (model && model.restoreCallback) {\n    me.restoreCallback = model.restoreCallback;\n  }\n  //Render maximization itself\n  me.renderMaximizedMode({\n    animation: me.animationEnabled,\n    callback: (model && model.callback) ? model.callback : null, //set maximized finished callback\n    duration: (model && model.duration) ? model.duration : null,\n    matchParent: (model && model.matchParent) ? model.matchParent : false,\n  });\n};\n\n\n/**\n * Render window as a maximized mode( full screen )\n */\nWindowEventHelper.prototype.renderMaximizedMode = function(model) {\n  var me = this;\n  var frame = me.frame;\n  var from = me.loadWindowStats('maximize_mode');\n\n  var _toX = 0;\n  var _toY = 0;\n  var _toWidth = 0;\n  var _toHeight = 0;\n\n  //compute position and size[begin]\n  if (me.hideTitleBar) {\n    _toX = 0;\n    _toY = -from.titleBarHeight;\n  }\n\n  var parentWidth = window.innerWidth;\n  var parentHeight = window.innerHeight;\n\n  if (model.matchParent) {\n    // If matchParent is specified\n    // When maximizing, use the size of parentElement specified at initialization\n    // ParentlElement is often used only for adjusting the display order.\n    // Therefore, only if matchParent is specified, match the size of parentElement\n    var windowManager = frame.getWindowManager();\n    var parentElement = windowManager.getParentElement();\n    parentWidth = parentElement.clientWidth;\n    parentHeight = parentElement.clientHeight;\n  }\n\n  if (me.hideFrameBorder) {\n    _toWidth = parentWidth;\n    _toHeight = parentHeight + (me.hideTitleBar ? from.titleBarHeight : 0);\n  } else {\n    _toWidth = parentWidth - from.frameBorderWidthDefault * 2;\n    _toHeight = parentHeight - from.frameBorderWidthDefault * 2 + (me.hideTitleBar ? from.titleBarHeight : 0);\n  }\n  //compute position and size[end]\n\n  if (me.horizontalAlign == 'right') {\n    _toX = -_toWidth;\n  }\n  if (me.verticalAlign == 'bottom') {\n    _toY = -_toHeight;\n  }\n\n\n  //render position and size[begin]\n  var funcDoRender = function(opt) {\n\n    var disableCallback = opt && opt.disableCallback;\n\n    frame.setPosition(_toX, _toY);\n\n    if (me.hideFrameBorder) {\n      frame.frameBorderWidthDefault = 0;\n      frame.frameBorderWidthFocused = 0;\n      frame.htmlElement.style.borderWidth = '0px';\n    }\n    frame.setSize(_toWidth, _toHeight, true);\n\n    if (disableCallback) {\n      return;\n    }\n\n    if (me.hideTitleBar) {\n      // when full screen mode(means hidden title bar)\n\n      if (me.restoreKey) {\n        me.keyListener = function(event) {\n          if (event.code === me.restoreKey) {\n            me.doCommand('restore');\n          }\n        };\n      }\n      window.addEventListener('keydown', me.keyListener);\n\n      //add keylistener for inside the iframe\n      if (frame.iframe) {\n        frame.iframe.contentWindow.addEventListener('keydown', me.keyListener);\n      }\n    }\n\n    me.windowMode = 'maximized';\n\n\n    if (model && model.callback) {\n      model.callback(me.frame, { eventType: 'maximized' });\n    }\n    if (me.eventListeners['maximized']) {\n      me.eventListeners['maximized'](me.frame, { eventType: 'maximized' });\n    }\n\n  };// end of funcDoRender\n\n\n  if (model && model.animation) {\n\n\n    me.animateFrame({\n      frame: frame,\n      from: from,\n      to: {\n        left: _toX,\n        top: _toY,\n        width: _toWidth,\n        height: _toHeight\n      },\n      duration: model.duration ? model.duration : me.animationDuration,\n      callback: funcDoRender\n    });\n  } else {\n    if (model && model.caller === 'handleOnResize') {\n      funcDoRender({ disableCallback: true });\n    } else {\n      funcDoRender();\n    }\n  }\n  //render position and size[end]\n};\n\nWindowEventHelper.prototype.getWindowMode = function() {\n  return this.windowMode;\n};\n/**\n * Restore window from maximized mode\n */\nWindowEventHelper.prototype.doDemaximize = function(model) {\n  var me = this;\n  var frame = me.frame;\n\n  if (me.windowMode === 'hid') {\n    //console.error('demaximize(=recovery from maximized) cannot be performed in hid state.');\n    throw Error('[JSFrame] demaximize(=recovery from maximized) cannot be performed in hid state.');\n    return;\n  }\n\n  if (!me.hasWindowStats('maximize_mode')) {\n    return;\n  }\n\n  if (me.hideTitleBar) {\n\n  } else {\n    if (me.maximizeButton) {\n      frame.showFrameComponent(me.maximizeButton, me.styleDisplay);\n    }\n    if (me.demaximizeButton) {\n      frame.hideFrameComponent(me.demaximizeButton);\n    }\n  }\n\n  me.restoreWindow({\n    restorePosition: true,\n    restoreMode: 'maximize_mode',\n    animation: me.animationEnabled,\n    callback: (model && model.callback) ? model.callback : null,\n    forceShowFrameComponents: (me.animationEnabled && me.hideTitleBar),\n    duration: (model && model.duration) ? model.duration : null,\n    eventType: 'demaximized'\n  });\n};\n\n\n/**\n * Called when changing the window size by user operation in maximized mode\n */\nWindowEventHelper.prototype.handleOnResize = function() {\n  var me = this;\n  me.renderMaximizedMode({\n    caller: 'handleOnResize',\n    //matchParent: true\n  });\n};\nWindowEventHelper.prototype.handleOnVirtualResize = function() {\n  var me = this;\n  me.renderMaximizedMode({\n    caller: 'handleOnResize',\n    matchParent: true\n  });\n};\n\n//---------------------------------------------------------------------------------------------------------------------\n\n/**\n * Make window minimized mode\n */\nWindowEventHelper.prototype.doMinimize = function(model) {\n  var me = this;\n\n  if (me.windowMode === 'minimized' || me.windowMode === 'minimizing') {\n    // If it's already 'minimized' status, it doesn't do anything.\n    return;\n  }\n\n  me.windowMode = 'minimizing';\n\n\n  var frame = me.frame;\n\n  //Remember the stats of the window before maximizing the window\n  me.saveCurrentWindowStats('minimize_mode');\n\n\n  frame.setResizable(false);\n\n  me.renderMinimizedMode({\n    animation: me.animationEnabled,\n    callback: (model && model.callback) ? model.callback : null,\n    duration: (model && model.duration) ? model.duration : null,\n    toWidth: (model && model.toWidth) ? model.toWidth : null,\n  });\n};\n\n\n/**\n * Render window as minimized mode\n */\nWindowEventHelper.prototype.renderMinimizedMode = function(model) {\n  var me = this;\n  var frame = me.frame;\n  var ri = me.loadWindowStats('minimize_mode');\n\n  var from = me.getCurrentWindowStats();\n  var to = me.getCurrentWindowStats();\n\n  to.height = ri.titleBarHeight;\n  if (model && model.toWidth) {\n    to.width = model.toWidth\n  }\n\n  var funcDoRender = function() {\n    var forceSetSize = true;\n    frame.setSize(to.width, to.height, forceSetSize);\n\n    me.windowMode = 'minimized';\n\n    if (me.minimizeButton) {\n      frame.hideFrameComponent(me.minimizeButton);\n    }\n\n    if (me.deminimizeButton) {\n      frame.showFrameComponent(me.deminimizeButton, me.styleDisplay);\n    }\n\n    if (model.callback) {\n      model.callback(me.frame, { eventType: 'minimized' });\n    }\n    if (me.eventListeners['minimized']) {\n      me.eventListeners['minimized'](me.frame, { eventType: 'minimized' });\n    }\n  };\n\n  if (model && model.animation) {\n    me.animateFrame({\n      toAlpha: 1.0,\n      duration: model.duration ? model.duration : me.animationDuration,\n      frame: frame,\n      from: from,\n      to: to,\n      callback: funcDoRender\n    });\n  } else {\n    funcDoRender();\n  }\n\n\n};\n\n\n/**\n * Restore window from minimized mode\n */\nWindowEventHelper.prototype.doDeminimize = function(model) {\n  var me = this;\n\n  var frame = me.frame;\n\n  if (!me.hasWindowStats('minimize_mode')) {\n    return;\n  }\n\n  if (me.minimizeButton) {\n    frame.showFrameComponent(me.minimizeButton, me.styleDisplay);\n  }\n  if (me.deminimizeButton) {\n    frame.hideFrameComponent(me.deminimizeButton);\n  }\n\n  me.restoreWindow(\n    {\n      restorePosition: false,\n      restoreMode: 'minimize_mode',\n      animation: me.animationEnabled,\n      duration: (model && model.duration) ? model.duration : null,\n      callback: (model && model.callback) ? model.callback : null,\n      eventType: 'deminimized'\n    });\n};\n\n//---------------------------------------------------------------------------------------------------------------------\n/**\n * Make window hidden mode\n */\nWindowEventHelper.prototype.doHide = function(model) {\n\n  var me = this;\n\n  if (me.windowMode === 'hid' || me.windowMode === 'hiding') {\n    // If it's already 'hid' status, it doesn't do anything.\n    return;\n  }\n\n  me.windowMode = 'hiding';\n\n  var frame = me.frame;\n\n  //Remember the stats of the window before maximizing the window\n  me.saveCurrentWindowStats('hide_mode');\n\n\n  frame.setResizable(false);\n\n\n  var arg = {\n//    silent: model.silent,\n    animation: me.animationEnabled,\n    // duration: (model && model.duration) ? model.duration : null,\n    // callback: (model && model.callback) ? model.callback : null,\n    // align: (model && model.align) ? model.align : null,\n    // offset: (model && model.align) ? model.offset : null,\n  };\n  if (model) {\n    mergeDeeply({ op: 'overwrite-merge', object1: arg, object2: model });\n  }\n  me.renderHideMode(arg);\n};\n\n\n/**\n * Render window as hidden mode\n */\nWindowEventHelper.prototype.renderHideMode = function(model) {\n  var me = this;\n  var frame = me.frame;\n  var ri = me.loadWindowStats('hide_mode');\n\n  var from = me.getCurrentWindowStats();\n\n  var offset = { x: 0, y: 0 };\n  var toElement = model.toElement;\n\n  if (model.offset) {\n    offset = model.offset;\n  }\n\n  var left = 0;\n  var top = 0;\n  {\n    var align = (model && model.align) ? model.align : 'LEFT_TOP';\n\n\n    if (!align || CALIGN.LEFT_TOP == align) {\n      left = from.left;\n      top = from.top;\n    } else if (CALIGN.HCENTER_TOP == align) {\n      left = from.left + from.width / 2;\n      top = from.top;\n    } else if (CALIGN.RIGHT_TOP == align) {\n      left = from.left + from.width;\n      top = from.top;\n    } else if (CALIGN.LEFT_VCENTER == align) {\n      left = from.left;\n      top = from.top + from.height / 2;\n    } else if (CALIGN.HCENTER_VCENTER == align) {\n      left = from.left + from.width / 2;\n      top = from.top + from.height / 2;\n    } else if (CALIGN.RIGHT_VCENTER == align) {\n      left = from.left + from.width;\n      top = from.top + from.height / 2;\n    } else if (CALIGN.LEFT_BOTTOM == align) {\n      left = from.left;\n      top = from.top + from.height;\n    } else if (CALIGN.HCENTER_BOTTOM == align) {\n      left = from.left + from.width / 2;\n      top = from.top + from.height;\n    } else if (CALIGN.RIGHT_BOTTOM == align) {\n      left = from.left + from.width;\n      top = from.top + from.height;\n\n    } else if ('ABSOLUTE' == align) {\n      if (toElement) {\n        var elementRect = toElement.getBoundingClientRect();\n        if (me.isWindowManagerFixed) {\n          left = elementRect.left;\n          top = elementRect.top;\n        } else {\n          left = elementRect.left + window.pageXOffset;\n          top = elementRect.top + window.pageYOffset;\n        }\n      } else {\n        left = offset.x;\n        top = offset.y;\n      }\n    }\n\n  }\n\n  var to = {\n    left: left,\n    top: top,\n    width: 0,\n    //minimum height must be titleBarHeight\n    height: ri.titleBarHeight\n  };\n\n  var funcDoRender = function() {\n    var forceSetSize = true;\n    frame.setSize(to.width, to.height, forceSetSize);\n    //frame.hide();\n\n    me.windowMode = 'hid';\n\n    if (model && model.callback) {\n      model.callback(me.frame, { eventType: 'hid' });\n    }\n    if (me.eventListeners['hid']) {\n      me.eventListeners['hid'](me.frame, { eventType: 'hid' });\n    }\n  };\n\n  //Hide only the currently visible FrameComponent\n  frame.hideAllVisibleFrameComponents();\n\n  if (model && model.animation) {\n    me.animateFrame({\n      fromAlpha: model.silent ? 0 : 1.0,\n      toAlpha: 0,\n      ease: true,\n      duration: model.duration ? model.duration : me.animationDuration,\n      frame: frame,\n      from: from,\n      to: to,\n      callback: funcDoRender\n    });\n  } else {\n    funcDoRender();\n  }\n\n\n};\n\n\n/**\n * Restore window from hided mode\n */\nWindowEventHelper.prototype.doDehide = function(model) {\n  var me = this;\n  var frame = me.frame;\n\n  if (!me.hasWindowStats('hide_mode')) {\n    return;\n  }\n\n  me.restoreWindow(\n    {\n      duration: (model && model.duration) ? model.duration : null,\n      restorePosition: true,\n      restoreMode: 'hide_mode',\n      animation: me.animationEnabled,\n      forceShowFrameComponents: true,\n      callback: (model && model.callback) ? model.callback : null,\n      eventType: 'dehided'\n    });\n};\n//---------------------------------------------------------------------------------------------------------------------\nWindowEventHelper.prototype.loadWindowStats = function(storeKeyName) {\n  var me = this;\n  return me.statsStore[storeKeyName];\n};\n\n\n/**\n * Remember the status of the window before maximizing or minimizing the window size\n * @param storeKeyName\n * @returns {boolean} Returns true if the status of the window has been updated or is a new status.\n * Returns false if the status has not been updated.\n */\nWindowEventHelper.prototype.saveCurrentWindowStats = function(storeKeyName) {\n  var me = this;\n\n  var crrWindowStats = me.getCurrentWindowStats();\n\n  if (me.hasWindowStats(storeKeyName)) {\n\n    var storedStats = me.loadWindowStats(storeKeyName);\n    var isWindowStatsUpdated = !me.windowStatsEquals(crrWindowStats, storedStats);\n\n    if (isWindowStatsUpdated) {\n      me.statsStore[storeKeyName] = crrWindowStats;\n    }\n\n    return isWindowStatsUpdated;\n\n  } else {\n    me.statsStore[storeKeyName] = crrWindowStats;\n    return true;\n  }\n\n\n};\n\nWindowEventHelper.prototype.windowStatsEquals = function(windowStats1, windowStats2) {\n\n  if (windowStats1 && windowStats2) {\n    var result = JSON.stringify(windowStats1) === JSON.stringify(windowStats2);\n    return result;\n  } else {\n    return false;\n  }\n\n};\n\nWindowEventHelper.prototype.clearWindowStats = function(storeKeyName) {\n  var me = this;\n  me.statsStore[storeKeyName] = null;\n};\n\nWindowEventHelper.prototype.hasWindowStats = function(storeKeyName) {\n  var me = this;\n  return me.statsStore[storeKeyName];\n};\n\nWindowEventHelper.prototype.getCurrentWindowStats = function() {\n  var me = this;\n  var frame = me.frame;\n\n  //Acquire window's stats\n  var __titleBarHeight = parseInt(frame.titleBar.style.height, 10);\n  var __frameBorderWidthDefault = frame.frameBorderWidthDefault;// parseInt(frame.htmlElement.style.borderWidth, 10);\n  var __frameBorderWidthFocused = frame.frameBorderWidthFocused;\n  var __left = frame.getLeft();\n  var __top = frame.getTop();\n  var __width = frame.getWidth();\n  var __height = frame.getHeight();\n  var __resizable = frame.resizable;\n  var __movable = frame.movable;\n\n\n  return {\n    left: __left,\n    top: __top,\n    width: __width,\n    height: __height,\n    titleBarHeight: __titleBarHeight,\n    frameBorderWidthDefault: __frameBorderWidthDefault,\n    frameBorderWidthFocused: __frameBorderWidthFocused,\n    resizable: __resizable,\n    movable: __movable,\n  };\n};\n\n\n/**\n * Restore the state of the window\n * @param model\n */\nWindowEventHelper.prototype.restoreWindow = function(model) {\n  var me = this;\n  var frame = me.frame;\n  var to = me.loadWindowStats(model.restoreMode);\n  //現在の状態を一時保存する\n  //me.saveCurrentWindowStats('temp');\n  var crr = me.getCurrentWindowStats();//loadWindowStats('temp');\n\n\n  //以下の3つは、ボーダーを太さを変更するためのものだが\n  // funcDoRender内で処理してしまうとアニメーション中にはボーダーが描かれなくなる\n  //アニメーション中にはボーダーは復活していたほうが自然なのでfuncDoRender外で実行する\n  frame.frameBorderWidthDefault = to.frameBorderWidthDefault;\n  frame.frameBorderWidthFocused = to.frameBorderWidthFocused;\n  frame.htmlElement.style.borderWidth = frame.frameBorderWidthFocused;\n\n  var funcDoRender = function() {\n\n\n    if (model && model.restorePosition == false) {\n      //位置の移動を伴わない場合（最小化から戻すときなど)\n      to.left = crr.left;\n      to.top = crr.top;\n    }\n\n    frame.setPosition(to.left, to.top);\n\n    var force = true;\n    frame.setSize(to.width, to.height, force);\n\n    frame.setResizable(to.resizable);\n    frame.setMovable(to.movable);\n\n    me.clearWindowStats(model.restoreMode);\n\n    if (me.keyListener) {\n      //タイトルバー無し最大化状態から戻すためのキーリスナーは削除する\n\n      window.removeEventListener('keydown', me.keyListener);\n      if (frame.iframe) {\n        frame.iframe.contentWindow.removeEventListener('keydown', me.keyListener);\n      }\n      me.keyListener = null;\n    }\n\n    me.windowMode = 'default';\n\n    if (model && model.forceShowFrameComponents) {\n      //ウィンドウのモード変更前に可視状態にあったフレームコンポーネント（閉じるボタン類）を可視状態にする\n      frame.showAllVisibleFrameComponents();\n    }\n\n    frame.show();\n\n    var eventType = 'restored';\n    if (model && model.eventType) {\n      eventType = model.eventType;\n    }\n\n    if (model && model.callback) {\n      model.callback(\n        me.frame, { eventType: eventType });\n    }\n    if (me.eventListeners[eventType]) {\n      me.eventListeners[eventType](me.frame, { eventType: eventType });\n    }\n  };\n\n\n  if (model && model.animation) {\n    me.animateFrame({\n      duration: model.duration ? model.duration : me.animationDuration,\n      frame: frame,\n      fromAlpha: 0,\n      toAlpha: 1,\n      from: crr,\n      to: to,\n      callback: funcDoRender\n    });\n  } else {\n\n    funcDoRender();\n  }\n\n  //window.removeEventListener('resize', me.resizeListener);\n  me.eventListenerHelper.removeEventListener(window, 'resize', me.resizeListener);\n  if (me.matchParentResizeObserver) {\n    me.matchParentResizeObserver.disconnect();\n    me.matchParentResizeObserver = null;\n  }\n\n};\n\n\nWindowEventHelper.prototype.animateFrame = function(model) {\n  var me = this;\n  var needRequestFocusAfterAnimation = false;\n\n\n  var fromAlpha = !isNaN(model.fromAlpha) ? model.fromAlpha : 1.0;\n\n  var from = model.from;\n  var to = model.to;\n\n  var animator = new CSimpleLayoutAnimator();\n\n  animator.set(model.frame)\n    .setDuration(model.duration ? model.duration : me.animationDuration)\n    .fromPosition(from.left, from.top, 'LEFT_TOP')\n    .toPosition(to.left, to.top, 'LEFT_TOP')\n    .fromWidth(from.width)\n    .fromHeight(from.height)\n    .toWidth(to.width)\n    .toHeight(to.height)\n    .fromAlpha(fromAlpha)\n    .toAlpha((model.toAlpha == 0) ? 0 : 1.0)\n    .ease(model.ease)\n    .start(0, needRequestFocusAfterAnimation)\n    .then(function(animatorObj) {\n      model['callback']();\n    });\n};\n\n/**\n * Perform complex windowing with simple commands\n * @param cmd\n * @param opt\n */\nWindowEventHelper.prototype.doCommand = function(cmd, opt) {\n  var me = this;\n\n\n  if (cmd === 'maximize') {\n    me._defaultFunctionMaximize(me.frame);\n  }\n  if (cmd === 'demaximize') {\n    me._defaultFunctionDemaximize(me.frame);\n  }\n  if (cmd === 'restore') {\n    me._defaultFunctionRestoreFromFullscreen(me.frame)\n  }\n  if (cmd === 'minimize') {\n    me._defaultFunctionMinimize(me.frame);\n  }\n  if (cmd === 'deminimize') {\n    me._defaultFunctionDeminimize(me.frame);\n  }\n  if (cmd === 'hide') {\n    me._defaultFunctionHide(me.frame);\n  }\n  if (cmd === 'dehide') {\n    me._defaultFunctionDehide(me.frame);\n  }\n}\n\nWindowEventHelper.prototype._defaultFunctionMaximize = function(_frame, evt) {\n  var me = this;\n  var model = me.opts;\n\n  var param = {\n    // DEPRECATED: maximizeWithoutTitleBar is deprecated\n    // USE maximizeParam.fullScreen\n    fullScreen: (model.maximizeWithoutTitleBar === true) ? true : false,\n\n    // DEPRECATED: model.restoreKey is deprecated\n    // USE maximizeParam.restoreKey\n\n    // If you want to use the key input instead of the title bar,\n    // you can specify the key because it is not possible\n    // to recover with the button when hiding the title bar.\n    restoreKey: model.restoreKey ? model.restoreKey : 'Escape',\n\n    // DEPRECATED: model.restoreDuration is deprecated\n    // USE maximizeParam.restoreDuration\n    restoreDuration: model.restoreDuration,\n  };\n\n  if (this.maximizeParam) {\n    // write maximizeParam into param\n    mergeDeeply({ op: 'overwrite-merge', object1: param, object2: this.maximizeParam });\n  }\n\n  //ウィンドウを最大化する\n  _frame.control.doMaximize(param);\n};\n\nWindowEventHelper.prototype._defaultFunctionDemaximize = function(_frame, evt) {\n  _frame.control.doDemaximize(\n    {});\n};\n\nWindowEventHelper.prototype._defaultFunctionRestoreFromFullscreen = function(_frame, evt) {\n  var me = this;\n  _frame.control.doDemaximize({\n    duration: me.restoreDuration ? me.restoreDuration : null,\n    callback: me.restoreCallback ? me.restoreCallback : null\n  });\n};\n\nWindowEventHelper.prototype._defaultFunctionMinimize = function(_frame, evt) {\n\n  //'minimizeButton'が押されたときに、最小化したい場合\n  _frame.control.doMinimize(this.minimizeParam);\n\n};\n\nWindowEventHelper.prototype._defaultFunctionDeminimize = function(_frame, evt) {\n  _frame.control.doDeminimize(this.deminimizeParam);\n};\n\nWindowEventHelper.prototype._defaultFunctionHide = function(_frame, evt) {\n\n  var param = {\n    align: 'CENTER_BOTTOM'\n  };\n  if (this.hideParam) {\n    param = this.hideParam;\n  }\n  _frame.control.doHide(param);\n\n};\n\nWindowEventHelper.prototype._defaultFunctionDehide = function(_frame, evt) {\n  var me = this;\n  _frame.control.doDehide(me.dehideParam);\n};\n\nWindowEventHelper.prototype.setupDefaultEvents = function() {\n  var me = this;\n\n  if (me.maximizeButton) {\n    //イベントはオーバーライドされる\n    me.frame.on(me.maximizeButton, 'click', me._defaultFunctionMaximize.bind(me));\n  }\n\n  if (me.demaximizeButton) {\n    me.frame.on(me.demaximizeButton, 'click', me._defaultFunctionDemaximize.bind(me));\n  }\n\n  if (me.minimizeButton) {\n    me.frame.on(me.minimizeButton, 'click', me._defaultFunctionMinimize.bind(me));\n  }\n\n  if (me.deminimizeButton) {\n    me.frame.on(me.deminimizeButton, 'click', me._defaultFunctionDeminimize.bind(me));\n  }\n\n  if (me.hideButton) {\n    me.frame.on(me.hideButton, 'click', me._defaultFunctionHide.bind(me));\n  }\n\n  if (me.hideButtons) {\n    for (var key in me.hideButtons) {\n      var hideButton = me.hideButtons[key];\n      if (hideButton) {\n        me.frame.on(hideButton, 'click', me._defaultFunctionHide.bind(me));\n      }\n    }\n  }\n\n};\n\nmodule.exports = WindowEventHelper;\n"
  },
  {
    "path": "webpack.config.js",
    "content": "const packageJson = require('./package.json');\nconst version = packageJson.version;\nconst path = require(\"path\");\nconst TerserPlugin = require('terser-webpack-plugin');\nconst webpack = require('webpack');\n\nmodule.exports = (env, argv) => {\n\n    const conf = {\n        mode: 'development',//production,development\n        devServer: {\n            port: 8080,\n            open: {\n                target: [\"index.html\"],\n            },\n            allowedHosts: \"all\",\n            static:\n                [\n                    {\n                        directory: path.join(__dirname, `public`),\n                        publicPath: \"/\",\n                        serveIndex: false,\n                        watch: true,\n                    },\n                ],\n        },\n        entry: {\n            jsframe: './src/index.js',\n        },\n        output: {\n            path: path.join(__dirname, \"lib\"),\n            filename: argv.mode === 'production' ? `[name].min.js` : `[name].js`,\n            libraryTarget: 'umd'\n        },\n        optimization: {\n            minimizer: [new TerserPlugin({\n                //extractComments: true,\n                //cache: true,\n                //parallel: true,\n                //sourceMap: true,\n                terserOptions: {\n                    compress: {\n                        drop_console: true,\n                    },\n                }\n\n            })],\n        },\n        module: {\n            rules: [\n                {\n                    test: /\\.css$/,\n                    use: [\n                        {loader: \"style-loader\"},\n                        {loader: \"css-loader\"}\n                    ]\n                },\n            ],\n        },\n        plugins: [\n            new webpack.BannerPlugin(`[name] v${version} Copyright (c) 2007-2020 Tom Misawa`)\n        ]\n    };\n\n    if (argv.mode !== 'production') {\n        conf.devtool = 'inline-source-map';\n    }\n\n    return conf;\n};\n\n"
  }
]