Enqueue JS Cookie libs.

@since 170623.59000 JS Cookie libs.

@return array Library details.
517028
public function enqueueJsCookieLibs()
    {
        if (($data = $this->didEnqueueLibs(__METHOD__))) {
            return $data; // Did this already.
        } // We only need to enqueue once.

        $data = [
            'scripts' => [
                'js-cookie' => [
                    'version' => '2.1.4',
                    'url'     => 'https://cdnjs.cloudflare.com/ajax/libs/js-cookie/%1$s/js.cookie.min.js',
                ],
            ],
        ];
        return $this->enqueueLibs(__METHOD__, $data);
    }
1111061
public function enqueue() {
		wp_register_style(
			'bglib-ui-css',
			Library\Configs::get( 'libraryUrl' ) . 'src/assets/css/ui.css'
		);

		wp_register_script(
			'bglib-ui-js',
			Library\Configs::get( 'libraryUrl' ) . 'src/assets/js/ui.js',
			'jquery.sticky-kit'
		);

		wp_register_script(
			'bglib-sticky',
			Library\Configs::get( 'libraryUrl' ) . 'src/assets/js/sticky.js',
			'jquery'
		);

		wp_register_style(
			'bglib-attributes-css',
			Library\Configs::get( 'libraryUrl' ) . 'src/assets/css/attributes.css'
		);

		wp_register_script(
			'bglib-attributes-js',
			Library\Configs::get( 'libraryUrl' ) . 'src/assets/js/attributes.js',
			'jquery'
		);
	}
1052091
public function getBlockJson()
    {
        return json_encode(array(
            'container' => $this->getWrapperId(),
            'block' => $this->getBlockName(),
            'cookie' =>  $this->getCookie(),
            'additionalCookies' => (object)$this->getAdditionalCookies(),
            'callback' =>  ($this->getCallback() ? $this->getCallback() : false)
        ));
    }
586802
public function getCookies()
    {
        $cookieArrays = $this->executor->execute(DriverCommand::GET_ALL_COOKIES);
        $cookies = [];

        foreach ($cookieArrays as $cookieArray) {
            $cookies[] = Cookie::createFromArray($cookieArray);
        }

        return $cookies;
    }
326289
protected function registerCookie()
	{
		$this->app['sentry.cookie'] = $this->app->share(function($app)
		{
			$key = $app['config']['cartalyst/sentry::cookie.key'];

			/**
			 * We'll default to using the 'request' strategy, but switch to
			 * 'jar' if the Laravel version in use is 4.0.*
			 */

			$strategy = 'request';

			if (preg_match('/^4\.0\.\d*$/D', $app::VERSION))
			{
				$strategy = 'jar';
			}

			return new IlluminateCookie($app['request'], $app['cookie'], $key, $strategy);
		});
	}
668076
public function enqueueSharkiconLibs()
    {
        if (($data = $this->didEnqueueLibs(__METHOD__))) {
            return $data; // Did this already.
        } // We only need to enqueue once.

        $data = [
            'styles' => [
                'sharkicons' => [
                    'ver' => $this->cv,
                    'url' => $this->c::appCoreUrl('/vendor/websharks/sharkicons/src/long-classes.min.css'),
                ],
            ],
        ];
        return $this->enqueueLibs(__METHOD__, $data);
    }
500228
public function js()
    {
        $args = [];
        $args = func_get_args();

        if (isset($args[1])) {
            $args[1] = array_merge($args[1], ['type' => 'static']);
        } else {
            $args[1] = ['type' => 'static'];
        }

        return call_user_func_array([new static($this->container), 'script'], $args);
    }
956288
public function enqueueScripts()
    {
        $posttypesEnabled = self::getOption('options_readspeaker-helper-enable-posttypes');
        if (!is_array($posttypesEnabled) || !in_array(get_post_type(), $posttypesEnabled)) {
            return;
        }

        /**
         * Enqueue readspeaker script
         */
        wp_register_script(
            'readspeaker',
            '//f1-eu.readspeaker.com/script/' . self::$customerId . '/ReadSpeaker.js?pids=embhl&jit=1',
            array(),
            '1.0.0',
            self::getOption('options_readspeaker-helper-script-footer')
        );
        wp_enqueue_script('readspeaker');
    }
1095451
protected function _cookies() {
		$cookies = $this->cookies;
		$invalid = str_split(",; \+\t\r\n\013\014");
		$replace = array_map('rawurlencode', $invalid);

		foreach ($cookies as $key => &$value) {
			if (!is_scalar($value)) {
				$message = "Non-scalar value cannot be rendered for cookie `{$key}`";
				throw new UnexpectedValueException($message);
			}
			$value = strtr($value, array_combine($invalid, $replace));
			$value = "{$key}={$value}";
		}
		return implode('; ', $cookies);
	}
1059695
public function libraries()
    {
        if (is_null($this->libraryRequests)) {
            $this->libraryRequests = new LibraryRequests($this->client);
        }

        return $this->libraryRequests;
    }
993289
protected function prepareCookies()
    {
        $cookiesString = '';

        foreach ($this->cookies as $cookie => $value) {
            $cookiesString .= $cookie.'='.$value.'; ';
        }

        return $cookiesString;
    }
1364154
public static function &getCookies() {
		static $instance;
		//only create a new plugin instance if it has not been created before
		if (!isset($instance)) {
			$instance = new Cookies(Config::get()->get('apikey'));
		}
		return $instance;
	}
1196343
public function getCookieParams()
    {
        $cookies = [];
        foreach ($this->headers->getCookies() as $cookie) {
            $cookies[$cookie->getName()] = $cookie->getValue();
        };
        return $cookies;
    }
1294691
private function getCookieId()
    {
        return $this->trackIfEnabled('cookies', function () {
            return ! is_null($name = $this->getConfig('cookie.name'))
                ? $this->getCookieTracker()->track($this->request->cookie($name))
                : null;
        });
    }
85913
public function enqueueMenuPageLibs()
    {
        if (($data = $this->didEnqueueLibs(__METHOD__))) {
            return $data; // Did this already.
        } // We only need to enqueue once.

        $this->enqueueSharkiconLibs();

        $data = [
            'styles' => [
                $this->App::CORE_CONTAINER_SLUG.'-menu-page' => [
                    'ver'  => $this->cv,
                    'deps' => ['sharkicons', 'wp-color-picker'],
                    'url'  => $this->c::appCoreUrl('/client-s/css/admin/menu-page/core.min.css'),
                ],
            ],
            'scripts' => [
                $this->App::CORE_CONTAINER_SLUG.'-menu-page' => [
                    'ver'      => $this->cv,
                    'deps'     => ['jquery', 'underscore', 'jquery-ui-tooltip', 'wp-color-picker'],
                    'url'      => $this->c::appCoreUrl('/client-s/js/admin/menu-page/core.min.js'),
                    'localize' => [
                        'key'  => 'nuqvUt59Aqv9RhzvhjafETjNS5hAFScXMenuPageData',
                        'data' => [
                            'coreContainerSlug' => $this->App::CORE_CONTAINER_SLUG,
                            'coreContainerVar'  => $this->App::CORE_CONTAINER_VAR,
                            'coreContainerName' => $this->App::CORE_CONTAINER_NAME,

                            'currentMenuPage'    => $this->s::currentMenuPage(),
                            'currentMenuPageTab' => $this->s::currentMenuPageTab(),
                        ],
                    ],
                ],
            ],
        ];
        return $this->enqueueLibs(__METHOD__, $data);
    }
434448
public static function cookies()
    {
        return function (callable $handler) {
            return function ($request, array $options) use ($handler) {
                if (empty($options['cookies'])) {
                    return $handler($request, $options);
                } elseif (!($options['cookies'] instanceof CookieJarInterface)) {
                    throw new \InvalidArgumentException('cookies must be an instance of GuzzleHttp\Cookie\CookieJarInterface');
                }
                $cookieJar = $options['cookies'];
                $request = $cookieJar->withCookieHeader($request);
                return $handler($request, $options)
                    ->then(
                        function ($response) use ($cookieJar, $request) {
                            $cookieJar->extractCookies($request, $response);
                            return $response;
                        }
                );
            };
        };
    }
950671
public function getJavascripts()
    {
        $self = $this;
        $parse_javascripts = function ($params, $javascripts) use ($self) {
            foreach ($params as $js) {

                if (is_string($js)) {
                    $js = array(
                        'path'  => $js,
                    );
                } elseif (isset($js['route'])) {
                    $js = array(
                        'path'  => $self->getGenerator()
                                        ->getContainer()
                                        ->get('router')
                                        ->generate($js['route'], $js['routeparams'])
                    );
                }

                $javascripts[] = $js;
            }

            return $javascripts;
        };

        // From config.yml
        $javascripts = $parse_javascripts(
            $this->getGenerator()->getContainer()
                 ->getParameter('admingenerator.javascripts', array()), array()
        );

        // From generator.yml
        $javascripts = $parse_javascripts(
            $this->getVariable('javascripts', array()), $javascripts
        );

        return $javascripts;
    }