├── .gitignore ├── LICENSE ├── README.md ├── dist ├── bundle.css ├── bundle.js ├── index.html └── wbxml.pl ├── install.sh ├── package-lock.json ├── package.json └── source ├── index.html ├── jspdudecoder.css ├── jspdudecoder.js ├── reset.css └── wbxml.pl /.gitignore: -------------------------------------------------------------------------------- 1 | # Eclipse 2 | .settings 3 | .project 4 | 5 | # IntelliJ 6 | .idea 7 | 8 | # MacOS 9 | .DS_Store 10 | 11 | # Node.js 12 | node_modules 13 | 14 | # Dev 15 | source/bundle.* 16 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | {one line to give the program's name and a brief idea of what it does.} 635 | Copyright (C) {year} {name of author} 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | {project} Copyright (C) {year} {fullname} 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | 676 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # jsPduDecoder 2 | 3 | Decodes many PDU encoded SMS formats. 4 | The main decoding is done in JavaScript. For WBXML decoding, a server side third party library 'wbxml.lib' is used via a proxy script. 5 | 6 | ## COPYRIGHT AND LICENCE 7 | 8 | Copyright (C) 2009 Benjamin Erhart, berhart@tladesignz.com 9 | 10 | This program is free software; you can redistribute it and/or modify it 11 | under the terms of either: the GNU General Public License as published 12 | by the Free Software Foundation; or the Artistic License. 13 | 14 | See http://dev.perl.org/licenses/ for more information. 15 | 16 | 17 | ## Some test examples, the tool will work with: 18 | 19 | 20 | ### Standard SMS: 21 | http://twit88.com/home/utility/sms-pdu-encode-decode 22 | 07911326040000F0040B911346610089F60000208062917314080CC8F71D14969741F977FD07 23 | 24 | ### Standard SMS Deliver: 25 | http://www.dreamfabric.com/sms/ 26 | 07917283010010F5040BC87238880900F10000993092516195800AE8329BFD4697D9EC37 27 | 28 | ### Standard SMS Submit: 29 | http://www.dreamfabric.com/sms/ 30 | 0011000B916407281553F80000AA0AE8329BFD4697D9EC37 31 | 32 | ### Standard SMS: 33 | http://mobiletidings.com/2009/02/11/more-on-the-sms-pdu/ 34 | 0001000B915121551532F400000CC8F79D9C07E54F61363B04 35 | 36 | ### Flash SMS: 37 | http://mobiletidings.com/2009/02/12/sending-a-flash-sms-message/ 38 | 0001010B915121551532F40010104190991D9EA341EDF27C1E3E9743 39 | 40 | ### 3 Concatenated SMS: 41 | http://mobiletidings.com/2009/02/18/combining-sms-messages/ 42 | 0041000B915121551532F40000A0050003000301986F79B90D4AC3E7F53688FC66BFE5A0799A0E0AB7CB741668FC76CFCB637A995E9783C2E4343C3D4F8FD3EE33A8CC4ED359A079990C22BF41E5747DDE7E9341F4721BFE9683D2EE719A9C26D7DD74509D0E6287C56F791954A683C86FF65B5E06B5C36777181466A7E3F5B0AB4A0795DDE936284C06B5D3EE741B642FBBD3E1360B14AFA7E7 43 | 0041010B915121551532F40000A005000300030240EEF79C2EAF9341657C593E4ED3C3F4F4DB0DAAB3D9E1F6F80D6287C56F797A0E72A7E769509D0E0AB3D3F17A1A0E2AE341E53068FC6EB7DFE43768FC76CFCBF17A98EE22D6D37350B84E2F83D2F2BABC0C22BFD96F3928ED06C9CB7079195D7693CBF2341D947683EC6F761D4E0FD3CB207B999DA683CAF37919344EB3D9F53688FC66BFE5 44 | 0041020B915121551532F4000090050003000303CAA0721D64AE9FD3613AC85D67B3C32078589E0ED3EB7257113F2EC3E9E5BA1C344FBBE9A0F7781C2E8FC374D0B80E4F93C3F4301DE47EBB4170F93B4D2EBBE92CD0BCEEA683D26ED0B8CE868741F17A1AF4369BD3E37418442ECFCBF2BA9B0E6ABFD9EC341D1476A7DBA03419549ED341ECB0F82DAFB75D 45 | 46 | ### Service Load WAP Push: 47 | http://mobiletidings.com/2009/02/21/wap-push-over-sms-encodings/ 48 | 0041000B915121551532F400042E0B05040B84C0020003F001010A060403B081EA02066A008509036D6F62696C65746964696E67732E636F6D2F0001 49 | 50 | ### Service Indication WAP Push: 51 | http://mobiletidings.com/2009/02/26/wap-push-over-sms-si-encoding/ 52 | 0041000B915121551532F400045E0B05040B84C0020003F001010B060403AE81EA02056A0045C60C036D6F62696C65746964696E67732E636F6D2F000AC30620090226162510C3062009030416250103436865636B206F7574204D6F62696C6520546964696E677321000101 53 | 54 | ### EMS with text formatting: 55 | http://mobiletidings.com/2009/03/12/text-formatting-sms-ems/ 56 | 0041000B915121551532F40000631A0A031906200A032104100A032705040A032E05080A043807002B8ACD29A85D9ECFC3E7F21C340EBB41E3B79B1E4EBB41697A989D1EB340E2379BCC02B1C3F27399059AB7C36C3628EC2683C66FF65B5E2683E8653C1D 57 | 58 | ### Voicemail Indication: 59 | http://mobiletidings.com/2009/07/08/voicemail-waiting-indication-sms/ 60 | 0001AB0B915121551532F400C80F3190BB7C07D9DFE971B91D4EB301 61 | 62 | ### Standard SMS-DELIVER: 63 | http://www.developershome.com/sms/cmgrCommand3.asp 64 | 07915892000000F0040B915892214365F700007040213252242331493A283D0795C3F33C88FE06C9CB6132885EC6D341EDF27C1E3E97E7207B3A0C0A5241E377BB1D7693E72E 65 | -------------------------------------------------------------------------------- /dist/bundle.css: -------------------------------------------------------------------------------- 1 | #readme p,#readme table caption,div#content,h1{margin:1em}a,abbr,acronym,address,applet,b,big,blockquote,body,caption,center,cite,code,dd,del,dfn,div,dl,dt,em,fieldset,font,form,h1,h2,h3,h4,h5,h6,html,i,iframe,img,ins,kbd,label,legend,li,object,ol,p,pre,q,s,samp,small,span,strike,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,tt,u,ul,var{margin:0;padding:0;border:0;outline:0;font-size:100%;vertical-align:baseline;background:0 0}body{line-height:1;font-family:Verdana,sans-serif}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:'';content:none}:focus{outline:0}ins{text-decoration:none}del{text-decoration:line-through}table{border-collapse:collapse;border-spacing:0}h1{font-size:1.5em;text-align:center}div#output,form{width:90%;margin:0 auto}form li{margin:1ex 0}form fieldset{border:1px solid #000;padding:1em}form legend{padding:0 1em}table.data,table.data table{border-collapse:separate;border-spacing:.5ex;background-color:#EEE}table.data td{padding:.5ex;vertical-align:middle;background-color:#DDD}table.data td.one{background-color:#BBB}table.data table{background-color:#DDD}#readme table tr:nth-child(odd),table.data table td{background-color:#CCC}#readme{margin-top:5em}#readme table{width:100%;table-layout:fixed}#readme table td{padding:1ex;word-wrap:break-word;vertical-align:middle} -------------------------------------------------------------------------------- /dist/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | JavaScript PDU Mode SMS Decoder 7 | 8 | 9 | 10 | 11 |

12 | 13 | Fork me on GitHub 18 | 19 |

20 | 21 |

22 | JavaScript PDU Mode SMS Decoder 23 |

24 |
25 |
26 |
    27 |
  • 28 | 29 | 30 |
  • 31 |
  • 32 | 33 | 34 |
  • 35 |
  • 36 |
    37 | Charset 38 | 39 | 40 | 41 | 42 | 43 | 44 |
    45 |
  • 46 |
  • 47 | 48 | 49 |
  • 50 |
  • 51 | 52 |
  • 53 |
54 |
55 |
56 |
57 |

58 | README - jsPduDecoder 59 |

60 | 61 |

62 | Decodes many PDU encoded SMS formats. 63 | The main decoding is done in JavaScript. For WBXML decoding, a server side third party library 'wbxml.lib' is used via a proxy script. 64 |

65 | 66 |

67 | COPYRIGHT AND LICENCE 68 |

69 | 70 |

71 | Copyright (C) 2009 Benjamin Erhart 72 |

73 | 74 |

75 | This program is free software; you can redistribute it and/or modify it 76 | under the terms of either: the GNU General Public License as published 77 | by the Free Software Foundation; or the Artistic License. 78 |

79 | 80 |

81 | See dev.perl.org/licenses for more information. 82 |

83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 99 | 104 | 105 | 106 | 109 | 112 | 117 | 118 | 119 | 122 | 125 | 130 | 131 | 132 | 135 | 138 | 143 | 144 | 145 | 148 | 151 | 156 | 157 | 158 | 161 | 164 | 179 | 180 | 181 | 184 | 187 | 192 | 193 | 194 | 197 | 200 | 205 | 206 | 207 | 210 | 213 | 218 | 219 | 220 | 223 | 226 | 231 | 232 | 233 | 236 | 239 | 244 | 245 | 246 |
Some test examples, the tool will work with:
Standard SMS 95 | 96 | http://twit88.com/home/utility/sms-pdu-encode-decode 97 | 98 | 100 | 101 | 07911326040000F0040B911346610089F60000208062917314080CC8F71D14969741F977FD07 102 | 103 |
107 | Standard SMS Deliver 108 | 110 | http://www.dreamfabric.com/sms/ 111 | 113 | 114 | 07917283010010F5040BC87238880900F10000993092516195800AE8329BFD4697D9EC37 115 | 116 |
120 | Standard SMS Submit 121 | 123 | http://www.dreamfabric.com/sms/ 124 | 126 | 127 | 0011000B916407281553F80000AA0AE8329BFD4697D9EC37 128 | 129 |
133 | Standard SMS 134 | 136 | http://mobiletidings.com/2009/02/11/more-on-the-sms-pdu/ 137 | 139 | 140 | 0001000B915121551532F400000CC8F79D9C07E54F61363B04 141 | 142 |
146 | Flash SMS 147 | 149 | http://mobiletidings.com/2009/02/12/sending-a-flash-sms-message/ 150 | 152 | 153 | 0001010B915121551532F40010104190991D9EA341EDF27C1E3E9743 154 | 155 |
159 | 3 Concatenated SMS 160 | 162 | http://mobiletidings.com/2009/02/18/combining-sms-messages/ 163 | 165 | 166 | 0041000B915121551532F40000A0050003000301986F79B90D4AC3E7F53688FC66BFE5A0799A0E0AB7CB741668FC76CFCB637A995E9783C2E4343C3D4F8FD3EE33A8CC4ED359A079990C22BF41E5747DDE7E9341F4721BFE9683D2EE719A9C26D7DD74509D0E6287C56F791954A683C86FF65B5E06B5C36777181466A7E3F5B0AB4A0795DDE936284C06B5D3EE741B642FBBD3E1360B14AFA7E7 167 | 168 |
169 |
170 | 171 | 0041010B915121551532F40000A005000300030240EEF79C2EAF9341657C593E4ED3C3F4F4DB0DAAB3D9E1F6F80D6287C56F797A0E72A7E769509D0E0AB3D3F17A1A0E2AE341E53068FC6EB7DFE43768FC76CFCBF17A98EE22D6D37350B84E2F83D2F2BABC0C22BFD96F3928ED06C9CB7079195D7693CBF2341D947683EC6F761D4E0FD3CB207B999DA683CAF37919344EB3D9F53688FC66BFE5 172 | 173 |
174 |
175 | 176 | 0041020B915121551532F4000090050003000303CAA0721D64AE9FD3613AC85D67B3C32078589E0ED3EB7257113F2EC3E9E5BA1C344FBBE9A0F7781C2E8FC374D0B80E4F93C3F4301DE47EBB4170F93B4D2EBBE92CD0BCEEA683D26ED0B8CE868741F17A1AF4369BD3E37418442ECFCBF2BA9B0E6ABFD9EC341D1476A7DBA03419549ED341ECB0F82DAFB75D 177 | 178 |
182 | Service Load WAP Push 183 | 185 | http://mobiletidings.com/2009/02/21/wap-push-over-sms-encodings/ 186 | 188 | 189 | 0041000B915121551532F400042E0B05040B84C0020003F001010A060403B081EA02066A008509036D6F62696C65746964696E67732E636F6D2F0001 190 | 191 |
195 | Service Indication WAP Push 196 | 198 | http://mobiletidings.com/2009/02/26/wap-push-over-sms-si-encoding/ 199 | 201 | 202 | 0041000B915121551532F400045E0B05040B84C0020003F001010B060403AE81EA02056A0045C60C036D6F62696C65746964696E67732E636F6D2F000AC30620090226162510C3062009030416250103436865636B206F7574204D6F62696C6520546964696E677321000101 203 | 204 |
208 | EMS with text formatting 209 | 211 | http://mobiletidings.com/2009/03/12/text-formatting-sms-ems/ 212 | 214 | 215 | 0041000B915121551532F40000631A0A031906200A032104100A032705040A032E05080A043807002B8ACD29A85D9ECFC3E7F21C340EBB41E3B79B1E4EBB41697A989D1EB340E2379BCC02B1C3F27399059AB7C36C3628EC2683C66FF65B5E2683E8653C1D 216 | 217 |
221 | Voicemail Indication 222 | 224 | http://mobiletidings.com/2009/07/08/voicemail-waiting-indication-sms/ 225 | 227 | 228 | 0001AB0B915121551532F400C80F3190BB7C07D9DFE971B91D4EB301 229 | 230 |
234 | Standard SMS-DELIVER 235 | 237 | http://www.developershome.com/sms/cmgrCommand3.asp 238 | 240 | 241 | 07915892000000F0040B915892214365F700007040213252242331493A283D0795C3F33C88FE06C9CB6132885EC6D341EDF27C1E3E97E7207B3A0C0A5241E377BB1D7693E72E 242 | 243 |
247 |
248 |
249 | 250 | -------------------------------------------------------------------------------- /dist/wbxml.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | use strict; 4 | use warnings; 5 | 6 | use CGI::Minimal; 7 | 8 | my $cgi = CGI::Minimal->new(); 9 | 10 | my $octets = $cgi->param( 'octets' ) || $ARGV[0] || ''; 11 | my $text = ''; 12 | my $xml = ''; 13 | 14 | for (my $i = 0; $i < length $octets; $i += 2) { 15 | $text .= chr hex substr( $octets, $i, 2 ); 16 | } 17 | 18 | eval 'use XML::WBXML'; 19 | 20 | if (!$@) { 21 | $xml = XML::WBXML::wbxml_to_xml( $text ); 22 | } 23 | 24 | binmode STDOUT, ':utf8'; 25 | 26 | print "Content-Type: text/plain; charset=UTF-8\r\n\r\n$xml"; 27 | -------------------------------------------------------------------------------- /install.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # Works on Debian 9 (Stretch) 4 | 5 | sudo apt-get install build-essential libwbxml2-dev cpanminus 6 | sudo cpanm CGI::Minimal XML::WBXML 7 | sudo a2enmod cgi 8 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "js-pdu-decoder", 3 | "version": "1.0.4", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "browserify": { 8 | "version": "11.0.1", 9 | "resolved": "https://registry.npmjs.org/browserify/-/browserify-11.0.1.tgz", 10 | "integrity": "sha1-+rc1W/SfgtGCVq02ewAdLnMUAcw=", 11 | "dev": true, 12 | "requires": { 13 | "JSONStream": "1.0.4", 14 | "assert": "1.3.0", 15 | "browser-pack": "5.0.1", 16 | "browser-resolve": "1.9.1", 17 | "browserify-zlib": "0.1.4", 18 | "buffer": "3.4.3", 19 | "builtins": "0.0.7", 20 | "commondir": "0.0.1", 21 | "concat-stream": "1.4.10", 22 | "console-browserify": "1.1.0", 23 | "constants-browserify": "0.0.1", 24 | "crypto-browserify": "3.9.14", 25 | "defined": "1.0.0", 26 | "deps-sort": "1.3.9", 27 | "domain-browser": "1.1.4", 28 | "duplexer2": "0.0.2", 29 | "events": "1.0.2", 30 | "glob": "4.5.3", 31 | "has": "1.0.1", 32 | "htmlescape": "1.1.0", 33 | "https-browserify": "0.0.0", 34 | "inherits": "2.0.1", 35 | "insert-module-globals": "6.5.2", 36 | "isarray": "0.0.1", 37 | "labeled-stream-splicer": "1.0.2", 38 | "module-deps": "3.9.1", 39 | "os-browserify": "0.1.2", 40 | "parents": "1.0.1", 41 | "path-browserify": "0.0.0", 42 | "process": "0.11.1", 43 | "punycode": "1.3.2", 44 | "querystring-es3": "0.2.1", 45 | "read-only-stream": "1.1.1", 46 | "readable-stream": "2.0.2", 47 | "resolve": "1.1.6", 48 | "shasum": "1.0.1", 49 | "shell-quote": "0.0.1", 50 | "stream-browserify": "2.0.1", 51 | "stream-http": "1.5.0", 52 | "string_decoder": "0.10.31", 53 | "subarg": "1.0.0", 54 | "syntax-error": "1.1.4", 55 | "through2": "1.1.1", 56 | "timers-browserify": "1.4.1", 57 | "tty-browserify": "0.0.0", 58 | "url": "0.10.3", 59 | "util": "0.10.3", 60 | "vm-browserify": "0.0.4", 61 | "xtend": "4.0.0" 62 | }, 63 | "dependencies": { 64 | "JSONStream": { 65 | "version": "1.0.4", 66 | "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.0.4.tgz", 67 | "integrity": "sha1-qobWqJyOd/IGzVQlgbVj5+7jJFk=", 68 | "dev": true, 69 | "requires": { 70 | "jsonparse": "1.0.0", 71 | "through": "2.3.8" 72 | }, 73 | "dependencies": { 74 | "jsonparse": { 75 | "version": "1.0.0", 76 | "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.0.0.tgz", 77 | "integrity": "sha1-JiL05mwI4arH7b63YFPJt+EhH3Y=", 78 | "dev": true 79 | }, 80 | "through": { 81 | "version": "2.3.8", 82 | "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", 83 | "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", 84 | "dev": true 85 | } 86 | } 87 | }, 88 | "assert": { 89 | "version": "1.3.0", 90 | "resolved": "https://registry.npmjs.org/assert/-/assert-1.3.0.tgz", 91 | "integrity": "sha1-A5OaYiWCqBLMICMgoLmlbJuBWEk=", 92 | "dev": true, 93 | "requires": { 94 | "util": "0.10.3" 95 | } 96 | }, 97 | "browser-pack": { 98 | "version": "5.0.1", 99 | "resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-5.0.1.tgz", 100 | "integrity": "sha1-QZdxmyDG4KqglFHFER5T77b7wY0=", 101 | "dev": true, 102 | "requires": { 103 | "JSONStream": "1.0.4", 104 | "combine-source-map": "0.6.1", 105 | "defined": "1.0.0", 106 | "through2": "1.1.1", 107 | "umd": "3.0.1" 108 | }, 109 | "dependencies": { 110 | "combine-source-map": { 111 | "version": "0.6.1", 112 | "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.6.1.tgz", 113 | "integrity": "sha1-m0oJwxYDPXaODxHgKfonMOB5rZY=", 114 | "dev": true, 115 | "requires": { 116 | "convert-source-map": "1.1.1", 117 | "inline-source-map": "0.5.0", 118 | "lodash.memoize": "3.0.4", 119 | "source-map": "0.4.4" 120 | }, 121 | "dependencies": { 122 | "convert-source-map": { 123 | "version": "1.1.1", 124 | "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.1.tgz", 125 | "integrity": "sha1-dOUYJHMFhBOwkN1zd3rLxKD/88w=", 126 | "dev": true 127 | }, 128 | "inline-source-map": { 129 | "version": "0.5.0", 130 | "resolved": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.5.0.tgz", 131 | "integrity": "sha1-Skxd2OT7Xps82mDIIt+tyu5m4K8=", 132 | "dev": true, 133 | "requires": { 134 | "source-map": "0.4.4" 135 | } 136 | }, 137 | "lodash.memoize": { 138 | "version": "3.0.4", 139 | "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz", 140 | "integrity": "sha1-LcvSwofLwKVcxCMovQxzYVDVPj8=", 141 | "dev": true 142 | }, 143 | "source-map": { 144 | "version": "0.4.4", 145 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", 146 | "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", 147 | "dev": true, 148 | "requires": { 149 | "amdefine": "1.0.0" 150 | }, 151 | "dependencies": { 152 | "amdefine": { 153 | "version": "1.0.0", 154 | "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.0.tgz", 155 | "integrity": "sha1-/RdHRwDLXMnCtwnwvp0jzjwZjDM=", 156 | "dev": true 157 | } 158 | } 159 | } 160 | } 161 | }, 162 | "umd": { 163 | "version": "3.0.1", 164 | "resolved": "https://registry.npmjs.org/umd/-/umd-3.0.1.tgz", 165 | "integrity": "sha1-iuVW4RAR9jwllnCKiDclnwGz1g4=", 166 | "dev": true 167 | } 168 | } 169 | }, 170 | "browser-resolve": { 171 | "version": "1.9.1", 172 | "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.9.1.tgz", 173 | "integrity": "sha1-uDV9X9KOBB8kNKrlVlWC+x+dRT4=", 174 | "dev": true, 175 | "requires": { 176 | "resolve": "1.1.6" 177 | } 178 | }, 179 | "browserify-zlib": { 180 | "version": "0.1.4", 181 | "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.1.4.tgz", 182 | "integrity": "sha1-uzX4pRn2AOD6a4SFJByXnQFB+y0=", 183 | "dev": true, 184 | "requires": { 185 | "pako": "0.2.7" 186 | }, 187 | "dependencies": { 188 | "pako": { 189 | "version": "0.2.7", 190 | "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.7.tgz", 191 | "integrity": "sha1-kOiRev/V7itp3+lD7Ba3g8TgxEE=", 192 | "dev": true 193 | } 194 | } 195 | }, 196 | "buffer": { 197 | "version": "3.4.3", 198 | "resolved": "https://registry.npmjs.org/buffer/-/buffer-3.4.3.tgz", 199 | "integrity": "sha1-s17GDn4Gq0K2+wIPRfB+fFjKnzo=", 200 | "dev": true, 201 | "requires": { 202 | "base64-js": "0.0.8", 203 | "ieee754": "1.1.6", 204 | "is-array": "1.0.1" 205 | }, 206 | "dependencies": { 207 | "base64-js": { 208 | "version": "0.0.8", 209 | "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-0.0.8.tgz", 210 | "integrity": "sha1-EQHpVE9KdrG8OybUUsqW16NeeXg=", 211 | "dev": true 212 | }, 213 | "ieee754": { 214 | "version": "1.1.6", 215 | "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.6.tgz", 216 | "integrity": "sha1-LhATIZxtZxKXPsVNmB7BnlV53pc=", 217 | "dev": true 218 | }, 219 | "is-array": { 220 | "version": "1.0.1", 221 | "resolved": "https://registry.npmjs.org/is-array/-/is-array-1.0.1.tgz", 222 | "integrity": "sha1-6YUMwsyGDDvAl36EzPDdRkWEJ5o=", 223 | "dev": true 224 | } 225 | } 226 | }, 227 | "builtins": { 228 | "version": "0.0.7", 229 | "resolved": "https://registry.npmjs.org/builtins/-/builtins-0.0.7.tgz", 230 | "integrity": "sha1-NVIZzWzxjb58Acx/0tznZc/cVJo=", 231 | "dev": true 232 | }, 233 | "commondir": { 234 | "version": "0.0.1", 235 | "resolved": "https://registry.npmjs.org/commondir/-/commondir-0.0.1.tgz", 236 | "integrity": "sha1-ifAP3NUbUZxXhzP+xWPmptp/W+I=", 237 | "dev": true 238 | }, 239 | "concat-stream": { 240 | "version": "1.4.10", 241 | "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.4.10.tgz", 242 | "integrity": "sha1-rMO79WAsuMyYDGrIQPp9hgPj7zY=", 243 | "dev": true, 244 | "requires": { 245 | "inherits": "2.0.1", 246 | "readable-stream": "1.1.13", 247 | "typedarray": "0.0.6" 248 | }, 249 | "dependencies": { 250 | "readable-stream": { 251 | "version": "1.1.13", 252 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.13.tgz", 253 | "integrity": "sha1-9u73ZPUUyJ4rniMUanW6EGdW0j4=", 254 | "dev": true, 255 | "requires": { 256 | "core-util-is": "1.0.1", 257 | "inherits": "2.0.1", 258 | "isarray": "0.0.1", 259 | "string_decoder": "0.10.31" 260 | }, 261 | "dependencies": { 262 | "core-util-is": { 263 | "version": "1.0.1", 264 | "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.1.tgz", 265 | "integrity": "sha1-awcIWu+aPMrG7lO/nT3wwVIaVTg=", 266 | "dev": true 267 | } 268 | } 269 | }, 270 | "typedarray": { 271 | "version": "0.0.6", 272 | "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", 273 | "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", 274 | "dev": true 275 | } 276 | } 277 | }, 278 | "console-browserify": { 279 | "version": "1.1.0", 280 | "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", 281 | "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", 282 | "dev": true, 283 | "requires": { 284 | "date-now": "0.1.4" 285 | }, 286 | "dependencies": { 287 | "date-now": { 288 | "version": "0.1.4", 289 | "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", 290 | "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", 291 | "dev": true 292 | } 293 | } 294 | }, 295 | "constants-browserify": { 296 | "version": "0.0.1", 297 | "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-0.0.1.tgz", 298 | "integrity": "sha1-kld9tSe6bEzwpFaNhLwDH0QeIfI=", 299 | "dev": true 300 | }, 301 | "crypto-browserify": { 302 | "version": "3.9.14", 303 | "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.9.14.tgz", 304 | "integrity": "sha1-1pklJSyEU5JxSu0UYMVLVmBTFKs=", 305 | "dev": true, 306 | "requires": { 307 | "browserify-aes": "1.0.3", 308 | "browserify-sign": "3.0.3", 309 | "create-ecdh": "2.0.1", 310 | "create-hash": "1.1.1", 311 | "create-hmac": "1.1.3", 312 | "diffie-hellman": "3.0.2", 313 | "inherits": "2.0.1", 314 | "pbkdf2": "3.0.4", 315 | "public-encrypt": "2.0.1", 316 | "randombytes": "2.0.1" 317 | }, 318 | "dependencies": { 319 | "browserify-aes": { 320 | "version": "1.0.3", 321 | "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.0.3.tgz", 322 | "integrity": "sha1-xdA9Nvs/y6pUmnHuYC+RxOVlfP8=", 323 | "dev": true, 324 | "requires": { 325 | "buffer-xor": "1.0.2", 326 | "create-hash": "1.1.1", 327 | "inherits": "2.0.1" 328 | }, 329 | "dependencies": { 330 | "buffer-xor": { 331 | "version": "1.0.2", 332 | "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.2.tgz", 333 | "integrity": "sha1-Ix5EVx9kS94HiQJvYd5ukjFnEko=", 334 | "dev": true 335 | } 336 | } 337 | }, 338 | "browserify-sign": { 339 | "version": "3.0.3", 340 | "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-3.0.3.tgz", 341 | "integrity": "sha1-29kSvtJClauS+O9vkY5xkSrZH0E=", 342 | "dev": true, 343 | "requires": { 344 | "bn.js": "2.2.0", 345 | "browserify-rsa": "2.0.1", 346 | "create-hash": "1.1.1", 347 | "create-hmac": "1.1.3", 348 | "elliptic": "3.1.0", 349 | "inherits": "2.0.1", 350 | "parse-asn1": "3.0.1" 351 | }, 352 | "dependencies": { 353 | "bn.js": { 354 | "version": "2.2.0", 355 | "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-2.2.0.tgz", 356 | "integrity": "sha1-EhYrwq5x/EClYmwzQ486h1zTdiU=", 357 | "dev": true 358 | }, 359 | "browserify-rsa": { 360 | "version": "2.0.1", 361 | "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-2.0.1.tgz", 362 | "integrity": "sha1-nm7D5byj/dEcmpPBTSuxRkcAg7w=", 363 | "dev": true, 364 | "requires": { 365 | "bn.js": "2.2.0", 366 | "randombytes": "2.0.1" 367 | } 368 | }, 369 | "elliptic": { 370 | "version": "3.1.0", 371 | "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-3.1.0.tgz", 372 | "integrity": "sha1-whaC73YnabVqdCAWCRBdoR1fYMw=", 373 | "dev": true, 374 | "requires": { 375 | "bn.js": "2.2.0", 376 | "brorand": "1.0.5", 377 | "hash.js": "1.0.3", 378 | "inherits": "2.0.1" 379 | }, 380 | "dependencies": { 381 | "brorand": { 382 | "version": "1.0.5", 383 | "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.0.5.tgz", 384 | "integrity": "sha1-B7VMowKGq9Fxig4qgwgD79yb+gQ=", 385 | "dev": true 386 | }, 387 | "hash.js": { 388 | "version": "1.0.3", 389 | "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.0.3.tgz", 390 | "integrity": "sha1-EzL/ABVsCg/92CNgE9B7d6BFFXM=", 391 | "dev": true, 392 | "requires": { 393 | "inherits": "2.0.1" 394 | } 395 | } 396 | } 397 | }, 398 | "parse-asn1": { 399 | "version": "3.0.1", 400 | "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-3.0.1.tgz", 401 | "integrity": "sha1-oO9apvxnR/QWbNGEMr1nvY3EOLU=", 402 | "dev": true, 403 | "requires": { 404 | "asn1.js": "2.2.0", 405 | "browserify-aes": "1.0.3", 406 | "create-hash": "1.1.1", 407 | "pbkdf2": "3.0.4" 408 | }, 409 | "dependencies": { 410 | "asn1.js": { 411 | "version": "2.2.0", 412 | "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-2.2.0.tgz", 413 | "integrity": "sha1-5K2xEmunvp8u2BYTkZOhY/0YLTQ=", 414 | "dev": true, 415 | "requires": { 416 | "bn.js": "2.2.0", 417 | "inherits": "2.0.1", 418 | "minimalistic-assert": "1.0.0" 419 | }, 420 | "dependencies": { 421 | "minimalistic-assert": { 422 | "version": "1.0.0", 423 | "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz", 424 | "integrity": "sha1-cCvi3aazf0g2vLP121ZkG2Sh09M=", 425 | "dev": true 426 | } 427 | } 428 | } 429 | } 430 | } 431 | } 432 | }, 433 | "create-ecdh": { 434 | "version": "2.0.1", 435 | "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-2.0.1.tgz", 436 | "integrity": "sha1-lLoa46lqDlItFDYz9VahrbrZj1Y=", 437 | "dev": true, 438 | "requires": { 439 | "bn.js": "2.2.0", 440 | "elliptic": "3.1.0" 441 | }, 442 | "dependencies": { 443 | "bn.js": { 444 | "version": "2.2.0", 445 | "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-2.2.0.tgz", 446 | "integrity": "sha1-EhYrwq5x/EClYmwzQ486h1zTdiU=", 447 | "dev": true 448 | }, 449 | "elliptic": { 450 | "version": "3.1.0", 451 | "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-3.1.0.tgz", 452 | "integrity": "sha1-whaC73YnabVqdCAWCRBdoR1fYMw=", 453 | "dev": true, 454 | "requires": { 455 | "bn.js": "2.2.0", 456 | "brorand": "1.0.5", 457 | "hash.js": "1.0.3", 458 | "inherits": "2.0.1" 459 | }, 460 | "dependencies": { 461 | "brorand": { 462 | "version": "1.0.5", 463 | "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.0.5.tgz", 464 | "integrity": "sha1-B7VMowKGq9Fxig4qgwgD79yb+gQ=", 465 | "dev": true 466 | }, 467 | "hash.js": { 468 | "version": "1.0.3", 469 | "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.0.3.tgz", 470 | "integrity": "sha1-EzL/ABVsCg/92CNgE9B7d6BFFXM=", 471 | "dev": true, 472 | "requires": { 473 | "inherits": "2.0.1" 474 | } 475 | } 476 | } 477 | } 478 | } 479 | }, 480 | "create-hash": { 481 | "version": "1.1.1", 482 | "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.1.1.tgz", 483 | "integrity": "sha1-pVQk+XtTab+yqX5TvZt6GqbdOhc=", 484 | "dev": true, 485 | "requires": { 486 | "inherits": "2.0.1", 487 | "ripemd160": "1.0.1", 488 | "sha.js": "2.4.2" 489 | }, 490 | "dependencies": { 491 | "ripemd160": { 492 | "version": "1.0.1", 493 | "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-1.0.1.tgz", 494 | "integrity": "sha1-k6S71JQrxXS2mo+lfHHeEOzKfW4=", 495 | "dev": true 496 | }, 497 | "sha.js": { 498 | "version": "2.4.2", 499 | "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.2.tgz", 500 | "integrity": "sha1-vDRXRViSFacgC1r3dOaMPkTS8Yg=", 501 | "dev": true, 502 | "requires": { 503 | "inherits": "2.0.1" 504 | } 505 | } 506 | } 507 | }, 508 | "create-hmac": { 509 | "version": "1.1.3", 510 | "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.3.tgz", 511 | "integrity": "sha1-KYQ+nBkbpBKrABvFWsi4ua5UtnA=", 512 | "dev": true, 513 | "requires": { 514 | "create-hash": "1.1.1", 515 | "inherits": "2.0.1" 516 | } 517 | }, 518 | "diffie-hellman": { 519 | "version": "3.0.2", 520 | "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-3.0.2.tgz", 521 | "integrity": "sha1-KlZa+x4DWJzShMAQ1uv4B3sohtc=", 522 | "dev": true, 523 | "requires": { 524 | "bn.js": "2.2.0", 525 | "miller-rabin": "2.0.1", 526 | "randombytes": "2.0.1" 527 | }, 528 | "dependencies": { 529 | "bn.js": { 530 | "version": "2.2.0", 531 | "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-2.2.0.tgz", 532 | "integrity": "sha1-EhYrwq5x/EClYmwzQ486h1zTdiU=", 533 | "dev": true 534 | }, 535 | "miller-rabin": { 536 | "version": "2.0.1", 537 | "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-2.0.1.tgz", 538 | "integrity": "sha1-jA4H/vG8JJAKeIlUNNOc5AJNRkg=", 539 | "dev": true, 540 | "requires": { 541 | "bn.js": "2.2.0", 542 | "brorand": "1.0.5" 543 | }, 544 | "dependencies": { 545 | "brorand": { 546 | "version": "1.0.5", 547 | "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.0.5.tgz", 548 | "integrity": "sha1-B7VMowKGq9Fxig4qgwgD79yb+gQ=", 549 | "dev": true 550 | } 551 | } 552 | } 553 | } 554 | }, 555 | "pbkdf2": { 556 | "version": "3.0.4", 557 | "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.4.tgz", 558 | "integrity": "sha1-Esi/r5IFQ3hqhRULA/aNXxqpgvw=", 559 | "dev": true, 560 | "requires": { 561 | "create-hmac": "1.1.3" 562 | } 563 | }, 564 | "public-encrypt": { 565 | "version": "2.0.1", 566 | "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-2.0.1.tgz", 567 | "integrity": "sha1-7xUEGHKKk+cHAPpcapQBbg5ZZJM=", 568 | "dev": true, 569 | "requires": { 570 | "bn.js": "2.2.0", 571 | "browserify-rsa": "2.0.1", 572 | "create-hash": "1.1.1", 573 | "parse-asn1": "3.0.1", 574 | "randombytes": "2.0.1" 575 | }, 576 | "dependencies": { 577 | "bn.js": { 578 | "version": "2.2.0", 579 | "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-2.2.0.tgz", 580 | "integrity": "sha1-EhYrwq5x/EClYmwzQ486h1zTdiU=", 581 | "dev": true 582 | }, 583 | "browserify-rsa": { 584 | "version": "2.0.1", 585 | "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-2.0.1.tgz", 586 | "integrity": "sha1-nm7D5byj/dEcmpPBTSuxRkcAg7w=", 587 | "dev": true, 588 | "requires": { 589 | "bn.js": "2.2.0", 590 | "randombytes": "2.0.1" 591 | } 592 | }, 593 | "parse-asn1": { 594 | "version": "3.0.1", 595 | "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-3.0.1.tgz", 596 | "integrity": "sha1-oO9apvxnR/QWbNGEMr1nvY3EOLU=", 597 | "dev": true, 598 | "requires": { 599 | "asn1.js": "2.2.0", 600 | "browserify-aes": "1.0.3", 601 | "create-hash": "1.1.1", 602 | "pbkdf2": "3.0.4" 603 | }, 604 | "dependencies": { 605 | "asn1.js": { 606 | "version": "2.2.0", 607 | "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-2.2.0.tgz", 608 | "integrity": "sha1-5K2xEmunvp8u2BYTkZOhY/0YLTQ=", 609 | "dev": true, 610 | "requires": { 611 | "bn.js": "2.2.0", 612 | "inherits": "2.0.1", 613 | "minimalistic-assert": "1.0.0" 614 | }, 615 | "dependencies": { 616 | "minimalistic-assert": { 617 | "version": "1.0.0", 618 | "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz", 619 | "integrity": "sha1-cCvi3aazf0g2vLP121ZkG2Sh09M=", 620 | "dev": true 621 | } 622 | } 623 | } 624 | } 625 | } 626 | } 627 | }, 628 | "randombytes": { 629 | "version": "2.0.1", 630 | "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.1.tgz", 631 | "integrity": "sha1-GPSpug3Qe9sVgLyRVgkfz5DqvG8=", 632 | "dev": true 633 | } 634 | } 635 | }, 636 | "defined": { 637 | "version": "1.0.0", 638 | "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", 639 | "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=", 640 | "dev": true 641 | }, 642 | "deps-sort": { 643 | "version": "1.3.9", 644 | "resolved": "https://registry.npmjs.org/deps-sort/-/deps-sort-1.3.9.tgz", 645 | "integrity": "sha1-Kd//U+F7Nq7K51MK27v2IsLtGnE=", 646 | "dev": true, 647 | "requires": { 648 | "JSONStream": "1.0.4", 649 | "shasum": "1.0.1", 650 | "subarg": "1.0.0", 651 | "through2": "1.1.1" 652 | } 653 | }, 654 | "domain-browser": { 655 | "version": "1.1.4", 656 | "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.1.4.tgz", 657 | "integrity": "sha1-kLQnaTM+kJzj8Tvz4QI7pKbWtyM=", 658 | "dev": true 659 | }, 660 | "duplexer2": { 661 | "version": "0.0.2", 662 | "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz", 663 | "integrity": "sha1-xhTc9n4vsUmVqRcR5aYX6KYKMds=", 664 | "dev": true, 665 | "requires": { 666 | "readable-stream": "1.1.13" 667 | }, 668 | "dependencies": { 669 | "readable-stream": { 670 | "version": "1.1.13", 671 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.13.tgz", 672 | "integrity": "sha1-9u73ZPUUyJ4rniMUanW6EGdW0j4=", 673 | "dev": true, 674 | "requires": { 675 | "core-util-is": "1.0.1", 676 | "inherits": "2.0.1", 677 | "isarray": "0.0.1", 678 | "string_decoder": "0.10.31" 679 | }, 680 | "dependencies": { 681 | "core-util-is": { 682 | "version": "1.0.1", 683 | "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.1.tgz", 684 | "integrity": "sha1-awcIWu+aPMrG7lO/nT3wwVIaVTg=", 685 | "dev": true 686 | } 687 | } 688 | } 689 | } 690 | }, 691 | "events": { 692 | "version": "1.0.2", 693 | "resolved": "https://registry.npmjs.org/events/-/events-1.0.2.tgz", 694 | "integrity": "sha1-dYSdz+k9EPsFfDAFWv29UdBqjiQ=", 695 | "dev": true 696 | }, 697 | "glob": { 698 | "version": "4.5.3", 699 | "resolved": "https://registry.npmjs.org/glob/-/glob-4.5.3.tgz", 700 | "integrity": "sha1-xstz0yJsHv7wTePFbQEvAzd+4V8=", 701 | "dev": true, 702 | "requires": { 703 | "inflight": "1.0.4", 704 | "inherits": "2.0.1", 705 | "minimatch": "2.0.10", 706 | "once": "1.3.2" 707 | }, 708 | "dependencies": { 709 | "inflight": { 710 | "version": "1.0.4", 711 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.4.tgz", 712 | "integrity": "sha1-bLtFIevVHODsCpNr/XZX736bFyo=", 713 | "dev": true, 714 | "requires": { 715 | "once": "1.3.2", 716 | "wrappy": "1.0.1" 717 | }, 718 | "dependencies": { 719 | "wrappy": { 720 | "version": "1.0.1", 721 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz", 722 | "integrity": "sha1-HmWWmWXMvC20VIxrhKbyxa7dRzk=", 723 | "dev": true 724 | } 725 | } 726 | }, 727 | "minimatch": { 728 | "version": "2.0.10", 729 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz", 730 | "integrity": "sha1-jQh8OcazjAAbl/ynzm0OHoCvusc=", 731 | "dev": true, 732 | "requires": { 733 | "brace-expansion": "1.1.0" 734 | }, 735 | "dependencies": { 736 | "brace-expansion": { 737 | "version": "1.1.0", 738 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.0.tgz", 739 | "integrity": "sha1-ybfQPAPze8cEvhAOUitA249s/Nk=", 740 | "dev": true, 741 | "requires": { 742 | "balanced-match": "0.2.0", 743 | "concat-map": "0.0.1" 744 | }, 745 | "dependencies": { 746 | "balanced-match": { 747 | "version": "0.2.0", 748 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.2.0.tgz", 749 | "integrity": "sha1-OPZzDAOqttXtu1K9k0iF51bXFnQ=", 750 | "dev": true 751 | }, 752 | "concat-map": { 753 | "version": "0.0.1", 754 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 755 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", 756 | "dev": true 757 | } 758 | } 759 | } 760 | } 761 | }, 762 | "once": { 763 | "version": "1.3.2", 764 | "resolved": "https://registry.npmjs.org/once/-/once-1.3.2.tgz", 765 | "integrity": "sha1-2P7sqTsDnsHc3ud0HJK9rF4oCBs=", 766 | "dev": true, 767 | "requires": { 768 | "wrappy": "1.0.1" 769 | }, 770 | "dependencies": { 771 | "wrappy": { 772 | "version": "1.0.1", 773 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz", 774 | "integrity": "sha1-HmWWmWXMvC20VIxrhKbyxa7dRzk=", 775 | "dev": true 776 | } 777 | } 778 | } 779 | } 780 | }, 781 | "has": { 782 | "version": "1.0.1", 783 | "resolved": "https://registry.npmjs.org/has/-/has-1.0.1.tgz", 784 | "integrity": "sha1-hGFzP1OLCDfJNh45qauelwTcLyg=", 785 | "dev": true, 786 | "requires": { 787 | "function-bind": "1.0.2" 788 | }, 789 | "dependencies": { 790 | "function-bind": { 791 | "version": "1.0.2", 792 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.0.2.tgz", 793 | "integrity": "sha1-woc7acXm18765H0lVRcpJsjC4F4=", 794 | "dev": true 795 | } 796 | } 797 | }, 798 | "htmlescape": { 799 | "version": "1.1.0", 800 | "resolved": "https://registry.npmjs.org/htmlescape/-/htmlescape-1.1.0.tgz", 801 | "integrity": "sha1-6/epUk98hrX2iIWJtAvbpxLq+mc=", 802 | "dev": true 803 | }, 804 | "https-browserify": { 805 | "version": "0.0.0", 806 | "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-0.0.0.tgz", 807 | "integrity": "sha1-s//f5zSyo9Sp79WOhlTJH86G6v0=", 808 | "dev": true 809 | }, 810 | "inherits": { 811 | "version": "2.0.1", 812 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", 813 | "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", 814 | "dev": true 815 | }, 816 | "insert-module-globals": { 817 | "version": "6.5.2", 818 | "resolved": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-6.5.2.tgz", 819 | "integrity": "sha1-47nWmH2bH7urOfbxrEvai/2iZYk=", 820 | "dev": true, 821 | "requires": { 822 | "JSONStream": "1.0.4", 823 | "combine-source-map": "0.6.1", 824 | "concat-stream": "1.4.10", 825 | "lexical-scope": "1.1.1", 826 | "process": "0.11.1", 827 | "through2": "1.1.1", 828 | "xtend": "4.0.0" 829 | }, 830 | "dependencies": { 831 | "combine-source-map": { 832 | "version": "0.6.1", 833 | "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.6.1.tgz", 834 | "integrity": "sha1-m0oJwxYDPXaODxHgKfonMOB5rZY=", 835 | "dev": true, 836 | "requires": { 837 | "convert-source-map": "1.1.1", 838 | "inline-source-map": "0.5.0", 839 | "lodash.memoize": "3.0.4", 840 | "source-map": "0.4.4" 841 | }, 842 | "dependencies": { 843 | "convert-source-map": { 844 | "version": "1.1.1", 845 | "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.1.tgz", 846 | "integrity": "sha1-dOUYJHMFhBOwkN1zd3rLxKD/88w=", 847 | "dev": true 848 | }, 849 | "inline-source-map": { 850 | "version": "0.5.0", 851 | "resolved": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.5.0.tgz", 852 | "integrity": "sha1-Skxd2OT7Xps82mDIIt+tyu5m4K8=", 853 | "dev": true, 854 | "requires": { 855 | "source-map": "0.4.4" 856 | } 857 | }, 858 | "lodash.memoize": { 859 | "version": "3.0.4", 860 | "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz", 861 | "integrity": "sha1-LcvSwofLwKVcxCMovQxzYVDVPj8=", 862 | "dev": true 863 | }, 864 | "source-map": { 865 | "version": "0.4.4", 866 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", 867 | "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", 868 | "dev": true, 869 | "requires": { 870 | "amdefine": "1.0.0" 871 | }, 872 | "dependencies": { 873 | "amdefine": { 874 | "version": "1.0.0", 875 | "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.0.tgz", 876 | "integrity": "sha1-/RdHRwDLXMnCtwnwvp0jzjwZjDM=", 877 | "dev": true 878 | } 879 | } 880 | } 881 | } 882 | }, 883 | "lexical-scope": { 884 | "version": "1.1.1", 885 | "resolved": "https://registry.npmjs.org/lexical-scope/-/lexical-scope-1.1.1.tgz", 886 | "integrity": "sha1-3rrBBnQ18TWdkPz9npS8su5Hsr8=", 887 | "dev": true, 888 | "requires": { 889 | "astw": "2.0.0" 890 | }, 891 | "dependencies": { 892 | "astw": { 893 | "version": "2.0.0", 894 | "resolved": "https://registry.npmjs.org/astw/-/astw-2.0.0.tgz", 895 | "integrity": "sha1-CBIayCiNNWEcDO7GY/bNVFYEiX0=", 896 | "dev": true, 897 | "requires": { 898 | "acorn": "1.2.2" 899 | }, 900 | "dependencies": { 901 | "acorn": { 902 | "version": "1.2.2", 903 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-1.2.2.tgz", 904 | "integrity": "sha1-yM4n3grMdtiW0rH6099YjZ6C8BQ=", 905 | "dev": true 906 | } 907 | } 908 | } 909 | } 910 | } 911 | } 912 | }, 913 | "isarray": { 914 | "version": "0.0.1", 915 | "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", 916 | "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", 917 | "dev": true 918 | }, 919 | "labeled-stream-splicer": { 920 | "version": "1.0.2", 921 | "resolved": "https://registry.npmjs.org/labeled-stream-splicer/-/labeled-stream-splicer-1.0.2.tgz", 922 | "integrity": "sha1-RhUzFTd4SYHo/SZOHzpDTE4N3WU=", 923 | "dev": true, 924 | "requires": { 925 | "inherits": "2.0.1", 926 | "isarray": "0.0.1", 927 | "stream-splicer": "1.3.2" 928 | }, 929 | "dependencies": { 930 | "stream-splicer": { 931 | "version": "1.3.2", 932 | "resolved": "https://registry.npmjs.org/stream-splicer/-/stream-splicer-1.3.2.tgz", 933 | "integrity": "sha1-PARBvhW5v04iYnXm3IOWR0VUZmE=", 934 | "dev": true, 935 | "requires": { 936 | "indexof": "0.0.1", 937 | "inherits": "2.0.1", 938 | "isarray": "0.0.1", 939 | "readable-stream": "1.1.13", 940 | "readable-wrap": "1.0.0", 941 | "through2": "1.1.1" 942 | }, 943 | "dependencies": { 944 | "indexof": { 945 | "version": "0.0.1", 946 | "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", 947 | "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=", 948 | "dev": true 949 | }, 950 | "readable-stream": { 951 | "version": "1.1.13", 952 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.13.tgz", 953 | "integrity": "sha1-9u73ZPUUyJ4rniMUanW6EGdW0j4=", 954 | "dev": true, 955 | "requires": { 956 | "core-util-is": "1.0.1", 957 | "inherits": "2.0.1", 958 | "isarray": "0.0.1", 959 | "string_decoder": "0.10.31" 960 | }, 961 | "dependencies": { 962 | "core-util-is": { 963 | "version": "1.0.1", 964 | "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.1.tgz", 965 | "integrity": "sha1-awcIWu+aPMrG7lO/nT3wwVIaVTg=", 966 | "dev": true 967 | } 968 | } 969 | }, 970 | "readable-wrap": { 971 | "version": "1.0.0", 972 | "resolved": "https://registry.npmjs.org/readable-wrap/-/readable-wrap-1.0.0.tgz", 973 | "integrity": "sha1-O1ohHGMeEjA6VJkcgGwX564ga/8=", 974 | "dev": true, 975 | "requires": { 976 | "readable-stream": "1.1.13" 977 | } 978 | } 979 | } 980 | } 981 | } 982 | }, 983 | "module-deps": { 984 | "version": "3.9.1", 985 | "resolved": "https://registry.npmjs.org/module-deps/-/module-deps-3.9.1.tgz", 986 | "integrity": "sha1-6nXK+RmQkNJbDVUStaysuW5/h/M=", 987 | "dev": true, 988 | "requires": { 989 | "JSONStream": "1.0.4", 990 | "browser-resolve": "1.9.1", 991 | "concat-stream": "1.4.10", 992 | "defined": "1.0.0", 993 | "detective": "4.2.0", 994 | "duplexer2": "0.0.2", 995 | "inherits": "2.0.1", 996 | "parents": "1.0.1", 997 | "readable-stream": "1.1.13", 998 | "resolve": "1.1.6", 999 | "stream-combiner2": "1.0.2", 1000 | "subarg": "1.0.0", 1001 | "through2": "1.1.1", 1002 | "xtend": "4.0.0" 1003 | }, 1004 | "dependencies": { 1005 | "detective": { 1006 | "version": "4.2.0", 1007 | "resolved": "https://registry.npmjs.org/detective/-/detective-4.2.0.tgz", 1008 | "integrity": "sha1-FhfYWlpSbA5u1uRgudruhPcs6bQ=", 1009 | "dev": true, 1010 | "requires": { 1011 | "acorn": "1.2.2", 1012 | "defined": "1.0.0", 1013 | "escodegen": "1.6.1" 1014 | }, 1015 | "dependencies": { 1016 | "acorn": { 1017 | "version": "1.2.2", 1018 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-1.2.2.tgz", 1019 | "integrity": "sha1-yM4n3grMdtiW0rH6099YjZ6C8BQ=", 1020 | "dev": true 1021 | }, 1022 | "escodegen": { 1023 | "version": "1.6.1", 1024 | "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.6.1.tgz", 1025 | "integrity": "sha1-Nn3hfYUQVA0SvG3Liz+Rg5EmWBU=", 1026 | "dev": true, 1027 | "requires": { 1028 | "esprima": "1.2.5", 1029 | "estraverse": "1.9.3", 1030 | "esutils": "1.1.6", 1031 | "optionator": "0.5.0", 1032 | "source-map": "0.1.43" 1033 | }, 1034 | "dependencies": { 1035 | "esprima": { 1036 | "version": "1.2.5", 1037 | "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.2.5.tgz", 1038 | "integrity": "sha1-CZNQL+r2aBODJXVvMPmlH+7sEek=", 1039 | "dev": true 1040 | }, 1041 | "estraverse": { 1042 | "version": "1.9.3", 1043 | "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", 1044 | "integrity": "sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q=", 1045 | "dev": true 1046 | }, 1047 | "esutils": { 1048 | "version": "1.1.6", 1049 | "resolved": "https://registry.npmjs.org/esutils/-/esutils-1.1.6.tgz", 1050 | "integrity": "sha1-wBzKqa5LiXxtDD4hCuUvPHqEQ3U=", 1051 | "dev": true 1052 | }, 1053 | "optionator": { 1054 | "version": "0.5.0", 1055 | "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.5.0.tgz", 1056 | "integrity": "sha1-t1qJlaLUF98ltuTjhi9QqohlE2g=", 1057 | "dev": true, 1058 | "requires": { 1059 | "deep-is": "0.1.3", 1060 | "fast-levenshtein": "1.0.7", 1061 | "levn": "0.2.5", 1062 | "prelude-ls": "1.1.2", 1063 | "type-check": "0.3.1", 1064 | "wordwrap": "0.0.3" 1065 | }, 1066 | "dependencies": { 1067 | "deep-is": { 1068 | "version": "0.1.3", 1069 | "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", 1070 | "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", 1071 | "dev": true 1072 | }, 1073 | "fast-levenshtein": { 1074 | "version": "1.0.7", 1075 | "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-1.0.7.tgz", 1076 | "integrity": "sha1-AXjc3uAjuSkFGTrwlZ6KdjnP3Lk=", 1077 | "dev": true 1078 | }, 1079 | "levn": { 1080 | "version": "0.2.5", 1081 | "resolved": "https://registry.npmjs.org/levn/-/levn-0.2.5.tgz", 1082 | "integrity": "sha1-uo0znQykphDjo/FFucr0iAcVUFQ=", 1083 | "dev": true, 1084 | "requires": { 1085 | "prelude-ls": "1.1.2", 1086 | "type-check": "0.3.1" 1087 | } 1088 | }, 1089 | "prelude-ls": { 1090 | "version": "1.1.2", 1091 | "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", 1092 | "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", 1093 | "dev": true 1094 | }, 1095 | "type-check": { 1096 | "version": "0.3.1", 1097 | "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.1.tgz", 1098 | "integrity": "sha1-kjOSPE2hdNCsVIDs/W74TDSetY0=", 1099 | "dev": true, 1100 | "requires": { 1101 | "prelude-ls": "1.1.2" 1102 | } 1103 | }, 1104 | "wordwrap": { 1105 | "version": "0.0.3", 1106 | "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", 1107 | "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", 1108 | "dev": true 1109 | } 1110 | } 1111 | }, 1112 | "source-map": { 1113 | "version": "0.1.43", 1114 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz", 1115 | "integrity": "sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=", 1116 | "dev": true, 1117 | "optional": true, 1118 | "requires": { 1119 | "amdefine": "1.0.0" 1120 | }, 1121 | "dependencies": { 1122 | "amdefine": { 1123 | "version": "1.0.0", 1124 | "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.0.tgz", 1125 | "integrity": "sha1-/RdHRwDLXMnCtwnwvp0jzjwZjDM=", 1126 | "dev": true, 1127 | "optional": true 1128 | } 1129 | } 1130 | } 1131 | } 1132 | } 1133 | } 1134 | }, 1135 | "readable-stream": { 1136 | "version": "1.1.13", 1137 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.13.tgz", 1138 | "integrity": "sha1-9u73ZPUUyJ4rniMUanW6EGdW0j4=", 1139 | "dev": true, 1140 | "requires": { 1141 | "core-util-is": "1.0.1", 1142 | "inherits": "2.0.1", 1143 | "isarray": "0.0.1", 1144 | "string_decoder": "0.10.31" 1145 | }, 1146 | "dependencies": { 1147 | "core-util-is": { 1148 | "version": "1.0.1", 1149 | "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.1.tgz", 1150 | "integrity": "sha1-awcIWu+aPMrG7lO/nT3wwVIaVTg=", 1151 | "dev": true 1152 | } 1153 | } 1154 | }, 1155 | "stream-combiner2": { 1156 | "version": "1.0.2", 1157 | "resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.0.2.tgz", 1158 | "integrity": "sha1-unKmtQy/q/qVD8i8h2BL0B62BnE=", 1159 | "dev": true, 1160 | "requires": { 1161 | "duplexer2": "0.0.2", 1162 | "through2": "0.5.1" 1163 | }, 1164 | "dependencies": { 1165 | "through2": { 1166 | "version": "0.5.1", 1167 | "resolved": "https://registry.npmjs.org/through2/-/through2-0.5.1.tgz", 1168 | "integrity": "sha1-390BLrnHAOIyP9M084rGIqs3Lac=", 1169 | "dev": true, 1170 | "requires": { 1171 | "readable-stream": "1.0.33", 1172 | "xtend": "3.0.0" 1173 | }, 1174 | "dependencies": { 1175 | "readable-stream": { 1176 | "version": "1.0.33", 1177 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.33.tgz", 1178 | "integrity": "sha1-OjYN1mwbHX/UcFOJhg7aHQ9hEmw=", 1179 | "dev": true, 1180 | "requires": { 1181 | "core-util-is": "1.0.1", 1182 | "inherits": "2.0.1", 1183 | "isarray": "0.0.1", 1184 | "string_decoder": "0.10.31" 1185 | }, 1186 | "dependencies": { 1187 | "core-util-is": { 1188 | "version": "1.0.1", 1189 | "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.1.tgz", 1190 | "integrity": "sha1-awcIWu+aPMrG7lO/nT3wwVIaVTg=", 1191 | "dev": true 1192 | } 1193 | } 1194 | }, 1195 | "xtend": { 1196 | "version": "3.0.0", 1197 | "resolved": "https://registry.npmjs.org/xtend/-/xtend-3.0.0.tgz", 1198 | "integrity": "sha1-XM50B7r2Qsunvs2laBEcST9ZZlo=", 1199 | "dev": true 1200 | } 1201 | } 1202 | } 1203 | } 1204 | } 1205 | } 1206 | }, 1207 | "os-browserify": { 1208 | "version": "0.1.2", 1209 | "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.1.2.tgz", 1210 | "integrity": "sha1-ScoCk+CxlZCl9d4Qx/JlphfY/lQ=", 1211 | "dev": true 1212 | }, 1213 | "parents": { 1214 | "version": "1.0.1", 1215 | "resolved": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz", 1216 | "integrity": "sha1-/t1NK/GTp3dF/nHjcdc8MwfZx1E=", 1217 | "dev": true, 1218 | "requires": { 1219 | "path-platform": "0.11.15" 1220 | }, 1221 | "dependencies": { 1222 | "path-platform": { 1223 | "version": "0.11.15", 1224 | "resolved": "https://registry.npmjs.org/path-platform/-/path-platform-0.11.15.tgz", 1225 | "integrity": "sha1-6GQhf3TDaFDwhSt43Hv31KVyG/I=", 1226 | "dev": true 1227 | } 1228 | } 1229 | }, 1230 | "path-browserify": { 1231 | "version": "0.0.0", 1232 | "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz", 1233 | "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=", 1234 | "dev": true 1235 | }, 1236 | "process": { 1237 | "version": "0.11.1", 1238 | "resolved": "https://registry.npmjs.org/process/-/process-0.11.1.tgz", 1239 | "integrity": "sha1-7jvstDNe3zyLFMy/fhehElpEMa4=", 1240 | "dev": true 1241 | }, 1242 | "punycode": { 1243 | "version": "1.3.2", 1244 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", 1245 | "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", 1246 | "dev": true 1247 | }, 1248 | "querystring-es3": { 1249 | "version": "0.2.1", 1250 | "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", 1251 | "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", 1252 | "dev": true 1253 | }, 1254 | "read-only-stream": { 1255 | "version": "1.1.1", 1256 | "resolved": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-1.1.1.tgz", 1257 | "integrity": "sha1-Xad8eZ7ROI0++IoYRxu1kk+KC6E=", 1258 | "dev": true, 1259 | "requires": { 1260 | "readable-stream": "1.1.13", 1261 | "readable-wrap": "1.0.0" 1262 | }, 1263 | "dependencies": { 1264 | "readable-stream": { 1265 | "version": "1.1.13", 1266 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.13.tgz", 1267 | "integrity": "sha1-9u73ZPUUyJ4rniMUanW6EGdW0j4=", 1268 | "dev": true, 1269 | "requires": { 1270 | "core-util-is": "1.0.1", 1271 | "inherits": "2.0.1", 1272 | "isarray": "0.0.1", 1273 | "string_decoder": "0.10.31" 1274 | }, 1275 | "dependencies": { 1276 | "core-util-is": { 1277 | "version": "1.0.1", 1278 | "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.1.tgz", 1279 | "integrity": "sha1-awcIWu+aPMrG7lO/nT3wwVIaVTg=", 1280 | "dev": true 1281 | } 1282 | } 1283 | }, 1284 | "readable-wrap": { 1285 | "version": "1.0.0", 1286 | "resolved": "https://registry.npmjs.org/readable-wrap/-/readable-wrap-1.0.0.tgz", 1287 | "integrity": "sha1-O1ohHGMeEjA6VJkcgGwX564ga/8=", 1288 | "dev": true, 1289 | "requires": { 1290 | "readable-stream": "1.1.13" 1291 | } 1292 | } 1293 | } 1294 | }, 1295 | "readable-stream": { 1296 | "version": "2.0.2", 1297 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.2.tgz", 1298 | "integrity": "sha1-vsgb6ujPRVFovC5bKzH1vPrtmxs=", 1299 | "dev": true, 1300 | "requires": { 1301 | "core-util-is": "1.0.1", 1302 | "inherits": "2.0.1", 1303 | "isarray": "0.0.1", 1304 | "process-nextick-args": "1.0.2", 1305 | "string_decoder": "0.10.31", 1306 | "util-deprecate": "1.0.1" 1307 | }, 1308 | "dependencies": { 1309 | "core-util-is": { 1310 | "version": "1.0.1", 1311 | "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.1.tgz", 1312 | "integrity": "sha1-awcIWu+aPMrG7lO/nT3wwVIaVTg=", 1313 | "dev": true 1314 | }, 1315 | "process-nextick-args": { 1316 | "version": "1.0.2", 1317 | "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.2.tgz", 1318 | "integrity": "sha1-i00/xYZmi9W2Vz5zLt8rccHB2Ko=", 1319 | "dev": true 1320 | }, 1321 | "util-deprecate": { 1322 | "version": "1.0.1", 1323 | "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.1.tgz", 1324 | "integrity": "sha1-NVaj0TxMaqeYPX4kJUeBlxmbeIE=", 1325 | "dev": true 1326 | } 1327 | } 1328 | }, 1329 | "resolve": { 1330 | "version": "1.1.6", 1331 | "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.6.tgz", 1332 | "integrity": "sha1-00kq0FTKgA9b76YS5hvqwe7Jj48=", 1333 | "dev": true 1334 | }, 1335 | "shasum": { 1336 | "version": "1.0.1", 1337 | "resolved": "https://registry.npmjs.org/shasum/-/shasum-1.0.1.tgz", 1338 | "integrity": "sha1-Dg6FBqO55sNxrZFzhF0E/5EmWH8=", 1339 | "dev": true, 1340 | "requires": { 1341 | "json-stable-stringify": "0.0.1", 1342 | "sha.js": "2.3.6" 1343 | }, 1344 | "dependencies": { 1345 | "json-stable-stringify": { 1346 | "version": "0.0.1", 1347 | "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz", 1348 | "integrity": "sha1-YRwj6BTbN1Un34URk9tZ3Sryf0U=", 1349 | "dev": true, 1350 | "requires": { 1351 | "jsonify": "0.0.0" 1352 | }, 1353 | "dependencies": { 1354 | "jsonify": { 1355 | "version": "0.0.0", 1356 | "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", 1357 | "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", 1358 | "dev": true 1359 | } 1360 | } 1361 | }, 1362 | "sha.js": { 1363 | "version": "2.3.6", 1364 | "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.3.6.tgz", 1365 | "integrity": "sha1-EFhaP3/Y8dpxWtrG+dVFFtoGcMw=", 1366 | "dev": true, 1367 | "requires": { 1368 | "inherits": "2.0.1" 1369 | } 1370 | } 1371 | } 1372 | }, 1373 | "shell-quote": { 1374 | "version": "0.0.1", 1375 | "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-0.0.1.tgz", 1376 | "integrity": "sha1-GkEZbzwDM8SCMjWT1ohuzxU92YY=", 1377 | "dev": true 1378 | }, 1379 | "stream-browserify": { 1380 | "version": "2.0.1", 1381 | "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", 1382 | "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", 1383 | "dev": true, 1384 | "requires": { 1385 | "inherits": "2.0.1", 1386 | "readable-stream": "2.0.2" 1387 | } 1388 | }, 1389 | "stream-http": { 1390 | "version": "1.5.0", 1391 | "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-1.5.0.tgz", 1392 | "integrity": "sha1-v5TSxnOML0xXTnV9+XGbCWFMap4=", 1393 | "dev": true, 1394 | "requires": { 1395 | "builtin-status-codes": "1.0.0", 1396 | "foreach": "2.0.5", 1397 | "indexof": "0.0.1", 1398 | "inherits": "2.0.1", 1399 | "object-keys": "1.0.4", 1400 | "xtend": "4.0.0" 1401 | }, 1402 | "dependencies": { 1403 | "builtin-status-codes": { 1404 | "version": "1.0.0", 1405 | "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-1.0.0.tgz", 1406 | "integrity": "sha1-MGN+4mKXisBxdOFtf4LwrQbgha0=", 1407 | "dev": true 1408 | }, 1409 | "foreach": { 1410 | "version": "2.0.5", 1411 | "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", 1412 | "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=", 1413 | "dev": true 1414 | }, 1415 | "indexof": { 1416 | "version": "0.0.1", 1417 | "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", 1418 | "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=", 1419 | "dev": true 1420 | }, 1421 | "object-keys": { 1422 | "version": "1.0.4", 1423 | "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.4.tgz", 1424 | "integrity": "sha1-sRX5an7oN98VF/vFvZHqll43aFw=", 1425 | "dev": true 1426 | } 1427 | } 1428 | }, 1429 | "string_decoder": { 1430 | "version": "0.10.31", 1431 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", 1432 | "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", 1433 | "dev": true 1434 | }, 1435 | "subarg": { 1436 | "version": "1.0.0", 1437 | "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz", 1438 | "integrity": "sha1-9izxdYHplrSPyWVpn1TAauJouNI=", 1439 | "dev": true, 1440 | "requires": { 1441 | "minimist": "1.2.0" 1442 | }, 1443 | "dependencies": { 1444 | "minimist": { 1445 | "version": "1.2.0", 1446 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", 1447 | "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", 1448 | "dev": true 1449 | } 1450 | } 1451 | }, 1452 | "syntax-error": { 1453 | "version": "1.1.4", 1454 | "resolved": "https://registry.npmjs.org/syntax-error/-/syntax-error-1.1.4.tgz", 1455 | "integrity": "sha1-GtA14bT3L+FhhlEKwk8FXEgAL20=", 1456 | "dev": true, 1457 | "requires": { 1458 | "acorn": "1.2.2" 1459 | }, 1460 | "dependencies": { 1461 | "acorn": { 1462 | "version": "1.2.2", 1463 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-1.2.2.tgz", 1464 | "integrity": "sha1-yM4n3grMdtiW0rH6099YjZ6C8BQ=", 1465 | "dev": true 1466 | } 1467 | } 1468 | }, 1469 | "through2": { 1470 | "version": "1.1.1", 1471 | "resolved": "https://registry.npmjs.org/through2/-/through2-1.1.1.tgz", 1472 | "integrity": "sha1-CEfLxESfNAVXTb3M2buEG4OsNUU=", 1473 | "dev": true, 1474 | "requires": { 1475 | "readable-stream": "1.1.13", 1476 | "xtend": "4.0.0" 1477 | }, 1478 | "dependencies": { 1479 | "readable-stream": { 1480 | "version": "1.1.13", 1481 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.13.tgz", 1482 | "integrity": "sha1-9u73ZPUUyJ4rniMUanW6EGdW0j4=", 1483 | "dev": true, 1484 | "requires": { 1485 | "core-util-is": "1.0.1", 1486 | "inherits": "2.0.1", 1487 | "isarray": "0.0.1", 1488 | "string_decoder": "0.10.31" 1489 | }, 1490 | "dependencies": { 1491 | "core-util-is": { 1492 | "version": "1.0.1", 1493 | "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.1.tgz", 1494 | "integrity": "sha1-awcIWu+aPMrG7lO/nT3wwVIaVTg=", 1495 | "dev": true 1496 | } 1497 | } 1498 | } 1499 | } 1500 | }, 1501 | "timers-browserify": { 1502 | "version": "1.4.1", 1503 | "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.1.tgz", 1504 | "integrity": "sha1-v4r+t7UNbFAOKz4KXXWcQAXphdc=", 1505 | "dev": true, 1506 | "requires": { 1507 | "process": "0.11.1" 1508 | } 1509 | }, 1510 | "tty-browserify": { 1511 | "version": "0.0.0", 1512 | "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", 1513 | "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=", 1514 | "dev": true 1515 | }, 1516 | "url": { 1517 | "version": "0.10.3", 1518 | "resolved": "https://registry.npmjs.org/url/-/url-0.10.3.tgz", 1519 | "integrity": "sha1-Ah5NnHcF8hu/N9A861h2dAJ3TGQ=", 1520 | "dev": true, 1521 | "requires": { 1522 | "punycode": "1.3.2", 1523 | "querystring": "0.2.0" 1524 | }, 1525 | "dependencies": { 1526 | "querystring": { 1527 | "version": "0.2.0", 1528 | "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", 1529 | "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", 1530 | "dev": true 1531 | } 1532 | } 1533 | }, 1534 | "util": { 1535 | "version": "0.10.3", 1536 | "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", 1537 | "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", 1538 | "dev": true, 1539 | "requires": { 1540 | "inherits": "2.0.1" 1541 | } 1542 | }, 1543 | "vm-browserify": { 1544 | "version": "0.0.4", 1545 | "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", 1546 | "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", 1547 | "dev": true, 1548 | "requires": { 1549 | "indexof": "0.0.1" 1550 | }, 1551 | "dependencies": { 1552 | "indexof": { 1553 | "version": "0.0.1", 1554 | "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", 1555 | "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=", 1556 | "dev": true 1557 | } 1558 | } 1559 | }, 1560 | "xtend": { 1561 | "version": "4.0.0", 1562 | "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.0.tgz", 1563 | "integrity": "sha1-i8Nv+Hrtvnzp6vC8o2sjVKdDhA8=", 1564 | "dev": true 1565 | } 1566 | } 1567 | }, 1568 | "clean-css": { 1569 | "version": "3.4.1", 1570 | "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-3.4.1.tgz", 1571 | "integrity": "sha1-Yyt1MYLTXjZb6ozpBiWpnYOoLiw=", 1572 | "dev": true, 1573 | "requires": { 1574 | "commander": "2.8.1", 1575 | "source-map": "0.4.4" 1576 | }, 1577 | "dependencies": { 1578 | "commander": { 1579 | "version": "2.8.1", 1580 | "resolved": "https://registry.npmjs.org/commander/-/commander-2.8.1.tgz", 1581 | "integrity": "sha1-Br42f+v9oMMwqh4qBy09yXYkJdQ=", 1582 | "dev": true, 1583 | "requires": { 1584 | "graceful-readlink": "1.0.1" 1585 | }, 1586 | "dependencies": { 1587 | "graceful-readlink": { 1588 | "version": "1.0.1", 1589 | "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", 1590 | "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=", 1591 | "dev": true 1592 | } 1593 | } 1594 | }, 1595 | "source-map": { 1596 | "version": "0.4.4", 1597 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", 1598 | "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", 1599 | "dev": true, 1600 | "requires": { 1601 | "amdefine": "1.0.0" 1602 | }, 1603 | "dependencies": { 1604 | "amdefine": { 1605 | "version": "1.0.0", 1606 | "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.0.tgz", 1607 | "integrity": "sha1-/RdHRwDLXMnCtwnwvp0jzjwZjDM=", 1608 | "dev": true 1609 | } 1610 | } 1611 | } 1612 | } 1613 | }, 1614 | "dev-server": { 1615 | "version": "0.0.2", 1616 | "resolved": "https://registry.npmjs.org/dev-server/-/dev-server-0.0.2.tgz", 1617 | "integrity": "sha1-GqyDXQvgV6kuUPnwzJs6MxbDSuo=", 1618 | "dev": true, 1619 | "requires": { 1620 | "better-inspect": "0.0.1", 1621 | "connect": "2.6.2", 1622 | "debug": "0.8.1", 1623 | "express": "3.0.6", 1624 | "growl": "1.6.1" 1625 | }, 1626 | "dependencies": { 1627 | "better-inspect": { 1628 | "version": "0.0.1", 1629 | "resolved": "https://registry.npmjs.org/better-inspect/-/better-inspect-0.0.1.tgz", 1630 | "integrity": "sha1-04HHTmqU5o1/H+xjEUG/ynpt/l8=", 1631 | "dev": true 1632 | }, 1633 | "connect": { 1634 | "version": "2.6.2", 1635 | "resolved": "https://registry.npmjs.org/connect/-/connect-2.6.2.tgz", 1636 | "integrity": "sha1-LGbqZYPeYkdf4VugPl8HTlMFDvs=", 1637 | "dev": true, 1638 | "requires": { 1639 | "bytes": "0.1.0", 1640 | "cookie": "0.0.4", 1641 | "cookie-signature": "0.0.1", 1642 | "crc": "0.2.0", 1643 | "debug": "0.8.1", 1644 | "formidable": "1.0.11", 1645 | "fresh": "0.1.0", 1646 | "pause": "0.0.1", 1647 | "qs": "0.5.1", 1648 | "send": "0.1.0" 1649 | }, 1650 | "dependencies": { 1651 | "bytes": { 1652 | "version": "0.1.0", 1653 | "resolved": "https://registry.npmjs.org/bytes/-/bytes-0.1.0.tgz", 1654 | "integrity": "sha1-xXSBIigSbWNp0VdpJahXnbP45aI=", 1655 | "dev": true 1656 | }, 1657 | "cookie": { 1658 | "version": "0.0.4", 1659 | "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.0.4.tgz", 1660 | "integrity": "sha1-VFa9R67iZm6sl26oCmEFlASD/pg=", 1661 | "dev": true 1662 | }, 1663 | "cookie-signature": { 1664 | "version": "0.0.1", 1665 | "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-0.0.1.tgz", 1666 | "integrity": "sha1-E9NgO1z2O++/haiAHjeqkA20aYU=", 1667 | "dev": true 1668 | }, 1669 | "crc": { 1670 | "version": "0.2.0", 1671 | "resolved": "https://registry.npmjs.org/crc/-/crc-0.2.0.tgz", 1672 | "integrity": "sha1-9Ehrm/ChLfg8P8oU4x4DD9q9lFQ=", 1673 | "dev": true 1674 | }, 1675 | "formidable": { 1676 | "version": "1.0.11", 1677 | "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.0.11.tgz", 1678 | "integrity": "sha1-aPYzJaA15kS297s9ESQ7l2HeGzA=", 1679 | "dev": true 1680 | }, 1681 | "fresh": { 1682 | "version": "0.1.0", 1683 | "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.1.0.tgz", 1684 | "integrity": "sha1-A+SwF4Qk5MLV0ZpU2IFM3JeTSFA=", 1685 | "dev": true 1686 | }, 1687 | "pause": { 1688 | "version": "0.0.1", 1689 | "resolved": "https://registry.npmjs.org/pause/-/pause-0.0.1.tgz", 1690 | "integrity": "sha1-HUCLP9t2kjuVQ9lvtMnf1TXZy10=", 1691 | "dev": true 1692 | }, 1693 | "qs": { 1694 | "version": "0.5.1", 1695 | "resolved": "https://registry.npmjs.org/qs/-/qs-0.5.1.tgz", 1696 | "integrity": "sha1-n2v12axsdjhOldNtFbSJgOXkrdA=", 1697 | "dev": true 1698 | }, 1699 | "send": { 1700 | "version": "0.1.0", 1701 | "resolved": "https://registry.npmjs.org/send/-/send-0.1.0.tgz", 1702 | "integrity": "sha1-z7COvTzsm3/Bo32f+eh1qXHPRkA=", 1703 | "dev": true, 1704 | "requires": { 1705 | "debug": "0.8.1", 1706 | "fresh": "0.1.0", 1707 | "mime": "1.2.6", 1708 | "range-parser": "0.0.4" 1709 | }, 1710 | "dependencies": { 1711 | "mime": { 1712 | "version": "1.2.6", 1713 | "resolved": "https://registry.npmjs.org/mime/-/mime-1.2.6.tgz", 1714 | "integrity": "sha1-sfhsdowCX6h7SAdfFwnyiuryA2U=", 1715 | "dev": true 1716 | }, 1717 | "range-parser": { 1718 | "version": "0.0.4", 1719 | "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-0.0.4.tgz", 1720 | "integrity": "sha1-wEJ//vUcEKy6B4KkbJYC50T/Ygs=", 1721 | "dev": true 1722 | } 1723 | } 1724 | } 1725 | } 1726 | }, 1727 | "debug": { 1728 | "version": "0.8.1", 1729 | "resolved": "https://registry.npmjs.org/debug/-/debug-0.8.1.tgz", 1730 | "integrity": "sha1-IP9NJvXkIstoobrLu2EDmtjBwTA=", 1731 | "dev": true 1732 | }, 1733 | "express": { 1734 | "version": "3.0.6", 1735 | "resolved": "https://registry.npmjs.org/express/-/express-3.0.6.tgz", 1736 | "integrity": "sha1-0nT8uGi5V4i/SvYhaNddE/132LQ=", 1737 | "dev": true, 1738 | "requires": { 1739 | "buffer-crc32": "0.1.1", 1740 | "commander": "0.6.1", 1741 | "connect": "2.7.2", 1742 | "cookie": "0.0.5", 1743 | "cookie-signature": "0.0.1", 1744 | "debug": "0.8.1", 1745 | "fresh": "0.1.0", 1746 | "methods": "0.0.1", 1747 | "mkdirp": "0.3.3", 1748 | "range-parser": "0.0.4", 1749 | "send": "0.1.0" 1750 | }, 1751 | "dependencies": { 1752 | "buffer-crc32": { 1753 | "version": "0.1.1", 1754 | "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.1.1.tgz", 1755 | "integrity": "sha1-fhENyZU5CKt8MqzccMn5RbHLxSY=", 1756 | "dev": true 1757 | }, 1758 | "commander": { 1759 | "version": "0.6.1", 1760 | "resolved": "https://registry.npmjs.org/commander/-/commander-0.6.1.tgz", 1761 | "integrity": "sha1-+mihT2qUXVTbvlDYzbMyDp47GgY=", 1762 | "dev": true 1763 | }, 1764 | "connect": { 1765 | "version": "2.7.2", 1766 | "resolved": "https://registry.npmjs.org/connect/-/connect-2.7.2.tgz", 1767 | "integrity": "sha1-EXmUY72qr5nV+b7xM78kILJuJoA=", 1768 | "dev": true, 1769 | "requires": { 1770 | "buffer-crc32": "0.1.1", 1771 | "bytes": "0.1.0", 1772 | "cookie": "0.0.5", 1773 | "cookie-signature": "0.0.1", 1774 | "debug": "0.8.1", 1775 | "formidable": "1.0.11", 1776 | "fresh": "0.1.0", 1777 | "pause": "0.0.1", 1778 | "qs": "0.5.1", 1779 | "send": "0.1.0" 1780 | }, 1781 | "dependencies": { 1782 | "bytes": { 1783 | "version": "0.1.0", 1784 | "resolved": "https://registry.npmjs.org/bytes/-/bytes-0.1.0.tgz", 1785 | "integrity": "sha1-xXSBIigSbWNp0VdpJahXnbP45aI=", 1786 | "dev": true 1787 | }, 1788 | "formidable": { 1789 | "version": "1.0.11", 1790 | "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.0.11.tgz", 1791 | "integrity": "sha1-aPYzJaA15kS297s9ESQ7l2HeGzA=", 1792 | "dev": true 1793 | }, 1794 | "pause": { 1795 | "version": "0.0.1", 1796 | "resolved": "https://registry.npmjs.org/pause/-/pause-0.0.1.tgz", 1797 | "integrity": "sha1-HUCLP9t2kjuVQ9lvtMnf1TXZy10=", 1798 | "dev": true 1799 | }, 1800 | "qs": { 1801 | "version": "0.5.1", 1802 | "resolved": "https://registry.npmjs.org/qs/-/qs-0.5.1.tgz", 1803 | "integrity": "sha1-n2v12axsdjhOldNtFbSJgOXkrdA=", 1804 | "dev": true 1805 | } 1806 | } 1807 | }, 1808 | "cookie": { 1809 | "version": "0.0.5", 1810 | "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.0.5.tgz", 1811 | "integrity": "sha1-+az521frdWjJ/MWWJWt7si4wfIE=", 1812 | "dev": true 1813 | }, 1814 | "cookie-signature": { 1815 | "version": "0.0.1", 1816 | "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-0.0.1.tgz", 1817 | "integrity": "sha1-E9NgO1z2O++/haiAHjeqkA20aYU=", 1818 | "dev": true 1819 | }, 1820 | "fresh": { 1821 | "version": "0.1.0", 1822 | "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.1.0.tgz", 1823 | "integrity": "sha1-A+SwF4Qk5MLV0ZpU2IFM3JeTSFA=", 1824 | "dev": true 1825 | }, 1826 | "methods": { 1827 | "version": "0.0.1", 1828 | "resolved": "https://registry.npmjs.org/methods/-/methods-0.0.1.tgz", 1829 | "integrity": "sha1-J3yQ+L7zlwlkWoNxxRw7bGSOBow=", 1830 | "dev": true 1831 | }, 1832 | "mkdirp": { 1833 | "version": "0.3.3", 1834 | "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.3.tgz", 1835 | "integrity": "sha1-WV4lHBNww6aLqyE20ONIuBBa3xM=", 1836 | "dev": true 1837 | }, 1838 | "range-parser": { 1839 | "version": "0.0.4", 1840 | "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-0.0.4.tgz", 1841 | "integrity": "sha1-wEJ//vUcEKy6B4KkbJYC50T/Ygs=", 1842 | "dev": true 1843 | }, 1844 | "send": { 1845 | "version": "0.1.0", 1846 | "resolved": "https://registry.npmjs.org/send/-/send-0.1.0.tgz", 1847 | "integrity": "sha1-z7COvTzsm3/Bo32f+eh1qXHPRkA=", 1848 | "dev": true, 1849 | "requires": { 1850 | "debug": "0.8.1", 1851 | "fresh": "0.1.0", 1852 | "mime": "1.2.6", 1853 | "range-parser": "0.0.4" 1854 | }, 1855 | "dependencies": { 1856 | "mime": { 1857 | "version": "1.2.6", 1858 | "resolved": "https://registry.npmjs.org/mime/-/mime-1.2.6.tgz", 1859 | "integrity": "sha1-sfhsdowCX6h7SAdfFwnyiuryA2U=", 1860 | "dev": true 1861 | } 1862 | } 1863 | } 1864 | } 1865 | }, 1866 | "growl": { 1867 | "version": "1.6.1", 1868 | "resolved": "https://registry.npmjs.org/growl/-/growl-1.6.1.tgz", 1869 | "integrity": "sha1-xNm7ro+aVyKV2gYrA81z4e8uFLI=", 1870 | "dev": true 1871 | } 1872 | } 1873 | }, 1874 | "jquery": { 1875 | "version": "3.3.1", 1876 | "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.3.1.tgz", 1877 | "integrity": "sha512-Ubldcmxp5np52/ENotGxlLe6aGMvmF4R8S6tZjsP6Knsaxd/xp3Zrh50cG93lR6nPXyUFwzN3ZSOQI0wRJNdGg==", 1878 | "dev": true 1879 | }, 1880 | "uglifyify": { 1881 | "version": "3.0.1", 1882 | "resolved": "https://registry.npmjs.org/uglifyify/-/uglifyify-3.0.1.tgz", 1883 | "integrity": "sha1-id1kZ+OjOHW3jDXYEFX1vSFxYFc=", 1884 | "dev": true, 1885 | "requires": { 1886 | "convert-source-map": "0.2.6", 1887 | "extend": "1.3.0", 1888 | "minimatch": "0.3.0", 1889 | "through": "2.3.8", 1890 | "uglify-js": "2.4.24" 1891 | }, 1892 | "dependencies": { 1893 | "convert-source-map": { 1894 | "version": "0.2.6", 1895 | "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-0.2.6.tgz", 1896 | "integrity": "sha1-rg7XNuimNEpYtQqJRyPeXIUd4tQ=", 1897 | "dev": true 1898 | }, 1899 | "extend": { 1900 | "version": "1.3.0", 1901 | "resolved": "https://registry.npmjs.org/extend/-/extend-1.3.0.tgz", 1902 | "integrity": "sha1-0VFvsP9WJNLr+RI+odrFoZlABPg=", 1903 | "dev": true 1904 | }, 1905 | "minimatch": { 1906 | "version": "0.3.0", 1907 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.3.0.tgz", 1908 | "integrity": "sha1-J12O2qxPG7MyZHIInnlJyDlGmd0=", 1909 | "dev": true, 1910 | "requires": { 1911 | "lru-cache": "2.6.5", 1912 | "sigmund": "1.0.1" 1913 | }, 1914 | "dependencies": { 1915 | "lru-cache": { 1916 | "version": "2.6.5", 1917 | "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.6.5.tgz", 1918 | "integrity": "sha1-5W1jVBSO3o13B7WNFDIg/QjfD9U=", 1919 | "dev": true 1920 | }, 1921 | "sigmund": { 1922 | "version": "1.0.1", 1923 | "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", 1924 | "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=", 1925 | "dev": true 1926 | } 1927 | } 1928 | }, 1929 | "through": { 1930 | "version": "2.3.8", 1931 | "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", 1932 | "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", 1933 | "dev": true 1934 | }, 1935 | "uglify-js": { 1936 | "version": "2.4.24", 1937 | "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.4.24.tgz", 1938 | "integrity": "sha1-+tV1XB4Vd2WLsG/5q25UjJW+vW4=", 1939 | "dev": true, 1940 | "requires": { 1941 | "async": "0.2.10", 1942 | "source-map": "0.1.34", 1943 | "uglify-to-browserify": "1.0.2", 1944 | "yargs": "3.5.4" 1945 | }, 1946 | "dependencies": { 1947 | "async": { 1948 | "version": "0.2.10", 1949 | "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz", 1950 | "integrity": "sha1-trvgsGdLnXGXCMo43owjfLUmw9E=", 1951 | "dev": true 1952 | }, 1953 | "source-map": { 1954 | "version": "0.1.34", 1955 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.34.tgz", 1956 | "integrity": "sha1-p8/omux7FoLDsZjQrPtH19CQVms=", 1957 | "dev": true, 1958 | "requires": { 1959 | "amdefine": "1.0.0" 1960 | }, 1961 | "dependencies": { 1962 | "amdefine": { 1963 | "version": "1.0.0", 1964 | "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.0.tgz", 1965 | "integrity": "sha1-/RdHRwDLXMnCtwnwvp0jzjwZjDM=", 1966 | "dev": true 1967 | } 1968 | } 1969 | }, 1970 | "uglify-to-browserify": { 1971 | "version": "1.0.2", 1972 | "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", 1973 | "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", 1974 | "dev": true 1975 | }, 1976 | "yargs": { 1977 | "version": "3.5.4", 1978 | "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.5.4.tgz", 1979 | "integrity": "sha1-2K/49mXpTDS9JZvevRv68N3TU2E=", 1980 | "dev": true, 1981 | "requires": { 1982 | "camelcase": "1.2.1", 1983 | "decamelize": "1.0.0", 1984 | "window-size": "0.1.0", 1985 | "wordwrap": "0.0.2" 1986 | }, 1987 | "dependencies": { 1988 | "camelcase": { 1989 | "version": "1.2.1", 1990 | "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", 1991 | "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", 1992 | "dev": true 1993 | }, 1994 | "decamelize": { 1995 | "version": "1.0.0", 1996 | "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.0.0.tgz", 1997 | "integrity": "sha1-UocSL3FpHUUFsY/yJY3EAKWyOEc=", 1998 | "dev": true 1999 | }, 2000 | "window-size": { 2001 | "version": "0.1.0", 2002 | "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", 2003 | "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", 2004 | "dev": true 2005 | }, 2006 | "wordwrap": { 2007 | "version": "0.0.2", 2008 | "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", 2009 | "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", 2010 | "dev": true 2011 | } 2012 | } 2013 | } 2014 | } 2015 | } 2016 | } 2017 | } 2018 | } 2019 | } 2020 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "js-pdu-decoder", 3 | "version": "1.0.4", 4 | "description": "Decodes many PDU encoded SMS formats.", 5 | "main": "jspdudecoder.js", 6 | "scripts": { 7 | "bundle-js": "node_modules/browserify/bin/cmd.js -g uglifyify source/jspdudecoder.js -o source/bundle.js", 8 | "bundle-css": "node_modules/clean-css/bin/cleancss source/jspdudecoder.css -o source/bundle.css", 9 | "serve": "DEV_SERVER_ROOT=source/ node_modules/dev-server/bin/dev-server" 10 | }, 11 | "repository": { 12 | "type": "git", 13 | "url": "git@github.com:tladesignz/jsPduDecoder.git" 14 | }, 15 | "keywords": [ 16 | "SMS", 17 | "PDU", 18 | "Decoder" 19 | ], 20 | "author": "Benjamin Erhart", 21 | "license": "(GPL-3.0 OR Artistic-2.0)", 22 | "devDependencies": { 23 | "browserify": "^11.0.1", 24 | "clean-css": "^3.4.1", 25 | "dev-server": "0.0.2", 26 | "jquery": "^3.0.0", 27 | "uglifyify": "^3.0.1" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /source/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | JavaScript PDU Mode SMS Decoder 7 | 8 | 9 | 10 | 11 |

12 | 13 | Fork me on GitHub 18 | 19 |

20 | 21 |

22 | JavaScript PDU Mode SMS Decoder 23 |

24 |
25 |
26 |
    27 |
  • 28 | 29 | 30 |
  • 31 |
  • 32 | 33 | 34 |
  • 35 |
  • 36 |
    37 | Charset 38 | 39 | 40 | 41 | 42 | 43 | 44 |
    45 |
  • 46 |
  • 47 | 48 | 49 |
  • 50 |
  • 51 | 52 |
  • 53 |
54 |
55 |
56 |
57 |

58 | README - jsPduDecoder 59 |

60 | 61 |

62 | Decodes many PDU encoded SMS formats. 63 | The main decoding is done in JavaScript. For WBXML decoding, a server side third party library 'wbxml.lib' is used via a proxy script. 64 |

65 | 66 |

67 | COPYRIGHT AND LICENCE 68 |

69 | 70 |

71 | Copyright (C) 2009 Benjamin Erhart 72 |

73 | 74 |

75 | This program is free software; you can redistribute it and/or modify it 76 | under the terms of either: the GNU General Public License as published 77 | by the Free Software Foundation; or the Artistic License. 78 |

79 | 80 |

81 | See dev.perl.org/licenses for more information. 82 |

83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 99 | 104 | 105 | 106 | 109 | 112 | 117 | 118 | 119 | 122 | 125 | 130 | 131 | 132 | 135 | 138 | 143 | 144 | 145 | 148 | 151 | 156 | 157 | 158 | 161 | 164 | 179 | 180 | 181 | 184 | 187 | 192 | 193 | 194 | 197 | 200 | 205 | 206 | 207 | 210 | 213 | 218 | 219 | 220 | 223 | 226 | 231 | 232 | 233 | 236 | 239 | 244 | 245 | 246 |
Some test examples, the tool will work with:
Standard SMS 95 | 96 | http://twit88.com/home/utility/sms-pdu-encode-decode 97 | 98 | 100 | 101 | 07911326040000F0040B911346610089F60000208062917314080CC8F71D14969741F977FD07 102 | 103 |
107 | Standard SMS Deliver 108 | 110 | http://www.dreamfabric.com/sms/ 111 | 113 | 114 | 07917283010010F5040BC87238880900F10000993092516195800AE8329BFD4697D9EC37 115 | 116 |
120 | Standard SMS Submit 121 | 123 | http://www.dreamfabric.com/sms/ 124 | 126 | 127 | 0011000B916407281553F80000AA0AE8329BFD4697D9EC37 128 | 129 |
133 | Standard SMS 134 | 136 | http://mobiletidings.com/2009/02/11/more-on-the-sms-pdu/ 137 | 139 | 140 | 0001000B915121551532F400000CC8F79D9C07E54F61363B04 141 | 142 |
146 | Flash SMS 147 | 149 | http://mobiletidings.com/2009/02/12/sending-a-flash-sms-message/ 150 | 152 | 153 | 0001010B915121551532F40010104190991D9EA341EDF27C1E3E9743 154 | 155 |
159 | 3 Concatenated SMS 160 | 162 | http://mobiletidings.com/2009/02/18/combining-sms-messages/ 163 | 165 | 166 | 0041000B915121551532F40000A0050003000301986F79B90D4AC3E7F53688FC66BFE5A0799A0E0AB7CB741668FC76CFCB637A995E9783C2E4343C3D4F8FD3EE33A8CC4ED359A079990C22BF41E5747DDE7E9341F4721BFE9683D2EE719A9C26D7DD74509D0E6287C56F791954A683C86FF65B5E06B5C36777181466A7E3F5B0AB4A0795DDE936284C06B5D3EE741B642FBBD3E1360B14AFA7E7 167 | 168 |
169 |
170 | 171 | 0041010B915121551532F40000A005000300030240EEF79C2EAF9341657C593E4ED3C3F4F4DB0DAAB3D9E1F6F80D6287C56F797A0E72A7E769509D0E0AB3D3F17A1A0E2AE341E53068FC6EB7DFE43768FC76CFCBF17A98EE22D6D37350B84E2F83D2F2BABC0C22BFD96F3928ED06C9CB7079195D7693CBF2341D947683EC6F761D4E0FD3CB207B999DA683CAF37919344EB3D9F53688FC66BFE5 172 | 173 |
174 |
175 | 176 | 0041020B915121551532F4000090050003000303CAA0721D64AE9FD3613AC85D67B3C32078589E0ED3EB7257113F2EC3E9E5BA1C344FBBE9A0F7781C2E8FC374D0B80E4F93C3F4301DE47EBB4170F93B4D2EBBE92CD0BCEEA683D26ED0B8CE868741F17A1AF4369BD3E37418442ECFCBF2BA9B0E6ABFD9EC341D1476A7DBA03419549ED341ECB0F82DAFB75D 177 | 178 |
182 | Service Load WAP Push 183 | 185 | http://mobiletidings.com/2009/02/21/wap-push-over-sms-encodings/ 186 | 188 | 189 | 0041000B915121551532F400042E0B05040B84C0020003F001010A060403B081EA02066A008509036D6F62696C65746964696E67732E636F6D2F0001 190 | 191 |
195 | Service Indication WAP Push 196 | 198 | http://mobiletidings.com/2009/02/26/wap-push-over-sms-si-encoding/ 199 | 201 | 202 | 0041000B915121551532F400045E0B05040B84C0020003F001010B060403AE81EA02056A0045C60C036D6F62696C65746964696E67732E636F6D2F000AC30620090226162510C3062009030416250103436865636B206F7574204D6F62696C6520546964696E677321000101 203 | 204 |
208 | EMS with text formatting 209 | 211 | http://mobiletidings.com/2009/03/12/text-formatting-sms-ems/ 212 | 214 | 215 | 0041000B915121551532F40000631A0A031906200A032104100A032705040A032E05080A043807002B8ACD29A85D9ECFC3E7F21C340EBB41E3B79B1E4EBB41697A989D1EB340E2379BCC02B1C3F27399059AB7C36C3628EC2683C66FF65B5E2683E8653C1D 216 | 217 |
221 | Voicemail Indication 222 | 224 | http://mobiletidings.com/2009/07/08/voicemail-waiting-indication-sms/ 225 | 227 | 228 | 0001AB0B915121551532F400C80F3190BB7C07D9DFE971B91D4EB301 229 | 230 |
234 | Standard SMS-DELIVER 235 | 237 | http://www.developershome.com/sms/cmgrCommand3.asp 238 | 240 | 241 | 07915892000000F0040B915892214365F700007040213252242331493A283D0795C3F33C88FE06C9CB6132885EC6D341EDF27C1E3E97E7207B3A0C0A5241E377BB1D7693E72E 242 | 243 |
247 |
248 |
249 | 250 | -------------------------------------------------------------------------------- /source/jspdudecoder.css: -------------------------------------------------------------------------------- 1 | @import url("reset.css"); 2 | 3 | body { 4 | font-family: 'Verdana', sans-serif; 5 | } 6 | 7 | h1 { 8 | margin: 1em; 9 | 10 | font-size: 1.5em; 11 | text-align: center; 12 | } 13 | 14 | div#content { 15 | margin: 1em; 16 | 17 | } 18 | 19 | form, div#output { 20 | width: 90%; 21 | 22 | margin: 0 auto; 23 | } 24 | 25 | form li { 26 | margin: 1ex 0; 27 | } 28 | 29 | form fieldset { 30 | border: 1px solid black; 31 | padding: 1em; 32 | } 33 | 34 | form legend { 35 | padding: 0 1em; 36 | } 37 | 38 | table.data, table.data table { 39 | border-collapse: separate; 40 | border-spacing: 0.5ex; 41 | 42 | background-color: #EEEEEE; 43 | } 44 | 45 | table.data td { 46 | padding: 0.5ex; 47 | 48 | vertical-align: middle; 49 | 50 | background-color: #DDDDDD; 51 | } 52 | 53 | table.data td.one { 54 | background-color: #BBBBBB; 55 | } 56 | 57 | table.data table { 58 | background-color: #DDDDDD; 59 | } 60 | 61 | table.data table td { 62 | background-color: #CCCCCC; 63 | } 64 | 65 | #readme { 66 | margin-top: 5em; 67 | } 68 | 69 | #readme p { 70 | margin: 1em; 71 | } 72 | 73 | #readme table { 74 | width: 100%; 75 | 76 | table-layout: fixed; 77 | } 78 | 79 | #readme table caption { 80 | margin: 1em; 81 | } 82 | 83 | #readme table td { 84 | padding: 1ex; 85 | 86 | word-wrap: break-word; 87 | vertical-align: middle; 88 | } 89 | 90 | #readme table tr:nth-child(odd) { 91 | background-color: #CCCCCC; 92 | } -------------------------------------------------------------------------------- /source/jspdudecoder.js: -------------------------------------------------------------------------------- 1 | /*jslint browser: true */ 2 | /*global require, cleanInput, constructOutput, setForm, pduDecoder, splitter, tokenizer, tokens, wapDecoder, reverse, padwZeros, console, getChar, wapTokens, gsm7bit */ 3 | /** 4 | * pduDecoder 5 | * 6 | * Catches the submit event of a form with id 'fPdu', decodes the PDU encoded SMS provided in 7 | * a contained form element named 'pdu' and writes the result in an element with id 'output'. 8 | * 9 | * For use with User-Data-only PDU strings there are some parameters available: 10 | * 11 | * - Checkbox 'ud_only', if set will generate a valid PDU header in consideration of the following flags: 12 | * - Radio group: 'alphabet', values 'standard', 'ucs2' or '8bit' will set the respective encoding flags 13 | * - Checkbox 'udhi' will set the User-Data-Header-Indicator flag 14 | * 15 | * All form field values can be set as URI parameters and will be copied to their respective fields on startup. 16 | * If at least one parameter was given, the decoding starts immediately. 17 | * 18 | * This is done twice: 19 | * - using a library from {@linkplain http://twit88.com/home/utility/sms-pdu-encode-decode} (if exists) 20 | * - using a self made parser provided herein 21 | * @author Benjamin Erhart 22 | * @constructor 23 | */ 24 | (function(){ 25 | 'use strict'; 26 | 27 | var $ = require('jquery'); 28 | 29 | 30 | $( 'document' ).ready( function() { 31 | 32 | $( '#ud_only' ).change( function( evt ) { 33 | if (evt.target.checked) { 34 | $( '.prefix' ).attr( 'disabled', false ); 35 | } 36 | else { 37 | $( '.prefix' ).attr( 'disabled', true ); 38 | } 39 | } ); 40 | 41 | var $fPdu = $( '#fPdu' ); 42 | $fPdu.find( ':input' ).change( function() { 43 | $fPdu.submit(); 44 | } ); 45 | 46 | $fPdu.submit( function( evt ) { 47 | evt.preventDefault(); 48 | evt.stopPropagation(); 49 | evt.stopImmediatePropagation(); 50 | 51 | var t = evt.target; 52 | 53 | cleanInput( t.pdu ); 54 | 55 | var pdu = t.pdu.value; 56 | 57 | var $output = $( '#output' ); 58 | 59 | if (!pdu) { 60 | $output.empty(); 61 | return false; 62 | } 63 | 64 | var prefix = '00'; 65 | var alphabet = undefined; 66 | var len; 67 | 68 | if (t.ud_only.checked) { 69 | 70 | if (t.udhi.checked) { 71 | prefix += '41'; 72 | } 73 | else { 74 | prefix += '01'; 75 | } 76 | 77 | prefix += '000000'; 78 | 79 | $( t.alphabet ).each( function() { 80 | if (this.checked) { 81 | alphabet = this.value; 82 | } 83 | } ); 84 | 85 | if (alphabet === 'standard') { 86 | prefix += '00'; 87 | } 88 | else if (alphabet === 'ucs2') { 89 | prefix += '08'; 90 | } 91 | else if (alphabet === '8bit') { 92 | prefix += '04'; 93 | } 94 | 95 | len = (pdu.length / 2).toString( 16 ); 96 | 97 | prefix += len.length < 2 ? '0' + len : len; 98 | 99 | pdu = prefix + pdu; 100 | } 101 | 102 | $output.html( constructOutput( pdu ) ); 103 | 104 | $output.find( 'td:last:contains(<)' ).each( function() { 105 | var $this = $( this ); 106 | 107 | $this.text( $this.text().replace( /</g, '<' ).replace( />/g, '>' ).replace( /&/g, '&' ) ); 108 | } ); 109 | 110 | if (t.ud_only.checked) { 111 | $( 'table.data > tbody' ).prepend( 'Some information hidden - click here to reveal.' ); 112 | $( 'table.data tr.hideable' ).hide(); 113 | $( 'table.data td.one' ).click( function() { 114 | $( 'table.data td.one' ).parent().remove(); 115 | $( 'table.data tr.hideable' ).show(); 116 | } ); 117 | } 118 | 119 | return false; 120 | } ); 121 | 122 | if (setForm()) { 123 | $( 'form#fPdu' ).submit(); 124 | } 125 | } ); 126 | 127 | /** 128 | * Constructs the HTML markup with the information derived from two decoders. 129 | * 130 | * @param {string} pdu Contains the PDU decoded SMS 131 | * @return {string} HTML markup 132 | */ 133 | function constructOutput( pdu ) { 134 | var i, 135 | info = ''; 136 | 137 | var data = pduDecoder( pdu ); 138 | 139 | var datastr = ''; 140 | 141 | if (typeof data === 'object') { 142 | for (i = 0; i < data.length; ++i) { 143 | datastr += '' + data[ i ].replace( /\t/, '' ) + ''; 144 | } 145 | } 146 | else { 147 | // Probably an error text instead of decoded PDU information 148 | datastr = '' + data + ''; 149 | } 150 | 151 | datastr = datastr.replace( />\(hideable\)/g, ' class="hideable">' ); 152 | 153 | return '

' + info.replace( /\n/g, '
' ) + '

' + datastr + '
'; 154 | } 155 | 156 | /** 157 | * Actual implementation of a PDU decoder. Decodes all information defined in 158 | * {@linkplain http://www.dreamfabric.com/sms/} and {@linkplain http://mobiletidings.com/} 159 | * 160 | * @param {string} pdu Contains the PDU decoded SMS 161 | * @return {Array|string} Decoded information from PDU as one dimensional array, description and information split through '\t' 162 | * or error string if not a valid PDU 163 | */ 164 | function pduDecoder( pdu ) { 165 | var i, 166 | result = []; 167 | 168 | var octets = splitter( pdu ); 169 | 170 | if (!octets) { 171 | return "Invalid PDU String!"; 172 | } 173 | 174 | var tokens = tokenizer( octets ); 175 | 176 | for (i = 0; i < tokens.length; ++i) { 177 | result.push( tokens[ i ]() ); 178 | } 179 | 180 | return result; 181 | } 182 | 183 | /** 184 | * Splits a PDU string into an array of 2 byte octets 185 | * 186 | * @param {string} pdu 187 | * @return {?Array} Octets or null if PDU contains invalid characters or has invalid length 188 | */ 189 | function splitter( pdu ) { 190 | var i, 191 | octets = []; 192 | 193 | for (i = 0; i < pdu.length; i += 2) { 194 | var octet = pdu.substr( i, 2 ); 195 | 196 | if (!octet.match( /^[0-9A-F]{2}$/i )) { 197 | return null; 198 | } 199 | 200 | octets.push( octet ); 201 | } 202 | 203 | return octets; 204 | } 205 | 206 | /** 207 | * Analyses the PDU octets and returns a list of functions representing one line of 208 | * information, each. 209 | * 210 | * @param {Array} octets 211 | * @return {Array} List of tokens represented by resolving functions 212 | */ 213 | function tokenizer( octets ) { 214 | var tokenList = []; 215 | var pos; 216 | var numberLength; 217 | var sliceNumber; 218 | var sliceNumberToA; 219 | var TP_PID; 220 | var TP_DCS; 221 | 222 | // smsc part 223 | var smscLength = parseInt( octets[0], 16 ); 224 | 225 | if (smscLength) { 226 | var sliceSmsc = octets.slice( 2, smscLength + 1 ); 227 | var sliceSmscToA = octets[1]; 228 | tokenList.push( function(){ return '(hideable)SMSC number\t' + tokens.Number( sliceSmsc, undefined, tokens.ToA( sliceSmscToA ) ); } ); 229 | tokenList.push( function(){ return '(hideable)SMSC number info\t' + tokens.ToA( sliceSmscToA ).info; } ); 230 | } 231 | 232 | // Sender/Receiver part 233 | pos = smscLength + 1; 234 | var pduType = tokens.ToM( octets[ pos ] ); 235 | tokenList.push( function(){ return '(hideable)PDU Type\t' + pduType.info; } ); 236 | 237 | if (pduType.type === 'deliver') { 238 | pos++; 239 | numberLength = parseInt( octets[ pos ], 16 ); 240 | 241 | pos++; 242 | if (numberLength) { 243 | sliceNumber = octets.slice( pos + 1, pos + 1 + Math.ceil( numberLength / 2 ) ); 244 | sliceNumberToA = octets[ pos ]; 245 | tokenList.push( function(){ return '(hideable)Number\t' + tokens.Number( sliceNumber, numberLength, tokens.ToA( sliceNumberToA ) ); } ); 246 | tokenList.push( function(){ return '(hideable)Number info\t' + tokens.ToA( sliceNumberToA ).info; } ); 247 | 248 | pos += 1 + Math.ceil( numberLength / 2 ); 249 | } 250 | 251 | TP_PID = octets[ pos ]; 252 | tokenList.push( function(){ return '(hideable)Protocol Identifier\t' + tokens.PID( TP_PID ); } ); 253 | 254 | pos++; 255 | TP_DCS = tokens.DCS( octets[ pos ] ); 256 | tokenList.push( function(){ return '(hideable)Data Coding Scheme\t' + TP_DCS.info; } ); 257 | 258 | pos++; 259 | var sliceTimeStamp = octets.slice( pos, pos + 7 ); 260 | tokenList.push( function(){ return '(hideable)Service Centre Time Stamp\t' + tokens.SCTS( sliceTimeStamp ); } ); 261 | 262 | pos += 6; 263 | } 264 | else if (pduType.type === 'submit') { 265 | pos++; 266 | var MR = octets[ pos ]; 267 | tokenList.push( function() { return '(hideable)TP Message Reference\t' + tokens.MR( MR ); } ); 268 | 269 | pos++; 270 | numberLength = parseInt( octets[ pos ], 16 ); 271 | 272 | pos++; 273 | if (numberLength) { 274 | sliceNumber = octets.slice( pos + 1, pos + 1 + Math.ceil( numberLength / 2 ) ); 275 | sliceNumberToA = octets[ pos ]; 276 | tokenList.push( function(){ return '(hideable)Number\t' + tokens.Number( sliceNumber, numberLength, tokens.ToA( sliceNumberToA ) ); } ); 277 | tokenList.push( function(){ return '(hideable)Number info\t' + tokens.ToA( sliceNumberToA ).info; } ); 278 | 279 | pos += 1 + Math.ceil( numberLength / 2 ); 280 | } 281 | 282 | TP_PID = octets[ pos ]; 283 | tokenList.push( function(){ return '(hideable)Protocol Identifier\t' + tokens.PID( TP_PID ); } ); 284 | 285 | pos++; 286 | TP_DCS = tokens.DCS( octets[ pos ] ); 287 | tokenList.push( function(){ return '(hideable)Data Coding Scheme\t' + TP_DCS.info; } ); 288 | 289 | if (pduType.TP_VPF) { 290 | pos++; 291 | var sliceVP; 292 | if (pduType.TP_VPF === 'relative') { 293 | sliceVP = octets[ pos ]; 294 | tokenList.push( function(){ return '(hideable)Validity Period\t' + tokens.VPrelative( sliceVP ); } ); 295 | } 296 | else if (pduType.TP_VPF.match( /^(absolute|relative)$/ )) { 297 | sliceVP = octets.slice( pos, pos + 7 ); 298 | tokenList.push( function(){ return '(hideable)Validity Period\tuntil ' + tokens.SCTS( sliceVP ); } ); 299 | pos += 6; 300 | } 301 | } 302 | } 303 | 304 | pos ++; 305 | var TP_UDL = tokens.UDL( octets[ pos ], TP_DCS.alphabet ); 306 | tokenList.push( function(){ return 'User Data Length\t' + TP_UDL.info; } ); 307 | 308 | var TP_UDHL = {}; 309 | var TP_UDH = {}; 310 | if (pduType.TP_UDHI) { 311 | pos++; 312 | TP_UDHL = tokens.UDHL( octets[ pos ], TP_DCS.alphabet ); 313 | tokenList.push( function() { return 'User Data Header Length\t' + TP_UDHL.info; } ); 314 | 315 | pos++; 316 | TP_UDH = tokens.UDH( octets.slice( pos, pos + TP_UDHL.length ) ); 317 | tokenList.push( function() { return 'User Data Header\t' + TP_UDH.info; } ); 318 | pos += TP_UDHL.length - 1; 319 | } 320 | 321 | pos++; 322 | var expectedMsgEnd = pos + TP_UDL.octets - (TP_UDHL.length ? TP_UDHL.length + 1 : 0); 323 | var sliceMessage = octets.slice( pos, expectedMsgEnd ); 324 | 325 | if (TP_UDH.wap) { 326 | var wapMessage = wapDecoder( sliceMessage ); 327 | tokenList.push( function(){ return 'User Data\tWireless Session Protocol (WSP) / WBXML ' + wapMessage; } ); 328 | } 329 | else { 330 | tokenList.push( function(){ return 'User Data\t' + tokens.UD( sliceMessage, TP_DCS.alphabet, TP_UDHL.padding, TP_UDH.formatting ); } ); 331 | 332 | if (expectedMsgEnd < octets.length) { 333 | tokenList.push( function(){ return 'VIOLATION\tPDU longer than expected!'; } ); 334 | 335 | var sliceMessageAll = octets.slice( pos, octets.length ); 336 | tokenList.push( function(){ return 'User Data /w additional stuff\t' + tokens.UD( sliceMessageAll, TP_DCS.alphabet, TP_UDHL.padding, TP_UDH.formatting ); } ); 337 | 338 | } 339 | else if (expectedMsgEnd > octets.length) { 340 | tokenList.push( function(){ return 'VIOLATION\tPDU shorter than expected!'; } ); 341 | } 342 | } 343 | 344 | return tokenList; 345 | } 346 | 347 | var tokens = { 348 | 349 | /** 350 | * Number token 351 | * 352 | * {@linkplain http://www.dreamfabric.com/sms/} 353 | * 354 | * @param {Array} octets containing a call number in BCD inverted nibble format or GSM 7-bit encoding 355 | * @param {?number=} length expected length of number 356 | * @param {Object=} addressType the result of the ToA token 357 | * @return {string} Call number of sender, receiver, SMSC etc. 358 | */ 359 | Number: function( octets, length, addressType ) { 360 | var i, 361 | number = ''; 362 | 363 | if (addressType && addressType.ToN === 0x50) { 364 | number = decode7Bit( octets ); 365 | } else { 366 | for (i = 0; i < octets.length; ++i) { 367 | number += reverse( octets[ i ] ); 368 | } 369 | 370 | if (number.match( /\D$/ ) || (length && number.length > length)) { 371 | var paddingEx = /(.)$/; 372 | var result = paddingEx.exec( number ); 373 | 374 | number = number.substring( 0, number.length - 1 ); 375 | 376 | if (result && result[1] && result[1] !== 'F') { 377 | number += ' (VIOLATION: number not padded with "F" but with "' + result[1] + '"!)'; 378 | } 379 | } 380 | } 381 | 382 | return number; 383 | }, 384 | 385 | /** 386 | * Type-of-Address token 387 | * 388 | * {@linkplain http://www.dreamfabric.com/sms/type_of_address.html} 389 | * 390 | * @param {string} octet ToA octet 391 | * @return {Object} containing ToN (Type of Number) and NPI (Numbering Plan Identification) indicators 392 | * and description text 393 | */ 394 | ToA: function( octet ) { 395 | var type = parseInt( octet, 16 ); 396 | 397 | var ToN = type & 0x70; // Type of number Bits 398 | var NPI = type & 0xF; // Numbering Plan Identification 399 | 400 | var text = ''; 401 | 402 | if (ToN === 0) { 403 | text += 'Unknown type of address'; 404 | } 405 | else if (ToN === 0x10) { 406 | text += 'International number'; 407 | } 408 | else if (ToN === 0x20) { 409 | text += 'National number'; 410 | } 411 | else if (ToN === 0x30) { 412 | text += 'Network specific number'; 413 | } 414 | else if (ToN === 0x40) { 415 | text += 'Subscriber number'; 416 | } 417 | else if (ToN === 0x50) { 418 | text += 'Alphanumeric, (coded according to GSM TS 03.38 7-bit default alphabet)'; 419 | } 420 | else if (ToN === 0x60) { 421 | text += 'Abbreviated number'; 422 | } 423 | else if (ToN === 0x70) { 424 | text += 'Reserved for extension'; 425 | } 426 | else { 427 | text += 'Reserved type of address'; 428 | } 429 | 430 | text += ', '; 431 | 432 | if (NPI === 0) { 433 | text += 'Unknown'; 434 | } 435 | else if (NPI === 1) { 436 | text += 'ISDN/telephone numbering plan (E.164/E.163)'; 437 | } 438 | else if (NPI === 3) { 439 | text += 'IData numbering plan (X.121)'; 440 | } 441 | else if (NPI === 4) { 442 | text += 'Telex numbering plan'; 443 | } 444 | else if (NPI === 8) { 445 | text += 'National numbering plan'; 446 | } 447 | else if (NPI === 9) { 448 | text += 'Private numbering plan'; 449 | } 450 | else if (NPI === 0xA) { 451 | text += 'ERMES numbering plan (ETSI DE/PS 3 01-3)'; 452 | } 453 | else if (NPI === 0xF) { 454 | text += 'Reserved for extension'; 455 | } 456 | else { 457 | text += 'Reserved numbering plan'; 458 | } 459 | 460 | if ((type & 0x80) === 0) { 461 | text += ' (VIOLATION: Highest bit should always be set!)'; 462 | } 463 | 464 | return { 465 | ToN: ToN, 466 | NPI: NPI, 467 | info: text 468 | }; 469 | }, 470 | 471 | /** 472 | * Type-of-Message Token 473 | * 474 | * (This function only recognizes SMS-DELIVER and SMS-SUBMIT, there are others!) 475 | * 476 | * {@linkplain http://www.dreamfabric.com/sms/deliver_fo.html} 477 | * {@linkplain http://www.dreamfabric.com/sms/submit_fo.html} 478 | * 479 | * @param {string} octet ToM octet 480 | * @return {Object} containing type string 'submit' or 'deliver', UDHI flag, VPF flag, PDU type 481 | * description text 482 | * @see UDHI token, VPF token 483 | */ 484 | ToM: function( octet ) { 485 | var o = parseInt( octet, 16 ); 486 | var TP_MTI_mask = 0x1; //0x3; 487 | var text = ''; 488 | var flags = []; 489 | var deliver = false; 490 | var submit =false; 491 | var TP_VPF = null; 492 | var TP_UDHI = false; 493 | 494 | if ((o & TP_MTI_mask) === 0) { 495 | text += 'SMS-DELIVER'; 496 | deliver = true; 497 | } 498 | else if ((o & TP_MTI_mask) === 1) { 499 | text += 'SMS-SUBMIT'; 500 | submit = true; 501 | } 502 | else { 503 | console.debug( o, padwZeros( o.toString( 2 ) ) ); 504 | } 505 | 506 | // noinspection JSBitwiseOperatorUsage 507 | if (o & 0x80) { 508 | flags.push( 'TP-RP (Reply path exists)' ); 509 | } 510 | // noinspection JSBitwiseOperatorUsage 511 | if (o & 0x40) { 512 | TP_UDHI = true; 513 | flags.push( 'TP-UDHI (User data header indicator)' ); 514 | } 515 | 516 | if (submit) { 517 | // noinspection JSBitwiseOperatorUsage 518 | if (o & 0x20) { 519 | flags.push( 'TP-SRR (Status report request)' ); 520 | } 521 | 522 | 523 | var TP_VPF_mask = o & 0x18; 524 | var vpfText = 'TP-VPF (Validity Period Format): '; 525 | 526 | if (TP_VPF_mask === 0) { 527 | // do nothing 528 | } 529 | else if (TP_VPF_mask === 8) { 530 | TP_VPF = 'enhanced'; 531 | flags.push( vpfText + 'enhanced format' ); 532 | } 533 | else if (TP_VPF_mask === 0x10) { 534 | TP_VPF = 'relative'; 535 | flags.push( vpfText + 'relative format' ); 536 | } 537 | else if (TP_VPF_mask === 0x18) { 538 | TP_VPF = 'absolute'; 539 | flags.push( vpfText + 'absolute format' ); 540 | } 541 | 542 | 543 | if ((o & 0x4) === 0) { 544 | flags.push( 'TP-RD (Reject duplicates)' ); 545 | } 546 | } 547 | else if (deliver) { 548 | // noinspection JSBitwiseOperatorUsage 549 | if (o & 0x20) { 550 | flags.push( 'TP-SRI (Status report indication)' ); 551 | } 552 | 553 | if ((o & 0x4) === 0) { 554 | flags.push( 'TP-MMS (More messages to send)' ); 555 | } 556 | } 557 | 558 | if (flags.length) { 559 | text += ', Flags: ' + flags.join( ', ' ); 560 | } 561 | 562 | 563 | return { 564 | type: deliver ? 'deliver' : (submit ? 'submit' : ''), 565 | TP_UDHI: TP_UDHI, 566 | TP_VPF: TP_VPF, 567 | info: text 568 | }; 569 | }, 570 | 571 | /** 572 | * Protocol IDentifier token 573 | * 574 | * {@linkplain http://www.dreamfabric.com/sms/pid.html} 575 | * 576 | * @param {string} octet PID octet 577 | * @return {string} PID description text 578 | */ 579 | PID: function( octet ) { 580 | var o = parseInt( octet, 16 ); 581 | var text = ''; 582 | var type = o & 0xC0; 583 | 584 | if (type === 0) { 585 | var firstFive = o & 0x1F; 586 | 587 | // noinspection JSBitwiseOperatorUsage 588 | if (o & 0x20) { 589 | text += 'Telematic interworking (Type: '; 590 | 591 | if (firstFive === 0) { 592 | text += 'implicit'; 593 | } 594 | else if (firstFive === 1) { 595 | text += 'telex'; 596 | } 597 | else if (firstFive === 2) { 598 | text += 'group 3 telefax'; 599 | } 600 | else if (firstFive === 3) { 601 | text += 'group 4 telefax'; 602 | } 603 | else if (firstFive === 4) { 604 | text += 'voice telephone - speech conversion'; 605 | } 606 | else if (firstFive === 5) { 607 | text += 'ERMES - European Radio Messaging System'; 608 | } 609 | else if (firstFive === 6) { 610 | text += 'National Paging System'; 611 | } 612 | else if (firstFive === 7) { 613 | text += 'Videotex - T.100/T.101'; 614 | } 615 | else if (firstFive === 8) { 616 | text += 'teletex, carrier unspecified'; 617 | } 618 | else if (firstFive === 9) { 619 | text += 'teletex, in PSPDN'; 620 | } 621 | else if (firstFive === 0xA) { 622 | text += 'teletex, in CSPDN'; 623 | } 624 | else if (firstFive === 0xB) { 625 | text += 'teletex, in analog PSTN'; 626 | } 627 | else if (firstFive === 0xC) { 628 | text += 'teletex, in digital ISDN'; 629 | } 630 | else if (firstFive === 0xD) { 631 | text += 'UCI - Universal Computer Interface, ETSI DE/PS 3 01-3'; 632 | } 633 | else if (firstFive === 0x10) { 634 | text += 'message handling facility known to the SC'; 635 | } 636 | else if (firstFive === 0x11) { 637 | text += 'public X.400-based message handling system'; 638 | } 639 | else if (firstFive === 0x12) { 640 | text += 'Internet E-Mail'; 641 | } 642 | else if (firstFive >= 0x18 && firstFive <= 0x1E) { 643 | text += 'SC specific value'; 644 | } 645 | else if (firstFive === 0x1F) { 646 | text += 'GSM mobile station'; 647 | } 648 | else { 649 | text += 'reserved'; 650 | } 651 | 652 | text += ')'; 653 | } 654 | else { 655 | text += 'SME-to-SME protocol'; 656 | 657 | if (firstFive > 0) { 658 | text += ' (Unknown bitmask: ' + firstFive.toString( 2 ) + '- in case of SMS-DELIVER these indicate the SM-AL protocol being used between the SME and the MS!)'; 659 | } 660 | } 661 | } 662 | else if (type === 0x40) { 663 | var firstSix = o & 0x3F; 664 | 665 | if (firstSix >= 0 && firstSix <= 7) { 666 | text += 'Short Message Type ' + firstSix; 667 | } 668 | else if (firstSix === 0x1F) { 669 | text += 'Return Call Message'; 670 | } 671 | else if (firstSix === 0x3D) { 672 | text += 'ME Data download'; 673 | } 674 | else if (firstSix === 0x3E) { 675 | text += 'ME De-personalization Short Message'; 676 | } 677 | else if (firstSix === 0x3F) { 678 | text += 'SIM Data download'; 679 | } 680 | else { 681 | text += 'reserved'; 682 | } 683 | } 684 | else if (type === 0x80) { 685 | text += 'reserved'; 686 | } 687 | else if (type === 0xC0) { 688 | text += 'SC specific use'; 689 | } 690 | 691 | return text; 692 | }, 693 | 694 | /** 695 | * Data Coding Scheme token 696 | * 697 | * {@linkplain http://www.dreamfabric.com/sms/dcs.html} 698 | * 699 | * @param {string} octet DCS octet 700 | * @return {Object} Object containing recognized alphabet, DCS description text 701 | */ 702 | DCS: function( octet ) { 703 | var o = parseInt( octet, 16 ); 704 | var text = ''; 705 | var alphabet = 'default'; 706 | var codingGroup = o & 0xF0; 707 | 708 | if (codingGroup >= 0 && codingGroup <= 0x30) { 709 | text += 'General Data Coding groups, '; 710 | 711 | // noinspection JSBitwiseOperatorUsage 712 | if (o & 0x20) { 713 | text += 'compressed'; 714 | } 715 | else { 716 | text += 'uncompressed'; 717 | } 718 | 719 | text += ', '; 720 | var alphabetFlag = o & 0xC; 721 | 722 | if (alphabetFlag === 0) { 723 | text += 'default alphabet'; 724 | } 725 | else if (alphabetFlag === 4) { 726 | text += '8 bit data'; 727 | alphabet = '8bit'; 728 | } 729 | else if (alphabetFlag === 8) { 730 | text += 'UCS2 (16 bit)'; 731 | alphabet = 'ucs2'; 732 | } 733 | else if (alphabetFlag === 0xC) { 734 | text += 'reserved alphabet'; 735 | } 736 | } 737 | else if (codingGroup >= 0x40 && codingGroup <= 0xB0) { 738 | text += 'Reserved coding groups'; 739 | } 740 | else if (codingGroup === 0xC0) { 741 | text += 'Message Waiting Indication Group: Discard Message, '; 742 | } 743 | else if (codingGroup === 0xD0) { 744 | text += 'Message Waiting Indication Group: Store Message, standard encoding, '; 745 | } 746 | else if (codingGroup === 0xE0) { 747 | text += 'Message Waiting Indication Group: Store Message, UCS2 encoding, '; 748 | } 749 | else if (codingGroup === 0xF0) { 750 | text += 'Data coding/message class, '; 751 | 752 | // noinspection JSBitwiseOperatorUsage 753 | if (o & 8) { 754 | text += '(VIOLATION: reserved bit set, but should not!), '; 755 | } 756 | 757 | // noinspection JSBitwiseOperatorUsage 758 | if (o & 4) { 759 | text += '8 bit data'; 760 | alphabet = '8bit'; 761 | } 762 | else { 763 | text += 'Default alphabet'; 764 | } 765 | } 766 | 767 | if ((codingGroup >= 0 && codingGroup <= 0x30) || codingGroup === 0xF0) { 768 | text += ', '; 769 | 770 | if ((codingGroup >= 0 && codingGroup <= 0x30) && (o & 0x10) === 0) { 771 | text += ' no message class set (but given bits would be: '; 772 | } 773 | 774 | var msgClass = o & 3; 775 | 776 | text += 'Class ' + msgClass + ' - '; 777 | 778 | if (msgClass === 0) { 779 | text += 'immediate display'; 780 | } 781 | else if (msgClass === 1) { 782 | text += 'ME specific'; 783 | } 784 | else if (msgClass === 2) { 785 | text += 'SIM specific'; 786 | } 787 | else if (msgClass === 3) { 788 | text += 'TE specific'; 789 | } 790 | 791 | text += ')'; 792 | 793 | } 794 | 795 | if (codingGroup >= 0xC0 && codingGroup <= 0xE0) { 796 | // noinspection JSBitwiseOperatorUsage 797 | if (o & 8) { 798 | text += 'Set Indication Active'; 799 | } 800 | else { 801 | text += 'Set Indication Inactive'; 802 | } 803 | 804 | text += ', '; 805 | 806 | // noinspection JSBitwiseOperatorUsage 807 | if (o & 4) { 808 | text += '(reserved bit set, but should not!), '; 809 | } 810 | 811 | var indicationType = o & 3; 812 | 813 | if (indicationType === 0) { 814 | text += 'Voicemail Message Waiting'; 815 | } 816 | else if (indicationType === 1) { 817 | text += 'Fax Message Waiting'; 818 | } 819 | else if (indicationType === 2) { 820 | text += 'E-Mail Message Waiting'; 821 | } 822 | else if (indicationType === 3) { 823 | text += 'Other Message Waiting (not yet standardized)'; 824 | } 825 | } 826 | 827 | return { 828 | alphabet: alphabet, 829 | info: text 830 | }; 831 | }, 832 | 833 | /** 834 | * Service Center Time Stamp token 835 | * 836 | * {@linkplain http://www.dreamfabric.com/sms/scts.html} 837 | * 838 | * @param {Array} octets containing SCTS in BCD inverted nibble format 839 | * @return {string} TimeStamp in format 'YYYY-MM-DD HH:MM:SS GMT +/-X' 840 | */ 841 | SCTS: function( octets ) { 842 | var i; 843 | 844 | for (i = 0; i < 7; ++i) { 845 | octets[ i ] = reverse( octets[ i ] ); 846 | } 847 | 848 | var ts = ''; 849 | 850 | if (parseInt( octets[0], 10 ) < 70) { 851 | ts += '20'; 852 | } 853 | else { 854 | ts += '19'; 855 | } 856 | 857 | ts += octets[0] + '-' + octets[1] + '-' + octets[2] + ' ' + octets[3] + ':' + octets[4] + ':' + octets[5] + ' GMT '; 858 | 859 | var tz = parseInt( octets[6], 10 ); 860 | 861 | // noinspection JSBitwiseOperatorUsage 862 | if (tz & 0x80) { 863 | tz = tz & 0x7F; 864 | ts += '-'; 865 | } 866 | else { 867 | ts += '+'; 868 | } 869 | 870 | return ts + tz / 4; 871 | }, 872 | 873 | /** 874 | * User Data Length token 875 | * 876 | * @param {string} octet UDL octet 877 | * @param {string} alphabet type 878 | * @return {Object} length by septets and octets, info text 879 | */ 880 | UDL: function( octet, alphabet ) { 881 | var o = parseInt( octet, 16 ); 882 | var length = 0; 883 | var chars = o; 884 | 885 | if (alphabet === 'default') { 886 | length = Math.ceil( o * 70 / 80 ); 887 | } 888 | else { 889 | length = o; 890 | } 891 | 892 | if (alphabet === 'ucs2') { 893 | chars = length / 2; 894 | } 895 | 896 | return { 897 | septets: o, 898 | octets: length, 899 | info: chars + ' characters, ' + length + ' bytes' 900 | }; 901 | }, 902 | 903 | /** 904 | * User Data Header Length token 905 | * 906 | * Evaluates the length of the User Data Header and the padding to the next septet start 907 | * 908 | * {@linkplain http://mobiletidings.com/2009/02/18/combining-sms-messages/} 909 | * 910 | * @param {string} octet UDHL octet 911 | * @param {string} alphabet type ('default', '8bit', 'ucs2') 912 | * @return {Object} UDH length in octets / bytes, padding in no. of bits, info text 913 | */ 914 | UDHL: function( octet, alphabet ) { 915 | var length = parseInt( octet, 16 ); 916 | var padding = 0; 917 | 918 | if (alphabet === 'default') { 919 | var udhBitLength = (length + 1) * 8; 920 | var nextSeptetStart = Math.ceil( udhBitLength / 7 ) * 7; 921 | 922 | padding = nextSeptetStart - udhBitLength; 923 | } 924 | 925 | return { 926 | length: length, 927 | padding: padding, 928 | info: length + ' bytes' 929 | }; 930 | }, 931 | 932 | /** 933 | * User Data Header token 934 | * 935 | * Recognizes some Information Elements (IE): concatenated SMS, usage of WAP protocol stack, 936 | * some well-known destination ports, some EMS text formatting 937 | * 938 | * {@linkplain http://mobiletidings.com/2009/02/18/combining-sms-messages/} 939 | * {@linkplain http://mobiletidings.com/2009/02/21/wap-push-over-sms-encodings/} 940 | * {@linkplain http://mobiletidings.com/2009/02/26/wap-push-over-sms-si-encoding/} 941 | * {@linkplain http://mobiletidings.com/2009/03/12/text-formatting-sms-ems/} 942 | * {@linkplain http://www.csoft.co.uk/sckl/index.htm} 943 | * 944 | * @param {Array} octets containing UDH 945 | * @return {Object} Wap indication, array of EMS text formatter callbacks, info text 946 | */ 947 | UDH: function( octets ) { 948 | var i, 949 | IEs = [], // all Information Elements 950 | IE = {}, // actual Information Element 951 | info = [], 952 | text = '', 953 | isWap = false, 954 | destPort, 955 | isEMS = false, 956 | formatting = [], 957 | ems = [], 958 | style, 959 | format, 960 | color; 961 | 962 | // break up Information Elements 963 | while (octets.length) { 964 | var o = parseInt( octets.shift(), 16 ); 965 | 966 | if (IE.IEI === undefined) { 967 | IE.IEI = o; // Information Element Identifier 968 | } 969 | else if (IE.IEDL === undefined) { 970 | IE.IEDL = o; // Information Element Data Length 971 | } 972 | else { 973 | if (IE.IED === undefined) { 974 | IE.IED = []; 975 | } 976 | IE.IED.push( o ); 977 | 978 | if (IE.IED.length >= IE.IEDL) { 979 | IEs.push( IE ); 980 | IE = {}; 981 | } 982 | } 983 | } 984 | 985 | // Wireless Datagram Protocol IE 986 | for (i = 0; i < IEs.length; ++i) { 987 | if (IEs[ i ].IEI === 5) { 988 | destPort = IEs[ i ].IED[0] * 256 + IEs[ i ].IED[1]; 989 | 990 | if (destPort === 5505) { 991 | destPort += ' (Ring Tone)'; 992 | } 993 | else if (destPort === 5506) { 994 | destPort += ' (Operator Logo)'; 995 | } 996 | else if (destPort === 5507) { 997 | destPort += ' (Group Graphic - CLI Logo)'; 998 | } 999 | else if (destPort === 9200) { 1000 | destPort += ' (Connectionless WAP browser proxy server)'; 1001 | } 1002 | else if (destPort === 9202) { 1003 | destPort += ' (Secure connectionless WAP browser proxy server)'; 1004 | } 1005 | else if (destPort === 9203) { 1006 | destPort += ' (Secure WAP Browser proxy server)'; 1007 | } 1008 | else if (destPort === 9204) { 1009 | destPort += ' (vCard)'; 1010 | } 1011 | else if (destPort === 9205) { 1012 | destPort += ' (vCalendar)'; 1013 | } 1014 | else if (destPort === 9206) { 1015 | destPort += ' (Secure vCard)'; 1016 | } 1017 | else if (destPort === 9207) { 1018 | destPort += ' (Secure vCalendar)'; 1019 | } 1020 | else { 1021 | isWap = true; 1022 | } 1023 | 1024 | text = 'WDP (Wireless Datagram Protocol): Destination port is ' + destPort + ', source port is ' + (IEs[ i ].IED[2] * 256 + IEs[ i ].IED[3]); 1025 | 1026 | if (IEs[ i ].IEDL !== 4) { 1027 | text += ' (VIOLATON: This Information Element should have exactly 4 bytes but says it has ' + IEs[ i ].IEDL + ' instead!)'; 1028 | } 1029 | if (IEs[i].IED.length !== 4) { 1030 | text += ' (VIOLATION: This Information Element should have exactly 4 bytes but actually has ' + IEs[i].IED.length + ' instead!)'; 1031 | } 1032 | 1033 | info.push( text ); 1034 | } 1035 | 1036 | // Concatenation IE 1037 | else if (IEs[ i ].IEI === 0) { 1038 | text = 'Concatenated message: reference number ' + IEs[ i ].IED[0] + ', part ' + IEs[ i ].IED[2] + ' of ' + IEs[ i ].IED[1] + ' parts'; 1039 | 1040 | if (IEs[ i ].IEDL !== 3) { 1041 | text += ' (VIOLATON: This Information Element should have exactly 3 bytes but says it has ' + IEs[ i ].IEDL + ' instead!)'; 1042 | } 1043 | if (IEs[i].IED.length !== 3) { 1044 | text += ' (VIOLATION: This Information Element should have exactly 3 bytes but actually has ' + IEs[i].IED.length + ' instead!)'; 1045 | } 1046 | 1047 | info.push( text ); 1048 | } 1049 | 1050 | // EMS formatting IE 1051 | else if (IEs[ i ].IEI === 10) { 1052 | isEMS = true; 1053 | 1054 | style = []; 1055 | format = IEs[ i ].IED[2]; 1056 | 1057 | 1058 | if ((format & 3) === 1) { 1059 | style.push( 'text-align: center' ); 1060 | } 1061 | else if ((format & 3) === 2) { 1062 | style.push( 'text-align: right' ); 1063 | } 1064 | 1065 | if ((format & 0xC) === 4) { 1066 | style.push( 'font-size: large' ); 1067 | } 1068 | else if ((format & 0xC) === 8) { 1069 | style.push( 'font-size: small' ); 1070 | } 1071 | 1072 | // noinspection JSBitwiseOperatorUsage 1073 | if (format & 0x20) { 1074 | style.push( 'font-style: italic' ); 1075 | } 1076 | 1077 | // noinspection JSBitwiseOperatorUsage 1078 | if (format & 0x10) { 1079 | style.push( 'font-weight: bold' ); 1080 | } 1081 | 1082 | // noinspection JSBitwiseOperatorUsage 1083 | if (format & 0x40) { 1084 | style.push( 'text-decoration: underline' ); 1085 | } 1086 | 1087 | // noinspection JSBitwiseOperatorUsage 1088 | if (format & 0x80) { 1089 | style.push( 'text-decoration: line-through' ); 1090 | } 1091 | 1092 | color = IEs[ i ].IED[3]; 1093 | 1094 | if (color) { 1095 | if ((color & 0xF) === 1) { 1096 | style.push( 'color: darkGray' ); 1097 | } 1098 | else if ((color & 0xF) === 2) { 1099 | style.push( 'color: darkRed' ); 1100 | } 1101 | else if ((color & 0xF) === 3) { 1102 | style.push( 'color: GoldenRod' ); 1103 | } 1104 | else if ((color & 0xF) === 4) { 1105 | style.push( 'color: darkGreen' ); 1106 | } 1107 | else if ((color & 0xF) === 5) { 1108 | style.push( 'color: darkCyan' ); 1109 | } 1110 | else if ((color & 0xF) === 6) { 1111 | style.push( 'color: darkBlue' ); 1112 | } 1113 | else if ((color & 0xF) === 7) { 1114 | style.push( 'color: darkMagenta' ); 1115 | } 1116 | else if ((color & 0xF) === 8) { 1117 | style.push( 'color: gray' ); 1118 | } 1119 | else if ((color & 0xF) === 9) { 1120 | style.push( 'color: white' ); 1121 | } 1122 | else if ((color & 0xF) === 0xA) { 1123 | style.push( 'color: red' ); 1124 | } 1125 | else if ((color & 0xF) === 0xB) { 1126 | style.push( 'color: yellow' ); 1127 | } 1128 | else if ((color & 0xF) === 0xC) { 1129 | style.push( 'color: green' ); 1130 | } 1131 | else if ((color & 0xF) === 0xD) { 1132 | style.push( 'color: cyan' ); 1133 | } 1134 | else if ((color & 0xF) === 0xE) { 1135 | style.push( 'color: blue' ); 1136 | } 1137 | else if ((color & 0xF) === 0xF) { 1138 | style.push( 'color: magenta' ); 1139 | } 1140 | 1141 | if ((color & 0xF0) === 0) { 1142 | style.push( 'background-color: black' ); 1143 | } 1144 | else if ((color & 0xF0) === 0x10) { 1145 | style.push( 'background-color: darkGray' ); 1146 | } 1147 | else if ((color & 0xF0) === 0x20) { 1148 | style.push( 'background-color: darkRed' ); 1149 | } 1150 | else if ((color & 0xF0) === 0x30) { 1151 | style.push( 'background-color: GoldenRod' ); 1152 | } 1153 | else if ((color & 0xF0) === 0x40) { 1154 | style.push( 'background-color: darkGreen' ); 1155 | } 1156 | else if ((color & 0xF0) === 0x50) { 1157 | style.push( 'background-color: darkCyan' ); 1158 | } 1159 | else if ((color & 0xF0) === 0x60) { 1160 | style.push( 'background-color: darkBlue' ); 1161 | } 1162 | else if ((color & 0xF0) === 0x70) { 1163 | style.push( 'background-color: darkMagenta' ); 1164 | } 1165 | else if ((color & 0xF0) === 0x80) { 1166 | style.push( 'background-color: gray' ); 1167 | } 1168 | else if ((color & 0xF0) === 0x90) { 1169 | style.push( 'background-color: white' ); 1170 | } 1171 | else if ((color & 0xF0) === 0xA0) { 1172 | style.push( 'background-color: red' ); 1173 | } 1174 | else if ((color & 0xF0) === 0xB0) { 1175 | style.push( 'background-color: yellow' ); 1176 | } 1177 | else if ((color & 0xF0) === 0xC0) { 1178 | style.push( 'background-color: green' ); 1179 | } 1180 | else if ((color & 0xF0) === 0xD0) { 1181 | style.push( 'background-color: cyan' ); 1182 | } 1183 | else if ((color & 0xF0) === 0xE0) { 1184 | style.push( 'background-color: blue' ); 1185 | } 1186 | else if ((color & 0xF0) === 0xF0) { 1187 | style.push( 'background-color: magenta' ); 1188 | } 1189 | } 1190 | 1191 | if (style.length) { 1192 | IEs[ i ].markupOpen = ''; 1193 | IEs[ i ].markupClose = ''; 1194 | } 1195 | else { 1196 | IEs[ i ].markupOpen = ''; 1197 | IEs[ i ].markupClose = ''; 1198 | } 1199 | 1200 | ems.push( IEs[ i ] ); 1201 | 1202 | formatting.push( function( text, original, i ) { 1203 | original = original.substr( ems[ i ].IED[0], ems[ i ].IED[1] ); 1204 | 1205 | var getPart = new RegExp( original ); 1206 | 1207 | return text.replace( getPart, ems[ i ].markupOpen + original + ems[ i ].markupClose ); 1208 | } ); 1209 | 1210 | } 1211 | } 1212 | 1213 | if (isEMS) { 1214 | info.push( 'has EMS formatting' ); 1215 | } 1216 | 1217 | return {wap: isWap, formatting: formatting, info: info.join( '; ' )}; 1218 | }, 1219 | 1220 | /** 1221 | * User Data token 1222 | * 1223 | * Tries to decode the user data: 1224 | * - default 7 Bit charset 1225 | * - UCS2 2 byte decoding 1226 | * - Fallback to ASCII decoding, often one can see some useful information there (e.g. name of wallpaper) 1227 | * 1228 | * {@linkplain http://www.dreamfabric.com/sms/hello.html} 1229 | * 1230 | * @param {Array} octets 1231 | * @param {string} alphabet type ('default', '8bit', 'ucs2') 1232 | * @param {number?} padding in no. of bits from UDHL (optional) 1233 | * @param {Array} formatting EMS formatter callbacks 1234 | * @return {string} Decoded user data 1235 | */ 1236 | UD: function( octets, alphabet, padding, formatting ) { 1237 | var thisChar, original, 1238 | text = '', 1239 | i = 0; 1240 | 1241 | if (alphabet === 'default') { 1242 | text = decode7Bit( octets, padding ); 1243 | } 1244 | else if (alphabet === 'ucs2') { 1245 | while (octets.length) { 1246 | thisChar = octets.shift() + octets.shift(); 1247 | text += String.fromCharCode( parseInt( thisChar, 16 ) ); 1248 | } 1249 | } 1250 | else { 1251 | text += '('; 1252 | 1253 | if (alphabet === '8bit') { 1254 | text += 'unknown binary data'; 1255 | } 1256 | else { 1257 | text += 'unrecognized alphpabet'; 1258 | } 1259 | 1260 | text += ', try ASCII decoding) '; 1261 | 1262 | while (octets.length) { 1263 | text += String.fromCharCode( parseInt( octets.shift(), 16 ) ); 1264 | } 1265 | } 1266 | 1267 | // Execute EMS formatting 1268 | if (formatting && formatting.length) { 1269 | original = text; 1270 | for (i = 0; i < formatting.length; i++) { 1271 | text = formatting[ i ]( text, original, i ); 1272 | } 1273 | } 1274 | 1275 | return text; 1276 | }, 1277 | 1278 | /** 1279 | * Message Reference token (only on PDU type 'submit') 1280 | * 1281 | * @param {string} octet 1282 | * @return {string} Info text 1283 | */ 1284 | MR: function( octet ) { 1285 | if (octet === '00') { 1286 | return 'Mobile equipment sets reference number'; 1287 | } 1288 | return '0x' + octet; 1289 | }, 1290 | 1291 | /** 1292 | * Validity Period token (only on PDU type 'submit') 1293 | * This only handles the relative type, absolute and enhanced are timestamps like SCTS 1294 | * 1295 | * {@linkplain http://www.dreamfabric.com/sms/vp.html} 1296 | * 1297 | * @param {string} octet 1298 | * @return {string} info text 1299 | */ 1300 | VPrelative: function( octet ) { 1301 | var vp = parseInt( octet, 16 ); 1302 | var text = ''; 1303 | 1304 | if (vp < 144) { 1305 | text = ((vp + 1) * 5) + ' minutes'; 1306 | } 1307 | else if (vp > 143 && vp < 168) { 1308 | text = ((vp - 143) * 30 / 60 + 12) + ' hours'; 1309 | } 1310 | else if (vp > 167 && vp < 197) { 1311 | text = (vp - 166 ) + ' days'; 1312 | } 1313 | else if (vp > 186) { 1314 | text = (vp - 192) + ' weeks'; 1315 | } 1316 | 1317 | return text; 1318 | } 1319 | 1320 | }; 1321 | 1322 | /** 1323 | * Decodes all given octets to a string using the GSM 7-bit encoding. 1324 | * 1325 | * @param {Array} octets 1326 | * @param {number?} padding in no. of bits from UDHL (optional) 1327 | * @returns {string} the readable content of the given octets. 1328 | */ 1329 | function decode7Bit( octets, padding ) { 1330 | var thisAndNext, thisChar, character, 1331 | nextChar = '', 1332 | text = ''; 1333 | 1334 | if (padding && octets.length) { 1335 | nextChar = padwZeros( parseInt( octets.shift(), 16 ).toString( 2 ) ); 1336 | nextChar = nextChar.substring( 0, nextChar.length - padding ); 1337 | } 1338 | 1339 | while (octets.length || parseInt( nextChar, 2 )) { 1340 | thisAndNext = getChar( octets, nextChar ); 1341 | thisChar = thisAndNext[0]; 1342 | nextChar = thisAndNext[1]; 1343 | character = gsm7bit[ parseInt( thisChar, 2 ) ]; 1344 | 1345 | // Extension table on 0x1B 1346 | if (typeof character === 'object') { 1347 | thisAndNext = getChar( octets, nextChar ); 1348 | thisChar = thisAndNext[0]; 1349 | nextChar = thisAndNext[1]; 1350 | character = character[ parseInt( thisChar, 2 ) ]; 1351 | } 1352 | 1353 | text += character ? character : ''; 1354 | } 1355 | 1356 | return text; 1357 | } 1358 | 1359 | /** 1360 | * Decodes septets-in-octets encoding of the GSM 7 Bit character set 1361 | * 1362 | * @param {Array} octets 1363 | * @param {string} nextChar 1364 | * @return {Array} 7 digit bitstream string representing the current decoded character and parts of the next one. 1365 | */ 1366 | function getChar( octets, nextChar ) { 1367 | if (nextChar.length === 7) { 1368 | return [nextChar, '']; 1369 | } 1370 | 1371 | var octet = padwZeros( parseInt( octets.shift(), 16 ).toString( 2 ) ); 1372 | var bitsFromNextChar = nextChar.length + 1; 1373 | var thisChar = octet.substr( bitsFromNextChar ) + nextChar; 1374 | nextChar = octet.substr( 0, bitsFromNextChar ); 1375 | 1376 | return [thisChar, nextChar]; 1377 | } 1378 | 1379 | /** 1380 | * Reverse an octet 1381 | * 1382 | * Used to decode BCD inversed nibbles format 1383 | * 1384 | * @param {string} octet 1385 | * @return {string} Reversed octet 1386 | */ 1387 | function reverse( octet ) { 1388 | if (typeof octet === 'string') { 1389 | return octet.substr( 1, 1 ) + octet.substr( 0, 1 ); 1390 | } 1391 | else { 1392 | return '00'; 1393 | } 1394 | } 1395 | 1396 | /** 1397 | * Pads a bitsream in a string with zeros as long as its shorter than 8 digits 1398 | * 1399 | * @param {string} bitstream 1400 | * @return {string} a Zero-padded binary bitstream 1401 | */ 1402 | function padwZeros( bitstream ) { 1403 | while (bitstream.length < 8) { 1404 | bitstream = '0' + bitstream; 1405 | } 1406 | 1407 | return bitstream; 1408 | } 1409 | 1410 | /** 1411 | * GSM 7 bit default alphabet lookup table 1412 | * 1413 | * {@linkplain http://www.dreamfabric.com/sms/default_alphabet.html} 1414 | */ 1415 | var gsm7bit = { 1416 | 0: '@', 1: '£', 2: '$', 3: '¥', 4: 'è', 5: 'é', 6: 'ù', 7: 'ì', 8: 'ò', 9: 'Ç', 1417 | 10:'\n', 11: 'Ø', 12: 'ø', 13: '\r', 14: 'Å', 15: 'å', 16: '\u0394', 17: '_', 18: '\u03a6', 19: '\u0393', 1418 | 20: '\u039b', 21: '\u03a9', 22: '\u03a0', 23: '\u03a8', 24: '\u03a3', 25: '\u0398', 26: '\u039e', 28: 'Æ', 29: 'æ', 1419 | 30: 'ß', 31: 'É', 32: ' ', 33: '!', 34: '"', 35: '#', 36: '¤', 37: '%', 38: '&', 39: '\'', 1420 | 40: '(', 41: ')', 42: '*', 43: '+', 44: ',', 45: '-', 46: '.', 47: '/', 48: '0', 49: '1', 1421 | 50: '2', 51: '3', 52: '4', 53: '5', 54: '6', 55: '7', 56: '8', 57: '9', 58: ':', 59: ';', 1422 | 60: '<', 61: '=', 62: '>', 63: '?', 64: '¡', 65: 'A', 66: 'B', 67: 'C', 68: 'D', 69: 'E', 1423 | 70: 'F', 71: 'G', 72: 'H', 73: 'I', 74: 'J', 75: 'K', 76: 'L', 77: 'M', 78: 'N', 79: 'O', 1424 | 80: 'P', 81: 'Q', 82: 'R', 83: 'S', 84: 'T', 85: 'U', 86: 'V', 87: 'W', 88: 'X', 89: 'Y', 1425 | 90: 'Z', 91: 'Ä', 92: 'Ö', 93: 'Ñ', 94: 'Ü', 95: '§', 96: '¿', 97: 'a', 98: 'b', 99: 'c', 1426 | 100: 'd', 101: 'e', 102: 'f', 103: 'g', 104: 'h', 105: 'i', 106: 'j', 107: 'k', 108: 'l', 109: 'm', 1427 | 110: 'n', 111: 'o', 112: 'p', 113: 'q', 114: 'r', 115: 's', 116: 't', 117: 'u', 118: 'v', 119: 'w', 1428 | 120: 'x', 121: 'y', 122: 'z', 123: 'ä', 124: 'ö', 125: 'ñ', 126: 'ü', 127: 'à', 1429 | 27: { 1430 | 10: '\n', // Should be FORM-FEED but no good here 1431 | 20: '^', 40: '{', 41: '}', 47: '\\', 1432 | 60: '[', 61: '~', 62: ']', 64: '|', 101: '€' 1433 | } 1434 | }; 1435 | 1436 | /** 1437 | * wapDecoder decodes some parts of the WAP stack (WBXML / WSP / WDP) contained in SMS 1438 | * 1439 | * {@linkplain http://mobiletidings.com/2009/02/21/wap-push-over-sms-encodings/} 1440 | * 1441 | * @param {Array} octets 1442 | * @return {string} HTML table containing all decoded information 1443 | */ 1444 | function wapDecoder( octets ) { 1445 | var i, 1446 | pos = 0, 1447 | data = [], 1448 | dataStr = ''; 1449 | 1450 | data.push( 'WSP Transaction ID\t0x' + octets[ pos ] ); 1451 | 1452 | pos++; 1453 | data.push( 'Type\t' + wapTokens.type( octets[ pos ] ) ); 1454 | 1455 | pos++; 1456 | var headerLength = parseInt( octets[ pos ], 16 ); 1457 | pos++; 1458 | data.push( 'Wireless Session Protocol\t' + wapTokens.WSP( octets.slice( pos, pos + headerLength ) ) ); 1459 | 1460 | pos += headerLength; 1461 | 1462 | data.push( 'WAP Binary XML\t' + wapTokens.WBXML( octets.slice( pos ) ) ); 1463 | 1464 | 1465 | for (i = 0; i < data.length; ++i) { 1466 | dataStr += '' + data[ i ].replace( /\t/, '' ) + ''; 1467 | } 1468 | 1469 | 1470 | return '' + dataStr + '
'; 1471 | } 1472 | 1473 | var wapTokens = { 1474 | 1475 | /** 1476 | * Type token 1477 | * 1478 | * {@linkplain http://mobiletidings.com/2009/02/21/wap-push-over-sms-encodings/} 1479 | * 1480 | * @param {string} octet 1481 | * @return {string} type of WAP encoded message 1482 | */ 1483 | type: function( octet ) { 1484 | // noinspection EqualityComparisonWithCoercionJS 1485 | if (octet == 6) { 1486 | return 'Push'; 1487 | } 1488 | return 'unknown'; 1489 | }, 1490 | 1491 | /** 1492 | * Wireless Session Protocol token 1493 | * 1494 | * Decodes a WSP header - at least all the information i could get a grip on. 1495 | * 1496 | * {@linkplain http://mobiletidings.com/2009/02/21/wap-push-over-sms-encodings/} 1497 | * {@linkplain http://mobiletidings.com/2009/02/26/wap-push-over-sms-si-encoding/#comment-1216} 1498 | * 1499 | * @param {Array} octets 1500 | * @return {string} Information text 1501 | */ 1502 | WSP: function( octets ) { 1503 | var i, 1504 | o, 1505 | text = '', 1506 | headers = [], 1507 | header = {}, 1508 | wellKnown; 1509 | 1510 | while (octets.length) { 1511 | o = parseInt( octets.shift(), 16 ); 1512 | 1513 | // 0 is either a string terminator, somewhere in between 1514 | // or indicate a 0-length header (which shouldn't really happen) 1515 | // -> do nothing on 0, just increase counter 1516 | if (o === 0 && header.octets) { 1517 | header.pos++; 1518 | } 1519 | 1520 | if (o > 0 && o < 32) { // start of next header 1521 | if (header.octets) { // there is an unfinished header left -> this indicates a illegal WSP header 1522 | headers.push( header ); 1523 | } 1524 | 1525 | header = { 1526 | key: '', 1527 | value: '', 1528 | pos: 0, 1529 | octets: o // the next 0 - 30 octets are the data 1530 | }; 1531 | 1532 | if (o === 31) { // special case: length is in next octet 1533 | header.octets = parseInt( octets.shift(), 16 ); 1534 | } 1535 | 1536 | if (headers.length === 0) { 1537 | header.key = 'Content-Type'; // first WSP header has to be content type 1538 | } 1539 | } 1540 | else if (o > 31 && o < 128) { // this is a character 1541 | header.value += String.fromCharCode( o ); 1542 | header.pos++; 1543 | } 1544 | else if (o > 127) { 1545 | wellKnown = o & 0x7f; 1546 | 1547 | if (wellKnown === 0x01) { 1548 | header.value += '; charset='; 1549 | } 1550 | else if (wellKnown === 0x30) { 1551 | header.value += 'application/vnd.wap.slc'; 1552 | } 1553 | else if (wellKnown === 0x2e) { 1554 | header.value += 'application/vnd.wap.sic'; 1555 | } 1556 | else if (wellKnown === 0x6A) { 1557 | header.value += 'UTF-8'; 1558 | } 1559 | 1560 | header.pos++; 1561 | } 1562 | 1563 | if (header.pos >= header.octets) { 1564 | headers.push( header ); 1565 | header = { 1566 | key: '', 1567 | value: '', 1568 | pos: 0, 1569 | octets: 0 1570 | }; 1571 | } 1572 | } 1573 | 1574 | for (i = 0; i < headers.length; i++) { 1575 | text += headers[ i ].key + ': ' + headers[ i ].value; 1576 | } 1577 | 1578 | return text; 1579 | }, 1580 | 1581 | /** 1582 | * WAP Binary XML token 1583 | * 1584 | * Invokes a server-side decoder. 1585 | * Since XML markup should be returned, it's probably safe to asume that if the 1586 | * return value doesn't contain a '&', the decoding failed. 1587 | * If this happens, a fallback ASCII decoding will take place. 1588 | * 1589 | * {@linkplain http://libwbxml.aymerick.com/} 1590 | * {@linkplain http://search.cpan.org/~glasser/XML-WBXML-0.03/lib/XML/WBXML.pm} 1591 | * {@linkplain http://mobiletidings.com/2009/02/21/wap-push-over-sms-encodings/} 1592 | * 1593 | * @param {Array} octets 1594 | * @return {string} Decoded WPBXML message 1595 | */ 1596 | WBXML: function( octets ) { 1597 | var i, 1598 | text = ''; 1599 | 1600 | for (i = 0; i < octets.length; ++i) { 1601 | text += octets[ i ]; 1602 | } 1603 | 1604 | $.ajax( { 1605 | async: false, 1606 | cache: false, 1607 | data: {octets: text}, 1608 | timeout: 1000, 1609 | url: 'wbxml.pl', 1610 | success: function( xml ) { 1611 | text = xml.replace( //g, '>' ).replace( /&/g, '&' ); 1612 | } 1613 | } ); 1614 | 1615 | if (!text.match( /&/ )) { 1616 | text += ' (Could not be decoded, try ASCII decoding)'; 1617 | 1618 | while (octets.length) { 1619 | text += String.fromCharCode( parseInt( octets.shift(), 16 ) ); 1620 | } 1621 | } 1622 | 1623 | return text; 1624 | } 1625 | 1626 | }; 1627 | 1628 | /** 1629 | * Sets form values from URI query paramater values 1630 | * 1631 | * @return {boolean} true if anything was changed 1632 | */ 1633 | function setForm() { 1634 | var query = document.location.search.substr( 1 ).split( '&' ); 1635 | var params = {}; 1636 | var i; 1637 | var p; 1638 | var $fields; 1639 | var re = { 1640 | textarea: /^TEXTAREA$/i, 1641 | input: /^INPUT$/i, 1642 | text: /^text$/i, 1643 | checkbox_radio: /^(checkbox|radio)$/i 1644 | }; 1645 | var changed = false; 1646 | 1647 | for (i = 0; i < query.length; ++i) { 1648 | p = query[ i ].split( '=' ); 1649 | 1650 | if (!params[ p[0] ]) { 1651 | params[ p[0] ] = p[1]; 1652 | } 1653 | else { 1654 | params[ p[0] ] = [params[ p[0] ], p[1]]; 1655 | } 1656 | } 1657 | 1658 | for (i in params) { 1659 | if (params.hasOwnProperty( i )) { 1660 | $fields = $( '[name="' + i + '"]' ); 1661 | 1662 | $fields.each( function() { 1663 | if (this.tagName.match( re.textarea ) || (this.tagName.match( re.input ) && this.type.match( re.text ))) { 1664 | this.value = params[ i ]; 1665 | changed = true; 1666 | } 1667 | 1668 | else if (this.tagName.match( re.input ) && this.type.match( re.checkbox_radio ) && this.value === params[ i ]) { 1669 | this.checked = true; 1670 | $( this ).change(); 1671 | changed = true; 1672 | } 1673 | } ); 1674 | } 1675 | } 1676 | 1677 | return changed; 1678 | } 1679 | 1680 | /** 1681 | * Removes all whitespaces, linebreaks etc. from a form field content 1682 | * 1683 | * @param field a form field DOM element 1684 | */ 1685 | function cleanInput( field ) { 1686 | var $field = $( field ); 1687 | 1688 | $field.val( $field.val().replace( /\s/g, '' ) ); 1689 | } 1690 | 1691 | }()); -------------------------------------------------------------------------------- /source/reset.css: -------------------------------------------------------------------------------- 1 | /* v1.0 | 20080212 2 | * http://meyerweb.com/eric/tools/css/reset/ 3 | */ 4 | 5 | html, body, div, span, applet, object, iframe, 6 | h1, h2, h3, h4, h5, h6, p, blockquote, pre, 7 | a, abbr, acronym, address, big, cite, code, 8 | del, dfn, em, font, img, ins, kbd, q, s, samp, 9 | small, strike, strong, sub, sup, tt, var, 10 | b, u, i, center, 11 | dl, dt, dd, ol, ul, li, 12 | fieldset, form, label, legend, 13 | table, caption, tbody, tfoot, thead, tr, th, td { 14 | margin: 0; 15 | padding: 0; 16 | border: 0; 17 | outline: 0; 18 | font-size: 100%; 19 | vertical-align: baseline; 20 | background: transparent; 21 | } 22 | body { 23 | line-height: 1; 24 | } 25 | ol, ul { 26 | list-style: none; 27 | } 28 | blockquote, q { 29 | quotes: none; 30 | } 31 | blockquote:before, blockquote:after, 32 | q:before, q:after { 33 | content: ''; 34 | content: none; 35 | } 36 | 37 | /* remember to define focus styles! */ 38 | :focus { 39 | outline: 0; 40 | } 41 | 42 | /* remember to highlight inserts somehow! */ 43 | ins { 44 | text-decoration: none; 45 | } 46 | del { 47 | text-decoration: line-through; 48 | } 49 | 50 | /* tables still need 'cellspacing="0"' in the markup */ 51 | table { 52 | border-collapse: collapse; 53 | border-spacing: 0; 54 | } 55 | -------------------------------------------------------------------------------- /source/wbxml.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | use strict; 4 | use warnings; 5 | 6 | use CGI::Minimal; 7 | 8 | my $cgi = CGI::Minimal->new(); 9 | 10 | my $octets = $cgi->param( 'octets' ) || $ARGV[0] || ''; 11 | my $text = ''; 12 | my $xml = ''; 13 | 14 | for (my $i = 0; $i < length $octets; $i += 2) { 15 | $text .= chr hex substr( $octets, $i, 2 ); 16 | } 17 | 18 | eval 'use XML::WBXML'; 19 | 20 | if (!$@) { 21 | $xml = XML::WBXML::wbxml_to_xml( $text ); 22 | } 23 | 24 | binmode STDOUT, ':utf8'; 25 | 26 | print "Content-Type: text/plain; charset=UTF-8\r\n\r\n$xml"; 27 | --------------------------------------------------------------------------------