ESC.wsf 30 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225
  1. <?xml version="1.0"?>
  2. <!-- Generated by Soya.IO.WSFFactory v0.95 [Tue, 28 Feb 2006 21:22:15 UTC] -->
  3. <package>
  4. <job>
  5. <?job error="false" debug="false" ?>
  6. <resource id="about">
  7. -----------------------------------------------------------------------------
  8. ESC (ECMAScript Cruncher)
  9. * Version : 1.14
  10. * Date : 2006-02-28 22:22:15 [+0100]
  11. * License : GNU GPL 2 (http://www.gnu.org/copyleft/gpl.txt)
  12. * Copyright (C) 2001-2006 Thomas Loo &lt;tloo@saltstorm.net&gt;
  13. ---------------------------------------------------------------------------
  14. ESC is an ECMAScript(*) pre-processor enabling an unlimited number of
  15. external scripts to be compressed/crunched into tight, bandwidth-optimized
  16. packages. ESC supports compressing of external sources only. Trying to
  17. process scripts inlined in HTML, ASP, PHP or equivalent pages are NOT
  18. recommended with this version of ESC. This feature might be added in a
  19. future version. Type "cscript ESC.wsf -help" for usage instructions.
  20. ESC is built using components from the Soya Scripting API 1.0.0-b10,
  21. a uni-host/cross-browser ECMAScript compliant class-library distributed
  22. freely under the terms of the BSD License. The Soya Scripting API,
  23. 'lib-soya' and the Soya SDK can be found at http://www.saltstorm.net/
  24. ---------------------------------------------------------------------------
  25. * ECMAScript is the international standard for javascript.
  26. -----------------------------------------------------------------------------
  27. </resource>
  28. <resource id="copyright">
  29. -----------------------------------------------------------------------------
  30. This program is free software; you can redistribute it and/or
  31. modify it under the terms of the GNU General Public License
  32. version 2 as published by the Free Software Foundation.
  33. This program is distributed in the hope that it will be useful,
  34. but WITHOUT ANY WARRANTY; without even the implied warranty of
  35. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  36. GNU General Public License for more details.
  37. You should have received a copy of the GNU General Public License
  38. along with this program; if not, write to the Free Software
  39. Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  40. -----------------------------------------------------------------------------
  41. </resource>
  42. <resource id="usage">
  43. ------------------------------------------------------------------------------
  44. Usage: cscript ESC.wsf -l [0-4] -ow output.js foo.js bar.js C:\scripts\baz...
  45. -----------------------------------------------------------------------------
  46. -a [-about] : Description page
  47. -c [-copyright] : Copyright/license notice
  48. -e [-example] : Examples of usage
  49. -h [-help] : This help-screen
  50. -----------------------------------------------------------------------------
  51. -l [-level] [01(2)34] : [optional] Set crunch-level (4 sets -$ on)
  52. -s [-silent] : [optional] Run silent, nada stdout
  53. -v [-verbose] : [optional] Run in verbose mode
  54. -$ : [optional] Activate variable-substitution engine
  55. -----------------------------------------------------------------------------
  56. -oa &lt;filename&gt; : Target filename for appending
  57. -ow &lt;filename&gt; : Target filename for writing
  58. -ow STDOUT : Write stream to STDOUT
  59. -----------------------------------------------------------------------------
  60. &lt;input-file(s)&gt; : [required]
  61. file(s) and/or directories containing scripts to crunch...
  62. (paths containing spaces must be quoted)
  63. </resource>
  64. <resource id="example">
  65. -----------------------------------------------------------------------------
  66. Examples of usage.
  67. Crunch 'original1.js','original2.js' and 'original3.js' at
  68. level 2 (default) and save the output as 'crunched.js'.
  69. Any previous file named 'crunched.js' will be overwritten.
  70. X:\cscript ESC.wsf -ow crunched.js original1.js original2.js original3.js
  71. ---------------------------------------------------------------------------
  72. Grab all scriptfiles (.js) in directory 'C:\script-directory' and crunch
  73. them at level 1 (comment and empty line removal only) and append the result
  74. to 'crunched.js'. If 'crunched.js' doesn't exist, it will be created.
  75. X:\cscript ESC.wsf -l 1 -oa crunched.js C:\script-directory
  76. ---------------------------------------------------------------------------
  77. Subject 'original1.js' and 'original2.js' for variable substitution,
  78. but perform no comment or whitespace removal.
  79. Redirect output to STDOUT instead of writing to file.
  80. X:\cscript ESC.wsf -l 0 -$ -ow STDOUT original1.js original2.js
  81. ---------------------------------------------------------------------------
  82. Crunch 'original.js' using variable substitution and remove
  83. any occurance of whitespace (where permitted...)
  84. and save it as 'crunched.js' (equals -l 3 -$)
  85. X:\cscript ESC.wsf -l 4 -ow crunched.js original.js
  86. ---------------------------------------------------------------------------
  87. Try 'ESC.wsf -help' for information about available run-time directives.
  88. -----------------------------------------------------------------------------
  89. </resource>
  90. <resource id="wscript">
  91. ESC must be run from a DOS command prompt under
  92. cscript.exe. Do you want to switch host and have
  93. ESC bring up a helpscreen ?
  94. </resource>
  95. <resource id="jscript">
  96. ESC needs JScript 5.5 or higher to score...
  97. You need to update your version of JScript to run ESC.
  98. Read the 'Requirements' section in the manual for information
  99. how to obtain and install the latest version of Microsofts
  100. 'Windows Script' package.
  101. </resource>
  102. <resource id="common.map">
  103. Anchor
  104. ActiveXObject
  105. Call
  106. Closure
  107. Components
  108. Dictionary
  109. Document
  110. DOMParser
  111. Embed
  112. EvalError
  113. Event
  114. Form
  115. Global
  116. HttpCookie
  117. Image
  118. JavaArray
  119. JavaClass
  120. JavaMethod
  121. JavaObject
  122. JavaPackage
  123. Layer
  124. MimeType
  125. MimeTypeArray
  126. Option
  127. Url
  128. Packages
  129. Plugin
  130. PluginArray
  131. Popup
  132. RangeError
  133. ReferenceError
  134. TypeError
  135. StyleClass
  136. StyleSelector
  137. SyntaxError
  138. TypeError
  139. WScript
  140. URIError
  141. XMLHttpRequest
  142. XMLSerializer
  143. XPathEvaluator
  144. XSLTDocument
  145. XSLTProcessor
  146. Attr
  147. CDATASection
  148. CharacterData
  149. Comment
  150. CSS2Properties
  151. DOMException
  152. DOMImplementation
  153. DocumentType
  154. Element
  155. EntityReference
  156. EvalError
  157. NamedNodeMap
  158. Node
  159. NodeList
  160. Notation
  161. ProcessingInstruction
  162. Text
  163. HTMLElement
  164. HTMLDocument
  165. HTMLCollection
  166. HTMLHtmlElement
  167. HTMLHeadElement
  168. HTMLLinkElement
  169. HTMLTitleElement
  170. HTMLMetaElement
  171. HTMLBaseElement
  172. HTMLIsIndexElement
  173. HTMLStyleElement
  174. HTMLBodyElement
  175. HTMLFormElement
  176. HTMLSelectElement
  177. HTMLOptGroupElement
  178. HTMLOptionElement
  179. HTMLInputElement
  180. HTMLTextAreaElement
  181. HTMLButtonElement
  182. HTMLLabelElement
  183. HTMLFieldSetElement
  184. HTMLLegendElement
  185. HTMLUListElement
  186. HTMLOListElement
  187. HTMLDListElement
  188. HTMLDirectoryElement
  189. HTMLMenuElement
  190. HTMLLIElement
  191. HTMLBlockquoteElement
  192. HTMLDivElement
  193. HTMLParagraphElement
  194. HTMLHeadingElement
  195. HTMLQuoteElement
  196. HTMLPreElement
  197. HTMLBRElement
  198. HTMLBaseFontElement
  199. HTMLFontElement
  200. HTMLHRElement
  201. HTMLModElement
  202. HTMLAnchorElement
  203. HTMLImageElement
  204. HTMLObjectElement
  205. HTMLParamElement
  206. HTMLAppletElement
  207. HTMLMapElement
  208. HTMLAreaElement
  209. HTMLScriptElement
  210. HTMLTableElement
  211. HTMLTableCaptionElement
  212. HTMLTableColElement
  213. HTMLTableSectionElement
  214. HTMLTableRowElement
  215. HTMLTableCellElement
  216. HTMLFrameSetElement
  217. HTMLFrameElement
  218. HTMLIFrameElement
  219. _newEnum
  220. alert
  221. atob
  222. attachEvent
  223. back
  224. btoa
  225. captureEvents
  226. clearTimeout
  227. clearInterval
  228. close
  229. CollectGarbage
  230. confirm
  231. createEventObject
  232. createPopup
  233. decodeURI
  234. decodeURIComponent
  235. detachEvent
  236. dump
  237. encodeURI
  238. encodeURIComponent
  239. escape
  240. eval
  241. execScript
  242. find
  243. forward
  244. frameElement
  245. getAttention
  246. GetAttention
  247. getClass
  248. getComputedStyle
  249. getResource
  250. GetObject
  251. home
  252. isFinite
  253. isNaN
  254. moveBy
  255. moveTo
  256. open
  257. openDialog
  258. parseInt
  259. parseFloat
  260. print
  261. prompt
  262. releaseEvents
  263. resizeBy
  264. resizeTo
  265. ScriptEngine
  266. ScriptEngineMajorVersion
  267. ScriptEngineMinorVersion
  268. ScriptEngineBuildVersion
  269. scroll
  270. scrollBy
  271. scrollByLines
  272. scrollByPages
  273. scrollIntoView
  274. scrollTo
  275. setCursor
  276. setInterval
  277. setTimeout
  278. showHelp
  279. showModalDialog
  280. showModelessDialog
  281. sizeToContent
  282. stop
  283. taint
  284. toString
  285. updateCommands
  286. unescape
  287. untaint
  288. valueOf
  289. _content
  290. appCore
  291. arguments
  292. arity
  293. callee
  294. caller
  295. clientInformation
  296. clipboardData
  297. closed
  298. constructor
  299. controllers
  300. crypto
  301. debug
  302. defaultStatus
  303. directories
  304. document
  305. element
  306. event
  307. external
  308. history
  309. forward
  310. frames
  311. Infinity
  312. innerHeight
  313. innerWidth
  314. java
  315. length
  316. loading
  317. location
  318. locationbar
  319. name
  320. menubar
  321. navigator
  322. netscape
  323. offscreenBuffering
  324. opener
  325. opera
  326. outerHeight
  327. outerWidth
  328. pageXOffset
  329. pageYOffset
  330. parent
  331. personalbar
  332. pkcs11
  333. prompter
  334. prototype
  335. returnValue
  336. screen
  337. screenLeft
  338. screenTop
  339. screenX
  340. screenY
  341. scrollX
  342. scrollY
  343. scrollbars
  344. self
  345. sidebar
  346. status
  347. statusbar
  348. style
  349. sun
  350. title
  351. toolbar
  352. top
  353. window
  354. onafterprint
  355. onbeforeprint
  356. onbeforeunload
  357. onblur
  358. onchange
  359. onclick
  360. onclose
  361. onerror
  362. onfocus
  363. onhelp
  364. onload
  365. onresize
  366. onreset
  367. onscroll
  368. onselect
  369. onunload
  370. onmousedown
  371. onmouseup
  372. onmouseover
  373. onmouseout
  374. onkeydown
  375. onkeyup
  376. onkeypress
  377. onmousemove
  378. onsubmit
  379. onreset
  380. onchange
  381. onselect
  382. onclose
  383. onabort
  384. onerror
  385. onpaint
  386. ondragdrop
  387. Soya
  388. BOOTSTRAP
  389. </resource>
  390. <resource id="core.map">
  391. abstract
  392. break
  393. continue
  394. const
  395. class
  396. catch
  397. case
  398. debugger
  399. default
  400. double
  401. delete
  402. do
  403. enum
  404. extends
  405. else
  406. function
  407. finally
  408. float
  409. false
  410. for
  411. get
  412. instanceof
  413. implements
  414. import
  415. int
  416. in
  417. if
  418. long
  419. null
  420. new
  421. protected
  422. private
  423. package
  424. public
  425. return
  426. switch
  427. static
  428. super
  429. set
  430. typeof
  431. throw
  432. true
  433. this
  434. try
  435. undefined
  436. void
  437. var
  438. while
  439. with
  440. getter
  441. setter
  442. __defineGetter__
  443. __defineSetter__
  444. end
  445. elif
  446. cc_on
  447. _win32
  448. _win16
  449. _mac
  450. _alpha
  451. _x86
  452. _mc680x0
  453. _PowerPC
  454. _jscript
  455. _jscript_build
  456. _jscript_version
  457. Array
  458. Boolean
  459. Date
  460. Enumerator
  461. Error
  462. Function
  463. Math
  464. Number
  465. Object
  466. RegExp
  467. String
  468. VBArray
  469. </resource>
  470. <script language="JScript">
  471. <![CDATA[
  472. /*** <POD [ESCtool] (Soya/1.0.0-b10; crlvl:2/1; Tue, 28 Feb 2006 21:22:16 UTC)> ***/
  473. /**
  474. Proving that ESC actually can handle name-mangling and as a general self-sanity
  475. check, ESC has been used to compress itself along with other required Soya-beans
  476. while creating the package you see below. To examine these beans in a more human
  477. readable form, get the latest distribution of the Soya API.
  478. **/
  479. function Soya_API($h)
  480. {
  481. this.name='Soya';
  482. this.version='1.0.0-b10';
  483. this.type='static';
  484. this.debug=0;
  485. this.host=$h;
  486. this.libPath='/lib-soya/';
  487. this.podPath='pods';
  488. this.resourcePath='resources';
  489. this.attachBean=$a;
  490. this.declareBean=$b;
  491. this.registerBean=$c;
  492. this.BeanPrototype=Soya_BeanPrototype;
  493. this.beans=new Object();
  494. this.beans.all=new Array();
  495. Soya_Loader.prototype=new this.BeanPrototype();
  496. this.Loader=new Object();
  497. this.Loader.orphans=new Array();
  498. this.Loader.callbacks=new Object();
  499. this.declareBean('Soya.BeanPrototype',null,this.name,false,true);
  500. }
  501. function Soya_VirtualBean(){}
  502. function Soya_BeanPrototype(){
  503. this.name='Soya.BeanPrototype';
  504. }
  505. function $a($i){
  506. if(!$i.virtual){
  507. eval($i.mutexName).prototype=$i;
  508. eval($i.name+'='+(!$i.constructable?'new ':' ')+
  509. $i.mutexName+(!$i.constructable?'()':''));
  510. }
  511. else eval($i.name+'=this.beans["'+$i.name+'"]');
  512. $i.complete=true;
  513. if(this.Loader&&this.Loader.callbacks[$i.name])
  514. this.Loader.callbacks[$i.name](eval($i.name));
  515. }
  516. function $b($j,$k,$l,$m,$n){
  517. var $o=$k?new this.BeanPrototype():new Soya_VirtualBean();
  518. $o.name=$j;
  519. $o.mutexName=$k||'Soya_VirtualBean';
  520. $o.parentName=$l;
  521. $o.iid=0;
  522. $o.stack=new Array();
  523. $o.complete=Boolean($n);
  524. $o.constructable=($k&&!$m);
  525. $o.virtual=!$k;
  526. return(this.beans[$j]=this.beans.all[this.beans.all.length]=$o);
  527. }
  528. function $c($j,$m,$p,i){
  529. var $q;
  530. var $r=$j.split('\x2e');
  531. var $k=$r.join('\x5f');
  532. if(!this.beans[$j]){
  533. if($p){
  534. var $s='';
  535. $q=$r[0];
  536. for(i=1;i<$r.length-1;i++){
  537. $s+=$q;
  538. $q+=('\x2e'+$r[i]);
  539. if(i<=$p&&!this.beans[$q])
  540. this.attachBean(this.declareBean($q,null,$s,true,true));
  541. }
  542. }
  543. $r.length-=$p?$p:1;
  544. $q=$r.join('\x2e');
  545. this.declareBean($j,$k,$q,$m);
  546. if($r.length>1&&!this.beans[$q])
  547. this.Loader.orphans[this.Loader.orphans.length]=this.beans[$j];
  548. else{
  549. this.attachBean(this.beans[$j]);
  550. var $t=new Array();
  551. for(i=0;i<this.Loader.orphans.length;i++)
  552. if(this.Loader.orphans[i].parentName==$j)
  553. this.attachBean(this.Loader.orphans[i]);
  554. else $t[$t.length]=this.Loader.orphans[i];
  555. this.Loader.orphans=$t;
  556. }
  557. }
  558. return Boolean(i)
  559. }
  560. function $d($u){
  561. this.getResourcePath=Function('sName',
  562. "return(Soya.libPath + Soya.resourcePath + '/' + (sName||this.name).split('.').join('/') + '/')");
  563. this.getClass=Function('sName','return eval(Soya.beans[sName || this.name].mutexName)');
  564. this.toString=Function("return('[object ' + (this.name || 'noname') + ']')");
  565. this.getBeanPath=Function('sName',
  566. "return(Soya.libPath + (sName||this.name).split('.').join('/') + '.js')");
  567. this.type='static';
  568. if(!$u){
  569. this.finalize=$f;
  570. this.initialize=$e;
  571. }
  572. }
  573. function $e($v){
  574. this.iid=this.getClass().prototype.iid++;
  575. if(this.stackable)
  576. this.stack[this.iid]=this;
  577. if(!Soya.beans[this.name].initialized){
  578. $v=$v||
  579. Soya.host[Soya.beans[this.name].mutexName+'_initialize'];
  580. if(typeof($v)=='function')
  581. Soya.beans[this.name].initialized=!$v(this.getClass(),this);
  582. }
  583. }
  584. function $f($w){
  585. $w=$w||
  586. Soya.host[Soya.beans[this.name].mutexName+'_finalize'];
  587. if(typeof($w)=='function')
  588. $w(this.getClass(),this);
  589. }
  590. function Soya_Loader(){};
  591. function $g($x,$y,$z){
  592. if(!Soya.fso)
  593. Soya.fso=new ActiveXObject('Scripting.FilesystemObject');
  594. if(Soya.fso.FileExists($x)){
  595. var $i=Soya.fso.GetFile($x),
  596. $A=Soya.fso.OpenTextFile($i.Path),
  597. $B=$A.Read($z||$i.Size);
  598. $A.Close();
  599. return $B;
  600. }
  601. else if(!$y)
  602. return(WScript.Echo(this.name+' '+Soya.version+
  603. '> File Not found: '+$x),WScript.Quit(99));
  604. else return '';
  605. }
  606. Soya_BeanPrototype.prototype=new $d(0);
  607. Soya_VirtualBean.prototype=new $d(1);
  608. Soya_API.prototype=new $d(1);
  609. var Soya=new Soya_API(this);
  610. if(typeof(BOOTSTRAP)=='function')BOOTSTRAP(Soya);
  611. function Soya_Common()
  612. {
  613. this.name='Soya.Common';
  614. this.type='static';
  615. this.version='1.03';
  616. this.dependencies=[];
  617. this.destroy=$E;
  618. this.makeFunction=$G;
  619. this.typematch=$F;
  620. this.getObject=$C;
  621. this.$ih=$H;
  622. Function.prototype.getArguments=$D;
  623. Soya.BeanPrototype.prototype.Extends=
  624. Function('oBean','bOvr','Soya.Common.$ih(oBean, this, bOvr)');
  625. Soya.BeanPrototype.prototype.Implements=
  626. Function('oBean','bOvr','Soya.Common.$ih(this, oBean, bOvr)');
  627. this.interfaces=new Object();
  628. this.interfaces['Scripting.FilesystemObject']=Soya.fso;
  629. }
  630. function $C($I,$J){
  631. if(typeof(this.interfaces[$I])=='undefined'){
  632. if(typeof ActiveXObject=='function'){
  633. Soya.host.msieax=null;
  634. if(typeof Error=='function')
  635. eval('try{Soya.host.msieax=new ActiveXObject("'+$I+'")}catch(e){}');
  636. else{
  637. var $K=String("on error resume next\nself.msieax=CreateObject('"+$I+"'))");
  638. self.execScript($K,'vbscript');
  639. }
  640. if(!$J)
  641. return Soya.host.msieax;
  642. this.interfaces[$I]=Soya.host.msieax;
  643. }
  644. }
  645. return this.interfaces[$I]||void(0);
  646. }
  647. function $D($L){
  648. var $M=[],
  649. $N=(isNaN($L)||$L<1)?
  650. 0:Math.min($L,this.arguments.length);
  651. for(;$N<this.arguments.length;$N++)
  652. $M[$M.length]=this.arguments[$N];
  653. return $M;
  654. }
  655. function $E($O){
  656. if($O!=null&&typeof($O)=='object')
  657. for(var $P in $O){
  658. if(typeof($O[$P])=='object'&&$O[$P])
  659. if($O[$P].constructor&&!$O[$P].style){
  660. this.destroy($O[$P]);
  661. delete($O[$P]);
  662. }
  663. else $O[$P]=null;
  664. }
  665. }
  666. function $F($Q,$R){
  667. var $S;
  668. switch(typeof($Q)){
  669. case 'number':$S=2;break;
  670. case 'boolean':$S=4;break;
  671. case 'string':$S=8;break;
  672. case 'function':$S=16;break;
  673. case 'object':$S=32;break;
  674. default:$S=1;break;
  675. }
  676. return Boolean($S&($R||62));
  677. }
  678. function $G($T){
  679. if($T&&this.typematch($T,16))
  680. return $T;
  681. else return Function(($T&&this.typematch($T,8))?$T:'');
  682. }
  683. function $H($U,$V,$W){
  684. for(var $P in $U)
  685. if($P!='name'&&(!$W||typeof($V[$P])=='undefined'))
  686. $V[$P]=$U[$P];
  687. }
  688. if(typeof(Soya)=='object')Soya.registerBean('Soya.Common',true);
  689. function Soya_WSH()
  690. {
  691. this.name='Soya.WSH';
  692. this.type='static';
  693. this.version='0.88';
  694. this.dependencies=['Soya.Common','Soya.WSH.Registry'];
  695. this.osInfo={};
  696. this.arguments={length:0};
  697. this.$09=function($00)
  698. {return $00.length<2?$00:$00.replace(/^\\-/,'-').replace(/\\{2}/g,'\\')};
  699. this.getArgument=function($01){return(this.arguments[$01]||"")}
  700. this.getArguments=$X;
  701. this.getOSInfo=$Z;
  702. this.getShell=$Y;
  703. }
  704. function $X(){
  705. if(!this.arguments.length&&WScript.Arguments.length){
  706. var i,$02,$03=[],$04=new RegExp('^-+');
  707. for(i=0;i<WScript.Arguments.length;i++)
  708. $03[$03.length]=WScript.Arguments.item(i);
  709. for(i=0;i<$03.length;i++){
  710. $02=$03[i].replace($04,'-');
  711. if($02.length>1&&$04.test($02)){
  712. if(typeof $03[i+1]!='undefined'&&!$04.test($03[i+1]))
  713. this.arguments[this.$09($02.replace($04,''))]=
  714. this.$09($03[1+(i++)]);
  715. else this.arguments[this.$09($02.replace($04,''))]=1;
  716. };
  717. else if($02.length)
  718. this.arguments[this.arguments.length++]=this.$09($03[i]);
  719. }
  720. }
  721. return this.arguments;
  722. }
  723. function $Y(){
  724. if(!this.shell)
  725. this.shell=Soya.Common.getObject('WScript.Shell');
  726. return this.shell;
  727. }
  728. function $Z(){
  729. if(this.osInfo.$0a)
  730. return this.osInfo;
  731. var $05=Soya.Common.getObject('Scripting.FilesystemObject'),
  732. $06=this.getShell().ExpandEnvironmentStrings("%SYSTEMROOT%");
  733. this.osInfo.MSIEVersion=Soya.WSH.Registry.regRead('HKLM\\SOFTWARE\\Microsoft\\Internet Explorer\\Version');
  734. this.osInfo.NETVersion=Soya.WSH.Registry.regRead('HKLM\SOFTWARE\Microsoft\.NETFramework\\Version')||-1;
  735. this.osInfo.SPVersion=Soya.WSH.Registry.regRead('HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CSDVersion')||-1;
  736. this.osInfo.JSVersion=parseFloat(ScriptEngineMajorVersion()+'.'+ScriptEngineMinorVersion());
  737. if($05.FolderExists($06+'\\system32'))
  738. $07=$05.GetFileVersion($06+'\\system32\\kernel32.dll');
  739. else if($05.FolderExists($06+'\\system'))
  740. $07=$05.GetFileVersion($06+'\\system\\kernel32.dll');
  741. if($07){
  742. /^(\d)\.(\d+)\.(\d+)\.\d+$/.test($07);
  743. this.osInfo.majorVersion=parseInt(RegExp.$1);
  744. this.osInfo.minorVersion=parseInt(RegExp.$2,10);
  745. this.osInfo.buildVersion=parseInt(RegExp.$3,10);
  746. this.osInfo.version=$07;
  747. var $08={
  748. '4.00.950':'Win95',
  749. '4.00.1111':'Win95 OSR2',
  750. '4.00.1381':'WinNT',
  751. '4.10.1998':'Win98',
  752. '4.10.2222':'Win98SE',
  753. '4.90.3000':'WinME',
  754. '5.0.2195':'Win2K',
  755. '5.10.2600':'WinXP'
  756. };
  757. this.osInfo.name=$08[$07.replace(/\.\d+$/,'')]||'unknown';
  758. }
  759. this.osInfo.$0a=1;
  760. return this.osInfo;
  761. }
  762. if(typeof(Soya)=='object')Soya.registerBean('Soya.WSH',true);
  763. function Soya_Saltstorm_ESC($0t,$0u,$0v,$y)
  764. {
  765. this.name='Soya.Saltstorm.ESC';
  766. this.version='1.14';
  767. this.type='constructor';
  768. this.dependencies=['Soya.Common','Soya.ECMA.Array'];
  769. this.resourcePath=$0v||'';
  770. this.crunchLevel=$0t||2;
  771. this.substitute=false;
  772. this.verbose=$0u;
  773. this.silent=($y||typeof window=='object');
  774. this.initialize();
  775. this.flush();
  776. }
  777. function Soya_Saltstorm_ESC_initialize($0w,$0x){
  778. $0y=$0x;
  779. var $0z="(?:\"{2}|'{2}|\".*?.\"|'.*?.'|\\/(?!\\*|\\/)..*?\\/)";
  780. var $0A="[-!%&;<=>~:\\/\\^\\+\\|\\,\\(\\)\\*\\?\\[\\]\\{\\}]+";
  781. var $0B="\\/\\*(?!@).(?:.|\\n)*?\\*\\/|\\/\\/.*";
  782. var $0C="\".*?.\"|'.*?.'|\\s*\\/{2,}.*\\n";
  783. var $0D="\\}(?!catch|else|while)([^;,\\|\\.\\]\\)\\}])";
  784. with($0w){
  785. prototype.fileFilter=new RegExp('.+\\\\(?!$|_)\\w*\\.js$','i');
  786. prototype.$1r=["0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",9];
  787. prototype.$1s={};
  788. prototype.fso=Soya.Loader.fso||new ActiveXObject('Scripting.FilesystemObject');
  789. prototype.core={};
  790. prototype.bless={};
  791. prototype.mangle={};
  792. prototype.common={};
  793. prototype.$1t=$g;
  794. prototype.crunch=$0r;
  795. prototype.flush=function(){this.buffer='';this.report=new $0c()};
  796. prototype.getSubstitute=$0g;
  797. prototype.loadMaps=$0d;
  798. prototype.out=$0b;
  799. prototype.load=$0e;
  800. prototype.save=$0f;
  801. prototype.getReport=$0s;
  802. prototype.$1u=new RegExp("[$_]");
  803. prototype.$1v=new RegExp("[^$\\w]","g");
  804. prototype.$1w=new RegExp("^[\\x00\\.\"']");
  805. prototype.$1x=new RegExp("\\s+$");
  806. prototype.$1y=new RegExp("^\\s*\\W");
  807. prototype.$1z=new RegExp("^[-\\\\+\"~'!]");
  808. prototype.$1A=new RegExp("("+$0z+")|("+$0B+")","g");
  809. prototype.$1B=new RegExp("("+$0C+")","g");
  810. prototype.$1C=new RegExp("("+$0z+")|(\\r?\\n\\s+)|(\\x20{2,})","g");
  811. prototype.$1D=new RegExp("("+$0z+")|(\\w+)?\\s+("+$0A+")","g");
  812. prototype.$1E=new RegExp("("+$0z+")|("+$0A+")[ \\t]+","g");
  813. prototype.$1F=new RegExp("("+$0z+")|function[\\n\\s]+([$\\w]+)","g");
  814. prototype.$1G=new RegExp("("+$0z+")|("+$0B+")|(\\W[\\n\\s]*?[$\\w]+)\\b","gm");
  815. prototype.$1H=new RegExp("("+$0z+")|(\\x00)|\\.[\\n\\s]*?([$_][$\\w]{3,})","g");
  816. prototype.$1I=new RegExp("("+$0z+")|(\\S)\\s*[\\r\\n]+\\s*(\\S)","g");
  817. prototype.$1J=new RegExp("[$\\w][$\\w]");
  818. prototype.$1K=new RegExp("("+$0D+")","g");
  819. }
  820. }
  821. function $0b($0E,$0F){
  822. if(!this.silent){
  823. var $0G=String((!$0F?'ESC> ':'')+($0E||''));
  824. WScript.Echo($0G);
  825. }
  826. }
  827. function $0c(){
  828. this.scripts=[];
  829. this.rawSize=
  830. this.crunchedSize=
  831. this.elapsedTime=0;
  832. }
  833. function $0d(){
  834. if(this.$1L)
  835. return;
  836. var $0H,$0I,$0J,$0K,$0L;
  837. for(var i=0;i<arguments.length;i++){
  838. $0H=arguments[i].replace(/\W.+$/,'');
  839. try{
  840. $0J=getResource(arguments[i]).split(/\r?\n/g)||[];
  841. for(var j=0;j<$0J.length;j++)
  842. if($0J[j].length&&!$0y.$1y.test($0J[j]))
  843. Soya_Saltstorm_ESC.prototype[$0H][$0J[j].replace($0y.$1x,'')]=1;
  844. if(this.verbose)
  845. this.out('Parsed map "'+$0H+'", '+$0J.length+' entries.')
  846. }
  847. catch($0M){
  848. if($0M)
  849. $0J=null;
  850. }
  851. if($0J)
  852. continue;
  853. else $0I=this.fso.BuildPath(this.resourcePath,arguments[i]);
  854. if(/^common|core/.test(arguments[i])&&!this.fso.FileExists($0I)){
  855. this.out('Couldn\'t $0N $0O:'+
  856. this.fso.GetAbsolutePathName($0I));
  857. return WScript.Quit(99);
  858. }
  859. else if(typeof this[$0H]!='object'){
  860. this.out('Unrecognized mapname : '+$0H);
  861. return WScript.Quit(99);
  862. }
  863. else if(this.fso.FileExists($0I)){
  864. $0J=this.fso.OpenTextFile($0I);
  865. $0L=0;
  866. while(!$0J.AtEndOfStream){
  867. $0K=$0J.ReadLine();
  868. if($0K.length&&!$0y.$1y.test($0K))
  869. Soya_Saltstorm_ESC.prototype[$0H][$0K.replace($0y.$1x,'')]=++$0L;
  870. }
  871. $0J.Close();
  872. Soya_Saltstorm_ESC.prototype[$0H].length=$0L;
  873. if(this.verbose)
  874. this.out('Loaded map "'+$0H+'", '+$0L+' entries. ['+$0I+']');
  875. }
  876. }
  877. this.$1L=1;
  878. }
  879. function $0e(){
  880. var i,$0P,$0Q,$0R,$0S=[];
  881. for(i=0;i<arguments.length;i++){
  882. if(arguments[i]&&this.fso.FolderExists(arguments[i])){
  883. $0R=new Enumerator(this.fso.GetFolder(arguments[i]).SubFolders);
  884. for(;!$0R.atEnd();$0R.moveNext())
  885. arguments[arguments.length++]=$0R.item().Path;
  886. $0R=new Enumerator(this.fso.GetFolder(arguments[i]).Files);
  887. for(;!$0R.atEnd();$0R.moveNext())
  888. if($0R.item().Size&&this.fileFilter.test($0R.item().Path))
  889. $0S.push($0R.item().Path);
  890. }
  891. else if(arguments[i])
  892. $0S.push(arguments[i]);
  893. }
  894. for(i=0;i<$0S.length;i++){
  895. if(!this.fso.FileExists($0S[i])){
  896. this.out('Couldn\'t $0N $0T:"' + this.fso.GetAbsolutePathName(aLoadQueue[i]) + '"');
  897. return WScript.Quit(99);
  898. }
  899. else if(this.verbose)
  900. this.out('Loading script :"'+this.fso.GetAbsolutePathName($0S[i])+'"');
  901. $0Q=this.fso.GetFile($0S[i]);
  902. this.buffer+=(this.report.scripts.length?'\r\n':'');
  903. this.buffer+=this.$1t($0Q.Path,true);
  904. this.report.scripts.push(
  905. $0Q.Path+' ('+($0Q.Size/1024).toFixed(2)+' kb)');
  906. }
  907. return $0S.length;
  908. }
  909. function $0f($0U,$0V){
  910. var $0W;
  911. if(!$0U){
  912. this.out('Need an output filename!');
  913. return WScript.Quit(99);
  914. }
  915. else if(this.fso.FolderExists($0U)){
  916. this.out('Need an output filename, "'+
  917. this.fso.GetAbsolutePathName($0U)+'" is a folder.');
  918. return WScript.Quit(99);
  919. }
  920. this.outFile=this.fso.GetAbsolutePathName($0U);
  921. this.outMode=$0V?'Writing':'Appending';
  922. $0W=this.fso.OpenTextFile(this.outFile,($0V?2:8),true);
  923. $0W.WriteLine(this.buffer);
  924. $0W.Close();
  925. }
  926. function $0g($0X){
  927. if(!this.$1s[$0X]){
  928. var k=1;
  929. while(k<5){
  930. this.$1r[k]++;
  931. if(this.$1r[k]&&!(this.$1r[k]%62)){
  932. k++;
  933. if(this.$1r.length==k)
  934. this.$1r[k]=-1;
  935. }
  936. else break;
  937. }
  938. this.$1s[$0X]='$';
  939. for(k=this.$1r.length-1;k>0;k--)
  940. this.$1s[$0X]+=this.$1r[0].charAt(this.$1r[k]%62);
  941. if(this.verbose)
  942. this.out('Substituting ['+this.$1s[$0X]+'] -> ['+$0X+']');
  943. }
  944. return this.$1s[$0X];
  945. }
  946. function $0h($0Y,$0Z,$10){
  947. if(typeof $10!='undefined')
  948. return '';
  949. else return $0Y;
  950. }
  951. function $0i($0Y,$11){
  952. if(typeof $11!='undefined'&&/^\s+/.test($11))
  953. return '\r\n';
  954. else return $0Y;
  955. }
  956. function $0j($0Y,$12,$13){
  957. if(typeof $12!='undefined')
  958. return $0Y;
  959. else if($13&&$13.length>2&&
  960. ($0y.mangle[$13]||$0y.$1u.test($13.charAt(0))))
  961. $13=$0y.getSubstitute($13);
  962. else Soya_Saltstorm_ESC.prototype.bless[$13]=1;
  963. return String('function \x00'+$13);
  964. }
  965. function $0k($0Y,$12,$14,$15){
  966. if(typeof $12=='undefined'&&typeof $14=='undefined'&&typeof $15=='string'){
  967. $15=$15.replace(/\s+/g,'');
  968. if(!$0y.$1w.test($15)&&isNaN(parseInt($15.substr(1),10))){
  969. $15=$15.replace($0y.$1v,'');
  970. if($15.length>2&&!$0y.core[$15]&&!$0y.common[$15]&&
  971. !$0y.bless[$15]&&($0y.mangle[$15]||!$0y.mangle.length))
  972. return $0Y.replace($15,$0y.getSubstitute($15));
  973. }
  974. }
  975. return $0Y;
  976. }
  977. function $0l($0Y,$12,$16,$P){
  978. if(typeof $P=='string')
  979. return(!$0y.core[$P]&&!$0y.common[$P]&&!$0y.bless[$P])?
  980. String('.'+$0y.getSubstitute($P)):$0Y;
  981. else if(typeof $12!='undefined')
  982. return $0Y;
  983. else return '';
  984. }
  985. function $0m($0Y,$12,$17,$18,$19){
  986. if(typeof $12!='undefined')
  987. return $0Y;
  988. else if(typeof $17!='undefined')
  989. return '\r\n';
  990. else if(typeof $18!='undefined')
  991. return ' ';
  992. else return '';
  993. }
  994. function $0n($0Y,$12,$1a,$1b){
  995. if(typeof $12=='undefined'){
  996. if(!$0y.$1z.test($1b)||!$1a||!$0y.core[$1a])
  997. return($1a||'')+$1b;
  998. else return $0Y;
  999. }
  1000. else return $12;
  1001. }
  1002. function $0o($0Y,$12,$1b){
  1003. if(typeof $12!='undefined')
  1004. return $0Y;
  1005. else return $1b;
  1006. }
  1007. function $0p($0Y,$1c,$1d){
  1008. return('};'+$1d);
  1009. }
  1010. function $0q($0Y,$12,$1e,$1f){
  1011. if(typeof $1e=='undefined')
  1012. return $0Y;
  1013. var $1g=($0y.$1J.test($1e+$1f))?' ':'';
  1014. return $1e+$1g+$1f;
  1015. }
  1016. function $0r($1h,$0t,$1i){
  1017. var $B=(typeof $1h=='string')?$1h:this.buffer;
  1018. this.loadMaps('core.map','common.map','bless.map','mangle.map');
  1019. if(!this.buffer.length&&!$1h)
  1020. return String();
  1021. else if(typeof $0t=='number')
  1022. this.crunchLevel=$0t;
  1023. var $1j=(new Date()).getTime()-1;
  1024. var $1k=$B.length;
  1025. this.report.rawSize+=$B.length;
  1026. if(this.crunchLevel>=1){
  1027. $B=$B.replace(this.$1A,$0h)
  1028. .replace(this.$1B,$0i)
  1029. .replace(/\s*\r?\n/g,'\r\n');
  1030. if(this.verbose)
  1031. this.out('Removing comments, empty lines and trailing whitespace, saved '+
  1032. ($1k-$B.length)+' bytes.');
  1033. $1k=$B.length;
  1034. }
  1035. if(this.crunchLevel>=2){
  1036. $B=$B.replace(this.$1C,$0m);
  1037. if(this.verbose)
  1038. this.out('Removing tabs and spaces, saved '+
  1039. ($1k-$B.length)+' bytes.');
  1040. $1k=$B.length;
  1041. $B=$B.replace(this.$1D,$0n);
  1042. if(this.verbose)
  1043. this.out('Removing spaces left to operators, saved '+
  1044. ($1k-$B.length)+' bytes.');
  1045. $1k=$B.length;
  1046. $B=$B.replace(this.$1E,$0o);
  1047. if(this.verbose)
  1048. this.out('Removing spaces right to operators, saved '+
  1049. ($1k-$B.length)+' bytes.');
  1050. $1k=$B.length;
  1051. }
  1052. if(this.substitute||$1i||this.crunchLevel>=4){
  1053. $B=$B.replace(this.$1F,$0j);
  1054. $B=$B.replace(this.$1G,$0k);
  1055. $B=$B.replace(this.$1H,$0l);
  1056. if(this.verbose)
  1057. this.out('Substitution summary, saved '+
  1058. ($1k-$B.length)+' bytes.');
  1059. $1k=$B.length;
  1060. }
  1061. if(this.crunchLevel>=3){
  1062. $B=$B.replace(this.$1I,$0q);
  1063. $B=$B.replace(this.$1K,$0p);
  1064. $B+='\r\n';
  1065. if(this.verbose){
  1066. this.out('Removing newlines, saved '+
  1067. ($1k-$B.length)+' bytes.');
  1068. this.out('',1);
  1069. }
  1070. }
  1071. if(typeof $1h=='string'){
  1072. this.report.crunchedSize+=$B.length;
  1073. this.buffer+=$B;
  1074. }
  1075. else{
  1076. this.buffer=$B;
  1077. this.report.crunchedSize=$B.length;
  1078. }
  1079. this.report.elapsedTime+=(new Date()).getTime()-$1j;
  1080. return this.buffer;
  1081. }
  1082. function $0s($1l){
  1083. var $1m=($1l||'\r\n'),
  1084. $1n=this.label?String($1m+this.label+$1m):'';
  1085. if(!this.report.elapsedTime){
  1086. $1n+='Nothing to report, yet...';
  1087. return(!$1o)?this.out($1n,1):$1n;
  1088. }
  1089. var $1p=Boolean(this.substitute||this.crunchLevel>=4),
  1090. $1q=this.report.rawSize-this.report.crunchedSize;
  1091. if(this.report.scripts.length){
  1092. $1n+="-----------------------------------------------------------------------------"+$1m;
  1093. $1n+=" Crunching script(s):\r\n\t * "+this.report.scripts.join("\r\n\t * ")+$1m;
  1094. $1n+="-----------------------------------------------------------------------------"+$1m;
  1095. $1n+=" "+(this.outMode||"Put")+" to : "+(this.outFile||"[buffer]")+" ("+
  1096. (this.report.crunchedSize/1024).toFixed(2)+" kb)"+$1m;
  1097. }
  1098. $1n+="-----------------------------------------------------------------------------"+$1m;
  1099. $1n+=" Processtime :\t"+(this.report.elapsedTime/1000).toFixed(3)+" secs"+$1m;
  1100. $1n+=" Crunch-level :\t"+this.crunchLevel+$1m;
  1101. $1n+=" Subst. engine :\t"+($1p?'On':'Off')+$1m;
  1102. if($1p)
  1103. $1n+=" Substitutions :\t"+(this.$1r[1]-9)+$1m;
  1104. $1n+=" Original size :\t"+(this.report.rawSize/1024).toFixed(2)+" kb"+$1m;
  1105. $1n+=" Crunched size :\t"+(this.report.crunchedSize/1024).toFixed(2)+" kb"+$1m;
  1106. $1n+=" Saving ratio :\t"+($1q/1024).toFixed(2)+" kb"+$1m;
  1107. $1n+=" -'' ''- (%) :\t"+(($1q/this.report.rawSize)*100).toFixed(2)+" %"+$1m;
  1108. $1n+="-----------------------------------------------------------------------------"+$1m;
  1109. return $1n;
  1110. }
  1111. if(typeof(Soya)=='object')Soya.registerBean('Soya.Saltstorm.ESC',false,1);
  1112. /*** </POD> ***/
  1113. ]]>
  1114. </script>
  1115. <script language="JScript">
  1116. <![CDATA[
  1117. /*
  1118. Command flow control script for ESC.wsf
  1119. Edited : 2005-02-06
  1120. */
  1121. var oShell = WScript.CreateObject('WScript.Shell');
  1122. if(!oShell)
  1123. WScript.Quit(64);
  1124. // Do we have Jscript 5.5+ ?
  1125. else if(oShell && parseFloat(ScriptEngineMajorVersion() + '.' + ScriptEngineMinorVersion()) < 5.5)
  1126. oShell.Popup(getResource('jscript'), 64, WScript.ScriptName, 16), WScript.Quit(4);
  1127. // Is ESC executed under cscript ?
  1128. // if not let user select switching to cscript automagically.
  1129. else if(oShell && WScript.FullName.toLowerCase().indexOf('cscript') < 0){
  1130. if(oShell.Popup(getResource('wscript'), 64, WScript.ScriptName, 52) == 6)
  1131. oShell.Run('%comspec% /Q /K cscript //NoLogo ' + WScript.ScriptName + ' -a', 9);
  1132. WScript.Quit(3);
  1133. }
  1134. // get the cmdline arguments formatted in a nice manner.
  1135. var oArgs = Soya.WSH.getArguments();
  1136. // should we run in verbose-mode ?;
  1137. var bVerbose = Boolean(!oArgs.s && !oArgs.silent && (oArgs.v || oArgs.verbose));
  1138. // create an instance of the ESC object.
  1139. var esc = new Soya.Saltstorm.ESC(oArgs.l || oArgs.level, bVerbose);
  1140. esc.label = 'ESC (ECMAScript Cruncher) ' + esc.version +
  1141. '\r\nCopyright (C) 2001-2005 Thomas Loo <tloo@saltstorm.net>';
  1142. esc.resourcePath = esc.fso.GetParentFolderName(WScript.ScriptFullName || '.');
  1143. var sOutput = String(oArgs.oa || oArgs.ow || '');
  1144. if(oArgs.a || oArgs.about){
  1145. WScript.Echo(getResource('about'));
  1146. WScript.Quit(1);
  1147. }
  1148. else if(oArgs.c || oArgs.copyright){
  1149. WScript.Echo('\n' + esc.label + getResource('copyright'));
  1150. WScript.Quit(1);
  1151. }
  1152. else if(oArgs.e || oArgs.example){
  1153. WScript.Echo('\n' + esc.label + getResource('example'));
  1154. WScript.Quit(1);
  1155. }
  1156. // if there are options missing, print out the help table and quit.
  1157. else if((oArgs.h || oArgs.help) || !sOutput.length || !oArgs[0]){
  1158. WScript.Echo('\n' + esc.label + getResource('usage'));
  1159. WScript.Quit((oArgs.h || oArgs.help) ? 1 : 2);
  1160. }
  1161. // Wake up the variable substitution engine if option set (-$);
  1162. esc.substitute = Boolean(oArgs.$);
  1163. // load input files;
  1164. for(var i = 0; i < oArgs.length; i++)
  1165. esc.load(oArgs[i]);
  1166. // crunch baby, crunch!;
  1167. if(sOutput.toUpperCase() == 'STDOUT'){
  1168. esc.silent = true;
  1169. WScript.StdOut.Write(esc.crunch());
  1170. }
  1171. else if(sOutput.length){
  1172. esc.crunch();
  1173. esc.save(sOutput, Boolean(oArgs.ow));
  1174. // write report to stdout if not silence'd.
  1175. if(!oArgs.s && !oArgs.silent)
  1176. WScript.StdOut.Write(esc.getReport());
  1177. }
  1178. // Shutting down nicely..
  1179. WScript.Quit(0);
  1180. ]]>
  1181. </script>
  1182. </job>
  1183. </package>