
    Ehǆ             
       t   S SK r S SKrS SKrS SKrS SKrS SKrS SKJr  S SKJ	r	  S SK
Jr  S SKJr  S SKrS SKrS SKrS SKrS SKrS SKrS SKrS SKrS SKrS SKJr  S SKJrJrJrJrJrJrJrJ r   S SK!r!S SK"r"S SK#J$r%  S S	K&J'r'  S S
K&J(r(  S SK&J)r)  SSK*J+r+J,r,  SSK-J.r.J/r/  SSK0J1r1J2r2J3r3  SSK4J5r5  SSK6J7r7J8r8J9r9J:r:  SSK$J;r;  SSK<J=r=J>r>J?r?  SSK@JArAJBrBJCrCJDrDJErEJFrFJGrGJHrHJIrIJJrJJKrKJLrLJMrMJNrN  SSKOJPrP  SSKOJQrQ  SSKOJRrR  SSKOJSrS  SSKOJTrT  SSKOJUrU  SSKVJWrWJXrXJYrY  SSKZJ[r[  SSKOJ\r\  SSK\J]r]J^r^J_r_J`r`  SSKaJbrbJcrc  SS KdJere  \S!\4   rfSrg\" S"5      (       a  \RH                  " S"5      rgSrh\" S#5      (       a  \RH                  " S#5      rh\R                  " S$S%S&5        S'rjS(rkS)rlS*rmS+rnS,roS-rpS.rqS/rrS0rsS1rtS2ruS3rvS4rw \(R                  " \'R                  " \tS5S69\(R                  " \sS&S79\'R                  " \uS89\(R                  " \vS&S79/5      r{S9\|4S: jr}\PR                  " 5       rS; r " S< S=\[5      rg!   Sr{ N-= f)>    N)copy_context)
ModuleSpec)	find_spec)metadata)urlparse)AnyCallableDictOptionalUnionSequenceLiteralList)version)dcc)html)
dash_table   )build_fingerprintcheck_fingerprint)ScriptsCss)InputOutputState)ComponentRegistry)PreventUpdateInvalidResourceError
ProxyErrorDuplicateCallback)__version__)get_combined_configpathname_configspages_folder_config)AttributeDict
format_taggenerate_hashinputs_to_dictinputs_to_valsinterpolate_strpatch_collections_abcsplit_callback_idto_jsonconvert_to_AttributeDictgen_salthooks_to_js_objectparse_versionget_caller_name)	_callback)
_get_paths)_dash_renderer)	_validate)_watch)_get_app)map_groupinggrouping_lenupdate_args_group)ObsoleteChecker)_pages)_parse_query_string_page_meta_tags_path_to_page_import_layouts_from_pages)jupyter_dashJupyterDisplayMode)RendererHooks.dash_design_kitplotlyapplication/jsonz.mapTa  <!DOCTYPE html>
<html>
    <head>
        {%metas%}
        <title>{%title%}</title>
        {%favicon%}
        {%css%}
    </head>
    <body>
        <!--[if IE]><script>
        alert("Dash v2.7+ does not support Internet Explorer. Please use a newer browser.");
        </script><![endif]-->
        {%app_entry%}
        <footer>
            {%config%}
            {%scripts%}
            {%renderer%}
        </footer>
    </body>
</html>zc
<div id="react-entry-point">
    <div class="_dash-loading">
        Loading...
    </div>
</div>
){%app_entry%}rH   )
{%config%}rI   ){%scripts%}rJ   )zid="react-entry-point"z#react-entry-point)zid="_dash-config"z#_dash-config)z src="[^"]*dash[-_]renderer[^"]*"zdash-renderer)zid="_dash-rendererznew DashRenderer_pages_content_pages_location_pages_store_pages_dummyz4https://dash-version.plotly.com:8080/current_versionzcallback-nav)idrefresh)rO   disable_n_clicks)rO   errorc           	          SSK Jn  S nS n[        US5      (       a#  UR	                  U" U5      S9R                  5       $ [        US5      (       a&  UR                  X" U5      S9R                  SU S5      $ S	R                  [        R                  " [        U5      X" U5      5      5      $ ! [         a    S n Nf = f)
Nr   )tbtoolsc                     SSK JnJn  U R                  nSnUR                  bR  US-  nUR                  nUR
                  R                  UR                  UR                  4;   a  U$ UR                  b  MR  U$ )Nr   _invoke_callback_async_invoke_callbackr   dash._callbackrW   rX   __traceback__tb_nexttb_framef_code__code__)rR   rW   rX   tbskips        \C:\Users\julio\OneDrive\Documentos\Trabajo\Ideas Frescas\venv\Lib\site-packages\dash/dash.py	_get_skip!_get_traceback.<locals>._get_skip   sx    	

   jj$AIDB{{!! ))&//&   jj$     c                 
   SSK JnJn  U R                  nUR                  bW  UR
                  R                  UR                  UR                  4;   a  UR                  $ UR                  nUR                  b  MW  U R                  $ )Nr   rV   rY   )rR   rW   rX   r`   s       rb   _do_skip _get_traceback.<locals>._do_skip   sv    	

   jj${{!! ))&//&  zz!B jj$ """re   get_current_traceback)ra   DebugTracebackT )werkzeug.debugrT   ImportErrorhasattrri   render_fullrj   render_debugger_htmljoin	tracebackformat_exceptiontype)secretrR   rT   rc   rg   s        rb   _get_tracebackrv      s    *&#" w/00,,5! - 

+-	 w())%%	%( & 


tVT
2	3 779--d5k5(5/RSSe  s   B. .B=<B=c                 t   #    [         R                  " U 5      (       a  U " U0 UD6I S h  vN $ U " U0 UD6$  N7fN)asyncioiscoroutinefunction)funcargskwargss      rb   execute_async_functionr~      s>     ""4((4*6***    +s   '868c            H       X   \ rS rSr% Sr\\S'   / r\\S'   \	R                  \S'   \\S'   \\S'   SS	S
SSS
SSSSS	S	SSSS	SS\SSSSSSSS SSS	SSSSS4#S\\   S\\\	R                  4   S\S\S\\   S\S\S\\   S\\   S\S\S\S\\   S\\   S\\   S\S\\   S\\\\\4         S \S!\\\\\\\4   4         S"\\\\\\\4   4         S#\\   S$\S%\S&\\\      S'\\   S(\S)\S*\\   S+\S,\\   S-\\\\\\4   4      S.\\   S/\\\/\4      S0\\   4FS1 jjrS2 rSS3\\	R                     S4S4S5 jjrSS\S6\S4S4S7 jjrS8 rS9 r\S4\4S: j5       r \ RB                  S;\4S< j5       r S= r"\S4\4S> j5       r#\#RB                  S;\S4S4S? j5       r#S@ r$SA r%SB r&SC\\   S4\4SD jr'SSE jr(SF r)S4\4SG jr*S4\4SH jr+S4\4SI jr,SJ r-SK r.SL r/        SSM jr0SN r1SO r2S4\SP\4   4SQ jr3SR r4SS r5ST r6SU r7SV r8SW r9SX r:SY r;SZ r<\=S[ 5       r>\=S\ 5       r?SS4\\   4S] jjr@S^\S4\4S_ jrAS` rBS^\S4\\S4   4Sa jrC\=S\S6\Sb\\DSc      S4S4Sd j5       rESSe jrFSf rG           SSg\\   Sh\\   Si\\   Sj\\   Sk\\   Sl\\H   Sm\\H   Sn\\H   So\\   Sp\\   Sq\\   S4\4Sr jjrISs rJ                  SSt\\   Su\\\\H4      Sv\\   Sg\\   Sw\\K   Sx\Sy\HSz\\   Sh\\   Si\\   Sj\\   Sk\\   Sl\\H   Sm\\H   Sn\\H   So\\   Sp\\   Sq\\   4$S{ jjrLSS| jrMS} rNS~rOg)Dash   a"  Dash is a framework for building analytical web applications.
No JavaScript required.

If a parameter can be set by an environment variable, that is listed as:
    env: ``DASH_****``
Values provided here take precedence over environment variables.

:param name: The name Flask should use for your app. Even if you provide
    your own ``server``, ``name`` will be used to help find assets.
    Typically ``__name__`` (the magic global var, not a string) is the
    best value to use. Default ``'__main__'``, env: ``DASH_APP_NAME``
:type name: string

:param server: Sets the Flask server for your app. There are three options:
    ``True`` (default): Dash will create a new server
    ``False``: The server will be added later via ``app.init_app(server)``
        where ``server`` is a ``flask.Flask`` instance.
    ``flask.Flask``: use this pre-existing Flask server.
:type server: boolean or flask.Flask

:param assets_folder: a path, relative to the current working directory,
    for extra files to be used in the browser. Default ``'assets'``.
    All .js and .css files will be loaded immediately unless excluded by
    ``assets_ignore``, and other files such as images will be served if
    requested.
:type assets_folder: string

:param pages_folder: a relative or absolute path for pages of a multi-page app.
    Default ``'pages'``.
:type pages_folder: string or pathlib.Path

:param use_pages: When True, the ``pages`` feature for multi-page apps is
    enabled. If you set a non-default ``pages_folder`` this will be inferred
    to be True. Default `None`.
:type use_pages: boolean

:param include_pages_meta: Include the page meta tags for twitter cards.
:type include_pages_meta: bool

:param assets_url_path: The local urls for assets will be:
    ``requests_pathname_prefix + assets_url_path + '/' + asset_path``
    where ``asset_path`` is the path to a file inside ``assets_folder``.
    Default ``'assets'``.
:type asset_url_path: string

:param assets_ignore: A regex, as a string to pass to ``re.compile``, for
    assets to omit from immediate loading. Ignored files will still be
    served if specifically requested. You cannot use this to prevent access
    to sensitive files.
:type assets_ignore: string

:param assets_path_ignore: A list of regex, each regex as a string to pass to ``re.compile``, for
    assets path to omit from immediate loading. The files in these ignored paths will still be
    served if specifically requested. You cannot use this to prevent access
    to sensitive files.
:type assets_path_ignore: list of strings

:param assets_external_path: an absolute URL from which to load assets.
    Use with ``serve_locally=False``. assets_external_path is joined
    with assets_url_path to determine the absolute url to the
    asset folder. Dash can still find js and css to automatically load
    if you also keep local copies in your assets folder that Dash can index,
    but external serving can improve performance and reduce load on
    the Dash server.
    env: ``DASH_ASSETS_EXTERNAL_PATH``
:type assets_external_path: string

:param include_assets_files: Default ``True``, set to ``False`` to prevent
    immediate loading of any assets. Assets will still be served if
    specifically requested. You cannot use this to prevent access
    to sensitive files. env: ``DASH_INCLUDE_ASSETS_FILES``
:type include_assets_files: boolean

:param url_base_pathname: A local URL prefix to use app-wide.
    Default ``'/'``. Both `requests_pathname_prefix` and
    `routes_pathname_prefix` default to `url_base_pathname`.
    env: ``DASH_URL_BASE_PATHNAME``
:type url_base_pathname: string

:param requests_pathname_prefix: A local URL prefix for file requests.
    Defaults to `url_base_pathname`, and must end with
    `routes_pathname_prefix`. env: ``DASH_REQUESTS_PATHNAME_PREFIX``
:type requests_pathname_prefix: string

:param routes_pathname_prefix: A local URL prefix for JSON requests.
    Defaults to ``url_base_pathname``, and must start and end
    with ``'/'``. env: ``DASH_ROUTES_PATHNAME_PREFIX``
:type routes_pathname_prefix: string

:param serve_locally: If ``True`` (default), assets and dependencies
    (Dash and Component js and css) will be served from local URLs.
    If ``False`` we will use CDN links where available.
:type serve_locally: boolean

:param compress: Use gzip to compress files and data served by Flask.
    To use this option, you need to install dash[compress]
    Default ``False``
:type compress: boolean

:param meta_tags: html <meta> tags to be added to the index page.
    Each dict should have the attributes and values for one tag, eg:
    ``{'name': 'description', 'content': 'My App'}``
:type meta_tags: list of dicts

:param index_string: Override the standard Dash index page.
    Must contain the correct insertion markers to interpolate various
    content into it depending on the app config and components used.
    See https://dash.plotly.com/external-resources for details.
:type index_string: string

:param external_scripts: Additional JS files to load with the page.
    Each entry can be a string (the URL) or a dict with ``src`` (the URL)
    and optionally other ``<script>`` tag attributes such as ``integrity``
    and ``crossorigin``.
:type external_scripts: list of strings or dicts

:param external_stylesheets: Additional CSS files to load with the page.
    Each entry can be a string (the URL) or a dict with ``href`` (the URL)
    and optionally other ``<link>`` tag attributes such as ``rel``,
    ``integrity`` and ``crossorigin``.
:type external_stylesheets: list of strings or dicts

:param suppress_callback_exceptions: Default ``False``: check callbacks to
    ensure referenced IDs exist and props are valid. Set to ``True``
    if your layout is dynamic, to bypass these checks.
    env: ``DASH_SUPPRESS_CALLBACK_EXCEPTIONS``
:type suppress_callback_exceptions: boolean

:param prevent_initial_callbacks: Default ``False``: Sets the default value
    of ``prevent_initial_call`` for all callbacks added to the app.
    Normally all callbacks are fired when the associated outputs are first
    added to the page. You can disable this for individual callbacks by
    setting ``prevent_initial_call`` in their definitions, or set it
    ``True`` here in which case you must explicitly set it ``False`` for
    those callbacks you wish to have an initial call. This setting has no
    effect on triggering callbacks when their inputs change later on.

:param show_undo_redo: Default ``False``, set to ``True`` to enable undo
    and redo buttons for stepping through the history of the app state.
:type show_undo_redo: boolean

:param extra_hot_reload_paths: A list of paths to watch for changes, in
    addition to assets and known Python and JS code, if hot reloading is
    enabled.
:type extra_hot_reload_paths: list of strings

:param plugins: Extend Dash functionality by passing a list of objects
    with a ``plug`` method, taking a single argument: this app, which will
    be called after the Flask server is attached.
:type plugins: list of objects

:param title: Default ``Dash``. Configures the document.title
(the text that appears in a browser tab).

:param update_title: Default ``Updating...``. Configures the document.title
(the text that appears in a browser tab) text when a callback is being run.
Set to None or '' if you don't want the document.title to change or if you
want to control the document.title through a separate component or
clientside callback.

:param background_callback_manager: Background callback manager instance
    to support the ``@callback(..., background=True)`` decorator.
    One of ``DiskcacheManager`` or ``CeleryManager`` currently supported.

:param add_log_handler: Automatically add a StreamHandler to the app logger
    if not added previously.

:param hooks: Extend Dash renderer functionality by passing a dictionary of
javascript functions. To hook into the layout, use dict keys "layout_pre" and
"layout_post". To hook into the callbacks, use keys "request_pre" and "request_post"

:param routing_callback_inputs: When using Dash pages (use_pages=True), allows to
add new States to the routing callback, to pass additional data to the layout
functions. The syntax for this parameter is a dict of State objects:
`routing_callback_inputs={"language": Input("language", "value")}`
NOTE: the keys "pathname_" and "search_" are reserved for internal use.

:param description:  Sets a default description for meta tags on Dash pages (use_pages=True).

:param on_error: Global callback error handler to call when
    an exception is raised. Receives the exception object as first argument.
    The callback_context can be used to access the original callback inputs,
    states and output.

:param use_async: When True, the app will create async endpoints, as a dev,
    they will be responsible for installing the `flask[async]` dependency.
:type use_async: boolean
_plotlyjs_urlSTARTUP_ROUTESserver_layout_extra_componentsNTassetspagesrk   FzUpdating...nameassets_folderpages_folder	use_pagesassets_url_pathassets_ignoreassets_path_ignoreassets_external_patheager_loadinginclude_assets_filesinclude_pages_metaurl_base_pathnamerequests_pathname_prefixroutes_pathname_prefixserve_locallycompress	meta_tagsindex_stringexternal_scriptsexternal_stylesheetssuppress_callback_exceptionsprevent_initial_callbacksshow_undo_redoextra_hot_reload_pathspluginstitleupdate_titlebackground_callback_manageradd_log_handlerhooksrouting_callback_inputsdescriptionon_error	use_asyncc$           
      	   U#c   SS K n%Sn#OU#(       a   SS K n%[        R                  " U$5        Ub  UO	[        5       n'[        U[        R                  5      (       a  X l	        Uc  [        USU'5      n'OE[        U[        5      (       a%  U(       a  [        R                  " U'5      OS U l	        O[        S5      e[        XU5      u  n(n)n*[        S,0 SU'_S[        R                   R#                  [        R$                  R'                  U'5      U5      _SU_SU_S	U_S
[)        S
U	S5      _S[+        U'XE5      _SU
_S[)        SUS5      _SU(_SU)_SU*_SU_S[)        SUS5      _SU=(       d    / _SU=(       d    / _SU=(       d    / _S[)        SUS5      _SU_SU_SU=(       d    / _SU_SU_SU_SU!_6U l        U R,                  R/                  / S QS!5        U R,                  R1                  S"5        U R,                  [2        l        U R,                  [6        l        [9        U5      U l        Uc  US#:g  OUU l        U =(       d    0 U l        UU l         0 U l!        / U l"        / U l#        SU l$        UU l%        S U l&        S$[O        U5       S%3U l(        [S        U5      U l*        [W        UU
5      U l,        [Z        R\                  " [^        5      U l0        / U l1        S U l2        SU l3        S U l4        U"U l5        / U l6        U#U l7        U Rq                  5         [        S S[r        Rt                  " 5       S / S&9U l;        / U l<        UU l=        [|        R~                  " [        5      U lA        U R                  R                  (       dB  U(       a;  U R                  R                  [|        R                  " [        R                  S'95        Ub4  [        U[        S(5      5      (       a  U H  n+U+R                  U 5        M     U R                  5         SSS).U lJ        U R                  b  U R                  5         U R                  R                  [|        R                  5        U R                  R                  S*:X  a  [        R                  " S+5        U R                  5         g ! [         a     GNf = f! [         a  n&[        S5      U&eS n&A&ff = f)-Nr   TzyYou are trying to use dash[async] without having installed the requirements please install via: `pip install dash[async]`r   z'server must be a Flask app or a booleanr   r   r   r   r   rk   r   r   r   r   r   r   r   r   Fr   r   r   r   r   r   r   r   r   r   r   )r   r   r   r   r   r   r   z2Read-only: can only be set in the Dash constructorzMInvalid config key. Some settings are only available via the Dash constructorr   z var renderer = new DashRenderer(z);)hashhardlockwatch_threadchanged_assets)streamIterable)r   setup_serverJupyterDashzjJupyterDash is deprecated, use Dash instead.
See https://dash.plotly.com/dash-in-jupyter for more details. )Rasgirefrm   	Exceptionr6   check_obsoleter2   
isinstanceflaskFlaskr   getattrbool
ValueErrorr#   r%   ospathrq   helpersget_root_pathr"   r$   configset_read_onlyfinalizer4   CONFIGr=   strr   r   r   r   callback_map_callback_list_inline_scripts_index_stringr   _faviconr0   rendererr   cssr   scriptscollectionsdefaultdictsetregistered_pathsroutesr   _layout_is_functionvalidation_layout	_on_errorr   
_use_async_setup_dev_tools	threadingRLock_hot_reload_assets_files_background_managerlogging	getLogger__name__loggerhandlers
addHandlerStreamHandlersysstdoutr+   plug_setup_hooks_got_first_requestinit_appsetLevelINFO	__class__warningswarnsetup_startup_routes),selfr   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   r   r   r   r   r   r   r   r   r   obsoleter   exccaller_namebase_prefixroutes_prefixrequests_prefixplugins,                                               rb   __init__Dash.__init__  s   T  	  	  *#'#349J fekk** K|%ffkB%%6<%++k2$DKFGG6F7O7
3]O $ "
"
'',,++K8-"

 ,"
 ("
  2"
 "5&(<b""
 -[,R"
 ("
 "5&(<d""
  *!"
" $1#"
$ &5%"
& ('"
( )XuE)"
*  o2+"
, .3-"
. "6!;/"
0 *=.0Le*1"
6 '@7"
8 *9"
: $:#?R;"
< ="
> &?"
@  2A"
B $C"
F 	!! A	
 	'	

 !KK
-6?6G,'1Y'>'D"$ 
    "  ( ;;Me;T:UUWX }%}m< + 7 7 < #( !%!!##("
  #> ''1{{##KK""7#8#8

#KL:*:6$
 $
 "D! " 	 -25"I;;"MMOW\\*>>""m3MMP 	!!#E  
   Ps(   R R& 
R#"R#&
S0R<<Sc                    SSK Jn  Xl         U R                   R                  5         U R                   R                  S5       H  nU" U 5        M     U R                   R                  S5       H3  nUR                  u  pEU R
                  " U0 UD6" UR                  5        M5     U R                   R                  R                   HW  u  nnn[        R                  " U R                  U R                  U R                  R                  U R                  U/UQ70 UD6  MY     U R                   R                  S5      (       a+  U R                   R!                  U R"                  5      U l        g g )Nr   )HooksManagersetupcallbackrR   )_hooksr   register_setuptools	get_hooksdatar   r{   r   _clientside_callbacksr3   register_clientside_callbackr   r   r   r   r   HookErrorHandlerr   )	r   r   r   hookcallback_argscallback_kwargsclientside_functionr|   r}   s	            rb   r   Dash._setup_hooks  s&   ("'')[[**73E$K 4 KK))*5D-1YY*MMM=<O<TYYG 6 [[44	
22##!!55$$#   5 ;;  ))![[99$..IDN *re   appreturnc                    U R                   nUR                  U5        UR                  / SQS5        Ub  Xl        UR                  R                  SS5      R                  SS5      nU S3nU R                  R                  [        R                  " UUR                  U R                   R                  UR                  U R                   R                  R                  S5      -   S95        UR                  (       a{   S	S
KJn  U" U R                  5        [!        [#        S5      5      n[%        U R                  R                   S5      (       d)  U[!        S5      :  a  S/U R                  R                   S'   U R                  R)                  [*        5      S 5       n	U R                  R-                  U R.                  5        U R                  R)                  [0        5      " U R2                  5        U R5                  5         U [6        l        U R;                  5         U R=                  5         g! [&         a  n['        S5      UeSnAff = f)z6Initialize the parts of Dash that require a flask app.)r   r   r   zGRead-only: can only be set in the Dash constructor or during init_app()N/_.dash_assets)static_folderstatic_url_pathr   )Compressflask_compressCOMPRESS_ALGORITHMz1.6.0gzipz>To use the compress option, you need to install dash[compress]c                     g)z:Handle a halted callback and return an empty 204 response.)rk      r   )r  s    rb   _handle_error$Dash.init_app.<locals>._handle_error  s     re   )r   updater   r   r   replaceregister_blueprintr   	Blueprintr   r   r   lstripr   r  r  r1   _get_distribution_versionrn   rm   errorhandlerr   before_request_setup_serverr   _invalid_resources_handler_setup_routesr8   APPenable_pages_setup_plotlyjs)
r   r  r}   r   	bp_prefixassets_blueprint_namer  _flask_compress_versionrR   r  s
             rb   r   Dash.init_app  s    f
 V	
 ?K1199#sCKKCQTU	#,+[ 9&&OO%"kk77 & = =++--44S9!:		
 ??3 %*7-.>?+' KK&&(< -w1GG AGxDKK&&';< 
	!	!-	0	 
1	 	""4#5#56 	  !56t7V7VW)  !Ts   <A:H+ +
I5II	view_funcc                     U R                   R                  U-   nU R                  R                  XBU[	        U5      S9  U R
                  R                  U5        g )N)r/  endpointmethods)r   r   r   add_url_rulelistr   append)r   r   r/  r2  	full_names        rb   _add_urlDash._add_url  sL    KK66=	  YW 	! 	
 	9%re   c                 f   U R                  SU R                  5        U R                  SU R                  5        U R                  SU R                  5        U R                  (       a  U R                  SU R
                  S/5        OU R                  SU R                  S/5        U R                  SU R                  5        U R                  SU R                  5        U R                  SU R                  5        [        R                  (       a1  U R                  S	[        R                  -   [        R                  5        U R                  R                  S
5       H:  nU R                  UR                   S   UR"                  UR                   S   5        M<     U R                  SU R                  5        g )NzF_dash-component-suites/<string:package_name>/<path:fingerprinted_path>z_dash-layoutz_dash-dependenciesz_dash-update-componentPOSTz_reload-hashz_favicon.icork   _alive_r   r   r2  z<path:path>)r7  serve_component_suitesserve_layoutdependenciesr   async_dispatchdispatchserve_reload_hash_serve_default_faviconindexrB   activealive_tokenserve_aliver   r  r  r{   )r   r  s     rb   r'  Dash._setup_routes  s6   T''	
 	nd&7&78*D,=,=>??MM2D4G4G&RMM2DMMF8Lnd&<&<=nd&A&ABb$**%MML444l6N6N KK))(3DMM$))F+TYY		)8LM 4 	mTZZ0re   c                 |    SSK Jn  SU" 5        S3n[        R                  R	                  SUSSS./5        X l        g )	Nr   )get_plotlyjs_versionzhttps://cdn.plot.ly/plotly-z.min.jszpackage_data/plotly.min.jsrF   eager)relative_package_pathexternal_url	namespaceasync)plotly.offlinerI  r   _js_distextendr   )r   rI  urls      rb   r*  Dash._setup_plotlyjs  sM    7+,@,B+C7K 	 .J$'!)$			
 !re   c                     U R                   $ rx   )r   r   s    rb   layoutDash.layout   s    ||re   valuec                 4   [         R                  " U5        [        U5      U l        Xl        U R                  (       a[  U R
                  (       dI  U R                  R                  (       d-  U R                  5       n[         R                  " X5        X l        g g g g rx   )
r6   validate_layout_typecallabler   r   r   r   r   _layout_valuevalidate_layout)r   rX  layout_values      rb   rV  rW  $  ss    &&u-#+E? 
 $$**KK<<--/L%%e:%1"	 = + %re   c                     U R                   (       a  U R                  5       nOU R                  nU R                  (       a"  [        R                  " U/U R                  -   S9nU$ )Nchildren)r   r   r   r   Div)r   rV  s     rb   r\  Dash._layout_value5  sJ    ##\\^F\\F !!XXx$2H2H'HIFre   c                     U R                   $ rx   )r   rU  s    rb   r   Dash.index_stringA  s    !!!re   c                 `    [         [        [        4n[        R                  " SX!5        Xl        g )Nzindex string)_re_index_entry_re_index_config_re_index_scriptsr6   validate_indexr   )r   rX  checkss      rb   r   re  E  s&    !#35FG  ?"re   c                     U R                  5       nU R                  R                  S5       H  nU" U5      nM     [        R                  " [        U5      SS9$ )NrV  rG   mimetype)r\  r   r  r   Responser-   )r   rV  r  s      rb   r=  Dash.serve_layoutK  sO    ##%KK))(3D&\F 4 ~~FO'
 	
re   c                    U R                   R                  U R                   R                  U R                  R                  U R                  R
                  U R                  R                  U R                   R                  U R                   R                  U R                   R                  [        R                  U R                   R                  [        [        R                  [         ["        [$        S.nU R                   R                  (       d  U R&                  US'   U R                  R(                  (       a<  [+        U R                  R,                  S-  5      U R                  R.                  S.US'   U R0                  (       a^  U R                   R                  (       dC  U R0                  nU R2                  (       a"  [4        R6                  " U/U R2                  -   S9nX!S'   U$ )N)r   r   uiprops_checkdisable_version_checkr   r   r   children_propsr   dash_versionpython_versiondash_version_urlddk_versionplotly_versionplotlyjs_url  )interval	max_retry
hot_reloadr`  r   )r   r   r   
_dev_toolsrr  rs  rt  r   r   r   r   ru  r   r!   r   r   DASH_VERSION_URLry  rz  r   r  inthot_reload_intervalhot_reload_max_retryr   r   r   rb  )r   r   r   s      rb   _configDash._configW  sX    "&!>!>(,(L(L//$$??66%)__%J%J"kk88,0KK,T,T KK44/>>![[66'!kk 0&,
" {{((%)%7%7F>"??%%   C Cd JK!__AA$F< 
 !!$++*R*R $ 6 6 %%$(HH/043I3II%! +<&'re   c                 T   U R                   nUR                     UR                  nUR                  nUR                  nSUl        / Ul        S S S 5        [
        R                  " WW[        U R                  R                  5       5      [        W5      S.5      $ ! , (       d  f       NS= f)NF)
reloadHashr   packagesfiles)
r   r   r   r   r   r   jsonifyr4  r   keys)r   _reloadr   changed_hashs        rb   rA  Dash.serve_reload_hash  s    ""\\<<D,,GLLE GL%'G"  }}# !6!6!;!;!=>g	
 	
 \s   3B
B'	librariesc           	          / nS HL  n[         R                  " X15      nU R                  US5      nU H  nUR                  [	        X6S95        M     MN     U$ )N)rP  	_css_distF)rt   rR  )r   get_resources_collect_and_register_resourcesr5  dict)r   r  dists	dist_type	resourcessrcssrcs          rb   get_distDash.get_dist  sU    2I)77	MI77	5IDTy:;  3
 re   c           	        ^ ^ SU 4S jjn/ nU GH  nUR                  SS5      nUR                  S5      S LnU(       + =(       a    UnSU;   a  US   n	[        U	[        5      (       a  U	/OU	n	U	 H{  m[        U4S jS 5       5      (       a  TR	                  S	S5      mT R
                  US
      R                  T5        U(       a  MY  U(       a  Mb  UR                  U" TUS
   S95        M}     M  SU;   aM  U(       dC  U(       d9  [        US   [        5      (       a  UR                  US   5        GM$  XES   -  nGM.  GM1  GM4  SU;   a  [        S5      eSU;   d  GMN  T R                  US   5      n
U
R                  S5      (       a   UR                  U
SUS    3-   SS.5        GM  UR                  U
SUS    3-   5        GM     U$ )Nrk   c                   >^  [        U 4S jS 5       5      (       aX  T R                  SS5      m [        R                  " U S[        R
                  R                  T 5      S    35      R                  nO [        R                  " U5      R                  n[        R
                  R                  [        R
                  R                  [        R                  U   R                  5      T 5      n[        [        R                  " U5      R                  5      n[!        T X$5      nTR"                  R$                   SU SU 3$ )	Nc              3   L   >#    U  H  nTR                  US -   5      v   M     g7f)r  N)
startswith).0xrK  s     rb   	<genexpr>SDash._collect_and_register_resources.<locals>._relative_url_path.<locals>.<genexpr>  s*      6A &00S996s   !$r   r   r   dash.rk   r  r   z_dash-component-suites/r  )anyr  	importlibimport_moduler   r   splitr!   rq   dirnamer   modules__file__r  statst_mtimer   r   r   )rK  rM  r   module_pathmodifiedfingerprintr   s   `     rb   _relative_url_path@Dash._collect_and_register_resources.<locals>._relative_url_path  s    6   )>(E(Egr(R%#11 k277==1F#G#J"KL+  $11)<HH'',,I 6 ? ?@%K
 277;/889H+,A7UKkk::;;RS\R]]^_j^kllre   dynamicFrN  rK  c              3   ,   >#    U  H	  oT;   v   M     g 7frx   r   )r  r  rel_paths     rb   r  7Dash._collect_and_register_resources.<locals>.<genexpr>  s     P2OQ=2Os   r  r  rM  )rK  rM  rL  absolute_pathz4Serving files from absolute_path isn't supported yet
asset_pathz.mjs?m=tsmodule)r  rt   )rk   rk   )getr   r   r  r  r   addr5  r   get_asset_urlendswith)r   r  include_asyncr  r  resourceis_dynamic_resourceis_asyncexcludedpaths
static_urlr  s   `          @rb   r  $Dash._collect_and_register_resources  s   
	m, !H"*,,y%"@||G,D8H((5XH&(2 !89#-eS#9#9u %HP2OPPP#+#3#3GR#@))(;*?@DDXN..xx.6>*2;*? !&  8+*8!(>":C@@H^$<= 88	 4<*
 !H, VWW)!//0FG
&&v..KK#- #HTN#34$5$, KK"s8D>*:%;;U "\ re   c                    U R                   R                  nU R                  U R                  R	                  5       U R                  R
                  R                  U R                  R                  R                  5      -   5      nSR                  X-    Vs/ s H)  n[        U[        5      (       a  [        SUSS9OSU S3PM+     sn5      $ s  snf )N
linkTopenedz<link rel="stylesheet" href="z">)r   r   r  r   get_all_css
_resources_filter_resourcesr   r   r  rq   r   r  r&   )r   external_linkslinksr  s       rb   _generate_css_dist_htmlDash._generate_css_dist_html  s    9944HH  "hh!!33DKK4E4E4O4OPQ

 yy
 ,3	 4D dD)) 6454TF"=> 4	
 	
s   0Cc                    U R                   S   SL a  SOSn[        R                   VVVs/ s HB  nUR                  5        VVs0 s H!  u  p4U[	        U[
        5      (       a  XA   OU_M#     snnPMD     nnnnU R                   R                  nU R                  U R                  R                  R                  XVS95      U R                  R                  -   U R                  U R                  R                  US9U R                  R                  R                  [        R                  US9-   U R                  R                  R                  [        R                  US9-   U R                  R                  R                  [         R                  US9-   U R                  R                  R                  ["        R                  US9-   U R                  R                  R                  U R$                  R&                  R                  US9-   5      -   nU R(                  R+                  [,        R.                  5        [,        R.                  R1                  5         SR3                  U Vs/ s H*  n[	        U[
        5      (       a  [5        SU5      OSU S	3PM,     snU R(                   Vs/ s H	  nS
U S3PM     sn-   5      $ s  snnf s  snnnf s  snf s  snf )Nrs  Tdevprod)dev_bundlesr  scriptz<script src="z"></script>z<script>	</script>)r  r5   _js_dist_dependenciesitemsr   r  serve_dev_bundlesr  r   r  r  r   r   get_all_scriptsrP  r   r   r   r   r   r   rQ  r3   GLOBAL_INLINE_SCRIPTSclearrq   r&   )	r   modejs_dist_dependencykeyrX  depsr  r  r  s	            rb   _generate_scripts_htmlDash._generate_scripts_html  s    6$>uF '5&J&J

 'K" #5":":"<"<JC Jud$;$;U[F"< 'K 	 
 oo//00''99$9P kk**+ 22,,,=,,));;"++ <  ,,));;LLc < 	 ,,));;MMs < 	 ,,));;''S <  ,,));;KK%%..C < 	 	2 	##I$C$CD''--/yy
  	  C c4(( 8S)$SE56  	 594H4HI4HS#i(4HIJ
 	
G
J Js#   K(J?,K%1K&K
?Kc                 <    S[        U R                  5       5       S3$ )Nz2<script id="_dash-config" type="application/json">r  )r-   r  rU  s    rb   _generate_config_htmlDash._generate_config_html0  s    CGDLLND[C\\effre   c                 "    SU R                    S3$ )Nz:<script id="_dash-renderer" type="application/javascript">r  )r   rU  s    rb   _generate_rendererDash._generate_renderer3  s    KDMM?Zcddre   c                    / n[        S U R                  R                   5       5      n[        S U R                  R                   5       5      n[        S U R                  R                   5       5      nU(       d  UR                  SSS.5        U(       d  UR                  SS05        U(       d  UR                  S	S
S.5        XR                  R                  -   $ )Nc              3   J   #    U  H  oR                  S S5      S:H  v   M     g7f)
http-equivrk   X-UA-CompatibleNr  r  r  s     rb   r  &Dash._generate_meta.<locals>.<genexpr>8  s#      
BWQEE,#'88BWs   !#c              3   ,   #    U  H
  nS U;   v   M     g7f)charsetNr   r  s     rb   r  r  ;  s     H2GQ)q.2Gs   c              3   H   #    U  H  oR                  S 5      S:H  v   M     g7f)r   viewportNr  r  s     rb   r  r  <  s     V@U155=J6@Us    "r  zIE=edge)r  contentr  zUTF-8r  z#width=device-width, initial-scale=1)r   r  )r  r   r   r5  )r   r   has_ie_compathas_charsethas_viewports        rb   _generate_metaDash._generate_meta6  s    	 
BF++BWBW
 
 H$++2G2GHHV@U@UVV,=)TUi12#0UV ;;0000re   c                    [        U5      u  p4[        R                  " U R                  X5        SUR	                  S5      S   -   n[
        R                  R                  US5      n[        R                  U   nU R                  R                  SUUR                  UUR                  5        [        R                  " [         R"                  " X5      US9nU(       a  SUR$                  l        U$ UR)                  5         UR+                  5       S   n	[        R,                  R.                  R                  S5      n
S	U	 S	3U
:X  a  [        R                  " S S
S9nU$ )Nr  zapplication/octet-streamz7serving -- package: %s[%s] resource: %s => location: %srm  i3r   zIf-None-Match"i0  )status)r   r6   validate_js_pathr   r  	mimetypes	types_mapr  r   r  r   debugr!   __path__r   ro  pkgutilget_datacache_controlmax_ageadd_etagget_etagrequestheaders)r   package_namefingerprinted_pathpath_in_pkghas_fingerprint	extensionrn  packageresponsetagrequest_etags              rb   r<  Dash.serve_component_suitesJ  s0   '89K'L$""4#8#8,T+++C044	&&**96PQ++l+E	
 >>\7(
  .6H""*  ##%a(C ==0044_EL3%qz\) >>$s;re   c                    U R                  5       nU R                  5       nU R                  5       nU R                  5       nU R	                  5       nU R
                  nU R                  (       a)  U R                  R                  (       a  [        U 5      U-   nU R                  (       a|  [        R                  R                  [        R                  R                  U R                  R                  U R                  5      5      n	U R!                  U R                  5       SU	 3n
O!U R                  R"                  nU S[$         3n
['        SSSU
S.SS9nS	R                  S
 U 5       5      nU R)                  UUUUU[*        UUS9nU R,                  R/                  S5       H  nU" U5      nM     [0        [2        [4        [6        4n[8        R:                  " SUU5        U$ )Nr  z_favicon.ico?v=r  iconimage/x-icon)relrt   hrefTr  z
      c              3   :   #    U  H  n[        S USSS9v   M     g7f)metaT)r  sanitizeN)r&   r  s     rb   r  Dash.index.<locals>.<genexpr>  s      
GL!Jvq=us   )metasr   r   r   r   	app_entryfaviconr   rC  )r  r  r  r  r  r   r   r   r   r?   r   r   r   getmtimerq   r   r  r   r!   r&   interpolate_index
_app_entryr   r  _re_index_entry_id_re_index_config_id_re_index_scripts_id_re_renderer_scripts_idr6   rj  )r   r|   r}   r   r   r   r$  r   r   favicon_mod_timefavicon_urlprefixr&  tagsrC  r  rk  s                    rb   rC  
Dash.indexp  s   --/**,++-##%**, 

>>dkk<<#D)E1E==!ww//T[[66F  "//>?sCSBTUK[[99F#HOK=AKNKH
  
GL
 
 &&  ' 	
 KK))'2DKE 3  #	
 	  &%8re   c	                 8    [        U R                  UUUUUUUUS9	$ )af  Called to create the initial HTML string that is loaded on page.
Override this method to provide you own custom HTML.

:Example:

    class MyDash(dash.Dash):
        def interpolate_index(self, **kwargs):
            return '''<!DOCTYPE html>
            <html>
                <head>
                    <title>My App</title>
                </head>
                <body>
                    <div id="custom-header">My custom header</div>
                    {app_entry}
                    {config}
                    {scripts}
                    {renderer}
                    <div id="custom-footer">My custom footer</div>
                </body>
            </html>'''.format(app_entry=kwargs.get('app_entry'),
                              config=kwargs.get('config'),
                              scripts=kwargs.get('scripts'),
                              renderer=kwargs.get('renderer'))

:param metas: Collected & formatted meta tags.
:param title: The title of the app.
:param css: Collected & formatted css dependencies as <link> tags.
:param config: Configs needed by dash-renderer.
:param scripts: Collected & formatted scripts tags.
:param renderer: A script tag that instantiates the DashRenderer.
:param app_entry: Where the app will render.
:param favicon: A favicon <link> tag if found in assets folder.
:return: The interpolated HTML string for the index.
)r$  r   r   r   r   r&  r   r%  )r*   r   )	r   r$  r   r   r   r   r%  r&  r   s	            rb   r(  Dash.interpolate_index  s3    \ 

 
	
re   c                 R    [         R                  " [        U R                  5      SS9$ )NrG   content_type)r   ro  r-   r   rU  s    rb   r>  Dash.dependencies  s$    ~~D''(+
 	
re   c                     [         R                  " U R                  U R                  U R                  R
                  U R                  U/UQ70 UD6$ )a  Create a callback that updates the output by calling a clientside
(JavaScript) function instead of a Python function.

Unlike `@app.callback`, `clientside_callback` is not a decorator:
it takes either a
`dash.dependencies.ClientsideFunction(namespace, function_name)`
argument that describes which JavaScript function to call
(Dash will look for the JavaScript function at
`window.dash_clientside[namespace][function_name]`), or it may take
a string argument that contains the clientside function source.

For example, when using a `dash.dependencies.ClientsideFunction`:
```
app.clientside_callback(
    ClientsideFunction('my_clientside_library', 'my_function'),
    Output('my-div' 'children'),
    [Input('my-input', 'value'),
     Input('another-input', 'value')]
)
```

With this signature, Dash's front-end will call
`window.dash_clientside.my_clientside_library.my_function` with the
current values of the `value` properties of the components `my-input`
and `another-input` whenever those values change.

Include a JavaScript file by including it your `assets/` folder. The
file can be named anything but you'll need to assign the function's
namespace to the `window.dash_clientside` namespace. For example,
this file might look:
```
window.dash_clientside = window.dash_clientside || {};
window.dash_clientside.my_clientside_library = {
    my_function: function(input_value_1, input_value_2) {
        return (
            parseFloat(input_value_1, 10) +
            parseFloat(input_value_2, 10)
        );
    }
}
```

Alternatively, you can pass the JavaScript source directly to
`clientside_callback`. In this case, the same example would look like:
```
app.clientside_callback(
    '''
    function(input_value_1, input_value_2) {
        return (
            parseFloat(input_value_1, 10) +
            parseFloat(input_value_2, 10)
        );
    }
    ''',
    Output('my-div' 'children'),
    [Input('my-input', 'value'),
     Input('another-input', 'value')]
)
```

The last, optional argument `prevent_initial_call` causes the callback
not to fire when its outputs are first added to the page. Defaults to
`False` unless `prevent_initial_callbacks=True` at the app level.
)r3   r  r   r   r   r   r   )r   r
  r|   r}   s       rb   clientside_callbackDash.clientside_callback  sW    B 55KK11  
 
 
 	
re   .c                     [         R                  " UU R                  R                  U R                  U R
                  S.UD6$ )a  
Normally used as a decorator, `@app.callback` provides a server-side
callback relating the values of one or more `Output` items to one or
more `Input` items which will trigger the callback when they change,
and optionally `State` items which provide additional information but
do not trigger the callback directly.

The last, optional argument `prevent_initial_call` causes the callback
not to fire when its outputs are first added to the page. Defaults to
`False` unless `prevent_initial_callbacks=True` at the app level.


) config_prevent_initial_callbackscallback_listr   )r3   r   r   r   r   r   )r   _args_kwargss      rb   r   Dash.callback2  sC     !!-1[[-R-R--**	

 
 	
re   c                 8   [        0 5      nUR                  S/ 5      Ul        UR                  S/ 5      Ul        UR                  S/ 5      Ul        [        UR                  5      Ul        [        UR                  5      Ul        UR                  S/ 5       Vs/ s H   nX2R                  R                  U5      S.PM"     snUl        [        R                  " SS9Ul        [        S0 [        R                  R                  D6Ul        [        S0 [        R                  R                  D6Ul        [        R                  R                   Ul        [        R                  R$                  Ul        [        R                  R(                  Ul        0 Ul        U$ s  snf )	z.Initialize the global context for the request.inputsstateoutputschangedPropIds)prop_idrX  rG   rm  r   )r%   r  inputs_liststates_listoutputs_listr(   input_valuesstate_valuestriggered_inputsr   ro  dash_responser  r  cookiesr  	full_pathr   remote_addrremoteoriginupdated_props)r   bodygr  s       rb   _initialize_contextDash._initialize_contextI  s+   "2."-)R0'6'6 XX.3
3 NN$6$6q$9:3
  ..2DE15==001	15==001	((==,,==''
s   'Fc           	      (   US   n U R                   U   nUS   nUR                  S5      =(       d    U R                  Ul        UR                  SS5      Ul        US   n[        UR                  UR                  -   5      nUR                  S5      (       a  / Ul        OUR                  (       d  [        U5        U HW  n[        U[        5      (       a$  U H  n	[        XR                  S/ 5      5        M      [        XR                  S/ 5      5        MY     U R                  Xv5      u  Ul        Ul        U R                  UR                  UR                  S	/ 5      5      u  Ul        Ul        U$ ! [$         a  n
[%        S
U S35      U
eSn
A
ff = f)zPrepare callback-related data.outputr   manager
backgroundFinputs_state_indices	no_outputrF  outputs_indicesz(Callback function not found for output 'z'.N)r   r  r   r   ignore_register_pager.   rH  rI  rJ  r,   r   r4  r;   _prepare_groupingargs_groupingusing_args_groupingoutputs_groupingusing_outputs_groupingKeyError)r   rV  rU  rZ  cbr{   r]  inputs_statespattern_match_ges              rb   _prepare_callbackDash._prepare_callback^  s}   h#	Y""6*Bj>Dy!=T%=%= ) &(VVL%%@A" $&&<#= 3AMMAMM4QRLvvk""!#^^!&) "a&&+,)+XX6F-K ,- "!XX.>%CD " 6:5K5K62AOQ2 <@;Q;Q'8" =<8A 8
   	YEfXRPQWXX	Ys   E)E2 2
F<FFc                   ^ [        U[        5      (       d  U/mOUm[        T5      S:  aO  [        U4S jU5      n[        U[        5      (       + =(       a     U[        [        [        U5      5      5      :g  nX44$ / SpCX44$ )z-Prepare grouping logic for inputs or outputs.r   c                    > TU    $ rx   r   )ind	flat_datas    rb   <lambda>(Dash._prepare_grouping.<locals>.<lambda>  s	    	#re   F)r   r4  lenr9   r  ranger:   )r   	data_listindicesgroupingusing_groupingrq  s        @rb   ra  Dash._prepare_grouping  s    )T**"I!Iy>A#$>HH!+GS!99 gl7+,J ?N '' (*5n''re   c           
         [        S0 [        R                  R                  D6Ul        [        S0 [        R                  R                  D6Ul        [        R                  R
                  Ul        [        R                  R                  Ul        [        R                  R                  Ul	        [        0 5      Ul        U R                  R                  S5       H%  nU" U5      UR                  UR                  S   '   M'     [        R                   " U/UQ7UUR"                  UU U R$                  U R&                  S.6nU$ )z1Execute the callback with the prepared arguments.custom_datarM  )rJ  r   callback_contextr  app_on_errorapp_use_asyncr   )r  r   r  rO  r  rP  r   rQ  rR  rS  r%   r|  r   r  r  	functoolspartialr   r   r   )r   r{   r|   rJ  rV  r  partial_funcs          rb   _execute_callbackDash._execute_callback  s    15==001	15==001	((==,,==''%b)KK))-8D48GAMM$))K01 9 !((	
	
 &()(E(E//	
 re   c                 H  #    [         R                  R                  5       nU R                  U5      nU R	                  X!5      n[        UR                  UR                  -   5      n[        5       nU R                  X4UR                  U5      n[        R                  " U5      (       a  UR                  U5      I S h  vN nOUR                  U5      n[        R                  " U5      (       a
  UI S h  vN nUR                  R                  U5        UR                  $  Nb N-7frx   )r   r  get_jsonrW  rl  r)   rH  rI  r   r  rJ  ry   iscoroutinerunrN  set_datar   rU  rV  r{   r|   ctxr  response_datas           rb   r?  Dash.async_dispatch  s     }}%%'$$T*%%a.ammamm;<n--d!..!Lt$$"%'',"77MGGL1M}--"//M	  / 8
 0s$   B9D";D<6D"2D 3,D" D"c                    [         R                  R                  5       nU R                  U5      nU R	                  X!5      n[        UR                  UR                  -   5      n[        5       nU R                  X4UR                  U5      nUR                  U5      n[        R                  " U5      (       a  [        S5      eUR                  R!                  U5        UR                  $ )NzYou are trying to use a coroutine without dash[async]. Please install the dependencies via `pip install dash[async]` and ensure that `use_async=False` is not being passed to the app.)r   r  r  rW  rl  r)   rH  rI  r   r  rJ  r  ry   r  r   rN  r  r  s           rb   r@  Dash.dispatch  s    }}%%'$$T*%%a.ammamm;<n--d!..!L-}--I  	
  /re   c                    U R                   S   (       a  g SU R                   S'   U R                  R                  n[        R                   H.  n[
        R                  U   n[        USS5      nU=(       d    UnM0     XR                  R                  l        U R                  R                  (       a  U R                  5         U R                  (       d  U R                  (       a  [        U l        [        R                  " U R                  U R!                  5       5        U R#                  5         U R%                  5         ['        [(        R*                  5       HM  nXPR,                  ;   a  [/        SU S35      e[(        R*                  R1                  U5      U R,                  U'   MO     U R2                  R5                  [(        R6                  5        [(        R6                  R9                  5         [        R:                  " U R,                  5        0 nU R,                  R=                  5        HR  nUR?                  S5      nU(       d  M  SU;   d  M%  UR1                  S5      n	U	 H  n
UR?                  S	5      Xj'   M     MT     U(       aF  URA                  5        H1  u  pU RC                  [E        URF                  S
5      USUS9S 5       nM3     g g )Nr   T_force_eager_loadingFzThe callback `zI` provided with `dash.callback` was already assigned with `app.callback`.r\  cancel_inputsr[  rO   )prevent_initial_callr[  c                      [         R                  R                  R                  S5      n[        R
                  R                  5       R                  nU(       a  U H  nUR                  U5        M     [        $ )N	cancelJob)
r   r  r|   getlistr3   context_valuer  r   terminate_job	no_update)r  job_idsexecutorjob_ids       rb   cancel_call'Dash._setup_server.<locals>.cancel_call  sY     $mm0088EG(66::<XXH&-F$226: '.$$re   )$r   r   r   r   registryr   r  r   r   r   _walk_assets_directoryrV  r   page_containerr6   r]  r\  r  r  r4  r3   GLOBAL_CALLBACK_MAPr   r    popr   rQ  GLOBAL_CALLBACK_LISTr  validate_background_callbacksvaluesr  r  r   r   component_id)r   r   module_namer  rJ  kcancelsr   r\  cancelccancel_inputr[  r  s                 rb   r%  Dash._setup_server  s=   "">226/ 11,55K[[-FF$:EBE)2UM 6 -:);;++''){{t~~(DK!!$++t/A/A/CD##%$$& i334A%%%'$QC (4 4 
 $-#@#@#D#DQ#GDa  5 	""9#A#AB&&,,.//0A0AB))002H!l3J*,#8A!+	!:GJ   3 )0%<44d; )-#	  %% *9 re   c                     XS.nU R                   R                  (       a#  U R                  UR                  S5      5      US'   U R                  R                  U5        U$ )N)r  filepathr  rL  )r   r   r  r!  r   r5  )r   url_path	file_pathress       rb   _add_assets_resourceDash._add_assets_resource  sN    %=;;++"&"4"4X__S5I"JC!!),
re   c                   ^^ U R                   R                  n[        R                  " S5      nU R                   R                  nU R                   R
                  nU(       a  [        R                  " U5      OS mU=(       d    /  Vs/ s H"  nU(       d  M  [        R                  " U5      PM$     nn[        [        R                  " U5      5       GH  u  pxn	Xq:X  a  Sn
SmOvUR                  US5      R                  S5      R                  S5      mUR                  T5      n[        U5      S:  a!  SR                  UR                  T5      5      n
OUS   n
T(       a  [        U4S jU 5       5      (       a  M  T(       a  U4S jU	 5       nOU	n[        U5       H  nU
(       a  SR                  X/5      OUn[        R                  R                  X}5      nUR!                  S	5      (       a,  U R"                  R%                  U R'                  X5      5        M  UR!                  S
5      (       a,  U R(                  R+                  U R'                  X5      5        M  US:X  d  M  Xl        M     GM     g s  snf )Nz[\\/]+rk   \r  r   r   c              3      >#    U  HG  nTR                  [        R                  R                  5        H  nUR	                  U5      v   M     MI     g 7frx   )r  r   r   sepsearch)r  ignore_path_filterr  ri  s      rb   r  .Dash._walk_assets_directory.<locals>.<genexpr>=  sE      *=&-A #))!,,- -*=s   AAc              3   X   >#    U  H  nTR                  U5      (       a  M  Uv   M!     g 7frx   )r  )r  r  ignore_filters     rb   r  r  E  s       QEq9M9Ma9PEs   *	*jsr   favicon.ico)r   r   recompiler   r   sortedr   walkr  r!  r  rt  rq   r  r   r  r   append_scriptr  r   
append_cssr   )r   walk_dirslash_splitter
ignore_strignore_path_listignore_pathignore_path_filterscurrentr  r  basesplitted	files_genfr   fullr  ri  s                   @@rb   r  Dash._walk_assets_directory$  s   ;;,,I.[[..
;;992<

:.$ !1 6B 6
 6 $BJJ{# 6 	 
 "((9!:G"OOHb188>EEcJ)//2x=1$88N$8$8$;<D#A;D S *=  
   QE QI %I	*A26388TI.AD77<<3Dzz$''22 55dA E**++D,E,Ed,QRm+(, +3 ";
s   I5I5c                 $    U R                   S   S4$ )Nr   i  )r|   )errs    rb   r&  Dash._invalid_resources_handlerW  s    xx{Cre   c                  V    [         R                  " [        R                  " SS5      SS9$ )Ndashr  r  r6  )r   ro  r	  r
  r   re   rb   rB  Dash._serve_default_favicon[  s%    ~~V]3.
 	
re   c           	        ^ / SQnX;  a  [        SSR                  U5      -   5      e[        [        U5      mU4S jnU R                  R                  [        R                  5        [        R                  R                  5         U R                  U R                  /-    Vs/ s H  nSU SU" U5       S3PM     sn$ s  snf )a  Calculates CSP hashes (sha + base64) of all inline scripts, such that
one of the biggest benefits of CSP (disallowing general inline scripts)
can be utilized together with Dash clientside callbacks (inline scripts).

Calculate these hashes after all inline callbacks are defined,
and add them to your CSP headers before starting the server, for example
with the flask-talisman package from PyPI:

flask_talisman.Talisman(app.server, content_security_policy={
    "default-src": "'self'",
    "script-src": ["'self'"] + app.csp_hashes()
})

:param hash_algorithm: One of the recognized CSP hash algorithms ('sha256', 'sha384', 'sha512').
:return: List of CSP hash strings of all inline scripts.
)sha256sha384sha512zPossible CSP hash algorithms: z, c                    > [         R                  " T" U R                  S5      5      R                  5       5      R	                  S5      $ )Nzutf-8)base64	b64encodeencodedigestdecode)r  methods    rb   r  Dash.csp_hashes.<locals>._hash{  s;    ##F6==+A$B$I$I$KLSS re   '-)
r   rq   r   hashlibr   rQ  r3   r  r  r   )r   hash_algorithmHASH_ALGORITHMSr  r  r  s        @rb   
csp_hashesDash.csp_hashesa  s    $ 900499_3MM  .1	
 	##I$C$CD''--/  //4==/A
A qvq1A
 	
 
s   !B=r   c                 D    [         R                  " U R                  U5      $ )a  
Return the URL for the provided `path` in the assets directory.

If `assets_external_path` is set, `get_asset_url` returns
`assets_external_path` + `assets_url_path` + `path`, where
`path` is the path passed to `get_asset_url`.

Otherwise, `get_asset_url` returns
`requests_pathname_prefix` + `assets_url_path` + `path`, where
`path` is the path passed to `get_asset_url`.

Use `get_asset_url` in an app to access assets at the correct location
in different environments. In a deployed app on Dash Enterprise,
`requests_pathname_prefix` is the app name. For an app called "my-app",
`app.get_asset_url("image.png")` would return:

```
/my-app/assets/image.png
```

While the same app running locally, without
`requests_pathname_prefix` set, would return:

```
/assets/image.png
```
)r4   app_get_asset_urlr   r   r   s     rb   r  Dash.get_asset_url  s    8 ++DKK>>re   c                 X    [         R                  " U R                  R                  U5      $ )a  
Return a path with `requests_pathname_prefix` prefixed before it.
Use this function when specifying local URL paths that will work
in environments regardless of what `requests_pathname_prefix` is.
In some deployment environments, like Dash Enterprise,
`requests_pathname_prefix` is set to the application name,
e.g. `my-dash-app`.
When working locally, `requests_pathname_prefix` might be unset and
so a relative URL like `/page-2` can just be `/page-2`.
However, when the app is deployed to a URL like `/my-dash-app`, then
`app.get_relative_path('/page-2')` will return `/my-dash-app/page-2`.
This can be used as an alternative to `get_asset_url` as well with
`app.get_relative_path('/assets/logo.png')`

Use this function with `app.strip_relative_path` in callbacks that
deal with `dcc.Location` `pathname` routing.
That is, your usage may look like:
```
app.layout = html.Div([
    dcc.Location(id='url'),
    html.Div(id='content')
])
@app.callback(Output('content', 'children'), [Input('url', 'pathname')])
def display_content(path):
    page_name = app.strip_relative_path(path)
    if not page_name:  # None or ''
        return html.Div([
            dcc.Link(href=app.get_relative_path('/page-1')),
            dcc.Link(href=app.get_relative_path('/page-2')),
        ])
    elif page_name == 'page-1':
        return chapters.page_1
    if page_name == "page-2":
        return chapters.page_2
```
)r4   app_get_relative_pathr   r   r  s     rb   get_relative_pathDash.get_relative_path  s'    J //KK00$
 	
re   c                 X    [         R                  " U R                  R                  U5      $ )a   
Return a path with `requests_pathname_prefix` and leading and trailing
slashes stripped from it. Also, if None is passed in, None is returned.
Use this function with `get_relative_path` in callbacks that deal
with `dcc.Location` `pathname` routing.
That is, your usage may look like:
```
app.layout = html.Div([
    dcc.Location(id='url'),
    html.Div(id='content')
])
@app.callback(Output('content', 'children'), [Input('url', 'pathname')])
def display_content(path):
    page_name = app.strip_relative_path(path)
    if not page_name:  # None or ''
        return html.Div([
            dcc.Link(href=app.get_relative_path('/page-1')),
            dcc.Link(href=app.get_relative_path('/page-2')),
        ])
    elif page_name == 'page-1':
        return chapters.page_1
    if page_name == "page-2":
        return chapters.page_2
```
Note that `chapters.page_1` will be served if the user visits `/page-1`
_or_ `/page-1/` since `strip_relative_path` removes the trailing slash.

Also note that `strip_relative_path` is compatible with
`get_relative_path` in environments where `requests_pathname_prefix` set.
In some deployment environments, like Dash Enterprise,
`requests_pathname_prefix` is set to the application name, e.g. `my-dash-app`.
When working locally, `requests_pathname_prefix` might be unset and
so a relative URL like `/page-2` can just be `/page-2`.
However, when the app is deployed to a URL like `/my-dash-app`, then
`app.get_relative_path('/page-2')` will return `/my-dash-app/page-2`

The `pathname` property of `dcc.Location` will return '`/my-dash-app/page-2`'
to the callback.
In this case, `app.strip_relative_path('/my-dash-app/page-2')`
will return `'page-2'`

For nested URLs, slashes are still included:
`app.strip_relative_path('/page-1/sub-page-1/')` will return
`page-1/sub-page-1`
```
)r4   app_strip_relative_pathr   r   r  s     rb   strip_relative_pathDash.strip_relative_path  s'    ^ 11KK00$
 	
re   r2  )r:  GETc                   ^  [        T [        5      (       a  T R                  S5      (       a  [        S5      e[	        U5      (       d  [        S5      eSS1n[        U5      R                  U5      (       d  [        SU 35      e[        U 4S j[        R                   5       5      (       a  [        ST  S	35      e[        R                  R                  T X45        g
)a  
Add a route to the app to be initialized at the end of Dash initialization.
Use this if the package requires a route to be added to the app, and you will not need to worry about at what point to add it.

:param name: The name of the route. eg "my-new-url/path".
:param view_func: The function to call when the route is requested. The function should return a JSON serializable object.
:param methods: The HTTP methods that the route should respond to. eg ["GET", "POST"] or either one.
r  z3name must be a string and should not start with '/'zview_func must be callabler:  r  zmethods should only contain c              3   2   >#    U  H  oS    T:H  v   M     g7f)r   Nr   )r  router   s     rb   r  )Dash.add_startup_route.<locals>.<genexpr>  s     A-@EQx4-@s   zRoute name 'z' is already in use.N)r   r   r  r   r[  r   issubsetr  r   r   r5  )r   r/  r2  valid_methodss   `   rb   add_startup_routeDash.add_startup_route  s     $$$(<(<RSS	""9::7|$$]33;M?KLLAT-@-@AAA|D61EFGG""D)#=>re   c                 h    U R                    H  u  pnU R                  SU 3X#5        M     / U l         g)z9
Initialize the startup routes stored in STARTUP_ROUTES.
z_dash_startup_route/N)r   r7  )r   _name
_view_func_methodss       rb   r   Dash.setup_startup_routes  s7     ,0+>+>'ExMM08*O ,? re   c           
      \   UR                  SS5      n[        5       =o0l        S H  n[        XAR                  US 5      US9X4'   M!     S[        S4S[        S4S	[
        S
44 H(  u  pEnU" [        XAR                  US 5      US95      X4'   M*     [        SUR                  SS 5      SS9US'   U$ )Nr  F)rr  rs  r  r  silence_routes_loggingprune_errors)defaultr     hot_reload_watch_intervalg      ?r     rt  )r  r%   r  r"   floatr  )r   r}   r  	dev_toolsattr_typer
  s          rb   r   Dash._setup_dev_tools%  s    

7E*&3o5	O
D 2jjt,eIO
 #E1-(%5#S!,%
 D
 $#D**T4*@'RIO%
 .A#JJ.5.
	)* re   r  dev_tools_uidev_tools_props_checkdev_tools_serve_dev_bundlesdev_tools_hot_reloaddev_tools_hot_reload_interval#dev_tools_hot_reload_watch_intervaldev_tools_hot_reload_max_retry dev_tools_silence_routes_loggingdev_tools_disable_version_checkdev_tools_prune_errorsc                   ^ ^^^ Uc  [        SSS5      nT R                  UUUUUUUUU	U
US9mTR                  (       a3  [        R                  " S5      R                  [        R                  5        TR                  (       Ga  T R                  n[        5       Ul
        [        [        R                  5       Vs/ s H!  nUS:w  d  M  [        R                  " U5      PM#     nnS[         R"                  ;   an  SS	KJn  [)        U5       HY  u  nn[+        UU5      (       d  M  [,        R.                  R1                  S
5      nUR2                  S   n[5        USU5        UUU'   M[     U Vs/ s H  n[+        U[6        5      (       a  WO[9        US5      (       a)  [:        R<                  R?                  UR<                  5      OH[9        US5      (       a,  [:        R<                  R?                  UR@                  S   5      OURB                  PM     snm[)        U5       H  u  nn[9        US5      (       d  M  S[:        R<                  R?                  UR<                  5      ;   d  MH  S Vs/ s HJ  n[:        R<                  RE                  [:        R<                  R?                  UR<                  5      U5      PML     snTUUS-   & M     [F        RH                  " UUU 4S jS9Ul%        SURJ                  l&        URJ                  RO                  5         U(       a{  [P        RR                  (       a"  [P        RT                  " T TRV                  5        ODTRV                  (       a3  [Y        S5      mT RZ                  R]                  [^        5      U4S j5       nU(       aM  TR`                  (       a<  S nS nT RZ                  Rc                  U5        T RZ                  Re                  U5        U(       a\  TRf                  (       aK  T Rh                  Rj                  Rl                  (       d&  ST Rh                  Rj                  l6        [o        S5        U$ s  snf s  snf s  snf )a  Activate the dev tools, called by `run`. If your application
is served by wsgi and you want to activate the dev tools, you can call
this method out of `__main__`.

All parameters can be set by environment variables as listed.
Values provided here take precedence over environment variables.

Available dev_tools environment variables:

    - DASH_DEBUG
    - DASH_UI
    - DASH_PROPS_CHECK
    - DASH_SERVE_DEV_BUNDLES
    - DASH_HOT_RELOAD
    - DASH_HOT_RELOAD_INTERVAL
    - DASH_HOT_RELOAD_WATCH_INTERVAL
    - DASH_HOT_RELOAD_MAX_RETRY
    - DASH_SILENCE_ROUTES_LOGGING
    - DASH_DISABLE_VERSION_CHECK
    - DASH_PRUNE_ERRORS

:param debug: Enable/disable all the dev tools unless overridden by the
    arguments or environment variables. Default is ``True`` when
    ``enable_dev_tools`` is called directly, and ``False`` when called
    via ``run``. env: ``DASH_DEBUG``
:type debug: bool

:param dev_tools_ui: Show the dev tools UI. env: ``DASH_UI``
:type dev_tools_ui: bool

:param dev_tools_props_check: Validate the types and values of Dash
    component props. env: ``DASH_PROPS_CHECK``
:type dev_tools_props_check: bool

:param dev_tools_serve_dev_bundles: Serve the dev bundles. Production
    bundles do not necessarily include all the dev tools code.
    env: ``DASH_SERVE_DEV_BUNDLES``
:type dev_tools_serve_dev_bundles: bool

:param dev_tools_hot_reload: Activate hot reloading when app, assets,
    and component files change. env: ``DASH_HOT_RELOAD``
:type dev_tools_hot_reload: bool

:param dev_tools_hot_reload_interval: Interval in seconds for the
    client to request the reload hash. Default 3.
    env: ``DASH_HOT_RELOAD_INTERVAL``
:type dev_tools_hot_reload_interval: float

:param dev_tools_hot_reload_watch_interval: Interval in seconds for the
    server to check asset and component folders for changes.
    Default 0.5. env: ``DASH_HOT_RELOAD_WATCH_INTERVAL``
:type dev_tools_hot_reload_watch_interval: float

:param dev_tools_hot_reload_max_retry: Maximum number of failed reload
    hash requests before failing and displaying a pop up. Default 8.
    env: ``DASH_HOT_RELOAD_MAX_RETRY``
:type dev_tools_hot_reload_max_retry: int

:param dev_tools_silence_routes_logging: Silence the `werkzeug` logger,
    will remove all routes logging. Enabled with debugging by default
    because hot reload hash checks generate a lot of requests.
    env: ``DASH_SILENCE_ROUTES_LOGGING``
:type dev_tools_silence_routes_logging: bool

:param dev_tools_disable_version_check: Silence the upgrade
    notification to prevent making requests to the Dash server.
    env: ``DASH_DISABLE_VERSION_CHECK``
:type dev_tools_disable_version_check: bool

:param dev_tools_prune_errors: Reduce tracebacks to just user code,
    stripping out Flask and Dash pieces. Only available with debugging.
    `True` by default, set to `False` to see the complete traceback.
    env: ``DASH_PRUNE_ERRORS``
:type dev_tools_prune_errors: bool

:return: debug
Nr  T)r  rr  rs  r  r  r  r  r  r  rt  r	  werkzeug__main___pytestr   )AssertionRewritingHookr  r   _pathz	dash/dashr  r   c                     > [         R                  " TR                  R                  /T -   TR                  TR
                  S9$ )N)
sleep_time)r7   watchr   r   _on_assets_changer  )component_packages_distr  r   s   rb   rr  'Dash.enable_dev_tools.<locals>.<lambda>  s6    v||[[../2II**(BB re   )target   c                 $   > [        TU 5      nUS4$ )Ni  )rv   )rR   r`   ru   s     rb   _wrap_errors+Dash.enable_dev_tools.<locals>._wrap_errors  s     (6Bs7Nre   c                  ^    S[         R                   " 5       S S.0[        R                  l        g )N__dash_server)durdesc)timer   rV  timing_informationr   re   rb   _before_request.Dash.enable_dev_tools.<locals>._before_request  s     #TYY[$%G.*re   c                    [         R                  R                  SS 5      nUc  U $ UR                  SS 5      nUb*  [        [        R                  " 5       US   -
  S-  5      US'   UR                  5        H^  u  p4UnUR                  S5      b  USUS    S3-  nUR                  S5      b  USUS    3-  nU R                  R                  S	U5        M`     U $ )
Nr3  r/  r0  r|  r1  z;desc="r  z;dur=zServer-Timing)r   rV  r  roundr2  r  r  r  )r  r3  
dash_totalr   inforX  s         rb   _after_request-Dash.enable_dev_tools.<locals>._after_request  s    %*WW[[1Et%L"%-#O/33OTJ
)(-tyy{Z=N/NRV.V(WJu%"4":":"<JD Exx'374<.!::xx25e!66$$((%@ #=  re   zoWARNING: dev bundles requested with serve_locally=False.
This is not supported, switching to serve_locally=True)8r"   r   r  r   r   r   ERRORr  r   r'   r   r4  r   r  r	  find_loaderr   r  _pytest.assertion.rewriter!  	enumerater   r  utilr   submodule_search_locationssetattrr   rn   r   r   r  r"  filenamerq   r   Threadr   daemonstartrB   rD  %configure_callback_exception_handlingr	  r/   r   r#  r   rr  r$  after_requestr  r   r   r   print)r   r  r  r  r  r  r  r  r  r  r  r  r  r  r  r!  rC  r  	dash_specdash_test_pathir,  r4  r:  r'  r  ru   s   `                       @@@rb   enable_dev_toolsDash.enable_dev_toolsF  s   v ='t<E))-9+ =&I!?#C"A/ * 
	 ++j)227==A&&G(?GL /8899A
? '##A&9   CKK' '0&9NE7!'+ABB$-NN$<$<V$D	)2)M)Ma)P	6>B*3 ':"  ('  (G gz22  7F++ WW__W\\2
 7G,, WW__MM!$ %%&  ('# (1
77F++rwwLL@ 1
 "?:!>A RWW__W\\%BAF!>:+AA6	 2 $-#3#3$G  +/G  '  &&(""BB)00 ''!")))4# 5# Y\\
 * KK&&7KK%%n5 ++LL''55 15DLL-I
 e*'":s   :
QQ*B$Q(AQc                   ^ U R                   nUR                     SUl        [        5       Ul        U R
                  R                  U;   Ga  [        R                  R                  U[        R                  R                  U R
                  R                  U/5      5      R                  SS5      R                  S5      mUR                  R                  U R                  T5      [!        U5      UR#                  S5      S.5        XR$                  ;  a|  U(       du  U R'                  TU5      nUR#                  S5      (       a  U R(                  R+                  U5        O1UR#                  S5      (       a  U R,                  R/                  U5        U(       a  XR$                  ;   a  U R$                  R1                  U5        U4S jnUR#                  S5      (       a'  U" U R(                  R2                  R2                  5        O<UR#                  S5      (       a&  U" U R,                  R2                  R2                  5        S S S 5        g ! , (       d  f       g = f)NTr  r  r   )rR  r  is_cssr  c                    > S nU  H  nUR                  S5      T:X  d  M  Un  O   U(       a  U R                  U5        g g )Nr  )r  remove)r  	to_deleterr  s      rb   delete_resource/Dash._on_assets_change.<locals>.delete_resourceS  sC    $(	!*A uu\2j@,-	 % "+ %%,,Y7 %re   )r   r   r   r'   r   r   r   r   r   relpathcommonprefixr  r!  r   r5  r  r  r  r   r  r   r  r   r  rR  r  )r   rC  r  deletedr  r  rU  r  s          @rb   r&  Dash._on_assets_change0  s   ""\\GL(?GL{{((H4GGOO ,,dkk.G.G-RS WT3'VC[  &&--#11*=$'M"*"3"3E": #5#55g33JIC((..2237!**511++C0#5#55**11(;8  ((..'(?(?(J(JK!**511'(;(;(F(FG_ \\s   H%I
Ihostportproxyjupyter_modejupyter_widthjupyter_heightjupyter_server_urlc                   ^^  Uc  [        SSS5      nU R                  UU	U
UUUUUUUU5      nS[        R                  ;   a  U=(       d    SnO U=(       d    [        R                  " SS5      nU=(       d    [        R                  " SS5      nT=(       d    [        R                  " S	5      m [        U5      nU[        S
S5      ;   d   e [        R                  " S5      S:w  Ga  UR                  S5      nU(       a  SOSnU R                  R                  nT(       a  [        [        TR                  S5      5      u  nm U U4S jnU" UR                   US5        U" UR"                  US5        U" UR$                  US5        T R                   T R"                  T R$                  (       a  ST R$                   3OSU4nO	UUSU 3U4n[&        (       a  [&        R(                  (       d  U R*                  R,                  " S/UQ76   U R                  R.                  (       a  / =nUS'   U R                  R.                   H  n[        R0                  R3                  U5      (       a[  [        R4                  " U5       H?  u  nnnU H2  nUR7                  [        R0                  R9                  UU5      5        M4     MA     M  [        R0                  R;                  U5      (       d  M  UR7                  U5        M     [&        R<                  (       a  [&        R>                  " U UUUUUUS9  gU R@                  RB                  " SXUS.UD6  g! [         a  nS[        U5       34Ul	        e SnAff = f)a  Start the flask server in local mode, you should not run this on a
production server, use gunicorn/waitress instead.

If a parameter can be set by an environment variable, that is listed
too. Values provided here take precedence over environment variables.

:param host: Host IP used to serve the application, default to "127.0.0.1"
    env: ``HOST``
:type host: string

:param port: Port used to serve the application, default to "8050"
    env: ``PORT``
:type port: int

:param proxy: If this application will be served to a different URL
    via a proxy configured outside of Python, you can list it here
    as a string of the form ``"{input}::{output}"``, for example:
    ``"http://0.0.0.0:8050::https://my.domain.com"``
    so that the startup message will display an accurate URL.
    env: ``DASH_PROXY``
:type proxy: string

:param debug: Set Flask debug mode and enable dev tools.
    env: ``DASH_DEBUG``
:type debug: bool

:param debug: Enable/disable all the dev tools unless overridden by the
    arguments or environment variables. Default is ``True`` when
    ``enable_dev_tools`` is called directly, and ``False`` when called
    via ``run``. env: ``DASH_DEBUG``
:type debug: bool

:param dev_tools_ui: Show the dev tools UI. env: ``DASH_UI``
:type dev_tools_ui: bool

:param dev_tools_props_check: Validate the types and values of Dash
    component props. env: ``DASH_PROPS_CHECK``
:type dev_tools_props_check: bool

:param dev_tools_serve_dev_bundles: Serve the dev bundles. Production
    bundles do not necessarily include all the dev tools code.
    env: ``DASH_SERVE_DEV_BUNDLES``
:type dev_tools_serve_dev_bundles: bool

:param dev_tools_hot_reload: Activate hot reloading when app, assets,
    and component files change. env: ``DASH_HOT_RELOAD``
:type dev_tools_hot_reload: bool

:param dev_tools_hot_reload_interval: Interval in seconds for the
    client to request the reload hash. Default 3.
    env: ``DASH_HOT_RELOAD_INTERVAL``
:type dev_tools_hot_reload_interval: float

:param dev_tools_hot_reload_watch_interval: Interval in seconds for the
    server to check asset and component folders for changes.
    Default 0.5. env: ``DASH_HOT_RELOAD_WATCH_INTERVAL``
:type dev_tools_hot_reload_watch_interval: float

:param dev_tools_hot_reload_max_retry: Maximum number of failed reload
    hash requests before failing and displaying a pop up. Default 8.
    env: ``DASH_HOT_RELOAD_MAX_RETRY``
:type dev_tools_hot_reload_max_retry: int

:param dev_tools_silence_routes_logging: Silence the `werkzeug` logger,
    will remove all routes logging. Enabled with debugging by default
    because hot reload hash checks generate a lot of requests.
    env: ``DASH_SILENCE_ROUTES_LOGGING``
:type dev_tools_silence_routes_logging: bool

:param dev_tools_disable_version_check: Silence the upgrade
    notification to prevent making requests to the Dash server.
    env: ``DASH_DISABLE_VERSION_CHECK``
:type dev_tools_disable_version_check: bool

:param dev_tools_prune_errors: Reduce tracebacks to just user code,
    stripping out Flask and Dash pieces. Only available with debugging.
    `True` by default, set to `False` to see the complete traceback.
    env: ``DASH_PRUNE_ERRORS``
:type dev_tools_prune_errors: bool

:param jupyter_mode: How to display the application when running
    inside a jupyter notebook.

:param jupyter_width: Determine the width of the output cell
    when displaying inline in jupyter notebooks.
:type jupyter_width: str

:param jupyter_height: Height of app when displayed using
    jupyter_mode="inline"
:type jupyter_height: int

:param jupyter_server_url: Custom server url to display
    the app in jupyter notebook.

:param flask_run_options: Given to `Flask.run`

:return:
Nr  FCONDA_PREFIXz	127.0.0.1HOSTPORT8050
DASH_PROXYr   i   z1Expecting an integer from 1 to 65535, found port=WERKZEUG_RUN_MAINtruessl_contexthttpshttpz::c                 h   > X:w  a,  [        SU SU ST STR                  5        SU SU  S35      eg )Nz
                            z: zA is incompatible with the proxy:
                                z0
                            To see your app at z+,
                            you must use )r   geturl)served_parturl_part	part_nameproxied_urlr]  s      rb   verify_url_part!Dash.run.<locals>.verify_url_part	  se    ".(!&Kr( 4!!& (00;0B0B0D/E F**3B{m D	   /re   protocolr[  r\  :rk   zDash is running on %s://%s%s%s
extra_files)r  widthheightr[  r\  
server_url)r[  r\  r  r   )"r"   rM  r   environgetenvr  ru  r   reprr|   r  r   r   mapr   r  schemehostnamer\  rB   
in_ipythonr   r9  r   r   isdirr  r5  rq   isfilerD  run_appr   r  )!r   r[  r\  r]  r  r^  r_  r`  ra  r  r  r  r  r  r  r  r  r  r  flask_run_optionsrk  rj  ru  r   
served_urlrs  display_urlrw  dirpathr  	filenamesfnrr  s!      `                            @rb   r  Dash.rund  s   p ='u=E%%!' )/*,+"
  RZZ' &;D9299V[9D0ryy00<0	t9D5E?*** 99()V3+//>K"-w6H;;77D*-hD8I*J'
K	  
 1 18ZH
 3 3T6B
v>  &&((.9.>.>a(()*B	  (4&z4@<|'>'>  !CRkR;;--=??K+M:::77==&&13-I"+B'..rww||GR/HI #, 2? WW^^D))&&t, ;   !#%- KKOOSSARS}  	I$t*VXAF	s   .M 
M/M**M/c                    ^  T R                   (       d  g T R                  (       a  [        T R                  R                  5        T R                  R
                  U 4S j5       ng )Nc                  8  > TR                   S   (       a  g STR                   S'   [        [        S5      [        [        S5      S.n U R                  TR                  5        TR
                  (       Gar  TR                  [        [        S5      [        [        S5      U SS9U4S	 j5       n[        R                  " [        R                  5        [        R                  " [        R                  5        TR                  R                   (       d  ["        R$                  " [        R                  R'                  5        Vs/ s H=  n[)        US
   5      (       a"  [*        R,                  " [/        US
   5      5      OUS
   PM?     sn[)        TR0                  5      (       a  TR1                  5       OTR0                  /-   5      Tl        [        TR2                  ;  a  [5        S5      eOTR                  [        [        S5      [        [        S5      U SS9U4S j5       n[        R                  " [        R                  5        [        R                  " [        R                  5        TR                  R                   (       d  TR0                  n[7        U[8        5      (       d  [)        TR0                  5      (       a  TR1                  5       OTR0                  /n["        R$                  " [        R                  R'                  5        Vs/ s H%  n[)        US
   5      (       a
  US
   " 5       OUS
   PM'     snU-   5      Tl        [        TR2                  ;  a  [5        S5      eTR;                  S[        [<        S5      [        [        S5      5        g s  snf s  snf )Nr   Tpathnamer  )	pathname_search_ra  r  )rC  r  c                 D  >#    [        U5      n[        T	R                  U 5      5      u  pEU0 :X  an  [        R                  R                  5        H)  u  pdUR                  S5      S   S:X  d  M  US   nUS   n  O<   [        R                  " S5      nT	R                  nOUR                  SS5      nUS   n[        U5      (       a#  [        U40 0 U=(       d    0 EUEUED6I Sh  vN n[        U5      (       a  [        U40 U=(       d    0 D6I Sh  vN nUSU04$  N7 N7f)	
Updates dash.page_container layout on page navigation.
Updates the stored page title which will trigger the clientside callback to update the app title
r  r  not_found_404rV  r   404 - Page not foundrk   N)r>   r@   r  r=   PAGE_REGISTRYr  r  r   H1r   r  r[  r~   
r  r  statesquery_parameterspagepath_variablesr  rV  r   r   s
            rb   r  1Dash.enable_pages.<locals>.router.<locals>.updateQ	  s1     (;7'C$+800;,(D
 rz,2,@,@,F,F,HLF%||C04G)-h(,W %	 -I &*WW-C%DF$(JJE!%(B!7 $W'''="(V."6BV;KVvV( "  &<!'&4&:' ! "GU#333"
!s+   A'D .A6D $D%,D DD D rV  z-`dash.page_container` not found in the layoutc                   > [        U5      n[        T	R                  U 5      5      u  pEU0 :X  an  [        R                  R                  5        H)  u  pdUR                  S5      S   S:X  d  M  US   nUS   n  O<   [        R                  " S5      nT	R                  nOUR                  SS5      nUS   n[        U5      (       a  U" S0 0 U=(       d    0 EUEUED6n[        U5      (       a  U" S0 U=(       d    0 D6nUSU04$ )	r  r  r  r  rV  r   r  rk   r   )r>   r@   r  r=   r  r  r  r   r  r   r  r[  r  s
            rb   r  r  	  s    (;7'C$+800;,(D
 rz,2,@,@,F,F,HLF%||C04G)-h(,W %	 -I &*WW-C%DF$(JJE!%(B!7 $W''!' "V."6BV;KVvV"   % ?)=2 ?!GU#333re   zv
                function(data) {{
                    document.title = data.title
                }}
                )r   r   _ID_LOCATIONr  r   r   r   r   _ID_CONTENT	_ID_STOREr6   check_for_duplicate_pathnamesr=   r  validate_registryr   r   r   rb  r  r[  ry   r  r~   rV  r   r   r   r4  r:  	_ID_DUMMY)rC  r  r  rV  r   s       rb   router!Dash.enable_pages.<locals>.routerC	  s   &&w//3D##G, #<< x8F MM$667;
39f-!)-	  #4#4J 778L8LM++F,@,@A {{??-1XX
 )/(<(<(C(C(E	 )F  (X77 $KK(>tH~(NO!%h0 )F	  (44 !KKM!%	.D* d&<&<<#$STT = ;
39f-!)-	   4 4D 778L8LM++F,@,@A ;;;;!&$// $DKK00 ![[	F .2XX
 )/(<(<(C(C(E	 )F  (X77 !N,!%h0 )F	 !!.D* d&<&<<#$STT $$
 y*-i(gNs   >AN,N)r   r   rA   r   r   r$  )r   r  s   ` rb   r)  Dash.enable_pages=	  sF    ~~&t{{'?'?@		#	#Y	 
$Y	re   c                 $    U R                  X5      $ )z
This method makes instances of Dash WSGI-compliant callables.
It delegates the actual WSGI handling to the internal Flask app's
__call__ method.
)r   )r   r{  start_responses      rb   __call__Dash.__call__	  s     {{733re   )!r   r   r   r   r  r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   rV  r   r   r   r   r   r   r   r   r   r   r   rx   ))r  )T)rk   rk   rk   rk   rk   rk   rk   rk   )r  )r  N)NNNNNNNNNNN)NNNNNz100%i  NNNNNNNNNNN)Pr   
__module____qualname____firstlineno____doc__r   __annotations__r   r4  r   r   r   _default_indexr   r   r   r   r   r
   rD   r   r   r	   r   r   r   r   RouteCallabler7  r'  r*  propertyrV  setterr\  r   r=  r  rA  r  r  r  r  r  r  r  r<  rC  r(  r>  r:  r   rW  rl  ra  r  r?  r@  r%  r  r  staticmethodr&  rB  r  r  r  r  r   r   r   r   r  rM  r&  rC   r  r)  r  __static_attributes__r   re   rb   r   r      s   {z NDKK L #+/%#$('(,.2#%)#'+/2604"#'8<*KOOS7;*/$:>"&)  $)-LP%)9=$(MQ$smQ$ dEKK'(Q$ 	Q$
 Q$ D>Q$ Q$ Q$ !IQ$ 'smQ$ Q$ #Q$ !Q$ $C=Q$ #+3-Q$  !)!Q$" #Q$$ 4.%Q$& HT#s(^45'Q$( )Q$* #8E#tCH~2E,F#GH+Q$, 'xc4S>6I0J'KL-Q$. '/tn/Q$0 $(1Q$2 3Q$4 !)# 75Q$6 $7Q$8 9Q$: ;Q$< &.&
=Q$B CQ$D &EQ$F "*$sE%,4G/G*H!IGQ$H c]IQ$J 8YK$456KQ$L D>MQ$fJ@FHU[[1 Ft FP	&S 	&] 	&QU 	&14!&    ]]2C 2 2 
 "c " " ## #$ # #


&P
$(3- D JZ
 7
 7
rgs geC e1($L5r 8
t
I
V
Xc3h-? 
.*'R("2&(C%J1-f     
 

%
Xc] %
N?# ?# ?<'
R1
 1
c4i0@ 1
f ??+?6>w}?U6V?	? ?4!F !%'+046:/37;=A8<;?:>15g~g tng  (~	g
 &.d^g 'tng (0}g .6c]g )1g +34.g *2$g !)g 
gT1Hl #*.# $59#!,0'+046:/37;=A8<;?:>15'WTsmWT uS#X'WT }	WT
 ~WT 12WT WT WT %SMWT tnWT  (~WT &.d^WT 'tnWT (0}WT .6c]WT  )1!WT" +34.#WT$ *2$%WT& !)'WTr`D4re   r   )r  r   r   r   r  r   contextvarsr   importlib.machineryr   importlib.utilr   r   r	  r   r  r   r2  r  r  r  rr   urllib.parser   typingr   r	   r
   r   r   r   r   r   ry   r   importlib_metadatar   r"  r  r   r   r   r  r   r   r  r   r   r>  r   r   r   development.base_componentr   
exceptionsr   r   r   r    r!   _configsr"   r#   r$   _utilsr%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   rk   r3   r4   r5   r6   r7   r8   	_groupingr9   r:   r;   	_obsoleter<   r=   r>   r?   r@   rA   _jupyterrB   rC   typesrD   r  ry  rz  add_typer  r)  rg  rh  ri  r*  r+  r,  r-  r  r  r  r  r  rb  LocationStorer  r   rv   NoUpdater  r~   r   r   re   rb   <module>r     s    	 
    $ * $    	       ! P P P   C    = # 
 :  ! P P           D D &   7  c" ""#45KX%%h/N 
  %vt 4*
 3- 0 C : J B   		I XXLLL.AHHd;II#HH	D9		
N6T) 6Tt  	!#4? #4WNs   9AH1 1H7