<?php

use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;

/* platform/message/ltiResourceLinkLaunch.html.twig */
class __TwigTemplate_c0285f79871537386468870514c0c5cbf5625982351e24f1d176fa5e0471d27c extends Template
{
    private $source;
    private $macros = [];

    public function __construct(Environment $env)
    {
        parent::__construct($env);

        $this->source = $this->getSourceContext();

        $this->blocks = [
            'nav_title' => [$this, 'block_nav_title'],
            'body' => [$this, 'block_body'],
        ];
    }

    protected function doGetParent(array $context)
    {
        // line 1
        return "base.html.twig";
    }

    protected function doDisplay(array $context, array $blocks = [])
    {
        $macros = $this->macros;
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "platform/message/ltiResourceLinkLaunch.html.twig"));

        $this->parent = $this->loadTemplate("base.html.twig", "platform/message/ltiResourceLinkLaunch.html.twig", 1);
        $this->parent->display($context, array_merge($this->blocks, $blocks));
        
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);

    }

    // line 3
    public function block_nav_title($context, array $blocks = [])
    {
        $macros = $this->macros;
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "nav_title"));

        echo "<i class=\"fas fa-sign-out-alt\"></i>&nbsp;&nbsp;<span class=\"text-danger\">Platform</span> - LtiResourceLinkRequest launch";
        
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);

    }

    // line 5
    public function block_body($context, array $blocks = [])
    {
        $macros = $this->macros;
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));

        // line 6
        echo "    <div class=\"accordion md-accordion\" id=\"accordionForm\" role=\"tablist\" aria-multiselectable=\"true\">
        <div class=\"card bg-light\">
            <div class=\"card-header dropdown-toggle clickable ";
        // line 8
        echo ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 8, $this->source); })()), "vars", [], "any", false, false, false, 8), "submitted", [], "any", false, false, false, 8)) ? ("collapsed") : (""));
        echo "\" role=\"tab\" id=\"headingForm\" data-toggle=\"collapse\" data-parent=\"#accordionForm\" href=\"#collapseForm\"
                 aria-expanded=\"";
        // line 9
        echo ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 9, $this->source); })()), "vars", [], "any", false, false, false, 9), "submitted", [], "any", false, false, false, 9)) ? ("false") : ("true"));
        echo "\" aria-controls=\"collapseForm\">
                <i class=\"fas fa-cogs\"></i>&nbsp;<code>LtiResourceLinkRequest</code> generator
            </div>
            <div id=\"collapseForm\" class=\"collapse card-body  ";
        // line 12
        echo ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 12, $this->source); })()), "vars", [], "any", false, false, false, 12), "submitted", [], "any", false, false, false, 12)) ? ("") : ("show"));
        echo "\" role=\"tabpanel\" aria-labelledby=\"headingForm\" data-parent=\"#accordionForm\">
            ";
        // line 13
        echo         $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 13, $this->source); })()), 'form_start');
        echo "
                ";
        // line 14
        echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 14, $this->source); })()), 'errors');
        echo "
                <div class=\"form-row\">
                    <div class=\"col-md-9\">
                        ";
        // line 17
        echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 17, $this->source); })()), "registration", [], "any", false, false, false, 17), 'row');
        echo "
                    </div>
                    <div class=\"col-md-3\">
                        ";
        // line 20
        echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 20, $this->source); })()), "user_type", [], "any", false, false, false, 20), 'row');
        echo "
                    </div>
                </div>
                <div id=\"userList\" class=\"form-row ";
        // line 23
        echo (((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 23, $this->source); })()), "user_type", [], "any", false, false, false, 23), "vars", [], "any", false, false, false, 23), "value", [], "any", false, false, false, 23) != "list")) ? ("d-none") : (""));
        echo "\">
                    <div class=\"col-md-12\">
                        ";
        // line 25
        echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 25, $this->source); })()), "user_list", [], "any", false, false, false, 25), 'row');
        echo "
                    </div>
                </div>
                <div id=\"userCustom\" class=\"form-row ";
        // line 28
        echo (((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 28, $this->source); })()), "user_type", [], "any", false, false, false, 28), "vars", [], "any", false, false, false, 28), "value", [], "any", false, false, false, 28) != "custom")) ? ("d-none") : (""));
        echo "\">
                    <div class=\"col-md-3\">
                        ";
        // line 30
        echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 30, $this->source); })()), "custom_user_id", [], "any", false, false, false, 30), 'row');
        echo "
                    </div>
                    <div class=\"col-md-3\">
                        ";
        // line 33
        echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 33, $this->source); })()), "custom_user_name", [], "any", false, false, false, 33), 'row');
        echo "
                    </div>
                    <div class=\"col-md-3\">
                        ";
        // line 36
        echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 36, $this->source); })()), "custom_user_email", [], "any", false, false, false, 36), 'row');
        echo "
                    </div>
                    <div class=\"col-md-3\">
                        ";
        // line 39
        echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 39, $this->source); })()), "custom_user_locale", [], "any", false, false, false, 39), 'row');
        echo "
                    </div>
                </div>
                <div class=\"form-group\">
                    ";
        // line 43
        echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 43, $this->source); })()), "launch_url", [], "any", false, false, false, 43), 'label');
        echo "<br/>
                    <div class=\"input-group\">
                        <div class=\"input-group-prepend\">
                            <a id=\"launchUrlLoad\" class=\"btn btn-secondary text-white\" role=\"button\" title=\"Use and edit selected registration's tool default launch url\">
                                <i id=\"launchUrlLoadLogo\" class=\"fas fa-edit\"></i>
                            </a>
                        </div>
                        ";
        // line 50
        echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 50, $this->source); })()), "launch_url", [], "any", false, false, false, 50), 'widget');
        echo "
                    </div>
                    ";
        // line 52
        echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 52, $this->source); })()), "launch_url", [], "any", false, false, false, 52), 'help');
        echo "
                    ";
        // line 53
        echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 53, $this->source); })()), "launch_url", [], "any", false, false, false, 53), 'errors');
        echo "
                </div>
                <div class=\"form-group\">
                    ";
        // line 56
        echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 56, $this->source); })()), "claims", [], "any", false, false, false, 56), 'label');
        echo "<br/>
                    <div class=\"input-group\">
                        <div class=\"input-group-prepend\" role=\"group\" aria-label=\"Manage claims\">
                            <div class=\"btn-group-vertical dropright\" role=\"group\">
                                <button id=\"claimsAdd\" type=\"button\" class=\"btn btn-primary btn-block\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\" title=\"Add claim\">
                                    <i class=\"fas fa-plus-circle\"></i>
                                </button>
                                <div class=\"dropdown-menu dropdown-multicol\" aria-labelledby=\"claimsAdd\">
                                    ";
        // line 64
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable((isset($context["editorClaims"]) || array_key_exists("editorClaims", $context) ? $context["editorClaims"] : (function () { throw new RuntimeError('Variable "editorClaims" does not exist.', 64, $this->source); })()));
        $context['loop'] = [
          'parent' => $context['_parent'],
          'index0' => 0,
          'index'  => 1,
          'first'  => true,
        ];
        if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
            $length = count($context['_seq']);
            $context['loop']['revindex0'] = $length - 1;
            $context['loop']['revindex'] = $length;
            $context['loop']['length'] = $length;
            $context['loop']['last'] = 1 === $length;
        }
        foreach ($context['_seq'] as $context["title"] => $context["claim"]) {
            // line 65
            echo "                                        ";
            if (twig_get_attribute($this->env, $this->source, $context["loop"], "first", [], "any", false, false, false, 65)) {
                // line 66
                echo "                                            <div class=\"dropdown-row\">
                                        ";
            }
            // line 68
            echo "                                            <a
                                                class=\"editorClaim dropdown-item\"
                                                data-name=\"";
            // line 70
            echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["claim"], "name", [], "any", false, false, false, 70), "html", null, true);
            echo "\"
                                                data-value=\"";
            // line 71
            echo twig_escape_filter($this->env, json_encode(twig_get_attribute($this->env, $this->source, $context["claim"], "value", [], "any", false, false, false, 71), twig_constant("JSON_UNESCAPED_SLASHES")), "html", null, true);
            echo "\"
                                            >
                                                ";
            // line 73
            echo twig_escape_filter($this->env, $context["title"], "html", null, true);
            echo "
                                            </a>
                                        ";
            // line 75
            if (((twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 75) % 2) == 0)) {
                // line 76
                echo "                                            </div><div class=\"dropdown-row\">
                                        ";
            }
            // line 78
            echo "                                        ";
            if (twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, false, 78)) {
                // line 79
                echo "                                            </div>
                                        ";
            }
            // line 81
            echo "                                    ";
            ++$context['loop']['index0'];
            ++$context['loop']['index'];
            $context['loop']['first'] = false;
            if (isset($context['loop']['length'])) {
                --$context['loop']['revindex0'];
                --$context['loop']['revindex'];
                $context['loop']['last'] = 0 === $context['loop']['revindex0'];
            }
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['title'], $context['claim'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 82
        echo "                                </div>
                                <button id=\"claimsFormat\" type=\"button\" class=\"btn btn-secondary btn-block\" title=\"Format claims (JSON)\">
                                    <i class=\"fas fa-align-left\"></i>
                                </button>
                            </div>
                        </div>
                        ";
        // line 88
        echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 88, $this->source); })()), "claims", [], "any", false, false, false, 88), 'widget');
        echo "
                    </div>
                    <div id=\"claimsError\" class=\"invalid-feedback\">
                        Invalid claims, please provide a valid JSON representation
                    </div>
                    ";
        // line 93
        echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 93, $this->source); })()), "claims", [], "any", false, false, false, 93), 'help');
        echo "
                    ";
        // line 94
        echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 94, $this->source); })()), "claims", [], "any", false, false, false, 94), 'errors');
        echo "
                </div>
            </div>
            <div class=\"card-footer\">
                <div class=\"btn-group float-right\" role=\"group\" aria-label=\"Basic example\">
                    ";
        // line 99
        echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 99, $this->source); })()), "submit", [], "any", false, false, false, 99), 'widget');
        echo "
                    <a href=\"";
        // line 100
        echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("platform_message_launch_lti_resource_link");
        echo "\" class=\"btn btn-secondary\"><i class=\"fas fa-undo-alt\"></i>&nbsp;Reset</a>
                    ";
        // line 101
        if ((isset($context["formSubmitted"]) || array_key_exists("formSubmitted", $context) ? $context["formSubmitted"] : (function () { throw new RuntimeError('Variable "formSubmitted" does not exist.', 101, $this->source); })())) {
            // line 102
            echo "                        <a class=\"btn btn-info text-white\" data-toggle=\"modal\" data-target=\"#formShareModal\"><i class=\"fas fa-external-link-square-alt\"></i>&nbsp;Share</a>
                    ";
        }
        // line 104
        echo "                </div>
            </div>
            ";
        // line 106
        echo         $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 106, $this->source); })()), 'form_end');
        echo "
        </div>
    </div>
    ";
        // line 109
        $this->loadTemplate("launch/modal/generatorShareModal.html.twig", "platform/message/ltiResourceLinkLaunch.html.twig", 109)->display(twig_array_merge($context, ["url" => (isset($context["formShareUrl"]) || array_key_exists("formShareUrl", $context) ? $context["formShareUrl"] : (function () { throw new RuntimeError('Variable "formShareUrl" does not exist.', 109, $this->source); })())]));
        // line 110
        echo "    ";
        if ((isset($context["ltiResourceLinkLaunchRequest"]) || array_key_exists("ltiResourceLinkLaunchRequest", $context) ? $context["ltiResourceLinkLaunchRequest"] : (function () { throw new RuntimeError('Variable "ltiResourceLinkLaunchRequest" does not exist.', 110, $this->source); })())) {
            // line 111
            echo "    <br/>
    <div class=\"row\">
        <div class=\"col-sm-12\">
            <div class=\"card bg-light\">
                <div class=\"card-header\">
                    <i class=\"fas fa-sign-out-alt\"></i>&nbsp;<code>LtiResourceLinkRequest</code> launch
                </div>
                <div class=\"card-body\">
                    <div class=\"row\">
                        <div class=\"col-sm-4\">
                            <dl class=\"list-unstyled\">
                                <dt>Issuer</dt>
                                <dd>";
            // line 123
            echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["ltiResourceLinkLaunchRequest"]) || array_key_exists("ltiResourceLinkLaunchRequest", $context) ? $context["ltiResourceLinkLaunchRequest"] : (function () { throw new RuntimeError('Variable "ltiResourceLinkLaunchRequest" does not exist.', 123, $this->source); })()), "parameters", [], "any", false, false, false, 123), "get", [0 => "iss"], "method", false, false, false, 123), "html", null, true);
            echo "</dd>
                                <dt>Login hint</dt>
                                <dd><input type=\"text\" class=\"form-control\" placeholder=\"token\" value=\"";
            // line 125
            echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["ltiResourceLinkLaunchRequest"]) || array_key_exists("ltiResourceLinkLaunchRequest", $context) ? $context["ltiResourceLinkLaunchRequest"] : (function () { throw new RuntimeError('Variable "ltiResourceLinkLaunchRequest" does not exist.', 125, $this->source); })()), "parameters", [], "any", false, false, false, 125), "get", [0 => "login_hint"], "method", false, false, false, 125), "html", null, true);
            echo "\" readonly></dd>
                            </dl>
                        </div>
                        <div class=\"col-sm-4\">
                            <dl class=\"list-unstyled\">
                                <dt>Url</dt>
                                <dd>";
            // line 131
            echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["ltiResourceLinkLaunchRequest"]) || array_key_exists("ltiResourceLinkLaunchRequest", $context) ? $context["ltiResourceLinkLaunchRequest"] : (function () { throw new RuntimeError('Variable "ltiResourceLinkLaunchRequest" does not exist.', 131, $this->source); })()), "url", [], "any", false, false, false, 131), "html", null, true);
            echo "</dd>
                                <dt>Target link uri</dt>
                                <dd>";
            // line 133
            echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["ltiResourceLinkLaunchRequest"]) || array_key_exists("ltiResourceLinkLaunchRequest", $context) ? $context["ltiResourceLinkLaunchRequest"] : (function () { throw new RuntimeError('Variable "ltiResourceLinkLaunchRequest" does not exist.', 133, $this->source); })()), "parameters", [], "any", false, false, false, 133), "get", [0 => "target_link_uri"], "method", false, false, false, 133), "html", null, true);
            echo "</dd>
                            </dl>
                        </div>
                        <div class=\"col-sm-4\">
                            <dl class=\"list-unstyled\">
                                <dt>Client id</dt>
                                <dd>";
            // line 139
            echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["ltiResourceLinkLaunchRequest"]) || array_key_exists("ltiResourceLinkLaunchRequest", $context) ? $context["ltiResourceLinkLaunchRequest"] : (function () { throw new RuntimeError('Variable "ltiResourceLinkLaunchRequest" does not exist.', 139, $this->source); })()), "parameters", [], "any", false, false, false, 139), "get", [0 => "client_id"], "method", false, false, false, 139), "html", null, true);
            echo "</dd>
                                <dt>Deployment id</dt>
                                <dd>";
            // line 141
            echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["ltiResourceLinkLaunchRequest"]) || array_key_exists("ltiResourceLinkLaunchRequest", $context) ? $context["ltiResourceLinkLaunchRequest"] : (function () { throw new RuntimeError('Variable "ltiResourceLinkLaunchRequest" does not exist.', 141, $this->source); })()), "parameters", [], "any", false, false, false, 141), "get", [0 => "lti_deployment_id"], "method", false, false, false, 141), "html", null, true);
            echo "</dd>
                            </dl>
                        </div>
                    </div>
                    <div class=\"row\">
                        <div class=\"col-sm-12\">
                            <dl class=\"list-unstyled\">
                                <dt>LTI message hint</dt>
                                <dd>
                                    <div class=\"input-group\">
                                        <div class=\"input-group-prepend\">
                                            <a target=\"_blank\" class=\"btn btn-secondary\" href=\"https://jwt.io?token=";
            // line 152
            echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["ltiResourceLinkLaunchRequest"]) || array_key_exists("ltiResourceLinkLaunchRequest", $context) ? $context["ltiResourceLinkLaunchRequest"] : (function () { throw new RuntimeError('Variable "ltiResourceLinkLaunchRequest" does not exist.', 152, $this->source); })()), "parameters", [], "method", false, false, false, 152), "get", [0 => "lti_message_hint"], "method", false, false, false, 152), "html", null, true);
            echo "\" role=\"button\" title=\"See on jwt.io\">
                                                <i class=\"fas fa-external-link-alt\"></i>
                                            </a>
                                        </div>
                                        <input type=\"text\" class=\"form-control\" placeholder=\"token\" value=\"";
            // line 156
            echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["ltiResourceLinkLaunchRequest"]) || array_key_exists("ltiResourceLinkLaunchRequest", $context) ? $context["ltiResourceLinkLaunchRequest"] : (function () { throw new RuntimeError('Variable "ltiResourceLinkLaunchRequest" does not exist.', 156, $this->source); })()), "parameters", [], "method", false, false, false, 156), "get", [0 => "lti_message_hint"], "method", false, false, false, 156), "html", null, true);
            echo "\" readonly>
                                    </div>
                                </dd>
                            </dl>
                        </div>
                    </div>
                </div>
            <div class=\"card-footer\">
                <div class=\"btn-group float-right\" role=\"group\" aria-label=\"Basic example\">
                    ";
            // line 165
            echo twig_get_attribute($this->env, $this->source, (isset($context["ltiResourceLinkLaunchRequest"]) || array_key_exists("ltiResourceLinkLaunchRequest", $context) ? $context["ltiResourceLinkLaunchRequest"] : (function () { throw new RuntimeError('Variable "ltiResourceLinkLaunchRequest" does not exist.', 165, $this->source); })()), "toHtmlLink", [0 => "<i class=\"fas fa-sign-out-alt\"></i>&nbsp;Launch LtiResourceLinkRequest", 1 => ["class" => "btn btn-primary", "target" => "_blank"]], "method", false, false, false, 165);
            echo "
                </div>
            </div>
        </div>
    </div>
    ";
        }
        // line 171
        echo "    <script>
        function checkClaims() {
            try {
                if (\$(\"#lti_resource_link_launch_claims\").val() != '') {
                    \$(\"#lti_resource_link_launch_claims\").val(
                        JSON.stringify(JSON.parse(\$(\"#lti_resource_link_launch_claims\").val()), undefined, 4)
                    );
                    \$(\"#lti_resource_link_launch_claims\").removeClass('is-invalid');
                    \$(\"#lti_resource_link_launch_claims\").addClass('is-valid');
                } else {
                    \$(\"#lti_resource_link_launch_claims\").removeClass('is-invalid');
                    \$(\"#lti_resource_link_launch_claims\").removeClass('is-valid');
                }
                \$('#claimsError').hide();
            } catch(e) {
                \$(\"#lti_resource_link_launch_claims\").removeClass('is-valid');
                \$(\"#lti_resource_link_launch_claims\").addClass('is-invalid');
                \$('#claimsError').show();
            }
        }

        \$(\"#launchUrlLoad\").click(function(){
            \$.ajax({
                url: \"";
        // line 194
        echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("platform_ajax_default_registration_url");
        echo "\",
                method: \"POST\",
                data: {
                    registration: \$(\"#lti_resource_link_launch_registration\").find(\":selected\").text(),
                    type: \"";
        // line 198
        echo twig_escape_filter($this->env, twig_constant("OAT\\Library\\Lti1p3Core\\Message\\LtiMessageInterface::LTI_MESSAGE_TYPE_RESOURCE_LINK_REQUEST"), "html", null, true);
        echo "\",
                },
                dataType: \"json\",
                beforeSend: function(result){
                    \$(\"#launchUrlLoadLogo\").removeClass(\"fa-edit\");
                    \$(\"#launchUrlLoadLogo\").addClass(\"fa-spinner fa-spin\");
                },
                success: function(result){
                    \$(\"#launchUrlLoadLogo\").removeClass(\"fa-spinner fa-spin\");
                    \$(\"#launchUrlLoadLogo\").addClass(\"fa-edit\");
                    \$(\"#lti_resource_link_launch_launch_url\").val(result.url);
                },
                error: function(result){
                    \$(\"#launchUrlLoadLogo\").removeClass(\"fa-spinner fa-spin\");
                    \$(\"#launchUrlLoadLogo\").addClass(\"fa-edit\");
                }
            });
        });

        \$(\"#claimsFormat\").click(function(event){
            checkClaims();
        });

        \$(\".editorClaim\").click(function(event){
            try {
                var claims = JSON.parse(\$(\"#lti_resource_link_launch_claims\").val() || \"{}\");
                claims[\$(this).data('name')] = \$(this).data('value');
                \$(\"#lti_resource_link_launch_claims\").val(JSON.stringify(claims, undefined, 4));
                \$(\"#lti_resource_link_launch_claims\").removeClass('is-invalid');
                \$(\"#lti_resource_link_launch_claims\").addClass('is-valid');
                \$('#claimsError').hide();
            } catch(e) {
                \$(\"#lti_resource_link_launch_claims\").removeClass('is-valid');
                \$(\"#lti_resource_link_launch_claims\").addClass('is-invalid');
                \$('#claimsError').show();
            }
        });

        \$('form[name=lti_resource_link_launch]').submit(function (evt) {
            checkClaims();
            try {
                JSON.parse(\$(\"#lti_resource_link_launch_claims\").val() || \"{}\");
                return;
            } catch(e) {
                evt.preventDefault();
            }
        });

        \$('input[name=\"lti_resource_link_launch[user_type]\"]').change(function (evt) {
            switch(\$(this).val()) {
                case 'list':
                    \$('#userList').removeClass('d-none');
                    \$('#userCustom').addClass('d-none');
                    break;
                case 'custom':
                    \$('#userList').addClass('d-none');
                    \$('#userCustom').removeClass('d-none');
                    break;
                default:
                    \$('#userList').addClass('d-none');
                    \$('#userCustom').addClass('d-none');
            }
        });

        \$( document ).ready(function() {
            checkClaims();
        });
    </script>
";
        
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);

    }

    public function getTemplateName()
    {
        return "platform/message/ltiResourceLinkLaunch.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  437 => 198,  430 => 194,  405 => 171,  396 => 165,  384 => 156,  377 => 152,  363 => 141,  358 => 139,  349 => 133,  344 => 131,  335 => 125,  330 => 123,  316 => 111,  313 => 110,  311 => 109,  305 => 106,  301 => 104,  297 => 102,  295 => 101,  291 => 100,  287 => 99,  279 => 94,  275 => 93,  267 => 88,  259 => 82,  245 => 81,  241 => 79,  238 => 78,  234 => 76,  232 => 75,  227 => 73,  222 => 71,  218 => 70,  214 => 68,  210 => 66,  207 => 65,  190 => 64,  179 => 56,  173 => 53,  169 => 52,  164 => 50,  154 => 43,  147 => 39,  141 => 36,  135 => 33,  129 => 30,  124 => 28,  118 => 25,  113 => 23,  107 => 20,  101 => 17,  95 => 14,  91 => 13,  87 => 12,  81 => 9,  77 => 8,  73 => 6,  66 => 5,  53 => 3,  36 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("{% extends 'base.html.twig' %}

{% block nav_title %}<i class=\"fas fa-sign-out-alt\"></i>&nbsp;&nbsp;<span class=\"text-danger\">Platform</span> - LtiResourceLinkRequest launch{% endblock %}

{% block body %}
    <div class=\"accordion md-accordion\" id=\"accordionForm\" role=\"tablist\" aria-multiselectable=\"true\">
        <div class=\"card bg-light\">
            <div class=\"card-header dropdown-toggle clickable {{ form.vars.submitted ? 'collapsed' : '' }}\" role=\"tab\" id=\"headingForm\" data-toggle=\"collapse\" data-parent=\"#accordionForm\" href=\"#collapseForm\"
                 aria-expanded=\"{{ form.vars.submitted ? 'false' : 'true' }}\" aria-controls=\"collapseForm\">
                <i class=\"fas fa-cogs\"></i>&nbsp;<code>LtiResourceLinkRequest</code> generator
            </div>
            <div id=\"collapseForm\" class=\"collapse card-body  {{ form.vars.submitted ? '' : 'show' }}\" role=\"tabpanel\" aria-labelledby=\"headingForm\" data-parent=\"#accordionForm\">
            {{ form_start(form) }}
                {{ form_errors(form) }}
                <div class=\"form-row\">
                    <div class=\"col-md-9\">
                        {{ form_row(form.registration) }}
                    </div>
                    <div class=\"col-md-3\">
                        {{ form_row(form.user_type) }}
                    </div>
                </div>
                <div id=\"userList\" class=\"form-row {{ form.user_type.vars.value != 'list' ? 'd-none' : '' }}\">
                    <div class=\"col-md-12\">
                        {{ form_row(form.user_list) }}
                    </div>
                </div>
                <div id=\"userCustom\" class=\"form-row {{ form.user_type.vars.value != 'custom' ? 'd-none' : '' }}\">
                    <div class=\"col-md-3\">
                        {{ form_row(form.custom_user_id) }}
                    </div>
                    <div class=\"col-md-3\">
                        {{ form_row(form.custom_user_name) }}
                    </div>
                    <div class=\"col-md-3\">
                        {{ form_row(form.custom_user_email) }}
                    </div>
                    <div class=\"col-md-3\">
                        {{ form_row(form.custom_user_locale) }}
                    </div>
                </div>
                <div class=\"form-group\">
                    {{ form_label(form.launch_url) }}<br/>
                    <div class=\"input-group\">
                        <div class=\"input-group-prepend\">
                            <a id=\"launchUrlLoad\" class=\"btn btn-secondary text-white\" role=\"button\" title=\"Use and edit selected registration's tool default launch url\">
                                <i id=\"launchUrlLoadLogo\" class=\"fas fa-edit\"></i>
                            </a>
                        </div>
                        {{ form_widget(form.launch_url) }}
                    </div>
                    {{ form_help(form.launch_url) }}
                    {{ form_errors(form.launch_url) }}
                </div>
                <div class=\"form-group\">
                    {{ form_label(form.claims) }}<br/>
                    <div class=\"input-group\">
                        <div class=\"input-group-prepend\" role=\"group\" aria-label=\"Manage claims\">
                            <div class=\"btn-group-vertical dropright\" role=\"group\">
                                <button id=\"claimsAdd\" type=\"button\" class=\"btn btn-primary btn-block\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\" title=\"Add claim\">
                                    <i class=\"fas fa-plus-circle\"></i>
                                </button>
                                <div class=\"dropdown-menu dropdown-multicol\" aria-labelledby=\"claimsAdd\">
                                    {% for title, claim in editorClaims %}
                                        {% if loop.first %}
                                            <div class=\"dropdown-row\">
                                        {% endif %}
                                            <a
                                                class=\"editorClaim dropdown-item\"
                                                data-name=\"{{ claim.name }}\"
                                                data-value=\"{{ claim.value|json_encode(constant('JSON_UNESCAPED_SLASHES')) }}\"
                                            >
                                                {{ title }}
                                            </a>
                                        {% if loop.index % 2 == 0 %}
                                            </div><div class=\"dropdown-row\">
                                        {% endif %}
                                        {% if loop.last %}
                                            </div>
                                        {% endif %}
                                    {% endfor %}
                                </div>
                                <button id=\"claimsFormat\" type=\"button\" class=\"btn btn-secondary btn-block\" title=\"Format claims (JSON)\">
                                    <i class=\"fas fa-align-left\"></i>
                                </button>
                            </div>
                        </div>
                        {{ form_widget(form.claims) }}
                    </div>
                    <div id=\"claimsError\" class=\"invalid-feedback\">
                        Invalid claims, please provide a valid JSON representation
                    </div>
                    {{ form_help(form.claims) }}
                    {{ form_errors(form.claims) }}
                </div>
            </div>
            <div class=\"card-footer\">
                <div class=\"btn-group float-right\" role=\"group\" aria-label=\"Basic example\">
                    {{ form_widget(form.submit) }}
                    <a href=\"{{ path('platform_message_launch_lti_resource_link') }}\" class=\"btn btn-secondary\"><i class=\"fas fa-undo-alt\"></i>&nbsp;Reset</a>
                    {% if formSubmitted %}
                        <a class=\"btn btn-info text-white\" data-toggle=\"modal\" data-target=\"#formShareModal\"><i class=\"fas fa-external-link-square-alt\"></i>&nbsp;Share</a>
                    {% endif %}
                </div>
            </div>
            {{ form_end(form) }}
        </div>
    </div>
    {% include 'launch/modal/generatorShareModal.html.twig' with {'url': formShareUrl} %}
    {% if ltiResourceLinkLaunchRequest %}
    <br/>
    <div class=\"row\">
        <div class=\"col-sm-12\">
            <div class=\"card bg-light\">
                <div class=\"card-header\">
                    <i class=\"fas fa-sign-out-alt\"></i>&nbsp;<code>LtiResourceLinkRequest</code> launch
                </div>
                <div class=\"card-body\">
                    <div class=\"row\">
                        <div class=\"col-sm-4\">
                            <dl class=\"list-unstyled\">
                                <dt>Issuer</dt>
                                <dd>{{ ltiResourceLinkLaunchRequest.parameters.get('iss') }}</dd>
                                <dt>Login hint</dt>
                                <dd><input type=\"text\" class=\"form-control\" placeholder=\"token\" value=\"{{ ltiResourceLinkLaunchRequest.parameters.get('login_hint') }}\" readonly></dd>
                            </dl>
                        </div>
                        <div class=\"col-sm-4\">
                            <dl class=\"list-unstyled\">
                                <dt>Url</dt>
                                <dd>{{ ltiResourceLinkLaunchRequest.url }}</dd>
                                <dt>Target link uri</dt>
                                <dd>{{ ltiResourceLinkLaunchRequest.parameters.get('target_link_uri') }}</dd>
                            </dl>
                        </div>
                        <div class=\"col-sm-4\">
                            <dl class=\"list-unstyled\">
                                <dt>Client id</dt>
                                <dd>{{ ltiResourceLinkLaunchRequest.parameters.get('client_id') }}</dd>
                                <dt>Deployment id</dt>
                                <dd>{{ ltiResourceLinkLaunchRequest.parameters.get('lti_deployment_id') }}</dd>
                            </dl>
                        </div>
                    </div>
                    <div class=\"row\">
                        <div class=\"col-sm-12\">
                            <dl class=\"list-unstyled\">
                                <dt>LTI message hint</dt>
                                <dd>
                                    <div class=\"input-group\">
                                        <div class=\"input-group-prepend\">
                                            <a target=\"_blank\" class=\"btn btn-secondary\" href=\"https://jwt.io?token={{ ltiResourceLinkLaunchRequest.parameters().get('lti_message_hint') }}\" role=\"button\" title=\"See on jwt.io\">
                                                <i class=\"fas fa-external-link-alt\"></i>
                                            </a>
                                        </div>
                                        <input type=\"text\" class=\"form-control\" placeholder=\"token\" value=\"{{ ltiResourceLinkLaunchRequest.parameters().get('lti_message_hint') }}\" readonly>
                                    </div>
                                </dd>
                            </dl>
                        </div>
                    </div>
                </div>
            <div class=\"card-footer\">
                <div class=\"btn-group float-right\" role=\"group\" aria-label=\"Basic example\">
                    {{ ltiResourceLinkLaunchRequest.toHtmlLink('<i class=\"fas fa-sign-out-alt\"></i>&nbsp;Launch LtiResourceLinkRequest',{'class': 'btn btn-primary', 'target': '_blank'})|raw }}
                </div>
            </div>
        </div>
    </div>
    {% endif %}
    <script>
        function checkClaims() {
            try {
                if (\$(\"#lti_resource_link_launch_claims\").val() != '') {
                    \$(\"#lti_resource_link_launch_claims\").val(
                        JSON.stringify(JSON.parse(\$(\"#lti_resource_link_launch_claims\").val()), undefined, 4)
                    );
                    \$(\"#lti_resource_link_launch_claims\").removeClass('is-invalid');
                    \$(\"#lti_resource_link_launch_claims\").addClass('is-valid');
                } else {
                    \$(\"#lti_resource_link_launch_claims\").removeClass('is-invalid');
                    \$(\"#lti_resource_link_launch_claims\").removeClass('is-valid');
                }
                \$('#claimsError').hide();
            } catch(e) {
                \$(\"#lti_resource_link_launch_claims\").removeClass('is-valid');
                \$(\"#lti_resource_link_launch_claims\").addClass('is-invalid');
                \$('#claimsError').show();
            }
        }

        \$(\"#launchUrlLoad\").click(function(){
            \$.ajax({
                url: \"{{ path('platform_ajax_default_registration_url') }}\",
                method: \"POST\",
                data: {
                    registration: \$(\"#lti_resource_link_launch_registration\").find(\":selected\").text(),
                    type: \"{{ constant('OAT\\\\Library\\\\Lti1p3Core\\\\Message\\\\LtiMessageInterface::LTI_MESSAGE_TYPE_RESOURCE_LINK_REQUEST') }}\",
                },
                dataType: \"json\",
                beforeSend: function(result){
                    \$(\"#launchUrlLoadLogo\").removeClass(\"fa-edit\");
                    \$(\"#launchUrlLoadLogo\").addClass(\"fa-spinner fa-spin\");
                },
                success: function(result){
                    \$(\"#launchUrlLoadLogo\").removeClass(\"fa-spinner fa-spin\");
                    \$(\"#launchUrlLoadLogo\").addClass(\"fa-edit\");
                    \$(\"#lti_resource_link_launch_launch_url\").val(result.url);
                },
                error: function(result){
                    \$(\"#launchUrlLoadLogo\").removeClass(\"fa-spinner fa-spin\");
                    \$(\"#launchUrlLoadLogo\").addClass(\"fa-edit\");
                }
            });
        });

        \$(\"#claimsFormat\").click(function(event){
            checkClaims();
        });

        \$(\".editorClaim\").click(function(event){
            try {
                var claims = JSON.parse(\$(\"#lti_resource_link_launch_claims\").val() || \"{}\");
                claims[\$(this).data('name')] = \$(this).data('value');
                \$(\"#lti_resource_link_launch_claims\").val(JSON.stringify(claims, undefined, 4));
                \$(\"#lti_resource_link_launch_claims\").removeClass('is-invalid');
                \$(\"#lti_resource_link_launch_claims\").addClass('is-valid');
                \$('#claimsError').hide();
            } catch(e) {
                \$(\"#lti_resource_link_launch_claims\").removeClass('is-valid');
                \$(\"#lti_resource_link_launch_claims\").addClass('is-invalid');
                \$('#claimsError').show();
            }
        });

        \$('form[name=lti_resource_link_launch]').submit(function (evt) {
            checkClaims();
            try {
                JSON.parse(\$(\"#lti_resource_link_launch_claims\").val() || \"{}\");
                return;
            } catch(e) {
                evt.preventDefault();
            }
        });

        \$('input[name=\"lti_resource_link_launch[user_type]\"]').change(function (evt) {
            switch(\$(this).val()) {
                case 'list':
                    \$('#userList').removeClass('d-none');
                    \$('#userCustom').addClass('d-none');
                    break;
                case 'custom':
                    \$('#userList').addClass('d-none');
                    \$('#userCustom').removeClass('d-none');
                    break;
                default:
                    \$('#userList').addClass('d-none');
                    \$('#userCustom').addClass('d-none');
            }
        });

        \$( document ).ready(function() {
            checkClaims();
        });
    </script>
{% endblock body %}", "platform/message/ltiResourceLinkLaunch.html.twig", "C:\\wamp64\\www\\devkit-lti1p3-master-tool\\templates\\platform\\message\\ltiResourceLinkLaunch.html.twig");
    }
}
