
    -ej                    b   U d Z ddlmZ ddlZ ej        e          ZddlZddlm	Z	m
Z
mZ ddlmZmZmZmZmZmZmZmZmZ ddlZddlmZmZ erddlmZ dd	lmZ dd
lmZ dZ d5dZ!d6dZ"d7dZ#ed         Z$de%d<   ee&df         Z'de%d<   ej(        ej)        ej*        ej+        ej,        dddZ-d8dZ.ed         Z/d9d!Z0d5d"Z1 G d# d$          Z2 ed%          Z3ee3e4e2         f         Z5de%d&<   d:d'Z6 G d( d)ee3                   Z7 e e
d*          d+d,          fZ8d-e%d.<    G d/ d0          Z9 e9            Z:e:;                                Z<e<  e=e<          d1k     rdd2l>m?Z?  e?d3           [<e:@                                r'e:;                                dd2l>m?Z?  e?d4           dS dS dS );a
   Control global configuration options with environment variables.
A global settings object that other parts of Bokeh can refer to.

Defined Settings
~~~~~~~~~~~~~~~~

Settings are accessible on the ``bokeh.settings.settings`` instance, via
accessor methods. For instance:

.. code-block:: python

    settings.minified()

Bokeh provides the following defined settings:

.. bokeh-settings:: settings
    :module: bokeh.settings

Precedence
~~~~~~~~~~

Setting values are always looked up in the following prescribed order:

immediately supplied values
    These are values that are passed to the setting:

    .. code-block:: python

        settings.minified(minified_val)

    If ``minified_val`` is not None, then it will be returned, as-is.
    Otherwise, if None is passed, then the setting will continute to look
    down the search order for a value. This is useful for passing optional
    function paramters that are None by default. If the parameter is passed
    to the function, then it will take precedence.

previously user-set values
    If the value is set explicity in code:

    .. code-block:: python

        settings.minified = False

    Then this value will take precedence over other sources. Applications
    may use this ability to set values supplied on the command line, so that
    they take precedence over environment variables.

user-specified config override file
    Values from a YAML configuration file that is explicitly loaded:

    .. code-block:: python

        settings.load_config("/path/to/bokeh.yaml)

    Any values from ``bokeh.yaml`` will take precedence over the sources
    below. Applications may offer command line arguments to load such a
    file. e.g. ``bokeh serve --use-config myconf.yaml``

environment variable
    Values found in the associated environment variables:

    .. code-block:: sh

        BOKEH_MINIFIED=no bokeh serve app.py

local user config file
    Bokeh will look for a YAML configuration file in the current user's
    home directory ``${HOME}/.bokeh/bokeh.yaml``.

global system configuration (not yet implemented)
    Future support is planned to load Bokeh settings from global system
    configurations.

local defaults
    These are default values defined when accessing the setting:

    .. code-block:: python

        settings.resources(default="server")

    Local defaults have lower precendence than every other setting mechanism
    except global defaults.

global defaults
    These are default values defined by the setting declarations. They have
    lower precedence than every other setting mechanism.

If no value is obtained after searching all of these locations, then a
RuntimeError will be raised.

API
~~~

There are a few methods on the ``settings`` object:

.. autoclass:: Settings
    :members:

    )annotationsN)abspath
expanduserjoin)	TYPE_CHECKINGAnyCallableGenericLiteralSequenceTypeVarUnioncast   )
bokehjsdir	serverdir)	TypeAlias)PathLike)ResourcesMode)settingsvaluestrreturnc                    | S )z Return a string as-is.
     r   s    .lib/python3.11/site-packages/bokeh/settings.pyconvert_strr      s	     L    
bool | strboolc                    t          | t                    r| S |                                 }|dv rdS |dv rdS t          d|  d          )an   Convert a string to True or False.

    If a boolean is passed in, it is returned as-is. Otherwise the function
    maps the following strings, ignoring case:

    * "yes", "1", "on" -> True
    * "no", "0", "off" -> False

    Args:
        value (str):
            A string value to convert to bool

    Returns:
        bool

    Raises:
        ValueError

    )yes1ontrueTrueT)no0offfalseFalseFCannot convert z to boolean value)
isinstancer!   lower
ValueError)r   vals     r   convert_boolr2      sd    ( % 
++--C
000t
222u
?u???
@
@@r   list[str] | str	list[str]c                    t          | t          t          f          r| S 	 |                     d          S # t          $ r t          d|  d          w xY w)z Convert a string to a list of strings.

    If a list or tuple is passed in, it is returned as-is.

    Args:
        value (seq[str] or str) :
            A string to convert to a list of strings

    Returns
        list[str]

    ,r-   z to list value)r.   listtuplesplit	Exceptionr0   r   s    r   convert_str_seqr;      sp     %$'' B{{3 B B B@5@@@AAABs	   5 A)tracedebuginfowarnerrorfatalr   LogLevel
PyLogLevel	   )CRITICALERRORWARNINGINFODEBUGTRACENONE	str | intc                4   | t          | t                    r+| t          t                                                    v r| S n*|                                 } | t          v rt          |          S t          d|  dd                    t                               )a  Convert a string to a Python logging level

    If a log level is passed in, it is returned as-is. Otherwise the function
    understands the following strings, ignoring case:

    * "critical"
    * "error"
    * "warning"
    * "info"
    * "debug"
    * "trace"
    * "none"

    Args:
        value (str):
            A string value to convert to a logging level

    Returns:
        int or None

    Raises:
        ValueError

    Nr-   z! to log level, valid values are: z, )r.   intset_log_levelsvaluesupperr0   r   r   s    r   convert_loggingrS      s    2 }
5#..}C**,,----L . Ku%%
guggtyyYdOeOegg
h
hhr   )noneerrorsallstr | ValidationLevelValidationLevelc                    h d}|                                  }||v rt          t          |          S t          d| d|          )a  Convert a string to a validation level

    If a validation level is passed in, it is returned as-is.

    Args:
        value (str):
            A string value to convert to a validation level

    Returns:
        string

    Raises:
        ValueError

    >   rV   rT   rU   r-   z( to validation level, valid values are: )r/   r   rX   r0   )r   VALID_LEVELSlowereds      r   convert_validationr\     sW      -,,LkkmmG,OW---
huhhXdhh
i
iir   c                   |                                  }|dk    rdS |dk    rt          t                      dd          S |dk    rt          t                      dd          S |                     d          st	          d| d	          | S )
zConvert a string to an .ico path

    Args:
        value (str):
            A string value to convert to a .ico path

    Returns:
        string

    Raises:
        ValueError

    rT   defaultviewsz	bokeh.icodefault-devzbokeh-dev.icoz.icor-   z to valid .ico path)r/   r   r   endswithr0   )r   r[   s     r   convert_ico_pathrb   '  s     kkmmG&v)IKK+666 -IKK/:::>>&!! IG5GGGHHHLr   c                      e Zd ZdS )_UnsetN)__name__
__module____qualname__r   r   r   rd   rd   F  s          r   rd   TUnsetc                 \    t          t          j                            dd                    S )N	BOKEH_DEVF)r2   osenvirongetr   r   r   is_devro   L  s     
{E::;;;r   c                     e Zd ZU dZded<   ded<   deeddfd*dZdefd+dZd,dZd-d Z	d.d!Z
d/d"Zd0d#Zed1d$            Zed2d%            Zed2d&            Zed3d'            Zed3d(            Zed3d)            ZdS )4PrioritizedSettinga   Return a value for a global setting according to configuration precedence.

    The following methods are searched in order for the setting:

    7. immediately supplied values
    6. previously user-set values (e.g. set from command line)
    5. user-specified config override file
    4. environment variable
    3. local user config file
    2. global system config file (not yet implemented)
    1. local defaults
    0. global defaults

    Ref: https://stackoverflow.com/a/11077282/3406693

    If a value cannot be determined, a ValueError is raised.

    The ``env_var`` argument specifies the name of an environment to check for
    setting values, e.g. ``"BOKEH_LOG_LEVEL"``.

    The optional ``default`` argument specified an implicit default value for
    the setting that is returned if no other methods provide a value.

    A ``convert`` agument may be provided to convert values before they are
    returned. For instance to concert log levels in environment variables
    to ``logging`` module values.
    zSettings | None_parentzUnset[str | T]_user_valueN namer   env_var
str | Noner^   Unset[T]dev_defaultconvertCallable[[T | str], T] | Nonehelpr   Nonec                    |r|nt           | _        || _        || _        || _        || _        || _        d | _        t          | _	        d S N)
r   _convert_default_dev_default_env_var_help_namerr   rd   rs   )selfru   rv   r^   ry   rz   r|   s          r   __init__zPrioritizedSetting.__init__o  sK    #*;'

!r   r   T | str | Nonerh   c                   ||                      |          S | j        t          ur|                      | j                  S | j        r=| j        | j        j        v r*|                      | j        j        | j                           S | j        r=| j        t          j        v r*|                      t          j        | j                           S | j        r=| j        | j        j	        v r*|                      | j        j	        | j                           S | j        r=| j        | j        j
        v r*|                      | j        j
        | j                           S t                      r(| j        t          ur|                      | j                  S |t          ur|                      |          S | j        t          ur|                      | j                  S t          d| j                  )a  Return the setting value according to the standard precedence.

        Args:
            value (any, optional):
                An optional immediate value. If not None, the value will
                be converted, then returned.

            default (any, optional):
                An optional default value that only takes precendence over
                implicit default values specified on the property itself.

        Returns:
            str or int or float

        Raises:
            RuntimeError
        Nz&No configured value found for setting )r   rs   rd   rr   r   config_overrider   rl   rm   config_userconfig_systemro   r   r   RuntimeError)r   r   r^   s      r   __call__zPrioritizedSetting.__call__z  s   ( ==''' 6))==!1222 < 	KDJ$,*FFF==!=dj!IJJJ = 	<T]bj88==DM!:;;; < 	GDJ$,*BBB==!9$*!EFFF < 	IDJ$,*DDD==!;DJ!GHHH 88 	4)77==!2333 &  ==))) =&&==///RDJRRSSSr   instancer   owner	type[Any]PrioritizedSetting[T]c                    | S r   r   )r   r   r   s      r   __get__zPrioritizedSetting.__get__  s    r   str | Tc                0    |                      |           d S r   )	set_value)r   r   r   s      r   __set__zPrioritizedSetting.__set__  s    ur   c                .    |                                   d S r   )unset_value)r   r   s     r   
__delete__zPrioritizedSetting.__delete__  s    r   c                    || _         dS )a0   Specify a value for this setting programmatically.

        A value set this way takes precedence over all other methods except
        immediate values.

        Args:
            value (str or int or float):
                A user-set value for this setting

        Returns:
            None
        N)rs   )r   r   s     r   r   zPrioritizedSetting.set_value  s    " !r   c                    t           | _        dS )zI Unset the previous user value such that the priority is reset.

        N)rd   rs   r   s    r   r   zPrioritizedSetting.unset_value  s     "r   c                    | j         S r   )r   r   s    r   rv   zPrioritizedSetting.env_var  
    }r   c                    | j         S r   )r   r   s    r   r^   zPrioritizedSetting.default  r   r   c                    | j         S r   )r   r   s    r   ry   zPrioritizedSetting.dev_default  s      r   c                    | j         S r   )r   r   s    r   ru   zPrioritizedSetting.name  
    zr   c                    | j         S r   )r   r   s    r   r|   zPrioritizedSetting.help  r   r   c                    | j         t          u rdS | j         t          u rdS | j         t          u rdS | j         t          u rdS | j         t
          u rdS | j         t          u rdS t          d          )NStringBoolz	Log LevelzList[String]zValidation LevelzIco Pathunreachable)r   r   r2   rS   r;   r\   rb   r   r   s    r   convert_typezPrioritizedSetting.convert_type  s    =K''8=L((6=O++;=O++!>=...%%=,,,:=)))r   )ru   r   rv   rw   r^   rx   ry   rx   rz   r{   r|   r   r   r}   )r   r   r^   rx   r   rh   )r   r   r   r   r   r   )r   r   r   r   r   r}   )r   r   r   r}   )r   r   r   r}   r   r}   )r   rw   )r   rx   r   r   )re   rf   rg   __doc____annotations__rd   r   r   r   r   r   r   r   propertyrv   r^   ry   ru   r|   r   r   r   r   rq   rq   O  s         8 8<RX$*UYgi	" 	" 	" 	" 	" 04 7T 7T 7T 7T 7Tr         ! ! ! !&" " " "    X    X ! ! ! X!    X    X * * * X* * *r   rq   ~z.bokehz
bokeh.yamlSequence[str]_config_user_locationsc                  J   e Zd ZU dZded<   ded<   ded<   ddZedd	            Zedd
            Zedd            Z	edd            Z
 eddg ed          Zded<    edddd          Zded<    eddddd          Zded<    edddd           Zded!<    ed"d#dd$          Zded"<    ed%d&dd'          Zded%<    ed(d)dd*          Zded(<    ed+d,dd-          Zded+<    ed.d/d0d1ed23          Zd4ed.<    ed5d6d7ed8          Zd9ed5<    ed:d;d<d=d>          Zd?ed:<    ed@dAedBd7dCD          Zd9ed@<    edEdFddG          ZdedE<    edHdIedBdJK          Zd9edL<    edMdNd7dBdO          Zd9edM<    edPdQdd=edR3          ZdSedP<    edTdUdVdWdX          Z dYedT<    edZd[dd\          Z!d]edZ<    ed^d_d`da          Z"d4ed^<    edbdcddde          Z#dfedb<    edgdhddi          Z$dedg<    edjdkd7dl          Z%d9edj<    edmdndBedo          Z&d9edm<    edpdqddr          Z'dedp<    edsdtddu          Z(deds<    edvdwddx          Z)dedv<    edydzde*d{          Z+d|edy<    ed}d~d7ed          Z,d9ed}<   ddZ-ddZ.ddZ/ddZ0ddZ1ddZ2dS )Settingsz

    dict[str, Any]_config_override_config_user_config_systemr   r}   c                    i | _         |                     t                    | _        i | _        | j        j                                        D ]}t          |t                    r| |_
        d S r   )r   _try_load_configr   r   r   	__class____dict__rQ   r.   rq   rr   )r   xs     r   r   zSettings.__init__  sn     " 112HII (//11 	! 	!A!/00 ! 		! 	!r   c                *    t          | j                  S r   )dictr   r   s    r   r   zSettings.config_system  s    D'(((r   c                *    t          | j                  S r   )r   r   r   s    r   r   zSettings.config_user  s    D%&&&r   c                *    t          | j                  S r   )r   r   r   s    r   r   zSettings.config_override  s    D)***r   r!   c                    t                      S r   )ro   r   s    r   devzSettings.dev  s    xxr   allowed_ws_originBOKEH_ALLOW_WS_ORIGINz\
    A comma-separated list of allowed websocket origins for Bokeh server applications.
    )r^   rz   r|   zPrioritizedSetting[list[str]]auth_moduleBOKEH_AUTH_MODULENz
    A path to a Python modules that implements user authentication functions for
    the Bokeh server.

    .. warning::
        The contents of this module will be executed!

    )r^   r|   zPrioritizedSetting[str | None]browserBOKEH_BROWSERrT   z
    The default browser that Bokeh should use to show documents with.

    Valid values are any of the predefined browser names understood by the
    Python standard library :doc:`webbrowser <python:library/webbrowser>`
    module.
    )r^   ry   r|   versionBOKEH_CDN_VERSIONz
    What version of BokehJS to use with CDN resources.

    See the :class:`~bokeh.resources.Resources` class reference for full details.
    cdn_versionchromedriver_pathBOKEH_CHROMEDRIVER_PATHaX  
    The name of or full path to chromedriver's executable.

    This is used to allow ``bokeh.io.export`` to work on systems that use a
    different name for ``chromedriver``, like ``chromedriver-binary`` or
    ``chromium.chromedriver`` (or its variant, which is used for example
    by Snap package manager; see https://snapcraft.io/).
    cookie_secretBOKEH_COOKIE_SECRETz
    Configure the ``cookie_secret`` setting in Tornado. This value is required
    if you use ``get_secure_cookie`` or ``set_secure_cookie``.  It should be a
    long, random sequence of bytes
    docs_cdnBOKEH_DOCS_CDNaZ  
    The version of BokehJS that should be use for loading CDN resources when
    building the docs.

    To build and display the docs using a locally built BokehJS, use ``local``.
    For example:

    .. code-block:: sh

        BOKEH_DOCS_CDN=local make clean serve

    Will build a fresh copy of the docs using the locally built BokehJS and open
    a new browser tab to view them.

    Otherwise, the value is interpreted a version for CDN. For example:

    .. code-block:: sh

        BOKEH_DOCS_CDN=1.4.0rc1 make clean

    will build docs that use BokehJS version ``1.4.0rc1`` from CDN.
    docs_versionBOKEH_DOCS_VERSIONz
    The Bokeh version to stipulate when building the docs.

    This setting is necessary to re-deploy existing versions of docs with new
    fixes or changes.
    ico_pathBOKEH_ICO_PATHr^   r`   a8  
    Configure the file path to a .ico file for the Bokeh server to use as a
    favicon.ico file.

    The value should be the full path to a .ico file, or one the following
    special values:

    - ``default`` to use the default project .ico file
    - ``none`` to turn off favicon.ico support entirely

    )r^   ry   rz   r|   zPrioritizedSetting[str]ignore_filenameBOKEH_IGNORE_FILENAMEFzR
    Whether to ignore the current script filename when saving Bokeh content.
    zPrioritizedSetting[bool]	log_levelBOKEH_LOG_LEVELr>   r=   z
    Set the log level for JavaScript BokehJS code.

    Valid values are, in order of increasing severity:

    - ``trace``
    - ``debug``
    - ``info``
    - ``warn``
    - ``error``
    - ``fatal``

    zPrioritizedSetting[LogLevel]minifiedBOKEH_MINIFIEDTz>
    Whether Bokeh should use minified BokehJS resources.
    )rz   r^   ry   r|   nodejs_pathBOKEH_NODEJS_PATHaW  
    Path to the Node executable.

    NodeJS is an optional dependency that is required for PNG and SVG export,
    and for compiling custom extensions. Bokeh will try to automatically locate
    an installed Node executable. Use this environment variable to override the
    location Bokeh finds, or to point to a non-standard location.
    validate_docBOKEH_VALIDATE_DOCz
    whether Bokeh should perform validation checks on documents.

    Setting this value to False may afford a small performance improvement.
    )rz   r^   r|   perform_document_validationprettyBOKEH_PRETTYz8
    Whether JSON strings should be pretty-printed.
    py_log_levelBOKEH_PY_LOG_LEVELz
    The log level for Python Bokeh code.

    Valid values are, in order of increasing severity:

    - ``trace``
    - ``debug``
    - ``info``
    - ``warn``
    - ``error``
    - ``fatal``
    - ``none``

    zPrioritizedSetting[PyLogLevel]	resourcesBOKEH_RESOURCEScdnzabsolute-devz
    What kind of BokehJS resources to configure, e.g ``inline`` or ``cdn``

    See the :class:`~bokeh.resources.Resources` class reference for full details.
    z!PrioritizedSetting[ResourcesMode]rootdirBOKEH_ROOTDIRz
    Root directory to use with ``relative`` resources

    See the :class:`~bokeh.resources.Resources` class reference for full details.
    z#PrioritizedSetting[PathLike | None]default_server_hostBOKEH_DEFAULT_SERVER_HOST	localhostzQ
    Allows to define the default host used by Bokeh's server and resources.
    default_server_portBOKEH_DEFAULT_SERVER_PORTi  zQ
    Allows to define the default port used by Bokeh's server and resources.
    zPrioritizedSetting[int]
secret_keyBOKEH_SECRET_KEYzO
    A long, cryptographically-random secret unique to a Bokeh deployment.
    sign_sessionsBOKEH_SIGN_SESSIONSz
    Whether the Boeh server should only allow sessions signed with a secret key.

    If True, ``BOKEH_SECRET_KEY`` must also be set.
    
simple_idsBOKEH_SIMPLE_IDSz
    Whether Bokeh should use simple integers for model IDs (starting at 1000).

    If False, Bokeh will use UUIDs for object identifiers. This might be needed,
    e.g., if multiple processes are contributing to a single Bokeh Document.
    ssl_certfileBOKEH_SSL_CERTFILEz=
    The path to a certificate file for SSL termination.
    ssl_keyfileBOKEH_SSL_KEYFILEz=
    The path to a private key file for SSL termination.
    ssl_passwordBOKEH_SSL_PASSWORDz>
    A password to decrypt the SSL keyfile, if necessary.
    validation_levelBOKEH_VALIDATION_LEVELa"  
    Whether validation checks should log or raise exceptions on errors and warnings.

    Valid values are:

    - ``none``: no exceptions raised (default).
    - ``errors``: exception raised on errors (but not on warnings)
    - ``all``: exception raised on both errors and warnings

    z#PrioritizedSetting[ValidationLevel]xsrf_cookiesBOKEH_XSRF_COOKIESa  
    Whether to enable Tornado XSRF cookie protection on the Bokeh server. This
    is only applicable when also using an auth module or custom handlers. See

    https://www.tornadoweb.org/en/stable/guide/security.html#cross-site-request-forgery-protection

    for more information about XSRF protection in Tornado. All PUT, POST, and
    DELETE handlers will need to be appropriately instrumented when this setting
    is active.
    r   c                *    t          | j                  S )z3 The location of the BokehJS source tree.

        )r   r   r   s    r   r   zSettings.bokehjsdir  s     $(###r   r4   c                    g }t          j        |                                           D ]C\  }}}|D ]:}|                    d          r#|                    t          ||                     ;D|S )z2 The CSS files in the BokehJS directory.

        z.cssrl   walkr   ra   appendr   )r   	css_filesroot_filesfnames         r   r  zSettings.css_files  s      "	 gdoo&7&788 	8 	8ND!U 8 8>>&)) 8$$T$%6%67778 r   c                    g }t          j        |                                           D ]C\  }}}|D ]:}|                    d          r#|                    t          ||                     ;D|S )z1 The JS files in the BokehJS directory.

        z.jsr  )r   js_filesr  r  r  r	  s         r   r  zSettings.js_files  s~     ! gdoo&7&788 	7 	7ND!U 7 7>>%(( 7OODu$5$56667 r   locationc                    	 t          j        t          t          |                    t           j                  | _        dS # t          $ r t          d|           w xY w)z{ Load a user-specified override config file.

        The file should be a YAML format with ``key: value`` lines.

        Loaderz"Could not load Bokeh config file: N)yamlloadopenr   
SafeLoaderr   r:   r   )r   r  s     r   load_configzSettings.load_config  sm    	P$(Id783D3D.E.Edo$^$^$^D!!! 	P 	P 	PNHNNOOO	Ps   ?A A bytes | Nonec                    t          | d          s8|                                 }|d| _        n|                    d          | _        | j        S )z@ Return the secret_key, converted to bytes and cached.

        _secret_key_bytesNzutf-8)hasattrr   r  encode)r   keys     r   secret_key_byteszSettings.secret_key_bytes  sS     t011 	=//##C{)-&&),G)<)<&%%r   	locationsr   c                    |D ]A}	 t          j        t          |          t           j                  c S # t          $ r Y >w xY wi S )Nr  )r  r  r  r  r:   )r   r  r  s      r   r   zSettings._try_load_config*  s^    ! 	 	HyhHHHHHH   	s   ,5
AAr   )r   r   r   r!   r   )r   r4   )r  r   r   r}   )r   r  )r  r   r   r   )3re   rf   rg   r   r   r   r   r   r   r   r   rq   r;   r   r   r   r   r   r   r   r   rb   r   r2   r   r   r   r   r   r   rS   r   r   r   r   r   r   r   r   r   r   r   r\   r   r   r   r  r  r  r  r   r   r   r   r   r     sL          %$$$    """"! ! ! ! ) ) ) X) ' ' ' X' + + + X+    X 8J7IJ]_v  AC  M\ c 8	 8	 8	 	 	 	 	 3E2D]Tgqu } 3	 3	 3	K 	 	 	 	 /A.@Oeiw} E /	 /	 /	G 	 	 	 	 3E2DYPcmq y 3	 3	 3	K 	 	 	 	 9K8JK^`y  DH O 9	 9	 9	 	 	 	 	 5G4FXmw{ C 5	 5	 5	M 	 	 	 	 0B/A*N^hl t 0	 0	 0	H 	 	 	 	. 4F3EnVjtx @ 4	 4	 4	L 	 	 	 	 );(::GW}>N 
V)	 )	 )	H 	 	 	 	 1C0BCTVmw|  GS Z 1	 1	 1	O 	 	 	 	 /A.@N_io  ~E L /	 /	 /	I 	 	 	 	 *<);JHXbnx|  KP W *	 *	 *	H 	 	 	 	 3E2D]Tgqu } 3	 3	 3	K 	 	 	 	 =O<N~_s  ~J  TX _ =	 =	 =	 	 	 	 	 (:'9(N\aos { (	 (	 (	F 	 	 	 	 4F3EnVjG_ L4	 4	 4	L 	 	 	 	  4F3EkSdns  BP W 4	 4	 4	I 	 	 	 	 4F3EiQ`jn v 4	 4	 4	G 	 	 	 	 4F3EF[]x  CN U 4	 4	 4	 	 	 	 	 4F3EF[]x  CG N 4	 4	 4	 	 	 	 	 2D1CLRdnr z 2	 2	 2	J 	 	 	 	 /A.@Rgqv ~ /	 /	 /	M 	 	 	 	 ,>+=lL^hl  wC J ,	 ,	 ,	J 	 	 	 	 4F3EnVjtx @ 4	 4	 4	L 	 	 	 	 3E2D]Tgqu } 3	 3	 3	K 	 	 	 	 4F3EnVjtx @ 4	 4	 4	L 	 	 	 	 =O<NOac{ 2 	:
=	 
=	 
=	 
	 
	 
	 
	 .@-?Pdns  ~J 	Q 	.	 	.	 	.	L 		 		 		 		$ $ $ $	 	 	 		 	 	 		P 	P 	P 	P
& 
& 
& 
&     r   r       )r?   zuBOKEH_SECRET_KEY is recommended to have at least 32 bytes of entropy chosen with a cryptographically-random algorithmzBBOKEH_SECRET_KEY must be set if BOKEH_SIGN_SESSIONS is set to True)r   r   r   r   )r   r    r   r!   )r   r3   r   r4   )r   rL   r   rC   )r   rW   r   rX   r  )Ar   
__future__r   logging	getLoggerre   logrl   os.pathr   r   r   typingr   r   r	   r
   r   r   r   r   r   r  
util.pathsr   r   typing_extensionsr   
core.typesr   r   r   __all__r   r2   r;   rB   r   rN   rC   rE   rF   rG   rH   rI   rP   rS   rX   r\   rb   rd   rh   typeri   ro   rq   r   r   r   r   _secret_keylenutil.warningsr?   r   r   r   r   <module>r.     s  b b bN # " " " " " g!! 
			 - - - - - - - - - -
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
  . - - - - - - - )++++++$$$$$$((((((   
A A A A>B B B B, PQ Q Q Q Qc4i(
 ( ( ( ( ! !i !i !i !iF 12j j j j0   >        GCLLDL) ) ) ) )< < < <h* h* h* h* h* h* h* h*V 	DC(L11)     s s s s s s s sz	 8::!!##ss;//"44######D  
A  B  B  B O 3 3 5 5 =######D	MNNNNNO O = =r   