From 839913d51a3df3d15a21d5be1f334825997b8338 Mon Sep 17 00:00:00 2001 From: Szabo David Date: Mon, 20 Dec 2021 12:50:53 +0100 Subject: [PATCH] initial commit --- .gitignore | 1 + composer.json | 5 + composer.lock | 70 + scripts/Moly_hu.zip | Bin 0 -> 9709 bytes scripts/dummy.paperbook | 0 scripts/import-moly.sh | 44 + scripts/import-paperbooks.sh | 44 + vendor/autoload.php | 7 + .../biblys/isbn/.github/workflows/tests.yml | 42 + vendor/biblys/isbn/.gitignore | 1 + vendor/biblys/isbn/.gitpod.yml | 2 + vendor/biblys/isbn/LICENSE | 21 + vendor/biblys/isbn/README.md | 141 + vendor/biblys/isbn/bin/update-ranges.php | 78 + vendor/biblys/isbn/composer.json | 41 + .../biblys/isbn/src/Biblys/Isbn/Formatter.php | 115 + vendor/biblys/isbn/src/Biblys/Isbn/Isbn.php | 345 + .../src/Biblys/Isbn/IsbnParsingException.php | 17 + .../Biblys/Isbn/IsbnValidationException.php | 17 + vendor/biblys/isbn/src/Biblys/Isbn/Parser.php | 179 + vendor/biblys/isbn/src/Biblys/Isbn/Ranges.php | 35 + .../isbn/src/Biblys/Isbn/ranges-array.php | 9938 +++++++++++++++++ .../biblys/isbn/tests/convertToEan13Test.php | 41 + .../biblys/isbn/tests/convertToGtin14Test.php | 51 + .../biblys/isbn/tests/convertToIsbn10Test.php | 52 + .../biblys/isbn/tests/convertToIsbn13Test.php | 41 + .../isbn/tests/deprecated/constructorTest.php | 34 + .../isbn/tests/deprecated/formatTest.php | 76 + .../isbn/tests/deprecated/getErrorsTest.php | 42 + .../isbn/tests/deprecated/isValidTest.php | 65 + .../isbn/tests/deprecated/validateTest.php | 66 + vendor/biblys/isbn/tests/isParsableTest.php | 37 + .../biblys/isbn/tests/validateAsEan13Test.php | 54 + .../isbn/tests/validateAsIsbn10Test.php | 62 + .../isbn/tests/validateAsIsbn13Test.php | 107 + vendor/composer/ClassLoader.php | 479 + vendor/composer/InstalledVersions.php | 292 + vendor/composer/LICENSE | 21 + vendor/composer/autoload_classmap.php | 10 + vendor/composer/autoload_namespaces.php | 10 + vendor/composer/autoload_psr4.php | 9 + vendor/composer/autoload_real.php | 57 + vendor/composer/autoload_static.php | 31 + vendor/composer/installed.json | 60 + vendor/composer/installed.php | 33 + vendor/composer/platform_check.php | 26 + web/errors.php | 10 + web/index.php | 46 + web/scan.php | 17 + web/store.inc | 51 + web/template.inc | 28 + 51 files changed, 13051 insertions(+) create mode 100644 .gitignore create mode 100644 composer.json create mode 100644 composer.lock create mode 100644 scripts/Moly_hu.zip create mode 100644 scripts/dummy.paperbook create mode 100755 scripts/import-moly.sh create mode 100755 scripts/import-paperbooks.sh create mode 100644 vendor/autoload.php create mode 100644 vendor/biblys/isbn/.github/workflows/tests.yml create mode 100644 vendor/biblys/isbn/.gitignore create mode 100644 vendor/biblys/isbn/.gitpod.yml create mode 100644 vendor/biblys/isbn/LICENSE create mode 100644 vendor/biblys/isbn/README.md create mode 100644 vendor/biblys/isbn/bin/update-ranges.php create mode 100644 vendor/biblys/isbn/composer.json create mode 100644 vendor/biblys/isbn/src/Biblys/Isbn/Formatter.php create mode 100644 vendor/biblys/isbn/src/Biblys/Isbn/Isbn.php create mode 100644 vendor/biblys/isbn/src/Biblys/Isbn/IsbnParsingException.php create mode 100644 vendor/biblys/isbn/src/Biblys/Isbn/IsbnValidationException.php create mode 100644 vendor/biblys/isbn/src/Biblys/Isbn/Parser.php create mode 100644 vendor/biblys/isbn/src/Biblys/Isbn/Ranges.php create mode 100644 vendor/biblys/isbn/src/Biblys/Isbn/ranges-array.php create mode 100644 vendor/biblys/isbn/tests/convertToEan13Test.php create mode 100644 vendor/biblys/isbn/tests/convertToGtin14Test.php create mode 100644 vendor/biblys/isbn/tests/convertToIsbn10Test.php create mode 100644 vendor/biblys/isbn/tests/convertToIsbn13Test.php create mode 100644 vendor/biblys/isbn/tests/deprecated/constructorTest.php create mode 100644 vendor/biblys/isbn/tests/deprecated/formatTest.php create mode 100644 vendor/biblys/isbn/tests/deprecated/getErrorsTest.php create mode 100644 vendor/biblys/isbn/tests/deprecated/isValidTest.php create mode 100644 vendor/biblys/isbn/tests/deprecated/validateTest.php create mode 100644 vendor/biblys/isbn/tests/isParsableTest.php create mode 100644 vendor/biblys/isbn/tests/validateAsEan13Test.php create mode 100644 vendor/biblys/isbn/tests/validateAsIsbn10Test.php create mode 100644 vendor/biblys/isbn/tests/validateAsIsbn13Test.php create mode 100644 vendor/composer/ClassLoader.php create mode 100644 vendor/composer/InstalledVersions.php create mode 100644 vendor/composer/LICENSE create mode 100644 vendor/composer/autoload_classmap.php create mode 100644 vendor/composer/autoload_namespaces.php create mode 100644 vendor/composer/autoload_psr4.php create mode 100644 vendor/composer/autoload_real.php create mode 100644 vendor/composer/autoload_static.php create mode 100644 vendor/composer/installed.json create mode 100644 vendor/composer/installed.php create mode 100644 vendor/composer/platform_check.php create mode 100644 web/errors.php create mode 100644 web/index.php create mode 100644 web/scan.php create mode 100644 web/store.inc create mode 100644 web/template.inc diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..60baa9c --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +data/* diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..73c6ff4 --- /dev/null +++ b/composer.json @@ -0,0 +1,5 @@ +{ + "require": { + "biblys/isbn": "^2.4" + } +} diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..1f0368a --- /dev/null +++ b/composer.lock @@ -0,0 +1,70 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "6a4d36d2babadc6821e5e397bc1eff15", + "packages": [ + { + "name": "biblys/isbn", + "version": "2.4.0", + "source": { + "type": "git", + "url": "https://github.com/biblys/isbn.git", + "reference": "319408b2ef9aeea4f46304ac1a9868ea3ceff2ad" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/biblys/isbn/zipball/319408b2ef9aeea4f46304ac1a9868ea3ceff2ad", + "reference": "319408b2ef9aeea4f46304ac1a9868ea3ceff2ad", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "require-dev": { + "guzzlehttp/guzzle": "^6.2", + "phpunit/phpunit": "^6 || ^7 || ^8" + }, + "type": "library", + "autoload": { + "psr-0": { + "Biblys": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Clement Bourgoin", + "email": "c@iwzr.fr" + } + ], + "description": "A PHP library to convert and validate ISBNs", + "homepage": "https://github.com/biblys/isbn", + "keywords": [ + "ISBN", + "book", + "ean", + "gtin" + ], + "support": { + "issues": "https://github.com/biblys/isbn/issues", + "source": "https://github.com/biblys/isbn/tree/2.4.0" + }, + "time": "2021-03-05T00:00:00+00:00" + } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": [], + "platform-dev": [], + "plugin-api-version": "2.0.0" +} diff --git a/scripts/Moly_hu.zip b/scripts/Moly_hu.zip new file mode 100644 index 0000000000000000000000000000000000000000..7553cd69e8f0f68c8807fffb3ab99d6f613a7472 GIT binary patch literal 9709 zcmai)18`>DwytBF9osfKX2%_Uv2Cl9bZjRb+crCP^2N4oo2UPO-+T7HXYW(DR?Sg! zRjqpGm}^yyx!$M7cNuU93=j|y7!V;XFXc^*D2p|45D-sT5D-KVd=MjZ16wl_YdbSW zXLn~+6<82(ZjF2cYQ7=^7k79NP>AC{&;A`60djV$5-1($TRtfVhIrrA72}QCnl){{ z8G^DdDx?-qsmZd8ELFHepTtQdqV2Ioq-kSb{`jYZ@Ns- ze?TcPG(_;g8sYY-lJSl)7yTT(#WLkeUi2*872x2{S6MC;D2(`Lt`6WH^BsM`j z=;~+R@ANAP8~+~FFL(H{dj?$pbGJUIGVl=xA8!tS97wox)rQK@45pCRtX}%{4)N`F zdt|^eNrTlSS9PE0wcEU`LE=Xocr$wz0)3T@Ilr>1c!#Las45#ajK2&7F1c13;+pMQ z{bRc|k-#R~E4(ZsoHhXYa|E!}=ku~%U)x}lMhiF-@L0fH4_ZMrNzr~Qp>Fd%gBFjMR<;P2j1aw_;}iouaIP*f_>g zG4j63wmL0%{0P!yr=Y4pUSm9BI2HMk-~>({+Q$f?1$!8w0jeZCK;OZrBAN(C2{ES8 zoo2hP^-9m2XvQ+4? zpPJwT>)h*~so-`Hl58eL&BoSN){0kU$2HXtn(HUCH_;e>?CxWcQGUuiAmM#;BUkSU zGOB_jrN4@fyY!M-r|0v4mg$ut;|^-&mAAOT8Od;epC67t7~M1F7-P)k4tJyR=J&y# zt4UAI$AF%#NMXzJ$IOfbl{1`2=g28Ix_^gSe}WyLN?-LH$oQPC=WZ>cr7KL*u~D1!O8>nS{D7`XdjM%;P#)mwAqf zgO()2kTVEA(aaL;22NINM?4_ zn9Gq%M}+K!YWTFlX<5h7)GJeCC~tly2YheP@BdvQ3jKa6%d@&+2_k@i@Kb<*!2c-` zdU_VN7S4KljP@RX7l6*(8v?OTZ-qyo%2&{m)LoutN)i4A#|4UV<1@dm^3WPd4U`@AduB4|0JGXi zz?5tUpg0e?Gr9N%brSB*_WD=wcjftZmF}`Jj45%q%e9UKuz<)!G!69l*sVSVK@zh^ z@C=|>W685~kv@{?gWKbyp;CB#iWj*&Zez|K73BVNU#dq0n__!0cCZ<>@U z7Y;2m;7mJC1AS`)fH?ra(8=zSb&D!=pVGUT76*NOp+%+{AD^5`p3PBVK%Q_Hn6X2K zV(B~9vY)FLyjN2)*9+$UW8CYf?%uU5=I{I-#aLX~x$q*3lrkJL6|{GKH8TJ}=9`IS zal)+qNV z4g<%PttkGt(lKs@dYnoVg&~qSczY_<*~ln!*E$WLBEv!ay!jA)u~K|7sa`=nB|Dfn z^p-OP!&3K$FOfQ2&Aa}XF~EtTE?vHF%gj*sz(1P8f+TN0#ds%jUMW2gqniwhaH}1B zMM!;q18RZ60bF~UbqILX6MKdP1lLx-ipQ3V(@a#7iTtnwy1LjSuxd`DhM?@q_L6_I z_p8n8O$H^ZSGoq0eu)=?|AJ3uMS;tF$en4Q6r;9CUF8@IAGwD{#6UE00)FS4nA<4F1+0mje7E_nV)6Lm4PIo+p!C@&Vl~juUAm4-`q|&V4{2G}| zBQcVzt1Uq_dZ0o@G{M2*A{Uk;eM$BGiNmc))KQnZPi5Y=(84M~yV`~c0sy9pR&n*I zu@!T?emTU&u-z=_DA*Rc#?Qvz99al76K9kYfX6W9_|w~vc9boVbvpFGJ+3Z-6GJlG z#I?2)YhOq+`a>)J5;Cv5C z6qKXyS$*UXR<~@^WQ*gIhh7N!(qp#Qsi5rpaw6W$@{B`=LD*wFcu)<{+iCT3>Y$Ca zI%$b;g2rWP2p$}!%#kEGtPP!9OC*Kt+d80nfmpL;hWp$NKwjJYqb#z;a-9Aa4QNh~ z95nxhu=+INA5!<~B@Bf@QZJ+w6Jnh!VUPGYt8$?RNG+r=rh%fC(;?o+lwj?Pha@ndpqGa;9(UGZ2dpZ0~q&+TVeF z25r!`j+B-s9@3iZWBzgT_HHKONKX#9nvlQJ&PR7gfcw$Aa>e=$G+?Fd;(RQ_l;o-= zgCRw?86B7FKBw{+-_?0*U<-ejIlQ*IthYo`4eOC{^fHeSa#P8}Gzd zxuth#kXNi24UCfJ5FQu&yImsy!X){<7lQYcP0(A6S=7(&!=Rydu7 z1dyrb2kAT*^;@>KmL+vAU^;EMj=4T7E(?}xzj$VfM6L_Pu0 zgpFD~3-S*vlTMg578>=1bZflvr$m6?btS&D9(sZ37GfV) z66Rg;HlPKwV~xL)1jA|!2CFR%a|dDC_YC|Z&sx-A9sHY(Ad6-NaR18hTF%g0@X8i+ z9dp=Q&7AWkJoQD;9dhuzRhRC1KYM6~)~={MP&tob$w^W4@+8`#Ys#)=IP!F(4+2l1uXJZp-$p4 zQf+U*ZeFVl$Z=S0YFecAsI0t3+J*M6K6XdTiB1(ss{-OPK1ks_5pWF1FmN$vY7+6lCsdH}R z%n-wYdKNCD&tA`uKmOerHj+UvBA;M^Uty;z*zmFeQS!{j1Nk|GA4{~(uvu=0WHrm4 zdy7hHC+bmwZmHi_tobyj2DZlqPo(bxTepbxsQ9&L^i1RkQX{o@MdrE=z38s#PUM#e zV;5l54t6wIFAh~%wzu`zKk{n-p6k1+c@Ho$CP|N$RK9-zuVcnJ$g8QcUc2pg z@z%l;KL2N@#-_V|bk|{Y;a6q=NBVHGeCr0mNG&iU8h?4{5L30Dd1*P9iRi>?$QZsF zL1-hxM0!qZNcgh^-z!Jv^&v$?L>j4>+0zcJ@f6?79N#a9x#3&_)pAPOVyxfbQAch2 z%md6ax{xI+r_gu!*Fifty8J>2+jkaqC-TX#JJmWK%tH53Gn1Y+KGg`vlNE#jXU!(5 zQQJVZwsdM^yhGc5SCbylr$^nGQ`}N{%7X%|Shf4|o5Y(mzK-`3|Bg{C=LK%Cn4V$C z#~co^^f1G7JuHwk6ZhROu0OF-0mdd9vf?^^msl+`>v)k)EJNkU1U>p4A34Xi)o8ty zZ7LYer^M*73eu}24I+1K-y>cKbB-pPD(g<6r?nYoJgZ76wG?BlyU31J9#1fmX~m0e!#XVg0Nx?6YnjA*&Z{Ro zJEyYC z9$3G!leJ)N>LfK+n^ISgL4TJz(ayRSuc1<^9GbVTRScc^#)bWb-o;W`=n%H7?uR$? zM({Vdb^m?7pPzUO4;62 z+rLf)C%KlCsEp`JbAX}Au&CF{#P`HRcIqY>9RyL^i{A9@$4J{wLhl&HP1>T^Cazye z<+lBbR{18^UAq5}RY}!rzqG9DiLR&xcrn>=8)d8Np@JWgm3hVI-yQ_+52gSCAqMbB z|2_FXf$)z9vA1?Hv#@2bu(7vubY`$MurXnUB>94MkCpESKei-y3u@L?#2}Zk8EN(W|5X|>XyFJszoiAX#Y#9 zl%`q9T_cuDC8e+`in=6D7o!&*tu<#YLrSI$6<(^41F?3x;bex~!v?cPOs>*Fz!s?} zdDLVjMRp$TNxVh}ca_6-QPuRgyk-S(?)I??+_vV-QfkV}wlum^WGyZN-w?@^DpI4q zOv$PyPwmM&@-jIK&4RPQ15XnwmdK#(fT>tzEKe+dqS{o}^cWE9JC*$9l9fSyf@x6S zn;;&nCDDgE5;Kfbp(W*nhWH$cyVgBb$V;SO*f{8~O~LnFsF}kCKC+6U*qL!VpQ@3K z4DA<9=L|>cu8yf^SyI^%91mPqMy){aPBj_0|F#rs;T~*-WqqK_nz%msR~d6~xTZ%4 z{sJX;J|GqF{q;_Xc#wj0RpU51-e|31MvJ0nnoh6pXiJ!?_Dq6Z@cCmNX4)3Fl>et^ zZTIFz3>vhWk~*u2_DGN#RCGfxG9&h>k^>NS=L`k7Qr?ure0ilOS!UeGooHZVHHb`O zOjFaCnb9qzt4N8jZSJg(F|o_Y9YxLOUYgM^fKJ$V;5NP$zGqRr%W---W~;Q+CG6+z zHZzjZcr)Vuu&(v2Rot!rjdw+1Xo_S$G(fH|>bI-zoQpls-i8>}nY10-19A`>u2wCM zMGU7Z2;Ezgln(ybv78loEesC_;x4Uq1S4QyLY099}etT_szOk8^ zy1&-U@dQ#JH@`3XggI}PJlZ~MN{k=ka_@0H>>RmJ)MHg{R_Sdln)iEdJ6c*Fun<%e z@=;_Xs6APJW+-ltj5m&fEGEG~jf|fp0S4bXD861w%EuJ zpV_yHeZ+5!kull|`3i&6;0Kia>;k@i?_Sfb#X2E0}MjWZ>u)E31TxEBx0o%o$=LzN|gpCUfvw-b)Hhtu?hZmyU`5CU&~zYm4_qj9W$N)shk2X_*OGzcU6 zdiJ&eB232XQj^W$Q!@FQWM;1e`*di~pJ}?7>W>T^huiK39gvZ@4UO!Zn00#JMW0?+ z@{PU4aJl4%OwVUJy=suNM&QkC+n4~Vye+PqY>?5mrC#Qxh2~qmA%%7BzpxPV{25z+ zx%c8WT<57a=NjE-$R5FpC`w+rU19RFCk$2?k<_w*g6fXr^tD6EK54gUZkJrK&=9vw zX&!qNW5X~ER+ZyBxYZuRpOO%c#A&LHDAmj%80ZJecwj_guuz?}x}9vIbc~*Ce4o&R zS$NrFIS8X*h>FU;6S-;`vuFA6_Atw>6g;wgXon@FyL9f}fDbsjHydQmG~m>=-_#+R zx%x)Ve;YgS5*P?ur~)q!@#VM8rR7JcjuETOMrcX=2PfY^tiACtqLd~h3$T(q4&{Qf z$ju(K;H*1eBG2vZd^UpC3;!+?f%!X5T`ngtAIQi44>yuUi0(~Y7TOEWb@eOcV-6*3 z>teh_96lP9h})ON!&^V+8vr$73Z8=i0*~;T135IW_2wSd>ZR(8T)f985O&Cb!v#PR=fF@21{{{+qlG}j&1nlL+cC!YvV zEco_Xt)%NRIp@`Jz7kT&;T5N@-^va-Vp=n!ijf?J~Iv+=98}lVZJmg`2 z{h8G%G6^b#(qHwnf;`%+g2Fezsq;1f96$E+b<(GKbG5YG(QG(^05Ar$CZWn}@wQ4I z^XL@Z!7&miRnm<_?&N)Y+JJto<8^P*%iJN7dQ1%@I?H`~s8pnJL>tQ2T%d?B>b*^+ zrhq;52ZzTp)2@p*o%b#9nxJD02hHu1Hf}Vor6i2i0K&uag^Pg+e?C;MHXEj-*5rv~ z1>(nUB`^t)-9m##lN&ZsKf99}AV^$XZfr(;BRN2QPDojB6b9yJ+?-vDHRp-#5tW6N zev`->D@|3elTLE+A65oVkf+Xpj&Sm-kfyQTlRiu8=cfUP;R)nhQJK5h>Zt--oE6GPIuteR#f<^ zJB682;HgR$T_>CQ#AFLTYrWl7>j}Qz41{HtP!8k}j?HFtyRj&wQ&tCuUOS;!WvVU& zH5Jv>(_^2g-Quy~q^nO|Eot19RyLy$bswg1#Zu}9aLXdLvjT)FC?3UW` zoF!|JC}*IMQaK@mCSdp+0znxo`Sog!3SB@uQ--w2kftCK;gHI>^~bzH-HXNV7b)qg zLTVDs(j2>q!J3p?#$W#XdlV3kBn}1pX)M2AXcC5{{JM=Bc_o47lfj!PVkoWTSabqp z+Qd0dyc7uP8IzFKF6Fo3Kjc{kkxxMm1JwMxAJawaW(%Jay#^#}bZ7}&R3228j2Z%a zhIq#cyT1cWr&7fs1&pynjWJ(N6!Xs#5gw-UbiVIt)Cbxt7`{e*AKt+sFr|lBP#Iwj ztnjx&=)-ClbXmJZ*DMGWFZz0x5CDE-|ClShQl*6WSk5F!#xp+UM6aXuOUIu77c8e+ z;jE*!-x1j_?-{q!Ib>fz7kvP~20F(`_Ya0GZirGAvH1M;1V0|urF~20!}%{Uc$4FU z0r@n3*DyD){!=VLvgthw$`U;i6b79V!PKpMT6X)+BWDtaPo=fNlgpGmqa7S7G!PdU z=d~2ttI49Fkw4RS=6kv+1u`~^`Y%#8L@~v=IDY)rnPkm0SS$v>BOOLCKY>Xpx7FTa zVDS<;0Q@1#wxYKkDg!?e5UWsjx2yKu4OT8e7V+Zp6ZTk*bfQ$$jB?>!6jg9Lf3$t{i9~Z_w5NcW|0*~GImGZOMiuEwZ zTp1~lu#qy9mfNdgng}YK2ZIBArwa6v+$4(^RUZiu{aSk{z3KC^lRw$G8`r*RI%2S0 zWY^UNCj1 zi-Uuh3mj(X!rN;4UbX)!XCekpC=*YYy9*0WLE|Wyw0|PYc`qxH0P6%Wq!+gain_h0 zI*#r_KBP`bEA+fb!?2ahJT{q%+AiKU6&Ov{Js)?Pn0_P!C1w~_2SlWx2q1v0n!|nA z*+Li)H1%KbV?L>$^vIWP5x&g3r0da?c+xC=ny1S4>YLGq4`j%>^&Z&@PNAor^KH6C z2*pe8D$Ui~+l{jY=Qt(qWq7@n6*}D(q&tA_(~^Sc9a&3Ih^+qhyh|yD)(WF0|KfZq zc3<*!G=PCoLswXB4URgEM)tfj}gco~G)zqT( z{z`$WALv%#$ml7;1SRpxrTum;ZdimvABx9+>YhtKOu475UNkl{^!F?WWIR z1`#o!-3NWvo#tYSPAri!s*>R6(^DQ+{1`zI9%$JCMqjV)=Q!Jio zf?;>1Yf@1Ls2;TY*}q`b&U3aZ^9_w~@zKpK#M?6@M8J;m`p4>|bP_92ib6kxLncoZ zH~Kv@eQD$2cK%dlXxu}*mnT%GBdvxaHFV$6MPB*n;u76+8{7Q&qHv3Xl`-`J31Jfm zTI6_>(ESzO7ha8tTbjPK{Q#`!#M`JXP)_`QAwu=`I=LKMfXk#xiTwSXtp{E!ZO5bk zWamJj*t4(7G95_+Zvzy<9fU=9oRzW9SIGJD89LwqX(Z)**aZ}Q za?rf#zub3r0hAtEP)my_&N~YaKOD@f`MuEn8_~BSmbcEad3RQnik-#T{0Zn?zkpp= z80pp@d8KLwWXBi>w2bHdyf>b+a#cI5B((jsKz!Zy9XoaxF2gyCeB62xmyxQ^=mk^{ zu{_shm@tRQaoOIwn|=?rMZgpSVj9>T(OJh#uk$F9o`A(C(f;{y7Ok_AU$&~~@Hmf- zW`mZ#Nn{-!4?0V~n>!8KL(R%;xKaP(ssWnbFgI2^; zZMGKCt)o}AU|^FlFv%5OPb{{N#qa%qc1F+i*l_10rp560+87nP4(bSDY*Au>29*t4VFYNL4BrO6x$XO) z-GRJ<&skx0Z?6RQ=vMa|Z*BqQi*NyN#}dn<<#gshadz6bP*L73>sXw+zg=%aiprmTUd zn_ag8Z$Cr5z!IzqrVzxeLf%1hrkzIqIh}U2V6yWFEf=Ny-GiK>ZDL^YgO#tkh-38? zS=c1Ptmw500oL&nqavHhdt)XV_VjY3pASc(r@vC44jDuOFSmmQ7&zFo~7~$CKGe=@1Da1V(Q-Mjdv0N;)jO zD;36crHXnQs}K>w?5Ll5JK3cQR60UNGF%VGgN*AK^s!jKUd6(!ijtk7j6H)C?i{gV zFWXx{lD8J6b9cFJ8D{??aiCy?;Qw38(3iid9O$1|;P=<`e>4z5{-c5D-yqySCI7v} z;9n)lAVB`#hJ!zXe>EKZN5TJ%7yd)=uj~r^icvuRzx43W8vl_T{xj)+XNUiq^yi;7 z{)Hs|k^74z{>PO6@ml}gO#Z7JKQ;)+zgWvZa(`LNf0KiR`fG=ff3BiGpM!<`ue<*O DtLG`R literal 0 HcmV?d00001 diff --git a/scripts/dummy.paperbook b/scripts/dummy.paperbook new file mode 100644 index 0000000..e69de29 diff --git a/scripts/import-moly.sh b/scripts/import-moly.sh new file mode 100755 index 0000000..03570f6 --- /dev/null +++ b/scripts/import-moly.sh @@ -0,0 +1,44 @@ +#!/bin/bash +DATAFILE="/opt/konyvleltar/data/moly.txt" +INPUTFILE="/opt/konyvleltar/data/moly-input-$RANDOM.txt" +ERRORFILE="/opt/konyvleltar/data/moly-error.txt" + +LIBRARY="http://localhost:32452/#paperbooks" + +META_TMP="/home/calibre/metamoly.tmp" +COVER_TMP="/home/calibre/covermoly.jpg" + +DUPES="-d" # "" or "-d" +RESTRICT_MOLY="" # "" or "--allowed-plugin Moly_hu" + +if [ -f "$DATAFILE" ]; +then + mv "$DATAFILE" "$INPUTFILE" + if [ -f "$META_TMP" ]; then rm "$META_TMP"; fi; + if [ -f "$COVER_TMP" ]; then rm "$COVER_TMP"; fi; + cat "$INPUTFILE" | while read MOLYID + do + ALREADY_IN=`calibredb --with-library $LIBRARY list --fields id --search "identifiers:moly_hu:$MOLYID" | tail -n +2 | wc -l` + if [ $ALREADY_IN -eq 0 ]; + then + fetch-ebook-metadata $RESTRICT_MOLY --identifier moly_hu:$MOLYID -c "$COVER_TMP" -o > "$META_TMP" + if [ -s "$META_TMP" ]; # not empty + then + if [ -s "$COVER_TMP" ]; # not empty + then + COVER="--cover $COVER_TMP" + else + COVER="" + fi + calibredb --with-library $LIBRARY add $DUPES --identifier moly_hu:$MOLYID $COVER dummy.paperbook + ID=`calibredb --with-library $LIBRARY list --fields id --search "identifiers:moly_hu:$MOLYID" | grep -v id` + calibredb --with-library $LIBRARY set_metadata $ID "$META_TMP" + else + echo $MOLYID >> $ERRORFILE + fi + if [ -f "$META_TMP" ]; then rm "$META_TMP"; fi; + if [ -f "$COVER_TMP" ]; then rm "$COVER_TMP"; fi; + fi + done + rm $INPUTFILE +fi diff --git a/scripts/import-paperbooks.sh b/scripts/import-paperbooks.sh new file mode 100755 index 0000000..f8f7184 --- /dev/null +++ b/scripts/import-paperbooks.sh @@ -0,0 +1,44 @@ +#!/bin/bash +DATAFILE="/opt/konyvleltar/data/isbn.txt" +INPUTFILE="/opt/konyvleltar/data/isbn-input-$RANDOM.txt" +ERRORFILE="/opt/konyvleltar/data/isbn-error.txt" + +LIBRARY="http://localhost:32452/#paperbooks" + +META_TMP="/home/calibre/meta.tmp" +COVER_TMP="/home/calibre/cover.jpg" + +DUPES="-d" # "" or "-d" +RESTRICT_MOLY="" # "" or "--allowed-plugin Moly_hu" + +if [ -f "$DATAFILE" ]; +then + mv "$DATAFILE" "$INPUTFILE" + if [ -f "$META_TMP" ]; then rm "$META_TMP"; fi; + if [ -f "$COVER_TMP" ]; then rm "$COVER_TMP"; fi; + cat "$INPUTFILE" | while read ISBN + do + ALREADY_IN=`calibredb --with-library $LIBRARY list --fields isbn --search isbn:$ISBN | grep -v isbn | wc -l` + if [ $ALREADY_IN -eq 0 ]; + then + fetch-ebook-metadata $RESTRICT_MOLY --isbn $ISBN -c "$COVER_TMP" -o > "$META_TMP" + if [ -s "$META_TMP" ]; # not empty + then + if [ -s "$COVER_TMP" ]; # not empty + then + COVER="--cover $COVER_TMP" + else + COVER="" + fi + calibredb --with-library $LIBRARY add $DUPES --isbn $ISBN $COVER dummy.paperbook + ID=`calibredb --with-library $LIBRARY list --fields id --search isbn:$ISBN | grep -v id` + calibredb --with-library $LIBRARY set_metadata $ID "$META_TMP" + else + echo $ISBN >> $ERRORFILE + fi + if [ -f "$META_TMP" ]; then rm "$META_TMP"; fi; + if [ -f "$COVER_TMP" ]; then rm "$COVER_TMP"; fi; + fi + done + rm $INPUTFILE +fi diff --git a/vendor/autoload.php b/vendor/autoload.php new file mode 100644 index 0000000..49a7869 --- /dev/null +++ b/vendor/autoload.php @@ -0,0 +1,7 @@ +getMessage(); +} +``` + +All formatting methods: + +- `Isbn::convertToIsbn10` +- `Isbn::convertToIsbn13` +- `Isbn::convertToEan13` +- `Isbn::convertToGtin14` + +### Validate + +Use case: validating an incorrectly formed ISBN-13 (978-2-843-44949-9, should +be 978-2-84344-949-9). + +```php +getMessage(); +} +``` + +All validating methods: + +- `Isbn::validateAsIsbn10` +- `Isbn::validateAsIbsn13` +- `Isbn::validateAsEan13` +- `Isbn::isParsable` + +[Learn more about validating ISBNs](https://github.com/biblys/isbn/wiki/Validating-ISBNs-using-the-new-public-API) + +## Development + +### Using Gitpod + +You can start a dev environment by clicking +[![Gitpod ready-to-code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/biblys/isbn) +and start hacking in your browser right away! + +### Locally + +If you'd rather set up a local dev environment, you'll need: + +- PHP 7.x +- Composer +- (Optional) Docker to run tests and debug against different version of PHP + +Clone this repository and run `composer install` to get started! + +## Tests + +Run tests with PHPUnit: + +```console +composer install +composer test +``` + +Run tests in a docker container: + +```console +composer docker:test +``` + +Run tests in a docker container using a specific PHP version: + +```console +PHP_VERSION=7.1 composer docker:test +``` + +## ISBN ranges update + +New ISBN ranges may be added from time to time by the +[International ISBN Agency](https://www.isbn-international.org/). Whenever it +happens, this library must be updated. If a range update is necessary, please +open an issue on GitHub. +You can also open a pull request after updating the ranges your self with the +following commands: + +```console +composer install +composer run update-ranges +``` + +Or using a docker container: + +```console +composer docker:update-ranges +``` + +## Changelog + +[See GitHub releases](https://github.com/biblys/isbn/releases) diff --git a/vendor/biblys/isbn/bin/update-ranges.php b/vendor/biblys/isbn/bin/update-ranges.php new file mode 100644 index 0000000..885a32b --- /dev/null +++ b/vendor/biblys/isbn/bin/update-ranges.php @@ -0,0 +1,78 @@ +request('POST', $url, [ + 'form_params' => [ + 'format' => 1, + 'language' => 'en', + 'translatedTexts' => 'Printed;Last Change' + ] +]); + +$result = json_decode($res->getBody()->getContents()); +if ($result === null || !property_exists($result, 'result')) { + exit("The ISBN range API at $url is currently unavailable, exiting...\n"); +} + +$value = $result->result->value; +$filename = $result->result->filename; +$url = sprintf('https://www.isbn-international.org/?q=download_range/%s/%s', $value, $filename); + +echo "Getting XML from $url...\n"; +$res = $client->request('GET', $url); +$xml = $res->getBody()->getContents(); + +echo "Converting to PHP array...\n"; +$ranges = (array) simplexml_load_string($xml); +$ranges = json_encode($ranges); +$ranges = json_decode($ranges, true); + +$prefixes = (array) $ranges['EAN.UCCPrefixes']['EAN.UCC']; +$groups = (array) $ranges['RegistrationGroups']['Group']; + +foreach ($groups as &$group) { + // Fix entries with a single "range", converting it to an array + if (isset($group['Rules']['Rule']['Range'])) { + $group['Rules']['Rule'] = array($group['Rules']['Rule']); + } +} + +$file = dirname(__FILE__) . '/../src/Biblys/Isbn/ranges-array.php'; +echo "Saving to $file...\n"; + +file_put_contents($file, + ' $char) { + if ($index & 1) { + $checksum += $char; + } else { + $checksum += $char * 3; + } + } + + $checksum = (10 - ($checksum % 10)) % 10; + + return $checksum; + } +} diff --git a/vendor/biblys/isbn/src/Biblys/Isbn/Isbn.php b/vendor/biblys/isbn/src/Biblys/Isbn/Isbn.php new file mode 100644 index 0000000..89a7878 --- /dev/null +++ b/vendor/biblys/isbn/src/Biblys/Isbn/Isbn.php @@ -0,0 +1,345 @@ +_input = $code; + + try { + $parsedCode = Parser::parse($code); + $this->_gs1productCode = $parsedCode["productCode"]; + $this->_countryCode = $parsedCode["countryCode"]; + $this->_isbnAgencyCode = $parsedCode["agencyCode"]; + $this->_publisherCode = $parsedCode["publisherCode"]; + $this->_publicationCode = $parsedCode["publicationCode"]; + } catch (IsbnParsingException $exception) { + // FIXME in next major version (breaking change) + // For backward compatibility reason, instanciating should not throw + } + } + + /** + * Checks if ISBN is valid + * + * @deprecated + * + * @return boolean true if the ISBN is valid + */ + public function isValid() + { + trigger_error( + "Isbn->isValid is deprecated and will be removed in the future. Use Isbn::validateAs… methods instead. Learn more: https://git.io/JtAEx", + E_USER_DEPRECATED + ); + + try { + Parser::parse($this->_input); + return true; + } catch (\Exception $exception) { + return false; + } + } + + /** + * Returns a list of errors if ISBN is invalid + * + * @deprecated + * + * @return string the error list + */ + public function getErrors() + { + trigger_error( + "Isbn->getErrors is deprecated and will be removed in the future. Use Isbn::validateAs… methods instead. Learn more: https://git.io/JtAEx", + E_USER_DEPRECATED + ); + + try { + Parser::parse($this->_input); + } catch (\Exception $exception) { + return '[' . $this->_input . '] ' . $exception->getMessage(); + } + } + + /** + * Throws an exception if ISBN is invalid + * + * @deprecated + */ + public function validate() + { + trigger_error( + "Isbn->validate is deprecated and will be removed in the future. Use Isbn::validateAs… methods instead. Learn more: https://git.io/JtAEx", + E_USER_DEPRECATED + ); + + Parser::parse($this->_input); + return true; + } + + /** + * Formats an ISBN according to specified format + * + * @deprecated + * + * @param string $format (ISBN-10, ISBN-13, EAN-13, GTIN-14), default EAN-13 + * @param string $prefix The prefix to use when formatting, default 1 + * + * @return string the formatted ISBN + */ + public function format($format = 'EAN-13', $prefix = 1) + { + try { + switch ($format) { + case 'ISBN-10': + trigger_error( + "Isbn->format is deprecated and will be removed in the future. Use the Isbn::convertToIsbn10 method instead. Learn more: https://git.io/JtAEx", + E_USER_DEPRECATED + ); + return Formatter::formatAsIsbn10($this->_input); + + case 'ISBN-13': + case 'ISBN': + trigger_error( + "Isbn->format is deprecated and will be removed in the future. Use the Isbn::convertToIsbn13 method instead. Learn more: https://git.io/JtAEx", + E_USER_DEPRECATED + ); + return Formatter::formatAsIsbn13($this->_input); + + case 'GTIN-14': + trigger_error( + "Isbn->format is deprecated and will be removed in the future. Use the Isbn::convertToGtin14 method instead. Learn more: https://git.io/JtAEx", + E_USER_DEPRECATED + ); + return Formatter::formatAsGtin14($this->_input, $prefix); + + case 'EAN-13': + case 'EAN': + default: + trigger_error( + "Isbn->format is deprecated and will be removed in the future. Use the Isbn::convertToEan13 method instead. Learn more: https://git.io/JtAEx", + E_USER_DEPRECATED + ); + return Formatter::formatAsEan13($this->_input); + } + } catch (IsbnParsingException $exception) { + // FIXME: remove message customization + // (kept for backward compatibility) + throw new IsbnParsingException( + "Cannot format invalid ISBN: [$this->_input] " . $exception->getMessage() + ); + } + } + + public function getProduct() + { + return $this->_gs1productCode; + } + + public function getCountry() + { + return $this->_countryCode; + } + + public function getPublisher() + { + return $this->_publisherCode; + } + + public function getPublication() + { + return $this->_publicationCode; + } + + public function getChecksum() + { + return $this->_checksumCharacter; + } + + public function getAgency() + { + return $this->_isbnAgencyCode; + } + + public function getGtin14Prefix() + { + return $this->_gtin14Prefix; + } +} diff --git a/vendor/biblys/isbn/src/Biblys/Isbn/IsbnParsingException.php b/vendor/biblys/isbn/src/Biblys/Isbn/IsbnParsingException.php new file mode 100644 index 0000000..52893fd --- /dev/null +++ b/vendor/biblys/isbn/src/Biblys/Isbn/IsbnParsingException.php @@ -0,0 +1,17 @@ + $productCode, + "countryCode" => $countryCode, + "agencyCode" => $agencyCode, + "publisherCode" => $publisherCode, + "publicationCode" => $publicationCode, + ]; + } + + private static function _stripHyphens($input) + { + $replacements = array('-', '_', ' '); + $input = str_replace($replacements, '', $input); + + return $input; + } + + private static function _stripChecksum($input) + { + $length = strlen($input); + + if ($length == 13 || $length == 10) { + $input = substr_replace($input, "", -1); + return $input; + } + + if ($length == 12 || $length == 9) { + return $input; + } + + throw new IsbnParsingException(static::ERROR_INVALID_LENGTH); + } + + private static function _extractProductCode($input) + { + if (strlen($input) == 9) { + return [$input, 978]; + } + + $first3 = substr($input, 0, 3); + if ($first3 == 978 || $first3 == 979) { + $input = substr($input, 3); + return [$input, $first3]; + } + + throw new IsbnParsingException(static::ERROR_INVALID_PRODUCT_CODE); + } + + private static function _extractCountryCode($input, $productCode) + { + + // Get the seven first digits + $first7 = substr($input, 0, 7); + + // Select the right set of rules according to the product code + $ranges = new Ranges(); + $prefixes = $ranges->getPrefixes(); + foreach ($prefixes as $p) { + if ($p['Prefix'] == $productCode) { + $rules = $p['Rules']['Rule']; + break; + } + } + + // Select the right rule + foreach ($rules as $r) { + $ra = explode('-', $r['Range']); + if ($first7 >= $ra[0] && $first7 <= $ra[1]) { + $length = $r['Length']; + break; + } + } + + // Country code is invalid + if (!isset($length) || $length === "0") { + throw new IsbnParsingException(static::ERROR_INVALID_COUNTRY_CODE); + }; + + $countryCode = substr($input, 0, $length); + $input = substr($input, $length); + + return [$input, $countryCode]; + } + + /** + * Remove and save Publisher Code and Publication Code + */ + private static function _extractPublisherCode($input, $productCode, $countryCode) + { + // Get the seven first digits or less + $first7 = substr($input, 0, 7); + $inputLength = strlen($first7); + + // Select the right set of rules according to the agency (product + country code) + $ranges = new Ranges(); + $groups = $ranges->getGroups(); + foreach ($groups as $g) { + if ($g['Prefix'] <> $productCode . '-' . $countryCode) { + continue; + } + + $rules = $g['Rules']['Rule']; + $agency = $g['Agency']; + + // Select the right rule + foreach ($rules as $rule) { + + // Get min and max value in range + // and trim values to match code length + $range = explode('-', $rule['Range']); + $min = substr($range[0], 0, $inputLength); + $max = substr($range[1], 0, $inputLength); + + // If first 7 digits is smaller than min + // or greater than max, continue to next rule + if ($first7 < $min || $first7 > $max) { + continue; + } + + $length = $rule['Length']; + + $publisherCode = substr($input, 0, $length); + $publicationCode = substr($input, $length); + + return [$agency, $publisherCode, $publicationCode]; + } + break; + } + } +} diff --git a/vendor/biblys/isbn/src/Biblys/Isbn/Ranges.php b/vendor/biblys/isbn/src/Biblys/Isbn/Ranges.php new file mode 100644 index 0000000..4befa1c --- /dev/null +++ b/vendor/biblys/isbn/src/Biblys/Isbn/Ranges.php @@ -0,0 +1,35 @@ +prefixes = $prefixes; + $this->groups = $groups; + } + + public function getPrefixes() + { + return $this->prefixes; + } + + public function getGroups() + { + return $this->groups; + } +} diff --git a/vendor/biblys/isbn/src/Biblys/Isbn/ranges-array.php b/vendor/biblys/isbn/src/Biblys/Isbn/ranges-array.php new file mode 100644 index 0000000..2b70682 --- /dev/null +++ b/vendor/biblys/isbn/src/Biblys/Isbn/ranges-array.php @@ -0,0 +1,9938 @@ + + array ( + 'Prefix' => '978-0', + 'Agency' => 'English language', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '2000000-2279999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '2280000-2289999', + 'Length' => '4', + ), + 3 => + array ( + 'Range' => '2290000-3689999', + 'Length' => '3', + ), + 4 => + array ( + 'Range' => '3690000-3699999', + 'Length' => '4', + ), + 5 => + array ( + 'Range' => '3700000-6389999', + 'Length' => '3', + ), + 6 => + array ( + 'Range' => '6390000-6397999', + 'Length' => '4', + ), + 7 => + array ( + 'Range' => '6398000-6399999', + 'Length' => '7', + ), + 8 => + array ( + 'Range' => '6400000-6449999', + 'Length' => '3', + ), + 9 => + array ( + 'Range' => '6450000-6459999', + 'Length' => '7', + ), + 10 => + array ( + 'Range' => '6460000-6479999', + 'Length' => '3', + ), + 11 => + array ( + 'Range' => '6480000-6489999', + 'Length' => '7', + ), + 12 => + array ( + 'Range' => '6490000-6549999', + 'Length' => '3', + ), + 13 => + array ( + 'Range' => '6550000-6559999', + 'Length' => '4', + ), + 14 => + array ( + 'Range' => '6560000-6999999', + 'Length' => '3', + ), + 15 => + array ( + 'Range' => '7000000-8499999', + 'Length' => '4', + ), + 16 => + array ( + 'Range' => '8500000-8999999', + 'Length' => '5', + ), + 17 => + array ( + 'Range' => '9000000-9499999', + 'Length' => '6', + ), + 18 => + array ( + 'Range' => '9500000-9999999', + 'Length' => '7', + ), + ), + ), + ), + 1 => + array ( + 'Prefix' => '978-1', + 'Agency' => 'English language', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0099999', + 'Length' => '3', + ), + 1 => + array ( + 'Range' => '0100000-0299999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '0300000-0349999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '0350000-0399999', + 'Length' => '4', + ), + 4 => + array ( + 'Range' => '0400000-0699999', + 'Length' => '2', + ), + 5 => + array ( + 'Range' => '0700000-0999999', + 'Length' => '4', + ), + 6 => + array ( + 'Range' => '1000000-3979999', + 'Length' => '3', + ), + 7 => + array ( + 'Range' => '3980000-5499999', + 'Length' => '4', + ), + 8 => + array ( + 'Range' => '5500000-6499999', + 'Length' => '5', + ), + 9 => + array ( + 'Range' => '6500000-6799999', + 'Length' => '4', + ), + 10 => + array ( + 'Range' => '6800000-6859999', + 'Length' => '5', + ), + 11 => + array ( + 'Range' => '6860000-7139999', + 'Length' => '4', + ), + 12 => + array ( + 'Range' => '7140000-7169999', + 'Length' => '3', + ), + 13 => + array ( + 'Range' => '7170000-7319999', + 'Length' => '4', + ), + 14 => + array ( + 'Range' => '7320000-7399999', + 'Length' => '7', + ), + 15 => + array ( + 'Range' => '7400000-7749999', + 'Length' => '5', + ), + 16 => + array ( + 'Range' => '7750000-7753999', + 'Length' => '7', + ), + 17 => + array ( + 'Range' => '7754000-7763999', + 'Length' => '5', + ), + 18 => + array ( + 'Range' => '7764000-7764999', + 'Length' => '7', + ), + 19 => + array ( + 'Range' => '7765000-7769999', + 'Length' => '5', + ), + 20 => + array ( + 'Range' => '7770000-7776999', + 'Length' => '7', + ), + 21 => + array ( + 'Range' => '7777000-7899999', + 'Length' => '5', + ), + 22 => + array ( + 'Range' => '7900000-7999999', + 'Length' => '4', + ), + 23 => + array ( + 'Range' => '8000000-8004999', + 'Length' => '5', + ), + 24 => + array ( + 'Range' => '8005000-8049999', + 'Length' => '5', + ), + 25 => + array ( + 'Range' => '8050000-8379999', + 'Length' => '5', + ), + 26 => + array ( + 'Range' => '8380000-8384999', + 'Length' => '7', + ), + 27 => + array ( + 'Range' => '8385000-8671999', + 'Length' => '5', + ), + 28 => + array ( + 'Range' => '8672000-8675999', + 'Length' => '4', + ), + 29 => + array ( + 'Range' => '8676000-8697999', + 'Length' => '5', + ), + 30 => + array ( + 'Range' => '8698000-9159999', + 'Length' => '6', + ), + 31 => + array ( + 'Range' => '9160000-9165059', + 'Length' => '7', + ), + 32 => + array ( + 'Range' => '9165060-9729999', + 'Length' => '6', + ), + 33 => + array ( + 'Range' => '9730000-9877999', + 'Length' => '4', + ), + 34 => + array ( + 'Range' => '9878000-9911499', + 'Length' => '6', + ), + 35 => + array ( + 'Range' => '9911500-9911999', + 'Length' => '7', + ), + 36 => + array ( + 'Range' => '9912000-9989899', + 'Length' => '6', + ), + 37 => + array ( + 'Range' => '9989900-9999999', + 'Length' => '7', + ), + ), + ), + ), + 2 => + array ( + 'Prefix' => '978-2', + 'Agency' => 'French language', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '2000000-3499999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '3500000-3999999', + 'Length' => '5', + ), + 3 => + array ( + 'Range' => '4000000-4899999', + 'Length' => '3', + ), + 4 => + array ( + 'Range' => '4900000-4949999', + 'Length' => '6', + ), + 5 => + array ( + 'Range' => '4950000-4959999', + 'Length' => '3', + ), + 6 => + array ( + 'Range' => '4960000-4966999', + 'Length' => '4', + ), + 7 => + array ( + 'Range' => '4967000-4969999', + 'Length' => '5', + ), + 8 => + array ( + 'Range' => '4970000-6999999', + 'Length' => '3', + ), + 9 => + array ( + 'Range' => '7000000-8399999', + 'Length' => '4', + ), + 10 => + array ( + 'Range' => '8400000-8999999', + 'Length' => '5', + ), + 11 => + array ( + 'Range' => '9000000-9197999', + 'Length' => '6', + ), + 12 => + array ( + 'Range' => '9198000-9198099', + 'Length' => '5', + ), + 13 => + array ( + 'Range' => '9198100-9199429', + 'Length' => '6', + ), + 14 => + array ( + 'Range' => '9199430-9199689', + 'Length' => '7', + ), + 15 => + array ( + 'Range' => '9199690-9499999', + 'Length' => '6', + ), + 16 => + array ( + 'Range' => '9500000-9999999', + 'Length' => '7', + ), + ), + ), + ), + 3 => + array ( + 'Prefix' => '978-3', + 'Agency' => 'German language', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0299999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '0300000-0339999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '0340000-0369999', + 'Length' => '4', + ), + 3 => + array ( + 'Range' => '0370000-0399999', + 'Length' => '5', + ), + 4 => + array ( + 'Range' => '0400000-1999999', + 'Length' => '2', + ), + 5 => + array ( + 'Range' => '2000000-6999999', + 'Length' => '3', + ), + 6 => + array ( + 'Range' => '7000000-8499999', + 'Length' => '4', + ), + 7 => + array ( + 'Range' => '8500000-8999999', + 'Length' => '5', + ), + 8 => + array ( + 'Range' => '9000000-9499999', + 'Length' => '6', + ), + 9 => + array ( + 'Range' => '9500000-9539999', + 'Length' => '7', + ), + 10 => + array ( + 'Range' => '9540000-9699999', + 'Length' => '5', + ), + 11 => + array ( + 'Range' => '9700000-9849999', + 'Length' => '7', + ), + 12 => + array ( + 'Range' => '9850000-9999999', + 'Length' => '5', + ), + ), + ), + ), + 4 => + array ( + 'Prefix' => '978-4', + 'Agency' => 'Japan', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '2000000-6999999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '7000000-8499999', + 'Length' => '4', + ), + 3 => + array ( + 'Range' => '8500000-8999999', + 'Length' => '5', + ), + 4 => + array ( + 'Range' => '9000000-9499999', + 'Length' => '6', + ), + 5 => + array ( + 'Range' => '9500000-9999999', + 'Length' => '7', + ), + ), + ), + ), + 5 => + array ( + 'Prefix' => '978-5', + 'Agency' => 'former U.S.S.R', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0049999', + 'Length' => '5', + ), + 1 => + array ( + 'Range' => '0050000-0099999', + 'Length' => '4', + ), + 2 => + array ( + 'Range' => '0100000-1999999', + 'Length' => '2', + ), + 3 => + array ( + 'Range' => '2000000-4209999', + 'Length' => '3', + ), + 4 => + array ( + 'Range' => '4210000-4299999', + 'Length' => '4', + ), + 5 => + array ( + 'Range' => '4300000-4309999', + 'Length' => '3', + ), + 6 => + array ( + 'Range' => '4310000-4399999', + 'Length' => '4', + ), + 7 => + array ( + 'Range' => '4400000-4409999', + 'Length' => '3', + ), + 8 => + array ( + 'Range' => '4410000-4499999', + 'Length' => '4', + ), + 9 => + array ( + 'Range' => '4500000-6039999', + 'Length' => '3', + ), + 10 => + array ( + 'Range' => '6040000-6049999', + 'Length' => '7', + ), + 11 => + array ( + 'Range' => '6050000-6999999', + 'Length' => '3', + ), + 12 => + array ( + 'Range' => '7000000-8499999', + 'Length' => '4', + ), + 13 => + array ( + 'Range' => '8500000-8999999', + 'Length' => '5', + ), + 14 => + array ( + 'Range' => '9000000-9099999', + 'Length' => '6', + ), + 15 => + array ( + 'Range' => '9100000-9199999', + 'Length' => '5', + ), + 16 => + array ( + 'Range' => '9200000-9299999', + 'Length' => '4', + ), + 17 => + array ( + 'Range' => '9300000-9499999', + 'Length' => '5', + ), + 18 => + array ( + 'Range' => '9500000-9500999', + 'Length' => '7', + ), + 19 => + array ( + 'Range' => '9501000-9799999', + 'Length' => '4', + ), + 20 => + array ( + 'Range' => '9800000-9899999', + 'Length' => '5', + ), + 21 => + array ( + 'Range' => '9900000-9909999', + 'Length' => '7', + ), + 22 => + array ( + 'Range' => '9910000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 6 => + array ( + 'Prefix' => '978-600', + 'Agency' => 'Iran', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '1000000-4999999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '5000000-8999999', + 'Length' => '4', + ), + 3 => + array ( + 'Range' => '9000000-9867999', + 'Length' => '5', + ), + 4 => + array ( + 'Range' => '9868000-9929999', + 'Length' => '4', + ), + 5 => + array ( + 'Range' => '9930000-9959999', + 'Length' => '3', + ), + 6 => + array ( + 'Range' => '9960000-9999999', + 'Length' => '5', + ), + ), + ), + ), + 7 => + array ( + 'Prefix' => '978-601', + 'Agency' => 'Kazakhstan', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '2000000-6999999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '7000000-7999999', + 'Length' => '4', + ), + 3 => + array ( + 'Range' => '8000000-8499999', + 'Length' => '5', + ), + 4 => + array ( + 'Range' => '8500000-9999999', + 'Length' => '2', + ), + ), + ), + ), + 8 => + array ( + 'Prefix' => '978-602', + 'Agency' => 'Indonesia', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0699999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '0700000-1399999', + 'Length' => '4', + ), + 2 => + array ( + 'Range' => '1400000-1499999', + 'Length' => '5', + ), + 3 => + array ( + 'Range' => '1500000-1699999', + 'Length' => '4', + ), + 4 => + array ( + 'Range' => '1700000-1999999', + 'Length' => '5', + ), + 5 => + array ( + 'Range' => '2000000-4999999', + 'Length' => '3', + ), + 6 => + array ( + 'Range' => '5000000-5399999', + 'Length' => '5', + ), + 7 => + array ( + 'Range' => '5400000-5999999', + 'Length' => '4', + ), + 8 => + array ( + 'Range' => '6000000-6199999', + 'Length' => '5', + ), + 9 => + array ( + 'Range' => '6200000-6999999', + 'Length' => '4', + ), + 10 => + array ( + 'Range' => '7000000-7499999', + 'Length' => '5', + ), + 11 => + array ( + 'Range' => '7500000-9499999', + 'Length' => '4', + ), + 12 => + array ( + 'Range' => '9500000-9999999', + 'Length' => '5', + ), + ), + ), + ), + 9 => + array ( + 'Prefix' => '978-603', + 'Agency' => 'Saudi Arabia', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0499999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '0500000-4999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '5000000-7999999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '8000000-8999999', + 'Length' => '4', + ), + 4 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '5', + ), + ), + ), + ), + 10 => + array ( + 'Prefix' => '978-604', + 'Agency' => 'Vietnam', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-4999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '5000000-8999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '9000000-9799999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '9800000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 11 => + array ( + 'Prefix' => '978-605', + 'Agency' => 'Turkey', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0299999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '0300000-0399999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '0400000-0599999', + 'Length' => '2', + ), + 3 => + array ( + 'Range' => '0600000-0699999', + 'Length' => '5', + ), + 4 => + array ( + 'Range' => '0700000-0999999', + 'Length' => '2', + ), + 5 => + array ( + 'Range' => '1000000-1999999', + 'Length' => '3', + ), + 6 => + array ( + 'Range' => '2000000-2399999', + 'Length' => '4', + ), + 7 => + array ( + 'Range' => '2400000-3999999', + 'Length' => '3', + ), + 8 => + array ( + 'Range' => '4000000-5999999', + 'Length' => '4', + ), + 9 => + array ( + 'Range' => '6000000-7499999', + 'Length' => '5', + ), + 10 => + array ( + 'Range' => '7500000-7999999', + 'Length' => '4', + ), + 11 => + array ( + 'Range' => '8000000-8999999', + 'Length' => '5', + ), + 12 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 12 => + array ( + 'Prefix' => '978-606', + 'Agency' => 'Romania', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0899999', + 'Length' => '3', + ), + 1 => + array ( + 'Range' => '0900000-4999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '5000000-7999999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '8000000-9099999', + 'Length' => '4', + ), + 4 => + array ( + 'Range' => '9100000-9199999', + 'Length' => '3', + ), + 5 => + array ( + 'Range' => '9200000-9649999', + 'Length' => '5', + ), + 6 => + array ( + 'Range' => '9650000-9749999', + 'Length' => '4', + ), + 7 => + array ( + 'Range' => '9750000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 13 => + array ( + 'Prefix' => '978-607', + 'Agency' => 'Mexico', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-3999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '4000000-7499999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '7500000-9499999', + 'Length' => '4', + ), + 3 => + array ( + 'Range' => '9500000-9999999', + 'Length' => '5', + ), + ), + ), + ), + 14 => + array ( + 'Prefix' => '978-608', + 'Agency' => 'North Macedonia', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '1000000-1999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '2000000-4499999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '4500000-6499999', + 'Length' => '4', + ), + 4 => + array ( + 'Range' => '6500000-6999999', + 'Length' => '5', + ), + 5 => + array ( + 'Range' => '7000000-9999999', + 'Length' => '1', + ), + ), + ), + ), + 15 => + array ( + 'Prefix' => '978-609', + 'Agency' => 'Lithuania', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-3999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '4000000-7999999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '8000000-9499999', + 'Length' => '4', + ), + 3 => + array ( + 'Range' => '9500000-9999999', + 'Length' => '5', + ), + ), + ), + ), + 16 => + array ( + 'Prefix' => '978-611', + 'Agency' => 'Thailand', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-9999999', + 'Length' => '0', + ), + ), + ), + ), + 17 => + array ( + 'Prefix' => '978-612', + 'Agency' => 'Peru', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-2999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '3000000-3999999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '4000000-4499999', + 'Length' => '4', + ), + 3 => + array ( + 'Range' => '4500000-4999999', + 'Length' => '5', + ), + 4 => + array ( + 'Range' => '5000000-5149999', + 'Length' => '4', + ), + 5 => + array ( + 'Range' => '5150000-9999999', + 'Length' => '0', + ), + ), + ), + ), + 18 => + array ( + 'Prefix' => '978-613', + 'Agency' => 'Mauritius', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-9999999', + 'Length' => '1', + ), + ), + ), + ), + 19 => + array ( + 'Prefix' => '978-614', + 'Agency' => 'Lebanon', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-3999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '4000000-7999999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '8000000-9499999', + 'Length' => '4', + ), + 3 => + array ( + 'Range' => '9500000-9999999', + 'Length' => '5', + ), + ), + ), + ), + 20 => + array ( + 'Prefix' => '978-615', + 'Agency' => 'Hungary', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '1000000-4999999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '5000000-7999999', + 'Length' => '4', + ), + 3 => + array ( + 'Range' => '8000000-8999999', + 'Length' => '5', + ), + 4 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '0', + ), + ), + ), + ), + 21 => + array ( + 'Prefix' => '978-616', + 'Agency' => 'Thailand', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '2000000-6999999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '7000000-8999999', + 'Length' => '4', + ), + 3 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '5', + ), + ), + ), + ), + 22 => + array ( + 'Prefix' => '978-617', + 'Agency' => 'Ukraine', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-4999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '5000000-6999999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '7000000-8999999', + 'Length' => '4', + ), + 3 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '5', + ), + ), + ), + ), + 23 => + array ( + 'Prefix' => '978-618', + 'Agency' => 'Greece', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '2000000-4999999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '5000000-7999999', + 'Length' => '4', + ), + 3 => + array ( + 'Range' => '8000000-9999999', + 'Length' => '5', + ), + ), + ), + ), + 24 => + array ( + 'Prefix' => '978-619', + 'Agency' => 'Bulgaria', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1499999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '1500000-6999999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '7000000-8999999', + 'Length' => '4', + ), + 3 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '5', + ), + ), + ), + ), + 25 => + array ( + 'Prefix' => '978-620', + 'Agency' => 'Mauritius', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-9999999', + 'Length' => '1', + ), + ), + ), + ), + 26 => + array ( + 'Prefix' => '978-621', + 'Agency' => 'Philippines', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-2999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '3000000-3999999', + 'Length' => '0', + ), + 2 => + array ( + 'Range' => '4000000-5999999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '6000000-7999999', + 'Length' => '0', + ), + 4 => + array ( + 'Range' => '8000000-8999999', + 'Length' => '4', + ), + 5 => + array ( + 'Range' => '9000000-9499999', + 'Length' => '0', + ), + 6 => + array ( + 'Range' => '9500000-9999999', + 'Length' => '5', + ), + ), + ), + ), + 27 => + array ( + 'Prefix' => '978-622', + 'Agency' => 'Iran', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0899999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '0900000-1999999', + 'Length' => '0', + ), + 2 => + array ( + 'Range' => '2000000-2999999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '3000000-5999999', + 'Length' => '0', + ), + 4 => + array ( + 'Range' => '6000000-7999999', + 'Length' => '4', + ), + 5 => + array ( + 'Range' => '8000000-9499999', + 'Length' => '0', + ), + 6 => + array ( + 'Range' => '9500000-9999999', + 'Length' => '5', + ), + ), + ), + ), + 28 => + array ( + 'Prefix' => '978-623', + 'Agency' => 'Indonesia', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '1000000-1999999', + 'Length' => '0', + ), + 2 => + array ( + 'Range' => '2000000-3999999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '4000000-5999999', + 'Length' => '0', + ), + 4 => + array ( + 'Range' => '6000000-7999999', + 'Length' => '4', + ), + 5 => + array ( + 'Range' => '8000000-8999999', + 'Length' => '0', + ), + 6 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '5', + ), + ), + ), + ), + 29 => + array ( + 'Prefix' => '978-624', + 'Agency' => 'Sri Lanka', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0499999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '0500000-1999999', + 'Length' => '0', + ), + 2 => + array ( + 'Range' => '2000000-2499999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '2500000-4999999', + 'Length' => '0', + ), + 4 => + array ( + 'Range' => '5000000-5999999', + 'Length' => '4', + ), + 5 => + array ( + 'Range' => '6000000-9499999', + 'Length' => '0', + ), + 6 => + array ( + 'Range' => '9500000-9999999', + 'Length' => '5', + ), + ), + ), + ), + 30 => + array ( + 'Prefix' => '978-625', + 'Agency' => 'Turkey', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0099999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '0100000-3999999', + 'Length' => '0', + ), + 2 => + array ( + 'Range' => '4000000-4499999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '4500000-6999999', + 'Length' => '0', + ), + 4 => + array ( + 'Range' => '7000000-7999999', + 'Length' => '4', + ), + 5 => + array ( + 'Range' => '8000000-9999999', + 'Length' => '0', + ), + ), + ), + ), + 31 => + array ( + 'Prefix' => '978-626', + 'Agency' => 'Taiwan', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0499999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '0500000-2999999', + 'Length' => '0', + ), + 2 => + array ( + 'Range' => '3000000-4999999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '5000000-6999999', + 'Length' => '0', + ), + 4 => + array ( + 'Range' => '7000000-7999999', + 'Length' => '4', + ), + 5 => + array ( + 'Range' => '8000000-9499999', + 'Length' => '0', + ), + 6 => + array ( + 'Range' => '9500000-9999999', + 'Length' => '5', + ), + ), + ), + ), + 32 => + array ( + 'Prefix' => '978-65', + 'Agency' => 'Brazil', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0199999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '0200000-2499999', + 'Length' => '0', + ), + 2 => + array ( + 'Range' => '2500000-2999999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '3000000-3029999', + 'Length' => '3', + ), + 4 => + array ( + 'Range' => '3030000-4999999', + 'Length' => '0', + ), + 5 => + array ( + 'Range' => '5000000-5129999', + 'Length' => '4', + ), + 6 => + array ( + 'Range' => '5130000-5499999', + 'Length' => '0', + ), + 7 => + array ( + 'Range' => '5500000-5999999', + 'Length' => '4', + ), + 8 => + array ( + 'Range' => '6000000-7999999', + 'Length' => '0', + ), + 9 => + array ( + 'Range' => '8000000-8182499', + 'Length' => '5', + ), + 10 => + array ( + 'Range' => '8182500-8599999', + 'Length' => '0', + ), + 11 => + array ( + 'Range' => '8600000-8999999', + 'Length' => '5', + ), + 12 => + array ( + 'Range' => '9000000-9024499', + 'Length' => '6', + ), + 13 => + array ( + 'Range' => '9024500-9899999', + 'Length' => '0', + ), + 14 => + array ( + 'Range' => '9900000-9999999', + 'Length' => '6', + ), + ), + ), + ), + 33 => + array ( + 'Prefix' => '978-7', + 'Agency' => 'China, People\'s Republic', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '1000000-4999999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '5000000-7999999', + 'Length' => '4', + ), + 3 => + array ( + 'Range' => '8000000-8999999', + 'Length' => '5', + ), + 4 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '6', + ), + ), + ), + ), + 34 => + array ( + 'Prefix' => '978-80', + 'Agency' => 'former Czechoslovakia', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '2000000-6999999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '7000000-8499999', + 'Length' => '4', + ), + 3 => + array ( + 'Range' => '8500000-8999999', + 'Length' => '5', + ), + 4 => + array ( + 'Range' => '9000000-9989999', + 'Length' => '6', + ), + 5 => + array ( + 'Range' => '9990000-9999999', + 'Length' => '5', + ), + ), + ), + ), + 35 => + array ( + 'Prefix' => '978-81', + 'Agency' => 'India', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '2000000-6999999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '7000000-8499999', + 'Length' => '4', + ), + 3 => + array ( + 'Range' => '8500000-8999999', + 'Length' => '5', + ), + 4 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '6', + ), + ), + ), + ), + 36 => + array ( + 'Prefix' => '978-82', + 'Agency' => 'Norway', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '2000000-6899999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '6900000-6999999', + 'Length' => '6', + ), + 3 => + array ( + 'Range' => '7000000-8999999', + 'Length' => '4', + ), + 4 => + array ( + 'Range' => '9000000-9899999', + 'Length' => '5', + ), + 5 => + array ( + 'Range' => '9900000-9999999', + 'Length' => '6', + ), + ), + ), + ), + 37 => + array ( + 'Prefix' => '978-83', + 'Agency' => 'Poland', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '2000000-5999999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '6000000-6999999', + 'Length' => '5', + ), + 3 => + array ( + 'Range' => '7000000-8499999', + 'Length' => '4', + ), + 4 => + array ( + 'Range' => '8500000-8999999', + 'Length' => '5', + ), + 5 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '6', + ), + ), + ), + ), + 38 => + array ( + 'Prefix' => '978-84', + 'Agency' => 'Spain', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1099999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '1100000-1199999', + 'Length' => '4', + ), + 2 => + array ( + 'Range' => '1200000-1299999', + 'Length' => '6', + ), + 3 => + array ( + 'Range' => '1300000-1399999', + 'Length' => '4', + ), + 4 => + array ( + 'Range' => '1400000-1499999', + 'Length' => '3', + ), + 5 => + array ( + 'Range' => '1500000-1999999', + 'Length' => '5', + ), + 6 => + array ( + 'Range' => '2000000-6999999', + 'Length' => '3', + ), + 7 => + array ( + 'Range' => '7000000-8499999', + 'Length' => '4', + ), + 8 => + array ( + 'Range' => '8500000-8999999', + 'Length' => '5', + ), + 9 => + array ( + 'Range' => '9000000-9199999', + 'Length' => '4', + ), + 10 => + array ( + 'Range' => '9200000-9239999', + 'Length' => '6', + ), + 11 => + array ( + 'Range' => '9240000-9299999', + 'Length' => '5', + ), + 12 => + array ( + 'Range' => '9300000-9499999', + 'Length' => '6', + ), + 13 => + array ( + 'Range' => '9500000-9699999', + 'Length' => '5', + ), + 14 => + array ( + 'Range' => '9700000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 39 => + array ( + 'Prefix' => '978-85', + 'Agency' => 'Brazil', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '2000000-4549999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '4550000-4552999', + 'Length' => '6', + ), + 3 => + array ( + 'Range' => '4553000-4559999', + 'Length' => '5', + ), + 4 => + array ( + 'Range' => '4560000-5289999', + 'Length' => '3', + ), + 5 => + array ( + 'Range' => '5290000-5319999', + 'Length' => '5', + ), + 6 => + array ( + 'Range' => '5320000-5339999', + 'Length' => '4', + ), + 7 => + array ( + 'Range' => '5340000-5399999', + 'Length' => '3', + ), + 8 => + array ( + 'Range' => '5400000-5402999', + 'Length' => '5', + ), + 9 => + array ( + 'Range' => '5403000-5403999', + 'Length' => '5', + ), + 10 => + array ( + 'Range' => '5404000-5404999', + 'Length' => '6', + ), + 11 => + array ( + 'Range' => '5405000-5408999', + 'Length' => '5', + ), + 12 => + array ( + 'Range' => '5409000-5409999', + 'Length' => '6', + ), + 13 => + array ( + 'Range' => '5410000-5439999', + 'Length' => '5', + ), + 14 => + array ( + 'Range' => '5440000-5479999', + 'Length' => '4', + ), + 15 => + array ( + 'Range' => '5480000-5499999', + 'Length' => '5', + ), + 16 => + array ( + 'Range' => '5500000-5999999', + 'Length' => '4', + ), + 17 => + array ( + 'Range' => '6000000-6999999', + 'Length' => '5', + ), + 18 => + array ( + 'Range' => '7000000-8499999', + 'Length' => '4', + ), + 19 => + array ( + 'Range' => '8500000-8999999', + 'Length' => '5', + ), + 20 => + array ( + 'Range' => '9000000-9249999', + 'Length' => '6', + ), + 21 => + array ( + 'Range' => '9250000-9449999', + 'Length' => '5', + ), + 22 => + array ( + 'Range' => '9450000-9599999', + 'Length' => '4', + ), + 23 => + array ( + 'Range' => '9600000-9799999', + 'Length' => '2', + ), + 24 => + array ( + 'Range' => '9800000-9999999', + 'Length' => '5', + ), + ), + ), + ), + 40 => + array ( + 'Prefix' => '978-86', + 'Agency' => 'former Yugoslavia', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-2999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '3000000-5999999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '6000000-7999999', + 'Length' => '4', + ), + 3 => + array ( + 'Range' => '8000000-8999999', + 'Length' => '5', + ), + 4 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '6', + ), + ), + ), + ), + 41 => + array ( + 'Prefix' => '978-87', + 'Agency' => 'Denmark', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-2999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '3000000-3999999', + 'Length' => '0', + ), + 2 => + array ( + 'Range' => '4000000-6499999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '6500000-6999999', + 'Length' => '0', + ), + 4 => + array ( + 'Range' => '7000000-7999999', + 'Length' => '4', + ), + 5 => + array ( + 'Range' => '8000000-8499999', + 'Length' => '0', + ), + 6 => + array ( + 'Range' => '8500000-9499999', + 'Length' => '5', + ), + 7 => + array ( + 'Range' => '9500000-9699999', + 'Length' => '0', + ), + 8 => + array ( + 'Range' => '9700000-9999999', + 'Length' => '6', + ), + ), + ), + ), + 42 => + array ( + 'Prefix' => '978-88', + 'Agency' => 'Italy', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '2000000-3119999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '3120000-3149999', + 'Length' => '5', + ), + 3 => + array ( + 'Range' => '3150000-3189999', + 'Length' => '3', + ), + 4 => + array ( + 'Range' => '3190000-3229999', + 'Length' => '5', + ), + 5 => + array ( + 'Range' => '3230000-3269999', + 'Length' => '3', + ), + 6 => + array ( + 'Range' => '3270000-3389999', + 'Length' => '4', + ), + 7 => + array ( + 'Range' => '3390000-3609999', + 'Length' => '3', + ), + 8 => + array ( + 'Range' => '3610000-3629999', + 'Length' => '4', + ), + 9 => + array ( + 'Range' => '3630000-5489999', + 'Length' => '3', + ), + 10 => + array ( + 'Range' => '5490000-5549999', + 'Length' => '4', + ), + 11 => + array ( + 'Range' => '5550000-5999999', + 'Length' => '3', + ), + 12 => + array ( + 'Range' => '6000000-8499999', + 'Length' => '4', + ), + 13 => + array ( + 'Range' => '8500000-8999999', + 'Length' => '5', + ), + 14 => + array ( + 'Range' => '9000000-9099999', + 'Length' => '6', + ), + 15 => + array ( + 'Range' => '9100000-9269999', + 'Length' => '3', + ), + 16 => + array ( + 'Range' => '9270000-9399999', + 'Length' => '4', + ), + 17 => + array ( + 'Range' => '9400000-9479999', + 'Length' => '6', + ), + 18 => + array ( + 'Range' => '9480000-9999999', + 'Length' => '5', + ), + ), + ), + ), + 43 => + array ( + 'Prefix' => '978-89', + 'Agency' => 'Korea, Republic', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-2499999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '2500000-5499999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '5500000-8499999', + 'Length' => '4', + ), + 3 => + array ( + 'Range' => '8500000-9499999', + 'Length' => '5', + ), + 4 => + array ( + 'Range' => '9500000-9699999', + 'Length' => '6', + ), + 5 => + array ( + 'Range' => '9700000-9899999', + 'Length' => '5', + ), + 6 => + array ( + 'Range' => '9900000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 44 => + array ( + 'Prefix' => '978-90', + 'Agency' => 'Netherlands', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '2000000-4999999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '5000000-6999999', + 'Length' => '4', + ), + 3 => + array ( + 'Range' => '7000000-7999999', + 'Length' => '5', + ), + 4 => + array ( + 'Range' => '8000000-8499999', + 'Length' => '6', + ), + 5 => + array ( + 'Range' => '8500000-8999999', + 'Length' => '4', + ), + 6 => + array ( + 'Range' => '9000000-9099999', + 'Length' => '2', + ), + 7 => + array ( + 'Range' => '9100000-9399999', + 'Length' => '0', + ), + 8 => + array ( + 'Range' => '9400000-9499999', + 'Length' => '2', + ), + 9 => + array ( + 'Range' => '9500000-9999999', + 'Length' => '0', + ), + ), + ), + ), + 45 => + array ( + 'Prefix' => '978-91', + 'Agency' => 'Sweden', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '2000000-4999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '5000000-6499999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '6500000-6999999', + 'Length' => '0', + ), + 4 => + array ( + 'Range' => '7000000-8199999', + 'Length' => '4', + ), + 5 => + array ( + 'Range' => '8200000-8499999', + 'Length' => '0', + ), + 6 => + array ( + 'Range' => '8500000-9499999', + 'Length' => '5', + ), + 7 => + array ( + 'Range' => '9500000-9699999', + 'Length' => '0', + ), + 8 => + array ( + 'Range' => '9700000-9999999', + 'Length' => '6', + ), + ), + ), + ), + 46 => + array ( + 'Prefix' => '978-92', + 'Agency' => 'International NGO Publishers and EU Organizations', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-5999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '6000000-7999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '8000000-8999999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '9000000-9499999', + 'Length' => '4', + ), + 4 => + array ( + 'Range' => '9500000-9899999', + 'Length' => '5', + ), + 5 => + array ( + 'Range' => '9900000-9999999', + 'Length' => '6', + ), + ), + ), + ), + 47 => + array ( + 'Prefix' => '978-93', + 'Agency' => 'India', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '1000000-4999999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '5000000-7999999', + 'Length' => '4', + ), + 3 => + array ( + 'Range' => '8000000-9499999', + 'Length' => '5', + ), + 4 => + array ( + 'Range' => '9500000-9999999', + 'Length' => '6', + ), + ), + ), + ), + 48 => + array ( + 'Prefix' => '978-94', + 'Agency' => 'Netherlands', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-5999999', + 'Length' => '3', + ), + 1 => + array ( + 'Range' => '6000000-8999999', + 'Length' => '4', + ), + 2 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '5', + ), + ), + ), + ), + 49 => + array ( + 'Prefix' => '978-950', + 'Agency' => 'Argentina', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-4999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '5000000-8999999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '9000000-9899999', + 'Length' => '4', + ), + 3 => + array ( + 'Range' => '9900000-9999999', + 'Length' => '5', + ), + ), + ), + ), + 50 => + array ( + 'Prefix' => '978-951', + 'Agency' => 'Finland', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '2000000-5499999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '5500000-8899999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '8900000-9499999', + 'Length' => '4', + ), + 4 => + array ( + 'Range' => '9500000-9999999', + 'Length' => '5', + ), + ), + ), + ), + 51 => + array ( + 'Prefix' => '978-952', + 'Agency' => 'Finland', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '2000000-4999999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '5000000-5999999', + 'Length' => '4', + ), + 3 => + array ( + 'Range' => '6000000-6599999', + 'Length' => '2', + ), + 4 => + array ( + 'Range' => '6600000-6699999', + 'Length' => '4', + ), + 5 => + array ( + 'Range' => '6700000-6999999', + 'Length' => '5', + ), + 6 => + array ( + 'Range' => '7000000-7999999', + 'Length' => '4', + ), + 7 => + array ( + 'Range' => '8000000-9499999', + 'Length' => '2', + ), + 8 => + array ( + 'Range' => '9500000-9899999', + 'Length' => '4', + ), + 9 => + array ( + 'Range' => '9900000-9999999', + 'Length' => '5', + ), + ), + ), + ), + 52 => + array ( + 'Prefix' => '978-953', + 'Agency' => 'Croatia ', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '1000000-1499999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '1500000-4799999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '4800000-4999999', + 'Length' => '5', + ), + 4 => + array ( + 'Range' => '5000000-5009999', + 'Length' => '3', + ), + 5 => + array ( + 'Range' => '5010000-5099999', + 'Length' => '5', + ), + 6 => + array ( + 'Range' => '5100000-5499999', + 'Length' => '2', + ), + 7 => + array ( + 'Range' => '5500000-5999999', + 'Length' => '5', + ), + 8 => + array ( + 'Range' => '6000000-9499999', + 'Length' => '4', + ), + 9 => + array ( + 'Range' => '9500000-9999999', + 'Length' => '5', + ), + ), + ), + ), + 53 => + array ( + 'Prefix' => '978-954', + 'Agency' => 'Bulgaria', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-2899999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '2900000-2999999', + 'Length' => '4', + ), + 2 => + array ( + 'Range' => '3000000-7999999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '8000000-8999999', + 'Length' => '4', + ), + 4 => + array ( + 'Range' => '9000000-9299999', + 'Length' => '5', + ), + 5 => + array ( + 'Range' => '9300000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 54 => + array ( + 'Prefix' => '978-955', + 'Agency' => 'Sri Lanka', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1999999', + 'Length' => '4', + ), + 1 => + array ( + 'Range' => '2000000-3399999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '3400000-3549999', + 'Length' => '4', + ), + 3 => + array ( + 'Range' => '3550000-3599999', + 'Length' => '5', + ), + 4 => + array ( + 'Range' => '3600000-3799999', + 'Length' => '4', + ), + 5 => + array ( + 'Range' => '3800000-3899999', + 'Length' => '5', + ), + 6 => + array ( + 'Range' => '3900000-4099999', + 'Length' => '4', + ), + 7 => + array ( + 'Range' => '4100000-4499999', + 'Length' => '5', + ), + 8 => + array ( + 'Range' => '4500000-4999999', + 'Length' => '4', + ), + 9 => + array ( + 'Range' => '5000000-5499999', + 'Length' => '5', + ), + 10 => + array ( + 'Range' => '5500000-7109999', + 'Length' => '3', + ), + 11 => + array ( + 'Range' => '7110000-7149999', + 'Length' => '5', + ), + 12 => + array ( + 'Range' => '7150000-9499999', + 'Length' => '4', + ), + 13 => + array ( + 'Range' => '9500000-9999999', + 'Length' => '5', + ), + ), + ), + ), + 55 => + array ( + 'Prefix' => '978-956', + 'Agency' => 'Chile', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0899999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '0900000-0999999', + 'Length' => '5', + ), + 2 => + array ( + 'Range' => '1000000-1999999', + 'Length' => '2', + ), + 3 => + array ( + 'Range' => '2000000-5999999', + 'Length' => '3', + ), + 4 => + array ( + 'Range' => '6000000-6999999', + 'Length' => '4', + ), + 5 => + array ( + 'Range' => '7000000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 56 => + array ( + 'Prefix' => '978-957', + 'Agency' => 'Taiwan', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0299999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '0300000-0499999', + 'Length' => '4', + ), + 2 => + array ( + 'Range' => '0500000-1999999', + 'Length' => '2', + ), + 3 => + array ( + 'Range' => '2000000-2099999', + 'Length' => '4', + ), + 4 => + array ( + 'Range' => '2100000-2799999', + 'Length' => '2', + ), + 5 => + array ( + 'Range' => '2800000-3099999', + 'Length' => '5', + ), + 6 => + array ( + 'Range' => '3100000-4399999', + 'Length' => '2', + ), + 7 => + array ( + 'Range' => '4400000-8199999', + 'Length' => '3', + ), + 8 => + array ( + 'Range' => '8200000-9699999', + 'Length' => '4', + ), + 9 => + array ( + 'Range' => '9700000-9999999', + 'Length' => '5', + ), + ), + ), + ), + 57 => + array ( + 'Prefix' => '978-958', + 'Agency' => 'Colombia', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-4899999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '4900000-5099999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '5100000-5199999', + 'Length' => '4', + ), + 3 => + array ( + 'Range' => '5200000-5399999', + 'Length' => '5', + ), + 4 => + array ( + 'Range' => '5400000-5599999', + 'Length' => '4', + ), + 5 => + array ( + 'Range' => '5600000-5999999', + 'Length' => '5', + ), + 6 => + array ( + 'Range' => '6000000-7999999', + 'Length' => '3', + ), + 7 => + array ( + 'Range' => '8000000-9499999', + 'Length' => '4', + ), + 8 => + array ( + 'Range' => '9500000-9999999', + 'Length' => '5', + ), + ), + ), + ), + 58 => + array ( + 'Prefix' => '978-959', + 'Agency' => 'Cuba', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '2000000-6999999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '7000000-8499999', + 'Length' => '4', + ), + 3 => + array ( + 'Range' => '8500000-9999999', + 'Length' => '5', + ), + ), + ), + ), + 59 => + array ( + 'Prefix' => '978-960', + 'Agency' => 'Greece', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '2000000-6599999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '6600000-6899999', + 'Length' => '4', + ), + 3 => + array ( + 'Range' => '6900000-6999999', + 'Length' => '3', + ), + 4 => + array ( + 'Range' => '7000000-8499999', + 'Length' => '4', + ), + 5 => + array ( + 'Range' => '8500000-9299999', + 'Length' => '5', + ), + 6 => + array ( + 'Range' => '9300000-9399999', + 'Length' => '2', + ), + 7 => + array ( + 'Range' => '9400000-9799999', + 'Length' => '4', + ), + 8 => + array ( + 'Range' => '9800000-9999999', + 'Length' => '5', + ), + ), + ), + ), + 60 => + array ( + 'Prefix' => '978-961', + 'Agency' => 'Slovenia', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '2000000-5999999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '6000000-8999999', + 'Length' => '4', + ), + 3 => + array ( + 'Range' => '9000000-9599999', + 'Length' => '5', + ), + 4 => + array ( + 'Range' => '9600000-9999999', + 'Length' => '0', + ), + ), + ), + ), + 61 => + array ( + 'Prefix' => '978-962', + 'Agency' => 'Hong Kong, China', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '2000000-6999999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '7000000-8499999', + 'Length' => '4', + ), + 3 => + array ( + 'Range' => '8500000-8699999', + 'Length' => '5', + ), + 4 => + array ( + 'Range' => '8700000-8999999', + 'Length' => '4', + ), + 5 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 62 => + array ( + 'Prefix' => '978-963', + 'Agency' => 'Hungary', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '2000000-6999999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '7000000-8499999', + 'Length' => '4', + ), + 3 => + array ( + 'Range' => '8500000-8999999', + 'Length' => '5', + ), + 4 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 63 => + array ( + 'Prefix' => '978-964', + 'Agency' => 'Iran', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1499999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '1500000-2499999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '2500000-2999999', + 'Length' => '4', + ), + 3 => + array ( + 'Range' => '3000000-5499999', + 'Length' => '3', + ), + 4 => + array ( + 'Range' => '5500000-8999999', + 'Length' => '4', + ), + 5 => + array ( + 'Range' => '9000000-9699999', + 'Length' => '5', + ), + 6 => + array ( + 'Range' => '9700000-9899999', + 'Length' => '3', + ), + 7 => + array ( + 'Range' => '9900000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 64 => + array ( + 'Prefix' => '978-965', + 'Agency' => 'Israel', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '2000000-5999999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '6000000-6999999', + 'Length' => '0', + ), + 3 => + array ( + 'Range' => '7000000-7999999', + 'Length' => '4', + ), + 4 => + array ( + 'Range' => '8000000-8999999', + 'Length' => '0', + ), + 5 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '5', + ), + ), + ), + ), + 65 => + array ( + 'Prefix' => '978-966', + 'Agency' => 'Ukraine', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1299999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '1300000-1399999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '1400000-1499999', + 'Length' => '2', + ), + 3 => + array ( + 'Range' => '1500000-1699999', + 'Length' => '4', + ), + 4 => + array ( + 'Range' => '1700000-1999999', + 'Length' => '3', + ), + 5 => + array ( + 'Range' => '2000000-2789999', + 'Length' => '4', + ), + 6 => + array ( + 'Range' => '2790000-2899999', + 'Length' => '3', + ), + 7 => + array ( + 'Range' => '2900000-2999999', + 'Length' => '4', + ), + 8 => + array ( + 'Range' => '3000000-6999999', + 'Length' => '3', + ), + 9 => + array ( + 'Range' => '7000000-8999999', + 'Length' => '4', + ), + 10 => + array ( + 'Range' => '9000000-9099999', + 'Length' => '5', + ), + 11 => + array ( + 'Range' => '9100000-9499999', + 'Length' => '3', + ), + 12 => + array ( + 'Range' => '9500000-9799999', + 'Length' => '5', + ), + 13 => + array ( + 'Range' => '9800000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 66 => + array ( + 'Prefix' => '978-967', + 'Agency' => 'Malaysia', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0099999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '0100000-0999999', + 'Length' => '4', + ), + 2 => + array ( + 'Range' => '1000000-1999999', + 'Length' => '5', + ), + 3 => + array ( + 'Range' => '2000000-2499999', + 'Length' => '4', + ), + 4 => + array ( + 'Range' => '2500000-2549999', + 'Length' => '3', + ), + 5 => + array ( + 'Range' => '2550000-2799999', + 'Length' => '0', + ), + 6 => + array ( + 'Range' => '2800000-2999999', + 'Length' => '4', + ), + 7 => + array ( + 'Range' => '3000000-4999999', + 'Length' => '3', + ), + 8 => + array ( + 'Range' => '5000000-5999999', + 'Length' => '4', + ), + 9 => + array ( + 'Range' => '6000000-8999999', + 'Length' => '2', + ), + 10 => + array ( + 'Range' => '9000000-9899999', + 'Length' => '3', + ), + 11 => + array ( + 'Range' => '9900000-9989999', + 'Length' => '4', + ), + 12 => + array ( + 'Range' => '9990000-9999999', + 'Length' => '5', + ), + ), + ), + ), + 67 => + array ( + 'Prefix' => '978-968', + 'Agency' => 'Mexico', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0100000-3999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '4000000-4999999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '5000000-7999999', + 'Length' => '4', + ), + 3 => + array ( + 'Range' => '8000000-8999999', + 'Length' => '3', + ), + 4 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 68 => + array ( + 'Prefix' => '978-969', + 'Agency' => 'Pakistan', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '2000000-2099999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '2100000-2199999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '2200000-2299999', + 'Length' => '4', + ), + 4 => + array ( + 'Range' => '2300000-2399999', + 'Length' => '5', + ), + 5 => + array ( + 'Range' => '2400000-3999999', + 'Length' => '2', + ), + 6 => + array ( + 'Range' => '4000000-7499999', + 'Length' => '3', + ), + 7 => + array ( + 'Range' => '7500000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 69 => + array ( + 'Prefix' => '978-970', + 'Agency' => 'Mexico', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0100000-5999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '6000000-8999999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '9000000-9099999', + 'Length' => '4', + ), + 3 => + array ( + 'Range' => '9100000-9699999', + 'Length' => '5', + ), + 4 => + array ( + 'Range' => '9700000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 70 => + array ( + 'Prefix' => '978-971', + 'Agency' => 'Philippines', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0159999', + 'Length' => '3', + ), + 1 => + array ( + 'Range' => '0160000-0199999', + 'Length' => '4', + ), + 2 => + array ( + 'Range' => '0200000-0299999', + 'Length' => '2', + ), + 3 => + array ( + 'Range' => '0300000-0599999', + 'Length' => '4', + ), + 4 => + array ( + 'Range' => '0600000-4999999', + 'Length' => '2', + ), + 5 => + array ( + 'Range' => '5000000-8499999', + 'Length' => '3', + ), + 6 => + array ( + 'Range' => '8500000-9099999', + 'Length' => '4', + ), + 7 => + array ( + 'Range' => '9100000-9599999', + 'Length' => '5', + ), + 8 => + array ( + 'Range' => '9600000-9699999', + 'Length' => '4', + ), + 9 => + array ( + 'Range' => '9700000-9899999', + 'Length' => '2', + ), + 10 => + array ( + 'Range' => '9900000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 71 => + array ( + 'Prefix' => '978-972', + 'Agency' => 'Portugal', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '2000000-5499999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '5500000-7999999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '8000000-9499999', + 'Length' => '4', + ), + 4 => + array ( + 'Range' => '9500000-9999999', + 'Length' => '5', + ), + ), + ), + ), + 72 => + array ( + 'Prefix' => '978-973', + 'Agency' => 'Romania', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '1000000-1699999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '1700000-1999999', + 'Length' => '4', + ), + 3 => + array ( + 'Range' => '2000000-5499999', + 'Length' => '2', + ), + 4 => + array ( + 'Range' => '5500000-7599999', + 'Length' => '3', + ), + 5 => + array ( + 'Range' => '7600000-8499999', + 'Length' => '4', + ), + 6 => + array ( + 'Range' => '8500000-8899999', + 'Length' => '5', + ), + 7 => + array ( + 'Range' => '8900000-9499999', + 'Length' => '4', + ), + 8 => + array ( + 'Range' => '9500000-9999999', + 'Length' => '5', + ), + ), + ), + ), + 73 => + array ( + 'Prefix' => '978-974', + 'Agency' => 'Thailand', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '2000000-6999999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '7000000-8499999', + 'Length' => '4', + ), + 3 => + array ( + 'Range' => '8500000-8999999', + 'Length' => '5', + ), + 4 => + array ( + 'Range' => '9000000-9499999', + 'Length' => '5', + ), + 5 => + array ( + 'Range' => '9500000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 74 => + array ( + 'Prefix' => '978-975', + 'Agency' => 'Turkey', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0199999', + 'Length' => '5', + ), + 1 => + array ( + 'Range' => '0200000-2399999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '2400000-2499999', + 'Length' => '4', + ), + 3 => + array ( + 'Range' => '2500000-5999999', + 'Length' => '3', + ), + 4 => + array ( + 'Range' => '6000000-9199999', + 'Length' => '4', + ), + 5 => + array ( + 'Range' => '9200000-9899999', + 'Length' => '5', + ), + 6 => + array ( + 'Range' => '9900000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 75 => + array ( + 'Prefix' => '978-976', + 'Agency' => 'Caribbean Community', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-3999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '4000000-5999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '6000000-7999999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '8000000-9499999', + 'Length' => '4', + ), + 4 => + array ( + 'Range' => '9500000-9999999', + 'Length' => '5', + ), + ), + ), + ), + 76 => + array ( + 'Prefix' => '978-977', + 'Agency' => 'Egypt', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '2000000-4999999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '5000000-6999999', + 'Length' => '4', + ), + 3 => + array ( + 'Range' => '7000000-8499999', + 'Length' => '3', + ), + 4 => + array ( + 'Range' => '8500000-8999999', + 'Length' => '5', + ), + 5 => + array ( + 'Range' => '9000000-9899999', + 'Length' => '2', + ), + 6 => + array ( + 'Range' => '9900000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 77 => + array ( + 'Prefix' => '978-978', + 'Agency' => 'Nigeria', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1999999', + 'Length' => '3', + ), + 1 => + array ( + 'Range' => '2000000-2999999', + 'Length' => '4', + ), + 2 => + array ( + 'Range' => '3000000-7999999', + 'Length' => '5', + ), + 3 => + array ( + 'Range' => '8000000-8999999', + 'Length' => '4', + ), + 4 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 78 => + array ( + 'Prefix' => '978-979', + 'Agency' => 'Indonesia', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0999999', + 'Length' => '3', + ), + 1 => + array ( + 'Range' => '1000000-1499999', + 'Length' => '4', + ), + 2 => + array ( + 'Range' => '1500000-1999999', + 'Length' => '5', + ), + 3 => + array ( + 'Range' => '2000000-2999999', + 'Length' => '2', + ), + 4 => + array ( + 'Range' => '3000000-3999999', + 'Length' => '4', + ), + 5 => + array ( + 'Range' => '4000000-7999999', + 'Length' => '3', + ), + 6 => + array ( + 'Range' => '8000000-9499999', + 'Length' => '4', + ), + 7 => + array ( + 'Range' => '9500000-9999999', + 'Length' => '5', + ), + ), + ), + ), + 79 => + array ( + 'Prefix' => '978-980', + 'Agency' => 'Venezuela', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '2000000-5999999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '6000000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 80 => + array ( + 'Prefix' => '978-981', + 'Agency' => 'Singapore', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1699999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '1700000-1799999', + 'Length' => '5', + ), + 2 => + array ( + 'Range' => '1800000-1999999', + 'Length' => '2', + ), + 3 => + array ( + 'Range' => '2000000-2999999', + 'Length' => '3', + ), + 4 => + array ( + 'Range' => '3000000-3099999', + 'Length' => '4', + ), + 5 => + array ( + 'Range' => '3100000-3999999', + 'Length' => '3', + ), + 6 => + array ( + 'Range' => '4000000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 81 => + array ( + 'Prefix' => '978-982', + 'Agency' => 'South Pacific', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '1000000-6999999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '7000000-8999999', + 'Length' => '2', + ), + 3 => + array ( + 'Range' => '9000000-9799999', + 'Length' => '4', + ), + 4 => + array ( + 'Range' => '9800000-9999999', + 'Length' => '5', + ), + ), + ), + ), + 82 => + array ( + 'Prefix' => '978-983', + 'Agency' => 'Malaysia', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0199999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '0200000-1999999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '2000000-3999999', + 'Length' => '4', + ), + 3 => + array ( + 'Range' => '4000000-4499999', + 'Length' => '5', + ), + 4 => + array ( + 'Range' => '4500000-4999999', + 'Length' => '2', + ), + 5 => + array ( + 'Range' => '5000000-7999999', + 'Length' => '2', + ), + 6 => + array ( + 'Range' => '8000000-8999999', + 'Length' => '3', + ), + 7 => + array ( + 'Range' => '9000000-9899999', + 'Length' => '4', + ), + 8 => + array ( + 'Range' => '9900000-9999999', + 'Length' => '5', + ), + ), + ), + ), + 83 => + array ( + 'Prefix' => '978-984', + 'Agency' => 'Bangladesh', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-3999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '4000000-7999999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '8000000-8999999', + 'Length' => '4', + ), + 3 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '5', + ), + ), + ), + ), + 84 => + array ( + 'Prefix' => '978-985', + 'Agency' => 'Belarus', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-3999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '4000000-5999999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '6000000-8799999', + 'Length' => '4', + ), + 3 => + array ( + 'Range' => '8800000-8999999', + 'Length' => '3', + ), + 4 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '5', + ), + ), + ), + ), + 85 => + array ( + 'Prefix' => '978-986', + 'Agency' => 'Taiwan', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0599999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '0600000-0699999', + 'Length' => '5', + ), + 2 => + array ( + 'Range' => '0700000-0799999', + 'Length' => '4', + ), + 3 => + array ( + 'Range' => '0800000-1199999', + 'Length' => '2', + ), + 4 => + array ( + 'Range' => '1200000-5399999', + 'Length' => '3', + ), + 5 => + array ( + 'Range' => '5400000-7999999', + 'Length' => '4', + ), + 6 => + array ( + 'Range' => '8000000-9999999', + 'Length' => '5', + ), + ), + ), + ), + 86 => + array ( + 'Prefix' => '978-987', + 'Agency' => 'Argentina', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '1000000-1999999', + 'Length' => '4', + ), + 2 => + array ( + 'Range' => '2000000-2999999', + 'Length' => '5', + ), + 3 => + array ( + 'Range' => '3000000-3599999', + 'Length' => '2', + ), + 4 => + array ( + 'Range' => '3600000-3999999', + 'Length' => '4', + ), + 5 => + array ( + 'Range' => '4000000-4199999', + 'Length' => '4', + ), + 6 => + array ( + 'Range' => '4200000-4399999', + 'Length' => '2', + ), + 7 => + array ( + 'Range' => '4400000-4499999', + 'Length' => '4', + ), + 8 => + array ( + 'Range' => '4500000-4899999', + 'Length' => '5', + ), + 9 => + array ( + 'Range' => '4900000-4999999', + 'Length' => '4', + ), + 10 => + array ( + 'Range' => '5000000-8299999', + 'Length' => '3', + ), + 11 => + array ( + 'Range' => '8300000-8499999', + 'Length' => '4', + ), + 12 => + array ( + 'Range' => '8500000-8999999', + 'Length' => '2', + ), + 13 => + array ( + 'Range' => '9000000-9499999', + 'Length' => '4', + ), + 14 => + array ( + 'Range' => '9500000-9999999', + 'Length' => '5', + ), + ), + ), + ), + 87 => + array ( + 'Prefix' => '978-988', + 'Agency' => 'Hong Kong, China', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1199999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '1200000-1999999', + 'Length' => '5', + ), + 2 => + array ( + 'Range' => '2000000-7399999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '7400000-7699999', + 'Length' => '5', + ), + 4 => + array ( + 'Range' => '7700000-7999999', + 'Length' => '5', + ), + 5 => + array ( + 'Range' => '8000000-9699999', + 'Length' => '4', + ), + 6 => + array ( + 'Range' => '9700000-9999999', + 'Length' => '5', + ), + ), + ), + ), + 88 => + array ( + 'Prefix' => '978-989', + 'Agency' => 'Portugal', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '2000000-3499999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '3500000-3699999', + 'Length' => '5', + ), + 3 => + array ( + 'Range' => '3700000-5299999', + 'Length' => '2', + ), + 4 => + array ( + 'Range' => '5300000-5499999', + 'Length' => '5', + ), + 5 => + array ( + 'Range' => '5500000-7999999', + 'Length' => '3', + ), + 6 => + array ( + 'Range' => '8000000-9499999', + 'Length' => '4', + ), + 7 => + array ( + 'Range' => '9500000-9999999', + 'Length' => '5', + ), + ), + ), + ), + 89 => + array ( + 'Prefix' => '978-9914', + 'Agency' => 'Kenya', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-3999999', + 'Length' => '0', + ), + 1 => + array ( + 'Range' => '4000000-4499999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '4500000-6999999', + 'Length' => '0', + ), + 3 => + array ( + 'Range' => '7000000-7499999', + 'Length' => '3', + ), + 4 => + array ( + 'Range' => '7500000-9849999', + 'Length' => '0', + ), + 5 => + array ( + 'Range' => '9850000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 90 => + array ( + 'Prefix' => '978-9915', + 'Agency' => 'Uruguay', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-3999999', + 'Length' => '0', + ), + 1 => + array ( + 'Range' => '4000000-5999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '6000000-6499999', + 'Length' => '0', + ), + 3 => + array ( + 'Range' => '6500000-7999999', + 'Length' => '3', + ), + 4 => + array ( + 'Range' => '8000000-9299999', + 'Length' => '0', + ), + 5 => + array ( + 'Range' => '9300000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 91 => + array ( + 'Prefix' => '978-9916', + 'Agency' => 'Estonia', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '1000000-3999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '4000000-4999999', + 'Length' => '1', + ), + 3 => + array ( + 'Range' => '5000000-5999999', + 'Length' => '0', + ), + 4 => + array ( + 'Range' => '6000000-7499999', + 'Length' => '3', + ), + 5 => + array ( + 'Range' => '7500000-9499999', + 'Length' => '0', + ), + 6 => + array ( + 'Range' => '9500000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 92 => + array ( + 'Prefix' => '978-9917', + 'Agency' => 'Bolivia', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '1000000-2999999', + 'Length' => '0', + ), + 2 => + array ( + 'Range' => '3000000-3499999', + 'Length' => '2', + ), + 3 => + array ( + 'Range' => '3500000-5999999', + 'Length' => '0', + ), + 4 => + array ( + 'Range' => '6000000-6999999', + 'Length' => '3', + ), + 5 => + array ( + 'Range' => '7000000-9799999', + 'Length' => '0', + ), + 6 => + array ( + 'Range' => '9800000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 93 => + array ( + 'Prefix' => '978-9918', + 'Agency' => 'Malta', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '1000000-1999999', + 'Length' => '0', + ), + 2 => + array ( + 'Range' => '2000000-2999999', + 'Length' => '2', + ), + 3 => + array ( + 'Range' => '3000000-5999999', + 'Length' => '0', + ), + 4 => + array ( + 'Range' => '6000000-7999999', + 'Length' => '3', + ), + 5 => + array ( + 'Range' => '8000000-9499999', + 'Length' => '0', + ), + 6 => + array ( + 'Range' => '9500000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 94 => + array ( + 'Prefix' => '978-9919', + 'Agency' => 'Mongolia', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1999999', + 'Length' => '0', + ), + 1 => + array ( + 'Range' => '2000000-2799999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '2800000-4999999', + 'Length' => '0', + ), + 3 => + array ( + 'Range' => '5000000-5999999', + 'Length' => '3', + ), + 4 => + array ( + 'Range' => '6000000-9499999', + 'Length' => '0', + ), + 5 => + array ( + 'Range' => '9500000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 95 => + array ( + 'Prefix' => '978-9920', + 'Agency' => 'Morocco', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-3199999', + 'Length' => '0', + ), + 1 => + array ( + 'Range' => '3200000-3999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '4000000-5499999', + 'Length' => '0', + ), + 3 => + array ( + 'Range' => '5500000-7999999', + 'Length' => '3', + ), + 4 => + array ( + 'Range' => '8000000-8999999', + 'Length' => '0', + ), + 5 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 96 => + array ( + 'Prefix' => '978-9921', + 'Agency' => 'Kuwait', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '1000000-2999999', + 'Length' => '0', + ), + 2 => + array ( + 'Range' => '3000000-3999999', + 'Length' => '2', + ), + 3 => + array ( + 'Range' => '4000000-6999999', + 'Length' => '0', + ), + 4 => + array ( + 'Range' => '7000000-8999999', + 'Length' => '3', + ), + 5 => + array ( + 'Range' => '9000000-9699999', + 'Length' => '0', + ), + 6 => + array ( + 'Range' => '9700000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 97 => + array ( + 'Prefix' => '978-9922', + 'Agency' => 'Iraq', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1999999', + 'Length' => '0', + ), + 1 => + array ( + 'Range' => '2000000-2999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '3000000-5999999', + 'Length' => '0', + ), + 3 => + array ( + 'Range' => '6000000-7999999', + 'Length' => '3', + ), + 4 => + array ( + 'Range' => '8000000-8999999', + 'Length' => '0', + ), + 5 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 98 => + array ( + 'Prefix' => '978-9923', + 'Agency' => 'Jordan', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '1000000-4999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '5000000-6999999', + 'Length' => '0', + ), + 3 => + array ( + 'Range' => '7000000-8999999', + 'Length' => '3', + ), + 4 => + array ( + 'Range' => '9000000-9699999', + 'Length' => '0', + ), + 5 => + array ( + 'Range' => '9700000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 99 => + array ( + 'Prefix' => '978-9924', + 'Agency' => 'Cambodia', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-2999999', + 'Length' => '0', + ), + 1 => + array ( + 'Range' => '3000000-3999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '4000000-4999999', + 'Length' => '0', + ), + 3 => + array ( + 'Range' => '5000000-6499999', + 'Length' => '3', + ), + 4 => + array ( + 'Range' => '6500000-8999999', + 'Length' => '0', + ), + 5 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 100 => + array ( + 'Prefix' => '978-9925', + 'Agency' => 'Cyprus', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-2999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '3000000-5499999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '5500000-7349999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '7350000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 101 => + array ( + 'Prefix' => '978-9926', + 'Agency' => 'Bosnia and Herzegovina', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '2000000-3999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '4000000-7999999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '8000000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 102 => + array ( + 'Prefix' => '978-9927', + 'Agency' => 'Qatar', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '1000000-3999999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '4000000-4999999', + 'Length' => '4', + ), + 3 => + array ( + 'Range' => '5000000-9999999', + 'Length' => '0', + ), + ), + ), + ), + 103 => + array ( + 'Prefix' => '978-9928', + 'Agency' => 'Albania', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '1000000-3999999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '4000000-4999999', + 'Length' => '4', + ), + 3 => + array ( + 'Range' => '5000000-9999999', + 'Length' => '0', + ), + ), + ), + ), + 104 => + array ( + 'Prefix' => '978-9929', + 'Agency' => 'Guatemala', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-3999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '4000000-5499999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '5500000-7999999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '8000000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 105 => + array ( + 'Prefix' => '978-9930', + 'Agency' => 'Costa Rica', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-4999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '5000000-9399999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '9400000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 106 => + array ( + 'Prefix' => '978-9931', + 'Agency' => 'Algeria', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-2999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '3000000-8999999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 107 => + array ( + 'Prefix' => '978-9932', + 'Agency' => 'Lao People\'s Democratic Republic', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-3999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '4000000-8499999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '8500000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 108 => + array ( + 'Prefix' => '978-9933', + 'Agency' => 'Syria', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '1000000-3999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '4000000-8999999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 109 => + array ( + 'Prefix' => '978-9934', + 'Agency' => 'Latvia', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '1000000-4999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '5000000-7999999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '8000000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 110 => + array ( + 'Prefix' => '978-9935', + 'Agency' => 'Iceland', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '1000000-3999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '4000000-8999999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 111 => + array ( + 'Prefix' => '978-9936', + 'Agency' => 'Afghanistan', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '2000000-3999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '4000000-7999999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '8000000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 112 => + array ( + 'Prefix' => '978-9937', + 'Agency' => 'Nepal', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-2999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '3000000-4999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '5000000-7999999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '8000000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 113 => + array ( + 'Prefix' => '978-9938', + 'Agency' => 'Tunisia', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-7999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '8000000-9499999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '9500000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 114 => + array ( + 'Prefix' => '978-9939', + 'Agency' => 'Armenia', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-4999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '5000000-7999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '8000000-8999999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '9000000-9799999', + 'Length' => '4', + ), + 4 => + array ( + 'Range' => '9800000-9999999', + 'Length' => '2', + ), + ), + ), + ), + 115 => + array ( + 'Prefix' => '978-9940', + 'Agency' => 'Montenegro', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '2000000-4999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '5000000-8399999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '8400000-8699999', + 'Length' => '2', + ), + 4 => + array ( + 'Range' => '8700000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 116 => + array ( + 'Prefix' => '978-9941', + 'Agency' => 'Georgia', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '1000000-3999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '4000000-7999999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '8000000-8999999', + 'Length' => '1', + ), + 4 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 117 => + array ( + 'Prefix' => '978-9942', + 'Agency' => 'Ecuador', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-7499999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '7500000-8499999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '8500000-8999999', + 'Length' => '4', + ), + 3 => + array ( + 'Range' => '9000000-9849999', + 'Length' => '3', + ), + 4 => + array ( + 'Range' => '9850000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 118 => + array ( + 'Prefix' => '978-9943', + 'Agency' => 'Uzbekistan', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-2999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '3000000-3999999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '4000000-9749999', + 'Length' => '4', + ), + 3 => + array ( + 'Range' => '9750000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 119 => + array ( + 'Prefix' => '978-9944', + 'Agency' => 'Turkey', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0999999', + 'Length' => '4', + ), + 1 => + array ( + 'Range' => '1000000-4999999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '5000000-5999999', + 'Length' => '4', + ), + 3 => + array ( + 'Range' => '6000000-6999999', + 'Length' => '2', + ), + 4 => + array ( + 'Range' => '7000000-7999999', + 'Length' => '3', + ), + 5 => + array ( + 'Range' => '8000000-8999999', + 'Length' => '2', + ), + 6 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 120 => + array ( + 'Prefix' => '978-9945', + 'Agency' => 'Dominican Republic', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0099999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '0100000-0799999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '0800000-3999999', + 'Length' => '2', + ), + 3 => + array ( + 'Range' => '4000000-5699999', + 'Length' => '3', + ), + 4 => + array ( + 'Range' => '5700000-5799999', + 'Length' => '2', + ), + 5 => + array ( + 'Range' => '5800000-7999999', + 'Length' => '3', + ), + 6 => + array ( + 'Range' => '8000000-8099999', + 'Length' => '2', + ), + 7 => + array ( + 'Range' => '8100000-8499999', + 'Length' => '3', + ), + 8 => + array ( + 'Range' => '8500000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 121 => + array ( + 'Prefix' => '978-9946', + 'Agency' => 'Korea, P.D.R.', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '2000000-3999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '4000000-8999999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 122 => + array ( + 'Prefix' => '978-9947', + 'Agency' => 'Algeria', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '2000000-7999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '8000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 123 => + array ( + 'Prefix' => '978-9948', + 'Agency' => 'United Arab Emirates', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-3999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '4000000-8499999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '8500000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 124 => + array ( + 'Prefix' => '978-9949', + 'Agency' => 'Estonia', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0899999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '0900000-0999999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '1000000-3999999', + 'Length' => '2', + ), + 3 => + array ( + 'Range' => '4000000-6999999', + 'Length' => '3', + ), + 4 => + array ( + 'Range' => '7000000-7199999', + 'Length' => '2', + ), + 5 => + array ( + 'Range' => '7200000-7499999', + 'Length' => '4', + ), + 6 => + array ( + 'Range' => '7500000-8999999', + 'Length' => '2', + ), + 7 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 125 => + array ( + 'Prefix' => '978-9950', + 'Agency' => 'Palestine', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-2999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '3000000-8499999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '8500000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 126 => + array ( + 'Prefix' => '978-9951', + 'Agency' => 'Kosova', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-3999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '4000000-8499999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '8500000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 127 => + array ( + 'Prefix' => '978-9952', + 'Agency' => 'Azerbaijan', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '2000000-3999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '4000000-7999999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '8000000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 128 => + array ( + 'Prefix' => '978-9953', + 'Agency' => 'Lebanon', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '1000000-3999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '4000000-5999999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '6000000-8999999', + 'Length' => '2', + ), + 4 => + array ( + 'Range' => '9000000-9299999', + 'Length' => '4', + ), + 5 => + array ( + 'Range' => '9300000-9699999', + 'Length' => '2', + ), + 6 => + array ( + 'Range' => '9700000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 129 => + array ( + 'Prefix' => '978-9954', + 'Agency' => 'Morocco', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '2000000-3999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '4000000-7999999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '8000000-9899999', + 'Length' => '4', + ), + 4 => + array ( + 'Range' => '9900000-9999999', + 'Length' => '2', + ), + ), + ), + ), + 130 => + array ( + 'Prefix' => '978-9955', + 'Agency' => 'Lithuania', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-3999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '4000000-9299999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '9300000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 131 => + array ( + 'Prefix' => '978-9956', + 'Agency' => 'Cameroon', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '1000000-3999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '4000000-8999999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 132 => + array ( + 'Prefix' => '978-9957', + 'Agency' => 'Jordan', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-3999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '4000000-6499999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '6500000-6799999', + 'Length' => '2', + ), + 3 => + array ( + 'Range' => '6800000-6999999', + 'Length' => '3', + ), + 4 => + array ( + 'Range' => '7000000-8499999', + 'Length' => '2', + ), + 5 => + array ( + 'Range' => '8500000-8799999', + 'Length' => '4', + ), + 6 => + array ( + 'Range' => '8800000-9999999', + 'Length' => '2', + ), + ), + ), + ), + 133 => + array ( + 'Prefix' => '978-9958', + 'Agency' => 'Bosnia and Herzegovina', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0199999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '0200000-0299999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '0300000-0399999', + 'Length' => '4', + ), + 3 => + array ( + 'Range' => '0400000-0899999', + 'Length' => '3', + ), + 4 => + array ( + 'Range' => '0900000-0999999', + 'Length' => '4', + ), + 5 => + array ( + 'Range' => '1000000-1899999', + 'Length' => '2', + ), + 6 => + array ( + 'Range' => '1900000-1999999', + 'Length' => '4', + ), + 7 => + array ( + 'Range' => '2000000-4999999', + 'Length' => '2', + ), + 8 => + array ( + 'Range' => '5000000-8999999', + 'Length' => '3', + ), + 9 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 134 => + array ( + 'Prefix' => '978-9959', + 'Agency' => 'Libya', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '2000000-7999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '8000000-9499999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '9500000-9699999', + 'Length' => '4', + ), + 4 => + array ( + 'Range' => '9700000-9799999', + 'Length' => '3', + ), + 5 => + array ( + 'Range' => '9800000-9999999', + 'Length' => '2', + ), + ), + ), + ), + 135 => + array ( + 'Prefix' => '978-9960', + 'Agency' => 'Saudi Arabia', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-5999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '6000000-8999999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 136 => + array ( + 'Prefix' => '978-9961', + 'Agency' => 'Algeria', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-2999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '3000000-6999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '7000000-9499999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '9500000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 137 => + array ( + 'Prefix' => '978-9962', + 'Agency' => 'Panama', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-5499999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '5500000-5599999', + 'Length' => '4', + ), + 2 => + array ( + 'Range' => '5600000-5999999', + 'Length' => '2', + ), + 3 => + array ( + 'Range' => '6000000-8499999', + 'Length' => '3', + ), + 4 => + array ( + 'Range' => '8500000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 138 => + array ( + 'Prefix' => '978-9963', + 'Agency' => 'Cyprus', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '2000000-2499999', + 'Length' => '4', + ), + 2 => + array ( + 'Range' => '2500000-2799999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '2800000-2999999', + 'Length' => '4', + ), + 4 => + array ( + 'Range' => '3000000-5499999', + 'Length' => '2', + ), + 5 => + array ( + 'Range' => '5500000-7349999', + 'Length' => '3', + ), + 6 => + array ( + 'Range' => '7350000-7499999', + 'Length' => '4', + ), + 7 => + array ( + 'Range' => '7500000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 139 => + array ( + 'Prefix' => '978-9964', + 'Agency' => 'Ghana', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-6999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '7000000-9499999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '9500000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 140 => + array ( + 'Prefix' => '978-9965', + 'Agency' => 'Kazakhstan', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-3999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '4000000-8999999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 141 => + array ( + 'Prefix' => '978-9966', + 'Agency' => 'Kenya', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1399999', + 'Length' => '3', + ), + 1 => + array ( + 'Range' => '1400000-1499999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '1500000-1999999', + 'Length' => '4', + ), + 3 => + array ( + 'Range' => '2000000-6999999', + 'Length' => '2', + ), + 4 => + array ( + 'Range' => '7000000-7499999', + 'Length' => '4', + ), + 5 => + array ( + 'Range' => '7500000-8209999', + 'Length' => '3', + ), + 6 => + array ( + 'Range' => '8210000-8249999', + 'Length' => '4', + ), + 7 => + array ( + 'Range' => '8250000-8259999', + 'Length' => '3', + ), + 8 => + array ( + 'Range' => '8260000-8289999', + 'Length' => '4', + ), + 9 => + array ( + 'Range' => '8290000-9599999', + 'Length' => '3', + ), + 10 => + array ( + 'Range' => '9600000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 142 => + array ( + 'Prefix' => '978-9967', + 'Agency' => 'Kyrgyz Republic', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-3999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '4000000-8999999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 143 => + array ( + 'Prefix' => '978-9968', + 'Agency' => 'Costa Rica', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-4999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '5000000-9399999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '9400000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 144 => + array ( + 'Prefix' => '978-9970', + 'Agency' => 'Uganda', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-3999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '4000000-8999999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 145 => + array ( + 'Prefix' => '978-9971', + 'Agency' => 'Singapore', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-5999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '6000000-8999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '9000000-9899999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '9900000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 146 => + array ( + 'Prefix' => '978-9972', + 'Agency' => 'Peru', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '1000000-1999999', + 'Length' => '1', + ), + 2 => + array ( + 'Range' => '2000000-2499999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '2500000-2999999', + 'Length' => '4', + ), + 4 => + array ( + 'Range' => '3000000-5999999', + 'Length' => '2', + ), + 5 => + array ( + 'Range' => '6000000-8999999', + 'Length' => '3', + ), + 6 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 147 => + array ( + 'Prefix' => '978-9973', + 'Agency' => 'Tunisia', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0599999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '0600000-0899999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '0900000-0999999', + 'Length' => '4', + ), + 3 => + array ( + 'Range' => '1000000-6999999', + 'Length' => '2', + ), + 4 => + array ( + 'Range' => '7000000-9699999', + 'Length' => '3', + ), + 5 => + array ( + 'Range' => '9700000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 148 => + array ( + 'Prefix' => '978-9974', + 'Agency' => 'Uruguay', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-2999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '3000000-5499999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '5500000-7499999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '7500000-8799999', + 'Length' => '4', + ), + 4 => + array ( + 'Range' => '8800000-9099999', + 'Length' => '3', + ), + 5 => + array ( + 'Range' => '9100000-9499999', + 'Length' => '2', + ), + 6 => + array ( + 'Range' => '9500000-9999999', + 'Length' => '2', + ), + ), + ), + ), + 149 => + array ( + 'Prefix' => '978-9975', + 'Agency' => 'Moldova', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '1000000-2999999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '3000000-3999999', + 'Length' => '4', + ), + 3 => + array ( + 'Range' => '4000000-4499999', + 'Length' => '4', + ), + 4 => + array ( + 'Range' => '4500000-8999999', + 'Length' => '2', + ), + 5 => + array ( + 'Range' => '9000000-9499999', + 'Length' => '3', + ), + 6 => + array ( + 'Range' => '9500000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 150 => + array ( + 'Prefix' => '978-9976', + 'Agency' => 'Tanzania', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-4999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '5000000-5799999', + 'Length' => '4', + ), + 2 => + array ( + 'Range' => '5800000-5899999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '5900000-8999999', + 'Length' => '2', + ), + 4 => + array ( + 'Range' => '9000000-9899999', + 'Length' => '3', + ), + 5 => + array ( + 'Range' => '9900000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 151 => + array ( + 'Prefix' => '978-9977', + 'Agency' => 'Costa Rica', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-8999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '9000000-9899999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '9900000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 152 => + array ( + 'Prefix' => '978-9978', + 'Agency' => 'Ecuador', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-2999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '3000000-3999999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '4000000-9499999', + 'Length' => '2', + ), + 3 => + array ( + 'Range' => '9500000-9899999', + 'Length' => '3', + ), + 4 => + array ( + 'Range' => '9900000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 153 => + array ( + 'Prefix' => '978-9979', + 'Agency' => 'Iceland', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-4999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '5000000-6499999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '6500000-6599999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '6600000-7599999', + 'Length' => '2', + ), + 4 => + array ( + 'Range' => '7600000-8999999', + 'Length' => '3', + ), + 5 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 154 => + array ( + 'Prefix' => '978-9980', + 'Agency' => 'Papua New Guinea', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-3999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '4000000-8999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '9000000-9899999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '9900000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 155 => + array ( + 'Prefix' => '978-9981', + 'Agency' => 'Morocco', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '1000000-1599999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '1600000-1999999', + 'Length' => '4', + ), + 3 => + array ( + 'Range' => '2000000-7999999', + 'Length' => '2', + ), + 4 => + array ( + 'Range' => '8000000-9499999', + 'Length' => '3', + ), + 5 => + array ( + 'Range' => '9500000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 156 => + array ( + 'Prefix' => '978-9982', + 'Agency' => 'Zambia', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-7999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '8000000-9899999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '9900000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 157 => + array ( + 'Prefix' => '978-9983', + 'Agency' => 'Gambia', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-7999999', + 'Length' => '0', + ), + 1 => + array ( + 'Range' => '8000000-9499999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '9500000-9899999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '9900000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 158 => + array ( + 'Prefix' => '978-9984', + 'Agency' => 'Latvia', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-4999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '5000000-8999999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 159 => + array ( + 'Prefix' => '978-9985', + 'Agency' => 'Estonia', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-4999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '5000000-7999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '8000000-8999999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 160 => + array ( + 'Prefix' => '978-9986', + 'Agency' => 'Lithuania', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-3999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '4000000-8999999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '9000000-9399999', + 'Length' => '4', + ), + 3 => + array ( + 'Range' => '9400000-9699999', + 'Length' => '3', + ), + 4 => + array ( + 'Range' => '9700000-9999999', + 'Length' => '2', + ), + ), + ), + ), + 161 => + array ( + 'Prefix' => '978-9987', + 'Agency' => 'Tanzania', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-3999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '4000000-8799999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '8800000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 162 => + array ( + 'Prefix' => '978-9988', + 'Agency' => 'Ghana', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-3999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '4000000-5499999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '5500000-7499999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '7500000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 163 => + array ( + 'Prefix' => '978-9989', + 'Agency' => 'North Macedonia', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '1000000-1999999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '2000000-2999999', + 'Length' => '4', + ), + 3 => + array ( + 'Range' => '3000000-5999999', + 'Length' => '2', + ), + 4 => + array ( + 'Range' => '6000000-9499999', + 'Length' => '3', + ), + 5 => + array ( + 'Range' => '9500000-9999999', + 'Length' => '4', + ), + ), + ), + ), + 164 => + array ( + 'Prefix' => '978-99901', + 'Agency' => 'Bahrain', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-4999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '5000000-7999999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '8000000-9999999', + 'Length' => '2', + ), + ), + ), + ), + 165 => + array ( + 'Prefix' => '978-99902', + 'Agency' => 'Reserved Agency', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-9999999', + 'Length' => '0', + ), + ), + ), + ), + 166 => + array ( + 'Prefix' => '978-99903', + 'Agency' => 'Mauritius', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '2000000-8999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 167 => + array ( + 'Prefix' => '978-99904', + 'Agency' => 'Curaçao', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-5999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '6000000-8999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 168 => + array ( + 'Prefix' => '978-99905', + 'Agency' => 'Bolivia', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-3999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '4000000-7999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '8000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 169 => + array ( + 'Prefix' => '978-99906', + 'Agency' => 'Kuwait', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-2999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '3000000-5999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '6000000-6999999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '7000000-8999999', + 'Length' => '2', + ), + 4 => + array ( + 'Range' => '9000000-9499999', + 'Length' => '2', + ), + 5 => + array ( + 'Range' => '9500000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 170 => + array ( + 'Prefix' => '978-99908', + 'Agency' => 'Malawi', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '1000000-8999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 171 => + array ( + 'Prefix' => '978-99909', + 'Agency' => 'Malta', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-3999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '4000000-9499999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '9500000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 172 => + array ( + 'Prefix' => '978-99910', + 'Agency' => 'Sierra Leone', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-2999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '3000000-8999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 173 => + array ( + 'Prefix' => '978-99911', + 'Agency' => 'Lesotho', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-5999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '6000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 174 => + array ( + 'Prefix' => '978-99912', + 'Agency' => 'Botswana', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-3999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '4000000-5999999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '6000000-8999999', + 'Length' => '2', + ), + 3 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 175 => + array ( + 'Prefix' => '978-99913', + 'Agency' => 'Andorra', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-2999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '3000000-3599999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '3600000-5999999', + 'Length' => '0', + ), + 3 => + array ( + 'Range' => '6000000-6049999', + 'Length' => '3', + ), + 4 => + array ( + 'Range' => '6050000-9999999', + 'Length' => '0', + ), + ), + ), + ), + 176 => + array ( + 'Prefix' => '978-99914', + 'Agency' => 'International NGO Publishers', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-4999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '5000000-6999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '7000000-7999999', + 'Length' => '1', + ), + 3 => + array ( + 'Range' => '8000000-8999999', + 'Length' => '2', + ), + 4 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 177 => + array ( + 'Prefix' => '978-99915', + 'Agency' => 'Maldives', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-4999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '5000000-7999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '8000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 178 => + array ( + 'Prefix' => '978-99916', + 'Agency' => 'Namibia', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-2999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '3000000-6999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '7000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 179 => + array ( + 'Prefix' => '978-99917', + 'Agency' => 'Brunei Darussalam', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-2999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '3000000-8899999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '8900000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 180 => + array ( + 'Prefix' => '978-99918', + 'Agency' => 'Faroe Islands', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-3999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '4000000-7999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '8000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 181 => + array ( + 'Prefix' => '978-99919', + 'Agency' => 'Benin', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-2999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '3000000-3999999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '4000000-7999999', + 'Length' => '2', + ), + 3 => + array ( + 'Range' => '8000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 182 => + array ( + 'Prefix' => '978-99920', + 'Agency' => 'Andorra', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-4999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '5000000-8999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 183 => + array ( + 'Prefix' => '978-99921', + 'Agency' => 'Qatar', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '2000000-6999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '7000000-7999999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '8000000-8999999', + 'Length' => '1', + ), + 4 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '2', + ), + ), + ), + ), + 184 => + array ( + 'Prefix' => '978-99922', + 'Agency' => 'Guatemala', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-3999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '4000000-6999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '7000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 185 => + array ( + 'Prefix' => '978-99923', + 'Agency' => 'El Salvador', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '2000000-7999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '8000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 186 => + array ( + 'Prefix' => '978-99924', + 'Agency' => 'Nicaragua', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '2000000-7999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '8000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 187 => + array ( + 'Prefix' => '978-99925', + 'Agency' => 'Paraguay', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '1000000-1999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '2000000-2999999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '3000000-3999999', + 'Length' => '1', + ), + 4 => + array ( + 'Range' => '4000000-7999999', + 'Length' => '2', + ), + 5 => + array ( + 'Range' => '8000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 188 => + array ( + 'Prefix' => '978-99926', + 'Agency' => 'Honduras', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '1000000-5999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '6000000-8699999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '8700000-8999999', + 'Length' => '2', + ), + 4 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '2', + ), + ), + ), + ), + 189 => + array ( + 'Prefix' => '978-99927', + 'Agency' => 'Albania', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-2999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '3000000-5999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '6000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 190 => + array ( + 'Prefix' => '978-99928', + 'Agency' => 'Georgia', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '1000000-7999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '8000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 191 => + array ( + 'Prefix' => '978-99929', + 'Agency' => 'Mongolia', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-4999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '5000000-7999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '8000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 192 => + array ( + 'Prefix' => '978-99930', + 'Agency' => 'Armenia', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-4999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '5000000-7999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '8000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 193 => + array ( + 'Prefix' => '978-99931', + 'Agency' => 'Seychelles', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-4999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '5000000-7999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '8000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 194 => + array ( + 'Prefix' => '978-99932', + 'Agency' => 'Malta', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '1000000-5999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '6000000-6999999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '7000000-7999999', + 'Length' => '1', + ), + 4 => + array ( + 'Range' => '8000000-9999999', + 'Length' => '2', + ), + ), + ), + ), + 195 => + array ( + 'Prefix' => '978-99933', + 'Agency' => 'Nepal', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-2999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '3000000-5999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '6000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 196 => + array ( + 'Prefix' => '978-99934', + 'Agency' => 'Dominican Republic', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '2000000-7999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '8000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 197 => + array ( + 'Prefix' => '978-99935', + 'Agency' => 'Haiti', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-2999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '3000000-5999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '6000000-6999999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '7000000-8999999', + 'Length' => '1', + ), + 4 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '2', + ), + ), + ), + ), + 198 => + array ( + 'Prefix' => '978-99936', + 'Agency' => 'Bhutan', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '1000000-5999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '6000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 199 => + array ( + 'Prefix' => '978-99937', + 'Agency' => 'Macau', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '2000000-5999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '6000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 200 => + array ( + 'Prefix' => '978-99938', + 'Agency' => 'Srpska, Republic of', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '2000000-5999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '6000000-8999999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '2', + ), + ), + ), + ), + 201 => + array ( + 'Prefix' => '978-99939', + 'Agency' => 'Guatemala', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-5999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '6000000-8999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 202 => + array ( + 'Prefix' => '978-99940', + 'Agency' => 'Georgia', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '1000000-6999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '7000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 203 => + array ( + 'Prefix' => '978-99941', + 'Agency' => 'Armenia', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-2999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '3000000-7999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '8000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 204 => + array ( + 'Prefix' => '978-99942', + 'Agency' => 'Sudan', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-4999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '5000000-7999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '8000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 205 => + array ( + 'Prefix' => '978-99943', + 'Agency' => 'Albania', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-2999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '3000000-5999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '6000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 206 => + array ( + 'Prefix' => '978-99944', + 'Agency' => 'Ethiopia', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-4999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '5000000-7999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '8000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 207 => + array ( + 'Prefix' => '978-99945', + 'Agency' => 'Namibia', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-4999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '5000000-8999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 208 => + array ( + 'Prefix' => '978-99946', + 'Agency' => 'Nepal', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-2999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '3000000-5999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '6000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 209 => + array ( + 'Prefix' => '978-99947', + 'Agency' => 'Tajikistan', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-2999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '3000000-6999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '7000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 210 => + array ( + 'Prefix' => '978-99948', + 'Agency' => 'Eritrea', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-4999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '5000000-7999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '8000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 211 => + array ( + 'Prefix' => '978-99949', + 'Agency' => 'Mauritius', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '2000000-8999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 212 => + array ( + 'Prefix' => '978-99950', + 'Agency' => 'Cambodia', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-4999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '5000000-7999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '8000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 213 => + array ( + 'Prefix' => '978-99951', + 'Agency' => 'Reserved Agency', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-9999999', + 'Length' => '0', + ), + ), + ), + ), + 214 => + array ( + 'Prefix' => '978-99952', + 'Agency' => 'Mali', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-4999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '5000000-7999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '8000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 215 => + array ( + 'Prefix' => '978-99953', + 'Agency' => 'Paraguay', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-2999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '3000000-7999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '8000000-9399999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '9400000-9999999', + 'Length' => '2', + ), + ), + ), + ), + 216 => + array ( + 'Prefix' => '978-99954', + 'Agency' => 'Bolivia', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-2999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '3000000-6999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '7000000-8799999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '8800000-9999999', + 'Length' => '2', + ), + ), + ), + ), + 217 => + array ( + 'Prefix' => '978-99955', + 'Agency' => 'Srpska, Republic of', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '2000000-5999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '6000000-7999999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '8000000-9999999', + 'Length' => '2', + ), + ), + ), + ), + 218 => + array ( + 'Prefix' => '978-99956', + 'Agency' => 'Albania', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-5999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '6000000-8599999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '8600000-9999999', + 'Length' => '2', + ), + ), + ), + ), + 219 => + array ( + 'Prefix' => '978-99957', + 'Agency' => 'Malta', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '2000000-7999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '8000000-9499999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '9500000-9999999', + 'Length' => '2', + ), + ), + ), + ), + 220 => + array ( + 'Prefix' => '978-99958', + 'Agency' => 'Bahrain', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-4999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '5000000-9399999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '9400000-9499999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '9500000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 221 => + array ( + 'Prefix' => '978-99959', + 'Agency' => 'Luxembourg', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-2999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '3000000-5999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '6000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 222 => + array ( + 'Prefix' => '978-99960', + 'Agency' => 'Malawi', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0699999', + 'Length' => '0', + ), + 1 => + array ( + 'Range' => '0700000-0999999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '1000000-9499999', + 'Length' => '2', + ), + 3 => + array ( + 'Range' => '9500000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 223 => + array ( + 'Prefix' => '978-99961', + 'Agency' => 'El Salvador', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-2999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '3000000-3699999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '3700000-8999999', + 'Length' => '2', + ), + 3 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 224 => + array ( + 'Prefix' => '978-99962', + 'Agency' => 'Mongolia', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-4999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '5000000-7999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '8000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 225 => + array ( + 'Prefix' => '978-99963', + 'Agency' => 'Cambodia', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-4999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '5000000-9199999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '9200000-9999999', + 'Length' => '2', + ), + ), + ), + ), + 226 => + array ( + 'Prefix' => '978-99964', + 'Agency' => 'Nicaragua', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '2000000-7999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '8000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 227 => + array ( + 'Prefix' => '978-99965', + 'Agency' => 'Macau', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-2999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '3000000-3599999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '3600000-6299999', + 'Length' => '2', + ), + 3 => + array ( + 'Range' => '6300000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 228 => + array ( + 'Prefix' => '978-99966', + 'Agency' => 'Kuwait', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-2999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '3000000-6999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '7000000-7999999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '8000000-9699999', + 'Length' => '2', + ), + 4 => + array ( + 'Range' => '9700000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 229 => + array ( + 'Prefix' => '978-99967', + 'Agency' => 'Paraguay', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '1000000-5999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '6000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 230 => + array ( + 'Prefix' => '978-99968', + 'Agency' => 'Botswana', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-3999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '4000000-5999999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '6000000-8999999', + 'Length' => '2', + ), + 3 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 231 => + array ( + 'Prefix' => '978-99969', + 'Agency' => 'Oman', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-4999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '5000000-7999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '8000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 232 => + array ( + 'Prefix' => '978-99970', + 'Agency' => 'Haiti', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-4999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '5000000-8999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 233 => + array ( + 'Prefix' => '978-99971', + 'Agency' => 'Myanmar', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-3999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '4000000-8499999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '8500000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 234 => + array ( + 'Prefix' => '978-99972', + 'Agency' => 'Faroe Islands', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-4999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '5000000-8999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 235 => + array ( + 'Prefix' => '978-99973', + 'Agency' => 'Mongolia', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-3999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '4000000-7999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '8000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 236 => + array ( + 'Prefix' => '978-99974', + 'Agency' => 'Bolivia', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '1000000-2599999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '2600000-3999999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '4000000-6399999', + 'Length' => '2', + ), + 4 => + array ( + 'Range' => '6400000-6499999', + 'Length' => '3', + ), + 5 => + array ( + 'Range' => '6500000-7999999', + 'Length' => '2', + ), + 6 => + array ( + 'Range' => '8000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 237 => + array ( + 'Prefix' => '978-99975', + 'Agency' => 'Tajikistan', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-2999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '3000000-3999999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '4000000-7999999', + 'Length' => '2', + ), + 3 => + array ( + 'Range' => '8000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 238 => + array ( + 'Prefix' => '978-99976', + 'Agency' => 'Srpska, Republic of', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '2000000-5999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '6000000-7999999', + 'Length' => '3', + ), + 3 => + array ( + 'Range' => '8000000-8999999', + 'Length' => '0', + ), + 4 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 239 => + array ( + 'Prefix' => '978-99977', + 'Agency' => 'Rwanda', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '2000000-3999999', + 'Length' => '0', + ), + 2 => + array ( + 'Range' => '4000000-6999999', + 'Length' => '2', + ), + 3 => + array ( + 'Range' => '7000000-7999999', + 'Length' => '3', + ), + 4 => + array ( + 'Range' => '8000000-9949999', + 'Length' => '0', + ), + 5 => + array ( + 'Range' => '9950000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 240 => + array ( + 'Prefix' => '978-99978', + 'Agency' => 'Mongolia', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-4999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '5000000-6999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '7000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 241 => + array ( + 'Prefix' => '978-99979', + 'Agency' => 'Honduras', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-4999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '5000000-7999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '8000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 242 => + array ( + 'Prefix' => '978-99980', + 'Agency' => 'Bhutan', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '1000000-2999999', + 'Length' => '0', + ), + 2 => + array ( + 'Range' => '3000000-5999999', + 'Length' => '2', + ), + 3 => + array ( + 'Range' => '6000000-7999999', + 'Length' => '0', + ), + 4 => + array ( + 'Range' => '8000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 243 => + array ( + 'Prefix' => '978-99981', + 'Agency' => 'Macau', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '2000000-2999999', + 'Length' => '0', + ), + 2 => + array ( + 'Range' => '3000000-5999999', + 'Length' => '2', + ), + 3 => + array ( + 'Range' => '6000000-7999999', + 'Length' => '0', + ), + 4 => + array ( + 'Range' => '8000000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 244 => + array ( + 'Prefix' => '978-99982', + 'Agency' => 'Benin', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '1000000-4999999', + 'Length' => '0', + ), + 2 => + array ( + 'Range' => '5000000-6599999', + 'Length' => '2', + ), + 3 => + array ( + 'Range' => '6600000-8999999', + 'Length' => '0', + ), + 4 => + array ( + 'Range' => '9000000-9799999', + 'Length' => '3', + ), + 5 => + array ( + 'Range' => '9800000-9999999', + 'Length' => '0', + ), + ), + ), + ), + 245 => + array ( + 'Prefix' => '978-99983', + 'Agency' => 'El Salvador', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '1000000-4999999', + 'Length' => '0', + ), + 2 => + array ( + 'Range' => '5000000-6999999', + 'Length' => '2', + ), + 3 => + array ( + 'Range' => '7000000-9499999', + 'Length' => '0', + ), + 4 => + array ( + 'Range' => '9500000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 246 => + array ( + 'Prefix' => '978-99985', + 'Agency' => 'Tajikistan', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-5499999', + 'Length' => '0', + ), + 1 => + array ( + 'Range' => '5500000-5999999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '6000000-9499999', + 'Length' => '0', + ), + 3 => + array ( + 'Range' => '9500000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 247 => + array ( + 'Prefix' => '978-99986', + 'Agency' => 'Myanmar', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '1000000-4999999', + 'Length' => '0', + ), + 2 => + array ( + 'Range' => '5000000-6999999', + 'Length' => '2', + ), + 3 => + array ( + 'Range' => '7000000-9499999', + 'Length' => '0', + ), + 4 => + array ( + 'Range' => '9500000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 248 => + array ( + 'Prefix' => '978-99987', + 'Agency' => 'Luxembourg', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-8499999', + 'Length' => '0', + ), + 1 => + array ( + 'Range' => '8500000-9999999', + 'Length' => '3', + ), + ), + ), + ), + 249 => + array ( + 'Prefix' => '979-10', + 'Agency' => 'France', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1999999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '2000000-6999999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '7000000-8999999', + 'Length' => '4', + ), + 3 => + array ( + 'Range' => '9000000-9759999', + 'Length' => '5', + ), + 4 => + array ( + 'Range' => '9760000-9999999', + 'Length' => '6', + ), + ), + ), + ), + 250 => + array ( + 'Prefix' => '979-11', + 'Agency' => 'Korea, Republic', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-2499999', + 'Length' => '2', + ), + 1 => + array ( + 'Range' => '2500000-5499999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '5500000-8499999', + 'Length' => '4', + ), + 3 => + array ( + 'Range' => '8500000-9499999', + 'Length' => '5', + ), + 4 => + array ( + 'Range' => '9500000-9999999', + 'Length' => '6', + ), + ), + ), + ), + 251 => + array ( + 'Prefix' => '979-12', + 'Agency' => 'Italy', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1999999', + 'Length' => '0', + ), + 1 => + array ( + 'Range' => '2000000-2999999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '3000000-5949999', + 'Length' => '0', + ), + 3 => + array ( + 'Range' => '5950000-5999999', + 'Length' => '4', + ), + 4 => + array ( + 'Range' => '6000000-7999999', + 'Length' => '0', + ), + 5 => + array ( + 'Range' => '8000000-8499999', + 'Length' => '5', + ), + 6 => + array ( + 'Range' => '8500000-9999999', + 'Length' => '0', + ), + ), + ), + ), + 252 => + array ( + 'Prefix' => '979-8', + 'Agency' => 'United States', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-1999999', + 'Length' => '0', + ), + 1 => + array ( + 'Range' => '2000000-2199999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '2200000-5499999', + 'Length' => '0', + ), + 3 => + array ( + 'Range' => '5500000-7499999', + 'Length' => '4', + ), + 4 => + array ( + 'Range' => '7500000-9849999', + 'Length' => '0', + ), + 5 => + array ( + 'Range' => '9850000-9850009', + 'Length' => '7', + ), + 6 => + array ( + 'Range' => '9850010-9999999', + 'Length' => '0', + ), + ), + ), + ), +); +$prefixes = array ( + 0 => + array ( + 'Prefix' => '978', + 'Agency' => 'International ISBN Agency', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-5999999', + 'Length' => '1', + ), + 1 => + array ( + 'Range' => '6000000-6499999', + 'Length' => '3', + ), + 2 => + array ( + 'Range' => '6500000-6599999', + 'Length' => '2', + ), + 3 => + array ( + 'Range' => '6600000-6999999', + 'Length' => '0', + ), + 4 => + array ( + 'Range' => '7000000-7999999', + 'Length' => '1', + ), + 5 => + array ( + 'Range' => '8000000-9499999', + 'Length' => '2', + ), + 6 => + array ( + 'Range' => '9500000-9899999', + 'Length' => '3', + ), + 7 => + array ( + 'Range' => '9900000-9989999', + 'Length' => '4', + ), + 8 => + array ( + 'Range' => '9990000-9999999', + 'Length' => '5', + ), + ), + ), + ), + 1 => + array ( + 'Prefix' => '979', + 'Agency' => 'International ISBN Agency', + 'Rules' => + array ( + 'Rule' => + array ( + 0 => + array ( + 'Range' => '0000000-0999999', + 'Length' => '0', + ), + 1 => + array ( + 'Range' => '1000000-1299999', + 'Length' => '2', + ), + 2 => + array ( + 'Range' => '1300000-7999999', + 'Length' => '0', + ), + 3 => + array ( + 'Range' => '8000000-8999999', + 'Length' => '1', + ), + 4 => + array ( + 'Range' => '9000000-9999999', + 'Length' => '0', + ), + ), + ), + ), +); diff --git a/vendor/biblys/isbn/tests/convertToEan13Test.php b/vendor/biblys/isbn/tests/convertToEan13Test.php new file mode 100644 index 0000000..4dc9b51 --- /dev/null +++ b/vendor/biblys/isbn/tests/convertToEan13Test.php @@ -0,0 +1,41 @@ +assertEquals( + "9782207258040", + $ean13, + "It should convert to EAN-13" + ); + } + + public function testFormatEan13InvalidIsbn() + { + $this->expectException("Biblys\Isbn\IsbnParsingException"); + $this->expectExceptionMessage("Invalid characters in the code"); + + Isbn::convertToEan13("ABC-80-7203-7"); + } +} diff --git a/vendor/biblys/isbn/tests/convertToGtin14Test.php b/vendor/biblys/isbn/tests/convertToGtin14Test.php new file mode 100644 index 0000000..f54b36e --- /dev/null +++ b/vendor/biblys/isbn/tests/convertToGtin14Test.php @@ -0,0 +1,51 @@ +assertEquals( + "29783464603523", + $gtin14, + "It should convert to GTIN-14" + ); + } + + public function testFormatGtin14WithDefaultPrefix() + { + $gtin14 = Isbn::convertToGtin14("9783464603529"); + $this->assertEquals( + "19783464603526", + $gtin14, + "It should convert to GTIN-14 using 1 as default prefix" + ); + } + + public function testFormatGtin14InvalidIsbn() + { + $this->expectException("Biblys\Isbn\IsbnParsingException"); + $this->expectExceptionMessage("Invalid characters in the code"); + + Isbn::convertToGtin14("ABC-80-7203-7", 1); + } +} diff --git a/vendor/biblys/isbn/tests/convertToIsbn10Test.php b/vendor/biblys/isbn/tests/convertToIsbn10Test.php new file mode 100644 index 0000000..a2a85cd --- /dev/null +++ b/vendor/biblys/isbn/tests/convertToIsbn10Test.php @@ -0,0 +1,52 @@ +assertEquals( + "3-464-60352-0", + $isbn10, + "It should convert to ISBN-10" + ); + } + + public function testFormatIsbn10WithX() + { + $isbn10 = Isbn::convertToIsbn10("978-80-7203-717-9"); + $this->assertEquals( + "80-7203-717-X", + $isbn10, + "It should convert to ISBN-10 with X as a checksum character" + ); + } + + public function testFormatIsbn10InvalidIsbn() + { + $this->expectException("Biblys\Isbn\IsbnParsingException"); + // FIXME: Improve message: Input contains invalid characters "ABC" + $this->expectExceptionMessage("Invalid characters in the code"); + + Isbn::convertToIsbn10("ABC-80-7203-7"); + } +} diff --git a/vendor/biblys/isbn/tests/convertToIsbn13Test.php b/vendor/biblys/isbn/tests/convertToIsbn13Test.php new file mode 100644 index 0000000..4ac71e5 --- /dev/null +++ b/vendor/biblys/isbn/tests/convertToIsbn13Test.php @@ -0,0 +1,41 @@ +assertEquals( + "978-2-207-25804-0", + $Isbn13, + "It should convert to ISBN-13" + ); + } + + public function testFormatIsbn13InvalidIsbn() + { + $this->expectException("Biblys\Isbn\IsbnParsingException"); + $this->expectExceptionMessage("Invalid characters in the code"); + + Isbn::convertToIsbn13("ABC-80-7203-7"); + } +} diff --git a/vendor/biblys/isbn/tests/deprecated/constructorTest.php b/vendor/biblys/isbn/tests/deprecated/constructorTest.php new file mode 100644 index 0000000..008ce98 --- /dev/null +++ b/vendor/biblys/isbn/tests/deprecated/constructorTest.php @@ -0,0 +1,34 @@ +expectNotToPerformAssertions("Should not throw"); + } +} diff --git a/vendor/biblys/isbn/tests/deprecated/formatTest.php b/vendor/biblys/isbn/tests/deprecated/formatTest.php new file mode 100644 index 0000000..58ffa26 --- /dev/null +++ b/vendor/biblys/isbn/tests/deprecated/formatTest.php @@ -0,0 +1,76 @@ +expectException('PHPUnit\Framework\Error\Deprecated'); + $this->expectExceptionMessage( + "Isbn->format is deprecated and will be removed in the future. Use the Isbn::convertToIsbn13 method instead. Learn more: https://git.io/JtAEx" + ); + + $isbn = new Isbn('9782207258040'); + $isbn->format('ISBN-13'); + } + + public function testFormatIsbn13() + { + $isbn = new Isbn('9782207258040'); + $this->assertEquals($isbn->format('ISBN-13'), "978-2-207-25804-0"); + } + + public function testFormatIsbn10() + { + $isbn10 = new Isbn('9783464603529'); + $this->assertEquals($isbn10->format('ISBN-10'), "3-464-60352-0"); + } + + public function testFormatEan13() + { + $isbn10 = new Isbn("978-2-207-25804-0"); + $this->assertEquals($isbn10->format('EAN'), "9782207258040"); + } + + public function testFormatEan_13() + { + $isbn10 = new Isbn("978-2-207-25804-0"); + $this->assertEquals($isbn10->format('EAN-13'), "9782207258040"); + } + + public function testFormatGtin14() + { + $isbn = new Isbn('9783464603529'); + $this->assertEquals($isbn->format('GTIN-14'), '19783464603526'); + } + + public function testMauritiusRange() + { + $isbn = new Isbn('9786130971311'); + $this->assertEquals($isbn->format('ISBN-13'), "978-613-0-97131-1"); + } +} diff --git a/vendor/biblys/isbn/tests/deprecated/getErrorsTest.php b/vendor/biblys/isbn/tests/deprecated/getErrorsTest.php new file mode 100644 index 0000000..4d094f7 --- /dev/null +++ b/vendor/biblys/isbn/tests/deprecated/getErrorsTest.php @@ -0,0 +1,42 @@ +expectException('PHPUnit\Framework\Error\Deprecated'); + $this->expectExceptionMessage( + "Isbn->getErrors is deprecated and will be removed in the future. Use Isbn::validateAs… methods instead. Learn more: https://git.io/JtAEx" + ); + + $isbn = new Isbn("6897896354577"); + $isbn->getErrors(); + } + + public function testInvalidIsbn() + { + PHPUnit\Framework\Error\Deprecated::$enabled = false; + $isbn = new Isbn("6897896354577"); + $this->assertEquals($isbn->getErrors(), '[6897896354577] Product code should be 978 or 979'); + } +} diff --git a/vendor/biblys/isbn/tests/deprecated/isValidTest.php b/vendor/biblys/isbn/tests/deprecated/isValidTest.php new file mode 100644 index 0000000..d5642eb --- /dev/null +++ b/vendor/biblys/isbn/tests/deprecated/isValidTest.php @@ -0,0 +1,65 @@ +expectException('PHPUnit\Framework\Error\Deprecated'); + $this->expectExceptionMessage( + "Isbn->isValid is deprecated and will be removed in the future. Use Isbn::validateAs… methods instead. Learn more: https://git.io/JtAEx" + ); + + $isbn = new Isbn('9782207258040'); + $isbn->isValid(); + } + + public function testIsValid() + { + $isbn = new Isbn('9782207258040'); + $this->assertTrue($isbn->isValid()); + } + + public function testIsNotValid() + { + $invalid = new Isbn('5780AAC728440'); + $this->assertFalse($invalid->isValid()); + } + + public function testIsbn10WithChecksumX() + { + $isbn = new ISBN('80-7203-717-X'); + $this->assertTrue($isbn->isValid()); + } + + public function testValidateMexicanIsbn() + { + $isbn = new Isbn("9700764923"); + $this->assertTrue($isbn->isValid()); + } +} diff --git a/vendor/biblys/isbn/tests/deprecated/validateTest.php b/vendor/biblys/isbn/tests/deprecated/validateTest.php new file mode 100644 index 0000000..070f209 --- /dev/null +++ b/vendor/biblys/isbn/tests/deprecated/validateTest.php @@ -0,0 +1,66 @@ +expectException('PHPUnit\Framework\Error\Deprecated'); + $this->expectExceptionMessage( + "Isbn->validate is deprecated and will be removed in the future. Use Isbn::validateAs… methods instead. Learn more: https://git.io/JtAEx" + ); + + $isbn = new Isbn('9782843449499'); + $isbn->validate(); + } + + public function testValidateValidIsbn() + { + $isbn = new Isbn('9782843449499'); + $this->assertTrue($isbn->validate()); + } + + /** + * Non-regression test for Github issue #6 + * https://github.com/biblys/isbn/issues/6 + */ + public function testValidateIsbn10WithChecksumX() + { + $isbn = new Isbn('80-7203-717-X'); + $this->assertTrue($isbn->validate()); + } + + /** + * Non-regression test for Github issue #21 + * https://github.com/biblys/isbn/issues/21 + */ + public function testValidateMexicanIsbn() + { + $isbn = new Isbn("9700764923"); + $this->assertTrue($isbn->validate()); + } +} diff --git a/vendor/biblys/isbn/tests/isParsableTest.php b/vendor/biblys/isbn/tests/isParsableTest.php new file mode 100644 index 0000000..007acd7 --- /dev/null +++ b/vendor/biblys/isbn/tests/isParsableTest.php @@ -0,0 +1,37 @@ +assertTrue($isParsable); + } + + public function testUnparsableIsbn() + { + $isParsable = Isbn::isParsable("9782SPI258040"); + + $this->assertFalse($isParsable); + } +} diff --git a/vendor/biblys/isbn/tests/validateAsEan13Test.php b/vendor/biblys/isbn/tests/validateAsEan13Test.php new file mode 100644 index 0000000..9a08744 --- /dev/null +++ b/vendor/biblys/isbn/tests/validateAsEan13Test.php @@ -0,0 +1,54 @@ +expectNotToPerformAssertions("It should not throw"); + } + + public function testUnparsableIsbn() + { + $this->expectException("Biblys\Isbn\IsbnParsingException"); + $this->expectExceptionMessage("Invalid characters in the code"); + + Isbn::validateAsEan13("9782SPI258040"); + } + + public function testIsbnWithHyphens() + { + $this->expectException("Biblys\Isbn\IsbnValidationException"); + $this->expectExceptionMessage("978-2-207-25804-0 is not a valid EAN-13. Expected 9782207258040."); + + Isbn::validateAsEan13("978-2-207-25804-0"); + } + + public function testIsbnWithIncorrectCheckum() + { + $this->expectException("Biblys\Isbn\IsbnValidationException"); + $this->expectExceptionMessage("9782207258049 is not a valid EAN-13. Expected 9782207258040."); + + Isbn::validateAsEan13("9782207258049"); + } +} diff --git a/vendor/biblys/isbn/tests/validateAsIsbn10Test.php b/vendor/biblys/isbn/tests/validateAsIsbn10Test.php new file mode 100644 index 0000000..4e70bd6 --- /dev/null +++ b/vendor/biblys/isbn/tests/validateAsIsbn10Test.php @@ -0,0 +1,62 @@ +expectNotToPerformAssertions("It should not throw"); + } + + public function testUnparsableIsbn() + { + $this->expectException("Biblys\Isbn\IsbnParsingException"); + $this->expectExceptionMessage("Invalid characters in the code"); + + Isbn::validateAsIsbn10("3-ABC-60352-0"); + } + + public function testIsbnWithMisplacedHyphen() + { + $this->expectException("Biblys\Isbn\IsbnValidationException"); + $this->expectExceptionMessage("3-46460-352-0 is not a valid ISBN-10. Expected 3-464-60352-0."); + + Isbn::validateAsIsbn10("3-46460-352-0"); + } + + public function testIsbnWithoutHyphens() + { + $this->expectException("Biblys\Isbn\IsbnValidationException"); + $this->expectExceptionMessage("3464603520 is not a valid ISBN-10. Expected 3-464-60352-0."); + + Isbn::validateAsIsbn10("3464603520"); + } + + public function testIsbnWithIncorrectCheckum() + { + $this->expectException("Biblys\Isbn\IsbnValidationException"); + $this->expectExceptionMessage("3-46460-352-X is not a valid ISBN-10. Expected 3-464-60352-0."); + + Isbn::validateAsIsbn10("3-46460-352-X"); + } +} diff --git a/vendor/biblys/isbn/tests/validateAsIsbn13Test.php b/vendor/biblys/isbn/tests/validateAsIsbn13Test.php new file mode 100644 index 0000000..36886cf --- /dev/null +++ b/vendor/biblys/isbn/tests/validateAsIsbn13Test.php @@ -0,0 +1,107 @@ +expectNotToPerformAssertions("It should not throw"); + } + + public function testUnparsableIsbn() + { + $this->expectException("Biblys\Isbn\IsbnParsingException"); + $this->expectExceptionMessage("Invalid characters in the code"); + + Isbn::validateAsIsbn13("978-2-SPI-25804-0"); + } + + public function testIsbnWithMisplacedHyphen() + { + $this->expectException("Biblys\Isbn\IsbnValidationException"); + $this->expectExceptionMessage("978-220-7-25804-0 is not a valid ISBN-13. Expected 978-2-207-25804-0."); + + Isbn::validateAsIsbn13("978-220-7-25804-0"); + } + + public function testIsbnWithoutHyphens() + { + $this->expectException("Biblys\Isbn\IsbnValidationException"); + $this->expectExceptionMessage("9782207258040 is not a valid ISBN-13. Expected 978-2-207-25804-0."); + + Isbn::validateAsIsbn13("9782207258040"); + } + + public function testIsbnWithIncorrectCheckum() + { + $this->expectException("Biblys\Isbn\IsbnValidationException"); + $this->expectExceptionMessage("978-2-207-25804-2 is not a valid ISBN-13. Expected 978-2-207-25804-0."); + + Isbn::validateAsIsbn13("978-2-207-25804-2"); + } + + public function testValidateInvalidProductCode() + { + $this->expectException("Exception"); + $this->expectExceptionMessage("Product code should be 978 or 979"); + + + Isbn::validateAsIsbn13('6752843449499'); + } + + public function testValidateInvalidCharacters() + { + $this->expectException("Exception"); + $this->expectExceptionMessage("Invalid characters in the code"); + + Isbn::validateAsIsbn13('5780AAC728440'); + } + + public function testIsbnWithInvalidProductCode() + { + $this->expectException("Exception"); + $this->expectExceptionMessage("Product code should be 978 or 979"); + + Isbn::validateAsIsbn13('6897896354577'); + } + + public function testIsbnWithInvalidCountryCode() + { + $this->expectException("Exception"); + $this->expectExceptionMessage("Country code is unknown"); + + Isbn::validateAsIsbn13('9792887382562'); + } + + /** + * Non regression-test for Github issue #22 + * https://github.com/biblys/isbn/issues/22 + */ + public function testOtherInvalidIsbn() + { + $this->expectException("Exception"); + $this->expectExceptionMessage("Invalid characters in the code"); + + Isbn::validateAsIsbn13("34995031X"); + } +} diff --git a/vendor/composer/ClassLoader.php b/vendor/composer/ClassLoader.php new file mode 100644 index 0000000..247294d --- /dev/null +++ b/vendor/composer/ClassLoader.php @@ -0,0 +1,479 @@ + + * Jordi Boggiano + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Composer\Autoload; + +/** + * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. + * + * $loader = new \Composer\Autoload\ClassLoader(); + * + * // register classes with namespaces + * $loader->add('Symfony\Component', __DIR__.'/component'); + * $loader->add('Symfony', __DIR__.'/framework'); + * + * // activate the autoloader + * $loader->register(); + * + * // to enable searching the include path (eg. for PEAR packages) + * $loader->setUseIncludePath(true); + * + * In this example, if you try to use a class in the Symfony\Component + * namespace or one of its children (Symfony\Component\Console for instance), + * the autoloader will first look for the class under the component/ + * directory, and it will then fallback to the framework/ directory if not + * found before giving up. + * + * This class is loosely based on the Symfony UniversalClassLoader. + * + * @author Fabien Potencier + * @author Jordi Boggiano + * @see https://www.php-fig.org/psr/psr-0/ + * @see https://www.php-fig.org/psr/psr-4/ + */ +class ClassLoader +{ + private $vendorDir; + + // PSR-4 + private $prefixLengthsPsr4 = array(); + private $prefixDirsPsr4 = array(); + private $fallbackDirsPsr4 = array(); + + // PSR-0 + private $prefixesPsr0 = array(); + private $fallbackDirsPsr0 = array(); + + private $useIncludePath = false; + private $classMap = array(); + private $classMapAuthoritative = false; + private $missingClasses = array(); + private $apcuPrefix; + + private static $registeredLoaders = array(); + + public function __construct($vendorDir = null) + { + $this->vendorDir = $vendorDir; + } + + public function getPrefixes() + { + if (!empty($this->prefixesPsr0)) { + return call_user_func_array('array_merge', array_values($this->prefixesPsr0)); + } + + return array(); + } + + public function getPrefixesPsr4() + { + return $this->prefixDirsPsr4; + } + + public function getFallbackDirs() + { + return $this->fallbackDirsPsr0; + } + + public function getFallbackDirsPsr4() + { + return $this->fallbackDirsPsr4; + } + + public function getClassMap() + { + return $this->classMap; + } + + /** + * @param array $classMap Class to filename map + */ + public function addClassMap(array $classMap) + { + if ($this->classMap) { + $this->classMap = array_merge($this->classMap, $classMap); + } else { + $this->classMap = $classMap; + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, either + * appending or prepending to the ones previously set for this prefix. + * + * @param string $prefix The prefix + * @param array|string $paths The PSR-0 root directories + * @param bool $prepend Whether to prepend the directories + */ + public function add($prefix, $paths, $prepend = false) + { + if (!$prefix) { + if ($prepend) { + $this->fallbackDirsPsr0 = array_merge( + (array) $paths, + $this->fallbackDirsPsr0 + ); + } else { + $this->fallbackDirsPsr0 = array_merge( + $this->fallbackDirsPsr0, + (array) $paths + ); + } + + return; + } + + $first = $prefix[0]; + if (!isset($this->prefixesPsr0[$first][$prefix])) { + $this->prefixesPsr0[$first][$prefix] = (array) $paths; + + return; + } + if ($prepend) { + $this->prefixesPsr0[$first][$prefix] = array_merge( + (array) $paths, + $this->prefixesPsr0[$first][$prefix] + ); + } else { + $this->prefixesPsr0[$first][$prefix] = array_merge( + $this->prefixesPsr0[$first][$prefix], + (array) $paths + ); + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, either + * appending or prepending to the ones previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param array|string $paths The PSR-4 base directories + * @param bool $prepend Whether to prepend the directories + * + * @throws \InvalidArgumentException + */ + public function addPsr4($prefix, $paths, $prepend = false) + { + if (!$prefix) { + // Register directories for the root namespace. + if ($prepend) { + $this->fallbackDirsPsr4 = array_merge( + (array) $paths, + $this->fallbackDirsPsr4 + ); + } else { + $this->fallbackDirsPsr4 = array_merge( + $this->fallbackDirsPsr4, + (array) $paths + ); + } + } elseif (!isset($this->prefixDirsPsr4[$prefix])) { + // Register directories for a new namespace. + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } elseif ($prepend) { + // Prepend directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + (array) $paths, + $this->prefixDirsPsr4[$prefix] + ); + } else { + // Append directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + $this->prefixDirsPsr4[$prefix], + (array) $paths + ); + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, + * replacing any others previously set for this prefix. + * + * @param string $prefix The prefix + * @param array|string $paths The PSR-0 base directories + */ + public function set($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr0 = (array) $paths; + } else { + $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, + * replacing any others previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param array|string $paths The PSR-4 base directories + * + * @throws \InvalidArgumentException + */ + public function setPsr4($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr4 = (array) $paths; + } else { + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } + } + + /** + * Turns on searching the include path for class files. + * + * @param bool $useIncludePath + */ + public function setUseIncludePath($useIncludePath) + { + $this->useIncludePath = $useIncludePath; + } + + /** + * Can be used to check if the autoloader uses the include path to check + * for classes. + * + * @return bool + */ + public function getUseIncludePath() + { + return $this->useIncludePath; + } + + /** + * Turns off searching the prefix and fallback directories for classes + * that have not been registered with the class map. + * + * @param bool $classMapAuthoritative + */ + public function setClassMapAuthoritative($classMapAuthoritative) + { + $this->classMapAuthoritative = $classMapAuthoritative; + } + + /** + * Should class lookup fail if not found in the current class map? + * + * @return bool + */ + public function isClassMapAuthoritative() + { + return $this->classMapAuthoritative; + } + + /** + * APCu prefix to use to cache found/not-found classes, if the extension is enabled. + * + * @param string|null $apcuPrefix + */ + public function setApcuPrefix($apcuPrefix) + { + $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null; + } + + /** + * The APCu prefix in use, or null if APCu caching is not enabled. + * + * @return string|null + */ + public function getApcuPrefix() + { + return $this->apcuPrefix; + } + + /** + * Registers this instance as an autoloader. + * + * @param bool $prepend Whether to prepend the autoloader or not + */ + public function register($prepend = false) + { + spl_autoload_register(array($this, 'loadClass'), true, $prepend); + + if (null === $this->vendorDir) { + return; + } + + if ($prepend) { + self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders; + } else { + unset(self::$registeredLoaders[$this->vendorDir]); + self::$registeredLoaders[$this->vendorDir] = $this; + } + } + + /** + * Unregisters this instance as an autoloader. + */ + public function unregister() + { + spl_autoload_unregister(array($this, 'loadClass')); + + if (null !== $this->vendorDir) { + unset(self::$registeredLoaders[$this->vendorDir]); + } + } + + /** + * Loads the given class or interface. + * + * @param string $class The name of the class + * @return bool|null True if loaded, null otherwise + */ + public function loadClass($class) + { + if ($file = $this->findFile($class)) { + includeFile($file); + + return true; + } + } + + /** + * Finds the path to the file where the class is defined. + * + * @param string $class The name of the class + * + * @return string|false The path if found, false otherwise + */ + public function findFile($class) + { + // class map lookup + if (isset($this->classMap[$class])) { + return $this->classMap[$class]; + } + if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { + return false; + } + if (null !== $this->apcuPrefix) { + $file = apcu_fetch($this->apcuPrefix.$class, $hit); + if ($hit) { + return $file; + } + } + + $file = $this->findFileWithExtension($class, '.php'); + + // Search for Hack files if we are running on HHVM + if (false === $file && defined('HHVM_VERSION')) { + $file = $this->findFileWithExtension($class, '.hh'); + } + + if (null !== $this->apcuPrefix) { + apcu_add($this->apcuPrefix.$class, $file); + } + + if (false === $file) { + // Remember that this class does not exist. + $this->missingClasses[$class] = true; + } + + return $file; + } + + /** + * Returns the currently registered loaders indexed by their corresponding vendor directories. + * + * @return self[] + */ + public static function getRegisteredLoaders() + { + return self::$registeredLoaders; + } + + private function findFileWithExtension($class, $ext) + { + // PSR-4 lookup + $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; + + $first = $class[0]; + if (isset($this->prefixLengthsPsr4[$first])) { + $subPath = $class; + while (false !== $lastPos = strrpos($subPath, '\\')) { + $subPath = substr($subPath, 0, $lastPos); + $search = $subPath . '\\'; + if (isset($this->prefixDirsPsr4[$search])) { + $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); + foreach ($this->prefixDirsPsr4[$search] as $dir) { + if (file_exists($file = $dir . $pathEnd)) { + return $file; + } + } + } + } + } + + // PSR-4 fallback dirs + foreach ($this->fallbackDirsPsr4 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { + return $file; + } + } + + // PSR-0 lookup + if (false !== $pos = strrpos($class, '\\')) { + // namespaced class name + $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) + . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); + } else { + // PEAR-like class name + $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; + } + + if (isset($this->prefixesPsr0[$first])) { + foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { + if (0 === strpos($class, $prefix)) { + foreach ($dirs as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + } + } + } + + // PSR-0 fallback dirs + foreach ($this->fallbackDirsPsr0 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + + // PSR-0 include paths. + if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { + return $file; + } + + return false; + } +} + +/** + * Scope isolated include. + * + * Prevents access to $this/self from included files. + */ +function includeFile($file) +{ + include $file; +} diff --git a/vendor/composer/InstalledVersions.php b/vendor/composer/InstalledVersions.php new file mode 100644 index 0000000..dfc36f6 --- /dev/null +++ b/vendor/composer/InstalledVersions.php @@ -0,0 +1,292 @@ + + array ( + 'pretty_version' => '1.0.0+no-version-set', + 'version' => '1.0.0.0', + 'aliases' => + array ( + ), + 'reference' => NULL, + 'name' => '__root__', + ), + 'versions' => + array ( + '__root__' => + array ( + 'pretty_version' => '1.0.0+no-version-set', + 'version' => '1.0.0.0', + 'aliases' => + array ( + ), + 'reference' => NULL, + ), + 'biblys/isbn' => + array ( + 'pretty_version' => '2.4.0', + 'version' => '2.4.0.0', + 'aliases' => + array ( + ), + 'reference' => '319408b2ef9aeea4f46304ac1a9868ea3ceff2ad', + ), + ), +); +private static $canGetVendors; +private static $installedByVendor = array(); + + + + + + + +public static function getInstalledPackages() +{ +$packages = array(); +foreach (self::getInstalled() as $installed) { +$packages[] = array_keys($installed['versions']); +} + + +if (1 === \count($packages)) { +return $packages[0]; +} + +return array_keys(array_flip(\call_user_func_array('array_merge', $packages))); +} + + + + + + + + + +public static function isInstalled($packageName) +{ +foreach (self::getInstalled() as $installed) { +if (isset($installed['versions'][$packageName])) { +return true; +} +} + +return false; +} + + + + + + + + + + + + + + +public static function satisfies(VersionParser $parser, $packageName, $constraint) +{ +$constraint = $parser->parseConstraints($constraint); +$provided = $parser->parseConstraints(self::getVersionRanges($packageName)); + +return $provided->matches($constraint); +} + + + + + + + + + + +public static function getVersionRanges($packageName) +{ +foreach (self::getInstalled() as $installed) { +if (!isset($installed['versions'][$packageName])) { +continue; +} + +$ranges = array(); +if (isset($installed['versions'][$packageName]['pretty_version'])) { +$ranges[] = $installed['versions'][$packageName]['pretty_version']; +} +if (array_key_exists('aliases', $installed['versions'][$packageName])) { +$ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']); +} +if (array_key_exists('replaced', $installed['versions'][$packageName])) { +$ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']); +} +if (array_key_exists('provided', $installed['versions'][$packageName])) { +$ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']); +} + +return implode(' || ', $ranges); +} + +throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); +} + + + + + +public static function getVersion($packageName) +{ +foreach (self::getInstalled() as $installed) { +if (!isset($installed['versions'][$packageName])) { +continue; +} + +if (!isset($installed['versions'][$packageName]['version'])) { +return null; +} + +return $installed['versions'][$packageName]['version']; +} + +throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); +} + + + + + +public static function getPrettyVersion($packageName) +{ +foreach (self::getInstalled() as $installed) { +if (!isset($installed['versions'][$packageName])) { +continue; +} + +if (!isset($installed['versions'][$packageName]['pretty_version'])) { +return null; +} + +return $installed['versions'][$packageName]['pretty_version']; +} + +throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); +} + + + + + +public static function getReference($packageName) +{ +foreach (self::getInstalled() as $installed) { +if (!isset($installed['versions'][$packageName])) { +continue; +} + +if (!isset($installed['versions'][$packageName]['reference'])) { +return null; +} + +return $installed['versions'][$packageName]['reference']; +} + +throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); +} + + + + + +public static function getRootPackage() +{ +$installed = self::getInstalled(); + +return $installed[0]['root']; +} + + + + + + + +public static function getRawData() +{ +return self::$installed; +} + + + + + + + + + + + + + + + + + + + +public static function reload($data) +{ +self::$installed = $data; +self::$installedByVendor = array(); +} + + + + +private static function getInstalled() +{ +if (null === self::$canGetVendors) { +self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders'); +} + +$installed = array(); + +if (self::$canGetVendors) { +foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { +if (isset(self::$installedByVendor[$vendorDir])) { +$installed[] = self::$installedByVendor[$vendorDir]; +} elseif (is_file($vendorDir.'/composer/installed.php')) { +$installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php'; +} +} +} + +$installed[] = self::$installed; + +return $installed; +} +} diff --git a/vendor/composer/LICENSE b/vendor/composer/LICENSE new file mode 100644 index 0000000..f27399a --- /dev/null +++ b/vendor/composer/LICENSE @@ -0,0 +1,21 @@ + +Copyright (c) Nils Adermann, Jordi Boggiano + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php new file mode 100644 index 0000000..b26f1b1 --- /dev/null +++ b/vendor/composer/autoload_classmap.php @@ -0,0 +1,10 @@ + $vendorDir . '/composer/InstalledVersions.php', +); diff --git a/vendor/composer/autoload_namespaces.php b/vendor/composer/autoload_namespaces.php new file mode 100644 index 0000000..6a29f76 --- /dev/null +++ b/vendor/composer/autoload_namespaces.php @@ -0,0 +1,10 @@ + array($vendorDir . '/biblys/isbn/src'), +); diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php new file mode 100644 index 0000000..b265c64 --- /dev/null +++ b/vendor/composer/autoload_psr4.php @@ -0,0 +1,9 @@ += 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); + if ($useStaticLoader) { + require __DIR__ . '/autoload_static.php'; + + call_user_func(\Composer\Autoload\ComposerStaticInit5ddf49d1cb81d6a311c8de21eb32ffcc::getInitializer($loader)); + } else { + $map = require __DIR__ . '/autoload_namespaces.php'; + foreach ($map as $namespace => $path) { + $loader->set($namespace, $path); + } + + $map = require __DIR__ . '/autoload_psr4.php'; + foreach ($map as $namespace => $path) { + $loader->setPsr4($namespace, $path); + } + + $classMap = require __DIR__ . '/autoload_classmap.php'; + if ($classMap) { + $loader->addClassMap($classMap); + } + } + + $loader->register(true); + + return $loader; + } +} diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php new file mode 100644 index 0000000..cacfa98 --- /dev/null +++ b/vendor/composer/autoload_static.php @@ -0,0 +1,31 @@ + + array ( + 'Biblys' => + array ( + 0 => __DIR__ . '/..' . '/biblys/isbn/src', + ), + ), + ); + + public static $classMap = array ( + 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', + ); + + public static function getInitializer(ClassLoader $loader) + { + return \Closure::bind(function () use ($loader) { + $loader->prefixesPsr0 = ComposerStaticInit5ddf49d1cb81d6a311c8de21eb32ffcc::$prefixesPsr0; + $loader->classMap = ComposerStaticInit5ddf49d1cb81d6a311c8de21eb32ffcc::$classMap; + + }, null, ClassLoader::class); + } +} diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json new file mode 100644 index 0000000..2522907 --- /dev/null +++ b/vendor/composer/installed.json @@ -0,0 +1,60 @@ +{ + "packages": [ + { + "name": "biblys/isbn", + "version": "2.4.0", + "version_normalized": "2.4.0.0", + "source": { + "type": "git", + "url": "https://github.com/biblys/isbn.git", + "reference": "319408b2ef9aeea4f46304ac1a9868ea3ceff2ad" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/biblys/isbn/zipball/319408b2ef9aeea4f46304ac1a9868ea3ceff2ad", + "reference": "319408b2ef9aeea4f46304ac1a9868ea3ceff2ad", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "require-dev": { + "guzzlehttp/guzzle": "^6.2", + "phpunit/phpunit": "^6 || ^7 || ^8" + }, + "time": "2021-03-05T00:00:00+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-0": { + "Biblys": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Clement Bourgoin", + "email": "c@iwzr.fr" + } + ], + "description": "A PHP library to convert and validate ISBNs", + "homepage": "https://github.com/biblys/isbn", + "keywords": [ + "ISBN", + "book", + "ean", + "gtin" + ], + "support": { + "issues": "https://github.com/biblys/isbn/issues", + "source": "https://github.com/biblys/isbn/tree/2.4.0" + }, + "install-path": "../biblys/isbn" + } + ], + "dev": true, + "dev-package-names": [] +} diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php new file mode 100644 index 0000000..82e002e --- /dev/null +++ b/vendor/composer/installed.php @@ -0,0 +1,33 @@ + + array ( + 'pretty_version' => '1.0.0+no-version-set', + 'version' => '1.0.0.0', + 'aliases' => + array ( + ), + 'reference' => NULL, + 'name' => '__root__', + ), + 'versions' => + array ( + '__root__' => + array ( + 'pretty_version' => '1.0.0+no-version-set', + 'version' => '1.0.0.0', + 'aliases' => + array ( + ), + 'reference' => NULL, + ), + 'biblys/isbn' => + array ( + 'pretty_version' => '2.4.0', + 'version' => '2.4.0.0', + 'aliases' => + array ( + ), + 'reference' => '319408b2ef9aeea4f46304ac1a9868ea3ceff2ad', + ), + ), +); diff --git a/vendor/composer/platform_check.php b/vendor/composer/platform_check.php new file mode 100644 index 0000000..6d3407d --- /dev/null +++ b/vendor/composer/platform_check.php @@ -0,0 +1,26 @@ += 70100)) { + $issues[] = 'Your Composer dependencies require a PHP version ">= 7.1.0". You are running ' . PHP_VERSION . '.'; +} + +if ($issues) { + if (!headers_sent()) { + header('HTTP/1.1 500 Internal Server Error'); + } + if (!ini_get('display_errors')) { + if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { + fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL); + } elseif (!headers_sent()) { + echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL; + } + } + trigger_error( + 'Composer detected issues in your platform: ' . implode(' ', $issues), + E_USER_ERROR + ); +} diff --git a/web/errors.php b/web/errors.php new file mode 100644 index 0000000..b69b52c --- /dev/null +++ b/web/errors.php @@ -0,0 +1,10 @@ +"; + print_r($l); + print ""; + $output = ob_get_clean(); + Template::render( $output); +?> diff --git a/web/index.php b/web/index.php new file mode 100644 index 0000000..df5347b --- /dev/null +++ b/web/index.php @@ -0,0 +1,46 @@ +'OK', 'ERROR'=>'ERROR']; + + ob_start(); + print "

Book ID input

"; + print "
"; + print '
'; + print '
'; + print '

ID type

'; + print ''; + print '
'; + print ''; + print '
'; + print '
'; + print ''; + print ''; + print ''; + print ''; + print '
'; + if (isset ($_GET['ret'])){ + if (array_key_exists($_GET['ret'],$rets)){ + $r = $rets[$_GET['ret']]; + print "

$r

"; + } + } + print "
"; + + + print "

Errors

"; + print "
".errors()."
"; + + $output = ob_get_clean(); + Template::render($output); + + function errors(){ + ob_start(); + $a = file("../data/isbn-error.txt"); + $r = array_reverse($a); + print "
";
+        foreach ($r as $l){
+            print($l);
+        }
+        print "
"; + return ob_get_clean(); + } diff --git a/web/scan.php b/web/scan.php new file mode 100644 index 0000000..5da954b --- /dev/null +++ b/web/scan.php @@ -0,0 +1,17 @@ + diff --git a/web/store.inc b/web/store.inc new file mode 100644 index 0000000..3ab3c17 --- /dev/null +++ b/web/store.inc @@ -0,0 +1,51 @@ +"; + print ""; + print " "; + print ' '; + print '