úÎ!ë=ãU      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGH I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~Safe―€‚ƒ„…†None'R snap-extrasŠA splice that makes the CSRF token available to templates. Typically we use it by binding a splice and using the CSRF token provided by the session snaplet as follows: -("csrfToken", csrfTokenSplice $ with session ‡)Where session‘ is a lens to the session snaplet. Then you can make it available to javascript code by putting a meta tag at the top of every page like this: /<meta name="csrf-token" content="${csrfToken}"> snap-extrasĸBAdds a hidden _csrf input field as the first child of the bound tag. For full site protection against CSRF, you should bind this splice to the form tag, and then make sure your app checks all POST requests for the presence of this CSRF token and that the token is randomly generated and secure on a per session basis. snap-extrasĸļUse this function to wrap your whole site with CSRF protection. Due to security considerations, the way Snap parses file uploads means that the CSRF token cannot be checked before the file uploads have been handled. This function protects your whole site except for handlers of multipart/form-data forms (forms with file uploads). To protect those handlers, you have to call handleCSRF explicitly after the file has been processed. snap-extrasÉIf a request is a POST, check the CSRF token and fail with the specified handler if the check fails. If if the token is correct or if it's not a POST request, then control passes through as a no-op. snap-extras A version of d that works as an imperative filter. It's a NOOP when successful, redirs to oblivion under failure. snap-extrasHA computation in the runtime monad that gets the CSRF protection token. snap-extrasHA computation in the runtime monad that gets the CSRF protection token. snap-extrasLens to the session snaplet snap-extras&Handler to run if the CSRF check fails snap-extras'Handler to let through when successful. snap-extrasLens to the session snaplet snap-extrasHandler to run on failure snap-extras'Handler to let through when successful. snap-extras On failureNoneA3 snap-extrasUDiscard anything after this and return given status code to HTTP client immediately. snap-extras Finish early with error code 400 snap-extras Finish early with error code 404 snap-extras Finish early with error code 500  snap-extrasMark response as  'text/plain'  snap-extrasMark response as 'application/json'  snap-extrasMark response as 'application/javascript'  snap-extras}Easier debug logging into error log. First argument is a category/namespace and the second argument is anything that has a ˆ instance.  snap-extrasAAlternate version of getParam that considers empty string Nothing snap-extras7Require that a parameter is present or terminate early. snap-extrasgRead a parameter from request. Be sure it is readable if it's there, or else this will raise an error. snap-extrasxTry to read a parameter from request. Computation may fail because the param is not there, or because it can't be read. snap-extrasYRedirects back to the refering page. If there is no Referer header, then redirect to /. snap-extrasYRedirects back to the refering page. If there is no Referer header, then redirect to /. snap-extrashIf the current rqURI does not have a trailing slash, then redirect to the same page with a slash added. snap-extrasbIf the current rqURI has a trailing slash, then redirect to the same page with no trailing slash. snap-extras-Evaluates an action that returns a Maybe and  snap-extras%Concatenates two URL segments with a ‰› between them. To prevent double slashes, all trailing slashes are removed from the first path and all leading slashes are removed from the second path.   Soostone IncBSD3 Ozgun Ataman experimentalNoneR“ snap-extraslPossible reponse types we support at the moment. Can be expanded for more use cases like JSON, CSV and XML. snap-extras8Replace innerHTML of given selector with given conntent.Š snap-extrasFProduce JS statement to replace a target's inner with given contents. snap-extraseReplace the inner HTML element of a given selector with the contents of the rendered Heist template.OCurrently expect you to have jQuery loaded. TODO: Make this jQuery independent snap-extras/The multi-mime dispatcher. It will inspect the Acceptg header and determine what type of a request this is. If AJAX, make sure to set the Accept header to 'application/javascript'. snap-extrasDispatch on all response types snap-extrasOClassic pattern of responding to a static HTML or an alternative AJAX request. snap-extrasjquery selector snap-extras content blob snap-extrasHeist template name snap-extras*jQuery selector for target element on page snap-extrasIf call is HTML snap-extrasIf call is AJAXNone]&$ snap-extrasxInitialize the flash notice system. All you have to do now is to add some flash tags in your application template. See ) for examples.% snap-extras.Display an info message on next load of a page& snap-extras1Display an warning message on next load of a page' snap-extras0Display a success message on next load of a page( snap-extras/Display an error message on next load of a page) snap-extras5A splice for rendering a given flash notice dirctive.Ex:  flashtype='warning'/ Ex: flashtype='success'/* snap-extras>A compiled splice for rendering a given flash notice dirctive.Ex:  flashtype='warning'/ Ex: flashtype='success'/$%&'()*$%&'()*None"#f.+ snap-extras-Transform to Nothing if field is empty string, snap-extrasMaybe read into target value- snap-extrasRead into target value. snap-extrasVConstructs a generalized edit form splice that looks up an ID param specified by the by2 attribute. You might use this splice as follows: <editFormSplice by="id">If you don't specify the by attribute, the default is by="id".. snap-extrasWFunction for generating a splice from an optional default value calculated at runtime. snap-extras/Function for retrieving the form default by ID.+,-.+,-.NoneqU/ snap-extrasTDemand the presence of JSON in the body assuming it is not larger than 50000 bytes.0 snap-extras Demand the presence of JSON in the body with a size up to N bytes. If parsing fails for any reson, request is terminated early and a server error is returned.1 snap-extrasDTry to parse request body as JSON with a default max size of 50000.2 snap-extras7Parse request body into JSON or return an error string.3 snap-extras(Get JSON data from the given Param field4 snap-extras,Force the JSON value from field. Similar to 35 snap-extras Set MIME to 'application/json' and write given object into ‹ body.0 snap-extrasMaximum size in bytes2 snap-extrasMaximum size in bytes/012345210/345Noneya6 snap-extrasĸ`Wrap a handler with method override support. This means that if (and only if) the request is a POST, _method param is passed, and it is a parsable method name, it will change the request method to the supplied one. This works around some browser limitations with forms. If you use a different parameter name than _method, use handleMethodOverride'6 snap-extrasInternal handler to call7 snap-extrasparameter name for method snap-extrasInternal handler to call6767NoneV~b : snap-extrasA session manager for the base< snap-extras= snap-extras> snap-extras? snap-extrasA snap-extrasB snap-extrasC snap-extrasE snap-extrasG snap-extras; snap-extrasLens to the session snaplet snap-extrasOThe heist snaplet (not a lens), if you want splices to be added automatically.89:;<=>?@ABCDEFG89:;<=>?@ABCDEFG None"#NV˜ų H snap-extrasThe complete status of a job.P snap-extras*Enumeration of the states a job can be in.U snap-extras>Top-level handler that handles the job polling infrastructure.V snap-extrasjFunction to generate a status splice. This splice makes the following splices available to its children:lConditional splices: ifPending, ifRunning, ifNotFinished, ifFinished, ifFinishedSuccess, ifFinishedFailurevData splices: elapsedSeconds, startTime, endTime, jobState, messages, percentCompleted, amountCompleted, amountTotalŒ snap-extras<JS code to do an AJAX request to updateStatus after a delay.W snap-extras6Returns a bool indicating whether the job is finished.X snap-extras6Returns a bool indicating whether the job is finished.Y snap-extras+Calculates the percent completed as an Int.Z snap-extrasThe status splicesU snap-extras:Name of the template to use for the updateStatus endpoint. snap-extrasaA CSS selector string used to substitute the contents of the AJAX template into the status page.V snap-extras0Splices defined for your job status type status. snap-extrasĀHandler to get the URL that should be used for requesting AJAX status updates. This must be a handler because it will usually contain some form of job ID that is only obtainable at runtime. snap-extrasšHandler that knows how to get the status of the job in question. This typically will require it to know how to get some sort of job ID from the request. snap-extras1A function to tell whether the status is finishedŒ snap-extras&The url for incremental status updates snap-extrasEThe amount of time to wait before requesting the page in millisecondsHILJKMNOPRQSTUVWXYZ[UVPRQSTWXHILJKMNOY[ZNone™Ï Noneētb snap-extras(A list of splices offered in this moduled snap-extras4Gets the value of a request parameter. Example use: rqparamname="username"/e snap-extras7Assume text area contains the name of a splice as Text.„This is helpful when you pass a default value to digestive-functors by putting the name of a splice as the value of a textarea tag. ,heistLocal runTextAreas $ render "joo/index"f snap-extras8Splice helper for when you're rendering a select elementg snap-extrasĘSearches a directory on disk and all its subdirectories for all files with names that don't begin with an underscore and end with a .js extension. It then returns script tags for each of these files.-You can use this function to create a splice: 0("staticscripts", scriptsSplice "static/js" "/")Then when you use the <staticscripts/>V tag in your templates, it will automatically include all the javascript code in the  static/js directory.h snap-extrasžCheck to see if the boolean flag named by the "ref" attribute is present and set to true in snaplet user config file. If so, run what's inside this splice, if not, simply omit that part.Example: 4<flag ref="beta-functions-enabled"> stuff... </flag>2This will look for an entry inside your .cfg file: beta-functions-enabled = truef snap-extrasA name for the select element snap-extrasAn id for the select element snap-extrasvalue, shown text pairs snap-extras Default valueg snap-extras;Path to the directory on disk holding the javascript files. snap-extras8A prefix to add to the src attribute of each script tag.bcdefghdbfeghc NoneĖík snap-extras4Gets the value of a request parameter. Example use: rqparamname="username"/l snap-extrasĘSearches a directory on disk and all its subdirectories for all files with names that don't begin with an underscore and end with a .js extension. It then returns script tags for each of these files.-You can use this function to create a splice: 0("staticscripts", scriptsSplice "static/js" "/")Then when you use the <staticscripts/>V tag in your templates, it will automatically include all the javascript code in the  static/js directory.m snap-extrasĸŠSometimes in a loop you don't always want the same behavior for every item. If you have a comma separated list, you usually don't want a comma after the last item. If you have a list surrounded by parentheses, you might not want the parentheses to show up if the list is empty. Dealing with these situations can be a pain with the stock looping splices, so we've provided this helper that solves all of these problems.ĸThis function is similar to manyWithSplices, but it binds three additional splices: "prelude", "interlude", and "postlude". The children of the prelude and postlude splices only show up before the beginning of the list and after the end of the list if the list is non-empty. The children of the interlude splice are used as a separator between each list element. If the list has only one element, then the separator does not appear. These splices have this behavior regardless of where they appear in the parent tag.l snap-extras<Path to the directory on disk holding the javascript files. snap-extras8A prefix to add to the src attribute of each script tag.ijklmijklm Noneß- n snap-extras A tab is a Ž0 generator upon receiving a current URL context.o snap-extras(How do we decide "active" for tab state?p snap-extras Current url has to match exactlyq snap-extras*Only the prefix needs to match current urlr snap-extras)A sub-set of the current url has to matchu snap-extrasCompiled splice for tabs. snap-extrastCan't use tabSpliceWorker because we have to explicitly run the attributes in order to get ${} splice substitution.w snap-extras(Make tabs from tab definitions. Use the x* combinator to define individual options.x snap-extras%Tab item constructor to be used with w=. Just supply the given arguments here and it will create a n ready to be used in w.IIf the tab is currently active, the li tag will get a class of 'active'.ŒMake sure to provide a trailing / when indicating URLs as snap context paths contain it and active tab checks will be confused without it.w snap-extras(A class to be given to the parent ul tag snap-extrasList of tabs in orderx snap-extrasTarget URL for tab snap-extrasA text/label for tab snap-extrasA list of attributes as key=val snap-extrasA o for this tab nopqrstuvwx tvuopqrsnwx Safeßŧyz{|}{y|z}Noneâ9~ snap-extrasInitialize all the b functionality in your Snap app. Currently, we don't need to keep any state and simply return ().E $%&'()*+,-./01234567nopqrstuvwxyz{|}~~ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKKLMNOPQRSTUVWXY Z Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y s z u x { | } ~  €  ‚ ƒ „ … † ‡ ˆ ‰ Š ‹ŒŽ‘’“”•–—˜™š˜›œžŸ  ĄĒĢĪĨ ͧ)snap-extras-0.12.2.1-7JBMCGmMQ3ejKlTrGTdeSnap.Extras.CSRFSnap.Extras.CoreUtilsSnap.Extras.AjaxSnap.Extras.FlashNoticeSnap.Extras.FormUtilsSnap.Extras.JSONSnap.Extras.MethodOverrideSnap.Extras.NavTrailsSnap.Extras.PollStatus#Snap.Extras.SpliceUtils.Interpreted Snap.Extras.SpliceUtils.CompiledSnap.Extras.TabsSnap.Extras.TextUtils Snap.ExtrasPaths_snap_extrasSnap.Extras.SpliceUtils.CommonSnapExtrascsrfTokenSplice secureForm blanketCSRF handleCSRF handleCSRF' finishEarlybadReqnotFound serverError plainResponse jsonResponse jsResponseeasyLog getParam'reqParam readParam readMayParamredirectRefererredirectRefererFuncdirifyundirify maybeBadReq fromMaybeM-/- ResponseTypeHtmlAjax replaceWithreplaceWithTemplaterespondresponds htmlOrAjax$fEqResponseType$fShowResponseType$fReadResponseType$fOrdResponseTypeinitFlashNotice flashInfo flashWarning flashSuccess flashError flashSplice flashCSplice maybeTrans readMayTrans readTranseditFormSplicereqJSONreqBoundedJSONgetJSONgetBoundedJSON getJSONField reqJSONField writeJSONhandleMethodOverridehandleMethodOverride'NavTrailntSes initNavTrailsetFocus setFocus' setFocusToRefgetFocus getFocusDef redirBack redirFocus backSplice backCSplice focusSplice focusCSpliceaddNavTrailSplicesStatusstatusStartTimestatusTimestampstatusJobStatestatusMessagesstatusAmountCompletedstatusAmountTotalJobStatePendingRunningFinishedSuccessFinishedFailurejobStatusHandler statusSplice jobFinishedstatusFinishedstatusPercentCompleted statusSplices statusElapsed $fEqJobState$fShowJobState$fReadJobState$fEnumJobState $fEqStatus $fShowStatus utilSplices refererSplice paramSplice runTextAreas selectSplice scriptsSplice ifFlagSplicerefererCSplicefancyLoopSpliceTab TabActiveMode TAMExactMatchTAMPrefixMatch TAMInfixMatch TAMDontMatchinitTabs tabsCSplice tabsSplicemkTabstabshowTshowBSreadTreadBS titleCase initExtrasversion getBinDir getLibDir getDynLibDir getDataDir getLibexecDir getSysconfDirgetDataFileName#snap-1.1.1.0-BEEp2Ej0xSu42pkQPKqzs0Snap.Snaplet.Session csrfTokenbaseGHC.ShowShowGHC.Real/ replaceWithJs(snap-core-1.0.3.2-1kBqsIyh22A1Jcf7ZUPGvbSnap.Internal.Http.TypesResponseupdateJS getScripts&xmlhtml-0.2.5.2-27XPx2GQji11O2l6cFwu1DText.XmlHtml.CommonNode tabCSplice