+ //The bundle default values
+ $defaults = [
+ //XXX: use a path relative to __DIR__ as console and index do not have the same execution directory
+ //XXX: use realpath on var/cache only as alias subdirectory may not yet exists
+ 'cache' => realpath(dirname(__DIR__).'/../../../var/cache').'/'.$alias,
+ 'captcha' => [
+ 'background' => 'white',
+ 'fill' => '#cff',
+ 'format' => 'jpeg',
+ 'height' => 52,
+ 'size' => 45,
+ 'border' => '#00c3f9',
+ 'thickness' => 2,
+ 'width' => 192
+ ],
+ 'context' => [
+ 'http' => [
+ 'max_redirects' => $_ENV['RAPSYSPACK_REDIRECT'] ?? 20,
+ 'timeout' => $_ENV['RAPSYSPACK_TIMEOUT'] ?? (($timeout = ini_get('default_socket_timeout')) !== false && $timeout !== '' ? (float)$timeout : 60),
+ 'user_agent' => $_ENV['RAPSYSPACK_AGENT'] ?? (($agent = ini_get('user_agent')) !== false && $agent !== '' ? (string)$agent : $alias.'/'.($version = RapsysPackBundle::getVersion()))
+ ]
+ ],
+ 'facebook' => [
+ 'align' => 'center',
+ 'fill' => 'white',
+ 'font' => 'default',
+ 'format' => 'jpeg',
+ 'height' => 630,
+ 'size' => 60,
+ 'source' => dirname(__DIR__).'/public/facebook/source.png',
+ 'border' => '#00c3f9',
+ 'thickness' => 15,
+ 'width' => 1200
+ ],
+ 'filters' => [
+ 'css' => [
+ 0 => [
+ 'class' => 'Rapsys\PackBundle\Filter\CPackFilter',
+ 'args' => [
+ $finder->find('cpack', '/usr/local/bin/cpack'),
+ 'minify'
+ ]
+ ]
+ ],
+ 'img' => [
+ 0 => [
+ 'class' => 'Rapsys\PackBundle\Filter\IPackFilter',
+ 'args' => []
+ ]
+ ],
+ 'js' => [
+ 0 => [
+ 'class' => 'Rapsys\PackBundle\Filter\JPackFilter',
+ 'args' => [
+ $finder->find('jpack', '/usr/local/bin/jpack'),
+ 'best'
+ ]
+ ]
+ ]
+ ],
+ 'fonts' => [
+ 'default' => '/usr/share/fonts/TTF/dejavu/DejaVuSans.ttf',
+ #TODO: move these in veranda config ? with *: %rapsyspack.public%/woff2/*.woff2 ?
+ 'droidsans' => dirname(__DIR__).'/public/woff2/droidsans.regular.woff2',
+ 'droidsansb' => dirname(__DIR__).'/public/woff2/droidsans.bold.woff2',
+ 'droidsansi' => dirname(__DIR__).'/public/woff2/droidserif.italic.woff2',
+ 'droidsansm' => dirname(__DIR__).'/public/woff2/droidsansmono.regular.woff2',
+ 'droidserif' => dirname(__DIR__).'/public/woff2/droidserif.regular.woff2',
+ 'droidserifb' => dirname(__DIR__).'/public/woff2/droidserif.bold.woff2',
+ 'droidserifbi' => dirname(__DIR__).'/public/woff2/droidserif.bolditalic.woff2',
+ 'irishgrover' => dirname(__DIR__).'/public/woff2/irishgrover.v10.woff2',
+ 'lemon' => dirname(__DIR__).'/public/woff2/lemon.woff2',
+ 'notoemoji' => dirname(__DIR__).'/public/woff2/notoemoji.woff2'
+ ],
+ 'map' => [
+ 'border' => '#00c3f9',
+ 'fill' => '#cff',
+ 'format' => 'jpeg',
+ 'height' => 640,
+ 'quality' => 70,
+ 'radius' => 5,
+ 'server' => 'osm',
+ 'thickness' => 2,
+ 'tz' => 256,
+ 'width' => 640,
+ 'zoom' => 17
+ ],
+ 'multi' => [
+ 'border' => '#00c3f9',
+ 'fill' => '#cff',
+ 'format' => 'jpeg',
+ 'height' => 640,
+ 'highborder' => '#3333c3',
+ 'highfill' => '#c3c3f9',
+ 'highradius' => 6,
+ 'highsize' => 30,
+ 'highthickness' => 4,
+ 'quality' => 70,
+ 'radius' => 5,
+ 'server' => 'osm',
+ 'size' => 20,
+ 'thickness' => 2,
+ 'tz' => 256,
+ 'width' => 640,
+ 'zoom' => 17
+ ],
+ 'prefixes' => [
+ 'captcha' => 'captcha',
+ 'css' => 'css',
+ 'facebook' => 'facebook',
+ 'img' => 'img',
+ 'map' => 'map',
+ 'multi' => 'multi',
+ 'pack' => 'pack',
+ 'thumb' => 'thumb',
+ 'js' => 'js'
+ ],
+ //XXX: use a path relative to __DIR__ as console and index do not have the same execution directory
+ 'public' => dirname(__DIR__).'/public',
+ 'routes' => [
+ 'css' => 'rapsyspack_css',
+ 'img' => 'rapsyspack_img',
+ 'js' => 'rapsyspack_js'
+ ],
+ 'servers' => [
+ 'cycle' => 'http://a.tile.thunderforest.com/cycle/{Z}/{X}/{Y}.png',
+ 'osm' => 'https://tile.openstreetmap.org/{Z}/{X}/{Y}.png',
+ 'transport' => 'http://a.tile.thunderforest.com/transport/{Z}/{X}/{Y}.png'
+ ],
+ 'thumb' => [
+ 'height' => 128,
+ 'width' => 128
+ ],
+ 'tokens' => [
+ 'css' => 'asset',
+ 'img' => 'asset',
+ 'js' => 'asset'
+ ]
+ ];