-
Notifications
You must be signed in to change notification settings - Fork 0
/
as3shim-bonsai-plugins-0.3.2.min.js
46 lines (46 loc) · 19.9 KB
/
as3shim-bonsai-plugins-0.3.2.min.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/**
* as3shim is (C) 2012 uxebu
*
* No permission or right to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software is granted.
* All rights reserved to the copyright holders.
*/
(function(){var o,h,l,z,j,A,B;o=Function("return this")();h=bonsai;l=function(){var e={1074:"Error #1074",1077:"Error #1077",2006:"Error #2006",2032:"Stream Error. URL: {{url}}",2098:"The loading object is not a .swf file, you cannot request SWF properties from it.",2099:"The loading object is not sufficiently loaded to provide this information.",2012:"Error #2012",2024:"Error #2024",2134:"Error #2134"};return{getById:function(c){return e[c]},renderWithPlaceholders:function(c,a){var b=e[c],f;for(f in a)b=
b.replace("{{"+f+"}}",a[f]);return b}}}();z=function(e){var c=e.Group,a=e.tools,e=function(){c.call(this);this.childrenWrapper=(new c).addTo(this);this.eventArea=(new c).attr({opacity:0,cursor:"pointer"}).addTo(this);this.stateChildren={normal:new c,hover:new c,active:new c};this.setupConnections();this.childrenWrapper.addChild(this.stateChildren.normal)};e.prototype=a.mixin(Object.create(c.prototype),{childrenWrapper:null,eventArea:null,stateChildren:null,isMouseDown:!1,isMouseOver:!1,type:"Group",
addActiveStateChild:function(b,a){this.addStateChild(b,"active",a)},addEventAreaChild:function(b,a){this.eventArea.addChild(b,a)},addHoverStateChild:function(b,a){this.addStateChild(b,"hover",a)},addNormalStateChild:function(b,a){this.addStateChild(b,"normal",a)},addStateChild:function(b,a,c){this.stateChildren[a].addChild(b,c)},displayState:function(b){var a=this.childrenWrapper.children();a.length&&a[0].stop&&a[0].stop();a=this.stateChildren[b].children();a.length?(this.childrenWrapper.clear().addChild(this.stateChildren[b]),
a[0].play&&a[0].play(0)):"normal"===b&&this.childrenWrapper.clear()},onMouseDown:function(){this.isMouseDown=!0;this.displayState("active")},onMouseUp:function(){this.isMouseDown=!1;this.displayState(this.isMouseOver?"hover":"normal")},onMouseOver:function(){this.isMouseOver=!0;var a="hover";this.isMouseDown&&(a="active");this.displayState(a)},onMouseOut:function(){this.isMouseOver=!1;var a="normal";this.isMouseDown&&(a="hover");this.displayState(a)},setupConnections:function(){this.eventArea.on("mouseover",
a.hitch(this,"onMouseOver"));this.eventArea.on("mouseout",a.hitch(this,"onMouseOut"));this.eventArea.on("pointerdown",a.hitch(this,"onMouseDown"));this.eventArea.on("pointerup",a.hitch(this,"onMouseUp"))}});return e}(h);j=function(e){var c=e.stage.options,c=c.as3shimConfig=c.as3shimConfig||{},c={debug:{logCalls:!1,logUnspyables:!1},warnAbout:{missingImplementation:c.showWarnings||!1,notAvailableApis:!1},stats:{warnAbout:{missingClass:c.showWarnings||!1}}};return e.stage.as3shimConfig=c}(h);A=function(e){return{getLoadableFileUrl:function(c){var a=
"",b=e.stage.options;"flashConfig"in b&&"__rootMovie__"in b.flashConfig&&(a=e.stage.options.flashConfig.__rootMovie__.loadableFileMap[c]);return a||c}}}(h);B=function(e){var c={};return{getFileAndLine:function(){var a=Error().stack,b=a&&a.split("\n");if(b)for(var f=0;f<b.length;f++){var c=b[f];if(/movie\.js:\d+:\d+/.test(c))return c}return"... oh dear, movie.js not found in trace. Complete trace:\n"+a},createFunctionSpy:function(a,b,f){var c=this;return function(a,b,f){return function(e){c.logFunctionCall(b,
f,[].slice.call(arguments,0));return a.apply(this,arguments)}}(a[b],f||""+a,b)},isSpyableOwnFunction:function(a,b){return a.hasOwnProperty!=Object.hasOwnProperty||!a.hasOwnProperty(b)||"toString"==b||a.__lookupGetter__(b)?!1:"function"==typeof a[b]},isSpyableOwnAccessor:function(a,b){return!!Object.getOwnPropertyDescriptor(a,b)&&!!a.__lookupGetter__(b)},_logFunctionCall:function(a,b,f){f=f.map(function(a){return"function"==typeof a?"Function with "+(""+a).split("\n").length+" lines":"object"==typeof a?
""+a:a});f=JSON.stringify(f);f=f.substring(1,f.length-1);console.log("SHIM call:",a+"."+b+"("+f+")")},_logEvents:function(a,b,f){console.log("SHIMS: 1000 `dispatchEvent` in "+f+"s of",b,a)},logFunctionCall:function(a,b,f){"dispatchEvent"==b?(b=f[0],c[b]?c[b].count++:c[b]={count:1,lastReset:+new Date},1E3<c[b].count&&(f=this._getElapsedTime(c[b].lastReset),this._logEvents(a,b,f),c[b]={count:1,lastReset:+new Date})):this._logFunctionCall(a,b,f)},_getElapsedTime:function(a){return((+new Date-a)/1E3).toFixed(2)},
logGetterCall:function(a,b,f){console.log("SHIM call: GET",a,b,""+f)},logSetterCall:function(a,b,f,c){console.log("SHIM call: SET",a,b,""+f,""+c)},spyOnFunction:function(a,b,c){a[b]=this.createFunctionSpy(a,b,c)},spyOnOwnAccessor:function(a,b,c){var q=Object.getOwnPropertyDescriptor(a,b),r=this;if(q.configurable){var h=q.get;q.get=function(){var a=h.apply(this);r.logGetterCall(c,b,a);return a};var s=q.set;q.set=function(a){r.logSetterCall(c,b,h.apply(this),a);s.apply(this,[a])}}else e.debug.logUnspyables&&
console.log('Can not spy on accessor "'+c+"."+b+'", because configurable=false.');Object.defineProperty(a,b,q)},spyOnClass:function(a,b){this.spyOnObject(a,b);this.spyOnObject(a.prototype,b+".prototype")},spyOnObject:function(a,b){for(var c in a)this.isSpyableOwnFunction(a,c)?this.spyOnFunction(a,c,b):this.isSpyableOwnAccessor(a,c)&&this.spyOnOwnAccessor(a,c,b)},spyOnAllClassInNamespace:function(a,b){for(var c in a){var e=a[c],h=e.prototype.__isNamespace__;e.__isNamespace__?this.spyOnAllClassInNamespace(e,
b+"."+c):e.__isClass__&&!h&&this.spyOnClass(e,b+"."+e)}}}}(j);l=function(e,c,a,b,f,h){function r(x){for(var a,d=[1,10,100],b=0,c=d.length;b<c;b++)if(a=J(x*d[b])%1,1.0E-5>a||0.99999<a)return K(x*d[b])/d[b];return x}function j(){}function s(a,b,d){d||(d={});p(a,b,i.mixin({get:j,set:j},d))}function l(a,b,d){3>arguments.length&&(d=b);p(a,C(b),{configurable:!1,enumerable:!1,writable:!1,value:d})}function p(a,b,d){d||(d={});var c={configurable:!0,enumerable:!0,writable:!0};"configurable"in d&&(c.configurable=
d.configurable);"enumerable"in d&&(c.enumerable=d.enumerable);d.get||d.set?("get"in d&&(c.get=d.get),"set"in d&&(c.set=d.set),delete c.value,delete c.writable):(delete c.get,delete c.set,c.value=d.value,"writable"in d&&(c.writable=d.writable));Object.defineProperty(a,b,c)}function D(a){return"__"+a+"__"}function E(a,b,d){p(a,D(b),{enumerable:!1,value:d})}function C(a){u.lastIndex=0;return(a.match(u)||[]).join("_").toUpperCase()}var y=e.tools,F=f.document,v={},o={}.hasOwnProperty,u=/[a-z]+[a-z\d]*(?!\d[A-Z])|[A-Z][a-z]+|[A-Z\d]+(?![a-z])/g,
L=[].slice,G=Math.PI,J=Math.abs,K=Math.round,k="bonsai"+(e.version+Math.random()).replace(/\D/g,""),i=y.mixin(y.beget(y),{addConstantsToClass:function(a){i.forEach(a,function(a){var d=a.shift();i.forEach(a,function(a){"string"===typeof a&&(a=[a]);a.unshift(d);l.apply(null,a)})})},createDummyFunction:function(b){var t="void";if(b===Object(b))var d=b,b=d.name,t=d.returnType||t;var e="Missing implementation for"+(b?" "+b:"")+", is dummy currently.",h=function(){v[b]||(v[b]=!0,c.warnAbout.missingImplementation&&
console.warn(e,"called by "+a.getFileAndLine()));if(d&&"returnValue"in d)return d.returnValue;var h={array:[],"boolean":!1,"int":0,number:0,string:"","null":null,"void":void 0},i=t.toLowerCase();return i in h?h[i]:Function("exposes","try { return new exposes."+t+"} catch (e) {}")(f.exports.asGlobal)};E(h,"isDummy",!0);return h},createUnimplementedFunction:function(a){var b="Unimplemented: "+(a?" "+a:"");return function(){if(!v[a])return v[a]=!0,c.warnAbout.missingImplementation&&console.warn(b),new Boolean(!1)}},
connectOnDemand:function(a,b,d,c){"onDemandConnects"in b||(b.onDemandConnects={});b.onDemandConnects[a]={connectFunc:d,disconnectFunc:c,connected:!1}},connectEventListener:function(a,b){var d=b.onDemandConnects;d&&a in d&&!d[a].connected&&(d[a].connectFunc(),d[a].connected=!0)},degToRad:function(a){return r(a*(G/180))},detachNode:function(a){return a.parentNode.removeChild(a)},disconnectEventListener:function(a,b){var d=b.onDemandConnects;d&&a in d&&(d[a].disconnectFunc(),d[a].connected=!1)},dispatchEventWithoutBubbling:function(a,
b){a[k].eventDispatcher.emit(b.type,b)},escapeAttributeValue:function(a){return(a+"").replace(/&/g,"&").replace(/</g,"<").replace(/"/g,""").replace(/\n/g,"
").replace(/\r/g,"
").replace(/\t/g,"	")},every:function(a,b,d){var c=-1,e=a.length;for(d&&(b=i.hitch(d,b));++c<e;)if(!b(a[c],c,a))return!1;return!0},expando:k,fixRoundingError:r,flashToBonsaiBlur:function(a,b){return(a+b)/7.5},forEachSnapshot:function(a,b){for(var d=0,c=(a||{}).snapshotLength;d<c&&!1!==b(a.snapshotItem(d),
d,a);d++);return a},getClassNameByClass:function(a,b){var d=a.displayName||a.name;a.__qualifiedName__&&(d=a.__qualifiedName__.split(".").pop());return d||b},getDescriptor:function(a,b){return Object.getOwnPropertyDescriptor(a,b)},getFlashConfig:function(){return h},getPrivateObjectOf:function(a,b){var d=i.expando;d in a||(a[d]={attrs:{}});d=a[d];if(b)for(var c in b)c in d||(d[c]=b[c]);return d},hasKey:function(a,b){return null!=a&&o.call(a,b)},noop:j,radToDeg:function(a){return r(a*(180/G))},createAndRunMovieFromClass:function(a){var b=
(new e.Movie).addTo(e.stage),d=Object.create(a.prototype),c=i.getPrivateObjectOf(d);c.raw=b;c.isRootMovie=!0;a.call(d);return d},setAccessor:s,setConst:l,setConsts:function(a,b){i.forEach(b,function(b){i.setConst(a,b[0],b[1])})},setDescriptor:p,setImmutable:function(a,b,d){var c={configurable:!1,writable:!1};3>arguments.length?("get"in b?c.get=b.get:"value"in b&&(c.value=b.value),b=b.name):c.value=d;p(a,b,c)},setMovieClipInteractiveState:function(a,b){a.graphics&&a.graphics[k].raw.attr("interactive",
b);var c=a[k].children,e=!1;if(c&&c.length)for(var f=0;f<c.length;f++){var h=c[f];"mouseEnabled"in h?e=!0:e?h[k].raw.attr("interactive",!1):h[k].raw.attr("interactive",b)}},setPseudoPrivate:E,setReadOnly:function(a,c,d){s(a,c,{get:d,set:function(){throw new ReferenceError(b.getById(1074));}})},some:function(a,b,c){var e=-1,f=a.length;for(c&&(b=i.hitch(c,b));++e<f;)if(b(a[e],e,a))return!0;return!1},toArray:function(a,b,c){return L.call(a,b||0,c||a.length)},toCamelCase:function(a){u.lastIndex=0;return a.replace(u,
function(a,b){return b?a.charAt().toUpperCase()+a.slice(1):a.toLowerCase()})},toConstCase:C,toPseudoPrivateName:D,toRGBA:function(a){return 256*a+255},timestampAs3Started:+new Date,xQuery:function(a,b,c){var e=F;b||(b=F);b&&(b[k]&&(b=b[k].raw),e=b.ownerDocument||b);return e.evaluate(a,b,null,null==c?6:c,null)}});return i}(h,j,B,l,o,A);j=function(){function e(){for(var a in c)this[a]=c[a]}var c={align:"left",blockIndent:0,bold:!1,bullet:!1,color:0,font:"Times",indent:0,italic:!1,kerning:!1,leading:0,
leftMargin:0,letterSpacing:0,rightMargin:0,size:12,tabStops:[],target:"",underline:!1,url:""};e.defaults=JSON.parse(JSON.stringify(c));return e}();h=function(e,c){function a(a,b){var c=[],d="__string__"+ +new Date,a=a.replace(/(['"])(?:\\\1|[^\1])*?\1/g,function(a){c.push(a);return d}),a=a.replace(/[^}]+\{/g,function(a){a=a.replace(/^\s+|\s+$/,"");return a.replace(/^|(,)/g,"$1 "+b+" ").replace(/^\s|(\s)\s+/g,"$1")});return a=a.replace(RegExp(d,"g"),function(){return c.shift()})}function b(){return this._owner.raw.styleSheet}
function f(b){var m=this._owner,c=m._cssSelectorPrefix;b?(b=a(b,c),m.raw.styleSheet=b,m._style||(m._style=new w("style"),m.addChild(m._style)),this._defaultStyleSheet||(this._defaultStyleSheet=a(V,c)),m._style.setAttribute("innerHTML",this._defaultStyleSheet+b)):m.raw.styleSheet=""}function h(){return this._owner.raw.autoSize}function j(a){var b=this._owner;b.raw.autoSize=a||"none";switch(a){case "none":b.setStyles({"float":"",width:"100px",height:"100px"});break;case "left":b.setStyles({"float":"left",
width:"auto",height:"auto"});break;case "right":b.setStyles({"float":"right",width:"auto",height:"auto"});b.text.setStyle("float","right");b.text.setStyle("textAlign","right");break;case "center":b.setStyles({display:"inline-block",width:"auto",height:"auto"}),b.setStyle("textAlign","center")}}function l(){return!!this._owner.raw.editable}function s(a){var a=!!a,b=this._owner;b.raw.editable=a;!0===a?(b.text.setAttribute("contenteditable","true"),b.text.setStyles({webkitUserModify:"read-write",webkitNbspMode:"space",
webkitLineBreak:"after-white-space"}),b.addCSSRule(":focus",{outline:"none"})):(b.text.setAttribute("contenteditable","false"),b.text.setStyles({webkitNbspMode:"",webkitLineBreak:""}))}function o(){return!!this._owner.raw.html}function p(a){this._owner.raw.html=!!a}function D(){return this._owner.raw.htmlText||""}function E(a){var b=this._owner;!1!==b.attr("html")&&b.innerHTML(a)}function C(){return this._owner.raw.maxChars}function y(a){this._owner.raw.maxChars=a}function F(){return!!this._owner.raw.password}
function v(a){var a=!!a,b=this._owner;b.raw.password=a;!0===a&&b.attr("text",Array(b.text.getAttribute("innerHTML").length+1).join("*"))}function z(){var a;a=""+this._owner.attr("htmlText");var b=a.match(RegExp("<TEXTFORMAT.*"+Q+">(.*)"));b&&b[1]&&(a=b[1].split(/<\/TEXTFORMAT>(.+)?/),a=M+a[0]+M+(a[1]||""));return R(a)}function u(a){for(var b=this._owner,c=b.attr("maxChars"),a=(a||"").toString(),a=null===c?a:a.slice(0,c),c="",a=a.split(M),d=0,e=a.length;d<e;d++)0!==a[d].length&&(c+=b.htmlFromText(a[d],
d%2));b.innerHTML(c);b.emit("change")}function L(){return!!this._owner.raw.selectable}function G(a){this._owner.raw.selectable=!!a}function J(){return!!this._owner.raw.background}function K(a){var b=this._owner;b.raw.background=!!a;b.attr("backgroundColor",b.attr("backgroundColor"))}function k(){var a=this._owner;return!0===a.attr("background")?a.raw.backgroundColor:H.backgroundColor}function i(a){var b=this._owner;b.raw.backgroundColor=a;b.attr("background")?b.setStyle("backgroundColor",N(a)):b.setStyle("backgroundColor",
"rgba(0,0,0,0)")}function x(){return!!this._owner.raw.border}function t(a){var b=this._owner;b.raw.border=!!a;b.attr("borderColor",b.attr("borderColor"))}function d(){var a=this._owner;return!0===a.attr("border")?a.raw.borderColor:H.borderColor}function A(a){var b=this._owner;b.raw.borderColor=a;b.attr("border")?b.setStyles({borderWidth:"1px",borderColor:N(a),borderStyle:"solid"}):b.setStyles({borderColor:"",borderWidth:"0px"})}function B(){return!!this._owner.raw.wordWrap}function T(a){var a=!!a,
b=this._owner;b.raw.wordWrap=a;!0===a?b.text.setStyles({whiteSpace:"normal",display:""}):b.text.setStyles({whiteSpace:"nowrap",display:"inline-block"})}function U(){return!!this._owner.raw.multiline}function W(a){var b=this._owner;b.raw.multiline=!!a;b.attr("wordWrap",b.attr("wordWrap"))}function X(){return this._owner.raw.width}function Y(a){var b=this._owner;b.raw.width=+a;"none"===b.attr("autoSize")&&b.setStyle("width",(a|0)+"px")}function Z(){var a=this._owner,b=a.attr("autoSize");if("undefined"===
typeof b||"none"===b)return a.raw.height;b=a.attr("text").split(/\n|\r/).length;return a.text.attr("fontLineHeight")*b}function $(a){var b=this._owner;b.raw.height=a;"none"===b.attr("autoSize")&&b.setStyle("height",(a|0)+"px")}function aa(){return this._owner.raw.align}function ba(a){var b=this._owner;b.raw.align=a;b.parent.setStyle("textAlign",a||"")}function ca(){return this._owner.raw.bold}function da(a){var a=!!a,b=this._owner;b.raw.bold=a;b.setStyle("fontWeight",a?"700":"normal")}function ea(){return this._owner.raw.color}
function fa(a){var b=this._owner;b.raw.color=a;b.setStyle("color",N(a))}function ga(){return this._owner.raw.font}function ha(a,b){var c=this._owner;I.isArray(a)?(b=a[1]+", "+O(a[0]),c.raw.font=a[0]):(b=O(a),c.raw.font=a);c.setStyle("fontFamily",b)}function ia(){return this._owner.raw.indent}function ja(a){var b=this._owner;b.raw.indent=a;b.setStyle("textIndent",a||"")}function ka(){return this._owner.raw.italic}function la(a){var a=!!a,b=this._owner;b.raw.italic=a;b.setStyle("fontStyle",a?"italic":
"")}function ma(){return this._owner.raw.leftMargin}function na(a){var b=this._owner;b.raw.leftMargin=a;b.setStyle("paddingLeft",a+"px")}function oa(){return this._owner.raw.rightMargin}function pa(a){var b=this._owner;b.raw.rightMargin=a;b.setStyle("paddingRight",a+"px")}function qa(){return this._owner.raw.letterSpacing}function ra(a){var b=this._owner;b.raw.letterSpacing=a;b.setStyle("letterSpacing",a+"px")}function sa(){return this._owner.raw.size}function ta(a){var a=+a,b=this._owner;b.raw.size=
a;b.setStyle("fontSize",a+"px");this.fontLineHeight+=0}function ua(){return this._owner.raw.underline}function va(a){var a=!!a,b=this._owner;b.raw.underline=a;b.setStyle("textDecoration",a?"underline":"")}function wa(){return this._owner.raw.fontLineHeight||0}function xa(a){var b=this._owner,c=b.attr("size"),a=c>a?c:a;b.raw.fontLineHeight=a;a+=b.attr("leading");b.parent.setStyle("line-height",a+"px")}function ya(){return this._owner.raw.leading}function za(a){var b=this._owner;b.raw.leading=a;this.fontLineHeight+=
0;b.parent.setStyle("margin-top",-a/2+"px")}function n(){w.call(this,"div",{},{overflow:"hidden",boxSizing:"border-box",WebkitBoxSizing:"border-box",MozBoxSizing:"border-box",MsBoxSizing:"border-box"});this._domID="bs-textfield-"+this.id;this._domInnerClass=this._domID+"-innerText";this._cssSelectorPrefix="#"+this._domID+" ."+this._domInnerClass;this.setAttribute("id",this._domID);this.innerBox=(new w("div",{"class":this._domID+"-innerBox"},{width:"100%",height:"100%",display:"inline-block",boxSizing:"border-box",
WebkitBoxSizing:"border-box",MozBoxSizing:"border-box",MsBoxSizing:"border-box",padding:"2px"})).addTo(this);this.raw={};Object.defineProperties(this._attributes,{wordWrap:g(B,T,!0),multiline:g(U,W,!0),autoSize:g(h,j,!0),background:g(J,K,!0),backgroundColor:g(k,i,!0),border:g(x,t,!0),borderColor:g(d,A,!0),html:g(o,p,!0),htmlText:g(D,E,!0),maxChars:g(C,y,!0),password:g(F,v,!0),text:g(z,u,!0),selectable:g(L,G,!0),editable:g(l,s,!0),width:g(X,Y,!0),height:g(Z,$,!0),styleSheet:g(b,f,!0)});this.css=(new w("style")).addTo(this.innerBox);
this.css.raw={};this.addCSSRule("a",{color:"inherit","text-decoration":"none"});this.addCSSRule("p",{padding:0,margin:0,"word-wrap":"normal"});this.text=(new w("span",{"class":this._domInnerClass})).addTo(this.innerBox);this.text.raw={};Object.defineProperties(this.text._attributes,{align:g(aa,ba,!0),bold:g(ca,da,!0),color:g(ea,fa,!0),font:g(ga,ha,!0),indent:g(ia,ja,!0),italic:g(ka,la,!0),leftMargin:g(ma,na,!0),rightMargin:g(oa,pa,!0),letterSpacing:g(qa,ra,!0),size:g(sa,ta,!0),underline:g(ua,va,!0),
fontLineHeight:g(wa,xa,!0),leading:g(ya,za,!0)});for(var a in H)this.attr(a,H[a]);a=new c;for(var e in a)this.text.attr(e,a[e]);this.text.raw.defaults=c.defaults}var S,R,O,w=e.DOMElement,I=e.tools,g=I.descriptorAccessor,Aa=Array.prototype.slice,V="a{color:#000;text-decoration:none;}",H={autoSize:"none",background:!1,backgroundColor:16777215,border:!1,borderColor:0,html:!0,htmlText:"",maxChars:null,text:"",selectable:!1,password:!1,wordWrap:!1,editable:!1,width:100,height:100,styleSheet:""},Q='bs-swf="true"',
M="\ufeff\ufeff",N=n.rgba=function(a){if("undefined"===typeof a)return"rgba(0,0,0,0)";a=/^#/.test(a)?parseInt(a.slice(1),16):a<<8|255;return e.color(a).rgba()},P=n.prototype=I.beget(w.prototype);P.addCSSRule=function(a,b){var c=this.css,d=c.raw,e=Aa.call(arguments,0,-1),b=arguments[e.length],a=e.join("\x00");d.hasOwnProperty(a)?I.mixin(d[a],b):d[a]=b;var f,g,h="",i=this._cssSelectorPrefix;for(a in d){e=d[a];g="";for(f in e)g+=f+": "+e[f]+"; ";h+=i+" "+a.split("\x00").join(", "+i+" ")+" { "+g+"}\n"}c.setAttribute("innerHTML",
h);return this};P.innerHTML=function(a){this.text.setAttribute("innerHTML",a);this.raw.htmlText=a;this.emit("change");return this};P.htmlFromText=function(a,b){this.addCSSRule("font",{"font-size":"inherit",color:"inherit","font-family":"inherit"});return n.htmlTextFormatWrapper("<P><FONT>"+S(a)+"</FONT></P>",b)};O=n.mapFontFamily=function(){var a={_sans:"sans-serif",_serif:"serif",_typewriter:"monospace"};return function(b){return b in a?a[b]:b}}();S=n.escapeHtml=function(a){return(a+"").replace(/&/g,
"&").replace(/</g,"<").replace(/>/g,">").replace(/\n|\r/g,"<br/>")};R=n.unescapeHtml=function(a){return a.replace(/&/g,"&").replace(/ /g," ").replace(/<br\/>/g,"\n").replace(/<(?:.|\n)*?>/gm,"").replace(/\</g,"<").replace(/\>/g,">")};n.htmlTextFormatWrapper=function(a,b){return"<TEXTFORMAT"+(b?" "+Q:"")+">"+a+"</TEXTFORMAT>"};return n}(h,j);(function(e,c,a,b){e=e.exports;e.tools=c;e.TextField=a;e.Button=b;return e})(o,l,h,z)})();